base game
This commit is contained in:
6
libs/bootstrap-4.6.2.bundle.min.js
vendored
Normal file
6
libs/bootstrap-4.6.2.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
8
libs/bootstrap-select-1.13.18.min.js
vendored
Normal file
8
libs/bootstrap-select-1.13.18.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
libs/bootstrap-table-1.23.4.min.js
vendored
Normal file
10
libs/bootstrap-table-1.23.4.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
libs/jquery-3.7.1.min.js
vendored
Normal file
2
libs/jquery-3.7.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
libs/kjua-0.9.0.min.js
vendored
Normal file
2
libs/kjua-0.9.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
libs/moment-2.30.1.min.js
vendored
Normal file
1
libs/moment-2.30.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
120
libs/privatebin/base-x-3.0.7.js
Normal file
120
libs/privatebin/base-x-3.0.7.js
Normal file
@@ -0,0 +1,120 @@
|
||||
'use strict';
|
||||
// base-x encoding / decoding
|
||||
// based on https://github.com/cryptocoinjs/base-x 3.0.7
|
||||
// modification: removed Buffer dependency and node.modules entry
|
||||
// Copyright (c) 2018 base-x contributors
|
||||
// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
(function(){
|
||||
this.baseX = function base (ALPHABET) {
|
||||
if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
|
||||
var BASE_MAP = new Uint8Array(256)
|
||||
BASE_MAP.fill(255)
|
||||
for (var i = 0; i < ALPHABET.length; i++) {
|
||||
var x = ALPHABET.charAt(i)
|
||||
var xc = x.charCodeAt(0)
|
||||
if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
|
||||
BASE_MAP[xc] = i
|
||||
}
|
||||
var BASE = ALPHABET.length
|
||||
var LEADER = ALPHABET.charAt(0)
|
||||
var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up
|
||||
var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up
|
||||
function encode (source) {
|
||||
if (source.length === 0) { return '' }
|
||||
// Skip & count leading zeroes.
|
||||
var zeroes = 0
|
||||
var length = 0
|
||||
var pbegin = 0
|
||||
var pend = source.length
|
||||
while (pbegin !== pend && source[pbegin] === 0) {
|
||||
pbegin++
|
||||
zeroes++
|
||||
}
|
||||
// Allocate enough space in big-endian base58 representation.
|
||||
var size = ((pend - pbegin) * iFACTOR + 1) >>> 0
|
||||
var b58 = new Uint8Array(size)
|
||||
// Process the bytes.
|
||||
while (pbegin !== pend) {
|
||||
var carry = source[pbegin]
|
||||
// Apply "b58 = b58 * 256 + ch".
|
||||
var i = 0
|
||||
for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
|
||||
carry += (256 * b58[it1]) >>> 0
|
||||
b58[it1] = (carry % BASE) >>> 0
|
||||
carry = (carry / BASE) >>> 0
|
||||
}
|
||||
if (carry !== 0) { throw new Error('Non-zero carry') }
|
||||
length = i
|
||||
pbegin++
|
||||
}
|
||||
// Skip leading zeroes in base58 result.
|
||||
var it2 = size - length
|
||||
while (it2 !== size && b58[it2] === 0) {
|
||||
it2++
|
||||
}
|
||||
// Translate the result into a string.
|
||||
var str = LEADER.repeat(zeroes)
|
||||
for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }
|
||||
return str
|
||||
}
|
||||
function decodeUnsafe (source) {
|
||||
if (typeof source !== 'string') { throw new TypeError('Expected String') }
|
||||
if (source.length === 0) { return '' }
|
||||
var psz = 0
|
||||
// Skip leading spaces.
|
||||
if (source[psz] === ' ') { return }
|
||||
// Skip and count leading '1's.
|
||||
var zeroes = 0
|
||||
var length = 0
|
||||
while (source[psz] === LEADER) {
|
||||
zeroes++
|
||||
psz++
|
||||
}
|
||||
// Allocate enough space in big-endian base256 representation.
|
||||
var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.
|
||||
var b256 = new Uint8Array(size)
|
||||
// Process the characters.
|
||||
while (source[psz]) {
|
||||
// Decode character
|
||||
var carry = BASE_MAP[source.charCodeAt(psz)]
|
||||
// Invalid character
|
||||
if (carry === 255) { return }
|
||||
var i = 0
|
||||
for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
|
||||
carry += (BASE * b256[it3]) >>> 0
|
||||
b256[it3] = (carry % 256) >>> 0
|
||||
carry = (carry / 256) >>> 0
|
||||
}
|
||||
if (carry !== 0) { throw new Error('Non-zero carry') }
|
||||
length = i
|
||||
psz++
|
||||
}
|
||||
// Skip trailing spaces.
|
||||
if (source[psz] === ' ') { return }
|
||||
// Skip leading zeroes in b256.
|
||||
var it4 = size - length
|
||||
while (it4 !== size && b256[it4] === 0) {
|
||||
it4++
|
||||
}
|
||||
var vch = []
|
||||
var j = zeroes
|
||||
while (it4 !== size) {
|
||||
vch[j++] = b256[it4++]
|
||||
}
|
||||
return vch
|
||||
}
|
||||
function decode (string) {
|
||||
var buffer = decodeUnsafe(string)
|
||||
if (buffer) { return buffer }
|
||||
throw new Error('Non-base' + BASE + ' character')
|
||||
}
|
||||
return {
|
||||
encode: encode,
|
||||
decodeUnsafe: decodeUnsafe,
|
||||
decode: decode
|
||||
}
|
||||
}
|
||||
}).call(this);
|
||||
755
libs/privatebin/rawinflate-0.3.js
Normal file
755
libs/privatebin/rawinflate-0.3.js
Normal file
@@ -0,0 +1,755 @@
|
||||
/*
|
||||
* $Id: rawinflate.js,v 0.3 2013/04/09 14:25:38 dankogai Exp dankogai $
|
||||
*
|
||||
* GNU General Public License, version 2 (GPL-2.0)
|
||||
* https://opensource.org/licenses/GPL-2.0
|
||||
* original:
|
||||
* http://www.onicos.com/staff/iz/amuse/javascript/expert/inflate.txt
|
||||
*/
|
||||
|
||||
(function(ctx){
|
||||
|
||||
/* Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp>
|
||||
* Version: 1.0.0.1
|
||||
* LastModified: Dec 25 1999
|
||||
*/
|
||||
|
||||
/* Interface:
|
||||
* data = zip_inflate(src);
|
||||
*/
|
||||
|
||||
/* constant parameters */
|
||||
var zip_WSIZE = 32768; // Sliding Window size
|
||||
var zip_STORED_BLOCK = 0;
|
||||
var zip_STATIC_TREES = 1;
|
||||
var zip_DYN_TREES = 2;
|
||||
|
||||
/* for inflate */
|
||||
var zip_lbits = 9; // bits in base literal/length lookup table
|
||||
var zip_dbits = 6; // bits in base distance lookup table
|
||||
var zip_INBUFSIZ = 32768; // Input buffer size
|
||||
var zip_INBUF_EXTRA = 64; // Extra buffer
|
||||
|
||||
/* variables (inflate) */
|
||||
var zip_slide;
|
||||
var zip_wp; // current position in slide
|
||||
var zip_fixed_tl = null; // inflate static
|
||||
var zip_fixed_td; // inflate static
|
||||
var zip_fixed_bl, fixed_bd; // inflate static
|
||||
var zip_bit_buf; // bit buffer
|
||||
var zip_bit_len; // bits in bit buffer
|
||||
var zip_method;
|
||||
var zip_eof;
|
||||
var zip_copy_leng;
|
||||
var zip_copy_dist;
|
||||
var zip_tl, zip_td; // literal/length and distance decoder tables
|
||||
var zip_bl, zip_bd; // number of bits decoded by tl and td
|
||||
|
||||
var zip_inflate_data;
|
||||
var zip_inflate_pos;
|
||||
|
||||
|
||||
/* constant tables (inflate) */
|
||||
var zip_MASK_BITS = new Array(
|
||||
0x0000,
|
||||
0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
|
||||
0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff);
|
||||
// Tables for deflate from PKZIP's appnote.txt.
|
||||
var zip_cplens = new Array( // Copy lengths for literal codes 257..285
|
||||
3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
|
||||
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0);
|
||||
/* note: see note #13 above about the 258 in this list. */
|
||||
var zip_cplext = new Array( // Extra bits for literal codes 257..285
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
|
||||
3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99); // 99==invalid
|
||||
var zip_cpdist = new Array( // Copy offsets for distance codes 0..29
|
||||
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
|
||||
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
|
||||
8193, 12289, 16385, 24577);
|
||||
var zip_cpdext = new Array( // Extra bits for distance codes
|
||||
0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
|
||||
7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
|
||||
12, 12, 13, 13);
|
||||
var zip_border = new Array( // Order of the bit length code lengths
|
||||
16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15);
|
||||
/* objects (inflate) */
|
||||
|
||||
var zip_HuftList = function() {
|
||||
this.next = null;
|
||||
this.list = null;
|
||||
}
|
||||
|
||||
var zip_HuftNode = function() {
|
||||
this.e = 0; // number of extra bits or operation
|
||||
this.b = 0; // number of bits in this code or subcode
|
||||
|
||||
// union
|
||||
this.n = 0; // literal, length base, or distance base
|
||||
this.t = null; // (zip_HuftNode) pointer to next level of table
|
||||
}
|
||||
|
||||
var zip_HuftBuild = function(b, // code lengths in bits (all assumed <= BMAX)
|
||||
n, // number of codes (assumed <= N_MAX)
|
||||
s, // number of simple-valued codes (0..s-1)
|
||||
d, // list of base values for non-simple codes
|
||||
e, // list of extra bits for non-simple codes
|
||||
mm // maximum lookup bits
|
||||
) {
|
||||
this.BMAX = 16; // maximum bit length of any code
|
||||
this.N_MAX = 288; // maximum number of codes in any set
|
||||
this.status = 0; // 0: success, 1: incomplete table, 2: bad input
|
||||
this.root = null; // (zip_HuftList) starting table
|
||||
this.m = 0; // maximum lookup bits, returns actual
|
||||
|
||||
/* Given a list of code lengths and a maximum table size, make a set of
|
||||
tables to decode that set of codes. Return zero on success, one if
|
||||
the given code set is incomplete (the tables are still built in this
|
||||
case), two if the input is invalid (all zero length codes or an
|
||||
oversubscribed set of lengths), and three if not enough memory.
|
||||
The code with value 256 is special, and the tables are constructed
|
||||
so that no bits beyond that code are fetched when that code is
|
||||
decoded. */
|
||||
{
|
||||
var a; // counter for codes of length k
|
||||
var c = new Array(this.BMAX+1); // bit length count table
|
||||
var el; // length of EOB code (value 256)
|
||||
var f; // i repeats in table every f entries
|
||||
var g; // maximum code length
|
||||
var h; // table level
|
||||
var i; // counter, current code
|
||||
var j; // counter
|
||||
var k; // number of bits in current code
|
||||
var lx = new Array(this.BMAX+1); // stack of bits per table
|
||||
var p; // pointer into c[], b[], or v[]
|
||||
var pidx; // index of p
|
||||
var q; // (zip_HuftNode) points to current table
|
||||
var r = new zip_HuftNode(); // table entry for structure assignment
|
||||
var u = new Array(this.BMAX); // zip_HuftNode[BMAX][] table stack
|
||||
var v = new Array(this.N_MAX); // values in order of bit length
|
||||
var w;
|
||||
var x = new Array(this.BMAX+1);// bit offsets, then code stack
|
||||
var xp; // pointer into x or c
|
||||
var y; // number of dummy codes added
|
||||
var z; // number of entries in current table
|
||||
var o;
|
||||
var tail; // (zip_HuftList)
|
||||
|
||||
tail = this.root = null;
|
||||
for(i = 0; i < c.length; i++)
|
||||
c[i] = 0;
|
||||
for(i = 0; i < lx.length; i++)
|
||||
lx[i] = 0;
|
||||
for(i = 0; i < u.length; i++)
|
||||
u[i] = null;
|
||||
for(i = 0; i < v.length; i++)
|
||||
v[i] = 0;
|
||||
for(i = 0; i < x.length; i++)
|
||||
x[i] = 0;
|
||||
|
||||
// Generate counts for each bit length
|
||||
el = n > 256 ? b[256] : this.BMAX; // set length of EOB code, if any
|
||||
p = b; pidx = 0;
|
||||
i = n;
|
||||
do {
|
||||
c[p[pidx]]++; // assume all entries <= BMAX
|
||||
pidx++;
|
||||
} while(--i > 0);
|
||||
if(c[0] == n) { // null input--all zero length codes
|
||||
this.root = null;
|
||||
this.m = 0;
|
||||
this.status = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
// Find minimum and maximum length, bound *m by those
|
||||
for(j = 1; j <= this.BMAX; j++)
|
||||
if(c[j] != 0)
|
||||
break;
|
||||
k = j; // minimum code length
|
||||
if(mm < j)
|
||||
mm = j;
|
||||
for(i = this.BMAX; i != 0; i--)
|
||||
if(c[i] != 0)
|
||||
break;
|
||||
g = i; // maximum code length
|
||||
if(mm > i)
|
||||
mm = i;
|
||||
|
||||
// Adjust last length count to fill out codes, if needed
|
||||
for(y = 1 << j; j < i; j++, y <<= 1)
|
||||
if((y -= c[j]) < 0) {
|
||||
this.status = 2; // bad input: more codes than bits
|
||||
this.m = mm;
|
||||
return;
|
||||
}
|
||||
if((y -= c[i]) < 0) {
|
||||
this.status = 2;
|
||||
this.m = mm;
|
||||
return;
|
||||
}
|
||||
c[i] += y;
|
||||
|
||||
// Generate starting offsets into the value table for each length
|
||||
x[1] = j = 0;
|
||||
p = c;
|
||||
pidx = 1;
|
||||
xp = 2;
|
||||
while(--i > 0) // note that i == g from above
|
||||
x[xp++] = (j += p[pidx++]);
|
||||
|
||||
// Make a table of values in order of bit lengths
|
||||
p = b; pidx = 0;
|
||||
i = 0;
|
||||
do {
|
||||
if((j = p[pidx++]) != 0)
|
||||
v[x[j]++] = i;
|
||||
} while(++i < n);
|
||||
n = x[g]; // set n to length of v
|
||||
|
||||
// Generate the Huffman codes and for each, make the table entries
|
||||
x[0] = i = 0; // first Huffman code is zero
|
||||
p = v; pidx = 0; // grab values in bit order
|
||||
h = -1; // no tables yet--level -1
|
||||
w = lx[0] = 0; // no bits decoded yet
|
||||
q = null; // ditto
|
||||
z = 0; // ditto
|
||||
|
||||
// go through the bit lengths (k already is bits in shortest code)
|
||||
for(; k <= g; k++) {
|
||||
a = c[k];
|
||||
while(a-- > 0) {
|
||||
// here i is the Huffman code of length k bits for value p[pidx]
|
||||
// make tables up to required level
|
||||
while(k > w + lx[1 + h]) {
|
||||
w += lx[1 + h]; // add bits already decoded
|
||||
h++;
|
||||
|
||||
// compute minimum size table less than or equal to *m bits
|
||||
z = (z = g - w) > mm ? mm : z; // upper limit
|
||||
if((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table
|
||||
// too few codes for k-w bit table
|
||||
f -= a + 1; // deduct codes from patterns left
|
||||
xp = k;
|
||||
while(++j < z) { // try smaller tables up to z bits
|
||||
if((f <<= 1) <= c[++xp])
|
||||
break; // enough codes to use up j bits
|
||||
f -= c[xp]; // else deduct codes from patterns
|
||||
}
|
||||
}
|
||||
if(w + j > el && w < el)
|
||||
j = el - w; // make EOB code end at table
|
||||
z = 1 << j; // table entries for j-bit table
|
||||
lx[1 + h] = j; // set table size in stack
|
||||
|
||||
// allocate and link in new table
|
||||
q = new Array(z);
|
||||
for(o = 0; o < z; o++) {
|
||||
q[o] = new zip_HuftNode();
|
||||
}
|
||||
|
||||
if(tail == null)
|
||||
tail = this.root = new zip_HuftList();
|
||||
else
|
||||
tail = tail.next = new zip_HuftList();
|
||||
tail.next = null;
|
||||
tail.list = q;
|
||||
u[h] = q; // table starts after link
|
||||
|
||||
/* connect to last table, if there is one */
|
||||
if(h > 0) {
|
||||
x[h] = i; // save pattern for backing up
|
||||
r.b = lx[h]; // bits to dump before this table
|
||||
r.e = 16 + j; // bits in this table
|
||||
r.t = q; // pointer to this table
|
||||
j = (i & ((1 << w) - 1)) >> (w - lx[h]);
|
||||
u[h-1][j].e = r.e;
|
||||
u[h-1][j].b = r.b;
|
||||
u[h-1][j].n = r.n;
|
||||
u[h-1][j].t = r.t;
|
||||
}
|
||||
}
|
||||
|
||||
// set up table entry in r
|
||||
r.b = k - w;
|
||||
if(pidx >= n)
|
||||
r.e = 99; // out of values--invalid code
|
||||
else if(p[pidx] < s) {
|
||||
r.e = (p[pidx] < 256 ? 16 : 15); // 256 is end-of-block code
|
||||
r.n = p[pidx++]; // simple code is just the value
|
||||
} else {
|
||||
r.e = e[p[pidx] - s]; // non-simple--look up in lists
|
||||
r.n = d[p[pidx++] - s];
|
||||
}
|
||||
|
||||
// fill code-like entries with r //
|
||||
f = 1 << (k - w);
|
||||
for(j = i >> w; j < z; j += f) {
|
||||
q[j].e = r.e;
|
||||
q[j].b = r.b;
|
||||
q[j].n = r.n;
|
||||
q[j].t = r.t;
|
||||
}
|
||||
|
||||
// backwards increment the k-bit code i
|
||||
for(j = 1 << (k - 1); (i & j) != 0; j >>= 1)
|
||||
i ^= j;
|
||||
i ^= j;
|
||||
|
||||
// backup over finished tables
|
||||
while((i & ((1 << w) - 1)) != x[h]) {
|
||||
w -= lx[h]; // don't need to update q
|
||||
h--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* return actual size of base table */
|
||||
this.m = lx[1];
|
||||
|
||||
/* Return true (1) if we were given an incomplete table */
|
||||
this.status = ((y != 0 && g != 1) ? 1 : 0);
|
||||
} /* end of constructor */
|
||||
}
|
||||
|
||||
|
||||
/* routines (inflate) */
|
||||
|
||||
var zip_GET_BYTE = function() {
|
||||
if(zip_inflate_data.length == zip_inflate_pos)
|
||||
return -1;
|
||||
return zip_inflate_data.charCodeAt(zip_inflate_pos++) & 0xff;
|
||||
}
|
||||
|
||||
var zip_NEEDBITS = function(n) {
|
||||
while(zip_bit_len < n) {
|
||||
zip_bit_buf |= zip_GET_BYTE() << zip_bit_len;
|
||||
zip_bit_len += 8;
|
||||
}
|
||||
}
|
||||
|
||||
var zip_GETBITS = function(n) {
|
||||
return zip_bit_buf & zip_MASK_BITS[n];
|
||||
}
|
||||
|
||||
var zip_DUMPBITS = function(n) {
|
||||
zip_bit_buf >>= n;
|
||||
zip_bit_len -= n;
|
||||
}
|
||||
|
||||
var zip_inflate_codes = function(buff, off, size) {
|
||||
/* inflate (decompress) the codes in a deflated (compressed) block.
|
||||
Return an error code or zero if it all goes ok. */
|
||||
var e; // table entry flag/number of extra bits
|
||||
var t; // (zip_HuftNode) pointer to table entry
|
||||
var n;
|
||||
|
||||
if(size == 0)
|
||||
return 0;
|
||||
|
||||
// inflate the coded data
|
||||
n = 0;
|
||||
for(;;) { // do until end of block
|
||||
zip_NEEDBITS(zip_bl);
|
||||
t = zip_tl.list[zip_GETBITS(zip_bl)];
|
||||
e = t.e;
|
||||
while(e > 16) {
|
||||
if(e == 99)
|
||||
return -1;
|
||||
zip_DUMPBITS(t.b);
|
||||
e -= 16;
|
||||
zip_NEEDBITS(e);
|
||||
t = t.t[zip_GETBITS(e)];
|
||||
e = t.e;
|
||||
}
|
||||
zip_DUMPBITS(t.b);
|
||||
|
||||
if(e == 16) { // then it's a literal
|
||||
zip_wp &= zip_WSIZE - 1;
|
||||
buff[off + n++] = zip_slide[zip_wp++] = t.n;
|
||||
if(n == size)
|
||||
return size;
|
||||
continue;
|
||||
}
|
||||
|
||||
// exit if end of block
|
||||
if(e == 15)
|
||||
break;
|
||||
|
||||
// it's an EOB or a length
|
||||
|
||||
// get length of block to copy
|
||||
zip_NEEDBITS(e);
|
||||
zip_copy_leng = t.n + zip_GETBITS(e);
|
||||
zip_DUMPBITS(e);
|
||||
|
||||
// decode distance of block to copy
|
||||
zip_NEEDBITS(zip_bd);
|
||||
t = zip_td.list[zip_GETBITS(zip_bd)];
|
||||
e = t.e;
|
||||
|
||||
while(e > 16) {
|
||||
if(e == 99)
|
||||
return -1;
|
||||
zip_DUMPBITS(t.b);
|
||||
e -= 16;
|
||||
zip_NEEDBITS(e);
|
||||
t = t.t[zip_GETBITS(e)];
|
||||
e = t.e;
|
||||
}
|
||||
zip_DUMPBITS(t.b);
|
||||
zip_NEEDBITS(e);
|
||||
zip_copy_dist = zip_wp - t.n - zip_GETBITS(e);
|
||||
zip_DUMPBITS(e);
|
||||
|
||||
// do the copy
|
||||
while(zip_copy_leng > 0 && n < size) {
|
||||
zip_copy_leng--;
|
||||
zip_copy_dist &= zip_WSIZE - 1;
|
||||
zip_wp &= zip_WSIZE - 1;
|
||||
buff[off + n++] = zip_slide[zip_wp++]
|
||||
= zip_slide[zip_copy_dist++];
|
||||
}
|
||||
|
||||
if(n == size)
|
||||
return size;
|
||||
}
|
||||
|
||||
zip_method = -1; // done
|
||||
return n;
|
||||
}
|
||||
|
||||
var zip_inflate_stored = function(buff, off, size) {
|
||||
/* "decompress" an inflated type 0 (stored) block. */
|
||||
var n;
|
||||
|
||||
// go to byte boundary
|
||||
n = zip_bit_len & 7;
|
||||
zip_DUMPBITS(n);
|
||||
|
||||
// get the length and its complement
|
||||
zip_NEEDBITS(16);
|
||||
n = zip_GETBITS(16);
|
||||
zip_DUMPBITS(16);
|
||||
zip_NEEDBITS(16);
|
||||
if(n != ((~zip_bit_buf) & 0xffff))
|
||||
return -1; // error in compressed data
|
||||
zip_DUMPBITS(16);
|
||||
|
||||
// read and output the compressed data
|
||||
zip_copy_leng = n;
|
||||
|
||||
n = 0;
|
||||
while(zip_copy_leng > 0 && n < size) {
|
||||
zip_copy_leng--;
|
||||
zip_wp &= zip_WSIZE - 1;
|
||||
zip_NEEDBITS(8);
|
||||
buff[off + n++] = zip_slide[zip_wp++] =
|
||||
zip_GETBITS(8);
|
||||
zip_DUMPBITS(8);
|
||||
}
|
||||
|
||||
if(zip_copy_leng == 0)
|
||||
zip_method = -1; // done
|
||||
return n;
|
||||
}
|
||||
|
||||
var zip_inflate_fixed = function(buff, off, size) {
|
||||
/* decompress an inflated type 1 (fixed Huffman codes) block. We should
|
||||
either replace this with a custom decoder, or at least precompute the
|
||||
Huffman tables. */
|
||||
|
||||
// if first time, set up tables for fixed blocks
|
||||
if(zip_fixed_tl == null) {
|
||||
var i; // temporary variable
|
||||
var l = new Array(288); // length list for huft_build
|
||||
var h; // zip_HuftBuild
|
||||
|
||||
// literal table
|
||||
for(i = 0; i < 144; i++)
|
||||
l[i] = 8;
|
||||
for(; i < 256; i++)
|
||||
l[i] = 9;
|
||||
for(; i < 280; i++)
|
||||
l[i] = 7;
|
||||
for(; i < 288; i++) // make a complete, but wrong code set
|
||||
l[i] = 8;
|
||||
zip_fixed_bl = 7;
|
||||
|
||||
h = new zip_HuftBuild(l, 288, 257, zip_cplens, zip_cplext,
|
||||
zip_fixed_bl);
|
||||
if(h.status != 0) {
|
||||
alert("HufBuild error: "+h.status);
|
||||
return -1;
|
||||
}
|
||||
zip_fixed_tl = h.root;
|
||||
zip_fixed_bl = h.m;
|
||||
|
||||
// distance table
|
||||
for(i = 0; i < 30; i++) // make an incomplete code set
|
||||
l[i] = 5;
|
||||
zip_fixed_bd = 5;
|
||||
|
||||
h = new zip_HuftBuild(l, 30, 0, zip_cpdist, zip_cpdext, zip_fixed_bd);
|
||||
if(h.status > 1) {
|
||||
zip_fixed_tl = null;
|
||||
alert("HufBuild error: "+h.status);
|
||||
return -1;
|
||||
}
|
||||
zip_fixed_td = h.root;
|
||||
zip_fixed_bd = h.m;
|
||||
}
|
||||
|
||||
zip_tl = zip_fixed_tl;
|
||||
zip_td = zip_fixed_td;
|
||||
zip_bl = zip_fixed_bl;
|
||||
zip_bd = zip_fixed_bd;
|
||||
return zip_inflate_codes(buff, off, size);
|
||||
}
|
||||
|
||||
var zip_inflate_dynamic = function(buff, off, size) {
|
||||
// decompress an inflated type 2 (dynamic Huffman codes) block.
|
||||
var i; // temporary variables
|
||||
var j;
|
||||
var l; // last length
|
||||
var n; // number of lengths to get
|
||||
var t; // (zip_HuftNode) literal/length code table
|
||||
var nb; // number of bit length codes
|
||||
var nl; // number of literal/length codes
|
||||
var nd; // number of distance codes
|
||||
var ll = new Array(286+30); // literal/length and distance code lengths
|
||||
var h; // (zip_HuftBuild)
|
||||
|
||||
for(i = 0; i < ll.length; i++)
|
||||
ll[i] = 0;
|
||||
|
||||
// read in table lengths
|
||||
zip_NEEDBITS(5);
|
||||
nl = 257 + zip_GETBITS(5); // number of literal/length codes
|
||||
zip_DUMPBITS(5);
|
||||
zip_NEEDBITS(5);
|
||||
nd = 1 + zip_GETBITS(5); // number of distance codes
|
||||
zip_DUMPBITS(5);
|
||||
zip_NEEDBITS(4);
|
||||
nb = 4 + zip_GETBITS(4); // number of bit length codes
|
||||
zip_DUMPBITS(4);
|
||||
if(nl > 286 || nd > 30)
|
||||
return -1; // bad lengths
|
||||
|
||||
// read in bit-length-code lengths
|
||||
for(j = 0; j < nb; j++)
|
||||
{
|
||||
zip_NEEDBITS(3);
|
||||
ll[zip_border[j]] = zip_GETBITS(3);
|
||||
zip_DUMPBITS(3);
|
||||
}
|
||||
for(; j < 19; j++)
|
||||
ll[zip_border[j]] = 0;
|
||||
|
||||
// build decoding table for trees--single level, 7 bit lookup
|
||||
zip_bl = 7;
|
||||
h = new zip_HuftBuild(ll, 19, 19, null, null, zip_bl);
|
||||
if(h.status != 0)
|
||||
return -1; // incomplete code set
|
||||
|
||||
zip_tl = h.root;
|
||||
zip_bl = h.m;
|
||||
|
||||
// read in literal and distance code lengths
|
||||
n = nl + nd;
|
||||
i = l = 0;
|
||||
while(i < n) {
|
||||
zip_NEEDBITS(zip_bl);
|
||||
t = zip_tl.list[zip_GETBITS(zip_bl)];
|
||||
j = t.b;
|
||||
zip_DUMPBITS(j);
|
||||
j = t.n;
|
||||
if(j < 16) // length of code in bits (0..15)
|
||||
ll[i++] = l = j; // save last length in l
|
||||
else if(j == 16) { // repeat last length 3 to 6 times
|
||||
zip_NEEDBITS(2);
|
||||
j = 3 + zip_GETBITS(2);
|
||||
zip_DUMPBITS(2);
|
||||
if(i + j > n)
|
||||
return -1;
|
||||
while(j-- > 0)
|
||||
ll[i++] = l;
|
||||
} else if(j == 17) { // 3 to 10 zero length codes
|
||||
zip_NEEDBITS(3);
|
||||
j = 3 + zip_GETBITS(3);
|
||||
zip_DUMPBITS(3);
|
||||
if(i + j > n)
|
||||
return -1;
|
||||
while(j-- > 0)
|
||||
ll[i++] = 0;
|
||||
l = 0;
|
||||
} else { // j == 18: 11 to 138 zero length codes
|
||||
zip_NEEDBITS(7);
|
||||
j = 11 + zip_GETBITS(7);
|
||||
zip_DUMPBITS(7);
|
||||
if(i + j > n)
|
||||
return -1;
|
||||
while(j-- > 0)
|
||||
ll[i++] = 0;
|
||||
l = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// build the decoding tables for literal/length and distance codes
|
||||
zip_bl = zip_lbits;
|
||||
h = new zip_HuftBuild(ll, nl, 257, zip_cplens, zip_cplext, zip_bl);
|
||||
if(zip_bl == 0) // no literals or lengths
|
||||
h.status = 1;
|
||||
if(h.status != 0) {
|
||||
if(h.status == 1)
|
||||
;// **incomplete literal tree**
|
||||
return -1; // incomplete code set
|
||||
}
|
||||
zip_tl = h.root;
|
||||
zip_bl = h.m;
|
||||
|
||||
for(i = 0; i < nd; i++)
|
||||
ll[i] = ll[i + nl];
|
||||
zip_bd = zip_dbits;
|
||||
h = new zip_HuftBuild(ll, nd, 0, zip_cpdist, zip_cpdext, zip_bd);
|
||||
zip_td = h.root;
|
||||
zip_bd = h.m;
|
||||
|
||||
if(zip_bd == 0 && nl > 257) { // lengths but no distances
|
||||
// **incomplete distance tree**
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(h.status == 1) {
|
||||
;// **incomplete distance tree**
|
||||
}
|
||||
if(h.status != 0)
|
||||
return -1;
|
||||
|
||||
// decompress until an end-of-block code
|
||||
return zip_inflate_codes(buff, off, size);
|
||||
}
|
||||
|
||||
var zip_inflate_start = function() {
|
||||
var i;
|
||||
|
||||
if(zip_slide == null)
|
||||
zip_slide = new Array(2 * zip_WSIZE);
|
||||
zip_wp = 0;
|
||||
zip_bit_buf = 0;
|
||||
zip_bit_len = 0;
|
||||
zip_method = -1;
|
||||
zip_eof = false;
|
||||
zip_copy_leng = zip_copy_dist = 0;
|
||||
zip_tl = null;
|
||||
}
|
||||
|
||||
var zip_inflate_internal = function(buff, off, size) {
|
||||
// decompress an inflated entry
|
||||
var n, i;
|
||||
|
||||
n = 0;
|
||||
while(n < size) {
|
||||
if(zip_eof && zip_method == -1)
|
||||
return n;
|
||||
|
||||
if(zip_copy_leng > 0) {
|
||||
if(zip_method != zip_STORED_BLOCK) {
|
||||
// STATIC_TREES or DYN_TREES
|
||||
while(zip_copy_leng > 0 && n < size) {
|
||||
zip_copy_leng--;
|
||||
zip_copy_dist &= zip_WSIZE - 1;
|
||||
zip_wp &= zip_WSIZE - 1;
|
||||
buff[off + n++] = zip_slide[zip_wp++] =
|
||||
zip_slide[zip_copy_dist++];
|
||||
}
|
||||
} else {
|
||||
while(zip_copy_leng > 0 && n < size) {
|
||||
zip_copy_leng--;
|
||||
zip_wp &= zip_WSIZE - 1;
|
||||
zip_NEEDBITS(8);
|
||||
buff[off + n++] = zip_slide[zip_wp++] = zip_GETBITS(8);
|
||||
zip_DUMPBITS(8);
|
||||
}
|
||||
if(zip_copy_leng == 0)
|
||||
zip_method = -1; // done
|
||||
}
|
||||
if(n == size)
|
||||
return n;
|
||||
}
|
||||
|
||||
if(zip_method == -1) {
|
||||
if(zip_eof)
|
||||
break;
|
||||
|
||||
// read in last block bit
|
||||
zip_NEEDBITS(1);
|
||||
if(zip_GETBITS(1) != 0)
|
||||
zip_eof = true;
|
||||
zip_DUMPBITS(1);
|
||||
|
||||
// read in block type
|
||||
zip_NEEDBITS(2);
|
||||
zip_method = zip_GETBITS(2);
|
||||
zip_DUMPBITS(2);
|
||||
zip_tl = null;
|
||||
zip_copy_leng = 0;
|
||||
}
|
||||
|
||||
switch(zip_method) {
|
||||
case 0: // zip_STORED_BLOCK
|
||||
i = zip_inflate_stored(buff, off + n, size - n);
|
||||
break;
|
||||
|
||||
case 1: // zip_STATIC_TREES
|
||||
if(zip_tl != null)
|
||||
i = zip_inflate_codes(buff, off + n, size - n);
|
||||
else
|
||||
i = zip_inflate_fixed(buff, off + n, size - n);
|
||||
break;
|
||||
|
||||
case 2: // zip_DYN_TREES
|
||||
if(zip_tl != null)
|
||||
i = zip_inflate_codes(buff, off + n, size - n);
|
||||
else
|
||||
i = zip_inflate_dynamic(buff, off + n, size - n);
|
||||
break;
|
||||
|
||||
default: // error
|
||||
i = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
if(i == -1) {
|
||||
if(zip_eof)
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
n += i;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
var zip_inflate = function(str) {
|
||||
var i, j;
|
||||
|
||||
zip_inflate_start();
|
||||
zip_inflate_data = str;
|
||||
zip_inflate_pos = 0;
|
||||
|
||||
var buff = new Array(1024);
|
||||
var aout = [];
|
||||
while((i = zip_inflate_internal(buff, 0, buff.length)) > 0) {
|
||||
var cbuf = new Array(i);
|
||||
for(j = 0; j < i; j++){
|
||||
cbuf[j] = String.fromCharCode(buff[j]);
|
||||
}
|
||||
aout[aout.length] = cbuf.join("");
|
||||
}
|
||||
zip_inflate_data = null; // G.C.
|
||||
return aout.join("");
|
||||
}
|
||||
|
||||
if (! ctx.RawDeflate) ctx.RawDeflate = {};
|
||||
ctx.RawDeflate.inflate = zip_inflate;
|
||||
|
||||
})(this);
|
||||
150
libs/privatebin/zlib-1.2.11.js
Normal file
150
libs/privatebin/zlib-1.2.11.js
Normal file
@@ -0,0 +1,150 @@
|
||||
'use strict';
|
||||
|
||||
(function() {
|
||||
let ret;
|
||||
|
||||
async function initialize() {
|
||||
if (ret) return ret;
|
||||
|
||||
const COMPRESSION_LEVEL = 7;
|
||||
const NO_ZLIB_HEADER = -1;
|
||||
const CHUNK_SIZE = 32 * 1024;
|
||||
const map = {};
|
||||
const memory = new WebAssembly.Memory({
|
||||
initial: 1,
|
||||
maximum: 1024, // 64MB
|
||||
});
|
||||
const env = {
|
||||
memory,
|
||||
writeToJs(ptr, size) {
|
||||
const o = map[ptr];
|
||||
o.onData(new Uint8Array(memory.buffer, dstPtr, size));
|
||||
},
|
||||
_abort: errno => { console.error(`Error: ${errno}`) },
|
||||
_grow: () => { },
|
||||
};
|
||||
|
||||
let buff;
|
||||
if (typeof fetch === 'undefined') {
|
||||
buff = fs.readFileSync('zlib-1.2.11.wasm');
|
||||
} else {
|
||||
const resp = await fetch(`${window.IS_RAW ? 'dist/' : ''}libs/privatebin/zlib-1.2.11.wasm`);
|
||||
buff = await resp.arrayBuffer();
|
||||
}
|
||||
const module = await WebAssembly.compile(buff);
|
||||
const ins = await WebAssembly.instantiate(module, { env });
|
||||
|
||||
const srcPtr = ins.exports._malloc(CHUNK_SIZE);
|
||||
const dstPtr = ins.exports._malloc(CHUNK_SIZE);
|
||||
|
||||
class RawDef {
|
||||
constructor() {
|
||||
this.zstreamPtr = ins.exports._createDeflateContext(COMPRESSION_LEVEL, NO_ZLIB_HEADER);
|
||||
map[this.zstreamPtr] = this;
|
||||
this.offset = 0;
|
||||
this.buff = new Uint8Array(CHUNK_SIZE);
|
||||
}
|
||||
|
||||
deflate(chunk, flush) {
|
||||
const src = new Uint8Array(memory.buffer, srcPtr, chunk.length);
|
||||
src.set(chunk);
|
||||
ins.exports._deflate(this.zstreamPtr, srcPtr, dstPtr, chunk.length, CHUNK_SIZE, flush);
|
||||
}
|
||||
|
||||
onData(chunk) {
|
||||
if (this.buff.length < this.offset + chunk.length) {
|
||||
const buff = this.buff;
|
||||
this.buff = new Uint8Array(this.buff.length * 2);
|
||||
this.buff.set(buff);
|
||||
}
|
||||
this.buff.set(chunk, this.offset);
|
||||
this.offset += chunk.length;
|
||||
}
|
||||
|
||||
destroy() {
|
||||
ins.exports._freeDeflateContext(this.zstreamPtr);
|
||||
delete map[this.zstreamPtr];
|
||||
this.buff = null;
|
||||
}
|
||||
|
||||
getBuffer() {
|
||||
const res = new Uint8Array(this.offset);
|
||||
for (let i = 0; i < this.offset; ++i) {
|
||||
res[i] = this.buff[i];
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
class RawInf {
|
||||
constructor() {
|
||||
this.zstreamPtr = ins.exports._createInflateContext(NO_ZLIB_HEADER);
|
||||
map[this.zstreamPtr] = this;
|
||||
this.offset = 0;
|
||||
this.buff = new Uint8Array(CHUNK_SIZE);
|
||||
}
|
||||
|
||||
inflate(chunk) {
|
||||
const src = new Uint8Array(memory.buffer, srcPtr, chunk.length);
|
||||
src.set(chunk);
|
||||
ins.exports._inflate(this.zstreamPtr, srcPtr, dstPtr, chunk.length, CHUNK_SIZE);
|
||||
}
|
||||
|
||||
onData(chunk) {
|
||||
if (this.buff.length < this.offset + chunk.length) {
|
||||
const buff = this.buff;
|
||||
this.buff = new Uint8Array(this.buff.length * 2);
|
||||
this.buff.set(buff);
|
||||
}
|
||||
this.buff.set(chunk, this.offset);
|
||||
this.offset += chunk.length;
|
||||
}
|
||||
|
||||
destroy() {
|
||||
ins.exports._freeInflateContext(this.zstreamPtr);
|
||||
delete map[this.zstreamPtr];
|
||||
this.buff = null;
|
||||
}
|
||||
|
||||
getBuffer() {
|
||||
const res = new Uint8Array(this.offset);
|
||||
for (let i = 0; i < this.offset; ++i) {
|
||||
res[i] = this.buff[i];
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
ret = {
|
||||
inflate(rawDeflateBuffer) {
|
||||
const rawInf = new RawInf();
|
||||
for (let offset = 0; offset < rawDeflateBuffer.length; offset += CHUNK_SIZE) {
|
||||
const end = Math.min(offset + CHUNK_SIZE, rawDeflateBuffer.length);
|
||||
const chunk = rawDeflateBuffer.subarray(offset, end);
|
||||
rawInf.inflate(chunk);
|
||||
}
|
||||
const ret = rawInf.getBuffer();
|
||||
rawInf.destroy();
|
||||
return ret;
|
||||
},
|
||||
deflate(rawInflateBuffer) {
|
||||
const rawDef = new RawDef();
|
||||
for (let offset = 0; offset < rawInflateBuffer.length; offset += CHUNK_SIZE) {
|
||||
const end = Math.min(offset + CHUNK_SIZE, rawInflateBuffer.length);
|
||||
const chunk = rawInflateBuffer.subarray(offset, end);
|
||||
rawDef.deflate(chunk, rawInflateBuffer.length <= offset + CHUNK_SIZE);
|
||||
}
|
||||
const ret = rawDef.getBuffer();
|
||||
rawDef.destroy();
|
||||
return ret;
|
||||
},
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
this.zlib = initialize();
|
||||
}).call(this);
|
||||
|
||||
let z = zlib.then(function(value) {
|
||||
z = value;
|
||||
});
|
||||
112
libs/shepherd-8.0.1.min.js
vendored
Normal file
112
libs/shepherd-8.0.1.min.js
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
/*! shepherd.js 8.0.1 */
|
||||
|
||||
'use strict';(function(E,Y){"object"===typeof exports&&"undefined"!==typeof module?module.exports=Y():"function"===typeof define&&define.amd?define(Y):(E=E||self,E.Shepherd=Y())})(this,function(){function E(a,b){return!1!==b.clone&&b.isMergeableObject(a)?R(Array.isArray(a)?[]:{},a,b):a}function Y(a,b,c){return a.concat(b).map(function(a){return E(a,c)})}function ob(a){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(a).filter(function(b){return a.propertyIsEnumerable(b)}):[]}function Ca(a){return Object.keys(a).concat(ob(a))}
|
||||
function Da(a,b){try{return b in a}catch(c){return!1}}function pb(a,b,c){var d={};c.isMergeableObject(a)&&Ca(a).forEach(function(b){d[b]=E(a[b],c)});Ca(b).forEach(function(e){if(!Da(a,e)||Object.hasOwnProperty.call(a,e)&&Object.propertyIsEnumerable.call(a,e))if(Da(a,e)&&c.isMergeableObject(b[e])){if(c.customMerge){var f=c.customMerge(e);f="function"===typeof f?f:R}else f=R;d[e]=f(a[e],b[e],c)}else d[e]=E(b[e],c)});return d}function R(a,b,c){c=c||{};c.arrayMerge=c.arrayMerge||Y;c.isMergeableObject=
|
||||
c.isMergeableObject||qb;c.cloneUnlessOtherwiseSpecified=E;var d=Array.isArray(b),e=Array.isArray(a);return d!==e?E(b,c):d?c.arrayMerge(a,b,c):pb(a,b,c)}function S(a){return"function"===typeof a}function Z(a){return"string"===typeof a}function Ea(a){let b=Object.getOwnPropertyNames(a.constructor.prototype);for(let c=0;c<b.length;c++){let d=b[c],e=a[d];"constructor"!==d&&"function"===typeof e&&(a[d]=e.bind(a))}return a}function rb(a,b){return c=>{if(b.isOpen()){let d=b.el&&c.currentTarget===b.el;(void 0!==
|
||||
a&&c.currentTarget.matches(a)||d)&&b.tour.next()}}}function sb(a){let {event:b,selector:c}=a.options.advanceOn||{};if(b){let d=rb(c,a),e;try{e=document.querySelector(c)}catch(f){}if(void 0===c||e)e?(e.addEventListener(b,d),a.on("destroy",()=>e.removeEventListener(b,d))):(document.body.addEventListener(b,d,!0),a.on("destroy",()=>document.body.removeEventListener(b,d,!0)));else return console.error(`No element was found for the selector supplied to advanceOn: ${c}`)}else return console.error("advanceOn was defined, but no event name was passed.")}
|
||||
function aa(a){a=a.getBoundingClientRect();return{width:a.width,height:a.height,top:a.top,right:a.right,bottom:a.bottom,left:a.left,x:a.left,y:a.top}}function x(a){return"[object Window]"!==a.toString()?(a=a.ownerDocument)?a.defaultView:window:a}function pa(a){a=x(a);return{scrollLeft:a.pageXOffset,scrollTop:a.pageYOffset}}function ba(a){var b=x(a).Element;return a instanceof b||a instanceof Element}function C(a){var b=x(a).HTMLElement;return a instanceof b||a instanceof HTMLElement}function F(a){return a?
|
||||
(a.nodeName||"").toLowerCase():null}function J(a){return(ba(a)?a.ownerDocument:a.document).documentElement}function Fa(a){return aa(J(a)).left+pa(a).scrollLeft}function ca(a){return x(a).getComputedStyle(a)}function qa(a){a=ca(a);return/auto|scroll|overlay|hidden/.test(a.overflow+a.overflowY+a.overflowX)}function Ga(a,b,c){void 0===c&&(c=!1);var d=J(b);a=aa(a);var e={scrollLeft:0,scrollTop:0},f={x:0,y:0};if(!c){if("body"!==F(b)||qa(d))e=b!==x(b)&&C(b)?{scrollLeft:b.scrollLeft,scrollTop:b.scrollTop}:
|
||||
pa(b);C(b)?(f=aa(b),f.x+=b.clientLeft,f.y+=b.clientTop):d&&(f.x=Fa(d))}return{x:a.left+e.scrollLeft-f.x,y:a.top+e.scrollTop-f.y,width:a.width,height:a.height}}function ra(a){return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}}function Ha(a){return"html"===F(a)?a:a.assignedSlot||a.parentNode||a.host||J(a)}function Ia(a){return 0<=["html","body","#document"].indexOf(F(a))?a.ownerDocument.body:C(a)&&qa(a)?a:Ia(Ha(a))}function da(a,b){void 0===b&&(b=[]);var c=Ia(a);a="body"===
|
||||
F(c);var d=x(c);c=a?[d].concat(d.visualViewport||[],qa(c)?c:[]):c;b=b.concat(c);return a?b:b.concat(da(Ha(c)))}function Ja(a){return C(a)&&"fixed"!==ca(a).position?a.offsetParent:null}function ea(a){var b=x(a);for(a=Ja(a);a&&0<=["table","td","th"].indexOf(F(a));)a=Ja(a);return a&&"body"===F(a)&&"static"===ca(a).position?b:a||b}function tb(a){function b(a){d.add(a.name);[].concat(a.requires||[],a.requiresIfExists||[]).forEach(function(a){d.has(a)||(a=c.get(a))&&b(a)});e.push(a)}var c=new Map,d=new Set,
|
||||
e=[];a.forEach(function(a){c.set(a.name,a)});a.forEach(function(a){d.has(a.name)||b(a)});return e}function ub(a){var b=tb(a);return vb.reduce(function(a,d){return a.concat(b.filter(function(a){return a.phase===d}))},[])}function wb(a){var b;return function(){b||(b=new Promise(function(c){Promise.resolve().then(function(){b=void 0;c(a())})}));return b}}function D(a){return a.split("-")[0]}function xb(a){var b=a.reduce(function(a,b){var c=a[b.name];a[b.name]=c?Object.assign({},c,{},b,{options:Object.assign({},
|
||||
c.options,{},b.options),data:Object.assign({},c.data,{},b.data)}):b;return a},{});return Object.keys(b).map(function(a){return b[a]})}function Ka(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return!b.some(function(a){return!(a&&"function"===typeof a.getBoundingClientRect)})}function sa(a){return 0<=["top","bottom"].indexOf(a)?"x":"y"}function La(a){var b=a.reference,c=a.element,d=(a=a.placement)?D(a):null;a=a?a.split("-")[1]:null;var e=b.x+b.width/2-c.width/2,f=b.y+b.height/
|
||||
2-c.height/2;switch(d){case "top":e={x:e,y:b.y-c.height};break;case "bottom":e={x:e,y:b.y+b.height};break;case "right":e={x:b.x+b.width,y:f};break;case "left":e={x:b.x-c.width,y:f};break;default:e={x:b.x,y:b.y}}d=d?sa(d):null;if(null!=d)switch(f="y"===d?"height":"width",a){case "start":e[d]=Math.floor(e[d])-Math.floor(b[f]/2-c[f]/2);break;case "end":e[d]=Math.floor(e[d])+Math.ceil(b[f]/2-c[f]/2)}return e}function Ma(a){var b,c=a.popper,d=a.popperRect,e=a.placement,f=a.offsets,h=a.position,k=a.gpuAcceleration,
|
||||
m=a.adaptive,g=window.devicePixelRatio||1;a=Math.round(f.x*g)/g||0;g=Math.round(f.y*g)/g||0;var l=f.hasOwnProperty("x");f=f.hasOwnProperty("y");var q="left",t="top",p=window;if(m){var B=ea(c);B===x(c)&&(B=J(c));"top"===e&&(t="bottom",g-=B.clientHeight-d.height,g*=k?1:-1);"left"===e&&(q="right",a-=B.clientWidth-d.width,a*=k?1:-1)}c=Object.assign({position:h},m&&yb);if(k){var r;return Object.assign({},c,(r={},r[t]=f?"0":"",r[q]=l?"0":"",r.transform=2>(p.devicePixelRatio||1)?"translate("+a+"px, "+g+
|
||||
"px)":"translate3d("+a+"px, "+g+"px, 0)",r))}return Object.assign({},c,(b={},b[t]=f?g+"px":"",b[q]=l?a+"px":"",b.transform="",b))}function ja(a){return a.replace(/left|right|bottom|top/g,function(a){return zb[a]})}function Na(a){return a.replace(/start|end/g,function(a){return Ab[a]})}function Oa(a,b){var c=!(!b.getRootNode||!b.getRootNode().host);if(a.contains(b))return!0;if(c){do{if(b&&a.isSameNode(b))return!0;b=b.parentNode||b.host}while(b)}return!1}function ta(a){return Object.assign({},a,{left:a.x,
|
||||
top:a.y,right:a.x+a.width,bottom:a.y+a.height})}function Pa(a,b){if("viewport"===b){var c=x(a);a=c.visualViewport;b=c.innerWidth;c=c.innerHeight;a&&/iPhone|iPod|iPad/.test(navigator.platform)&&(b=a.width,c=a.height);a=ta({width:b,height:c,x:0,y:0})}else C(b)?a=aa(b):(c=J(a),a=x(c),b=pa(c),c=Ga(J(c),a),c.height=Math.max(c.height,a.innerHeight),c.width=Math.max(c.width,a.innerWidth),c.x=-b.scrollLeft,c.y=-b.scrollTop,a=ta(c));return a}function Bb(a){var b=da(a),c=0<=["absolute","fixed"].indexOf(ca(a).position)&&
|
||||
C(a)?ea(a):a;return ba(c)?b.filter(function(a){return ba(a)&&Oa(a,c)}):[]}function Cb(a,b,c){b="clippingParents"===b?Bb(a):[].concat(b);c=[].concat(b,[c]);c=c.reduce(function(b,c){var d=Pa(a,c);c=C(c)?c:J(a);var e=x(c);var k=C(c)?ca(c):{};parseFloat(k.borderTopWidth);var m=parseFloat(k.borderRightWidth)||0;var g=parseFloat(k.borderBottomWidth)||0;var l=parseFloat(k.borderLeftWidth)||0;k="html"===F(c);var q=Fa(c),t=c.clientWidth+m,p=c.clientHeight+g;k&&50<e.innerHeight-c.clientHeight&&(p=e.innerHeight-
|
||||
g);g=k?0:c.clientTop;m=c.clientLeft>l?m:k?e.innerWidth-t-q:c.offsetWidth-t;e=k?e.innerHeight-p:c.offsetHeight-p;c=k?q:c.clientLeft;b.top=Math.max(d.top+g,b.top);b.right=Math.min(d.right-m,b.right);b.bottom=Math.min(d.bottom-e,b.bottom);b.left=Math.max(d.left+c,b.left);return b},Pa(a,c[0]));c.width=c.right-c.left;c.height=c.bottom-c.top;c.x=c.left;c.y=c.top;return c}function Qa(a){return Object.assign({},{top:0,right:0,bottom:0,left:0},{},a)}function Ra(a,b){return b.reduce(function(b,d){b[d]=a;return b},
|
||||
{})}function fa(a,b){void 0===b&&(b={});var c=b;b=c.placement;b=void 0===b?a.placement:b;var d=c.boundary,e=void 0===d?"clippingParents":d;d=c.rootBoundary;var f=void 0===d?"viewport":d;d=c.elementContext;d=void 0===d?"popper":d;var h=c.altBoundary,k=void 0===h?!1:h;c=c.padding;c=void 0===c?0:c;c=Qa("number"!==typeof c?c:Ra(c,ha));var m=a.elements.reference;h=a.rects.popper;k=a.elements[k?"popper"===d?"reference":"popper":d];e=Cb(ba(k)?k:k.contextElement||J(a.elements.popper),e,f);f=aa(m);k=La({reference:f,
|
||||
element:h,strategy:"absolute",placement:b});h=ta(Object.assign({},h,{},k));f="popper"===d?h:f;var g={top:e.top-f.top+c.top,bottom:f.bottom-e.bottom+c.bottom,left:e.left-f.left+c.left,right:f.right-e.right+c.right};a=a.modifiersData.offset;if("popper"===d&&a){var l=a[b];Object.keys(g).forEach(function(a){var b=0<=["right","bottom"].indexOf(a)?1:-1,c=0<=["top","bottom"].indexOf(a)?"y":"x";g[a]+=l[c]*b})}return g}function Db(a,b){void 0===b&&(b={});var c=b.boundary,d=b.rootBoundary,e=b.padding,f=b.flipVariations,
|
||||
h=b.allowedAutoPlacements,k=void 0===h?Sa:h,m=b.placement.split("-")[1],g=(m?f?Ta:Ta.filter(function(a){return a.split("-")[1]===m}):ha).filter(function(a){return 0<=k.indexOf(a)}).reduce(function(b,f){b[f]=fa(a,{placement:f,boundary:c,rootBoundary:d,padding:e})[D(f)];return b},{});return Object.keys(g).sort(function(a,b){return g[a]-g[b]})}function Eb(a){if("auto"===D(a))return[];var b=ja(a);return[Na(a),b,Na(b)]}function Ua(a,b,c){void 0===c&&(c={x:0,y:0});return{top:a.top-b.height-c.y,right:a.right-
|
||||
b.width+c.x,bottom:a.bottom-b.height+c.y,left:a.left-b.width-c.x}}function Va(a){return["top","right","bottom","left"].some(function(b){return 0<=a[b]})}function Fb(){return[{name:"applyStyles",fn({state:a}){Object.keys(a.elements).forEach(b=>{if("popper"===b){var c=a.attributes[b]||{},d=a.elements[b];Object.assign(d.style,{position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)"});Object.keys(c).forEach(a=>{let b=c[a];!1===b?d.removeAttribute(a):d.setAttribute(a,!0===b?"":b)})}})}},
|
||||
{name:"computeStyles",options:{adaptive:!1}}]}function Gb(a){let b=Fb(),c={placement:"top",strategy:"fixed",modifiers:[{name:"focusAfterRender",enabled:!0,phase:"afterWrite",fn(){setTimeout(()=>{a.el&&a.el.focus()},300)}}]};return c={...c,modifiers:Array.from(new Set([...c.modifiers,...b]))}}function Wa(a){return Z(a)&&""!==a?"-"!==a.charAt(a.length-1)?`${a}-`:a:""}function ua(a){a=a.options.attachTo||{};let b=Object.assign({},a);if(Z(a.element)){try{b.element=document.querySelector(a.element)}catch(c){}b.element||
|
||||
console.error(`The element for this Shepherd step was not found ${a.element}`)}return b}function va(){let a=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,b=>{let c=(a+16*Math.random())%16|0;a=Math.floor(a/16);return("x"==b?c:c&3|8).toString(16)})}function Hb(a,b){let c={modifiers:[{name:"preventOverflow",options:{altAxis:!0}},{name:"focusAfterRender",enabled:!0,phase:"afterWrite",fn(){setTimeout(()=>{b.el&&b.el.focus()},300)}}],strategy:"absolute"};b.isCentered()?c=Gb(b):
|
||||
c.placement=a.on;(a=b.tour&&b.tour.options&&b.tour.options.defaultStepOptions)&&(c=Xa(a,c));return c=Xa(b.options,c)}function Xa(a,b){if(a.popperOptions){let c=Object.assign({},b,a.popperOptions);if(a.popperOptions.modifiers&&0<a.popperOptions.modifiers.length){let d=a.popperOptions.modifiers.map(a=>a.name);b=b.modifiers.filter(a=>!d.includes(a.name));c.modifiers=Array.from(new Set([...b,...a.popperOptions.modifiers]))}return c}return b}function y(){}function Ib(a,b){for(let c in b)a[c]=b[c];return a}
|
||||
function T(a){return a()}function Ya(a){return"function"===typeof a}function G(a,b){return a!=a?b==b:a!==b||a&&"object"===typeof a||"function"===typeof a}function z(a){a.parentNode.removeChild(a)}function Za(a){return document.createElementNS("http://www.w3.org/2000/svg",a)}function ka(a,b,c,d){a.addEventListener(b,c,d);return()=>a.removeEventListener(b,c,d)}function u(a,b,c){null==c?a.removeAttribute(b):a.getAttribute(b)!==c&&a.setAttribute(b,c)}function $a(a,b){let c=Object.getOwnPropertyDescriptors(a.__proto__);
|
||||
for(let d in b)null==b[d]?a.removeAttribute(d):"style"===d?a.style.cssText=b[d]:"__value"===d?a.value=a[d]=b[d]:c[d]&&c[d].set?a[d]=b[d]:u(a,d,b[d])}function U(a,b,c){a.classList[c?"add":"remove"](b)}function la(){if(!V)throw Error("Function called outside component initialization");return V}function wa(a){ma.push(a)}function ab(){if(!xa){xa=!0;do{for(var a=0;a<ia.length;a+=1){var b=ia[a];V=b;b=b.$$;if(null!==b.fragment){b.update();b.before_update.forEach(T);let a=b.dirty;b.dirty=[-1];b.fragment&&
|
||||
b.fragment.p(b.ctx,a);b.after_update.forEach(wa)}}for(ia.length=0;W.length;)W.pop()();for(a=0;a<ma.length;a+=1)b=ma[a],ya.has(b)||(ya.add(b),b());ma.length=0}while(ia.length);for(;bb.length;)bb.pop()();xa=za=!1;ya.clear()}}function M(){N={r:0,c:[],p:N}}function O(){N.r||N.c.forEach(T);N=N.p}function n(a,b){a&&a.i&&(na.delete(a),a.i(b))}function v(a,b,c,d){a&&a.o&&!na.has(a)&&(na.add(a),N.c.push(()=>{na.delete(a);d&&(c&&a.d(1),d())}),a.o(b))}function P(a){a&&a.c()}function K(a,b,c){let {fragment:d,
|
||||
on_mount:e,on_destroy:f,after_update:h}=a.$$;d&&d.m(b,c);wa(()=>{let b=e.map(T).filter(Ya);f?f.push(...b):b.forEach(T);a.$$.on_mount=[]});h.forEach(wa)}function L(a,b){a=a.$$;null!==a.fragment&&(a.on_destroy.forEach(T),a.fragment&&a.fragment.d(b),a.on_destroy=a.fragment=null,a.ctx=[])}function H(a,b,c,d,e,f,h=[-1]){let k=V;V=a;let m=b.props||{},g=a.$$={fragment:null,ctx:null,props:f,update:y,not_equal:e,bound:Object.create(null),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(k?
|
||||
k.$$.context:[]),callbacks:Object.create(null),dirty:h},l=!1;g.ctx=c?c(a,m,(b,c,...d)=>{d=d.length?d[0]:c;if(g.ctx&&e(g.ctx[b],g.ctx[b]=d)){if(g.bound[b])g.bound[b](d);l&&(-1===a.$$.dirty[0]&&(ia.push(a),za||(za=!0,Jb.then(ab)),a.$$.dirty.fill(0)),a.$$.dirty[b/31|0]|=1<<b%31)}return c}):[];g.update();l=!0;g.before_update.forEach(T);g.fragment=d?d(g.ctx):!1;b.target&&(b.hydrate?(c=Array.from(b.target.childNodes),g.fragment&&g.fragment.l(c),c.forEach(z)):g.fragment&&g.fragment.c(),b.intro&&n(a.$$.fragment),
|
||||
K(a,b.target,b.anchor),ab());V=k}function Kb(a){let b,c,d,e;return{c(){b=document.createElement("button");u(b,"aria-label",c=a[4]?a[4]:null);u(b,"class",d=`${a[1]||""} shepherd-button ${a[2]?"shepherd-button-secondary":""}`);b.disabled=a[5];u(b,"tabindex","0")},m(c,d,k){c.insertBefore(b,d||null);b.innerHTML=a[3];k&&e();e=ka(b,"click",function(){Ya(a[0])&&a[0].apply(this,arguments)})},p(e,[h]){a=e;h&8&&(b.innerHTML=a[3]);h&16&&c!==(c=a[4]?a[4]:null)&&u(b,"aria-label",c);h&6&&d!==(d=`${a[1]||""} shepherd-button ${a[2]?
|
||||
"shepherd-button-secondary":""}`)&&u(b,"class",d);h&32&&(b.disabled=a[5])},i:y,o:y,d(a){a&&z(b);e()}}}function Lb(a,b,c){let {config:d}=b,{step:e}=b,f,h,k,m,g,l;a.$set=a=>{"config"in a&&c(6,d=a.config);"step"in a&&c(7,e=a.step)};a.$$.update=()=>{if(a.$$.dirty&192){c(0,f=d.action?d.action.bind(e.tour):null);c(1,h=d.classes);c(2,k=d.secondary);c(3,m=d.text);c(4,g=d.label);if(d.disabled){var b=d.disabled;b=S(b)?b.call(e):b}else b=!1;c(5,l=b)}};return[f,h,k,m,g,l,d,e]}function cb(a,b,c){a=a.slice();a[2]=
|
||||
b[c];return a}function db(a){let b,c,d=a[1],e=[];for(let b=0;b<d.length;b+=1)e[b]=eb(cb(a,d,b));let f=a=>v(e[a],1,1,()=>{e[a]=null});return{c(){for(let a=0;a<e.length;a+=1)e[a].c();b=document.createTextNode("")},m(a,d){for(let b=0;b<e.length;b+=1)e[b].m(a,d);a.insertBefore(b,d||null);c=!0},p(a,c){if(c&3){d=a[1];let h;for(h=0;h<d.length;h+=1){let f=cb(a,d,h);e[h]?(e[h].p(f,c),n(e[h],1)):(e[h]=eb(f),e[h].c(),n(e[h],1),e[h].m(b.parentNode,b))}M();for(h=d.length;h<e.length;h+=1)f(h);O()}},i(a){if(!c){for(a=
|
||||
0;a<d.length;a+=1)n(e[a]);c=!0}},o(a){e=e.filter(Boolean);for(a=0;a<e.length;a+=1)v(e[a]);c=!1},d(a){var c=e;for(let b=0;b<c.length;b+=1)c[b]&&c[b].d(a);a&&z(b)}}}function eb(a){let b,c=new Mb({props:{config:a[2],step:a[0]}});return{c(){P(c.$$.fragment)},m(a,e){K(c,a,e);b=!0},p(a,b){let d={};b&2&&(d.config=a[2]);b&1&&(d.step=a[0]);c.$set(d)},i(a){b||(n(c.$$.fragment,a),b=!0)},o(a){v(c.$$.fragment,a);b=!1},d(a){L(c,a)}}}function Nb(a){let b,c,d=a[1]&&db(a);return{c(){b=document.createElement("footer");
|
||||
d&&d.c();u(b,"class","shepherd-footer")},m(a,f){a.insertBefore(b,f||null);d&&d.m(b,null);c=!0},p(a,[c]){a[1]?d?(d.p(a,c),c&2&&n(d,1)):(d=db(a),d.c(),n(d,1),d.m(b,null)):d&&(M(),v(d,1,1,()=>{d=null}),O())},i(a){c||(n(d),c=!0)},o(a){v(d);c=!1},d(a){a&&z(b);d&&d.d()}}}function Ob(a,b,c){let {step:d}=b;a.$set=a=>{"step"in a&&c(0,d=a.step)};let e;a.$$.update=()=>{a.$$.dirty&1&&c(1,e=d.options.buttons)};return[d,e]}function Pb(a){let b,c,d,e;return{c(){b=document.createElement("button");c=document.createElement("span");
|
||||
c.textContent="\u00d7";u(c,"aria-hidden","true");u(b,"aria-label",d=a[0].label?a[0].label:"Close Tour");u(b,"class","shepherd-cancel-icon");u(b,"type","button")},m(d,h,k){d.insertBefore(b,h||null);b.appendChild(c);k&&e();e=ka(b,"click",a[1])},p(a,[c]){c&1&&d!==(d=a[0].label?a[0].label:"Close Tour")&&u(b,"aria-label",d)},i:y,o:y,d(a){a&&z(b);e()}}}function Qb(a,b,c){let {cancelIcon:d}=b,{step:e}=b;a.$set=a=>{"cancelIcon"in a&&c(0,d=a.cancelIcon);"step"in a&&c(2,e=a.step)};return[d,a=>{a.preventDefault();
|
||||
e.cancel()},e]}function Rb(a){let b;return{c(){b=document.createElement("h3");u(b,"id",a[1]);u(b,"class","shepherd-title")},m(c,d){c.insertBefore(b,d||null);a[3](b)},p(a,[d]){d&2&&u(b,"id",a[1])},i:y,o:y,d(c){c&&z(b);a[3](null)}}}function Sb(a,b,c){let {labelId:d}=b,{element:e}=b,{title:f}=b;la().$$.after_update.push(()=>{S(f)&&c(2,f=f());c(0,e.innerHTML=f,e)});a.$set=a=>{"labelId"in a&&c(1,d=a.labelId);"element"in a&&c(0,e=a.element);"title"in a&&c(2,f=a.title)};return[e,d,f,function(a){W[a?"unshift":
|
||||
"push"](()=>{c(0,e=a)})}]}function fb(a){let b,c=new Tb({props:{labelId:a[0],title:a[2]}});return{c(){P(c.$$.fragment)},m(a,e){K(c,a,e);b=!0},p(a,b){let d={};b&1&&(d.labelId=a[0]);b&4&&(d.title=a[2]);c.$set(d)},i(a){b||(n(c.$$.fragment,a),b=!0)},o(a){v(c.$$.fragment,a);b=!1},d(a){L(c,a)}}}function gb(a){let b,c=new Ub({props:{cancelIcon:a[3],step:a[1]}});return{c(){P(c.$$.fragment)},m(a,e){K(c,a,e);b=!0},p(a,b){let d={};b&8&&(d.cancelIcon=a[3]);b&2&&(d.step=a[1]);c.$set(d)},i(a){b||(n(c.$$.fragment,
|
||||
a),b=!0)},o(a){v(c.$$.fragment,a);b=!1},d(a){L(c,a)}}}function Vb(a){let b,c,d,e=a[2]&&fb(a),f=a[3]&&a[3].enabled&&gb(a);return{c(){b=document.createElement("header");e&&e.c();c=document.createTextNode(" ");f&&f.c();u(b,"class","shepherd-header")},m(a,k){a.insertBefore(b,k||null);e&&e.m(b,null);b.appendChild(c);f&&f.m(b,null);d=!0},p(a,[d]){a[2]?e?(e.p(a,d),d&4&&n(e,1)):(e=fb(a),e.c(),n(e,1),e.m(b,c)):e&&(M(),v(e,1,1,()=>{e=null}),O());a[3]&&a[3].enabled?f?(f.p(a,d),d&8&&n(f,1)):(f=gb(a),f.c(),n(f,
|
||||
1),f.m(b,null)):f&&(M(),v(f,1,1,()=>{f=null}),O())},i(a){d||(n(e),n(f),d=!0)},o(a){v(e);v(f);d=!1},d(a){a&&z(b);e&&e.d();f&&f.d()}}}function Wb(a,b,c){let {labelId:d}=b,{step:e}=b,f,h;a.$set=a=>{"labelId"in a&&c(0,d=a.labelId);"step"in a&&c(1,e=a.step)};a.$$.update=()=>{a.$$.dirty&2&&(c(2,f=e.options.title),c(3,h=e.options.cancelIcon))};return[d,e,f,h]}function Xb(a){let b;return{c(){b=document.createElement("div");u(b,"class","shepherd-text");u(b,"id",a[1])},m(c,d){c.insertBefore(b,d||null);a[3](b)},
|
||||
p(a,[d]){d&2&&u(b,"id",a[1])},i:y,o:y,d(c){c&&z(b);a[3](null)}}}function Yb(a,b,c){let {descriptionId:d}=b,{element:e}=b,{step:f}=b;la().$$.after_update.push(()=>{let {text:a}=f.options;S(a)&&(a=a.call(f));a instanceof HTMLElement?e.appendChild(a):c(0,e.innerHTML=a,e)});a.$set=a=>{"descriptionId"in a&&c(1,d=a.descriptionId);"element"in a&&c(0,e=a.element);"step"in a&&c(2,f=a.step)};return[e,d,f,function(a){W[a?"unshift":"push"](()=>{c(0,e=a)})}]}function hb(a){let b,c=new Zb({props:{labelId:a[1],
|
||||
step:a[2]}});return{c(){P(c.$$.fragment)},m(a,e){K(c,a,e);b=!0},p(a,b){let d={};b&2&&(d.labelId=a[1]);b&4&&(d.step=a[2]);c.$set(d)},i(a){b||(n(c.$$.fragment,a),b=!0)},o(a){v(c.$$.fragment,a);b=!1},d(a){L(c,a)}}}function ib(a){let b,c=new $b({props:{descriptionId:a[0],step:a[2]}});return{c(){P(c.$$.fragment)},m(a,e){K(c,a,e);b=!0},p(a,b){let d={};b&1&&(d.descriptionId=a[0]);b&4&&(d.step=a[2]);c.$set(d)},i(a){b||(n(c.$$.fragment,a),b=!0)},o(a){v(c.$$.fragment,a);b=!1},d(a){L(c,a)}}}function jb(a){let b,
|
||||
c=new ac({props:{step:a[2]}});return{c(){P(c.$$.fragment)},m(a,e){K(c,a,e);b=!0},p(a,b){let d={};b&4&&(d.step=a[2]);c.$set(d)},i(a){b||(n(c.$$.fragment,a),b=!0)},o(a){v(c.$$.fragment,a);b=!1},d(a){L(c,a)}}}function bc(a){let b,c=void 0!==a[2].options.title||a[2].options.cancelIcon&&a[2].options.cancelIcon.enabled,d,e=void 0!==a[2].options.text,f,h=Array.isArray(a[2].options.buttons)&&a[2].options.buttons.length,k,m=c&&hb(a),g=e&&ib(a),l=h&&jb(a);return{c(){b=document.createElement("div");m&&m.c();
|
||||
d=document.createTextNode(" ");g&&g.c();f=document.createTextNode(" ");l&&l.c();u(b,"class","shepherd-content")},m(a,c){a.insertBefore(b,c||null);m&&m.m(b,null);b.appendChild(d);g&&g.m(b,null);b.appendChild(f);l&&l.m(b,null);k=!0},p(a,[k]){k&4&&(c=void 0!==a[2].options.title||a[2].options.cancelIcon&&a[2].options.cancelIcon.enabled);c?m?(m.p(a,k),k&4&&n(m,1)):(m=hb(a),m.c(),n(m,1),m.m(b,d)):m&&(M(),v(m,1,1,()=>{m=null}),O());k&4&&(e=void 0!==a[2].options.text);e?g?(g.p(a,k),k&4&&n(g,1)):(g=ib(a),
|
||||
g.c(),n(g,1),g.m(b,f)):g&&(M(),v(g,1,1,()=>{g=null}),O());k&4&&(h=Array.isArray(a[2].options.buttons)&&a[2].options.buttons.length);h?l?(l.p(a,k),k&4&&n(l,1)):(l=jb(a),l.c(),n(l,1),l.m(b,null)):l&&(M(),v(l,1,1,()=>{l=null}),O())},i(a){k||(n(m),n(g),n(l),k=!0)},o(a){v(m);v(g);v(l);k=!1},d(a){a&&z(b);m&&m.d();g&&g.d();l&&l.d()}}}function cc(a,b,c){let {descriptionId:d}=b,{labelId:e}=b,{step:f}=b;a.$set=a=>{"descriptionId"in a&&c(0,d=a.descriptionId);"labelId"in a&&c(1,e=a.labelId);"step"in a&&c(2,f=
|
||||
a.step)};return[d,e,f]}function kb(a){let b;return{c(){b=document.createElement("div");u(b,"class","shepherd-arrow");u(b,"data-popper-arrow","")},m(a,d){a.insertBefore(b,d||null)},d(a){a&&z(b)}}}function dc(a){let b,c,d,e,f=a[4].options.arrow&&a[4].options.attachTo&&a[4].options.attachTo.element&&a[4].options.attachTo.on&&kb(),h=new ec({props:{descriptionId:a[2],labelId:a[3],step:a[4]}}),k=[{"aria-describedby":void 0!==a[4].options.text?a[2]:null},{"aria-labelledby":a[4].options.title?a[3]:null},
|
||||
a[1],{role:"dialog"},{tabindex:"0"}],m={};for(let a=0;a<k.length;a+=1)m=Ib(m,k[a]);return{c(){b=document.createElement("div");f&&f.c();c=document.createTextNode(" ");P(h.$$.fragment);$a(b,m);U(b,"shepherd-has-cancel-icon",a[5]);U(b,"shepherd-has-title",a[6]);U(b,"shepherd-element",!0)},m(g,k,m){g.insertBefore(b,k||null);f&&f.m(b,null);b.appendChild(c);K(h,b,null);a[17](b);d=!0;m&&e();e=ka(b,"keydown",a[7])},p(a,[d]){a[4].options.arrow&&a[4].options.attachTo&&a[4].options.attachTo.element&&a[4].options.attachTo.on?
|
||||
f||(f=kb(),f.c(),f.m(b,c)):f&&(f.d(1),f=null);var e={};d&4&&(e.descriptionId=a[2]);d&8&&(e.labelId=a[3]);d&16&&(e.step=a[4]);h.$set(e);e=b;{d=[d&20&&{"aria-describedby":void 0!==a[4].options.text?a[2]:null},d&24&&{"aria-labelledby":a[4].options.title?a[3]:null},d&2&&a[1],{role:"dialog"},{tabindex:"0"}];let b={},c={},e={$$scope:1},f=k.length;for(;f--;){let a=k[f],r=d[f];if(r){for(g in a)g in r||(c[g]=1);for(let a in r)e[a]||(b[a]=r[a],e[a]=1);k[f]=r}else for(let b in a)e[b]=1}for(let a in c)a in b||
|
||||
(b[a]=void 0);var g=b}$a(e,g);U(b,"shepherd-has-cancel-icon",a[5]);U(b,"shepherd-has-title",a[6]);U(b,"shepherd-element",!0)},i(a){d||(n(h.$$.fragment,a),d=!0)},o(a){v(h.$$.fragment,a);d=!1},d(c){c&&z(b);f&&f.d();L(h);a[17](null);e()}}}function lb(a){return a.split(" ").filter(a=>!!a.length)}function fc(a,b,c){function d(){e(w);w=p.options.classes;f(w)}function e(a){Z(a)&&(a=lb(a),a.length&&k.classList.remove(...a))}function f(a){Z(a)&&(a=lb(a),a.length&&k.classList.add(...a))}let {classPrefix:h}=
|
||||
b,{element:k}=b,{descriptionId:m}=b,{firstFocusableElement:g}=b,{focusableElements:l}=b,{labelId:q}=b,{lastFocusableElement:t}=b,{step:p}=b,{dataStepId:B}=b,r,A,w;la().$$.on_mount.push(()=>{c(1,B={[`data-${h}shepherd-step-id`]:p.id});c(9,l=k.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]'));c(8,g=l[0]);c(10,t=l[l.length-1])});la().$$.after_update.push(()=>{w!==p.options.classes&&d()});a.$set=a=>
|
||||
{"classPrefix"in a&&c(11,h=a.classPrefix);"element"in a&&c(0,k=a.element);"descriptionId"in a&&c(2,m=a.descriptionId);"firstFocusableElement"in a&&c(8,g=a.firstFocusableElement);"focusableElements"in a&&c(9,l=a.focusableElements);"labelId"in a&&c(3,q=a.labelId);"lastFocusableElement"in a&&c(10,t=a.lastFocusableElement);"step"in a&&c(4,p=a.step);"dataStepId"in a&&c(1,B=a.dataStepId)};a.$$.update=()=>{a.$$.dirty&16&&(c(5,r=p.options&&p.options.cancelIcon&&p.options.cancelIcon.enabled),c(6,A=p.options&&
|
||||
p.options.title))};return[k,B,m,q,p,r,A,a=>{const {tour:b}=p;switch(a.keyCode){case 9:if(0===l.length){a.preventDefault();break}a.shiftKey?document.activeElement===g&&(a.preventDefault(),t.focus()):document.activeElement===t&&(a.preventDefault(),g.focus());break;case 27:b.options.exitOnEsc&&p.cancel();break;case 37:b.options.keyboardNavigation&&b.back();break;case 39:b.options.keyboardNavigation&&b.next()}},g,l,t,h,()=>k,w,d,e,f,function(a){W[a?"unshift":"push"](()=>{c(0,k=a)})}]}function gc(a){a&&
|
||||
({steps:a}=a,a.forEach(a=>{a.options&&!1===a.options.canClickTarget&&a.options.attachTo&&a.target instanceof HTMLElement&&a.target.classList.remove("shepherd-target-click-disabled")}))}function hc({width:a,height:b,x:c=0,y:d=0,r:e=0}){let {innerWidth:f,innerHeight:h}=window;return`M${f},${h}\
|
||||
H0\
|
||||
V0\
|
||||
H${f}\
|
||||
V${h}\
|
||||
Z\
|
||||
M${c+e},${d}\
|
||||
a${e},${e},0,0,0-${e},${e}\
|
||||
V${b+d-e}\
|
||||
a${e},${e},0,0,0,${e},${e}\
|
||||
H${a+c-e}\
|
||||
a${e},${e},0,0,0,${e}-${e}\
|
||||
V${d+e}\
|
||||
a${e},${e},0,0,0-${e}-${e}\
|
||||
Z`}function ic(a){let b,c,d,e;return{c(){b=Za("svg");c=Za("path");u(c,"d",a[2]);u(b,"class",d=`${a[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)},m(d,h,k){d.insertBefore(b,h||null);b.appendChild(c);a[17](b);k&&e();e=ka(b,"touchmove",a[3])},p(a,[e]){e&4&&u(c,"d",a[2]);e&2&&d!==(d=`${a[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)&&u(b,"class",d)},i:y,o:y,d(c){c&&z(b);a[17](null);e()}}}function mb(a){if(!a)return null;let b=a instanceof HTMLElement&&window.getComputedStyle(a).overflowY;
|
||||
return"hidden"!==b&&"visible"!==b&&a.scrollHeight>=a.clientHeight?a:mb(a.parentElement)}function jc(a,b,c){function d(){c(4,q={width:0,height:0,x:0,y:0,r:0})}function e(){c(1,t=!1);m()}function f(a,b,d=0,e=0){if(a.getBoundingClientRect){var f=a.getBoundingClientRect();var g=f.y||f.top;f=f.bottom||g+f.height;if(b){var r=b.getBoundingClientRect();b=r.y||r.top;r=r.bottom||b+r.height;g=Math.max(g,b);f=Math.min(f,r)}g={y:g,height:Math.max(f-g,0)};let {y:h,height:k}=g,{x:l,width:m,left:p}=a.getBoundingClientRect();
|
||||
c(4,q={width:m+2*d,height:k+2*d,x:(l||p)-d,y:h-d,r:e})}}function h(){c(1,t=!0)}function k(){window.addEventListener("touchmove",r,{passive:!1})}function m(){p&&(cancelAnimationFrame(p),p=void 0);window.removeEventListener("touchmove",r,{passive:!1})}function g(a){let {modalOverlayOpeningPadding:b,modalOverlayOpeningRadius:c}=a.options;if(a.target){let d=mb(a.target),e=()=>{p=void 0;f(a.target,d,b,c);p=requestAnimationFrame(e)};e();k()}else d()}let {element:l}=b,{openingProperties:q}=b;b=va();let t=
|
||||
!1,p=void 0,B;d();let r=a=>{a.preventDefault()};a.$set=a=>{"element"in a&&c(0,l=a.element);"openingProperties"in a&&c(4,q=a.openingProperties)};a.$$.update=()=>{a.$$.dirty&16&&c(2,B=hc(q))};return[l,t,B,a=>{a.stopPropagation()},q,()=>l,d,e,f,function(a){m();a.tour.options.useModalOverlay?(g(a),h()):e()},h,p,b,r,k,m,g,function(a){W[a?"unshift":"push"](()=>{c(0,l=a)})}]}var qb=function(a){var b;if(b=!!a&&"object"===typeof a)b=Object.prototype.toString.call(a),b=!("[object RegExp]"===b||"[object Date]"===
|
||||
b||a.$$typeof===kc);return b},kc="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;R.all=function(a,b){if(!Array.isArray(a))throw Error("first argument should be an array");return a.reduce(function(a,d){return R(a,d,b)},{})};var lc=R;class Aa{on(a,b,c,d=!1){void 0===this.bindings&&(this.bindings={});void 0===this.bindings[a]&&(this.bindings[a]=[]);this.bindings[a].push({handler:b,ctx:c,once:d});return this}once(a,b,c){return this.on(a,b,c,!0)}off(a,b){if(void 0===this.bindings||
|
||||
void 0===this.bindings[a])return this;void 0===b?delete this.bindings[a]:this.bindings[a].forEach((c,d)=>{c.handler===b&&this.bindings[a].splice(d,1)});return this}trigger(a,...b){void 0!==this.bindings&&this.bindings[a]&&this.bindings[a].forEach((c,d)=>{let {ctx:e,handler:f,once:h}=c;f.apply(e||this,b);h&&this.bindings[a].splice(d,1)});return this}}var ha=["top","bottom","right","left"],Ta=ha.reduce(function(a,b){return a.concat([b+"-start",b+"-end"])},[]),Sa=[].concat(ha,["auto"]).reduce(function(a,
|
||||
b){return a.concat([b,b+"-start",b+"-end"])},[]),vb="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),nb={placement:"bottom",modifiers:[],strategy:"absolute"},oa={passive:!0},yb={top:"auto",right:"auto",bottom:"auto",left:"auto"},zb={left:"right",right:"left",bottom:"top",top:"bottom"},Ab={start:"end",end:"start"},mc=function(a){void 0===a&&(a={});var b=a.defaultModifiers,c=void 0===b?[]:b;a=a.defaultOptions;var d=void 0===a?nb:a;return function(a,b,h){function e(){g.orderedModifiers.forEach(function(a){var b=
|
||||
a.name,c=a.options;c=void 0===c?{}:c;a=a.effect;"function"===typeof a&&(b=a({state:g,name:b,instance:t,options:c}),l.push(b||function(){}))})}function f(){l.forEach(function(a){return a()});l=[]}void 0===h&&(h=d);var g={placement:"bottom",orderedModifiers:[],options:Object.assign({},nb,{},d),modifiersData:{},elements:{reference:a,popper:b},attributes:{},styles:{}},l=[],q=!1,t={state:g,setOptions:function(h){f();g.options=Object.assign({},d,{},g.options,{},h);g.scrollParents={reference:ba(a)?da(a):
|
||||
a.contextElement?da(a.contextElement):[],popper:da(b)};h=ub(xb([].concat(c,g.options.modifiers)));g.orderedModifiers=h.filter(function(a){return a.enabled});e();return t.update()},forceUpdate:function(){if(!q){var a=g.elements,b=a.reference;a=a.popper;if(Ka(b,a))for(g.rects={reference:Ga(b,ea(a),"fixed"===g.options.strategy),popper:ra(a)},g.reset=!1,g.placement=g.options.placement,g.orderedModifiers.forEach(function(a){return g.modifiersData[a.name]=Object.assign({},a.data)}),b=0;b<g.orderedModifiers.length;b++)if(!0===
|
||||
g.reset)g.reset=!1,b=-1;else{var c=g.orderedModifiers[b];a=c.fn;var d=c.options;d=void 0===d?{}:d;c=c.name;"function"===typeof a&&(g=a({state:g,options:d,name:c,instance:t})||g)}}},update:wb(function(){return new Promise(function(a){t.forceUpdate();a(g)})}),destroy:function(){f();q=!0}};if(!Ka(a,b))return t;t.setOptions(h).then(function(a){if(!q&&h.onFirstUpdate)h.onFirstUpdate(a)});return t}}({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(a){var b=
|
||||
a.state,c=a.instance;a=a.options;var d=a.scroll,e=void 0===d?!0:d;a=a.resize;var f=void 0===a?!0:a,h=x(b.elements.popper),k=[].concat(b.scrollParents.reference,b.scrollParents.popper);e&&k.forEach(function(a){a.addEventListener("scroll",c.update,oa)});f&&h.addEventListener("resize",c.update,oa);return function(){e&&k.forEach(function(a){a.removeEventListener("scroll",c.update,oa)});f&&h.removeEventListener("resize",c.update,oa)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(a){var b=
|
||||
a.state;b.modifiersData[a.name]=La({reference:b.rects.reference,element:b.rects.popper,strategy:"absolute",placement:b.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(a){var b=a.state,c=a.options;a=c.gpuAcceleration;a=void 0===a?!0:a;c=c.adaptive;c=void 0===c?!0:c;a={placement:D(b.placement),popper:b.elements.popper,popperRect:b.rects.popper,gpuAcceleration:a};null!=b.modifiersData.popperOffsets&&(b.styles.popper=Object.assign({},b.styles.popper,{},Ma(Object.assign({},
|
||||
a,{offsets:b.modifiersData.popperOffsets,position:b.options.strategy,adaptive:c}))));null!=b.modifiersData.arrow&&(b.styles.arrow=Object.assign({},b.styles.arrow,{},Ma(Object.assign({},a,{offsets:b.modifiersData.arrow,position:"absolute",adaptive:!1}))));b.attributes.popper=Object.assign({},b.attributes.popper,{"data-popper-placement":b.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(a){var b=a.state;Object.keys(b.elements).forEach(function(a){var c=b.styles[a]||{},
|
||||
e=b.attributes[a]||{},f=b.elements[a];C(f)&&F(f)&&(Object.assign(f.style,c),Object.keys(e).forEach(function(a){var b=e[a];!1===b?f.removeAttribute(a):f.setAttribute(a,!0===b?"":b)}))})},effect:function(a){var b=a.state,c={popper:{position:b.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(b.elements.popper.style,c.popper);b.elements.arrow&&Object.assign(b.elements.arrow.style,c.arrow);return function(){Object.keys(b.elements).forEach(function(a){var d=
|
||||
b.elements[a],f=b.attributes[a]||{};a=Object.keys(b.styles.hasOwnProperty(a)?b.styles[a]:c[a]).reduce(function(a,b){a[b]="";return a},{});C(d)&&F(d)&&(Object.assign(d.style,a),Object.keys(f).forEach(function(a){d.removeAttribute(a)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(a){var b=a.state,c=a.name;a=a.options.offset;var d=void 0===a?[0,0]:a;a=Sa.reduce(function(a,c){var e=b.rects;var f=D(c);var h=0<=["left","top"].indexOf(f)?
|
||||
-1:1,k="function"===typeof d?d(Object.assign({},e,{placement:c})):d;e=k[0];k=k[1];e=e||0;k=(k||0)*h;f=0<=["left","right"].indexOf(f)?{x:k,y:e}:{x:e,y:k};a[c]=f;return a},{});var e=a[b.placement],f=e.x;e=e.y;null!=b.modifiersData.popperOffsets&&(b.modifiersData.popperOffsets.x+=f,b.modifiersData.popperOffsets.y+=e);b.modifiersData[c]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(a){var b=a.state,c=a.options;a=a.name;if(!b.modifiersData[a]._skip){var d=c.mainAxis;d=void 0===d?!0:d;var e=c.altAxis;
|
||||
e=void 0===e?!0:e;var f=c.fallbackPlacements,h=c.padding,k=c.boundary,m=c.rootBoundary,g=c.altBoundary,l=c.flipVariations,q=void 0===l?!0:l,t=c.allowedAutoPlacements;c=b.options.placement;l=D(c);f=f||(l!==c&&q?Eb(c):[ja(c)]);var p=[c].concat(f).reduce(function(a,c){return a.concat("auto"===D(c)?Db(b,{placement:c,boundary:k,rootBoundary:m,padding:h,flipVariations:q,allowedAutoPlacements:t}):c)},[]);c=b.rects.reference;f=b.rects.popper;var n=new Map;l=!0;for(var r=p[0],A=0;A<p.length;A++){var w=p[A],
|
||||
u=D(w),v="start"===w.split("-")[1],Q=0<=["top","bottom"].indexOf(u),x=Q?"width":"height",y=fa(b,{placement:w,boundary:k,rootBoundary:m,altBoundary:g,padding:h});v=Q?v?"right":"left":v?"bottom":"top";c[x]>f[x]&&(v=ja(v));x=ja(v);Q=[];d&&Q.push(0>=y[u]);e&&Q.push(0>=y[v],0>=y[x]);if(Q.every(function(a){return a})){r=w;l=!1;break}n.set(w,Q)}if(l)for(d=function(a){var b=p.find(function(b){if(b=n.get(b))return b.slice(0,a).every(function(a){return a})});if(b)return r=b,"break"},e=q?3:1;0<e&&"break"!==
|
||||
d(e);e--);b.placement!==r&&(b.modifiersData[a]._skip=!0,b.placement=r,b.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(a){var b=a.state,c=a.options;a=a.name;var d=c.mainAxis,e=void 0===d?!0:d;d=c.altAxis;d=void 0===d?!1:d;var f=c.tether;f=void 0===f?!0:f;var h=c.tetherOffset,k=void 0===h?0:h;c=fa(b,{boundary:c.boundary,rootBoundary:c.rootBoundary,padding:c.padding,altBoundary:c.altBoundary});h=D(b.placement);var m=b.placement.split("-")[1],
|
||||
g=!m,l=sa(h);h="x"===l?"y":"x";var q=b.modifiersData.popperOffsets,t=b.rects.reference,p=b.rects.popper,n="function"===typeof k?k(Object.assign({},b.rects,{placement:b.placement})):k;k={x:0,y:0};if(q){if(e){var r="y"===l?"top":"left",A="y"===l?"bottom":"right",w="y"===l?"height":"width";e=q[l];var u=q[l]+c[r],v=q[l]-c[A],x=f?-p[w]/2:0,y="start"===m?t[w]:p[w];m="start"===m?-p[w]:-t[w];p=b.elements.arrow;p=f&&p?ra(p):{width:0,height:0};var z=b.modifiersData["arrow#persistent"]?b.modifiersData["arrow#persistent"].padding:
|
||||
{top:0,right:0,bottom:0,left:0};r=z[r];A=z[A];p=Math.max(0,Math.min(t[w],p[w]));y=g?t[w]/2-x-p-r-n:y-p-r-n;g=g?-t[w]/2+x+p+A+n:m+p+A+n;n=b.elements.arrow&&ea(b.elements.arrow);t=b.modifiersData.offset?b.modifiersData.offset[b.placement][l]:0;n=q[l]+y-t-(n?"y"===l?n.clientTop||0:n.clientLeft||0:0);g=q[l]+g-t;f=Math.max(f?Math.min(u,n):u,Math.min(e,f?Math.max(v,g):v));q[l]=f;k[l]=f-e}d&&(d=q[h],f=Math.max(d+c["x"===l?"top":"left"],Math.min(d,d-c["x"===l?"bottom":"right"])),q[h]=f,k[h]=f-d);b.modifiersData[a]=
|
||||
k}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(a){var b,c=a.state;a=a.name;var d=c.elements.arrow,e=c.modifiersData.popperOffsets,f=D(c.placement),h=sa(f);f=0<=["left","right"].indexOf(f)?"height":"width";if(d&&e){var k=c.modifiersData[a+"#persistent"].padding,m=ra(d),g="y"===h?"top":"left",l="y"===h?"bottom":"right",q=c.rects.reference[f]+c.rects.reference[h]-e[h]-c.rects.popper[f];e=e[h]-c.rects.reference[h];d=(d=ea(d))?"y"===h?d.clientHeight||0:d.clientWidth||
|
||||
0:0;q=d/2-m[f]/2+(q/2-e/2);f=Math.max(k[g],Math.min(q,d-m[f]-k[l]));c.modifiersData[a]=(b={},b[h]=f,b.centerOffset=f-q,b)}},effect:function(a){var b=a.state,c=a.options;a=a.name;var d=c.element;d=void 0===d?"[data-popper-arrow]":d;c=c.padding;c=void 0===c?0:c;if(null!=d){if("string"===typeof d&&(d=b.elements.popper.querySelector(d),!d))return;Oa(b.elements.popper,d)&&(b.elements.arrow=d,b.modifiersData[a+"#persistent"]={padding:Qa("number"!==typeof c?c:Ra(c,ha))})}},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},
|
||||
{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(a){var b=a.state;a=a.name;var c=b.rects.reference,d=b.rects.popper,e=b.modifiersData.preventOverflow,f=fa(b,{elementContext:"reference"}),h=fa(b,{altBoundary:!0});c=Ua(f,c);d=Ua(h,d,e);e=Va(c);h=Va(d);b.modifiersData[a]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:e,hasPopperEscaped:h};b.attributes.popper=Object.assign({},b.attributes.popper,{"data-popper-reference-hidden":e,"data-popper-escaped":h})}}]});
|
||||
let V,ia=[],W=[],ma=[],bb=[],Jb=Promise.resolve(),za=!1,xa=!1,ya=new Set,na=new Set,N;class I{$destroy(){L(this,1);this.$destroy=y}$on(a,b){let c=this.$$.callbacks[a]||(this.$$.callbacks[a]=[]);c.push(b);return()=>{let a=c.indexOf(b);-1!==a&&c.splice(a,1)}}$set(){}}class Mb extends I{constructor(a){super();H(this,a,Lb,Kb,G,{config:6,step:7})}}class ac extends I{constructor(a){super();H(this,a,Ob,Nb,G,{step:0})}}class Ub extends I{constructor(a){super();H(this,a,Qb,Pb,G,{cancelIcon:0,step:2})}}class Tb extends I{constructor(a){super();
|
||||
H(this,a,Sb,Rb,G,{labelId:1,element:0,title:2})}}class Zb extends I{constructor(a){super();H(this,a,Wb,Vb,G,{labelId:0,step:1})}}class $b extends I{constructor(a){super();H(this,a,Yb,Xb,G,{descriptionId:1,element:0,step:2})}}class ec extends I{constructor(a){super();H(this,a,cc,bc,G,{descriptionId:0,labelId:1,step:2})}}class nc extends I{constructor(a){super();H(this,a,fc,dc,G,{classPrefix:11,element:0,descriptionId:2,firstFocusableElement:8,focusableElements:9,labelId:3,lastFocusableElement:10,step:4,
|
||||
dataStepId:1,getElement:12})}get getElement(){return this.$$.ctx[12]}}(function(a,b){return b={exports:{}},a(b,b.exports),b.exports})(function(a,b){(function(){a.exports={polyfill:function(){function a(a,b){this.scrollLeft=a;this.scrollTop=b}function b(a){if(null===a||"object"!==typeof a||void 0===a.behavior||"auto"===a.behavior||"instant"===a.behavior)return!0;if("object"===typeof a&&"smooth"===a.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+a.behavior+" is not a valid value for enumeration ScrollBehavior.");
|
||||
}function e(a,b){if("Y"===b)return a.clientHeight+u<a.scrollHeight;if("X"===b)return a.clientWidth+u<a.scrollWidth}function f(a,b){a=g.getComputedStyle(a,null)["overflow"+b];return"auto"===a||"scroll"===a}function h(a){var b=e(a,"Y")&&f(a,"Y");a=e(a,"X")&&f(a,"X");return b||a}function k(a){var b=(p()-a.startTime)/468;var c=.5*(1-Math.cos(Math.PI*(1<b?1:b)));b=a.startX+(a.x-a.startX)*c;c=a.startY+(a.y-a.startY)*c;a.method.call(a.scrollable,b,c);b===a.x&&c===a.y||g.requestAnimationFrame(k.bind(g,a))}
|
||||
function m(b,c,d){var e=p();if(b===l.body){var f=g;var h=g.scrollX||g.pageXOffset;b=g.scrollY||g.pageYOffset;var r=n.scroll}else f=b,h=b.scrollLeft,b=b.scrollTop,r=a;k({scrollable:f,method:r,startTime:e,startX:h,startY:b,x:c,y:d})}var g=window,l=document;if(!("scrollBehavior"in l.documentElement.style&&!0!==g.__forceSmoothScrollPolyfill__)){var q=g.HTMLElement||g.Element,n={scroll:g.scroll||g.scrollTo,scrollBy:g.scrollBy,elementScroll:q.prototype.scroll||a,scrollIntoView:q.prototype.scrollIntoView},
|
||||
p=g.performance&&g.performance.now?g.performance.now.bind(g.performance):Date.now,u=/MSIE |Trident\/|Edge\//.test(g.navigator.userAgent)?1:0;g.scroll=g.scrollTo=function(a,c){void 0!==a&&(!0===b(a)?n.scroll.call(g,void 0!==a.left?a.left:"object"!==typeof a?a:g.scrollX||g.pageXOffset,void 0!==a.top?a.top:void 0!==c?c:g.scrollY||g.pageYOffset):m.call(g,l.body,void 0!==a.left?~~a.left:g.scrollX||g.pageXOffset,void 0!==a.top?~~a.top:g.scrollY||g.pageYOffset))};g.scrollBy=function(a,c){void 0!==a&&(b(a)?
|
||||
n.scrollBy.call(g,void 0!==a.left?a.left:"object"!==typeof a?a:0,void 0!==a.top?a.top:void 0!==c?c:0):m.call(g,l.body,~~a.left+(g.scrollX||g.pageXOffset),~~a.top+(g.scrollY||g.pageYOffset)))};q.prototype.scroll=q.prototype.scrollTo=function(a,c){if(void 0!==a)if(!0===b(a)){if("number"===typeof a&&void 0===c)throw new SyntaxError("Value could not be converted");n.elementScroll.call(this,void 0!==a.left?~~a.left:"object"!==typeof a?~~a:this.scrollLeft,void 0!==a.top?~~a.top:void 0!==c?~~c:this.scrollTop)}else c=
|
||||
a.left,a=a.top,m.call(this,this,"undefined"===typeof c?this.scrollLeft:~~c,"undefined"===typeof a?this.scrollTop:~~a)};q.prototype.scrollBy=function(a,c){void 0!==a&&(!0===b(a)?n.elementScroll.call(this,void 0!==a.left?~~a.left+this.scrollLeft:~~a+this.scrollLeft,void 0!==a.top?~~a.top+this.scrollTop:~~c+this.scrollTop):this.scroll({left:~~a.left+this.scrollLeft,top:~~a.top+this.scrollTop,behavior:a.behavior}))};q.prototype.scrollIntoView=function(a){if(!0===b(a))n.scrollIntoView.call(this,void 0===
|
||||
a?!0:a);else{for(a=this;a!==l.body&&!1===h(a);)a=a.parentNode||a.host;var c=a.getBoundingClientRect(),d=this.getBoundingClientRect();a!==l.body?(m.call(this,a,a.scrollLeft+d.left-c.left,a.scrollTop+d.top-c.top),"fixed"!==g.getComputedStyle(a).position&&g.scrollBy({left:c.left,top:c.top,behavior:"smooth"})):g.scrollBy({left:d.left,top:d.top,behavior:"smooth"})}}}}}})()}).polyfill();class Ba extends Aa{constructor(a,b={}){super(a,b);this.tour=a;this.classPrefix=this.tour.options?Wa(this.tour.options.classPrefix):
|
||||
"";this.styles=a.styles;Ea(this);this._setOptions(b);return this}cancel(){this.tour.cancel();this.trigger("cancel")}complete(){this.tour.complete();this.trigger("complete")}destroy(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null);this.el instanceof HTMLElement&&this.el.parentNode&&(this.el.parentNode.removeChild(this.el),this.el=null);this.target&&this._updateStepTargetOnHide();this.trigger("destroy")}getTour(){return this.tour}hide(){this.tour.modal.hide();this.trigger("before-hide");this.el&&
|
||||
(this.el.hidden=!0);this.target&&this._updateStepTargetOnHide();this.trigger("hide")}isCentered(){let a=ua(this);return!a.element||!a.on}isOpen(){return!(!this.el||this.el.hidden)}show(){if(S(this.options.beforeShowPromise)){let a=this.options.beforeShowPromise();if(void 0!==a)return a.then(()=>this._show())}this._show()}updateStepOptions(a){Object.assign(this.options,a);this.shepherdElementComponent&&this.shepherdElementComponent.$set({step:this})}_createTooltipContent(){this.shepherdElementComponent=
|
||||
new nc({target:document.body,props:{classPrefix:this.classPrefix,descriptionId:`${this.id}-description`,labelId:`${this.id}-label`,step:this,styles:this.styles}});return this.shepherdElementComponent.getElement()}_scrollTo(a){let {element:b}=ua(this);S(this.options.scrollToHandler)?this.options.scrollToHandler(b):b instanceof HTMLElement&&"function"===typeof b.scrollIntoView&&b.scrollIntoView(a)}_getClassOptions(a){var b=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;b=b&&b.classes?
|
||||
b.classes:"";a=[...(a.classes?a.classes:"").split(" "),...b.split(" ")];a=new Set(a);return Array.from(a).join(" ").trim()}_setOptions(a={}){let b=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;b=lc({},b||{});this.options=Object.assign({arrow:!0},b,a);let {when:c}=this.options;this.options.classes=this._getClassOptions(a);this.destroy();this.id=this.options.id||`step-${va()}`;c&&Object.keys(c).forEach(a=>{this.on(a,c[a],this)})}_setupElements(){void 0!==this.el&&this.destroy();
|
||||
this.el=this._createTooltipContent();this.options.advanceOn&&sb(this);{this.tooltip&&this.tooltip.destroy();let a=ua(this),b=a.element,c=Hb(a,this);this.isCentered()&&(b=document.body,this.shepherdElementComponent.getElement().classList.add("shepherd-centered"));this.tooltip=mc(b,this.el,c);this.target=a.element}}_show(){this.trigger("before-show");this._setupElements();this.tour.modal||this.tour._setupModal();this.tour.modal.setupForStep(this);this._styleTargetElementForStep(this);this.el.hidden=
|
||||
!1;this.options.scrollTo&&setTimeout(()=>{this._scrollTo(this.options.scrollTo)});this.el.hidden=!1;let a=this.shepherdElementComponent.getElement(),b=this.target||document.body;b.classList.add(`${this.classPrefix}shepherd-enabled`);b.classList.add(`${this.classPrefix}shepherd-target`);a.classList.add("shepherd-enabled");this.trigger("show")}_styleTargetElementForStep(a){let b=a.target;b&&(a.options.highlightClass&&b.classList.add(a.options.highlightClass),!1===a.options.canClickTarget&&b.classList.add("shepherd-target-click-disabled"))}_updateStepTargetOnHide(){this.options.highlightClass&&
|
||||
this.target.classList.remove(this.options.highlightClass);this.target.classList.remove(`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`)}}class oc extends I{constructor(a){super();H(this,a,jc,ic,G,{element:0,openingProperties:4,getElement:5,closeModalOpening:6,hide:7,positionModalOpening:8,setupForStep:9,show:10})}get getElement(){return this.$$.ctx[5]}get closeModalOpening(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[7]}get positionModalOpening(){return this.$$.ctx[8]}get setupForStep(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}}
|
||||
let X=new Aa;class pc extends Aa{constructor(a={}){super(a);Ea(this);this.options=Object.assign({},{exitOnEsc:!0,keyboardNavigation:!0},a);this.classPrefix=Wa(this.options.classPrefix);this.steps=[];this.addSteps(this.options.steps);"active cancel complete inactive show start".split(" ").map(a=>{(a=>{this.on(a,b=>{b=b||{};b.tour=this;X.trigger(a,b)})})(a)});this._setTourID();return this}addStep(a,b){a instanceof Ba?a.tour=this:a=new Ba(this,a);void 0!==b?this.steps.splice(b,0,a):this.steps.push(a);
|
||||
return a}addSteps(a){Array.isArray(a)&&a.forEach(a=>{this.addStep(a)});return this}back(){let a=this.steps.indexOf(this.currentStep);this.show(a-1,!1)}cancel(){this.options.confirmCancel?window.confirm(this.options.confirmCancelMessage||"Are you sure you want to stop the tour?")&&this._done("cancel"):this._done("cancel")}complete(){this._done("complete")}getById(a){return this.steps.find(b=>b.id===a)}getCurrentStep(){return this.currentStep}hide(){let a=this.getCurrentStep();if(a)return a.hide()}isActive(){return X.activeTour===
|
||||
this}next(){let a=this.steps.indexOf(this.currentStep);a===this.steps.length-1?this.complete():this.show(a+1,!0)}removeStep(a){let b=this.getCurrentStep();this.steps.some((b,d)=>{if(b.id===a)return b.isOpen()&&b.hide(),b.destroy(),this.steps.splice(d,1),!0});b&&b.id===a&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())}show(a=0,b=!0){if(a=Z(a)?this.getById(a):this.steps[a])this._updateStateBeforeShow(),S(a.options.showOn)&&!a.options.showOn()?this._skipStep(a,b):(this.trigger("show",
|
||||
{step:a,previous:this.currentStep}),this.currentStep=a,a.show())}start(){this.trigger("start");this.focusedElBeforeOpen=document.activeElement;this.currentStep=null;this._setupModal();this._setupActiveTour();this.next()}_done(a){let b=this.steps.indexOf(this.currentStep);Array.isArray(this.steps)&&this.steps.forEach(a=>a.destroy());gc(this);this.trigger(a,{index:b});X.activeTour=null;this.trigger("inactive",{tour:this});this.modal&&this.modal.hide();"cancel"!==a&&"complete"!==a||!this.modal||(a=document.querySelector(".shepherd-modal-overlay-container"))&&
|
||||
a.remove();this.focusedElBeforeOpen instanceof HTMLElement&&this.focusedElBeforeOpen.focus()}_setupActiveTour(){this.trigger("active",{tour:this});X.activeTour=this}_setupModal(){this.modal=new oc({target:this.options.modalContainer||document.body,props:{classPrefix:this.classPrefix,styles:this.styles}})}_skipStep(a,b){a=this.steps.indexOf(a);this.show(b?a+1:a-1,b)}_updateStateBeforeShow(){this.currentStep&&this.currentStep.hide();this.isActive()||this._setupActiveTour()}_setTourID(){this.id=`${this.options.tourName||
|
||||
"tour"}--${va()}`}}Object.assign(X,{Tour:pc,Step:Ba});return X})
|
||||
26
libs/webpack-interface.js
Normal file
26
libs/webpack-interface.js
Normal file
@@ -0,0 +1,26 @@
|
||||
let wiRes = {}
|
||||
let wiCounter = 0
|
||||
|
||||
class wi {
|
||||
static get res(){ return wiRes }
|
||||
static set res(v){ wiRes = v}
|
||||
static get c(){ return wiCounter }
|
||||
static set c(v){ wiCounter = v }
|
||||
|
||||
static register(fun) {
|
||||
const index = this.c++;
|
||||
this.res[index] = fun;
|
||||
return `wi.call(${index});`
|
||||
}
|
||||
static call(id) {
|
||||
this.res[id]();
|
||||
}
|
||||
static reset(){
|
||||
this.res = {}
|
||||
this.c = 0
|
||||
}
|
||||
static publishFunction(name, fun){
|
||||
window[name] = fun
|
||||
return `${name}`
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user