| 1 |
var __typeError = (msg) => { |
| 2 |
throw TypeError(msg); |
| 3 |
}; |
| 4 |
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg); |
| 5 |
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)); |
| 6 |
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); |
| 7 |
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); |
| 8 |
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method); |
| 9 |
var __privateWrapper = (obj, member, setter, getter) => ({ |
| 10 |
set _(value) { |
| 11 |
__privateSet(obj, member, value, setter); |
| 12 |
}, |
| 13 |
get _() { |
| 14 |
return __privateGet(obj, member, getter); |
| 15 |
} |
| 16 |
}); |
| 17 |
var _provider, _providerCalled, _a, _focused, _cleanup, _setup, _b, _online, _cleanup2, _setup2, _c, _gcTimeout, _d, _initialState, _revertState, _cache, _client, _retryer, _defaultOptions, _abortSignalConsumed, _Query_instances, dispatch_fn, _e, _client2, _currentQuery, _currentQueryInitialState, _currentResult, _currentResultState, _currentResultOptions, _currentThenable, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _QueryObserver_instances, executeFetch_fn, updateStaleTimeout_fn, computeRefetchInterval_fn, updateRefetchInterval_fn, updateTimers_fn, clearStaleTimeout_fn, clearRefetchInterval_fn, updateQuery_fn, notify_fn, _f, _client3, _observers, _mutationCache, _retryer2, _Mutation_instances, dispatch_fn2, _g, _mutations, _scopes, _mutationId, _h, _client4, _currentResult2, _currentMutation, _mutateOptions, _MutationObserver_instances, updateResult_fn, notify_fn2, _i, _queries, _j, _queryCache, _mutationCache2, _defaultOptions2, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline, _k; |
| 18 |
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; |
| 19 |
function getDefaultExportFromCjs(x2) { |
| 20 |
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2; |
| 21 |
} |
| 22 |
var jsxRuntime = { exports: {} }; |
| 23 |
var reactJsxRuntime_production_min = {}; |
| 24 |
var react = { exports: {} }; |
| 25 |
var react_production_min = {}; |
| 26 |
/** |
| 27 |
* @license React |
| 28 |
* react.production.min.js |
| 29 |
* |
| 30 |
* Copyright (c) Facebook, Inc. and its affiliates. |
| 31 |
* |
| 32 |
* This source code is licensed under the MIT license found in the |
| 33 |
* LICENSE file in the root directory of this source tree. |
| 34 |
*/ |
| 35 |
var l$2 = Symbol.for("react.element"), n$2 = Symbol.for("react.portal"), p$3 = Symbol.for("react.fragment"), q$2 = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), t$1 = Symbol.for("react.provider"), u$1 = Symbol.for("react.context"), v$2 = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), x = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), z$1 = Symbol.iterator; |
| 36 |
function A$1(a) { |
| 37 |
if (null === a || "object" !== typeof a) return null; |
| 38 |
a = z$1 && a[z$1] || a["@@iterator"]; |
| 39 |
return "function" === typeof a ? a : null; |
| 40 |
} |
| 41 |
var B$1 = { isMounted: function() { |
| 42 |
return false; |
| 43 |
}, enqueueForceUpdate: function() { |
| 44 |
}, enqueueReplaceState: function() { |
| 45 |
}, enqueueSetState: function() { |
| 46 |
} }, C$1 = Object.assign, D$1 = {}; |
| 47 |
function E$1(a, b2, e2) { |
| 48 |
this.props = a; |
| 49 |
this.context = b2; |
| 50 |
this.refs = D$1; |
| 51 |
this.updater = e2 || B$1; |
| 52 |
} |
| 53 |
E$1.prototype.isReactComponent = {}; |
| 54 |
E$1.prototype.setState = function(a, b2) { |
| 55 |
if ("object" !== typeof a && "function" !== typeof a && null != a) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); |
| 56 |
this.updater.enqueueSetState(this, a, b2, "setState"); |
| 57 |
}; |
| 58 |
E$1.prototype.forceUpdate = function(a) { |
| 59 |
this.updater.enqueueForceUpdate(this, a, "forceUpdate"); |
| 60 |
}; |
| 61 |
function F() { |
| 62 |
} |
| 63 |
F.prototype = E$1.prototype; |
| 64 |
function G$1(a, b2, e2) { |
| 65 |
this.props = a; |
| 66 |
this.context = b2; |
| 67 |
this.refs = D$1; |
| 68 |
this.updater = e2 || B$1; |
| 69 |
} |
| 70 |
var H$1 = G$1.prototype = new F(); |
| 71 |
H$1.constructor = G$1; |
| 72 |
C$1(H$1, E$1.prototype); |
| 73 |
H$1.isPureReactComponent = true; |
| 74 |
var I$1 = Array.isArray, J = Object.prototype.hasOwnProperty, K$1 = { current: null }, L$1 = { key: true, ref: true, __self: true, __source: true }; |
| 75 |
function M$1(a, b2, e2) { |
| 76 |
var d2, c2 = {}, k2 = null, h2 = null; |
| 77 |
if (null != b2) for (d2 in void 0 !== b2.ref && (h2 = b2.ref), void 0 !== b2.key && (k2 = "" + b2.key), b2) J.call(b2, d2) && !L$1.hasOwnProperty(d2) && (c2[d2] = b2[d2]); |
| 78 |
var g2 = arguments.length - 2; |
| 79 |
if (1 === g2) c2.children = e2; |
| 80 |
else if (1 < g2) { |
| 81 |
for (var f2 = Array(g2), m2 = 0; m2 < g2; m2++) f2[m2] = arguments[m2 + 2]; |
| 82 |
c2.children = f2; |
| 83 |
} |
| 84 |
if (a && a.defaultProps) for (d2 in g2 = a.defaultProps, g2) void 0 === c2[d2] && (c2[d2] = g2[d2]); |
| 85 |
return { $$typeof: l$2, type: a, key: k2, ref: h2, props: c2, _owner: K$1.current }; |
| 86 |
} |
| 87 |
function N$1(a, b2) { |
| 88 |
return { $$typeof: l$2, type: a.type, key: b2, ref: a.ref, props: a.props, _owner: a._owner }; |
| 89 |
} |
| 90 |
function O$1(a) { |
| 91 |
return "object" === typeof a && null !== a && a.$$typeof === l$2; |
| 92 |
} |
| 93 |
function escape(a) { |
| 94 |
var b2 = { "=": "=0", ":": "=2" }; |
| 95 |
return "$" + a.replace(/[=:]/g, function(a2) { |
| 96 |
return b2[a2]; |
| 97 |
}); |
| 98 |
} |
| 99 |
var P$1 = /\/+/g; |
| 100 |
function Q$1(a, b2) { |
| 101 |
return "object" === typeof a && null !== a && null != a.key ? escape("" + a.key) : b2.toString(36); |
| 102 |
} |
| 103 |
function R$1(a, b2, e2, d2, c2) { |
| 104 |
var k2 = typeof a; |
| 105 |
if ("undefined" === k2 || "boolean" === k2) a = null; |
| 106 |
var h2 = false; |
| 107 |
if (null === a) h2 = true; |
| 108 |
else switch (k2) { |
| 109 |
case "string": |
| 110 |
case "number": |
| 111 |
h2 = true; |
| 112 |
break; |
| 113 |
case "object": |
| 114 |
switch (a.$$typeof) { |
| 115 |
case l$2: |
| 116 |
case n$2: |
| 117 |
h2 = true; |
| 118 |
} |
| 119 |
} |
| 120 |
if (h2) return h2 = a, c2 = c2(h2), a = "" === d2 ? "." + Q$1(h2, 0) : d2, I$1(c2) ? (e2 = "", null != a && (e2 = a.replace(P$1, "$&/") + "/"), R$1(c2, b2, e2, "", function(a2) { |
| 121 |
return a2; |
| 122 |
})) : null != c2 && (O$1(c2) && (c2 = N$1(c2, e2 + (!c2.key || h2 && h2.key === c2.key ? "" : ("" + c2.key).replace(P$1, "$&/") + "/") + a)), b2.push(c2)), 1; |
| 123 |
h2 = 0; |
| 124 |
d2 = "" === d2 ? "." : d2 + ":"; |
| 125 |
if (I$1(a)) for (var g2 = 0; g2 < a.length; g2++) { |
| 126 |
k2 = a[g2]; |
| 127 |
var f2 = d2 + Q$1(k2, g2); |
| 128 |
h2 += R$1(k2, b2, e2, f2, c2); |
| 129 |
} |
| 130 |
else if (f2 = A$1(a), "function" === typeof f2) for (a = f2.call(a), g2 = 0; !(k2 = a.next()).done; ) k2 = k2.value, f2 = d2 + Q$1(k2, g2++), h2 += R$1(k2, b2, e2, f2, c2); |
| 131 |
else if ("object" === k2) throw b2 = String(a), Error("Objects are not valid as a React child (found: " + ("[object Object]" === b2 ? "object with keys {" + Object.keys(a).join(", ") + "}" : b2) + "). If you meant to render a collection of children, use an array instead."); |
| 132 |
return h2; |
| 133 |
} |
| 134 |
function S$1(a, b2, e2) { |
| 135 |
if (null == a) return a; |
| 136 |
var d2 = [], c2 = 0; |
| 137 |
R$1(a, d2, "", "", function(a2) { |
| 138 |
return b2.call(e2, a2, c2++); |
| 139 |
}); |
| 140 |
return d2; |
| 141 |
} |
| 142 |
function T$1(a) { |
| 143 |
if (-1 === a._status) { |
| 144 |
var b2 = a._result; |
| 145 |
b2 = b2(); |
| 146 |
b2.then(function(b3) { |
| 147 |
if (0 === a._status || -1 === a._status) a._status = 1, a._result = b3; |
| 148 |
}, function(b3) { |
| 149 |
if (0 === a._status || -1 === a._status) a._status = 2, a._result = b3; |
| 150 |
}); |
| 151 |
-1 === a._status && (a._status = 0, a._result = b2); |
| 152 |
} |
| 153 |
if (1 === a._status) return a._result.default; |
| 154 |
throw a._result; |
| 155 |
} |
| 156 |
var U$1 = { current: null }, V$1 = { transition: null }, W$1 = { ReactCurrentDispatcher: U$1, ReactCurrentBatchConfig: V$1, ReactCurrentOwner: K$1 }; |
| 157 |
function X$2() { |
| 158 |
throw Error("act(...) is not supported in production builds of React."); |
| 159 |
} |
| 160 |
react_production_min.Children = { map: S$1, forEach: function(a, b2, e2) { |
| 161 |
S$1(a, function() { |
| 162 |
b2.apply(this, arguments); |
| 163 |
}, e2); |
| 164 |
}, count: function(a) { |
| 165 |
var b2 = 0; |
| 166 |
S$1(a, function() { |
| 167 |
b2++; |
| 168 |
}); |
| 169 |
return b2; |
| 170 |
}, toArray: function(a) { |
| 171 |
return S$1(a, function(a2) { |
| 172 |
return a2; |
| 173 |
}) || []; |
| 174 |
}, only: function(a) { |
| 175 |
if (!O$1(a)) throw Error("React.Children.only expected to receive a single React element child."); |
| 176 |
return a; |
| 177 |
} }; |
| 178 |
react_production_min.Component = E$1; |
| 179 |
react_production_min.Fragment = p$3; |
| 180 |
react_production_min.Profiler = r; |
| 181 |
react_production_min.PureComponent = G$1; |
| 182 |
react_production_min.StrictMode = q$2; |
| 183 |
react_production_min.Suspense = w; |
| 184 |
react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W$1; |
| 185 |
react_production_min.act = X$2; |
| 186 |
react_production_min.cloneElement = function(a, b2, e2) { |
| 187 |
if (null === a || void 0 === a) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a + "."); |
| 188 |
var d2 = C$1({}, a.props), c2 = a.key, k2 = a.ref, h2 = a._owner; |
| 189 |
if (null != b2) { |
| 190 |
void 0 !== b2.ref && (k2 = b2.ref, h2 = K$1.current); |
| 191 |
void 0 !== b2.key && (c2 = "" + b2.key); |
| 192 |
if (a.type && a.type.defaultProps) var g2 = a.type.defaultProps; |
| 193 |
for (f2 in b2) J.call(b2, f2) && !L$1.hasOwnProperty(f2) && (d2[f2] = void 0 === b2[f2] && void 0 !== g2 ? g2[f2] : b2[f2]); |
| 194 |
} |
| 195 |
var f2 = arguments.length - 2; |
| 196 |
if (1 === f2) d2.children = e2; |
| 197 |
else if (1 < f2) { |
| 198 |
g2 = Array(f2); |
| 199 |
for (var m2 = 0; m2 < f2; m2++) g2[m2] = arguments[m2 + 2]; |
| 200 |
d2.children = g2; |
| 201 |
} |
| 202 |
return { $$typeof: l$2, type: a.type, key: c2, ref: k2, props: d2, _owner: h2 }; |
| 203 |
}; |
| 204 |
react_production_min.createContext = function(a) { |
| 205 |
a = { $$typeof: u$1, _currentValue: a, _currentValue2: a, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }; |
| 206 |
a.Provider = { $$typeof: t$1, _context: a }; |
| 207 |
return a.Consumer = a; |
| 208 |
}; |
| 209 |
react_production_min.createElement = M$1; |
| 210 |
react_production_min.createFactory = function(a) { |
| 211 |
var b2 = M$1.bind(null, a); |
| 212 |
b2.type = a; |
| 213 |
return b2; |
| 214 |
}; |
| 215 |
react_production_min.createRef = function() { |
| 216 |
return { current: null }; |
| 217 |
}; |
| 218 |
react_production_min.forwardRef = function(a) { |
| 219 |
return { $$typeof: v$2, render: a }; |
| 220 |
}; |
| 221 |
react_production_min.isValidElement = O$1; |
| 222 |
react_production_min.lazy = function(a) { |
| 223 |
return { $$typeof: y, _payload: { _status: -1, _result: a }, _init: T$1 }; |
| 224 |
}; |
| 225 |
react_production_min.memo = function(a, b2) { |
| 226 |
return { $$typeof: x, type: a, compare: void 0 === b2 ? null : b2 }; |
| 227 |
}; |
| 228 |
react_production_min.startTransition = function(a) { |
| 229 |
var b2 = V$1.transition; |
| 230 |
V$1.transition = {}; |
| 231 |
try { |
| 232 |
a(); |
| 233 |
} finally { |
| 234 |
V$1.transition = b2; |
| 235 |
} |
| 236 |
}; |
| 237 |
react_production_min.unstable_act = X$2; |
| 238 |
react_production_min.useCallback = function(a, b2) { |
| 239 |
return U$1.current.useCallback(a, b2); |
| 240 |
}; |
| 241 |
react_production_min.useContext = function(a) { |
| 242 |
return U$1.current.useContext(a); |
| 243 |
}; |
| 244 |
react_production_min.useDebugValue = function() { |
| 245 |
}; |
| 246 |
react_production_min.useDeferredValue = function(a) { |
| 247 |
return U$1.current.useDeferredValue(a); |
| 248 |
}; |
| 249 |
react_production_min.useEffect = function(a, b2) { |
| 250 |
return U$1.current.useEffect(a, b2); |
| 251 |
}; |
| 252 |
react_production_min.useId = function() { |
| 253 |
return U$1.current.useId(); |
| 254 |
}; |
| 255 |
react_production_min.useImperativeHandle = function(a, b2, e2) { |
| 256 |
return U$1.current.useImperativeHandle(a, b2, e2); |
| 257 |
}; |
| 258 |
react_production_min.useInsertionEffect = function(a, b2) { |
| 259 |
return U$1.current.useInsertionEffect(a, b2); |
| 260 |
}; |
| 261 |
react_production_min.useLayoutEffect = function(a, b2) { |
| 262 |
return U$1.current.useLayoutEffect(a, b2); |
| 263 |
}; |
| 264 |
react_production_min.useMemo = function(a, b2) { |
| 265 |
return U$1.current.useMemo(a, b2); |
| 266 |
}; |
| 267 |
react_production_min.useReducer = function(a, b2, e2) { |
| 268 |
return U$1.current.useReducer(a, b2, e2); |
| 269 |
}; |
| 270 |
react_production_min.useRef = function(a) { |
| 271 |
return U$1.current.useRef(a); |
| 272 |
}; |
| 273 |
react_production_min.useState = function(a) { |
| 274 |
return U$1.current.useState(a); |
| 275 |
}; |
| 276 |
react_production_min.useSyncExternalStore = function(a, b2, e2) { |
| 277 |
return U$1.current.useSyncExternalStore(a, b2, e2); |
| 278 |
}; |
| 279 |
react_production_min.useTransition = function() { |
| 280 |
return U$1.current.useTransition(); |
| 281 |
}; |
| 282 |
react_production_min.version = "18.3.1"; |
| 283 |
{ |
| 284 |
react.exports = react_production_min; |
| 285 |
} |
| 286 |
var reactExports = react.exports; |
| 287 |
const React = /* @__PURE__ */ getDefaultExportFromCjs(reactExports); |
| 288 |
/** |
| 289 |
* @license React |
| 290 |
* react-jsx-runtime.production.min.js |
| 291 |
* |
| 292 |
* Copyright (c) Facebook, Inc. and its affiliates. |
| 293 |
* |
| 294 |
* This source code is licensed under the MIT license found in the |
| 295 |
* LICENSE file in the root directory of this source tree. |
| 296 |
*/ |
| 297 |
var f$1 = reactExports, k$1 = Symbol.for("react.element"), l$1 = Symbol.for("react.fragment"), m$2 = Object.prototype.hasOwnProperty, n$1 = f$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p$2 = { key: true, ref: true, __self: true, __source: true }; |
| 298 |
function q$1(c2, a, g2) { |
| 299 |
var b2, d2 = {}, e2 = null, h2 = null; |
| 300 |
void 0 !== g2 && (e2 = "" + g2); |
| 301 |
void 0 !== a.key && (e2 = "" + a.key); |
| 302 |
void 0 !== a.ref && (h2 = a.ref); |
| 303 |
for (b2 in a) m$2.call(a, b2) && !p$2.hasOwnProperty(b2) && (d2[b2] = a[b2]); |
| 304 |
if (c2 && c2.defaultProps) for (b2 in a = c2.defaultProps, a) void 0 === d2[b2] && (d2[b2] = a[b2]); |
| 305 |
return { $$typeof: k$1, type: c2, key: e2, ref: h2, props: d2, _owner: n$1.current }; |
| 306 |
} |
| 307 |
reactJsxRuntime_production_min.Fragment = l$1; |
| 308 |
reactJsxRuntime_production_min.jsx = q$1; |
| 309 |
reactJsxRuntime_production_min.jsxs = q$1; |
| 310 |
{ |
| 311 |
jsxRuntime.exports = reactJsxRuntime_production_min; |
| 312 |
} |
| 313 |
var jsxRuntimeExports = jsxRuntime.exports; |
| 314 |
var client = {}; |
| 315 |
var reactDom = { exports: {} }; |
| 316 |
var reactDom_production_min = {}; |
| 317 |
var scheduler = { exports: {} }; |
| 318 |
var scheduler_production_min = {}; |
| 319 |
/** |
| 320 |
* @license React |
| 321 |
* scheduler.production.min.js |
| 322 |
* |
| 323 |
* Copyright (c) Facebook, Inc. and its affiliates. |
| 324 |
* |
| 325 |
* This source code is licensed under the MIT license found in the |
| 326 |
* LICENSE file in the root directory of this source tree. |
| 327 |
*/ |
| 328 |
(function(exports$1) { |
| 329 |
function f2(a, b2) { |
| 330 |
var c2 = a.length; |
| 331 |
a.push(b2); |
| 332 |
a: for (; 0 < c2; ) { |
| 333 |
var d2 = c2 - 1 >>> 1, e2 = a[d2]; |
| 334 |
if (0 < g2(e2, b2)) a[d2] = b2, a[c2] = e2, c2 = d2; |
| 335 |
else break a; |
| 336 |
} |
| 337 |
} |
| 338 |
function h2(a) { |
| 339 |
return 0 === a.length ? null : a[0]; |
| 340 |
} |
| 341 |
function k2(a) { |
| 342 |
if (0 === a.length) return null; |
| 343 |
var b2 = a[0], c2 = a.pop(); |
| 344 |
if (c2 !== b2) { |
| 345 |
a[0] = c2; |
| 346 |
a: for (var d2 = 0, e2 = a.length, w2 = e2 >>> 1; d2 < w2; ) { |
| 347 |
var m2 = 2 * (d2 + 1) - 1, C2 = a[m2], n2 = m2 + 1, x2 = a[n2]; |
| 348 |
if (0 > g2(C2, c2)) n2 < e2 && 0 > g2(x2, C2) ? (a[d2] = x2, a[n2] = c2, d2 = n2) : (a[d2] = C2, a[m2] = c2, d2 = m2); |
| 349 |
else if (n2 < e2 && 0 > g2(x2, c2)) a[d2] = x2, a[n2] = c2, d2 = n2; |
| 350 |
else break a; |
| 351 |
} |
| 352 |
} |
| 353 |
return b2; |
| 354 |
} |
| 355 |
function g2(a, b2) { |
| 356 |
var c2 = a.sortIndex - b2.sortIndex; |
| 357 |
return 0 !== c2 ? c2 : a.id - b2.id; |
| 358 |
} |
| 359 |
if ("object" === typeof performance && "function" === typeof performance.now) { |
| 360 |
var l2 = performance; |
| 361 |
exports$1.unstable_now = function() { |
| 362 |
return l2.now(); |
| 363 |
}; |
| 364 |
} else { |
| 365 |
var p2 = Date, q2 = p2.now(); |
| 366 |
exports$1.unstable_now = function() { |
| 367 |
return p2.now() - q2; |
| 368 |
}; |
| 369 |
} |
| 370 |
var r2 = [], t2 = [], u2 = 1, v2 = null, y2 = 3, z2 = false, A2 = false, B2 = false, D2 = "function" === typeof setTimeout ? setTimeout : null, E2 = "function" === typeof clearTimeout ? clearTimeout : null, F2 = "undefined" !== typeof setImmediate ? setImmediate : null; |
| 371 |
"undefined" !== typeof navigator && void 0 !== navigator.scheduling && void 0 !== navigator.scheduling.isInputPending && navigator.scheduling.isInputPending.bind(navigator.scheduling); |
| 372 |
function G2(a) { |
| 373 |
for (var b2 = h2(t2); null !== b2; ) { |
| 374 |
if (null === b2.callback) k2(t2); |
| 375 |
else if (b2.startTime <= a) k2(t2), b2.sortIndex = b2.expirationTime, f2(r2, b2); |
| 376 |
else break; |
| 377 |
b2 = h2(t2); |
| 378 |
} |
| 379 |
} |
| 380 |
function H2(a) { |
| 381 |
B2 = false; |
| 382 |
G2(a); |
| 383 |
if (!A2) if (null !== h2(r2)) A2 = true, I2(J2); |
| 384 |
else { |
| 385 |
var b2 = h2(t2); |
| 386 |
null !== b2 && K2(H2, b2.startTime - a); |
| 387 |
} |
| 388 |
} |
| 389 |
function J2(a, b2) { |
| 390 |
A2 = false; |
| 391 |
B2 && (B2 = false, E2(L2), L2 = -1); |
| 392 |
z2 = true; |
| 393 |
var c2 = y2; |
| 394 |
try { |
| 395 |
G2(b2); |
| 396 |
for (v2 = h2(r2); null !== v2 && (!(v2.expirationTime > b2) || a && !M2()); ) { |
| 397 |
var d2 = v2.callback; |
| 398 |
if ("function" === typeof d2) { |
| 399 |
v2.callback = null; |
| 400 |
y2 = v2.priorityLevel; |
| 401 |
var e2 = d2(v2.expirationTime <= b2); |
| 402 |
b2 = exports$1.unstable_now(); |
| 403 |
"function" === typeof e2 ? v2.callback = e2 : v2 === h2(r2) && k2(r2); |
| 404 |
G2(b2); |
| 405 |
} else k2(r2); |
| 406 |
v2 = h2(r2); |
| 407 |
} |
| 408 |
if (null !== v2) var w2 = true; |
| 409 |
else { |
| 410 |
var m2 = h2(t2); |
| 411 |
null !== m2 && K2(H2, m2.startTime - b2); |
| 412 |
w2 = false; |
| 413 |
} |
| 414 |
return w2; |
| 415 |
} finally { |
| 416 |
v2 = null, y2 = c2, z2 = false; |
| 417 |
} |
| 418 |
} |
| 419 |
var N2 = false, O2 = null, L2 = -1, P2 = 5, Q2 = -1; |
| 420 |
function M2() { |
| 421 |
return exports$1.unstable_now() - Q2 < P2 ? false : true; |
| 422 |
} |
| 423 |
function R2() { |
| 424 |
if (null !== O2) { |
| 425 |
var a = exports$1.unstable_now(); |
| 426 |
Q2 = a; |
| 427 |
var b2 = true; |
| 428 |
try { |
| 429 |
b2 = O2(true, a); |
| 430 |
} finally { |
| 431 |
b2 ? S2() : (N2 = false, O2 = null); |
| 432 |
} |
| 433 |
} else N2 = false; |
| 434 |
} |
| 435 |
var S2; |
| 436 |
if ("function" === typeof F2) S2 = function() { |
| 437 |
F2(R2); |
| 438 |
}; |
| 439 |
else if ("undefined" !== typeof MessageChannel) { |
| 440 |
var T2 = new MessageChannel(), U2 = T2.port2; |
| 441 |
T2.port1.onmessage = R2; |
| 442 |
S2 = function() { |
| 443 |
U2.postMessage(null); |
| 444 |
}; |
| 445 |
} else S2 = function() { |
| 446 |
D2(R2, 0); |
| 447 |
}; |
| 448 |
function I2(a) { |
| 449 |
O2 = a; |
| 450 |
N2 || (N2 = true, S2()); |
| 451 |
} |
| 452 |
function K2(a, b2) { |
| 453 |
L2 = D2(function() { |
| 454 |
a(exports$1.unstable_now()); |
| 455 |
}, b2); |
| 456 |
} |
| 457 |
exports$1.unstable_IdlePriority = 5; |
| 458 |
exports$1.unstable_ImmediatePriority = 1; |
| 459 |
exports$1.unstable_LowPriority = 4; |
| 460 |
exports$1.unstable_NormalPriority = 3; |
| 461 |
exports$1.unstable_Profiling = null; |
| 462 |
exports$1.unstable_UserBlockingPriority = 2; |
| 463 |
exports$1.unstable_cancelCallback = function(a) { |
| 464 |
a.callback = null; |
| 465 |
}; |
| 466 |
exports$1.unstable_continueExecution = function() { |
| 467 |
A2 || z2 || (A2 = true, I2(J2)); |
| 468 |
}; |
| 469 |
exports$1.unstable_forceFrameRate = function(a) { |
| 470 |
0 > a || 125 < a ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : P2 = 0 < a ? Math.floor(1e3 / a) : 5; |
| 471 |
}; |
| 472 |
exports$1.unstable_getCurrentPriorityLevel = function() { |
| 473 |
return y2; |
| 474 |
}; |
| 475 |
exports$1.unstable_getFirstCallbackNode = function() { |
| 476 |
return h2(r2); |
| 477 |
}; |
| 478 |
exports$1.unstable_next = function(a) { |
| 479 |
switch (y2) { |
| 480 |
case 1: |
| 481 |
case 2: |
| 482 |
case 3: |
| 483 |
var b2 = 3; |
| 484 |
break; |
| 485 |
default: |
| 486 |
b2 = y2; |
| 487 |
} |
| 488 |
var c2 = y2; |
| 489 |
y2 = b2; |
| 490 |
try { |
| 491 |
return a(); |
| 492 |
} finally { |
| 493 |
y2 = c2; |
| 494 |
} |
| 495 |
}; |
| 496 |
exports$1.unstable_pauseExecution = function() { |
| 497 |
}; |
| 498 |
exports$1.unstable_requestPaint = function() { |
| 499 |
}; |
| 500 |
exports$1.unstable_runWithPriority = function(a, b2) { |
| 501 |
switch (a) { |
| 502 |
case 1: |
| 503 |
case 2: |
| 504 |
case 3: |
| 505 |
case 4: |
| 506 |
case 5: |
| 507 |
break; |
| 508 |
default: |
| 509 |
a = 3; |
| 510 |
} |
| 511 |
var c2 = y2; |
| 512 |
y2 = a; |
| 513 |
try { |
| 514 |
return b2(); |
| 515 |
} finally { |
| 516 |
y2 = c2; |
| 517 |
} |
| 518 |
}; |
| 519 |
exports$1.unstable_scheduleCallback = function(a, b2, c2) { |
| 520 |
var d2 = exports$1.unstable_now(); |
| 521 |
"object" === typeof c2 && null !== c2 ? (c2 = c2.delay, c2 = "number" === typeof c2 && 0 < c2 ? d2 + c2 : d2) : c2 = d2; |
| 522 |
switch (a) { |
| 523 |
case 1: |
| 524 |
var e2 = -1; |
| 525 |
break; |
| 526 |
case 2: |
| 527 |
e2 = 250; |
| 528 |
break; |
| 529 |
case 5: |
| 530 |
e2 = 1073741823; |
| 531 |
break; |
| 532 |
case 4: |
| 533 |
e2 = 1e4; |
| 534 |
break; |
| 535 |
default: |
| 536 |
e2 = 5e3; |
| 537 |
} |
| 538 |
e2 = c2 + e2; |
| 539 |
a = { id: u2++, callback: b2, priorityLevel: a, startTime: c2, expirationTime: e2, sortIndex: -1 }; |
| 540 |
c2 > d2 ? (a.sortIndex = c2, f2(t2, a), null === h2(r2) && a === h2(t2) && (B2 ? (E2(L2), L2 = -1) : B2 = true, K2(H2, c2 - d2))) : (a.sortIndex = e2, f2(r2, a), A2 || z2 || (A2 = true, I2(J2))); |
| 541 |
return a; |
| 542 |
}; |
| 543 |
exports$1.unstable_shouldYield = M2; |
| 544 |
exports$1.unstable_wrapCallback = function(a) { |
| 545 |
var b2 = y2; |
| 546 |
return function() { |
| 547 |
var c2 = y2; |
| 548 |
y2 = b2; |
| 549 |
try { |
| 550 |
return a.apply(this, arguments); |
| 551 |
} finally { |
| 552 |
y2 = c2; |
| 553 |
} |
| 554 |
}; |
| 555 |
}; |
| 556 |
})(scheduler_production_min); |
| 557 |
{ |
| 558 |
scheduler.exports = scheduler_production_min; |
| 559 |
} |
| 560 |
var schedulerExports = scheduler.exports; |
| 561 |
/** |
| 562 |
* @license React |
| 563 |
* react-dom.production.min.js |
| 564 |
* |
| 565 |
* Copyright (c) Facebook, Inc. and its affiliates. |
| 566 |
* |
| 567 |
* This source code is licensed under the MIT license found in the |
| 568 |
* LICENSE file in the root directory of this source tree. |
| 569 |
*/ |
| 570 |
var aa = reactExports, ca = schedulerExports; |
| 571 |
function p$1(a) { |
| 572 |
for (var b2 = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c2 = 1; c2 < arguments.length; c2++) b2 += "&args[]=" + encodeURIComponent(arguments[c2]); |
| 573 |
return "Minified React error #" + a + "; visit " + b2 + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."; |
| 574 |
} |
| 575 |
var da = /* @__PURE__ */ new Set(), ea = {}; |
| 576 |
function fa(a, b2) { |
| 577 |
ha(a, b2); |
| 578 |
ha(a + "Capture", b2); |
| 579 |
} |
| 580 |
function ha(a, b2) { |
| 581 |
ea[a] = b2; |
| 582 |
for (a = 0; a < b2.length; a++) da.add(b2[a]); |
| 583 |
} |
| 584 |
var ia = !("undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement), ja = Object.prototype.hasOwnProperty, ka = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, la = {}, ma = {}; |
| 585 |
function oa(a) { |
| 586 |
if (ja.call(ma, a)) return true; |
| 587 |
if (ja.call(la, a)) return false; |
| 588 |
if (ka.test(a)) return ma[a] = true; |
| 589 |
la[a] = true; |
| 590 |
return false; |
| 591 |
} |
| 592 |
function pa(a, b2, c2, d2) { |
| 593 |
if (null !== c2 && 0 === c2.type) return false; |
| 594 |
switch (typeof b2) { |
| 595 |
case "function": |
| 596 |
case "symbol": |
| 597 |
return true; |
| 598 |
case "boolean": |
| 599 |
if (d2) return false; |
| 600 |
if (null !== c2) return !c2.acceptsBooleans; |
| 601 |
a = a.toLowerCase().slice(0, 5); |
| 602 |
return "data-" !== a && "aria-" !== a; |
| 603 |
default: |
| 604 |
return false; |
| 605 |
} |
| 606 |
} |
| 607 |
function qa(a, b2, c2, d2) { |
| 608 |
if (null === b2 || "undefined" === typeof b2 || pa(a, b2, c2, d2)) return true; |
| 609 |
if (d2) return false; |
| 610 |
if (null !== c2) switch (c2.type) { |
| 611 |
case 3: |
| 612 |
return !b2; |
| 613 |
case 4: |
| 614 |
return false === b2; |
| 615 |
case 5: |
| 616 |
return isNaN(b2); |
| 617 |
case 6: |
| 618 |
return isNaN(b2) || 1 > b2; |
| 619 |
} |
| 620 |
return false; |
| 621 |
} |
| 622 |
function v$1(a, b2, c2, d2, e2, f2, g2) { |
| 623 |
this.acceptsBooleans = 2 === b2 || 3 === b2 || 4 === b2; |
| 624 |
this.attributeName = d2; |
| 625 |
this.attributeNamespace = e2; |
| 626 |
this.mustUseProperty = c2; |
| 627 |
this.propertyName = a; |
| 628 |
this.type = b2; |
| 629 |
this.sanitizeURL = f2; |
| 630 |
this.removeEmptyString = g2; |
| 631 |
} |
| 632 |
var z = {}; |
| 633 |
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a) { |
| 634 |
z[a] = new v$1(a, 0, false, a, null, false, false); |
| 635 |
}); |
| 636 |
[["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(a) { |
| 637 |
var b2 = a[0]; |
| 638 |
z[b2] = new v$1(b2, 1, false, a[1], null, false, false); |
| 639 |
}); |
| 640 |
["contentEditable", "draggable", "spellCheck", "value"].forEach(function(a) { |
| 641 |
z[a] = new v$1(a, 2, false, a.toLowerCase(), null, false, false); |
| 642 |
}); |
| 643 |
["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(a) { |
| 644 |
z[a] = new v$1(a, 2, false, a, null, false, false); |
| 645 |
}); |
| 646 |
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a) { |
| 647 |
z[a] = new v$1(a, 3, false, a.toLowerCase(), null, false, false); |
| 648 |
}); |
| 649 |
["checked", "multiple", "muted", "selected"].forEach(function(a) { |
| 650 |
z[a] = new v$1(a, 3, true, a, null, false, false); |
| 651 |
}); |
| 652 |
["capture", "download"].forEach(function(a) { |
| 653 |
z[a] = new v$1(a, 4, false, a, null, false, false); |
| 654 |
}); |
| 655 |
["cols", "rows", "size", "span"].forEach(function(a) { |
| 656 |
z[a] = new v$1(a, 6, false, a, null, false, false); |
| 657 |
}); |
| 658 |
["rowSpan", "start"].forEach(function(a) { |
| 659 |
z[a] = new v$1(a, 5, false, a.toLowerCase(), null, false, false); |
| 660 |
}); |
| 661 |
var ra = /[\-:]([a-z])/g; |
| 662 |
function sa(a) { |
| 663 |
return a[1].toUpperCase(); |
| 664 |
} |
| 665 |
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a) { |
| 666 |
var b2 = a.replace( |
| 667 |
ra, |
| 668 |
sa |
| 669 |
); |
| 670 |
z[b2] = new v$1(b2, 1, false, a, null, false, false); |
| 671 |
}); |
| 672 |
"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a) { |
| 673 |
var b2 = a.replace(ra, sa); |
| 674 |
z[b2] = new v$1(b2, 1, false, a, "http://www.w3.org/1999/xlink", false, false); |
| 675 |
}); |
| 676 |
["xml:base", "xml:lang", "xml:space"].forEach(function(a) { |
| 677 |
var b2 = a.replace(ra, sa); |
| 678 |
z[b2] = new v$1(b2, 1, false, a, "http://www.w3.org/XML/1998/namespace", false, false); |
| 679 |
}); |
| 680 |
["tabIndex", "crossOrigin"].forEach(function(a) { |
| 681 |
z[a] = new v$1(a, 1, false, a.toLowerCase(), null, false, false); |
| 682 |
}); |
| 683 |
z.xlinkHref = new v$1("xlinkHref", 1, false, "xlink:href", "http://www.w3.org/1999/xlink", true, false); |
| 684 |
["src", "href", "action", "formAction"].forEach(function(a) { |
| 685 |
z[a] = new v$1(a, 1, false, a.toLowerCase(), null, true, true); |
| 686 |
}); |
| 687 |
function ta(a, b2, c2, d2) { |
| 688 |
var e2 = z.hasOwnProperty(b2) ? z[b2] : null; |
| 689 |
if (null !== e2 ? 0 !== e2.type : d2 || !(2 < b2.length) || "o" !== b2[0] && "O" !== b2[0] || "n" !== b2[1] && "N" !== b2[1]) qa(b2, c2, e2, d2) && (c2 = null), d2 || null === e2 ? oa(b2) && (null === c2 ? a.removeAttribute(b2) : a.setAttribute(b2, "" + c2)) : e2.mustUseProperty ? a[e2.propertyName] = null === c2 ? 3 === e2.type ? false : "" : c2 : (b2 = e2.attributeName, d2 = e2.attributeNamespace, null === c2 ? a.removeAttribute(b2) : (e2 = e2.type, c2 = 3 === e2 || 4 === e2 && true === c2 ? "" : "" + c2, d2 ? a.setAttributeNS(d2, b2, c2) : a.setAttribute(b2, c2))); |
| 690 |
} |
| 691 |
var ua = aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, va = Symbol.for("react.element"), wa = Symbol.for("react.portal"), ya = Symbol.for("react.fragment"), za = Symbol.for("react.strict_mode"), Aa = Symbol.for("react.profiler"), Ba = Symbol.for("react.provider"), Ca = Symbol.for("react.context"), Da = Symbol.for("react.forward_ref"), Ea = Symbol.for("react.suspense"), Fa = Symbol.for("react.suspense_list"), Ga = Symbol.for("react.memo"), Ha = Symbol.for("react.lazy"); |
| 692 |
var Ia = Symbol.for("react.offscreen"); |
| 693 |
var Ja = Symbol.iterator; |
| 694 |
function Ka(a) { |
| 695 |
if (null === a || "object" !== typeof a) return null; |
| 696 |
a = Ja && a[Ja] || a["@@iterator"]; |
| 697 |
return "function" === typeof a ? a : null; |
| 698 |
} |
| 699 |
var A = Object.assign, La; |
| 700 |
function Ma(a) { |
| 701 |
if (void 0 === La) try { |
| 702 |
throw Error(); |
| 703 |
} catch (c2) { |
| 704 |
var b2 = c2.stack.trim().match(/\n( *(at )?)/); |
| 705 |
La = b2 && b2[1] || ""; |
| 706 |
} |
| 707 |
return "\n" + La + a; |
| 708 |
} |
| 709 |
var Na = false; |
| 710 |
function Oa(a, b2) { |
| 711 |
if (!a || Na) return ""; |
| 712 |
Na = true; |
| 713 |
var c2 = Error.prepareStackTrace; |
| 714 |
Error.prepareStackTrace = void 0; |
| 715 |
try { |
| 716 |
if (b2) if (b2 = function() { |
| 717 |
throw Error(); |
| 718 |
}, Object.defineProperty(b2.prototype, "props", { set: function() { |
| 719 |
throw Error(); |
| 720 |
} }), "object" === typeof Reflect && Reflect.construct) { |
| 721 |
try { |
| 722 |
Reflect.construct(b2, []); |
| 723 |
} catch (l2) { |
| 724 |
var d2 = l2; |
| 725 |
} |
| 726 |
Reflect.construct(a, [], b2); |
| 727 |
} else { |
| 728 |
try { |
| 729 |
b2.call(); |
| 730 |
} catch (l2) { |
| 731 |
d2 = l2; |
| 732 |
} |
| 733 |
a.call(b2.prototype); |
| 734 |
} |
| 735 |
else { |
| 736 |
try { |
| 737 |
throw Error(); |
| 738 |
} catch (l2) { |
| 739 |
d2 = l2; |
| 740 |
} |
| 741 |
a(); |
| 742 |
} |
| 743 |
} catch (l2) { |
| 744 |
if (l2 && d2 && "string" === typeof l2.stack) { |
| 745 |
for (var e2 = l2.stack.split("\n"), f2 = d2.stack.split("\n"), g2 = e2.length - 1, h2 = f2.length - 1; 1 <= g2 && 0 <= h2 && e2[g2] !== f2[h2]; ) h2--; |
| 746 |
for (; 1 <= g2 && 0 <= h2; g2--, h2--) if (e2[g2] !== f2[h2]) { |
| 747 |
if (1 !== g2 || 1 !== h2) { |
| 748 |
do |
| 749 |
if (g2--, h2--, 0 > h2 || e2[g2] !== f2[h2]) { |
| 750 |
var k2 = "\n" + e2[g2].replace(" at new ", " at "); |
| 751 |
a.displayName && k2.includes("<anonymous>") && (k2 = k2.replace("<anonymous>", a.displayName)); |
| 752 |
return k2; |
| 753 |
} |
| 754 |
while (1 <= g2 && 0 <= h2); |
| 755 |
} |
| 756 |
break; |
| 757 |
} |
| 758 |
} |
| 759 |
} finally { |
| 760 |
Na = false, Error.prepareStackTrace = c2; |
| 761 |
} |
| 762 |
return (a = a ? a.displayName || a.name : "") ? Ma(a) : ""; |
| 763 |
} |
| 764 |
function Pa(a) { |
| 765 |
switch (a.tag) { |
| 766 |
case 5: |
| 767 |
return Ma(a.type); |
| 768 |
case 16: |
| 769 |
return Ma("Lazy"); |
| 770 |
case 13: |
| 771 |
return Ma("Suspense"); |
| 772 |
case 19: |
| 773 |
return Ma("SuspenseList"); |
| 774 |
case 0: |
| 775 |
case 2: |
| 776 |
case 15: |
| 777 |
return a = Oa(a.type, false), a; |
| 778 |
case 11: |
| 779 |
return a = Oa(a.type.render, false), a; |
| 780 |
case 1: |
| 781 |
return a = Oa(a.type, true), a; |
| 782 |
default: |
| 783 |
return ""; |
| 784 |
} |
| 785 |
} |
| 786 |
function Qa(a) { |
| 787 |
if (null == a) return null; |
| 788 |
if ("function" === typeof a) return a.displayName || a.name || null; |
| 789 |
if ("string" === typeof a) return a; |
| 790 |
switch (a) { |
| 791 |
case ya: |
| 792 |
return "Fragment"; |
| 793 |
case wa: |
| 794 |
return "Portal"; |
| 795 |
case Aa: |
| 796 |
return "Profiler"; |
| 797 |
case za: |
| 798 |
return "StrictMode"; |
| 799 |
case Ea: |
| 800 |
return "Suspense"; |
| 801 |
case Fa: |
| 802 |
return "SuspenseList"; |
| 803 |
} |
| 804 |
if ("object" === typeof a) switch (a.$$typeof) { |
| 805 |
case Ca: |
| 806 |
return (a.displayName || "Context") + ".Consumer"; |
| 807 |
case Ba: |
| 808 |
return (a._context.displayName || "Context") + ".Provider"; |
| 809 |
case Da: |
| 810 |
var b2 = a.render; |
| 811 |
a = a.displayName; |
| 812 |
a || (a = b2.displayName || b2.name || "", a = "" !== a ? "ForwardRef(" + a + ")" : "ForwardRef"); |
| 813 |
return a; |
| 814 |
case Ga: |
| 815 |
return b2 = a.displayName || null, null !== b2 ? b2 : Qa(a.type) || "Memo"; |
| 816 |
case Ha: |
| 817 |
b2 = a._payload; |
| 818 |
a = a._init; |
| 819 |
try { |
| 820 |
return Qa(a(b2)); |
| 821 |
} catch (c2) { |
| 822 |
} |
| 823 |
} |
| 824 |
return null; |
| 825 |
} |
| 826 |
function Ra(a) { |
| 827 |
var b2 = a.type; |
| 828 |
switch (a.tag) { |
| 829 |
case 24: |
| 830 |
return "Cache"; |
| 831 |
case 9: |
| 832 |
return (b2.displayName || "Context") + ".Consumer"; |
| 833 |
case 10: |
| 834 |
return (b2._context.displayName || "Context") + ".Provider"; |
| 835 |
case 18: |
| 836 |
return "DehydratedFragment"; |
| 837 |
case 11: |
| 838 |
return a = b2.render, a = a.displayName || a.name || "", b2.displayName || ("" !== a ? "ForwardRef(" + a + ")" : "ForwardRef"); |
| 839 |
case 7: |
| 840 |
return "Fragment"; |
| 841 |
case 5: |
| 842 |
return b2; |
| 843 |
case 4: |
| 844 |
return "Portal"; |
| 845 |
case 3: |
| 846 |
return "Root"; |
| 847 |
case 6: |
| 848 |
return "Text"; |
| 849 |
case 16: |
| 850 |
return Qa(b2); |
| 851 |
case 8: |
| 852 |
return b2 === za ? "StrictMode" : "Mode"; |
| 853 |
case 22: |
| 854 |
return "Offscreen"; |
| 855 |
case 12: |
| 856 |
return "Profiler"; |
| 857 |
case 21: |
| 858 |
return "Scope"; |
| 859 |
case 13: |
| 860 |
return "Suspense"; |
| 861 |
case 19: |
| 862 |
return "SuspenseList"; |
| 863 |
case 25: |
| 864 |
return "TracingMarker"; |
| 865 |
case 1: |
| 866 |
case 0: |
| 867 |
case 17: |
| 868 |
case 2: |
| 869 |
case 14: |
| 870 |
case 15: |
| 871 |
if ("function" === typeof b2) return b2.displayName || b2.name || null; |
| 872 |
if ("string" === typeof b2) return b2; |
| 873 |
} |
| 874 |
return null; |
| 875 |
} |
| 876 |
function Sa(a) { |
| 877 |
switch (typeof a) { |
| 878 |
case "boolean": |
| 879 |
case "number": |
| 880 |
case "string": |
| 881 |
case "undefined": |
| 882 |
return a; |
| 883 |
case "object": |
| 884 |
return a; |
| 885 |
default: |
| 886 |
return ""; |
| 887 |
} |
| 888 |
} |
| 889 |
function Ta(a) { |
| 890 |
var b2 = a.type; |
| 891 |
return (a = a.nodeName) && "input" === a.toLowerCase() && ("checkbox" === b2 || "radio" === b2); |
| 892 |
} |
| 893 |
function Ua(a) { |
| 894 |
var b2 = Ta(a) ? "checked" : "value", c2 = Object.getOwnPropertyDescriptor(a.constructor.prototype, b2), d2 = "" + a[b2]; |
| 895 |
if (!a.hasOwnProperty(b2) && "undefined" !== typeof c2 && "function" === typeof c2.get && "function" === typeof c2.set) { |
| 896 |
var e2 = c2.get, f2 = c2.set; |
| 897 |
Object.defineProperty(a, b2, { configurable: true, get: function() { |
| 898 |
return e2.call(this); |
| 899 |
}, set: function(a2) { |
| 900 |
d2 = "" + a2; |
| 901 |
f2.call(this, a2); |
| 902 |
} }); |
| 903 |
Object.defineProperty(a, b2, { enumerable: c2.enumerable }); |
| 904 |
return { getValue: function() { |
| 905 |
return d2; |
| 906 |
}, setValue: function(a2) { |
| 907 |
d2 = "" + a2; |
| 908 |
}, stopTracking: function() { |
| 909 |
a._valueTracker = null; |
| 910 |
delete a[b2]; |
| 911 |
} }; |
| 912 |
} |
| 913 |
} |
| 914 |
function Va(a) { |
| 915 |
a._valueTracker || (a._valueTracker = Ua(a)); |
| 916 |
} |
| 917 |
function Wa(a) { |
| 918 |
if (!a) return false; |
| 919 |
var b2 = a._valueTracker; |
| 920 |
if (!b2) return true; |
| 921 |
var c2 = b2.getValue(); |
| 922 |
var d2 = ""; |
| 923 |
a && (d2 = Ta(a) ? a.checked ? "true" : "false" : a.value); |
| 924 |
a = d2; |
| 925 |
return a !== c2 ? (b2.setValue(a), true) : false; |
| 926 |
} |
| 927 |
function Xa(a) { |
| 928 |
a = a || ("undefined" !== typeof document ? document : void 0); |
| 929 |
if ("undefined" === typeof a) return null; |
| 930 |
try { |
| 931 |
return a.activeElement || a.body; |
| 932 |
} catch (b2) { |
| 933 |
return a.body; |
| 934 |
} |
| 935 |
} |
| 936 |
function Ya(a, b2) { |
| 937 |
var c2 = b2.checked; |
| 938 |
return A({}, b2, { defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: null != c2 ? c2 : a._wrapperState.initialChecked }); |
| 939 |
} |
| 940 |
function Za(a, b2) { |
| 941 |
var c2 = null == b2.defaultValue ? "" : b2.defaultValue, d2 = null != b2.checked ? b2.checked : b2.defaultChecked; |
| 942 |
c2 = Sa(null != b2.value ? b2.value : c2); |
| 943 |
a._wrapperState = { initialChecked: d2, initialValue: c2, controlled: "checkbox" === b2.type || "radio" === b2.type ? null != b2.checked : null != b2.value }; |
| 944 |
} |
| 945 |
function ab(a, b2) { |
| 946 |
b2 = b2.checked; |
| 947 |
null != b2 && ta(a, "checked", b2, false); |
| 948 |
} |
| 949 |
function bb(a, b2) { |
| 950 |
ab(a, b2); |
| 951 |
var c2 = Sa(b2.value), d2 = b2.type; |
| 952 |
if (null != c2) if ("number" === d2) { |
| 953 |
if (0 === c2 && "" === a.value || a.value != c2) a.value = "" + c2; |
| 954 |
} else a.value !== "" + c2 && (a.value = "" + c2); |
| 955 |
else if ("submit" === d2 || "reset" === d2) { |
| 956 |
a.removeAttribute("value"); |
| 957 |
return; |
| 958 |
} |
| 959 |
b2.hasOwnProperty("value") ? cb(a, b2.type, c2) : b2.hasOwnProperty("defaultValue") && cb(a, b2.type, Sa(b2.defaultValue)); |
| 960 |
null == b2.checked && null != b2.defaultChecked && (a.defaultChecked = !!b2.defaultChecked); |
| 961 |
} |
| 962 |
function db(a, b2, c2) { |
| 963 |
if (b2.hasOwnProperty("value") || b2.hasOwnProperty("defaultValue")) { |
| 964 |
var d2 = b2.type; |
| 965 |
if (!("submit" !== d2 && "reset" !== d2 || void 0 !== b2.value && null !== b2.value)) return; |
| 966 |
b2 = "" + a._wrapperState.initialValue; |
| 967 |
c2 || b2 === a.value || (a.value = b2); |
| 968 |
a.defaultValue = b2; |
| 969 |
} |
| 970 |
c2 = a.name; |
| 971 |
"" !== c2 && (a.name = ""); |
| 972 |
a.defaultChecked = !!a._wrapperState.initialChecked; |
| 973 |
"" !== c2 && (a.name = c2); |
| 974 |
} |
| 975 |
function cb(a, b2, c2) { |
| 976 |
if ("number" !== b2 || Xa(a.ownerDocument) !== a) null == c2 ? a.defaultValue = "" + a._wrapperState.initialValue : a.defaultValue !== "" + c2 && (a.defaultValue = "" + c2); |
| 977 |
} |
| 978 |
var eb = Array.isArray; |
| 979 |
function fb(a, b2, c2, d2) { |
| 980 |
a = a.options; |
| 981 |
if (b2) { |
| 982 |
b2 = {}; |
| 983 |
for (var e2 = 0; e2 < c2.length; e2++) b2["$" + c2[e2]] = true; |
| 984 |
for (c2 = 0; c2 < a.length; c2++) e2 = b2.hasOwnProperty("$" + a[c2].value), a[c2].selected !== e2 && (a[c2].selected = e2), e2 && d2 && (a[c2].defaultSelected = true); |
| 985 |
} else { |
| 986 |
c2 = "" + Sa(c2); |
| 987 |
b2 = null; |
| 988 |
for (e2 = 0; e2 < a.length; e2++) { |
| 989 |
if (a[e2].value === c2) { |
| 990 |
a[e2].selected = true; |
| 991 |
d2 && (a[e2].defaultSelected = true); |
| 992 |
return; |
| 993 |
} |
| 994 |
null !== b2 || a[e2].disabled || (b2 = a[e2]); |
| 995 |
} |
| 996 |
null !== b2 && (b2.selected = true); |
| 997 |
} |
| 998 |
} |
| 999 |
function gb(a, b2) { |
| 1000 |
if (null != b2.dangerouslySetInnerHTML) throw Error(p$1(91)); |
| 1001 |
return A({}, b2, { value: void 0, defaultValue: void 0, children: "" + a._wrapperState.initialValue }); |
| 1002 |
} |
| 1003 |
function hb(a, b2) { |
| 1004 |
var c2 = b2.value; |
| 1005 |
if (null == c2) { |
| 1006 |
c2 = b2.children; |
| 1007 |
b2 = b2.defaultValue; |
| 1008 |
if (null != c2) { |
| 1009 |
if (null != b2) throw Error(p$1(92)); |
| 1010 |
if (eb(c2)) { |
| 1011 |
if (1 < c2.length) throw Error(p$1(93)); |
| 1012 |
c2 = c2[0]; |
| 1013 |
} |
| 1014 |
b2 = c2; |
| 1015 |
} |
| 1016 |
null == b2 && (b2 = ""); |
| 1017 |
c2 = b2; |
| 1018 |
} |
| 1019 |
a._wrapperState = { initialValue: Sa(c2) }; |
| 1020 |
} |
| 1021 |
function ib(a, b2) { |
| 1022 |
var c2 = Sa(b2.value), d2 = Sa(b2.defaultValue); |
| 1023 |
null != c2 && (c2 = "" + c2, c2 !== a.value && (a.value = c2), null == b2.defaultValue && a.defaultValue !== c2 && (a.defaultValue = c2)); |
| 1024 |
null != d2 && (a.defaultValue = "" + d2); |
| 1025 |
} |
| 1026 |
function jb(a) { |
| 1027 |
var b2 = a.textContent; |
| 1028 |
b2 === a._wrapperState.initialValue && "" !== b2 && null !== b2 && (a.value = b2); |
| 1029 |
} |
| 1030 |
function kb(a) { |
| 1031 |
switch (a) { |
| 1032 |
case "svg": |
| 1033 |
return "http://www.w3.org/2000/svg"; |
| 1034 |
case "math": |
| 1035 |
return "http://www.w3.org/1998/Math/MathML"; |
| 1036 |
default: |
| 1037 |
return "http://www.w3.org/1999/xhtml"; |
| 1038 |
} |
| 1039 |
} |
| 1040 |
function lb(a, b2) { |
| 1041 |
return null == a || "http://www.w3.org/1999/xhtml" === a ? kb(b2) : "http://www.w3.org/2000/svg" === a && "foreignObject" === b2 ? "http://www.w3.org/1999/xhtml" : a; |
| 1042 |
} |
| 1043 |
var mb, nb = function(a) { |
| 1044 |
return "undefined" !== typeof MSApp && MSApp.execUnsafeLocalFunction ? function(b2, c2, d2, e2) { |
| 1045 |
MSApp.execUnsafeLocalFunction(function() { |
| 1046 |
return a(b2, c2, d2, e2); |
| 1047 |
}); |
| 1048 |
} : a; |
| 1049 |
}(function(a, b2) { |
| 1050 |
if ("http://www.w3.org/2000/svg" !== a.namespaceURI || "innerHTML" in a) a.innerHTML = b2; |
| 1051 |
else { |
| 1052 |
mb = mb || document.createElement("div"); |
| 1053 |
mb.innerHTML = "<svg>" + b2.valueOf().toString() + "</svg>"; |
| 1054 |
for (b2 = mb.firstChild; a.firstChild; ) a.removeChild(a.firstChild); |
| 1055 |
for (; b2.firstChild; ) a.appendChild(b2.firstChild); |
| 1056 |
} |
| 1057 |
}); |
| 1058 |
function ob(a, b2) { |
| 1059 |
if (b2) { |
| 1060 |
var c2 = a.firstChild; |
| 1061 |
if (c2 && c2 === a.lastChild && 3 === c2.nodeType) { |
| 1062 |
c2.nodeValue = b2; |
| 1063 |
return; |
| 1064 |
} |
| 1065 |
} |
| 1066 |
a.textContent = b2; |
| 1067 |
} |
| 1068 |
var pb = { |
| 1069 |
animationIterationCount: true, |
| 1070 |
aspectRatio: true, |
| 1071 |
borderImageOutset: true, |
| 1072 |
borderImageSlice: true, |
| 1073 |
borderImageWidth: true, |
| 1074 |
boxFlex: true, |
| 1075 |
boxFlexGroup: true, |
| 1076 |
boxOrdinalGroup: true, |
| 1077 |
columnCount: true, |
| 1078 |
columns: true, |
| 1079 |
flex: true, |
| 1080 |
flexGrow: true, |
| 1081 |
flexPositive: true, |
| 1082 |
flexShrink: true, |
| 1083 |
flexNegative: true, |
| 1084 |
flexOrder: true, |
| 1085 |
gridArea: true, |
| 1086 |
gridRow: true, |
| 1087 |
gridRowEnd: true, |
| 1088 |
gridRowSpan: true, |
| 1089 |
gridRowStart: true, |
| 1090 |
gridColumn: true, |
| 1091 |
gridColumnEnd: true, |
| 1092 |
gridColumnSpan: true, |
| 1093 |
gridColumnStart: true, |
| 1094 |
fontWeight: true, |
| 1095 |
lineClamp: true, |
| 1096 |
lineHeight: true, |
| 1097 |
opacity: true, |
| 1098 |
order: true, |
| 1099 |
orphans: true, |
| 1100 |
tabSize: true, |
| 1101 |
widows: true, |
| 1102 |
zIndex: true, |
| 1103 |
zoom: true, |
| 1104 |
fillOpacity: true, |
| 1105 |
floodOpacity: true, |
| 1106 |
stopOpacity: true, |
| 1107 |
strokeDasharray: true, |
| 1108 |
strokeDashoffset: true, |
| 1109 |
strokeMiterlimit: true, |
| 1110 |
strokeOpacity: true, |
| 1111 |
strokeWidth: true |
| 1112 |
}, qb = ["Webkit", "ms", "Moz", "O"]; |
| 1113 |
Object.keys(pb).forEach(function(a) { |
| 1114 |
qb.forEach(function(b2) { |
| 1115 |
b2 = b2 + a.charAt(0).toUpperCase() + a.substring(1); |
| 1116 |
pb[b2] = pb[a]; |
| 1117 |
}); |
| 1118 |
}); |
| 1119 |
function rb(a, b2, c2) { |
| 1120 |
return null == b2 || "boolean" === typeof b2 || "" === b2 ? "" : c2 || "number" !== typeof b2 || 0 === b2 || pb.hasOwnProperty(a) && pb[a] ? ("" + b2).trim() : b2 + "px"; |
| 1121 |
} |
| 1122 |
function sb(a, b2) { |
| 1123 |
a = a.style; |
| 1124 |
for (var c2 in b2) if (b2.hasOwnProperty(c2)) { |
| 1125 |
var d2 = 0 === c2.indexOf("--"), e2 = rb(c2, b2[c2], d2); |
| 1126 |
"float" === c2 && (c2 = "cssFloat"); |
| 1127 |
d2 ? a.setProperty(c2, e2) : a[c2] = e2; |
| 1128 |
} |
| 1129 |
} |
| 1130 |
var tb = A({ menuitem: true }, { area: true, base: true, br: true, col: true, embed: true, hr: true, img: true, input: true, keygen: true, link: true, meta: true, param: true, source: true, track: true, wbr: true }); |
| 1131 |
function ub(a, b2) { |
| 1132 |
if (b2) { |
| 1133 |
if (tb[a] && (null != b2.children || null != b2.dangerouslySetInnerHTML)) throw Error(p$1(137, a)); |
| 1134 |
if (null != b2.dangerouslySetInnerHTML) { |
| 1135 |
if (null != b2.children) throw Error(p$1(60)); |
| 1136 |
if ("object" !== typeof b2.dangerouslySetInnerHTML || !("__html" in b2.dangerouslySetInnerHTML)) throw Error(p$1(61)); |
| 1137 |
} |
| 1138 |
if (null != b2.style && "object" !== typeof b2.style) throw Error(p$1(62)); |
| 1139 |
} |
| 1140 |
} |
| 1141 |
function vb(a, b2) { |
| 1142 |
if (-1 === a.indexOf("-")) return "string" === typeof b2.is; |
| 1143 |
switch (a) { |
| 1144 |
case "annotation-xml": |
| 1145 |
case "color-profile": |
| 1146 |
case "font-face": |
| 1147 |
case "font-face-src": |
| 1148 |
case "font-face-uri": |
| 1149 |
case "font-face-format": |
| 1150 |
case "font-face-name": |
| 1151 |
case "missing-glyph": |
| 1152 |
return false; |
| 1153 |
default: |
| 1154 |
return true; |
| 1155 |
} |
| 1156 |
} |
| 1157 |
var wb = null; |
| 1158 |
function xb(a) { |
| 1159 |
a = a.target || a.srcElement || window; |
| 1160 |
a.correspondingUseElement && (a = a.correspondingUseElement); |
| 1161 |
return 3 === a.nodeType ? a.parentNode : a; |
| 1162 |
} |
| 1163 |
var yb = null, zb = null, Ab = null; |
| 1164 |
function Bb(a) { |
| 1165 |
if (a = Cb(a)) { |
| 1166 |
if ("function" !== typeof yb) throw Error(p$1(280)); |
| 1167 |
var b2 = a.stateNode; |
| 1168 |
b2 && (b2 = Db(b2), yb(a.stateNode, a.type, b2)); |
| 1169 |
} |
| 1170 |
} |
| 1171 |
function Eb(a) { |
| 1172 |
zb ? Ab ? Ab.push(a) : Ab = [a] : zb = a; |
| 1173 |
} |
| 1174 |
function Fb() { |
| 1175 |
if (zb) { |
| 1176 |
var a = zb, b2 = Ab; |
| 1177 |
Ab = zb = null; |
| 1178 |
Bb(a); |
| 1179 |
if (b2) for (a = 0; a < b2.length; a++) Bb(b2[a]); |
| 1180 |
} |
| 1181 |
} |
| 1182 |
function Gb(a, b2) { |
| 1183 |
return a(b2); |
| 1184 |
} |
| 1185 |
function Hb() { |
| 1186 |
} |
| 1187 |
var Ib = false; |
| 1188 |
function Jb(a, b2, c2) { |
| 1189 |
if (Ib) return a(b2, c2); |
| 1190 |
Ib = true; |
| 1191 |
try { |
| 1192 |
return Gb(a, b2, c2); |
| 1193 |
} finally { |
| 1194 |
if (Ib = false, null !== zb || null !== Ab) Hb(), Fb(); |
| 1195 |
} |
| 1196 |
} |
| 1197 |
function Kb(a, b2) { |
| 1198 |
var c2 = a.stateNode; |
| 1199 |
if (null === c2) return null; |
| 1200 |
var d2 = Db(c2); |
| 1201 |
if (null === d2) return null; |
| 1202 |
c2 = d2[b2]; |
| 1203 |
a: switch (b2) { |
| 1204 |
case "onClick": |
| 1205 |
case "onClickCapture": |
| 1206 |
case "onDoubleClick": |
| 1207 |
case "onDoubleClickCapture": |
| 1208 |
case "onMouseDown": |
| 1209 |
case "onMouseDownCapture": |
| 1210 |
case "onMouseMove": |
| 1211 |
case "onMouseMoveCapture": |
| 1212 |
case "onMouseUp": |
| 1213 |
case "onMouseUpCapture": |
| 1214 |
case "onMouseEnter": |
| 1215 |
(d2 = !d2.disabled) || (a = a.type, d2 = !("button" === a || "input" === a || "select" === a || "textarea" === a)); |
| 1216 |
a = !d2; |
| 1217 |
break a; |
| 1218 |
default: |
| 1219 |
a = false; |
| 1220 |
} |
| 1221 |
if (a) return null; |
| 1222 |
if (c2 && "function" !== typeof c2) throw Error(p$1(231, b2, typeof c2)); |
| 1223 |
return c2; |
| 1224 |
} |
| 1225 |
var Lb = false; |
| 1226 |
if (ia) try { |
| 1227 |
var Mb = {}; |
| 1228 |
Object.defineProperty(Mb, "passive", { get: function() { |
| 1229 |
Lb = true; |
| 1230 |
} }); |
| 1231 |
window.addEventListener("test", Mb, Mb); |
| 1232 |
window.removeEventListener("test", Mb, Mb); |
| 1233 |
} catch (a) { |
| 1234 |
Lb = false; |
| 1235 |
} |
| 1236 |
function Nb(a, b2, c2, d2, e2, f2, g2, h2, k2) { |
| 1237 |
var l2 = Array.prototype.slice.call(arguments, 3); |
| 1238 |
try { |
| 1239 |
b2.apply(c2, l2); |
| 1240 |
} catch (m2) { |
| 1241 |
this.onError(m2); |
| 1242 |
} |
| 1243 |
} |
| 1244 |
var Ob = false, Pb = null, Qb = false, Rb = null, Sb = { onError: function(a) { |
| 1245 |
Ob = true; |
| 1246 |
Pb = a; |
| 1247 |
} }; |
| 1248 |
function Tb(a, b2, c2, d2, e2, f2, g2, h2, k2) { |
| 1249 |
Ob = false; |
| 1250 |
Pb = null; |
| 1251 |
Nb.apply(Sb, arguments); |
| 1252 |
} |
| 1253 |
function Ub(a, b2, c2, d2, e2, f2, g2, h2, k2) { |
| 1254 |
Tb.apply(this, arguments); |
| 1255 |
if (Ob) { |
| 1256 |
if (Ob) { |
| 1257 |
var l2 = Pb; |
| 1258 |
Ob = false; |
| 1259 |
Pb = null; |
| 1260 |
} else throw Error(p$1(198)); |
| 1261 |
Qb || (Qb = true, Rb = l2); |
| 1262 |
} |
| 1263 |
} |
| 1264 |
function Vb(a) { |
| 1265 |
var b2 = a, c2 = a; |
| 1266 |
if (a.alternate) for (; b2.return; ) b2 = b2.return; |
| 1267 |
else { |
| 1268 |
a = b2; |
| 1269 |
do |
| 1270 |
b2 = a, 0 !== (b2.flags & 4098) && (c2 = b2.return), a = b2.return; |
| 1271 |
while (a); |
| 1272 |
} |
| 1273 |
return 3 === b2.tag ? c2 : null; |
| 1274 |
} |
| 1275 |
function Wb(a) { |
| 1276 |
if (13 === a.tag) { |
| 1277 |
var b2 = a.memoizedState; |
| 1278 |
null === b2 && (a = a.alternate, null !== a && (b2 = a.memoizedState)); |
| 1279 |
if (null !== b2) return b2.dehydrated; |
| 1280 |
} |
| 1281 |
return null; |
| 1282 |
} |
| 1283 |
function Xb(a) { |
| 1284 |
if (Vb(a) !== a) throw Error(p$1(188)); |
| 1285 |
} |
| 1286 |
function Yb(a) { |
| 1287 |
var b2 = a.alternate; |
| 1288 |
if (!b2) { |
| 1289 |
b2 = Vb(a); |
| 1290 |
if (null === b2) throw Error(p$1(188)); |
| 1291 |
return b2 !== a ? null : a; |
| 1292 |
} |
| 1293 |
for (var c2 = a, d2 = b2; ; ) { |
| 1294 |
var e2 = c2.return; |
| 1295 |
if (null === e2) break; |
| 1296 |
var f2 = e2.alternate; |
| 1297 |
if (null === f2) { |
| 1298 |
d2 = e2.return; |
| 1299 |
if (null !== d2) { |
| 1300 |
c2 = d2; |
| 1301 |
continue; |
| 1302 |
} |
| 1303 |
break; |
| 1304 |
} |
| 1305 |
if (e2.child === f2.child) { |
| 1306 |
for (f2 = e2.child; f2; ) { |
| 1307 |
if (f2 === c2) return Xb(e2), a; |
| 1308 |
if (f2 === d2) return Xb(e2), b2; |
| 1309 |
f2 = f2.sibling; |
| 1310 |
} |
| 1311 |
throw Error(p$1(188)); |
| 1312 |
} |
| 1313 |
if (c2.return !== d2.return) c2 = e2, d2 = f2; |
| 1314 |
else { |
| 1315 |
for (var g2 = false, h2 = e2.child; h2; ) { |
| 1316 |
if (h2 === c2) { |
| 1317 |
g2 = true; |
| 1318 |
c2 = e2; |
| 1319 |
d2 = f2; |
| 1320 |
break; |
| 1321 |
} |
| 1322 |
if (h2 === d2) { |
| 1323 |
g2 = true; |
| 1324 |
d2 = e2; |
| 1325 |
c2 = f2; |
| 1326 |
break; |
| 1327 |
} |
| 1328 |
h2 = h2.sibling; |
| 1329 |
} |
| 1330 |
if (!g2) { |
| 1331 |
for (h2 = f2.child; h2; ) { |
| 1332 |
if (h2 === c2) { |
| 1333 |
g2 = true; |
| 1334 |
c2 = f2; |
| 1335 |
d2 = e2; |
| 1336 |
break; |
| 1337 |
} |
| 1338 |
if (h2 === d2) { |
| 1339 |
g2 = true; |
| 1340 |
d2 = f2; |
| 1341 |
c2 = e2; |
| 1342 |
break; |
| 1343 |
} |
| 1344 |
h2 = h2.sibling; |
| 1345 |
} |
| 1346 |
if (!g2) throw Error(p$1(189)); |
| 1347 |
} |
| 1348 |
} |
| 1349 |
if (c2.alternate !== d2) throw Error(p$1(190)); |
| 1350 |
} |
| 1351 |
if (3 !== c2.tag) throw Error(p$1(188)); |
| 1352 |
return c2.stateNode.current === c2 ? a : b2; |
| 1353 |
} |
| 1354 |
function Zb(a) { |
| 1355 |
a = Yb(a); |
| 1356 |
return null !== a ? $b(a) : null; |
| 1357 |
} |
| 1358 |
function $b(a) { |
| 1359 |
if (5 === a.tag || 6 === a.tag) return a; |
| 1360 |
for (a = a.child; null !== a; ) { |
| 1361 |
var b2 = $b(a); |
| 1362 |
if (null !== b2) return b2; |
| 1363 |
a = a.sibling; |
| 1364 |
} |
| 1365 |
return null; |
| 1366 |
} |
| 1367 |
var ac = ca.unstable_scheduleCallback, bc = ca.unstable_cancelCallback, cc = ca.unstable_shouldYield, dc = ca.unstable_requestPaint, B = ca.unstable_now, ec = ca.unstable_getCurrentPriorityLevel, fc = ca.unstable_ImmediatePriority, gc = ca.unstable_UserBlockingPriority, hc = ca.unstable_NormalPriority, ic = ca.unstable_LowPriority, jc = ca.unstable_IdlePriority, kc = null, lc = null; |
| 1368 |
function mc(a) { |
| 1369 |
if (lc && "function" === typeof lc.onCommitFiberRoot) try { |
| 1370 |
lc.onCommitFiberRoot(kc, a, void 0, 128 === (a.current.flags & 128)); |
| 1371 |
} catch (b2) { |
| 1372 |
} |
| 1373 |
} |
| 1374 |
var oc = Math.clz32 ? Math.clz32 : nc, pc = Math.log, qc = Math.LN2; |
| 1375 |
function nc(a) { |
| 1376 |
a >>>= 0; |
| 1377 |
return 0 === a ? 32 : 31 - (pc(a) / qc | 0) | 0; |
| 1378 |
} |
| 1379 |
var rc = 64, sc = 4194304; |
| 1380 |
function tc(a) { |
| 1381 |
switch (a & -a) { |
| 1382 |
case 1: |
| 1383 |
return 1; |
| 1384 |
case 2: |
| 1385 |
return 2; |
| 1386 |
case 4: |
| 1387 |
return 4; |
| 1388 |
case 8: |
| 1389 |
return 8; |
| 1390 |
case 16: |
| 1391 |
return 16; |
| 1392 |
case 32: |
| 1393 |
return 32; |
| 1394 |
case 64: |
| 1395 |
case 128: |
| 1396 |
case 256: |
| 1397 |
case 512: |
| 1398 |
case 1024: |
| 1399 |
case 2048: |
| 1400 |
case 4096: |
| 1401 |
case 8192: |
| 1402 |
case 16384: |
| 1403 |
case 32768: |
| 1404 |
case 65536: |
| 1405 |
case 131072: |
| 1406 |
case 262144: |
| 1407 |
case 524288: |
| 1408 |
case 1048576: |
| 1409 |
case 2097152: |
| 1410 |
return a & 4194240; |
| 1411 |
case 4194304: |
| 1412 |
case 8388608: |
| 1413 |
case 16777216: |
| 1414 |
case 33554432: |
| 1415 |
case 67108864: |
| 1416 |
return a & 130023424; |
| 1417 |
case 134217728: |
| 1418 |
return 134217728; |
| 1419 |
case 268435456: |
| 1420 |
return 268435456; |
| 1421 |
case 536870912: |
| 1422 |
return 536870912; |
| 1423 |
case 1073741824: |
| 1424 |
return 1073741824; |
| 1425 |
default: |
| 1426 |
return a; |
| 1427 |
} |
| 1428 |
} |
| 1429 |
function uc(a, b2) { |
| 1430 |
var c2 = a.pendingLanes; |
| 1431 |
if (0 === c2) return 0; |
| 1432 |
var d2 = 0, e2 = a.suspendedLanes, f2 = a.pingedLanes, g2 = c2 & 268435455; |
| 1433 |
if (0 !== g2) { |
| 1434 |
var h2 = g2 & ~e2; |
| 1435 |
0 !== h2 ? d2 = tc(h2) : (f2 &= g2, 0 !== f2 && (d2 = tc(f2))); |
| 1436 |
} else g2 = c2 & ~e2, 0 !== g2 ? d2 = tc(g2) : 0 !== f2 && (d2 = tc(f2)); |
| 1437 |
if (0 === d2) return 0; |
| 1438 |
if (0 !== b2 && b2 !== d2 && 0 === (b2 & e2) && (e2 = d2 & -d2, f2 = b2 & -b2, e2 >= f2 || 16 === e2 && 0 !== (f2 & 4194240))) return b2; |
| 1439 |
0 !== (d2 & 4) && (d2 |= c2 & 16); |
| 1440 |
b2 = a.entangledLanes; |
| 1441 |
if (0 !== b2) for (a = a.entanglements, b2 &= d2; 0 < b2; ) c2 = 31 - oc(b2), e2 = 1 << c2, d2 |= a[c2], b2 &= ~e2; |
| 1442 |
return d2; |
| 1443 |
} |
| 1444 |
function vc(a, b2) { |
| 1445 |
switch (a) { |
| 1446 |
case 1: |
| 1447 |
case 2: |
| 1448 |
case 4: |
| 1449 |
return b2 + 250; |
| 1450 |
case 8: |
| 1451 |
case 16: |
| 1452 |
case 32: |
| 1453 |
case 64: |
| 1454 |
case 128: |
| 1455 |
case 256: |
| 1456 |
case 512: |
| 1457 |
case 1024: |
| 1458 |
case 2048: |
| 1459 |
case 4096: |
| 1460 |
case 8192: |
| 1461 |
case 16384: |
| 1462 |
case 32768: |
| 1463 |
case 65536: |
| 1464 |
case 131072: |
| 1465 |
case 262144: |
| 1466 |
case 524288: |
| 1467 |
case 1048576: |
| 1468 |
case 2097152: |
| 1469 |
return b2 + 5e3; |
| 1470 |
case 4194304: |
| 1471 |
case 8388608: |
| 1472 |
case 16777216: |
| 1473 |
case 33554432: |
| 1474 |
case 67108864: |
| 1475 |
return -1; |
| 1476 |
case 134217728: |
| 1477 |
case 268435456: |
| 1478 |
case 536870912: |
| 1479 |
case 1073741824: |
| 1480 |
return -1; |
| 1481 |
default: |
| 1482 |
return -1; |
| 1483 |
} |
| 1484 |
} |
| 1485 |
function wc(a, b2) { |
| 1486 |
for (var c2 = a.suspendedLanes, d2 = a.pingedLanes, e2 = a.expirationTimes, f2 = a.pendingLanes; 0 < f2; ) { |
| 1487 |
var g2 = 31 - oc(f2), h2 = 1 << g2, k2 = e2[g2]; |
| 1488 |
if (-1 === k2) { |
| 1489 |
if (0 === (h2 & c2) || 0 !== (h2 & d2)) e2[g2] = vc(h2, b2); |
| 1490 |
} else k2 <= b2 && (a.expiredLanes |= h2); |
| 1491 |
f2 &= ~h2; |
| 1492 |
} |
| 1493 |
} |
| 1494 |
function xc(a) { |
| 1495 |
a = a.pendingLanes & -1073741825; |
| 1496 |
return 0 !== a ? a : a & 1073741824 ? 1073741824 : 0; |
| 1497 |
} |
| 1498 |
function yc() { |
| 1499 |
var a = rc; |
| 1500 |
rc <<= 1; |
| 1501 |
0 === (rc & 4194240) && (rc = 64); |
| 1502 |
return a; |
| 1503 |
} |
| 1504 |
function zc(a) { |
| 1505 |
for (var b2 = [], c2 = 0; 31 > c2; c2++) b2.push(a); |
| 1506 |
return b2; |
| 1507 |
} |
| 1508 |
function Ac(a, b2, c2) { |
| 1509 |
a.pendingLanes |= b2; |
| 1510 |
536870912 !== b2 && (a.suspendedLanes = 0, a.pingedLanes = 0); |
| 1511 |
a = a.eventTimes; |
| 1512 |
b2 = 31 - oc(b2); |
| 1513 |
a[b2] = c2; |
| 1514 |
} |
| 1515 |
function Bc(a, b2) { |
| 1516 |
var c2 = a.pendingLanes & ~b2; |
| 1517 |
a.pendingLanes = b2; |
| 1518 |
a.suspendedLanes = 0; |
| 1519 |
a.pingedLanes = 0; |
| 1520 |
a.expiredLanes &= b2; |
| 1521 |
a.mutableReadLanes &= b2; |
| 1522 |
a.entangledLanes &= b2; |
| 1523 |
b2 = a.entanglements; |
| 1524 |
var d2 = a.eventTimes; |
| 1525 |
for (a = a.expirationTimes; 0 < c2; ) { |
| 1526 |
var e2 = 31 - oc(c2), f2 = 1 << e2; |
| 1527 |
b2[e2] = 0; |
| 1528 |
d2[e2] = -1; |
| 1529 |
a[e2] = -1; |
| 1530 |
c2 &= ~f2; |
| 1531 |
} |
| 1532 |
} |
| 1533 |
function Cc(a, b2) { |
| 1534 |
var c2 = a.entangledLanes |= b2; |
| 1535 |
for (a = a.entanglements; c2; ) { |
| 1536 |
var d2 = 31 - oc(c2), e2 = 1 << d2; |
| 1537 |
e2 & b2 | a[d2] & b2 && (a[d2] |= b2); |
| 1538 |
c2 &= ~e2; |
| 1539 |
} |
| 1540 |
} |
| 1541 |
var C = 0; |
| 1542 |
function Dc(a) { |
| 1543 |
a &= -a; |
| 1544 |
return 1 < a ? 4 < a ? 0 !== (a & 268435455) ? 16 : 536870912 : 4 : 1; |
| 1545 |
} |
| 1546 |
var Ec, Fc, Gc, Hc, Ic, Jc = false, Kc = [], Lc = null, Mc = null, Nc = null, Oc = /* @__PURE__ */ new Map(), Pc = /* @__PURE__ */ new Map(), Qc = [], Rc = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "); |
| 1547 |
function Sc(a, b2) { |
| 1548 |
switch (a) { |
| 1549 |
case "focusin": |
| 1550 |
case "focusout": |
| 1551 |
Lc = null; |
| 1552 |
break; |
| 1553 |
case "dragenter": |
| 1554 |
case "dragleave": |
| 1555 |
Mc = null; |
| 1556 |
break; |
| 1557 |
case "mouseover": |
| 1558 |
case "mouseout": |
| 1559 |
Nc = null; |
| 1560 |
break; |
| 1561 |
case "pointerover": |
| 1562 |
case "pointerout": |
| 1563 |
Oc.delete(b2.pointerId); |
| 1564 |
break; |
| 1565 |
case "gotpointercapture": |
| 1566 |
case "lostpointercapture": |
| 1567 |
Pc.delete(b2.pointerId); |
| 1568 |
} |
| 1569 |
} |
| 1570 |
function Tc(a, b2, c2, d2, e2, f2) { |
| 1571 |
if (null === a || a.nativeEvent !== f2) return a = { blockedOn: b2, domEventName: c2, eventSystemFlags: d2, nativeEvent: f2, targetContainers: [e2] }, null !== b2 && (b2 = Cb(b2), null !== b2 && Fc(b2)), a; |
| 1572 |
a.eventSystemFlags |= d2; |
| 1573 |
b2 = a.targetContainers; |
| 1574 |
null !== e2 && -1 === b2.indexOf(e2) && b2.push(e2); |
| 1575 |
return a; |
| 1576 |
} |
| 1577 |
function Uc(a, b2, c2, d2, e2) { |
| 1578 |
switch (b2) { |
| 1579 |
case "focusin": |
| 1580 |
return Lc = Tc(Lc, a, b2, c2, d2, e2), true; |
| 1581 |
case "dragenter": |
| 1582 |
return Mc = Tc(Mc, a, b2, c2, d2, e2), true; |
| 1583 |
case "mouseover": |
| 1584 |
return Nc = Tc(Nc, a, b2, c2, d2, e2), true; |
| 1585 |
case "pointerover": |
| 1586 |
var f2 = e2.pointerId; |
| 1587 |
Oc.set(f2, Tc(Oc.get(f2) || null, a, b2, c2, d2, e2)); |
| 1588 |
return true; |
| 1589 |
case "gotpointercapture": |
| 1590 |
return f2 = e2.pointerId, Pc.set(f2, Tc(Pc.get(f2) || null, a, b2, c2, d2, e2)), true; |
| 1591 |
} |
| 1592 |
return false; |
| 1593 |
} |
| 1594 |
function Vc(a) { |
| 1595 |
var b2 = Wc(a.target); |
| 1596 |
if (null !== b2) { |
| 1597 |
var c2 = Vb(b2); |
| 1598 |
if (null !== c2) { |
| 1599 |
if (b2 = c2.tag, 13 === b2) { |
| 1600 |
if (b2 = Wb(c2), null !== b2) { |
| 1601 |
a.blockedOn = b2; |
| 1602 |
Ic(a.priority, function() { |
| 1603 |
Gc(c2); |
| 1604 |
}); |
| 1605 |
return; |
| 1606 |
} |
| 1607 |
} else if (3 === b2 && c2.stateNode.current.memoizedState.isDehydrated) { |
| 1608 |
a.blockedOn = 3 === c2.tag ? c2.stateNode.containerInfo : null; |
| 1609 |
return; |
| 1610 |
} |
| 1611 |
} |
| 1612 |
} |
| 1613 |
a.blockedOn = null; |
| 1614 |
} |
| 1615 |
function Xc(a) { |
| 1616 |
if (null !== a.blockedOn) return false; |
| 1617 |
for (var b2 = a.targetContainers; 0 < b2.length; ) { |
| 1618 |
var c2 = Yc(a.domEventName, a.eventSystemFlags, b2[0], a.nativeEvent); |
| 1619 |
if (null === c2) { |
| 1620 |
c2 = a.nativeEvent; |
| 1621 |
var d2 = new c2.constructor(c2.type, c2); |
| 1622 |
wb = d2; |
| 1623 |
c2.target.dispatchEvent(d2); |
| 1624 |
wb = null; |
| 1625 |
} else return b2 = Cb(c2), null !== b2 && Fc(b2), a.blockedOn = c2, false; |
| 1626 |
b2.shift(); |
| 1627 |
} |
| 1628 |
return true; |
| 1629 |
} |
| 1630 |
function Zc(a, b2, c2) { |
| 1631 |
Xc(a) && c2.delete(b2); |
| 1632 |
} |
| 1633 |
function $c() { |
| 1634 |
Jc = false; |
| 1635 |
null !== Lc && Xc(Lc) && (Lc = null); |
| 1636 |
null !== Mc && Xc(Mc) && (Mc = null); |
| 1637 |
null !== Nc && Xc(Nc) && (Nc = null); |
| 1638 |
Oc.forEach(Zc); |
| 1639 |
Pc.forEach(Zc); |
| 1640 |
} |
| 1641 |
function ad(a, b2) { |
| 1642 |
a.blockedOn === b2 && (a.blockedOn = null, Jc || (Jc = true, ca.unstable_scheduleCallback(ca.unstable_NormalPriority, $c))); |
| 1643 |
} |
| 1644 |
function bd(a) { |
| 1645 |
function b2(b3) { |
| 1646 |
return ad(b3, a); |
| 1647 |
} |
| 1648 |
if (0 < Kc.length) { |
| 1649 |
ad(Kc[0], a); |
| 1650 |
for (var c2 = 1; c2 < Kc.length; c2++) { |
| 1651 |
var d2 = Kc[c2]; |
| 1652 |
d2.blockedOn === a && (d2.blockedOn = null); |
| 1653 |
} |
| 1654 |
} |
| 1655 |
null !== Lc && ad(Lc, a); |
| 1656 |
null !== Mc && ad(Mc, a); |
| 1657 |
null !== Nc && ad(Nc, a); |
| 1658 |
Oc.forEach(b2); |
| 1659 |
Pc.forEach(b2); |
| 1660 |
for (c2 = 0; c2 < Qc.length; c2++) d2 = Qc[c2], d2.blockedOn === a && (d2.blockedOn = null); |
| 1661 |
for (; 0 < Qc.length && (c2 = Qc[0], null === c2.blockedOn); ) Vc(c2), null === c2.blockedOn && Qc.shift(); |
| 1662 |
} |
| 1663 |
var cd = ua.ReactCurrentBatchConfig, dd = true; |
| 1664 |
function ed(a, b2, c2, d2) { |
| 1665 |
var e2 = C, f2 = cd.transition; |
| 1666 |
cd.transition = null; |
| 1667 |
try { |
| 1668 |
C = 1, fd(a, b2, c2, d2); |
| 1669 |
} finally { |
| 1670 |
C = e2, cd.transition = f2; |
| 1671 |
} |
| 1672 |
} |
| 1673 |
function gd(a, b2, c2, d2) { |
| 1674 |
var e2 = C, f2 = cd.transition; |
| 1675 |
cd.transition = null; |
| 1676 |
try { |
| 1677 |
C = 4, fd(a, b2, c2, d2); |
| 1678 |
} finally { |
| 1679 |
C = e2, cd.transition = f2; |
| 1680 |
} |
| 1681 |
} |
| 1682 |
function fd(a, b2, c2, d2) { |
| 1683 |
if (dd) { |
| 1684 |
var e2 = Yc(a, b2, c2, d2); |
| 1685 |
if (null === e2) hd(a, b2, d2, id, c2), Sc(a, d2); |
| 1686 |
else if (Uc(e2, a, b2, c2, d2)) d2.stopPropagation(); |
| 1687 |
else if (Sc(a, d2), b2 & 4 && -1 < Rc.indexOf(a)) { |
| 1688 |
for (; null !== e2; ) { |
| 1689 |
var f2 = Cb(e2); |
| 1690 |
null !== f2 && Ec(f2); |
| 1691 |
f2 = Yc(a, b2, c2, d2); |
| 1692 |
null === f2 && hd(a, b2, d2, id, c2); |
| 1693 |
if (f2 === e2) break; |
| 1694 |
e2 = f2; |
| 1695 |
} |
| 1696 |
null !== e2 && d2.stopPropagation(); |
| 1697 |
} else hd(a, b2, d2, null, c2); |
| 1698 |
} |
| 1699 |
} |
| 1700 |
var id = null; |
| 1701 |
function Yc(a, b2, c2, d2) { |
| 1702 |
id = null; |
| 1703 |
a = xb(d2); |
| 1704 |
a = Wc(a); |
| 1705 |
if (null !== a) if (b2 = Vb(a), null === b2) a = null; |
| 1706 |
else if (c2 = b2.tag, 13 === c2) { |
| 1707 |
a = Wb(b2); |
| 1708 |
if (null !== a) return a; |
| 1709 |
a = null; |
| 1710 |
} else if (3 === c2) { |
| 1711 |
if (b2.stateNode.current.memoizedState.isDehydrated) return 3 === b2.tag ? b2.stateNode.containerInfo : null; |
| 1712 |
a = null; |
| 1713 |
} else b2 !== a && (a = null); |
| 1714 |
id = a; |
| 1715 |
return null; |
| 1716 |
} |
| 1717 |
function jd(a) { |
| 1718 |
switch (a) { |
| 1719 |
case "cancel": |
| 1720 |
case "click": |
| 1721 |
case "close": |
| 1722 |
case "contextmenu": |
| 1723 |
case "copy": |
| 1724 |
case "cut": |
| 1725 |
case "auxclick": |
| 1726 |
case "dblclick": |
| 1727 |
case "dragend": |
| 1728 |
case "dragstart": |
| 1729 |
case "drop": |
| 1730 |
case "focusin": |
| 1731 |
case "focusout": |
| 1732 |
case "input": |
| 1733 |
case "invalid": |
| 1734 |
case "keydown": |
| 1735 |
case "keypress": |
| 1736 |
case "keyup": |
| 1737 |
case "mousedown": |
| 1738 |
case "mouseup": |
| 1739 |
case "paste": |
| 1740 |
case "pause": |
| 1741 |
case "play": |
| 1742 |
case "pointercancel": |
| 1743 |
case "pointerdown": |
| 1744 |
case "pointerup": |
| 1745 |
case "ratechange": |
| 1746 |
case "reset": |
| 1747 |
case "resize": |
| 1748 |
case "seeked": |
| 1749 |
case "submit": |
| 1750 |
case "touchcancel": |
| 1751 |
case "touchend": |
| 1752 |
case "touchstart": |
| 1753 |
case "volumechange": |
| 1754 |
case "change": |
| 1755 |
case "selectionchange": |
| 1756 |
case "textInput": |
| 1757 |
case "compositionstart": |
| 1758 |
case "compositionend": |
| 1759 |
case "compositionupdate": |
| 1760 |
case "beforeblur": |
| 1761 |
case "afterblur": |
| 1762 |
case "beforeinput": |
| 1763 |
case "blur": |
| 1764 |
case "fullscreenchange": |
| 1765 |
case "focus": |
| 1766 |
case "hashchange": |
| 1767 |
case "popstate": |
| 1768 |
case "select": |
| 1769 |
case "selectstart": |
| 1770 |
return 1; |
| 1771 |
case "drag": |
| 1772 |
case "dragenter": |
| 1773 |
case "dragexit": |
| 1774 |
case "dragleave": |
| 1775 |
case "dragover": |
| 1776 |
case "mousemove": |
| 1777 |
case "mouseout": |
| 1778 |
case "mouseover": |
| 1779 |
case "pointermove": |
| 1780 |
case "pointerout": |
| 1781 |
case "pointerover": |
| 1782 |
case "scroll": |
| 1783 |
case "toggle": |
| 1784 |
case "touchmove": |
| 1785 |
case "wheel": |
| 1786 |
case "mouseenter": |
| 1787 |
case "mouseleave": |
| 1788 |
case "pointerenter": |
| 1789 |
case "pointerleave": |
| 1790 |
return 4; |
| 1791 |
case "message": |
| 1792 |
switch (ec()) { |
| 1793 |
case fc: |
| 1794 |
return 1; |
| 1795 |
case gc: |
| 1796 |
return 4; |
| 1797 |
case hc: |
| 1798 |
case ic: |
| 1799 |
return 16; |
| 1800 |
case jc: |
| 1801 |
return 536870912; |
| 1802 |
default: |
| 1803 |
return 16; |
| 1804 |
} |
| 1805 |
default: |
| 1806 |
return 16; |
| 1807 |
} |
| 1808 |
} |
| 1809 |
var kd = null, ld = null, md = null; |
| 1810 |
function nd() { |
| 1811 |
if (md) return md; |
| 1812 |
var a, b2 = ld, c2 = b2.length, d2, e2 = "value" in kd ? kd.value : kd.textContent, f2 = e2.length; |
| 1813 |
for (a = 0; a < c2 && b2[a] === e2[a]; a++) ; |
| 1814 |
var g2 = c2 - a; |
| 1815 |
for (d2 = 1; d2 <= g2 && b2[c2 - d2] === e2[f2 - d2]; d2++) ; |
| 1816 |
return md = e2.slice(a, 1 < d2 ? 1 - d2 : void 0); |
| 1817 |
} |
| 1818 |
function od(a) { |
| 1819 |
var b2 = a.keyCode; |
| 1820 |
"charCode" in a ? (a = a.charCode, 0 === a && 13 === b2 && (a = 13)) : a = b2; |
| 1821 |
10 === a && (a = 13); |
| 1822 |
return 32 <= a || 13 === a ? a : 0; |
| 1823 |
} |
| 1824 |
function pd() { |
| 1825 |
return true; |
| 1826 |
} |
| 1827 |
function qd() { |
| 1828 |
return false; |
| 1829 |
} |
| 1830 |
function rd(a) { |
| 1831 |
function b2(b3, d2, e2, f2, g2) { |
| 1832 |
this._reactName = b3; |
| 1833 |
this._targetInst = e2; |
| 1834 |
this.type = d2; |
| 1835 |
this.nativeEvent = f2; |
| 1836 |
this.target = g2; |
| 1837 |
this.currentTarget = null; |
| 1838 |
for (var c2 in a) a.hasOwnProperty(c2) && (b3 = a[c2], this[c2] = b3 ? b3(f2) : f2[c2]); |
| 1839 |
this.isDefaultPrevented = (null != f2.defaultPrevented ? f2.defaultPrevented : false === f2.returnValue) ? pd : qd; |
| 1840 |
this.isPropagationStopped = qd; |
| 1841 |
return this; |
| 1842 |
} |
| 1843 |
A(b2.prototype, { preventDefault: function() { |
| 1844 |
this.defaultPrevented = true; |
| 1845 |
var a2 = this.nativeEvent; |
| 1846 |
a2 && (a2.preventDefault ? a2.preventDefault() : "unknown" !== typeof a2.returnValue && (a2.returnValue = false), this.isDefaultPrevented = pd); |
| 1847 |
}, stopPropagation: function() { |
| 1848 |
var a2 = this.nativeEvent; |
| 1849 |
a2 && (a2.stopPropagation ? a2.stopPropagation() : "unknown" !== typeof a2.cancelBubble && (a2.cancelBubble = true), this.isPropagationStopped = pd); |
| 1850 |
}, persist: function() { |
| 1851 |
}, isPersistent: pd }); |
| 1852 |
return b2; |
| 1853 |
} |
| 1854 |
var sd = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function(a) { |
| 1855 |
return a.timeStamp || Date.now(); |
| 1856 |
}, defaultPrevented: 0, isTrusted: 0 }, td = rd(sd), ud = A({}, sd, { view: 0, detail: 0 }), vd = rd(ud), wd, xd, yd, Ad = A({}, ud, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: zd, button: 0, buttons: 0, relatedTarget: function(a) { |
| 1857 |
return void 0 === a.relatedTarget ? a.fromElement === a.srcElement ? a.toElement : a.fromElement : a.relatedTarget; |
| 1858 |
}, movementX: function(a) { |
| 1859 |
if ("movementX" in a) return a.movementX; |
| 1860 |
a !== yd && (yd && "mousemove" === a.type ? (wd = a.screenX - yd.screenX, xd = a.screenY - yd.screenY) : xd = wd = 0, yd = a); |
| 1861 |
return wd; |
| 1862 |
}, movementY: function(a) { |
| 1863 |
return "movementY" in a ? a.movementY : xd; |
| 1864 |
} }), Bd = rd(Ad), Cd = A({}, Ad, { dataTransfer: 0 }), Dd = rd(Cd), Ed = A({}, ud, { relatedTarget: 0 }), Fd = rd(Ed), Gd = A({}, sd, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }), Hd = rd(Gd), Id = A({}, sd, { clipboardData: function(a) { |
| 1865 |
return "clipboardData" in a ? a.clipboardData : window.clipboardData; |
| 1866 |
} }), Jd = rd(Id), Kd = A({}, sd, { data: 0 }), Ld = rd(Kd), Md = { |
| 1867 |
Esc: "Escape", |
| 1868 |
Spacebar: " ", |
| 1869 |
Left: "ArrowLeft", |
| 1870 |
Up: "ArrowUp", |
| 1871 |
Right: "ArrowRight", |
| 1872 |
Down: "ArrowDown", |
| 1873 |
Del: "Delete", |
| 1874 |
Win: "OS", |
| 1875 |
Menu: "ContextMenu", |
| 1876 |
Apps: "ContextMenu", |
| 1877 |
Scroll: "ScrollLock", |
| 1878 |
MozPrintableKey: "Unidentified" |
| 1879 |
}, Nd = { |
| 1880 |
8: "Backspace", |
| 1881 |
9: "Tab", |
| 1882 |
12: "Clear", |
| 1883 |
13: "Enter", |
| 1884 |
16: "Shift", |
| 1885 |
17: "Control", |
| 1886 |
18: "Alt", |
| 1887 |
19: "Pause", |
| 1888 |
20: "CapsLock", |
| 1889 |
27: "Escape", |
| 1890 |
32: " ", |
| 1891 |
33: "PageUp", |
| 1892 |
34: "PageDown", |
| 1893 |
35: "End", |
| 1894 |
36: "Home", |
| 1895 |
37: "ArrowLeft", |
| 1896 |
38: "ArrowUp", |
| 1897 |
39: "ArrowRight", |
| 1898 |
40: "ArrowDown", |
| 1899 |
45: "Insert", |
| 1900 |
46: "Delete", |
| 1901 |
112: "F1", |
| 1902 |
113: "F2", |
| 1903 |
114: "F3", |
| 1904 |
115: "F4", |
| 1905 |
116: "F5", |
| 1906 |
117: "F6", |
| 1907 |
118: "F7", |
| 1908 |
119: "F8", |
| 1909 |
120: "F9", |
| 1910 |
121: "F10", |
| 1911 |
122: "F11", |
| 1912 |
123: "F12", |
| 1913 |
144: "NumLock", |
| 1914 |
145: "ScrollLock", |
| 1915 |
224: "Meta" |
| 1916 |
}, Od = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" }; |
| 1917 |
function Pd(a) { |
| 1918 |
var b2 = this.nativeEvent; |
| 1919 |
return b2.getModifierState ? b2.getModifierState(a) : (a = Od[a]) ? !!b2[a] : false; |
| 1920 |
} |
| 1921 |
function zd() { |
| 1922 |
return Pd; |
| 1923 |
} |
| 1924 |
var Qd = A({}, ud, { key: function(a) { |
| 1925 |
if (a.key) { |
| 1926 |
var b2 = Md[a.key] || a.key; |
| 1927 |
if ("Unidentified" !== b2) return b2; |
| 1928 |
} |
| 1929 |
return "keypress" === a.type ? (a = od(a), 13 === a ? "Enter" : String.fromCharCode(a)) : "keydown" === a.type || "keyup" === a.type ? Nd[a.keyCode] || "Unidentified" : ""; |
| 1930 |
}, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: zd, charCode: function(a) { |
| 1931 |
return "keypress" === a.type ? od(a) : 0; |
| 1932 |
}, keyCode: function(a) { |
| 1933 |
return "keydown" === a.type || "keyup" === a.type ? a.keyCode : 0; |
| 1934 |
}, which: function(a) { |
| 1935 |
return "keypress" === a.type ? od(a) : "keydown" === a.type || "keyup" === a.type ? a.keyCode : 0; |
| 1936 |
} }), Rd = rd(Qd), Sd = A({}, Ad, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }), Td = rd(Sd), Ud = A({}, ud, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: zd }), Vd = rd(Ud), Wd = A({}, sd, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }), Xd = rd(Wd), Yd = A({}, Ad, { |
| 1937 |
deltaX: function(a) { |
| 1938 |
return "deltaX" in a ? a.deltaX : "wheelDeltaX" in a ? -a.wheelDeltaX : 0; |
| 1939 |
}, |
| 1940 |
deltaY: function(a) { |
| 1941 |
return "deltaY" in a ? a.deltaY : "wheelDeltaY" in a ? -a.wheelDeltaY : "wheelDelta" in a ? -a.wheelDelta : 0; |
| 1942 |
}, |
| 1943 |
deltaZ: 0, |
| 1944 |
deltaMode: 0 |
| 1945 |
}), Zd = rd(Yd), $d = [9, 13, 27, 32], ae = ia && "CompositionEvent" in window, be = null; |
| 1946 |
ia && "documentMode" in document && (be = document.documentMode); |
| 1947 |
var ce = ia && "TextEvent" in window && !be, de = ia && (!ae || be && 8 < be && 11 >= be), ee = String.fromCharCode(32), fe = false; |
| 1948 |
function ge(a, b2) { |
| 1949 |
switch (a) { |
| 1950 |
case "keyup": |
| 1951 |
return -1 !== $d.indexOf(b2.keyCode); |
| 1952 |
case "keydown": |
| 1953 |
return 229 !== b2.keyCode; |
| 1954 |
case "keypress": |
| 1955 |
case "mousedown": |
| 1956 |
case "focusout": |
| 1957 |
return true; |
| 1958 |
default: |
| 1959 |
return false; |
| 1960 |
} |
| 1961 |
} |
| 1962 |
function he(a) { |
| 1963 |
a = a.detail; |
| 1964 |
return "object" === typeof a && "data" in a ? a.data : null; |
| 1965 |
} |
| 1966 |
var ie = false; |
| 1967 |
function je(a, b2) { |
| 1968 |
switch (a) { |
| 1969 |
case "compositionend": |
| 1970 |
return he(b2); |
| 1971 |
case "keypress": |
| 1972 |
if (32 !== b2.which) return null; |
| 1973 |
fe = true; |
| 1974 |
return ee; |
| 1975 |
case "textInput": |
| 1976 |
return a = b2.data, a === ee && fe ? null : a; |
| 1977 |
default: |
| 1978 |
return null; |
| 1979 |
} |
| 1980 |
} |
| 1981 |
function ke(a, b2) { |
| 1982 |
if (ie) return "compositionend" === a || !ae && ge(a, b2) ? (a = nd(), md = ld = kd = null, ie = false, a) : null; |
| 1983 |
switch (a) { |
| 1984 |
case "paste": |
| 1985 |
return null; |
| 1986 |
case "keypress": |
| 1987 |
if (!(b2.ctrlKey || b2.altKey || b2.metaKey) || b2.ctrlKey && b2.altKey) { |
| 1988 |
if (b2.char && 1 < b2.char.length) return b2.char; |
| 1989 |
if (b2.which) return String.fromCharCode(b2.which); |
| 1990 |
} |
| 1991 |
return null; |
| 1992 |
case "compositionend": |
| 1993 |
return de && "ko" !== b2.locale ? null : b2.data; |
| 1994 |
default: |
| 1995 |
return null; |
| 1996 |
} |
| 1997 |
} |
| 1998 |
var le = { color: true, date: true, datetime: true, "datetime-local": true, email: true, month: true, number: true, password: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true }; |
| 1999 |
function me(a) { |
| 2000 |
var b2 = a && a.nodeName && a.nodeName.toLowerCase(); |
| 2001 |
return "input" === b2 ? !!le[a.type] : "textarea" === b2 ? true : false; |
| 2002 |
} |
| 2003 |
function ne(a, b2, c2, d2) { |
| 2004 |
Eb(d2); |
| 2005 |
b2 = oe(b2, "onChange"); |
| 2006 |
0 < b2.length && (c2 = new td("onChange", "change", null, c2, d2), a.push({ event: c2, listeners: b2 })); |
| 2007 |
} |
| 2008 |
var pe = null, qe = null; |
| 2009 |
function re(a) { |
| 2010 |
se(a, 0); |
| 2011 |
} |
| 2012 |
function te(a) { |
| 2013 |
var b2 = ue(a); |
| 2014 |
if (Wa(b2)) return a; |
| 2015 |
} |
| 2016 |
function ve(a, b2) { |
| 2017 |
if ("change" === a) return b2; |
| 2018 |
} |
| 2019 |
var we = false; |
| 2020 |
if (ia) { |
| 2021 |
var xe; |
| 2022 |
if (ia) { |
| 2023 |
var ye = "oninput" in document; |
| 2024 |
if (!ye) { |
| 2025 |
var ze = document.createElement("div"); |
| 2026 |
ze.setAttribute("oninput", "return;"); |
| 2027 |
ye = "function" === typeof ze.oninput; |
| 2028 |
} |
| 2029 |
xe = ye; |
| 2030 |
} else xe = false; |
| 2031 |
we = xe && (!document.documentMode || 9 < document.documentMode); |
| 2032 |
} |
| 2033 |
function Ae() { |
| 2034 |
pe && (pe.detachEvent("onpropertychange", Be), qe = pe = null); |
| 2035 |
} |
| 2036 |
function Be(a) { |
| 2037 |
if ("value" === a.propertyName && te(qe)) { |
| 2038 |
var b2 = []; |
| 2039 |
ne(b2, qe, a, xb(a)); |
| 2040 |
Jb(re, b2); |
| 2041 |
} |
| 2042 |
} |
| 2043 |
function Ce(a, b2, c2) { |
| 2044 |
"focusin" === a ? (Ae(), pe = b2, qe = c2, pe.attachEvent("onpropertychange", Be)) : "focusout" === a && Ae(); |
| 2045 |
} |
| 2046 |
function De(a) { |
| 2047 |
if ("selectionchange" === a || "keyup" === a || "keydown" === a) return te(qe); |
| 2048 |
} |
| 2049 |
function Ee(a, b2) { |
| 2050 |
if ("click" === a) return te(b2); |
| 2051 |
} |
| 2052 |
function Fe(a, b2) { |
| 2053 |
if ("input" === a || "change" === a) return te(b2); |
| 2054 |
} |
| 2055 |
function Ge(a, b2) { |
| 2056 |
return a === b2 && (0 !== a || 1 / a === 1 / b2) || a !== a && b2 !== b2; |
| 2057 |
} |
| 2058 |
var He = "function" === typeof Object.is ? Object.is : Ge; |
| 2059 |
function Ie(a, b2) { |
| 2060 |
if (He(a, b2)) return true; |
| 2061 |
if ("object" !== typeof a || null === a || "object" !== typeof b2 || null === b2) return false; |
| 2062 |
var c2 = Object.keys(a), d2 = Object.keys(b2); |
| 2063 |
if (c2.length !== d2.length) return false; |
| 2064 |
for (d2 = 0; d2 < c2.length; d2++) { |
| 2065 |
var e2 = c2[d2]; |
| 2066 |
if (!ja.call(b2, e2) || !He(a[e2], b2[e2])) return false; |
| 2067 |
} |
| 2068 |
return true; |
| 2069 |
} |
| 2070 |
function Je(a) { |
| 2071 |
for (; a && a.firstChild; ) a = a.firstChild; |
| 2072 |
return a; |
| 2073 |
} |
| 2074 |
function Ke(a, b2) { |
| 2075 |
var c2 = Je(a); |
| 2076 |
a = 0; |
| 2077 |
for (var d2; c2; ) { |
| 2078 |
if (3 === c2.nodeType) { |
| 2079 |
d2 = a + c2.textContent.length; |
| 2080 |
if (a <= b2 && d2 >= b2) return { node: c2, offset: b2 - a }; |
| 2081 |
a = d2; |
| 2082 |
} |
| 2083 |
a: { |
| 2084 |
for (; c2; ) { |
| 2085 |
if (c2.nextSibling) { |
| 2086 |
c2 = c2.nextSibling; |
| 2087 |
break a; |
| 2088 |
} |
| 2089 |
c2 = c2.parentNode; |
| 2090 |
} |
| 2091 |
c2 = void 0; |
| 2092 |
} |
| 2093 |
c2 = Je(c2); |
| 2094 |
} |
| 2095 |
} |
| 2096 |
function Le(a, b2) { |
| 2097 |
return a && b2 ? a === b2 ? true : a && 3 === a.nodeType ? false : b2 && 3 === b2.nodeType ? Le(a, b2.parentNode) : "contains" in a ? a.contains(b2) : a.compareDocumentPosition ? !!(a.compareDocumentPosition(b2) & 16) : false : false; |
| 2098 |
} |
| 2099 |
function Me() { |
| 2100 |
for (var a = window, b2 = Xa(); b2 instanceof a.HTMLIFrameElement; ) { |
| 2101 |
try { |
| 2102 |
var c2 = "string" === typeof b2.contentWindow.location.href; |
| 2103 |
} catch (d2) { |
| 2104 |
c2 = false; |
| 2105 |
} |
| 2106 |
if (c2) a = b2.contentWindow; |
| 2107 |
else break; |
| 2108 |
b2 = Xa(a.document); |
| 2109 |
} |
| 2110 |
return b2; |
| 2111 |
} |
| 2112 |
function Ne(a) { |
| 2113 |
var b2 = a && a.nodeName && a.nodeName.toLowerCase(); |
| 2114 |
return b2 && ("input" === b2 && ("text" === a.type || "search" === a.type || "tel" === a.type || "url" === a.type || "password" === a.type) || "textarea" === b2 || "true" === a.contentEditable); |
| 2115 |
} |
| 2116 |
function Oe(a) { |
| 2117 |
var b2 = Me(), c2 = a.focusedElem, d2 = a.selectionRange; |
| 2118 |
if (b2 !== c2 && c2 && c2.ownerDocument && Le(c2.ownerDocument.documentElement, c2)) { |
| 2119 |
if (null !== d2 && Ne(c2)) { |
| 2120 |
if (b2 = d2.start, a = d2.end, void 0 === a && (a = b2), "selectionStart" in c2) c2.selectionStart = b2, c2.selectionEnd = Math.min(a, c2.value.length); |
| 2121 |
else if (a = (b2 = c2.ownerDocument || document) && b2.defaultView || window, a.getSelection) { |
| 2122 |
a = a.getSelection(); |
| 2123 |
var e2 = c2.textContent.length, f2 = Math.min(d2.start, e2); |
| 2124 |
d2 = void 0 === d2.end ? f2 : Math.min(d2.end, e2); |
| 2125 |
!a.extend && f2 > d2 && (e2 = d2, d2 = f2, f2 = e2); |
| 2126 |
e2 = Ke(c2, f2); |
| 2127 |
var g2 = Ke( |
| 2128 |
c2, |
| 2129 |
d2 |
| 2130 |
); |
| 2131 |
e2 && g2 && (1 !== a.rangeCount || a.anchorNode !== e2.node || a.anchorOffset !== e2.offset || a.focusNode !== g2.node || a.focusOffset !== g2.offset) && (b2 = b2.createRange(), b2.setStart(e2.node, e2.offset), a.removeAllRanges(), f2 > d2 ? (a.addRange(b2), a.extend(g2.node, g2.offset)) : (b2.setEnd(g2.node, g2.offset), a.addRange(b2))); |
| 2132 |
} |
| 2133 |
} |
| 2134 |
b2 = []; |
| 2135 |
for (a = c2; a = a.parentNode; ) 1 === a.nodeType && b2.push({ element: a, left: a.scrollLeft, top: a.scrollTop }); |
| 2136 |
"function" === typeof c2.focus && c2.focus(); |
| 2137 |
for (c2 = 0; c2 < b2.length; c2++) a = b2[c2], a.element.scrollLeft = a.left, a.element.scrollTop = a.top; |
| 2138 |
} |
| 2139 |
} |
| 2140 |
var Pe = ia && "documentMode" in document && 11 >= document.documentMode, Qe = null, Re = null, Se = null, Te = false; |
| 2141 |
function Ue(a, b2, c2) { |
| 2142 |
var d2 = c2.window === c2 ? c2.document : 9 === c2.nodeType ? c2 : c2.ownerDocument; |
| 2143 |
Te || null == Qe || Qe !== Xa(d2) || (d2 = Qe, "selectionStart" in d2 && Ne(d2) ? d2 = { start: d2.selectionStart, end: d2.selectionEnd } : (d2 = (d2.ownerDocument && d2.ownerDocument.defaultView || window).getSelection(), d2 = { anchorNode: d2.anchorNode, anchorOffset: d2.anchorOffset, focusNode: d2.focusNode, focusOffset: d2.focusOffset }), Se && Ie(Se, d2) || (Se = d2, d2 = oe(Re, "onSelect"), 0 < d2.length && (b2 = new td("onSelect", "select", null, b2, c2), a.push({ event: b2, listeners: d2 }), b2.target = Qe))); |
| 2144 |
} |
| 2145 |
function Ve(a, b2) { |
| 2146 |
var c2 = {}; |
| 2147 |
c2[a.toLowerCase()] = b2.toLowerCase(); |
| 2148 |
c2["Webkit" + a] = "webkit" + b2; |
| 2149 |
c2["Moz" + a] = "moz" + b2; |
| 2150 |
return c2; |
| 2151 |
} |
| 2152 |
var We = { animationend: Ve("Animation", "AnimationEnd"), animationiteration: Ve("Animation", "AnimationIteration"), animationstart: Ve("Animation", "AnimationStart"), transitionend: Ve("Transition", "TransitionEnd") }, Xe = {}, Ye = {}; |
| 2153 |
ia && (Ye = document.createElement("div").style, "AnimationEvent" in window || (delete We.animationend.animation, delete We.animationiteration.animation, delete We.animationstart.animation), "TransitionEvent" in window || delete We.transitionend.transition); |
| 2154 |
function Ze(a) { |
| 2155 |
if (Xe[a]) return Xe[a]; |
| 2156 |
if (!We[a]) return a; |
| 2157 |
var b2 = We[a], c2; |
| 2158 |
for (c2 in b2) if (b2.hasOwnProperty(c2) && c2 in Ye) return Xe[a] = b2[c2]; |
| 2159 |
return a; |
| 2160 |
} |
| 2161 |
var $e = Ze("animationend"), af = Ze("animationiteration"), bf = Ze("animationstart"), cf = Ze("transitionend"), df = /* @__PURE__ */ new Map(), ef = "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" "); |
| 2162 |
function ff(a, b2) { |
| 2163 |
df.set(a, b2); |
| 2164 |
fa(b2, [a]); |
| 2165 |
} |
| 2166 |
for (var gf = 0; gf < ef.length; gf++) { |
| 2167 |
var hf = ef[gf], jf = hf.toLowerCase(), kf = hf[0].toUpperCase() + hf.slice(1); |
| 2168 |
ff(jf, "on" + kf); |
| 2169 |
} |
| 2170 |
ff($e, "onAnimationEnd"); |
| 2171 |
ff(af, "onAnimationIteration"); |
| 2172 |
ff(bf, "onAnimationStart"); |
| 2173 |
ff("dblclick", "onDoubleClick"); |
| 2174 |
ff("focusin", "onFocus"); |
| 2175 |
ff("focusout", "onBlur"); |
| 2176 |
ff(cf, "onTransitionEnd"); |
| 2177 |
ha("onMouseEnter", ["mouseout", "mouseover"]); |
| 2178 |
ha("onMouseLeave", ["mouseout", "mouseover"]); |
| 2179 |
ha("onPointerEnter", ["pointerout", "pointerover"]); |
| 2180 |
ha("onPointerLeave", ["pointerout", "pointerover"]); |
| 2181 |
fa("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" ")); |
| 2182 |
fa("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")); |
| 2183 |
fa("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]); |
| 2184 |
fa("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" ")); |
| 2185 |
fa("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" ")); |
| 2186 |
fa("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" ")); |
| 2187 |
var lf = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "), mf = new Set("cancel close invalid load scroll toggle".split(" ").concat(lf)); |
| 2188 |
function nf(a, b2, c2) { |
| 2189 |
var d2 = a.type || "unknown-event"; |
| 2190 |
a.currentTarget = c2; |
| 2191 |
Ub(d2, b2, void 0, a); |
| 2192 |
a.currentTarget = null; |
| 2193 |
} |
| 2194 |
function se(a, b2) { |
| 2195 |
b2 = 0 !== (b2 & 4); |
| 2196 |
for (var c2 = 0; c2 < a.length; c2++) { |
| 2197 |
var d2 = a[c2], e2 = d2.event; |
| 2198 |
d2 = d2.listeners; |
| 2199 |
a: { |
| 2200 |
var f2 = void 0; |
| 2201 |
if (b2) for (var g2 = d2.length - 1; 0 <= g2; g2--) { |
| 2202 |
var h2 = d2[g2], k2 = h2.instance, l2 = h2.currentTarget; |
| 2203 |
h2 = h2.listener; |
| 2204 |
if (k2 !== f2 && e2.isPropagationStopped()) break a; |
| 2205 |
nf(e2, h2, l2); |
| 2206 |
f2 = k2; |
| 2207 |
} |
| 2208 |
else for (g2 = 0; g2 < d2.length; g2++) { |
| 2209 |
h2 = d2[g2]; |
| 2210 |
k2 = h2.instance; |
| 2211 |
l2 = h2.currentTarget; |
| 2212 |
h2 = h2.listener; |
| 2213 |
if (k2 !== f2 && e2.isPropagationStopped()) break a; |
| 2214 |
nf(e2, h2, l2); |
| 2215 |
f2 = k2; |
| 2216 |
} |
| 2217 |
} |
| 2218 |
} |
| 2219 |
if (Qb) throw a = Rb, Qb = false, Rb = null, a; |
| 2220 |
} |
| 2221 |
function D(a, b2) { |
| 2222 |
var c2 = b2[of]; |
| 2223 |
void 0 === c2 && (c2 = b2[of] = /* @__PURE__ */ new Set()); |
| 2224 |
var d2 = a + "__bubble"; |
| 2225 |
c2.has(d2) || (pf(b2, a, 2, false), c2.add(d2)); |
| 2226 |
} |
| 2227 |
function qf(a, b2, c2) { |
| 2228 |
var d2 = 0; |
| 2229 |
b2 && (d2 |= 4); |
| 2230 |
pf(c2, a, d2, b2); |
| 2231 |
} |
| 2232 |
var rf = "_reactListening" + Math.random().toString(36).slice(2); |
| 2233 |
function sf(a) { |
| 2234 |
if (!a[rf]) { |
| 2235 |
a[rf] = true; |
| 2236 |
da.forEach(function(b3) { |
| 2237 |
"selectionchange" !== b3 && (mf.has(b3) || qf(b3, false, a), qf(b3, true, a)); |
| 2238 |
}); |
| 2239 |
var b2 = 9 === a.nodeType ? a : a.ownerDocument; |
| 2240 |
null === b2 || b2[rf] || (b2[rf] = true, qf("selectionchange", false, b2)); |
| 2241 |
} |
| 2242 |
} |
| 2243 |
function pf(a, b2, c2, d2) { |
| 2244 |
switch (jd(b2)) { |
| 2245 |
case 1: |
| 2246 |
var e2 = ed; |
| 2247 |
break; |
| 2248 |
case 4: |
| 2249 |
e2 = gd; |
| 2250 |
break; |
| 2251 |
default: |
| 2252 |
e2 = fd; |
| 2253 |
} |
| 2254 |
c2 = e2.bind(null, b2, c2, a); |
| 2255 |
e2 = void 0; |
| 2256 |
!Lb || "touchstart" !== b2 && "touchmove" !== b2 && "wheel" !== b2 || (e2 = true); |
| 2257 |
d2 ? void 0 !== e2 ? a.addEventListener(b2, c2, { capture: true, passive: e2 }) : a.addEventListener(b2, c2, true) : void 0 !== e2 ? a.addEventListener(b2, c2, { passive: e2 }) : a.addEventListener(b2, c2, false); |
| 2258 |
} |
| 2259 |
function hd(a, b2, c2, d2, e2) { |
| 2260 |
var f2 = d2; |
| 2261 |
if (0 === (b2 & 1) && 0 === (b2 & 2) && null !== d2) a: for (; ; ) { |
| 2262 |
if (null === d2) return; |
| 2263 |
var g2 = d2.tag; |
| 2264 |
if (3 === g2 || 4 === g2) { |
| 2265 |
var h2 = d2.stateNode.containerInfo; |
| 2266 |
if (h2 === e2 || 8 === h2.nodeType && h2.parentNode === e2) break; |
| 2267 |
if (4 === g2) for (g2 = d2.return; null !== g2; ) { |
| 2268 |
var k2 = g2.tag; |
| 2269 |
if (3 === k2 || 4 === k2) { |
| 2270 |
if (k2 = g2.stateNode.containerInfo, k2 === e2 || 8 === k2.nodeType && k2.parentNode === e2) return; |
| 2271 |
} |
| 2272 |
g2 = g2.return; |
| 2273 |
} |
| 2274 |
for (; null !== h2; ) { |
| 2275 |
g2 = Wc(h2); |
| 2276 |
if (null === g2) return; |
| 2277 |
k2 = g2.tag; |
| 2278 |
if (5 === k2 || 6 === k2) { |
| 2279 |
d2 = f2 = g2; |
| 2280 |
continue a; |
| 2281 |
} |
| 2282 |
h2 = h2.parentNode; |
| 2283 |
} |
| 2284 |
} |
| 2285 |
d2 = d2.return; |
| 2286 |
} |
| 2287 |
Jb(function() { |
| 2288 |
var d3 = f2, e3 = xb(c2), g3 = []; |
| 2289 |
a: { |
| 2290 |
var h3 = df.get(a); |
| 2291 |
if (void 0 !== h3) { |
| 2292 |
var k3 = td, n2 = a; |
| 2293 |
switch (a) { |
| 2294 |
case "keypress": |
| 2295 |
if (0 === od(c2)) break a; |
| 2296 |
case "keydown": |
| 2297 |
case "keyup": |
| 2298 |
k3 = Rd; |
| 2299 |
break; |
| 2300 |
case "focusin": |
| 2301 |
n2 = "focus"; |
| 2302 |
k3 = Fd; |
| 2303 |
break; |
| 2304 |
case "focusout": |
| 2305 |
n2 = "blur"; |
| 2306 |
k3 = Fd; |
| 2307 |
break; |
| 2308 |
case "beforeblur": |
| 2309 |
case "afterblur": |
| 2310 |
k3 = Fd; |
| 2311 |
break; |
| 2312 |
case "click": |
| 2313 |
if (2 === c2.button) break a; |
| 2314 |
case "auxclick": |
| 2315 |
case "dblclick": |
| 2316 |
case "mousedown": |
| 2317 |
case "mousemove": |
| 2318 |
case "mouseup": |
| 2319 |
case "mouseout": |
| 2320 |
case "mouseover": |
| 2321 |
case "contextmenu": |
| 2322 |
k3 = Bd; |
| 2323 |
break; |
| 2324 |
case "drag": |
| 2325 |
case "dragend": |
| 2326 |
case "dragenter": |
| 2327 |
case "dragexit": |
| 2328 |
case "dragleave": |
| 2329 |
case "dragover": |
| 2330 |
case "dragstart": |
| 2331 |
case "drop": |
| 2332 |
k3 = Dd; |
| 2333 |
break; |
| 2334 |
case "touchcancel": |
| 2335 |
case "touchend": |
| 2336 |
case "touchmove": |
| 2337 |
case "touchstart": |
| 2338 |
k3 = Vd; |
| 2339 |
break; |
| 2340 |
case $e: |
| 2341 |
case af: |
| 2342 |
case bf: |
| 2343 |
k3 = Hd; |
| 2344 |
break; |
| 2345 |
case cf: |
| 2346 |
k3 = Xd; |
| 2347 |
break; |
| 2348 |
case "scroll": |
| 2349 |
k3 = vd; |
| 2350 |
break; |
| 2351 |
case "wheel": |
| 2352 |
k3 = Zd; |
| 2353 |
break; |
| 2354 |
case "copy": |
| 2355 |
case "cut": |
| 2356 |
case "paste": |
| 2357 |
k3 = Jd; |
| 2358 |
break; |
| 2359 |
case "gotpointercapture": |
| 2360 |
case "lostpointercapture": |
| 2361 |
case "pointercancel": |
| 2362 |
case "pointerdown": |
| 2363 |
case "pointermove": |
| 2364 |
case "pointerout": |
| 2365 |
case "pointerover": |
| 2366 |
case "pointerup": |
| 2367 |
k3 = Td; |
| 2368 |
} |
| 2369 |
var t2 = 0 !== (b2 & 4), J2 = !t2 && "scroll" === a, x2 = t2 ? null !== h3 ? h3 + "Capture" : null : h3; |
| 2370 |
t2 = []; |
| 2371 |
for (var w2 = d3, u2; null !== w2; ) { |
| 2372 |
u2 = w2; |
| 2373 |
var F2 = u2.stateNode; |
| 2374 |
5 === u2.tag && null !== F2 && (u2 = F2, null !== x2 && (F2 = Kb(w2, x2), null != F2 && t2.push(tf(w2, F2, u2)))); |
| 2375 |
if (J2) break; |
| 2376 |
w2 = w2.return; |
| 2377 |
} |
| 2378 |
0 < t2.length && (h3 = new k3(h3, n2, null, c2, e3), g3.push({ event: h3, listeners: t2 })); |
| 2379 |
} |
| 2380 |
} |
| 2381 |
if (0 === (b2 & 7)) { |
| 2382 |
a: { |
| 2383 |
h3 = "mouseover" === a || "pointerover" === a; |
| 2384 |
k3 = "mouseout" === a || "pointerout" === a; |
| 2385 |
if (h3 && c2 !== wb && (n2 = c2.relatedTarget || c2.fromElement) && (Wc(n2) || n2[uf])) break a; |
| 2386 |
if (k3 || h3) { |
| 2387 |
h3 = e3.window === e3 ? e3 : (h3 = e3.ownerDocument) ? h3.defaultView || h3.parentWindow : window; |
| 2388 |
if (k3) { |
| 2389 |
if (n2 = c2.relatedTarget || c2.toElement, k3 = d3, n2 = n2 ? Wc(n2) : null, null !== n2 && (J2 = Vb(n2), n2 !== J2 || 5 !== n2.tag && 6 !== n2.tag)) n2 = null; |
| 2390 |
} else k3 = null, n2 = d3; |
| 2391 |
if (k3 !== n2) { |
| 2392 |
t2 = Bd; |
| 2393 |
F2 = "onMouseLeave"; |
| 2394 |
x2 = "onMouseEnter"; |
| 2395 |
w2 = "mouse"; |
| 2396 |
if ("pointerout" === a || "pointerover" === a) t2 = Td, F2 = "onPointerLeave", x2 = "onPointerEnter", w2 = "pointer"; |
| 2397 |
J2 = null == k3 ? h3 : ue(k3); |
| 2398 |
u2 = null == n2 ? h3 : ue(n2); |
| 2399 |
h3 = new t2(F2, w2 + "leave", k3, c2, e3); |
| 2400 |
h3.target = J2; |
| 2401 |
h3.relatedTarget = u2; |
| 2402 |
F2 = null; |
| 2403 |
Wc(e3) === d3 && (t2 = new t2(x2, w2 + "enter", n2, c2, e3), t2.target = u2, t2.relatedTarget = J2, F2 = t2); |
| 2404 |
J2 = F2; |
| 2405 |
if (k3 && n2) b: { |
| 2406 |
t2 = k3; |
| 2407 |
x2 = n2; |
| 2408 |
w2 = 0; |
| 2409 |
for (u2 = t2; u2; u2 = vf(u2)) w2++; |
| 2410 |
u2 = 0; |
| 2411 |
for (F2 = x2; F2; F2 = vf(F2)) u2++; |
| 2412 |
for (; 0 < w2 - u2; ) t2 = vf(t2), w2--; |
| 2413 |
for (; 0 < u2 - w2; ) x2 = vf(x2), u2--; |
| 2414 |
for (; w2--; ) { |
| 2415 |
if (t2 === x2 || null !== x2 && t2 === x2.alternate) break b; |
| 2416 |
t2 = vf(t2); |
| 2417 |
x2 = vf(x2); |
| 2418 |
} |
| 2419 |
t2 = null; |
| 2420 |
} |
| 2421 |
else t2 = null; |
| 2422 |
null !== k3 && wf(g3, h3, k3, t2, false); |
| 2423 |
null !== n2 && null !== J2 && wf(g3, J2, n2, t2, true); |
| 2424 |
} |
| 2425 |
} |
| 2426 |
} |
| 2427 |
a: { |
| 2428 |
h3 = d3 ? ue(d3) : window; |
| 2429 |
k3 = h3.nodeName && h3.nodeName.toLowerCase(); |
| 2430 |
if ("select" === k3 || "input" === k3 && "file" === h3.type) var na = ve; |
| 2431 |
else if (me(h3)) if (we) na = Fe; |
| 2432 |
else { |
| 2433 |
na = De; |
| 2434 |
var xa = Ce; |
| 2435 |
} |
| 2436 |
else (k3 = h3.nodeName) && "input" === k3.toLowerCase() && ("checkbox" === h3.type || "radio" === h3.type) && (na = Ee); |
| 2437 |
if (na && (na = na(a, d3))) { |
| 2438 |
ne(g3, na, c2, e3); |
| 2439 |
break a; |
| 2440 |
} |
| 2441 |
xa && xa(a, h3, d3); |
| 2442 |
"focusout" === a && (xa = h3._wrapperState) && xa.controlled && "number" === h3.type && cb(h3, "number", h3.value); |
| 2443 |
} |
| 2444 |
xa = d3 ? ue(d3) : window; |
| 2445 |
switch (a) { |
| 2446 |
case "focusin": |
| 2447 |
if (me(xa) || "true" === xa.contentEditable) Qe = xa, Re = d3, Se = null; |
| 2448 |
break; |
| 2449 |
case "focusout": |
| 2450 |
Se = Re = Qe = null; |
| 2451 |
break; |
| 2452 |
case "mousedown": |
| 2453 |
Te = true; |
| 2454 |
break; |
| 2455 |
case "contextmenu": |
| 2456 |
case "mouseup": |
| 2457 |
case "dragend": |
| 2458 |
Te = false; |
| 2459 |
Ue(g3, c2, e3); |
| 2460 |
break; |
| 2461 |
case "selectionchange": |
| 2462 |
if (Pe) break; |
| 2463 |
case "keydown": |
| 2464 |
case "keyup": |
| 2465 |
Ue(g3, c2, e3); |
| 2466 |
} |
| 2467 |
var $a; |
| 2468 |
if (ae) b: { |
| 2469 |
switch (a) { |
| 2470 |
case "compositionstart": |
| 2471 |
var ba = "onCompositionStart"; |
| 2472 |
break b; |
| 2473 |
case "compositionend": |
| 2474 |
ba = "onCompositionEnd"; |
| 2475 |
break b; |
| 2476 |
case "compositionupdate": |
| 2477 |
ba = "onCompositionUpdate"; |
| 2478 |
break b; |
| 2479 |
} |
| 2480 |
ba = void 0; |
| 2481 |
} |
| 2482 |
else ie ? ge(a, c2) && (ba = "onCompositionEnd") : "keydown" === a && 229 === c2.keyCode && (ba = "onCompositionStart"); |
| 2483 |
ba && (de && "ko" !== c2.locale && (ie || "onCompositionStart" !== ba ? "onCompositionEnd" === ba && ie && ($a = nd()) : (kd = e3, ld = "value" in kd ? kd.value : kd.textContent, ie = true)), xa = oe(d3, ba), 0 < xa.length && (ba = new Ld(ba, a, null, c2, e3), g3.push({ event: ba, listeners: xa }), $a ? ba.data = $a : ($a = he(c2), null !== $a && (ba.data = $a)))); |
| 2484 |
if ($a = ce ? je(a, c2) : ke(a, c2)) d3 = oe(d3, "onBeforeInput"), 0 < d3.length && (e3 = new Ld("onBeforeInput", "beforeinput", null, c2, e3), g3.push({ event: e3, listeners: d3 }), e3.data = $a); |
| 2485 |
} |
| 2486 |
se(g3, b2); |
| 2487 |
}); |
| 2488 |
} |
| 2489 |
function tf(a, b2, c2) { |
| 2490 |
return { instance: a, listener: b2, currentTarget: c2 }; |
| 2491 |
} |
| 2492 |
function oe(a, b2) { |
| 2493 |
for (var c2 = b2 + "Capture", d2 = []; null !== a; ) { |
| 2494 |
var e2 = a, f2 = e2.stateNode; |
| 2495 |
5 === e2.tag && null !== f2 && (e2 = f2, f2 = Kb(a, c2), null != f2 && d2.unshift(tf(a, f2, e2)), f2 = Kb(a, b2), null != f2 && d2.push(tf(a, f2, e2))); |
| 2496 |
a = a.return; |
| 2497 |
} |
| 2498 |
return d2; |
| 2499 |
} |
| 2500 |
function vf(a) { |
| 2501 |
if (null === a) return null; |
| 2502 |
do |
| 2503 |
a = a.return; |
| 2504 |
while (a && 5 !== a.tag); |
| 2505 |
return a ? a : null; |
| 2506 |
} |
| 2507 |
function wf(a, b2, c2, d2, e2) { |
| 2508 |
for (var f2 = b2._reactName, g2 = []; null !== c2 && c2 !== d2; ) { |
| 2509 |
var h2 = c2, k2 = h2.alternate, l2 = h2.stateNode; |
| 2510 |
if (null !== k2 && k2 === d2) break; |
| 2511 |
5 === h2.tag && null !== l2 && (h2 = l2, e2 ? (k2 = Kb(c2, f2), null != k2 && g2.unshift(tf(c2, k2, h2))) : e2 || (k2 = Kb(c2, f2), null != k2 && g2.push(tf(c2, k2, h2)))); |
| 2512 |
c2 = c2.return; |
| 2513 |
} |
| 2514 |
0 !== g2.length && a.push({ event: b2, listeners: g2 }); |
| 2515 |
} |
| 2516 |
var xf = /\r\n?/g, yf = /\u0000|\uFFFD/g; |
| 2517 |
function zf(a) { |
| 2518 |
return ("string" === typeof a ? a : "" + a).replace(xf, "\n").replace(yf, ""); |
| 2519 |
} |
| 2520 |
function Af(a, b2, c2) { |
| 2521 |
b2 = zf(b2); |
| 2522 |
if (zf(a) !== b2 && c2) throw Error(p$1(425)); |
| 2523 |
} |
| 2524 |
function Bf() { |
| 2525 |
} |
| 2526 |
var Cf = null, Df = null; |
| 2527 |
function Ef(a, b2) { |
| 2528 |
return "textarea" === a || "noscript" === a || "string" === typeof b2.children || "number" === typeof b2.children || "object" === typeof b2.dangerouslySetInnerHTML && null !== b2.dangerouslySetInnerHTML && null != b2.dangerouslySetInnerHTML.__html; |
| 2529 |
} |
| 2530 |
var Ff = "function" === typeof setTimeout ? setTimeout : void 0, Gf = "function" === typeof clearTimeout ? clearTimeout : void 0, Hf = "function" === typeof Promise ? Promise : void 0, Jf = "function" === typeof queueMicrotask ? queueMicrotask : "undefined" !== typeof Hf ? function(a) { |
| 2531 |
return Hf.resolve(null).then(a).catch(If); |
| 2532 |
} : Ff; |
| 2533 |
function If(a) { |
| 2534 |
setTimeout(function() { |
| 2535 |
throw a; |
| 2536 |
}); |
| 2537 |
} |
| 2538 |
function Kf(a, b2) { |
| 2539 |
var c2 = b2, d2 = 0; |
| 2540 |
do { |
| 2541 |
var e2 = c2.nextSibling; |
| 2542 |
a.removeChild(c2); |
| 2543 |
if (e2 && 8 === e2.nodeType) if (c2 = e2.data, "/$" === c2) { |
| 2544 |
if (0 === d2) { |
| 2545 |
a.removeChild(e2); |
| 2546 |
bd(b2); |
| 2547 |
return; |
| 2548 |
} |
| 2549 |
d2--; |
| 2550 |
} else "$" !== c2 && "$?" !== c2 && "$!" !== c2 || d2++; |
| 2551 |
c2 = e2; |
| 2552 |
} while (c2); |
| 2553 |
bd(b2); |
| 2554 |
} |
| 2555 |
function Lf(a) { |
| 2556 |
for (; null != a; a = a.nextSibling) { |
| 2557 |
var b2 = a.nodeType; |
| 2558 |
if (1 === b2 || 3 === b2) break; |
| 2559 |
if (8 === b2) { |
| 2560 |
b2 = a.data; |
| 2561 |
if ("$" === b2 || "$!" === b2 || "$?" === b2) break; |
| 2562 |
if ("/$" === b2) return null; |
| 2563 |
} |
| 2564 |
} |
| 2565 |
return a; |
| 2566 |
} |
| 2567 |
function Mf(a) { |
| 2568 |
a = a.previousSibling; |
| 2569 |
for (var b2 = 0; a; ) { |
| 2570 |
if (8 === a.nodeType) { |
| 2571 |
var c2 = a.data; |
| 2572 |
if ("$" === c2 || "$!" === c2 || "$?" === c2) { |
| 2573 |
if (0 === b2) return a; |
| 2574 |
b2--; |
| 2575 |
} else "/$" === c2 && b2++; |
| 2576 |
} |
| 2577 |
a = a.previousSibling; |
| 2578 |
} |
| 2579 |
return null; |
| 2580 |
} |
| 2581 |
var Nf = Math.random().toString(36).slice(2), Of = "__reactFiber$" + Nf, Pf = "__reactProps$" + Nf, uf = "__reactContainer$" + Nf, of = "__reactEvents$" + Nf, Qf = "__reactListeners$" + Nf, Rf = "__reactHandles$" + Nf; |
| 2582 |
function Wc(a) { |
| 2583 |
var b2 = a[Of]; |
| 2584 |
if (b2) return b2; |
| 2585 |
for (var c2 = a.parentNode; c2; ) { |
| 2586 |
if (b2 = c2[uf] || c2[Of]) { |
| 2587 |
c2 = b2.alternate; |
| 2588 |
if (null !== b2.child || null !== c2 && null !== c2.child) for (a = Mf(a); null !== a; ) { |
| 2589 |
if (c2 = a[Of]) return c2; |
| 2590 |
a = Mf(a); |
| 2591 |
} |
| 2592 |
return b2; |
| 2593 |
} |
| 2594 |
a = c2; |
| 2595 |
c2 = a.parentNode; |
| 2596 |
} |
| 2597 |
return null; |
| 2598 |
} |
| 2599 |
function Cb(a) { |
| 2600 |
a = a[Of] || a[uf]; |
| 2601 |
return !a || 5 !== a.tag && 6 !== a.tag && 13 !== a.tag && 3 !== a.tag ? null : a; |
| 2602 |
} |
| 2603 |
function ue(a) { |
| 2604 |
if (5 === a.tag || 6 === a.tag) return a.stateNode; |
| 2605 |
throw Error(p$1(33)); |
| 2606 |
} |
| 2607 |
function Db(a) { |
| 2608 |
return a[Pf] || null; |
| 2609 |
} |
| 2610 |
var Sf = [], Tf = -1; |
| 2611 |
function Uf(a) { |
| 2612 |
return { current: a }; |
| 2613 |
} |
| 2614 |
function E(a) { |
| 2615 |
0 > Tf || (a.current = Sf[Tf], Sf[Tf] = null, Tf--); |
| 2616 |
} |
| 2617 |
function G(a, b2) { |
| 2618 |
Tf++; |
| 2619 |
Sf[Tf] = a.current; |
| 2620 |
a.current = b2; |
| 2621 |
} |
| 2622 |
var Vf = {}, H = Uf(Vf), Wf = Uf(false), Xf = Vf; |
| 2623 |
function Yf(a, b2) { |
| 2624 |
var c2 = a.type.contextTypes; |
| 2625 |
if (!c2) return Vf; |
| 2626 |
var d2 = a.stateNode; |
| 2627 |
if (d2 && d2.__reactInternalMemoizedUnmaskedChildContext === b2) return d2.__reactInternalMemoizedMaskedChildContext; |
| 2628 |
var e2 = {}, f2; |
| 2629 |
for (f2 in c2) e2[f2] = b2[f2]; |
| 2630 |
d2 && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = b2, a.__reactInternalMemoizedMaskedChildContext = e2); |
| 2631 |
return e2; |
| 2632 |
} |
| 2633 |
function Zf(a) { |
| 2634 |
a = a.childContextTypes; |
| 2635 |
return null !== a && void 0 !== a; |
| 2636 |
} |
| 2637 |
function $f() { |
| 2638 |
E(Wf); |
| 2639 |
E(H); |
| 2640 |
} |
| 2641 |
function ag(a, b2, c2) { |
| 2642 |
if (H.current !== Vf) throw Error(p$1(168)); |
| 2643 |
G(H, b2); |
| 2644 |
G(Wf, c2); |
| 2645 |
} |
| 2646 |
function bg(a, b2, c2) { |
| 2647 |
var d2 = a.stateNode; |
| 2648 |
b2 = b2.childContextTypes; |
| 2649 |
if ("function" !== typeof d2.getChildContext) return c2; |
| 2650 |
d2 = d2.getChildContext(); |
| 2651 |
for (var e2 in d2) if (!(e2 in b2)) throw Error(p$1(108, Ra(a) || "Unknown", e2)); |
| 2652 |
return A({}, c2, d2); |
| 2653 |
} |
| 2654 |
function cg(a) { |
| 2655 |
a = (a = a.stateNode) && a.__reactInternalMemoizedMergedChildContext || Vf; |
| 2656 |
Xf = H.current; |
| 2657 |
G(H, a); |
| 2658 |
G(Wf, Wf.current); |
| 2659 |
return true; |
| 2660 |
} |
| 2661 |
function dg(a, b2, c2) { |
| 2662 |
var d2 = a.stateNode; |
| 2663 |
if (!d2) throw Error(p$1(169)); |
| 2664 |
c2 ? (a = bg(a, b2, Xf), d2.__reactInternalMemoizedMergedChildContext = a, E(Wf), E(H), G(H, a)) : E(Wf); |
| 2665 |
G(Wf, c2); |
| 2666 |
} |
| 2667 |
var eg = null, fg = false, gg = false; |
| 2668 |
function hg(a) { |
| 2669 |
null === eg ? eg = [a] : eg.push(a); |
| 2670 |
} |
| 2671 |
function ig(a) { |
| 2672 |
fg = true; |
| 2673 |
hg(a); |
| 2674 |
} |
| 2675 |
function jg() { |
| 2676 |
if (!gg && null !== eg) { |
| 2677 |
gg = true; |
| 2678 |
var a = 0, b2 = C; |
| 2679 |
try { |
| 2680 |
var c2 = eg; |
| 2681 |
for (C = 1; a < c2.length; a++) { |
| 2682 |
var d2 = c2[a]; |
| 2683 |
do |
| 2684 |
d2 = d2(true); |
| 2685 |
while (null !== d2); |
| 2686 |
} |
| 2687 |
eg = null; |
| 2688 |
fg = false; |
| 2689 |
} catch (e2) { |
| 2690 |
throw null !== eg && (eg = eg.slice(a + 1)), ac(fc, jg), e2; |
| 2691 |
} finally { |
| 2692 |
C = b2, gg = false; |
| 2693 |
} |
| 2694 |
} |
| 2695 |
return null; |
| 2696 |
} |
| 2697 |
var kg = [], lg = 0, mg = null, ng = 0, og = [], pg = 0, qg = null, rg = 1, sg = ""; |
| 2698 |
function tg(a, b2) { |
| 2699 |
kg[lg++] = ng; |
| 2700 |
kg[lg++] = mg; |
| 2701 |
mg = a; |
| 2702 |
ng = b2; |
| 2703 |
} |
| 2704 |
function ug(a, b2, c2) { |
| 2705 |
og[pg++] = rg; |
| 2706 |
og[pg++] = sg; |
| 2707 |
og[pg++] = qg; |
| 2708 |
qg = a; |
| 2709 |
var d2 = rg; |
| 2710 |
a = sg; |
| 2711 |
var e2 = 32 - oc(d2) - 1; |
| 2712 |
d2 &= ~(1 << e2); |
| 2713 |
c2 += 1; |
| 2714 |
var f2 = 32 - oc(b2) + e2; |
| 2715 |
if (30 < f2) { |
| 2716 |
var g2 = e2 - e2 % 5; |
| 2717 |
f2 = (d2 & (1 << g2) - 1).toString(32); |
| 2718 |
d2 >>= g2; |
| 2719 |
e2 -= g2; |
| 2720 |
rg = 1 << 32 - oc(b2) + e2 | c2 << e2 | d2; |
| 2721 |
sg = f2 + a; |
| 2722 |
} else rg = 1 << f2 | c2 << e2 | d2, sg = a; |
| 2723 |
} |
| 2724 |
function vg(a) { |
| 2725 |
null !== a.return && (tg(a, 1), ug(a, 1, 0)); |
| 2726 |
} |
| 2727 |
function wg(a) { |
| 2728 |
for (; a === mg; ) mg = kg[--lg], kg[lg] = null, ng = kg[--lg], kg[lg] = null; |
| 2729 |
for (; a === qg; ) qg = og[--pg], og[pg] = null, sg = og[--pg], og[pg] = null, rg = og[--pg], og[pg] = null; |
| 2730 |
} |
| 2731 |
var xg = null, yg = null, I = false, zg = null; |
| 2732 |
function Ag(a, b2) { |
| 2733 |
var c2 = Bg(5, null, null, 0); |
| 2734 |
c2.elementType = "DELETED"; |
| 2735 |
c2.stateNode = b2; |
| 2736 |
c2.return = a; |
| 2737 |
b2 = a.deletions; |
| 2738 |
null === b2 ? (a.deletions = [c2], a.flags |= 16) : b2.push(c2); |
| 2739 |
} |
| 2740 |
function Cg(a, b2) { |
| 2741 |
switch (a.tag) { |
| 2742 |
case 5: |
| 2743 |
var c2 = a.type; |
| 2744 |
b2 = 1 !== b2.nodeType || c2.toLowerCase() !== b2.nodeName.toLowerCase() ? null : b2; |
| 2745 |
return null !== b2 ? (a.stateNode = b2, xg = a, yg = Lf(b2.firstChild), true) : false; |
| 2746 |
case 6: |
| 2747 |
return b2 = "" === a.pendingProps || 3 !== b2.nodeType ? null : b2, null !== b2 ? (a.stateNode = b2, xg = a, yg = null, true) : false; |
| 2748 |
case 13: |
| 2749 |
return b2 = 8 !== b2.nodeType ? null : b2, null !== b2 ? (c2 = null !== qg ? { id: rg, overflow: sg } : null, a.memoizedState = { dehydrated: b2, treeContext: c2, retryLane: 1073741824 }, c2 = Bg(18, null, null, 0), c2.stateNode = b2, c2.return = a, a.child = c2, xg = a, yg = null, true) : false; |
| 2750 |
default: |
| 2751 |
return false; |
| 2752 |
} |
| 2753 |
} |
| 2754 |
function Dg(a) { |
| 2755 |
return 0 !== (a.mode & 1) && 0 === (a.flags & 128); |
| 2756 |
} |
| 2757 |
function Eg(a) { |
| 2758 |
if (I) { |
| 2759 |
var b2 = yg; |
| 2760 |
if (b2) { |
| 2761 |
var c2 = b2; |
| 2762 |
if (!Cg(a, b2)) { |
| 2763 |
if (Dg(a)) throw Error(p$1(418)); |
| 2764 |
b2 = Lf(c2.nextSibling); |
| 2765 |
var d2 = xg; |
| 2766 |
b2 && Cg(a, b2) ? Ag(d2, c2) : (a.flags = a.flags & -4097 | 2, I = false, xg = a); |
| 2767 |
} |
| 2768 |
} else { |
| 2769 |
if (Dg(a)) throw Error(p$1(418)); |
| 2770 |
a.flags = a.flags & -4097 | 2; |
| 2771 |
I = false; |
| 2772 |
xg = a; |
| 2773 |
} |
| 2774 |
} |
| 2775 |
} |
| 2776 |
function Fg(a) { |
| 2777 |
for (a = a.return; null !== a && 5 !== a.tag && 3 !== a.tag && 13 !== a.tag; ) a = a.return; |
| 2778 |
xg = a; |
| 2779 |
} |
| 2780 |
function Gg(a) { |
| 2781 |
if (a !== xg) return false; |
| 2782 |
if (!I) return Fg(a), I = true, false; |
| 2783 |
var b2; |
| 2784 |
(b2 = 3 !== a.tag) && !(b2 = 5 !== a.tag) && (b2 = a.type, b2 = "head" !== b2 && "body" !== b2 && !Ef(a.type, a.memoizedProps)); |
| 2785 |
if (b2 && (b2 = yg)) { |
| 2786 |
if (Dg(a)) throw Hg(), Error(p$1(418)); |
| 2787 |
for (; b2; ) Ag(a, b2), b2 = Lf(b2.nextSibling); |
| 2788 |
} |
| 2789 |
Fg(a); |
| 2790 |
if (13 === a.tag) { |
| 2791 |
a = a.memoizedState; |
| 2792 |
a = null !== a ? a.dehydrated : null; |
| 2793 |
if (!a) throw Error(p$1(317)); |
| 2794 |
a: { |
| 2795 |
a = a.nextSibling; |
| 2796 |
for (b2 = 0; a; ) { |
| 2797 |
if (8 === a.nodeType) { |
| 2798 |
var c2 = a.data; |
| 2799 |
if ("/$" === c2) { |
| 2800 |
if (0 === b2) { |
| 2801 |
yg = Lf(a.nextSibling); |
| 2802 |
break a; |
| 2803 |
} |
| 2804 |
b2--; |
| 2805 |
} else "$" !== c2 && "$!" !== c2 && "$?" !== c2 || b2++; |
| 2806 |
} |
| 2807 |
a = a.nextSibling; |
| 2808 |
} |
| 2809 |
yg = null; |
| 2810 |
} |
| 2811 |
} else yg = xg ? Lf(a.stateNode.nextSibling) : null; |
| 2812 |
return true; |
| 2813 |
} |
| 2814 |
function Hg() { |
| 2815 |
for (var a = yg; a; ) a = Lf(a.nextSibling); |
| 2816 |
} |
| 2817 |
function Ig() { |
| 2818 |
yg = xg = null; |
| 2819 |
I = false; |
| 2820 |
} |
| 2821 |
function Jg(a) { |
| 2822 |
null === zg ? zg = [a] : zg.push(a); |
| 2823 |
} |
| 2824 |
var Kg = ua.ReactCurrentBatchConfig; |
| 2825 |
function Lg(a, b2, c2) { |
| 2826 |
a = c2.ref; |
| 2827 |
if (null !== a && "function" !== typeof a && "object" !== typeof a) { |
| 2828 |
if (c2._owner) { |
| 2829 |
c2 = c2._owner; |
| 2830 |
if (c2) { |
| 2831 |
if (1 !== c2.tag) throw Error(p$1(309)); |
| 2832 |
var d2 = c2.stateNode; |
| 2833 |
} |
| 2834 |
if (!d2) throw Error(p$1(147, a)); |
| 2835 |
var e2 = d2, f2 = "" + a; |
| 2836 |
if (null !== b2 && null !== b2.ref && "function" === typeof b2.ref && b2.ref._stringRef === f2) return b2.ref; |
| 2837 |
b2 = function(a2) { |
| 2838 |
var b3 = e2.refs; |
| 2839 |
null === a2 ? delete b3[f2] : b3[f2] = a2; |
| 2840 |
}; |
| 2841 |
b2._stringRef = f2; |
| 2842 |
return b2; |
| 2843 |
} |
| 2844 |
if ("string" !== typeof a) throw Error(p$1(284)); |
| 2845 |
if (!c2._owner) throw Error(p$1(290, a)); |
| 2846 |
} |
| 2847 |
return a; |
| 2848 |
} |
| 2849 |
function Mg(a, b2) { |
| 2850 |
a = Object.prototype.toString.call(b2); |
| 2851 |
throw Error(p$1(31, "[object Object]" === a ? "object with keys {" + Object.keys(b2).join(", ") + "}" : a)); |
| 2852 |
} |
| 2853 |
function Ng(a) { |
| 2854 |
var b2 = a._init; |
| 2855 |
return b2(a._payload); |
| 2856 |
} |
| 2857 |
function Og(a) { |
| 2858 |
function b2(b3, c3) { |
| 2859 |
if (a) { |
| 2860 |
var d3 = b3.deletions; |
| 2861 |
null === d3 ? (b3.deletions = [c3], b3.flags |= 16) : d3.push(c3); |
| 2862 |
} |
| 2863 |
} |
| 2864 |
function c2(c3, d3) { |
| 2865 |
if (!a) return null; |
| 2866 |
for (; null !== d3; ) b2(c3, d3), d3 = d3.sibling; |
| 2867 |
return null; |
| 2868 |
} |
| 2869 |
function d2(a2, b3) { |
| 2870 |
for (a2 = /* @__PURE__ */ new Map(); null !== b3; ) null !== b3.key ? a2.set(b3.key, b3) : a2.set(b3.index, b3), b3 = b3.sibling; |
| 2871 |
return a2; |
| 2872 |
} |
| 2873 |
function e2(a2, b3) { |
| 2874 |
a2 = Pg(a2, b3); |
| 2875 |
a2.index = 0; |
| 2876 |
a2.sibling = null; |
| 2877 |
return a2; |
| 2878 |
} |
| 2879 |
function f2(b3, c3, d3) { |
| 2880 |
b3.index = d3; |
| 2881 |
if (!a) return b3.flags |= 1048576, c3; |
| 2882 |
d3 = b3.alternate; |
| 2883 |
if (null !== d3) return d3 = d3.index, d3 < c3 ? (b3.flags |= 2, c3) : d3; |
| 2884 |
b3.flags |= 2; |
| 2885 |
return c3; |
| 2886 |
} |
| 2887 |
function g2(b3) { |
| 2888 |
a && null === b3.alternate && (b3.flags |= 2); |
| 2889 |
return b3; |
| 2890 |
} |
| 2891 |
function h2(a2, b3, c3, d3) { |
| 2892 |
if (null === b3 || 6 !== b3.tag) return b3 = Qg(c3, a2.mode, d3), b3.return = a2, b3; |
| 2893 |
b3 = e2(b3, c3); |
| 2894 |
b3.return = a2; |
| 2895 |
return b3; |
| 2896 |
} |
| 2897 |
function k2(a2, b3, c3, d3) { |
| 2898 |
var f3 = c3.type; |
| 2899 |
if (f3 === ya) return m2(a2, b3, c3.props.children, d3, c3.key); |
| 2900 |
if (null !== b3 && (b3.elementType === f3 || "object" === typeof f3 && null !== f3 && f3.$$typeof === Ha && Ng(f3) === b3.type)) return d3 = e2(b3, c3.props), d3.ref = Lg(a2, b3, c3), d3.return = a2, d3; |
| 2901 |
d3 = Rg(c3.type, c3.key, c3.props, null, a2.mode, d3); |
| 2902 |
d3.ref = Lg(a2, b3, c3); |
| 2903 |
d3.return = a2; |
| 2904 |
return d3; |
| 2905 |
} |
| 2906 |
function l2(a2, b3, c3, d3) { |
| 2907 |
if (null === b3 || 4 !== b3.tag || b3.stateNode.containerInfo !== c3.containerInfo || b3.stateNode.implementation !== c3.implementation) return b3 = Sg(c3, a2.mode, d3), b3.return = a2, b3; |
| 2908 |
b3 = e2(b3, c3.children || []); |
| 2909 |
b3.return = a2; |
| 2910 |
return b3; |
| 2911 |
} |
| 2912 |
function m2(a2, b3, c3, d3, f3) { |
| 2913 |
if (null === b3 || 7 !== b3.tag) return b3 = Tg(c3, a2.mode, d3, f3), b3.return = a2, b3; |
| 2914 |
b3 = e2(b3, c3); |
| 2915 |
b3.return = a2; |
| 2916 |
return b3; |
| 2917 |
} |
| 2918 |
function q2(a2, b3, c3) { |
| 2919 |
if ("string" === typeof b3 && "" !== b3 || "number" === typeof b3) return b3 = Qg("" + b3, a2.mode, c3), b3.return = a2, b3; |
| 2920 |
if ("object" === typeof b3 && null !== b3) { |
| 2921 |
switch (b3.$$typeof) { |
| 2922 |
case va: |
| 2923 |
return c3 = Rg(b3.type, b3.key, b3.props, null, a2.mode, c3), c3.ref = Lg(a2, null, b3), c3.return = a2, c3; |
| 2924 |
case wa: |
| 2925 |
return b3 = Sg(b3, a2.mode, c3), b3.return = a2, b3; |
| 2926 |
case Ha: |
| 2927 |
var d3 = b3._init; |
| 2928 |
return q2(a2, d3(b3._payload), c3); |
| 2929 |
} |
| 2930 |
if (eb(b3) || Ka(b3)) return b3 = Tg(b3, a2.mode, c3, null), b3.return = a2, b3; |
| 2931 |
Mg(a2, b3); |
| 2932 |
} |
| 2933 |
return null; |
| 2934 |
} |
| 2935 |
function r2(a2, b3, c3, d3) { |
| 2936 |
var e3 = null !== b3 ? b3.key : null; |
| 2937 |
if ("string" === typeof c3 && "" !== c3 || "number" === typeof c3) return null !== e3 ? null : h2(a2, b3, "" + c3, d3); |
| 2938 |
if ("object" === typeof c3 && null !== c3) { |
| 2939 |
switch (c3.$$typeof) { |
| 2940 |
case va: |
| 2941 |
return c3.key === e3 ? k2(a2, b3, c3, d3) : null; |
| 2942 |
case wa: |
| 2943 |
return c3.key === e3 ? l2(a2, b3, c3, d3) : null; |
| 2944 |
case Ha: |
| 2945 |
return e3 = c3._init, r2( |
| 2946 |
a2, |
| 2947 |
b3, |
| 2948 |
e3(c3._payload), |
| 2949 |
d3 |
| 2950 |
); |
| 2951 |
} |
| 2952 |
if (eb(c3) || Ka(c3)) return null !== e3 ? null : m2(a2, b3, c3, d3, null); |
| 2953 |
Mg(a2, c3); |
| 2954 |
} |
| 2955 |
return null; |
| 2956 |
} |
| 2957 |
function y2(a2, b3, c3, d3, e3) { |
| 2958 |
if ("string" === typeof d3 && "" !== d3 || "number" === typeof d3) return a2 = a2.get(c3) || null, h2(b3, a2, "" + d3, e3); |
| 2959 |
if ("object" === typeof d3 && null !== d3) { |
| 2960 |
switch (d3.$$typeof) { |
| 2961 |
case va: |
| 2962 |
return a2 = a2.get(null === d3.key ? c3 : d3.key) || null, k2(b3, a2, d3, e3); |
| 2963 |
case wa: |
| 2964 |
return a2 = a2.get(null === d3.key ? c3 : d3.key) || null, l2(b3, a2, d3, e3); |
| 2965 |
case Ha: |
| 2966 |
var f3 = d3._init; |
| 2967 |
return y2(a2, b3, c3, f3(d3._payload), e3); |
| 2968 |
} |
| 2969 |
if (eb(d3) || Ka(d3)) return a2 = a2.get(c3) || null, m2(b3, a2, d3, e3, null); |
| 2970 |
Mg(b3, d3); |
| 2971 |
} |
| 2972 |
return null; |
| 2973 |
} |
| 2974 |
function n2(e3, g3, h3, k3) { |
| 2975 |
for (var l3 = null, m3 = null, u2 = g3, w2 = g3 = 0, x2 = null; null !== u2 && w2 < h3.length; w2++) { |
| 2976 |
u2.index > w2 ? (x2 = u2, u2 = null) : x2 = u2.sibling; |
| 2977 |
var n3 = r2(e3, u2, h3[w2], k3); |
| 2978 |
if (null === n3) { |
| 2979 |
null === u2 && (u2 = x2); |
| 2980 |
break; |
| 2981 |
} |
| 2982 |
a && u2 && null === n3.alternate && b2(e3, u2); |
| 2983 |
g3 = f2(n3, g3, w2); |
| 2984 |
null === m3 ? l3 = n3 : m3.sibling = n3; |
| 2985 |
m3 = n3; |
| 2986 |
u2 = x2; |
| 2987 |
} |
| 2988 |
if (w2 === h3.length) return c2(e3, u2), I && tg(e3, w2), l3; |
| 2989 |
if (null === u2) { |
| 2990 |
for (; w2 < h3.length; w2++) u2 = q2(e3, h3[w2], k3), null !== u2 && (g3 = f2(u2, g3, w2), null === m3 ? l3 = u2 : m3.sibling = u2, m3 = u2); |
| 2991 |
I && tg(e3, w2); |
| 2992 |
return l3; |
| 2993 |
} |
| 2994 |
for (u2 = d2(e3, u2); w2 < h3.length; w2++) x2 = y2(u2, e3, w2, h3[w2], k3), null !== x2 && (a && null !== x2.alternate && u2.delete(null === x2.key ? w2 : x2.key), g3 = f2(x2, g3, w2), null === m3 ? l3 = x2 : m3.sibling = x2, m3 = x2); |
| 2995 |
a && u2.forEach(function(a2) { |
| 2996 |
return b2(e3, a2); |
| 2997 |
}); |
| 2998 |
I && tg(e3, w2); |
| 2999 |
return l3; |
| 3000 |
} |
| 3001 |
function t2(e3, g3, h3, k3) { |
| 3002 |
var l3 = Ka(h3); |
| 3003 |
if ("function" !== typeof l3) throw Error(p$1(150)); |
| 3004 |
h3 = l3.call(h3); |
| 3005 |
if (null == h3) throw Error(p$1(151)); |
| 3006 |
for (var u2 = l3 = null, m3 = g3, w2 = g3 = 0, x2 = null, n3 = h3.next(); null !== m3 && !n3.done; w2++, n3 = h3.next()) { |
| 3007 |
m3.index > w2 ? (x2 = m3, m3 = null) : x2 = m3.sibling; |
| 3008 |
var t3 = r2(e3, m3, n3.value, k3); |
| 3009 |
if (null === t3) { |
| 3010 |
null === m3 && (m3 = x2); |
| 3011 |
break; |
| 3012 |
} |
| 3013 |
a && m3 && null === t3.alternate && b2(e3, m3); |
| 3014 |
g3 = f2(t3, g3, w2); |
| 3015 |
null === u2 ? l3 = t3 : u2.sibling = t3; |
| 3016 |
u2 = t3; |
| 3017 |
m3 = x2; |
| 3018 |
} |
| 3019 |
if (n3.done) return c2( |
| 3020 |
e3, |
| 3021 |
m3 |
| 3022 |
), I && tg(e3, w2), l3; |
| 3023 |
if (null === m3) { |
| 3024 |
for (; !n3.done; w2++, n3 = h3.next()) n3 = q2(e3, n3.value, k3), null !== n3 && (g3 = f2(n3, g3, w2), null === u2 ? l3 = n3 : u2.sibling = n3, u2 = n3); |
| 3025 |
I && tg(e3, w2); |
| 3026 |
return l3; |
| 3027 |
} |
| 3028 |
for (m3 = d2(e3, m3); !n3.done; w2++, n3 = h3.next()) n3 = y2(m3, e3, w2, n3.value, k3), null !== n3 && (a && null !== n3.alternate && m3.delete(null === n3.key ? w2 : n3.key), g3 = f2(n3, g3, w2), null === u2 ? l3 = n3 : u2.sibling = n3, u2 = n3); |
| 3029 |
a && m3.forEach(function(a2) { |
| 3030 |
return b2(e3, a2); |
| 3031 |
}); |
| 3032 |
I && tg(e3, w2); |
| 3033 |
return l3; |
| 3034 |
} |
| 3035 |
function J2(a2, d3, f3, h3) { |
| 3036 |
"object" === typeof f3 && null !== f3 && f3.type === ya && null === f3.key && (f3 = f3.props.children); |
| 3037 |
if ("object" === typeof f3 && null !== f3) { |
| 3038 |
switch (f3.$$typeof) { |
| 3039 |
case va: |
| 3040 |
a: { |
| 3041 |
for (var k3 = f3.key, l3 = d3; null !== l3; ) { |
| 3042 |
if (l3.key === k3) { |
| 3043 |
k3 = f3.type; |
| 3044 |
if (k3 === ya) { |
| 3045 |
if (7 === l3.tag) { |
| 3046 |
c2(a2, l3.sibling); |
| 3047 |
d3 = e2(l3, f3.props.children); |
| 3048 |
d3.return = a2; |
| 3049 |
a2 = d3; |
| 3050 |
break a; |
| 3051 |
} |
| 3052 |
} else if (l3.elementType === k3 || "object" === typeof k3 && null !== k3 && k3.$$typeof === Ha && Ng(k3) === l3.type) { |
| 3053 |
c2(a2, l3.sibling); |
| 3054 |
d3 = e2(l3, f3.props); |
| 3055 |
d3.ref = Lg(a2, l3, f3); |
| 3056 |
d3.return = a2; |
| 3057 |
a2 = d3; |
| 3058 |
break a; |
| 3059 |
} |
| 3060 |
c2(a2, l3); |
| 3061 |
break; |
| 3062 |
} else b2(a2, l3); |
| 3063 |
l3 = l3.sibling; |
| 3064 |
} |
| 3065 |
f3.type === ya ? (d3 = Tg(f3.props.children, a2.mode, h3, f3.key), d3.return = a2, a2 = d3) : (h3 = Rg(f3.type, f3.key, f3.props, null, a2.mode, h3), h3.ref = Lg(a2, d3, f3), h3.return = a2, a2 = h3); |
| 3066 |
} |
| 3067 |
return g2(a2); |
| 3068 |
case wa: |
| 3069 |
a: { |
| 3070 |
for (l3 = f3.key; null !== d3; ) { |
| 3071 |
if (d3.key === l3) if (4 === d3.tag && d3.stateNode.containerInfo === f3.containerInfo && d3.stateNode.implementation === f3.implementation) { |
| 3072 |
c2(a2, d3.sibling); |
| 3073 |
d3 = e2(d3, f3.children || []); |
| 3074 |
d3.return = a2; |
| 3075 |
a2 = d3; |
| 3076 |
break a; |
| 3077 |
} else { |
| 3078 |
c2(a2, d3); |
| 3079 |
break; |
| 3080 |
} |
| 3081 |
else b2(a2, d3); |
| 3082 |
d3 = d3.sibling; |
| 3083 |
} |
| 3084 |
d3 = Sg(f3, a2.mode, h3); |
| 3085 |
d3.return = a2; |
| 3086 |
a2 = d3; |
| 3087 |
} |
| 3088 |
return g2(a2); |
| 3089 |
case Ha: |
| 3090 |
return l3 = f3._init, J2(a2, d3, l3(f3._payload), h3); |
| 3091 |
} |
| 3092 |
if (eb(f3)) return n2(a2, d3, f3, h3); |
| 3093 |
if (Ka(f3)) return t2(a2, d3, f3, h3); |
| 3094 |
Mg(a2, f3); |
| 3095 |
} |
| 3096 |
return "string" === typeof f3 && "" !== f3 || "number" === typeof f3 ? (f3 = "" + f3, null !== d3 && 6 === d3.tag ? (c2(a2, d3.sibling), d3 = e2(d3, f3), d3.return = a2, a2 = d3) : (c2(a2, d3), d3 = Qg(f3, a2.mode, h3), d3.return = a2, a2 = d3), g2(a2)) : c2(a2, d3); |
| 3097 |
} |
| 3098 |
return J2; |
| 3099 |
} |
| 3100 |
var Ug = Og(true), Vg = Og(false), Wg = Uf(null), Xg = null, Yg = null, Zg = null; |
| 3101 |
function $g() { |
| 3102 |
Zg = Yg = Xg = null; |
| 3103 |
} |
| 3104 |
function ah(a) { |
| 3105 |
var b2 = Wg.current; |
| 3106 |
E(Wg); |
| 3107 |
a._currentValue = b2; |
| 3108 |
} |
| 3109 |
function bh(a, b2, c2) { |
| 3110 |
for (; null !== a; ) { |
| 3111 |
var d2 = a.alternate; |
| 3112 |
(a.childLanes & b2) !== b2 ? (a.childLanes |= b2, null !== d2 && (d2.childLanes |= b2)) : null !== d2 && (d2.childLanes & b2) !== b2 && (d2.childLanes |= b2); |
| 3113 |
if (a === c2) break; |
| 3114 |
a = a.return; |
| 3115 |
} |
| 3116 |
} |
| 3117 |
function ch(a, b2) { |
| 3118 |
Xg = a; |
| 3119 |
Zg = Yg = null; |
| 3120 |
a = a.dependencies; |
| 3121 |
null !== a && null !== a.firstContext && (0 !== (a.lanes & b2) && (dh = true), a.firstContext = null); |
| 3122 |
} |
| 3123 |
function eh(a) { |
| 3124 |
var b2 = a._currentValue; |
| 3125 |
if (Zg !== a) if (a = { context: a, memoizedValue: b2, next: null }, null === Yg) { |
| 3126 |
if (null === Xg) throw Error(p$1(308)); |
| 3127 |
Yg = a; |
| 3128 |
Xg.dependencies = { lanes: 0, firstContext: a }; |
| 3129 |
} else Yg = Yg.next = a; |
| 3130 |
return b2; |
| 3131 |
} |
| 3132 |
var fh = null; |
| 3133 |
function gh(a) { |
| 3134 |
null === fh ? fh = [a] : fh.push(a); |
| 3135 |
} |
| 3136 |
function hh(a, b2, c2, d2) { |
| 3137 |
var e2 = b2.interleaved; |
| 3138 |
null === e2 ? (c2.next = c2, gh(b2)) : (c2.next = e2.next, e2.next = c2); |
| 3139 |
b2.interleaved = c2; |
| 3140 |
return ih(a, d2); |
| 3141 |
} |
| 3142 |
function ih(a, b2) { |
| 3143 |
a.lanes |= b2; |
| 3144 |
var c2 = a.alternate; |
| 3145 |
null !== c2 && (c2.lanes |= b2); |
| 3146 |
c2 = a; |
| 3147 |
for (a = a.return; null !== a; ) a.childLanes |= b2, c2 = a.alternate, null !== c2 && (c2.childLanes |= b2), c2 = a, a = a.return; |
| 3148 |
return 3 === c2.tag ? c2.stateNode : null; |
| 3149 |
} |
| 3150 |
var jh = false; |
| 3151 |
function kh(a) { |
| 3152 |
a.updateQueue = { baseState: a.memoizedState, firstBaseUpdate: null, lastBaseUpdate: null, shared: { pending: null, interleaved: null, lanes: 0 }, effects: null }; |
| 3153 |
} |
| 3154 |
function lh(a, b2) { |
| 3155 |
a = a.updateQueue; |
| 3156 |
b2.updateQueue === a && (b2.updateQueue = { baseState: a.baseState, firstBaseUpdate: a.firstBaseUpdate, lastBaseUpdate: a.lastBaseUpdate, shared: a.shared, effects: a.effects }); |
| 3157 |
} |
| 3158 |
function mh(a, b2) { |
| 3159 |
return { eventTime: a, lane: b2, tag: 0, payload: null, callback: null, next: null }; |
| 3160 |
} |
| 3161 |
function nh(a, b2, c2) { |
| 3162 |
var d2 = a.updateQueue; |
| 3163 |
if (null === d2) return null; |
| 3164 |
d2 = d2.shared; |
| 3165 |
if (0 !== (K & 2)) { |
| 3166 |
var e2 = d2.pending; |
| 3167 |
null === e2 ? b2.next = b2 : (b2.next = e2.next, e2.next = b2); |
| 3168 |
d2.pending = b2; |
| 3169 |
return ih(a, c2); |
| 3170 |
} |
| 3171 |
e2 = d2.interleaved; |
| 3172 |
null === e2 ? (b2.next = b2, gh(d2)) : (b2.next = e2.next, e2.next = b2); |
| 3173 |
d2.interleaved = b2; |
| 3174 |
return ih(a, c2); |
| 3175 |
} |
| 3176 |
function oh(a, b2, c2) { |
| 3177 |
b2 = b2.updateQueue; |
| 3178 |
if (null !== b2 && (b2 = b2.shared, 0 !== (c2 & 4194240))) { |
| 3179 |
var d2 = b2.lanes; |
| 3180 |
d2 &= a.pendingLanes; |
| 3181 |
c2 |= d2; |
| 3182 |
b2.lanes = c2; |
| 3183 |
Cc(a, c2); |
| 3184 |
} |
| 3185 |
} |
| 3186 |
function ph(a, b2) { |
| 3187 |
var c2 = a.updateQueue, d2 = a.alternate; |
| 3188 |
if (null !== d2 && (d2 = d2.updateQueue, c2 === d2)) { |
| 3189 |
var e2 = null, f2 = null; |
| 3190 |
c2 = c2.firstBaseUpdate; |
| 3191 |
if (null !== c2) { |
| 3192 |
do { |
| 3193 |
var g2 = { eventTime: c2.eventTime, lane: c2.lane, tag: c2.tag, payload: c2.payload, callback: c2.callback, next: null }; |
| 3194 |
null === f2 ? e2 = f2 = g2 : f2 = f2.next = g2; |
| 3195 |
c2 = c2.next; |
| 3196 |
} while (null !== c2); |
| 3197 |
null === f2 ? e2 = f2 = b2 : f2 = f2.next = b2; |
| 3198 |
} else e2 = f2 = b2; |
| 3199 |
c2 = { baseState: d2.baseState, firstBaseUpdate: e2, lastBaseUpdate: f2, shared: d2.shared, effects: d2.effects }; |
| 3200 |
a.updateQueue = c2; |
| 3201 |
return; |
| 3202 |
} |
| 3203 |
a = c2.lastBaseUpdate; |
| 3204 |
null === a ? c2.firstBaseUpdate = b2 : a.next = b2; |
| 3205 |
c2.lastBaseUpdate = b2; |
| 3206 |
} |
| 3207 |
function qh(a, b2, c2, d2) { |
| 3208 |
var e2 = a.updateQueue; |
| 3209 |
jh = false; |
| 3210 |
var f2 = e2.firstBaseUpdate, g2 = e2.lastBaseUpdate, h2 = e2.shared.pending; |
| 3211 |
if (null !== h2) { |
| 3212 |
e2.shared.pending = null; |
| 3213 |
var k2 = h2, l2 = k2.next; |
| 3214 |
k2.next = null; |
| 3215 |
null === g2 ? f2 = l2 : g2.next = l2; |
| 3216 |
g2 = k2; |
| 3217 |
var m2 = a.alternate; |
| 3218 |
null !== m2 && (m2 = m2.updateQueue, h2 = m2.lastBaseUpdate, h2 !== g2 && (null === h2 ? m2.firstBaseUpdate = l2 : h2.next = l2, m2.lastBaseUpdate = k2)); |
| 3219 |
} |
| 3220 |
if (null !== f2) { |
| 3221 |
var q2 = e2.baseState; |
| 3222 |
g2 = 0; |
| 3223 |
m2 = l2 = k2 = null; |
| 3224 |
h2 = f2; |
| 3225 |
do { |
| 3226 |
var r2 = h2.lane, y2 = h2.eventTime; |
| 3227 |
if ((d2 & r2) === r2) { |
| 3228 |
null !== m2 && (m2 = m2.next = { |
| 3229 |
eventTime: y2, |
| 3230 |
lane: 0, |
| 3231 |
tag: h2.tag, |
| 3232 |
payload: h2.payload, |
| 3233 |
callback: h2.callback, |
| 3234 |
next: null |
| 3235 |
}); |
| 3236 |
a: { |
| 3237 |
var n2 = a, t2 = h2; |
| 3238 |
r2 = b2; |
| 3239 |
y2 = c2; |
| 3240 |
switch (t2.tag) { |
| 3241 |
case 1: |
| 3242 |
n2 = t2.payload; |
| 3243 |
if ("function" === typeof n2) { |
| 3244 |
q2 = n2.call(y2, q2, r2); |
| 3245 |
break a; |
| 3246 |
} |
| 3247 |
q2 = n2; |
| 3248 |
break a; |
| 3249 |
case 3: |
| 3250 |
n2.flags = n2.flags & -65537 | 128; |
| 3251 |
case 0: |
| 3252 |
n2 = t2.payload; |
| 3253 |
r2 = "function" === typeof n2 ? n2.call(y2, q2, r2) : n2; |
| 3254 |
if (null === r2 || void 0 === r2) break a; |
| 3255 |
q2 = A({}, q2, r2); |
| 3256 |
break a; |
| 3257 |
case 2: |
| 3258 |
jh = true; |
| 3259 |
} |
| 3260 |
} |
| 3261 |
null !== h2.callback && 0 !== h2.lane && (a.flags |= 64, r2 = e2.effects, null === r2 ? e2.effects = [h2] : r2.push(h2)); |
| 3262 |
} else y2 = { eventTime: y2, lane: r2, tag: h2.tag, payload: h2.payload, callback: h2.callback, next: null }, null === m2 ? (l2 = m2 = y2, k2 = q2) : m2 = m2.next = y2, g2 |= r2; |
| 3263 |
h2 = h2.next; |
| 3264 |
if (null === h2) if (h2 = e2.shared.pending, null === h2) break; |
| 3265 |
else r2 = h2, h2 = r2.next, r2.next = null, e2.lastBaseUpdate = r2, e2.shared.pending = null; |
| 3266 |
} while (1); |
| 3267 |
null === m2 && (k2 = q2); |
| 3268 |
e2.baseState = k2; |
| 3269 |
e2.firstBaseUpdate = l2; |
| 3270 |
e2.lastBaseUpdate = m2; |
| 3271 |
b2 = e2.shared.interleaved; |
| 3272 |
if (null !== b2) { |
| 3273 |
e2 = b2; |
| 3274 |
do |
| 3275 |
g2 |= e2.lane, e2 = e2.next; |
| 3276 |
while (e2 !== b2); |
| 3277 |
} else null === f2 && (e2.shared.lanes = 0); |
| 3278 |
rh |= g2; |
| 3279 |
a.lanes = g2; |
| 3280 |
a.memoizedState = q2; |
| 3281 |
} |
| 3282 |
} |
| 3283 |
function sh(a, b2, c2) { |
| 3284 |
a = b2.effects; |
| 3285 |
b2.effects = null; |
| 3286 |
if (null !== a) for (b2 = 0; b2 < a.length; b2++) { |
| 3287 |
var d2 = a[b2], e2 = d2.callback; |
| 3288 |
if (null !== e2) { |
| 3289 |
d2.callback = null; |
| 3290 |
d2 = c2; |
| 3291 |
if ("function" !== typeof e2) throw Error(p$1(191, e2)); |
| 3292 |
e2.call(d2); |
| 3293 |
} |
| 3294 |
} |
| 3295 |
} |
| 3296 |
var th = {}, uh = Uf(th), vh = Uf(th), wh = Uf(th); |
| 3297 |
function xh(a) { |
| 3298 |
if (a === th) throw Error(p$1(174)); |
| 3299 |
return a; |
| 3300 |
} |
| 3301 |
function yh(a, b2) { |
| 3302 |
G(wh, b2); |
| 3303 |
G(vh, a); |
| 3304 |
G(uh, th); |
| 3305 |
a = b2.nodeType; |
| 3306 |
switch (a) { |
| 3307 |
case 9: |
| 3308 |
case 11: |
| 3309 |
b2 = (b2 = b2.documentElement) ? b2.namespaceURI : lb(null, ""); |
| 3310 |
break; |
| 3311 |
default: |
| 3312 |
a = 8 === a ? b2.parentNode : b2, b2 = a.namespaceURI || null, a = a.tagName, b2 = lb(b2, a); |
| 3313 |
} |
| 3314 |
E(uh); |
| 3315 |
G(uh, b2); |
| 3316 |
} |
| 3317 |
function zh() { |
| 3318 |
E(uh); |
| 3319 |
E(vh); |
| 3320 |
E(wh); |
| 3321 |
} |
| 3322 |
function Ah(a) { |
| 3323 |
xh(wh.current); |
| 3324 |
var b2 = xh(uh.current); |
| 3325 |
var c2 = lb(b2, a.type); |
| 3326 |
b2 !== c2 && (G(vh, a), G(uh, c2)); |
| 3327 |
} |
| 3328 |
function Bh(a) { |
| 3329 |
vh.current === a && (E(uh), E(vh)); |
| 3330 |
} |
| 3331 |
var L = Uf(0); |
| 3332 |
function Ch(a) { |
| 3333 |
for (var b2 = a; null !== b2; ) { |
| 3334 |
if (13 === b2.tag) { |
| 3335 |
var c2 = b2.memoizedState; |
| 3336 |
if (null !== c2 && (c2 = c2.dehydrated, null === c2 || "$?" === c2.data || "$!" === c2.data)) return b2; |
| 3337 |
} else if (19 === b2.tag && void 0 !== b2.memoizedProps.revealOrder) { |
| 3338 |
if (0 !== (b2.flags & 128)) return b2; |
| 3339 |
} else if (null !== b2.child) { |
| 3340 |
b2.child.return = b2; |
| 3341 |
b2 = b2.child; |
| 3342 |
continue; |
| 3343 |
} |
| 3344 |
if (b2 === a) break; |
| 3345 |
for (; null === b2.sibling; ) { |
| 3346 |
if (null === b2.return || b2.return === a) return null; |
| 3347 |
b2 = b2.return; |
| 3348 |
} |
| 3349 |
b2.sibling.return = b2.return; |
| 3350 |
b2 = b2.sibling; |
| 3351 |
} |
| 3352 |
return null; |
| 3353 |
} |
| 3354 |
var Dh = []; |
| 3355 |
function Eh() { |
| 3356 |
for (var a = 0; a < Dh.length; a++) Dh[a]._workInProgressVersionPrimary = null; |
| 3357 |
Dh.length = 0; |
| 3358 |
} |
| 3359 |
var Fh = ua.ReactCurrentDispatcher, Gh = ua.ReactCurrentBatchConfig, Hh = 0, M = null, N = null, O = null, Ih = false, Jh = false, Kh = 0, Lh = 0; |
| 3360 |
function P() { |
| 3361 |
throw Error(p$1(321)); |
| 3362 |
} |
| 3363 |
function Mh(a, b2) { |
| 3364 |
if (null === b2) return false; |
| 3365 |
for (var c2 = 0; c2 < b2.length && c2 < a.length; c2++) if (!He(a[c2], b2[c2])) return false; |
| 3366 |
return true; |
| 3367 |
} |
| 3368 |
function Nh(a, b2, c2, d2, e2, f2) { |
| 3369 |
Hh = f2; |
| 3370 |
M = b2; |
| 3371 |
b2.memoizedState = null; |
| 3372 |
b2.updateQueue = null; |
| 3373 |
b2.lanes = 0; |
| 3374 |
Fh.current = null === a || null === a.memoizedState ? Oh : Ph; |
| 3375 |
a = c2(d2, e2); |
| 3376 |
if (Jh) { |
| 3377 |
f2 = 0; |
| 3378 |
do { |
| 3379 |
Jh = false; |
| 3380 |
Kh = 0; |
| 3381 |
if (25 <= f2) throw Error(p$1(301)); |
| 3382 |
f2 += 1; |
| 3383 |
O = N = null; |
| 3384 |
b2.updateQueue = null; |
| 3385 |
Fh.current = Qh; |
| 3386 |
a = c2(d2, e2); |
| 3387 |
} while (Jh); |
| 3388 |
} |
| 3389 |
Fh.current = Rh; |
| 3390 |
b2 = null !== N && null !== N.next; |
| 3391 |
Hh = 0; |
| 3392 |
O = N = M = null; |
| 3393 |
Ih = false; |
| 3394 |
if (b2) throw Error(p$1(300)); |
| 3395 |
return a; |
| 3396 |
} |
| 3397 |
function Sh() { |
| 3398 |
var a = 0 !== Kh; |
| 3399 |
Kh = 0; |
| 3400 |
return a; |
| 3401 |
} |
| 3402 |
function Th() { |
| 3403 |
var a = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null }; |
| 3404 |
null === O ? M.memoizedState = O = a : O = O.next = a; |
| 3405 |
return O; |
| 3406 |
} |
| 3407 |
function Uh() { |
| 3408 |
if (null === N) { |
| 3409 |
var a = M.alternate; |
| 3410 |
a = null !== a ? a.memoizedState : null; |
| 3411 |
} else a = N.next; |
| 3412 |
var b2 = null === O ? M.memoizedState : O.next; |
| 3413 |
if (null !== b2) O = b2, N = a; |
| 3414 |
else { |
| 3415 |
if (null === a) throw Error(p$1(310)); |
| 3416 |
N = a; |
| 3417 |
a = { memoizedState: N.memoizedState, baseState: N.baseState, baseQueue: N.baseQueue, queue: N.queue, next: null }; |
| 3418 |
null === O ? M.memoizedState = O = a : O = O.next = a; |
| 3419 |
} |
| 3420 |
return O; |
| 3421 |
} |
| 3422 |
function Vh(a, b2) { |
| 3423 |
return "function" === typeof b2 ? b2(a) : b2; |
| 3424 |
} |
| 3425 |
function Wh(a) { |
| 3426 |
var b2 = Uh(), c2 = b2.queue; |
| 3427 |
if (null === c2) throw Error(p$1(311)); |
| 3428 |
c2.lastRenderedReducer = a; |
| 3429 |
var d2 = N, e2 = d2.baseQueue, f2 = c2.pending; |
| 3430 |
if (null !== f2) { |
| 3431 |
if (null !== e2) { |
| 3432 |
var g2 = e2.next; |
| 3433 |
e2.next = f2.next; |
| 3434 |
f2.next = g2; |
| 3435 |
} |
| 3436 |
d2.baseQueue = e2 = f2; |
| 3437 |
c2.pending = null; |
| 3438 |
} |
| 3439 |
if (null !== e2) { |
| 3440 |
f2 = e2.next; |
| 3441 |
d2 = d2.baseState; |
| 3442 |
var h2 = g2 = null, k2 = null, l2 = f2; |
| 3443 |
do { |
| 3444 |
var m2 = l2.lane; |
| 3445 |
if ((Hh & m2) === m2) null !== k2 && (k2 = k2.next = { lane: 0, action: l2.action, hasEagerState: l2.hasEagerState, eagerState: l2.eagerState, next: null }), d2 = l2.hasEagerState ? l2.eagerState : a(d2, l2.action); |
| 3446 |
else { |
| 3447 |
var q2 = { |
| 3448 |
lane: m2, |
| 3449 |
action: l2.action, |
| 3450 |
hasEagerState: l2.hasEagerState, |
| 3451 |
eagerState: l2.eagerState, |
| 3452 |
next: null |
| 3453 |
}; |
| 3454 |
null === k2 ? (h2 = k2 = q2, g2 = d2) : k2 = k2.next = q2; |
| 3455 |
M.lanes |= m2; |
| 3456 |
rh |= m2; |
| 3457 |
} |
| 3458 |
l2 = l2.next; |
| 3459 |
} while (null !== l2 && l2 !== f2); |
| 3460 |
null === k2 ? g2 = d2 : k2.next = h2; |
| 3461 |
He(d2, b2.memoizedState) || (dh = true); |
| 3462 |
b2.memoizedState = d2; |
| 3463 |
b2.baseState = g2; |
| 3464 |
b2.baseQueue = k2; |
| 3465 |
c2.lastRenderedState = d2; |
| 3466 |
} |
| 3467 |
a = c2.interleaved; |
| 3468 |
if (null !== a) { |
| 3469 |
e2 = a; |
| 3470 |
do |
| 3471 |
f2 = e2.lane, M.lanes |= f2, rh |= f2, e2 = e2.next; |
| 3472 |
while (e2 !== a); |
| 3473 |
} else null === e2 && (c2.lanes = 0); |
| 3474 |
return [b2.memoizedState, c2.dispatch]; |
| 3475 |
} |
| 3476 |
function Xh(a) { |
| 3477 |
var b2 = Uh(), c2 = b2.queue; |
| 3478 |
if (null === c2) throw Error(p$1(311)); |
| 3479 |
c2.lastRenderedReducer = a; |
| 3480 |
var d2 = c2.dispatch, e2 = c2.pending, f2 = b2.memoizedState; |
| 3481 |
if (null !== e2) { |
| 3482 |
c2.pending = null; |
| 3483 |
var g2 = e2 = e2.next; |
| 3484 |
do |
| 3485 |
f2 = a(f2, g2.action), g2 = g2.next; |
| 3486 |
while (g2 !== e2); |
| 3487 |
He(f2, b2.memoizedState) || (dh = true); |
| 3488 |
b2.memoizedState = f2; |
| 3489 |
null === b2.baseQueue && (b2.baseState = f2); |
| 3490 |
c2.lastRenderedState = f2; |
| 3491 |
} |
| 3492 |
return [f2, d2]; |
| 3493 |
} |
| 3494 |
function Yh() { |
| 3495 |
} |
| 3496 |
function Zh(a, b2) { |
| 3497 |
var c2 = M, d2 = Uh(), e2 = b2(), f2 = !He(d2.memoizedState, e2); |
| 3498 |
f2 && (d2.memoizedState = e2, dh = true); |
| 3499 |
d2 = d2.queue; |
| 3500 |
$h(ai.bind(null, c2, d2, a), [a]); |
| 3501 |
if (d2.getSnapshot !== b2 || f2 || null !== O && O.memoizedState.tag & 1) { |
| 3502 |
c2.flags |= 2048; |
| 3503 |
bi(9, ci.bind(null, c2, d2, e2, b2), void 0, null); |
| 3504 |
if (null === Q) throw Error(p$1(349)); |
| 3505 |
0 !== (Hh & 30) || di(c2, b2, e2); |
| 3506 |
} |
| 3507 |
return e2; |
| 3508 |
} |
| 3509 |
function di(a, b2, c2) { |
| 3510 |
a.flags |= 16384; |
| 3511 |
a = { getSnapshot: b2, value: c2 }; |
| 3512 |
b2 = M.updateQueue; |
| 3513 |
null === b2 ? (b2 = { lastEffect: null, stores: null }, M.updateQueue = b2, b2.stores = [a]) : (c2 = b2.stores, null === c2 ? b2.stores = [a] : c2.push(a)); |
| 3514 |
} |
| 3515 |
function ci(a, b2, c2, d2) { |
| 3516 |
b2.value = c2; |
| 3517 |
b2.getSnapshot = d2; |
| 3518 |
ei(b2) && fi(a); |
| 3519 |
} |
| 3520 |
function ai(a, b2, c2) { |
| 3521 |
return c2(function() { |
| 3522 |
ei(b2) && fi(a); |
| 3523 |
}); |
| 3524 |
} |
| 3525 |
function ei(a) { |
| 3526 |
var b2 = a.getSnapshot; |
| 3527 |
a = a.value; |
| 3528 |
try { |
| 3529 |
var c2 = b2(); |
| 3530 |
return !He(a, c2); |
| 3531 |
} catch (d2) { |
| 3532 |
return true; |
| 3533 |
} |
| 3534 |
} |
| 3535 |
function fi(a) { |
| 3536 |
var b2 = ih(a, 1); |
| 3537 |
null !== b2 && gi(b2, a, 1, -1); |
| 3538 |
} |
| 3539 |
function hi(a) { |
| 3540 |
var b2 = Th(); |
| 3541 |
"function" === typeof a && (a = a()); |
| 3542 |
b2.memoizedState = b2.baseState = a; |
| 3543 |
a = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: Vh, lastRenderedState: a }; |
| 3544 |
b2.queue = a; |
| 3545 |
a = a.dispatch = ii.bind(null, M, a); |
| 3546 |
return [b2.memoizedState, a]; |
| 3547 |
} |
| 3548 |
function bi(a, b2, c2, d2) { |
| 3549 |
a = { tag: a, create: b2, destroy: c2, deps: d2, next: null }; |
| 3550 |
b2 = M.updateQueue; |
| 3551 |
null === b2 ? (b2 = { lastEffect: null, stores: null }, M.updateQueue = b2, b2.lastEffect = a.next = a) : (c2 = b2.lastEffect, null === c2 ? b2.lastEffect = a.next = a : (d2 = c2.next, c2.next = a, a.next = d2, b2.lastEffect = a)); |
| 3552 |
return a; |
| 3553 |
} |
| 3554 |
function ji() { |
| 3555 |
return Uh().memoizedState; |
| 3556 |
} |
| 3557 |
function ki(a, b2, c2, d2) { |
| 3558 |
var e2 = Th(); |
| 3559 |
M.flags |= a; |
| 3560 |
e2.memoizedState = bi(1 | b2, c2, void 0, void 0 === d2 ? null : d2); |
| 3561 |
} |
| 3562 |
function li(a, b2, c2, d2) { |
| 3563 |
var e2 = Uh(); |
| 3564 |
d2 = void 0 === d2 ? null : d2; |
| 3565 |
var f2 = void 0; |
| 3566 |
if (null !== N) { |
| 3567 |
var g2 = N.memoizedState; |
| 3568 |
f2 = g2.destroy; |
| 3569 |
if (null !== d2 && Mh(d2, g2.deps)) { |
| 3570 |
e2.memoizedState = bi(b2, c2, f2, d2); |
| 3571 |
return; |
| 3572 |
} |
| 3573 |
} |
| 3574 |
M.flags |= a; |
| 3575 |
e2.memoizedState = bi(1 | b2, c2, f2, d2); |
| 3576 |
} |
| 3577 |
function mi(a, b2) { |
| 3578 |
return ki(8390656, 8, a, b2); |
| 3579 |
} |
| 3580 |
function $h(a, b2) { |
| 3581 |
return li(2048, 8, a, b2); |
| 3582 |
} |
| 3583 |
function ni(a, b2) { |
| 3584 |
return li(4, 2, a, b2); |
| 3585 |
} |
| 3586 |
function oi(a, b2) { |
| 3587 |
return li(4, 4, a, b2); |
| 3588 |
} |
| 3589 |
function pi(a, b2) { |
| 3590 |
if ("function" === typeof b2) return a = a(), b2(a), function() { |
| 3591 |
b2(null); |
| 3592 |
}; |
| 3593 |
if (null !== b2 && void 0 !== b2) return a = a(), b2.current = a, function() { |
| 3594 |
b2.current = null; |
| 3595 |
}; |
| 3596 |
} |
| 3597 |
function qi(a, b2, c2) { |
| 3598 |
c2 = null !== c2 && void 0 !== c2 ? c2.concat([a]) : null; |
| 3599 |
return li(4, 4, pi.bind(null, b2, a), c2); |
| 3600 |
} |
| 3601 |
function ri() { |
| 3602 |
} |
| 3603 |
function si(a, b2) { |
| 3604 |
var c2 = Uh(); |
| 3605 |
b2 = void 0 === b2 ? null : b2; |
| 3606 |
var d2 = c2.memoizedState; |
| 3607 |
if (null !== d2 && null !== b2 && Mh(b2, d2[1])) return d2[0]; |
| 3608 |
c2.memoizedState = [a, b2]; |
| 3609 |
return a; |
| 3610 |
} |
| 3611 |
function ti(a, b2) { |
| 3612 |
var c2 = Uh(); |
| 3613 |
b2 = void 0 === b2 ? null : b2; |
| 3614 |
var d2 = c2.memoizedState; |
| 3615 |
if (null !== d2 && null !== b2 && Mh(b2, d2[1])) return d2[0]; |
| 3616 |
a = a(); |
| 3617 |
c2.memoizedState = [a, b2]; |
| 3618 |
return a; |
| 3619 |
} |
| 3620 |
function ui(a, b2, c2) { |
| 3621 |
if (0 === (Hh & 21)) return a.baseState && (a.baseState = false, dh = true), a.memoizedState = c2; |
| 3622 |
He(c2, b2) || (c2 = yc(), M.lanes |= c2, rh |= c2, a.baseState = true); |
| 3623 |
return b2; |
| 3624 |
} |
| 3625 |
function vi(a, b2) { |
| 3626 |
var c2 = C; |
| 3627 |
C = 0 !== c2 && 4 > c2 ? c2 : 4; |
| 3628 |
a(true); |
| 3629 |
var d2 = Gh.transition; |
| 3630 |
Gh.transition = {}; |
| 3631 |
try { |
| 3632 |
a(false), b2(); |
| 3633 |
} finally { |
| 3634 |
C = c2, Gh.transition = d2; |
| 3635 |
} |
| 3636 |
} |
| 3637 |
function wi() { |
| 3638 |
return Uh().memoizedState; |
| 3639 |
} |
| 3640 |
function xi(a, b2, c2) { |
| 3641 |
var d2 = yi(a); |
| 3642 |
c2 = { lane: d2, action: c2, hasEagerState: false, eagerState: null, next: null }; |
| 3643 |
if (zi(a)) Ai(b2, c2); |
| 3644 |
else if (c2 = hh(a, b2, c2, d2), null !== c2) { |
| 3645 |
var e2 = R(); |
| 3646 |
gi(c2, a, d2, e2); |
| 3647 |
Bi(c2, b2, d2); |
| 3648 |
} |
| 3649 |
} |
| 3650 |
function ii(a, b2, c2) { |
| 3651 |
var d2 = yi(a), e2 = { lane: d2, action: c2, hasEagerState: false, eagerState: null, next: null }; |
| 3652 |
if (zi(a)) Ai(b2, e2); |
| 3653 |
else { |
| 3654 |
var f2 = a.alternate; |
| 3655 |
if (0 === a.lanes && (null === f2 || 0 === f2.lanes) && (f2 = b2.lastRenderedReducer, null !== f2)) try { |
| 3656 |
var g2 = b2.lastRenderedState, h2 = f2(g2, c2); |
| 3657 |
e2.hasEagerState = true; |
| 3658 |
e2.eagerState = h2; |
| 3659 |
if (He(h2, g2)) { |
| 3660 |
var k2 = b2.interleaved; |
| 3661 |
null === k2 ? (e2.next = e2, gh(b2)) : (e2.next = k2.next, k2.next = e2); |
| 3662 |
b2.interleaved = e2; |
| 3663 |
return; |
| 3664 |
} |
| 3665 |
} catch (l2) { |
| 3666 |
} finally { |
| 3667 |
} |
| 3668 |
c2 = hh(a, b2, e2, d2); |
| 3669 |
null !== c2 && (e2 = R(), gi(c2, a, d2, e2), Bi(c2, b2, d2)); |
| 3670 |
} |
| 3671 |
} |
| 3672 |
function zi(a) { |
| 3673 |
var b2 = a.alternate; |
| 3674 |
return a === M || null !== b2 && b2 === M; |
| 3675 |
} |
| 3676 |
function Ai(a, b2) { |
| 3677 |
Jh = Ih = true; |
| 3678 |
var c2 = a.pending; |
| 3679 |
null === c2 ? b2.next = b2 : (b2.next = c2.next, c2.next = b2); |
| 3680 |
a.pending = b2; |
| 3681 |
} |
| 3682 |
function Bi(a, b2, c2) { |
| 3683 |
if (0 !== (c2 & 4194240)) { |
| 3684 |
var d2 = b2.lanes; |
| 3685 |
d2 &= a.pendingLanes; |
| 3686 |
c2 |= d2; |
| 3687 |
b2.lanes = c2; |
| 3688 |
Cc(a, c2); |
| 3689 |
} |
| 3690 |
} |
| 3691 |
var Rh = { readContext: eh, useCallback: P, useContext: P, useEffect: P, useImperativeHandle: P, useInsertionEffect: P, useLayoutEffect: P, useMemo: P, useReducer: P, useRef: P, useState: P, useDebugValue: P, useDeferredValue: P, useTransition: P, useMutableSource: P, useSyncExternalStore: P, useId: P, unstable_isNewReconciler: false }, Oh = { readContext: eh, useCallback: function(a, b2) { |
| 3692 |
Th().memoizedState = [a, void 0 === b2 ? null : b2]; |
| 3693 |
return a; |
| 3694 |
}, useContext: eh, useEffect: mi, useImperativeHandle: function(a, b2, c2) { |
| 3695 |
c2 = null !== c2 && void 0 !== c2 ? c2.concat([a]) : null; |
| 3696 |
return ki( |
| 3697 |
4194308, |
| 3698 |
4, |
| 3699 |
pi.bind(null, b2, a), |
| 3700 |
c2 |
| 3701 |
); |
| 3702 |
}, useLayoutEffect: function(a, b2) { |
| 3703 |
return ki(4194308, 4, a, b2); |
| 3704 |
}, useInsertionEffect: function(a, b2) { |
| 3705 |
return ki(4, 2, a, b2); |
| 3706 |
}, useMemo: function(a, b2) { |
| 3707 |
var c2 = Th(); |
| 3708 |
b2 = void 0 === b2 ? null : b2; |
| 3709 |
a = a(); |
| 3710 |
c2.memoizedState = [a, b2]; |
| 3711 |
return a; |
| 3712 |
}, useReducer: function(a, b2, c2) { |
| 3713 |
var d2 = Th(); |
| 3714 |
b2 = void 0 !== c2 ? c2(b2) : b2; |
| 3715 |
d2.memoizedState = d2.baseState = b2; |
| 3716 |
a = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: a, lastRenderedState: b2 }; |
| 3717 |
d2.queue = a; |
| 3718 |
a = a.dispatch = xi.bind(null, M, a); |
| 3719 |
return [d2.memoizedState, a]; |
| 3720 |
}, useRef: function(a) { |
| 3721 |
var b2 = Th(); |
| 3722 |
a = { current: a }; |
| 3723 |
return b2.memoizedState = a; |
| 3724 |
}, useState: hi, useDebugValue: ri, useDeferredValue: function(a) { |
| 3725 |
return Th().memoizedState = a; |
| 3726 |
}, useTransition: function() { |
| 3727 |
var a = hi(false), b2 = a[0]; |
| 3728 |
a = vi.bind(null, a[1]); |
| 3729 |
Th().memoizedState = a; |
| 3730 |
return [b2, a]; |
| 3731 |
}, useMutableSource: function() { |
| 3732 |
}, useSyncExternalStore: function(a, b2, c2) { |
| 3733 |
var d2 = M, e2 = Th(); |
| 3734 |
if (I) { |
| 3735 |
if (void 0 === c2) throw Error(p$1(407)); |
| 3736 |
c2 = c2(); |
| 3737 |
} else { |
| 3738 |
c2 = b2(); |
| 3739 |
if (null === Q) throw Error(p$1(349)); |
| 3740 |
0 !== (Hh & 30) || di(d2, b2, c2); |
| 3741 |
} |
| 3742 |
e2.memoizedState = c2; |
| 3743 |
var f2 = { value: c2, getSnapshot: b2 }; |
| 3744 |
e2.queue = f2; |
| 3745 |
mi(ai.bind( |
| 3746 |
null, |
| 3747 |
d2, |
| 3748 |
f2, |
| 3749 |
a |
| 3750 |
), [a]); |
| 3751 |
d2.flags |= 2048; |
| 3752 |
bi(9, ci.bind(null, d2, f2, c2, b2), void 0, null); |
| 3753 |
return c2; |
| 3754 |
}, useId: function() { |
| 3755 |
var a = Th(), b2 = Q.identifierPrefix; |
| 3756 |
if (I) { |
| 3757 |
var c2 = sg; |
| 3758 |
var d2 = rg; |
| 3759 |
c2 = (d2 & ~(1 << 32 - oc(d2) - 1)).toString(32) + c2; |
| 3760 |
b2 = ":" + b2 + "R" + c2; |
| 3761 |
c2 = Kh++; |
| 3762 |
0 < c2 && (b2 += "H" + c2.toString(32)); |
| 3763 |
b2 += ":"; |
| 3764 |
} else c2 = Lh++, b2 = ":" + b2 + "r" + c2.toString(32) + ":"; |
| 3765 |
return a.memoizedState = b2; |
| 3766 |
}, unstable_isNewReconciler: false }, Ph = { |
| 3767 |
readContext: eh, |
| 3768 |
useCallback: si, |
| 3769 |
useContext: eh, |
| 3770 |
useEffect: $h, |
| 3771 |
useImperativeHandle: qi, |
| 3772 |
useInsertionEffect: ni, |
| 3773 |
useLayoutEffect: oi, |
| 3774 |
useMemo: ti, |
| 3775 |
useReducer: Wh, |
| 3776 |
useRef: ji, |
| 3777 |
useState: function() { |
| 3778 |
return Wh(Vh); |
| 3779 |
}, |
| 3780 |
useDebugValue: ri, |
| 3781 |
useDeferredValue: function(a) { |
| 3782 |
var b2 = Uh(); |
| 3783 |
return ui(b2, N.memoizedState, a); |
| 3784 |
}, |
| 3785 |
useTransition: function() { |
| 3786 |
var a = Wh(Vh)[0], b2 = Uh().memoizedState; |
| 3787 |
return [a, b2]; |
| 3788 |
}, |
| 3789 |
useMutableSource: Yh, |
| 3790 |
useSyncExternalStore: Zh, |
| 3791 |
useId: wi, |
| 3792 |
unstable_isNewReconciler: false |
| 3793 |
}, Qh = { readContext: eh, useCallback: si, useContext: eh, useEffect: $h, useImperativeHandle: qi, useInsertionEffect: ni, useLayoutEffect: oi, useMemo: ti, useReducer: Xh, useRef: ji, useState: function() { |
| 3794 |
return Xh(Vh); |
| 3795 |
}, useDebugValue: ri, useDeferredValue: function(a) { |
| 3796 |
var b2 = Uh(); |
| 3797 |
return null === N ? b2.memoizedState = a : ui(b2, N.memoizedState, a); |
| 3798 |
}, useTransition: function() { |
| 3799 |
var a = Xh(Vh)[0], b2 = Uh().memoizedState; |
| 3800 |
return [a, b2]; |
| 3801 |
}, useMutableSource: Yh, useSyncExternalStore: Zh, useId: wi, unstable_isNewReconciler: false }; |
| 3802 |
function Ci(a, b2) { |
| 3803 |
if (a && a.defaultProps) { |
| 3804 |
b2 = A({}, b2); |
| 3805 |
a = a.defaultProps; |
| 3806 |
for (var c2 in a) void 0 === b2[c2] && (b2[c2] = a[c2]); |
| 3807 |
return b2; |
| 3808 |
} |
| 3809 |
return b2; |
| 3810 |
} |
| 3811 |
function Di(a, b2, c2, d2) { |
| 3812 |
b2 = a.memoizedState; |
| 3813 |
c2 = c2(d2, b2); |
| 3814 |
c2 = null === c2 || void 0 === c2 ? b2 : A({}, b2, c2); |
| 3815 |
a.memoizedState = c2; |
| 3816 |
0 === a.lanes && (a.updateQueue.baseState = c2); |
| 3817 |
} |
| 3818 |
var Ei = { isMounted: function(a) { |
| 3819 |
return (a = a._reactInternals) ? Vb(a) === a : false; |
| 3820 |
}, enqueueSetState: function(a, b2, c2) { |
| 3821 |
a = a._reactInternals; |
| 3822 |
var d2 = R(), e2 = yi(a), f2 = mh(d2, e2); |
| 3823 |
f2.payload = b2; |
| 3824 |
void 0 !== c2 && null !== c2 && (f2.callback = c2); |
| 3825 |
b2 = nh(a, f2, e2); |
| 3826 |
null !== b2 && (gi(b2, a, e2, d2), oh(b2, a, e2)); |
| 3827 |
}, enqueueReplaceState: function(a, b2, c2) { |
| 3828 |
a = a._reactInternals; |
| 3829 |
var d2 = R(), e2 = yi(a), f2 = mh(d2, e2); |
| 3830 |
f2.tag = 1; |
| 3831 |
f2.payload = b2; |
| 3832 |
void 0 !== c2 && null !== c2 && (f2.callback = c2); |
| 3833 |
b2 = nh(a, f2, e2); |
| 3834 |
null !== b2 && (gi(b2, a, e2, d2), oh(b2, a, e2)); |
| 3835 |
}, enqueueForceUpdate: function(a, b2) { |
| 3836 |
a = a._reactInternals; |
| 3837 |
var c2 = R(), d2 = yi(a), e2 = mh(c2, d2); |
| 3838 |
e2.tag = 2; |
| 3839 |
void 0 !== b2 && null !== b2 && (e2.callback = b2); |
| 3840 |
b2 = nh(a, e2, d2); |
| 3841 |
null !== b2 && (gi(b2, a, d2, c2), oh(b2, a, d2)); |
| 3842 |
} }; |
| 3843 |
function Fi(a, b2, c2, d2, e2, f2, g2) { |
| 3844 |
a = a.stateNode; |
| 3845 |
return "function" === typeof a.shouldComponentUpdate ? a.shouldComponentUpdate(d2, f2, g2) : b2.prototype && b2.prototype.isPureReactComponent ? !Ie(c2, d2) || !Ie(e2, f2) : true; |
| 3846 |
} |
| 3847 |
function Gi(a, b2, c2) { |
| 3848 |
var d2 = false, e2 = Vf; |
| 3849 |
var f2 = b2.contextType; |
| 3850 |
"object" === typeof f2 && null !== f2 ? f2 = eh(f2) : (e2 = Zf(b2) ? Xf : H.current, d2 = b2.contextTypes, f2 = (d2 = null !== d2 && void 0 !== d2) ? Yf(a, e2) : Vf); |
| 3851 |
b2 = new b2(c2, f2); |
| 3852 |
a.memoizedState = null !== b2.state && void 0 !== b2.state ? b2.state : null; |
| 3853 |
b2.updater = Ei; |
| 3854 |
a.stateNode = b2; |
| 3855 |
b2._reactInternals = a; |
| 3856 |
d2 && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = e2, a.__reactInternalMemoizedMaskedChildContext = f2); |
| 3857 |
return b2; |
| 3858 |
} |
| 3859 |
function Hi(a, b2, c2, d2) { |
| 3860 |
a = b2.state; |
| 3861 |
"function" === typeof b2.componentWillReceiveProps && b2.componentWillReceiveProps(c2, d2); |
| 3862 |
"function" === typeof b2.UNSAFE_componentWillReceiveProps && b2.UNSAFE_componentWillReceiveProps(c2, d2); |
| 3863 |
b2.state !== a && Ei.enqueueReplaceState(b2, b2.state, null); |
| 3864 |
} |
| 3865 |
function Ii(a, b2, c2, d2) { |
| 3866 |
var e2 = a.stateNode; |
| 3867 |
e2.props = c2; |
| 3868 |
e2.state = a.memoizedState; |
| 3869 |
e2.refs = {}; |
| 3870 |
kh(a); |
| 3871 |
var f2 = b2.contextType; |
| 3872 |
"object" === typeof f2 && null !== f2 ? e2.context = eh(f2) : (f2 = Zf(b2) ? Xf : H.current, e2.context = Yf(a, f2)); |
| 3873 |
e2.state = a.memoizedState; |
| 3874 |
f2 = b2.getDerivedStateFromProps; |
| 3875 |
"function" === typeof f2 && (Di(a, b2, f2, c2), e2.state = a.memoizedState); |
| 3876 |
"function" === typeof b2.getDerivedStateFromProps || "function" === typeof e2.getSnapshotBeforeUpdate || "function" !== typeof e2.UNSAFE_componentWillMount && "function" !== typeof e2.componentWillMount || (b2 = e2.state, "function" === typeof e2.componentWillMount && e2.componentWillMount(), "function" === typeof e2.UNSAFE_componentWillMount && e2.UNSAFE_componentWillMount(), b2 !== e2.state && Ei.enqueueReplaceState(e2, e2.state, null), qh(a, c2, e2, d2), e2.state = a.memoizedState); |
| 3877 |
"function" === typeof e2.componentDidMount && (a.flags |= 4194308); |
| 3878 |
} |
| 3879 |
function Ji(a, b2) { |
| 3880 |
try { |
| 3881 |
var c2 = "", d2 = b2; |
| 3882 |
do |
| 3883 |
c2 += Pa(d2), d2 = d2.return; |
| 3884 |
while (d2); |
| 3885 |
var e2 = c2; |
| 3886 |
} catch (f2) { |
| 3887 |
e2 = "\nError generating stack: " + f2.message + "\n" + f2.stack; |
| 3888 |
} |
| 3889 |
return { value: a, source: b2, stack: e2, digest: null }; |
| 3890 |
} |
| 3891 |
function Ki(a, b2, c2) { |
| 3892 |
return { value: a, source: null, stack: null != c2 ? c2 : null, digest: null != b2 ? b2 : null }; |
| 3893 |
} |
| 3894 |
function Li(a, b2) { |
| 3895 |
try { |
| 3896 |
console.error(b2.value); |
| 3897 |
} catch (c2) { |
| 3898 |
setTimeout(function() { |
| 3899 |
throw c2; |
| 3900 |
}); |
| 3901 |
} |
| 3902 |
} |
| 3903 |
var Mi = "function" === typeof WeakMap ? WeakMap : Map; |
| 3904 |
function Ni(a, b2, c2) { |
| 3905 |
c2 = mh(-1, c2); |
| 3906 |
c2.tag = 3; |
| 3907 |
c2.payload = { element: null }; |
| 3908 |
var d2 = b2.value; |
| 3909 |
c2.callback = function() { |
| 3910 |
Oi || (Oi = true, Pi = d2); |
| 3911 |
Li(a, b2); |
| 3912 |
}; |
| 3913 |
return c2; |
| 3914 |
} |
| 3915 |
function Qi(a, b2, c2) { |
| 3916 |
c2 = mh(-1, c2); |
| 3917 |
c2.tag = 3; |
| 3918 |
var d2 = a.type.getDerivedStateFromError; |
| 3919 |
if ("function" === typeof d2) { |
| 3920 |
var e2 = b2.value; |
| 3921 |
c2.payload = function() { |
| 3922 |
return d2(e2); |
| 3923 |
}; |
| 3924 |
c2.callback = function() { |
| 3925 |
Li(a, b2); |
| 3926 |
}; |
| 3927 |
} |
| 3928 |
var f2 = a.stateNode; |
| 3929 |
null !== f2 && "function" === typeof f2.componentDidCatch && (c2.callback = function() { |
| 3930 |
Li(a, b2); |
| 3931 |
"function" !== typeof d2 && (null === Ri ? Ri = /* @__PURE__ */ new Set([this]) : Ri.add(this)); |
| 3932 |
var c3 = b2.stack; |
| 3933 |
this.componentDidCatch(b2.value, { componentStack: null !== c3 ? c3 : "" }); |
| 3934 |
}); |
| 3935 |
return c2; |
| 3936 |
} |
| 3937 |
function Si(a, b2, c2) { |
| 3938 |
var d2 = a.pingCache; |
| 3939 |
if (null === d2) { |
| 3940 |
d2 = a.pingCache = new Mi(); |
| 3941 |
var e2 = /* @__PURE__ */ new Set(); |
| 3942 |
d2.set(b2, e2); |
| 3943 |
} else e2 = d2.get(b2), void 0 === e2 && (e2 = /* @__PURE__ */ new Set(), d2.set(b2, e2)); |
| 3944 |
e2.has(c2) || (e2.add(c2), a = Ti.bind(null, a, b2, c2), b2.then(a, a)); |
| 3945 |
} |
| 3946 |
function Ui(a) { |
| 3947 |
do { |
| 3948 |
var b2; |
| 3949 |
if (b2 = 13 === a.tag) b2 = a.memoizedState, b2 = null !== b2 ? null !== b2.dehydrated ? true : false : true; |
| 3950 |
if (b2) return a; |
| 3951 |
a = a.return; |
| 3952 |
} while (null !== a); |
| 3953 |
return null; |
| 3954 |
} |
| 3955 |
function Vi(a, b2, c2, d2, e2) { |
| 3956 |
if (0 === (a.mode & 1)) return a === b2 ? a.flags |= 65536 : (a.flags |= 128, c2.flags |= 131072, c2.flags &= -52805, 1 === c2.tag && (null === c2.alternate ? c2.tag = 17 : (b2 = mh(-1, 1), b2.tag = 2, nh(c2, b2, 1))), c2.lanes |= 1), a; |
| 3957 |
a.flags |= 65536; |
| 3958 |
a.lanes = e2; |
| 3959 |
return a; |
| 3960 |
} |
| 3961 |
var Wi = ua.ReactCurrentOwner, dh = false; |
| 3962 |
function Xi(a, b2, c2, d2) { |
| 3963 |
b2.child = null === a ? Vg(b2, null, c2, d2) : Ug(b2, a.child, c2, d2); |
| 3964 |
} |
| 3965 |
function Yi(a, b2, c2, d2, e2) { |
| 3966 |
c2 = c2.render; |
| 3967 |
var f2 = b2.ref; |
| 3968 |
ch(b2, e2); |
| 3969 |
d2 = Nh(a, b2, c2, d2, f2, e2); |
| 3970 |
c2 = Sh(); |
| 3971 |
if (null !== a && !dh) return b2.updateQueue = a.updateQueue, b2.flags &= -2053, a.lanes &= ~e2, Zi(a, b2, e2); |
| 3972 |
I && c2 && vg(b2); |
| 3973 |
b2.flags |= 1; |
| 3974 |
Xi(a, b2, d2, e2); |
| 3975 |
return b2.child; |
| 3976 |
} |
| 3977 |
function $i(a, b2, c2, d2, e2) { |
| 3978 |
if (null === a) { |
| 3979 |
var f2 = c2.type; |
| 3980 |
if ("function" === typeof f2 && !aj(f2) && void 0 === f2.defaultProps && null === c2.compare && void 0 === c2.defaultProps) return b2.tag = 15, b2.type = f2, bj(a, b2, f2, d2, e2); |
| 3981 |
a = Rg(c2.type, null, d2, b2, b2.mode, e2); |
| 3982 |
a.ref = b2.ref; |
| 3983 |
a.return = b2; |
| 3984 |
return b2.child = a; |
| 3985 |
} |
| 3986 |
f2 = a.child; |
| 3987 |
if (0 === (a.lanes & e2)) { |
| 3988 |
var g2 = f2.memoizedProps; |
| 3989 |
c2 = c2.compare; |
| 3990 |
c2 = null !== c2 ? c2 : Ie; |
| 3991 |
if (c2(g2, d2) && a.ref === b2.ref) return Zi(a, b2, e2); |
| 3992 |
} |
| 3993 |
b2.flags |= 1; |
| 3994 |
a = Pg(f2, d2); |
| 3995 |
a.ref = b2.ref; |
| 3996 |
a.return = b2; |
| 3997 |
return b2.child = a; |
| 3998 |
} |
| 3999 |
function bj(a, b2, c2, d2, e2) { |
| 4000 |
if (null !== a) { |
| 4001 |
var f2 = a.memoizedProps; |
| 4002 |
if (Ie(f2, d2) && a.ref === b2.ref) if (dh = false, b2.pendingProps = d2 = f2, 0 !== (a.lanes & e2)) 0 !== (a.flags & 131072) && (dh = true); |
| 4003 |
else return b2.lanes = a.lanes, Zi(a, b2, e2); |
| 4004 |
} |
| 4005 |
return cj(a, b2, c2, d2, e2); |
| 4006 |
} |
| 4007 |
function dj(a, b2, c2) { |
| 4008 |
var d2 = b2.pendingProps, e2 = d2.children, f2 = null !== a ? a.memoizedState : null; |
| 4009 |
if ("hidden" === d2.mode) if (0 === (b2.mode & 1)) b2.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, G(ej, fj), fj |= c2; |
| 4010 |
else { |
| 4011 |
if (0 === (c2 & 1073741824)) return a = null !== f2 ? f2.baseLanes | c2 : c2, b2.lanes = b2.childLanes = 1073741824, b2.memoizedState = { baseLanes: a, cachePool: null, transitions: null }, b2.updateQueue = null, G(ej, fj), fj |= a, null; |
| 4012 |
b2.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }; |
| 4013 |
d2 = null !== f2 ? f2.baseLanes : c2; |
| 4014 |
G(ej, fj); |
| 4015 |
fj |= d2; |
| 4016 |
} |
| 4017 |
else null !== f2 ? (d2 = f2.baseLanes | c2, b2.memoizedState = null) : d2 = c2, G(ej, fj), fj |= d2; |
| 4018 |
Xi(a, b2, e2, c2); |
| 4019 |
return b2.child; |
| 4020 |
} |
| 4021 |
function gj(a, b2) { |
| 4022 |
var c2 = b2.ref; |
| 4023 |
if (null === a && null !== c2 || null !== a && a.ref !== c2) b2.flags |= 512, b2.flags |= 2097152; |
| 4024 |
} |
| 4025 |
function cj(a, b2, c2, d2, e2) { |
| 4026 |
var f2 = Zf(c2) ? Xf : H.current; |
| 4027 |
f2 = Yf(b2, f2); |
| 4028 |
ch(b2, e2); |
| 4029 |
c2 = Nh(a, b2, c2, d2, f2, e2); |
| 4030 |
d2 = Sh(); |
| 4031 |
if (null !== a && !dh) return b2.updateQueue = a.updateQueue, b2.flags &= -2053, a.lanes &= ~e2, Zi(a, b2, e2); |
| 4032 |
I && d2 && vg(b2); |
| 4033 |
b2.flags |= 1; |
| 4034 |
Xi(a, b2, c2, e2); |
| 4035 |
return b2.child; |
| 4036 |
} |
| 4037 |
function hj(a, b2, c2, d2, e2) { |
| 4038 |
if (Zf(c2)) { |
| 4039 |
var f2 = true; |
| 4040 |
cg(b2); |
| 4041 |
} else f2 = false; |
| 4042 |
ch(b2, e2); |
| 4043 |
if (null === b2.stateNode) ij(a, b2), Gi(b2, c2, d2), Ii(b2, c2, d2, e2), d2 = true; |
| 4044 |
else if (null === a) { |
| 4045 |
var g2 = b2.stateNode, h2 = b2.memoizedProps; |
| 4046 |
g2.props = h2; |
| 4047 |
var k2 = g2.context, l2 = c2.contextType; |
| 4048 |
"object" === typeof l2 && null !== l2 ? l2 = eh(l2) : (l2 = Zf(c2) ? Xf : H.current, l2 = Yf(b2, l2)); |
| 4049 |
var m2 = c2.getDerivedStateFromProps, q2 = "function" === typeof m2 || "function" === typeof g2.getSnapshotBeforeUpdate; |
| 4050 |
q2 || "function" !== typeof g2.UNSAFE_componentWillReceiveProps && "function" !== typeof g2.componentWillReceiveProps || (h2 !== d2 || k2 !== l2) && Hi(b2, g2, d2, l2); |
| 4051 |
jh = false; |
| 4052 |
var r2 = b2.memoizedState; |
| 4053 |
g2.state = r2; |
| 4054 |
qh(b2, d2, g2, e2); |
| 4055 |
k2 = b2.memoizedState; |
| 4056 |
h2 !== d2 || r2 !== k2 || Wf.current || jh ? ("function" === typeof m2 && (Di(b2, c2, m2, d2), k2 = b2.memoizedState), (h2 = jh || Fi(b2, c2, h2, d2, r2, k2, l2)) ? (q2 || "function" !== typeof g2.UNSAFE_componentWillMount && "function" !== typeof g2.componentWillMount || ("function" === typeof g2.componentWillMount && g2.componentWillMount(), "function" === typeof g2.UNSAFE_componentWillMount && g2.UNSAFE_componentWillMount()), "function" === typeof g2.componentDidMount && (b2.flags |= 4194308)) : ("function" === typeof g2.componentDidMount && (b2.flags |= 4194308), b2.memoizedProps = d2, b2.memoizedState = k2), g2.props = d2, g2.state = k2, g2.context = l2, d2 = h2) : ("function" === typeof g2.componentDidMount && (b2.flags |= 4194308), d2 = false); |
| 4057 |
} else { |
| 4058 |
g2 = b2.stateNode; |
| 4059 |
lh(a, b2); |
| 4060 |
h2 = b2.memoizedProps; |
| 4061 |
l2 = b2.type === b2.elementType ? h2 : Ci(b2.type, h2); |
| 4062 |
g2.props = l2; |
| 4063 |
q2 = b2.pendingProps; |
| 4064 |
r2 = g2.context; |
| 4065 |
k2 = c2.contextType; |
| 4066 |
"object" === typeof k2 && null !== k2 ? k2 = eh(k2) : (k2 = Zf(c2) ? Xf : H.current, k2 = Yf(b2, k2)); |
| 4067 |
var y2 = c2.getDerivedStateFromProps; |
| 4068 |
(m2 = "function" === typeof y2 || "function" === typeof g2.getSnapshotBeforeUpdate) || "function" !== typeof g2.UNSAFE_componentWillReceiveProps && "function" !== typeof g2.componentWillReceiveProps || (h2 !== q2 || r2 !== k2) && Hi(b2, g2, d2, k2); |
| 4069 |
jh = false; |
| 4070 |
r2 = b2.memoizedState; |
| 4071 |
g2.state = r2; |
| 4072 |
qh(b2, d2, g2, e2); |
| 4073 |
var n2 = b2.memoizedState; |
| 4074 |
h2 !== q2 || r2 !== n2 || Wf.current || jh ? ("function" === typeof y2 && (Di(b2, c2, y2, d2), n2 = b2.memoizedState), (l2 = jh || Fi(b2, c2, l2, d2, r2, n2, k2) || false) ? (m2 || "function" !== typeof g2.UNSAFE_componentWillUpdate && "function" !== typeof g2.componentWillUpdate || ("function" === typeof g2.componentWillUpdate && g2.componentWillUpdate(d2, n2, k2), "function" === typeof g2.UNSAFE_componentWillUpdate && g2.UNSAFE_componentWillUpdate(d2, n2, k2)), "function" === typeof g2.componentDidUpdate && (b2.flags |= 4), "function" === typeof g2.getSnapshotBeforeUpdate && (b2.flags |= 1024)) : ("function" !== typeof g2.componentDidUpdate || h2 === a.memoizedProps && r2 === a.memoizedState || (b2.flags |= 4), "function" !== typeof g2.getSnapshotBeforeUpdate || h2 === a.memoizedProps && r2 === a.memoizedState || (b2.flags |= 1024), b2.memoizedProps = d2, b2.memoizedState = n2), g2.props = d2, g2.state = n2, g2.context = k2, d2 = l2) : ("function" !== typeof g2.componentDidUpdate || h2 === a.memoizedProps && r2 === a.memoizedState || (b2.flags |= 4), "function" !== typeof g2.getSnapshotBeforeUpdate || h2 === a.memoizedProps && r2 === a.memoizedState || (b2.flags |= 1024), d2 = false); |
| 4075 |
} |
| 4076 |
return jj(a, b2, c2, d2, f2, e2); |
| 4077 |
} |
| 4078 |
function jj(a, b2, c2, d2, e2, f2) { |
| 4079 |
gj(a, b2); |
| 4080 |
var g2 = 0 !== (b2.flags & 128); |
| 4081 |
if (!d2 && !g2) return e2 && dg(b2, c2, false), Zi(a, b2, f2); |
| 4082 |
d2 = b2.stateNode; |
| 4083 |
Wi.current = b2; |
| 4084 |
var h2 = g2 && "function" !== typeof c2.getDerivedStateFromError ? null : d2.render(); |
| 4085 |
b2.flags |= 1; |
| 4086 |
null !== a && g2 ? (b2.child = Ug(b2, a.child, null, f2), b2.child = Ug(b2, null, h2, f2)) : Xi(a, b2, h2, f2); |
| 4087 |
b2.memoizedState = d2.state; |
| 4088 |
e2 && dg(b2, c2, true); |
| 4089 |
return b2.child; |
| 4090 |
} |
| 4091 |
function kj(a) { |
| 4092 |
var b2 = a.stateNode; |
| 4093 |
b2.pendingContext ? ag(a, b2.pendingContext, b2.pendingContext !== b2.context) : b2.context && ag(a, b2.context, false); |
| 4094 |
yh(a, b2.containerInfo); |
| 4095 |
} |
| 4096 |
function lj(a, b2, c2, d2, e2) { |
| 4097 |
Ig(); |
| 4098 |
Jg(e2); |
| 4099 |
b2.flags |= 256; |
| 4100 |
Xi(a, b2, c2, d2); |
| 4101 |
return b2.child; |
| 4102 |
} |
| 4103 |
var mj = { dehydrated: null, treeContext: null, retryLane: 0 }; |
| 4104 |
function nj(a) { |
| 4105 |
return { baseLanes: a, cachePool: null, transitions: null }; |
| 4106 |
} |
| 4107 |
function oj(a, b2, c2) { |
| 4108 |
var d2 = b2.pendingProps, e2 = L.current, f2 = false, g2 = 0 !== (b2.flags & 128), h2; |
| 4109 |
(h2 = g2) || (h2 = null !== a && null === a.memoizedState ? false : 0 !== (e2 & 2)); |
| 4110 |
if (h2) f2 = true, b2.flags &= -129; |
| 4111 |
else if (null === a || null !== a.memoizedState) e2 |= 1; |
| 4112 |
G(L, e2 & 1); |
| 4113 |
if (null === a) { |
| 4114 |
Eg(b2); |
| 4115 |
a = b2.memoizedState; |
| 4116 |
if (null !== a && (a = a.dehydrated, null !== a)) return 0 === (b2.mode & 1) ? b2.lanes = 1 : "$!" === a.data ? b2.lanes = 8 : b2.lanes = 1073741824, null; |
| 4117 |
g2 = d2.children; |
| 4118 |
a = d2.fallback; |
| 4119 |
return f2 ? (d2 = b2.mode, f2 = b2.child, g2 = { mode: "hidden", children: g2 }, 0 === (d2 & 1) && null !== f2 ? (f2.childLanes = 0, f2.pendingProps = g2) : f2 = pj(g2, d2, 0, null), a = Tg(a, d2, c2, null), f2.return = b2, a.return = b2, f2.sibling = a, b2.child = f2, b2.child.memoizedState = nj(c2), b2.memoizedState = mj, a) : qj(b2, g2); |
| 4120 |
} |
| 4121 |
e2 = a.memoizedState; |
| 4122 |
if (null !== e2 && (h2 = e2.dehydrated, null !== h2)) return rj(a, b2, g2, d2, h2, e2, c2); |
| 4123 |
if (f2) { |
| 4124 |
f2 = d2.fallback; |
| 4125 |
g2 = b2.mode; |
| 4126 |
e2 = a.child; |
| 4127 |
h2 = e2.sibling; |
| 4128 |
var k2 = { mode: "hidden", children: d2.children }; |
| 4129 |
0 === (g2 & 1) && b2.child !== e2 ? (d2 = b2.child, d2.childLanes = 0, d2.pendingProps = k2, b2.deletions = null) : (d2 = Pg(e2, k2), d2.subtreeFlags = e2.subtreeFlags & 14680064); |
| 4130 |
null !== h2 ? f2 = Pg(h2, f2) : (f2 = Tg(f2, g2, c2, null), f2.flags |= 2); |
| 4131 |
f2.return = b2; |
| 4132 |
d2.return = b2; |
| 4133 |
d2.sibling = f2; |
| 4134 |
b2.child = d2; |
| 4135 |
d2 = f2; |
| 4136 |
f2 = b2.child; |
| 4137 |
g2 = a.child.memoizedState; |
| 4138 |
g2 = null === g2 ? nj(c2) : { baseLanes: g2.baseLanes | c2, cachePool: null, transitions: g2.transitions }; |
| 4139 |
f2.memoizedState = g2; |
| 4140 |
f2.childLanes = a.childLanes & ~c2; |
| 4141 |
b2.memoizedState = mj; |
| 4142 |
return d2; |
| 4143 |
} |
| 4144 |
f2 = a.child; |
| 4145 |
a = f2.sibling; |
| 4146 |
d2 = Pg(f2, { mode: "visible", children: d2.children }); |
| 4147 |
0 === (b2.mode & 1) && (d2.lanes = c2); |
| 4148 |
d2.return = b2; |
| 4149 |
d2.sibling = null; |
| 4150 |
null !== a && (c2 = b2.deletions, null === c2 ? (b2.deletions = [a], b2.flags |= 16) : c2.push(a)); |
| 4151 |
b2.child = d2; |
| 4152 |
b2.memoizedState = null; |
| 4153 |
return d2; |
| 4154 |
} |
| 4155 |
function qj(a, b2) { |
| 4156 |
b2 = pj({ mode: "visible", children: b2 }, a.mode, 0, null); |
| 4157 |
b2.return = a; |
| 4158 |
return a.child = b2; |
| 4159 |
} |
| 4160 |
function sj(a, b2, c2, d2) { |
| 4161 |
null !== d2 && Jg(d2); |
| 4162 |
Ug(b2, a.child, null, c2); |
| 4163 |
a = qj(b2, b2.pendingProps.children); |
| 4164 |
a.flags |= 2; |
| 4165 |
b2.memoizedState = null; |
| 4166 |
return a; |
| 4167 |
} |
| 4168 |
function rj(a, b2, c2, d2, e2, f2, g2) { |
| 4169 |
if (c2) { |
| 4170 |
if (b2.flags & 256) return b2.flags &= -257, d2 = Ki(Error(p$1(422))), sj(a, b2, g2, d2); |
| 4171 |
if (null !== b2.memoizedState) return b2.child = a.child, b2.flags |= 128, null; |
| 4172 |
f2 = d2.fallback; |
| 4173 |
e2 = b2.mode; |
| 4174 |
d2 = pj({ mode: "visible", children: d2.children }, e2, 0, null); |
| 4175 |
f2 = Tg(f2, e2, g2, null); |
| 4176 |
f2.flags |= 2; |
| 4177 |
d2.return = b2; |
| 4178 |
f2.return = b2; |
| 4179 |
d2.sibling = f2; |
| 4180 |
b2.child = d2; |
| 4181 |
0 !== (b2.mode & 1) && Ug(b2, a.child, null, g2); |
| 4182 |
b2.child.memoizedState = nj(g2); |
| 4183 |
b2.memoizedState = mj; |
| 4184 |
return f2; |
| 4185 |
} |
| 4186 |
if (0 === (b2.mode & 1)) return sj(a, b2, g2, null); |
| 4187 |
if ("$!" === e2.data) { |
| 4188 |
d2 = e2.nextSibling && e2.nextSibling.dataset; |
| 4189 |
if (d2) var h2 = d2.dgst; |
| 4190 |
d2 = h2; |
| 4191 |
f2 = Error(p$1(419)); |
| 4192 |
d2 = Ki(f2, d2, void 0); |
| 4193 |
return sj(a, b2, g2, d2); |
| 4194 |
} |
| 4195 |
h2 = 0 !== (g2 & a.childLanes); |
| 4196 |
if (dh || h2) { |
| 4197 |
d2 = Q; |
| 4198 |
if (null !== d2) { |
| 4199 |
switch (g2 & -g2) { |
| 4200 |
case 4: |
| 4201 |
e2 = 2; |
| 4202 |
break; |
| 4203 |
case 16: |
| 4204 |
e2 = 8; |
| 4205 |
break; |
| 4206 |
case 64: |
| 4207 |
case 128: |
| 4208 |
case 256: |
| 4209 |
case 512: |
| 4210 |
case 1024: |
| 4211 |
case 2048: |
| 4212 |
case 4096: |
| 4213 |
case 8192: |
| 4214 |
case 16384: |
| 4215 |
case 32768: |
| 4216 |
case 65536: |
| 4217 |
case 131072: |
| 4218 |
case 262144: |
| 4219 |
case 524288: |
| 4220 |
case 1048576: |
| 4221 |
case 2097152: |
| 4222 |
case 4194304: |
| 4223 |
case 8388608: |
| 4224 |
case 16777216: |
| 4225 |
case 33554432: |
| 4226 |
case 67108864: |
| 4227 |
e2 = 32; |
| 4228 |
break; |
| 4229 |
case 536870912: |
| 4230 |
e2 = 268435456; |
| 4231 |
break; |
| 4232 |
default: |
| 4233 |
e2 = 0; |
| 4234 |
} |
| 4235 |
e2 = 0 !== (e2 & (d2.suspendedLanes | g2)) ? 0 : e2; |
| 4236 |
0 !== e2 && e2 !== f2.retryLane && (f2.retryLane = e2, ih(a, e2), gi(d2, a, e2, -1)); |
| 4237 |
} |
| 4238 |
tj(); |
| 4239 |
d2 = Ki(Error(p$1(421))); |
| 4240 |
return sj(a, b2, g2, d2); |
| 4241 |
} |
| 4242 |
if ("$?" === e2.data) return b2.flags |= 128, b2.child = a.child, b2 = uj.bind(null, a), e2._reactRetry = b2, null; |
| 4243 |
a = f2.treeContext; |
| 4244 |
yg = Lf(e2.nextSibling); |
| 4245 |
xg = b2; |
| 4246 |
I = true; |
| 4247 |
zg = null; |
| 4248 |
null !== a && (og[pg++] = rg, og[pg++] = sg, og[pg++] = qg, rg = a.id, sg = a.overflow, qg = b2); |
| 4249 |
b2 = qj(b2, d2.children); |
| 4250 |
b2.flags |= 4096; |
| 4251 |
return b2; |
| 4252 |
} |
| 4253 |
function vj(a, b2, c2) { |
| 4254 |
a.lanes |= b2; |
| 4255 |
var d2 = a.alternate; |
| 4256 |
null !== d2 && (d2.lanes |= b2); |
| 4257 |
bh(a.return, b2, c2); |
| 4258 |
} |
| 4259 |
function wj(a, b2, c2, d2, e2) { |
| 4260 |
var f2 = a.memoizedState; |
| 4261 |
null === f2 ? a.memoizedState = { isBackwards: b2, rendering: null, renderingStartTime: 0, last: d2, tail: c2, tailMode: e2 } : (f2.isBackwards = b2, f2.rendering = null, f2.renderingStartTime = 0, f2.last = d2, f2.tail = c2, f2.tailMode = e2); |
| 4262 |
} |
| 4263 |
function xj(a, b2, c2) { |
| 4264 |
var d2 = b2.pendingProps, e2 = d2.revealOrder, f2 = d2.tail; |
| 4265 |
Xi(a, b2, d2.children, c2); |
| 4266 |
d2 = L.current; |
| 4267 |
if (0 !== (d2 & 2)) d2 = d2 & 1 | 2, b2.flags |= 128; |
| 4268 |
else { |
| 4269 |
if (null !== a && 0 !== (a.flags & 128)) a: for (a = b2.child; null !== a; ) { |
| 4270 |
if (13 === a.tag) null !== a.memoizedState && vj(a, c2, b2); |
| 4271 |
else if (19 === a.tag) vj(a, c2, b2); |
| 4272 |
else if (null !== a.child) { |
| 4273 |
a.child.return = a; |
| 4274 |
a = a.child; |
| 4275 |
continue; |
| 4276 |
} |
| 4277 |
if (a === b2) break a; |
| 4278 |
for (; null === a.sibling; ) { |
| 4279 |
if (null === a.return || a.return === b2) break a; |
| 4280 |
a = a.return; |
| 4281 |
} |
| 4282 |
a.sibling.return = a.return; |
| 4283 |
a = a.sibling; |
| 4284 |
} |
| 4285 |
d2 &= 1; |
| 4286 |
} |
| 4287 |
G(L, d2); |
| 4288 |
if (0 === (b2.mode & 1)) b2.memoizedState = null; |
| 4289 |
else switch (e2) { |
| 4290 |
case "forwards": |
| 4291 |
c2 = b2.child; |
| 4292 |
for (e2 = null; null !== c2; ) a = c2.alternate, null !== a && null === Ch(a) && (e2 = c2), c2 = c2.sibling; |
| 4293 |
c2 = e2; |
| 4294 |
null === c2 ? (e2 = b2.child, b2.child = null) : (e2 = c2.sibling, c2.sibling = null); |
| 4295 |
wj(b2, false, e2, c2, f2); |
| 4296 |
break; |
| 4297 |
case "backwards": |
| 4298 |
c2 = null; |
| 4299 |
e2 = b2.child; |
| 4300 |
for (b2.child = null; null !== e2; ) { |
| 4301 |
a = e2.alternate; |
| 4302 |
if (null !== a && null === Ch(a)) { |
| 4303 |
b2.child = e2; |
| 4304 |
break; |
| 4305 |
} |
| 4306 |
a = e2.sibling; |
| 4307 |
e2.sibling = c2; |
| 4308 |
c2 = e2; |
| 4309 |
e2 = a; |
| 4310 |
} |
| 4311 |
wj(b2, true, c2, null, f2); |
| 4312 |
break; |
| 4313 |
case "together": |
| 4314 |
wj(b2, false, null, null, void 0); |
| 4315 |
break; |
| 4316 |
default: |
| 4317 |
b2.memoizedState = null; |
| 4318 |
} |
| 4319 |
return b2.child; |
| 4320 |
} |
| 4321 |
function ij(a, b2) { |
| 4322 |
0 === (b2.mode & 1) && null !== a && (a.alternate = null, b2.alternate = null, b2.flags |= 2); |
| 4323 |
} |
| 4324 |
function Zi(a, b2, c2) { |
| 4325 |
null !== a && (b2.dependencies = a.dependencies); |
| 4326 |
rh |= b2.lanes; |
| 4327 |
if (0 === (c2 & b2.childLanes)) return null; |
| 4328 |
if (null !== a && b2.child !== a.child) throw Error(p$1(153)); |
| 4329 |
if (null !== b2.child) { |
| 4330 |
a = b2.child; |
| 4331 |
c2 = Pg(a, a.pendingProps); |
| 4332 |
b2.child = c2; |
| 4333 |
for (c2.return = b2; null !== a.sibling; ) a = a.sibling, c2 = c2.sibling = Pg(a, a.pendingProps), c2.return = b2; |
| 4334 |
c2.sibling = null; |
| 4335 |
} |
| 4336 |
return b2.child; |
| 4337 |
} |
| 4338 |
function yj(a, b2, c2) { |
| 4339 |
switch (b2.tag) { |
| 4340 |
case 3: |
| 4341 |
kj(b2); |
| 4342 |
Ig(); |
| 4343 |
break; |
| 4344 |
case 5: |
| 4345 |
Ah(b2); |
| 4346 |
break; |
| 4347 |
case 1: |
| 4348 |
Zf(b2.type) && cg(b2); |
| 4349 |
break; |
| 4350 |
case 4: |
| 4351 |
yh(b2, b2.stateNode.containerInfo); |
| 4352 |
break; |
| 4353 |
case 10: |
| 4354 |
var d2 = b2.type._context, e2 = b2.memoizedProps.value; |
| 4355 |
G(Wg, d2._currentValue); |
| 4356 |
d2._currentValue = e2; |
| 4357 |
break; |
| 4358 |
case 13: |
| 4359 |
d2 = b2.memoizedState; |
| 4360 |
if (null !== d2) { |
| 4361 |
if (null !== d2.dehydrated) return G(L, L.current & 1), b2.flags |= 128, null; |
| 4362 |
if (0 !== (c2 & b2.child.childLanes)) return oj(a, b2, c2); |
| 4363 |
G(L, L.current & 1); |
| 4364 |
a = Zi(a, b2, c2); |
| 4365 |
return null !== a ? a.sibling : null; |
| 4366 |
} |
| 4367 |
G(L, L.current & 1); |
| 4368 |
break; |
| 4369 |
case 19: |
| 4370 |
d2 = 0 !== (c2 & b2.childLanes); |
| 4371 |
if (0 !== (a.flags & 128)) { |
| 4372 |
if (d2) return xj(a, b2, c2); |
| 4373 |
b2.flags |= 128; |
| 4374 |
} |
| 4375 |
e2 = b2.memoizedState; |
| 4376 |
null !== e2 && (e2.rendering = null, e2.tail = null, e2.lastEffect = null); |
| 4377 |
G(L, L.current); |
| 4378 |
if (d2) break; |
| 4379 |
else return null; |
| 4380 |
case 22: |
| 4381 |
case 23: |
| 4382 |
return b2.lanes = 0, dj(a, b2, c2); |
| 4383 |
} |
| 4384 |
return Zi(a, b2, c2); |
| 4385 |
} |
| 4386 |
var zj, Aj, Bj, Cj; |
| 4387 |
zj = function(a, b2) { |
| 4388 |
for (var c2 = b2.child; null !== c2; ) { |
| 4389 |
if (5 === c2.tag || 6 === c2.tag) a.appendChild(c2.stateNode); |
| 4390 |
else if (4 !== c2.tag && null !== c2.child) { |
| 4391 |
c2.child.return = c2; |
| 4392 |
c2 = c2.child; |
| 4393 |
continue; |
| 4394 |
} |
| 4395 |
if (c2 === b2) break; |
| 4396 |
for (; null === c2.sibling; ) { |
| 4397 |
if (null === c2.return || c2.return === b2) return; |
| 4398 |
c2 = c2.return; |
| 4399 |
} |
| 4400 |
c2.sibling.return = c2.return; |
| 4401 |
c2 = c2.sibling; |
| 4402 |
} |
| 4403 |
}; |
| 4404 |
Aj = function() { |
| 4405 |
}; |
| 4406 |
Bj = function(a, b2, c2, d2) { |
| 4407 |
var e2 = a.memoizedProps; |
| 4408 |
if (e2 !== d2) { |
| 4409 |
a = b2.stateNode; |
| 4410 |
xh(uh.current); |
| 4411 |
var f2 = null; |
| 4412 |
switch (c2) { |
| 4413 |
case "input": |
| 4414 |
e2 = Ya(a, e2); |
| 4415 |
d2 = Ya(a, d2); |
| 4416 |
f2 = []; |
| 4417 |
break; |
| 4418 |
case "select": |
| 4419 |
e2 = A({}, e2, { value: void 0 }); |
| 4420 |
d2 = A({}, d2, { value: void 0 }); |
| 4421 |
f2 = []; |
| 4422 |
break; |
| 4423 |
case "textarea": |
| 4424 |
e2 = gb(a, e2); |
| 4425 |
d2 = gb(a, d2); |
| 4426 |
f2 = []; |
| 4427 |
break; |
| 4428 |
default: |
| 4429 |
"function" !== typeof e2.onClick && "function" === typeof d2.onClick && (a.onclick = Bf); |
| 4430 |
} |
| 4431 |
ub(c2, d2); |
| 4432 |
var g2; |
| 4433 |
c2 = null; |
| 4434 |
for (l2 in e2) if (!d2.hasOwnProperty(l2) && e2.hasOwnProperty(l2) && null != e2[l2]) if ("style" === l2) { |
| 4435 |
var h2 = e2[l2]; |
| 4436 |
for (g2 in h2) h2.hasOwnProperty(g2) && (c2 || (c2 = {}), c2[g2] = ""); |
| 4437 |
} else "dangerouslySetInnerHTML" !== l2 && "children" !== l2 && "suppressContentEditableWarning" !== l2 && "suppressHydrationWarning" !== l2 && "autoFocus" !== l2 && (ea.hasOwnProperty(l2) ? f2 || (f2 = []) : (f2 = f2 || []).push(l2, null)); |
| 4438 |
for (l2 in d2) { |
| 4439 |
var k2 = d2[l2]; |
| 4440 |
h2 = null != e2 ? e2[l2] : void 0; |
| 4441 |
if (d2.hasOwnProperty(l2) && k2 !== h2 && (null != k2 || null != h2)) if ("style" === l2) if (h2) { |
| 4442 |
for (g2 in h2) !h2.hasOwnProperty(g2) || k2 && k2.hasOwnProperty(g2) || (c2 || (c2 = {}), c2[g2] = ""); |
| 4443 |
for (g2 in k2) k2.hasOwnProperty(g2) && h2[g2] !== k2[g2] && (c2 || (c2 = {}), c2[g2] = k2[g2]); |
| 4444 |
} else c2 || (f2 || (f2 = []), f2.push( |
| 4445 |
l2, |
| 4446 |
c2 |
| 4447 |
)), c2 = k2; |
| 4448 |
else "dangerouslySetInnerHTML" === l2 ? (k2 = k2 ? k2.__html : void 0, h2 = h2 ? h2.__html : void 0, null != k2 && h2 !== k2 && (f2 = f2 || []).push(l2, k2)) : "children" === l2 ? "string" !== typeof k2 && "number" !== typeof k2 || (f2 = f2 || []).push(l2, "" + k2) : "suppressContentEditableWarning" !== l2 && "suppressHydrationWarning" !== l2 && (ea.hasOwnProperty(l2) ? (null != k2 && "onScroll" === l2 && D("scroll", a), f2 || h2 === k2 || (f2 = [])) : (f2 = f2 || []).push(l2, k2)); |
| 4449 |
} |
| 4450 |
c2 && (f2 = f2 || []).push("style", c2); |
| 4451 |
var l2 = f2; |
| 4452 |
if (b2.updateQueue = l2) b2.flags |= 4; |
| 4453 |
} |
| 4454 |
}; |
| 4455 |
Cj = function(a, b2, c2, d2) { |
| 4456 |
c2 !== d2 && (b2.flags |= 4); |
| 4457 |
}; |
| 4458 |
function Dj(a, b2) { |
| 4459 |
if (!I) switch (a.tailMode) { |
| 4460 |
case "hidden": |
| 4461 |
b2 = a.tail; |
| 4462 |
for (var c2 = null; null !== b2; ) null !== b2.alternate && (c2 = b2), b2 = b2.sibling; |
| 4463 |
null === c2 ? a.tail = null : c2.sibling = null; |
| 4464 |
break; |
| 4465 |
case "collapsed": |
| 4466 |
c2 = a.tail; |
| 4467 |
for (var d2 = null; null !== c2; ) null !== c2.alternate && (d2 = c2), c2 = c2.sibling; |
| 4468 |
null === d2 ? b2 || null === a.tail ? a.tail = null : a.tail.sibling = null : d2.sibling = null; |
| 4469 |
} |
| 4470 |
} |
| 4471 |
function S(a) { |
| 4472 |
var b2 = null !== a.alternate && a.alternate.child === a.child, c2 = 0, d2 = 0; |
| 4473 |
if (b2) for (var e2 = a.child; null !== e2; ) c2 |= e2.lanes | e2.childLanes, d2 |= e2.subtreeFlags & 14680064, d2 |= e2.flags & 14680064, e2.return = a, e2 = e2.sibling; |
| 4474 |
else for (e2 = a.child; null !== e2; ) c2 |= e2.lanes | e2.childLanes, d2 |= e2.subtreeFlags, d2 |= e2.flags, e2.return = a, e2 = e2.sibling; |
| 4475 |
a.subtreeFlags |= d2; |
| 4476 |
a.childLanes = c2; |
| 4477 |
return b2; |
| 4478 |
} |
| 4479 |
function Ej(a, b2, c2) { |
| 4480 |
var d2 = b2.pendingProps; |
| 4481 |
wg(b2); |
| 4482 |
switch (b2.tag) { |
| 4483 |
case 2: |
| 4484 |
case 16: |
| 4485 |
case 15: |
| 4486 |
case 0: |
| 4487 |
case 11: |
| 4488 |
case 7: |
| 4489 |
case 8: |
| 4490 |
case 12: |
| 4491 |
case 9: |
| 4492 |
case 14: |
| 4493 |
return S(b2), null; |
| 4494 |
case 1: |
| 4495 |
return Zf(b2.type) && $f(), S(b2), null; |
| 4496 |
case 3: |
| 4497 |
d2 = b2.stateNode; |
| 4498 |
zh(); |
| 4499 |
E(Wf); |
| 4500 |
E(H); |
| 4501 |
Eh(); |
| 4502 |
d2.pendingContext && (d2.context = d2.pendingContext, d2.pendingContext = null); |
| 4503 |
if (null === a || null === a.child) Gg(b2) ? b2.flags |= 4 : null === a || a.memoizedState.isDehydrated && 0 === (b2.flags & 256) || (b2.flags |= 1024, null !== zg && (Fj(zg), zg = null)); |
| 4504 |
Aj(a, b2); |
| 4505 |
S(b2); |
| 4506 |
return null; |
| 4507 |
case 5: |
| 4508 |
Bh(b2); |
| 4509 |
var e2 = xh(wh.current); |
| 4510 |
c2 = b2.type; |
| 4511 |
if (null !== a && null != b2.stateNode) Bj(a, b2, c2, d2, e2), a.ref !== b2.ref && (b2.flags |= 512, b2.flags |= 2097152); |
| 4512 |
else { |
| 4513 |
if (!d2) { |
| 4514 |
if (null === b2.stateNode) throw Error(p$1(166)); |
| 4515 |
S(b2); |
| 4516 |
return null; |
| 4517 |
} |
| 4518 |
a = xh(uh.current); |
| 4519 |
if (Gg(b2)) { |
| 4520 |
d2 = b2.stateNode; |
| 4521 |
c2 = b2.type; |
| 4522 |
var f2 = b2.memoizedProps; |
| 4523 |
d2[Of] = b2; |
| 4524 |
d2[Pf] = f2; |
| 4525 |
a = 0 !== (b2.mode & 1); |
| 4526 |
switch (c2) { |
| 4527 |
case "dialog": |
| 4528 |
D("cancel", d2); |
| 4529 |
D("close", d2); |
| 4530 |
break; |
| 4531 |
case "iframe": |
| 4532 |
case "object": |
| 4533 |
case "embed": |
| 4534 |
D("load", d2); |
| 4535 |
break; |
| 4536 |
case "video": |
| 4537 |
case "audio": |
| 4538 |
for (e2 = 0; e2 < lf.length; e2++) D(lf[e2], d2); |
| 4539 |
break; |
| 4540 |
case "source": |
| 4541 |
D("error", d2); |
| 4542 |
break; |
| 4543 |
case "img": |
| 4544 |
case "image": |
| 4545 |
case "link": |
| 4546 |
D( |
| 4547 |
"error", |
| 4548 |
d2 |
| 4549 |
); |
| 4550 |
D("load", d2); |
| 4551 |
break; |
| 4552 |
case "details": |
| 4553 |
D("toggle", d2); |
| 4554 |
break; |
| 4555 |
case "input": |
| 4556 |
Za(d2, f2); |
| 4557 |
D("invalid", d2); |
| 4558 |
break; |
| 4559 |
case "select": |
| 4560 |
d2._wrapperState = { wasMultiple: !!f2.multiple }; |
| 4561 |
D("invalid", d2); |
| 4562 |
break; |
| 4563 |
case "textarea": |
| 4564 |
hb(d2, f2), D("invalid", d2); |
| 4565 |
} |
| 4566 |
ub(c2, f2); |
| 4567 |
e2 = null; |
| 4568 |
for (var g2 in f2) if (f2.hasOwnProperty(g2)) { |
| 4569 |
var h2 = f2[g2]; |
| 4570 |
"children" === g2 ? "string" === typeof h2 ? d2.textContent !== h2 && (true !== f2.suppressHydrationWarning && Af(d2.textContent, h2, a), e2 = ["children", h2]) : "number" === typeof h2 && d2.textContent !== "" + h2 && (true !== f2.suppressHydrationWarning && Af( |
| 4571 |
d2.textContent, |
| 4572 |
h2, |
| 4573 |
a |
| 4574 |
), e2 = ["children", "" + h2]) : ea.hasOwnProperty(g2) && null != h2 && "onScroll" === g2 && D("scroll", d2); |
| 4575 |
} |
| 4576 |
switch (c2) { |
| 4577 |
case "input": |
| 4578 |
Va(d2); |
| 4579 |
db(d2, f2, true); |
| 4580 |
break; |
| 4581 |
case "textarea": |
| 4582 |
Va(d2); |
| 4583 |
jb(d2); |
| 4584 |
break; |
| 4585 |
case "select": |
| 4586 |
case "option": |
| 4587 |
break; |
| 4588 |
default: |
| 4589 |
"function" === typeof f2.onClick && (d2.onclick = Bf); |
| 4590 |
} |
| 4591 |
d2 = e2; |
| 4592 |
b2.updateQueue = d2; |
| 4593 |
null !== d2 && (b2.flags |= 4); |
| 4594 |
} else { |
| 4595 |
g2 = 9 === e2.nodeType ? e2 : e2.ownerDocument; |
| 4596 |
"http://www.w3.org/1999/xhtml" === a && (a = kb(c2)); |
| 4597 |
"http://www.w3.org/1999/xhtml" === a ? "script" === c2 ? (a = g2.createElement("div"), a.innerHTML = "<script><\/script>", a = a.removeChild(a.firstChild)) : "string" === typeof d2.is ? a = g2.createElement(c2, { is: d2.is }) : (a = g2.createElement(c2), "select" === c2 && (g2 = a, d2.multiple ? g2.multiple = true : d2.size && (g2.size = d2.size))) : a = g2.createElementNS(a, c2); |
| 4598 |
a[Of] = b2; |
| 4599 |
a[Pf] = d2; |
| 4600 |
zj(a, b2, false, false); |
| 4601 |
b2.stateNode = a; |
| 4602 |
a: { |
| 4603 |
g2 = vb(c2, d2); |
| 4604 |
switch (c2) { |
| 4605 |
case "dialog": |
| 4606 |
D("cancel", a); |
| 4607 |
D("close", a); |
| 4608 |
e2 = d2; |
| 4609 |
break; |
| 4610 |
case "iframe": |
| 4611 |
case "object": |
| 4612 |
case "embed": |
| 4613 |
D("load", a); |
| 4614 |
e2 = d2; |
| 4615 |
break; |
| 4616 |
case "video": |
| 4617 |
case "audio": |
| 4618 |
for (e2 = 0; e2 < lf.length; e2++) D(lf[e2], a); |
| 4619 |
e2 = d2; |
| 4620 |
break; |
| 4621 |
case "source": |
| 4622 |
D("error", a); |
| 4623 |
e2 = d2; |
| 4624 |
break; |
| 4625 |
case "img": |
| 4626 |
case "image": |
| 4627 |
case "link": |
| 4628 |
D( |
| 4629 |
"error", |
| 4630 |
a |
| 4631 |
); |
| 4632 |
D("load", a); |
| 4633 |
e2 = d2; |
| 4634 |
break; |
| 4635 |
case "details": |
| 4636 |
D("toggle", a); |
| 4637 |
e2 = d2; |
| 4638 |
break; |
| 4639 |
case "input": |
| 4640 |
Za(a, d2); |
| 4641 |
e2 = Ya(a, d2); |
| 4642 |
D("invalid", a); |
| 4643 |
break; |
| 4644 |
case "option": |
| 4645 |
e2 = d2; |
| 4646 |
break; |
| 4647 |
case "select": |
| 4648 |
a._wrapperState = { wasMultiple: !!d2.multiple }; |
| 4649 |
e2 = A({}, d2, { value: void 0 }); |
| 4650 |
D("invalid", a); |
| 4651 |
break; |
| 4652 |
case "textarea": |
| 4653 |
hb(a, d2); |
| 4654 |
e2 = gb(a, d2); |
| 4655 |
D("invalid", a); |
| 4656 |
break; |
| 4657 |
default: |
| 4658 |
e2 = d2; |
| 4659 |
} |
| 4660 |
ub(c2, e2); |
| 4661 |
h2 = e2; |
| 4662 |
for (f2 in h2) if (h2.hasOwnProperty(f2)) { |
| 4663 |
var k2 = h2[f2]; |
| 4664 |
"style" === f2 ? sb(a, k2) : "dangerouslySetInnerHTML" === f2 ? (k2 = k2 ? k2.__html : void 0, null != k2 && nb(a, k2)) : "children" === f2 ? "string" === typeof k2 ? ("textarea" !== c2 || "" !== k2) && ob(a, k2) : "number" === typeof k2 && ob(a, "" + k2) : "suppressContentEditableWarning" !== f2 && "suppressHydrationWarning" !== f2 && "autoFocus" !== f2 && (ea.hasOwnProperty(f2) ? null != k2 && "onScroll" === f2 && D("scroll", a) : null != k2 && ta(a, f2, k2, g2)); |
| 4665 |
} |
| 4666 |
switch (c2) { |
| 4667 |
case "input": |
| 4668 |
Va(a); |
| 4669 |
db(a, d2, false); |
| 4670 |
break; |
| 4671 |
case "textarea": |
| 4672 |
Va(a); |
| 4673 |
jb(a); |
| 4674 |
break; |
| 4675 |
case "option": |
| 4676 |
null != d2.value && a.setAttribute("value", "" + Sa(d2.value)); |
| 4677 |
break; |
| 4678 |
case "select": |
| 4679 |
a.multiple = !!d2.multiple; |
| 4680 |
f2 = d2.value; |
| 4681 |
null != f2 ? fb(a, !!d2.multiple, f2, false) : null != d2.defaultValue && fb( |
| 4682 |
a, |
| 4683 |
!!d2.multiple, |
| 4684 |
d2.defaultValue, |
| 4685 |
true |
| 4686 |
); |
| 4687 |
break; |
| 4688 |
default: |
| 4689 |
"function" === typeof e2.onClick && (a.onclick = Bf); |
| 4690 |
} |
| 4691 |
switch (c2) { |
| 4692 |
case "button": |
| 4693 |
case "input": |
| 4694 |
case "select": |
| 4695 |
case "textarea": |
| 4696 |
d2 = !!d2.autoFocus; |
| 4697 |
break a; |
| 4698 |
case "img": |
| 4699 |
d2 = true; |
| 4700 |
break a; |
| 4701 |
default: |
| 4702 |
d2 = false; |
| 4703 |
} |
| 4704 |
} |
| 4705 |
d2 && (b2.flags |= 4); |
| 4706 |
} |
| 4707 |
null !== b2.ref && (b2.flags |= 512, b2.flags |= 2097152); |
| 4708 |
} |
| 4709 |
S(b2); |
| 4710 |
return null; |
| 4711 |
case 6: |
| 4712 |
if (a && null != b2.stateNode) Cj(a, b2, a.memoizedProps, d2); |
| 4713 |
else { |
| 4714 |
if ("string" !== typeof d2 && null === b2.stateNode) throw Error(p$1(166)); |
| 4715 |
c2 = xh(wh.current); |
| 4716 |
xh(uh.current); |
| 4717 |
if (Gg(b2)) { |
| 4718 |
d2 = b2.stateNode; |
| 4719 |
c2 = b2.memoizedProps; |
| 4720 |
d2[Of] = b2; |
| 4721 |
if (f2 = d2.nodeValue !== c2) { |
| 4722 |
if (a = xg, null !== a) switch (a.tag) { |
| 4723 |
case 3: |
| 4724 |
Af(d2.nodeValue, c2, 0 !== (a.mode & 1)); |
| 4725 |
break; |
| 4726 |
case 5: |
| 4727 |
true !== a.memoizedProps.suppressHydrationWarning && Af(d2.nodeValue, c2, 0 !== (a.mode & 1)); |
| 4728 |
} |
| 4729 |
} |
| 4730 |
f2 && (b2.flags |= 4); |
| 4731 |
} else d2 = (9 === c2.nodeType ? c2 : c2.ownerDocument).createTextNode(d2), d2[Of] = b2, b2.stateNode = d2; |
| 4732 |
} |
| 4733 |
S(b2); |
| 4734 |
return null; |
| 4735 |
case 13: |
| 4736 |
E(L); |
| 4737 |
d2 = b2.memoizedState; |
| 4738 |
if (null === a || null !== a.memoizedState && null !== a.memoizedState.dehydrated) { |
| 4739 |
if (I && null !== yg && 0 !== (b2.mode & 1) && 0 === (b2.flags & 128)) Hg(), Ig(), b2.flags |= 98560, f2 = false; |
| 4740 |
else if (f2 = Gg(b2), null !== d2 && null !== d2.dehydrated) { |
| 4741 |
if (null === a) { |
| 4742 |
if (!f2) throw Error(p$1(318)); |
| 4743 |
f2 = b2.memoizedState; |
| 4744 |
f2 = null !== f2 ? f2.dehydrated : null; |
| 4745 |
if (!f2) throw Error(p$1(317)); |
| 4746 |
f2[Of] = b2; |
| 4747 |
} else Ig(), 0 === (b2.flags & 128) && (b2.memoizedState = null), b2.flags |= 4; |
| 4748 |
S(b2); |
| 4749 |
f2 = false; |
| 4750 |
} else null !== zg && (Fj(zg), zg = null), f2 = true; |
| 4751 |
if (!f2) return b2.flags & 65536 ? b2 : null; |
| 4752 |
} |
| 4753 |
if (0 !== (b2.flags & 128)) return b2.lanes = c2, b2; |
| 4754 |
d2 = null !== d2; |
| 4755 |
d2 !== (null !== a && null !== a.memoizedState) && d2 && (b2.child.flags |= 8192, 0 !== (b2.mode & 1) && (null === a || 0 !== (L.current & 1) ? 0 === T && (T = 3) : tj())); |
| 4756 |
null !== b2.updateQueue && (b2.flags |= 4); |
| 4757 |
S(b2); |
| 4758 |
return null; |
| 4759 |
case 4: |
| 4760 |
return zh(), Aj(a, b2), null === a && sf(b2.stateNode.containerInfo), S(b2), null; |
| 4761 |
case 10: |
| 4762 |
return ah(b2.type._context), S(b2), null; |
| 4763 |
case 17: |
| 4764 |
return Zf(b2.type) && $f(), S(b2), null; |
| 4765 |
case 19: |
| 4766 |
E(L); |
| 4767 |
f2 = b2.memoizedState; |
| 4768 |
if (null === f2) return S(b2), null; |
| 4769 |
d2 = 0 !== (b2.flags & 128); |
| 4770 |
g2 = f2.rendering; |
| 4771 |
if (null === g2) if (d2) Dj(f2, false); |
| 4772 |
else { |
| 4773 |
if (0 !== T || null !== a && 0 !== (a.flags & 128)) for (a = b2.child; null !== a; ) { |
| 4774 |
g2 = Ch(a); |
| 4775 |
if (null !== g2) { |
| 4776 |
b2.flags |= 128; |
| 4777 |
Dj(f2, false); |
| 4778 |
d2 = g2.updateQueue; |
| 4779 |
null !== d2 && (b2.updateQueue = d2, b2.flags |= 4); |
| 4780 |
b2.subtreeFlags = 0; |
| 4781 |
d2 = c2; |
| 4782 |
for (c2 = b2.child; null !== c2; ) f2 = c2, a = d2, f2.flags &= 14680066, g2 = f2.alternate, null === g2 ? (f2.childLanes = 0, f2.lanes = a, f2.child = null, f2.subtreeFlags = 0, f2.memoizedProps = null, f2.memoizedState = null, f2.updateQueue = null, f2.dependencies = null, f2.stateNode = null) : (f2.childLanes = g2.childLanes, f2.lanes = g2.lanes, f2.child = g2.child, f2.subtreeFlags = 0, f2.deletions = null, f2.memoizedProps = g2.memoizedProps, f2.memoizedState = g2.memoizedState, f2.updateQueue = g2.updateQueue, f2.type = g2.type, a = g2.dependencies, f2.dependencies = null === a ? null : { lanes: a.lanes, firstContext: a.firstContext }), c2 = c2.sibling; |
| 4783 |
G(L, L.current & 1 | 2); |
| 4784 |
return b2.child; |
| 4785 |
} |
| 4786 |
a = a.sibling; |
| 4787 |
} |
| 4788 |
null !== f2.tail && B() > Gj && (b2.flags |= 128, d2 = true, Dj(f2, false), b2.lanes = 4194304); |
| 4789 |
} |
| 4790 |
else { |
| 4791 |
if (!d2) if (a = Ch(g2), null !== a) { |
| 4792 |
if (b2.flags |= 128, d2 = true, c2 = a.updateQueue, null !== c2 && (b2.updateQueue = c2, b2.flags |= 4), Dj(f2, true), null === f2.tail && "hidden" === f2.tailMode && !g2.alternate && !I) return S(b2), null; |
| 4793 |
} else 2 * B() - f2.renderingStartTime > Gj && 1073741824 !== c2 && (b2.flags |= 128, d2 = true, Dj(f2, false), b2.lanes = 4194304); |
| 4794 |
f2.isBackwards ? (g2.sibling = b2.child, b2.child = g2) : (c2 = f2.last, null !== c2 ? c2.sibling = g2 : b2.child = g2, f2.last = g2); |
| 4795 |
} |
| 4796 |
if (null !== f2.tail) return b2 = f2.tail, f2.rendering = b2, f2.tail = b2.sibling, f2.renderingStartTime = B(), b2.sibling = null, c2 = L.current, G(L, d2 ? c2 & 1 | 2 : c2 & 1), b2; |
| 4797 |
S(b2); |
| 4798 |
return null; |
| 4799 |
case 22: |
| 4800 |
case 23: |
| 4801 |
return Hj(), d2 = null !== b2.memoizedState, null !== a && null !== a.memoizedState !== d2 && (b2.flags |= 8192), d2 && 0 !== (b2.mode & 1) ? 0 !== (fj & 1073741824) && (S(b2), b2.subtreeFlags & 6 && (b2.flags |= 8192)) : S(b2), null; |
| 4802 |
case 24: |
| 4803 |
return null; |
| 4804 |
case 25: |
| 4805 |
return null; |
| 4806 |
} |
| 4807 |
throw Error(p$1(156, b2.tag)); |
| 4808 |
} |
| 4809 |
function Ij(a, b2) { |
| 4810 |
wg(b2); |
| 4811 |
switch (b2.tag) { |
| 4812 |
case 1: |
| 4813 |
return Zf(b2.type) && $f(), a = b2.flags, a & 65536 ? (b2.flags = a & -65537 | 128, b2) : null; |
| 4814 |
case 3: |
| 4815 |
return zh(), E(Wf), E(H), Eh(), a = b2.flags, 0 !== (a & 65536) && 0 === (a & 128) ? (b2.flags = a & -65537 | 128, b2) : null; |
| 4816 |
case 5: |
| 4817 |
return Bh(b2), null; |
| 4818 |
case 13: |
| 4819 |
E(L); |
| 4820 |
a = b2.memoizedState; |
| 4821 |
if (null !== a && null !== a.dehydrated) { |
| 4822 |
if (null === b2.alternate) throw Error(p$1(340)); |
| 4823 |
Ig(); |
| 4824 |
} |
| 4825 |
a = b2.flags; |
| 4826 |
return a & 65536 ? (b2.flags = a & -65537 | 128, b2) : null; |
| 4827 |
case 19: |
| 4828 |
return E(L), null; |
| 4829 |
case 4: |
| 4830 |
return zh(), null; |
| 4831 |
case 10: |
| 4832 |
return ah(b2.type._context), null; |
| 4833 |
case 22: |
| 4834 |
case 23: |
| 4835 |
return Hj(), null; |
| 4836 |
case 24: |
| 4837 |
return null; |
| 4838 |
default: |
| 4839 |
return null; |
| 4840 |
} |
| 4841 |
} |
| 4842 |
var Jj = false, U = false, Kj = "function" === typeof WeakSet ? WeakSet : Set, V = null; |
| 4843 |
function Lj(a, b2) { |
| 4844 |
var c2 = a.ref; |
| 4845 |
if (null !== c2) if ("function" === typeof c2) try { |
| 4846 |
c2(null); |
| 4847 |
} catch (d2) { |
| 4848 |
W(a, b2, d2); |
| 4849 |
} |
| 4850 |
else c2.current = null; |
| 4851 |
} |
| 4852 |
function Mj(a, b2, c2) { |
| 4853 |
try { |
| 4854 |
c2(); |
| 4855 |
} catch (d2) { |
| 4856 |
W(a, b2, d2); |
| 4857 |
} |
| 4858 |
} |
| 4859 |
var Nj = false; |
| 4860 |
function Oj(a, b2) { |
| 4861 |
Cf = dd; |
| 4862 |
a = Me(); |
| 4863 |
if (Ne(a)) { |
| 4864 |
if ("selectionStart" in a) var c2 = { start: a.selectionStart, end: a.selectionEnd }; |
| 4865 |
else a: { |
| 4866 |
c2 = (c2 = a.ownerDocument) && c2.defaultView || window; |
| 4867 |
var d2 = c2.getSelection && c2.getSelection(); |
| 4868 |
if (d2 && 0 !== d2.rangeCount) { |
| 4869 |
c2 = d2.anchorNode; |
| 4870 |
var e2 = d2.anchorOffset, f2 = d2.focusNode; |
| 4871 |
d2 = d2.focusOffset; |
| 4872 |
try { |
| 4873 |
c2.nodeType, f2.nodeType; |
| 4874 |
} catch (F2) { |
| 4875 |
c2 = null; |
| 4876 |
break a; |
| 4877 |
} |
| 4878 |
var g2 = 0, h2 = -1, k2 = -1, l2 = 0, m2 = 0, q2 = a, r2 = null; |
| 4879 |
b: for (; ; ) { |
| 4880 |
for (var y2; ; ) { |
| 4881 |
q2 !== c2 || 0 !== e2 && 3 !== q2.nodeType || (h2 = g2 + e2); |
| 4882 |
q2 !== f2 || 0 !== d2 && 3 !== q2.nodeType || (k2 = g2 + d2); |
| 4883 |
3 === q2.nodeType && (g2 += q2.nodeValue.length); |
| 4884 |
if (null === (y2 = q2.firstChild)) break; |
| 4885 |
r2 = q2; |
| 4886 |
q2 = y2; |
| 4887 |
} |
| 4888 |
for (; ; ) { |
| 4889 |
if (q2 === a) break b; |
| 4890 |
r2 === c2 && ++l2 === e2 && (h2 = g2); |
| 4891 |
r2 === f2 && ++m2 === d2 && (k2 = g2); |
| 4892 |
if (null !== (y2 = q2.nextSibling)) break; |
| 4893 |
q2 = r2; |
| 4894 |
r2 = q2.parentNode; |
| 4895 |
} |
| 4896 |
q2 = y2; |
| 4897 |
} |
| 4898 |
c2 = -1 === h2 || -1 === k2 ? null : { start: h2, end: k2 }; |
| 4899 |
} else c2 = null; |
| 4900 |
} |
| 4901 |
c2 = c2 || { start: 0, end: 0 }; |
| 4902 |
} else c2 = null; |
| 4903 |
Df = { focusedElem: a, selectionRange: c2 }; |
| 4904 |
dd = false; |
| 4905 |
for (V = b2; null !== V; ) if (b2 = V, a = b2.child, 0 !== (b2.subtreeFlags & 1028) && null !== a) a.return = b2, V = a; |
| 4906 |
else for (; null !== V; ) { |
| 4907 |
b2 = V; |
| 4908 |
try { |
| 4909 |
var n2 = b2.alternate; |
| 4910 |
if (0 !== (b2.flags & 1024)) switch (b2.tag) { |
| 4911 |
case 0: |
| 4912 |
case 11: |
| 4913 |
case 15: |
| 4914 |
break; |
| 4915 |
case 1: |
| 4916 |
if (null !== n2) { |
| 4917 |
var t2 = n2.memoizedProps, J2 = n2.memoizedState, x2 = b2.stateNode, w2 = x2.getSnapshotBeforeUpdate(b2.elementType === b2.type ? t2 : Ci(b2.type, t2), J2); |
| 4918 |
x2.__reactInternalSnapshotBeforeUpdate = w2; |
| 4919 |
} |
| 4920 |
break; |
| 4921 |
case 3: |
| 4922 |
var u2 = b2.stateNode.containerInfo; |
| 4923 |
1 === u2.nodeType ? u2.textContent = "" : 9 === u2.nodeType && u2.documentElement && u2.removeChild(u2.documentElement); |
| 4924 |
break; |
| 4925 |
case 5: |
| 4926 |
case 6: |
| 4927 |
case 4: |
| 4928 |
case 17: |
| 4929 |
break; |
| 4930 |
default: |
| 4931 |
throw Error(p$1(163)); |
| 4932 |
} |
| 4933 |
} catch (F2) { |
| 4934 |
W(b2, b2.return, F2); |
| 4935 |
} |
| 4936 |
a = b2.sibling; |
| 4937 |
if (null !== a) { |
| 4938 |
a.return = b2.return; |
| 4939 |
V = a; |
| 4940 |
break; |
| 4941 |
} |
| 4942 |
V = b2.return; |
| 4943 |
} |
| 4944 |
n2 = Nj; |
| 4945 |
Nj = false; |
| 4946 |
return n2; |
| 4947 |
} |
| 4948 |
function Pj(a, b2, c2) { |
| 4949 |
var d2 = b2.updateQueue; |
| 4950 |
d2 = null !== d2 ? d2.lastEffect : null; |
| 4951 |
if (null !== d2) { |
| 4952 |
var e2 = d2 = d2.next; |
| 4953 |
do { |
| 4954 |
if ((e2.tag & a) === a) { |
| 4955 |
var f2 = e2.destroy; |
| 4956 |
e2.destroy = void 0; |
| 4957 |
void 0 !== f2 && Mj(b2, c2, f2); |
| 4958 |
} |
| 4959 |
e2 = e2.next; |
| 4960 |
} while (e2 !== d2); |
| 4961 |
} |
| 4962 |
} |
| 4963 |
function Qj(a, b2) { |
| 4964 |
b2 = b2.updateQueue; |
| 4965 |
b2 = null !== b2 ? b2.lastEffect : null; |
| 4966 |
if (null !== b2) { |
| 4967 |
var c2 = b2 = b2.next; |
| 4968 |
do { |
| 4969 |
if ((c2.tag & a) === a) { |
| 4970 |
var d2 = c2.create; |
| 4971 |
c2.destroy = d2(); |
| 4972 |
} |
| 4973 |
c2 = c2.next; |
| 4974 |
} while (c2 !== b2); |
| 4975 |
} |
| 4976 |
} |
| 4977 |
function Rj(a) { |
| 4978 |
var b2 = a.ref; |
| 4979 |
if (null !== b2) { |
| 4980 |
var c2 = a.stateNode; |
| 4981 |
switch (a.tag) { |
| 4982 |
case 5: |
| 4983 |
a = c2; |
| 4984 |
break; |
| 4985 |
default: |
| 4986 |
a = c2; |
| 4987 |
} |
| 4988 |
"function" === typeof b2 ? b2(a) : b2.current = a; |
| 4989 |
} |
| 4990 |
} |
| 4991 |
function Sj(a) { |
| 4992 |
var b2 = a.alternate; |
| 4993 |
null !== b2 && (a.alternate = null, Sj(b2)); |
| 4994 |
a.child = null; |
| 4995 |
a.deletions = null; |
| 4996 |
a.sibling = null; |
| 4997 |
5 === a.tag && (b2 = a.stateNode, null !== b2 && (delete b2[Of], delete b2[Pf], delete b2[of], delete b2[Qf], delete b2[Rf])); |
| 4998 |
a.stateNode = null; |
| 4999 |
a.return = null; |
| 5000 |
a.dependencies = null; |
| 5001 |
a.memoizedProps = null; |
| 5002 |
a.memoizedState = null; |
| 5003 |
a.pendingProps = null; |
| 5004 |
a.stateNode = null; |
| 5005 |
a.updateQueue = null; |
| 5006 |
} |
| 5007 |
function Tj(a) { |
| 5008 |
return 5 === a.tag || 3 === a.tag || 4 === a.tag; |
| 5009 |
} |
| 5010 |
function Uj(a) { |
| 5011 |
a: for (; ; ) { |
| 5012 |
for (; null === a.sibling; ) { |
| 5013 |
if (null === a.return || Tj(a.return)) return null; |
| 5014 |
a = a.return; |
| 5015 |
} |
| 5016 |
a.sibling.return = a.return; |
| 5017 |
for (a = a.sibling; 5 !== a.tag && 6 !== a.tag && 18 !== a.tag; ) { |
| 5018 |
if (a.flags & 2) continue a; |
| 5019 |
if (null === a.child || 4 === a.tag) continue a; |
| 5020 |
else a.child.return = a, a = a.child; |
| 5021 |
} |
| 5022 |
if (!(a.flags & 2)) return a.stateNode; |
| 5023 |
} |
| 5024 |
} |
| 5025 |
function Vj(a, b2, c2) { |
| 5026 |
var d2 = a.tag; |
| 5027 |
if (5 === d2 || 6 === d2) a = a.stateNode, b2 ? 8 === c2.nodeType ? c2.parentNode.insertBefore(a, b2) : c2.insertBefore(a, b2) : (8 === c2.nodeType ? (b2 = c2.parentNode, b2.insertBefore(a, c2)) : (b2 = c2, b2.appendChild(a)), c2 = c2._reactRootContainer, null !== c2 && void 0 !== c2 || null !== b2.onclick || (b2.onclick = Bf)); |
| 5028 |
else if (4 !== d2 && (a = a.child, null !== a)) for (Vj(a, b2, c2), a = a.sibling; null !== a; ) Vj(a, b2, c2), a = a.sibling; |
| 5029 |
} |
| 5030 |
function Wj(a, b2, c2) { |
| 5031 |
var d2 = a.tag; |
| 5032 |
if (5 === d2 || 6 === d2) a = a.stateNode, b2 ? c2.insertBefore(a, b2) : c2.appendChild(a); |
| 5033 |
else if (4 !== d2 && (a = a.child, null !== a)) for (Wj(a, b2, c2), a = a.sibling; null !== a; ) Wj(a, b2, c2), a = a.sibling; |
| 5034 |
} |
| 5035 |
var X$1 = null, Xj = false; |
| 5036 |
function Yj(a, b2, c2) { |
| 5037 |
for (c2 = c2.child; null !== c2; ) Zj(a, b2, c2), c2 = c2.sibling; |
| 5038 |
} |
| 5039 |
function Zj(a, b2, c2) { |
| 5040 |
if (lc && "function" === typeof lc.onCommitFiberUnmount) try { |
| 5041 |
lc.onCommitFiberUnmount(kc, c2); |
| 5042 |
} catch (h2) { |
| 5043 |
} |
| 5044 |
switch (c2.tag) { |
| 5045 |
case 5: |
| 5046 |
U || Lj(c2, b2); |
| 5047 |
case 6: |
| 5048 |
var d2 = X$1, e2 = Xj; |
| 5049 |
X$1 = null; |
| 5050 |
Yj(a, b2, c2); |
| 5051 |
X$1 = d2; |
| 5052 |
Xj = e2; |
| 5053 |
null !== X$1 && (Xj ? (a = X$1, c2 = c2.stateNode, 8 === a.nodeType ? a.parentNode.removeChild(c2) : a.removeChild(c2)) : X$1.removeChild(c2.stateNode)); |
| 5054 |
break; |
| 5055 |
case 18: |
| 5056 |
null !== X$1 && (Xj ? (a = X$1, c2 = c2.stateNode, 8 === a.nodeType ? Kf(a.parentNode, c2) : 1 === a.nodeType && Kf(a, c2), bd(a)) : Kf(X$1, c2.stateNode)); |
| 5057 |
break; |
| 5058 |
case 4: |
| 5059 |
d2 = X$1; |
| 5060 |
e2 = Xj; |
| 5061 |
X$1 = c2.stateNode.containerInfo; |
| 5062 |
Xj = true; |
| 5063 |
Yj(a, b2, c2); |
| 5064 |
X$1 = d2; |
| 5065 |
Xj = e2; |
| 5066 |
break; |
| 5067 |
case 0: |
| 5068 |
case 11: |
| 5069 |
case 14: |
| 5070 |
case 15: |
| 5071 |
if (!U && (d2 = c2.updateQueue, null !== d2 && (d2 = d2.lastEffect, null !== d2))) { |
| 5072 |
e2 = d2 = d2.next; |
| 5073 |
do { |
| 5074 |
var f2 = e2, g2 = f2.destroy; |
| 5075 |
f2 = f2.tag; |
| 5076 |
void 0 !== g2 && (0 !== (f2 & 2) ? Mj(c2, b2, g2) : 0 !== (f2 & 4) && Mj(c2, b2, g2)); |
| 5077 |
e2 = e2.next; |
| 5078 |
} while (e2 !== d2); |
| 5079 |
} |
| 5080 |
Yj(a, b2, c2); |
| 5081 |
break; |
| 5082 |
case 1: |
| 5083 |
if (!U && (Lj(c2, b2), d2 = c2.stateNode, "function" === typeof d2.componentWillUnmount)) try { |
| 5084 |
d2.props = c2.memoizedProps, d2.state = c2.memoizedState, d2.componentWillUnmount(); |
| 5085 |
} catch (h2) { |
| 5086 |
W(c2, b2, h2); |
| 5087 |
} |
| 5088 |
Yj(a, b2, c2); |
| 5089 |
break; |
| 5090 |
case 21: |
| 5091 |
Yj(a, b2, c2); |
| 5092 |
break; |
| 5093 |
case 22: |
| 5094 |
c2.mode & 1 ? (U = (d2 = U) || null !== c2.memoizedState, Yj(a, b2, c2), U = d2) : Yj(a, b2, c2); |
| 5095 |
break; |
| 5096 |
default: |
| 5097 |
Yj(a, b2, c2); |
| 5098 |
} |
| 5099 |
} |
| 5100 |
function ak(a) { |
| 5101 |
var b2 = a.updateQueue; |
| 5102 |
if (null !== b2) { |
| 5103 |
a.updateQueue = null; |
| 5104 |
var c2 = a.stateNode; |
| 5105 |
null === c2 && (c2 = a.stateNode = new Kj()); |
| 5106 |
b2.forEach(function(b3) { |
| 5107 |
var d2 = bk.bind(null, a, b3); |
| 5108 |
c2.has(b3) || (c2.add(b3), b3.then(d2, d2)); |
| 5109 |
}); |
| 5110 |
} |
| 5111 |
} |
| 5112 |
function ck(a, b2) { |
| 5113 |
var c2 = b2.deletions; |
| 5114 |
if (null !== c2) for (var d2 = 0; d2 < c2.length; d2++) { |
| 5115 |
var e2 = c2[d2]; |
| 5116 |
try { |
| 5117 |
var f2 = a, g2 = b2, h2 = g2; |
| 5118 |
a: for (; null !== h2; ) { |
| 5119 |
switch (h2.tag) { |
| 5120 |
case 5: |
| 5121 |
X$1 = h2.stateNode; |
| 5122 |
Xj = false; |
| 5123 |
break a; |
| 5124 |
case 3: |
| 5125 |
X$1 = h2.stateNode.containerInfo; |
| 5126 |
Xj = true; |
| 5127 |
break a; |
| 5128 |
case 4: |
| 5129 |
X$1 = h2.stateNode.containerInfo; |
| 5130 |
Xj = true; |
| 5131 |
break a; |
| 5132 |
} |
| 5133 |
h2 = h2.return; |
| 5134 |
} |
| 5135 |
if (null === X$1) throw Error(p$1(160)); |
| 5136 |
Zj(f2, g2, e2); |
| 5137 |
X$1 = null; |
| 5138 |
Xj = false; |
| 5139 |
var k2 = e2.alternate; |
| 5140 |
null !== k2 && (k2.return = null); |
| 5141 |
e2.return = null; |
| 5142 |
} catch (l2) { |
| 5143 |
W(e2, b2, l2); |
| 5144 |
} |
| 5145 |
} |
| 5146 |
if (b2.subtreeFlags & 12854) for (b2 = b2.child; null !== b2; ) dk(b2, a), b2 = b2.sibling; |
| 5147 |
} |
| 5148 |
function dk(a, b2) { |
| 5149 |
var c2 = a.alternate, d2 = a.flags; |
| 5150 |
switch (a.tag) { |
| 5151 |
case 0: |
| 5152 |
case 11: |
| 5153 |
case 14: |
| 5154 |
case 15: |
| 5155 |
ck(b2, a); |
| 5156 |
ek(a); |
| 5157 |
if (d2 & 4) { |
| 5158 |
try { |
| 5159 |
Pj(3, a, a.return), Qj(3, a); |
| 5160 |
} catch (t2) { |
| 5161 |
W(a, a.return, t2); |
| 5162 |
} |
| 5163 |
try { |
| 5164 |
Pj(5, a, a.return); |
| 5165 |
} catch (t2) { |
| 5166 |
W(a, a.return, t2); |
| 5167 |
} |
| 5168 |
} |
| 5169 |
break; |
| 5170 |
case 1: |
| 5171 |
ck(b2, a); |
| 5172 |
ek(a); |
| 5173 |
d2 & 512 && null !== c2 && Lj(c2, c2.return); |
| 5174 |
break; |
| 5175 |
case 5: |
| 5176 |
ck(b2, a); |
| 5177 |
ek(a); |
| 5178 |
d2 & 512 && null !== c2 && Lj(c2, c2.return); |
| 5179 |
if (a.flags & 32) { |
| 5180 |
var e2 = a.stateNode; |
| 5181 |
try { |
| 5182 |
ob(e2, ""); |
| 5183 |
} catch (t2) { |
| 5184 |
W(a, a.return, t2); |
| 5185 |
} |
| 5186 |
} |
| 5187 |
if (d2 & 4 && (e2 = a.stateNode, null != e2)) { |
| 5188 |
var f2 = a.memoizedProps, g2 = null !== c2 ? c2.memoizedProps : f2, h2 = a.type, k2 = a.updateQueue; |
| 5189 |
a.updateQueue = null; |
| 5190 |
if (null !== k2) try { |
| 5191 |
"input" === h2 && "radio" === f2.type && null != f2.name && ab(e2, f2); |
| 5192 |
vb(h2, g2); |
| 5193 |
var l2 = vb(h2, f2); |
| 5194 |
for (g2 = 0; g2 < k2.length; g2 += 2) { |
| 5195 |
var m2 = k2[g2], q2 = k2[g2 + 1]; |
| 5196 |
"style" === m2 ? sb(e2, q2) : "dangerouslySetInnerHTML" === m2 ? nb(e2, q2) : "children" === m2 ? ob(e2, q2) : ta(e2, m2, q2, l2); |
| 5197 |
} |
| 5198 |
switch (h2) { |
| 5199 |
case "input": |
| 5200 |
bb(e2, f2); |
| 5201 |
break; |
| 5202 |
case "textarea": |
| 5203 |
ib(e2, f2); |
| 5204 |
break; |
| 5205 |
case "select": |
| 5206 |
var r2 = e2._wrapperState.wasMultiple; |
| 5207 |
e2._wrapperState.wasMultiple = !!f2.multiple; |
| 5208 |
var y2 = f2.value; |
| 5209 |
null != y2 ? fb(e2, !!f2.multiple, y2, false) : r2 !== !!f2.multiple && (null != f2.defaultValue ? fb( |
| 5210 |
e2, |
| 5211 |
!!f2.multiple, |
| 5212 |
f2.defaultValue, |
| 5213 |
true |
| 5214 |
) : fb(e2, !!f2.multiple, f2.multiple ? [] : "", false)); |
| 5215 |
} |
| 5216 |
e2[Pf] = f2; |
| 5217 |
} catch (t2) { |
| 5218 |
W(a, a.return, t2); |
| 5219 |
} |
| 5220 |
} |
| 5221 |
break; |
| 5222 |
case 6: |
| 5223 |
ck(b2, a); |
| 5224 |
ek(a); |
| 5225 |
if (d2 & 4) { |
| 5226 |
if (null === a.stateNode) throw Error(p$1(162)); |
| 5227 |
e2 = a.stateNode; |
| 5228 |
f2 = a.memoizedProps; |
| 5229 |
try { |
| 5230 |
e2.nodeValue = f2; |
| 5231 |
} catch (t2) { |
| 5232 |
W(a, a.return, t2); |
| 5233 |
} |
| 5234 |
} |
| 5235 |
break; |
| 5236 |
case 3: |
| 5237 |
ck(b2, a); |
| 5238 |
ek(a); |
| 5239 |
if (d2 & 4 && null !== c2 && c2.memoizedState.isDehydrated) try { |
| 5240 |
bd(b2.containerInfo); |
| 5241 |
} catch (t2) { |
| 5242 |
W(a, a.return, t2); |
| 5243 |
} |
| 5244 |
break; |
| 5245 |
case 4: |
| 5246 |
ck(b2, a); |
| 5247 |
ek(a); |
| 5248 |
break; |
| 5249 |
case 13: |
| 5250 |
ck(b2, a); |
| 5251 |
ek(a); |
| 5252 |
e2 = a.child; |
| 5253 |
e2.flags & 8192 && (f2 = null !== e2.memoizedState, e2.stateNode.isHidden = f2, !f2 || null !== e2.alternate && null !== e2.alternate.memoizedState || (fk = B())); |
| 5254 |
d2 & 4 && ak(a); |
| 5255 |
break; |
| 5256 |
case 22: |
| 5257 |
m2 = null !== c2 && null !== c2.memoizedState; |
| 5258 |
a.mode & 1 ? (U = (l2 = U) || m2, ck(b2, a), U = l2) : ck(b2, a); |
| 5259 |
ek(a); |
| 5260 |
if (d2 & 8192) { |
| 5261 |
l2 = null !== a.memoizedState; |
| 5262 |
if ((a.stateNode.isHidden = l2) && !m2 && 0 !== (a.mode & 1)) for (V = a, m2 = a.child; null !== m2; ) { |
| 5263 |
for (q2 = V = m2; null !== V; ) { |
| 5264 |
r2 = V; |
| 5265 |
y2 = r2.child; |
| 5266 |
switch (r2.tag) { |
| 5267 |
case 0: |
| 5268 |
case 11: |
| 5269 |
case 14: |
| 5270 |
case 15: |
| 5271 |
Pj(4, r2, r2.return); |
| 5272 |
break; |
| 5273 |
case 1: |
| 5274 |
Lj(r2, r2.return); |
| 5275 |
var n2 = r2.stateNode; |
| 5276 |
if ("function" === typeof n2.componentWillUnmount) { |
| 5277 |
d2 = r2; |
| 5278 |
c2 = r2.return; |
| 5279 |
try { |
| 5280 |
b2 = d2, n2.props = b2.memoizedProps, n2.state = b2.memoizedState, n2.componentWillUnmount(); |
| 5281 |
} catch (t2) { |
| 5282 |
W(d2, c2, t2); |
| 5283 |
} |
| 5284 |
} |
| 5285 |
break; |
| 5286 |
case 5: |
| 5287 |
Lj(r2, r2.return); |
| 5288 |
break; |
| 5289 |
case 22: |
| 5290 |
if (null !== r2.memoizedState) { |
| 5291 |
gk(q2); |
| 5292 |
continue; |
| 5293 |
} |
| 5294 |
} |
| 5295 |
null !== y2 ? (y2.return = r2, V = y2) : gk(q2); |
| 5296 |
} |
| 5297 |
m2 = m2.sibling; |
| 5298 |
} |
| 5299 |
a: for (m2 = null, q2 = a; ; ) { |
| 5300 |
if (5 === q2.tag) { |
| 5301 |
if (null === m2) { |
| 5302 |
m2 = q2; |
| 5303 |
try { |
| 5304 |
e2 = q2.stateNode, l2 ? (f2 = e2.style, "function" === typeof f2.setProperty ? f2.setProperty("display", "none", "important") : f2.display = "none") : (h2 = q2.stateNode, k2 = q2.memoizedProps.style, g2 = void 0 !== k2 && null !== k2 && k2.hasOwnProperty("display") ? k2.display : null, h2.style.display = rb("display", g2)); |
| 5305 |
} catch (t2) { |
| 5306 |
W(a, a.return, t2); |
| 5307 |
} |
| 5308 |
} |
| 5309 |
} else if (6 === q2.tag) { |
| 5310 |
if (null === m2) try { |
| 5311 |
q2.stateNode.nodeValue = l2 ? "" : q2.memoizedProps; |
| 5312 |
} catch (t2) { |
| 5313 |
W(a, a.return, t2); |
| 5314 |
} |
| 5315 |
} else if ((22 !== q2.tag && 23 !== q2.tag || null === q2.memoizedState || q2 === a) && null !== q2.child) { |
| 5316 |
q2.child.return = q2; |
| 5317 |
q2 = q2.child; |
| 5318 |
continue; |
| 5319 |
} |
| 5320 |
if (q2 === a) break a; |
| 5321 |
for (; null === q2.sibling; ) { |
| 5322 |
if (null === q2.return || q2.return === a) break a; |
| 5323 |
m2 === q2 && (m2 = null); |
| 5324 |
q2 = q2.return; |
| 5325 |
} |
| 5326 |
m2 === q2 && (m2 = null); |
| 5327 |
q2.sibling.return = q2.return; |
| 5328 |
q2 = q2.sibling; |
| 5329 |
} |
| 5330 |
} |
| 5331 |
break; |
| 5332 |
case 19: |
| 5333 |
ck(b2, a); |
| 5334 |
ek(a); |
| 5335 |
d2 & 4 && ak(a); |
| 5336 |
break; |
| 5337 |
case 21: |
| 5338 |
break; |
| 5339 |
default: |
| 5340 |
ck( |
| 5341 |
b2, |
| 5342 |
a |
| 5343 |
), ek(a); |
| 5344 |
} |
| 5345 |
} |
| 5346 |
function ek(a) { |
| 5347 |
var b2 = a.flags; |
| 5348 |
if (b2 & 2) { |
| 5349 |
try { |
| 5350 |
a: { |
| 5351 |
for (var c2 = a.return; null !== c2; ) { |
| 5352 |
if (Tj(c2)) { |
| 5353 |
var d2 = c2; |
| 5354 |
break a; |
| 5355 |
} |
| 5356 |
c2 = c2.return; |
| 5357 |
} |
| 5358 |
throw Error(p$1(160)); |
| 5359 |
} |
| 5360 |
switch (d2.tag) { |
| 5361 |
case 5: |
| 5362 |
var e2 = d2.stateNode; |
| 5363 |
d2.flags & 32 && (ob(e2, ""), d2.flags &= -33); |
| 5364 |
var f2 = Uj(a); |
| 5365 |
Wj(a, f2, e2); |
| 5366 |
break; |
| 5367 |
case 3: |
| 5368 |
case 4: |
| 5369 |
var g2 = d2.stateNode.containerInfo, h2 = Uj(a); |
| 5370 |
Vj(a, h2, g2); |
| 5371 |
break; |
| 5372 |
default: |
| 5373 |
throw Error(p$1(161)); |
| 5374 |
} |
| 5375 |
} catch (k2) { |
| 5376 |
W(a, a.return, k2); |
| 5377 |
} |
| 5378 |
a.flags &= -3; |
| 5379 |
} |
| 5380 |
b2 & 4096 && (a.flags &= -4097); |
| 5381 |
} |
| 5382 |
function hk(a, b2, c2) { |
| 5383 |
V = a; |
| 5384 |
ik(a); |
| 5385 |
} |
| 5386 |
function ik(a, b2, c2) { |
| 5387 |
for (var d2 = 0 !== (a.mode & 1); null !== V; ) { |
| 5388 |
var e2 = V, f2 = e2.child; |
| 5389 |
if (22 === e2.tag && d2) { |
| 5390 |
var g2 = null !== e2.memoizedState || Jj; |
| 5391 |
if (!g2) { |
| 5392 |
var h2 = e2.alternate, k2 = null !== h2 && null !== h2.memoizedState || U; |
| 5393 |
h2 = Jj; |
| 5394 |
var l2 = U; |
| 5395 |
Jj = g2; |
| 5396 |
if ((U = k2) && !l2) for (V = e2; null !== V; ) g2 = V, k2 = g2.child, 22 === g2.tag && null !== g2.memoizedState ? jk(e2) : null !== k2 ? (k2.return = g2, V = k2) : jk(e2); |
| 5397 |
for (; null !== f2; ) V = f2, ik(f2), f2 = f2.sibling; |
| 5398 |
V = e2; |
| 5399 |
Jj = h2; |
| 5400 |
U = l2; |
| 5401 |
} |
| 5402 |
kk(a); |
| 5403 |
} else 0 !== (e2.subtreeFlags & 8772) && null !== f2 ? (f2.return = e2, V = f2) : kk(a); |
| 5404 |
} |
| 5405 |
} |
| 5406 |
function kk(a) { |
| 5407 |
for (; null !== V; ) { |
| 5408 |
var b2 = V; |
| 5409 |
if (0 !== (b2.flags & 8772)) { |
| 5410 |
var c2 = b2.alternate; |
| 5411 |
try { |
| 5412 |
if (0 !== (b2.flags & 8772)) switch (b2.tag) { |
| 5413 |
case 0: |
| 5414 |
case 11: |
| 5415 |
case 15: |
| 5416 |
U || Qj(5, b2); |
| 5417 |
break; |
| 5418 |
case 1: |
| 5419 |
var d2 = b2.stateNode; |
| 5420 |
if (b2.flags & 4 && !U) if (null === c2) d2.componentDidMount(); |
| 5421 |
else { |
| 5422 |
var e2 = b2.elementType === b2.type ? c2.memoizedProps : Ci(b2.type, c2.memoizedProps); |
| 5423 |
d2.componentDidUpdate(e2, c2.memoizedState, d2.__reactInternalSnapshotBeforeUpdate); |
| 5424 |
} |
| 5425 |
var f2 = b2.updateQueue; |
| 5426 |
null !== f2 && sh(b2, f2, d2); |
| 5427 |
break; |
| 5428 |
case 3: |
| 5429 |
var g2 = b2.updateQueue; |
| 5430 |
if (null !== g2) { |
| 5431 |
c2 = null; |
| 5432 |
if (null !== b2.child) switch (b2.child.tag) { |
| 5433 |
case 5: |
| 5434 |
c2 = b2.child.stateNode; |
| 5435 |
break; |
| 5436 |
case 1: |
| 5437 |
c2 = b2.child.stateNode; |
| 5438 |
} |
| 5439 |
sh(b2, g2, c2); |
| 5440 |
} |
| 5441 |
break; |
| 5442 |
case 5: |
| 5443 |
var h2 = b2.stateNode; |
| 5444 |
if (null === c2 && b2.flags & 4) { |
| 5445 |
c2 = h2; |
| 5446 |
var k2 = b2.memoizedProps; |
| 5447 |
switch (b2.type) { |
| 5448 |
case "button": |
| 5449 |
case "input": |
| 5450 |
case "select": |
| 5451 |
case "textarea": |
| 5452 |
k2.autoFocus && c2.focus(); |
| 5453 |
break; |
| 5454 |
case "img": |
| 5455 |
k2.src && (c2.src = k2.src); |
| 5456 |
} |
| 5457 |
} |
| 5458 |
break; |
| 5459 |
case 6: |
| 5460 |
break; |
| 5461 |
case 4: |
| 5462 |
break; |
| 5463 |
case 12: |
| 5464 |
break; |
| 5465 |
case 13: |
| 5466 |
if (null === b2.memoizedState) { |
| 5467 |
var l2 = b2.alternate; |
| 5468 |
if (null !== l2) { |
| 5469 |
var m2 = l2.memoizedState; |
| 5470 |
if (null !== m2) { |
| 5471 |
var q2 = m2.dehydrated; |
| 5472 |
null !== q2 && bd(q2); |
| 5473 |
} |
| 5474 |
} |
| 5475 |
} |
| 5476 |
break; |
| 5477 |
case 19: |
| 5478 |
case 17: |
| 5479 |
case 21: |
| 5480 |
case 22: |
| 5481 |
case 23: |
| 5482 |
case 25: |
| 5483 |
break; |
| 5484 |
default: |
| 5485 |
throw Error(p$1(163)); |
| 5486 |
} |
| 5487 |
U || b2.flags & 512 && Rj(b2); |
| 5488 |
} catch (r2) { |
| 5489 |
W(b2, b2.return, r2); |
| 5490 |
} |
| 5491 |
} |
| 5492 |
if (b2 === a) { |
| 5493 |
V = null; |
| 5494 |
break; |
| 5495 |
} |
| 5496 |
c2 = b2.sibling; |
| 5497 |
if (null !== c2) { |
| 5498 |
c2.return = b2.return; |
| 5499 |
V = c2; |
| 5500 |
break; |
| 5501 |
} |
| 5502 |
V = b2.return; |
| 5503 |
} |
| 5504 |
} |
| 5505 |
function gk(a) { |
| 5506 |
for (; null !== V; ) { |
| 5507 |
var b2 = V; |
| 5508 |
if (b2 === a) { |
| 5509 |
V = null; |
| 5510 |
break; |
| 5511 |
} |
| 5512 |
var c2 = b2.sibling; |
| 5513 |
if (null !== c2) { |
| 5514 |
c2.return = b2.return; |
| 5515 |
V = c2; |
| 5516 |
break; |
| 5517 |
} |
| 5518 |
V = b2.return; |
| 5519 |
} |
| 5520 |
} |
| 5521 |
function jk(a) { |
| 5522 |
for (; null !== V; ) { |
| 5523 |
var b2 = V; |
| 5524 |
try { |
| 5525 |
switch (b2.tag) { |
| 5526 |
case 0: |
| 5527 |
case 11: |
| 5528 |
case 15: |
| 5529 |
var c2 = b2.return; |
| 5530 |
try { |
| 5531 |
Qj(4, b2); |
| 5532 |
} catch (k2) { |
| 5533 |
W(b2, c2, k2); |
| 5534 |
} |
| 5535 |
break; |
| 5536 |
case 1: |
| 5537 |
var d2 = b2.stateNode; |
| 5538 |
if ("function" === typeof d2.componentDidMount) { |
| 5539 |
var e2 = b2.return; |
| 5540 |
try { |
| 5541 |
d2.componentDidMount(); |
| 5542 |
} catch (k2) { |
| 5543 |
W(b2, e2, k2); |
| 5544 |
} |
| 5545 |
} |
| 5546 |
var f2 = b2.return; |
| 5547 |
try { |
| 5548 |
Rj(b2); |
| 5549 |
} catch (k2) { |
| 5550 |
W(b2, f2, k2); |
| 5551 |
} |
| 5552 |
break; |
| 5553 |
case 5: |
| 5554 |
var g2 = b2.return; |
| 5555 |
try { |
| 5556 |
Rj(b2); |
| 5557 |
} catch (k2) { |
| 5558 |
W(b2, g2, k2); |
| 5559 |
} |
| 5560 |
} |
| 5561 |
} catch (k2) { |
| 5562 |
W(b2, b2.return, k2); |
| 5563 |
} |
| 5564 |
if (b2 === a) { |
| 5565 |
V = null; |
| 5566 |
break; |
| 5567 |
} |
| 5568 |
var h2 = b2.sibling; |
| 5569 |
if (null !== h2) { |
| 5570 |
h2.return = b2.return; |
| 5571 |
V = h2; |
| 5572 |
break; |
| 5573 |
} |
| 5574 |
V = b2.return; |
| 5575 |
} |
| 5576 |
} |
| 5577 |
var lk = Math.ceil, mk = ua.ReactCurrentDispatcher, nk = ua.ReactCurrentOwner, ok = ua.ReactCurrentBatchConfig, K = 0, Q = null, Y = null, Z = 0, fj = 0, ej = Uf(0), T = 0, pk = null, rh = 0, qk = 0, rk = 0, sk = null, tk = null, fk = 0, Gj = Infinity, uk = null, Oi = false, Pi = null, Ri = null, vk = false, wk = null, xk = 0, yk = 0, zk = null, Ak = -1, Bk = 0; |
| 5578 |
function R() { |
| 5579 |
return 0 !== (K & 6) ? B() : -1 !== Ak ? Ak : Ak = B(); |
| 5580 |
} |
| 5581 |
function yi(a) { |
| 5582 |
if (0 === (a.mode & 1)) return 1; |
| 5583 |
if (0 !== (K & 2) && 0 !== Z) return Z & -Z; |
| 5584 |
if (null !== Kg.transition) return 0 === Bk && (Bk = yc()), Bk; |
| 5585 |
a = C; |
| 5586 |
if (0 !== a) return a; |
| 5587 |
a = window.event; |
| 5588 |
a = void 0 === a ? 16 : jd(a.type); |
| 5589 |
return a; |
| 5590 |
} |
| 5591 |
function gi(a, b2, c2, d2) { |
| 5592 |
if (50 < yk) throw yk = 0, zk = null, Error(p$1(185)); |
| 5593 |
Ac(a, c2, d2); |
| 5594 |
if (0 === (K & 2) || a !== Q) a === Q && (0 === (K & 2) && (qk |= c2), 4 === T && Ck(a, Z)), Dk(a, d2), 1 === c2 && 0 === K && 0 === (b2.mode & 1) && (Gj = B() + 500, fg && jg()); |
| 5595 |
} |
| 5596 |
function Dk(a, b2) { |
| 5597 |
var c2 = a.callbackNode; |
| 5598 |
wc(a, b2); |
| 5599 |
var d2 = uc(a, a === Q ? Z : 0); |
| 5600 |
if (0 === d2) null !== c2 && bc(c2), a.callbackNode = null, a.callbackPriority = 0; |
| 5601 |
else if (b2 = d2 & -d2, a.callbackPriority !== b2) { |
| 5602 |
null != c2 && bc(c2); |
| 5603 |
if (1 === b2) 0 === a.tag ? ig(Ek.bind(null, a)) : hg(Ek.bind(null, a)), Jf(function() { |
| 5604 |
0 === (K & 6) && jg(); |
| 5605 |
}), c2 = null; |
| 5606 |
else { |
| 5607 |
switch (Dc(d2)) { |
| 5608 |
case 1: |
| 5609 |
c2 = fc; |
| 5610 |
break; |
| 5611 |
case 4: |
| 5612 |
c2 = gc; |
| 5613 |
break; |
| 5614 |
case 16: |
| 5615 |
c2 = hc; |
| 5616 |
break; |
| 5617 |
case 536870912: |
| 5618 |
c2 = jc; |
| 5619 |
break; |
| 5620 |
default: |
| 5621 |
c2 = hc; |
| 5622 |
} |
| 5623 |
c2 = Fk(c2, Gk.bind(null, a)); |
| 5624 |
} |
| 5625 |
a.callbackPriority = b2; |
| 5626 |
a.callbackNode = c2; |
| 5627 |
} |
| 5628 |
} |
| 5629 |
function Gk(a, b2) { |
| 5630 |
Ak = -1; |
| 5631 |
Bk = 0; |
| 5632 |
if (0 !== (K & 6)) throw Error(p$1(327)); |
| 5633 |
var c2 = a.callbackNode; |
| 5634 |
if (Hk() && a.callbackNode !== c2) return null; |
| 5635 |
var d2 = uc(a, a === Q ? Z : 0); |
| 5636 |
if (0 === d2) return null; |
| 5637 |
if (0 !== (d2 & 30) || 0 !== (d2 & a.expiredLanes) || b2) b2 = Ik(a, d2); |
| 5638 |
else { |
| 5639 |
b2 = d2; |
| 5640 |
var e2 = K; |
| 5641 |
K |= 2; |
| 5642 |
var f2 = Jk(); |
| 5643 |
if (Q !== a || Z !== b2) uk = null, Gj = B() + 500, Kk(a, b2); |
| 5644 |
do |
| 5645 |
try { |
| 5646 |
Lk(); |
| 5647 |
break; |
| 5648 |
} catch (h2) { |
| 5649 |
Mk(a, h2); |
| 5650 |
} |
| 5651 |
while (1); |
| 5652 |
$g(); |
| 5653 |
mk.current = f2; |
| 5654 |
K = e2; |
| 5655 |
null !== Y ? b2 = 0 : (Q = null, Z = 0, b2 = T); |
| 5656 |
} |
| 5657 |
if (0 !== b2) { |
| 5658 |
2 === b2 && (e2 = xc(a), 0 !== e2 && (d2 = e2, b2 = Nk(a, e2))); |
| 5659 |
if (1 === b2) throw c2 = pk, Kk(a, 0), Ck(a, d2), Dk(a, B()), c2; |
| 5660 |
if (6 === b2) Ck(a, d2); |
| 5661 |
else { |
| 5662 |
e2 = a.current.alternate; |
| 5663 |
if (0 === (d2 & 30) && !Ok(e2) && (b2 = Ik(a, d2), 2 === b2 && (f2 = xc(a), 0 !== f2 && (d2 = f2, b2 = Nk(a, f2))), 1 === b2)) throw c2 = pk, Kk(a, 0), Ck(a, d2), Dk(a, B()), c2; |
| 5664 |
a.finishedWork = e2; |
| 5665 |
a.finishedLanes = d2; |
| 5666 |
switch (b2) { |
| 5667 |
case 0: |
| 5668 |
case 1: |
| 5669 |
throw Error(p$1(345)); |
| 5670 |
case 2: |
| 5671 |
Pk(a, tk, uk); |
| 5672 |
break; |
| 5673 |
case 3: |
| 5674 |
Ck(a, d2); |
| 5675 |
if ((d2 & 130023424) === d2 && (b2 = fk + 500 - B(), 10 < b2)) { |
| 5676 |
if (0 !== uc(a, 0)) break; |
| 5677 |
e2 = a.suspendedLanes; |
| 5678 |
if ((e2 & d2) !== d2) { |
| 5679 |
R(); |
| 5680 |
a.pingedLanes |= a.suspendedLanes & e2; |
| 5681 |
break; |
| 5682 |
} |
| 5683 |
a.timeoutHandle = Ff(Pk.bind(null, a, tk, uk), b2); |
| 5684 |
break; |
| 5685 |
} |
| 5686 |
Pk(a, tk, uk); |
| 5687 |
break; |
| 5688 |
case 4: |
| 5689 |
Ck(a, d2); |
| 5690 |
if ((d2 & 4194240) === d2) break; |
| 5691 |
b2 = a.eventTimes; |
| 5692 |
for (e2 = -1; 0 < d2; ) { |
| 5693 |
var g2 = 31 - oc(d2); |
| 5694 |
f2 = 1 << g2; |
| 5695 |
g2 = b2[g2]; |
| 5696 |
g2 > e2 && (e2 = g2); |
| 5697 |
d2 &= ~f2; |
| 5698 |
} |
| 5699 |
d2 = e2; |
| 5700 |
d2 = B() - d2; |
| 5701 |
d2 = (120 > d2 ? 120 : 480 > d2 ? 480 : 1080 > d2 ? 1080 : 1920 > d2 ? 1920 : 3e3 > d2 ? 3e3 : 4320 > d2 ? 4320 : 1960 * lk(d2 / 1960)) - d2; |
| 5702 |
if (10 < d2) { |
| 5703 |
a.timeoutHandle = Ff(Pk.bind(null, a, tk, uk), d2); |
| 5704 |
break; |
| 5705 |
} |
| 5706 |
Pk(a, tk, uk); |
| 5707 |
break; |
| 5708 |
case 5: |
| 5709 |
Pk(a, tk, uk); |
| 5710 |
break; |
| 5711 |
default: |
| 5712 |
throw Error(p$1(329)); |
| 5713 |
} |
| 5714 |
} |
| 5715 |
} |
| 5716 |
Dk(a, B()); |
| 5717 |
return a.callbackNode === c2 ? Gk.bind(null, a) : null; |
| 5718 |
} |
| 5719 |
function Nk(a, b2) { |
| 5720 |
var c2 = sk; |
| 5721 |
a.current.memoizedState.isDehydrated && (Kk(a, b2).flags |= 256); |
| 5722 |
a = Ik(a, b2); |
| 5723 |
2 !== a && (b2 = tk, tk = c2, null !== b2 && Fj(b2)); |
| 5724 |
return a; |
| 5725 |
} |
| 5726 |
function Fj(a) { |
| 5727 |
null === tk ? tk = a : tk.push.apply(tk, a); |
| 5728 |
} |
| 5729 |
function Ok(a) { |
| 5730 |
for (var b2 = a; ; ) { |
| 5731 |
if (b2.flags & 16384) { |
| 5732 |
var c2 = b2.updateQueue; |
| 5733 |
if (null !== c2 && (c2 = c2.stores, null !== c2)) for (var d2 = 0; d2 < c2.length; d2++) { |
| 5734 |
var e2 = c2[d2], f2 = e2.getSnapshot; |
| 5735 |
e2 = e2.value; |
| 5736 |
try { |
| 5737 |
if (!He(f2(), e2)) return false; |
| 5738 |
} catch (g2) { |
| 5739 |
return false; |
| 5740 |
} |
| 5741 |
} |
| 5742 |
} |
| 5743 |
c2 = b2.child; |
| 5744 |
if (b2.subtreeFlags & 16384 && null !== c2) c2.return = b2, b2 = c2; |
| 5745 |
else { |
| 5746 |
if (b2 === a) break; |
| 5747 |
for (; null === b2.sibling; ) { |
| 5748 |
if (null === b2.return || b2.return === a) return true; |
| 5749 |
b2 = b2.return; |
| 5750 |
} |
| 5751 |
b2.sibling.return = b2.return; |
| 5752 |
b2 = b2.sibling; |
| 5753 |
} |
| 5754 |
} |
| 5755 |
return true; |
| 5756 |
} |
| 5757 |
function Ck(a, b2) { |
| 5758 |
b2 &= ~rk; |
| 5759 |
b2 &= ~qk; |
| 5760 |
a.suspendedLanes |= b2; |
| 5761 |
a.pingedLanes &= ~b2; |
| 5762 |
for (a = a.expirationTimes; 0 < b2; ) { |
| 5763 |
var c2 = 31 - oc(b2), d2 = 1 << c2; |
| 5764 |
a[c2] = -1; |
| 5765 |
b2 &= ~d2; |
| 5766 |
} |
| 5767 |
} |
| 5768 |
function Ek(a) { |
| 5769 |
if (0 !== (K & 6)) throw Error(p$1(327)); |
| 5770 |
Hk(); |
| 5771 |
var b2 = uc(a, 0); |
| 5772 |
if (0 === (b2 & 1)) return Dk(a, B()), null; |
| 5773 |
var c2 = Ik(a, b2); |
| 5774 |
if (0 !== a.tag && 2 === c2) { |
| 5775 |
var d2 = xc(a); |
| 5776 |
0 !== d2 && (b2 = d2, c2 = Nk(a, d2)); |
| 5777 |
} |
| 5778 |
if (1 === c2) throw c2 = pk, Kk(a, 0), Ck(a, b2), Dk(a, B()), c2; |
| 5779 |
if (6 === c2) throw Error(p$1(345)); |
| 5780 |
a.finishedWork = a.current.alternate; |
| 5781 |
a.finishedLanes = b2; |
| 5782 |
Pk(a, tk, uk); |
| 5783 |
Dk(a, B()); |
| 5784 |
return null; |
| 5785 |
} |
| 5786 |
function Qk(a, b2) { |
| 5787 |
var c2 = K; |
| 5788 |
K |= 1; |
| 5789 |
try { |
| 5790 |
return a(b2); |
| 5791 |
} finally { |
| 5792 |
K = c2, 0 === K && (Gj = B() + 500, fg && jg()); |
| 5793 |
} |
| 5794 |
} |
| 5795 |
function Rk(a) { |
| 5796 |
null !== wk && 0 === wk.tag && 0 === (K & 6) && Hk(); |
| 5797 |
var b2 = K; |
| 5798 |
K |= 1; |
| 5799 |
var c2 = ok.transition, d2 = C; |
| 5800 |
try { |
| 5801 |
if (ok.transition = null, C = 1, a) return a(); |
| 5802 |
} finally { |
| 5803 |
C = d2, ok.transition = c2, K = b2, 0 === (K & 6) && jg(); |
| 5804 |
} |
| 5805 |
} |
| 5806 |
function Hj() { |
| 5807 |
fj = ej.current; |
| 5808 |
E(ej); |
| 5809 |
} |
| 5810 |
function Kk(a, b2) { |
| 5811 |
a.finishedWork = null; |
| 5812 |
a.finishedLanes = 0; |
| 5813 |
var c2 = a.timeoutHandle; |
| 5814 |
-1 !== c2 && (a.timeoutHandle = -1, Gf(c2)); |
| 5815 |
if (null !== Y) for (c2 = Y.return; null !== c2; ) { |
| 5816 |
var d2 = c2; |
| 5817 |
wg(d2); |
| 5818 |
switch (d2.tag) { |
| 5819 |
case 1: |
| 5820 |
d2 = d2.type.childContextTypes; |
| 5821 |
null !== d2 && void 0 !== d2 && $f(); |
| 5822 |
break; |
| 5823 |
case 3: |
| 5824 |
zh(); |
| 5825 |
E(Wf); |
| 5826 |
E(H); |
| 5827 |
Eh(); |
| 5828 |
break; |
| 5829 |
case 5: |
| 5830 |
Bh(d2); |
| 5831 |
break; |
| 5832 |
case 4: |
| 5833 |
zh(); |
| 5834 |
break; |
| 5835 |
case 13: |
| 5836 |
E(L); |
| 5837 |
break; |
| 5838 |
case 19: |
| 5839 |
E(L); |
| 5840 |
break; |
| 5841 |
case 10: |
| 5842 |
ah(d2.type._context); |
| 5843 |
break; |
| 5844 |
case 22: |
| 5845 |
case 23: |
| 5846 |
Hj(); |
| 5847 |
} |
| 5848 |
c2 = c2.return; |
| 5849 |
} |
| 5850 |
Q = a; |
| 5851 |
Y = a = Pg(a.current, null); |
| 5852 |
Z = fj = b2; |
| 5853 |
T = 0; |
| 5854 |
pk = null; |
| 5855 |
rk = qk = rh = 0; |
| 5856 |
tk = sk = null; |
| 5857 |
if (null !== fh) { |
| 5858 |
for (b2 = 0; b2 < fh.length; b2++) if (c2 = fh[b2], d2 = c2.interleaved, null !== d2) { |
| 5859 |
c2.interleaved = null; |
| 5860 |
var e2 = d2.next, f2 = c2.pending; |
| 5861 |
if (null !== f2) { |
| 5862 |
var g2 = f2.next; |
| 5863 |
f2.next = e2; |
| 5864 |
d2.next = g2; |
| 5865 |
} |
| 5866 |
c2.pending = d2; |
| 5867 |
} |
| 5868 |
fh = null; |
| 5869 |
} |
| 5870 |
return a; |
| 5871 |
} |
| 5872 |
function Mk(a, b2) { |
| 5873 |
do { |
| 5874 |
var c2 = Y; |
| 5875 |
try { |
| 5876 |
$g(); |
| 5877 |
Fh.current = Rh; |
| 5878 |
if (Ih) { |
| 5879 |
for (var d2 = M.memoizedState; null !== d2; ) { |
| 5880 |
var e2 = d2.queue; |
| 5881 |
null !== e2 && (e2.pending = null); |
| 5882 |
d2 = d2.next; |
| 5883 |
} |
| 5884 |
Ih = false; |
| 5885 |
} |
| 5886 |
Hh = 0; |
| 5887 |
O = N = M = null; |
| 5888 |
Jh = false; |
| 5889 |
Kh = 0; |
| 5890 |
nk.current = null; |
| 5891 |
if (null === c2 || null === c2.return) { |
| 5892 |
T = 1; |
| 5893 |
pk = b2; |
| 5894 |
Y = null; |
| 5895 |
break; |
| 5896 |
} |
| 5897 |
a: { |
| 5898 |
var f2 = a, g2 = c2.return, h2 = c2, k2 = b2; |
| 5899 |
b2 = Z; |
| 5900 |
h2.flags |= 32768; |
| 5901 |
if (null !== k2 && "object" === typeof k2 && "function" === typeof k2.then) { |
| 5902 |
var l2 = k2, m2 = h2, q2 = m2.tag; |
| 5903 |
if (0 === (m2.mode & 1) && (0 === q2 || 11 === q2 || 15 === q2)) { |
| 5904 |
var r2 = m2.alternate; |
| 5905 |
r2 ? (m2.updateQueue = r2.updateQueue, m2.memoizedState = r2.memoizedState, m2.lanes = r2.lanes) : (m2.updateQueue = null, m2.memoizedState = null); |
| 5906 |
} |
| 5907 |
var y2 = Ui(g2); |
| 5908 |
if (null !== y2) { |
| 5909 |
y2.flags &= -257; |
| 5910 |
Vi(y2, g2, h2, f2, b2); |
| 5911 |
y2.mode & 1 && Si(f2, l2, b2); |
| 5912 |
b2 = y2; |
| 5913 |
k2 = l2; |
| 5914 |
var n2 = b2.updateQueue; |
| 5915 |
if (null === n2) { |
| 5916 |
var t2 = /* @__PURE__ */ new Set(); |
| 5917 |
t2.add(k2); |
| 5918 |
b2.updateQueue = t2; |
| 5919 |
} else n2.add(k2); |
| 5920 |
break a; |
| 5921 |
} else { |
| 5922 |
if (0 === (b2 & 1)) { |
| 5923 |
Si(f2, l2, b2); |
| 5924 |
tj(); |
| 5925 |
break a; |
| 5926 |
} |
| 5927 |
k2 = Error(p$1(426)); |
| 5928 |
} |
| 5929 |
} else if (I && h2.mode & 1) { |
| 5930 |
var J2 = Ui(g2); |
| 5931 |
if (null !== J2) { |
| 5932 |
0 === (J2.flags & 65536) && (J2.flags |= 256); |
| 5933 |
Vi(J2, g2, h2, f2, b2); |
| 5934 |
Jg(Ji(k2, h2)); |
| 5935 |
break a; |
| 5936 |
} |
| 5937 |
} |
| 5938 |
f2 = k2 = Ji(k2, h2); |
| 5939 |
4 !== T && (T = 2); |
| 5940 |
null === sk ? sk = [f2] : sk.push(f2); |
| 5941 |
f2 = g2; |
| 5942 |
do { |
| 5943 |
switch (f2.tag) { |
| 5944 |
case 3: |
| 5945 |
f2.flags |= 65536; |
| 5946 |
b2 &= -b2; |
| 5947 |
f2.lanes |= b2; |
| 5948 |
var x2 = Ni(f2, k2, b2); |
| 5949 |
ph(f2, x2); |
| 5950 |
break a; |
| 5951 |
case 1: |
| 5952 |
h2 = k2; |
| 5953 |
var w2 = f2.type, u2 = f2.stateNode; |
| 5954 |
if (0 === (f2.flags & 128) && ("function" === typeof w2.getDerivedStateFromError || null !== u2 && "function" === typeof u2.componentDidCatch && (null === Ri || !Ri.has(u2)))) { |
| 5955 |
f2.flags |= 65536; |
| 5956 |
b2 &= -b2; |
| 5957 |
f2.lanes |= b2; |
| 5958 |
var F2 = Qi(f2, h2, b2); |
| 5959 |
ph(f2, F2); |
| 5960 |
break a; |
| 5961 |
} |
| 5962 |
} |
| 5963 |
f2 = f2.return; |
| 5964 |
} while (null !== f2); |
| 5965 |
} |
| 5966 |
Sk(c2); |
| 5967 |
} catch (na) { |
| 5968 |
b2 = na; |
| 5969 |
Y === c2 && null !== c2 && (Y = c2 = c2.return); |
| 5970 |
continue; |
| 5971 |
} |
| 5972 |
break; |
| 5973 |
} while (1); |
| 5974 |
} |
| 5975 |
function Jk() { |
| 5976 |
var a = mk.current; |
| 5977 |
mk.current = Rh; |
| 5978 |
return null === a ? Rh : a; |
| 5979 |
} |
| 5980 |
function tj() { |
| 5981 |
if (0 === T || 3 === T || 2 === T) T = 4; |
| 5982 |
null === Q || 0 === (rh & 268435455) && 0 === (qk & 268435455) || Ck(Q, Z); |
| 5983 |
} |
| 5984 |
function Ik(a, b2) { |
| 5985 |
var c2 = K; |
| 5986 |
K |= 2; |
| 5987 |
var d2 = Jk(); |
| 5988 |
if (Q !== a || Z !== b2) uk = null, Kk(a, b2); |
| 5989 |
do |
| 5990 |
try { |
| 5991 |
Tk(); |
| 5992 |
break; |
| 5993 |
} catch (e2) { |
| 5994 |
Mk(a, e2); |
| 5995 |
} |
| 5996 |
while (1); |
| 5997 |
$g(); |
| 5998 |
K = c2; |
| 5999 |
mk.current = d2; |
| 6000 |
if (null !== Y) throw Error(p$1(261)); |
| 6001 |
Q = null; |
| 6002 |
Z = 0; |
| 6003 |
return T; |
| 6004 |
} |
| 6005 |
function Tk() { |
| 6006 |
for (; null !== Y; ) Uk(Y); |
| 6007 |
} |
| 6008 |
function Lk() { |
| 6009 |
for (; null !== Y && !cc(); ) Uk(Y); |
| 6010 |
} |
| 6011 |
function Uk(a) { |
| 6012 |
var b2 = Vk(a.alternate, a, fj); |
| 6013 |
a.memoizedProps = a.pendingProps; |
| 6014 |
null === b2 ? Sk(a) : Y = b2; |
| 6015 |
nk.current = null; |
| 6016 |
} |
| 6017 |
function Sk(a) { |
| 6018 |
var b2 = a; |
| 6019 |
do { |
| 6020 |
var c2 = b2.alternate; |
| 6021 |
a = b2.return; |
| 6022 |
if (0 === (b2.flags & 32768)) { |
| 6023 |
if (c2 = Ej(c2, b2, fj), null !== c2) { |
| 6024 |
Y = c2; |
| 6025 |
return; |
| 6026 |
} |
| 6027 |
} else { |
| 6028 |
c2 = Ij(c2, b2); |
| 6029 |
if (null !== c2) { |
| 6030 |
c2.flags &= 32767; |
| 6031 |
Y = c2; |
| 6032 |
return; |
| 6033 |
} |
| 6034 |
if (null !== a) a.flags |= 32768, a.subtreeFlags = 0, a.deletions = null; |
| 6035 |
else { |
| 6036 |
T = 6; |
| 6037 |
Y = null; |
| 6038 |
return; |
| 6039 |
} |
| 6040 |
} |
| 6041 |
b2 = b2.sibling; |
| 6042 |
if (null !== b2) { |
| 6043 |
Y = b2; |
| 6044 |
return; |
| 6045 |
} |
| 6046 |
Y = b2 = a; |
| 6047 |
} while (null !== b2); |
| 6048 |
0 === T && (T = 5); |
| 6049 |
} |
| 6050 |
function Pk(a, b2, c2) { |
| 6051 |
var d2 = C, e2 = ok.transition; |
| 6052 |
try { |
| 6053 |
ok.transition = null, C = 1, Wk(a, b2, c2, d2); |
| 6054 |
} finally { |
| 6055 |
ok.transition = e2, C = d2; |
| 6056 |
} |
| 6057 |
return null; |
| 6058 |
} |
| 6059 |
function Wk(a, b2, c2, d2) { |
| 6060 |
do |
| 6061 |
Hk(); |
| 6062 |
while (null !== wk); |
| 6063 |
if (0 !== (K & 6)) throw Error(p$1(327)); |
| 6064 |
c2 = a.finishedWork; |
| 6065 |
var e2 = a.finishedLanes; |
| 6066 |
if (null === c2) return null; |
| 6067 |
a.finishedWork = null; |
| 6068 |
a.finishedLanes = 0; |
| 6069 |
if (c2 === a.current) throw Error(p$1(177)); |
| 6070 |
a.callbackNode = null; |
| 6071 |
a.callbackPriority = 0; |
| 6072 |
var f2 = c2.lanes | c2.childLanes; |
| 6073 |
Bc(a, f2); |
| 6074 |
a === Q && (Y = Q = null, Z = 0); |
| 6075 |
0 === (c2.subtreeFlags & 2064) && 0 === (c2.flags & 2064) || vk || (vk = true, Fk(hc, function() { |
| 6076 |
Hk(); |
| 6077 |
return null; |
| 6078 |
})); |
| 6079 |
f2 = 0 !== (c2.flags & 15990); |
| 6080 |
if (0 !== (c2.subtreeFlags & 15990) || f2) { |
| 6081 |
f2 = ok.transition; |
| 6082 |
ok.transition = null; |
| 6083 |
var g2 = C; |
| 6084 |
C = 1; |
| 6085 |
var h2 = K; |
| 6086 |
K |= 4; |
| 6087 |
nk.current = null; |
| 6088 |
Oj(a, c2); |
| 6089 |
dk(c2, a); |
| 6090 |
Oe(Df); |
| 6091 |
dd = !!Cf; |
| 6092 |
Df = Cf = null; |
| 6093 |
a.current = c2; |
| 6094 |
hk(c2); |
| 6095 |
dc(); |
| 6096 |
K = h2; |
| 6097 |
C = g2; |
| 6098 |
ok.transition = f2; |
| 6099 |
} else a.current = c2; |
| 6100 |
vk && (vk = false, wk = a, xk = e2); |
| 6101 |
f2 = a.pendingLanes; |
| 6102 |
0 === f2 && (Ri = null); |
| 6103 |
mc(c2.stateNode); |
| 6104 |
Dk(a, B()); |
| 6105 |
if (null !== b2) for (d2 = a.onRecoverableError, c2 = 0; c2 < b2.length; c2++) e2 = b2[c2], d2(e2.value, { componentStack: e2.stack, digest: e2.digest }); |
| 6106 |
if (Oi) throw Oi = false, a = Pi, Pi = null, a; |
| 6107 |
0 !== (xk & 1) && 0 !== a.tag && Hk(); |
| 6108 |
f2 = a.pendingLanes; |
| 6109 |
0 !== (f2 & 1) ? a === zk ? yk++ : (yk = 0, zk = a) : yk = 0; |
| 6110 |
jg(); |
| 6111 |
return null; |
| 6112 |
} |
| 6113 |
function Hk() { |
| 6114 |
if (null !== wk) { |
| 6115 |
var a = Dc(xk), b2 = ok.transition, c2 = C; |
| 6116 |
try { |
| 6117 |
ok.transition = null; |
| 6118 |
C = 16 > a ? 16 : a; |
| 6119 |
if (null === wk) var d2 = false; |
| 6120 |
else { |
| 6121 |
a = wk; |
| 6122 |
wk = null; |
| 6123 |
xk = 0; |
| 6124 |
if (0 !== (K & 6)) throw Error(p$1(331)); |
| 6125 |
var e2 = K; |
| 6126 |
K |= 4; |
| 6127 |
for (V = a.current; null !== V; ) { |
| 6128 |
var f2 = V, g2 = f2.child; |
| 6129 |
if (0 !== (V.flags & 16)) { |
| 6130 |
var h2 = f2.deletions; |
| 6131 |
if (null !== h2) { |
| 6132 |
for (var k2 = 0; k2 < h2.length; k2++) { |
| 6133 |
var l2 = h2[k2]; |
| 6134 |
for (V = l2; null !== V; ) { |
| 6135 |
var m2 = V; |
| 6136 |
switch (m2.tag) { |
| 6137 |
case 0: |
| 6138 |
case 11: |
| 6139 |
case 15: |
| 6140 |
Pj(8, m2, f2); |
| 6141 |
} |
| 6142 |
var q2 = m2.child; |
| 6143 |
if (null !== q2) q2.return = m2, V = q2; |
| 6144 |
else for (; null !== V; ) { |
| 6145 |
m2 = V; |
| 6146 |
var r2 = m2.sibling, y2 = m2.return; |
| 6147 |
Sj(m2); |
| 6148 |
if (m2 === l2) { |
| 6149 |
V = null; |
| 6150 |
break; |
| 6151 |
} |
| 6152 |
if (null !== r2) { |
| 6153 |
r2.return = y2; |
| 6154 |
V = r2; |
| 6155 |
break; |
| 6156 |
} |
| 6157 |
V = y2; |
| 6158 |
} |
| 6159 |
} |
| 6160 |
} |
| 6161 |
var n2 = f2.alternate; |
| 6162 |
if (null !== n2) { |
| 6163 |
var t2 = n2.child; |
| 6164 |
if (null !== t2) { |
| 6165 |
n2.child = null; |
| 6166 |
do { |
| 6167 |
var J2 = t2.sibling; |
| 6168 |
t2.sibling = null; |
| 6169 |
t2 = J2; |
| 6170 |
} while (null !== t2); |
| 6171 |
} |
| 6172 |
} |
| 6173 |
V = f2; |
| 6174 |
} |
| 6175 |
} |
| 6176 |
if (0 !== (f2.subtreeFlags & 2064) && null !== g2) g2.return = f2, V = g2; |
| 6177 |
else b: for (; null !== V; ) { |
| 6178 |
f2 = V; |
| 6179 |
if (0 !== (f2.flags & 2048)) switch (f2.tag) { |
| 6180 |
case 0: |
| 6181 |
case 11: |
| 6182 |
case 15: |
| 6183 |
Pj(9, f2, f2.return); |
| 6184 |
} |
| 6185 |
var x2 = f2.sibling; |
| 6186 |
if (null !== x2) { |
| 6187 |
x2.return = f2.return; |
| 6188 |
V = x2; |
| 6189 |
break b; |
| 6190 |
} |
| 6191 |
V = f2.return; |
| 6192 |
} |
| 6193 |
} |
| 6194 |
var w2 = a.current; |
| 6195 |
for (V = w2; null !== V; ) { |
| 6196 |
g2 = V; |
| 6197 |
var u2 = g2.child; |
| 6198 |
if (0 !== (g2.subtreeFlags & 2064) && null !== u2) u2.return = g2, V = u2; |
| 6199 |
else b: for (g2 = w2; null !== V; ) { |
| 6200 |
h2 = V; |
| 6201 |
if (0 !== (h2.flags & 2048)) try { |
| 6202 |
switch (h2.tag) { |
| 6203 |
case 0: |
| 6204 |
case 11: |
| 6205 |
case 15: |
| 6206 |
Qj(9, h2); |
| 6207 |
} |
| 6208 |
} catch (na) { |
| 6209 |
W(h2, h2.return, na); |
| 6210 |
} |
| 6211 |
if (h2 === g2) { |
| 6212 |
V = null; |
| 6213 |
break b; |
| 6214 |
} |
| 6215 |
var F2 = h2.sibling; |
| 6216 |
if (null !== F2) { |
| 6217 |
F2.return = h2.return; |
| 6218 |
V = F2; |
| 6219 |
break b; |
| 6220 |
} |
| 6221 |
V = h2.return; |
| 6222 |
} |
| 6223 |
} |
| 6224 |
K = e2; |
| 6225 |
jg(); |
| 6226 |
if (lc && "function" === typeof lc.onPostCommitFiberRoot) try { |
| 6227 |
lc.onPostCommitFiberRoot(kc, a); |
| 6228 |
} catch (na) { |
| 6229 |
} |
| 6230 |
d2 = true; |
| 6231 |
} |
| 6232 |
return d2; |
| 6233 |
} finally { |
| 6234 |
C = c2, ok.transition = b2; |
| 6235 |
} |
| 6236 |
} |
| 6237 |
return false; |
| 6238 |
} |
| 6239 |
function Xk(a, b2, c2) { |
| 6240 |
b2 = Ji(c2, b2); |
| 6241 |
b2 = Ni(a, b2, 1); |
| 6242 |
a = nh(a, b2, 1); |
| 6243 |
b2 = R(); |
| 6244 |
null !== a && (Ac(a, 1, b2), Dk(a, b2)); |
| 6245 |
} |
| 6246 |
function W(a, b2, c2) { |
| 6247 |
if (3 === a.tag) Xk(a, a, c2); |
| 6248 |
else for (; null !== b2; ) { |
| 6249 |
if (3 === b2.tag) { |
| 6250 |
Xk(b2, a, c2); |
| 6251 |
break; |
| 6252 |
} else if (1 === b2.tag) { |
| 6253 |
var d2 = b2.stateNode; |
| 6254 |
if ("function" === typeof b2.type.getDerivedStateFromError || "function" === typeof d2.componentDidCatch && (null === Ri || !Ri.has(d2))) { |
| 6255 |
a = Ji(c2, a); |
| 6256 |
a = Qi(b2, a, 1); |
| 6257 |
b2 = nh(b2, a, 1); |
| 6258 |
a = R(); |
| 6259 |
null !== b2 && (Ac(b2, 1, a), Dk(b2, a)); |
| 6260 |
break; |
| 6261 |
} |
| 6262 |
} |
| 6263 |
b2 = b2.return; |
| 6264 |
} |
| 6265 |
} |
| 6266 |
function Ti(a, b2, c2) { |
| 6267 |
var d2 = a.pingCache; |
| 6268 |
null !== d2 && d2.delete(b2); |
| 6269 |
b2 = R(); |
| 6270 |
a.pingedLanes |= a.suspendedLanes & c2; |
| 6271 |
Q === a && (Z & c2) === c2 && (4 === T || 3 === T && (Z & 130023424) === Z && 500 > B() - fk ? Kk(a, 0) : rk |= c2); |
| 6272 |
Dk(a, b2); |
| 6273 |
} |
| 6274 |
function Yk(a, b2) { |
| 6275 |
0 === b2 && (0 === (a.mode & 1) ? b2 = 1 : (b2 = sc, sc <<= 1, 0 === (sc & 130023424) && (sc = 4194304))); |
| 6276 |
var c2 = R(); |
| 6277 |
a = ih(a, b2); |
| 6278 |
null !== a && (Ac(a, b2, c2), Dk(a, c2)); |
| 6279 |
} |
| 6280 |
function uj(a) { |
| 6281 |
var b2 = a.memoizedState, c2 = 0; |
| 6282 |
null !== b2 && (c2 = b2.retryLane); |
| 6283 |
Yk(a, c2); |
| 6284 |
} |
| 6285 |
function bk(a, b2) { |
| 6286 |
var c2 = 0; |
| 6287 |
switch (a.tag) { |
| 6288 |
case 13: |
| 6289 |
var d2 = a.stateNode; |
| 6290 |
var e2 = a.memoizedState; |
| 6291 |
null !== e2 && (c2 = e2.retryLane); |
| 6292 |
break; |
| 6293 |
case 19: |
| 6294 |
d2 = a.stateNode; |
| 6295 |
break; |
| 6296 |
default: |
| 6297 |
throw Error(p$1(314)); |
| 6298 |
} |
| 6299 |
null !== d2 && d2.delete(b2); |
| 6300 |
Yk(a, c2); |
| 6301 |
} |
| 6302 |
var Vk; |
| 6303 |
Vk = function(a, b2, c2) { |
| 6304 |
if (null !== a) if (a.memoizedProps !== b2.pendingProps || Wf.current) dh = true; |
| 6305 |
else { |
| 6306 |
if (0 === (a.lanes & c2) && 0 === (b2.flags & 128)) return dh = false, yj(a, b2, c2); |
| 6307 |
dh = 0 !== (a.flags & 131072) ? true : false; |
| 6308 |
} |
| 6309 |
else dh = false, I && 0 !== (b2.flags & 1048576) && ug(b2, ng, b2.index); |
| 6310 |
b2.lanes = 0; |
| 6311 |
switch (b2.tag) { |
| 6312 |
case 2: |
| 6313 |
var d2 = b2.type; |
| 6314 |
ij(a, b2); |
| 6315 |
a = b2.pendingProps; |
| 6316 |
var e2 = Yf(b2, H.current); |
| 6317 |
ch(b2, c2); |
| 6318 |
e2 = Nh(null, b2, d2, a, e2, c2); |
| 6319 |
var f2 = Sh(); |
| 6320 |
b2.flags |= 1; |
| 6321 |
"object" === typeof e2 && null !== e2 && "function" === typeof e2.render && void 0 === e2.$$typeof ? (b2.tag = 1, b2.memoizedState = null, b2.updateQueue = null, Zf(d2) ? (f2 = true, cg(b2)) : f2 = false, b2.memoizedState = null !== e2.state && void 0 !== e2.state ? e2.state : null, kh(b2), e2.updater = Ei, b2.stateNode = e2, e2._reactInternals = b2, Ii(b2, d2, a, c2), b2 = jj(null, b2, d2, true, f2, c2)) : (b2.tag = 0, I && f2 && vg(b2), Xi(null, b2, e2, c2), b2 = b2.child); |
| 6322 |
return b2; |
| 6323 |
case 16: |
| 6324 |
d2 = b2.elementType; |
| 6325 |
a: { |
| 6326 |
ij(a, b2); |
| 6327 |
a = b2.pendingProps; |
| 6328 |
e2 = d2._init; |
| 6329 |
d2 = e2(d2._payload); |
| 6330 |
b2.type = d2; |
| 6331 |
e2 = b2.tag = Zk(d2); |
| 6332 |
a = Ci(d2, a); |
| 6333 |
switch (e2) { |
| 6334 |
case 0: |
| 6335 |
b2 = cj(null, b2, d2, a, c2); |
| 6336 |
break a; |
| 6337 |
case 1: |
| 6338 |
b2 = hj(null, b2, d2, a, c2); |
| 6339 |
break a; |
| 6340 |
case 11: |
| 6341 |
b2 = Yi(null, b2, d2, a, c2); |
| 6342 |
break a; |
| 6343 |
case 14: |
| 6344 |
b2 = $i(null, b2, d2, Ci(d2.type, a), c2); |
| 6345 |
break a; |
| 6346 |
} |
| 6347 |
throw Error(p$1( |
| 6348 |
306, |
| 6349 |
d2, |
| 6350 |
"" |
| 6351 |
)); |
| 6352 |
} |
| 6353 |
return b2; |
| 6354 |
case 0: |
| 6355 |
return d2 = b2.type, e2 = b2.pendingProps, e2 = b2.elementType === d2 ? e2 : Ci(d2, e2), cj(a, b2, d2, e2, c2); |
| 6356 |
case 1: |
| 6357 |
return d2 = b2.type, e2 = b2.pendingProps, e2 = b2.elementType === d2 ? e2 : Ci(d2, e2), hj(a, b2, d2, e2, c2); |
| 6358 |
case 3: |
| 6359 |
a: { |
| 6360 |
kj(b2); |
| 6361 |
if (null === a) throw Error(p$1(387)); |
| 6362 |
d2 = b2.pendingProps; |
| 6363 |
f2 = b2.memoizedState; |
| 6364 |
e2 = f2.element; |
| 6365 |
lh(a, b2); |
| 6366 |
qh(b2, d2, null, c2); |
| 6367 |
var g2 = b2.memoizedState; |
| 6368 |
d2 = g2.element; |
| 6369 |
if (f2.isDehydrated) if (f2 = { element: d2, isDehydrated: false, cache: g2.cache, pendingSuspenseBoundaries: g2.pendingSuspenseBoundaries, transitions: g2.transitions }, b2.updateQueue.baseState = f2, b2.memoizedState = f2, b2.flags & 256) { |
| 6370 |
e2 = Ji(Error(p$1(423)), b2); |
| 6371 |
b2 = lj(a, b2, d2, c2, e2); |
| 6372 |
break a; |
| 6373 |
} else if (d2 !== e2) { |
| 6374 |
e2 = Ji(Error(p$1(424)), b2); |
| 6375 |
b2 = lj(a, b2, d2, c2, e2); |
| 6376 |
break a; |
| 6377 |
} else for (yg = Lf(b2.stateNode.containerInfo.firstChild), xg = b2, I = true, zg = null, c2 = Vg(b2, null, d2, c2), b2.child = c2; c2; ) c2.flags = c2.flags & -3 | 4096, c2 = c2.sibling; |
| 6378 |
else { |
| 6379 |
Ig(); |
| 6380 |
if (d2 === e2) { |
| 6381 |
b2 = Zi(a, b2, c2); |
| 6382 |
break a; |
| 6383 |
} |
| 6384 |
Xi(a, b2, d2, c2); |
| 6385 |
} |
| 6386 |
b2 = b2.child; |
| 6387 |
} |
| 6388 |
return b2; |
| 6389 |
case 5: |
| 6390 |
return Ah(b2), null === a && Eg(b2), d2 = b2.type, e2 = b2.pendingProps, f2 = null !== a ? a.memoizedProps : null, g2 = e2.children, Ef(d2, e2) ? g2 = null : null !== f2 && Ef(d2, f2) && (b2.flags |= 32), gj(a, b2), Xi(a, b2, g2, c2), b2.child; |
| 6391 |
case 6: |
| 6392 |
return null === a && Eg(b2), null; |
| 6393 |
case 13: |
| 6394 |
return oj(a, b2, c2); |
| 6395 |
case 4: |
| 6396 |
return yh(b2, b2.stateNode.containerInfo), d2 = b2.pendingProps, null === a ? b2.child = Ug(b2, null, d2, c2) : Xi(a, b2, d2, c2), b2.child; |
| 6397 |
case 11: |
| 6398 |
return d2 = b2.type, e2 = b2.pendingProps, e2 = b2.elementType === d2 ? e2 : Ci(d2, e2), Yi(a, b2, d2, e2, c2); |
| 6399 |
case 7: |
| 6400 |
return Xi(a, b2, b2.pendingProps, c2), b2.child; |
| 6401 |
case 8: |
| 6402 |
return Xi(a, b2, b2.pendingProps.children, c2), b2.child; |
| 6403 |
case 12: |
| 6404 |
return Xi(a, b2, b2.pendingProps.children, c2), b2.child; |
| 6405 |
case 10: |
| 6406 |
a: { |
| 6407 |
d2 = b2.type._context; |
| 6408 |
e2 = b2.pendingProps; |
| 6409 |
f2 = b2.memoizedProps; |
| 6410 |
g2 = e2.value; |
| 6411 |
G(Wg, d2._currentValue); |
| 6412 |
d2._currentValue = g2; |
| 6413 |
if (null !== f2) if (He(f2.value, g2)) { |
| 6414 |
if (f2.children === e2.children && !Wf.current) { |
| 6415 |
b2 = Zi(a, b2, c2); |
| 6416 |
break a; |
| 6417 |
} |
| 6418 |
} else for (f2 = b2.child, null !== f2 && (f2.return = b2); null !== f2; ) { |
| 6419 |
var h2 = f2.dependencies; |
| 6420 |
if (null !== h2) { |
| 6421 |
g2 = f2.child; |
| 6422 |
for (var k2 = h2.firstContext; null !== k2; ) { |
| 6423 |
if (k2.context === d2) { |
| 6424 |
if (1 === f2.tag) { |
| 6425 |
k2 = mh(-1, c2 & -c2); |
| 6426 |
k2.tag = 2; |
| 6427 |
var l2 = f2.updateQueue; |
| 6428 |
if (null !== l2) { |
| 6429 |
l2 = l2.shared; |
| 6430 |
var m2 = l2.pending; |
| 6431 |
null === m2 ? k2.next = k2 : (k2.next = m2.next, m2.next = k2); |
| 6432 |
l2.pending = k2; |
| 6433 |
} |
| 6434 |
} |
| 6435 |
f2.lanes |= c2; |
| 6436 |
k2 = f2.alternate; |
| 6437 |
null !== k2 && (k2.lanes |= c2); |
| 6438 |
bh( |
| 6439 |
f2.return, |
| 6440 |
c2, |
| 6441 |
b2 |
| 6442 |
); |
| 6443 |
h2.lanes |= c2; |
| 6444 |
break; |
| 6445 |
} |
| 6446 |
k2 = k2.next; |
| 6447 |
} |
| 6448 |
} else if (10 === f2.tag) g2 = f2.type === b2.type ? null : f2.child; |
| 6449 |
else if (18 === f2.tag) { |
| 6450 |
g2 = f2.return; |
| 6451 |
if (null === g2) throw Error(p$1(341)); |
| 6452 |
g2.lanes |= c2; |
| 6453 |
h2 = g2.alternate; |
| 6454 |
null !== h2 && (h2.lanes |= c2); |
| 6455 |
bh(g2, c2, b2); |
| 6456 |
g2 = f2.sibling; |
| 6457 |
} else g2 = f2.child; |
| 6458 |
if (null !== g2) g2.return = f2; |
| 6459 |
else for (g2 = f2; null !== g2; ) { |
| 6460 |
if (g2 === b2) { |
| 6461 |
g2 = null; |
| 6462 |
break; |
| 6463 |
} |
| 6464 |
f2 = g2.sibling; |
| 6465 |
if (null !== f2) { |
| 6466 |
f2.return = g2.return; |
| 6467 |
g2 = f2; |
| 6468 |
break; |
| 6469 |
} |
| 6470 |
g2 = g2.return; |
| 6471 |
} |
| 6472 |
f2 = g2; |
| 6473 |
} |
| 6474 |
Xi(a, b2, e2.children, c2); |
| 6475 |
b2 = b2.child; |
| 6476 |
} |
| 6477 |
return b2; |
| 6478 |
case 9: |
| 6479 |
return e2 = b2.type, d2 = b2.pendingProps.children, ch(b2, c2), e2 = eh(e2), d2 = d2(e2), b2.flags |= 1, Xi(a, b2, d2, c2), b2.child; |
| 6480 |
case 14: |
| 6481 |
return d2 = b2.type, e2 = Ci(d2, b2.pendingProps), e2 = Ci(d2.type, e2), $i(a, b2, d2, e2, c2); |
| 6482 |
case 15: |
| 6483 |
return bj(a, b2, b2.type, b2.pendingProps, c2); |
| 6484 |
case 17: |
| 6485 |
return d2 = b2.type, e2 = b2.pendingProps, e2 = b2.elementType === d2 ? e2 : Ci(d2, e2), ij(a, b2), b2.tag = 1, Zf(d2) ? (a = true, cg(b2)) : a = false, ch(b2, c2), Gi(b2, d2, e2), Ii(b2, d2, e2, c2), jj(null, b2, d2, true, a, c2); |
| 6486 |
case 19: |
| 6487 |
return xj(a, b2, c2); |
| 6488 |
case 22: |
| 6489 |
return dj(a, b2, c2); |
| 6490 |
} |
| 6491 |
throw Error(p$1(156, b2.tag)); |
| 6492 |
}; |
| 6493 |
function Fk(a, b2) { |
| 6494 |
return ac(a, b2); |
| 6495 |
} |
| 6496 |
function $k(a, b2, c2, d2) { |
| 6497 |
this.tag = a; |
| 6498 |
this.key = c2; |
| 6499 |
this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null; |
| 6500 |
this.index = 0; |
| 6501 |
this.ref = null; |
| 6502 |
this.pendingProps = b2; |
| 6503 |
this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null; |
| 6504 |
this.mode = d2; |
| 6505 |
this.subtreeFlags = this.flags = 0; |
| 6506 |
this.deletions = null; |
| 6507 |
this.childLanes = this.lanes = 0; |
| 6508 |
this.alternate = null; |
| 6509 |
} |
| 6510 |
function Bg(a, b2, c2, d2) { |
| 6511 |
return new $k(a, b2, c2, d2); |
| 6512 |
} |
| 6513 |
function aj(a) { |
| 6514 |
a = a.prototype; |
| 6515 |
return !(!a || !a.isReactComponent); |
| 6516 |
} |
| 6517 |
function Zk(a) { |
| 6518 |
if ("function" === typeof a) return aj(a) ? 1 : 0; |
| 6519 |
if (void 0 !== a && null !== a) { |
| 6520 |
a = a.$$typeof; |
| 6521 |
if (a === Da) return 11; |
| 6522 |
if (a === Ga) return 14; |
| 6523 |
} |
| 6524 |
return 2; |
| 6525 |
} |
| 6526 |
function Pg(a, b2) { |
| 6527 |
var c2 = a.alternate; |
| 6528 |
null === c2 ? (c2 = Bg(a.tag, b2, a.key, a.mode), c2.elementType = a.elementType, c2.type = a.type, c2.stateNode = a.stateNode, c2.alternate = a, a.alternate = c2) : (c2.pendingProps = b2, c2.type = a.type, c2.flags = 0, c2.subtreeFlags = 0, c2.deletions = null); |
| 6529 |
c2.flags = a.flags & 14680064; |
| 6530 |
c2.childLanes = a.childLanes; |
| 6531 |
c2.lanes = a.lanes; |
| 6532 |
c2.child = a.child; |
| 6533 |
c2.memoizedProps = a.memoizedProps; |
| 6534 |
c2.memoizedState = a.memoizedState; |
| 6535 |
c2.updateQueue = a.updateQueue; |
| 6536 |
b2 = a.dependencies; |
| 6537 |
c2.dependencies = null === b2 ? null : { lanes: b2.lanes, firstContext: b2.firstContext }; |
| 6538 |
c2.sibling = a.sibling; |
| 6539 |
c2.index = a.index; |
| 6540 |
c2.ref = a.ref; |
| 6541 |
return c2; |
| 6542 |
} |
| 6543 |
function Rg(a, b2, c2, d2, e2, f2) { |
| 6544 |
var g2 = 2; |
| 6545 |
d2 = a; |
| 6546 |
if ("function" === typeof a) aj(a) && (g2 = 1); |
| 6547 |
else if ("string" === typeof a) g2 = 5; |
| 6548 |
else a: switch (a) { |
| 6549 |
case ya: |
| 6550 |
return Tg(c2.children, e2, f2, b2); |
| 6551 |
case za: |
| 6552 |
g2 = 8; |
| 6553 |
e2 |= 8; |
| 6554 |
break; |
| 6555 |
case Aa: |
| 6556 |
return a = Bg(12, c2, b2, e2 | 2), a.elementType = Aa, a.lanes = f2, a; |
| 6557 |
case Ea: |
| 6558 |
return a = Bg(13, c2, b2, e2), a.elementType = Ea, a.lanes = f2, a; |
| 6559 |
case Fa: |
| 6560 |
return a = Bg(19, c2, b2, e2), a.elementType = Fa, a.lanes = f2, a; |
| 6561 |
case Ia: |
| 6562 |
return pj(c2, e2, f2, b2); |
| 6563 |
default: |
| 6564 |
if ("object" === typeof a && null !== a) switch (a.$$typeof) { |
| 6565 |
case Ba: |
| 6566 |
g2 = 10; |
| 6567 |
break a; |
| 6568 |
case Ca: |
| 6569 |
g2 = 9; |
| 6570 |
break a; |
| 6571 |
case Da: |
| 6572 |
g2 = 11; |
| 6573 |
break a; |
| 6574 |
case Ga: |
| 6575 |
g2 = 14; |
| 6576 |
break a; |
| 6577 |
case Ha: |
| 6578 |
g2 = 16; |
| 6579 |
d2 = null; |
| 6580 |
break a; |
| 6581 |
} |
| 6582 |
throw Error(p$1(130, null == a ? a : typeof a, "")); |
| 6583 |
} |
| 6584 |
b2 = Bg(g2, c2, b2, e2); |
| 6585 |
b2.elementType = a; |
| 6586 |
b2.type = d2; |
| 6587 |
b2.lanes = f2; |
| 6588 |
return b2; |
| 6589 |
} |
| 6590 |
function Tg(a, b2, c2, d2) { |
| 6591 |
a = Bg(7, a, d2, b2); |
| 6592 |
a.lanes = c2; |
| 6593 |
return a; |
| 6594 |
} |
| 6595 |
function pj(a, b2, c2, d2) { |
| 6596 |
a = Bg(22, a, d2, b2); |
| 6597 |
a.elementType = Ia; |
| 6598 |
a.lanes = c2; |
| 6599 |
a.stateNode = { isHidden: false }; |
| 6600 |
return a; |
| 6601 |
} |
| 6602 |
function Qg(a, b2, c2) { |
| 6603 |
a = Bg(6, a, null, b2); |
| 6604 |
a.lanes = c2; |
| 6605 |
return a; |
| 6606 |
} |
| 6607 |
function Sg(a, b2, c2) { |
| 6608 |
b2 = Bg(4, null !== a.children ? a.children : [], a.key, b2); |
| 6609 |
b2.lanes = c2; |
| 6610 |
b2.stateNode = { containerInfo: a.containerInfo, pendingChildren: null, implementation: a.implementation }; |
| 6611 |
return b2; |
| 6612 |
} |
| 6613 |
function al(a, b2, c2, d2, e2) { |
| 6614 |
this.tag = b2; |
| 6615 |
this.containerInfo = a; |
| 6616 |
this.finishedWork = this.pingCache = this.current = this.pendingChildren = null; |
| 6617 |
this.timeoutHandle = -1; |
| 6618 |
this.callbackNode = this.pendingContext = this.context = null; |
| 6619 |
this.callbackPriority = 0; |
| 6620 |
this.eventTimes = zc(0); |
| 6621 |
this.expirationTimes = zc(-1); |
| 6622 |
this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0; |
| 6623 |
this.entanglements = zc(0); |
| 6624 |
this.identifierPrefix = d2; |
| 6625 |
this.onRecoverableError = e2; |
| 6626 |
this.mutableSourceEagerHydrationData = null; |
| 6627 |
} |
| 6628 |
function bl(a, b2, c2, d2, e2, f2, g2, h2, k2) { |
| 6629 |
a = new al(a, b2, c2, h2, k2); |
| 6630 |
1 === b2 ? (b2 = 1, true === f2 && (b2 |= 8)) : b2 = 0; |
| 6631 |
f2 = Bg(3, null, null, b2); |
| 6632 |
a.current = f2; |
| 6633 |
f2.stateNode = a; |
| 6634 |
f2.memoizedState = { element: d2, isDehydrated: c2, cache: null, transitions: null, pendingSuspenseBoundaries: null }; |
| 6635 |
kh(f2); |
| 6636 |
return a; |
| 6637 |
} |
| 6638 |
function cl(a, b2, c2) { |
| 6639 |
var d2 = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null; |
| 6640 |
return { $$typeof: wa, key: null == d2 ? null : "" + d2, children: a, containerInfo: b2, implementation: c2 }; |
| 6641 |
} |
| 6642 |
function dl(a) { |
| 6643 |
if (!a) return Vf; |
| 6644 |
a = a._reactInternals; |
| 6645 |
a: { |
| 6646 |
if (Vb(a) !== a || 1 !== a.tag) throw Error(p$1(170)); |
| 6647 |
var b2 = a; |
| 6648 |
do { |
| 6649 |
switch (b2.tag) { |
| 6650 |
case 3: |
| 6651 |
b2 = b2.stateNode.context; |
| 6652 |
break a; |
| 6653 |
case 1: |
| 6654 |
if (Zf(b2.type)) { |
| 6655 |
b2 = b2.stateNode.__reactInternalMemoizedMergedChildContext; |
| 6656 |
break a; |
| 6657 |
} |
| 6658 |
} |
| 6659 |
b2 = b2.return; |
| 6660 |
} while (null !== b2); |
| 6661 |
throw Error(p$1(171)); |
| 6662 |
} |
| 6663 |
if (1 === a.tag) { |
| 6664 |
var c2 = a.type; |
| 6665 |
if (Zf(c2)) return bg(a, c2, b2); |
| 6666 |
} |
| 6667 |
return b2; |
| 6668 |
} |
| 6669 |
function el(a, b2, c2, d2, e2, f2, g2, h2, k2) { |
| 6670 |
a = bl(c2, d2, true, a, e2, f2, g2, h2, k2); |
| 6671 |
a.context = dl(null); |
| 6672 |
c2 = a.current; |
| 6673 |
d2 = R(); |
| 6674 |
e2 = yi(c2); |
| 6675 |
f2 = mh(d2, e2); |
| 6676 |
f2.callback = void 0 !== b2 && null !== b2 ? b2 : null; |
| 6677 |
nh(c2, f2, e2); |
| 6678 |
a.current.lanes = e2; |
| 6679 |
Ac(a, e2, d2); |
| 6680 |
Dk(a, d2); |
| 6681 |
return a; |
| 6682 |
} |
| 6683 |
function fl(a, b2, c2, d2) { |
| 6684 |
var e2 = b2.current, f2 = R(), g2 = yi(e2); |
| 6685 |
c2 = dl(c2); |
| 6686 |
null === b2.context ? b2.context = c2 : b2.pendingContext = c2; |
| 6687 |
b2 = mh(f2, g2); |
| 6688 |
b2.payload = { element: a }; |
| 6689 |
d2 = void 0 === d2 ? null : d2; |
| 6690 |
null !== d2 && (b2.callback = d2); |
| 6691 |
a = nh(e2, b2, g2); |
| 6692 |
null !== a && (gi(a, e2, g2, f2), oh(a, e2, g2)); |
| 6693 |
return g2; |
| 6694 |
} |
| 6695 |
function gl(a) { |
| 6696 |
a = a.current; |
| 6697 |
if (!a.child) return null; |
| 6698 |
switch (a.child.tag) { |
| 6699 |
case 5: |
| 6700 |
return a.child.stateNode; |
| 6701 |
default: |
| 6702 |
return a.child.stateNode; |
| 6703 |
} |
| 6704 |
} |
| 6705 |
function hl(a, b2) { |
| 6706 |
a = a.memoizedState; |
| 6707 |
if (null !== a && null !== a.dehydrated) { |
| 6708 |
var c2 = a.retryLane; |
| 6709 |
a.retryLane = 0 !== c2 && c2 < b2 ? c2 : b2; |
| 6710 |
} |
| 6711 |
} |
| 6712 |
function il(a, b2) { |
| 6713 |
hl(a, b2); |
| 6714 |
(a = a.alternate) && hl(a, b2); |
| 6715 |
} |
| 6716 |
function jl() { |
| 6717 |
return null; |
| 6718 |
} |
| 6719 |
var kl = "function" === typeof reportError ? reportError : function(a) { |
| 6720 |
console.error(a); |
| 6721 |
}; |
| 6722 |
function ll(a) { |
| 6723 |
this._internalRoot = a; |
| 6724 |
} |
| 6725 |
ml.prototype.render = ll.prototype.render = function(a) { |
| 6726 |
var b2 = this._internalRoot; |
| 6727 |
if (null === b2) throw Error(p$1(409)); |
| 6728 |
fl(a, b2, null, null); |
| 6729 |
}; |
| 6730 |
ml.prototype.unmount = ll.prototype.unmount = function() { |
| 6731 |
var a = this._internalRoot; |
| 6732 |
if (null !== a) { |
| 6733 |
this._internalRoot = null; |
| 6734 |
var b2 = a.containerInfo; |
| 6735 |
Rk(function() { |
| 6736 |
fl(null, a, null, null); |
| 6737 |
}); |
| 6738 |
b2[uf] = null; |
| 6739 |
} |
| 6740 |
}; |
| 6741 |
function ml(a) { |
| 6742 |
this._internalRoot = a; |
| 6743 |
} |
| 6744 |
ml.prototype.unstable_scheduleHydration = function(a) { |
| 6745 |
if (a) { |
| 6746 |
var b2 = Hc(); |
| 6747 |
a = { blockedOn: null, target: a, priority: b2 }; |
| 6748 |
for (var c2 = 0; c2 < Qc.length && 0 !== b2 && b2 < Qc[c2].priority; c2++) ; |
| 6749 |
Qc.splice(c2, 0, a); |
| 6750 |
0 === c2 && Vc(a); |
| 6751 |
} |
| 6752 |
}; |
| 6753 |
function nl(a) { |
| 6754 |
return !(!a || 1 !== a.nodeType && 9 !== a.nodeType && 11 !== a.nodeType); |
| 6755 |
} |
| 6756 |
function ol(a) { |
| 6757 |
return !(!a || 1 !== a.nodeType && 9 !== a.nodeType && 11 !== a.nodeType && (8 !== a.nodeType || " react-mount-point-unstable " !== a.nodeValue)); |
| 6758 |
} |
| 6759 |
function pl() { |
| 6760 |
} |
| 6761 |
function ql(a, b2, c2, d2, e2) { |
| 6762 |
if (e2) { |
| 6763 |
if ("function" === typeof d2) { |
| 6764 |
var f2 = d2; |
| 6765 |
d2 = function() { |
| 6766 |
var a2 = gl(g2); |
| 6767 |
f2.call(a2); |
| 6768 |
}; |
| 6769 |
} |
| 6770 |
var g2 = el(b2, d2, a, 0, null, false, false, "", pl); |
| 6771 |
a._reactRootContainer = g2; |
| 6772 |
a[uf] = g2.current; |
| 6773 |
sf(8 === a.nodeType ? a.parentNode : a); |
| 6774 |
Rk(); |
| 6775 |
return g2; |
| 6776 |
} |
| 6777 |
for (; e2 = a.lastChild; ) a.removeChild(e2); |
| 6778 |
if ("function" === typeof d2) { |
| 6779 |
var h2 = d2; |
| 6780 |
d2 = function() { |
| 6781 |
var a2 = gl(k2); |
| 6782 |
h2.call(a2); |
| 6783 |
}; |
| 6784 |
} |
| 6785 |
var k2 = bl(a, 0, false, null, null, false, false, "", pl); |
| 6786 |
a._reactRootContainer = k2; |
| 6787 |
a[uf] = k2.current; |
| 6788 |
sf(8 === a.nodeType ? a.parentNode : a); |
| 6789 |
Rk(function() { |
| 6790 |
fl(b2, k2, c2, d2); |
| 6791 |
}); |
| 6792 |
return k2; |
| 6793 |
} |
| 6794 |
function rl(a, b2, c2, d2, e2) { |
| 6795 |
var f2 = c2._reactRootContainer; |
| 6796 |
if (f2) { |
| 6797 |
var g2 = f2; |
| 6798 |
if ("function" === typeof e2) { |
| 6799 |
var h2 = e2; |
| 6800 |
e2 = function() { |
| 6801 |
var a2 = gl(g2); |
| 6802 |
h2.call(a2); |
| 6803 |
}; |
| 6804 |
} |
| 6805 |
fl(b2, g2, a, e2); |
| 6806 |
} else g2 = ql(c2, b2, a, e2, d2); |
| 6807 |
return gl(g2); |
| 6808 |
} |
| 6809 |
Ec = function(a) { |
| 6810 |
switch (a.tag) { |
| 6811 |
case 3: |
| 6812 |
var b2 = a.stateNode; |
| 6813 |
if (b2.current.memoizedState.isDehydrated) { |
| 6814 |
var c2 = tc(b2.pendingLanes); |
| 6815 |
0 !== c2 && (Cc(b2, c2 | 1), Dk(b2, B()), 0 === (K & 6) && (Gj = B() + 500, jg())); |
| 6816 |
} |
| 6817 |
break; |
| 6818 |
case 13: |
| 6819 |
Rk(function() { |
| 6820 |
var b3 = ih(a, 1); |
| 6821 |
if (null !== b3) { |
| 6822 |
var c3 = R(); |
| 6823 |
gi(b3, a, 1, c3); |
| 6824 |
} |
| 6825 |
}), il(a, 1); |
| 6826 |
} |
| 6827 |
}; |
| 6828 |
Fc = function(a) { |
| 6829 |
if (13 === a.tag) { |
| 6830 |
var b2 = ih(a, 134217728); |
| 6831 |
if (null !== b2) { |
| 6832 |
var c2 = R(); |
| 6833 |
gi(b2, a, 134217728, c2); |
| 6834 |
} |
| 6835 |
il(a, 134217728); |
| 6836 |
} |
| 6837 |
}; |
| 6838 |
Gc = function(a) { |
| 6839 |
if (13 === a.tag) { |
| 6840 |
var b2 = yi(a), c2 = ih(a, b2); |
| 6841 |
if (null !== c2) { |
| 6842 |
var d2 = R(); |
| 6843 |
gi(c2, a, b2, d2); |
| 6844 |
} |
| 6845 |
il(a, b2); |
| 6846 |
} |
| 6847 |
}; |
| 6848 |
Hc = function() { |
| 6849 |
return C; |
| 6850 |
}; |
| 6851 |
Ic = function(a, b2) { |
| 6852 |
var c2 = C; |
| 6853 |
try { |
| 6854 |
return C = a, b2(); |
| 6855 |
} finally { |
| 6856 |
C = c2; |
| 6857 |
} |
| 6858 |
}; |
| 6859 |
yb = function(a, b2, c2) { |
| 6860 |
switch (b2) { |
| 6861 |
case "input": |
| 6862 |
bb(a, c2); |
| 6863 |
b2 = c2.name; |
| 6864 |
if ("radio" === c2.type && null != b2) { |
| 6865 |
for (c2 = a; c2.parentNode; ) c2 = c2.parentNode; |
| 6866 |
c2 = c2.querySelectorAll("input[name=" + JSON.stringify("" + b2) + '][type="radio"]'); |
| 6867 |
for (b2 = 0; b2 < c2.length; b2++) { |
| 6868 |
var d2 = c2[b2]; |
| 6869 |
if (d2 !== a && d2.form === a.form) { |
| 6870 |
var e2 = Db(d2); |
| 6871 |
if (!e2) throw Error(p$1(90)); |
| 6872 |
Wa(d2); |
| 6873 |
bb(d2, e2); |
| 6874 |
} |
| 6875 |
} |
| 6876 |
} |
| 6877 |
break; |
| 6878 |
case "textarea": |
| 6879 |
ib(a, c2); |
| 6880 |
break; |
| 6881 |
case "select": |
| 6882 |
b2 = c2.value, null != b2 && fb(a, !!c2.multiple, b2, false); |
| 6883 |
} |
| 6884 |
}; |
| 6885 |
Gb = Qk; |
| 6886 |
Hb = Rk; |
| 6887 |
var sl = { usingClientEntryPoint: false, Events: [Cb, ue, Db, Eb, Fb, Qk] }, tl = { findFiberByHostInstance: Wc, bundleType: 0, version: "18.3.1", rendererPackageName: "react-dom" }; |
| 6888 |
var ul = { bundleType: tl.bundleType, version: tl.version, rendererPackageName: tl.rendererPackageName, rendererConfig: tl.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, overrideProps: null, overridePropsDeletePath: null, overridePropsRenamePath: null, setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, currentDispatcherRef: ua.ReactCurrentDispatcher, findHostInstanceByFiber: function(a) { |
| 6889 |
a = Zb(a); |
| 6890 |
return null === a ? null : a.stateNode; |
| 6891 |
}, findFiberByHostInstance: tl.findFiberByHostInstance || jl, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, reconcilerVersion: "18.3.1-next-f1338f8080-20240426" }; |
| 6892 |
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { |
| 6893 |
var vl = __REACT_DEVTOOLS_GLOBAL_HOOK__; |
| 6894 |
if (!vl.isDisabled && vl.supportsFiber) try { |
| 6895 |
kc = vl.inject(ul), lc = vl; |
| 6896 |
} catch (a) { |
| 6897 |
} |
| 6898 |
} |
| 6899 |
reactDom_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = sl; |
| 6900 |
reactDom_production_min.createPortal = function(a, b2) { |
| 6901 |
var c2 = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null; |
| 6902 |
if (!nl(b2)) throw Error(p$1(200)); |
| 6903 |
return cl(a, b2, null, c2); |
| 6904 |
}; |
| 6905 |
reactDom_production_min.createRoot = function(a, b2) { |
| 6906 |
if (!nl(a)) throw Error(p$1(299)); |
| 6907 |
var c2 = false, d2 = "", e2 = kl; |
| 6908 |
null !== b2 && void 0 !== b2 && (true === b2.unstable_strictMode && (c2 = true), void 0 !== b2.identifierPrefix && (d2 = b2.identifierPrefix), void 0 !== b2.onRecoverableError && (e2 = b2.onRecoverableError)); |
| 6909 |
b2 = bl(a, 1, false, null, null, c2, false, d2, e2); |
| 6910 |
a[uf] = b2.current; |
| 6911 |
sf(8 === a.nodeType ? a.parentNode : a); |
| 6912 |
return new ll(b2); |
| 6913 |
}; |
| 6914 |
reactDom_production_min.findDOMNode = function(a) { |
| 6915 |
if (null == a) return null; |
| 6916 |
if (1 === a.nodeType) return a; |
| 6917 |
var b2 = a._reactInternals; |
| 6918 |
if (void 0 === b2) { |
| 6919 |
if ("function" === typeof a.render) throw Error(p$1(188)); |
| 6920 |
a = Object.keys(a).join(","); |
| 6921 |
throw Error(p$1(268, a)); |
| 6922 |
} |
| 6923 |
a = Zb(b2); |
| 6924 |
a = null === a ? null : a.stateNode; |
| 6925 |
return a; |
| 6926 |
}; |
| 6927 |
reactDom_production_min.flushSync = function(a) { |
| 6928 |
return Rk(a); |
| 6929 |
}; |
| 6930 |
reactDom_production_min.hydrate = function(a, b2, c2) { |
| 6931 |
if (!ol(b2)) throw Error(p$1(200)); |
| 6932 |
return rl(null, a, b2, true, c2); |
| 6933 |
}; |
| 6934 |
reactDom_production_min.hydrateRoot = function(a, b2, c2) { |
| 6935 |
if (!nl(a)) throw Error(p$1(405)); |
| 6936 |
var d2 = null != c2 && c2.hydratedSources || null, e2 = false, f2 = "", g2 = kl; |
| 6937 |
null !== c2 && void 0 !== c2 && (true === c2.unstable_strictMode && (e2 = true), void 0 !== c2.identifierPrefix && (f2 = c2.identifierPrefix), void 0 !== c2.onRecoverableError && (g2 = c2.onRecoverableError)); |
| 6938 |
b2 = el(b2, null, a, 1, null != c2 ? c2 : null, e2, false, f2, g2); |
| 6939 |
a[uf] = b2.current; |
| 6940 |
sf(a); |
| 6941 |
if (d2) for (a = 0; a < d2.length; a++) c2 = d2[a], e2 = c2._getVersion, e2 = e2(c2._source), null == b2.mutableSourceEagerHydrationData ? b2.mutableSourceEagerHydrationData = [c2, e2] : b2.mutableSourceEagerHydrationData.push( |
| 6942 |
c2, |
| 6943 |
e2 |
| 6944 |
); |
| 6945 |
return new ml(b2); |
| 6946 |
}; |
| 6947 |
reactDom_production_min.render = function(a, b2, c2) { |
| 6948 |
if (!ol(b2)) throw Error(p$1(200)); |
| 6949 |
return rl(null, a, b2, false, c2); |
| 6950 |
}; |
| 6951 |
reactDom_production_min.unmountComponentAtNode = function(a) { |
| 6952 |
if (!ol(a)) throw Error(p$1(40)); |
| 6953 |
return a._reactRootContainer ? (Rk(function() { |
| 6954 |
rl(null, null, a, false, function() { |
| 6955 |
a._reactRootContainer = null; |
| 6956 |
a[uf] = null; |
| 6957 |
}); |
| 6958 |
}), true) : false; |
| 6959 |
}; |
| 6960 |
reactDom_production_min.unstable_batchedUpdates = Qk; |
| 6961 |
reactDom_production_min.unstable_renderSubtreeIntoContainer = function(a, b2, c2, d2) { |
| 6962 |
if (!ol(c2)) throw Error(p$1(200)); |
| 6963 |
if (null == a || void 0 === a._reactInternals) throw Error(p$1(38)); |
| 6964 |
return rl(a, b2, c2, false, d2); |
| 6965 |
}; |
| 6966 |
reactDom_production_min.version = "18.3.1-next-f1338f8080-20240426"; |
| 6967 |
function checkDCE() { |
| 6968 |
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== "function") { |
| 6969 |
return; |
| 6970 |
} |
| 6971 |
try { |
| 6972 |
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); |
| 6973 |
} catch (err) { |
| 6974 |
console.error(err); |
| 6975 |
} |
| 6976 |
} |
| 6977 |
{ |
| 6978 |
checkDCE(); |
| 6979 |
reactDom.exports = reactDom_production_min; |
| 6980 |
} |
| 6981 |
var reactDomExports = reactDom.exports; |
| 6982 |
var m$1 = reactDomExports; |
| 6983 |
{ |
| 6984 |
client.createRoot = m$1.createRoot; |
| 6985 |
client.hydrateRoot = m$1.hydrateRoot; |
| 6986 |
} |
| 6987 |
var Subscribable = class { |
| 6988 |
constructor() { |
| 6989 |
this.listeners = /* @__PURE__ */ new Set(); |
| 6990 |
this.subscribe = this.subscribe.bind(this); |
| 6991 |
} |
| 6992 |
subscribe(listener) { |
| 6993 |
this.listeners.add(listener); |
| 6994 |
this.onSubscribe(); |
| 6995 |
return () => { |
| 6996 |
this.listeners.delete(listener); |
| 6997 |
this.onUnsubscribe(); |
| 6998 |
}; |
| 6999 |
} |
| 7000 |
hasListeners() { |
| 7001 |
return this.listeners.size > 0; |
| 7002 |
} |
| 7003 |
onSubscribe() { |
| 7004 |
} |
| 7005 |
onUnsubscribe() { |
| 7006 |
} |
| 7007 |
}; |
| 7008 |
var defaultTimeoutProvider = { |
| 7009 |
// We need the wrapper function syntax below instead of direct references to |
| 7010 |
// global setTimeout etc. |
| 7011 |
// |
| 7012 |
// BAD: `setTimeout: setTimeout` |
| 7013 |
// GOOD: `setTimeout: (cb, delay) => setTimeout(cb, delay)` |
| 7014 |
// |
| 7015 |
// If we use direct references here, then anything that wants to spy on or |
| 7016 |
// replace the global setTimeout (like tests) won't work since we'll already |
| 7017 |
// have a hard reference to the original implementation at the time when this |
| 7018 |
// file was imported. |
| 7019 |
setTimeout: (callback, delay) => setTimeout(callback, delay), |
| 7020 |
clearTimeout: (timeoutId) => clearTimeout(timeoutId), |
| 7021 |
setInterval: (callback, delay) => setInterval(callback, delay), |
| 7022 |
clearInterval: (intervalId) => clearInterval(intervalId) |
| 7023 |
}; |
| 7024 |
var TimeoutManager = (_a = class { |
| 7025 |
constructor() { |
| 7026 |
// We cannot have TimeoutManager<T> as we must instantiate it with a concrete |
| 7027 |
// type at app boot; and if we leave that type, then any new timer provider |
| 7028 |
// would need to support ReturnType<typeof setTimeout>, which is infeasible. |
| 7029 |
// |
| 7030 |
// We settle for type safety for the TimeoutProvider type, and accept that |
| 7031 |
// this class is unsafe internally to allow for extension. |
| 7032 |
__privateAdd(this, _provider, defaultTimeoutProvider); |
| 7033 |
__privateAdd(this, _providerCalled, false); |
| 7034 |
} |
| 7035 |
setTimeoutProvider(provider) { |
| 7036 |
__privateSet(this, _provider, provider); |
| 7037 |
} |
| 7038 |
setTimeout(callback, delay) { |
| 7039 |
return __privateGet(this, _provider).setTimeout(callback, delay); |
| 7040 |
} |
| 7041 |
clearTimeout(timeoutId) { |
| 7042 |
__privateGet(this, _provider).clearTimeout(timeoutId); |
| 7043 |
} |
| 7044 |
setInterval(callback, delay) { |
| 7045 |
return __privateGet(this, _provider).setInterval(callback, delay); |
| 7046 |
} |
| 7047 |
clearInterval(intervalId) { |
| 7048 |
__privateGet(this, _provider).clearInterval(intervalId); |
| 7049 |
} |
| 7050 |
}, _provider = new WeakMap(), _providerCalled = new WeakMap(), _a); |
| 7051 |
var timeoutManager = new TimeoutManager(); |
| 7052 |
function systemSetTimeoutZero(callback) { |
| 7053 |
setTimeout(callback, 0); |
| 7054 |
} |
| 7055 |
var isServer = typeof window === "undefined" || "Deno" in globalThis; |
| 7056 |
function noop() { |
| 7057 |
} |
| 7058 |
function functionalUpdate(updater, input) { |
| 7059 |
return typeof updater === "function" ? updater(input) : updater; |
| 7060 |
} |
| 7061 |
function isValidTimeout(value) { |
| 7062 |
return typeof value === "number" && value >= 0 && value !== Infinity; |
| 7063 |
} |
| 7064 |
function timeUntilStale(updatedAt, staleTime) { |
| 7065 |
return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0); |
| 7066 |
} |
| 7067 |
function resolveStaleTime(staleTime, query) { |
| 7068 |
return typeof staleTime === "function" ? staleTime(query) : staleTime; |
| 7069 |
} |
| 7070 |
function resolveEnabled(enabled, query) { |
| 7071 |
return typeof enabled === "function" ? enabled(query) : enabled; |
| 7072 |
} |
| 7073 |
function matchQuery(filters, query) { |
| 7074 |
const { |
| 7075 |
type = "all", |
| 7076 |
exact, |
| 7077 |
fetchStatus, |
| 7078 |
predicate, |
| 7079 |
queryKey, |
| 7080 |
stale |
| 7081 |
} = filters; |
| 7082 |
if (queryKey) { |
| 7083 |
if (exact) { |
| 7084 |
if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) { |
| 7085 |
return false; |
| 7086 |
} |
| 7087 |
} else if (!partialMatchKey(query.queryKey, queryKey)) { |
| 7088 |
return false; |
| 7089 |
} |
| 7090 |
} |
| 7091 |
if (type !== "all") { |
| 7092 |
const isActive = query.isActive(); |
| 7093 |
if (type === "active" && !isActive) { |
| 7094 |
return false; |
| 7095 |
} |
| 7096 |
if (type === "inactive" && isActive) { |
| 7097 |
return false; |
| 7098 |
} |
| 7099 |
} |
| 7100 |
if (typeof stale === "boolean" && query.isStale() !== stale) { |
| 7101 |
return false; |
| 7102 |
} |
| 7103 |
if (fetchStatus && fetchStatus !== query.state.fetchStatus) { |
| 7104 |
return false; |
| 7105 |
} |
| 7106 |
if (predicate && !predicate(query)) { |
| 7107 |
return false; |
| 7108 |
} |
| 7109 |
return true; |
| 7110 |
} |
| 7111 |
function matchMutation(filters, mutation) { |
| 7112 |
const { exact, status, predicate, mutationKey } = filters; |
| 7113 |
if (mutationKey) { |
| 7114 |
if (!mutation.options.mutationKey) { |
| 7115 |
return false; |
| 7116 |
} |
| 7117 |
if (exact) { |
| 7118 |
if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) { |
| 7119 |
return false; |
| 7120 |
} |
| 7121 |
} else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) { |
| 7122 |
return false; |
| 7123 |
} |
| 7124 |
} |
| 7125 |
if (status && mutation.state.status !== status) { |
| 7126 |
return false; |
| 7127 |
} |
| 7128 |
if (predicate && !predicate(mutation)) { |
| 7129 |
return false; |
| 7130 |
} |
| 7131 |
return true; |
| 7132 |
} |
| 7133 |
function hashQueryKeyByOptions(queryKey, options) { |
| 7134 |
const hashFn = (options == null ? void 0 : options.queryKeyHashFn) || hashKey; |
| 7135 |
return hashFn(queryKey); |
| 7136 |
} |
| 7137 |
function hashKey(queryKey) { |
| 7138 |
return JSON.stringify( |
| 7139 |
queryKey, |
| 7140 |
(_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => { |
| 7141 |
result[key] = val[key]; |
| 7142 |
return result; |
| 7143 |
}, {}) : val |
| 7144 |
); |
| 7145 |
} |
| 7146 |
function partialMatchKey(a, b2) { |
| 7147 |
if (a === b2) { |
| 7148 |
return true; |
| 7149 |
} |
| 7150 |
if (typeof a !== typeof b2) { |
| 7151 |
return false; |
| 7152 |
} |
| 7153 |
if (a && b2 && typeof a === "object" && typeof b2 === "object") { |
| 7154 |
return Object.keys(b2).every((key) => partialMatchKey(a[key], b2[key])); |
| 7155 |
} |
| 7156 |
return false; |
| 7157 |
} |
| 7158 |
var hasOwn$1 = Object.prototype.hasOwnProperty; |
| 7159 |
function replaceEqualDeep(a, b2, depth = 0) { |
| 7160 |
if (a === b2) { |
| 7161 |
return a; |
| 7162 |
} |
| 7163 |
if (depth > 500) return b2; |
| 7164 |
const array = isPlainArray(a) && isPlainArray(b2); |
| 7165 |
if (!array && !(isPlainObject(a) && isPlainObject(b2))) return b2; |
| 7166 |
const aItems = array ? a : Object.keys(a); |
| 7167 |
const aSize = aItems.length; |
| 7168 |
const bItems = array ? b2 : Object.keys(b2); |
| 7169 |
const bSize = bItems.length; |
| 7170 |
const copy = array ? new Array(bSize) : {}; |
| 7171 |
let equalItems = 0; |
| 7172 |
for (let i = 0; i < bSize; i++) { |
| 7173 |
const key = array ? i : bItems[i]; |
| 7174 |
const aItem = a[key]; |
| 7175 |
const bItem = b2[key]; |
| 7176 |
if (aItem === bItem) { |
| 7177 |
copy[key] = aItem; |
| 7178 |
if (array ? i < aSize : hasOwn$1.call(a, key)) equalItems++; |
| 7179 |
continue; |
| 7180 |
} |
| 7181 |
if (aItem === null || bItem === null || typeof aItem !== "object" || typeof bItem !== "object") { |
| 7182 |
copy[key] = bItem; |
| 7183 |
continue; |
| 7184 |
} |
| 7185 |
const v2 = replaceEqualDeep(aItem, bItem, depth + 1); |
| 7186 |
copy[key] = v2; |
| 7187 |
if (v2 === aItem) equalItems++; |
| 7188 |
} |
| 7189 |
return aSize === bSize && equalItems === aSize ? a : copy; |
| 7190 |
} |
| 7191 |
function shallowEqualObjects(a, b2) { |
| 7192 |
if (!b2 || Object.keys(a).length !== Object.keys(b2).length) { |
| 7193 |
return false; |
| 7194 |
} |
| 7195 |
for (const key in a) { |
| 7196 |
if (a[key] !== b2[key]) { |
| 7197 |
return false; |
| 7198 |
} |
| 7199 |
} |
| 7200 |
return true; |
| 7201 |
} |
| 7202 |
function isPlainArray(value) { |
| 7203 |
return Array.isArray(value) && value.length === Object.keys(value).length; |
| 7204 |
} |
| 7205 |
function isPlainObject(o) { |
| 7206 |
if (!hasObjectPrototype(o)) { |
| 7207 |
return false; |
| 7208 |
} |
| 7209 |
const ctor = o.constructor; |
| 7210 |
if (ctor === void 0) { |
| 7211 |
return true; |
| 7212 |
} |
| 7213 |
const prot = ctor.prototype; |
| 7214 |
if (!hasObjectPrototype(prot)) { |
| 7215 |
return false; |
| 7216 |
} |
| 7217 |
if (!prot.hasOwnProperty("isPrototypeOf")) { |
| 7218 |
return false; |
| 7219 |
} |
| 7220 |
if (Object.getPrototypeOf(o) !== Object.prototype) { |
| 7221 |
return false; |
| 7222 |
} |
| 7223 |
return true; |
| 7224 |
} |
| 7225 |
function hasObjectPrototype(o) { |
| 7226 |
return Object.prototype.toString.call(o) === "[object Object]"; |
| 7227 |
} |
| 7228 |
function sleep(timeout) { |
| 7229 |
return new Promise((resolve) => { |
| 7230 |
timeoutManager.setTimeout(resolve, timeout); |
| 7231 |
}); |
| 7232 |
} |
| 7233 |
function replaceData(prevData, data, options) { |
| 7234 |
if (typeof options.structuralSharing === "function") { |
| 7235 |
return options.structuralSharing(prevData, data); |
| 7236 |
} else if (options.structuralSharing !== false) { |
| 7237 |
return replaceEqualDeep(prevData, data); |
| 7238 |
} |
| 7239 |
return data; |
| 7240 |
} |
| 7241 |
function addToEnd(items, item, max = 0) { |
| 7242 |
const newItems = [...items, item]; |
| 7243 |
return max && newItems.length > max ? newItems.slice(1) : newItems; |
| 7244 |
} |
| 7245 |
function addToStart(items, item, max = 0) { |
| 7246 |
const newItems = [item, ...items]; |
| 7247 |
return max && newItems.length > max ? newItems.slice(0, -1) : newItems; |
| 7248 |
} |
| 7249 |
var skipToken = /* @__PURE__ */ Symbol(); |
| 7250 |
function ensureQueryFn(options, fetchOptions) { |
| 7251 |
if (!options.queryFn && (fetchOptions == null ? void 0 : fetchOptions.initialPromise)) { |
| 7252 |
return () => fetchOptions.initialPromise; |
| 7253 |
} |
| 7254 |
if (!options.queryFn || options.queryFn === skipToken) { |
| 7255 |
return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`)); |
| 7256 |
} |
| 7257 |
return options.queryFn; |
| 7258 |
} |
| 7259 |
function shouldThrowError(throwOnError, params) { |
| 7260 |
if (typeof throwOnError === "function") { |
| 7261 |
return throwOnError(...params); |
| 7262 |
} |
| 7263 |
return !!throwOnError; |
| 7264 |
} |
| 7265 |
function addConsumeAwareSignal(object, getSignal, onCancelled) { |
| 7266 |
let consumed = false; |
| 7267 |
let signal; |
| 7268 |
Object.defineProperty(object, "signal", { |
| 7269 |
enumerable: true, |
| 7270 |
get: () => { |
| 7271 |
signal ?? (signal = getSignal()); |
| 7272 |
if (consumed) { |
| 7273 |
return signal; |
| 7274 |
} |
| 7275 |
consumed = true; |
| 7276 |
if (signal.aborted) { |
| 7277 |
onCancelled(); |
| 7278 |
} else { |
| 7279 |
signal.addEventListener("abort", onCancelled, { once: true }); |
| 7280 |
} |
| 7281 |
return signal; |
| 7282 |
} |
| 7283 |
}); |
| 7284 |
return object; |
| 7285 |
} |
| 7286 |
var FocusManager = (_b = class extends Subscribable { |
| 7287 |
constructor() { |
| 7288 |
super(); |
| 7289 |
__privateAdd(this, _focused); |
| 7290 |
__privateAdd(this, _cleanup); |
| 7291 |
__privateAdd(this, _setup); |
| 7292 |
__privateSet(this, _setup, (onFocus) => { |
| 7293 |
if (!isServer && window.addEventListener) { |
| 7294 |
const listener = () => onFocus(); |
| 7295 |
window.addEventListener("visibilitychange", listener, false); |
| 7296 |
return () => { |
| 7297 |
window.removeEventListener("visibilitychange", listener); |
| 7298 |
}; |
| 7299 |
} |
| 7300 |
return; |
| 7301 |
}); |
| 7302 |
} |
| 7303 |
onSubscribe() { |
| 7304 |
if (!__privateGet(this, _cleanup)) { |
| 7305 |
this.setEventListener(__privateGet(this, _setup)); |
| 7306 |
} |
| 7307 |
} |
| 7308 |
onUnsubscribe() { |
| 7309 |
var _a2; |
| 7310 |
if (!this.hasListeners()) { |
| 7311 |
(_a2 = __privateGet(this, _cleanup)) == null ? void 0 : _a2.call(this); |
| 7312 |
__privateSet(this, _cleanup, void 0); |
| 7313 |
} |
| 7314 |
} |
| 7315 |
setEventListener(setup) { |
| 7316 |
var _a2; |
| 7317 |
__privateSet(this, _setup, setup); |
| 7318 |
(_a2 = __privateGet(this, _cleanup)) == null ? void 0 : _a2.call(this); |
| 7319 |
__privateSet(this, _cleanup, setup((focused) => { |
| 7320 |
if (typeof focused === "boolean") { |
| 7321 |
this.setFocused(focused); |
| 7322 |
} else { |
| 7323 |
this.onFocus(); |
| 7324 |
} |
| 7325 |
})); |
| 7326 |
} |
| 7327 |
setFocused(focused) { |
| 7328 |
const changed = __privateGet(this, _focused) !== focused; |
| 7329 |
if (changed) { |
| 7330 |
__privateSet(this, _focused, focused); |
| 7331 |
this.onFocus(); |
| 7332 |
} |
| 7333 |
} |
| 7334 |
onFocus() { |
| 7335 |
const isFocused = this.isFocused(); |
| 7336 |
this.listeners.forEach((listener) => { |
| 7337 |
listener(isFocused); |
| 7338 |
}); |
| 7339 |
} |
| 7340 |
isFocused() { |
| 7341 |
var _a2; |
| 7342 |
if (typeof __privateGet(this, _focused) === "boolean") { |
| 7343 |
return __privateGet(this, _focused); |
| 7344 |
} |
| 7345 |
return ((_a2 = globalThis.document) == null ? void 0 : _a2.visibilityState) !== "hidden"; |
| 7346 |
} |
| 7347 |
}, _focused = new WeakMap(), _cleanup = new WeakMap(), _setup = new WeakMap(), _b); |
| 7348 |
var focusManager = new FocusManager(); |
| 7349 |
function pendingThenable() { |
| 7350 |
let resolve; |
| 7351 |
let reject; |
| 7352 |
const thenable = new Promise((_resolve, _reject) => { |
| 7353 |
resolve = _resolve; |
| 7354 |
reject = _reject; |
| 7355 |
}); |
| 7356 |
thenable.status = "pending"; |
| 7357 |
thenable.catch(() => { |
| 7358 |
}); |
| 7359 |
function finalize(data) { |
| 7360 |
Object.assign(thenable, data); |
| 7361 |
delete thenable.resolve; |
| 7362 |
delete thenable.reject; |
| 7363 |
} |
| 7364 |
thenable.resolve = (value) => { |
| 7365 |
finalize({ |
| 7366 |
status: "fulfilled", |
| 7367 |
value |
| 7368 |
}); |
| 7369 |
resolve(value); |
| 7370 |
}; |
| 7371 |
thenable.reject = (reason) => { |
| 7372 |
finalize({ |
| 7373 |
status: "rejected", |
| 7374 |
reason |
| 7375 |
}); |
| 7376 |
reject(reason); |
| 7377 |
}; |
| 7378 |
return thenable; |
| 7379 |
} |
| 7380 |
var defaultScheduler = systemSetTimeoutZero; |
| 7381 |
function createNotifyManager() { |
| 7382 |
let queue = []; |
| 7383 |
let transactions = 0; |
| 7384 |
let notifyFn = (callback) => { |
| 7385 |
callback(); |
| 7386 |
}; |
| 7387 |
let batchNotifyFn = (callback) => { |
| 7388 |
callback(); |
| 7389 |
}; |
| 7390 |
let scheduleFn = defaultScheduler; |
| 7391 |
const schedule = (callback) => { |
| 7392 |
if (transactions) { |
| 7393 |
queue.push(callback); |
| 7394 |
} else { |
| 7395 |
scheduleFn(() => { |
| 7396 |
notifyFn(callback); |
| 7397 |
}); |
| 7398 |
} |
| 7399 |
}; |
| 7400 |
const flush = () => { |
| 7401 |
const originalQueue = queue; |
| 7402 |
queue = []; |
| 7403 |
if (originalQueue.length) { |
| 7404 |
scheduleFn(() => { |
| 7405 |
batchNotifyFn(() => { |
| 7406 |
originalQueue.forEach((callback) => { |
| 7407 |
notifyFn(callback); |
| 7408 |
}); |
| 7409 |
}); |
| 7410 |
}); |
| 7411 |
} |
| 7412 |
}; |
| 7413 |
return { |
| 7414 |
batch: (callback) => { |
| 7415 |
let result; |
| 7416 |
transactions++; |
| 7417 |
try { |
| 7418 |
result = callback(); |
| 7419 |
} finally { |
| 7420 |
transactions--; |
| 7421 |
if (!transactions) { |
| 7422 |
flush(); |
| 7423 |
} |
| 7424 |
} |
| 7425 |
return result; |
| 7426 |
}, |
| 7427 |
/** |
| 7428 |
* All calls to the wrapped function will be batched. |
| 7429 |
*/ |
| 7430 |
batchCalls: (callback) => { |
| 7431 |
return (...args) => { |
| 7432 |
schedule(() => { |
| 7433 |
callback(...args); |
| 7434 |
}); |
| 7435 |
}; |
| 7436 |
}, |
| 7437 |
schedule, |
| 7438 |
/** |
| 7439 |
* Use this method to set a custom notify function. |
| 7440 |
* This can be used to for example wrap notifications with `React.act` while running tests. |
| 7441 |
*/ |
| 7442 |
setNotifyFunction: (fn) => { |
| 7443 |
notifyFn = fn; |
| 7444 |
}, |
| 7445 |
/** |
| 7446 |
* Use this method to set a custom function to batch notifications together into a single tick. |
| 7447 |
* By default React Query will use the batch function provided by ReactDOM or React Native. |
| 7448 |
*/ |
| 7449 |
setBatchNotifyFunction: (fn) => { |
| 7450 |
batchNotifyFn = fn; |
| 7451 |
}, |
| 7452 |
setScheduler: (fn) => { |
| 7453 |
scheduleFn = fn; |
| 7454 |
} |
| 7455 |
}; |
| 7456 |
} |
| 7457 |
var notifyManager = createNotifyManager(); |
| 7458 |
var OnlineManager = (_c = class extends Subscribable { |
| 7459 |
constructor() { |
| 7460 |
super(); |
| 7461 |
__privateAdd(this, _online, true); |
| 7462 |
__privateAdd(this, _cleanup2); |
| 7463 |
__privateAdd(this, _setup2); |
| 7464 |
__privateSet(this, _setup2, (onOnline) => { |
| 7465 |
if (!isServer && window.addEventListener) { |
| 7466 |
const onlineListener = () => onOnline(true); |
| 7467 |
const offlineListener = () => onOnline(false); |
| 7468 |
window.addEventListener("online", onlineListener, false); |
| 7469 |
window.addEventListener("offline", offlineListener, false); |
| 7470 |
return () => { |
| 7471 |
window.removeEventListener("online", onlineListener); |
| 7472 |
window.removeEventListener("offline", offlineListener); |
| 7473 |
}; |
| 7474 |
} |
| 7475 |
return; |
| 7476 |
}); |
| 7477 |
} |
| 7478 |
onSubscribe() { |
| 7479 |
if (!__privateGet(this, _cleanup2)) { |
| 7480 |
this.setEventListener(__privateGet(this, _setup2)); |
| 7481 |
} |
| 7482 |
} |
| 7483 |
onUnsubscribe() { |
| 7484 |
var _a2; |
| 7485 |
if (!this.hasListeners()) { |
| 7486 |
(_a2 = __privateGet(this, _cleanup2)) == null ? void 0 : _a2.call(this); |
| 7487 |
__privateSet(this, _cleanup2, void 0); |
| 7488 |
} |
| 7489 |
} |
| 7490 |
setEventListener(setup) { |
| 7491 |
var _a2; |
| 7492 |
__privateSet(this, _setup2, setup); |
| 7493 |
(_a2 = __privateGet(this, _cleanup2)) == null ? void 0 : _a2.call(this); |
| 7494 |
__privateSet(this, _cleanup2, setup(this.setOnline.bind(this))); |
| 7495 |
} |
| 7496 |
setOnline(online) { |
| 7497 |
const changed = __privateGet(this, _online) !== online; |
| 7498 |
if (changed) { |
| 7499 |
__privateSet(this, _online, online); |
| 7500 |
this.listeners.forEach((listener) => { |
| 7501 |
listener(online); |
| 7502 |
}); |
| 7503 |
} |
| 7504 |
} |
| 7505 |
isOnline() { |
| 7506 |
return __privateGet(this, _online); |
| 7507 |
} |
| 7508 |
}, _online = new WeakMap(), _cleanup2 = new WeakMap(), _setup2 = new WeakMap(), _c); |
| 7509 |
var onlineManager = new OnlineManager(); |
| 7510 |
function defaultRetryDelay(failureCount) { |
| 7511 |
return Math.min(1e3 * 2 ** failureCount, 3e4); |
| 7512 |
} |
| 7513 |
function canFetch(networkMode) { |
| 7514 |
return (networkMode ?? "online") === "online" ? onlineManager.isOnline() : true; |
| 7515 |
} |
| 7516 |
var CancelledError = class extends Error { |
| 7517 |
constructor(options) { |
| 7518 |
super("CancelledError"); |
| 7519 |
this.revert = options == null ? void 0 : options.revert; |
| 7520 |
this.silent = options == null ? void 0 : options.silent; |
| 7521 |
} |
| 7522 |
}; |
| 7523 |
function createRetryer(config) { |
| 7524 |
let isRetryCancelled = false; |
| 7525 |
let failureCount = 0; |
| 7526 |
let continueFn; |
| 7527 |
const thenable = pendingThenable(); |
| 7528 |
const isResolved = () => thenable.status !== "pending"; |
| 7529 |
const cancel = (cancelOptions) => { |
| 7530 |
var _a2; |
| 7531 |
if (!isResolved()) { |
| 7532 |
const error = new CancelledError(cancelOptions); |
| 7533 |
reject(error); |
| 7534 |
(_a2 = config.onCancel) == null ? void 0 : _a2.call(config, error); |
| 7535 |
} |
| 7536 |
}; |
| 7537 |
const cancelRetry = () => { |
| 7538 |
isRetryCancelled = true; |
| 7539 |
}; |
| 7540 |
const continueRetry = () => { |
| 7541 |
isRetryCancelled = false; |
| 7542 |
}; |
| 7543 |
const canContinue = () => focusManager.isFocused() && (config.networkMode === "always" || onlineManager.isOnline()) && config.canRun(); |
| 7544 |
const canStart = () => canFetch(config.networkMode) && config.canRun(); |
| 7545 |
const resolve = (value) => { |
| 7546 |
if (!isResolved()) { |
| 7547 |
continueFn == null ? void 0 : continueFn(); |
| 7548 |
thenable.resolve(value); |
| 7549 |
} |
| 7550 |
}; |
| 7551 |
const reject = (value) => { |
| 7552 |
if (!isResolved()) { |
| 7553 |
continueFn == null ? void 0 : continueFn(); |
| 7554 |
thenable.reject(value); |
| 7555 |
} |
| 7556 |
}; |
| 7557 |
const pause = () => { |
| 7558 |
return new Promise((continueResolve) => { |
| 7559 |
var _a2; |
| 7560 |
continueFn = (value) => { |
| 7561 |
if (isResolved() || canContinue()) { |
| 7562 |
continueResolve(value); |
| 7563 |
} |
| 7564 |
}; |
| 7565 |
(_a2 = config.onPause) == null ? void 0 : _a2.call(config); |
| 7566 |
}).then(() => { |
| 7567 |
var _a2; |
| 7568 |
continueFn = void 0; |
| 7569 |
if (!isResolved()) { |
| 7570 |
(_a2 = config.onContinue) == null ? void 0 : _a2.call(config); |
| 7571 |
} |
| 7572 |
}); |
| 7573 |
}; |
| 7574 |
const run = () => { |
| 7575 |
if (isResolved()) { |
| 7576 |
return; |
| 7577 |
} |
| 7578 |
let promiseOrValue; |
| 7579 |
const initialPromise = failureCount === 0 ? config.initialPromise : void 0; |
| 7580 |
try { |
| 7581 |
promiseOrValue = initialPromise ?? config.fn(); |
| 7582 |
} catch (error) { |
| 7583 |
promiseOrValue = Promise.reject(error); |
| 7584 |
} |
| 7585 |
Promise.resolve(promiseOrValue).then(resolve).catch((error) => { |
| 7586 |
var _a2; |
| 7587 |
if (isResolved()) { |
| 7588 |
return; |
| 7589 |
} |
| 7590 |
const retry = config.retry ?? (isServer ? 0 : 3); |
| 7591 |
const retryDelay = config.retryDelay ?? defaultRetryDelay; |
| 7592 |
const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay; |
| 7593 |
const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error); |
| 7594 |
if (isRetryCancelled || !shouldRetry) { |
| 7595 |
reject(error); |
| 7596 |
return; |
| 7597 |
} |
| 7598 |
failureCount++; |
| 7599 |
(_a2 = config.onFail) == null ? void 0 : _a2.call(config, failureCount, error); |
| 7600 |
sleep(delay).then(() => { |
| 7601 |
return canContinue() ? void 0 : pause(); |
| 7602 |
}).then(() => { |
| 7603 |
if (isRetryCancelled) { |
| 7604 |
reject(error); |
| 7605 |
} else { |
| 7606 |
run(); |
| 7607 |
} |
| 7608 |
}); |
| 7609 |
}); |
| 7610 |
}; |
| 7611 |
return { |
| 7612 |
promise: thenable, |
| 7613 |
status: () => thenable.status, |
| 7614 |
cancel, |
| 7615 |
continue: () => { |
| 7616 |
continueFn == null ? void 0 : continueFn(); |
| 7617 |
return thenable; |
| 7618 |
}, |
| 7619 |
cancelRetry, |
| 7620 |
continueRetry, |
| 7621 |
canStart, |
| 7622 |
start: () => { |
| 7623 |
if (canStart()) { |
| 7624 |
run(); |
| 7625 |
} else { |
| 7626 |
pause().then(run); |
| 7627 |
} |
| 7628 |
return thenable; |
| 7629 |
} |
| 7630 |
}; |
| 7631 |
} |
| 7632 |
var Removable = (_d = class { |
| 7633 |
constructor() { |
| 7634 |
__privateAdd(this, _gcTimeout); |
| 7635 |
} |
| 7636 |
destroy() { |
| 7637 |
this.clearGcTimeout(); |
| 7638 |
} |
| 7639 |
scheduleGc() { |
| 7640 |
this.clearGcTimeout(); |
| 7641 |
if (isValidTimeout(this.gcTime)) { |
| 7642 |
__privateSet(this, _gcTimeout, timeoutManager.setTimeout(() => { |
| 7643 |
this.optionalRemove(); |
| 7644 |
}, this.gcTime)); |
| 7645 |
} |
| 7646 |
} |
| 7647 |
updateGcTime(newGcTime) { |
| 7648 |
this.gcTime = Math.max( |
| 7649 |
this.gcTime || 0, |
| 7650 |
newGcTime ?? (isServer ? Infinity : 5 * 60 * 1e3) |
| 7651 |
); |
| 7652 |
} |
| 7653 |
clearGcTimeout() { |
| 7654 |
if (__privateGet(this, _gcTimeout)) { |
| 7655 |
timeoutManager.clearTimeout(__privateGet(this, _gcTimeout)); |
| 7656 |
__privateSet(this, _gcTimeout, void 0); |
| 7657 |
} |
| 7658 |
} |
| 7659 |
}, _gcTimeout = new WeakMap(), _d); |
| 7660 |
var Query = (_e = class extends Removable { |
| 7661 |
constructor(config) { |
| 7662 |
super(); |
| 7663 |
__privateAdd(this, _Query_instances); |
| 7664 |
__privateAdd(this, _initialState); |
| 7665 |
__privateAdd(this, _revertState); |
| 7666 |
__privateAdd(this, _cache); |
| 7667 |
__privateAdd(this, _client); |
| 7668 |
__privateAdd(this, _retryer); |
| 7669 |
__privateAdd(this, _defaultOptions); |
| 7670 |
__privateAdd(this, _abortSignalConsumed); |
| 7671 |
__privateSet(this, _abortSignalConsumed, false); |
| 7672 |
__privateSet(this, _defaultOptions, config.defaultOptions); |
| 7673 |
this.setOptions(config.options); |
| 7674 |
this.observers = []; |
| 7675 |
__privateSet(this, _client, config.client); |
| 7676 |
__privateSet(this, _cache, __privateGet(this, _client).getQueryCache()); |
| 7677 |
this.queryKey = config.queryKey; |
| 7678 |
this.queryHash = config.queryHash; |
| 7679 |
__privateSet(this, _initialState, getDefaultState$1(this.options)); |
| 7680 |
this.state = config.state ?? __privateGet(this, _initialState); |
| 7681 |
this.scheduleGc(); |
| 7682 |
} |
| 7683 |
get meta() { |
| 7684 |
return this.options.meta; |
| 7685 |
} |
| 7686 |
get promise() { |
| 7687 |
var _a2; |
| 7688 |
return (_a2 = __privateGet(this, _retryer)) == null ? void 0 : _a2.promise; |
| 7689 |
} |
| 7690 |
setOptions(options) { |
| 7691 |
this.options = { ...__privateGet(this, _defaultOptions), ...options }; |
| 7692 |
this.updateGcTime(this.options.gcTime); |
| 7693 |
if (this.state && this.state.data === void 0) { |
| 7694 |
const defaultState = getDefaultState$1(this.options); |
| 7695 |
if (defaultState.data !== void 0) { |
| 7696 |
this.setState( |
| 7697 |
successState(defaultState.data, defaultState.dataUpdatedAt) |
| 7698 |
); |
| 7699 |
__privateSet(this, _initialState, defaultState); |
| 7700 |
} |
| 7701 |
} |
| 7702 |
} |
| 7703 |
optionalRemove() { |
| 7704 |
if (!this.observers.length && this.state.fetchStatus === "idle") { |
| 7705 |
__privateGet(this, _cache).remove(this); |
| 7706 |
} |
| 7707 |
} |
| 7708 |
setData(newData, options) { |
| 7709 |
const data = replaceData(this.state.data, newData, this.options); |
| 7710 |
__privateMethod(this, _Query_instances, dispatch_fn).call(this, { |
| 7711 |
data, |
| 7712 |
type: "success", |
| 7713 |
dataUpdatedAt: options == null ? void 0 : options.updatedAt, |
| 7714 |
manual: options == null ? void 0 : options.manual |
| 7715 |
}); |
| 7716 |
return data; |
| 7717 |
} |
| 7718 |
setState(state, setStateOptions) { |
| 7719 |
__privateMethod(this, _Query_instances, dispatch_fn).call(this, { type: "setState", state, setStateOptions }); |
| 7720 |
} |
| 7721 |
cancel(options) { |
| 7722 |
var _a2, _b2; |
| 7723 |
const promise = (_a2 = __privateGet(this, _retryer)) == null ? void 0 : _a2.promise; |
| 7724 |
(_b2 = __privateGet(this, _retryer)) == null ? void 0 : _b2.cancel(options); |
| 7725 |
return promise ? promise.then(noop).catch(noop) : Promise.resolve(); |
| 7726 |
} |
| 7727 |
destroy() { |
| 7728 |
super.destroy(); |
| 7729 |
this.cancel({ silent: true }); |
| 7730 |
} |
| 7731 |
reset() { |
| 7732 |
this.destroy(); |
| 7733 |
this.setState(__privateGet(this, _initialState)); |
| 7734 |
} |
| 7735 |
isActive() { |
| 7736 |
return this.observers.some( |
| 7737 |
(observer) => resolveEnabled(observer.options.enabled, this) !== false |
| 7738 |
); |
| 7739 |
} |
| 7740 |
isDisabled() { |
| 7741 |
if (this.getObserversCount() > 0) { |
| 7742 |
return !this.isActive(); |
| 7743 |
} |
| 7744 |
return this.options.queryFn === skipToken || this.state.dataUpdateCount + this.state.errorUpdateCount === 0; |
| 7745 |
} |
| 7746 |
isStatic() { |
| 7747 |
if (this.getObserversCount() > 0) { |
| 7748 |
return this.observers.some( |
| 7749 |
(observer) => resolveStaleTime(observer.options.staleTime, this) === "static" |
| 7750 |
); |
| 7751 |
} |
| 7752 |
return false; |
| 7753 |
} |
| 7754 |
isStale() { |
| 7755 |
if (this.getObserversCount() > 0) { |
| 7756 |
return this.observers.some( |
| 7757 |
(observer) => observer.getCurrentResult().isStale |
| 7758 |
); |
| 7759 |
} |
| 7760 |
return this.state.data === void 0 || this.state.isInvalidated; |
| 7761 |
} |
| 7762 |
isStaleByTime(staleTime = 0) { |
| 7763 |
if (this.state.data === void 0) { |
| 7764 |
return true; |
| 7765 |
} |
| 7766 |
if (staleTime === "static") { |
| 7767 |
return false; |
| 7768 |
} |
| 7769 |
if (this.state.isInvalidated) { |
| 7770 |
return true; |
| 7771 |
} |
| 7772 |
return !timeUntilStale(this.state.dataUpdatedAt, staleTime); |
| 7773 |
} |
| 7774 |
onFocus() { |
| 7775 |
var _a2; |
| 7776 |
const observer = this.observers.find((x2) => x2.shouldFetchOnWindowFocus()); |
| 7777 |
observer == null ? void 0 : observer.refetch({ cancelRefetch: false }); |
| 7778 |
(_a2 = __privateGet(this, _retryer)) == null ? void 0 : _a2.continue(); |
| 7779 |
} |
| 7780 |
onOnline() { |
| 7781 |
var _a2; |
| 7782 |
const observer = this.observers.find((x2) => x2.shouldFetchOnReconnect()); |
| 7783 |
observer == null ? void 0 : observer.refetch({ cancelRefetch: false }); |
| 7784 |
(_a2 = __privateGet(this, _retryer)) == null ? void 0 : _a2.continue(); |
| 7785 |
} |
| 7786 |
addObserver(observer) { |
| 7787 |
if (!this.observers.includes(observer)) { |
| 7788 |
this.observers.push(observer); |
| 7789 |
this.clearGcTimeout(); |
| 7790 |
__privateGet(this, _cache).notify({ type: "observerAdded", query: this, observer }); |
| 7791 |
} |
| 7792 |
} |
| 7793 |
removeObserver(observer) { |
| 7794 |
if (this.observers.includes(observer)) { |
| 7795 |
this.observers = this.observers.filter((x2) => x2 !== observer); |
| 7796 |
if (!this.observers.length) { |
| 7797 |
if (__privateGet(this, _retryer)) { |
| 7798 |
if (__privateGet(this, _abortSignalConsumed)) { |
| 7799 |
__privateGet(this, _retryer).cancel({ revert: true }); |
| 7800 |
} else { |
| 7801 |
__privateGet(this, _retryer).cancelRetry(); |
| 7802 |
} |
| 7803 |
} |
| 7804 |
this.scheduleGc(); |
| 7805 |
} |
| 7806 |
__privateGet(this, _cache).notify({ type: "observerRemoved", query: this, observer }); |
| 7807 |
} |
| 7808 |
} |
| 7809 |
getObserversCount() { |
| 7810 |
return this.observers.length; |
| 7811 |
} |
| 7812 |
invalidate() { |
| 7813 |
if (!this.state.isInvalidated) { |
| 7814 |
__privateMethod(this, _Query_instances, dispatch_fn).call(this, { type: "invalidate" }); |
| 7815 |
} |
| 7816 |
} |
| 7817 |
async fetch(options, fetchOptions) { |
| 7818 |
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l; |
| 7819 |
if (this.state.fetchStatus !== "idle" && // If the promise in the retryer is already rejected, we have to definitely |
| 7820 |
// re-start the fetch; there is a chance that the query is still in a |
| 7821 |
// pending state when that happens |
| 7822 |
((_a2 = __privateGet(this, _retryer)) == null ? void 0 : _a2.status()) !== "rejected") { |
| 7823 |
if (this.state.data !== void 0 && (fetchOptions == null ? void 0 : fetchOptions.cancelRefetch)) { |
| 7824 |
this.cancel({ silent: true }); |
| 7825 |
} else if (__privateGet(this, _retryer)) { |
| 7826 |
__privateGet(this, _retryer).continueRetry(); |
| 7827 |
return __privateGet(this, _retryer).promise; |
| 7828 |
} |
| 7829 |
} |
| 7830 |
if (options) { |
| 7831 |
this.setOptions(options); |
| 7832 |
} |
| 7833 |
if (!this.options.queryFn) { |
| 7834 |
const observer = this.observers.find((x2) => x2.options.queryFn); |
| 7835 |
if (observer) { |
| 7836 |
this.setOptions(observer.options); |
| 7837 |
} |
| 7838 |
} |
| 7839 |
const abortController = new AbortController(); |
| 7840 |
const addSignalProperty = (object) => { |
| 7841 |
Object.defineProperty(object, "signal", { |
| 7842 |
enumerable: true, |
| 7843 |
get: () => { |
| 7844 |
__privateSet(this, _abortSignalConsumed, true); |
| 7845 |
return abortController.signal; |
| 7846 |
} |
| 7847 |
}); |
| 7848 |
}; |
| 7849 |
const fetchFn = () => { |
| 7850 |
const queryFn = ensureQueryFn(this.options, fetchOptions); |
| 7851 |
const createQueryFnContext = () => { |
| 7852 |
const queryFnContext2 = { |
| 7853 |
client: __privateGet(this, _client), |
| 7854 |
queryKey: this.queryKey, |
| 7855 |
meta: this.meta |
| 7856 |
}; |
| 7857 |
addSignalProperty(queryFnContext2); |
| 7858 |
return queryFnContext2; |
| 7859 |
}; |
| 7860 |
const queryFnContext = createQueryFnContext(); |
| 7861 |
__privateSet(this, _abortSignalConsumed, false); |
| 7862 |
if (this.options.persister) { |
| 7863 |
return this.options.persister( |
| 7864 |
queryFn, |
| 7865 |
queryFnContext, |
| 7866 |
this |
| 7867 |
); |
| 7868 |
} |
| 7869 |
return queryFn(queryFnContext); |
| 7870 |
}; |
| 7871 |
const createFetchContext = () => { |
| 7872 |
const context2 = { |
| 7873 |
fetchOptions, |
| 7874 |
options: this.options, |
| 7875 |
queryKey: this.queryKey, |
| 7876 |
client: __privateGet(this, _client), |
| 7877 |
state: this.state, |
| 7878 |
fetchFn |
| 7879 |
}; |
| 7880 |
addSignalProperty(context2); |
| 7881 |
return context2; |
| 7882 |
}; |
| 7883 |
const context = createFetchContext(); |
| 7884 |
(_b2 = this.options.behavior) == null ? void 0 : _b2.onFetch(context, this); |
| 7885 |
__privateSet(this, _revertState, this.state); |
| 7886 |
if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((_c2 = context.fetchOptions) == null ? void 0 : _c2.meta)) { |
| 7887 |
__privateMethod(this, _Query_instances, dispatch_fn).call(this, { type: "fetch", meta: (_d2 = context.fetchOptions) == null ? void 0 : _d2.meta }); |
| 7888 |
} |
| 7889 |
__privateSet(this, _retryer, createRetryer({ |
| 7890 |
initialPromise: fetchOptions == null ? void 0 : fetchOptions.initialPromise, |
| 7891 |
fn: context.fetchFn, |
| 7892 |
onCancel: (error) => { |
| 7893 |
if (error instanceof CancelledError && error.revert) { |
| 7894 |
this.setState({ |
| 7895 |
...__privateGet(this, _revertState), |
| 7896 |
fetchStatus: "idle" |
| 7897 |
}); |
| 7898 |
} |
| 7899 |
abortController.abort(); |
| 7900 |
}, |
| 7901 |
onFail: (failureCount, error) => { |
| 7902 |
__privateMethod(this, _Query_instances, dispatch_fn).call(this, { type: "failed", failureCount, error }); |
| 7903 |
}, |
| 7904 |
onPause: () => { |
| 7905 |
__privateMethod(this, _Query_instances, dispatch_fn).call(this, { type: "pause" }); |
| 7906 |
}, |
| 7907 |
onContinue: () => { |
| 7908 |
__privateMethod(this, _Query_instances, dispatch_fn).call(this, { type: "continue" }); |
| 7909 |
}, |
| 7910 |
retry: context.options.retry, |
| 7911 |
retryDelay: context.options.retryDelay, |
| 7912 |
networkMode: context.options.networkMode, |
| 7913 |
canRun: () => true |
| 7914 |
})); |
| 7915 |
try { |
| 7916 |
const data = await __privateGet(this, _retryer).start(); |
| 7917 |
if (data === void 0) { |
| 7918 |
if (false) ; |
| 7919 |
throw new Error(`${this.queryHash} data is undefined`); |
| 7920 |
} |
| 7921 |
this.setData(data); |
| 7922 |
(_f2 = (_e2 = __privateGet(this, _cache).config).onSuccess) == null ? void 0 : _f2.call(_e2, data, this); |
| 7923 |
(_h2 = (_g2 = __privateGet(this, _cache).config).onSettled) == null ? void 0 : _h2.call( |
| 7924 |
_g2, |
| 7925 |
data, |
| 7926 |
this.state.error, |
| 7927 |
this |
| 7928 |
); |
| 7929 |
return data; |
| 7930 |
} catch (error) { |
| 7931 |
if (error instanceof CancelledError) { |
| 7932 |
if (error.silent) { |
| 7933 |
return __privateGet(this, _retryer).promise; |
| 7934 |
} else if (error.revert) { |
| 7935 |
if (this.state.data === void 0) { |
| 7936 |
throw error; |
| 7937 |
} |
| 7938 |
return this.state.data; |
| 7939 |
} |
| 7940 |
} |
| 7941 |
__privateMethod(this, _Query_instances, dispatch_fn).call(this, { |
| 7942 |
type: "error", |
| 7943 |
error |
| 7944 |
}); |
| 7945 |
(_j2 = (_i2 = __privateGet(this, _cache).config).onError) == null ? void 0 : _j2.call( |
| 7946 |
_i2, |
| 7947 |
error, |
| 7948 |
this |
| 7949 |
); |
| 7950 |
(_l = (_k2 = __privateGet(this, _cache).config).onSettled) == null ? void 0 : _l.call( |
| 7951 |
_k2, |
| 7952 |
this.state.data, |
| 7953 |
error, |
| 7954 |
this |
| 7955 |
); |
| 7956 |
throw error; |
| 7957 |
} finally { |
| 7958 |
this.scheduleGc(); |
| 7959 |
} |
| 7960 |
} |
| 7961 |
}, _initialState = new WeakMap(), _revertState = new WeakMap(), _cache = new WeakMap(), _client = new WeakMap(), _retryer = new WeakMap(), _defaultOptions = new WeakMap(), _abortSignalConsumed = new WeakMap(), _Query_instances = new WeakSet(), dispatch_fn = function(action) { |
| 7962 |
const reducer = (state) => { |
| 7963 |
switch (action.type) { |
| 7964 |
case "failed": |
| 7965 |
return { |
| 7966 |
...state, |
| 7967 |
fetchFailureCount: action.failureCount, |
| 7968 |
fetchFailureReason: action.error |
| 7969 |
}; |
| 7970 |
case "pause": |
| 7971 |
return { |
| 7972 |
...state, |
| 7973 |
fetchStatus: "paused" |
| 7974 |
}; |
| 7975 |
case "continue": |
| 7976 |
return { |
| 7977 |
...state, |
| 7978 |
fetchStatus: "fetching" |
| 7979 |
}; |
| 7980 |
case "fetch": |
| 7981 |
return { |
| 7982 |
...state, |
| 7983 |
...fetchState(state.data, this.options), |
| 7984 |
fetchMeta: action.meta ?? null |
| 7985 |
}; |
| 7986 |
case "success": |
| 7987 |
const newState = { |
| 7988 |
...state, |
| 7989 |
...successState(action.data, action.dataUpdatedAt), |
| 7990 |
dataUpdateCount: state.dataUpdateCount + 1, |
| 7991 |
...!action.manual && { |
| 7992 |
fetchStatus: "idle", |
| 7993 |
fetchFailureCount: 0, |
| 7994 |
fetchFailureReason: null |
| 7995 |
} |
| 7996 |
}; |
| 7997 |
__privateSet(this, _revertState, action.manual ? newState : void 0); |
| 7998 |
return newState; |
| 7999 |
case "error": |
| 8000 |
const error = action.error; |
| 8001 |
return { |
| 8002 |
...state, |
| 8003 |
error, |
| 8004 |
errorUpdateCount: state.errorUpdateCount + 1, |
| 8005 |
errorUpdatedAt: Date.now(), |
| 8006 |
fetchFailureCount: state.fetchFailureCount + 1, |
| 8007 |
fetchFailureReason: error, |
| 8008 |
fetchStatus: "idle", |
| 8009 |
status: "error", |
| 8010 |
// flag existing data as invalidated if we get a background error |
| 8011 |
// note that "no data" always means stale so we can set unconditionally here |
| 8012 |
isInvalidated: true |
| 8013 |
}; |
| 8014 |
case "invalidate": |
| 8015 |
return { |
| 8016 |
...state, |
| 8017 |
isInvalidated: true |
| 8018 |
}; |
| 8019 |
case "setState": |
| 8020 |
return { |
| 8021 |
...state, |
| 8022 |
...action.state |
| 8023 |
}; |
| 8024 |
} |
| 8025 |
}; |
| 8026 |
this.state = reducer(this.state); |
| 8027 |
notifyManager.batch(() => { |
| 8028 |
this.observers.forEach((observer) => { |
| 8029 |
observer.onQueryUpdate(); |
| 8030 |
}); |
| 8031 |
__privateGet(this, _cache).notify({ query: this, type: "updated", action }); |
| 8032 |
}); |
| 8033 |
}, _e); |
| 8034 |
function fetchState(data, options) { |
| 8035 |
return { |
| 8036 |
fetchFailureCount: 0, |
| 8037 |
fetchFailureReason: null, |
| 8038 |
fetchStatus: canFetch(options.networkMode) ? "fetching" : "paused", |
| 8039 |
...data === void 0 && { |
| 8040 |
error: null, |
| 8041 |
status: "pending" |
| 8042 |
} |
| 8043 |
}; |
| 8044 |
} |
| 8045 |
function successState(data, dataUpdatedAt) { |
| 8046 |
return { |
| 8047 |
data, |
| 8048 |
dataUpdatedAt: dataUpdatedAt ?? Date.now(), |
| 8049 |
error: null, |
| 8050 |
isInvalidated: false, |
| 8051 |
status: "success" |
| 8052 |
}; |
| 8053 |
} |
| 8054 |
function getDefaultState$1(options) { |
| 8055 |
const data = typeof options.initialData === "function" ? options.initialData() : options.initialData; |
| 8056 |
const hasData = data !== void 0; |
| 8057 |
const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0; |
| 8058 |
return { |
| 8059 |
data, |
| 8060 |
dataUpdateCount: 0, |
| 8061 |
dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0, |
| 8062 |
error: null, |
| 8063 |
errorUpdateCount: 0, |
| 8064 |
errorUpdatedAt: 0, |
| 8065 |
fetchFailureCount: 0, |
| 8066 |
fetchFailureReason: null, |
| 8067 |
fetchMeta: null, |
| 8068 |
isInvalidated: false, |
| 8069 |
status: hasData ? "success" : "pending", |
| 8070 |
fetchStatus: "idle" |
| 8071 |
}; |
| 8072 |
} |
| 8073 |
var QueryObserver = (_f = class extends Subscribable { |
| 8074 |
constructor(client2, options) { |
| 8075 |
super(); |
| 8076 |
__privateAdd(this, _QueryObserver_instances); |
| 8077 |
__privateAdd(this, _client2); |
| 8078 |
__privateAdd(this, _currentQuery); |
| 8079 |
__privateAdd(this, _currentQueryInitialState); |
| 8080 |
__privateAdd(this, _currentResult); |
| 8081 |
__privateAdd(this, _currentResultState); |
| 8082 |
__privateAdd(this, _currentResultOptions); |
| 8083 |
__privateAdd(this, _currentThenable); |
| 8084 |
__privateAdd(this, _selectError); |
| 8085 |
__privateAdd(this, _selectFn); |
| 8086 |
__privateAdd(this, _selectResult); |
| 8087 |
// This property keeps track of the last query with defined data. |
| 8088 |
// It will be used to pass the previous data and query to the placeholder function between renders. |
| 8089 |
__privateAdd(this, _lastQueryWithDefinedData); |
| 8090 |
__privateAdd(this, _staleTimeoutId); |
| 8091 |
__privateAdd(this, _refetchIntervalId); |
| 8092 |
__privateAdd(this, _currentRefetchInterval); |
| 8093 |
__privateAdd(this, _trackedProps, /* @__PURE__ */ new Set()); |
| 8094 |
this.options = options; |
| 8095 |
__privateSet(this, _client2, client2); |
| 8096 |
__privateSet(this, _selectError, null); |
| 8097 |
__privateSet(this, _currentThenable, pendingThenable()); |
| 8098 |
this.bindMethods(); |
| 8099 |
this.setOptions(options); |
| 8100 |
} |
| 8101 |
bindMethods() { |
| 8102 |
this.refetch = this.refetch.bind(this); |
| 8103 |
} |
| 8104 |
onSubscribe() { |
| 8105 |
if (this.listeners.size === 1) { |
| 8106 |
__privateGet(this, _currentQuery).addObserver(this); |
| 8107 |
if (shouldFetchOnMount(__privateGet(this, _currentQuery), this.options)) { |
| 8108 |
__privateMethod(this, _QueryObserver_instances, executeFetch_fn).call(this); |
| 8109 |
} else { |
| 8110 |
this.updateResult(); |
| 8111 |
} |
| 8112 |
__privateMethod(this, _QueryObserver_instances, updateTimers_fn).call(this); |
| 8113 |
} |
| 8114 |
} |
| 8115 |
onUnsubscribe() { |
| 8116 |
if (!this.hasListeners()) { |
| 8117 |
this.destroy(); |
| 8118 |
} |
| 8119 |
} |
| 8120 |
shouldFetchOnReconnect() { |
| 8121 |
return shouldFetchOn( |
| 8122 |
__privateGet(this, _currentQuery), |
| 8123 |
this.options, |
| 8124 |
this.options.refetchOnReconnect |
| 8125 |
); |
| 8126 |
} |
| 8127 |
shouldFetchOnWindowFocus() { |
| 8128 |
return shouldFetchOn( |
| 8129 |
__privateGet(this, _currentQuery), |
| 8130 |
this.options, |
| 8131 |
this.options.refetchOnWindowFocus |
| 8132 |
); |
| 8133 |
} |
| 8134 |
destroy() { |
| 8135 |
this.listeners = /* @__PURE__ */ new Set(); |
| 8136 |
__privateMethod(this, _QueryObserver_instances, clearStaleTimeout_fn).call(this); |
| 8137 |
__privateMethod(this, _QueryObserver_instances, clearRefetchInterval_fn).call(this); |
| 8138 |
__privateGet(this, _currentQuery).removeObserver(this); |
| 8139 |
} |
| 8140 |
setOptions(options) { |
| 8141 |
const prevOptions = this.options; |
| 8142 |
const prevQuery = __privateGet(this, _currentQuery); |
| 8143 |
this.options = __privateGet(this, _client2).defaultQueryOptions(options); |
| 8144 |
if (this.options.enabled !== void 0 && typeof this.options.enabled !== "boolean" && typeof this.options.enabled !== "function" && typeof resolveEnabled(this.options.enabled, __privateGet(this, _currentQuery)) !== "boolean") { |
| 8145 |
throw new Error( |
| 8146 |
"Expected enabled to be a boolean or a callback that returns a boolean" |
| 8147 |
); |
| 8148 |
} |
| 8149 |
__privateMethod(this, _QueryObserver_instances, updateQuery_fn).call(this); |
| 8150 |
__privateGet(this, _currentQuery).setOptions(this.options); |
| 8151 |
if (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) { |
| 8152 |
__privateGet(this, _client2).getQueryCache().notify({ |
| 8153 |
type: "observerOptionsUpdated", |
| 8154 |
query: __privateGet(this, _currentQuery), |
| 8155 |
observer: this |
| 8156 |
}); |
| 8157 |
} |
| 8158 |
const mounted = this.hasListeners(); |
| 8159 |
if (mounted && shouldFetchOptionally( |
| 8160 |
__privateGet(this, _currentQuery), |
| 8161 |
prevQuery, |
| 8162 |
this.options, |
| 8163 |
prevOptions |
| 8164 |
)) { |
| 8165 |
__privateMethod(this, _QueryObserver_instances, executeFetch_fn).call(this); |
| 8166 |
} |
| 8167 |
this.updateResult(); |
| 8168 |
if (mounted && (__privateGet(this, _currentQuery) !== prevQuery || resolveEnabled(this.options.enabled, __privateGet(this, _currentQuery)) !== resolveEnabled(prevOptions.enabled, __privateGet(this, _currentQuery)) || resolveStaleTime(this.options.staleTime, __privateGet(this, _currentQuery)) !== resolveStaleTime(prevOptions.staleTime, __privateGet(this, _currentQuery)))) { |
| 8169 |
__privateMethod(this, _QueryObserver_instances, updateStaleTimeout_fn).call(this); |
| 8170 |
} |
| 8171 |
const nextRefetchInterval = __privateMethod(this, _QueryObserver_instances, computeRefetchInterval_fn).call(this); |
| 8172 |
if (mounted && (__privateGet(this, _currentQuery) !== prevQuery || resolveEnabled(this.options.enabled, __privateGet(this, _currentQuery)) !== resolveEnabled(prevOptions.enabled, __privateGet(this, _currentQuery)) || nextRefetchInterval !== __privateGet(this, _currentRefetchInterval))) { |
| 8173 |
__privateMethod(this, _QueryObserver_instances, updateRefetchInterval_fn).call(this, nextRefetchInterval); |
| 8174 |
} |
| 8175 |
} |
| 8176 |
getOptimisticResult(options) { |
| 8177 |
const query = __privateGet(this, _client2).getQueryCache().build(__privateGet(this, _client2), options); |
| 8178 |
const result = this.createResult(query, options); |
| 8179 |
if (shouldAssignObserverCurrentProperties(this, result)) { |
| 8180 |
__privateSet(this, _currentResult, result); |
| 8181 |
__privateSet(this, _currentResultOptions, this.options); |
| 8182 |
__privateSet(this, _currentResultState, __privateGet(this, _currentQuery).state); |
| 8183 |
} |
| 8184 |
return result; |
| 8185 |
} |
| 8186 |
getCurrentResult() { |
| 8187 |
return __privateGet(this, _currentResult); |
| 8188 |
} |
| 8189 |
trackResult(result, onPropTracked) { |
| 8190 |
return new Proxy(result, { |
| 8191 |
get: (target, key) => { |
| 8192 |
this.trackProp(key); |
| 8193 |
onPropTracked == null ? void 0 : onPropTracked(key); |
| 8194 |
if (key === "promise") { |
| 8195 |
this.trackProp("data"); |
| 8196 |
if (!this.options.experimental_prefetchInRender && __privateGet(this, _currentThenable).status === "pending") { |
| 8197 |
__privateGet(this, _currentThenable).reject( |
| 8198 |
new Error( |
| 8199 |
"experimental_prefetchInRender feature flag is not enabled" |
| 8200 |
) |
| 8201 |
); |
| 8202 |
} |
| 8203 |
} |
| 8204 |
return Reflect.get(target, key); |
| 8205 |
} |
| 8206 |
}); |
| 8207 |
} |
| 8208 |
trackProp(key) { |
| 8209 |
__privateGet(this, _trackedProps).add(key); |
| 8210 |
} |
| 8211 |
getCurrentQuery() { |
| 8212 |
return __privateGet(this, _currentQuery); |
| 8213 |
} |
| 8214 |
refetch({ ...options } = {}) { |
| 8215 |
return this.fetch({ |
| 8216 |
...options |
| 8217 |
}); |
| 8218 |
} |
| 8219 |
fetchOptimistic(options) { |
| 8220 |
const defaultedOptions = __privateGet(this, _client2).defaultQueryOptions(options); |
| 8221 |
const query = __privateGet(this, _client2).getQueryCache().build(__privateGet(this, _client2), defaultedOptions); |
| 8222 |
return query.fetch().then(() => this.createResult(query, defaultedOptions)); |
| 8223 |
} |
| 8224 |
fetch(fetchOptions) { |
| 8225 |
return __privateMethod(this, _QueryObserver_instances, executeFetch_fn).call(this, { |
| 8226 |
...fetchOptions, |
| 8227 |
cancelRefetch: fetchOptions.cancelRefetch ?? true |
| 8228 |
}).then(() => { |
| 8229 |
this.updateResult(); |
| 8230 |
return __privateGet(this, _currentResult); |
| 8231 |
}); |
| 8232 |
} |
| 8233 |
createResult(query, options) { |
| 8234 |
var _a2; |
| 8235 |
const prevQuery = __privateGet(this, _currentQuery); |
| 8236 |
const prevOptions = this.options; |
| 8237 |
const prevResult = __privateGet(this, _currentResult); |
| 8238 |
const prevResultState = __privateGet(this, _currentResultState); |
| 8239 |
const prevResultOptions = __privateGet(this, _currentResultOptions); |
| 8240 |
const queryChange = query !== prevQuery; |
| 8241 |
const queryInitialState = queryChange ? query.state : __privateGet(this, _currentQueryInitialState); |
| 8242 |
const { state } = query; |
| 8243 |
let newState = { ...state }; |
| 8244 |
let isPlaceholderData = false; |
| 8245 |
let data; |
| 8246 |
if (options._optimisticResults) { |
| 8247 |
const mounted = this.hasListeners(); |
| 8248 |
const fetchOnMount = !mounted && shouldFetchOnMount(query, options); |
| 8249 |
const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions); |
| 8250 |
if (fetchOnMount || fetchOptionally) { |
| 8251 |
newState = { |
| 8252 |
...newState, |
| 8253 |
...fetchState(state.data, query.options) |
| 8254 |
}; |
| 8255 |
} |
| 8256 |
if (options._optimisticResults === "isRestoring") { |
| 8257 |
newState.fetchStatus = "idle"; |
| 8258 |
} |
| 8259 |
} |
| 8260 |
let { error, errorUpdatedAt, status } = newState; |
| 8261 |
data = newState.data; |
| 8262 |
let skipSelect = false; |
| 8263 |
if (options.placeholderData !== void 0 && data === void 0 && status === "pending") { |
| 8264 |
let placeholderData; |
| 8265 |
if ((prevResult == null ? void 0 : prevResult.isPlaceholderData) && options.placeholderData === (prevResultOptions == null ? void 0 : prevResultOptions.placeholderData)) { |
| 8266 |
placeholderData = prevResult.data; |
| 8267 |
skipSelect = true; |
| 8268 |
} else { |
| 8269 |
placeholderData = typeof options.placeholderData === "function" ? options.placeholderData( |
| 8270 |
(_a2 = __privateGet(this, _lastQueryWithDefinedData)) == null ? void 0 : _a2.state.data, |
| 8271 |
__privateGet(this, _lastQueryWithDefinedData) |
| 8272 |
) : options.placeholderData; |
| 8273 |
} |
| 8274 |
if (placeholderData !== void 0) { |
| 8275 |
status = "success"; |
| 8276 |
data = replaceData( |
| 8277 |
prevResult == null ? void 0 : prevResult.data, |
| 8278 |
placeholderData, |
| 8279 |
options |
| 8280 |
); |
| 8281 |
isPlaceholderData = true; |
| 8282 |
} |
| 8283 |
} |
| 8284 |
if (options.select && data !== void 0 && !skipSelect) { |
| 8285 |
if (prevResult && data === (prevResultState == null ? void 0 : prevResultState.data) && options.select === __privateGet(this, _selectFn)) { |
| 8286 |
data = __privateGet(this, _selectResult); |
| 8287 |
} else { |
| 8288 |
try { |
| 8289 |
__privateSet(this, _selectFn, options.select); |
| 8290 |
data = options.select(data); |
| 8291 |
data = replaceData(prevResult == null ? void 0 : prevResult.data, data, options); |
| 8292 |
__privateSet(this, _selectResult, data); |
| 8293 |
__privateSet(this, _selectError, null); |
| 8294 |
} catch (selectError) { |
| 8295 |
__privateSet(this, _selectError, selectError); |
| 8296 |
} |
| 8297 |
} |
| 8298 |
} |
| 8299 |
if (__privateGet(this, _selectError)) { |
| 8300 |
error = __privateGet(this, _selectError); |
| 8301 |
data = __privateGet(this, _selectResult); |
| 8302 |
errorUpdatedAt = Date.now(); |
| 8303 |
status = "error"; |
| 8304 |
} |
| 8305 |
const isFetching = newState.fetchStatus === "fetching"; |
| 8306 |
const isPending = status === "pending"; |
| 8307 |
const isError = status === "error"; |
| 8308 |
const isLoading = isPending && isFetching; |
| 8309 |
const hasData = data !== void 0; |
| 8310 |
const result = { |
| 8311 |
status, |
| 8312 |
fetchStatus: newState.fetchStatus, |
| 8313 |
isPending, |
| 8314 |
isSuccess: status === "success", |
| 8315 |
isError, |
| 8316 |
isInitialLoading: isLoading, |
| 8317 |
isLoading, |
| 8318 |
data, |
| 8319 |
dataUpdatedAt: newState.dataUpdatedAt, |
| 8320 |
error, |
| 8321 |
errorUpdatedAt, |
| 8322 |
failureCount: newState.fetchFailureCount, |
| 8323 |
failureReason: newState.fetchFailureReason, |
| 8324 |
errorUpdateCount: newState.errorUpdateCount, |
| 8325 |
isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0, |
| 8326 |
isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount, |
| 8327 |
isFetching, |
| 8328 |
isRefetching: isFetching && !isPending, |
| 8329 |
isLoadingError: isError && !hasData, |
| 8330 |
isPaused: newState.fetchStatus === "paused", |
| 8331 |
isPlaceholderData, |
| 8332 |
isRefetchError: isError && hasData, |
| 8333 |
isStale: isStale(query, options), |
| 8334 |
refetch: this.refetch, |
| 8335 |
promise: __privateGet(this, _currentThenable), |
| 8336 |
isEnabled: resolveEnabled(options.enabled, query) !== false |
| 8337 |
}; |
| 8338 |
const nextResult = result; |
| 8339 |
if (this.options.experimental_prefetchInRender) { |
| 8340 |
const hasResultData = nextResult.data !== void 0; |
| 8341 |
const isErrorWithoutData = nextResult.status === "error" && !hasResultData; |
| 8342 |
const finalizeThenableIfPossible = (thenable) => { |
| 8343 |
if (isErrorWithoutData) { |
| 8344 |
thenable.reject(nextResult.error); |
| 8345 |
} else if (hasResultData) { |
| 8346 |
thenable.resolve(nextResult.data); |
| 8347 |
} |
| 8348 |
}; |
| 8349 |
const recreateThenable = () => { |
| 8350 |
const pending = __privateSet(this, _currentThenable, nextResult.promise = pendingThenable()); |
| 8351 |
finalizeThenableIfPossible(pending); |
| 8352 |
}; |
| 8353 |
const prevThenable = __privateGet(this, _currentThenable); |
| 8354 |
switch (prevThenable.status) { |
| 8355 |
case "pending": |
| 8356 |
if (query.queryHash === prevQuery.queryHash) { |
| 8357 |
finalizeThenableIfPossible(prevThenable); |
| 8358 |
} |
| 8359 |
break; |
| 8360 |
case "fulfilled": |
| 8361 |
if (isErrorWithoutData || nextResult.data !== prevThenable.value) { |
| 8362 |
recreateThenable(); |
| 8363 |
} |
| 8364 |
break; |
| 8365 |
case "rejected": |
| 8366 |
if (!isErrorWithoutData || nextResult.error !== prevThenable.reason) { |
| 8367 |
recreateThenable(); |
| 8368 |
} |
| 8369 |
break; |
| 8370 |
} |
| 8371 |
} |
| 8372 |
return nextResult; |
| 8373 |
} |
| 8374 |
updateResult() { |
| 8375 |
const prevResult = __privateGet(this, _currentResult); |
| 8376 |
const nextResult = this.createResult(__privateGet(this, _currentQuery), this.options); |
| 8377 |
__privateSet(this, _currentResultState, __privateGet(this, _currentQuery).state); |
| 8378 |
__privateSet(this, _currentResultOptions, this.options); |
| 8379 |
if (__privateGet(this, _currentResultState).data !== void 0) { |
| 8380 |
__privateSet(this, _lastQueryWithDefinedData, __privateGet(this, _currentQuery)); |
| 8381 |
} |
| 8382 |
if (shallowEqualObjects(nextResult, prevResult)) { |
| 8383 |
return; |
| 8384 |
} |
| 8385 |
__privateSet(this, _currentResult, nextResult); |
| 8386 |
const shouldNotifyListeners = () => { |
| 8387 |
if (!prevResult) { |
| 8388 |
return true; |
| 8389 |
} |
| 8390 |
const { notifyOnChangeProps } = this.options; |
| 8391 |
const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps; |
| 8392 |
if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !__privateGet(this, _trackedProps).size) { |
| 8393 |
return true; |
| 8394 |
} |
| 8395 |
const includedProps = new Set( |
| 8396 |
notifyOnChangePropsValue ?? __privateGet(this, _trackedProps) |
| 8397 |
); |
| 8398 |
if (this.options.throwOnError) { |
| 8399 |
includedProps.add("error"); |
| 8400 |
} |
| 8401 |
return Object.keys(__privateGet(this, _currentResult)).some((key) => { |
| 8402 |
const typedKey = key; |
| 8403 |
const changed = __privateGet(this, _currentResult)[typedKey] !== prevResult[typedKey]; |
| 8404 |
return changed && includedProps.has(typedKey); |
| 8405 |
}); |
| 8406 |
}; |
| 8407 |
__privateMethod(this, _QueryObserver_instances, notify_fn).call(this, { listeners: shouldNotifyListeners() }); |
| 8408 |
} |
| 8409 |
onQueryUpdate() { |
| 8410 |
this.updateResult(); |
| 8411 |
if (this.hasListeners()) { |
| 8412 |
__privateMethod(this, _QueryObserver_instances, updateTimers_fn).call(this); |
| 8413 |
} |
| 8414 |
} |
| 8415 |
}, _client2 = new WeakMap(), _currentQuery = new WeakMap(), _currentQueryInitialState = new WeakMap(), _currentResult = new WeakMap(), _currentResultState = new WeakMap(), _currentResultOptions = new WeakMap(), _currentThenable = new WeakMap(), _selectError = new WeakMap(), _selectFn = new WeakMap(), _selectResult = new WeakMap(), _lastQueryWithDefinedData = new WeakMap(), _staleTimeoutId = new WeakMap(), _refetchIntervalId = new WeakMap(), _currentRefetchInterval = new WeakMap(), _trackedProps = new WeakMap(), _QueryObserver_instances = new WeakSet(), executeFetch_fn = function(fetchOptions) { |
| 8416 |
__privateMethod(this, _QueryObserver_instances, updateQuery_fn).call(this); |
| 8417 |
let promise = __privateGet(this, _currentQuery).fetch( |
| 8418 |
this.options, |
| 8419 |
fetchOptions |
| 8420 |
); |
| 8421 |
if (!(fetchOptions == null ? void 0 : fetchOptions.throwOnError)) { |
| 8422 |
promise = promise.catch(noop); |
| 8423 |
} |
| 8424 |
return promise; |
| 8425 |
}, updateStaleTimeout_fn = function() { |
| 8426 |
__privateMethod(this, _QueryObserver_instances, clearStaleTimeout_fn).call(this); |
| 8427 |
const staleTime = resolveStaleTime( |
| 8428 |
this.options.staleTime, |
| 8429 |
__privateGet(this, _currentQuery) |
| 8430 |
); |
| 8431 |
if (isServer || __privateGet(this, _currentResult).isStale || !isValidTimeout(staleTime)) { |
| 8432 |
return; |
| 8433 |
} |
| 8434 |
const time = timeUntilStale(__privateGet(this, _currentResult).dataUpdatedAt, staleTime); |
| 8435 |
const timeout = time + 1; |
| 8436 |
__privateSet(this, _staleTimeoutId, timeoutManager.setTimeout(() => { |
| 8437 |
if (!__privateGet(this, _currentResult).isStale) { |
| 8438 |
this.updateResult(); |
| 8439 |
} |
| 8440 |
}, timeout)); |
| 8441 |
}, computeRefetchInterval_fn = function() { |
| 8442 |
return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(__privateGet(this, _currentQuery)) : this.options.refetchInterval) ?? false; |
| 8443 |
}, updateRefetchInterval_fn = function(nextInterval) { |
| 8444 |
__privateMethod(this, _QueryObserver_instances, clearRefetchInterval_fn).call(this); |
| 8445 |
__privateSet(this, _currentRefetchInterval, nextInterval); |
| 8446 |
if (isServer || resolveEnabled(this.options.enabled, __privateGet(this, _currentQuery)) === false || !isValidTimeout(__privateGet(this, _currentRefetchInterval)) || __privateGet(this, _currentRefetchInterval) === 0) { |
| 8447 |
return; |
| 8448 |
} |
| 8449 |
__privateSet(this, _refetchIntervalId, timeoutManager.setInterval(() => { |
| 8450 |
if (this.options.refetchIntervalInBackground || focusManager.isFocused()) { |
| 8451 |
__privateMethod(this, _QueryObserver_instances, executeFetch_fn).call(this); |
| 8452 |
} |
| 8453 |
}, __privateGet(this, _currentRefetchInterval))); |
| 8454 |
}, updateTimers_fn = function() { |
| 8455 |
__privateMethod(this, _QueryObserver_instances, updateStaleTimeout_fn).call(this); |
| 8456 |
__privateMethod(this, _QueryObserver_instances, updateRefetchInterval_fn).call(this, __privateMethod(this, _QueryObserver_instances, computeRefetchInterval_fn).call(this)); |
| 8457 |
}, clearStaleTimeout_fn = function() { |
| 8458 |
if (__privateGet(this, _staleTimeoutId)) { |
| 8459 |
timeoutManager.clearTimeout(__privateGet(this, _staleTimeoutId)); |
| 8460 |
__privateSet(this, _staleTimeoutId, void 0); |
| 8461 |
} |
| 8462 |
}, clearRefetchInterval_fn = function() { |
| 8463 |
if (__privateGet(this, _refetchIntervalId)) { |
| 8464 |
timeoutManager.clearInterval(__privateGet(this, _refetchIntervalId)); |
| 8465 |
__privateSet(this, _refetchIntervalId, void 0); |
| 8466 |
} |
| 8467 |
}, updateQuery_fn = function() { |
| 8468 |
const query = __privateGet(this, _client2).getQueryCache().build(__privateGet(this, _client2), this.options); |
| 8469 |
if (query === __privateGet(this, _currentQuery)) { |
| 8470 |
return; |
| 8471 |
} |
| 8472 |
const prevQuery = __privateGet(this, _currentQuery); |
| 8473 |
__privateSet(this, _currentQuery, query); |
| 8474 |
__privateSet(this, _currentQueryInitialState, query.state); |
| 8475 |
if (this.hasListeners()) { |
| 8476 |
prevQuery == null ? void 0 : prevQuery.removeObserver(this); |
| 8477 |
query.addObserver(this); |
| 8478 |
} |
| 8479 |
}, notify_fn = function(notifyOptions) { |
| 8480 |
notifyManager.batch(() => { |
| 8481 |
if (notifyOptions.listeners) { |
| 8482 |
this.listeners.forEach((listener) => { |
| 8483 |
listener(__privateGet(this, _currentResult)); |
| 8484 |
}); |
| 8485 |
} |
| 8486 |
__privateGet(this, _client2).getQueryCache().notify({ |
| 8487 |
query: __privateGet(this, _currentQuery), |
| 8488 |
type: "observerResultsUpdated" |
| 8489 |
}); |
| 8490 |
}); |
| 8491 |
}, _f); |
| 8492 |
function shouldLoadOnMount(query, options) { |
| 8493 |
return resolveEnabled(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false); |
| 8494 |
} |
| 8495 |
function shouldFetchOnMount(query, options) { |
| 8496 |
return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount); |
| 8497 |
} |
| 8498 |
function shouldFetchOn(query, options, field) { |
| 8499 |
if (resolveEnabled(options.enabled, query) !== false && resolveStaleTime(options.staleTime, query) !== "static") { |
| 8500 |
const value = typeof field === "function" ? field(query) : field; |
| 8501 |
return value === "always" || value !== false && isStale(query, options); |
| 8502 |
} |
| 8503 |
return false; |
| 8504 |
} |
| 8505 |
function shouldFetchOptionally(query, prevQuery, options, prevOptions) { |
| 8506 |
return (query !== prevQuery || resolveEnabled(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options); |
| 8507 |
} |
| 8508 |
function isStale(query, options) { |
| 8509 |
return resolveEnabled(options.enabled, query) !== false && query.isStaleByTime(resolveStaleTime(options.staleTime, query)); |
| 8510 |
} |
| 8511 |
function shouldAssignObserverCurrentProperties(observer, optimisticResult) { |
| 8512 |
if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) { |
| 8513 |
return true; |
| 8514 |
} |
| 8515 |
return false; |
| 8516 |
} |
| 8517 |
function infiniteQueryBehavior(pages) { |
| 8518 |
return { |
| 8519 |
onFetch: (context, query) => { |
| 8520 |
var _a2, _b2, _c2, _d2, _e2; |
| 8521 |
const options = context.options; |
| 8522 |
const direction = (_c2 = (_b2 = (_a2 = context.fetchOptions) == null ? void 0 : _a2.meta) == null ? void 0 : _b2.fetchMore) == null ? void 0 : _c2.direction; |
| 8523 |
const oldPages = ((_d2 = context.state.data) == null ? void 0 : _d2.pages) || []; |
| 8524 |
const oldPageParams = ((_e2 = context.state.data) == null ? void 0 : _e2.pageParams) || []; |
| 8525 |
let result = { pages: [], pageParams: [] }; |
| 8526 |
let currentPage = 0; |
| 8527 |
const fetchFn = async () => { |
| 8528 |
let cancelled = false; |
| 8529 |
const addSignalProperty = (object) => { |
| 8530 |
addConsumeAwareSignal( |
| 8531 |
object, |
| 8532 |
() => context.signal, |
| 8533 |
() => cancelled = true |
| 8534 |
); |
| 8535 |
}; |
| 8536 |
const queryFn = ensureQueryFn(context.options, context.fetchOptions); |
| 8537 |
const fetchPage = async (data, param, previous) => { |
| 8538 |
if (cancelled) { |
| 8539 |
return Promise.reject(); |
| 8540 |
} |
| 8541 |
if (param == null && data.pages.length) { |
| 8542 |
return Promise.resolve(data); |
| 8543 |
} |
| 8544 |
const createQueryFnContext = () => { |
| 8545 |
const queryFnContext2 = { |
| 8546 |
client: context.client, |
| 8547 |
queryKey: context.queryKey, |
| 8548 |
pageParam: param, |
| 8549 |
direction: previous ? "backward" : "forward", |
| 8550 |
meta: context.options.meta |
| 8551 |
}; |
| 8552 |
addSignalProperty(queryFnContext2); |
| 8553 |
return queryFnContext2; |
| 8554 |
}; |
| 8555 |
const queryFnContext = createQueryFnContext(); |
| 8556 |
const page = await queryFn(queryFnContext); |
| 8557 |
const { maxPages } = context.options; |
| 8558 |
const addTo = previous ? addToStart : addToEnd; |
| 8559 |
return { |
| 8560 |
pages: addTo(data.pages, page, maxPages), |
| 8561 |
pageParams: addTo(data.pageParams, param, maxPages) |
| 8562 |
}; |
| 8563 |
}; |
| 8564 |
if (direction && oldPages.length) { |
| 8565 |
const previous = direction === "backward"; |
| 8566 |
const pageParamFn = previous ? getPreviousPageParam : getNextPageParam; |
| 8567 |
const oldData = { |
| 8568 |
pages: oldPages, |
| 8569 |
pageParams: oldPageParams |
| 8570 |
}; |
| 8571 |
const param = pageParamFn(options, oldData); |
| 8572 |
result = await fetchPage(oldData, param, previous); |
| 8573 |
} else { |
| 8574 |
const remainingPages = pages ?? oldPages.length; |
| 8575 |
do { |
| 8576 |
const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result); |
| 8577 |
if (currentPage > 0 && param == null) { |
| 8578 |
break; |
| 8579 |
} |
| 8580 |
result = await fetchPage(result, param); |
| 8581 |
currentPage++; |
| 8582 |
} while (currentPage < remainingPages); |
| 8583 |
} |
| 8584 |
return result; |
| 8585 |
}; |
| 8586 |
if (context.options.persister) { |
| 8587 |
context.fetchFn = () => { |
| 8588 |
var _a3, _b3; |
| 8589 |
return (_b3 = (_a3 = context.options).persister) == null ? void 0 : _b3.call( |
| 8590 |
_a3, |
| 8591 |
fetchFn, |
| 8592 |
{ |
| 8593 |
client: context.client, |
| 8594 |
queryKey: context.queryKey, |
| 8595 |
meta: context.options.meta, |
| 8596 |
signal: context.signal |
| 8597 |
}, |
| 8598 |
query |
| 8599 |
); |
| 8600 |
}; |
| 8601 |
} else { |
| 8602 |
context.fetchFn = fetchFn; |
| 8603 |
} |
| 8604 |
} |
| 8605 |
}; |
| 8606 |
} |
| 8607 |
function getNextPageParam(options, { pages, pageParams }) { |
| 8608 |
const lastIndex = pages.length - 1; |
| 8609 |
return pages.length > 0 ? options.getNextPageParam( |
| 8610 |
pages[lastIndex], |
| 8611 |
pages, |
| 8612 |
pageParams[lastIndex], |
| 8613 |
pageParams |
| 8614 |
) : void 0; |
| 8615 |
} |
| 8616 |
function getPreviousPageParam(options, { pages, pageParams }) { |
| 8617 |
var _a2; |
| 8618 |
return pages.length > 0 ? (_a2 = options.getPreviousPageParam) == null ? void 0 : _a2.call(options, pages[0], pages, pageParams[0], pageParams) : void 0; |
| 8619 |
} |
| 8620 |
var Mutation = (_g = class extends Removable { |
| 8621 |
constructor(config) { |
| 8622 |
super(); |
| 8623 |
__privateAdd(this, _Mutation_instances); |
| 8624 |
__privateAdd(this, _client3); |
| 8625 |
__privateAdd(this, _observers); |
| 8626 |
__privateAdd(this, _mutationCache); |
| 8627 |
__privateAdd(this, _retryer2); |
| 8628 |
__privateSet(this, _client3, config.client); |
| 8629 |
this.mutationId = config.mutationId; |
| 8630 |
__privateSet(this, _mutationCache, config.mutationCache); |
| 8631 |
__privateSet(this, _observers, []); |
| 8632 |
this.state = config.state || getDefaultState(); |
| 8633 |
this.setOptions(config.options); |
| 8634 |
this.scheduleGc(); |
| 8635 |
} |
| 8636 |
setOptions(options) { |
| 8637 |
this.options = options; |
| 8638 |
this.updateGcTime(this.options.gcTime); |
| 8639 |
} |
| 8640 |
get meta() { |
| 8641 |
return this.options.meta; |
| 8642 |
} |
| 8643 |
addObserver(observer) { |
| 8644 |
if (!__privateGet(this, _observers).includes(observer)) { |
| 8645 |
__privateGet(this, _observers).push(observer); |
| 8646 |
this.clearGcTimeout(); |
| 8647 |
__privateGet(this, _mutationCache).notify({ |
| 8648 |
type: "observerAdded", |
| 8649 |
mutation: this, |
| 8650 |
observer |
| 8651 |
}); |
| 8652 |
} |
| 8653 |
} |
| 8654 |
removeObserver(observer) { |
| 8655 |
__privateSet(this, _observers, __privateGet(this, _observers).filter((x2) => x2 !== observer)); |
| 8656 |
this.scheduleGc(); |
| 8657 |
__privateGet(this, _mutationCache).notify({ |
| 8658 |
type: "observerRemoved", |
| 8659 |
mutation: this, |
| 8660 |
observer |
| 8661 |
}); |
| 8662 |
} |
| 8663 |
optionalRemove() { |
| 8664 |
if (!__privateGet(this, _observers).length) { |
| 8665 |
if (this.state.status === "pending") { |
| 8666 |
this.scheduleGc(); |
| 8667 |
} else { |
| 8668 |
__privateGet(this, _mutationCache).remove(this); |
| 8669 |
} |
| 8670 |
} |
| 8671 |
} |
| 8672 |
continue() { |
| 8673 |
var _a2; |
| 8674 |
return ((_a2 = __privateGet(this, _retryer2)) == null ? void 0 : _a2.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before |
| 8675 |
this.execute(this.state.variables); |
| 8676 |
} |
| 8677 |
async execute(variables) { |
| 8678 |
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l, _m, _n, _o, _p, _q, _r; |
| 8679 |
const onContinue = () => { |
| 8680 |
__privateMethod(this, _Mutation_instances, dispatch_fn2).call(this, { type: "continue" }); |
| 8681 |
}; |
| 8682 |
const mutationFnContext = { |
| 8683 |
client: __privateGet(this, _client3), |
| 8684 |
meta: this.options.meta, |
| 8685 |
mutationKey: this.options.mutationKey |
| 8686 |
}; |
| 8687 |
__privateSet(this, _retryer2, createRetryer({ |
| 8688 |
fn: () => { |
| 8689 |
if (!this.options.mutationFn) { |
| 8690 |
return Promise.reject(new Error("No mutationFn found")); |
| 8691 |
} |
| 8692 |
return this.options.mutationFn(variables, mutationFnContext); |
| 8693 |
}, |
| 8694 |
onFail: (failureCount, error) => { |
| 8695 |
__privateMethod(this, _Mutation_instances, dispatch_fn2).call(this, { type: "failed", failureCount, error }); |
| 8696 |
}, |
| 8697 |
onPause: () => { |
| 8698 |
__privateMethod(this, _Mutation_instances, dispatch_fn2).call(this, { type: "pause" }); |
| 8699 |
}, |
| 8700 |
onContinue, |
| 8701 |
retry: this.options.retry ?? 0, |
| 8702 |
retryDelay: this.options.retryDelay, |
| 8703 |
networkMode: this.options.networkMode, |
| 8704 |
canRun: () => __privateGet(this, _mutationCache).canRun(this) |
| 8705 |
})); |
| 8706 |
const restored = this.state.status === "pending"; |
| 8707 |
const isPaused = !__privateGet(this, _retryer2).canStart(); |
| 8708 |
try { |
| 8709 |
if (restored) { |
| 8710 |
onContinue(); |
| 8711 |
} else { |
| 8712 |
__privateMethod(this, _Mutation_instances, dispatch_fn2).call(this, { type: "pending", variables, isPaused }); |
| 8713 |
if (__privateGet(this, _mutationCache).config.onMutate) { |
| 8714 |
await __privateGet(this, _mutationCache).config.onMutate( |
| 8715 |
variables, |
| 8716 |
this, |
| 8717 |
mutationFnContext |
| 8718 |
); |
| 8719 |
} |
| 8720 |
const context = await ((_b2 = (_a2 = this.options).onMutate) == null ? void 0 : _b2.call( |
| 8721 |
_a2, |
| 8722 |
variables, |
| 8723 |
mutationFnContext |
| 8724 |
)); |
| 8725 |
if (context !== this.state.context) { |
| 8726 |
__privateMethod(this, _Mutation_instances, dispatch_fn2).call(this, { |
| 8727 |
type: "pending", |
| 8728 |
context, |
| 8729 |
variables, |
| 8730 |
isPaused |
| 8731 |
}); |
| 8732 |
} |
| 8733 |
} |
| 8734 |
const data = await __privateGet(this, _retryer2).start(); |
| 8735 |
await ((_d2 = (_c2 = __privateGet(this, _mutationCache).config).onSuccess) == null ? void 0 : _d2.call( |
| 8736 |
_c2, |
| 8737 |
data, |
| 8738 |
variables, |
| 8739 |
this.state.context, |
| 8740 |
this, |
| 8741 |
mutationFnContext |
| 8742 |
)); |
| 8743 |
await ((_f2 = (_e2 = this.options).onSuccess) == null ? void 0 : _f2.call( |
| 8744 |
_e2, |
| 8745 |
data, |
| 8746 |
variables, |
| 8747 |
this.state.context, |
| 8748 |
mutationFnContext |
| 8749 |
)); |
| 8750 |
await ((_h2 = (_g2 = __privateGet(this, _mutationCache).config).onSettled) == null ? void 0 : _h2.call( |
| 8751 |
_g2, |
| 8752 |
data, |
| 8753 |
null, |
| 8754 |
this.state.variables, |
| 8755 |
this.state.context, |
| 8756 |
this, |
| 8757 |
mutationFnContext |
| 8758 |
)); |
| 8759 |
await ((_j2 = (_i2 = this.options).onSettled) == null ? void 0 : _j2.call( |
| 8760 |
_i2, |
| 8761 |
data, |
| 8762 |
null, |
| 8763 |
variables, |
| 8764 |
this.state.context, |
| 8765 |
mutationFnContext |
| 8766 |
)); |
| 8767 |
__privateMethod(this, _Mutation_instances, dispatch_fn2).call(this, { type: "success", data }); |
| 8768 |
return data; |
| 8769 |
} catch (error) { |
| 8770 |
try { |
| 8771 |
await ((_l = (_k2 = __privateGet(this, _mutationCache).config).onError) == null ? void 0 : _l.call( |
| 8772 |
_k2, |
| 8773 |
error, |
| 8774 |
variables, |
| 8775 |
this.state.context, |
| 8776 |
this, |
| 8777 |
mutationFnContext |
| 8778 |
)); |
| 8779 |
} catch (e2) { |
| 8780 |
void Promise.reject(e2); |
| 8781 |
} |
| 8782 |
try { |
| 8783 |
await ((_n = (_m = this.options).onError) == null ? void 0 : _n.call( |
| 8784 |
_m, |
| 8785 |
error, |
| 8786 |
variables, |
| 8787 |
this.state.context, |
| 8788 |
mutationFnContext |
| 8789 |
)); |
| 8790 |
} catch (e2) { |
| 8791 |
void Promise.reject(e2); |
| 8792 |
} |
| 8793 |
try { |
| 8794 |
await ((_p = (_o = __privateGet(this, _mutationCache).config).onSettled) == null ? void 0 : _p.call( |
| 8795 |
_o, |
| 8796 |
void 0, |
| 8797 |
error, |
| 8798 |
this.state.variables, |
| 8799 |
this.state.context, |
| 8800 |
this, |
| 8801 |
mutationFnContext |
| 8802 |
)); |
| 8803 |
} catch (e2) { |
| 8804 |
void Promise.reject(e2); |
| 8805 |
} |
| 8806 |
try { |
| 8807 |
await ((_r = (_q = this.options).onSettled) == null ? void 0 : _r.call( |
| 8808 |
_q, |
| 8809 |
void 0, |
| 8810 |
error, |
| 8811 |
variables, |
| 8812 |
this.state.context, |
| 8813 |
mutationFnContext |
| 8814 |
)); |
| 8815 |
} catch (e2) { |
| 8816 |
void Promise.reject(e2); |
| 8817 |
} |
| 8818 |
__privateMethod(this, _Mutation_instances, dispatch_fn2).call(this, { type: "error", error }); |
| 8819 |
throw error; |
| 8820 |
} finally { |
| 8821 |
__privateGet(this, _mutationCache).runNext(this); |
| 8822 |
} |
| 8823 |
} |
| 8824 |
}, _client3 = new WeakMap(), _observers = new WeakMap(), _mutationCache = new WeakMap(), _retryer2 = new WeakMap(), _Mutation_instances = new WeakSet(), dispatch_fn2 = function(action) { |
| 8825 |
const reducer = (state) => { |
| 8826 |
switch (action.type) { |
| 8827 |
case "failed": |
| 8828 |
return { |
| 8829 |
...state, |
| 8830 |
failureCount: action.failureCount, |
| 8831 |
failureReason: action.error |
| 8832 |
}; |
| 8833 |
case "pause": |
| 8834 |
return { |
| 8835 |
...state, |
| 8836 |
isPaused: true |
| 8837 |
}; |
| 8838 |
case "continue": |
| 8839 |
return { |
| 8840 |
...state, |
| 8841 |
isPaused: false |
| 8842 |
}; |
| 8843 |
case "pending": |
| 8844 |
return { |
| 8845 |
...state, |
| 8846 |
context: action.context, |
| 8847 |
data: void 0, |
| 8848 |
failureCount: 0, |
| 8849 |
failureReason: null, |
| 8850 |
error: null, |
| 8851 |
isPaused: action.isPaused, |
| 8852 |
status: "pending", |
| 8853 |
variables: action.variables, |
| 8854 |
submittedAt: Date.now() |
| 8855 |
}; |
| 8856 |
case "success": |
| 8857 |
return { |
| 8858 |
...state, |
| 8859 |
data: action.data, |
| 8860 |
failureCount: 0, |
| 8861 |
failureReason: null, |
| 8862 |
error: null, |
| 8863 |
status: "success", |
| 8864 |
isPaused: false |
| 8865 |
}; |
| 8866 |
case "error": |
| 8867 |
return { |
| 8868 |
...state, |
| 8869 |
data: void 0, |
| 8870 |
error: action.error, |
| 8871 |
failureCount: state.failureCount + 1, |
| 8872 |
failureReason: action.error, |
| 8873 |
isPaused: false, |
| 8874 |
status: "error" |
| 8875 |
}; |
| 8876 |
} |
| 8877 |
}; |
| 8878 |
this.state = reducer(this.state); |
| 8879 |
notifyManager.batch(() => { |
| 8880 |
__privateGet(this, _observers).forEach((observer) => { |
| 8881 |
observer.onMutationUpdate(action); |
| 8882 |
}); |
| 8883 |
__privateGet(this, _mutationCache).notify({ |
| 8884 |
mutation: this, |
| 8885 |
type: "updated", |
| 8886 |
action |
| 8887 |
}); |
| 8888 |
}); |
| 8889 |
}, _g); |
| 8890 |
function getDefaultState() { |
| 8891 |
return { |
| 8892 |
context: void 0, |
| 8893 |
data: void 0, |
| 8894 |
error: null, |
| 8895 |
failureCount: 0, |
| 8896 |
failureReason: null, |
| 8897 |
isPaused: false, |
| 8898 |
status: "idle", |
| 8899 |
variables: void 0, |
| 8900 |
submittedAt: 0 |
| 8901 |
}; |
| 8902 |
} |
| 8903 |
var MutationCache = (_h = class extends Subscribable { |
| 8904 |
constructor(config = {}) { |
| 8905 |
super(); |
| 8906 |
__privateAdd(this, _mutations); |
| 8907 |
__privateAdd(this, _scopes); |
| 8908 |
__privateAdd(this, _mutationId); |
| 8909 |
this.config = config; |
| 8910 |
__privateSet(this, _mutations, /* @__PURE__ */ new Set()); |
| 8911 |
__privateSet(this, _scopes, /* @__PURE__ */ new Map()); |
| 8912 |
__privateSet(this, _mutationId, 0); |
| 8913 |
} |
| 8914 |
build(client2, options, state) { |
| 8915 |
const mutation = new Mutation({ |
| 8916 |
client: client2, |
| 8917 |
mutationCache: this, |
| 8918 |
mutationId: ++__privateWrapper(this, _mutationId)._, |
| 8919 |
options: client2.defaultMutationOptions(options), |
| 8920 |
state |
| 8921 |
}); |
| 8922 |
this.add(mutation); |
| 8923 |
return mutation; |
| 8924 |
} |
| 8925 |
add(mutation) { |
| 8926 |
__privateGet(this, _mutations).add(mutation); |
| 8927 |
const scope = scopeFor(mutation); |
| 8928 |
if (typeof scope === "string") { |
| 8929 |
const scopedMutations = __privateGet(this, _scopes).get(scope); |
| 8930 |
if (scopedMutations) { |
| 8931 |
scopedMutations.push(mutation); |
| 8932 |
} else { |
| 8933 |
__privateGet(this, _scopes).set(scope, [mutation]); |
| 8934 |
} |
| 8935 |
} |
| 8936 |
this.notify({ type: "added", mutation }); |
| 8937 |
} |
| 8938 |
remove(mutation) { |
| 8939 |
if (__privateGet(this, _mutations).delete(mutation)) { |
| 8940 |
const scope = scopeFor(mutation); |
| 8941 |
if (typeof scope === "string") { |
| 8942 |
const scopedMutations = __privateGet(this, _scopes).get(scope); |
| 8943 |
if (scopedMutations) { |
| 8944 |
if (scopedMutations.length > 1) { |
| 8945 |
const index = scopedMutations.indexOf(mutation); |
| 8946 |
if (index !== -1) { |
| 8947 |
scopedMutations.splice(index, 1); |
| 8948 |
} |
| 8949 |
} else if (scopedMutations[0] === mutation) { |
| 8950 |
__privateGet(this, _scopes).delete(scope); |
| 8951 |
} |
| 8952 |
} |
| 8953 |
} |
| 8954 |
} |
| 8955 |
this.notify({ type: "removed", mutation }); |
| 8956 |
} |
| 8957 |
canRun(mutation) { |
| 8958 |
const scope = scopeFor(mutation); |
| 8959 |
if (typeof scope === "string") { |
| 8960 |
const mutationsWithSameScope = __privateGet(this, _scopes).get(scope); |
| 8961 |
const firstPendingMutation = mutationsWithSameScope == null ? void 0 : mutationsWithSameScope.find( |
| 8962 |
(m2) => m2.state.status === "pending" |
| 8963 |
); |
| 8964 |
return !firstPendingMutation || firstPendingMutation === mutation; |
| 8965 |
} else { |
| 8966 |
return true; |
| 8967 |
} |
| 8968 |
} |
| 8969 |
runNext(mutation) { |
| 8970 |
var _a2; |
| 8971 |
const scope = scopeFor(mutation); |
| 8972 |
if (typeof scope === "string") { |
| 8973 |
const foundMutation = (_a2 = __privateGet(this, _scopes).get(scope)) == null ? void 0 : _a2.find((m2) => m2 !== mutation && m2.state.isPaused); |
| 8974 |
return (foundMutation == null ? void 0 : foundMutation.continue()) ?? Promise.resolve(); |
| 8975 |
} else { |
| 8976 |
return Promise.resolve(); |
| 8977 |
} |
| 8978 |
} |
| 8979 |
clear() { |
| 8980 |
notifyManager.batch(() => { |
| 8981 |
__privateGet(this, _mutations).forEach((mutation) => { |
| 8982 |
this.notify({ type: "removed", mutation }); |
| 8983 |
}); |
| 8984 |
__privateGet(this, _mutations).clear(); |
| 8985 |
__privateGet(this, _scopes).clear(); |
| 8986 |
}); |
| 8987 |
} |
| 8988 |
getAll() { |
| 8989 |
return Array.from(__privateGet(this, _mutations)); |
| 8990 |
} |
| 8991 |
find(filters) { |
| 8992 |
const defaultedFilters = { exact: true, ...filters }; |
| 8993 |
return this.getAll().find( |
| 8994 |
(mutation) => matchMutation(defaultedFilters, mutation) |
| 8995 |
); |
| 8996 |
} |
| 8997 |
findAll(filters = {}) { |
| 8998 |
return this.getAll().filter((mutation) => matchMutation(filters, mutation)); |
| 8999 |
} |
| 9000 |
notify(event) { |
| 9001 |
notifyManager.batch(() => { |
| 9002 |
this.listeners.forEach((listener) => { |
| 9003 |
listener(event); |
| 9004 |
}); |
| 9005 |
}); |
| 9006 |
} |
| 9007 |
resumePausedMutations() { |
| 9008 |
const pausedMutations = this.getAll().filter((x2) => x2.state.isPaused); |
| 9009 |
return notifyManager.batch( |
| 9010 |
() => Promise.all( |
| 9011 |
pausedMutations.map((mutation) => mutation.continue().catch(noop)) |
| 9012 |
) |
| 9013 |
); |
| 9014 |
} |
| 9015 |
}, _mutations = new WeakMap(), _scopes = new WeakMap(), _mutationId = new WeakMap(), _h); |
| 9016 |
function scopeFor(mutation) { |
| 9017 |
var _a2; |
| 9018 |
return (_a2 = mutation.options.scope) == null ? void 0 : _a2.id; |
| 9019 |
} |
| 9020 |
var MutationObserver$1 = (_i = class extends Subscribable { |
| 9021 |
constructor(client2, options) { |
| 9022 |
super(); |
| 9023 |
__privateAdd(this, _MutationObserver_instances); |
| 9024 |
__privateAdd(this, _client4); |
| 9025 |
__privateAdd(this, _currentResult2); |
| 9026 |
__privateAdd(this, _currentMutation); |
| 9027 |
__privateAdd(this, _mutateOptions); |
| 9028 |
__privateSet(this, _client4, client2); |
| 9029 |
this.setOptions(options); |
| 9030 |
this.bindMethods(); |
| 9031 |
__privateMethod(this, _MutationObserver_instances, updateResult_fn).call(this); |
| 9032 |
} |
| 9033 |
bindMethods() { |
| 9034 |
this.mutate = this.mutate.bind(this); |
| 9035 |
this.reset = this.reset.bind(this); |
| 9036 |
} |
| 9037 |
setOptions(options) { |
| 9038 |
var _a2; |
| 9039 |
const prevOptions = this.options; |
| 9040 |
this.options = __privateGet(this, _client4).defaultMutationOptions(options); |
| 9041 |
if (!shallowEqualObjects(this.options, prevOptions)) { |
| 9042 |
__privateGet(this, _client4).getMutationCache().notify({ |
| 9043 |
type: "observerOptionsUpdated", |
| 9044 |
mutation: __privateGet(this, _currentMutation), |
| 9045 |
observer: this |
| 9046 |
}); |
| 9047 |
} |
| 9048 |
if ((prevOptions == null ? void 0 : prevOptions.mutationKey) && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) { |
| 9049 |
this.reset(); |
| 9050 |
} else if (((_a2 = __privateGet(this, _currentMutation)) == null ? void 0 : _a2.state.status) === "pending") { |
| 9051 |
__privateGet(this, _currentMutation).setOptions(this.options); |
| 9052 |
} |
| 9053 |
} |
| 9054 |
onUnsubscribe() { |
| 9055 |
var _a2; |
| 9056 |
if (!this.hasListeners()) { |
| 9057 |
(_a2 = __privateGet(this, _currentMutation)) == null ? void 0 : _a2.removeObserver(this); |
| 9058 |
} |
| 9059 |
} |
| 9060 |
onMutationUpdate(action) { |
| 9061 |
__privateMethod(this, _MutationObserver_instances, updateResult_fn).call(this); |
| 9062 |
__privateMethod(this, _MutationObserver_instances, notify_fn2).call(this, action); |
| 9063 |
} |
| 9064 |
getCurrentResult() { |
| 9065 |
return __privateGet(this, _currentResult2); |
| 9066 |
} |
| 9067 |
reset() { |
| 9068 |
var _a2; |
| 9069 |
(_a2 = __privateGet(this, _currentMutation)) == null ? void 0 : _a2.removeObserver(this); |
| 9070 |
__privateSet(this, _currentMutation, void 0); |
| 9071 |
__privateMethod(this, _MutationObserver_instances, updateResult_fn).call(this); |
| 9072 |
__privateMethod(this, _MutationObserver_instances, notify_fn2).call(this); |
| 9073 |
} |
| 9074 |
mutate(variables, options) { |
| 9075 |
var _a2; |
| 9076 |
__privateSet(this, _mutateOptions, options); |
| 9077 |
(_a2 = __privateGet(this, _currentMutation)) == null ? void 0 : _a2.removeObserver(this); |
| 9078 |
__privateSet(this, _currentMutation, __privateGet(this, _client4).getMutationCache().build(__privateGet(this, _client4), this.options)); |
| 9079 |
__privateGet(this, _currentMutation).addObserver(this); |
| 9080 |
return __privateGet(this, _currentMutation).execute(variables); |
| 9081 |
} |
| 9082 |
}, _client4 = new WeakMap(), _currentResult2 = new WeakMap(), _currentMutation = new WeakMap(), _mutateOptions = new WeakMap(), _MutationObserver_instances = new WeakSet(), updateResult_fn = function() { |
| 9083 |
var _a2; |
| 9084 |
const state = ((_a2 = __privateGet(this, _currentMutation)) == null ? void 0 : _a2.state) ?? getDefaultState(); |
| 9085 |
__privateSet(this, _currentResult2, { |
| 9086 |
...state, |
| 9087 |
isPending: state.status === "pending", |
| 9088 |
isSuccess: state.status === "success", |
| 9089 |
isError: state.status === "error", |
| 9090 |
isIdle: state.status === "idle", |
| 9091 |
mutate: this.mutate, |
| 9092 |
reset: this.reset |
| 9093 |
}); |
| 9094 |
}, notify_fn2 = function(action) { |
| 9095 |
notifyManager.batch(() => { |
| 9096 |
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2; |
| 9097 |
if (__privateGet(this, _mutateOptions) && this.hasListeners()) { |
| 9098 |
const variables = __privateGet(this, _currentResult2).variables; |
| 9099 |
const onMutateResult = __privateGet(this, _currentResult2).context; |
| 9100 |
const context = { |
| 9101 |
client: __privateGet(this, _client4), |
| 9102 |
meta: this.options.meta, |
| 9103 |
mutationKey: this.options.mutationKey |
| 9104 |
}; |
| 9105 |
if ((action == null ? void 0 : action.type) === "success") { |
| 9106 |
try { |
| 9107 |
(_b2 = (_a2 = __privateGet(this, _mutateOptions)).onSuccess) == null ? void 0 : _b2.call( |
| 9108 |
_a2, |
| 9109 |
action.data, |
| 9110 |
variables, |
| 9111 |
onMutateResult, |
| 9112 |
context |
| 9113 |
); |
| 9114 |
} catch (e2) { |
| 9115 |
void Promise.reject(e2); |
| 9116 |
} |
| 9117 |
try { |
| 9118 |
(_d2 = (_c2 = __privateGet(this, _mutateOptions)).onSettled) == null ? void 0 : _d2.call( |
| 9119 |
_c2, |
| 9120 |
action.data, |
| 9121 |
null, |
| 9122 |
variables, |
| 9123 |
onMutateResult, |
| 9124 |
context |
| 9125 |
); |
| 9126 |
} catch (e2) { |
| 9127 |
void Promise.reject(e2); |
| 9128 |
} |
| 9129 |
} else if ((action == null ? void 0 : action.type) === "error") { |
| 9130 |
try { |
| 9131 |
(_f2 = (_e2 = __privateGet(this, _mutateOptions)).onError) == null ? void 0 : _f2.call( |
| 9132 |
_e2, |
| 9133 |
action.error, |
| 9134 |
variables, |
| 9135 |
onMutateResult, |
| 9136 |
context |
| 9137 |
); |
| 9138 |
} catch (e2) { |
| 9139 |
void Promise.reject(e2); |
| 9140 |
} |
| 9141 |
try { |
| 9142 |
(_h2 = (_g2 = __privateGet(this, _mutateOptions)).onSettled) == null ? void 0 : _h2.call( |
| 9143 |
_g2, |
| 9144 |
void 0, |
| 9145 |
action.error, |
| 9146 |
variables, |
| 9147 |
onMutateResult, |
| 9148 |
context |
| 9149 |
); |
| 9150 |
} catch (e2) { |
| 9151 |
void Promise.reject(e2); |
| 9152 |
} |
| 9153 |
} |
| 9154 |
} |
| 9155 |
this.listeners.forEach((listener) => { |
| 9156 |
listener(__privateGet(this, _currentResult2)); |
| 9157 |
}); |
| 9158 |
}); |
| 9159 |
}, _i); |
| 9160 |
var QueryCache = (_j = class extends Subscribable { |
| 9161 |
constructor(config = {}) { |
| 9162 |
super(); |
| 9163 |
__privateAdd(this, _queries); |
| 9164 |
this.config = config; |
| 9165 |
__privateSet(this, _queries, /* @__PURE__ */ new Map()); |
| 9166 |
} |
| 9167 |
build(client2, options, state) { |
| 9168 |
const queryKey = options.queryKey; |
| 9169 |
const queryHash = options.queryHash ?? hashQueryKeyByOptions(queryKey, options); |
| 9170 |
let query = this.get(queryHash); |
| 9171 |
if (!query) { |
| 9172 |
query = new Query({ |
| 9173 |
client: client2, |
| 9174 |
queryKey, |
| 9175 |
queryHash, |
| 9176 |
options: client2.defaultQueryOptions(options), |
| 9177 |
state, |
| 9178 |
defaultOptions: client2.getQueryDefaults(queryKey) |
| 9179 |
}); |
| 9180 |
this.add(query); |
| 9181 |
} |
| 9182 |
return query; |
| 9183 |
} |
| 9184 |
add(query) { |
| 9185 |
if (!__privateGet(this, _queries).has(query.queryHash)) { |
| 9186 |
__privateGet(this, _queries).set(query.queryHash, query); |
| 9187 |
this.notify({ |
| 9188 |
type: "added", |
| 9189 |
query |
| 9190 |
}); |
| 9191 |
} |
| 9192 |
} |
| 9193 |
remove(query) { |
| 9194 |
const queryInMap = __privateGet(this, _queries).get(query.queryHash); |
| 9195 |
if (queryInMap) { |
| 9196 |
query.destroy(); |
| 9197 |
if (queryInMap === query) { |
| 9198 |
__privateGet(this, _queries).delete(query.queryHash); |
| 9199 |
} |
| 9200 |
this.notify({ type: "removed", query }); |
| 9201 |
} |
| 9202 |
} |
| 9203 |
clear() { |
| 9204 |
notifyManager.batch(() => { |
| 9205 |
this.getAll().forEach((query) => { |
| 9206 |
this.remove(query); |
| 9207 |
}); |
| 9208 |
}); |
| 9209 |
} |
| 9210 |
get(queryHash) { |
| 9211 |
return __privateGet(this, _queries).get(queryHash); |
| 9212 |
} |
| 9213 |
getAll() { |
| 9214 |
return [...__privateGet(this, _queries).values()]; |
| 9215 |
} |
| 9216 |
find(filters) { |
| 9217 |
const defaultedFilters = { exact: true, ...filters }; |
| 9218 |
return this.getAll().find( |
| 9219 |
(query) => matchQuery(defaultedFilters, query) |
| 9220 |
); |
| 9221 |
} |
| 9222 |
findAll(filters = {}) { |
| 9223 |
const queries = this.getAll(); |
| 9224 |
return Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries; |
| 9225 |
} |
| 9226 |
notify(event) { |
| 9227 |
notifyManager.batch(() => { |
| 9228 |
this.listeners.forEach((listener) => { |
| 9229 |
listener(event); |
| 9230 |
}); |
| 9231 |
}); |
| 9232 |
} |
| 9233 |
onFocus() { |
| 9234 |
notifyManager.batch(() => { |
| 9235 |
this.getAll().forEach((query) => { |
| 9236 |
query.onFocus(); |
| 9237 |
}); |
| 9238 |
}); |
| 9239 |
} |
| 9240 |
onOnline() { |
| 9241 |
notifyManager.batch(() => { |
| 9242 |
this.getAll().forEach((query) => { |
| 9243 |
query.onOnline(); |
| 9244 |
}); |
| 9245 |
}); |
| 9246 |
} |
| 9247 |
}, _queries = new WeakMap(), _j); |
| 9248 |
var QueryClient = (_k = class { |
| 9249 |
constructor(config = {}) { |
| 9250 |
__privateAdd(this, _queryCache); |
| 9251 |
__privateAdd(this, _mutationCache2); |
| 9252 |
__privateAdd(this, _defaultOptions2); |
| 9253 |
__privateAdd(this, _queryDefaults); |
| 9254 |
__privateAdd(this, _mutationDefaults); |
| 9255 |
__privateAdd(this, _mountCount); |
| 9256 |
__privateAdd(this, _unsubscribeFocus); |
| 9257 |
__privateAdd(this, _unsubscribeOnline); |
| 9258 |
__privateSet(this, _queryCache, config.queryCache || new QueryCache()); |
| 9259 |
__privateSet(this, _mutationCache2, config.mutationCache || new MutationCache()); |
| 9260 |
__privateSet(this, _defaultOptions2, config.defaultOptions || {}); |
| 9261 |
__privateSet(this, _queryDefaults, /* @__PURE__ */ new Map()); |
| 9262 |
__privateSet(this, _mutationDefaults, /* @__PURE__ */ new Map()); |
| 9263 |
__privateSet(this, _mountCount, 0); |
| 9264 |
} |
| 9265 |
mount() { |
| 9266 |
__privateWrapper(this, _mountCount)._++; |
| 9267 |
if (__privateGet(this, _mountCount) !== 1) return; |
| 9268 |
__privateSet(this, _unsubscribeFocus, focusManager.subscribe(async (focused) => { |
| 9269 |
if (focused) { |
| 9270 |
await this.resumePausedMutations(); |
| 9271 |
__privateGet(this, _queryCache).onFocus(); |
| 9272 |
} |
| 9273 |
})); |
| 9274 |
__privateSet(this, _unsubscribeOnline, onlineManager.subscribe(async (online) => { |
| 9275 |
if (online) { |
| 9276 |
await this.resumePausedMutations(); |
| 9277 |
__privateGet(this, _queryCache).onOnline(); |
| 9278 |
} |
| 9279 |
})); |
| 9280 |
} |
| 9281 |
unmount() { |
| 9282 |
var _a2, _b2; |
| 9283 |
__privateWrapper(this, _mountCount)._--; |
| 9284 |
if (__privateGet(this, _mountCount) !== 0) return; |
| 9285 |
(_a2 = __privateGet(this, _unsubscribeFocus)) == null ? void 0 : _a2.call(this); |
| 9286 |
__privateSet(this, _unsubscribeFocus, void 0); |
| 9287 |
(_b2 = __privateGet(this, _unsubscribeOnline)) == null ? void 0 : _b2.call(this); |
| 9288 |
__privateSet(this, _unsubscribeOnline, void 0); |
| 9289 |
} |
| 9290 |
isFetching(filters) { |
| 9291 |
return __privateGet(this, _queryCache).findAll({ ...filters, fetchStatus: "fetching" }).length; |
| 9292 |
} |
| 9293 |
isMutating(filters) { |
| 9294 |
return __privateGet(this, _mutationCache2).findAll({ ...filters, status: "pending" }).length; |
| 9295 |
} |
| 9296 |
/** |
| 9297 |
* Imperative (non-reactive) way to retrieve data for a QueryKey. |
| 9298 |
* Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates. |
| 9299 |
* |
| 9300 |
* Hint: Do not use this function inside a component, because it won't receive updates. |
| 9301 |
* Use `useQuery` to create a `QueryObserver` that subscribes to changes. |
| 9302 |
*/ |
| 9303 |
getQueryData(queryKey) { |
| 9304 |
var _a2; |
| 9305 |
const options = this.defaultQueryOptions({ queryKey }); |
| 9306 |
return (_a2 = __privateGet(this, _queryCache).get(options.queryHash)) == null ? void 0 : _a2.state.data; |
| 9307 |
} |
| 9308 |
ensureQueryData(options) { |
| 9309 |
const defaultedOptions = this.defaultQueryOptions(options); |
| 9310 |
const query = __privateGet(this, _queryCache).build(this, defaultedOptions); |
| 9311 |
const cachedData = query.state.data; |
| 9312 |
if (cachedData === void 0) { |
| 9313 |
return this.fetchQuery(options); |
| 9314 |
} |
| 9315 |
if (options.revalidateIfStale && query.isStaleByTime(resolveStaleTime(defaultedOptions.staleTime, query))) { |
| 9316 |
void this.prefetchQuery(defaultedOptions); |
| 9317 |
} |
| 9318 |
return Promise.resolve(cachedData); |
| 9319 |
} |
| 9320 |
getQueriesData(filters) { |
| 9321 |
return __privateGet(this, _queryCache).findAll(filters).map(({ queryKey, state }) => { |
| 9322 |
const data = state.data; |
| 9323 |
return [queryKey, data]; |
| 9324 |
}); |
| 9325 |
} |
| 9326 |
setQueryData(queryKey, updater, options) { |
| 9327 |
const defaultedOptions = this.defaultQueryOptions({ queryKey }); |
| 9328 |
const query = __privateGet(this, _queryCache).get( |
| 9329 |
defaultedOptions.queryHash |
| 9330 |
); |
| 9331 |
const prevData = query == null ? void 0 : query.state.data; |
| 9332 |
const data = functionalUpdate(updater, prevData); |
| 9333 |
if (data === void 0) { |
| 9334 |
return void 0; |
| 9335 |
} |
| 9336 |
return __privateGet(this, _queryCache).build(this, defaultedOptions).setData(data, { ...options, manual: true }); |
| 9337 |
} |
| 9338 |
setQueriesData(filters, updater, options) { |
| 9339 |
return notifyManager.batch( |
| 9340 |
() => __privateGet(this, _queryCache).findAll(filters).map(({ queryKey }) => [ |
| 9341 |
queryKey, |
| 9342 |
this.setQueryData(queryKey, updater, options) |
| 9343 |
]) |
| 9344 |
); |
| 9345 |
} |
| 9346 |
getQueryState(queryKey) { |
| 9347 |
var _a2; |
| 9348 |
const options = this.defaultQueryOptions({ queryKey }); |
| 9349 |
return (_a2 = __privateGet(this, _queryCache).get( |
| 9350 |
options.queryHash |
| 9351 |
)) == null ? void 0 : _a2.state; |
| 9352 |
} |
| 9353 |
removeQueries(filters) { |
| 9354 |
const queryCache = __privateGet(this, _queryCache); |
| 9355 |
notifyManager.batch(() => { |
| 9356 |
queryCache.findAll(filters).forEach((query) => { |
| 9357 |
queryCache.remove(query); |
| 9358 |
}); |
| 9359 |
}); |
| 9360 |
} |
| 9361 |
resetQueries(filters, options) { |
| 9362 |
const queryCache = __privateGet(this, _queryCache); |
| 9363 |
return notifyManager.batch(() => { |
| 9364 |
queryCache.findAll(filters).forEach((query) => { |
| 9365 |
query.reset(); |
| 9366 |
}); |
| 9367 |
return this.refetchQueries( |
| 9368 |
{ |
| 9369 |
type: "active", |
| 9370 |
...filters |
| 9371 |
}, |
| 9372 |
options |
| 9373 |
); |
| 9374 |
}); |
| 9375 |
} |
| 9376 |
cancelQueries(filters, cancelOptions = {}) { |
| 9377 |
const defaultedCancelOptions = { revert: true, ...cancelOptions }; |
| 9378 |
const promises = notifyManager.batch( |
| 9379 |
() => __privateGet(this, _queryCache).findAll(filters).map((query) => query.cancel(defaultedCancelOptions)) |
| 9380 |
); |
| 9381 |
return Promise.all(promises).then(noop).catch(noop); |
| 9382 |
} |
| 9383 |
invalidateQueries(filters, options = {}) { |
| 9384 |
return notifyManager.batch(() => { |
| 9385 |
__privateGet(this, _queryCache).findAll(filters).forEach((query) => { |
| 9386 |
query.invalidate(); |
| 9387 |
}); |
| 9388 |
if ((filters == null ? void 0 : filters.refetchType) === "none") { |
| 9389 |
return Promise.resolve(); |
| 9390 |
} |
| 9391 |
return this.refetchQueries( |
| 9392 |
{ |
| 9393 |
...filters, |
| 9394 |
type: (filters == null ? void 0 : filters.refetchType) ?? (filters == null ? void 0 : filters.type) ?? "active" |
| 9395 |
}, |
| 9396 |
options |
| 9397 |
); |
| 9398 |
}); |
| 9399 |
} |
| 9400 |
refetchQueries(filters, options = {}) { |
| 9401 |
const fetchOptions = { |
| 9402 |
...options, |
| 9403 |
cancelRefetch: options.cancelRefetch ?? true |
| 9404 |
}; |
| 9405 |
const promises = notifyManager.batch( |
| 9406 |
() => __privateGet(this, _queryCache).findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => { |
| 9407 |
let promise = query.fetch(void 0, fetchOptions); |
| 9408 |
if (!fetchOptions.throwOnError) { |
| 9409 |
promise = promise.catch(noop); |
| 9410 |
} |
| 9411 |
return query.state.fetchStatus === "paused" ? Promise.resolve() : promise; |
| 9412 |
}) |
| 9413 |
); |
| 9414 |
return Promise.all(promises).then(noop); |
| 9415 |
} |
| 9416 |
fetchQuery(options) { |
| 9417 |
const defaultedOptions = this.defaultQueryOptions(options); |
| 9418 |
if (defaultedOptions.retry === void 0) { |
| 9419 |
defaultedOptions.retry = false; |
| 9420 |
} |
| 9421 |
const query = __privateGet(this, _queryCache).build(this, defaultedOptions); |
| 9422 |
return query.isStaleByTime( |
| 9423 |
resolveStaleTime(defaultedOptions.staleTime, query) |
| 9424 |
) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data); |
| 9425 |
} |
| 9426 |
prefetchQuery(options) { |
| 9427 |
return this.fetchQuery(options).then(noop).catch(noop); |
| 9428 |
} |
| 9429 |
fetchInfiniteQuery(options) { |
| 9430 |
options.behavior = infiniteQueryBehavior(options.pages); |
| 9431 |
return this.fetchQuery(options); |
| 9432 |
} |
| 9433 |
prefetchInfiniteQuery(options) { |
| 9434 |
return this.fetchInfiniteQuery(options).then(noop).catch(noop); |
| 9435 |
} |
| 9436 |
ensureInfiniteQueryData(options) { |
| 9437 |
options.behavior = infiniteQueryBehavior(options.pages); |
| 9438 |
return this.ensureQueryData(options); |
| 9439 |
} |
| 9440 |
resumePausedMutations() { |
| 9441 |
if (onlineManager.isOnline()) { |
| 9442 |
return __privateGet(this, _mutationCache2).resumePausedMutations(); |
| 9443 |
} |
| 9444 |
return Promise.resolve(); |
| 9445 |
} |
| 9446 |
getQueryCache() { |
| 9447 |
return __privateGet(this, _queryCache); |
| 9448 |
} |
| 9449 |
getMutationCache() { |
| 9450 |
return __privateGet(this, _mutationCache2); |
| 9451 |
} |
| 9452 |
getDefaultOptions() { |
| 9453 |
return __privateGet(this, _defaultOptions2); |
| 9454 |
} |
| 9455 |
setDefaultOptions(options) { |
| 9456 |
__privateSet(this, _defaultOptions2, options); |
| 9457 |
} |
| 9458 |
setQueryDefaults(queryKey, options) { |
| 9459 |
__privateGet(this, _queryDefaults).set(hashKey(queryKey), { |
| 9460 |
queryKey, |
| 9461 |
defaultOptions: options |
| 9462 |
}); |
| 9463 |
} |
| 9464 |
getQueryDefaults(queryKey) { |
| 9465 |
const defaults = [...__privateGet(this, _queryDefaults).values()]; |
| 9466 |
const result = {}; |
| 9467 |
defaults.forEach((queryDefault) => { |
| 9468 |
if (partialMatchKey(queryKey, queryDefault.queryKey)) { |
| 9469 |
Object.assign(result, queryDefault.defaultOptions); |
| 9470 |
} |
| 9471 |
}); |
| 9472 |
return result; |
| 9473 |
} |
| 9474 |
setMutationDefaults(mutationKey, options) { |
| 9475 |
__privateGet(this, _mutationDefaults).set(hashKey(mutationKey), { |
| 9476 |
mutationKey, |
| 9477 |
defaultOptions: options |
| 9478 |
}); |
| 9479 |
} |
| 9480 |
getMutationDefaults(mutationKey) { |
| 9481 |
const defaults = [...__privateGet(this, _mutationDefaults).values()]; |
| 9482 |
const result = {}; |
| 9483 |
defaults.forEach((queryDefault) => { |
| 9484 |
if (partialMatchKey(mutationKey, queryDefault.mutationKey)) { |
| 9485 |
Object.assign(result, queryDefault.defaultOptions); |
| 9486 |
} |
| 9487 |
}); |
| 9488 |
return result; |
| 9489 |
} |
| 9490 |
defaultQueryOptions(options) { |
| 9491 |
if (options._defaulted) { |
| 9492 |
return options; |
| 9493 |
} |
| 9494 |
const defaultedOptions = { |
| 9495 |
...__privateGet(this, _defaultOptions2).queries, |
| 9496 |
...this.getQueryDefaults(options.queryKey), |
| 9497 |
...options, |
| 9498 |
_defaulted: true |
| 9499 |
}; |
| 9500 |
if (!defaultedOptions.queryHash) { |
| 9501 |
defaultedOptions.queryHash = hashQueryKeyByOptions( |
| 9502 |
defaultedOptions.queryKey, |
| 9503 |
defaultedOptions |
| 9504 |
); |
| 9505 |
} |
| 9506 |
if (defaultedOptions.refetchOnReconnect === void 0) { |
| 9507 |
defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always"; |
| 9508 |
} |
| 9509 |
if (defaultedOptions.throwOnError === void 0) { |
| 9510 |
defaultedOptions.throwOnError = !!defaultedOptions.suspense; |
| 9511 |
} |
| 9512 |
if (!defaultedOptions.networkMode && defaultedOptions.persister) { |
| 9513 |
defaultedOptions.networkMode = "offlineFirst"; |
| 9514 |
} |
| 9515 |
if (defaultedOptions.queryFn === skipToken) { |
| 9516 |
defaultedOptions.enabled = false; |
| 9517 |
} |
| 9518 |
return defaultedOptions; |
| 9519 |
} |
| 9520 |
defaultMutationOptions(options) { |
| 9521 |
if (options == null ? void 0 : options._defaulted) { |
| 9522 |
return options; |
| 9523 |
} |
| 9524 |
return { |
| 9525 |
...__privateGet(this, _defaultOptions2).mutations, |
| 9526 |
...(options == null ? void 0 : options.mutationKey) && this.getMutationDefaults(options.mutationKey), |
| 9527 |
...options, |
| 9528 |
_defaulted: true |
| 9529 |
}; |
| 9530 |
} |
| 9531 |
clear() { |
| 9532 |
__privateGet(this, _queryCache).clear(); |
| 9533 |
__privateGet(this, _mutationCache2).clear(); |
| 9534 |
} |
| 9535 |
}, _queryCache = new WeakMap(), _mutationCache2 = new WeakMap(), _defaultOptions2 = new WeakMap(), _queryDefaults = new WeakMap(), _mutationDefaults = new WeakMap(), _mountCount = new WeakMap(), _unsubscribeFocus = new WeakMap(), _unsubscribeOnline = new WeakMap(), _k); |
| 9536 |
var QueryClientContext = reactExports.createContext( |
| 9537 |
void 0 |
| 9538 |
); |
| 9539 |
var useQueryClient = (queryClient) => { |
| 9540 |
const client2 = reactExports.useContext(QueryClientContext); |
| 9541 |
if (!client2) { |
| 9542 |
throw new Error("No QueryClient set, use QueryClientProvider to set one"); |
| 9543 |
} |
| 9544 |
return client2; |
| 9545 |
}; |
| 9546 |
var QueryClientProvider = ({ |
| 9547 |
client: client2, |
| 9548 |
children |
| 9549 |
}) => { |
| 9550 |
reactExports.useEffect(() => { |
| 9551 |
client2.mount(); |
| 9552 |
return () => { |
| 9553 |
client2.unmount(); |
| 9554 |
}; |
| 9555 |
}, [client2]); |
| 9556 |
return /* @__PURE__ */ jsxRuntimeExports.jsx(QueryClientContext.Provider, { value: client2, children }); |
| 9557 |
}; |
| 9558 |
var IsRestoringContext = reactExports.createContext(false); |
| 9559 |
var useIsRestoring = () => reactExports.useContext(IsRestoringContext); |
| 9560 |
IsRestoringContext.Provider; |
| 9561 |
function createValue() { |
| 9562 |
let isReset = false; |
| 9563 |
return { |
| 9564 |
clearReset: () => { |
| 9565 |
isReset = false; |
| 9566 |
}, |
| 9567 |
reset: () => { |
| 9568 |
isReset = true; |
| 9569 |
}, |
| 9570 |
isReset: () => { |
| 9571 |
return isReset; |
| 9572 |
} |
| 9573 |
}; |
| 9574 |
} |
| 9575 |
var QueryErrorResetBoundaryContext = reactExports.createContext(createValue()); |
| 9576 |
var useQueryErrorResetBoundary = () => reactExports.useContext(QueryErrorResetBoundaryContext); |
| 9577 |
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => { |
| 9578 |
const throwOnError = (query == null ? void 0 : query.state.error) && typeof options.throwOnError === "function" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError; |
| 9579 |
if (options.suspense || options.experimental_prefetchInRender || throwOnError) { |
| 9580 |
if (!errorResetBoundary.isReset()) { |
| 9581 |
options.retryOnMount = false; |
| 9582 |
} |
| 9583 |
} |
| 9584 |
}; |
| 9585 |
var useClearResetErrorBoundary = (errorResetBoundary) => { |
| 9586 |
reactExports.useEffect(() => { |
| 9587 |
errorResetBoundary.clearReset(); |
| 9588 |
}, [errorResetBoundary]); |
| 9589 |
}; |
| 9590 |
var getHasError = ({ |
| 9591 |
result, |
| 9592 |
errorResetBoundary, |
| 9593 |
throwOnError, |
| 9594 |
query, |
| 9595 |
suspense |
| 9596 |
}) => { |
| 9597 |
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query])); |
| 9598 |
}; |
| 9599 |
var ensureSuspenseTimers = (defaultedOptions) => { |
| 9600 |
if (defaultedOptions.suspense) { |
| 9601 |
const MIN_SUSPENSE_TIME_MS = 1e3; |
| 9602 |
const clamp = (value) => value === "static" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS); |
| 9603 |
const originalStaleTime = defaultedOptions.staleTime; |
| 9604 |
defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime); |
| 9605 |
if (typeof defaultedOptions.gcTime === "number") { |
| 9606 |
defaultedOptions.gcTime = Math.max( |
| 9607 |
defaultedOptions.gcTime, |
| 9608 |
MIN_SUSPENSE_TIME_MS |
| 9609 |
); |
| 9610 |
} |
| 9611 |
} |
| 9612 |
}; |
| 9613 |
var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring; |
| 9614 |
var shouldSuspend = (defaultedOptions, result) => (defaultedOptions == null ? void 0 : defaultedOptions.suspense) && result.isPending; |
| 9615 |
var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => { |
| 9616 |
errorResetBoundary.clearReset(); |
| 9617 |
}); |
| 9618 |
function useBaseQuery(options, Observer, queryClient) { |
| 9619 |
var _a2, _b2, _c2, _d2; |
| 9620 |
const isRestoring = useIsRestoring(); |
| 9621 |
const errorResetBoundary = useQueryErrorResetBoundary(); |
| 9622 |
const client2 = useQueryClient(); |
| 9623 |
const defaultedOptions = client2.defaultQueryOptions(options); |
| 9624 |
(_b2 = (_a2 = client2.getDefaultOptions().queries) == null ? void 0 : _a2._experimental_beforeQuery) == null ? void 0 : _b2.call( |
| 9625 |
_a2, |
| 9626 |
defaultedOptions |
| 9627 |
); |
| 9628 |
const query = client2.getQueryCache().get(defaultedOptions.queryHash); |
| 9629 |
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic"; |
| 9630 |
ensureSuspenseTimers(defaultedOptions); |
| 9631 |
ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary, query); |
| 9632 |
useClearResetErrorBoundary(errorResetBoundary); |
| 9633 |
const isNewCacheEntry = !client2.getQueryCache().get(defaultedOptions.queryHash); |
| 9634 |
const [observer] = reactExports.useState( |
| 9635 |
() => new Observer( |
| 9636 |
client2, |
| 9637 |
defaultedOptions |
| 9638 |
) |
| 9639 |
); |
| 9640 |
const result = observer.getOptimisticResult(defaultedOptions); |
| 9641 |
const shouldSubscribe = !isRestoring && options.subscribed !== false; |
| 9642 |
reactExports.useSyncExternalStore( |
| 9643 |
reactExports.useCallback( |
| 9644 |
(onStoreChange) => { |
| 9645 |
const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop; |
| 9646 |
observer.updateResult(); |
| 9647 |
return unsubscribe; |
| 9648 |
}, |
| 9649 |
[observer, shouldSubscribe] |
| 9650 |
), |
| 9651 |
() => observer.getCurrentResult(), |
| 9652 |
() => observer.getCurrentResult() |
| 9653 |
); |
| 9654 |
reactExports.useEffect(() => { |
| 9655 |
observer.setOptions(defaultedOptions); |
| 9656 |
}, [defaultedOptions, observer]); |
| 9657 |
if (shouldSuspend(defaultedOptions, result)) { |
| 9658 |
throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary); |
| 9659 |
} |
| 9660 |
if (getHasError({ |
| 9661 |
result, |
| 9662 |
errorResetBoundary, |
| 9663 |
throwOnError: defaultedOptions.throwOnError, |
| 9664 |
query, |
| 9665 |
suspense: defaultedOptions.suspense |
| 9666 |
})) { |
| 9667 |
throw result.error; |
| 9668 |
} |
| 9669 |
(_d2 = (_c2 = client2.getDefaultOptions().queries) == null ? void 0 : _c2._experimental_afterQuery) == null ? void 0 : _d2.call( |
| 9670 |
_c2, |
| 9671 |
defaultedOptions, |
| 9672 |
result |
| 9673 |
); |
| 9674 |
if (defaultedOptions.experimental_prefetchInRender && !isServer && willFetch(result, isRestoring)) { |
| 9675 |
const promise = isNewCacheEntry ? ( |
| 9676 |
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted |
| 9677 |
fetchOptimistic(defaultedOptions, observer, errorResetBoundary) |
| 9678 |
) : ( |
| 9679 |
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in |
| 9680 |
query == null ? void 0 : query.promise |
| 9681 |
); |
| 9682 |
promise == null ? void 0 : promise.catch(noop).finally(() => { |
| 9683 |
observer.updateResult(); |
| 9684 |
}); |
| 9685 |
} |
| 9686 |
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result; |
| 9687 |
} |
| 9688 |
function useQuery(options, queryClient) { |
| 9689 |
return useBaseQuery(options, QueryObserver); |
| 9690 |
} |
| 9691 |
function useMutation(options, queryClient) { |
| 9692 |
const client2 = useQueryClient(); |
| 9693 |
const [observer] = reactExports.useState( |
| 9694 |
() => new MutationObserver$1( |
| 9695 |
client2, |
| 9696 |
options |
| 9697 |
) |
| 9698 |
); |
| 9699 |
reactExports.useEffect(() => { |
| 9700 |
observer.setOptions(options); |
| 9701 |
}, [observer, options]); |
| 9702 |
const result = reactExports.useSyncExternalStore( |
| 9703 |
reactExports.useCallback( |
| 9704 |
(onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), |
| 9705 |
[observer] |
| 9706 |
), |
| 9707 |
() => observer.getCurrentResult(), |
| 9708 |
() => observer.getCurrentResult() |
| 9709 |
); |
| 9710 |
const mutate = reactExports.useCallback( |
| 9711 |
(variables, mutateOptions) => { |
| 9712 |
observer.mutate(variables, mutateOptions).catch(noop); |
| 9713 |
}, |
| 9714 |
[observer] |
| 9715 |
); |
| 9716 |
if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) { |
| 9717 |
throw result.error; |
| 9718 |
} |
| 9719 |
return { ...result, mutate, mutateAsync: result.mutate }; |
| 9720 |
} |
| 9721 |
/** |
| 9722 |
* @license lucide-react v0.294.0 - ISC |
| 9723 |
* |
| 9724 |
* This source code is licensed under the ISC license. |
| 9725 |
* See the LICENSE file in the root directory of this source tree. |
| 9726 |
*/ |
| 9727 |
var defaultAttributes = { |
| 9728 |
xmlns: "http://www.w3.org/2000/svg", |
| 9729 |
width: 24, |
| 9730 |
height: 24, |
| 9731 |
viewBox: "0 0 24 24", |
| 9732 |
fill: "none", |
| 9733 |
stroke: "currentColor", |
| 9734 |
strokeWidth: 2, |
| 9735 |
strokeLinecap: "round", |
| 9736 |
strokeLinejoin: "round" |
| 9737 |
}; |
| 9738 |
/** |
| 9739 |
* @license lucide-react v0.294.0 - ISC |
| 9740 |
* |
| 9741 |
* This source code is licensed under the ISC license. |
| 9742 |
* See the LICENSE file in the root directory of this source tree. |
| 9743 |
*/ |
| 9744 |
const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim(); |
| 9745 |
const createLucideIcon = (iconName, iconNode) => { |
| 9746 |
const Component = reactExports.forwardRef( |
| 9747 |
({ color = "currentColor", size = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children, ...rest }, ref) => reactExports.createElement( |
| 9748 |
"svg", |
| 9749 |
{ |
| 9750 |
ref, |
| 9751 |
...defaultAttributes, |
| 9752 |
width: size, |
| 9753 |
height: size, |
| 9754 |
stroke: color, |
| 9755 |
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth, |
| 9756 |
className: ["lucide", `lucide-${toKebabCase(iconName)}`, className].join(" "), |
| 9757 |
...rest |
| 9758 |
}, |
| 9759 |
[ |
| 9760 |
...iconNode.map(([tag, attrs]) => reactExports.createElement(tag, attrs)), |
| 9761 |
...Array.isArray(children) ? children : [children] |
| 9762 |
] |
| 9763 |
) |
| 9764 |
); |
| 9765 |
Component.displayName = `${iconName}`; |
| 9766 |
return Component; |
| 9767 |
}; |
| 9768 |
/** |
| 9769 |
* @license lucide-react v0.294.0 - ISC |
| 9770 |
* |
| 9771 |
* This source code is licensed under the ISC license. |
| 9772 |
* See the LICENSE file in the root directory of this source tree. |
| 9773 |
*/ |
| 9774 |
const Activity = createLucideIcon("Activity", [ |
| 9775 |
["path", { d: "M22 12h-4l-3 9L9 3l-3 9H2", key: "d5dnw9" }] |
| 9776 |
]); |
| 9777 |
/** |
| 9778 |
* @license lucide-react v0.294.0 - ISC |
| 9779 |
* |
| 9780 |
* This source code is licensed under the ISC license. |
| 9781 |
* See the LICENSE file in the root directory of this source tree. |
| 9782 |
*/ |
| 9783 |
const AlertCircle = createLucideIcon("AlertCircle", [ |
| 9784 |
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], |
| 9785 |
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }], |
| 9786 |
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }] |
| 9787 |
]); |
| 9788 |
/** |
| 9789 |
* @license lucide-react v0.294.0 - ISC |
| 9790 |
* |
| 9791 |
* This source code is licensed under the ISC license. |
| 9792 |
* See the LICENSE file in the root directory of this source tree. |
| 9793 |
*/ |
| 9794 |
const AlertTriangle = createLucideIcon("AlertTriangle", [ |
| 9795 |
[ |
| 9796 |
"path", |
| 9797 |
{ |
| 9798 |
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z", |
| 9799 |
key: "c3ski4" |
| 9800 |
} |
| 9801 |
], |
| 9802 |
["path", { d: "M12 9v4", key: "juzpu7" }], |
| 9803 |
["path", { d: "M12 17h.01", key: "p32p05" }] |
| 9804 |
]); |
| 9805 |
/** |
| 9806 |
* @license lucide-react v0.294.0 - ISC |
| 9807 |
* |
| 9808 |
* This source code is licensed under the ISC license. |
| 9809 |
* See the LICENSE file in the root directory of this source tree. |
| 9810 |
*/ |
| 9811 |
const AlignLeft = createLucideIcon("AlignLeft", [ |
| 9812 |
["line", { x1: "21", x2: "3", y1: "6", y2: "6", key: "1fp77t" }], |
| 9813 |
["line", { x1: "15", x2: "3", y1: "12", y2: "12", key: "v6grx8" }], |
| 9814 |
["line", { x1: "17", x2: "3", y1: "18", y2: "18", key: "1awlsn" }] |
| 9815 |
]); |
| 9816 |
/** |
| 9817 |
* @license lucide-react v0.294.0 - ISC |
| 9818 |
* |
| 9819 |
* This source code is licensed under the ISC license. |
| 9820 |
* See the LICENSE file in the root directory of this source tree. |
| 9821 |
*/ |
| 9822 |
const Archive = createLucideIcon("Archive", [ |
| 9823 |
["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }], |
| 9824 |
["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }], |
| 9825 |
["path", { d: "M10 12h4", key: "a56b0p" }] |
| 9826 |
]); |
| 9827 |
/** |
| 9828 |
* @license lucide-react v0.294.0 - ISC |
| 9829 |
* |
| 9830 |
* This source code is licensed under the ISC license. |
| 9831 |
* See the LICENSE file in the root directory of this source tree. |
| 9832 |
*/ |
| 9833 |
const ArrowDown = createLucideIcon("ArrowDown", [ |
| 9834 |
["path", { d: "M12 5v14", key: "s699le" }], |
| 9835 |
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }] |
| 9836 |
]); |
| 9837 |
/** |
| 9838 |
* @license lucide-react v0.294.0 - ISC |
| 9839 |
* |
| 9840 |
* This source code is licensed under the ISC license. |
| 9841 |
* See the LICENSE file in the root directory of this source tree. |
| 9842 |
*/ |
| 9843 |
const ArrowLeft = createLucideIcon("ArrowLeft", [ |
| 9844 |
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }], |
| 9845 |
["path", { d: "M19 12H5", key: "x3x0zl" }] |
| 9846 |
]); |
| 9847 |
/** |
| 9848 |
* @license lucide-react v0.294.0 - ISC |
| 9849 |
* |
| 9850 |
* This source code is licensed under the ISC license. |
| 9851 |
* See the LICENSE file in the root directory of this source tree. |
| 9852 |
*/ |
| 9853 |
const ArrowRight = createLucideIcon("ArrowRight", [ |
| 9854 |
["path", { d: "M5 12h14", key: "1ays0h" }], |
| 9855 |
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }] |
| 9856 |
]); |
| 9857 |
/** |
| 9858 |
* @license lucide-react v0.294.0 - ISC |
| 9859 |
* |
| 9860 |
* This source code is licensed under the ISC license. |
| 9861 |
* See the LICENSE file in the root directory of this source tree. |
| 9862 |
*/ |
| 9863 |
const ArrowUpDown = createLucideIcon("ArrowUpDown", [ |
| 9864 |
["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }], |
| 9865 |
["path", { d: "M17 20V4", key: "1ejh1v" }], |
| 9866 |
["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }], |
| 9867 |
["path", { d: "M7 4v16", key: "1glfcx" }] |
| 9868 |
]); |
| 9869 |
/** |
| 9870 |
* @license lucide-react v0.294.0 - ISC |
| 9871 |
* |
| 9872 |
* This source code is licensed under the ISC license. |
| 9873 |
* See the LICENSE file in the root directory of this source tree. |
| 9874 |
*/ |
| 9875 |
const ArrowUpRight = createLucideIcon("ArrowUpRight", [ |
| 9876 |
["path", { d: "M7 7h10v10", key: "1tivn9" }], |
| 9877 |
["path", { d: "M7 17 17 7", key: "1vkiza" }] |
| 9878 |
]); |
| 9879 |
/** |
| 9880 |
* @license lucide-react v0.294.0 - ISC |
| 9881 |
* |
| 9882 |
* This source code is licensed under the ISC license. |
| 9883 |
* See the LICENSE file in the root directory of this source tree. |
| 9884 |
*/ |
| 9885 |
const ArrowUp = createLucideIcon("ArrowUp", [ |
| 9886 |
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }], |
| 9887 |
["path", { d: "M12 19V5", key: "x0mq9r" }] |
| 9888 |
]); |
| 9889 |
/** |
| 9890 |
* @license lucide-react v0.294.0 - ISC |
| 9891 |
* |
| 9892 |
* This source code is licensed under the ISC license. |
| 9893 |
* See the LICENSE file in the root directory of this source tree. |
| 9894 |
*/ |
| 9895 |
const Award = createLucideIcon("Award", [ |
| 9896 |
["circle", { cx: "12", cy: "8", r: "6", key: "1vp47v" }], |
| 9897 |
["path", { d: "M15.477 12.89 17 22l-5-3-5 3 1.523-9.11", key: "em7aur" }] |
| 9898 |
]); |
| 9899 |
/** |
| 9900 |
* @license lucide-react v0.294.0 - ISC |
| 9901 |
* |
| 9902 |
* This source code is licensed under the ISC license. |
| 9903 |
* See the LICENSE file in the root directory of this source tree. |
| 9904 |
*/ |
| 9905 |
const BadgePercent = createLucideIcon("BadgePercent", [ |
| 9906 |
[ |
| 9907 |
"path", |
| 9908 |
{ |
| 9909 |
d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z", |
| 9910 |
key: "3c2336" |
| 9911 |
} |
| 9912 |
], |
| 9913 |
["path", { d: "m15 9-6 6", key: "1uzhvr" }], |
| 9914 |
["path", { d: "M9 9h.01", key: "1q5me6" }], |
| 9915 |
["path", { d: "M15 15h.01", key: "lqbp3k" }] |
| 9916 |
]); |
| 9917 |
/** |
| 9918 |
* @license lucide-react v0.294.0 - ISC |
| 9919 |
* |
| 9920 |
* This source code is licensed under the ISC license. |
| 9921 |
* See the LICENSE file in the root directory of this source tree. |
| 9922 |
*/ |
| 9923 |
const Ban = createLucideIcon("Ban", [ |
| 9924 |
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], |
| 9925 |
["path", { d: "m4.9 4.9 14.2 14.2", key: "1m5liu" }] |
| 9926 |
]); |
| 9927 |
/** |
| 9928 |
* @license lucide-react v0.294.0 - ISC |
| 9929 |
* |
| 9930 |
* This source code is licensed under the ISC license. |
| 9931 |
* See the LICENSE file in the root directory of this source tree. |
| 9932 |
*/ |
| 9933 |
const BarChart3 = createLucideIcon("BarChart3", [ |
| 9934 |
["path", { d: "M3 3v18h18", key: "1s2lah" }], |
| 9935 |
["path", { d: "M18 17V9", key: "2bz60n" }], |
| 9936 |
["path", { d: "M13 17V5", key: "1frdt8" }], |
| 9937 |
["path", { d: "M8 17v-3", key: "17ska0" }] |
| 9938 |
]); |
| 9939 |
/** |
| 9940 |
* @license lucide-react v0.294.0 - ISC |
| 9941 |
* |
| 9942 |
* This source code is licensed under the ISC license. |
| 9943 |
* See the LICENSE file in the root directory of this source tree. |
| 9944 |
*/ |
| 9945 |
const BarChart = createLucideIcon("BarChart", [ |
| 9946 |
["line", { x1: "12", x2: "12", y1: "20", y2: "10", key: "1vz5eb" }], |
| 9947 |
["line", { x1: "18", x2: "18", y1: "20", y2: "4", key: "cun8e5" }], |
| 9948 |
["line", { x1: "6", x2: "6", y1: "20", y2: "16", key: "hq0ia6" }] |
| 9949 |
]); |
| 9950 |
/** |
| 9951 |
* @license lucide-react v0.294.0 - ISC |
| 9952 |
* |
| 9953 |
* This source code is licensed under the ISC license. |
| 9954 |
* See the LICENSE file in the root directory of this source tree. |
| 9955 |
*/ |
| 9956 |
const BellRing = createLucideIcon("BellRing", [ |
| 9957 |
["path", { d: "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9", key: "1qo2s2" }], |
| 9958 |
["path", { d: "M10.3 21a1.94 1.94 0 0 0 3.4 0", key: "qgo35s" }], |
| 9959 |
["path", { d: "M4 2C2.8 3.7 2 5.7 2 8", key: "tap9e0" }], |
| 9960 |
["path", { d: "M22 8c0-2.3-.8-4.3-2-6", key: "5bb3ad" }] |
| 9961 |
]); |
| 9962 |
/** |
| 9963 |
* @license lucide-react v0.294.0 - ISC |
| 9964 |
* |
| 9965 |
* This source code is licensed under the ISC license. |
| 9966 |
* See the LICENSE file in the root directory of this source tree. |
| 9967 |
*/ |
| 9968 |
const Bell = createLucideIcon("Bell", [ |
| 9969 |
["path", { d: "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9", key: "1qo2s2" }], |
| 9970 |
["path", { d: "M10.3 21a1.94 1.94 0 0 0 3.4 0", key: "qgo35s" }] |
| 9971 |
]); |
| 9972 |
/** |
| 9973 |
* @license lucide-react v0.294.0 - ISC |
| 9974 |
* |
| 9975 |
* This source code is licensed under the ISC license. |
| 9976 |
* See the LICENSE file in the root directory of this source tree. |
| 9977 |
*/ |
| 9978 |
const BookOpen = createLucideIcon("BookOpen", [ |
| 9979 |
["path", { d: "M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z", key: "vv98re" }], |
| 9980 |
["path", { d: "M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z", key: "1cyq3y" }] |
| 9981 |
]); |
| 9982 |
/** |
| 9983 |
* @license lucide-react v0.294.0 - ISC |
| 9984 |
* |
| 9985 |
* This source code is licensed under the ISC license. |
| 9986 |
* See the LICENSE file in the root directory of this source tree. |
| 9987 |
*/ |
| 9988 |
const Box = createLucideIcon("Box", [ |
| 9989 |
[ |
| 9990 |
"path", |
| 9991 |
{ |
| 9992 |
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z", |
| 9993 |
key: "hh9hay" |
| 9994 |
} |
| 9995 |
], |
| 9996 |
["path", { d: "m3.3 7 8.7 5 8.7-5", key: "g66t2b" }], |
| 9997 |
["path", { d: "M12 22V12", key: "d0xqtd" }] |
| 9998 |
]); |
| 9999 |
/** |
| 10000 |
* @license lucide-react v0.294.0 - ISC |
| 10001 |
* |
| 10002 |
* This source code is licensed under the ISC license. |
| 10003 |
* See the LICENSE file in the root directory of this source tree. |
| 10004 |
*/ |
| 10005 |
const Bug = createLucideIcon("Bug", [ |
| 10006 |
["path", { d: "m8 2 1.88 1.88", key: "fmnt4t" }], |
| 10007 |
["path", { d: "M14.12 3.88 16 2", key: "qol33r" }], |
| 10008 |
["path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1", key: "d7y7pr" }], |
| 10009 |
[ |
| 10010 |
"path", |
| 10011 |
{ |
| 10012 |
d: "M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6", |
| 10013 |
key: "xs1cw7" |
| 10014 |
} |
| 10015 |
], |
| 10016 |
["path", { d: "M12 20v-9", key: "1qisl0" }], |
| 10017 |
["path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5", key: "32zzws" }], |
| 10018 |
["path", { d: "M6 13H2", key: "82j7cp" }], |
| 10019 |
["path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4", key: "4p0ekp" }], |
| 10020 |
["path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4", key: "18gb23" }], |
| 10021 |
["path", { d: "M22 13h-4", key: "1jl80f" }], |
| 10022 |
["path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4", key: "k3fwyw" }] |
| 10023 |
]); |
| 10024 |
/** |
| 10025 |
* @license lucide-react v0.294.0 - ISC |
| 10026 |
* |
| 10027 |
* This source code is licensed under the ISC license. |
| 10028 |
* See the LICENSE file in the root directory of this source tree. |
| 10029 |
*/ |
| 10030 |
const Building2 = createLucideIcon("Building2", [ |
| 10031 |
["path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z", key: "1b4qmf" }], |
| 10032 |
["path", { d: "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2", key: "i71pzd" }], |
| 10033 |
["path", { d: "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2", key: "10jefs" }], |
| 10034 |
["path", { d: "M10 6h4", key: "1itunk" }], |
| 10035 |
["path", { d: "M10 10h4", key: "tcdvrf" }], |
| 10036 |
["path", { d: "M10 14h4", key: "kelpxr" }], |
| 10037 |
["path", { d: "M10 18h4", key: "1ulq68" }] |
| 10038 |
]); |
| 10039 |
/** |
| 10040 |
* @license lucide-react v0.294.0 - ISC |
| 10041 |
* |
| 10042 |
* This source code is licensed under the ISC license. |
| 10043 |
* See the LICENSE file in the root directory of this source tree. |
| 10044 |
*/ |
| 10045 |
const CalendarClock = createLucideIcon("CalendarClock", [ |
| 10046 |
["path", { d: "M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5", key: "1osxxc" }], |
| 10047 |
["path", { d: "M16 2v4", key: "4m81vk" }], |
| 10048 |
["path", { d: "M8 2v4", key: "1cmpym" }], |
| 10049 |
["path", { d: "M3 10h5", key: "r794hk" }], |
| 10050 |
["path", { d: "M17.5 17.5 16 16.25V14", key: "re2vv1" }], |
| 10051 |
["path", { d: "M22 16a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z", key: "ame013" }] |
| 10052 |
]); |
| 10053 |
/** |
| 10054 |
* @license lucide-react v0.294.0 - ISC |
| 10055 |
* |
| 10056 |
* This source code is licensed under the ISC license. |
| 10057 |
* See the LICENSE file in the root directory of this source tree. |
| 10058 |
*/ |
| 10059 |
const CalendarDays = createLucideIcon("CalendarDays", [ |
| 10060 |
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", ry: "2", key: "eu3xkr" }], |
| 10061 |
["line", { x1: "16", x2: "16", y1: "2", y2: "6", key: "m3sa8f" }], |
| 10062 |
["line", { x1: "8", x2: "8", y1: "2", y2: "6", key: "18kwsl" }], |
| 10063 |
["line", { x1: "3", x2: "21", y1: "10", y2: "10", key: "xt86sb" }], |
| 10064 |
["path", { d: "M8 14h.01", key: "6423bh" }], |
| 10065 |
["path", { d: "M12 14h.01", key: "1etili" }], |
| 10066 |
["path", { d: "M16 14h.01", key: "1gbofw" }], |
| 10067 |
["path", { d: "M8 18h.01", key: "lrp35t" }], |
| 10068 |
["path", { d: "M12 18h.01", key: "mhygvu" }], |
| 10069 |
["path", { d: "M16 18h.01", key: "kzsmim" }] |
| 10070 |
]); |
| 10071 |
/** |
| 10072 |
* @license lucide-react v0.294.0 - ISC |
| 10073 |
* |
| 10074 |
* This source code is licensed under the ISC license. |
| 10075 |
* See the LICENSE file in the root directory of this source tree. |
| 10076 |
*/ |
| 10077 |
const Calendar = createLucideIcon("Calendar", [ |
| 10078 |
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", ry: "2", key: "eu3xkr" }], |
| 10079 |
["line", { x1: "16", x2: "16", y1: "2", y2: "6", key: "m3sa8f" }], |
| 10080 |
["line", { x1: "8", x2: "8", y1: "2", y2: "6", key: "18kwsl" }], |
| 10081 |
["line", { x1: "3", x2: "21", y1: "10", y2: "10", key: "xt86sb" }] |
| 10082 |
]); |
| 10083 |
/** |
| 10084 |
* @license lucide-react v0.294.0 - ISC |
| 10085 |
* |
| 10086 |
* This source code is licensed under the ISC license. |
| 10087 |
* See the LICENSE file in the root directory of this source tree. |
| 10088 |
*/ |
| 10089 |
const Camera = createLucideIcon("Camera", [ |
| 10090 |
[ |
| 10091 |
"path", |
| 10092 |
{ |
| 10093 |
d: "M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z", |
| 10094 |
key: "1tc9qg" |
| 10095 |
} |
| 10096 |
], |
| 10097 |
["circle", { cx: "12", cy: "13", r: "3", key: "1vg3eu" }] |
| 10098 |
]); |
| 10099 |
/** |
| 10100 |
* @license lucide-react v0.294.0 - ISC |
| 10101 |
* |
| 10102 |
* This source code is licensed under the ISC license. |
| 10103 |
* See the LICENSE file in the root directory of this source tree. |
| 10104 |
*/ |
| 10105 |
const Car = createLucideIcon("Car", [ |
| 10106 |
[ |
| 10107 |
"path", |
| 10108 |
{ |
| 10109 |
d: "M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2", |
| 10110 |
key: "5owen" |
| 10111 |
} |
| 10112 |
], |
| 10113 |
["circle", { cx: "7", cy: "17", r: "2", key: "u2ysq9" }], |
| 10114 |
["path", { d: "M9 17h6", key: "r8uit2" }], |
| 10115 |
["circle", { cx: "17", cy: "17", r: "2", key: "axvx0g" }] |
| 10116 |
]); |
| 10117 |
/** |
| 10118 |
* @license lucide-react v0.294.0 - ISC |
| 10119 |
* |
| 10120 |
* This source code is licensed under the ISC license. |
| 10121 |
* See the LICENSE file in the root directory of this source tree. |
| 10122 |
*/ |
| 10123 |
const CheckCircle2 = createLucideIcon("CheckCircle2", [ |
| 10124 |
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], |
| 10125 |
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }] |
| 10126 |
]); |
| 10127 |
/** |
| 10128 |
* @license lucide-react v0.294.0 - ISC |
| 10129 |
* |
| 10130 |
* This source code is licensed under the ISC license. |
| 10131 |
* See the LICENSE file in the root directory of this source tree. |
| 10132 |
*/ |
| 10133 |
const CheckCircle = createLucideIcon("CheckCircle", [ |
| 10134 |
["path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14", key: "g774vq" }], |
| 10135 |
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }] |
| 10136 |
]); |
| 10137 |
/** |
| 10138 |
* @license lucide-react v0.294.0 - ISC |
| 10139 |
* |
| 10140 |
* This source code is licensed under the ISC license. |
| 10141 |
* See the LICENSE file in the root directory of this source tree. |
| 10142 |
*/ |
| 10143 |
const CheckSquare = createLucideIcon("CheckSquare", [ |
| 10144 |
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }], |
| 10145 |
["path", { d: "M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11", key: "1jnkn4" }] |
| 10146 |
]); |
| 10147 |
/** |
| 10148 |
* @license lucide-react v0.294.0 - ISC |
| 10149 |
* |
| 10150 |
* This source code is licensed under the ISC license. |
| 10151 |
* See the LICENSE file in the root directory of this source tree. |
| 10152 |
*/ |
| 10153 |
const Check = createLucideIcon("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]); |
| 10154 |
/** |
| 10155 |
* @license lucide-react v0.294.0 - ISC |
| 10156 |
* |
| 10157 |
* This source code is licensed under the ISC license. |
| 10158 |
* See the LICENSE file in the root directory of this source tree. |
| 10159 |
*/ |
| 10160 |
const ChevronDown = createLucideIcon("ChevronDown", [ |
| 10161 |
["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }] |
| 10162 |
]); |
| 10163 |
/** |
| 10164 |
* @license lucide-react v0.294.0 - ISC |
| 10165 |
* |
| 10166 |
* This source code is licensed under the ISC license. |
| 10167 |
* See the LICENSE file in the root directory of this source tree. |
| 10168 |
*/ |
| 10169 |
const ChevronLeft = createLucideIcon("ChevronLeft", [ |
| 10170 |
["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }] |
| 10171 |
]); |
| 10172 |
/** |
| 10173 |
* @license lucide-react v0.294.0 - ISC |
| 10174 |
* |
| 10175 |
* This source code is licensed under the ISC license. |
| 10176 |
* See the LICENSE file in the root directory of this source tree. |
| 10177 |
*/ |
| 10178 |
const ChevronRight = createLucideIcon("ChevronRight", [ |
| 10179 |
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }] |
| 10180 |
]); |
| 10181 |
/** |
| 10182 |
* @license lucide-react v0.294.0 - ISC |
| 10183 |
* |
| 10184 |
* This source code is licensed under the ISC license. |
| 10185 |
* See the LICENSE file in the root directory of this source tree. |
| 10186 |
*/ |
| 10187 |
const ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]); |
| 10188 |
/** |
| 10189 |
* @license lucide-react v0.294.0 - ISC |
| 10190 |
* |
| 10191 |
* This source code is licensed under the ISC license. |
| 10192 |
* See the LICENSE file in the root directory of this source tree. |
| 10193 |
*/ |
| 10194 |
const CircleDollarSign = createLucideIcon("CircleDollarSign", [ |
| 10195 |
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], |
| 10196 |
["path", { d: "M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8", key: "1h4pet" }], |
| 10197 |
["path", { d: "M12 18V6", key: "zqpxq5" }] |
| 10198 |
]); |
| 10199 |
/** |
| 10200 |
* @license lucide-react v0.294.0 - ISC |
| 10201 |
* |
| 10202 |
* This source code is licensed under the ISC license. |
| 10203 |
* See the LICENSE file in the root directory of this source tree. |
| 10204 |
*/ |
| 10205 |
const CircleUser = createLucideIcon("CircleUser", [ |
| 10206 |
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], |
| 10207 |
["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }], |
| 10208 |
["path", { d: "M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662", key: "154egf" }] |
| 10209 |
]); |
| 10210 |
/** |
| 10211 |
* @license lucide-react v0.294.0 - ISC |
| 10212 |
* |
| 10213 |
* This source code is licensed under the ISC license. |
| 10214 |
* See the LICENSE file in the root directory of this source tree. |
| 10215 |
*/ |
| 10216 |
const ClipboardCheck = createLucideIcon("ClipboardCheck", [ |
| 10217 |
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }], |
| 10218 |
[ |
| 10219 |
"path", |
| 10220 |
{ |
| 10221 |
d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2", |
| 10222 |
key: "116196" |
| 10223 |
} |
| 10224 |
], |
| 10225 |
["path", { d: "m9 14 2 2 4-4", key: "df797q" }] |
| 10226 |
]); |
| 10227 |
/** |
| 10228 |
* @license lucide-react v0.294.0 - ISC |
| 10229 |
* |
| 10230 |
* This source code is licensed under the ISC license. |
| 10231 |
* See the LICENSE file in the root directory of this source tree. |
| 10232 |
*/ |
| 10233 |
const ClipboardCopy = createLucideIcon("ClipboardCopy", [ |
| 10234 |
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }], |
| 10235 |
["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2", key: "4jdomd" }], |
| 10236 |
["path", { d: "M16 4h2a2 2 0 0 1 2 2v4", key: "3hqy98" }], |
| 10237 |
["path", { d: "M21 14H11", key: "1bme5i" }], |
| 10238 |
["path", { d: "m15 10-4 4 4 4", key: "5dvupr" }] |
| 10239 |
]); |
| 10240 |
/** |
| 10241 |
* @license lucide-react v0.294.0 - ISC |
| 10242 |
* |
| 10243 |
* This source code is licensed under the ISC license. |
| 10244 |
* See the LICENSE file in the root directory of this source tree. |
| 10245 |
*/ |
| 10246 |
const ClipboardList = createLucideIcon("ClipboardList", [ |
| 10247 |
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }], |
| 10248 |
[ |
| 10249 |
"path", |
| 10250 |
{ |
| 10251 |
d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2", |
| 10252 |
key: "116196" |
| 10253 |
} |
| 10254 |
], |
| 10255 |
["path", { d: "M12 11h4", key: "1jrz19" }], |
| 10256 |
["path", { d: "M12 16h4", key: "n85exb" }], |
| 10257 |
["path", { d: "M8 11h.01", key: "1dfujw" }], |
| 10258 |
["path", { d: "M8 16h.01", key: "18s6g9" }] |
| 10259 |
]); |
| 10260 |
/** |
| 10261 |
* @license lucide-react v0.294.0 - ISC |
| 10262 |
* |
| 10263 |
* This source code is licensed under the ISC license. |
| 10264 |
* See the LICENSE file in the root directory of this source tree. |
| 10265 |
*/ |
| 10266 |
const Clock = createLucideIcon("Clock", [ |
| 10267 |
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], |
| 10268 |
["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }] |
| 10269 |
]); |
| 10270 |
/** |
| 10271 |
* @license lucide-react v0.294.0 - ISC |
| 10272 |
* |
| 10273 |
* This source code is licensed under the ISC license. |
| 10274 |
* See the LICENSE file in the root directory of this source tree. |
| 10275 |
*/ |
| 10276 |
const Code = createLucideIcon("Code", [ |
| 10277 |
["polyline", { points: "16 18 22 12 16 6", key: "z7tu5w" }], |
| 10278 |
["polyline", { points: "8 6 2 12 8 18", key: "1eg1df" }] |
| 10279 |
]); |
| 10280 |
/** |
| 10281 |
* @license lucide-react v0.294.0 - ISC |
| 10282 |
* |
| 10283 |
* This source code is licensed under the ISC license. |
| 10284 |
* See the LICENSE file in the root directory of this source tree. |
| 10285 |
*/ |
| 10286 |
const Columns = createLucideIcon("Columns", [ |
| 10287 |
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }], |
| 10288 |
["line", { x1: "12", x2: "12", y1: "3", y2: "21", key: "1efggb" }] |
| 10289 |
]); |
| 10290 |
/** |
| 10291 |
* @license lucide-react v0.294.0 - ISC |
| 10292 |
* |
| 10293 |
* This source code is licensed under the ISC license. |
| 10294 |
* See the LICENSE file in the root directory of this source tree. |
| 10295 |
*/ |
| 10296 |
const Compass = createLucideIcon("Compass", [ |
| 10297 |
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], |
| 10298 |
["polygon", { points: "16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76", key: "m9r19z" }] |
| 10299 |
]); |
| 10300 |
/** |
| 10301 |
* @license lucide-react v0.294.0 - ISC |
| 10302 |
* |
| 10303 |
* This source code is licensed under the ISC license. |
| 10304 |
* See the LICENSE file in the root directory of this source tree. |
| 10305 |
*/ |
| 10306 |
const Copy = createLucideIcon("Copy", [ |
| 10307 |
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }], |
| 10308 |
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }] |
| 10309 |
]); |
| 10310 |
/** |
| 10311 |
* @license lucide-react v0.294.0 - ISC |
| 10312 |
* |
| 10313 |
* This source code is licensed under the ISC license. |
| 10314 |
* See the LICENSE file in the root directory of this source tree. |
| 10315 |
*/ |
| 10316 |
const CreditCard = createLucideIcon("CreditCard", [ |
| 10317 |
["rect", { width: "20", height: "14", x: "2", y: "5", rx: "2", key: "ynyp8z" }], |
| 10318 |
["line", { x1: "2", x2: "22", y1: "10", y2: "10", key: "1b3vmo" }] |
| 10319 |
]); |
| 10320 |
/** |
| 10321 |
* @license lucide-react v0.294.0 - ISC |
| 10322 |
* |
| 10323 |
* This source code is licensed under the ISC license. |
| 10324 |
* See the LICENSE file in the root directory of this source tree. |
| 10325 |
*/ |
| 10326 |
const Crown = createLucideIcon("Crown", [ |
| 10327 |
["path", { d: "m2 4 3 12h14l3-12-6 7-4-7-4 7-6-7zm3 16h14", key: "zkxr6b" }] |
| 10328 |
]); |
| 10329 |
/** |
| 10330 |
* @license lucide-react v0.294.0 - ISC |
| 10331 |
* |
| 10332 |
* This source code is licensed under the ISC license. |
| 10333 |
* See the LICENSE file in the root directory of this source tree. |
| 10334 |
*/ |
| 10335 |
const Database = createLucideIcon("Database", [ |
| 10336 |
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }], |
| 10337 |
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }], |
| 10338 |
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }] |
| 10339 |
]); |
| 10340 |
/** |
| 10341 |
* @license lucide-react v0.294.0 - ISC |
| 10342 |
* |
| 10343 |
* This source code is licensed under the ISC license. |
| 10344 |
* See the LICENSE file in the root directory of this source tree. |
| 10345 |
*/ |
| 10346 |
const DollarSign = createLucideIcon("DollarSign", [ |
| 10347 |
["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }], |
| 10348 |
["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6", key: "1b0p4s" }] |
| 10349 |
]); |
| 10350 |
/** |
| 10351 |
* @license lucide-react v0.294.0 - ISC |
| 10352 |
* |
| 10353 |
* This source code is licensed under the ISC license. |
| 10354 |
* See the LICENSE file in the root directory of this source tree. |
| 10355 |
*/ |
| 10356 |
const Download = createLucideIcon("Download", [ |
| 10357 |
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }], |
| 10358 |
["polyline", { points: "7 10 12 15 17 10", key: "2ggqvy" }], |
| 10359 |
["line", { x1: "12", x2: "12", y1: "15", y2: "3", key: "1vk2je" }] |
| 10360 |
]); |
| 10361 |
/** |
| 10362 |
* @license lucide-react v0.294.0 - ISC |
| 10363 |
* |
| 10364 |
* This source code is licensed under the ISC license. |
| 10365 |
* See the LICENSE file in the root directory of this source tree. |
| 10366 |
*/ |
| 10367 |
const ExternalLink = createLucideIcon("ExternalLink", [ |
| 10368 |
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }], |
| 10369 |
["polyline", { points: "15 3 21 3 21 9", key: "mznyad" }], |
| 10370 |
["line", { x1: "10", x2: "21", y1: "14", y2: "3", key: "18c3s4" }] |
| 10371 |
]); |
| 10372 |
/** |
| 10373 |
* @license lucide-react v0.294.0 - ISC |
| 10374 |
* |
| 10375 |
* This source code is licensed under the ISC license. |
| 10376 |
* See the LICENSE file in the root directory of this source tree. |
| 10377 |
*/ |
| 10378 |
const EyeOff = createLucideIcon("EyeOff", [ |
| 10379 |
["path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24", key: "1jxqfv" }], |
| 10380 |
[ |
| 10381 |
"path", |
| 10382 |
{ |
| 10383 |
d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68", |
| 10384 |
key: "9wicm4" |
| 10385 |
} |
| 10386 |
], |
| 10387 |
[ |
| 10388 |
"path", |
| 10389 |
{ d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61", key: "1jreej" } |
| 10390 |
], |
| 10391 |
["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }] |
| 10392 |
]); |
| 10393 |
/** |
| 10394 |
* @license lucide-react v0.294.0 - ISC |
| 10395 |
* |
| 10396 |
* This source code is licensed under the ISC license. |
| 10397 |
* See the LICENSE file in the root directory of this source tree. |
| 10398 |
*/ |
| 10399 |
const Eye = createLucideIcon("Eye", [ |
| 10400 |
["path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z", key: "rwhkz3" }], |
| 10401 |
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }] |
| 10402 |
]); |
| 10403 |
/** |
| 10404 |
* @license lucide-react v0.294.0 - ISC |
| 10405 |
* |
| 10406 |
* This source code is licensed under the ISC license. |
| 10407 |
* See the LICENSE file in the root directory of this source tree. |
| 10408 |
*/ |
| 10409 |
const FileSignature = createLucideIcon("FileSignature", [ |
| 10410 |
[ |
| 10411 |
"path", |
| 10412 |
{ d: "M20 19.5v.5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8.5L18 5.5", key: "kd5d3" } |
| 10413 |
], |
| 10414 |
["path", { d: "M8 18h1", key: "13wk12" }], |
| 10415 |
[ |
| 10416 |
"path", |
| 10417 |
{ d: "M18.42 9.61a2.1 2.1 0 1 1 2.97 2.97L16.95 17 13 18l.99-3.95 4.43-4.44Z", key: "johvi5" } |
| 10418 |
] |
| 10419 |
]); |
| 10420 |
/** |
| 10421 |
* @license lucide-react v0.294.0 - ISC |
| 10422 |
* |
| 10423 |
* This source code is licensed under the ISC license. |
| 10424 |
* See the LICENSE file in the root directory of this source tree. |
| 10425 |
*/ |
| 10426 |
const FileText = createLucideIcon("FileText", [ |
| 10427 |
[ |
| 10428 |
"path", |
| 10429 |
{ d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z", key: "1nnpy2" } |
| 10430 |
], |
| 10431 |
["polyline", { points: "14 2 14 8 20 8", key: "1ew0cm" }], |
| 10432 |
["line", { x1: "16", x2: "8", y1: "13", y2: "13", key: "14keom" }], |
| 10433 |
["line", { x1: "16", x2: "8", y1: "17", y2: "17", key: "17nazh" }], |
| 10434 |
["line", { x1: "10", x2: "8", y1: "9", y2: "9", key: "1a5vjj" }] |
| 10435 |
]); |
| 10436 |
/** |
| 10437 |
* @license lucide-react v0.294.0 - ISC |
| 10438 |
* |
| 10439 |
* This source code is licensed under the ISC license. |
| 10440 |
* See the LICENSE file in the root directory of this source tree. |
| 10441 |
*/ |
| 10442 |
const Filter = createLucideIcon("Filter", [ |
| 10443 |
["polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3", key: "1yg77f" }] |
| 10444 |
]); |
| 10445 |
/** |
| 10446 |
* @license lucide-react v0.294.0 - ISC |
| 10447 |
* |
| 10448 |
* This source code is licensed under the ISC license. |
| 10449 |
* See the LICENSE file in the root directory of this source tree. |
| 10450 |
*/ |
| 10451 |
const FolderTree = createLucideIcon("FolderTree", [ |
| 10452 |
[ |
| 10453 |
"path", |
| 10454 |
{ |
| 10455 |
d: "M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z", |
| 10456 |
key: "hod4my" |
| 10457 |
} |
| 10458 |
], |
| 10459 |
[ |
| 10460 |
"path", |
| 10461 |
{ |
| 10462 |
d: "M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z", |
| 10463 |
key: "w4yl2u" |
| 10464 |
} |
| 10465 |
], |
| 10466 |
["path", { d: "M3 5a2 2 0 0 0 2 2h3", key: "f2jnh7" }], |
| 10467 |
["path", { d: "M3 3v13a2 2 0 0 0 2 2h3", key: "k8epm1" }] |
| 10468 |
]); |
| 10469 |
/** |
| 10470 |
* @license lucide-react v0.294.0 - ISC |
| 10471 |
* |
| 10472 |
* This source code is licensed under the ISC license. |
| 10473 |
* See the LICENSE file in the root directory of this source tree. |
| 10474 |
*/ |
| 10475 |
const Folder = createLucideIcon("Folder", [ |
| 10476 |
[ |
| 10477 |
"path", |
| 10478 |
{ |
| 10479 |
d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z", |
| 10480 |
key: "1kt360" |
| 10481 |
} |
| 10482 |
] |
| 10483 |
]); |
| 10484 |
/** |
| 10485 |
* @license lucide-react v0.294.0 - ISC |
| 10486 |
* |
| 10487 |
* This source code is licensed under the ISC license. |
| 10488 |
* See the LICENSE file in the root directory of this source tree. |
| 10489 |
*/ |
| 10490 |
const Gift = createLucideIcon("Gift", [ |
| 10491 |
["rect", { x: "3", y: "8", width: "18", height: "4", rx: "1", key: "bkv52" }], |
| 10492 |
["path", { d: "M12 8v13", key: "1c76mn" }], |
| 10493 |
["path", { d: "M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7", key: "6wjy6b" }], |
| 10494 |
[ |
| 10495 |
"path", |
| 10496 |
{ |
| 10497 |
d: "M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5", |
| 10498 |
key: "1ihvrl" |
| 10499 |
} |
| 10500 |
] |
| 10501 |
]); |
| 10502 |
/** |
| 10503 |
* @license lucide-react v0.294.0 - ISC |
| 10504 |
* |
| 10505 |
* This source code is licensed under the ISC license. |
| 10506 |
* See the LICENSE file in the root directory of this source tree. |
| 10507 |
*/ |
| 10508 |
const GitBranch = createLucideIcon("GitBranch", [ |
| 10509 |
["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }], |
| 10510 |
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }], |
| 10511 |
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }], |
| 10512 |
["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }] |
| 10513 |
]); |
| 10514 |
/** |
| 10515 |
* @license lucide-react v0.294.0 - ISC |
| 10516 |
* |
| 10517 |
* This source code is licensed under the ISC license. |
| 10518 |
* See the LICENSE file in the root directory of this source tree. |
| 10519 |
*/ |
| 10520 |
const Globe = createLucideIcon("Globe", [ |
| 10521 |
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], |
| 10522 |
["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }], |
| 10523 |
["path", { d: "M2 12h20", key: "9i4pu4" }] |
| 10524 |
]); |
| 10525 |
/** |
| 10526 |
* @license lucide-react v0.294.0 - ISC |
| 10527 |
* |
| 10528 |
* This source code is licensed under the ISC license. |
| 10529 |
* See the LICENSE file in the root directory of this source tree. |
| 10530 |
*/ |
| 10531 |
const GripVertical = createLucideIcon("GripVertical", [ |
| 10532 |
["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }], |
| 10533 |
["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }], |
| 10534 |
["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }], |
| 10535 |
["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }], |
| 10536 |
["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }], |
| 10537 |
["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }] |
| 10538 |
]); |
| 10539 |
/** |
| 10540 |
* @license lucide-react v0.294.0 - ISC |
| 10541 |
* |
| 10542 |
* This source code is licensed under the ISC license. |
| 10543 |
* See the LICENSE file in the root directory of this source tree. |
| 10544 |
*/ |
| 10545 |
const Hash$2 = createLucideIcon("Hash", [ |
| 10546 |
["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }], |
| 10547 |
["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }], |
| 10548 |
["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }], |
| 10549 |
["line", { x1: "16", x2: "14", y1: "3", y2: "21", key: "weycgp" }] |
| 10550 |
]); |
| 10551 |
/** |
| 10552 |
* @license lucide-react v0.294.0 - ISC |
| 10553 |
* |
| 10554 |
* This source code is licensed under the ISC license. |
| 10555 |
* See the LICENSE file in the root directory of this source tree. |
| 10556 |
*/ |
| 10557 |
const Heart = createLucideIcon("Heart", [ |
| 10558 |
[ |
| 10559 |
"path", |
| 10560 |
{ |
| 10561 |
d: "M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z", |
| 10562 |
key: "c3ymky" |
| 10563 |
} |
| 10564 |
] |
| 10565 |
]); |
| 10566 |
/** |
| 10567 |
* @license lucide-react v0.294.0 - ISC |
| 10568 |
* |
| 10569 |
* This source code is licensed under the ISC license. |
| 10570 |
* See the LICENSE file in the root directory of this source tree. |
| 10571 |
*/ |
| 10572 |
const HelpCircle = createLucideIcon("HelpCircle", [ |
| 10573 |
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], |
| 10574 |
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }], |
| 10575 |
["path", { d: "M12 17h.01", key: "p32p05" }] |
| 10576 |
]); |
| 10577 |
/** |
| 10578 |
* @license lucide-react v0.294.0 - ISC |
| 10579 |
* |
| 10580 |
* This source code is licensed under the ISC license. |
| 10581 |
* See the LICENSE file in the root directory of this source tree. |
| 10582 |
*/ |
| 10583 |
const History = createLucideIcon("History", [ |
| 10584 |
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }], |
| 10585 |
["path", { d: "M3 3v5h5", key: "1xhq8a" }], |
| 10586 |
["path", { d: "M12 7v5l4 2", key: "1fdv2h" }] |
| 10587 |
]); |
| 10588 |
/** |
| 10589 |
* @license lucide-react v0.294.0 - ISC |
| 10590 |
* |
| 10591 |
* This source code is licensed under the ISC license. |
| 10592 |
* See the LICENSE file in the root directory of this source tree. |
| 10593 |
*/ |
| 10594 |
const Home = createLucideIcon("Home", [ |
| 10595 |
["path", { d: "m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z", key: "y5dka4" }], |
| 10596 |
["polyline", { points: "9 22 9 12 15 12 15 22", key: "e2us08" }] |
| 10597 |
]); |
| 10598 |
/** |
| 10599 |
* @license lucide-react v0.294.0 - ISC |
| 10600 |
* |
| 10601 |
* This source code is licensed under the ISC license. |
| 10602 |
* See the LICENSE file in the root directory of this source tree. |
| 10603 |
*/ |
| 10604 |
const Hotel = createLucideIcon("Hotel", [ |
| 10605 |
[ |
| 10606 |
"path", |
| 10607 |
{ |
| 10608 |
d: "M18 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2Z", |
| 10609 |
key: "p9z69c" |
| 10610 |
} |
| 10611 |
], |
| 10612 |
["path", { d: "m9 16 .348-.24c1.465-1.013 3.84-1.013 5.304 0L15 16", key: "1bvcvh" }], |
| 10613 |
["path", { d: "M8 7h.01", key: "1vti4s" }], |
| 10614 |
["path", { d: "M16 7h.01", key: "1kdx03" }], |
| 10615 |
["path", { d: "M12 7h.01", key: "1ivr5q" }], |
| 10616 |
["path", { d: "M12 11h.01", key: "z322tv" }], |
| 10617 |
["path", { d: "M16 11h.01", key: "xkw8gn" }], |
| 10618 |
["path", { d: "M8 11h.01", key: "1dfujw" }], |
| 10619 |
["path", { d: "M10 22v-6.5m4 0V22", key: "16gs4s" }] |
| 10620 |
]); |
| 10621 |
/** |
| 10622 |
* @license lucide-react v0.294.0 - ISC |
| 10623 |
* |
| 10624 |
* This source code is licensed under the ISC license. |
| 10625 |
* See the LICENSE file in the root directory of this source tree. |
| 10626 |
*/ |
| 10627 |
const Image = createLucideIcon("Image", [ |
| 10628 |
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }], |
| 10629 |
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }], |
| 10630 |
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }] |
| 10631 |
]); |
| 10632 |
/** |
| 10633 |
* @license lucide-react v0.294.0 - ISC |
| 10634 |
* |
| 10635 |
* This source code is licensed under the ISC license. |
| 10636 |
* See the LICENSE file in the root directory of this source tree. |
| 10637 |
*/ |
| 10638 |
const Inbox = createLucideIcon("Inbox", [ |
| 10639 |
["polyline", { points: "22 12 16 12 14 15 10 15 8 12 2 12", key: "o97t9d" }], |
| 10640 |
[ |
| 10641 |
"path", |
| 10642 |
{ |
| 10643 |
d: "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z", |
| 10644 |
key: "oot6mr" |
| 10645 |
} |
| 10646 |
] |
| 10647 |
]); |
| 10648 |
/** |
| 10649 |
* @license lucide-react v0.294.0 - ISC |
| 10650 |
* |
| 10651 |
* This source code is licensed under the ISC license. |
| 10652 |
* See the LICENSE file in the root directory of this source tree. |
| 10653 |
*/ |
| 10654 |
const Info = createLucideIcon("Info", [ |
| 10655 |
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], |
| 10656 |
["path", { d: "M12 16v-4", key: "1dtifu" }], |
| 10657 |
["path", { d: "M12 8h.01", key: "e9boi3" }] |
| 10658 |
]); |
| 10659 |
/** |
| 10660 |
* @license lucide-react v0.294.0 - ISC |
| 10661 |
* |
| 10662 |
* This source code is licensed under the ISC license. |
| 10663 |
* See the LICENSE file in the root directory of this source tree. |
| 10664 |
*/ |
| 10665 |
const KeyRound = createLucideIcon("KeyRound", [ |
| 10666 |
["path", { d: "M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z", key: "167ctg" }], |
| 10667 |
["circle", { cx: "16.5", cy: "7.5", r: ".5", key: "1kog09" }] |
| 10668 |
]); |
| 10669 |
/** |
| 10670 |
* @license lucide-react v0.294.0 - ISC |
| 10671 |
* |
| 10672 |
* This source code is licensed under the ISC license. |
| 10673 |
* See the LICENSE file in the root directory of this source tree. |
| 10674 |
*/ |
| 10675 |
const Key = createLucideIcon("Key", [ |
| 10676 |
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }], |
| 10677 |
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }], |
| 10678 |
["path", { d: "m15.5 7.5 3 3L22 7l-3-3", key: "1rn1fs" }] |
| 10679 |
]); |
| 10680 |
/** |
| 10681 |
* @license lucide-react v0.294.0 - ISC |
| 10682 |
* |
| 10683 |
* This source code is licensed under the ISC license. |
| 10684 |
* See the LICENSE file in the root directory of this source tree. |
| 10685 |
*/ |
| 10686 |
const Layers = createLucideIcon("Layers", [ |
| 10687 |
[ |
| 10688 |
"path", |
| 10689 |
{ |
| 10690 |
d: "m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z", |
| 10691 |
key: "8b97xw" |
| 10692 |
} |
| 10693 |
], |
| 10694 |
["path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65", key: "dd6zsq" }], |
| 10695 |
["path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65", key: "ep9fru" }] |
| 10696 |
]); |
| 10697 |
/** |
| 10698 |
* @license lucide-react v0.294.0 - ISC |
| 10699 |
* |
| 10700 |
* This source code is licensed under the ISC license. |
| 10701 |
* See the LICENSE file in the root directory of this source tree. |
| 10702 |
*/ |
| 10703 |
const LayoutDashboard = createLucideIcon("LayoutDashboard", [ |
| 10704 |
["rect", { width: "7", height: "9", x: "3", y: "3", rx: "1", key: "10lvy0" }], |
| 10705 |
["rect", { width: "7", height: "5", x: "14", y: "3", rx: "1", key: "16une8" }], |
| 10706 |
["rect", { width: "7", height: "9", x: "14", y: "12", rx: "1", key: "1hutg5" }], |
| 10707 |
["rect", { width: "7", height: "5", x: "3", y: "16", rx: "1", key: "ldoo1y" }] |
| 10708 |
]); |
| 10709 |
/** |
| 10710 |
* @license lucide-react v0.294.0 - ISC |
| 10711 |
* |
| 10712 |
* This source code is licensed under the ISC license. |
| 10713 |
* See the LICENSE file in the root directory of this source tree. |
| 10714 |
*/ |
| 10715 |
const Layout = createLucideIcon("Layout", [ |
| 10716 |
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }], |
| 10717 |
["line", { x1: "3", x2: "21", y1: "9", y2: "9", key: "1vqk6q" }], |
| 10718 |
["line", { x1: "9", x2: "9", y1: "21", y2: "9", key: "wpwpyp" }] |
| 10719 |
]); |
| 10720 |
/** |
| 10721 |
* @license lucide-react v0.294.0 - ISC |
| 10722 |
* |
| 10723 |
* This source code is licensed under the ISC license. |
| 10724 |
* See the LICENSE file in the root directory of this source tree. |
| 10725 |
*/ |
| 10726 |
const LifeBuoy = createLucideIcon("LifeBuoy", [ |
| 10727 |
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], |
| 10728 |
["path", { d: "m4.93 4.93 4.24 4.24", key: "1ymg45" }], |
| 10729 |
["path", { d: "m14.83 9.17 4.24-4.24", key: "1cb5xl" }], |
| 10730 |
["path", { d: "m14.83 14.83 4.24 4.24", key: "q42g0n" }], |
| 10731 |
["path", { d: "m9.17 14.83-4.24 4.24", key: "bqpfvv" }], |
| 10732 |
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }] |
| 10733 |
]); |
| 10734 |
/** |
| 10735 |
* @license lucide-react v0.294.0 - ISC |
| 10736 |
* |
| 10737 |
* This source code is licensed under the ISC license. |
| 10738 |
* See the LICENSE file in the root directory of this source tree. |
| 10739 |
*/ |
| 10740 |
const Lightbulb = createLucideIcon("Lightbulb", [ |
| 10741 |
[ |
| 10742 |
"path", |
| 10743 |
{ |
| 10744 |
d: "M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5", |
| 10745 |
key: "1gvzjb" |
| 10746 |
} |
| 10747 |
], |
| 10748 |
["path", { d: "M9 18h6", key: "x1upvd" }], |
| 10749 |
["path", { d: "M10 22h4", key: "ceow96" }] |
| 10750 |
]); |
| 10751 |
/** |
| 10752 |
* @license lucide-react v0.294.0 - ISC |
| 10753 |
* |
| 10754 |
* This source code is licensed under the ISC license. |
| 10755 |
* See the LICENSE file in the root directory of this source tree. |
| 10756 |
*/ |
| 10757 |
const Link = createLucideIcon("Link", [ |
| 10758 |
["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }], |
| 10759 |
["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }] |
| 10760 |
]); |
| 10761 |
/** |
| 10762 |
* @license lucide-react v0.294.0 - ISC |
| 10763 |
* |
| 10764 |
* This source code is licensed under the ISC license. |
| 10765 |
* See the LICENSE file in the root directory of this source tree. |
| 10766 |
*/ |
| 10767 |
const ListChecks = createLucideIcon("ListChecks", [ |
| 10768 |
["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }], |
| 10769 |
["path", { d: "m3 7 2 2 4-4", key: "1obspn" }], |
| 10770 |
["path", { d: "M13 6h8", key: "15sg57" }], |
| 10771 |
["path", { d: "M13 12h8", key: "h98zly" }], |
| 10772 |
["path", { d: "M13 18h8", key: "oe0vm4" }] |
| 10773 |
]); |
| 10774 |
/** |
| 10775 |
* @license lucide-react v0.294.0 - ISC |
| 10776 |
* |
| 10777 |
* This source code is licensed under the ISC license. |
| 10778 |
* See the LICENSE file in the root directory of this source tree. |
| 10779 |
*/ |
| 10780 |
const List = createLucideIcon("List", [ |
| 10781 |
["line", { x1: "8", x2: "21", y1: "6", y2: "6", key: "7ey8pc" }], |
| 10782 |
["line", { x1: "8", x2: "21", y1: "12", y2: "12", key: "rjfblc" }], |
| 10783 |
["line", { x1: "8", x2: "21", y1: "18", y2: "18", key: "c3b1m8" }], |
| 10784 |
["line", { x1: "3", x2: "3.01", y1: "6", y2: "6", key: "1g7gq3" }], |
| 10785 |
["line", { x1: "3", x2: "3.01", y1: "12", y2: "12", key: "1pjlvk" }], |
| 10786 |
["line", { x1: "3", x2: "3.01", y1: "18", y2: "18", key: "28t2mc" }] |
| 10787 |
]); |
| 10788 |
/** |
| 10789 |
* @license lucide-react v0.294.0 - ISC |
| 10790 |
* |
| 10791 |
* This source code is licensed under the ISC license. |
| 10792 |
* See the LICENSE file in the root directory of this source tree. |
| 10793 |
*/ |
| 10794 |
const Loader2 = createLucideIcon("Loader2", [ |
| 10795 |
["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }] |
| 10796 |
]); |
| 10797 |
/** |
| 10798 |
* @license lucide-react v0.294.0 - ISC |
| 10799 |
* |
| 10800 |
* This source code is licensed under the ISC license. |
| 10801 |
* See the LICENSE file in the root directory of this source tree. |
| 10802 |
*/ |
| 10803 |
const Lock = createLucideIcon("Lock", [ |
| 10804 |
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }], |
| 10805 |
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }] |
| 10806 |
]); |
| 10807 |
/** |
| 10808 |
* @license lucide-react v0.294.0 - ISC |
| 10809 |
* |
| 10810 |
* This source code is licensed under the ISC license. |
| 10811 |
* See the LICENSE file in the root directory of this source tree. |
| 10812 |
*/ |
| 10813 |
const LogOut = createLucideIcon("LogOut", [ |
| 10814 |
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }], |
| 10815 |
["polyline", { points: "16 17 21 12 16 7", key: "1gabdz" }], |
| 10816 |
["line", { x1: "21", x2: "9", y1: "12", y2: "12", key: "1uyos4" }] |
| 10817 |
]); |
| 10818 |
/** |
| 10819 |
* @license lucide-react v0.294.0 - ISC |
| 10820 |
* |
| 10821 |
* This source code is licensed under the ISC license. |
| 10822 |
* See the LICENSE file in the root directory of this source tree. |
| 10823 |
*/ |
| 10824 |
const Mail = createLucideIcon("Mail", [ |
| 10825 |
["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }], |
| 10826 |
["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }] |
| 10827 |
]); |
| 10828 |
/** |
| 10829 |
* @license lucide-react v0.294.0 - ISC |
| 10830 |
* |
| 10831 |
* This source code is licensed under the ISC license. |
| 10832 |
* See the LICENSE file in the root directory of this source tree. |
| 10833 |
*/ |
| 10834 |
const MapPin = createLucideIcon("MapPin", [ |
| 10835 |
["path", { d: "M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z", key: "2oe9fu" }], |
| 10836 |
["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }] |
| 10837 |
]); |
| 10838 |
/** |
| 10839 |
* @license lucide-react v0.294.0 - ISC |
| 10840 |
* |
| 10841 |
* This source code is licensed under the ISC license. |
| 10842 |
* See the LICENSE file in the root directory of this source tree. |
| 10843 |
*/ |
| 10844 |
const Maximize2 = createLucideIcon("Maximize2", [ |
| 10845 |
["polyline", { points: "15 3 21 3 21 9", key: "mznyad" }], |
| 10846 |
["polyline", { points: "9 21 3 21 3 15", key: "1avn1i" }], |
| 10847 |
["line", { x1: "21", x2: "14", y1: "3", y2: "10", key: "ota7mn" }], |
| 10848 |
["line", { x1: "3", x2: "10", y1: "21", y2: "14", key: "1atl0r" }] |
| 10849 |
]); |
| 10850 |
/** |
| 10851 |
* @license lucide-react v0.294.0 - ISC |
| 10852 |
* |
| 10853 |
* This source code is licensed under the ISC license. |
| 10854 |
* See the LICENSE file in the root directory of this source tree. |
| 10855 |
*/ |
| 10856 |
const Megaphone = createLucideIcon("Megaphone", [ |
| 10857 |
["path", { d: "m3 11 18-5v12L3 14v-3z", key: "n962bs" }], |
| 10858 |
["path", { d: "M11.6 16.8a3 3 0 1 1-5.8-1.6", key: "1yl0tm" }] |
| 10859 |
]); |
| 10860 |
/** |
| 10861 |
* @license lucide-react v0.294.0 - ISC |
| 10862 |
* |
| 10863 |
* This source code is licensed under the ISC license. |
| 10864 |
* See the LICENSE file in the root directory of this source tree. |
| 10865 |
*/ |
| 10866 |
const MessageCircle = createLucideIcon("MessageCircle", [ |
| 10867 |
["path", { d: "m3 21 1.9-5.7a8.5 8.5 0 1 1 3.8 3.8z", key: "v2veuj" }] |
| 10868 |
]); |
| 10869 |
/** |
| 10870 |
* @license lucide-react v0.294.0 - ISC |
| 10871 |
* |
| 10872 |
* This source code is licensed under the ISC license. |
| 10873 |
* See the LICENSE file in the root directory of this source tree. |
| 10874 |
*/ |
| 10875 |
const MessageSquare = createLucideIcon("MessageSquare", [ |
| 10876 |
["path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", key: "1lielz" }] |
| 10877 |
]); |
| 10878 |
/** |
| 10879 |
* @license lucide-react v0.294.0 - ISC |
| 10880 |
* |
| 10881 |
* This source code is licensed under the ISC license. |
| 10882 |
* See the LICENSE file in the root directory of this source tree. |
| 10883 |
*/ |
| 10884 |
const Moon = createLucideIcon("Moon", [ |
| 10885 |
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }] |
| 10886 |
]); |
| 10887 |
/** |
| 10888 |
* @license lucide-react v0.294.0 - ISC |
| 10889 |
* |
| 10890 |
* This source code is licensed under the ISC license. |
| 10891 |
* See the LICENSE file in the root directory of this source tree. |
| 10892 |
*/ |
| 10893 |
const MoreVertical = createLucideIcon("MoreVertical", [ |
| 10894 |
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }], |
| 10895 |
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }], |
| 10896 |
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }] |
| 10897 |
]); |
| 10898 |
/** |
| 10899 |
* @license lucide-react v0.294.0 - ISC |
| 10900 |
* |
| 10901 |
* This source code is licensed under the ISC license. |
| 10902 |
* See the LICENSE file in the root directory of this source tree. |
| 10903 |
*/ |
| 10904 |
const Mountain = createLucideIcon("Mountain", [ |
| 10905 |
["path", { d: "m8 3 4 8 5-5 5 15H2L8 3z", key: "otkl63" }] |
| 10906 |
]); |
| 10907 |
/** |
| 10908 |
* @license lucide-react v0.294.0 - ISC |
| 10909 |
* |
| 10910 |
* This source code is licensed under the ISC license. |
| 10911 |
* See the LICENSE file in the root directory of this source tree. |
| 10912 |
*/ |
| 10913 |
const Network = createLucideIcon("Network", [ |
| 10914 |
["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }], |
| 10915 |
["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }], |
| 10916 |
["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }], |
| 10917 |
["path", { d: "M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3", key: "1jsf9p" }], |
| 10918 |
["path", { d: "M12 12V8", key: "2874zd" }] |
| 10919 |
]); |
| 10920 |
/** |
| 10921 |
* @license lucide-react v0.294.0 - ISC |
| 10922 |
* |
| 10923 |
* This source code is licensed under the ISC license. |
| 10924 |
* See the LICENSE file in the root directory of this source tree. |
| 10925 |
*/ |
| 10926 |
const Package = createLucideIcon("Package", [ |
| 10927 |
["path", { d: "m7.5 4.27 9 5.15", key: "1c824w" }], |
| 10928 |
[ |
| 10929 |
"path", |
| 10930 |
{ |
| 10931 |
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z", |
| 10932 |
key: "hh9hay" |
| 10933 |
} |
| 10934 |
], |
| 10935 |
["path", { d: "m3.3 7 8.7 5 8.7-5", key: "g66t2b" }], |
| 10936 |
["path", { d: "M12 22V12", key: "d0xqtd" }] |
| 10937 |
]); |
| 10938 |
/** |
| 10939 |
* @license lucide-react v0.294.0 - ISC |
| 10940 |
* |
| 10941 |
* This source code is licensed under the ISC license. |
| 10942 |
* See the LICENSE file in the root directory of this source tree. |
| 10943 |
*/ |
| 10944 |
const Palette = createLucideIcon("Palette", [ |
| 10945 |
["circle", { cx: "13.5", cy: "6.5", r: ".5", key: "1xcu5" }], |
| 10946 |
["circle", { cx: "17.5", cy: "10.5", r: ".5", key: "736e4u" }], |
| 10947 |
["circle", { cx: "8.5", cy: "7.5", r: ".5", key: "clrty" }], |
| 10948 |
["circle", { cx: "6.5", cy: "12.5", r: ".5", key: "1s4xz9" }], |
| 10949 |
[ |
| 10950 |
"path", |
| 10951 |
{ |
| 10952 |
d: "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z", |
| 10953 |
key: "12rzf8" |
| 10954 |
} |
| 10955 |
] |
| 10956 |
]); |
| 10957 |
/** |
| 10958 |
* @license lucide-react v0.294.0 - ISC |
| 10959 |
* |
| 10960 |
* This source code is licensed under the ISC license. |
| 10961 |
* See the LICENSE file in the root directory of this source tree. |
| 10962 |
*/ |
| 10963 |
const PanelLeft = createLucideIcon("PanelLeft", [ |
| 10964 |
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }], |
| 10965 |
["line", { x1: "9", x2: "9", y1: "3", y2: "21", key: "13tij5" }] |
| 10966 |
]); |
| 10967 |
/** |
| 10968 |
* @license lucide-react v0.294.0 - ISC |
| 10969 |
* |
| 10970 |
* This source code is licensed under the ISC license. |
| 10971 |
* See the LICENSE file in the root directory of this source tree. |
| 10972 |
*/ |
| 10973 |
const PauseCircle = createLucideIcon("PauseCircle", [ |
| 10974 |
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], |
| 10975 |
["line", { x1: "10", x2: "10", y1: "15", y2: "9", key: "c1nkhi" }], |
| 10976 |
["line", { x1: "14", x2: "14", y1: "15", y2: "9", key: "h65svq" }] |
| 10977 |
]); |
| 10978 |
/** |
| 10979 |
* @license lucide-react v0.294.0 - ISC |
| 10980 |
* |
| 10981 |
* This source code is licensed under the ISC license. |
| 10982 |
* See the LICENSE file in the root directory of this source tree. |
| 10983 |
*/ |
| 10984 |
const Pause = createLucideIcon("Pause", [ |
| 10985 |
["rect", { width: "4", height: "16", x: "6", y: "4", key: "iffhe4" }], |
| 10986 |
["rect", { width: "4", height: "16", x: "14", y: "4", key: "sjin7j" }] |
| 10987 |
]); |
| 10988 |
/** |
| 10989 |
* @license lucide-react v0.294.0 - ISC |
| 10990 |
* |
| 10991 |
* This source code is licensed under the ISC license. |
| 10992 |
* See the LICENSE file in the root directory of this source tree. |
| 10993 |
*/ |
| 10994 |
const PenSquare = createLucideIcon("PenSquare", [ |
| 10995 |
["path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7", key: "1qinfi" }], |
| 10996 |
["path", { d: "M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4Z", key: "w2jsv5" }] |
| 10997 |
]); |
| 10998 |
/** |
| 10999 |
* @license lucide-react v0.294.0 - ISC |
| 11000 |
* |
| 11001 |
* This source code is licensed under the ISC license. |
| 11002 |
* See the LICENSE file in the root directory of this source tree. |
| 11003 |
*/ |
| 11004 |
const PenTool = createLucideIcon("PenTool", [ |
| 11005 |
["path", { d: "m12 19 7-7 3 3-7 7-3-3z", key: "rklqx2" }], |
| 11006 |
["path", { d: "m18 13-1.5-7.5L2 2l3.5 14.5L13 18l5-5z", key: "1et58u" }], |
| 11007 |
["path", { d: "m2 2 7.586 7.586", key: "etlp93" }], |
| 11008 |
["circle", { cx: "11", cy: "11", r: "2", key: "xmgehs" }] |
| 11009 |
]); |
| 11010 |
/** |
| 11011 |
* @license lucide-react v0.294.0 - ISC |
| 11012 |
* |
| 11013 |
* This source code is licensed under the ISC license. |
| 11014 |
* See the LICENSE file in the root directory of this source tree. |
| 11015 |
*/ |
| 11016 |
const Pen = createLucideIcon("Pen", [ |
| 11017 |
["path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z", key: "5qss01" }] |
| 11018 |
]); |
| 11019 |
/** |
| 11020 |
* @license lucide-react v0.294.0 - ISC |
| 11021 |
* |
| 11022 |
* This source code is licensed under the ISC license. |
| 11023 |
* See the LICENSE file in the root directory of this source tree. |
| 11024 |
*/ |
| 11025 |
const Pencil = createLucideIcon("Pencil", [ |
| 11026 |
["path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z", key: "5qss01" }], |
| 11027 |
["path", { d: "m15 5 4 4", key: "1mk7zo" }] |
| 11028 |
]); |
| 11029 |
/** |
| 11030 |
* @license lucide-react v0.294.0 - ISC |
| 11031 |
* |
| 11032 |
* This source code is licensed under the ISC license. |
| 11033 |
* See the LICENSE file in the root directory of this source tree. |
| 11034 |
*/ |
| 11035 |
const Percent = createLucideIcon("Percent", [ |
| 11036 |
["line", { x1: "19", x2: "5", y1: "5", y2: "19", key: "1x9vlm" }], |
| 11037 |
["circle", { cx: "6.5", cy: "6.5", r: "2.5", key: "4mh3h7" }], |
| 11038 |
["circle", { cx: "17.5", cy: "17.5", r: "2.5", key: "1mdrzq" }] |
| 11039 |
]); |
| 11040 |
/** |
| 11041 |
* @license lucide-react v0.294.0 - ISC |
| 11042 |
* |
| 11043 |
* This source code is licensed under the ISC license. |
| 11044 |
* See the LICENSE file in the root directory of this source tree. |
| 11045 |
*/ |
| 11046 |
const Phone = createLucideIcon("Phone", [ |
| 11047 |
[ |
| 11048 |
"path", |
| 11049 |
{ |
| 11050 |
d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z", |
| 11051 |
key: "foiqr5" |
| 11052 |
} |
| 11053 |
] |
| 11054 |
]); |
| 11055 |
/** |
| 11056 |
* @license lucide-react v0.294.0 - ISC |
| 11057 |
* |
| 11058 |
* This source code is licensed under the ISC license. |
| 11059 |
* See the LICENSE file in the root directory of this source tree. |
| 11060 |
*/ |
| 11061 |
const Plane = createLucideIcon("Plane", [ |
| 11062 |
[ |
| 11063 |
"path", |
| 11064 |
{ |
| 11065 |
d: "M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z", |
| 11066 |
key: "1v9wt8" |
| 11067 |
} |
| 11068 |
] |
| 11069 |
]); |
| 11070 |
/** |
| 11071 |
* @license lucide-react v0.294.0 - ISC |
| 11072 |
* |
| 11073 |
* This source code is licensed under the ISC license. |
| 11074 |
* See the LICENSE file in the root directory of this source tree. |
| 11075 |
*/ |
| 11076 |
const Play = createLucideIcon("Play", [ |
| 11077 |
["polygon", { points: "5 3 19 12 5 21 5 3", key: "191637" }] |
| 11078 |
]); |
| 11079 |
/** |
| 11080 |
* @license lucide-react v0.294.0 - ISC |
| 11081 |
* |
| 11082 |
* This source code is licensed under the ISC license. |
| 11083 |
* See the LICENSE file in the root directory of this source tree. |
| 11084 |
*/ |
| 11085 |
const Plug = createLucideIcon("Plug", [ |
| 11086 |
["path", { d: "M12 22v-5", key: "1ega77" }], |
| 11087 |
["path", { d: "M9 8V2", key: "14iosj" }], |
| 11088 |
["path", { d: "M15 8V2", key: "18g5xt" }], |
| 11089 |
["path", { d: "M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z", key: "osxo6l" }] |
| 11090 |
]); |
| 11091 |
/** |
| 11092 |
* @license lucide-react v0.294.0 - ISC |
| 11093 |
* |
| 11094 |
* This source code is licensed under the ISC license. |
| 11095 |
* See the LICENSE file in the root directory of this source tree. |
| 11096 |
*/ |
| 11097 |
const Plus = createLucideIcon("Plus", [ |
| 11098 |
["path", { d: "M5 12h14", key: "1ays0h" }], |
| 11099 |
["path", { d: "M12 5v14", key: "s699le" }] |
| 11100 |
]); |
| 11101 |
/** |
| 11102 |
* @license lucide-react v0.294.0 - ISC |
| 11103 |
* |
| 11104 |
* This source code is licensed under the ISC license. |
| 11105 |
* See the LICENSE file in the root directory of this source tree. |
| 11106 |
*/ |
| 11107 |
const PowerOff = createLucideIcon("PowerOff", [ |
| 11108 |
["path", { d: "M18.36 6.64A9 9 0 0 1 20.77 15", key: "dxknvb" }], |
| 11109 |
["path", { d: "M6.16 6.16a9 9 0 1 0 12.68 12.68", key: "1x7qb5" }], |
| 11110 |
["path", { d: "M12 2v4", key: "3427ic" }], |
| 11111 |
["path", { d: "m2 2 20 20", key: "1ooewy" }] |
| 11112 |
]); |
| 11113 |
/** |
| 11114 |
* @license lucide-react v0.294.0 - ISC |
| 11115 |
* |
| 11116 |
* This source code is licensed under the ISC license. |
| 11117 |
* See the LICENSE file in the root directory of this source tree. |
| 11118 |
*/ |
| 11119 |
const Power = createLucideIcon("Power", [ |
| 11120 |
["path", { d: "M12 2v10", key: "mnfbl" }], |
| 11121 |
["path", { d: "M18.4 6.6a9 9 0 1 1-12.77.04", key: "obofu9" }] |
| 11122 |
]); |
| 11123 |
/** |
| 11124 |
* @license lucide-react v0.294.0 - ISC |
| 11125 |
* |
| 11126 |
* This source code is licensed under the ISC license. |
| 11127 |
* See the LICENSE file in the root directory of this source tree. |
| 11128 |
*/ |
| 11129 |
const Puzzle = createLucideIcon("Puzzle", [ |
| 11130 |
[ |
| 11131 |
"path", |
| 11132 |
{ |
| 11133 |
d: "M19.439 7.85c-.049.322.059.648.289.878l1.568 1.568c.47.47.706 1.087.706 1.704s-.235 1.233-.706 1.704l-1.611 1.611a.98.98 0 0 1-.837.276c-.47-.07-.802-.48-.968-.925a2.501 2.501 0 1 0-3.214 3.214c.446.166.855.497.925.968a.979.979 0 0 1-.276.837l-1.61 1.61a2.404 2.404 0 0 1-1.705.707 2.402 2.402 0 0 1-1.704-.706l-1.568-1.568a1.026 1.026 0 0 0-.877-.29c-.493.074-.84.504-1.02.968a2.5 2.5 0 1 1-3.237-3.237c.464-.18.894-.527.967-1.02a1.026 1.026 0 0 0-.289-.877l-1.568-1.568A2.402 2.402 0 0 1 1.998 12c0-.617.236-1.234.706-1.704L4.23 8.77c.24-.24.581-.353.917-.303.515.077.877.528 1.073 1.01a2.5 2.5 0 1 0 3.259-3.259c-.482-.196-.933-.558-1.01-1.073-.05-.336.062-.676.303-.917l1.525-1.525A2.402 2.402 0 0 1 12 1.998c.617 0 1.234.236 1.704.706l1.568 1.568c.23.23.556.338.877.29.493-.074.84-.504 1.02-.968a2.5 2.5 0 1 1 3.237 3.237c-.464.18-.894.527-.967 1.02Z", |
| 11134 |
key: "i0oyt7" |
| 11135 |
} |
| 11136 |
] |
| 11137 |
]); |
| 11138 |
/** |
| 11139 |
* @license lucide-react v0.294.0 - ISC |
| 11140 |
* |
| 11141 |
* This source code is licensed under the ISC license. |
| 11142 |
* See the LICENSE file in the root directory of this source tree. |
| 11143 |
*/ |
| 11144 |
const Receipt = createLucideIcon("Receipt", [ |
| 11145 |
[ |
| 11146 |
"path", |
| 11147 |
{ |
| 11148 |
d: "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1-2-1Z", |
| 11149 |
key: "wqdwcb" |
| 11150 |
} |
| 11151 |
], |
| 11152 |
["path", { d: "M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8", key: "1h4pet" }], |
| 11153 |
["path", { d: "M12 17V7", key: "pyj7ub" }] |
| 11154 |
]); |
| 11155 |
/** |
| 11156 |
* @license lucide-react v0.294.0 - ISC |
| 11157 |
* |
| 11158 |
* This source code is licensed under the ISC license. |
| 11159 |
* See the LICENSE file in the root directory of this source tree. |
| 11160 |
*/ |
| 11161 |
const RefreshCw = createLucideIcon("RefreshCw", [ |
| 11162 |
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }], |
| 11163 |
["path", { d: "M21 3v5h-5", key: "1q7to0" }], |
| 11164 |
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }], |
| 11165 |
["path", { d: "M8 16H3v5", key: "1cv678" }] |
| 11166 |
]); |
| 11167 |
/** |
| 11168 |
* @license lucide-react v0.294.0 - ISC |
| 11169 |
* |
| 11170 |
* This source code is licensed under the ISC license. |
| 11171 |
* See the LICENSE file in the root directory of this source tree. |
| 11172 |
*/ |
| 11173 |
const Replace = createLucideIcon("Replace", [ |
| 11174 |
["path", { d: "M14 4c0-1.1.9-2 2-2", key: "1mvvbw" }], |
| 11175 |
["path", { d: "M20 2c1.1 0 2 .9 2 2", key: "1mj6oe" }], |
| 11176 |
["path", { d: "M22 8c0 1.1-.9 2-2 2", key: "v1wql3" }], |
| 11177 |
["path", { d: "M16 10c-1.1 0-2-.9-2-2", key: "821ux0" }], |
| 11178 |
["path", { d: "m3 7 3 3 3-3", key: "x25e72" }], |
| 11179 |
["path", { d: "M6 10V5c0-1.7 1.3-3 3-3h1", key: "13af7h" }], |
| 11180 |
["rect", { width: "8", height: "8", x: "2", y: "14", rx: "2", key: "17ihk4" }] |
| 11181 |
]); |
| 11182 |
/** |
| 11183 |
* @license lucide-react v0.294.0 - ISC |
| 11184 |
* |
| 11185 |
* This source code is licensed under the ISC license. |
| 11186 |
* See the LICENSE file in the root directory of this source tree. |
| 11187 |
*/ |
| 11188 |
const RotateCcw = createLucideIcon("RotateCcw", [ |
| 11189 |
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }], |
| 11190 |
["path", { d: "M3 3v5h5", key: "1xhq8a" }] |
| 11191 |
]); |
| 11192 |
/** |
| 11193 |
* @license lucide-react v0.294.0 - ISC |
| 11194 |
* |
| 11195 |
* This source code is licensed under the ISC license. |
| 11196 |
* See the LICENSE file in the root directory of this source tree. |
| 11197 |
*/ |
| 11198 |
const Route = createLucideIcon("Route", [ |
| 11199 |
["circle", { cx: "6", cy: "19", r: "3", key: "1kj8tv" }], |
| 11200 |
["path", { d: "M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15", key: "1d8sl" }], |
| 11201 |
["circle", { cx: "18", cy: "5", r: "3", key: "gq8acd" }] |
| 11202 |
]); |
| 11203 |
/** |
| 11204 |
* @license lucide-react v0.294.0 - ISC |
| 11205 |
* |
| 11206 |
* This source code is licensed under the ISC license. |
| 11207 |
* See the LICENSE file in the root directory of this source tree. |
| 11208 |
*/ |
| 11209 |
const Save = createLucideIcon("Save", [ |
| 11210 |
["path", { d: "M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z", key: "1owoqh" }], |
| 11211 |
["polyline", { points: "17 21 17 13 7 13 7 21", key: "1md35c" }], |
| 11212 |
["polyline", { points: "7 3 7 8 15 8", key: "8nz8an" }] |
| 11213 |
]); |
| 11214 |
/** |
| 11215 |
* @license lucide-react v0.294.0 - ISC |
| 11216 |
* |
| 11217 |
* This source code is licensed under the ISC license. |
| 11218 |
* See the LICENSE file in the root directory of this source tree. |
| 11219 |
*/ |
| 11220 |
const Scissors = createLucideIcon("Scissors", [ |
| 11221 |
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }], |
| 11222 |
["path", { d: "M8.12 8.12 12 12", key: "1alkpv" }], |
| 11223 |
["path", { d: "M20 4 8.12 15.88", key: "xgtan2" }], |
| 11224 |
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }], |
| 11225 |
["path", { d: "M14.8 14.8 20 20", key: "ptml3r" }] |
| 11226 |
]); |
| 11227 |
/** |
| 11228 |
* @license lucide-react v0.294.0 - ISC |
| 11229 |
* |
| 11230 |
* This source code is licensed under the ISC license. |
| 11231 |
* See the LICENSE file in the root directory of this source tree. |
| 11232 |
*/ |
| 11233 |
const Search = createLucideIcon("Search", [ |
| 11234 |
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }], |
| 11235 |
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }] |
| 11236 |
]); |
| 11237 |
/** |
| 11238 |
* @license lucide-react v0.294.0 - ISC |
| 11239 |
* |
| 11240 |
* This source code is licensed under the ISC license. |
| 11241 |
* See the LICENSE file in the root directory of this source tree. |
| 11242 |
*/ |
| 11243 |
const Send = createLucideIcon("Send", [ |
| 11244 |
["path", { d: "m22 2-7 20-4-9-9-4Z", key: "1q3vgg" }], |
| 11245 |
["path", { d: "M22 2 11 13", key: "nzbqef" }] |
| 11246 |
]); |
| 11247 |
/** |
| 11248 |
* @license lucide-react v0.294.0 - ISC |
| 11249 |
* |
| 11250 |
* This source code is licensed under the ISC license. |
| 11251 |
* See the LICENSE file in the root directory of this source tree. |
| 11252 |
*/ |
| 11253 |
const Server = createLucideIcon("Server", [ |
| 11254 |
["rect", { width: "20", height: "8", x: "2", y: "2", rx: "2", ry: "2", key: "ngkwjq" }], |
| 11255 |
["rect", { width: "20", height: "8", x: "2", y: "14", rx: "2", ry: "2", key: "iecqi9" }], |
| 11256 |
["line", { x1: "6", x2: "6.01", y1: "6", y2: "6", key: "16zg32" }], |
| 11257 |
["line", { x1: "6", x2: "6.01", y1: "18", y2: "18", key: "nzw8ys" }] |
| 11258 |
]); |
| 11259 |
/** |
| 11260 |
* @license lucide-react v0.294.0 - ISC |
| 11261 |
* |
| 11262 |
* This source code is licensed under the ISC license. |
| 11263 |
* See the LICENSE file in the root directory of this source tree. |
| 11264 |
*/ |
| 11265 |
const Settings2 = createLucideIcon("Settings2", [ |
| 11266 |
["path", { d: "M20 7h-9", key: "3s1dr2" }], |
| 11267 |
["path", { d: "M14 17H5", key: "gfn3mx" }], |
| 11268 |
["circle", { cx: "17", cy: "17", r: "3", key: "18b49y" }], |
| 11269 |
["circle", { cx: "7", cy: "7", r: "3", key: "dfmy0x" }] |
| 11270 |
]); |
| 11271 |
/** |
| 11272 |
* @license lucide-react v0.294.0 - ISC |
| 11273 |
* |
| 11274 |
* This source code is licensed under the ISC license. |
| 11275 |
* See the LICENSE file in the root directory of this source tree. |
| 11276 |
*/ |
| 11277 |
const Settings = createLucideIcon("Settings", [ |
| 11278 |
[ |
| 11279 |
"path", |
| 11280 |
{ |
| 11281 |
d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z", |
| 11282 |
key: "1qme2f" |
| 11283 |
} |
| 11284 |
], |
| 11285 |
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }] |
| 11286 |
]); |
| 11287 |
/** |
| 11288 |
* @license lucide-react v0.294.0 - ISC |
| 11289 |
* |
| 11290 |
* This source code is licensed under the ISC license. |
| 11291 |
* See the LICENSE file in the root directory of this source tree. |
| 11292 |
*/ |
| 11293 |
const ShieldCheck = createLucideIcon("ShieldCheck", [ |
| 11294 |
["path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10", key: "1irkt0" }], |
| 11295 |
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }] |
| 11296 |
]); |
| 11297 |
/** |
| 11298 |
* @license lucide-react v0.294.0 - ISC |
| 11299 |
* |
| 11300 |
* This source code is licensed under the ISC license. |
| 11301 |
* See the LICENSE file in the root directory of this source tree. |
| 11302 |
*/ |
| 11303 |
const ShieldOff = createLucideIcon("ShieldOff", [ |
| 11304 |
["path", { d: "M19.7 14a6.9 6.9 0 0 0 .3-2V5l-8-3-3.2 1.2", key: "342pvf" }], |
| 11305 |
["path", { d: "m2 2 20 20", key: "1ooewy" }], |
| 11306 |
["path", { d: "M4.7 4.7 4 5v7c0 6 8 10 8 10a20.3 20.3 0 0 0 5.62-4.38", key: "p0ycf4" }] |
| 11307 |
]); |
| 11308 |
/** |
| 11309 |
* @license lucide-react v0.294.0 - ISC |
| 11310 |
* |
| 11311 |
* This source code is licensed under the ISC license. |
| 11312 |
* See the LICENSE file in the root directory of this source tree. |
| 11313 |
*/ |
| 11314 |
const ShieldX = createLucideIcon("ShieldX", [ |
| 11315 |
["path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10", key: "1irkt0" }], |
| 11316 |
["path", { d: "m14.5 9-5 5", key: "1m49dw" }], |
| 11317 |
["path", { d: "m9.5 9 5 5", key: "wyx7zg" }] |
| 11318 |
]); |
| 11319 |
/** |
| 11320 |
* @license lucide-react v0.294.0 - ISC |
| 11321 |
* |
| 11322 |
* This source code is licensed under the ISC license. |
| 11323 |
* See the LICENSE file in the root directory of this source tree. |
| 11324 |
*/ |
| 11325 |
const Shield = createLucideIcon("Shield", [ |
| 11326 |
["path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10", key: "1irkt0" }] |
| 11327 |
]); |
| 11328 |
/** |
| 11329 |
* @license lucide-react v0.294.0 - ISC |
| 11330 |
* |
| 11331 |
* This source code is licensed under the ISC license. |
| 11332 |
* See the LICENSE file in the root directory of this source tree. |
| 11333 |
*/ |
| 11334 |
const SlidersHorizontal = createLucideIcon("SlidersHorizontal", [ |
| 11335 |
["line", { x1: "21", x2: "14", y1: "4", y2: "4", key: "obuewd" }], |
| 11336 |
["line", { x1: "10", x2: "3", y1: "4", y2: "4", key: "1q6298" }], |
| 11337 |
["line", { x1: "21", x2: "12", y1: "12", y2: "12", key: "1iu8h1" }], |
| 11338 |
["line", { x1: "8", x2: "3", y1: "12", y2: "12", key: "ntss68" }], |
| 11339 |
["line", { x1: "21", x2: "16", y1: "20", y2: "20", key: "14d8ph" }], |
| 11340 |
["line", { x1: "12", x2: "3", y1: "20", y2: "20", key: "m0wm8r" }], |
| 11341 |
["line", { x1: "14", x2: "14", y1: "2", y2: "6", key: "14e1ph" }], |
| 11342 |
["line", { x1: "8", x2: "8", y1: "10", y2: "14", key: "1i6ji0" }], |
| 11343 |
["line", { x1: "16", x2: "16", y1: "18", y2: "22", key: "1lctlv" }] |
| 11344 |
]); |
| 11345 |
/** |
| 11346 |
* @license lucide-react v0.294.0 - ISC |
| 11347 |
* |
| 11348 |
* This source code is licensed under the ISC license. |
| 11349 |
* See the LICENSE file in the root directory of this source tree. |
| 11350 |
*/ |
| 11351 |
const Sparkles = createLucideIcon("Sparkles", [ |
| 11352 |
[ |
| 11353 |
"path", |
| 11354 |
{ |
| 11355 |
d: "m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z", |
| 11356 |
key: "17u4zn" |
| 11357 |
} |
| 11358 |
], |
| 11359 |
["path", { d: "M5 3v4", key: "bklmnn" }], |
| 11360 |
["path", { d: "M19 17v4", key: "iiml17" }], |
| 11361 |
["path", { d: "M3 5h4", key: "nem4j1" }], |
| 11362 |
["path", { d: "M17 19h4", key: "lbex7p" }] |
| 11363 |
]); |
| 11364 |
/** |
| 11365 |
* @license lucide-react v0.294.0 - ISC |
| 11366 |
* |
| 11367 |
* This source code is licensed under the ISC license. |
| 11368 |
* See the LICENSE file in the root directory of this source tree. |
| 11369 |
*/ |
| 11370 |
const Star = createLucideIcon("Star", [ |
| 11371 |
[ |
| 11372 |
"polygon", |
| 11373 |
{ |
| 11374 |
points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2", |
| 11375 |
key: "8f66p6" |
| 11376 |
} |
| 11377 |
] |
| 11378 |
]); |
| 11379 |
/** |
| 11380 |
* @license lucide-react v0.294.0 - ISC |
| 11381 |
* |
| 11382 |
* This source code is licensed under the ISC license. |
| 11383 |
* See the LICENSE file in the root directory of this source tree. |
| 11384 |
*/ |
| 11385 |
const Sun = createLucideIcon("Sun", [ |
| 11386 |
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }], |
| 11387 |
["path", { d: "M12 2v2", key: "tus03m" }], |
| 11388 |
["path", { d: "M12 20v2", key: "1lh1kg" }], |
| 11389 |
["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }], |
| 11390 |
["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }], |
| 11391 |
["path", { d: "M2 12h2", key: "1t8f8n" }], |
| 11392 |
["path", { d: "M20 12h2", key: "1q8mjw" }], |
| 11393 |
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }], |
| 11394 |
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }] |
| 11395 |
]); |
| 11396 |
/** |
| 11397 |
* @license lucide-react v0.294.0 - ISC |
| 11398 |
* |
| 11399 |
* This source code is licensed under the ISC license. |
| 11400 |
* See the LICENSE file in the root directory of this source tree. |
| 11401 |
*/ |
| 11402 |
const Tag = createLucideIcon("Tag", [ |
| 11403 |
[ |
| 11404 |
"path", |
| 11405 |
{ |
| 11406 |
d: "M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2Z", |
| 11407 |
key: "14b2ls" |
| 11408 |
} |
| 11409 |
], |
| 11410 |
["path", { d: "M7 7h.01", key: "7u93v4" }] |
| 11411 |
]); |
| 11412 |
/** |
| 11413 |
* @license lucide-react v0.294.0 - ISC |
| 11414 |
* |
| 11415 |
* This source code is licensed under the ISC license. |
| 11416 |
* See the LICENSE file in the root directory of this source tree. |
| 11417 |
*/ |
| 11418 |
const Target = createLucideIcon("Target", [ |
| 11419 |
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], |
| 11420 |
["circle", { cx: "12", cy: "12", r: "6", key: "1vlfrh" }], |
| 11421 |
["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }] |
| 11422 |
]); |
| 11423 |
/** |
| 11424 |
* @license lucide-react v0.294.0 - ISC |
| 11425 |
* |
| 11426 |
* This source code is licensed under the ISC license. |
| 11427 |
* See the LICENSE file in the root directory of this source tree. |
| 11428 |
*/ |
| 11429 |
const Trash2 = createLucideIcon("Trash2", [ |
| 11430 |
["path", { d: "M3 6h18", key: "d0wm0j" }], |
| 11431 |
["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }], |
| 11432 |
["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }], |
| 11433 |
["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }], |
| 11434 |
["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }] |
| 11435 |
]); |
| 11436 |
/** |
| 11437 |
* @license lucide-react v0.294.0 - ISC |
| 11438 |
* |
| 11439 |
* This source code is licensed under the ISC license. |
| 11440 |
* See the LICENSE file in the root directory of this source tree. |
| 11441 |
*/ |
| 11442 |
const TrendingUp = createLucideIcon("TrendingUp", [ |
| 11443 |
["polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17", key: "126l90" }], |
| 11444 |
["polyline", { points: "16 7 22 7 22 13", key: "kwv8wd" }] |
| 11445 |
]); |
| 11446 |
/** |
| 11447 |
* @license lucide-react v0.294.0 - ISC |
| 11448 |
* |
| 11449 |
* This source code is licensed under the ISC license. |
| 11450 |
* See the LICENSE file in the root directory of this source tree. |
| 11451 |
*/ |
| 11452 |
const Type = createLucideIcon("Type", [ |
| 11453 |
["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }], |
| 11454 |
["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }], |
| 11455 |
["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }] |
| 11456 |
]); |
| 11457 |
/** |
| 11458 |
* @license lucide-react v0.294.0 - ISC |
| 11459 |
* |
| 11460 |
* This source code is licensed under the ISC license. |
| 11461 |
* See the LICENSE file in the root directory of this source tree. |
| 11462 |
*/ |
| 11463 |
const Undo2 = createLucideIcon("Undo2", [ |
| 11464 |
["path", { d: "M9 14 4 9l5-5", key: "102s5s" }], |
| 11465 |
["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5v0a5.5 5.5 0 0 1-5.5 5.5H11", key: "llx8ln" }] |
| 11466 |
]); |
| 11467 |
/** |
| 11468 |
* @license lucide-react v0.294.0 - ISC |
| 11469 |
* |
| 11470 |
* This source code is licensed under the ISC license. |
| 11471 |
* See the LICENSE file in the root directory of this source tree. |
| 11472 |
*/ |
| 11473 |
const Unlock = createLucideIcon("Unlock", [ |
| 11474 |
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }], |
| 11475 |
["path", { d: "M7 11V7a5 5 0 0 1 9.9-1", key: "1mm8w8" }] |
| 11476 |
]); |
| 11477 |
/** |
| 11478 |
* @license lucide-react v0.294.0 - ISC |
| 11479 |
* |
| 11480 |
* This source code is licensed under the ISC license. |
| 11481 |
* See the LICENSE file in the root directory of this source tree. |
| 11482 |
*/ |
| 11483 |
const Upload = createLucideIcon("Upload", [ |
| 11484 |
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }], |
| 11485 |
["polyline", { points: "17 8 12 3 7 8", key: "t8dd8p" }], |
| 11486 |
["line", { x1: "12", x2: "12", y1: "3", y2: "15", key: "widbto" }] |
| 11487 |
]); |
| 11488 |
/** |
| 11489 |
* @license lucide-react v0.294.0 - ISC |
| 11490 |
* |
| 11491 |
* This source code is licensed under the ISC license. |
| 11492 |
* See the LICENSE file in the root directory of this source tree. |
| 11493 |
*/ |
| 11494 |
const UserCheck = createLucideIcon("UserCheck", [ |
| 11495 |
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }], |
| 11496 |
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }], |
| 11497 |
["polyline", { points: "16 11 18 13 22 9", key: "1pwet4" }] |
| 11498 |
]); |
| 11499 |
/** |
| 11500 |
* @license lucide-react v0.294.0 - ISC |
| 11501 |
* |
| 11502 |
* This source code is licensed under the ISC license. |
| 11503 |
* See the LICENSE file in the root directory of this source tree. |
| 11504 |
*/ |
| 11505 |
const UserPlus = createLucideIcon("UserPlus", [ |
| 11506 |
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }], |
| 11507 |
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }], |
| 11508 |
["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }], |
| 11509 |
["line", { x1: "22", x2: "16", y1: "11", y2: "11", key: "1shjgl" }] |
| 11510 |
]); |
| 11511 |
/** |
| 11512 |
* @license lucide-react v0.294.0 - ISC |
| 11513 |
* |
| 11514 |
* This source code is licensed under the ISC license. |
| 11515 |
* See the LICENSE file in the root directory of this source tree. |
| 11516 |
*/ |
| 11517 |
const User = createLucideIcon("User", [ |
| 11518 |
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }], |
| 11519 |
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }] |
| 11520 |
]); |
| 11521 |
/** |
| 11522 |
* @license lucide-react v0.294.0 - ISC |
| 11523 |
* |
| 11524 |
* This source code is licensed under the ISC license. |
| 11525 |
* See the LICENSE file in the root directory of this source tree. |
| 11526 |
*/ |
| 11527 |
const Users = createLucideIcon("Users", [ |
| 11528 |
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }], |
| 11529 |
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }], |
| 11530 |
["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }], |
| 11531 |
["path", { d: "M16 3.13a4 4 0 0 1 0 7.75", key: "1da9ce" }] |
| 11532 |
]); |
| 11533 |
/** |
| 11534 |
* @license lucide-react v0.294.0 - ISC |
| 11535 |
* |
| 11536 |
* This source code is licensed under the ISC license. |
| 11537 |
* See the LICENSE file in the root directory of this source tree. |
| 11538 |
*/ |
| 11539 |
const UtensilsCrossed = createLucideIcon("UtensilsCrossed", [ |
| 11540 |
["path", { d: "m16 2-2.3 2.3a3 3 0 0 0 0 4.2l1.8 1.8a3 3 0 0 0 4.2 0L22 8", key: "n7qcjb" }], |
| 11541 |
[ |
| 11542 |
"path", |
| 11543 |
{ d: "M15 15 3.3 3.3a4.2 4.2 0 0 0 0 6l7.3 7.3c.7.7 2 .7 2.8 0L15 15Zm0 0 7 7", key: "d0u48b" } |
| 11544 |
], |
| 11545 |
["path", { d: "m2.1 21.8 6.4-6.3", key: "yn04lh" }], |
| 11546 |
["path", { d: "m19 5-7 7", key: "194lzd" }] |
| 11547 |
]); |
| 11548 |
/** |
| 11549 |
* @license lucide-react v0.294.0 - ISC |
| 11550 |
* |
| 11551 |
* This source code is licensed under the ISC license. |
| 11552 |
* See the LICENSE file in the root directory of this source tree. |
| 11553 |
*/ |
| 11554 |
const Video = createLucideIcon("Video", [ |
| 11555 |
["path", { d: "m22 8-6 4 6 4V8Z", key: "50v9me" }], |
| 11556 |
["rect", { width: "14", height: "12", x: "2", y: "6", rx: "2", ry: "2", key: "1rqjg6" }] |
| 11557 |
]); |
| 11558 |
/** |
| 11559 |
* @license lucide-react v0.294.0 - ISC |
| 11560 |
* |
| 11561 |
* This source code is licensed under the ISC license. |
| 11562 |
* See the LICENSE file in the root directory of this source tree. |
| 11563 |
*/ |
| 11564 |
const Wand2 = createLucideIcon("Wand2", [ |
| 11565 |
[ |
| 11566 |
"path", |
| 11567 |
{ |
| 11568 |
d: "m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72Z", |
| 11569 |
key: "1bcowg" |
| 11570 |
} |
| 11571 |
], |
| 11572 |
["path", { d: "m14 7 3 3", key: "1r5n42" }], |
| 11573 |
["path", { d: "M5 6v4", key: "ilb8ba" }], |
| 11574 |
["path", { d: "M19 14v4", key: "blhpug" }], |
| 11575 |
["path", { d: "M10 2v2", key: "7u0qdc" }], |
| 11576 |
["path", { d: "M7 8H3", key: "zfb6yr" }], |
| 11577 |
["path", { d: "M21 16h-4", key: "1cnmox" }], |
| 11578 |
["path", { d: "M11 3H9", key: "1obp7u" }] |
| 11579 |
]); |
| 11580 |
/** |
| 11581 |
* @license lucide-react v0.294.0 - ISC |
| 11582 |
* |
| 11583 |
* This source code is licensed under the ISC license. |
| 11584 |
* See the LICENSE file in the root directory of this source tree. |
| 11585 |
*/ |
| 11586 |
const Webhook = createLucideIcon("Webhook", [ |
| 11587 |
[ |
| 11588 |
"path", |
| 11589 |
{ |
| 11590 |
d: "M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2", |
| 11591 |
key: "q3hayz" |
| 11592 |
} |
| 11593 |
], |
| 11594 |
["path", { d: "m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06", key: "1go1hn" }], |
| 11595 |
["path", { d: "m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8", key: "qlwsc0" }] |
| 11596 |
]); |
| 11597 |
/** |
| 11598 |
* @license lucide-react v0.294.0 - ISC |
| 11599 |
* |
| 11600 |
* This source code is licensed under the ISC license. |
| 11601 |
* See the LICENSE file in the root directory of this source tree. |
| 11602 |
*/ |
| 11603 |
const Wrench = createLucideIcon("Wrench", [ |
| 11604 |
[ |
| 11605 |
"path", |
| 11606 |
{ |
| 11607 |
d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z", |
| 11608 |
key: "cbrjhi" |
| 11609 |
} |
| 11610 |
] |
| 11611 |
]); |
| 11612 |
/** |
| 11613 |
* @license lucide-react v0.294.0 - ISC |
| 11614 |
* |
| 11615 |
* This source code is licensed under the ISC license. |
| 11616 |
* See the LICENSE file in the root directory of this source tree. |
| 11617 |
*/ |
| 11618 |
const XCircle = createLucideIcon("XCircle", [ |
| 11619 |
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], |
| 11620 |
["path", { d: "m15 9-6 6", key: "1uzhvr" }], |
| 11621 |
["path", { d: "m9 9 6 6", key: "z0biqf" }] |
| 11622 |
]); |
| 11623 |
/** |
| 11624 |
* @license lucide-react v0.294.0 - ISC |
| 11625 |
* |
| 11626 |
* This source code is licensed under the ISC license. |
| 11627 |
* See the LICENSE file in the root directory of this source tree. |
| 11628 |
*/ |
| 11629 |
const X = createLucideIcon("X", [ |
| 11630 |
["path", { d: "M18 6 6 18", key: "1bl5f8" }], |
| 11631 |
["path", { d: "m6 6 12 12", key: "d8bk6v" }] |
| 11632 |
]); |
| 11633 |
/** |
| 11634 |
* @license lucide-react v0.294.0 - ISC |
| 11635 |
* |
| 11636 |
* This source code is licensed under the ISC license. |
| 11637 |
* See the LICENSE file in the root directory of this source tree. |
| 11638 |
*/ |
| 11639 |
const Zap = createLucideIcon("Zap", [ |
| 11640 |
["polygon", { points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2", key: "45s27k" }] |
| 11641 |
]); |
| 11642 |
var isArray$3 = Array.isArray; |
| 11643 |
var isArray_1 = isArray$3; |
| 11644 |
var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; |
| 11645 |
var _freeGlobal = freeGlobal$1; |
| 11646 |
var freeGlobal = _freeGlobal; |
| 11647 |
var freeSelf = typeof self == "object" && self && self.Object === Object && self; |
| 11648 |
var root$8 = freeGlobal || freeSelf || Function("return this")(); |
| 11649 |
var _root = root$8; |
| 11650 |
var root$7 = _root; |
| 11651 |
var Symbol$4 = root$7.Symbol; |
| 11652 |
var _Symbol = Symbol$4; |
| 11653 |
var Symbol$3 = _Symbol; |
| 11654 |
var objectProto$b = Object.prototype; |
| 11655 |
var hasOwnProperty$9 = objectProto$b.hasOwnProperty; |
| 11656 |
var nativeObjectToString$1 = objectProto$b.toString; |
| 11657 |
var symToStringTag$1 = Symbol$3 ? Symbol$3.toStringTag : void 0; |
| 11658 |
function getRawTag$1(value) { |
| 11659 |
var isOwn = hasOwnProperty$9.call(value, symToStringTag$1), tag = value[symToStringTag$1]; |
| 11660 |
try { |
| 11661 |
value[symToStringTag$1] = void 0; |
| 11662 |
var unmasked = true; |
| 11663 |
} catch (e2) { |
| 11664 |
} |
| 11665 |
var result = nativeObjectToString$1.call(value); |
| 11666 |
if (unmasked) { |
| 11667 |
if (isOwn) { |
| 11668 |
value[symToStringTag$1] = tag; |
| 11669 |
} else { |
| 11670 |
delete value[symToStringTag$1]; |
| 11671 |
} |
| 11672 |
} |
| 11673 |
return result; |
| 11674 |
} |
| 11675 |
var _getRawTag = getRawTag$1; |
| 11676 |
var objectProto$a = Object.prototype; |
| 11677 |
var nativeObjectToString = objectProto$a.toString; |
| 11678 |
function objectToString$1(value) { |
| 11679 |
return nativeObjectToString.call(value); |
| 11680 |
} |
| 11681 |
var _objectToString = objectToString$1; |
| 11682 |
var Symbol$2 = _Symbol, getRawTag = _getRawTag, objectToString = _objectToString; |
| 11683 |
var nullTag = "[object Null]", undefinedTag = "[object Undefined]"; |
| 11684 |
var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0; |
| 11685 |
function baseGetTag$4(value) { |
| 11686 |
if (value == null) { |
| 11687 |
return value === void 0 ? undefinedTag : nullTag; |
| 11688 |
} |
| 11689 |
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); |
| 11690 |
} |
| 11691 |
var _baseGetTag = baseGetTag$4; |
| 11692 |
function isObjectLike$4(value) { |
| 11693 |
return value != null && typeof value == "object"; |
| 11694 |
} |
| 11695 |
var isObjectLike_1 = isObjectLike$4; |
| 11696 |
function isObject$2(value) { |
| 11697 |
var type = typeof value; |
| 11698 |
return value != null && (type == "object" || type == "function"); |
| 11699 |
} |
| 11700 |
var isObject_1 = isObject$2; |
| 11701 |
const isObject$3 = /* @__PURE__ */ getDefaultExportFromCjs(isObject_1); |
| 11702 |
var baseGetTag$3 = _baseGetTag, isObject$1 = isObject_1; |
| 11703 |
var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]"; |
| 11704 |
function isFunction$2(value) { |
| 11705 |
if (!isObject$1(value)) { |
| 11706 |
return false; |
| 11707 |
} |
| 11708 |
var tag = baseGetTag$3(value); |
| 11709 |
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag; |
| 11710 |
} |
| 11711 |
var isFunction_1 = isFunction$2; |
| 11712 |
const isFunction$3 = /* @__PURE__ */ getDefaultExportFromCjs(isFunction_1); |
| 11713 |
var root$6 = _root; |
| 11714 |
var coreJsData$1 = root$6["__core-js_shared__"]; |
| 11715 |
var _coreJsData = coreJsData$1; |
| 11716 |
var coreJsData = _coreJsData; |
| 11717 |
var maskSrcKey = function() { |
| 11718 |
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); |
| 11719 |
return uid ? "Symbol(src)_1." + uid : ""; |
| 11720 |
}(); |
| 11721 |
function isMasked$1(func) { |
| 11722 |
return !!maskSrcKey && maskSrcKey in func; |
| 11723 |
} |
| 11724 |
var _isMasked = isMasked$1; |
| 11725 |
var funcProto$1 = Function.prototype; |
| 11726 |
var funcToString$1 = funcProto$1.toString; |
| 11727 |
function toSource$2(func) { |
| 11728 |
if (func != null) { |
| 11729 |
try { |
| 11730 |
return funcToString$1.call(func); |
| 11731 |
} catch (e2) { |
| 11732 |
} |
| 11733 |
try { |
| 11734 |
return func + ""; |
| 11735 |
} catch (e2) { |
| 11736 |
} |
| 11737 |
} |
| 11738 |
return ""; |
| 11739 |
} |
| 11740 |
var _toSource = toSource$2; |
| 11741 |
var isFunction$1 = isFunction_1, isMasked = _isMasked, isObject = isObject_1, toSource$1 = _toSource; |
| 11742 |
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; |
| 11743 |
var reIsHostCtor = /^\[object .+?Constructor\]$/; |
| 11744 |
var funcProto = Function.prototype, objectProto$9 = Object.prototype; |
| 11745 |
var funcToString = funcProto.toString; |
| 11746 |
var hasOwnProperty$8 = objectProto$9.hasOwnProperty; |
| 11747 |
var reIsNative = RegExp( |
| 11748 |
"^" + funcToString.call(hasOwnProperty$8).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" |
| 11749 |
); |
| 11750 |
function baseIsNative$1(value) { |
| 11751 |
if (!isObject(value) || isMasked(value)) { |
| 11752 |
return false; |
| 11753 |
} |
| 11754 |
var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor; |
| 11755 |
return pattern.test(toSource$1(value)); |
| 11756 |
} |
| 11757 |
var _baseIsNative = baseIsNative$1; |
| 11758 |
function getValue$1(object, key) { |
| 11759 |
return object == null ? void 0 : object[key]; |
| 11760 |
} |
| 11761 |
var _getValue = getValue$1; |
| 11762 |
var baseIsNative = _baseIsNative, getValue = _getValue; |
| 11763 |
function getNative$6(object, key) { |
| 11764 |
var value = getValue(object, key); |
| 11765 |
return baseIsNative(value) ? value : void 0; |
| 11766 |
} |
| 11767 |
var _getNative = getNative$6; |
| 11768 |
var getNative$5 = _getNative; |
| 11769 |
var nativeCreate$4 = getNative$5(Object, "create"); |
| 11770 |
var _nativeCreate = nativeCreate$4; |
| 11771 |
var nativeCreate$3 = _nativeCreate; |
| 11772 |
function hashClear$1() { |
| 11773 |
this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {}; |
| 11774 |
this.size = 0; |
| 11775 |
} |
| 11776 |
var _hashClear = hashClear$1; |
| 11777 |
function hashDelete$1(key) { |
| 11778 |
var result = this.has(key) && delete this.__data__[key]; |
| 11779 |
this.size -= result ? 1 : 0; |
| 11780 |
return result; |
| 11781 |
} |
| 11782 |
var _hashDelete = hashDelete$1; |
| 11783 |
var nativeCreate$2 = _nativeCreate; |
| 11784 |
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__"; |
| 11785 |
var objectProto$8 = Object.prototype; |
| 11786 |
var hasOwnProperty$7 = objectProto$8.hasOwnProperty; |
| 11787 |
function hashGet$1(key) { |
| 11788 |
var data = this.__data__; |
| 11789 |
if (nativeCreate$2) { |
| 11790 |
var result = data[key]; |
| 11791 |
return result === HASH_UNDEFINED$2 ? void 0 : result; |
| 11792 |
} |
| 11793 |
return hasOwnProperty$7.call(data, key) ? data[key] : void 0; |
| 11794 |
} |
| 11795 |
var _hashGet = hashGet$1; |
| 11796 |
var nativeCreate$1 = _nativeCreate; |
| 11797 |
var objectProto$7 = Object.prototype; |
| 11798 |
var hasOwnProperty$6 = objectProto$7.hasOwnProperty; |
| 11799 |
function hashHas$1(key) { |
| 11800 |
var data = this.__data__; |
| 11801 |
return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$6.call(data, key); |
| 11802 |
} |
| 11803 |
var _hashHas = hashHas$1; |
| 11804 |
var nativeCreate = _nativeCreate; |
| 11805 |
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__"; |
| 11806 |
function hashSet$1(key, value) { |
| 11807 |
var data = this.__data__; |
| 11808 |
this.size += this.has(key) ? 0 : 1; |
| 11809 |
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value; |
| 11810 |
return this; |
| 11811 |
} |
| 11812 |
var _hashSet = hashSet$1; |
| 11813 |
var hashClear = _hashClear, hashDelete = _hashDelete, hashGet = _hashGet, hashHas = _hashHas, hashSet = _hashSet; |
| 11814 |
function Hash$1(entries) { |
| 11815 |
var index = -1, length = entries == null ? 0 : entries.length; |
| 11816 |
this.clear(); |
| 11817 |
while (++index < length) { |
| 11818 |
var entry = entries[index]; |
| 11819 |
this.set(entry[0], entry[1]); |
| 11820 |
} |
| 11821 |
} |
| 11822 |
Hash$1.prototype.clear = hashClear; |
| 11823 |
Hash$1.prototype["delete"] = hashDelete; |
| 11824 |
Hash$1.prototype.get = hashGet; |
| 11825 |
Hash$1.prototype.has = hashHas; |
| 11826 |
Hash$1.prototype.set = hashSet; |
| 11827 |
var _Hash = Hash$1; |
| 11828 |
function listCacheClear$1() { |
| 11829 |
this.__data__ = []; |
| 11830 |
this.size = 0; |
| 11831 |
} |
| 11832 |
var _listCacheClear = listCacheClear$1; |
| 11833 |
function eq$2(value, other) { |
| 11834 |
return value === other || value !== value && other !== other; |
| 11835 |
} |
| 11836 |
var eq_1 = eq$2; |
| 11837 |
var eq$1 = eq_1; |
| 11838 |
function assocIndexOf$4(array, key) { |
| 11839 |
var length = array.length; |
| 11840 |
while (length--) { |
| 11841 |
if (eq$1(array[length][0], key)) { |
| 11842 |
return length; |
| 11843 |
} |
| 11844 |
} |
| 11845 |
return -1; |
| 11846 |
} |
| 11847 |
var _assocIndexOf = assocIndexOf$4; |
| 11848 |
var assocIndexOf$3 = _assocIndexOf; |
| 11849 |
var arrayProto = Array.prototype; |
| 11850 |
var splice = arrayProto.splice; |
| 11851 |
function listCacheDelete$1(key) { |
| 11852 |
var data = this.__data__, index = assocIndexOf$3(data, key); |
| 11853 |
if (index < 0) { |
| 11854 |
return false; |
| 11855 |
} |
| 11856 |
var lastIndex = data.length - 1; |
| 11857 |
if (index == lastIndex) { |
| 11858 |
data.pop(); |
| 11859 |
} else { |
| 11860 |
splice.call(data, index, 1); |
| 11861 |
} |
| 11862 |
--this.size; |
| 11863 |
return true; |
| 11864 |
} |
| 11865 |
var _listCacheDelete = listCacheDelete$1; |
| 11866 |
var assocIndexOf$2 = _assocIndexOf; |
| 11867 |
function listCacheGet$1(key) { |
| 11868 |
var data = this.__data__, index = assocIndexOf$2(data, key); |
| 11869 |
return index < 0 ? void 0 : data[index][1]; |
| 11870 |
} |
| 11871 |
var _listCacheGet = listCacheGet$1; |
| 11872 |
var assocIndexOf$1 = _assocIndexOf; |
| 11873 |
function listCacheHas$1(key) { |
| 11874 |
return assocIndexOf$1(this.__data__, key) > -1; |
| 11875 |
} |
| 11876 |
var _listCacheHas = listCacheHas$1; |
| 11877 |
var assocIndexOf = _assocIndexOf; |
| 11878 |
function listCacheSet$1(key, value) { |
| 11879 |
var data = this.__data__, index = assocIndexOf(data, key); |
| 11880 |
if (index < 0) { |
| 11881 |
++this.size; |
| 11882 |
data.push([key, value]); |
| 11883 |
} else { |
| 11884 |
data[index][1] = value; |
| 11885 |
} |
| 11886 |
return this; |
| 11887 |
} |
| 11888 |
var _listCacheSet = listCacheSet$1; |
| 11889 |
var listCacheClear = _listCacheClear, listCacheDelete = _listCacheDelete, listCacheGet = _listCacheGet, listCacheHas = _listCacheHas, listCacheSet = _listCacheSet; |
| 11890 |
function ListCache$4(entries) { |
| 11891 |
var index = -1, length = entries == null ? 0 : entries.length; |
| 11892 |
this.clear(); |
| 11893 |
while (++index < length) { |
| 11894 |
var entry = entries[index]; |
| 11895 |
this.set(entry[0], entry[1]); |
| 11896 |
} |
| 11897 |
} |
| 11898 |
ListCache$4.prototype.clear = listCacheClear; |
| 11899 |
ListCache$4.prototype["delete"] = listCacheDelete; |
| 11900 |
ListCache$4.prototype.get = listCacheGet; |
| 11901 |
ListCache$4.prototype.has = listCacheHas; |
| 11902 |
ListCache$4.prototype.set = listCacheSet; |
| 11903 |
var _ListCache = ListCache$4; |
| 11904 |
var getNative$4 = _getNative, root$5 = _root; |
| 11905 |
var Map$4 = getNative$4(root$5, "Map"); |
| 11906 |
var _Map = Map$4; |
| 11907 |
var Hash = _Hash, ListCache$3 = _ListCache, Map$3 = _Map; |
| 11908 |
function mapCacheClear$1() { |
| 11909 |
this.size = 0; |
| 11910 |
this.__data__ = { |
| 11911 |
"hash": new Hash(), |
| 11912 |
"map": new (Map$3 || ListCache$3)(), |
| 11913 |
"string": new Hash() |
| 11914 |
}; |
| 11915 |
} |
| 11916 |
var _mapCacheClear = mapCacheClear$1; |
| 11917 |
function isKeyable$1(value) { |
| 11918 |
var type = typeof value; |
| 11919 |
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; |
| 11920 |
} |
| 11921 |
var _isKeyable = isKeyable$1; |
| 11922 |
var isKeyable = _isKeyable; |
| 11923 |
function getMapData$4(map, key) { |
| 11924 |
var data = map.__data__; |
| 11925 |
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; |
| 11926 |
} |
| 11927 |
var _getMapData = getMapData$4; |
| 11928 |
var getMapData$3 = _getMapData; |
| 11929 |
function mapCacheDelete$1(key) { |
| 11930 |
var result = getMapData$3(this, key)["delete"](key); |
| 11931 |
this.size -= result ? 1 : 0; |
| 11932 |
return result; |
| 11933 |
} |
| 11934 |
var _mapCacheDelete = mapCacheDelete$1; |
| 11935 |
var getMapData$2 = _getMapData; |
| 11936 |
function mapCacheGet$1(key) { |
| 11937 |
return getMapData$2(this, key).get(key); |
| 11938 |
} |
| 11939 |
var _mapCacheGet = mapCacheGet$1; |
| 11940 |
var getMapData$1 = _getMapData; |
| 11941 |
function mapCacheHas$1(key) { |
| 11942 |
return getMapData$1(this, key).has(key); |
| 11943 |
} |
| 11944 |
var _mapCacheHas = mapCacheHas$1; |
| 11945 |
var getMapData = _getMapData; |
| 11946 |
function mapCacheSet$1(key, value) { |
| 11947 |
var data = getMapData(this, key), size = data.size; |
| 11948 |
data.set(key, value); |
| 11949 |
this.size += data.size == size ? 0 : 1; |
| 11950 |
return this; |
| 11951 |
} |
| 11952 |
var _mapCacheSet = mapCacheSet$1; |
| 11953 |
var mapCacheClear = _mapCacheClear, mapCacheDelete = _mapCacheDelete, mapCacheGet = _mapCacheGet, mapCacheHas = _mapCacheHas, mapCacheSet = _mapCacheSet; |
| 11954 |
function MapCache$2(entries) { |
| 11955 |
var index = -1, length = entries == null ? 0 : entries.length; |
| 11956 |
this.clear(); |
| 11957 |
while (++index < length) { |
| 11958 |
var entry = entries[index]; |
| 11959 |
this.set(entry[0], entry[1]); |
| 11960 |
} |
| 11961 |
} |
| 11962 |
MapCache$2.prototype.clear = mapCacheClear; |
| 11963 |
MapCache$2.prototype["delete"] = mapCacheDelete; |
| 11964 |
MapCache$2.prototype.get = mapCacheGet; |
| 11965 |
MapCache$2.prototype.has = mapCacheHas; |
| 11966 |
MapCache$2.prototype.set = mapCacheSet; |
| 11967 |
var _MapCache = MapCache$2; |
| 11968 |
var reactIs = { exports: {} }; |
| 11969 |
var reactIs_production_min = {}; |
| 11970 |
/** |
| 11971 |
* @license React |
| 11972 |
* react-is.production.min.js |
| 11973 |
* |
| 11974 |
* Copyright (c) Facebook, Inc. and its affiliates. |
| 11975 |
* |
| 11976 |
* This source code is licensed under the MIT license found in the |
| 11977 |
* LICENSE file in the root directory of this source tree. |
| 11978 |
*/ |
| 11979 |
var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u; |
| 11980 |
u = Symbol.for("react.module.reference"); |
| 11981 |
function v(a) { |
| 11982 |
if ("object" === typeof a && null !== a) { |
| 11983 |
var r2 = a.$$typeof; |
| 11984 |
switch (r2) { |
| 11985 |
case b: |
| 11986 |
switch (a = a.type, a) { |
| 11987 |
case d: |
| 11988 |
case f: |
| 11989 |
case e: |
| 11990 |
case m: |
| 11991 |
case n: |
| 11992 |
return a; |
| 11993 |
default: |
| 11994 |
switch (a = a && a.$$typeof, a) { |
| 11995 |
case k: |
| 11996 |
case h: |
| 11997 |
case l: |
| 11998 |
case q: |
| 11999 |
case p: |
| 12000 |
case g: |
| 12001 |
return a; |
| 12002 |
default: |
| 12003 |
return r2; |
| 12004 |
} |
| 12005 |
} |
| 12006 |
case c: |
| 12007 |
return r2; |
| 12008 |
} |
| 12009 |
} |
| 12010 |
} |
| 12011 |
reactIs_production_min.ContextConsumer = h; |
| 12012 |
reactIs_production_min.ContextProvider = g; |
| 12013 |
reactIs_production_min.Element = b; |
| 12014 |
reactIs_production_min.ForwardRef = l; |
| 12015 |
reactIs_production_min.Fragment = d; |
| 12016 |
reactIs_production_min.Lazy = q; |
| 12017 |
reactIs_production_min.Memo = p; |
| 12018 |
reactIs_production_min.Portal = c; |
| 12019 |
reactIs_production_min.Profiler = f; |
| 12020 |
reactIs_production_min.StrictMode = e; |
| 12021 |
reactIs_production_min.Suspense = m; |
| 12022 |
reactIs_production_min.SuspenseList = n; |
| 12023 |
reactIs_production_min.isAsyncMode = function() { |
| 12024 |
return false; |
| 12025 |
}; |
| 12026 |
reactIs_production_min.isConcurrentMode = function() { |
| 12027 |
return false; |
| 12028 |
}; |
| 12029 |
reactIs_production_min.isContextConsumer = function(a) { |
| 12030 |
return v(a) === h; |
| 12031 |
}; |
| 12032 |
reactIs_production_min.isContextProvider = function(a) { |
| 12033 |
return v(a) === g; |
| 12034 |
}; |
| 12035 |
reactIs_production_min.isElement = function(a) { |
| 12036 |
return "object" === typeof a && null !== a && a.$$typeof === b; |
| 12037 |
}; |
| 12038 |
reactIs_production_min.isForwardRef = function(a) { |
| 12039 |
return v(a) === l; |
| 12040 |
}; |
| 12041 |
reactIs_production_min.isFragment = function(a) { |
| 12042 |
return v(a) === d; |
| 12043 |
}; |
| 12044 |
reactIs_production_min.isLazy = function(a) { |
| 12045 |
return v(a) === q; |
| 12046 |
}; |
| 12047 |
reactIs_production_min.isMemo = function(a) { |
| 12048 |
return v(a) === p; |
| 12049 |
}; |
| 12050 |
reactIs_production_min.isPortal = function(a) { |
| 12051 |
return v(a) === c; |
| 12052 |
}; |
| 12053 |
reactIs_production_min.isProfiler = function(a) { |
| 12054 |
return v(a) === f; |
| 12055 |
}; |
| 12056 |
reactIs_production_min.isStrictMode = function(a) { |
| 12057 |
return v(a) === e; |
| 12058 |
}; |
| 12059 |
reactIs_production_min.isSuspense = function(a) { |
| 12060 |
return v(a) === m; |
| 12061 |
}; |
| 12062 |
reactIs_production_min.isSuspenseList = function(a) { |
| 12063 |
return v(a) === n; |
| 12064 |
}; |
| 12065 |
reactIs_production_min.isValidElementType = function(a) { |
| 12066 |
return "string" === typeof a || "function" === typeof a || a === d || a === f || a === e || a === m || a === n || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false; |
| 12067 |
}; |
| 12068 |
reactIs_production_min.typeOf = v; |
| 12069 |
{ |
| 12070 |
reactIs.exports = reactIs_production_min; |
| 12071 |
} |
| 12072 |
var reactIsExports = reactIs.exports; |
| 12073 |
var ListCache$2 = _ListCache; |
| 12074 |
function stackClear$1() { |
| 12075 |
this.__data__ = new ListCache$2(); |
| 12076 |
this.size = 0; |
| 12077 |
} |
| 12078 |
var _stackClear = stackClear$1; |
| 12079 |
function stackDelete$1(key) { |
| 12080 |
var data = this.__data__, result = data["delete"](key); |
| 12081 |
this.size = data.size; |
| 12082 |
return result; |
| 12083 |
} |
| 12084 |
var _stackDelete = stackDelete$1; |
| 12085 |
function stackGet$1(key) { |
| 12086 |
return this.__data__.get(key); |
| 12087 |
} |
| 12088 |
var _stackGet = stackGet$1; |
| 12089 |
function stackHas$1(key) { |
| 12090 |
return this.__data__.has(key); |
| 12091 |
} |
| 12092 |
var _stackHas = stackHas$1; |
| 12093 |
var ListCache$1 = _ListCache, Map$2 = _Map, MapCache$1 = _MapCache; |
| 12094 |
var LARGE_ARRAY_SIZE = 200; |
| 12095 |
function stackSet$1(key, value) { |
| 12096 |
var data = this.__data__; |
| 12097 |
if (data instanceof ListCache$1) { |
| 12098 |
var pairs = data.__data__; |
| 12099 |
if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) { |
| 12100 |
pairs.push([key, value]); |
| 12101 |
this.size = ++data.size; |
| 12102 |
return this; |
| 12103 |
} |
| 12104 |
data = this.__data__ = new MapCache$1(pairs); |
| 12105 |
} |
| 12106 |
data.set(key, value); |
| 12107 |
this.size = data.size; |
| 12108 |
return this; |
| 12109 |
} |
| 12110 |
var _stackSet = stackSet$1; |
| 12111 |
var ListCache = _ListCache, stackClear = _stackClear, stackDelete = _stackDelete, stackGet = _stackGet, stackHas = _stackHas, stackSet = _stackSet; |
| 12112 |
function Stack$1(entries) { |
| 12113 |
var data = this.__data__ = new ListCache(entries); |
| 12114 |
this.size = data.size; |
| 12115 |
} |
| 12116 |
Stack$1.prototype.clear = stackClear; |
| 12117 |
Stack$1.prototype["delete"] = stackDelete; |
| 12118 |
Stack$1.prototype.get = stackGet; |
| 12119 |
Stack$1.prototype.has = stackHas; |
| 12120 |
Stack$1.prototype.set = stackSet; |
| 12121 |
var _Stack = Stack$1; |
| 12122 |
var HASH_UNDEFINED = "__lodash_hash_undefined__"; |
| 12123 |
function setCacheAdd$1(value) { |
| 12124 |
this.__data__.set(value, HASH_UNDEFINED); |
| 12125 |
return this; |
| 12126 |
} |
| 12127 |
var _setCacheAdd = setCacheAdd$1; |
| 12128 |
function setCacheHas$1(value) { |
| 12129 |
return this.__data__.has(value); |
| 12130 |
} |
| 12131 |
var _setCacheHas = setCacheHas$1; |
| 12132 |
var MapCache = _MapCache, setCacheAdd = _setCacheAdd, setCacheHas = _setCacheHas; |
| 12133 |
function SetCache$1(values) { |
| 12134 |
var index = -1, length = values == null ? 0 : values.length; |
| 12135 |
this.__data__ = new MapCache(); |
| 12136 |
while (++index < length) { |
| 12137 |
this.add(values[index]); |
| 12138 |
} |
| 12139 |
} |
| 12140 |
SetCache$1.prototype.add = SetCache$1.prototype.push = setCacheAdd; |
| 12141 |
SetCache$1.prototype.has = setCacheHas; |
| 12142 |
var _SetCache = SetCache$1; |
| 12143 |
function arraySome$1(array, predicate) { |
| 12144 |
var index = -1, length = array == null ? 0 : array.length; |
| 12145 |
while (++index < length) { |
| 12146 |
if (predicate(array[index], index, array)) { |
| 12147 |
return true; |
| 12148 |
} |
| 12149 |
} |
| 12150 |
return false; |
| 12151 |
} |
| 12152 |
var _arraySome = arraySome$1; |
| 12153 |
function cacheHas$1(cache, key) { |
| 12154 |
return cache.has(key); |
| 12155 |
} |
| 12156 |
var _cacheHas = cacheHas$1; |
| 12157 |
var SetCache = _SetCache, arraySome = _arraySome, cacheHas = _cacheHas; |
| 12158 |
var COMPARE_PARTIAL_FLAG$3 = 1, COMPARE_UNORDERED_FLAG$1 = 2; |
| 12159 |
function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) { |
| 12160 |
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, arrLength = array.length, othLength = other.length; |
| 12161 |
if (arrLength != othLength && !(isPartial && othLength > arrLength)) { |
| 12162 |
return false; |
| 12163 |
} |
| 12164 |
var arrStacked = stack.get(array); |
| 12165 |
var othStacked = stack.get(other); |
| 12166 |
if (arrStacked && othStacked) { |
| 12167 |
return arrStacked == other && othStacked == array; |
| 12168 |
} |
| 12169 |
var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0; |
| 12170 |
stack.set(array, other); |
| 12171 |
stack.set(other, array); |
| 12172 |
while (++index < arrLength) { |
| 12173 |
var arrValue = array[index], othValue = other[index]; |
| 12174 |
if (customizer) { |
| 12175 |
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); |
| 12176 |
} |
| 12177 |
if (compared !== void 0) { |
| 12178 |
if (compared) { |
| 12179 |
continue; |
| 12180 |
} |
| 12181 |
result = false; |
| 12182 |
break; |
| 12183 |
} |
| 12184 |
if (seen) { |
| 12185 |
if (!arraySome(other, function(othValue2, othIndex) { |
| 12186 |
if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) { |
| 12187 |
return seen.push(othIndex); |
| 12188 |
} |
| 12189 |
})) { |
| 12190 |
result = false; |
| 12191 |
break; |
| 12192 |
} |
| 12193 |
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { |
| 12194 |
result = false; |
| 12195 |
break; |
| 12196 |
} |
| 12197 |
} |
| 12198 |
stack["delete"](array); |
| 12199 |
stack["delete"](other); |
| 12200 |
return result; |
| 12201 |
} |
| 12202 |
var _equalArrays = equalArrays$2; |
| 12203 |
var root$4 = _root; |
| 12204 |
var Uint8Array$2 = root$4.Uint8Array; |
| 12205 |
var _Uint8Array = Uint8Array$2; |
| 12206 |
function mapToArray$1(map) { |
| 12207 |
var index = -1, result = Array(map.size); |
| 12208 |
map.forEach(function(value, key) { |
| 12209 |
result[++index] = [key, value]; |
| 12210 |
}); |
| 12211 |
return result; |
| 12212 |
} |
| 12213 |
var _mapToArray = mapToArray$1; |
| 12214 |
function setToArray$1(set) { |
| 12215 |
var index = -1, result = Array(set.size); |
| 12216 |
set.forEach(function(value) { |
| 12217 |
result[++index] = value; |
| 12218 |
}); |
| 12219 |
return result; |
| 12220 |
} |
| 12221 |
var _setToArray = setToArray$1; |
| 12222 |
var Symbol$1 = _Symbol, Uint8Array$1 = _Uint8Array, eq = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray = _setToArray; |
| 12223 |
var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2; |
| 12224 |
var boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag = "[object Symbol]"; |
| 12225 |
var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]"; |
| 12226 |
var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; |
| 12227 |
function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) { |
| 12228 |
switch (tag) { |
| 12229 |
case dataViewTag$2: |
| 12230 |
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { |
| 12231 |
return false; |
| 12232 |
} |
| 12233 |
object = object.buffer; |
| 12234 |
other = other.buffer; |
| 12235 |
case arrayBufferTag$1: |
| 12236 |
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) { |
| 12237 |
return false; |
| 12238 |
} |
| 12239 |
return true; |
| 12240 |
case boolTag$1: |
| 12241 |
case dateTag$1: |
| 12242 |
case numberTag$1: |
| 12243 |
return eq(+object, +other); |
| 12244 |
case errorTag$1: |
| 12245 |
return object.name == other.name && object.message == other.message; |
| 12246 |
case regexpTag$1: |
| 12247 |
case stringTag$1: |
| 12248 |
return object == other + ""; |
| 12249 |
case mapTag$2: |
| 12250 |
var convert = mapToArray; |
| 12251 |
case setTag$2: |
| 12252 |
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2; |
| 12253 |
convert || (convert = setToArray); |
| 12254 |
if (object.size != other.size && !isPartial) { |
| 12255 |
return false; |
| 12256 |
} |
| 12257 |
var stacked = stack.get(object); |
| 12258 |
if (stacked) { |
| 12259 |
return stacked == other; |
| 12260 |
} |
| 12261 |
bitmask |= COMPARE_UNORDERED_FLAG; |
| 12262 |
stack.set(object, other); |
| 12263 |
var result = equalArrays$1(convert(object), convert(other), bitmask, customizer, equalFunc, stack); |
| 12264 |
stack["delete"](object); |
| 12265 |
return result; |
| 12266 |
case symbolTag: |
| 12267 |
if (symbolValueOf) { |
| 12268 |
return symbolValueOf.call(object) == symbolValueOf.call(other); |
| 12269 |
} |
| 12270 |
} |
| 12271 |
return false; |
| 12272 |
} |
| 12273 |
var _equalByTag = equalByTag$1; |
| 12274 |
function arrayPush$1(array, values) { |
| 12275 |
var index = -1, length = values.length, offset = array.length; |
| 12276 |
while (++index < length) { |
| 12277 |
array[offset + index] = values[index]; |
| 12278 |
} |
| 12279 |
return array; |
| 12280 |
} |
| 12281 |
var _arrayPush = arrayPush$1; |
| 12282 |
var arrayPush = _arrayPush, isArray$2 = isArray_1; |
| 12283 |
function baseGetAllKeys$1(object, keysFunc, symbolsFunc) { |
| 12284 |
var result = keysFunc(object); |
| 12285 |
return isArray$2(object) ? result : arrayPush(result, symbolsFunc(object)); |
| 12286 |
} |
| 12287 |
var _baseGetAllKeys = baseGetAllKeys$1; |
| 12288 |
function arrayFilter$1(array, predicate) { |
| 12289 |
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; |
| 12290 |
while (++index < length) { |
| 12291 |
var value = array[index]; |
| 12292 |
if (predicate(value, index, array)) { |
| 12293 |
result[resIndex++] = value; |
| 12294 |
} |
| 12295 |
} |
| 12296 |
return result; |
| 12297 |
} |
| 12298 |
var _arrayFilter = arrayFilter$1; |
| 12299 |
function stubArray$1() { |
| 12300 |
return []; |
| 12301 |
} |
| 12302 |
var stubArray_1 = stubArray$1; |
| 12303 |
var arrayFilter = _arrayFilter, stubArray = stubArray_1; |
| 12304 |
var objectProto$6 = Object.prototype; |
| 12305 |
var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable; |
| 12306 |
var nativeGetSymbols = Object.getOwnPropertySymbols; |
| 12307 |
var getSymbols$1 = !nativeGetSymbols ? stubArray : function(object) { |
| 12308 |
if (object == null) { |
| 12309 |
return []; |
| 12310 |
} |
| 12311 |
object = Object(object); |
| 12312 |
return arrayFilter(nativeGetSymbols(object), function(symbol) { |
| 12313 |
return propertyIsEnumerable$1.call(object, symbol); |
| 12314 |
}); |
| 12315 |
}; |
| 12316 |
var _getSymbols = getSymbols$1; |
| 12317 |
function baseTimes$1(n2, iteratee) { |
| 12318 |
var index = -1, result = Array(n2); |
| 12319 |
while (++index < n2) { |
| 12320 |
result[index] = iteratee(index); |
| 12321 |
} |
| 12322 |
return result; |
| 12323 |
} |
| 12324 |
var _baseTimes = baseTimes$1; |
| 12325 |
var baseGetTag$2 = _baseGetTag, isObjectLike$3 = isObjectLike_1; |
| 12326 |
var argsTag$2 = "[object Arguments]"; |
| 12327 |
function baseIsArguments$1(value) { |
| 12328 |
return isObjectLike$3(value) && baseGetTag$2(value) == argsTag$2; |
| 12329 |
} |
| 12330 |
var _baseIsArguments = baseIsArguments$1; |
| 12331 |
var baseIsArguments = _baseIsArguments, isObjectLike$2 = isObjectLike_1; |
| 12332 |
var objectProto$5 = Object.prototype; |
| 12333 |
var hasOwnProperty$5 = objectProto$5.hasOwnProperty; |
| 12334 |
var propertyIsEnumerable = objectProto$5.propertyIsEnumerable; |
| 12335 |
var isArguments$1 = baseIsArguments(/* @__PURE__ */ function() { |
| 12336 |
return arguments; |
| 12337 |
}()) ? baseIsArguments : function(value) { |
| 12338 |
return isObjectLike$2(value) && hasOwnProperty$5.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); |
| 12339 |
}; |
| 12340 |
var isArguments_1 = isArguments$1; |
| 12341 |
var isBuffer$2 = { exports: {} }; |
| 12342 |
function stubFalse() { |
| 12343 |
return false; |
| 12344 |
} |
| 12345 |
var stubFalse_1 = stubFalse; |
| 12346 |
isBuffer$2.exports; |
| 12347 |
(function(module, exports$1) { |
| 12348 |
var root2 = _root, stubFalse2 = stubFalse_1; |
| 12349 |
var freeExports = exports$1 && !exports$1.nodeType && exports$1; |
| 12350 |
var freeModule = freeExports && true && module && !module.nodeType && module; |
| 12351 |
var moduleExports = freeModule && freeModule.exports === freeExports; |
| 12352 |
var Buffer2 = moduleExports ? root2.Buffer : void 0; |
| 12353 |
var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0; |
| 12354 |
var isBuffer2 = nativeIsBuffer || stubFalse2; |
| 12355 |
module.exports = isBuffer2; |
| 12356 |
})(isBuffer$2, isBuffer$2.exports); |
| 12357 |
var isBufferExports = isBuffer$2.exports; |
| 12358 |
var MAX_SAFE_INTEGER$1 = 9007199254740991; |
| 12359 |
var reIsUint = /^(?:0|[1-9]\d*)$/; |
| 12360 |
function isIndex$1(value, length) { |
| 12361 |
var type = typeof value; |
| 12362 |
length = length == null ? MAX_SAFE_INTEGER$1 : length; |
| 12363 |
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); |
| 12364 |
} |
| 12365 |
var _isIndex = isIndex$1; |
| 12366 |
var MAX_SAFE_INTEGER = 9007199254740991; |
| 12367 |
function isLength$2(value) { |
| 12368 |
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; |
| 12369 |
} |
| 12370 |
var isLength_1 = isLength$2; |
| 12371 |
var baseGetTag$1 = _baseGetTag, isLength$1 = isLength_1, isObjectLike$1 = isObjectLike_1; |
| 12372 |
var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag$1 = "[object Map]", numberTag = "[object Number]", objectTag$2 = "[object Object]", regexpTag = "[object RegExp]", setTag$1 = "[object Set]", stringTag = "[object String]", weakMapTag$1 = "[object WeakMap]"; |
| 12373 |
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]"; |
| 12374 |
var typedArrayTags = {}; |
| 12375 |
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; |
| 12376 |
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag$1] = typedArrayTags[numberTag] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag] = typedArrayTags[setTag$1] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag$1] = false; |
| 12377 |
function baseIsTypedArray$1(value) { |
| 12378 |
return isObjectLike$1(value) && isLength$1(value.length) && !!typedArrayTags[baseGetTag$1(value)]; |
| 12379 |
} |
| 12380 |
var _baseIsTypedArray = baseIsTypedArray$1; |
| 12381 |
function baseUnary$1(func) { |
| 12382 |
return function(value) { |
| 12383 |
return func(value); |
| 12384 |
}; |
| 12385 |
} |
| 12386 |
var _baseUnary = baseUnary$1; |
| 12387 |
var _nodeUtil = { exports: {} }; |
| 12388 |
_nodeUtil.exports; |
| 12389 |
(function(module, exports$1) { |
| 12390 |
var freeGlobal2 = _freeGlobal; |
| 12391 |
var freeExports = exports$1 && !exports$1.nodeType && exports$1; |
| 12392 |
var freeModule = freeExports && true && module && !module.nodeType && module; |
| 12393 |
var moduleExports = freeModule && freeModule.exports === freeExports; |
| 12394 |
var freeProcess = moduleExports && freeGlobal2.process; |
| 12395 |
var nodeUtil2 = function() { |
| 12396 |
try { |
| 12397 |
var types = freeModule && freeModule.require && freeModule.require("util").types; |
| 12398 |
if (types) { |
| 12399 |
return types; |
| 12400 |
} |
| 12401 |
return freeProcess && freeProcess.binding && freeProcess.binding("util"); |
| 12402 |
} catch (e2) { |
| 12403 |
} |
| 12404 |
}(); |
| 12405 |
module.exports = nodeUtil2; |
| 12406 |
})(_nodeUtil, _nodeUtil.exports); |
| 12407 |
var _nodeUtilExports = _nodeUtil.exports; |
| 12408 |
var baseIsTypedArray = _baseIsTypedArray, baseUnary = _baseUnary, nodeUtil = _nodeUtilExports; |
| 12409 |
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; |
| 12410 |
var isTypedArray$2 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; |
| 12411 |
var isTypedArray_1 = isTypedArray$2; |
| 12412 |
var baseTimes = _baseTimes, isArguments = isArguments_1, isArray$1 = isArray_1, isBuffer$1 = isBufferExports, isIndex = _isIndex, isTypedArray$1 = isTypedArray_1; |
| 12413 |
var objectProto$4 = Object.prototype; |
| 12414 |
var hasOwnProperty$4 = objectProto$4.hasOwnProperty; |
| 12415 |
function arrayLikeKeys$1(value, inherited) { |
| 12416 |
var isArr = isArray$1(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; |
| 12417 |
for (var key in value) { |
| 12418 |
if ((inherited || hasOwnProperty$4.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode. |
| 12419 |
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. |
| 12420 |
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. |
| 12421 |
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. |
| 12422 |
isIndex(key, length)))) { |
| 12423 |
result.push(key); |
| 12424 |
} |
| 12425 |
} |
| 12426 |
return result; |
| 12427 |
} |
| 12428 |
var _arrayLikeKeys = arrayLikeKeys$1; |
| 12429 |
var objectProto$3 = Object.prototype; |
| 12430 |
function isPrototype$1(value) { |
| 12431 |
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$3; |
| 12432 |
return value === proto; |
| 12433 |
} |
| 12434 |
var _isPrototype = isPrototype$1; |
| 12435 |
function overArg$1(func, transform) { |
| 12436 |
return function(arg) { |
| 12437 |
return func(transform(arg)); |
| 12438 |
}; |
| 12439 |
} |
| 12440 |
var _overArg = overArg$1; |
| 12441 |
var overArg = _overArg; |
| 12442 |
var nativeKeys$1 = overArg(Object.keys, Object); |
| 12443 |
var _nativeKeys = nativeKeys$1; |
| 12444 |
var isPrototype = _isPrototype, nativeKeys = _nativeKeys; |
| 12445 |
var objectProto$2 = Object.prototype; |
| 12446 |
var hasOwnProperty$3 = objectProto$2.hasOwnProperty; |
| 12447 |
function baseKeys$1(object) { |
| 12448 |
if (!isPrototype(object)) { |
| 12449 |
return nativeKeys(object); |
| 12450 |
} |
| 12451 |
var result = []; |
| 12452 |
for (var key in Object(object)) { |
| 12453 |
if (hasOwnProperty$3.call(object, key) && key != "constructor") { |
| 12454 |
result.push(key); |
| 12455 |
} |
| 12456 |
} |
| 12457 |
return result; |
| 12458 |
} |
| 12459 |
var _baseKeys = baseKeys$1; |
| 12460 |
var isFunction = isFunction_1, isLength = isLength_1; |
| 12461 |
function isArrayLike$1(value) { |
| 12462 |
return value != null && isLength(value.length) && !isFunction(value); |
| 12463 |
} |
| 12464 |
var isArrayLike_1 = isArrayLike$1; |
| 12465 |
var arrayLikeKeys = _arrayLikeKeys, baseKeys = _baseKeys, isArrayLike = isArrayLike_1; |
| 12466 |
function keys$2(object) { |
| 12467 |
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); |
| 12468 |
} |
| 12469 |
var keys_1 = keys$2; |
| 12470 |
var baseGetAllKeys = _baseGetAllKeys, getSymbols = _getSymbols, keys$1 = keys_1; |
| 12471 |
function getAllKeys$1(object) { |
| 12472 |
return baseGetAllKeys(object, keys$1, getSymbols); |
| 12473 |
} |
| 12474 |
var _getAllKeys = getAllKeys$1; |
| 12475 |
var getAllKeys = _getAllKeys; |
| 12476 |
var COMPARE_PARTIAL_FLAG$1 = 1; |
| 12477 |
var objectProto$1 = Object.prototype; |
| 12478 |
var hasOwnProperty$2 = objectProto$1.hasOwnProperty; |
| 12479 |
function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) { |
| 12480 |
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; |
| 12481 |
if (objLength != othLength && !isPartial) { |
| 12482 |
return false; |
| 12483 |
} |
| 12484 |
var index = objLength; |
| 12485 |
while (index--) { |
| 12486 |
var key = objProps[index]; |
| 12487 |
if (!(isPartial ? key in other : hasOwnProperty$2.call(other, key))) { |
| 12488 |
return false; |
| 12489 |
} |
| 12490 |
} |
| 12491 |
var objStacked = stack.get(object); |
| 12492 |
var othStacked = stack.get(other); |
| 12493 |
if (objStacked && othStacked) { |
| 12494 |
return objStacked == other && othStacked == object; |
| 12495 |
} |
| 12496 |
var result = true; |
| 12497 |
stack.set(object, other); |
| 12498 |
stack.set(other, object); |
| 12499 |
var skipCtor = isPartial; |
| 12500 |
while (++index < objLength) { |
| 12501 |
key = objProps[index]; |
| 12502 |
var objValue = object[key], othValue = other[key]; |
| 12503 |
if (customizer) { |
| 12504 |
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); |
| 12505 |
} |
| 12506 |
if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { |
| 12507 |
result = false; |
| 12508 |
break; |
| 12509 |
} |
| 12510 |
skipCtor || (skipCtor = key == "constructor"); |
| 12511 |
} |
| 12512 |
if (result && !skipCtor) { |
| 12513 |
var objCtor = object.constructor, othCtor = other.constructor; |
| 12514 |
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { |
| 12515 |
result = false; |
| 12516 |
} |
| 12517 |
} |
| 12518 |
stack["delete"](object); |
| 12519 |
stack["delete"](other); |
| 12520 |
return result; |
| 12521 |
} |
| 12522 |
var _equalObjects = equalObjects$1; |
| 12523 |
var getNative$3 = _getNative, root$3 = _root; |
| 12524 |
var DataView$1 = getNative$3(root$3, "DataView"); |
| 12525 |
var _DataView = DataView$1; |
| 12526 |
var getNative$2 = _getNative, root$2 = _root; |
| 12527 |
var Promise$2 = getNative$2(root$2, "Promise"); |
| 12528 |
var _Promise = Promise$2; |
| 12529 |
var getNative$1 = _getNative, root$1 = _root; |
| 12530 |
var Set$2 = getNative$1(root$1, "Set"); |
| 12531 |
var _Set = Set$2; |
| 12532 |
var getNative = _getNative, root = _root; |
| 12533 |
var WeakMap$2 = getNative(root, "WeakMap"); |
| 12534 |
var _WeakMap = WeakMap$2; |
| 12535 |
var DataView = _DataView, Map$1 = _Map, Promise$1 = _Promise, Set$1 = _Set, WeakMap$1 = _WeakMap, baseGetTag = _baseGetTag, toSource = _toSource; |
| 12536 |
var mapTag = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag = "[object Set]", weakMapTag = "[object WeakMap]"; |
| 12537 |
var dataViewTag = "[object DataView]"; |
| 12538 |
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1); |
| 12539 |
var getTag$1 = baseGetTag; |
| 12540 |
if (DataView && getTag$1(new DataView(new ArrayBuffer(1))) != dataViewTag || Map$1 && getTag$1(new Map$1()) != mapTag || Promise$1 && getTag$1(Promise$1.resolve()) != promiseTag || Set$1 && getTag$1(new Set$1()) != setTag || WeakMap$1 && getTag$1(new WeakMap$1()) != weakMapTag) { |
| 12541 |
getTag$1 = function(value) { |
| 12542 |
var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : ""; |
| 12543 |
if (ctorString) { |
| 12544 |
switch (ctorString) { |
| 12545 |
case dataViewCtorString: |
| 12546 |
return dataViewTag; |
| 12547 |
case mapCtorString: |
| 12548 |
return mapTag; |
| 12549 |
case promiseCtorString: |
| 12550 |
return promiseTag; |
| 12551 |
case setCtorString: |
| 12552 |
return setTag; |
| 12553 |
case weakMapCtorString: |
| 12554 |
return weakMapTag; |
| 12555 |
} |
| 12556 |
} |
| 12557 |
return result; |
| 12558 |
}; |
| 12559 |
} |
| 12560 |
var _getTag = getTag$1; |
| 12561 |
var Stack = _Stack, equalArrays = _equalArrays, equalByTag = _equalByTag, equalObjects = _equalObjects, getTag = _getTag, isArray = isArray_1, isBuffer = isBufferExports, isTypedArray = isTypedArray_1; |
| 12562 |
var COMPARE_PARTIAL_FLAG = 1; |
| 12563 |
var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]"; |
| 12564 |
var objectProto = Object.prototype; |
| 12565 |
var hasOwnProperty$1 = objectProto.hasOwnProperty; |
| 12566 |
function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) { |
| 12567 |
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); |
| 12568 |
objTag = objTag == argsTag ? objectTag : objTag; |
| 12569 |
othTag = othTag == argsTag ? objectTag : othTag; |
| 12570 |
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; |
| 12571 |
if (isSameTag && isBuffer(object)) { |
| 12572 |
if (!isBuffer(other)) { |
| 12573 |
return false; |
| 12574 |
} |
| 12575 |
objIsArr = true; |
| 12576 |
objIsObj = false; |
| 12577 |
} |
| 12578 |
if (isSameTag && !objIsObj) { |
| 12579 |
stack || (stack = new Stack()); |
| 12580 |
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); |
| 12581 |
} |
| 12582 |
if (!(bitmask & COMPARE_PARTIAL_FLAG)) { |
| 12583 |
var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$1.call(other, "__wrapped__"); |
| 12584 |
if (objIsWrapped || othIsWrapped) { |
| 12585 |
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; |
| 12586 |
stack || (stack = new Stack()); |
| 12587 |
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); |
| 12588 |
} |
| 12589 |
} |
| 12590 |
if (!isSameTag) { |
| 12591 |
return false; |
| 12592 |
} |
| 12593 |
stack || (stack = new Stack()); |
| 12594 |
return equalObjects(object, other, bitmask, customizer, equalFunc, stack); |
| 12595 |
} |
| 12596 |
var _baseIsEqualDeep = baseIsEqualDeep$1; |
| 12597 |
var baseIsEqualDeep = _baseIsEqualDeep, isObjectLike = isObjectLike_1; |
| 12598 |
function baseIsEqual$1(value, other, bitmask, customizer, stack) { |
| 12599 |
if (value === other) { |
| 12600 |
return true; |
| 12601 |
} |
| 12602 |
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { |
| 12603 |
return value !== value && other !== other; |
| 12604 |
} |
| 12605 |
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual$1, stack); |
| 12606 |
} |
| 12607 |
var _baseIsEqual = baseIsEqual$1; |
| 12608 |
var baseIsEqual = _baseIsEqual; |
| 12609 |
function isEqual(value, other) { |
| 12610 |
return baseIsEqual(value, other); |
| 12611 |
} |
| 12612 |
var isEqual_1$1 = isEqual; |
| 12613 |
const isEqual$1 = /* @__PURE__ */ getDefaultExportFromCjs(isEqual_1$1); |
| 12614 |
var propTypes = { exports: {} }; |
| 12615 |
var ReactPropTypesSecret$1 = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; |
| 12616 |
var ReactPropTypesSecret_1 = ReactPropTypesSecret$1; |
| 12617 |
var ReactPropTypesSecret = ReactPropTypesSecret_1; |
| 12618 |
function emptyFunction() { |
| 12619 |
} |
| 12620 |
function emptyFunctionWithReset() { |
| 12621 |
} |
| 12622 |
emptyFunctionWithReset.resetWarningCache = emptyFunction; |
| 12623 |
var factoryWithThrowingShims = function() { |
| 12624 |
function shim(props, propName, componentName, location, propFullName, secret) { |
| 12625 |
if (secret === ReactPropTypesSecret) { |
| 12626 |
return; |
| 12627 |
} |
| 12628 |
var err = new Error( |
| 12629 |
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types" |
| 12630 |
); |
| 12631 |
err.name = "Invariant Violation"; |
| 12632 |
throw err; |
| 12633 |
} |
| 12634 |
shim.isRequired = shim; |
| 12635 |
function getShim() { |
| 12636 |
return shim; |
| 12637 |
} |
| 12638 |
var ReactPropTypes = { |
| 12639 |
array: shim, |
| 12640 |
bigint: shim, |
| 12641 |
bool: shim, |
| 12642 |
func: shim, |
| 12643 |
number: shim, |
| 12644 |
object: shim, |
| 12645 |
string: shim, |
| 12646 |
symbol: shim, |
| 12647 |
any: shim, |
| 12648 |
arrayOf: getShim, |
| 12649 |
element: shim, |
| 12650 |
elementType: shim, |
| 12651 |
instanceOf: getShim, |
| 12652 |
node: shim, |
| 12653 |
objectOf: getShim, |
| 12654 |
oneOf: getShim, |
| 12655 |
oneOfType: getShim, |
| 12656 |
shape: getShim, |
| 12657 |
exact: getShim, |
| 12658 |
checkPropTypes: emptyFunctionWithReset, |
| 12659 |
resetWarningCache: emptyFunction |
| 12660 |
}; |
| 12661 |
ReactPropTypes.PropTypes = ReactPropTypes; |
| 12662 |
return ReactPropTypes; |
| 12663 |
}; |
| 12664 |
{ |
| 12665 |
propTypes.exports = factoryWithThrowingShims(); |
| 12666 |
} |
| 12667 |
var propTypesExports = propTypes.exports; |
| 12668 |
const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports); |
| 12669 |
const { getOwnPropertyNames, getOwnPropertySymbols } = Object; |
| 12670 |
const { hasOwnProperty } = Object.prototype; |
| 12671 |
function combineComparators(comparatorA, comparatorB) { |
| 12672 |
return function isEqual2(a, b2, state) { |
| 12673 |
return comparatorA(a, b2, state) && comparatorB(a, b2, state); |
| 12674 |
}; |
| 12675 |
} |
| 12676 |
function createIsCircular(areItemsEqual) { |
| 12677 |
return function isCircular(a, b2, state) { |
| 12678 |
if (!a || !b2 || typeof a !== "object" || typeof b2 !== "object") { |
| 12679 |
return areItemsEqual(a, b2, state); |
| 12680 |
} |
| 12681 |
const { cache } = state; |
| 12682 |
const cachedA = cache.get(a); |
| 12683 |
const cachedB = cache.get(b2); |
| 12684 |
if (cachedA && cachedB) { |
| 12685 |
return cachedA === b2 && cachedB === a; |
| 12686 |
} |
| 12687 |
cache.set(a, b2); |
| 12688 |
cache.set(b2, a); |
| 12689 |
const result = areItemsEqual(a, b2, state); |
| 12690 |
cache.delete(a); |
| 12691 |
cache.delete(b2); |
| 12692 |
return result; |
| 12693 |
}; |
| 12694 |
} |
| 12695 |
function getShortTag(value) { |
| 12696 |
return value != null ? value[Symbol.toStringTag] : void 0; |
| 12697 |
} |
| 12698 |
function getStrictProperties(object) { |
| 12699 |
return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object)); |
| 12700 |
} |
| 12701 |
const hasOwn = ( |
| 12702 |
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition |
| 12703 |
Object.hasOwn || ((object, property) => hasOwnProperty.call(object, property)) |
| 12704 |
); |
| 12705 |
function sameValueZeroEqual(a, b2) { |
| 12706 |
return a === b2 || !a && !b2 && a !== a && b2 !== b2; |
| 12707 |
} |
| 12708 |
const PREACT_VNODE = "__v"; |
| 12709 |
const PREACT_OWNER = "__o"; |
| 12710 |
const REACT_OWNER = "_owner"; |
| 12711 |
const { getOwnPropertyDescriptor, keys } = Object; |
| 12712 |
function areArrayBuffersEqual(a, b2) { |
| 12713 |
return a.byteLength === b2.byteLength && areTypedArraysEqual(new Uint8Array(a), new Uint8Array(b2)); |
| 12714 |
} |
| 12715 |
function areArraysEqual(a, b2, state) { |
| 12716 |
let index = a.length; |
| 12717 |
if (b2.length !== index) { |
| 12718 |
return false; |
| 12719 |
} |
| 12720 |
while (index-- > 0) { |
| 12721 |
if (!state.equals(a[index], b2[index], index, index, a, b2, state)) { |
| 12722 |
return false; |
| 12723 |
} |
| 12724 |
} |
| 12725 |
return true; |
| 12726 |
} |
| 12727 |
function areDataViewsEqual(a, b2) { |
| 12728 |
return a.byteLength === b2.byteLength && areTypedArraysEqual(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b2.buffer, b2.byteOffset, b2.byteLength)); |
| 12729 |
} |
| 12730 |
function areDatesEqual(a, b2) { |
| 12731 |
return sameValueZeroEqual(a.getTime(), b2.getTime()); |
| 12732 |
} |
| 12733 |
function areErrorsEqual(a, b2) { |
| 12734 |
return a.name === b2.name && a.message === b2.message && a.cause === b2.cause && a.stack === b2.stack; |
| 12735 |
} |
| 12736 |
function areFunctionsEqual(a, b2) { |
| 12737 |
return a === b2; |
| 12738 |
} |
| 12739 |
function areMapsEqual(a, b2, state) { |
| 12740 |
const size = a.size; |
| 12741 |
if (size !== b2.size) { |
| 12742 |
return false; |
| 12743 |
} |
| 12744 |
if (!size) { |
| 12745 |
return true; |
| 12746 |
} |
| 12747 |
const matchedIndices = new Array(size); |
| 12748 |
const aIterable = a.entries(); |
| 12749 |
let aResult; |
| 12750 |
let bResult; |
| 12751 |
let index = 0; |
| 12752 |
while (aResult = aIterable.next()) { |
| 12753 |
if (aResult.done) { |
| 12754 |
break; |
| 12755 |
} |
| 12756 |
const bIterable = b2.entries(); |
| 12757 |
let hasMatch = false; |
| 12758 |
let matchIndex = 0; |
| 12759 |
while (bResult = bIterable.next()) { |
| 12760 |
if (bResult.done) { |
| 12761 |
break; |
| 12762 |
} |
| 12763 |
if (matchedIndices[matchIndex]) { |
| 12764 |
matchIndex++; |
| 12765 |
continue; |
| 12766 |
} |
| 12767 |
const aEntry = aResult.value; |
| 12768 |
const bEntry = bResult.value; |
| 12769 |
if (state.equals(aEntry[0], bEntry[0], index, matchIndex, a, b2, state) && state.equals(aEntry[1], bEntry[1], aEntry[0], bEntry[0], a, b2, state)) { |
| 12770 |
hasMatch = matchedIndices[matchIndex] = true; |
| 12771 |
break; |
| 12772 |
} |
| 12773 |
matchIndex++; |
| 12774 |
} |
| 12775 |
if (!hasMatch) { |
| 12776 |
return false; |
| 12777 |
} |
| 12778 |
index++; |
| 12779 |
} |
| 12780 |
return true; |
| 12781 |
} |
| 12782 |
const areNumbersEqual = sameValueZeroEqual; |
| 12783 |
function areObjectsEqual(a, b2, state) { |
| 12784 |
const properties = keys(a); |
| 12785 |
let index = properties.length; |
| 12786 |
if (keys(b2).length !== index) { |
| 12787 |
return false; |
| 12788 |
} |
| 12789 |
while (index-- > 0) { |
| 12790 |
if (!isPropertyEqual(a, b2, state, properties[index])) { |
| 12791 |
return false; |
| 12792 |
} |
| 12793 |
} |
| 12794 |
return true; |
| 12795 |
} |
| 12796 |
function areObjectsEqualStrict(a, b2, state) { |
| 12797 |
const properties = getStrictProperties(a); |
| 12798 |
let index = properties.length; |
| 12799 |
if (getStrictProperties(b2).length !== index) { |
| 12800 |
return false; |
| 12801 |
} |
| 12802 |
let property; |
| 12803 |
let descriptorA; |
| 12804 |
let descriptorB; |
| 12805 |
while (index-- > 0) { |
| 12806 |
property = properties[index]; |
| 12807 |
if (!isPropertyEqual(a, b2, state, property)) { |
| 12808 |
return false; |
| 12809 |
} |
| 12810 |
descriptorA = getOwnPropertyDescriptor(a, property); |
| 12811 |
descriptorB = getOwnPropertyDescriptor(b2, property); |
| 12812 |
if ((descriptorA || descriptorB) && (!descriptorA || !descriptorB || descriptorA.configurable !== descriptorB.configurable || descriptorA.enumerable !== descriptorB.enumerable || descriptorA.writable !== descriptorB.writable)) { |
| 12813 |
return false; |
| 12814 |
} |
| 12815 |
} |
| 12816 |
return true; |
| 12817 |
} |
| 12818 |
function arePrimitiveWrappersEqual(a, b2) { |
| 12819 |
return sameValueZeroEqual(a.valueOf(), b2.valueOf()); |
| 12820 |
} |
| 12821 |
function areRegExpsEqual(a, b2) { |
| 12822 |
return a.source === b2.source && a.flags === b2.flags; |
| 12823 |
} |
| 12824 |
function areSetsEqual(a, b2, state) { |
| 12825 |
const size = a.size; |
| 12826 |
if (size !== b2.size) { |
| 12827 |
return false; |
| 12828 |
} |
| 12829 |
if (!size) { |
| 12830 |
return true; |
| 12831 |
} |
| 12832 |
const matchedIndices = new Array(size); |
| 12833 |
const aIterable = a.values(); |
| 12834 |
let aResult; |
| 12835 |
let bResult; |
| 12836 |
while (aResult = aIterable.next()) { |
| 12837 |
if (aResult.done) { |
| 12838 |
break; |
| 12839 |
} |
| 12840 |
const bIterable = b2.values(); |
| 12841 |
let hasMatch = false; |
| 12842 |
let matchIndex = 0; |
| 12843 |
while (bResult = bIterable.next()) { |
| 12844 |
if (bResult.done) { |
| 12845 |
break; |
| 12846 |
} |
| 12847 |
if (!matchedIndices[matchIndex] && state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b2, state)) { |
| 12848 |
hasMatch = matchedIndices[matchIndex] = true; |
| 12849 |
break; |
| 12850 |
} |
| 12851 |
matchIndex++; |
| 12852 |
} |
| 12853 |
if (!hasMatch) { |
| 12854 |
return false; |
| 12855 |
} |
| 12856 |
} |
| 12857 |
return true; |
| 12858 |
} |
| 12859 |
function areTypedArraysEqual(a, b2) { |
| 12860 |
let index = a.byteLength; |
| 12861 |
if (b2.byteLength !== index || a.byteOffset !== b2.byteOffset) { |
| 12862 |
return false; |
| 12863 |
} |
| 12864 |
while (index-- > 0) { |
| 12865 |
if (a[index] !== b2[index]) { |
| 12866 |
return false; |
| 12867 |
} |
| 12868 |
} |
| 12869 |
return true; |
| 12870 |
} |
| 12871 |
function areUrlsEqual(a, b2) { |
| 12872 |
return a.hostname === b2.hostname && a.pathname === b2.pathname && a.protocol === b2.protocol && a.port === b2.port && a.hash === b2.hash && a.username === b2.username && a.password === b2.password; |
| 12873 |
} |
| 12874 |
function isPropertyEqual(a, b2, state, property) { |
| 12875 |
if ((property === REACT_OWNER || property === PREACT_OWNER || property === PREACT_VNODE) && (a.$$typeof || b2.$$typeof)) { |
| 12876 |
return true; |
| 12877 |
} |
| 12878 |
return hasOwn(b2, property) && state.equals(a[property], b2[property], property, property, a, b2, state); |
| 12879 |
} |
| 12880 |
const ARRAY_BUFFER_TAG = "[object ArrayBuffer]"; |
| 12881 |
const ARGUMENTS_TAG = "[object Arguments]"; |
| 12882 |
const BOOLEAN_TAG = "[object Boolean]"; |
| 12883 |
const DATA_VIEW_TAG = "[object DataView]"; |
| 12884 |
const DATE_TAG = "[object Date]"; |
| 12885 |
const ERROR_TAG = "[object Error]"; |
| 12886 |
const MAP_TAG = "[object Map]"; |
| 12887 |
const NUMBER_TAG = "[object Number]"; |
| 12888 |
const OBJECT_TAG = "[object Object]"; |
| 12889 |
const REG_EXP_TAG = "[object RegExp]"; |
| 12890 |
const SET_TAG = "[object Set]"; |
| 12891 |
const STRING_TAG = "[object String]"; |
| 12892 |
const TYPED_ARRAY_TAGS = { |
| 12893 |
"[object Int8Array]": true, |
| 12894 |
"[object Uint8Array]": true, |
| 12895 |
"[object Uint8ClampedArray]": true, |
| 12896 |
"[object Int16Array]": true, |
| 12897 |
"[object Uint16Array]": true, |
| 12898 |
"[object Int32Array]": true, |
| 12899 |
"[object Uint32Array]": true, |
| 12900 |
"[object Float16Array]": true, |
| 12901 |
"[object Float32Array]": true, |
| 12902 |
"[object Float64Array]": true, |
| 12903 |
"[object BigInt64Array]": true, |
| 12904 |
"[object BigUint64Array]": true |
| 12905 |
}; |
| 12906 |
const URL_TAG = "[object URL]"; |
| 12907 |
const toString = Object.prototype.toString; |
| 12908 |
function createEqualityComparator({ areArrayBuffersEqual: areArrayBuffersEqual2, areArraysEqual: areArraysEqual2, areDataViewsEqual: areDataViewsEqual2, areDatesEqual: areDatesEqual2, areErrorsEqual: areErrorsEqual2, areFunctionsEqual: areFunctionsEqual2, areMapsEqual: areMapsEqual2, areNumbersEqual: areNumbersEqual2, areObjectsEqual: areObjectsEqual2, arePrimitiveWrappersEqual: arePrimitiveWrappersEqual2, areRegExpsEqual: areRegExpsEqual2, areSetsEqual: areSetsEqual2, areTypedArraysEqual: areTypedArraysEqual2, areUrlsEqual: areUrlsEqual2, unknownTagComparators }) { |
| 12909 |
return function comparator(a, b2, state) { |
| 12910 |
if (a === b2) { |
| 12911 |
return true; |
| 12912 |
} |
| 12913 |
if (a == null || b2 == null) { |
| 12914 |
return false; |
| 12915 |
} |
| 12916 |
const type = typeof a; |
| 12917 |
if (type !== typeof b2) { |
| 12918 |
return false; |
| 12919 |
} |
| 12920 |
if (type !== "object") { |
| 12921 |
if (type === "number") { |
| 12922 |
return areNumbersEqual2(a, b2, state); |
| 12923 |
} |
| 12924 |
if (type === "function") { |
| 12925 |
return areFunctionsEqual2(a, b2, state); |
| 12926 |
} |
| 12927 |
return false; |
| 12928 |
} |
| 12929 |
const constructor = a.constructor; |
| 12930 |
if (constructor !== b2.constructor) { |
| 12931 |
return false; |
| 12932 |
} |
| 12933 |
if (constructor === Object) { |
| 12934 |
return areObjectsEqual2(a, b2, state); |
| 12935 |
} |
| 12936 |
if (Array.isArray(a)) { |
| 12937 |
return areArraysEqual2(a, b2, state); |
| 12938 |
} |
| 12939 |
if (constructor === Date) { |
| 12940 |
return areDatesEqual2(a, b2, state); |
| 12941 |
} |
| 12942 |
if (constructor === RegExp) { |
| 12943 |
return areRegExpsEqual2(a, b2, state); |
| 12944 |
} |
| 12945 |
if (constructor === Map) { |
| 12946 |
return areMapsEqual2(a, b2, state); |
| 12947 |
} |
| 12948 |
if (constructor === Set) { |
| 12949 |
return areSetsEqual2(a, b2, state); |
| 12950 |
} |
| 12951 |
const tag = toString.call(a); |
| 12952 |
if (tag === DATE_TAG) { |
| 12953 |
return areDatesEqual2(a, b2, state); |
| 12954 |
} |
| 12955 |
if (tag === REG_EXP_TAG) { |
| 12956 |
return areRegExpsEqual2(a, b2, state); |
| 12957 |
} |
| 12958 |
if (tag === MAP_TAG) { |
| 12959 |
return areMapsEqual2(a, b2, state); |
| 12960 |
} |
| 12961 |
if (tag === SET_TAG) { |
| 12962 |
return areSetsEqual2(a, b2, state); |
| 12963 |
} |
| 12964 |
if (tag === OBJECT_TAG) { |
| 12965 |
return typeof a.then !== "function" && typeof b2.then !== "function" && areObjectsEqual2(a, b2, state); |
| 12966 |
} |
| 12967 |
if (tag === URL_TAG) { |
| 12968 |
return areUrlsEqual2(a, b2, state); |
| 12969 |
} |
| 12970 |
if (tag === ERROR_TAG) { |
| 12971 |
return areErrorsEqual2(a, b2, state); |
| 12972 |
} |
| 12973 |
if (tag === ARGUMENTS_TAG) { |
| 12974 |
return areObjectsEqual2(a, b2, state); |
| 12975 |
} |
| 12976 |
if (TYPED_ARRAY_TAGS[tag]) { |
| 12977 |
return areTypedArraysEqual2(a, b2, state); |
| 12978 |
} |
| 12979 |
if (tag === ARRAY_BUFFER_TAG) { |
| 12980 |
return areArrayBuffersEqual2(a, b2, state); |
| 12981 |
} |
| 12982 |
if (tag === DATA_VIEW_TAG) { |
| 12983 |
return areDataViewsEqual2(a, b2, state); |
| 12984 |
} |
| 12985 |
if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) { |
| 12986 |
return arePrimitiveWrappersEqual2(a, b2, state); |
| 12987 |
} |
| 12988 |
if (unknownTagComparators) { |
| 12989 |
let unknownTagComparator = unknownTagComparators[tag]; |
| 12990 |
if (!unknownTagComparator) { |
| 12991 |
const shortTag = getShortTag(a); |
| 12992 |
if (shortTag) { |
| 12993 |
unknownTagComparator = unknownTagComparators[shortTag]; |
| 12994 |
} |
| 12995 |
} |
| 12996 |
if (unknownTagComparator) { |
| 12997 |
return unknownTagComparator(a, b2, state); |
| 12998 |
} |
| 12999 |
} |
| 13000 |
return false; |
| 13001 |
}; |
| 13002 |
} |
| 13003 |
function createEqualityComparatorConfig({ circular, createCustomConfig, strict }) { |
| 13004 |
let config = { |
| 13005 |
areArrayBuffersEqual, |
| 13006 |
areArraysEqual: strict ? areObjectsEqualStrict : areArraysEqual, |
| 13007 |
areDataViewsEqual, |
| 13008 |
areDatesEqual, |
| 13009 |
areErrorsEqual, |
| 13010 |
areFunctionsEqual, |
| 13011 |
areMapsEqual: strict ? combineComparators(areMapsEqual, areObjectsEqualStrict) : areMapsEqual, |
| 13012 |
areNumbersEqual, |
| 13013 |
areObjectsEqual: strict ? areObjectsEqualStrict : areObjectsEqual, |
| 13014 |
arePrimitiveWrappersEqual, |
| 13015 |
areRegExpsEqual, |
| 13016 |
areSetsEqual: strict ? combineComparators(areSetsEqual, areObjectsEqualStrict) : areSetsEqual, |
| 13017 |
areTypedArraysEqual: strict ? combineComparators(areTypedArraysEqual, areObjectsEqualStrict) : areTypedArraysEqual, |
| 13018 |
areUrlsEqual, |
| 13019 |
unknownTagComparators: void 0 |
| 13020 |
}; |
| 13021 |
if (createCustomConfig) { |
| 13022 |
config = Object.assign({}, config, createCustomConfig(config)); |
| 13023 |
} |
| 13024 |
if (circular) { |
| 13025 |
const areArraysEqual2 = createIsCircular(config.areArraysEqual); |
| 13026 |
const areMapsEqual2 = createIsCircular(config.areMapsEqual); |
| 13027 |
const areObjectsEqual2 = createIsCircular(config.areObjectsEqual); |
| 13028 |
const areSetsEqual2 = createIsCircular(config.areSetsEqual); |
| 13029 |
config = Object.assign({}, config, { |
| 13030 |
areArraysEqual: areArraysEqual2, |
| 13031 |
areMapsEqual: areMapsEqual2, |
| 13032 |
areObjectsEqual: areObjectsEqual2, |
| 13033 |
areSetsEqual: areSetsEqual2 |
| 13034 |
}); |
| 13035 |
} |
| 13036 |
return config; |
| 13037 |
} |
| 13038 |
function createInternalEqualityComparator(compare) { |
| 13039 |
return function(a, b2, _indexOrKeyA, _indexOrKeyB, _parentA, _parentB, state) { |
| 13040 |
return compare(a, b2, state); |
| 13041 |
}; |
| 13042 |
} |
| 13043 |
function createIsEqual({ circular, comparator, createState, equals, strict }) { |
| 13044 |
if (createState) { |
| 13045 |
return function isEqual2(a, b2) { |
| 13046 |
const { cache = circular ? /* @__PURE__ */ new WeakMap() : void 0, meta } = createState(); |
| 13047 |
return comparator(a, b2, { |
| 13048 |
cache, |
| 13049 |
equals, |
| 13050 |
meta, |
| 13051 |
strict |
| 13052 |
}); |
| 13053 |
}; |
| 13054 |
} |
| 13055 |
if (circular) { |
| 13056 |
return function isEqual2(a, b2) { |
| 13057 |
return comparator(a, b2, { |
| 13058 |
cache: /* @__PURE__ */ new WeakMap(), |
| 13059 |
equals, |
| 13060 |
meta: void 0, |
| 13061 |
strict |
| 13062 |
}); |
| 13063 |
}; |
| 13064 |
} |
| 13065 |
const state = { |
| 13066 |
cache: void 0, |
| 13067 |
equals, |
| 13068 |
meta: void 0, |
| 13069 |
strict |
| 13070 |
}; |
| 13071 |
return function isEqual2(a, b2) { |
| 13072 |
return comparator(a, b2, state); |
| 13073 |
}; |
| 13074 |
} |
| 13075 |
const deepEqual = createCustomEqual(); |
| 13076 |
createCustomEqual({ strict: true }); |
| 13077 |
createCustomEqual({ circular: true }); |
| 13078 |
createCustomEqual({ |
| 13079 |
circular: true, |
| 13080 |
strict: true |
| 13081 |
}); |
| 13082 |
createCustomEqual({ |
| 13083 |
createInternalComparator: () => sameValueZeroEqual |
| 13084 |
}); |
| 13085 |
createCustomEqual({ |
| 13086 |
strict: true, |
| 13087 |
createInternalComparator: () => sameValueZeroEqual |
| 13088 |
}); |
| 13089 |
createCustomEqual({ |
| 13090 |
circular: true, |
| 13091 |
createInternalComparator: () => sameValueZeroEqual |
| 13092 |
}); |
| 13093 |
createCustomEqual({ |
| 13094 |
circular: true, |
| 13095 |
createInternalComparator: () => sameValueZeroEqual, |
| 13096 |
strict: true |
| 13097 |
}); |
| 13098 |
function createCustomEqual(options = {}) { |
| 13099 |
const { circular = false, createInternalComparator: createCustomInternalComparator, createState, strict = false } = options; |
| 13100 |
const config = createEqualityComparatorConfig(options); |
| 13101 |
const comparator = createEqualityComparator(config); |
| 13102 |
const equals = createCustomInternalComparator ? createCustomInternalComparator(comparator) : createInternalEqualityComparator(comparator); |
| 13103 |
return createIsEqual({ circular, comparator, createState, equals, strict }); |
| 13104 |
} |
| 13105 |
function safeRequestAnimationFrame(callback) { |
| 13106 |
if (typeof requestAnimationFrame !== "undefined") requestAnimationFrame(callback); |
| 13107 |
} |
| 13108 |
function setRafTimeout(callback) { |
| 13109 |
var timeout = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; |
| 13110 |
var currTime = -1; |
| 13111 |
var shouldUpdate = function shouldUpdate2(now) { |
| 13112 |
if (currTime < 0) { |
| 13113 |
currTime = now; |
| 13114 |
} |
| 13115 |
if (now - currTime > timeout) { |
| 13116 |
callback(now); |
| 13117 |
currTime = -1; |
| 13118 |
} else { |
| 13119 |
safeRequestAnimationFrame(shouldUpdate2); |
| 13120 |
} |
| 13121 |
}; |
| 13122 |
requestAnimationFrame(shouldUpdate); |
| 13123 |
} |
| 13124 |
function _typeof$3(o) { |
| 13125 |
"@babel/helpers - typeof"; |
| 13126 |
return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { |
| 13127 |
return typeof o2; |
| 13128 |
} : function(o2) { |
| 13129 |
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; |
| 13130 |
}, _typeof$3(o); |
| 13131 |
} |
| 13132 |
function _toArray(arr) { |
| 13133 |
return _arrayWithHoles$2(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$3(arr) || _nonIterableRest$2(); |
| 13134 |
} |
| 13135 |
function _nonIterableRest$2() { |
| 13136 |
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 13137 |
} |
| 13138 |
function _unsupportedIterableToArray$3(o, minLen) { |
| 13139 |
if (!o) return; |
| 13140 |
if (typeof o === "string") return _arrayLikeToArray$3(o, minLen); |
| 13141 |
var n2 = Object.prototype.toString.call(o).slice(8, -1); |
| 13142 |
if (n2 === "Object" && o.constructor) n2 = o.constructor.name; |
| 13143 |
if (n2 === "Map" || n2 === "Set") return Array.from(o); |
| 13144 |
if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$3(o, minLen); |
| 13145 |
} |
| 13146 |
function _arrayLikeToArray$3(arr, len) { |
| 13147 |
if (len == null || len > arr.length) len = arr.length; |
| 13148 |
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; |
| 13149 |
return arr2; |
| 13150 |
} |
| 13151 |
function _iterableToArray$3(iter) { |
| 13152 |
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); |
| 13153 |
} |
| 13154 |
function _arrayWithHoles$2(arr) { |
| 13155 |
if (Array.isArray(arr)) return arr; |
| 13156 |
} |
| 13157 |
function createAnimateManager() { |
| 13158 |
var currStyle = {}; |
| 13159 |
var handleChange = function handleChange2() { |
| 13160 |
return null; |
| 13161 |
}; |
| 13162 |
var shouldStop = false; |
| 13163 |
var setStyle = function setStyle2(_style) { |
| 13164 |
if (shouldStop) { |
| 13165 |
return; |
| 13166 |
} |
| 13167 |
if (Array.isArray(_style)) { |
| 13168 |
if (!_style.length) { |
| 13169 |
return; |
| 13170 |
} |
| 13171 |
var styles = _style; |
| 13172 |
var _styles = _toArray(styles), curr = _styles[0], restStyles = _styles.slice(1); |
| 13173 |
if (typeof curr === "number") { |
| 13174 |
setRafTimeout(setStyle2.bind(null, restStyles), curr); |
| 13175 |
return; |
| 13176 |
} |
| 13177 |
setStyle2(curr); |
| 13178 |
setRafTimeout(setStyle2.bind(null, restStyles)); |
| 13179 |
return; |
| 13180 |
} |
| 13181 |
if (_typeof$3(_style) === "object") { |
| 13182 |
currStyle = _style; |
| 13183 |
handleChange(currStyle); |
| 13184 |
} |
| 13185 |
if (typeof _style === "function") { |
| 13186 |
_style(); |
| 13187 |
} |
| 13188 |
}; |
| 13189 |
return { |
| 13190 |
stop: function stop() { |
| 13191 |
shouldStop = true; |
| 13192 |
}, |
| 13193 |
start: function start(style) { |
| 13194 |
shouldStop = false; |
| 13195 |
setStyle(style); |
| 13196 |
}, |
| 13197 |
subscribe: function subscribe(_handleChange) { |
| 13198 |
handleChange = _handleChange; |
| 13199 |
return function() { |
| 13200 |
handleChange = function handleChange2() { |
| 13201 |
return null; |
| 13202 |
}; |
| 13203 |
}; |
| 13204 |
} |
| 13205 |
}; |
| 13206 |
} |
| 13207 |
function _typeof$2(o) { |
| 13208 |
"@babel/helpers - typeof"; |
| 13209 |
return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { |
| 13210 |
return typeof o2; |
| 13211 |
} : function(o2) { |
| 13212 |
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; |
| 13213 |
}, _typeof$2(o); |
| 13214 |
} |
| 13215 |
function ownKeys$2(e2, r2) { |
| 13216 |
var t2 = Object.keys(e2); |
| 13217 |
if (Object.getOwnPropertySymbols) { |
| 13218 |
var o = Object.getOwnPropertySymbols(e2); |
| 13219 |
r2 && (o = o.filter(function(r22) { |
| 13220 |
return Object.getOwnPropertyDescriptor(e2, r22).enumerable; |
| 13221 |
})), t2.push.apply(t2, o); |
| 13222 |
} |
| 13223 |
return t2; |
| 13224 |
} |
| 13225 |
function _objectSpread$2(e2) { |
| 13226 |
for (var r2 = 1; r2 < arguments.length; r2++) { |
| 13227 |
var t2 = null != arguments[r2] ? arguments[r2] : {}; |
| 13228 |
r2 % 2 ? ownKeys$2(Object(t2), true).forEach(function(r22) { |
| 13229 |
_defineProperty$2(e2, r22, t2[r22]); |
| 13230 |
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$2(Object(t2)).forEach(function(r22) { |
| 13231 |
Object.defineProperty(e2, r22, Object.getOwnPropertyDescriptor(t2, r22)); |
| 13232 |
}); |
| 13233 |
} |
| 13234 |
return e2; |
| 13235 |
} |
| 13236 |
function _defineProperty$2(obj, key, value) { |
| 13237 |
key = _toPropertyKey$2(key); |
| 13238 |
if (key in obj) { |
| 13239 |
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); |
| 13240 |
} else { |
| 13241 |
obj[key] = value; |
| 13242 |
} |
| 13243 |
return obj; |
| 13244 |
} |
| 13245 |
function _toPropertyKey$2(arg) { |
| 13246 |
var key = _toPrimitive$2(arg, "string"); |
| 13247 |
return _typeof$2(key) === "symbol" ? key : String(key); |
| 13248 |
} |
| 13249 |
function _toPrimitive$2(input, hint) { |
| 13250 |
if (_typeof$2(input) !== "object" || input === null) return input; |
| 13251 |
var prim = input[Symbol.toPrimitive]; |
| 13252 |
if (prim !== void 0) { |
| 13253 |
var res = prim.call(input, hint); |
| 13254 |
if (_typeof$2(res) !== "object") return res; |
| 13255 |
throw new TypeError("@@toPrimitive must return a primitive value."); |
| 13256 |
} |
| 13257 |
return (hint === "string" ? String : Number)(input); |
| 13258 |
} |
| 13259 |
var getIntersectionKeys = function getIntersectionKeys2(preObj, nextObj) { |
| 13260 |
return [Object.keys(preObj), Object.keys(nextObj)].reduce(function(a, b2) { |
| 13261 |
return a.filter(function(c2) { |
| 13262 |
return b2.includes(c2); |
| 13263 |
}); |
| 13264 |
}); |
| 13265 |
}; |
| 13266 |
var identity = function identity2(param) { |
| 13267 |
return param; |
| 13268 |
}; |
| 13269 |
var getDashCase = function getDashCase2(name) { |
| 13270 |
return name.replace(/([A-Z])/g, function(v2) { |
| 13271 |
return "-".concat(v2.toLowerCase()); |
| 13272 |
}); |
| 13273 |
}; |
| 13274 |
var mapObject = function mapObject2(fn, obj) { |
| 13275 |
return Object.keys(obj).reduce(function(res, key) { |
| 13276 |
return _objectSpread$2(_objectSpread$2({}, res), {}, _defineProperty$2({}, key, fn(key, obj[key]))); |
| 13277 |
}, {}); |
| 13278 |
}; |
| 13279 |
var getTransitionVal = function getTransitionVal2(props, duration, easing) { |
| 13280 |
return props.map(function(prop) { |
| 13281 |
return "".concat(getDashCase(prop), " ").concat(duration, "ms ").concat(easing); |
| 13282 |
}).join(","); |
| 13283 |
}; |
| 13284 |
function _slicedToArray$1(arr, i) { |
| 13285 |
return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$2(arr, i) || _nonIterableRest$1(); |
| 13286 |
} |
| 13287 |
function _nonIterableRest$1() { |
| 13288 |
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 13289 |
} |
| 13290 |
function _iterableToArrayLimit$1(r2, l2) { |
| 13291 |
var t2 = null == r2 ? null : "undefined" != typeof Symbol && r2[Symbol.iterator] || r2["@@iterator"]; |
| 13292 |
if (null != t2) { |
| 13293 |
var e2, n2, i, u2, a = [], f2 = true, o = false; |
| 13294 |
try { |
| 13295 |
if (i = (t2 = t2.call(r2)).next, 0 === l2) ; |
| 13296 |
else for (; !(f2 = (e2 = i.call(t2)).done) && (a.push(e2.value), a.length !== l2); f2 = true) ; |
| 13297 |
} catch (r3) { |
| 13298 |
o = true, n2 = r3; |
| 13299 |
} finally { |
| 13300 |
try { |
| 13301 |
if (!f2 && null != t2.return && (u2 = t2.return(), Object(u2) !== u2)) return; |
| 13302 |
} finally { |
| 13303 |
if (o) throw n2; |
| 13304 |
} |
| 13305 |
} |
| 13306 |
return a; |
| 13307 |
} |
| 13308 |
} |
| 13309 |
function _arrayWithHoles$1(arr) { |
| 13310 |
if (Array.isArray(arr)) return arr; |
| 13311 |
} |
| 13312 |
function _toConsumableArray$2(arr) { |
| 13313 |
return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$2(arr) || _nonIterableSpread$2(); |
| 13314 |
} |
| 13315 |
function _nonIterableSpread$2() { |
| 13316 |
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 13317 |
} |
| 13318 |
function _unsupportedIterableToArray$2(o, minLen) { |
| 13319 |
if (!o) return; |
| 13320 |
if (typeof o === "string") return _arrayLikeToArray$2(o, minLen); |
| 13321 |
var n2 = Object.prototype.toString.call(o).slice(8, -1); |
| 13322 |
if (n2 === "Object" && o.constructor) n2 = o.constructor.name; |
| 13323 |
if (n2 === "Map" || n2 === "Set") return Array.from(o); |
| 13324 |
if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$2(o, minLen); |
| 13325 |
} |
| 13326 |
function _iterableToArray$2(iter) { |
| 13327 |
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); |
| 13328 |
} |
| 13329 |
function _arrayWithoutHoles$2(arr) { |
| 13330 |
if (Array.isArray(arr)) return _arrayLikeToArray$2(arr); |
| 13331 |
} |
| 13332 |
function _arrayLikeToArray$2(arr, len) { |
| 13333 |
if (len == null || len > arr.length) len = arr.length; |
| 13334 |
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; |
| 13335 |
return arr2; |
| 13336 |
} |
| 13337 |
var ACCURACY = 1e-4; |
| 13338 |
var cubicBezierFactor = function cubicBezierFactor2(c1, c2) { |
| 13339 |
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1]; |
| 13340 |
}; |
| 13341 |
var multyTime = function multyTime2(params, t2) { |
| 13342 |
return params.map(function(param, i) { |
| 13343 |
return param * Math.pow(t2, i); |
| 13344 |
}).reduce(function(pre, curr) { |
| 13345 |
return pre + curr; |
| 13346 |
}); |
| 13347 |
}; |
| 13348 |
var cubicBezier = function cubicBezier2(c1, c2) { |
| 13349 |
return function(t2) { |
| 13350 |
var params = cubicBezierFactor(c1, c2); |
| 13351 |
return multyTime(params, t2); |
| 13352 |
}; |
| 13353 |
}; |
| 13354 |
var derivativeCubicBezier = function derivativeCubicBezier2(c1, c2) { |
| 13355 |
return function(t2) { |
| 13356 |
var params = cubicBezierFactor(c1, c2); |
| 13357 |
var newParams = [].concat(_toConsumableArray$2(params.map(function(param, i) { |
| 13358 |
return param * i; |
| 13359 |
}).slice(1)), [0]); |
| 13360 |
return multyTime(newParams, t2); |
| 13361 |
}; |
| 13362 |
}; |
| 13363 |
var configBezier = function configBezier2() { |
| 13364 |
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| 13365 |
args[_key] = arguments[_key]; |
| 13366 |
} |
| 13367 |
var x1 = args[0], y1 = args[1], x2 = args[2], y2 = args[3]; |
| 13368 |
if (args.length === 1) { |
| 13369 |
switch (args[0]) { |
| 13370 |
case "linear": |
| 13371 |
x1 = 0; |
| 13372 |
y1 = 0; |
| 13373 |
x2 = 1; |
| 13374 |
y2 = 1; |
| 13375 |
break; |
| 13376 |
case "ease": |
| 13377 |
x1 = 0.25; |
| 13378 |
y1 = 0.1; |
| 13379 |
x2 = 0.25; |
| 13380 |
y2 = 1; |
| 13381 |
break; |
| 13382 |
case "ease-in": |
| 13383 |
x1 = 0.42; |
| 13384 |
y1 = 0; |
| 13385 |
x2 = 1; |
| 13386 |
y2 = 1; |
| 13387 |
break; |
| 13388 |
case "ease-out": |
| 13389 |
x1 = 0.42; |
| 13390 |
y1 = 0; |
| 13391 |
x2 = 0.58; |
| 13392 |
y2 = 1; |
| 13393 |
break; |
| 13394 |
case "ease-in-out": |
| 13395 |
x1 = 0; |
| 13396 |
y1 = 0; |
| 13397 |
x2 = 0.58; |
| 13398 |
y2 = 1; |
| 13399 |
break; |
| 13400 |
default: { |
| 13401 |
var easing = args[0].split("("); |
| 13402 |
if (easing[0] === "cubic-bezier" && easing[1].split(")")[0].split(",").length === 4) { |
| 13403 |
var _easing$1$split$0$spl = easing[1].split(")")[0].split(",").map(function(x3) { |
| 13404 |
return parseFloat(x3); |
| 13405 |
}); |
| 13406 |
var _easing$1$split$0$spl2 = _slicedToArray$1(_easing$1$split$0$spl, 4); |
| 13407 |
x1 = _easing$1$split$0$spl2[0]; |
| 13408 |
y1 = _easing$1$split$0$spl2[1]; |
| 13409 |
x2 = _easing$1$split$0$spl2[2]; |
| 13410 |
y2 = _easing$1$split$0$spl2[3]; |
| 13411 |
} |
| 13412 |
} |
| 13413 |
} |
| 13414 |
} |
| 13415 |
var curveX = cubicBezier(x1, x2); |
| 13416 |
var curveY = cubicBezier(y1, y2); |
| 13417 |
var derCurveX = derivativeCubicBezier(x1, x2); |
| 13418 |
var rangeValue = function rangeValue2(value) { |
| 13419 |
if (value > 1) { |
| 13420 |
return 1; |
| 13421 |
} |
| 13422 |
if (value < 0) { |
| 13423 |
return 0; |
| 13424 |
} |
| 13425 |
return value; |
| 13426 |
}; |
| 13427 |
var bezier = function bezier2(_t) { |
| 13428 |
var t2 = _t > 1 ? 1 : _t; |
| 13429 |
var x3 = t2; |
| 13430 |
for (var i = 0; i < 8; ++i) { |
| 13431 |
var evalT = curveX(x3) - t2; |
| 13432 |
var derVal = derCurveX(x3); |
| 13433 |
if (Math.abs(evalT - t2) < ACCURACY || derVal < ACCURACY) { |
| 13434 |
return curveY(x3); |
| 13435 |
} |
| 13436 |
x3 = rangeValue(x3 - evalT / derVal); |
| 13437 |
} |
| 13438 |
return curveY(x3); |
| 13439 |
}; |
| 13440 |
bezier.isStepper = false; |
| 13441 |
return bezier; |
| 13442 |
}; |
| 13443 |
var configSpring = function configSpring2() { |
| 13444 |
var config = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; |
| 13445 |
var _config$stiff = config.stiff, stiff = _config$stiff === void 0 ? 100 : _config$stiff, _config$damping = config.damping, damping = _config$damping === void 0 ? 8 : _config$damping, _config$dt = config.dt, dt = _config$dt === void 0 ? 17 : _config$dt; |
| 13446 |
var stepper = function stepper2(currX, destX, currV) { |
| 13447 |
var FSpring = -(currX - destX) * stiff; |
| 13448 |
var FDamping = currV * damping; |
| 13449 |
var newV = currV + (FSpring - FDamping) * dt / 1e3; |
| 13450 |
var newX = currV * dt / 1e3 + currX; |
| 13451 |
if (Math.abs(newX - destX) < ACCURACY && Math.abs(newV) < ACCURACY) { |
| 13452 |
return [destX, 0]; |
| 13453 |
} |
| 13454 |
return [newX, newV]; |
| 13455 |
}; |
| 13456 |
stepper.isStepper = true; |
| 13457 |
stepper.dt = dt; |
| 13458 |
return stepper; |
| 13459 |
}; |
| 13460 |
var configEasing = function configEasing2() { |
| 13461 |
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { |
| 13462 |
args[_key2] = arguments[_key2]; |
| 13463 |
} |
| 13464 |
var easing = args[0]; |
| 13465 |
if (typeof easing === "string") { |
| 13466 |
switch (easing) { |
| 13467 |
case "ease": |
| 13468 |
case "ease-in-out": |
| 13469 |
case "ease-out": |
| 13470 |
case "ease-in": |
| 13471 |
case "linear": |
| 13472 |
return configBezier(easing); |
| 13473 |
case "spring": |
| 13474 |
return configSpring(); |
| 13475 |
default: |
| 13476 |
if (easing.split("(")[0] === "cubic-bezier") { |
| 13477 |
return configBezier(easing); |
| 13478 |
} |
| 13479 |
} |
| 13480 |
} |
| 13481 |
if (typeof easing === "function") { |
| 13482 |
return easing; |
| 13483 |
} |
| 13484 |
return null; |
| 13485 |
}; |
| 13486 |
function _typeof$1(o) { |
| 13487 |
"@babel/helpers - typeof"; |
| 13488 |
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { |
| 13489 |
return typeof o2; |
| 13490 |
} : function(o2) { |
| 13491 |
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; |
| 13492 |
}, _typeof$1(o); |
| 13493 |
} |
| 13494 |
function _toConsumableArray$1(arr) { |
| 13495 |
return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread$1(); |
| 13496 |
} |
| 13497 |
function _nonIterableSpread$1() { |
| 13498 |
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 13499 |
} |
| 13500 |
function _iterableToArray$1(iter) { |
| 13501 |
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); |
| 13502 |
} |
| 13503 |
function _arrayWithoutHoles$1(arr) { |
| 13504 |
if (Array.isArray(arr)) return _arrayLikeToArray$1(arr); |
| 13505 |
} |
| 13506 |
function ownKeys$1(e2, r2) { |
| 13507 |
var t2 = Object.keys(e2); |
| 13508 |
if (Object.getOwnPropertySymbols) { |
| 13509 |
var o = Object.getOwnPropertySymbols(e2); |
| 13510 |
r2 && (o = o.filter(function(r3) { |
| 13511 |
return Object.getOwnPropertyDescriptor(e2, r3).enumerable; |
| 13512 |
})), t2.push.apply(t2, o); |
| 13513 |
} |
| 13514 |
return t2; |
| 13515 |
} |
| 13516 |
function _objectSpread$1(e2) { |
| 13517 |
for (var r2 = 1; r2 < arguments.length; r2++) { |
| 13518 |
var t2 = null != arguments[r2] ? arguments[r2] : {}; |
| 13519 |
r2 % 2 ? ownKeys$1(Object(t2), true).forEach(function(r3) { |
| 13520 |
_defineProperty$1(e2, r3, t2[r3]); |
| 13521 |
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$1(Object(t2)).forEach(function(r3) { |
| 13522 |
Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3)); |
| 13523 |
}); |
| 13524 |
} |
| 13525 |
return e2; |
| 13526 |
} |
| 13527 |
function _defineProperty$1(obj, key, value) { |
| 13528 |
key = _toPropertyKey$1(key); |
| 13529 |
if (key in obj) { |
| 13530 |
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); |
| 13531 |
} else { |
| 13532 |
obj[key] = value; |
| 13533 |
} |
| 13534 |
return obj; |
| 13535 |
} |
| 13536 |
function _toPropertyKey$1(arg) { |
| 13537 |
var key = _toPrimitive$1(arg, "string"); |
| 13538 |
return _typeof$1(key) === "symbol" ? key : String(key); |
| 13539 |
} |
| 13540 |
function _toPrimitive$1(input, hint) { |
| 13541 |
if (_typeof$1(input) !== "object" || input === null) return input; |
| 13542 |
var prim = input[Symbol.toPrimitive]; |
| 13543 |
if (prim !== void 0) { |
| 13544 |
var res = prim.call(input, hint); |
| 13545 |
if (_typeof$1(res) !== "object") return res; |
| 13546 |
throw new TypeError("@@toPrimitive must return a primitive value."); |
| 13547 |
} |
| 13548 |
return (hint === "string" ? String : Number)(input); |
| 13549 |
} |
| 13550 |
function _slicedToArray(arr, i) { |
| 13551 |
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest(); |
| 13552 |
} |
| 13553 |
function _nonIterableRest() { |
| 13554 |
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 13555 |
} |
| 13556 |
function _unsupportedIterableToArray$1(o, minLen) { |
| 13557 |
if (!o) return; |
| 13558 |
if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); |
| 13559 |
var n2 = Object.prototype.toString.call(o).slice(8, -1); |
| 13560 |
if (n2 === "Object" && o.constructor) n2 = o.constructor.name; |
| 13561 |
if (n2 === "Map" || n2 === "Set") return Array.from(o); |
| 13562 |
if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$1(o, minLen); |
| 13563 |
} |
| 13564 |
function _arrayLikeToArray$1(arr, len) { |
| 13565 |
if (len == null || len > arr.length) len = arr.length; |
| 13566 |
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; |
| 13567 |
return arr2; |
| 13568 |
} |
| 13569 |
function _iterableToArrayLimit(r2, l2) { |
| 13570 |
var t2 = null == r2 ? null : "undefined" != typeof Symbol && r2[Symbol.iterator] || r2["@@iterator"]; |
| 13571 |
if (null != t2) { |
| 13572 |
var e2, n2, i, u2, a = [], f2 = true, o = false; |
| 13573 |
try { |
| 13574 |
if (i = (t2 = t2.call(r2)).next, 0 === l2) ; |
| 13575 |
else for (; !(f2 = (e2 = i.call(t2)).done) && (a.push(e2.value), a.length !== l2); f2 = true) ; |
| 13576 |
} catch (r3) { |
| 13577 |
o = true, n2 = r3; |
| 13578 |
} finally { |
| 13579 |
try { |
| 13580 |
if (!f2 && null != t2.return && (u2 = t2.return(), Object(u2) !== u2)) return; |
| 13581 |
} finally { |
| 13582 |
if (o) throw n2; |
| 13583 |
} |
| 13584 |
} |
| 13585 |
return a; |
| 13586 |
} |
| 13587 |
} |
| 13588 |
function _arrayWithHoles(arr) { |
| 13589 |
if (Array.isArray(arr)) return arr; |
| 13590 |
} |
| 13591 |
var alpha = function alpha2(begin, end, k2) { |
| 13592 |
return begin + (end - begin) * k2; |
| 13593 |
}; |
| 13594 |
var needContinue = function needContinue2(_ref) { |
| 13595 |
var from = _ref.from, to = _ref.to; |
| 13596 |
return from !== to; |
| 13597 |
}; |
| 13598 |
var calStepperVals = function calStepperVals2(easing, preVals, steps) { |
| 13599 |
var nextStepVals = mapObject(function(key, val) { |
| 13600 |
if (needContinue(val)) { |
| 13601 |
var _easing = easing(val.from, val.to, val.velocity), _easing2 = _slicedToArray(_easing, 2), newX = _easing2[0], newV = _easing2[1]; |
| 13602 |
return _objectSpread$1(_objectSpread$1({}, val), {}, { |
| 13603 |
from: newX, |
| 13604 |
velocity: newV |
| 13605 |
}); |
| 13606 |
} |
| 13607 |
return val; |
| 13608 |
}, preVals); |
| 13609 |
if (steps < 1) { |
| 13610 |
return mapObject(function(key, val) { |
| 13611 |
if (needContinue(val)) { |
| 13612 |
return _objectSpread$1(_objectSpread$1({}, val), {}, { |
| 13613 |
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps), |
| 13614 |
from: alpha(val.from, nextStepVals[key].from, steps) |
| 13615 |
}); |
| 13616 |
} |
| 13617 |
return val; |
| 13618 |
}, preVals); |
| 13619 |
} |
| 13620 |
return calStepperVals2(easing, nextStepVals, steps - 1); |
| 13621 |
}; |
| 13622 |
const configUpdate = function(from, to, easing, duration, render) { |
| 13623 |
var interKeys = getIntersectionKeys(from, to); |
| 13624 |
var timingStyle = interKeys.reduce(function(res, key) { |
| 13625 |
return _objectSpread$1(_objectSpread$1({}, res), {}, _defineProperty$1({}, key, [from[key], to[key]])); |
| 13626 |
}, {}); |
| 13627 |
var stepperStyle = interKeys.reduce(function(res, key) { |
| 13628 |
return _objectSpread$1(_objectSpread$1({}, res), {}, _defineProperty$1({}, key, { |
| 13629 |
from: from[key], |
| 13630 |
velocity: 0, |
| 13631 |
to: to[key] |
| 13632 |
})); |
| 13633 |
}, {}); |
| 13634 |
var cafId = -1; |
| 13635 |
var preTime; |
| 13636 |
var beginTime; |
| 13637 |
var update = function update2() { |
| 13638 |
return null; |
| 13639 |
}; |
| 13640 |
var getCurrStyle = function getCurrStyle2() { |
| 13641 |
return mapObject(function(key, val) { |
| 13642 |
return val.from; |
| 13643 |
}, stepperStyle); |
| 13644 |
}; |
| 13645 |
var shouldStopAnimation = function shouldStopAnimation2() { |
| 13646 |
return !Object.values(stepperStyle).filter(needContinue).length; |
| 13647 |
}; |
| 13648 |
var stepperUpdate = function stepperUpdate2(now) { |
| 13649 |
if (!preTime) { |
| 13650 |
preTime = now; |
| 13651 |
} |
| 13652 |
var deltaTime = now - preTime; |
| 13653 |
var steps = deltaTime / easing.dt; |
| 13654 |
stepperStyle = calStepperVals(easing, stepperStyle, steps); |
| 13655 |
render(_objectSpread$1(_objectSpread$1(_objectSpread$1({}, from), to), getCurrStyle())); |
| 13656 |
preTime = now; |
| 13657 |
if (!shouldStopAnimation()) { |
| 13658 |
cafId = requestAnimationFrame(update); |
| 13659 |
} |
| 13660 |
}; |
| 13661 |
var timingUpdate = function timingUpdate2(now) { |
| 13662 |
if (!beginTime) { |
| 13663 |
beginTime = now; |
| 13664 |
} |
| 13665 |
var t2 = (now - beginTime) / duration; |
| 13666 |
var currStyle = mapObject(function(key, val) { |
| 13667 |
return alpha.apply(void 0, _toConsumableArray$1(val).concat([easing(t2)])); |
| 13668 |
}, timingStyle); |
| 13669 |
render(_objectSpread$1(_objectSpread$1(_objectSpread$1({}, from), to), currStyle)); |
| 13670 |
if (t2 < 1) { |
| 13671 |
cafId = requestAnimationFrame(update); |
| 13672 |
} else { |
| 13673 |
var finalStyle = mapObject(function(key, val) { |
| 13674 |
return alpha.apply(void 0, _toConsumableArray$1(val).concat([easing(1)])); |
| 13675 |
}, timingStyle); |
| 13676 |
render(_objectSpread$1(_objectSpread$1(_objectSpread$1({}, from), to), finalStyle)); |
| 13677 |
} |
| 13678 |
}; |
| 13679 |
update = easing.isStepper ? stepperUpdate : timingUpdate; |
| 13680 |
return function() { |
| 13681 |
requestAnimationFrame(update); |
| 13682 |
return function() { |
| 13683 |
cancelAnimationFrame(cafId); |
| 13684 |
}; |
| 13685 |
}; |
| 13686 |
}; |
| 13687 |
function _typeof(o) { |
| 13688 |
"@babel/helpers - typeof"; |
| 13689 |
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { |
| 13690 |
return typeof o2; |
| 13691 |
} : function(o2) { |
| 13692 |
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; |
| 13693 |
}, _typeof(o); |
| 13694 |
} |
| 13695 |
var _excluded = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"]; |
| 13696 |
function _objectWithoutProperties(source, excluded) { |
| 13697 |
if (source == null) return {}; |
| 13698 |
var target = _objectWithoutPropertiesLoose(source, excluded); |
| 13699 |
var key, i; |
| 13700 |
if (Object.getOwnPropertySymbols) { |
| 13701 |
var sourceSymbolKeys = Object.getOwnPropertySymbols(source); |
| 13702 |
for (i = 0; i < sourceSymbolKeys.length; i++) { |
| 13703 |
key = sourceSymbolKeys[i]; |
| 13704 |
if (excluded.indexOf(key) >= 0) continue; |
| 13705 |
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; |
| 13706 |
target[key] = source[key]; |
| 13707 |
} |
| 13708 |
} |
| 13709 |
return target; |
| 13710 |
} |
| 13711 |
function _objectWithoutPropertiesLoose(source, excluded) { |
| 13712 |
if (source == null) return {}; |
| 13713 |
var target = {}; |
| 13714 |
var sourceKeys = Object.keys(source); |
| 13715 |
var key, i; |
| 13716 |
for (i = 0; i < sourceKeys.length; i++) { |
| 13717 |
key = sourceKeys[i]; |
| 13718 |
if (excluded.indexOf(key) >= 0) continue; |
| 13719 |
target[key] = source[key]; |
| 13720 |
} |
| 13721 |
return target; |
| 13722 |
} |
| 13723 |
function _toConsumableArray(arr) { |
| 13724 |
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); |
| 13725 |
} |
| 13726 |
function _nonIterableSpread() { |
| 13727 |
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 13728 |
} |
| 13729 |
function _unsupportedIterableToArray(o, minLen) { |
| 13730 |
if (!o) return; |
| 13731 |
if (typeof o === "string") return _arrayLikeToArray(o, minLen); |
| 13732 |
var n2 = Object.prototype.toString.call(o).slice(8, -1); |
| 13733 |
if (n2 === "Object" && o.constructor) n2 = o.constructor.name; |
| 13734 |
if (n2 === "Map" || n2 === "Set") return Array.from(o); |
| 13735 |
if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray(o, minLen); |
| 13736 |
} |
| 13737 |
function _iterableToArray(iter) { |
| 13738 |
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); |
| 13739 |
} |
| 13740 |
function _arrayWithoutHoles(arr) { |
| 13741 |
if (Array.isArray(arr)) return _arrayLikeToArray(arr); |
| 13742 |
} |
| 13743 |
function _arrayLikeToArray(arr, len) { |
| 13744 |
if (len == null || len > arr.length) len = arr.length; |
| 13745 |
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; |
| 13746 |
return arr2; |
| 13747 |
} |
| 13748 |
function ownKeys(e2, r2) { |
| 13749 |
var t2 = Object.keys(e2); |
| 13750 |
if (Object.getOwnPropertySymbols) { |
| 13751 |
var o = Object.getOwnPropertySymbols(e2); |
| 13752 |
r2 && (o = o.filter(function(r3) { |
| 13753 |
return Object.getOwnPropertyDescriptor(e2, r3).enumerable; |
| 13754 |
})), t2.push.apply(t2, o); |
| 13755 |
} |
| 13756 |
return t2; |
| 13757 |
} |
| 13758 |
function _objectSpread(e2) { |
| 13759 |
for (var r2 = 1; r2 < arguments.length; r2++) { |
| 13760 |
var t2 = null != arguments[r2] ? arguments[r2] : {}; |
| 13761 |
r2 % 2 ? ownKeys(Object(t2), true).forEach(function(r3) { |
| 13762 |
_defineProperty(e2, r3, t2[r3]); |
| 13763 |
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys(Object(t2)).forEach(function(r3) { |
| 13764 |
Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3)); |
| 13765 |
}); |
| 13766 |
} |
| 13767 |
return e2; |
| 13768 |
} |
| 13769 |
function _defineProperty(obj, key, value) { |
| 13770 |
key = _toPropertyKey(key); |
| 13771 |
if (key in obj) { |
| 13772 |
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); |
| 13773 |
} else { |
| 13774 |
obj[key] = value; |
| 13775 |
} |
| 13776 |
return obj; |
| 13777 |
} |
| 13778 |
function _classCallCheck(instance, Constructor) { |
| 13779 |
if (!(instance instanceof Constructor)) { |
| 13780 |
throw new TypeError("Cannot call a class as a function"); |
| 13781 |
} |
| 13782 |
} |
| 13783 |
function _defineProperties(target, props) { |
| 13784 |
for (var i = 0; i < props.length; i++) { |
| 13785 |
var descriptor = props[i]; |
| 13786 |
descriptor.enumerable = descriptor.enumerable || false; |
| 13787 |
descriptor.configurable = true; |
| 13788 |
if ("value" in descriptor) descriptor.writable = true; |
| 13789 |
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); |
| 13790 |
} |
| 13791 |
} |
| 13792 |
function _createClass(Constructor, protoProps, staticProps) { |
| 13793 |
if (protoProps) _defineProperties(Constructor.prototype, protoProps); |
| 13794 |
Object.defineProperty(Constructor, "prototype", { writable: false }); |
| 13795 |
return Constructor; |
| 13796 |
} |
| 13797 |
function _toPropertyKey(arg) { |
| 13798 |
var key = _toPrimitive(arg, "string"); |
| 13799 |
return _typeof(key) === "symbol" ? key : String(key); |
| 13800 |
} |
| 13801 |
function _toPrimitive(input, hint) { |
| 13802 |
if (_typeof(input) !== "object" || input === null) return input; |
| 13803 |
var prim = input[Symbol.toPrimitive]; |
| 13804 |
if (prim !== void 0) { |
| 13805 |
var res = prim.call(input, hint); |
| 13806 |
if (_typeof(res) !== "object") return res; |
| 13807 |
throw new TypeError("@@toPrimitive must return a primitive value."); |
| 13808 |
} |
| 13809 |
return (hint === "string" ? String : Number)(input); |
| 13810 |
} |
| 13811 |
function _inherits(subClass, superClass) { |
| 13812 |
if (typeof superClass !== "function" && superClass !== null) { |
| 13813 |
throw new TypeError("Super expression must either be null or a function"); |
| 13814 |
} |
| 13815 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); |
| 13816 |
Object.defineProperty(subClass, "prototype", { writable: false }); |
| 13817 |
if (superClass) _setPrototypeOf(subClass, superClass); |
| 13818 |
} |
| 13819 |
function _setPrototypeOf(o, p2) { |
| 13820 |
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p3) { |
| 13821 |
o2.__proto__ = p3; |
| 13822 |
return o2; |
| 13823 |
}; |
| 13824 |
return _setPrototypeOf(o, p2); |
| 13825 |
} |
| 13826 |
function _createSuper(Derived) { |
| 13827 |
var hasNativeReflectConstruct = _isNativeReflectConstruct(); |
| 13828 |
return function _createSuperInternal() { |
| 13829 |
var Super = _getPrototypeOf(Derived), result; |
| 13830 |
if (hasNativeReflectConstruct) { |
| 13831 |
var NewTarget = _getPrototypeOf(this).constructor; |
| 13832 |
result = Reflect.construct(Super, arguments, NewTarget); |
| 13833 |
} else { |
| 13834 |
result = Super.apply(this, arguments); |
| 13835 |
} |
| 13836 |
return _possibleConstructorReturn(this, result); |
| 13837 |
}; |
| 13838 |
} |
| 13839 |
function _possibleConstructorReturn(self2, call) { |
| 13840 |
if (call && (_typeof(call) === "object" || typeof call === "function")) { |
| 13841 |
return call; |
| 13842 |
} else if (call !== void 0) { |
| 13843 |
throw new TypeError("Derived constructors may only return object or undefined"); |
| 13844 |
} |
| 13845 |
return _assertThisInitialized(self2); |
| 13846 |
} |
| 13847 |
function _assertThisInitialized(self2) { |
| 13848 |
if (self2 === void 0) { |
| 13849 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 13850 |
} |
| 13851 |
return self2; |
| 13852 |
} |
| 13853 |
function _isNativeReflectConstruct() { |
| 13854 |
if (typeof Reflect === "undefined" || !Reflect.construct) return false; |
| 13855 |
if (Reflect.construct.sham) return false; |
| 13856 |
if (typeof Proxy === "function") return true; |
| 13857 |
try { |
| 13858 |
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { |
| 13859 |
})); |
| 13860 |
return true; |
| 13861 |
} catch (e2) { |
| 13862 |
return false; |
| 13863 |
} |
| 13864 |
} |
| 13865 |
function _getPrototypeOf(o) { |
| 13866 |
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) { |
| 13867 |
return o2.__proto__ || Object.getPrototypeOf(o2); |
| 13868 |
}; |
| 13869 |
return _getPrototypeOf(o); |
| 13870 |
} |
| 13871 |
var Animate = /* @__PURE__ */ function(_PureComponent) { |
| 13872 |
_inherits(Animate2, _PureComponent); |
| 13873 |
var _super = _createSuper(Animate2); |
| 13874 |
function Animate2(props, context) { |
| 13875 |
var _this; |
| 13876 |
_classCallCheck(this, Animate2); |
| 13877 |
_this = _super.call(this, props, context); |
| 13878 |
var _this$props = _this.props, isActive = _this$props.isActive, attributeName = _this$props.attributeName, from = _this$props.from, to = _this$props.to, steps = _this$props.steps, children = _this$props.children, duration = _this$props.duration; |
| 13879 |
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized(_this)); |
| 13880 |
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized(_this)); |
| 13881 |
if (!isActive || duration <= 0) { |
| 13882 |
_this.state = { |
| 13883 |
style: {} |
| 13884 |
}; |
| 13885 |
if (typeof children === "function") { |
| 13886 |
_this.state = { |
| 13887 |
style: to |
| 13888 |
}; |
| 13889 |
} |
| 13890 |
return _possibleConstructorReturn(_this); |
| 13891 |
} |
| 13892 |
if (steps && steps.length) { |
| 13893 |
_this.state = { |
| 13894 |
style: steps[0].style |
| 13895 |
}; |
| 13896 |
} else if (from) { |
| 13897 |
if (typeof children === "function") { |
| 13898 |
_this.state = { |
| 13899 |
style: from |
| 13900 |
}; |
| 13901 |
return _possibleConstructorReturn(_this); |
| 13902 |
} |
| 13903 |
_this.state = { |
| 13904 |
style: attributeName ? _defineProperty({}, attributeName, from) : from |
| 13905 |
}; |
| 13906 |
} else { |
| 13907 |
_this.state = { |
| 13908 |
style: {} |
| 13909 |
}; |
| 13910 |
} |
| 13911 |
return _this; |
| 13912 |
} |
| 13913 |
_createClass(Animate2, [{ |
| 13914 |
key: "componentDidMount", |
| 13915 |
value: function componentDidMount() { |
| 13916 |
var _this$props2 = this.props, isActive = _this$props2.isActive, canBegin = _this$props2.canBegin; |
| 13917 |
this.mounted = true; |
| 13918 |
if (!isActive || !canBegin) { |
| 13919 |
return; |
| 13920 |
} |
| 13921 |
this.runAnimation(this.props); |
| 13922 |
} |
| 13923 |
}, { |
| 13924 |
key: "componentDidUpdate", |
| 13925 |
value: function componentDidUpdate(prevProps) { |
| 13926 |
var _this$props3 = this.props, isActive = _this$props3.isActive, canBegin = _this$props3.canBegin, attributeName = _this$props3.attributeName, shouldReAnimate = _this$props3.shouldReAnimate, to = _this$props3.to, currentFrom = _this$props3.from; |
| 13927 |
var style = this.state.style; |
| 13928 |
if (!canBegin) { |
| 13929 |
return; |
| 13930 |
} |
| 13931 |
if (!isActive) { |
| 13932 |
var newState = { |
| 13933 |
style: attributeName ? _defineProperty({}, attributeName, to) : to |
| 13934 |
}; |
| 13935 |
if (this.state && style) { |
| 13936 |
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) { |
| 13937 |
this.setState(newState); |
| 13938 |
} |
| 13939 |
} |
| 13940 |
return; |
| 13941 |
} |
| 13942 |
if (deepEqual(prevProps.to, to) && prevProps.canBegin && prevProps.isActive) { |
| 13943 |
return; |
| 13944 |
} |
| 13945 |
var isTriggered = !prevProps.canBegin || !prevProps.isActive; |
| 13946 |
if (this.manager) { |
| 13947 |
this.manager.stop(); |
| 13948 |
} |
| 13949 |
if (this.stopJSAnimation) { |
| 13950 |
this.stopJSAnimation(); |
| 13951 |
} |
| 13952 |
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to; |
| 13953 |
if (this.state && style) { |
| 13954 |
var _newState = { |
| 13955 |
style: attributeName ? _defineProperty({}, attributeName, from) : from |
| 13956 |
}; |
| 13957 |
if (attributeName && style[attributeName] !== from || !attributeName && style !== from) { |
| 13958 |
this.setState(_newState); |
| 13959 |
} |
| 13960 |
} |
| 13961 |
this.runAnimation(_objectSpread(_objectSpread({}, this.props), {}, { |
| 13962 |
from, |
| 13963 |
begin: 0 |
| 13964 |
})); |
| 13965 |
} |
| 13966 |
}, { |
| 13967 |
key: "componentWillUnmount", |
| 13968 |
value: function componentWillUnmount() { |
| 13969 |
this.mounted = false; |
| 13970 |
var onAnimationEnd2 = this.props.onAnimationEnd; |
| 13971 |
if (this.unSubscribe) { |
| 13972 |
this.unSubscribe(); |
| 13973 |
} |
| 13974 |
if (this.manager) { |
| 13975 |
this.manager.stop(); |
| 13976 |
this.manager = null; |
| 13977 |
} |
| 13978 |
if (this.stopJSAnimation) { |
| 13979 |
this.stopJSAnimation(); |
| 13980 |
} |
| 13981 |
if (onAnimationEnd2) { |
| 13982 |
onAnimationEnd2(); |
| 13983 |
} |
| 13984 |
} |
| 13985 |
}, { |
| 13986 |
key: "handleStyleChange", |
| 13987 |
value: function handleStyleChange(style) { |
| 13988 |
this.changeStyle(style); |
| 13989 |
} |
| 13990 |
}, { |
| 13991 |
key: "changeStyle", |
| 13992 |
value: function changeStyle(style) { |
| 13993 |
if (this.mounted) { |
| 13994 |
this.setState({ |
| 13995 |
style |
| 13996 |
}); |
| 13997 |
} |
| 13998 |
} |
| 13999 |
}, { |
| 14000 |
key: "runJSAnimation", |
| 14001 |
value: function runJSAnimation(props) { |
| 14002 |
var _this2 = this; |
| 14003 |
var from = props.from, to = props.to, duration = props.duration, easing = props.easing, begin = props.begin, onAnimationEnd2 = props.onAnimationEnd, onAnimationStart2 = props.onAnimationStart; |
| 14004 |
var startAnimation = configUpdate(from, to, configEasing(easing), duration, this.changeStyle); |
| 14005 |
var finalStartAnimation = function finalStartAnimation2() { |
| 14006 |
_this2.stopJSAnimation = startAnimation(); |
| 14007 |
}; |
| 14008 |
this.manager.start([onAnimationStart2, begin, finalStartAnimation, duration, onAnimationEnd2]); |
| 14009 |
} |
| 14010 |
}, { |
| 14011 |
key: "runStepAnimation", |
| 14012 |
value: function runStepAnimation(props) { |
| 14013 |
var _this3 = this; |
| 14014 |
var steps = props.steps, begin = props.begin, onAnimationStart2 = props.onAnimationStart; |
| 14015 |
var _steps$ = steps[0], initialStyle = _steps$.style, _steps$$duration = _steps$.duration, initialTime = _steps$$duration === void 0 ? 0 : _steps$$duration; |
| 14016 |
var addStyle = function addStyle2(sequence, nextItem, index) { |
| 14017 |
if (index === 0) { |
| 14018 |
return sequence; |
| 14019 |
} |
| 14020 |
var duration = nextItem.duration, _nextItem$easing = nextItem.easing, easing = _nextItem$easing === void 0 ? "ease" : _nextItem$easing, style = nextItem.style, nextProperties = nextItem.properties, onAnimationEnd2 = nextItem.onAnimationEnd; |
| 14021 |
var preItem = index > 0 ? steps[index - 1] : nextItem; |
| 14022 |
var properties = nextProperties || Object.keys(style); |
| 14023 |
if (typeof easing === "function" || easing === "spring") { |
| 14024 |
return [].concat(_toConsumableArray(sequence), [_this3.runJSAnimation.bind(_this3, { |
| 14025 |
from: preItem.style, |
| 14026 |
to: style, |
| 14027 |
duration, |
| 14028 |
easing |
| 14029 |
}), duration]); |
| 14030 |
} |
| 14031 |
var transition = getTransitionVal(properties, duration, easing); |
| 14032 |
var newStyle = _objectSpread(_objectSpread(_objectSpread({}, preItem.style), style), {}, { |
| 14033 |
transition |
| 14034 |
}); |
| 14035 |
return [].concat(_toConsumableArray(sequence), [newStyle, duration, onAnimationEnd2]).filter(identity); |
| 14036 |
}; |
| 14037 |
return this.manager.start([onAnimationStart2].concat(_toConsumableArray(steps.reduce(addStyle, [initialStyle, Math.max(initialTime, begin)])), [props.onAnimationEnd])); |
| 14038 |
} |
| 14039 |
}, { |
| 14040 |
key: "runAnimation", |
| 14041 |
value: function runAnimation(props) { |
| 14042 |
if (!this.manager) { |
| 14043 |
this.manager = createAnimateManager(); |
| 14044 |
} |
| 14045 |
var begin = props.begin, duration = props.duration, attributeName = props.attributeName, propsTo = props.to, easing = props.easing, onAnimationStart2 = props.onAnimationStart, onAnimationEnd2 = props.onAnimationEnd, steps = props.steps, children = props.children; |
| 14046 |
var manager = this.manager; |
| 14047 |
this.unSubscribe = manager.subscribe(this.handleStyleChange); |
| 14048 |
if (typeof easing === "function" || typeof children === "function" || easing === "spring") { |
| 14049 |
this.runJSAnimation(props); |
| 14050 |
return; |
| 14051 |
} |
| 14052 |
if (steps.length > 1) { |
| 14053 |
this.runStepAnimation(props); |
| 14054 |
return; |
| 14055 |
} |
| 14056 |
var to = attributeName ? _defineProperty({}, attributeName, propsTo) : propsTo; |
| 14057 |
var transition = getTransitionVal(Object.keys(to), duration, easing); |
| 14058 |
manager.start([onAnimationStart2, begin, _objectSpread(_objectSpread({}, to), {}, { |
| 14059 |
transition |
| 14060 |
}), duration, onAnimationEnd2]); |
| 14061 |
} |
| 14062 |
}, { |
| 14063 |
key: "render", |
| 14064 |
value: function render() { |
| 14065 |
var _this$props4 = this.props, children = _this$props4.children; |
| 14066 |
_this$props4.begin; |
| 14067 |
var duration = _this$props4.duration; |
| 14068 |
_this$props4.attributeName; |
| 14069 |
_this$props4.easing; |
| 14070 |
var isActive = _this$props4.isActive; |
| 14071 |
_this$props4.steps; |
| 14072 |
_this$props4.from; |
| 14073 |
_this$props4.to; |
| 14074 |
_this$props4.canBegin; |
| 14075 |
_this$props4.onAnimationEnd; |
| 14076 |
_this$props4.shouldReAnimate; |
| 14077 |
_this$props4.onAnimationReStart; |
| 14078 |
var others = _objectWithoutProperties(_this$props4, _excluded); |
| 14079 |
var count = reactExports.Children.count(children); |
| 14080 |
var stateStyle = this.state.style; |
| 14081 |
if (typeof children === "function") { |
| 14082 |
return children(stateStyle); |
| 14083 |
} |
| 14084 |
if (!isActive || count === 0 || duration <= 0) { |
| 14085 |
return children; |
| 14086 |
} |
| 14087 |
var cloneContainer = function cloneContainer2(container) { |
| 14088 |
var _container$props = container.props, _container$props$styl = _container$props.style, style = _container$props$styl === void 0 ? {} : _container$props$styl, className = _container$props.className; |
| 14089 |
var res = /* @__PURE__ */ reactExports.cloneElement(container, _objectSpread(_objectSpread({}, others), {}, { |
| 14090 |
style: _objectSpread(_objectSpread({}, style), stateStyle), |
| 14091 |
className |
| 14092 |
})); |
| 14093 |
return res; |
| 14094 |
}; |
| 14095 |
if (count === 1) { |
| 14096 |
return cloneContainer(reactExports.Children.only(children)); |
| 14097 |
} |
| 14098 |
return /* @__PURE__ */ React.createElement("div", null, reactExports.Children.map(children, function(child) { |
| 14099 |
return cloneContainer(child); |
| 14100 |
})); |
| 14101 |
} |
| 14102 |
}]); |
| 14103 |
return Animate2; |
| 14104 |
}(reactExports.PureComponent); |
| 14105 |
Animate.displayName = "Animate"; |
| 14106 |
Animate.defaultProps = { |
| 14107 |
begin: 0, |
| 14108 |
duration: 1e3, |
| 14109 |
from: "", |
| 14110 |
to: "", |
| 14111 |
attributeName: "", |
| 14112 |
easing: "ease", |
| 14113 |
isActive: true, |
| 14114 |
canBegin: true, |
| 14115 |
steps: [], |
| 14116 |
onAnimationEnd: function onAnimationEnd() { |
| 14117 |
}, |
| 14118 |
onAnimationStart: function onAnimationStart() { |
| 14119 |
} |
| 14120 |
}; |
| 14121 |
Animate.propTypes = { |
| 14122 |
from: PropTypes.oneOfType([PropTypes.object, PropTypes.string]), |
| 14123 |
to: PropTypes.oneOfType([PropTypes.object, PropTypes.string]), |
| 14124 |
attributeName: PropTypes.string, |
| 14125 |
// animation duration |
| 14126 |
duration: PropTypes.number, |
| 14127 |
begin: PropTypes.number, |
| 14128 |
easing: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), |
| 14129 |
steps: PropTypes.arrayOf(PropTypes.shape({ |
| 14130 |
duration: PropTypes.number.isRequired, |
| 14131 |
style: PropTypes.object.isRequired, |
| 14132 |
easing: PropTypes.oneOfType([PropTypes.oneOf(["ease", "ease-in", "ease-out", "ease-in-out", "linear"]), PropTypes.func]), |
| 14133 |
// transition css properties(dash case), optional |
| 14134 |
properties: PropTypes.arrayOf("string"), |
| 14135 |
onAnimationEnd: PropTypes.func |
| 14136 |
})), |
| 14137 |
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]), |
| 14138 |
isActive: PropTypes.bool, |
| 14139 |
canBegin: PropTypes.bool, |
| 14140 |
onAnimationEnd: PropTypes.func, |
| 14141 |
// decide if it should reanimate with initial from style when props change |
| 14142 |
shouldReAnimate: PropTypes.bool, |
| 14143 |
onAnimationStart: PropTypes.func, |
| 14144 |
onAnimationReStart: PropTypes.func |
| 14145 |
}; |
| 14146 |
var quill = { exports: {} }; |
| 14147 |
/*! |
| 14148 |
* Quill Editor v1.3.7 |
| 14149 |
* https://quilljs.com/ |
| 14150 |
* Copyright (c) 2014, Jason Chen |
| 14151 |
* Copyright (c) 2013, salesforce.com |
| 14152 |
*/ |
| 14153 |
(function(module, exports$1) { |
| 14154 |
(function webpackUniversalModuleDefinition(root2, factory) { |
| 14155 |
module.exports = factory(); |
| 14156 |
})(typeof self !== "undefined" ? self : commonjsGlobal, function() { |
| 14157 |
return ( |
| 14158 |
/******/ |
| 14159 |
function(modules) { |
| 14160 |
var installedModules = {}; |
| 14161 |
function __webpack_require__(moduleId) { |
| 14162 |
if (installedModules[moduleId]) { |
| 14163 |
return installedModules[moduleId].exports; |
| 14164 |
} |
| 14165 |
var module2 = installedModules[moduleId] = { |
| 14166 |
/******/ |
| 14167 |
i: moduleId, |
| 14168 |
/******/ |
| 14169 |
l: false, |
| 14170 |
/******/ |
| 14171 |
exports: {} |
| 14172 |
/******/ |
| 14173 |
}; |
| 14174 |
modules[moduleId].call(module2.exports, module2, module2.exports, __webpack_require__); |
| 14175 |
module2.l = true; |
| 14176 |
return module2.exports; |
| 14177 |
} |
| 14178 |
__webpack_require__.m = modules; |
| 14179 |
__webpack_require__.c = installedModules; |
| 14180 |
__webpack_require__.d = function(exports$12, name, getter) { |
| 14181 |
if (!__webpack_require__.o(exports$12, name)) { |
| 14182 |
Object.defineProperty(exports$12, name, { |
| 14183 |
/******/ |
| 14184 |
configurable: false, |
| 14185 |
/******/ |
| 14186 |
enumerable: true, |
| 14187 |
/******/ |
| 14188 |
get: getter |
| 14189 |
/******/ |
| 14190 |
}); |
| 14191 |
} |
| 14192 |
}; |
| 14193 |
__webpack_require__.n = function(module2) { |
| 14194 |
var getter = module2 && module2.__esModule ? ( |
| 14195 |
/******/ |
| 14196 |
function getDefault() { |
| 14197 |
return module2["default"]; |
| 14198 |
} |
| 14199 |
) : ( |
| 14200 |
/******/ |
| 14201 |
function getModuleExports() { |
| 14202 |
return module2; |
| 14203 |
} |
| 14204 |
); |
| 14205 |
__webpack_require__.d(getter, "a", getter); |
| 14206 |
return getter; |
| 14207 |
}; |
| 14208 |
__webpack_require__.o = function(object, property) { |
| 14209 |
return Object.prototype.hasOwnProperty.call(object, property); |
| 14210 |
}; |
| 14211 |
__webpack_require__.p = ""; |
| 14212 |
return __webpack_require__(__webpack_require__.s = 109); |
| 14213 |
}([ |
| 14214 |
/* 0 */ |
| 14215 |
/***/ |
| 14216 |
function(module2, exports$12, __webpack_require__) { |
| 14217 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 14218 |
var container_1 = __webpack_require__(17); |
| 14219 |
var format_1 = __webpack_require__(18); |
| 14220 |
var leaf_1 = __webpack_require__(19); |
| 14221 |
var scroll_1 = __webpack_require__(45); |
| 14222 |
var inline_1 = __webpack_require__(46); |
| 14223 |
var block_1 = __webpack_require__(47); |
| 14224 |
var embed_1 = __webpack_require__(48); |
| 14225 |
var text_1 = __webpack_require__(49); |
| 14226 |
var attributor_1 = __webpack_require__(12); |
| 14227 |
var class_1 = __webpack_require__(32); |
| 14228 |
var style_1 = __webpack_require__(33); |
| 14229 |
var store_1 = __webpack_require__(31); |
| 14230 |
var Registry = __webpack_require__(1); |
| 14231 |
var Parchment = { |
| 14232 |
Scope: Registry.Scope, |
| 14233 |
create: Registry.create, |
| 14234 |
find: Registry.find, |
| 14235 |
query: Registry.query, |
| 14236 |
register: Registry.register, |
| 14237 |
Container: container_1.default, |
| 14238 |
Format: format_1.default, |
| 14239 |
Leaf: leaf_1.default, |
| 14240 |
Embed: embed_1.default, |
| 14241 |
Scroll: scroll_1.default, |
| 14242 |
Block: block_1.default, |
| 14243 |
Inline: inline_1.default, |
| 14244 |
Text: text_1.default, |
| 14245 |
Attributor: { |
| 14246 |
Attribute: attributor_1.default, |
| 14247 |
Class: class_1.default, |
| 14248 |
Style: style_1.default, |
| 14249 |
Store: store_1.default |
| 14250 |
} |
| 14251 |
}; |
| 14252 |
exports$12.default = Parchment; |
| 14253 |
}, |
| 14254 |
/* 1 */ |
| 14255 |
/***/ |
| 14256 |
function(module2, exports$12, __webpack_require__) { |
| 14257 |
var __extends2 = this && this.__extends || function() { |
| 14258 |
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { |
| 14259 |
d2.__proto__ = b2; |
| 14260 |
} || function(d2, b2) { |
| 14261 |
for (var p2 in b2) if (b2.hasOwnProperty(p2)) d2[p2] = b2[p2]; |
| 14262 |
}; |
| 14263 |
return function(d2, b2) { |
| 14264 |
extendStatics(d2, b2); |
| 14265 |
function __() { |
| 14266 |
this.constructor = d2; |
| 14267 |
} |
| 14268 |
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __()); |
| 14269 |
}; |
| 14270 |
}(); |
| 14271 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 14272 |
var ParchmentError = ( |
| 14273 |
/** @class */ |
| 14274 |
function(_super) { |
| 14275 |
__extends2(ParchmentError2, _super); |
| 14276 |
function ParchmentError2(message) { |
| 14277 |
var _this = this; |
| 14278 |
message = "[Parchment] " + message; |
| 14279 |
_this = _super.call(this, message) || this; |
| 14280 |
_this.message = message; |
| 14281 |
_this.name = _this.constructor.name; |
| 14282 |
return _this; |
| 14283 |
} |
| 14284 |
return ParchmentError2; |
| 14285 |
}(Error) |
| 14286 |
); |
| 14287 |
exports$12.ParchmentError = ParchmentError; |
| 14288 |
var attributes = {}; |
| 14289 |
var classes = {}; |
| 14290 |
var tags = {}; |
| 14291 |
var types = {}; |
| 14292 |
exports$12.DATA_KEY = "__blot"; |
| 14293 |
var Scope; |
| 14294 |
(function(Scope2) { |
| 14295 |
Scope2[Scope2["TYPE"] = 3] = "TYPE"; |
| 14296 |
Scope2[Scope2["LEVEL"] = 12] = "LEVEL"; |
| 14297 |
Scope2[Scope2["ATTRIBUTE"] = 13] = "ATTRIBUTE"; |
| 14298 |
Scope2[Scope2["BLOT"] = 14] = "BLOT"; |
| 14299 |
Scope2[Scope2["INLINE"] = 7] = "INLINE"; |
| 14300 |
Scope2[Scope2["BLOCK"] = 11] = "BLOCK"; |
| 14301 |
Scope2[Scope2["BLOCK_BLOT"] = 10] = "BLOCK_BLOT"; |
| 14302 |
Scope2[Scope2["INLINE_BLOT"] = 6] = "INLINE_BLOT"; |
| 14303 |
Scope2[Scope2["BLOCK_ATTRIBUTE"] = 9] = "BLOCK_ATTRIBUTE"; |
| 14304 |
Scope2[Scope2["INLINE_ATTRIBUTE"] = 5] = "INLINE_ATTRIBUTE"; |
| 14305 |
Scope2[Scope2["ANY"] = 15] = "ANY"; |
| 14306 |
})(Scope = exports$12.Scope || (exports$12.Scope = {})); |
| 14307 |
function create(input, value) { |
| 14308 |
var match = query(input); |
| 14309 |
if (match == null) { |
| 14310 |
throw new ParchmentError("Unable to create " + input + " blot"); |
| 14311 |
} |
| 14312 |
var BlotClass = match; |
| 14313 |
var node = ( |
| 14314 |
// @ts-ignore |
| 14315 |
input instanceof Node || input["nodeType"] === Node.TEXT_NODE ? input : BlotClass.create(value) |
| 14316 |
); |
| 14317 |
return new BlotClass(node, value); |
| 14318 |
} |
| 14319 |
exports$12.create = create; |
| 14320 |
function find(node, bubble) { |
| 14321 |
if (bubble === void 0) { |
| 14322 |
bubble = false; |
| 14323 |
} |
| 14324 |
if (node == null) |
| 14325 |
return null; |
| 14326 |
if (node[exports$12.DATA_KEY] != null) |
| 14327 |
return node[exports$12.DATA_KEY].blot; |
| 14328 |
if (bubble) |
| 14329 |
return find(node.parentNode, bubble); |
| 14330 |
return null; |
| 14331 |
} |
| 14332 |
exports$12.find = find; |
| 14333 |
function query(query2, scope) { |
| 14334 |
if (scope === void 0) { |
| 14335 |
scope = Scope.ANY; |
| 14336 |
} |
| 14337 |
var match; |
| 14338 |
if (typeof query2 === "string") { |
| 14339 |
match = types[query2] || attributes[query2]; |
| 14340 |
} else if (query2 instanceof Text || query2["nodeType"] === Node.TEXT_NODE) { |
| 14341 |
match = types["text"]; |
| 14342 |
} else if (typeof query2 === "number") { |
| 14343 |
if (query2 & Scope.LEVEL & Scope.BLOCK) { |
| 14344 |
match = types["block"]; |
| 14345 |
} else if (query2 & Scope.LEVEL & Scope.INLINE) { |
| 14346 |
match = types["inline"]; |
| 14347 |
} |
| 14348 |
} else if (query2 instanceof HTMLElement) { |
| 14349 |
var names = (query2.getAttribute("class") || "").split(/\s+/); |
| 14350 |
for (var i in names) { |
| 14351 |
match = classes[names[i]]; |
| 14352 |
if (match) |
| 14353 |
break; |
| 14354 |
} |
| 14355 |
match = match || tags[query2.tagName]; |
| 14356 |
} |
| 14357 |
if (match == null) |
| 14358 |
return null; |
| 14359 |
if (scope & Scope.LEVEL & match.scope && scope & Scope.TYPE & match.scope) |
| 14360 |
return match; |
| 14361 |
return null; |
| 14362 |
} |
| 14363 |
exports$12.query = query; |
| 14364 |
function register() { |
| 14365 |
var Definitions = []; |
| 14366 |
for (var _i2 = 0; _i2 < arguments.length; _i2++) { |
| 14367 |
Definitions[_i2] = arguments[_i2]; |
| 14368 |
} |
| 14369 |
if (Definitions.length > 1) { |
| 14370 |
return Definitions.map(function(d2) { |
| 14371 |
return register(d2); |
| 14372 |
}); |
| 14373 |
} |
| 14374 |
var Definition = Definitions[0]; |
| 14375 |
if (typeof Definition.blotName !== "string" && typeof Definition.attrName !== "string") { |
| 14376 |
throw new ParchmentError("Invalid definition"); |
| 14377 |
} else if (Definition.blotName === "abstract") { |
| 14378 |
throw new ParchmentError("Cannot register abstract class"); |
| 14379 |
} |
| 14380 |
types[Definition.blotName || Definition.attrName] = Definition; |
| 14381 |
if (typeof Definition.keyName === "string") { |
| 14382 |
attributes[Definition.keyName] = Definition; |
| 14383 |
} else { |
| 14384 |
if (Definition.className != null) { |
| 14385 |
classes[Definition.className] = Definition; |
| 14386 |
} |
| 14387 |
if (Definition.tagName != null) { |
| 14388 |
if (Array.isArray(Definition.tagName)) { |
| 14389 |
Definition.tagName = Definition.tagName.map(function(tagName) { |
| 14390 |
return tagName.toUpperCase(); |
| 14391 |
}); |
| 14392 |
} else { |
| 14393 |
Definition.tagName = Definition.tagName.toUpperCase(); |
| 14394 |
} |
| 14395 |
var tagNames = Array.isArray(Definition.tagName) ? Definition.tagName : [Definition.tagName]; |
| 14396 |
tagNames.forEach(function(tag) { |
| 14397 |
if (tags[tag] == null || Definition.className == null) { |
| 14398 |
tags[tag] = Definition; |
| 14399 |
} |
| 14400 |
}); |
| 14401 |
} |
| 14402 |
} |
| 14403 |
return Definition; |
| 14404 |
} |
| 14405 |
exports$12.register = register; |
| 14406 |
}, |
| 14407 |
/* 2 */ |
| 14408 |
/***/ |
| 14409 |
function(module2, exports$12, __webpack_require__) { |
| 14410 |
var diff = __webpack_require__(51); |
| 14411 |
var equal = __webpack_require__(11); |
| 14412 |
var extend = __webpack_require__(3); |
| 14413 |
var op = __webpack_require__(20); |
| 14414 |
var NULL_CHARACTER = String.fromCharCode(0); |
| 14415 |
var Delta = function(ops) { |
| 14416 |
if (Array.isArray(ops)) { |
| 14417 |
this.ops = ops; |
| 14418 |
} else if (ops != null && Array.isArray(ops.ops)) { |
| 14419 |
this.ops = ops.ops; |
| 14420 |
} else { |
| 14421 |
this.ops = []; |
| 14422 |
} |
| 14423 |
}; |
| 14424 |
Delta.prototype.insert = function(text, attributes) { |
| 14425 |
var newOp = {}; |
| 14426 |
if (text.length === 0) return this; |
| 14427 |
newOp.insert = text; |
| 14428 |
if (attributes != null && typeof attributes === "object" && Object.keys(attributes).length > 0) { |
| 14429 |
newOp.attributes = attributes; |
| 14430 |
} |
| 14431 |
return this.push(newOp); |
| 14432 |
}; |
| 14433 |
Delta.prototype["delete"] = function(length) { |
| 14434 |
if (length <= 0) return this; |
| 14435 |
return this.push({ "delete": length }); |
| 14436 |
}; |
| 14437 |
Delta.prototype.retain = function(length, attributes) { |
| 14438 |
if (length <= 0) return this; |
| 14439 |
var newOp = { retain: length }; |
| 14440 |
if (attributes != null && typeof attributes === "object" && Object.keys(attributes).length > 0) { |
| 14441 |
newOp.attributes = attributes; |
| 14442 |
} |
| 14443 |
return this.push(newOp); |
| 14444 |
}; |
| 14445 |
Delta.prototype.push = function(newOp) { |
| 14446 |
var index = this.ops.length; |
| 14447 |
var lastOp = this.ops[index - 1]; |
| 14448 |
newOp = extend(true, {}, newOp); |
| 14449 |
if (typeof lastOp === "object") { |
| 14450 |
if (typeof newOp["delete"] === "number" && typeof lastOp["delete"] === "number") { |
| 14451 |
this.ops[index - 1] = { "delete": lastOp["delete"] + newOp["delete"] }; |
| 14452 |
return this; |
| 14453 |
} |
| 14454 |
if (typeof lastOp["delete"] === "number" && newOp.insert != null) { |
| 14455 |
index -= 1; |
| 14456 |
lastOp = this.ops[index - 1]; |
| 14457 |
if (typeof lastOp !== "object") { |
| 14458 |
this.ops.unshift(newOp); |
| 14459 |
return this; |
| 14460 |
} |
| 14461 |
} |
| 14462 |
if (equal(newOp.attributes, lastOp.attributes)) { |
| 14463 |
if (typeof newOp.insert === "string" && typeof lastOp.insert === "string") { |
| 14464 |
this.ops[index - 1] = { insert: lastOp.insert + newOp.insert }; |
| 14465 |
if (typeof newOp.attributes === "object") this.ops[index - 1].attributes = newOp.attributes; |
| 14466 |
return this; |
| 14467 |
} else if (typeof newOp.retain === "number" && typeof lastOp.retain === "number") { |
| 14468 |
this.ops[index - 1] = { retain: lastOp.retain + newOp.retain }; |
| 14469 |
if (typeof newOp.attributes === "object") this.ops[index - 1].attributes = newOp.attributes; |
| 14470 |
return this; |
| 14471 |
} |
| 14472 |
} |
| 14473 |
} |
| 14474 |
if (index === this.ops.length) { |
| 14475 |
this.ops.push(newOp); |
| 14476 |
} else { |
| 14477 |
this.ops.splice(index, 0, newOp); |
| 14478 |
} |
| 14479 |
return this; |
| 14480 |
}; |
| 14481 |
Delta.prototype.chop = function() { |
| 14482 |
var lastOp = this.ops[this.ops.length - 1]; |
| 14483 |
if (lastOp && lastOp.retain && !lastOp.attributes) { |
| 14484 |
this.ops.pop(); |
| 14485 |
} |
| 14486 |
return this; |
| 14487 |
}; |
| 14488 |
Delta.prototype.filter = function(predicate) { |
| 14489 |
return this.ops.filter(predicate); |
| 14490 |
}; |
| 14491 |
Delta.prototype.forEach = function(predicate) { |
| 14492 |
this.ops.forEach(predicate); |
| 14493 |
}; |
| 14494 |
Delta.prototype.map = function(predicate) { |
| 14495 |
return this.ops.map(predicate); |
| 14496 |
}; |
| 14497 |
Delta.prototype.partition = function(predicate) { |
| 14498 |
var passed = [], failed = []; |
| 14499 |
this.forEach(function(op2) { |
| 14500 |
var target = predicate(op2) ? passed : failed; |
| 14501 |
target.push(op2); |
| 14502 |
}); |
| 14503 |
return [passed, failed]; |
| 14504 |
}; |
| 14505 |
Delta.prototype.reduce = function(predicate, initial) { |
| 14506 |
return this.ops.reduce(predicate, initial); |
| 14507 |
}; |
| 14508 |
Delta.prototype.changeLength = function() { |
| 14509 |
return this.reduce(function(length, elem) { |
| 14510 |
if (elem.insert) { |
| 14511 |
return length + op.length(elem); |
| 14512 |
} else if (elem.delete) { |
| 14513 |
return length - elem.delete; |
| 14514 |
} |
| 14515 |
return length; |
| 14516 |
}, 0); |
| 14517 |
}; |
| 14518 |
Delta.prototype.length = function() { |
| 14519 |
return this.reduce(function(length, elem) { |
| 14520 |
return length + op.length(elem); |
| 14521 |
}, 0); |
| 14522 |
}; |
| 14523 |
Delta.prototype.slice = function(start, end) { |
| 14524 |
start = start || 0; |
| 14525 |
if (typeof end !== "number") end = Infinity; |
| 14526 |
var ops = []; |
| 14527 |
var iter = op.iterator(this.ops); |
| 14528 |
var index = 0; |
| 14529 |
while (index < end && iter.hasNext()) { |
| 14530 |
var nextOp; |
| 14531 |
if (index < start) { |
| 14532 |
nextOp = iter.next(start - index); |
| 14533 |
} else { |
| 14534 |
nextOp = iter.next(end - index); |
| 14535 |
ops.push(nextOp); |
| 14536 |
} |
| 14537 |
index += op.length(nextOp); |
| 14538 |
} |
| 14539 |
return new Delta(ops); |
| 14540 |
}; |
| 14541 |
Delta.prototype.compose = function(other) { |
| 14542 |
var thisIter = op.iterator(this.ops); |
| 14543 |
var otherIter = op.iterator(other.ops); |
| 14544 |
var ops = []; |
| 14545 |
var firstOther = otherIter.peek(); |
| 14546 |
if (firstOther != null && typeof firstOther.retain === "number" && firstOther.attributes == null) { |
| 14547 |
var firstLeft = firstOther.retain; |
| 14548 |
while (thisIter.peekType() === "insert" && thisIter.peekLength() <= firstLeft) { |
| 14549 |
firstLeft -= thisIter.peekLength(); |
| 14550 |
ops.push(thisIter.next()); |
| 14551 |
} |
| 14552 |
if (firstOther.retain - firstLeft > 0) { |
| 14553 |
otherIter.next(firstOther.retain - firstLeft); |
| 14554 |
} |
| 14555 |
} |
| 14556 |
var delta = new Delta(ops); |
| 14557 |
while (thisIter.hasNext() || otherIter.hasNext()) { |
| 14558 |
if (otherIter.peekType() === "insert") { |
| 14559 |
delta.push(otherIter.next()); |
| 14560 |
} else if (thisIter.peekType() === "delete") { |
| 14561 |
delta.push(thisIter.next()); |
| 14562 |
} else { |
| 14563 |
var length = Math.min(thisIter.peekLength(), otherIter.peekLength()); |
| 14564 |
var thisOp = thisIter.next(length); |
| 14565 |
var otherOp = otherIter.next(length); |
| 14566 |
if (typeof otherOp.retain === "number") { |
| 14567 |
var newOp = {}; |
| 14568 |
if (typeof thisOp.retain === "number") { |
| 14569 |
newOp.retain = length; |
| 14570 |
} else { |
| 14571 |
newOp.insert = thisOp.insert; |
| 14572 |
} |
| 14573 |
var attributes = op.attributes.compose(thisOp.attributes, otherOp.attributes, typeof thisOp.retain === "number"); |
| 14574 |
if (attributes) newOp.attributes = attributes; |
| 14575 |
delta.push(newOp); |
| 14576 |
if (!otherIter.hasNext() && equal(delta.ops[delta.ops.length - 1], newOp)) { |
| 14577 |
var rest = new Delta(thisIter.rest()); |
| 14578 |
return delta.concat(rest).chop(); |
| 14579 |
} |
| 14580 |
} else if (typeof otherOp["delete"] === "number" && typeof thisOp.retain === "number") { |
| 14581 |
delta.push(otherOp); |
| 14582 |
} |
| 14583 |
} |
| 14584 |
} |
| 14585 |
return delta.chop(); |
| 14586 |
}; |
| 14587 |
Delta.prototype.concat = function(other) { |
| 14588 |
var delta = new Delta(this.ops.slice()); |
| 14589 |
if (other.ops.length > 0) { |
| 14590 |
delta.push(other.ops[0]); |
| 14591 |
delta.ops = delta.ops.concat(other.ops.slice(1)); |
| 14592 |
} |
| 14593 |
return delta; |
| 14594 |
}; |
| 14595 |
Delta.prototype.diff = function(other, index) { |
| 14596 |
if (this.ops === other.ops) { |
| 14597 |
return new Delta(); |
| 14598 |
} |
| 14599 |
var strings = [this, other].map(function(delta2) { |
| 14600 |
return delta2.map(function(op2) { |
| 14601 |
if (op2.insert != null) { |
| 14602 |
return typeof op2.insert === "string" ? op2.insert : NULL_CHARACTER; |
| 14603 |
} |
| 14604 |
var prep = delta2 === other ? "on" : "with"; |
| 14605 |
throw new Error("diff() called " + prep + " non-document"); |
| 14606 |
}).join(""); |
| 14607 |
}); |
| 14608 |
var delta = new Delta(); |
| 14609 |
var diffResult = diff(strings[0], strings[1], index); |
| 14610 |
var thisIter = op.iterator(this.ops); |
| 14611 |
var otherIter = op.iterator(other.ops); |
| 14612 |
diffResult.forEach(function(component) { |
| 14613 |
var length = component[1].length; |
| 14614 |
while (length > 0) { |
| 14615 |
var opLength = 0; |
| 14616 |
switch (component[0]) { |
| 14617 |
case diff.INSERT: |
| 14618 |
opLength = Math.min(otherIter.peekLength(), length); |
| 14619 |
delta.push(otherIter.next(opLength)); |
| 14620 |
break; |
| 14621 |
case diff.DELETE: |
| 14622 |
opLength = Math.min(length, thisIter.peekLength()); |
| 14623 |
thisIter.next(opLength); |
| 14624 |
delta["delete"](opLength); |
| 14625 |
break; |
| 14626 |
case diff.EQUAL: |
| 14627 |
opLength = Math.min(thisIter.peekLength(), otherIter.peekLength(), length); |
| 14628 |
var thisOp = thisIter.next(opLength); |
| 14629 |
var otherOp = otherIter.next(opLength); |
| 14630 |
if (equal(thisOp.insert, otherOp.insert)) { |
| 14631 |
delta.retain(opLength, op.attributes.diff(thisOp.attributes, otherOp.attributes)); |
| 14632 |
} else { |
| 14633 |
delta.push(otherOp)["delete"](opLength); |
| 14634 |
} |
| 14635 |
break; |
| 14636 |
} |
| 14637 |
length -= opLength; |
| 14638 |
} |
| 14639 |
}); |
| 14640 |
return delta.chop(); |
| 14641 |
}; |
| 14642 |
Delta.prototype.eachLine = function(predicate, newline) { |
| 14643 |
newline = newline || "\n"; |
| 14644 |
var iter = op.iterator(this.ops); |
| 14645 |
var line = new Delta(); |
| 14646 |
var i = 0; |
| 14647 |
while (iter.hasNext()) { |
| 14648 |
if (iter.peekType() !== "insert") return; |
| 14649 |
var thisOp = iter.peek(); |
| 14650 |
var start = op.length(thisOp) - iter.peekLength(); |
| 14651 |
var index = typeof thisOp.insert === "string" ? thisOp.insert.indexOf(newline, start) - start : -1; |
| 14652 |
if (index < 0) { |
| 14653 |
line.push(iter.next()); |
| 14654 |
} else if (index > 0) { |
| 14655 |
line.push(iter.next(index)); |
| 14656 |
} else { |
| 14657 |
if (predicate(line, iter.next(1).attributes || {}, i) === false) { |
| 14658 |
return; |
| 14659 |
} |
| 14660 |
i += 1; |
| 14661 |
line = new Delta(); |
| 14662 |
} |
| 14663 |
} |
| 14664 |
if (line.length() > 0) { |
| 14665 |
predicate(line, {}, i); |
| 14666 |
} |
| 14667 |
}; |
| 14668 |
Delta.prototype.transform = function(other, priority) { |
| 14669 |
priority = !!priority; |
| 14670 |
if (typeof other === "number") { |
| 14671 |
return this.transformPosition(other, priority); |
| 14672 |
} |
| 14673 |
var thisIter = op.iterator(this.ops); |
| 14674 |
var otherIter = op.iterator(other.ops); |
| 14675 |
var delta = new Delta(); |
| 14676 |
while (thisIter.hasNext() || otherIter.hasNext()) { |
| 14677 |
if (thisIter.peekType() === "insert" && (priority || otherIter.peekType() !== "insert")) { |
| 14678 |
delta.retain(op.length(thisIter.next())); |
| 14679 |
} else if (otherIter.peekType() === "insert") { |
| 14680 |
delta.push(otherIter.next()); |
| 14681 |
} else { |
| 14682 |
var length = Math.min(thisIter.peekLength(), otherIter.peekLength()); |
| 14683 |
var thisOp = thisIter.next(length); |
| 14684 |
var otherOp = otherIter.next(length); |
| 14685 |
if (thisOp["delete"]) { |
| 14686 |
continue; |
| 14687 |
} else if (otherOp["delete"]) { |
| 14688 |
delta.push(otherOp); |
| 14689 |
} else { |
| 14690 |
delta.retain(length, op.attributes.transform(thisOp.attributes, otherOp.attributes, priority)); |
| 14691 |
} |
| 14692 |
} |
| 14693 |
} |
| 14694 |
return delta.chop(); |
| 14695 |
}; |
| 14696 |
Delta.prototype.transformPosition = function(index, priority) { |
| 14697 |
priority = !!priority; |
| 14698 |
var thisIter = op.iterator(this.ops); |
| 14699 |
var offset = 0; |
| 14700 |
while (thisIter.hasNext() && offset <= index) { |
| 14701 |
var length = thisIter.peekLength(); |
| 14702 |
var nextType = thisIter.peekType(); |
| 14703 |
thisIter.next(); |
| 14704 |
if (nextType === "delete") { |
| 14705 |
index -= Math.min(length, index - offset); |
| 14706 |
continue; |
| 14707 |
} else if (nextType === "insert" && (offset < index || !priority)) { |
| 14708 |
index += length; |
| 14709 |
} |
| 14710 |
offset += length; |
| 14711 |
} |
| 14712 |
return index; |
| 14713 |
}; |
| 14714 |
module2.exports = Delta; |
| 14715 |
}, |
| 14716 |
/* 3 */ |
| 14717 |
/***/ |
| 14718 |
function(module2, exports$12) { |
| 14719 |
var hasOwn2 = Object.prototype.hasOwnProperty; |
| 14720 |
var toStr = Object.prototype.toString; |
| 14721 |
var defineProperty = Object.defineProperty; |
| 14722 |
var gOPD = Object.getOwnPropertyDescriptor; |
| 14723 |
var isArray2 = function isArray3(arr) { |
| 14724 |
if (typeof Array.isArray === "function") { |
| 14725 |
return Array.isArray(arr); |
| 14726 |
} |
| 14727 |
return toStr.call(arr) === "[object Array]"; |
| 14728 |
}; |
| 14729 |
var isPlainObject2 = function isPlainObject3(obj) { |
| 14730 |
if (!obj || toStr.call(obj) !== "[object Object]") { |
| 14731 |
return false; |
| 14732 |
} |
| 14733 |
var hasOwnConstructor = hasOwn2.call(obj, "constructor"); |
| 14734 |
var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn2.call(obj.constructor.prototype, "isPrototypeOf"); |
| 14735 |
if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { |
| 14736 |
return false; |
| 14737 |
} |
| 14738 |
var key; |
| 14739 |
for (key in obj) { |
| 14740 |
} |
| 14741 |
return typeof key === "undefined" || hasOwn2.call(obj, key); |
| 14742 |
}; |
| 14743 |
var setProperty = function setProperty2(target, options) { |
| 14744 |
if (defineProperty && options.name === "__proto__") { |
| 14745 |
defineProperty(target, options.name, { |
| 14746 |
enumerable: true, |
| 14747 |
configurable: true, |
| 14748 |
value: options.newValue, |
| 14749 |
writable: true |
| 14750 |
}); |
| 14751 |
} else { |
| 14752 |
target[options.name] = options.newValue; |
| 14753 |
} |
| 14754 |
}; |
| 14755 |
var getProperty = function getProperty2(obj, name) { |
| 14756 |
if (name === "__proto__") { |
| 14757 |
if (!hasOwn2.call(obj, name)) { |
| 14758 |
return void 0; |
| 14759 |
} else if (gOPD) { |
| 14760 |
return gOPD(obj, name).value; |
| 14761 |
} |
| 14762 |
} |
| 14763 |
return obj[name]; |
| 14764 |
}; |
| 14765 |
module2.exports = function extend() { |
| 14766 |
var options, name, src, copy, copyIsArray, clone; |
| 14767 |
var target = arguments[0]; |
| 14768 |
var i = 1; |
| 14769 |
var length = arguments.length; |
| 14770 |
var deep = false; |
| 14771 |
if (typeof target === "boolean") { |
| 14772 |
deep = target; |
| 14773 |
target = arguments[1] || {}; |
| 14774 |
i = 2; |
| 14775 |
} |
| 14776 |
if (target == null || typeof target !== "object" && typeof target !== "function") { |
| 14777 |
target = {}; |
| 14778 |
} |
| 14779 |
for (; i < length; ++i) { |
| 14780 |
options = arguments[i]; |
| 14781 |
if (options != null) { |
| 14782 |
for (name in options) { |
| 14783 |
src = getProperty(target, name); |
| 14784 |
copy = getProperty(options, name); |
| 14785 |
if (target !== copy) { |
| 14786 |
if (deep && copy && (isPlainObject2(copy) || (copyIsArray = isArray2(copy)))) { |
| 14787 |
if (copyIsArray) { |
| 14788 |
copyIsArray = false; |
| 14789 |
clone = src && isArray2(src) ? src : []; |
| 14790 |
} else { |
| 14791 |
clone = src && isPlainObject2(src) ? src : {}; |
| 14792 |
} |
| 14793 |
setProperty(target, { name, newValue: extend(deep, clone, copy) }); |
| 14794 |
} else if (typeof copy !== "undefined") { |
| 14795 |
setProperty(target, { name, newValue: copy }); |
| 14796 |
} |
| 14797 |
} |
| 14798 |
} |
| 14799 |
} |
| 14800 |
} |
| 14801 |
return target; |
| 14802 |
}; |
| 14803 |
}, |
| 14804 |
/* 4 */ |
| 14805 |
/***/ |
| 14806 |
function(module2, exports$12, __webpack_require__) { |
| 14807 |
Object.defineProperty(exports$12, "__esModule", { |
| 14808 |
value: true |
| 14809 |
}); |
| 14810 |
exports$12.default = exports$12.BlockEmbed = exports$12.bubbleFormats = void 0; |
| 14811 |
var _createClass2 = /* @__PURE__ */ function() { |
| 14812 |
function defineProperties(target, props) { |
| 14813 |
for (var i = 0; i < props.length; i++) { |
| 14814 |
var descriptor = props[i]; |
| 14815 |
descriptor.enumerable = descriptor.enumerable || false; |
| 14816 |
descriptor.configurable = true; |
| 14817 |
if ("value" in descriptor) descriptor.writable = true; |
| 14818 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 14819 |
} |
| 14820 |
} |
| 14821 |
return function(Constructor, protoProps, staticProps) { |
| 14822 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 14823 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 14824 |
return Constructor; |
| 14825 |
}; |
| 14826 |
}(); |
| 14827 |
var _get = function get(object, property, receiver) { |
| 14828 |
if (object === null) object = Function.prototype; |
| 14829 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 14830 |
if (desc === void 0) { |
| 14831 |
var parent = Object.getPrototypeOf(object); |
| 14832 |
if (parent === null) { |
| 14833 |
return void 0; |
| 14834 |
} else { |
| 14835 |
return get(parent, property, receiver); |
| 14836 |
} |
| 14837 |
} else if ("value" in desc) { |
| 14838 |
return desc.value; |
| 14839 |
} else { |
| 14840 |
var getter = desc.get; |
| 14841 |
if (getter === void 0) { |
| 14842 |
return void 0; |
| 14843 |
} |
| 14844 |
return getter.call(receiver); |
| 14845 |
} |
| 14846 |
}; |
| 14847 |
var _extend = __webpack_require__(3); |
| 14848 |
var _extend2 = _interopRequireDefault(_extend); |
| 14849 |
var _quillDelta = __webpack_require__(2); |
| 14850 |
var _quillDelta2 = _interopRequireDefault(_quillDelta); |
| 14851 |
var _parchment = __webpack_require__(0); |
| 14852 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 14853 |
var _break = __webpack_require__(16); |
| 14854 |
var _break2 = _interopRequireDefault(_break); |
| 14855 |
var _inline = __webpack_require__(6); |
| 14856 |
var _inline2 = _interopRequireDefault(_inline); |
| 14857 |
var _text = __webpack_require__(7); |
| 14858 |
var _text2 = _interopRequireDefault(_text); |
| 14859 |
function _interopRequireDefault(obj) { |
| 14860 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 14861 |
} |
| 14862 |
function _classCallCheck2(instance, Constructor) { |
| 14863 |
if (!(instance instanceof Constructor)) { |
| 14864 |
throw new TypeError("Cannot call a class as a function"); |
| 14865 |
} |
| 14866 |
} |
| 14867 |
function _possibleConstructorReturn2(self2, call) { |
| 14868 |
if (!self2) { |
| 14869 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 14870 |
} |
| 14871 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 14872 |
} |
| 14873 |
function _inherits2(subClass, superClass) { |
| 14874 |
if (typeof superClass !== "function" && superClass !== null) { |
| 14875 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 14876 |
} |
| 14877 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 14878 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 14879 |
} |
| 14880 |
var NEWLINE_LENGTH = 1; |
| 14881 |
var BlockEmbed = function(_Parchment$Embed) { |
| 14882 |
_inherits2(BlockEmbed2, _Parchment$Embed); |
| 14883 |
function BlockEmbed2() { |
| 14884 |
_classCallCheck2(this, BlockEmbed2); |
| 14885 |
return _possibleConstructorReturn2(this, (BlockEmbed2.__proto__ || Object.getPrototypeOf(BlockEmbed2)).apply(this, arguments)); |
| 14886 |
} |
| 14887 |
_createClass2(BlockEmbed2, [{ |
| 14888 |
key: "attach", |
| 14889 |
value: function attach() { |
| 14890 |
_get(BlockEmbed2.prototype.__proto__ || Object.getPrototypeOf(BlockEmbed2.prototype), "attach", this).call(this); |
| 14891 |
this.attributes = new _parchment2.default.Attributor.Store(this.domNode); |
| 14892 |
} |
| 14893 |
}, { |
| 14894 |
key: "delta", |
| 14895 |
value: function delta() { |
| 14896 |
return new _quillDelta2.default().insert(this.value(), (0, _extend2.default)(this.formats(), this.attributes.values())); |
| 14897 |
} |
| 14898 |
}, { |
| 14899 |
key: "format", |
| 14900 |
value: function format(name, value) { |
| 14901 |
var attribute = _parchment2.default.query(name, _parchment2.default.Scope.BLOCK_ATTRIBUTE); |
| 14902 |
if (attribute != null) { |
| 14903 |
this.attributes.attribute(attribute, value); |
| 14904 |
} |
| 14905 |
} |
| 14906 |
}, { |
| 14907 |
key: "formatAt", |
| 14908 |
value: function formatAt(index, length, name, value) { |
| 14909 |
this.format(name, value); |
| 14910 |
} |
| 14911 |
}, { |
| 14912 |
key: "insertAt", |
| 14913 |
value: function insertAt(index, value, def) { |
| 14914 |
if (typeof value === "string" && value.endsWith("\n")) { |
| 14915 |
var block = _parchment2.default.create(Block.blotName); |
| 14916 |
this.parent.insertBefore(block, index === 0 ? this : this.next); |
| 14917 |
block.insertAt(0, value.slice(0, -1)); |
| 14918 |
} else { |
| 14919 |
_get(BlockEmbed2.prototype.__proto__ || Object.getPrototypeOf(BlockEmbed2.prototype), "insertAt", this).call(this, index, value, def); |
| 14920 |
} |
| 14921 |
} |
| 14922 |
}]); |
| 14923 |
return BlockEmbed2; |
| 14924 |
}(_parchment2.default.Embed); |
| 14925 |
BlockEmbed.scope = _parchment2.default.Scope.BLOCK_BLOT; |
| 14926 |
var Block = function(_Parchment$Block) { |
| 14927 |
_inherits2(Block2, _Parchment$Block); |
| 14928 |
function Block2(domNode) { |
| 14929 |
_classCallCheck2(this, Block2); |
| 14930 |
var _this2 = _possibleConstructorReturn2(this, (Block2.__proto__ || Object.getPrototypeOf(Block2)).call(this, domNode)); |
| 14931 |
_this2.cache = {}; |
| 14932 |
return _this2; |
| 14933 |
} |
| 14934 |
_createClass2(Block2, [{ |
| 14935 |
key: "delta", |
| 14936 |
value: function delta() { |
| 14937 |
if (this.cache.delta == null) { |
| 14938 |
this.cache.delta = this.descendants(_parchment2.default.Leaf).reduce(function(delta2, leaf) { |
| 14939 |
if (leaf.length() === 0) { |
| 14940 |
return delta2; |
| 14941 |
} else { |
| 14942 |
return delta2.insert(leaf.value(), bubbleFormats(leaf)); |
| 14943 |
} |
| 14944 |
}, new _quillDelta2.default()).insert("\n", bubbleFormats(this)); |
| 14945 |
} |
| 14946 |
return this.cache.delta; |
| 14947 |
} |
| 14948 |
}, { |
| 14949 |
key: "deleteAt", |
| 14950 |
value: function deleteAt(index, length) { |
| 14951 |
_get(Block2.prototype.__proto__ || Object.getPrototypeOf(Block2.prototype), "deleteAt", this).call(this, index, length); |
| 14952 |
this.cache = {}; |
| 14953 |
} |
| 14954 |
}, { |
| 14955 |
key: "formatAt", |
| 14956 |
value: function formatAt(index, length, name, value) { |
| 14957 |
if (length <= 0) return; |
| 14958 |
if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK)) { |
| 14959 |
if (index + length === this.length()) { |
| 14960 |
this.format(name, value); |
| 14961 |
} |
| 14962 |
} else { |
| 14963 |
_get(Block2.prototype.__proto__ || Object.getPrototypeOf(Block2.prototype), "formatAt", this).call(this, index, Math.min(length, this.length() - index - 1), name, value); |
| 14964 |
} |
| 14965 |
this.cache = {}; |
| 14966 |
} |
| 14967 |
}, { |
| 14968 |
key: "insertAt", |
| 14969 |
value: function insertAt(index, value, def) { |
| 14970 |
if (def != null) return _get(Block2.prototype.__proto__ || Object.getPrototypeOf(Block2.prototype), "insertAt", this).call(this, index, value, def); |
| 14971 |
if (value.length === 0) return; |
| 14972 |
var lines = value.split("\n"); |
| 14973 |
var text = lines.shift(); |
| 14974 |
if (text.length > 0) { |
| 14975 |
if (index < this.length() - 1 || this.children.tail == null) { |
| 14976 |
_get(Block2.prototype.__proto__ || Object.getPrototypeOf(Block2.prototype), "insertAt", this).call(this, Math.min(index, this.length() - 1), text); |
| 14977 |
} else { |
| 14978 |
this.children.tail.insertAt(this.children.tail.length(), text); |
| 14979 |
} |
| 14980 |
this.cache = {}; |
| 14981 |
} |
| 14982 |
var block = this; |
| 14983 |
lines.reduce(function(index2, line) { |
| 14984 |
block = block.split(index2, true); |
| 14985 |
block.insertAt(0, line); |
| 14986 |
return line.length; |
| 14987 |
}, index + text.length); |
| 14988 |
} |
| 14989 |
}, { |
| 14990 |
key: "insertBefore", |
| 14991 |
value: function insertBefore(blot, ref) { |
| 14992 |
var head = this.children.head; |
| 14993 |
_get(Block2.prototype.__proto__ || Object.getPrototypeOf(Block2.prototype), "insertBefore", this).call(this, blot, ref); |
| 14994 |
if (head instanceof _break2.default) { |
| 14995 |
head.remove(); |
| 14996 |
} |
| 14997 |
this.cache = {}; |
| 14998 |
} |
| 14999 |
}, { |
| 15000 |
key: "length", |
| 15001 |
value: function length() { |
| 15002 |
if (this.cache.length == null) { |
| 15003 |
this.cache.length = _get(Block2.prototype.__proto__ || Object.getPrototypeOf(Block2.prototype), "length", this).call(this) + NEWLINE_LENGTH; |
| 15004 |
} |
| 15005 |
return this.cache.length; |
| 15006 |
} |
| 15007 |
}, { |
| 15008 |
key: "moveChildren", |
| 15009 |
value: function moveChildren(target, ref) { |
| 15010 |
_get(Block2.prototype.__proto__ || Object.getPrototypeOf(Block2.prototype), "moveChildren", this).call(this, target, ref); |
| 15011 |
this.cache = {}; |
| 15012 |
} |
| 15013 |
}, { |
| 15014 |
key: "optimize", |
| 15015 |
value: function optimize(context) { |
| 15016 |
_get(Block2.prototype.__proto__ || Object.getPrototypeOf(Block2.prototype), "optimize", this).call(this, context); |
| 15017 |
this.cache = {}; |
| 15018 |
} |
| 15019 |
}, { |
| 15020 |
key: "path", |
| 15021 |
value: function path(index) { |
| 15022 |
return _get(Block2.prototype.__proto__ || Object.getPrototypeOf(Block2.prototype), "path", this).call(this, index, true); |
| 15023 |
} |
| 15024 |
}, { |
| 15025 |
key: "removeChild", |
| 15026 |
value: function removeChild(child) { |
| 15027 |
_get(Block2.prototype.__proto__ || Object.getPrototypeOf(Block2.prototype), "removeChild", this).call(this, child); |
| 15028 |
this.cache = {}; |
| 15029 |
} |
| 15030 |
}, { |
| 15031 |
key: "split", |
| 15032 |
value: function split(index) { |
| 15033 |
var force = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; |
| 15034 |
if (force && (index === 0 || index >= this.length() - NEWLINE_LENGTH)) { |
| 15035 |
var clone = this.clone(); |
| 15036 |
if (index === 0) { |
| 15037 |
this.parent.insertBefore(clone, this); |
| 15038 |
return this; |
| 15039 |
} else { |
| 15040 |
this.parent.insertBefore(clone, this.next); |
| 15041 |
return clone; |
| 15042 |
} |
| 15043 |
} else { |
| 15044 |
var next = _get(Block2.prototype.__proto__ || Object.getPrototypeOf(Block2.prototype), "split", this).call(this, index, force); |
| 15045 |
this.cache = {}; |
| 15046 |
return next; |
| 15047 |
} |
| 15048 |
} |
| 15049 |
}]); |
| 15050 |
return Block2; |
| 15051 |
}(_parchment2.default.Block); |
| 15052 |
Block.blotName = "block"; |
| 15053 |
Block.tagName = "P"; |
| 15054 |
Block.defaultChild = "break"; |
| 15055 |
Block.allowedChildren = [_inline2.default, _parchment2.default.Embed, _text2.default]; |
| 15056 |
function bubbleFormats(blot) { |
| 15057 |
var formats = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; |
| 15058 |
if (blot == null) return formats; |
| 15059 |
if (typeof blot.formats === "function") { |
| 15060 |
formats = (0, _extend2.default)(formats, blot.formats()); |
| 15061 |
} |
| 15062 |
if (blot.parent == null || blot.parent.blotName == "scroll" || blot.parent.statics.scope !== blot.statics.scope) { |
| 15063 |
return formats; |
| 15064 |
} |
| 15065 |
return bubbleFormats(blot.parent, formats); |
| 15066 |
} |
| 15067 |
exports$12.bubbleFormats = bubbleFormats; |
| 15068 |
exports$12.BlockEmbed = BlockEmbed; |
| 15069 |
exports$12.default = Block; |
| 15070 |
}, |
| 15071 |
/* 5 */ |
| 15072 |
/***/ |
| 15073 |
function(module2, exports$12, __webpack_require__) { |
| 15074 |
Object.defineProperty(exports$12, "__esModule", { |
| 15075 |
value: true |
| 15076 |
}); |
| 15077 |
exports$12.default = exports$12.overload = exports$12.expandConfig = void 0; |
| 15078 |
var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { |
| 15079 |
return typeof obj; |
| 15080 |
} : function(obj) { |
| 15081 |
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; |
| 15082 |
}; |
| 15083 |
var _slicedToArray2 = /* @__PURE__ */ function() { |
| 15084 |
function sliceIterator(arr, i) { |
| 15085 |
var _arr = []; |
| 15086 |
var _n = true; |
| 15087 |
var _d2 = false; |
| 15088 |
var _e2 = void 0; |
| 15089 |
try { |
| 15090 |
for (var _i2 = arr[Symbol.iterator](), _s; !(_n = (_s = _i2.next()).done); _n = true) { |
| 15091 |
_arr.push(_s.value); |
| 15092 |
if (i && _arr.length === i) break; |
| 15093 |
} |
| 15094 |
} catch (err) { |
| 15095 |
_d2 = true; |
| 15096 |
_e2 = err; |
| 15097 |
} finally { |
| 15098 |
try { |
| 15099 |
if (!_n && _i2["return"]) _i2["return"](); |
| 15100 |
} finally { |
| 15101 |
if (_d2) throw _e2; |
| 15102 |
} |
| 15103 |
} |
| 15104 |
return _arr; |
| 15105 |
} |
| 15106 |
return function(arr, i) { |
| 15107 |
if (Array.isArray(arr)) { |
| 15108 |
return arr; |
| 15109 |
} else if (Symbol.iterator in Object(arr)) { |
| 15110 |
return sliceIterator(arr, i); |
| 15111 |
} else { |
| 15112 |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); |
| 15113 |
} |
| 15114 |
}; |
| 15115 |
}(); |
| 15116 |
var _createClass2 = /* @__PURE__ */ function() { |
| 15117 |
function defineProperties(target, props) { |
| 15118 |
for (var i = 0; i < props.length; i++) { |
| 15119 |
var descriptor = props[i]; |
| 15120 |
descriptor.enumerable = descriptor.enumerable || false; |
| 15121 |
descriptor.configurable = true; |
| 15122 |
if ("value" in descriptor) descriptor.writable = true; |
| 15123 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 15124 |
} |
| 15125 |
} |
| 15126 |
return function(Constructor, protoProps, staticProps) { |
| 15127 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 15128 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 15129 |
return Constructor; |
| 15130 |
}; |
| 15131 |
}(); |
| 15132 |
__webpack_require__(50); |
| 15133 |
var _quillDelta = __webpack_require__(2); |
| 15134 |
var _quillDelta2 = _interopRequireDefault(_quillDelta); |
| 15135 |
var _editor = __webpack_require__(14); |
| 15136 |
var _editor2 = _interopRequireDefault(_editor); |
| 15137 |
var _emitter3 = __webpack_require__(8); |
| 15138 |
var _emitter4 = _interopRequireDefault(_emitter3); |
| 15139 |
var _module = __webpack_require__(9); |
| 15140 |
var _module2 = _interopRequireDefault(_module); |
| 15141 |
var _parchment = __webpack_require__(0); |
| 15142 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 15143 |
var _selection = __webpack_require__(15); |
| 15144 |
var _selection2 = _interopRequireDefault(_selection); |
| 15145 |
var _extend = __webpack_require__(3); |
| 15146 |
var _extend2 = _interopRequireDefault(_extend); |
| 15147 |
var _logger = __webpack_require__(10); |
| 15148 |
var _logger2 = _interopRequireDefault(_logger); |
| 15149 |
var _theme = __webpack_require__(34); |
| 15150 |
var _theme2 = _interopRequireDefault(_theme); |
| 15151 |
function _interopRequireDefault(obj) { |
| 15152 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 15153 |
} |
| 15154 |
function _defineProperty2(obj, key, value) { |
| 15155 |
if (key in obj) { |
| 15156 |
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); |
| 15157 |
} else { |
| 15158 |
obj[key] = value; |
| 15159 |
} |
| 15160 |
return obj; |
| 15161 |
} |
| 15162 |
function _classCallCheck2(instance, Constructor) { |
| 15163 |
if (!(instance instanceof Constructor)) { |
| 15164 |
throw new TypeError("Cannot call a class as a function"); |
| 15165 |
} |
| 15166 |
} |
| 15167 |
var debug = (0, _logger2.default)("quill"); |
| 15168 |
var Quill = function() { |
| 15169 |
_createClass2(Quill2, null, [{ |
| 15170 |
key: "debug", |
| 15171 |
value: function debug2(limit) { |
| 15172 |
if (limit === true) { |
| 15173 |
limit = "log"; |
| 15174 |
} |
| 15175 |
_logger2.default.level(limit); |
| 15176 |
} |
| 15177 |
}, { |
| 15178 |
key: "find", |
| 15179 |
value: function find(node) { |
| 15180 |
return node.__quill || _parchment2.default.find(node); |
| 15181 |
} |
| 15182 |
}, { |
| 15183 |
key: "import", |
| 15184 |
value: function _import(name) { |
| 15185 |
if (this.imports[name] == null) { |
| 15186 |
debug.error("Cannot import " + name + ". Are you sure it was registered?"); |
| 15187 |
} |
| 15188 |
return this.imports[name]; |
| 15189 |
} |
| 15190 |
}, { |
| 15191 |
key: "register", |
| 15192 |
value: function register(path, target) { |
| 15193 |
var _this = this; |
| 15194 |
var overwrite = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false; |
| 15195 |
if (typeof path !== "string") { |
| 15196 |
var name = path.attrName || path.blotName; |
| 15197 |
if (typeof name === "string") { |
| 15198 |
this.register("formats/" + name, path, target); |
| 15199 |
} else { |
| 15200 |
Object.keys(path).forEach(function(key) { |
| 15201 |
_this.register(key, path[key], target); |
| 15202 |
}); |
| 15203 |
} |
| 15204 |
} else { |
| 15205 |
if (this.imports[path] != null && !overwrite) { |
| 15206 |
debug.warn("Overwriting " + path + " with", target); |
| 15207 |
} |
| 15208 |
this.imports[path] = target; |
| 15209 |
if ((path.startsWith("blots/") || path.startsWith("formats/")) && target.blotName !== "abstract") { |
| 15210 |
_parchment2.default.register(target); |
| 15211 |
} else if (path.startsWith("modules") && typeof target.register === "function") { |
| 15212 |
target.register(); |
| 15213 |
} |
| 15214 |
} |
| 15215 |
} |
| 15216 |
}]); |
| 15217 |
function Quill2(container) { |
| 15218 |
var _this2 = this; |
| 15219 |
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; |
| 15220 |
_classCallCheck2(this, Quill2); |
| 15221 |
this.options = expandConfig(container, options); |
| 15222 |
this.container = this.options.container; |
| 15223 |
if (this.container == null) { |
| 15224 |
return debug.error("Invalid Quill container", container); |
| 15225 |
} |
| 15226 |
if (this.options.debug) { |
| 15227 |
Quill2.debug(this.options.debug); |
| 15228 |
} |
| 15229 |
var html = this.container.innerHTML.trim(); |
| 15230 |
this.container.classList.add("ql-container"); |
| 15231 |
this.container.innerHTML = ""; |
| 15232 |
this.container.__quill = this; |
| 15233 |
this.root = this.addContainer("ql-editor"); |
| 15234 |
this.root.classList.add("ql-blank"); |
| 15235 |
this.root.setAttribute("data-gramm", false); |
| 15236 |
this.scrollingContainer = this.options.scrollingContainer || this.root; |
| 15237 |
this.emitter = new _emitter4.default(); |
| 15238 |
this.scroll = _parchment2.default.create(this.root, { |
| 15239 |
emitter: this.emitter, |
| 15240 |
whitelist: this.options.formats |
| 15241 |
}); |
| 15242 |
this.editor = new _editor2.default(this.scroll); |
| 15243 |
this.selection = new _selection2.default(this.scroll, this.emitter); |
| 15244 |
this.theme = new this.options.theme(this, this.options); |
| 15245 |
this.keyboard = this.theme.addModule("keyboard"); |
| 15246 |
this.clipboard = this.theme.addModule("clipboard"); |
| 15247 |
this.history = this.theme.addModule("history"); |
| 15248 |
this.theme.init(); |
| 15249 |
this.emitter.on(_emitter4.default.events.EDITOR_CHANGE, function(type) { |
| 15250 |
if (type === _emitter4.default.events.TEXT_CHANGE) { |
| 15251 |
_this2.root.classList.toggle("ql-blank", _this2.editor.isBlank()); |
| 15252 |
} |
| 15253 |
}); |
| 15254 |
this.emitter.on(_emitter4.default.events.SCROLL_UPDATE, function(source, mutations) { |
| 15255 |
var range = _this2.selection.lastRange; |
| 15256 |
var index = range && range.length === 0 ? range.index : void 0; |
| 15257 |
modify.call(_this2, function() { |
| 15258 |
return _this2.editor.update(null, mutations, index); |
| 15259 |
}, source); |
| 15260 |
}); |
| 15261 |
var contents = this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">` + html + "<p><br></p></div>"); |
| 15262 |
this.setContents(contents); |
| 15263 |
this.history.clear(); |
| 15264 |
if (this.options.placeholder) { |
| 15265 |
this.root.setAttribute("data-placeholder", this.options.placeholder); |
| 15266 |
} |
| 15267 |
if (this.options.readOnly) { |
| 15268 |
this.disable(); |
| 15269 |
} |
| 15270 |
} |
| 15271 |
_createClass2(Quill2, [{ |
| 15272 |
key: "addContainer", |
| 15273 |
value: function addContainer(container) { |
| 15274 |
var refNode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null; |
| 15275 |
if (typeof container === "string") { |
| 15276 |
var className = container; |
| 15277 |
container = document.createElement("div"); |
| 15278 |
container.classList.add(className); |
| 15279 |
} |
| 15280 |
this.container.insertBefore(container, refNode); |
| 15281 |
return container; |
| 15282 |
} |
| 15283 |
}, { |
| 15284 |
key: "blur", |
| 15285 |
value: function blur() { |
| 15286 |
this.selection.setRange(null); |
| 15287 |
} |
| 15288 |
}, { |
| 15289 |
key: "deleteText", |
| 15290 |
value: function deleteText(index, length, source) { |
| 15291 |
var _this3 = this; |
| 15292 |
var _overload = overload(index, length, source); |
| 15293 |
var _overload2 = _slicedToArray2(_overload, 4); |
| 15294 |
index = _overload2[0]; |
| 15295 |
length = _overload2[1]; |
| 15296 |
source = _overload2[3]; |
| 15297 |
return modify.call(this, function() { |
| 15298 |
return _this3.editor.deleteText(index, length); |
| 15299 |
}, source, index, -1 * length); |
| 15300 |
} |
| 15301 |
}, { |
| 15302 |
key: "disable", |
| 15303 |
value: function disable() { |
| 15304 |
this.enable(false); |
| 15305 |
} |
| 15306 |
}, { |
| 15307 |
key: "enable", |
| 15308 |
value: function enable() { |
| 15309 |
var enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true; |
| 15310 |
this.scroll.enable(enabled); |
| 15311 |
this.container.classList.toggle("ql-disabled", !enabled); |
| 15312 |
} |
| 15313 |
}, { |
| 15314 |
key: "focus", |
| 15315 |
value: function focus() { |
| 15316 |
var scrollTop = this.scrollingContainer.scrollTop; |
| 15317 |
this.selection.focus(); |
| 15318 |
this.scrollingContainer.scrollTop = scrollTop; |
| 15319 |
this.scrollIntoView(); |
| 15320 |
} |
| 15321 |
}, { |
| 15322 |
key: "format", |
| 15323 |
value: function format(name, value) { |
| 15324 |
var _this4 = this; |
| 15325 |
var source = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _emitter4.default.sources.API; |
| 15326 |
return modify.call(this, function() { |
| 15327 |
var range = _this4.getSelection(true); |
| 15328 |
var change = new _quillDelta2.default(); |
| 15329 |
if (range == null) { |
| 15330 |
return change; |
| 15331 |
} else if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK)) { |
| 15332 |
change = _this4.editor.formatLine(range.index, range.length, _defineProperty2({}, name, value)); |
| 15333 |
} else if (range.length === 0) { |
| 15334 |
_this4.selection.format(name, value); |
| 15335 |
return change; |
| 15336 |
} else { |
| 15337 |
change = _this4.editor.formatText(range.index, range.length, _defineProperty2({}, name, value)); |
| 15338 |
} |
| 15339 |
_this4.setSelection(range, _emitter4.default.sources.SILENT); |
| 15340 |
return change; |
| 15341 |
}, source); |
| 15342 |
} |
| 15343 |
}, { |
| 15344 |
key: "formatLine", |
| 15345 |
value: function formatLine(index, length, name, value, source) { |
| 15346 |
var _this5 = this; |
| 15347 |
var formats = void 0; |
| 15348 |
var _overload3 = overload(index, length, name, value, source); |
| 15349 |
var _overload4 = _slicedToArray2(_overload3, 4); |
| 15350 |
index = _overload4[0]; |
| 15351 |
length = _overload4[1]; |
| 15352 |
formats = _overload4[2]; |
| 15353 |
source = _overload4[3]; |
| 15354 |
return modify.call(this, function() { |
| 15355 |
return _this5.editor.formatLine(index, length, formats); |
| 15356 |
}, source, index, 0); |
| 15357 |
} |
| 15358 |
}, { |
| 15359 |
key: "formatText", |
| 15360 |
value: function formatText(index, length, name, value, source) { |
| 15361 |
var _this6 = this; |
| 15362 |
var formats = void 0; |
| 15363 |
var _overload5 = overload(index, length, name, value, source); |
| 15364 |
var _overload6 = _slicedToArray2(_overload5, 4); |
| 15365 |
index = _overload6[0]; |
| 15366 |
length = _overload6[1]; |
| 15367 |
formats = _overload6[2]; |
| 15368 |
source = _overload6[3]; |
| 15369 |
return modify.call(this, function() { |
| 15370 |
return _this6.editor.formatText(index, length, formats); |
| 15371 |
}, source, index, 0); |
| 15372 |
} |
| 15373 |
}, { |
| 15374 |
key: "getBounds", |
| 15375 |
value: function getBounds(index) { |
| 15376 |
var length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; |
| 15377 |
var bounds = void 0; |
| 15378 |
if (typeof index === "number") { |
| 15379 |
bounds = this.selection.getBounds(index, length); |
| 15380 |
} else { |
| 15381 |
bounds = this.selection.getBounds(index.index, index.length); |
| 15382 |
} |
| 15383 |
var containerBounds = this.container.getBoundingClientRect(); |
| 15384 |
return { |
| 15385 |
bottom: bounds.bottom - containerBounds.top, |
| 15386 |
height: bounds.height, |
| 15387 |
left: bounds.left - containerBounds.left, |
| 15388 |
right: bounds.right - containerBounds.left, |
| 15389 |
top: bounds.top - containerBounds.top, |
| 15390 |
width: bounds.width |
| 15391 |
}; |
| 15392 |
} |
| 15393 |
}, { |
| 15394 |
key: "getContents", |
| 15395 |
value: function getContents() { |
| 15396 |
var index = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; |
| 15397 |
var length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.getLength() - index; |
| 15398 |
var _overload7 = overload(index, length); |
| 15399 |
var _overload8 = _slicedToArray2(_overload7, 2); |
| 15400 |
index = _overload8[0]; |
| 15401 |
length = _overload8[1]; |
| 15402 |
return this.editor.getContents(index, length); |
| 15403 |
} |
| 15404 |
}, { |
| 15405 |
key: "getFormat", |
| 15406 |
value: function getFormat() { |
| 15407 |
var index = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.getSelection(true); |
| 15408 |
var length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; |
| 15409 |
if (typeof index === "number") { |
| 15410 |
return this.editor.getFormat(index, length); |
| 15411 |
} else { |
| 15412 |
return this.editor.getFormat(index.index, index.length); |
| 15413 |
} |
| 15414 |
} |
| 15415 |
}, { |
| 15416 |
key: "getIndex", |
| 15417 |
value: function getIndex(blot) { |
| 15418 |
return blot.offset(this.scroll); |
| 15419 |
} |
| 15420 |
}, { |
| 15421 |
key: "getLength", |
| 15422 |
value: function getLength() { |
| 15423 |
return this.scroll.length(); |
| 15424 |
} |
| 15425 |
}, { |
| 15426 |
key: "getLeaf", |
| 15427 |
value: function getLeaf(index) { |
| 15428 |
return this.scroll.leaf(index); |
| 15429 |
} |
| 15430 |
}, { |
| 15431 |
key: "getLine", |
| 15432 |
value: function getLine(index) { |
| 15433 |
return this.scroll.line(index); |
| 15434 |
} |
| 15435 |
}, { |
| 15436 |
key: "getLines", |
| 15437 |
value: function getLines() { |
| 15438 |
var index = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; |
| 15439 |
var length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Number.MAX_VALUE; |
| 15440 |
if (typeof index !== "number") { |
| 15441 |
return this.scroll.lines(index.index, index.length); |
| 15442 |
} else { |
| 15443 |
return this.scroll.lines(index, length); |
| 15444 |
} |
| 15445 |
} |
| 15446 |
}, { |
| 15447 |
key: "getModule", |
| 15448 |
value: function getModule(name) { |
| 15449 |
return this.theme.modules[name]; |
| 15450 |
} |
| 15451 |
}, { |
| 15452 |
key: "getSelection", |
| 15453 |
value: function getSelection() { |
| 15454 |
var focus = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false; |
| 15455 |
if (focus) this.focus(); |
| 15456 |
this.update(); |
| 15457 |
return this.selection.getRange()[0]; |
| 15458 |
} |
| 15459 |
}, { |
| 15460 |
key: "getText", |
| 15461 |
value: function getText() { |
| 15462 |
var index = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; |
| 15463 |
var length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.getLength() - index; |
| 15464 |
var _overload9 = overload(index, length); |
| 15465 |
var _overload10 = _slicedToArray2(_overload9, 2); |
| 15466 |
index = _overload10[0]; |
| 15467 |
length = _overload10[1]; |
| 15468 |
return this.editor.getText(index, length); |
| 15469 |
} |
| 15470 |
}, { |
| 15471 |
key: "hasFocus", |
| 15472 |
value: function hasFocus() { |
| 15473 |
return this.selection.hasFocus(); |
| 15474 |
} |
| 15475 |
}, { |
| 15476 |
key: "insertEmbed", |
| 15477 |
value: function insertEmbed(index, embed, value) { |
| 15478 |
var _this7 = this; |
| 15479 |
var source = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : Quill2.sources.API; |
| 15480 |
return modify.call(this, function() { |
| 15481 |
return _this7.editor.insertEmbed(index, embed, value); |
| 15482 |
}, source, index); |
| 15483 |
} |
| 15484 |
}, { |
| 15485 |
key: "insertText", |
| 15486 |
value: function insertText(index, text, name, value, source) { |
| 15487 |
var _this8 = this; |
| 15488 |
var formats = void 0; |
| 15489 |
var _overload11 = overload(index, 0, name, value, source); |
| 15490 |
var _overload12 = _slicedToArray2(_overload11, 4); |
| 15491 |
index = _overload12[0]; |
| 15492 |
formats = _overload12[2]; |
| 15493 |
source = _overload12[3]; |
| 15494 |
return modify.call(this, function() { |
| 15495 |
return _this8.editor.insertText(index, text, formats); |
| 15496 |
}, source, index, text.length); |
| 15497 |
} |
| 15498 |
}, { |
| 15499 |
key: "isEnabled", |
| 15500 |
value: function isEnabled() { |
| 15501 |
return !this.container.classList.contains("ql-disabled"); |
| 15502 |
} |
| 15503 |
}, { |
| 15504 |
key: "off", |
| 15505 |
value: function off() { |
| 15506 |
return this.emitter.off.apply(this.emitter, arguments); |
| 15507 |
} |
| 15508 |
}, { |
| 15509 |
key: "on", |
| 15510 |
value: function on() { |
| 15511 |
return this.emitter.on.apply(this.emitter, arguments); |
| 15512 |
} |
| 15513 |
}, { |
| 15514 |
key: "once", |
| 15515 |
value: function once() { |
| 15516 |
return this.emitter.once.apply(this.emitter, arguments); |
| 15517 |
} |
| 15518 |
}, { |
| 15519 |
key: "pasteHTML", |
| 15520 |
value: function pasteHTML(index, html, source) { |
| 15521 |
this.clipboard.dangerouslyPasteHTML(index, html, source); |
| 15522 |
} |
| 15523 |
}, { |
| 15524 |
key: "removeFormat", |
| 15525 |
value: function removeFormat(index, length, source) { |
| 15526 |
var _this9 = this; |
| 15527 |
var _overload13 = overload(index, length, source); |
| 15528 |
var _overload14 = _slicedToArray2(_overload13, 4); |
| 15529 |
index = _overload14[0]; |
| 15530 |
length = _overload14[1]; |
| 15531 |
source = _overload14[3]; |
| 15532 |
return modify.call(this, function() { |
| 15533 |
return _this9.editor.removeFormat(index, length); |
| 15534 |
}, source, index); |
| 15535 |
} |
| 15536 |
}, { |
| 15537 |
key: "scrollIntoView", |
| 15538 |
value: function scrollIntoView() { |
| 15539 |
this.selection.scrollIntoView(this.scrollingContainer); |
| 15540 |
} |
| 15541 |
}, { |
| 15542 |
key: "setContents", |
| 15543 |
value: function setContents(delta) { |
| 15544 |
var _this10 = this; |
| 15545 |
var source = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : _emitter4.default.sources.API; |
| 15546 |
return modify.call(this, function() { |
| 15547 |
delta = new _quillDelta2.default(delta); |
| 15548 |
var length = _this10.getLength(); |
| 15549 |
var deleted = _this10.editor.deleteText(0, length); |
| 15550 |
var applied = _this10.editor.applyDelta(delta); |
| 15551 |
var lastOp = applied.ops[applied.ops.length - 1]; |
| 15552 |
if (lastOp != null && typeof lastOp.insert === "string" && lastOp.insert[lastOp.insert.length - 1] === "\n") { |
| 15553 |
_this10.editor.deleteText(_this10.getLength() - 1, 1); |
| 15554 |
applied.delete(1); |
| 15555 |
} |
| 15556 |
var ret = deleted.compose(applied); |
| 15557 |
return ret; |
| 15558 |
}, source); |
| 15559 |
} |
| 15560 |
}, { |
| 15561 |
key: "setSelection", |
| 15562 |
value: function setSelection(index, length, source) { |
| 15563 |
if (index == null) { |
| 15564 |
this.selection.setRange(null, length || Quill2.sources.API); |
| 15565 |
} else { |
| 15566 |
var _overload15 = overload(index, length, source); |
| 15567 |
var _overload16 = _slicedToArray2(_overload15, 4); |
| 15568 |
index = _overload16[0]; |
| 15569 |
length = _overload16[1]; |
| 15570 |
source = _overload16[3]; |
| 15571 |
this.selection.setRange(new _selection.Range(index, length), source); |
| 15572 |
if (source !== _emitter4.default.sources.SILENT) { |
| 15573 |
this.selection.scrollIntoView(this.scrollingContainer); |
| 15574 |
} |
| 15575 |
} |
| 15576 |
} |
| 15577 |
}, { |
| 15578 |
key: "setText", |
| 15579 |
value: function setText(text) { |
| 15580 |
var source = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : _emitter4.default.sources.API; |
| 15581 |
var delta = new _quillDelta2.default().insert(text); |
| 15582 |
return this.setContents(delta, source); |
| 15583 |
} |
| 15584 |
}, { |
| 15585 |
key: "update", |
| 15586 |
value: function update() { |
| 15587 |
var source = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : _emitter4.default.sources.USER; |
| 15588 |
var change = this.scroll.update(source); |
| 15589 |
this.selection.update(source); |
| 15590 |
return change; |
| 15591 |
} |
| 15592 |
}, { |
| 15593 |
key: "updateContents", |
| 15594 |
value: function updateContents(delta) { |
| 15595 |
var _this11 = this; |
| 15596 |
var source = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : _emitter4.default.sources.API; |
| 15597 |
return modify.call(this, function() { |
| 15598 |
delta = new _quillDelta2.default(delta); |
| 15599 |
return _this11.editor.applyDelta(delta, source); |
| 15600 |
}, source, true); |
| 15601 |
} |
| 15602 |
}]); |
| 15603 |
return Quill2; |
| 15604 |
}(); |
| 15605 |
Quill.DEFAULTS = { |
| 15606 |
bounds: null, |
| 15607 |
formats: null, |
| 15608 |
modules: {}, |
| 15609 |
placeholder: "", |
| 15610 |
readOnly: false, |
| 15611 |
scrollingContainer: null, |
| 15612 |
strict: true, |
| 15613 |
theme: "default" |
| 15614 |
}; |
| 15615 |
Quill.events = _emitter4.default.events; |
| 15616 |
Quill.sources = _emitter4.default.sources; |
| 15617 |
Quill.version = "1.3.7"; |
| 15618 |
Quill.imports = { |
| 15619 |
"delta": _quillDelta2.default, |
| 15620 |
"parchment": _parchment2.default, |
| 15621 |
"core/module": _module2.default, |
| 15622 |
"core/theme": _theme2.default |
| 15623 |
}; |
| 15624 |
function expandConfig(container, userConfig) { |
| 15625 |
userConfig = (0, _extend2.default)(true, { |
| 15626 |
container, |
| 15627 |
modules: { |
| 15628 |
clipboard: true, |
| 15629 |
keyboard: true, |
| 15630 |
history: true |
| 15631 |
} |
| 15632 |
}, userConfig); |
| 15633 |
if (!userConfig.theme || userConfig.theme === Quill.DEFAULTS.theme) { |
| 15634 |
userConfig.theme = _theme2.default; |
| 15635 |
} else { |
| 15636 |
userConfig.theme = Quill.import("themes/" + userConfig.theme); |
| 15637 |
if (userConfig.theme == null) { |
| 15638 |
throw new Error("Invalid theme " + userConfig.theme + ". Did you register it?"); |
| 15639 |
} |
| 15640 |
} |
| 15641 |
var themeConfig = (0, _extend2.default)(true, {}, userConfig.theme.DEFAULTS); |
| 15642 |
[themeConfig, userConfig].forEach(function(config) { |
| 15643 |
config.modules = config.modules || {}; |
| 15644 |
Object.keys(config.modules).forEach(function(module3) { |
| 15645 |
if (config.modules[module3] === true) { |
| 15646 |
config.modules[module3] = {}; |
| 15647 |
} |
| 15648 |
}); |
| 15649 |
}); |
| 15650 |
var moduleNames = Object.keys(themeConfig.modules).concat(Object.keys(userConfig.modules)); |
| 15651 |
var moduleConfig = moduleNames.reduce(function(config, name) { |
| 15652 |
var moduleClass = Quill.import("modules/" + name); |
| 15653 |
if (moduleClass == null) { |
| 15654 |
debug.error("Cannot load " + name + " module. Are you sure you registered it?"); |
| 15655 |
} else { |
| 15656 |
config[name] = moduleClass.DEFAULTS || {}; |
| 15657 |
} |
| 15658 |
return config; |
| 15659 |
}, {}); |
| 15660 |
if (userConfig.modules != null && userConfig.modules.toolbar && userConfig.modules.toolbar.constructor !== Object) { |
| 15661 |
userConfig.modules.toolbar = { |
| 15662 |
container: userConfig.modules.toolbar |
| 15663 |
}; |
| 15664 |
} |
| 15665 |
userConfig = (0, _extend2.default)(true, {}, Quill.DEFAULTS, { modules: moduleConfig }, themeConfig, userConfig); |
| 15666 |
["bounds", "container", "scrollingContainer"].forEach(function(key) { |
| 15667 |
if (typeof userConfig[key] === "string") { |
| 15668 |
userConfig[key] = document.querySelector(userConfig[key]); |
| 15669 |
} |
| 15670 |
}); |
| 15671 |
userConfig.modules = Object.keys(userConfig.modules).reduce(function(config, name) { |
| 15672 |
if (userConfig.modules[name]) { |
| 15673 |
config[name] = userConfig.modules[name]; |
| 15674 |
} |
| 15675 |
return config; |
| 15676 |
}, {}); |
| 15677 |
return userConfig; |
| 15678 |
} |
| 15679 |
function modify(modifier, source, index, shift) { |
| 15680 |
if (this.options.strict && !this.isEnabled() && source === _emitter4.default.sources.USER) { |
| 15681 |
return new _quillDelta2.default(); |
| 15682 |
} |
| 15683 |
var range = index == null ? null : this.getSelection(); |
| 15684 |
var oldDelta = this.editor.delta; |
| 15685 |
var change = modifier(); |
| 15686 |
if (range != null) { |
| 15687 |
if (index === true) index = range.index; |
| 15688 |
if (shift == null) { |
| 15689 |
range = shiftRange(range, change, source); |
| 15690 |
} else if (shift !== 0) { |
| 15691 |
range = shiftRange(range, index, shift, source); |
| 15692 |
} |
| 15693 |
this.setSelection(range, _emitter4.default.sources.SILENT); |
| 15694 |
} |
| 15695 |
if (change.length() > 0) { |
| 15696 |
var _emitter; |
| 15697 |
var args = [_emitter4.default.events.TEXT_CHANGE, change, oldDelta, source]; |
| 15698 |
(_emitter = this.emitter).emit.apply(_emitter, [_emitter4.default.events.EDITOR_CHANGE].concat(args)); |
| 15699 |
if (source !== _emitter4.default.sources.SILENT) { |
| 15700 |
var _emitter2; |
| 15701 |
(_emitter2 = this.emitter).emit.apply(_emitter2, args); |
| 15702 |
} |
| 15703 |
} |
| 15704 |
return change; |
| 15705 |
} |
| 15706 |
function overload(index, length, name, value, source) { |
| 15707 |
var formats = {}; |
| 15708 |
if (typeof index.index === "number" && typeof index.length === "number") { |
| 15709 |
if (typeof length !== "number") { |
| 15710 |
source = value, value = name, name = length, length = index.length, index = index.index; |
| 15711 |
} else { |
| 15712 |
length = index.length, index = index.index; |
| 15713 |
} |
| 15714 |
} else if (typeof length !== "number") { |
| 15715 |
source = value, value = name, name = length, length = 0; |
| 15716 |
} |
| 15717 |
if ((typeof name === "undefined" ? "undefined" : _typeof2(name)) === "object") { |
| 15718 |
formats = name; |
| 15719 |
source = value; |
| 15720 |
} else if (typeof name === "string") { |
| 15721 |
if (value != null) { |
| 15722 |
formats[name] = value; |
| 15723 |
} else { |
| 15724 |
source = name; |
| 15725 |
} |
| 15726 |
} |
| 15727 |
source = source || _emitter4.default.sources.API; |
| 15728 |
return [index, length, formats, source]; |
| 15729 |
} |
| 15730 |
function shiftRange(range, index, length, source) { |
| 15731 |
if (range == null) return null; |
| 15732 |
var start = void 0, end = void 0; |
| 15733 |
if (index instanceof _quillDelta2.default) { |
| 15734 |
var _map = [range.index, range.index + range.length].map(function(pos) { |
| 15735 |
return index.transformPosition(pos, source !== _emitter4.default.sources.USER); |
| 15736 |
}); |
| 15737 |
var _map2 = _slicedToArray2(_map, 2); |
| 15738 |
start = _map2[0]; |
| 15739 |
end = _map2[1]; |
| 15740 |
} else { |
| 15741 |
var _map3 = [range.index, range.index + range.length].map(function(pos) { |
| 15742 |
if (pos < index || pos === index && source === _emitter4.default.sources.USER) return pos; |
| 15743 |
if (length >= 0) { |
| 15744 |
return pos + length; |
| 15745 |
} else { |
| 15746 |
return Math.max(index, pos + length); |
| 15747 |
} |
| 15748 |
}); |
| 15749 |
var _map4 = _slicedToArray2(_map3, 2); |
| 15750 |
start = _map4[0]; |
| 15751 |
end = _map4[1]; |
| 15752 |
} |
| 15753 |
return new _selection.Range(start, end - start); |
| 15754 |
} |
| 15755 |
exports$12.expandConfig = expandConfig; |
| 15756 |
exports$12.overload = overload; |
| 15757 |
exports$12.default = Quill; |
| 15758 |
}, |
| 15759 |
/* 6 */ |
| 15760 |
/***/ |
| 15761 |
function(module2, exports$12, __webpack_require__) { |
| 15762 |
Object.defineProperty(exports$12, "__esModule", { |
| 15763 |
value: true |
| 15764 |
}); |
| 15765 |
var _createClass2 = /* @__PURE__ */ function() { |
| 15766 |
function defineProperties(target, props) { |
| 15767 |
for (var i = 0; i < props.length; i++) { |
| 15768 |
var descriptor = props[i]; |
| 15769 |
descriptor.enumerable = descriptor.enumerable || false; |
| 15770 |
descriptor.configurable = true; |
| 15771 |
if ("value" in descriptor) descriptor.writable = true; |
| 15772 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 15773 |
} |
| 15774 |
} |
| 15775 |
return function(Constructor, protoProps, staticProps) { |
| 15776 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 15777 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 15778 |
return Constructor; |
| 15779 |
}; |
| 15780 |
}(); |
| 15781 |
var _get = function get(object, property, receiver) { |
| 15782 |
if (object === null) object = Function.prototype; |
| 15783 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 15784 |
if (desc === void 0) { |
| 15785 |
var parent = Object.getPrototypeOf(object); |
| 15786 |
if (parent === null) { |
| 15787 |
return void 0; |
| 15788 |
} else { |
| 15789 |
return get(parent, property, receiver); |
| 15790 |
} |
| 15791 |
} else if ("value" in desc) { |
| 15792 |
return desc.value; |
| 15793 |
} else { |
| 15794 |
var getter = desc.get; |
| 15795 |
if (getter === void 0) { |
| 15796 |
return void 0; |
| 15797 |
} |
| 15798 |
return getter.call(receiver); |
| 15799 |
} |
| 15800 |
}; |
| 15801 |
var _text = __webpack_require__(7); |
| 15802 |
var _text2 = _interopRequireDefault(_text); |
| 15803 |
var _parchment = __webpack_require__(0); |
| 15804 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 15805 |
function _interopRequireDefault(obj) { |
| 15806 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 15807 |
} |
| 15808 |
function _classCallCheck2(instance, Constructor) { |
| 15809 |
if (!(instance instanceof Constructor)) { |
| 15810 |
throw new TypeError("Cannot call a class as a function"); |
| 15811 |
} |
| 15812 |
} |
| 15813 |
function _possibleConstructorReturn2(self2, call) { |
| 15814 |
if (!self2) { |
| 15815 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 15816 |
} |
| 15817 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 15818 |
} |
| 15819 |
function _inherits2(subClass, superClass) { |
| 15820 |
if (typeof superClass !== "function" && superClass !== null) { |
| 15821 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 15822 |
} |
| 15823 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 15824 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 15825 |
} |
| 15826 |
var Inline = function(_Parchment$Inline) { |
| 15827 |
_inherits2(Inline2, _Parchment$Inline); |
| 15828 |
function Inline2() { |
| 15829 |
_classCallCheck2(this, Inline2); |
| 15830 |
return _possibleConstructorReturn2(this, (Inline2.__proto__ || Object.getPrototypeOf(Inline2)).apply(this, arguments)); |
| 15831 |
} |
| 15832 |
_createClass2(Inline2, [{ |
| 15833 |
key: "formatAt", |
| 15834 |
value: function formatAt(index, length, name, value) { |
| 15835 |
if (Inline2.compare(this.statics.blotName, name) < 0 && _parchment2.default.query(name, _parchment2.default.Scope.BLOT)) { |
| 15836 |
var blot = this.isolate(index, length); |
| 15837 |
if (value) { |
| 15838 |
blot.wrap(name, value); |
| 15839 |
} |
| 15840 |
} else { |
| 15841 |
_get(Inline2.prototype.__proto__ || Object.getPrototypeOf(Inline2.prototype), "formatAt", this).call(this, index, length, name, value); |
| 15842 |
} |
| 15843 |
} |
| 15844 |
}, { |
| 15845 |
key: "optimize", |
| 15846 |
value: function optimize(context) { |
| 15847 |
_get(Inline2.prototype.__proto__ || Object.getPrototypeOf(Inline2.prototype), "optimize", this).call(this, context); |
| 15848 |
if (this.parent instanceof Inline2 && Inline2.compare(this.statics.blotName, this.parent.statics.blotName) > 0) { |
| 15849 |
var parent = this.parent.isolate(this.offset(), this.length()); |
| 15850 |
this.moveChildren(parent); |
| 15851 |
parent.wrap(this); |
| 15852 |
} |
| 15853 |
} |
| 15854 |
}], [{ |
| 15855 |
key: "compare", |
| 15856 |
value: function compare(self2, other) { |
| 15857 |
var selfIndex = Inline2.order.indexOf(self2); |
| 15858 |
var otherIndex = Inline2.order.indexOf(other); |
| 15859 |
if (selfIndex >= 0 || otherIndex >= 0) { |
| 15860 |
return selfIndex - otherIndex; |
| 15861 |
} else if (self2 === other) { |
| 15862 |
return 0; |
| 15863 |
} else if (self2 < other) { |
| 15864 |
return -1; |
| 15865 |
} else { |
| 15866 |
return 1; |
| 15867 |
} |
| 15868 |
} |
| 15869 |
}]); |
| 15870 |
return Inline2; |
| 15871 |
}(_parchment2.default.Inline); |
| 15872 |
Inline.allowedChildren = [Inline, _parchment2.default.Embed, _text2.default]; |
| 15873 |
Inline.order = [ |
| 15874 |
"cursor", |
| 15875 |
"inline", |
| 15876 |
// Must be lower |
| 15877 |
"underline", |
| 15878 |
"strike", |
| 15879 |
"italic", |
| 15880 |
"bold", |
| 15881 |
"script", |
| 15882 |
"link", |
| 15883 |
"code" |
| 15884 |
// Must be higher |
| 15885 |
]; |
| 15886 |
exports$12.default = Inline; |
| 15887 |
}, |
| 15888 |
/* 7 */ |
| 15889 |
/***/ |
| 15890 |
function(module2, exports$12, __webpack_require__) { |
| 15891 |
Object.defineProperty(exports$12, "__esModule", { |
| 15892 |
value: true |
| 15893 |
}); |
| 15894 |
var _parchment = __webpack_require__(0); |
| 15895 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 15896 |
function _interopRequireDefault(obj) { |
| 15897 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 15898 |
} |
| 15899 |
function _classCallCheck2(instance, Constructor) { |
| 15900 |
if (!(instance instanceof Constructor)) { |
| 15901 |
throw new TypeError("Cannot call a class as a function"); |
| 15902 |
} |
| 15903 |
} |
| 15904 |
function _possibleConstructorReturn2(self2, call) { |
| 15905 |
if (!self2) { |
| 15906 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 15907 |
} |
| 15908 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 15909 |
} |
| 15910 |
function _inherits2(subClass, superClass) { |
| 15911 |
if (typeof superClass !== "function" && superClass !== null) { |
| 15912 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 15913 |
} |
| 15914 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 15915 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 15916 |
} |
| 15917 |
var TextBlot = function(_Parchment$Text) { |
| 15918 |
_inherits2(TextBlot2, _Parchment$Text); |
| 15919 |
function TextBlot2() { |
| 15920 |
_classCallCheck2(this, TextBlot2); |
| 15921 |
return _possibleConstructorReturn2(this, (TextBlot2.__proto__ || Object.getPrototypeOf(TextBlot2)).apply(this, arguments)); |
| 15922 |
} |
| 15923 |
return TextBlot2; |
| 15924 |
}(_parchment2.default.Text); |
| 15925 |
exports$12.default = TextBlot; |
| 15926 |
}, |
| 15927 |
/* 8 */ |
| 15928 |
/***/ |
| 15929 |
function(module2, exports$12, __webpack_require__) { |
| 15930 |
Object.defineProperty(exports$12, "__esModule", { |
| 15931 |
value: true |
| 15932 |
}); |
| 15933 |
var _createClass2 = /* @__PURE__ */ function() { |
| 15934 |
function defineProperties(target, props) { |
| 15935 |
for (var i = 0; i < props.length; i++) { |
| 15936 |
var descriptor = props[i]; |
| 15937 |
descriptor.enumerable = descriptor.enumerable || false; |
| 15938 |
descriptor.configurable = true; |
| 15939 |
if ("value" in descriptor) descriptor.writable = true; |
| 15940 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 15941 |
} |
| 15942 |
} |
| 15943 |
return function(Constructor, protoProps, staticProps) { |
| 15944 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 15945 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 15946 |
return Constructor; |
| 15947 |
}; |
| 15948 |
}(); |
| 15949 |
var _get = function get(object, property, receiver) { |
| 15950 |
if (object === null) object = Function.prototype; |
| 15951 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 15952 |
if (desc === void 0) { |
| 15953 |
var parent = Object.getPrototypeOf(object); |
| 15954 |
if (parent === null) { |
| 15955 |
return void 0; |
| 15956 |
} else { |
| 15957 |
return get(parent, property, receiver); |
| 15958 |
} |
| 15959 |
} else if ("value" in desc) { |
| 15960 |
return desc.value; |
| 15961 |
} else { |
| 15962 |
var getter = desc.get; |
| 15963 |
if (getter === void 0) { |
| 15964 |
return void 0; |
| 15965 |
} |
| 15966 |
return getter.call(receiver); |
| 15967 |
} |
| 15968 |
}; |
| 15969 |
var _eventemitter = __webpack_require__(54); |
| 15970 |
var _eventemitter2 = _interopRequireDefault(_eventemitter); |
| 15971 |
var _logger = __webpack_require__(10); |
| 15972 |
var _logger2 = _interopRequireDefault(_logger); |
| 15973 |
function _interopRequireDefault(obj) { |
| 15974 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 15975 |
} |
| 15976 |
function _classCallCheck2(instance, Constructor) { |
| 15977 |
if (!(instance instanceof Constructor)) { |
| 15978 |
throw new TypeError("Cannot call a class as a function"); |
| 15979 |
} |
| 15980 |
} |
| 15981 |
function _possibleConstructorReturn2(self2, call) { |
| 15982 |
if (!self2) { |
| 15983 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 15984 |
} |
| 15985 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 15986 |
} |
| 15987 |
function _inherits2(subClass, superClass) { |
| 15988 |
if (typeof superClass !== "function" && superClass !== null) { |
| 15989 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 15990 |
} |
| 15991 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 15992 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 15993 |
} |
| 15994 |
var debug = (0, _logger2.default)("quill:events"); |
| 15995 |
var EVENTS = ["selectionchange", "mousedown", "mouseup", "click"]; |
| 15996 |
EVENTS.forEach(function(eventName) { |
| 15997 |
document.addEventListener(eventName, function() { |
| 15998 |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { |
| 15999 |
args[_key] = arguments[_key]; |
| 16000 |
} |
| 16001 |
[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(node) { |
| 16002 |
if (node.__quill && node.__quill.emitter) { |
| 16003 |
var _node$__quill$emitter; |
| 16004 |
(_node$__quill$emitter = node.__quill.emitter).handleDOM.apply(_node$__quill$emitter, args); |
| 16005 |
} |
| 16006 |
}); |
| 16007 |
}); |
| 16008 |
}); |
| 16009 |
var Emitter = function(_EventEmitter) { |
| 16010 |
_inherits2(Emitter2, _EventEmitter); |
| 16011 |
function Emitter2() { |
| 16012 |
_classCallCheck2(this, Emitter2); |
| 16013 |
var _this = _possibleConstructorReturn2(this, (Emitter2.__proto__ || Object.getPrototypeOf(Emitter2)).call(this)); |
| 16014 |
_this.listeners = {}; |
| 16015 |
_this.on("error", debug.error); |
| 16016 |
return _this; |
| 16017 |
} |
| 16018 |
_createClass2(Emitter2, [{ |
| 16019 |
key: "emit", |
| 16020 |
value: function emit() { |
| 16021 |
debug.log.apply(debug, arguments); |
| 16022 |
_get(Emitter2.prototype.__proto__ || Object.getPrototypeOf(Emitter2.prototype), "emit", this).apply(this, arguments); |
| 16023 |
} |
| 16024 |
}, { |
| 16025 |
key: "handleDOM", |
| 16026 |
value: function handleDOM(event) { |
| 16027 |
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { |
| 16028 |
args[_key2 - 1] = arguments[_key2]; |
| 16029 |
} |
| 16030 |
(this.listeners[event.type] || []).forEach(function(_ref) { |
| 16031 |
var node = _ref.node, handler = _ref.handler; |
| 16032 |
if (event.target === node || node.contains(event.target)) { |
| 16033 |
handler.apply(void 0, [event].concat(args)); |
| 16034 |
} |
| 16035 |
}); |
| 16036 |
} |
| 16037 |
}, { |
| 16038 |
key: "listenDOM", |
| 16039 |
value: function listenDOM(eventName, node, handler) { |
| 16040 |
if (!this.listeners[eventName]) { |
| 16041 |
this.listeners[eventName] = []; |
| 16042 |
} |
| 16043 |
this.listeners[eventName].push({ node, handler }); |
| 16044 |
} |
| 16045 |
}]); |
| 16046 |
return Emitter2; |
| 16047 |
}(_eventemitter2.default); |
| 16048 |
Emitter.events = { |
| 16049 |
EDITOR_CHANGE: "editor-change", |
| 16050 |
SCROLL_BEFORE_UPDATE: "scroll-before-update", |
| 16051 |
SCROLL_OPTIMIZE: "scroll-optimize", |
| 16052 |
SCROLL_UPDATE: "scroll-update", |
| 16053 |
SELECTION_CHANGE: "selection-change", |
| 16054 |
TEXT_CHANGE: "text-change" |
| 16055 |
}; |
| 16056 |
Emitter.sources = { |
| 16057 |
API: "api", |
| 16058 |
SILENT: "silent", |
| 16059 |
USER: "user" |
| 16060 |
}; |
| 16061 |
exports$12.default = Emitter; |
| 16062 |
}, |
| 16063 |
/* 9 */ |
| 16064 |
/***/ |
| 16065 |
function(module2, exports$12, __webpack_require__) { |
| 16066 |
Object.defineProperty(exports$12, "__esModule", { |
| 16067 |
value: true |
| 16068 |
}); |
| 16069 |
function _classCallCheck2(instance, Constructor) { |
| 16070 |
if (!(instance instanceof Constructor)) { |
| 16071 |
throw new TypeError("Cannot call a class as a function"); |
| 16072 |
} |
| 16073 |
} |
| 16074 |
var Module = function Module2(quill2) { |
| 16075 |
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; |
| 16076 |
_classCallCheck2(this, Module2); |
| 16077 |
this.quill = quill2; |
| 16078 |
this.options = options; |
| 16079 |
}; |
| 16080 |
Module.DEFAULTS = {}; |
| 16081 |
exports$12.default = Module; |
| 16082 |
}, |
| 16083 |
/* 10 */ |
| 16084 |
/***/ |
| 16085 |
function(module2, exports$12, __webpack_require__) { |
| 16086 |
Object.defineProperty(exports$12, "__esModule", { |
| 16087 |
value: true |
| 16088 |
}); |
| 16089 |
var levels = ["error", "warn", "log", "info"]; |
| 16090 |
var level = "warn"; |
| 16091 |
function debug(method) { |
| 16092 |
if (levels.indexOf(method) <= levels.indexOf(level)) { |
| 16093 |
var _console; |
| 16094 |
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { |
| 16095 |
args[_key - 1] = arguments[_key]; |
| 16096 |
} |
| 16097 |
(_console = console)[method].apply(_console, args); |
| 16098 |
} |
| 16099 |
} |
| 16100 |
function namespace(ns) { |
| 16101 |
return levels.reduce(function(logger, method) { |
| 16102 |
logger[method] = debug.bind(console, method, ns); |
| 16103 |
return logger; |
| 16104 |
}, {}); |
| 16105 |
} |
| 16106 |
debug.level = namespace.level = function(newLevel) { |
| 16107 |
level = newLevel; |
| 16108 |
}; |
| 16109 |
exports$12.default = namespace; |
| 16110 |
}, |
| 16111 |
/* 11 */ |
| 16112 |
/***/ |
| 16113 |
function(module2, exports$12, __webpack_require__) { |
| 16114 |
var pSlice = Array.prototype.slice; |
| 16115 |
var objectKeys = __webpack_require__(52); |
| 16116 |
var isArguments2 = __webpack_require__(53); |
| 16117 |
var deepEqual2 = module2.exports = function(actual, expected, opts) { |
| 16118 |
if (!opts) opts = {}; |
| 16119 |
if (actual === expected) { |
| 16120 |
return true; |
| 16121 |
} else if (actual instanceof Date && expected instanceof Date) { |
| 16122 |
return actual.getTime() === expected.getTime(); |
| 16123 |
} else if (!actual || !expected || typeof actual != "object" && typeof expected != "object") { |
| 16124 |
return opts.strict ? actual === expected : actual == expected; |
| 16125 |
} else { |
| 16126 |
return objEquiv(actual, expected, opts); |
| 16127 |
} |
| 16128 |
}; |
| 16129 |
function isUndefinedOrNull(value) { |
| 16130 |
return value === null || value === void 0; |
| 16131 |
} |
| 16132 |
function isBuffer2(x2) { |
| 16133 |
if (!x2 || typeof x2 !== "object" || typeof x2.length !== "number") return false; |
| 16134 |
if (typeof x2.copy !== "function" || typeof x2.slice !== "function") { |
| 16135 |
return false; |
| 16136 |
} |
| 16137 |
if (x2.length > 0 && typeof x2[0] !== "number") return false; |
| 16138 |
return true; |
| 16139 |
} |
| 16140 |
function objEquiv(a, b2, opts) { |
| 16141 |
var i, key; |
| 16142 |
if (isUndefinedOrNull(a) || isUndefinedOrNull(b2)) |
| 16143 |
return false; |
| 16144 |
if (a.prototype !== b2.prototype) return false; |
| 16145 |
if (isArguments2(a)) { |
| 16146 |
if (!isArguments2(b2)) { |
| 16147 |
return false; |
| 16148 |
} |
| 16149 |
a = pSlice.call(a); |
| 16150 |
b2 = pSlice.call(b2); |
| 16151 |
return deepEqual2(a, b2, opts); |
| 16152 |
} |
| 16153 |
if (isBuffer2(a)) { |
| 16154 |
if (!isBuffer2(b2)) { |
| 16155 |
return false; |
| 16156 |
} |
| 16157 |
if (a.length !== b2.length) return false; |
| 16158 |
for (i = 0; i < a.length; i++) { |
| 16159 |
if (a[i] !== b2[i]) return false; |
| 16160 |
} |
| 16161 |
return true; |
| 16162 |
} |
| 16163 |
try { |
| 16164 |
var ka2 = objectKeys(a), kb2 = objectKeys(b2); |
| 16165 |
} catch (e2) { |
| 16166 |
return false; |
| 16167 |
} |
| 16168 |
if (ka2.length != kb2.length) |
| 16169 |
return false; |
| 16170 |
ka2.sort(); |
| 16171 |
kb2.sort(); |
| 16172 |
for (i = ka2.length - 1; i >= 0; i--) { |
| 16173 |
if (ka2[i] != kb2[i]) |
| 16174 |
return false; |
| 16175 |
} |
| 16176 |
for (i = ka2.length - 1; i >= 0; i--) { |
| 16177 |
key = ka2[i]; |
| 16178 |
if (!deepEqual2(a[key], b2[key], opts)) return false; |
| 16179 |
} |
| 16180 |
return typeof a === typeof b2; |
| 16181 |
} |
| 16182 |
}, |
| 16183 |
/* 12 */ |
| 16184 |
/***/ |
| 16185 |
function(module2, exports$12, __webpack_require__) { |
| 16186 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 16187 |
var Registry = __webpack_require__(1); |
| 16188 |
var Attributor = ( |
| 16189 |
/** @class */ |
| 16190 |
function() { |
| 16191 |
function Attributor2(attrName, keyName, options) { |
| 16192 |
if (options === void 0) { |
| 16193 |
options = {}; |
| 16194 |
} |
| 16195 |
this.attrName = attrName; |
| 16196 |
this.keyName = keyName; |
| 16197 |
var attributeBit = Registry.Scope.TYPE & Registry.Scope.ATTRIBUTE; |
| 16198 |
if (options.scope != null) { |
| 16199 |
this.scope = options.scope & Registry.Scope.LEVEL | attributeBit; |
| 16200 |
} else { |
| 16201 |
this.scope = Registry.Scope.ATTRIBUTE; |
| 16202 |
} |
| 16203 |
if (options.whitelist != null) |
| 16204 |
this.whitelist = options.whitelist; |
| 16205 |
} |
| 16206 |
Attributor2.keys = function(node) { |
| 16207 |
return [].map.call(node.attributes, function(item) { |
| 16208 |
return item.name; |
| 16209 |
}); |
| 16210 |
}; |
| 16211 |
Attributor2.prototype.add = function(node, value) { |
| 16212 |
if (!this.canAdd(node, value)) |
| 16213 |
return false; |
| 16214 |
node.setAttribute(this.keyName, value); |
| 16215 |
return true; |
| 16216 |
}; |
| 16217 |
Attributor2.prototype.canAdd = function(node, value) { |
| 16218 |
var match = Registry.query(node, Registry.Scope.BLOT & (this.scope | Registry.Scope.TYPE)); |
| 16219 |
if (match == null) |
| 16220 |
return false; |
| 16221 |
if (this.whitelist == null) |
| 16222 |
return true; |
| 16223 |
if (typeof value === "string") { |
| 16224 |
return this.whitelist.indexOf(value.replace(/["']/g, "")) > -1; |
| 16225 |
} else { |
| 16226 |
return this.whitelist.indexOf(value) > -1; |
| 16227 |
} |
| 16228 |
}; |
| 16229 |
Attributor2.prototype.remove = function(node) { |
| 16230 |
node.removeAttribute(this.keyName); |
| 16231 |
}; |
| 16232 |
Attributor2.prototype.value = function(node) { |
| 16233 |
var value = node.getAttribute(this.keyName); |
| 16234 |
if (this.canAdd(node, value) && value) { |
| 16235 |
return value; |
| 16236 |
} |
| 16237 |
return ""; |
| 16238 |
}; |
| 16239 |
return Attributor2; |
| 16240 |
}() |
| 16241 |
); |
| 16242 |
exports$12.default = Attributor; |
| 16243 |
}, |
| 16244 |
/* 13 */ |
| 16245 |
/***/ |
| 16246 |
function(module2, exports$12, __webpack_require__) { |
| 16247 |
Object.defineProperty(exports$12, "__esModule", { |
| 16248 |
value: true |
| 16249 |
}); |
| 16250 |
exports$12.default = exports$12.Code = void 0; |
| 16251 |
var _slicedToArray2 = /* @__PURE__ */ function() { |
| 16252 |
function sliceIterator(arr, i) { |
| 16253 |
var _arr = []; |
| 16254 |
var _n = true; |
| 16255 |
var _d2 = false; |
| 16256 |
var _e2 = void 0; |
| 16257 |
try { |
| 16258 |
for (var _i2 = arr[Symbol.iterator](), _s; !(_n = (_s = _i2.next()).done); _n = true) { |
| 16259 |
_arr.push(_s.value); |
| 16260 |
if (i && _arr.length === i) break; |
| 16261 |
} |
| 16262 |
} catch (err) { |
| 16263 |
_d2 = true; |
| 16264 |
_e2 = err; |
| 16265 |
} finally { |
| 16266 |
try { |
| 16267 |
if (!_n && _i2["return"]) _i2["return"](); |
| 16268 |
} finally { |
| 16269 |
if (_d2) throw _e2; |
| 16270 |
} |
| 16271 |
} |
| 16272 |
return _arr; |
| 16273 |
} |
| 16274 |
return function(arr, i) { |
| 16275 |
if (Array.isArray(arr)) { |
| 16276 |
return arr; |
| 16277 |
} else if (Symbol.iterator in Object(arr)) { |
| 16278 |
return sliceIterator(arr, i); |
| 16279 |
} else { |
| 16280 |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); |
| 16281 |
} |
| 16282 |
}; |
| 16283 |
}(); |
| 16284 |
var _createClass2 = /* @__PURE__ */ function() { |
| 16285 |
function defineProperties(target, props) { |
| 16286 |
for (var i = 0; i < props.length; i++) { |
| 16287 |
var descriptor = props[i]; |
| 16288 |
descriptor.enumerable = descriptor.enumerable || false; |
| 16289 |
descriptor.configurable = true; |
| 16290 |
if ("value" in descriptor) descriptor.writable = true; |
| 16291 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 16292 |
} |
| 16293 |
} |
| 16294 |
return function(Constructor, protoProps, staticProps) { |
| 16295 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 16296 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 16297 |
return Constructor; |
| 16298 |
}; |
| 16299 |
}(); |
| 16300 |
var _get = function get(object, property, receiver) { |
| 16301 |
if (object === null) object = Function.prototype; |
| 16302 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 16303 |
if (desc === void 0) { |
| 16304 |
var parent = Object.getPrototypeOf(object); |
| 16305 |
if (parent === null) { |
| 16306 |
return void 0; |
| 16307 |
} else { |
| 16308 |
return get(parent, property, receiver); |
| 16309 |
} |
| 16310 |
} else if ("value" in desc) { |
| 16311 |
return desc.value; |
| 16312 |
} else { |
| 16313 |
var getter = desc.get; |
| 16314 |
if (getter === void 0) { |
| 16315 |
return void 0; |
| 16316 |
} |
| 16317 |
return getter.call(receiver); |
| 16318 |
} |
| 16319 |
}; |
| 16320 |
var _quillDelta = __webpack_require__(2); |
| 16321 |
var _quillDelta2 = _interopRequireDefault(_quillDelta); |
| 16322 |
var _parchment = __webpack_require__(0); |
| 16323 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 16324 |
var _block = __webpack_require__(4); |
| 16325 |
var _block2 = _interopRequireDefault(_block); |
| 16326 |
var _inline = __webpack_require__(6); |
| 16327 |
var _inline2 = _interopRequireDefault(_inline); |
| 16328 |
var _text = __webpack_require__(7); |
| 16329 |
var _text2 = _interopRequireDefault(_text); |
| 16330 |
function _interopRequireDefault(obj) { |
| 16331 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 16332 |
} |
| 16333 |
function _classCallCheck2(instance, Constructor) { |
| 16334 |
if (!(instance instanceof Constructor)) { |
| 16335 |
throw new TypeError("Cannot call a class as a function"); |
| 16336 |
} |
| 16337 |
} |
| 16338 |
function _possibleConstructorReturn2(self2, call) { |
| 16339 |
if (!self2) { |
| 16340 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 16341 |
} |
| 16342 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 16343 |
} |
| 16344 |
function _inherits2(subClass, superClass) { |
| 16345 |
if (typeof superClass !== "function" && superClass !== null) { |
| 16346 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 16347 |
} |
| 16348 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 16349 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 16350 |
} |
| 16351 |
var Code2 = function(_Inline) { |
| 16352 |
_inherits2(Code3, _Inline); |
| 16353 |
function Code3() { |
| 16354 |
_classCallCheck2(this, Code3); |
| 16355 |
return _possibleConstructorReturn2(this, (Code3.__proto__ || Object.getPrototypeOf(Code3)).apply(this, arguments)); |
| 16356 |
} |
| 16357 |
return Code3; |
| 16358 |
}(_inline2.default); |
| 16359 |
Code2.blotName = "code"; |
| 16360 |
Code2.tagName = "CODE"; |
| 16361 |
var CodeBlock = function(_Block) { |
| 16362 |
_inherits2(CodeBlock2, _Block); |
| 16363 |
function CodeBlock2() { |
| 16364 |
_classCallCheck2(this, CodeBlock2); |
| 16365 |
return _possibleConstructorReturn2(this, (CodeBlock2.__proto__ || Object.getPrototypeOf(CodeBlock2)).apply(this, arguments)); |
| 16366 |
} |
| 16367 |
_createClass2(CodeBlock2, [{ |
| 16368 |
key: "delta", |
| 16369 |
value: function delta() { |
| 16370 |
var _this3 = this; |
| 16371 |
var text = this.domNode.textContent; |
| 16372 |
if (text.endsWith("\n")) { |
| 16373 |
text = text.slice(0, -1); |
| 16374 |
} |
| 16375 |
return text.split("\n").reduce(function(delta2, frag) { |
| 16376 |
return delta2.insert(frag).insert("\n", _this3.formats()); |
| 16377 |
}, new _quillDelta2.default()); |
| 16378 |
} |
| 16379 |
}, { |
| 16380 |
key: "format", |
| 16381 |
value: function format(name, value) { |
| 16382 |
if (name === this.statics.blotName && value) return; |
| 16383 |
var _descendant = this.descendant(_text2.default, this.length() - 1), _descendant2 = _slicedToArray2(_descendant, 1), text = _descendant2[0]; |
| 16384 |
if (text != null) { |
| 16385 |
text.deleteAt(text.length() - 1, 1); |
| 16386 |
} |
| 16387 |
_get(CodeBlock2.prototype.__proto__ || Object.getPrototypeOf(CodeBlock2.prototype), "format", this).call(this, name, value); |
| 16388 |
} |
| 16389 |
}, { |
| 16390 |
key: "formatAt", |
| 16391 |
value: function formatAt(index, length, name, value) { |
| 16392 |
if (length === 0) return; |
| 16393 |
if (_parchment2.default.query(name, _parchment2.default.Scope.BLOCK) == null || name === this.statics.blotName && value === this.statics.formats(this.domNode)) { |
| 16394 |
return; |
| 16395 |
} |
| 16396 |
var nextNewline = this.newlineIndex(index); |
| 16397 |
if (nextNewline < 0 || nextNewline >= index + length) return; |
| 16398 |
var prevNewline = this.newlineIndex(index, true) + 1; |
| 16399 |
var isolateLength = nextNewline - prevNewline + 1; |
| 16400 |
var blot = this.isolate(prevNewline, isolateLength); |
| 16401 |
var next = blot.next; |
| 16402 |
blot.format(name, value); |
| 16403 |
if (next instanceof CodeBlock2) { |
| 16404 |
next.formatAt(0, index - prevNewline + length - isolateLength, name, value); |
| 16405 |
} |
| 16406 |
} |
| 16407 |
}, { |
| 16408 |
key: "insertAt", |
| 16409 |
value: function insertAt(index, value, def) { |
| 16410 |
if (def != null) return; |
| 16411 |
var _descendant3 = this.descendant(_text2.default, index), _descendant4 = _slicedToArray2(_descendant3, 2), text = _descendant4[0], offset = _descendant4[1]; |
| 16412 |
text.insertAt(offset, value); |
| 16413 |
} |
| 16414 |
}, { |
| 16415 |
key: "length", |
| 16416 |
value: function length() { |
| 16417 |
var length2 = this.domNode.textContent.length; |
| 16418 |
if (!this.domNode.textContent.endsWith("\n")) { |
| 16419 |
return length2 + 1; |
| 16420 |
} |
| 16421 |
return length2; |
| 16422 |
} |
| 16423 |
}, { |
| 16424 |
key: "newlineIndex", |
| 16425 |
value: function newlineIndex(searchIndex) { |
| 16426 |
var reverse = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; |
| 16427 |
if (!reverse) { |
| 16428 |
var offset = this.domNode.textContent.slice(searchIndex).indexOf("\n"); |
| 16429 |
return offset > -1 ? searchIndex + offset : -1; |
| 16430 |
} else { |
| 16431 |
return this.domNode.textContent.slice(0, searchIndex).lastIndexOf("\n"); |
| 16432 |
} |
| 16433 |
} |
| 16434 |
}, { |
| 16435 |
key: "optimize", |
| 16436 |
value: function optimize(context) { |
| 16437 |
if (!this.domNode.textContent.endsWith("\n")) { |
| 16438 |
this.appendChild(_parchment2.default.create("text", "\n")); |
| 16439 |
} |
| 16440 |
_get(CodeBlock2.prototype.__proto__ || Object.getPrototypeOf(CodeBlock2.prototype), "optimize", this).call(this, context); |
| 16441 |
var next = this.next; |
| 16442 |
if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && this.statics.formats(this.domNode) === next.statics.formats(next.domNode)) { |
| 16443 |
next.optimize(context); |
| 16444 |
next.moveChildren(this); |
| 16445 |
next.remove(); |
| 16446 |
} |
| 16447 |
} |
| 16448 |
}, { |
| 16449 |
key: "replace", |
| 16450 |
value: function replace(target) { |
| 16451 |
_get(CodeBlock2.prototype.__proto__ || Object.getPrototypeOf(CodeBlock2.prototype), "replace", this).call(this, target); |
| 16452 |
[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(node) { |
| 16453 |
var blot = _parchment2.default.find(node); |
| 16454 |
if (blot == null) { |
| 16455 |
node.parentNode.removeChild(node); |
| 16456 |
} else if (blot instanceof _parchment2.default.Embed) { |
| 16457 |
blot.remove(); |
| 16458 |
} else { |
| 16459 |
blot.unwrap(); |
| 16460 |
} |
| 16461 |
}); |
| 16462 |
} |
| 16463 |
}], [{ |
| 16464 |
key: "create", |
| 16465 |
value: function create(value) { |
| 16466 |
var domNode = _get(CodeBlock2.__proto__ || Object.getPrototypeOf(CodeBlock2), "create", this).call(this, value); |
| 16467 |
domNode.setAttribute("spellcheck", false); |
| 16468 |
return domNode; |
| 16469 |
} |
| 16470 |
}, { |
| 16471 |
key: "formats", |
| 16472 |
value: function formats() { |
| 16473 |
return true; |
| 16474 |
} |
| 16475 |
}]); |
| 16476 |
return CodeBlock2; |
| 16477 |
}(_block2.default); |
| 16478 |
CodeBlock.blotName = "code-block"; |
| 16479 |
CodeBlock.tagName = "PRE"; |
| 16480 |
CodeBlock.TAB = " "; |
| 16481 |
exports$12.Code = Code2; |
| 16482 |
exports$12.default = CodeBlock; |
| 16483 |
}, |
| 16484 |
/* 14 */ |
| 16485 |
/***/ |
| 16486 |
function(module2, exports$12, __webpack_require__) { |
| 16487 |
Object.defineProperty(exports$12, "__esModule", { |
| 16488 |
value: true |
| 16489 |
}); |
| 16490 |
var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { |
| 16491 |
return typeof obj; |
| 16492 |
} : function(obj) { |
| 16493 |
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; |
| 16494 |
}; |
| 16495 |
var _slicedToArray2 = /* @__PURE__ */ function() { |
| 16496 |
function sliceIterator(arr, i) { |
| 16497 |
var _arr = []; |
| 16498 |
var _n = true; |
| 16499 |
var _d2 = false; |
| 16500 |
var _e2 = void 0; |
| 16501 |
try { |
| 16502 |
for (var _i2 = arr[Symbol.iterator](), _s; !(_n = (_s = _i2.next()).done); _n = true) { |
| 16503 |
_arr.push(_s.value); |
| 16504 |
if (i && _arr.length === i) break; |
| 16505 |
} |
| 16506 |
} catch (err) { |
| 16507 |
_d2 = true; |
| 16508 |
_e2 = err; |
| 16509 |
} finally { |
| 16510 |
try { |
| 16511 |
if (!_n && _i2["return"]) _i2["return"](); |
| 16512 |
} finally { |
| 16513 |
if (_d2) throw _e2; |
| 16514 |
} |
| 16515 |
} |
| 16516 |
return _arr; |
| 16517 |
} |
| 16518 |
return function(arr, i) { |
| 16519 |
if (Array.isArray(arr)) { |
| 16520 |
return arr; |
| 16521 |
} else if (Symbol.iterator in Object(arr)) { |
| 16522 |
return sliceIterator(arr, i); |
| 16523 |
} else { |
| 16524 |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); |
| 16525 |
} |
| 16526 |
}; |
| 16527 |
}(); |
| 16528 |
var _createClass2 = /* @__PURE__ */ function() { |
| 16529 |
function defineProperties(target, props) { |
| 16530 |
for (var i = 0; i < props.length; i++) { |
| 16531 |
var descriptor = props[i]; |
| 16532 |
descriptor.enumerable = descriptor.enumerable || false; |
| 16533 |
descriptor.configurable = true; |
| 16534 |
if ("value" in descriptor) descriptor.writable = true; |
| 16535 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 16536 |
} |
| 16537 |
} |
| 16538 |
return function(Constructor, protoProps, staticProps) { |
| 16539 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 16540 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 16541 |
return Constructor; |
| 16542 |
}; |
| 16543 |
}(); |
| 16544 |
var _quillDelta = __webpack_require__(2); |
| 16545 |
var _quillDelta2 = _interopRequireDefault(_quillDelta); |
| 16546 |
var _op = __webpack_require__(20); |
| 16547 |
var _op2 = _interopRequireDefault(_op); |
| 16548 |
var _parchment = __webpack_require__(0); |
| 16549 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 16550 |
var _code = __webpack_require__(13); |
| 16551 |
var _code2 = _interopRequireDefault(_code); |
| 16552 |
var _cursor = __webpack_require__(24); |
| 16553 |
var _cursor2 = _interopRequireDefault(_cursor); |
| 16554 |
var _block = __webpack_require__(4); |
| 16555 |
var _block2 = _interopRequireDefault(_block); |
| 16556 |
var _break = __webpack_require__(16); |
| 16557 |
var _break2 = _interopRequireDefault(_break); |
| 16558 |
var _clone = __webpack_require__(21); |
| 16559 |
var _clone2 = _interopRequireDefault(_clone); |
| 16560 |
var _deepEqual = __webpack_require__(11); |
| 16561 |
var _deepEqual2 = _interopRequireDefault(_deepEqual); |
| 16562 |
var _extend = __webpack_require__(3); |
| 16563 |
var _extend2 = _interopRequireDefault(_extend); |
| 16564 |
function _interopRequireDefault(obj) { |
| 16565 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 16566 |
} |
| 16567 |
function _defineProperty2(obj, key, value) { |
| 16568 |
if (key in obj) { |
| 16569 |
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); |
| 16570 |
} else { |
| 16571 |
obj[key] = value; |
| 16572 |
} |
| 16573 |
return obj; |
| 16574 |
} |
| 16575 |
function _classCallCheck2(instance, Constructor) { |
| 16576 |
if (!(instance instanceof Constructor)) { |
| 16577 |
throw new TypeError("Cannot call a class as a function"); |
| 16578 |
} |
| 16579 |
} |
| 16580 |
var ASCII = /^[ -~]*$/; |
| 16581 |
var Editor = function() { |
| 16582 |
function Editor2(scroll) { |
| 16583 |
_classCallCheck2(this, Editor2); |
| 16584 |
this.scroll = scroll; |
| 16585 |
this.delta = this.getDelta(); |
| 16586 |
} |
| 16587 |
_createClass2(Editor2, [{ |
| 16588 |
key: "applyDelta", |
| 16589 |
value: function applyDelta(delta) { |
| 16590 |
var _this = this; |
| 16591 |
var consumeNextNewline = false; |
| 16592 |
this.scroll.update(); |
| 16593 |
var scrollLength = this.scroll.length(); |
| 16594 |
this.scroll.batchStart(); |
| 16595 |
delta = normalizeDelta(delta); |
| 16596 |
delta.reduce(function(index, op) { |
| 16597 |
var length = op.retain || op.delete || op.insert.length || 1; |
| 16598 |
var attributes = op.attributes || {}; |
| 16599 |
if (op.insert != null) { |
| 16600 |
if (typeof op.insert === "string") { |
| 16601 |
var text = op.insert; |
| 16602 |
if (text.endsWith("\n") && consumeNextNewline) { |
| 16603 |
consumeNextNewline = false; |
| 16604 |
text = text.slice(0, -1); |
| 16605 |
} |
| 16606 |
if (index >= scrollLength && !text.endsWith("\n")) { |
| 16607 |
consumeNextNewline = true; |
| 16608 |
} |
| 16609 |
_this.scroll.insertAt(index, text); |
| 16610 |
var _scroll$line = _this.scroll.line(index), _scroll$line2 = _slicedToArray2(_scroll$line, 2), line = _scroll$line2[0], offset = _scroll$line2[1]; |
| 16611 |
var formats = (0, _extend2.default)({}, (0, _block.bubbleFormats)(line)); |
| 16612 |
if (line instanceof _block2.default) { |
| 16613 |
var _line$descendant = line.descendant(_parchment2.default.Leaf, offset), _line$descendant2 = _slicedToArray2(_line$descendant, 1), leaf = _line$descendant2[0]; |
| 16614 |
formats = (0, _extend2.default)(formats, (0, _block.bubbleFormats)(leaf)); |
| 16615 |
} |
| 16616 |
attributes = _op2.default.attributes.diff(formats, attributes) || {}; |
| 16617 |
} else if (_typeof2(op.insert) === "object") { |
| 16618 |
var key = Object.keys(op.insert)[0]; |
| 16619 |
if (key == null) return index; |
| 16620 |
_this.scroll.insertAt(index, key, op.insert[key]); |
| 16621 |
} |
| 16622 |
scrollLength += length; |
| 16623 |
} |
| 16624 |
Object.keys(attributes).forEach(function(name) { |
| 16625 |
_this.scroll.formatAt(index, length, name, attributes[name]); |
| 16626 |
}); |
| 16627 |
return index + length; |
| 16628 |
}, 0); |
| 16629 |
delta.reduce(function(index, op) { |
| 16630 |
if (typeof op.delete === "number") { |
| 16631 |
_this.scroll.deleteAt(index, op.delete); |
| 16632 |
return index; |
| 16633 |
} |
| 16634 |
return index + (op.retain || op.insert.length || 1); |
| 16635 |
}, 0); |
| 16636 |
this.scroll.batchEnd(); |
| 16637 |
return this.update(delta); |
| 16638 |
} |
| 16639 |
}, { |
| 16640 |
key: "deleteText", |
| 16641 |
value: function deleteText(index, length) { |
| 16642 |
this.scroll.deleteAt(index, length); |
| 16643 |
return this.update(new _quillDelta2.default().retain(index).delete(length)); |
| 16644 |
} |
| 16645 |
}, { |
| 16646 |
key: "formatLine", |
| 16647 |
value: function formatLine(index, length) { |
| 16648 |
var _this2 = this; |
| 16649 |
var formats = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; |
| 16650 |
this.scroll.update(); |
| 16651 |
Object.keys(formats).forEach(function(format) { |
| 16652 |
if (_this2.scroll.whitelist != null && !_this2.scroll.whitelist[format]) return; |
| 16653 |
var lines = _this2.scroll.lines(index, Math.max(length, 1)); |
| 16654 |
var lengthRemaining = length; |
| 16655 |
lines.forEach(function(line) { |
| 16656 |
var lineLength = line.length(); |
| 16657 |
if (!(line instanceof _code2.default)) { |
| 16658 |
line.format(format, formats[format]); |
| 16659 |
} else { |
| 16660 |
var codeIndex = index - line.offset(_this2.scroll); |
| 16661 |
var codeLength = line.newlineIndex(codeIndex + lengthRemaining) - codeIndex + 1; |
| 16662 |
line.formatAt(codeIndex, codeLength, format, formats[format]); |
| 16663 |
} |
| 16664 |
lengthRemaining -= lineLength; |
| 16665 |
}); |
| 16666 |
}); |
| 16667 |
this.scroll.optimize(); |
| 16668 |
return this.update(new _quillDelta2.default().retain(index).retain(length, (0, _clone2.default)(formats))); |
| 16669 |
} |
| 16670 |
}, { |
| 16671 |
key: "formatText", |
| 16672 |
value: function formatText(index, length) { |
| 16673 |
var _this3 = this; |
| 16674 |
var formats = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; |
| 16675 |
Object.keys(formats).forEach(function(format) { |
| 16676 |
_this3.scroll.formatAt(index, length, format, formats[format]); |
| 16677 |
}); |
| 16678 |
return this.update(new _quillDelta2.default().retain(index).retain(length, (0, _clone2.default)(formats))); |
| 16679 |
} |
| 16680 |
}, { |
| 16681 |
key: "getContents", |
| 16682 |
value: function getContents(index, length) { |
| 16683 |
return this.delta.slice(index, index + length); |
| 16684 |
} |
| 16685 |
}, { |
| 16686 |
key: "getDelta", |
| 16687 |
value: function getDelta() { |
| 16688 |
return this.scroll.lines().reduce(function(delta, line) { |
| 16689 |
return delta.concat(line.delta()); |
| 16690 |
}, new _quillDelta2.default()); |
| 16691 |
} |
| 16692 |
}, { |
| 16693 |
key: "getFormat", |
| 16694 |
value: function getFormat(index) { |
| 16695 |
var length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; |
| 16696 |
var lines = [], leaves = []; |
| 16697 |
if (length === 0) { |
| 16698 |
this.scroll.path(index).forEach(function(path) { |
| 16699 |
var _path = _slicedToArray2(path, 1), blot = _path[0]; |
| 16700 |
if (blot instanceof _block2.default) { |
| 16701 |
lines.push(blot); |
| 16702 |
} else if (blot instanceof _parchment2.default.Leaf) { |
| 16703 |
leaves.push(blot); |
| 16704 |
} |
| 16705 |
}); |
| 16706 |
} else { |
| 16707 |
lines = this.scroll.lines(index, length); |
| 16708 |
leaves = this.scroll.descendants(_parchment2.default.Leaf, index, length); |
| 16709 |
} |
| 16710 |
var formatsArr = [lines, leaves].map(function(blots) { |
| 16711 |
if (blots.length === 0) return {}; |
| 16712 |
var formats = (0, _block.bubbleFormats)(blots.shift()); |
| 16713 |
while (Object.keys(formats).length > 0) { |
| 16714 |
var blot = blots.shift(); |
| 16715 |
if (blot == null) return formats; |
| 16716 |
formats = combineFormats((0, _block.bubbleFormats)(blot), formats); |
| 16717 |
} |
| 16718 |
return formats; |
| 16719 |
}); |
| 16720 |
return _extend2.default.apply(_extend2.default, formatsArr); |
| 16721 |
} |
| 16722 |
}, { |
| 16723 |
key: "getText", |
| 16724 |
value: function getText(index, length) { |
| 16725 |
return this.getContents(index, length).filter(function(op) { |
| 16726 |
return typeof op.insert === "string"; |
| 16727 |
}).map(function(op) { |
| 16728 |
return op.insert; |
| 16729 |
}).join(""); |
| 16730 |
} |
| 16731 |
}, { |
| 16732 |
key: "insertEmbed", |
| 16733 |
value: function insertEmbed(index, embed, value) { |
| 16734 |
this.scroll.insertAt(index, embed, value); |
| 16735 |
return this.update(new _quillDelta2.default().retain(index).insert(_defineProperty2({}, embed, value))); |
| 16736 |
} |
| 16737 |
}, { |
| 16738 |
key: "insertText", |
| 16739 |
value: function insertText(index, text) { |
| 16740 |
var _this4 = this; |
| 16741 |
var formats = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; |
| 16742 |
text = text.replace(/\r\n/g, "\n").replace(/\r/g, "\n"); |
| 16743 |
this.scroll.insertAt(index, text); |
| 16744 |
Object.keys(formats).forEach(function(format) { |
| 16745 |
_this4.scroll.formatAt(index, text.length, format, formats[format]); |
| 16746 |
}); |
| 16747 |
return this.update(new _quillDelta2.default().retain(index).insert(text, (0, _clone2.default)(formats))); |
| 16748 |
} |
| 16749 |
}, { |
| 16750 |
key: "isBlank", |
| 16751 |
value: function isBlank() { |
| 16752 |
if (this.scroll.children.length == 0) return true; |
| 16753 |
if (this.scroll.children.length > 1) return false; |
| 16754 |
var block = this.scroll.children.head; |
| 16755 |
if (block.statics.blotName !== _block2.default.blotName) return false; |
| 16756 |
if (block.children.length > 1) return false; |
| 16757 |
return block.children.head instanceof _break2.default; |
| 16758 |
} |
| 16759 |
}, { |
| 16760 |
key: "removeFormat", |
| 16761 |
value: function removeFormat(index, length) { |
| 16762 |
var text = this.getText(index, length); |
| 16763 |
var _scroll$line3 = this.scroll.line(index + length), _scroll$line4 = _slicedToArray2(_scroll$line3, 2), line = _scroll$line4[0], offset = _scroll$line4[1]; |
| 16764 |
var suffixLength = 0, suffix = new _quillDelta2.default(); |
| 16765 |
if (line != null) { |
| 16766 |
if (!(line instanceof _code2.default)) { |
| 16767 |
suffixLength = line.length() - offset; |
| 16768 |
} else { |
| 16769 |
suffixLength = line.newlineIndex(offset) - offset + 1; |
| 16770 |
} |
| 16771 |
suffix = line.delta().slice(offset, offset + suffixLength - 1).insert("\n"); |
| 16772 |
} |
| 16773 |
var contents = this.getContents(index, length + suffixLength); |
| 16774 |
var diff = contents.diff(new _quillDelta2.default().insert(text).concat(suffix)); |
| 16775 |
var delta = new _quillDelta2.default().retain(index).concat(diff); |
| 16776 |
return this.applyDelta(delta); |
| 16777 |
} |
| 16778 |
}, { |
| 16779 |
key: "update", |
| 16780 |
value: function update(change) { |
| 16781 |
var mutations = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : []; |
| 16782 |
var cursorIndex = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0; |
| 16783 |
var oldDelta = this.delta; |
| 16784 |
if (mutations.length === 1 && mutations[0].type === "characterData" && mutations[0].target.data.match(ASCII) && _parchment2.default.find(mutations[0].target)) { |
| 16785 |
var textBlot = _parchment2.default.find(mutations[0].target); |
| 16786 |
var formats = (0, _block.bubbleFormats)(textBlot); |
| 16787 |
var index = textBlot.offset(this.scroll); |
| 16788 |
var oldValue = mutations[0].oldValue.replace(_cursor2.default.CONTENTS, ""); |
| 16789 |
var oldText = new _quillDelta2.default().insert(oldValue); |
| 16790 |
var newText = new _quillDelta2.default().insert(textBlot.value()); |
| 16791 |
var diffDelta = new _quillDelta2.default().retain(index).concat(oldText.diff(newText, cursorIndex)); |
| 16792 |
change = diffDelta.reduce(function(delta, op) { |
| 16793 |
if (op.insert) { |
| 16794 |
return delta.insert(op.insert, formats); |
| 16795 |
} else { |
| 16796 |
return delta.push(op); |
| 16797 |
} |
| 16798 |
}, new _quillDelta2.default()); |
| 16799 |
this.delta = oldDelta.compose(change); |
| 16800 |
} else { |
| 16801 |
this.delta = this.getDelta(); |
| 16802 |
if (!change || !(0, _deepEqual2.default)(oldDelta.compose(change), this.delta)) { |
| 16803 |
change = oldDelta.diff(this.delta, cursorIndex); |
| 16804 |
} |
| 16805 |
} |
| 16806 |
return change; |
| 16807 |
} |
| 16808 |
}]); |
| 16809 |
return Editor2; |
| 16810 |
}(); |
| 16811 |
function combineFormats(formats, combined) { |
| 16812 |
return Object.keys(combined).reduce(function(merged, name) { |
| 16813 |
if (formats[name] == null) return merged; |
| 16814 |
if (combined[name] === formats[name]) { |
| 16815 |
merged[name] = combined[name]; |
| 16816 |
} else if (Array.isArray(combined[name])) { |
| 16817 |
if (combined[name].indexOf(formats[name]) < 0) { |
| 16818 |
merged[name] = combined[name].concat([formats[name]]); |
| 16819 |
} |
| 16820 |
} else { |
| 16821 |
merged[name] = [combined[name], formats[name]]; |
| 16822 |
} |
| 16823 |
return merged; |
| 16824 |
}, {}); |
| 16825 |
} |
| 16826 |
function normalizeDelta(delta) { |
| 16827 |
return delta.reduce(function(delta2, op) { |
| 16828 |
if (op.insert === 1) { |
| 16829 |
var attributes = (0, _clone2.default)(op.attributes); |
| 16830 |
delete attributes["image"]; |
| 16831 |
return delta2.insert({ image: op.attributes.image }, attributes); |
| 16832 |
} |
| 16833 |
if (op.attributes != null && (op.attributes.list === true || op.attributes.bullet === true)) { |
| 16834 |
op = (0, _clone2.default)(op); |
| 16835 |
if (op.attributes.list) { |
| 16836 |
op.attributes.list = "ordered"; |
| 16837 |
} else { |
| 16838 |
op.attributes.list = "bullet"; |
| 16839 |
delete op.attributes.bullet; |
| 16840 |
} |
| 16841 |
} |
| 16842 |
if (typeof op.insert === "string") { |
| 16843 |
var text = op.insert.replace(/\r\n/g, "\n").replace(/\r/g, "\n"); |
| 16844 |
return delta2.insert(text, op.attributes); |
| 16845 |
} |
| 16846 |
return delta2.push(op); |
| 16847 |
}, new _quillDelta2.default()); |
| 16848 |
} |
| 16849 |
exports$12.default = Editor; |
| 16850 |
}, |
| 16851 |
/* 15 */ |
| 16852 |
/***/ |
| 16853 |
function(module2, exports$12, __webpack_require__) { |
| 16854 |
Object.defineProperty(exports$12, "__esModule", { |
| 16855 |
value: true |
| 16856 |
}); |
| 16857 |
exports$12.default = exports$12.Range = void 0; |
| 16858 |
var _slicedToArray2 = /* @__PURE__ */ function() { |
| 16859 |
function sliceIterator(arr, i) { |
| 16860 |
var _arr = []; |
| 16861 |
var _n = true; |
| 16862 |
var _d2 = false; |
| 16863 |
var _e2 = void 0; |
| 16864 |
try { |
| 16865 |
for (var _i2 = arr[Symbol.iterator](), _s; !(_n = (_s = _i2.next()).done); _n = true) { |
| 16866 |
_arr.push(_s.value); |
| 16867 |
if (i && _arr.length === i) break; |
| 16868 |
} |
| 16869 |
} catch (err) { |
| 16870 |
_d2 = true; |
| 16871 |
_e2 = err; |
| 16872 |
} finally { |
| 16873 |
try { |
| 16874 |
if (!_n && _i2["return"]) _i2["return"](); |
| 16875 |
} finally { |
| 16876 |
if (_d2) throw _e2; |
| 16877 |
} |
| 16878 |
} |
| 16879 |
return _arr; |
| 16880 |
} |
| 16881 |
return function(arr, i) { |
| 16882 |
if (Array.isArray(arr)) { |
| 16883 |
return arr; |
| 16884 |
} else if (Symbol.iterator in Object(arr)) { |
| 16885 |
return sliceIterator(arr, i); |
| 16886 |
} else { |
| 16887 |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); |
| 16888 |
} |
| 16889 |
}; |
| 16890 |
}(); |
| 16891 |
var _createClass2 = /* @__PURE__ */ function() { |
| 16892 |
function defineProperties(target, props) { |
| 16893 |
for (var i = 0; i < props.length; i++) { |
| 16894 |
var descriptor = props[i]; |
| 16895 |
descriptor.enumerable = descriptor.enumerable || false; |
| 16896 |
descriptor.configurable = true; |
| 16897 |
if ("value" in descriptor) descriptor.writable = true; |
| 16898 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 16899 |
} |
| 16900 |
} |
| 16901 |
return function(Constructor, protoProps, staticProps) { |
| 16902 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 16903 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 16904 |
return Constructor; |
| 16905 |
}; |
| 16906 |
}(); |
| 16907 |
var _parchment = __webpack_require__(0); |
| 16908 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 16909 |
var _clone = __webpack_require__(21); |
| 16910 |
var _clone2 = _interopRequireDefault(_clone); |
| 16911 |
var _deepEqual = __webpack_require__(11); |
| 16912 |
var _deepEqual2 = _interopRequireDefault(_deepEqual); |
| 16913 |
var _emitter3 = __webpack_require__(8); |
| 16914 |
var _emitter4 = _interopRequireDefault(_emitter3); |
| 16915 |
var _logger = __webpack_require__(10); |
| 16916 |
var _logger2 = _interopRequireDefault(_logger); |
| 16917 |
function _interopRequireDefault(obj) { |
| 16918 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 16919 |
} |
| 16920 |
function _toConsumableArray2(arr) { |
| 16921 |
if (Array.isArray(arr)) { |
| 16922 |
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { |
| 16923 |
arr2[i] = arr[i]; |
| 16924 |
} |
| 16925 |
return arr2; |
| 16926 |
} else { |
| 16927 |
return Array.from(arr); |
| 16928 |
} |
| 16929 |
} |
| 16930 |
function _classCallCheck2(instance, Constructor) { |
| 16931 |
if (!(instance instanceof Constructor)) { |
| 16932 |
throw new TypeError("Cannot call a class as a function"); |
| 16933 |
} |
| 16934 |
} |
| 16935 |
var debug = (0, _logger2.default)("quill:selection"); |
| 16936 |
var Range = function Range2(index) { |
| 16937 |
var length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; |
| 16938 |
_classCallCheck2(this, Range2); |
| 16939 |
this.index = index; |
| 16940 |
this.length = length; |
| 16941 |
}; |
| 16942 |
var Selection = function() { |
| 16943 |
function Selection2(scroll, emitter) { |
| 16944 |
var _this = this; |
| 16945 |
_classCallCheck2(this, Selection2); |
| 16946 |
this.emitter = emitter; |
| 16947 |
this.scroll = scroll; |
| 16948 |
this.composing = false; |
| 16949 |
this.mouseDown = false; |
| 16950 |
this.root = this.scroll.domNode; |
| 16951 |
this.cursor = _parchment2.default.create("cursor", this); |
| 16952 |
this.lastRange = this.savedRange = new Range(0, 0); |
| 16953 |
this.handleComposition(); |
| 16954 |
this.handleDragging(); |
| 16955 |
this.emitter.listenDOM("selectionchange", document, function() { |
| 16956 |
if (!_this.mouseDown) { |
| 16957 |
setTimeout(_this.update.bind(_this, _emitter4.default.sources.USER), 1); |
| 16958 |
} |
| 16959 |
}); |
| 16960 |
this.emitter.on(_emitter4.default.events.EDITOR_CHANGE, function(type, delta) { |
| 16961 |
if (type === _emitter4.default.events.TEXT_CHANGE && delta.length() > 0) { |
| 16962 |
_this.update(_emitter4.default.sources.SILENT); |
| 16963 |
} |
| 16964 |
}); |
| 16965 |
this.emitter.on(_emitter4.default.events.SCROLL_BEFORE_UPDATE, function() { |
| 16966 |
if (!_this.hasFocus()) return; |
| 16967 |
var native = _this.getNativeRange(); |
| 16968 |
if (native == null) return; |
| 16969 |
if (native.start.node === _this.cursor.textNode) return; |
| 16970 |
_this.emitter.once(_emitter4.default.events.SCROLL_UPDATE, function() { |
| 16971 |
try { |
| 16972 |
_this.setNativeRange(native.start.node, native.start.offset, native.end.node, native.end.offset); |
| 16973 |
} catch (ignored) { |
| 16974 |
} |
| 16975 |
}); |
| 16976 |
}); |
| 16977 |
this.emitter.on(_emitter4.default.events.SCROLL_OPTIMIZE, function(mutations, context) { |
| 16978 |
if (context.range) { |
| 16979 |
var _context$range = context.range, startNode = _context$range.startNode, startOffset = _context$range.startOffset, endNode = _context$range.endNode, endOffset = _context$range.endOffset; |
| 16980 |
_this.setNativeRange(startNode, startOffset, endNode, endOffset); |
| 16981 |
} |
| 16982 |
}); |
| 16983 |
this.update(_emitter4.default.sources.SILENT); |
| 16984 |
} |
| 16985 |
_createClass2(Selection2, [{ |
| 16986 |
key: "handleComposition", |
| 16987 |
value: function handleComposition() { |
| 16988 |
var _this2 = this; |
| 16989 |
this.root.addEventListener("compositionstart", function() { |
| 16990 |
_this2.composing = true; |
| 16991 |
}); |
| 16992 |
this.root.addEventListener("compositionend", function() { |
| 16993 |
_this2.composing = false; |
| 16994 |
if (_this2.cursor.parent) { |
| 16995 |
var range = _this2.cursor.restore(); |
| 16996 |
if (!range) return; |
| 16997 |
setTimeout(function() { |
| 16998 |
_this2.setNativeRange(range.startNode, range.startOffset, range.endNode, range.endOffset); |
| 16999 |
}, 1); |
| 17000 |
} |
| 17001 |
}); |
| 17002 |
} |
| 17003 |
}, { |
| 17004 |
key: "handleDragging", |
| 17005 |
value: function handleDragging() { |
| 17006 |
var _this3 = this; |
| 17007 |
this.emitter.listenDOM("mousedown", document.body, function() { |
| 17008 |
_this3.mouseDown = true; |
| 17009 |
}); |
| 17010 |
this.emitter.listenDOM("mouseup", document.body, function() { |
| 17011 |
_this3.mouseDown = false; |
| 17012 |
_this3.update(_emitter4.default.sources.USER); |
| 17013 |
}); |
| 17014 |
} |
| 17015 |
}, { |
| 17016 |
key: "focus", |
| 17017 |
value: function focus() { |
| 17018 |
if (this.hasFocus()) return; |
| 17019 |
this.root.focus(); |
| 17020 |
this.setRange(this.savedRange); |
| 17021 |
} |
| 17022 |
}, { |
| 17023 |
key: "format", |
| 17024 |
value: function format(_format, value) { |
| 17025 |
if (this.scroll.whitelist != null && !this.scroll.whitelist[_format]) return; |
| 17026 |
this.scroll.update(); |
| 17027 |
var nativeRange = this.getNativeRange(); |
| 17028 |
if (nativeRange == null || !nativeRange.native.collapsed || _parchment2.default.query(_format, _parchment2.default.Scope.BLOCK)) return; |
| 17029 |
if (nativeRange.start.node !== this.cursor.textNode) { |
| 17030 |
var blot = _parchment2.default.find(nativeRange.start.node, false); |
| 17031 |
if (blot == null) return; |
| 17032 |
if (blot instanceof _parchment2.default.Leaf) { |
| 17033 |
var after = blot.split(nativeRange.start.offset); |
| 17034 |
blot.parent.insertBefore(this.cursor, after); |
| 17035 |
} else { |
| 17036 |
blot.insertBefore(this.cursor, nativeRange.start.node); |
| 17037 |
} |
| 17038 |
this.cursor.attach(); |
| 17039 |
} |
| 17040 |
this.cursor.format(_format, value); |
| 17041 |
this.scroll.optimize(); |
| 17042 |
this.setNativeRange(this.cursor.textNode, this.cursor.textNode.data.length); |
| 17043 |
this.update(); |
| 17044 |
} |
| 17045 |
}, { |
| 17046 |
key: "getBounds", |
| 17047 |
value: function getBounds(index) { |
| 17048 |
var length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; |
| 17049 |
var scrollLength = this.scroll.length(); |
| 17050 |
index = Math.min(index, scrollLength - 1); |
| 17051 |
length = Math.min(index + length, scrollLength - 1) - index; |
| 17052 |
var node = void 0, _scroll$leaf = this.scroll.leaf(index), _scroll$leaf2 = _slicedToArray2(_scroll$leaf, 2), leaf = _scroll$leaf2[0], offset = _scroll$leaf2[1]; |
| 17053 |
if (leaf == null) return null; |
| 17054 |
var _leaf$position = leaf.position(offset, true); |
| 17055 |
var _leaf$position2 = _slicedToArray2(_leaf$position, 2); |
| 17056 |
node = _leaf$position2[0]; |
| 17057 |
offset = _leaf$position2[1]; |
| 17058 |
var range = document.createRange(); |
| 17059 |
if (length > 0) { |
| 17060 |
range.setStart(node, offset); |
| 17061 |
var _scroll$leaf3 = this.scroll.leaf(index + length); |
| 17062 |
var _scroll$leaf4 = _slicedToArray2(_scroll$leaf3, 2); |
| 17063 |
leaf = _scroll$leaf4[0]; |
| 17064 |
offset = _scroll$leaf4[1]; |
| 17065 |
if (leaf == null) return null; |
| 17066 |
var _leaf$position3 = leaf.position(offset, true); |
| 17067 |
var _leaf$position4 = _slicedToArray2(_leaf$position3, 2); |
| 17068 |
node = _leaf$position4[0]; |
| 17069 |
offset = _leaf$position4[1]; |
| 17070 |
range.setEnd(node, offset); |
| 17071 |
return range.getBoundingClientRect(); |
| 17072 |
} else { |
| 17073 |
var side = "left"; |
| 17074 |
var rect = void 0; |
| 17075 |
if (node instanceof Text) { |
| 17076 |
if (offset < node.data.length) { |
| 17077 |
range.setStart(node, offset); |
| 17078 |
range.setEnd(node, offset + 1); |
| 17079 |
} else { |
| 17080 |
range.setStart(node, offset - 1); |
| 17081 |
range.setEnd(node, offset); |
| 17082 |
side = "right"; |
| 17083 |
} |
| 17084 |
rect = range.getBoundingClientRect(); |
| 17085 |
} else { |
| 17086 |
rect = leaf.domNode.getBoundingClientRect(); |
| 17087 |
if (offset > 0) side = "right"; |
| 17088 |
} |
| 17089 |
return { |
| 17090 |
bottom: rect.top + rect.height, |
| 17091 |
height: rect.height, |
| 17092 |
left: rect[side], |
| 17093 |
right: rect[side], |
| 17094 |
top: rect.top, |
| 17095 |
width: 0 |
| 17096 |
}; |
| 17097 |
} |
| 17098 |
} |
| 17099 |
}, { |
| 17100 |
key: "getNativeRange", |
| 17101 |
value: function getNativeRange() { |
| 17102 |
var selection = document.getSelection(); |
| 17103 |
if (selection == null || selection.rangeCount <= 0) return null; |
| 17104 |
var nativeRange = selection.getRangeAt(0); |
| 17105 |
if (nativeRange == null) return null; |
| 17106 |
var range = this.normalizeNative(nativeRange); |
| 17107 |
debug.info("getNativeRange", range); |
| 17108 |
return range; |
| 17109 |
} |
| 17110 |
}, { |
| 17111 |
key: "getRange", |
| 17112 |
value: function getRange() { |
| 17113 |
var normalized = this.getNativeRange(); |
| 17114 |
if (normalized == null) return [null, null]; |
| 17115 |
var range = this.normalizedToRange(normalized); |
| 17116 |
return [range, normalized]; |
| 17117 |
} |
| 17118 |
}, { |
| 17119 |
key: "hasFocus", |
| 17120 |
value: function hasFocus() { |
| 17121 |
return document.activeElement === this.root; |
| 17122 |
} |
| 17123 |
}, { |
| 17124 |
key: "normalizedToRange", |
| 17125 |
value: function normalizedToRange(range) { |
| 17126 |
var _this4 = this; |
| 17127 |
var positions = [[range.start.node, range.start.offset]]; |
| 17128 |
if (!range.native.collapsed) { |
| 17129 |
positions.push([range.end.node, range.end.offset]); |
| 17130 |
} |
| 17131 |
var indexes = positions.map(function(position) { |
| 17132 |
var _position = _slicedToArray2(position, 2), node = _position[0], offset = _position[1]; |
| 17133 |
var blot = _parchment2.default.find(node, true); |
| 17134 |
var index = blot.offset(_this4.scroll); |
| 17135 |
if (offset === 0) { |
| 17136 |
return index; |
| 17137 |
} else if (blot instanceof _parchment2.default.Container) { |
| 17138 |
return index + blot.length(); |
| 17139 |
} else { |
| 17140 |
return index + blot.index(node, offset); |
| 17141 |
} |
| 17142 |
}); |
| 17143 |
var end = Math.min(Math.max.apply(Math, _toConsumableArray2(indexes)), this.scroll.length() - 1); |
| 17144 |
var start = Math.min.apply(Math, [end].concat(_toConsumableArray2(indexes))); |
| 17145 |
return new Range(start, end - start); |
| 17146 |
} |
| 17147 |
}, { |
| 17148 |
key: "normalizeNative", |
| 17149 |
value: function normalizeNative(nativeRange) { |
| 17150 |
if (!contains(this.root, nativeRange.startContainer) || !nativeRange.collapsed && !contains(this.root, nativeRange.endContainer)) { |
| 17151 |
return null; |
| 17152 |
} |
| 17153 |
var range = { |
| 17154 |
start: { node: nativeRange.startContainer, offset: nativeRange.startOffset }, |
| 17155 |
end: { node: nativeRange.endContainer, offset: nativeRange.endOffset }, |
| 17156 |
native: nativeRange |
| 17157 |
}; |
| 17158 |
[range.start, range.end].forEach(function(position) { |
| 17159 |
var node = position.node, offset = position.offset; |
| 17160 |
while (!(node instanceof Text) && node.childNodes.length > 0) { |
| 17161 |
if (node.childNodes.length > offset) { |
| 17162 |
node = node.childNodes[offset]; |
| 17163 |
offset = 0; |
| 17164 |
} else if (node.childNodes.length === offset) { |
| 17165 |
node = node.lastChild; |
| 17166 |
offset = node instanceof Text ? node.data.length : node.childNodes.length + 1; |
| 17167 |
} else { |
| 17168 |
break; |
| 17169 |
} |
| 17170 |
} |
| 17171 |
position.node = node, position.offset = offset; |
| 17172 |
}); |
| 17173 |
return range; |
| 17174 |
} |
| 17175 |
}, { |
| 17176 |
key: "rangeToNative", |
| 17177 |
value: function rangeToNative(range) { |
| 17178 |
var _this5 = this; |
| 17179 |
var indexes = range.collapsed ? [range.index] : [range.index, range.index + range.length]; |
| 17180 |
var args = []; |
| 17181 |
var scrollLength = this.scroll.length(); |
| 17182 |
indexes.forEach(function(index, i) { |
| 17183 |
index = Math.min(scrollLength - 1, index); |
| 17184 |
var node = void 0, _scroll$leaf5 = _this5.scroll.leaf(index), _scroll$leaf6 = _slicedToArray2(_scroll$leaf5, 2), leaf = _scroll$leaf6[0], offset = _scroll$leaf6[1]; |
| 17185 |
var _leaf$position5 = leaf.position(offset, i !== 0); |
| 17186 |
var _leaf$position6 = _slicedToArray2(_leaf$position5, 2); |
| 17187 |
node = _leaf$position6[0]; |
| 17188 |
offset = _leaf$position6[1]; |
| 17189 |
args.push(node, offset); |
| 17190 |
}); |
| 17191 |
if (args.length < 2) { |
| 17192 |
args = args.concat(args); |
| 17193 |
} |
| 17194 |
return args; |
| 17195 |
} |
| 17196 |
}, { |
| 17197 |
key: "scrollIntoView", |
| 17198 |
value: function scrollIntoView(scrollingContainer) { |
| 17199 |
var range = this.lastRange; |
| 17200 |
if (range == null) return; |
| 17201 |
var bounds = this.getBounds(range.index, range.length); |
| 17202 |
if (bounds == null) return; |
| 17203 |
var limit = this.scroll.length() - 1; |
| 17204 |
var _scroll$line = this.scroll.line(Math.min(range.index, limit)), _scroll$line2 = _slicedToArray2(_scroll$line, 1), first = _scroll$line2[0]; |
| 17205 |
var last = first; |
| 17206 |
if (range.length > 0) { |
| 17207 |
var _scroll$line3 = this.scroll.line(Math.min(range.index + range.length, limit)); |
| 17208 |
var _scroll$line4 = _slicedToArray2(_scroll$line3, 1); |
| 17209 |
last = _scroll$line4[0]; |
| 17210 |
} |
| 17211 |
if (first == null || last == null) return; |
| 17212 |
var scrollBounds = scrollingContainer.getBoundingClientRect(); |
| 17213 |
if (bounds.top < scrollBounds.top) { |
| 17214 |
scrollingContainer.scrollTop -= scrollBounds.top - bounds.top; |
| 17215 |
} else if (bounds.bottom > scrollBounds.bottom) { |
| 17216 |
scrollingContainer.scrollTop += bounds.bottom - scrollBounds.bottom; |
| 17217 |
} |
| 17218 |
} |
| 17219 |
}, { |
| 17220 |
key: "setNativeRange", |
| 17221 |
value: function setNativeRange(startNode, startOffset) { |
| 17222 |
var endNode = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : startNode; |
| 17223 |
var endOffset = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : startOffset; |
| 17224 |
var force = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false; |
| 17225 |
debug.info("setNativeRange", startNode, startOffset, endNode, endOffset); |
| 17226 |
if (startNode != null && (this.root.parentNode == null || startNode.parentNode == null || endNode.parentNode == null)) { |
| 17227 |
return; |
| 17228 |
} |
| 17229 |
var selection = document.getSelection(); |
| 17230 |
if (selection == null) return; |
| 17231 |
if (startNode != null) { |
| 17232 |
if (!this.hasFocus()) this.root.focus(); |
| 17233 |
var native = (this.getNativeRange() || {}).native; |
| 17234 |
if (native == null || force || startNode !== native.startContainer || startOffset !== native.startOffset || endNode !== native.endContainer || endOffset !== native.endOffset) { |
| 17235 |
if (startNode.tagName == "BR") { |
| 17236 |
startOffset = [].indexOf.call(startNode.parentNode.childNodes, startNode); |
| 17237 |
startNode = startNode.parentNode; |
| 17238 |
} |
| 17239 |
if (endNode.tagName == "BR") { |
| 17240 |
endOffset = [].indexOf.call(endNode.parentNode.childNodes, endNode); |
| 17241 |
endNode = endNode.parentNode; |
| 17242 |
} |
| 17243 |
var range = document.createRange(); |
| 17244 |
range.setStart(startNode, startOffset); |
| 17245 |
range.setEnd(endNode, endOffset); |
| 17246 |
selection.removeAllRanges(); |
| 17247 |
selection.addRange(range); |
| 17248 |
} |
| 17249 |
} else { |
| 17250 |
selection.removeAllRanges(); |
| 17251 |
this.root.blur(); |
| 17252 |
document.body.focus(); |
| 17253 |
} |
| 17254 |
} |
| 17255 |
}, { |
| 17256 |
key: "setRange", |
| 17257 |
value: function setRange(range) { |
| 17258 |
var force = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; |
| 17259 |
var source = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _emitter4.default.sources.API; |
| 17260 |
if (typeof force === "string") { |
| 17261 |
source = force; |
| 17262 |
force = false; |
| 17263 |
} |
| 17264 |
debug.info("setRange", range); |
| 17265 |
if (range != null) { |
| 17266 |
var args = this.rangeToNative(range); |
| 17267 |
this.setNativeRange.apply(this, _toConsumableArray2(args).concat([force])); |
| 17268 |
} else { |
| 17269 |
this.setNativeRange(null); |
| 17270 |
} |
| 17271 |
this.update(source); |
| 17272 |
} |
| 17273 |
}, { |
| 17274 |
key: "update", |
| 17275 |
value: function update() { |
| 17276 |
var source = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : _emitter4.default.sources.USER; |
| 17277 |
var oldRange = this.lastRange; |
| 17278 |
var _getRange = this.getRange(), _getRange2 = _slicedToArray2(_getRange, 2), lastRange = _getRange2[0], nativeRange = _getRange2[1]; |
| 17279 |
this.lastRange = lastRange; |
| 17280 |
if (this.lastRange != null) { |
| 17281 |
this.savedRange = this.lastRange; |
| 17282 |
} |
| 17283 |
if (!(0, _deepEqual2.default)(oldRange, this.lastRange)) { |
| 17284 |
var _emitter; |
| 17285 |
if (!this.composing && nativeRange != null && nativeRange.native.collapsed && nativeRange.start.node !== this.cursor.textNode) { |
| 17286 |
this.cursor.restore(); |
| 17287 |
} |
| 17288 |
var args = [_emitter4.default.events.SELECTION_CHANGE, (0, _clone2.default)(this.lastRange), (0, _clone2.default)(oldRange), source]; |
| 17289 |
(_emitter = this.emitter).emit.apply(_emitter, [_emitter4.default.events.EDITOR_CHANGE].concat(args)); |
| 17290 |
if (source !== _emitter4.default.sources.SILENT) { |
| 17291 |
var _emitter2; |
| 17292 |
(_emitter2 = this.emitter).emit.apply(_emitter2, args); |
| 17293 |
} |
| 17294 |
} |
| 17295 |
} |
| 17296 |
}]); |
| 17297 |
return Selection2; |
| 17298 |
}(); |
| 17299 |
function contains(parent, descendant) { |
| 17300 |
try { |
| 17301 |
descendant.parentNode; |
| 17302 |
} catch (e2) { |
| 17303 |
return false; |
| 17304 |
} |
| 17305 |
if (descendant instanceof Text) { |
| 17306 |
descendant = descendant.parentNode; |
| 17307 |
} |
| 17308 |
return parent.contains(descendant); |
| 17309 |
} |
| 17310 |
exports$12.Range = Range; |
| 17311 |
exports$12.default = Selection; |
| 17312 |
}, |
| 17313 |
/* 16 */ |
| 17314 |
/***/ |
| 17315 |
function(module2, exports$12, __webpack_require__) { |
| 17316 |
Object.defineProperty(exports$12, "__esModule", { |
| 17317 |
value: true |
| 17318 |
}); |
| 17319 |
var _createClass2 = /* @__PURE__ */ function() { |
| 17320 |
function defineProperties(target, props) { |
| 17321 |
for (var i = 0; i < props.length; i++) { |
| 17322 |
var descriptor = props[i]; |
| 17323 |
descriptor.enumerable = descriptor.enumerable || false; |
| 17324 |
descriptor.configurable = true; |
| 17325 |
if ("value" in descriptor) descriptor.writable = true; |
| 17326 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 17327 |
} |
| 17328 |
} |
| 17329 |
return function(Constructor, protoProps, staticProps) { |
| 17330 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 17331 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 17332 |
return Constructor; |
| 17333 |
}; |
| 17334 |
}(); |
| 17335 |
var _get = function get(object, property, receiver) { |
| 17336 |
if (object === null) object = Function.prototype; |
| 17337 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 17338 |
if (desc === void 0) { |
| 17339 |
var parent = Object.getPrototypeOf(object); |
| 17340 |
if (parent === null) { |
| 17341 |
return void 0; |
| 17342 |
} else { |
| 17343 |
return get(parent, property, receiver); |
| 17344 |
} |
| 17345 |
} else if ("value" in desc) { |
| 17346 |
return desc.value; |
| 17347 |
} else { |
| 17348 |
var getter = desc.get; |
| 17349 |
if (getter === void 0) { |
| 17350 |
return void 0; |
| 17351 |
} |
| 17352 |
return getter.call(receiver); |
| 17353 |
} |
| 17354 |
}; |
| 17355 |
var _parchment = __webpack_require__(0); |
| 17356 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 17357 |
function _interopRequireDefault(obj) { |
| 17358 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 17359 |
} |
| 17360 |
function _classCallCheck2(instance, Constructor) { |
| 17361 |
if (!(instance instanceof Constructor)) { |
| 17362 |
throw new TypeError("Cannot call a class as a function"); |
| 17363 |
} |
| 17364 |
} |
| 17365 |
function _possibleConstructorReturn2(self2, call) { |
| 17366 |
if (!self2) { |
| 17367 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 17368 |
} |
| 17369 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 17370 |
} |
| 17371 |
function _inherits2(subClass, superClass) { |
| 17372 |
if (typeof superClass !== "function" && superClass !== null) { |
| 17373 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 17374 |
} |
| 17375 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 17376 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 17377 |
} |
| 17378 |
var Break = function(_Parchment$Embed) { |
| 17379 |
_inherits2(Break2, _Parchment$Embed); |
| 17380 |
function Break2() { |
| 17381 |
_classCallCheck2(this, Break2); |
| 17382 |
return _possibleConstructorReturn2(this, (Break2.__proto__ || Object.getPrototypeOf(Break2)).apply(this, arguments)); |
| 17383 |
} |
| 17384 |
_createClass2(Break2, [{ |
| 17385 |
key: "insertInto", |
| 17386 |
value: function insertInto(parent, ref) { |
| 17387 |
if (parent.children.length === 0) { |
| 17388 |
_get(Break2.prototype.__proto__ || Object.getPrototypeOf(Break2.prototype), "insertInto", this).call(this, parent, ref); |
| 17389 |
} else { |
| 17390 |
this.remove(); |
| 17391 |
} |
| 17392 |
} |
| 17393 |
}, { |
| 17394 |
key: "length", |
| 17395 |
value: function length() { |
| 17396 |
return 0; |
| 17397 |
} |
| 17398 |
}, { |
| 17399 |
key: "value", |
| 17400 |
value: function value() { |
| 17401 |
return ""; |
| 17402 |
} |
| 17403 |
}], [{ |
| 17404 |
key: "value", |
| 17405 |
value: function value() { |
| 17406 |
return void 0; |
| 17407 |
} |
| 17408 |
}]); |
| 17409 |
return Break2; |
| 17410 |
}(_parchment2.default.Embed); |
| 17411 |
Break.blotName = "break"; |
| 17412 |
Break.tagName = "BR"; |
| 17413 |
exports$12.default = Break; |
| 17414 |
}, |
| 17415 |
/* 17 */ |
| 17416 |
/***/ |
| 17417 |
function(module2, exports$12, __webpack_require__) { |
| 17418 |
var __extends2 = this && this.__extends || function() { |
| 17419 |
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { |
| 17420 |
d2.__proto__ = b2; |
| 17421 |
} || function(d2, b2) { |
| 17422 |
for (var p2 in b2) if (b2.hasOwnProperty(p2)) d2[p2] = b2[p2]; |
| 17423 |
}; |
| 17424 |
return function(d2, b2) { |
| 17425 |
extendStatics(d2, b2); |
| 17426 |
function __() { |
| 17427 |
this.constructor = d2; |
| 17428 |
} |
| 17429 |
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __()); |
| 17430 |
}; |
| 17431 |
}(); |
| 17432 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 17433 |
var linked_list_1 = __webpack_require__(44); |
| 17434 |
var shadow_1 = __webpack_require__(30); |
| 17435 |
var Registry = __webpack_require__(1); |
| 17436 |
var ContainerBlot = ( |
| 17437 |
/** @class */ |
| 17438 |
function(_super) { |
| 17439 |
__extends2(ContainerBlot2, _super); |
| 17440 |
function ContainerBlot2(domNode) { |
| 17441 |
var _this = _super.call(this, domNode) || this; |
| 17442 |
_this.build(); |
| 17443 |
return _this; |
| 17444 |
} |
| 17445 |
ContainerBlot2.prototype.appendChild = function(other) { |
| 17446 |
this.insertBefore(other); |
| 17447 |
}; |
| 17448 |
ContainerBlot2.prototype.attach = function() { |
| 17449 |
_super.prototype.attach.call(this); |
| 17450 |
this.children.forEach(function(child) { |
| 17451 |
child.attach(); |
| 17452 |
}); |
| 17453 |
}; |
| 17454 |
ContainerBlot2.prototype.build = function() { |
| 17455 |
var _this = this; |
| 17456 |
this.children = new linked_list_1.default(); |
| 17457 |
[].slice.call(this.domNode.childNodes).reverse().forEach(function(node) { |
| 17458 |
try { |
| 17459 |
var child = makeBlot(node); |
| 17460 |
_this.insertBefore(child, _this.children.head || void 0); |
| 17461 |
} catch (err) { |
| 17462 |
if (err instanceof Registry.ParchmentError) |
| 17463 |
return; |
| 17464 |
else |
| 17465 |
throw err; |
| 17466 |
} |
| 17467 |
}); |
| 17468 |
}; |
| 17469 |
ContainerBlot2.prototype.deleteAt = function(index, length) { |
| 17470 |
if (index === 0 && length === this.length()) { |
| 17471 |
return this.remove(); |
| 17472 |
} |
| 17473 |
this.children.forEachAt(index, length, function(child, offset, length2) { |
| 17474 |
child.deleteAt(offset, length2); |
| 17475 |
}); |
| 17476 |
}; |
| 17477 |
ContainerBlot2.prototype.descendant = function(criteria, index) { |
| 17478 |
var _a2 = this.children.find(index), child = _a2[0], offset = _a2[1]; |
| 17479 |
if (criteria.blotName == null && criteria(child) || criteria.blotName != null && child instanceof criteria) { |
| 17480 |
return [child, offset]; |
| 17481 |
} else if (child instanceof ContainerBlot2) { |
| 17482 |
return child.descendant(criteria, offset); |
| 17483 |
} else { |
| 17484 |
return [null, -1]; |
| 17485 |
} |
| 17486 |
}; |
| 17487 |
ContainerBlot2.prototype.descendants = function(criteria, index, length) { |
| 17488 |
if (index === void 0) { |
| 17489 |
index = 0; |
| 17490 |
} |
| 17491 |
if (length === void 0) { |
| 17492 |
length = Number.MAX_VALUE; |
| 17493 |
} |
| 17494 |
var descendants = []; |
| 17495 |
var lengthLeft = length; |
| 17496 |
this.children.forEachAt(index, length, function(child, index2, length2) { |
| 17497 |
if (criteria.blotName == null && criteria(child) || criteria.blotName != null && child instanceof criteria) { |
| 17498 |
descendants.push(child); |
| 17499 |
} |
| 17500 |
if (child instanceof ContainerBlot2) { |
| 17501 |
descendants = descendants.concat(child.descendants(criteria, index2, lengthLeft)); |
| 17502 |
} |
| 17503 |
lengthLeft -= length2; |
| 17504 |
}); |
| 17505 |
return descendants; |
| 17506 |
}; |
| 17507 |
ContainerBlot2.prototype.detach = function() { |
| 17508 |
this.children.forEach(function(child) { |
| 17509 |
child.detach(); |
| 17510 |
}); |
| 17511 |
_super.prototype.detach.call(this); |
| 17512 |
}; |
| 17513 |
ContainerBlot2.prototype.formatAt = function(index, length, name, value) { |
| 17514 |
this.children.forEachAt(index, length, function(child, offset, length2) { |
| 17515 |
child.formatAt(offset, length2, name, value); |
| 17516 |
}); |
| 17517 |
}; |
| 17518 |
ContainerBlot2.prototype.insertAt = function(index, value, def) { |
| 17519 |
var _a2 = this.children.find(index), child = _a2[0], offset = _a2[1]; |
| 17520 |
if (child) { |
| 17521 |
child.insertAt(offset, value, def); |
| 17522 |
} else { |
| 17523 |
var blot = def == null ? Registry.create("text", value) : Registry.create(value, def); |
| 17524 |
this.appendChild(blot); |
| 17525 |
} |
| 17526 |
}; |
| 17527 |
ContainerBlot2.prototype.insertBefore = function(childBlot, refBlot) { |
| 17528 |
if (this.statics.allowedChildren != null && !this.statics.allowedChildren.some(function(child) { |
| 17529 |
return childBlot instanceof child; |
| 17530 |
})) { |
| 17531 |
throw new Registry.ParchmentError("Cannot insert " + childBlot.statics.blotName + " into " + this.statics.blotName); |
| 17532 |
} |
| 17533 |
childBlot.insertInto(this, refBlot); |
| 17534 |
}; |
| 17535 |
ContainerBlot2.prototype.length = function() { |
| 17536 |
return this.children.reduce(function(memo, child) { |
| 17537 |
return memo + child.length(); |
| 17538 |
}, 0); |
| 17539 |
}; |
| 17540 |
ContainerBlot2.prototype.moveChildren = function(targetParent, refNode) { |
| 17541 |
this.children.forEach(function(child) { |
| 17542 |
targetParent.insertBefore(child, refNode); |
| 17543 |
}); |
| 17544 |
}; |
| 17545 |
ContainerBlot2.prototype.optimize = function(context) { |
| 17546 |
_super.prototype.optimize.call(this, context); |
| 17547 |
if (this.children.length === 0) { |
| 17548 |
if (this.statics.defaultChild != null) { |
| 17549 |
var child = Registry.create(this.statics.defaultChild); |
| 17550 |
this.appendChild(child); |
| 17551 |
child.optimize(context); |
| 17552 |
} else { |
| 17553 |
this.remove(); |
| 17554 |
} |
| 17555 |
} |
| 17556 |
}; |
| 17557 |
ContainerBlot2.prototype.path = function(index, inclusive) { |
| 17558 |
if (inclusive === void 0) { |
| 17559 |
inclusive = false; |
| 17560 |
} |
| 17561 |
var _a2 = this.children.find(index, inclusive), child = _a2[0], offset = _a2[1]; |
| 17562 |
var position = [[this, index]]; |
| 17563 |
if (child instanceof ContainerBlot2) { |
| 17564 |
return position.concat(child.path(offset, inclusive)); |
| 17565 |
} else if (child != null) { |
| 17566 |
position.push([child, offset]); |
| 17567 |
} |
| 17568 |
return position; |
| 17569 |
}; |
| 17570 |
ContainerBlot2.prototype.removeChild = function(child) { |
| 17571 |
this.children.remove(child); |
| 17572 |
}; |
| 17573 |
ContainerBlot2.prototype.replace = function(target) { |
| 17574 |
if (target instanceof ContainerBlot2) { |
| 17575 |
target.moveChildren(this); |
| 17576 |
} |
| 17577 |
_super.prototype.replace.call(this, target); |
| 17578 |
}; |
| 17579 |
ContainerBlot2.prototype.split = function(index, force) { |
| 17580 |
if (force === void 0) { |
| 17581 |
force = false; |
| 17582 |
} |
| 17583 |
if (!force) { |
| 17584 |
if (index === 0) |
| 17585 |
return this; |
| 17586 |
if (index === this.length()) |
| 17587 |
return this.next; |
| 17588 |
} |
| 17589 |
var after = this.clone(); |
| 17590 |
this.parent.insertBefore(after, this.next); |
| 17591 |
this.children.forEachAt(index, this.length(), function(child, offset, length) { |
| 17592 |
child = child.split(offset, force); |
| 17593 |
after.appendChild(child); |
| 17594 |
}); |
| 17595 |
return after; |
| 17596 |
}; |
| 17597 |
ContainerBlot2.prototype.unwrap = function() { |
| 17598 |
this.moveChildren(this.parent, this.next); |
| 17599 |
this.remove(); |
| 17600 |
}; |
| 17601 |
ContainerBlot2.prototype.update = function(mutations, context) { |
| 17602 |
var _this = this; |
| 17603 |
var addedNodes = []; |
| 17604 |
var removedNodes = []; |
| 17605 |
mutations.forEach(function(mutation) { |
| 17606 |
if (mutation.target === _this.domNode && mutation.type === "childList") { |
| 17607 |
addedNodes.push.apply(addedNodes, mutation.addedNodes); |
| 17608 |
removedNodes.push.apply(removedNodes, mutation.removedNodes); |
| 17609 |
} |
| 17610 |
}); |
| 17611 |
removedNodes.forEach(function(node) { |
| 17612 |
if (node.parentNode != null && // @ts-ignore |
| 17613 |
node.tagName !== "IFRAME" && document.body.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) { |
| 17614 |
return; |
| 17615 |
} |
| 17616 |
var blot = Registry.find(node); |
| 17617 |
if (blot == null) |
| 17618 |
return; |
| 17619 |
if (blot.domNode.parentNode == null || blot.domNode.parentNode === _this.domNode) { |
| 17620 |
blot.detach(); |
| 17621 |
} |
| 17622 |
}); |
| 17623 |
addedNodes.filter(function(node) { |
| 17624 |
return node.parentNode == _this.domNode; |
| 17625 |
}).sort(function(a, b2) { |
| 17626 |
if (a === b2) |
| 17627 |
return 0; |
| 17628 |
if (a.compareDocumentPosition(b2) & Node.DOCUMENT_POSITION_FOLLOWING) { |
| 17629 |
return 1; |
| 17630 |
} |
| 17631 |
return -1; |
| 17632 |
}).forEach(function(node) { |
| 17633 |
var refBlot = null; |
| 17634 |
if (node.nextSibling != null) { |
| 17635 |
refBlot = Registry.find(node.nextSibling); |
| 17636 |
} |
| 17637 |
var blot = makeBlot(node); |
| 17638 |
if (blot.next != refBlot || blot.next == null) { |
| 17639 |
if (blot.parent != null) { |
| 17640 |
blot.parent.removeChild(_this); |
| 17641 |
} |
| 17642 |
_this.insertBefore(blot, refBlot || void 0); |
| 17643 |
} |
| 17644 |
}); |
| 17645 |
}; |
| 17646 |
return ContainerBlot2; |
| 17647 |
}(shadow_1.default) |
| 17648 |
); |
| 17649 |
function makeBlot(node) { |
| 17650 |
var blot = Registry.find(node); |
| 17651 |
if (blot == null) { |
| 17652 |
try { |
| 17653 |
blot = Registry.create(node); |
| 17654 |
} catch (e2) { |
| 17655 |
blot = Registry.create(Registry.Scope.INLINE); |
| 17656 |
[].slice.call(node.childNodes).forEach(function(child) { |
| 17657 |
blot.domNode.appendChild(child); |
| 17658 |
}); |
| 17659 |
if (node.parentNode) { |
| 17660 |
node.parentNode.replaceChild(blot.domNode, node); |
| 17661 |
} |
| 17662 |
blot.attach(); |
| 17663 |
} |
| 17664 |
} |
| 17665 |
return blot; |
| 17666 |
} |
| 17667 |
exports$12.default = ContainerBlot; |
| 17668 |
}, |
| 17669 |
/* 18 */ |
| 17670 |
/***/ |
| 17671 |
function(module2, exports$12, __webpack_require__) { |
| 17672 |
var __extends2 = this && this.__extends || function() { |
| 17673 |
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { |
| 17674 |
d2.__proto__ = b2; |
| 17675 |
} || function(d2, b2) { |
| 17676 |
for (var p2 in b2) if (b2.hasOwnProperty(p2)) d2[p2] = b2[p2]; |
| 17677 |
}; |
| 17678 |
return function(d2, b2) { |
| 17679 |
extendStatics(d2, b2); |
| 17680 |
function __() { |
| 17681 |
this.constructor = d2; |
| 17682 |
} |
| 17683 |
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __()); |
| 17684 |
}; |
| 17685 |
}(); |
| 17686 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 17687 |
var attributor_1 = __webpack_require__(12); |
| 17688 |
var store_1 = __webpack_require__(31); |
| 17689 |
var container_1 = __webpack_require__(17); |
| 17690 |
var Registry = __webpack_require__(1); |
| 17691 |
var FormatBlot = ( |
| 17692 |
/** @class */ |
| 17693 |
function(_super) { |
| 17694 |
__extends2(FormatBlot2, _super); |
| 17695 |
function FormatBlot2(domNode) { |
| 17696 |
var _this = _super.call(this, domNode) || this; |
| 17697 |
_this.attributes = new store_1.default(_this.domNode); |
| 17698 |
return _this; |
| 17699 |
} |
| 17700 |
FormatBlot2.formats = function(domNode) { |
| 17701 |
if (typeof this.tagName === "string") { |
| 17702 |
return true; |
| 17703 |
} else if (Array.isArray(this.tagName)) { |
| 17704 |
return domNode.tagName.toLowerCase(); |
| 17705 |
} |
| 17706 |
return void 0; |
| 17707 |
}; |
| 17708 |
FormatBlot2.prototype.format = function(name, value) { |
| 17709 |
var format = Registry.query(name); |
| 17710 |
if (format instanceof attributor_1.default) { |
| 17711 |
this.attributes.attribute(format, value); |
| 17712 |
} else if (value) { |
| 17713 |
if (format != null && (name !== this.statics.blotName || this.formats()[name] !== value)) { |
| 17714 |
this.replaceWith(name, value); |
| 17715 |
} |
| 17716 |
} |
| 17717 |
}; |
| 17718 |
FormatBlot2.prototype.formats = function() { |
| 17719 |
var formats = this.attributes.values(); |
| 17720 |
var format = this.statics.formats(this.domNode); |
| 17721 |
if (format != null) { |
| 17722 |
formats[this.statics.blotName] = format; |
| 17723 |
} |
| 17724 |
return formats; |
| 17725 |
}; |
| 17726 |
FormatBlot2.prototype.replaceWith = function(name, value) { |
| 17727 |
var replacement = _super.prototype.replaceWith.call(this, name, value); |
| 17728 |
this.attributes.copy(replacement); |
| 17729 |
return replacement; |
| 17730 |
}; |
| 17731 |
FormatBlot2.prototype.update = function(mutations, context) { |
| 17732 |
var _this = this; |
| 17733 |
_super.prototype.update.call(this, mutations, context); |
| 17734 |
if (mutations.some(function(mutation) { |
| 17735 |
return mutation.target === _this.domNode && mutation.type === "attributes"; |
| 17736 |
})) { |
| 17737 |
this.attributes.build(); |
| 17738 |
} |
| 17739 |
}; |
| 17740 |
FormatBlot2.prototype.wrap = function(name, value) { |
| 17741 |
var wrapper = _super.prototype.wrap.call(this, name, value); |
| 17742 |
if (wrapper instanceof FormatBlot2 && wrapper.statics.scope === this.statics.scope) { |
| 17743 |
this.attributes.move(wrapper); |
| 17744 |
} |
| 17745 |
return wrapper; |
| 17746 |
}; |
| 17747 |
return FormatBlot2; |
| 17748 |
}(container_1.default) |
| 17749 |
); |
| 17750 |
exports$12.default = FormatBlot; |
| 17751 |
}, |
| 17752 |
/* 19 */ |
| 17753 |
/***/ |
| 17754 |
function(module2, exports$12, __webpack_require__) { |
| 17755 |
var __extends2 = this && this.__extends || function() { |
| 17756 |
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { |
| 17757 |
d2.__proto__ = b2; |
| 17758 |
} || function(d2, b2) { |
| 17759 |
for (var p2 in b2) if (b2.hasOwnProperty(p2)) d2[p2] = b2[p2]; |
| 17760 |
}; |
| 17761 |
return function(d2, b2) { |
| 17762 |
extendStatics(d2, b2); |
| 17763 |
function __() { |
| 17764 |
this.constructor = d2; |
| 17765 |
} |
| 17766 |
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __()); |
| 17767 |
}; |
| 17768 |
}(); |
| 17769 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 17770 |
var shadow_1 = __webpack_require__(30); |
| 17771 |
var Registry = __webpack_require__(1); |
| 17772 |
var LeafBlot = ( |
| 17773 |
/** @class */ |
| 17774 |
function(_super) { |
| 17775 |
__extends2(LeafBlot2, _super); |
| 17776 |
function LeafBlot2() { |
| 17777 |
return _super !== null && _super.apply(this, arguments) || this; |
| 17778 |
} |
| 17779 |
LeafBlot2.value = function(domNode) { |
| 17780 |
return true; |
| 17781 |
}; |
| 17782 |
LeafBlot2.prototype.index = function(node, offset) { |
| 17783 |
if (this.domNode === node || this.domNode.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_CONTAINED_BY) { |
| 17784 |
return Math.min(offset, 1); |
| 17785 |
} |
| 17786 |
return -1; |
| 17787 |
}; |
| 17788 |
LeafBlot2.prototype.position = function(index, inclusive) { |
| 17789 |
var offset = [].indexOf.call(this.parent.domNode.childNodes, this.domNode); |
| 17790 |
if (index > 0) |
| 17791 |
offset += 1; |
| 17792 |
return [this.parent.domNode, offset]; |
| 17793 |
}; |
| 17794 |
LeafBlot2.prototype.value = function() { |
| 17795 |
var _a2; |
| 17796 |
return _a2 = {}, _a2[this.statics.blotName] = this.statics.value(this.domNode) || true, _a2; |
| 17797 |
}; |
| 17798 |
LeafBlot2.scope = Registry.Scope.INLINE_BLOT; |
| 17799 |
return LeafBlot2; |
| 17800 |
}(shadow_1.default) |
| 17801 |
); |
| 17802 |
exports$12.default = LeafBlot; |
| 17803 |
}, |
| 17804 |
/* 20 */ |
| 17805 |
/***/ |
| 17806 |
function(module2, exports$12, __webpack_require__) { |
| 17807 |
var equal = __webpack_require__(11); |
| 17808 |
var extend = __webpack_require__(3); |
| 17809 |
var lib2 = { |
| 17810 |
attributes: { |
| 17811 |
compose: function(a, b2, keepNull) { |
| 17812 |
if (typeof a !== "object") a = {}; |
| 17813 |
if (typeof b2 !== "object") b2 = {}; |
| 17814 |
var attributes = extend(true, {}, b2); |
| 17815 |
if (!keepNull) { |
| 17816 |
attributes = Object.keys(attributes).reduce(function(copy, key2) { |
| 17817 |
if (attributes[key2] != null) { |
| 17818 |
copy[key2] = attributes[key2]; |
| 17819 |
} |
| 17820 |
return copy; |
| 17821 |
}, {}); |
| 17822 |
} |
| 17823 |
for (var key in a) { |
| 17824 |
if (a[key] !== void 0 && b2[key] === void 0) { |
| 17825 |
attributes[key] = a[key]; |
| 17826 |
} |
| 17827 |
} |
| 17828 |
return Object.keys(attributes).length > 0 ? attributes : void 0; |
| 17829 |
}, |
| 17830 |
diff: function(a, b2) { |
| 17831 |
if (typeof a !== "object") a = {}; |
| 17832 |
if (typeof b2 !== "object") b2 = {}; |
| 17833 |
var attributes = Object.keys(a).concat(Object.keys(b2)).reduce(function(attributes2, key) { |
| 17834 |
if (!equal(a[key], b2[key])) { |
| 17835 |
attributes2[key] = b2[key] === void 0 ? null : b2[key]; |
| 17836 |
} |
| 17837 |
return attributes2; |
| 17838 |
}, {}); |
| 17839 |
return Object.keys(attributes).length > 0 ? attributes : void 0; |
| 17840 |
}, |
| 17841 |
transform: function(a, b2, priority) { |
| 17842 |
if (typeof a !== "object") return b2; |
| 17843 |
if (typeof b2 !== "object") return void 0; |
| 17844 |
if (!priority) return b2; |
| 17845 |
var attributes = Object.keys(b2).reduce(function(attributes2, key) { |
| 17846 |
if (a[key] === void 0) attributes2[key] = b2[key]; |
| 17847 |
return attributes2; |
| 17848 |
}, {}); |
| 17849 |
return Object.keys(attributes).length > 0 ? attributes : void 0; |
| 17850 |
} |
| 17851 |
}, |
| 17852 |
iterator: function(ops) { |
| 17853 |
return new Iterator(ops); |
| 17854 |
}, |
| 17855 |
length: function(op) { |
| 17856 |
if (typeof op["delete"] === "number") { |
| 17857 |
return op["delete"]; |
| 17858 |
} else if (typeof op.retain === "number") { |
| 17859 |
return op.retain; |
| 17860 |
} else { |
| 17861 |
return typeof op.insert === "string" ? op.insert.length : 1; |
| 17862 |
} |
| 17863 |
} |
| 17864 |
}; |
| 17865 |
function Iterator(ops) { |
| 17866 |
this.ops = ops; |
| 17867 |
this.index = 0; |
| 17868 |
this.offset = 0; |
| 17869 |
} |
| 17870 |
Iterator.prototype.hasNext = function() { |
| 17871 |
return this.peekLength() < Infinity; |
| 17872 |
}; |
| 17873 |
Iterator.prototype.next = function(length) { |
| 17874 |
if (!length) length = Infinity; |
| 17875 |
var nextOp = this.ops[this.index]; |
| 17876 |
if (nextOp) { |
| 17877 |
var offset = this.offset; |
| 17878 |
var opLength = lib2.length(nextOp); |
| 17879 |
if (length >= opLength - offset) { |
| 17880 |
length = opLength - offset; |
| 17881 |
this.index += 1; |
| 17882 |
this.offset = 0; |
| 17883 |
} else { |
| 17884 |
this.offset += length; |
| 17885 |
} |
| 17886 |
if (typeof nextOp["delete"] === "number") { |
| 17887 |
return { "delete": length }; |
| 17888 |
} else { |
| 17889 |
var retOp = {}; |
| 17890 |
if (nextOp.attributes) { |
| 17891 |
retOp.attributes = nextOp.attributes; |
| 17892 |
} |
| 17893 |
if (typeof nextOp.retain === "number") { |
| 17894 |
retOp.retain = length; |
| 17895 |
} else if (typeof nextOp.insert === "string") { |
| 17896 |
retOp.insert = nextOp.insert.substr(offset, length); |
| 17897 |
} else { |
| 17898 |
retOp.insert = nextOp.insert; |
| 17899 |
} |
| 17900 |
return retOp; |
| 17901 |
} |
| 17902 |
} else { |
| 17903 |
return { retain: Infinity }; |
| 17904 |
} |
| 17905 |
}; |
| 17906 |
Iterator.prototype.peek = function() { |
| 17907 |
return this.ops[this.index]; |
| 17908 |
}; |
| 17909 |
Iterator.prototype.peekLength = function() { |
| 17910 |
if (this.ops[this.index]) { |
| 17911 |
return lib2.length(this.ops[this.index]) - this.offset; |
| 17912 |
} else { |
| 17913 |
return Infinity; |
| 17914 |
} |
| 17915 |
}; |
| 17916 |
Iterator.prototype.peekType = function() { |
| 17917 |
if (this.ops[this.index]) { |
| 17918 |
if (typeof this.ops[this.index]["delete"] === "number") { |
| 17919 |
return "delete"; |
| 17920 |
} else if (typeof this.ops[this.index].retain === "number") { |
| 17921 |
return "retain"; |
| 17922 |
} else { |
| 17923 |
return "insert"; |
| 17924 |
} |
| 17925 |
} |
| 17926 |
return "retain"; |
| 17927 |
}; |
| 17928 |
Iterator.prototype.rest = function() { |
| 17929 |
if (!this.hasNext()) { |
| 17930 |
return []; |
| 17931 |
} else if (this.offset === 0) { |
| 17932 |
return this.ops.slice(this.index); |
| 17933 |
} else { |
| 17934 |
var offset = this.offset; |
| 17935 |
var index = this.index; |
| 17936 |
var next = this.next(); |
| 17937 |
var rest = this.ops.slice(this.index); |
| 17938 |
this.offset = offset; |
| 17939 |
this.index = index; |
| 17940 |
return [next].concat(rest); |
| 17941 |
} |
| 17942 |
}; |
| 17943 |
module2.exports = lib2; |
| 17944 |
}, |
| 17945 |
/* 21 */ |
| 17946 |
/***/ |
| 17947 |
function(module2, exports$12) { |
| 17948 |
var clone = function() { |
| 17949 |
function _instanceof(obj, type) { |
| 17950 |
return type != null && obj instanceof type; |
| 17951 |
} |
| 17952 |
var nativeMap; |
| 17953 |
try { |
| 17954 |
nativeMap = Map; |
| 17955 |
} catch (_) { |
| 17956 |
nativeMap = function() { |
| 17957 |
}; |
| 17958 |
} |
| 17959 |
var nativeSet; |
| 17960 |
try { |
| 17961 |
nativeSet = Set; |
| 17962 |
} catch (_) { |
| 17963 |
nativeSet = function() { |
| 17964 |
}; |
| 17965 |
} |
| 17966 |
var nativePromise; |
| 17967 |
try { |
| 17968 |
nativePromise = Promise; |
| 17969 |
} catch (_) { |
| 17970 |
nativePromise = function() { |
| 17971 |
}; |
| 17972 |
} |
| 17973 |
function clone2(parent, circular, depth, prototype, includeNonEnumerable) { |
| 17974 |
if (typeof circular === "object") { |
| 17975 |
depth = circular.depth; |
| 17976 |
prototype = circular.prototype; |
| 17977 |
includeNonEnumerable = circular.includeNonEnumerable; |
| 17978 |
circular = circular.circular; |
| 17979 |
} |
| 17980 |
var allParents = []; |
| 17981 |
var allChildren = []; |
| 17982 |
var useBuffer = typeof Buffer != "undefined"; |
| 17983 |
if (typeof circular == "undefined") |
| 17984 |
circular = true; |
| 17985 |
if (typeof depth == "undefined") |
| 17986 |
depth = Infinity; |
| 17987 |
function _clone(parent2, depth2) { |
| 17988 |
if (parent2 === null) |
| 17989 |
return null; |
| 17990 |
if (depth2 === 0) |
| 17991 |
return parent2; |
| 17992 |
var child; |
| 17993 |
var proto; |
| 17994 |
if (typeof parent2 != "object") { |
| 17995 |
return parent2; |
| 17996 |
} |
| 17997 |
if (_instanceof(parent2, nativeMap)) { |
| 17998 |
child = new nativeMap(); |
| 17999 |
} else if (_instanceof(parent2, nativeSet)) { |
| 18000 |
child = new nativeSet(); |
| 18001 |
} else if (_instanceof(parent2, nativePromise)) { |
| 18002 |
child = new nativePromise(function(resolve, reject) { |
| 18003 |
parent2.then(function(value) { |
| 18004 |
resolve(_clone(value, depth2 - 1)); |
| 18005 |
}, function(err) { |
| 18006 |
reject(_clone(err, depth2 - 1)); |
| 18007 |
}); |
| 18008 |
}); |
| 18009 |
} else if (clone2.__isArray(parent2)) { |
| 18010 |
child = []; |
| 18011 |
} else if (clone2.__isRegExp(parent2)) { |
| 18012 |
child = new RegExp(parent2.source, __getRegExpFlags(parent2)); |
| 18013 |
if (parent2.lastIndex) child.lastIndex = parent2.lastIndex; |
| 18014 |
} else if (clone2.__isDate(parent2)) { |
| 18015 |
child = new Date(parent2.getTime()); |
| 18016 |
} else if (useBuffer && Buffer.isBuffer(parent2)) { |
| 18017 |
if (Buffer.allocUnsafe) { |
| 18018 |
child = Buffer.allocUnsafe(parent2.length); |
| 18019 |
} else { |
| 18020 |
child = new Buffer(parent2.length); |
| 18021 |
} |
| 18022 |
parent2.copy(child); |
| 18023 |
return child; |
| 18024 |
} else if (_instanceof(parent2, Error)) { |
| 18025 |
child = Object.create(parent2); |
| 18026 |
} else { |
| 18027 |
if (typeof prototype == "undefined") { |
| 18028 |
proto = Object.getPrototypeOf(parent2); |
| 18029 |
child = Object.create(proto); |
| 18030 |
} else { |
| 18031 |
child = Object.create(prototype); |
| 18032 |
proto = prototype; |
| 18033 |
} |
| 18034 |
} |
| 18035 |
if (circular) { |
| 18036 |
var index = allParents.indexOf(parent2); |
| 18037 |
if (index != -1) { |
| 18038 |
return allChildren[index]; |
| 18039 |
} |
| 18040 |
allParents.push(parent2); |
| 18041 |
allChildren.push(child); |
| 18042 |
} |
| 18043 |
if (_instanceof(parent2, nativeMap)) { |
| 18044 |
parent2.forEach(function(value, key) { |
| 18045 |
var keyChild = _clone(key, depth2 - 1); |
| 18046 |
var valueChild = _clone(value, depth2 - 1); |
| 18047 |
child.set(keyChild, valueChild); |
| 18048 |
}); |
| 18049 |
} |
| 18050 |
if (_instanceof(parent2, nativeSet)) { |
| 18051 |
parent2.forEach(function(value) { |
| 18052 |
var entryChild = _clone(value, depth2 - 1); |
| 18053 |
child.add(entryChild); |
| 18054 |
}); |
| 18055 |
} |
| 18056 |
for (var i in parent2) { |
| 18057 |
var attrs; |
| 18058 |
if (proto) { |
| 18059 |
attrs = Object.getOwnPropertyDescriptor(proto, i); |
| 18060 |
} |
| 18061 |
if (attrs && attrs.set == null) { |
| 18062 |
continue; |
| 18063 |
} |
| 18064 |
child[i] = _clone(parent2[i], depth2 - 1); |
| 18065 |
} |
| 18066 |
if (Object.getOwnPropertySymbols) { |
| 18067 |
var symbols = Object.getOwnPropertySymbols(parent2); |
| 18068 |
for (var i = 0; i < symbols.length; i++) { |
| 18069 |
var symbol = symbols[i]; |
| 18070 |
var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol); |
| 18071 |
if (descriptor && !descriptor.enumerable && !includeNonEnumerable) { |
| 18072 |
continue; |
| 18073 |
} |
| 18074 |
child[symbol] = _clone(parent2[symbol], depth2 - 1); |
| 18075 |
if (!descriptor.enumerable) { |
| 18076 |
Object.defineProperty(child, symbol, { |
| 18077 |
enumerable: false |
| 18078 |
}); |
| 18079 |
} |
| 18080 |
} |
| 18081 |
} |
| 18082 |
if (includeNonEnumerable) { |
| 18083 |
var allPropertyNames = Object.getOwnPropertyNames(parent2); |
| 18084 |
for (var i = 0; i < allPropertyNames.length; i++) { |
| 18085 |
var propertyName = allPropertyNames[i]; |
| 18086 |
var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName); |
| 18087 |
if (descriptor && descriptor.enumerable) { |
| 18088 |
continue; |
| 18089 |
} |
| 18090 |
child[propertyName] = _clone(parent2[propertyName], depth2 - 1); |
| 18091 |
Object.defineProperty(child, propertyName, { |
| 18092 |
enumerable: false |
| 18093 |
}); |
| 18094 |
} |
| 18095 |
} |
| 18096 |
return child; |
| 18097 |
} |
| 18098 |
return _clone(parent, depth); |
| 18099 |
} |
| 18100 |
clone2.clonePrototype = function clonePrototype(parent) { |
| 18101 |
if (parent === null) |
| 18102 |
return null; |
| 18103 |
var c2 = function() { |
| 18104 |
}; |
| 18105 |
c2.prototype = parent; |
| 18106 |
return new c2(); |
| 18107 |
}; |
| 18108 |
function __objToStr(o) { |
| 18109 |
return Object.prototype.toString.call(o); |
| 18110 |
} |
| 18111 |
clone2.__objToStr = __objToStr; |
| 18112 |
function __isDate(o) { |
| 18113 |
return typeof o === "object" && __objToStr(o) === "[object Date]"; |
| 18114 |
} |
| 18115 |
clone2.__isDate = __isDate; |
| 18116 |
function __isArray(o) { |
| 18117 |
return typeof o === "object" && __objToStr(o) === "[object Array]"; |
| 18118 |
} |
| 18119 |
clone2.__isArray = __isArray; |
| 18120 |
function __isRegExp(o) { |
| 18121 |
return typeof o === "object" && __objToStr(o) === "[object RegExp]"; |
| 18122 |
} |
| 18123 |
clone2.__isRegExp = __isRegExp; |
| 18124 |
function __getRegExpFlags(re2) { |
| 18125 |
var flags = ""; |
| 18126 |
if (re2.global) flags += "g"; |
| 18127 |
if (re2.ignoreCase) flags += "i"; |
| 18128 |
if (re2.multiline) flags += "m"; |
| 18129 |
return flags; |
| 18130 |
} |
| 18131 |
clone2.__getRegExpFlags = __getRegExpFlags; |
| 18132 |
return clone2; |
| 18133 |
}(); |
| 18134 |
if (typeof module2 === "object" && module2.exports) { |
| 18135 |
module2.exports = clone; |
| 18136 |
} |
| 18137 |
}, |
| 18138 |
/* 22 */ |
| 18139 |
/***/ |
| 18140 |
function(module2, exports$12, __webpack_require__) { |
| 18141 |
Object.defineProperty(exports$12, "__esModule", { |
| 18142 |
value: true |
| 18143 |
}); |
| 18144 |
var _slicedToArray2 = /* @__PURE__ */ function() { |
| 18145 |
function sliceIterator(arr, i) { |
| 18146 |
var _arr = []; |
| 18147 |
var _n = true; |
| 18148 |
var _d2 = false; |
| 18149 |
var _e2 = void 0; |
| 18150 |
try { |
| 18151 |
for (var _i2 = arr[Symbol.iterator](), _s; !(_n = (_s = _i2.next()).done); _n = true) { |
| 18152 |
_arr.push(_s.value); |
| 18153 |
if (i && _arr.length === i) break; |
| 18154 |
} |
| 18155 |
} catch (err) { |
| 18156 |
_d2 = true; |
| 18157 |
_e2 = err; |
| 18158 |
} finally { |
| 18159 |
try { |
| 18160 |
if (!_n && _i2["return"]) _i2["return"](); |
| 18161 |
} finally { |
| 18162 |
if (_d2) throw _e2; |
| 18163 |
} |
| 18164 |
} |
| 18165 |
return _arr; |
| 18166 |
} |
| 18167 |
return function(arr, i) { |
| 18168 |
if (Array.isArray(arr)) { |
| 18169 |
return arr; |
| 18170 |
} else if (Symbol.iterator in Object(arr)) { |
| 18171 |
return sliceIterator(arr, i); |
| 18172 |
} else { |
| 18173 |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); |
| 18174 |
} |
| 18175 |
}; |
| 18176 |
}(); |
| 18177 |
var _createClass2 = /* @__PURE__ */ function() { |
| 18178 |
function defineProperties(target, props) { |
| 18179 |
for (var i = 0; i < props.length; i++) { |
| 18180 |
var descriptor = props[i]; |
| 18181 |
descriptor.enumerable = descriptor.enumerable || false; |
| 18182 |
descriptor.configurable = true; |
| 18183 |
if ("value" in descriptor) descriptor.writable = true; |
| 18184 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 18185 |
} |
| 18186 |
} |
| 18187 |
return function(Constructor, protoProps, staticProps) { |
| 18188 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 18189 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 18190 |
return Constructor; |
| 18191 |
}; |
| 18192 |
}(); |
| 18193 |
var _get = function get(object, property, receiver) { |
| 18194 |
if (object === null) object = Function.prototype; |
| 18195 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 18196 |
if (desc === void 0) { |
| 18197 |
var parent = Object.getPrototypeOf(object); |
| 18198 |
if (parent === null) { |
| 18199 |
return void 0; |
| 18200 |
} else { |
| 18201 |
return get(parent, property, receiver); |
| 18202 |
} |
| 18203 |
} else if ("value" in desc) { |
| 18204 |
return desc.value; |
| 18205 |
} else { |
| 18206 |
var getter = desc.get; |
| 18207 |
if (getter === void 0) { |
| 18208 |
return void 0; |
| 18209 |
} |
| 18210 |
return getter.call(receiver); |
| 18211 |
} |
| 18212 |
}; |
| 18213 |
var _parchment = __webpack_require__(0); |
| 18214 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 18215 |
var _emitter = __webpack_require__(8); |
| 18216 |
var _emitter2 = _interopRequireDefault(_emitter); |
| 18217 |
var _block = __webpack_require__(4); |
| 18218 |
var _block2 = _interopRequireDefault(_block); |
| 18219 |
var _break = __webpack_require__(16); |
| 18220 |
var _break2 = _interopRequireDefault(_break); |
| 18221 |
var _code = __webpack_require__(13); |
| 18222 |
var _code2 = _interopRequireDefault(_code); |
| 18223 |
var _container = __webpack_require__(25); |
| 18224 |
var _container2 = _interopRequireDefault(_container); |
| 18225 |
function _interopRequireDefault(obj) { |
| 18226 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 18227 |
} |
| 18228 |
function _classCallCheck2(instance, Constructor) { |
| 18229 |
if (!(instance instanceof Constructor)) { |
| 18230 |
throw new TypeError("Cannot call a class as a function"); |
| 18231 |
} |
| 18232 |
} |
| 18233 |
function _possibleConstructorReturn2(self2, call) { |
| 18234 |
if (!self2) { |
| 18235 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 18236 |
} |
| 18237 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 18238 |
} |
| 18239 |
function _inherits2(subClass, superClass) { |
| 18240 |
if (typeof superClass !== "function" && superClass !== null) { |
| 18241 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 18242 |
} |
| 18243 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 18244 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 18245 |
} |
| 18246 |
function isLine(blot) { |
| 18247 |
return blot instanceof _block2.default || blot instanceof _block.BlockEmbed; |
| 18248 |
} |
| 18249 |
var Scroll = function(_Parchment$Scroll) { |
| 18250 |
_inherits2(Scroll2, _Parchment$Scroll); |
| 18251 |
function Scroll2(domNode, config) { |
| 18252 |
_classCallCheck2(this, Scroll2); |
| 18253 |
var _this = _possibleConstructorReturn2(this, (Scroll2.__proto__ || Object.getPrototypeOf(Scroll2)).call(this, domNode)); |
| 18254 |
_this.emitter = config.emitter; |
| 18255 |
if (Array.isArray(config.whitelist)) { |
| 18256 |
_this.whitelist = config.whitelist.reduce(function(whitelist, format) { |
| 18257 |
whitelist[format] = true; |
| 18258 |
return whitelist; |
| 18259 |
}, {}); |
| 18260 |
} |
| 18261 |
_this.domNode.addEventListener("DOMNodeInserted", function() { |
| 18262 |
}); |
| 18263 |
_this.optimize(); |
| 18264 |
_this.enable(); |
| 18265 |
return _this; |
| 18266 |
} |
| 18267 |
_createClass2(Scroll2, [{ |
| 18268 |
key: "batchStart", |
| 18269 |
value: function batchStart() { |
| 18270 |
this.batch = true; |
| 18271 |
} |
| 18272 |
}, { |
| 18273 |
key: "batchEnd", |
| 18274 |
value: function batchEnd() { |
| 18275 |
this.batch = false; |
| 18276 |
this.optimize(); |
| 18277 |
} |
| 18278 |
}, { |
| 18279 |
key: "deleteAt", |
| 18280 |
value: function deleteAt(index, length) { |
| 18281 |
var _line = this.line(index), _line2 = _slicedToArray2(_line, 2), first = _line2[0], offset = _line2[1]; |
| 18282 |
var _line3 = this.line(index + length), _line4 = _slicedToArray2(_line3, 1), last = _line4[0]; |
| 18283 |
_get(Scroll2.prototype.__proto__ || Object.getPrototypeOf(Scroll2.prototype), "deleteAt", this).call(this, index, length); |
| 18284 |
if (last != null && first !== last && offset > 0) { |
| 18285 |
if (first instanceof _block.BlockEmbed || last instanceof _block.BlockEmbed) { |
| 18286 |
this.optimize(); |
| 18287 |
return; |
| 18288 |
} |
| 18289 |
if (first instanceof _code2.default) { |
| 18290 |
var newlineIndex = first.newlineIndex(first.length(), true); |
| 18291 |
if (newlineIndex > -1) { |
| 18292 |
first = first.split(newlineIndex + 1); |
| 18293 |
if (first === last) { |
| 18294 |
this.optimize(); |
| 18295 |
return; |
| 18296 |
} |
| 18297 |
} |
| 18298 |
} else if (last instanceof _code2.default) { |
| 18299 |
var _newlineIndex = last.newlineIndex(0); |
| 18300 |
if (_newlineIndex > -1) { |
| 18301 |
last.split(_newlineIndex + 1); |
| 18302 |
} |
| 18303 |
} |
| 18304 |
var ref = last.children.head instanceof _break2.default ? null : last.children.head; |
| 18305 |
first.moveChildren(last, ref); |
| 18306 |
first.remove(); |
| 18307 |
} |
| 18308 |
this.optimize(); |
| 18309 |
} |
| 18310 |
}, { |
| 18311 |
key: "enable", |
| 18312 |
value: function enable() { |
| 18313 |
var enabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true; |
| 18314 |
this.domNode.setAttribute("contenteditable", enabled); |
| 18315 |
} |
| 18316 |
}, { |
| 18317 |
key: "formatAt", |
| 18318 |
value: function formatAt(index, length, format, value) { |
| 18319 |
if (this.whitelist != null && !this.whitelist[format]) return; |
| 18320 |
_get(Scroll2.prototype.__proto__ || Object.getPrototypeOf(Scroll2.prototype), "formatAt", this).call(this, index, length, format, value); |
| 18321 |
this.optimize(); |
| 18322 |
} |
| 18323 |
}, { |
| 18324 |
key: "insertAt", |
| 18325 |
value: function insertAt(index, value, def) { |
| 18326 |
if (def != null && this.whitelist != null && !this.whitelist[value]) return; |
| 18327 |
if (index >= this.length()) { |
| 18328 |
if (def == null || _parchment2.default.query(value, _parchment2.default.Scope.BLOCK) == null) { |
| 18329 |
var blot = _parchment2.default.create(this.statics.defaultChild); |
| 18330 |
this.appendChild(blot); |
| 18331 |
if (def == null && value.endsWith("\n")) { |
| 18332 |
value = value.slice(0, -1); |
| 18333 |
} |
| 18334 |
blot.insertAt(0, value, def); |
| 18335 |
} else { |
| 18336 |
var embed = _parchment2.default.create(value, def); |
| 18337 |
this.appendChild(embed); |
| 18338 |
} |
| 18339 |
} else { |
| 18340 |
_get(Scroll2.prototype.__proto__ || Object.getPrototypeOf(Scroll2.prototype), "insertAt", this).call(this, index, value, def); |
| 18341 |
} |
| 18342 |
this.optimize(); |
| 18343 |
} |
| 18344 |
}, { |
| 18345 |
key: "insertBefore", |
| 18346 |
value: function insertBefore(blot, ref) { |
| 18347 |
if (blot.statics.scope === _parchment2.default.Scope.INLINE_BLOT) { |
| 18348 |
var wrapper = _parchment2.default.create(this.statics.defaultChild); |
| 18349 |
wrapper.appendChild(blot); |
| 18350 |
blot = wrapper; |
| 18351 |
} |
| 18352 |
_get(Scroll2.prototype.__proto__ || Object.getPrototypeOf(Scroll2.prototype), "insertBefore", this).call(this, blot, ref); |
| 18353 |
} |
| 18354 |
}, { |
| 18355 |
key: "leaf", |
| 18356 |
value: function leaf(index) { |
| 18357 |
return this.path(index).pop() || [null, -1]; |
| 18358 |
} |
| 18359 |
}, { |
| 18360 |
key: "line", |
| 18361 |
value: function line(index) { |
| 18362 |
if (index === this.length()) { |
| 18363 |
return this.line(index - 1); |
| 18364 |
} |
| 18365 |
return this.descendant(isLine, index); |
| 18366 |
} |
| 18367 |
}, { |
| 18368 |
key: "lines", |
| 18369 |
value: function lines() { |
| 18370 |
var index = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0; |
| 18371 |
var length = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Number.MAX_VALUE; |
| 18372 |
var getLines = function getLines2(blot, index2, length2) { |
| 18373 |
var lines2 = [], lengthLeft = length2; |
| 18374 |
blot.children.forEachAt(index2, length2, function(child, index3, length3) { |
| 18375 |
if (isLine(child)) { |
| 18376 |
lines2.push(child); |
| 18377 |
} else if (child instanceof _parchment2.default.Container) { |
| 18378 |
lines2 = lines2.concat(getLines2(child, index3, lengthLeft)); |
| 18379 |
} |
| 18380 |
lengthLeft -= length3; |
| 18381 |
}); |
| 18382 |
return lines2; |
| 18383 |
}; |
| 18384 |
return getLines(this, index, length); |
| 18385 |
} |
| 18386 |
}, { |
| 18387 |
key: "optimize", |
| 18388 |
value: function optimize() { |
| 18389 |
var mutations = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []; |
| 18390 |
var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; |
| 18391 |
if (this.batch === true) return; |
| 18392 |
_get(Scroll2.prototype.__proto__ || Object.getPrototypeOf(Scroll2.prototype), "optimize", this).call(this, mutations, context); |
| 18393 |
if (mutations.length > 0) { |
| 18394 |
this.emitter.emit(_emitter2.default.events.SCROLL_OPTIMIZE, mutations, context); |
| 18395 |
} |
| 18396 |
} |
| 18397 |
}, { |
| 18398 |
key: "path", |
| 18399 |
value: function path(index) { |
| 18400 |
return _get(Scroll2.prototype.__proto__ || Object.getPrototypeOf(Scroll2.prototype), "path", this).call(this, index).slice(1); |
| 18401 |
} |
| 18402 |
}, { |
| 18403 |
key: "update", |
| 18404 |
value: function update(mutations) { |
| 18405 |
if (this.batch === true) return; |
| 18406 |
var source = _emitter2.default.sources.USER; |
| 18407 |
if (typeof mutations === "string") { |
| 18408 |
source = mutations; |
| 18409 |
} |
| 18410 |
if (!Array.isArray(mutations)) { |
| 18411 |
mutations = this.observer.takeRecords(); |
| 18412 |
} |
| 18413 |
if (mutations.length > 0) { |
| 18414 |
this.emitter.emit(_emitter2.default.events.SCROLL_BEFORE_UPDATE, source, mutations); |
| 18415 |
} |
| 18416 |
_get(Scroll2.prototype.__proto__ || Object.getPrototypeOf(Scroll2.prototype), "update", this).call(this, mutations.concat([])); |
| 18417 |
if (mutations.length > 0) { |
| 18418 |
this.emitter.emit(_emitter2.default.events.SCROLL_UPDATE, source, mutations); |
| 18419 |
} |
| 18420 |
} |
| 18421 |
}]); |
| 18422 |
return Scroll2; |
| 18423 |
}(_parchment2.default.Scroll); |
| 18424 |
Scroll.blotName = "scroll"; |
| 18425 |
Scroll.className = "ql-editor"; |
| 18426 |
Scroll.tagName = "DIV"; |
| 18427 |
Scroll.defaultChild = "block"; |
| 18428 |
Scroll.allowedChildren = [_block2.default, _block.BlockEmbed, _container2.default]; |
| 18429 |
exports$12.default = Scroll; |
| 18430 |
}, |
| 18431 |
/* 23 */ |
| 18432 |
/***/ |
| 18433 |
function(module2, exports$12, __webpack_require__) { |
| 18434 |
Object.defineProperty(exports$12, "__esModule", { |
| 18435 |
value: true |
| 18436 |
}); |
| 18437 |
exports$12.SHORTKEY = exports$12.default = void 0; |
| 18438 |
var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { |
| 18439 |
return typeof obj; |
| 18440 |
} : function(obj) { |
| 18441 |
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; |
| 18442 |
}; |
| 18443 |
var _slicedToArray2 = /* @__PURE__ */ function() { |
| 18444 |
function sliceIterator(arr, i) { |
| 18445 |
var _arr = []; |
| 18446 |
var _n = true; |
| 18447 |
var _d2 = false; |
| 18448 |
var _e2 = void 0; |
| 18449 |
try { |
| 18450 |
for (var _i2 = arr[Symbol.iterator](), _s; !(_n = (_s = _i2.next()).done); _n = true) { |
| 18451 |
_arr.push(_s.value); |
| 18452 |
if (i && _arr.length === i) break; |
| 18453 |
} |
| 18454 |
} catch (err) { |
| 18455 |
_d2 = true; |
| 18456 |
_e2 = err; |
| 18457 |
} finally { |
| 18458 |
try { |
| 18459 |
if (!_n && _i2["return"]) _i2["return"](); |
| 18460 |
} finally { |
| 18461 |
if (_d2) throw _e2; |
| 18462 |
} |
| 18463 |
} |
| 18464 |
return _arr; |
| 18465 |
} |
| 18466 |
return function(arr, i) { |
| 18467 |
if (Array.isArray(arr)) { |
| 18468 |
return arr; |
| 18469 |
} else if (Symbol.iterator in Object(arr)) { |
| 18470 |
return sliceIterator(arr, i); |
| 18471 |
} else { |
| 18472 |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); |
| 18473 |
} |
| 18474 |
}; |
| 18475 |
}(); |
| 18476 |
var _createClass2 = /* @__PURE__ */ function() { |
| 18477 |
function defineProperties(target, props) { |
| 18478 |
for (var i = 0; i < props.length; i++) { |
| 18479 |
var descriptor = props[i]; |
| 18480 |
descriptor.enumerable = descriptor.enumerable || false; |
| 18481 |
descriptor.configurable = true; |
| 18482 |
if ("value" in descriptor) descriptor.writable = true; |
| 18483 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 18484 |
} |
| 18485 |
} |
| 18486 |
return function(Constructor, protoProps, staticProps) { |
| 18487 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 18488 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 18489 |
return Constructor; |
| 18490 |
}; |
| 18491 |
}(); |
| 18492 |
var _clone = __webpack_require__(21); |
| 18493 |
var _clone2 = _interopRequireDefault(_clone); |
| 18494 |
var _deepEqual = __webpack_require__(11); |
| 18495 |
var _deepEqual2 = _interopRequireDefault(_deepEqual); |
| 18496 |
var _extend = __webpack_require__(3); |
| 18497 |
var _extend2 = _interopRequireDefault(_extend); |
| 18498 |
var _quillDelta = __webpack_require__(2); |
| 18499 |
var _quillDelta2 = _interopRequireDefault(_quillDelta); |
| 18500 |
var _op = __webpack_require__(20); |
| 18501 |
var _op2 = _interopRequireDefault(_op); |
| 18502 |
var _parchment = __webpack_require__(0); |
| 18503 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 18504 |
var _quill = __webpack_require__(5); |
| 18505 |
var _quill2 = _interopRequireDefault(_quill); |
| 18506 |
var _logger = __webpack_require__(10); |
| 18507 |
var _logger2 = _interopRequireDefault(_logger); |
| 18508 |
var _module = __webpack_require__(9); |
| 18509 |
var _module2 = _interopRequireDefault(_module); |
| 18510 |
function _interopRequireDefault(obj) { |
| 18511 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 18512 |
} |
| 18513 |
function _defineProperty2(obj, key, value) { |
| 18514 |
if (key in obj) { |
| 18515 |
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); |
| 18516 |
} else { |
| 18517 |
obj[key] = value; |
| 18518 |
} |
| 18519 |
return obj; |
| 18520 |
} |
| 18521 |
function _classCallCheck2(instance, Constructor) { |
| 18522 |
if (!(instance instanceof Constructor)) { |
| 18523 |
throw new TypeError("Cannot call a class as a function"); |
| 18524 |
} |
| 18525 |
} |
| 18526 |
function _possibleConstructorReturn2(self2, call) { |
| 18527 |
if (!self2) { |
| 18528 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 18529 |
} |
| 18530 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 18531 |
} |
| 18532 |
function _inherits2(subClass, superClass) { |
| 18533 |
if (typeof superClass !== "function" && superClass !== null) { |
| 18534 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 18535 |
} |
| 18536 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 18537 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 18538 |
} |
| 18539 |
var debug = (0, _logger2.default)("quill:keyboard"); |
| 18540 |
var SHORTKEY = /Mac/i.test(navigator.platform) ? "metaKey" : "ctrlKey"; |
| 18541 |
var Keyboard = function(_Module) { |
| 18542 |
_inherits2(Keyboard2, _Module); |
| 18543 |
_createClass2(Keyboard2, null, [{ |
| 18544 |
key: "match", |
| 18545 |
value: function match(evt, binding) { |
| 18546 |
binding = normalize(binding); |
| 18547 |
if (["altKey", "ctrlKey", "metaKey", "shiftKey"].some(function(key) { |
| 18548 |
return !!binding[key] !== evt[key] && binding[key] !== null; |
| 18549 |
})) { |
| 18550 |
return false; |
| 18551 |
} |
| 18552 |
return binding.key === (evt.which || evt.keyCode); |
| 18553 |
} |
| 18554 |
}]); |
| 18555 |
function Keyboard2(quill2, options) { |
| 18556 |
_classCallCheck2(this, Keyboard2); |
| 18557 |
var _this = _possibleConstructorReturn2(this, (Keyboard2.__proto__ || Object.getPrototypeOf(Keyboard2)).call(this, quill2, options)); |
| 18558 |
_this.bindings = {}; |
| 18559 |
Object.keys(_this.options.bindings).forEach(function(name) { |
| 18560 |
if (name === "list autofill" && quill2.scroll.whitelist != null && !quill2.scroll.whitelist["list"]) { |
| 18561 |
return; |
| 18562 |
} |
| 18563 |
if (_this.options.bindings[name]) { |
| 18564 |
_this.addBinding(_this.options.bindings[name]); |
| 18565 |
} |
| 18566 |
}); |
| 18567 |
_this.addBinding({ key: Keyboard2.keys.ENTER, shiftKey: null }, handleEnter); |
| 18568 |
_this.addBinding({ key: Keyboard2.keys.ENTER, metaKey: null, ctrlKey: null, altKey: null }, function() { |
| 18569 |
}); |
| 18570 |
if (/Firefox/i.test(navigator.userAgent)) { |
| 18571 |
_this.addBinding({ key: Keyboard2.keys.BACKSPACE }, { collapsed: true }, handleBackspace); |
| 18572 |
_this.addBinding({ key: Keyboard2.keys.DELETE }, { collapsed: true }, handleDelete); |
| 18573 |
} else { |
| 18574 |
_this.addBinding({ key: Keyboard2.keys.BACKSPACE }, { collapsed: true, prefix: /^.?$/ }, handleBackspace); |
| 18575 |
_this.addBinding({ key: Keyboard2.keys.DELETE }, { collapsed: true, suffix: /^.?$/ }, handleDelete); |
| 18576 |
} |
| 18577 |
_this.addBinding({ key: Keyboard2.keys.BACKSPACE }, { collapsed: false }, handleDeleteRange); |
| 18578 |
_this.addBinding({ key: Keyboard2.keys.DELETE }, { collapsed: false }, handleDeleteRange); |
| 18579 |
_this.addBinding({ key: Keyboard2.keys.BACKSPACE, altKey: null, ctrlKey: null, metaKey: null, shiftKey: null }, { collapsed: true, offset: 0 }, handleBackspace); |
| 18580 |
_this.listen(); |
| 18581 |
return _this; |
| 18582 |
} |
| 18583 |
_createClass2(Keyboard2, [{ |
| 18584 |
key: "addBinding", |
| 18585 |
value: function addBinding(key) { |
| 18586 |
var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; |
| 18587 |
var handler = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; |
| 18588 |
var binding = normalize(key); |
| 18589 |
if (binding == null || binding.key == null) { |
| 18590 |
return debug.warn("Attempted to add invalid keyboard binding", binding); |
| 18591 |
} |
| 18592 |
if (typeof context === "function") { |
| 18593 |
context = { handler: context }; |
| 18594 |
} |
| 18595 |
if (typeof handler === "function") { |
| 18596 |
handler = { handler }; |
| 18597 |
} |
| 18598 |
binding = (0, _extend2.default)(binding, context, handler); |
| 18599 |
this.bindings[binding.key] = this.bindings[binding.key] || []; |
| 18600 |
this.bindings[binding.key].push(binding); |
| 18601 |
} |
| 18602 |
}, { |
| 18603 |
key: "listen", |
| 18604 |
value: function listen() { |
| 18605 |
var _this2 = this; |
| 18606 |
this.quill.root.addEventListener("keydown", function(evt) { |
| 18607 |
if (evt.defaultPrevented) return; |
| 18608 |
var which = evt.which || evt.keyCode; |
| 18609 |
var bindings = (_this2.bindings[which] || []).filter(function(binding) { |
| 18610 |
return Keyboard2.match(evt, binding); |
| 18611 |
}); |
| 18612 |
if (bindings.length === 0) return; |
| 18613 |
var range = _this2.quill.getSelection(); |
| 18614 |
if (range == null || !_this2.quill.hasFocus()) return; |
| 18615 |
var _quill$getLine = _this2.quill.getLine(range.index), _quill$getLine2 = _slicedToArray2(_quill$getLine, 2), line = _quill$getLine2[0], offset = _quill$getLine2[1]; |
| 18616 |
var _quill$getLeaf = _this2.quill.getLeaf(range.index), _quill$getLeaf2 = _slicedToArray2(_quill$getLeaf, 2), leafStart = _quill$getLeaf2[0], offsetStart = _quill$getLeaf2[1]; |
| 18617 |
var _ref = range.length === 0 ? [leafStart, offsetStart] : _this2.quill.getLeaf(range.index + range.length), _ref2 = _slicedToArray2(_ref, 2), leafEnd = _ref2[0], offsetEnd = _ref2[1]; |
| 18618 |
var prefixText = leafStart instanceof _parchment2.default.Text ? leafStart.value().slice(0, offsetStart) : ""; |
| 18619 |
var suffixText = leafEnd instanceof _parchment2.default.Text ? leafEnd.value().slice(offsetEnd) : ""; |
| 18620 |
var curContext = { |
| 18621 |
collapsed: range.length === 0, |
| 18622 |
empty: range.length === 0 && line.length() <= 1, |
| 18623 |
format: _this2.quill.getFormat(range), |
| 18624 |
offset, |
| 18625 |
prefix: prefixText, |
| 18626 |
suffix: suffixText |
| 18627 |
}; |
| 18628 |
var prevented = bindings.some(function(binding) { |
| 18629 |
if (binding.collapsed != null && binding.collapsed !== curContext.collapsed) return false; |
| 18630 |
if (binding.empty != null && binding.empty !== curContext.empty) return false; |
| 18631 |
if (binding.offset != null && binding.offset !== curContext.offset) return false; |
| 18632 |
if (Array.isArray(binding.format)) { |
| 18633 |
if (binding.format.every(function(name) { |
| 18634 |
return curContext.format[name] == null; |
| 18635 |
})) { |
| 18636 |
return false; |
| 18637 |
} |
| 18638 |
} else if (_typeof2(binding.format) === "object") { |
| 18639 |
if (!Object.keys(binding.format).every(function(name) { |
| 18640 |
if (binding.format[name] === true) return curContext.format[name] != null; |
| 18641 |
if (binding.format[name] === false) return curContext.format[name] == null; |
| 18642 |
return (0, _deepEqual2.default)(binding.format[name], curContext.format[name]); |
| 18643 |
})) { |
| 18644 |
return false; |
| 18645 |
} |
| 18646 |
} |
| 18647 |
if (binding.prefix != null && !binding.prefix.test(curContext.prefix)) return false; |
| 18648 |
if (binding.suffix != null && !binding.suffix.test(curContext.suffix)) return false; |
| 18649 |
return binding.handler.call(_this2, range, curContext) !== true; |
| 18650 |
}); |
| 18651 |
if (prevented) { |
| 18652 |
evt.preventDefault(); |
| 18653 |
} |
| 18654 |
}); |
| 18655 |
} |
| 18656 |
}]); |
| 18657 |
return Keyboard2; |
| 18658 |
}(_module2.default); |
| 18659 |
Keyboard.keys = { |
| 18660 |
BACKSPACE: 8, |
| 18661 |
TAB: 9, |
| 18662 |
ENTER: 13, |
| 18663 |
ESCAPE: 27, |
| 18664 |
LEFT: 37, |
| 18665 |
UP: 38, |
| 18666 |
RIGHT: 39, |
| 18667 |
DOWN: 40, |
| 18668 |
DELETE: 46 |
| 18669 |
}; |
| 18670 |
Keyboard.DEFAULTS = { |
| 18671 |
bindings: { |
| 18672 |
"bold": makeFormatHandler("bold"), |
| 18673 |
"italic": makeFormatHandler("italic"), |
| 18674 |
"underline": makeFormatHandler("underline"), |
| 18675 |
"indent": { |
| 18676 |
// highlight tab or tab at beginning of list, indent or blockquote |
| 18677 |
key: Keyboard.keys.TAB, |
| 18678 |
format: ["blockquote", "indent", "list"], |
| 18679 |
handler: function handler(range, context) { |
| 18680 |
if (context.collapsed && context.offset !== 0) return true; |
| 18681 |
this.quill.format("indent", "+1", _quill2.default.sources.USER); |
| 18682 |
} |
| 18683 |
}, |
| 18684 |
"outdent": { |
| 18685 |
key: Keyboard.keys.TAB, |
| 18686 |
shiftKey: true, |
| 18687 |
format: ["blockquote", "indent", "list"], |
| 18688 |
// highlight tab or tab at beginning of list, indent or blockquote |
| 18689 |
handler: function handler(range, context) { |
| 18690 |
if (context.collapsed && context.offset !== 0) return true; |
| 18691 |
this.quill.format("indent", "-1", _quill2.default.sources.USER); |
| 18692 |
} |
| 18693 |
}, |
| 18694 |
"outdent backspace": { |
| 18695 |
key: Keyboard.keys.BACKSPACE, |
| 18696 |
collapsed: true, |
| 18697 |
shiftKey: null, |
| 18698 |
metaKey: null, |
| 18699 |
ctrlKey: null, |
| 18700 |
altKey: null, |
| 18701 |
format: ["indent", "list"], |
| 18702 |
offset: 0, |
| 18703 |
handler: function handler(range, context) { |
| 18704 |
if (context.format.indent != null) { |
| 18705 |
this.quill.format("indent", "-1", _quill2.default.sources.USER); |
| 18706 |
} else if (context.format.list != null) { |
| 18707 |
this.quill.format("list", false, _quill2.default.sources.USER); |
| 18708 |
} |
| 18709 |
} |
| 18710 |
}, |
| 18711 |
"indent code-block": makeCodeBlockHandler(true), |
| 18712 |
"outdent code-block": makeCodeBlockHandler(false), |
| 18713 |
"remove tab": { |
| 18714 |
key: Keyboard.keys.TAB, |
| 18715 |
shiftKey: true, |
| 18716 |
collapsed: true, |
| 18717 |
prefix: /\t$/, |
| 18718 |
handler: function handler(range) { |
| 18719 |
this.quill.deleteText(range.index - 1, 1, _quill2.default.sources.USER); |
| 18720 |
} |
| 18721 |
}, |
| 18722 |
"tab": { |
| 18723 |
key: Keyboard.keys.TAB, |
| 18724 |
handler: function handler(range) { |
| 18725 |
this.quill.history.cutoff(); |
| 18726 |
var delta = new _quillDelta2.default().retain(range.index).delete(range.length).insert(" "); |
| 18727 |
this.quill.updateContents(delta, _quill2.default.sources.USER); |
| 18728 |
this.quill.history.cutoff(); |
| 18729 |
this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT); |
| 18730 |
} |
| 18731 |
}, |
| 18732 |
"list empty enter": { |
| 18733 |
key: Keyboard.keys.ENTER, |
| 18734 |
collapsed: true, |
| 18735 |
format: ["list"], |
| 18736 |
empty: true, |
| 18737 |
handler: function handler(range, context) { |
| 18738 |
this.quill.format("list", false, _quill2.default.sources.USER); |
| 18739 |
if (context.format.indent) { |
| 18740 |
this.quill.format("indent", false, _quill2.default.sources.USER); |
| 18741 |
} |
| 18742 |
} |
| 18743 |
}, |
| 18744 |
"checklist enter": { |
| 18745 |
key: Keyboard.keys.ENTER, |
| 18746 |
collapsed: true, |
| 18747 |
format: { list: "checked" }, |
| 18748 |
handler: function handler(range) { |
| 18749 |
var _quill$getLine3 = this.quill.getLine(range.index), _quill$getLine4 = _slicedToArray2(_quill$getLine3, 2), line = _quill$getLine4[0], offset = _quill$getLine4[1]; |
| 18750 |
var formats = (0, _extend2.default)({}, line.formats(), { list: "checked" }); |
| 18751 |
var delta = new _quillDelta2.default().retain(range.index).insert("\n", formats).retain(line.length() - offset - 1).retain(1, { list: "unchecked" }); |
| 18752 |
this.quill.updateContents(delta, _quill2.default.sources.USER); |
| 18753 |
this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT); |
| 18754 |
this.quill.scrollIntoView(); |
| 18755 |
} |
| 18756 |
}, |
| 18757 |
"header enter": { |
| 18758 |
key: Keyboard.keys.ENTER, |
| 18759 |
collapsed: true, |
| 18760 |
format: ["header"], |
| 18761 |
suffix: /^$/, |
| 18762 |
handler: function handler(range, context) { |
| 18763 |
var _quill$getLine5 = this.quill.getLine(range.index), _quill$getLine6 = _slicedToArray2(_quill$getLine5, 2), line = _quill$getLine6[0], offset = _quill$getLine6[1]; |
| 18764 |
var delta = new _quillDelta2.default().retain(range.index).insert("\n", context.format).retain(line.length() - offset - 1).retain(1, { header: null }); |
| 18765 |
this.quill.updateContents(delta, _quill2.default.sources.USER); |
| 18766 |
this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT); |
| 18767 |
this.quill.scrollIntoView(); |
| 18768 |
} |
| 18769 |
}, |
| 18770 |
"list autofill": { |
| 18771 |
key: " ", |
| 18772 |
collapsed: true, |
| 18773 |
format: { list: false }, |
| 18774 |
prefix: /^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/, |
| 18775 |
handler: function handler(range, context) { |
| 18776 |
var length = context.prefix.length; |
| 18777 |
var _quill$getLine7 = this.quill.getLine(range.index), _quill$getLine8 = _slicedToArray2(_quill$getLine7, 2), line = _quill$getLine8[0], offset = _quill$getLine8[1]; |
| 18778 |
if (offset > length) return true; |
| 18779 |
var value = void 0; |
| 18780 |
switch (context.prefix.trim()) { |
| 18781 |
case "[]": |
| 18782 |
case "[ ]": |
| 18783 |
value = "unchecked"; |
| 18784 |
break; |
| 18785 |
case "[x]": |
| 18786 |
value = "checked"; |
| 18787 |
break; |
| 18788 |
case "-": |
| 18789 |
case "*": |
| 18790 |
value = "bullet"; |
| 18791 |
break; |
| 18792 |
default: |
| 18793 |
value = "ordered"; |
| 18794 |
} |
| 18795 |
this.quill.insertText(range.index, " ", _quill2.default.sources.USER); |
| 18796 |
this.quill.history.cutoff(); |
| 18797 |
var delta = new _quillDelta2.default().retain(range.index - offset).delete(length + 1).retain(line.length() - 2 - offset).retain(1, { list: value }); |
| 18798 |
this.quill.updateContents(delta, _quill2.default.sources.USER); |
| 18799 |
this.quill.history.cutoff(); |
| 18800 |
this.quill.setSelection(range.index - length, _quill2.default.sources.SILENT); |
| 18801 |
} |
| 18802 |
}, |
| 18803 |
"code exit": { |
| 18804 |
key: Keyboard.keys.ENTER, |
| 18805 |
collapsed: true, |
| 18806 |
format: ["code-block"], |
| 18807 |
prefix: /\n\n$/, |
| 18808 |
suffix: /^\s+$/, |
| 18809 |
handler: function handler(range) { |
| 18810 |
var _quill$getLine9 = this.quill.getLine(range.index), _quill$getLine10 = _slicedToArray2(_quill$getLine9, 2), line = _quill$getLine10[0], offset = _quill$getLine10[1]; |
| 18811 |
var delta = new _quillDelta2.default().retain(range.index + line.length() - offset - 2).retain(1, { "code-block": null }).delete(1); |
| 18812 |
this.quill.updateContents(delta, _quill2.default.sources.USER); |
| 18813 |
} |
| 18814 |
}, |
| 18815 |
"embed left": makeEmbedArrowHandler(Keyboard.keys.LEFT, false), |
| 18816 |
"embed left shift": makeEmbedArrowHandler(Keyboard.keys.LEFT, true), |
| 18817 |
"embed right": makeEmbedArrowHandler(Keyboard.keys.RIGHT, false), |
| 18818 |
"embed right shift": makeEmbedArrowHandler(Keyboard.keys.RIGHT, true) |
| 18819 |
} |
| 18820 |
}; |
| 18821 |
function makeEmbedArrowHandler(key, shiftKey) { |
| 18822 |
var _ref3; |
| 18823 |
var where = key === Keyboard.keys.LEFT ? "prefix" : "suffix"; |
| 18824 |
return _ref3 = { |
| 18825 |
key, |
| 18826 |
shiftKey, |
| 18827 |
altKey: null |
| 18828 |
}, _defineProperty2(_ref3, where, /^$/), _defineProperty2(_ref3, "handler", function handler(range) { |
| 18829 |
var index = range.index; |
| 18830 |
if (key === Keyboard.keys.RIGHT) { |
| 18831 |
index += range.length + 1; |
| 18832 |
} |
| 18833 |
var _quill$getLeaf3 = this.quill.getLeaf(index), _quill$getLeaf4 = _slicedToArray2(_quill$getLeaf3, 1), leaf = _quill$getLeaf4[0]; |
| 18834 |
if (!(leaf instanceof _parchment2.default.Embed)) return true; |
| 18835 |
if (key === Keyboard.keys.LEFT) { |
| 18836 |
if (shiftKey) { |
| 18837 |
this.quill.setSelection(range.index - 1, range.length + 1, _quill2.default.sources.USER); |
| 18838 |
} else { |
| 18839 |
this.quill.setSelection(range.index - 1, _quill2.default.sources.USER); |
| 18840 |
} |
| 18841 |
} else { |
| 18842 |
if (shiftKey) { |
| 18843 |
this.quill.setSelection(range.index, range.length + 1, _quill2.default.sources.USER); |
| 18844 |
} else { |
| 18845 |
this.quill.setSelection(range.index + range.length + 1, _quill2.default.sources.USER); |
| 18846 |
} |
| 18847 |
} |
| 18848 |
return false; |
| 18849 |
}), _ref3; |
| 18850 |
} |
| 18851 |
function handleBackspace(range, context) { |
| 18852 |
if (range.index === 0 || this.quill.getLength() <= 1) return; |
| 18853 |
var _quill$getLine11 = this.quill.getLine(range.index), _quill$getLine12 = _slicedToArray2(_quill$getLine11, 1), line = _quill$getLine12[0]; |
| 18854 |
var formats = {}; |
| 18855 |
if (context.offset === 0) { |
| 18856 |
var _quill$getLine13 = this.quill.getLine(range.index - 1), _quill$getLine14 = _slicedToArray2(_quill$getLine13, 1), prev = _quill$getLine14[0]; |
| 18857 |
if (prev != null && prev.length() > 1) { |
| 18858 |
var curFormats = line.formats(); |
| 18859 |
var prevFormats = this.quill.getFormat(range.index - 1, 1); |
| 18860 |
formats = _op2.default.attributes.diff(curFormats, prevFormats) || {}; |
| 18861 |
} |
| 18862 |
} |
| 18863 |
var length = /[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(context.prefix) ? 2 : 1; |
| 18864 |
this.quill.deleteText(range.index - length, length, _quill2.default.sources.USER); |
| 18865 |
if (Object.keys(formats).length > 0) { |
| 18866 |
this.quill.formatLine(range.index - length, length, formats, _quill2.default.sources.USER); |
| 18867 |
} |
| 18868 |
this.quill.focus(); |
| 18869 |
} |
| 18870 |
function handleDelete(range, context) { |
| 18871 |
var length = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(context.suffix) ? 2 : 1; |
| 18872 |
if (range.index >= this.quill.getLength() - length) return; |
| 18873 |
var formats = {}, nextLength = 0; |
| 18874 |
var _quill$getLine15 = this.quill.getLine(range.index), _quill$getLine16 = _slicedToArray2(_quill$getLine15, 1), line = _quill$getLine16[0]; |
| 18875 |
if (context.offset >= line.length() - 1) { |
| 18876 |
var _quill$getLine17 = this.quill.getLine(range.index + 1), _quill$getLine18 = _slicedToArray2(_quill$getLine17, 1), next = _quill$getLine18[0]; |
| 18877 |
if (next) { |
| 18878 |
var curFormats = line.formats(); |
| 18879 |
var nextFormats = this.quill.getFormat(range.index, 1); |
| 18880 |
formats = _op2.default.attributes.diff(curFormats, nextFormats) || {}; |
| 18881 |
nextLength = next.length(); |
| 18882 |
} |
| 18883 |
} |
| 18884 |
this.quill.deleteText(range.index, length, _quill2.default.sources.USER); |
| 18885 |
if (Object.keys(formats).length > 0) { |
| 18886 |
this.quill.formatLine(range.index + nextLength - 1, length, formats, _quill2.default.sources.USER); |
| 18887 |
} |
| 18888 |
} |
| 18889 |
function handleDeleteRange(range) { |
| 18890 |
var lines = this.quill.getLines(range); |
| 18891 |
var formats = {}; |
| 18892 |
if (lines.length > 1) { |
| 18893 |
var firstFormats = lines[0].formats(); |
| 18894 |
var lastFormats = lines[lines.length - 1].formats(); |
| 18895 |
formats = _op2.default.attributes.diff(lastFormats, firstFormats) || {}; |
| 18896 |
} |
| 18897 |
this.quill.deleteText(range, _quill2.default.sources.USER); |
| 18898 |
if (Object.keys(formats).length > 0) { |
| 18899 |
this.quill.formatLine(range.index, 1, formats, _quill2.default.sources.USER); |
| 18900 |
} |
| 18901 |
this.quill.setSelection(range.index, _quill2.default.sources.SILENT); |
| 18902 |
this.quill.focus(); |
| 18903 |
} |
| 18904 |
function handleEnter(range, context) { |
| 18905 |
var _this3 = this; |
| 18906 |
if (range.length > 0) { |
| 18907 |
this.quill.scroll.deleteAt(range.index, range.length); |
| 18908 |
} |
| 18909 |
var lineFormats = Object.keys(context.format).reduce(function(lineFormats2, format) { |
| 18910 |
if (_parchment2.default.query(format, _parchment2.default.Scope.BLOCK) && !Array.isArray(context.format[format])) { |
| 18911 |
lineFormats2[format] = context.format[format]; |
| 18912 |
} |
| 18913 |
return lineFormats2; |
| 18914 |
}, {}); |
| 18915 |
this.quill.insertText(range.index, "\n", lineFormats, _quill2.default.sources.USER); |
| 18916 |
this.quill.setSelection(range.index + 1, _quill2.default.sources.SILENT); |
| 18917 |
this.quill.focus(); |
| 18918 |
Object.keys(context.format).forEach(function(name) { |
| 18919 |
if (lineFormats[name] != null) return; |
| 18920 |
if (Array.isArray(context.format[name])) return; |
| 18921 |
if (name === "link") return; |
| 18922 |
_this3.quill.format(name, context.format[name], _quill2.default.sources.USER); |
| 18923 |
}); |
| 18924 |
} |
| 18925 |
function makeCodeBlockHandler(indent) { |
| 18926 |
return { |
| 18927 |
key: Keyboard.keys.TAB, |
| 18928 |
shiftKey: !indent, |
| 18929 |
format: { "code-block": true }, |
| 18930 |
handler: function handler(range) { |
| 18931 |
var CodeBlock = _parchment2.default.query("code-block"); |
| 18932 |
var index = range.index, length = range.length; |
| 18933 |
var _quill$scroll$descend = this.quill.scroll.descendant(CodeBlock, index), _quill$scroll$descend2 = _slicedToArray2(_quill$scroll$descend, 2), block = _quill$scroll$descend2[0], offset = _quill$scroll$descend2[1]; |
| 18934 |
if (block == null) return; |
| 18935 |
var scrollIndex = this.quill.getIndex(block); |
| 18936 |
var start = block.newlineIndex(offset, true) + 1; |
| 18937 |
var end = block.newlineIndex(scrollIndex + offset + length); |
| 18938 |
var lines = block.domNode.textContent.slice(start, end).split("\n"); |
| 18939 |
offset = 0; |
| 18940 |
lines.forEach(function(line, i) { |
| 18941 |
if (indent) { |
| 18942 |
block.insertAt(start + offset, CodeBlock.TAB); |
| 18943 |
offset += CodeBlock.TAB.length; |
| 18944 |
if (i === 0) { |
| 18945 |
index += CodeBlock.TAB.length; |
| 18946 |
} else { |
| 18947 |
length += CodeBlock.TAB.length; |
| 18948 |
} |
| 18949 |
} else if (line.startsWith(CodeBlock.TAB)) { |
| 18950 |
block.deleteAt(start + offset, CodeBlock.TAB.length); |
| 18951 |
offset -= CodeBlock.TAB.length; |
| 18952 |
if (i === 0) { |
| 18953 |
index -= CodeBlock.TAB.length; |
| 18954 |
} else { |
| 18955 |
length -= CodeBlock.TAB.length; |
| 18956 |
} |
| 18957 |
} |
| 18958 |
offset += line.length + 1; |
| 18959 |
}); |
| 18960 |
this.quill.update(_quill2.default.sources.USER); |
| 18961 |
this.quill.setSelection(index, length, _quill2.default.sources.SILENT); |
| 18962 |
} |
| 18963 |
}; |
| 18964 |
} |
| 18965 |
function makeFormatHandler(format) { |
| 18966 |
return { |
| 18967 |
key: format[0].toUpperCase(), |
| 18968 |
shortKey: true, |
| 18969 |
handler: function handler(range, context) { |
| 18970 |
this.quill.format(format, !context.format[format], _quill2.default.sources.USER); |
| 18971 |
} |
| 18972 |
}; |
| 18973 |
} |
| 18974 |
function normalize(binding) { |
| 18975 |
if (typeof binding === "string" || typeof binding === "number") { |
| 18976 |
return normalize({ key: binding }); |
| 18977 |
} |
| 18978 |
if ((typeof binding === "undefined" ? "undefined" : _typeof2(binding)) === "object") { |
| 18979 |
binding = (0, _clone2.default)(binding, false); |
| 18980 |
} |
| 18981 |
if (typeof binding.key === "string") { |
| 18982 |
if (Keyboard.keys[binding.key.toUpperCase()] != null) { |
| 18983 |
binding.key = Keyboard.keys[binding.key.toUpperCase()]; |
| 18984 |
} else if (binding.key.length === 1) { |
| 18985 |
binding.key = binding.key.toUpperCase().charCodeAt(0); |
| 18986 |
} else { |
| 18987 |
return null; |
| 18988 |
} |
| 18989 |
} |
| 18990 |
if (binding.shortKey) { |
| 18991 |
binding[SHORTKEY] = binding.shortKey; |
| 18992 |
delete binding.shortKey; |
| 18993 |
} |
| 18994 |
return binding; |
| 18995 |
} |
| 18996 |
exports$12.default = Keyboard; |
| 18997 |
exports$12.SHORTKEY = SHORTKEY; |
| 18998 |
}, |
| 18999 |
/* 24 */ |
| 19000 |
/***/ |
| 19001 |
function(module2, exports$12, __webpack_require__) { |
| 19002 |
Object.defineProperty(exports$12, "__esModule", { |
| 19003 |
value: true |
| 19004 |
}); |
| 19005 |
var _slicedToArray2 = /* @__PURE__ */ function() { |
| 19006 |
function sliceIterator(arr, i) { |
| 19007 |
var _arr = []; |
| 19008 |
var _n = true; |
| 19009 |
var _d2 = false; |
| 19010 |
var _e2 = void 0; |
| 19011 |
try { |
| 19012 |
for (var _i2 = arr[Symbol.iterator](), _s; !(_n = (_s = _i2.next()).done); _n = true) { |
| 19013 |
_arr.push(_s.value); |
| 19014 |
if (i && _arr.length === i) break; |
| 19015 |
} |
| 19016 |
} catch (err) { |
| 19017 |
_d2 = true; |
| 19018 |
_e2 = err; |
| 19019 |
} finally { |
| 19020 |
try { |
| 19021 |
if (!_n && _i2["return"]) _i2["return"](); |
| 19022 |
} finally { |
| 19023 |
if (_d2) throw _e2; |
| 19024 |
} |
| 19025 |
} |
| 19026 |
return _arr; |
| 19027 |
} |
| 19028 |
return function(arr, i) { |
| 19029 |
if (Array.isArray(arr)) { |
| 19030 |
return arr; |
| 19031 |
} else if (Symbol.iterator in Object(arr)) { |
| 19032 |
return sliceIterator(arr, i); |
| 19033 |
} else { |
| 19034 |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); |
| 19035 |
} |
| 19036 |
}; |
| 19037 |
}(); |
| 19038 |
var _get = function get(object, property, receiver) { |
| 19039 |
if (object === null) object = Function.prototype; |
| 19040 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 19041 |
if (desc === void 0) { |
| 19042 |
var parent = Object.getPrototypeOf(object); |
| 19043 |
if (parent === null) { |
| 19044 |
return void 0; |
| 19045 |
} else { |
| 19046 |
return get(parent, property, receiver); |
| 19047 |
} |
| 19048 |
} else if ("value" in desc) { |
| 19049 |
return desc.value; |
| 19050 |
} else { |
| 19051 |
var getter = desc.get; |
| 19052 |
if (getter === void 0) { |
| 19053 |
return void 0; |
| 19054 |
} |
| 19055 |
return getter.call(receiver); |
| 19056 |
} |
| 19057 |
}; |
| 19058 |
var _createClass2 = /* @__PURE__ */ function() { |
| 19059 |
function defineProperties(target, props) { |
| 19060 |
for (var i = 0; i < props.length; i++) { |
| 19061 |
var descriptor = props[i]; |
| 19062 |
descriptor.enumerable = descriptor.enumerable || false; |
| 19063 |
descriptor.configurable = true; |
| 19064 |
if ("value" in descriptor) descriptor.writable = true; |
| 19065 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 19066 |
} |
| 19067 |
} |
| 19068 |
return function(Constructor, protoProps, staticProps) { |
| 19069 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 19070 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 19071 |
return Constructor; |
| 19072 |
}; |
| 19073 |
}(); |
| 19074 |
var _parchment = __webpack_require__(0); |
| 19075 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 19076 |
var _text = __webpack_require__(7); |
| 19077 |
var _text2 = _interopRequireDefault(_text); |
| 19078 |
function _interopRequireDefault(obj) { |
| 19079 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 19080 |
} |
| 19081 |
function _classCallCheck2(instance, Constructor) { |
| 19082 |
if (!(instance instanceof Constructor)) { |
| 19083 |
throw new TypeError("Cannot call a class as a function"); |
| 19084 |
} |
| 19085 |
} |
| 19086 |
function _possibleConstructorReturn2(self2, call) { |
| 19087 |
if (!self2) { |
| 19088 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 19089 |
} |
| 19090 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 19091 |
} |
| 19092 |
function _inherits2(subClass, superClass) { |
| 19093 |
if (typeof superClass !== "function" && superClass !== null) { |
| 19094 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 19095 |
} |
| 19096 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 19097 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 19098 |
} |
| 19099 |
var Cursor = function(_Parchment$Embed) { |
| 19100 |
_inherits2(Cursor2, _Parchment$Embed); |
| 19101 |
_createClass2(Cursor2, null, [{ |
| 19102 |
key: "value", |
| 19103 |
value: function value() { |
| 19104 |
return void 0; |
| 19105 |
} |
| 19106 |
}]); |
| 19107 |
function Cursor2(domNode, selection) { |
| 19108 |
_classCallCheck2(this, Cursor2); |
| 19109 |
var _this = _possibleConstructorReturn2(this, (Cursor2.__proto__ || Object.getPrototypeOf(Cursor2)).call(this, domNode)); |
| 19110 |
_this.selection = selection; |
| 19111 |
_this.textNode = document.createTextNode(Cursor2.CONTENTS); |
| 19112 |
_this.domNode.appendChild(_this.textNode); |
| 19113 |
_this._length = 0; |
| 19114 |
return _this; |
| 19115 |
} |
| 19116 |
_createClass2(Cursor2, [{ |
| 19117 |
key: "detach", |
| 19118 |
value: function detach() { |
| 19119 |
if (this.parent != null) this.parent.removeChild(this); |
| 19120 |
} |
| 19121 |
}, { |
| 19122 |
key: "format", |
| 19123 |
value: function format(name, value) { |
| 19124 |
if (this._length !== 0) { |
| 19125 |
return _get(Cursor2.prototype.__proto__ || Object.getPrototypeOf(Cursor2.prototype), "format", this).call(this, name, value); |
| 19126 |
} |
| 19127 |
var target = this, index = 0; |
| 19128 |
while (target != null && target.statics.scope !== _parchment2.default.Scope.BLOCK_BLOT) { |
| 19129 |
index += target.offset(target.parent); |
| 19130 |
target = target.parent; |
| 19131 |
} |
| 19132 |
if (target != null) { |
| 19133 |
this._length = Cursor2.CONTENTS.length; |
| 19134 |
target.optimize(); |
| 19135 |
target.formatAt(index, Cursor2.CONTENTS.length, name, value); |
| 19136 |
this._length = 0; |
| 19137 |
} |
| 19138 |
} |
| 19139 |
}, { |
| 19140 |
key: "index", |
| 19141 |
value: function index(node, offset) { |
| 19142 |
if (node === this.textNode) return 0; |
| 19143 |
return _get(Cursor2.prototype.__proto__ || Object.getPrototypeOf(Cursor2.prototype), "index", this).call(this, node, offset); |
| 19144 |
} |
| 19145 |
}, { |
| 19146 |
key: "length", |
| 19147 |
value: function length() { |
| 19148 |
return this._length; |
| 19149 |
} |
| 19150 |
}, { |
| 19151 |
key: "position", |
| 19152 |
value: function position() { |
| 19153 |
return [this.textNode, this.textNode.data.length]; |
| 19154 |
} |
| 19155 |
}, { |
| 19156 |
key: "remove", |
| 19157 |
value: function remove() { |
| 19158 |
_get(Cursor2.prototype.__proto__ || Object.getPrototypeOf(Cursor2.prototype), "remove", this).call(this); |
| 19159 |
this.parent = null; |
| 19160 |
} |
| 19161 |
}, { |
| 19162 |
key: "restore", |
| 19163 |
value: function restore() { |
| 19164 |
if (this.selection.composing || this.parent == null) return; |
| 19165 |
var textNode = this.textNode; |
| 19166 |
var range = this.selection.getNativeRange(); |
| 19167 |
var restoreText = void 0, start = void 0, end = void 0; |
| 19168 |
if (range != null && range.start.node === textNode && range.end.node === textNode) { |
| 19169 |
var _ref = [textNode, range.start.offset, range.end.offset]; |
| 19170 |
restoreText = _ref[0]; |
| 19171 |
start = _ref[1]; |
| 19172 |
end = _ref[2]; |
| 19173 |
} |
| 19174 |
while (this.domNode.lastChild != null && this.domNode.lastChild !== this.textNode) { |
| 19175 |
this.domNode.parentNode.insertBefore(this.domNode.lastChild, this.domNode); |
| 19176 |
} |
| 19177 |
if (this.textNode.data !== Cursor2.CONTENTS) { |
| 19178 |
var text = this.textNode.data.split(Cursor2.CONTENTS).join(""); |
| 19179 |
if (this.next instanceof _text2.default) { |
| 19180 |
restoreText = this.next.domNode; |
| 19181 |
this.next.insertAt(0, text); |
| 19182 |
this.textNode.data = Cursor2.CONTENTS; |
| 19183 |
} else { |
| 19184 |
this.textNode.data = text; |
| 19185 |
this.parent.insertBefore(_parchment2.default.create(this.textNode), this); |
| 19186 |
this.textNode = document.createTextNode(Cursor2.CONTENTS); |
| 19187 |
this.domNode.appendChild(this.textNode); |
| 19188 |
} |
| 19189 |
} |
| 19190 |
this.remove(); |
| 19191 |
if (start != null) { |
| 19192 |
var _map = [start, end].map(function(offset) { |
| 19193 |
return Math.max(0, Math.min(restoreText.data.length, offset - 1)); |
| 19194 |
}); |
| 19195 |
var _map2 = _slicedToArray2(_map, 2); |
| 19196 |
start = _map2[0]; |
| 19197 |
end = _map2[1]; |
| 19198 |
return { |
| 19199 |
startNode: restoreText, |
| 19200 |
startOffset: start, |
| 19201 |
endNode: restoreText, |
| 19202 |
endOffset: end |
| 19203 |
}; |
| 19204 |
} |
| 19205 |
} |
| 19206 |
}, { |
| 19207 |
key: "update", |
| 19208 |
value: function update(mutations, context) { |
| 19209 |
var _this2 = this; |
| 19210 |
if (mutations.some(function(mutation) { |
| 19211 |
return mutation.type === "characterData" && mutation.target === _this2.textNode; |
| 19212 |
})) { |
| 19213 |
var range = this.restore(); |
| 19214 |
if (range) context.range = range; |
| 19215 |
} |
| 19216 |
} |
| 19217 |
}, { |
| 19218 |
key: "value", |
| 19219 |
value: function value() { |
| 19220 |
return ""; |
| 19221 |
} |
| 19222 |
}]); |
| 19223 |
return Cursor2; |
| 19224 |
}(_parchment2.default.Embed); |
| 19225 |
Cursor.blotName = "cursor"; |
| 19226 |
Cursor.className = "ql-cursor"; |
| 19227 |
Cursor.tagName = "span"; |
| 19228 |
Cursor.CONTENTS = "\uFEFF"; |
| 19229 |
exports$12.default = Cursor; |
| 19230 |
}, |
| 19231 |
/* 25 */ |
| 19232 |
/***/ |
| 19233 |
function(module2, exports$12, __webpack_require__) { |
| 19234 |
Object.defineProperty(exports$12, "__esModule", { |
| 19235 |
value: true |
| 19236 |
}); |
| 19237 |
var _parchment = __webpack_require__(0); |
| 19238 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 19239 |
var _block = __webpack_require__(4); |
| 19240 |
var _block2 = _interopRequireDefault(_block); |
| 19241 |
function _interopRequireDefault(obj) { |
| 19242 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 19243 |
} |
| 19244 |
function _classCallCheck2(instance, Constructor) { |
| 19245 |
if (!(instance instanceof Constructor)) { |
| 19246 |
throw new TypeError("Cannot call a class as a function"); |
| 19247 |
} |
| 19248 |
} |
| 19249 |
function _possibleConstructorReturn2(self2, call) { |
| 19250 |
if (!self2) { |
| 19251 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 19252 |
} |
| 19253 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 19254 |
} |
| 19255 |
function _inherits2(subClass, superClass) { |
| 19256 |
if (typeof superClass !== "function" && superClass !== null) { |
| 19257 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 19258 |
} |
| 19259 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 19260 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 19261 |
} |
| 19262 |
var Container = function(_Parchment$Container) { |
| 19263 |
_inherits2(Container2, _Parchment$Container); |
| 19264 |
function Container2() { |
| 19265 |
_classCallCheck2(this, Container2); |
| 19266 |
return _possibleConstructorReturn2(this, (Container2.__proto__ || Object.getPrototypeOf(Container2)).apply(this, arguments)); |
| 19267 |
} |
| 19268 |
return Container2; |
| 19269 |
}(_parchment2.default.Container); |
| 19270 |
Container.allowedChildren = [_block2.default, _block.BlockEmbed, Container]; |
| 19271 |
exports$12.default = Container; |
| 19272 |
}, |
| 19273 |
/* 26 */ |
| 19274 |
/***/ |
| 19275 |
function(module2, exports$12, __webpack_require__) { |
| 19276 |
Object.defineProperty(exports$12, "__esModule", { |
| 19277 |
value: true |
| 19278 |
}); |
| 19279 |
exports$12.ColorStyle = exports$12.ColorClass = exports$12.ColorAttributor = void 0; |
| 19280 |
var _createClass2 = /* @__PURE__ */ function() { |
| 19281 |
function defineProperties(target, props) { |
| 19282 |
for (var i = 0; i < props.length; i++) { |
| 19283 |
var descriptor = props[i]; |
| 19284 |
descriptor.enumerable = descriptor.enumerable || false; |
| 19285 |
descriptor.configurable = true; |
| 19286 |
if ("value" in descriptor) descriptor.writable = true; |
| 19287 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 19288 |
} |
| 19289 |
} |
| 19290 |
return function(Constructor, protoProps, staticProps) { |
| 19291 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 19292 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 19293 |
return Constructor; |
| 19294 |
}; |
| 19295 |
}(); |
| 19296 |
var _get = function get(object, property, receiver) { |
| 19297 |
if (object === null) object = Function.prototype; |
| 19298 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 19299 |
if (desc === void 0) { |
| 19300 |
var parent = Object.getPrototypeOf(object); |
| 19301 |
if (parent === null) { |
| 19302 |
return void 0; |
| 19303 |
} else { |
| 19304 |
return get(parent, property, receiver); |
| 19305 |
} |
| 19306 |
} else if ("value" in desc) { |
| 19307 |
return desc.value; |
| 19308 |
} else { |
| 19309 |
var getter = desc.get; |
| 19310 |
if (getter === void 0) { |
| 19311 |
return void 0; |
| 19312 |
} |
| 19313 |
return getter.call(receiver); |
| 19314 |
} |
| 19315 |
}; |
| 19316 |
var _parchment = __webpack_require__(0); |
| 19317 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 19318 |
function _interopRequireDefault(obj) { |
| 19319 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 19320 |
} |
| 19321 |
function _classCallCheck2(instance, Constructor) { |
| 19322 |
if (!(instance instanceof Constructor)) { |
| 19323 |
throw new TypeError("Cannot call a class as a function"); |
| 19324 |
} |
| 19325 |
} |
| 19326 |
function _possibleConstructorReturn2(self2, call) { |
| 19327 |
if (!self2) { |
| 19328 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 19329 |
} |
| 19330 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 19331 |
} |
| 19332 |
function _inherits2(subClass, superClass) { |
| 19333 |
if (typeof superClass !== "function" && superClass !== null) { |
| 19334 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 19335 |
} |
| 19336 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 19337 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 19338 |
} |
| 19339 |
var ColorAttributor = function(_Parchment$Attributor) { |
| 19340 |
_inherits2(ColorAttributor2, _Parchment$Attributor); |
| 19341 |
function ColorAttributor2() { |
| 19342 |
_classCallCheck2(this, ColorAttributor2); |
| 19343 |
return _possibleConstructorReturn2(this, (ColorAttributor2.__proto__ || Object.getPrototypeOf(ColorAttributor2)).apply(this, arguments)); |
| 19344 |
} |
| 19345 |
_createClass2(ColorAttributor2, [{ |
| 19346 |
key: "value", |
| 19347 |
value: function value(domNode) { |
| 19348 |
var value2 = _get(ColorAttributor2.prototype.__proto__ || Object.getPrototypeOf(ColorAttributor2.prototype), "value", this).call(this, domNode); |
| 19349 |
if (!value2.startsWith("rgb(")) return value2; |
| 19350 |
value2 = value2.replace(/^[^\d]+/, "").replace(/[^\d]+$/, ""); |
| 19351 |
return "#" + value2.split(",").map(function(component) { |
| 19352 |
return ("00" + parseInt(component).toString(16)).slice(-2); |
| 19353 |
}).join(""); |
| 19354 |
} |
| 19355 |
}]); |
| 19356 |
return ColorAttributor2; |
| 19357 |
}(_parchment2.default.Attributor.Style); |
| 19358 |
var ColorClass = new _parchment2.default.Attributor.Class("color", "ql-color", { |
| 19359 |
scope: _parchment2.default.Scope.INLINE |
| 19360 |
}); |
| 19361 |
var ColorStyle = new ColorAttributor("color", "color", { |
| 19362 |
scope: _parchment2.default.Scope.INLINE |
| 19363 |
}); |
| 19364 |
exports$12.ColorAttributor = ColorAttributor; |
| 19365 |
exports$12.ColorClass = ColorClass; |
| 19366 |
exports$12.ColorStyle = ColorStyle; |
| 19367 |
}, |
| 19368 |
/* 27 */ |
| 19369 |
/***/ |
| 19370 |
function(module2, exports$12, __webpack_require__) { |
| 19371 |
Object.defineProperty(exports$12, "__esModule", { |
| 19372 |
value: true |
| 19373 |
}); |
| 19374 |
exports$12.sanitize = exports$12.default = void 0; |
| 19375 |
var _createClass2 = /* @__PURE__ */ function() { |
| 19376 |
function defineProperties(target, props) { |
| 19377 |
for (var i = 0; i < props.length; i++) { |
| 19378 |
var descriptor = props[i]; |
| 19379 |
descriptor.enumerable = descriptor.enumerable || false; |
| 19380 |
descriptor.configurable = true; |
| 19381 |
if ("value" in descriptor) descriptor.writable = true; |
| 19382 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 19383 |
} |
| 19384 |
} |
| 19385 |
return function(Constructor, protoProps, staticProps) { |
| 19386 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 19387 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 19388 |
return Constructor; |
| 19389 |
}; |
| 19390 |
}(); |
| 19391 |
var _get = function get(object, property, receiver) { |
| 19392 |
if (object === null) object = Function.prototype; |
| 19393 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 19394 |
if (desc === void 0) { |
| 19395 |
var parent = Object.getPrototypeOf(object); |
| 19396 |
if (parent === null) { |
| 19397 |
return void 0; |
| 19398 |
} else { |
| 19399 |
return get(parent, property, receiver); |
| 19400 |
} |
| 19401 |
} else if ("value" in desc) { |
| 19402 |
return desc.value; |
| 19403 |
} else { |
| 19404 |
var getter = desc.get; |
| 19405 |
if (getter === void 0) { |
| 19406 |
return void 0; |
| 19407 |
} |
| 19408 |
return getter.call(receiver); |
| 19409 |
} |
| 19410 |
}; |
| 19411 |
var _inline = __webpack_require__(6); |
| 19412 |
var _inline2 = _interopRequireDefault(_inline); |
| 19413 |
function _interopRequireDefault(obj) { |
| 19414 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 19415 |
} |
| 19416 |
function _classCallCheck2(instance, Constructor) { |
| 19417 |
if (!(instance instanceof Constructor)) { |
| 19418 |
throw new TypeError("Cannot call a class as a function"); |
| 19419 |
} |
| 19420 |
} |
| 19421 |
function _possibleConstructorReturn2(self2, call) { |
| 19422 |
if (!self2) { |
| 19423 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 19424 |
} |
| 19425 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 19426 |
} |
| 19427 |
function _inherits2(subClass, superClass) { |
| 19428 |
if (typeof superClass !== "function" && superClass !== null) { |
| 19429 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 19430 |
} |
| 19431 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 19432 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 19433 |
} |
| 19434 |
var Link2 = function(_Inline) { |
| 19435 |
_inherits2(Link3, _Inline); |
| 19436 |
function Link3() { |
| 19437 |
_classCallCheck2(this, Link3); |
| 19438 |
return _possibleConstructorReturn2(this, (Link3.__proto__ || Object.getPrototypeOf(Link3)).apply(this, arguments)); |
| 19439 |
} |
| 19440 |
_createClass2(Link3, [{ |
| 19441 |
key: "format", |
| 19442 |
value: function format(name, value) { |
| 19443 |
if (name !== this.statics.blotName || !value) return _get(Link3.prototype.__proto__ || Object.getPrototypeOf(Link3.prototype), "format", this).call(this, name, value); |
| 19444 |
value = this.constructor.sanitize(value); |
| 19445 |
this.domNode.setAttribute("href", value); |
| 19446 |
} |
| 19447 |
}], [{ |
| 19448 |
key: "create", |
| 19449 |
value: function create(value) { |
| 19450 |
var node = _get(Link3.__proto__ || Object.getPrototypeOf(Link3), "create", this).call(this, value); |
| 19451 |
value = this.sanitize(value); |
| 19452 |
node.setAttribute("href", value); |
| 19453 |
node.setAttribute("rel", "noopener noreferrer"); |
| 19454 |
node.setAttribute("target", "_blank"); |
| 19455 |
return node; |
| 19456 |
} |
| 19457 |
}, { |
| 19458 |
key: "formats", |
| 19459 |
value: function formats(domNode) { |
| 19460 |
return domNode.getAttribute("href"); |
| 19461 |
} |
| 19462 |
}, { |
| 19463 |
key: "sanitize", |
| 19464 |
value: function sanitize(url) { |
| 19465 |
return _sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL; |
| 19466 |
} |
| 19467 |
}]); |
| 19468 |
return Link3; |
| 19469 |
}(_inline2.default); |
| 19470 |
Link2.blotName = "link"; |
| 19471 |
Link2.tagName = "A"; |
| 19472 |
Link2.SANITIZED_URL = "about:blank"; |
| 19473 |
Link2.PROTOCOL_WHITELIST = ["http", "https", "mailto", "tel"]; |
| 19474 |
function _sanitize(url, protocols) { |
| 19475 |
var anchor = document.createElement("a"); |
| 19476 |
anchor.href = url; |
| 19477 |
var protocol = anchor.href.slice(0, anchor.href.indexOf(":")); |
| 19478 |
return protocols.indexOf(protocol) > -1; |
| 19479 |
} |
| 19480 |
exports$12.default = Link2; |
| 19481 |
exports$12.sanitize = _sanitize; |
| 19482 |
}, |
| 19483 |
/* 28 */ |
| 19484 |
/***/ |
| 19485 |
function(module2, exports$12, __webpack_require__) { |
| 19486 |
Object.defineProperty(exports$12, "__esModule", { |
| 19487 |
value: true |
| 19488 |
}); |
| 19489 |
var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { |
| 19490 |
return typeof obj; |
| 19491 |
} : function(obj) { |
| 19492 |
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; |
| 19493 |
}; |
| 19494 |
var _createClass2 = /* @__PURE__ */ function() { |
| 19495 |
function defineProperties(target, props) { |
| 19496 |
for (var i = 0; i < props.length; i++) { |
| 19497 |
var descriptor = props[i]; |
| 19498 |
descriptor.enumerable = descriptor.enumerable || false; |
| 19499 |
descriptor.configurable = true; |
| 19500 |
if ("value" in descriptor) descriptor.writable = true; |
| 19501 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 19502 |
} |
| 19503 |
} |
| 19504 |
return function(Constructor, protoProps, staticProps) { |
| 19505 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 19506 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 19507 |
return Constructor; |
| 19508 |
}; |
| 19509 |
}(); |
| 19510 |
var _keyboard = __webpack_require__(23); |
| 19511 |
var _keyboard2 = _interopRequireDefault(_keyboard); |
| 19512 |
var _dropdown = __webpack_require__(107); |
| 19513 |
var _dropdown2 = _interopRequireDefault(_dropdown); |
| 19514 |
function _interopRequireDefault(obj) { |
| 19515 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 19516 |
} |
| 19517 |
function _classCallCheck2(instance, Constructor) { |
| 19518 |
if (!(instance instanceof Constructor)) { |
| 19519 |
throw new TypeError("Cannot call a class as a function"); |
| 19520 |
} |
| 19521 |
} |
| 19522 |
var optionsCounter = 0; |
| 19523 |
function toggleAriaAttribute(element, attribute) { |
| 19524 |
element.setAttribute(attribute, !(element.getAttribute(attribute) === "true")); |
| 19525 |
} |
| 19526 |
var Picker = function() { |
| 19527 |
function Picker2(select) { |
| 19528 |
var _this = this; |
| 19529 |
_classCallCheck2(this, Picker2); |
| 19530 |
this.select = select; |
| 19531 |
this.container = document.createElement("span"); |
| 19532 |
this.buildPicker(); |
| 19533 |
this.select.style.display = "none"; |
| 19534 |
this.select.parentNode.insertBefore(this.container, this.select); |
| 19535 |
this.label.addEventListener("mousedown", function() { |
| 19536 |
_this.togglePicker(); |
| 19537 |
}); |
| 19538 |
this.label.addEventListener("keydown", function(event) { |
| 19539 |
switch (event.keyCode) { |
| 19540 |
case _keyboard2.default.keys.ENTER: |
| 19541 |
_this.togglePicker(); |
| 19542 |
break; |
| 19543 |
case _keyboard2.default.keys.ESCAPE: |
| 19544 |
_this.escape(); |
| 19545 |
event.preventDefault(); |
| 19546 |
break; |
| 19547 |
} |
| 19548 |
}); |
| 19549 |
this.select.addEventListener("change", this.update.bind(this)); |
| 19550 |
} |
| 19551 |
_createClass2(Picker2, [{ |
| 19552 |
key: "togglePicker", |
| 19553 |
value: function togglePicker() { |
| 19554 |
this.container.classList.toggle("ql-expanded"); |
| 19555 |
toggleAriaAttribute(this.label, "aria-expanded"); |
| 19556 |
toggleAriaAttribute(this.options, "aria-hidden"); |
| 19557 |
} |
| 19558 |
}, { |
| 19559 |
key: "buildItem", |
| 19560 |
value: function buildItem(option) { |
| 19561 |
var _this2 = this; |
| 19562 |
var item = document.createElement("span"); |
| 19563 |
item.tabIndex = "0"; |
| 19564 |
item.setAttribute("role", "button"); |
| 19565 |
item.classList.add("ql-picker-item"); |
| 19566 |
if (option.hasAttribute("value")) { |
| 19567 |
item.setAttribute("data-value", option.getAttribute("value")); |
| 19568 |
} |
| 19569 |
if (option.textContent) { |
| 19570 |
item.setAttribute("data-label", option.textContent); |
| 19571 |
} |
| 19572 |
item.addEventListener("click", function() { |
| 19573 |
_this2.selectItem(item, true); |
| 19574 |
}); |
| 19575 |
item.addEventListener("keydown", function(event) { |
| 19576 |
switch (event.keyCode) { |
| 19577 |
case _keyboard2.default.keys.ENTER: |
| 19578 |
_this2.selectItem(item, true); |
| 19579 |
event.preventDefault(); |
| 19580 |
break; |
| 19581 |
case _keyboard2.default.keys.ESCAPE: |
| 19582 |
_this2.escape(); |
| 19583 |
event.preventDefault(); |
| 19584 |
break; |
| 19585 |
} |
| 19586 |
}); |
| 19587 |
return item; |
| 19588 |
} |
| 19589 |
}, { |
| 19590 |
key: "buildLabel", |
| 19591 |
value: function buildLabel() { |
| 19592 |
var label = document.createElement("span"); |
| 19593 |
label.classList.add("ql-picker-label"); |
| 19594 |
label.innerHTML = _dropdown2.default; |
| 19595 |
label.tabIndex = "0"; |
| 19596 |
label.setAttribute("role", "button"); |
| 19597 |
label.setAttribute("aria-expanded", "false"); |
| 19598 |
this.container.appendChild(label); |
| 19599 |
return label; |
| 19600 |
} |
| 19601 |
}, { |
| 19602 |
key: "buildOptions", |
| 19603 |
value: function buildOptions() { |
| 19604 |
var _this3 = this; |
| 19605 |
var options = document.createElement("span"); |
| 19606 |
options.classList.add("ql-picker-options"); |
| 19607 |
options.setAttribute("aria-hidden", "true"); |
| 19608 |
options.tabIndex = "-1"; |
| 19609 |
options.id = "ql-picker-options-" + optionsCounter; |
| 19610 |
optionsCounter += 1; |
| 19611 |
this.label.setAttribute("aria-controls", options.id); |
| 19612 |
this.options = options; |
| 19613 |
[].slice.call(this.select.options).forEach(function(option) { |
| 19614 |
var item = _this3.buildItem(option); |
| 19615 |
options.appendChild(item); |
| 19616 |
if (option.selected === true) { |
| 19617 |
_this3.selectItem(item); |
| 19618 |
} |
| 19619 |
}); |
| 19620 |
this.container.appendChild(options); |
| 19621 |
} |
| 19622 |
}, { |
| 19623 |
key: "buildPicker", |
| 19624 |
value: function buildPicker() { |
| 19625 |
var _this4 = this; |
| 19626 |
[].slice.call(this.select.attributes).forEach(function(item) { |
| 19627 |
_this4.container.setAttribute(item.name, item.value); |
| 19628 |
}); |
| 19629 |
this.container.classList.add("ql-picker"); |
| 19630 |
this.label = this.buildLabel(); |
| 19631 |
this.buildOptions(); |
| 19632 |
} |
| 19633 |
}, { |
| 19634 |
key: "escape", |
| 19635 |
value: function escape2() { |
| 19636 |
var _this5 = this; |
| 19637 |
this.close(); |
| 19638 |
setTimeout(function() { |
| 19639 |
return _this5.label.focus(); |
| 19640 |
}, 1); |
| 19641 |
} |
| 19642 |
}, { |
| 19643 |
key: "close", |
| 19644 |
value: function close() { |
| 19645 |
this.container.classList.remove("ql-expanded"); |
| 19646 |
this.label.setAttribute("aria-expanded", "false"); |
| 19647 |
this.options.setAttribute("aria-hidden", "true"); |
| 19648 |
} |
| 19649 |
}, { |
| 19650 |
key: "selectItem", |
| 19651 |
value: function selectItem(item) { |
| 19652 |
var trigger = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; |
| 19653 |
var selected = this.container.querySelector(".ql-selected"); |
| 19654 |
if (item === selected) return; |
| 19655 |
if (selected != null) { |
| 19656 |
selected.classList.remove("ql-selected"); |
| 19657 |
} |
| 19658 |
if (item == null) return; |
| 19659 |
item.classList.add("ql-selected"); |
| 19660 |
this.select.selectedIndex = [].indexOf.call(item.parentNode.children, item); |
| 19661 |
if (item.hasAttribute("data-value")) { |
| 19662 |
this.label.setAttribute("data-value", item.getAttribute("data-value")); |
| 19663 |
} else { |
| 19664 |
this.label.removeAttribute("data-value"); |
| 19665 |
} |
| 19666 |
if (item.hasAttribute("data-label")) { |
| 19667 |
this.label.setAttribute("data-label", item.getAttribute("data-label")); |
| 19668 |
} else { |
| 19669 |
this.label.removeAttribute("data-label"); |
| 19670 |
} |
| 19671 |
if (trigger) { |
| 19672 |
if (typeof Event === "function") { |
| 19673 |
this.select.dispatchEvent(new Event("change")); |
| 19674 |
} else if ((typeof Event === "undefined" ? "undefined" : _typeof2(Event)) === "object") { |
| 19675 |
var event = document.createEvent("Event"); |
| 19676 |
event.initEvent("change", true, true); |
| 19677 |
this.select.dispatchEvent(event); |
| 19678 |
} |
| 19679 |
this.close(); |
| 19680 |
} |
| 19681 |
} |
| 19682 |
}, { |
| 19683 |
key: "update", |
| 19684 |
value: function update() { |
| 19685 |
var option = void 0; |
| 19686 |
if (this.select.selectedIndex > -1) { |
| 19687 |
var item = this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex]; |
| 19688 |
option = this.select.options[this.select.selectedIndex]; |
| 19689 |
this.selectItem(item); |
| 19690 |
} else { |
| 19691 |
this.selectItem(null); |
| 19692 |
} |
| 19693 |
var isActive = option != null && option !== this.select.querySelector("option[selected]"); |
| 19694 |
this.label.classList.toggle("ql-active", isActive); |
| 19695 |
} |
| 19696 |
}]); |
| 19697 |
return Picker2; |
| 19698 |
}(); |
| 19699 |
exports$12.default = Picker; |
| 19700 |
}, |
| 19701 |
/* 29 */ |
| 19702 |
/***/ |
| 19703 |
function(module2, exports$12, __webpack_require__) { |
| 19704 |
Object.defineProperty(exports$12, "__esModule", { |
| 19705 |
value: true |
| 19706 |
}); |
| 19707 |
var _parchment = __webpack_require__(0); |
| 19708 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 19709 |
var _quill = __webpack_require__(5); |
| 19710 |
var _quill2 = _interopRequireDefault(_quill); |
| 19711 |
var _block = __webpack_require__(4); |
| 19712 |
var _block2 = _interopRequireDefault(_block); |
| 19713 |
var _break = __webpack_require__(16); |
| 19714 |
var _break2 = _interopRequireDefault(_break); |
| 19715 |
var _container = __webpack_require__(25); |
| 19716 |
var _container2 = _interopRequireDefault(_container); |
| 19717 |
var _cursor = __webpack_require__(24); |
| 19718 |
var _cursor2 = _interopRequireDefault(_cursor); |
| 19719 |
var _embed = __webpack_require__(35); |
| 19720 |
var _embed2 = _interopRequireDefault(_embed); |
| 19721 |
var _inline = __webpack_require__(6); |
| 19722 |
var _inline2 = _interopRequireDefault(_inline); |
| 19723 |
var _scroll = __webpack_require__(22); |
| 19724 |
var _scroll2 = _interopRequireDefault(_scroll); |
| 19725 |
var _text = __webpack_require__(7); |
| 19726 |
var _text2 = _interopRequireDefault(_text); |
| 19727 |
var _clipboard = __webpack_require__(55); |
| 19728 |
var _clipboard2 = _interopRequireDefault(_clipboard); |
| 19729 |
var _history = __webpack_require__(42); |
| 19730 |
var _history2 = _interopRequireDefault(_history); |
| 19731 |
var _keyboard = __webpack_require__(23); |
| 19732 |
var _keyboard2 = _interopRequireDefault(_keyboard); |
| 19733 |
function _interopRequireDefault(obj) { |
| 19734 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 19735 |
} |
| 19736 |
_quill2.default.register({ |
| 19737 |
"blots/block": _block2.default, |
| 19738 |
"blots/block/embed": _block.BlockEmbed, |
| 19739 |
"blots/break": _break2.default, |
| 19740 |
"blots/container": _container2.default, |
| 19741 |
"blots/cursor": _cursor2.default, |
| 19742 |
"blots/embed": _embed2.default, |
| 19743 |
"blots/inline": _inline2.default, |
| 19744 |
"blots/scroll": _scroll2.default, |
| 19745 |
"blots/text": _text2.default, |
| 19746 |
"modules/clipboard": _clipboard2.default, |
| 19747 |
"modules/history": _history2.default, |
| 19748 |
"modules/keyboard": _keyboard2.default |
| 19749 |
}); |
| 19750 |
_parchment2.default.register(_block2.default, _break2.default, _cursor2.default, _inline2.default, _scroll2.default, _text2.default); |
| 19751 |
exports$12.default = _quill2.default; |
| 19752 |
}, |
| 19753 |
/* 30 */ |
| 19754 |
/***/ |
| 19755 |
function(module2, exports$12, __webpack_require__) { |
| 19756 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 19757 |
var Registry = __webpack_require__(1); |
| 19758 |
var ShadowBlot = ( |
| 19759 |
/** @class */ |
| 19760 |
function() { |
| 19761 |
function ShadowBlot2(domNode) { |
| 19762 |
this.domNode = domNode; |
| 19763 |
this.domNode[Registry.DATA_KEY] = { blot: this }; |
| 19764 |
} |
| 19765 |
Object.defineProperty(ShadowBlot2.prototype, "statics", { |
| 19766 |
// Hack for accessing inherited static methods |
| 19767 |
get: function() { |
| 19768 |
return this.constructor; |
| 19769 |
}, |
| 19770 |
enumerable: true, |
| 19771 |
configurable: true |
| 19772 |
}); |
| 19773 |
ShadowBlot2.create = function(value) { |
| 19774 |
if (this.tagName == null) { |
| 19775 |
throw new Registry.ParchmentError("Blot definition missing tagName"); |
| 19776 |
} |
| 19777 |
var node; |
| 19778 |
if (Array.isArray(this.tagName)) { |
| 19779 |
if (typeof value === "string") { |
| 19780 |
value = value.toUpperCase(); |
| 19781 |
if (parseInt(value).toString() === value) { |
| 19782 |
value = parseInt(value); |
| 19783 |
} |
| 19784 |
} |
| 19785 |
if (typeof value === "number") { |
| 19786 |
node = document.createElement(this.tagName[value - 1]); |
| 19787 |
} else if (this.tagName.indexOf(value) > -1) { |
| 19788 |
node = document.createElement(value); |
| 19789 |
} else { |
| 19790 |
node = document.createElement(this.tagName[0]); |
| 19791 |
} |
| 19792 |
} else { |
| 19793 |
node = document.createElement(this.tagName); |
| 19794 |
} |
| 19795 |
if (this.className) { |
| 19796 |
node.classList.add(this.className); |
| 19797 |
} |
| 19798 |
return node; |
| 19799 |
}; |
| 19800 |
ShadowBlot2.prototype.attach = function() { |
| 19801 |
if (this.parent != null) { |
| 19802 |
this.scroll = this.parent.scroll; |
| 19803 |
} |
| 19804 |
}; |
| 19805 |
ShadowBlot2.prototype.clone = function() { |
| 19806 |
var domNode = this.domNode.cloneNode(false); |
| 19807 |
return Registry.create(domNode); |
| 19808 |
}; |
| 19809 |
ShadowBlot2.prototype.detach = function() { |
| 19810 |
if (this.parent != null) |
| 19811 |
this.parent.removeChild(this); |
| 19812 |
delete this.domNode[Registry.DATA_KEY]; |
| 19813 |
}; |
| 19814 |
ShadowBlot2.prototype.deleteAt = function(index, length) { |
| 19815 |
var blot = this.isolate(index, length); |
| 19816 |
blot.remove(); |
| 19817 |
}; |
| 19818 |
ShadowBlot2.prototype.formatAt = function(index, length, name, value) { |
| 19819 |
var blot = this.isolate(index, length); |
| 19820 |
if (Registry.query(name, Registry.Scope.BLOT) != null && value) { |
| 19821 |
blot.wrap(name, value); |
| 19822 |
} else if (Registry.query(name, Registry.Scope.ATTRIBUTE) != null) { |
| 19823 |
var parent = Registry.create(this.statics.scope); |
| 19824 |
blot.wrap(parent); |
| 19825 |
parent.format(name, value); |
| 19826 |
} |
| 19827 |
}; |
| 19828 |
ShadowBlot2.prototype.insertAt = function(index, value, def) { |
| 19829 |
var blot = def == null ? Registry.create("text", value) : Registry.create(value, def); |
| 19830 |
var ref = this.split(index); |
| 19831 |
this.parent.insertBefore(blot, ref); |
| 19832 |
}; |
| 19833 |
ShadowBlot2.prototype.insertInto = function(parentBlot, refBlot) { |
| 19834 |
if (refBlot === void 0) { |
| 19835 |
refBlot = null; |
| 19836 |
} |
| 19837 |
if (this.parent != null) { |
| 19838 |
this.parent.children.remove(this); |
| 19839 |
} |
| 19840 |
var refDomNode = null; |
| 19841 |
parentBlot.children.insertBefore(this, refBlot); |
| 19842 |
if (refBlot != null) { |
| 19843 |
refDomNode = refBlot.domNode; |
| 19844 |
} |
| 19845 |
if (this.domNode.parentNode != parentBlot.domNode || this.domNode.nextSibling != refDomNode) { |
| 19846 |
parentBlot.domNode.insertBefore(this.domNode, refDomNode); |
| 19847 |
} |
| 19848 |
this.parent = parentBlot; |
| 19849 |
this.attach(); |
| 19850 |
}; |
| 19851 |
ShadowBlot2.prototype.isolate = function(index, length) { |
| 19852 |
var target = this.split(index); |
| 19853 |
target.split(length); |
| 19854 |
return target; |
| 19855 |
}; |
| 19856 |
ShadowBlot2.prototype.length = function() { |
| 19857 |
return 1; |
| 19858 |
}; |
| 19859 |
ShadowBlot2.prototype.offset = function(root2) { |
| 19860 |
if (root2 === void 0) { |
| 19861 |
root2 = this.parent; |
| 19862 |
} |
| 19863 |
if (this.parent == null || this == root2) |
| 19864 |
return 0; |
| 19865 |
return this.parent.children.offset(this) + this.parent.offset(root2); |
| 19866 |
}; |
| 19867 |
ShadowBlot2.prototype.optimize = function(context) { |
| 19868 |
if (this.domNode[Registry.DATA_KEY] != null) { |
| 19869 |
delete this.domNode[Registry.DATA_KEY].mutations; |
| 19870 |
} |
| 19871 |
}; |
| 19872 |
ShadowBlot2.prototype.remove = function() { |
| 19873 |
if (this.domNode.parentNode != null) { |
| 19874 |
this.domNode.parentNode.removeChild(this.domNode); |
| 19875 |
} |
| 19876 |
this.detach(); |
| 19877 |
}; |
| 19878 |
ShadowBlot2.prototype.replace = function(target) { |
| 19879 |
if (target.parent == null) |
| 19880 |
return; |
| 19881 |
target.parent.insertBefore(this, target.next); |
| 19882 |
target.remove(); |
| 19883 |
}; |
| 19884 |
ShadowBlot2.prototype.replaceWith = function(name, value) { |
| 19885 |
var replacement = typeof name === "string" ? Registry.create(name, value) : name; |
| 19886 |
replacement.replace(this); |
| 19887 |
return replacement; |
| 19888 |
}; |
| 19889 |
ShadowBlot2.prototype.split = function(index, force) { |
| 19890 |
return index === 0 ? this : this.next; |
| 19891 |
}; |
| 19892 |
ShadowBlot2.prototype.update = function(mutations, context) { |
| 19893 |
}; |
| 19894 |
ShadowBlot2.prototype.wrap = function(name, value) { |
| 19895 |
var wrapper = typeof name === "string" ? Registry.create(name, value) : name; |
| 19896 |
if (this.parent != null) { |
| 19897 |
this.parent.insertBefore(wrapper, this.next); |
| 19898 |
} |
| 19899 |
wrapper.appendChild(this); |
| 19900 |
return wrapper; |
| 19901 |
}; |
| 19902 |
ShadowBlot2.blotName = "abstract"; |
| 19903 |
return ShadowBlot2; |
| 19904 |
}() |
| 19905 |
); |
| 19906 |
exports$12.default = ShadowBlot; |
| 19907 |
}, |
| 19908 |
/* 31 */ |
| 19909 |
/***/ |
| 19910 |
function(module2, exports$12, __webpack_require__) { |
| 19911 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 19912 |
var attributor_1 = __webpack_require__(12); |
| 19913 |
var class_1 = __webpack_require__(32); |
| 19914 |
var style_1 = __webpack_require__(33); |
| 19915 |
var Registry = __webpack_require__(1); |
| 19916 |
var AttributorStore = ( |
| 19917 |
/** @class */ |
| 19918 |
function() { |
| 19919 |
function AttributorStore2(domNode) { |
| 19920 |
this.attributes = {}; |
| 19921 |
this.domNode = domNode; |
| 19922 |
this.build(); |
| 19923 |
} |
| 19924 |
AttributorStore2.prototype.attribute = function(attribute, value) { |
| 19925 |
if (value) { |
| 19926 |
if (attribute.add(this.domNode, value)) { |
| 19927 |
if (attribute.value(this.domNode) != null) { |
| 19928 |
this.attributes[attribute.attrName] = attribute; |
| 19929 |
} else { |
| 19930 |
delete this.attributes[attribute.attrName]; |
| 19931 |
} |
| 19932 |
} |
| 19933 |
} else { |
| 19934 |
attribute.remove(this.domNode); |
| 19935 |
delete this.attributes[attribute.attrName]; |
| 19936 |
} |
| 19937 |
}; |
| 19938 |
AttributorStore2.prototype.build = function() { |
| 19939 |
var _this = this; |
| 19940 |
this.attributes = {}; |
| 19941 |
var attributes = attributor_1.default.keys(this.domNode); |
| 19942 |
var classes = class_1.default.keys(this.domNode); |
| 19943 |
var styles = style_1.default.keys(this.domNode); |
| 19944 |
attributes.concat(classes).concat(styles).forEach(function(name) { |
| 19945 |
var attr = Registry.query(name, Registry.Scope.ATTRIBUTE); |
| 19946 |
if (attr instanceof attributor_1.default) { |
| 19947 |
_this.attributes[attr.attrName] = attr; |
| 19948 |
} |
| 19949 |
}); |
| 19950 |
}; |
| 19951 |
AttributorStore2.prototype.copy = function(target) { |
| 19952 |
var _this = this; |
| 19953 |
Object.keys(this.attributes).forEach(function(key) { |
| 19954 |
var value = _this.attributes[key].value(_this.domNode); |
| 19955 |
target.format(key, value); |
| 19956 |
}); |
| 19957 |
}; |
| 19958 |
AttributorStore2.prototype.move = function(target) { |
| 19959 |
var _this = this; |
| 19960 |
this.copy(target); |
| 19961 |
Object.keys(this.attributes).forEach(function(key) { |
| 19962 |
_this.attributes[key].remove(_this.domNode); |
| 19963 |
}); |
| 19964 |
this.attributes = {}; |
| 19965 |
}; |
| 19966 |
AttributorStore2.prototype.values = function() { |
| 19967 |
var _this = this; |
| 19968 |
return Object.keys(this.attributes).reduce(function(attributes, name) { |
| 19969 |
attributes[name] = _this.attributes[name].value(_this.domNode); |
| 19970 |
return attributes; |
| 19971 |
}, {}); |
| 19972 |
}; |
| 19973 |
return AttributorStore2; |
| 19974 |
}() |
| 19975 |
); |
| 19976 |
exports$12.default = AttributorStore; |
| 19977 |
}, |
| 19978 |
/* 32 */ |
| 19979 |
/***/ |
| 19980 |
function(module2, exports$12, __webpack_require__) { |
| 19981 |
var __extends2 = this && this.__extends || function() { |
| 19982 |
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { |
| 19983 |
d2.__proto__ = b2; |
| 19984 |
} || function(d2, b2) { |
| 19985 |
for (var p2 in b2) if (b2.hasOwnProperty(p2)) d2[p2] = b2[p2]; |
| 19986 |
}; |
| 19987 |
return function(d2, b2) { |
| 19988 |
extendStatics(d2, b2); |
| 19989 |
function __() { |
| 19990 |
this.constructor = d2; |
| 19991 |
} |
| 19992 |
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __()); |
| 19993 |
}; |
| 19994 |
}(); |
| 19995 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 19996 |
var attributor_1 = __webpack_require__(12); |
| 19997 |
function match(node, prefix) { |
| 19998 |
var className = node.getAttribute("class") || ""; |
| 19999 |
return className.split(/\s+/).filter(function(name) { |
| 20000 |
return name.indexOf(prefix + "-") === 0; |
| 20001 |
}); |
| 20002 |
} |
| 20003 |
var ClassAttributor = ( |
| 20004 |
/** @class */ |
| 20005 |
function(_super) { |
| 20006 |
__extends2(ClassAttributor2, _super); |
| 20007 |
function ClassAttributor2() { |
| 20008 |
return _super !== null && _super.apply(this, arguments) || this; |
| 20009 |
} |
| 20010 |
ClassAttributor2.keys = function(node) { |
| 20011 |
return (node.getAttribute("class") || "").split(/\s+/).map(function(name) { |
| 20012 |
return name.split("-").slice(0, -1).join("-"); |
| 20013 |
}); |
| 20014 |
}; |
| 20015 |
ClassAttributor2.prototype.add = function(node, value) { |
| 20016 |
if (!this.canAdd(node, value)) |
| 20017 |
return false; |
| 20018 |
this.remove(node); |
| 20019 |
node.classList.add(this.keyName + "-" + value); |
| 20020 |
return true; |
| 20021 |
}; |
| 20022 |
ClassAttributor2.prototype.remove = function(node) { |
| 20023 |
var matches = match(node, this.keyName); |
| 20024 |
matches.forEach(function(name) { |
| 20025 |
node.classList.remove(name); |
| 20026 |
}); |
| 20027 |
if (node.classList.length === 0) { |
| 20028 |
node.removeAttribute("class"); |
| 20029 |
} |
| 20030 |
}; |
| 20031 |
ClassAttributor2.prototype.value = function(node) { |
| 20032 |
var result = match(node, this.keyName)[0] || ""; |
| 20033 |
var value = result.slice(this.keyName.length + 1); |
| 20034 |
return this.canAdd(node, value) ? value : ""; |
| 20035 |
}; |
| 20036 |
return ClassAttributor2; |
| 20037 |
}(attributor_1.default) |
| 20038 |
); |
| 20039 |
exports$12.default = ClassAttributor; |
| 20040 |
}, |
| 20041 |
/* 33 */ |
| 20042 |
/***/ |
| 20043 |
function(module2, exports$12, __webpack_require__) { |
| 20044 |
var __extends2 = this && this.__extends || function() { |
| 20045 |
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { |
| 20046 |
d2.__proto__ = b2; |
| 20047 |
} || function(d2, b2) { |
| 20048 |
for (var p2 in b2) if (b2.hasOwnProperty(p2)) d2[p2] = b2[p2]; |
| 20049 |
}; |
| 20050 |
return function(d2, b2) { |
| 20051 |
extendStatics(d2, b2); |
| 20052 |
function __() { |
| 20053 |
this.constructor = d2; |
| 20054 |
} |
| 20055 |
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __()); |
| 20056 |
}; |
| 20057 |
}(); |
| 20058 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 20059 |
var attributor_1 = __webpack_require__(12); |
| 20060 |
function camelize(name) { |
| 20061 |
var parts = name.split("-"); |
| 20062 |
var rest = parts.slice(1).map(function(part) { |
| 20063 |
return part[0].toUpperCase() + part.slice(1); |
| 20064 |
}).join(""); |
| 20065 |
return parts[0] + rest; |
| 20066 |
} |
| 20067 |
var StyleAttributor = ( |
| 20068 |
/** @class */ |
| 20069 |
function(_super) { |
| 20070 |
__extends2(StyleAttributor2, _super); |
| 20071 |
function StyleAttributor2() { |
| 20072 |
return _super !== null && _super.apply(this, arguments) || this; |
| 20073 |
} |
| 20074 |
StyleAttributor2.keys = function(node) { |
| 20075 |
return (node.getAttribute("style") || "").split(";").map(function(value) { |
| 20076 |
var arr = value.split(":"); |
| 20077 |
return arr[0].trim(); |
| 20078 |
}); |
| 20079 |
}; |
| 20080 |
StyleAttributor2.prototype.add = function(node, value) { |
| 20081 |
if (!this.canAdd(node, value)) |
| 20082 |
return false; |
| 20083 |
node.style[camelize(this.keyName)] = value; |
| 20084 |
return true; |
| 20085 |
}; |
| 20086 |
StyleAttributor2.prototype.remove = function(node) { |
| 20087 |
node.style[camelize(this.keyName)] = ""; |
| 20088 |
if (!node.getAttribute("style")) { |
| 20089 |
node.removeAttribute("style"); |
| 20090 |
} |
| 20091 |
}; |
| 20092 |
StyleAttributor2.prototype.value = function(node) { |
| 20093 |
var value = node.style[camelize(this.keyName)]; |
| 20094 |
return this.canAdd(node, value) ? value : ""; |
| 20095 |
}; |
| 20096 |
return StyleAttributor2; |
| 20097 |
}(attributor_1.default) |
| 20098 |
); |
| 20099 |
exports$12.default = StyleAttributor; |
| 20100 |
}, |
| 20101 |
/* 34 */ |
| 20102 |
/***/ |
| 20103 |
function(module2, exports$12, __webpack_require__) { |
| 20104 |
Object.defineProperty(exports$12, "__esModule", { |
| 20105 |
value: true |
| 20106 |
}); |
| 20107 |
var _createClass2 = /* @__PURE__ */ function() { |
| 20108 |
function defineProperties(target, props) { |
| 20109 |
for (var i = 0; i < props.length; i++) { |
| 20110 |
var descriptor = props[i]; |
| 20111 |
descriptor.enumerable = descriptor.enumerable || false; |
| 20112 |
descriptor.configurable = true; |
| 20113 |
if ("value" in descriptor) descriptor.writable = true; |
| 20114 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 20115 |
} |
| 20116 |
} |
| 20117 |
return function(Constructor, protoProps, staticProps) { |
| 20118 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 20119 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 20120 |
return Constructor; |
| 20121 |
}; |
| 20122 |
}(); |
| 20123 |
function _classCallCheck2(instance, Constructor) { |
| 20124 |
if (!(instance instanceof Constructor)) { |
| 20125 |
throw new TypeError("Cannot call a class as a function"); |
| 20126 |
} |
| 20127 |
} |
| 20128 |
var Theme = function() { |
| 20129 |
function Theme2(quill2, options) { |
| 20130 |
_classCallCheck2(this, Theme2); |
| 20131 |
this.quill = quill2; |
| 20132 |
this.options = options; |
| 20133 |
this.modules = {}; |
| 20134 |
} |
| 20135 |
_createClass2(Theme2, [{ |
| 20136 |
key: "init", |
| 20137 |
value: function init() { |
| 20138 |
var _this = this; |
| 20139 |
Object.keys(this.options.modules).forEach(function(name) { |
| 20140 |
if (_this.modules[name] == null) { |
| 20141 |
_this.addModule(name); |
| 20142 |
} |
| 20143 |
}); |
| 20144 |
} |
| 20145 |
}, { |
| 20146 |
key: "addModule", |
| 20147 |
value: function addModule(name) { |
| 20148 |
var moduleClass = this.quill.constructor.import("modules/" + name); |
| 20149 |
this.modules[name] = new moduleClass(this.quill, this.options.modules[name] || {}); |
| 20150 |
return this.modules[name]; |
| 20151 |
} |
| 20152 |
}]); |
| 20153 |
return Theme2; |
| 20154 |
}(); |
| 20155 |
Theme.DEFAULTS = { |
| 20156 |
modules: {} |
| 20157 |
}; |
| 20158 |
Theme.themes = { |
| 20159 |
"default": Theme |
| 20160 |
}; |
| 20161 |
exports$12.default = Theme; |
| 20162 |
}, |
| 20163 |
/* 35 */ |
| 20164 |
/***/ |
| 20165 |
function(module2, exports$12, __webpack_require__) { |
| 20166 |
Object.defineProperty(exports$12, "__esModule", { |
| 20167 |
value: true |
| 20168 |
}); |
| 20169 |
var _createClass2 = /* @__PURE__ */ function() { |
| 20170 |
function defineProperties(target, props) { |
| 20171 |
for (var i = 0; i < props.length; i++) { |
| 20172 |
var descriptor = props[i]; |
| 20173 |
descriptor.enumerable = descriptor.enumerable || false; |
| 20174 |
descriptor.configurable = true; |
| 20175 |
if ("value" in descriptor) descriptor.writable = true; |
| 20176 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 20177 |
} |
| 20178 |
} |
| 20179 |
return function(Constructor, protoProps, staticProps) { |
| 20180 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 20181 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 20182 |
return Constructor; |
| 20183 |
}; |
| 20184 |
}(); |
| 20185 |
var _get = function get(object, property, receiver) { |
| 20186 |
if (object === null) object = Function.prototype; |
| 20187 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 20188 |
if (desc === void 0) { |
| 20189 |
var parent = Object.getPrototypeOf(object); |
| 20190 |
if (parent === null) { |
| 20191 |
return void 0; |
| 20192 |
} else { |
| 20193 |
return get(parent, property, receiver); |
| 20194 |
} |
| 20195 |
} else if ("value" in desc) { |
| 20196 |
return desc.value; |
| 20197 |
} else { |
| 20198 |
var getter = desc.get; |
| 20199 |
if (getter === void 0) { |
| 20200 |
return void 0; |
| 20201 |
} |
| 20202 |
return getter.call(receiver); |
| 20203 |
} |
| 20204 |
}; |
| 20205 |
var _parchment = __webpack_require__(0); |
| 20206 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 20207 |
var _text = __webpack_require__(7); |
| 20208 |
var _text2 = _interopRequireDefault(_text); |
| 20209 |
function _interopRequireDefault(obj) { |
| 20210 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 20211 |
} |
| 20212 |
function _classCallCheck2(instance, Constructor) { |
| 20213 |
if (!(instance instanceof Constructor)) { |
| 20214 |
throw new TypeError("Cannot call a class as a function"); |
| 20215 |
} |
| 20216 |
} |
| 20217 |
function _possibleConstructorReturn2(self2, call) { |
| 20218 |
if (!self2) { |
| 20219 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 20220 |
} |
| 20221 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 20222 |
} |
| 20223 |
function _inherits2(subClass, superClass) { |
| 20224 |
if (typeof superClass !== "function" && superClass !== null) { |
| 20225 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 20226 |
} |
| 20227 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 20228 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 20229 |
} |
| 20230 |
var GUARD_TEXT = "\uFEFF"; |
| 20231 |
var Embed = function(_Parchment$Embed) { |
| 20232 |
_inherits2(Embed2, _Parchment$Embed); |
| 20233 |
function Embed2(node) { |
| 20234 |
_classCallCheck2(this, Embed2); |
| 20235 |
var _this = _possibleConstructorReturn2(this, (Embed2.__proto__ || Object.getPrototypeOf(Embed2)).call(this, node)); |
| 20236 |
_this.contentNode = document.createElement("span"); |
| 20237 |
_this.contentNode.setAttribute("contenteditable", false); |
| 20238 |
[].slice.call(_this.domNode.childNodes).forEach(function(childNode) { |
| 20239 |
_this.contentNode.appendChild(childNode); |
| 20240 |
}); |
| 20241 |
_this.leftGuard = document.createTextNode(GUARD_TEXT); |
| 20242 |
_this.rightGuard = document.createTextNode(GUARD_TEXT); |
| 20243 |
_this.domNode.appendChild(_this.leftGuard); |
| 20244 |
_this.domNode.appendChild(_this.contentNode); |
| 20245 |
_this.domNode.appendChild(_this.rightGuard); |
| 20246 |
return _this; |
| 20247 |
} |
| 20248 |
_createClass2(Embed2, [{ |
| 20249 |
key: "index", |
| 20250 |
value: function index(node, offset) { |
| 20251 |
if (node === this.leftGuard) return 0; |
| 20252 |
if (node === this.rightGuard) return 1; |
| 20253 |
return _get(Embed2.prototype.__proto__ || Object.getPrototypeOf(Embed2.prototype), "index", this).call(this, node, offset); |
| 20254 |
} |
| 20255 |
}, { |
| 20256 |
key: "restore", |
| 20257 |
value: function restore(node) { |
| 20258 |
var range = void 0, textNode = void 0; |
| 20259 |
var text = node.data.split(GUARD_TEXT).join(""); |
| 20260 |
if (node === this.leftGuard) { |
| 20261 |
if (this.prev instanceof _text2.default) { |
| 20262 |
var prevLength = this.prev.length(); |
| 20263 |
this.prev.insertAt(prevLength, text); |
| 20264 |
range = { |
| 20265 |
startNode: this.prev.domNode, |
| 20266 |
startOffset: prevLength + text.length |
| 20267 |
}; |
| 20268 |
} else { |
| 20269 |
textNode = document.createTextNode(text); |
| 20270 |
this.parent.insertBefore(_parchment2.default.create(textNode), this); |
| 20271 |
range = { |
| 20272 |
startNode: textNode, |
| 20273 |
startOffset: text.length |
| 20274 |
}; |
| 20275 |
} |
| 20276 |
} else if (node === this.rightGuard) { |
| 20277 |
if (this.next instanceof _text2.default) { |
| 20278 |
this.next.insertAt(0, text); |
| 20279 |
range = { |
| 20280 |
startNode: this.next.domNode, |
| 20281 |
startOffset: text.length |
| 20282 |
}; |
| 20283 |
} else { |
| 20284 |
textNode = document.createTextNode(text); |
| 20285 |
this.parent.insertBefore(_parchment2.default.create(textNode), this.next); |
| 20286 |
range = { |
| 20287 |
startNode: textNode, |
| 20288 |
startOffset: text.length |
| 20289 |
}; |
| 20290 |
} |
| 20291 |
} |
| 20292 |
node.data = GUARD_TEXT; |
| 20293 |
return range; |
| 20294 |
} |
| 20295 |
}, { |
| 20296 |
key: "update", |
| 20297 |
value: function update(mutations, context) { |
| 20298 |
var _this2 = this; |
| 20299 |
mutations.forEach(function(mutation) { |
| 20300 |
if (mutation.type === "characterData" && (mutation.target === _this2.leftGuard || mutation.target === _this2.rightGuard)) { |
| 20301 |
var range = _this2.restore(mutation.target); |
| 20302 |
if (range) context.range = range; |
| 20303 |
} |
| 20304 |
}); |
| 20305 |
} |
| 20306 |
}]); |
| 20307 |
return Embed2; |
| 20308 |
}(_parchment2.default.Embed); |
| 20309 |
exports$12.default = Embed; |
| 20310 |
}, |
| 20311 |
/* 36 */ |
| 20312 |
/***/ |
| 20313 |
function(module2, exports$12, __webpack_require__) { |
| 20314 |
Object.defineProperty(exports$12, "__esModule", { |
| 20315 |
value: true |
| 20316 |
}); |
| 20317 |
exports$12.AlignStyle = exports$12.AlignClass = exports$12.AlignAttribute = void 0; |
| 20318 |
var _parchment = __webpack_require__(0); |
| 20319 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 20320 |
function _interopRequireDefault(obj) { |
| 20321 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 20322 |
} |
| 20323 |
var config = { |
| 20324 |
scope: _parchment2.default.Scope.BLOCK, |
| 20325 |
whitelist: ["right", "center", "justify"] |
| 20326 |
}; |
| 20327 |
var AlignAttribute = new _parchment2.default.Attributor.Attribute("align", "align", config); |
| 20328 |
var AlignClass = new _parchment2.default.Attributor.Class("align", "ql-align", config); |
| 20329 |
var AlignStyle = new _parchment2.default.Attributor.Style("align", "text-align", config); |
| 20330 |
exports$12.AlignAttribute = AlignAttribute; |
| 20331 |
exports$12.AlignClass = AlignClass; |
| 20332 |
exports$12.AlignStyle = AlignStyle; |
| 20333 |
}, |
| 20334 |
/* 37 */ |
| 20335 |
/***/ |
| 20336 |
function(module2, exports$12, __webpack_require__) { |
| 20337 |
Object.defineProperty(exports$12, "__esModule", { |
| 20338 |
value: true |
| 20339 |
}); |
| 20340 |
exports$12.BackgroundStyle = exports$12.BackgroundClass = void 0; |
| 20341 |
var _parchment = __webpack_require__(0); |
| 20342 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 20343 |
var _color = __webpack_require__(26); |
| 20344 |
function _interopRequireDefault(obj) { |
| 20345 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 20346 |
} |
| 20347 |
var BackgroundClass = new _parchment2.default.Attributor.Class("background", "ql-bg", { |
| 20348 |
scope: _parchment2.default.Scope.INLINE |
| 20349 |
}); |
| 20350 |
var BackgroundStyle = new _color.ColorAttributor("background", "background-color", { |
| 20351 |
scope: _parchment2.default.Scope.INLINE |
| 20352 |
}); |
| 20353 |
exports$12.BackgroundClass = BackgroundClass; |
| 20354 |
exports$12.BackgroundStyle = BackgroundStyle; |
| 20355 |
}, |
| 20356 |
/* 38 */ |
| 20357 |
/***/ |
| 20358 |
function(module2, exports$12, __webpack_require__) { |
| 20359 |
Object.defineProperty(exports$12, "__esModule", { |
| 20360 |
value: true |
| 20361 |
}); |
| 20362 |
exports$12.DirectionStyle = exports$12.DirectionClass = exports$12.DirectionAttribute = void 0; |
| 20363 |
var _parchment = __webpack_require__(0); |
| 20364 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 20365 |
function _interopRequireDefault(obj) { |
| 20366 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 20367 |
} |
| 20368 |
var config = { |
| 20369 |
scope: _parchment2.default.Scope.BLOCK, |
| 20370 |
whitelist: ["rtl"] |
| 20371 |
}; |
| 20372 |
var DirectionAttribute = new _parchment2.default.Attributor.Attribute("direction", "dir", config); |
| 20373 |
var DirectionClass = new _parchment2.default.Attributor.Class("direction", "ql-direction", config); |
| 20374 |
var DirectionStyle = new _parchment2.default.Attributor.Style("direction", "direction", config); |
| 20375 |
exports$12.DirectionAttribute = DirectionAttribute; |
| 20376 |
exports$12.DirectionClass = DirectionClass; |
| 20377 |
exports$12.DirectionStyle = DirectionStyle; |
| 20378 |
}, |
| 20379 |
/* 39 */ |
| 20380 |
/***/ |
| 20381 |
function(module2, exports$12, __webpack_require__) { |
| 20382 |
Object.defineProperty(exports$12, "__esModule", { |
| 20383 |
value: true |
| 20384 |
}); |
| 20385 |
exports$12.FontClass = exports$12.FontStyle = void 0; |
| 20386 |
var _createClass2 = /* @__PURE__ */ function() { |
| 20387 |
function defineProperties(target, props) { |
| 20388 |
for (var i = 0; i < props.length; i++) { |
| 20389 |
var descriptor = props[i]; |
| 20390 |
descriptor.enumerable = descriptor.enumerable || false; |
| 20391 |
descriptor.configurable = true; |
| 20392 |
if ("value" in descriptor) descriptor.writable = true; |
| 20393 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 20394 |
} |
| 20395 |
} |
| 20396 |
return function(Constructor, protoProps, staticProps) { |
| 20397 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 20398 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 20399 |
return Constructor; |
| 20400 |
}; |
| 20401 |
}(); |
| 20402 |
var _get = function get(object, property, receiver) { |
| 20403 |
if (object === null) object = Function.prototype; |
| 20404 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 20405 |
if (desc === void 0) { |
| 20406 |
var parent = Object.getPrototypeOf(object); |
| 20407 |
if (parent === null) { |
| 20408 |
return void 0; |
| 20409 |
} else { |
| 20410 |
return get(parent, property, receiver); |
| 20411 |
} |
| 20412 |
} else if ("value" in desc) { |
| 20413 |
return desc.value; |
| 20414 |
} else { |
| 20415 |
var getter = desc.get; |
| 20416 |
if (getter === void 0) { |
| 20417 |
return void 0; |
| 20418 |
} |
| 20419 |
return getter.call(receiver); |
| 20420 |
} |
| 20421 |
}; |
| 20422 |
var _parchment = __webpack_require__(0); |
| 20423 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 20424 |
function _interopRequireDefault(obj) { |
| 20425 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 20426 |
} |
| 20427 |
function _classCallCheck2(instance, Constructor) { |
| 20428 |
if (!(instance instanceof Constructor)) { |
| 20429 |
throw new TypeError("Cannot call a class as a function"); |
| 20430 |
} |
| 20431 |
} |
| 20432 |
function _possibleConstructorReturn2(self2, call) { |
| 20433 |
if (!self2) { |
| 20434 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 20435 |
} |
| 20436 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 20437 |
} |
| 20438 |
function _inherits2(subClass, superClass) { |
| 20439 |
if (typeof superClass !== "function" && superClass !== null) { |
| 20440 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 20441 |
} |
| 20442 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 20443 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 20444 |
} |
| 20445 |
var config = { |
| 20446 |
scope: _parchment2.default.Scope.INLINE, |
| 20447 |
whitelist: ["serif", "monospace"] |
| 20448 |
}; |
| 20449 |
var FontClass = new _parchment2.default.Attributor.Class("font", "ql-font", config); |
| 20450 |
var FontStyleAttributor = function(_Parchment$Attributor) { |
| 20451 |
_inherits2(FontStyleAttributor2, _Parchment$Attributor); |
| 20452 |
function FontStyleAttributor2() { |
| 20453 |
_classCallCheck2(this, FontStyleAttributor2); |
| 20454 |
return _possibleConstructorReturn2(this, (FontStyleAttributor2.__proto__ || Object.getPrototypeOf(FontStyleAttributor2)).apply(this, arguments)); |
| 20455 |
} |
| 20456 |
_createClass2(FontStyleAttributor2, [{ |
| 20457 |
key: "value", |
| 20458 |
value: function value(node) { |
| 20459 |
return _get(FontStyleAttributor2.prototype.__proto__ || Object.getPrototypeOf(FontStyleAttributor2.prototype), "value", this).call(this, node).replace(/["']/g, ""); |
| 20460 |
} |
| 20461 |
}]); |
| 20462 |
return FontStyleAttributor2; |
| 20463 |
}(_parchment2.default.Attributor.Style); |
| 20464 |
var FontStyle = new FontStyleAttributor("font", "font-family", config); |
| 20465 |
exports$12.FontStyle = FontStyle; |
| 20466 |
exports$12.FontClass = FontClass; |
| 20467 |
}, |
| 20468 |
/* 40 */ |
| 20469 |
/***/ |
| 20470 |
function(module2, exports$12, __webpack_require__) { |
| 20471 |
Object.defineProperty(exports$12, "__esModule", { |
| 20472 |
value: true |
| 20473 |
}); |
| 20474 |
exports$12.SizeStyle = exports$12.SizeClass = void 0; |
| 20475 |
var _parchment = __webpack_require__(0); |
| 20476 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 20477 |
function _interopRequireDefault(obj) { |
| 20478 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 20479 |
} |
| 20480 |
var SizeClass = new _parchment2.default.Attributor.Class("size", "ql-size", { |
| 20481 |
scope: _parchment2.default.Scope.INLINE, |
| 20482 |
whitelist: ["small", "large", "huge"] |
| 20483 |
}); |
| 20484 |
var SizeStyle = new _parchment2.default.Attributor.Style("size", "font-size", { |
| 20485 |
scope: _parchment2.default.Scope.INLINE, |
| 20486 |
whitelist: ["10px", "18px", "32px"] |
| 20487 |
}); |
| 20488 |
exports$12.SizeClass = SizeClass; |
| 20489 |
exports$12.SizeStyle = SizeStyle; |
| 20490 |
}, |
| 20491 |
/* 41 */ |
| 20492 |
/***/ |
| 20493 |
function(module2, exports$12, __webpack_require__) { |
| 20494 |
module2.exports = { |
| 20495 |
"align": { |
| 20496 |
"": __webpack_require__(76), |
| 20497 |
"center": __webpack_require__(77), |
| 20498 |
"right": __webpack_require__(78), |
| 20499 |
"justify": __webpack_require__(79) |
| 20500 |
}, |
| 20501 |
"background": __webpack_require__(80), |
| 20502 |
"blockquote": __webpack_require__(81), |
| 20503 |
"bold": __webpack_require__(82), |
| 20504 |
"clean": __webpack_require__(83), |
| 20505 |
"code": __webpack_require__(58), |
| 20506 |
"code-block": __webpack_require__(58), |
| 20507 |
"color": __webpack_require__(84), |
| 20508 |
"direction": { |
| 20509 |
"": __webpack_require__(85), |
| 20510 |
"rtl": __webpack_require__(86) |
| 20511 |
}, |
| 20512 |
"float": { |
| 20513 |
"center": __webpack_require__(87), |
| 20514 |
"full": __webpack_require__(88), |
| 20515 |
"left": __webpack_require__(89), |
| 20516 |
"right": __webpack_require__(90) |
| 20517 |
}, |
| 20518 |
"formula": __webpack_require__(91), |
| 20519 |
"header": { |
| 20520 |
"1": __webpack_require__(92), |
| 20521 |
"2": __webpack_require__(93) |
| 20522 |
}, |
| 20523 |
"italic": __webpack_require__(94), |
| 20524 |
"image": __webpack_require__(95), |
| 20525 |
"indent": { |
| 20526 |
"+1": __webpack_require__(96), |
| 20527 |
"-1": __webpack_require__(97) |
| 20528 |
}, |
| 20529 |
"link": __webpack_require__(98), |
| 20530 |
"list": { |
| 20531 |
"ordered": __webpack_require__(99), |
| 20532 |
"bullet": __webpack_require__(100), |
| 20533 |
"check": __webpack_require__(101) |
| 20534 |
}, |
| 20535 |
"script": { |
| 20536 |
"sub": __webpack_require__(102), |
| 20537 |
"super": __webpack_require__(103) |
| 20538 |
}, |
| 20539 |
"strike": __webpack_require__(104), |
| 20540 |
"underline": __webpack_require__(105), |
| 20541 |
"video": __webpack_require__(106) |
| 20542 |
}; |
| 20543 |
}, |
| 20544 |
/* 42 */ |
| 20545 |
/***/ |
| 20546 |
function(module2, exports$12, __webpack_require__) { |
| 20547 |
Object.defineProperty(exports$12, "__esModule", { |
| 20548 |
value: true |
| 20549 |
}); |
| 20550 |
exports$12.getLastChangeIndex = exports$12.default = void 0; |
| 20551 |
var _createClass2 = /* @__PURE__ */ function() { |
| 20552 |
function defineProperties(target, props) { |
| 20553 |
for (var i = 0; i < props.length; i++) { |
| 20554 |
var descriptor = props[i]; |
| 20555 |
descriptor.enumerable = descriptor.enumerable || false; |
| 20556 |
descriptor.configurable = true; |
| 20557 |
if ("value" in descriptor) descriptor.writable = true; |
| 20558 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 20559 |
} |
| 20560 |
} |
| 20561 |
return function(Constructor, protoProps, staticProps) { |
| 20562 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 20563 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 20564 |
return Constructor; |
| 20565 |
}; |
| 20566 |
}(); |
| 20567 |
var _parchment = __webpack_require__(0); |
| 20568 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 20569 |
var _quill = __webpack_require__(5); |
| 20570 |
var _quill2 = _interopRequireDefault(_quill); |
| 20571 |
var _module = __webpack_require__(9); |
| 20572 |
var _module2 = _interopRequireDefault(_module); |
| 20573 |
function _interopRequireDefault(obj) { |
| 20574 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 20575 |
} |
| 20576 |
function _classCallCheck2(instance, Constructor) { |
| 20577 |
if (!(instance instanceof Constructor)) { |
| 20578 |
throw new TypeError("Cannot call a class as a function"); |
| 20579 |
} |
| 20580 |
} |
| 20581 |
function _possibleConstructorReturn2(self2, call) { |
| 20582 |
if (!self2) { |
| 20583 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 20584 |
} |
| 20585 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 20586 |
} |
| 20587 |
function _inherits2(subClass, superClass) { |
| 20588 |
if (typeof superClass !== "function" && superClass !== null) { |
| 20589 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 20590 |
} |
| 20591 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 20592 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 20593 |
} |
| 20594 |
var History2 = function(_Module) { |
| 20595 |
_inherits2(History3, _Module); |
| 20596 |
function History3(quill2, options) { |
| 20597 |
_classCallCheck2(this, History3); |
| 20598 |
var _this = _possibleConstructorReturn2(this, (History3.__proto__ || Object.getPrototypeOf(History3)).call(this, quill2, options)); |
| 20599 |
_this.lastRecorded = 0; |
| 20600 |
_this.ignoreChange = false; |
| 20601 |
_this.clear(); |
| 20602 |
_this.quill.on(_quill2.default.events.EDITOR_CHANGE, function(eventName, delta, oldDelta, source) { |
| 20603 |
if (eventName !== _quill2.default.events.TEXT_CHANGE || _this.ignoreChange) return; |
| 20604 |
if (!_this.options.userOnly || source === _quill2.default.sources.USER) { |
| 20605 |
_this.record(delta, oldDelta); |
| 20606 |
} else { |
| 20607 |
_this.transform(delta); |
| 20608 |
} |
| 20609 |
}); |
| 20610 |
_this.quill.keyboard.addBinding({ key: "Z", shortKey: true }, _this.undo.bind(_this)); |
| 20611 |
_this.quill.keyboard.addBinding({ key: "Z", shortKey: true, shiftKey: true }, _this.redo.bind(_this)); |
| 20612 |
if (/Win/i.test(navigator.platform)) { |
| 20613 |
_this.quill.keyboard.addBinding({ key: "Y", shortKey: true }, _this.redo.bind(_this)); |
| 20614 |
} |
| 20615 |
return _this; |
| 20616 |
} |
| 20617 |
_createClass2(History3, [{ |
| 20618 |
key: "change", |
| 20619 |
value: function change(source, dest) { |
| 20620 |
if (this.stack[source].length === 0) return; |
| 20621 |
var delta = this.stack[source].pop(); |
| 20622 |
this.stack[dest].push(delta); |
| 20623 |
this.lastRecorded = 0; |
| 20624 |
this.ignoreChange = true; |
| 20625 |
this.quill.updateContents(delta[source], _quill2.default.sources.USER); |
| 20626 |
this.ignoreChange = false; |
| 20627 |
var index = getLastChangeIndex(delta[source]); |
| 20628 |
this.quill.setSelection(index); |
| 20629 |
} |
| 20630 |
}, { |
| 20631 |
key: "clear", |
| 20632 |
value: function clear() { |
| 20633 |
this.stack = { undo: [], redo: [] }; |
| 20634 |
} |
| 20635 |
}, { |
| 20636 |
key: "cutoff", |
| 20637 |
value: function cutoff() { |
| 20638 |
this.lastRecorded = 0; |
| 20639 |
} |
| 20640 |
}, { |
| 20641 |
key: "record", |
| 20642 |
value: function record(changeDelta, oldDelta) { |
| 20643 |
if (changeDelta.ops.length === 0) return; |
| 20644 |
this.stack.redo = []; |
| 20645 |
var undoDelta = this.quill.getContents().diff(oldDelta); |
| 20646 |
var timestamp = Date.now(); |
| 20647 |
if (this.lastRecorded + this.options.delay > timestamp && this.stack.undo.length > 0) { |
| 20648 |
var delta = this.stack.undo.pop(); |
| 20649 |
undoDelta = undoDelta.compose(delta.undo); |
| 20650 |
changeDelta = delta.redo.compose(changeDelta); |
| 20651 |
} else { |
| 20652 |
this.lastRecorded = timestamp; |
| 20653 |
} |
| 20654 |
this.stack.undo.push({ |
| 20655 |
redo: changeDelta, |
| 20656 |
undo: undoDelta |
| 20657 |
}); |
| 20658 |
if (this.stack.undo.length > this.options.maxStack) { |
| 20659 |
this.stack.undo.shift(); |
| 20660 |
} |
| 20661 |
} |
| 20662 |
}, { |
| 20663 |
key: "redo", |
| 20664 |
value: function redo() { |
| 20665 |
this.change("redo", "undo"); |
| 20666 |
} |
| 20667 |
}, { |
| 20668 |
key: "transform", |
| 20669 |
value: function transform(delta) { |
| 20670 |
this.stack.undo.forEach(function(change) { |
| 20671 |
change.undo = delta.transform(change.undo, true); |
| 20672 |
change.redo = delta.transform(change.redo, true); |
| 20673 |
}); |
| 20674 |
this.stack.redo.forEach(function(change) { |
| 20675 |
change.undo = delta.transform(change.undo, true); |
| 20676 |
change.redo = delta.transform(change.redo, true); |
| 20677 |
}); |
| 20678 |
} |
| 20679 |
}, { |
| 20680 |
key: "undo", |
| 20681 |
value: function undo() { |
| 20682 |
this.change("undo", "redo"); |
| 20683 |
} |
| 20684 |
}]); |
| 20685 |
return History3; |
| 20686 |
}(_module2.default); |
| 20687 |
History2.DEFAULTS = { |
| 20688 |
delay: 1e3, |
| 20689 |
maxStack: 100, |
| 20690 |
userOnly: false |
| 20691 |
}; |
| 20692 |
function endsWithNewlineChange(delta) { |
| 20693 |
var lastOp = delta.ops[delta.ops.length - 1]; |
| 20694 |
if (lastOp == null) return false; |
| 20695 |
if (lastOp.insert != null) { |
| 20696 |
return typeof lastOp.insert === "string" && lastOp.insert.endsWith("\n"); |
| 20697 |
} |
| 20698 |
if (lastOp.attributes != null) { |
| 20699 |
return Object.keys(lastOp.attributes).some(function(attr) { |
| 20700 |
return _parchment2.default.query(attr, _parchment2.default.Scope.BLOCK) != null; |
| 20701 |
}); |
| 20702 |
} |
| 20703 |
return false; |
| 20704 |
} |
| 20705 |
function getLastChangeIndex(delta) { |
| 20706 |
var deleteLength = delta.reduce(function(length, op) { |
| 20707 |
length += op.delete || 0; |
| 20708 |
return length; |
| 20709 |
}, 0); |
| 20710 |
var changeIndex = delta.length() - deleteLength; |
| 20711 |
if (endsWithNewlineChange(delta)) { |
| 20712 |
changeIndex -= 1; |
| 20713 |
} |
| 20714 |
return changeIndex; |
| 20715 |
} |
| 20716 |
exports$12.default = History2; |
| 20717 |
exports$12.getLastChangeIndex = getLastChangeIndex; |
| 20718 |
}, |
| 20719 |
/* 43 */ |
| 20720 |
/***/ |
| 20721 |
function(module2, exports$12, __webpack_require__) { |
| 20722 |
Object.defineProperty(exports$12, "__esModule", { |
| 20723 |
value: true |
| 20724 |
}); |
| 20725 |
exports$12.default = exports$12.BaseTooltip = void 0; |
| 20726 |
var _createClass2 = /* @__PURE__ */ function() { |
| 20727 |
function defineProperties(target, props) { |
| 20728 |
for (var i = 0; i < props.length; i++) { |
| 20729 |
var descriptor = props[i]; |
| 20730 |
descriptor.enumerable = descriptor.enumerable || false; |
| 20731 |
descriptor.configurable = true; |
| 20732 |
if ("value" in descriptor) descriptor.writable = true; |
| 20733 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 20734 |
} |
| 20735 |
} |
| 20736 |
return function(Constructor, protoProps, staticProps) { |
| 20737 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 20738 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 20739 |
return Constructor; |
| 20740 |
}; |
| 20741 |
}(); |
| 20742 |
var _get = function get(object, property, receiver) { |
| 20743 |
if (object === null) object = Function.prototype; |
| 20744 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 20745 |
if (desc === void 0) { |
| 20746 |
var parent = Object.getPrototypeOf(object); |
| 20747 |
if (parent === null) { |
| 20748 |
return void 0; |
| 20749 |
} else { |
| 20750 |
return get(parent, property, receiver); |
| 20751 |
} |
| 20752 |
} else if ("value" in desc) { |
| 20753 |
return desc.value; |
| 20754 |
} else { |
| 20755 |
var getter = desc.get; |
| 20756 |
if (getter === void 0) { |
| 20757 |
return void 0; |
| 20758 |
} |
| 20759 |
return getter.call(receiver); |
| 20760 |
} |
| 20761 |
}; |
| 20762 |
var _extend = __webpack_require__(3); |
| 20763 |
var _extend2 = _interopRequireDefault(_extend); |
| 20764 |
var _quillDelta = __webpack_require__(2); |
| 20765 |
var _quillDelta2 = _interopRequireDefault(_quillDelta); |
| 20766 |
var _emitter = __webpack_require__(8); |
| 20767 |
var _emitter2 = _interopRequireDefault(_emitter); |
| 20768 |
var _keyboard = __webpack_require__(23); |
| 20769 |
var _keyboard2 = _interopRequireDefault(_keyboard); |
| 20770 |
var _theme = __webpack_require__(34); |
| 20771 |
var _theme2 = _interopRequireDefault(_theme); |
| 20772 |
var _colorPicker = __webpack_require__(59); |
| 20773 |
var _colorPicker2 = _interopRequireDefault(_colorPicker); |
| 20774 |
var _iconPicker = __webpack_require__(60); |
| 20775 |
var _iconPicker2 = _interopRequireDefault(_iconPicker); |
| 20776 |
var _picker = __webpack_require__(28); |
| 20777 |
var _picker2 = _interopRequireDefault(_picker); |
| 20778 |
var _tooltip = __webpack_require__(61); |
| 20779 |
var _tooltip2 = _interopRequireDefault(_tooltip); |
| 20780 |
function _interopRequireDefault(obj) { |
| 20781 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 20782 |
} |
| 20783 |
function _classCallCheck2(instance, Constructor) { |
| 20784 |
if (!(instance instanceof Constructor)) { |
| 20785 |
throw new TypeError("Cannot call a class as a function"); |
| 20786 |
} |
| 20787 |
} |
| 20788 |
function _possibleConstructorReturn2(self2, call) { |
| 20789 |
if (!self2) { |
| 20790 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 20791 |
} |
| 20792 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 20793 |
} |
| 20794 |
function _inherits2(subClass, superClass) { |
| 20795 |
if (typeof superClass !== "function" && superClass !== null) { |
| 20796 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 20797 |
} |
| 20798 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 20799 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 20800 |
} |
| 20801 |
var ALIGNS = [false, "center", "right", "justify"]; |
| 20802 |
var COLORS = ["#000000", "#e60000", "#ff9900", "#ffff00", "#008a00", "#0066cc", "#9933ff", "#ffffff", "#facccc", "#ffebcc", "#ffffcc", "#cce8cc", "#cce0f5", "#ebd6ff", "#bbbbbb", "#f06666", "#ffc266", "#ffff66", "#66b966", "#66a3e0", "#c285ff", "#888888", "#a10000", "#b26b00", "#b2b200", "#006100", "#0047b2", "#6b24b2", "#444444", "#5c0000", "#663d00", "#666600", "#003700", "#002966", "#3d1466"]; |
| 20803 |
var FONTS = [false, "serif", "monospace"]; |
| 20804 |
var HEADERS = ["1", "2", "3", false]; |
| 20805 |
var SIZES = ["small", false, "large", "huge"]; |
| 20806 |
var BaseTheme = function(_Theme) { |
| 20807 |
_inherits2(BaseTheme2, _Theme); |
| 20808 |
function BaseTheme2(quill2, options) { |
| 20809 |
_classCallCheck2(this, BaseTheme2); |
| 20810 |
var _this = _possibleConstructorReturn2(this, (BaseTheme2.__proto__ || Object.getPrototypeOf(BaseTheme2)).call(this, quill2, options)); |
| 20811 |
var listener = function listener2(e2) { |
| 20812 |
if (!document.body.contains(quill2.root)) { |
| 20813 |
return document.body.removeEventListener("click", listener2); |
| 20814 |
} |
| 20815 |
if (_this.tooltip != null && !_this.tooltip.root.contains(e2.target) && document.activeElement !== _this.tooltip.textbox && !_this.quill.hasFocus()) { |
| 20816 |
_this.tooltip.hide(); |
| 20817 |
} |
| 20818 |
if (_this.pickers != null) { |
| 20819 |
_this.pickers.forEach(function(picker) { |
| 20820 |
if (!picker.container.contains(e2.target)) { |
| 20821 |
picker.close(); |
| 20822 |
} |
| 20823 |
}); |
| 20824 |
} |
| 20825 |
}; |
| 20826 |
quill2.emitter.listenDOM("click", document.body, listener); |
| 20827 |
return _this; |
| 20828 |
} |
| 20829 |
_createClass2(BaseTheme2, [{ |
| 20830 |
key: "addModule", |
| 20831 |
value: function addModule(name) { |
| 20832 |
var module3 = _get(BaseTheme2.prototype.__proto__ || Object.getPrototypeOf(BaseTheme2.prototype), "addModule", this).call(this, name); |
| 20833 |
if (name === "toolbar") { |
| 20834 |
this.extendToolbar(module3); |
| 20835 |
} |
| 20836 |
return module3; |
| 20837 |
} |
| 20838 |
}, { |
| 20839 |
key: "buildButtons", |
| 20840 |
value: function buildButtons(buttons, icons) { |
| 20841 |
buttons.forEach(function(button) { |
| 20842 |
var className = button.getAttribute("class") || ""; |
| 20843 |
className.split(/\s+/).forEach(function(name) { |
| 20844 |
if (!name.startsWith("ql-")) return; |
| 20845 |
name = name.slice("ql-".length); |
| 20846 |
if (icons[name] == null) return; |
| 20847 |
if (name === "direction") { |
| 20848 |
button.innerHTML = icons[name][""] + icons[name]["rtl"]; |
| 20849 |
} else if (typeof icons[name] === "string") { |
| 20850 |
button.innerHTML = icons[name]; |
| 20851 |
} else { |
| 20852 |
var value = button.value || ""; |
| 20853 |
if (value != null && icons[name][value]) { |
| 20854 |
button.innerHTML = icons[name][value]; |
| 20855 |
} |
| 20856 |
} |
| 20857 |
}); |
| 20858 |
}); |
| 20859 |
} |
| 20860 |
}, { |
| 20861 |
key: "buildPickers", |
| 20862 |
value: function buildPickers(selects, icons) { |
| 20863 |
var _this2 = this; |
| 20864 |
this.pickers = selects.map(function(select) { |
| 20865 |
if (select.classList.contains("ql-align")) { |
| 20866 |
if (select.querySelector("option") == null) { |
| 20867 |
fillSelect(select, ALIGNS); |
| 20868 |
} |
| 20869 |
return new _iconPicker2.default(select, icons.align); |
| 20870 |
} else if (select.classList.contains("ql-background") || select.classList.contains("ql-color")) { |
| 20871 |
var format = select.classList.contains("ql-background") ? "background" : "color"; |
| 20872 |
if (select.querySelector("option") == null) { |
| 20873 |
fillSelect(select, COLORS, format === "background" ? "#ffffff" : "#000000"); |
| 20874 |
} |
| 20875 |
return new _colorPicker2.default(select, icons[format]); |
| 20876 |
} else { |
| 20877 |
if (select.querySelector("option") == null) { |
| 20878 |
if (select.classList.contains("ql-font")) { |
| 20879 |
fillSelect(select, FONTS); |
| 20880 |
} else if (select.classList.contains("ql-header")) { |
| 20881 |
fillSelect(select, HEADERS); |
| 20882 |
} else if (select.classList.contains("ql-size")) { |
| 20883 |
fillSelect(select, SIZES); |
| 20884 |
} |
| 20885 |
} |
| 20886 |
return new _picker2.default(select); |
| 20887 |
} |
| 20888 |
}); |
| 20889 |
var update = function update2() { |
| 20890 |
_this2.pickers.forEach(function(picker) { |
| 20891 |
picker.update(); |
| 20892 |
}); |
| 20893 |
}; |
| 20894 |
this.quill.on(_emitter2.default.events.EDITOR_CHANGE, update); |
| 20895 |
} |
| 20896 |
}]); |
| 20897 |
return BaseTheme2; |
| 20898 |
}(_theme2.default); |
| 20899 |
BaseTheme.DEFAULTS = (0, _extend2.default)(true, {}, _theme2.default.DEFAULTS, { |
| 20900 |
modules: { |
| 20901 |
toolbar: { |
| 20902 |
handlers: { |
| 20903 |
formula: function formula() { |
| 20904 |
this.quill.theme.tooltip.edit("formula"); |
| 20905 |
}, |
| 20906 |
image: function image() { |
| 20907 |
var _this3 = this; |
| 20908 |
var fileInput = this.container.querySelector("input.ql-image[type=file]"); |
| 20909 |
if (fileInput == null) { |
| 20910 |
fileInput = document.createElement("input"); |
| 20911 |
fileInput.setAttribute("type", "file"); |
| 20912 |
fileInput.setAttribute("accept", "image/png, image/gif, image/jpeg, image/bmp, image/x-icon"); |
| 20913 |
fileInput.classList.add("ql-image"); |
| 20914 |
fileInput.addEventListener("change", function() { |
| 20915 |
if (fileInput.files != null && fileInput.files[0] != null) { |
| 20916 |
var reader = new FileReader(); |
| 20917 |
reader.onload = function(e2) { |
| 20918 |
var range = _this3.quill.getSelection(true); |
| 20919 |
_this3.quill.updateContents(new _quillDelta2.default().retain(range.index).delete(range.length).insert({ image: e2.target.result }), _emitter2.default.sources.USER); |
| 20920 |
_this3.quill.setSelection(range.index + 1, _emitter2.default.sources.SILENT); |
| 20921 |
fileInput.value = ""; |
| 20922 |
}; |
| 20923 |
reader.readAsDataURL(fileInput.files[0]); |
| 20924 |
} |
| 20925 |
}); |
| 20926 |
this.container.appendChild(fileInput); |
| 20927 |
} |
| 20928 |
fileInput.click(); |
| 20929 |
}, |
| 20930 |
video: function video() { |
| 20931 |
this.quill.theme.tooltip.edit("video"); |
| 20932 |
} |
| 20933 |
} |
| 20934 |
} |
| 20935 |
} |
| 20936 |
}); |
| 20937 |
var BaseTooltip = function(_Tooltip) { |
| 20938 |
_inherits2(BaseTooltip2, _Tooltip); |
| 20939 |
function BaseTooltip2(quill2, boundsContainer) { |
| 20940 |
_classCallCheck2(this, BaseTooltip2); |
| 20941 |
var _this4 = _possibleConstructorReturn2(this, (BaseTooltip2.__proto__ || Object.getPrototypeOf(BaseTooltip2)).call(this, quill2, boundsContainer)); |
| 20942 |
_this4.textbox = _this4.root.querySelector('input[type="text"]'); |
| 20943 |
_this4.listen(); |
| 20944 |
return _this4; |
| 20945 |
} |
| 20946 |
_createClass2(BaseTooltip2, [{ |
| 20947 |
key: "listen", |
| 20948 |
value: function listen() { |
| 20949 |
var _this5 = this; |
| 20950 |
this.textbox.addEventListener("keydown", function(event) { |
| 20951 |
if (_keyboard2.default.match(event, "enter")) { |
| 20952 |
_this5.save(); |
| 20953 |
event.preventDefault(); |
| 20954 |
} else if (_keyboard2.default.match(event, "escape")) { |
| 20955 |
_this5.cancel(); |
| 20956 |
event.preventDefault(); |
| 20957 |
} |
| 20958 |
}); |
| 20959 |
} |
| 20960 |
}, { |
| 20961 |
key: "cancel", |
| 20962 |
value: function cancel() { |
| 20963 |
this.hide(); |
| 20964 |
} |
| 20965 |
}, { |
| 20966 |
key: "edit", |
| 20967 |
value: function edit() { |
| 20968 |
var mode = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "link"; |
| 20969 |
var preview = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null; |
| 20970 |
this.root.classList.remove("ql-hidden"); |
| 20971 |
this.root.classList.add("ql-editing"); |
| 20972 |
if (preview != null) { |
| 20973 |
this.textbox.value = preview; |
| 20974 |
} else if (mode !== this.root.getAttribute("data-mode")) { |
| 20975 |
this.textbox.value = ""; |
| 20976 |
} |
| 20977 |
this.position(this.quill.getBounds(this.quill.selection.savedRange)); |
| 20978 |
this.textbox.select(); |
| 20979 |
this.textbox.setAttribute("placeholder", this.textbox.getAttribute("data-" + mode) || ""); |
| 20980 |
this.root.setAttribute("data-mode", mode); |
| 20981 |
} |
| 20982 |
}, { |
| 20983 |
key: "restoreFocus", |
| 20984 |
value: function restoreFocus() { |
| 20985 |
var scrollTop = this.quill.scrollingContainer.scrollTop; |
| 20986 |
this.quill.focus(); |
| 20987 |
this.quill.scrollingContainer.scrollTop = scrollTop; |
| 20988 |
} |
| 20989 |
}, { |
| 20990 |
key: "save", |
| 20991 |
value: function save() { |
| 20992 |
var value = this.textbox.value; |
| 20993 |
switch (this.root.getAttribute("data-mode")) { |
| 20994 |
case "link": { |
| 20995 |
var scrollTop = this.quill.root.scrollTop; |
| 20996 |
if (this.linkRange) { |
| 20997 |
this.quill.formatText(this.linkRange, "link", value, _emitter2.default.sources.USER); |
| 20998 |
delete this.linkRange; |
| 20999 |
} else { |
| 21000 |
this.restoreFocus(); |
| 21001 |
this.quill.format("link", value, _emitter2.default.sources.USER); |
| 21002 |
} |
| 21003 |
this.quill.root.scrollTop = scrollTop; |
| 21004 |
break; |
| 21005 |
} |
| 21006 |
case "video": { |
| 21007 |
value = extractVideoUrl(value); |
| 21008 |
} |
| 21009 |
case "formula": { |
| 21010 |
if (!value) break; |
| 21011 |
var range = this.quill.getSelection(true); |
| 21012 |
if (range != null) { |
| 21013 |
var index = range.index + range.length; |
| 21014 |
this.quill.insertEmbed(index, this.root.getAttribute("data-mode"), value, _emitter2.default.sources.USER); |
| 21015 |
if (this.root.getAttribute("data-mode") === "formula") { |
| 21016 |
this.quill.insertText(index + 1, " ", _emitter2.default.sources.USER); |
| 21017 |
} |
| 21018 |
this.quill.setSelection(index + 2, _emitter2.default.sources.USER); |
| 21019 |
} |
| 21020 |
break; |
| 21021 |
} |
| 21022 |
} |
| 21023 |
this.textbox.value = ""; |
| 21024 |
this.hide(); |
| 21025 |
} |
| 21026 |
}]); |
| 21027 |
return BaseTooltip2; |
| 21028 |
}(_tooltip2.default); |
| 21029 |
function extractVideoUrl(url) { |
| 21030 |
var match = url.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/) || url.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/); |
| 21031 |
if (match) { |
| 21032 |
return (match[1] || "https") + "://www.youtube.com/embed/" + match[2] + "?showinfo=0"; |
| 21033 |
} |
| 21034 |
if (match = url.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/)) { |
| 21035 |
return (match[1] || "https") + "://player.vimeo.com/video/" + match[2] + "/"; |
| 21036 |
} |
| 21037 |
return url; |
| 21038 |
} |
| 21039 |
function fillSelect(select, values) { |
| 21040 |
var defaultValue = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false; |
| 21041 |
values.forEach(function(value) { |
| 21042 |
var option = document.createElement("option"); |
| 21043 |
if (value === defaultValue) { |
| 21044 |
option.setAttribute("selected", "selected"); |
| 21045 |
} else { |
| 21046 |
option.setAttribute("value", value); |
| 21047 |
} |
| 21048 |
select.appendChild(option); |
| 21049 |
}); |
| 21050 |
} |
| 21051 |
exports$12.BaseTooltip = BaseTooltip; |
| 21052 |
exports$12.default = BaseTheme; |
| 21053 |
}, |
| 21054 |
/* 44 */ |
| 21055 |
/***/ |
| 21056 |
function(module2, exports$12, __webpack_require__) { |
| 21057 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 21058 |
var LinkedList = ( |
| 21059 |
/** @class */ |
| 21060 |
function() { |
| 21061 |
function LinkedList2() { |
| 21062 |
this.head = this.tail = null; |
| 21063 |
this.length = 0; |
| 21064 |
} |
| 21065 |
LinkedList2.prototype.append = function() { |
| 21066 |
var nodes = []; |
| 21067 |
for (var _i2 = 0; _i2 < arguments.length; _i2++) { |
| 21068 |
nodes[_i2] = arguments[_i2]; |
| 21069 |
} |
| 21070 |
this.insertBefore(nodes[0], null); |
| 21071 |
if (nodes.length > 1) { |
| 21072 |
this.append.apply(this, nodes.slice(1)); |
| 21073 |
} |
| 21074 |
}; |
| 21075 |
LinkedList2.prototype.contains = function(node) { |
| 21076 |
var cur, next = this.iterator(); |
| 21077 |
while (cur = next()) { |
| 21078 |
if (cur === node) |
| 21079 |
return true; |
| 21080 |
} |
| 21081 |
return false; |
| 21082 |
}; |
| 21083 |
LinkedList2.prototype.insertBefore = function(node, refNode) { |
| 21084 |
if (!node) |
| 21085 |
return; |
| 21086 |
node.next = refNode; |
| 21087 |
if (refNode != null) { |
| 21088 |
node.prev = refNode.prev; |
| 21089 |
if (refNode.prev != null) { |
| 21090 |
refNode.prev.next = node; |
| 21091 |
} |
| 21092 |
refNode.prev = node; |
| 21093 |
if (refNode === this.head) { |
| 21094 |
this.head = node; |
| 21095 |
} |
| 21096 |
} else if (this.tail != null) { |
| 21097 |
this.tail.next = node; |
| 21098 |
node.prev = this.tail; |
| 21099 |
this.tail = node; |
| 21100 |
} else { |
| 21101 |
node.prev = null; |
| 21102 |
this.head = this.tail = node; |
| 21103 |
} |
| 21104 |
this.length += 1; |
| 21105 |
}; |
| 21106 |
LinkedList2.prototype.offset = function(target) { |
| 21107 |
var index = 0, cur = this.head; |
| 21108 |
while (cur != null) { |
| 21109 |
if (cur === target) |
| 21110 |
return index; |
| 21111 |
index += cur.length(); |
| 21112 |
cur = cur.next; |
| 21113 |
} |
| 21114 |
return -1; |
| 21115 |
}; |
| 21116 |
LinkedList2.prototype.remove = function(node) { |
| 21117 |
if (!this.contains(node)) |
| 21118 |
return; |
| 21119 |
if (node.prev != null) |
| 21120 |
node.prev.next = node.next; |
| 21121 |
if (node.next != null) |
| 21122 |
node.next.prev = node.prev; |
| 21123 |
if (node === this.head) |
| 21124 |
this.head = node.next; |
| 21125 |
if (node === this.tail) |
| 21126 |
this.tail = node.prev; |
| 21127 |
this.length -= 1; |
| 21128 |
}; |
| 21129 |
LinkedList2.prototype.iterator = function(curNode) { |
| 21130 |
if (curNode === void 0) { |
| 21131 |
curNode = this.head; |
| 21132 |
} |
| 21133 |
return function() { |
| 21134 |
var ret = curNode; |
| 21135 |
if (curNode != null) |
| 21136 |
curNode = curNode.next; |
| 21137 |
return ret; |
| 21138 |
}; |
| 21139 |
}; |
| 21140 |
LinkedList2.prototype.find = function(index, inclusive) { |
| 21141 |
if (inclusive === void 0) { |
| 21142 |
inclusive = false; |
| 21143 |
} |
| 21144 |
var cur, next = this.iterator(); |
| 21145 |
while (cur = next()) { |
| 21146 |
var length = cur.length(); |
| 21147 |
if (index < length || inclusive && index === length && (cur.next == null || cur.next.length() !== 0)) { |
| 21148 |
return [cur, index]; |
| 21149 |
} |
| 21150 |
index -= length; |
| 21151 |
} |
| 21152 |
return [null, 0]; |
| 21153 |
}; |
| 21154 |
LinkedList2.prototype.forEach = function(callback) { |
| 21155 |
var cur, next = this.iterator(); |
| 21156 |
while (cur = next()) { |
| 21157 |
callback(cur); |
| 21158 |
} |
| 21159 |
}; |
| 21160 |
LinkedList2.prototype.forEachAt = function(index, length, callback) { |
| 21161 |
if (length <= 0) |
| 21162 |
return; |
| 21163 |
var _a2 = this.find(index), startNode = _a2[0], offset = _a2[1]; |
| 21164 |
var cur, curIndex = index - offset, next = this.iterator(startNode); |
| 21165 |
while ((cur = next()) && curIndex < index + length) { |
| 21166 |
var curLength = cur.length(); |
| 21167 |
if (index > curIndex) { |
| 21168 |
callback(cur, index - curIndex, Math.min(length, curIndex + curLength - index)); |
| 21169 |
} else { |
| 21170 |
callback(cur, 0, Math.min(curLength, index + length - curIndex)); |
| 21171 |
} |
| 21172 |
curIndex += curLength; |
| 21173 |
} |
| 21174 |
}; |
| 21175 |
LinkedList2.prototype.map = function(callback) { |
| 21176 |
return this.reduce(function(memo, cur) { |
| 21177 |
memo.push(callback(cur)); |
| 21178 |
return memo; |
| 21179 |
}, []); |
| 21180 |
}; |
| 21181 |
LinkedList2.prototype.reduce = function(callback, memo) { |
| 21182 |
var cur, next = this.iterator(); |
| 21183 |
while (cur = next()) { |
| 21184 |
memo = callback(memo, cur); |
| 21185 |
} |
| 21186 |
return memo; |
| 21187 |
}; |
| 21188 |
return LinkedList2; |
| 21189 |
}() |
| 21190 |
); |
| 21191 |
exports$12.default = LinkedList; |
| 21192 |
}, |
| 21193 |
/* 45 */ |
| 21194 |
/***/ |
| 21195 |
function(module2, exports$12, __webpack_require__) { |
| 21196 |
var __extends2 = this && this.__extends || function() { |
| 21197 |
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { |
| 21198 |
d2.__proto__ = b2; |
| 21199 |
} || function(d2, b2) { |
| 21200 |
for (var p2 in b2) if (b2.hasOwnProperty(p2)) d2[p2] = b2[p2]; |
| 21201 |
}; |
| 21202 |
return function(d2, b2) { |
| 21203 |
extendStatics(d2, b2); |
| 21204 |
function __() { |
| 21205 |
this.constructor = d2; |
| 21206 |
} |
| 21207 |
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __()); |
| 21208 |
}; |
| 21209 |
}(); |
| 21210 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 21211 |
var container_1 = __webpack_require__(17); |
| 21212 |
var Registry = __webpack_require__(1); |
| 21213 |
var OBSERVER_CONFIG = { |
| 21214 |
attributes: true, |
| 21215 |
characterData: true, |
| 21216 |
characterDataOldValue: true, |
| 21217 |
childList: true, |
| 21218 |
subtree: true |
| 21219 |
}; |
| 21220 |
var MAX_OPTIMIZE_ITERATIONS = 100; |
| 21221 |
var ScrollBlot = ( |
| 21222 |
/** @class */ |
| 21223 |
function(_super) { |
| 21224 |
__extends2(ScrollBlot2, _super); |
| 21225 |
function ScrollBlot2(node) { |
| 21226 |
var _this = _super.call(this, node) || this; |
| 21227 |
_this.scroll = _this; |
| 21228 |
_this.observer = new MutationObserver(function(mutations) { |
| 21229 |
_this.update(mutations); |
| 21230 |
}); |
| 21231 |
_this.observer.observe(_this.domNode, OBSERVER_CONFIG); |
| 21232 |
_this.attach(); |
| 21233 |
return _this; |
| 21234 |
} |
| 21235 |
ScrollBlot2.prototype.detach = function() { |
| 21236 |
_super.prototype.detach.call(this); |
| 21237 |
this.observer.disconnect(); |
| 21238 |
}; |
| 21239 |
ScrollBlot2.prototype.deleteAt = function(index, length) { |
| 21240 |
this.update(); |
| 21241 |
if (index === 0 && length === this.length()) { |
| 21242 |
this.children.forEach(function(child) { |
| 21243 |
child.remove(); |
| 21244 |
}); |
| 21245 |
} else { |
| 21246 |
_super.prototype.deleteAt.call(this, index, length); |
| 21247 |
} |
| 21248 |
}; |
| 21249 |
ScrollBlot2.prototype.formatAt = function(index, length, name, value) { |
| 21250 |
this.update(); |
| 21251 |
_super.prototype.formatAt.call(this, index, length, name, value); |
| 21252 |
}; |
| 21253 |
ScrollBlot2.prototype.insertAt = function(index, value, def) { |
| 21254 |
this.update(); |
| 21255 |
_super.prototype.insertAt.call(this, index, value, def); |
| 21256 |
}; |
| 21257 |
ScrollBlot2.prototype.optimize = function(mutations, context) { |
| 21258 |
var _this = this; |
| 21259 |
if (mutations === void 0) { |
| 21260 |
mutations = []; |
| 21261 |
} |
| 21262 |
if (context === void 0) { |
| 21263 |
context = {}; |
| 21264 |
} |
| 21265 |
_super.prototype.optimize.call(this, context); |
| 21266 |
var records = [].slice.call(this.observer.takeRecords()); |
| 21267 |
while (records.length > 0) |
| 21268 |
mutations.push(records.pop()); |
| 21269 |
var mark = function(blot, markParent) { |
| 21270 |
if (markParent === void 0) { |
| 21271 |
markParent = true; |
| 21272 |
} |
| 21273 |
if (blot == null || blot === _this) |
| 21274 |
return; |
| 21275 |
if (blot.domNode.parentNode == null) |
| 21276 |
return; |
| 21277 |
if (blot.domNode[Registry.DATA_KEY].mutations == null) { |
| 21278 |
blot.domNode[Registry.DATA_KEY].mutations = []; |
| 21279 |
} |
| 21280 |
if (markParent) |
| 21281 |
mark(blot.parent); |
| 21282 |
}; |
| 21283 |
var optimize = function(blot) { |
| 21284 |
if ( |
| 21285 |
// @ts-ignore |
| 21286 |
blot.domNode[Registry.DATA_KEY] == null || // @ts-ignore |
| 21287 |
blot.domNode[Registry.DATA_KEY].mutations == null |
| 21288 |
) { |
| 21289 |
return; |
| 21290 |
} |
| 21291 |
if (blot instanceof container_1.default) { |
| 21292 |
blot.children.forEach(optimize); |
| 21293 |
} |
| 21294 |
blot.optimize(context); |
| 21295 |
}; |
| 21296 |
var remaining = mutations; |
| 21297 |
for (var i = 0; remaining.length > 0; i += 1) { |
| 21298 |
if (i >= MAX_OPTIMIZE_ITERATIONS) { |
| 21299 |
throw new Error("[Parchment] Maximum optimize iterations reached"); |
| 21300 |
} |
| 21301 |
remaining.forEach(function(mutation) { |
| 21302 |
var blot = Registry.find(mutation.target, true); |
| 21303 |
if (blot == null) |
| 21304 |
return; |
| 21305 |
if (blot.domNode === mutation.target) { |
| 21306 |
if (mutation.type === "childList") { |
| 21307 |
mark(Registry.find(mutation.previousSibling, false)); |
| 21308 |
[].forEach.call(mutation.addedNodes, function(node) { |
| 21309 |
var child = Registry.find(node, false); |
| 21310 |
mark(child, false); |
| 21311 |
if (child instanceof container_1.default) { |
| 21312 |
child.children.forEach(function(grandChild) { |
| 21313 |
mark(grandChild, false); |
| 21314 |
}); |
| 21315 |
} |
| 21316 |
}); |
| 21317 |
} else if (mutation.type === "attributes") { |
| 21318 |
mark(blot.prev); |
| 21319 |
} |
| 21320 |
} |
| 21321 |
mark(blot); |
| 21322 |
}); |
| 21323 |
this.children.forEach(optimize); |
| 21324 |
remaining = [].slice.call(this.observer.takeRecords()); |
| 21325 |
records = remaining.slice(); |
| 21326 |
while (records.length > 0) |
| 21327 |
mutations.push(records.pop()); |
| 21328 |
} |
| 21329 |
}; |
| 21330 |
ScrollBlot2.prototype.update = function(mutations, context) { |
| 21331 |
var _this = this; |
| 21332 |
if (context === void 0) { |
| 21333 |
context = {}; |
| 21334 |
} |
| 21335 |
mutations = mutations || this.observer.takeRecords(); |
| 21336 |
mutations.map(function(mutation) { |
| 21337 |
var blot = Registry.find(mutation.target, true); |
| 21338 |
if (blot == null) |
| 21339 |
return null; |
| 21340 |
if (blot.domNode[Registry.DATA_KEY].mutations == null) { |
| 21341 |
blot.domNode[Registry.DATA_KEY].mutations = [mutation]; |
| 21342 |
return blot; |
| 21343 |
} else { |
| 21344 |
blot.domNode[Registry.DATA_KEY].mutations.push(mutation); |
| 21345 |
return null; |
| 21346 |
} |
| 21347 |
}).forEach(function(blot) { |
| 21348 |
if (blot == null || blot === _this || //@ts-ignore |
| 21349 |
blot.domNode[Registry.DATA_KEY] == null) |
| 21350 |
return; |
| 21351 |
blot.update(blot.domNode[Registry.DATA_KEY].mutations || [], context); |
| 21352 |
}); |
| 21353 |
if (this.domNode[Registry.DATA_KEY].mutations != null) { |
| 21354 |
_super.prototype.update.call(this, this.domNode[Registry.DATA_KEY].mutations, context); |
| 21355 |
} |
| 21356 |
this.optimize(mutations, context); |
| 21357 |
}; |
| 21358 |
ScrollBlot2.blotName = "scroll"; |
| 21359 |
ScrollBlot2.defaultChild = "block"; |
| 21360 |
ScrollBlot2.scope = Registry.Scope.BLOCK_BLOT; |
| 21361 |
ScrollBlot2.tagName = "DIV"; |
| 21362 |
return ScrollBlot2; |
| 21363 |
}(container_1.default) |
| 21364 |
); |
| 21365 |
exports$12.default = ScrollBlot; |
| 21366 |
}, |
| 21367 |
/* 46 */ |
| 21368 |
/***/ |
| 21369 |
function(module2, exports$12, __webpack_require__) { |
| 21370 |
var __extends2 = this && this.__extends || function() { |
| 21371 |
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { |
| 21372 |
d2.__proto__ = b2; |
| 21373 |
} || function(d2, b2) { |
| 21374 |
for (var p2 in b2) if (b2.hasOwnProperty(p2)) d2[p2] = b2[p2]; |
| 21375 |
}; |
| 21376 |
return function(d2, b2) { |
| 21377 |
extendStatics(d2, b2); |
| 21378 |
function __() { |
| 21379 |
this.constructor = d2; |
| 21380 |
} |
| 21381 |
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __()); |
| 21382 |
}; |
| 21383 |
}(); |
| 21384 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 21385 |
var format_1 = __webpack_require__(18); |
| 21386 |
var Registry = __webpack_require__(1); |
| 21387 |
function isEqual2(obj1, obj2) { |
| 21388 |
if (Object.keys(obj1).length !== Object.keys(obj2).length) |
| 21389 |
return false; |
| 21390 |
for (var prop in obj1) { |
| 21391 |
if (obj1[prop] !== obj2[prop]) |
| 21392 |
return false; |
| 21393 |
} |
| 21394 |
return true; |
| 21395 |
} |
| 21396 |
var InlineBlot = ( |
| 21397 |
/** @class */ |
| 21398 |
function(_super) { |
| 21399 |
__extends2(InlineBlot2, _super); |
| 21400 |
function InlineBlot2() { |
| 21401 |
return _super !== null && _super.apply(this, arguments) || this; |
| 21402 |
} |
| 21403 |
InlineBlot2.formats = function(domNode) { |
| 21404 |
if (domNode.tagName === InlineBlot2.tagName) |
| 21405 |
return void 0; |
| 21406 |
return _super.formats.call(this, domNode); |
| 21407 |
}; |
| 21408 |
InlineBlot2.prototype.format = function(name, value) { |
| 21409 |
var _this = this; |
| 21410 |
if (name === this.statics.blotName && !value) { |
| 21411 |
this.children.forEach(function(child) { |
| 21412 |
if (!(child instanceof format_1.default)) { |
| 21413 |
child = child.wrap(InlineBlot2.blotName, true); |
| 21414 |
} |
| 21415 |
_this.attributes.copy(child); |
| 21416 |
}); |
| 21417 |
this.unwrap(); |
| 21418 |
} else { |
| 21419 |
_super.prototype.format.call(this, name, value); |
| 21420 |
} |
| 21421 |
}; |
| 21422 |
InlineBlot2.prototype.formatAt = function(index, length, name, value) { |
| 21423 |
if (this.formats()[name] != null || Registry.query(name, Registry.Scope.ATTRIBUTE)) { |
| 21424 |
var blot = this.isolate(index, length); |
| 21425 |
blot.format(name, value); |
| 21426 |
} else { |
| 21427 |
_super.prototype.formatAt.call(this, index, length, name, value); |
| 21428 |
} |
| 21429 |
}; |
| 21430 |
InlineBlot2.prototype.optimize = function(context) { |
| 21431 |
_super.prototype.optimize.call(this, context); |
| 21432 |
var formats = this.formats(); |
| 21433 |
if (Object.keys(formats).length === 0) { |
| 21434 |
return this.unwrap(); |
| 21435 |
} |
| 21436 |
var next = this.next; |
| 21437 |
if (next instanceof InlineBlot2 && next.prev === this && isEqual2(formats, next.formats())) { |
| 21438 |
next.moveChildren(this); |
| 21439 |
next.remove(); |
| 21440 |
} |
| 21441 |
}; |
| 21442 |
InlineBlot2.blotName = "inline"; |
| 21443 |
InlineBlot2.scope = Registry.Scope.INLINE_BLOT; |
| 21444 |
InlineBlot2.tagName = "SPAN"; |
| 21445 |
return InlineBlot2; |
| 21446 |
}(format_1.default) |
| 21447 |
); |
| 21448 |
exports$12.default = InlineBlot; |
| 21449 |
}, |
| 21450 |
/* 47 */ |
| 21451 |
/***/ |
| 21452 |
function(module2, exports$12, __webpack_require__) { |
| 21453 |
var __extends2 = this && this.__extends || function() { |
| 21454 |
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { |
| 21455 |
d2.__proto__ = b2; |
| 21456 |
} || function(d2, b2) { |
| 21457 |
for (var p2 in b2) if (b2.hasOwnProperty(p2)) d2[p2] = b2[p2]; |
| 21458 |
}; |
| 21459 |
return function(d2, b2) { |
| 21460 |
extendStatics(d2, b2); |
| 21461 |
function __() { |
| 21462 |
this.constructor = d2; |
| 21463 |
} |
| 21464 |
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __()); |
| 21465 |
}; |
| 21466 |
}(); |
| 21467 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 21468 |
var format_1 = __webpack_require__(18); |
| 21469 |
var Registry = __webpack_require__(1); |
| 21470 |
var BlockBlot = ( |
| 21471 |
/** @class */ |
| 21472 |
function(_super) { |
| 21473 |
__extends2(BlockBlot2, _super); |
| 21474 |
function BlockBlot2() { |
| 21475 |
return _super !== null && _super.apply(this, arguments) || this; |
| 21476 |
} |
| 21477 |
BlockBlot2.formats = function(domNode) { |
| 21478 |
var tagName = Registry.query(BlockBlot2.blotName).tagName; |
| 21479 |
if (domNode.tagName === tagName) |
| 21480 |
return void 0; |
| 21481 |
return _super.formats.call(this, domNode); |
| 21482 |
}; |
| 21483 |
BlockBlot2.prototype.format = function(name, value) { |
| 21484 |
if (Registry.query(name, Registry.Scope.BLOCK) == null) { |
| 21485 |
return; |
| 21486 |
} else if (name === this.statics.blotName && !value) { |
| 21487 |
this.replaceWith(BlockBlot2.blotName); |
| 21488 |
} else { |
| 21489 |
_super.prototype.format.call(this, name, value); |
| 21490 |
} |
| 21491 |
}; |
| 21492 |
BlockBlot2.prototype.formatAt = function(index, length, name, value) { |
| 21493 |
if (Registry.query(name, Registry.Scope.BLOCK) != null) { |
| 21494 |
this.format(name, value); |
| 21495 |
} else { |
| 21496 |
_super.prototype.formatAt.call(this, index, length, name, value); |
| 21497 |
} |
| 21498 |
}; |
| 21499 |
BlockBlot2.prototype.insertAt = function(index, value, def) { |
| 21500 |
if (def == null || Registry.query(value, Registry.Scope.INLINE) != null) { |
| 21501 |
_super.prototype.insertAt.call(this, index, value, def); |
| 21502 |
} else { |
| 21503 |
var after = this.split(index); |
| 21504 |
var blot = Registry.create(value, def); |
| 21505 |
after.parent.insertBefore(blot, after); |
| 21506 |
} |
| 21507 |
}; |
| 21508 |
BlockBlot2.prototype.update = function(mutations, context) { |
| 21509 |
if (navigator.userAgent.match(/Trident/)) { |
| 21510 |
this.build(); |
| 21511 |
} else { |
| 21512 |
_super.prototype.update.call(this, mutations, context); |
| 21513 |
} |
| 21514 |
}; |
| 21515 |
BlockBlot2.blotName = "block"; |
| 21516 |
BlockBlot2.scope = Registry.Scope.BLOCK_BLOT; |
| 21517 |
BlockBlot2.tagName = "P"; |
| 21518 |
return BlockBlot2; |
| 21519 |
}(format_1.default) |
| 21520 |
); |
| 21521 |
exports$12.default = BlockBlot; |
| 21522 |
}, |
| 21523 |
/* 48 */ |
| 21524 |
/***/ |
| 21525 |
function(module2, exports$12, __webpack_require__) { |
| 21526 |
var __extends2 = this && this.__extends || function() { |
| 21527 |
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { |
| 21528 |
d2.__proto__ = b2; |
| 21529 |
} || function(d2, b2) { |
| 21530 |
for (var p2 in b2) if (b2.hasOwnProperty(p2)) d2[p2] = b2[p2]; |
| 21531 |
}; |
| 21532 |
return function(d2, b2) { |
| 21533 |
extendStatics(d2, b2); |
| 21534 |
function __() { |
| 21535 |
this.constructor = d2; |
| 21536 |
} |
| 21537 |
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __()); |
| 21538 |
}; |
| 21539 |
}(); |
| 21540 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 21541 |
var leaf_1 = __webpack_require__(19); |
| 21542 |
var EmbedBlot = ( |
| 21543 |
/** @class */ |
| 21544 |
function(_super) { |
| 21545 |
__extends2(EmbedBlot2, _super); |
| 21546 |
function EmbedBlot2() { |
| 21547 |
return _super !== null && _super.apply(this, arguments) || this; |
| 21548 |
} |
| 21549 |
EmbedBlot2.formats = function(domNode) { |
| 21550 |
return void 0; |
| 21551 |
}; |
| 21552 |
EmbedBlot2.prototype.format = function(name, value) { |
| 21553 |
_super.prototype.formatAt.call(this, 0, this.length(), name, value); |
| 21554 |
}; |
| 21555 |
EmbedBlot2.prototype.formatAt = function(index, length, name, value) { |
| 21556 |
if (index === 0 && length === this.length()) { |
| 21557 |
this.format(name, value); |
| 21558 |
} else { |
| 21559 |
_super.prototype.formatAt.call(this, index, length, name, value); |
| 21560 |
} |
| 21561 |
}; |
| 21562 |
EmbedBlot2.prototype.formats = function() { |
| 21563 |
return this.statics.formats(this.domNode); |
| 21564 |
}; |
| 21565 |
return EmbedBlot2; |
| 21566 |
}(leaf_1.default) |
| 21567 |
); |
| 21568 |
exports$12.default = EmbedBlot; |
| 21569 |
}, |
| 21570 |
/* 49 */ |
| 21571 |
/***/ |
| 21572 |
function(module2, exports$12, __webpack_require__) { |
| 21573 |
var __extends2 = this && this.__extends || function() { |
| 21574 |
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { |
| 21575 |
d2.__proto__ = b2; |
| 21576 |
} || function(d2, b2) { |
| 21577 |
for (var p2 in b2) if (b2.hasOwnProperty(p2)) d2[p2] = b2[p2]; |
| 21578 |
}; |
| 21579 |
return function(d2, b2) { |
| 21580 |
extendStatics(d2, b2); |
| 21581 |
function __() { |
| 21582 |
this.constructor = d2; |
| 21583 |
} |
| 21584 |
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __()); |
| 21585 |
}; |
| 21586 |
}(); |
| 21587 |
Object.defineProperty(exports$12, "__esModule", { value: true }); |
| 21588 |
var leaf_1 = __webpack_require__(19); |
| 21589 |
var Registry = __webpack_require__(1); |
| 21590 |
var TextBlot = ( |
| 21591 |
/** @class */ |
| 21592 |
function(_super) { |
| 21593 |
__extends2(TextBlot2, _super); |
| 21594 |
function TextBlot2(node) { |
| 21595 |
var _this = _super.call(this, node) || this; |
| 21596 |
_this.text = _this.statics.value(_this.domNode); |
| 21597 |
return _this; |
| 21598 |
} |
| 21599 |
TextBlot2.create = function(value) { |
| 21600 |
return document.createTextNode(value); |
| 21601 |
}; |
| 21602 |
TextBlot2.value = function(domNode) { |
| 21603 |
var text = domNode.data; |
| 21604 |
if (text["normalize"]) |
| 21605 |
text = text["normalize"](); |
| 21606 |
return text; |
| 21607 |
}; |
| 21608 |
TextBlot2.prototype.deleteAt = function(index, length) { |
| 21609 |
this.domNode.data = this.text = this.text.slice(0, index) + this.text.slice(index + length); |
| 21610 |
}; |
| 21611 |
TextBlot2.prototype.index = function(node, offset) { |
| 21612 |
if (this.domNode === node) { |
| 21613 |
return offset; |
| 21614 |
} |
| 21615 |
return -1; |
| 21616 |
}; |
| 21617 |
TextBlot2.prototype.insertAt = function(index, value, def) { |
| 21618 |
if (def == null) { |
| 21619 |
this.text = this.text.slice(0, index) + value + this.text.slice(index); |
| 21620 |
this.domNode.data = this.text; |
| 21621 |
} else { |
| 21622 |
_super.prototype.insertAt.call(this, index, value, def); |
| 21623 |
} |
| 21624 |
}; |
| 21625 |
TextBlot2.prototype.length = function() { |
| 21626 |
return this.text.length; |
| 21627 |
}; |
| 21628 |
TextBlot2.prototype.optimize = function(context) { |
| 21629 |
_super.prototype.optimize.call(this, context); |
| 21630 |
this.text = this.statics.value(this.domNode); |
| 21631 |
if (this.text.length === 0) { |
| 21632 |
this.remove(); |
| 21633 |
} else if (this.next instanceof TextBlot2 && this.next.prev === this) { |
| 21634 |
this.insertAt(this.length(), this.next.value()); |
| 21635 |
this.next.remove(); |
| 21636 |
} |
| 21637 |
}; |
| 21638 |
TextBlot2.prototype.position = function(index, inclusive) { |
| 21639 |
return [this.domNode, index]; |
| 21640 |
}; |
| 21641 |
TextBlot2.prototype.split = function(index, force) { |
| 21642 |
if (force === void 0) { |
| 21643 |
force = false; |
| 21644 |
} |
| 21645 |
if (!force) { |
| 21646 |
if (index === 0) |
| 21647 |
return this; |
| 21648 |
if (index === this.length()) |
| 21649 |
return this.next; |
| 21650 |
} |
| 21651 |
var after = Registry.create(this.domNode.splitText(index)); |
| 21652 |
this.parent.insertBefore(after, this.next); |
| 21653 |
this.text = this.statics.value(this.domNode); |
| 21654 |
return after; |
| 21655 |
}; |
| 21656 |
TextBlot2.prototype.update = function(mutations, context) { |
| 21657 |
var _this = this; |
| 21658 |
if (mutations.some(function(mutation) { |
| 21659 |
return mutation.type === "characterData" && mutation.target === _this.domNode; |
| 21660 |
})) { |
| 21661 |
this.text = this.statics.value(this.domNode); |
| 21662 |
} |
| 21663 |
}; |
| 21664 |
TextBlot2.prototype.value = function() { |
| 21665 |
return this.text; |
| 21666 |
}; |
| 21667 |
TextBlot2.blotName = "text"; |
| 21668 |
TextBlot2.scope = Registry.Scope.INLINE_BLOT; |
| 21669 |
return TextBlot2; |
| 21670 |
}(leaf_1.default) |
| 21671 |
); |
| 21672 |
exports$12.default = TextBlot; |
| 21673 |
}, |
| 21674 |
/* 50 */ |
| 21675 |
/***/ |
| 21676 |
function(module2, exports$12, __webpack_require__) { |
| 21677 |
var elem = document.createElement("div"); |
| 21678 |
elem.classList.toggle("test-class", false); |
| 21679 |
if (elem.classList.contains("test-class")) { |
| 21680 |
var _toggle = DOMTokenList.prototype.toggle; |
| 21681 |
DOMTokenList.prototype.toggle = function(token, force) { |
| 21682 |
if (arguments.length > 1 && !this.contains(token) === !force) { |
| 21683 |
return force; |
| 21684 |
} else { |
| 21685 |
return _toggle.call(this, token); |
| 21686 |
} |
| 21687 |
}; |
| 21688 |
} |
| 21689 |
if (!String.prototype.startsWith) { |
| 21690 |
String.prototype.startsWith = function(searchString, position) { |
| 21691 |
position = position || 0; |
| 21692 |
return this.substr(position, searchString.length) === searchString; |
| 21693 |
}; |
| 21694 |
} |
| 21695 |
if (!String.prototype.endsWith) { |
| 21696 |
String.prototype.endsWith = function(searchString, position) { |
| 21697 |
var subjectString = this.toString(); |
| 21698 |
if (typeof position !== "number" || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) { |
| 21699 |
position = subjectString.length; |
| 21700 |
} |
| 21701 |
position -= searchString.length; |
| 21702 |
var lastIndex = subjectString.indexOf(searchString, position); |
| 21703 |
return lastIndex !== -1 && lastIndex === position; |
| 21704 |
}; |
| 21705 |
} |
| 21706 |
if (!Array.prototype.find) { |
| 21707 |
Object.defineProperty(Array.prototype, "find", { |
| 21708 |
value: function value(predicate) { |
| 21709 |
if (this === null) { |
| 21710 |
throw new TypeError("Array.prototype.find called on null or undefined"); |
| 21711 |
} |
| 21712 |
if (typeof predicate !== "function") { |
| 21713 |
throw new TypeError("predicate must be a function"); |
| 21714 |
} |
| 21715 |
var list = Object(this); |
| 21716 |
var length = list.length >>> 0; |
| 21717 |
var thisArg = arguments[1]; |
| 21718 |
var value2; |
| 21719 |
for (var i = 0; i < length; i++) { |
| 21720 |
value2 = list[i]; |
| 21721 |
if (predicate.call(thisArg, value2, i, list)) { |
| 21722 |
return value2; |
| 21723 |
} |
| 21724 |
} |
| 21725 |
return void 0; |
| 21726 |
} |
| 21727 |
}); |
| 21728 |
} |
| 21729 |
document.addEventListener("DOMContentLoaded", function() { |
| 21730 |
document.execCommand("enableObjectResizing", false, false); |
| 21731 |
document.execCommand("autoUrlDetect", false, false); |
| 21732 |
}); |
| 21733 |
}, |
| 21734 |
/* 51 */ |
| 21735 |
/***/ |
| 21736 |
function(module2, exports$12) { |
| 21737 |
var DIFF_DELETE = -1; |
| 21738 |
var DIFF_INSERT = 1; |
| 21739 |
var DIFF_EQUAL = 0; |
| 21740 |
function diff_main(text1, text2, cursor_pos) { |
| 21741 |
if (text1 == text2) { |
| 21742 |
if (text1) { |
| 21743 |
return [[DIFF_EQUAL, text1]]; |
| 21744 |
} |
| 21745 |
return []; |
| 21746 |
} |
| 21747 |
if (cursor_pos < 0 || text1.length < cursor_pos) { |
| 21748 |
cursor_pos = null; |
| 21749 |
} |
| 21750 |
var commonlength = diff_commonPrefix(text1, text2); |
| 21751 |
var commonprefix = text1.substring(0, commonlength); |
| 21752 |
text1 = text1.substring(commonlength); |
| 21753 |
text2 = text2.substring(commonlength); |
| 21754 |
commonlength = diff_commonSuffix(text1, text2); |
| 21755 |
var commonsuffix = text1.substring(text1.length - commonlength); |
| 21756 |
text1 = text1.substring(0, text1.length - commonlength); |
| 21757 |
text2 = text2.substring(0, text2.length - commonlength); |
| 21758 |
var diffs = diff_compute_(text1, text2); |
| 21759 |
if (commonprefix) { |
| 21760 |
diffs.unshift([DIFF_EQUAL, commonprefix]); |
| 21761 |
} |
| 21762 |
if (commonsuffix) { |
| 21763 |
diffs.push([DIFF_EQUAL, commonsuffix]); |
| 21764 |
} |
| 21765 |
diff_cleanupMerge(diffs); |
| 21766 |
if (cursor_pos != null) { |
| 21767 |
diffs = fix_cursor(diffs, cursor_pos); |
| 21768 |
} |
| 21769 |
diffs = fix_emoji(diffs); |
| 21770 |
return diffs; |
| 21771 |
} |
| 21772 |
function diff_compute_(text1, text2) { |
| 21773 |
var diffs; |
| 21774 |
if (!text1) { |
| 21775 |
return [[DIFF_INSERT, text2]]; |
| 21776 |
} |
| 21777 |
if (!text2) { |
| 21778 |
return [[DIFF_DELETE, text1]]; |
| 21779 |
} |
| 21780 |
var longtext = text1.length > text2.length ? text1 : text2; |
| 21781 |
var shorttext = text1.length > text2.length ? text2 : text1; |
| 21782 |
var i = longtext.indexOf(shorttext); |
| 21783 |
if (i != -1) { |
| 21784 |
diffs = [ |
| 21785 |
[DIFF_INSERT, longtext.substring(0, i)], |
| 21786 |
[DIFF_EQUAL, shorttext], |
| 21787 |
[DIFF_INSERT, longtext.substring(i + shorttext.length)] |
| 21788 |
]; |
| 21789 |
if (text1.length > text2.length) { |
| 21790 |
diffs[0][0] = diffs[2][0] = DIFF_DELETE; |
| 21791 |
} |
| 21792 |
return diffs; |
| 21793 |
} |
| 21794 |
if (shorttext.length == 1) { |
| 21795 |
return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]]; |
| 21796 |
} |
| 21797 |
var hm = diff_halfMatch_(text1, text2); |
| 21798 |
if (hm) { |
| 21799 |
var text1_a = hm[0]; |
| 21800 |
var text1_b = hm[1]; |
| 21801 |
var text2_a = hm[2]; |
| 21802 |
var text2_b = hm[3]; |
| 21803 |
var mid_common = hm[4]; |
| 21804 |
var diffs_a = diff_main(text1_a, text2_a); |
| 21805 |
var diffs_b = diff_main(text1_b, text2_b); |
| 21806 |
return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b); |
| 21807 |
} |
| 21808 |
return diff_bisect_(text1, text2); |
| 21809 |
} |
| 21810 |
function diff_bisect_(text1, text2) { |
| 21811 |
var text1_length = text1.length; |
| 21812 |
var text2_length = text2.length; |
| 21813 |
var max_d = Math.ceil((text1_length + text2_length) / 2); |
| 21814 |
var v_offset = max_d; |
| 21815 |
var v_length = 2 * max_d; |
| 21816 |
var v1 = new Array(v_length); |
| 21817 |
var v2 = new Array(v_length); |
| 21818 |
for (var x2 = 0; x2 < v_length; x2++) { |
| 21819 |
v1[x2] = -1; |
| 21820 |
v2[x2] = -1; |
| 21821 |
} |
| 21822 |
v1[v_offset + 1] = 0; |
| 21823 |
v2[v_offset + 1] = 0; |
| 21824 |
var delta = text1_length - text2_length; |
| 21825 |
var front = delta % 2 != 0; |
| 21826 |
var k1start = 0; |
| 21827 |
var k1end = 0; |
| 21828 |
var k2start = 0; |
| 21829 |
var k2end = 0; |
| 21830 |
for (var d2 = 0; d2 < max_d; d2++) { |
| 21831 |
for (var k1 = -d2 + k1start; k1 <= d2 - k1end; k1 += 2) { |
| 21832 |
var k1_offset = v_offset + k1; |
| 21833 |
var x1; |
| 21834 |
if (k1 == -d2 || k1 != d2 && v1[k1_offset - 1] < v1[k1_offset + 1]) { |
| 21835 |
x1 = v1[k1_offset + 1]; |
| 21836 |
} else { |
| 21837 |
x1 = v1[k1_offset - 1] + 1; |
| 21838 |
} |
| 21839 |
var y1 = x1 - k1; |
| 21840 |
while (x1 < text1_length && y1 < text2_length && text1.charAt(x1) == text2.charAt(y1)) { |
| 21841 |
x1++; |
| 21842 |
y1++; |
| 21843 |
} |
| 21844 |
v1[k1_offset] = x1; |
| 21845 |
if (x1 > text1_length) { |
| 21846 |
k1end += 2; |
| 21847 |
} else if (y1 > text2_length) { |
| 21848 |
k1start += 2; |
| 21849 |
} else if (front) { |
| 21850 |
var k2_offset = v_offset + delta - k1; |
| 21851 |
if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] != -1) { |
| 21852 |
var x22 = text1_length - v2[k2_offset]; |
| 21853 |
if (x1 >= x22) { |
| 21854 |
return diff_bisectSplit_(text1, text2, x1, y1); |
| 21855 |
} |
| 21856 |
} |
| 21857 |
} |
| 21858 |
} |
| 21859 |
for (var k2 = -d2 + k2start; k2 <= d2 - k2end; k2 += 2) { |
| 21860 |
var k2_offset = v_offset + k2; |
| 21861 |
var x22; |
| 21862 |
if (k2 == -d2 || k2 != d2 && v2[k2_offset - 1] < v2[k2_offset + 1]) { |
| 21863 |
x22 = v2[k2_offset + 1]; |
| 21864 |
} else { |
| 21865 |
x22 = v2[k2_offset - 1] + 1; |
| 21866 |
} |
| 21867 |
var y2 = x22 - k2; |
| 21868 |
while (x22 < text1_length && y2 < text2_length && text1.charAt(text1_length - x22 - 1) == text2.charAt(text2_length - y2 - 1)) { |
| 21869 |
x22++; |
| 21870 |
y2++; |
| 21871 |
} |
| 21872 |
v2[k2_offset] = x22; |
| 21873 |
if (x22 > text1_length) { |
| 21874 |
k2end += 2; |
| 21875 |
} else if (y2 > text2_length) { |
| 21876 |
k2start += 2; |
| 21877 |
} else if (!front) { |
| 21878 |
var k1_offset = v_offset + delta - k2; |
| 21879 |
if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] != -1) { |
| 21880 |
var x1 = v1[k1_offset]; |
| 21881 |
var y1 = v_offset + x1 - k1_offset; |
| 21882 |
x22 = text1_length - x22; |
| 21883 |
if (x1 >= x22) { |
| 21884 |
return diff_bisectSplit_(text1, text2, x1, y1); |
| 21885 |
} |
| 21886 |
} |
| 21887 |
} |
| 21888 |
} |
| 21889 |
} |
| 21890 |
return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]]; |
| 21891 |
} |
| 21892 |
function diff_bisectSplit_(text1, text2, x2, y2) { |
| 21893 |
var text1a = text1.substring(0, x2); |
| 21894 |
var text2a = text2.substring(0, y2); |
| 21895 |
var text1b = text1.substring(x2); |
| 21896 |
var text2b = text2.substring(y2); |
| 21897 |
var diffs = diff_main(text1a, text2a); |
| 21898 |
var diffsb = diff_main(text1b, text2b); |
| 21899 |
return diffs.concat(diffsb); |
| 21900 |
} |
| 21901 |
function diff_commonPrefix(text1, text2) { |
| 21902 |
if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) { |
| 21903 |
return 0; |
| 21904 |
} |
| 21905 |
var pointermin = 0; |
| 21906 |
var pointermax = Math.min(text1.length, text2.length); |
| 21907 |
var pointermid = pointermax; |
| 21908 |
var pointerstart = 0; |
| 21909 |
while (pointermin < pointermid) { |
| 21910 |
if (text1.substring(pointerstart, pointermid) == text2.substring(pointerstart, pointermid)) { |
| 21911 |
pointermin = pointermid; |
| 21912 |
pointerstart = pointermin; |
| 21913 |
} else { |
| 21914 |
pointermax = pointermid; |
| 21915 |
} |
| 21916 |
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin); |
| 21917 |
} |
| 21918 |
return pointermid; |
| 21919 |
} |
| 21920 |
function diff_commonSuffix(text1, text2) { |
| 21921 |
if (!text1 || !text2 || text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1)) { |
| 21922 |
return 0; |
| 21923 |
} |
| 21924 |
var pointermin = 0; |
| 21925 |
var pointermax = Math.min(text1.length, text2.length); |
| 21926 |
var pointermid = pointermax; |
| 21927 |
var pointerend = 0; |
| 21928 |
while (pointermin < pointermid) { |
| 21929 |
if (text1.substring(text1.length - pointermid, text1.length - pointerend) == text2.substring(text2.length - pointermid, text2.length - pointerend)) { |
| 21930 |
pointermin = pointermid; |
| 21931 |
pointerend = pointermin; |
| 21932 |
} else { |
| 21933 |
pointermax = pointermid; |
| 21934 |
} |
| 21935 |
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin); |
| 21936 |
} |
| 21937 |
return pointermid; |
| 21938 |
} |
| 21939 |
function diff_halfMatch_(text1, text2) { |
| 21940 |
var longtext = text1.length > text2.length ? text1 : text2; |
| 21941 |
var shorttext = text1.length > text2.length ? text2 : text1; |
| 21942 |
if (longtext.length < 4 || shorttext.length * 2 < longtext.length) { |
| 21943 |
return null; |
| 21944 |
} |
| 21945 |
function diff_halfMatchI_(longtext2, shorttext2, i) { |
| 21946 |
var seed = longtext2.substring(i, i + Math.floor(longtext2.length / 4)); |
| 21947 |
var j = -1; |
| 21948 |
var best_common = ""; |
| 21949 |
var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b; |
| 21950 |
while ((j = shorttext2.indexOf(seed, j + 1)) != -1) { |
| 21951 |
var prefixLength = diff_commonPrefix( |
| 21952 |
longtext2.substring(i), |
| 21953 |
shorttext2.substring(j) |
| 21954 |
); |
| 21955 |
var suffixLength = diff_commonSuffix( |
| 21956 |
longtext2.substring(0, i), |
| 21957 |
shorttext2.substring(0, j) |
| 21958 |
); |
| 21959 |
if (best_common.length < suffixLength + prefixLength) { |
| 21960 |
best_common = shorttext2.substring(j - suffixLength, j) + shorttext2.substring(j, j + prefixLength); |
| 21961 |
best_longtext_a = longtext2.substring(0, i - suffixLength); |
| 21962 |
best_longtext_b = longtext2.substring(i + prefixLength); |
| 21963 |
best_shorttext_a = shorttext2.substring(0, j - suffixLength); |
| 21964 |
best_shorttext_b = shorttext2.substring(j + prefixLength); |
| 21965 |
} |
| 21966 |
} |
| 21967 |
if (best_common.length * 2 >= longtext2.length) { |
| 21968 |
return [ |
| 21969 |
best_longtext_a, |
| 21970 |
best_longtext_b, |
| 21971 |
best_shorttext_a, |
| 21972 |
best_shorttext_b, |
| 21973 |
best_common |
| 21974 |
]; |
| 21975 |
} else { |
| 21976 |
return null; |
| 21977 |
} |
| 21978 |
} |
| 21979 |
var hm1 = diff_halfMatchI_( |
| 21980 |
longtext, |
| 21981 |
shorttext, |
| 21982 |
Math.ceil(longtext.length / 4) |
| 21983 |
); |
| 21984 |
var hm2 = diff_halfMatchI_( |
| 21985 |
longtext, |
| 21986 |
shorttext, |
| 21987 |
Math.ceil(longtext.length / 2) |
| 21988 |
); |
| 21989 |
var hm; |
| 21990 |
if (!hm1 && !hm2) { |
| 21991 |
return null; |
| 21992 |
} else if (!hm2) { |
| 21993 |
hm = hm1; |
| 21994 |
} else if (!hm1) { |
| 21995 |
hm = hm2; |
| 21996 |
} else { |
| 21997 |
hm = hm1[4].length > hm2[4].length ? hm1 : hm2; |
| 21998 |
} |
| 21999 |
var text1_a, text1_b, text2_a, text2_b; |
| 22000 |
if (text1.length > text2.length) { |
| 22001 |
text1_a = hm[0]; |
| 22002 |
text1_b = hm[1]; |
| 22003 |
text2_a = hm[2]; |
| 22004 |
text2_b = hm[3]; |
| 22005 |
} else { |
| 22006 |
text2_a = hm[0]; |
| 22007 |
text2_b = hm[1]; |
| 22008 |
text1_a = hm[2]; |
| 22009 |
text1_b = hm[3]; |
| 22010 |
} |
| 22011 |
var mid_common = hm[4]; |
| 22012 |
return [text1_a, text1_b, text2_a, text2_b, mid_common]; |
| 22013 |
} |
| 22014 |
function diff_cleanupMerge(diffs) { |
| 22015 |
diffs.push([DIFF_EQUAL, ""]); |
| 22016 |
var pointer = 0; |
| 22017 |
var count_delete = 0; |
| 22018 |
var count_insert = 0; |
| 22019 |
var text_delete = ""; |
| 22020 |
var text_insert = ""; |
| 22021 |
var commonlength; |
| 22022 |
while (pointer < diffs.length) { |
| 22023 |
switch (diffs[pointer][0]) { |
| 22024 |
case DIFF_INSERT: |
| 22025 |
count_insert++; |
| 22026 |
text_insert += diffs[pointer][1]; |
| 22027 |
pointer++; |
| 22028 |
break; |
| 22029 |
case DIFF_DELETE: |
| 22030 |
count_delete++; |
| 22031 |
text_delete += diffs[pointer][1]; |
| 22032 |
pointer++; |
| 22033 |
break; |
| 22034 |
case DIFF_EQUAL: |
| 22035 |
if (count_delete + count_insert > 1) { |
| 22036 |
if (count_delete !== 0 && count_insert !== 0) { |
| 22037 |
commonlength = diff_commonPrefix(text_insert, text_delete); |
| 22038 |
if (commonlength !== 0) { |
| 22039 |
if (pointer - count_delete - count_insert > 0 && diffs[pointer - count_delete - count_insert - 1][0] == DIFF_EQUAL) { |
| 22040 |
diffs[pointer - count_delete - count_insert - 1][1] += text_insert.substring(0, commonlength); |
| 22041 |
} else { |
| 22042 |
diffs.splice(0, 0, [ |
| 22043 |
DIFF_EQUAL, |
| 22044 |
text_insert.substring(0, commonlength) |
| 22045 |
]); |
| 22046 |
pointer++; |
| 22047 |
} |
| 22048 |
text_insert = text_insert.substring(commonlength); |
| 22049 |
text_delete = text_delete.substring(commonlength); |
| 22050 |
} |
| 22051 |
commonlength = diff_commonSuffix(text_insert, text_delete); |
| 22052 |
if (commonlength !== 0) { |
| 22053 |
diffs[pointer][1] = text_insert.substring(text_insert.length - commonlength) + diffs[pointer][1]; |
| 22054 |
text_insert = text_insert.substring(0, text_insert.length - commonlength); |
| 22055 |
text_delete = text_delete.substring(0, text_delete.length - commonlength); |
| 22056 |
} |
| 22057 |
} |
| 22058 |
if (count_delete === 0) { |
| 22059 |
diffs.splice( |
| 22060 |
pointer - count_insert, |
| 22061 |
count_delete + count_insert, |
| 22062 |
[DIFF_INSERT, text_insert] |
| 22063 |
); |
| 22064 |
} else if (count_insert === 0) { |
| 22065 |
diffs.splice( |
| 22066 |
pointer - count_delete, |
| 22067 |
count_delete + count_insert, |
| 22068 |
[DIFF_DELETE, text_delete] |
| 22069 |
); |
| 22070 |
} else { |
| 22071 |
diffs.splice( |
| 22072 |
pointer - count_delete - count_insert, |
| 22073 |
count_delete + count_insert, |
| 22074 |
[DIFF_DELETE, text_delete], |
| 22075 |
[DIFF_INSERT, text_insert] |
| 22076 |
); |
| 22077 |
} |
| 22078 |
pointer = pointer - count_delete - count_insert + (count_delete ? 1 : 0) + (count_insert ? 1 : 0) + 1; |
| 22079 |
} else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) { |
| 22080 |
diffs[pointer - 1][1] += diffs[pointer][1]; |
| 22081 |
diffs.splice(pointer, 1); |
| 22082 |
} else { |
| 22083 |
pointer++; |
| 22084 |
} |
| 22085 |
count_insert = 0; |
| 22086 |
count_delete = 0; |
| 22087 |
text_delete = ""; |
| 22088 |
text_insert = ""; |
| 22089 |
break; |
| 22090 |
} |
| 22091 |
} |
| 22092 |
if (diffs[diffs.length - 1][1] === "") { |
| 22093 |
diffs.pop(); |
| 22094 |
} |
| 22095 |
var changes = false; |
| 22096 |
pointer = 1; |
| 22097 |
while (pointer < diffs.length - 1) { |
| 22098 |
if (diffs[pointer - 1][0] == DIFF_EQUAL && diffs[pointer + 1][0] == DIFF_EQUAL) { |
| 22099 |
if (diffs[pointer][1].substring(diffs[pointer][1].length - diffs[pointer - 1][1].length) == diffs[pointer - 1][1]) { |
| 22100 |
diffs[pointer][1] = diffs[pointer - 1][1] + diffs[pointer][1].substring(0, diffs[pointer][1].length - diffs[pointer - 1][1].length); |
| 22101 |
diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1]; |
| 22102 |
diffs.splice(pointer - 1, 1); |
| 22103 |
changes = true; |
| 22104 |
} else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) == diffs[pointer + 1][1]) { |
| 22105 |
diffs[pointer - 1][1] += diffs[pointer + 1][1]; |
| 22106 |
diffs[pointer][1] = diffs[pointer][1].substring(diffs[pointer + 1][1].length) + diffs[pointer + 1][1]; |
| 22107 |
diffs.splice(pointer + 1, 1); |
| 22108 |
changes = true; |
| 22109 |
} |
| 22110 |
} |
| 22111 |
pointer++; |
| 22112 |
} |
| 22113 |
if (changes) { |
| 22114 |
diff_cleanupMerge(diffs); |
| 22115 |
} |
| 22116 |
} |
| 22117 |
var diff = diff_main; |
| 22118 |
diff.INSERT = DIFF_INSERT; |
| 22119 |
diff.DELETE = DIFF_DELETE; |
| 22120 |
diff.EQUAL = DIFF_EQUAL; |
| 22121 |
module2.exports = diff; |
| 22122 |
function cursor_normalize_diff(diffs, cursor_pos) { |
| 22123 |
if (cursor_pos === 0) { |
| 22124 |
return [DIFF_EQUAL, diffs]; |
| 22125 |
} |
| 22126 |
for (var current_pos = 0, i = 0; i < diffs.length; i++) { |
| 22127 |
var d2 = diffs[i]; |
| 22128 |
if (d2[0] === DIFF_DELETE || d2[0] === DIFF_EQUAL) { |
| 22129 |
var next_pos = current_pos + d2[1].length; |
| 22130 |
if (cursor_pos === next_pos) { |
| 22131 |
return [i + 1, diffs]; |
| 22132 |
} else if (cursor_pos < next_pos) { |
| 22133 |
diffs = diffs.slice(); |
| 22134 |
var split_pos = cursor_pos - current_pos; |
| 22135 |
var d_left = [d2[0], d2[1].slice(0, split_pos)]; |
| 22136 |
var d_right = [d2[0], d2[1].slice(split_pos)]; |
| 22137 |
diffs.splice(i, 1, d_left, d_right); |
| 22138 |
return [i + 1, diffs]; |
| 22139 |
} else { |
| 22140 |
current_pos = next_pos; |
| 22141 |
} |
| 22142 |
} |
| 22143 |
} |
| 22144 |
throw new Error("cursor_pos is out of bounds!"); |
| 22145 |
} |
| 22146 |
function fix_cursor(diffs, cursor_pos) { |
| 22147 |
var norm = cursor_normalize_diff(diffs, cursor_pos); |
| 22148 |
var ndiffs = norm[1]; |
| 22149 |
var cursor_pointer = norm[0]; |
| 22150 |
var d2 = ndiffs[cursor_pointer]; |
| 22151 |
var d_next = ndiffs[cursor_pointer + 1]; |
| 22152 |
if (d2 == null) { |
| 22153 |
return diffs; |
| 22154 |
} else if (d2[0] !== DIFF_EQUAL) { |
| 22155 |
return diffs; |
| 22156 |
} else { |
| 22157 |
if (d_next != null && d2[1] + d_next[1] === d_next[1] + d2[1]) { |
| 22158 |
ndiffs.splice(cursor_pointer, 2, d_next, d2); |
| 22159 |
return merge_tuples(ndiffs, cursor_pointer, 2); |
| 22160 |
} else if (d_next != null && d_next[1].indexOf(d2[1]) === 0) { |
| 22161 |
ndiffs.splice(cursor_pointer, 2, [d_next[0], d2[1]], [0, d2[1]]); |
| 22162 |
var suffix = d_next[1].slice(d2[1].length); |
| 22163 |
if (suffix.length > 0) { |
| 22164 |
ndiffs.splice(cursor_pointer + 2, 0, [d_next[0], suffix]); |
| 22165 |
} |
| 22166 |
return merge_tuples(ndiffs, cursor_pointer, 3); |
| 22167 |
} else { |
| 22168 |
return diffs; |
| 22169 |
} |
| 22170 |
} |
| 22171 |
} |
| 22172 |
function fix_emoji(diffs) { |
| 22173 |
var compact = false; |
| 22174 |
var starts_with_pair_end = function(str) { |
| 22175 |
return str.charCodeAt(0) >= 56320 && str.charCodeAt(0) <= 57343; |
| 22176 |
}; |
| 22177 |
var ends_with_pair_start = function(str) { |
| 22178 |
return str.charCodeAt(str.length - 1) >= 55296 && str.charCodeAt(str.length - 1) <= 56319; |
| 22179 |
}; |
| 22180 |
for (var i = 2; i < diffs.length; i += 1) { |
| 22181 |
if (diffs[i - 2][0] === DIFF_EQUAL && ends_with_pair_start(diffs[i - 2][1]) && diffs[i - 1][0] === DIFF_DELETE && starts_with_pair_end(diffs[i - 1][1]) && diffs[i][0] === DIFF_INSERT && starts_with_pair_end(diffs[i][1])) { |
| 22182 |
compact = true; |
| 22183 |
diffs[i - 1][1] = diffs[i - 2][1].slice(-1) + diffs[i - 1][1]; |
| 22184 |
diffs[i][1] = diffs[i - 2][1].slice(-1) + diffs[i][1]; |
| 22185 |
diffs[i - 2][1] = diffs[i - 2][1].slice(0, -1); |
| 22186 |
} |
| 22187 |
} |
| 22188 |
if (!compact) { |
| 22189 |
return diffs; |
| 22190 |
} |
| 22191 |
var fixed_diffs = []; |
| 22192 |
for (var i = 0; i < diffs.length; i += 1) { |
| 22193 |
if (diffs[i][1].length > 0) { |
| 22194 |
fixed_diffs.push(diffs[i]); |
| 22195 |
} |
| 22196 |
} |
| 22197 |
return fixed_diffs; |
| 22198 |
} |
| 22199 |
function merge_tuples(diffs, start, length) { |
| 22200 |
for (var i = start + length - 1; i >= 0 && i >= start - 1; i--) { |
| 22201 |
if (i + 1 < diffs.length) { |
| 22202 |
var left_d = diffs[i]; |
| 22203 |
var right_d = diffs[i + 1]; |
| 22204 |
if (left_d[0] === right_d[1]) { |
| 22205 |
diffs.splice(i, 2, [left_d[0], left_d[1] + right_d[1]]); |
| 22206 |
} |
| 22207 |
} |
| 22208 |
} |
| 22209 |
return diffs; |
| 22210 |
} |
| 22211 |
}, |
| 22212 |
/* 52 */ |
| 22213 |
/***/ |
| 22214 |
function(module2, exports$12) { |
| 22215 |
exports$12 = module2.exports = typeof Object.keys === "function" ? Object.keys : shim; |
| 22216 |
exports$12.shim = shim; |
| 22217 |
function shim(obj) { |
| 22218 |
var keys2 = []; |
| 22219 |
for (var key in obj) keys2.push(key); |
| 22220 |
return keys2; |
| 22221 |
} |
| 22222 |
}, |
| 22223 |
/* 53 */ |
| 22224 |
/***/ |
| 22225 |
function(module2, exports$12) { |
| 22226 |
var supportsArgumentsClass = function() { |
| 22227 |
return Object.prototype.toString.call(arguments); |
| 22228 |
}() == "[object Arguments]"; |
| 22229 |
exports$12 = module2.exports = supportsArgumentsClass ? supported : unsupported; |
| 22230 |
exports$12.supported = supported; |
| 22231 |
function supported(object) { |
| 22232 |
return Object.prototype.toString.call(object) == "[object Arguments]"; |
| 22233 |
} |
| 22234 |
exports$12.unsupported = unsupported; |
| 22235 |
function unsupported(object) { |
| 22236 |
return object && typeof object == "object" && typeof object.length == "number" && Object.prototype.hasOwnProperty.call(object, "callee") && !Object.prototype.propertyIsEnumerable.call(object, "callee") || false; |
| 22237 |
} |
| 22238 |
}, |
| 22239 |
/* 54 */ |
| 22240 |
/***/ |
| 22241 |
function(module2, exports$12) { |
| 22242 |
var has = Object.prototype.hasOwnProperty, prefix = "~"; |
| 22243 |
function Events() { |
| 22244 |
} |
| 22245 |
if (Object.create) { |
| 22246 |
Events.prototype = /* @__PURE__ */ Object.create(null); |
| 22247 |
if (!new Events().__proto__) prefix = false; |
| 22248 |
} |
| 22249 |
function EE(fn, context, once) { |
| 22250 |
this.fn = fn; |
| 22251 |
this.context = context; |
| 22252 |
this.once = once || false; |
| 22253 |
} |
| 22254 |
function EventEmitter() { |
| 22255 |
this._events = new Events(); |
| 22256 |
this._eventsCount = 0; |
| 22257 |
} |
| 22258 |
EventEmitter.prototype.eventNames = function eventNames() { |
| 22259 |
var names = [], events, name; |
| 22260 |
if (this._eventsCount === 0) return names; |
| 22261 |
for (name in events = this._events) { |
| 22262 |
if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); |
| 22263 |
} |
| 22264 |
if (Object.getOwnPropertySymbols) { |
| 22265 |
return names.concat(Object.getOwnPropertySymbols(events)); |
| 22266 |
} |
| 22267 |
return names; |
| 22268 |
}; |
| 22269 |
EventEmitter.prototype.listeners = function listeners(event, exists) { |
| 22270 |
var evt = prefix ? prefix + event : event, available = this._events[evt]; |
| 22271 |
if (exists) return !!available; |
| 22272 |
if (!available) return []; |
| 22273 |
if (available.fn) return [available.fn]; |
| 22274 |
for (var i = 0, l2 = available.length, ee2 = new Array(l2); i < l2; i++) { |
| 22275 |
ee2[i] = available[i].fn; |
| 22276 |
} |
| 22277 |
return ee2; |
| 22278 |
}; |
| 22279 |
EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { |
| 22280 |
var evt = prefix ? prefix + event : event; |
| 22281 |
if (!this._events[evt]) return false; |
| 22282 |
var listeners = this._events[evt], len = arguments.length, args, i; |
| 22283 |
if (listeners.fn) { |
| 22284 |
if (listeners.once) this.removeListener(event, listeners.fn, void 0, true); |
| 22285 |
switch (len) { |
| 22286 |
case 1: |
| 22287 |
return listeners.fn.call(listeners.context), true; |
| 22288 |
case 2: |
| 22289 |
return listeners.fn.call(listeners.context, a1), true; |
| 22290 |
case 3: |
| 22291 |
return listeners.fn.call(listeners.context, a1, a2), true; |
| 22292 |
case 4: |
| 22293 |
return listeners.fn.call(listeners.context, a1, a2, a3), true; |
| 22294 |
case 5: |
| 22295 |
return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; |
| 22296 |
case 6: |
| 22297 |
return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; |
| 22298 |
} |
| 22299 |
for (i = 1, args = new Array(len - 1); i < len; i++) { |
| 22300 |
args[i - 1] = arguments[i]; |
| 22301 |
} |
| 22302 |
listeners.fn.apply(listeners.context, args); |
| 22303 |
} else { |
| 22304 |
var length = listeners.length, j; |
| 22305 |
for (i = 0; i < length; i++) { |
| 22306 |
if (listeners[i].once) this.removeListener(event, listeners[i].fn, void 0, true); |
| 22307 |
switch (len) { |
| 22308 |
case 1: |
| 22309 |
listeners[i].fn.call(listeners[i].context); |
| 22310 |
break; |
| 22311 |
case 2: |
| 22312 |
listeners[i].fn.call(listeners[i].context, a1); |
| 22313 |
break; |
| 22314 |
case 3: |
| 22315 |
listeners[i].fn.call(listeners[i].context, a1, a2); |
| 22316 |
break; |
| 22317 |
case 4: |
| 22318 |
listeners[i].fn.call(listeners[i].context, a1, a2, a3); |
| 22319 |
break; |
| 22320 |
default: |
| 22321 |
if (!args) for (j = 1, args = new Array(len - 1); j < len; j++) { |
| 22322 |
args[j - 1] = arguments[j]; |
| 22323 |
} |
| 22324 |
listeners[i].fn.apply(listeners[i].context, args); |
| 22325 |
} |
| 22326 |
} |
| 22327 |
} |
| 22328 |
return true; |
| 22329 |
}; |
| 22330 |
EventEmitter.prototype.on = function on(event, fn, context) { |
| 22331 |
var listener = new EE(fn, context || this), evt = prefix ? prefix + event : event; |
| 22332 |
if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++; |
| 22333 |
else if (!this._events[evt].fn) this._events[evt].push(listener); |
| 22334 |
else this._events[evt] = [this._events[evt], listener]; |
| 22335 |
return this; |
| 22336 |
}; |
| 22337 |
EventEmitter.prototype.once = function once(event, fn, context) { |
| 22338 |
var listener = new EE(fn, context || this, true), evt = prefix ? prefix + event : event; |
| 22339 |
if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++; |
| 22340 |
else if (!this._events[evt].fn) this._events[evt].push(listener); |
| 22341 |
else this._events[evt] = [this._events[evt], listener]; |
| 22342 |
return this; |
| 22343 |
}; |
| 22344 |
EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { |
| 22345 |
var evt = prefix ? prefix + event : event; |
| 22346 |
if (!this._events[evt]) return this; |
| 22347 |
if (!fn) { |
| 22348 |
if (--this._eventsCount === 0) this._events = new Events(); |
| 22349 |
else delete this._events[evt]; |
| 22350 |
return this; |
| 22351 |
} |
| 22352 |
var listeners = this._events[evt]; |
| 22353 |
if (listeners.fn) { |
| 22354 |
if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) { |
| 22355 |
if (--this._eventsCount === 0) this._events = new Events(); |
| 22356 |
else delete this._events[evt]; |
| 22357 |
} |
| 22358 |
} else { |
| 22359 |
for (var i = 0, events = [], length = listeners.length; i < length; i++) { |
| 22360 |
if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) { |
| 22361 |
events.push(listeners[i]); |
| 22362 |
} |
| 22363 |
} |
| 22364 |
if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; |
| 22365 |
else if (--this._eventsCount === 0) this._events = new Events(); |
| 22366 |
else delete this._events[evt]; |
| 22367 |
} |
| 22368 |
return this; |
| 22369 |
}; |
| 22370 |
EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { |
| 22371 |
var evt; |
| 22372 |
if (event) { |
| 22373 |
evt = prefix ? prefix + event : event; |
| 22374 |
if (this._events[evt]) { |
| 22375 |
if (--this._eventsCount === 0) this._events = new Events(); |
| 22376 |
else delete this._events[evt]; |
| 22377 |
} |
| 22378 |
} else { |
| 22379 |
this._events = new Events(); |
| 22380 |
this._eventsCount = 0; |
| 22381 |
} |
| 22382 |
return this; |
| 22383 |
}; |
| 22384 |
EventEmitter.prototype.off = EventEmitter.prototype.removeListener; |
| 22385 |
EventEmitter.prototype.addListener = EventEmitter.prototype.on; |
| 22386 |
EventEmitter.prototype.setMaxListeners = function setMaxListeners() { |
| 22387 |
return this; |
| 22388 |
}; |
| 22389 |
EventEmitter.prefixed = prefix; |
| 22390 |
EventEmitter.EventEmitter = EventEmitter; |
| 22391 |
if ("undefined" !== typeof module2) { |
| 22392 |
module2.exports = EventEmitter; |
| 22393 |
} |
| 22394 |
}, |
| 22395 |
/* 55 */ |
| 22396 |
/***/ |
| 22397 |
function(module2, exports$12, __webpack_require__) { |
| 22398 |
Object.defineProperty(exports$12, "__esModule", { |
| 22399 |
value: true |
| 22400 |
}); |
| 22401 |
exports$12.matchText = exports$12.matchSpacing = exports$12.matchNewline = exports$12.matchBlot = exports$12.matchAttributor = exports$12.default = void 0; |
| 22402 |
var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { |
| 22403 |
return typeof obj; |
| 22404 |
} : function(obj) { |
| 22405 |
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; |
| 22406 |
}; |
| 22407 |
var _slicedToArray2 = /* @__PURE__ */ function() { |
| 22408 |
function sliceIterator(arr, i) { |
| 22409 |
var _arr = []; |
| 22410 |
var _n = true; |
| 22411 |
var _d2 = false; |
| 22412 |
var _e2 = void 0; |
| 22413 |
try { |
| 22414 |
for (var _i2 = arr[Symbol.iterator](), _s; !(_n = (_s = _i2.next()).done); _n = true) { |
| 22415 |
_arr.push(_s.value); |
| 22416 |
if (i && _arr.length === i) break; |
| 22417 |
} |
| 22418 |
} catch (err) { |
| 22419 |
_d2 = true; |
| 22420 |
_e2 = err; |
| 22421 |
} finally { |
| 22422 |
try { |
| 22423 |
if (!_n && _i2["return"]) _i2["return"](); |
| 22424 |
} finally { |
| 22425 |
if (_d2) throw _e2; |
| 22426 |
} |
| 22427 |
} |
| 22428 |
return _arr; |
| 22429 |
} |
| 22430 |
return function(arr, i) { |
| 22431 |
if (Array.isArray(arr)) { |
| 22432 |
return arr; |
| 22433 |
} else if (Symbol.iterator in Object(arr)) { |
| 22434 |
return sliceIterator(arr, i); |
| 22435 |
} else { |
| 22436 |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); |
| 22437 |
} |
| 22438 |
}; |
| 22439 |
}(); |
| 22440 |
var _createClass2 = /* @__PURE__ */ function() { |
| 22441 |
function defineProperties(target, props) { |
| 22442 |
for (var i = 0; i < props.length; i++) { |
| 22443 |
var descriptor = props[i]; |
| 22444 |
descriptor.enumerable = descriptor.enumerable || false; |
| 22445 |
descriptor.configurable = true; |
| 22446 |
if ("value" in descriptor) descriptor.writable = true; |
| 22447 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 22448 |
} |
| 22449 |
} |
| 22450 |
return function(Constructor, protoProps, staticProps) { |
| 22451 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 22452 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 22453 |
return Constructor; |
| 22454 |
}; |
| 22455 |
}(); |
| 22456 |
var _extend2 = __webpack_require__(3); |
| 22457 |
var _extend3 = _interopRequireDefault(_extend2); |
| 22458 |
var _quillDelta = __webpack_require__(2); |
| 22459 |
var _quillDelta2 = _interopRequireDefault(_quillDelta); |
| 22460 |
var _parchment = __webpack_require__(0); |
| 22461 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 22462 |
var _quill = __webpack_require__(5); |
| 22463 |
var _quill2 = _interopRequireDefault(_quill); |
| 22464 |
var _logger = __webpack_require__(10); |
| 22465 |
var _logger2 = _interopRequireDefault(_logger); |
| 22466 |
var _module = __webpack_require__(9); |
| 22467 |
var _module2 = _interopRequireDefault(_module); |
| 22468 |
var _align = __webpack_require__(36); |
| 22469 |
var _background = __webpack_require__(37); |
| 22470 |
var _code = __webpack_require__(13); |
| 22471 |
var _code2 = _interopRequireDefault(_code); |
| 22472 |
var _color = __webpack_require__(26); |
| 22473 |
var _direction = __webpack_require__(38); |
| 22474 |
var _font = __webpack_require__(39); |
| 22475 |
var _size = __webpack_require__(40); |
| 22476 |
function _interopRequireDefault(obj) { |
| 22477 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 22478 |
} |
| 22479 |
function _defineProperty2(obj, key, value) { |
| 22480 |
if (key in obj) { |
| 22481 |
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); |
| 22482 |
} else { |
| 22483 |
obj[key] = value; |
| 22484 |
} |
| 22485 |
return obj; |
| 22486 |
} |
| 22487 |
function _classCallCheck2(instance, Constructor) { |
| 22488 |
if (!(instance instanceof Constructor)) { |
| 22489 |
throw new TypeError("Cannot call a class as a function"); |
| 22490 |
} |
| 22491 |
} |
| 22492 |
function _possibleConstructorReturn2(self2, call) { |
| 22493 |
if (!self2) { |
| 22494 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 22495 |
} |
| 22496 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 22497 |
} |
| 22498 |
function _inherits2(subClass, superClass) { |
| 22499 |
if (typeof superClass !== "function" && superClass !== null) { |
| 22500 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 22501 |
} |
| 22502 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 22503 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 22504 |
} |
| 22505 |
var debug = (0, _logger2.default)("quill:clipboard"); |
| 22506 |
var DOM_KEY = "__ql-matcher"; |
| 22507 |
var CLIPBOARD_CONFIG = [[Node.TEXT_NODE, matchText], [Node.TEXT_NODE, matchNewline], ["br", matchBreak], [Node.ELEMENT_NODE, matchNewline], [Node.ELEMENT_NODE, matchBlot], [Node.ELEMENT_NODE, matchSpacing], [Node.ELEMENT_NODE, matchAttributor], [Node.ELEMENT_NODE, matchStyles], ["li", matchIndent], ["b", matchAlias.bind(matchAlias, "bold")], ["i", matchAlias.bind(matchAlias, "italic")], ["style", matchIgnore]]; |
| 22508 |
var ATTRIBUTE_ATTRIBUTORS = [_align.AlignAttribute, _direction.DirectionAttribute].reduce(function(memo, attr) { |
| 22509 |
memo[attr.keyName] = attr; |
| 22510 |
return memo; |
| 22511 |
}, {}); |
| 22512 |
var STYLE_ATTRIBUTORS = [_align.AlignStyle, _background.BackgroundStyle, _color.ColorStyle, _direction.DirectionStyle, _font.FontStyle, _size.SizeStyle].reduce(function(memo, attr) { |
| 22513 |
memo[attr.keyName] = attr; |
| 22514 |
return memo; |
| 22515 |
}, {}); |
| 22516 |
var Clipboard = function(_Module) { |
| 22517 |
_inherits2(Clipboard2, _Module); |
| 22518 |
function Clipboard2(quill2, options) { |
| 22519 |
_classCallCheck2(this, Clipboard2); |
| 22520 |
var _this = _possibleConstructorReturn2(this, (Clipboard2.__proto__ || Object.getPrototypeOf(Clipboard2)).call(this, quill2, options)); |
| 22521 |
_this.quill.root.addEventListener("paste", _this.onPaste.bind(_this)); |
| 22522 |
_this.container = _this.quill.addContainer("ql-clipboard"); |
| 22523 |
_this.container.setAttribute("contenteditable", true); |
| 22524 |
_this.container.setAttribute("tabindex", -1); |
| 22525 |
_this.matchers = []; |
| 22526 |
CLIPBOARD_CONFIG.concat(_this.options.matchers).forEach(function(_ref) { |
| 22527 |
var _ref2 = _slicedToArray2(_ref, 2), selector = _ref2[0], matcher = _ref2[1]; |
| 22528 |
if (!options.matchVisual && matcher === matchSpacing) return; |
| 22529 |
_this.addMatcher(selector, matcher); |
| 22530 |
}); |
| 22531 |
return _this; |
| 22532 |
} |
| 22533 |
_createClass2(Clipboard2, [{ |
| 22534 |
key: "addMatcher", |
| 22535 |
value: function addMatcher(selector, matcher) { |
| 22536 |
this.matchers.push([selector, matcher]); |
| 22537 |
} |
| 22538 |
}, { |
| 22539 |
key: "convert", |
| 22540 |
value: function convert(html) { |
| 22541 |
if (typeof html === "string") { |
| 22542 |
this.container.innerHTML = html.replace(/\>\r?\n +\</g, "><"); |
| 22543 |
return this.convert(); |
| 22544 |
} |
| 22545 |
var formats = this.quill.getFormat(this.quill.selection.savedRange.index); |
| 22546 |
if (formats[_code2.default.blotName]) { |
| 22547 |
var text = this.container.innerText; |
| 22548 |
this.container.innerHTML = ""; |
| 22549 |
return new _quillDelta2.default().insert(text, _defineProperty2({}, _code2.default.blotName, formats[_code2.default.blotName])); |
| 22550 |
} |
| 22551 |
var _prepareMatching = this.prepareMatching(), _prepareMatching2 = _slicedToArray2(_prepareMatching, 2), elementMatchers = _prepareMatching2[0], textMatchers = _prepareMatching2[1]; |
| 22552 |
var delta = traverse(this.container, elementMatchers, textMatchers); |
| 22553 |
if (deltaEndsWith(delta, "\n") && delta.ops[delta.ops.length - 1].attributes == null) { |
| 22554 |
delta = delta.compose(new _quillDelta2.default().retain(delta.length() - 1).delete(1)); |
| 22555 |
} |
| 22556 |
debug.log("convert", this.container.innerHTML, delta); |
| 22557 |
this.container.innerHTML = ""; |
| 22558 |
return delta; |
| 22559 |
} |
| 22560 |
}, { |
| 22561 |
key: "dangerouslyPasteHTML", |
| 22562 |
value: function dangerouslyPasteHTML(index, html) { |
| 22563 |
var source = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _quill2.default.sources.API; |
| 22564 |
if (typeof index === "string") { |
| 22565 |
this.quill.setContents(this.convert(index), html); |
| 22566 |
this.quill.setSelection(0, _quill2.default.sources.SILENT); |
| 22567 |
} else { |
| 22568 |
var paste = this.convert(html); |
| 22569 |
this.quill.updateContents(new _quillDelta2.default().retain(index).concat(paste), source); |
| 22570 |
this.quill.setSelection(index + paste.length(), _quill2.default.sources.SILENT); |
| 22571 |
} |
| 22572 |
} |
| 22573 |
}, { |
| 22574 |
key: "onPaste", |
| 22575 |
value: function onPaste(e2) { |
| 22576 |
var _this2 = this; |
| 22577 |
if (e2.defaultPrevented || !this.quill.isEnabled()) return; |
| 22578 |
var range = this.quill.getSelection(); |
| 22579 |
var delta = new _quillDelta2.default().retain(range.index); |
| 22580 |
var scrollTop = this.quill.scrollingContainer.scrollTop; |
| 22581 |
this.container.focus(); |
| 22582 |
this.quill.selection.update(_quill2.default.sources.SILENT); |
| 22583 |
setTimeout(function() { |
| 22584 |
delta = delta.concat(_this2.convert()).delete(range.length); |
| 22585 |
_this2.quill.updateContents(delta, _quill2.default.sources.USER); |
| 22586 |
_this2.quill.setSelection(delta.length() - range.length, _quill2.default.sources.SILENT); |
| 22587 |
_this2.quill.scrollingContainer.scrollTop = scrollTop; |
| 22588 |
_this2.quill.focus(); |
| 22589 |
}, 1); |
| 22590 |
} |
| 22591 |
}, { |
| 22592 |
key: "prepareMatching", |
| 22593 |
value: function prepareMatching() { |
| 22594 |
var _this3 = this; |
| 22595 |
var elementMatchers = [], textMatchers = []; |
| 22596 |
this.matchers.forEach(function(pair) { |
| 22597 |
var _pair = _slicedToArray2(pair, 2), selector = _pair[0], matcher = _pair[1]; |
| 22598 |
switch (selector) { |
| 22599 |
case Node.TEXT_NODE: |
| 22600 |
textMatchers.push(matcher); |
| 22601 |
break; |
| 22602 |
case Node.ELEMENT_NODE: |
| 22603 |
elementMatchers.push(matcher); |
| 22604 |
break; |
| 22605 |
default: |
| 22606 |
[].forEach.call(_this3.container.querySelectorAll(selector), function(node) { |
| 22607 |
node[DOM_KEY] = node[DOM_KEY] || []; |
| 22608 |
node[DOM_KEY].push(matcher); |
| 22609 |
}); |
| 22610 |
break; |
| 22611 |
} |
| 22612 |
}); |
| 22613 |
return [elementMatchers, textMatchers]; |
| 22614 |
} |
| 22615 |
}]); |
| 22616 |
return Clipboard2; |
| 22617 |
}(_module2.default); |
| 22618 |
Clipboard.DEFAULTS = { |
| 22619 |
matchers: [], |
| 22620 |
matchVisual: true |
| 22621 |
}; |
| 22622 |
function applyFormat(delta, format, value) { |
| 22623 |
if ((typeof format === "undefined" ? "undefined" : _typeof2(format)) === "object") { |
| 22624 |
return Object.keys(format).reduce(function(delta2, key) { |
| 22625 |
return applyFormat(delta2, key, format[key]); |
| 22626 |
}, delta); |
| 22627 |
} else { |
| 22628 |
return delta.reduce(function(delta2, op) { |
| 22629 |
if (op.attributes && op.attributes[format]) { |
| 22630 |
return delta2.push(op); |
| 22631 |
} else { |
| 22632 |
return delta2.insert(op.insert, (0, _extend3.default)({}, _defineProperty2({}, format, value), op.attributes)); |
| 22633 |
} |
| 22634 |
}, new _quillDelta2.default()); |
| 22635 |
} |
| 22636 |
} |
| 22637 |
function computeStyle(node) { |
| 22638 |
if (node.nodeType !== Node.ELEMENT_NODE) return {}; |
| 22639 |
var DOM_KEY2 = "__ql-computed-style"; |
| 22640 |
return node[DOM_KEY2] || (node[DOM_KEY2] = window.getComputedStyle(node)); |
| 22641 |
} |
| 22642 |
function deltaEndsWith(delta, text) { |
| 22643 |
var endText = ""; |
| 22644 |
for (var i = delta.ops.length - 1; i >= 0 && endText.length < text.length; --i) { |
| 22645 |
var op = delta.ops[i]; |
| 22646 |
if (typeof op.insert !== "string") break; |
| 22647 |
endText = op.insert + endText; |
| 22648 |
} |
| 22649 |
return endText.slice(-1 * text.length) === text; |
| 22650 |
} |
| 22651 |
function isLine(node) { |
| 22652 |
if (node.childNodes.length === 0) return false; |
| 22653 |
var style = computeStyle(node); |
| 22654 |
return ["block", "list-item"].indexOf(style.display) > -1; |
| 22655 |
} |
| 22656 |
function traverse(node, elementMatchers, textMatchers) { |
| 22657 |
if (node.nodeType === node.TEXT_NODE) { |
| 22658 |
return textMatchers.reduce(function(delta, matcher) { |
| 22659 |
return matcher(node, delta); |
| 22660 |
}, new _quillDelta2.default()); |
| 22661 |
} else if (node.nodeType === node.ELEMENT_NODE) { |
| 22662 |
return [].reduce.call(node.childNodes || [], function(delta, childNode) { |
| 22663 |
var childrenDelta = traverse(childNode, elementMatchers, textMatchers); |
| 22664 |
if (childNode.nodeType === node.ELEMENT_NODE) { |
| 22665 |
childrenDelta = elementMatchers.reduce(function(childrenDelta2, matcher) { |
| 22666 |
return matcher(childNode, childrenDelta2); |
| 22667 |
}, childrenDelta); |
| 22668 |
childrenDelta = (childNode[DOM_KEY] || []).reduce(function(childrenDelta2, matcher) { |
| 22669 |
return matcher(childNode, childrenDelta2); |
| 22670 |
}, childrenDelta); |
| 22671 |
} |
| 22672 |
return delta.concat(childrenDelta); |
| 22673 |
}, new _quillDelta2.default()); |
| 22674 |
} else { |
| 22675 |
return new _quillDelta2.default(); |
| 22676 |
} |
| 22677 |
} |
| 22678 |
function matchAlias(format, node, delta) { |
| 22679 |
return applyFormat(delta, format, true); |
| 22680 |
} |
| 22681 |
function matchAttributor(node, delta) { |
| 22682 |
var attributes = _parchment2.default.Attributor.Attribute.keys(node); |
| 22683 |
var classes = _parchment2.default.Attributor.Class.keys(node); |
| 22684 |
var styles = _parchment2.default.Attributor.Style.keys(node); |
| 22685 |
var formats = {}; |
| 22686 |
attributes.concat(classes).concat(styles).forEach(function(name) { |
| 22687 |
var attr = _parchment2.default.query(name, _parchment2.default.Scope.ATTRIBUTE); |
| 22688 |
if (attr != null) { |
| 22689 |
formats[attr.attrName] = attr.value(node); |
| 22690 |
if (formats[attr.attrName]) return; |
| 22691 |
} |
| 22692 |
attr = ATTRIBUTE_ATTRIBUTORS[name]; |
| 22693 |
if (attr != null && (attr.attrName === name || attr.keyName === name)) { |
| 22694 |
formats[attr.attrName] = attr.value(node) || void 0; |
| 22695 |
} |
| 22696 |
attr = STYLE_ATTRIBUTORS[name]; |
| 22697 |
if (attr != null && (attr.attrName === name || attr.keyName === name)) { |
| 22698 |
attr = STYLE_ATTRIBUTORS[name]; |
| 22699 |
formats[attr.attrName] = attr.value(node) || void 0; |
| 22700 |
} |
| 22701 |
}); |
| 22702 |
if (Object.keys(formats).length > 0) { |
| 22703 |
delta = applyFormat(delta, formats); |
| 22704 |
} |
| 22705 |
return delta; |
| 22706 |
} |
| 22707 |
function matchBlot(node, delta) { |
| 22708 |
var match = _parchment2.default.query(node); |
| 22709 |
if (match == null) return delta; |
| 22710 |
if (match.prototype instanceof _parchment2.default.Embed) { |
| 22711 |
var embed = {}; |
| 22712 |
var value = match.value(node); |
| 22713 |
if (value != null) { |
| 22714 |
embed[match.blotName] = value; |
| 22715 |
delta = new _quillDelta2.default().insert(embed, match.formats(node)); |
| 22716 |
} |
| 22717 |
} else if (typeof match.formats === "function") { |
| 22718 |
delta = applyFormat(delta, match.blotName, match.formats(node)); |
| 22719 |
} |
| 22720 |
return delta; |
| 22721 |
} |
| 22722 |
function matchBreak(node, delta) { |
| 22723 |
if (!deltaEndsWith(delta, "\n")) { |
| 22724 |
delta.insert("\n"); |
| 22725 |
} |
| 22726 |
return delta; |
| 22727 |
} |
| 22728 |
function matchIgnore() { |
| 22729 |
return new _quillDelta2.default(); |
| 22730 |
} |
| 22731 |
function matchIndent(node, delta) { |
| 22732 |
var match = _parchment2.default.query(node); |
| 22733 |
if (match == null || match.blotName !== "list-item" || !deltaEndsWith(delta, "\n")) { |
| 22734 |
return delta; |
| 22735 |
} |
| 22736 |
var indent = -1, parent = node.parentNode; |
| 22737 |
while (!parent.classList.contains("ql-clipboard")) { |
| 22738 |
if ((_parchment2.default.query(parent) || {}).blotName === "list") { |
| 22739 |
indent += 1; |
| 22740 |
} |
| 22741 |
parent = parent.parentNode; |
| 22742 |
} |
| 22743 |
if (indent <= 0) return delta; |
| 22744 |
return delta.compose(new _quillDelta2.default().retain(delta.length() - 1).retain(1, { indent })); |
| 22745 |
} |
| 22746 |
function matchNewline(node, delta) { |
| 22747 |
if (!deltaEndsWith(delta, "\n")) { |
| 22748 |
if (isLine(node) || delta.length() > 0 && node.nextSibling && isLine(node.nextSibling)) { |
| 22749 |
delta.insert("\n"); |
| 22750 |
} |
| 22751 |
} |
| 22752 |
return delta; |
| 22753 |
} |
| 22754 |
function matchSpacing(node, delta) { |
| 22755 |
if (isLine(node) && node.nextElementSibling != null && !deltaEndsWith(delta, "\n\n")) { |
| 22756 |
var nodeHeight = node.offsetHeight + parseFloat(computeStyle(node).marginTop) + parseFloat(computeStyle(node).marginBottom); |
| 22757 |
if (node.nextElementSibling.offsetTop > node.offsetTop + nodeHeight * 1.5) { |
| 22758 |
delta.insert("\n"); |
| 22759 |
} |
| 22760 |
} |
| 22761 |
return delta; |
| 22762 |
} |
| 22763 |
function matchStyles(node, delta) { |
| 22764 |
var formats = {}; |
| 22765 |
var style = node.style || {}; |
| 22766 |
if (style.fontStyle && computeStyle(node).fontStyle === "italic") { |
| 22767 |
formats.italic = true; |
| 22768 |
} |
| 22769 |
if (style.fontWeight && (computeStyle(node).fontWeight.startsWith("bold") || parseInt(computeStyle(node).fontWeight) >= 700)) { |
| 22770 |
formats.bold = true; |
| 22771 |
} |
| 22772 |
if (Object.keys(formats).length > 0) { |
| 22773 |
delta = applyFormat(delta, formats); |
| 22774 |
} |
| 22775 |
if (parseFloat(style.textIndent || 0) > 0) { |
| 22776 |
delta = new _quillDelta2.default().insert(" ").concat(delta); |
| 22777 |
} |
| 22778 |
return delta; |
| 22779 |
} |
| 22780 |
function matchText(node, delta) { |
| 22781 |
var text = node.data; |
| 22782 |
if (node.parentNode.tagName === "O:P") { |
| 22783 |
return delta.insert(text.trim()); |
| 22784 |
} |
| 22785 |
if (text.trim().length === 0 && node.parentNode.classList.contains("ql-clipboard")) { |
| 22786 |
return delta; |
| 22787 |
} |
| 22788 |
if (!computeStyle(node.parentNode).whiteSpace.startsWith("pre")) { |
| 22789 |
var replacer = function replacer2(collapse, match) { |
| 22790 |
match = match.replace(/[^\u00a0]/g, ""); |
| 22791 |
return match.length < 1 && collapse ? " " : match; |
| 22792 |
}; |
| 22793 |
text = text.replace(/\r\n/g, " ").replace(/\n/g, " "); |
| 22794 |
text = text.replace(/\s\s+/g, replacer.bind(replacer, true)); |
| 22795 |
if (node.previousSibling == null && isLine(node.parentNode) || node.previousSibling != null && isLine(node.previousSibling)) { |
| 22796 |
text = text.replace(/^\s+/, replacer.bind(replacer, false)); |
| 22797 |
} |
| 22798 |
if (node.nextSibling == null && isLine(node.parentNode) || node.nextSibling != null && isLine(node.nextSibling)) { |
| 22799 |
text = text.replace(/\s+$/, replacer.bind(replacer, false)); |
| 22800 |
} |
| 22801 |
} |
| 22802 |
return delta.insert(text); |
| 22803 |
} |
| 22804 |
exports$12.default = Clipboard; |
| 22805 |
exports$12.matchAttributor = matchAttributor; |
| 22806 |
exports$12.matchBlot = matchBlot; |
| 22807 |
exports$12.matchNewline = matchNewline; |
| 22808 |
exports$12.matchSpacing = matchSpacing; |
| 22809 |
exports$12.matchText = matchText; |
| 22810 |
}, |
| 22811 |
/* 56 */ |
| 22812 |
/***/ |
| 22813 |
function(module2, exports$12, __webpack_require__) { |
| 22814 |
Object.defineProperty(exports$12, "__esModule", { |
| 22815 |
value: true |
| 22816 |
}); |
| 22817 |
var _createClass2 = /* @__PURE__ */ function() { |
| 22818 |
function defineProperties(target, props) { |
| 22819 |
for (var i = 0; i < props.length; i++) { |
| 22820 |
var descriptor = props[i]; |
| 22821 |
descriptor.enumerable = descriptor.enumerable || false; |
| 22822 |
descriptor.configurable = true; |
| 22823 |
if ("value" in descriptor) descriptor.writable = true; |
| 22824 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 22825 |
} |
| 22826 |
} |
| 22827 |
return function(Constructor, protoProps, staticProps) { |
| 22828 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 22829 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 22830 |
return Constructor; |
| 22831 |
}; |
| 22832 |
}(); |
| 22833 |
var _get = function get(object, property, receiver) { |
| 22834 |
if (object === null) object = Function.prototype; |
| 22835 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 22836 |
if (desc === void 0) { |
| 22837 |
var parent = Object.getPrototypeOf(object); |
| 22838 |
if (parent === null) { |
| 22839 |
return void 0; |
| 22840 |
} else { |
| 22841 |
return get(parent, property, receiver); |
| 22842 |
} |
| 22843 |
} else if ("value" in desc) { |
| 22844 |
return desc.value; |
| 22845 |
} else { |
| 22846 |
var getter = desc.get; |
| 22847 |
if (getter === void 0) { |
| 22848 |
return void 0; |
| 22849 |
} |
| 22850 |
return getter.call(receiver); |
| 22851 |
} |
| 22852 |
}; |
| 22853 |
var _inline = __webpack_require__(6); |
| 22854 |
var _inline2 = _interopRequireDefault(_inline); |
| 22855 |
function _interopRequireDefault(obj) { |
| 22856 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 22857 |
} |
| 22858 |
function _classCallCheck2(instance, Constructor) { |
| 22859 |
if (!(instance instanceof Constructor)) { |
| 22860 |
throw new TypeError("Cannot call a class as a function"); |
| 22861 |
} |
| 22862 |
} |
| 22863 |
function _possibleConstructorReturn2(self2, call) { |
| 22864 |
if (!self2) { |
| 22865 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 22866 |
} |
| 22867 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 22868 |
} |
| 22869 |
function _inherits2(subClass, superClass) { |
| 22870 |
if (typeof superClass !== "function" && superClass !== null) { |
| 22871 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 22872 |
} |
| 22873 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 22874 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 22875 |
} |
| 22876 |
var Bold = function(_Inline) { |
| 22877 |
_inherits2(Bold2, _Inline); |
| 22878 |
function Bold2() { |
| 22879 |
_classCallCheck2(this, Bold2); |
| 22880 |
return _possibleConstructorReturn2(this, (Bold2.__proto__ || Object.getPrototypeOf(Bold2)).apply(this, arguments)); |
| 22881 |
} |
| 22882 |
_createClass2(Bold2, [{ |
| 22883 |
key: "optimize", |
| 22884 |
value: function optimize(context) { |
| 22885 |
_get(Bold2.prototype.__proto__ || Object.getPrototypeOf(Bold2.prototype), "optimize", this).call(this, context); |
| 22886 |
if (this.domNode.tagName !== this.statics.tagName[0]) { |
| 22887 |
this.replaceWith(this.statics.blotName); |
| 22888 |
} |
| 22889 |
} |
| 22890 |
}], [{ |
| 22891 |
key: "create", |
| 22892 |
value: function create() { |
| 22893 |
return _get(Bold2.__proto__ || Object.getPrototypeOf(Bold2), "create", this).call(this); |
| 22894 |
} |
| 22895 |
}, { |
| 22896 |
key: "formats", |
| 22897 |
value: function formats() { |
| 22898 |
return true; |
| 22899 |
} |
| 22900 |
}]); |
| 22901 |
return Bold2; |
| 22902 |
}(_inline2.default); |
| 22903 |
Bold.blotName = "bold"; |
| 22904 |
Bold.tagName = ["STRONG", "B"]; |
| 22905 |
exports$12.default = Bold; |
| 22906 |
}, |
| 22907 |
/* 57 */ |
| 22908 |
/***/ |
| 22909 |
function(module2, exports$12, __webpack_require__) { |
| 22910 |
Object.defineProperty(exports$12, "__esModule", { |
| 22911 |
value: true |
| 22912 |
}); |
| 22913 |
exports$12.addControls = exports$12.default = void 0; |
| 22914 |
var _slicedToArray2 = /* @__PURE__ */ function() { |
| 22915 |
function sliceIterator(arr, i) { |
| 22916 |
var _arr = []; |
| 22917 |
var _n = true; |
| 22918 |
var _d2 = false; |
| 22919 |
var _e2 = void 0; |
| 22920 |
try { |
| 22921 |
for (var _i2 = arr[Symbol.iterator](), _s; !(_n = (_s = _i2.next()).done); _n = true) { |
| 22922 |
_arr.push(_s.value); |
| 22923 |
if (i && _arr.length === i) break; |
| 22924 |
} |
| 22925 |
} catch (err) { |
| 22926 |
_d2 = true; |
| 22927 |
_e2 = err; |
| 22928 |
} finally { |
| 22929 |
try { |
| 22930 |
if (!_n && _i2["return"]) _i2["return"](); |
| 22931 |
} finally { |
| 22932 |
if (_d2) throw _e2; |
| 22933 |
} |
| 22934 |
} |
| 22935 |
return _arr; |
| 22936 |
} |
| 22937 |
return function(arr, i) { |
| 22938 |
if (Array.isArray(arr)) { |
| 22939 |
return arr; |
| 22940 |
} else if (Symbol.iterator in Object(arr)) { |
| 22941 |
return sliceIterator(arr, i); |
| 22942 |
} else { |
| 22943 |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); |
| 22944 |
} |
| 22945 |
}; |
| 22946 |
}(); |
| 22947 |
var _createClass2 = /* @__PURE__ */ function() { |
| 22948 |
function defineProperties(target, props) { |
| 22949 |
for (var i = 0; i < props.length; i++) { |
| 22950 |
var descriptor = props[i]; |
| 22951 |
descriptor.enumerable = descriptor.enumerable || false; |
| 22952 |
descriptor.configurable = true; |
| 22953 |
if ("value" in descriptor) descriptor.writable = true; |
| 22954 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 22955 |
} |
| 22956 |
} |
| 22957 |
return function(Constructor, protoProps, staticProps) { |
| 22958 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 22959 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 22960 |
return Constructor; |
| 22961 |
}; |
| 22962 |
}(); |
| 22963 |
var _quillDelta = __webpack_require__(2); |
| 22964 |
var _quillDelta2 = _interopRequireDefault(_quillDelta); |
| 22965 |
var _parchment = __webpack_require__(0); |
| 22966 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 22967 |
var _quill = __webpack_require__(5); |
| 22968 |
var _quill2 = _interopRequireDefault(_quill); |
| 22969 |
var _logger = __webpack_require__(10); |
| 22970 |
var _logger2 = _interopRequireDefault(_logger); |
| 22971 |
var _module = __webpack_require__(9); |
| 22972 |
var _module2 = _interopRequireDefault(_module); |
| 22973 |
function _interopRequireDefault(obj) { |
| 22974 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 22975 |
} |
| 22976 |
function _defineProperty2(obj, key, value) { |
| 22977 |
if (key in obj) { |
| 22978 |
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); |
| 22979 |
} else { |
| 22980 |
obj[key] = value; |
| 22981 |
} |
| 22982 |
return obj; |
| 22983 |
} |
| 22984 |
function _classCallCheck2(instance, Constructor) { |
| 22985 |
if (!(instance instanceof Constructor)) { |
| 22986 |
throw new TypeError("Cannot call a class as a function"); |
| 22987 |
} |
| 22988 |
} |
| 22989 |
function _possibleConstructorReturn2(self2, call) { |
| 22990 |
if (!self2) { |
| 22991 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 22992 |
} |
| 22993 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 22994 |
} |
| 22995 |
function _inherits2(subClass, superClass) { |
| 22996 |
if (typeof superClass !== "function" && superClass !== null) { |
| 22997 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 22998 |
} |
| 22999 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 23000 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 23001 |
} |
| 23002 |
var debug = (0, _logger2.default)("quill:toolbar"); |
| 23003 |
var Toolbar = function(_Module) { |
| 23004 |
_inherits2(Toolbar2, _Module); |
| 23005 |
function Toolbar2(quill2, options) { |
| 23006 |
_classCallCheck2(this, Toolbar2); |
| 23007 |
var _this = _possibleConstructorReturn2(this, (Toolbar2.__proto__ || Object.getPrototypeOf(Toolbar2)).call(this, quill2, options)); |
| 23008 |
if (Array.isArray(_this.options.container)) { |
| 23009 |
var container = document.createElement("div"); |
| 23010 |
addControls(container, _this.options.container); |
| 23011 |
quill2.container.parentNode.insertBefore(container, quill2.container); |
| 23012 |
_this.container = container; |
| 23013 |
} else if (typeof _this.options.container === "string") { |
| 23014 |
_this.container = document.querySelector(_this.options.container); |
| 23015 |
} else { |
| 23016 |
_this.container = _this.options.container; |
| 23017 |
} |
| 23018 |
if (!(_this.container instanceof HTMLElement)) { |
| 23019 |
var _ret; |
| 23020 |
return _ret = debug.error("Container required for toolbar", _this.options), _possibleConstructorReturn2(_this, _ret); |
| 23021 |
} |
| 23022 |
_this.container.classList.add("ql-toolbar"); |
| 23023 |
_this.controls = []; |
| 23024 |
_this.handlers = {}; |
| 23025 |
Object.keys(_this.options.handlers).forEach(function(format) { |
| 23026 |
_this.addHandler(format, _this.options.handlers[format]); |
| 23027 |
}); |
| 23028 |
[].forEach.call(_this.container.querySelectorAll("button, select"), function(input) { |
| 23029 |
_this.attach(input); |
| 23030 |
}); |
| 23031 |
_this.quill.on(_quill2.default.events.EDITOR_CHANGE, function(type, range) { |
| 23032 |
if (type === _quill2.default.events.SELECTION_CHANGE) { |
| 23033 |
_this.update(range); |
| 23034 |
} |
| 23035 |
}); |
| 23036 |
_this.quill.on(_quill2.default.events.SCROLL_OPTIMIZE, function() { |
| 23037 |
var _this$quill$selection = _this.quill.selection.getRange(), _this$quill$selection2 = _slicedToArray2(_this$quill$selection, 1), range = _this$quill$selection2[0]; |
| 23038 |
_this.update(range); |
| 23039 |
}); |
| 23040 |
return _this; |
| 23041 |
} |
| 23042 |
_createClass2(Toolbar2, [{ |
| 23043 |
key: "addHandler", |
| 23044 |
value: function addHandler(format, handler) { |
| 23045 |
this.handlers[format] = handler; |
| 23046 |
} |
| 23047 |
}, { |
| 23048 |
key: "attach", |
| 23049 |
value: function attach(input) { |
| 23050 |
var _this2 = this; |
| 23051 |
var format = [].find.call(input.classList, function(className) { |
| 23052 |
return className.indexOf("ql-") === 0; |
| 23053 |
}); |
| 23054 |
if (!format) return; |
| 23055 |
format = format.slice("ql-".length); |
| 23056 |
if (input.tagName === "BUTTON") { |
| 23057 |
input.setAttribute("type", "button"); |
| 23058 |
} |
| 23059 |
if (this.handlers[format] == null) { |
| 23060 |
if (this.quill.scroll.whitelist != null && this.quill.scroll.whitelist[format] == null) { |
| 23061 |
debug.warn("ignoring attaching to disabled format", format, input); |
| 23062 |
return; |
| 23063 |
} |
| 23064 |
if (_parchment2.default.query(format) == null) { |
| 23065 |
debug.warn("ignoring attaching to nonexistent format", format, input); |
| 23066 |
return; |
| 23067 |
} |
| 23068 |
} |
| 23069 |
var eventName = input.tagName === "SELECT" ? "change" : "click"; |
| 23070 |
input.addEventListener(eventName, function(e2) { |
| 23071 |
var value = void 0; |
| 23072 |
if (input.tagName === "SELECT") { |
| 23073 |
if (input.selectedIndex < 0) return; |
| 23074 |
var selected = input.options[input.selectedIndex]; |
| 23075 |
if (selected.hasAttribute("selected")) { |
| 23076 |
value = false; |
| 23077 |
} else { |
| 23078 |
value = selected.value || false; |
| 23079 |
} |
| 23080 |
} else { |
| 23081 |
if (input.classList.contains("ql-active")) { |
| 23082 |
value = false; |
| 23083 |
} else { |
| 23084 |
value = input.value || !input.hasAttribute("value"); |
| 23085 |
} |
| 23086 |
e2.preventDefault(); |
| 23087 |
} |
| 23088 |
_this2.quill.focus(); |
| 23089 |
var _quill$selection$getR = _this2.quill.selection.getRange(), _quill$selection$getR2 = _slicedToArray2(_quill$selection$getR, 1), range = _quill$selection$getR2[0]; |
| 23090 |
if (_this2.handlers[format] != null) { |
| 23091 |
_this2.handlers[format].call(_this2, value); |
| 23092 |
} else if (_parchment2.default.query(format).prototype instanceof _parchment2.default.Embed) { |
| 23093 |
value = prompt("Enter " + format); |
| 23094 |
if (!value) return; |
| 23095 |
_this2.quill.updateContents(new _quillDelta2.default().retain(range.index).delete(range.length).insert(_defineProperty2({}, format, value)), _quill2.default.sources.USER); |
| 23096 |
} else { |
| 23097 |
_this2.quill.format(format, value, _quill2.default.sources.USER); |
| 23098 |
} |
| 23099 |
_this2.update(range); |
| 23100 |
}); |
| 23101 |
this.controls.push([format, input]); |
| 23102 |
} |
| 23103 |
}, { |
| 23104 |
key: "update", |
| 23105 |
value: function update(range) { |
| 23106 |
var formats = range == null ? {} : this.quill.getFormat(range); |
| 23107 |
this.controls.forEach(function(pair) { |
| 23108 |
var _pair = _slicedToArray2(pair, 2), format = _pair[0], input = _pair[1]; |
| 23109 |
if (input.tagName === "SELECT") { |
| 23110 |
var option = void 0; |
| 23111 |
if (range == null) { |
| 23112 |
option = null; |
| 23113 |
} else if (formats[format] == null) { |
| 23114 |
option = input.querySelector("option[selected]"); |
| 23115 |
} else if (!Array.isArray(formats[format])) { |
| 23116 |
var value = formats[format]; |
| 23117 |
if (typeof value === "string") { |
| 23118 |
value = value.replace(/\"/g, '\\"'); |
| 23119 |
} |
| 23120 |
option = input.querySelector('option[value="' + value + '"]'); |
| 23121 |
} |
| 23122 |
if (option == null) { |
| 23123 |
input.value = ""; |
| 23124 |
input.selectedIndex = -1; |
| 23125 |
} else { |
| 23126 |
option.selected = true; |
| 23127 |
} |
| 23128 |
} else { |
| 23129 |
if (range == null) { |
| 23130 |
input.classList.remove("ql-active"); |
| 23131 |
} else if (input.hasAttribute("value")) { |
| 23132 |
var isActive = formats[format] === input.getAttribute("value") || formats[format] != null && formats[format].toString() === input.getAttribute("value") || formats[format] == null && !input.getAttribute("value"); |
| 23133 |
input.classList.toggle("ql-active", isActive); |
| 23134 |
} else { |
| 23135 |
input.classList.toggle("ql-active", formats[format] != null); |
| 23136 |
} |
| 23137 |
} |
| 23138 |
}); |
| 23139 |
} |
| 23140 |
}]); |
| 23141 |
return Toolbar2; |
| 23142 |
}(_module2.default); |
| 23143 |
Toolbar.DEFAULTS = {}; |
| 23144 |
function addButton(container, format, value) { |
| 23145 |
var input = document.createElement("button"); |
| 23146 |
input.setAttribute("type", "button"); |
| 23147 |
input.classList.add("ql-" + format); |
| 23148 |
if (value != null) { |
| 23149 |
input.value = value; |
| 23150 |
} |
| 23151 |
container.appendChild(input); |
| 23152 |
} |
| 23153 |
function addControls(container, groups) { |
| 23154 |
if (!Array.isArray(groups[0])) { |
| 23155 |
groups = [groups]; |
| 23156 |
} |
| 23157 |
groups.forEach(function(controls) { |
| 23158 |
var group = document.createElement("span"); |
| 23159 |
group.classList.add("ql-formats"); |
| 23160 |
controls.forEach(function(control) { |
| 23161 |
if (typeof control === "string") { |
| 23162 |
addButton(group, control); |
| 23163 |
} else { |
| 23164 |
var format = Object.keys(control)[0]; |
| 23165 |
var value = control[format]; |
| 23166 |
if (Array.isArray(value)) { |
| 23167 |
addSelect(group, format, value); |
| 23168 |
} else { |
| 23169 |
addButton(group, format, value); |
| 23170 |
} |
| 23171 |
} |
| 23172 |
}); |
| 23173 |
container.appendChild(group); |
| 23174 |
}); |
| 23175 |
} |
| 23176 |
function addSelect(container, format, values) { |
| 23177 |
var input = document.createElement("select"); |
| 23178 |
input.classList.add("ql-" + format); |
| 23179 |
values.forEach(function(value) { |
| 23180 |
var option = document.createElement("option"); |
| 23181 |
if (value !== false) { |
| 23182 |
option.setAttribute("value", value); |
| 23183 |
} else { |
| 23184 |
option.setAttribute("selected", "selected"); |
| 23185 |
} |
| 23186 |
input.appendChild(option); |
| 23187 |
}); |
| 23188 |
container.appendChild(input); |
| 23189 |
} |
| 23190 |
Toolbar.DEFAULTS = { |
| 23191 |
container: null, |
| 23192 |
handlers: { |
| 23193 |
clean: function clean() { |
| 23194 |
var _this3 = this; |
| 23195 |
var range = this.quill.getSelection(); |
| 23196 |
if (range == null) return; |
| 23197 |
if (range.length == 0) { |
| 23198 |
var formats = this.quill.getFormat(); |
| 23199 |
Object.keys(formats).forEach(function(name) { |
| 23200 |
if (_parchment2.default.query(name, _parchment2.default.Scope.INLINE) != null) { |
| 23201 |
_this3.quill.format(name, false); |
| 23202 |
} |
| 23203 |
}); |
| 23204 |
} else { |
| 23205 |
this.quill.removeFormat(range, _quill2.default.sources.USER); |
| 23206 |
} |
| 23207 |
}, |
| 23208 |
direction: function direction(value) { |
| 23209 |
var align = this.quill.getFormat()["align"]; |
| 23210 |
if (value === "rtl" && align == null) { |
| 23211 |
this.quill.format("align", "right", _quill2.default.sources.USER); |
| 23212 |
} else if (!value && align === "right") { |
| 23213 |
this.quill.format("align", false, _quill2.default.sources.USER); |
| 23214 |
} |
| 23215 |
this.quill.format("direction", value, _quill2.default.sources.USER); |
| 23216 |
}, |
| 23217 |
indent: function indent(value) { |
| 23218 |
var range = this.quill.getSelection(); |
| 23219 |
var formats = this.quill.getFormat(range); |
| 23220 |
var indent2 = parseInt(formats.indent || 0); |
| 23221 |
if (value === "+1" || value === "-1") { |
| 23222 |
var modifier = value === "+1" ? 1 : -1; |
| 23223 |
if (formats.direction === "rtl") modifier *= -1; |
| 23224 |
this.quill.format("indent", indent2 + modifier, _quill2.default.sources.USER); |
| 23225 |
} |
| 23226 |
}, |
| 23227 |
link: function link(value) { |
| 23228 |
if (value === true) { |
| 23229 |
value = prompt("Enter link URL:"); |
| 23230 |
} |
| 23231 |
this.quill.format("link", value, _quill2.default.sources.USER); |
| 23232 |
}, |
| 23233 |
list: function list(value) { |
| 23234 |
var range = this.quill.getSelection(); |
| 23235 |
var formats = this.quill.getFormat(range); |
| 23236 |
if (value === "check") { |
| 23237 |
if (formats["list"] === "checked" || formats["list"] === "unchecked") { |
| 23238 |
this.quill.format("list", false, _quill2.default.sources.USER); |
| 23239 |
} else { |
| 23240 |
this.quill.format("list", "unchecked", _quill2.default.sources.USER); |
| 23241 |
} |
| 23242 |
} else { |
| 23243 |
this.quill.format("list", value, _quill2.default.sources.USER); |
| 23244 |
} |
| 23245 |
} |
| 23246 |
} |
| 23247 |
}; |
| 23248 |
exports$12.default = Toolbar; |
| 23249 |
exports$12.addControls = addControls; |
| 23250 |
}, |
| 23251 |
/* 58 */ |
| 23252 |
/***/ |
| 23253 |
function(module2, exports$12) { |
| 23254 |
module2.exports = '<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'; |
| 23255 |
}, |
| 23256 |
/* 59 */ |
| 23257 |
/***/ |
| 23258 |
function(module2, exports$12, __webpack_require__) { |
| 23259 |
Object.defineProperty(exports$12, "__esModule", { |
| 23260 |
value: true |
| 23261 |
}); |
| 23262 |
var _createClass2 = /* @__PURE__ */ function() { |
| 23263 |
function defineProperties(target, props) { |
| 23264 |
for (var i = 0; i < props.length; i++) { |
| 23265 |
var descriptor = props[i]; |
| 23266 |
descriptor.enumerable = descriptor.enumerable || false; |
| 23267 |
descriptor.configurable = true; |
| 23268 |
if ("value" in descriptor) descriptor.writable = true; |
| 23269 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 23270 |
} |
| 23271 |
} |
| 23272 |
return function(Constructor, protoProps, staticProps) { |
| 23273 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 23274 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 23275 |
return Constructor; |
| 23276 |
}; |
| 23277 |
}(); |
| 23278 |
var _get = function get(object, property, receiver) { |
| 23279 |
if (object === null) object = Function.prototype; |
| 23280 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 23281 |
if (desc === void 0) { |
| 23282 |
var parent = Object.getPrototypeOf(object); |
| 23283 |
if (parent === null) { |
| 23284 |
return void 0; |
| 23285 |
} else { |
| 23286 |
return get(parent, property, receiver); |
| 23287 |
} |
| 23288 |
} else if ("value" in desc) { |
| 23289 |
return desc.value; |
| 23290 |
} else { |
| 23291 |
var getter = desc.get; |
| 23292 |
if (getter === void 0) { |
| 23293 |
return void 0; |
| 23294 |
} |
| 23295 |
return getter.call(receiver); |
| 23296 |
} |
| 23297 |
}; |
| 23298 |
var _picker = __webpack_require__(28); |
| 23299 |
var _picker2 = _interopRequireDefault(_picker); |
| 23300 |
function _interopRequireDefault(obj) { |
| 23301 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 23302 |
} |
| 23303 |
function _classCallCheck2(instance, Constructor) { |
| 23304 |
if (!(instance instanceof Constructor)) { |
| 23305 |
throw new TypeError("Cannot call a class as a function"); |
| 23306 |
} |
| 23307 |
} |
| 23308 |
function _possibleConstructorReturn2(self2, call) { |
| 23309 |
if (!self2) { |
| 23310 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 23311 |
} |
| 23312 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 23313 |
} |
| 23314 |
function _inherits2(subClass, superClass) { |
| 23315 |
if (typeof superClass !== "function" && superClass !== null) { |
| 23316 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 23317 |
} |
| 23318 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 23319 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 23320 |
} |
| 23321 |
var ColorPicker = function(_Picker) { |
| 23322 |
_inherits2(ColorPicker2, _Picker); |
| 23323 |
function ColorPicker2(select, label) { |
| 23324 |
_classCallCheck2(this, ColorPicker2); |
| 23325 |
var _this = _possibleConstructorReturn2(this, (ColorPicker2.__proto__ || Object.getPrototypeOf(ColorPicker2)).call(this, select)); |
| 23326 |
_this.label.innerHTML = label; |
| 23327 |
_this.container.classList.add("ql-color-picker"); |
| 23328 |
[].slice.call(_this.container.querySelectorAll(".ql-picker-item"), 0, 7).forEach(function(item) { |
| 23329 |
item.classList.add("ql-primary"); |
| 23330 |
}); |
| 23331 |
return _this; |
| 23332 |
} |
| 23333 |
_createClass2(ColorPicker2, [{ |
| 23334 |
key: "buildItem", |
| 23335 |
value: function buildItem(option) { |
| 23336 |
var item = _get(ColorPicker2.prototype.__proto__ || Object.getPrototypeOf(ColorPicker2.prototype), "buildItem", this).call(this, option); |
| 23337 |
item.style.backgroundColor = option.getAttribute("value") || ""; |
| 23338 |
return item; |
| 23339 |
} |
| 23340 |
}, { |
| 23341 |
key: "selectItem", |
| 23342 |
value: function selectItem(item, trigger) { |
| 23343 |
_get(ColorPicker2.prototype.__proto__ || Object.getPrototypeOf(ColorPicker2.prototype), "selectItem", this).call(this, item, trigger); |
| 23344 |
var colorLabel = this.label.querySelector(".ql-color-label"); |
| 23345 |
var value = item ? item.getAttribute("data-value") || "" : ""; |
| 23346 |
if (colorLabel) { |
| 23347 |
if (colorLabel.tagName === "line") { |
| 23348 |
colorLabel.style.stroke = value; |
| 23349 |
} else { |
| 23350 |
colorLabel.style.fill = value; |
| 23351 |
} |
| 23352 |
} |
| 23353 |
} |
| 23354 |
}]); |
| 23355 |
return ColorPicker2; |
| 23356 |
}(_picker2.default); |
| 23357 |
exports$12.default = ColorPicker; |
| 23358 |
}, |
| 23359 |
/* 60 */ |
| 23360 |
/***/ |
| 23361 |
function(module2, exports$12, __webpack_require__) { |
| 23362 |
Object.defineProperty(exports$12, "__esModule", { |
| 23363 |
value: true |
| 23364 |
}); |
| 23365 |
var _createClass2 = /* @__PURE__ */ function() { |
| 23366 |
function defineProperties(target, props) { |
| 23367 |
for (var i = 0; i < props.length; i++) { |
| 23368 |
var descriptor = props[i]; |
| 23369 |
descriptor.enumerable = descriptor.enumerable || false; |
| 23370 |
descriptor.configurable = true; |
| 23371 |
if ("value" in descriptor) descriptor.writable = true; |
| 23372 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 23373 |
} |
| 23374 |
} |
| 23375 |
return function(Constructor, protoProps, staticProps) { |
| 23376 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 23377 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 23378 |
return Constructor; |
| 23379 |
}; |
| 23380 |
}(); |
| 23381 |
var _get = function get(object, property, receiver) { |
| 23382 |
if (object === null) object = Function.prototype; |
| 23383 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 23384 |
if (desc === void 0) { |
| 23385 |
var parent = Object.getPrototypeOf(object); |
| 23386 |
if (parent === null) { |
| 23387 |
return void 0; |
| 23388 |
} else { |
| 23389 |
return get(parent, property, receiver); |
| 23390 |
} |
| 23391 |
} else if ("value" in desc) { |
| 23392 |
return desc.value; |
| 23393 |
} else { |
| 23394 |
var getter = desc.get; |
| 23395 |
if (getter === void 0) { |
| 23396 |
return void 0; |
| 23397 |
} |
| 23398 |
return getter.call(receiver); |
| 23399 |
} |
| 23400 |
}; |
| 23401 |
var _picker = __webpack_require__(28); |
| 23402 |
var _picker2 = _interopRequireDefault(_picker); |
| 23403 |
function _interopRequireDefault(obj) { |
| 23404 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 23405 |
} |
| 23406 |
function _classCallCheck2(instance, Constructor) { |
| 23407 |
if (!(instance instanceof Constructor)) { |
| 23408 |
throw new TypeError("Cannot call a class as a function"); |
| 23409 |
} |
| 23410 |
} |
| 23411 |
function _possibleConstructorReturn2(self2, call) { |
| 23412 |
if (!self2) { |
| 23413 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 23414 |
} |
| 23415 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 23416 |
} |
| 23417 |
function _inherits2(subClass, superClass) { |
| 23418 |
if (typeof superClass !== "function" && superClass !== null) { |
| 23419 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 23420 |
} |
| 23421 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 23422 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 23423 |
} |
| 23424 |
var IconPicker = function(_Picker) { |
| 23425 |
_inherits2(IconPicker2, _Picker); |
| 23426 |
function IconPicker2(select, icons) { |
| 23427 |
_classCallCheck2(this, IconPicker2); |
| 23428 |
var _this = _possibleConstructorReturn2(this, (IconPicker2.__proto__ || Object.getPrototypeOf(IconPicker2)).call(this, select)); |
| 23429 |
_this.container.classList.add("ql-icon-picker"); |
| 23430 |
[].forEach.call(_this.container.querySelectorAll(".ql-picker-item"), function(item) { |
| 23431 |
item.innerHTML = icons[item.getAttribute("data-value") || ""]; |
| 23432 |
}); |
| 23433 |
_this.defaultItem = _this.container.querySelector(".ql-selected"); |
| 23434 |
_this.selectItem(_this.defaultItem); |
| 23435 |
return _this; |
| 23436 |
} |
| 23437 |
_createClass2(IconPicker2, [{ |
| 23438 |
key: "selectItem", |
| 23439 |
value: function selectItem(item, trigger) { |
| 23440 |
_get(IconPicker2.prototype.__proto__ || Object.getPrototypeOf(IconPicker2.prototype), "selectItem", this).call(this, item, trigger); |
| 23441 |
item = item || this.defaultItem; |
| 23442 |
this.label.innerHTML = item.innerHTML; |
| 23443 |
} |
| 23444 |
}]); |
| 23445 |
return IconPicker2; |
| 23446 |
}(_picker2.default); |
| 23447 |
exports$12.default = IconPicker; |
| 23448 |
}, |
| 23449 |
/* 61 */ |
| 23450 |
/***/ |
| 23451 |
function(module2, exports$12, __webpack_require__) { |
| 23452 |
Object.defineProperty(exports$12, "__esModule", { |
| 23453 |
value: true |
| 23454 |
}); |
| 23455 |
var _createClass2 = /* @__PURE__ */ function() { |
| 23456 |
function defineProperties(target, props) { |
| 23457 |
for (var i = 0; i < props.length; i++) { |
| 23458 |
var descriptor = props[i]; |
| 23459 |
descriptor.enumerable = descriptor.enumerable || false; |
| 23460 |
descriptor.configurable = true; |
| 23461 |
if ("value" in descriptor) descriptor.writable = true; |
| 23462 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 23463 |
} |
| 23464 |
} |
| 23465 |
return function(Constructor, protoProps, staticProps) { |
| 23466 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 23467 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 23468 |
return Constructor; |
| 23469 |
}; |
| 23470 |
}(); |
| 23471 |
function _classCallCheck2(instance, Constructor) { |
| 23472 |
if (!(instance instanceof Constructor)) { |
| 23473 |
throw new TypeError("Cannot call a class as a function"); |
| 23474 |
} |
| 23475 |
} |
| 23476 |
var Tooltip = function() { |
| 23477 |
function Tooltip2(quill2, boundsContainer) { |
| 23478 |
var _this = this; |
| 23479 |
_classCallCheck2(this, Tooltip2); |
| 23480 |
this.quill = quill2; |
| 23481 |
this.boundsContainer = boundsContainer || document.body; |
| 23482 |
this.root = quill2.addContainer("ql-tooltip"); |
| 23483 |
this.root.innerHTML = this.constructor.TEMPLATE; |
| 23484 |
if (this.quill.root === this.quill.scrollingContainer) { |
| 23485 |
this.quill.root.addEventListener("scroll", function() { |
| 23486 |
_this.root.style.marginTop = -1 * _this.quill.root.scrollTop + "px"; |
| 23487 |
}); |
| 23488 |
} |
| 23489 |
this.hide(); |
| 23490 |
} |
| 23491 |
_createClass2(Tooltip2, [{ |
| 23492 |
key: "hide", |
| 23493 |
value: function hide() { |
| 23494 |
this.root.classList.add("ql-hidden"); |
| 23495 |
} |
| 23496 |
}, { |
| 23497 |
key: "position", |
| 23498 |
value: function position(reference) { |
| 23499 |
var left = reference.left + reference.width / 2 - this.root.offsetWidth / 2; |
| 23500 |
var top = reference.bottom + this.quill.root.scrollTop; |
| 23501 |
this.root.style.left = left + "px"; |
| 23502 |
this.root.style.top = top + "px"; |
| 23503 |
this.root.classList.remove("ql-flip"); |
| 23504 |
var containerBounds = this.boundsContainer.getBoundingClientRect(); |
| 23505 |
var rootBounds = this.root.getBoundingClientRect(); |
| 23506 |
var shift = 0; |
| 23507 |
if (rootBounds.right > containerBounds.right) { |
| 23508 |
shift = containerBounds.right - rootBounds.right; |
| 23509 |
this.root.style.left = left + shift + "px"; |
| 23510 |
} |
| 23511 |
if (rootBounds.left < containerBounds.left) { |
| 23512 |
shift = containerBounds.left - rootBounds.left; |
| 23513 |
this.root.style.left = left + shift + "px"; |
| 23514 |
} |
| 23515 |
if (rootBounds.bottom > containerBounds.bottom) { |
| 23516 |
var height = rootBounds.bottom - rootBounds.top; |
| 23517 |
var verticalShift = reference.bottom - reference.top + height; |
| 23518 |
this.root.style.top = top - verticalShift + "px"; |
| 23519 |
this.root.classList.add("ql-flip"); |
| 23520 |
} |
| 23521 |
return shift; |
| 23522 |
} |
| 23523 |
}, { |
| 23524 |
key: "show", |
| 23525 |
value: function show() { |
| 23526 |
this.root.classList.remove("ql-editing"); |
| 23527 |
this.root.classList.remove("ql-hidden"); |
| 23528 |
} |
| 23529 |
}]); |
| 23530 |
return Tooltip2; |
| 23531 |
}(); |
| 23532 |
exports$12.default = Tooltip; |
| 23533 |
}, |
| 23534 |
/* 62 */ |
| 23535 |
/***/ |
| 23536 |
function(module2, exports$12, __webpack_require__) { |
| 23537 |
Object.defineProperty(exports$12, "__esModule", { |
| 23538 |
value: true |
| 23539 |
}); |
| 23540 |
var _slicedToArray2 = /* @__PURE__ */ function() { |
| 23541 |
function sliceIterator(arr, i) { |
| 23542 |
var _arr = []; |
| 23543 |
var _n = true; |
| 23544 |
var _d2 = false; |
| 23545 |
var _e2 = void 0; |
| 23546 |
try { |
| 23547 |
for (var _i2 = arr[Symbol.iterator](), _s; !(_n = (_s = _i2.next()).done); _n = true) { |
| 23548 |
_arr.push(_s.value); |
| 23549 |
if (i && _arr.length === i) break; |
| 23550 |
} |
| 23551 |
} catch (err) { |
| 23552 |
_d2 = true; |
| 23553 |
_e2 = err; |
| 23554 |
} finally { |
| 23555 |
try { |
| 23556 |
if (!_n && _i2["return"]) _i2["return"](); |
| 23557 |
} finally { |
| 23558 |
if (_d2) throw _e2; |
| 23559 |
} |
| 23560 |
} |
| 23561 |
return _arr; |
| 23562 |
} |
| 23563 |
return function(arr, i) { |
| 23564 |
if (Array.isArray(arr)) { |
| 23565 |
return arr; |
| 23566 |
} else if (Symbol.iterator in Object(arr)) { |
| 23567 |
return sliceIterator(arr, i); |
| 23568 |
} else { |
| 23569 |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); |
| 23570 |
} |
| 23571 |
}; |
| 23572 |
}(); |
| 23573 |
var _get = function get(object, property, receiver) { |
| 23574 |
if (object === null) object = Function.prototype; |
| 23575 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 23576 |
if (desc === void 0) { |
| 23577 |
var parent = Object.getPrototypeOf(object); |
| 23578 |
if (parent === null) { |
| 23579 |
return void 0; |
| 23580 |
} else { |
| 23581 |
return get(parent, property, receiver); |
| 23582 |
} |
| 23583 |
} else if ("value" in desc) { |
| 23584 |
return desc.value; |
| 23585 |
} else { |
| 23586 |
var getter = desc.get; |
| 23587 |
if (getter === void 0) { |
| 23588 |
return void 0; |
| 23589 |
} |
| 23590 |
return getter.call(receiver); |
| 23591 |
} |
| 23592 |
}; |
| 23593 |
var _createClass2 = /* @__PURE__ */ function() { |
| 23594 |
function defineProperties(target, props) { |
| 23595 |
for (var i = 0; i < props.length; i++) { |
| 23596 |
var descriptor = props[i]; |
| 23597 |
descriptor.enumerable = descriptor.enumerable || false; |
| 23598 |
descriptor.configurable = true; |
| 23599 |
if ("value" in descriptor) descriptor.writable = true; |
| 23600 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 23601 |
} |
| 23602 |
} |
| 23603 |
return function(Constructor, protoProps, staticProps) { |
| 23604 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 23605 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 23606 |
return Constructor; |
| 23607 |
}; |
| 23608 |
}(); |
| 23609 |
var _extend = __webpack_require__(3); |
| 23610 |
var _extend2 = _interopRequireDefault(_extend); |
| 23611 |
var _emitter = __webpack_require__(8); |
| 23612 |
var _emitter2 = _interopRequireDefault(_emitter); |
| 23613 |
var _base = __webpack_require__(43); |
| 23614 |
var _base2 = _interopRequireDefault(_base); |
| 23615 |
var _link = __webpack_require__(27); |
| 23616 |
var _link2 = _interopRequireDefault(_link); |
| 23617 |
var _selection = __webpack_require__(15); |
| 23618 |
var _icons = __webpack_require__(41); |
| 23619 |
var _icons2 = _interopRequireDefault(_icons); |
| 23620 |
function _interopRequireDefault(obj) { |
| 23621 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 23622 |
} |
| 23623 |
function _classCallCheck2(instance, Constructor) { |
| 23624 |
if (!(instance instanceof Constructor)) { |
| 23625 |
throw new TypeError("Cannot call a class as a function"); |
| 23626 |
} |
| 23627 |
} |
| 23628 |
function _possibleConstructorReturn2(self2, call) { |
| 23629 |
if (!self2) { |
| 23630 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 23631 |
} |
| 23632 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 23633 |
} |
| 23634 |
function _inherits2(subClass, superClass) { |
| 23635 |
if (typeof superClass !== "function" && superClass !== null) { |
| 23636 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 23637 |
} |
| 23638 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 23639 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 23640 |
} |
| 23641 |
var TOOLBAR_CONFIG = [[{ header: ["1", "2", "3", false] }], ["bold", "italic", "underline", "link"], [{ list: "ordered" }, { list: "bullet" }], ["clean"]]; |
| 23642 |
var SnowTheme = function(_BaseTheme) { |
| 23643 |
_inherits2(SnowTheme2, _BaseTheme); |
| 23644 |
function SnowTheme2(quill2, options) { |
| 23645 |
_classCallCheck2(this, SnowTheme2); |
| 23646 |
if (options.modules.toolbar != null && options.modules.toolbar.container == null) { |
| 23647 |
options.modules.toolbar.container = TOOLBAR_CONFIG; |
| 23648 |
} |
| 23649 |
var _this = _possibleConstructorReturn2(this, (SnowTheme2.__proto__ || Object.getPrototypeOf(SnowTheme2)).call(this, quill2, options)); |
| 23650 |
_this.quill.container.classList.add("ql-snow"); |
| 23651 |
return _this; |
| 23652 |
} |
| 23653 |
_createClass2(SnowTheme2, [{ |
| 23654 |
key: "extendToolbar", |
| 23655 |
value: function extendToolbar(toolbar) { |
| 23656 |
toolbar.container.classList.add("ql-snow"); |
| 23657 |
this.buildButtons([].slice.call(toolbar.container.querySelectorAll("button")), _icons2.default); |
| 23658 |
this.buildPickers([].slice.call(toolbar.container.querySelectorAll("select")), _icons2.default); |
| 23659 |
this.tooltip = new SnowTooltip(this.quill, this.options.bounds); |
| 23660 |
if (toolbar.container.querySelector(".ql-link")) { |
| 23661 |
this.quill.keyboard.addBinding({ key: "K", shortKey: true }, function(range, context) { |
| 23662 |
toolbar.handlers["link"].call(toolbar, !context.format.link); |
| 23663 |
}); |
| 23664 |
} |
| 23665 |
} |
| 23666 |
}]); |
| 23667 |
return SnowTheme2; |
| 23668 |
}(_base2.default); |
| 23669 |
SnowTheme.DEFAULTS = (0, _extend2.default)(true, {}, _base2.default.DEFAULTS, { |
| 23670 |
modules: { |
| 23671 |
toolbar: { |
| 23672 |
handlers: { |
| 23673 |
link: function link(value) { |
| 23674 |
if (value) { |
| 23675 |
var range = this.quill.getSelection(); |
| 23676 |
if (range == null || range.length == 0) return; |
| 23677 |
var preview = this.quill.getText(range); |
| 23678 |
if (/^\S+@\S+\.\S+$/.test(preview) && preview.indexOf("mailto:") !== 0) { |
| 23679 |
preview = "mailto:" + preview; |
| 23680 |
} |
| 23681 |
var tooltip = this.quill.theme.tooltip; |
| 23682 |
tooltip.edit("link", preview); |
| 23683 |
} else { |
| 23684 |
this.quill.format("link", false); |
| 23685 |
} |
| 23686 |
} |
| 23687 |
} |
| 23688 |
} |
| 23689 |
} |
| 23690 |
}); |
| 23691 |
var SnowTooltip = function(_BaseTooltip) { |
| 23692 |
_inherits2(SnowTooltip2, _BaseTooltip); |
| 23693 |
function SnowTooltip2(quill2, bounds) { |
| 23694 |
_classCallCheck2(this, SnowTooltip2); |
| 23695 |
var _this2 = _possibleConstructorReturn2(this, (SnowTooltip2.__proto__ || Object.getPrototypeOf(SnowTooltip2)).call(this, quill2, bounds)); |
| 23696 |
_this2.preview = _this2.root.querySelector("a.ql-preview"); |
| 23697 |
return _this2; |
| 23698 |
} |
| 23699 |
_createClass2(SnowTooltip2, [{ |
| 23700 |
key: "listen", |
| 23701 |
value: function listen() { |
| 23702 |
var _this3 = this; |
| 23703 |
_get(SnowTooltip2.prototype.__proto__ || Object.getPrototypeOf(SnowTooltip2.prototype), "listen", this).call(this); |
| 23704 |
this.root.querySelector("a.ql-action").addEventListener("click", function(event) { |
| 23705 |
if (_this3.root.classList.contains("ql-editing")) { |
| 23706 |
_this3.save(); |
| 23707 |
} else { |
| 23708 |
_this3.edit("link", _this3.preview.textContent); |
| 23709 |
} |
| 23710 |
event.preventDefault(); |
| 23711 |
}); |
| 23712 |
this.root.querySelector("a.ql-remove").addEventListener("click", function(event) { |
| 23713 |
if (_this3.linkRange != null) { |
| 23714 |
var range = _this3.linkRange; |
| 23715 |
_this3.restoreFocus(); |
| 23716 |
_this3.quill.formatText(range, "link", false, _emitter2.default.sources.USER); |
| 23717 |
delete _this3.linkRange; |
| 23718 |
} |
| 23719 |
event.preventDefault(); |
| 23720 |
_this3.hide(); |
| 23721 |
}); |
| 23722 |
this.quill.on(_emitter2.default.events.SELECTION_CHANGE, function(range, oldRange, source) { |
| 23723 |
if (range == null) return; |
| 23724 |
if (range.length === 0 && source === _emitter2.default.sources.USER) { |
| 23725 |
var _quill$scroll$descend = _this3.quill.scroll.descendant(_link2.default, range.index), _quill$scroll$descend2 = _slicedToArray2(_quill$scroll$descend, 2), link = _quill$scroll$descend2[0], offset = _quill$scroll$descend2[1]; |
| 23726 |
if (link != null) { |
| 23727 |
_this3.linkRange = new _selection.Range(range.index - offset, link.length()); |
| 23728 |
var preview = _link2.default.formats(link.domNode); |
| 23729 |
_this3.preview.textContent = preview; |
| 23730 |
_this3.preview.setAttribute("href", preview); |
| 23731 |
_this3.show(); |
| 23732 |
_this3.position(_this3.quill.getBounds(_this3.linkRange)); |
| 23733 |
return; |
| 23734 |
} |
| 23735 |
} else { |
| 23736 |
delete _this3.linkRange; |
| 23737 |
} |
| 23738 |
_this3.hide(); |
| 23739 |
}); |
| 23740 |
} |
| 23741 |
}, { |
| 23742 |
key: "show", |
| 23743 |
value: function show() { |
| 23744 |
_get(SnowTooltip2.prototype.__proto__ || Object.getPrototypeOf(SnowTooltip2.prototype), "show", this).call(this); |
| 23745 |
this.root.removeAttribute("data-mode"); |
| 23746 |
} |
| 23747 |
}]); |
| 23748 |
return SnowTooltip2; |
| 23749 |
}(_base.BaseTooltip); |
| 23750 |
SnowTooltip.TEMPLATE = ['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-action"></a>', '<a class="ql-remove"></a>'].join(""); |
| 23751 |
exports$12.default = SnowTheme; |
| 23752 |
}, |
| 23753 |
/* 63 */ |
| 23754 |
/***/ |
| 23755 |
function(module2, exports$12, __webpack_require__) { |
| 23756 |
Object.defineProperty(exports$12, "__esModule", { |
| 23757 |
value: true |
| 23758 |
}); |
| 23759 |
var _core = __webpack_require__(29); |
| 23760 |
var _core2 = _interopRequireDefault(_core); |
| 23761 |
var _align = __webpack_require__(36); |
| 23762 |
var _direction = __webpack_require__(38); |
| 23763 |
var _indent = __webpack_require__(64); |
| 23764 |
var _blockquote = __webpack_require__(65); |
| 23765 |
var _blockquote2 = _interopRequireDefault(_blockquote); |
| 23766 |
var _header = __webpack_require__(66); |
| 23767 |
var _header2 = _interopRequireDefault(_header); |
| 23768 |
var _list = __webpack_require__(67); |
| 23769 |
var _list2 = _interopRequireDefault(_list); |
| 23770 |
var _background = __webpack_require__(37); |
| 23771 |
var _color = __webpack_require__(26); |
| 23772 |
var _font = __webpack_require__(39); |
| 23773 |
var _size = __webpack_require__(40); |
| 23774 |
var _bold = __webpack_require__(56); |
| 23775 |
var _bold2 = _interopRequireDefault(_bold); |
| 23776 |
var _italic = __webpack_require__(68); |
| 23777 |
var _italic2 = _interopRequireDefault(_italic); |
| 23778 |
var _link = __webpack_require__(27); |
| 23779 |
var _link2 = _interopRequireDefault(_link); |
| 23780 |
var _script = __webpack_require__(69); |
| 23781 |
var _script2 = _interopRequireDefault(_script); |
| 23782 |
var _strike = __webpack_require__(70); |
| 23783 |
var _strike2 = _interopRequireDefault(_strike); |
| 23784 |
var _underline = __webpack_require__(71); |
| 23785 |
var _underline2 = _interopRequireDefault(_underline); |
| 23786 |
var _image = __webpack_require__(72); |
| 23787 |
var _image2 = _interopRequireDefault(_image); |
| 23788 |
var _video = __webpack_require__(73); |
| 23789 |
var _video2 = _interopRequireDefault(_video); |
| 23790 |
var _code = __webpack_require__(13); |
| 23791 |
var _code2 = _interopRequireDefault(_code); |
| 23792 |
var _formula = __webpack_require__(74); |
| 23793 |
var _formula2 = _interopRequireDefault(_formula); |
| 23794 |
var _syntax = __webpack_require__(75); |
| 23795 |
var _syntax2 = _interopRequireDefault(_syntax); |
| 23796 |
var _toolbar = __webpack_require__(57); |
| 23797 |
var _toolbar2 = _interopRequireDefault(_toolbar); |
| 23798 |
var _icons = __webpack_require__(41); |
| 23799 |
var _icons2 = _interopRequireDefault(_icons); |
| 23800 |
var _picker = __webpack_require__(28); |
| 23801 |
var _picker2 = _interopRequireDefault(_picker); |
| 23802 |
var _colorPicker = __webpack_require__(59); |
| 23803 |
var _colorPicker2 = _interopRequireDefault(_colorPicker); |
| 23804 |
var _iconPicker = __webpack_require__(60); |
| 23805 |
var _iconPicker2 = _interopRequireDefault(_iconPicker); |
| 23806 |
var _tooltip = __webpack_require__(61); |
| 23807 |
var _tooltip2 = _interopRequireDefault(_tooltip); |
| 23808 |
var _bubble = __webpack_require__(108); |
| 23809 |
var _bubble2 = _interopRequireDefault(_bubble); |
| 23810 |
var _snow = __webpack_require__(62); |
| 23811 |
var _snow2 = _interopRequireDefault(_snow); |
| 23812 |
function _interopRequireDefault(obj) { |
| 23813 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 23814 |
} |
| 23815 |
_core2.default.register({ |
| 23816 |
"attributors/attribute/direction": _direction.DirectionAttribute, |
| 23817 |
"attributors/class/align": _align.AlignClass, |
| 23818 |
"attributors/class/background": _background.BackgroundClass, |
| 23819 |
"attributors/class/color": _color.ColorClass, |
| 23820 |
"attributors/class/direction": _direction.DirectionClass, |
| 23821 |
"attributors/class/font": _font.FontClass, |
| 23822 |
"attributors/class/size": _size.SizeClass, |
| 23823 |
"attributors/style/align": _align.AlignStyle, |
| 23824 |
"attributors/style/background": _background.BackgroundStyle, |
| 23825 |
"attributors/style/color": _color.ColorStyle, |
| 23826 |
"attributors/style/direction": _direction.DirectionStyle, |
| 23827 |
"attributors/style/font": _font.FontStyle, |
| 23828 |
"attributors/style/size": _size.SizeStyle |
| 23829 |
}, true); |
| 23830 |
_core2.default.register({ |
| 23831 |
"formats/align": _align.AlignClass, |
| 23832 |
"formats/direction": _direction.DirectionClass, |
| 23833 |
"formats/indent": _indent.IndentClass, |
| 23834 |
"formats/background": _background.BackgroundStyle, |
| 23835 |
"formats/color": _color.ColorStyle, |
| 23836 |
"formats/font": _font.FontClass, |
| 23837 |
"formats/size": _size.SizeClass, |
| 23838 |
"formats/blockquote": _blockquote2.default, |
| 23839 |
"formats/code-block": _code2.default, |
| 23840 |
"formats/header": _header2.default, |
| 23841 |
"formats/list": _list2.default, |
| 23842 |
"formats/bold": _bold2.default, |
| 23843 |
"formats/code": _code.Code, |
| 23844 |
"formats/italic": _italic2.default, |
| 23845 |
"formats/link": _link2.default, |
| 23846 |
"formats/script": _script2.default, |
| 23847 |
"formats/strike": _strike2.default, |
| 23848 |
"formats/underline": _underline2.default, |
| 23849 |
"formats/image": _image2.default, |
| 23850 |
"formats/video": _video2.default, |
| 23851 |
"formats/list/item": _list.ListItem, |
| 23852 |
"modules/formula": _formula2.default, |
| 23853 |
"modules/syntax": _syntax2.default, |
| 23854 |
"modules/toolbar": _toolbar2.default, |
| 23855 |
"themes/bubble": _bubble2.default, |
| 23856 |
"themes/snow": _snow2.default, |
| 23857 |
"ui/icons": _icons2.default, |
| 23858 |
"ui/picker": _picker2.default, |
| 23859 |
"ui/icon-picker": _iconPicker2.default, |
| 23860 |
"ui/color-picker": _colorPicker2.default, |
| 23861 |
"ui/tooltip": _tooltip2.default |
| 23862 |
}, true); |
| 23863 |
exports$12.default = _core2.default; |
| 23864 |
}, |
| 23865 |
/* 64 */ |
| 23866 |
/***/ |
| 23867 |
function(module2, exports$12, __webpack_require__) { |
| 23868 |
Object.defineProperty(exports$12, "__esModule", { |
| 23869 |
value: true |
| 23870 |
}); |
| 23871 |
exports$12.IndentClass = void 0; |
| 23872 |
var _createClass2 = /* @__PURE__ */ function() { |
| 23873 |
function defineProperties(target, props) { |
| 23874 |
for (var i = 0; i < props.length; i++) { |
| 23875 |
var descriptor = props[i]; |
| 23876 |
descriptor.enumerable = descriptor.enumerable || false; |
| 23877 |
descriptor.configurable = true; |
| 23878 |
if ("value" in descriptor) descriptor.writable = true; |
| 23879 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 23880 |
} |
| 23881 |
} |
| 23882 |
return function(Constructor, protoProps, staticProps) { |
| 23883 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 23884 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 23885 |
return Constructor; |
| 23886 |
}; |
| 23887 |
}(); |
| 23888 |
var _get = function get(object, property, receiver) { |
| 23889 |
if (object === null) object = Function.prototype; |
| 23890 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 23891 |
if (desc === void 0) { |
| 23892 |
var parent = Object.getPrototypeOf(object); |
| 23893 |
if (parent === null) { |
| 23894 |
return void 0; |
| 23895 |
} else { |
| 23896 |
return get(parent, property, receiver); |
| 23897 |
} |
| 23898 |
} else if ("value" in desc) { |
| 23899 |
return desc.value; |
| 23900 |
} else { |
| 23901 |
var getter = desc.get; |
| 23902 |
if (getter === void 0) { |
| 23903 |
return void 0; |
| 23904 |
} |
| 23905 |
return getter.call(receiver); |
| 23906 |
} |
| 23907 |
}; |
| 23908 |
var _parchment = __webpack_require__(0); |
| 23909 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 23910 |
function _interopRequireDefault(obj) { |
| 23911 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 23912 |
} |
| 23913 |
function _classCallCheck2(instance, Constructor) { |
| 23914 |
if (!(instance instanceof Constructor)) { |
| 23915 |
throw new TypeError("Cannot call a class as a function"); |
| 23916 |
} |
| 23917 |
} |
| 23918 |
function _possibleConstructorReturn2(self2, call) { |
| 23919 |
if (!self2) { |
| 23920 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 23921 |
} |
| 23922 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 23923 |
} |
| 23924 |
function _inherits2(subClass, superClass) { |
| 23925 |
if (typeof superClass !== "function" && superClass !== null) { |
| 23926 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 23927 |
} |
| 23928 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 23929 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 23930 |
} |
| 23931 |
var IdentAttributor = function(_Parchment$Attributor) { |
| 23932 |
_inherits2(IdentAttributor2, _Parchment$Attributor); |
| 23933 |
function IdentAttributor2() { |
| 23934 |
_classCallCheck2(this, IdentAttributor2); |
| 23935 |
return _possibleConstructorReturn2(this, (IdentAttributor2.__proto__ || Object.getPrototypeOf(IdentAttributor2)).apply(this, arguments)); |
| 23936 |
} |
| 23937 |
_createClass2(IdentAttributor2, [{ |
| 23938 |
key: "add", |
| 23939 |
value: function add(node, value) { |
| 23940 |
if (value === "+1" || value === "-1") { |
| 23941 |
var indent = this.value(node) || 0; |
| 23942 |
value = value === "+1" ? indent + 1 : indent - 1; |
| 23943 |
} |
| 23944 |
if (value === 0) { |
| 23945 |
this.remove(node); |
| 23946 |
return true; |
| 23947 |
} else { |
| 23948 |
return _get(IdentAttributor2.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor2.prototype), "add", this).call(this, node, value); |
| 23949 |
} |
| 23950 |
} |
| 23951 |
}, { |
| 23952 |
key: "canAdd", |
| 23953 |
value: function canAdd(node, value) { |
| 23954 |
return _get(IdentAttributor2.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor2.prototype), "canAdd", this).call(this, node, value) || _get(IdentAttributor2.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor2.prototype), "canAdd", this).call(this, node, parseInt(value)); |
| 23955 |
} |
| 23956 |
}, { |
| 23957 |
key: "value", |
| 23958 |
value: function value(node) { |
| 23959 |
return parseInt(_get(IdentAttributor2.prototype.__proto__ || Object.getPrototypeOf(IdentAttributor2.prototype), "value", this).call(this, node)) || void 0; |
| 23960 |
} |
| 23961 |
}]); |
| 23962 |
return IdentAttributor2; |
| 23963 |
}(_parchment2.default.Attributor.Class); |
| 23964 |
var IndentClass = new IdentAttributor("indent", "ql-indent", { |
| 23965 |
scope: _parchment2.default.Scope.BLOCK, |
| 23966 |
whitelist: [1, 2, 3, 4, 5, 6, 7, 8] |
| 23967 |
}); |
| 23968 |
exports$12.IndentClass = IndentClass; |
| 23969 |
}, |
| 23970 |
/* 65 */ |
| 23971 |
/***/ |
| 23972 |
function(module2, exports$12, __webpack_require__) { |
| 23973 |
Object.defineProperty(exports$12, "__esModule", { |
| 23974 |
value: true |
| 23975 |
}); |
| 23976 |
var _block = __webpack_require__(4); |
| 23977 |
var _block2 = _interopRequireDefault(_block); |
| 23978 |
function _interopRequireDefault(obj) { |
| 23979 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 23980 |
} |
| 23981 |
function _classCallCheck2(instance, Constructor) { |
| 23982 |
if (!(instance instanceof Constructor)) { |
| 23983 |
throw new TypeError("Cannot call a class as a function"); |
| 23984 |
} |
| 23985 |
} |
| 23986 |
function _possibleConstructorReturn2(self2, call) { |
| 23987 |
if (!self2) { |
| 23988 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 23989 |
} |
| 23990 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 23991 |
} |
| 23992 |
function _inherits2(subClass, superClass) { |
| 23993 |
if (typeof superClass !== "function" && superClass !== null) { |
| 23994 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 23995 |
} |
| 23996 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 23997 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 23998 |
} |
| 23999 |
var Blockquote = function(_Block) { |
| 24000 |
_inherits2(Blockquote2, _Block); |
| 24001 |
function Blockquote2() { |
| 24002 |
_classCallCheck2(this, Blockquote2); |
| 24003 |
return _possibleConstructorReturn2(this, (Blockquote2.__proto__ || Object.getPrototypeOf(Blockquote2)).apply(this, arguments)); |
| 24004 |
} |
| 24005 |
return Blockquote2; |
| 24006 |
}(_block2.default); |
| 24007 |
Blockquote.blotName = "blockquote"; |
| 24008 |
Blockquote.tagName = "blockquote"; |
| 24009 |
exports$12.default = Blockquote; |
| 24010 |
}, |
| 24011 |
/* 66 */ |
| 24012 |
/***/ |
| 24013 |
function(module2, exports$12, __webpack_require__) { |
| 24014 |
Object.defineProperty(exports$12, "__esModule", { |
| 24015 |
value: true |
| 24016 |
}); |
| 24017 |
var _createClass2 = /* @__PURE__ */ function() { |
| 24018 |
function defineProperties(target, props) { |
| 24019 |
for (var i = 0; i < props.length; i++) { |
| 24020 |
var descriptor = props[i]; |
| 24021 |
descriptor.enumerable = descriptor.enumerable || false; |
| 24022 |
descriptor.configurable = true; |
| 24023 |
if ("value" in descriptor) descriptor.writable = true; |
| 24024 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 24025 |
} |
| 24026 |
} |
| 24027 |
return function(Constructor, protoProps, staticProps) { |
| 24028 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 24029 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 24030 |
return Constructor; |
| 24031 |
}; |
| 24032 |
}(); |
| 24033 |
var _block = __webpack_require__(4); |
| 24034 |
var _block2 = _interopRequireDefault(_block); |
| 24035 |
function _interopRequireDefault(obj) { |
| 24036 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 24037 |
} |
| 24038 |
function _classCallCheck2(instance, Constructor) { |
| 24039 |
if (!(instance instanceof Constructor)) { |
| 24040 |
throw new TypeError("Cannot call a class as a function"); |
| 24041 |
} |
| 24042 |
} |
| 24043 |
function _possibleConstructorReturn2(self2, call) { |
| 24044 |
if (!self2) { |
| 24045 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 24046 |
} |
| 24047 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 24048 |
} |
| 24049 |
function _inherits2(subClass, superClass) { |
| 24050 |
if (typeof superClass !== "function" && superClass !== null) { |
| 24051 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 24052 |
} |
| 24053 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 24054 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 24055 |
} |
| 24056 |
var Header = function(_Block) { |
| 24057 |
_inherits2(Header2, _Block); |
| 24058 |
function Header2() { |
| 24059 |
_classCallCheck2(this, Header2); |
| 24060 |
return _possibleConstructorReturn2(this, (Header2.__proto__ || Object.getPrototypeOf(Header2)).apply(this, arguments)); |
| 24061 |
} |
| 24062 |
_createClass2(Header2, null, [{ |
| 24063 |
key: "formats", |
| 24064 |
value: function formats(domNode) { |
| 24065 |
return this.tagName.indexOf(domNode.tagName) + 1; |
| 24066 |
} |
| 24067 |
}]); |
| 24068 |
return Header2; |
| 24069 |
}(_block2.default); |
| 24070 |
Header.blotName = "header"; |
| 24071 |
Header.tagName = ["H1", "H2", "H3", "H4", "H5", "H6"]; |
| 24072 |
exports$12.default = Header; |
| 24073 |
}, |
| 24074 |
/* 67 */ |
| 24075 |
/***/ |
| 24076 |
function(module2, exports$12, __webpack_require__) { |
| 24077 |
Object.defineProperty(exports$12, "__esModule", { |
| 24078 |
value: true |
| 24079 |
}); |
| 24080 |
exports$12.default = exports$12.ListItem = void 0; |
| 24081 |
var _createClass2 = /* @__PURE__ */ function() { |
| 24082 |
function defineProperties(target, props) { |
| 24083 |
for (var i = 0; i < props.length; i++) { |
| 24084 |
var descriptor = props[i]; |
| 24085 |
descriptor.enumerable = descriptor.enumerable || false; |
| 24086 |
descriptor.configurable = true; |
| 24087 |
if ("value" in descriptor) descriptor.writable = true; |
| 24088 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 24089 |
} |
| 24090 |
} |
| 24091 |
return function(Constructor, protoProps, staticProps) { |
| 24092 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 24093 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 24094 |
return Constructor; |
| 24095 |
}; |
| 24096 |
}(); |
| 24097 |
var _get = function get(object, property, receiver) { |
| 24098 |
if (object === null) object = Function.prototype; |
| 24099 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 24100 |
if (desc === void 0) { |
| 24101 |
var parent = Object.getPrototypeOf(object); |
| 24102 |
if (parent === null) { |
| 24103 |
return void 0; |
| 24104 |
} else { |
| 24105 |
return get(parent, property, receiver); |
| 24106 |
} |
| 24107 |
} else if ("value" in desc) { |
| 24108 |
return desc.value; |
| 24109 |
} else { |
| 24110 |
var getter = desc.get; |
| 24111 |
if (getter === void 0) { |
| 24112 |
return void 0; |
| 24113 |
} |
| 24114 |
return getter.call(receiver); |
| 24115 |
} |
| 24116 |
}; |
| 24117 |
var _parchment = __webpack_require__(0); |
| 24118 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 24119 |
var _block = __webpack_require__(4); |
| 24120 |
var _block2 = _interopRequireDefault(_block); |
| 24121 |
var _container = __webpack_require__(25); |
| 24122 |
var _container2 = _interopRequireDefault(_container); |
| 24123 |
function _interopRequireDefault(obj) { |
| 24124 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 24125 |
} |
| 24126 |
function _defineProperty2(obj, key, value) { |
| 24127 |
if (key in obj) { |
| 24128 |
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); |
| 24129 |
} else { |
| 24130 |
obj[key] = value; |
| 24131 |
} |
| 24132 |
return obj; |
| 24133 |
} |
| 24134 |
function _classCallCheck2(instance, Constructor) { |
| 24135 |
if (!(instance instanceof Constructor)) { |
| 24136 |
throw new TypeError("Cannot call a class as a function"); |
| 24137 |
} |
| 24138 |
} |
| 24139 |
function _possibleConstructorReturn2(self2, call) { |
| 24140 |
if (!self2) { |
| 24141 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 24142 |
} |
| 24143 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 24144 |
} |
| 24145 |
function _inherits2(subClass, superClass) { |
| 24146 |
if (typeof superClass !== "function" && superClass !== null) { |
| 24147 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 24148 |
} |
| 24149 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 24150 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 24151 |
} |
| 24152 |
var ListItem = function(_Block) { |
| 24153 |
_inherits2(ListItem2, _Block); |
| 24154 |
function ListItem2() { |
| 24155 |
_classCallCheck2(this, ListItem2); |
| 24156 |
return _possibleConstructorReturn2(this, (ListItem2.__proto__ || Object.getPrototypeOf(ListItem2)).apply(this, arguments)); |
| 24157 |
} |
| 24158 |
_createClass2(ListItem2, [{ |
| 24159 |
key: "format", |
| 24160 |
value: function format(name, value) { |
| 24161 |
if (name === List2.blotName && !value) { |
| 24162 |
this.replaceWith(_parchment2.default.create(this.statics.scope)); |
| 24163 |
} else { |
| 24164 |
_get(ListItem2.prototype.__proto__ || Object.getPrototypeOf(ListItem2.prototype), "format", this).call(this, name, value); |
| 24165 |
} |
| 24166 |
} |
| 24167 |
}, { |
| 24168 |
key: "remove", |
| 24169 |
value: function remove() { |
| 24170 |
if (this.prev == null && this.next == null) { |
| 24171 |
this.parent.remove(); |
| 24172 |
} else { |
| 24173 |
_get(ListItem2.prototype.__proto__ || Object.getPrototypeOf(ListItem2.prototype), "remove", this).call(this); |
| 24174 |
} |
| 24175 |
} |
| 24176 |
}, { |
| 24177 |
key: "replaceWith", |
| 24178 |
value: function replaceWith(name, value) { |
| 24179 |
this.parent.isolate(this.offset(this.parent), this.length()); |
| 24180 |
if (name === this.parent.statics.blotName) { |
| 24181 |
this.parent.replaceWith(name, value); |
| 24182 |
return this; |
| 24183 |
} else { |
| 24184 |
this.parent.unwrap(); |
| 24185 |
return _get(ListItem2.prototype.__proto__ || Object.getPrototypeOf(ListItem2.prototype), "replaceWith", this).call(this, name, value); |
| 24186 |
} |
| 24187 |
} |
| 24188 |
}], [{ |
| 24189 |
key: "formats", |
| 24190 |
value: function formats(domNode) { |
| 24191 |
return domNode.tagName === this.tagName ? void 0 : _get(ListItem2.__proto__ || Object.getPrototypeOf(ListItem2), "formats", this).call(this, domNode); |
| 24192 |
} |
| 24193 |
}]); |
| 24194 |
return ListItem2; |
| 24195 |
}(_block2.default); |
| 24196 |
ListItem.blotName = "list-item"; |
| 24197 |
ListItem.tagName = "LI"; |
| 24198 |
var List2 = function(_Container) { |
| 24199 |
_inherits2(List3, _Container); |
| 24200 |
_createClass2(List3, null, [{ |
| 24201 |
key: "create", |
| 24202 |
value: function create(value) { |
| 24203 |
var tagName = value === "ordered" ? "OL" : "UL"; |
| 24204 |
var node = _get(List3.__proto__ || Object.getPrototypeOf(List3), "create", this).call(this, tagName); |
| 24205 |
if (value === "checked" || value === "unchecked") { |
| 24206 |
node.setAttribute("data-checked", value === "checked"); |
| 24207 |
} |
| 24208 |
return node; |
| 24209 |
} |
| 24210 |
}, { |
| 24211 |
key: "formats", |
| 24212 |
value: function formats(domNode) { |
| 24213 |
if (domNode.tagName === "OL") return "ordered"; |
| 24214 |
if (domNode.tagName === "UL") { |
| 24215 |
if (domNode.hasAttribute("data-checked")) { |
| 24216 |
return domNode.getAttribute("data-checked") === "true" ? "checked" : "unchecked"; |
| 24217 |
} else { |
| 24218 |
return "bullet"; |
| 24219 |
} |
| 24220 |
} |
| 24221 |
return void 0; |
| 24222 |
} |
| 24223 |
}]); |
| 24224 |
function List3(domNode) { |
| 24225 |
_classCallCheck2(this, List3); |
| 24226 |
var _this2 = _possibleConstructorReturn2(this, (List3.__proto__ || Object.getPrototypeOf(List3)).call(this, domNode)); |
| 24227 |
var listEventHandler = function listEventHandler2(e2) { |
| 24228 |
if (e2.target.parentNode !== domNode) return; |
| 24229 |
var format = _this2.statics.formats(domNode); |
| 24230 |
var blot = _parchment2.default.find(e2.target); |
| 24231 |
if (format === "checked") { |
| 24232 |
blot.format("list", "unchecked"); |
| 24233 |
} else if (format === "unchecked") { |
| 24234 |
blot.format("list", "checked"); |
| 24235 |
} |
| 24236 |
}; |
| 24237 |
domNode.addEventListener("touchstart", listEventHandler); |
| 24238 |
domNode.addEventListener("mousedown", listEventHandler); |
| 24239 |
return _this2; |
| 24240 |
} |
| 24241 |
_createClass2(List3, [{ |
| 24242 |
key: "format", |
| 24243 |
value: function format(name, value) { |
| 24244 |
if (this.children.length > 0) { |
| 24245 |
this.children.tail.format(name, value); |
| 24246 |
} |
| 24247 |
} |
| 24248 |
}, { |
| 24249 |
key: "formats", |
| 24250 |
value: function formats() { |
| 24251 |
return _defineProperty2({}, this.statics.blotName, this.statics.formats(this.domNode)); |
| 24252 |
} |
| 24253 |
}, { |
| 24254 |
key: "insertBefore", |
| 24255 |
value: function insertBefore(blot, ref) { |
| 24256 |
if (blot instanceof ListItem) { |
| 24257 |
_get(List3.prototype.__proto__ || Object.getPrototypeOf(List3.prototype), "insertBefore", this).call(this, blot, ref); |
| 24258 |
} else { |
| 24259 |
var index = ref == null ? this.length() : ref.offset(this); |
| 24260 |
var after = this.split(index); |
| 24261 |
after.parent.insertBefore(blot, after); |
| 24262 |
} |
| 24263 |
} |
| 24264 |
}, { |
| 24265 |
key: "optimize", |
| 24266 |
value: function optimize(context) { |
| 24267 |
_get(List3.prototype.__proto__ || Object.getPrototypeOf(List3.prototype), "optimize", this).call(this, context); |
| 24268 |
var next = this.next; |
| 24269 |
if (next != null && next.prev === this && next.statics.blotName === this.statics.blotName && next.domNode.tagName === this.domNode.tagName && next.domNode.getAttribute("data-checked") === this.domNode.getAttribute("data-checked")) { |
| 24270 |
next.moveChildren(this); |
| 24271 |
next.remove(); |
| 24272 |
} |
| 24273 |
} |
| 24274 |
}, { |
| 24275 |
key: "replace", |
| 24276 |
value: function replace(target) { |
| 24277 |
if (target.statics.blotName !== this.statics.blotName) { |
| 24278 |
var item = _parchment2.default.create(this.statics.defaultChild); |
| 24279 |
target.moveChildren(item); |
| 24280 |
this.appendChild(item); |
| 24281 |
} |
| 24282 |
_get(List3.prototype.__proto__ || Object.getPrototypeOf(List3.prototype), "replace", this).call(this, target); |
| 24283 |
} |
| 24284 |
}]); |
| 24285 |
return List3; |
| 24286 |
}(_container2.default); |
| 24287 |
List2.blotName = "list"; |
| 24288 |
List2.scope = _parchment2.default.Scope.BLOCK_BLOT; |
| 24289 |
List2.tagName = ["OL", "UL"]; |
| 24290 |
List2.defaultChild = "list-item"; |
| 24291 |
List2.allowedChildren = [ListItem]; |
| 24292 |
exports$12.ListItem = ListItem; |
| 24293 |
exports$12.default = List2; |
| 24294 |
}, |
| 24295 |
/* 68 */ |
| 24296 |
/***/ |
| 24297 |
function(module2, exports$12, __webpack_require__) { |
| 24298 |
Object.defineProperty(exports$12, "__esModule", { |
| 24299 |
value: true |
| 24300 |
}); |
| 24301 |
var _bold = __webpack_require__(56); |
| 24302 |
var _bold2 = _interopRequireDefault(_bold); |
| 24303 |
function _interopRequireDefault(obj) { |
| 24304 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 24305 |
} |
| 24306 |
function _classCallCheck2(instance, Constructor) { |
| 24307 |
if (!(instance instanceof Constructor)) { |
| 24308 |
throw new TypeError("Cannot call a class as a function"); |
| 24309 |
} |
| 24310 |
} |
| 24311 |
function _possibleConstructorReturn2(self2, call) { |
| 24312 |
if (!self2) { |
| 24313 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 24314 |
} |
| 24315 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 24316 |
} |
| 24317 |
function _inherits2(subClass, superClass) { |
| 24318 |
if (typeof superClass !== "function" && superClass !== null) { |
| 24319 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 24320 |
} |
| 24321 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 24322 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 24323 |
} |
| 24324 |
var Italic = function(_Bold) { |
| 24325 |
_inherits2(Italic2, _Bold); |
| 24326 |
function Italic2() { |
| 24327 |
_classCallCheck2(this, Italic2); |
| 24328 |
return _possibleConstructorReturn2(this, (Italic2.__proto__ || Object.getPrototypeOf(Italic2)).apply(this, arguments)); |
| 24329 |
} |
| 24330 |
return Italic2; |
| 24331 |
}(_bold2.default); |
| 24332 |
Italic.blotName = "italic"; |
| 24333 |
Italic.tagName = ["EM", "I"]; |
| 24334 |
exports$12.default = Italic; |
| 24335 |
}, |
| 24336 |
/* 69 */ |
| 24337 |
/***/ |
| 24338 |
function(module2, exports$12, __webpack_require__) { |
| 24339 |
Object.defineProperty(exports$12, "__esModule", { |
| 24340 |
value: true |
| 24341 |
}); |
| 24342 |
var _createClass2 = /* @__PURE__ */ function() { |
| 24343 |
function defineProperties(target, props) { |
| 24344 |
for (var i = 0; i < props.length; i++) { |
| 24345 |
var descriptor = props[i]; |
| 24346 |
descriptor.enumerable = descriptor.enumerable || false; |
| 24347 |
descriptor.configurable = true; |
| 24348 |
if ("value" in descriptor) descriptor.writable = true; |
| 24349 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 24350 |
} |
| 24351 |
} |
| 24352 |
return function(Constructor, protoProps, staticProps) { |
| 24353 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 24354 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 24355 |
return Constructor; |
| 24356 |
}; |
| 24357 |
}(); |
| 24358 |
var _get = function get(object, property, receiver) { |
| 24359 |
if (object === null) object = Function.prototype; |
| 24360 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 24361 |
if (desc === void 0) { |
| 24362 |
var parent = Object.getPrototypeOf(object); |
| 24363 |
if (parent === null) { |
| 24364 |
return void 0; |
| 24365 |
} else { |
| 24366 |
return get(parent, property, receiver); |
| 24367 |
} |
| 24368 |
} else if ("value" in desc) { |
| 24369 |
return desc.value; |
| 24370 |
} else { |
| 24371 |
var getter = desc.get; |
| 24372 |
if (getter === void 0) { |
| 24373 |
return void 0; |
| 24374 |
} |
| 24375 |
return getter.call(receiver); |
| 24376 |
} |
| 24377 |
}; |
| 24378 |
var _inline = __webpack_require__(6); |
| 24379 |
var _inline2 = _interopRequireDefault(_inline); |
| 24380 |
function _interopRequireDefault(obj) { |
| 24381 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 24382 |
} |
| 24383 |
function _classCallCheck2(instance, Constructor) { |
| 24384 |
if (!(instance instanceof Constructor)) { |
| 24385 |
throw new TypeError("Cannot call a class as a function"); |
| 24386 |
} |
| 24387 |
} |
| 24388 |
function _possibleConstructorReturn2(self2, call) { |
| 24389 |
if (!self2) { |
| 24390 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 24391 |
} |
| 24392 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 24393 |
} |
| 24394 |
function _inherits2(subClass, superClass) { |
| 24395 |
if (typeof superClass !== "function" && superClass !== null) { |
| 24396 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 24397 |
} |
| 24398 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 24399 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 24400 |
} |
| 24401 |
var Script = function(_Inline) { |
| 24402 |
_inherits2(Script2, _Inline); |
| 24403 |
function Script2() { |
| 24404 |
_classCallCheck2(this, Script2); |
| 24405 |
return _possibleConstructorReturn2(this, (Script2.__proto__ || Object.getPrototypeOf(Script2)).apply(this, arguments)); |
| 24406 |
} |
| 24407 |
_createClass2(Script2, null, [{ |
| 24408 |
key: "create", |
| 24409 |
value: function create(value) { |
| 24410 |
if (value === "super") { |
| 24411 |
return document.createElement("sup"); |
| 24412 |
} else if (value === "sub") { |
| 24413 |
return document.createElement("sub"); |
| 24414 |
} else { |
| 24415 |
return _get(Script2.__proto__ || Object.getPrototypeOf(Script2), "create", this).call(this, value); |
| 24416 |
} |
| 24417 |
} |
| 24418 |
}, { |
| 24419 |
key: "formats", |
| 24420 |
value: function formats(domNode) { |
| 24421 |
if (domNode.tagName === "SUB") return "sub"; |
| 24422 |
if (domNode.tagName === "SUP") return "super"; |
| 24423 |
return void 0; |
| 24424 |
} |
| 24425 |
}]); |
| 24426 |
return Script2; |
| 24427 |
}(_inline2.default); |
| 24428 |
Script.blotName = "script"; |
| 24429 |
Script.tagName = ["SUB", "SUP"]; |
| 24430 |
exports$12.default = Script; |
| 24431 |
}, |
| 24432 |
/* 70 */ |
| 24433 |
/***/ |
| 24434 |
function(module2, exports$12, __webpack_require__) { |
| 24435 |
Object.defineProperty(exports$12, "__esModule", { |
| 24436 |
value: true |
| 24437 |
}); |
| 24438 |
var _inline = __webpack_require__(6); |
| 24439 |
var _inline2 = _interopRequireDefault(_inline); |
| 24440 |
function _interopRequireDefault(obj) { |
| 24441 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 24442 |
} |
| 24443 |
function _classCallCheck2(instance, Constructor) { |
| 24444 |
if (!(instance instanceof Constructor)) { |
| 24445 |
throw new TypeError("Cannot call a class as a function"); |
| 24446 |
} |
| 24447 |
} |
| 24448 |
function _possibleConstructorReturn2(self2, call) { |
| 24449 |
if (!self2) { |
| 24450 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 24451 |
} |
| 24452 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 24453 |
} |
| 24454 |
function _inherits2(subClass, superClass) { |
| 24455 |
if (typeof superClass !== "function" && superClass !== null) { |
| 24456 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 24457 |
} |
| 24458 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 24459 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 24460 |
} |
| 24461 |
var Strike = function(_Inline) { |
| 24462 |
_inherits2(Strike2, _Inline); |
| 24463 |
function Strike2() { |
| 24464 |
_classCallCheck2(this, Strike2); |
| 24465 |
return _possibleConstructorReturn2(this, (Strike2.__proto__ || Object.getPrototypeOf(Strike2)).apply(this, arguments)); |
| 24466 |
} |
| 24467 |
return Strike2; |
| 24468 |
}(_inline2.default); |
| 24469 |
Strike.blotName = "strike"; |
| 24470 |
Strike.tagName = "S"; |
| 24471 |
exports$12.default = Strike; |
| 24472 |
}, |
| 24473 |
/* 71 */ |
| 24474 |
/***/ |
| 24475 |
function(module2, exports$12, __webpack_require__) { |
| 24476 |
Object.defineProperty(exports$12, "__esModule", { |
| 24477 |
value: true |
| 24478 |
}); |
| 24479 |
var _inline = __webpack_require__(6); |
| 24480 |
var _inline2 = _interopRequireDefault(_inline); |
| 24481 |
function _interopRequireDefault(obj) { |
| 24482 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 24483 |
} |
| 24484 |
function _classCallCheck2(instance, Constructor) { |
| 24485 |
if (!(instance instanceof Constructor)) { |
| 24486 |
throw new TypeError("Cannot call a class as a function"); |
| 24487 |
} |
| 24488 |
} |
| 24489 |
function _possibleConstructorReturn2(self2, call) { |
| 24490 |
if (!self2) { |
| 24491 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 24492 |
} |
| 24493 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 24494 |
} |
| 24495 |
function _inherits2(subClass, superClass) { |
| 24496 |
if (typeof superClass !== "function" && superClass !== null) { |
| 24497 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 24498 |
} |
| 24499 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 24500 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 24501 |
} |
| 24502 |
var Underline = function(_Inline) { |
| 24503 |
_inherits2(Underline2, _Inline); |
| 24504 |
function Underline2() { |
| 24505 |
_classCallCheck2(this, Underline2); |
| 24506 |
return _possibleConstructorReturn2(this, (Underline2.__proto__ || Object.getPrototypeOf(Underline2)).apply(this, arguments)); |
| 24507 |
} |
| 24508 |
return Underline2; |
| 24509 |
}(_inline2.default); |
| 24510 |
Underline.blotName = "underline"; |
| 24511 |
Underline.tagName = "U"; |
| 24512 |
exports$12.default = Underline; |
| 24513 |
}, |
| 24514 |
/* 72 */ |
| 24515 |
/***/ |
| 24516 |
function(module2, exports$12, __webpack_require__) { |
| 24517 |
Object.defineProperty(exports$12, "__esModule", { |
| 24518 |
value: true |
| 24519 |
}); |
| 24520 |
var _createClass2 = /* @__PURE__ */ function() { |
| 24521 |
function defineProperties(target, props) { |
| 24522 |
for (var i = 0; i < props.length; i++) { |
| 24523 |
var descriptor = props[i]; |
| 24524 |
descriptor.enumerable = descriptor.enumerable || false; |
| 24525 |
descriptor.configurable = true; |
| 24526 |
if ("value" in descriptor) descriptor.writable = true; |
| 24527 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 24528 |
} |
| 24529 |
} |
| 24530 |
return function(Constructor, protoProps, staticProps) { |
| 24531 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 24532 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 24533 |
return Constructor; |
| 24534 |
}; |
| 24535 |
}(); |
| 24536 |
var _get = function get(object, property, receiver) { |
| 24537 |
if (object === null) object = Function.prototype; |
| 24538 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 24539 |
if (desc === void 0) { |
| 24540 |
var parent = Object.getPrototypeOf(object); |
| 24541 |
if (parent === null) { |
| 24542 |
return void 0; |
| 24543 |
} else { |
| 24544 |
return get(parent, property, receiver); |
| 24545 |
} |
| 24546 |
} else if ("value" in desc) { |
| 24547 |
return desc.value; |
| 24548 |
} else { |
| 24549 |
var getter = desc.get; |
| 24550 |
if (getter === void 0) { |
| 24551 |
return void 0; |
| 24552 |
} |
| 24553 |
return getter.call(receiver); |
| 24554 |
} |
| 24555 |
}; |
| 24556 |
var _parchment = __webpack_require__(0); |
| 24557 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 24558 |
var _link = __webpack_require__(27); |
| 24559 |
function _interopRequireDefault(obj) { |
| 24560 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 24561 |
} |
| 24562 |
function _classCallCheck2(instance, Constructor) { |
| 24563 |
if (!(instance instanceof Constructor)) { |
| 24564 |
throw new TypeError("Cannot call a class as a function"); |
| 24565 |
} |
| 24566 |
} |
| 24567 |
function _possibleConstructorReturn2(self2, call) { |
| 24568 |
if (!self2) { |
| 24569 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 24570 |
} |
| 24571 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 24572 |
} |
| 24573 |
function _inherits2(subClass, superClass) { |
| 24574 |
if (typeof superClass !== "function" && superClass !== null) { |
| 24575 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 24576 |
} |
| 24577 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 24578 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 24579 |
} |
| 24580 |
var ATTRIBUTES = ["alt", "height", "width"]; |
| 24581 |
var Image2 = function(_Parchment$Embed) { |
| 24582 |
_inherits2(Image3, _Parchment$Embed); |
| 24583 |
function Image3() { |
| 24584 |
_classCallCheck2(this, Image3); |
| 24585 |
return _possibleConstructorReturn2(this, (Image3.__proto__ || Object.getPrototypeOf(Image3)).apply(this, arguments)); |
| 24586 |
} |
| 24587 |
_createClass2(Image3, [{ |
| 24588 |
key: "format", |
| 24589 |
value: function format(name, value) { |
| 24590 |
if (ATTRIBUTES.indexOf(name) > -1) { |
| 24591 |
if (value) { |
| 24592 |
this.domNode.setAttribute(name, value); |
| 24593 |
} else { |
| 24594 |
this.domNode.removeAttribute(name); |
| 24595 |
} |
| 24596 |
} else { |
| 24597 |
_get(Image3.prototype.__proto__ || Object.getPrototypeOf(Image3.prototype), "format", this).call(this, name, value); |
| 24598 |
} |
| 24599 |
} |
| 24600 |
}], [{ |
| 24601 |
key: "create", |
| 24602 |
value: function create(value) { |
| 24603 |
var node = _get(Image3.__proto__ || Object.getPrototypeOf(Image3), "create", this).call(this, value); |
| 24604 |
if (typeof value === "string") { |
| 24605 |
node.setAttribute("src", this.sanitize(value)); |
| 24606 |
} |
| 24607 |
return node; |
| 24608 |
} |
| 24609 |
}, { |
| 24610 |
key: "formats", |
| 24611 |
value: function formats(domNode) { |
| 24612 |
return ATTRIBUTES.reduce(function(formats2, attribute) { |
| 24613 |
if (domNode.hasAttribute(attribute)) { |
| 24614 |
formats2[attribute] = domNode.getAttribute(attribute); |
| 24615 |
} |
| 24616 |
return formats2; |
| 24617 |
}, {}); |
| 24618 |
} |
| 24619 |
}, { |
| 24620 |
key: "match", |
| 24621 |
value: function match(url) { |
| 24622 |
return /\.(jpe?g|gif|png)$/.test(url) || /^data:image\/.+;base64/.test(url); |
| 24623 |
} |
| 24624 |
}, { |
| 24625 |
key: "sanitize", |
| 24626 |
value: function sanitize(url) { |
| 24627 |
return (0, _link.sanitize)(url, ["http", "https", "data"]) ? url : "//:0"; |
| 24628 |
} |
| 24629 |
}, { |
| 24630 |
key: "value", |
| 24631 |
value: function value(domNode) { |
| 24632 |
return domNode.getAttribute("src"); |
| 24633 |
} |
| 24634 |
}]); |
| 24635 |
return Image3; |
| 24636 |
}(_parchment2.default.Embed); |
| 24637 |
Image2.blotName = "image"; |
| 24638 |
Image2.tagName = "IMG"; |
| 24639 |
exports$12.default = Image2; |
| 24640 |
}, |
| 24641 |
/* 73 */ |
| 24642 |
/***/ |
| 24643 |
function(module2, exports$12, __webpack_require__) { |
| 24644 |
Object.defineProperty(exports$12, "__esModule", { |
| 24645 |
value: true |
| 24646 |
}); |
| 24647 |
var _createClass2 = /* @__PURE__ */ function() { |
| 24648 |
function defineProperties(target, props) { |
| 24649 |
for (var i = 0; i < props.length; i++) { |
| 24650 |
var descriptor = props[i]; |
| 24651 |
descriptor.enumerable = descriptor.enumerable || false; |
| 24652 |
descriptor.configurable = true; |
| 24653 |
if ("value" in descriptor) descriptor.writable = true; |
| 24654 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 24655 |
} |
| 24656 |
} |
| 24657 |
return function(Constructor, protoProps, staticProps) { |
| 24658 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 24659 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 24660 |
return Constructor; |
| 24661 |
}; |
| 24662 |
}(); |
| 24663 |
var _get = function get(object, property, receiver) { |
| 24664 |
if (object === null) object = Function.prototype; |
| 24665 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 24666 |
if (desc === void 0) { |
| 24667 |
var parent = Object.getPrototypeOf(object); |
| 24668 |
if (parent === null) { |
| 24669 |
return void 0; |
| 24670 |
} else { |
| 24671 |
return get(parent, property, receiver); |
| 24672 |
} |
| 24673 |
} else if ("value" in desc) { |
| 24674 |
return desc.value; |
| 24675 |
} else { |
| 24676 |
var getter = desc.get; |
| 24677 |
if (getter === void 0) { |
| 24678 |
return void 0; |
| 24679 |
} |
| 24680 |
return getter.call(receiver); |
| 24681 |
} |
| 24682 |
}; |
| 24683 |
var _block = __webpack_require__(4); |
| 24684 |
var _link = __webpack_require__(27); |
| 24685 |
var _link2 = _interopRequireDefault(_link); |
| 24686 |
function _interopRequireDefault(obj) { |
| 24687 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 24688 |
} |
| 24689 |
function _classCallCheck2(instance, Constructor) { |
| 24690 |
if (!(instance instanceof Constructor)) { |
| 24691 |
throw new TypeError("Cannot call a class as a function"); |
| 24692 |
} |
| 24693 |
} |
| 24694 |
function _possibleConstructorReturn2(self2, call) { |
| 24695 |
if (!self2) { |
| 24696 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 24697 |
} |
| 24698 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 24699 |
} |
| 24700 |
function _inherits2(subClass, superClass) { |
| 24701 |
if (typeof superClass !== "function" && superClass !== null) { |
| 24702 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 24703 |
} |
| 24704 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 24705 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 24706 |
} |
| 24707 |
var ATTRIBUTES = ["height", "width"]; |
| 24708 |
var Video2 = function(_BlockEmbed) { |
| 24709 |
_inherits2(Video3, _BlockEmbed); |
| 24710 |
function Video3() { |
| 24711 |
_classCallCheck2(this, Video3); |
| 24712 |
return _possibleConstructorReturn2(this, (Video3.__proto__ || Object.getPrototypeOf(Video3)).apply(this, arguments)); |
| 24713 |
} |
| 24714 |
_createClass2(Video3, [{ |
| 24715 |
key: "format", |
| 24716 |
value: function format(name, value) { |
| 24717 |
if (ATTRIBUTES.indexOf(name) > -1) { |
| 24718 |
if (value) { |
| 24719 |
this.domNode.setAttribute(name, value); |
| 24720 |
} else { |
| 24721 |
this.domNode.removeAttribute(name); |
| 24722 |
} |
| 24723 |
} else { |
| 24724 |
_get(Video3.prototype.__proto__ || Object.getPrototypeOf(Video3.prototype), "format", this).call(this, name, value); |
| 24725 |
} |
| 24726 |
} |
| 24727 |
}], [{ |
| 24728 |
key: "create", |
| 24729 |
value: function create(value) { |
| 24730 |
var node = _get(Video3.__proto__ || Object.getPrototypeOf(Video3), "create", this).call(this, value); |
| 24731 |
node.setAttribute("frameborder", "0"); |
| 24732 |
node.setAttribute("allowfullscreen", true); |
| 24733 |
node.setAttribute("src", this.sanitize(value)); |
| 24734 |
return node; |
| 24735 |
} |
| 24736 |
}, { |
| 24737 |
key: "formats", |
| 24738 |
value: function formats(domNode) { |
| 24739 |
return ATTRIBUTES.reduce(function(formats2, attribute) { |
| 24740 |
if (domNode.hasAttribute(attribute)) { |
| 24741 |
formats2[attribute] = domNode.getAttribute(attribute); |
| 24742 |
} |
| 24743 |
return formats2; |
| 24744 |
}, {}); |
| 24745 |
} |
| 24746 |
}, { |
| 24747 |
key: "sanitize", |
| 24748 |
value: function sanitize(url) { |
| 24749 |
return _link2.default.sanitize(url); |
| 24750 |
} |
| 24751 |
}, { |
| 24752 |
key: "value", |
| 24753 |
value: function value(domNode) { |
| 24754 |
return domNode.getAttribute("src"); |
| 24755 |
} |
| 24756 |
}]); |
| 24757 |
return Video3; |
| 24758 |
}(_block.BlockEmbed); |
| 24759 |
Video2.blotName = "video"; |
| 24760 |
Video2.className = "ql-video"; |
| 24761 |
Video2.tagName = "IFRAME"; |
| 24762 |
exports$12.default = Video2; |
| 24763 |
}, |
| 24764 |
/* 74 */ |
| 24765 |
/***/ |
| 24766 |
function(module2, exports$12, __webpack_require__) { |
| 24767 |
Object.defineProperty(exports$12, "__esModule", { |
| 24768 |
value: true |
| 24769 |
}); |
| 24770 |
exports$12.default = exports$12.FormulaBlot = void 0; |
| 24771 |
var _createClass2 = /* @__PURE__ */ function() { |
| 24772 |
function defineProperties(target, props) { |
| 24773 |
for (var i = 0; i < props.length; i++) { |
| 24774 |
var descriptor = props[i]; |
| 24775 |
descriptor.enumerable = descriptor.enumerable || false; |
| 24776 |
descriptor.configurable = true; |
| 24777 |
if ("value" in descriptor) descriptor.writable = true; |
| 24778 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 24779 |
} |
| 24780 |
} |
| 24781 |
return function(Constructor, protoProps, staticProps) { |
| 24782 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 24783 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 24784 |
return Constructor; |
| 24785 |
}; |
| 24786 |
}(); |
| 24787 |
var _get = function get(object, property, receiver) { |
| 24788 |
if (object === null) object = Function.prototype; |
| 24789 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 24790 |
if (desc === void 0) { |
| 24791 |
var parent = Object.getPrototypeOf(object); |
| 24792 |
if (parent === null) { |
| 24793 |
return void 0; |
| 24794 |
} else { |
| 24795 |
return get(parent, property, receiver); |
| 24796 |
} |
| 24797 |
} else if ("value" in desc) { |
| 24798 |
return desc.value; |
| 24799 |
} else { |
| 24800 |
var getter = desc.get; |
| 24801 |
if (getter === void 0) { |
| 24802 |
return void 0; |
| 24803 |
} |
| 24804 |
return getter.call(receiver); |
| 24805 |
} |
| 24806 |
}; |
| 24807 |
var _embed = __webpack_require__(35); |
| 24808 |
var _embed2 = _interopRequireDefault(_embed); |
| 24809 |
var _quill = __webpack_require__(5); |
| 24810 |
var _quill2 = _interopRequireDefault(_quill); |
| 24811 |
var _module = __webpack_require__(9); |
| 24812 |
var _module2 = _interopRequireDefault(_module); |
| 24813 |
function _interopRequireDefault(obj) { |
| 24814 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 24815 |
} |
| 24816 |
function _classCallCheck2(instance, Constructor) { |
| 24817 |
if (!(instance instanceof Constructor)) { |
| 24818 |
throw new TypeError("Cannot call a class as a function"); |
| 24819 |
} |
| 24820 |
} |
| 24821 |
function _possibleConstructorReturn2(self2, call) { |
| 24822 |
if (!self2) { |
| 24823 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 24824 |
} |
| 24825 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 24826 |
} |
| 24827 |
function _inherits2(subClass, superClass) { |
| 24828 |
if (typeof superClass !== "function" && superClass !== null) { |
| 24829 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 24830 |
} |
| 24831 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 24832 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 24833 |
} |
| 24834 |
var FormulaBlot = function(_Embed) { |
| 24835 |
_inherits2(FormulaBlot2, _Embed); |
| 24836 |
function FormulaBlot2() { |
| 24837 |
_classCallCheck2(this, FormulaBlot2); |
| 24838 |
return _possibleConstructorReturn2(this, (FormulaBlot2.__proto__ || Object.getPrototypeOf(FormulaBlot2)).apply(this, arguments)); |
| 24839 |
} |
| 24840 |
_createClass2(FormulaBlot2, null, [{ |
| 24841 |
key: "create", |
| 24842 |
value: function create(value) { |
| 24843 |
var node = _get(FormulaBlot2.__proto__ || Object.getPrototypeOf(FormulaBlot2), "create", this).call(this, value); |
| 24844 |
if (typeof value === "string") { |
| 24845 |
window.katex.render(value, node, { |
| 24846 |
throwOnError: false, |
| 24847 |
errorColor: "#f00" |
| 24848 |
}); |
| 24849 |
node.setAttribute("data-value", value); |
| 24850 |
} |
| 24851 |
return node; |
| 24852 |
} |
| 24853 |
}, { |
| 24854 |
key: "value", |
| 24855 |
value: function value(domNode) { |
| 24856 |
return domNode.getAttribute("data-value"); |
| 24857 |
} |
| 24858 |
}]); |
| 24859 |
return FormulaBlot2; |
| 24860 |
}(_embed2.default); |
| 24861 |
FormulaBlot.blotName = "formula"; |
| 24862 |
FormulaBlot.className = "ql-formula"; |
| 24863 |
FormulaBlot.tagName = "SPAN"; |
| 24864 |
var Formula = function(_Module) { |
| 24865 |
_inherits2(Formula2, _Module); |
| 24866 |
_createClass2(Formula2, null, [{ |
| 24867 |
key: "register", |
| 24868 |
value: function register() { |
| 24869 |
_quill2.default.register(FormulaBlot, true); |
| 24870 |
} |
| 24871 |
}]); |
| 24872 |
function Formula2() { |
| 24873 |
_classCallCheck2(this, Formula2); |
| 24874 |
var _this2 = _possibleConstructorReturn2(this, (Formula2.__proto__ || Object.getPrototypeOf(Formula2)).call(this)); |
| 24875 |
if (window.katex == null) { |
| 24876 |
throw new Error("Formula module requires KaTeX."); |
| 24877 |
} |
| 24878 |
return _this2; |
| 24879 |
} |
| 24880 |
return Formula2; |
| 24881 |
}(_module2.default); |
| 24882 |
exports$12.FormulaBlot = FormulaBlot; |
| 24883 |
exports$12.default = Formula; |
| 24884 |
}, |
| 24885 |
/* 75 */ |
| 24886 |
/***/ |
| 24887 |
function(module2, exports$12, __webpack_require__) { |
| 24888 |
Object.defineProperty(exports$12, "__esModule", { |
| 24889 |
value: true |
| 24890 |
}); |
| 24891 |
exports$12.default = exports$12.CodeToken = exports$12.CodeBlock = void 0; |
| 24892 |
var _createClass2 = /* @__PURE__ */ function() { |
| 24893 |
function defineProperties(target, props) { |
| 24894 |
for (var i = 0; i < props.length; i++) { |
| 24895 |
var descriptor = props[i]; |
| 24896 |
descriptor.enumerable = descriptor.enumerable || false; |
| 24897 |
descriptor.configurable = true; |
| 24898 |
if ("value" in descriptor) descriptor.writable = true; |
| 24899 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 24900 |
} |
| 24901 |
} |
| 24902 |
return function(Constructor, protoProps, staticProps) { |
| 24903 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 24904 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 24905 |
return Constructor; |
| 24906 |
}; |
| 24907 |
}(); |
| 24908 |
var _get = function get(object, property, receiver) { |
| 24909 |
if (object === null) object = Function.prototype; |
| 24910 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 24911 |
if (desc === void 0) { |
| 24912 |
var parent = Object.getPrototypeOf(object); |
| 24913 |
if (parent === null) { |
| 24914 |
return void 0; |
| 24915 |
} else { |
| 24916 |
return get(parent, property, receiver); |
| 24917 |
} |
| 24918 |
} else if ("value" in desc) { |
| 24919 |
return desc.value; |
| 24920 |
} else { |
| 24921 |
var getter = desc.get; |
| 24922 |
if (getter === void 0) { |
| 24923 |
return void 0; |
| 24924 |
} |
| 24925 |
return getter.call(receiver); |
| 24926 |
} |
| 24927 |
}; |
| 24928 |
var _parchment = __webpack_require__(0); |
| 24929 |
var _parchment2 = _interopRequireDefault(_parchment); |
| 24930 |
var _quill = __webpack_require__(5); |
| 24931 |
var _quill2 = _interopRequireDefault(_quill); |
| 24932 |
var _module = __webpack_require__(9); |
| 24933 |
var _module2 = _interopRequireDefault(_module); |
| 24934 |
var _code = __webpack_require__(13); |
| 24935 |
var _code2 = _interopRequireDefault(_code); |
| 24936 |
function _interopRequireDefault(obj) { |
| 24937 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 24938 |
} |
| 24939 |
function _classCallCheck2(instance, Constructor) { |
| 24940 |
if (!(instance instanceof Constructor)) { |
| 24941 |
throw new TypeError("Cannot call a class as a function"); |
| 24942 |
} |
| 24943 |
} |
| 24944 |
function _possibleConstructorReturn2(self2, call) { |
| 24945 |
if (!self2) { |
| 24946 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 24947 |
} |
| 24948 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 24949 |
} |
| 24950 |
function _inherits2(subClass, superClass) { |
| 24951 |
if (typeof superClass !== "function" && superClass !== null) { |
| 24952 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 24953 |
} |
| 24954 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 24955 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 24956 |
} |
| 24957 |
var SyntaxCodeBlock = function(_CodeBlock) { |
| 24958 |
_inherits2(SyntaxCodeBlock2, _CodeBlock); |
| 24959 |
function SyntaxCodeBlock2() { |
| 24960 |
_classCallCheck2(this, SyntaxCodeBlock2); |
| 24961 |
return _possibleConstructorReturn2(this, (SyntaxCodeBlock2.__proto__ || Object.getPrototypeOf(SyntaxCodeBlock2)).apply(this, arguments)); |
| 24962 |
} |
| 24963 |
_createClass2(SyntaxCodeBlock2, [{ |
| 24964 |
key: "replaceWith", |
| 24965 |
value: function replaceWith(block) { |
| 24966 |
this.domNode.textContent = this.domNode.textContent; |
| 24967 |
this.attach(); |
| 24968 |
_get(SyntaxCodeBlock2.prototype.__proto__ || Object.getPrototypeOf(SyntaxCodeBlock2.prototype), "replaceWith", this).call(this, block); |
| 24969 |
} |
| 24970 |
}, { |
| 24971 |
key: "highlight", |
| 24972 |
value: function highlight(_highlight) { |
| 24973 |
var text = this.domNode.textContent; |
| 24974 |
if (this.cachedText !== text) { |
| 24975 |
if (text.trim().length > 0 || this.cachedText == null) { |
| 24976 |
this.domNode.innerHTML = _highlight(text); |
| 24977 |
this.domNode.normalize(); |
| 24978 |
this.attach(); |
| 24979 |
} |
| 24980 |
this.cachedText = text; |
| 24981 |
} |
| 24982 |
} |
| 24983 |
}]); |
| 24984 |
return SyntaxCodeBlock2; |
| 24985 |
}(_code2.default); |
| 24986 |
SyntaxCodeBlock.className = "ql-syntax"; |
| 24987 |
var CodeToken = new _parchment2.default.Attributor.Class("token", "hljs", { |
| 24988 |
scope: _parchment2.default.Scope.INLINE |
| 24989 |
}); |
| 24990 |
var Syntax = function(_Module) { |
| 24991 |
_inherits2(Syntax2, _Module); |
| 24992 |
_createClass2(Syntax2, null, [{ |
| 24993 |
key: "register", |
| 24994 |
value: function register() { |
| 24995 |
_quill2.default.register(CodeToken, true); |
| 24996 |
_quill2.default.register(SyntaxCodeBlock, true); |
| 24997 |
} |
| 24998 |
}]); |
| 24999 |
function Syntax2(quill2, options) { |
| 25000 |
_classCallCheck2(this, Syntax2); |
| 25001 |
var _this2 = _possibleConstructorReturn2(this, (Syntax2.__proto__ || Object.getPrototypeOf(Syntax2)).call(this, quill2, options)); |
| 25002 |
if (typeof _this2.options.highlight !== "function") { |
| 25003 |
throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill."); |
| 25004 |
} |
| 25005 |
var timer = null; |
| 25006 |
_this2.quill.on(_quill2.default.events.SCROLL_OPTIMIZE, function() { |
| 25007 |
clearTimeout(timer); |
| 25008 |
timer = setTimeout(function() { |
| 25009 |
_this2.highlight(); |
| 25010 |
timer = null; |
| 25011 |
}, _this2.options.interval); |
| 25012 |
}); |
| 25013 |
_this2.highlight(); |
| 25014 |
return _this2; |
| 25015 |
} |
| 25016 |
_createClass2(Syntax2, [{ |
| 25017 |
key: "highlight", |
| 25018 |
value: function highlight() { |
| 25019 |
var _this3 = this; |
| 25020 |
if (this.quill.selection.composing) return; |
| 25021 |
this.quill.update(_quill2.default.sources.USER); |
| 25022 |
var range = this.quill.getSelection(); |
| 25023 |
this.quill.scroll.descendants(SyntaxCodeBlock).forEach(function(code) { |
| 25024 |
code.highlight(_this3.options.highlight); |
| 25025 |
}); |
| 25026 |
this.quill.update(_quill2.default.sources.SILENT); |
| 25027 |
if (range != null) { |
| 25028 |
this.quill.setSelection(range, _quill2.default.sources.SILENT); |
| 25029 |
} |
| 25030 |
} |
| 25031 |
}]); |
| 25032 |
return Syntax2; |
| 25033 |
}(_module2.default); |
| 25034 |
Syntax.DEFAULTS = { |
| 25035 |
highlight: function() { |
| 25036 |
if (window.hljs == null) return null; |
| 25037 |
return function(text) { |
| 25038 |
var result = window.hljs.highlightAuto(text); |
| 25039 |
return result.value; |
| 25040 |
}; |
| 25041 |
}(), |
| 25042 |
interval: 1e3 |
| 25043 |
}; |
| 25044 |
exports$12.CodeBlock = SyntaxCodeBlock; |
| 25045 |
exports$12.CodeToken = CodeToken; |
| 25046 |
exports$12.default = Syntax; |
| 25047 |
}, |
| 25048 |
/* 76 */ |
| 25049 |
/***/ |
| 25050 |
function(module2, exports$12) { |
| 25051 |
module2.exports = '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'; |
| 25052 |
}, |
| 25053 |
/* 77 */ |
| 25054 |
/***/ |
| 25055 |
function(module2, exports$12) { |
| 25056 |
module2.exports = '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'; |
| 25057 |
}, |
| 25058 |
/* 78 */ |
| 25059 |
/***/ |
| 25060 |
function(module2, exports$12) { |
| 25061 |
module2.exports = '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'; |
| 25062 |
}, |
| 25063 |
/* 79 */ |
| 25064 |
/***/ |
| 25065 |
function(module2, exports$12) { |
| 25066 |
module2.exports = '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'; |
| 25067 |
}, |
| 25068 |
/* 80 */ |
| 25069 |
/***/ |
| 25070 |
function(module2, exports$12) { |
| 25071 |
module2.exports = '<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'; |
| 25072 |
}, |
| 25073 |
/* 81 */ |
| 25074 |
/***/ |
| 25075 |
function(module2, exports$12) { |
| 25076 |
module2.exports = '<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'; |
| 25077 |
}, |
| 25078 |
/* 82 */ |
| 25079 |
/***/ |
| 25080 |
function(module2, exports$12) { |
| 25081 |
module2.exports = '<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'; |
| 25082 |
}, |
| 25083 |
/* 83 */ |
| 25084 |
/***/ |
| 25085 |
function(module2, exports$12) { |
| 25086 |
module2.exports = '<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'; |
| 25087 |
}, |
| 25088 |
/* 84 */ |
| 25089 |
/***/ |
| 25090 |
function(module2, exports$12) { |
| 25091 |
module2.exports = '<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'; |
| 25092 |
}, |
| 25093 |
/* 85 */ |
| 25094 |
/***/ |
| 25095 |
function(module2, exports$12) { |
| 25096 |
module2.exports = '<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'; |
| 25097 |
}, |
| 25098 |
/* 86 */ |
| 25099 |
/***/ |
| 25100 |
function(module2, exports$12) { |
| 25101 |
module2.exports = '<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'; |
| 25102 |
}, |
| 25103 |
/* 87 */ |
| 25104 |
/***/ |
| 25105 |
function(module2, exports$12) { |
| 25106 |
module2.exports = '<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'; |
| 25107 |
}, |
| 25108 |
/* 88 */ |
| 25109 |
/***/ |
| 25110 |
function(module2, exports$12) { |
| 25111 |
module2.exports = '<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'; |
| 25112 |
}, |
| 25113 |
/* 89 */ |
| 25114 |
/***/ |
| 25115 |
function(module2, exports$12) { |
| 25116 |
module2.exports = '<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'; |
| 25117 |
}, |
| 25118 |
/* 90 */ |
| 25119 |
/***/ |
| 25120 |
function(module2, exports$12) { |
| 25121 |
module2.exports = '<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'; |
| 25122 |
}, |
| 25123 |
/* 91 */ |
| 25124 |
/***/ |
| 25125 |
function(module2, exports$12) { |
| 25126 |
module2.exports = '<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'; |
| 25127 |
}, |
| 25128 |
/* 92 */ |
| 25129 |
/***/ |
| 25130 |
function(module2, exports$12) { |
| 25131 |
module2.exports = '<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'; |
| 25132 |
}, |
| 25133 |
/* 93 */ |
| 25134 |
/***/ |
| 25135 |
function(module2, exports$12) { |
| 25136 |
module2.exports = '<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'; |
| 25137 |
}, |
| 25138 |
/* 94 */ |
| 25139 |
/***/ |
| 25140 |
function(module2, exports$12) { |
| 25141 |
module2.exports = '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'; |
| 25142 |
}, |
| 25143 |
/* 95 */ |
| 25144 |
/***/ |
| 25145 |
function(module2, exports$12) { |
| 25146 |
module2.exports = '<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'; |
| 25147 |
}, |
| 25148 |
/* 96 */ |
| 25149 |
/***/ |
| 25150 |
function(module2, exports$12) { |
| 25151 |
module2.exports = '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'; |
| 25152 |
}, |
| 25153 |
/* 97 */ |
| 25154 |
/***/ |
| 25155 |
function(module2, exports$12) { |
| 25156 |
module2.exports = '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'; |
| 25157 |
}, |
| 25158 |
/* 98 */ |
| 25159 |
/***/ |
| 25160 |
function(module2, exports$12) { |
| 25161 |
module2.exports = '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'; |
| 25162 |
}, |
| 25163 |
/* 99 */ |
| 25164 |
/***/ |
| 25165 |
function(module2, exports$12) { |
| 25166 |
module2.exports = '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'; |
| 25167 |
}, |
| 25168 |
/* 100 */ |
| 25169 |
/***/ |
| 25170 |
function(module2, exports$12) { |
| 25171 |
module2.exports = '<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'; |
| 25172 |
}, |
| 25173 |
/* 101 */ |
| 25174 |
/***/ |
| 25175 |
function(module2, exports$12) { |
| 25176 |
module2.exports = '<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'; |
| 25177 |
}, |
| 25178 |
/* 102 */ |
| 25179 |
/***/ |
| 25180 |
function(module2, exports$12) { |
| 25181 |
module2.exports = '<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'; |
| 25182 |
}, |
| 25183 |
/* 103 */ |
| 25184 |
/***/ |
| 25185 |
function(module2, exports$12) { |
| 25186 |
module2.exports = '<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'; |
| 25187 |
}, |
| 25188 |
/* 104 */ |
| 25189 |
/***/ |
| 25190 |
function(module2, exports$12) { |
| 25191 |
module2.exports = '<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'; |
| 25192 |
}, |
| 25193 |
/* 105 */ |
| 25194 |
/***/ |
| 25195 |
function(module2, exports$12) { |
| 25196 |
module2.exports = '<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'; |
| 25197 |
}, |
| 25198 |
/* 106 */ |
| 25199 |
/***/ |
| 25200 |
function(module2, exports$12) { |
| 25201 |
module2.exports = '<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'; |
| 25202 |
}, |
| 25203 |
/* 107 */ |
| 25204 |
/***/ |
| 25205 |
function(module2, exports$12) { |
| 25206 |
module2.exports = '<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'; |
| 25207 |
}, |
| 25208 |
/* 108 */ |
| 25209 |
/***/ |
| 25210 |
function(module2, exports$12, __webpack_require__) { |
| 25211 |
Object.defineProperty(exports$12, "__esModule", { |
| 25212 |
value: true |
| 25213 |
}); |
| 25214 |
exports$12.default = exports$12.BubbleTooltip = void 0; |
| 25215 |
var _get = function get(object, property, receiver) { |
| 25216 |
if (object === null) object = Function.prototype; |
| 25217 |
var desc = Object.getOwnPropertyDescriptor(object, property); |
| 25218 |
if (desc === void 0) { |
| 25219 |
var parent = Object.getPrototypeOf(object); |
| 25220 |
if (parent === null) { |
| 25221 |
return void 0; |
| 25222 |
} else { |
| 25223 |
return get(parent, property, receiver); |
| 25224 |
} |
| 25225 |
} else if ("value" in desc) { |
| 25226 |
return desc.value; |
| 25227 |
} else { |
| 25228 |
var getter = desc.get; |
| 25229 |
if (getter === void 0) { |
| 25230 |
return void 0; |
| 25231 |
} |
| 25232 |
return getter.call(receiver); |
| 25233 |
} |
| 25234 |
}; |
| 25235 |
var _createClass2 = /* @__PURE__ */ function() { |
| 25236 |
function defineProperties(target, props) { |
| 25237 |
for (var i = 0; i < props.length; i++) { |
| 25238 |
var descriptor = props[i]; |
| 25239 |
descriptor.enumerable = descriptor.enumerable || false; |
| 25240 |
descriptor.configurable = true; |
| 25241 |
if ("value" in descriptor) descriptor.writable = true; |
| 25242 |
Object.defineProperty(target, descriptor.key, descriptor); |
| 25243 |
} |
| 25244 |
} |
| 25245 |
return function(Constructor, protoProps, staticProps) { |
| 25246 |
if (protoProps) defineProperties(Constructor.prototype, protoProps); |
| 25247 |
if (staticProps) defineProperties(Constructor, staticProps); |
| 25248 |
return Constructor; |
| 25249 |
}; |
| 25250 |
}(); |
| 25251 |
var _extend = __webpack_require__(3); |
| 25252 |
var _extend2 = _interopRequireDefault(_extend); |
| 25253 |
var _emitter = __webpack_require__(8); |
| 25254 |
var _emitter2 = _interopRequireDefault(_emitter); |
| 25255 |
var _base = __webpack_require__(43); |
| 25256 |
var _base2 = _interopRequireDefault(_base); |
| 25257 |
var _selection = __webpack_require__(15); |
| 25258 |
var _icons = __webpack_require__(41); |
| 25259 |
var _icons2 = _interopRequireDefault(_icons); |
| 25260 |
function _interopRequireDefault(obj) { |
| 25261 |
return obj && obj.__esModule ? obj : { default: obj }; |
| 25262 |
} |
| 25263 |
function _classCallCheck2(instance, Constructor) { |
| 25264 |
if (!(instance instanceof Constructor)) { |
| 25265 |
throw new TypeError("Cannot call a class as a function"); |
| 25266 |
} |
| 25267 |
} |
| 25268 |
function _possibleConstructorReturn2(self2, call) { |
| 25269 |
if (!self2) { |
| 25270 |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 25271 |
} |
| 25272 |
return call && (typeof call === "object" || typeof call === "function") ? call : self2; |
| 25273 |
} |
| 25274 |
function _inherits2(subClass, superClass) { |
| 25275 |
if (typeof superClass !== "function" && superClass !== null) { |
| 25276 |
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); |
| 25277 |
} |
| 25278 |
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); |
| 25279 |
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; |
| 25280 |
} |
| 25281 |
var TOOLBAR_CONFIG = [["bold", "italic", "link"], [{ header: 1 }, { header: 2 }, "blockquote"]]; |
| 25282 |
var BubbleTheme = function(_BaseTheme) { |
| 25283 |
_inherits2(BubbleTheme2, _BaseTheme); |
| 25284 |
function BubbleTheme2(quill2, options) { |
| 25285 |
_classCallCheck2(this, BubbleTheme2); |
| 25286 |
if (options.modules.toolbar != null && options.modules.toolbar.container == null) { |
| 25287 |
options.modules.toolbar.container = TOOLBAR_CONFIG; |
| 25288 |
} |
| 25289 |
var _this = _possibleConstructorReturn2(this, (BubbleTheme2.__proto__ || Object.getPrototypeOf(BubbleTheme2)).call(this, quill2, options)); |
| 25290 |
_this.quill.container.classList.add("ql-bubble"); |
| 25291 |
return _this; |
| 25292 |
} |
| 25293 |
_createClass2(BubbleTheme2, [{ |
| 25294 |
key: "extendToolbar", |
| 25295 |
value: function extendToolbar(toolbar) { |
| 25296 |
this.tooltip = new BubbleTooltip(this.quill, this.options.bounds); |
| 25297 |
this.tooltip.root.appendChild(toolbar.container); |
| 25298 |
this.buildButtons([].slice.call(toolbar.container.querySelectorAll("button")), _icons2.default); |
| 25299 |
this.buildPickers([].slice.call(toolbar.container.querySelectorAll("select")), _icons2.default); |
| 25300 |
} |
| 25301 |
}]); |
| 25302 |
return BubbleTheme2; |
| 25303 |
}(_base2.default); |
| 25304 |
BubbleTheme.DEFAULTS = (0, _extend2.default)(true, {}, _base2.default.DEFAULTS, { |
| 25305 |
modules: { |
| 25306 |
toolbar: { |
| 25307 |
handlers: { |
| 25308 |
link: function link(value) { |
| 25309 |
if (!value) { |
| 25310 |
this.quill.format("link", false); |
| 25311 |
} else { |
| 25312 |
this.quill.theme.tooltip.edit(); |
| 25313 |
} |
| 25314 |
} |
| 25315 |
} |
| 25316 |
} |
| 25317 |
} |
| 25318 |
}); |
| 25319 |
var BubbleTooltip = function(_BaseTooltip) { |
| 25320 |
_inherits2(BubbleTooltip2, _BaseTooltip); |
| 25321 |
function BubbleTooltip2(quill2, bounds) { |
| 25322 |
_classCallCheck2(this, BubbleTooltip2); |
| 25323 |
var _this2 = _possibleConstructorReturn2(this, (BubbleTooltip2.__proto__ || Object.getPrototypeOf(BubbleTooltip2)).call(this, quill2, bounds)); |
| 25324 |
_this2.quill.on(_emitter2.default.events.EDITOR_CHANGE, function(type, range, oldRange, source) { |
| 25325 |
if (type !== _emitter2.default.events.SELECTION_CHANGE) return; |
| 25326 |
if (range != null && range.length > 0 && source === _emitter2.default.sources.USER) { |
| 25327 |
_this2.show(); |
| 25328 |
_this2.root.style.left = "0px"; |
| 25329 |
_this2.root.style.width = ""; |
| 25330 |
_this2.root.style.width = _this2.root.offsetWidth + "px"; |
| 25331 |
var lines = _this2.quill.getLines(range.index, range.length); |
| 25332 |
if (lines.length === 1) { |
| 25333 |
_this2.position(_this2.quill.getBounds(range)); |
| 25334 |
} else { |
| 25335 |
var lastLine = lines[lines.length - 1]; |
| 25336 |
var index = _this2.quill.getIndex(lastLine); |
| 25337 |
var length = Math.min(lastLine.length() - 1, range.index + range.length - index); |
| 25338 |
var _bounds = _this2.quill.getBounds(new _selection.Range(index, length)); |
| 25339 |
_this2.position(_bounds); |
| 25340 |
} |
| 25341 |
} else if (document.activeElement !== _this2.textbox && _this2.quill.hasFocus()) { |
| 25342 |
_this2.hide(); |
| 25343 |
} |
| 25344 |
}); |
| 25345 |
return _this2; |
| 25346 |
} |
| 25347 |
_createClass2(BubbleTooltip2, [{ |
| 25348 |
key: "listen", |
| 25349 |
value: function listen() { |
| 25350 |
var _this3 = this; |
| 25351 |
_get(BubbleTooltip2.prototype.__proto__ || Object.getPrototypeOf(BubbleTooltip2.prototype), "listen", this).call(this); |
| 25352 |
this.root.querySelector(".ql-close").addEventListener("click", function() { |
| 25353 |
_this3.root.classList.remove("ql-editing"); |
| 25354 |
}); |
| 25355 |
this.quill.on(_emitter2.default.events.SCROLL_OPTIMIZE, function() { |
| 25356 |
setTimeout(function() { |
| 25357 |
if (_this3.root.classList.contains("ql-hidden")) return; |
| 25358 |
var range = _this3.quill.getSelection(); |
| 25359 |
if (range != null) { |
| 25360 |
_this3.position(_this3.quill.getBounds(range)); |
| 25361 |
} |
| 25362 |
}, 1); |
| 25363 |
}); |
| 25364 |
} |
| 25365 |
}, { |
| 25366 |
key: "cancel", |
| 25367 |
value: function cancel() { |
| 25368 |
this.show(); |
| 25369 |
} |
| 25370 |
}, { |
| 25371 |
key: "position", |
| 25372 |
value: function position(reference) { |
| 25373 |
var shift = _get(BubbleTooltip2.prototype.__proto__ || Object.getPrototypeOf(BubbleTooltip2.prototype), "position", this).call(this, reference); |
| 25374 |
var arrow = this.root.querySelector(".ql-tooltip-arrow"); |
| 25375 |
arrow.style.marginLeft = ""; |
| 25376 |
if (shift === 0) return shift; |
| 25377 |
arrow.style.marginLeft = -1 * shift - arrow.offsetWidth / 2 + "px"; |
| 25378 |
} |
| 25379 |
}]); |
| 25380 |
return BubbleTooltip2; |
| 25381 |
}(_base.BaseTooltip); |
| 25382 |
BubbleTooltip.TEMPLATE = ['<span class="ql-tooltip-arrow"></span>', '<div class="ql-tooltip-editor">', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-close"></a>', "</div>"].join(""); |
| 25383 |
exports$12.BubbleTooltip = BubbleTooltip; |
| 25384 |
exports$12.default = BubbleTheme; |
| 25385 |
}, |
| 25386 |
/* 109 */ |
| 25387 |
/***/ |
| 25388 |
function(module2, exports$12, __webpack_require__) { |
| 25389 |
module2.exports = __webpack_require__(63); |
| 25390 |
} |
| 25391 |
/******/ |
| 25392 |
])["default"] |
| 25393 |
); |
| 25394 |
}); |
| 25395 |
})(quill); |
| 25396 |
var quillExports = quill.exports; |
| 25397 |
var __extends = commonjsGlobal && commonjsGlobal.__extends || /* @__PURE__ */ function() { |
| 25398 |
var extendStatics = function(d2, b2) { |
| 25399 |
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) { |
| 25400 |
d3.__proto__ = b3; |
| 25401 |
} || function(d3, b3) { |
| 25402 |
for (var p2 in b3) if (b3.hasOwnProperty(p2)) d3[p2] = b3[p2]; |
| 25403 |
}; |
| 25404 |
return extendStatics(d2, b2); |
| 25405 |
}; |
| 25406 |
return function(d2, b2) { |
| 25407 |
extendStatics(d2, b2); |
| 25408 |
function __() { |
| 25409 |
this.constructor = d2; |
| 25410 |
} |
| 25411 |
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __()); |
| 25412 |
}; |
| 25413 |
}(); |
| 25414 |
var __assign = commonjsGlobal && commonjsGlobal.__assign || function() { |
| 25415 |
__assign = Object.assign || function(t2) { |
| 25416 |
for (var s, i = 1, n2 = arguments.length; i < n2; i++) { |
| 25417 |
s = arguments[i]; |
| 25418 |
for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2)) |
| 25419 |
t2[p2] = s[p2]; |
| 25420 |
} |
| 25421 |
return t2; |
| 25422 |
}; |
| 25423 |
return __assign.apply(this, arguments); |
| 25424 |
}; |
| 25425 |
var __spreadArrays = commonjsGlobal && commonjsGlobal.__spreadArrays || function() { |
| 25426 |
for (var s = 0, i = 0, il2 = arguments.length; i < il2; i++) s += arguments[i].length; |
| 25427 |
for (var r2 = Array(s), k2 = 0, i = 0; i < il2; i++) |
| 25428 |
for (var a = arguments[i], j = 0, jl2 = a.length; j < jl2; j++, k2++) |
| 25429 |
r2[k2] = a[j]; |
| 25430 |
return r2; |
| 25431 |
}; |
| 25432 |
var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { |
| 25433 |
return mod && mod.__esModule ? mod : { "default": mod }; |
| 25434 |
}; |
| 25435 |
var react_1 = __importDefault(reactExports); |
| 25436 |
var react_dom_1 = __importDefault(reactDomExports); |
| 25437 |
var isEqual_1 = __importDefault(isEqual_1$1); |
| 25438 |
var quill_1 = __importDefault(quillExports); |
| 25439 |
var ReactQuill = ( |
| 25440 |
/** @class */ |
| 25441 |
function(_super) { |
| 25442 |
__extends(ReactQuill2, _super); |
| 25443 |
function ReactQuill2(props) { |
| 25444 |
var _this = _super.call(this, props) || this; |
| 25445 |
_this.dirtyProps = [ |
| 25446 |
"modules", |
| 25447 |
"formats", |
| 25448 |
"bounds", |
| 25449 |
"theme", |
| 25450 |
"children" |
| 25451 |
]; |
| 25452 |
_this.cleanProps = [ |
| 25453 |
"id", |
| 25454 |
"className", |
| 25455 |
"style", |
| 25456 |
"placeholder", |
| 25457 |
"tabIndex", |
| 25458 |
"onChange", |
| 25459 |
"onChangeSelection", |
| 25460 |
"onFocus", |
| 25461 |
"onBlur", |
| 25462 |
"onKeyPress", |
| 25463 |
"onKeyDown", |
| 25464 |
"onKeyUp" |
| 25465 |
]; |
| 25466 |
_this.state = { |
| 25467 |
generation: 0 |
| 25468 |
}; |
| 25469 |
_this.selection = null; |
| 25470 |
_this.onEditorChange = function(eventName, rangeOrDelta, oldRangeOrDelta, source) { |
| 25471 |
var _a2, _b2, _c2, _d2; |
| 25472 |
if (eventName === "text-change") { |
| 25473 |
(_b2 = (_a2 = _this).onEditorChangeText) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, _this.editor.root.innerHTML, rangeOrDelta, source, _this.unprivilegedEditor); |
| 25474 |
} else if (eventName === "selection-change") { |
| 25475 |
(_d2 = (_c2 = _this).onEditorChangeSelection) === null || _d2 === void 0 ? void 0 : _d2.call(_c2, rangeOrDelta, source, _this.unprivilegedEditor); |
| 25476 |
} |
| 25477 |
}; |
| 25478 |
var value = _this.isControlled() ? props.value : props.defaultValue; |
| 25479 |
_this.value = value !== null && value !== void 0 ? value : ""; |
| 25480 |
return _this; |
| 25481 |
} |
| 25482 |
ReactQuill2.prototype.validateProps = function(props) { |
| 25483 |
var _a2; |
| 25484 |
if (react_1.default.Children.count(props.children) > 1) |
| 25485 |
throw new Error("The Quill editing area can only be composed of a single React element."); |
| 25486 |
if (react_1.default.Children.count(props.children)) { |
| 25487 |
var child = react_1.default.Children.only(props.children); |
| 25488 |
if (((_a2 = child) === null || _a2 === void 0 ? void 0 : _a2.type) === "textarea") |
| 25489 |
throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead."); |
| 25490 |
} |
| 25491 |
if (this.lastDeltaChangeSet && props.value === this.lastDeltaChangeSet) |
| 25492 |
throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas"); |
| 25493 |
}; |
| 25494 |
ReactQuill2.prototype.shouldComponentUpdate = function(nextProps, nextState) { |
| 25495 |
var _this = this; |
| 25496 |
var _a2; |
| 25497 |
this.validateProps(nextProps); |
| 25498 |
if (!this.editor || this.state.generation !== nextState.generation) { |
| 25499 |
return true; |
| 25500 |
} |
| 25501 |
if ("value" in nextProps) { |
| 25502 |
var prevContents = this.getEditorContents(); |
| 25503 |
var nextContents = (_a2 = nextProps.value, _a2 !== null && _a2 !== void 0 ? _a2 : ""); |
| 25504 |
if (!this.isEqualValue(nextContents, prevContents)) { |
| 25505 |
this.setEditorContents(this.editor, nextContents); |
| 25506 |
} |
| 25507 |
} |
| 25508 |
if (nextProps.readOnly !== this.props.readOnly) { |
| 25509 |
this.setEditorReadOnly(this.editor, nextProps.readOnly); |
| 25510 |
} |
| 25511 |
return __spreadArrays(this.cleanProps, this.dirtyProps).some(function(prop) { |
| 25512 |
return !isEqual_1.default(nextProps[prop], _this.props[prop]); |
| 25513 |
}); |
| 25514 |
}; |
| 25515 |
ReactQuill2.prototype.shouldComponentRegenerate = function(nextProps) { |
| 25516 |
var _this = this; |
| 25517 |
return this.dirtyProps.some(function(prop) { |
| 25518 |
return !isEqual_1.default(nextProps[prop], _this.props[prop]); |
| 25519 |
}); |
| 25520 |
}; |
| 25521 |
ReactQuill2.prototype.componentDidMount = function() { |
| 25522 |
this.instantiateEditor(); |
| 25523 |
this.setEditorContents(this.editor, this.getEditorContents()); |
| 25524 |
}; |
| 25525 |
ReactQuill2.prototype.componentWillUnmount = function() { |
| 25526 |
this.destroyEditor(); |
| 25527 |
}; |
| 25528 |
ReactQuill2.prototype.componentDidUpdate = function(prevProps, prevState) { |
| 25529 |
var _this = this; |
| 25530 |
if (this.editor && this.shouldComponentRegenerate(prevProps)) { |
| 25531 |
var delta = this.editor.getContents(); |
| 25532 |
var selection = this.editor.getSelection(); |
| 25533 |
this.regenerationSnapshot = { delta, selection }; |
| 25534 |
this.setState({ generation: this.state.generation + 1 }); |
| 25535 |
this.destroyEditor(); |
| 25536 |
} |
| 25537 |
if (this.state.generation !== prevState.generation) { |
| 25538 |
var _a2 = this.regenerationSnapshot, delta = _a2.delta, selection_1 = _a2.selection; |
| 25539 |
delete this.regenerationSnapshot; |
| 25540 |
this.instantiateEditor(); |
| 25541 |
var editor_1 = this.editor; |
| 25542 |
editor_1.setContents(delta); |
| 25543 |
postpone(function() { |
| 25544 |
return _this.setEditorSelection(editor_1, selection_1); |
| 25545 |
}); |
| 25546 |
} |
| 25547 |
}; |
| 25548 |
ReactQuill2.prototype.instantiateEditor = function() { |
| 25549 |
if (this.editor) { |
| 25550 |
this.hookEditor(this.editor); |
| 25551 |
} else { |
| 25552 |
this.editor = this.createEditor(this.getEditingArea(), this.getEditorConfig()); |
| 25553 |
} |
| 25554 |
}; |
| 25555 |
ReactQuill2.prototype.destroyEditor = function() { |
| 25556 |
if (!this.editor) |
| 25557 |
return; |
| 25558 |
this.unhookEditor(this.editor); |
| 25559 |
}; |
| 25560 |
ReactQuill2.prototype.isControlled = function() { |
| 25561 |
return "value" in this.props; |
| 25562 |
}; |
| 25563 |
ReactQuill2.prototype.getEditorConfig = function() { |
| 25564 |
return { |
| 25565 |
bounds: this.props.bounds, |
| 25566 |
formats: this.props.formats, |
| 25567 |
modules: this.props.modules, |
| 25568 |
placeholder: this.props.placeholder, |
| 25569 |
readOnly: this.props.readOnly, |
| 25570 |
scrollingContainer: this.props.scrollingContainer, |
| 25571 |
tabIndex: this.props.tabIndex, |
| 25572 |
theme: this.props.theme |
| 25573 |
}; |
| 25574 |
}; |
| 25575 |
ReactQuill2.prototype.getEditor = function() { |
| 25576 |
if (!this.editor) |
| 25577 |
throw new Error("Accessing non-instantiated editor"); |
| 25578 |
return this.editor; |
| 25579 |
}; |
| 25580 |
ReactQuill2.prototype.createEditor = function(element, config) { |
| 25581 |
var editor = new quill_1.default(element, config); |
| 25582 |
if (config.tabIndex != null) { |
| 25583 |
this.setEditorTabIndex(editor, config.tabIndex); |
| 25584 |
} |
| 25585 |
this.hookEditor(editor); |
| 25586 |
return editor; |
| 25587 |
}; |
| 25588 |
ReactQuill2.prototype.hookEditor = function(editor) { |
| 25589 |
this.unprivilegedEditor = this.makeUnprivilegedEditor(editor); |
| 25590 |
editor.on("editor-change", this.onEditorChange); |
| 25591 |
}; |
| 25592 |
ReactQuill2.prototype.unhookEditor = function(editor) { |
| 25593 |
editor.off("editor-change", this.onEditorChange); |
| 25594 |
}; |
| 25595 |
ReactQuill2.prototype.getEditorContents = function() { |
| 25596 |
return this.value; |
| 25597 |
}; |
| 25598 |
ReactQuill2.prototype.getEditorSelection = function() { |
| 25599 |
return this.selection; |
| 25600 |
}; |
| 25601 |
ReactQuill2.prototype.isDelta = function(value) { |
| 25602 |
return value && value.ops; |
| 25603 |
}; |
| 25604 |
ReactQuill2.prototype.isEqualValue = function(value, nextValue) { |
| 25605 |
if (this.isDelta(value) && this.isDelta(nextValue)) { |
| 25606 |
return isEqual_1.default(value.ops, nextValue.ops); |
| 25607 |
} else { |
| 25608 |
return isEqual_1.default(value, nextValue); |
| 25609 |
} |
| 25610 |
}; |
| 25611 |
ReactQuill2.prototype.setEditorContents = function(editor, value) { |
| 25612 |
var _this = this; |
| 25613 |
this.value = value; |
| 25614 |
var sel = this.getEditorSelection(); |
| 25615 |
if (typeof value === "string") { |
| 25616 |
editor.setContents(editor.clipboard.convert(value)); |
| 25617 |
} else { |
| 25618 |
editor.setContents(value); |
| 25619 |
} |
| 25620 |
postpone(function() { |
| 25621 |
return _this.setEditorSelection(editor, sel); |
| 25622 |
}); |
| 25623 |
}; |
| 25624 |
ReactQuill2.prototype.setEditorSelection = function(editor, range) { |
| 25625 |
this.selection = range; |
| 25626 |
if (range) { |
| 25627 |
var length_1 = editor.getLength(); |
| 25628 |
range.index = Math.max(0, Math.min(range.index, length_1 - 1)); |
| 25629 |
range.length = Math.max(0, Math.min(range.length, length_1 - 1 - range.index)); |
| 25630 |
editor.setSelection(range); |
| 25631 |
} |
| 25632 |
}; |
| 25633 |
ReactQuill2.prototype.setEditorTabIndex = function(editor, tabIndex) { |
| 25634 |
var _a2, _b2; |
| 25635 |
if ((_b2 = (_a2 = editor) === null || _a2 === void 0 ? void 0 : _a2.scroll) === null || _b2 === void 0 ? void 0 : _b2.domNode) { |
| 25636 |
editor.scroll.domNode.tabIndex = tabIndex; |
| 25637 |
} |
| 25638 |
}; |
| 25639 |
ReactQuill2.prototype.setEditorReadOnly = function(editor, value) { |
| 25640 |
if (value) { |
| 25641 |
editor.disable(); |
| 25642 |
} else { |
| 25643 |
editor.enable(); |
| 25644 |
} |
| 25645 |
}; |
| 25646 |
ReactQuill2.prototype.makeUnprivilegedEditor = function(editor) { |
| 25647 |
var e2 = editor; |
| 25648 |
return { |
| 25649 |
getHTML: function() { |
| 25650 |
return e2.root.innerHTML; |
| 25651 |
}, |
| 25652 |
getLength: e2.getLength.bind(e2), |
| 25653 |
getText: e2.getText.bind(e2), |
| 25654 |
getContents: e2.getContents.bind(e2), |
| 25655 |
getSelection: e2.getSelection.bind(e2), |
| 25656 |
getBounds: e2.getBounds.bind(e2) |
| 25657 |
}; |
| 25658 |
}; |
| 25659 |
ReactQuill2.prototype.getEditingArea = function() { |
| 25660 |
if (!this.editingArea) { |
| 25661 |
throw new Error("Instantiating on missing editing area"); |
| 25662 |
} |
| 25663 |
var element = react_dom_1.default.findDOMNode(this.editingArea); |
| 25664 |
if (!element) { |
| 25665 |
throw new Error("Cannot find element for editing area"); |
| 25666 |
} |
| 25667 |
if (element.nodeType === 3) { |
| 25668 |
throw new Error("Editing area cannot be a text node"); |
| 25669 |
} |
| 25670 |
return element; |
| 25671 |
}; |
| 25672 |
ReactQuill2.prototype.renderEditingArea = function() { |
| 25673 |
var _this = this; |
| 25674 |
var _a2 = this.props, children = _a2.children, preserveWhitespace = _a2.preserveWhitespace; |
| 25675 |
var generation = this.state.generation; |
| 25676 |
var properties = { |
| 25677 |
key: generation, |
| 25678 |
ref: function(instance) { |
| 25679 |
_this.editingArea = instance; |
| 25680 |
} |
| 25681 |
}; |
| 25682 |
if (react_1.default.Children.count(children)) { |
| 25683 |
return react_1.default.cloneElement(react_1.default.Children.only(children), properties); |
| 25684 |
} |
| 25685 |
return preserveWhitespace ? react_1.default.createElement("pre", __assign({}, properties)) : react_1.default.createElement("div", __assign({}, properties)); |
| 25686 |
}; |
| 25687 |
ReactQuill2.prototype.render = function() { |
| 25688 |
var _a2; |
| 25689 |
return react_1.default.createElement("div", { id: this.props.id, style: this.props.style, key: this.state.generation, className: "quill " + (_a2 = this.props.className, _a2 !== null && _a2 !== void 0 ? _a2 : ""), onKeyPress: this.props.onKeyPress, onKeyDown: this.props.onKeyDown, onKeyUp: this.props.onKeyUp }, this.renderEditingArea()); |
| 25690 |
}; |
| 25691 |
ReactQuill2.prototype.onEditorChangeText = function(value, delta, source, editor) { |
| 25692 |
var _a2, _b2; |
| 25693 |
if (!this.editor) |
| 25694 |
return; |
| 25695 |
var nextContents = this.isDelta(this.value) ? editor.getContents() : editor.getHTML(); |
| 25696 |
if (nextContents !== this.getEditorContents()) { |
| 25697 |
this.lastDeltaChangeSet = delta; |
| 25698 |
this.value = nextContents; |
| 25699 |
(_b2 = (_a2 = this.props).onChange) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, value, delta, source, editor); |
| 25700 |
} |
| 25701 |
}; |
| 25702 |
ReactQuill2.prototype.onEditorChangeSelection = function(nextSelection, source, editor) { |
| 25703 |
var _a2, _b2, _c2, _d2, _e2, _f2; |
| 25704 |
if (!this.editor) |
| 25705 |
return; |
| 25706 |
var currentSelection = this.getEditorSelection(); |
| 25707 |
var hasGainedFocus = !currentSelection && nextSelection; |
| 25708 |
var hasLostFocus = currentSelection && !nextSelection; |
| 25709 |
if (isEqual_1.default(nextSelection, currentSelection)) |
| 25710 |
return; |
| 25711 |
this.selection = nextSelection; |
| 25712 |
(_b2 = (_a2 = this.props).onChangeSelection) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, nextSelection, source, editor); |
| 25713 |
if (hasGainedFocus) { |
| 25714 |
(_d2 = (_c2 = this.props).onFocus) === null || _d2 === void 0 ? void 0 : _d2.call(_c2, nextSelection, source, editor); |
| 25715 |
} else if (hasLostFocus) { |
| 25716 |
(_f2 = (_e2 = this.props).onBlur) === null || _f2 === void 0 ? void 0 : _f2.call(_e2, currentSelection, source, editor); |
| 25717 |
} |
| 25718 |
}; |
| 25719 |
ReactQuill2.prototype.focus = function() { |
| 25720 |
if (!this.editor) |
| 25721 |
return; |
| 25722 |
this.editor.focus(); |
| 25723 |
}; |
| 25724 |
ReactQuill2.prototype.blur = function() { |
| 25725 |
if (!this.editor) |
| 25726 |
return; |
| 25727 |
this.selection = null; |
| 25728 |
this.editor.blur(); |
| 25729 |
}; |
| 25730 |
ReactQuill2.displayName = "React Quill"; |
| 25731 |
ReactQuill2.Quill = quill_1.default; |
| 25732 |
ReactQuill2.defaultProps = { |
| 25733 |
theme: "snow", |
| 25734 |
modules: {}, |
| 25735 |
readOnly: false |
| 25736 |
}; |
| 25737 |
return ReactQuill2; |
| 25738 |
}(react_1.default.Component) |
| 25739 |
); |
| 25740 |
function postpone(fn) { |
| 25741 |
Promise.resolve().then(fn); |
| 25742 |
} |
| 25743 |
var lib = ReactQuill; |
| 25744 |
const ReactQuill$1 = /* @__PURE__ */ getDefaultExportFromCjs(lib); |
| 25745 |
export { |
| 25746 |
isArray_1 as $, |
| 25747 |
Activity as A, |
| 25748 |
BadgePercent as B, |
| 25749 |
Crown as C, |
| 25750 |
ArrowLeft as D, |
| 25751 |
Loader2 as E, |
| 25752 |
FileSignature as F, |
| 25753 |
Gift as G, |
| 25754 |
Sun as H, |
| 25755 |
Moon as I, |
| 25756 |
User as J, |
| 25757 |
Key as K, |
| 25758 |
List as L, |
| 25759 |
MessageCircle as M, |
| 25760 |
Network as N, |
| 25761 |
RefreshCw as O, |
| 25762 |
Puzzle as P, |
| 25763 |
Inbox as Q, |
| 25764 |
RotateCcw as R, |
| 25765 |
Sparkles as S, |
| 25766 |
TrendingUp as T, |
| 25767 |
Users as U, |
| 25768 |
AlertTriangle as V, |
| 25769 |
Wrench as W, |
| 25770 |
ExternalLink as X, |
| 25771 |
isObjectLike_1 as Y, |
| 25772 |
Zap as Z, |
| 25773 |
_baseGetTag as _, |
| 25774 |
MessageSquare as a, |
| 25775 |
PauseCircle as a$, |
| 25776 |
_MapCache as a0, |
| 25777 |
getDefaultExportFromCjs as a1, |
| 25778 |
_Symbol as a2, |
| 25779 |
isObject$3 as a3, |
| 25780 |
isFunction$3 as a4, |
| 25781 |
reactIsExports as a5, |
| 25782 |
React as a6, |
| 25783 |
_Stack as a7, |
| 25784 |
_baseIsEqual as a8, |
| 25785 |
isObject_1 as a9, |
| 25786 |
AlertCircle as aA, |
| 25787 |
Check as aB, |
| 25788 |
Wand2 as aC, |
| 25789 |
ChevronLeft as aD, |
| 25790 |
CheckCircle2 as aE, |
| 25791 |
HelpCircle as aF, |
| 25792 |
Info as aG, |
| 25793 |
Copy as aH, |
| 25794 |
MoreVertical as aI, |
| 25795 |
Columns as aJ, |
| 25796 |
PenSquare as aK, |
| 25797 |
ArrowUp as aL, |
| 25798 |
ArrowDown as aM, |
| 25799 |
Archive as aN, |
| 25800 |
Trash2 as aO, |
| 25801 |
Search as aP, |
| 25802 |
ArrowUpDown as aQ, |
| 25803 |
Eye as aR, |
| 25804 |
Upload as aS, |
| 25805 |
Image as aT, |
| 25806 |
ReactQuill$1 as aU, |
| 25807 |
Pen as aV, |
| 25808 |
Save as aW, |
| 25809 |
Download as aX, |
| 25810 |
CircleDollarSign as aY, |
| 25811 |
Undo2 as aZ, |
| 25812 |
Phone as a_, |
| 25813 |
keys_1 as aa, |
| 25814 |
isLength_1 as ab, |
| 25815 |
_isIndex as ac, |
| 25816 |
isArguments_1 as ad, |
| 25817 |
_Set as ae, |
| 25818 |
_setToArray as af, |
| 25819 |
_SetCache as ag, |
| 25820 |
_cacheHas as ah, |
| 25821 |
_arrayPush as ai, |
| 25822 |
isArrayLike_1 as aj, |
| 25823 |
_baseUnary as ak, |
| 25824 |
_getNative as al, |
| 25825 |
eq_1 as am, |
| 25826 |
_root as an, |
| 25827 |
isEqual$1 as ao, |
| 25828 |
Animate as ap, |
| 25829 |
_overArg as aq, |
| 25830 |
_arraySome as ar, |
| 25831 |
Clock as as, |
| 25832 |
DollarSign as at, |
| 25833 |
ArrowRight as au, |
| 25834 |
Shield as av, |
| 25835 |
CheckCircle as aw, |
| 25836 |
Plus as ax, |
| 25837 |
X as ay, |
| 25838 |
reactDomExports as az, |
| 25839 |
Plane as b, |
| 25840 |
Link as b$, |
| 25841 |
ShieldX as b0, |
| 25842 |
ShieldOff as b1, |
| 25843 |
Globe as b2, |
| 25844 |
Award as b3, |
| 25845 |
Database as b4, |
| 25846 |
Folder as b5, |
| 25847 |
Mountain as b6, |
| 25848 |
UserCheck as b7, |
| 25849 |
Server as b8, |
| 25850 |
XCircle as b9, |
| 25851 |
client as bA, |
| 25852 |
QueryClientProvider as bB, |
| 25853 |
LifeBuoy as bC, |
| 25854 |
ShieldCheck as bD, |
| 25855 |
LogOut as bE, |
| 25856 |
Pencil as bF, |
| 25857 |
Maximize2 as bG, |
| 25858 |
CheckSquare as bH, |
| 25859 |
BookOpen as bI, |
| 25860 |
Lightbulb as bJ, |
| 25861 |
History as bK, |
| 25862 |
Box as bL, |
| 25863 |
Home as bM, |
| 25864 |
Car as bN, |
| 25865 |
Building2 as bO, |
| 25866 |
Palette as bP, |
| 25867 |
ClipboardList as bQ, |
| 25868 |
SlidersHorizontal as bR, |
| 25869 |
Percent as bS, |
| 25870 |
Receipt as bT, |
| 25871 |
Plug as bU, |
| 25872 |
UserPlus as bV, |
| 25873 |
KeyRound as bW, |
| 25874 |
Unlock as bX, |
| 25875 |
UtensilsCrossed as bY, |
| 25876 |
Hotel as bZ, |
| 25877 |
Replace as b_, |
| 25878 |
Video as ba, |
| 25879 |
Lock as bb, |
| 25880 |
GripVertical as bc, |
| 25881 |
ChevronUp as bd, |
| 25882 |
Play as be, |
| 25883 |
ClipboardCopy as bf, |
| 25884 |
Ban as bg, |
| 25885 |
Bell as bh, |
| 25886 |
Heart as bi, |
| 25887 |
Scissors as bj, |
| 25888 |
Send as bk, |
| 25889 |
Filter as bl, |
| 25890 |
ArrowUpRight as bm, |
| 25891 |
ClipboardCheck as bn, |
| 25892 |
PenTool as bo, |
| 25893 |
Camera as bp, |
| 25894 |
BarChart as bq, |
| 25895 |
Megaphone as br, |
| 25896 |
Compass as bs, |
| 25897 |
GitBranch as bt, |
| 25898 |
Pause as bu, |
| 25899 |
Settings2 as bv, |
| 25900 |
Code as bw, |
| 25901 |
Bug as bx, |
| 25902 |
EyeOff as by, |
| 25903 |
QueryClient as bz, |
| 25904 |
Route as c, |
| 25905 |
Layers as c0, |
| 25906 |
Power as c1, |
| 25907 |
PowerOff as c2, |
| 25908 |
BellRing as c3, |
| 25909 |
ListChecks as c4, |
| 25910 |
Hash$2 as c5, |
| 25911 |
AlignLeft as c6, |
| 25912 |
Type as c7, |
| 25913 |
Target as c8, |
| 25914 |
PanelLeft as c9, |
| 25915 |
Layout as ca, |
| 25916 |
Mail as d, |
| 25917 |
Tag as e, |
| 25918 |
FolderTree as f, |
| 25919 |
CircleUser as g, |
| 25920 |
Package as h, |
| 25921 |
CreditCard as i, |
| 25922 |
jsxRuntimeExports as j, |
| 25923 |
FileText as k, |
| 25924 |
Settings as l, |
| 25925 |
BarChart3 as m, |
| 25926 |
Star as n, |
| 25927 |
CalendarDays as o, |
| 25928 |
CalendarClock as p, |
| 25929 |
Calendar as q, |
| 25930 |
reactExports as r, |
| 25931 |
MapPin as s, |
| 25932 |
LayoutDashboard as t, |
| 25933 |
useQuery as u, |
| 25934 |
useQueryClient as v, |
| 25935 |
useMutation as w, |
| 25936 |
Webhook as x, |
| 25937 |
ChevronDown as y, |
| 25938 |
ChevronRight as z |
| 25939 |
}; |
| 25940 |
//# sourceMappingURL=react-vendor-CithbthY.js.map |
| 25941 |
|