diff --git a/.editorconfig b/.editorconfig index c97c9836..b6a0d721 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,8 +5,6 @@ charset = utf-8 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true - -[*.{html,js,json}] indent_size = 2 indent_style = space diff --git a/.gitignore b/.gitignore index a0b28d67..f4eeb962 100644 --- a/.gitignore +++ b/.gitignore @@ -11,8 +11,10 @@ __pycache__ *.egg-info .coverage .pytest_cache +.webassets-cache htmlcov Pipfile.lock +test-reports *.swo *.swp @@ -24,3 +26,5 @@ venv *.sqlite3 .pyre* + +__bundle__ diff --git a/Pipfile b/Pipfile index 0b0e4181..4402bde7 100644 --- a/Pipfile +++ b/Pipfile @@ -10,7 +10,13 @@ python_version = "3.7" bitstring = "*" lnurl = "*" flask = "*" +flask-assets = "*" +flask-compress = "*" flask-talisman = "*" +gevent = "*" +greenlet = "*" +gunicorn = "*" +pyscss = "*" requests = "*" [dev-packages] diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..e69de29b diff --git a/lnbits/__init__.py b/lnbits/__init__.py index 8811d465..2f59c579 100644 --- a/lnbits/__init__.py +++ b/lnbits/__init__.py @@ -3,12 +3,15 @@ import json import requests import uuid -from flask import Flask, jsonify, redirect, render_template, request, url_for +from flask import g, Flask, jsonify, redirect, render_template, request, url_for +from flask_assets import Environment, Bundle +from flask_compress import Compress from flask_talisman import Talisman from lnurl import Lnurl, LnurlWithdrawResponse from . import bolt11 from .core import core_app +from .decorators import api_validate_post_request from .db import init_databases, open_db from .helpers import ExtensionManager, megajson from .settings import WALLET, DEFAULT_USER_WALLET_NAME, FEE_RESERVE @@ -21,6 +24,7 @@ valid_extensions = [ext for ext in ExtensionManager().extensions if ext.is_valid # optimization & security # ----------------------- +Compress(app) Talisman( app, content_security_policy={ @@ -34,6 +38,8 @@ Talisman( "fonts.googleapis.com", "fonts.gstatic.com", "maxcdn.bootstrapcdn.com", + "github.com", + "avatars2.githubusercontent.com", ] }, ) @@ -55,13 +61,23 @@ for ext in valid_extensions: # filters # ------- +app.jinja_env.globals["DEBUG"] = app.config["DEBUG"] app.jinja_env.globals["EXTENSIONS"] = valid_extensions app.jinja_env.filters["megajson"] = megajson +# assets +# ------ + +assets = Environment(app) +assets.url = app.static_url_path +assets.register("base_css", Bundle("scss/base.scss", filters="pyscss", output="css/base.css")) + + # init # ---- + @app.before_first_request def init(): init_databases() @@ -73,32 +89,6 @@ def init(): # vvvvvvvvvvvvvvvvvvvvvvvvvvv -@app.route("/deletewallet") -def deletewallet(): - user_id = request.args.get("usr") - wallet_id = request.args.get("wal") - - with open_db() as db: - db.execute( - """ - UPDATE wallets AS w - SET - user = 'del:' || w.user, - adminkey = 'del:' || w.adminkey, - inkey = 'del:' || w.inkey - WHERE id = ? AND user = ? - """, - (wallet_id, user_id), - ) - - next_wallet = db.fetchone("SELECT id FROM wallets WHERE user = ?", (user_id,)) - - if next_wallet: - return redirect(url_for("wallet", usr=user_id, wal=next_wallet[0])) - - return redirect(url_for("home")) - - @app.route("/lnurl") def lnurl(): lnurl = request.args.get("lightning") @@ -157,188 +147,20 @@ def lnurlwallet(): return redirect(url_for("wallet", usr=user_id, wal=wallet_id)) -@app.route("/wallet") -def wallet(): - usr = request.args.get("usr") - wallet_id = request.args.get("wal") - wallet_name = request.args.get("nme") - - if usr: - if not len(usr) > 20: - return redirect(url_for("home")) - if wallet_id: - if not len(wallet_id) > 20: - return redirect(url_for("home")) - - # just usr: return a the first user wallet or create one if none found - # usr and wallet_id: return that wallet or create it if it doesn't exist - # usr, wallet_id and wallet_name: same as above, but use the specified name - # usr and wallet_name: generate a wallet_id and create - # wallet_id and wallet_name: create a user, then move an existing wallet or create - # just wallet_name: create a user, then generate a wallet_id and create - # nothing: create everything - - with open_db() as db: - # ensure this user exists - # ------------------------------- - - if not usr: - usr = uuid.uuid4().hex - return redirect(url_for("wallet", usr=usr, wal=wallet_id, nme=wallet_name)) - - db.execute( - """ - INSERT OR IGNORE INTO accounts (id) VALUES (?) - """, - (usr,), - ) - - user_wallets = db.fetchall("SELECT * FROM wallets WHERE user = ?", (usr,)) - - if not wallet_id: - if user_wallets and not wallet_name: - # fetch the first wallet from this user - # ------------------------------------- - wallet_id = user_wallets[0]["id"] - else: - # create for this user - # -------------------- - wallet_name = wallet_name or DEFAULT_USER_WALLET_NAME - wallet_id = uuid.uuid4().hex - db.execute( - """ - INSERT INTO wallets (id, name, user, adminkey, inkey) - VALUES (?, ?, ?, ?, ?) - """, - (wallet_id, wallet_name, usr, uuid.uuid4().hex, uuid.uuid4().hex), - ) - - return redirect(url_for("wallet", usr=usr, wal=wallet_id, nme=wallet_name)) - - # if wallet_id is given, try to move it to this user or create - # ------------------------------------------------------------ - db.execute( - """ - INSERT OR REPLACE INTO wallets (id, user, name, adminkey, inkey) - VALUES (?, ?, - coalesce((SELECT name FROM wallets WHERE id = ?), ?), - coalesce((SELECT adminkey FROM wallets WHERE id = ?), ?), - coalesce((SELECT inkey FROM wallets WHERE id = ?), ?) - ) - """, - ( - wallet_id, - usr, - wallet_id, - wallet_name or DEFAULT_USER_WALLET_NAME, - wallet_id, - uuid.uuid4().hex, - wallet_id, - uuid.uuid4().hex, - ), - ) - - # finally, get the wallet with balance and transactions - # ----------------------------------------------------- - - wallet = db.fetchone( - """ - SELECT - coalesce((SELECT balance/1000 FROM balances WHERE wallet = wallets.id), 0) * ? AS balance, - * - FROM wallets - WHERE user = ? AND id = ? - """, - (1 - FEE_RESERVE, usr, wallet_id), - ) - - transactions = db.fetchall( - """ - SELECT * - FROM apipayments - WHERE wallet = ? AND pending = 0 - ORDER BY time - """, - (wallet_id,), - ) - - user_ext = db.fetchall("SELECT extension FROM extensions WHERE user = ? AND active = 1", (usr,)) - user_ext = [v[0] for v in user_ext] - - return render_template( - "wallet.html", user_wallets=user_wallets, wallet=wallet, user=usr, transactions=transactions, user_ext=user_ext - ) - - -@app.route("/api/v1/invoices", methods=["GET", "POST"]) -def api_invoices(): - if request.headers["Content-Type"] != "application/json": - return jsonify({"ERROR": "MUST BE JSON"}), 400 - - postedjson = request.json - - # Form validation - if int(postedjson["value"]) < 0 or not postedjson["memo"].replace(" ", "").isalnum(): - return jsonify({"ERROR": "FORM ERROR"}), 401 - - if "value" not in postedjson: - return jsonify({"ERROR": "NO VALUE"}), 400 - - if not postedjson["value"].isdigit(): - return jsonify({"ERROR": "VALUE MUST BE A NUMBER"}), 400 - - if int(postedjson["value"]) < 0: - return jsonify({"ERROR": "AMOUNTLESS INVOICES NOT SUPPORTED"}), 400 - - if "memo" not in postedjson: - return jsonify({"ERROR": "NO MEMO"}), 400 - - with open_db() as db: - wallet = db.fetchone( - "SELECT id FROM wallets WHERE inkey = ? OR adminkey = ?", - (request.headers["Grpc-Metadata-macaroon"], request.headers["Grpc-Metadata-macaroon"],), - ) - - if not wallet: - return jsonify({"ERROR": "NO KEY"}), 200 - - r, pay_hash, pay_req = WALLET.create_invoice(postedjson["value"], postedjson["memo"]) - - if not r.ok or "error" in r.json(): - return jsonify({"ERROR": "UNEXPECTED BACKEND ERROR"}), 500 - - amount_msat = int(postedjson["value"]) * 1000 - - db.execute( - "INSERT INTO apipayments (payhash, amount, wallet, pending, memo) VALUES (?, ?, ?, 1, ?)", - (pay_hash, amount_msat, wallet["id"], postedjson["memo"],), - ) - - return jsonify({"pay_req": pay_req, "payment_hash": pay_hash}), 200 - - @app.route("/api/v1/channels/transactions", methods=["GET", "POST"]) +@api_validate_post_request(required_params=["payment_request"]) def api_transactions(): - if request.headers["Content-Type"] != "application/json": - return jsonify({"ERROR": "MUST BE JSON"}), 400 - - data = request.json - - print(data) - if "payment_request" not in data: - return jsonify({"ERROR": "NO PAY REQ"}), 400 - with open_db() as db: wallet = db.fetchone("SELECT id FROM wallets WHERE adminkey = ?", (request.headers["Grpc-Metadata-macaroon"],)) if not wallet: - return jsonify({"ERROR": "BAD AUTH"}), 401 + return jsonify({"message": "BAD AUTH"}), 401 # decode the invoice - invoice = bolt11.decode(data["payment_request"]) + invoice = bolt11.decode(g.data["payment_request"]) if invoice.amount_msat == 0: - return jsonify({"ERROR": "AMOUNTLESS INVOICES NOT SUPPORTED"}), 400 + return jsonify({"message": "AMOUNTLESS INVOICES NOT SUPPORTED"}), 400 # insert the payment db.execute( @@ -356,7 +178,7 @@ def api_transactions(): balance = db.fetchone("SELECT balance/1000 FROM balances WHERE wallet = ?", (wallet["id"],))[0] if balance < 0: db.execute("DELETE FROM apipayments WHERE payhash = ? AND wallet = ?", (invoice.payment_hash, wallet["id"])) - return jsonify({"ERROR": "INSUFFICIENT BALANCE"}), 403 + return jsonify({"message": "INSUFFICIENT BALANCE"}), 403 # check if the invoice is an internal one if db.fetchone("SELECT count(*) FROM apipayments WHERE payhash = ?", (invoice.payment_hash,))[0] == 2: @@ -364,10 +186,10 @@ def api_transactions(): db.execute("UPDATE apipayments SET pending = 0, fee = 0 WHERE payhash = ?", (invoice.payment_hash,)) else: # actually send the payment - r = WALLET.pay_invoice(data["payment_request"]) + r = WALLET.pay_invoice(g.data["payment_request"]) if not r.raw_response.ok or r.failed: - return jsonify({"ERROR": "UNEXPECTED PAYMENT ERROR"}), 500 + return jsonify({"message": "UNEXPECTED PAYMENT ERROR"}), 500 # payment went through, not pending anymore, save actual fees db.execute( @@ -378,58 +200,6 @@ def api_transactions(): return jsonify({"PAID": "TRUE", "payment_hash": invoice.payment_hash}), 200 -@app.route("/api/v1/invoice/", methods=["GET"]) -def api_checkinvoice(payhash): - if request.headers["Content-Type"] != "application/json": - return jsonify({"ERROR": "MUST BE JSON"}), 400 - - - with open_db() as db: - payment = db.fetchall("SELECT * FROM apipayments WHERE payhash = ?", (payhash,)) - - if not payment: - return jsonify({"ERROR": "NO INVOICE"}), 404 - - if not payment[0][4]: # pending - return jsonify({"PAID": "TRUE"}), 200 - - if not WALLET.get_invoice_status(payhash).settled: - return jsonify({"PAID": "FALSE"}), 200 - - db.execute("UPDATE apipayments SET pending = 0 WHERE payhash = ?", (payhash,)) - return jsonify({"PAID": "TRUE"}), 200 - - -@app.route("/api/v1/payment/", methods=["GET"]) -def api_checkpayment(payhash): - if request.headers["Content-Type"] != "application/json": - return jsonify({"ERROR": "MUST BE JSON"}), 400 - - with open_db() as db: - payment = db.fetchone( - """ - SELECT pending - FROM apipayments - INNER JOIN wallets AS w ON apipayments.wallet = w.id - WHERE payhash = ? - AND (w.adminkey = ? OR w.inkey = ?) - """, - (payhash, request.headers["Grpc-Metadata-macaroon"], request.headers["Grpc-Metadata-macaroon"]), - ) - - if not payment: - return jsonify({"ERROR": "NO INVOICE"}), 404 - - if not payment["pending"]: # pending - return jsonify({"PAID": "TRUE"}), 200 - - if not WALLET.get_payment_status(payhash).settled: - return jsonify({"PAID": "FALSE"}), 200 - - db.execute("UPDATE apipayments SET pending = 0 WHERE payhash = ?", (payhash,)) - return jsonify({"PAID": "TRUE"}), 200 - - @app.route("/api/v1/checkpending", methods=["POST"]) def api_checkpending(): with open_db() as db: @@ -465,39 +235,5 @@ def api_checkpending(): return "" -# Checks DB to see if the extensions are activated or not activated for the user -@app.route("/extensions") -def extensions(): - usr = request.args.get("usr") - enable = request.args.get("enable") - disable = request.args.get("disable") - ext = None - - if usr and not len(usr) > 20: - return redirect(url_for("home")) - - if enable and disable: - # TODO: show some kind of error - return redirect(url_for("extensions")) - - with open_db() as db: - user_wallets = db.fetchall("SELECT * FROM wallets WHERE user = ?", (usr,)) - - if enable: - ext, value = enable, 1 - if disable: - ext, value = disable, 0 - - if ext: - db.execute( - """ - INSERT OR REPLACE INTO extensions (user, extension, active) - VALUES (?, ?, ?) - """, - (usr, ext, value), - ) - - user_ext = db.fetchall("SELECT extension FROM extensions WHERE user = ? AND active = 1", (usr,)) - user_ext = [v[0] for v in user_ext] - - return render_template("extensions.html", user_wallets=user_wallets, user=usr, user_ext=user_ext) +if __name__ == '__main__': + app.run() diff --git a/lnbits/core/__init__.py b/lnbits/core/__init__.py index 84f71954..2bff1bef 100644 --- a/lnbits/core/__init__.py +++ b/lnbits/core/__init__.py @@ -1,7 +1,7 @@ from flask import Blueprint -core_app = Blueprint("core", __name__, template_folder="templates") +core_app = Blueprint("core", __name__, template_folder="templates", static_folder="static") from .views_api import * # noqa diff --git a/lnbits/core/crud.py b/lnbits/core/crud.py new file mode 100644 index 00000000..6fd7ba1d --- /dev/null +++ b/lnbits/core/crud.py @@ -0,0 +1,180 @@ +from uuid import uuid4 + +from lnbits.db import open_db +from lnbits.settings import DEFAULT_USER_WALLET_NAME, FEE_RESERVE +from typing import List, Optional + +from .models import User, Transaction, Wallet + + +# accounts +# -------- + + +def create_account() -> User: + with open_db() as db: + user_id = uuid4().hex + db.execute("INSERT INTO accounts (id) VALUES (?)", (user_id,)) + + return get_account(user_id=user_id) + + +def get_account(user_id: str) -> Optional[User]: + with open_db() as db: + row = db.fetchone("SELECT id, email, pass as password FROM accounts WHERE id = ?", (user_id,)) + + return User(**row) if row else None + + +def get_user(user_id: str) -> Optional[User]: + with open_db() as db: + user = db.fetchone("SELECT id, email FROM accounts WHERE id = ?", (user_id,)) + + if user: + extensions = db.fetchall("SELECT extension FROM extensions WHERE user = ? AND active = 1", (user_id,)) + wallets = db.fetchall( + """ + SELECT *, COALESCE((SELECT balance/1000 FROM balances WHERE wallet = wallets.id), 0) * ? AS balance + FROM wallets + WHERE user = ? + """, + (1 - FEE_RESERVE, user_id), + ) + + return ( + User(**{**user, **{"extensions": [e[0] for e in extensions], "wallets": [Wallet(**w) for w in wallets]}}) + if user + else None + ) + + +def update_user_extension(*, user_id: str, extension: str, active: int) -> None: + with open_db() as db: + db.execute( + """ + INSERT OR REPLACE INTO extensions (user, extension, active) + VALUES (?, ?, ?) + """, + (user_id, extension, active), + ) + + +# wallets +# ------- + + +def create_wallet(*, user_id: str, wallet_name: Optional[str]) -> Wallet: + with open_db() as db: + wallet_id = uuid4().hex + db.execute( + """ + INSERT INTO wallets (id, name, user, adminkey, inkey) + VALUES (?, ?, ?, ?, ?) + """, + (wallet_id, wallet_name or DEFAULT_USER_WALLET_NAME, user_id, uuid4().hex, uuid4().hex), + ) + + return get_wallet(wallet_id=wallet_id) + + +def delete_wallet(*, user_id: str, wallet_id: str) -> None: + with open_db() as db: + db.execute( + """ + UPDATE wallets AS w + SET + user = 'del:' || w.user, + adminkey = 'del:' || w.adminkey, + inkey = 'del:' || w.inkey + WHERE id = ? AND user = ? + """, + (wallet_id, user_id), + ) + + +def get_wallet(wallet_id: str) -> Optional[Wallet]: + with open_db() as db: + row = db.fetchone( + """ + SELECT *, COALESCE((SELECT balance/1000 FROM balances WHERE wallet = wallets.id), 0) * ? AS balance + FROM wallets + WHERE id = ? + """, + (1 - FEE_RESERVE, wallet_id), + ) + + return Wallet(**row) if row else None + + +def get_wallet_for_key(key: str, key_type: str = "invoice") -> Optional[Wallet]: + with open_db() as db: + check_field = "adminkey" if key_type == "admin" else "inkey" + row = db.fetchone( + f""" + SELECT *, COALESCE((SELECT balance/1000 FROM balances WHERE wallet = wallets.id), 0) * ? AS balance + FROM wallets + WHERE {check_field} = ? + """, + (1 - FEE_RESERVE, key), + ) + + return Wallet(**row) if row else None + + +# wallet transactions +# ------------------- + + +def get_wallet_transaction(wallet_id: str, payhash: str) -> Optional[Transaction]: + with open_db() as db: + row = db.fetchone( + """ + SELECT payhash, amount, fee, pending, memo, time + FROM apipayments + WHERE wallet = ? AND payhash = ? + """, + (wallet_id, payhash), + ) + + return Transaction(**row) if row else None + + +def get_wallet_transactions(wallet_id: str, *, pending: bool = False) -> List[Transaction]: + with open_db() as db: + rows = db.fetchall( + """ + SELECT payhash, amount, fee, pending, memo, time + FROM apipayments + WHERE wallet = ? AND pending = ? + ORDER BY time DESC + """, + (wallet_id, int(pending)), + ) + + return [Transaction(**row) for row in rows] + + +# transactions +# ------------ + + +def create_transaction(*, wallet_id: str, payhash: str, amount: str, memo: str) -> Transaction: + with open_db() as db: + db.execute( + """ + INSERT INTO apipayments (wallet, payhash, amount, pending, memo) + VALUES (?, ?, ?, ?, ?) + """, + (wallet_id, payhash, amount, 1, memo), + ) + + return get_wallet_transaction(wallet_id, payhash) + + +def update_transaction_status(payhash: str, pending: bool) -> None: + with open_db() as db: + db.execute("UPDATE apipayments SET pending = ? WHERE payhash = ?", (int(pending), payhash,)) + + +def check_pending_transactions(wallet_id: str) -> None: + pass diff --git a/lnbits/core/models.py b/lnbits/core/models.py new file mode 100644 index 00000000..4a6cb5a6 --- /dev/null +++ b/lnbits/core/models.py @@ -0,0 +1,62 @@ +from decimal import Decimal +from typing import List, NamedTuple, Optional + + +class User(NamedTuple): + id: str + email: str + extensions: Optional[List[str]] = [] + wallets: Optional[List["Wallet"]] = [] + password: Optional[str] = None + + @property + def wallet_ids(self) -> List[str]: + return [wallet.id for wallet in self.wallets] + + def get_wallet(self, wallet_id: str) -> Optional["Wallet"]: + w = [wallet for wallet in self.wallets if wallet.id == wallet_id] + return w[0] if w else None + + +class Wallet(NamedTuple): + id: str + name: str + user: str + adminkey: str + inkey: str + balance: Decimal + + def get_transaction(self, payhash: str) -> "Transaction": + from .crud import get_wallet_transaction + + return get_wallet_transaction(self.id, payhash) + + def get_transactions(self) -> List["Transaction"]: + from .crud import get_wallet_transactions + + return get_wallet_transactions(self.id) + + +class Transaction(NamedTuple): + payhash: str + pending: bool + amount: int + fee: int + memo: str + time: int + + @property + def msat(self) -> int: + return self.amount + + @property + def sat(self) -> int: + return self.amount / 1000 + + @property + def tx_type(self) -> str: + return "payment" if self.amount < 0 else "invoice" + + def set_pending(self, pending: bool) -> None: + from .crud import update_transaction_status + update_transaction_status(self.payhash, pending) diff --git a/lnbits/data/schema.sql b/lnbits/core/schema.sql similarity index 100% rename from lnbits/data/schema.sql rename to lnbits/core/schema.sql diff --git a/lnbits/core/static/favicon.ico b/lnbits/core/static/favicon.ico index 00af0ce2..f0fd84f3 100644 Binary files a/lnbits/core/static/favicon.ico and b/lnbits/core/static/favicon.ico differ diff --git a/lnbits/core/static/js/extensions.js b/lnbits/core/static/js/extensions.js new file mode 100644 index 00000000..1ec818b7 --- /dev/null +++ b/lnbits/core/static/js/extensions.js @@ -0,0 +1,4 @@ +new Vue({ + el: '#vue', + mixins: [windowMixin] +}); diff --git a/lnbits/core/static/js/index.js b/lnbits/core/static/js/index.js new file mode 100644 index 00000000..bc9b1bfe --- /dev/null +++ b/lnbits/core/static/js/index.js @@ -0,0 +1,14 @@ +new Vue({ + el: '#vue', + mixins: [windowMixin], + data: function () { + return { + walletName: '' + }; + }, + methods: { + createWallet: function () { + LNbits.href.createWallet(this.walletName); + } + } +}); diff --git a/lnbits/core/static/js/wallet.js b/lnbits/core/static/js/wallet.js new file mode 100644 index 00000000..1b8a0de6 --- /dev/null +++ b/lnbits/core/static/js/wallet.js @@ -0,0 +1,137 @@ +Vue.component(VueQrcode.name, VueQrcode); + +new Vue({ + el: '#vue', + mixins: [windowMixin], + data: function () { + return { + txUpdate: null, + receive: { + show: false, + status: 'pending', + paymentReq: null, + data: { + amount: null, + memo: '' + } + }, + send: { + show: false, + invoice: null, + data: { + bolt11: '' + } + }, + transactionsTable: { + columns: [ + {name: 'memo', align: 'left', label: 'Memo', field: 'memo'}, + {name: 'date', align: 'left', label: 'Date', field: 'date', sortable: true}, + {name: 'sat', align: 'right', label: 'Amount (sat)', field: 'sat', sortable: true} + ], + pagination: { + rowsPerPage: 10 + } + } + }; + }, + computed: { + canPay: function () { + if (!this.send.invoice) return false; + return this.send.invoice.sat < this.w.wallet.balance; + }, + transactions: function () { + var data = (this.txUpdate) ? this.txUpdate : this.w.transactions; + return data.sort(function (a, b) { + return b.time - a.time; + }); + } + }, + methods: { + openReceiveDialog: function () { + this.receive = { + show: true, + status: 'pending', + paymentReq: null, + data: { + amount: null, + memo: '' + } + }; + }, + openSendDialog: function () { + this.send = { + show: true, + invoice: null, + data: { + bolt11: '' + } + }; + }, + createInvoice: function () { + var self = this; + this.receive.status = 'loading'; + LNbits.api.createInvoice(this.w.wallet, this.receive.data.amount, this.receive.data.memo) + .then(function (response) { + self.receive.status = 'success'; + self.receive.paymentReq = response.data.payment_request; + + var check_invoice = setInterval(function () { + LNbits.api.getInvoice(self.w.wallet, response.data.payment_hash).then(function (response) { + if (response.data.paid) { + self.refreshTransactions(); + self.receive.show = false; + clearInterval(check_invoice); + } + }); + }, 3000); + + }).catch(function (error) { + LNbits.utils.notifyApiError(error); + self.receive.status = 'pending'; + }); + }, + decodeInvoice: function () { + try { + var invoice = decode(this.send.data.bolt11); + } catch (err) { + this.$q.notify({type: 'warning', message: err}); + return; + } + + var cleanInvoice = { + msat: invoice.human_readable_part.amount, + sat: invoice.human_readable_part.amount / 1000, + fsat: LNbits.utils.formatSat(invoice.human_readable_part.amount / 1000) + }; + + _.each(invoice.data.tags, function (tag) { + if (_.isObject(tag) && _.has(tag, 'description')) { + if (tag.description == 'payment_hash') { cleanInvoice.hash = tag.value; } + else if (tag.description == 'description') { cleanInvoice.description = tag.value; } + else if (tag.description == 'expiry') { + var expireDate = new Date((invoice.data.time_stamp + tag.value) * 1000); + cleanInvoice.expireDate = Quasar.utils.date.formatDate(expireDate, 'YYYY-MM-DDTHH:mm:ss.SSSZ'); + cleanInvoice.expired = false; // TODO + } + } + }); + + this.send.invoice = Object.freeze(cleanInvoice); + }, + payInvoice: function () { + alert('pay!'); + }, + deleteWallet: function (walletId, user) { + LNbits.href.deleteWallet(walletId, user); + }, + refreshTransactions: function (notify) { + var self = this; + + LNbits.api.getTransactions(this.w.wallet).then(function (response) { + self.txUpdate = response.data.map(function (obj) { + return LNbits.map.transaction(obj); + }); + }); + } + } +}); diff --git a/lnbits/core/templates/core/extensions.html b/lnbits/core/templates/core/extensions.html new file mode 100644 index 00000000..4c825008 --- /dev/null +++ b/lnbits/core/templates/core/extensions.html @@ -0,0 +1,42 @@ +{% extends "base.html" %} + +{% from "macros.jinja" import window_vars with context %} + + +{% block scripts %} + {{ window_vars(user) }} + {% assets filters='rjsmin', output='__bundle__/core/extensions.js', + 'core/js/extensions.js' %} + + {% endassets %} +{% endblock %} + +{% block page %} +
+
+ + + + {% raw %} +
{{ extension.name }}
+ {{ extension.shortDescription }} + {% endraw %} +
+ + +
+ Open + Disable +
+ + Enable +
+
+
+
+{% endblock %} diff --git a/lnbits/core/templates/core/index.html b/lnbits/core/templates/core/index.html new file mode 100644 index 00000000..434bfbcc --- /dev/null +++ b/lnbits/core/templates/core/index.html @@ -0,0 +1,87 @@ +{% extends "base.html" %} + + +{% block scripts %} + {% assets filters='rjsmin', output='__bundle__/core/index.js', + 'core/js/index.js' %} + + {% endassets %} +{% endblock %} + +{% block drawer %} +{% endblock %} + +{% block page %} +
+
+ + + + + + Add a new wallet + + + + + + +

LNbits

+
Free and open-source lightning wallet
+

LNbits is a simple, free and open-source lightning-network + wallet for bits and bobs. You can run it on your own server, + or use it at lnbits.com.

+

The wallet can be used in a variety of ways: an instant wallet for + LN demonstrations, a fallback wallet for the LNURL scheme, an + accounts system to mitigate the risk of exposing applications to + your full balance.

+

The wallet can run on top of LND, LNPay, @lntxbot or OpenNode.

+

Please note that although one of the aims of this wallet is to + mitigate exposure of all your funds, it’s still very BETA and may, + in fact, do the opposite!

+
+ + View project in GitHub + Donate + +
+ +
+ + + +
+{% endblock %} diff --git a/lnbits/core/templates/core/wallet.html b/lnbits/core/templates/core/wallet.html new file mode 100644 index 00000000..ee4f00cc --- /dev/null +++ b/lnbits/core/templates/core/wallet.html @@ -0,0 +1,252 @@ +{% extends "base.html" %} + +{% from "macros.jinja" import window_vars with context %} + + +{% block scripts %} + {{ window_vars(user, wallet) }} + {% assets filters='rjsmin', output='__bundle__/core/wallet.js', + 'vendor/bolt11/utils.js', + 'vendor/bolt11/decoder.js', + 'vendor/vue-qrcode@1.0.2/vue-qrcode.min.js', + 'core/js/wallet.js' %} + + {% endassets %} +{% endblock %} + +{% block page %} +
+
+ + +

{% raw %}{{ w.wallet.fsat }}{% endraw %} sat

+
+
+
+ Send +
+
+ Receive +
+
+
+ + + +
+
+
Transactions
+
+
+ Export to CSV +
+
+ + {% raw %} + + + {% endraw %} + +
+
+ + + +
+
+
+
+ +
+ + + Wallet name: {{ wallet.name }}
+ Wallet ID: {{ wallet.id }}
+ Admin key: {{ wallet.adminkey }}
+ Invoice/read key: {{ wallet.inkey }} +
+ + + + + + + + Generate an invoice:
POST /api/v1/invoices
Header + {"Grpc-Metadata-macaroon": "{{ wallet.inkey }}"}
+ Body {"value": "200","memo": "beer"}
+ Returns + {"pay_req": string,"pay_id": string}
+ *payment will not register in the wallet until the "check + invoice" endpoint is used

+ + Check invoice:
+ Check an invoice:
GET /api/v1/invoice/*payment_hash*
Header + {"Grpc-Metadata-macaroon": "{{ wallet.inkey }}"}
+ + Returns + {"PAID": "TRUE"}/{"PAID": "FALSE"}
+ *if using LNTXBOT return will hang until paid

+
+
+
+ + + + This whole wallet will be deleted, the funds will be UNRECOVERABLE. + + + +
+ + + + +

This whole wallet will be deleted, the funds will be UNRECOVERABLE.

+ Delete wallet +
+
+
+
+
+
+
+
+ + + + + + +
+ Create invoice + Cancel +
+ +
+
+
+ + + +
+ +
+ Copy invoice + Close +
+
+
+
+ + + + + + + +
+ Read invoice + Cancel +
+
+
+ {% raw %} +
{{ send.invoice.fsat }} sat
+

+ Memo: {{ send.invoice.description }}
+ Expire date: {{ send.invoice.expireDate }}
+ Hash: {{ send.invoice.hash }} +

+ {% endraw %} +
+ Send satoshis + Cancel +
+
+ Not enough funds! + Cancel +
+
+
+
+{% endblock %} diff --git a/lnbits/core/templates/index.html b/lnbits/core/templates/index.html deleted file mode 100644 index 490f7b8b..00000000 --- a/lnbits/core/templates/index.html +++ /dev/null @@ -1,98 +0,0 @@ - - -{% extends "base.html" %} {% block menuitems %} - -
  • Where39 anon locations

  • -
  • The Quickening <$8 PoS

  • -
  • Buy BTC stamps + electronics

  • -
  • Advertise here!

  • -{% endblock %} {% block body %} - -
    - -
    - -

    -
    -
    -
    -

    - TESTING ONLY - wallet is still in BETA and very unstable -

    -
    -
    - - -
    -
    -
    - -
    -
    - {% block call_to_action %} -

    - Make a wallet -

    -
    - -
    - - {% endblock %} -
    - -
    - -
    -
    -
    -
    - -
    -
    -

    - - free and open-source lightning wallet -

    -

    - LNbits is a simple, free and open-source lightning-network wallet - for bits and bobs. You can run it on your own server, or use this - one. -

    - The wallet can be used in a variety of ways, an instant wallet for - LN demonstrations, a fallback wallet for the LNURL scheme, an - accounts system to mitigate the risk of exposing applications to - your full balance. -

    - The wallet can run on top of LND, lntxbot, paywall, opennode -

    - Please note that although one of the aims of this wallet is to - mitigate exposure of all your funds, it’s still very BETA and may - in fact do the opposite! -
    - https://github.com/arcbtc/lnbits -

    -
    - -
    - -
    -
    -
    - -
    - -{% endblock %} diff --git a/lnbits/core/views.py b/lnbits/core/views.py index 4626412a..428cda3c 100644 --- a/lnbits/core/views.py +++ b/lnbits/core/views.py @@ -1,7 +1,17 @@ -from flask import render_template, send_from_directory +from flask import g, abort, redirect, request, render_template, send_from_directory, url_for from os import path from lnbits.core import core_app +from lnbits.decorators import check_user_exists, validate_uuids +from lnbits.helpers import Status + +from .crud import ( + create_account, + get_user, + update_user_extension, + create_wallet, + delete_wallet, +) @core_app.route("/favicon.ico") @@ -11,4 +21,71 @@ def favicon(): @core_app.route("/") def home(): - return render_template("index.html") + return render_template("core/index.html") + + +@core_app.route("/extensions") +@validate_uuids(["usr"], required=True) +@check_user_exists() +def extensions(): + extension_to_enable = request.args.get("enable", type=str) + extension_to_disable = request.args.get("disable", type=str) + + if extension_to_enable and extension_to_disable: + abort(Status.BAD_REQUEST, "You can either `enable` or `disable` an extension.") + + if extension_to_enable: + update_user_extension(user_id=g.user.id, extension=extension_to_enable, active=1) + elif extension_to_disable: + update_user_extension(user_id=g.user.id, extension=extension_to_disable, active=0) + + return render_template("core/extensions.html", user=get_user(g.user.id)) + + +@core_app.route("/wallet") +@validate_uuids(["usr", "wal"]) +def wallet(): + user_id = request.args.get("usr", type=str) + wallet_id = request.args.get("wal", type=str) + wallet_name = request.args.get("nme", type=str) + + # just wallet_name: create a new user, then create a new wallet for user with wallet_name + # just user_id: return the first user wallet or create one if none found (with default wallet_name) + # user_id and wallet_name: create a new wallet for user with wallet_name + # user_id and wallet_id: return that wallet if user is the owner + # nothing: create everything + + if not user_id: + user = get_user(create_account().id) + else: + user = get_user(user_id) or abort(Status.NOT_FOUND, "User does not exist.") + + if not wallet_id: + if user.wallets and not wallet_name: + wallet = user.wallets[0] + else: + wallet = create_wallet(user_id=user.id, wallet_name=wallet_name) + + return redirect(url_for("core.wallet", usr=user.id, wal=wallet.id)) + + if wallet_id not in user.wallet_ids: + abort(Status.FORBIDDEN, "Not your wallet.") + + return render_template("core/wallet.html", user=user, wallet=user.get_wallet(wallet_id)) + + +@core_app.route("/deletewallet") +@validate_uuids(["usr", "wal"], required=True) +@check_user_exists() +def deletewallet(): + wallet_id = request.args.get("wal", type=str) + + if wallet_id not in g.user.wallet_ids: + abort(Status.FORBIDDEN, "Not your wallet.") + else: + delete_wallet(user_id=g.user.id, wallet_id=wallet_id) + + if g.user.wallets: + return redirect(url_for("core.wallet", usr=g.user.id, wal=g.user.wallets[0].id)) + + return redirect(url_for("core.home")) diff --git a/lnbits/core/views_api.py b/lnbits/core/views_api.py index e69de29b..025cfcb9 100644 --- a/lnbits/core/views_api.py +++ b/lnbits/core/views_api.py @@ -0,0 +1,62 @@ +from flask import g, jsonify + +from lnbits.core import core_app +from lnbits.decorators import api_check_wallet_macaroon, api_validate_post_request +from lnbits.helpers import Status +from lnbits.settings import WALLET + +from .crud import create_transaction + + +@core_app.route("/api/v1/invoices", methods=["POST"]) +@api_validate_post_request(required_params=["amount", "memo"]) +@api_check_wallet_macaroon(key_type="invoice") +def api_invoices(): + if not isinstance(g.data["amount"], int) or g.data["amount"] < 1: + return jsonify({"message": "`amount` needs to be a positive integer."}), Status.BAD_REQUEST + + if not isinstance(g.data["memo"], str) or not g.data["memo"].strip(): + return jsonify({"message": "`memo` needs to be a valid string."}), Status.BAD_REQUEST + + try: + r, payhash, payment_request = WALLET.create_invoice(g.data["amount"], g.data["memo"]) + server_error = not r.ok or "message" in r.json() + except Exception: + server_error = True + + if server_error: + return jsonify({"message": "Unexpected backend error. Try again later."}), 500 + + amount_msat = g.data["amount"] * 1000 + create_transaction(wallet_id=g.wallet.id, payhash=payhash, amount=amount_msat, memo=g.data["memo"]) + + return jsonify({"payment_request": payment_request, "payment_hash": payhash}), Status.CREATED + + +@core_app.route("/api/v1/invoices/", defaults={"incoming": True}, methods=["GET"]) +@core_app.route("/api/v1/payments/", defaults={"incoming": False}, methods=["GET"]) +@api_check_wallet_macaroon(key_type="invoice") +def api_transaction(payhash, incoming): + tx = g.wallet.get_transaction(payhash) + + if not tx: + return jsonify({"message": "Transaction does not exist."}), Status.NOT_FOUND + elif not tx.pending: + return jsonify({"paid": True}), Status.OK + + try: + is_settled = WALLET.get_invoice_status(payhash).settled + except Exception: + return jsonify({"paid": False}), Status.OK + + if is_settled is True: + tx.set_pending(False) + return jsonify({"paid": True}), Status.OK + + return jsonify({"paid": False}), Status.OK + + +@core_app.route("/api/v1/transactions", methods=["GET"]) +@api_check_wallet_macaroon(key_type="invoice") +def api_transactions(): + return jsonify(g.wallet.get_transactions()), Status.OK diff --git a/lnbits/data/.gitignore b/lnbits/data/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/lnbits/data/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/lnbits/db.py b/lnbits/db.py index 42405a6a..5ed58113 100644 --- a/lnbits/db.py +++ b/lnbits/db.py @@ -48,11 +48,12 @@ def init_databases() -> None: """TODO: see how we can deal with migrations.""" schemas = [ - ("database", os.path.join(LNBITS_PATH, "data", "schema.sql")), + ("database", os.path.join(LNBITS_PATH, "core", "schema.sql")), ] for extension in ExtensionManager().extensions: - schemas.append((f"ext_{extension.code}", os.path.join(extension.path, "schema.sql"))) + extension_path = os.path.join(LNBITS_PATH, "extensions", extension.code) + schemas.append((f"ext_{extension.code}", os.path.join(extension_path, "schema.sql"))) for schema in [s for s in schemas if os.path.exists(s[1])]: with open_db(schema[0]) as db: diff --git a/lnbits/decorators.py b/lnbits/decorators.py new file mode 100644 index 00000000..7c0fe139 --- /dev/null +++ b/lnbits/decorators.py @@ -0,0 +1,81 @@ +from flask import g, abort, jsonify, request +from functools import wraps +from typing import List, Union +from uuid import UUID + +from lnbits.core.crud import get_user, get_wallet_for_key +from .helpers import Status + + +def api_check_wallet_macaroon(*, key_type: str = "invoice"): + def wrap(view): + @wraps(view) + def wrapped_view(**kwargs): + try: + g.wallet = get_wallet_for_key(request.headers["Grpc-Metadata-macaroon"], key_type) + except KeyError: + return jsonify({"message": "`Grpc-Metadata-macaroon` header missing."}), Status.BAD_REQUEST + + if not g.wallet: + return jsonify({"message": "Wrong keys."}), Status.UNAUTHORIZED + + return view(**kwargs) + + return wrapped_view + + return wrap + + +def api_validate_post_request(*, required_params: List[str] = []): + def wrap(view): + @wraps(view) + def wrapped_view(**kwargs): + if "application/json" not in request.headers["Content-Type"]: + return jsonify({"message": "Content-Type must be `application/json`."}), Status.BAD_REQUEST + + g.data = request.json + + for param in required_params: + if param not in g.data: + return jsonify({"message": f"`{param}` is required."}), Status.BAD_REQUEST + + return view(**kwargs) + + return wrapped_view + + return wrap + + +def check_user_exists(param: str = "usr"): + def wrap(view): + @wraps(view) + def wrapped_view(**kwargs): + g.user = get_user(request.args.get(param, type=str)) or abort(Status.NOT_FOUND, "User not found.") + return view(**kwargs) + + return wrapped_view + + return wrap + + +def validate_uuids(params: List[str], *, required: Union[bool, List[str]] = False, version: int = 4): + def wrap(view): + @wraps(view) + def wrapped_view(**kwargs): + query_params = {param: request.args.get(param, type=str) for param in params} + + for param, value in query_params.items(): + if not value and (required is True or (required and param in required)): + abort(Status.BAD_REQUEST, f"`{param}` is required.") + + if value: + try: + UUID(value, version=version) + except ValueError: + abort(Status.BAD_REQUEST, f"`{param}` is not a valid UUID.") + + return view(**kwargs) + + return wrapped_view + + return wrap diff --git a/lnbits/extensions/events/config.json b/lnbits/extensions/events/config.json index 7739f863..738e264f 100644 --- a/lnbits/extensions/events/config.json +++ b/lnbits/extensions/events/config.json @@ -1,5 +1,6 @@ { - "name": "LNEVENTS", - "short_description": "LN tickets for events", - "ion_icon": "calendar" + "name": "Events", + "short_description": "LN tickets for events.", + "icon": "local_activity", + "contributors": ["arcbtc"] } diff --git a/lnbits/extensions/events/templates/events/index.html b/lnbits/extensions/events/templates/events/index.html index 22515e4a..f7b7fef6 100644 --- a/lnbits/extensions/events/templates/events/index.html +++ b/lnbits/extensions/events/templates/events/index.html @@ -1,6 +1,6 @@ -{% extends "base.html" %} {% block messages %} +{% extends "legacy.html" %} {% block messages %} @@ -42,7 +42,7 @@ {% endif %} {% endfor %}
  • - Manager
  • + Manager {% endblock %} @@ -63,7 +63,7 @@ Home
  • -
  • Extensions
  • +
  • Extensions
  • Lightning tickets diff --git a/lnbits/extensions/example/example.config.json b/lnbits/extensions/example/example.config.json index fc2673c5..f69b1602 100644 --- a/lnbits/extensions/example/example.config.json +++ b/lnbits/extensions/example/example.config.json @@ -1,5 +1,6 @@ { "name": "SHORT-NAME-FOR-EXTENSIONS-PAGE", "short_description": "BLah blah blah.", - "ion_icon": "calendar" + "icon": "calendar", + "contributors": ["github_username"] } diff --git a/lnbits/extensions/example/templates/example/index.html b/lnbits/extensions/example/templates/example/index.html index bfb3a95b..2f690999 100644 --- a/lnbits/extensions/example/templates/example/index.html +++ b/lnbits/extensions/example/templates/example/index.html @@ -1,6 +1,6 @@ -{% extends "base.html" %} {% block messages %} +{% extends "legacy.html" %} {% block messages %} @@ -43,7 +43,7 @@ {% endif %} {% endfor %}
  • - Manager
  • + Manager {% endblock %} @@ -63,7 +63,7 @@ Home
  • -
  • Extensions
  • +
  • Extensions
  • example diff --git a/lnbits/extensions/tpos/config.json b/lnbits/extensions/tpos/config.json index 1c433c79..cdbd8f46 100644 --- a/lnbits/extensions/tpos/config.json +++ b/lnbits/extensions/tpos/config.json @@ -1,5 +1,6 @@ { "name": "TPOS", "short_description": "A shareable POS!", - "ion_icon": "calculator" + "icon": "dialpad", + "contributors": ["talvasconcelos", "arcbtc"] } diff --git a/lnbits/extensions/tpos/templates/tpos/index.html b/lnbits/extensions/tpos/templates/tpos/index.html index 9f094f3e..9a2388fc 100644 --- a/lnbits/extensions/tpos/templates/tpos/index.html +++ b/lnbits/extensions/tpos/templates/tpos/index.html @@ -1,6 +1,6 @@ -{% extends "base.html" %} {% block messages %} +{% extends "legacy.html" %} {% block messages %} @@ -43,7 +43,7 @@ {% endif %} {% endfor %}
  • - Manager
  • + Manager {% endblock %} @@ -63,7 +63,7 @@ Home
  • -
  • Extensions
  • +
  • Extensions
  • example diff --git a/lnbits/extensions/withdraw/config.json b/lnbits/extensions/withdraw/config.json index 28dafe96..1ef256c6 100644 --- a/lnbits/extensions/withdraw/config.json +++ b/lnbits/extensions/withdraw/config.json @@ -1,5 +1,6 @@ { "name": "LNURLw", - "short_description": "Make LNURL withdraw links", - "ion_icon": "beer" + "short_description": "Make LNURL withdraw links.", + "icon": "crop_free", + "contributors": ["arcbtc"] } diff --git a/lnbits/extensions/withdraw/templates/withdraw/index.html b/lnbits/extensions/withdraw/templates/withdraw/index.html index 11c8f6de..38858d84 100644 --- a/lnbits/extensions/withdraw/templates/withdraw/index.html +++ b/lnbits/extensions/withdraw/templates/withdraw/index.html @@ -1,6 +1,6 @@ -{% extends "base.html" %} {% block messages %} +{% extends "legacy.html" %} {% block messages %} ! @@ -41,7 +41,7 @@ {% endif %} {% endfor %}
  • - Manager
  • + Manager {% endblock %} @@ -61,7 +61,7 @@ Home
  • -
  • Extensions
  • +
  • Extensions
  • Withdraw link maker diff --git a/lnbits/helpers.py b/lnbits/helpers.py index f95dbd77..329594ff 100644 --- a/lnbits/helpers.py +++ b/lnbits/helpers.py @@ -2,18 +2,26 @@ import json import os import sqlite3 -from types import SimpleNamespace -from typing import List +from typing import List, NamedTuple, Optional from .settings import LNBITS_PATH +class Extension(NamedTuple): + code: str + is_valid: bool + name: Optional[str] = None + short_description: Optional[str] = None + icon: Optional[str] = None + contributors: Optional[List[str]] = None + + class ExtensionManager: def __init__(self): self._extension_folders: List[str] = [x[1] for x in os.walk(os.path.join(LNBITS_PATH, "extensions"))][0] @property - def extensions(self) -> List[SimpleNamespace]: + def extensions(self) -> List[Extension]: output = [] for extension in self._extension_folders: @@ -25,18 +33,24 @@ class ExtensionManager: config = {} is_valid = False - output.append(SimpleNamespace(**{ - **{ - "code": extension, - "is_valid": is_valid, - "path": os.path.join(LNBITS_PATH, "extensions", extension), - }, - **config - })) + output.append(Extension(**{**{"code": extension, "is_valid": is_valid}, **config})) return output +class Status: + OK = 200 + CREATED = 201 + NO_CONTENT = 204 + BAD_REQUEST = 400 + UNAUTHORIZED = 401 + PAYMENT_REQUIRED = 402 + FORBIDDEN = 403 + NOT_FOUND = 404 + TOO_MANY_REQUESTS = 429 + METHOD_NOT_ALLOWED = 405 + + class MegaEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, sqlite3.Row): diff --git a/lnbits/settings.py b/lnbits/settings.py index 90b8cde6..8c21e1aa 100644 --- a/lnbits/settings.py +++ b/lnbits/settings.py @@ -11,5 +11,5 @@ WALLET = OpenNodeWallet(endpoint=os.getenv("OPENNODE_API_ENDPOINT"),admin_key=os LNBITS_PATH = os.path.dirname(os.path.realpath(__file__)) LNBITS_DATA_FOLDER = os.getenv("LNBITS_DATA_FOLDER", os.path.join(LNBITS_PATH, "data")) -DEFAULT_USER_WALLET_NAME = os.getenv("DEFAULT_USER_WALLET_NAME", "Bitcoin LN Wallet") +DEFAULT_USER_WALLET_NAME = os.getenv("DEFAULT_USER_WALLET_NAME", "LNbits wallet") FEE_RESERVE = float(os.getenv("FEE_RESERVE", 0)) diff --git a/lnbits/static/css/base.css b/lnbits/static/css/base.css new file mode 100644 index 00000000..dab70598 --- /dev/null +++ b/lnbits/static/css/base.css @@ -0,0 +1,33 @@ +[v-cloak] { + display: none; } + + .bg-lnbits-dark { + background-color: #1f2234; } + + body.body--dark, body.body--dark .q-drawer--dark, body.body--dark .q-menu--dark { + background: #1f2234; } + + body.body--dark .q-card--dark { + background: #333646; } + + body.body--dark .q-table--dark { + background: transparent; } + + body.body--light, body.body--light .q-drawer { + background: whitesmoke; } + + body.body--dark .q-field--error .text-negative, + body.body--dark .q-field--error .q-field__messages { + color: yellow !important; } + +.lnbits__q-table__icon-td { + padding-left: 5px !important; } + + .lnbits-drawer__q-list .q-item { + padding-top: 5px !important; + padding-bottom: 5px !important; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; } + .lnbits-drawer__q-list .q-item.q-item--active { + color: inherit; + font-weight: bold; } diff --git a/lnbits/static/note.jpg b/lnbits/static/images/note.jpg similarity index 100% rename from lnbits/static/note.jpg rename to lnbits/static/images/note.jpg diff --git a/lnbits/static/images/quick.gif b/lnbits/static/images/quick.gif new file mode 100644 index 00000000..bc91cac8 Binary files /dev/null and b/lnbits/static/images/quick.gif differ diff --git a/lnbits/static/images/stamps.jpg b/lnbits/static/images/stamps.jpg new file mode 100644 index 00000000..56adcd6a Binary files /dev/null and b/lnbits/static/images/stamps.jpg differ diff --git a/lnbits/static/images/where39.png b/lnbits/static/images/where39.png new file mode 100644 index 00000000..aed16e41 Binary files /dev/null and b/lnbits/static/images/where39.png differ diff --git a/lnbits/static/js/base.js b/lnbits/static/js/base.js new file mode 100644 index 00000000..5ed0f39f --- /dev/null +++ b/lnbits/static/js/base.js @@ -0,0 +1,146 @@ +var LOCALE = 'en' + +var LNbits = { + api: { + request: function (method, url, macaroon, data) { + return axios({ + method: method, + url: url, + headers: { + 'Grpc-Metadata-macaroon': macaroon + }, + data: data + }); + }, + createInvoice: function (wallet, amount, memo) { + return this.request('post', '/api/v1/invoices', wallet.inkey, { + amount: amount, + memo: memo + }); + }, + getInvoice: function (wallet, payhash) { + return this.request('get', '/api/v1/invoices/' + payhash, wallet.inkey); + }, + getTransactions: function (wallet) { + return this.request('get', '/api/v1/transactions', wallet.inkey); + } + }, + href: { + openWallet: function (wallet) { + window.location.href = '/wallet?usr=' + wallet.user + '&wal=' + wallet.id; + }, + createWallet: function (walletName, userId) { + window.location.href = '/wallet?' + (userId ? 'usr=' + userId + '&' : '') + 'nme=' + walletName; + }, + deleteWallet: function (walletId, userId) { + window.location.href = '/deletewallet?usr=' + userId + '&wal=' + walletId; + } + }, + map: { + extension: function (data) { + var obj = _.object(['code', 'isValid', 'name', 'shortDescription', 'icon'], data); + obj.url = ['/', obj.code, '/'].join(''); + return obj; + }, + transaction: function (data) { + var obj = _.object(['payhash', 'pending', 'amount', 'fee', 'memo', 'time'], data); + obj.date = Quasar.utils.date.formatDate(new Date(obj.time * 1000), 'YYYY-MM-DD HH:mm') + obj.msat = obj.amount; + obj.sat = obj.msat / 1000; + obj.fsat = new Intl.NumberFormat(LOCALE).format(obj.sat); + return obj; + }, + user: function (data) { + var obj = _.object(['id', 'email', 'extensions', 'wallets'], data); + var mapWallet = this.wallet; + obj.wallets = obj.wallets.map(function (obj) { + return mapWallet(obj); + }).sort(function (a, b) { + return a.name > b.name; + }); + return obj; + }, + wallet: function (data) { + var obj = _.object(['id', 'name', 'user', 'adminkey', 'inkey', 'balance'], data); + obj.sat = Math.round(obj.balance); + obj.fsat = new Intl.NumberFormat(LOCALE).format(obj.sat); + obj.url = ['/wallet?usr=', obj.user, '&wal=', obj.id].join(''); + return obj; + } + }, + utils: { + formatSat: function (value) { + return new Intl.NumberFormat(LOCALE).format(value); + }, + notifyApiError: function (error) { + var types = { + 400: 'warning', + 401: 'warning', + 500: 'negative' + } + Quasar.plugins.Notify.create({ + progress: true, + timeout: 3000, + type: types[error.response.status] || 'warning', + message: error.response.data.message || null, + caption: [error.response.status, ' ', error.response.statusText].join('') || null, + icon: null + }); + } + } +}; + +var windowMixin = { + data: function () { + return { + w: { + visibleDrawer: false, + extensions: [], + user: null, + wallet: null, + transactions: [], + } + }; + }, + methods: { + toggleDarkMode: function () { + this.$q.dark.toggle(); + this.$q.localStorage.set('lnbits.darkMode', this.$q.dark.isActive); + }, + copyText: function (text, message) { + var notify = this.$q.notify; + Quasar.utils.copyToClipboard(text).then(function () { + notify({message: 'Copied to clipboard!'}); + }); + } + }, + created: function () { + this.$q.dark.set(this.$q.localStorage.getItem('lnbits.darkMode')); + if (window.user) { + this.w.user = Object.freeze(LNbits.map.user(window.user)); + } + if (window.wallet) { + this.w.wallet = Object.freeze(LNbits.map.wallet(window.wallet)); + } + if (window.transactions) { + this.w.transactions = window.transactions.map(function (data) { + return LNbits.map.transaction(data); + }); + } + if (window.extensions) { + var user = this.w.user; + this.w.extensions = Object.freeze(window.extensions.map(function (data) { + return LNbits.map.extension(data); + }).map(function (obj) { + if (user) { + obj.isEnabled = user.extensions.indexOf(obj.code) != -1; + } else { + obj.isEnabled = false; + } + return obj; + }).sort(function (a, b) { + return a.name > b.name; + })); + } + } +}; diff --git a/lnbits/static/js/components.js b/lnbits/static/js/components.js new file mode 100644 index 00000000..615ee68b --- /dev/null +++ b/lnbits/static/js/components.js @@ -0,0 +1,122 @@ +Vue.component('lnbits-wallet-list', { + data: function () { + return { + user: null, + activeWallet: null, + showForm: false, + walletName: '' + } + }, + template: ` + + Wallets + + + + + + + + {{ wallet.name }} + {{ wallet.fsat }} sat + + + + + + + + + + + Add a wallet + + + + + + + + + + + + + `, + methods: { + createWallet: function () { + LNbits.href.createWallet(this.walletName, this.user.id); + } + }, + created: function () { + if (window.user) { + this.user = LNbits.map.user(window.user); + } + if (window.wallet) { + this.activeWallet = LNbits.map.wallet(window.wallet); + } + } +}); + +Vue.component('lnbits-extension-list', { + data: function () { + return { + extensions: [], + user: null + } + }, + template: ` + + Extensions + + + + + + + + {{ extension.name }} + + + + + + + + Manage extensions + + + + `, + computed: { + userExtensions: function () { + if (!this.user) return []; + var userExtensions = this.user.extensions; + return this.extensions.filter(function (obj) { + return userExtensions.indexOf(obj.code) !== -1; + }); + } + }, + created: function () { + this.extensions = window.extensions.map(function (data) { + return LNbits.map.extension(data); + }).sort(function (a, b) { + return a.name > b.name; + }); + if (window.user) { + this.user = LNbits.map.user(window.user); + } + } +}); diff --git a/lnbits/static/noted.jpg b/lnbits/static/noted.jpg deleted file mode 100644 index ea80f1ae..00000000 Binary files a/lnbits/static/noted.jpg and /dev/null differ diff --git a/lnbits/static/quick.gif b/lnbits/static/quick.gif deleted file mode 100644 index 969d98b1..00000000 Binary files a/lnbits/static/quick.gif and /dev/null differ diff --git a/lnbits/static/scss/base.scss b/lnbits/static/scss/base.scss new file mode 100644 index 00000000..0cd89ce0 --- /dev/null +++ b/lnbits/static/scss/base.scss @@ -0,0 +1,53 @@ +$dark-background: #1f2234; +$dark-card-background: #333646; + + +[v-cloak] { + display: none; +} + +.bg-lnbits-dark { + background-color: $dark-background; +} + +body.body--dark, +body.body--dark .q-drawer--dark, +body.body--dark .q-menu--dark { + background: $dark-background; +} + +body.body--dark .q-card--dark { + background: $dark-card-background; +} + +body.body--dark .q-table--dark { + background: transparent; +} + +body.body--light, +body.body--light .q-drawer { + background: whitesmoke; +} + +body.body--dark .q-field--error { + .text-negative, + .q-field__messages { + color: yellow !important; + } +} + +.lnbits__q-table__icon-td { + padding-left: 5px !important; +} + +.lnbits-drawer__q-list .q-item { + padding-top: 5px !important; + padding-bottom: 5px !important; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + + &.q-item--active { + color: inherit; + font-weight: bold; + } +} diff --git a/lnbits/static/stamps.jpg b/lnbits/static/stamps.jpg deleted file mode 100644 index 1abb620c..00000000 Binary files a/lnbits/static/stamps.jpg and /dev/null differ diff --git a/lnbits/static/vendor/axios@0.19.2/axios.min.js b/lnbits/static/vendor/axios@0.19.2/axios.min.js new file mode 100644 index 00000000..4fcbfe91 --- /dev/null +++ b/lnbits/static/vendor/axios@0.19.2/axios.min.js @@ -0,0 +1,2 @@ +/* axios v0.19.2 | (c) 2020 by Matt Zabriskie */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new s(e),n=i(s.prototype.request,t);return o.extend(n,s.prototype,t),o.extend(n,t),n}var o=n(2),i=n(3),s=n(4),a=n(22),u=n(10),c=r(u);c.Axios=s,c.create=function(e){return r(a(c.defaults,e))},c.Cancel=n(23),c.CancelToken=n(24),c.isCancel=n(9),c.all=function(e){return Promise.all(e)},c.spread=n(25),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";function r(e){return"[object Array]"===j.call(e)}function o(e){return"undefined"==typeof e}function i(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function s(e){return"[object ArrayBuffer]"===j.call(e)}function a(e){return"undefined"!=typeof FormData&&e instanceof FormData}function u(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function c(e){return"string"==typeof e}function f(e){return"number"==typeof e}function p(e){return null!==e&&"object"==typeof e}function d(e){return"[object Date]"===j.call(e)}function l(e){return"[object File]"===j.call(e)}function h(e){return"[object Blob]"===j.call(e)}function m(e){return"[object Function]"===j.call(e)}function y(e){return p(e)&&m(e.pipe)}function g(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function v(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function x(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function w(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){u.headers[e]={}}),i.forEach(["post","put","patch"],function(e){u.headers[e]=i.merge(a)}),e.exports=u},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(13),i=n(5),s=n(16),a=n(19),u=n(20),c=n(14);e.exports=function(e){return new Promise(function(t,f){var p=e.data,d=e.headers;r.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password||"";d.Authorization="Basic "+btoa(h+":"+m)}var y=s(e.baseURL,e.url);if(l.open(e.method.toUpperCase(),i(y,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?a(l.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?l.response:l.responseText,i={data:r,status:l.status,statusText:l.statusText,headers:n,config:e,request:l};o(t,f,i),l=null}},l.onabort=function(){l&&(f(c("Request aborted",e,"ECONNABORTED",l)),l=null)},l.onerror=function(){f(c("Network Error",e,null,l)),l=null},l.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),f(c(t,e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var g=n(21),v=(e.withCredentials||u(y))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;v&&(d[e.xsrfHeaderName]=v)}if("setRequestHeader"in l&&r.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),f(e),l=null)}),void 0===p&&(p=null),l.send(p)})}},function(e,t,n){"use strict";var r=n(14);e.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";var r=n(15);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(17),o=n(18);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?s[t]=(s[t]?s[t]:[]).concat([n]):s[t]=s[t]?s[t]+", "+n:n}}),s):s}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(i)&&a.push("domain="+i),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){t=t||{};var n={},o=["url","method","params","data"],i=["headers","auth","proxy"],s=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(o,function(e){"undefined"!=typeof t[e]&&(n[e]=t[e])}),r.forEach(i,function(o){r.isObject(t[o])?n[o]=r.deepMerge(e[o],t[o]):"undefined"!=typeof t[o]?n[o]=t[o]:r.isObject(e[o])?n[o]=r.deepMerge(e[o]):"undefined"!=typeof e[o]&&(n[o]=e[o])}),r.forEach(s,function(r){"undefined"!=typeof t[r]?n[r]=t[r]:"undefined"!=typeof e[r]&&(n[r]=e[r])});var a=o.concat(i).concat(s),u=Object.keys(t).filter(function(e){return a.indexOf(e)===-1});return r.forEach(u,function(r){"undefined"!=typeof t[r]?n[r]=t[r]:"undefined"!=typeof e[r]&&(n[r]=e[r])}),n}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])}); diff --git a/lnbits/static/vendor/bolt11/decoder.js b/lnbits/static/vendor/bolt11/decoder.js new file mode 100644 index 00000000..88701ec2 --- /dev/null +++ b/lnbits/static/vendor/bolt11/decoder.js @@ -0,0 +1,236 @@ +//TODO - A reader MUST check that the signature is valid (see the n tagged field) +//TODO - Tagged part of type f: the fallback on-chain address should be decoded into an address format +//TODO - A reader MUST check that the SHA-2 256 in the h field exactly matches the hashed description. +//TODO - A reader MUST use the n field to validate the signature instead of performing signature recovery if a valid n field is provided. + +function decode(paymentRequest) { + let input = paymentRequest.toLowerCase(); + let splitPosition = input.lastIndexOf('1'); + let humanReadablePart = input.substring(0, splitPosition); + let data = input.substring(splitPosition + 1, input.length - 6); + let checksum = input.substring(input.length - 6, input.length); + if (!verify_checksum(humanReadablePart, bech32ToFiveBitArray(data + checksum))) { + throw 'Malformed request: checksum is incorrect'; // A reader MUST fail if the checksum is incorrect. + } + return { + 'human_readable_part': decodeHumanReadablePart(humanReadablePart), + 'data': decodeData(data, humanReadablePart), + 'checksum': checksum + } +} + +function decodeHumanReadablePart(humanReadablePart) { + let prefixes = ['lnbc', 'lntb', 'lnbcrt', 'lnsb']; + let prefix; + prefixes.forEach(value => { + if (humanReadablePart.substring(0, value.length) === value) { + prefix = value; + } + }); + if (prefix == null) throw 'Malformed request: unknown prefix'; // A reader MUST fail if it does not understand the prefix. + let amount = decodeAmount(humanReadablePart.substring(prefix.length, humanReadablePart.length)); + return { + 'prefix': prefix, + 'amount': amount + } +} + +function decodeData(data, humanReadablePart) { + let date32 = data.substring(0, 7); + let dateEpoch = bech32ToInt(date32); + let signature = data.substring(data.length - 104, data.length); + let tagData = data.substring(7, data.length - 104); + let decodedTags = decodeTags(tagData); + let value = bech32ToFiveBitArray(date32 + tagData); + value = fiveBitArrayTo8BitArray(value, true); + value = textToHexString(humanReadablePart).concat(byteArrayToHexString(value)); + return { + 'time_stamp': dateEpoch, + 'tags': decodedTags, + 'signature': decodeSignature(signature), + 'signing_data': value + } +} + +function decodeSignature(signature) { + let data = fiveBitArrayTo8BitArray(bech32ToFiveBitArray(signature)); + let recoveryFlag = data[data.length - 1]; + let r = byteArrayToHexString(data.slice(0, 32)); + let s = byteArrayToHexString(data.slice(32, data.length - 1)); + return { + 'r': r, + 's': s, + 'recovery_flag': recoveryFlag + } +} + +function decodeAmount(str) { + let multiplier = str.charAt(str.length - 1); + let amount = str.substring(0, str.length - 1); + if (amount.substring(0, 1) === '0') { + throw 'Malformed request: amount cannot contain leading zeros'; + } + amount = Number(amount); + if (amount < 0 || !Number.isInteger(amount)) { + throw 'Malformed request: amount must be a positive decimal integer'; // A reader SHOULD fail if amount contains a non-digit + } + + switch (multiplier) { + case '': + return 'Any amount'; // A reader SHOULD indicate if amount is unspecified + case 'p': + return amount / 10; + case 'n': + return amount * 100; + case 'u': + return amount * 100000; + case 'm': + return amount * 100000000; + default: + // A reader SHOULD fail if amount is followed by anything except a defined multiplier. + throw 'Malformed request: undefined amount multiplier'; + } +} + +function decodeTags(tagData) { + let tags = extractTags(tagData); + let decodedTags = []; + tags.forEach(value => decodedTags.push(decodeTag(value.type, value.length, value.data))); + return decodedTags; +} + +function extractTags(str) { + let tags = []; + while (str.length > 0) { + let type = str.charAt(0); + let dataLength = bech32ToInt(str.substring(1, 3)); + let data = str.substring(3, dataLength + 3); + tags.push({ + 'type': type, + 'length': dataLength, + 'data': data + }); + str = str.substring(3 + dataLength, str.length); + } + return tags; +} + +function decodeTag(type, length, data) { + switch (type) { + case 'p': + if (length !== 52) break; // A reader MUST skip over a 'p' field that does not have data_length 52 + return { + 'type': type, + 'length': length, + 'description': 'payment_hash', + 'value': byteArrayToHexString(fiveBitArrayTo8BitArray(bech32ToFiveBitArray(data))) + }; + case 'd': + return { + 'type': type, + 'length': length, + 'description': 'description', + 'value': bech32ToUTF8String(data) + }; + case 'n': + if (length !== 53) break; // A reader MUST skip over a 'n' field that does not have data_length 53 + return { + 'type': type, + 'length': length, + 'description': 'payee_public_key', + 'value': byteArrayToHexString(fiveBitArrayTo8BitArray(bech32ToFiveBitArray(data))) + }; + case 'h': + if (length !== 52) break; // A reader MUST skip over a 'h' field that does not have data_length 52 + return { + 'type': type, + 'length': length, + 'description': 'description_hash', + 'value': data + }; + case 'x': + return { + 'type': type, + 'length': length, + 'description': 'expiry', + 'value': bech32ToInt(data) + }; + case 'c': + return { + 'type': type, + 'length': length, + 'description': 'min_final_cltv_expiry', + 'value': bech32ToInt(data) + }; + case 'f': + let version = bech32ToFiveBitArray(data.charAt(0))[0]; + if (version < 0 || version > 18) break; // a reader MUST skip over an f field with unknown version. + data = data.substring(1, data.length); + return { + 'type': type, + 'length': length, + 'description': 'fallback_address', + 'value': { + 'version': version, + 'fallback_address': data + } + }; + case 'r': + data = fiveBitArrayTo8BitArray(bech32ToFiveBitArray(data)); + let pubkey = data.slice(0, 33); + let shortChannelId = data.slice(33, 41); + let feeBaseMsat = data.slice(41, 45); + let feeProportionalMillionths = data.slice(45, 49); + let cltvExpiryDelta = data.slice(49, 51); + return { + 'type': type, + 'length': length, + 'description': 'routing_information', + 'value': { + 'public_key': byteArrayToHexString(pubkey), + 'short_channel_id': byteArrayToHexString(shortChannelId), + 'fee_base_msat': byteArrayToInt(feeBaseMsat), + 'fee_proportional_millionths': byteArrayToInt(feeProportionalMillionths), + 'cltv_expiry_delta': byteArrayToInt(cltvExpiryDelta) + } + }; + default: + // reader MUST skip over unknown fields + } +} + +function polymod(values) { + let GEN = [0x3b6a57b2, 0x26508e6d, 0x1ea119fa, 0x3d4233dd, 0x2a1462b3]; + let chk = 1; + values.forEach((value) => { + let b = (chk >> 25); + chk = (chk & 0x1ffffff) << 5 ^ value; + for (let i = 0; i < 5; i++) { + if (((b >> i) & 1) === 1) { + chk ^= GEN[i]; + } else { + chk ^= 0; + } + } + }); + return chk; +} + +function expand(str) { + let array = []; + for (let i = 0; i < str.length; i++) { + array.push(str.charCodeAt(i) >> 5); + } + array.push(0); + for (let i = 0; i < str.length; i++) { + array.push(str.charCodeAt(i) & 31); + } + return array; +} + +function verify_checksum(hrp, data) { + hrp = expand(hrp); + let all = hrp.concat(data); + let bool = polymod(all); + return bool === 1; +} \ No newline at end of file diff --git a/lnbits/static/vendor/bolt11/utils.js b/lnbits/static/vendor/bolt11/utils.js new file mode 100644 index 00000000..f2b75bc7 --- /dev/null +++ b/lnbits/static/vendor/bolt11/utils.js @@ -0,0 +1,96 @@ +const bech32CharValues = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l'; + +function byteArrayToInt(byteArray) { + let value = 0; + for (let i = 0; i < byteArray.length; ++i) { + value = (value << 8) + byteArray[i]; + } + return value; +} + +function bech32ToInt(str) { + let sum = 0; + for (let i = 0; i < str.length; i++) { + sum = sum * 32; + sum = sum + bech32CharValues.indexOf(str.charAt(i)); + } + return sum; +} + +function bech32ToFiveBitArray(str) { + let array = []; + for (let i = 0; i < str.length; i++) { + array.push(bech32CharValues.indexOf(str.charAt(i))); + } + return array; +} + +function fiveBitArrayTo8BitArray(int5Array, includeOverflow) { + let count = 0; + let buffer = 0; + let byteArray = []; + int5Array.forEach((value) => { + buffer = (buffer << 5) + value; + count += 5; + if (count >= 8) { + byteArray.push(buffer >> (count - 8) & 255); + count -= 8; + } + }); + if (includeOverflow && count > 0) { + byteArray.push(buffer << (8 - count) & 255); + } + return byteArray; +} + +function bech32ToUTF8String(str) { + let int5Array = bech32ToFiveBitArray(str); + let byteArray = fiveBitArrayTo8BitArray(int5Array); + + let utf8String = ''; + for (let i = 0; i < byteArray.length; i++) { + utf8String += '%' + ('0' + byteArray[i].toString(16)).slice(-2); + } + return decodeURIComponent(utf8String); +} + +function byteArrayToHexString(byteArray) { + return Array.prototype.map.call(byteArray, function (byte) { + return ('0' + (byte & 0xFF).toString(16)).slice(-2); + }).join(''); +} + +function textToHexString(text) { + let hexString = ''; + for (let i = 0; i < text.length; i++) { + hexString += text.charCodeAt(i).toString(16); + } + return hexString; +} + +function epochToDate(int) { + let date = new Date(int * 1000); + return date.toUTCString(); +} + +function isEmptyOrSpaces(str){ + return str === null || str.match(/^ *$/) !== null; +} + +function toFixed(x) { + if (Math.abs(x) < 1.0) { + var e = parseInt(x.toString().split('e-')[1]); + if (e) { + x *= Math.pow(10,e-1); + x = '0.' + (new Array(e)).join('0') + x.toString().substring(2); + } + } else { + var e = parseInt(x.toString().split('+')[1]); + if (e > 20) { + e -= 20; + x /= Math.pow(10,e); + x += (new Array(e+1)).join('0'); + } + } + return x; +} \ No newline at end of file diff --git a/lnbits/static/vendor/chart.js@2.9.3/chart.min.css b/lnbits/static/vendor/chart.js@2.9.3/chart.min.css new file mode 100644 index 00000000..9dc5ac2e --- /dev/null +++ b/lnbits/static/vendor/chart.js@2.9.3/chart.min.css @@ -0,0 +1 @@ +@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0} \ No newline at end of file diff --git a/lnbits/static/vendor/chart.js@2.9.3/chart.min.js b/lnbits/static/vendor/chart.js@2.9.3/chart.min.js new file mode 100644 index 00000000..7c16b0d1 --- /dev/null +++ b/lnbits/static/vendor/chart.js@2.9.3/chart.min.js @@ -0,0 +1,7 @@ +/*! + * Chart.js v2.9.3 + * https://www.chartjs.org + * (c) 2019 Chart.js Contributors + * Released under the MIT License + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],(function(t){return e(function(){try{return t("moment")}catch(t){}}())})):(t=t||self).Chart=e(t.moment)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[e[i]]=i);var a=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var r in a)if(a.hasOwnProperty(r)){if(!("channels"in a[r]))throw new Error("missing channels property: "+r);if(!("labels"in a[r]))throw new Error("missing channel labels property: "+r);if(a[r].labels.length!==a[r].channels)throw new Error("channel and label counts mismatch: "+r);var o=a[r].channels,s=a[r].labels;delete a[r].channels,delete a[r].labels,Object.defineProperty(a[r],"channels",{value:o}),Object.defineProperty(a[r],"labels",{value:s})}a.rgb.hsl=function(t){var e,n,i=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return s===o?e=0:i===s?e=(a-r)/l:a===s?e=2+(r-i)/l:r===s&&(e=4+(i-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},a.rgb.hsv=function(t){var e,n,i,a,r,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),d=u-Math.min(o,s,l),h=function(t){return(u-t)/6/d+.5};return 0===d?a=r=0:(r=d/u,e=h(o),n=h(s),i=h(l),o===u?a=i-n:s===u?a=1/3+e-i:l===u&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*r,100*u]},a.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[a.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(n,i))),100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-a)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},a.rgb.keyword=function(t){var i=n[t];if(i)return i;var a,r,o,s=1/0;for(var l in e)if(e.hasOwnProperty(l)){var u=e[l],d=(r=t,o=u,Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)+Math.pow(r[2]-o[2],2));d.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.hsl.rgb=function(t){var e,n,i,a,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[r=255*l,r,r];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,r=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*r;return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,a=n,r=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,a*=r<=1?r:2-r,[e,100*(0===i?2*a/(r+a):2*n/(i+n)),100*((i+n)/2)]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*r),l=255*i*(1-n*(1-r));switch(i*=255,a){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},a.hsv.hsl=function(t){var e,n,i,a=t[0],r=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return i=(2-r)*o,n=r*s,[a,100*(n=(n/=(e=(2-r)*s)<=1?e:2-e)||0),100*(i/=2)]},a.hwb.rgb=function(t){var e,n,i,a,r,o,s,l=t[0]/360,u=t[1]/100,d=t[2]/100,h=u+d;switch(h>1&&(u/=h,d/=h),i=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(i=1-i),a=u+i*((n=1-d)-u),e){default:case 6:case 0:r=n,o=a,s=u;break;case 1:r=a,o=n,s=u;break;case 2:r=u,o=n,s=a;break;case 3:r=u,o=a,s=n;break;case 4:r=a,o=u,s=n;break;case 5:r=n,o=u,s=a}return[255*r,255*o,255*s]},a.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a))]},a.xyz.rgb=function(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.lab.xyz=function(t){var e,n,i,a=t[0];e=t[1]/500+(n=(a+16)/116),i=n-t[2]/200;var r=Math.pow(n,3),o=Math.pow(e,3),s=Math.pow(i,3);return n=r>.008856?r:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,i=s>.008856?s:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},a.lab.lch=function(t){var e,n=t[0],i=t[1],a=t[2];return(e=360*Math.atan2(a,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+a*a),e]},a.lch.lab=function(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},a.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},a.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},a.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255,r=Math.max(Math.max(n,i),a),o=Math.min(Math.min(n,i),a),s=r-o;return e=s<=0?0:r===n?(i-a)/s%6:r===i?2+(a-n)/s:4+(n-i)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,a=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(a=(n-.5*i)/(1-i)),[t[0],100*i,100*a]},a.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0===n)return[255*i,255*i,255*i];var a,r=[0,0,0],o=e%1*6,s=o%1,l=1-s;switch(Math.floor(o)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=l,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=l,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=l}return a=(1-n)*i,[255*(n*r[0]+a),255*(n*r[1]+a),255*(n*r[2]+a)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return n>0&&(i=e/n),[t[0],100*i,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},a.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},a.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;function i(t){var e=function(){for(var t={},e=Object.keys(n),i=e.length,a=0;a1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var i=n.length,a=0;a1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(i)}))}));var s=o,l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u={getRgba:d,getHsla:h,getRgb:function(t){var e=d(t);return e&&e.slice(0,3)},getHsl:function(t){var e=h(t);return e&&e.slice(0,3)},getHwb:c,getAlpha:function(t){var e=d(t);if(e)return e[3];if(e=h(t))return e[3];if(e=c(t))return e[3]},hexString:function(t,e){e=void 0!==e&&3===t.length?e:t[3];return"#"+v(t[0])+v(t[1])+v(t[2])+(e>=0&&e<1?v(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return f(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:f,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return g(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+a+"%)"},percentaString:g,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:p,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return b[t.slice(0,3)]}};function d(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(i){a=(i=i[1])[3];for(var r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=t,i=void 0===e?.5:e,a=2*i-1,r=this.alpha()-n.alpha(),o=((a*r==-1?a:(a+r)/(1+a*r))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new y,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],"[object Array]"===(e={}.toString.call(t))?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},y.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i=0;a--)e.call(n,t[a],a);else for(a=0;a=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-S.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*S.easeInBounce(2*t):.5*S.easeOutBounce(2*t-1)+.5}},C={effects:S};M.easingEffects=S;var P=Math.PI,A=P/180,D=2*P,T=P/2,I=P/4,F=2*P/3,L={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){if(r){var o=Math.min(r,a/2,i/2),s=e+o,l=n+o,u=e+i-o,d=n+a-o;t.moveTo(e,l),se.left-1e-6&&t.xe.top-1e-6&&t.y0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,i,a=this.animations,r=0;r=n?(V.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},J=V.options.resolve,Q=["push","pop","shift","splice","unshift"];function tt(t,e){var n=t._chartjs;if(n){var i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(Q.forEach((function(e){delete t[e]})),delete t._chartjs)}}var et=function(t,e){this.initialize(t,e)};V.extend(et.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,i=this.getDataset(),a=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!i.xAxisID||(t.xAxisID=i.xAxisID||a.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!i.yAxisID||(t.yAxisID=i.yAxisID||a.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&tt(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),i=this.getDataset().data||[],a=n.data;for(t=0,e=i.length;tn&&this.insertElements(n,i-n)},insertElements:function(t,e){for(var n=0;na?(r=a/e.innerRadius,t.arc(o,s,e.innerRadius-a,i+r,n-r,!0)):t.arc(o,s,a,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function rt(t,e,n){var i="inner"===e.borderAlign;i?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,i){var a,r=n.endAngle;for(i&&(n.endAngle=n.startAngle+it,at(t,n),n.endAngle=r,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=it,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+it,n.startAngle,!0),a=0;as;)a-=it;for(;a=o&&a<=s,u=r>=n.innerRadius&&r<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/it)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+it,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),t=0;tt.x&&(e=vt(e,"left","right")):t.basen?n:i,r:l.right||a<0?0:a>e?e:a,b:l.bottom||r<0?0:r>n?n:r,l:l.left||o<0?0:o>e?e:o}}function xt(t,e,n){var i=null===e,a=null===n,r=!(!t||i&&a)&&mt(t);return r&&(i||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}z._set("global",{elements:{rectangle:{backgroundColor:gt,borderColor:gt,borderSkipped:"bottom",borderWidth:0}}});var yt=X.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=mt(t),n=e.right-e.left,i=e.bottom-e.top,a=bt(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b}}}(e),i=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===a.w&&i.h===a.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return xt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return pt(n)?xt(n,t,null):xt(n,null,e)},inXRange:function(t){return xt(this._view,t,null)},inYRange:function(t){return xt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return pt(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return pt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),_t={},kt=ot,wt=ut,Mt=ft,St=yt;_t.Arc=kt,_t.Line=wt,_t.Point=Mt,_t.Rectangle=St;var Ct=V._deprecated,Pt=V.valueOrDefault;function At(t,e,n){var i,a,r=n.barThickness,o=e.stackCount,s=e.pixels[t],l=V.isNullOrUndef(r)?function(t,e){var n,i,a,r,o=t._length;for(a=1,r=e.length;a0?Math.min(o,Math.abs(i-n)):o,n=i;return o}(e.scale,e.pixels):-1;return V.isNullOrUndef(r)?(i=l*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:s-i/2}}z._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),z._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Dt=nt.extend({dataElementType:_t.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;nt.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Ct("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Ct("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Ct("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Ct("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Ct("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,i=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=i.length;e=0&&p.min>=0?p.min:p.max,y=void 0===p.start?p.end:p.max>=0&&p.min>=0?p.max-p.min:p.min-p.max,_=g.length;if(v||void 0===v&&void 0!==b)for(i=0;i<_&&(a=g[i]).index!==t;++i)a.stack===b&&(r=void 0===(u=h._parseValue(f[a.index].data[e])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(p.min<0&&r<0||p.max>=0&&r>0)&&(x+=r));return o=h.getPixelForValue(x),l=(s=h.getPixelForValue(x+y))-o,void 0!==m&&Math.abs(l)=0&&!c||y<0&&c?o-m:o+m),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,i){var a="flex"===i.barThickness?function(t,e,n){var i,a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t=Ot?-Rt:b<-Ot?Rt:0)+m,y=Math.cos(b),_=Math.sin(b),k=Math.cos(x),w=Math.sin(x),M=b<=0&&x>=0||x>=Rt,S=b<=zt&&x>=zt||x>=Rt+zt,C=b<=-zt&&x>=-zt||x>=Ot+zt,P=b===-Ot||x>=Ot?-1:Math.min(y,y*p,k,k*p),A=C?-1:Math.min(_,_*p,w,w*p),D=M?1:Math.max(y,y*p,k,k*p),T=S?1:Math.max(_,_*p,w,w*p);u=(D-P)/2,d=(T-A)/2,h=-(D+P)/2,c=-(T+A)/2}for(i=0,a=g.length;i0&&!isNaN(t)?Rt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,o,s,l,u=0,d=this.chart;if(!t)for(e=0,n=d.data.datasets.length;e(u=s>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Lt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Lt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Lt(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n0&&Vt(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return ie(t,e,{intersect:!1})},point:function(t,e){return te(t,Jt(e,t))},nearest:function(t,e,n){var i=Jt(e,t);n.axis=n.axis||"xy";var a=ne(n.axis);return ee(t,i,n.intersect,a)},x:function(t,e,n){var i=Jt(e,t),a=[],r=!1;return Qt(t,(function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var i=Jt(e,t),a=[],r=!1;return Qt(t,(function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}},re=V.extend;function oe(t,e){return V.where(t,(function(t){return t.pos===e}))}function se(t,e){return t.sort((function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight}))}function le(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function ue(t,e,n){var i,a,r=n.box,o=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,t[n.pos]+=n.size,r.getPadding){var s=r.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(i=e.outerWidth-le(o,t,"left","right"),a=e.outerHeight-le(o,t,"top","bottom"),i!==t.w||a!==t.h)return t.w=i,t.h=a,n.horizontal?i!==t.w:a!==t.h}function de(t,e){var n=e.maxPadding;function i(t){var i={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function he(t,e,n){var i,a,r,o,s,l,u=[];for(i=0,a=t.length;idiv{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&fe.default||fe,me="$chartjs",ve="chartjs-size-monitor",be="chartjs-render-monitor",xe="chartjs-render-animation",ye=["animationstart","webkitAnimationStart"],_e={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ke(t,e){var n=V.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var we=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Me(t,e,n){t.addEventListener(e,n,we)}function Se(t,e,n){t.removeEventListener(e,n,we)}function Ce(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Pe(t){var e=document.createElement("div");return e.className=t||"",e}function Ae(t,e,n){var i,a,r,o,s=t[me]||(t[me]={}),l=s.resizer=function(t){var e=Pe(ve),n=Pe(ve+"-expand"),i=Pe(ve+"-shrink");n.appendChild(Pe()),i.appendChild(Pe()),e.appendChild(n),e.appendChild(i),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6};var a=function(){e._reset(),t()};return Me(n,"scroll",a.bind(n,"expand")),Me(i,"scroll",a.bind(i,"shrink")),e}((i=function(){if(s.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,a=i?i.clientWidth:0;e(Ce("resize",n)),i&&i.clientWidth0){var r=t[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index-1?t.split("\n"):t}function We(t){var e=z.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Re(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Re(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Re(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Re(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Re(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Re(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Re(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Re(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Re(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Ve(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function He(t){return Be([],Ee(t))}var je=X.extend({initialize:function(){this._model=We(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,i=n.beforeTitle.apply(t,arguments),a=n.title.apply(t,arguments),r=n.afterTitle.apply(t,arguments),o=[];return o=Be(o,Ee(i)),o=Be(o,Ee(a)),o=Be(o,Ee(r))},getBeforeBody:function(){return He(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,a=[];return V.each(t,(function(t){var r={before:[],lines:[],after:[]};Be(r.before,Ee(i.beforeLabel.call(n,t,e))),Be(r.lines,i.label.call(n,t,e)),Be(r.after,Ee(i.afterLabel.call(n,t,e))),a.push(r)})),a},getAfterBody:function(){return He(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),i=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=Be(r,Ee(n)),r=Be(r,Ee(i)),r=Be(r,Ee(a))},update:function(t){var e,n,i,a,r,o,s,l,u,d,h=this,c=h._options,f=h._model,g=h._model=We(c),p=h._active,m=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},x={width:f.width,height:f.height},y={x:f.caretX,y:f.caretY};if(p.length){g.opacity=1;var _=[],k=[];y=Ne[c.position].call(h,p,h._eventPosition);var w=[];for(e=0,n=p.length;ei.width&&(a=i.width-e.width),a<0&&(a=0)),"top"===d?r+=h:r-="bottom"===d?e.height+h:e.height/2,"center"===d?"left"===u?a+=h:"right"===u&&(a-=h):"left"===u?a-=c:"right"===u&&(a+=c),{x:a,y:r}}(g,x,v=function(t,e){var n,i,a,r,o,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",h="center";s.yl.height-e.height&&(h="bottom");var c=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(n=function(t){return t<=c},i=function(t){return t>c}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",a(s.x)&&(d="center",h=o(s.y))):i(s.x)&&(d="right",r(s.x)&&(d="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:h}}(this,x),h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=b.x,g.y=b.y,g.width=x.width,g.height=x.height,g.caretX=y.x,g.caretY=y.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===c)s=g+m/2,"left"===h?(a=(i=f)-u,r=i,o=s+u,l=s-u):(a=(i=f+p)+u,r=i,o=s-u,l=s+u);else if("left"===h?(i=(a=f+d+u)-u,r=a+u):"right"===h?(i=(a=f+p-d-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+m)+u,l=o;var v=r;r=i,i=v}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i,a,r,o=e.title,s=o.length;if(s){var l=ze(e.rtl,e.x,e.width);for(t.x=Ve(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=V.fontString(i,e._titleFontStyle,e._titleFontFamily),r=0;r0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&r&&(t.save(),t.globalAlpha=a,this.drawBackground(i,e,t,n),i.y+=e.yPadding,V.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),V.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),i.reverse&&n._active.reverse()),(e=!V.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),qe=Ne,Ue=je;Ue.positioners=qe;var Ye=V.valueOrDefault;function Ge(){return V.merge({},[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var a,r,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?V.merge(e[t][a],[Oe.getScaleDefaults(r),o]):V.merge(e[t][a],o)}else V._merger(t,e,n,i)}})}function Xe(){return V.merge({},[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||{},r=n[t];"scales"===t?e[t]=Ge(a,r):"scale"===t?e[t]=V.merge(a,[Oe.getScaleDefaults(r.type),r]):V._merger(t,e,n,i)}})}function Ke(t){var e=t.options;V.each(t.scales,(function(e){ge.removeBox(t,e)})),e=Xe(z.global,z[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Ze(t,e,n){var i,a=function(t){return t.id===i};do{i=e+n++}while(V.findIndex(t,a)>=0);return i}function $e(t){return"top"===t||"bottom"===t}function Je(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}z._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Qe=function(t,e){return this.construct(t,e),this};V.extend(Qe.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Xe(z.global,z[t.type],t.options||{}),t}(e);var i=Fe.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=V.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Qe.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Le.notify(t,"beforeInit"),V.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Le.notify(t,"afterInit"),t},clear:function(){return V.canvas.clear(this),this},stop:function(){return $.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(V.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:V.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+"px",i.style.height=o+"px",V.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};Le.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;V.each(e.xAxes,(function(t,n){t.id||(t.id=Ze(e.xAxes,"x-axis-",n))})),V.each(e.yAxes,(function(t,n){t.id||(t.id=Ze(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),V.each(i,(function(e){var i=e.options,r=i.id,o=Ye(i.type,e.dtype);$e(i.position)!==$e(e.dposition)&&(i.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===o)(s=n[r]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=Oe.getScaleConstructor(o);if(!l)return;s=new l({id:r,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),V.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Oe.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],a=n.data.datasets;for(t=0,e=a.length;t=0;--n)this.drawDataset(e[n],t);Le.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Le.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Le.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==Le.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),Le.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return ae.modes.single(this,t)},getElementsAtEvent:function(t){return ae.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return ae.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=ae.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return ae.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=V.log10(Math.abs(i)),r="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=V.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(V.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},on=V.isArray,sn=V.isNullOrUndef,ln=V.valueOrDefault,un=V.valueAtIndexOrDefault;function dn(t,e,n){var i,a=t.getTicks().length,r=Math.min(e,a-1),o=t.getPixelForTick(r),s=t._startPixel,l=t._endPixel;if(!(n&&(i=1===a?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(r-1))/2,(o+=rl+1e-6)))return o}function hn(t,e,n,i){var a,r,o,s,l,u,d,h,c,f,g,p,m,v=n.length,b=[],x=[],y=[];for(a=0;ae){for(n=0;n=c||d<=1||!s.isHorizontal()?s.labelRotation=h:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,i=Math.min(s.maxWidth,s.chart.width-e),e+6>(a=l.offset?s.maxWidth/d:i/(d-1))&&(a=i/(d-(l.offset?.5:1)),r=s.maxHeight-cn(l.gridLines)-u.padding-fn(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=V.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(r/o,1))-Math.asin(n/o))),f=Math.max(h,Math.min(c,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){V.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){V.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l="bottom"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=cn(o)+fn(r)),u?s&&(e.height=cn(o)+fn(r)):e.height=t.maxHeight,a.display&&s){var d=pn(a),h=t._getLabelSizes(),c=h.first,f=h.last,g=h.widest,p=h.highest,m=.4*d.minor.lineHeight,v=a.padding;if(u){var b=0!==t.labelRotation,x=V.toRadians(t.labelRotation),y=Math.cos(x),_=Math.sin(x),k=_*g.width+y*(p.height-(b?p.offset:0))+(b?0:m);e.height=Math.min(t.maxHeight,e.height+k+v);var w,M,S=t.getPixelForTick(0)-t.left,C=t.right-t.getPixelForTick(t.getTicks().length-1);b?(w=l?y*c.width+_*c.offset:_*(c.height-c.offset),M=l?_*(f.height-f.offset):y*f.width+_*f.offset):(w=c.width/2,M=f.width/2),t.paddingLeft=Math.max((w-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((M-C)*t.width/(t.width-C),0)+3}else{var P=a.mirror?0:g.width+v+m;e.width=Math.min(t.maxWidth,e.width+P),t.paddingTop=c.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){V.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(sn(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i,a=this;for(a.ticks=t.map((function(t){return t.value})),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,i=t.length;nn-1?null:this.getPixelForDecimal(t*i+(e?i/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,i,a,r=this.options.ticks,o=this._length,s=r.maxTicksLimit||o/this._tickSize()+1,l=r.major.enabled?function(t){var e,n,i=[];for(e=0,n=t.length;es)return function(t,e,n){var i,a,r=0,o=e[0];for(n=Math.ceil(n),i=0;iu)return r;return Math.max(u,1)}(l,t,0,s),u>0){for(e=0,n=u-1;e1?(h-d)/(u-1):null,vn(t,i,V.isNullOrUndef(a)?0:d-a,d),vn(t,i,h,V.isNullOrUndef(a)?t.length:h+a),mn(t)}return vn(t,i),mn(t)},_tickSize:function(){var t=this.options.ticks,e=V.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,o=a?a.widest.width+r:0,s=a?a.highest.height+r:0;return this.isHorizontal()?s*n>o*i?o/n:s/i:s*i=0&&(o=t),void 0!==r&&(t=n.indexOf(r))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;xn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,a,r,o=this;return yn(e)||yn(n)||(t=o.chart.data.datasets[n].data[e]),yn(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(a=o._getLabels(),t=V.valueOrDefault(i,t),e=-1!==(r=a.indexOf(t))?r:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),kn={position:"bottom"};_n._defaults=kn;var wn=V.noop,Mn=V.isNullOrUndef;var Sn=xn.extend({getRightValue:function(t){return"string"==typeof t?+t:xn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=V.sign(t.min),i=V.sign(t.max);n<0&&i<0?t.max=0:n>0&&i>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,i=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:wn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:V.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,i,a,r,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,d=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,p=V.niceNum((g-f)/u/l)*l;if(p<1e-14&&Mn(d)&&Mn(h))return[f,g];(r=Math.ceil(g/p)-Math.floor(f/p))>u&&(p=V.niceNum(r*p/u/l)*l),s||Mn(c)?n=Math.pow(10,V._decimalPlaces(p)):(n=Math.pow(10,c),p=Math.ceil(p*n)/n),i=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!Mn(d)&&V.almostWhole(d/p,p/1e3)&&(i=d),!Mn(h)&&V.almostWhole(h/p,p/1e3)&&(a=h)),r=(a-i)/p,r=V.almostEquals(r,Math.round(r),p/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,a=Math.round(a*n)/n,o.push(Mn(d)?i:d);for(var m=1;me.length-1?null:this.getPixelForValue(e[t])}}),Tn=Cn;Dn._defaults=Tn;var In=V.valueOrDefault,Fn=V.math.log10;var Ln={position:"left",ticks:{callback:rn.formatters.logarithmic}};function On(t,e){return V.isFinite(t)&&t>=0?t:e}var Rn=xn.extend({determineDataLimits:function(){var t,e,n,i,a,r,o=this,s=o.options,l=o.chart,u=l.data.datasets,d=o.isHorizontal();function h(t){return d?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var c=s.stacked;if(void 0===c)for(t=0;t0){var e=V.min(t),n=V.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}}))}else for(t=0;t0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Fn(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:On(e.min),max:On(e.max)},a=t.ticks=function(t,e){var n,i,a=[],r=In(t.min,Math.pow(10,Math.floor(Fn(e.min)))),o=Math.floor(Fn(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(Fn(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=i*Math.pow(10,n)):(n=Math.floor(Fn(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),10===++i&&(i=1,l=++n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(ne.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(Fn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;xn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=In(t.options.ticks.fontSize,z.global.defaultFontSize)/t._length),t._startValue=Fn(e),t._valueOffset=n,t._valueRange=(Fn(t.max)-Fn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(Fn(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),zn=Ln;Rn._defaults=zn;var Nn=V.valueOrDefault,Bn=V.valueAtIndexOrDefault,En=V.options.resolve,Wn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:rn.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Vn(t){var e=t.ticks;return e.display&&t.display?Nn(e.fontSize,z.global.defaultFontSize)+2*e.backdropPaddingY:0}function Hn(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:ta?{start:e-n,end:e}:{start:e,end:e+n}}function jn(t){return 0===t||180===t?"center":t<180?"left":"right"}function qn(t,e,n,i){var a,r,o=n.y+i/2;if(V.isArray(e))for(a=0,r=e.length;a270||t<90)&&(n.y-=e.h)}function Yn(t){return V.isNumber(t)?t:0}var Gn=Sn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Vn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;V.each(e.data.datasets,(function(a,r){if(e.isDatasetVisible(r)){var o=e.getDatasetMeta(r);V.each(a.data,(function(e,a){var r=+t.getRightValue(e);isNaN(r)||o.data[a].hidden||(n=Math.min(r,n),i=Math.max(r,i))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Vn(this.options))},convertTicksToLabels:function(){var t=this;Sn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=V.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,i,a=V.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,u,d=t.chart.data.labels.length;for(e=0;er.r&&(r.r=f.end,o.r=h),g.startr.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),r=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);a=Yn(a),r=Yn(r),o=Yn(o),s=Yn(s),i.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,n,i){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=n+a.drawingArea,l=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(V.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},_drawGrid:function(){var t,e,n,i=this,a=i.ctx,r=i.options,o=r.gridLines,s=r.angleLines,l=Nn(s.lineWidth,o.lineWidth),u=Nn(s.color,o.color);if(r.pointLabels.display&&function(t){var e=t.ctx,n=t.options,i=n.pointLabels,a=Vn(n),r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=V.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?a/2:0,u=t.getPointPosition(s,r+l+5),d=Bn(i.fontColor,s,z.global.defaultFontColor);e.fillStyle=d;var h=t.getIndexAngle(s),c=V.toDegrees(h);e.textAlign=jn(c),Un(c,t._pointLabelSizes[s],u),qn(e,t.pointLabels[s],u,o.lineHeight)}e.restore()}(i),o.display&&V.each(i.ticks,(function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),function(t,e,n,i){var a,r=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=Bn(e.color,i-1),u=Bn(e.lineWidth,i-1);if((o||s)&&l&&u){if(r.save(),r.strokeStyle=l,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var d=1;d=0;t--)e=i.getDistanceFromCenterForValue(r.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),a.beginPath(),a.moveTo(i.xCenter,i.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var i,a,r=t.getIndexAngle(0),o=V.options._parseFont(n),s=Nn(n.fontColor,z.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",V.each(t.ticks,(function(r,l){(0!==l||n.reverse)&&(i=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=e.measureText(r).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-i-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(r,0,-i))})),e.restore()}},_drawTitle:V.noop}),Xn=Wn;Gn._defaults=Xn;var Kn=V._deprecated,Zn=V.options.resolve,$n=V.valueOrDefault,Jn=Number.MIN_SAFE_INTEGER||-9007199254740991,Qn=Number.MAX_SAFE_INTEGER||9007199254740991,ti={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ei=Object.keys(ti);function ni(t,e){return t-e}function ii(t){return V.valueOrDefault(t.time.min,t.ticks.min)}function ai(t){return V.valueOrDefault(t.time.max,t.ticks.max)}function ri(t,e,n,i){var a=function(t,e,n){for(var i,a,r,o=0,s=t.length-1;o>=0&&o<=s;){if(a=t[(i=o+s>>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(n-r[e])/s:0,u=(o[i]-r[i])*l;return r[i]+u}function oi(t,e){var n=t._adapter,i=t.options.time,a=i.parser,r=a||i.format,o=e;return"function"==typeof a&&(o=a(o)),V.isFinite(o)||(o="string"==typeof r?n.parse(o,r):n.parse(o)),null!==o?+o:(a||"function"!=typeof r||(o=r(e),V.isFinite(o)||(o=n.parse(o))),o)}function si(t,e){if(V.isNullOrUndef(e))return null;var n=t.options.time,i=oi(t,t.getRightValue(e));return null===i?i:(n.round&&(i=+t._adapter.startOf(i,n.round)),i)}function li(t,e,n,i){var a,r,o,s=ei.length;for(a=ei.indexOf(t);a=0&&(e[r].major=!0);return e}(t,r,o,n):r}var di=xn.extend({initialize:function(){this.mergeTicksOptions(),xn.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),i=t._adapter=new an._date(e.adapters.date);return Kn("time scale",n.format,"time.format","time.parser"),Kn("time scale",n.min,"time.min","ticks.min"),Kn("time scale",n.max,"time.max","ticks.max"),V.mergeIf(n.displayFormats,i.formats()),xn.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),xn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,a,r,o,s=this,l=s.chart,u=s._adapter,d=s.options,h=d.time.unit||"day",c=Qn,f=Jn,g=[],p=[],m=[],v=s._getLabels();for(t=0,n=v.length;t1?function(t){var e,n,i,a={},r=[];for(e=0,n=t.length;e1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(a=h;a=a&&n<=r&&d.push(n);return i.min=a,i.max=r,i._unit=l.unit||(s.autoSkip?li(l.minUnit,i.min,i.max,h):function(t,e,n,i,a){var r,o;for(r=ei.length-1;r>=ei.indexOf(n);r--)if(o=ei[r],ti[o].common&&t._adapter.diff(a,i,o)>=e-1)return o;return ei[n?ei.indexOf(n):0]}(i,d.length,l.minUnit,i.min,i.max)),i._majorUnit=s.major.enabled&&"year"!==i._unit?function(t){for(var e=ei.indexOf(t)+1,n=ei.length;ee&&s=0&&t0?s:1}}),hi={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};di._defaults=hi;var ci={category:_n,linear:Dn,logarithmic:Rn,radialLinear:Gn,time:di},fi={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};an._date.override("function"==typeof t?{_id:"moment",formats:function(){return fi},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,i){return t(e).add(n,i).valueOf()},diff:function(e,n,i){return t(e).diff(t(n),i)},startOf:function(e,n,i){return e=t(e),"isoWeek"===n?e.isoWeekday(i).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),z._set("global",{plugins:{filler:{propagate:!0}}});var gi={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?function(t,e){return e=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function mi(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,i,a,r,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,u=t.fill,d=[];if(!l)return null;for(e=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,i=o.getPointPositionForValue(0,e),a=0;a0;--r)V.canvas.lineTo(t,n[r],n[r-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),r=a-1;r>0;--r)t.arc(o,s,l,n[r].angle,n[r-1].angle,!0)}}function _i(t,e,n,i,a,r){var o,s,l,u,d,h,c,f,g=e.length,p=i.spanGaps,m=[],v=[],b=0,x=0;for(t.beginPath(),o=0,s=g;o=0;--n)(e=l[n].$filler)&&e.visible&&(a=(i=e.el)._view,r=i._children||[],o=e.mapper,s=a.backgroundColor||z.global.defaultColor,o&&s&&r.length&&(V.canvas.clipArea(u,t.chartArea),_i(u,r,o,a,s,i._loop),V.canvas.unclipArea(u)))}},wi=V.rtl.getRtlAdapter,Mi=V.noop,Si=V.valueOrDefault;function Ci(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}z._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=r.length;el.width)&&(h+=o+n.padding,d[d.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:i,height:o},d[d.length-1]+=i+n.padding})),l.height+=h}else{var c=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,m=0,v=0;V.each(t.legendItems,(function(t,e){var i=Ci(n,o)+o/2+a.measureText(t.text).width;e>0&&v+o+2*c>l.height&&(p+=m+n.padding,f.push(m),g.push(v),m=0,v=0),m=Math.max(m,i),v+=o+c,s[e]={left:0,top:0,width:i,height:o}})),p+=m,f.push(m),g.push(v),l.width+=p}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:Mi,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=z.global,a=i.defaultColor,r=i.elements.line,o=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var d,h=wi(e.rtl,t.left,t.minSize.width),c=t.ctx,f=Si(n.fontColor,i.defaultFontColor),g=V.options._parseFont(n),p=g.size;c.textAlign=h.textAlign("left"),c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=g.string;var m=Ci(n,p),v=t.legendHitBoxes,b=function(t,i){switch(e.align){case"start":return n.padding;case"end":return t-i;default:return(t-i+n.padding)/2}},x=t.isHorizontal();d=x?{x:t.left+b(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(o,s[0]),line:0},V.rtl.overrideTextDirection(t.ctx,e.textDirection);var y=p+n.padding;V.each(t.legendItems,(function(e,i){var f=c.measureText(e.text).width,g=m+p/2+f,_=d.x,k=d.y;h.setWidth(t.minSize.width),x?i>0&&_+g+n.padding>t.left+t.minSize.width&&(k=d.y+=y,d.line++,_=d.x=t.left+b(l,u[d.line])):i>0&&k+y>t.top+t.minSize.height&&(_=d.x=_+t.columnWidths[d.line]+n.padding,d.line++,k=d.y=t.top+b(o,s[d.line]));var w=h.x(_);!function(t,e,i){if(!(isNaN(m)||m<=0)){c.save();var o=Si(i.lineWidth,r.borderWidth);if(c.fillStyle=Si(i.fillStyle,a),c.lineCap=Si(i.lineCap,r.borderCapStyle),c.lineDashOffset=Si(i.lineDashOffset,r.borderDashOffset),c.lineJoin=Si(i.lineJoin,r.borderJoinStyle),c.lineWidth=o,c.strokeStyle=Si(i.strokeStyle,a),c.setLineDash&&c.setLineDash(Si(i.lineDash,r.borderDash)),n&&n.usePointStyle){var s=m*Math.SQRT2/2,l=h.xPlus(t,m/2),u=e+p/2;V.canvas.drawPoint(c,i.pointStyle,s,l,u,i.rotation)}else c.fillRect(h.leftForLtr(t,m),e,m,p),0!==o&&c.strokeRect(h.leftForLtr(t,m),e,m,p);c.restore()}}(w,k,e),v[i].left=h.leftForLtr(w,v[i].width),v[i].top=k,function(t,e,n,i){var a=p/2,r=h.xPlus(t,m+a),o=e+a;c.fillText(n.text,r,o),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(r,o),c.lineTo(h.xPlus(r,i),o),c.stroke())}(w,k,e,f),x?d.x+=g+n.padding:d.y+=y})),V.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,i,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n=(i=a[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return r.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!i.onHover&&!i.onLeave)return}else{if("click"!==a)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function Ai(t,e){var n=new Pi({ctx:t.ctx,options:e,chart:t});ge.configure(t,n,e),ge.addBox(t,n),t.legend=n}var Di={id:"legend",_element:Pi,beforeInit:function(t){var e=t.options.legend;e&&Ai(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(V.mergeIf(e,z.global.legend),n?(ge.configure(t,n,e),n.options=e):Ai(t,e)):n&&(ge.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Ti=V.noop;z._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Ii=X.extend({initialize:function(t){V.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Ti,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Ti,beforeSetDimensions:Ti,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Ti,beforeBuildLabels:Ti,buildLabels:Ti,afterBuildLabels:Ti,beforeFit:Ti,fit:function(){var t,e=this,n=e.options,i=e.minSize={},a=e.isHorizontal();n.display?(t=(V.isArray(n.text)?n.text.length:1)*V.options._parseFont(n).lineHeight+2*n.padding,e.width=i.width=a?e.maxWidth:t,e.height=i.height=a?t:e.maxHeight):e.width=i.width=e.height=i.height=0},afterFit:Ti,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,a,r,o=V.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=V.valueOrDefault(n.fontColor,z.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=d+l,i=f-h):(a="left"===n.position?h+l:f-l,r=d+(c-d)/2,i=c-d,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(V.isArray(g))for(var p=0,m=0;m=0;i--){var a=t[i];if(e(a))return a}},V.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},V.almostEquals=function(t,e,n){return Math.abs(t-e)=t},V.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},V.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},V.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},V.toRadians=function(t){return t*(Math.PI/180)},V.toDegrees=function(t){return t*(180/Math.PI)},V._decimalPlaces=function(t){if(V.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},V.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},V.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},V.aliasPixel=function(t){return t%2==0?0:.5},V._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*i)/i+a},V.splineCurve=function(t,e,n,i){var a=t.skip?e:t,r=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),u=s/(s+l),d=l/(s+l),h=i*(u=isNaN(u)?0:u),c=i*(d=isNaN(d)?0:d);return{previous:{x:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+c*(o.x-a.x),y:r.y+c*(o.y-a.y)}}},V.EPSILON=Number.EPSILON||1e-14,V.splineCurveMonotone=function(t){var e,n,i,a,r,o,s,l,u,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(a=e0?d[e-1]:null,a=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},V.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},V.niceNum=function(t,e){var n=Math.floor(V.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},V.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},V.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var l=parseFloat(V.getStyle(r,"padding-left")),u=parseFloat(V.getStyle(r,"padding-top")),d=parseFloat(V.getStyle(r,"padding-right")),h=parseFloat(V.getStyle(r,"padding-bottom")),c=o.right-o.left-l-d,f=o.bottom-o.top-u-h;return{x:n=Math.round((n-o.left-l)/c*r.width/e.currentDevicePixelRatio),y:i=Math.round((i-o.top-u)/f*r.height/e.currentDevicePixelRatio)}},V.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},V.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},V._calculatePadding=function(t,e,n){return(e=V.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},V._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},V.getMaximumWidth=function(t){var e=V._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-V._calculatePadding(e,"padding-left",n)-V._calculatePadding(e,"padding-right",n),a=V.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},V.getMaximumHeight=function(t){var e=V._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-V._calculatePadding(e,"padding-top",n)-V._calculatePadding(e,"padding-bottom",n),a=V.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},V.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},V.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,r=t.width;i.height=a*n,i.width=r*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=a+"px",i.style.width=r+"px")}},V.fontString=function(t,e,n){return e+" "+t+"px "+n},V.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var o,s,l,u,d,h=0,c=n.length;for(o=0;on.length){for(o=0;oi&&(i=r),i},V.numberOfLabelLines=function(t){var e=1;return V.each(t,(function(t){V.isArray(t)&&t.length>e&&(e=t.length)})),e},V.color=k?function(t){return t instanceof CanvasGradient&&(t=z.global.defaultColor),k(t)}:function(t){return console.error("Color.js not found!"),t},V.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:V.color(t).saturate(.5).darken(.1).rgbString()}}(),tn._adapters=an,tn.Animation=Z,tn.animationService=$,tn.controllers=$t,tn.DatasetController=nt,tn.defaults=z,tn.Element=X,tn.elements=_t,tn.Interaction=ae,tn.layouts=ge,tn.platform=Fe,tn.plugins=Le,tn.Scale=xn,tn.scaleService=Oe,tn.Ticks=rn,tn.Tooltip=Ue,tn.helpers.each(ci,(function(t,e){tn.scaleService.registerScaleType(e,t,t._defaults)})),Li)Li.hasOwnProperty(Ni)&&tn.plugins.register(Li[Ni]);tn.platform.initialize();var Bi=tn;return"undefined"!=typeof window&&(window.Chart=tn),tn.Chart=tn,tn.Legend=Li.legend._element,tn.Title=Li.title._element,tn.pluginService=tn.plugins,tn.PluginBase=tn.Element.extend({}),tn.canvasHelpers=tn.helpers.canvas,tn.layoutService=tn.layouts,tn.LinearScaleBase=Sn,tn.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){tn[t]=function(e,n){return new tn(e,tn.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),Bi})); diff --git a/lnbits/static/vendor/quasar@1.9.7/quasar.ie.polyfills.umd.min.js b/lnbits/static/vendor/quasar@1.9.7/quasar.ie.polyfills.umd.min.js new file mode 100644 index 00000000..865c0753 --- /dev/null +++ b/lnbits/static/vendor/quasar@1.9.7/quasar.ie.polyfills.umd.min.js @@ -0,0 +1,6 @@ +/*! + * Quasar Framework v1.9.7 + * (c) 2015-present Razvan Stoenescu + * Released under the MIT License. + */ +!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";function t(t){return"function"==typeof t}"undefined"!=typeof window&&function(t){[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(t){t.hasOwnProperty("remove")||Object.defineProperty(t,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})});try{new MouseEvent("test")}catch(r){var e=function(e,r){r=r||{bubbles:!1,cancelable:!1};var n=document.createEvent("MouseEvent");return n.initMouseEvent(e,r.bubbles,r.cancelable,t,0,r.screenX||0,r.screenY||0,r.clientX||0,r.clientY||0,r.ctrlKey||!1,r.altKey||!1,r.shiftKey||!1,r.metaKey||!1,r.button||0,r.relatedTarget||null),n};e.prototype=Event.prototype,t.MouseEvent=e}"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){var r=arguments;if(null===t||void 0===t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),o=1;o0?0|e:0;return this.substring(r,r+t.length)===t}}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){return(void 0===e||e>this.length)&&(e=this.length),this.substring(e-t.length,e)===t}),Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),Array.prototype.includes||(Array.prototype.includes=function(t){return!!~this.indexOf(t)}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw TypeError('"this" is null or not defined');var e=Object(this),r=e.length>>>0;if("function"!=typeof t)throw TypeError("predicate must be a function");for(var n=arguments[1],o=0;o>>0,n=arguments[1],o=0;osvg{width:100%;height:100%}.material-icons,.material-icons-outlined,.material-icons-round,.material-icons-sharp,.q-icon{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:inherit;font-size:inherit;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}.q-panel,.q-panel>div{height:100%;width:100%}.q-panel-parent{overflow:hidden;position:relative}.q-loading-bar{position:fixed;z-index:9998;transition:transform 0.5s cubic-bezier(0,0,0.2,1),opacity 0.5s}.q-loading-bar--top{left:0;right:0;top:0;width:100%}.q-loading-bar--bottom{left:0;right:0;bottom:0;width:100%}.q-loading-bar--right{top:0;bottom:0;right:0;height:100%}.q-loading-bar--left{top:0;bottom:0;left:0;height:100%}.q-avatar{position:relative;vertical-align:middle;display:inline-block;border-radius:50%;font-size:48px;height:1em;width:1em}.q-avatar__content{font-size:0.5em;line-height:0.5em}.q-avatar__content,.q-avatar img:not(.q-icon){border-radius:inherit;height:inherit;width:inherit}.q-avatar__content--square{border-radius:0}.q-badge{background-color:#1976d2;background-color:var(--q-color-primary);color:#fff;padding:2px 6px;border-radius:4px;font-size:12px;line-height:12px;font-weight:400;vertical-align:baseline}.q-badge--single-line{white-space:nowrap}.q-badge--multi-line{word-break:break-all;word-wrap:break-word}.q-badge--floating{position:absolute;top:-4px;right:-3px;cursor:inherit}.q-badge--transparent{opacity:0.8}.q-badge--outline{background-color:transparent;border:1px solid currentColor}.q-banner{min-height:54px;padding:8px 16px;background:#fff}.q-banner--top-padding{padding-top:14px}.q-banner__avatar{min-width:1px!important}.q-banner__avatar>.q-avatar{font-size:46px}.q-banner__avatar>.q-icon{font-size:40px}.q-banner__actions.col-auto,.q-banner__avatar:not(:empty)+.q-banner__content{padding-left:16px}.q-banner__actions.col-all .q-btn-item{margin:4px 0 0 4px}.q-banner--dense{min-height:32px;padding:8px}.q-banner--dense.q-banner--top-padding{padding-top:12px}.q-banner--dense .q-banner__avatar>.q-avatar,.q-banner--dense .q-banner__avatar>.q-icon{font-size:28px}.q-banner--dense .q-banner__actions.col-auto,.q-banner--dense .q-banner__avatar:not(:empty)+.q-banner__content{padding-left:8px}.q-bar{background:rgba(0,0,0,0.2)}.q-bar>.q-icon{margin-left:2px}.q-bar>div,.q-bar>div+.q-icon{margin-left:8px}.q-bar>.q-btn{margin-left:2px}.q-bar>.q-btn:first-child,.q-bar>.q-icon:first-child,.q-bar>div:first-child{margin-left:0}.q-bar--standard{padding:0 12px;height:32px;font-size:18px}.q-bar--standard>div{font-size:16px}.q-bar--standard .q-btn{font-size:11px}.q-bar--dense{padding:0 8px;height:24px;font-size:14px}.q-bar--dense .q-btn{font-size:8px}.q-bar--dark{background:hsla(0,0%,100%,0.15)}.q-breadcrumbs__el{color:inherit}.q-breadcrumbs__el-icon{font-size:125%}.q-breadcrumbs__el-icon--with-label{margin-right:8px}.q-breadcrumbs--last a{pointer-events:none}[dir=rtl] .q-breadcrumbs__separator .q-icon{transform:scaleX(-1)}.q-btn{display:inline-flex;flex-direction:column;align-items:stretch;position:relative;outline:0;border:0;vertical-align:middle;padding:0;font-size:14px;line-height:1.715em;text-decoration:none;color:inherit;background:transparent;font-weight:500;text-transform:uppercase;text-align:center;width:auto;height:auto}.q-btn .q-icon,.q-btn .q-spinner{font-size:1.715em}.q-btn.disabled{opacity:0.7!important}.q-btn__wrapper{padding:4px 16px;min-height:2.572em;border-radius:inherit;width:100%;height:100%}.q-btn__wrapper:before{content:"";display:block;position:absolute;left:0;right:0;top:0;bottom:0;border-radius:inherit;box-shadow:0 1px 5px rgba(0,0,0,0.2),0 2px 2px rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12)}.q-btn--actionable{cursor:pointer}.q-btn--actionable.q-btn--standard .q-btn__wrapper:before{transition:box-shadow 0.3s cubic-bezier(0.25,0.8,0.5,1)}.q-btn--actionable.q-btn--standard.q-btn--active .q-btn__wrapper:before,.q-btn--actionable.q-btn--standard:active .q-btn__wrapper:before{box-shadow:0 3px 5px -1px rgba(0,0,0,0.2),0 5px 8px rgba(0,0,0,0.14),0 1px 14px rgba(0,0,0,0.12)}.q-btn--no-uppercase{text-transform:none}.q-btn--rectangle{border-radius:3px}.q-btn--outline{background:transparent!important}.q-btn--outline .q-btn__wrapper:before{border:1px solid currentColor}.q-btn--push{border-radius:7px}.q-btn--push .q-btn__wrapper:before{border-bottom:3px solid rgba(0,0,0,0.15)}.q-btn--push.q-btn--actionable{transition:transform 0.3s cubic-bezier(0.25,0.8,0.5,1)}.q-btn--push.q-btn--actionable .q-btn__wrapper:before{transition:top 0.3s cubic-bezier(0.25,0.8,0.5,1),bottom 0.3s cubic-bezier(0.25,0.8,0.5,1),border-bottom-width 0.3s cubic-bezier(0.25,0.8,0.5,1)}.q-btn--push.q-btn--actionable.q-btn--active,.q-btn--push.q-btn--actionable:active{transform:translateY(2px)}.q-btn--push.q-btn--actionable.q-btn--active .q-btn__wrapper:before,.q-btn--push.q-btn--actionable:active .q-btn__wrapper:before{border-bottom-width:0}.q-btn--rounded{border-radius:28px}.q-btn--round{border-radius:50%}.q-btn--round .q-btn__wrapper{padding:0;min-width:3em;min-height:3em}.q-btn--flat .q-btn__wrapper:before,.q-btn--outline .q-btn__wrapper:before,.q-btn--unelevated .q-btn__wrapper:before{box-shadow:none}.q-btn--dense .q-btn__wrapper{padding:0.285em;min-height:2em}.q-btn--dense.q-btn--round .q-btn__wrapper{padding:0;min-height:2.4em;min-width:2.4em}.q-btn--dense .on-left{margin-right:6px}.q-btn--dense .on-right{margin-left:6px}.q-btn--fab-mini .q-icon,.q-btn--fab .q-icon{font-size:24px}.q-btn--fab .q-icon{margin:auto}.q-btn--fab .q-btn__wrapper{padding:16px;min-height:56px;min-width:56px}.q-btn--fab-mini .q-btn__wrapper{padding:8px;min-height:40px;min-width:40px}.q-btn__content{transition:opacity 0.3s;z-index:0}.q-btn__content--hidden{opacity:0;pointer-events:none}.q-btn__progress{border-radius:inherit;z-index:0}.q-btn__progress-indicator{z-index:-1;transform:translateX(-100%);background:hsla(0,0%,100%,0.25)}.q-btn__progress--dark .q-btn__progress-indicator{background:rgba(0,0,0,0.2)}.q-btn-dropdown--split .q-btn-dropdown__arrow-container{border-left:1px solid hsla(0,0%,100%,0.3)}.q-btn-dropdown--split .q-btn-dropdown__arrow-container .q-btn__wrapper{padding:0 4px}.q-btn-dropdown--simple .q-btn-dropdown__arrow{margin-left:8px}.q-btn-dropdown__arrow{transition:transform 0.28s}.q-btn-group{border-radius:3px;box-shadow:0 1px 5px rgba(0,0,0,0.2),0 2px 2px rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12);vertical-align:middle}.q-btn-group>.q-btn-item{border-radius:inherit;align-self:stretch}.q-btn-group>.q-btn-item .q-btn__wrapper:before{box-shadow:none}.q-btn-group>.q-btn-item .q-badge--floating{right:0}.q-btn-group>.q-btn-group{box-shadow:none}.q-btn-group>.q-btn-group:first-child>.q-btn:first-child{border-top-left-radius:inherit;border-bottom-left-radius:inherit}.q-btn-group>.q-btn-group:last-child>.q-btn:last-child{border-top-right-radius:inherit;border-bottom-right-radius:inherit}.q-btn-group>.q-btn-group:not(:first-child)>.q-btn:first-child .q-btn__wrapper:before{border-left:0}.q-btn-group>.q-btn-group:not(:last-child)>.q-btn:last-child .q-btn__wrapper:before{border-right:0}.q-btn-group>.q-btn-item:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.q-btn-group>.q-btn-item:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.q-btn-group>.q-btn-item.q-btn--standard .q-btn__wrapper:before{z-index:-1}.q-btn-group--push>.q-btn--push.q-btn--actionable{transform:none}.q-btn-group--push>.q-btn--push.q-btn--actionable .q-btn__wrapper{transition:margin-top 0.3s cubic-bezier(0.25,0.8,0.5,1),margin-bottom 0.3s cubic-bezier(0.25,0.8,0.5,1),box-shadow 0.3s cubic-bezier(0.25,0.8,0.5,1)}.q-btn-group--push>.q-btn--push.q-btn--actionable.q-btn--active .q-btn__wrapper,.q-btn-group--push>.q-btn--push.q-btn--actionable:active .q-btn__wrapper{margin-top:2px;margin-bottom:-2px}.q-btn-group--rounded{border-radius:28px}.q-btn-group--flat,.q-btn-group--outline,.q-btn-group--unelevated{box-shadow:none}.q-btn-group--outline>.q-separator{display:none}.q-btn-group--outline>.q-btn-item+.q-btn-item .q-btn__wrapper:before{border-left:0}.q-btn-group--outline>.q-btn-item:not(:last-child) .q-btn__wrapper:before{border-right:0}.q-btn-group--stretch{align-self:stretch;border-radius:0}.q-btn-group--glossy>.q-btn-item{background-image:linear-gradient(180deg,hsla(0,0%,100%,0.3),hsla(0,0%,100%,0) 50%,rgba(0,0,0,0.12) 51%,rgba(0,0,0,0.04))!important}.q-btn-group--spread>.q-btn-group{display:flex!important}.q-btn-group--spread>.q-btn-group>.q-btn-item:not(.q-btn-dropdown__arrow-container),.q-btn-group--spread>.q-btn-item{width:auto;min-width:0;max-width:100%;flex:10000 1 0%}.q-card{box-shadow:0 1px 5px rgba(0,0,0,0.2),0 2px 2px rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12);border-radius:4px;vertical-align:top;background:#fff;position:relative}.q-card>div:first-child,.q-card>img:first-child{border-top:0;border-top-left-radius:inherit;border-top-right-radius:inherit}.q-card>div:last-child,.q-card>img:last-child{border-bottom:0;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.q-card>div:not(:first-child),.q-card>img:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.q-card>div:not(:last-child),.q-card>img:not(:last-child){border-bottom-left-radius:0;border-bottom-right-radius:0}.q-card>div{border-left:0;border-right:0;box-shadow:none}.q-card--bordered{border:1px solid rgba(0,0,0,0.12)}.q-card--dark{border-color:hsla(0,0%,100%,0.28)}.q-card__section{position:relative}.q-card__section--vert{padding:16px}.q-card__section--horiz>div:first-child,.q-card__section--horiz>img:first-child{border-top-left-radius:inherit;border-bottom-left-radius:inherit}.q-card__section--horiz>div:last-child,.q-card__section--horiz>img:last-child{border-top-right-radius:inherit;border-bottom-right-radius:inherit}.q-card__section--horiz>div:not(:first-child),.q-card__section--horiz>img:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.q-card__section--horiz>div:not(:last-child),.q-card__section--horiz>img:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.q-card__section--horiz>div{border-top:0;border-bottom:0;box-shadow:none}.q-card__actions{padding:8px;align-items:center}.q-card__actions .q-btn__wrapper{padding:0 8px}.q-card__actions--horiz>.q-btn-group+.q-btn-item,.q-card__actions--horiz>.q-btn-item+.q-btn-group,.q-card__actions--horiz>.q-btn-item+.q-btn-item{margin-left:8px}.q-card__actions--vert>.q-btn-item.q-btn--round{align-self:center}.q-card__actions--vert>.q-btn-group+.q-btn-item,.q-card__actions--vert>.q-btn-item+.q-btn-group,.q-card__actions--vert>.q-btn-item+.q-btn-item{margin-top:4px}.q-card__actions--vert>.q-btn-group>.q-btn-item{flex-grow:1}.q-card>img{display:block;width:100%;max-width:100%;border:0}.q-carousel{background-color:#fff;height:400px}.q-carousel__slide{min-height:100%;background-size:cover;background-position:50%}.q-carousel .q-carousel--padding,.q-carousel__slide{padding:16px}.q-carousel__slides-container{height:100%}.q-carousel__control{color:#fff}.q-carousel__arrow{pointer-events:none}.q-carousel__arrow .q-icon{font-size:28px}.q-carousel__arrow .q-btn{pointer-events:all}.q-carousel__next-arrow--horizontal,.q-carousel__prev-arrow--horizontal{top:16px;bottom:16px}.q-carousel__prev-arrow--horizontal{left:16px}.q-carousel__next-arrow--horizontal{right:16px}.q-carousel__next-arrow--vertical,.q-carousel__prev-arrow--vertical{left:16px;right:16px}.q-carousel__prev-arrow--vertical{top:16px}.q-carousel__next-arrow--vertical{bottom:16px}.q-carousel__navigation--bottom,.q-carousel__navigation--top{left:16px;right:16px;overflow-x:auto;overflow-y:hidden}.q-carousel__navigation--top{top:16px}.q-carousel__navigation--bottom{bottom:16px}.q-carousel__navigation--left,.q-carousel__navigation--right{top:16px;bottom:16px;overflow-x:hidden;overflow-y:auto}.q-carousel__navigation--left>.q-carousel__navigation-inner,.q-carousel__navigation--right>.q-carousel__navigation-inner{flex-direction:column}.q-carousel__navigation--left{left:16px}.q-carousel__navigation--right{right:16px}.q-carousel__navigation-inner{flex:1 1 auto}.q-carousel__navigation .q-btn{margin:6px 4px}.q-carousel__navigation .q-btn .q-btn__wrapper{padding:5px}.q-carousel__navigation-icon--inactive{opacity:0.7}.q-carousel .q-carousel__thumbnail{margin:2px;height:50px;width:auto;display:inline-block;cursor:pointer;border:1px solid transparent;border-radius:4px;vertical-align:middle;opacity:0.7;transition:opacity 0.3s}.q-carousel .q-carousel__thumbnail--active,.q-carousel .q-carousel__thumbnail:hover{opacity:1}.q-carousel .q-carousel__thumbnail--active{border-color:currentColor;cursor:default}.q-carousel--arrows-vertical .q-carousel--padding,.q-carousel--arrows-vertical.q-carousel--with-padding .q-carousel__slide,.q-carousel--navigation-top .q-carousel--padding,.q-carousel--navigation-top.q-carousel--with-padding .q-carousel__slide{padding-top:60px}.q-carousel--arrows-vertical .q-carousel--padding,.q-carousel--arrows-vertical.q-carousel--with-padding .q-carousel__slide,.q-carousel--navigation-bottom .q-carousel--padding,.q-carousel--navigation-bottom.q-carousel--with-padding .q-carousel__slide{padding-bottom:60px}.q-carousel--arrows-horizontal .q-carousel--padding,.q-carousel--arrows-horizontal.q-carousel--with-padding .q-carousel__slide,.q-carousel--navigation-left .q-carousel--padding,.q-carousel--navigation-left.q-carousel--with-padding .q-carousel__slide{padding-left:60px}.q-carousel--arrows-horizontal .q-carousel--padding,.q-carousel--arrows-horizontal.q-carousel--with-padding .q-carousel__slide,.q-carousel--navigation-right .q-carousel--padding,.q-carousel--navigation-right.q-carousel--with-padding .q-carousel__slide{padding-right:60px}.q-carousel.fullscreen{height:100%}.q-message-label,.q-message-name,.q-message-stamp{font-size:small}.q-message-label{margin:24px 0}.q-message-stamp{color:inherit;margin-top:4px;opacity:0.6;display:none}.q-message-avatar{border-radius:50%;width:48px;height:48px;min-width:48px}.q-message{margin-bottom:8px}.q-message:first-child .q-message-label{margin-top:0}.q-message-avatar--received{margin-right:8px}.q-message-text--received{color:#81c784;border-radius:4px 4px 4px 0}.q-message-text--received:last-child:before{right:100%;border-right:0 solid transparent;border-left:8px solid transparent;border-bottom:8px solid currentColor}.q-message-text-content--received{color:#000}.q-message-name--sent{text-align:right}.q-message-avatar--sent{margin-left:8px}.q-message-container--sent{flex-direction:row-reverse}.q-message-text--sent{color:#e0e0e0;border-radius:4px 4px 0 4px}.q-message-text--sent:last-child:before{left:100%;border-left:0 solid transparent;border-right:8px solid transparent;border-bottom:8px solid currentColor}.q-message-text-content--sent{color:#000}.q-message-text{background:currentColor;padding:8px;line-height:1.2;word-break:break-word;position:relative}.q-message-text+.q-message-text{margin-top:3px}.q-message-text:last-child{min-height:48px}.q-message-text:last-child .q-message-stamp{display:block}.q-message-text:last-child:before{content:"";position:absolute;bottom:0;width:0;height:0}.q-checkbox{vertical-align:middle}.q-checkbox__bg{top:25%;left:25%;width:50%;height:50%;border:2px solid currentColor;border-radius:2px;transition:background 0.22s cubic-bezier(0,0,0.2,1) 0ms}.q-checkbox__native{width:1px;height:1px}.q-checkbox__svg{color:#fff}.q-checkbox__truthy{stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.78334;stroke-dasharray:29.78334}.q-checkbox__indet{fill:currentColor;transform-origin:50% 50%;transform:rotate(-280deg) scale(0)}.q-checkbox__inner{font-size:40px;width:1em;min-width:1em;height:1em;outline:0;border-radius:50%;color:rgba(0,0,0,0.54)}.q-checkbox__inner--indet,.q-checkbox__inner--truthy{color:#1976d2;color:var(--q-color-primary)}.q-checkbox__inner--indet .q-checkbox__bg,.q-checkbox__inner--truthy .q-checkbox__bg{background:currentColor}.q-checkbox__inner--truthy path{stroke-dashoffset:0;transition:stroke-dashoffset 0.18s cubic-bezier(0.4,0,0.6,1) 0ms}.q-checkbox__inner--indet .q-checkbox__indet{transform:rotate(0) scale(1);transition:transform 0.22s cubic-bezier(0,0,0.2,1) 0ms}.q-checkbox.disabled{opacity:0.75!important}.q-checkbox--dark .q-checkbox__inner{color:hsla(0,0%,100%,0.7)}.q-checkbox--dark .q-checkbox__inner:before{opacity:0.32!important}.q-checkbox--dark .q-checkbox__inner--indet,.q-checkbox--dark .q-checkbox__inner--truthy{color:#1976d2;color:var(--q-color-primary)}.q-checkbox--dense .q-checkbox__inner{width:0.5em;min-width:0.5em;height:0.5em}.q-checkbox--dense .q-checkbox__bg{left:5%;top:5%;width:90%;height:90%}.q-checkbox--dense .q-checkbox__label{padding-left:0.5em}.q-checkbox--dense.reverse .q-checkbox__label{padding-left:0;padding-right:0.5em}body.desktop .q-checkbox:not(.disabled) .q-checkbox__inner:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;background:currentColor;opacity:0.12;transform:scale3d(0,0,1);transition:transform 0.22s cubic-bezier(0,0,0.2,1)}body.desktop .q-checkbox:not(.disabled):focus .q-checkbox__inner:before,body.desktop .q-checkbox:not(.disabled):hover .q-checkbox__inner:before{transform:scale3d(1,1,1)}body.desktop .q-checkbox--dense:not(.disabled):focus .q-checkbox__inner:before,body.desktop .q-checkbox--dense:not(.disabled):hover .q-checkbox__inner:before{transform:scale3d(1.4,1.4,1)}.q-chip{vertical-align:middle;border-radius:16px;outline:0;position:relative;height:2em;max-width:100%;margin:4px;background:#e0e0e0;color:rgba(0,0,0,0.87);font-size:14px;padding:0.5em 0.9em}.q-chip--colored .q-chip__icon,.q-chip--dark .q-chip__icon{color:inherit}.q-chip--outline{background:transparent!important;border:1px solid currentColor}.q-chip .q-avatar{font-size:2em;margin-left:-0.45em;margin-right:0.2em;border-radius:16px}.q-chip--selected .q-avatar{display:none}.q-chip__icon{color:rgba(0,0,0,0.54);font-size:1.5em;margin:-0.2em}.q-chip__icon--left{margin-right:0.2em}.q-chip__icon--right{margin-left:0.2em}.q-chip__icon--remove{margin-left:0.1em;margin-right:-0.5em;opacity:0.6;outline:0}.q-chip__icon--remove:focus,.q-chip__icon--remove:hover{opacity:1}.q-chip__content{white-space:nowrap}.q-chip--dense{border-radius:12px;padding:0 0.4em;height:1.5em}.q-chip--dense .q-avatar{font-size:1.5em;margin-left:-0.27em;margin-right:0.1em;border-radius:12px}.q-chip--dense .q-chip__icon{font-size:1.25em}.q-chip--dense .q-chip__icon--left{margin-right:0.195em}.q-chip--dense .q-chip__icon--remove{margin-right:-0.25em}.q-chip--square{border-radius:4px}.q-chip--square .q-avatar{border-radius:3px 0 0 3px}body.desktop .q-chip--clickable:focus{box-shadow:0 1px 3px rgba(0,0,0,0.2),0 1px 1px rgba(0,0,0,0.14),0 2px 1px -1px rgba(0,0,0,0.12)}.q-circular-progress{display:inline-block;position:relative;vertical-align:middle;width:1em;height:1em;line-height:1}.q-circular-progress.q-focusable{border-radius:50%}.q-circular-progress__svg{width:100%;height:100%}.q-circular-progress__text{font-size:0.25em}.q-circular-progress--indeterminate .q-circular-progress__svg{transform-origin:50% 50%;-webkit-animation:q-spin 2s linear infinite;animation:q-spin 2s linear infinite}.q-circular-progress--indeterminate .q-circular-progress__circle{stroke-dasharray:1 400;stroke-dashoffset:0;-webkit-animation:q-circular-progress-circle 1.5s ease-in-out infinite;animation:q-circular-progress-circle 1.5s ease-in-out infinite}.q-color-picker{overflow:hidden;background:#fff;max-width:350px;vertical-align:top;min-width:180px;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,0.2),0 2px 2px rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12)}.q-color-picker .q-tab{padding:0!important}.q-color-picker--bordered{border:1px solid rgba(0,0,0,0.12)}.q-color-picker__header{height:68px}.q-color-picker__header input{line-height:24px;border:0}.q-color-picker__header .q-tab{min-height:32px!important;height:32px!important}.q-color-picker__header .q-tab--inactive{background:linear-gradient(0deg,rgba(0,0,0,0.3) 0%,rgba(0,0,0,0.15) 25%,rgba(0,0,0,0.1))}.q-color-picker__error-icon{bottom:2px;right:2px;font-size:24px;opacity:0;transition:opacity 0.3s ease-in}.q-color-picker__header-content{position:relative;background:#fff}.q-color-picker__header-content--light{color:#000}.q-color-picker__header-content--dark{color:#fff}.q-color-picker__header-content--dark .q-tab--inactive:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:hsla(0,0%,100%,0.2)}.q-color-picker__header-banner{height:36px}.q-color-picker__header-bg{background:#fff;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAH0lEQVQoU2NkYGAwZkAFZ5G5jPRRgOYEVDeB3EBjBQBOZwTVugIGyAAAAABJRU5ErkJggg==")!important}.q-color-picker__footer{height:36px}.q-color-picker__footer .q-tab{min-height:36px!important;height:36px!important}.q-color-picker__footer .q-tab--inactive{background:linear-gradient(180deg,rgba(0,0,0,0.3) 0%,rgba(0,0,0,0.15) 25%,rgba(0,0,0,0.1))}.q-color-picker__spectrum{width:100%;height:100%}.q-color-picker__spectrum-tab{padding:0!important}.q-color-picker__spectrum-white{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.q-color-picker__spectrum-black{background:linear-gradient(0deg,#000,transparent)}.q-color-picker__spectrum-circle{width:10px;height:10px;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,0.3),0 0 1px 2px rgba(0,0,0,0.4);border-radius:50%;transform:translate(-5px,-5px)}.q-color-picker__hue .q-slider__track-container{background:linear-gradient(90deg,red 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)!important;opacity:1}.q-color-picker__alpha .q-slider__track-container{color:#fff;opacity:1;height:8px;background-color:#fff!important;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAH0lEQVQoU2NkYGAwZkAFZ5G5jPRRgOYEVDeB3EBjBQBOZwTVugIGyAAAAABJRU5ErkJggg==")!important}.q-color-picker__alpha .q-slider__track-container:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(90deg,hsla(0,0%,100%,0),#757575)}.q-color-picker__sliders{padding:4px 16px 16px}.q-color-picker__sliders .q-slider__track-container{height:10px;margin-top:-5px}.q-color-picker__sliders .q-slider__track{display:none}.q-color-picker__sliders .q-slider__thumb path{stroke-width:2px;fill:transparent}.q-color-picker__sliders .q-slider--active path{stroke-width:3px}.q-color-picker__sliders .q-slider{height:16px;margin-top:8px;color:#424242}.q-color-picker__tune-tab .q-slider{margin-left:18px;margin-right:18px}.q-color-picker__tune-tab input{font-size:11px;border:1px solid #e0e0e0;border-radius:4px;width:3.5em}.q-color-picker__palette-tab{padding:0!important}.q-color-picker__palette-rows--editable .q-color-picker__cube{cursor:pointer}.q-color-picker__cube{padding-bottom:10%;width:10%!important}.q-color-picker input{color:inherit;background:transparent;outline:0;text-align:center}.q-color-picker .q-tabs{overflow:hidden}.q-color-picker .q-tab--active{box-shadow:0 0 14px 3px rgba(0,0,0,0.2)}.q-color-picker .q-tab--active .q-focus-helper,.q-color-picker .q-tab__indicator{display:none}.q-color-picker .q-tab-panels{background:inherit}.q-color-picker--dark .q-color-picker__tune-tab input{border:1px solid hsla(0,0%,100%,0.3)}.q-color-picker--dark .q-slider{color:#bdbdbd}.q-date{display:inline-flex;box-shadow:0 1px 5px rgba(0,0,0,0.2),0 2px 2px rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12);border-radius:4px;background:#fff;width:290px;min-width:290px;max-width:100%}.q-date--bordered{border:1px solid rgba(0,0,0,0.12)}.q-date__header{border-top-left-radius:inherit;color:#fff;background-color:#1976d2;background-color:var(--q-color-primary);padding:16px}.q-date__actions{padding:0 16px 16px}.q-date__content,.q-date__main{outline:0}.q-date__content .q-btn{font-weight:400}.q-date__header-link{opacity:0.64;outline:0;transition:opacity 0.3s ease-out}.q-date__header-link--active,.q-date__header-link:focus,.q-date__header-link:hover{opacity:1}.q-date__header-subtitle{height:24px;font-size:14px;line-height:1.75;letter-spacing:0.00938em}.q-date__header-title-label{font-size:24px;line-height:1.2;letter-spacing:0.00735em}.q-date__view{height:100%;width:100%;min-height:290px;padding:16px}.q-date__navigation{height:12.5%}.q-date__navigation>div:first-child{width:8%;min-width:24px;justify-content:flex-end}.q-date__navigation>div:last-child{width:8%;min-width:24px;justify-content:flex-start}.q-date__calendar-weekdays{height:12.5%}.q-date__calendar-weekdays>div{opacity:0.38;font-size:12px}.q-date__calendar-item{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;width:14.285%!important;height:12.5%!important;position:relative}.q-date__calendar-item>div,.q-date__calendar-item button{width:32px;height:32px;border-radius:50%}.q-date__calendar-item>div{line-height:32px;text-align:center}.q-date__calendar-item--out{opacity:0.18}.q-date__calendar-item--fill{visibility:hidden}.q-date__calendar-days-container{height:75%;min-height:192px}.q-date__calendar-days>div{height:16.66%!important}.q-date__event{position:absolute;bottom:2px;left:50%;height:5px;width:8px;border-radius:5px;background-color:#26a69a;background-color:var(--q-color-secondary);transform:translate3d(-50%,0,0)}.q-date__today{box-shadow:0 0 1px 0 currentColor}.q-date__years-content{padding:0 8px}.q-date__months-item,.q-date__years-item{flex:0 0 33.3333%}.q-date--readonly .q-date__content,.q-date--readonly .q-date__header,.q-date.disabled .q-date__content,.q-date.disabled .q-date__header{pointer-events:none}.q-date--readonly .q-date__navigation{display:none}.q-date--portrait{flex-direction:column}.q-date--portrait-standard .q-date__content{height:calc(100% - 86px)}.q-date--portrait-standard .q-date__header{border-top-right-radius:inherit;height:86px}.q-date--portrait-standard .q-date__header-title{align-items:center;height:30px}.q-date--portrait-minimal .q-date__content{height:100%}.q-date--landscape{flex-direction:row;align-items:stretch;min-width:420px}.q-date--landscape>div{display:flex;flex-direction:column}.q-date--landscape .q-date__content{height:100%}.q-date--landscape-standard{min-width:420px}.q-date--landscape-standard .q-date__header{border-bottom-left-radius:inherit;min-width:110px;width:110px}.q-date--landscape-standard .q-date__header-title{flex-direction:column}.q-date--landscape-standard .q-date__header-today{margin-top:12px;margin-left:-8px}.q-date--landscape-minimal{width:310px}.q-date--dark{border-color:hsla(0,0%,100%,0.28)}.q-dialog__title{font-size:1.25rem;font-weight:500;line-height:2rem;letter-spacing:0.0125em}.q-dialog__inner{outline:0}.q-dialog__inner>div{pointer-events:all;overflow:auto;-webkit-overflow-scrolling:touch;will-change:scroll-position;border-radius:4px;box-shadow:0 2px 4px -1px rgba(0,0,0,0.2),0 4px 5px rgba(0,0,0,0.14),0 1px 10px rgba(0,0,0,0.12)}.q-dialog__inner--square>div{border-radius:0!important}.q-dialog__inner>.q-card>.q-card__actions .q-btn--rectangle .q-btn__wrapper{min-width:64px}.q-dialog__inner--minimized{padding:24px}.q-dialog__inner--minimized>div{max-height:calc(100vh - 48px)}.q-dialog__inner--maximized>div{height:100%;width:100%;max-height:100vh;max-width:100vw;border-radius:0!important}.q-dialog__inner--bottom,.q-dialog__inner--top{padding-top:0!important;padding-bottom:0!important}.q-dialog__inner--left,.q-dialog__inner--right{padding-right:0!important;padding-left:0!important}.q-dialog__inner--left>div,.q-dialog__inner--top>div{border-top-left-radius:0}.q-dialog__inner--right>div,.q-dialog__inner--top>div{border-top-right-radius:0}.q-dialog__inner--bottom>div,.q-dialog__inner--left>div{border-bottom-left-radius:0}.q-dialog__inner--bottom>div,.q-dialog__inner--right>div{border-bottom-right-radius:0}.q-dialog__inner--fullwidth>div{width:100%!important;max-width:100%!important}.q-dialog__inner--fullheight>div{height:100%!important;max-height:100%!important}.q-dialog__backdrop{z-index:-1;pointer-events:all;background:rgba(0,0,0,0.4)}body.platform-android:not(.native-mobile) .q-dialog__inner--minimized>div,body.platform-ios .q-dialog__inner--minimized>div{max-height:calc(100vh - 108px)}body.q-ios-padding .q-dialog__inner{padding-top:20px!important;padding-top:env(safe-area-inset-top)!important;padding-bottom:env(safe-area-inset-bottom)!important}body.q-ios-padding .q-dialog__inner>div{max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important}@media (max-width:599px){.q-dialog__inner--bottom,.q-dialog__inner--top{padding-left:0;padding-right:0}.q-dialog__inner--bottom>div,.q-dialog__inner--top>div{width:100%!important}}@media (min-width:600px){.q-dialog__inner--minimized>div{max-width:560px}}.q-body--dialog{overflow:hidden}.q-bottom-sheet{padding-bottom:8px}.q-bottom-sheet__avatar{border-radius:50%}.q-bottom-sheet--list{width:400px}.q-bottom-sheet--list .q-icon,.q-bottom-sheet--list img{font-size:24px;width:24px;height:24px}.q-bottom-sheet--grid{width:700px}.q-bottom-sheet--grid .q-bottom-sheet__item{padding:8px;text-align:center;min-width:100px}.q-bottom-sheet--grid .q-bottom-sheet__empty-icon,.q-bottom-sheet--grid .q-icon,.q-bottom-sheet--grid img{font-size:48px;width:48px;height:48px;margin-bottom:8px}.q-bottom-sheet--grid .q-separator{margin:12px 0}.q-bottom-sheet__item{flex:0 0 33.3333%}@media (min-width:600px){.q-bottom-sheet__item{flex:0 0 25%}}.q-dialog-plugin{width:400px}.q-dialog-plugin .q-card__section+.q-card__section{padding-top:0}.q-editor{border:1px solid rgba(0,0,0,0.12);border-radius:4px;background-color:#fff}.q-editor.disabled{border-style:dashed}.q-editor>div:first-child,.q-editor__toolbars-container,.q-editor__toolbars-container>div:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.q-editor__content{outline:0;padding:10px;min-height:10em;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;overflow:auto}.q-editor__content pre{white-space:pre-wrap}.q-editor__content hr{border:0;outline:0;margin:1px;height:1px;background:rgba(0,0,0,0.12)}.q-editor__toolbar{border-bottom:1px solid rgba(0,0,0,0.12);min-height:32px}.q-editor .q-btn{margin:4px}.q-editor__toolbar-group{position:relative;margin:0 4px}.q-editor__toolbar-group+.q-editor__toolbar-group:before{content:"";position:absolute;left:-4px;top:4px;bottom:4px;width:1px;background:rgba(0,0,0,0.12)}.q-editor_input input{color:inherit}.q-editor--flat,.q-editor--flat .q-editor__toolbar{border:0}.q-editor--dense .q-editor__toolbar-group{display:flex;align-items:center;flex-wrap:nowrap}.q-editor--dark{border-color:hsla(0,0%,100%,0.28)}.q-editor--dark .q-editor__content hr{background:hsla(0,0%,100%,0.28)}.q-editor--dark .q-editor__toolbar{border-color:hsla(0,0%,100%,0.28)}.q-editor--dark .q-editor__toolbar-group+.q-editor__toolbar-group:before{background:hsla(0,0%,100%,0.28)}.q-expansion-item__border{opacity:0}.q-expansion-item__toggle-icon{position:relative;transition:transform 0.3s}.q-expansion-item__toggle-icon--rotated{transform:rotate(180deg)}.q-expansion-item__toggle-focus{width:1em!important;height:1em!important;position:relative!important}.q-expansion-item__toggle-focus+.q-expansion-item__toggle-icon{margin-top:-1em}.q-expansion-item--standard.q-expansion-item--expanded>div>.q-expansion-item__border{opacity:1}.q-expansion-item--popup{transition:padding 0.5s}.q-expansion-item--popup>.q-expansion-item__container{border:1px solid rgba(0,0,0,0.12)}.q-expansion-item--popup>.q-expansion-item__container>.q-separator{display:none}.q-expansion-item--popup.q-expansion-item--collapsed{padding:0 15px}.q-expansion-item--popup.q-expansion-item--expanded{padding:15px 0}.q-expansion-item--popup.q-expansion-item--expanded+.q-expansion-item--popup.q-expansion-item--expanded{padding-top:0}.q-expansion-item--popup.q-expansion-item--collapsed:not(:first-child)>.q-expansion-item__container{border-top-width:0}.q-expansion-item--popup.q-expansion-item--expanded+.q-expansion-item--popup.q-expansion-item--collapsed>.q-expansion-item__container{border-top-width:1px}.q-expansion-item__content>.q-card{box-shadow:none;border-radius:0}.q-expansion-item--expanded+.q-expansion-item--expanded>div>.q-expansion-item__border--top,.q-expansion-item:first-child>div>.q-expansion-item__border--top,.q-expansion-item:last-child>div>.q-expansion-item__border--bottom{opacity:0}.q-expansion-item--expanded .q-textarea--autogrow textarea{-webkit-animation:q-expansion-done 0s;animation:q-expansion-done 0s}.z-fab{z-index:990}.q-fab{position:relative;vertical-align:middle}.q-fab>.q-btn{width:100%}.q-fab--form-rounded{border-radius:28px}.q-fab--form-square{border-radius:4px}.q-fab--opened .q-fab__actions{opacity:1;transform:scale(1) translate(0,0);pointer-events:all}.q-fab--opened .q-fab__icon{transform:rotate(180deg);opacity:0}.q-fab--opened .q-fab__active-icon{transform:rotate(0deg);opacity:1}.q-fab__active-icon,.q-fab__icon{transition:opacity 0.4s,transform 0.4s}.q-fab__icon{opacity:1;transform:rotate(0deg)}.q-fab__active-icon{opacity:0;transform:rotate(-180deg)}.q-fab__label--external{position:absolute;padding:0 8px;transition:opacity 0.18s cubic-bezier(0.65,0.815,0.735,0.395)}.q-fab__label--external-hidden{opacity:0;pointer-events:none}.q-fab__label--external-left{top:50%;left:-12px;transform:translate(-100%,-50%)}.q-fab__label--external-right{top:50%;right:-12px;transform:translate(100%,-50%)}.q-fab__label--external-bottom{bottom:-12px;left:50%;transform:translate(-50%,100%)}.q-fab__label--external-top{top:-12px;left:50%;transform:translate(-50%,-100%)}.q-fab__label--internal{padding:0;transition:font-size 0.12s cubic-bezier(0.65,0.815,0.735,0.395),max-height 0.12s cubic-bezier(0.65,0.815,0.735,0.395),opacity 0.07s cubic-bezier(0.65,0.815,0.735,0.395);max-height:30px}.q-fab__label--internal-hidden{font-size:0;opacity:0}.q-fab__label--internal-top{padding-bottom:0.12em}.q-fab__label--internal-bottom{padding-top:0.12em}.q-fab__label--internal-bottom.q-fab__label--internal-hidden,.q-fab__label--internal-top.q-fab__label--internal-hidden{max-height:0}.q-fab__label--internal-left{padding-left:0.285em;padding-right:0.571em}.q-fab__label--internal-right{padding-right:0.285em;padding-left:0.571em}.q-fab__icon-holder{min-width:24px;min-height:24px;position:relative}.q-fab__actions{position:absolute;opacity:0;transition:transform 0.18s ease-in,opacity 0.18s ease-in;pointer-events:none;align-items:center;justify-content:center;align-self:center;padding:3px}.q-fab__actions .q-btn{margin:5px}.q-fab__actions--right{transform-origin:0 50%;transform:scale(0.4) translateX(-62px);height:56px;left:100%;margin-left:9px}.q-fab__actions--left{transform-origin:100% 50%;transform:scale(0.4) translateX(62px);height:56px;right:100%;margin-right:9px;flex-direction:row-reverse}.q-fab__actions--up{transform-origin:50% 100%;transform:scale(0.4) translateY(62px);width:56px;bottom:100%;margin-bottom:9px;flex-direction:column-reverse}.q-fab__actions--down{transform-origin:50% 0;transform:scale(0.4) translateY(-62px);width:56px;top:100%;margin-top:9px;flex-direction:column}.q-fab__actions--down,.q-fab__actions--up{left:50%;margin-left:-28px}.q-fab--align-left>.q-fab__actions--down,.q-fab--align-left>.q-fab__actions--up{align-items:flex-start;left:28px}.q-fab--align-right>.q-fab__actions--down,.q-fab--align-right>.q-fab__actions--up{align-items:flex-end;left:auto;right:0}.q-field{font-size:14px}.q-field--with-bottom{padding-bottom:20px}.q-field__marginal{height:56px;color:rgba(0,0,0,0.54);font-size:24px}.q-field__marginal>*+*{margin-left:2px}.q-field__marginal .q-avatar{font-size:32px}.q-field__before,.q-field__prepend{padding-right:12px}.q-field__after,.q-field__append{padding-left:12px}.q-field__after:empty,.q-field__append:empty{display:none}.q-field__append+.q-field__append{padding-left:2px}.q-field__inner{text-align:left}.q-field__bottom{font-size:12px;min-height:12px;line-height:1;color:rgba(0,0,0,0.54);padding:8px 12px 0}.q-field__bottom--animated{transform:translateY(100%);position:absolute;left:0;right:0;bottom:0}.q-field__messages{line-height:1}.q-field__messages>div{word-break:break-word;word-wrap:break-word;overflow-wrap:break-word}.q-field__messages>div+div{margin-top:4px}.q-field__counter{padding-left:8px;line-height:1}.q-field--item-aligned{padding:8px 16px}.q-field--item-aligned .q-field__before{min-width:56px}.q-field__control-container{height:inherit}.q-field__control{color:#1976d2;color:var(--q-color-primary);height:56px;max-width:100%;outline:none}.q-field__control:after,.q-field__control:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.q-field__control:before{border-radius:inherit}.q-field__input,.q-field__native,.q-field__prefix,.q-field__suffix{font-weight:400;line-height:28px;letter-spacing:0.00937em;text-decoration:inherit;text-transform:inherit;border:none;border-radius:0;background:none;color:rgba(0,0,0,0.87);outline:0;padding:6px 0}.q-field__input,.q-field__native{width:100%;min-width:0;outline:0!important}.q-field__native[type=file]{line-height:1em}.q-field__input{padding:0;height:0;min-height:24px;line-height:24px}.q-field__prefix,.q-field__suffix{transition:opacity 0.36s cubic-bezier(0.4,0,0.2,1);white-space:nowrap}.q-field__prefix{padding-right:4px}.q-field__suffix{padding-left:4px}.q-field--disabled .q-placeholder,.q-field--readonly .q-placeholder{opacity:1!important}.q-field--readonly.q-field--labeled .q-field__input,.q-field--readonly.q-field--labeled .q-field__native{cursor:default}.q-field--readonly.q-field--float .q-field__input,.q-field--readonly.q-field--float .q-field__native{cursor:text}.q-field--disabled .q-field__inner{cursor:not-allowed}.q-field--disabled .q-field__control{pointer-events:none}.q-field--disabled .q-field__control>div{opacity:0.6!important}.q-field--disabled .q-field__control>div,.q-field--disabled .q-field__control>div *{outline:0!important}.q-field__label{left:0;right:0;top:18px;color:rgba(0,0,0,0.6);font-size:16px;line-height:20px;font-weight:400;letter-spacing:0.00937em;text-decoration:inherit;text-transform:inherit;transform-origin:left top;transition:transform 0.36s cubic-bezier(0.4,0,0.2,1),right 0.324s cubic-bezier(0.4,0,0.2,1)}.q-field--float .q-field__label{transform:translateY(-40%) scale(0.75);right:-33.33333%;transition:transform 0.36s cubic-bezier(0.4,0,0.2,1),right 0.396s cubic-bezier(0.4,0,0.2,1)}.q-field .q-field__input:-webkit-autofill,.q-field .q-field__native:-webkit-autofill{-webkit-animation-name:q-autofill;-webkit-animation-fill-mode:both}.q-field .q-field__input:-webkit-autofill+.q-field__label,.q-field .q-field__native:-webkit-autofill+.q-field__label{transform:translateY(-40%) scale(0.75)}.q-field .q-field__input[type=number]:invalid+.q-field__label,.q-field .q-field__native[type=number]:invalid+.q-field__label{transform:translateY(-40%) scale(0.75)}.q-field .q-field__input:invalid,.q-field .q-field__native:invalid{box-shadow:none}.q-field--focused .q-field__label{color:currentColor}.q-field--filled .q-field__control{padding:0 12px;background:rgba(0,0,0,0.05);border-radius:4px 4px 0 0}.q-field--filled .q-field__control:before{background:rgba(0,0,0,0.05);border-bottom:1px solid rgba(0,0,0,0.42);opacity:0;transition:opacity 0.36s cubic-bezier(0.4,0,0.2,1),background 0.36s cubic-bezier(0.4,0,0.2,1)}.q-field--filled .q-field__control:hover:before{opacity:1}.q-field--filled .q-field__control:after{height:2px;top:auto;transform-origin:center bottom;transform:scale3d(0,1,1);background:currentColor;transition:transform 0.36s cubic-bezier(0.4,0,0.2,1)}.q-field--filled.q-field--rounded .q-field__control{border-radius:28px 28px 0 0}.q-field--filled.q-field--focused .q-field__control:before{opacity:1;background:rgba(0,0,0,0.12)}.q-field--filled.q-field--focused .q-field__control:after{transform:scale3d(1,1,1)}.q-field--filled.q-field--dark .q-field__control,.q-field--filled.q-field--dark .q-field__control:before{background:hsla(0,0%,100%,0.07)}.q-field--filled.q-field--dark.q-field--focused .q-field__control:before{background:hsla(0,0%,100%,0.1)}.q-field--filled.q-field--readonly .q-field__control:before{opacity:1;background:transparent;border-bottom-style:dashed}.q-field--outlined .q-field__control{border-radius:4px;padding:0 12px}.q-field--outlined .q-field__control:before{border:1px solid rgba(0,0,0,0.24);transition:border-color 0.36s cubic-bezier(0.4,0,0.2,1)}.q-field--outlined .q-field__control:hover:before{border-color:#000}.q-field--outlined .q-field__control:after{height:inherit;border-radius:inherit;border:2px solid transparent;transition:border-color 0.36s cubic-bezier(0.4,0,0.2,1)}.q-field--outlined.q-field--rounded .q-field__control{border-radius:28px}.q-field--outlined.q-field--focused .q-field__control:after{border-color:currentColor;border-width:2px;transform:scale3d(1,1,1)}.q-field--outlined.q-field--readonly .q-field__control:before{border-style:dashed}.q-field--standard .q-field__control:before{border-bottom:1px solid rgba(0,0,0,0.24);transition:border-color 0.36s cubic-bezier(0.4,0,0.2,1)}.q-field--standard .q-field__control:hover:before{border-color:#000}.q-field--standard .q-field__control:after{height:2px;top:auto;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;transform-origin:center bottom;transform:scale3d(0,1,1);background:currentColor;transition:transform 0.36s cubic-bezier(0.4,0,0.2,1)}.q-field--standard.q-field--focused .q-field__control:after{transform:scale3d(1,1,1)}.q-field--standard.q-field--readonly .q-field__control:before{border-bottom-style:dashed}.q-field--dark .q-field__control:before{border-color:hsla(0,0%,100%,0.6)}.q-field--dark .q-field__control:hover:before{border-color:#fff}.q-field--dark .q-field__input,.q-field--dark .q-field__native,.q-field--dark .q-field__prefix,.q-field--dark .q-field__suffix{color:#fff}.q-field--dark .q-field__bottom,.q-field--dark .q-field__marginal,.q-field--dark:not(.q-field--focused) .q-field__label{color:hsla(0,0%,100%,0.7)}.q-field--standout .q-field__control{padding:0 12px;background:rgba(0,0,0,0.05);border-radius:4px;transition:box-shadow 0.36s cubic-bezier(0.4,0,0.2,1),background-color 0.36s cubic-bezier(0.4,0,0.2,1)}.q-field--standout .q-field__control:before{background:rgba(0,0,0,0.07);opacity:0;transition:opacity 0.36s cubic-bezier(0.4,0,0.2,1),background 0.36s cubic-bezier(0.4,0,0.2,1)}.q-field--standout .q-field__control:hover:before{opacity:1}.q-field--standout.q-field--rounded .q-field__control{border-radius:28px}.q-field--standout.q-field--focused .q-field__control{box-shadow:0 1px 5px rgba(0,0,0,0.2),0 2px 2px rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12);background:#000}.q-field--standout.q-field--focused .q-field__append,.q-field--standout.q-field--focused .q-field__input,.q-field--standout.q-field--focused .q-field__native,.q-field--standout.q-field--focused .q-field__prefix,.q-field--standout.q-field--focused .q-field__prepend,.q-field--standout.q-field--focused .q-field__suffix{color:#fff}.q-field--standout.q-field--readonly .q-field__control:before{opacity:1;background:transparent;border:1px dashed rgba(0,0,0,0.24)}.q-field--standout.q-field--dark .q-field__control,.q-field--standout.q-field--dark .q-field__control:before{background:hsla(0,0%,100%,0.07)}.q-field--standout.q-field--dark.q-field--focused .q-field__control{background:#fff}.q-field--standout.q-field--dark.q-field--focused .q-field__append,.q-field--standout.q-field--dark.q-field--focused .q-field__input,.q-field--standout.q-field--dark.q-field--focused .q-field__native,.q-field--standout.q-field--dark.q-field--focused .q-field__prefix,.q-field--standout.q-field--dark.q-field--focused .q-field__prepend,.q-field--standout.q-field--dark.q-field--focused .q-field__suffix{color:#000}.q-field--standout.q-field--dark.q-field--readonly .q-field__control:before{border-color:hsla(0,0%,100%,0.24)}.q-field--labeled .q-field__native,.q-field--labeled .q-field__prefix,.q-field--labeled .q-field__suffix{line-height:24px;padding-top:24px;padding-bottom:8px}.q-field--labeled:not(.q-field--float) .q-field__prefix,.q-field--labeled:not(.q-field--float) .q-field__suffix{opacity:0}.q-field--labeled:not(.q-field--float) .q-field__input:-ms-input-placeholder,.q-field--labeled:not(.q-field--float) .q-field__native:-ms-input-placeholder{color:transparent!important}.q-field--labeled:not(.q-field--float) .q-field__input::-webkit-input-placeholder,.q-field--labeled:not(.q-field--float) .q-field__native::-webkit-input-placeholder{color:transparent}.q-field--labeled:not(.q-field--float) .q-field__input::-moz-placeholder,.q-field--labeled:not(.q-field--float) .q-field__native::-moz-placeholder{color:transparent}.q-field--labeled:not(.q-field--float) .q-field__input:-ms-input-placeholder,.q-field--labeled:not(.q-field--float) .q-field__native:-ms-input-placeholder{color:transparent}.q-field--labeled:not(.q-field--float) .q-field__input::placeholder,.q-field--labeled:not(.q-field--float) .q-field__native::placeholder{color:transparent}.q-field--labeled.q-field--dense .q-field__native,.q-field--labeled.q-field--dense .q-field__prefix,.q-field--labeled.q-field--dense .q-field__suffix{padding-top:14px;padding-bottom:2px}.q-field--dense .q-field__control,.q-field--dense .q-field__marginal{height:40px}.q-field--dense .q-field__bottom{font-size:11px}.q-field--dense .q-field__label{font-size:14px;top:10px}.q-field--dense .q-field__before,.q-field--dense .q-field__prepend{padding-right:6px}.q-field--dense .q-field__after,.q-field--dense .q-field__append{padding-left:6px}.q-field--dense .q-field__append+.q-field__append{padding-left:2px}.q-field--dense .q-avatar{font-size:24px}.q-field--dense.q-field--float .q-field__label{transform:translateY(-30%) scale(0.75)}.q-field--dense .q-field__input:-webkit-autofill+.q-field__label,.q-field--dense .q-field__native:-webkit-autofill+.q-field__label{transform:translateY(-30%) scale(0.75)}.q-field--dense .q-field__input[type=number]:invalid+.q-field__label,.q-field--dense .q-field__native[type=number]:invalid+.q-field__label{transform:translateY(-30%) scale(0.75)}.q-field--borderless.q-field--dense .q-field__control,.q-field--borderless .q-field__bottom,.q-field--standard.q-field--dense .q-field__control,.q-field--standard .q-field__bottom{padding-left:0;padding-right:0}.q-field--error .q-field__label{-webkit-animation:q-field-label 0.36s;animation:q-field-label 0.36s}.q-field--error .q-field__bottom{color:#c10015;color:var(--q-color-negative)}.q-field--auto-height .q-field__control{height:auto}.q-field--auto-height .q-field__control,.q-field--auto-height .q-field__native{min-height:56px}.q-field--auto-height .q-field__native{align-items:center}.q-field--auto-height .q-field__control-container{padding-top:0}.q-field--auto-height .q-field__native,.q-field--auto-height .q-field__prefix,.q-field--auto-height .q-field__suffix{line-height:18px}.q-field--auto-height.q-field--labeled .q-field__control-container{padding-top:24px}.q-field--auto-height.q-field--labeled .q-field__native,.q-field--auto-height.q-field--labeled .q-field__prefix,.q-field--auto-height.q-field--labeled .q-field__suffix{padding-top:0}.q-field--auto-height.q-field--labeled .q-field__native{min-height:24px}.q-field--auto-height.q-field--dense .q-field__control,.q-field--auto-height.q-field--dense .q-field__native{min-height:40px}.q-field--auto-height.q-field--dense.q-field--labeled .q-field__control-container{padding-top:14px}.q-field--auto-height.q-field--dense.q-field--labeled .q-field__native{min-height:24px}.q-field--square .q-field__control{border-radius:0!important}.q-transition--field-message-enter-active,.q-transition--field-message-leave-active{transition:transform 0.6s cubic-bezier(0.86,0,0.07,1),opacity 0.6s cubic-bezier(0.86,0,0.07,1)}.q-transition--field-message-enter,.q-transition--field-message-leave-to{opacity:0;transform:translateY(-10px)}.q-transition--field-message-leave,.q-transition--field-message-leave-active{position:absolute}.q-file{width:100%}.q-file .q-field__native{word-break:break-all}.q-file .q-field__input{opacity:0!important}.q-file .q-field__input::-webkit-file-upload-button{cursor:pointer}.q-file__dnd{outline:1px dashed currentColor;outline-offset:-4px}.q-form,.q-img{position:relative}.q-img{width:100%;display:inline-block;vertical-align:middle}.q-img__loading .q-spinner{font-size:50px}.q-img__image{border-radius:inherit;background-repeat:no-repeat}.q-img__content{overflow:hidden;border-radius:inherit}.q-img__content>div{position:absolute;padding:16px;color:#fff;background:rgba(0,0,0,0.47)}.q-img--menu .q-img__image{pointer-events:none}.q-img--menu .q-img__image>img{pointer-events:all;opacity:0}.q-img--menu .q-img__content{pointer-events:none}.q-img--menu .q-img__content>div{pointer-events:all}.q-inner-loading{background:hsla(0,0%,100%,0.6)}.q-inner-loading--dark{background:rgba(0,0,0,0.4)}.q-textarea .q-field__control{min-height:56px;height:auto}.q-textarea .q-field__control-container{padding-top:2px;padding-bottom:2px}.q-textarea .q-field__native,.q-textarea .q-field__prefix,.q-textarea .q-field__suffix{line-height:18px}.q-textarea .q-field__native{resize:vertical;padding-top:17px;min-height:52px}.q-textarea.q-field--labeled .q-field__control-container{padding-top:26px}.q-textarea.q-field--labeled .q-field__native,.q-textarea.q-field--labeled .q-field__prefix,.q-textarea.q-field--labeled .q-field__suffix{padding-top:0}.q-textarea.q-field--labeled .q-field__native{min-height:26px;padding-top:1px}.q-textarea--autogrow .q-field__native{resize:none}.q-textarea.q-field--dense .q-field__control,.q-textarea.q-field--dense .q-field__native{min-height:36px}.q-textarea.q-field--dense .q-field__native{padding-top:9px}.q-textarea.q-field--dense.q-field--labeled .q-field__control-container{padding-top:14px}.q-textarea.q-field--dense.q-field--labeled .q-field__native{min-height:24px;padding-top:3px}.q-textarea.q-field--dense.q-field--labeled .q-field__prefix,.q-textarea.q-field--dense.q-field--labeled .q-field__suffix{padding-top:2px}.q-textarea.disabled .q-field__native,body.mobile .q-textarea .q-field__native{resize:none}.q-intersection{position:relative}.q-item{min-height:48px;padding:8px 16px;color:inherit;transition:color 0.3s,background-color 0.3s}.q-item__section--side{color:#757575;align-items:flex-start;padding-right:16px;width:auto;min-width:0;max-width:100%}.q-item__section--side>.q-icon{font-size:24px}.q-item__section--side>.q-avatar{font-size:40px}.q-item__section--avatar{color:inherit;min-width:56px}.q-item__section--thumbnail img{width:100px;height:56px}.q-item__section--nowrap{white-space:nowrap}.q-item>.q-focus-helper+.q-item__section--thumbnail,.q-item>.q-item__section--thumbnail:first-child{margin-left:-16px}.q-item>.q-item__section--thumbnail:last-of-type{margin-right:-16px}.q-item__label{line-height:1.2em!important;max-width:100%}.q-item__label--overline{color:rgba(0,0,0,0.7)}.q-item__label--caption{color:rgba(0,0,0,0.54)}.q-item__label--header{color:#757575;padding:16px;font-size:0.875rem;line-height:1.25rem;letter-spacing:0.01786em}.q-list--padding .q-item__label--header,.q-separator--spaced+.q-item__label--header{padding-top:8px}.q-item__label+.q-item__label{margin-top:4px}.q-item__section--main{width:auto;min-width:0;max-width:100%;flex:10000 1 0%}.q-item__section--main+.q-item__section--main{margin-left:8px}.q-item__section--main~.q-item__section--side{align-items:flex-end;padding-right:0;padding-left:16px}.q-item__section--main.q-item__section--thumbnail{margin-left:0;margin-right:-16px}.q-list--bordered{border:1px solid rgba(0,0,0,0.12)}.q-list--separator>.q-item-type+.q-item-type,.q-list--separator>.q-virtual-scroll__content>.q-item-type+.q-item-type{border-top:1px solid rgba(0,0,0,0.12)}.q-list--padding{padding:8px 0}.q-item--dense,.q-list--dense>.q-item{min-height:32px;padding:2px 16px}.q-list--dark.q-list--separator>.q-item-type+.q-item-type,.q-list--dark.q-list--separator>.q-virtual-scroll__content>.q-item-type+.q-item-type{border-top-color:hsla(0,0%,100%,0.28)}.q-item--dark,.q-list--dark{color:#fff;border-color:hsla(0,0%,100%,0.28)}.q-item--dark .q-item__section--side:not(.q-item__section--avatar),.q-list--dark .q-item__section--side:not(.q-item__section--avatar){color:hsla(0,0%,100%,0.7)}.q-item--dark .q-item__label--header,.q-list--dark .q-item__label--header{color:hsla(0,0%,100%,0.64)}.q-item--dark .q-item__label--caption,.q-item--dark .q-item__label--overline,.q-list--dark .q-item__label--caption,.q-list--dark .q-item__label--overline{color:hsla(0,0%,100%,0.8)}.q-item{position:relative}.q-item--active,.q-item.q-router-link--active{color:#1976d2;color:var(--q-color-primary)}.q-knob{font-size:48px}.q-knob--editable{cursor:pointer;outline:0}.q-knob--editable:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;box-shadow:none;transition:box-shadow 0.24s ease-in-out}.q-knob--editable:focus:before{box-shadow:0 2px 4px -1px rgba(0,0,0,0.2),0 4px 5px rgba(0,0,0,0.14),0 1px 10px rgba(0,0,0,0.12)}.q-layout{width:100%}.q-layout-container{position:relative;width:100%;height:100%}.q-layout-container .q-layout{min-height:100%}.q-layout-container>div{transform:translate3d(0,0,0)}.q-layout-container>div>div{min-height:0;max-height:100%}.q-layout__shadow{width:100%}.q-layout__shadow:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;box-shadow:0 0 10px 2px rgba(0,0,0,0.2),0 0px 10px rgba(0,0,0,0.24)}.q-layout__section--marginal{background-color:#1976d2;background-color:var(--q-color-primary);color:#fff}.q-header--hidden{transform:translateY(-110%)}.q-header--bordered{border-bottom:1px solid rgba(0,0,0,0.12)}.q-header .q-layout__shadow{bottom:-10px}.q-header .q-layout__shadow:after{bottom:10px}.q-footer--hidden{transform:translateY(110%)}.q-footer--bordered{border-top:1px solid rgba(0,0,0,0.12)}.q-footer .q-layout__shadow{top:-10px}.q-footer .q-layout__shadow:after{top:10px}.q-footer,.q-header{z-index:2000}.q-drawer{position:absolute;top:0;bottom:0;background:#fff;z-index:1000}.q-drawer--on-top{z-index:3000}.q-drawer--left{left:0;transform:translateX(-100%)}.q-drawer--left.q-drawer--bordered{border-right:1px solid rgba(0,0,0,0.12)}.q-drawer--left .q-layout__shadow{left:10px;right:-10px}.q-drawer--left .q-layout__shadow:after{right:10px}.q-drawer--right{right:0;transform:translateX(100%)}.q-drawer--right.q-drawer--bordered{border-left:1px solid rgba(0,0,0,0.12)}.q-drawer--right .q-layout__shadow{left:-10px}.q-drawer--right .q-layout__shadow:after{left:10px}.q-drawer-container:not(.q-drawer--mini-animate) .q-drawer--mini{padding:0!important}.q-drawer-container:not(.q-drawer--mini-animate) .q-drawer--mini .q-item,.q-drawer-container:not(.q-drawer--mini-animate) .q-drawer--mini .q-item__section{text-align:center;justify-content:center;padding-left:0;padding-right:0;min-width:0}.q-drawer--mini .q-expansion-item__content,.q-drawer--mini .q-mini-drawer-hide,.q-drawer-container:not(.q-drawer--mini-animate) .q-drawer--mini .q-item__label,.q-drawer-container:not(.q-drawer--mini-animate) .q-drawer--mini .q-item__section--main,.q-drawer-container:not(.q-drawer--mini-animate) .q-drawer--mini .q-item__section--side~.q-item__section--side{display:none}.q-drawer--mini-animate .q-drawer__content{overflow-x:hidden;white-space:nowrap}.q-drawer--mobile .q-mini-drawer-hide,.q-drawer--mobile .q-mini-drawer-only,.q-drawer--standard .q-mini-drawer-only{display:none}.q-drawer__backdrop{z-index:2999!important;will-change:background-color}.q-drawer__opener{z-index:2001;height:100%;width:15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.q-footer,.q-header,.q-layout,.q-page{position:relative}.q-page-sticky--shrink{pointer-events:none}.q-page-sticky--shrink>div{display:inline-block;pointer-events:auto}body.q-ios-padding .q-layout--standard .q-drawer--top-padding .q-drawer__content,body.q-ios-padding .q-layout--standard .q-header>.q-tabs:nth-child(2) .q-tabs-head,body.q-ios-padding .q-layout--standard .q-header>.q-toolbar:nth-child(2){padding-top:20px;min-height:70px;padding-top:env(safe-area-inset-top);min-height:calc(env(safe-area-inset-top) + 50px)}body.q-ios-padding .q-layout--standard .q-drawer--top-padding .q-drawer__content,body.q-ios-padding .q-layout--standard .q-footer>.q-tabs:last-child .q-tabs-head,body.q-ios-padding .q-layout--standard .q-footer>.q-toolbar:last-child{padding-bottom:env(safe-area-inset-bottom);min-height:calc(env(safe-area-inset-bottom) + 50px)}.q-body--layout-animate .q-drawer__backdrop{transition:background-color 0.12s!important}.q-body--layout-animate .q-drawer{transition:transform 0.12s,width 0.12s,top 0.12s,bottom 0.12s!important}.q-body--layout-animate .q-layout__section--marginal{transition:transform 0.12s,left 0.12s,right 0.12s!important}.q-body--layout-animate .q-page-container{transition:padding-top 0.12s,padding-right 0.12s,padding-bottom 0.12s,padding-left 0.12s!important}.q-body--layout-animate .q-page-sticky{transition:transform 0.12s,left 0.12s,right 0.12s,top 0.12s,bottom 0.12s!important}.q-body--drawer-toggle{overflow-x:hidden!important}@media (max-width:599px){.q-layout-padding{padding:8px}}@media (min-width:600px) and (max-width:1439px){.q-layout-padding{padding:16px}}@media (min-width:1440px){.q-layout-padding{padding:24px}}body.body--dark .q-drawer,body.body--dark .q-footer,body.body--dark .q-header{border-color:hsla(0,0%,100%,0.28)}body.platform-ios .q-layout--containerized{position:unset!important}.q-linear-progress{position:relative;width:100%;overflow:hidden;font-size:4px;height:1em;color:#1976d2;color:var(--q-color-primary)}.q-linear-progress--reverse{transform:scale3d(-1,1,1)}.q-linear-progress__model,.q-linear-progress__track{transform-origin:0 0;transition:transform 0.3s}.q-linear-progress__model--determinate{background:currentColor}.q-linear-progress__model--indeterminate,.q-linear-progress__model--query{transition:none}.q-linear-progress__model--indeterminate:after,.q-linear-progress__model--indeterminate:before,.q-linear-progress__model--query:after,.q-linear-progress__model--query:before{background:currentColor;content:"";position:absolute;top:0;right:0;bottom:0;left:0;transform-origin:0 0}.q-linear-progress__model--indeterminate:before,.q-linear-progress__model--query:before{-webkit-animation:q-linear-progress--indeterminate 2.1s cubic-bezier(0.65,0.815,0.735,0.395) infinite;animation:q-linear-progress--indeterminate 2.1s cubic-bezier(0.65,0.815,0.735,0.395) infinite}.q-linear-progress__model--indeterminate:after,.q-linear-progress__model--query:after{transform:translate3d(-101%,0,0) scale3d(1,1,1);-webkit-animation:q-linear-progress--indeterminate-short 2.1s cubic-bezier(0.165,0.84,0.44,1) infinite;animation:q-linear-progress--indeterminate-short 2.1s cubic-bezier(0.165,0.84,0.44,1) infinite;-webkit-animation-delay:1.15s;animation-delay:1.15s}.q-linear-progress__track{opacity:0.4}.q-linear-progress__track--light{background:rgba(0,0,0,0.26)}.q-linear-progress__track--dark{background:hsla(0,0%,100%,0.6)}.q-linear-progress__stripe{transition:width 0.3s;background-image:linear-gradient(45deg,hsla(0,0%,100%,0.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,0.15) 0,hsla(0,0%,100%,0.15) 75%,transparent 0,transparent)!important;background-size:40px 40px!important}.q-menu{position:fixed!important;display:inline-block;max-width:95vw;box-shadow:0 1px 5px rgba(0,0,0,0.2),0 2px 2px rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12);background:#fff;border-radius:4px;overflow-y:auto;overflow-x:hidden;outline:0;max-height:65vh;z-index:6000}.q-menu--square{border-radius:0}.q-option-group--inline>div{display:inline-block}.q-pagination input{text-align:center;-moz-appearance:textfield}.q-pagination input::-webkit-inner-spin-button,.q-pagination input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.q-pagination .q-btn__wrapper{padding:0 5px!important}.q-parallax{position:relative;width:100%;overflow:hidden;border-radius:inherit}.q-parallax__media>img,.q-parallax__media>video{position:absolute;left:50%;bottom:0;min-width:100%;min-height:100%;will-change:transform}.q-popup-edit{padding:8px 16px}.q-popup-edit__buttons{margin-top:8px}.q-popup-edit__buttons .q-btn+.q-btn{margin-left:8px}.q-pull-to-refresh{position:relative}.q-pull-to-refresh__puller{border-radius:50%;width:40px;height:40px;color:#1976d2;color:var(--q-color-primary);background:#fff;box-shadow:0 0 4px 0 rgba(0,0,0,0.3)}.q-pull-to-refresh__puller--animating{transition:transform 0.3s,opacity 0.3s}.q-radio{vertical-align:middle}.q-radio__bg{top:25%;left:25%;width:50%;height:50%}.q-radio__bg path{fill:currentColor}.q-radio__native{width:1px;height:1px}.q-radio__check{transform-origin:50% 50%;transform:scale3d(0,0,1);transition:transform 0.22s cubic-bezier(0,0,0.2,1) 0ms}.q-radio__inner{font-size:40px;width:1em;min-width:1em;height:1em;outline:0;border-radius:50%;color:rgba(0,0,0,0.54)}.q-radio__inner--truthy{color:#1976d2;color:var(--q-color-primary)}.q-radio__inner--truthy .q-radio__check{transform:scale3d(1,1,1)}.q-radio.disabled{opacity:0.75!important}.q-radio--dark .q-radio__inner{color:hsla(0,0%,100%,0.7)}.q-radio--dark .q-radio__inner:before{opacity:0.32!important}.q-radio--dark .q-radio__inner--truthy{color:#1976d2;color:var(--q-color-primary)}.q-radio--dense .q-radio__inner{width:0.5em;min-width:0.5em;height:0.5em}.q-radio--dense .q-radio__bg{left:0;top:0;width:100%;height:100%}.q-radio--dense .q-radio__label{padding-left:0.5em}.q-radio--dense.reverse .q-radio__label{padding-left:0;padding-right:0.5em}body.desktop .q-radio:not(.disabled) .q-radio__inner:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;background:currentColor;opacity:0.12;transform:scale3d(0,0,1);transition:transform 0.22s cubic-bezier(0,0,0.2,1) 0ms}body.desktop .q-radio:not(.disabled):focus .q-radio__inner:before,body.desktop .q-radio:not(.disabled):hover .q-radio__inner:before{transform:scale3d(1,1,1)}body.desktop .q-radio--dense:not(.disabled):focus .q-radio__inner:before,body.desktop .q-radio--dense:not(.disabled):hover .q-radio__inner:before{transform:scale3d(1.5,1.5,1)}.q-rating{color:#ffeb3b;vertical-align:middle}.q-rating__icon{color:currentColor;text-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);position:relative;opacity:0.4;transition:transform 0.2s ease-in,opacity 0.2s ease-in}.q-rating__icon--hovered{transform:scale(1.3)}.q-rating__icon--active{opacity:1}.q-rating__icon--exselected{opacity:0.7}.q-rating__icon+.q-rating__icon{margin-left:2px}.q-rating--no-dimming .q-rating__icon{opacity:1}.q-rating--editable .q-icon{cursor:pointer}.q-rating--non-editable span,.q-rating .q-icon{outline:0}.q-responsive{position:relative;max-width:100%;max-height:100%}.q-responsive__filler{width:inherit;max-width:inherit;height:inherit;max-height:inherit}.q-responsive__content{border-radius:inherit}.q-responsive__content>*{width:100%!important;height:100%!important;max-height:100%!important;max-width:100%!important}.q-scrollarea{position:relative}.q-scrollarea__bar,.q-scrollarea__thumb{opacity:0.2;transition:opacity 0.3s;will-change:opacity;cursor:-webkit-grab;cursor:grab}.q-scrollarea__bar--v,.q-scrollarea__thumb--v{right:0;width:10px}.q-scrollarea__bar--h,.q-scrollarea__thumb--h{bottom:0;height:10px}.q-scrollarea__bar--invisible,.q-scrollarea__thumb--invisible{opacity:0!important;pointer-events:none}.q-scrollarea__thumb{background:#000}.q-scrollarea__thumb:hover{opacity:0.3}.q-scrollarea__thumb:active{opacity:0.5}.q-scrollarea--dark .q-scrollarea__thumb{background:#fff}.q-select--without-input .q-field__control{cursor:pointer}.q-select--with-input .q-field__control{cursor:text}.q-select .q-field__input{min-width:50px!important}.q-select .q-field__input--padding{padding-left:4px}.q-select__autocomplete-input{width:0;height:0;padding:0;border:0;opacity:0}.q-select__dropdown-icon{cursor:pointer}.q-select.q-field--readonly .q-field__control,.q-select.q-field--readonly .q-select__dropdown-icon{cursor:default}.q-select__dialog{width:90vw!important;max-width:90vw!important;max-height:calc(100vh - 70px)!important;background:#fff;display:flex;flex-direction:column}.q-select__dialog>.scroll{position:relative;background:inherit}body.mobile:not(.native-mobile) .q-select__dialog{max-height:calc(100vh - 108px)!important}body.platform-android.native-mobile .q-dialog__inner--top .q-select__dialog{max-height:calc(100vh - 24px)!important}body.platform-android:not(.native-mobile) .q-dialog__inner--top .q-select__dialog{max-height:calc(100vh - 80px)!important}body.platform-ios.native-mobile .q-dialog__inner--top>div{border-radius:4px}body.platform-ios.native-mobile .q-dialog__inner--top .q-select__dialog--focused{max-height:47vh!important}body.platform-ios:not(.native-mobile) .q-dialog__inner--top .q-select__dialog--focused{max-height:50vh!important}.q-separator{border:0;background:rgba(0,0,0,0.12);margin:0;transition:background 0.3s,opacity 0.3s}.q-separator--dark{background:hsla(0,0%,100%,0.28)}.q-separator--horizontal{display:block;height:1px;min-height:1px;width:100%}.q-separator--horizontal.q-separator--spaced{margin-top:8px;margin-bottom:8px}.q-separator--horizontal.q-separator--inset{margin-left:16px;margin-right:16px;width:calc(100% - 32px)}.q-separator--horizontal.q-separator--item-inset{margin-left:72px;margin-right:0;width:calc(100% - 72px)}.q-separator--horizontal.q-separator--item-thumbnail-inset{margin-left:116px;margin-right:0;width:calc(100% - 116px)}.q-separator--vertical{width:1px;min-width:1px;height:inherit}.q-separator--vertical.q-separator--spaced{margin-left:8px;margin-right:8px}.q-separator--vertical.q-separator--inset{margin-top:8px;margin-bottom:8px}.q-skeleton{cursor:wait;background:rgba(0,0,0,0.12);border-radius:4px;box-sizing:border-box}.q-skeleton:before{content:"\00a0"}.q-skeleton--type-text{transform:scale(1,0.5)}.q-skeleton--type-circle,.q-skeleton--type-QAvatar{height:48px;width:48px;border-radius:50%}.q-skeleton--type-QBtn{width:90px;height:36px}.q-skeleton--type-QBadge{width:70px;height:16px}.q-skeleton--type-QChip{width:90px;height:28px;border-radius:16px}.q-skeleton--type-QToolbar{height:50px}.q-skeleton--type-QCheckbox,.q-skeleton--type-QRadio{width:40px;height:40px;border-radius:50%}.q-skeleton--type-QToggle{width:56px;height:40px;border-radius:7px}.q-skeleton--type-QRange,.q-skeleton--type-QSlider{height:40px}.q-skeleton--type-QInput{height:56px}.q-skeleton--bordered{border:1px solid rgba(0,0,0,0.05)}.q-skeleton--square{border-radius:0}.q-skeleton--anim-fade{-webkit-animation:q-skeleton--fade 1.5s linear 0.5s infinite;animation:q-skeleton--fade 1.5s linear 0.5s infinite}.q-skeleton--anim-pulse{-webkit-animation:q-skeleton--pulse 1.5s ease-in-out 0.5s infinite;animation:q-skeleton--pulse 1.5s ease-in-out 0.5s infinite}.q-skeleton--anim-pulse-x{-webkit-animation:q-skeleton--pulse-x 1.5s ease-in-out 0.5s infinite;animation:q-skeleton--pulse-x 1.5s ease-in-out 0.5s infinite}.q-skeleton--anim-pulse-y{-webkit-animation:q-skeleton--pulse-y 1.5s ease-in-out 0.5s infinite;animation:q-skeleton--pulse-y 1.5s ease-in-out 0.5s infinite}.q-skeleton--anim-blink,.q-skeleton--anim-pop,.q-skeleton--anim-wave{position:relative;overflow:hidden;z-index:1}.q-skeleton--anim-blink:after,.q-skeleton--anim-pop:after,.q-skeleton--anim-wave:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0}.q-skeleton--anim-blink:after{background:hsla(0,0%,100%,0.7);-webkit-animation:q-skeleton--fade 1.5s linear 0.5s infinite;animation:q-skeleton--fade 1.5s linear 0.5s infinite}.q-skeleton--anim-wave:after{background:linear-gradient(90deg,transparent,hsla(0,0%,100%,0.5),transparent);-webkit-animation:q-skeleton--wave 1.5s linear 0.5s infinite;animation:q-skeleton--wave 1.5s linear 0.5s infinite}.q-skeleton--dark{background:hsla(0,0%,100%,0.05)}.q-skeleton--dark.q-skeleton--bordered{border:1px solid hsla(0,0%,100%,0.25)}.q-skeleton--dark.q-skeleton--anim-wave:after{background:linear-gradient(90deg,transparent,hsla(0,0%,100%,0.1),transparent)}.q-skeleton--dark.q-skeleton--anim-blink:after{background:hsla(0,0%,100%,0.2)}.q-slide-item{position:relative;background:#fff}.q-slide-item__bottom,.q-slide-item__left,.q-slide-item__right,.q-slide-item__top{visibility:hidden;font-size:14px;color:#fff}.q-slide-item__bottom .q-icon,.q-slide-item__left .q-icon,.q-slide-item__right .q-icon,.q-slide-item__top .q-icon{font-size:1.714em}.q-slide-item__left{background:#4caf50;padding:8px 16px}.q-slide-item__left>div{transform-origin:left center}.q-slide-item__right{background:#ff9800;padding:8px 16px}.q-slide-item__right>div{transform-origin:right center}.q-slide-item__top{background:#2196f3;padding:16px 8px}.q-slide-item__top>div{transform-origin:top center}.q-slide-item__bottom{background:#9c27b0;padding:16px 8px}.q-slide-item__bottom>div{transform-origin:bottom center}.q-slide-item__content{background:inherit;transition:transform 0.2s ease-in;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.q-slider{position:relative;width:100%;height:40px;color:#1976d2;color:var(--q-color-primary);outline:0}.q-slider__track-container{top:50%;margin-top:-1px;width:100%;height:2px;background:rgba(0,0,0,0.26)}.q-slider__track{will-change:width,left;background:currentColor;top:0;bottom:0}.q-slider__track-markers{color:#000;background-image:repeating-linear-gradient(90deg,currentColor,currentColor 2px,transparent 0,transparent)}.q-slider__track-markers:after{content:"";position:absolute;right:0;top:0;bottom:0;height:2px;width:2px;background:currentColor}.q-slider__thumb-container{top:50%;margin-top:-10px;width:20px;height:20px;transform:translateX(-10px);will-change:left;outline:0}.q-slider__thumb{top:0;left:0;transform:scale(1);transition:transform 0.18s ease-out,fill 0.18s ease-out,stroke 0.18s ease-out;stroke-width:3.5;stroke:currentColor}.q-slider__thumb path{stroke:currentColor;fill:currentColor}.q-slider__focus-ring{width:20px;height:20px;transition:transform 266.67ms ease-out,opacity 266.67ms ease-out,background-color 266.67ms ease-out;border-radius:50%;opacity:0;transition-delay:0.14s}.q-slider__arrow{position:absolute;top:20px;left:4px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid currentColor;transform-origin:50% 50%}.q-slider__arrow,.q-slider__pin{transform:scale(0) translateY(0);transition:transform 100ms ease-out}.q-slider__pin{top:0;right:0;margin-top:-4px;will-change:left;z-index:1;white-space:nowrap}.q-slider__pin-text-container{min-height:25px;padding:2px 8px;border-radius:4px;background:currentColor;position:relative;right:-50%;text-align:center}.q-slider__pin-text{color:#fff;font-size:12px}.q-slider--editable{cursor:-webkit-grab;cursor:grab}.q-slider--no-value .q-slider__thumb,.q-slider--no-value .q-slider__track{visibility:hidden}.q-slider--focus .q-slider__thumb{transform:scale(1)}.q-slider--focus .q-slider__focus-ring,body.desktop .q-slider.q-slider--editable:hover .q-slider__focus-ring{background:currentColor;transform:scale3d(1.55,1.55,1);opacity:0.25}.q-slider--focus .q-slider__thumb,.q-slider--focus .q-slider__track,body.desktop .q-slider.q-slider--editable:hover .q-slider__thumb,body.desktop .q-slider.q-slider--editable:hover .q-slider__track{visibility:visible}.q-slider--inactive .q-slider__thumb-container{transition:left 0.28s,right 0.28s}.q-slider--inactive .q-slider__track{transition:width 0.28s,left 0.28s,right 0.28s}.q-slider--active{cursor:-webkit-grabbing;cursor:grabbing}.q-slider--active .q-slider__thumb{transform:scale(1.5)}.q-slider--active.q-slider--label .q-slider__thumb,.q-slider--active .q-slider__focus-ring{transform:scale(0)!important}.q-slider--label.q-slider--active .q-slider__arrow,.q-slider--label.q-slider--active .q-slider__pin,.q-slider--label .q-slider--focus .q-slider__arrow,.q-slider--label .q-slider--focus .q-slider__pin,.q-slider--label.q-slider--label-always .q-slider__arrow,.q-slider--label.q-slider--label-always .q-slider__pin,body.desktop .q-slider.q-slider--editable:hover .q-slider__arrow,body.desktop .q-slider.q-slider--editable:hover .q-slider__pin{transform:scale(1) translateY(-25px)}.q-slider--dark .q-slider__track-container{background:hsla(0,0%,100%,0.3)}.q-slider--dark .q-slider__track-markers{color:#fff}.q-slider--reversed .q-slider__thumb-container{transform:translateX(10px)}.q-slider--dense{height:20px}.q-space{flex-grow:1!important}.q-spinner{vertical-align:middle}.q-spinner-mat{-webkit-animation:q-spin 2s linear infinite;animation:q-spin 2s linear infinite;transform-origin:center center}.q-spinner-mat .path{stroke-dasharray:1,200;stroke-dashoffset:0;-webkit-animation:q-mat-dash 1.5s ease-in-out infinite;animation:q-mat-dash 1.5s ease-in-out infinite}.q-splitter__panel{position:relative;z-index:0}.q-splitter__panel>.q-splitter{width:100%;height:100%}.q-splitter__separator{background-color:rgba(0,0,0,0.12);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;z-index:1}.q-splitter__separator-area>*{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.q-splitter--dark .q-splitter__separator{background-color:hsla(0,0%,100%,0.28)}.q-splitter--vertical>.q-splitter__panel{height:100%}.q-splitter--vertical.q-splitter--active{cursor:col-resize}.q-splitter--vertical>.q-splitter__separator{width:1px}.q-splitter--vertical>.q-splitter__separator>div{left:-6px;right:-6px}.q-splitter--vertical.q-splitter--workable>.q-splitter__separator{cursor:col-resize}.q-splitter--horizontal>.q-splitter__panel{width:100%}.q-splitter--horizontal.q-splitter--active{cursor:row-resize}.q-splitter--horizontal>.q-splitter__separator{height:1px}.q-splitter--horizontal>.q-splitter__separator>div{top:-6px;bottom:-6px}.q-splitter--horizontal.q-splitter--workable>.q-splitter__separator{cursor:row-resize}.q-splitter__after,.q-splitter__before{overflow:auto}.q-stepper{box-shadow:0 1px 5px rgba(0,0,0,0.2),0 2px 2px rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12);border-radius:4px;background:#fff}.q-stepper__title{font-size:14px;line-height:18px;letter-spacing:0.1px}.q-stepper__caption{font-size:12px;line-height:14px}.q-stepper__dot{margin-right:8px;font-size:14px;width:24px;min-width:24px;height:24px;border-radius:50%;background:currentColor}.q-stepper__dot span{color:#fff}.q-stepper__tab{padding:8px 24px;font-size:14px;color:#9e9e9e;flex-direction:row}.q-stepper--dark .q-stepper__dot span{color:#000}.q-stepper__tab--navigation{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.q-stepper__tab--active,.q-stepper__tab--done{color:#1976d2;color:var(--q-color-primary)}.q-stepper__tab--active .q-stepper__dot,.q-stepper__tab--active .q-stepper__label,.q-stepper__tab--done .q-stepper__dot,.q-stepper__tab--done .q-stepper__label{text-shadow:0 0 0 currentColor}.q-stepper__tab--disabled .q-stepper__dot{background:rgba(0,0,0,0.22)}.q-stepper__tab--disabled .q-stepper__label{color:rgba(0,0,0,0.32)}.q-stepper__tab--error{color:#c10015;color:var(--q-color-negative)}.q-stepper__tab--error .q-stepper__dot{background:transparent!important}.q-stepper__tab--error .q-stepper__dot span{color:currentColor;font-size:24px}.q-stepper__header{border-top-left-radius:inherit;border-top-right-radius:inherit}.q-stepper__header--border{border-bottom:1px solid rgba(0,0,0,0.12)}.q-stepper__header--standard-labels .q-stepper__tab{min-height:72px;justify-content:center}.q-stepper__header--standard-labels .q-stepper__tab:first-child{justify-content:flex-start}.q-stepper__header--standard-labels .q-stepper__tab:last-child{justify-content:flex-end}.q-stepper__header--standard-labels .q-stepper__dot:after{display:none}.q-stepper__header--alternative-labels .q-stepper__tab{min-height:104px;padding:24px 32px;flex-direction:column;justify-content:flex-start}.q-stepper__header--alternative-labels .q-stepper__dot{margin-right:0}.q-stepper__header--alternative-labels .q-stepper__label{margin-top:8px;text-align:center}.q-stepper__header--alternative-labels .q-stepper__label:after,.q-stepper__header--alternative-labels .q-stepper__label:before{display:none}.q-stepper__nav{padding-top:24px}.q-stepper--bordered{border:1px solid rgba(0,0,0,0.12)}.q-stepper--horizontal .q-stepper__step-inner{padding:24px}.q-stepper--horizontal .q-stepper__tab:first-child{border-top-left-radius:inherit}.q-stepper--horizontal .q-stepper__tab:last-child{border-top-right-radius:inherit}.q-stepper--horizontal .q-stepper__tab:first-child .q-stepper__dot:before,.q-stepper--horizontal .q-stepper__tab:last-child .q-stepper__dot:after,.q-stepper--horizontal .q-stepper__tab:last-child .q-stepper__label:after{display:none}.q-stepper--horizontal .q-stepper__tab{overflow:hidden}.q-stepper--horizontal .q-stepper__line:after,.q-stepper--horizontal .q-stepper__line:before{position:absolute;top:50%;height:1px;width:100vw;background:rgba(0,0,0,0.12)}.q-stepper--horizontal .q-stepper__dot:after,.q-stepper--horizontal .q-stepper__label:after{content:"";left:100%;margin-left:8px}.q-stepper--horizontal .q-stepper__dot:before{content:"";right:100%;margin-right:8px}.q-stepper--horizontal>.q-stepper__nav{padding:0 24px 24px}.q-stepper--vertical{padding:16px 0}.q-stepper--vertical .q-stepper__tab{padding:12px 24px}.q-stepper--vertical .q-stepper__title{line-height:18px}.q-stepper--vertical .q-stepper__step-inner{padding:0 24px 32px 60px}.q-stepper--vertical>.q-stepper__nav{padding:24px 24px 0}.q-stepper--vertical .q-stepper__step{overflow:hidden}.q-stepper--vertical .q-stepper__dot{margin-right:12px}.q-stepper--vertical .q-stepper__dot:after,.q-stepper--vertical .q-stepper__dot:before{content:"";position:absolute;left:50%;width:1px;height:99999px;background:rgba(0,0,0,0.12)}.q-stepper--vertical .q-stepper__dot:before{bottom:100%;margin-bottom:8px}.q-stepper--vertical .q-stepper__dot:after{top:100%;margin-top:8px}.q-stepper--vertical .q-stepper__step:first-child .q-stepper__dot:before,.q-stepper--vertical .q-stepper__step:last-child .q-stepper__dot:after{display:none}.q-stepper--vertical .q-stepper__step:last-child .q-stepper__step-inner{padding-bottom:8px}.q-stepper--dark.q-stepper--bordered,.q-stepper--dark .q-stepper__header--border{border-color:hsla(0,0%,100%,0.28)}.q-stepper--dark.q-stepper--horizontal .q-stepper__line:after,.q-stepper--dark.q-stepper--horizontal .q-stepper__line:before,.q-stepper--dark.q-stepper--vertical .q-stepper__dot:after,.q-stepper--dark.q-stepper--vertical .q-stepper__dot:before{background:hsla(0,0%,100%,0.28)}.q-stepper--dark .q-stepper__tab--disabled{color:hsla(0,0%,100%,0.28)}.q-stepper--dark .q-stepper__tab--disabled .q-stepper__dot{background:hsla(0,0%,100%,0.28)}.q-stepper--dark .q-stepper__tab--disabled .q-stepper__label{color:hsla(0,0%,100%,0.54)}.q-stepper--contracted .q-stepper__header,.q-stepper--contracted .q-stepper__header--alternative-labels .q-stepper__tab{min-height:72px}.q-stepper--contracted .q-stepper__header--alternative-labels .q-stepper__tab:first-child{align-items:flex-start}.q-stepper--contracted .q-stepper__header--alternative-labels .q-stepper__tab:last-child{align-items:flex-end}.q-stepper--contracted .q-stepper__header .q-stepper__tab{padding:24px 0}.q-stepper--contracted .q-stepper__header .q-stepper__tab:first-child .q-stepper__dot{transform:translateX(24px)}.q-stepper--contracted .q-stepper__header .q-stepper__tab:last-child .q-stepper__dot{transform:translateX(-24px)}.q-stepper--contracted .q-stepper__tab:not(:last-child) .q-stepper__dot:after{display:block!important}.q-stepper--contracted .q-stepper__dot{margin:0}.q-stepper--contracted .q-stepper__label{display:none}.q-tab-panels{background:#fff}.q-tab-panel{padding:16px}.q-markup-table{overflow:auto;background:#fff}.q-table{width:100%;max-width:100%;border-collapse:separate;border-spacing:0}.q-table tbody td,.q-table thead tr{height:48px}.q-table th{font-weight:500;font-size:12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.q-table th.sortable{cursor:pointer}.q-table th.sortable:hover .q-table__sort-icon{opacity:0.64}.q-table th.sorted .q-table__sort-icon{opacity:0.86!important}.q-table th.sort-desc .q-table__sort-icon{transform:rotate(180deg)}.q-table td,.q-table th{padding:7px 16px;background-color:inherit}.q-table td,.q-table th,.q-table thead{border-style:solid;border-width:0}.q-table tbody td{font-size:13px}.q-table__card{color:#000;background-color:#fff;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,0.2),0 2px 2px rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12)}.q-table__card .q-table__middle{flex:1 1 auto}.q-table__container{position:relative}.q-table__container>div:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.q-table__container>div:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.q-table__container>.q-inner-loading{border-radius:inherit!important}.q-table__top{padding:12px 16px}.q-table__top .q-table__control{flex-wrap:wrap}.q-table__title{font-size:20px;letter-spacing:0.005em;font-weight:400}.q-table__separator{min-width:8px!important}.q-table__progress{height:0!important}.q-table__progress th{padding:0!important;border:0!important}.q-table__progress .q-linear-progress{position:absolute;bottom:0}.q-table__middle{max-width:100%}.q-table__bottom{min-height:48px;padding:4px 14px 4px 16px;font-size:12px}.q-table__bottom .q-table__control{min-height:24px}.q-table__bottom-nodata-icon{font-size:200%;margin-right:8px}.q-table__bottom-item{margin-right:16px}.q-table__control{display:flex;align-items:center}.q-table__sort-icon{transition:transform 0.3s cubic-bezier(0.25,0.8,0.5,1);opacity:0;font-size:120%}.q-table__sort-icon--center,.q-table__sort-icon--left{margin-left:4px}.q-table__sort-icon--right{margin-right:4px}.q-table--col-auto-width{width:1px}.q-table--flat{box-shadow:none}.q-table--bordered{border:1px solid rgba(0,0,0,0.12)}.q-table--square{border-radius:0}.q-table__linear-progress{height:2px}.q-table--no-wrap td,.q-table--no-wrap th{white-space:nowrap}.q-table--grid{box-shadow:none;border-radius:4px}.q-table--grid .q-table__top{padding-bottom:4px}.q-table--grid .q-table__middle{min-height:2px;margin-bottom:4px}.q-table--grid .q-table__middle thead,.q-table--grid .q-table__middle thead th{border:0!important}.q-table--grid .q-table__linear-progress{bottom:0}.q-table--grid .q-table__bottom{border-top:0}.q-table--grid .q-table__grid-content{flex:1 1 auto}.q-table--grid.fullscreen{background:inherit}.q-table__grid-item-card{vertical-align:top;padding:12px}.q-table__grid-item-card .q-separator{margin:12px 0}.q-table__grid-item-row+.q-table__grid-item-row{margin-top:8px}.q-table__grid-item-title{opacity:0.54;font-weight:500;font-size:12px}.q-table__grid-item-value{font-size:13px}.q-table__grid-item{padding:4px;transition:transform 0.3s cubic-bezier(0.25,0.8,0.5,1)}.q-table__grid-item--selected{transform:scale(0.95)}.q-table--cell-separator tbody tr:not(:last-child) td,.q-table--cell-separator thead th,.q-table--horizontal-separator tbody tr:not(:last-child) td,.q-table--horizontal-separator thead th{border-bottom-width:1px}.q-table--cell-separator td,.q-table--cell-separator th,.q-table--vertical-separator td,.q-table--vertical-separator th{border-left-width:1px}.q-table--cell-separator.q-table--loading tr:nth-last-child(2) th,.q-table--cell-separator thead tr:last-child th,.q-table--vertical-separator.q-table--loading tr:nth-last-child(2) th,.q-table--vertical-separator thead tr:last-child th{border-bottom-width:1px}.q-table--cell-separator td:first-child,.q-table--cell-separator th:first-child,.q-table--vertical-separator td:first-child,.q-table--vertical-separator th:first-child{border-left:0}.q-table--cell-separator .q-table__top,.q-table--vertical-separator .q-table__top{border-bottom:1px solid rgba(0,0,0,0.12)}.q-table--dense .q-table__top{padding:6px 16px}.q-table--dense .q-table__bottom{min-height:33px}.q-table--dense .q-table__sort-icon{font-size:110%}.q-table--dense .q-table td,.q-table--dense .q-table th{padding:4px 8px}.q-table--dense .q-table tbody td,.q-table--dense .q-table tbody tr,.q-table--dense .q-table thead tr{height:28px}.q-table--dense .q-table td:first-child,.q-table--dense .q-table th:first-child{padding-left:16px}.q-table--dense .q-table td:last-child,.q-table--dense .q-table th:last-child{padding-right:16px}.q-table--dense .q-table__bottom-item{margin-right:8px}.q-table--dense .q-table__select .q-field__control,.q-table--dense .q-table__select .q-field__native{min-height:24px;padding:0}.q-table--dense .q-table__select .q-field__marginal{height:24px}.q-table__bottom{border-top:1px solid rgba(0,0,0,0.12)}.q-table td,.q-table th,.q-table thead,.q-table tr{border-color:rgba(0,0,0,0.12)}.q-table tbody td{position:relative}.q-table tbody td:after,.q-table tbody td:before{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none}.q-table tbody td:before{background:rgba(0,0,0,0.03)}.q-table tbody td:after{background:rgba(0,0,0,0.06)}.q-table tbody tr.selected td:after,body.desktop .q-table>tbody>tr:not(.q-tr--no-hover):hover>td:not(.q-td--no-hover):before{content:""}.q-table--dark,.q-table--dark .q-table__bottom,.q-table--dark td,.q-table--dark th,.q-table--dark thead,.q-table--dark tr,.q-table__card--dark{border-color:hsla(0,0%,100%,0.28)}.q-table--dark tbody td:before{background:hsla(0,0%,100%,0.07)}.q-table--dark tbody td:after{background:hsla(0,0%,100%,0.1)}.q-table--dark.q-table--cell-separator .q-table__top,.q-table--dark.q-table--vertical-separator .q-table__top{border-color:hsla(0,0%,100%,0.28)}.q-tab{padding:0 16px;min-height:48px;transition:color 0.3s,background-color 0.3s;text-transform:uppercase;white-space:nowrap;color:inherit;text-decoration:none}.q-tab--full{min-height:72px}.q-tab--no-caps{text-transform:none}.q-tab__content{height:inherit;padding:4px 0;min-width:40px}.q-tab__content--inline .q-tab__icon+.q-tab__label{padding-left:8px}.q-tab__content .q-chip--floating{top:0;right:-16px}.q-tab__icon{width:24px;height:24px;font-size:24px}.q-tab__label{font-size:14px;line-height:1.715em;font-weight:500}.q-tab .q-badge{top:3px;right:-12px}.q-tab__alert{position:absolute;top:7px;right:-9px;height:10px;width:10px;border-radius:50%;background:currentColor}.q-tab__indicator{opacity:0;height:2px;background:currentColor}.q-tab--active .q-tab__indicator{opacity:1;transform-origin:left}.q-tab--inactive{opacity:0.85}.q-tabs{position:relative;transition:color 0.3s,background-color 0.3s}.q-tabs--not-scrollable .q-tabs__arrow{display:none}.q-tabs--not-scrollable .q-tabs__content{border-radius:inherit}.q-tabs__arrow{cursor:pointer;font-size:32px;min-width:36px;text-shadow:0 0 3px #fff,0 0 1px #fff,0 0 1px #000}.q-tabs__arrow--faded{display:none}.q-tabs__content{overflow:hidden;flex:1 1 auto}.q-tabs__content--align-center{justify-content:center}.q-tabs__content--align-right{justify-content:flex-end}.q-tabs__content--align-justify .q-tab{flex:1 1 auto}.q-tabs__offset{display:none}.q-tabs--horizontal .q-tabs__arrow{height:100%}.q-tabs--horizontal .q-tabs__arrow--left{top:0;left:0;bottom:0}.q-tabs--horizontal .q-tabs__arrow--right{top:0;right:0;bottom:0}.q-tabs--vertical,.q-tabs--vertical .q-tabs__content{display:block!important;height:100%}.q-tabs--vertical .q-tabs__arrow{width:100%;height:36px;text-align:center}.q-tabs--vertical .q-tabs__arrow--left{top:0;left:0;right:0}.q-tabs--vertical .q-tabs__arrow--right{left:0;right:0;bottom:0}.q-tabs--vertical .q-tab{padding:0 8px}.q-tabs--vertical .q-tab__indicator{height:unset;width:2px}.q-tabs--vertical.q-tabs--not-scrollable .q-tabs__content{height:100%}.q-tabs--vertical.q-tabs--dense .q-tab__content{min-width:24px}.q-tabs--dense .q-tab{min-height:36px}.q-tabs--dense .q-tab--full{min-height:52px}body.mobile .q-tabs__content{overflow:auto}body.mobile .q-tabs__arrow{display:none}@media (min-width:1440px){.q-footer .q-tab__content,.q-header .q-tab__content{min-width:128px}}.q-time{box-shadow:0 1px 5px rgba(0,0,0,0.2),0 2px 2px rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12);border-radius:4px;background:#fff;outline:0;width:290px;min-width:290px;max-width:100%}.q-time--bordered{border:1px solid rgba(0,0,0,0.12)}.q-time__header{border-top-left-radius:inherit;color:#fff;background-color:#1976d2;background-color:var(--q-color-primary);padding:16px;font-weight:300}.q-time__actions{padding:0 16px 16px}.q-time__header-label{font-size:28px;line-height:1;letter-spacing:-0.00833em}.q-time__header-label>div+div{margin-left:4px}.q-time__link{opacity:0.56;outline:0;transition:opacity 0.3s ease-out}.q-time__link--active,.q-time__link:focus,.q-time__link:hover{opacity:1}.q-time__header-ampm{font-size:16px;letter-spacing:0.1em}.q-time__content{padding:16px}.q-time__content:before{content:"";display:block;padding-bottom:100%}.q-time__container-parent{padding:16px}.q-time__container-child{border-radius:50%;background:rgba(0,0,0,0.12)}.q-time__clock{padding:24px;width:100%;height:100%;max-width:100%;max-height:100%;font-size:14px}.q-time__clock-circle{position:relative}.q-time__clock-center{height:6px;width:6px;margin:auto;border-radius:50%;min-height:0;background:currentColor}.q-time__clock-pointer{width:2px;height:50%;transform-origin:0 0;min-height:0;position:absolute;left:50%;right:0;bottom:0;color:#1976d2;color:var(--q-color-primary);background:currentColor;transform:translateX(-50%)}.q-time__clock-pointer:after,.q-time__clock-pointer:before{content:"";position:absolute;left:50%;border-radius:50%;background:currentColor;transform:translateX(-50%)}.q-time__clock-pointer:before{bottom:-4px;width:8px;height:8px}.q-time__clock-pointer:after{top:-3px;height:6px;width:6px}.q-time__clock-position{position:absolute;min-height:32px;width:32px;height:32px;font-size:12px;line-height:32px;margin:0;padding:0;transform:translate(-50%,-50%);border-radius:50%}.q-time__clock-position--disable{opacity:0.4}.q-time__clock-position--active{background-color:#1976d2;background-color:var(--q-color-primary);color:#fff}.q-time__clock-pos-0{top:0%;left:50%}.q-time__clock-pos-1{top:6.7%;left:75%}.q-time__clock-pos-2{top:25%;left:93.3%}.q-time__clock-pos-3{top:50%;left:100%}.q-time__clock-pos-4{top:75%;left:93.3%}.q-time__clock-pos-5{top:93.3%;left:75%}.q-time__clock-pos-6{top:100%;left:50%}.q-time__clock-pos-7{top:93.3%;left:25%}.q-time__clock-pos-8{top:75%;left:6.7%}.q-time__clock-pos-9{top:50%;left:0%}.q-time__clock-pos-10{top:25%;left:6.7%}.q-time__clock-pos-11{top:6.7%;left:25%}.q-time__clock-pos-12{top:15%;left:50%}.q-time__clock-pos-13{top:19.69%;left:67.5%}.q-time__clock-pos-14{top:32.5%;left:80.31%}.q-time__clock-pos-15{top:50%;left:85%}.q-time__clock-pos-16{top:67.5%;left:80.31%}.q-time__clock-pos-17{top:80.31%;left:67.5%}.q-time__clock-pos-18{top:85%;left:50%}.q-time__clock-pos-19{top:80.31%;left:32.5%}.q-time__clock-pos-20{top:67.5%;left:19.69%}.q-time__clock-pos-21{top:50%;left:15%}.q-time__clock-pos-22{top:32.5%;left:19.69%}.q-time__clock-pos-23{top:19.69%;left:32.5%}.q-time__now-button{background-color:#1976d2;background-color:var(--q-color-primary);color:#fff;top:12px;right:12px}.q-time--readonly .q-time__content,.q-time--readonly .q-time__header-ampm,.q-time.disabled .q-time__content,.q-time.disabled .q-time__header-ampm{pointer-events:none}.q-time--portrait{display:inline-flex;flex-direction:column}.q-time--portrait .q-time__header{border-top-right-radius:inherit;min-height:86px}.q-time--portrait .q-time__header-ampm{margin-left:12px}.q-time--portrait.q-time--bordered .q-time__content{margin:1px 0}.q-time--landscape{display:inline-flex;align-items:stretch;min-width:420px}.q-time--landscape>div{display:flex;flex-direction:column;justify-content:center}.q-time--landscape .q-time__header{border-bottom-left-radius:inherit;min-width:156px}.q-time--landscape .q-time__header-ampm{margin-top:12px}.q-time--dark{border-color:hsla(0,0%,100%,0.28)}.q-timeline{padding:0;width:100%;list-style:none}.q-timeline h6{line-height:inherit}.q-timeline--dark{color:#fff}.q-timeline--dark .q-timeline__subtitle{opacity:0.7}.q-timeline__content{padding-bottom:24px}.q-timeline__title{margin-top:0;margin-bottom:16px}.q-timeline__subtitle{font-size:12px;margin-bottom:8px;opacity:0.4;text-transform:uppercase;letter-spacing:1px;font-weight:700}.q-timeline__dot{position:absolute;top:0;bottom:0;width:15px}.q-timeline__dot:after,.q-timeline__dot:before{content:"";background:currentColor;display:block;position:absolute}.q-timeline__dot:before{border:3px solid transparent;border-radius:100%;height:15px;width:15px;top:4px;left:0;transition:background 0.3s ease-in-out,border 0.3s ease-in-out}.q-timeline__dot:after{width:3px;opacity:0.4;top:24px;bottom:0;left:6px}.q-timeline__dot .q-icon{position:absolute;top:0;left:0;right:0;font-size:16px;height:38px;line-height:38px;width:100%;color:#fff}.q-timeline__dot-img{position:absolute;top:4px;left:0;right:0;height:31px;width:31px;background:currentColor;border-radius:50%}.q-timeline__heading{position:relative}.q-timeline__heading:first-child .q-timeline__heading-title{padding-top:0}.q-timeline__heading:last-child .q-timeline__heading-title{padding-bottom:0}.q-timeline__heading-title{padding:32px 0;margin:0}.q-timeline__entry{position:relative;line-height:22px}.q-timeline__entry:last-child{padding-bottom:0!important}.q-timeline__entry:last-child .q-timeline__dot:after{content:none}.q-timeline__entry--icon .q-timeline__dot{width:31px}.q-timeline__entry--icon .q-timeline__dot:before{height:31px;width:31px}.q-timeline__entry--icon .q-timeline__dot:after{top:41px;left:14px}.q-timeline__entry--icon .q-timeline__subtitle{padding-top:8px}.q-timeline--dense--right .q-timeline__entry{padding-left:40px}.q-timeline--dense--right .q-timeline__entry--icon .q-timeline__dot{left:-8px}.q-timeline--dense--right .q-timeline__dot{left:0}.q-timeline--dense--left .q-timeline__heading{text-align:right}.q-timeline--dense--left .q-timeline__entry{padding-right:40px}.q-timeline--dense--left .q-timeline__entry--icon .q-timeline__dot{right:-8px}.q-timeline--dense--left .q-timeline__content,.q-timeline--dense--left .q-timeline__subtitle,.q-timeline--dense--left .q-timeline__title{text-align:right}.q-timeline--dense--left .q-timeline__dot{right:0}.q-timeline--comfortable{display:table}.q-timeline--comfortable .q-timeline__heading{display:table-row;font-size:200%}.q-timeline--comfortable .q-timeline__heading>div{display:table-cell}.q-timeline--comfortable .q-timeline__entry{display:table-row;padding:0}.q-timeline--comfortable .q-timeline__entry--icon .q-timeline__content{padding-top:8px}.q-timeline--comfortable .q-timeline__content,.q-timeline--comfortable .q-timeline__dot,.q-timeline--comfortable .q-timeline__subtitle{display:table-cell;vertical-align:top}.q-timeline--comfortable .q-timeline__subtitle{width:35%}.q-timeline--comfortable .q-timeline__dot{position:relative;min-width:31px}.q-timeline--comfortable--right .q-timeline__heading .q-timeline__heading-title{margin-left:-50px}.q-timeline--comfortable--right .q-timeline__subtitle{text-align:right;padding-right:30px}.q-timeline--comfortable--right .q-timeline__content{padding-left:30px}.q-timeline--comfortable--right .q-timeline__entry--icon .q-timeline__dot{left:-8px}.q-timeline--comfortable--left .q-timeline__heading{text-align:right}.q-timeline--comfortable--left .q-timeline__heading .q-timeline__heading-title{margin-right:-50px}.q-timeline--comfortable--left .q-timeline__subtitle{padding-left:30px}.q-timeline--comfortable--left .q-timeline__content{padding-right:30px}.q-timeline--comfortable--left .q-timeline__content,.q-timeline--comfortable--left .q-timeline__title{text-align:right}.q-timeline--comfortable--left .q-timeline__entry--icon .q-timeline__dot{right:0}.q-timeline--comfortable--left .q-timeline__dot{right:-8px}.q-timeline--loose .q-timeline__heading-title{text-align:center;margin-left:0}.q-timeline--loose .q-timeline__content,.q-timeline--loose .q-timeline__dot,.q-timeline--loose .q-timeline__entry,.q-timeline--loose .q-timeline__subtitle{display:block;margin:0;padding:0}.q-timeline--loose .q-timeline__dot{position:absolute;left:50%;margin-left:-7.15px}.q-timeline--loose .q-timeline__entry{padding-bottom:24px;overflow:hidden}.q-timeline--loose .q-timeline__entry--icon .q-timeline__dot{margin-left:-15px}.q-timeline--loose .q-timeline__entry--icon .q-timeline__subtitle{line-height:38px}.q-timeline--loose .q-timeline__entry--icon .q-timeline__content{padding-top:8px}.q-timeline--loose .q-timeline__entry--left .q-timeline__content,.q-timeline--loose .q-timeline__entry--right .q-timeline__subtitle{float:left;padding-right:30px;text-align:right}.q-timeline--loose .q-timeline__entry--left .q-timeline__subtitle,.q-timeline--loose .q-timeline__entry--right .q-timeline__content{float:right;text-align:left;padding-left:30px}.q-timeline--loose .q-timeline__content,.q-timeline--loose .q-timeline__subtitle{width:50%}.q-toggle{vertical-align:middle}.q-toggle__native{width:1px;height:1px}.q-toggle__track{height:0.35em;border-radius:0.175em;opacity:0.38;background:currentColor}.q-toggle__thumb{top:0.25em;left:0.25em;width:0.5em;height:0.5em;transition:left 0.22s cubic-bezier(0.4,0,0.2,1);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0}.q-toggle__thumb:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;background:#fff;box-shadow:0 3px 1px -2px rgba(0,0,0,0.2),0 2px 2px 0 rgba(0,0,0,0.14),0 1px 5px 0 rgba(0,0,0,0.12)}.q-toggle__thumb .q-icon{font-size:0.3em;min-width:1em;color:#000;opacity:0.54;z-index:1}.q-toggle__inner{font-size:40px;width:1.4em;min-width:1.4em;height:1em;padding:0.325em 0.3em}.q-toggle__inner--indet .q-toggle__thumb{left:0.45em}.q-toggle__inner--truthy{color:#1976d2;color:var(--q-color-primary)}.q-toggle__inner--truthy .q-toggle__track{opacity:0.54}.q-toggle__inner--truthy .q-toggle__thumb{left:0.65em}.q-toggle__inner--truthy .q-toggle__thumb:after{background-color:currentColor}.q-toggle__inner--truthy .q-toggle__thumb .q-icon{color:#fff;opacity:1}.q-toggle.disabled{opacity:0.75!important}.q-toggle--dark .q-toggle__inner{color:#fff}.q-toggle--dark .q-toggle__inner--truthy{color:#1976d2;color:var(--q-color-primary)}.q-toggle--dark .q-toggle__thumb:before{opacity:0.32!important}.q-toggle--dense .q-toggle__inner{width:0.8em;min-width:0.8em;height:0.5em;padding:0.07625em 0}.q-toggle--dense .q-toggle__thumb{top:0;left:0}.q-toggle--dense .q-toggle__inner--indet .q-toggle__thumb{left:0.15em}.q-toggle--dense .q-toggle__inner--truthy .q-toggle__thumb{left:0.3em}.q-toggle--dense .q-toggle__label{padding-left:0.5em}.q-toggle--dense.reverse .q-toggle__label{padding-left:0;padding-right:0.5em}body.desktop .q-toggle:not(.disabled) .q-toggle__thumb:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;background:currentColor;opacity:0.12;transform:scale3d(0,0,1);transition:transform 0.22s cubic-bezier(0,0,0.2,1)}body.desktop .q-toggle:not(.disabled):focus .q-toggle__thumb:before,body.desktop .q-toggle:not(.disabled):hover .q-toggle__thumb:before{transform:scale3d(2,2,1)}body.desktop .q-toggle--dense:not(.disabled):focus .q-toggle__thumb:before,body.desktop .q-toggle--dense:not(.disabled):hover .q-toggle__thumb:before{transform:scale3d(1.5,1.5,1)}.q-toolbar{position:relative;padding:0 12px;min-height:50px;width:100%}.q-toolbar--inset{padding-left:58px}.q-toolbar .q-avatar{font-size:38px}.q-toolbar__title{flex:1 1 0%;min-width:1px;max-width:100%;font-size:21px;font-weight:400;letter-spacing:0.01em;padding:0 12px}.q-toolbar__title:first-child{padding-left:0}.q-toolbar__title:last-child{padding-right:0}.q-tooltip--style{font-size:10px;color:#fafafa;background:#757575;border-radius:4px;text-transform:none;font-weight:400}.q-tooltip{z-index:9000;position:fixed!important;overflow-y:auto;overflow-x:hidden;padding:6px 10px}@media (max-width:599px){.q-tooltip{font-size:14px;padding:8px 16px}}.q-tree{position:relative;color:#9e9e9e}.q-tree__node{padding:0 0 3px 22px}.q-tree__node:after{content:"";position:absolute;top:-3px;bottom:0;width:2px;right:auto;left:-13px;border-left:1px solid currentColor}.q-tree__node:last-child:after{display:none}.q-tree__node--disabled{pointer-events:none}.q-tree__node--disabled .disabled{opacity:1!important}.q-tree__node--disabled>.disabled,.q-tree__node--disabled>div,.q-tree__node--disabled>i{opacity:0.6!important}.q-tree__node--disabled>.disabled .q-tree__node--disabled>.disabled,.q-tree__node--disabled>.disabled .q-tree__node--disabled>div,.q-tree__node--disabled>.disabled .q-tree__node--disabled>i,.q-tree__node--disabled>div .q-tree__node--disabled>.disabled,.q-tree__node--disabled>div .q-tree__node--disabled>div,.q-tree__node--disabled>div .q-tree__node--disabled>i,.q-tree__node--disabled>i .q-tree__node--disabled>.disabled,.q-tree__node--disabled>i .q-tree__node--disabled>div,.q-tree__node--disabled>i .q-tree__node--disabled>i{opacity:1!important}.q-tree__node-header:before{content:"";position:absolute;top:-3px;bottom:50%;width:35px;left:-35px;border-left:1px solid currentColor;border-bottom:1px solid currentColor}.q-tree__children{padding-left:25px}.q-tree__node-body{padding:5px 0 8px 5px}.q-tree__node--parent{padding-left:2px}.q-tree__node--parent>.q-tree__node-header:before{width:15px;left:-15px}.q-tree__node--parent>.q-tree__node-collapsible>.q-tree__node-body{padding:5px 0 8px 27px}.q-tree__node--parent>.q-tree__node-collapsible>.q-tree__node-body:after{content:"";position:absolute;top:0;width:2px;height:100%;right:auto;left:12px;border-left:1px solid currentColor;bottom:50px}.q-tree__node--link{cursor:pointer}.q-tree__node-header{padding:4px;margin-top:3px;border-radius:4px;outline:0}.q-tree__node-header-content{color:#000;transition:color 0.3s}.q-tree__node--selected .q-tree__node-header-content{color:#9e9e9e}.q-tree__icon,.q-tree__node-header-content .q-icon,.q-tree__spinner{font-size:21px}.q-tree__img{height:42px}.q-tree__avatar,.q-tree__node-header-content .q-avatar{font-size:28px;border-radius:50%;width:28px;height:28px}.q-tree__arrow,.q-tree__spinner{font-size:16px}.q-tree__arrow{transition:transform 0.3s}.q-tree__arrow--rotate{transform:rotate3d(0,0,1,90deg)}.q-tree>.q-tree__node{padding:0}.q-tree>.q-tree__node:after,.q-tree>.q-tree__node>.q-tree__node-header:before{display:none}.q-tree>.q-tree__node--child>.q-tree__node-header{padding-left:24px}.q-tree--dark .q-tree__node-header-content{color:#fff}.q-tree--no-connectors .q-tree__node-body:after,.q-tree--no-connectors .q-tree__node-header:before,.q-tree--no-connectors .q-tree__node:after{display:none!important}[dir=rtl] .q-tree__arrow{transform:rotate3d(0,0,1,180deg)}[dir=rtl] .q-tree__arrow--rotate{transform:rotate3d(0,0,1,90deg)}.q-uploader{box-shadow:0 1px 5px rgba(0,0,0,0.2),0 2px 2px rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12);border-radius:4px;vertical-align:top;background:#fff;position:relative;width:320px;max-height:320px}.q-uploader--bordered{border:1px solid rgba(0,0,0,0.12)}.q-uploader__input{opacity:0;width:100%;height:100%;cursor:pointer!important}.q-uploader__input::-webkit-file-upload-button{cursor:pointer}.q-uploader__file:before,.q-uploader__header:before{content:"";border-top-left-radius:inherit;border-top-right-radius:inherit;position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;background:currentColor;opacity:0.04}.q-uploader__header{position:relative;border-top-left-radius:inherit;border-top-right-radius:inherit;background-color:#1976d2;background-color:var(--q-color-primary);color:#fff;width:100%}.q-uploader__spinner{font-size:24px;margin-right:4px}.q-uploader__header-content{padding:8px}.q-uploader__dnd{outline:1px dashed currentColor;outline-offset:-4px;background:hsla(0,0%,100%,0.6)}.q-uploader__overlay{font-size:36px;color:#000;background-color:hsla(0,0%,100%,0.6)}.q-uploader__list{position:relative;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;padding:8px;min-height:60px;flex:1 1 auto}.q-uploader__file{border-radius:4px 4px 0 0;border:1px solid rgba(0,0,0,0.12)}.q-uploader__file .q-circular-progress{font-size:24px}.q-uploader__file--img{color:#fff;height:200px;min-width:200px;background-position:50% 50%;background-size:cover;background-repeat:no-repeat}.q-uploader__file--img:before{content:none}.q-uploader__file--img .q-circular-progress{color:#fff}.q-uploader__file--img .q-uploader__file-header{padding-bottom:24px;background:linear-gradient(180deg,rgba(0,0,0,0.7) 20%,transparent)}.q-uploader__file+.q-uploader__file{margin-top:8px}.q-uploader__file-header{position:relative;padding:4px 8px;border-top-left-radius:inherit;border-top-right-radius:inherit}.q-uploader__file-header-content{padding-right:8px}.q-uploader__file-status{font-size:24px;margin-right:4px}.q-uploader__title{font-size:14px;font-weight:700;line-height:18px;word-break:break-word}.q-uploader__subtitle{font-size:12px;line-height:18px}.q-uploader--disable .q-uploader__header,.q-uploader--disable .q-uploader__list{pointer-events:none}.q-uploader--dark,.q-uploader--dark .q-uploader__file{border-color:hsla(0,0%,100%,0.28)}.q-uploader--dark .q-uploader__dnd,.q-uploader--dark .q-uploader__overlay{background:hsla(0,0%,100%,0.3)}.q-uploader--dark .q-uploader__overlay{color:#fff}.q-video{position:relative;overflow:hidden;border-radius:inherit}.q-video embed,.q-video iframe,.q-video object{width:100%;height:100%}.q-video--responsive{height:0}.q-video--responsive embed,.q-video--responsive iframe,.q-video--responsive object{position:absolute;top:0;left:0}.q-virtual-scroll:focus{outline:0}.q-virtual-scroll__padding{background:linear-gradient(transparent,transparent 20%,hsla(0,0%,50.2%,0.03) 0,hsla(0,0%,50.2%,0.08) 50%,hsla(0,0%,50.2%,0.03) 80%,transparent 0,transparent);background-size:100% 50px}.q-table .q-virtual-scroll__padding tr{height:0!important}.q-table .q-virtual-scroll__padding td{padding:0!important}.q-virtual-scroll--horizontal{align-items:stretch}.q-virtual-scroll--horizontal,.q-virtual-scroll--horizontal .q-virtual-scroll__content{display:flex;flex-direction:row;flex-wrap:nowrap}.q-virtual-scroll--horizontal .q-virtual-scroll__content,.q-virtual-scroll--horizontal .q-virtual-scroll__content>*,.q-virtual-scroll--horizontal .q-virtual-scroll__padding{flex:0 0 auto}.q-virtual-scroll--horizontal .q-virtual-scroll__padding{background:linear-gradient(270deg,transparent,transparent 20%,hsla(0,0%,50.2%,0.03) 0,hsla(0,0%,50.2%,0.08) 50%,hsla(0,0%,50.2%,0.03) 80%,transparent 0,transparent);background-size:50px 100%}.q-ripple{width:100%;height:100%;border-radius:inherit;z-index:0;overflow:hidden;contain:strict}.q-ripple,.q-ripple__inner{position:absolute;top:0;left:0;color:inherit;pointer-events:none}.q-ripple__inner{opacity:0;border-radius:50%;background:currentColor;will-change:transform,opacity}.q-ripple__inner--enter{transition:transform 0.225s cubic-bezier(0.4,0,0.2,1),opacity 0.1s cubic-bezier(0.4,0,0.2,1)}.q-ripple__inner--leave{transition:opacity 0.25s cubic-bezier(0.4,0,0.2,1)}.q-loading{color:#000;position:fixed!important}.q-loading:before{content:"";position:fixed;top:0;right:0;bottom:0;left:0;background:currentColor;opacity:0.5;z-index:-1}.q-loading>div{margin:40px 20px 0;max-width:450px;text-align:center}.q-notifications__list{z-index:9500;pointer-events:none;left:0;right:0;margin-bottom:10px;position:relative}.q-notifications__list--center{top:0;bottom:0}.q-notifications__list--top{top:0}.q-notifications__list--bottom{bottom:0}body.q-ios-padding .q-notifications__list--center,body.q-ios-padding .q-notifications__list--top{top:20px;top:env(safe-area-inset-top)}body.q-ios-padding .q-notifications__list--bottom,body.q-ios-padding .q-notifications__list--center{bottom:env(safe-area-inset-bottom)}.q-notification{box-shadow:0 1px 5px rgba(0,0,0,0.2),0 2px 2px rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12);border-radius:4px;pointer-events:all;display:inline-flex;margin:10px 10px 0;transition:transform 1s,opacity 1s;z-index:9500;flex-shrink:0;max-width:95vw;background:#323232;color:#fff;font-size:14px}.q-notification__icon{font-size:24px;padding-right:16px}.q-notification__avatar{font-size:32px;padding-right:8px}.q-notification__message{padding:8px 0}.q-notification__caption{font-size:0.9em;opacity:0.7}.q-notification__actions{color:#1976d2;color:var(--q-color-primary)}.q-notification__badge{-webkit-animation:q-notif-badge 0.42s;animation:q-notif-badge 0.42s;padding:4px 8px;position:absolute;background:#c10015;box-shadow:0 1px 3px rgba(0,0,0,0.2),0 1px 1px rgba(0,0,0,0.14),0 2px 1px -1px rgba(0,0,0,0.12);background-color:#c10015;background-color:var(--q-color-negative);color:#fff;border-radius:4px;font-size:12px;line-height:12px}.q-notification__badge--top-left,.q-notification__badge--top-right{top:-6px}.q-notification__badge--bottom-left,.q-notification__badge--bottom-right{bottom:-6px}.q-notification__badge--bottom-left,.q-notification__badge--top-left{left:-22px}.q-notification__badge--bottom-right,.q-notification__badge--top-right{right:-22px}.q-notification__progress{z-index:-1;position:absolute;height:3px;bottom:0;left:-10px;right:-10px;-webkit-animation:q-notif-progress linear;animation:q-notif-progress linear;background:currentColor;opacity:0.3;border-radius:4px 4px 0 0;transform-origin:0 50%;transform:scaleX(0)}.q-notification--standard{padding:0 16px;min-height:48px}.q-notification--standard .q-notification__actions{padding:6px 0 6px 8px;margin-right:-8px}.q-notification--multi-line{min-height:68px;padding:8px 16px}.q-notification--multi-line .q-notification__badge--top-left,.q-notification--multi-line .q-notification__badge--top-right{top:-15px}.q-notification--multi-line .q-notification__badge--bottom-left,.q-notification--multi-line .q-notification__badge--bottom-right{bottom:-15px}.q-notification--multi-line .q-notification__progress{bottom:-8px}.q-notification--multi-line .q-notification__actions{padding:0}.q-notification--multi-line .q-notification__actions--with-media{padding-left:25px}.q-notification--top-enter,.q-notification--top-leave-to,.q-notification--top-left-enter,.q-notification--top-left-leave-to,.q-notification--top-right-enter,.q-notification--top-right-leave-to{opacity:0;transform:translateY(-50px);z-index:9499}.q-notification--center-enter,.q-notification--center-leave-to,.q-notification--left-enter,.q-notification--left-leave-to,.q-notification--right-enter,.q-notification--right-leave-to{opacity:0;transform:rotateX(90deg);z-index:9499}.q-notification--bottom-enter,.q-notification--bottom-leave-to,.q-notification--bottom-left-enter,.q-notification--bottom-left-leave-to,.q-notification--bottom-right-enter,.q-notification--bottom-right-leave-to{opacity:0;transform:translateY(50px);z-index:9499}.q-notification--bottom-leave-active,.q-notification--bottom-left-leave-active,.q-notification--bottom-right-leave-active,.q-notification--center-leave-active,.q-notification--left-leave-active,.q-notification--right-leave-active,.q-notification--top-leave-active,.q-notification--top-left-leave-active,.q-notification--top-right-leave-active{position:absolute;z-index:9499;margin-left:0;margin-right:0}.q-notification--center-leave-active,.q-notification--top-leave-active{top:0}.q-notification--bottom-leave-active,.q-notification--bottom-left-leave-active,.q-notification--bottom-right-leave-active{bottom:0}@media (min-width:600px){.q-notification{max-width:65vw}}.animated{-webkit-animation-duration:0.3s;animation-duration:0.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}.animated.bounceIn,.animated.bounceOut,.animated.flipOutX,.animated.flipOutY{-webkit-animation-duration:0.3s;animation-duration:0.3s}.q-animate--scale{-webkit-animation:q-scale 0.15s;animation:q-scale 0.15s;-webkit-animation-timing-function:cubic-bezier(0.25,0.8,0.25,1);animation-timing-function:cubic-bezier(0.25,0.8,0.25,1)}.q-animate--fade{-webkit-animation:q-fade 0.2s;animation:q-fade 0.2s}:root{--q-color-primary:#1976d2;--q-color-secondary:#26a69a;--q-color-accent:#9c27b0;--q-color-positive:#21ba45;--q-color-negative:#c10015;--q-color-info:#31ccec;--q-color-warning:#f2c037;--q-color-dark:#1d1d1d}.text-dark{color:#1d1d1d!important;color:var(--q-color-dark)!important}.bg-dark{background:#1d1d1d!important;background:var(--q-color-dark)!important}.text-primary{color:#1976d2!important;color:var(--q-color-primary)!important}.bg-primary{background:#1976d2!important;background:var(--q-color-primary)!important}.text-secondary{color:#26a69a!important;color:var(--q-color-secondary)!important}.bg-secondary{background:#26a69a!important;background:var(--q-color-secondary)!important}.text-accent{color:#9c27b0!important;color:var(--q-color-accent)!important}.bg-accent{background:#9c27b0!important;background:var(--q-color-accent)!important}.text-positive{color:#21ba45!important;color:var(--q-color-positive)!important}.bg-positive{background:#21ba45!important;background:var(--q-color-positive)!important}.text-negative{color:#c10015!important;color:var(--q-color-negative)!important}.bg-negative{background:#c10015!important;background:var(--q-color-negative)!important}.text-info{color:#31ccec!important;color:var(--q-color-info)!important}.bg-info{background:#31ccec!important;background:var(--q-color-info)!important}.text-warning{color:#f2c037!important;color:var(--q-color-warning)!important}.bg-warning{background:#f2c037!important;background:var(--q-color-warning)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.text-transparent{color:transparent!important}.bg-transparent{background:transparent!important}.text-separator{color:rgba(0,0,0,0.12)!important}.bg-separator{background:rgba(0,0,0,0.12)!important}.text-dark-separator{color:hsla(0,0%,100%,0.28)!important}.bg-dark-separator{background:hsla(0,0%,100%,0.28)!important}.text-red{color:#f44336!important}.text-red-1{color:#ffebee!important}.text-red-2{color:#ffcdd2!important}.text-red-3{color:#ef9a9a!important}.text-red-4{color:#e57373!important}.text-red-5{color:#ef5350!important}.text-red-6{color:#f44336!important}.text-red-7{color:#e53935!important}.text-red-8{color:#d32f2f!important}.text-red-9{color:#c62828!important}.text-red-10{color:#b71c1c!important}.text-red-11{color:#ff8a80!important}.text-red-12{color:#ff5252!important}.text-red-13{color:#ff1744!important}.text-red-14{color:#d50000!important}.text-pink{color:#e91e63!important}.text-pink-1{color:#fce4ec!important}.text-pink-2{color:#f8bbd0!important}.text-pink-3{color:#f48fb1!important}.text-pink-4{color:#f06292!important}.text-pink-5{color:#ec407a!important}.text-pink-6{color:#e91e63!important}.text-pink-7{color:#d81b60!important}.text-pink-8{color:#c2185b!important}.text-pink-9{color:#ad1457!important}.text-pink-10{color:#880e4f!important}.text-pink-11{color:#ff80ab!important}.text-pink-12{color:#ff4081!important}.text-pink-13{color:#f50057!important}.text-pink-14{color:#c51162!important}.text-purple{color:#9c27b0!important}.text-purple-1{color:#f3e5f5!important}.text-purple-2{color:#e1bee7!important}.text-purple-3{color:#ce93d8!important}.text-purple-4{color:#ba68c8!important}.text-purple-5{color:#ab47bc!important}.text-purple-6{color:#9c27b0!important}.text-purple-7{color:#8e24aa!important}.text-purple-8{color:#7b1fa2!important}.text-purple-9{color:#6a1b9a!important}.text-purple-10{color:#4a148c!important}.text-purple-11{color:#ea80fc!important}.text-purple-12{color:#e040fb!important}.text-purple-13{color:#d500f9!important}.text-purple-14{color:#a0f!important}.text-deep-purple{color:#673ab7!important}.text-deep-purple-1{color:#ede7f6!important}.text-deep-purple-2{color:#d1c4e9!important}.text-deep-purple-3{color:#b39ddb!important}.text-deep-purple-4{color:#9575cd!important}.text-deep-purple-5{color:#7e57c2!important}.text-deep-purple-6{color:#673ab7!important}.text-deep-purple-7{color:#5e35b1!important}.text-deep-purple-8{color:#512da8!important}.text-deep-purple-9{color:#4527a0!important}.text-deep-purple-10{color:#311b92!important}.text-deep-purple-11{color:#b388ff!important}.text-deep-purple-12{color:#7c4dff!important}.text-deep-purple-13{color:#651fff!important}.text-deep-purple-14{color:#6200ea!important}.text-indigo{color:#3f51b5!important}.text-indigo-1{color:#e8eaf6!important}.text-indigo-2{color:#c5cae9!important}.text-indigo-3{color:#9fa8da!important}.text-indigo-4{color:#7986cb!important}.text-indigo-5{color:#5c6bc0!important}.text-indigo-6{color:#3f51b5!important}.text-indigo-7{color:#3949ab!important}.text-indigo-8{color:#303f9f!important}.text-indigo-9{color:#283593!important}.text-indigo-10{color:#1a237e!important}.text-indigo-11{color:#8c9eff!important}.text-indigo-12{color:#536dfe!important}.text-indigo-13{color:#3d5afe!important}.text-indigo-14{color:#304ffe!important}.text-blue{color:#2196f3!important}.text-blue-1{color:#e3f2fd!important}.text-blue-2{color:#bbdefb!important}.text-blue-3{color:#90caf9!important}.text-blue-4{color:#64b5f6!important}.text-blue-5{color:#42a5f5!important}.text-blue-6{color:#2196f3!important}.text-blue-7{color:#1e88e5!important}.text-blue-8{color:#1976d2!important}.text-blue-9{color:#1565c0!important}.text-blue-10{color:#0d47a1!important}.text-blue-11{color:#82b1ff!important}.text-blue-12{color:#448aff!important}.text-blue-13{color:#2979ff!important}.text-blue-14{color:#2962ff!important}.text-light-blue{color:#03a9f4!important}.text-light-blue-1{color:#e1f5fe!important}.text-light-blue-2{color:#b3e5fc!important}.text-light-blue-3{color:#81d4fa!important}.text-light-blue-4{color:#4fc3f7!important}.text-light-blue-5{color:#29b6f6!important}.text-light-blue-6{color:#03a9f4!important}.text-light-blue-7{color:#039be5!important}.text-light-blue-8{color:#0288d1!important}.text-light-blue-9{color:#0277bd!important}.text-light-blue-10{color:#01579b!important}.text-light-blue-11{color:#80d8ff!important}.text-light-blue-12{color:#40c4ff!important}.text-light-blue-13{color:#00b0ff!important}.text-light-blue-14{color:#0091ea!important}.text-cyan{color:#00bcd4!important}.text-cyan-1{color:#e0f7fa!important}.text-cyan-2{color:#b2ebf2!important}.text-cyan-3{color:#80deea!important}.text-cyan-4{color:#4dd0e1!important}.text-cyan-5{color:#26c6da!important}.text-cyan-6{color:#00bcd4!important}.text-cyan-7{color:#00acc1!important}.text-cyan-8{color:#0097a7!important}.text-cyan-9{color:#00838f!important}.text-cyan-10{color:#006064!important}.text-cyan-11{color:#84ffff!important}.text-cyan-12{color:#18ffff!important}.text-cyan-13{color:#00e5ff!important}.text-cyan-14{color:#00b8d4!important}.text-teal{color:#009688!important}.text-teal-1{color:#e0f2f1!important}.text-teal-2{color:#b2dfdb!important}.text-teal-3{color:#80cbc4!important}.text-teal-4{color:#4db6ac!important}.text-teal-5{color:#26a69a!important}.text-teal-6{color:#009688!important}.text-teal-7{color:#00897b!important}.text-teal-8{color:#00796b!important}.text-teal-9{color:#00695c!important}.text-teal-10{color:#004d40!important}.text-teal-11{color:#a7ffeb!important}.text-teal-12{color:#64ffda!important}.text-teal-13{color:#1de9b6!important}.text-teal-14{color:#00bfa5!important}.text-green{color:#4caf50!important}.text-green-1{color:#e8f5e9!important}.text-green-2{color:#c8e6c9!important}.text-green-3{color:#a5d6a7!important}.text-green-4{color:#81c784!important}.text-green-5{color:#66bb6a!important}.text-green-6{color:#4caf50!important}.text-green-7{color:#43a047!important}.text-green-8{color:#388e3c!important}.text-green-9{color:#2e7d32!important}.text-green-10{color:#1b5e20!important}.text-green-11{color:#b9f6ca!important}.text-green-12{color:#69f0ae!important}.text-green-13{color:#00e676!important}.text-green-14{color:#00c853!important}.text-light-green{color:#8bc34a!important}.text-light-green-1{color:#f1f8e9!important}.text-light-green-2{color:#dcedc8!important}.text-light-green-3{color:#c5e1a5!important}.text-light-green-4{color:#aed581!important}.text-light-green-5{color:#9ccc65!important}.text-light-green-6{color:#8bc34a!important}.text-light-green-7{color:#7cb342!important}.text-light-green-8{color:#689f38!important}.text-light-green-9{color:#558b2f!important}.text-light-green-10{color:#33691e!important}.text-light-green-11{color:#ccff90!important}.text-light-green-12{color:#b2ff59!important}.text-light-green-13{color:#76ff03!important}.text-light-green-14{color:#64dd17!important}.text-lime{color:#cddc39!important}.text-lime-1{color:#f9fbe7!important}.text-lime-2{color:#f0f4c3!important}.text-lime-3{color:#e6ee9c!important}.text-lime-4{color:#dce775!important}.text-lime-5{color:#d4e157!important}.text-lime-6{color:#cddc39!important}.text-lime-7{color:#c0ca33!important}.text-lime-8{color:#afb42b!important}.text-lime-9{color:#9e9d24!important}.text-lime-10{color:#827717!important}.text-lime-11{color:#f4ff81!important}.text-lime-12{color:#eeff41!important}.text-lime-13{color:#c6ff00!important}.text-lime-14{color:#aeea00!important}.text-yellow{color:#ffeb3b!important}.text-yellow-1{color:#fffde7!important}.text-yellow-2{color:#fff9c4!important}.text-yellow-3{color:#fff59d!important}.text-yellow-4{color:#fff176!important}.text-yellow-5{color:#ffee58!important}.text-yellow-6{color:#ffeb3b!important}.text-yellow-7{color:#fdd835!important}.text-yellow-8{color:#fbc02d!important}.text-yellow-9{color:#f9a825!important}.text-yellow-10{color:#f57f17!important}.text-yellow-11{color:#ffff8d!important}.text-yellow-12{color:#ff0!important}.text-yellow-13{color:#ffea00!important}.text-yellow-14{color:#ffd600!important}.text-amber{color:#ffc107!important}.text-amber-1{color:#fff8e1!important}.text-amber-2{color:#ffecb3!important}.text-amber-3{color:#ffe082!important}.text-amber-4{color:#ffd54f!important}.text-amber-5{color:#ffca28!important}.text-amber-6{color:#ffc107!important}.text-amber-7{color:#ffb300!important}.text-amber-8{color:#ffa000!important}.text-amber-9{color:#ff8f00!important}.text-amber-10{color:#ff6f00!important}.text-amber-11{color:#ffe57f!important}.text-amber-12{color:#ffd740!important}.text-amber-13{color:#ffc400!important}.text-amber-14{color:#ffab00!important}.text-orange{color:#ff9800!important}.text-orange-1{color:#fff3e0!important}.text-orange-2{color:#ffe0b2!important}.text-orange-3{color:#ffcc80!important}.text-orange-4{color:#ffb74d!important}.text-orange-5{color:#ffa726!important}.text-orange-6{color:#ff9800!important}.text-orange-7{color:#fb8c00!important}.text-orange-8{color:#f57c00!important}.text-orange-9{color:#ef6c00!important}.text-orange-10{color:#e65100!important}.text-orange-11{color:#ffd180!important}.text-orange-12{color:#ffab40!important}.text-orange-13{color:#ff9100!important}.text-orange-14{color:#ff6d00!important}.text-deep-orange{color:#ff5722!important}.text-deep-orange-1{color:#fbe9e7!important}.text-deep-orange-2{color:#ffccbc!important}.text-deep-orange-3{color:#ffab91!important}.text-deep-orange-4{color:#ff8a65!important}.text-deep-orange-5{color:#ff7043!important}.text-deep-orange-6{color:#ff5722!important}.text-deep-orange-7{color:#f4511e!important}.text-deep-orange-8{color:#e64a19!important}.text-deep-orange-9{color:#d84315!important}.text-deep-orange-10{color:#bf360c!important}.text-deep-orange-11{color:#ff9e80!important}.text-deep-orange-12{color:#ff6e40!important}.text-deep-orange-13{color:#ff3d00!important}.text-deep-orange-14{color:#dd2c00!important}.text-brown{color:#795548!important}.text-brown-1{color:#efebe9!important}.text-brown-2{color:#d7ccc8!important}.text-brown-3{color:#bcaaa4!important}.text-brown-4{color:#a1887f!important}.text-brown-5{color:#8d6e63!important}.text-brown-6{color:#795548!important}.text-brown-7{color:#6d4c41!important}.text-brown-8{color:#5d4037!important}.text-brown-9{color:#4e342e!important}.text-brown-10{color:#3e2723!important}.text-brown-11{color:#d7ccc8!important}.text-brown-12{color:#bcaaa4!important}.text-brown-13{color:#8d6e63!important}.text-brown-14{color:#5d4037!important}.text-grey{color:#9e9e9e!important}.text-grey-1{color:#fafafa!important}.text-grey-2{color:#f5f5f5!important}.text-grey-3{color:#eee!important}.text-grey-4{color:#e0e0e0!important}.text-grey-5{color:#bdbdbd!important}.text-grey-6{color:#9e9e9e!important}.text-grey-7{color:#757575!important}.text-grey-8{color:#616161!important}.text-grey-9{color:#424242!important}.text-grey-10{color:#212121!important}.text-grey-11{color:#f5f5f5!important}.text-grey-12{color:#eee!important}.text-grey-13{color:#bdbdbd!important}.text-grey-14{color:#616161!important}.text-blue-grey{color:#607d8b!important}.text-blue-grey-1{color:#eceff1!important}.text-blue-grey-2{color:#cfd8dc!important}.text-blue-grey-3{color:#b0bec5!important}.text-blue-grey-4{color:#90a4ae!important}.text-blue-grey-5{color:#78909c!important}.text-blue-grey-6{color:#607d8b!important}.text-blue-grey-7{color:#546e7a!important}.text-blue-grey-8{color:#455a64!important}.text-blue-grey-9{color:#37474f!important}.text-blue-grey-10{color:#263238!important}.text-blue-grey-11{color:#cfd8dc!important}.text-blue-grey-12{color:#b0bec5!important}.text-blue-grey-13{color:#78909c!important}.text-blue-grey-14{color:#455a64!important}.bg-red{background:#f44336!important}.bg-red-1{background:#ffebee!important}.bg-red-2{background:#ffcdd2!important}.bg-red-3{background:#ef9a9a!important}.bg-red-4{background:#e57373!important}.bg-red-5{background:#ef5350!important}.bg-red-6{background:#f44336!important}.bg-red-7{background:#e53935!important}.bg-red-8{background:#d32f2f!important}.bg-red-9{background:#c62828!important}.bg-red-10{background:#b71c1c!important}.bg-red-11{background:#ff8a80!important}.bg-red-12{background:#ff5252!important}.bg-red-13{background:#ff1744!important}.bg-red-14{background:#d50000!important}.bg-pink{background:#e91e63!important}.bg-pink-1{background:#fce4ec!important}.bg-pink-2{background:#f8bbd0!important}.bg-pink-3{background:#f48fb1!important}.bg-pink-4{background:#f06292!important}.bg-pink-5{background:#ec407a!important}.bg-pink-6{background:#e91e63!important}.bg-pink-7{background:#d81b60!important}.bg-pink-8{background:#c2185b!important}.bg-pink-9{background:#ad1457!important}.bg-pink-10{background:#880e4f!important}.bg-pink-11{background:#ff80ab!important}.bg-pink-12{background:#ff4081!important}.bg-pink-13{background:#f50057!important}.bg-pink-14{background:#c51162!important}.bg-purple{background:#9c27b0!important}.bg-purple-1{background:#f3e5f5!important}.bg-purple-2{background:#e1bee7!important}.bg-purple-3{background:#ce93d8!important}.bg-purple-4{background:#ba68c8!important}.bg-purple-5{background:#ab47bc!important}.bg-purple-6{background:#9c27b0!important}.bg-purple-7{background:#8e24aa!important}.bg-purple-8{background:#7b1fa2!important}.bg-purple-9{background:#6a1b9a!important}.bg-purple-10{background:#4a148c!important}.bg-purple-11{background:#ea80fc!important}.bg-purple-12{background:#e040fb!important}.bg-purple-13{background:#d500f9!important}.bg-purple-14{background:#a0f!important}.bg-deep-purple{background:#673ab7!important}.bg-deep-purple-1{background:#ede7f6!important}.bg-deep-purple-2{background:#d1c4e9!important}.bg-deep-purple-3{background:#b39ddb!important}.bg-deep-purple-4{background:#9575cd!important}.bg-deep-purple-5{background:#7e57c2!important}.bg-deep-purple-6{background:#673ab7!important}.bg-deep-purple-7{background:#5e35b1!important}.bg-deep-purple-8{background:#512da8!important}.bg-deep-purple-9{background:#4527a0!important}.bg-deep-purple-10{background:#311b92!important}.bg-deep-purple-11{background:#b388ff!important}.bg-deep-purple-12{background:#7c4dff!important}.bg-deep-purple-13{background:#651fff!important}.bg-deep-purple-14{background:#6200ea!important}.bg-indigo{background:#3f51b5!important}.bg-indigo-1{background:#e8eaf6!important}.bg-indigo-2{background:#c5cae9!important}.bg-indigo-3{background:#9fa8da!important}.bg-indigo-4{background:#7986cb!important}.bg-indigo-5{background:#5c6bc0!important}.bg-indigo-6{background:#3f51b5!important}.bg-indigo-7{background:#3949ab!important}.bg-indigo-8{background:#303f9f!important}.bg-indigo-9{background:#283593!important}.bg-indigo-10{background:#1a237e!important}.bg-indigo-11{background:#8c9eff!important}.bg-indigo-12{background:#536dfe!important}.bg-indigo-13{background:#3d5afe!important}.bg-indigo-14{background:#304ffe!important}.bg-blue{background:#2196f3!important}.bg-blue-1{background:#e3f2fd!important}.bg-blue-2{background:#bbdefb!important}.bg-blue-3{background:#90caf9!important}.bg-blue-4{background:#64b5f6!important}.bg-blue-5{background:#42a5f5!important}.bg-blue-6{background:#2196f3!important}.bg-blue-7{background:#1e88e5!important}.bg-blue-8{background:#1976d2!important}.bg-blue-9{background:#1565c0!important}.bg-blue-10{background:#0d47a1!important}.bg-blue-11{background:#82b1ff!important}.bg-blue-12{background:#448aff!important}.bg-blue-13{background:#2979ff!important}.bg-blue-14{background:#2962ff!important}.bg-light-blue{background:#03a9f4!important}.bg-light-blue-1{background:#e1f5fe!important}.bg-light-blue-2{background:#b3e5fc!important}.bg-light-blue-3{background:#81d4fa!important}.bg-light-blue-4{background:#4fc3f7!important}.bg-light-blue-5{background:#29b6f6!important}.bg-light-blue-6{background:#03a9f4!important}.bg-light-blue-7{background:#039be5!important}.bg-light-blue-8{background:#0288d1!important}.bg-light-blue-9{background:#0277bd!important}.bg-light-blue-10{background:#01579b!important}.bg-light-blue-11{background:#80d8ff!important}.bg-light-blue-12{background:#40c4ff!important}.bg-light-blue-13{background:#00b0ff!important}.bg-light-blue-14{background:#0091ea!important}.bg-cyan{background:#00bcd4!important}.bg-cyan-1{background:#e0f7fa!important}.bg-cyan-2{background:#b2ebf2!important}.bg-cyan-3{background:#80deea!important}.bg-cyan-4{background:#4dd0e1!important}.bg-cyan-5{background:#26c6da!important}.bg-cyan-6{background:#00bcd4!important}.bg-cyan-7{background:#00acc1!important}.bg-cyan-8{background:#0097a7!important}.bg-cyan-9{background:#00838f!important}.bg-cyan-10{background:#006064!important}.bg-cyan-11{background:#84ffff!important}.bg-cyan-12{background:#18ffff!important}.bg-cyan-13{background:#00e5ff!important}.bg-cyan-14{background:#00b8d4!important}.bg-teal{background:#009688!important}.bg-teal-1{background:#e0f2f1!important}.bg-teal-2{background:#b2dfdb!important}.bg-teal-3{background:#80cbc4!important}.bg-teal-4{background:#4db6ac!important}.bg-teal-5{background:#26a69a!important}.bg-teal-6{background:#009688!important}.bg-teal-7{background:#00897b!important}.bg-teal-8{background:#00796b!important}.bg-teal-9{background:#00695c!important}.bg-teal-10{background:#004d40!important}.bg-teal-11{background:#a7ffeb!important}.bg-teal-12{background:#64ffda!important}.bg-teal-13{background:#1de9b6!important}.bg-teal-14{background:#00bfa5!important}.bg-green{background:#4caf50!important}.bg-green-1{background:#e8f5e9!important}.bg-green-2{background:#c8e6c9!important}.bg-green-3{background:#a5d6a7!important}.bg-green-4{background:#81c784!important}.bg-green-5{background:#66bb6a!important}.bg-green-6{background:#4caf50!important}.bg-green-7{background:#43a047!important}.bg-green-8{background:#388e3c!important}.bg-green-9{background:#2e7d32!important}.bg-green-10{background:#1b5e20!important}.bg-green-11{background:#b9f6ca!important}.bg-green-12{background:#69f0ae!important}.bg-green-13{background:#00e676!important}.bg-green-14{background:#00c853!important}.bg-light-green{background:#8bc34a!important}.bg-light-green-1{background:#f1f8e9!important}.bg-light-green-2{background:#dcedc8!important}.bg-light-green-3{background:#c5e1a5!important}.bg-light-green-4{background:#aed581!important}.bg-light-green-5{background:#9ccc65!important}.bg-light-green-6{background:#8bc34a!important}.bg-light-green-7{background:#7cb342!important}.bg-light-green-8{background:#689f38!important}.bg-light-green-9{background:#558b2f!important}.bg-light-green-10{background:#33691e!important}.bg-light-green-11{background:#ccff90!important}.bg-light-green-12{background:#b2ff59!important}.bg-light-green-13{background:#76ff03!important}.bg-light-green-14{background:#64dd17!important}.bg-lime{background:#cddc39!important}.bg-lime-1{background:#f9fbe7!important}.bg-lime-2{background:#f0f4c3!important}.bg-lime-3{background:#e6ee9c!important}.bg-lime-4{background:#dce775!important}.bg-lime-5{background:#d4e157!important}.bg-lime-6{background:#cddc39!important}.bg-lime-7{background:#c0ca33!important}.bg-lime-8{background:#afb42b!important}.bg-lime-9{background:#9e9d24!important}.bg-lime-10{background:#827717!important}.bg-lime-11{background:#f4ff81!important}.bg-lime-12{background:#eeff41!important}.bg-lime-13{background:#c6ff00!important}.bg-lime-14{background:#aeea00!important}.bg-yellow{background:#ffeb3b!important}.bg-yellow-1{background:#fffde7!important}.bg-yellow-2{background:#fff9c4!important}.bg-yellow-3{background:#fff59d!important}.bg-yellow-4{background:#fff176!important}.bg-yellow-5{background:#ffee58!important}.bg-yellow-6{background:#ffeb3b!important}.bg-yellow-7{background:#fdd835!important}.bg-yellow-8{background:#fbc02d!important}.bg-yellow-9{background:#f9a825!important}.bg-yellow-10{background:#f57f17!important}.bg-yellow-11{background:#ffff8d!important}.bg-yellow-12{background:#ff0!important}.bg-yellow-13{background:#ffea00!important}.bg-yellow-14{background:#ffd600!important}.bg-amber{background:#ffc107!important}.bg-amber-1{background:#fff8e1!important}.bg-amber-2{background:#ffecb3!important}.bg-amber-3{background:#ffe082!important}.bg-amber-4{background:#ffd54f!important}.bg-amber-5{background:#ffca28!important}.bg-amber-6{background:#ffc107!important}.bg-amber-7{background:#ffb300!important}.bg-amber-8{background:#ffa000!important}.bg-amber-9{background:#ff8f00!important}.bg-amber-10{background:#ff6f00!important}.bg-amber-11{background:#ffe57f!important}.bg-amber-12{background:#ffd740!important}.bg-amber-13{background:#ffc400!important}.bg-amber-14{background:#ffab00!important}.bg-orange{background:#ff9800!important}.bg-orange-1{background:#fff3e0!important}.bg-orange-2{background:#ffe0b2!important}.bg-orange-3{background:#ffcc80!important}.bg-orange-4{background:#ffb74d!important}.bg-orange-5{background:#ffa726!important}.bg-orange-6{background:#ff9800!important}.bg-orange-7{background:#fb8c00!important}.bg-orange-8{background:#f57c00!important}.bg-orange-9{background:#ef6c00!important}.bg-orange-10{background:#e65100!important}.bg-orange-11{background:#ffd180!important}.bg-orange-12{background:#ffab40!important}.bg-orange-13{background:#ff9100!important}.bg-orange-14{background:#ff6d00!important}.bg-deep-orange{background:#ff5722!important}.bg-deep-orange-1{background:#fbe9e7!important}.bg-deep-orange-2{background:#ffccbc!important}.bg-deep-orange-3{background:#ffab91!important}.bg-deep-orange-4{background:#ff8a65!important}.bg-deep-orange-5{background:#ff7043!important}.bg-deep-orange-6{background:#ff5722!important}.bg-deep-orange-7{background:#f4511e!important}.bg-deep-orange-8{background:#e64a19!important}.bg-deep-orange-9{background:#d84315!important}.bg-deep-orange-10{background:#bf360c!important}.bg-deep-orange-11{background:#ff9e80!important}.bg-deep-orange-12{background:#ff6e40!important}.bg-deep-orange-13{background:#ff3d00!important}.bg-deep-orange-14{background:#dd2c00!important}.bg-brown{background:#795548!important}.bg-brown-1{background:#efebe9!important}.bg-brown-2{background:#d7ccc8!important}.bg-brown-3{background:#bcaaa4!important}.bg-brown-4{background:#a1887f!important}.bg-brown-5{background:#8d6e63!important}.bg-brown-6{background:#795548!important}.bg-brown-7{background:#6d4c41!important}.bg-brown-8{background:#5d4037!important}.bg-brown-9{background:#4e342e!important}.bg-brown-10{background:#3e2723!important}.bg-brown-11{background:#d7ccc8!important}.bg-brown-12{background:#bcaaa4!important}.bg-brown-13{background:#8d6e63!important}.bg-brown-14{background:#5d4037!important}.bg-grey{background:#9e9e9e!important}.bg-grey-1{background:#fafafa!important}.bg-grey-2{background:#f5f5f5!important}.bg-grey-3{background:#eee!important}.bg-grey-4{background:#e0e0e0!important}.bg-grey-5{background:#bdbdbd!important}.bg-grey-6{background:#9e9e9e!important}.bg-grey-7{background:#757575!important}.bg-grey-8{background:#616161!important}.bg-grey-9{background:#424242!important}.bg-grey-10{background:#212121!important}.bg-grey-11{background:#f5f5f5!important}.bg-grey-12{background:#eee!important}.bg-grey-13{background:#bdbdbd!important}.bg-grey-14{background:#616161!important}.bg-blue-grey{background:#607d8b!important}.bg-blue-grey-1{background:#eceff1!important}.bg-blue-grey-2{background:#cfd8dc!important}.bg-blue-grey-3{background:#b0bec5!important}.bg-blue-grey-4{background:#90a4ae!important}.bg-blue-grey-5{background:#78909c!important}.bg-blue-grey-6{background:#607d8b!important}.bg-blue-grey-7{background:#546e7a!important}.bg-blue-grey-8{background:#455a64!important}.bg-blue-grey-9{background:#37474f!important}.bg-blue-grey-10{background:#263238!important}.bg-blue-grey-11{background:#cfd8dc!important}.bg-blue-grey-12{background:#b0bec5!important}.bg-blue-grey-13{background:#78909c!important}.bg-blue-grey-14{background:#455a64!important}.shadow-transition{transition:box-shadow 0.28s cubic-bezier(0.4,0,0.2,1)!important}.shadow-1{box-shadow:0 1px 3px rgba(0,0,0,0.2),0 1px 1px rgba(0,0,0,0.14),0 2px 1px -1px rgba(0,0,0,0.12)}.shadow-up-1{box-shadow:0 -1px 3px rgba(0,0,0,0.2),0 -1px 1px rgba(0,0,0,0.14),0 -2px 1px -1px rgba(0,0,0,0.12)}.shadow-2{box-shadow:0 1px 5px rgba(0,0,0,0.2),0 2px 2px rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12)}.shadow-up-2{box-shadow:0 -1px 5px rgba(0,0,0,0.2),0 -2px 2px rgba(0,0,0,0.14),0 -3px 1px -2px rgba(0,0,0,0.12)}.shadow-3{box-shadow:0 1px 8px rgba(0,0,0,0.2),0 3px 4px rgba(0,0,0,0.14),0 3px 3px -2px rgba(0,0,0,0.12)}.shadow-up-3{box-shadow:0 -1px 8px rgba(0,0,0,0.2),0 -3px 4px rgba(0,0,0,0.14),0 -3px 3px -2px rgba(0,0,0,0.12)}.shadow-4{box-shadow:0 2px 4px -1px rgba(0,0,0,0.2),0 4px 5px rgba(0,0,0,0.14),0 1px 10px rgba(0,0,0,0.12)}.shadow-up-4{box-shadow:0 -2px 4px -1px rgba(0,0,0,0.2),0 -4px 5px rgba(0,0,0,0.14),0 -1px 10px rgba(0,0,0,0.12)}.shadow-5{box-shadow:0 3px 5px -1px rgba(0,0,0,0.2),0 5px 8px rgba(0,0,0,0.14),0 1px 14px rgba(0,0,0,0.12)}.shadow-up-5{box-shadow:0 -3px 5px -1px rgba(0,0,0,0.2),0 -5px 8px rgba(0,0,0,0.14),0 -1px 14px rgba(0,0,0,0.12)}.shadow-6{box-shadow:0 3px 5px -1px rgba(0,0,0,0.2),0 6px 10px rgba(0,0,0,0.14),0 1px 18px rgba(0,0,0,0.12)}.shadow-up-6{box-shadow:0 -3px 5px -1px rgba(0,0,0,0.2),0 -6px 10px rgba(0,0,0,0.14),0 -1px 18px rgba(0,0,0,0.12)}.shadow-7{box-shadow:0 4px 5px -2px rgba(0,0,0,0.2),0 7px 10px 1px rgba(0,0,0,0.14),0 2px 16px 1px rgba(0,0,0,0.12)}.shadow-up-7{box-shadow:0 -4px 5px -2px rgba(0,0,0,0.2),0 -7px 10px 1px rgba(0,0,0,0.14),0 -2px 16px 1px rgba(0,0,0,0.12)}.shadow-8{box-shadow:0 5px 5px -3px rgba(0,0,0,0.2),0 8px 10px 1px rgba(0,0,0,0.14),0 3px 14px 2px rgba(0,0,0,0.12)}.shadow-up-8{box-shadow:0 -5px 5px -3px rgba(0,0,0,0.2),0 -8px 10px 1px rgba(0,0,0,0.14),0 -3px 14px 2px rgba(0,0,0,0.12)}.shadow-9{box-shadow:0 5px 6px -3px rgba(0,0,0,0.2),0 9px 12px 1px rgba(0,0,0,0.14),0 3px 16px 2px rgba(0,0,0,0.12)}.shadow-up-9{box-shadow:0 -5px 6px -3px rgba(0,0,0,0.2),0 -9px 12px 1px rgba(0,0,0,0.14),0 -3px 16px 2px rgba(0,0,0,0.12)}.shadow-10{box-shadow:0 6px 6px -3px rgba(0,0,0,0.2),0 10px 14px 1px rgba(0,0,0,0.14),0 4px 18px 3px rgba(0,0,0,0.12)}.shadow-up-10{box-shadow:0 -6px 6px -3px rgba(0,0,0,0.2),0 -10px 14px 1px rgba(0,0,0,0.14),0 -4px 18px 3px rgba(0,0,0,0.12)}.shadow-11{box-shadow:0 6px 7px -4px rgba(0,0,0,0.2),0 11px 15px 1px rgba(0,0,0,0.14),0 4px 20px 3px rgba(0,0,0,0.12)}.shadow-up-11{box-shadow:0 -6px 7px -4px rgba(0,0,0,0.2),0 -11px 15px 1px rgba(0,0,0,0.14),0 -4px 20px 3px rgba(0,0,0,0.12)}.shadow-12{box-shadow:0 7px 8px -4px rgba(0,0,0,0.2),0 12px 17px 2px rgba(0,0,0,0.14),0 5px 22px 4px rgba(0,0,0,0.12)}.shadow-up-12{box-shadow:0 -7px 8px -4px rgba(0,0,0,0.2),0 -12px 17px 2px rgba(0,0,0,0.14),0 -5px 22px 4px rgba(0,0,0,0.12)}.shadow-13{box-shadow:0 7px 8px -4px rgba(0,0,0,0.2),0 13px 19px 2px rgba(0,0,0,0.14),0 5px 24px 4px rgba(0,0,0,0.12)}.shadow-up-13{box-shadow:0 -7px 8px -4px rgba(0,0,0,0.2),0 -13px 19px 2px rgba(0,0,0,0.14),0 -5px 24px 4px rgba(0,0,0,0.12)}.shadow-14{box-shadow:0 7px 9px -4px rgba(0,0,0,0.2),0 14px 21px 2px rgba(0,0,0,0.14),0 5px 26px 4px rgba(0,0,0,0.12)}.shadow-up-14{box-shadow:0 -7px 9px -4px rgba(0,0,0,0.2),0 -14px 21px 2px rgba(0,0,0,0.14),0 -5px 26px 4px rgba(0,0,0,0.12)}.shadow-15{box-shadow:0 8px 9px -5px rgba(0,0,0,0.2),0 15px 22px 2px rgba(0,0,0,0.14),0 6px 28px 5px rgba(0,0,0,0.12)}.shadow-up-15{box-shadow:0 -8px 9px -5px rgba(0,0,0,0.2),0 -15px 22px 2px rgba(0,0,0,0.14),0 -6px 28px 5px rgba(0,0,0,0.12)}.shadow-16{box-shadow:0 8px 10px -5px rgba(0,0,0,0.2),0 16px 24px 2px rgba(0,0,0,0.14),0 6px 30px 5px rgba(0,0,0,0.12)}.shadow-up-16{box-shadow:0 -8px 10px -5px rgba(0,0,0,0.2),0 -16px 24px 2px rgba(0,0,0,0.14),0 -6px 30px 5px rgba(0,0,0,0.12)}.shadow-17{box-shadow:0 8px 11px -5px rgba(0,0,0,0.2),0 17px 26px 2px rgba(0,0,0,0.14),0 6px 32px 5px rgba(0,0,0,0.12)}.shadow-up-17{box-shadow:0 -8px 11px -5px rgba(0,0,0,0.2),0 -17px 26px 2px rgba(0,0,0,0.14),0 -6px 32px 5px rgba(0,0,0,0.12)}.shadow-18{box-shadow:0 9px 11px -5px rgba(0,0,0,0.2),0 18px 28px 2px rgba(0,0,0,0.14),0 7px 34px 6px rgba(0,0,0,0.12)}.shadow-up-18{box-shadow:0 -9px 11px -5px rgba(0,0,0,0.2),0 -18px 28px 2px rgba(0,0,0,0.14),0 -7px 34px 6px rgba(0,0,0,0.12)}.shadow-19{box-shadow:0 9px 12px -6px rgba(0,0,0,0.2),0 19px 29px 2px rgba(0,0,0,0.14),0 7px 36px 6px rgba(0,0,0,0.12)}.shadow-up-19{box-shadow:0 -9px 12px -6px rgba(0,0,0,0.2),0 -19px 29px 2px rgba(0,0,0,0.14),0 -7px 36px 6px rgba(0,0,0,0.12)}.shadow-20{box-shadow:0 10px 13px -6px rgba(0,0,0,0.2),0 20px 31px 3px rgba(0,0,0,0.14),0 8px 38px 7px rgba(0,0,0,0.12)}.shadow-up-20{box-shadow:0 -10px 13px -6px rgba(0,0,0,0.2),0 -20px 31px 3px rgba(0,0,0,0.14),0 -8px 38px 7px rgba(0,0,0,0.12)}.shadow-21{box-shadow:0 10px 13px -6px rgba(0,0,0,0.2),0 21px 33px 3px rgba(0,0,0,0.14),0 8px 40px 7px rgba(0,0,0,0.12)}.shadow-up-21{box-shadow:0 -10px 13px -6px rgba(0,0,0,0.2),0 -21px 33px 3px rgba(0,0,0,0.14),0 -8px 40px 7px rgba(0,0,0,0.12)}.shadow-22{box-shadow:0 10px 14px -6px rgba(0,0,0,0.2),0 22px 35px 3px rgba(0,0,0,0.14),0 8px 42px 7px rgba(0,0,0,0.12)}.shadow-up-22{box-shadow:0 -10px 14px -6px rgba(0,0,0,0.2),0 -22px 35px 3px rgba(0,0,0,0.14),0 -8px 42px 7px rgba(0,0,0,0.12)}.shadow-23{box-shadow:0 11px 14px -7px rgba(0,0,0,0.2),0 23px 36px 3px rgba(0,0,0,0.14),0 9px 44px 8px rgba(0,0,0,0.12)}.shadow-up-23{box-shadow:0 -11px 14px -7px rgba(0,0,0,0.2),0 -23px 36px 3px rgba(0,0,0,0.14),0 -9px 44px 8px rgba(0,0,0,0.12)}.shadow-24{box-shadow:0 11px 15px -7px rgba(0,0,0,0.2),0 24px 38px 3px rgba(0,0,0,0.14),0 9px 46px 8px rgba(0,0,0,0.12)}.shadow-up-24{box-shadow:0 -11px 15px -7px rgba(0,0,0,0.2),0 -24px 38px 3px rgba(0,0,0,0.14),0 -9px 46px 8px rgba(0,0,0,0.12)}.no-shadow,.shadow-0{box-shadow:none!important}.inset-shadow{box-shadow:inset 0 7px 9px -7px rgba(0,0,0,0.7)!important}.z-marginals{z-index:2000}.z-notify{z-index:9500}.z-fullscreen{z-index:6000}.z-inherit{z-index:inherit!important}.column,.flex,.row{display:flex;flex-wrap:wrap}.column.inline,.flex.inline,.row.inline{display:inline-flex}.row.reverse{flex-direction:row-reverse}.column{flex-direction:column}.column.reverse{flex-direction:column-reverse}.wrap{flex-wrap:wrap}.no-wrap{flex-wrap:nowrap}.reverse-wrap{flex-wrap:wrap-reverse}.order-first{order:-10000}.order-last{order:10000}.order-none{order:0}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.flex-center,.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.flex-center,.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-center{align-content:center}.content-stretch{align-content:stretch}.content-between{align-content:space-between}.content-around{align-content:space-around}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-baseline{align-self:baseline}.self-stretch{align-self:stretch}.q-gutter-none,.q-gutter-none>*,.q-gutter-x-none,.q-gutter-x-none>*{margin-left:0}.q-gutter-none,.q-gutter-none>*,.q-gutter-y-none,.q-gutter-y-none>*{margin-top:0}.q-col-gutter-none,.q-col-gutter-x-none{margin-left:0}.q-col-gutter-none>*,.q-col-gutter-x-none>*{padding-left:0}.q-col-gutter-none,.q-col-gutter-y-none{margin-top:0}.q-col-gutter-none>*,.q-col-gutter-y-none>*{padding-top:0}.q-gutter-x-xs,.q-gutter-xs{margin-left:-4px}.q-gutter-x-xs>*,.q-gutter-xs>*{margin-left:4px}.q-gutter-xs,.q-gutter-y-xs{margin-top:-4px}.q-gutter-xs>*,.q-gutter-y-xs>*{margin-top:4px}.q-col-gutter-x-xs,.q-col-gutter-xs{margin-left:-4px}.q-col-gutter-x-xs>*,.q-col-gutter-xs>*{padding-left:4px}.q-col-gutter-xs,.q-col-gutter-y-xs{margin-top:-4px}.q-col-gutter-xs>*,.q-col-gutter-y-xs>*{padding-top:4px}.q-gutter-sm,.q-gutter-x-sm{margin-left:-8px}.q-gutter-sm>*,.q-gutter-x-sm>*{margin-left:8px}.q-gutter-sm,.q-gutter-y-sm{margin-top:-8px}.q-gutter-sm>*,.q-gutter-y-sm>*{margin-top:8px}.q-col-gutter-sm,.q-col-gutter-x-sm{margin-left:-8px}.q-col-gutter-sm>*,.q-col-gutter-x-sm>*{padding-left:8px}.q-col-gutter-sm,.q-col-gutter-y-sm{margin-top:-8px}.q-col-gutter-sm>*,.q-col-gutter-y-sm>*{padding-top:8px}.q-gutter-md,.q-gutter-x-md{margin-left:-16px}.q-gutter-md>*,.q-gutter-x-md>*{margin-left:16px}.q-gutter-md,.q-gutter-y-md{margin-top:-16px}.q-gutter-md>*,.q-gutter-y-md>*{margin-top:16px}.q-col-gutter-md,.q-col-gutter-x-md{margin-left:-16px}.q-col-gutter-md>*,.q-col-gutter-x-md>*{padding-left:16px}.q-col-gutter-md,.q-col-gutter-y-md{margin-top:-16px}.q-col-gutter-md>*,.q-col-gutter-y-md>*{padding-top:16px}.q-gutter-lg,.q-gutter-x-lg{margin-left:-24px}.q-gutter-lg>*,.q-gutter-x-lg>*{margin-left:24px}.q-gutter-lg,.q-gutter-y-lg{margin-top:-24px}.q-gutter-lg>*,.q-gutter-y-lg>*{margin-top:24px}.q-col-gutter-lg,.q-col-gutter-x-lg{margin-left:-24px}.q-col-gutter-lg>*,.q-col-gutter-x-lg>*{padding-left:24px}.q-col-gutter-lg,.q-col-gutter-y-lg{margin-top:-24px}.q-col-gutter-lg>*,.q-col-gutter-y-lg>*{padding-top:24px}.q-gutter-x-xl,.q-gutter-xl{margin-left:-48px}.q-gutter-x-xl>*,.q-gutter-xl>*{margin-left:48px}.q-gutter-xl,.q-gutter-y-xl{margin-top:-48px}.q-gutter-xl>*,.q-gutter-y-xl>*{margin-top:48px}.q-col-gutter-x-xl,.q-col-gutter-xl{margin-left:-48px}.q-col-gutter-x-xl>*,.q-col-gutter-xl>*{padding-left:48px}.q-col-gutter-xl,.q-col-gutter-y-xl{margin-top:-48px}.q-col-gutter-xl>*,.q-col-gutter-y-xl>*{padding-top:48px}@media (min-width:0){.flex>.col,.flex>.col-0,.flex>.col-1,.flex>.col-2,.flex>.col-3,.flex>.col-4,.flex>.col-5,.flex>.col-6,.flex>.col-7,.flex>.col-8,.flex>.col-9,.flex>.col-10,.flex>.col-11,.flex>.col-12,.flex>.col-auto,.flex>.col-grow,.flex>.col-shrink,.flex>.col-xs,.flex>.col-xs-0,.flex>.col-xs-1,.flex>.col-xs-2,.flex>.col-xs-3,.flex>.col-xs-4,.flex>.col-xs-5,.flex>.col-xs-6,.flex>.col-xs-7,.flex>.col-xs-8,.flex>.col-xs-9,.flex>.col-xs-10,.flex>.col-xs-11,.flex>.col-xs-12,.flex>.col-xs-auto,.flex>.col-xs-grow,.flex>.col-xs-shrink,.row>.col,.row>.col-0,.row>.col-1,.row>.col-2,.row>.col-3,.row>.col-4,.row>.col-5,.row>.col-6,.row>.col-7,.row>.col-8,.row>.col-9,.row>.col-10,.row>.col-11,.row>.col-12,.row>.col-auto,.row>.col-grow,.row>.col-shrink,.row>.col-xs,.row>.col-xs-0,.row>.col-xs-1,.row>.col-xs-2,.row>.col-xs-3,.row>.col-xs-4,.row>.col-xs-5,.row>.col-xs-6,.row>.col-xs-7,.row>.col-xs-8,.row>.col-xs-9,.row>.col-xs-10,.row>.col-xs-11,.row>.col-xs-12,.row>.col-xs-auto,.row>.col-xs-grow,.row>.col-xs-shrink{width:auto;min-width:0;max-width:100%}.column>.col,.column>.col-0,.column>.col-1,.column>.col-2,.column>.col-3,.column>.col-4,.column>.col-5,.column>.col-6,.column>.col-7,.column>.col-8,.column>.col-9,.column>.col-10,.column>.col-11,.column>.col-12,.column>.col-auto,.column>.col-grow,.column>.col-shrink,.column>.col-xs,.column>.col-xs-0,.column>.col-xs-1,.column>.col-xs-2,.column>.col-xs-3,.column>.col-xs-4,.column>.col-xs-5,.column>.col-xs-6,.column>.col-xs-7,.column>.col-xs-8,.column>.col-xs-9,.column>.col-xs-10,.column>.col-xs-11,.column>.col-xs-12,.column>.col-xs-auto,.column>.col-xs-grow,.column>.col-xs-shrink,.flex>.col,.flex>.col-0,.flex>.col-1,.flex>.col-2,.flex>.col-3,.flex>.col-4,.flex>.col-5,.flex>.col-6,.flex>.col-7,.flex>.col-8,.flex>.col-9,.flex>.col-10,.flex>.col-11,.flex>.col-12,.flex>.col-auto,.flex>.col-grow,.flex>.col-shrink,.flex>.col-xs,.flex>.col-xs-0,.flex>.col-xs-1,.flex>.col-xs-2,.flex>.col-xs-3,.flex>.col-xs-4,.flex>.col-xs-5,.flex>.col-xs-6,.flex>.col-xs-7,.flex>.col-xs-8,.flex>.col-xs-9,.flex>.col-xs-10,.flex>.col-xs-11,.flex>.col-xs-12,.flex>.col-xs-auto,.flex>.col-xs-grow,.flex>.col-xs-shrink{height:auto;min-height:0;max-height:100%}.col,.col-xs{flex:10000 1 0%}.col-0,.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12,.col-auto,.col-xs-0,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-auto{flex:0 0 auto}.col-grow,.col-xs-grow{flex:1 0 auto}.col-shrink,.col-xs-shrink{flex:0 1 auto}.row>.col-0,.row>.col-xs-0{height:auto;width:0%}.row>.offset-0,.row>.offset-xs-0{margin-left:0%}.column>.col-0,.column>.col-xs-0{height:0%;width:auto}.row>.col-1,.row>.col-xs-1{height:auto;width:8.3333%}.row>.offset-1,.row>.offset-xs-1{margin-left:8.3333%}.column>.col-1,.column>.col-xs-1{height:8.3333%;width:auto}.row>.col-2,.row>.col-xs-2{height:auto;width:16.6667%}.row>.offset-2,.row>.offset-xs-2{margin-left:16.6667%}.column>.col-2,.column>.col-xs-2{height:16.6667%;width:auto}.row>.col-3,.row>.col-xs-3{height:auto;width:25%}.row>.offset-3,.row>.offset-xs-3{margin-left:25%}.column>.col-3,.column>.col-xs-3{height:25%;width:auto}.row>.col-4,.row>.col-xs-4{height:auto;width:33.3333%}.row>.offset-4,.row>.offset-xs-4{margin-left:33.3333%}.column>.col-4,.column>.col-xs-4{height:33.3333%;width:auto}.row>.col-5,.row>.col-xs-5{height:auto;width:41.6667%}.row>.offset-5,.row>.offset-xs-5{margin-left:41.6667%}.column>.col-5,.column>.col-xs-5{height:41.6667%;width:auto}.row>.col-6,.row>.col-xs-6{height:auto;width:50%}.row>.offset-6,.row>.offset-xs-6{margin-left:50%}.column>.col-6,.column>.col-xs-6{height:50%;width:auto}.row>.col-7,.row>.col-xs-7{height:auto;width:58.3333%}.row>.offset-7,.row>.offset-xs-7{margin-left:58.3333%}.column>.col-7,.column>.col-xs-7{height:58.3333%;width:auto}.row>.col-8,.row>.col-xs-8{height:auto;width:66.6667%}.row>.offset-8,.row>.offset-xs-8{margin-left:66.6667%}.column>.col-8,.column>.col-xs-8{height:66.6667%;width:auto}.row>.col-9,.row>.col-xs-9{height:auto;width:75%}.row>.offset-9,.row>.offset-xs-9{margin-left:75%}.column>.col-9,.column>.col-xs-9{height:75%;width:auto}.row>.col-10,.row>.col-xs-10{height:auto;width:83.3333%}.row>.offset-10,.row>.offset-xs-10{margin-left:83.3333%}.column>.col-10,.column>.col-xs-10{height:83.3333%;width:auto}.row>.col-11,.row>.col-xs-11{height:auto;width:91.6667%}.row>.offset-11,.row>.offset-xs-11{margin-left:91.6667%}.column>.col-11,.column>.col-xs-11{height:91.6667%;width:auto}.row>.col-12,.row>.col-xs-12{height:auto;width:100%}.row>.offset-12,.row>.offset-xs-12{margin-left:100%}.column>.col-12,.column>.col-xs-12{height:100%;width:auto}.row>.col-all{height:auto;flex:0 0 100%}}@media (min-width:600px){.flex>.col-sm,.flex>.col-sm-0,.flex>.col-sm-1,.flex>.col-sm-2,.flex>.col-sm-3,.flex>.col-sm-4,.flex>.col-sm-5,.flex>.col-sm-6,.flex>.col-sm-7,.flex>.col-sm-8,.flex>.col-sm-9,.flex>.col-sm-10,.flex>.col-sm-11,.flex>.col-sm-12,.flex>.col-sm-auto,.flex>.col-sm-grow,.flex>.col-sm-shrink,.row>.col-sm,.row>.col-sm-0,.row>.col-sm-1,.row>.col-sm-2,.row>.col-sm-3,.row>.col-sm-4,.row>.col-sm-5,.row>.col-sm-6,.row>.col-sm-7,.row>.col-sm-8,.row>.col-sm-9,.row>.col-sm-10,.row>.col-sm-11,.row>.col-sm-12,.row>.col-sm-auto,.row>.col-sm-grow,.row>.col-sm-shrink{width:auto;min-width:0;max-width:100%}.column>.col-sm,.column>.col-sm-0,.column>.col-sm-1,.column>.col-sm-2,.column>.col-sm-3,.column>.col-sm-4,.column>.col-sm-5,.column>.col-sm-6,.column>.col-sm-7,.column>.col-sm-8,.column>.col-sm-9,.column>.col-sm-10,.column>.col-sm-11,.column>.col-sm-12,.column>.col-sm-auto,.column>.col-sm-grow,.column>.col-sm-shrink,.flex>.col-sm,.flex>.col-sm-0,.flex>.col-sm-1,.flex>.col-sm-2,.flex>.col-sm-3,.flex>.col-sm-4,.flex>.col-sm-5,.flex>.col-sm-6,.flex>.col-sm-7,.flex>.col-sm-8,.flex>.col-sm-9,.flex>.col-sm-10,.flex>.col-sm-11,.flex>.col-sm-12,.flex>.col-sm-auto,.flex>.col-sm-grow,.flex>.col-sm-shrink{height:auto;min-height:0;max-height:100%}.col-sm{flex:10000 1 0%}.col-sm-0,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-auto{flex:0 0 auto}.col-sm-grow{flex:1 0 auto}.col-sm-shrink{flex:0 1 auto}.row>.col-sm-0{height:auto;width:0%}.row>.offset-sm-0{margin-left:0%}.column>.col-sm-0{height:0%;width:auto}.row>.col-sm-1{height:auto;width:8.3333%}.row>.offset-sm-1{margin-left:8.3333%}.column>.col-sm-1{height:8.3333%;width:auto}.row>.col-sm-2{height:auto;width:16.6667%}.row>.offset-sm-2{margin-left:16.6667%}.column>.col-sm-2{height:16.6667%;width:auto}.row>.col-sm-3{height:auto;width:25%}.row>.offset-sm-3{margin-left:25%}.column>.col-sm-3{height:25%;width:auto}.row>.col-sm-4{height:auto;width:33.3333%}.row>.offset-sm-4{margin-left:33.3333%}.column>.col-sm-4{height:33.3333%;width:auto}.row>.col-sm-5{height:auto;width:41.6667%}.row>.offset-sm-5{margin-left:41.6667%}.column>.col-sm-5{height:41.6667%;width:auto}.row>.col-sm-6{height:auto;width:50%}.row>.offset-sm-6{margin-left:50%}.column>.col-sm-6{height:50%;width:auto}.row>.col-sm-7{height:auto;width:58.3333%}.row>.offset-sm-7{margin-left:58.3333%}.column>.col-sm-7{height:58.3333%;width:auto}.row>.col-sm-8{height:auto;width:66.6667%}.row>.offset-sm-8{margin-left:66.6667%}.column>.col-sm-8{height:66.6667%;width:auto}.row>.col-sm-9{height:auto;width:75%}.row>.offset-sm-9{margin-left:75%}.column>.col-sm-9{height:75%;width:auto}.row>.col-sm-10{height:auto;width:83.3333%}.row>.offset-sm-10{margin-left:83.3333%}.column>.col-sm-10{height:83.3333%;width:auto}.row>.col-sm-11{height:auto;width:91.6667%}.row>.offset-sm-11{margin-left:91.6667%}.column>.col-sm-11{height:91.6667%;width:auto}.row>.col-sm-12{height:auto;width:100%}.row>.offset-sm-12{margin-left:100%}.column>.col-sm-12{height:100%;width:auto}}@media (min-width:1024px){.flex>.col-md,.flex>.col-md-0,.flex>.col-md-1,.flex>.col-md-2,.flex>.col-md-3,.flex>.col-md-4,.flex>.col-md-5,.flex>.col-md-6,.flex>.col-md-7,.flex>.col-md-8,.flex>.col-md-9,.flex>.col-md-10,.flex>.col-md-11,.flex>.col-md-12,.flex>.col-md-auto,.flex>.col-md-grow,.flex>.col-md-shrink,.row>.col-md,.row>.col-md-0,.row>.col-md-1,.row>.col-md-2,.row>.col-md-3,.row>.col-md-4,.row>.col-md-5,.row>.col-md-6,.row>.col-md-7,.row>.col-md-8,.row>.col-md-9,.row>.col-md-10,.row>.col-md-11,.row>.col-md-12,.row>.col-md-auto,.row>.col-md-grow,.row>.col-md-shrink{width:auto;min-width:0;max-width:100%}.column>.col-md,.column>.col-md-0,.column>.col-md-1,.column>.col-md-2,.column>.col-md-3,.column>.col-md-4,.column>.col-md-5,.column>.col-md-6,.column>.col-md-7,.column>.col-md-8,.column>.col-md-9,.column>.col-md-10,.column>.col-md-11,.column>.col-md-12,.column>.col-md-auto,.column>.col-md-grow,.column>.col-md-shrink,.flex>.col-md,.flex>.col-md-0,.flex>.col-md-1,.flex>.col-md-2,.flex>.col-md-3,.flex>.col-md-4,.flex>.col-md-5,.flex>.col-md-6,.flex>.col-md-7,.flex>.col-md-8,.flex>.col-md-9,.flex>.col-md-10,.flex>.col-md-11,.flex>.col-md-12,.flex>.col-md-auto,.flex>.col-md-grow,.flex>.col-md-shrink{height:auto;min-height:0;max-height:100%}.col-md{flex:10000 1 0%}.col-md-0,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-md-auto{flex:0 0 auto}.col-md-grow{flex:1 0 auto}.col-md-shrink{flex:0 1 auto}.row>.col-md-0{height:auto;width:0%}.row>.offset-md-0{margin-left:0%}.column>.col-md-0{height:0%;width:auto}.row>.col-md-1{height:auto;width:8.3333%}.row>.offset-md-1{margin-left:8.3333%}.column>.col-md-1{height:8.3333%;width:auto}.row>.col-md-2{height:auto;width:16.6667%}.row>.offset-md-2{margin-left:16.6667%}.column>.col-md-2{height:16.6667%;width:auto}.row>.col-md-3{height:auto;width:25%}.row>.offset-md-3{margin-left:25%}.column>.col-md-3{height:25%;width:auto}.row>.col-md-4{height:auto;width:33.3333%}.row>.offset-md-4{margin-left:33.3333%}.column>.col-md-4{height:33.3333%;width:auto}.row>.col-md-5{height:auto;width:41.6667%}.row>.offset-md-5{margin-left:41.6667%}.column>.col-md-5{height:41.6667%;width:auto}.row>.col-md-6{height:auto;width:50%}.row>.offset-md-6{margin-left:50%}.column>.col-md-6{height:50%;width:auto}.row>.col-md-7{height:auto;width:58.3333%}.row>.offset-md-7{margin-left:58.3333%}.column>.col-md-7{height:58.3333%;width:auto}.row>.col-md-8{height:auto;width:66.6667%}.row>.offset-md-8{margin-left:66.6667%}.column>.col-md-8{height:66.6667%;width:auto}.row>.col-md-9{height:auto;width:75%}.row>.offset-md-9{margin-left:75%}.column>.col-md-9{height:75%;width:auto}.row>.col-md-10{height:auto;width:83.3333%}.row>.offset-md-10{margin-left:83.3333%}.column>.col-md-10{height:83.3333%;width:auto}.row>.col-md-11{height:auto;width:91.6667%}.row>.offset-md-11{margin-left:91.6667%}.column>.col-md-11{height:91.6667%;width:auto}.row>.col-md-12{height:auto;width:100%}.row>.offset-md-12{margin-left:100%}.column>.col-md-12{height:100%;width:auto}}@media (min-width:1440px){.flex>.col-lg,.flex>.col-lg-0,.flex>.col-lg-1,.flex>.col-lg-2,.flex>.col-lg-3,.flex>.col-lg-4,.flex>.col-lg-5,.flex>.col-lg-6,.flex>.col-lg-7,.flex>.col-lg-8,.flex>.col-lg-9,.flex>.col-lg-10,.flex>.col-lg-11,.flex>.col-lg-12,.flex>.col-lg-auto,.flex>.col-lg-grow,.flex>.col-lg-shrink,.row>.col-lg,.row>.col-lg-0,.row>.col-lg-1,.row>.col-lg-2,.row>.col-lg-3,.row>.col-lg-4,.row>.col-lg-5,.row>.col-lg-6,.row>.col-lg-7,.row>.col-lg-8,.row>.col-lg-9,.row>.col-lg-10,.row>.col-lg-11,.row>.col-lg-12,.row>.col-lg-auto,.row>.col-lg-grow,.row>.col-lg-shrink{width:auto;min-width:0;max-width:100%}.column>.col-lg,.column>.col-lg-0,.column>.col-lg-1,.column>.col-lg-2,.column>.col-lg-3,.column>.col-lg-4,.column>.col-lg-5,.column>.col-lg-6,.column>.col-lg-7,.column>.col-lg-8,.column>.col-lg-9,.column>.col-lg-10,.column>.col-lg-11,.column>.col-lg-12,.column>.col-lg-auto,.column>.col-lg-grow,.column>.col-lg-shrink,.flex>.col-lg,.flex>.col-lg-0,.flex>.col-lg-1,.flex>.col-lg-2,.flex>.col-lg-3,.flex>.col-lg-4,.flex>.col-lg-5,.flex>.col-lg-6,.flex>.col-lg-7,.flex>.col-lg-8,.flex>.col-lg-9,.flex>.col-lg-10,.flex>.col-lg-11,.flex>.col-lg-12,.flex>.col-lg-auto,.flex>.col-lg-grow,.flex>.col-lg-shrink{height:auto;min-height:0;max-height:100%}.col-lg{flex:10000 1 0%}.col-lg-0,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-auto{flex:0 0 auto}.col-lg-grow{flex:1 0 auto}.col-lg-shrink{flex:0 1 auto}.row>.col-lg-0{height:auto;width:0%}.row>.offset-lg-0{margin-left:0%}.column>.col-lg-0{height:0%;width:auto}.row>.col-lg-1{height:auto;width:8.3333%}.row>.offset-lg-1{margin-left:8.3333%}.column>.col-lg-1{height:8.3333%;width:auto}.row>.col-lg-2{height:auto;width:16.6667%}.row>.offset-lg-2{margin-left:16.6667%}.column>.col-lg-2{height:16.6667%;width:auto}.row>.col-lg-3{height:auto;width:25%}.row>.offset-lg-3{margin-left:25%}.column>.col-lg-3{height:25%;width:auto}.row>.col-lg-4{height:auto;width:33.3333%}.row>.offset-lg-4{margin-left:33.3333%}.column>.col-lg-4{height:33.3333%;width:auto}.row>.col-lg-5{height:auto;width:41.6667%}.row>.offset-lg-5{margin-left:41.6667%}.column>.col-lg-5{height:41.6667%;width:auto}.row>.col-lg-6{height:auto;width:50%}.row>.offset-lg-6{margin-left:50%}.column>.col-lg-6{height:50%;width:auto}.row>.col-lg-7{height:auto;width:58.3333%}.row>.offset-lg-7{margin-left:58.3333%}.column>.col-lg-7{height:58.3333%;width:auto}.row>.col-lg-8{height:auto;width:66.6667%}.row>.offset-lg-8{margin-left:66.6667%}.column>.col-lg-8{height:66.6667%;width:auto}.row>.col-lg-9{height:auto;width:75%}.row>.offset-lg-9{margin-left:75%}.column>.col-lg-9{height:75%;width:auto}.row>.col-lg-10{height:auto;width:83.3333%}.row>.offset-lg-10{margin-left:83.3333%}.column>.col-lg-10{height:83.3333%;width:auto}.row>.col-lg-11{height:auto;width:91.6667%}.row>.offset-lg-11{margin-left:91.6667%}.column>.col-lg-11{height:91.6667%;width:auto}.row>.col-lg-12{height:auto;width:100%}.row>.offset-lg-12{margin-left:100%}.column>.col-lg-12{height:100%;width:auto}}@media (min-width:1920px){.flex>.col-xl,.flex>.col-xl-0,.flex>.col-xl-1,.flex>.col-xl-2,.flex>.col-xl-3,.flex>.col-xl-4,.flex>.col-xl-5,.flex>.col-xl-6,.flex>.col-xl-7,.flex>.col-xl-8,.flex>.col-xl-9,.flex>.col-xl-10,.flex>.col-xl-11,.flex>.col-xl-12,.flex>.col-xl-auto,.flex>.col-xl-grow,.flex>.col-xl-shrink,.row>.col-xl,.row>.col-xl-0,.row>.col-xl-1,.row>.col-xl-2,.row>.col-xl-3,.row>.col-xl-4,.row>.col-xl-5,.row>.col-xl-6,.row>.col-xl-7,.row>.col-xl-8,.row>.col-xl-9,.row>.col-xl-10,.row>.col-xl-11,.row>.col-xl-12,.row>.col-xl-auto,.row>.col-xl-grow,.row>.col-xl-shrink{width:auto;min-width:0;max-width:100%}.column>.col-xl,.column>.col-xl-0,.column>.col-xl-1,.column>.col-xl-2,.column>.col-xl-3,.column>.col-xl-4,.column>.col-xl-5,.column>.col-xl-6,.column>.col-xl-7,.column>.col-xl-8,.column>.col-xl-9,.column>.col-xl-10,.column>.col-xl-11,.column>.col-xl-12,.column>.col-xl-auto,.column>.col-xl-grow,.column>.col-xl-shrink,.flex>.col-xl,.flex>.col-xl-0,.flex>.col-xl-1,.flex>.col-xl-2,.flex>.col-xl-3,.flex>.col-xl-4,.flex>.col-xl-5,.flex>.col-xl-6,.flex>.col-xl-7,.flex>.col-xl-8,.flex>.col-xl-9,.flex>.col-xl-10,.flex>.col-xl-11,.flex>.col-xl-12,.flex>.col-xl-auto,.flex>.col-xl-grow,.flex>.col-xl-shrink{height:auto;min-height:0;max-height:100%}.col-xl{flex:10000 1 0%}.col-xl-0,.col-xl-1,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-auto{flex:0 0 auto}.col-xl-grow{flex:1 0 auto}.col-xl-shrink{flex:0 1 auto}.row>.col-xl-0{height:auto;width:0%}.row>.offset-xl-0{margin-left:0%}.column>.col-xl-0{height:0%;width:auto}.row>.col-xl-1{height:auto;width:8.3333%}.row>.offset-xl-1{margin-left:8.3333%}.column>.col-xl-1{height:8.3333%;width:auto}.row>.col-xl-2{height:auto;width:16.6667%}.row>.offset-xl-2{margin-left:16.6667%}.column>.col-xl-2{height:16.6667%;width:auto}.row>.col-xl-3{height:auto;width:25%}.row>.offset-xl-3{margin-left:25%}.column>.col-xl-3{height:25%;width:auto}.row>.col-xl-4{height:auto;width:33.3333%}.row>.offset-xl-4{margin-left:33.3333%}.column>.col-xl-4{height:33.3333%;width:auto}.row>.col-xl-5{height:auto;width:41.6667%}.row>.offset-xl-5{margin-left:41.6667%}.column>.col-xl-5{height:41.6667%;width:auto}.row>.col-xl-6{height:auto;width:50%}.row>.offset-xl-6{margin-left:50%}.column>.col-xl-6{height:50%;width:auto}.row>.col-xl-7{height:auto;width:58.3333%}.row>.offset-xl-7{margin-left:58.3333%}.column>.col-xl-7{height:58.3333%;width:auto}.row>.col-xl-8{height:auto;width:66.6667%}.row>.offset-xl-8{margin-left:66.6667%}.column>.col-xl-8{height:66.6667%;width:auto}.row>.col-xl-9{height:auto;width:75%}.row>.offset-xl-9{margin-left:75%}.column>.col-xl-9{height:75%;width:auto}.row>.col-xl-10{height:auto;width:83.3333%}.row>.offset-xl-10{margin-left:83.3333%}.column>.col-xl-10{height:83.3333%;width:auto}.row>.col-xl-11{height:auto;width:91.6667%}.row>.offset-xl-11{margin-left:91.6667%}.column>.col-xl-11{height:91.6667%;width:auto}.row>.col-xl-12{height:auto;width:100%}.row>.offset-xl-12{margin-left:100%}.column>.col-xl-12{height:100%;width:auto}}.rounded-borders{border-radius:4px}.border-radius-inherit{border-radius:inherit}.no-transition{transition:none!important}.transition-0{transition:0s!important}.glossy{background-image:linear-gradient(180deg,hsla(0,0%,100%,0.3),hsla(0,0%,100%,0) 50%,rgba(0,0,0,0.12) 51%,rgba(0,0,0,0.04))!important}.q-placeholder::-webkit-input-placeholder{color:inherit;opacity:0.7}.q-placeholder::-moz-placeholder{color:inherit;opacity:0.7}.q-placeholder:-ms-input-placeholder{color:inherit!important;opacity:0.7!important}.q-placeholder::placeholder{color:inherit;opacity:0.7}.q-body--fullscreen-mixin,.q-body--prevent-scroll{position:fixed!important}.q-body--force-scrollbar{overflow-y:scroll}.q-no-input-spinner{-moz-appearance:textfield!important}.q-no-input-spinner::-webkit-inner-spin-button,.q-no-input-spinner::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.q-link{outline:0;text-decoration:none}body.electron .q-electron-drag{-webkit-user-select:none;-webkit-app-region:drag}body.electron .q-electron-drag--exception,body.electron .q-electron-drag .q-btn-item{-webkit-app-region:no-drag}img.responsive{max-width:100%;height:auto}.non-selectable{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.scroll{overflow:auto}.scroll,.scroll-x,.scroll-y{-webkit-overflow-scrolling:touch;will-change:scroll-position}.scroll-x{overflow-x:auto}.scroll-y{overflow-y:auto}.no-scroll{overflow:hidden!important}.no-pointer-events{pointer-events:none!important}.all-pointer-events{pointer-events:all!important}.cursor-pointer{cursor:pointer!important}.cursor-not-allowed{cursor:not-allowed!important}.cursor-inherit{cursor:inherit!important}.cursor-none{cursor:none!important}[aria-busy=true]{cursor:progress}[aria-controls],[role=button]{cursor:pointer}[aria-disabled]{cursor:default}.rotate-45{transform:rotate(45deg)}.rotate-90{transform:rotate(90deg)}.rotate-135{transform:rotate(135deg)}.rotate-180{transform:rotate(180deg)}.rotate-205{transform:rotate(205deg)}.rotate-270{transform:rotate(270deg)}.rotate-315{transform:rotate(315deg)}.flip-horizontal{transform:scaleX(-1)}.flip-vertical{transform:scaleY(-1)}.float-left{float:left}.float-right{float:right}.relative-position{position:relative}.fixed,.fixed-bottom,.fixed-bottom-left,.fixed-bottom-right,.fixed-center,.fixed-full,.fixed-left,.fixed-right,.fixed-top,.fixed-top-left,.fixed-top-right,.fullscreen{position:fixed}.absolute,.absolute-bottom,.absolute-bottom-left,.absolute-bottom-right,.absolute-center,.absolute-full,.absolute-left,.absolute-right,.absolute-top,.absolute-top-left,.absolute-top-right{position:absolute}.absolute-top,.fixed-top{top:0;left:0;right:0}.absolute-right,.fixed-right{top:0;right:0;bottom:0}.absolute-bottom,.fixed-bottom{right:0;bottom:0;left:0}.absolute-left,.fixed-left{top:0;bottom:0;left:0}.absolute-top-left,.fixed-top-left{top:0;left:0}.absolute-top-right,.fixed-top-right{top:0;right:0}.absolute-bottom-left,.fixed-bottom-left{bottom:0;left:0}.absolute-bottom-right,.fixed-bottom-right{bottom:0;right:0}.fullscreen{z-index:6000;border-radius:0!important;max-width:100vw;max-height:100vh}.absolute-full,.fixed-full,.fullscreen{top:0;right:0;bottom:0;left:0}.absolute-center,.fixed-center{top:50%;left:50%;transform:translate(-50%,-50%)}.vertical-top{vertical-align:top!important}.vertical-middle{vertical-align:middle!important}.vertical-bottom{vertical-align:bottom!important}.on-left{margin-right:12px}.on-right{margin-left:12px}.q-position-engine{margin-top:var(--q-pe-top,0)!important;margin-left:var(--q-pe-left,0)!important;will-change:auto;visibility:collapse}:root{--q-size-xs:0;--q-size-sm:600px;--q-size-md:1024px;--q-size-lg:1440px;--q-size-xl:1920px}.fit{width:100%!important}.fit,.full-height{height:100%!important}.full-width{width:100%!important;margin-left:0!important;margin-right:0!important}.window-height{margin-top:0!important;margin-bottom:0!important;height:100vh!important}.window-width{margin-left:0!important;margin-right:0!important;width:100vw!important}.block{display:block!important}.inline-block{display:inline-block!important}.q-pa-none{padding:0 0}.q-pl-none,.q-px-none{padding-left:0}.q-pr-none,.q-px-none{padding-right:0}.q-pt-none,.q-py-none{padding-top:0}.q-pb-none,.q-py-none{padding-bottom:0}.q-ma-none{margin:0 0}.q-ml-none,.q-mx-none{margin-left:0}.q-mr-none,.q-mx-none{margin-right:0}.q-mt-none,.q-my-none{margin-top:0}.q-mb-none,.q-my-none{margin-bottom:0}.q-pa-xs{padding:4px 4px}.q-pl-xs,.q-px-xs{padding-left:4px}.q-pr-xs,.q-px-xs{padding-right:4px}.q-pt-xs,.q-py-xs{padding-top:4px}.q-pb-xs,.q-py-xs{padding-bottom:4px}.q-ma-xs{margin:4px 4px}.q-ml-xs,.q-mx-xs{margin-left:4px}.q-mr-xs,.q-mx-xs{margin-right:4px}.q-mt-xs,.q-my-xs{margin-top:4px}.q-mb-xs,.q-my-xs{margin-bottom:4px}.q-pa-sm{padding:8px 8px}.q-pl-sm,.q-px-sm{padding-left:8px}.q-pr-sm,.q-px-sm{padding-right:8px}.q-pt-sm,.q-py-sm{padding-top:8px}.q-pb-sm,.q-py-sm{padding-bottom:8px}.q-ma-sm{margin:8px 8px}.q-ml-sm,.q-mx-sm{margin-left:8px}.q-mr-sm,.q-mx-sm{margin-right:8px}.q-mt-sm,.q-my-sm{margin-top:8px}.q-mb-sm,.q-my-sm{margin-bottom:8px}.q-pa-md{padding:16px 16px}.q-pl-md,.q-px-md{padding-left:16px}.q-pr-md,.q-px-md{padding-right:16px}.q-pt-md,.q-py-md{padding-top:16px}.q-pb-md,.q-py-md{padding-bottom:16px}.q-ma-md{margin:16px 16px}.q-ml-md,.q-mx-md{margin-left:16px}.q-mr-md,.q-mx-md{margin-right:16px}.q-mt-md,.q-my-md{margin-top:16px}.q-mb-md,.q-my-md{margin-bottom:16px}.q-pa-lg{padding:24px 24px}.q-pl-lg,.q-px-lg{padding-left:24px}.q-pr-lg,.q-px-lg{padding-right:24px}.q-pt-lg,.q-py-lg{padding-top:24px}.q-pb-lg,.q-py-lg{padding-bottom:24px}.q-ma-lg{margin:24px 24px}.q-ml-lg,.q-mx-lg{margin-left:24px}.q-mr-lg,.q-mx-lg{margin-right:24px}.q-mt-lg,.q-my-lg{margin-top:24px}.q-mb-lg,.q-my-lg{margin-bottom:24px}.q-pa-xl{padding:48px 48px}.q-pl-xl,.q-px-xl{padding-left:48px}.q-pr-xl,.q-px-xl{padding-right:48px}.q-pt-xl,.q-py-xl{padding-top:48px}.q-pb-xl,.q-py-xl{padding-bottom:48px}.q-ma-xl{margin:48px 48px}.q-ml-xl,.q-mx-xl{margin-left:48px}.q-mr-xl,.q-mx-xl{margin-right:48px}.q-mt-xl,.q-my-xl{margin-top:48px}.q-mb-xl,.q-my-xl{margin-bottom:48px}.q-ml-auto{margin-left:auto}.q-mr-auto,.q-mx-auto{margin-right:auto}.q-mx-auto{margin-left:auto}.q-touch{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;user-drag:none;-khtml-user-drag:none;-webkit-user-drag:none}.q-touch-x{touch-action:pan-x}.q-touch-y{touch-action:pan-y}.q-transition--fade-leave-active,.q-transition--flip-leave-active,.q-transition--jump-down-leave-active,.q-transition--jump-left-leave-active,.q-transition--jump-right-leave-active,.q-transition--jump-up-leave-active,.q-transition--rotate-leave-active,.q-transition--scale-leave-active,.q-transition--slide-down-leave-active,.q-transition--slide-left-leave-active,.q-transition--slide-right-leave-active,.q-transition--slide-up-leave-active{position:absolute}.q-transition--slide-down-enter-active,.q-transition--slide-down-leave-active,.q-transition--slide-left-enter-active,.q-transition--slide-left-leave-active,.q-transition--slide-right-enter-active,.q-transition--slide-right-leave-active,.q-transition--slide-up-enter-active,.q-transition--slide-up-leave-active{transition:transform 0.3s cubic-bezier(0.215,0.61,0.355,1)}.q-transition--slide-right-enter{transform:translate3d(-100%,0,0)}.q-transition--slide-left-enter,.q-transition--slide-right-leave-to{transform:translate3d(100%,0,0)}.q-transition--slide-left-leave-to{transform:translate3d(-100%,0,0)}.q-transition--slide-up-enter{transform:translate3d(0,100%,0)}.q-transition--slide-down-enter,.q-transition--slide-up-leave-to{transform:translate3d(0,-100%,0)}.q-transition--slide-down-leave-to{transform:translate3d(0,100%,0)}.q-transition--jump-down-enter-active,.q-transition--jump-down-leave-active,.q-transition--jump-left-enter-active,.q-transition--jump-left-leave-active,.q-transition--jump-right-enter-active,.q-transition--jump-right-leave-active,.q-transition--jump-up-enter-active,.q-transition--jump-up-leave-active{transition:opacity 0.3s,transform 0.3s}.q-transition--jump-down-enter,.q-transition--jump-down-leave-to,.q-transition--jump-left-enter,.q-transition--jump-left-leave-to,.q-transition--jump-right-enter,.q-transition--jump-right-leave-to,.q-transition--jump-up-enter,.q-transition--jump-up-leave-to{opacity:0}.q-transition--jump-right-enter{transform:translate3d(-15px,0,0)}.q-transition--jump-left-enter,.q-transition--jump-right-leave-to{transform:translate3d(15px,0,0)}.q-transition--jump-left-leave-to{transform:translateX(-15px)}.q-transition--jump-up-enter{transform:translate3d(0,15px,0)}.q-transition--jump-down-enter,.q-transition--jump-up-leave-to{transform:translate3d(0,-15px,0)}.q-transition--jump-down-leave-to{transform:translate3d(0,15px,0)}.q-transition--fade-enter-active,.q-transition--fade-leave-active{transition:opacity 0.3s ease-out}.q-transition--fade-enter,.q-transition--fade-leave,.q-transition--fade-leave-to{opacity:0}.q-transition--scale-enter-active,.q-transition--scale-leave-active{transition:opacity 0.3s,transform 0.3s cubic-bezier(0.215,0.61,0.355,1)}.q-transition--scale-enter,.q-transition--scale-leave,.q-transition--scale-leave-to{opacity:0;transform:scale3d(0,0,1)}.q-transition--rotate-enter-active,.q-transition--rotate-leave-active{transition:opacity 0.3s,transform 0.3s cubic-bezier(0.215,0.61,0.355,1);transform-style:preserve-3d}.q-transition--rotate-enter,.q-transition--rotate-leave,.q-transition--rotate-leave-to{opacity:0;transform:scale3d(0,0,1) rotate3d(0,0,1,90deg)}.q-transition--flip-down-enter-active,.q-transition--flip-down-leave-active,.q-transition--flip-left-enter-active,.q-transition--flip-left-leave-active,.q-transition--flip-right-enter-active,.q-transition--flip-right-leave-active,.q-transition--flip-up-enter-active,.q-transition--flip-up-leave-active{transition:transform 0.3s;-webkit-backface-visibility:hidden;backface-visibility:hidden}.q-transition--flip-down-enter-to,.q-transition--flip-down-leave,.q-transition--flip-left-enter-to,.q-transition--flip-left-leave,.q-transition--flip-right-enter-to,.q-transition--flip-right-leave,.q-transition--flip-up-enter-to,.q-transition--flip-up-leave{transform:perspective(400px) rotate3d(1,1,0,0deg)}.q-transition--flip-right-enter{transform:perspective(400px) rotate3d(0,1,0,-180deg)}.q-transition--flip-left-enter,.q-transition--flip-right-leave-to{transform:perspective(400px) rotate3d(0,1,0,180deg)}.q-transition--flip-left-leave-to{transform:perspective(400px) rotate3d(0,1,0,-180deg)}.q-transition--flip-up-enter{transform:perspective(400px) rotate3d(1,0,0,-180deg)}.q-transition--flip-down-enter,.q-transition--flip-up-leave-to{transform:perspective(400px) rotate3d(1,0,0,180deg)}.q-transition--flip-down-leave-to{transform:perspective(400px) rotate3d(1,0,0,-180deg)}body{min-width:100px;min-height:100%;font-family:Roboto,-apple-system,Helvetica Neue,Helvetica,Arial,sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:antialiased;line-height:1.5;font-size:14px}h1{font-size:6rem;line-height:6rem;letter-spacing:-0.01562em}h1,h2{font-weight:300}h2{font-size:3.75rem;line-height:3.75rem;letter-spacing:-0.00833em}h3{font-size:3rem;line-height:3.125rem;letter-spacing:normal}h3,h4{font-weight:400}h4{font-size:2.125rem;line-height:2.5rem;letter-spacing:0.00735em}h5{font-size:1.5rem;font-weight:400;letter-spacing:normal}h5,h6{line-height:2rem}h6{font-size:1.25rem;font-weight:500;letter-spacing:0.0125em}p{margin:0 0 16px}.text-h1{font-size:6rem;font-weight:300;line-height:6rem;letter-spacing:-0.01562em}.text-h2{font-size:3.75rem;font-weight:300;line-height:3.75rem;letter-spacing:-0.00833em}.text-h3{font-size:3rem;font-weight:400;line-height:3.125rem;letter-spacing:normal}.text-h4{font-size:2.125rem;font-weight:400;line-height:2.5rem;letter-spacing:0.00735em}.text-h5{font-size:1.5rem;font-weight:400;line-height:2rem;letter-spacing:normal}.text-h6{font-size:1.25rem;font-weight:500;line-height:2rem;letter-spacing:0.0125em}.text-subtitle1{font-size:1rem;font-weight:400;line-height:1.75rem;letter-spacing:0.00937em}.text-subtitle2{font-size:0.875rem;font-weight:500;line-height:1.375rem;letter-spacing:0.00714em}.text-body1{font-size:1rem;font-weight:400;line-height:1.5rem;letter-spacing:0.03125em}.text-body2{font-size:0.875rem;font-weight:400;line-height:1.25rem;letter-spacing:0.01786em}.text-overline{font-size:0.75rem;font-weight:500;line-height:2rem;letter-spacing:0.16667em}.text-caption{font-size:0.75rem;font-weight:400;line-height:1.25rem;letter-spacing:0.03333em}.text-uppercase{text-transform:uppercase}.text-lowercase{text-transform:lowercase}.text-capitalize{text-transform:capitalize}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-justify{text-align:justify;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}.text-italic{font-style:italic}.text-bold{font-weight:700}.text-no-wrap{white-space:nowrap}.text-strike{text-decoration:line-through}.text-weight-thin{font-weight:100}.text-weight-light{font-weight:300}.text-weight-regular{font-weight:400}.text-weight-medium{font-weight:500}.text-weight-bold{font-weight:700}.text-weight-bolder{font-weight:900}small{font-size:80%}big{font-size:170%}sub{bottom:-0.25em}sup{top:-0.5em}.no-margin{margin:0!important}.no-padding{padding:0!important}.no-border{border:0!important}.no-border-radius{border-radius:0!important}.no-box-shadow{box-shadow:none!important}.no-outline{outline:0!important}.ellipsis{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ellipsis-2-lines,.ellipsis-3-lines{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.ellipsis-2-lines{-webkit-line-clamp:2}.ellipsis-3-lines{-webkit-line-clamp:3}.readonly{cursor:default!important}.disabled,.disabled *,[disabled],[disabled] *{outline:0!important;cursor:not-allowed!important}.disabled,[disabled]{opacity:0.6!important}.hidden{display:none!important}.invisible{visibility:hidden!important}.transparent{background:transparent!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-hidden-y{overflow-y:hidden!important}.hide-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbar::-webkit-scrollbar{width:0;height:0;display:none}.dimmed:after,.light-dimmed:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}.dimmed:after{background:rgba(0,0,0,0.4)!important}.light-dimmed:after{background:hsla(0,0%,100%,0.6)!important}.z-top{z-index:7000!important}.z-max{z-index:9998!important}body.capacitor .capacitor-hide,body.cordova .cordova-hide,body.desktop .desktop-hide,body.electron .electron-hide,body.mobile .mobile-hide,body.native-mobile .native-mobile-hide,body.platform-android .platform-android-hide,body.platform-ios .platform-ios-hide,body.touch .touch-hide,body.within-iframe .within-iframe-hide,body:not(.capacitor) .capacitor-only,body:not(.cordova) .cordova-only,body:not(.desktop) .desktop-only,body:not(.electron) .electron-only,body:not(.mobile) .mobile-only,body:not(.native-mobile) .native-mobile-only,body:not(.platform-android) .platform-android-only,body:not(.platform-ios) .platform-ios-only,body:not(.touch) .touch-only,body:not(.within-iframe) .within-iframe-only{display:none!important}@media (orientation:portrait){.orientation-landscape{display:none!important}}@media (orientation:landscape){.orientation-portrait{display:none!important}}@media screen{.print-only{display:none!important}}@media print{.print-hide{display:none!important}}@media (max-width:599px){.gt-lg,.gt-md,.gt-sm,.gt-xs,.lg,.md,.sm,.xl,.xs-hide{display:none!important}}@media (min-width:600px) and (max-width:1023px){.gt-lg,.gt-md,.gt-sm,.lg,.lt-sm,.md,.sm-hide,.xl,.xs{display:none!important}}@media (min-width:1024px) and (max-width:1439px){.gt-lg,.gt-md,.lg,.lt-md,.lt-sm,.md-hide,.sm,.xl,.xs{display:none!important}}@media (min-width:1440px) and (max-width:1919px){.gt-lg,.lg-hide,.lt-lg,.lt-md,.lt-sm,.md,.sm,.xl,.xs{display:none!important}}@media (min-width:1920px){.lg,.lt-lg,.lt-md,.lt-sm,.lt-xl,.md,.sm,.xl-hide,.xs{display:none!important}}.q-focus-helper{outline:0}body.desktop .q-focus-helper{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;border-radius:inherit;opacity:0;transition:background-color 0.3s cubic-bezier(0.25,0.8,0.5,1),opacity 0.4s cubic-bezier(0.25,0.8,0.5,1)}body.desktop .q-focus-helper:after,body.desktop .q-focus-helper:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;border-radius:inherit;transition:background-color 0.3s cubic-bezier(0.25,0.8,0.5,1),opacity 0.6s cubic-bezier(0.25,0.8,0.5,1)}body.desktop .q-focus-helper:before{background:#000}body.desktop .q-focus-helper:after{background:#fff}body.desktop .q-focus-helper--rounded{border-radius:4px}body.desktop .q-focus-helper--round{border-radius:50%}body.desktop .q-focusable,body.desktop .q-hoverable,body.desktop .q-manual-focusable{outline:0}body.desktop .q-focusable:focus>.q-focus-helper,body.desktop .q-hoverable:hover>.q-focus-helper,body.desktop .q-manual-focusable--focused>.q-focus-helper{background:currentColor;opacity:0.15}body.desktop .q-focusable:focus>.q-focus-helper:before,body.desktop .q-hoverable:hover>.q-focus-helper:before,body.desktop .q-manual-focusable--focused>.q-focus-helper:before{opacity:0.1}body.desktop .q-focusable:focus>.q-focus-helper:after,body.desktop .q-hoverable:hover>.q-focus-helper:after,body.desktop .q-manual-focusable--focused>.q-focus-helper:after{opacity:0.4}body.desktop .q-focusable:focus>.q-focus-helper,body.desktop .q-manual-focusable--focused>.q-focus-helper{opacity:0.22}body.body--dark{color:#fff;background:#121212}.q-dark{color:#fff;background:#424242;background:var(--q-color-dark)}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.q-item:after,.q-notification:after,.q-toolbar:after{content:"";font-size:0;visibility:collapse;display:inline;width:0}.q-banner>.q-banner__avatar{min-height:38px}.q-banner--dense>.q-banner__avatar{min-height:20px}.q-item:after{min-height:32px}.q-item--denseafter,.q-list--dense>.q-itemafter{min-height:24px}.q-toolbar:after{min-height:50px}.q-notification--standard:after{min-height:48px}.q-notification--multi-line{min-height:68px}.q-btn__wrapper,.q-menu .q-item__section--main,.q-table__middle,.q-time__content,.q-toolbar__title{flex-basis:auto}.q-banner__content{flex-basis:0!important}.q-dialog__inner>.q-banner>.q-banner__content,.q-menu>.q-banner>.q-banner__content{flex-basis:auto!important}.q-tab__content{flex-basis:auto;min-width:100%}.q-card__actions--vert{flex:0 0 auto}.column{min-width:0%}.q-item__section--avatar{min-width:56px}button.q-btn--actionable:active:hover .q-btn__wrapper{margin:-1px 1px 1px -1px}.q-btn-group--push>button.q-btn--push.q-btn--actionable:active:hover .q-btn__wrapper{margin:1px 1px -1px -1px}.q-btn{overflow:visible}.q-btn--wrap{flex-direction:row}.q-carousel__slide>*{max-width:100%}.q-tabs--vertical .q-tab__indicator{height:auto}.q-spinner{-webkit-animation:q-ie-spinner 2s linear infinite;animation:q-ie-spinner 2s linear infinite;transform-origin:center center;opacity:0.5}.q-spinner.q-spinner-mat .path{stroke-dasharray:89,200}.q-checkbox__indet{opacity:0}.q-checkbox__inner--indet .q-checkbox__indet{opacity:1}.q-radio__check{opacity:0}.q-radio__inner--truthy .q-radio__check{opacity:1}.q-date__main{min-height:290px!important}.q-date__months{align-items:stretch}.q-time--portrait .q-time__main{display:flex;flex-direction:column;flex-wrap:nowrap;flex:1 0 auto}.q-field__prefix,.q-field__suffix{flex:1 0 auto}.q-field ::-ms-clear{display:none}.q-field__bottom--stale .q-field__messages{left:12px}.q-field--borderless .q-field__bottom--stale .q-field__messages,.q-field--standard .q-field__bottom--stale .q-field__messages{left:0}.q-field--float .q-field__label{max-width:100%}.q-focus-helper{z-index:1}}@media (-ms-high-contrast:none) and (min-width:0),screen and (-ms-high-contrast:active) and (min-width:0){.flex>.col,.flex>.col-xs,.row>.col,.row>.col-xs{flex-basis:auto;min-width:0%}}@media (-ms-high-contrast:none) and (min-width:600px),screen and (-ms-high-contrast:active) and (min-width:600px){.flex>.col-sm,.row>.col-sm{flex-basis:auto;min-width:0%}}@media (-ms-high-contrast:none) and (min-width:1024px),screen and (-ms-high-contrast:active) and (min-width:1024px){.flex>.col-md,.row>.col-md{flex-basis:auto;min-width:0%}}@media (-ms-high-contrast:none) and (min-width:1440px),screen and (-ms-high-contrast:active) and (min-width:1440px){.flex>.col-lg,.row>.col-lg{flex-basis:auto;min-width:0%}}@media (-ms-high-contrast:none) and (min-width:1920px),screen and (-ms-high-contrast:active) and (min-width:1920px){.flex>.col-xl,.row>.col-xl{flex-basis:auto;min-width:0%}}@supports (-ms-ime-align:auto){.q-item:after,.q-notification:after,.q-toolbar:after{content:"";font-size:0;visibility:collapse;display:inline;width:0}.q-banner>.q-banner__avatar{min-height:38px}.q-banner--dense>.q-banner__avatar{min-height:20px}.q-item:after{min-height:32px}.q-item--denseafter,.q-list--dense>.q-itemafter{min-height:24px}.q-toolbar:after{min-height:50px}.q-notification--standard:after{min-height:48px}.q-notification--multi-line{min-height:68px}.q-btn__wrapper,.q-menu .q-item__section--main,.q-table__middle,.q-time__content,.q-toolbar__title{flex-basis:auto}.q-banner__content{flex-basis:0!important}.q-dialog__inner>.q-banner>.q-banner__content,.q-menu>.q-banner>.q-banner__content{flex-basis:auto!important}.q-tab__content{flex-basis:auto;min-width:100%}.q-card__actions--vert{flex:0 0 auto}.column{min-width:0%}@media (-ms-high-contrast:none) and (min-width:0),screen and (-ms-high-contrast:active) and (min-width:0){.flex>.col,.flex>.col-xs,.row>.col,.row>.col-xs{flex-basis:auto;min-width:0%}}@media (-ms-high-contrast:none) and (min-width:600px),screen and (-ms-high-contrast:active) and (min-width:600px){.flex>.col-sm,.row>.col-sm{flex-basis:auto;min-width:0%}}@media (-ms-high-contrast:none) and (min-width:1024px),screen and (-ms-high-contrast:active) and (min-width:1024px){.flex>.col-md,.row>.col-md{flex-basis:auto;min-width:0%}}@media (-ms-high-contrast:none) and (min-width:1440px),screen and (-ms-high-contrast:active) and (min-width:1440px){.flex>.col-lg,.row>.col-lg{flex-basis:auto;min-width:0%}}@media (-ms-high-contrast:none) and (min-width:1920px),screen and (-ms-high-contrast:active) and (min-width:1920px){.flex>.col-xl,.row>.col-xl{flex-basis:auto;min-width:0%}}.q-item__section--avatar{min-width:56px}button.q-btn--actionable:active:hover .q-btn__wrapper{margin:-1px 1px 1px -1px}.q-btn-group--push>button.q-btn--push.q-btn--actionable:active:hover .q-btn__wrapper{margin:1px 1px -1px -1px}.q-btn{overflow:visible}.q-btn--wrap{flex-direction:row}.q-carousel__slide>*{max-width:100%}.q-tabs--vertical .q-tab__indicator{height:auto}.q-spinner{-webkit-animation:q-ie-spinner 2s linear infinite;animation:q-ie-spinner 2s linear infinite;transform-origin:center center;opacity:0.5}.q-spinner.q-spinner-mat .path{stroke-dasharray:89,200}.q-checkbox__indet{opacity:0}.q-checkbox__inner--indet .q-checkbox__indet{opacity:1}.q-radio__check{opacity:0}.q-radio__inner--truthy .q-radio__check{opacity:1}.q-date__main{min-height:290px!important}.q-date__months{align-items:stretch}.q-time--portrait .q-time__main{display:flex;flex-direction:column;flex-wrap:nowrap;flex:1 0 auto}.q-field__prefix,.q-field__suffix{flex:1 0 auto}.q-field ::-ms-clear{display:none}.q-field__bottom--stale .q-field__messages{left:12px}.q-field--borderless .q-field__bottom--stale .q-field__messages,.q-field--standard .q-field__bottom--stale .q-field__messages{left:0}.q-field--float .q-field__label{max-width:100%}.q-focus-helper{z-index:1}}@-webkit-keyframes q-circular-progress-circle{0%{stroke-dasharray:1,400;stroke-dashoffset:0}50%{stroke-dasharray:400,400;stroke-dashoffset:-100}to{stroke-dasharray:400,400;stroke-dashoffset:-300}}@keyframes q-circular-progress-circle{0%{stroke-dasharray:1,400;stroke-dashoffset:0}50%{stroke-dasharray:400,400;stroke-dashoffset:-100}to{stroke-dasharray:400,400;stroke-dashoffset:-300}}@-webkit-keyframes q-expansion-done{0%{--q-exp-done:1}}@keyframes q-expansion-done{0%{--q-exp-done:1}}@-webkit-keyframes q-autofill{to{background:transparent;color:inherit}}@keyframes q-autofill{to{background:transparent;color:inherit}}@-webkit-keyframes q-field-label{40%{margin-left:2px}60%,80%{margin-left:-2px}70%,90%{margin-left:2px}}@keyframes q-field-label{40%{margin-left:2px}60%,80%{margin-left:-2px}70%,90%{margin-left:2px}}@-webkit-keyframes q-linear-progress--indeterminate{0%{transform:translate3d(-35%,0,0) scale3d(0.35,1,1)}60%{transform:translate3d(100%,0,0) scale3d(0.9,1,1)}to{transform:translate3d(100%,0,0) scale3d(0.9,1,1)}}@keyframes q-linear-progress--indeterminate{0%{transform:translate3d(-35%,0,0) scale3d(0.35,1,1)}60%{transform:translate3d(100%,0,0) scale3d(0.9,1,1)}to{transform:translate3d(100%,0,0) scale3d(0.9,1,1)}}@-webkit-keyframes q-linear-progress--indeterminate-short{0%{transform:translate3d(-101%,0,0) scale3d(1,1,1)}60%{transform:translate3d(107%,0,0) scale3d(0.01,1,1)}to{transform:translate3d(107%,0,0) scale3d(0.01,1,1)}}@keyframes q-linear-progress--indeterminate-short{0%{transform:translate3d(-101%,0,0) scale3d(1,1,1)}60%{transform:translate3d(107%,0,0) scale3d(0.01,1,1)}to{transform:translate3d(107%,0,0) scale3d(0.01,1,1)}}@-webkit-keyframes q-skeleton--fade{0%{opacity:1}50%{opacity:0.4}to{opacity:1}}@keyframes q-skeleton--fade{0%{opacity:1}50%{opacity:0.4}to{opacity:1}}@-webkit-keyframes q-skeleton--pulse{0%{transform:scale(1)}50%{transform:scale(0.85)}to{transform:scale(1)}}@keyframes q-skeleton--pulse{0%{transform:scale(1)}50%{transform:scale(0.85)}to{transform:scale(1)}}@-webkit-keyframes q-skeleton--pulse-x{0%{transform:scaleX(1)}50%{transform:scaleX(0.75)}to{transform:scaleX(1)}}@keyframes q-skeleton--pulse-x{0%{transform:scaleX(1)}50%{transform:scaleX(0.75)}to{transform:scaleX(1)}}@-webkit-keyframes q-skeleton--pulse-y{0%{transform:scaleY(1)}50%{transform:scaleY(0.75)}to{transform:scaleY(1)}}@keyframes q-skeleton--pulse-y{0%{transform:scaleY(1)}50%{transform:scaleY(0.75)}to{transform:scaleY(1)}}@-webkit-keyframes q-skeleton--wave{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}@keyframes q-skeleton--wave{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}@-webkit-keyframes q-spin{0%{transform:rotate3d(0,0,1,0deg)}25%{transform:rotate3d(0,0,1,90deg)}50%{transform:rotate3d(0,0,1,180deg)}75%{transform:rotate3d(0,0,1,270deg)}to{transform:rotate3d(0,0,1,359deg)}}@keyframes q-spin{0%{transform:rotate3d(0,0,1,0deg)}25%{transform:rotate3d(0,0,1,90deg)}50%{transform:rotate3d(0,0,1,180deg)}75%{transform:rotate3d(0,0,1,270deg)}to{transform:rotate3d(0,0,1,359deg)}}@-webkit-keyframes q-mat-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes q-mat-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@-webkit-keyframes q-notif-badge{15%{transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}}@keyframes q-notif-badge{15%{transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}}@-webkit-keyframes q-notif-progress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@keyframes q-notif-progress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@-webkit-keyframes q-scale{0%{transform:scale(1)}50%{transform:scale(1.04)}to{transform:scale(1)}}@keyframes q-scale{0%{transform:scale(1)}50%{transform:scale(1.04)}to{transform:scale(1)}}@-webkit-keyframes q-fade{0%{opacity:0}to{opacity:1}}@keyframes q-fade{0%{opacity:0}to{opacity:1}}@-webkit-keyframes q-ie-spinner{0%{opacity:0.5}50%{opacity:1}to{opacity:0.5}}@keyframes q-ie-spinner{0%{opacity:0.5}50%{opacity:1}to{opacity:0.5}} \ No newline at end of file diff --git a/lnbits/static/vendor/quasar@1.9.7/quasar.umd.js b/lnbits/static/vendor/quasar@1.9.7/quasar.umd.js new file mode 100644 index 00000000..13384242 --- /dev/null +++ b/lnbits/static/vendor/quasar@1.9.7/quasar.umd.js @@ -0,0 +1,34346 @@ +/*! + * Quasar Framework v1.9.7 + * (c) 2015-present Razvan Stoenescu + * Released under the MIT License. + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue')) : + typeof define === 'function' && define.amd ? define(['vue'], factory) : + (global = global || self, global.Quasar = factory(global.Vue)); +}(this, (function (Vue) { 'use strict'; + + if (Vue === void 0) { + console.error('[ Quasar ] Vue is required to run. Please add a script tag for it before loading Quasar.') + return + } + Vue = Vue && Vue.hasOwnProperty('default') ? Vue['default'] : Vue; + + var version = "1.9.7"; + + /* eslint-disable no-useless-escape */ + + var isSSR = typeof window === 'undefined'; + var fromSSR = false; + var onSSR = isSSR; + + var iosEmulated = false; + var iosCorrection; + + function getMatch (userAgent, platformMatch) { + var match = /(edge|edga|edgios)\/([\w.]+)/.exec(userAgent) || + /(opr)[\/]([\w.]+)/.exec(userAgent) || + /(vivaldi)[\/]([\w.]+)/.exec(userAgent) || + /(chrome|crios)[\/]([\w.]+)/.exec(userAgent) || + /(iemobile)[\/]([\w.]+)/.exec(userAgent) || + /(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(userAgent) || + /(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(userAgent) || + /(firefox|fxios)[\/]([\w.]+)/.exec(userAgent) || + /(webkit)[\/]([\w.]+)/.exec(userAgent) || + /(opera)(?:.*version|)[\/]([\w.]+)/.exec(userAgent) || + /(msie) ([\w.]+)/.exec(userAgent) || + (userAgent.indexOf('trident') >= 0 && /(rv)(?::| )([\w.]+)/.exec(userAgent)) || + (userAgent.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(userAgent)) || + []; + + return { + browser: match[5] || match[3] || match[1] || '', + version: match[2] || match[4] || '0', + versionNumber: match[4] || match[2] || '0', + platform: platformMatch[0] || '' + } + } + + function getPlatformMatch (userAgent) { + return /(ipad)/.exec(userAgent) || + /(ipod)/.exec(userAgent) || + /(windows phone)/.exec(userAgent) || + /(iphone)/.exec(userAgent) || + /(kindle)/.exec(userAgent) || + /(silk)/.exec(userAgent) || + /(android)/.exec(userAgent) || + /(win)/.exec(userAgent) || + /(mac)/.exec(userAgent) || + /(linux)/.exec(userAgent) || + /(cros)/.exec(userAgent) || + /(playbook)/.exec(userAgent) || + /(bb)/.exec(userAgent) || + /(blackberry)/.exec(userAgent) || + [] + } + + var hasTouch = isSSR === false + ? 'ontouchstart' in window || window.navigator.maxTouchPoints > 0 + : false; + + function applyIosCorrection (is) { + var obj; + + iosCorrection = { is: Object.assign({}, is) }; + + delete is.mac; + delete is.desktop; + + var platform = Math.min(window.innerHeight, window.innerWidth) > 414 + ? 'ipad' + : 'iphone'; + + Object.assign(is, ( obj = { + mobile: true, + ios: true, + platform: platform + }, obj[ platform ] = true, obj )); + } + + function getPlatform (userAgent) { + var + platformMatch = getPlatformMatch(userAgent), + matched = getMatch(userAgent, platformMatch), + browser = {}; + + if (matched.browser) { + browser[matched.browser] = true; + browser.version = matched.version; + browser.versionNumber = parseInt(matched.versionNumber, 10); + } + + if (matched.platform) { + browser[matched.platform] = true; + } + + var knownMobiles = browser.android || + browser.ios || + browser.bb || + browser.blackberry || + browser.ipad || + browser.iphone || + browser.ipod || + browser.kindle || + browser.playbook || + browser.silk || + browser['windows phone']; + + // These are all considered mobile platforms, meaning they run a mobile browser + if (knownMobiles === true || userAgent.indexOf('mobile') > -1) { + browser.mobile = true; + + if (browser.edga || browser.edgios) { + browser.edge = true; + matched.browser = 'edge'; + } + else if (browser.crios) { + browser.chrome = true; + matched.browser = 'chrome'; + } + else if (browser.fxios) { + browser.firefox = true; + matched.browser = 'firefox'; + } + } + // If it's not mobile we should consider it's desktop platform, meaning it runs a desktop browser + // It's a workaround for anonymized user agents + // (browser.cros || browser.mac || browser.linux || browser.win) + else { + browser.desktop = true; + } + + // Set iOS if on iPod, iPad or iPhone + if (browser.ipod || browser.ipad || browser.iphone) { + browser.ios = true; + } + + if (browser['windows phone']) { + browser.winphone = true; + delete browser['windows phone']; + } + + // Chrome, Opera 15+, Vivaldi and Safari are webkit based browsers + if ( + browser.chrome || + browser.opr || + browser.safari || + browser.vivaldi || + // we expect unknown, non iOS mobile browsers to be webkit based + ( + browser.mobile === true && + browser.ios !== true && + knownMobiles !== true + ) + ) { + browser.webkit = true; + } + + // IE11 has a new token so we will assign it msie to avoid breaking changes + if (browser.rv || browser.iemobile) { + matched.browser = 'ie'; + browser.ie = true; + } + + // Blackberry browsers are marked as Safari on BlackBerry + if (browser.safari && browser.blackberry || browser.bb) { + matched.browser = 'blackberry'; + browser.blackberry = true; + } + + // Playbook browsers are marked as Safari on Playbook + if (browser.safari && browser.playbook) { + matched.browser = 'playbook'; + browser.playbook = true; + } + + // Opera 15+ are identified as opr + if (browser.opr) { + matched.browser = 'opera'; + browser.opera = true; + } + + // Stock Android browsers are marked as Safari on Android. + if (browser.safari && browser.android) { + matched.browser = 'android'; + browser.android = true; + } + + // Kindle browsers are marked as Safari on Kindle + if (browser.safari && browser.kindle) { + matched.browser = 'kindle'; + browser.kindle = true; + } + + // Kindle Silk browsers are marked as Safari on Kindle + if (browser.safari && browser.silk) { + matched.browser = 'silk'; + browser.silk = true; + } + + if (browser.vivaldi) { + matched.browser = 'vivaldi'; + browser.vivaldi = true; + } + + // Assign the name and platform variable + browser.name = matched.browser; + browser.platform = matched.platform; + + if (isSSR === false) { + if (userAgent.indexOf('electron') > -1) { + browser.electron = true; + } + else if (document.location.href.indexOf('-extension://') > -1) { + browser.bex = true; + } + else if (window.Capacitor !== void 0) { + browser.capacitor = true; + browser.nativeMobile = true; + browser.nativeMobileWrapper = 'capacitor'; + } + else if (window._cordovaNative !== void 0 || window.cordova !== void 0) { + browser.cordova = true; + browser.nativeMobile = true; + browser.nativeMobileWrapper = 'cordova'; + } + else if ( + hasTouch === true && + browser.desktop === true && + browser.mac === true && + browser.safari === true + ) { + /* + * Correction needed for iOS since the default + * setting on iPad is to request desktop view; if we have + * touch support and the user agent says it's a + * desktop, we infer that it's an iPhone/iPad with desktop view + * so we must fix the false positives + */ + applyIosCorrection(browser); + } + + fromSSR = browser.nativeMobile === void 0 && + browser.electron === void 0 && + !!document.querySelector('[data-server-rendered]'); + + if (fromSSR === true) { + onSSR = true; + } + } + + return browser + } + + var userAgent = isSSR === false + ? (navigator.userAgent || navigator.vendor || window.opera).toLowerCase() + : ''; + + var ssrClient = { + has: { + touch: false, + webStorage: false + }, + within: { iframe: false } + }; + + // We export "client" for hydration error-free parts, + // like touch directives who do not (and must NOT) wait + // for the client takeover; + // Do NOT import this directly in your app, unless you really know + // what you are doing. + var client = isSSR === false + ? { + userAgent: userAgent, + is: getPlatform(userAgent), + has: { + touch: hasTouch, + webStorage: (function () { + try { + if (window.localStorage) { + return true + } + } + catch (e) {} + return false + })() + }, + within: { + iframe: window.self !== window.top + } + } + : ssrClient; + + var Platform = { + install: function install ($q, queues) { + var this$1 = this; + + if (isSSR === true) { + // we're on server-side, so we push + // to the server queue instead of + // applying directly + queues.server.push(function (q, ctx) { + q.platform = this$1.parseSSR(ctx.ssr); + }); + } + else if (fromSSR === true) { + // must match with server-side before + // client taking over in order to prevent + // hydration errors + Object.assign(this, client, iosCorrection, ssrClient); + + // takeover should increase accuracy for + // the rest of the props; we also avoid + // hydration errors + queues.takeover.push(function (q) { + onSSR = fromSSR = false; + Object.assign(q.platform, client); + iosCorrection = void 0; + }); + + // we need to make platform reactive + // for the takeover phase + Vue.util.defineReactive($q, 'platform', this); + } + else { + // we don't have any business with SSR, so + // directly applying... + Object.assign(this, client); + $q.platform = this; + } + } + }; + + if (isSSR === true) { + Platform.parseSSR = function (/* ssrContext */ ssr) { + var userAgent = (ssr.req.headers['user-agent'] || ssr.req.headers['User-Agent'] || '').toLowerCase(); + return Object.assign({}, client, + {userAgent: userAgent, + is: getPlatform(userAgent)}) + }; + } + else { + iosEmulated = client.is.ios === true && + window.navigator.vendor.toLowerCase().indexOf('apple') === -1; + } + + var listenOpts = { + hasPassive: false, + passiveCapture: true, + notPassiveCapture: true + }; + + try { + var opts = Object.defineProperty({}, 'passive', { + get: function get () { + Object.assign(listenOpts, { + hasPassive: true, + passive: { passive: true }, + notPassive: { passive: false }, + passiveCapture: { passive: true, capture: true }, + notPassiveCapture: { passive: false, capture: true } + }); + } + }); + window.addEventListener('qtest', null, opts); + window.removeEventListener('qtest', null, opts); + } + catch (e) {} + + function noop () {} + + function leftClick (e) { + return e.button === 0 + } + + function middleClick (e) { + return e.button === 1 + } + + function rightClick (e) { + return e.button === 2 + } + + function position (e) { + if (e.touches && e.touches[0]) { + e = e.touches[0]; + } + else if (e.changedTouches && e.changedTouches[0]) { + e = e.changedTouches[0]; + } + else if (e.targetTouches && e.targetTouches[0]) { + e = e.targetTouches[0]; + } + + return { + top: e.clientY, + left: e.clientX + } + } + + function getEventPath (e) { + if (e.path) { + return e.path + } + if (e.composedPath) { + return e.composedPath() + } + + var path = []; + var el = e.target; + + while (el) { + path.push(el); + + if (el.tagName === 'HTML') { + path.push(document); + path.push(window); + return path + } + + el = el.parentElement; + } + } + + // Reasonable defaults + var + LINE_HEIGHT = 40, + PAGE_HEIGHT = 800; + + function getMouseWheelDistance (e) { + var assign; + + var x = e.deltaX, y = e.deltaY; + + if ((x || y) && e.deltaMode) { + var multiplier = e.deltaMode === 1 ? LINE_HEIGHT : PAGE_HEIGHT; + x *= multiplier; + y *= multiplier; + } + + if (e.shiftKey && !x) { + (assign = [x, y], y = assign[0], x = assign[1]); + } + + return { x: x, y: y } + } + + function stop (e) { + e.stopPropagation(); + } + + function prevent (e) { + e.cancelable !== false && e.preventDefault(); + } + + function stopAndPrevent (e) { + e.cancelable !== false && e.preventDefault(); + e.stopPropagation(); + } + + function preventDraggable (el, status) { + if (el === void 0 || (status === true && el.__dragPrevented === true)) { + return + } + + var fn = status === true + ? function (el) { + el.__dragPrevented = true; + el.addEventListener('dragstart', prevent, listenOpts.notPassiveCapture); + } + : function (el) { + delete el.__dragPrevented; + el.removeEventListener('dragstart', prevent, listenOpts.notPassiveCapture); + }; + + el.querySelectorAll('a, img').forEach(fn); + } + + function create (name, ref) { + if ( ref === void 0 ) ref = {}; + var bubbles = ref.bubbles; if ( bubbles === void 0 ) bubbles = false; + var cancelable = ref.cancelable; if ( cancelable === void 0 ) cancelable = false; + + try { + return new Event(name, { bubbles: bubbles, cancelable: cancelable }) + } + catch (e) { + // IE doesn't support `new Event()`, so... + var evt = document.createEvent('Event'); + evt.initEvent(name, bubbles, cancelable); + return evt + } + } + + /* + * also update /types/utils/event.d.ts + */ + + var event = { + listenOpts: listenOpts, + leftClick: leftClick, + middleClick: middleClick, + rightClick: rightClick, + position: position, + getEventPath: getEventPath, + getMouseWheelDistance: getMouseWheelDistance, + stop: stop, + prevent: prevent, + stopAndPrevent: stopAndPrevent, + preventDraggable: preventDraggable, + create: create + }; + + function debounce (fn, wait, immediate) { + if ( wait === void 0 ) wait = 250; + + var timeout; + + function debounced (/* ...args */) { + var this$1 = this; + + var args = arguments; + + var later = function () { + timeout = void 0; + if (immediate !== true) { + fn.apply(this$1, args); + } + }; + + clearTimeout(timeout); + if (immediate === true && timeout === void 0) { + fn.apply(this, args); + } + timeout = setTimeout(later, wait); + } + + debounced.cancel = function () { + clearTimeout(timeout); + }; + + return debounced + } + + var SIZE_LIST = ['sm', 'md', 'lg', 'xl']; + var passive = listenOpts.passive; + + var Screen = { + width: 0, + height: 0, + + name: 'xs', + + sizes: { + sm: 600, + md: 1024, + lg: 1440, + xl: 1920 + }, + + lt: { + sm: true, + md: true, + lg: true, + xl: true + }, + gt: { + xs: false, + sm: false, + md: false, + lg: false + }, + xs: true, + sm: false, + md: false, + lg: false, + xl: false, + + setSizes: noop, + setDebounce: noop, + + install: function install ($q, queues, cfg) { + var this$1 = this; + + if (isSSR === true) { + $q.screen = this; + return + } + + var classes = cfg.screen !== void 0 && cfg.screen.bodyClasses === true; + + var update = function (force) { + var + w = window.innerWidth, + h = window.innerHeight; + + if (h !== this$1.height) { + this$1.height = h; + } + + if (w !== this$1.width) { + this$1.width = w; + } + else if (force !== true) { + return + } + + var s = this$1.sizes; + + this$1.gt.xs = w >= s.sm; + this$1.gt.sm = w >= s.md; + this$1.gt.md = w >= s.lg; + this$1.gt.lg = w >= s.xl; + this$1.lt.sm = w < s.sm; + this$1.lt.md = w < s.md; + this$1.lt.lg = w < s.lg; + this$1.lt.xl = w < s.xl; + this$1.xs = this$1.lt.sm; + this$1.sm = this$1.gt.xs === true && this$1.lt.md === true; + this$1.md = this$1.gt.sm === true && this$1.lt.lg === true; + this$1.lg = this$1.gt.md === true && this$1.lt.xl === true; + this$1.xl = this$1.gt.lg; + + s = (this$1.xs === true && 'xs') || + (this$1.sm === true && 'sm') || + (this$1.md === true && 'md') || + (this$1.lg === true && 'lg') || + 'xl'; + + if (s !== this$1.name) { + if (classes === true) { + document.body.classList.remove(("screen--" + (this$1.name))); + document.body.classList.add(("screen--" + s)); + } + this$1.name = s; + } + }; + + var updateEvt, updateSizes = {}, updateDebounce = 16; + + this.setSizes = function (sizes) { + SIZE_LIST.forEach(function (name) { + if (sizes[name] !== void 0) { + updateSizes[name] = sizes[name]; + } + }); + }; + this.setDebounce = function (deb) { + updateDebounce = deb; + }; + + var start = function () { + var + style = getComputedStyle(document.body), + target = window.visualViewport !== void 0 + ? window.visualViewport + : window; + + // if css props available + if (style.getPropertyValue('--q-size-sm')) { + SIZE_LIST.forEach(function (name) { + this$1.sizes[name] = parseInt(style.getPropertyValue(("--q-size-" + name)), 10); + }); + } + + this$1.setSizes = function (sizes) { + SIZE_LIST.forEach(function (name) { + if (sizes[name]) { + this$1.sizes[name] = sizes[name]; + } + }); + update(true); + }; + + this$1.setDebounce = function (delay) { + updateEvt !== void 0 && target.removeEventListener('resize', updateEvt, passive); + updateEvt = delay > 0 + ? debounce(update, delay) + : update; + target.addEventListener('resize', updateEvt, passive); + }; + + this$1.setDebounce(updateDebounce); + + if (Object.keys(updateSizes).length > 0) { + this$1.setSizes(updateSizes); + updateSizes = void 0; // free up memory + } + else { + update(); + } + }; + + if (fromSSR === true) { + queues.takeover.push(start); + } + else { + start(); + } + + Vue.util.defineReactive($q, 'screen', this); + } + }; + + var Dark = { + isActive: false, + mode: false, + + install: function install ($q, queues, ref) { + var this$1 = this; + var dark = ref.dark; + + this.isActive = dark === true; + + if (isSSR === true) { + queues.server.push(function (q, ctx) { + q.dark = { + isActive: false, + mode: false, + set: function (val) { + ctx.ssr.Q_BODY_CLASSES = ctx.ssr.Q_BODY_CLASSES + .replace(' body--light', '') + .replace(' body--dark', '') + " body--" + (val === true ? 'dark' : 'light'); + + q.dark.isActive = val === true; + q.dark.mode = val; + }, + toggle: function () { + q.dark.set(q.dark.isActive === false); + } + }; + + q.dark.set(dark); + }); + + this.set = noop; + return + } + + var initialVal = dark !== void 0 + ? dark + : false; + + if (fromSSR === true) { + var ssrSet = function (val) { + this$1.__fromSSR = val; + }; + + var originalSet = this.set; + + this.set = ssrSet; + ssrSet(initialVal); + + queues.takeover.push(function () { + this$1.set = originalSet; + this$1.set(this$1.__fromSSR); + }); + } + else { + this.set(initialVal); + } + + Vue.util.defineReactive(this, 'isActive', this.isActive); + Vue.util.defineReactive($q, 'dark', this); + }, + + set: function set (val) { + var this$1 = this; + + this.mode = val; + + if (val === 'auto') { + if (this.__media === void 0) { + this.__media = window.matchMedia('(prefers-color-scheme: dark)'); + this.__updateMedia = function () { this$1.set('auto'); }; + this.__media.addListener(this.__updateMedia); + } + + val = this.__media.matches; + } + else if (this.__media !== void 0) { + this.__media.removeListener(this.__updateMedia); + this.__media = void 0; + } + + this.isActive = val === true; + + document.body.classList.remove(("body--" + (val === true ? 'light' : 'dark'))); + document.body.classList.add(("body--" + (val === true ? 'dark' : 'light'))); + }, + + toggle: function toggle () { + Dark.set(Dark.isActive === false); + }, + + __media: void 0 + }; + + var getTrue = function () { return true; }; + + var History = { + __history: [], + add: noop, + remove: noop, + + install: function install (cfg) { + var this$1 = this; + + if (isSSR === true) { + return + } + + var ref = client.is; + var cordova = ref.cordova; + var capacitor = ref.capacitor; + + if (cordova !== true && capacitor !== true) { + return + } + + this.add = function (entry) { + if (entry.condition === void 0) { + entry.condition = getTrue; + } + this$1.__history.push(entry); + }; + this.remove = function (entry) { + var index = this$1.__history.indexOf(entry); + if (index >= 0) { + this$1.__history.splice(index, 1); + } + }; + + var fn = function () { + if (this$1.__history.length) { + var entry = this$1.__history[this$1.__history.length - 1]; + + if (entry.condition() === true) { + this$1.__history.pop(); + entry.handler(); + } + } + else if (exit && window.location.hash === '#/') { + navigator.app.exitApp(); + } + else { + window.history.back(); + } + }; + + var prop = cordova === true ? 'cordova' : 'capacitor'; + var exit = cfg[prop] === void 0 || cfg[prop].backButtonExit !== false; + + if (cordova === true) { + document.addEventListener('deviceready', function () { + document.addEventListener('backbutton', fn, false); + }); + } + else { + window.Capacitor.Plugins.App.addListener('backButton', fn); + } + } + }; + + var langEn = { + isoName: 'en-us', + nativeName: 'English (US)', + label: { + clear: 'Clear', + ok: 'OK', + cancel: 'Cancel', + close: 'Close', + set: 'Set', + select: 'Select', + reset: 'Reset', + remove: 'Remove', + update: 'Update', + create: 'Create', + search: 'Search', + filter: 'Filter', + refresh: 'Refresh' + }, + date: { + days: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + daysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + firstDayOfWeek: 0, // 0-6, 0 - Sunday, 1 Monday, ... + format24h: false + }, + table: { + noData: 'No data available', + noResults: 'No matching records found', + loading: 'Loading...', + selectedRecords: function (rows) { + return rows === 1 + ? '1 record selected.' + : (rows === 0 ? 'No' : rows) + ' records selected.' + }, + recordsPerPage: 'Records per page:', + allRows: 'All', + pagination: function (start, end, total) { + return start + '-' + end + ' of ' + total + }, + columns: 'Columns' + }, + editor: { + url: 'URL', + bold: 'Bold', + italic: 'Italic', + strikethrough: 'Strikethrough', + underline: 'Underline', + unorderedList: 'Unordered List', + orderedList: 'Ordered List', + subscript: 'Subscript', + superscript: 'Superscript', + hyperlink: 'Hyperlink', + toggleFullscreen: 'Toggle Fullscreen', + quote: 'Quote', + left: 'Left align', + center: 'Center align', + right: 'Right align', + justify: 'Justify align', + print: 'Print', + outdent: 'Decrease indentation', + indent: 'Increase indentation', + removeFormat: 'Remove formatting', + formatting: 'Formatting', + fontSize: 'Font Size', + align: 'Align', + hr: 'Insert Horizontal Rule', + undo: 'Undo', + redo: 'Redo', + heading1: 'Heading 1', + heading2: 'Heading 2', + heading3: 'Heading 3', + heading4: 'Heading 4', + heading5: 'Heading 5', + heading6: 'Heading 6', + paragraph: 'Paragraph', + code: 'Code', + size1: 'Very small', + size2: 'A bit small', + size3: 'Normal', + size4: 'Medium-large', + size5: 'Big', + size6: 'Very big', + size7: 'Maximum', + defaultFont: 'Default Font', + viewSource: 'View Source' + }, + tree: { + noNodes: 'No nodes available', + noResults: 'No matching nodes found' + } + }; + + var lang = { + install: function install ($q, queues, lang) { + var this$1 = this; + + if (isSSR === true) { + queues.server.push(function (q, ctx) { + var + opt = { + lang: q.lang.isoName, + dir: q.lang.rtl === true ? 'rtl' : 'ltr' + }, + fn = ctx.ssr.setHtmlAttrs; + + if (typeof fn === 'function') { + fn(opt); + } + else { + ctx.ssr.Q_HTML_ATTRS = Object.keys(opt) + .map(function (key) { return (key + "=" + (opt[key])); }) + .join(' '); + } + }); + } + + this.set = function (lang) { + if ( lang === void 0 ) lang = langEn; + + lang.set = this$1.set; + lang.getLocale = this$1.getLocale; + lang.rtl = lang.rtl === true || false; + + if (isSSR === false) { + var el = document.documentElement; + el.setAttribute('dir', lang.rtl ? 'rtl' : 'ltr'); + el.setAttribute('lang', lang.isoName); + } + + if (isSSR === true || $q.lang !== void 0) { + $q.lang = lang; + } + else { + Vue.util.defineReactive($q, 'lang', lang); + } + + this$1.isoName = lang.isoName; + this$1.nativeName = lang.nativeName; + this$1.props = lang; + }; + + this.set(lang); + }, + + getLocale: function getLocale () { + if (isSSR === true) { return } + + var val = + navigator.language || + navigator.languages[0] || + navigator.browserLanguage || + navigator.userLanguage || + navigator.systemLanguage; + + if (val) { + return val.toLowerCase() + } + } + }; + + function rgbToHex (ref) { + var r = ref.r; + var g = ref.g; + var b = ref.b; + var a = ref.a; + + var alpha = a !== void 0; + + r = Math.round(r); + g = Math.round(g); + b = Math.round(b); + + if ( + r > 255 || + g > 255 || + b > 255 || + (alpha && a > 100) + ) { + throw new TypeError('Expected 3 numbers below 256 (and optionally one below 100)') + } + + a = alpha + ? (Math.round(255 * a / 100) | 1 << 8).toString(16).slice(1) + : ''; + + return '#' + ((b | g << 8 | r << 16) | 1 << 24).toString(16).slice(1) + a + } + + function rgbToString (ref) { + var r = ref.r; + var g = ref.g; + var b = ref.b; + var a = ref.a; + + return ("rgb" + (a !== void 0 ? 'a' : '') + "(" + r + "," + g + "," + b + (a !== void 0 ? ',' + (a / 100) : '') + ")") + } + + function stringToRgb (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string') + } + + str = str.replace(/ /g, ''); + + if (str.startsWith('#')) { + return hexToRgb(str) + } + + var model = str.substring(str.indexOf('(') + 1, str.length - 1).split(','); + + return { + r: parseInt(model[0], 10), + g: parseInt(model[1], 10), + b: parseInt(model[2], 10), + a: model[3] !== void 0 ? parseFloat(model[3]) * 100 : void 0 + } + } + + function hexToRgb (hex) { + if (typeof hex !== 'string') { + throw new TypeError('Expected a string') + } + + hex = hex.replace(/^#/, ''); + + if (hex.length === 3) { + hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; + } + else if (hex.length === 4) { + hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2] + hex[3] + hex[3]; + } + + var num = parseInt(hex, 16); + + return hex.length > 6 + ? { r: num >> 24 & 255, g: num >> 16 & 255, b: num >> 8 & 255, a: Math.round((num & 255) / 2.55) } + : { r: num >> 16, g: num >> 8 & 255, b: num & 255 } + } + + function hsvToRgb (ref) { + var h = ref.h; + var s = ref.s; + var v = ref.v; + var a = ref.a; + + var r, g, b, i, f, p, q, t; + s = s / 100; + v = v / 100; + + h = h / 360; + i = Math.floor(h * 6); + f = h * 6 - i; + p = v * (1 - s); + q = v * (1 - f * s); + t = v * (1 - (1 - f) * s); + + switch (i % 6) { + case 0: + r = v; + g = t; + b = p; + break + case 1: + r = q; + g = v; + b = p; + break + case 2: + r = p; + g = v; + b = t; + break + case 3: + r = p; + g = q; + b = v; + break + case 4: + r = t; + g = p; + b = v; + break + case 5: + r = v; + g = p; + b = q; + break + } + + return { + r: Math.round(r * 255), + g: Math.round(g * 255), + b: Math.round(b * 255), + a: a + } + } + + function rgbToHsv (ref) { + var r = ref.r; + var g = ref.g; + var b = ref.b; + var a = ref.a; + + var + max = Math.max(r, g, b), min = Math.min(r, g, b), + d = max - min, + h, + s = (max === 0 ? 0 : d / max), + v = max / 255; + + switch (max) { + case min: + h = 0; + break + case r: + h = (g - b) + d * (g < b ? 6 : 0); + h /= 6 * d; + break + case g: + h = (b - r) + d * 2; + h /= 6 * d; + break + case b: + h = (r - g) + d * 4; + h /= 6 * d; + break + } + + return { + h: Math.round(h * 360), + s: Math.round(s * 100), + v: Math.round(v * 100), + a: a + } + } + + var reRGBA = /^rgb(a)?\((\d{1,3}),(\d{1,3}),(\d{1,3}),?([01]?\.?\d*?)?\)$/; + + function textToRgb (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string') + } + + var color = str.replace(/ /g, ''); + + var m = reRGBA.exec(color); + + if (m === null) { + return hexToRgb(color) + } + + var rgb = { + r: Math.min(255, parseInt(m[2], 10)), + g: Math.min(255, parseInt(m[3], 10)), + b: Math.min(255, parseInt(m[4], 10)) + }; + + if (m[1]) { + var alpha = parseFloat(m[5]); + rgb.a = Math.min(1, isNaN(alpha) === true ? 1 : alpha) * 100; + } + + return rgb + } + + /* works as darken if percent < 0 */ + function lighten (color, percent) { + if (typeof color !== 'string') { + throw new TypeError('Expected a string as color') + } + if (typeof percent !== 'number') { + throw new TypeError('Expected a numeric percent') + } + + var rgb = textToRgb(color), + t = percent < 0 ? 0 : 255, + p = Math.abs(percent) / 100, + R = rgb.r, + G = rgb.g, + B = rgb.b; + + return '#' + ( + 0x1000000 + (Math.round((t - R) * p) + R) * 0x10000 + + (Math.round((t - G) * p) + G) * 0x100 + + (Math.round((t - B) * p) + B) + ).toString(16).slice(1) + } + + function luminosity (color) { + if (typeof color !== 'string' && (!color || color.r === void 0)) { + throw new TypeError('Expected a string or a {r, g, b} object as color') + } + + var + rgb = typeof color === 'string' ? textToRgb(color) : color, + r = rgb.r / 255, + g = rgb.g / 255, + b = rgb.b / 255, + R = r <= 0.03928 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4), + G = g <= 0.03928 ? g / 12.92 : Math.pow((g + 0.055) / 1.055, 2.4), + B = b <= 0.03928 ? b / 12.92 : Math.pow((b + 0.055) / 1.055, 2.4); + return 0.2126 * R + 0.7152 * G + 0.0722 * B + } + + function brightness (color) { + if (typeof color !== 'string' && (!color || color.r === void 0)) { + throw new TypeError('Expected a string or a {r, g, b} object as color') + } + + var rgb = typeof color === 'string' + ? textToRgb(color) + : color; + + return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000 + } + + function blend (fgColor, bgColor) { + if (typeof fgColor !== 'string' && (!fgColor || fgColor.r === void 0)) { + throw new TypeError('Expected a string or a {r, g, b[, a]} object as fgColor') + } + + if (typeof bgColor !== 'string' && (!bgColor || bgColor.r === void 0)) { + throw new TypeError('Expected a string or a {r, g, b[, a]} object as bgColor') + } + + var + rgb1 = typeof fgColor === 'string' ? textToRgb(fgColor) : fgColor, + r1 = rgb1.r / 255, + g1 = rgb1.g / 255, + b1 = rgb1.b / 255, + a1 = rgb1.a !== void 0 ? rgb1.a / 100 : 1, + rgb2 = typeof bgColor === 'string' ? textToRgb(bgColor) : bgColor, + r2 = rgb2.r / 255, + g2 = rgb2.g / 255, + b2 = rgb2.b / 255, + a2 = rgb2.a !== void 0 ? rgb2.a / 100 : 1, + a = a1 + a2 * (1 - a1), + r = Math.round(((r1 * a1 + r2 * a2 * (1 - a1)) / a) * 255), + g = Math.round(((g1 * a1 + g2 * a2 * (1 - a1)) / a) * 255), + b = Math.round(((b1 * a1 + b2 * a2 * (1 - a1)) / a) * 255); + + var ret = { r: r, g: g, b: b, a: Math.round(a * 100) }; + return typeof fgColor === 'string' + ? rgbToHex(ret) + : ret + } + + function changeAlpha (color, offset) { + if (typeof color !== 'string') { + throw new TypeError('Expected a string as color') + } + + if (offset === void 0 || offset < -1 || offset > 1) { + throw new TypeError('Expected offset to be between -1 and 1') + } + + var ref = textToRgb(color); + var r = ref.r; + var g = ref.g; + var b = ref.b; + var a = ref.a; + var alpha = a !== void 0 ? a / 100 : 0; + + return rgbToHex({ + r: r, g: g, b: b, a: Math.round(Math.min(1, Math.max(0, alpha + offset)) * 100) + }) + } + + function setBrand (color, value, element) { + if ( element === void 0 ) element = document.body; + + if (typeof color !== 'string') { + throw new TypeError('Expected a string as color') + } + if (typeof value !== 'string') { + throw new TypeError('Expected a string as value') + } + if (!(element instanceof Element)) { + throw new TypeError('Expected a DOM element') + } + + element.style.setProperty(("--q-color-" + color), value); + } + + function getBrand (color, element) { + if ( element === void 0 ) element = document.body; + + if (typeof color !== 'string') { + throw new TypeError('Expected a string as color') + } + if (!(element instanceof Element)) { + throw new TypeError('Expected a DOM element') + } + + return getComputedStyle(element).getPropertyValue(("--q-color-" + color)).trim() || null + } + + var colors = { + rgbToHex: rgbToHex, + hexToRgb: hexToRgb, + hsvToRgb: hsvToRgb, + rgbToHsv: rgbToHsv, + textToRgb: textToRgb, + lighten: lighten, + luminosity: luminosity, + brightness: brightness, + blend: blend, + changeAlpha: changeAlpha, + setBrand: setBrand, + getBrand: getBrand + }; + + var lastKeyCompositionStatus = false; + + function onKeyDownComposition (evt) { + lastKeyCompositionStatus = evt.isComposing === true; + } + + function shouldIgnoreKey (evt) { + return lastKeyCompositionStatus === true || + evt !== Object(evt) || + evt.isComposing === true || + evt.qKeyEvent === true + } + + function isKeyCode (evt, keyCodes) { + return ( + lastKeyCompositionStatus === true || + evt !== Object(evt) || + evt.isComposing === true || + evt.qKeyEvent === true + ) + ? false + : [].concat(keyCodes).includes(evt.keyCode) + } + + function getMobilePlatform (is) { + if (is.ios === true) { return 'ios' } + if (is.android === true) { return 'android' } + } + + function getBodyClasses (ref, cfg) { + var is = ref.is; + var has = ref.has; + var within = ref.within; + + var cls = [ + is.desktop === true ? 'desktop' : 'mobile', + ((has.touch === false ? 'no-' : '') + "touch") + ]; + + if (is.mobile === true) { + var mobile = getMobilePlatform(is); + mobile !== void 0 && cls.push('platform-' + mobile); + } + + if (is.nativeMobile === true) { + var type = is.nativeMobileWrapper; + + cls.push(type); + cls.push('native-mobile'); + + if ( + is.ios === true && + (cfg[type] === void 0 || cfg[type].iosStatusBarPadding !== false) + ) { + cls.push('q-ios-padding'); + } + } + else if (is.electron === true) { + cls.push('electron'); + } + else if (is.bex === true) { + cls.push('bex'); + } + + within.iframe === true && cls.push('within-iframe'); + + return cls + } + + // SSR takeover corrections + function clientUpdate () { + var classes = document.body.className; + var newCls = classes; + + if (iosCorrection !== void 0) { + newCls = newCls.replace('desktop', 'platform-ios mobile'); + } + + if (client.has.touch === true) { + newCls = newCls.replace('no-touch', 'touch'); + } + + if (client.within.iframe === true) { + newCls += ' within-iframe'; + } + + if (classes !== newCls) { + document.body.className = newCls; + } + } + + function setColors (brand) { + for (var color in brand) { + setBrand(color, brand[color]); + } + } + + var Body = { + install: function install (queues, cfg) { + if (isSSR === true) { + queues.server.push(function (q, ctx) { + var + cls = getBodyClasses(q.platform, cfg), + fn = ctx.ssr.setBodyClasses; + + if (cfg.screen !== void 0 && cfg.screen.bodyClass === true) { + cls.push('screen--xs'); + } + + if (typeof fn === 'function') { + fn(cls); + } + else { + ctx.ssr.Q_BODY_CLASSES = cls.join(' '); + } + }); + + return + } + + if (fromSSR === true) { + clientUpdate(); + } + else { + var cls = getBodyClasses(client, cfg); + + if (client.is.ie === true && client.is.versionNumber === 11) { + cls.forEach(function (c) { return document.body.classList.add(c); }); + } + else { + document.body.classList.add.apply(document.body.classList, cls); + } + } + + cfg.brand !== void 0 && setColors(cfg.brand); + + if (client.is.ios === true) { + // needed for iOS button active state + document.body.addEventListener('touchstart', noop); + } + + window.addEventListener('keydown', onKeyDownComposition, true); + } + }; + + var materialIcons = { + name: 'material-icons', + type: { + positive: 'check_circle', + negative: 'warning', + info: 'info', + warning: 'priority_high' + }, + arrow: { + up: 'arrow_upward', + right: 'arrow_forward', + down: 'arrow_downward', + left: 'arrow_back', + dropdown: 'arrow_drop_down' + }, + chevron: { + left: 'chevron_left', + right: 'chevron_right' + }, + colorPicker: { + spectrum: 'gradient', + tune: 'tune', + palette: 'style' + }, + pullToRefresh: { + icon: 'refresh' + }, + carousel: { + left: 'chevron_left', + right: 'chevron_right', + up: 'keyboard_arrow_up', + down: 'keyboard_arrow_down', + navigationIcon: 'lens' + }, + chip: { + remove: 'cancel', + selected: 'check' + }, + datetime: { + arrowLeft: 'chevron_left', + arrowRight: 'chevron_right', + now: 'access_time', + today: 'today' + }, + editor: { + bold: 'format_bold', + italic: 'format_italic', + strikethrough: 'strikethrough_s', + underline: 'format_underlined', + unorderedList: 'format_list_bulleted', + orderedList: 'format_list_numbered', + subscript: 'vertical_align_bottom', + superscript: 'vertical_align_top', + hyperlink: 'link', + toggleFullscreen: 'fullscreen', + quote: 'format_quote', + left: 'format_align_left', + center: 'format_align_center', + right: 'format_align_right', + justify: 'format_align_justify', + print: 'print', + outdent: 'format_indent_decrease', + indent: 'format_indent_increase', + removeFormat: 'format_clear', + formatting: 'text_format', + fontSize: 'format_size', + align: 'format_align_left', + hr: 'remove', + undo: 'undo', + redo: 'redo', + heading: 'format_size', + code: 'code', + size: 'format_size', + font: 'font_download', + viewSource: 'code' + }, + expansionItem: { + icon: 'keyboard_arrow_down', + denseIcon: 'arrow_drop_down' + }, + fab: { + icon: 'add', + activeIcon: 'close' + }, + field: { + clear: 'cancel', + error: 'error' + }, + pagination: { + first: 'first_page', + prev: 'keyboard_arrow_left', + next: 'keyboard_arrow_right', + last: 'last_page' + }, + rating: { + icon: 'grade' + }, + stepper: { + done: 'check', + active: 'edit', + error: 'warning' + }, + tabs: { + left: 'chevron_left', + right: 'chevron_right', + up: 'keyboard_arrow_up', + down: 'keyboard_arrow_down' + }, + table: { + arrowUp: 'arrow_upward', + warning: 'warning', + prevPage: 'chevron_left', + nextPage: 'chevron_right' + }, + tree: { + icon: 'play_arrow' + }, + uploader: { + done: 'done', + clear: 'clear', + add: 'add_box', + upload: 'cloud_upload', + removeQueue: 'clear_all', + removeUploaded: 'done_all' + } + }; + + var iconSet = { + install: function install ($q, iconSet) { + var this$1 = this; + + this.set = function (iconDef) { + if ( iconDef === void 0 ) iconDef = materialIcons; + + iconDef.set = this$1.set; + + if (isSSR === true || $q.iconSet !== void 0) { + $q.iconSet = iconDef; + } + else { + Vue.util.defineReactive($q, 'iconSet', iconDef); + } + + this$1.name = iconDef.name; + this$1.def = iconDef; + }; + + this.set(iconSet); + + if (isSSR !== true) { + Vue.util.defineReactive($q, 'iconMapFn', void 0); + } + } + }; + + var autoInstalled = [ + Platform, Screen, Dark + ]; + + var queues = { + server: [], // on SSR update + takeover: [] // on client takeover + }; + + var $q = { + version: version + }; + + function install (Vue, opts) { + if ( opts === void 0 ) opts = {}; + + if (this.__qInstalled === true) { return } + this.__qInstalled = true; + + var cfg = opts.config || {}; + + // required plugins + Platform.install($q, queues); + Body.install(queues, cfg); + Dark.install($q, queues, cfg); + Screen.install($q, queues, cfg); + History.install(cfg); + lang.install($q, queues, opts.lang); + iconSet.install($q, opts.iconSet); + + if (isSSR === true) { + Vue.mixin({ + beforeCreate: function beforeCreate () { + this.$q = this.$root.$options.$q; + } + }); + } + else { + Vue.prototype.$q = $q; + } + + opts.components && Object.keys(opts.components).forEach(function (key) { + var c = opts.components[key]; + if (typeof c === 'function') { + Vue.component(c.options.name, c); + } + }); + + opts.directives && Object.keys(opts.directives).forEach(function (key) { + var d = opts.directives[key]; + if (d.name !== undefined && d.unbind !== void 0) { + Vue.directive(d.name, d); + } + }); + + if (opts.plugins) { + var param = { $q: $q, queues: queues, cfg: cfg }; + Object.keys(opts.plugins).forEach(function (key) { + var p = opts.plugins[key]; + if (typeof p.install === 'function' && autoInstalled.includes(p) === false) { + p.install(param); + } + }); + } + } + + var units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB']; + + function humanStorageSize (bytes) { + var u = 0; + + while (parseInt(bytes, 10) >= 1024 && u < units.length - 1) { + bytes /= 1024; + ++u; + } + + return ((bytes.toFixed(1)) + " " + (units[u])) + } + + function capitalize (str) { + return str.charAt(0).toUpperCase() + str.slice(1) + } + + function between (v, min, max) { + return max <= min + ? min + : Math.min(max, Math.max(min, v)) + } + + function normalizeToInterval (v, min, max) { + if (max <= min) { + return min + } + + var size = (max - min + 1); + + var index = min + (v - min) % size; + if (index < min) { + index = size + index; + } + + return index === 0 ? 0 : index // fix for (-a % a) => -0 + } + + function pad (v, length, char) { + if ( length === void 0 ) length = 2; + if ( char === void 0 ) char = '0'; + + if (v === void 0 || v === null) { + return v + } + + var val = '' + v; + return val.length >= length + ? val + : new Array(length - val.length + 1).join(char) + val + } + + var format = { + humanStorageSize: humanStorageSize, + capitalize: capitalize, + between: between, + normalizeToInterval: normalizeToInterval, + pad: pad + }; + + var + xhr = isSSR ? null : XMLHttpRequest, + send = isSSR ? null : xhr.prototype.send, + stackStart = [], + stackStop = []; + + var highjackCount = 0; + + function translate (ref) { + var p = ref.p; + var pos = ref.pos; + var active = ref.active; + var horiz = ref.horiz; + var reverse = ref.reverse; + var dir = ref.dir; + + var x = 1, y = 1; + + if (horiz) { + if (reverse) { x = -1; } + if (pos === 'bottom') { y = -1; } + return { transform: ("translate3d(" + (x * (p - 100)) + "%," + (active ? 0 : y * -200) + "%,0)") } + } + + if (reverse) { y = -1; } + if (pos === 'right') { x = -1; } + return { transform: ("translate3d(" + (active ? 0 : dir * x * -200) + "%," + (y * (p - 100)) + "%,0)") } + } + + function inc (p, amount) { + if (typeof amount !== 'number') { + if (p < 25) { + amount = Math.random() * 3 + 3; + } + else if (p < 65) { + amount = Math.random() * 3; + } + else if (p < 85) { + amount = Math.random() * 2; + } + else if (p < 99) { + amount = 0.6; + } + else { + amount = 0; + } + } + return between(p + amount, 0, 100) + } + + function highjackAjax (start, stop) { + stackStart.push(start); + stackStop.push(stop); + + highjackCount++; + + if (highjackCount > 1) { return } + + function endHandler () { + stackStop.forEach(function (fn) { fn(); }); + } + + xhr.prototype.send = function (/* ...args */) { + stackStart.forEach(function (fn) { fn(); }); + this.addEventListener('loadend', endHandler, false); + send.apply(this, arguments); + }; + } + + function restoreAjax (start, stop) { + stackStart.splice(stackStart.indexOf(start), 1); + stackStop.splice(stackStop.indexOf(stop), 1); + + highjackCount = Math.max(0, highjackCount - 1); + if (!highjackCount) { + xhr.prototype.send = send; + } + } + + var QAjaxBar = Vue.extend({ + name: 'QAjaxBar', + + props: { + position: { + type: String, + default: 'top', + validator: function (val) { return ['top', 'right', 'bottom', 'left'].includes(val); } + }, + size: { + type: String, + default: '2px' + }, + color: { + type: String, + default: 'red' + }, + skipHijack: Boolean, + reverse: Boolean + }, + + data: function data () { + return { + calls: 0, + progress: 0, + onScreen: false, + animate: true + } + }, + + computed: { + classes: function classes () { + return "q-loading-bar q-loading-bar--" + (this.position) + " bg-" + (this.color) + + (this.animate === true ? '' : ' no-transition') + }, + + style: function style () { + var active = this.onScreen; + + var o = translate({ + p: this.progress, + pos: this.position, + active: active, + horiz: this.horizontal, + reverse: this.$q.lang.rtl === true && ['top', 'bottom'].includes(this.position) + ? !this.reverse + : this.reverse, + dir: this.$q.lang.rtl === true ? -1 : 1 + }); + + o[this.sizeProp] = this.size; + o.opacity = active ? 1 : 0; + + return o + }, + + horizontal: function horizontal () { + return this.position === 'top' || this.position === 'bottom' + }, + + sizeProp: function sizeProp () { + return this.horizontal ? 'height' : 'width' + }, + + attrs: function attrs () { + return this.onScreen === true + ? { + role: 'progressbar', + 'aria-valuemin': 0, + 'aria-valuemax': 100, + 'aria-valuenow': this.progress + } + : { + 'aria-hidden': 'true' + } + } + }, + + methods: { + start: function start (speed) { + var this$1 = this; + if ( speed === void 0 ) speed = 300; + + var oldSpeed = this.speed; + this.speed = Math.max(0, speed) || 0; + + this.calls++; + + if (this.calls > 1) { + if (oldSpeed === 0 && speed > 0) { + this.__work(); + } + else if (oldSpeed > 0 && speed <= 0) { + clearTimeout(this.timer); + } + return + } + + clearTimeout(this.timer); + this.$emit('start'); + + this.progress = 0; + + if (this.onScreen === true) { return } + + this.onScreen = true; + this.animate = false; + this.timer = setTimeout(function () { + this$1.animate = true; + speed > 0 && this$1.__work(); + }, 100); + }, + + increment: function increment (amount) { + this.calls > 0 && (this.progress = inc(this.progress, amount)); + }, + + stop: function stop () { + var this$1 = this; + + this.calls = Math.max(0, this.calls - 1); + if (this.calls > 0) { return } + + clearTimeout(this.timer); + this.$emit('stop'); + + var end = function () { + this$1.animate = true; + this$1.progress = 100; + this$1.timer = setTimeout(function () { + this$1.onScreen = false; + }, 1000); + }; + + if (this.progress === 0) { + this.timer = setTimeout(end, 1); + } + else { + end(); + } + }, + + __work: function __work () { + var this$1 = this; + + if (this.progress < 100) { + this.timer = setTimeout(function () { + this$1.increment(); + this$1.__work(); + }, this.speed); + } + } + }, + + mounted: function mounted () { + if (this.skipHijack !== true) { + this.hijacked = true; + highjackAjax(this.start, this.stop); + } + }, + + beforeDestroy: function beforeDestroy () { + clearTimeout(this.timer); + this.hijacked && restoreAjax(this.start, this.stop); + }, + + render: function render (h) { + return h('div', { + class: this.classes, + style: this.style, + attrs: this.attrs + }) + } + }); + + var sizes = { + xs: 18, + sm: 24, + md: 32, + lg: 38, + xl: 46 + }; + + function getSizeMixin (sizes) { + return { + props: { + size: String + }, + + computed: { + sizeStyle: function sizeStyle () { + if (this.size !== void 0) { + return { fontSize: this.size in sizes ? ((sizes[this.size]) + "px") : this.size } + } + } + } + } + } + + var SizeMixin = getSizeMixin(sizes); + + var TagMixin = { + props: { + tag: { + type: String, + default: 'div' + } + } + }; + + function slot (vm, slotName, otherwise) { + return vm.$scopedSlots[slotName] !== void 0 + ? vm.$scopedSlots[slotName]() + : otherwise + } + + function uniqueSlot (vm, slotName, otherwise) { + return vm.$scopedSlots[slotName] !== void 0 + ? vm.$scopedSlots[slotName]().slice() + : otherwise + } + + /** + * Source definitely exists, + * so it's merged with the possible slot + */ + function mergeSlot (source, vm, slotName) { + return vm.$scopedSlots[slotName] !== void 0 + ? source.concat(vm.$scopedSlots[slotName]()) + : source + } + + /** + * Merge with possible slot, + * even if source might not exist + */ + function mergeSlotSafely (source, vm, slotName) { + if (vm.$scopedSlots[slotName] === void 0) { + return source + } + + var slot = vm.$scopedSlots[slotName](); + return source !== void 0 + ? source.concat(slot) + : slot + } + + var QIcon = Vue.extend({ + name: 'QIcon', + + mixins: [ SizeMixin, TagMixin ], + + props: { + tag: { + default: 'i' + }, + + name: String, + color: String, + left: Boolean, + right: Boolean + }, + + computed: { + classes: function classes () { + // "notranslate" class is for Google Translate + // to avoid tampering with Material Icons ligature font + return 'q-icon notranslate' + + (this.left === true ? ' on-left' : '') + + (this.right === true ? ' on-right' : '') + + (this.color !== void 0 ? (" text-" + (this.color)) : '') + }, + + type: function type () { + var cls; + var icon = this.name; + + if (!icon) { + return { + none: true, + cls: this.classes + } + } + + if (this.$q.iconMapFn !== void 0) { + var res = this.$q.iconMapFn(icon); + if (res !== void 0) { + if (res.icon !== void 0) { + icon = res.icon; + } + else { + return { + cls: res.cls + ' ' + this.classes, + content: res.content !== void 0 + ? res.content + : ' ' + } + } + } + } + + if (icon.startsWith('M') === true) { + var cfg = icon.split('|'); + return { + svg: true, + cls: this.classes, + path: cfg[0], + viewBox: cfg[1] !== void 0 ? cfg[1] : '0 0 24 24' + } + } + + if (icon.startsWith('img:') === true) { + return { + img: true, + cls: this.classes, + src: icon.substring(4) + } + } + + var content = ' '; + + if (/^[l|f]a[s|r|l|b|d]{0,1} /.test(icon) || icon.startsWith('icon-') === true) { + cls = icon; + } + else if (icon.startsWith('bt-') === true) { + cls = "bt " + icon; + } + else if (icon.startsWith('eva-') === true) { + cls = "eva " + icon; + } + else if (/^ion-(md|ios|logo)/.test(icon) === true) { + cls = "ionicons " + icon; + } + else if (icon.startsWith('ion-') === true) { + cls = "ionicons ion-" + (this.$q.platform.is.ios === true ? 'ios' : 'md') + (icon.substr(3)); + } + else if (icon.startsWith('mdi-') === true) { + cls = "mdi " + icon; + } + else if (icon.startsWith('iconfont ') === true) { + cls = "" + icon; + } + else if (icon.startsWith('ti-') === true) { + cls = "themify-icon " + icon; + } + else { + cls = 'material-icons'; + + if (icon.startsWith('o_') === true) { + icon = icon.substring(2); + cls += '-outlined'; + } + else if (icon.startsWith('r_') === true) { + icon = icon.substring(2); + cls += '-round'; + } + else if (icon.startsWith('s_') === true) { + icon = icon.substring(2); + cls += '-sharp'; + } + + content = icon; + } + + return { + cls: cls + ' ' + this.classes, + content: content + } + } + }, + + render: function render (h) { + var data = { + class: this.type.cls, + style: this.sizeStyle, + on: this.$listeners, + attrs: { + 'aria-hidden': 'true', + role: 'presentation' + } + }; + + if (this.type.none === true) { + return h(this.tag, data, slot(this, 'default')) + } + + if (this.type.img === true) { + data.attrs.src = this.type.src; + return h('img', data) + } + + if (this.type.svg === true) { + data.attrs.focusable = 'false'; /* needed for IE11 */ + data.attrs.viewBox = this.type.viewBox; + + return h('svg', data, mergeSlot([ + h('path', { + attrs: { d: this.type.path } + }) + ], this, 'default')) + } + + return h(this.tag, data, mergeSlot([ + this.type.content + ], this, 'default')) + } + }); + + var QAvatar = Vue.extend({ + name: 'QAvatar', + + mixins: [ SizeMixin ], + + props: { + fontSize: String, + + color: String, + textColor: String, + + icon: String, + square: Boolean, + rounded: Boolean + }, + + computed: { + contentClass: function contentClass () { + var obj; + + return ( obj = {}, obj[("bg-" + (this.color))] = this.color, obj[("text-" + (this.textColor) + " q-chip--colored")] = this.textColor, obj['q-avatar__content--square'] = this.square, obj['rounded-borders'] = this.rounded, obj ) + }, + + contentStyle: function contentStyle () { + if (this.fontSize) { + return { fontSize: this.fontSize } + } + } + }, + + render: function render (h) { + var icon = this.icon !== void 0 + ? [ h(QIcon, { props: { name: this.icon } }) ] + : void 0; + + return h('div', { + staticClass: 'q-avatar', + style: this.sizeStyle, + on: this.$listeners + }, [ + h('div', { + staticClass: 'q-avatar__content row flex-center overflow-hidden', + class: this.contentClass, + style: this.contentStyle + }, mergeSlotSafely(icon, this, 'default')) + ]) + } + }); + + var QBadge = Vue.extend({ + name: 'QBadge', + + props: { + color: String, + textColor: String, + + floating: Boolean, + transparent: Boolean, + multiLine: Boolean, + outline: Boolean, + + label: [Number, String], + + align: { + type: String, + validator: function (v) { return ['top', 'middle', 'bottom'].includes(v); } + } + }, + + computed: { + style: function style () { + if (this.align !== void 0) { + return { verticalAlign: this.align } + } + }, + + classes: function classes () { + var text = this.outline === true + ? this.color || this.textColor + : this.textColor; + + return 'q-badge flex inline items-center no-wrap' + + " q-badge--" + (this.multiLine === true ? 'multi' : 'single') + "-line" + + (this.outline === true + ? ' q-badge--outline' + : (this.color !== void 0 ? (" bg-" + (this.color)) : '') + ) + + (text !== void 0 ? (" text-" + text) : '') + + (this.floating === true ? ' q-badge--floating' : '') + + (this.transparent === true ? ' q-badge--transparent' : '') + }, + + attrs: function attrs () { + return { + role: 'alert', + 'aria-label': this.label + } + } + }, + + render: function render (h) { + return h('div', { + style: this.style, + class: this.classes, + attrs: this.attrs, + on: this.$listeners + }, this.label !== void 0 ? [ this.label ] : slot(this, 'default')) + } + }); + + var DarkMixin = { + props: { + dark: { + type: Boolean, + default: null + } + }, + + computed: { + isDark: function isDark () { + return this.dark === null + ? this.$q.dark.isActive + : this.dark + } + } + }; + + var attrs = { role: 'alert' }; + + var QBanner = Vue.extend({ + name: 'QBanner', + + mixins: [ DarkMixin ], + + props: { + inlineActions: Boolean, + dense: Boolean, + rounded: Boolean + }, + + render: function render (h) { + var actions = slot(this, 'action'); + var child = [ + h('div', { + staticClass: 'q-banner__avatar col-auto row items-center' + }, slot(this, 'avatar')), + + h('div', { + staticClass: 'q-banner__content col text-body2' + }, slot(this, 'default')) + ]; + + actions !== void 0 && child.push( + h('div', { + staticClass: 'q-banner__actions row items-center justify-end', + class: ("col-" + (this.inlineActions === true ? 'auto' : 'all')) + }, actions) + ); + + return h('div', { + staticClass: 'q-banner row items-center', + class: { + 'q-banner--top-padding': actions !== void 0 && !this.inlineActions, + 'q-banner--dense': this.dense, + 'q-banner--dark q-dark': this.isDark, + 'rounded-borders': this.rounded + }, + attrs: attrs, + on: this.$listeners + }, child) + } + }); + + var attrs$1 = { role: 'toolbar' }; + + var QBar = Vue.extend({ + name: 'QBar', + + mixins: [ DarkMixin ], + + props: { + dense: Boolean + }, + + computed: { + classes: function classes () { + return "q-bar--" + (this.dense === true ? 'dense' : 'standard') + " " + + "q-bar--" + (this.isDark === true ? 'dark' : 'light') + } + }, + + render: function render (h) { + return h('div', { + staticClass: 'q-bar row no-wrap items-center', + class: this.classes, + attrs: attrs$1, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + var + alignMap = { + left: 'start', + center: 'center', + right: 'end', + between: 'between', + around: 'around', + evenly: 'evenly', + stretch: 'stretch' + }, + alignValues = Object.keys(alignMap); + + var AlignMixin = { + props: { + align: { + type: String, + validator: function (v) { return alignValues.includes(v); } + } + }, + + computed: { + alignClass: function alignClass () { + var align = this.align === void 0 + ? (this.vertical === true ? 'stretch' : 'left') + : this.align; + + return ((this.vertical === true ? 'items' : 'justify') + "-" + (alignMap[align])) + } + } + }; + + var QBreadcrumbs = Vue.extend({ + name: 'QBreadcrumbs', + + mixins: [ AlignMixin ], + + props: { + separator: { + type: String, + default: '/' + }, + separatorColor: String, + + activeColor: { + type: String, + default: 'primary' + }, + + gutter: { + type: String, + validator: function (v) { return ['none', 'xs', 'sm', 'md', 'lg', 'xl'].includes(v); }, + default: 'sm' + } + }, + + computed: { + classes: function classes () { + return ("" + (this.alignClass) + (this.gutter === 'none' ? '' : (" q-gutter-" + (this.gutter)))) + }, + + sepClass: function sepClass () { + if (this.separatorColor) { + return ("text-" + (this.separatorColor)) + } + }, + + activeClass: function activeClass () { + return ("text-" + (this.activeColor)) + } + }, + + render: function render (h) { + var this$1 = this; + + var nodes = slot(this, 'default'); + if (nodes === void 0) { return } + + var els = 1; + + var + child = [], + len = nodes.filter(function (c) { return c.tag !== void 0 && c.tag.endsWith('-QBreadcrumbsEl'); }).length, + separator = this.$scopedSlots.separator !== void 0 + ? this.$scopedSlots.separator + : function () { return this$1.separator; }; + + nodes.forEach(function (comp) { + if (comp.tag !== void 0 && comp.tag.endsWith('-QBreadcrumbsEl')) { + var middle = els < len; + els++; + + child.push(h('div', { + staticClass: 'flex items-center', + class: middle ? this$1.activeClass : 'q-breadcrumbs--last' + }, [ comp ])); + + if (middle) { + child.push(h('div', { + staticClass: 'q-breadcrumbs__separator', class: this$1.sepClass + }, separator())); + } + } + else { + child.push(comp); + } + }); + + return h('div', { + staticClass: 'q-breadcrumbs', + on: this.$listeners + }, [ + h('div', { + staticClass: 'flex items-center', + class: this.classes + }, child) + ]) + } + }); + + var routerLinkProps = { + to: [String, Object], + exact: Boolean, + append: Boolean, + replace: Boolean, + activeClass: String, + exactActiveClass: String, + disable: Boolean + }; + + var RouterLinkMixin = { + props: routerLinkProps, + + computed: { + hasRouterLink: function hasRouterLink () { + return this.disable !== true && this.to !== void 0 && this.to !== null && this.to !== '' + }, + + routerLinkProps: function routerLinkProps () { + return { + to: this.to, + exact: this.exact, + append: this.append, + replace: this.replace, + activeClass: this.activeClass || 'q-router-link--active', + exactActiveClass: this.exactActiveClass || 'q-router-link--exact-active', + event: this.disable === true ? '' : void 0 + } + } + } + }; + + var QBreadcrumbsEl = Vue.extend({ + name: 'QBreadcrumbsEl', + + mixins: [ RouterLinkMixin ], + + props: { + label: String, + icon: String + }, + + render: function render (h) { + var obj; + + var child = []; + + this.icon !== void 0 && child.push( + h(QIcon, { + staticClass: 'q-breadcrumbs__el-icon', + class: this.label !== void 0 ? 'q-breadcrumbs__el-icon--with-label' : null, + props: { name: this.icon } + }) + ); + + this.label && child.push(this.label); + + return h(this.hasRouterLink === true ? 'router-link' : 'span', ( obj = { + staticClass: 'q-breadcrumbs__el q-link flex inline items-center relative-position', + props: this.hasRouterLink === true ? this.routerLinkProps : null + }, obj[this.hasRouterLink === true ? 'nativeOn' : 'on'] = this.$listeners, obj ), mergeSlot(child, this, 'default')) + } + }); + + var mixin = { + props: { + color: String, + size: { + type: [Number, String], + default: '1em' + } + }, + + computed: { + cSize: function cSize () { + return this.size in sizes + ? ((sizes[this.size]) + "px") + : this.size + }, + + classes: function classes () { + if (this.color) { + return ("text-" + (this.color)) + } + } + } + }; + + var QSpinner = Vue.extend({ + name: 'QSpinner', + + mixins: [ mixin ], + + props: { + thickness: { + type: Number, + default: 5 + } + }, + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner q-spinner-mat', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '25 25 50 50' + } + }, [ + h('circle', { + staticClass: 'path', + attrs: { + 'cx': '50', + 'cy': '50', + 'r': '20', + 'fill': 'none', + 'stroke': 'currentColor', + 'stroke-width': this.thickness, + 'stroke-miterlimit': '10' + } + }) + ]) + } + }); + + function offset (el) { + if (el === window) { + return { top: 0, left: 0 } + } + var ref = el.getBoundingClientRect(); + var top = ref.top; + var left = ref.left; + return { top: top, left: left } + } + + function style (el, property) { + return window.getComputedStyle(el).getPropertyValue(property) + } + + function height (el) { + return el === window + ? window.innerHeight + : el.getBoundingClientRect().height + } + + function width (el) { + return el === window + ? window.innerWidth + : el.getBoundingClientRect().width + } + + function css (element, css) { + var style = element.style; + + Object.keys(css).forEach(function (prop) { + style[prop] = css[prop]; + }); + } + + function cssBatch (elements, style) { + elements.forEach(function (el) { return css(el, style); }); + } + + function ready (fn) { + if (typeof fn !== 'function') { + return + } + + if (document.readyState !== 'loading') { + return fn() + } + + document.addEventListener('DOMContentLoaded', fn, false); + } + + function childHasFocus (el, focusedEl) { + if (el === void 0 || el.contains(focusedEl) === true) { + return true + } + + for (var next = el.nextElementSibling; next !== null; next = next.nextElementSibling) { + if (next.contains(focusedEl)) { + return true + } + } + + return false + } + + var dom = { + offset: offset, + style: style, + height: height, + width: width, + css: css, + cssBatch: cssBatch, + ready: ready + }; + + function showRipple (evt, el, ctx, forceCenter) { + ctx.modifiers.stop === true && stop(evt); + + var ref = ctx.modifiers; + var center = ref.center; + var color = ref.color; + center = center === true || forceCenter === true; + + var + node = document.createElement('span'), + innerNode = document.createElement('span'), + pos = position(evt); + var ref$1 = el.getBoundingClientRect(); + var left = ref$1.left; + var top = ref$1.top; + var width = ref$1.width; + var height = ref$1.height; + var diameter = Math.sqrt(width * width + height * height), + radius = diameter / 2, + centerX = ((width - diameter) / 2) + "px", + x = center ? centerX : ((pos.left - left - radius) + "px"), + centerY = ((height - diameter) / 2) + "px", + y = center ? centerY : ((pos.top - top - radius) + "px"); + + innerNode.className = 'q-ripple__inner'; + css(innerNode, { + height: (diameter + "px"), + width: (diameter + "px"), + transform: ("translate3d(" + x + "," + y + ",0) scale3d(.2,.2,1)"), + opacity: 0 + }); + + node.className = "q-ripple" + (color ? ' text-' + color : ''); + node.setAttribute('dir', 'ltr'); + node.appendChild(innerNode); + el.appendChild(node); + + var abort = function () { + node.remove(); + clearTimeout(timer); + }; + ctx.abort.push(abort); + + var timer = setTimeout(function () { + innerNode.classList.add('q-ripple__inner--enter'); + innerNode.style.transform = "translate3d(" + centerX + "," + centerY + ",0) scale3d(1,1,1)"; + innerNode.style.opacity = 0.2; + + timer = setTimeout(function () { + innerNode.classList.remove('q-ripple__inner--enter'); + innerNode.classList.add('q-ripple__inner--leave'); + innerNode.style.opacity = 0; + + timer = setTimeout(function () { + node.remove(); + ctx.abort.splice(ctx.abort.indexOf(abort), 1); + }, 275); + }, 250); + }, 50); + } + + function updateCtx (ctx, ref) { + var value = ref.value; + var modifiers = ref.modifiers; + var arg = ref.arg; + + ctx.enabled = value !== false; + + if (ctx.enabled === true) { + ctx.modifiers = Object(value) === value + ? { + stop: value.stop === true || modifiers.stop === true, + center: value.center === true || modifiers.center === true, + color: value.color || arg, + keyCodes: [].concat(value.keyCodes || 13) + } + : { + stop: modifiers.stop, + center: modifiers.center, + color: arg, + keyCodes: [13] + }; + } + } + + var Ripple = { + name: 'ripple', + + inserted: function inserted (el, binding) { + var ctx = { + modifiers: {}, + abort: [], + + click: function click (evt) { + // on ENTER in form IE emits a PointerEvent with negative client cordinates + if ( + ctx.enabled === true && + evt.qSkipRipple !== true && + (client.is.ie !== true || evt.clientX >= 0) + ) { + showRipple(evt, el, ctx, evt.qKeyEvent === true); + } + }, + + keyup: function keyup (evt) { + if ( + ctx.enabled === true && + evt.qSkipRipple !== true && + isKeyCode(evt, ctx.modifiers.keyCodes) === true + ) { + showRipple(evt, el, ctx, true); + } + } + }; + + updateCtx(ctx, binding); + + if (el.__qripple) { + el.__qripple_old = el.__qripple; + } + + el.__qripple = ctx; + el.addEventListener('click', ctx.click, listenOpts.passive); + el.addEventListener('keyup', ctx.keyup, listenOpts.passive); + }, + + update: function update (el, binding) { + el.__qripple !== void 0 && updateCtx(el.__qripple, binding); + }, + + unbind: function unbind (el) { + var ctx = el.__qripple_old || el.__qripple; + if (ctx !== void 0) { + ctx.abort.forEach(function (fn) { fn(); }); + el.removeEventListener('click', ctx.click, listenOpts.passive); + el.removeEventListener('keyup', ctx.keyup, listenOpts.passive); + delete el[el.__qripple_old ? '__qripple_old' : '__qripple']; + } + } + }; + + var RippleMixin = { + directives: { + Ripple: Ripple + }, + + props: { + ripple: { + type: [Boolean, Object], + default: true + } + } + }; + + var BtnMixin = { + mixins: [ + RippleMixin, + AlignMixin, + getSizeMixin({ + xs: 8, + sm: 10, + md: 14, + lg: 20, + xl: 24 + }) + ], + + props: { + type: String, + to: [Object, String], + replace: Boolean, + + label: [Number, String], + icon: String, + iconRight: String, + + round: Boolean, + outline: Boolean, + flat: Boolean, + unelevated: Boolean, + rounded: Boolean, + push: Boolean, + glossy: Boolean, + + size: String, + fab: Boolean, + fabMini: Boolean, + + color: String, + textColor: String, + noCaps: Boolean, + noWrap: Boolean, + dense: Boolean, + + tabindex: [Number, String], + + align: { default: 'center' }, + stack: Boolean, + stretch: Boolean, + loading: { + type: Boolean, + default: null + }, + disable: Boolean + }, + + computed: { + style: function style () { + if (this.fab === false && this.fabMini === false) { + return this.sizeStyle + } + }, + + isRounded: function isRounded () { + return this.rounded === true || this.fab === true || this.fabMini === true + }, + + isActionable: function isActionable () { + return this.disable !== true && this.loading !== true + }, + + computedTabIndex: function computedTabIndex () { + return this.isActionable === true ? this.tabindex || 0 : -1 + }, + + hasRouterLink: function hasRouterLink () { + return this.disable !== true && this.to !== void 0 && this.to !== null && this.to !== '' + }, + + isLink: function isLink () { + return this.type === 'a' || this.hasRouterLink === true + }, + + design: function design () { + if (this.flat === true) { return 'flat' } + if (this.outline === true) { return 'outline' } + if (this.push === true) { return 'push' } + if (this.unelevated === true) { return 'unelevated' } + return 'standard' + }, + + attrs: function attrs () { + var attrs = { tabindex: this.computedTabIndex }; + + if (this.type !== 'a') { + attrs.type = this.type || 'button'; + } + + if (this.hasRouterLink === true) { + attrs.href = this.$router.resolve(this.to).href; + attrs.role = 'link'; + } + else { + attrs.role = this.type === 'a' ? 'link' : 'button'; + } + + if (this.loading === true && this.percentage !== void 0) { + attrs.role = 'progressbar'; + attrs['aria-valuemin'] = 0; + attrs['aria-valuemax'] = 100; + attrs['aria-valuenow'] = this.computedPercentage; + } + + if (this.disable === true) { + attrs.disabled = ''; + attrs['aria-disabled'] = ''; + } + + return attrs + }, + + classes: function classes () { + var colors; + + if (this.color !== void 0) { + if (this.flat === true || this.outline === true) { + colors = "text-" + (this.textColor || this.color); + } + else { + colors = "bg-" + (this.color) + " text-" + (this.textColor || 'white'); + } + } + else if (this.textColor) { + colors = "text-" + (this.textColor); + } + + return "q-btn--" + (this.design) + " " + + "q-btn--" + (this.round === true ? 'round' : ("rectangle" + (this.isRounded === true ? ' q-btn--rounded' : ''))) + + (colors !== void 0 ? ' ' + colors : '') + + (this.isActionable === true ? ' q-btn--actionable q-focusable q-hoverable' : (this.disable === true ? ' disabled' : '')) + + (this.fab === true ? ' q-btn--fab' : (this.fabMini === true ? ' q-btn--fab-mini' : '')) + + (this.noCaps === true ? ' q-btn--no-uppercase' : '') + + (this.noWrap === true ? '' : ' q-btn--wrap') + // this is for IE11 + (this.dense === true ? ' q-btn--dense' : '') + + (this.stretch === true ? ' no-border-radius self-stretch' : '') + + (this.glossy === true ? ' glossy' : '') + }, + + innerClasses: function innerClasses () { + return this.alignClass + (this.stack === true ? ' column' : ' row') + + (this.noWrap === true ? ' no-wrap text-no-wrap' : '') + + (this.loading === true ? ' q-btn__content--hidden' : '') + } + } + }; + + var directions = [ 'left', 'right', 'up', 'down', 'horizontal', 'vertical' ]; + + var modifiersAll = { + left: true, + right: true, + up: true, + down: true, + horizontal: true, + vertical: true, + all: true + }; + + function getModifierDirections (mod) { + var dir = {}; + + directions.forEach(function (direction) { + if (mod[direction]) { + dir[direction] = true; + } + }); + + if (Object.keys(dir).length === 0) { + return modifiersAll + } + + if (dir.horizontal === true) { + dir.left = dir.right = true; + } + if (dir.vertical === true) { + dir.up = dir.down = true; + } + if (dir.left === true && dir.right === true) { + dir.horizontal = true; + } + if (dir.up === true && dir.down === true) { + dir.vertical = true; + } + if (dir.horizontal === true && dir.vertical === true) { + dir.all = true; + } + + return dir + } + + function updateModifiers (ctx, ref) { + var oldValue = ref.oldValue; + var value = ref.value; + var modifiers = ref.modifiers; + + if (oldValue !== value) { + typeof value !== 'function' && ctx.end(); + ctx.handler = value; + } + + if ( + ctx.modifiers.mouseAllDir !== modifiers.mouseAllDir || + directions.some(function (direction) { return modifiers[direction] !== ctx.modifiers[direction]; }) + ) { + ctx.modifiers = modifiers; + ctx.direction = getModifierDirections(modifiers); + } + } + + function addEvt (ctx, target, events) { + target += 'Evt'; + + ctx[target] = ctx[target] !== void 0 + ? ctx[target].concat(events) + : events; + + events.forEach(function (evt) { + evt[0].addEventListener(evt[1], ctx[evt[2]], listenOpts[evt[3]]); + }); + } + + function cleanEvt (ctx, target) { + target += 'Evt'; + + if (ctx[target] !== void 0) { + ctx[target].forEach(function (evt) { + evt[0].removeEventListener(evt[1], ctx[evt[2]], listenOpts[evt[3]]); + }); + ctx[target] = void 0; + } + } + + var getTouchTarget = isSSR === false && iosEmulated !== true && ( + client.is.ios === true || + window.navigator.vendor.toLowerCase().indexOf('apple') > -1 + ) + ? function () { return document; } + : function (target) { return target; }; + + function shouldStart (evt, ctx) { + return ctx.event === void 0 && + evt.target !== void 0 && + evt.target.draggable !== true && + typeof ctx.handler === 'function' && + evt.target.nodeName.toUpperCase() !== 'INPUT' && + (evt.qClonedBy === void 0 || evt.qClonedBy.indexOf(ctx.uid) === -1) + } + + var passiveCapture = listenOpts.passiveCapture; + + var + touchTarget = void 0, + keyboardTarget = void 0, + mouseTarget = void 0; + + var iconAttrs = { role: 'img', 'aria-hidden': 'true' }; + + var QBtn = Vue.extend({ + name: 'QBtn', + + mixins: [ BtnMixin ], + + props: { + percentage: Number, + darkPercentage: Boolean + }, + + computed: { + hasLabel: function hasLabel () { + return this.label !== void 0 && this.label !== null && this.label !== '' + }, + + computedRipple: function computedRipple () { + return this.ripple === false + ? false + : Object.assign( + { keyCodes: [] }, + this.ripple === true ? {} : this.ripple + ) + }, + + percentageStyle: function percentageStyle () { + var val = Math.max(0, Math.min(100, this.percentage)); + if (val > 0) { + return { transition: 'transform 0.6s', transform: ("translateX(" + (val - 100) + "%)") } + } + } + }, + + methods: { + click: function click (e) { + var this$1 = this; + + if (e !== void 0) { + if (e.defaultPrevented === true) { + return + } + + var el = document.activeElement; + // focus button if it came from ENTER on form + // prevent the new submit (already done) + if ( + this.type === 'submit' && + ( + (this.$q.platform.is.ie === true && (e.clientX < 0 || e.clientY < 0)) || + ( + el !== document.body && + this.$el.contains(el) === false && + // required for iOS and desktop Safari + el.contains(this.$el) === false + ) + ) + ) { + this.$el.focus(); + + var onClickCleanup = function () { + document.removeEventListener('keydown', stopAndPrevent, true); + document.removeEventListener('keyup', onClickCleanup, passiveCapture); + this$1.$el !== void 0 && this$1.$el.removeEventListener('blur', onClickCleanup, passiveCapture); + }; + + document.addEventListener('keydown', stopAndPrevent, true); + document.addEventListener('keyup', onClickCleanup, passiveCapture); + this.$el.addEventListener('blur', onClickCleanup, passiveCapture); + } + + if (this.hasRouterLink === true) { + if ( + e.ctrlKey === true || + e.shiftKey === true || + e.altKey === true || + e.metaKey === true + ) { + // if it has meta keys, let vue-router link + // handle this by its own + return + } + + stopAndPrevent(e); + } + } + + var go = function () { + var res = this$1.$router[this$1.replace === true ? 'replace' : 'push'](this$1.to); + + // vue-router now throwing error if navigating + // to the same route that the user is currently at + // https://github.com/vuejs/vue-router/issues/2872 + if (res !== void 0 && typeof res.catch === 'function') { + res.catch(noop); + } + }; + + this.$emit('click', e, go); + this.hasRouterLink === true && e.navigate !== false && go(); + }, + + __onKeydown: function __onKeydown (e) { + if (isKeyCode(e, [ 13, 32 ]) === true) { + stopAndPrevent(e); + + if (keyboardTarget !== this.$el) { + keyboardTarget !== void 0 && this.__cleanup(); + + // focus external button if the focus helper was focused before + this.$el.focus(); + + keyboardTarget = this.$el; + this.$el.classList.add('q-btn--active'); + document.addEventListener('keyup', this.__onPressEnd, true); + this.$el.addEventListener('blur', this.__onPressEnd, passiveCapture); + } + } + + this.$emit('keydown', e); + }, + + __onTouchstart: function __onTouchstart (e) { + if (touchTarget !== this.$el) { + touchTarget !== void 0 && this.__cleanup(); + touchTarget = this.$el; + var target = this.touchTargetEl = getTouchTarget(e.target); + target.addEventListener('touchcancel', this.__onPressEnd, passiveCapture); + target.addEventListener('touchend', this.__onPressEnd, passiveCapture); + } + + this.$emit('touchstart', e); + }, + + __onMousedown: function __onMousedown (e) { + if (mouseTarget !== this.$el) { + mouseTarget !== void 0 && this.__cleanup(); + mouseTarget = this.$el; + this.$el.classList.add('q-btn--active'); + document.addEventListener('mouseup', this.__onPressEnd, passiveCapture); + } + + this.$emit('mousedown', e); + }, + + __onPressEnd: function __onPressEnd (e) { + // needed for IE (because it emits blur when focusing button from focus helper) + if (e !== void 0 && e.type === 'blur' && document.activeElement === this.$el) { + return + } + + if (e !== void 0 && e.type === 'keyup') { + if (keyboardTarget === this.$el && isKeyCode(e, [ 13, 32 ]) === true) { + // for click trigger + var evt = new MouseEvent('click', e); + evt.qKeyEvent = true; + e.defaultPrevented === true && prevent(evt); + e.cancelBubble === true && stop(evt); + this.$el.dispatchEvent(evt); + + stopAndPrevent(e); + + // for ripple + e.qKeyEvent = true; + } + + this.$emit('keyup', e); + } + + this.__cleanup(); + }, + + __cleanup: function __cleanup (destroying) { + if ( + destroying !== true && + (touchTarget === this.$el || mouseTarget === this.$el) && + this.$refs.blurTarget !== void 0 && + this.$refs.blurTarget !== document.activeElement + ) { + this.$refs.blurTarget.focus(); + } + + if (touchTarget === this.$el) { + var target = this.touchTargetEl; + target.removeEventListener('touchcancel', this.__onPressEnd, passiveCapture); + target.removeEventListener('touchend', this.__onPressEnd, passiveCapture); + touchTarget = this.touchTargetEl = void 0; + } + + if (mouseTarget === this.$el) { + document.removeEventListener('mouseup', this.__onPressEnd, passiveCapture); + mouseTarget = void 0; + } + + if (keyboardTarget === this.$el) { + document.removeEventListener('keyup', this.__onPressEnd, true); + this.$el !== void 0 && this.$el.removeEventListener('blur', this.__onPressEnd, passiveCapture); + keyboardTarget = void 0; + } + + this.$el !== void 0 && this.$el.classList.remove('q-btn--active'); + }, + + __onLoadingEvt: function __onLoadingEvt (evt) { + stopAndPrevent(evt); + evt.qSkipRipple = true; + } + }, + + beforeDestroy: function beforeDestroy () { + this.__cleanup(true); + }, + + render: function render (h) { + var inner = []; + var data = { + staticClass: 'q-btn q-btn-item non-selectable no-outline', + class: this.classes, + style: this.style, + attrs: this.attrs + }; + + if (this.isActionable === true) { + data.on = Object.assign({}, this.$listeners, + {click: this.click, + keydown: this.__onKeydown, + mousedown: this.__onMousedown}); + + if (this.$q.platform.has.touch === true) { + data.on.touchstart = this.__onTouchstart; + } + } + + if (this.disable !== true && this.ripple !== false) { + data.directives = [{ + name: 'ripple', + value: this.computedRipple, + modifiers: { center: this.round } + }]; + } + + this.icon !== void 0 && inner.push( + h(QIcon, { + attrs: iconAttrs, + props: { name: this.icon, left: this.stack === false && this.hasLabel === true } + }) + ); + + this.hasLabel === true && inner.push( + h('div', [ this.label ]) + ); + + inner = mergeSlot(inner, this, 'default'); + + if (this.iconRight !== void 0 && this.round === false) { + inner.push( + h(QIcon, { + attrs: iconAttrs, + props: { name: this.iconRight, right: this.stack === false && this.hasLabel === true } + }) + ); + } + + var child = [ + h('div', { + staticClass: 'q-focus-helper', + ref: 'blurTarget', + attrs: { tabindex: -1 } + }) + ]; + + if (this.loading === true) { + // stop propagation and ripple + data.on = { + click: this.__onLoadingEvt, + keyup: this.__onLoadingEvt + }; + + this.percentage !== void 0 && child.push( + h('div', { + staticClass: 'q-btn__progress absolute-full overflow-hidden' + }, [ + h('div', { + staticClass: 'q-btn__progress-indicator fit', + class: this.darkPercentage === true ? 'q-btn__progress--dark' : '', + style: this.percentageStyle + }) + ]) + ); + } + + child.push( + h('div', { + staticClass: 'q-btn__wrapper col row q-anchor--skip' + }, [ + h('div', { + staticClass: 'q-btn__content text-center col items-center q-anchor--skip', + class: this.innerClasses + }, inner) + ]) + ); + + this.loading !== null && child.push( + h('transition', { + props: { name: 'q-transition--fade' } + }, this.loading === true ? [ + h('div', { + key: 'loading', + staticClass: 'absolute-full flex flex-center' + }, this.$scopedSlots.loading !== void 0 ? this.$scopedSlots.loading() : [ h(QSpinner) ]) + ] : void 0) + ); + + return h(this.isLink === true ? 'a' : 'button', data, child) + } + }); + + var QBtnGroup = Vue.extend({ + name: 'QBtnGroup', + + props: { + unelevated: Boolean, + outline: Boolean, + flat: Boolean, + rounded: Boolean, + push: Boolean, + stretch: Boolean, + glossy: Boolean, + spread: Boolean + }, + + computed: { + classes: function classes () { + var this$1 = this; + + return ['unelevated', 'outline', 'flat', 'rounded', 'push', 'stretch', 'glossy'] + .filter(function (t) { return this$1[t] === true; }) + .map(function (t) { return ("q-btn-group--" + t); }).join(' ') + } + }, + + render: function render (h) { + return h('div', { + staticClass: 'q-btn-group row no-wrap ' + + (this.spread === true ? 'q-btn-group--spread' : 'inline'), + class: this.classes, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + function clearSelection () { + if (window.getSelection !== void 0) { + var selection = window.getSelection(); + if (selection.empty !== void 0) { + selection.empty(); + } + else if (selection.removeAllRanges !== void 0) { + selection.removeAllRanges(); + Platform.is.mobile !== true && selection.addRange(document.createRange()); + } + } + else if (document.selection !== void 0) { + document.selection.empty(); + } + } + + var AnchorMixin = { + props: { + target: { + default: true + }, + noParentEvent: Boolean, + contextMenu: Boolean + }, + + watch: { + contextMenu: function contextMenu (val) { + if (this.anchorEl !== void 0) { + this.__unconfigureAnchorEl(); + this.__configureAnchorEl(val); + } + }, + + target: function target () { + if (this.anchorEl !== void 0) { + this.__unconfigureAnchorEl(); + } + + this.__pickAnchorEl(); + }, + + noParentEvent: function noParentEvent (val) { + if (this.anchorEl !== void 0) { + if (val === true) { + this.__unconfigureAnchorEl(); + } + else { + this.__configureAnchorEl(); + } + } + } + }, + + methods: { + __showCondition: function __showCondition (evt) { + // abort with no parent configured or on multi-touch + if (this.anchorEl === void 0) { + return false + } + if (evt === void 0) { + return true + } + return evt.touches === void 0 || evt.touches.length <= 1 + }, + + __contextClick: function __contextClick (evt) { + var this$1 = this; + + this.hide(evt); + this.$nextTick(function () { + this$1.show(evt); + }); + prevent(evt); + }, + + __toggleKey: function __toggleKey (evt) { + isKeyCode(evt, 13) === true && this.toggle(evt); + }, + + __mobileCleanup: function __mobileCleanup (evt) { + this.anchorEl.classList.remove('non-selectable'); + clearTimeout(this.touchTimer); + + if (this.showing === true && evt !== void 0) { + clearSelection(); + } + }, + + __mobilePrevent: prevent, + + __mobileTouch: function __mobileTouch (evt) { + var this$1 = this; + + this.__mobileCleanup(evt); + + if (this.__showCondition(evt) !== true) { + return + } + + this.hide(evt); + this.anchorEl.classList.add('non-selectable'); + + var target = getTouchTarget(evt.target); + addEvt(this, 'anchor', [ + [ target, 'touchmove', '__mobileCleanup', 'passive' ], + [ target, 'touchend', '__mobileCleanup', 'passive' ], + [ target, 'touchcancel', '__mobileCleanup', 'passive' ], + [ this.anchorEl, 'contextmenu', '__mobilePrevent', 'notPassive' ] + ]); + + this.touchTimer = setTimeout(function () { + this$1.show(evt); + }, 300); + }, + + __unconfigureAnchorEl: function __unconfigureAnchorEl () { + cleanEvt(this, 'anchor'); + }, + + __configureAnchorEl: function __configureAnchorEl (context) { + if ( context === void 0 ) context = this.contextMenu; + + if (this.noParentEvent === true || this.anchorEl === void 0) { return } + + var evts; + + if (context === true) { + if (this.$q.platform.is.mobile === true) { + evts = [ + [ this.anchorEl, 'touchstart', '__mobileTouch', 'passive' ] + ]; + } + else { + evts = [ + [ this.anchorEl, 'click', 'hide', 'passive' ], + [ this.anchorEl, 'contextmenu', '__contextClick', 'notPassive' ] + ]; + } + } + else { + evts = [ + [ this.anchorEl, 'click', 'toggle', 'passive' ], + [ this.anchorEl, 'keyup', '__toggleKey', 'passive' ] + ]; + } + + addEvt(this, 'anchor', evts); + }, + + __setAnchorEl: function __setAnchorEl (el) { + this.anchorEl = el; + while (this.anchorEl.classList.contains('q-anchor--skip')) { + this.anchorEl = this.anchorEl.parentNode; + } + this.__configureAnchorEl(); + }, + + __pickAnchorEl: function __pickAnchorEl () { + if (this.target === false || this.target === '') { + this.anchorEl = void 0; + } + else if (this.target === true) { + this.__setAnchorEl(this.parentEl); + } + else { + var el = this.target; + + if (typeof this.target === 'string') { + try { + el = document.querySelector(this.target); + } + catch (err) { + el = void 0; + } + } + + if (el !== void 0 && el !== null) { + this.anchorEl = el._isVue === true && el.$el !== void 0 ? el.$el : el; + this.__configureAnchorEl(); + } + else { + this.anchorEl = void 0; + console.error(("Anchor: target \"" + (this.target) + "\" not found"), this); + } + } + }, + + __changeScrollEvent: function __changeScrollEvent (scrollTarget, fn) { + var fnProp = (fn !== void 0 ? 'add' : 'remove') + "EventListener"; + var fnHandler = fn !== void 0 ? fn : this.__scrollFn; + + if (scrollTarget !== window) { + scrollTarget[fnProp]('scroll', fnHandler, listenOpts.passive); + } + + window[fnProp]('scroll', fnHandler, listenOpts.passive); + + this.__scrollFn = fn; + } + }, + + created: function created () { + var this$1 = this; + + if ( + typeof this.__configureScrollTarget === 'function' && + typeof this.__unconfigureScrollTarget === 'function' + ) { + this.noParentEventWatcher = this.$watch('noParentEvent', function () { + if (this$1.__scrollTarget !== void 0) { + this$1.__unconfigureScrollTarget(); + this$1.__configureScrollTarget(); + } + }); + } + }, + + mounted: function mounted () { + this.parentEl = this.$el.parentNode; + this.__pickAnchorEl(); + + if (this.value === true && this.anchorEl === void 0) { + this.$emit('input', false); + } + }, + + beforeDestroy: function beforeDestroy () { + clearTimeout(this.touchTimer); + this.noParentEventWatcher !== void 0 && this.noParentEventWatcher(); + this.__anchorCleanup !== void 0 && this.__anchorCleanup(); + this.__unconfigureAnchorEl(); + } + }; + + var TimeoutMixin = { + methods: { + __nextTick: function __nextTick (fn) { + this.__tickFn = fn; + }, + + __prepareTick: function __prepareTick () { + var this$1 = this; + + if (this.__tickFn !== void 0) { + var fn = this.__tickFn; + this.$nextTick(function () { + if (this$1.__tickFn === fn) { + this$1.__tickFn(); + this$1.__tickFn = void 0; + } + }); + } + }, + + __clearTick: function __clearTick () { + this.__tickFn = void 0; + }, + + __setTimeout: function __setTimeout (fn, delay) { + clearTimeout(this.__timer); + this.__timer = setTimeout(fn, delay); + }, + + __clearTimeout: function __clearTimeout () { + clearTimeout(this.__timer); + } + }, + + beforeDestroy: function beforeDestroy () { + this.__tickFn = void 0; + clearTimeout(this.__timer); + } + }; + + var ModelToggleMixin = { + mixins: [ TimeoutMixin ], + + props: { + value: { + type: Boolean, + default: void 0 + } + }, + + data: function data () { + return { + showing: false + } + }, + + watch: { + value: function value (val) { + this.__processModelChange(val); + }, + + $route: function $route () { + this.hideOnRouteChange === true && this.showing === true && this.hide(); + } + }, + + methods: { + toggle: function toggle (evt) { + this[this.showing === true ? 'hide' : 'show'](evt); + }, + + show: function show (evt) { + var this$1 = this; + + if (this.disable === true || (this.__showCondition !== void 0 && this.__showCondition(evt) !== true)) { + return + } + + if (this.$listeners.input !== void 0 && isSSR === false) { + this.$emit('input', true); + this.payload = evt; + this.$nextTick(function () { + if (this$1.payload === evt) { + this$1.payload = void 0; + } + }); + } + if (this.value === void 0 || this.$listeners.input === void 0 || isSSR === true) { + this.__processShow(evt); + } + }, + + __processShow: function __processShow (evt) { + if (this.showing === true) { + return + } + + // need to call it before setting showing to true + // in order to not ruin the animation + this.__preparePortal !== void 0 && this.__preparePortal(); + + this.showing = true; + + this.$emit('before-show', evt); + + if (this.__show !== void 0) { + this.__clearTick(); + this.__show(evt); + this.__prepareTick(); + } + else { + this.$emit('show', evt); + } + }, + + hide: function hide (evt) { + var this$1 = this; + + if (this.disable === true) { + return + } + + if (this.$listeners.input !== void 0 && isSSR === false) { + this.$emit('input', false); + this.payload = evt; + this.$nextTick(function () { + if (this$1.payload === evt) { + this$1.payload = void 0; + } + }); + } + if (this.value === void 0 || this.$listeners.input === void 0 || isSSR === true) { + this.__processHide(evt); + } + }, + + __processHide: function __processHide (evt) { + if (this.showing === false) { + return + } + + this.showing = false; + + this.$emit('before-hide', evt); + + if (this.__hide !== void 0) { + this.__clearTick(); + this.__hide(evt); + this.__prepareTick(); + } + else { + this.$emit('hide', evt); + } + }, + + __processModelChange: function __processModelChange (val) { + if (this.disable === true && val === true) { + this.$listeners.input !== void 0 && this.$emit('input', false); + } + else if ((val === true) !== this.showing) { + this[("__process" + (val === true ? 'Show' : 'Hide'))](this.payload); + } + } + } + }; + + function closePortalMenus (vm, evt) { + do { + if (vm.$options.name === 'QMenu') { + vm.hide(evt); + + // is this a point of separation? + if (vm.separateClosePopup === true) { + return vm.$parent + } + } + else if (vm.__renderPortal !== void 0) { + // treat it as point of separation if parent is QPopupProxy + // (so mobile matches desktop behavior) + // and hide it too + if (vm.$parent !== void 0 && vm.$parent.$options.name === 'QPopupProxy') { + vm.hide(evt); + return vm.$parent + } + else { + return vm + } + } + vm = vm.$parent; + } while (vm !== void 0) + } + + function closePortals (vm, evt, depth) { + while (depth !== 0 && vm !== void 0) { + if (vm.__renderPortal !== void 0) { + depth--; + + if (vm.$options.name === 'QMenu') { + vm = closePortalMenus(vm, evt); + continue + } + + vm.hide(evt); + } + + vm = vm.$parent; + } + } + + var PortalMixin = { + inheritAttrs: false, + + props: { + contentClass: [Array, String, Object], + contentStyle: [Array, String, Object] + }, + + methods: { + __showPortal: function __showPortal () { + if (this.__portal !== void 0) { + document.body.appendChild(this.__portal.$el); + } + }, + + __hidePortal: function __hidePortal () { + if (this.__portal !== void 0) { + this.__portal.$destroy(); + this.__portal.$el.remove(); + this.__portal = void 0; + } + }, + + __preparePortal: function __preparePortal () { + var this$1 = this; + + if (this.__portal === void 0) { + this.__portal = new Vue({ + name: 'QPortal', + parent: this, + + inheritAttrs: false, + + render: function (h) { return this$1.__renderPortal(h); }, + + components: this.$options.components, + directives: this.$options.directives + }).$mount(); + } + } + }, + + render: function render () { + this.__portal !== void 0 && this.__portal.$forceUpdate(); + }, + + beforeDestroy: function beforeDestroy () { + this.__hidePortal(); + } + }; + + var TransitionMixin = { + props: { + transitionShow: { + type: String, + default: 'fade' + }, + + transitionHide: { + type: String, + default: 'fade' + } + }, + + data: function data () { + return { + transitionState: this.showing + } + }, + + watch: { + showing: function showing (val) { + var this$1 = this; + + this.transitionShow !== this.transitionHide && this.$nextTick(function () { + this$1.transitionState = val; + }); + } + }, + + computed: { + transition: function transition () { + return 'q-transition--' + (this.transitionState === true ? this.transitionHide : this.transitionShow) + } + } + }; + + function getAllChildren (vm, children) { + if ( children === void 0 ) children = []; + + vm.$children.forEach(function (child) { + children.push(child); + child.$children.length > 0 && getAllChildren(child, children); + }); + return children + } + + function getVmOfNode (el) { + for (var node = el; node !== null; node = node.parentNode) { + // node.__vue__ can be null if the instance was destroyed + if (node.__vue__ === null) { + return + } + if (node.__vue__ !== void 0) { + return node.__vue__ + } + } + } + + function isVmChildOf (childVm, parentVm) { + for (var vm = childVm; vm !== void 0; vm = vm.$parent) { + if (vm === parentVm) { + return true + } + } + return false + } + + function cache (vm, key, obj) { + if (isSSR === true) { return obj } + + var k = "__qcache_" + key; + return vm[k] === void 0 + ? (vm[k] = obj) + : vm[k] + } + + var timer; + + var notPassiveCapture = listenOpts.notPassiveCapture; + var passiveCapture$1 = listenOpts.passiveCapture; + var handlers = { + click: [], + focus: [] + }; + + function execHandlers (list, evt) { + for (var i = list.length - 1; i >= 0; i--) { + if (list[i](evt) === void 0) { + return + } + } + } + + function globalHandler (evt) { + clearTimeout(timer); + + // prevent autofocus on body resulting from blur + if (evt.type === 'focusin' && evt.target.hasAttribute('tabindex') === true) { + timer = setTimeout(function () { + execHandlers(handlers.focus, evt); + }, 200); + } + else { + execHandlers(handlers.click, evt); + } + } + + var ClickOutside = { + name: 'click-outside', + + bind: function bind (el, ref, vnode) { + var value = ref.value; + var arg = ref.arg; + + var vmEl = vnode.componentInstance || vnode.context; + + var ctx = { + trigger: value, + toggleEl: arg, + + handler: function handler (evt) { + var target = evt.target; + + if ( + target !== void 0 && + target.nodeType !== 8 && + // directives that prevent click by using pointer-events none generate click on html element + target !== document.documentElement && + target.classList.contains('no-pointer-events') === false && + ( + ctx.toggleEl === void 0 || + ctx.toggleEl.contains(target) === false + ) && + ( + target === document.body || + isVmChildOf(getVmOfNode(target), vmEl) === false + ) + ) { + // mark the event as beeing processed by clickOutside + // used to prevent refocus after menu close + evt.qClickOutside = true; + + return ctx.trigger(evt) + } + } + }; + + if (el.__qclickoutside) { + el.__qclickoutside_old = el.__qclickoutside; + } + + el.__qclickoutside = ctx; + + if (handlers.click.length === 0) { + document.addEventListener('mousedown', globalHandler, notPassiveCapture); + document.addEventListener('touchstart', globalHandler, notPassiveCapture); + document.addEventListener('focusin', globalHandler, passiveCapture$1); + } + + handlers.click.push(ctx.handler); + + ctx.timerFocusin = setTimeout(function () { + handlers.focus.push(ctx.handler); + }, 500); + }, + + update: function update (el, ref) { + var value = ref.value; + var oldValue = ref.oldValue; + var arg = ref.arg; + + var ctx = el.__qclickoutside; + + if (value !== oldValue) { + ctx.trigger = value; + } + if (arg !== ctx.arg) { + ctx.toggleEl = arg; + } + }, + + unbind: function unbind (el) { + var ctx = el.__qclickoutside_old || el.__qclickoutside; + if (ctx !== void 0) { + clearTimeout(ctx.timerFocusin); + + var + indexClick = handlers.click.findIndex(function (h) { return h === ctx.handler; }), + indexFocus = handlers.focus.findIndex(function (h) { return h === ctx.handler; }); + + indexClick > -1 && handlers.click.splice(indexClick, 1); + indexFocus > -1 && handlers.focus.splice(indexFocus, 1); + + if (handlers.click.length === 0) { + clearTimeout(timer); + document.removeEventListener('mousedown', globalHandler, notPassiveCapture); + document.removeEventListener('touchstart', globalHandler, notPassiveCapture); + document.removeEventListener('focusin', globalHandler, passiveCapture$1); + } + + delete el[el.__qclickoutside_old ? '__qclickoutside_old' : '__qclickoutside']; + } + } + }; + + var scrollTargets = isSSR === false + ? [ null, document, document.body, document.scrollingElement, document.documentElement ] + : []; + + function getScrollTarget (el, target) { + if (typeof target === 'string') { + try { + target = document.querySelector(target); + } + catch (err) { + target = void 0; + } + } + + if (target === void 0 || target === null) { + target = el.closest('.scroll,.scroll-y,.overflow-auto'); + } + else if (target._isVue === true && target.$el !== void 0) { + target = target.$el; + } + + return scrollTargets.includes(target) + ? window + : target + } + + function getScrollHeight (el) { + return (el === window ? document.body : el).scrollHeight + } + + function getScrollWidth (el) { + return (el === window ? document.body : el).scrollWidth + } + + function getScrollPosition (scrollTarget) { + if (scrollTarget === window) { + return window.pageYOffset || window.scrollY || document.body.scrollTop || 0 + } + return scrollTarget.scrollTop + } + + function getHorizontalScrollPosition (scrollTarget) { + if (scrollTarget === window) { + return window.pageXOffset || window.scrollX || document.body.scrollLeft || 0 + } + return scrollTarget.scrollLeft + } + + function animScrollTo (el, to, duration) { + if ( duration === void 0 ) duration = 0; + + var pos = getScrollPosition(el); + + if (duration <= 0) { + if (pos !== to) { + setScroll(el, to); + } + return + } + + requestAnimationFrame(function () { + var newPos = pos + (to - pos) / Math.max(16, duration) * 16; + setScroll(el, newPos); + if (newPos !== to) { + animScrollTo(el, to, duration - 16); + } + }); + } + + function animHorizontalScrollTo (el, to, duration) { + if ( duration === void 0 ) duration = 0; + + var pos = getHorizontalScrollPosition(el); + + if (duration <= 0) { + if (pos !== to) { + setHorizontalScroll(el, to); + } + return + } + + requestAnimationFrame(function () { + var newPos = pos + (to - pos) / Math.max(16, duration) * 16; + setHorizontalScroll(el, newPos); + if (newPos !== to) { + animHorizontalScrollTo(el, to, duration - 16); + } + }); + } + + function setScroll (scrollTarget, offset) { + if (scrollTarget === window) { + window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, offset); + return + } + scrollTarget.scrollTop = offset; + } + + function setHorizontalScroll (scrollTarget, offset) { + if (scrollTarget === window) { + window.scrollTo(offset, window.pageYOffset || window.scrollY || document.body.scrollTop || 0); + return + } + scrollTarget.scrollLeft = offset; + } + + function setScrollPosition (scrollTarget, offset, duration) { + if (duration) { + animScrollTo(scrollTarget, offset, duration); + return + } + setScroll(scrollTarget, offset); + } + + function setHorizontalScrollPosition (scrollTarget, offset, duration) { + if (duration) { + animHorizontalScrollTo(scrollTarget, offset, duration); + return + } + setHorizontalScroll(scrollTarget, offset); + } + + var size; + function getScrollbarWidth () { + if (size !== undefined) { + return size + } + + var + inner = document.createElement('p'), + outer = document.createElement('div'); + + css(inner, { + width: '100%', + height: '200px' + }); + css(outer, { + position: 'absolute', + top: '0px', + left: '0px', + visibility: 'hidden', + width: '200px', + height: '150px', + overflow: 'hidden' + }); + + outer.appendChild(inner); + + document.body.appendChild(outer); + + var w1 = inner.offsetWidth; + outer.style.overflow = 'scroll'; + var w2 = inner.offsetWidth; + + if (w1 === w2) { + w2 = outer.clientWidth; + } + + outer.remove(); + size = w1 - w2; + + return size + } + + function hasScrollbar (el, onY) { + if ( onY === void 0 ) onY = true; + + if (!el || el.nodeType !== Node.ELEMENT_NODE) { + return false + } + + return onY + ? ( + el.scrollHeight > el.clientHeight && ( + el.classList.contains('scroll') || + el.classList.contains('overflow-auto') || + ['auto', 'scroll'].includes(window.getComputedStyle(el)['overflow-y']) + ) + ) + : ( + el.scrollWidth > el.clientWidth && ( + el.classList.contains('scroll') || + el.classList.contains('overflow-auto') || + ['auto', 'scroll'].includes(window.getComputedStyle(el)['overflow-x']) + ) + ) + } + + var scroll = { + getScrollTarget: getScrollTarget, + + getScrollHeight: getScrollHeight, + getScrollWidth: getScrollWidth, + + getScrollPosition: getScrollPosition, + getHorizontalScrollPosition: getHorizontalScrollPosition, + + animScrollTo: animScrollTo, + animHorizontalScrollTo: animHorizontalScrollTo, + + setScrollPosition: setScrollPosition, + setHorizontalScrollPosition: setHorizontalScrollPosition, + + getScrollbarWidth: getScrollbarWidth, + hasScrollbar: hasScrollbar + }; + + var handlers$1 = []; + + var EscapeKey = { + __install: function __install () { + this.__installed = true; + window.addEventListener('keyup', function (evt) { + if (handlers$1.length !== 0 && isKeyCode(evt, 27) === true) { + handlers$1[handlers$1.length - 1].fn(evt); + } + }); + }, + + register: function register (comp, fn) { + if (comp.$q.platform.is.desktop === true) { + this.__installed !== true && this.__install(); + handlers$1.push({ comp: comp, fn: fn }); + } + }, + + pop: function pop (comp) { + if (comp.$q.platform.is.desktop === true) { + var index = handlers$1.findIndex(function (h) { return h.comp === comp; }); + if (index > -1) { + handlers$1.splice(index, 1); + } + } + } + }; + + var vpLeft, vpTop; + + function validatePosition (pos) { + var parts = pos.split(' '); + if (parts.length !== 2) { + return false + } + if (!['top', 'center', 'bottom'].includes(parts[0])) { + console.error('Anchor/Self position must start with one of top/center/bottom'); + return false + } + if (!['left', 'middle', 'right'].includes(parts[1])) { + console.error('Anchor/Self position must end with one of left/middle/right'); + return false + } + return true + } + + function validateOffset (val) { + if (!val) { return true } + if (val.length !== 2) { return false } + if (typeof val[0] !== 'number' || typeof val[1] !== 'number') { + return false + } + return true + } + + function parsePosition (pos) { + var parts = pos.split(' '); + return { vertical: parts[0], horizontal: parts[1] } + } + + function getAnchorProps (el, offset) { + var ref = el.getBoundingClientRect(); + var top = ref.top; + var left = ref.left; + var right = ref.right; + var bottom = ref.bottom; + var width = ref.width; + var height = ref.height; + + if (offset !== void 0) { + top -= offset[1]; + left -= offset[0]; + bottom += offset[1]; + right += offset[0]; + + width += offset[0]; + height += offset[1]; + } + + return { + top: top, + left: left, + right: right, + bottom: bottom, + width: width, + height: height, + middle: left + (right - left) / 2, + center: top + (bottom - top) / 2 + } + } + + function getTargetProps (el) { + return { + top: 0, + center: el.offsetHeight / 2, + bottom: el.offsetHeight, + left: 0, + middle: el.offsetWidth / 2, + right: el.offsetWidth + } + } + + // cfg: { el, anchorEl, anchorOrigin, selfOrigin, offset, absoluteOffset, cover, fit, maxHeight, maxWidth } + function setPosition (cfg) { + if (client.is.ios === true && window.visualViewport !== void 0) { + // uses the q-position-engine CSS class + + var el = document.body.style; + var ref = window.visualViewport; + var left = ref.offsetLeft; + var top = ref.offsetTop; + + if (left !== vpLeft) { + el.setProperty('--q-pe-left', left + 'px'); + vpLeft = left; + } + if (top !== vpTop) { + el.setProperty('--q-pe-top', top + 'px'); + vpTop = top; + } + } + + var anchorProps; + + // scroll position might change + // if max-height/-width changes, so we + // need to restore it after we calculate + // the new positioning + var ref$1 = cfg.el; + var scrollLeft = ref$1.scrollLeft; + var scrollTop = ref$1.scrollTop; + + if (cfg.absoluteOffset === void 0) { + anchorProps = getAnchorProps(cfg.anchorEl, cfg.cover === true ? [0, 0] : cfg.offset); + } + else { + var ref$2 = cfg.anchorEl.getBoundingClientRect(); + var anchorTop = ref$2.top; + var anchorLeft = ref$2.left; + var top$1 = anchorTop + cfg.absoluteOffset.top, + left$1 = anchorLeft + cfg.absoluteOffset.left; + + anchorProps = { top: top$1, left: left$1, width: 1, height: 1, right: left$1 + 1, center: top$1, middle: left$1, bottom: top$1 + 1 }; + } + + var elStyle = { + maxHeight: cfg.maxHeight, + maxWidth: cfg.maxWidth, + visibility: 'visible' + }; + + if (cfg.fit === true || cfg.cover === true) { + elStyle.minWidth = anchorProps.width + 'px'; + if (cfg.cover === true) { + elStyle.minHeight = anchorProps.height + 'px'; + } + } + + Object.assign(cfg.el.style, elStyle); + + var + targetProps = getTargetProps(cfg.el), + props = { + top: anchorProps[cfg.anchorOrigin.vertical] - targetProps[cfg.selfOrigin.vertical], + left: anchorProps[cfg.anchorOrigin.horizontal] - targetProps[cfg.selfOrigin.horizontal] + }; + + applyBoundaries(props, anchorProps, targetProps, cfg.anchorOrigin, cfg.selfOrigin); + + elStyle = { + top: Math.floor(props.top) + 'px', + left: Math.floor(props.left) + 'px' + }; + + if (props.maxHeight !== void 0) { + elStyle.maxHeight = Math.floor(props.maxHeight) + 'px'; + + if (anchorProps.height > props.maxHeight) { + elStyle.minHeight = elStyle.maxHeight; + } + } + if (props.maxWidth !== void 0) { + elStyle.maxWidth = Math.floor(props.maxWidth) + 'px'; + + if (anchorProps.width > props.maxWidth) { + elStyle.minWidth = elStyle.maxWidth; + } + } + + Object.assign(cfg.el.style, elStyle); + + // restore scroll position + if (cfg.el.scrollTop !== scrollTop) { + cfg.el.scrollTop = scrollTop; + } + if (cfg.el.scrollLeft !== scrollLeft) { + cfg.el.scrollLeft = scrollLeft; + } + } + + function applyBoundaries (props, anchorProps, targetProps, anchorOrigin, selfOrigin) { + var + currentHeight = targetProps.bottom, + currentWidth = targetProps.right, + margin = getScrollbarWidth(), + innerHeight = window.innerHeight - margin, + innerWidth = document.body.clientWidth; + + if (props.top < 0 || props.top + currentHeight > innerHeight) { + if (selfOrigin.vertical === 'center') { + props.top = anchorProps[anchorOrigin.vertical] > innerHeight / 2 + ? Math.max(0, innerHeight - currentHeight) + : 0; + props.maxHeight = Math.min(currentHeight, innerHeight); + } + else if (anchorProps[anchorOrigin.vertical] > innerHeight / 2) { + var anchorY = Math.min( + innerHeight, + anchorOrigin.vertical === 'center' + ? anchorProps.center + : (anchorOrigin.vertical === selfOrigin.vertical ? anchorProps.bottom : anchorProps.top) + ); + props.maxHeight = Math.min(currentHeight, anchorY); + props.top = Math.max(0, anchorY - currentHeight); + } + else { + props.top = Math.max(0, anchorOrigin.vertical === 'center' + ? anchorProps.center + : (anchorOrigin.vertical === selfOrigin.vertical ? anchorProps.top : anchorProps.bottom) + ); + props.maxHeight = Math.min(currentHeight, innerHeight - props.top); + } + } + + if (props.left < 0 || props.left + currentWidth > innerWidth) { + props.maxWidth = Math.min(currentWidth, innerWidth); + if (selfOrigin.horizontal === 'middle') { + props.left = anchorProps[anchorOrigin.horizontal] > innerWidth / 2 + ? Math.max(0, innerWidth - currentWidth) + : 0; + } + else if (anchorProps[anchorOrigin.horizontal] > innerWidth / 2) { + var anchorX = Math.min( + innerWidth, + anchorOrigin.horizontal === 'middle' + ? anchorProps.middle + : (anchorOrigin.horizontal === selfOrigin.horizontal ? anchorProps.right : anchorProps.left) + ); + props.maxWidth = Math.min(currentWidth, anchorX); + props.left = Math.max(0, anchorX - props.maxWidth); + } + else { + props.left = Math.max(0, anchorOrigin.horizontal === 'middle' + ? anchorProps.middle + : (anchorOrigin.horizontal === selfOrigin.horizontal ? anchorProps.left : anchorProps.right) + ); + props.maxWidth = Math.min(currentWidth, innerWidth - props.left); + } + } + } + + var QMenu = Vue.extend({ + name: 'QMenu', + + mixins: [ DarkMixin, AnchorMixin, ModelToggleMixin, PortalMixin, TransitionMixin ], + + directives: { + ClickOutside: ClickOutside + }, + + props: { + persistent: Boolean, + autoClose: Boolean, + separateClosePopup: Boolean, + + noRefocus: Boolean, + noFocus: Boolean, + + fit: Boolean, + cover: Boolean, + + square: Boolean, + + anchor: { + type: String, + validator: validatePosition + }, + self: { + type: String, + validator: validatePosition + }, + offset: { + type: Array, + validator: validateOffset + }, + + scrollTarget: { + default: void 0 + }, + + touchPosition: Boolean, + + maxHeight: { + type: String, + default: null + }, + maxWidth: { + type: String, + default: null + } + }, + + computed: { + horizSide: function horizSide () { + return this.$q.lang.rtl === true ? 'right' : 'left' + }, + + anchorOrigin: function anchorOrigin () { + return parsePosition( + this.anchor || ( + this.cover === true ? "center middle" : ("bottom " + (this.horizSide)) + ) + ) + }, + + selfOrigin: function selfOrigin () { + return this.cover === true + ? this.anchorOrigin + : parsePosition(this.self || ("top " + (this.horizSide))) + }, + + menuClass: function menuClass () { + return (this.square === true ? ' q-menu--square' : '') + + (this.isDark === true ? ' q-menu--dark q-dark' : '') + }, + + hideOnRouteChange: function hideOnRouteChange () { + return this.persistent !== true + } + }, + + methods: { + focus: function focus () { + var node = this.__portal !== void 0 && this.__portal.$refs !== void 0 + ? this.__portal.$refs.inner + : void 0; + + if (node !== void 0 && node.contains(document.activeElement) !== true) { + node = node.querySelector('[autofocus], [data-autofocus]') || node; + node.focus(); + } + }, + + __show: function __show (evt) { + var this$1 = this; + + // IE can have null document.activeElement + this.__refocusTarget = this.noRefocus === false && document.activeElement !== null + ? document.activeElement + : void 0; + + EscapeKey.register(this, function () { + if (this$1.persistent !== true) { + this$1.$emit('escape-key'); + this$1.hide(); + } + }); + + this.__showPortal(); + this.__configureScrollTarget(); + + this.absoluteOffset = void 0; + + if (evt !== void 0 && (this.touchPosition || this.contextMenu)) { + var pos = position(evt); + + if (pos.left !== void 0) { + var ref = this.anchorEl.getBoundingClientRect(); + var top = ref.top; + var left = ref.left; + this.absoluteOffset = { left: pos.left - left, top: pos.top - top }; + } + } + + if (this.unwatch === void 0) { + this.unwatch = this.$watch(function () { return this$1.$q.screen.width + '|' + this$1.$q.screen.height; }, this.updatePosition); + } + + this.$el.dispatchEvent(create('popup-show', { bubbles: true })); + + // IE can have null document.activeElement + if (this.noFocus !== true && document.activeElement !== null) { + document.activeElement.blur(); + } + + this.__nextTick(function () { + this$1.updatePosition(); + this$1.noFocus !== true && this$1.focus(); + }); + + this.__setTimeout(function () { + // required in order to avoid the "double-tap needed" issue + if (this$1.$q.platform.is.ios === true) { + // if auto-close, then this click should + // not close the menu + this$1.__avoidAutoClose = this$1.autoClose; + this$1.__portal.$el.click(); + } + + this$1.updatePosition(); + this$1.$emit('show', evt); + }, 300); + }, + + __hide: function __hide (evt) { + var this$1 = this; + + this.__anchorCleanup(true); + + // check null for IE + if ( + this.__refocusTarget !== void 0 && + this.__refocusTarget !== null && + ( + // menu was hidden from code or ESC plugin + evt === void 0 || + // menu was not closed from a mouse or touch clickOutside + evt.qClickOutside !== true + ) + ) { + this.__refocusTarget.focus(); + } + + this.$el.dispatchEvent(create('popup-hide', { bubbles: true })); + + this.__setTimeout(function () { + this$1.__hidePortal(); + this$1.$emit('hide', evt); + }, 300); + }, + + __anchorCleanup: function __anchorCleanup (hiding) { + this.absoluteOffset = void 0; + + if (this.unwatch !== void 0) { + this.unwatch(); + this.unwatch = void 0; + } + + if (hiding === true || this.showing === true) { + EscapeKey.pop(this); + this.__unconfigureScrollTarget(); + } + }, + + __unconfigureScrollTarget: function __unconfigureScrollTarget () { + if (this.__scrollTarget !== void 0) { + this.__changeScrollEvent(this.__scrollTarget); + this.__scrollTarget = void 0; + } + }, + + __configureScrollTarget: function __configureScrollTarget () { + if (this.anchorEl !== void 0 || this.scrollTarget !== void 0) { + this.__scrollTarget = getScrollTarget(this.anchorEl, this.scrollTarget); + this.__changeScrollEvent(this.__scrollTarget, this.updatePosition); + } + }, + + __onAutoClose: function __onAutoClose (e) { + // if auto-close, then the ios double-tap fix which + // issues a click should not close the menu + if (this.__avoidAutoClose !== true) { + closePortalMenus(this, e); + this.$listeners.click !== void 0 && this.$emit('click', e); + } + else { + this.__avoidAutoClose = false; + } + }, + + updatePosition: function updatePosition () { + if (this.anchorEl === void 0 || this.__portal === void 0) { + return + } + + var el = this.__portal.$el; + + if (el.nodeType === 8) { // IE replaces the comment with delay + setTimeout(this.updatePosition, 25); + return + } + + setPosition({ + el: el, + offset: this.offset, + anchorEl: this.anchorEl, + anchorOrigin: this.anchorOrigin, + selfOrigin: this.selfOrigin, + absoluteOffset: this.absoluteOffset, + fit: this.fit, + cover: this.cover, + maxHeight: this.maxHeight, + maxWidth: this.maxWidth + }); + }, + + __onClickOutside: function __onClickOutside (e) { + if (this.persistent !== true && this.showing === true) { + var targetClassList = e.target.classList; + + this.hide(e); + if ( + // always prevent touch event + e.type === 'touchstart' || + // prevent click if it's on a dialog backdrop + targetClassList.contains('q-dialog__backdrop') + ) { + stopAndPrevent(e); + } + return true + } + }, + + __renderPortal: function __renderPortal (h) { + var on = Object.assign({}, this.$listeners, + // stop propagating these events from children + {input: stop, + 'popup-show': stop, + 'popup-hide': stop}); + + if (this.autoClose === true) { + on.click = this.__onAutoClose; + } + + return h('transition', { + props: { name: this.transition } + }, [ + this.showing === true ? h('div', { + ref: 'inner', + staticClass: 'q-menu q-position-engine scroll' + this.menuClass, + class: this.contentClass, + style: this.contentStyle, + attrs: Object.assign({}, {tabindex: -1}, + this.$attrs), + on: on, + directives: [{ + name: 'click-outside', + value: this.__onClickOutside, + arg: this.anchorEl + }] + }, slot(this, 'default')) : null + ]) + } + }, + + mounted: function mounted () { + this.__processModelChange(this.value); + }, + + beforeDestroy: function beforeDestroy () { + // When the menu is destroyed while open we can only emit the event on anchorEl + if (this.showing === true && this.anchorEl !== void 0) { + this.anchorEl.dispatchEvent( + create('popup-hide', { bubbles: true }) + ); + } + } + }); + + var QBtnDropdown = Vue.extend({ + name: 'QBtnDropdown', + + mixins: [ BtnMixin ], + + props: { + value: Boolean, + split: Boolean, + dropdownIcon: String, + + contentClass: [Array, String, Object], + contentStyle: [Array, String, Object], + + cover: Boolean, + persistent: Boolean, + autoClose: Boolean, + + menuAnchor: { + type: String, + default: 'bottom right' + }, + menuSelf: { + type: String, + default: 'top right' + }, + menuOffset: Array, + + disableMainBtn: Boolean, + disableDropdown: Boolean + }, + + data: function data () { + return { + showing: this.value + } + }, + + watch: { + value: function value (val) { + this.$refs.menu !== void 0 && this.$refs.menu[val ? 'show' : 'hide'](); + } + }, + + render: function render (h) { + var this$1 = this; + + var label = slot(this, 'label', []); + var attrs = { 'aria-expanded': this.showing === true ? 'true' : 'false', 'aria-haspopup': true }; + + var Arrow = [ + h(QIcon, { + props: { + name: this.dropdownIcon || this.$q.iconSet.arrow.dropdown + }, + staticClass: 'q-btn-dropdown__arrow', + class: { + 'rotate-180': this.showing, + 'q-btn-dropdown__arrow-container': this.split === false + } + }) + ]; + + this.disableDropdown !== true && Arrow.push( + h(QMenu, { + ref: 'menu', + props: { + cover: this.cover, + fit: true, + persistent: this.persistent, + autoClose: this.autoClose, + anchor: this.menuAnchor, + self: this.menuSelf, + offset: this.menuOffset, + contentClass: this.contentClass, + contentStyle: this.contentStyle, + separateClosePopup: true + }, + on: cache(this, 'menu', { + 'before-show': function (e) { + this$1.showing = true; + this$1.$emit('before-show', e); + }, + show: function (e) { + this$1.$emit('show', e); + this$1.$emit('input', true); + }, + 'before-hide': function (e) { + this$1.showing = false; + this$1.$emit('before-hide', e); + }, + hide: function (e) { + this$1.$emit('hide', e); + this$1.$emit('input', false); + } + }) + }, slot(this, 'default')) + ); + + if (this.split === false) { + return h(QBtn, { + class: 'q-btn-dropdown q-btn-dropdown--simple', + props: Object.assign({}, this.$props, + {disable: this.disable === true || this.disableMainBtn === true, + noWrap: true, + round: false}), + attrs: attrs, + on: cache(this, 'nonSpl', { + click: function (e) { + this$1.$emit('click', e); + } + }) + }, label.concat(Arrow)) + } + + var Btn = h(QBtn, { + class: 'q-btn-dropdown--current', + props: Object.assign({}, this.$props, + {disable: this.disable === true || this.disableMainBtn === true, + noWrap: true, + iconRight: this.iconRight, + round: false}), + on: cache(this, 'spl', { + click: function (e) { + this$1.hide(); + this$1.$emit('click', e); + } + }) + }, label); + + return h(QBtnGroup, { + props: { + outline: this.outline, + flat: this.flat, + rounded: this.rounded, + push: this.push, + unelevated: this.unelevated, + glossy: this.glossy, + stretch: this.stretch + }, + staticClass: 'q-btn-dropdown q-btn-dropdown--split no-wrap q-btn-item' + }, [ + Btn, + + h(QBtn, { + staticClass: 'q-btn-dropdown__arrow-container', + attrs: attrs, + props: { + disable: this.disable === true || this.disableDropdown === true, + outline: this.outline, + flat: this.flat, + rounded: this.rounded, + push: this.push, + size: this.size, + color: this.color, + textColor: this.textColor, + dense: this.dense, + ripple: this.ripple + } + }, Arrow) + ]) + }, + + methods: { + toggle: function toggle (evt) { + this.$refs.menu && this.$refs.menu.toggle(evt); + }, + + show: function show (evt) { + this.$refs.menu && this.$refs.menu.show(evt); + }, + + hide: function hide (evt) { + this.$refs.menu && this.$refs.menu.hide(evt); + } + }, + + mounted: function mounted () { + this.value === true && this.show(); + } + }); + + var FormMixin = { + props: { + name: String + }, + + computed: { + formAttrs: function formAttrs () { + return { + type: 'hidden', + name: this.name, + value: this.value + } + } + }, + + methods: { + __injectFormInput: function __injectFormInput (child, action, className) { + child[action]( + this.$createElement('input', { + staticClass: 'hidden', + class: className, + attrs: this.formAttrs, + domProps: this.formDomProps + }) + ); + } + } + }; + + var FormFieldMixin = { + props: { + name: String + }, + + computed: { + nameProp: function nameProp () { + return this.name || this.for + } + } + }; + + var QBtnToggle = Vue.extend({ + name: 'QBtnToggle', + + mixins: [ RippleMixin, FormMixin ], + + props: { + value: { + required: true + }, + + options: { + type: Array, + required: true, + validator: function (v) { return v.every( + function (opt) { return ('label' in opt || 'icon' in opt || 'slot' in opt) && 'value' in opt; } + ); } + }, + + // To avoid seeing the active raise shadow through the transparent button, give it a color (even white). + color: String, + textColor: String, + toggleColor: { + type: String, + default: 'primary' + }, + toggleTextColor: String, + + outline: Boolean, + flat: Boolean, + unelevated: Boolean, + rounded: Boolean, + push: Boolean, + glossy: Boolean, + + size: String, + + noCaps: Boolean, + noWrap: Boolean, + dense: Boolean, + readonly: Boolean, + disable: Boolean, + + stack: Boolean, + stretch: Boolean, + + spread: Boolean, + + clearable: Boolean + }, + + computed: { + hasActiveValue: function hasActiveValue () { + var this$1 = this; + + return this.options.find(function (opt) { return opt.value === this$1.value; }) !== void 0 + }, + + formAttrs: function formAttrs () { + return { + type: 'hidden', + name: this.name, + value: this.value + } + } + }, + + methods: { + __set: function __set (value, opt) { + if (this.readonly !== true) { + if (this.value === value) { + if (this.clearable === true) { + this.$emit('input', null, null); + this.$emit('clear'); + } + } + else { + this.$emit('input', value, opt); + } + } + } + }, + + render: function render (h) { + var this$1 = this; + + var child = this.options.map(function (opt, i) { + return h(QBtn, { + key: i, + on: { click: function () { return this$1.__set(opt.value, opt); } }, + props: { + disable: this$1.disable || opt.disable, + label: opt.label, + // Colors come from the button specific options first, then from general props + color: opt.value === this$1.value ? opt.toggleColor || this$1.toggleColor : opt.color || this$1.color, + textColor: opt.value === this$1.value ? opt.toggleTextColor || this$1.toggleTextColor : opt.textColor || this$1.textColor, + icon: opt.icon, + iconRight: opt.iconRight, + noCaps: this$1.noCaps === true || opt.noCaps === true, + noWrap: this$1.noWrap === true || opt.noWrap === true, + outline: this$1.outline, + flat: this$1.flat, + rounded: this$1.rounded, + push: this$1.push, + unelevated: this$1.unelevated, + size: this$1.size, + dense: this$1.dense, + ripple: this$1.ripple !== void 0 ? this$1.ripple : opt.ripple, + stack: this$1.stack === true || opt.stack === true, + tabindex: opt.tabindex, + stretch: this$1.stretch + } + }, opt.slot !== void 0 ? slot(this$1, opt.slot) : void 0) + }); + + if (this.name !== void 0 && this.disable !== true && this.hasActiveValue === true) { + this.__injectFormInput(child, 'push'); + } + + return h(QBtnGroup, { + staticClass: 'q-btn-toggle', + props: { + outline: this.outline, + flat: this.flat, + rounded: this.rounded, + push: this.push, + stretch: this.stretch, + unelevated: this.unelevated, + glossy: this.glossy, + spread: this.spread + }, + on: this.$listeners + }, child) + } + }); + + var QCard = Vue.extend({ + name: 'QCard', + + mixins: [ DarkMixin, TagMixin ], + + props: { + square: Boolean, + flat: Boolean, + bordered: Boolean + }, + + computed: { + classes: function classes () { + return 'q-card' + + (this.isDark === true ? ' q-card--dark q-dark' : '') + + (this.bordered === true ? ' q-card--bordered' : '') + + (this.square === true ? ' q-card--square no-border-radius' : '') + + (this.flat === true ? ' q-card--flat no-shadow' : '') + } + }, + + render: function render (h) { + return h(this.tag, { + class: this.classes, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + var QCardSection = Vue.extend({ + name: 'QCardSection', + + mixins: [ TagMixin ], + + props: { + horizontal: Boolean + }, + + computed: { + classes: function classes () { + return 'q-card__section ' + + "q-card__section--" + (this.horizontal === true ? 'horiz row no-wrap' : 'vert') + } + }, + + render: function render (h) { + return h(this.tag, { + class: this.classes, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + var QCardActions = Vue.extend({ + name: 'QCardActions', + + mixins: [ AlignMixin ], + + props: { + vertical: Boolean + }, + + computed: { + classes: function classes () { + return ("q-card__actions--" + (this.vertical === true ? 'vert column' : 'horiz row') + " " + (this.alignClass)) + } + }, + + render: function render (h) { + return h('div', { + staticClass: 'q-card__actions', + class: this.classes, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + function parseArg (arg) { + // delta (min velocity -- dist / time) + // mobile min distance on first move + // desktop min distance until deciding if it's a swipe or not + var data = [0.06, 6, 50]; + + if (typeof arg === 'string' && arg.length) { + arg.split(':').forEach(function (val, index) { + var v = parseFloat(val); + v && (data[index] = v); + }); + } + + return data + } + + var TouchSwipe = { + name: 'touch-swipe', + + bind: function bind (el, ref) { + var value = ref.value; + var arg = ref.arg; + var modifiers = ref.modifiers; + + // early return, we don't need to do anything + if (modifiers.mouse !== true && client.has.touch !== true) { + return + } + + var mouseCapture = modifiers.mouseCapture === true ? 'Capture' : ''; + + var ctx = { + handler: value, + sensitivity: parseArg(arg), + + modifiers: modifiers, + direction: getModifierDirections(modifiers), + + noop: noop, + + mouseStart: function mouseStart (evt) { + if (shouldStart(evt, ctx) && leftClick(evt)) { + addEvt(ctx, 'temp', [ + [ document, 'mousemove', 'move', ("notPassive" + mouseCapture) ], + [ document, 'mouseup', 'end', 'notPassiveCapture' ] + ]); + ctx.start(evt, true); + } + }, + + touchStart: function touchStart (evt) { + if (shouldStart(evt, ctx)) { + var target = getTouchTarget(evt.target); + addEvt(ctx, 'temp', [ + [ target, 'touchmove', 'move', 'notPassiveCapture' ], + [ target, 'touchcancel', 'end', 'notPassiveCapture' ], + [ target, 'touchend', 'end', 'notPassiveCapture' ] + ]); + ctx.start(evt); + } + }, + + start: function start (evt, mouseEvent) { + client.is.firefox === true && preventDraggable(el, true); + + var pos = position(evt); + + ctx.event = { + x: pos.left, + y: pos.top, + time: Date.now(), + mouse: mouseEvent === true, + dir: false + }; + }, + + move: function move (evt) { + if (ctx.event === void 0) { + return + } + + if (ctx.event.dir !== false) { + stopAndPrevent(evt); + return + } + + var time = Date.now() - ctx.event.time; + + if (time === 0) { + return + } + + var + pos = position(evt), + distX = pos.left - ctx.event.x, + absX = Math.abs(distX), + distY = pos.top - ctx.event.y, + absY = Math.abs(distY); + + if (ctx.event.mouse !== true) { + if (absX < ctx.sensitivity[1] && absY < ctx.sensitivity[1]) { + ctx.end(evt); + return + } + } + else if (absX < ctx.sensitivity[2] && absY < ctx.sensitivity[2]) { + return + } + + var + velX = absX / time, + velY = absY / time; + + if ( + ctx.direction.vertical === true && + absX < absY && + absX < 100 && + velY > ctx.sensitivity[0] + ) { + ctx.event.dir = distY < 0 ? 'up' : 'down'; + } + + if ( + ctx.direction.horizontal === true && + absX > absY && + absY < 100 && + velX > ctx.sensitivity[0] + ) { + ctx.event.dir = distX < 0 ? 'left' : 'right'; + } + + if ( + ctx.direction.up === true && + absX < absY && + distY < 0 && + absX < 100 && + velY > ctx.sensitivity[0] + ) { + ctx.event.dir = 'up'; + } + + if ( + ctx.direction.down === true && + absX < absY && + distY > 0 && + absX < 100 && + velY > ctx.sensitivity[0] + ) { + ctx.event.dir = 'down'; + } + + if ( + ctx.direction.left === true && + absX > absY && + distX < 0 && + absY < 100 && + velX > ctx.sensitivity[0] + ) { + ctx.event.dir = 'left'; + } + + if ( + ctx.direction.right === true && + absX > absY && + distX > 0 && + absY < 100 && + velX > ctx.sensitivity[0] + ) { + ctx.event.dir = 'right'; + } + + if (ctx.event.dir !== false) { + stopAndPrevent(evt); + + if (ctx.event.mouse === true) { + document.body.classList.add('no-pointer-events'); + document.body.classList.add('non-selectable'); + clearSelection(); + + ctx.styleCleanup = function (withDelay) { + ctx.styleCleanup = void 0; + + document.body.classList.remove('non-selectable'); + + var remove = function () { + document.body.classList.remove('no-pointer-events'); + }; + + if (withDelay === true) { setTimeout(remove, 50); } + else { remove(); } + }; + } + + ctx.handler({ + evt: evt, + touch: ctx.event.mouse !== true, + mouse: ctx.event.mouse, + direction: ctx.event.dir, + duration: time, + distance: { + x: absX, + y: absY + } + }); + } + else { + ctx.end(evt); + } + }, + + end: function end (evt) { + if (ctx.event === void 0) { + return + } + + cleanEvt(ctx, 'temp'); + client.is.firefox === true && preventDraggable(el, false); + ctx.styleCleanup !== void 0 && ctx.styleCleanup(true); + evt !== void 0 && ctx.event.dir !== false && stopAndPrevent(evt); + + ctx.event = void 0; + } + }; + + if (el.__qtouchswipe) { + el.__qtouchswipe_old = el.__qtouchswipe; + } + + el.__qtouchswipe = ctx; + + modifiers.mouse === true && addEvt(ctx, 'main', [ + [ el, 'mousedown', 'mouseStart', ("passive" + mouseCapture) ] + ]); + + client.has.touch === true && addEvt(ctx, 'main', [ + [ el, 'touchstart', 'touchStart', ("passive" + (modifiers.capture === true ? 'Capture' : '')) ], + [ el, 'touchmove', 'noop', "notPassiveCapture" ] + ]); + }, + + update: function update (el, binding) { + el.__qtouchswipe !== void 0 && updateModifiers(el.__qtouchswipe, binding); + }, + + unbind: function unbind (el) { + var ctx = el.__qtouchswipe_old || el.__qtouchswipe; + + if (ctx !== void 0) { + cleanEvt(ctx, 'main'); + cleanEvt(ctx, 'temp'); + + client.is.firefox === true && preventDraggable(el, false); + ctx.styleCleanup !== void 0 && ctx.styleCleanup(); + + delete el[el.__qtouchswipe_old ? '__qtouchswipe_old' : '__qtouchswipe']; + } + } + }; + + var PanelWrapper = Vue.extend({ + name: 'QTabPanelWrapper', + + render: function render (h) { + return h('div', { + staticClass: 'q-panel scroll', + attrs: { role: 'tabpanel' }, + // stop propagation of content emitted @input + // which would tamper with Panel's model + on: cache(this, 'stop', { input: stop }) + }, slot(this, 'default')) + } + }); + + var PanelParentMixin = { + directives: { + TouchSwipe: TouchSwipe + }, + + props: { + value: { + required: true + }, + + animated: Boolean, + infinite: Boolean, + swipeable: Boolean, + vertical: Boolean, + + transitionPrev: String, + transitionNext: String, + + keepAlive: Boolean + }, + + data: function data () { + return { + panelIndex: null, + panelTransition: null + } + }, + + computed: { + panelDirectives: function panelDirectives () { + if (this.swipeable === true) { + return [{ + name: 'touch-swipe', + value: this.__swipe, + modifiers: { + horizontal: this.vertical !== true, + vertical: this.vertical, + mouse: true + } + }] + } + }, + + contentKey: function contentKey () { + return typeof this.value === 'string' || typeof this.value === 'number' + ? this.value + : String(this.value) + }, + + transitionPrevComputed: function transitionPrevComputed () { + return this.transitionPrev || ("slide-" + (this.vertical === true ? 'down' : 'right')) + }, + + transitionNextComputed: function transitionNextComputed () { + return this.transitionNext || ("slide-" + (this.vertical === true ? 'up' : 'left')) + } + }, + + watch: { + value: function value (newVal, oldVal) { + var this$1 = this; + + var index = this.__isValidPanelName(newVal) === true + ? this.__getPanelIndex(newVal) + : -1; + + if (this.__forcedPanelTransition !== true) { + this.__updatePanelTransition( + index === -1 ? 0 : (index < this.__getPanelIndex(oldVal) ? -1 : 1) + ); + } + + if (this.panelIndex !== index) { + this.panelIndex = index; + this.$emit('before-transition', newVal, oldVal); + this.$nextTick(function () { + this$1.$emit('transition', newVal, oldVal); + }); + } + } + }, + + methods: { + next: function next () { + this.__go(1); + }, + + previous: function previous () { + this.__go(-1); + }, + + goTo: function goTo (name) { + this.$emit('input', name); + }, + + __isValidPanelName: function __isValidPanelName (name) { + return name !== void 0 && name !== null && name !== '' + }, + + __getPanelIndex: function __getPanelIndex (name) { + return this.panels.findIndex(function (panel) { + var opt = panel.componentOptions; + return opt && + opt.propsData.name === name && + opt.propsData.disable !== '' && + opt.propsData.disable !== true + }) + }, + + __getAllPanels: function __getAllPanels () { + var this$1 = this; + + return this.panels.filter( + function (panel) { return panel.componentOptions !== void 0 && + this$1.__isValidPanelName(panel.componentOptions.propsData.name); } + ) + }, + + __getAvailablePanels: function __getAvailablePanels () { + return this.panels.filter(function (panel) { + var opt = panel.componentOptions; + return opt && + opt.propsData.name !== void 0 && + opt.propsData.disable !== '' && + opt.propsData.disable !== true + }) + }, + + __updatePanelTransition: function __updatePanelTransition (direction) { + var val = direction !== 0 && this.animated === true && this.panelIndex !== -1 + ? 'q-transition--' + (direction === -1 ? this.transitionPrevComputed : this.transitionNextComputed) + : null; + + if (this.panelTransition !== val) { + this.panelTransition = val; + } + }, + + __go: function __go (direction, startIndex) { + var this$1 = this; + if ( startIndex === void 0 ) startIndex = this.panelIndex; + + var index = startIndex + direction; + var slots = this.panels; + + while (index > -1 && index < slots.length) { + var opt = slots[index].componentOptions; + + if ( + opt !== void 0 && + opt.propsData.disable !== '' && + opt.propsData.disable !== true + ) { + this.__updatePanelTransition(direction); + this.__forcedPanelTransition = true; + this.$emit('input', slots[index].componentOptions.propsData.name); + setTimeout(function () { + this$1.__forcedPanelTransition = false; + }); + return + } + + index += direction; + } + + if (this.infinite === true && slots.length > 0 && startIndex !== -1 && startIndex !== slots.length) { + this.__go(direction, direction === -1 ? slots.length : -1); + } + }, + + __swipe: function __swipe (evt) { + var dir = this.vertical === true ? 'up' : 'left'; + this.__go((this.$q.lang.rtl === true ? -1 : 1) * (evt.direction === dir ? 1 : -1)); + }, + + __updatePanelIndex: function __updatePanelIndex () { + var index = this.__getPanelIndex(this.value); + + if (this.panelIndex !== index) { + this.panelIndex = index; + } + + return true + }, + + __getPanelContent: function __getPanelContent (h) { + if (this.panels.length === 0) { + return + } + + var panel = this.__isValidPanelName(this.value) && + this.__updatePanelIndex() && + this.panels[this.panelIndex]; + + var content = this.keepAlive === true + ? [ + h('keep-alive', [ + h(PanelWrapper, { + key: this.contentKey + }, [ panel ]) + ]) + ] + : [ + h('div', { + staticClass: 'q-panel scroll', + key: this.contentKey, + attrs: { role: 'tabpanel' }, + // stop propagation of content emitted @input + // which would tamper with Panel's model + on: cache(this, 'stop', { input: stop }) + }, [ panel ]) + ]; + + return this.animated === true + ? [ + h('transition', { + props: { + name: this.panelTransition + } + }, content) + ] + : content + } + }, + + render: function render (h) { + this.panels = slot(this, 'default', []); + return this.__renderPanels(h) + } + }; + + var PanelChildMixin = { + props: { + name: { + required: true + }, + disable: Boolean + } + }; + + var FullscreenMixin = { + props: { + fullscreen: Boolean, + noRouteFullscreenExit: Boolean + }, + + data: function data () { + return { + inFullscreen: false + } + }, + + watch: { + $route: function $route () { + this.noRouteFullscreenExit !== true && this.exitFullscreen(); + }, + + fullscreen: function fullscreen (v) { + if (this.inFullscreen !== v) { + this.toggleFullscreen(); + } + }, + + inFullscreen: function inFullscreen (v) { + this.$emit('update:fullscreen', v); + this.$emit('fullscreen', v); + } + }, + + methods: { + toggleFullscreen: function toggleFullscreen () { + if (this.inFullscreen === true) { + this.exitFullscreen(); + } + else { + this.setFullscreen(); + } + }, + + setFullscreen: function setFullscreen () { + if (this.inFullscreen === true) { + return + } + + this.inFullscreen = true; + this.container = this.$el.parentNode; + this.container.replaceChild(this.fullscreenFillerNode, this.$el); + document.body.appendChild(this.$el); + document.body.classList.add('q-body--fullscreen-mixin'); + + this.__historyFullscreen = { + handler: this.exitFullscreen + }; + History.add(this.__historyFullscreen); + }, + + exitFullscreen: function exitFullscreen () { + var this$1 = this; + + if (this.inFullscreen !== true) { + return + } + + if (this.__historyFullscreen !== void 0) { + History.remove(this.__historyFullscreen); + this.__historyFullscreen = void 0; + } + this.container.replaceChild(this.$el, this.fullscreenFillerNode); + document.body.classList.remove('q-body--fullscreen-mixin'); + this.inFullscreen = false; + + if (this.$el.scrollIntoView !== void 0) { + setTimeout(function () { this$1.$el.scrollIntoView(); }); + } + } + }, + + beforeMount: function beforeMount () { + this.fullscreenFillerNode = document.createElement('span'); + }, + + mounted: function mounted () { + this.fullscreen === true && this.setFullscreen(); + }, + + beforeDestroy: function beforeDestroy () { + this.exitFullscreen(); + } + }; + + var + hasMap = typeof Map === 'function', + hasSet = typeof Set === 'function', + hasArrayBuffer = typeof ArrayBuffer === 'function'; + + function isDeepEqual (a, b) { + if (a === b) { + return true + } + + if (a !== null && b !== null && typeof a === 'object' && typeof b === 'object') { + if (a.constructor !== b.constructor) { + return false + } + + var length, i, keys; + + if (a.constructor === Array) { + length = a.length; + + if (length !== b.length) { + return false + } + + for (i = length; i-- !== 0;) { + if (isDeepEqual(a[i], b[i]) !== true) { + return false + } + } + + return true + } + + if (hasMap === true && a.constructor === Map) { + if (a.size !== b.size) { + return false + } + + i = a.entries().next(); + while (i.done !== true) { + if (b.has(i.value[0]) !== true) { + return false + } + i = i.next(); + } + + i = a.entries().next(); + while (i.done !== true) { + if (isDeepEqual(i.value[1], b.get(i.value[0])) !== true) { + return false + } + i = i.next(); + } + + return true + } + + if (hasSet === true && a.constructor === Set) { + if (a.size !== b.size) { + return false + } + + i = a.entries().next(); + while (i.done !== true) { + if (b.has(i.value[0]) !== true) { + return false + } + i = i.next(); + } + + return true + } + + if (hasArrayBuffer === true && a.buffer != null && a.buffer.constructor === ArrayBuffer) { + length = a.length; + + if (length !== b.length) { + return false + } + + for (i = length; i-- !== 0;) { + if (a[i] !== b[i]) { + return false + } + } + + return true + } + + if (a.constructor === RegExp) { + return a.source === b.source && a.flags === b.flags + } + + if (a.valueOf !== Object.prototype.valueOf) { + return a.valueOf() === b.valueOf() + } + + if (a.toString !== Object.prototype.toString) { + return a.toString() === b.toString() + } + + keys = Object.keys(a); + length = keys.length; + + if (length !== Object.keys(b).length) { + return false + } + + for (i = length; i-- !== 0;) { + var key = keys[i]; + if (isDeepEqual(a[key], b[key]) !== true) { + return false + } + } + + return true + } + + // true if both NaN, false otherwise + return a !== a && b !== b // eslint-disable-line no-self-compare + } + + function isDate (v) { + return Object.prototype.toString.call(v) === '[object Date]' + } + + function isNumber (v) { + return typeof v === 'number' && isFinite(v) + } + + var QCarousel = Vue.extend({ + name: 'QCarousel', + + mixins: [ DarkMixin, PanelParentMixin, FullscreenMixin ], + + props: { + height: String, + padding: Boolean, + + controlType: { + type: String, + validator: function (v) { return [ 'regular', 'flat', 'outline', 'push', 'unelevated' ].includes(v); }, + default: 'flat' + }, + controlColor: String, + controlTextColor: String, + + autoplay: [Number, Boolean], + + arrows: Boolean, + prevIcon: String, + nextIcon: String, + + navigation: Boolean, + navigationPosition: { + type: String, + validator: function (v) { return ['top', 'right', 'bottom', 'left'].includes(v); } + }, + navigationIcon: String, + + thumbnails: Boolean + }, + + computed: { + style: function style () { + if (this.inFullscreen !== true && this.height !== void 0) { + return { + height: this.height + } + } + }, + + direction: function direction () { + return this.vertical === true ? 'vertical' : 'horizontal' + }, + + classes: function classes () { + return "q-carousel q-panel-parent q-carousel--with" + (this.padding === true ? '' : 'out') + "-padding" + + (this.inFullscreen === true ? ' fullscreen' : '') + + (this.isDark === true ? ' q-carousel--dark q-dark' : '') + + (this.arrows === true ? (" q-carousel--arrows-" + (this.direction)) : '') + + (this.navigation === true ? (" q-carousel--navigation-" + (this.navigationPositionComputed)) : '') + }, + + arrowIcons: function arrowIcons () { + var ico = [ + this.prevIcon || this.$q.iconSet.carousel[this.vertical === true ? 'up' : 'left'], + this.nextIcon || this.$q.iconSet.carousel[this.vertical === true ? 'down' : 'right'] + ]; + + return this.vertical === false && this.$q.lang.rtl === true + ? ico.reverse() + : ico + }, + + navIcon: function navIcon () { + return this.navigationIcon || this.$q.iconSet.carousel.navigationIcon + }, + + navigationPositionComputed: function navigationPositionComputed () { + return this.navigationPosition || (this.vertical === true ? 'right' : 'bottom') + }, + + controlProps: function controlProps () { + var obj; + + return ( obj = { + color: this.controlColor, + textColor: this.controlTextColor, + round: true + }, obj[this.controlType] = true, obj.dense = true, obj ) + }, + + transitionPrevComputed: function transitionPrevComputed () { + return this.transitionPrev || "fade" + }, + + transitionNextComputed: function transitionNextComputed () { + return this.transitionNext || "fade" + } + }, + + watch: { + value: function value () { + if (this.autoplay) { + clearInterval(this.timer); + this.__startTimer(); + } + }, + + autoplay: function autoplay (val) { + if (val) { + this.__startTimer(); + } + else { + clearInterval(this.timer); + } + } + }, + + methods: { + __startTimer: function __startTimer () { + this.timer = setTimeout( + this.next, + isNumber(this.autoplay) ? this.autoplay : 5000 + ); + }, + + __getNavigationContainer: function __getNavigationContainer (h, type, mapping) { + return h('div', { + class: 'q-carousel__control q-carousel__navigation no-wrap absolute flex' + + " q-carousel__navigation--" + type + " q-carousel__navigation--" + (this.navigationPositionComputed) + + (this.controlColor !== void 0 ? (" text-" + (this.controlColor)) : '') + }, [ + h('div', { + staticClass: 'q-carousel__navigation-inner flex no-wrap justify-center' + }, this.__getAvailablePanels().map(mapping)) + ]) + }, + + __getContent: function __getContent (h) { + var this$1 = this; + + var node = []; + + if (this.navigation === true) { + node.push(this.__getNavigationContainer(h, 'buttons', function (panel) { + var name = panel.componentOptions.propsData.name; + + return h(QBtn, { + key: name, + class: ("q-carousel__navigation-icon q-carousel__navigation-icon--" + (name === this$1.value ? '' : 'in') + "active"), + props: Object.assign({ + icon: this$1.navIcon, + size: 'sm' + }, this$1.controlProps), + on: cache(this$1, 'nav#' + name, { click: function () { this$1.goTo(name); } }) + }) + })); + } + else if (this.thumbnails === true) { + var color = this.controlColor !== void 0 + ? (" text-" + (this.controlColor)) + : ''; + + node.push(this.__getNavigationContainer(h, 'thumbnails', function (panel) { + var slide = panel.componentOptions.propsData; + + return h('img', { + class: "q-carousel__thumbnail q-carousel__thumbnail--" + (slide.name === this$1.value ? '' : 'in') + "active" + color, + attrs: { + src: slide.imgSrc + }, + key: 'tmb#' + slide.name, + on: cache(this$1, 'tmb#' + slide.name, { click: function () { this$1.goTo(slide.name); } }) + }) + })); + } + + if (this.arrows === true) { + node.push( + h('div', { + staticClass: ("q-carousel__control q-carousel__arrow q-carousel__prev-arrow q-carousel__prev-arrow--" + (this.direction) + " absolute flex flex-center") + }, [ + h(QBtn, { + props: Object.assign({ icon: this.arrowIcons[0] }, this.controlProps), + on: cache(this, 'prev', { click: this.previous }) + }) + ]), + h('div', { + staticClass: ("q-carousel__control q-carousel__arrow q-carousel__next-arrow q-carousel__next-arrow--" + (this.direction) + " absolute flex flex-center") + }, [ + h(QBtn, { + props: Object.assign({ icon: this.arrowIcons[1] }, this.controlProps), + on: cache(this, 'next', { click: this.next }) + }) + ]) + ); + } + + return mergeSlot(node, this, 'control') + }, + + __renderPanels: function __renderPanels (h) { + return h('div', { + style: this.style, + class: this.classes, + on: this.$listeners + }, [ + h('div', { + staticClass: 'q-carousel__slides-container', + directives: this.panelDirectives + }, this.__getPanelContent(h)) + ].concat(this.__getContent(h))) + } + }, + + mounted: function mounted () { + this.autoplay && this.__startTimer(); + }, + + beforeDestroy: function beforeDestroy () { + clearInterval(this.timer); + } + }); + + var QCarouselSlide = Vue.extend({ + name: 'QCarouselSlide', + + mixins: [ PanelChildMixin ], + + props: { + imgSrc: String + }, + + computed: { + style: function style () { + if (this.imgSrc) { + return { + backgroundImage: ("url(" + (this.imgSrc) + ")") + } + } + } + }, + + render: function render (h) { + return h('div', { + staticClass: 'q-carousel__slide', + style: this.style, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + var QCarouselControl = Vue.extend({ + name: 'QCarouselControl', + + props: { + position: { + type: String, + default: 'bottom-right', + validator: function (v) { return [ + 'top-right', 'top-left', + 'bottom-right', 'bottom-left', + 'top', 'right', 'bottom', 'left' + ].includes(v); } + }, + offset: { + type: Array, + default: function () { return [18, 18]; }, + validator: function (v) { return v.length === 2; } + } + }, + + computed: { + classes: function classes () { + return ("absolute-" + (this.position)) + }, + + style: function style () { + return { + margin: ((this.offset[1]) + "px " + (this.offset[0]) + "px") + } + } + }, + + render: function render (h) { + return h('div', { + staticClass: 'q-carousel__control absolute', + style: this.style, + class: this.classes, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + var QChatMessage = Vue.extend({ + name: 'QChatMessage', + + props: { + sent: Boolean, + label: String, + bgColor: String, + textColor: String, + name: String, + avatar: String, + text: Array, + stamp: String, + size: String, + labelSanitize: Boolean, + nameSanitize: Boolean, + textSanitize: Boolean, + stampSanitize: Boolean + }, + + computed: { + textClass: function textClass () { + return "q-message-text-content q-message-text-content--" + (this.op) + + (this.textColor !== void 0 ? (" text-" + (this.textColor)) : '') + }, + + messageClass: function messageClass () { + return "q-message-text q-message-text--" + (this.op) + + (this.bgColor !== void 0 ? (" text-" + (this.bgColor)) : '') + }, + + containerClass: function containerClass () { + return "q-message-container row items-end no-wrap" + + (this.sent === true ? ' reverse' : '') + }, + + sizeClass: function sizeClass () { + if (this.size !== void 0) { + return ("col-" + (this.size)) + } + }, + + op: function op () { + return this.sent === true ? 'sent' : 'received' + } + }, + + methods: { + __getText: function __getText (h) { + var this$1 = this; + + var + domPropText = this.textSanitize === true ? 'textContent' : 'innerHTML', + domPropStamp = this.stampSanitize === true ? 'textContent' : 'innerHTML'; + + return this.text.map(function (msg, index) { + var obj, obj$1; + + return h('div', { + key: index, + class: this$1.messageClass + }, [ + h('div', { class: this$1.textClass }, [ + h('div', { domProps: ( obj = {}, obj[domPropText] = msg, obj ) }), + this$1.stamp + ? h('div', { + staticClass: 'q-message-stamp', + domProps: ( obj$1 = {}, obj$1[domPropStamp] = this$1.stamp, obj$1 ) + }) + : null + ]) + ]); + }) + }, + + __getMessage: function __getMessage (h) { + var obj; + + var content = uniqueSlot(this, 'default', []); + + this.stamp !== void 0 && content.push( + h('div', { + staticClass: 'q-message-stamp', + domProps: ( obj = {}, obj[this.stampSanitize === true ? 'textContent' : 'innerHTML'] = this.stamp, obj ) + }) + ); + + return h('div', { class: this.messageClass }, [ + h('div', { + staticClass: 'q-message-text-content', + class: this.textClass + }, content) + ]) + } + }, + + render: function render (h) { + var obj, obj$1; + + var container = []; + + if (this.$scopedSlots.avatar !== void 0) { + container.push(this.$scopedSlots.avatar()); + } + else if (this.avatar !== void 0) { + container.push( + h('img', { + class: ("q-message-avatar q-message-avatar--" + (this.op)), + attrs: { src: this.avatar, 'aria-hidden': 'true' } + }) + ); + } + + var msg = []; + + this.name !== void 0 && msg.push( + h('div', { + class: ("q-message-name q-message-name--" + (this.op)), + domProps: ( obj = {}, obj[this.nameSanitize === true ? 'textContent' : 'innerHTML'] = this.name, obj ) + }) + ); + + this.text !== void 0 && msg.push( + this.__getText(h) + ); + + this.$scopedSlots.default !== void 0 && msg.push( + this.__getMessage(h) + ); + + container.push( + h('div', { class: this.sizeClass }, msg) + ); + + var child = []; + + this.label && child.push( + h('div', { + staticClass: 'q-message-label text-center', + domProps: ( obj$1 = {}, obj$1[this.labelSanitize === true ? 'textContent' : 'innerHTML'] = this.label, obj$1 ) + }) + ); + + child.push( + h('div', { class: this.containerClass }, container) + ); + + return h('div', { + class: ("q-message q-message-" + (this.op)), + on: this.$listeners + }, child) + } + }); + + var OptionSizeMixin = getSizeMixin({ + xs: 30, + sm: 35, + md: 40, + lg: 50, + xl: 60 + }); + + var RefocusTargetMixin = { + computed: { + __refocusTargetEl: function __refocusTargetEl () { + if (this.disable !== true) { + return this.$createElement('span', { + ref: 'refocusTarget', + staticClass: 'no-outline', + attrs: { tabindex: -1 } + }) + } + } + }, + + methods: { + __refocusTarget: function __refocusTarget (e) { + if (e !== void 0 && e.type.indexOf('key') === 0) { + if (document.activeElement !== this.$el && this.$el.contains(document.activeElement) === true) { + this.$el.focus(); + } + } + else if ((e === void 0 || this.$el.contains(e.target) === true) && this.$refs.refocusTarget !== void 0) { + this.$refs.refocusTarget.focus(); + } + } + } + }; + + var CheckboxMixin = { + mixins: [ DarkMixin, OptionSizeMixin, FormMixin, RefocusTargetMixin ], + + props: { + value: { + required: true, + default: null + }, + val: {}, + + trueValue: { default: true }, + falseValue: { default: false }, + + toggleIndeterminate: Boolean, + indeterminateValue: { default: null }, + + label: String, + leftLabel: Boolean, + fontSize: String, + + color: String, + keepColor: Boolean, + dense: Boolean, + + disable: Boolean, + tabindex: [String, Number] + }, + + computed: { + isTrue: function isTrue () { + return this.modelIsArray === true + ? this.index > -1 + : this.value === this.trueValue + }, + + isFalse: function isFalse () { + return this.modelIsArray === true + ? this.index === -1 + : this.value === this.falseValue + }, + + isIndeterminate: function isIndeterminate () { + return this.value === this.indeterminateValue && + this.value !== this.falseValue + }, + + index: function index () { + if (this.modelIsArray === true) { + return this.value.indexOf(this.val) + } + }, + + modelIsArray: function modelIsArray () { + return this.val !== void 0 && Array.isArray(this.value) + }, + + computedTabindex: function computedTabindex () { + return this.disable === true ? -1 : this.tabindex || 0 + }, + + labelStyle: function labelStyle () { + if (this.fontSize !== void 0) { + return { fontSize: this.fontSize } + } + }, + + classes: function classes () { + return "q-" + (this.type) + " cursor-pointer no-outline row inline no-wrap items-center" + + (this.disable === true ? ' disabled' : '') + + (this.isDark === true ? (" q-" + (this.type) + "--dark") : '') + + (this.dense === true ? (" q-" + (this.type) + "--dense") : '') + + (this.leftLabel === true ? ' reverse' : '') + }, + + innerClass: function innerClass () { + var state = this.isTrue === true ? 'truthy' : (this.isFalse === true ? 'falsy' : 'indet'); + var color = this.color !== void 0 && ( + this.keepColor === true || + (this.type === 'toggle' ? this.isTrue === true : this.isFalse !== true) + ) + ? (" text-" + (this.color)) + : ''; + + return ("q-" + (this.type) + "__inner--" + state + color) + }, + + formAttrs: function formAttrs () { + var prop = { type: 'checkbox' }; + + this.name !== void 0 && Object.assign(prop, { + checked: this.isTrue, + name: this.name, + value: this.modelIsArray === true + ? this.val + : this.trueValue + }); + + return prop + }, + + attrs: function attrs () { + var attrs = { + tabindex: this.computedTabindex, + role: 'checkbox', + 'aria-label': this.label, + 'aria-checked': this.isIndeterminate === true + ? 'mixed' + : this.isTrue === true ? 'true' : 'false' + }; + + if (this.disable === true) { + attrs['aria-disabled'] = ''; + } + + return attrs + } + }, + + methods: { + toggle: function toggle (e) { + if (e !== void 0) { + stopAndPrevent(e); + this.__refocusTarget(e); + } + + if (this.disable === true) { + return + } + + var val; + + if (this.modelIsArray === true) { + if (this.isTrue === true) { + val = this.value.slice(); + val.splice(this.index, 1); + } + else { + val = this.value.concat([ this.val ]); + } + } + else if (this.isTrue === true) { + val = this.toggleIndeterminate === true + ? this.indeterminateValue + : this.falseValue; + } + else if (this.isFalse === true) { + val = this.trueValue; + } + else { + val = this.falseValue; + } + + this.$emit('input', val); + }, + + __onKeydown: function __onKeydown (e) { + if (e.keyCode === 13 || e.keyCode === 32) { + stopAndPrevent(e); + } + }, + + __onKeyup: function __onKeyup (e) { + if (e.keyCode === 13 || e.keyCode === 32) { + this.toggle(e); + } + } + }, + + render: function render (h) { + var inner = this.__getInner(h); + + this.disable !== true && this.__injectFormInput( + inner, + 'unshift', + ("q-" + (this.type) + "__native absolute q-ma-none q-pa-none invisible") + ); + + var child = [ + h('div', { + staticClass: ("q-" + (this.type) + "__inner relative-position no-pointer-events"), + class: this.innerClass, + style: this.sizeStyle + }, inner) + ]; + + if (this.__refocusTargetEl !== void 0) { + child.push(this.__refocusTargetEl); + } + + var label = this.label !== void 0 + ? mergeSlot([ this.label ], this, 'default') + : slot(this, 'default'); + + label !== void 0 && child.push( + h('div', { + staticClass: ("q-" + (this.type) + "__label q-anchor--skip") + }, label) + ); + + return h('div', { + class: this.classes, + attrs: this.attrs, + on: cache(this, 'inpExt', { + click: this.toggle, + keydown: this.__onKeydown, + keyup: this.__onKeyup + }) + }, child) + } + }; + + var QCheckbox = Vue.extend({ + name: 'QCheckbox', + + mixins: [ CheckboxMixin ], + + methods: { + __getInner: function __getInner (h) { + return [ + h('div', { + staticClass: 'q-checkbox__bg absolute' + }, [ + h('svg', { + staticClass: 'q-checkbox__svg fit absolute-full', + attrs: { focusable: 'false' /* needed for IE11 */, viewBox: '0 0 24 24' } + }, [ + h('path', { + staticClass: 'q-checkbox__truthy', + attrs: { + fill: 'none', + d: 'M1.73,12.91 8.1,19.28 22.79,4.59' + } + }), + + h('path', { + staticClass: 'q-checkbox__indet', + attrs: { + d: 'M4,14H20V10H4' + } + }) + ]) + ]) + ] + } + }, + + created: function created () { + this.type = 'checkbox'; + } + }); + + var QChip = Vue.extend({ + name: 'QChip', + + mixins: [ + RippleMixin, + DarkMixin, + getSizeMixin({ + xs: 8, + sm: 10, + md: 14, + lg: 20, + xl: 24 + }) + ], + + model: { + event: 'remove' + }, + + props: { + dense: Boolean, + + icon: String, + iconRight: String, + label: [String, Number], + + color: String, + textColor: String, + + value: { + type: Boolean, + default: true + }, + selected: { + type: Boolean, + default: null + }, + + square: Boolean, + outline: Boolean, + clickable: Boolean, + removable: Boolean, + + tabindex: [String, Number], + disable: Boolean + }, + + computed: { + classes: function classes () { + var obj; + + var text = this.outline === true + ? this.color || this.textColor + : this.textColor; + + return ( obj = {}, obj[("bg-" + (this.color))] = this.outline === false && this.color !== void 0, obj[("text-" + text + " q-chip--colored")] = text, obj.disabled = this.disable, obj['q-chip--dense'] = this.dense, obj['q-chip--outline'] = this.outline, obj['q-chip--selected'] = this.selected, obj['q-chip--clickable cursor-pointer non-selectable q-hoverable'] = this.isClickable, obj['q-chip--square'] = this.square, obj['q-chip--dark q-dark'] = this.isDark, obj ) + }, + + hasLeftIcon: function hasLeftIcon () { + return this.selected === true || this.icon !== void 0 + }, + + isClickable: function isClickable () { + return this.disable === false && (this.clickable === true || this.selected !== null) + }, + + computedTabindex: function computedTabindex () { + return this.disable === true ? -1 : this.tabindex || 0 + } + }, + + methods: { + __onKeyup: function __onKeyup (e) { + e.keyCode === 13 /* ENTER */ && this.__onClick(e); + }, + + __onClick: function __onClick (e) { + if (!this.disable) { + this.$emit('update:selected', !this.selected); + this.$emit('click', e); + } + }, + + __onRemove: function __onRemove (e) { + if (e.keyCode === void 0 || e.keyCode === 13) { + stopAndPrevent(e); + !this.disable && this.$emit('remove', false); + } + }, + + __getContent: function __getContent (h) { + var child = []; + + this.isClickable === true && child.push( + h('div', { staticClass: 'q-focus-helper' }) + ); + + this.hasLeftIcon === true && child.push( + h(QIcon, { + staticClass: 'q-chip__icon q-chip__icon--left', + props: { name: this.selected === true ? this.$q.iconSet.chip.selected : this.icon } + }) + ); + + var label = this.label !== void 0 + ? [ h('div', { staticClass: 'ellipsis' }, [ this.label ]) ] + : void 0; + + child.push( + h('div', { + staticClass: 'q-chip__content col row no-wrap items-center q-anchor--skip' + }, mergeSlotSafely(label, this, 'default')) + ); + + this.iconRight && child.push( + h(QIcon, { + staticClass: 'q-chip__icon q-chip__icon--right', + props: { name: this.iconRight } + }) + ); + + this.removable && child.push( + h(QIcon, { + staticClass: 'q-chip__icon q-chip__icon--remove cursor-pointer', + props: { name: this.$q.iconSet.chip.remove }, + attrs: { tabindex: this.computedTabindex }, + nativeOn: { + click: this.__onRemove, + keyup: this.__onRemove + } + }) + ); + + return child + } + }, + + render: function render (h) { + if (this.value === false) { return } + + var data = { + staticClass: 'q-chip row inline no-wrap items-center', + class: this.classes, + style: this.sizeStyle + }; + + this.isClickable === true && Object.assign(data, { + attrs: { tabindex: this.computedTabindex }, + on: cache(this, 'click', { + click: this.__onClick, + keyup: this.__onKeyup + }), + directives: cache(this, 'dir#' + this.ripple, [ + { name: 'ripple', value: this.ripple } + ]) + }); + + return h('div', data, this.__getContent(h)) + } + }); + + var + radius = 50, + diameter = 2 * radius, + circumference = diameter * Math.PI, + strokeDashArray = Math.round(circumference * 1000) / 1000; + + var QCircularProgress = Vue.extend({ + name: 'QCircularProgress', + + mixins: [ SizeMixin ], + + props: { + value: { + type: Number, + default: 0 + }, + + min: { + type: Number, + default: 0 + }, + max: { + type: Number, + default: 100 + }, + + color: String, + centerColor: String, + trackColor: String, + + fontSize: String, + + // ratio + thickness: { + type: Number, + default: 0.2, + validator: function (v) { return v >= 0 && v <= 1; } + }, + + angle: { + type: Number, + default: 0 + }, + + indeterminate: Boolean, + showValue: Boolean, + reverse: Boolean, + + instantFeedback: Boolean // used by QKnob, private + }, + + computed: { + svgStyle: function svgStyle () { + return { transform: ("rotate3d(0, 0, 1, " + (this.angle - 90) + "deg)") } + }, + + circleStyle: function circleStyle () { + if (this.instantFeedback !== true && this.indeterminate !== true) { + return { transition: 'stroke-dashoffset 0.6s ease 0s, stroke 0.6s ease' } + } + }, + + dir: function dir () { + return (this.$q.lang.rtl === true ? -1 : 1) * (this.reverse ? -1 : 1) + }, + + viewBox: function viewBox () { + return diameter / (1 - this.thickness / 2) + }, + + viewBoxAttr: function viewBoxAttr () { + return ((this.viewBox / 2) + " " + (this.viewBox / 2) + " " + (this.viewBox) + " " + (this.viewBox)) + }, + + strokeDashOffset: function strokeDashOffset () { + var progress = 1 - (this.value - this.min) / (this.max - this.min); + return (this.dir * progress) * circumference + }, + + strokeWidth: function strokeWidth () { + return this.thickness / 2 * this.viewBox + }, + + attrs: function attrs () { + return { + role: 'progressbar', + 'aria-valuemin': this.min, + 'aria-valuemax': this.max, + 'aria-valuenow': this.indeterminate === true ? void 0 : this.value + } + } + }, + + methods: { + __getCircle: function __getCircle (h, ref) { + var thickness = ref.thickness; + var offset = ref.offset; + var color = ref.color; + var cls = ref.cls; + + return h('circle', { + staticClass: 'q-circular-progress__' + cls, + class: color !== void 0 ? ("text-" + color) : null, + style: this.circleStyle, + attrs: { + fill: 'transparent', + stroke: 'currentColor', + 'stroke-width': thickness, + 'stroke-dasharray': strokeDashArray, + 'stroke-dashoffset': offset, + cx: this.viewBox, + cy: this.viewBox, + r: radius + } + }) + } + }, + + render: function render (h) { + var svgChild = []; + + this.centerColor !== void 0 && this.centerColor !== 'transparent' && svgChild.push( + h('circle', { + staticClass: 'q-circular-progress__center', + class: ("text-" + (this.centerColor)), + attrs: { + fill: 'currentColor', + r: radius - this.strokeWidth / 2, + cx: this.viewBox, + cy: this.viewBox + } + }) + ); + + this.trackColor !== void 0 && this.trackColor !== 'transparent' && svgChild.push( + this.__getCircle(h, { + cls: 'track', + thickness: this.strokeWidth, + offset: 0, + color: this.trackColor + }) + ); + + svgChild.push( + this.__getCircle(h, { + cls: 'circle', + thickness: this.strokeWidth, + offset: this.strokeDashOffset, + color: this.color + }) + ); + + var child = [ + h('svg', { + staticClass: 'q-circular-progress__svg', + style: this.svgStyle, + attrs: { + focusable: 'false' /* needed for IE11 */, + viewBox: this.viewBoxAttr + } + }, svgChild) + ]; + + this.showValue === true && child.push( + h('div', { + staticClass: 'q-circular-progress__text absolute-full row flex-center content-center', + style: { fontSize: this.fontSize } + }, this.$scopedSlots.default !== void 0 ? this.$scopedSlots.default() : [ h('div', [ this.value ]) ]) + ); + + return h('div', { + staticClass: 'q-circular-progress', + class: ("q-circular-progress--" + (this.indeterminate === true ? 'in' : '') + "determinate"), + style: this.sizeStyle, + on: this.$listeners, + attrs: this.attrs + }, mergeSlotSafely(child, this, 'internal')) + } + }); + + // file referenced from docs + + var + hex = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/, + hexa = /^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/, + hexOrHexa = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, + rgb = /^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/, + rgba = /^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/; + + var testPattern = { + date: function (v) { return /^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(v); }, + time: function (v) { return /^([0-1]?\d|2[0-3]):[0-5]\d$/.test(v); }, + fulltime: function (v) { return /^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(v); }, + timeOrFulltime: function (v) { return /^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(v); }, + + hexColor: function (v) { return hex.test(v); }, + hexaColor: function (v) { return hexa.test(v); }, + hexOrHexaColor: function (v) { return hexOrHexa.test(v); }, + + rgbColor: function (v) { return rgb.test(v); }, + rgbaColor: function (v) { return rgba.test(v); }, + rgbOrRgbaColor: function (v) { return rgb.test(v) || rgba.test(v); }, + + hexOrRgbColor: function (v) { return hex.test(v) || rgb.test(v); }, + hexaOrRgbaColor: function (v) { return hexa.test(v) || rgba.test(v); }, + anyColor: function (v) { return hexOrHexa.test(v) || rgb.test(v) || rgba.test(v); } + }; + + var patterns = { + testPattern: testPattern + }; + + function throttle (fn, limit) { + if ( limit === void 0 ) limit = 250; + + var wait = false, result; + + return function (/* ...args */) { + if (wait === false) { + wait = true; + setTimeout(function () { wait = false; }, limit); + result = fn.apply(this, arguments); + } + + return result + } + } + + function getChanges (evt, ctx, isFinal) { + var + pos = position(evt), + dir, + distX = pos.left - ctx.event.x, + distY = pos.top - ctx.event.y, + absX = Math.abs(distX), + absY = Math.abs(distY); + + var direction = ctx.direction; + + if (direction.horizontal === true && direction.vertical !== true) { + dir = distX < 0 ? 'left' : 'right'; + } + else if (direction.horizontal !== true && direction.vertical === true) { + dir = distY < 0 ? 'up' : 'down'; + } + else if (direction.up === true && distY < 0) { + dir = 'up'; + if (absX > absY) { + if (direction.left === true && distX < 0) { + dir = 'left'; + } + else if (direction.right === true && distX > 0) { + dir = 'right'; + } + } + } + else if (direction.down === true && distY > 0) { + dir = 'down'; + if (absX > absY) { + if (direction.left === true && distX < 0) { + dir = 'left'; + } + else if (direction.right === true && distX > 0) { + dir = 'right'; + } + } + } + else if (direction.left === true && distX < 0) { + dir = 'left'; + if (absX < absY) { + if (direction.up === true && distY < 0) { + dir = 'up'; + } + else if (direction.down === true && distY > 0) { + dir = 'down'; + } + } + } + else if (direction.right === true && distX > 0) { + dir = 'right'; + if (absX < absY) { + if (direction.up === true && distY < 0) { + dir = 'up'; + } + else if (direction.down === true && distY > 0) { + dir = 'down'; + } + } + } + + var synthetic = false; + + if (dir === void 0 && isFinal !== true) { + if (ctx.event.isFirst === true || ctx.event.lastDir === void 0) { + return {} + } + + dir = ctx.event.lastDir; + synthetic = true; + + if (dir === 'left' || dir === 'right') { + pos.left -= distX; + absX = 0; + distX = 0; + } + else { + pos.top -= distY; + absY = 0; + distY = 0; + } + } + + return { + synthetic: synthetic, + payload: { + evt: evt, + touch: ctx.event.mouse !== true, + mouse: ctx.event.mouse === true, + position: pos, + direction: dir, + isFirst: ctx.event.isFirst, + isFinal: isFinal === true, + duration: Date.now() - ctx.event.time, + distance: { + x: absX, + y: absY + }, + offset: { + x: distX, + y: distY + }, + delta: { + x: pos.left - ctx.event.lastX, + y: pos.top - ctx.event.lastY + } + } + } + } + + var uid = 0; + + var TouchPan = { + name: 'touch-pan', + + bind: function bind (el, ref) { + var value = ref.value; + var modifiers = ref.modifiers; + + // early return, we don't need to do anything + if (modifiers.mouse !== true && client.has.touch !== true) { + return + } + + function handleEvent (evt, mouseEvent) { + if (modifiers.mouse === true && mouseEvent === true) { + stopAndPrevent(evt); + } + else { + modifiers.stop === true && stop(evt); + modifiers.prevent === true && prevent(evt); + } + } + + var ctx = { + uid: 'qvtp_' + (uid++), + handler: value, + modifiers: modifiers, + direction: getModifierDirections(modifiers), + + noop: noop, + + mouseStart: function mouseStart (evt) { + if (shouldStart(evt, ctx) && leftClick(evt)) { + addEvt(ctx, 'temp', [ + [ document, 'mousemove', 'move', 'notPassiveCapture' ], + [ document, 'mouseup', 'end', 'passiveCapture' ] + ]); + + ctx.start(evt, true); + } + }, + + touchStart: function touchStart (evt) { + if (shouldStart(evt, ctx)) { + var target = getTouchTarget(evt.target); + + addEvt(ctx, 'temp', [ + [ target, 'touchmove', 'move', 'notPassiveCapture' ], + [ target, 'touchcancel', 'end', 'passiveCapture' ], + [ target, 'touchend', 'end', 'passiveCapture' ] + ]); + + ctx.start(evt); + } + }, + + start: function start (evt, mouseEvent) { + client.is.firefox === true && preventDraggable(el, true); + ctx.lastEvt = evt; + + var pos = position(evt); + + /* + * Stop propagation so possible upper v-touch-pan don't catch this as well; + * If we're not the target (based on modifiers), we'll re-emit the event later + */ + if (mouseEvent === true || modifiers.stop === true) { + /* + * are we directly switching to detected state? + * clone event only otherwise + */ + if ( + ctx.direction.all !== true && + (mouseEvent !== true || ctx.direction.mouseAllDir !== true) + ) { + var clone = evt.type.indexOf('mouse') > -1 + ? new MouseEvent(evt.type, evt) + : new TouchEvent(evt.type, evt); + + evt.defaultPrevented === true && prevent(clone); + evt.cancelBubble === true && stop(clone); + + clone.qClonedBy = evt.qClonedBy === void 0 + ? [ctx.uid] + : evt.qClonedBy.concat(ctx.uid); + clone.qKeyEvent = evt.qKeyEvent; + clone.qClickOutside = evt.qClickOutside; + + ctx.initialEvent = { + target: evt.target, + event: clone + }; + } + + stop(evt); + } + + ctx.event = { + x: pos.left, + y: pos.top, + time: Date.now(), + mouse: mouseEvent === true, + detected: false, + isFirst: true, + isFinal: false, + lastX: pos.left, + lastY: pos.top + }; + }, + + move: function move (evt) { + if (ctx.event === void 0) { + return + } + + ctx.lastEvt = evt; + + var isMouseEvt = ctx.event.mouse === true; + var start = function () { + handleEvent(evt, isMouseEvt); + + document.documentElement.style.cursor = 'grabbing'; + isMouseEvt === true && document.body.classList.add('no-pointer-events'); + document.body.classList.add('non-selectable'); + clearSelection(); + + ctx.styleCleanup = function (withDelay) { + ctx.styleCleanup = void 0; + + document.documentElement.style.cursor = ''; + document.body.classList.remove('non-selectable'); + + if (isMouseEvt === true) { + var remove = function () { + document.body.classList.remove('no-pointer-events'); + }; + + if (withDelay === true) { setTimeout(remove, 50); } + else { remove(); } + } + }; + }; + + if (ctx.event.detected === true) { + ctx.event.isFirst !== true && handleEvent(evt, ctx.event.mouse); + + var ref = getChanges(evt, ctx, false); + var payload = ref.payload; + var synthetic = ref.synthetic; + + if (payload !== void 0) { + if (ctx.handler(payload) === false) { + ctx.end(evt); + } + else { + if (ctx.styleCleanup === void 0 && ctx.event.isFirst === true) { + start(); + } + + ctx.event.lastX = payload.position.left; + ctx.event.lastY = payload.position.top; + ctx.event.lastDir = synthetic === true ? void 0 : payload.direction; + ctx.event.isFirst = false; + } + } + + return + } + + if ( + ctx.direction.all === true || + (isMouseEvt === true && ctx.modifiers.mouseAllDir === true) + ) { + start(); + ctx.event.detected = true; + ctx.move(evt); + return + } + + var + pos = position(evt), + distX = pos.left - ctx.event.x, + distY = pos.top - ctx.event.y, + absX = Math.abs(distX), + absY = Math.abs(distY); + + if (absX !== absY) { + if ( + (ctx.direction.horizontal === true && absX > absY) || + (ctx.direction.vertical === true && absX < absY) || + (ctx.direction.up === true && absX < absY && distY < 0) || + (ctx.direction.down === true && absX < absY && distY > 0) || + (ctx.direction.left === true && absX > absY && distX < 0) || + (ctx.direction.right === true && absX > absY && distX > 0) + ) { + ctx.event.detected = true; + ctx.move(evt); + } + else { + ctx.end(evt, true); + } + } + }, + + end: function end (evt, abort) { + if (ctx.event === void 0) { + return + } + + cleanEvt(ctx, 'temp'); + client.is.firefox === true && preventDraggable(el, false); + ctx.styleCleanup !== void 0 && ctx.styleCleanup(true); + + if (abort === true) { + if (ctx.event.detected !== true && ctx.initialEvent !== void 0) { + ctx.initialEvent.target.dispatchEvent(ctx.initialEvent.event); + } + } + else if (ctx.event.detected === true) { + ctx.event.isFirst === true && ctx.handler(getChanges(evt === void 0 ? ctx.lastEvt : evt, ctx).payload); + ctx.handler(getChanges(evt === void 0 ? ctx.lastEvt : evt, ctx, true).payload); + } + + ctx.event = void 0; + ctx.initialEvent = void 0; + ctx.lastEvt = void 0; + } + }; + + if (el.__qtouchpan) { + el.__qtouchpan_old = el.__qtouchpan; + } + + el.__qtouchpan = ctx; + + modifiers.mouse === true && addEvt(ctx, 'main', [ + [ el, 'mousedown', 'mouseStart', ("passive" + (modifiers.mouseCapture === true ? 'Capture' : '')) ] + ]); + + client.has.touch === true && addEvt(ctx, 'main', [ + [ el, 'touchstart', 'touchStart', ("passive" + (modifiers.capture === true ? 'Capture' : '')) ], + [ el, 'touchmove', 'noop', 'notPassiveCapture' ] + ]); + }, + + update: function update (el, binding) { + el.__qtouchpan !== void 0 && updateModifiers(el.__qtouchpan, binding); + }, + + unbind: function unbind (el) { + var ctx = el.__qtouchpan_old || el.__qtouchpan; + + if (ctx !== void 0) { + cleanEvt(ctx, 'main'); + cleanEvt(ctx, 'temp'); + + client.is.firefox === true && preventDraggable(el, false); + ctx.styleCleanup !== void 0 && ctx.styleCleanup(); + + delete el[el.__qtouchpan_old ? '__qtouchpan_old' : '__qtouchpan']; + } + } + }; + + // PGDOWN, LEFT, DOWN, PGUP, RIGHT, UP + var keyCodes = [34, 37, 40, 33, 39, 38]; + + function getRatio (evt, dragging, reverse) { + var + pos = position(evt), + val = between((pos.left - dragging.left) / dragging.width, 0, 1); + + return reverse === true ? 1.0 - val : val + } + + function getModel (ratio, min, max, step, decimals) { + var model = min + ratio * (max - min); + + if (step > 0) { + var modulo = (model - min) % step; + model += (Math.abs(modulo) >= step / 2 ? (modulo < 0 ? -1 : 1) * step : 0) - modulo; + } + + if (decimals > 0) { + model = parseFloat(model.toFixed(decimals)); + } + + return between(model, min, max) + } + + var SliderMixin = { + mixins: [ DarkMixin, FormMixin ], + + directives: { + TouchPan: TouchPan + }, + + props: { + min: { + type: Number, + default: 0 + }, + max: { + type: Number, + default: 100 + }, + step: { + type: Number, + default: 1, + validator: function (v) { return v >= 0; } + }, + + color: String, + + labelColor: String, + labelTextColor: String, + dense: Boolean, + + label: Boolean, + labelAlways: Boolean, + markers: Boolean, + snap: Boolean, + + reverse: Boolean, + + disable: Boolean, + readonly: Boolean, + tabindex: [String, Number], + + thumbPath: { + type: String, + default: 'M 4, 10 a 6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0' + } + }, + + data: function data () { + return { + active: false, + preventFocus: false, + focus: false + } + }, + + computed: { + classes: function classes () { + return "q-slider q-slider--" + (this.active === true ? '' : 'in') + "active" + + (this.isReversed === true ? ' q-slider--reversed' : '') + + (this.color !== void 0 ? (" text-" + (this.color)) : '') + + (this.disable === true ? ' disabled' : '') + + (this.editable === true ? ' q-slider--editable' : '') + + (this.focus === 'both' ? ' q-slider--focus' : '') + + (this.label || this.labelAlways === true ? ' q-slider--label' : '') + + (this.labelAlways === true ? ' q-slider--label-always' : '') + + (this.isDark === true ? ' q-slider--dark' : '') + + (this.dense === true ? ' q-slider--dense' : '') + }, + + editable: function editable () { + return !this.disable && !this.readonly + }, + + decimals: function decimals () { + return (String(this.step).trim('0').split('.')[1] || '').length + }, + + computedStep: function computedStep () { + return this.step === 0 ? 1 : this.step + }, + + markerStyle: function markerStyle () { + return { + backgroundSize: 100 * this.computedStep / (this.max - this.min) + '% 2px' + } + }, + + computedTabindex: function computedTabindex () { + return this.editable === true ? this.tabindex || 0 : -1 + }, + + isReversed: function isReversed () { + return this.reverse !== (this.$q.lang.rtl === true) + }, + + horizProp: function horizProp () { + return this.isReversed === true ? 'right' : 'left' + }, + + attrs: function attrs () { + var attrs = { + role: 'slider', + 'aria-valuemin': this.min, + 'aria-valuemax': this.max, + 'aria-orientation': 'horizontal', + 'data-step': this.step + }; + + if (this.disable === true) { + attrs['aria-disabled'] = ''; + } + + return attrs + } + }, + + methods: { + __getThumbSvg: function __getThumbSvg (h) { + return h('svg', { + staticClass: 'q-slider__thumb absolute', + attrs: { focusable: 'false' /* needed for IE11 */, viewBox: '0 0 20 20', width: '20', height: '20' } + }, [ + h('path', { + attrs: { + d: this.thumbPath + } + }) + ]) + }, + + __getPinStyle: function __getPinStyle (percent, ratio) { + var obj; + + var offset = (Math.ceil(20 * Math.abs(0.5 - ratio))) + "px"; + return { + pin: { + transformOrigin: ((this.$q.lang.rtl === true ? offset : (this.$q.platform.is.ie === true ? '100%' : ("calc(100% - " + offset + ")"))) + " 50%") + }, + + pinTextContainer: ( obj = {}, obj[this.$q.lang.rtl === true ? 'left' : 'right'] = ((percent * 100) + "%"), obj.transform = ("translateX(" + (Math.ceil((this.$q.lang.rtl === true ? -1 : 1) * 20 * percent)) + "px)"), obj ) + } + }, + + __pan: function __pan (event) { + if (event.isFinal) { + if (this.dragging) { + this.__updatePosition(event.evt); + // only if touch, because we also have mousedown/up: + event.touch === true && this.__updateValue(true); + this.dragging = false; + } + this.active = false; + } + else if (event.isFirst) { + this.dragging = this.__getDragging(event.evt); + this.__updatePosition(event.evt); + this.__updateValue(); + this.active = true; + } + else { + this.__updatePosition(event.evt); + this.__updateValue(); + } + }, + + __blur: function __blur () { + this.focus = false; + }, + + __activate: function __activate (evt) { + this.__updatePosition(evt, this.__getDragging(evt)); + this.__updateValue(); + + this.preventFocus = true; + this.active = true; + + document.addEventListener('mouseup', this.__deactivate, true); + }, + + __deactivate: function __deactivate () { + this.preventFocus = false; + this.active = false; + + this.__updateValue(true); + this.__blur(); + + document.removeEventListener('mouseup', this.__deactivate, true); + }, + + __mobileClick: function __mobileClick (evt) { + this.__updatePosition(evt, this.__getDragging(evt)); + this.__updateValue(true); + }, + + __keyup: function __keyup (evt) { + if (keyCodes.includes(evt.keyCode)) { + this.__updateValue(true); + } + } + }, + + beforeDestroy: function beforeDestroy () { + document.removeEventListener('mouseup', this.__deactivate, true); + } + }; + + var QSlider = Vue.extend({ + name: 'QSlider', + + mixins: [ SliderMixin ], + + props: { + value: { + required: true, + default: null, + validator: function (v) { return typeof v === 'number' || v === null; } + }, + + labelValue: [String, Number] + }, + + data: function data () { + return { + model: this.value === null ? this.min : this.value, + curRatio: 0 + } + }, + + watch: { + value: function value (v) { + this.model = v === null + ? 0 + : between(v, this.min, this.max); + }, + + min: function min (v) { + this.model = between(this.model, v, this.max); + }, + + max: function max (v) { + this.model = between(this.model, this.min, v); + } + }, + + computed: { + ratio: function ratio () { + return this.active === true ? this.curRatio : this.modelRatio + }, + + modelRatio: function modelRatio () { + return (this.model - this.min) / (this.max - this.min) + }, + + trackStyle: function trackStyle () { + var obj; + + return ( obj = {}, obj[this.horizProp] = 0, obj.width = 100 * this.ratio + '%', obj ) + }, + + thumbStyle: function thumbStyle () { + var obj; + + return ( obj = {}, obj[this.horizProp] = (100 * this.ratio) + '%', obj ) + }, + + thumbClass: function thumbClass () { + if (this.preventFocus === false && this.focus === true) { + return 'q-slider--focus' + } + }, + + pinClass: function pinClass () { + if (this.labelColor !== void 0) { + return ("text-" + (this.labelColor)) + } + }, + + pinTextClass: function pinTextClass () { + return 'q-slider__pin-value-marker-text' + + (this.labelTextColor !== void 0 ? (" text-" + (this.labelTextColor)) : '') + }, + + events: function events () { + if (this.editable === true) { + return this.$q.platform.is.mobile === true + ? { click: this.__mobileClick } + : { + mousedown: this.__activate, + focus: this.__focus, + blur: this.__blur, + keydown: this.__keydown, + keyup: this.__keyup + } + } + }, + + computedLabel: function computedLabel () { + return this.labelValue !== void 0 + ? this.labelValue + : this.model + }, + + pinStyle: function pinStyle () { + var percent = (this.reverse === true ? -this.ratio : this.ratio - 1); + return this.__getPinStyle(percent, this.ratio) + } + }, + + methods: { + __updateValue: function __updateValue (change) { + if (this.model !== this.value) { + this.$emit('input', this.model); + } + change === true && this.$emit('change', this.model); + }, + + __getDragging: function __getDragging () { + return this.$el.getBoundingClientRect() + }, + + __updatePosition: function __updatePosition (event, dragging) { + if ( dragging === void 0 ) dragging = this.dragging; + + var ratio = getRatio( + event, + dragging, + this.isReversed + ); + + this.model = getModel(ratio, this.min, this.max, this.step, this.decimals); + this.curRatio = this.snap !== true || this.step === 0 + ? ratio + : (this.model - this.min) / (this.max - this.min); + }, + + __focus: function __focus () { + this.focus = true; + }, + + __keydown: function __keydown (evt) { + if (!keyCodes.includes(evt.keyCode)) { + return + } + + stopAndPrevent(evt); + + var + step = ([34, 33].includes(evt.keyCode) ? 10 : 1) * this.computedStep, + offset = [34, 37, 40].includes(evt.keyCode) ? -step : step; + + this.model = between( + parseFloat((this.model + offset).toFixed(this.decimals)), + this.min, + this.max + ); + + this.__updateValue(); + } + }, + + render: function render (h) { + var child = [ + this.__getThumbSvg(h), + h('div', { staticClass: 'q-slider__focus-ring' }) + ]; + + if (this.label === true || this.labelAlways === true) { + child.push( + h('div', { + staticClass: 'q-slider__pin absolute', + style: this.pinStyle.pin, + class: this.pinClass + }, [ + h('div', { staticClass: 'q-slider__pin-text-container', style: this.pinStyle.pinTextContainer }, [ + h('span', { + staticClass: 'q-slider__pin-text', + class: this.pinTextClass + }, [ + this.computedLabel + ]) + ]) + ]), + + h('div', { + staticClass: 'q-slider__arrow', + class: this.pinClass + }) + ); + } + + if (this.name !== void 0 && this.disable !== true) { + this.__injectFormInput(child, 'push'); + } + + var track = [ + h('div', { + staticClass: 'q-slider__track absolute', + style: this.trackStyle + }) + ]; + + this.markers === true && track.push( + h('div', { + staticClass: 'q-slider__track-markers absolute-full fit', + style: this.markerStyle + }) + ); + + return h('div', { + staticClass: this.value === null ? ' q-slider--no-value' : '', + attrs: Object.assign({}, this.attrs, + {'aria-valuenow': this.value, + tabindex: this.computedTabindex}), + class: this.classes, + on: this.events, + directives: this.editable === true ? cache(this, 'dir', [{ + name: 'touch-pan', + value: this.__pan, + modifiers: { + horizontal: true, + prevent: true, + stop: true, + mouse: true, + mouseAllDir: true + } + }]) : null + }, [ + h('div', { + staticClass: 'q-slider__track-container absolute' + }, track), + + h('div', { + staticClass: 'q-slider__thumb-container absolute non-selectable', + class: this.thumbClass, + style: this.thumbStyle + }, child) + ]) + } + }); + + // using it to manage SSR rendering with best performance + + var CanRenderMixin = { + data: function data () { + return { + canRender: !onSSR + } + }, + + mounted: function mounted () { + this.canRender === false && (this.canRender = true); + } + }; + + var QResizeObserver = Vue.extend({ + name: 'QResizeObserver', + + mixins: [ CanRenderMixin ], + + props: { + debounce: { + type: [ String, Number ], + default: 100 + } + }, + + data: function data () { + return this.hasObserver === true + ? {} + : { url: this.$q.platform.is.ie === true ? null : 'about:blank' } + }, + + methods: { + trigger: function trigger (now) { + if (now === true || this.debounce === 0 || this.debounce === '0') { + this.__onResize(); + } + else if (!this.timer) { + this.timer = setTimeout(this.__onResize, this.debounce); + } + }, + + __onResize: function __onResize () { + this.timer = null; + + if (!this.$el || !this.$el.parentNode) { + return + } + + var + parent = this.$el.parentNode, + size = { + width: parent.offsetWidth, + height: parent.offsetHeight + }; + + if (size.width === this.size.width && size.height === this.size.height) { + return + } + + this.size = size; + this.$emit('resize', this.size); + }, + + __cleanup: function __cleanup () { + if (this.curDocView !== void 0) { + // iOS is fuzzy, need to check it first + if (this.curDocView.removeEventListener !== void 0) { + this.curDocView.removeEventListener('resize', this.trigger, listenOpts.passive); + } + this.curDocView = void 0; + } + }, + + __onObjLoad: function __onObjLoad () { + this.__cleanup(); + + if (this.$el.contentDocument) { + this.curDocView = this.$el.contentDocument.defaultView; + this.curDocView.addEventListener('resize', this.trigger, listenOpts.passive); + } + + this.__onResize(); + } + }, + + render: function render (h) { + if (this.canRender === false || this.hasObserver === true) { + return + } + + return h('object', { + style: this.style, + attrs: { + tabindex: -1, // fix for Firefox + type: 'text/html', + data: this.url, + 'aria-hidden': 'true' + }, + on: cache(this, 'load', { + load: this.__onObjLoad + }) + }) + }, + + beforeCreate: function beforeCreate () { + this.size = { width: -1, height: -1 }; + if (isSSR === true) { return } + + this.hasObserver = typeof ResizeObserver !== 'undefined'; + + if (this.hasObserver !== true) { + this.style = (this.$q.platform.is.ie ? 'visibility:hidden;' : '') + "display:block;position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1;"; + } + }, + + mounted: function mounted () { + if (this.hasObserver === true) { + this.observer = new ResizeObserver(this.trigger); + this.observer.observe(this.$el.parentNode); + this.__onResize(); + return + } + + if (this.$q.platform.is.ie === true) { + this.url = 'about:blank'; + this.__onResize(); + } + else { + this.__onObjLoad(); + } + }, + + beforeDestroy: function beforeDestroy () { + clearTimeout(this.timer); + + if (this.hasObserver === true) { + this.$el.parentNode && this.observer.unobserve(this.$el.parentNode); + return + } + + this.__cleanup(); + } + }); + + function getIndicatorClass (color, top, vertical) { + var pos = vertical === true + ? ['left', 'right'] + : ['top', 'bottom']; + + return ("absolute-" + (top === true ? pos[0] : pos[1]) + (color ? (" text-" + color) : '')) + } + + function bufferPrioritySort (t1, t2) { + if (t1.priorityMatched === t2.priorityMatched) { + return t2.priorityHref - t1.priorityHref + } + return t2.priorityMatched - t1.priorityMatched + } + + function bufferCleanSelected (t) { + t.selected = false; + return t + } + + var + bufferFilters = [ + function (t) { return t.selected === true && t.exact === true && t.redirected !== true }, + function (t) { return t.selected === true && t.exact === true }, + function (t) { return t.selected === true && t.redirected !== true }, + function (t) { return t.selected === true }, + function (t) { return t.exact === true && t.redirected !== true }, + function (t) { return t.redirected !== true }, + function (t) { return t.exact === true }, + function (t) { return true } + ], + bufferFiltersLen = bufferFilters.length; + + var QTabs = Vue.extend({ + name: 'QTabs', + + mixins: [ TimeoutMixin ], + + provide: function provide () { + return { + tabs: this.tabs, + __recalculateScroll: this.__recalculateScroll, + __activateTab: this.__activateTab, + __activateRoute: this.__activateRoute + } + }, + + props: { + value: [Number, String], + + align: { + type: String, + default: 'center', + validator: function (v) { return ['left', 'center', 'right', 'justify'].includes(v); } + }, + breakpoint: { + type: [String, Number], + default: 600 + }, + + vertical: Boolean, + shrink: Boolean, + stretch: Boolean, + + activeColor: String, + activeBgColor: String, + indicatorColor: String, + leftIcon: String, + rightIcon: String, + + switchIndicator: Boolean, + + narrowIndicator: Boolean, + inlineLabel: Boolean, + noCaps: Boolean, + + dense: Boolean + }, + + data: function data () { + return { + tabs: { + current: this.value, + activeColor: this.activeColor, + activeBgColor: this.activeBgColor, + indicatorClass: getIndicatorClass( + this.indicatorColor, + this.switchIndicator, + this.vertical + ), + narrowIndicator: this.narrowIndicator, + inlineLabel: this.inlineLabel, + noCaps: this.noCaps + }, + scrollable: false, + leftArrow: true, + rightArrow: false, + justify: false + } + }, + + watch: { + value: function value (name) { + this.__activateTab(name, true, true); + }, + + activeColor: function activeColor (v) { + this.tabs.activeColor = v; + }, + + activeBgColor: function activeBgColor (v) { + this.tabs.activeBgColor = v; + }, + + vertical: function vertical (v) { + this.tabs.indicatorClass = getIndicatorClass(this.indicatorColor, this.switchIndicator, v); + }, + + indicatorColor: function indicatorColor (v) { + this.tabs.indicatorClass = getIndicatorClass(v, this.switchIndicator, this.vertical); + }, + + switchIndicator: function switchIndicator (v) { + this.tabs.indicatorClass = getIndicatorClass(this.indicatorColor, v, this.vertical); + }, + + narrowIndicator: function narrowIndicator (v) { + this.tabs.narrowIndicator = v; + }, + + inlineLabel: function inlineLabel (v) { + this.tabs.inlineLabel = v; + }, + + noCaps: function noCaps (v) { + this.tabs.noCaps = v; + } + }, + + computed: { + alignClass: function alignClass () { + var align = this.scrollable === true + ? 'left' + : (this.justify === true ? 'justify' : this.align); + + return ("q-tabs__content--align-" + align) + }, + + classes: function classes () { + return "q-tabs--" + (this.scrollable === true ? '' : 'not-') + "scrollable" + + " q-tabs--" + (this.vertical === true ? 'vertical' : 'horizontal') + + (this.dense === true ? ' q-tabs--dense' : '') + + (this.shrink === true ? ' col-shrink' : '') + + (this.stretch === true ? ' self-stretch' : '') + }, + + domProps: function domProps () { + return this.vertical === true + ? { container: 'height', content: 'scrollHeight', posLeft: 'top', posRight: 'bottom' } + : { container: 'width', content: 'scrollWidth', posLeft: 'left', posRight: 'right' } + } + }, + + methods: { + __activateTab: function __activateTab (name, setCurrent, skipEmit) { + if (this.tabs.current !== name) { + skipEmit !== true && this.$emit('input', name); + if (setCurrent === true || this.$listeners.input === void 0) { + this.__animate(this.tabs.current, name); + this.tabs.current = name; + } + } + }, + + __activateRoute: function __activateRoute (params) { + var this$1 = this; + + if (this.bufferRoute !== this.$route && this.buffer.length > 0) { + clearTimeout(this.bufferTimer); + this.bufferTimer = void 0; + this.buffer.length = 0; + } + this.bufferRoute = this.$route; + + if (params !== void 0) { + if (params.remove === true) { + this.buffer = this.buffer.filter(function (t) { return t.name !== params.name; }); + } + else { + this.buffer.push(params); + } + } + + if (this.bufferTimer === void 0) { + this.bufferTimer = setTimeout(function () { + var tabs = []; + + for (var i = 0; i < bufferFiltersLen && tabs.length === 0; i++) { + tabs = this$1.buffer.filter(bufferFilters[i]); + } + + tabs.sort(bufferPrioritySort); + this$1.__activateTab(tabs.length === 0 ? null : tabs[0].name, true); + this$1.buffer = this$1.buffer.map(bufferCleanSelected); + this$1.bufferTimer = void 0; + }, 1); + } + }, + + __recalculateScroll: function __recalculateScroll () { + var this$1 = this; + + this.__nextTick(function () { + this$1._isDestroyed !== true && this$1.__updateContainer({ + width: this$1.$el.offsetWidth, + height: this$1.$el.offsetHeight + }); + }); + + this.__prepareTick(); + }, + + __updateContainer: function __updateContainer (domSize) { + var this$1 = this; + + var + size = domSize[this.domProps.container], + scrollSize = this.$refs.content[this.domProps.content], + scroll = size > 0 && scrollSize > size; // when there is no tab, in Chrome, size === 0 and scrollSize === 1 + + if (this.scrollable !== scroll) { + this.scrollable = scroll; + } + + // Arrows need to be updated even if the scroll status was already true + scroll === true && this.$nextTick(function () { return this$1.__updateArrows(); }); + + var justify = size < parseInt(this.breakpoint, 10); + + if (this.justify !== justify) { + this.justify = justify; + } + }, + + __animate: function __animate (oldName, newName) { + var this$1 = this; + + var + oldTab = oldName !== void 0 && oldName !== null && oldName !== '' + ? this.$children.find(function (tab) { return tab.name === oldName; }) + : null, + newTab = newName !== void 0 && newName !== null && newName !== '' + ? this.$children.find(function (tab) { return tab.name === newName; }) + : null; + + if (oldTab && newTab) { + var + oldEl = oldTab.$el.getElementsByClassName('q-tab__indicator')[0], + newEl = newTab.$el.getElementsByClassName('q-tab__indicator')[0]; + + clearTimeout(this.animateTimer); + + oldEl.style.transition = 'none'; + oldEl.style.transform = 'none'; + newEl.style.transition = 'none'; + newEl.style.transform = 'none'; + + var + oldPos = oldEl.getBoundingClientRect(), + newPos = newEl.getBoundingClientRect(); + + newEl.style.transform = this.vertical === true + ? ("translate3d(0," + (oldPos.top - newPos.top) + "px,0) scale3d(1," + (newPos.height ? oldPos.height / newPos.height : 1) + ",1)") + : ("translate3d(" + (oldPos.left - newPos.left) + "px,0,0) scale3d(" + (newPos.width ? oldPos.width / newPos.width : 1) + ",1,1)"); + + // allow scope updates to kick in + this.$nextTick(function () { + this$1.animateTimer = setTimeout(function () { + newEl.style.transition = 'transform .25s cubic-bezier(.4, 0, .2, 1)'; + newEl.style.transform = 'none'; + }, 30); + }); + } + + if (newTab && this.scrollable === true) { + var ref = this.$refs.content.getBoundingClientRect(); + var left = ref.left; + var width = ref.width; + var top = ref.top; + var height = ref.height; + var newPos$1 = newTab.$el.getBoundingClientRect(); + + var offset = this.vertical === true ? newPos$1.top - top : newPos$1.left - left; + + if (offset < 0) { + this.$refs.content[this.vertical === true ? 'scrollTop' : 'scrollLeft'] += offset; + this.__updateArrows(); + return + } + + offset += this.vertical === true ? newPos$1.height - height : newPos$1.width - width; + if (offset > 0) { + this.$refs.content[this.vertical === true ? 'scrollTop' : 'scrollLeft'] += offset; + this.__updateArrows(); + } + } + }, + + __updateArrows: function __updateArrows () { + var + content = this.$refs.content, + rect = content.getBoundingClientRect(), + pos = this.vertical === true ? content.scrollTop : content.scrollLeft; + + this.leftArrow = pos > 0; + this.rightArrow = this.vertical === true + ? Math.ceil(pos + rect.height) < content.scrollHeight + : Math.ceil(pos + rect.width) < content.scrollWidth; + }, + + __animScrollTo: function __animScrollTo (value) { + var this$1 = this; + + this.__stopAnimScroll(); + this.__scrollTowards(value); + + this.scrollTimer = setInterval(function () { + if (this$1.__scrollTowards(value)) { + this$1.__stopAnimScroll(); + } + }, 5); + }, + + __scrollToStart: function __scrollToStart () { + this.__animScrollTo(0); + }, + + __scrollToEnd: function __scrollToEnd () { + this.__animScrollTo(9999); + }, + + __stopAnimScroll: function __stopAnimScroll () { + clearInterval(this.scrollTimer); + }, + + __scrollTowards: function __scrollTowards (value) { + var + content = this.$refs.content, + pos = this.vertical === true ? content.scrollTop : content.scrollLeft, + direction = value < pos ? -1 : 1, + done = false; + + pos += direction * 5; + if (pos < 0) { + done = true; + pos = 0; + } + else if ( + (direction === -1 && pos <= value) || + (direction === 1 && pos >= value) + ) { + done = true; + pos = value; + } + + content[this.vertical === true ? 'scrollTop' : 'scrollLeft'] = pos; + this.__updateArrows(); + return done + } + }, + + created: function created () { + this.buffer = []; + + if (this.$q.platform.is.desktop !== true) { + this.__updateArrows = noop; + } + }, + + beforeDestroy: function beforeDestroy () { + clearTimeout(this.bufferTimer); + clearTimeout(this.animateTimer); + }, + + render: function render (h) { + var child = [ + h(QResizeObserver, { + on: cache(this, 'resize', { resize: this.__updateContainer }) + }), + + h('div', { + ref: 'content', + staticClass: 'q-tabs__content row no-wrap items-center self-stretch hide-scrollbar', + class: this.alignClass + }, slot(this, 'default')) + ]; + + this.$q.platform.is.desktop === true && child.push( + h(QIcon, { + staticClass: 'q-tabs__arrow q-tabs__arrow--left absolute q-tab__icon', + class: this.leftArrow === true ? '' : 'q-tabs__arrow--faded', + props: { name: this.leftIcon || (this.vertical === true ? this.$q.iconSet.tabs.up : this.$q.iconSet.tabs.left) }, + nativeOn: { + mousedown: this.__scrollToStart, + touchstart: this.__scrollToStart, + mouseup: this.__stopAnimScroll, + mouseleave: this.__stopAnimScroll, + touchend: this.__stopAnimScroll + } + }), + + h(QIcon, { + staticClass: 'q-tabs__arrow q-tabs__arrow--right absolute q-tab__icon', + class: this.rightArrow === true ? '' : 'q-tabs__arrow--faded', + props: { name: this.rightIcon || (this.vertical === true ? this.$q.iconSet.tabs.down : this.$q.iconSet.tabs.right) }, + nativeOn: { + mousedown: this.__scrollToEnd, + touchstart: this.__scrollToEnd, + mouseup: this.__stopAnimScroll, + mouseleave: this.__stopAnimScroll, + touchend: this.__stopAnimScroll + } + }) + ); + + return h('div', { + staticClass: 'q-tabs row no-wrap items-center', + class: this.classes, + on: Object.assign({}, {input: stop}, + this.$listeners), + attrs: { role: 'tablist' } + }, child) + } + }); + + var uid$1 = 0; + + var QTab = Vue.extend({ + name: 'QTab', + + mixins: [ RippleMixin ], + + inject: { + tabs: { + default: function default$1 () { + console.error('QTab/QRouteTab components need to be child of QTabs'); + } + }, + __activateTab: {}, + __recalculateScroll: {} + }, + + props: { + icon: String, + label: [Number, String], + + alert: [Boolean, String], + + name: { + type: [Number, String], + default: function () { return ("t_" + (uid$1++)); } + }, + + noCaps: Boolean, + + tabindex: [String, Number], + disable: Boolean + }, + + computed: { + isActive: function isActive () { + return this.tabs.current === this.name + }, + + classes: function classes () { + var obj; + + return ( obj = {}, obj[("q-tab--" + (this.isActive ? '' : 'in') + "active")] = true, obj[("text-" + (this.tabs.activeColor))] = this.isActive && this.tabs.activeColor, obj[("bg-" + (this.tabs.activeBgColor))] = this.isActive && this.tabs.activeBgColor, obj['q-tab--full'] = this.icon && this.label && !this.tabs.inlineLabel, obj['q-tab--no-caps'] = this.noCaps === true || this.tabs.noCaps === true, obj['q-focusable q-hoverable cursor-pointer'] = !this.disable, obj.disabled = this.disable, obj ) + }, + + computedTabIndex: function computedTabIndex () { + return this.disable === true || this.isActive === true ? -1 : this.tabindex || 0 + } + }, + + methods: { + __activate: function __activate (e, keyboard) { + keyboard !== true && this.$refs.blurTarget !== void 0 && this.$refs.blurTarget.focus(); + + if (this.disable !== true) { + this.$listeners.click !== void 0 && this.$emit('click', e); + this.__activateTab(this.name); + } + }, + + __onKeyup: function __onKeyup (e) { + isKeyCode(e, 13) === true && this.__activate(e, true); + }, + + __getContent: function __getContent (h) { + var + narrow = this.tabs.narrowIndicator, + content = [], + indicator = h('div', { + staticClass: 'q-tab__indicator', + class: this.tabs.indicatorClass + }); + + this.icon !== void 0 && content.push(h(QIcon, { + staticClass: 'q-tab__icon', + props: { name: this.icon } + })); + + this.label !== void 0 && content.push(h('div', { + staticClass: 'q-tab__label' + }, [ this.label ])); + + this.alert !== false && content.push(h('div', { + staticClass: 'q-tab__alert', + class: this.alert !== true ? ("text-" + (this.alert)) : null + })); + + narrow && content.push(indicator); + + var node = [ + h('div', { staticClass: 'q-focus-helper', attrs: { tabindex: -1 }, ref: 'blurTarget' }), + + h('div', { + staticClass: 'q-tab__content self-stretch flex-center relative-position q-anchor--skip non-selectable', + class: this.tabs.inlineLabel === true ? 'row no-wrap q-tab__content--inline' : 'column' + }, mergeSlot(content, this, 'default')) + ]; + + !narrow && node.push(indicator); + + return node + }, + + __renderTab: function __renderTab (h, tag, props) { + var data = { + staticClass: 'q-tab relative-position self-stretch flex flex-center text-center', + class: this.classes, + attrs: { + tabindex: this.computedTabIndex, + role: 'tab', + 'aria-selected': this.isActive + }, + directives: this.ripple !== false && this.disable === true ? null : [ + { name: 'ripple', value: this.ripple } + ] + }; + data[tag === 'div' ? 'on' : 'nativeOn'] = Object.assign({}, {input: stop}, + this.$listeners, + {click: this.__activate, + keyup: this.__onKeyup}); + + if (props !== void 0) { + data.props = props; + } + + return h(tag, data, this.__getContent(h)) + } + }, + + mounted: function mounted () { + this.__recalculateScroll(); + }, + + beforeDestroy: function beforeDestroy () { + this.__recalculateScroll(); + }, + + render: function render (h) { + return this.__renderTab(h, 'div') + } + }); + + var QTabPanels = Vue.extend({ + name: 'QTabPanels', + + mixins: [ DarkMixin, PanelParentMixin ], + + computed: { + classes: function classes () { + return 'q-tab-panels q-panel-parent' + + (this.isDark === true ? ' q-tab-panels--dark q-dark' : '') + } + }, + + methods: { + __renderPanels: function __renderPanels (h) { + return h('div', { + class: this.classes, + directives: this.panelDirectives, + on: this.$listeners + }, this.__getPanelContent(h)) + } + } + }); + + var QTabPanel = Vue.extend({ + name: 'QTabPanel', + + mixins: [ PanelChildMixin ], + + render: function render (h) { + return h('div', { + staticClass: 'q-tab-panel', + on: this.$listeners + }, slot(this, 'default')) + } + }); + + var palette = [ + 'rgb(255,204,204)', 'rgb(255,230,204)', 'rgb(255,255,204)', 'rgb(204,255,204)', 'rgb(204,255,230)', 'rgb(204,255,255)', 'rgb(204,230,255)', 'rgb(204,204,255)', 'rgb(230,204,255)', 'rgb(255,204,255)', + 'rgb(255,153,153)', 'rgb(255,204,153)', 'rgb(255,255,153)', 'rgb(153,255,153)', 'rgb(153,255,204)', 'rgb(153,255,255)', 'rgb(153,204,255)', 'rgb(153,153,255)', 'rgb(204,153,255)', 'rgb(255,153,255)', + 'rgb(255,102,102)', 'rgb(255,179,102)', 'rgb(255,255,102)', 'rgb(102,255,102)', 'rgb(102,255,179)', 'rgb(102,255,255)', 'rgb(102,179,255)', 'rgb(102,102,255)', 'rgb(179,102,255)', 'rgb(255,102,255)', + 'rgb(255,51,51)', 'rgb(255,153,51)', 'rgb(255,255,51)', 'rgb(51,255,51)', 'rgb(51,255,153)', 'rgb(51,255,255)', 'rgb(51,153,255)', 'rgb(51,51,255)', 'rgb(153,51,255)', 'rgb(255,51,255)', + 'rgb(255,0,0)', 'rgb(255,128,0)', 'rgb(255,255,0)', 'rgb(0,255,0)', 'rgb(0,255,128)', 'rgb(0,255,255)', 'rgb(0,128,255)', 'rgb(0,0,255)', 'rgb(128,0,255)', 'rgb(255,0,255)', + 'rgb(245,0,0)', 'rgb(245,123,0)', 'rgb(245,245,0)', 'rgb(0,245,0)', 'rgb(0,245,123)', 'rgb(0,245,245)', 'rgb(0,123,245)', 'rgb(0,0,245)', 'rgb(123,0,245)', 'rgb(245,0,245)', + 'rgb(214,0,0)', 'rgb(214,108,0)', 'rgb(214,214,0)', 'rgb(0,214,0)', 'rgb(0,214,108)', 'rgb(0,214,214)', 'rgb(0,108,214)', 'rgb(0,0,214)', 'rgb(108,0,214)', 'rgb(214,0,214)', + 'rgb(163,0,0)', 'rgb(163,82,0)', 'rgb(163,163,0)', 'rgb(0,163,0)', 'rgb(0,163,82)', 'rgb(0,163,163)', 'rgb(0,82,163)', 'rgb(0,0,163)', 'rgb(82,0,163)', 'rgb(163,0,163)', + 'rgb(92,0,0)', 'rgb(92,46,0)', 'rgb(92,92,0)', 'rgb(0,92,0)', 'rgb(0,92,46)', 'rgb(0,92,92)', 'rgb(0,46,92)', 'rgb(0,0,92)', 'rgb(46,0,92)', 'rgb(92,0,92)', + 'rgb(255,255,255)', 'rgb(205,205,205)', 'rgb(178,178,178)', 'rgb(153,153,153)', 'rgb(127,127,127)', 'rgb(102,102,102)', 'rgb(76,76,76)', 'rgb(51,51,51)', 'rgb(25,25,25)', 'rgb(0,0,0)' + ]; + + var QColor = Vue.extend({ + name: 'QColor', + + mixins: [ DarkMixin, FormMixin ], + + directives: { + TouchPan: TouchPan + }, + + props: { + value: String, + + defaultValue: String, + defaultView: { + type: String, + default: 'spectrum', + validator: function (v) { return ['spectrum', 'tune', 'palette'].includes(v); } + }, + + formatModel: { + type: String, + default: 'auto', + validator: function (v) { return ['auto', 'hex', 'rgb', 'hexa', 'rgba'].includes(v); } + }, + + palette: Array, + + noHeader: Boolean, + noFooter: Boolean, + + square: Boolean, + flat: Boolean, + bordered: Boolean, + + disable: Boolean, + readonly: Boolean + }, + + data: function data () { + return { + topView: this.formatModel === 'auto' + ? ( + (this.value === void 0 || this.value === null || this.value === '' || this.value.startsWith('#')) + ? 'hex' + : 'rgb' + ) + : (this.formatModel.startsWith('hex') ? 'hex' : 'rgb'), + view: this.defaultView, + model: this.__parseModel(this.value || this.defaultValue) + } + }, + + watch: { + value: function value (v) { + var model = this.__parseModel(v || this.defaultValue); + if (model.hex !== this.model.hex) { + this.model = model; + } + }, + + defaultValue: function defaultValue (v) { + if (!this.value && v) { + var model = this.__parseModel(v); + if (model.hex !== this.model.hex) { + this.model = model; + } + } + } + }, + + computed: { + editable: function editable () { + return this.disable !== true && this.readonly !== true + }, + + forceHex: function forceHex () { + return this.formatModel === 'auto' + ? null + : this.formatModel.indexOf('hex') > -1 + }, + + forceAlpha: function forceAlpha () { + return this.formatModel === 'auto' + ? null + : this.formatModel.indexOf('a') > -1 + }, + + isHex: function isHex () { + return this.value === void 0 || + this.value === null || + this.value === '' || + this.value.startsWith('#') + }, + + isOutputHex: function isOutputHex () { + return this.forceHex !== null + ? this.forceHex + : this.isHex + }, + + formAttrs: function formAttrs () { + return { + type: 'hidden', + name: this.name, + value: this.model[ this.isOutputHex === true ? 'hex' : 'rgb' ] + } + }, + + hasAlpha: function hasAlpha () { + if (this.forceAlpha !== null) { + return this.forceAlpha + } + return this.model.a !== void 0 + }, + + currentBgColor: function currentBgColor () { + return { + backgroundColor: this.model.rgb || '#000' + } + }, + + headerClass: function headerClass () { + var light = this.model.a !== void 0 && this.model.a < 65 + ? true + : luminosity(this.model) > 0.4; + + return ("q-color-picker__header-content--" + (light ? 'light' : 'dark')) + }, + + spectrumStyle: function spectrumStyle () { + return { + background: ("hsl(" + (this.model.h) + ",100%,50%)") + } + }, + + spectrumPointerStyle: function spectrumPointerStyle () { + var obj; + + return ( obj = { + top: ((100 - this.model.v) + "%") + }, obj[this.$q.lang.rtl === true ? 'right' : 'left'] = ((this.model.s) + "%"), obj ) + }, + + inputsArray: function inputsArray () { + var inp = ['r', 'g', 'b']; + if (this.hasAlpha === true) { + inp.push('a'); + } + return inp + }, + + computedPalette: function computedPalette () { + return this.palette !== void 0 && this.palette.length > 0 + ? this.palette + : palette + }, + + classes: function classes () { + return 'q-color-picker' + + (this.bordered === true ? ' q-color-picker--bordered' : '') + + (this.square === true ? ' q-color-picker--square no-border-radius' : '') + + (this.flat === true ? ' q-color-picker--flat no-shadow' : '') + + (this.disable === true ? ' disabled' : '') + + (this.isDark === true ? ' q-color-picker--dark q-dark' : '') + }, + + attrs: function attrs () { + if (this.disable === true) { + return { 'aria-disabled': '' } + } + if (this.readonly === true) { + return { 'aria-readonly': '' } + } + } + }, + + created: function created () { + this.__spectrumChange = throttle(this.__spectrumChange, 20); + }, + + render: function render (h) { + var child = [ this.__getContent(h) ]; + + if (this.name !== void 0 && this.disable !== true) { + this.__injectFormInput(child, 'push'); + } + + this.noHeader !== true && child.unshift( + this.__getHeader(h) + ); + + this.noFooter !== true && child.push( + this.__getFooter(h) + ); + + return h('div', { + class: this.classes, + attrs: this.attrs, + on: this.$listeners + }, child) + }, + + methods: { + __getHeader: function __getHeader (h) { + var this$1 = this; + + return h('div', { + staticClass: 'q-color-picker__header relative-position overflow-hidden' + }, [ + h('div', { staticClass: 'q-color-picker__header-bg absolute-full' }), + + h('div', { + staticClass: 'q-color-picker__header-content absolute-full', + class: this.headerClass, + style: this.currentBgColor + }, [ + h(QTabs, { + props: { + value: this.topView, + dense: true, + align: 'justify' + }, + on: cache(this, 'topVTab', { + input: function (val) { this$1.topView = val; } + }) + }, [ + h(QTab, { + props: { + label: 'HEX' + (this.hasAlpha === true ? 'A' : ''), + name: 'hex', + ripple: false + } + }), + + h(QTab, { + props: { + label: 'RGB' + (this.hasAlpha === true ? 'A' : ''), + name: 'rgb', + ripple: false + } + }) + ]), + + h('div', { + staticClass: 'q-color-picker__header-banner row flex-center no-wrap' + }, [ + h('input', { + staticClass: 'fit', + domProps: { value: this.model[this.topView] }, + attrs: this.editable !== true ? { + readonly: true + } : null, + on: cache(this, 'topIn', { + input: function (evt) { + this$1.__updateErrorIcon(this$1.__onEditorChange(evt) === true); + }, + change: stop, + blur: function (evt) { + this$1.__onEditorChange(evt, true) === true && this$1.$forceUpdate(); + this$1.__updateErrorIcon(false); + } + }) + }), + + h(QIcon, { + ref: 'errorIcon', + staticClass: 'q-color-picker__error-icon absolute no-pointer-events', + props: { name: this.$q.iconSet.type.negative } + }) + ]) + ]) + ]) + }, + + __getContent: function __getContent (h) { + return h(QTabPanels, { + props: { + value: this.view, + animated: true + } + }, [ + h(QTabPanel, { + staticClass: 'q-color-picker__spectrum-tab overflow-hidden', + props: { name: 'spectrum' } + }, this.__getSpectrumTab(h)), + + h(QTabPanel, { + staticClass: 'q-pa-md q-color-picker__tune-tab', + props: { name: 'tune' } + }, this.__getTuneTab(h)), + + h(QTabPanel, { + staticClass: 'q-color-picker__palette-tab', + props: { name: 'palette' } + }, this.__getPaletteTab(h)) + ]) + }, + + __getFooter: function __getFooter (h) { + var this$1 = this; + + return h('div', { + staticClass: 'q-color-picker__footer relative-position overflow-hidden' + }, [ + h(QTabs, { + staticClass: 'absolute-full', + props: { + value: this.view, + dense: true, + align: 'justify' + }, + on: cache(this, 'ftIn', { + input: function (val) { this$1.view = val; } + }) + }, [ + h(QTab, { + props: { + icon: this.$q.iconSet.colorPicker.spectrum, + name: 'spectrum', + ripple: false + } + }), + + h(QTab, { + props: { + icon: this.$q.iconSet.colorPicker.tune, + name: 'tune', + ripple: false + } + }), + + h(QTab, { + props: { + icon: this.$q.iconSet.colorPicker.palette, + name: 'palette', + ripple: false + } + }) + ]) + ]) + }, + + __getSpectrumTab: function __getSpectrumTab (h) { + var this$1 = this; + + var thumbPath = 'M5 5 h10 v10 h-10 v-10 z'; + + return [ + h('div', { + ref: 'spectrum', + staticClass: 'q-color-picker__spectrum non-selectable relative-position cursor-pointer', + style: this.spectrumStyle, + class: { readonly: this.editable !== true }, + on: this.editable === true + ? cache(this, 'spectrT', { + click: this.__spectrumClick, + mousedown: this.__activate + }) + : null, + directives: this.editable === true + ? cache(this, 'spectrDir', [{ + name: 'touch-pan', + modifiers: { + prevent: true, + stop: true, + mouse: true + }, + value: this.__spectrumPan + }]) + : null + }, [ + h('div', { style: { paddingBottom: '100%' } }), + h('div', { staticClass: 'q-color-picker__spectrum-white absolute-full' }), + h('div', { staticClass: 'q-color-picker__spectrum-black absolute-full' }), + h('div', { + staticClass: 'absolute', + style: this.spectrumPointerStyle + }, [ + this.model.hex !== void 0 ? h('div', { staticClass: 'q-color-picker__spectrum-circle' }) : null + ]) + ]), + + h('div', { + staticClass: 'q-color-picker__sliders' + }, [ + h('div', { staticClass: 'q-color-picker__hue non-selectable' }, [ + h(QSlider, { + props: { + value: this.model.h, + min: 0, + max: 360, + fillHandleAlways: true, + readonly: this.editable !== true, + thumbPath: thumbPath + }, + on: cache(this, 'hueSlide', { + input: this.__onHueChange, + change: function (val) { return this$1.__onHueChange(val, true); } + }) + }) + ]), + this.hasAlpha === true + ? h('div', { staticClass: 'q-color-picker__alpha non-selectable' }, [ + h(QSlider, { + props: { + value: this.model.a, + min: 0, + max: 100, + fillHandleAlways: true, + readonly: this.editable !== true, + thumbPath: thumbPath + }, + on: cache(this, 'alphaSlide', { + input: function (value) { return this$1.__onNumericChange(value, 'a', 100); }, + change: function (value) { return this$1.__onNumericChange(value, 'a', 100, void 0, true); } + }) + }) + ]) + : null + ]) + ] + }, + + __getTuneTab: function __getTuneTab (h) { + var this$1 = this; + + return [ + h('div', { staticClass: 'row items-center no-wrap' }, [ + h('div', ['R']), + h(QSlider, { + props: { + value: this.model.r, + min: 0, + max: 255, + color: 'red', + dark: this.isDark, + readonly: this.editable !== true + }, + on: cache(this, 'rSlide', { + input: function (value) { return this$1.__onNumericChange(value, 'r', 255); }, + change: function (value) { return this$1.__onNumericChange(value, 'r', 255, void 0, true); } + }) + }), + h('input', { + domProps: { + value: this.model.r + }, + attrs: { + maxlength: 3, + readonly: this.editable !== true + }, + on: cache(this, 'rIn', { + input: function (evt) { return this$1.__onNumericChange(evt.target.value, 'r', 255, evt); }, + change: stop, + blur: function (evt) { return this$1.__onNumericChange(evt.target.value, 'r', 255, evt, true); } + }) + }) + ]), + + h('div', { staticClass: 'row items-center no-wrap' }, [ + h('div', ['G']), + h(QSlider, { + props: { + value: this.model.g, + min: 0, + max: 255, + color: 'green', + dark: this.isDark, + readonly: this.editable !== true + }, + on: cache(this, 'gSlide', { + input: function (value) { return this$1.__onNumericChange(value, 'g', 255); }, + change: function (value) { return this$1.__onNumericChange(value, 'g', 255, void 0, true); } + }) + }), + h('input', { + domProps: { + value: this.model.g + }, + attrs: { + maxlength: 3, + readonly: this.editable !== true + }, + on: cache(this, 'gIn', { + input: function (evt) { return this$1.__onNumericChange(evt.target.value, 'g', 255, evt); }, + change: stop, + blur: function (evt) { return this$1.__onNumericChange(evt.target.value, 'g', 255, evt, true); } + }) + }) + ]), + + h('div', { staticClass: 'row items-center no-wrap' }, [ + h('div', ['B']), + h(QSlider, { + props: { + value: this.model.b, + min: 0, + max: 255, + color: 'blue', + readonly: this.editable !== true, + dark: this.isDark + }, + on: cache(this, 'bSlide', { + input: function (value) { return this$1.__onNumericChange(value, 'b', 255); }, + change: function (value) { return this$1.__onNumericChange(value, 'b', 255, void 0, true); } + }) + }), + h('input', { + domProps: { + value: this.model.b + }, + attrs: { + maxlength: 3, + readonly: this.editable !== true + }, + on: cache(this, 'bIn', { + input: function (evt) { return this$1.__onNumericChange(evt.target.value, 'b', 255, evt); }, + change: stop, + blur: function (evt) { return this$1.__onNumericChange(evt.target.value, 'b', 255, evt, true); } + }) + }) + ]), + + this.hasAlpha === true ? h('div', { staticClass: 'row items-center no-wrap' }, [ + h('div', ['A']), + h(QSlider, { + props: { + value: this.model.a, + color: 'grey', + readonly: this.editable !== true, + dark: this.isDark + }, + on: cache(this, 'aSlide', { + input: function (value) { return this$1.__onNumericChange(value, 'a', 100); }, + change: function (value) { return this$1.__onNumericChange(value, 'a', 100, void 0, true); } + }) + }), + h('input', { + domProps: { + value: this.model.a + }, + attrs: { + maxlength: 3, + readonly: this.editable !== true + }, + on: cache(this, 'aIn', { + input: function (evt) { return this$1.__onNumericChange(evt.target.value, 'a', 100, evt); }, + change: stop, + blur: function (evt) { return this$1.__onNumericChange(evt.target.value, 'a', 100, evt, true); } + }) + }) + ]) : null + ] + }, + + __getPaletteTab: function __getPaletteTab (h) { + var this$1 = this; + + return [ + h('div', { + staticClass: 'row items-center q-color-picker__palette-rows', + class: this.editable === true + ? 'q-color-picker__palette-rows--editable' + : '' + }, this.computedPalette.map(function (color) { return h('div', { + staticClass: 'q-color-picker__cube col-auto', + style: { backgroundColor: color }, + on: this$1.editable === true ? cache(this$1, 'palette#' + color, { + click: function () { + this$1.__onPalettePick(color); + } + }) : null + }); })) + ] + }, + + __onSpectrumChange: function __onSpectrumChange (left, top, change) { + var panel = this.$refs.spectrum; + if (panel === void 0) { return } + + var + width = panel.clientWidth, + height = panel.clientHeight, + rect = panel.getBoundingClientRect(); + + var x = Math.min(width, Math.max(0, left - rect.left)); + + if (this.$q.lang.rtl === true) { + x = width - x; + } + + var + y = Math.min(height, Math.max(0, top - rect.top)), + s = Math.round(100 * x / width), + v = Math.round(100 * Math.max(0, Math.min(1, -(y / height) + 1))), + rgb = hsvToRgb({ + h: this.model.h, + s: s, + v: v, + a: this.hasAlpha === true ? this.model.a : void 0 + }); + + this.model.s = s; + this.model.v = v; + this.__update(rgb, change); + }, + + __onHueChange: function __onHueChange (h, change) { + h = Math.round(h); + var rgb = hsvToRgb({ + h: h, + s: this.model.s, + v: this.model.v, + a: this.hasAlpha === true ? this.model.a : void 0 + }); + + this.model.h = h; + this.__update(rgb, change); + }, + + __onNumericChange: function __onNumericChange (value, formatModel, max, evt, change) { + evt !== void 0 && stop(evt); + + if (!/^[0-9]+$/.test(value)) { + change && this.$forceUpdate(); + return + } + + var val = Math.floor(Number(value)); + + if (val < 0 || val > max) { + change === true && this.$forceUpdate(); + return + } + + var rgb = { + r: formatModel === 'r' ? val : this.model.r, + g: formatModel === 'g' ? val : this.model.g, + b: formatModel === 'b' ? val : this.model.b, + a: this.hasAlpha === true + ? (formatModel === 'a' ? val : this.model.a) + : void 0 + }; + + if (formatModel !== 'a') { + var hsv = rgbToHsv(rgb); + this.model.h = hsv.h; + this.model.s = hsv.s; + this.model.v = hsv.v; + } + + this.__update(rgb, change); + + if (evt !== void 0 && change !== true && evt.target.selectionEnd !== void 0) { + var index = evt.target.selectionEnd; + this.$nextTick(function () { + evt.target.setSelectionRange(index, index); + }); + } + }, + + __onEditorChange: function __onEditorChange (evt, change) { + var rgb; + var inp = evt.target.value; + + stop(evt); + + if (this.topView === 'hex') { + if ( + inp.length !== (this.hasAlpha === true ? 9 : 7) || + !/^#[0-9A-Fa-f]+$/.test(inp) + ) { + return true + } + + rgb = hexToRgb(inp); + } + else { + var model; + + if (!inp.endsWith(')')) { + return true + } + else if (this.hasAlpha !== true && inp.startsWith('rgb(')) { + model = inp.substring(4, inp.length - 1).split(',').map(function (n) { return parseInt(n, 10); }); + + if ( + model.length !== 3 || + !/^rgb\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3}\)$/.test(inp) + ) { + return true + } + } + else if (this.hasAlpha === true && inp.startsWith('rgba(')) { + model = inp.substring(5, inp.length - 1).split(','); + + if ( + model.length !== 4 || + !/^rgba\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/.test(inp) + ) { + return true + } + + for (var i = 0; i < 3; i++) { + var v = parseInt(model[i], 10); + if (v < 0 || v > 255) { + return true + } + model[i] = v; + } + + var v$1 = parseFloat(model[3]); + if (v$1 < 0 || v$1 > 1) { + return true + } + model[3] = v$1; + } + else { + return true + } + + if ( + model[0] < 0 || model[0] > 255 || + model[1] < 0 || model[1] > 255 || + model[2] < 0 || model[2] > 255 || + (this.hasAlpha === true && (model[3] < 0 || model[3] > 1)) + ) { + return true + } + + rgb = { + r: model[0], + g: model[1], + b: model[2], + a: this.hasAlpha === true + ? model[3] * 100 + : void 0 + }; + } + + var hsv = rgbToHsv(rgb); + this.model.h = hsv.h; + this.model.s = hsv.s; + this.model.v = hsv.v; + + this.__update(rgb, change); + + if (change !== true) { + var index = evt.target.selectionEnd; + this.$nextTick(function () { + evt.target.setSelectionRange(index, index); + }); + } + }, + + __onPalettePick: function __onPalettePick (color) { + var def = this.__parseModel(color); + var rgb = { r: def.r, g: def.g, b: def.b, a: def.a }; + + if (rgb.a === void 0) { + rgb.a = this.model.a; + } + + this.model.h = def.h; + this.model.s = def.s; + this.model.v = def.v; + + this.__update(rgb, true); + }, + + __update: function __update (rgb, change) { + // update internally + this.model.hex = rgbToHex(rgb); + this.model.rgb = rgbToString(rgb); + this.model.r = rgb.r; + this.model.g = rgb.g; + this.model.b = rgb.b; + this.model.a = rgb.a; + + var value = this.model[this.isOutputHex === true ? 'hex' : 'rgb']; + + // emit new value + this.$emit('input', value); + change === true && this.$emit('change', value); + }, + + __updateErrorIcon: function __updateErrorIcon (val) { + // we MUST avoid vue triggering a render, + // so manually changing this + if (this.$refs.errorIcon !== void 0) { + this.$refs.errorIcon.$el.style.opacity = val ? 1 : 0; + } + }, + + __parseModel: function __parseModel (v) { + var forceAlpha = this.forceAlpha !== void 0 + ? this.forceAlpha + : ( + this.formatModel === 'auto' + ? null + : this.formatModel.indexOf('a') > -1 + ); + + if (v === null || v === void 0 || v === '' || testPattern.anyColor(v) !== true) { + return { + h: 0, + s: 0, + v: 0, + r: 0, + g: 0, + b: 0, + a: forceAlpha === true ? 100 : void 0, + hex: void 0, + rgb: void 0 + } + } + + var model = stringToRgb(v); + + if (forceAlpha === true && model.a === void 0) { + model.a = 100; + } + + model.hex = rgbToHex(model); + model.rgb = rgbToString(model); + + return Object.assign(model, rgbToHsv(model)) + }, + + __spectrumPan: function __spectrumPan (evt) { + if (evt.isFinal) { + this.__onSpectrumChange( + evt.position.left, + evt.position.top, + true + ); + } + else { + this.__spectrumChange(evt); + } + }, + + // throttled in created() + __spectrumChange: function __spectrumChange (evt) { + this.__onSpectrumChange( + evt.position.left, + evt.position.top + ); + }, + + __spectrumClick: function __spectrumClick (evt) { + this.__onSpectrumChange( + evt.pageX - window.pageXOffset, + evt.pageY - window.pageYOffset, + true + ); + }, + + __activate: function __activate (evt) { + this.__onSpectrumChange( + evt.pageX - window.pageXOffset, + evt.pageY - window.pageYOffset + ); + } + } + }); + + // taken from https://github.com/jalaali/jalaali-js + + /* + Jalaali years starting the 33-year rule. + */ + var breaks = [ -61, 9, 38, 199, 426, 686, 756, 818, 1111, 1181, 1210, + 1635, 2060, 2097, 2192, 2262, 2324, 2394, 2456, 3178 + ]; + + /* + Converts a Gregorian date to Jalaali. + */ + function toJalaali (gy, gm, gd) { + if (Object.prototype.toString.call(gy) === '[object Date]') { + gd = gy.getDate(); + gm = gy.getMonth() + 1; + gy = gy.getFullYear(); + } + return d2j(g2d(gy, gm, gd)) + } + + /* + Converts a Jalaali date to Gregorian. + */ + function toGregorian (jy, jm, jd) { + return d2g(j2d(jy, jm, jd)) + } + + /* + Is this a leap year or not? + */ + function isLeapJalaaliYear (jy) { + return jalCalLeap(jy) === 0 + } + + /* + Number of days in a given month in a Jalaali year. + */ + function jalaaliMonthLength (jy, jm) { + if (jm <= 6) { return 31 } + if (jm <= 11) { return 30 } + if (isLeapJalaaliYear(jy)) { return 30 } + return 29 + } + + /* + This function determines if the Jalaali (Persian) year is + leap (366-day long) or is the common year (365 days) + + @param jy Jalaali calendar year (-61 to 3177) + @returns number of years since the last leap year (0 to 4) + */ + function jalCalLeap (jy) { + var bl = breaks.length, + jp = breaks[0], + jm, + jump, + leap, + n, + i; + + if (jy < jp || jy >= breaks[bl - 1]) { throw new Error('Invalid Jalaali year ' + jy) } + + for (i = 1; i < bl; i += 1) { + jm = breaks[i]; + jump = jm - jp; + if (jy < jm) { break } + jp = jm; + } + n = jy - jp; + + if (jump - n < 6) { n = n - jump + div(jump + 4, 33) * 33; } + leap = mod(mod(n + 1, 33) - 1, 4); + if (leap === -1) { + leap = 4; + } + + return leap + } + + /* + This function determines if the Jalaali (Persian) year is + leap (366-day long) or is the common year (365 days), and + finds the day in March (Gregorian calendar) of the first + day of the Jalaali year (jy). + + @param jy Jalaali calendar year (-61 to 3177) + @param withoutLeap when don't need leap (true or false) default is false + @return + leap: number of years since the last leap year (0 to 4) + gy: Gregorian year of the beginning of Jalaali year + march: the March day of Farvardin the 1st (1st day of jy) + @see: http://www.astro.uni.torun.pl/~kb/Papers/EMP/PersianC-EMP.htm + @see: http://www.fourmilab.ch/documents/calendar/ + */ + function jalCal (jy, withoutLeap) { + var bl = breaks.length, + gy = jy + 621, + leapJ = -14, + jp = breaks[0], + jm, + jump, + leap, + leapG, + march, + n, + i; + + if (jy < jp || jy >= breaks[bl - 1]) { throw new Error('Invalid Jalaali year ' + jy) } + + // Find the limiting years for the Jalaali year jy. + for (i = 1; i < bl; i += 1) { + jm = breaks[i]; + jump = jm - jp; + if (jy < jm) { break } + leapJ = leapJ + div(jump, 33) * 8 + div(mod(jump, 33), 4); + jp = jm; + } + n = jy - jp; + + // Find the number of leap years from AD 621 to the beginning + // of the current Jalaali year in the Persian calendar. + leapJ = leapJ + div(n, 33) * 8 + div(mod(n, 33) + 3, 4); + if (mod(jump, 33) === 4 && jump - n === 4) { leapJ += 1; } + + // And the same in the Gregorian calendar (until the year gy). + leapG = div(gy, 4) - div((div(gy, 100) + 1) * 3, 4) - 150; + + // Determine the Gregorian date of Farvardin the 1st. + march = 20 + leapJ - leapG; + + // Find how many years have passed since the last leap year. + if (!withoutLeap) { + if (jump - n < 6) { n = n - jump + div(jump + 4, 33) * 33; } + leap = mod(mod(n + 1, 33) - 1, 4); + if (leap === -1) { + leap = 4; + } + } + + return { + leap: leap, + gy: gy, + march: march + } + } + + /* + Converts a date of the Jalaali calendar to the Julian Day number. + + @param jy Jalaali year (1 to 3100) + @param jm Jalaali month (1 to 12) + @param jd Jalaali day (1 to 29/31) + @return Julian Day number + */ + function j2d (jy, jm, jd) { + var r = jalCal(jy, true); + return g2d(r.gy, 3, r.march) + (jm - 1) * 31 - div(jm, 7) * (jm - 7) + jd - 1 + } + + /* + Converts the Julian Day number to a date in the Jalaali calendar. + + @param jdn Julian Day number + @return + jy: Jalaali year (1 to 3100) + jm: Jalaali month (1 to 12) + jd: Jalaali day (1 to 29/31) + */ + function d2j (jdn) { + var gy = d2g(jdn).gy, // Calculate Gregorian year (gy). + jy = gy - 621, + r = jalCal(jy, false), + jdn1f = g2d(gy, 3, r.march), + jd, + jm, + k; + + // Find number of days that passed since 1 Farvardin. + k = jdn - jdn1f; + if (k >= 0) { + if (k <= 185) { + // The first 6 months. + jm = 1 + div(k, 31); + jd = mod(k, 31) + 1; + return { jy: jy, + jm: jm, + jd: jd + } + } + else { + // The remaining months. + k -= 186; + } + } + else { + // Previous Jalaali year. + jy -= 1; + k += 179; + if (r.leap === 1) { k += 1; } + } + jm = 7 + div(k, 30); + jd = mod(k, 30) + 1; + return { jy: jy, + jm: jm, + jd: jd + } + } + + /* + Calculates the Julian Day number from Gregorian or Julian + calendar dates. This integer number corresponds to the noon of + the date (i.e. 12 hours of Universal Time). + The procedure was tested to be good since 1 March, -100100 (of both + calendars) up to a few million years into the future. + + @param gy Calendar year (years BC numbered 0, -1, -2, ...) + @param gm Calendar month (1 to 12) + @param gd Calendar day of the month (1 to 28/29/30/31) + @return Julian Day number + */ + function g2d (gy, gm, gd) { + var d = div((gy + div(gm - 8, 6) + 100100) * 1461, 4) + + div(153 * mod(gm + 9, 12) + 2, 5) + + gd - 34840408; + d = d - div(div(gy + 100100 + div(gm - 8, 6), 100) * 3, 4) + 752; + return d + } + + /* + Calculates Gregorian and Julian calendar dates from the Julian Day number + (jdn) for the period since jdn=-34839655 (i.e. the year -100100 of both + calendars) to some millions years ahead of the present. + + @param jdn Julian Day number + @return + gy: Calendar year (years BC numbered 0, -1, -2, ...) + gm: Calendar month (1 to 12) + gd: Calendar day of the month M (1 to 28/29/30/31) + */ + function d2g (jdn) { + var j, + i, + gd, + gm, + gy; + j = 4 * jdn + 139361631; + j = j + div(div(4 * jdn + 183187720, 146097) * 3, 4) * 4 - 3908; + i = div(mod(j, 1461), 4) * 5 + 308; + gd = div(mod(i, 153), 5) + 1; + gm = mod(div(i, 153), 12) + 1; + gy = div(j, 1461) - 100100 + div(8 - gm, 6); + return { + gy: gy, + gm: gm, + gd: gd + } + } + + /* + Utility helper functions. + */ + + function div (a, b) { + return ~~(a / b) + } + + function mod (a, b) { + return a - ~~(a / b) * b + } + + var DateTimeMixin = { + mixins: [ DarkMixin, FormMixin ], + + props: { + value: { + required: true + }, + + mask: { + type: String + }, + locale: Object, + + calendar: { + type: String, + validator: function (v) { return ['gregorian', 'persian'].includes(v); }, + default: 'gregorian' + }, + + landscape: Boolean, + + color: String, + textColor: String, + + square: Boolean, + flat: Boolean, + bordered: Boolean, + + readonly: Boolean, + disable: Boolean + }, + + watch: { + mask: function mask () { + var this$1 = this; + + this.$nextTick(function () { + this$1.__updateValue({}, /* reason for QDate only */ 'mask'); + }); + }, + + computedLocale: function computedLocale () { + var this$1 = this; + + this.$nextTick(function () { + this$1.__updateValue({}, /* reason for QDate only */ 'locale'); + }); + } + }, + + computed: { + editable: function editable () { + return this.disable !== true && this.readonly !== true + }, + + computedColor: function computedColor () { + return this.color || 'primary' + }, + + computedTextColor: function computedTextColor () { + return this.textColor || 'white' + }, + + computedTabindex: function computedTabindex () { + return this.editable === true ? 0 : -1 + }, + + headerClass: function headerClass () { + var cls = []; + this.color !== void 0 && cls.push(("bg-" + (this.color))); + this.textColor !== void 0 && cls.push(("text-" + (this.textColor))); + return cls.join(' ') + }, + + computedLocale: function computedLocale () { + return this.__getComputedLocale() + } + }, + + methods: { + __getComputedLocale: function __getComputedLocale () { + return this.locale || this.$q.lang.date + }, + + __getCurrentDate: function __getCurrentDate () { + var d = new Date(); + + if (this.calendar === 'persian') { + var jDate = toJalaali(d); + return { + year: jDate.jy, + month: jDate.jm, + day: jDate.jd + } + } + + return { + year: d.getFullYear(), + month: d.getMonth() + 1, + day: d.getDate() + } + }, + + __getCurrentTime: function __getCurrentTime () { + var d = new Date(); + + return { + hour: d.getHours(), + minute: d.getMinutes(), + second: d.getSeconds(), + millisecond: d.getMilliseconds() + } + } + } + }; + + /* eslint no-fallthrough: 0 */ + + var + MILLISECONDS_IN_DAY = 86400000, + MILLISECONDS_IN_HOUR = 3600000, + MILLISECONDS_IN_MINUTE = 60000, + defaultMask = 'YYYY-MM-DDTHH:mm:ss.SSSZ', + token = /\[((?:[^\]\\]|\\]|\\)*)\]|d{1,4}|M{1,4}|m{1,2}|w{1,2}|Qo|Do|D{1,4}|YY(?:YY)?|H{1,2}|h{1,2}|s{1,2}|S{1,3}|Z{1,2}|a{1,2}|[AQExX]/g, + reverseToken = /(\[[^\]]*\])|d{1,4}|M{1,4}|m{1,2}|w{1,2}|Qo|Do|D{1,4}|YY(?:YY)?|H{1,2}|h{1,2}|s{1,2}|S{1,3}|Z{1,2}|a{1,2}|[AQExX]|([.*+:?^,\s${}()|\\]+)/g, + regexStore = {}; + + function getRegexData (mask, dateLocale) { + var + days = '(' + dateLocale.days.join('|') + ')', + key = mask + days; + + if (regexStore[key] !== void 0) { + return regexStore[key] + } + + var + daysShort = '(' + dateLocale.daysShort.join('|') + ')', + months = '(' + dateLocale.months.join('|') + ')', + monthsShort = '(' + dateLocale.monthsShort.join('|') + ')'; + + var map = {}; + var index = 0; + + var regexText = mask.replace(reverseToken, function (match) { + index++; + switch (match) { + case 'YY': + map.YY = index; + return '(-?\\d{1,2})' + case 'YYYY': + map.YYYY = index; + return '(-?\\d{1,4})' + case 'M': + map.M = index; + return '(\\d{1,2})' + case 'MM': + map.M = index; // bumping to M + return '(\\d{2})' + case 'MMM': + map.MMM = index; + return monthsShort + case 'MMMM': + map.MMMM = index; + return months + case 'D': + map.D = index; + return '(\\d{1,2})' + case 'Do': + map.D = index++; // bumping to D + return '(\\d{1,2}(st|nd|rd|th))' + case 'DD': + map.D = index; // bumping to D + return '(\\d{2})' + case 'H': + map.H = index; + return '(\\d{1,2})' + case 'HH': + map.H = index; // bumping to H + return '(\\d{2})' + case 'h': + map.h = index; + return '(\\d{1,2})' + case 'hh': + map.h = index; // bumping to h + return '(\\d{2})' + case 'm': + map.m = index; + return '(\\d{1,2})' + case 'mm': + map.m = index; // bumping to m + return '(\\d{2})' + case 's': + map.s = index; + return '(\\d{1,2})' + case 'ss': + map.s = index; // bumping to s + return '(\\d{2})' + case 'S': + map.S = index; + return '(\\d{1})' + case 'SS': + map.S = index; // bump to S + return '(\\d{2})' + case 'SSS': + map.S = index; // bump to S + return '(\\d{3})' + case 'A': + map.A = index; + return '(AM|PM)' + case 'a': + map.a = index; + return '(am|pm)' + case 'aa': + map.aa = index; + return '(a\\.m\\.|p\\.m\\.)' + + case 'ddd': + return daysShort + case 'dddd': + return days + case 'Q': + case 'd': + case 'E': + return '(\\d{1})' + case 'Qo': + return '(1st|2nd|3rd|4th)' + case 'DDD': + case 'DDDD': + return '(\\d{1,3})' + case 'w': + return '(\\d{1,2})' + case 'ww': + return '(\\d{2})' + + case 'Z': // to split: (?:(Z)()()|([+-])?(\\d{2}):?(\\d{2})) + return '(Z|[+-]\\d{2}:\\d{2})' + case 'ZZ': + return '(Z|[+-]\\d{2}\\d{2})' + + case 'X': + map.X = index; + return '(-?\\d+)' + case 'x': + map.x = index; + return '(-?\\d{4,})' + + default: + index--; + if (match[0] === '[') { + match = match.substring(1, match.length - 1); + } + return match.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + } + }); + + var res = { map: map, regex: new RegExp('^' + regexText) }; + regexStore[key] = res; + + return res + } + + function extractDate (str, mask, dateLocale) { + var d = __splitDate(str, mask, dateLocale); + + return new Date( + d.year, + d.month === null ? null : d.month - 1, + d.day, + d.hour, + d.minute, + d.second, + d.millisecond + ) + } + + function __splitDate (str, mask, dateLocale, calendar, defaultModel) { + var date = Object.assign({ + year: null, + month: null, + day: null, + hour: null, + minute: null, + second: null, + millisecond: null, + dateHash: null, + timeHash: null + }, defaultModel); + + if ( + str === void 0 || + str === null || + str === '' || + typeof str !== 'string' + ) { + return date + } + + if (mask === void 0) { + mask = defaultMask; + } + + var + langOpts = dateLocale !== void 0 ? dateLocale : lang.props.date, + months = langOpts.months, + monthsShort = langOpts.monthsShort; + + var ref = getRegexData(mask, langOpts); + var regex = ref.regex; + var map = ref.map; + + var match = str.match(regex); + + if (match === null) { + return date + } + + if (map.X !== void 0 || map.x !== void 0) { + var stamp = parseInt(match[map.X !== void 0 ? map.X : map.x], 10); + + if (isNaN(stamp) === true || stamp < 0) { + return date + } + + var d = new Date(stamp * (map.X !== void 0 ? 1000 : 1)); + + date.year = d.getFullYear(); + date.month = d.getMonth() + 1; + date.day = d.getDate(); + date.hour = d.getHours(); + date.minute = d.getMinutes(); + date.second = d.getSeconds(); + date.millisecond = d.getMilliseconds(); + } + else { + if (map.YYYY !== void 0) { + date.year = parseInt(match[map.YYYY], 10); + } + else if (map.YY !== void 0) { + var y = parseInt(match[map.YY], 10); + date.year = y < 0 ? y : 2000 + y; + } + + if (map.M !== void 0) { + date.month = parseInt(match[map.M], 10); + if (date.month < 1 || date.month > 12) { + return date + } + } + else if (map.MMM !== void 0) { + date.month = monthsShort.indexOf(match[map.MMM]) + 1; + } + else if (map.MMMM !== void 0) { + date.month = months.indexOf(match[map.MMMM]) + 1; + } + + if (map.D !== void 0) { + date.day = parseInt(match[map.D], 10); + + if (date.year === null || date.month === null || date.day < 1) { + return date + } + + var maxDay = calendar !== 'persian' + ? (new Date(date.year, date.month, 0)).getDate() + : jalaaliMonthLength(date.year, date.month); + + if (date.day > maxDay) { + return date + } + } + + if (map.H !== void 0) { + date.hour = parseInt(match[map.H], 10) % 24; + } + else if (map.h !== void 0) { + date.hour = parseInt(match[map.h], 10) % 12; + if ( + (map.A && match[map.A] === 'PM') || + (map.a && match[map.a] === 'pm') || + (map.aa && match[map.aa] === 'p.m.') + ) { + date.hour += 12; + } + date.hour = date.hour % 24; + } + + if (map.m !== void 0) { + date.minute = parseInt(match[map.m], 10) % 60; + } + + if (map.s !== void 0) { + date.second = parseInt(match[map.s], 10) % 60; + } + + if (map.S !== void 0) { + date.millisecond = parseInt(match[map.S], 10) * Math.pow( 10, (3 - match[map.S].length) ); + } + } + + date.dateHash = date.year + '/' + pad(date.month) + '/' + pad(date.day); + date.timeHash = pad(date.hour) + ':' + pad(date.minute) + ':' + pad(date.second); + + return date + } + + function formatTimezone (offset, delimeter) { + if ( delimeter === void 0 ) delimeter = ''; + + var + sign = offset > 0 ? '-' : '+', + absOffset = Math.abs(offset), + hours = Math.floor(absOffset / 60), + minutes = absOffset % 60; + + return sign + pad(hours) + delimeter + pad(minutes) + } + + function setMonth (date, newMonth /* 1-based */) { + var + test = new Date(date.getFullYear(), newMonth, 0, 0, 0, 0, 0), + days = test.getDate(); + + date.setMonth(newMonth - 1, Math.min(days, date.getDate())); + } + + function getChange (date, mod, add) { + var + t = new Date(date), + sign = (add ? 1 : -1); + + Object.keys(mod).forEach(function (key) { + if (key === 'month') { + setMonth(t, t.getMonth() + 1 + sign * mod.month); + return + } + + var op = key === 'year' + ? 'FullYear' + : capitalize(key === 'days' ? 'date' : key); + t[("set" + op)](t[("get" + op)]() + sign * mod[key]); + }); + return t + } + + function isValid (date) { + return typeof date === 'number' + ? true + : isNaN(Date.parse(date)) === false + } + + function buildDate (mod, utc) { + return adjustDate(new Date(), mod, utc) + } + + function getDayOfWeek (date) { + var dow = new Date(date).getDay(); + return dow === 0 ? 7 : dow + } + + function getWeekOfYear (date) { + // Remove time components of date + var thursday = new Date(date.getFullYear(), date.getMonth(), date.getDate()); + + // Change date to Thursday same week + thursday.setDate(thursday.getDate() - ((thursday.getDay() + 6) % 7) + 3); + + // Take January 4th as it is always in week 1 (see ISO 8601) + var firstThursday = new Date(thursday.getFullYear(), 0, 4); + + // Change date to Thursday same week + firstThursday.setDate(firstThursday.getDate() - ((firstThursday.getDay() + 6) % 7) + 3); + + // Check if daylight-saving-time-switch occurred and correct for it + var ds = thursday.getTimezoneOffset() - firstThursday.getTimezoneOffset(); + thursday.setHours(thursday.getHours() - ds); + + // Number of weeks between target Thursday and first Thursday + var weekDiff = (thursday - firstThursday) / (MILLISECONDS_IN_DAY * 7); + return 1 + Math.floor(weekDiff) + } + + function isBetweenDates (date, from, to, opts) { + if ( opts === void 0 ) opts = {}; + + var + d1 = new Date(from).getTime(), + d2 = new Date(to).getTime(), + cur = new Date(date).getTime(); + + opts.inclusiveFrom && d1--; + opts.inclusiveTo && d2++; + + return cur > d1 && cur < d2 + } + + function addToDate (date, mod) { + return getChange(date, mod, true) + } + function subtractFromDate (date, mod) { + return getChange(date, mod, false) + } + + function adjustDate (date, mod, utc) { + var + t = new Date(date), + prefix = "set" + (utc ? 'UTC' : ''); + + Object.keys(mod).forEach(function (key) { + if (key === 'month') { + setMonth(t, mod.month); + return + } + + var op = key === 'year' + ? 'FullYear' + : key.charAt(0).toUpperCase() + key.slice(1); + t[("" + prefix + op)](mod[key]); + }); + + return t + } + + function startOfDate (date, unit) { + var t = new Date(date); + switch (unit) { + case 'year': + t.setMonth(0); + case 'month': + t.setDate(1); + case 'day': + t.setHours(0); + case 'hour': + t.setMinutes(0); + case 'minute': + t.setSeconds(0); + case 'second': + t.setMilliseconds(0); + } + return t + } + + function endOfDate (date, unit) { + var t = new Date(date); + switch (unit) { + case 'year': + t.setMonth(11); + case 'month': + t.setDate(daysInMonth(t)); + case 'day': + t.setHours(23); + case 'hour': + t.setMinutes(59); + case 'minute': + t.setSeconds(59); + case 'second': + t.setMilliseconds(59); + } + return t + } + + function getMaxDate (/* date, ...args */) { + var t = 0; + Array.prototype.slice.call(arguments).forEach(function (d) { + t = Math.max(t, new Date(d)); + }); + return t + } + + function getMinDate (date /*, ...args */) { + var t = new Date(date); + Array.prototype.slice.call(arguments, 1).forEach(function (d) { + t = Math.min(t, new Date(d)); + }); + return t + } + + function getDiff (t, sub, interval) { + return ( + (t.getTime() - t.getTimezoneOffset() * MILLISECONDS_IN_MINUTE) - + (sub.getTime() - sub.getTimezoneOffset() * MILLISECONDS_IN_MINUTE) + ) / interval + } + + function getDateDiff (date, subtract, unit) { + if ( unit === void 0 ) unit = 'days'; + + var + t = new Date(date), + sub = new Date(subtract); + + switch (unit) { + case 'years': + return (t.getFullYear() - sub.getFullYear()) + + case 'months': + return (t.getFullYear() - sub.getFullYear()) * 12 + t.getMonth() - sub.getMonth() + + case 'days': + return getDiff(startOfDate(t, 'day'), startOfDate(sub, 'day'), MILLISECONDS_IN_DAY) + + case 'hours': + return getDiff(startOfDate(t, 'hour'), startOfDate(sub, 'hour'), MILLISECONDS_IN_HOUR) + + case 'minutes': + return getDiff(startOfDate(t, 'minute'), startOfDate(sub, 'minute'), MILLISECONDS_IN_MINUTE) + + case 'seconds': + return getDiff(startOfDate(t, 'second'), startOfDate(sub, 'second'), 1000) + } + } + + function getDayOfYear (date) { + return getDateDiff(date, startOfDate(date, 'year'), 'days') + 1 + } + + function inferDateFormat (date) { + return isDate(date) === true + ? 'date' + : (typeof date === 'number' ? 'number' : 'string') + } + + function getDateBetween (date, min, max) { + var t = new Date(date); + + if (min) { + var low = new Date(min); + if (t < low) { + return low + } + } + + if (max) { + var high = new Date(max); + if (t > high) { + return high + } + } + + return t + } + + function isSameDate (date, date2, unit) { + var + t = new Date(date), + d = new Date(date2); + + if (unit === void 0) { + return t.getTime() === d.getTime() + } + + switch (unit) { + case 'second': + if (t.getSeconds() !== d.getSeconds()) { + return false + } + case 'minute': // intentional fall-through + if (t.getMinutes() !== d.getMinutes()) { + return false + } + case 'hour': // intentional fall-through + if (t.getHours() !== d.getHours()) { + return false + } + case 'day': // intentional fall-through + if (t.getDate() !== d.getDate()) { + return false + } + case 'month': // intentional fall-through + if (t.getMonth() !== d.getMonth()) { + return false + } + case 'year': // intentional fall-through + if (t.getFullYear() !== d.getFullYear()) { + return false + } + break + default: + throw new Error(("date isSameDate unknown unit " + unit)) + } + + return true + } + + function daysInMonth (date) { + return (new Date(date.getFullYear(), date.getMonth() + 1, 0)).getDate() + } + + function getOrdinal (n) { + if (n >= 11 && n <= 13) { + return (n + "th") + } + switch (n % 10) { + case 1: return (n + "st") + case 2: return (n + "nd") + case 3: return (n + "rd") + } + return (n + "th") + } + + var formatter = { + // Year: 00, 01, ..., 99 + YY: function YY (date, _, forcedYear) { + // workaround for < 1900 with new Date() + var y = this.YYYY(date, _, forcedYear) % 100; + return y > 0 + ? pad(y) + : '-' + pad(Math.abs(y)) + }, + + // Year: 1900, 1901, ..., 2099 + YYYY: function YYYY (date, _, forcedYear) { + // workaround for < 1900 with new Date() + return forcedYear !== void 0 && forcedYear !== null + ? forcedYear + : date.getFullYear() + }, + + // Month: 1, 2, ..., 12 + M: function M (date) { + return date.getMonth() + 1 + }, + + // Month: 01, 02, ..., 12 + MM: function MM (date) { + return pad(date.getMonth() + 1) + }, + + // Month Short Name: Jan, Feb, ... + MMM: function MMM (date, dateLocale) { + return dateLocale.monthsShort[date.getMonth()] + }, + + // Month Name: January, February, ... + MMMM: function MMMM (date, dateLocale) { + return dateLocale.months[date.getMonth()] + }, + + // Quarter: 1, 2, 3, 4 + Q: function Q (date) { + return Math.ceil((date.getMonth() + 1) / 3) + }, + + // Quarter: 1st, 2nd, 3rd, 4th + Qo: function Qo (date) { + return getOrdinal(this.Q(date)) + }, + + // Day of month: 1, 2, ..., 31 + D: function D (date) { + return date.getDate() + }, + + // Day of month: 1st, 2nd, ..., 31st + Do: function Do (date) { + return getOrdinal(date.getDate()) + }, + + // Day of month: 01, 02, ..., 31 + DD: function DD (date) { + return pad(date.getDate()) + }, + + // Day of year: 1, 2, ..., 366 + DDD: function DDD (date) { + return getDayOfYear(date) + }, + + // Day of year: 001, 002, ..., 366 + DDDD: function DDDD (date) { + return pad(getDayOfYear(date), 3) + }, + + // Day of week: 0, 1, ..., 6 + d: function d (date) { + return date.getDay() + }, + + // Day of week: Su, Mo, ... + dd: function dd (date, dateLocale) { + return this.dddd(date, dateLocale).slice(0, 2) + }, + + // Day of week: Sun, Mon, ... + ddd: function ddd (date, dateLocale) { + return dateLocale.daysShort[date.getDay()] + }, + + // Day of week: Sunday, Monday, ... + dddd: function dddd (date, dateLocale) { + return dateLocale.days[date.getDay()] + }, + + // Day of ISO week: 1, 2, ..., 7 + E: function E (date) { + return date.getDay() || 7 + }, + + // Week of Year: 1 2 ... 52 53 + w: function w (date) { + return getWeekOfYear(date) + }, + + // Week of Year: 01 02 ... 52 53 + ww: function ww (date) { + return pad(getWeekOfYear(date)) + }, + + // Hour: 0, 1, ... 23 + H: function H (date) { + return date.getHours() + }, + + // Hour: 00, 01, ..., 23 + HH: function HH (date) { + return pad(date.getHours()) + }, + + // Hour: 1, 2, ..., 12 + h: function h (date) { + var hours = date.getHours(); + if (hours === 0) { + return 12 + } + if (hours > 12) { + return hours % 12 + } + return hours + }, + + // Hour: 01, 02, ..., 12 + hh: function hh (date) { + return pad(this.h(date)) + }, + + // Minute: 0, 1, ..., 59 + m: function m (date) { + return date.getMinutes() + }, + + // Minute: 00, 01, ..., 59 + mm: function mm (date) { + return pad(date.getMinutes()) + }, + + // Second: 0, 1, ..., 59 + s: function s (date) { + return date.getSeconds() + }, + + // Second: 00, 01, ..., 59 + ss: function ss (date) { + return pad(date.getSeconds()) + }, + + // 1/10 of second: 0, 1, ..., 9 + S: function S (date) { + return Math.floor(date.getMilliseconds() / 100) + }, + + // 1/100 of second: 00, 01, ..., 99 + SS: function SS (date) { + return pad(Math.floor(date.getMilliseconds() / 10)) + }, + + // Millisecond: 000, 001, ..., 999 + SSS: function SSS (date) { + return pad(date.getMilliseconds(), 3) + }, + + // Meridiem: AM, PM + A: function A (date) { + return this.H(date) < 12 ? 'AM' : 'PM' + }, + + // Meridiem: am, pm + a: function a (date) { + return this.H(date) < 12 ? 'am' : 'pm' + }, + + // Meridiem: a.m., p.m. + aa: function aa (date) { + return this.H(date) < 12 ? 'a.m.' : 'p.m.' + }, + + // Timezone: -01:00, +00:00, ... +12:00 + Z: function Z (date) { + return formatTimezone(date.getTimezoneOffset(), ':') + }, + + // Timezone: -0100, +0000, ... +1200 + ZZ: function ZZ (date) { + return formatTimezone(date.getTimezoneOffset()) + }, + + // Seconds timestamp: 512969520 + X: function X (date) { + return Math.floor(date.getTime() / 1000) + }, + + // Milliseconds timestamp: 512969520900 + x: function x (date) { + return date.getTime() + } + }; + + function formatDate (val, mask, dateLocale, __forcedYear) { + if ( + (val !== 0 && !val) || + val === Infinity || + val === -Infinity + ) { + return + } + + var date = new Date(val); + + if (isNaN(date)) { + return + } + + if (mask === void 0) { + mask = defaultMask; + } + + var locale = dateLocale !== void 0 + ? dateLocale + : lang.props.date; + + return mask.replace( + token, + function (match, text) { return match in formatter + ? formatter[match](date, locale, __forcedYear) + : (text === void 0 ? match : text.split('\\]').join(']')); } + ) + } + + function clone (date) { + return isDate(date) === true + ? new Date(date.getTime()) + : date + } + + var date = { + isValid: isValid, + extractDate: extractDate, + buildDate: buildDate, + getDayOfWeek: getDayOfWeek, + getWeekOfYear: getWeekOfYear, + isBetweenDates: isBetweenDates, + addToDate: addToDate, + subtractFromDate: subtractFromDate, + adjustDate: adjustDate, + startOfDate: startOfDate, + endOfDate: endOfDate, + getMaxDate: getMaxDate, + getMinDate: getMinDate, + getDateDiff: getDateDiff, + getDayOfYear: getDayOfYear, + inferDateFormat: inferDateFormat, + getDateBetween: getDateBetween, + isSameDate: isSameDate, + daysInMonth: daysInMonth, + formatDate: formatDate, + clone: clone + }; + + var yearsInterval = 20; + var viewIsValid = function (v) { return ['Calendar', 'Years', 'Months'].includes(v); }; + + var QDate = Vue.extend({ + name: 'QDate', + + mixins: [ DateTimeMixin ], + + props: { + title: String, + subtitle: String, + + emitImmediately: Boolean, + + mask: { + // this mask is forced + // when using persian calendar + default: 'YYYY/MM/DD' + }, + + defaultYearMonth: { + type: String, + validator: function (v) { return /^-?[\d]+\/[0-1]\d$/.test(v); } + }, + + events: [Array, Function], + eventColor: [String, Function], + + options: [Array, Function], + + firstDayOfWeek: [String, Number], + todayBtn: Boolean, + minimal: Boolean, + defaultView: { + type: String, + default: 'Calendar', + validator: viewIsValid + } + }, + + data: function data () { + var ref = this.__getModels(this.value, this.mask, this.__getComputedLocale()); + var inner = ref.inner; + var external = ref.external; + var direction = this.$q.lang.rtl === true ? 'right' : 'left'; + + return { + view: this.defaultView, + monthDirection: direction, + yearDirection: direction, + startYear: inner.year - inner.year % yearsInterval, + innerModel: inner, + extModel: external + } + }, + + watch: { + value: function value (v) { + var this$1 = this; + + var ref = this.__getModels(v, this.mask, this.__getComputedLocale()); + var inner = ref.inner; + var external = ref.external; + + if ( + this.extModel.dateHash !== external.dateHash || + this.extModel.timeHash !== external.timeHash + ) { + this.extModel = external; + } + + if (inner.dateHash !== this.innerModel.dateHash) { + this.monthDirection = (this.innerModel.dateHash < inner.dateHash) === (this.$q.lang.rtl !== true) ? 'left' : 'right'; + if (inner.year !== this.innerModel.year) { + this.yearDirection = this.monthDirection; + } + + this.$nextTick(function () { + this$1.startYear = inner.year - inner.year % yearsInterval; + this$1.innerModel = inner; + }); + } + }, + + view: function view () { + this.$refs.blurTarget !== void 0 && this.$refs.blurTarget.focus(); + } + }, + + computed: { + classes: function classes () { + var type = this.landscape === true ? 'landscape' : 'portrait'; + return "q-date q-date--" + type + " q-date--" + type + "-" + (this.minimal === true ? 'minimal' : 'standard') + + (this.isDark === true ? ' q-date--dark q-dark' : '') + + (this.bordered === true ? " q-date--bordered" : '') + + (this.square === true ? " q-date--square no-border-radius" : '') + + (this.flat === true ? " q-date--flat no-shadow" : '') + + (this.disable === true ? ' disabled' : (this.readonly === true ? ' q-date--readonly' : '')) + }, + + headerTitle: function headerTitle () { + if (this.title !== void 0 && this.title !== null && this.title.length > 0) { + return this.title + } + + var model = this.extModel; + if (model.dateHash === null) { return ' --- ' } + + var date; + + if (this.calendar !== 'persian') { + date = new Date(model.year, model.month - 1, model.day); + } + else { + var gDate = toGregorian(model.year, model.month, model.day); + date = new Date(gDate.gy, gDate.gm - 1, gDate.gd); + } + + if (isNaN(date.valueOf()) === true) { return ' --- ' } + + if (this.computedLocale.headerTitle !== void 0) { + return this.computedLocale.headerTitle(date, model) + } + + return this.computedLocale.daysShort[ date.getDay() ] + ', ' + + this.computedLocale.monthsShort[ model.month - 1 ] + ' ' + + model.day + }, + + headerSubtitle: function headerSubtitle () { + return this.subtitle !== void 0 && this.subtitle !== null && this.subtitle.length > 0 + ? this.subtitle + : ( + this.extModel.year !== null + ? this.extModel.year + : ' --- ' + ) + }, + + dateArrow: function dateArrow () { + var val = [ this.$q.iconSet.datetime.arrowLeft, this.$q.iconSet.datetime.arrowRight ]; + return this.$q.lang.rtl === true ? val.reverse() : val + }, + + computedFirstDayOfWeek: function computedFirstDayOfWeek () { + return this.firstDayOfWeek !== void 0 + ? Number(this.firstDayOfWeek) + : this.computedLocale.firstDayOfWeek + }, + + daysOfWeek: function daysOfWeek () { + var + days = this.computedLocale.daysShort, + first = this.computedFirstDayOfWeek; + + return first > 0 + ? days.slice(first, 7).concat(days.slice(0, first)) + : days + }, + + daysInMonth: function daysInMonth () { + return this.__getDaysInMonth(this.innerModel) + }, + + today: function today () { + return this.__getCurrentDate() + }, + + evtFn: function evtFn () { + var this$1 = this; + + return typeof this.events === 'function' + ? this.events + : function (date) { return this$1.events.includes(date); } + }, + + evtColor: function evtColor () { + var this$1 = this; + + return typeof this.eventColor === 'function' + ? this.eventColor + : function (date) { return this$1.eventColor; } + }, + + isInSelection: function isInSelection () { + var this$1 = this; + + return typeof this.options === 'function' + ? this.options + : function (date) { return this$1.options.includes(date); } + }, + + days: function days () { + var date, endDay; + + var res = []; + + if (this.calendar !== 'persian') { + date = new Date(this.innerModel.year, this.innerModel.month - 1, 1); + endDay = (new Date(this.innerModel.year, this.innerModel.month - 1, 0)).getDate(); + } + else { + var gDate = toGregorian(this.innerModel.year, this.innerModel.month, 1); + date = new Date(gDate.gy, gDate.gm - 1, gDate.gd); + var prevJM = this.innerModel.month - 1; + var prevJY = this.innerModel.year; + if (prevJM === 0) { + prevJM = 12; + prevJY--; + } + endDay = jalaaliMonthLength(prevJY, prevJM); + } + + var days = (date.getDay() - this.computedFirstDayOfWeek - 1); + + var len = days < 0 ? days + 7 : days; + if (len < 6) { + for (var i = endDay - len; i <= endDay; i++) { + res.push({ i: i, fill: true }); + } + } + + var + index = res.length, + prefix = this.innerModel.year + '/' + pad(this.innerModel.month) + '/'; + + for (var i$1 = 1; i$1 <= this.daysInMonth; i$1++) { + var day = prefix + pad(i$1); + + if (this.options !== void 0 && this.isInSelection(day) !== true) { + res.push({ i: i$1 }); + } + else { + var event = this.events !== void 0 && this.evtFn(day) === true + ? this.evtColor(day) + : false; + + res.push({ i: i$1, in: true, flat: true, event: event }); + } + } + + if (this.innerModel.year === this.extModel.year && this.innerModel.month === this.extModel.month) { + var i$2 = index + this.innerModel.day - 1; + res[i$2] !== void 0 && Object.assign(res[i$2], { + unelevated: true, + flat: false, + color: this.computedColor, + textColor: this.computedTextColor + }); + } + + if (this.innerModel.year === this.today.year && this.innerModel.month === this.today.month) { + res[index + this.today.day - 1].today = true; + } + + var left = res.length % 7; + if (left > 0) { + var afterDays = 7 - left; + for (var i$3 = 1; i$3 <= afterDays; i$3++) { + res.push({ i: i$3, fill: true }); + } + } + + return res + }, + + attrs: function attrs () { + if (this.disable === true) { + return { 'aria-disabled': '' } + } + if (this.readonly === true) { + return { 'aria-readonly': '' } + } + } + }, + + methods: { + setToday: function setToday () { + this.__updateValue(Object.assign({}, this.today), 'today'); + this.view = 'Calendar'; + }, + + setView: function setView (view) { + if (viewIsValid(view) === true) { + this.view = view; + } + }, + + offsetCalendar: function offsetCalendar (type, descending) { + if (['month', 'year'].includes(type)) { + this[("__goTo" + (type === 'month' ? 'Month' : 'Year'))]( + descending === true ? -1 : 1 + ); + } + }, + + __getModels: function __getModels (val, mask, locale) { + var external = __splitDate( + val, + this.calendar === 'persian' ? 'YYYY/MM/DD' : mask, + locale, + this.calendar + ); + + return { + external: external, + inner: external.dateHash === null + ? this.__getDefaultModel() + : Object.assign({}, external) + } + }, + + __getDefaultModel: function __getDefaultModel () { + var year, month; + + if (this.defaultYearMonth !== void 0) { + var d = this.defaultYearMonth.split('/'); + year = parseInt(d[0], 10); + month = parseInt(d[1], 10); + } + else { + // may come from data() where computed + // props are not yet available + var d$1 = this.today !== void 0 + ? this.today + : this.__getCurrentDate(); + + year = d$1.year; + month = d$1.month; + } + + return { + year: year, + month: month, + day: 1, + hour: 0, + minute: 0, + second: 0, + millisecond: 0, + dateHash: year + '/' + pad(month) + '/01' + } + }, + + __getHeader: function __getHeader (h) { + var this$1 = this; + + if (this.minimal === true) { return } + + return h('div', { + staticClass: 'q-date__header', + class: this.headerClass + }, [ + h('div', { + staticClass: 'relative-position' + }, [ + h('transition', { + props: { + name: 'q-transition--fade' + } + }, [ + h('div', { + key: 'h-yr-' + this.headerSubtitle, + staticClass: 'q-date__header-subtitle q-date__header-link', + class: this.view === 'Years' ? 'q-date__header-link--active' : 'cursor-pointer', + attrs: { tabindex: this.computedTabindex }, + on: cache(this, 'vY', { + click: function () { this$1.view = 'Years'; }, + keyup: function (e) { e.keyCode === 13 && (this$1.view = 'Years'); } + }) + }, [ this.headerSubtitle ]) + ]) + ]), + + h('div', { + staticClass: 'q-date__header-title relative-position flex no-wrap' + }, [ + h('div', { + staticClass: 'relative-position col' + }, [ + h('transition', { + props: { + name: 'q-transition--fade' + } + }, [ + h('div', { + key: 'h-sub' + this.headerTitle, + staticClass: 'q-date__header-title-label q-date__header-link', + class: this.view === 'Calendar' ? 'q-date__header-link--active' : 'cursor-pointer', + attrs: { tabindex: this.computedTabindex }, + on: cache(this, 'vC', { + click: function () { this$1.view = 'Calendar'; }, + keyup: function (e) { e.keyCode === 13 && (this$1.view = 'Calendar'); } + }) + }, [ this.headerTitle ]) + ]) + ]), + + this.todayBtn === true ? h(QBtn, { + staticClass: 'q-date__header-today', + props: { + icon: this.$q.iconSet.datetime.today, + flat: true, + size: 'sm', + round: true, + tabindex: this.computedTabindex + }, + on: cache(this, 'today', { click: this.setToday }) + }) : null + ]) + ]) + }, + + __getNavigation: function __getNavigation (h, ref) { + var this$1 = this; + var label = ref.label; + var view = ref.view; + var key = ref.key; + var dir = ref.dir; + var goTo = ref.goTo; + var cls = ref.cls; + + return [ + h('div', { + staticClass: 'row items-center q-date__arrow' + }, [ + h(QBtn, { + props: { + round: true, + dense: true, + size: 'sm', + flat: true, + icon: this.dateArrow[0], + tabindex: this.computedTabindex + }, + on: cache(this, 'go-#' + view, { click: function click () { goTo(-1); } }) + }) + ]), + + h('div', { + staticClass: 'relative-position overflow-hidden flex flex-center' + cls + }, [ + h('transition', { + props: { + name: 'q-transition--jump-' + dir + } + }, [ + h('div', { key: key }, [ + h(QBtn, { + props: { + flat: true, + dense: true, + noCaps: true, + label: label, + tabindex: this.computedTabindex + }, + on: cache(this, 'view#' + view, { click: function () { this$1.view = view; } }) + }) + ]) + ]) + ]), + + h('div', { + staticClass: 'row items-center q-date__arrow' + }, [ + h(QBtn, { + props: { + round: true, + dense: true, + size: 'sm', + flat: true, + icon: this.dateArrow[1], + tabindex: this.computedTabindex + }, + on: cache(this, 'go+#' + view, { click: function click () { goTo(1); } }) + }) + ]) + ] + }, + + __getCalendarView: function __getCalendarView (h) { + var this$1 = this; + + return [ + h('div', { + key: 'calendar-view', + staticClass: 'q-date__view q-date__calendar' + }, [ + h('div', { + staticClass: 'q-date__navigation row items-center no-wrap' + }, this.__getNavigation(h, { + label: this.computedLocale.months[ this.innerModel.month - 1 ], + view: 'Months', + key: this.innerModel.month, + dir: this.monthDirection, + goTo: this.__goToMonth, + cls: ' col' + }).concat(this.__getNavigation(h, { + label: this.innerModel.year, + view: 'Years', + key: this.innerModel.year, + dir: this.yearDirection, + goTo: this.__goToYear, + cls: '' + }))), + + h('div', { + staticClass: 'q-date__calendar-weekdays row items-center no-wrap' + }, this.daysOfWeek.map(function (day) { return h('div', { staticClass: 'q-date__calendar-item' }, [ h('div', [ day ]) ]); })), + + h('div', { + staticClass: 'q-date__calendar-days-container relative-position overflow-hidden' + }, [ + h('transition', { + props: { + name: 'q-transition--slide-' + this.monthDirection + } + }, [ + h('div', { + key: this.innerModel.year + '/' + this.innerModel.month, + staticClass: 'q-date__calendar-days fit' + }, this.days.map(function (day) { return h('div', { + staticClass: ("q-date__calendar-item q-date__calendar-item--" + (day.fill === true ? 'fill' : (day.in === true ? 'in' : 'out'))) + }, [ + day.in === true + ? h(QBtn, { + staticClass: day.today === true ? 'q-date__today' : null, + props: { + dense: true, + flat: day.flat, + unelevated: day.unelevated, + color: day.color, + textColor: day.textColor, + label: day.i, + tabindex: this$1.computedTabindex + }, + on: cache(this$1, 'day#' + day.i, { click: function () { this$1.__setDay(day.i); } }) + }, day.event !== false ? [ + h('div', { staticClass: 'q-date__event bg-' + day.event }) + ] : null) + : h('div', [ day.i ]) + ]); })) + ]) + ]) + ]) + ] + }, + + __getMonthsView: function __getMonthsView (h) { + var this$1 = this; + + var currentYear = this.innerModel.year === this.today.year; + + var content = this.computedLocale.monthsShort.map(function (month, i) { + var active = this$1.innerModel.month === i + 1; + + return h('div', { + staticClass: 'q-date__months-item flex flex-center' + }, [ + h(QBtn, { + staticClass: currentYear === true && this$1.today.month === i + 1 ? 'q-date__today' : null, + props: { + flat: !active, + label: month, + unelevated: active, + color: active ? this$1.computedColor : null, + textColor: active ? this$1.computedTextColor : null, + tabindex: this$1.computedTabindex + }, + on: cache(this$1, 'month#' + i, { click: function () { this$1.__setMonth(i + 1); } }) + }) + ]) + }); + + return h('div', { + key: 'months-view', + staticClass: 'q-date__view q-date__months flex flex-center' + }, content) + }, + + __getYearsView: function __getYearsView (h) { + var this$1 = this; + + var + start = this.startYear, + stop = start + yearsInterval, + years = []; + + var loop = function ( i ) { + var active = this$1.innerModel.year === i; + + years.push( + h('div', { + staticClass: 'q-date__years-item flex flex-center' + }, [ + h(QBtn, { + key: 'yr' + i, + staticClass: this$1.today.year === i ? 'q-date__today' : null, + props: { + flat: !active, + label: i, + dense: true, + unelevated: active, + color: active ? this$1.computedColor : null, + textColor: active ? this$1.computedTextColor : null, + tabindex: this$1.computedTabindex + }, + on: cache(this$1, 'yr#' + i, { click: function () { this$1.__setYear(i); } }) + }) + ]) + ); + }; + + for (var i = start; i <= stop; i++) loop( i ); + + return h('div', { + staticClass: 'q-date__view q-date__years flex flex-center' + }, [ + h('div', { + staticClass: 'col-auto' + }, [ + h(QBtn, { + props: { + round: true, + dense: true, + flat: true, + icon: this.dateArrow[0], + tabindex: this.computedTabindex + }, + on: cache(this, 'y-', { click: function () { this$1.startYear -= yearsInterval; } }) + }) + ]), + + h('div', { + staticClass: 'q-date__years-content col self-stretch row items-center' + }, years), + + h('div', { + staticClass: 'col-auto' + }, [ + h(QBtn, { + props: { + round: true, + dense: true, + flat: true, + icon: this.dateArrow[1], + tabindex: this.computedTabindex + }, + on: cache(this, 'y+', { click: function () { this$1.startYear += yearsInterval; } }) + }) + ]) + ]) + }, + + __getDaysInMonth: function __getDaysInMonth (obj) { + return this.calendar !== 'persian' + ? (new Date(obj.year, obj.month, 0)).getDate() + : jalaaliMonthLength(obj.year, obj.month) + }, + + __goToMonth: function __goToMonth (offset) { + var + month = Number(this.innerModel.month) + offset, + yearDir = this.yearDirection; + + if (month === 13) { + month = 1; + this.innerModel.year++; + yearDir = (this.$q.lang.rtl !== true) ? 'left' : 'right'; + } + else if (month === 0) { + month = 12; + this.innerModel.year--; + yearDir = (this.$q.lang.rtl !== true) ? 'right' : 'left'; + } + + this.monthDirection = (offset > 0) === (this.$q.lang.rtl !== true) ? 'left' : 'right'; + this.yearDirection = yearDir; + this.innerModel.month = month; + this.emitImmediately === true && this.__updateValue({}, 'month'); + }, + + __goToYear: function __goToYear (offset) { + this.monthDirection = this.yearDirection = (offset > 0) === (this.$q.lang.rtl !== true) ? 'left' : 'right'; + this.innerModel.year = Number(this.innerModel.year) + offset; + this.emitImmediately === true && this.__updateValue({}, 'year'); + }, + + __setYear: function __setYear (year) { + this.innerModel.year = year; + this.emitImmediately === true && this.__updateValue({ year: year }, 'year'); + this.view = this.extModel.month === null || this.defaultView === 'Years' ? 'Months' : 'Calendar'; + }, + + __setMonth: function __setMonth (month) { + this.innerModel.month = month; + this.emitImmediately === true && this.__updateValue({ month: month }, 'month'); + this.view = 'Calendar'; + }, + + __setDay: function __setDay (day) { + this.__updateValue({ day: day }, 'day'); + }, + + __updateValue: function __updateValue (date, reason) { + var this$1 = this; + + if (date.year === void 0) { + date.year = this.innerModel.year; + } + if (date.month === void 0) { + date.month = this.innerModel.month; + } + if ( + date.day === void 0 || + (this.emitImmediately === true && (reason === 'year' || reason === 'month')) + ) { + date.day = this.innerModel.day; + var maxDay = this.emitImmediately === true + ? this.__getDaysInMonth(date) + : this.daysInMonth; + + date.day = Math.min(date.day, maxDay); + } + + var val = this.calendar === 'persian' + ? date.year + '/' + pad(date.month) + '/' + pad(date.day) + : formatDate( + new Date( + date.year, + date.month - 1, + date.day, + this.extModel.hour, + this.extModel.minute, + this.extModel.second, + this.extModel.millisecond + ), + this.mask, + this.computedLocale, + date.year + ); + + date.changed = val !== this.value; + this.$emit('input', val, reason, date); + + if (val === this.value && reason === 'today') { + var newHash = date.year + '/' + pad(date.month) + '/' + pad(date.day); + var curHash = this.innerModel.year + '/' + pad(this.innerModel.month) + '/' + pad(this.innerModel.day); + + if (newHash !== curHash) { + this.monthDirection = (curHash < newHash) === (this.$q.lang.rtl !== true) ? 'left' : 'right'; + if (date.year !== this.innerModel.year) { + this.yearDirection = this.monthDirection; + } + + this.$nextTick(function () { + this$1.startYear = date.year - date.year % yearsInterval; + Object.assign(this$1.innerModel, { + year: date.year, + month: date.month, + day: date.day, + dateHash: newHash + }); + }); + } + } + } + }, + + render: function render (h) { + var content = [ + h('div', { + staticClass: 'q-date__content col relative-position' + }, [ + h('transition', { + props: { name: 'q-transition--fade' } + }, [ + this[("__get" + (this.view) + "View")](h) + ]) + ]) + ]; + + var def = slot(this, 'default'); + def !== void 0 && content.push( + h('div', { staticClass: 'q-date__actions' }, def) + ); + + if (this.name !== void 0 && this.disable !== true) { + this.__injectFormInput(content, 'push'); + } + + return h('div', { + class: this.classes, + attrs: this.attrs, + on: this.$listeners + }, [ + this.__getHeader(h), + + h('div', { + staticClass: 'q-date__main col column', + attrs: { tabindex: -1 }, + ref: 'blurTarget' + }, content) + ]) + } + }); + + var HistoryMixin = { + methods: { + __addHistory: function __addHistory () { + var this$1 = this; + + this.__historyEntry = { + condition: function () { return this$1.hideOnRouteChange === true }, + handler: this.hide + }; + History.add(this.__historyEntry); + }, + + __removeHistory: function __removeHistory () { + if (this.__historyEntry !== void 0) { + History.remove(this.__historyEntry); + this.__historyEntry = void 0; + } + } + }, + + beforeDestroy: function beforeDestroy () { + this.showing === true && this.__removeHistory(); + } + }; + + var + registered = 0, + scrollPositionX, + scrollPositionY, + maxScrollTop, + vpPendingUpdate = false, + bodyLeft, + bodyTop, + closeTimer; + + function onWheel (e) { + if (shouldPreventScroll(e)) { + stopAndPrevent(e); + } + } + + function shouldPreventScroll (e) { + if (e.target === document.body || e.target.classList.contains('q-layout__backdrop')) { + return true + } + + var + path = getEventPath(e), + shift = e.shiftKey && !e.deltaX, + scrollY = !shift && Math.abs(e.deltaX) <= Math.abs(e.deltaY), + delta = shift || scrollY ? e.deltaY : e.deltaX; + + for (var index = 0; index < path.length; index++) { + var el = path[index]; + + if (hasScrollbar(el, scrollY)) { + return scrollY + ? ( + delta < 0 && el.scrollTop === 0 + ? true + : delta > 0 && el.scrollTop + el.clientHeight === el.scrollHeight + ) + : ( + delta < 0 && el.scrollLeft === 0 + ? true + : delta > 0 && el.scrollLeft + el.clientWidth === el.scrollWidth + ) + } + } + + return true + } + + function onAppleScroll (e) { + if (e.target === document) { + // required, otherwise iOS blocks further scrolling + // until the mobile scrollbar dissapears + document.scrollingElement.scrollTop = document.scrollingElement.scrollTop; // eslint-disable-line + } + } + + function onAppleResize (evt) { + if (vpPendingUpdate === true) { + return + } + + vpPendingUpdate = true; + + requestAnimationFrame(function () { + vpPendingUpdate = false; + + var ref = evt.target; + var height = ref.height; + var ref$1 = document.scrollingElement; + var clientHeight = ref$1.clientHeight; + var scrollTop = ref$1.scrollTop; + + if (maxScrollTop === void 0 || height !== window.innerHeight) { + maxScrollTop = clientHeight - height; + document.scrollingElement.scrollTop = scrollTop; + } + + if (scrollTop > maxScrollTop) { + document.scrollingElement.scrollTop -= Math.ceil((scrollTop - maxScrollTop) / 8); + } + }); + } + + function apply (action, is) { + var + body = document.body, + hasViewport = window.visualViewport !== void 0; + + if (action === 'add') { + var overflowY = window.getComputedStyle(body).overflowY; + + scrollPositionX = getHorizontalScrollPosition(window); + scrollPositionY = getScrollPosition(window); + bodyLeft = body.style.left; + bodyTop = body.style.top; + + body.style.left = "-" + scrollPositionX + "px"; + body.style.top = "-" + scrollPositionY + "px"; + if (overflowY !== 'hidden' && (overflowY === 'scroll' || body.scrollHeight > window.innerHeight)) { + body.classList.add('q-body--force-scrollbar'); + } + + body.classList.add('q-body--prevent-scroll'); + if (is.ios === true) { + if (hasViewport === true) { + window.scrollTo(0, 0); + window.visualViewport.addEventListener('resize', onAppleResize, listenOpts.passiveCapture); + window.visualViewport.addEventListener('scroll', onAppleResize, listenOpts.passiveCapture); + window.scrollTo(0, 0); + } + else { + window.addEventListener('scroll', onAppleScroll, listenOpts.passiveCapture); + } + } + } + + if (is.desktop === true && is.mac === true) { + // ref. https://developers.google.com/web/updates/2017/01/scrolling-intervention + window[(action + "EventListener")]('wheel', onWheel, listenOpts.notPassive); + } + + if (action === 'remove') { + if (is.ios === true) { + if (hasViewport === true) { + window.visualViewport.removeEventListener('resize', onAppleResize, listenOpts.passiveCapture); + window.visualViewport.removeEventListener('scroll', onAppleResize, listenOpts.passiveCapture); + } + else { + window.removeEventListener('scroll', onAppleScroll, listenOpts.passiveCapture); + } + } + + body.classList.remove('q-body--prevent-scroll'); + body.classList.remove('q-body--force-scrollbar'); + + body.style.left = bodyLeft; + body.style.top = bodyTop; + + window.scrollTo(scrollPositionX, scrollPositionY); + maxScrollTop = void 0; + } + } + + function preventScroll (state, is) { + var action = 'add'; + + if (state === true) { + registered++; + + if (closeTimer !== void 0) { + clearTimeout(closeTimer); + closeTimer = void 0; + return + } + + if (registered > 1) { + return + } + } + else { + if (registered === 0) { + return + } + + registered--; + + if (registered > 0) { + return + } + + action = 'remove'; + + if (is.ios === true && is.nativeMobile === true) { + clearTimeout(closeTimer); + + closeTimer = setTimeout(function () { + apply(action, is); + closeTimer = void 0; + }, 100); + return + } + } + + apply(action, is); + } + + var PreventScrollMixin = { + methods: { + __preventScroll: function __preventScroll (state) { + if ( + state !== this.preventedScroll && + (this.preventedScroll !== void 0 || state === true) + ) { + this.preventedScroll = state; + preventScroll(state, this.$q.platform.is); + } + } + } + }; + + var maximizedModals = 0; + + var positionClass = { + standard: 'fixed-full flex-center', + top: 'fixed-top justify-center', + bottom: 'fixed-bottom justify-center', + right: 'fixed-right items-center', + left: 'fixed-left items-center' + }; + + var transitions = { + standard: ['scale', 'scale'], + top: ['slide-down', 'slide-up'], + bottom: ['slide-up', 'slide-down'], + right: ['slide-left', 'slide-right'], + left: ['slide-right', 'slide-left'] + }; + + var QDialog = Vue.extend({ + name: 'QDialog', + + mixins: [ HistoryMixin, ModelToggleMixin, PortalMixin, PreventScrollMixin ], + + props: { + persistent: Boolean, + autoClose: Boolean, + + noEscDismiss: Boolean, + noBackdropDismiss: Boolean, + noRouteDismiss: Boolean, + noRefocus: Boolean, + noFocus: Boolean, + + seamless: Boolean, + + maximized: Boolean, + fullWidth: Boolean, + fullHeight: Boolean, + + square: Boolean, + + position: { + type: String, + default: 'standard', + validator: function (val) { return val === 'standard' || + ['top', 'bottom', 'left', 'right'].includes(val); } + }, + + transitionShow: String, + transitionHide: String + }, + + data: function data () { + return { + transitionState: this.showing + } + }, + + watch: { + showing: function showing (val) { + var this$1 = this; + + if (this.transitionShowComputed !== this.transitionHideComputed) { + this.$nextTick(function () { + this$1.transitionState = val; + }); + } + }, + + maximized: function maximized (newV, oldV) { + if (this.showing === true) { + this.__updateState(false, oldV); + this.__updateState(true, newV); + } + }, + + useBackdrop: function useBackdrop (v) { + this.__preventScroll(v); + this.__preventFocusout(v); + } + }, + + computed: { + classes: function classes () { + return "q-dialog__inner--" + (this.maximized === true ? 'maximized' : 'minimized') + " " + + "q-dialog__inner--" + (this.position) + " " + (positionClass[this.position]) + + (this.fullWidth === true ? ' q-dialog__inner--fullwidth' : '') + + (this.fullHeight === true ? ' q-dialog__inner--fullheight' : '') + + (this.square === true ? ' q-dialog__inner--square' : '') + }, + + transitionShowComputed: function transitionShowComputed () { + return 'q-transition--' + (this.transitionShow === void 0 ? transitions[this.position][0] : this.transitionShow) + }, + + transitionHideComputed: function transitionHideComputed () { + return 'q-transition--' + (this.transitionHide === void 0 ? transitions[this.position][1] : this.transitionHide) + }, + + transition: function transition () { + return this.transitionState === true + ? this.transitionHideComputed + : this.transitionShowComputed + }, + + useBackdrop: function useBackdrop () { + return this.showing === true && this.seamless !== true + }, + + hideOnRouteChange: function hideOnRouteChange () { + return this.persistent !== true && + this.noRouteDismiss !== true && + this.seamless !== true + } + }, + + methods: { + focus: function focus () { + var node = this.__getInnerNode(); + + if (node === void 0 || node.contains(document.activeElement) === true) { + return + } + + node = node.querySelector('[autofocus], [data-autofocus]') || node; + node.focus(); + }, + + shake: function shake () { + this.focus(); + + var node = this.__getInnerNode(); + + if (node !== void 0) { + node.classList.remove('q-animate--scale'); + node.classList.add('q-animate--scale'); + clearTimeout(this.shakeTimeout); + this.shakeTimeout = setTimeout(function () { + node.classList.remove('q-animate--scale'); + }, 170); + } + }, + + __getInnerNode: function __getInnerNode () { + return this.__portal !== void 0 && this.__portal.$refs !== void 0 + ? this.__portal.$refs.inner + : void 0 + }, + + __show: function __show (evt) { + var this$1 = this; + + this.__addHistory(); + + // IE can have null document.activeElement + this.__refocusTarget = this.noRefocus === false && document.activeElement !== null + ? document.activeElement + : void 0; + + this.$el.dispatchEvent(create('popup-show', { bubbles: true })); + + this.__updateState(true, this.maximized); + + EscapeKey.register(this, function () { + if (this$1.seamless !== true) { + if (this$1.persistent === true || this$1.noEscDismiss === true) { + this$1.maximized !== true && this$1.shake(); + } + else { + this$1.$emit('escape-key'); + this$1.hide(); + } + } + }); + + this.__showPortal(); + + if (this.noFocus !== true) { + // IE can have null document.activeElement + document.activeElement !== null && document.activeElement.blur(); + this.__nextTick(this.focus); + } + + this.__setTimeout(function () { + if (this$1.$q.platform.is.ios === true && document.activeElement) { + var ref = document.activeElement.getBoundingClientRect(); + var top = ref.top; + var bottom = ref.bottom; + var innerHeight = window.innerHeight; + var height = window.visualViewport !== void 0 + ? window.visualViewport.height + : innerHeight; + + if (top > 0 && bottom > height / 2) { + var scrollTop = Math.min( + document.scrollingElement.scrollHeight - height, + bottom >= innerHeight + ? Infinity + : Math.ceil(document.scrollingElement.scrollTop + bottom - height / 2) + ); + + var fn = function () { + requestAnimationFrame(function () { + document.scrollingElement.scrollTop += Math.ceil((scrollTop - document.scrollingElement.scrollTop) / 8); + if (document.scrollingElement.scrollTop !== scrollTop) { + fn(); + } + }); + }; + + fn(); + } + document.activeElement.scrollIntoView(); + } + + // required in order to avoid the "double-tap needed" issue + this$1.$q.platform.is.ios === true && this$1.__portal.$el.click(); + + this$1.$emit('show', evt); + }, 300); + }, + + __hide: function __hide (evt) { + var this$1 = this; + + this.__removeHistory(); + this.__cleanup(true); + + // check null for IE + if (this.__refocusTarget !== void 0 && this.__refocusTarget !== null) { + this.__refocusTarget.focus(); + } + + this.$el.dispatchEvent(create('popup-hide', { bubbles: true })); + + this.__setTimeout(function () { + this$1.__hidePortal(); + this$1.$emit('hide', evt); + }, 300); + }, + + __cleanup: function __cleanup (hiding) { + clearTimeout(this.shakeTimeout); + + if (hiding === true || this.showing === true) { + EscapeKey.pop(this); + this.__updateState(false, this.maximized); + if (this.seamless !== true) { + this.__preventScroll(false); + this.__preventFocusout(false); + } + } + }, + + __updateState: function __updateState (opening, maximized) { + if (maximized === true) { + if (opening === true) { + maximizedModals < 1 && document.body.classList.add('q-body--dialog'); + } + else if (maximizedModals < 2) { + document.body.classList.remove('q-body--dialog'); + } + maximizedModals += opening === true ? 1 : -1; + } + }, + + __preventFocusout: function __preventFocusout (state) { + if (this.$q.platform.is.desktop === true) { + var action = (state === true ? 'add' : 'remove') + "EventListener"; + document.body[action]('focusin', this.__onFocusChange); + } + }, + + __onAutoClose: function __onAutoClose (e) { + this.hide(e); + this.$listeners.click !== void 0 && this.$emit('click', e); + }, + + __onBackdropClick: function __onBackdropClick (e) { + if (this.persistent !== true && this.noBackdropDismiss !== true) { + this.hide(e); + } + else { + this.shake(); + } + }, + + __onFocusChange: function __onFocusChange (e) { + // the focus is not in a vue child component + if ( + this.showing === true && + this.__portal !== void 0 && + childHasFocus(this.__portal.$el, e.target) !== true + ) { + this.focus(); + } + }, + + __renderPortal: function __renderPortal (h) { + var on = Object.assign({}, this.$listeners, + // stop propagating these events from children + {input: stop, + 'popup-show': stop, + 'popup-hide': stop}); + + if (this.autoClose === true) { + on.click = this.__onAutoClose; + } + + return h('div', { + staticClass: 'q-dialog fullscreen no-pointer-events', + class: this.contentClass, + style: this.contentStyle, + attrs: this.$attrs + }, [ + h('transition', { + props: { name: 'q-transition--fade' } + }, this.useBackdrop === true ? [ + h('div', { + staticClass: 'q-dialog__backdrop fixed-full', + on: cache(this, 'bkdrop', { + click: this.__onBackdropClick + }) + }) + ] : null), + + h('transition', { + props: { name: this.transition } + }, [ + this.showing === true ? h('div', { + ref: 'inner', + staticClass: 'q-dialog__inner flex no-pointer-events', + class: this.classes, + attrs: { tabindex: -1 }, + on: on + }, slot(this, 'default')) : null + ]) + ]) + } + }, + + mounted: function mounted () { + this.__processModelChange(this.value); + }, + + beforeDestroy: function beforeDestroy () { + this.__cleanup(); + } + }); + + var duration = 150; + + var mouseEvents = [ + 'mouseover', 'mouseout', 'mouseenter', 'mouseleave' + ]; + + var QDrawer = Vue.extend({ + name: 'QDrawer', + + inject: { + layout: { + default: function default$1 () { + console.error('QDrawer needs to be child of QLayout'); + } + } + }, + + mixins: [ DarkMixin, HistoryMixin, ModelToggleMixin, PreventScrollMixin ], + + directives: { + TouchPan: TouchPan + }, + + props: { + side: { + type: String, + default: 'left', + validator: function (v) { return ['left', 'right'].includes(v); } + }, + + width: { + type: Number, + default: 300 + }, + + mini: Boolean, + miniToOverlay: Boolean, + miniWidth: { + type: Number, + default: 57 + }, + + breakpoint: { + type: Number, + default: 1023 + }, + showIfAbove: Boolean, + + behavior: { + type: String, + validator: function (v) { return ['default', 'desktop', 'mobile'].includes(v); }, + default: 'default' + }, + + bordered: Boolean, + elevated: Boolean, + contentStyle: [String, Object, Array], + contentClass: [String, Object, Array], + + overlay: Boolean, + persistent: Boolean, + noSwipeOpen: Boolean, + noSwipeClose: Boolean, + noSwipeBackdrop: Boolean + }, + + data: function data () { + var belowBreakpoint = ( + this.behavior === 'mobile' || + (this.behavior !== 'desktop' && this.layout.totalWidth <= this.breakpoint) + ); + + return { + belowBreakpoint: belowBreakpoint, + showing: this.showIfAbove === true && belowBreakpoint === false + ? true + : this.value === true + } + }, + + watch: { + belowBreakpoint: function belowBreakpoint (val) { + if (val === true) { // from lg to xs + this.lastDesktopState = this.showing; + this.showing === true && this.hide(false); + } + else if ( + this.overlay === false && + this.behavior !== 'mobile' && + this.lastDesktopState !== false + ) { // from xs to lg + if (this.showing === true) { + this.__applyPosition(0); + this.__applyBackdrop(0); + this.__cleanup(); + } + else { + this.show(false); + } + } + }, + + 'layout.totalWidth': function layout_totalWidth (val) { + this.__updateLocal('belowBreakpoint', ( + this.behavior === 'mobile' || + (this.behavior !== 'desktop' && val <= this.breakpoint) + )); + }, + + side: function side (_, oldSide) { + this.layout[oldSide].space = false; + this.layout[oldSide].offset = 0; + }, + + behavior: function behavior (val) { + this.__updateLocal('belowBreakpoint', ( + val === 'mobile' || + (val !== 'desktop' && this.layout.totalWidth <= this.breakpoint) + )); + }, + + breakpoint: function breakpoint (val) { + this.__updateLocal('belowBreakpoint', ( + this.behavior === 'mobile' || + (this.behavior !== 'desktop' && this.layout.totalWidth <= val) + )); + }, + + 'layout.container': function layout_container (val) { + this.showing === true && this.__preventScroll(val !== true); + }, + + 'layout.scrollbarWidth': function layout_scrollbarWidth () { + this.__applyPosition(this.showing === true ? 0 : void 0); + }, + + offset: function offset (val) { + this.__update('offset', val); + }, + + onLayout: function onLayout (val) { + this.$emit('on-layout', val); + this.__update('space', val); + }, + + rightSide: function rightSide () { + this.__applyPosition(); + }, + + size: function size (val) { + this.__applyPosition(); + this.__updateSizeOnLayout(this.miniToOverlay, val); + }, + + miniToOverlay: function miniToOverlay (val) { + this.__updateSizeOnLayout(val, this.size); + }, + + '$q.lang.rtl': function $q_lang_rtl () { + this.__applyPosition(); + }, + + mini: function mini () { + if (this.value === true) { + this.__animateMini(); + this.layout.__animate(); + } + }, + + isMini: function isMini (val) { + this.$emit('mini-state', val); + } + }, + + computed: { + rightSide: function rightSide () { + return this.side === 'right' + }, + + otherSide: function otherSide () { + return this.rightSide === true ? 'left' : 'right' + }, + + offset: function offset () { + return this.showing === true && this.belowBreakpoint === false && this.overlay === false + ? (this.miniToOverlay === true ? this.miniWidth : this.size) + : 0 + }, + + size: function size () { + return this.isMini === true + ? this.miniWidth + : this.width + }, + + fixed: function fixed () { + return this.overlay === true || + this.miniToOverlay === true || + this.layout.view.indexOf(this.rightSide ? 'R' : 'L') > -1 || + (this.$q.platform.is.ios && this.layout.container === true) + }, + + onLayout: function onLayout () { + return this.showing === true && this.belowBreakpoint === false && this.overlay === false + }, + + onScreenOverlay: function onScreenOverlay () { + return this.showing === true && this.belowBreakpoint === false && this.overlay === true + }, + + backdropClass: function backdropClass () { + return this.showing === false ? 'no-pointer-events' : null + }, + + headerSlot: function headerSlot () { + return this.rightSide === true + ? this.layout.rows.top[2] === 'r' + : this.layout.rows.top[0] === 'l' + }, + + footerSlot: function footerSlot () { + return this.rightSide === true + ? this.layout.rows.bottom[2] === 'r' + : this.layout.rows.bottom[0] === 'l' + }, + + aboveStyle: function aboveStyle () { + var css = {}; + + if (this.layout.header.space === true && this.headerSlot === false) { + if (this.fixed === true) { + css.top = (this.layout.header.offset) + "px"; + } + else if (this.layout.header.space === true) { + css.top = (this.layout.header.size) + "px"; + } + } + + if (this.layout.footer.space === true && this.footerSlot === false) { + if (this.fixed === true) { + css.bottom = (this.layout.footer.offset) + "px"; + } + else if (this.layout.footer.space === true) { + css.bottom = (this.layout.footer.size) + "px"; + } + } + + return css + }, + + style: function style () { + var style = { width: ((this.size) + "px") }; + return this.belowBreakpoint === true + ? style + : Object.assign(style, this.aboveStyle) + }, + + classes: function classes () { + return "q-drawer--" + (this.side) + + (this.bordered === true ? ' q-drawer--bordered' : '') + + (this.isDark === true ? ' q-drawer--dark q-dark' : '') + + ( + this.belowBreakpoint === true + ? ' fixed q-drawer--on-top q-drawer--mobile q-drawer--top-padding' + : " q-drawer--" + (this.isMini === true ? 'mini' : 'standard') + + (this.fixed === true || this.onLayout !== true ? ' fixed' : '') + + (this.overlay === true || this.miniToOverlay === true ? ' q-drawer--on-top' : '') + + (this.headerSlot === true ? ' q-drawer--top-padding' : '') + ) + }, + + stateDirection: function stateDirection () { + return (this.$q.lang.rtl === true ? -1 : 1) * (this.rightSide === true ? 1 : -1) + }, + + isMini: function isMini () { + return this.mini === true && this.belowBreakpoint !== true + }, + + onNativeEvents: function onNativeEvents () { + var this$1 = this; + + if (this.belowBreakpoint !== true) { + var evt = { + '!click': function (e) { this$1.$emit('click', e); } + }; + + mouseEvents.forEach(function (name) { + evt[name] = function (e) { + this$1.$listeners[name] !== void 0 && this$1.$emit(name, e); + }; + }); + + return evt + } + }, + + hideOnRouteChange: function hideOnRouteChange () { + return this.persistent !== true && + (this.belowBreakpoint === true || this.onScreenOverlay === true) + }, + + openDirective: function openDirective () { + var obj; + + var dir = this.$q.lang.rtl === true ? this.side : this.otherSide; + + return [{ + name: 'touch-pan', + value: this.__openByTouch, + modifiers: ( obj = {}, obj[ dir ] = true, obj.mouse = true, obj ) + }] + }, + + contentCloseDirective: function contentCloseDirective () { + var obj; + + if (this.noSwipeClose !== true) { + var dir = this.$q.lang.rtl === true ? this.otherSide : this.side; + + return [{ + name: 'touch-pan', + value: this.__closeByTouch, + modifiers: ( obj = {}, obj[ dir ] = true, obj.mouse = true, obj ) + }] + } + }, + + backdropCloseDirective: function backdropCloseDirective () { + var obj; + + if (this.noSwipeBackdrop !== true) { + var dir = this.$q.lang.rtl === true ? this.otherSide : this.side; + + return [{ + name: 'touch-pan', + value: this.__closeByTouch, + modifiers: ( obj = {}, obj[ dir ] = true, obj.mouse = true, obj.mouseAllDir = true, obj ) + }] + } + } + }, + + methods: { + __applyPosition: function __applyPosition (position) { + var this$1 = this; + + if (position === void 0) { + this.$nextTick(function () { + position = this$1.showing === true ? 0 : this$1.size; + this$1.__applyPosition(this$1.stateDirection * position); + }); + } + else if (this.$refs.content !== void 0) { + if ( + this.layout.container === true && + this.rightSide === true && + (this.belowBreakpoint === true || Math.abs(position) === this.size) + ) { + position += this.stateDirection * this.layout.scrollbarWidth; + } + + if (this.__lastPosition !== position) { + this.$refs.content.style.transform = "translateX(" + position + "px)"; + this.__lastPosition = position; + } + } + }, + + __applyBackdrop: function __applyBackdrop (x, retry) { + var this$1 = this; + + if (this.$refs.backdrop !== void 0) { + this.$refs.backdrop.style.backgroundColor = + this.lastBackdropBg = "rgba(0,0,0," + (x * 0.4) + ")"; + } + else { + // rendered nodes might not have + // picked up this.showing change yet, + // so we need one retry + retry !== true && this.$nextTick(function () { + this$1.__applyBackdrop(x, true); + }); + } + }, + + __setScrollable: function __setScrollable (v) { + var action = v === true + ? 'remove' + : (this.layout.container !== true ? 'add' : ''); + + action !== '' && document.body.classList[action]('q-body--drawer-toggle'); + }, + + __animateMini: function __animateMini () { + var this$1 = this; + + if (this.timerMini !== void 0) { + clearTimeout(this.timerMini); + } + else if (this.$el !== void 0) { + this.$el.classList.add('q-drawer--mini-animate'); + } + this.timerMini = setTimeout(function () { + this$1.$el !== void 0 && this$1.$el.classList.remove('q-drawer--mini-animate'); + this$1.timerMini = void 0; + }, 150); + }, + + __openByTouch: function __openByTouch (evt) { + if (this.showing !== false) { + // some browsers might capture and trigger this + // even if Drawer has just been opened (but animation is still pending) + return + } + + var + width = this.size, + position = between(evt.distance.x, 0, width); + + if (evt.isFinal === true) { + var + el = this.$refs.content, + opened = position >= Math.min(75, width); + + el.classList.remove('no-transition'); + + if (opened === true) { + this.show(); + } + else { + this.layout.__animate(); + this.__applyBackdrop(0); + this.__applyPosition(this.stateDirection * width); + el.classList.remove('q-drawer--delimiter'); + } + + return + } + + this.__applyPosition( + (this.$q.lang.rtl === true ? this.rightSide !== true : this.rightSide) + ? Math.max(width - position, 0) + : Math.min(0, position - width) + ); + this.__applyBackdrop( + between(position / width, 0, 1) + ); + + if (evt.isFirst === true) { + var el$1 = this.$refs.content; + el$1.classList.add('no-transition'); + el$1.classList.add('q-drawer--delimiter'); + } + }, + + __closeByTouch: function __closeByTouch (evt) { + if (this.showing !== true) { + // some browsers might capture and trigger this + // even if Drawer has just been closed (but animation is still pending) + return + } + + var + width = this.size, + dir = evt.direction === this.side, + position = (this.$q.lang.rtl === true ? dir !== true : dir) + ? between(evt.distance.x, 0, width) + : 0; + + if (evt.isFinal === true) { + var opened = Math.abs(position) < Math.min(75, width); + this.$refs.content.classList.remove('no-transition'); + + if (opened === true) { + this.layout.__animate(); + this.__applyBackdrop(1); + this.__applyPosition(0); + } + else { + this.hide(); + } + + return + } + + this.__applyPosition(this.stateDirection * position); + this.__applyBackdrop(between(1 - position / width, 0, 1)); + + if (evt.isFirst === true) { + this.$refs.content.classList.add('no-transition'); + } + }, + + __show: function __show (evt, noEvent) { + var this$1 = this; + + this.__addHistory(); + + evt !== false && this.layout.__animate(); + this.__applyPosition(0); + + if (this.belowBreakpoint === true) { + var otherSide = this.layout.instances[this.otherSide]; + if (otherSide !== void 0 && otherSide.belowBreakpoint === true) { + otherSide.hide(false); + } + + this.__applyBackdrop(1); + this.layout.container !== true && this.__preventScroll(true); + } + else { + this.__applyBackdrop(0); + evt !== false && this.__setScrollable(false); + } + + this.__setTimeout(function () { + evt !== false && this$1.__setScrollable(true); + noEvent !== true && this$1.$emit('show', evt); + }, duration); + }, + + __hide: function __hide (evt, noEvent) { + var this$1 = this; + + this.__removeHistory(); + + evt !== false && this.layout.__animate(); + + this.__applyBackdrop(0); + this.__applyPosition(this.stateDirection * this.size); + + this.__cleanup(); + + noEvent !== true && this.__setTimeout(function () { + this$1.$emit('hide', evt); + }, duration); + }, + + __cleanup: function __cleanup () { + this.__preventScroll(false); + this.__setScrollable(true); + }, + + __update: function __update (prop, val) { + if (this.layout[this.side][prop] !== val) { + this.layout[this.side][prop] = val; + } + }, + + __updateLocal: function __updateLocal (prop, val) { + if (this[prop] !== val) { + this[prop] = val; + } + }, + + __updateSizeOnLayout: function __updateSizeOnLayout (miniToOverlay, size) { + this.__update('size', miniToOverlay === true ? this.miniWidth : size); + } + }, + + created: function created () { + this.layout.instances[this.side] = this; + this.__updateSizeOnLayout(this.miniToOverlay, this.size); + this.__update('space', this.onLayout); + this.__update('offset', this.offset); + + if ( + this.showIfAbove === true && + this.value !== true && + this.showing === true && + this.$listeners.input !== void 0 + ) { + this.$emit('input', true); + } + }, + + mounted: function mounted () { + var this$1 = this; + + this.$emit('on-layout', this.onLayout); + this.$emit('mini-state', this.isMini); + + var fn = function () { + var action = this$1.showing === true ? 'show' : 'hide'; + this$1[("__" + action)](false, true); + }; + + if (this.layout.totalWidth !== 0) { + fn(); + return + } + + this.watcher = this.$watch('layout.totalWidth', function () { + this$1.watcher(); + this$1.watcher = void 0; + + if (this$1.showing === false && this$1.showIfAbove === true && this$1.belowBreakpoint === false) { + this$1.show(false); + } + else { + fn(); + } + }); + }, + + beforeDestroy: function beforeDestroy () { + this.watcher !== void 0 && this.watcher(); + clearTimeout(this.timerMini); + + this.showing === true && this.__cleanup(); + + if (this.layout.instances[this.side] === this) { + this.layout.instances[this.side] = void 0; + this.__update('size', 0); + this.__update('offset', 0); + this.__update('space', false); + } + }, + + render: function render (h) { + var child = []; + + if (this.belowBreakpoint === true) { + this.noSwipeOpen !== true && child.push( + h('div', { + staticClass: ("q-drawer__opener fixed-" + (this.side)), + directives: this.openDirective + }) + ); + + child.push( + h('div', { + ref: 'backdrop', + staticClass: 'fullscreen q-drawer__backdrop', + class: this.backdropClass, + style: this.lastBackdropBg !== void 0 + ? { backgroundColor: this.lastBackdropBg } + : null, + on: cache(this, 'bkdrop', { click: this.hide }), + directives: this.backdropCloseDirective + }) + ); + } + + var content = [ + h('div', { + staticClass: 'q-drawer__content fit ' + (this.layout.container === true ? 'overflow-auto' : 'scroll'), + class: this.contentClass, + style: this.contentStyle + }, this.isMini === true && this.$scopedSlots.mini !== void 0 + ? this.$scopedSlots.mini() + : slot(this, 'default') + ) + ]; + + if (this.elevated === true && this.showing === true) { + content.push( + h('div', { + staticClass: 'q-layout__shadow absolute-full overflow-hidden no-pointer-events' + }) + ); + } + + child.push( + h('aside', { + ref: 'content', + staticClass: "q-drawer", + class: this.classes, + style: this.style, + on: this.onNativeEvents, + directives: this.belowBreakpoint === true + ? this.contentCloseDirective + : void 0 + }, content) + ); + + return h('div', { staticClass: 'q-drawer-container' }, child) + } + }); + + var ValidateMixin = { + props: { + value: {}, + + error: { + type: Boolean, + default: null + }, + errorMessage: String, + noErrorIcon: Boolean, + + rules: Array, + lazyRules: Boolean + }, + + data: function data () { + return { + isDirty: null, + innerError: false, + innerErrorMessage: void 0 + } + }, + + watch: { + value: function value (v) { + if (this.rules === void 0) { + return + } + if (this.lazyRules === true && this.isDirty !== true) { + return + } + + this.validate(v); + }, + + focused: function focused (focused$1) { + if (focused$1 === true) { + this.__initDirty(); + } + else { + this.__triggerValidation(); + } + } + }, + + computed: { + hasError: function hasError () { + return this.error === true || this.innerError === true + }, + + computedErrorMessage: function computedErrorMessage () { + return typeof this.errorMessage === 'string' && this.errorMessage.length > 0 + ? this.errorMessage + : this.innerErrorMessage + } + }, + + mounted: function mounted () { + this.validateIndex = 0; + if (this.focused === void 0) { + this.$el.addEventListener('focusin', this.__initDirty); + this.$el.addEventListener('focusout', this.__triggerValidation); + } + }, + + beforeDestroy: function beforeDestroy () { + if (this.focused === void 0) { + this.$el.removeEventListener('focusin', this.__initDirty); + this.$el.removeEventListener('focusout', this.__triggerValidation); + } + }, + + methods: { + resetValidation: function resetValidation () { + this.validateIndex++; + this.innerLoading = false; + this.isDirty = null; + this.innerError = false; + this.innerErrorMessage = void 0; + }, + + /* + * Return value + * - true (validation succeeded) + * - false (validation failed) + * - Promise (pending async validation) + */ + validate: function validate (val) { + var this$1 = this; + if ( val === void 0 ) val = this.value; + + if (!this.rules || this.rules.length === 0) { + return true + } + + this.validateIndex++; + + if (this.innerLoading !== true && this.lazyRules !== true) { + this.isDirty = true; + } + + var update = function (err, msg) { + if (this$1.innerError !== err) { + this$1.innerError = err; + } + + var m = msg || void 0; + if (this$1.innerErrorMessage !== m) { + this$1.innerErrorMessage = m; + } + + if (this$1.innerLoading !== false) { + this$1.innerLoading = false; + } + }; + + var promises = []; + + for (var i = 0; i < this.rules.length; i++) { + var rule = this.rules[i]; + var res = (void 0); + + if (typeof rule === 'function') { + res = rule(val); + } + else if (typeof rule === 'string' && testPattern[rule] !== void 0) { + res = testPattern[rule](val); + } + + if (res === false || typeof res === 'string') { + update(true, res); + return false + } + else if (res !== true && res !== void 0) { + promises.push(res); + } + } + + if (promises.length === 0) { + update(false); + return true + } + + if (this.innerLoading !== true) { + this.innerLoading = true; + } + + var index = this.validateIndex; + + return Promise.all(promises).then( + function (res) { + if (index !== this$1.validateIndex) { + return true + } + + if (res === void 0 || Array.isArray(res) === false || res.length === 0) { + update(false); + return true + } + + var msg = res.find(function (r) { return r === false || typeof r === 'string'; }); + update(msg !== void 0, msg); + return msg === void 0 + }, + function (e) { + if (index === this$1.validateIndex) { + console.error(e); + update(true); + return false + } + + return true + } + ) + }, + + __initDirty: function __initDirty () { + if (this.isDirty === null) { + this.isDirty = false; + } + }, + + __triggerValidation: function __triggerValidation () { + if (this.isDirty === false && this.rules !== void 0) { + this.isDirty = true; + this.validate(this.value); + } + } + } + }; + + /** + * Based on the work of https://github.com/jchook/uuid-random + */ + + var + buf, + bufIdx = 0, + hexBytes = new Array(256); + + // Pre-calculate toString(16) for speed + for (var i = 0; i < 256; i++) { + hexBytes[i] = (i + 0x100).toString(16).substr(1); + } + + // Use best available PRNG + var randomBytes = (function () { + // Node & Browser support + var lib = typeof crypto !== 'undefined' + ? crypto + : ( + typeof window !== 'undefined' + ? window.msCrypto // IE11 + : void 0 + ); + + if (lib !== void 0) { + if (lib.randomBytes !== void 0) { + return lib.randomBytes + } + if (lib.getRandomValues !== void 0) { + return function (n) { + var bytes = new Uint8Array(n); + lib.getRandomValues(bytes); + return bytes + } + } + } + + return function (n) { + var r = []; + for (var i = n; i > 0; i--) { + r.push(Math.floor(Math.random() * 256)); + } + return r + } + })(); + + // Buffer random numbers for speed + // Reduce memory usage by decreasing this number (min 16) + // or improve speed by increasing this number (try 16384) + var BUFFER_SIZE = 4096; + + function uid$2 () { + // Buffer some random bytes for speed + if (buf === void 0 || (bufIdx + 16 > BUFFER_SIZE)) { + bufIdx = 0; + buf = randomBytes(BUFFER_SIZE); + } + + var b = buf.slice(bufIdx, (bufIdx += 16)); + b[6] = (b[6] & 0x0f) | 0x40; + b[8] = (b[8] & 0x3f) | 0x80; + + return hexBytes[b[0]] + hexBytes[b[1]] + + hexBytes[b[2]] + hexBytes[b[3]] + '-' + + hexBytes[b[4]] + hexBytes[b[5]] + '-' + + hexBytes[b[6]] + hexBytes[b[7]] + '-' + + hexBytes[b[8]] + hexBytes[b[9]] + '-' + + hexBytes[b[10]] + hexBytes[b[11]] + + hexBytes[b[12]] + hexBytes[b[13]] + + hexBytes[b[14]] + hexBytes[b[15]] + } + + function getTargetUid (val) { + return val === void 0 ? ("f_" + (uid$2())) : val + } + + var QField = Vue.extend({ + name: 'QField', + + mixins: [ DarkMixin, ValidateMixin ], + + inheritAttrs: false, + + props: { + label: String, + stackLabel: Boolean, + hint: String, + hideHint: Boolean, + prefix: String, + suffix: String, + + labelColor: String, + color: String, + bgColor: String, + + filled: Boolean, + outlined: Boolean, + borderless: Boolean, + standout: [Boolean, String], + + square: Boolean, + + loading: Boolean, + + bottomSlots: Boolean, + hideBottomSpace: Boolean, + + rounded: Boolean, + dense: Boolean, + itemAligned: Boolean, + + counter: Boolean, + + clearable: Boolean, + clearIcon: String, + + disable: Boolean, + readonly: Boolean, + + autofocus: Boolean, + + for: String, + + maxlength: [Number, String], + maxValues: [Number, String] // private, do not add to JSON; internally needed by QSelect + }, + + data: function data () { + return { + focused: false, + targetUid: getTargetUid(this.for), + + // used internally by validation for QInput + // or menu handling for QSelect + innerLoading: false + } + }, + + watch: { + for: function for$1 (val) { + // don't transform targetUid into a computed + // prop as it will break SSR + this.targetUid = getTargetUid(val); + } + }, + + computed: { + editable: function editable () { + return this.disable !== true && this.readonly !== true + }, + + hasValue: function hasValue () { + var value = this.__getControl === void 0 ? this.value : this.innerValue; + + return value !== void 0 && + value !== null && + ('' + value).length > 0 + }, + + computedCounter: function computedCounter () { + if (this.counter !== false) { + var len = typeof this.value === 'string' || typeof this.value === 'number' + ? ('' + this.value).length + : (Array.isArray(this.value) === true ? this.value.length : 0); + + var max = this.maxlength !== void 0 + ? this.maxlength + : this.maxValues; + + return len + (max !== void 0 ? ' / ' + max : '') + } + }, + + floatingLabel: function floatingLabel () { + return this.stackLabel === true || + this.focused === true || + ( + this.inputValue !== void 0 && this.hideSelected === true + ? this.inputValue.length > 0 + : this.hasValue === true + ) || + ( + this.displayValue !== void 0 && + this.displayValue !== null && + ('' + this.displayValue).length > 0 + ) + }, + + shouldRenderBottom: function shouldRenderBottom () { + return this.bottomSlots === true || + this.hint !== void 0 || + this.rules !== void 0 || + this.counter === true || + this.error !== null + }, + + classes: function classes () { + var obj; + + return ( obj = {}, obj[this.fieldClass] = this.fieldClass !== void 0, obj[("q-field--" + (this.styleType))] = true, obj['q-field--rounded'] = this.rounded, obj['q-field--square'] = this.square, obj['q-field--focused'] = this.focused === true || this.hasError === true, obj['q-field--float'] = this.floatingLabel, obj['q-field--labeled'] = this.label !== void 0, obj['q-field--dense'] = this.dense, obj['q-field--item-aligned q-item-type'] = this.itemAligned, obj['q-field--dark'] = this.isDark, obj['q-field--auto-height'] = this.__getControl === void 0, obj['q-field--with-bottom'] = this.hideBottomSpace !== true && this.shouldRenderBottom === true, obj['q-field--error'] = this.hasError, obj['q-field--readonly'] = this.readonly === true && this.disable !== true, obj['q-field--disabled'] = this.disable, obj ) + }, + + styleType: function styleType () { + if (this.filled === true) { return 'filled' } + if (this.outlined === true) { return 'outlined' } + if (this.borderless === true) { return 'borderless' } + if (this.standout) { return 'standout' } + return 'standard' + }, + + contentClass: function contentClass () { + var cls = []; + + if (this.hasError === true) { + cls.push('text-negative'); + } + else if (typeof this.standout === 'string' && this.standout.length > 0 && this.focused === true) { + return this.standout + } + else if (this.color !== void 0) { + cls.push('text-' + this.color); + } + + if (this.bgColor !== void 0) { + cls.push(("bg-" + (this.bgColor))); + } + + return cls + }, + + labelClass: function labelClass () { + if ( + this.labelColor !== void 0 && + this.hasError !== true + ) { + return 'text-' + this.labelColor + } + }, + + controlSlotScope: function controlSlotScope () { + return { + id: this.targetUid, + field: this.$el, + editable: this.editable, + focused: this.focused, + floatingLabel: this.floatingLabel, + value: this.value, + emitValue: this.__emitValue + } + }, + + attrs: function attrs () { + var attrs = { + for: this.targetUid + }; + + if (this.disable === true) { + attrs['aria-disabled'] = ''; + } + else if (this.readonly === true) { + attrs['aria-readonly'] = ''; + } + + return attrs + } + }, + + methods: { + focus: function focus () { + if (this.showPopup !== void 0 && this.hasDialog === true) { + this.showPopup(); + return + } + + this.__focus(); + }, + + blur: function blur () { + var el = document.activeElement; + // IE can have null document.activeElement + if (el !== null && this.$el.contains(el)) { + el.blur(); + } + }, + + __focus: function __focus () { + var el = document.activeElement; + var target = this.$refs.target; + // IE can have null document.activeElement + if (target !== void 0 && (el === null || el.id !== this.targetUid)) { + target.hasAttribute('tabindex') === true || (target = target.querySelector('[tabindex]')); + target !== null && target !== el && target.focus(); + } + }, + + __getContent: function __getContent (h) { + var node = []; + + this.$scopedSlots.prepend !== void 0 && node.push( + h('div', { + staticClass: 'q-field__prepend q-field__marginal row no-wrap items-center', + key: 'prepend', + on: this.slotsEvents + }, this.$scopedSlots.prepend()) + ); + + node.push( + h('div', { + staticClass: 'q-field__control-container col relative-position row no-wrap q-anchor--skip' + }, this.__getControlContainer(h)) + ); + + this.$scopedSlots.append !== void 0 && node.push( + h('div', { + staticClass: 'q-field__append q-field__marginal row no-wrap items-center', + key: 'append', + on: this.slotsEvents + }, this.$scopedSlots.append()) + ); + + this.hasError === true && this.noErrorIcon === false && node.push( + this.__getInnerAppendNode(h, 'error', [ + h(QIcon, { props: { name: this.$q.iconSet.field.error, color: 'negative' } }) + ]) + ); + + if (this.loading === true || this.innerLoading === true) { + node.push( + this.__getInnerAppendNode( + h, + 'inner-loading-append', + this.$scopedSlots.loading !== void 0 + ? this.$scopedSlots.loading() + : [ h(QSpinner, { props: { color: this.color } }) ] + ) + ); + } + else if (this.clearable === true && this.hasValue === true && this.editable === true) { + node.push( + this.__getInnerAppendNode(h, 'inner-clearable-append', [ + h(QIcon, { + staticClass: 'cursor-pointer', + props: { name: this.clearIcon || this.$q.iconSet.field.clear }, + on: this.clearableEvents + }) + ]) + ); + } + + this.__getInnerAppend !== void 0 && node.push( + this.__getInnerAppendNode(h, 'inner-append', this.__getInnerAppend(h)) + ); + + this.__getControlChild !== void 0 && node.push( + this.__getControlChild(h) + ); + + return node + }, + + __getControlContainer: function __getControlContainer (h) { + var node = []; + + this.prefix !== void 0 && this.prefix !== null && node.push( + h('div', { + staticClass: 'q-field__prefix no-pointer-events row items-center' + }, [ this.prefix ]) + ); + + if (this.__getControl !== void 0) { + node.push( + this.__getControl(h) + ); + } + // internal usage only: + else if (this.$scopedSlots.rawControl !== void 0) { + node.push(this.$scopedSlots.rawControl()); + } + else if (this.$scopedSlots.control !== void 0) { + node.push( + h('div', { + ref: 'target', + staticClass: 'q-field__native row', + attrs: Object.assign({}, this.$attrs, + {'data-autofocus': this.autofocus}) + }, this.$scopedSlots.control(this.controlSlotScope)) + ); + } + + this.label !== void 0 && node.push( + h('div', { + staticClass: 'q-field__label no-pointer-events absolute ellipsis', + class: this.labelClass + }, [ this.label ]) + ); + + this.suffix !== void 0 && this.suffix !== null && node.push( + h('div', { + staticClass: 'q-field__suffix no-pointer-events row items-center' + }, [ this.suffix ]) + ); + + return node.concat( + this.__getDefaultSlot !== void 0 + ? this.__getDefaultSlot(h) + : slot(this, 'default') + ) + }, + + __getBottom: function __getBottom (h) { + var msg, key; + + if (this.hasError === true) { + if (this.computedErrorMessage !== void 0) { + msg = [ h('div', [ this.computedErrorMessage ]) ]; + key = this.computedErrorMessage; + } + else { + msg = slot(this, 'error'); + key = 'q--slot-error'; + } + } + else if (this.hideHint !== true || this.focused === true) { + if (this.hint !== void 0) { + msg = [ h('div', [ this.hint ]) ]; + key = this.hint; + } + else { + msg = slot(this, 'hint'); + key = 'q--slot-hint'; + } + } + + var hasCounter = this.counter === true || this.$scopedSlots.counter !== void 0; + + if (this.hideBottomSpace === true && hasCounter === false && msg === void 0) { + return + } + + var main = h('div', { + key: key, + staticClass: 'q-field__messages col' + }, msg); + + return h('div', { + staticClass: 'q-field__bottom row items-start q-field__bottom--' + + (this.hideBottomSpace !== true ? 'animated' : 'stale') + }, [ + this.hideBottomSpace === true + ? main + : h('transition', { props: { name: 'q-transition--field-message' } }, [ + main + ]), + + hasCounter === true + ? h('div', { + staticClass: 'q-field__counter' + }, this.$scopedSlots.counter !== void 0 ? this.$scopedSlots.counter() : [ this.computedCounter ]) + : null + ]) + }, + + __getInnerAppendNode: function __getInnerAppendNode (h, key, content) { + return content === null ? null : h('div', { + staticClass: 'q-field__append q-field__marginal row no-wrap items-center q-anchor--skip', + key: key + }, content) + }, + + __onControlPopupShow: function __onControlPopupShow (e) { + e !== void 0 && stop(e); + this.$emit('popup-show', e); + this.hasPopupOpen = true; + this.__onControlFocusin(e); + }, + + __onControlPopupHide: function __onControlPopupHide (e) { + e !== void 0 && stop(e); + this.$emit('popup-hide', e); + this.hasPopupOpen = false; + this.__onControlFocusout(e); + }, + + __onControlFocusin: function __onControlFocusin (e) { + if (this.editable === true && this.focused === false) { + this.focused = true; + this.$emit('focus', e); + } + }, + + __onControlFocusout: function __onControlFocusout (e, then) { + var this$1 = this; + + clearTimeout(this.focusoutTimer); + this.focusoutTimer = setTimeout(function () { + if ( + document.hasFocus() === true && ( + this$1.hasPopupOpen === true || + this$1.$refs === void 0 || + this$1.$refs.control === void 0 || + this$1.$refs.control.contains(document.activeElement) !== false + ) + ) { + return + } + + if (this$1.focused === true) { + this$1.focused = false; + this$1.$emit('blur', e); + } + + then !== void 0 && then(); + }); + }, + + __clearValue: function __clearValue (e) { + stop(e); + if (this.type === 'file') { + // do not let focus be triggered + // as it will make the native file dialog + // appear for another selection + prevent(e); + this.$refs.input.value = null; + } + this.$emit('input', null); + this.$emit('clear', this.value); + }, + + __emitValue: function __emitValue (value) { + this.$emit('input', value); + } + }, + + render: function render (h) { + this.__onPreRender !== void 0 && this.__onPreRender(); + this.__onPostRender !== void 0 && this.$nextTick(this.__onPostRender); + + return h('label', { + staticClass: 'q-field row no-wrap items-start', + class: this.classes, + attrs: this.attrs + }, [ + this.$scopedSlots.before !== void 0 ? h('div', { + staticClass: 'q-field__before q-field__marginal row no-wrap items-center', + on: this.slotsEvents + }, this.$scopedSlots.before()) : null, + + h('div', { + staticClass: 'q-field__inner relative-position col self-stretch column justify-center' + }, [ + h('div', { + ref: 'control', + staticClass: 'q-field__control relative-position row no-wrap', + class: this.contentClass, + attrs: { tabindex: -1 }, + on: this.controlEvents + }, this.__getContent(h)), + + this.shouldRenderBottom === true + ? this.__getBottom(h) + : null + ]), + + this.$scopedSlots.after !== void 0 ? h('div', { + staticClass: 'q-field__after q-field__marginal row no-wrap items-center', + on: this.slotsEvents + }, this.$scopedSlots.after()) : null + ]) + }, + + created: function created () { + this.__onPreRender !== void 0 && this.__onPreRender(); + + this.slotsEvents = { click: prevent }; + + this.clearableEvents = { click: this.__clearValue }; + + this.controlEvents = this.__getControlEvents !== void 0 + ? this.__getControlEvents() + : { + focusin: this.__onControlFocusin, + focusout: this.__onControlFocusout, + 'popup-show': this.__onControlPopupShow, + 'popup-hide': this.__onControlPopupHide + }; + }, + + mounted: function mounted () { + if (fromSSR === true && this.for === void 0) { + this.targetUid = getTargetUid(); + } + + this.autofocus === true && this.focus(); + }, + + beforeDestroy: function beforeDestroy () { + clearTimeout(this.focusoutTimer); + } + }); + + var FileMixin = { + props: { + multiple: Boolean, + accept: String, + maxFileSize: Number, + maxTotalSize: Number, + filter: Function + }, + + computed: { + extensions: function extensions () { + if (this.accept !== void 0) { + return this.accept.split(',').map(function (ext) { + ext = ext.trim(); + // support "image/*" + if (ext.endsWith('/*')) { + ext = ext.slice(0, ext.length - 1); + } + return ext + }) + } + } + }, + + methods: { + pickFiles: function pickFiles (e) { + if (this.editable === true) { + var input = this.__getFileInput(); + input && input.click(e); + } + }, + + addFiles: function addFiles (files) { + if (this.editable && files) { + this.__addFiles(null, files); + } + }, + + __processFiles: function __processFiles (e, files) { + var this$1 = this; + + files = Array.from(files || e.target.files); + + // filter file types + if (this.accept !== void 0) { + files = files.filter(function (file) { + return this$1.extensions.some(function (ext) { return ( + file.type.toUpperCase().startsWith(ext.toUpperCase()) || + file.name.toUpperCase().endsWith(ext.toUpperCase()) + ); }) + }); + if (files.length === 0) { return } + } + + // filter max file size + if (this.maxFileSize !== void 0) { + files = files.filter(function (file) { return file.size <= this$1.maxFileSize; }); + if (files.length === 0) { return } + } + + // Cordova/iOS allows selecting multiple files even when the + // multiple attribute is not specified. We also normalize drag'n'dropped + // files here: + if (this.multiple !== true) { + files = [ files[0] ]; + } + + if (this.maxTotalSize !== void 0) { + var size = 0; + for (var i = 0; i < files.length; i++) { + size += files[i].size; + if (size > this.maxTotalSize) { + if (i > 0) { + files = files.slice(0, i); + break + } + else { + return + } + } + } + if (files.length === 0) { return } + } + + // do we have custom filter function? + if (typeof this.filter === 'function') { + files = this.filter(files); + } + + if (files.length > 0) { + return files + } + }, + + __onDragOver: function __onDragOver (e) { + stopAndPrevent(e); + this.dnd = true; + }, + + __onDragLeave: function __onDragLeave (e) { + stopAndPrevent(e); + this.dnd = false; + }, + + __onDrop: function __onDrop (e) { + stopAndPrevent(e); + var files = e.dataTransfer.files; + + if (files.length > 0) { + this.__addFiles(null, files); + } + + this.dnd = false; + }, + + __getDnd: function __getDnd (h, type) { + if (this.dnd === true) { + return h('div', { + staticClass: ("q-" + type + "__dnd absolute-full"), + on: cache(this, 'dnd', { + dragenter: stopAndPrevent, + dragover: stopAndPrevent, + dragleave: this.__onDragLeave, + drop: this.__onDrop + }) + }) + } + } + } + }; + + var FileValueMixin = { + computed: { + formDomProps: function formDomProps () { + if (this.type !== 'file') { + return + } + + try { + var dt = 'DataTransfer' in window + ? new DataTransfer() + : ('ClipboardEvent' in window + ? new ClipboardEvent('').clipboardData + : void 0 + ); + + if (Object(this.value) === this.value) { + ('length' in this.value + ? Array.from(this.value) + : [ this.value ] + ).forEach(function (file) { + dt.items.add(file); + }); + } + + return { + files: dt.files + } + } + catch (e) { + return { + files: void 0 + } + } + } + } + }; + + // leave NAMED_MASKS at top of file (code referenced from docs) + var NAMED_MASKS = { + date: '####/##/##', + datetime: '####/##/## ##:##', + time: '##:##', + fulltime: '##:##:##', + phone: '(###) ### - ####', + card: '#### #### #### ####' + }; + + var TOKENS = { + '#': { pattern: '[\\d]', negate: '[^\\d]' }, + + S: { pattern: '[a-zA-Z]', negate: '[^a-zA-Z]' }, + N: { pattern: '[0-9a-zA-Z]', negate: '[^0-9a-zA-Z]' }, + + A: { pattern: '[a-zA-Z]', negate: '[^a-zA-Z]', transform: function (v) { return v.toLocaleUpperCase(); } }, + a: { pattern: '[a-zA-Z]', negate: '[^a-zA-Z]', transform: function (v) { return v.toLocaleLowerCase(); } }, + + X: { pattern: '[0-9a-zA-Z]', negate: '[^0-9a-zA-Z]', transform: function (v) { return v.toLocaleUpperCase(); } }, + x: { pattern: '[0-9a-zA-Z]', negate: '[^0-9a-zA-Z]', transform: function (v) { return v.toLocaleLowerCase(); } } + }; + + var KEYS = Object.keys(TOKENS); + KEYS.forEach(function (key) { + TOKENS[key].regex = new RegExp(TOKENS[key].pattern); + }); + + var + tokenRegexMask = new RegExp('\\\\([^.*+?^${}()|([\\]])|([.*+?^${}()|[\\]])|([' + KEYS.join('') + '])|(.)', 'g'), + escRegex = /[.*+?^${}()|[\]\\]/g; + + var MARKER = String.fromCharCode(1); + + var MaskMixin = { + props: { + mask: String, + reverseFillMask: Boolean, + fillMask: [Boolean, String], + unmaskedValue: Boolean + }, + + watch: { + type: function type () { + this.__updateMaskInternals(); + }, + + mask: function mask (v) { + if (v !== void 0) { + this.__updateMaskValue(this.innerValue, true); + } + else { + var val = this.__unmask(this.innerValue); + this.__updateMaskInternals(); + this.value !== val && this.$emit('input', val); + } + }, + + fillMask: function fillMask () { + this.hasMask === true && this.__updateMaskValue(this.innerValue, true); + }, + + reverseFillMask: function reverseFillMask () { + this.hasMask === true && this.__updateMaskValue(this.innerValue, true); + }, + + unmaskedValue: function unmaskedValue () { + this.hasMask === true && this.__updateMaskValue(this.innerValue); + } + }, + + methods: { + __getInitialMaskedValue: function __getInitialMaskedValue () { + this.__updateMaskInternals(); + + if (this.hasMask === true) { + var masked = this.__mask(this.__unmask(this.value)); + + return this.fillMask !== false + ? this.__fillWithMask(masked) + : masked + } + + return this.value + }, + + __getPaddedMaskMarked: function __getPaddedMaskMarked (size) { + if (size < this.maskMarked.length) { + return this.maskMarked.slice(-size) + } + + var + maskMarked = this.maskMarked, + padPos = maskMarked.indexOf(MARKER), + pad = ''; + + if (padPos > -1) { + for (var i = size - maskMarked.length; i > 0; i--) { + pad += MARKER; + } + + maskMarked = maskMarked.slice(0, padPos) + pad + maskMarked.slice(padPos); + } + + return maskMarked + }, + + __updateMaskInternals: function __updateMaskInternals () { + var this$1 = this; + + this.hasMask = this.mask !== void 0 && + this.mask.length > 0 && + ['text', 'search', 'url', 'tel', 'password'].includes(this.type); + + if (this.hasMask === false) { + this.computedUnmask = void 0; + this.maskMarked = ''; + this.maskReplaced = ''; + return + } + + var + computedMask = NAMED_MASKS[this.mask] === void 0 + ? this.mask + : NAMED_MASKS[this.mask], + fillChar = typeof this.fillMask === 'string' && this.fillMask.length > 0 + ? this.fillMask.slice(0, 1) + : '_', + fillCharEscaped = fillChar.replace(escRegex, '\\$&'), + unmask = [], + extract = [], + mask = []; + + var + firstMatch = this.reverseFillMask === true, + unmaskChar = '', + negateChar = ''; + + computedMask.replace(tokenRegexMask, function (_, char1, esc, token, char2) { + if (token !== void 0) { + var c = TOKENS[token]; + mask.push(c); + negateChar = c.negate; + if (firstMatch === true) { + extract.push('(?:' + negateChar + '+)?(' + c.pattern + '+)?(?:' + negateChar + '+)?(' + c.pattern + '+)?'); + firstMatch = false; + } + extract.push('(?:' + negateChar + '+)?(' + c.pattern + ')?'); + } + else if (esc !== void 0) { + unmaskChar = '\\' + (esc === '\\' ? '' : esc); + mask.push(esc); + unmask.push('([^' + unmaskChar + ']+)?' + unmaskChar + '?'); + } + else { + var c$1 = char1 !== void 0 ? char1 : char2; + unmaskChar = c$1 === '\\' ? '\\\\\\\\' : c$1.replace(escRegex, '\\\\$&'); + mask.push(c$1); + unmask.push('([^' + unmaskChar + ']+)?' + unmaskChar + '?'); + } + }); + + var + unmaskMatcher = new RegExp( + '^' + + unmask.join('') + + '(' + (unmaskChar === '' ? '.' : '[^' + unmaskChar + ']') + '+)?' + + '$' + ), + extractLast = extract.length - 1, + extractMatcher = extract.map(function (re, index) { + if (index === 0 && this$1.reverseFillMask === true) { + return new RegExp('^' + fillCharEscaped + '*' + re) + } + else if (index === extractLast) { + return new RegExp( + '^' + re + + '(' + (negateChar === '' ? '.' : negateChar) + '+)?' + + (this$1.reverseFillMask === true ? '$' : fillCharEscaped + '*') + ) + } + + return new RegExp('^' + re) + }); + + this.computedMask = mask; + this.computedUnmask = function (val) { + var unmaskMatch = unmaskMatcher.exec(val); + if (unmaskMatch !== null) { + val = unmaskMatch.slice(1).join(''); + } + + var + extractMatch = [], + extractMatcherLength = extractMatcher.length; + + for (var i = 0, str = val; i < extractMatcherLength; i++) { + var m = extractMatcher[i].exec(str); + + if (m === null) { + break + } + + str = str.slice(m.shift().length); + extractMatch.push.apply(extractMatch, m); + } + if (extractMatch.length > 0) { + return extractMatch.join('') + } + + return val + }; + this.maskMarked = mask.map(function (v) { return typeof v === 'string' ? v : MARKER; }).join(''); + this.maskReplaced = this.maskMarked.split(MARKER).join(fillChar); + }, + + __updateMaskValue: function __updateMaskValue (rawVal, updateMaskInternals, inputType) { + var this$1 = this; + + var + inp = this.$refs.input, + end = inp.selectionEnd, + endReverse = inp.value.length - end, + unmasked = this.__unmask(rawVal); + + // Update here so unmask uses the original fillChar + updateMaskInternals === true && this.__updateMaskInternals(); + + var + preMasked = this.__mask(unmasked), + masked = this.fillMask !== false + ? this.__fillWithMask(preMasked) + : preMasked, + changed = this.innerValue !== masked; + + // We want to avoid "flickering" so we set value immediately + inp.value !== masked && (inp.value = masked); + + changed === true && (this.innerValue = masked); + + this.$nextTick(function () { + if (masked === this$1.maskReplaced) { + var cursor = this$1.reverseFillMask === true ? this$1.maskReplaced.length : 0; + inp.setSelectionRange(cursor, cursor, 'forward'); + + return + } + + if (inputType === 'insertFromPaste' && this$1.reverseFillMask !== true) { + var cursor$1 = end - 1; + this$1.__moveCursorRight(inp, cursor$1, cursor$1); + + return + } + + if (['deleteContentBackward', 'deleteContentForward'].indexOf(inputType) > -1) { + var cursor$2 = this$1.reverseFillMask === true + ? Math.max(0, masked.length - (masked === this$1.maskReplaced ? 0 : Math.min(preMasked.length, endReverse) + 1)) + 1 + : end; + inp.setSelectionRange(cursor$2, cursor$2, 'forward'); + + return + } + + if (this$1.reverseFillMask === true) { + if (changed === true) { + var cursor$3 = Math.max(0, masked.length - (masked === this$1.maskReplaced ? 0 : Math.min(preMasked.length, endReverse + 1))); + this$1.__moveCursorRightReverse(inp, cursor$3, cursor$3); + } + else { + var cursor$4 = masked.length - endReverse; + inp.setSelectionRange(cursor$4, cursor$4, 'backward'); + } + } + else { + if (changed === true) { + var cursor$5 = Math.max(0, this$1.maskMarked.indexOf(MARKER), Math.min(preMasked.length, end) - 1); + this$1.__moveCursorRight(inp, cursor$5, cursor$5); + } + else { + var cursor$6 = end - 1; + this$1.__moveCursorRight(inp, cursor$6, cursor$6); + } + } + }); + + var val = this.unmaskedValue === true + ? this.__unmask(masked) + : masked; + + this.value !== val && this.__emitValue(val, true); + }, + + __moveCursorForPaste: function __moveCursorForPaste (inp, start, end) { + var preMasked = this.__mask(this.__unmask(inp.value)); + + start = Math.max(0, this.maskMarked.indexOf(MARKER), Math.min(preMasked.length, start)); + + inp.setSelectionRange(start, end, 'forward'); + }, + + __moveCursorLeft: function __moveCursorLeft (inp, start, end, selection) { + var noMarkBefore = this.maskMarked.slice(start - 1).indexOf(MARKER) === -1; + var i = Math.max(0, start - 1); + + for (; i >= 0; i--) { + if (this.maskMarked[i] === MARKER) { + start = i; + noMarkBefore === true && start++; + break + } + } + + if ( + i < 0 && + this.maskMarked[start] !== void 0 && + this.maskMarked[start] !== MARKER + ) { + return this.__moveCursorRight(inp, 0, 0) + } + + start >= 0 && inp.setSelectionRange( + start, + selection === true ? end : start, 'backward' + ); + }, + + __moveCursorRight: function __moveCursorRight (inp, start, end, selection) { + var limit = inp.value.length; + var i = Math.min(limit, end + 1); + + for (; i <= limit; i++) { + if (this.maskMarked[i] === MARKER) { + end = i; + break + } + else if (this.maskMarked[i - 1] === MARKER) { + end = i; + } + } + + if ( + i > limit && + this.maskMarked[end - 1] !== void 0 && + this.maskMarked[end - 1] !== MARKER + ) { + return this.__moveCursorLeft(inp, limit, limit) + } + + inp.setSelectionRange(selection ? start : end, end, 'forward'); + }, + + __moveCursorLeftReverse: function __moveCursorLeftReverse (inp, start, end, selection) { + var + maskMarked = this.__getPaddedMaskMarked(inp.value.length); + var i = Math.max(0, start - 1); + + for (; i >= 0; i--) { + if (maskMarked[i - 1] === MARKER) { + start = i; + break + } + else if (maskMarked[i] === MARKER) { + start = i; + if (i === 0) { + break + } + } + } + + if ( + i < 0 && + maskMarked[start] !== void 0 && + maskMarked[start] !== MARKER + ) { + return this.__moveCursorRightReverse(inp, 0, 0) + } + + start >= 0 && inp.setSelectionRange( + start, + selection === true ? end : start, 'backward' + ); + }, + + __moveCursorRightReverse: function __moveCursorRightReverse (inp, start, end, selection) { + var + limit = inp.value.length, + maskMarked = this.__getPaddedMaskMarked(limit), + noMarkBefore = maskMarked.slice(0, end + 1).indexOf(MARKER) === -1; + var i = Math.min(limit, end + 1); + + for (; i <= limit; i++) { + if (maskMarked[i - 1] === MARKER) { + end = i; + end > 0 && noMarkBefore === true && end--; + break + } + } + + if ( + i > limit && + maskMarked[end - 1] !== void 0 && + maskMarked[end - 1] !== MARKER + ) { + return this.__moveCursorLeftReverse(inp, limit, limit) + } + + inp.setSelectionRange(selection === true ? start : end, end, 'forward'); + }, + + __onMaskedKeydown: function __onMaskedKeydown (e) { + if (shouldIgnoreKey(e) === true) { + return + } + + var + inp = this.$refs.input, + start = inp.selectionStart, + end = inp.selectionEnd; + + if (e.keyCode === 37 || e.keyCode === 39) { // Left / Right + var fn = this['__moveCursor' + (e.keyCode === 39 ? 'Right' : 'Left') + (this.reverseFillMask === true ? 'Reverse' : '')]; + + e.preventDefault(); + fn(inp, start, end, e.shiftKey); + } + else if ( + e.keyCode === 8 && // Backspace + this.reverseFillMask !== true && + start === end + ) { + this.__moveCursorLeft(inp, start, end, true); + } + else if ( + e.keyCode === 46 && // Delete + this.reverseFillMask === true && + start === end + ) { + this.__moveCursorRightReverse(inp, start, end, true); + } + + this.$emit('keydown', e); + }, + + __mask: function __mask (val) { + if (val === void 0 || val === null || val === '') { return '' } + + if (this.reverseFillMask === true) { + return this.__maskReverse(val) + } + + var mask = this.computedMask; + + var valIndex = 0, output = ''; + + for (var maskIndex = 0; maskIndex < mask.length; maskIndex++) { + var + valChar = val[valIndex], + maskDef = mask[maskIndex]; + + if (typeof maskDef === 'string') { + output += maskDef; + valChar === maskDef && valIndex++; + } + else if (valChar !== void 0 && maskDef.regex.test(valChar)) { + output += maskDef.transform !== void 0 + ? maskDef.transform(valChar) + : valChar; + valIndex++; + } + else { + return output + } + } + + return output + }, + + __maskReverse: function __maskReverse (val) { + var + mask = this.computedMask, + firstTokenIndex = this.maskMarked.indexOf(MARKER); + + var valIndex = val.length - 1, output = ''; + + for (var maskIndex = mask.length - 1; maskIndex >= 0; maskIndex--) { + var maskDef = mask[maskIndex]; + + var valChar = val[valIndex]; + + if (typeof maskDef === 'string') { + output = maskDef + output; + valChar === maskDef && valIndex--; + } + else if (valChar !== void 0 && maskDef.regex.test(valChar)) { + do { + output = (maskDef.transform !== void 0 ? maskDef.transform(valChar) : valChar) + output; + valIndex--; + valChar = val[valIndex]; + // eslint-disable-next-line no-unmodified-loop-condition + } while (firstTokenIndex === maskIndex && valChar !== void 0 && maskDef.regex.test(valChar)) + } + else { + return output + } + } + + return output + }, + + __unmask: function __unmask (val) { + return typeof val !== 'string' || this.computedUnmask === void 0 + ? (typeof val === 'number' ? this.computedUnmask('' + val) : val) + : this.computedUnmask(val) + }, + + __fillWithMask: function __fillWithMask (val) { + if (this.maskReplaced.length - val.length <= 0) { + return val + } + + return this.reverseFillMask === true && val.length > 0 + ? this.maskReplaced.slice(0, -val.length) + val + : val + this.maskReplaced.slice(val.length) + } + } + }; + + var isJapanese = /[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/; + var isChinese = /(?:[\u3300-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF\uFE30-\uFE4F]|[\uD840-\uD868\uD86A-\uD872][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD873[\uDC00-\uDEAF]|\uD87E[\uDC00-\uDE1F])/; + var isKorean = /[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/; + + var CompositionMixin = { + methods: { + __onComposition: function __onComposition (e) { + if (e.type === 'compositionend' || e.type === 'change') { + if (e.target.composing !== true) { return } + e.target.composing = false; + this.__onInput(e); + } + else if (e.type === 'compositionupdate') { + if ( + typeof e.data === 'string' && + isJapanese.test(e.data) === false && + isChinese.test(e.data) === false && + isKorean.test(e.data) === false + ) { + e.target.composing = false; + } + } + else { + e.target.composing = true; + } + } + } + }; + + var QInput = Vue.extend({ + name: 'QInput', + + mixins: [ QField, MaskMixin, CompositionMixin, FormFieldMixin, FileValueMixin ], + + props: { + value: { required: false }, + + type: { + type: String, + default: 'text' + }, + + debounce: [String, Number], + + autogrow: Boolean, // makes a textarea + + inputClass: [Array, String, Object], + inputStyle: [Array, String, Object] + }, + + watch: { + value: function value (v) { + if (this.hasMask === true) { + if (this.stopValueWatcher === true) { + this.stopValueWatcher = false; + return + } + + this.__updateMaskValue(v); + } + else if (this.innerValue !== v) { + this.innerValue = v; + + if ( + this.type === 'number' && + this.hasOwnProperty('tempValue') === true + ) { + if (this.typedNumber === true) { + this.typedNumber = false; + } + else { + delete this.tempValue; + } + } + } + + // textarea only + this.autogrow === true && this.$nextTick(this.__adjustHeight); + }, + + autogrow: function autogrow (autogrow$1) { + // textarea only + if (autogrow$1 === true) { + this.$nextTick(this.__adjustHeight); + } + // if it has a number of rows set respect it + else if (this.$attrs.rows > 0 && this.$refs.input !== void 0) { + var inp = this.$refs.input; + inp.style.height = 'auto'; + } + }, + + dense: function dense () { + this.autogrow === true && this.$nextTick(this.__adjustHeight); + } + }, + + data: function data () { + return { innerValue: this.__getInitialMaskedValue() } + }, + + computed: { + isTextarea: function isTextarea () { + return this.type === 'textarea' || this.autogrow === true + }, + + fieldClass: function fieldClass () { + return "q-" + (this.isTextarea === true ? 'textarea' : 'input') + + (this.autogrow === true ? ' q-textarea--autogrow' : '') + } + }, + + methods: { + focus: function focus () { + var el = document.activeElement; + if ( + this.$refs.input !== void 0 && + this.$refs.input !== el && + // IE can have null document.activeElement + (el === null || el.id !== this.targetUid) + ) { + this.$refs.input.focus(); + } + }, + + select: function select () { + this.$refs.input !== void 0 && this.$refs.input.select(); + }, + + __onPaste: function __onPaste (e) { + if (this.hasMask === true && this.reverseFillMask !== true) { + var inp = e.target; + this.__moveCursorForPaste(inp, inp.selectionStart, inp.selectionEnd); + } + }, + + __onInput: function __onInput (e) { + if (e && e.target && e.target.composing === true) { + return + } + + if (this.type === 'file') { + this.$emit('input', e.target.files); + return + } + + var val = e.target.value; + + if (this.hasMask === true) { + this.__updateMaskValue(val, false, e.inputType); + } + else { + this.__emitValue(val); + } + + // we need to trigger it immediately too, + // to avoid "flickering" + this.autogrow === true && this.__adjustHeight(); + }, + + __emitValue: function __emitValue (val, stopWatcher) { + var this$1 = this; + + this.emitValueFn = function () { + if ( + this$1.type !== 'number' && + this$1.hasOwnProperty('tempValue') === true + ) { + delete this$1.tempValue; + } + + if (this$1.value !== val) { + stopWatcher === true && (this$1.stopValueWatcher = true); + this$1.$emit('input', val); + } + + this$1.emitValueFn = void 0; + }; + + if (this.type === 'number') { + this.typedNumber = true; + this.tempValue = val; + } + + if (this.debounce !== void 0) { + clearTimeout(this.emitTimer); + this.tempValue = val; + this.emitTimer = setTimeout(this.emitValueFn, this.debounce); + } + else { + this.emitValueFn(); + } + }, + + // textarea only + __adjustHeight: function __adjustHeight () { + var inp = this.$refs.input; + if (inp !== void 0) { + var parentStyle = inp.parentNode.style; + + // reset height of textarea to a small size to detect the real height + // but keep the total control size the same + parentStyle.marginBottom = (inp.scrollHeight - 1) + 'px'; + inp.style.height = '1px'; + + inp.style.height = inp.scrollHeight + 'px'; + parentStyle.marginBottom = ''; + } + }, + + __onChange: function __onChange (e) { + this.__onComposition(e); + + clearTimeout(this.emitTimer); + this.emitValueFn !== void 0 && this.emitValueFn(); + + this.$emit('change', e); + }, + + __onFinishEditing: function __onFinishEditing (e) { + var this$1 = this; + + e !== void 0 && stop(e); + + clearTimeout(this.emitTimer); + this.emitValueFn !== void 0 && this.emitValueFn(); + + this.typedNumber = false; + this.stopValueWatcher = false; + delete this.tempValue; + + this.type !== 'file' && this.$nextTick(function () { + if (this$1.$refs.input !== void 0) { + this$1.$refs.input.value = this$1.innerValue !== void 0 ? this$1.innerValue : ''; + } + }); + }, + + __getControl: function __getControl (h) { + var on = Object.assign({}, this.$listeners, + {input: this.__onInput, + paste: this.__onPaste, + // Safari < 10.2 & UIWebView doesn't fire compositionend when + // switching focus before confirming composition choice + // this also fixes the issue where some browsers e.g. iOS Chrome + // fires "change" instead of "input" on autocomplete. + change: this.__onChange, + blur: this.__onFinishEditing, + focus: stop}); + + on.compositionstart = on.compositionupdate = on.compositionend = this.__onComposition; + + if (this.hasMask === true) { + on.keydown = this.__onMaskedKeydown; + } + + var attrs = Object.assign({}, {tabindex: 0, + 'data-autofocus': this.autofocus, + rows: this.type === 'textarea' ? 6 : void 0, + 'aria-label': this.label, + name: this.nameProp}, + this.$attrs, + {id: this.targetUid, + type: this.type, + maxlength: this.maxlength}); + + if (this.disable === true) { + attrs.disabled = ''; + attrs['aria-disabled'] = ''; + } + else if (this.readonly === true) { + attrs.readonly = ''; + attrs['aria-readonly'] = ''; + } + + if (this.autogrow === true) { + attrs.rows = 1; + on.animationend = this.__adjustHeight; + } + + return h(this.isTextarea === true ? 'textarea' : 'input', { + ref: 'input', + staticClass: 'q-field__native q-placeholder', + style: this.inputStyle, + class: this.inputClass, + attrs: attrs, + on: on, + domProps: this.type !== 'file' + ? { + value: this.hasOwnProperty('tempValue') === true + ? this.tempValue + : (this.innerValue !== void 0 ? this.innerValue : '') + } + : this.formDomProps + }) + } + }, + + mounted: function mounted () { + // textarea only + this.autogrow === true && this.__adjustHeight(); + }, + + beforeDestroy: function beforeDestroy () { + this.__onFinishEditing(); + } + }); + + var QTooltip = Vue.extend({ + name: 'QTooltip', + + mixins: [ AnchorMixin, ModelToggleMixin, PortalMixin, TransitionMixin ], + + props: { + maxHeight: { + type: String, + default: null + }, + maxWidth: { + type: String, + default: null + }, + + transitionShow: { + default: 'jump-down' + }, + transitionHide: { + default: 'jump-up' + }, + + anchor: { + type: String, + default: 'bottom middle', + validator: validatePosition + }, + self: { + type: String, + default: 'top middle', + validator: validatePosition + }, + offset: { + type: Array, + default: function () { return [14, 14]; }, + validator: validateOffset + }, + + scrollTarget: { + default: void 0 + }, + + delay: { + type: Number, + default: 0 + }, + + hideDelay: { + type: Number, + default: 0 + } + }, + + computed: { + anchorOrigin: function anchorOrigin () { + return parsePosition(this.anchor) + }, + + selfOrigin: function selfOrigin () { + return parsePosition(this.self) + }, + + hideOnRouteChange: function hideOnRouteChange () { + return this.persistent !== true + } + }, + + methods: { + __show: function __show (evt) { + var this$1 = this; + + this.__showPortal(); + + this.__nextTick(function () { + this$1.observer = new MutationObserver(function () { return this$1.updatePosition(); }); + this$1.observer.observe(this$1.__portal.$el, { attributes: false, childList: true, characterData: true, subtree: true }); + this$1.updatePosition(); + this$1.__configureScrollTarget(); + }); + + this.__setTimeout(function () { + this$1.$emit('show', evt); + }, 300); + }, + + __hide: function __hide (evt) { + var this$1 = this; + + this.__anchorCleanup(); + + this.__setTimeout(function () { + this$1.__hidePortal(); + this$1.$emit('hide', evt); + }, 300); + }, + + __anchorCleanup: function __anchorCleanup () { + if (this.observer !== void 0) { + this.observer.disconnect(); + this.observer = void 0; + } + + this.__unconfigureScrollTarget(); + cleanEvt(this, 'tooltipTemp'); + }, + + updatePosition: function updatePosition () { + if (this.anchorEl === void 0 || this.__portal === void 0) { + return + } + + var el = this.__portal.$el; + + if (el.nodeType === 8) { // IE replaces the comment with delay + setTimeout(this.updatePosition, 25); + return + } + + setPosition({ + el: el, + offset: this.offset, + anchorEl: this.anchorEl, + anchorOrigin: this.anchorOrigin, + selfOrigin: this.selfOrigin, + maxHeight: this.maxHeight, + maxWidth: this.maxWidth + }); + }, + + __delayShow: function __delayShow (evt) { + var this$1 = this; + + if (this.$q.platform.is.mobile === true) { + clearSelection(); + document.body.classList.add('non-selectable'); + + var target = getTouchTarget(this.anchorEl); + var evts = ['touchmove', 'touchcancel', 'touchend', 'click'] + .map(function (e) { return ([ target, e, '__delayHide', 'passiveCapture' ]); }); + + addEvt(this, 'tooltipTemp', evts); + } + + this.__setTimeout(function () { + this$1.show(evt); + }, this.delay); + }, + + __delayHide: function __delayHide (evt) { + var this$1 = this; + + this.__clearTimeout(); + + if (this.$q.platform.is.mobile === true) { + cleanEvt(this, 'tooltipTemp'); + clearSelection(); + // delay needed otherwise selection still occurs + setTimeout(function () { + document.body.classList.remove('non-selectable'); + }, 10); + } + + this.__setTimeout(function () { + this$1.hide(evt); + }, this.hideDelay); + }, + + __configureAnchorEl: function __configureAnchorEl () { + if (this.noParentEvent === true || this.anchorEl === void 0) { return } + + var evts = this.$q.platform.is.mobile === true + ? [ + [ this.anchorEl, 'touchstart', '__delayShow', 'passive' ] + ] + : [ + [ this.anchorEl, 'mouseenter', '__delayShow', 'passive' ], + [ this.anchorEl, 'mouseleave', '__delayHide', 'passive' ] + ]; + + addEvt(this, 'anchor', evts); + }, + + __unconfigureScrollTarget: function __unconfigureScrollTarget () { + if (this.__scrollTarget !== void 0) { + this.__changeScrollEvent(this.__scrollTarget); + this.__scrollTarget = void 0; + } + }, + + __configureScrollTarget: function __configureScrollTarget () { + if (this.anchorEl !== void 0 || this.scrollTarget !== void 0) { + this.__scrollTarget = getScrollTarget(this.anchorEl, this.scrollTarget); + var fn = this.noParentEvent === true + ? this.updatePosition + : this.hide; + + this.__changeScrollEvent(this.__scrollTarget, fn); + } + }, + + __renderPortal: function __renderPortal (h) { + return h('transition', { + props: { name: this.transition } + }, [ + this.showing === true ? h('div', { + staticClass: 'q-tooltip q-tooltip--style q-position-engine no-pointer-events', + class: this.contentClass, + style: this.contentStyle, + attrs: { + role: 'complementary' + } + }, slot(this, 'default')) : null + ]) + } + }, + + mounted: function mounted () { + this.__processModelChange(this.value); + } + }); + + var QList = Vue.extend({ + name: 'QList', + + mixins: [ DarkMixin ], + + props: { + bordered: Boolean, + dense: Boolean, + separator: Boolean, + padding: Boolean + }, + + computed: { + classes: function classes () { + return 'q-list' + + (this.bordered === true ? ' q-list--bordered' : '') + + (this.dense === true ? ' q-list--dense' : '') + + (this.separator === true ? ' q-list--separator' : '') + + (this.isDark === true ? ' q-list--dark' : '') + + (this.padding === true ? ' q-list--padding' : '') + } + }, + + render: function render (h) { + return h('div', { + class: this.classes, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + var QItem = Vue.extend({ + name: 'QItem', + + mixins: [ DarkMixin, RouterLinkMixin, TagMixin ], + + props: { + active: Boolean, + + clickable: Boolean, + dense: Boolean, + insetLevel: Number, + + tabindex: [ String, Number ], + + focused: Boolean, + manualFocus: Boolean + }, + + computed: { + isClickable: function isClickable () { + return this.disable !== true && ( + this.clickable === true || + this.hasRouterLink === true || + this.tag === 'a' || + this.tag === 'label' + ) + }, + + classes: function classes () { + var obj; + + return ( obj = { + 'q-item--clickable q-link cursor-pointer': this.isClickable, + 'q-focusable q-hoverable': this.isClickable === true && this.manualFocus === false, + + 'q-manual-focusable': this.isClickable === true && this.manualFocus === true, + 'q-manual-focusable--focused': this.isClickable === true && this.focused === true, + + 'q-item--dense': this.dense, + 'q-item--dark': this.isDark, + 'q-item--active': this.active + }, obj[this.activeClass] = this.active === true && this.hasRouterLink !== true && this.activeClass !== void 0, obj['disabled'] = this.disable, obj ) + }, + + style: function style () { + var obj; + + if (this.insetLevel !== void 0) { + var dir = this.$q.lang.rtl === true ? 'Right' : 'Left'; + return ( obj = {}, obj['padding' + dir] = (16 + this.insetLevel * 56) + 'px', obj ) + } + } + }, + + methods: { + __getContent: function __getContent (h) { + var child = uniqueSlot(this, 'default', []); + this.isClickable === true && child.unshift( + h('div', { staticClass: 'q-focus-helper', attrs: { tabindex: -1 }, ref: 'blurTarget' }) + ); + return child + }, + + __onClick: function __onClick (e) { + if (this.isClickable === true) { + if (this.$refs.blurTarget !== void 0) { + if (e.qKeyEvent !== true && document.activeElement === this.$el) { + this.$refs.blurTarget.focus(); + } + else if (document.activeElement === this.$refs.blurTarget) { + this.$el.focus(); + } + } + + this.$emit('click', e); + } + }, + + __onKeyup: function __onKeyup (e) { + if (this.isClickable === true && isKeyCode(e, 13) === true) { + stopAndPrevent(e); + + // for ripple + e.qKeyEvent = true; + + // for click trigger + var evt = new MouseEvent('click', e); + evt.qKeyEvent = true; + this.$el.dispatchEvent(evt); + } + + this.$emit('keyup', e); + } + }, + + render: function render (h) { + var data = { + staticClass: 'q-item q-item-type row no-wrap', + class: this.classes, + style: this.style + }; + + var evtProp = this.hasRouterLink === true ? 'nativeOn' : 'on'; + data[evtProp] = Object.assign({}, this.$listeners, + {click: this.__onClick, + keyup: this.__onKeyup}); + + if (this.isClickable === true) { + data.attrs = { + tabindex: this.tabindex || '0' + }; + } + + if (this.hasRouterLink === true) { + data.tag = 'a'; + data.props = this.routerLinkProps; + + return h('router-link', data, this.__getContent(h)) + } + + return h( + this.tag, + data, + this.__getContent(h) + ) + } + }); + + var QItemSection = Vue.extend({ + name: 'QItemSection', + + props: { + avatar: Boolean, + thumbnail: Boolean, + side: Boolean, + top: Boolean, + noWrap: Boolean + }, + + computed: { + classes: function classes () { + var obj; + + var side = this.avatar || this.side || this.thumbnail; + + return ( obj = { + 'q-item__section--top': this.top, + 'q-item__section--avatar': this.avatar, + 'q-item__section--thumbnail': this.thumbnail, + 'q-item__section--side': side, + 'q-item__section--nowrap': this.noWrap, + 'q-item__section--main': !side + }, obj[("justify-" + (this.top ? 'start' : 'center'))] = true, obj ) + } + }, + + render: function render (h) { + return h('div', { + staticClass: 'q-item__section column', + class: this.classes, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + function run (e, btn, vm) { + if (btn.handler) { + btn.handler(e, vm, vm.caret); + } + else { + vm.runCmd(btn.cmd, btn.param); + } + } + + function __getGroup (h, children) { + return h('div', { + staticClass: 'q-editor__toolbar-group' + }, children) + } + + function getBtn (h, vm, btn, clickHandler, active) { + if ( active === void 0 ) active = false; + + var + toggled = active || (btn.type === 'toggle' + ? (btn.toggled ? btn.toggled(vm) : btn.cmd && vm.caret.is(btn.cmd, btn.param)) + : false), + child = [], + events = { + click: function click (e) { + clickHandler && clickHandler(); + run(e, btn, vm); + } + }; + + if (btn.tip && vm.$q.platform.is.desktop) { + var Key = btn.key + ? h('div', [h('small', ("(CTRL + " + (String.fromCharCode(btn.key)) + ")"))]) + : null; + child.push( + h(QTooltip, { props: { delay: 1000 } }, [ + h('div', { domProps: { innerHTML: btn.tip } }), + Key + ]) + ); + } + + return h(QBtn, { + props: Object.assign({}, vm.buttonProps, + {icon: btn.icon, + color: toggled ? btn.toggleColor || vm.toolbarToggleColor : btn.color || vm.toolbarColor, + textColor: toggled && !vm.toolbarPush ? null : btn.textColor || vm.toolbarTextColor, + label: btn.label, + disable: btn.disable ? (typeof btn.disable === 'function' ? btn.disable(vm) : true) : false, + size: 'sm'}), + on: events + }, child) + } + + function getDropdown (h, vm, btn) { + var + label = btn.label, + icon = btn.icon, + onlyIcons = btn.list === 'only-icons', + contentClass, + Items; + + function closeDropdown () { + Dropdown.componentInstance.hide(); + } + + if (onlyIcons) { + Items = btn.options.map(function (btn) { + var active = btn.type === void 0 + ? vm.caret.is(btn.cmd, btn.param) + : false; + + if (active) { + label = btn.tip; + icon = btn.icon; + } + return getBtn(h, vm, btn, closeDropdown, active) + }); + contentClass = vm.toolbarBackgroundClass; + Items = [ + __getGroup(h, Items) + ]; + } + else { + var activeClass = vm.toolbarToggleColor !== void 0 + ? ("text-" + (vm.toolbarToggleColor)) + : null; + var inactiveClass = vm.toolbarTextColor !== void 0 + ? ("text-" + (vm.toolbarTextColor)) + : null; + + Items = btn.options.map(function (btn) { + var disable = btn.disable ? btn.disable(vm) : false; + var active = btn.type === void 0 + ? vm.caret.is(btn.cmd, btn.param) + : false; + + if (active) { + label = btn.tip; + icon = btn.icon; + } + + var htmlTip = btn.htmlTip; + + return h( + QItem, + { + props: { active: active, activeClass: activeClass, clickable: true, disable: disable, dense: true }, + on: { + click: function click (e) { + closeDropdown(); + vm.$refs.content && vm.$refs.content.focus(); + vm.caret.restore(); + run(e, btn, vm); + } + } + }, + [ + btn.list === 'no-icons' + ? null + : h(QItemSection, { + class: active ? activeClass : inactiveClass, + props: { side: true } + }, [ + h(QIcon, { props: { name: btn.icon } }) + ]), + + h(QItemSection, [ + htmlTip + ? h('div', { + domProps: { innerHTML: btn.htmlTip } + }) + : (btn.tip ? h('div', [ btn.tip ]) : null) + ]) + ] + ) + }); + contentClass = [vm.toolbarBackgroundClass, inactiveClass]; + Items = [ + h(QList, [ Items ]) + ]; + } + + var highlight = btn.highlight && label !== btn.label; + var Dropdown = h( + QBtnDropdown, + { + props: Object.assign({}, vm.buttonProps, + {noCaps: true, + noWrap: true, + color: highlight ? vm.toolbarToggleColor : vm.toolbarColor, + textColor: highlight && !vm.toolbarPush ? null : vm.toolbarTextColor, + label: btn.fixedLabel ? btn.label : label, + icon: btn.fixedIcon ? btn.icon : icon, + contentClass: contentClass}) + }, + Items + ); + return Dropdown + } + + function getToolbar (h, vm) { + if (vm.caret) { + return vm.buttons + .filter(function (f) { + return !vm.isViewingSource || f.find(function (fb) { return fb.cmd === 'viewsource'; }) + }) + .map(function (group) { return __getGroup( + h, + group.map(function (btn) { + if (vm.isViewingSource && btn.cmd !== 'viewsource') { + return false + } + + if (btn.type === 'slot') { + return slot(vm, btn.slot) + } + + if (btn.type === 'dropdown') { + return getDropdown(h, vm, btn) + } + + return getBtn(h, vm, btn) + }) + ); }) + } + } + + function getFonts (defaultFont, defaultFontLabel, defaultFontIcon, fonts) { + if ( fonts === void 0 ) fonts = {}; + + var aliases = Object.keys(fonts); + if (aliases.length === 0) { + return {} + } + + var def = { + default_font: { + cmd: 'fontName', + param: defaultFont, + icon: defaultFontIcon, + tip: defaultFontLabel + } + }; + + aliases.forEach(function (alias) { + var name = fonts[alias]; + def[alias] = { + cmd: 'fontName', + param: name, + icon: defaultFontIcon, + tip: name, + htmlTip: ("" + name + "") + }; + }); + + return def + } + + function getLinkEditor (h, vm, ie11) { + if (vm.caret) { + var color = vm.toolbarColor || vm.toolbarTextColor; + var link = vm.editLinkUrl; + var updateLink = function () { + vm.caret.restore(); + + if (link !== vm.editLinkUrl) { + document.execCommand('createLink', false, link === '' ? ' ' : link); + } + + vm.editLinkUrl = null; + + ie11 === true && vm.$nextTick(vm.__onInput); + }; + + return [ + h('div', { staticClass: 'q-mx-xs', 'class': ("text-" + color) }, [((vm.$q.lang.editor.url) + ": ")]), + h(QInput, { + key: 'qedt_btm_input', + staticClass: 'q-ma-none q-pa-none col q-editor-input', + props: { + value: link, + color: color, + autofocus: true, + borderless: true, + dense: true + }, + on: { + input: function (val) { link = val; }, + keydown: function (event) { + if (shouldIgnoreKey(event) === true) { + return + } + + switch (event.keyCode) { + case 13: // ENTER key + prevent(event); + return updateLink() + case 27: // ESCAPE key + prevent(event); + vm.caret.restore(); + if (!vm.editLinkUrl || vm.editLinkUrl === 'https://') { + document.execCommand('unlink'); + } + vm.editLinkUrl = null; + break + } + } + } + }), + __getGroup(h, [ + h(QBtn, { + key: 'qedt_btm_rem', + attrs: { tabindex: -1 }, + props: Object.assign({}, vm.buttonProps, + {label: vm.$q.lang.label.remove, + noCaps: true}), + on: { + click: function () { + vm.caret.restore(); + document.execCommand('unlink'); + vm.editLinkUrl = null; + + ie11 === true && vm.$nextTick(vm.__onInput); + } + } + }), + h(QBtn, { + key: 'qedt_btm_upd', + props: Object.assign({}, vm.buttonProps, + {label: vm.$q.lang.label.update, + noCaps: true}), + on: { + click: updateLink + } + }) + ]) + ] + } + } + + function getBlockElement (el, parent) { + if (parent && el === parent) { + return null + } + + var nodeName = el.nodeName.toLowerCase(); + + if (['div', 'li', 'ul', 'ol', 'blockquote'].includes(nodeName) === true) { + return el + } + + var + style = window.getComputedStyle + ? window.getComputedStyle(el) + : el.currentStyle, + display = style.display; + + if (display === 'block' || display === 'table') { + return el + } + + return getBlockElement(el.parentNode) + } + + function isChildOf (el, parent) { + return el === parent + ? false + : (parent === document ? document.body : parent).contains(el) + } + + var urlRegex = /^https?:\/\//; + + var Caret = function Caret (el, vm) { + this.el = el; + this.vm = vm; + this._range = null; + }; + + var prototypeAccessors = { selection: { configurable: true },hasSelection: { configurable: true },range: { configurable: true },parent: { configurable: true },blockParent: { configurable: true } }; + + prototypeAccessors.selection.get = function () { + if (this.el) { + var sel = document.getSelection(); + + // only when the selection in element + if (isChildOf(sel.anchorNode, this.el) && isChildOf(sel.focusNode, this.el)) { + return sel + } + } + + return null + }; + + prototypeAccessors.hasSelection.get = function () { + return this.selection !== null + ? this.selection.toString().length > 0 + : false + }; + + prototypeAccessors.range.get = function () { + var sel = this.selection; + + if (sel !== null && sel.rangeCount) { + return sel.getRangeAt(0) + } + + return this._range + }; + + prototypeAccessors.parent.get = function () { + var range = this.range; + + if (range !== null) { + var node = range.startContainer; + + return node.nodeType === document.ELEMENT_NODE + ? node + : node.parentNode + } + + return null + }; + + prototypeAccessors.blockParent.get = function () { + var parent = this.parent; + + if (parent !== null) { + return getBlockElement(parent, this.el) + } + + return null + }; + + Caret.prototype.save = function save (range) { + if ( range === void 0 ) range = this.range; + + if (range !== null) { + this._range = range; + } + }; + + Caret.prototype.restore = function restore (range) { + if ( range === void 0 ) range = this._range; + + var + r = document.createRange(), + sel = document.getSelection(); + + if (range !== null) { + r.setStart(range.startContainer, range.startOffset); + r.setEnd(range.endContainer, range.endOffset); + sel.removeAllRanges(); + sel.addRange(r); + } + else { + sel.selectAllChildren(this.el); + sel.collapseToEnd(); + } + }; + + Caret.prototype.hasParent = function hasParent (name, spanLevel) { + var el = spanLevel + ? this.parent + : this.blockParent; + + return el !== null + ? el.nodeName.toLowerCase() === name.toLowerCase() + : false + }; + + Caret.prototype.hasParents = function hasParents (list, recursive, el) { + if ( el === void 0 ) el = this.parent; + + if (el === null) { + return false + } + + if (el !== null && list.includes(el.nodeName.toLowerCase()) === true) { + return true + } + + return recursive === true + ? this.hasParents(list, recursive, el.parentNode) + : false + }; + + Caret.prototype.is = function is (cmd, param) { + switch (cmd) { + case 'formatBlock': + if (param === 'DIV' && this.parent === this.el) { + return true + } + return this.hasParent(param, param === 'PRE') + case 'link': + return this.hasParent('A', true) + case 'fontSize': + return document.queryCommandValue(cmd) === param + case 'fontName': + var res = document.queryCommandValue(cmd); + return res === ("\"" + param + "\"") || res === param + case 'fullscreen': + return this.vm.inFullscreen + case 'viewsource': + return this.vm.isViewingSource + case void 0: + return false + default: + var state = document.queryCommandState(cmd); + return param !== void 0 ? state === param : state + } + }; + + Caret.prototype.getParentAttribute = function getParentAttribute (attrib) { + if (this.parent !== null) { + return this.parent.getAttribute(attrib) + } + + return null + }; + + Caret.prototype.can = function can (name) { + if (name === 'outdent') { + return this.hasParents(['blockquote', 'li'], true) + } + + if (name === 'indent') { + return this.hasParents(['li'], true) + } + + if (name === 'link') { + return this.selection !== null || this.is('link') + } + }; + + Caret.prototype.apply = function apply (cmd, param, done) { + if ( done === void 0 ) done = noop; + + if (cmd === 'formatBlock') { + if (['BLOCKQUOTE', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6'].includes(param) && this.is(cmd, param)) { + cmd = 'outdent'; + param = null; + } + + if (param === 'PRE' && this.is(cmd, 'PRE')) { + param = 'P'; + } + } + else if (cmd === 'print') { + done(); + + var win = window.open(); + + win.document.write(("\n \n \n \n Print - " + (document.title) + "\n \n \n
    " + (this.el.innerHTML) + "
    \n \n \n ")); + win.print(); + win.close(); + + return + } + else if (cmd === 'link') { + var link = this.getParentAttribute('href'); + + if (link === null) { + var selection = this.selectWord(this.selection); + var url = selection ? selection.toString() : ''; + + if (!url.length) { + return + } + + this.vm.editLinkUrl = urlRegex.test(url) ? url : 'https://'; + document.execCommand('createLink', false, this.vm.editLinkUrl); + + this.save(selection.getRangeAt(0)); + } + else { + this.vm.editLinkUrl = link; + + this.range.selectNodeContents(this.parent); + this.save(); + } + + return + } + else if (cmd === 'fullscreen') { + this.vm.toggleFullscreen(); + done(); + + return + } + else if (cmd === 'viewsource') { + this.vm.isViewingSource = this.vm.isViewingSource === false; + this.vm.__setContent(this.vm.value); + done(); + + return + } + + document.execCommand(cmd, false, param); + + done(); + }; + + Caret.prototype.selectWord = function selectWord (sel) { + if (sel === null || sel.isCollapsed !== true || /* IE 11 */ sel.modify === void 0) { + return sel + } + + // Detect if selection is backwards + var range = document.createRange(); + range.setStart(sel.anchorNode, sel.anchorOffset); + range.setEnd(sel.focusNode, sel.focusOffset); + var direction = range.collapsed ? ['backward', 'forward'] : ['forward', 'backward']; + range.detach(); + + // modify() works on the focus of the selection + var + endNode = sel.focusNode, + endOffset = sel.focusOffset; + sel.collapse(sel.anchorNode, sel.anchorOffset); + sel.modify('move', direction[0], 'character'); + sel.modify('move', direction[1], 'word'); + sel.extend(endNode, endOffset); + sel.modify('extend', direction[1], 'character'); + sel.modify('extend', direction[0], 'word'); + + return sel + }; + + Object.defineProperties( Caret.prototype, prototypeAccessors ); + + var + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty, + class2type = {}; + + 'Boolean Number String Function Array Date RegExp Object'.split(' ').forEach(function (name) { + class2type['[object ' + name + ']'] = name.toLowerCase(); + }); + + function type (obj) { + return obj === null ? String(obj) : class2type[toString.call(obj)] || 'object' + } + + function isPlainObject (obj) { + if (!obj || type(obj) !== 'object') { + return false + } + + if (obj.constructor && + !hasOwn.call(obj, 'constructor') && + !hasOwn.call(obj.constructor.prototype, 'isPrototypeOf')) { + return false + } + + var key; + for (key in obj) {} + + return key === undefined || hasOwn.call(obj, key) + } + + function extend () { + var arguments$1 = arguments; + + var + options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + if (typeof target === 'boolean') { + deep = target; + target = arguments[1] || {}; + i = 2; + } + + if (Object(target) !== target && type(target) !== 'function') { + target = {}; + } + + if (length === i) { + target = this; + i--; + } + + for (; i < length; i++) { + if ((options = arguments$1[i]) !== null) { + for (name in options) { + src = target[name]; + copy = options[name]; + + if (target === copy) { + continue + } + + if (deep && copy && (isPlainObject(copy) || (copyIsArray = type(copy) === 'array'))) { + if (copyIsArray) { + copyIsArray = false; + clone = src && type(src) === 'array' ? src : []; + } + else { + clone = src && isPlainObject(src) ? src : {}; + } + + target[name] = extend(deep, clone, copy); + } + else if (copy !== undefined) { + target[name] = copy; + } + } + } + } + + return target + } + + var QEditor = Vue.extend({ + name: 'QEditor', + + mixins: [ FullscreenMixin, DarkMixin ], + + props: { + value: { + type: String, + required: true + }, + readonly: Boolean, + disable: Boolean, + minHeight: { + type: String, + default: '10rem' + }, + maxHeight: String, + height: String, + definitions: Object, + fonts: Object, + + toolbar: { + type: Array, + validator: function (v) { return v.length === 0 || v.every(function (group) { return group.length; }); }, + default: function default$1 () { + return [ + ['left', 'center', 'right', 'justify'], + ['bold', 'italic', 'underline', 'strike'], + ['undo', 'redo'] + ] + } + }, + toolbarColor: String, + toolbarBg: String, + toolbarTextColor: String, + toolbarToggleColor: { + type: String, + default: 'primary' + }, + toolbarOutline: Boolean, + toolbarPush: Boolean, + toolbarRounded: Boolean, + + contentStyle: Object, + contentClass: [Object, Array, String], + + square: Boolean, + flat: Boolean, + dense: Boolean + }, + + computed: { + editable: function editable () { + return !this.readonly && !this.disable + }, + + hasToolbar: function hasToolbar () { + return this.toolbar && this.toolbar.length > 0 + }, + + toolbarBackgroundClass: function toolbarBackgroundClass () { + if (this.toolbarBg) { + return ("bg-" + (this.toolbarBg)) + } + }, + + buttonProps: function buttonProps () { + var flat = this.toolbarOutline !== true && + this.toolbarPush !== true; + + return { + type: 'a', + flat: flat, + noWrap: true, + outline: this.toolbarOutline, + push: this.toolbarPush, + rounded: this.toolbarRounded, + dense: true, + color: this.toolbarColor, + disable: !this.editable, + size: 'sm' + } + }, + + buttonDef: function buttonDef () { + var + e = this.$q.lang.editor, + i = this.$q.iconSet.editor; + + return { + bold: { cmd: 'bold', icon: i.bold, tip: e.bold, key: 66 }, + italic: { cmd: 'italic', icon: i.italic, tip: e.italic, key: 73 }, + strike: { cmd: 'strikeThrough', icon: i.strikethrough, tip: e.strikethrough, key: 83 }, + underline: { cmd: 'underline', icon: i.underline, tip: e.underline, key: 85 }, + unordered: { cmd: 'insertUnorderedList', icon: i.unorderedList, tip: e.unorderedList }, + ordered: { cmd: 'insertOrderedList', icon: i.orderedList, tip: e.orderedList }, + subscript: { cmd: 'subscript', icon: i.subscript, tip: e.subscript, htmlTip: 'x2' }, + superscript: { cmd: 'superscript', icon: i.superscript, tip: e.superscript, htmlTip: 'x2' }, + link: { cmd: 'link', disable: function (vm) { return vm.caret && !vm.caret.can('link'); }, icon: i.hyperlink, tip: e.hyperlink, key: 76 }, + fullscreen: { cmd: 'fullscreen', icon: i.toggleFullscreen, tip: e.toggleFullscreen, key: 70 }, + viewsource: { cmd: 'viewsource', icon: i.viewSource, tip: e.viewSource }, + + quote: { cmd: 'formatBlock', param: 'BLOCKQUOTE', icon: i.quote, tip: e.quote, key: 81 }, + left: { cmd: 'justifyLeft', icon: i.left, tip: e.left }, + center: { cmd: 'justifyCenter', icon: i.center, tip: e.center }, + right: { cmd: 'justifyRight', icon: i.right, tip: e.right }, + justify: { cmd: 'justifyFull', icon: i.justify, tip: e.justify }, + + print: { type: 'no-state', cmd: 'print', icon: i.print, tip: e.print, key: 80 }, + outdent: { type: 'no-state', disable: function (vm) { return vm.caret && !vm.caret.can('outdent'); }, cmd: 'outdent', icon: i.outdent, tip: e.outdent }, + indent: { type: 'no-state', disable: function (vm) { return vm.caret && !vm.caret.can('indent'); }, cmd: 'indent', icon: i.indent, tip: e.indent }, + removeFormat: { type: 'no-state', cmd: 'removeFormat', icon: i.removeFormat, tip: e.removeFormat }, + hr: { type: 'no-state', cmd: 'insertHorizontalRule', icon: i.hr, tip: e.hr }, + undo: { type: 'no-state', cmd: 'undo', icon: i.undo, tip: e.undo, key: 90 }, + redo: { type: 'no-state', cmd: 'redo', icon: i.redo, tip: e.redo, key: 89 }, + + h1: { cmd: 'formatBlock', param: 'H1', icon: i.heading1 || i.heading, tip: e.heading1, htmlTip: ("

    " + (e.heading1) + "

    ") }, + h2: { cmd: 'formatBlock', param: 'H2', icon: i.heading2 || i.heading, tip: e.heading2, htmlTip: ("

    " + (e.heading2) + "

    ") }, + h3: { cmd: 'formatBlock', param: 'H3', icon: i.heading3 || i.heading, tip: e.heading3, htmlTip: ("

    " + (e.heading3) + "

    ") }, + h4: { cmd: 'formatBlock', param: 'H4', icon: i.heading4 || i.heading, tip: e.heading4, htmlTip: ("

    " + (e.heading4) + "

    ") }, + h5: { cmd: 'formatBlock', param: 'H5', icon: i.heading5 || i.heading, tip: e.heading5, htmlTip: ("
    " + (e.heading5) + "
    ") }, + h6: { cmd: 'formatBlock', param: 'H6', icon: i.heading6 || i.heading, tip: e.heading6, htmlTip: ("
    " + (e.heading6) + "
    ") }, + p: { cmd: 'formatBlock', param: 'DIV', icon: i.heading, tip: e.paragraph }, + code: { cmd: 'formatBlock', param: 'PRE', icon: i.code, htmlTip: ("" + (e.code) + "") }, + + 'size-1': { cmd: 'fontSize', param: '1', icon: i.size1 || i.size, tip: e.size1, htmlTip: ("" + (e.size1) + "") }, + 'size-2': { cmd: 'fontSize', param: '2', icon: i.size2 || i.size, tip: e.size2, htmlTip: ("" + (e.size2) + "") }, + 'size-3': { cmd: 'fontSize', param: '3', icon: i.size3 || i.size, tip: e.size3, htmlTip: ("" + (e.size3) + "") }, + 'size-4': { cmd: 'fontSize', param: '4', icon: i.size4 || i.size, tip: e.size4, htmlTip: ("" + (e.size4) + "") }, + 'size-5': { cmd: 'fontSize', param: '5', icon: i.size5 || i.size, tip: e.size5, htmlTip: ("" + (e.size5) + "") }, + 'size-6': { cmd: 'fontSize', param: '6', icon: i.size6 || i.size, tip: e.size6, htmlTip: ("" + (e.size6) + "") }, + 'size-7': { cmd: 'fontSize', param: '7', icon: i.size7 || i.size, tip: e.size7, htmlTip: ("" + (e.size7) + "") } + } + }, + + buttons: function buttons () { + var this$1 = this; + + var userDef = this.definitions || {}; + var def = this.definitions || this.fonts + ? extend( + true, + {}, + this.buttonDef, + userDef, + getFonts( + this.defaultFont, + this.$q.lang.editor.defaultFont, + this.$q.iconSet.editor.font, + this.fonts + ) + ) + : this.buttonDef; + + return this.toolbar.map( + function (group) { return group.map(function (token) { + if (token.options) { + return { + type: 'dropdown', + icon: token.icon, + label: token.label, + size: 'sm', + dense: true, + fixedLabel: token.fixedLabel, + fixedIcon: token.fixedIcon, + highlight: token.highlight, + list: token.list, + options: token.options.map(function (item) { return def[item]; }) + } + } + + var obj = def[token]; + + if (obj) { + return obj.type === 'no-state' || (userDef[token] && ( + obj.cmd === void 0 || (this$1.buttonDef[obj.cmd] && this$1.buttonDef[obj.cmd].type === 'no-state') + )) + ? obj + : Object.assign({ type: 'toggle' }, obj) + } + else { + return { + type: 'slot', + slot: token + } + } + }); } + ) + }, + + keys: function keys () { + var + k = {}, + add = function (btn) { + if (btn.key) { + k[btn.key] = { + cmd: btn.cmd, + param: btn.param + }; + } + }; + + this.buttons.forEach(function (group) { + group.forEach(function (token) { + if (token.options) { + token.options.forEach(add); + } + else { + add(token); + } + }); + }); + return k + }, + + innerStyle: function innerStyle () { + return this.inFullscreen + ? this.contentStyle + : [ + { + minHeight: this.minHeight, + height: this.height, + maxHeight: this.maxHeight + }, + this.contentStyle + ] + }, + + innerClass: function innerClass () { + return [ + this.contentClass, + { col: this.inFullscreen, 'overflow-auto': this.inFullscreen || this.maxHeight } + ] + }, + + attrs: function attrs () { + if (this.disable === true) { + return { 'aria-disabled': '' } + } + if (this.readonly === true) { + return { 'aria-readonly': '' } + } + } + }, + + data: function data () { + return { + editWatcher: true, + editLinkUrl: null, + isViewingSource: false + } + }, + + watch: { + value: function value (v) { + if (this.editWatcher === true) { + this.__setContent(v); + } + else { + this.editWatcher = true; + } + } + }, + + methods: { + __onInput: function __onInput () { + if (this.editWatcher === true) { + var val = this.isViewingSource + ? this.$refs.content.innerText + : this.$refs.content.innerHTML; + + if (val !== this.value) { + this.editWatcher = false; + this.$emit('input', val); + } + } + }, + + __onKeydown: function __onKeydown (e) { + this.$emit('keydown', e); + + if (e.ctrlKey !== true || shouldIgnoreKey(e) === true) { + this.refreshToolbar(); + this.$q.platform.is.ie && this.$nextTick(this.__onInput); + return + } + + var key = e.keyCode; + var target = this.keys[key]; + if (target !== void 0) { + var cmd = target.cmd; + var param = target.param; + stopAndPrevent(e); + this.runCmd(cmd, param, false); + } + }, + + __onClick: function __onClick (e) { + this.refreshToolbar(); + this.$emit('click', e); + }, + + __onBlur: function __onBlur () { + var ref = this.$refs.content; + var scrollTop = ref.scrollTop; + var scrollHeight = ref.scrollHeight; + this.__offsetBottom = scrollHeight - scrollTop; + this.$q.platform.is.ie !== true && this.caret.save(); + this.$emit('blur'); + }, + + __onFocus: function __onFocus () { + var this$1 = this; + + this.$nextTick(function () { + if (this$1.$refs.content !== void 0 && this$1.__offsetBottom !== void 0) { + this$1.$refs.content.scrollTop = this$1.$refs.content.scrollHeight - this$1.__offsetBottom; + } + }); + }, + + __onMouseup: function __onMouseup (e) { + this.caret.save(); + if (this.$listeners.mouseup !== void 0) { + this.$emit('mouseup', e); + } + }, + + __onKeyup: function __onKeyup (e) { + this.caret.save(); + if (this.$listeners.keyup !== void 0) { + this.$emit('keyup', e); + } + }, + + __onTouchend: function __onTouchend (e) { + this.caret.save(); + if (this.$listeners.touchend !== void 0) { + this.$emit('touchend', e); + } + }, + + runCmd: function runCmd (cmd, param, update) { + var this$1 = this; + if ( update === void 0 ) update = true; + + this.focus(); + this.caret.restore(); + this.caret.apply(cmd, param, function () { + this$1.focus(); + this$1.caret.save(); + if (this$1.$q.platform.is.ie === true || this$1.$q.platform.is.edge === true) { + this$1.$nextTick(this$1.__onInput); + } + if (update) { + this$1.refreshToolbar(); + } + }); + }, + + refreshToolbar: function refreshToolbar () { + var this$1 = this; + + setTimeout(function () { + this$1.editLinkUrl = null; + this$1.$forceUpdate(); + }, 1); + }, + + focus: function focus () { + this.$refs.content.focus(); + }, + + getContentEl: function getContentEl () { + return this.$refs.content + }, + + __setContent: function __setContent (v) { + if (this.isViewingSource) { + this.$refs.content.innerText = v; + } + else { + this.$refs.content.innerHTML = v; + } + } + }, + + created: function created () { + if (isSSR === false) { + document.execCommand('defaultParagraphSeparator', false, 'div'); + this.defaultFont = window.getComputedStyle(document.body).fontFamily; + } + }, + + mounted: function mounted () { + this.caret = new Caret(this.$refs.content, this); + this.__setContent(this.value); + this.refreshToolbar(); + }, + + render: function render (h) { + var toolbars; + + if (this.hasToolbar) { + var bars = []; + + bars.push( + h('div', { + key: 'qedt_top', + staticClass: 'q-editor__toolbar row no-wrap scroll-x', + class: this.toolbarBackgroundClass + }, getToolbar(h, this)) + ); + + this.editLinkUrl !== null && bars.push( + h('div', { + key: 'qedt_btm', + staticClass: 'q-editor__toolbar row no-wrap items-center scroll-x', + class: this.toolbarBackgroundClass + }, getLinkEditor(h, this, this.$q.platform.is.ie)) + ); + + toolbars = h('div', { + key: 'toolbar_ctainer', + staticClass: 'q-editor__toolbars-container' + }, bars); + } + + var on = Object.assign({}, this.$listeners, + {input: this.__onInput, + keydown: this.__onKeydown, + click: this.__onClick, + blur: this.__onBlur, + focus: this.__onFocus, + + // save caret + mouseup: this.__onMouseup, + keyup: this.__onKeyup, + touchend: this.__onTouchend}); + + return h( + 'div', + { + staticClass: 'q-editor', + style: { + height: this.inFullscreen === true ? '100vh' : null + }, + 'class': { + disabled: this.disable, + 'fullscreen column': this.inFullscreen, + 'q-editor--square no-border-radius': this.square, + 'q-editor--flat': this.flat, + 'q-editor--dense': this.dense, + 'q-editor--dark q-dark': this.isDark + }, + attrs: this.attrs + }, + [ + toolbars, + + h( + 'div', + { + ref: 'content', + staticClass: "q-editor__content", + style: this.innerStyle, + class: this.innerClass, + attrs: { contenteditable: this.editable }, + domProps: isSSR + ? { innerHTML: this.value } + : undefined, + on: on + } + ) + ] + ) + } + }); + + var QItemLabel = Vue.extend({ + name: 'QItemLabel', + + props: { + overline: Boolean, + caption: Boolean, + header: Boolean, + lines: [Number, String] + }, + + computed: { + classes: function classes () { + return { + 'q-item__label--overline text-overline': this.overline, + 'q-item__label--caption text-caption': this.caption, + 'q-item__label--header': this.header, + 'ellipsis': parseInt(this.lines, 10) === 1 + } + }, + + style: function style () { + if (this.lines !== void 0 && parseInt(this.lines, 10) > 1) { + return { + overflow: 'hidden', + display: '-webkit-box', + '-webkit-box-orient': 'vertical', + '-webkit-line-clamp': this.lines + } + } + } + }, + + render: function render (h) { + return h('div', { + staticClass: 'q-item__label', + style: this.style, + class: this.classes, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + var QSlideTransition = Vue.extend({ + name: 'QSlideTransition', + + props: { + appear: Boolean, + duration: { + type: Number, + default: 300 + } + }, + + methods: { + __begin: function __begin (el, height, done) { + el.style.overflowY = 'hidden'; + if (height !== void 0) { + el.style.height = height + "px"; + } + el.style.transition = "height " + (this.duration) + "ms cubic-bezier(.25, .8, .50, 1)"; + + this.animating = true; + this.done = done; + }, + + __end: function __end (el, event) { + el.style.overflowY = null; + el.style.height = null; + el.style.transition = null; + this.__cleanup(); + event !== this.lastEvent && this.$emit(event); + }, + + __cleanup: function __cleanup () { + this.done && this.done(); + this.done = null; + this.animating = false; + + clearTimeout(this.timer); + clearTimeout(this.timerFallback); + this.el !== void 0 && this.el.removeEventListener('transitionend', this.animListener); + this.animListener = null; + } + }, + + beforeDestroy: function beforeDestroy () { + this.animating && this.__cleanup(); + }, + + render: function render (h) { + var this$1 = this; + + return h('transition', { + props: { + css: false, + appear: this.appear + }, + on: cache(this, 'tr', { + enter: function (el, done) { + var pos = 0; + this$1.el = el; + + if (this$1.animating === true) { + this$1.__cleanup(); + pos = el.offsetHeight === el.scrollHeight ? 0 : void 0; + } + else { + this$1.lastEvent = 'hide'; + } + + this$1.__begin(el, pos, done); + + this$1.timer = setTimeout(function () { + el.style.height = (el.scrollHeight) + "px"; + this$1.animListener = function (ev) { + if (Object(ev) !== ev || ev.target === el) { + this$1.__end(el, 'show'); + } + }; + el.addEventListener('transitionend', this$1.animListener); + this$1.timerFallback = setTimeout(this$1.animListener, this$1.duration * 1.1); + }, 100); + }, + + leave: function (el, done) { + var pos; + this$1.el = el; + + if (this$1.animating === true) { + this$1.__cleanup(); + } + else { + this$1.lastEvent = 'show'; + pos = el.scrollHeight; + } + + this$1.__begin(el, pos, done); + + this$1.timer = setTimeout(function () { + el.style.height = 0; + this$1.animListener = function (ev) { + if (Object(ev) !== ev || ev.target === el) { + this$1.__end(el, 'hide'); + } + }; + el.addEventListener('transitionend', this$1.animListener); + this$1.timerFallback = setTimeout(this$1.animListener, this$1.duration * 1.1); + }, 100); + } + }) + }, slot(this, 'default')) + } + }); + + var QSeparator = Vue.extend({ + name: 'QSeparator', + + mixins: [ DarkMixin ], + + props: { + spaced: Boolean, + inset: [Boolean, String], + vertical: Boolean, + color: String + }, + + computed: { + insetClass: function insetClass () { + switch (this.inset) { + case true: + return ' q-separator--inset' + case 'item': + return ' q-separator--item-inset' + case 'item-thumbnail': + return ' q-separator--item-thumbnail-inset' + default: + return '' + } + }, + + classes: function classes () { + return 'q-separator' + this.insetClass + + " q-separator--" + (this.vertical === true ? 'vertical self-stretch' : 'horizontal col-grow') + + (this.color !== void 0 ? (" bg-" + (this.color)) : '') + + (this.isDark === true ? ' q-separator--dark' : '') + + (this.spaced === true ? ' q-separator--spaced' : '') + }, + + attrs: function attrs () { + return { + role: 'separator', + 'aria-orientation': this.vertical === true ? 'vertical' : 'horizontal' + } + } + }, + + render: function render (h) { + return h('hr', { + staticClass: 'q-separator', + class: this.classes, + attrs: this.attrs, + on: this.$listeners + }) + } + }); + + var eventName = 'q:expansion-item:close'; + + var QExpansionItem = Vue.extend({ + name: 'QExpansionItem', + + mixins: [ DarkMixin, RouterLinkMixin, ModelToggleMixin ], + + props: { + icon: String, + + label: String, + labelLines: [ Number, String ], + + caption: String, + captionLines: [ Number, String ], + + dense: Boolean, + + expandIcon: String, + expandedIcon: String, + expandIconClass: [ Array, String, Object ], + duration: Number, + + headerInsetLevel: Number, + contentInsetLevel: Number, + + expandSeparator: Boolean, + defaultOpened: Boolean, + expandIconToggle: Boolean, + switchToggleSide: Boolean, + denseToggle: Boolean, + group: String, + popup: Boolean, + + headerStyle: [Array, String, Object], + headerClass: [Array, String, Object] + }, + + data: function data () { + return { + showing: this.value !== void 0 + ? this.value + : this.defaultOpened + } + }, + + watch: { + showing: function showing (val) { + val === true && this.group !== void 0 && this.$root.$emit(eventName, this); + }, + + group: function group (newVal, oldVal) { + if (newVal !== void 0 && oldVal === void 0) { + this.$root.$on(eventName, this.__eventHandler); + } + else if (newVal === void 0 && oldVal !== void 0) { + this.$root.$off(eventName, this.__eventHandler); + } + } + }, + + computed: { + classes: function classes () { + return "q-expansion-item--" + (this.showing === true ? 'expanded' : 'collapsed') + + " q-expansion-item--" + (this.popup === true ? 'popup' : 'standard') + }, + + contentStyle: function contentStyle () { + var obj; + + if (this.contentInsetLevel !== void 0) { + var dir = this.$q.lang.rtl === true ? 'Right' : 'Left'; + return ( obj = {}, obj['padding' + dir] = (this.contentInsetLevel * 56) + 'px', obj ) + } + }, + + isClickable: function isClickable () { + return this.hasRouterLink === true || this.expandIconToggle !== true + }, + + expansionIcon: function expansionIcon () { + return this.expandedIcon !== void 0 && this.showing === true + ? this.expandedIcon + : this.expandIcon || this.$q.iconSet.expansionItem[this.denseToggle === true ? 'denseIcon' : 'icon'] + }, + + activeToggleIcon: function activeToggleIcon () { + return this.disable !== true && (this.hasRouterLink === true || this.expandIconToggle === true) + } + }, + + methods: { + __onHeaderClick: function __onHeaderClick (e) { + this.hasRouterLink !== true && this.toggle(e); + this.$emit('click', e); + }, + + __toggleIconKeyboard: function __toggleIconKeyboard (e) { + e.keyCode === 13 && this.__toggleIcon(e, true); + }, + + __toggleIcon: function __toggleIcon (e, keyboard) { + keyboard !== true && this.$refs.blurTarget !== void 0 && this.$refs.blurTarget.focus(); + this.toggle(e); + stopAndPrevent(e); + }, + + __eventHandler: function __eventHandler (comp) { + this !== comp && this.group === comp.group && this.hide(); + }, + + __getToggleIcon: function __getToggleIcon (h) { + var data = { + staticClass: ("q-focusable relative-position cursor-pointer" + (this.denseToggle === true && this.switchToggleSide === true ? ' items-end' : '')), + class: this.expandIconClass, + props: { + side: this.switchToggleSide !== true, + avatar: this.switchToggleSide + } + }; + + var child = [ + h(QIcon, { + staticClass: 'q-expansion-item__toggle-icon', + class: this.expandedIcon === void 0 && this.showing === true + ? 'q-expansion-item__toggle-icon--rotated' + : void 0, + props: { name: this.expansionIcon } + }) + ]; + + if (this.activeToggleIcon === true) { + Object.assign(data, { + attrs: { tabindex: 0 }, + on: cache(this, 'inpExt', { + click: this.__toggleIcon, + keyup: this.__toggleIconKeyboard + }) + }); + + child.unshift( + h('div', { + ref: 'blurTarget', + staticClass: 'q-expansion-item__toggle-focus q-icon q-focus-helper q-focus-helper--rounded', + attrs: { tabindex: -1 } + }) + ); + } + + return h(QItemSection, data, child) + }, + + __getHeader: function __getHeader (h) { + var child; + + if (this.$scopedSlots.header !== void 0) { + child = this.$scopedSlots.header().slice(); + } + else { + child = [ + h(QItemSection, [ + h(QItemLabel, { + props: { lines: this.labelLines } + }, [ this.label || '' ]), + + this.caption + ? h(QItemLabel, { + props: { lines: this.captionLines, caption: true } + }, [ this.caption ]) + : null + ]) + ]; + + this.icon && child[this.switchToggleSide === true ? 'push' : 'unshift']( + h(QItemSection, { + props: { + side: this.switchToggleSide === true, + avatar: this.switchToggleSide !== true + } + }, [ + h(QIcon, { + props: { name: this.icon } + }) + ]) + ); + } + + this.disable !== true && child[this.switchToggleSide === true ? 'unshift' : 'push']( + this.__getToggleIcon(h) + ); + + var data = { + ref: 'item', + style: this.headerStyle, + class: this.headerClass, + props: { + dark: this.isDark, + disable: this.disable, + dense: this.dense, + insetLevel: this.headerInsetLevel + } + }; + + if (this.isClickable === true) { + var evtProp = this.hasRouterLink === true ? 'nativeOn' : 'on'; + + data.props.clickable = true; + data[evtProp] = Object.assign({}, this.$listeners, + {click: this.__onHeaderClick}); + + this.hasRouterLink === true && Object.assign( + data.props, + this.routerLinkProps + ); + } + + return h(QItem, data, child) + }, + + __getContent: function __getContent (h) { + var this$1 = this; + + var node = [ + this.__getHeader(h), + + h(QSlideTransition, { + props: { duration: this.duration }, + on: cache(this, 'slide', { + show: function () { this$1.$emit('after-show'); }, + hide: function () { this$1.$emit('after-hide'); } + }) + }, [ + h('div', { + staticClass: 'q-expansion-item__content relative-position', + style: this.contentStyle, + directives: [{ name: 'show', value: this.showing }] + }, slot(this, 'default')) + ]) + ]; + + if (this.expandSeparator) { + node.push( + h(QSeparator, { + staticClass: 'q-expansion-item__border q-expansion-item__border--top absolute-top', + props: { dark: this.isDark } + }), + h(QSeparator, { + staticClass: 'q-expansion-item__border q-expansion-item__border--bottom absolute-bottom', + props: { dark: this.isDark } + }) + ); + } + + return node + } + }, + + render: function render (h) { + return h('div', { + staticClass: 'q-expansion-item q-item-type', + class: this.classes + }, [ + h( + 'div', + { staticClass: 'q-expansion-item__container relative-position' }, + this.__getContent(h) + ) + ]) + }, + + created: function created () { + this.group !== void 0 && this.$root.$on(eventName, this.__eventHandler); + }, + + beforeDestroy: function beforeDestroy () { + this.group !== void 0 && this.$root.$off(eventName, this.__eventHandler); + } + }); + + var labelPositions = ['top', 'right', 'bottom', 'left']; + + var FabMixin = { + props: { + type: { + type: String, + default: 'a' + }, + outline: Boolean, + push: Boolean, + flat: Boolean, + unelevated: Boolean, + color: String, + textColor: String, + glossy: Boolean, + + square: Boolean, + + label: { + type: [ String, Number ], + default: '' + }, + labelPosition: { + type: String, + default: 'right', + validator: function (v) { return labelPositions.includes(v); } + }, + externalLabel: Boolean, + hideLabel: Boolean, + labelClass: [ Array, String, Object ], + labelStyle: [ Array, String, Object ], + + disable: Boolean + }, + + computed: { + formClass: function formClass () { + return ("q-fab--form-" + (this.square === true ? 'square' : 'rounded')) + }, + + stacked: function stacked () { + return this.externalLabel === false && ['top', 'bottom'].includes(this.labelPosition) + }, + + labelProps: function labelProps () { + if (this.externalLabel === true) { + var hideLabel = this.hideLabel === null + ? this.showing === false + : this.hideLabel; + + return { + action: 'push', + data: { + staticClass: "q-fab__label q-tooltip--style q-fab__label--external" + + " q-fab__label--external-" + (this.labelPosition) + + (hideLabel === true ? ' q-fab__label--external-hidden' : ''), + style: this.labelStyle, + class: this.labelClass + } + } + } + + return { + action: [ 'left', 'top' ].includes(this.labelPosition) + ? 'unshift' + : 'push', + data: { + staticClass: "q-fab__label q-fab__label--internal q-fab__label--internal-" + (this.labelPosition) + + (this.hideLabel === true ? ' q-fab__label--internal-hidden' : ''), + style: this.labelStyle, + class: this.labelClass + } + } + } + } + }; + + var directions$1 = ['up', 'right', 'down', 'left']; + var alignValues$1 = [ 'left', 'center', 'right' ]; + + var QFab = Vue.extend({ + name: 'QFab', + + mixins: [ FabMixin, ModelToggleMixin ], + + provide: function provide () { + var this$1 = this; + + return { + __qFabClose: function (evt) { + this$1.hide(evt); + + if (this$1.$refs.trigger && this$1.$refs.trigger.$el) { + this$1.$refs.trigger.$el.focus(); + } + } + } + }, + + props: { + icon: String, + activeIcon: String, + + hideLabel: { + default: null + }, + + direction: { + type: String, + default: 'right', + validator: function (v) { return directions$1.includes(v); } + }, + + persistent: Boolean, + + verticalActionsAlign: { + type: String, + default: 'center', + validator: function (v) { return alignValues$1.includes(v); } + } + }, + + data: function data () { + return { + showing: this.value === true + } + }, + + computed: { + hideOnRouteChange: function hideOnRouteChange () { + return this.persistent !== true + }, + + classes: function classes () { + return "q-fab--align-" + (this.verticalActionsAlign) + " " + (this.formClass) + + (this.showing === true ? ' q-fab--opened' : '') + } + }, + + render: function render (h) { + var child = [ + h('div', { staticClass: 'q-fab__icon-holder' }, [ + h(QIcon, { + staticClass: 'q-fab__icon absolute-full', + props: { name: this.icon || this.$q.iconSet.fab.icon } + }), + h(QIcon, { + staticClass: 'q-fab__active-icon absolute-full', + props: { name: this.activeIcon || this.$q.iconSet.fab.activeIcon } + }) + ]) + ]; + + this.label !== '' && child[this.labelProps.action]( + h('div', this.labelProps.data, [ this.label ]) + ); + + return h('div', { + staticClass: 'q-fab z-fab row inline justify-center', + class: this.classes, + on: this.$listeners + }, [ + h('div', { + staticClass: 'q-fab__actions flex no-wrap inline', + class: ("q-fab__actions--" + (this.direction)) + }, slot(this, 'default')), + + h(QBtn, { + ref: 'trigger', + class: this.formClass, + props: Object.assign({}, this.$props, + {noWrap: true, + stack: this.stacked, + align: void 0, + icon: void 0, + label: void 0, + noCaps: true, + fab: true}), + on: cache(this, 'tog', { + click: this.toggle + }) + }, mergeSlot(child, this, 'tooltip')) + ]) + } + }); + + var anchorMap = { + start: 'self-end', + center: 'self-center', + end: 'self-start' + }; + + var anchorValues = Object.keys(anchorMap); + + var QFabAction = Vue.extend({ + name: 'QFabAction', + + mixins: [ FabMixin ], + + props: { + icon: { + type: String, + required: true + }, + + anchor: { + type: String, + validator: function (v) { return anchorValues.includes(v); } + }, + + to: [String, Object], + replace: Boolean + }, + + inject: { + __qFabClose: { + default: function default$1 () { + console.error('QFabAction needs to be child of QFab'); + } + } + }, + + computed: { + classes: function classes () { + var align = anchorMap[this.anchor]; + return this.formClass + (align !== void 0 ? (" " + align) : '') + } + }, + + methods: { + click: function click (e) { + this.__qFabClose(); + this.$emit('click', e); + } + }, + + render: function render (h) { + var child = [ + h(QIcon, { + props: { name: this.icon } + }) + ]; + + this.label !== '' && child[this.labelProps.action]( + h('div', this.labelProps.data, [ this.label ]) + ); + + return h(QBtn, { + class: this.classes, + props: Object.assign({}, this.$props, + {noWrap: true, + stack: this.stacked, + icon: void 0, + label: void 0, + noCaps: true, + fabMini: true}), + on: Object.assign({}, this.$listeners, + {click: this.click}) + }, mergeSlot(child, this, 'default')) + } + }); + + var QFile = Vue.extend({ + name: 'QFile', + + mixins: [ QField, FileMixin, FormFieldMixin, FileValueMixin ], + + props: { + /* SSR does not know about File & FileList */ + value: isSSR === true + ? {} + : [ File, FileList, Array ], + + useChips: Boolean, + displayValue: [ String, Number ], + maxFiles: [ Number, String ], + + tabindex: { + type: [ String, Number ], + default: 0 + }, + + counterLabel: Function, + + inputClass: [ Array, String, Object ], + inputStyle: [ Array, String, Object ] + }, + + data: function data () { + return { + dnd: false + } + }, + + computed: { + innerValue: function innerValue () { + return Object(this.value) === this.value + ? ('length' in this.value ? Array.from(this.value) : [ this.value ]) + : [] + }, + + selectedString: function selectedString () { + return this.innerValue + .map(function (file) { return file.name; }) + .join(', ') + }, + + totalSize: function totalSize () { + return humanStorageSize( + this.innerValue.reduce(function (acc, file) { return acc + file.size; }, 0) + ) + }, + + counterProps: function counterProps () { + return { + totalSize: this.totalSize, + filesNumber: this.innerValue.length, + maxFiles: this.maxFiles + } + }, + + computedCounter: function computedCounter () { + if (this.counterLabel !== void 0) { + return this.counterLabel(this.counterProps) + } + + var max = this.maxFiles; + return ("" + (this.innerValue.length) + (max !== void 0 ? ' / ' + max : '') + " (" + (this.totalSize) + ")") + } + }, + + methods: { + removeAtIndex: function removeAtIndex (index) { + var files = this.innerValue.slice(); + files.splice(index, 1); + this.__emitValue(files); + }, + + removeFile: function removeFile (file) { + var index = this.innerValue.findIndex(file); + if (index > -1) { + this.removeAtIndex(index); + } + }, + + __emitValue: function __emitValue (files) { + this.$emit('input', this.multiple === true ? files : files[0]); + }, + + __onKeyup: function __onKeyup (e) { + // only on ENTER + e.keyCode === 13 && this.pickFiles(e); + }, + + __getFileInput: function __getFileInput () { + return this.$refs.input + }, + + __addFiles: function __addFiles (e, fileList) { + var files = this.__processFiles(e, fileList); + + files !== void 0 && this.__emitValue( + this.maxFiles !== void 0 + ? files.slice(0, parseInt(this.maxFiles, 10)) + : files + ); + }, + + __getControl: function __getControl (h) { + var data = { + ref: 'target', + staticClass: 'q-field__native row items-center cursor-pointer', + attrs: { + tabindex: this.tabindex + } + }; + + if (this.editable === true) { + data.on = cache(this, 'native', { + dragover: this.__onDragOver, + keyup: this.__onKeyup + }); + } + + return h('div', data, [ this.__getInput(h) ].concat(this.__getSelection(h))) + }, + + __getControlChild: function __getControlChild (h) { + return this.__getDnd(h, 'file') + }, + + __getSelection: function __getSelection (h) { + var this$1 = this; + + if (this.$scopedSlots.file !== void 0) { + return this.innerValue.map(function (file, index) { return this$1.$scopedSlots.file({ index: index, file: file, ref: this$1 }); }) + } + + if (this.$scopedSlots.selected !== void 0) { + return this.$scopedSlots.selected({ files: this.innerValue, ref: this }) + } + + if (this.useChips === true) { + return this.innerValue.map(function (file, i) { return h(QChip, { + key: 'file-' + i, + props: { + removable: this$1.editable, + dense: true, + textColor: this$1.color, + tabindex: this$1.tabindex + }, + on: cache(this$1, 'rem#' + i, { + remove: function () { this$1.removeAtIndex(i); } + }) + }, [ + h('span', { + staticClass: 'ellipsis', + domProps: { + textContent: file.name + } + }) + ]); }) + } + + return [ + h('div', { + style: this.inputStyle, + class: this.inputClass, + domProps: { + textContent: this.displayValue !== void 0 + ? this.displayValue + : this.selectedString + } + }) + ] + }, + + __getInput: function __getInput (h) { + var data = { + ref: 'input', + staticClass: 'q-field__input fit absolute-full cursor-pointer', + attrs: Object.assign({}, {tabindex: -1, + type: 'file', + title: '', // try to remove default tooltip, + accept: this.accept, + name: this.nameProp}, + this.$attrs, + {id: this.targetUid, + disabled: this.editable !== true}), + domProps: this.formDomProps, + on: cache(this, 'input', { + change: this.__addFiles + }) + }; + + if (this.multiple === true) { + data.attrs.multiple = true; + } + + return h('input', data) + } + }, + + created: function created () { + this.fieldClass = 'q-file q-field--auto-height'; + this.type = 'file'; // necessary for QField's clearable + } + }); + + var QFooter = Vue.extend({ + name: 'QFooter', + + inject: { + layout: { + default: function default$1 () { + console.error('QFooter needs to be child of QLayout'); + } + } + }, + + props: { + value: { + type: Boolean, + default: true + }, + reveal: Boolean, + bordered: Boolean, + elevated: Boolean, + + heightHint: { + type: [String, Number], + default: 50 + } + }, + + data: function data () { + return { + size: parseInt(this.heightHint, 10), + revealed: true, + windowHeight: onSSR || this.layout.container ? 0 : window.innerHeight + } + }, + + watch: { + value: function value (val) { + this.__update('space', val); + this.__updateLocal('revealed', true); + this.layout.__animate(); + }, + + offset: function offset (val) { + this.__update('offset', val); + }, + + reveal: function reveal (val) { + val === false && this.__updateLocal('revealed', this.value); + }, + + revealed: function revealed (val) { + this.layout.__animate(); + this.$emit('reveal', val); + }, + + 'layout.scroll': function layout_scroll () { + this.__updateRevealed(); + }, + + 'layout.height': function layout_height () { + this.__updateRevealed(); + }, + + size: function size () { + this.__updateRevealed(); + }, + + '$q.screen.height': function $q_screen_height (val) { + this.layout.container !== true && this.__updateLocal('windowHeight', val); + } + }, + + computed: { + fixed: function fixed () { + return this.reveal === true || + this.layout.view.indexOf('F') > -1 || + this.layout.container === true + }, + + containerHeight: function containerHeight () { + return this.layout.container === true + ? this.layout.containerHeight + : this.windowHeight + }, + + offset: function offset () { + if (this.value !== true) { + return 0 + } + if (this.fixed === true) { + return this.revealed === true ? this.size : 0 + } + var offset = this.layout.scroll.position + this.containerHeight + this.size - this.layout.height; + return offset > 0 ? offset : 0 + }, + + classes: function classes () { + return ( + (this.fixed === true ? 'fixed' : 'absolute') + '-bottom') + + (this.value === true || this.fixed === true ? '' : ' hidden') + + (this.bordered === true ? ' q-footer--bordered' : '') + + ( + this.value !== true || (this.fixed === true && this.revealed !== true) + ? ' q-footer--hidden' + : '' + ) + }, + + style: function style () { + var + view = this.layout.rows.bottom, + css = {}; + + if (view[0] === 'l' && this.layout.left.space === true) { + css[this.$q.lang.rtl === true ? 'right' : 'left'] = (this.layout.left.size) + "px"; + } + if (view[2] === 'r' && this.layout.right.space === true) { + css[this.$q.lang.rtl === true ? 'left' : 'right'] = (this.layout.right.size) + "px"; + } + + return css + } + }, + + render: function render (h) { + var child = [ + h(QResizeObserver, { + props: { debounce: 0 }, + on: cache(this, 'resize', { resize: this.__onResize }) + }) + ]; + + this.elevated === true && child.push( + h('div', { + staticClass: 'q-layout__shadow absolute-full overflow-hidden no-pointer-events' + }) + ); + + return h('footer', { + staticClass: 'q-footer q-layout__section--marginal', + class: this.classes, + style: this.style, + on: Object.assign({}, this.$listeners, + {input: stop}) + }, mergeSlot(child, this, 'default')) + }, + + created: function created () { + this.layout.instances.footer = this; + this.value === true && this.__update('size', this.size); + this.__update('space', this.value); + this.__update('offset', this.offset); + }, + + beforeDestroy: function beforeDestroy () { + if (this.layout.instances.footer === this) { + this.layout.instances.footer = void 0; + this.__update('size', 0); + this.__update('offset', 0); + this.__update('space', false); + } + }, + + methods: { + __onResize: function __onResize (ref) { + var height = ref.height; + + this.__updateLocal('size', height); + this.__update('size', height); + }, + + __update: function __update (prop, val) { + if (this.layout.footer[prop] !== val) { + this.layout.footer[prop] = val; + } + }, + + __updateLocal: function __updateLocal (prop, val) { + if (this[prop] !== val) { + this[prop] = val; + } + }, + + __updateRevealed: function __updateRevealed () { + if (this.reveal !== true) { return } + + var ref = this.layout.scroll; + var direction = ref.direction; + var position = ref.position; + var inflexionPosition = ref.inflexionPosition; + + this.__updateLocal('revealed', ( + direction === 'up' || + position - inflexionPosition < 100 || + this.layout.height - this.containerHeight - position - this.size < 300 + )); + } + } + }); + + var QForm = Vue.extend({ + name: 'QForm', + + props: { + autofocus: Boolean, + noErrorFocus: Boolean, + noResetFocus: Boolean, + greedy: Boolean + }, + + mounted: function mounted () { + this.validateIndex = 0; + this.autofocus === true && this.focus(); + }, + + methods: { + validate: function validate (shouldFocus) { + var this$1 = this; + + var promises = []; + var focus = typeof shouldFocus === 'boolean' + ? shouldFocus + : this.noErrorFocus !== true; + + this.validateIndex++; + + var components = getAllChildren(this); + var emit = function (res) { + this$1.$emit('validation-' + (res === true ? 'success' : 'error')); + }; + + var loop = function ( i ) { + var comp = components[i]; + + if (typeof comp.validate === 'function') { + var valid = comp.validate(); + + if (typeof valid.then === 'function') { + promises.push( + valid.then( + function (valid) { return ({ valid: valid, comp: comp }); }, + function (error) { return ({ valid: false, comp: comp, error: error }); } + ) + ); + } + else if (valid !== true) { + if (this$1.greedy === false) { + emit(false); + + if (focus === true && typeof comp.focus === 'function') { + comp.focus(); + } + + return { v: Promise.resolve(false) } + } + + promises.push({ valid: false, comp: comp }); + } + } + }; + + for (var i = 0; i < components.length; i++) { + var returned = loop( i ); + + if ( returned ) return returned.v; + } + + if (promises.length === 0) { + emit(true); + return Promise.resolve(true) + } + + var index = this.validateIndex; + + return Promise.all(promises).then( + function (res) { + if (index === this$1.validateIndex) { + var errors = res.filter(function (r) { return r.valid !== true; }); + + if (errors.length === 0) { + emit(true); + return true + } + + emit(false); + var ref = errors[0]; + var valid = ref.valid; + var comp = ref.comp; + + if ( + focus === true && + valid !== true && + typeof comp.focus === 'function' + ) { + comp.focus(); + } + + return false + } + } + ) + }, + + resetValidation: function resetValidation () { + this.validateIndex++; + + getAllChildren(this).forEach(function (comp) { + if (typeof comp.resetValidation === 'function') { + comp.resetValidation(); + } + }); + }, + + submit: function submit (evt) { + var this$1 = this; + + evt !== void 0 && stopAndPrevent(evt); + + this.validate().then(function (val) { + if (val === true) { + if (this$1.$listeners.submit !== void 0) { + this$1.$emit('submit', evt); + } + else if (evt !== void 0 && evt.target !== void 0 && typeof evt.target.submit === 'function') { + evt.target.submit(); + } + } + }); + }, + + reset: function reset (evt) { + var this$1 = this; + + evt !== void 0 && stopAndPrevent(evt); + + this.$emit('reset'); + + this.$nextTick(function () { // allow userland to reset values before + this$1.resetValidation(); + if (this$1.autofocus === true && this$1.noResetFocus !== true) { + this$1.focus(); + } + }); + }, + + focus: function focus () { + var target = this.$el.querySelector('[autofocus], [data-autofocus]') || + [].find.call(this.$el.querySelectorAll('[tabindex]'), function (el) { return el.tabIndex > -1; }); + + target !== null && target !== void 0 && target.focus(); + } + }, + + render: function render (h) { + return h('form', { + staticClass: 'q-form', + on: Object.assign({}, this.$listeners, + {submit: this.submit, + reset: this.reset}) + }, slot(this, 'default')) + } + }); + + var QHeader = Vue.extend({ + name: 'QHeader', + + inject: { + layout: { + default: function default$1 () { + console.error('QHeader needs to be child of QLayout'); + } + } + }, + + props: { + value: { + type: Boolean, + default: true + }, + reveal: Boolean, + revealOffset: { + type: Number, + default: 250 + }, + bordered: Boolean, + elevated: Boolean, + + heightHint: { + type: [String, Number], + default: 50 + } + }, + + data: function data () { + return { + size: parseInt(this.heightHint, 10), + revealed: true + } + }, + + watch: { + value: function value (val) { + this.__update('space', val); + this.__updateLocal('revealed', true); + this.layout.__animate(); + }, + + offset: function offset (val) { + this.__update('offset', val); + }, + + reveal: function reveal (val) { + val === false && this.__updateLocal('revealed', this.value); + }, + + revealed: function revealed (val) { + this.layout.__animate(); + this.$emit('reveal', val); + }, + + 'layout.scroll': function layout_scroll (scroll) { + this.reveal === true && this.__updateLocal('revealed', + scroll.direction === 'up' || + scroll.position <= this.revealOffset || + scroll.position - scroll.inflexionPosition < 100 + ); + } + }, + + computed: { + fixed: function fixed () { + return this.reveal === true || + this.layout.view.indexOf('H') > -1 || + this.layout.container === true + }, + + offset: function offset () { + if (this.value !== true) { + return 0 + } + if (this.fixed === true) { + return this.revealed === true ? this.size : 0 + } + var offset = this.size - this.layout.scroll.position; + return offset > 0 ? offset : 0 + }, + + classes: function classes () { + return ( + this.fixed === true ? 'fixed' : 'absolute') + '-top' + + (this.bordered === true ? ' q-header--bordered' : '') + + ( + this.value !== true || (this.fixed === true && this.revealed !== true) + ? ' q-header--hidden' + : '' + ) + }, + + style: function style () { + var + view = this.layout.rows.top, + css = {}; + + if (view[0] === 'l' && this.layout.left.space === true) { + css[this.$q.lang.rtl === true ? 'right' : 'left'] = (this.layout.left.size) + "px"; + } + if (view[2] === 'r' && this.layout.right.space === true) { + css[this.$q.lang.rtl === true ? 'left' : 'right'] = (this.layout.right.size) + "px"; + } + + return css + } + }, + + render: function render (h) { + var child = mergeSlot([ + h(QResizeObserver, { + props: { debounce: 0 }, + on: cache(this, 'resize', { resize: this.__onResize }) + }) + ], this, 'default'); + + this.elevated === true && child.push( + h('div', { + staticClass: 'q-layout__shadow absolute-full overflow-hidden no-pointer-events' + }) + ); + + return h('header', { + staticClass: 'q-header q-layout__section--marginal', + class: this.classes, + style: this.style, + on: Object.assign({}, this.$listeners, + {input: stop}) + }, child) + }, + + created: function created () { + this.layout.instances.header = this; + this.value === true && this.__update('size', this.size); + this.__update('space', this.value); + this.__update('offset', this.offset); + }, + + beforeDestroy: function beforeDestroy () { + if (this.layout.instances.header === this) { + this.layout.instances.header = void 0; + this.__update('size', 0); + this.__update('offset', 0); + this.__update('space', false); + } + }, + + methods: { + __onResize: function __onResize (ref) { + var height = ref.height; + + this.__updateLocal('size', height); + this.__update('size', height); + }, + + __update: function __update (prop, val) { + if (this.layout.header[prop] !== val) { + this.layout.header[prop] = val; + } + }, + + __updateLocal: function __updateLocal (prop, val) { + if (this[prop] !== val) { + this[prop] = val; + } + } + } + }); + + var RatioMixin = { + props: { + ratio: [ String, Number ] + }, + + computed: { + ratioStyle: function ratioStyle () { + var ratio = this.ratio || this.naturalRatio; + + if (ratio !== void 0) { + return { paddingBottom: ((100 / ratio) + "%") } + } + } + } + }; + + var QImg = Vue.extend({ + name: 'QImg', + + mixins: [ RatioMixin ], + + props: { + src: String, + srcset: String, + sizes: String, + alt: String, + width: String, + height: String, + + placeholderSrc: String, + + basic: Boolean, + contain: Boolean, + position: { + type: String, + default: '50% 50%' + }, + + transition: { + type: String, + default: 'fade' + }, + + imgClass: [ Array, String, Object ], + imgStyle: Object, + + nativeContextMenu: Boolean, + + noDefaultSpinner: Boolean, + spinnerColor: String, + spinnerSize: String + }, + + data: function data () { + return { + currentSrc: '', + image: null, + isLoading: !!this.src, + hasError: false, + naturalRatio: void 0 + } + }, + + watch: { + src: function src () { + this.__load(); + }, + + srcset: function srcset (val) { + this.__updateWatcher(val); + } + }, + + computed: { + url: function url () { + return this.currentSrc || this.placeholderSrc || void 0 + }, + + attrs: function attrs () { + var att = { role: 'img' }; + if (this.alt !== void 0) { + att['aria-label'] = this.alt; + } + return att + }, + + imgContainerStyle: function imgContainerStyle () { + return Object.assign( + { + backgroundSize: this.contain === true ? 'contain' : 'cover', + backgroundPosition: this.position + }, + this.imgStyle, + { backgroundImage: ("url(\"" + (this.url) + "\")") }) + }, + + style: function style () { + return { + width: this.width, + height: this.height + } + }, + + classes: function classes () { + return 'q-img overflow-hidden' + + (this.nativeContextMenu === true ? ' q-img--menu' : '') + } + }, + + methods: { + __onLoad: function __onLoad (img) { + this.isLoading = false; + this.hasError = false; + this.__computeRatio(img); + this.__updateSrc(); + this.__updateWatcher(this.srcset); + this.$emit('load', this.currentSrc); + }, + + __onError: function __onError (err) { + clearTimeout(this.ratioTimer); + this.isLoading = false; + this.hasError = true; + this.currentSrc = ''; + this.$emit('error', err); + }, + + __updateSrc: function __updateSrc () { + if (this.image !== void 0 && this.isLoading === false) { + var src = this.image.currentSrc || this.image.src; + if (this.currentSrc !== src) { + this.currentSrc = src; + } + } + }, + + __updateWatcher: function __updateWatcher (srcset) { + if (srcset) { + if (this.unwatch === void 0) { + this.unwatch = this.$watch('$q.screen.width', this.__updateSrc); + } + } + else if (this.unwatch !== void 0) { + this.unwatch(); + this.unwatch = void 0; + } + }, + + __load: function __load () { + var this$1 = this; + + clearTimeout(this.ratioTimer); + this.hasError = false; + + if (!this.src) { + this.isLoading = false; + this.image = void 0; + this.currentSrc = ''; + return + } + + this.isLoading = true; + + var img = new Image(); + this.image = img; + + img.onerror = function (err) { + // if we are still rendering same image + if (this$1.image === img && this$1.destroyed !== true) { + this$1.__onError(err); + } + }; + + img.onload = function () { + if (this$1.destroyed === true) { + return + } + + // if we are still rendering same image + if (this$1.image === img) { + if (img.decode !== void 0) { + img + .decode() + .catch(function (err) { + if (this$1.image === img && this$1.destroyed !== true) { + this$1.__onError(err); + } + }) + .then(function () { + if (this$1.image === img && this$1.destroyed !== true) { + this$1.__onLoad(img); + } + }); + } + else { + this$1.__onLoad(img); + } + } + }; + + img.src = this.src; + + if (this.srcset) { + img.srcset = this.srcset; + } + + if (this.sizes !== void 0) { + img.sizes = this.sizes; + } + else { + Object.assign(img, { + height: this.height, + width: this.width + }); + } + }, + + __computeRatio: function __computeRatio (img) { + var this$1 = this; + + var naturalHeight = img.naturalHeight; + var naturalWidth = img.naturalWidth; + + if (naturalHeight || naturalWidth) { + this.naturalRatio = naturalHeight === 0 + ? 1 + : naturalWidth / naturalHeight; + } + else { + this.ratioTimer = setTimeout(function () { + if (this$1.image === img && this$1.destroyed !== true) { + this$1.__computeRatio(img); + } + }, 100); + } + }, + + __getImage: function __getImage (h) { + var nativeImg = this.nativeContextMenu === true + ? [ + h('img', { + staticClass: 'absolute-full fit', + attrs: { src: this.url } + }) + ] + : void 0; + + var content = this.url !== void 0 + ? h('div', { + key: this.url, + staticClass: 'q-img__image absolute-full', + class: this.imgClass, + style: this.imgContainerStyle + }, nativeImg) + : null; + + return this.basic === true + ? content + : h('transition', { + props: { name: 'q-transition--' + this.transition } + }, [ content ]) + }, + + __getContent: function __getContent (h) { + var slotVm = slot(this, this.hasError === true ? 'error' : 'default'); + + if (this.basic === true) { + return h('div', { + key: 'content', + staticClass: 'q-img__content absolute-full' + }, slotVm) + } + + var content = this.isLoading === true + ? h('div', { + key: 'placeholder', + staticClass: 'q-img__loading absolute-full flex flex-center' + }, this.$scopedSlots.loading !== void 0 + ? this.$scopedSlots.loading() + : ( + this.noDefaultSpinner === false + ? [ + h(QSpinner, { + props: { + color: this.spinnerColor, + size: this.spinnerSize + } + }) + ] + : void 0 + ) + ) + : h('div', { + key: 'content', + staticClass: 'q-img__content absolute-full' + }, slotVm); + + return h('transition', { + props: { name: 'q-transition--fade' } + }, [ content ]) + } + }, + + render: function render (h) { + return h('div', { + class: this.classes, + style: this.style, + attrs: this.attrs, + on: this.$listeners + }, [ + h('div', { style: this.ratioStyle }), + this.__getImage(h), + this.__getContent(h) + ]) + }, + + beforeMount: function beforeMount () { + if (this.placeholderSrc !== void 0 && this.ratio === void 0) { + var img = new Image(); + img.src = this.placeholderSrc; + this.__computeRatio(img); + } + this.isLoading === true && this.__load(); + }, + + beforeDestroy: function beforeDestroy () { + this.destroyed = true; + clearTimeout(this.ratioTimer); + this.unwatch !== void 0 && this.unwatch(); + } + }); + + var QInfiniteScroll = Vue.extend({ + name: 'QInfiniteScroll', + + props: { + offset: { + type: Number, + default: 500 + }, + debounce: { + type: [String, Number], + default: 100 + }, + scrollTarget: { + default: void 0 + }, + disable: Boolean, + reverse: Boolean + }, + + data: function data () { + return { + index: 0, + fetching: false, + working: true + } + }, + + watch: { + disable: function disable (val) { + if (val === true) { + this.stop(); + } + else { + this.resume(); + } + }, + + scrollTarget: function scrollTarget () { + this.updateScrollTarget(); + }, + + debounce: function debounce (val) { + this.__setDebounce(val); + } + }, + + methods: { + poll: function poll () { + if (this.disable === true || this.fetching === true || this.working === false) { + return + } + + var + scrollHeight = getScrollHeight(this.scrollContainer), + scrollPosition = getScrollPosition(this.scrollContainer), + containerHeight = height(this.scrollContainer); + + if (this.reverse === false) { + if (scrollPosition + containerHeight + this.offset >= scrollHeight) { + this.trigger(); + } + } + else { + if (scrollPosition < this.offset) { + this.trigger(); + } + } + }, + + trigger: function trigger () { + var this$1 = this; + + if (this.disable === true || this.fetching === true || this.working === false) { + return + } + + this.index++; + this.fetching = true; + + var heightBefore = getScrollHeight(this.scrollContainer); + + this.$emit('load', this.index, function (stop) { + if (this$1.working === true) { + this$1.fetching = false; + this$1.$nextTick(function () { + if (this$1.reverse === true) { + var + heightAfter = getScrollHeight(this$1.scrollContainer), + scrollPosition = getScrollPosition(this$1.scrollContainer), + heightDifference = heightAfter - heightBefore; + + setScrollPosition(this$1.scrollContainer, scrollPosition + heightDifference); + } + + if (stop === true) { + this$1.stop(); + } + else { + this$1.$el.closest('body') && this$1.poll(); + } + }); + } + }); + }, + + reset: function reset () { + this.index = 0; + }, + + resume: function resume () { + if (this.working === false) { + this.working = true; + this.scrollContainer.addEventListener('scroll', this.poll, listenOpts.passive); + } + this.immediatePoll(); + }, + + stop: function stop () { + if (this.working === true) { + this.working = false; + this.fetching = false; + this.scrollContainer.removeEventListener('scroll', this.poll, listenOpts.passive); + } + }, + + updateScrollTarget: function updateScrollTarget () { + if (this.scrollContainer && this.working === true) { + this.scrollContainer.removeEventListener('scroll', this.poll, listenOpts.passive); + } + + this.scrollContainer = getScrollTarget(this.$el, this.scrollTarget); + + if (this.working === true) { + this.scrollContainer.addEventListener('scroll', this.poll, listenOpts.passive); + } + }, + + __setDebounce: function __setDebounce (val) { + val = parseInt(val, 10); + if (val <= 0) { + this.poll = this.immediatePoll; + } + else { + this.poll = debounce(this.immediatePoll, isNaN(val) === true ? 100 : val); + } + } + }, + + mounted: function mounted () { + this.immediatePoll = this.poll; + this.__setDebounce(this.debounce); + + this.updateScrollTarget(); + this.immediatePoll(); + + if (this.reverse === true) { + var + scrollHeight = getScrollHeight(this.scrollContainer), + containerHeight = height(this.scrollContainer); + + setScrollPosition(this.scrollContainer, scrollHeight - containerHeight); + } + }, + + beforeDestroy: function beforeDestroy () { + if (this.working === true) { + this.scrollContainer.removeEventListener('scroll', this.poll, listenOpts.passive); + } + }, + + render: function render (h) { + var child = uniqueSlot(this, 'default', []); + + if (this.disable !== true && this.working === true) { + child[this.reverse === false ? 'push' : 'unshift']( + h('div', { + staticClass: 'q-infinite-scroll__loading', + class: this.fetching === true ? '' : 'invisible' + }, slot(this, 'loading')) + ); + } + + return h('div', { + staticClass: 'q-infinite-scroll', + on: this.$listeners + }, child) + } + }); + + var QInnerLoading = Vue.extend({ + name: 'QInnerLoading', + + mixins: [ DarkMixin, TransitionMixin ], + + props: { + showing: Boolean, + color: String, + + size: { + type: [String, Number], + default: 42 + } + }, + + render: function render (h) { + var child = this.showing === true + ? [ + h('div', + { + staticClass: 'q-inner-loading absolute-full column flex-center', + class: this.isDark === true ? 'q-inner-loading--dark' : null, + on: this.$listeners + }, + this.$scopedSlots.default !== void 0 + ? this.$scopedSlots.default() + : [ + h(QSpinner, { + props: { + size: this.size, + color: this.color + } + }) + ] + ) + ] + : void 0; + + return h('transition', { + props: { + name: this.transition, + appear: true + } + }, child) + } + }); + + var defaultCfg = { + threshold: 0, + root: null, + rootMargin: '0px' + }; + + function update (el, ctx, ref) { + var modifiers = ref.modifiers; + var value = ref.value; + + ctx.once = modifiers.once; + + var handler, cfg, changed; + + if (typeof value === 'function') { + handler = value; + cfg = defaultCfg; + changed = ctx.cfg === void 0; + } + else { + handler = value.handler; + cfg = Object.assign({}, defaultCfg, value.cfg); + changed = ctx.cfg === void 0 || isDeepEqual(ctx.cfg, cfg) === false; + } + + if (ctx.handler !== handler) { + ctx.handler = handler; + } + + if (changed === true) { + ctx.cfg = cfg; + ctx.observer !== void 0 && ctx.observer.unobserve(el); + + ctx.observer = new IntersectionObserver(function (ref) { + var entry = ref[0]; + + if (typeof ctx.handler === 'function' && el.__vue__._inactive !== true) { + if (entry.rootBounds === null) { + ctx.observer.unobserve(el); + ctx.observer.observe(el); + + return + } + + var res = ctx.handler(entry, ctx.observer); + + if ( + res === false || + (ctx.once === true && entry.isIntersecting === true) + ) { + destroy(el); + } + } + }, cfg); + + ctx.observer.observe(el); + } + } + + function destroy (el) { + var ctx = el.__qvisible; + + if (ctx !== void 0) { + ctx.observer !== void 0 && ctx.observer.unobserve(el); + delete el.__qvisible; + } + } + + var Intersection = { + name: 'intersection', + + inserted: function inserted (el, binding) { + var ctx = {}; + update(el, ctx, binding); + el.__qvisible = ctx; + }, + + update: function update$1 (el, binding) { + var ctx = el.__qvisible; + ctx !== void 0 && update(el, ctx, binding); + }, + + unbind: destroy + }; + + var QIntersection = Vue.extend({ + name: 'QIntersection', + + mixins: [ TagMixin ], + + directives: { + Intersection: Intersection + }, + + props: { + once: Boolean, + transition: String, + + ssrPrerender: Boolean, + + margin: String, + threshold: [ Number, Array ], + + disable: Boolean + }, + + data: function data () { + return { + showing: onSSR === true ? this.ssrPrerender : false + } + }, + + computed: { + value: function value () { + return this.margin !== void 0 || this.threshold !== void 0 + ? { + handler: this.__trigger, + cfg: { + rootMargin: this.margin, + threshold: this.threshold + } + } + : this.__trigger + }, + + directives: function directives () { + if (this.disable !== true && (onSSR !== true || this.once !== true || this.ssrPrerender !== true)) { + return [{ + name: 'intersection', + value: this.value, + modifiers: { + once: this.once + } + }] + } + } + }, + + methods: { + __trigger: function __trigger (entry) { + if (this.showing !== entry.isIntersecting) { + this.showing = entry.isIntersecting; + + if (this.$listeners.visibility !== void 0) { + this.$emit('visibility', this.showing); + } + } + } + }, + + render: function render (h) { + var content = this.showing === true + ? [ h('div', { key: 'content' }, slot(this, 'default')) ] + : void 0; + + return h(this.tag, { + staticClass: 'q-intersection', + on: this.$listeners, + directives: this.directives + }, this.transition + ? [ + h('transition', { + props: { name: 'q-transition--' + this.transition } + }, content) + ] + : content + ) + } + }); + + // PGDOWN, LEFT, DOWN, PGUP, RIGHT, UP + var keyCodes$1 = [34, 37, 40, 33, 39, 38]; + + var QKnob = Vue.extend({ + name: 'QKnob', + + mixins: [ + { props: QCircularProgress.options.props }, + FormMixin + ], + + directives: { + TouchPan: TouchPan + }, + + props: { + step: { + type: Number, + default: 1, + validator: function (v) { return v >= 0; } + }, + + tabindex: { + type: [Number, String], + default: 0 + }, + + disable: Boolean, + readonly: Boolean + }, + + data: function data () { + return { + model: this.value, + dragging: false + } + }, + + watch: { + value: function value (value$1) { + if (value$1 < this.min) { + this.model = this.min; + } + else if (value$1 > this.max) { + this.model = this.max; + } + else { + if (value$1 !== this.model) { + this.model = value$1; + } + return + } + + if (this.model !== this.value) { + this.$emit('input', this.model); + this.$emit('change', this.model); + } + } + }, + + computed: { + classes: function classes () { + return { + disabled: this.disable, + 'q-knob--editable': this.editable + } + }, + + editable: function editable () { + return !this.disable && !this.readonly + }, + + decimals: function decimals () { + return (String(this.step).trim('0').split('.')[1] || '').length + }, + + computedStep: function computedStep () { + return this.step === 0 ? 1 : this.step + }, + + events: function events () { + return this.$q.platform.is.mobile === true + ? { click: this.__click } + : { + mousedown: this.__activate, + click: this.__click, + keydown: this.__keydown, + keyup: this.__keyup + } + }, + + attrs: function attrs () { + var attrs = { + role: 'slider', + 'aria-valuemin': this.min, + 'aria-valuemax': this.max, + 'aria-valuenow': this.value + }; + + if (this.editable === true) { + attrs.tabindex = this.tabindex; + } + else { + attrs[("aria-" + (this.disable === true ? 'disabled' : 'readonly'))] = ''; + } + + return attrs + } + }, + + methods: { + __updateCenterPosition: function __updateCenterPosition () { + var ref = this.$el.getBoundingClientRect(); + var top = ref.top; + var left = ref.left; + var width = ref.width; + var height = ref.height; + this.centerPosition = { + top: top + height / 2, + left: left + width / 2 + }; + }, + + __pan: function __pan (event) { + if (event.isFinal) { + this.__updatePosition(event.evt, true); + this.dragging = false; + } + else if (event.isFirst) { + this.__updateCenterPosition(); + this.dragging = true; + this.__updatePosition(event.evt); + } + else { + this.__updatePosition(event.evt); + } + }, + + __click: function __click (evt) { + this.__updateCenterPosition(); + this.__updatePosition(evt, true); + }, + + __keydown: function __keydown (evt) { + if (!keyCodes$1.includes(evt.keyCode)) { + return + } + + stopAndPrevent(evt); + + var + step = ([34, 33].includes(evt.keyCode) ? 10 : 1) * this.computedStep, + offset = [34, 37, 40].includes(evt.keyCode) ? -step : step; + + this.model = between( + parseFloat((this.model + offset).toFixed(this.decimals)), + this.min, + this.max + ); + + this.__updateValue(); + }, + + __keyup: function __keyup (evt) { + if (keyCodes$1.includes(evt.keyCode)) { + this.__updateValue(true); + } + }, + + __activate: function __activate (evt) { + this.__updateCenterPosition(); + this.__updatePosition(evt); + this.__updateValue(); + }, + + __updatePosition: function __updatePosition (evt, change) { + var + center = this.centerPosition, + pos = position(evt), + height = Math.abs(pos.top - center.top), + distance = Math.sqrt( + Math.pow( height, 2 ) + + Math.pow( Math.abs(pos.left - center.left), 2 ) + ); + + var angle = Math.asin(height / distance) * (180 / Math.PI); + + if (pos.top < center.top) { + angle = center.left < pos.left ? 90 - angle : 270 + angle; + } + else { + angle = center.left < pos.left ? angle + 90 : 270 - angle; + } + + if (this.angle) { + angle = normalizeToInterval(angle - this.angle, 0, 360); + } + + if (this.$q.lang.rtl === true) { + angle = 360 - angle; + } + + var model = this.min + (angle / 360) * (this.max - this.min); + + if (this.step !== 0) { + var + step = this.computedStep, + modulo = model % step; + + model = model - modulo + + (Math.abs(modulo) >= step / 2 ? (modulo < 0 ? -1 : 1) * step : 0); + + model = parseFloat(model.toFixed(this.decimals)); + } + + model = between(model, this.min, this.max); + + this.$emit('drag-value', model); + + if (this.model !== model) { + this.model = model; + } + + this.__updateValue(change); + }, + + __updateValue: function __updateValue (change) { + this.value !== this.model && this.$emit('input', this.model); + change === true && this.$emit('change', this.model); + }, + + __getNameInput: function __getNameInput () { + return this.$createElement('input', { attrs: this.formAttrs }) + } + }, + + render: function render (h) { + var data = { + staticClass: 'q-knob non-selectable', + class: this.classes, + + attrs: this.attrs, + + props: Object.assign({}, this.$props, + {value: this.model, + instantFeedback: this.dragging}) + }; + + if (this.editable === true) { + data.on = this.events; + data.directives = cache(this, 'dir', [{ + name: 'touch-pan', + value: this.__pan, + modifiers: { + prevent: true, + stop: true, + mouse: true + } + }]); + + if (this.name !== void 0) { + data.scopedSlots = { + internal: this.__getNameInput + }; + } + } + + return h(QCircularProgress, data, slot(this, 'default')) + } + }); + + var passive$1 = listenOpts.passive; + + var QScrollObserver = Vue.extend({ + name: 'QScrollObserver', + + props: { + debounce: [ String, Number ], + horizontal: Boolean, + + scrollTarget: { + default: void 0 + } + }, + + render: noop, // eslint-disable-line + + data: function data () { + return { + pos: 0, + dir: this.horizontal === true ? 'right' : 'down', + dirChanged: false, + dirChangePos: 0 + } + }, + + watch: { + scrollTarget: function scrollTarget () { + this.__unconfigureScrollTarget(); + this.__configureScrollTarget(); + } + }, + + methods: { + getPosition: function getPosition () { + return { + position: this.pos, + direction: this.dir, + directionChanged: this.dirChanged, + inflexionPosition: this.dirChangePos + } + }, + + trigger: function trigger (immediately) { + if (immediately === true || this.debounce === 0 || this.debounce === '0') { + this.__emit(); + } + else if (!this.timer) { + this.timer = this.debounce + ? setTimeout(this.__emit, this.debounce) + : requestAnimationFrame(this.__emit); + } + }, + + __emit: function __emit () { + var fn = this.horizontal === true + ? getHorizontalScrollPosition + : getScrollPosition; + + var + pos = Math.max(0, fn(this.__scrollTarget)), + delta = pos - this.pos, + dir = this.horizontal === true + ? delta < 0 ? 'left' : 'right' + : delta < 0 ? 'up' : 'down'; + + this.dirChanged = this.dir !== dir; + + if (this.dirChanged) { + this.dir = dir; + this.dirChangePos = this.pos; + } + + this.timer = null; + this.pos = pos; + this.$emit('scroll', this.getPosition()); + }, + + __configureScrollTarget: function __configureScrollTarget () { + this.__scrollTarget = getScrollTarget(this.$el.parentNode, this.scrollTarget); + this.__scrollTarget.addEventListener('scroll', this.trigger, passive$1); + this.trigger(true); + }, + + __unconfigureScrollTarget: function __unconfigureScrollTarget () { + if (this.__scrollTarget !== void 0) { + this.__scrollTarget.removeEventListener('scroll', this.trigger, passive$1); + this.__scrollTarget = void 0; + } + } + }, + + mounted: function mounted () { + this.__configureScrollTarget(); + }, + + beforeDestroy: function beforeDestroy () { + clearTimeout(this.timer); + cancelAnimationFrame(this.timer); + this.__unconfigureScrollTarget(); + } + }); + + var QLayout = Vue.extend({ + name: 'QLayout', + + provide: function provide () { + return { + layout: this + } + }, + + props: { + container: Boolean, + view: { + type: String, + default: 'hhh lpr fff', + validator: function (v) { return /^(h|l)h(h|r) lpr (f|l)f(f|r)$/.test(v.toLowerCase()); } + } + }, + + data: function data () { + return { + // page related + height: this.$q.screen.height, + width: this.container === true ? 0 : this.$q.screen.width, + + // container only prop + containerHeight: 0, + scrollbarWidth: onSSR === true ? 0 : getScrollbarWidth(), + + header: { + size: 0, + offset: 0, + space: false + }, + right: { + size: 300, + offset: 0, + space: false + }, + footer: { + size: 0, + offset: 0, + space: false + }, + left: { + size: 300, + offset: 0, + space: false + }, + + scroll: { + position: 0, + direction: 'down' + } + } + }, + + computed: { + rows: function rows () { + var rows = this.view.toLowerCase().split(' '); + return { + top: rows[0].split(''), + middle: rows[1].split(''), + bottom: rows[2].split('') + } + }, + + style: function style () { + return this.container === true + ? null + : { minHeight: this.$q.screen.height + 'px' } + }, + + // used by container only + targetStyle: function targetStyle () { + var obj; + + if (this.scrollbarWidth !== 0) { + return ( obj = {}, obj[this.$q.lang.rtl === true ? 'left' : 'right'] = ((this.scrollbarWidth) + "px"), obj ) + } + }, + + targetChildStyle: function targetChildStyle () { + var obj; + + if (this.scrollbarWidth !== 0) { + return ( obj = {}, obj[this.$q.lang.rtl === true ? 'right' : 'left'] = 0, obj[this.$q.lang.rtl === true ? 'left' : 'right'] = ("-" + (this.scrollbarWidth) + "px"), obj.width = ("calc(100% + " + (this.scrollbarWidth) + "px)"), obj ) + } + }, + + totalWidth: function totalWidth () { + return this.width + this.scrollbarWidth + }, + + classes: function classes () { + return 'q-layout q-layout--' + + (this.container === true ? 'containerized' : 'standard') + } + }, + + created: function created () { + this.instances = {}; + }, + + render: function render (h) { + var layout = h('div', { + class: this.classes, + style: this.style, + on: this.$listeners + }, mergeSlot([ + h(QScrollObserver, { + on: cache(this, 'scroll', { scroll: this.__onPageScroll }) + }), + + h(QResizeObserver, { + on: cache(this, 'resizeOut', { resize: this.__onPageResize }) + }) + ], this, 'default')); + + return this.container === true + ? h('div', { + staticClass: 'q-layout-container overflow-hidden' + }, [ + h(QResizeObserver, { + on: cache(this, 'resizeIn', { resize: this.__onContainerResize }) + }), + h('div', { + staticClass: 'absolute-full', + style: this.targetStyle + }, [ + h('div', { + staticClass: 'scroll', + style: this.targetChildStyle + }, [ layout ]) + ]) + ]) + : layout + }, + + methods: { + __animate: function __animate () { + var this$1 = this; + + if (this.timer !== void 0) { + clearTimeout(this.timer); + } + else { + document.body.classList.add('q-body--layout-animate'); + } + this.timer = setTimeout(function () { + document.body.classList.remove('q-body--layout-animate'); + this$1.timer = void 0; + }, 150); + }, + + __onPageScroll: function __onPageScroll (data) { + this.scroll = data; + this.$listeners.scroll !== void 0 && this.$emit('scroll', data); + }, + + __onPageResize: function __onPageResize (ref) { + var height = ref.height; + var width = ref.width; + + var resized = false; + + if (this.height !== height) { + resized = true; + this.height = height; + if (this.$listeners['scroll-height'] !== void 0) { + this.$emit('scroll-height', height); + } + this.__updateScrollbarWidth(); + } + if (this.width !== width) { + resized = true; + this.width = width; + } + + if (resized === true && this.$listeners.resize !== void 0) { + this.$emit('resize', { height: height, width: width }); + } + }, + + __onContainerResize: function __onContainerResize (ref) { + var height = ref.height; + + if (this.containerHeight !== height) { + this.containerHeight = height; + this.__updateScrollbarWidth(); + } + }, + + __updateScrollbarWidth: function __updateScrollbarWidth () { + if (this.container === true) { + var width = this.height > this.containerHeight + ? getScrollbarWidth() + : 0; + + if (this.scrollbarWidth !== width) { + this.scrollbarWidth = width; + } + } + } + } + }); + + var QMarkupTable = Vue.extend({ + name: 'QMarkupTable', + + mixins: [ DarkMixin ], + + props: { + dense: Boolean, + flat: Boolean, + bordered: Boolean, + square: Boolean, + separator: { + type: String, + default: 'horizontal', + validator: function (v) { return ['horizontal', 'vertical', 'cell', 'none'].includes(v); } + }, + wrapCells: Boolean + }, + + computed: { + classes: function classes () { + return "q-table--" + (this.separator) + "-separator" + + (this.isDark === true ? " q-table--dark q-table__card--dark q-dark" : '') + + (this.dense === true ? " q-table--dense" : '') + + (this.flat === true ? " q-table--flat" : '') + + (this.bordered === true ? " q-table--bordered" : '') + + (this.square === true ? " q-table--square" : '') + + (this.wrapCells === false ? " q-table--no-wrap" : '') + } + }, + + render: function render (h) { + return h('div', { + staticClass: 'q-markup-table q-table__container q-table__card', + class: this.classes, + on: this.$listeners + }, [ + h('table', { staticClass: 'q-table' }, slot(this, 'default')) + ]) + } + }); + + var QNoSsr = Vue.extend({ + name: 'QNoSsr', + + mixins: [ CanRenderMixin, TagMixin ], + + props: { + placeholder: String + }, + + render: function render (h) { + var data = { + on: this.$listeners + }; + + if (this.canRender === true) { + var node$1 = slot(this, 'default'); + return node$1 === void 0 + ? node$1 + : (node$1.length > 1 ? h(this.tag, data, node$1) : node$1[0]) + } + + data.staticClass = 'q-no-ssr-placeholder'; + + var node = slot(this, 'placeholder'); + if (node !== void 0) { + return node.length > 1 + ? h(this.tag, data, node) + : node[0] + } + + if (this.placeholder !== void 0) { + return h(this.tag, data, [ + this.placeholder + ]) + } + } + }); + + var QRadio = Vue.extend({ + name: 'QRadio', + + mixins: [ DarkMixin, OptionSizeMixin, FormMixin, RefocusTargetMixin ], + + props: { + value: { + required: true + }, + val: { + required: true + }, + + label: String, + leftLabel: Boolean, + + color: String, + keepColor: Boolean, + dense: Boolean, + + disable: Boolean, + tabindex: [String, Number] + }, + + computed: { + isTrue: function isTrue () { + return this.value === this.val + }, + + classes: function classes () { + return 'q-radio cursor-pointer no-outline row inline no-wrap items-center' + + (this.disable === true ? ' disabled' : '') + + (this.isDark === true ? ' q-radio--dark' : '') + + (this.dense === true ? ' q-radio--dense' : '') + + (this.leftLabel === true ? ' reverse' : '') + }, + + innerClass: function innerClass () { + var color = this.color !== void 0 && ( + this.keepColor === true || + this.isTrue === true + ) + ? (" text-" + (this.color)) + : ''; + + return ("q-radio__inner--" + (this.isTrue === true ? 'truthy' : 'falsy') + color) + }, + + computedTabindex: function computedTabindex () { + return this.disable === true ? -1 : this.tabindex || 0 + }, + + formAttrs: function formAttrs () { + var prop = { type: 'radio' }; + + this.name !== void 0 && Object.assign(prop, { + name: this.name, + value: this.val + }); + + return prop + }, + + formDomProps: function formDomProps () { + if (this.name !== void 0 && this.isTrue === true) { + return { checked: true } + } + }, + + attrs: function attrs () { + var attrs = { + tabindex: this.computedTabindex, + role: 'radio', + 'aria-label': this.label, + 'aria-checked': this.isTrue === true ? 'true' : 'false' + }; + + if (this.disable === true) { + attrs['aria-disabled'] = ''; + } + + return attrs + } + }, + + methods: { + set: function set (e) { + if (e !== void 0) { + stopAndPrevent(e); + this.__refocusTarget(e); + } + + if (this.disable !== true && this.isTrue !== true) { + this.$emit('input', this.val); + } + } + }, + + render: function render (h) { + var this$1 = this; + + var content = [ + h('svg', { + staticClass: 'q-radio__bg absolute', + attrs: { focusable: 'false' /* needed for IE11 */, viewBox: '0 0 24 24' } + }, [ + h('path', { + attrs: { + d: 'M12,22a10,10 0 0 1 -10,-10a10,10 0 0 1 10,-10a10,10 0 0 1 10,10a10,10 0 0 1 -10,10m0,-22a12,12 0 0 0 -12,12a12,12 0 0 0 12,12a12,12 0 0 0 12,-12a12,12 0 0 0 -12,-12' + } + }), + + h('path', { + staticClass: 'q-radio__check', + attrs: { + d: 'M12,6a6,6 0 0 0 -6,6a6,6 0 0 0 6,6a6,6 0 0 0 6,-6a6,6 0 0 0 -6,-6' + } + }) + ]) + ]; + + this.disable !== true && this.__injectFormInput( + content, + 'unshift', + 'q-radio__native q-ma-none q-pa-none invisible' + ); + + var child = [ + h('div', { + staticClass: 'q-radio__inner relative-position no-pointer-events', + class: this.innerClass, + style: this.sizeStyle + }, content) + ]; + + if (this.__refocusTargetEl !== void 0) { + child.push(this.__refocusTargetEl); + } + + var label = this.label !== void 0 + ? mergeSlot([ this.label ], this, 'default') + : slot(this, 'default'); + + label !== void 0 && child.push( + h('div', { + staticClass: 'q-radio__label q-anchor--skip' + }, label) + ); + + return h('div', { + class: this.classes, + attrs: this.attrs, + on: cache(this, 'inpExt', { + click: this.set, + keydown: function (e) { + if (e.keyCode === 13 || e.keyCode === 32) { + stopAndPrevent(e); + } + }, + keyup: function (e) { + if (e.keyCode === 13 || e.keyCode === 32) { + this$1.set(e); + } + } + }) + }, child) + } + }); + + var QToggle = Vue.extend({ + name: 'QToggle', + + mixins: [ CheckboxMixin ], + + props: { + icon: String, + checkedIcon: String, + uncheckedIcon: String, + indeterminateIcon: String, + + iconColor: String + }, + + computed: { + computedIcon: function computedIcon () { + return ( + this.isTrue === true + ? this.checkedIcon + : (this.isIndeterminate === true ? this.indeterminateIcon : this.uncheckedIcon) + ) || this.icon + }, + + computedIconColor: function computedIconColor () { + if (this.isTrue === true) { + return this.iconColor + } + } + }, + + methods: { + __getInner: function __getInner (h) { + return [ + h('div', { staticClass: 'q-toggle__track' }), + + h('div', { + staticClass: 'q-toggle__thumb absolute flex flex-center no-wrap' + }, this.computedIcon !== void 0 + ? [ + h(QIcon, { + props: { + name: this.computedIcon, + color: this.computedIconColor + } + }) + ] + : void 0 + ) + ] + } + }, + + created: function created () { + this.type = 'toggle'; + } + }); + + var components = { + radio: QRadio, + checkbox: QCheckbox, + toggle: QToggle + }; + + var typeValues = Object.keys(components); + + var QOptionGroup = Vue.extend({ + name: 'QOptionGroup', + + mixins: [ DarkMixin ], + + props: { + value: { + required: true + }, + options: { + type: Array, + validator: function validator (opts) { + return opts.every(function (opt) { return 'value' in opt && 'label' in opt; }) + } + }, + + name: String, + + type: { + default: 'radio', + validator: function (v) { return typeValues.includes(v); } + }, + + color: String, + keepColor: Boolean, + dense: Boolean, + + size: String, + + leftLabel: Boolean, + inline: Boolean, + disable: Boolean + }, + + computed: { + component: function component () { + return components[this.type] + }, + + model: function model () { + return Array.isArray(this.value) + ? this.value.slice() + : this.value + }, + + classes: function classes () { + return 'q-option-group q-gutter-x-sm' + + (this.inline === true ? ' q-option-group--inline' : '') + }, + + attrs: function attrs () { + if (this.type === 'radio') { + var attrs = { + role: 'radiogroup' + }; + + if (this.disable === true) { + attrs['aria-disabled'] = ''; + } + + return attrs + } + } + }, + + methods: { + __update: function __update (value) { + this.$emit('input', value); + } + }, + + created: function created () { + var isArray = Array.isArray(this.value); + + if (this.type === 'radio') { + if (isArray) { + console.error('q-option-group: model should not be array'); + } + } + else if (isArray === false) { + console.error('q-option-group: model should be array in your case'); + } + }, + + render: function render (h) { + var this$1 = this; + + return h('div', { + class: this.classes, + attrs: this.attrs, + on: this.$listeners + }, this.options.map(function (opt) { return h('div', [ + h(this$1.component, { + props: { + value: this$1.value, + val: opt.value, + name: this$1.name || opt.name, + disable: this$1.disable || opt.disable, + label: opt.label, + leftLabel: this$1.leftLabel || opt.leftLabel, + color: opt.color || this$1.color, + checkedIcon: opt.checkedIcon, + uncheckedIcon: opt.uncheckedIcon, + dark: opt.dark || this$1.isDark, + size: opt.size || this$1.size, + dense: this$1.dense, + keepColor: opt.keepColor || this$1.keepColor + }, + on: cache(this$1, 'inp', { + input: this$1.__update + }) + }) + ]); })) + } + }); + + var QPage = Vue.extend({ + name: 'QPage', + + inject: { + pageContainer: { + default: function default$1 () { + console.error('QPage needs to be child of QPageContainer'); + } + }, + layout: {} + }, + + props: { + padding: Boolean, + styleFn: Function + }, + + computed: { + style: function style () { + var offset = + (this.layout.header.space === true ? this.layout.header.size : 0) + + (this.layout.footer.space === true ? this.layout.footer.size : 0); + + if (typeof this.styleFn === 'function') { + var height = this.layout.container === true + ? this.layout.containerHeight + : this.$q.screen.height; + + return this.styleFn(offset, height) + } + + return { + minHeight: this.layout.container === true + ? (this.layout.containerHeight - offset) + 'px' + : ( + this.$q.screen.height === 0 + ? ("calc(100vh - " + offset + "px)") + : (this.$q.screen.height - offset) + 'px' + ) + } + }, + + classes: function classes () { + if (this.padding === true) { + return 'q-layout-padding' + } + } + }, + + render: function render (h) { + return h('main', { + staticClass: 'q-page', + style: this.style, + class: this.classes, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + var QPageContainer = Vue.extend({ + name: 'QPageContainer', + + inject: { + layout: { + default: function default$1 () { + console.error('QPageContainer needs to be child of QLayout'); + } + } + }, + + provide: { + pageContainer: true + }, + + computed: { + style: function style () { + var css = {}; + + if (this.layout.header.space === true) { + css.paddingTop = (this.layout.header.size) + "px"; + } + if (this.layout.right.space === true) { + css[("padding" + (this.$q.lang.rtl === true ? 'Left' : 'Right'))] = (this.layout.right.size) + "px"; + } + if (this.layout.footer.space === true) { + css.paddingBottom = (this.layout.footer.size) + "px"; + } + if (this.layout.left.space === true) { + css[("padding" + (this.$q.lang.rtl === true ? 'Right' : 'Left'))] = (this.layout.left.size) + "px"; + } + + return css + } + }, + + render: function render (h) { + return h('div', { + staticClass: 'q-page-container', + style: this.style, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + var QPageSticky = Vue.extend({ + name: 'QPageSticky', + + inject: { + layout: { + default: function default$1 () { + console.error('QPageSticky needs to be child of QLayout'); + } + } + }, + + props: { + position: { + type: String, + default: 'bottom-right', + validator: function (v) { return [ + 'top-right', 'top-left', + 'bottom-right', 'bottom-left', + 'top', 'right', 'bottom', 'left' + ].includes(v); } + }, + offset: { + type: Array, + validator: function (v) { return v.length === 2; } + }, + expand: Boolean + }, + + computed: { + attach: function attach () { + var pos = this.position; + + return { + top: pos.indexOf('top') > -1, + right: pos.indexOf('right') > -1, + bottom: pos.indexOf('bottom') > -1, + left: pos.indexOf('left') > -1, + vertical: pos === 'top' || pos === 'bottom', + horizontal: pos === 'left' || pos === 'right' + } + }, + + top: function top () { + return this.layout.header.offset + }, + + right: function right () { + return this.layout.right.offset + }, + + bottom: function bottom () { + return this.layout.footer.offset + }, + + left: function left () { + return this.layout.left.offset + }, + + style: function style () { + var + posX = 0, + posY = 0; + + var + attach = this.attach, + dir = this.$q.lang.rtl === true ? -1 : 1; + + if (attach.top === true && this.top !== 0) { + posY = (this.top) + "px"; + } + else if (attach.bottom === true && this.bottom !== 0) { + posY = (-this.bottom) + "px"; + } + + if (attach.left === true && this.left !== 0) { + posX = (dir * this.left) + "px"; + } + else if (attach.right === true && this.right !== 0) { + posX = (-dir * this.right) + "px"; + } + + var css = { transform: ("translate(" + posX + ", " + posY + ")") }; + + if (this.offset) { + css.margin = (this.offset[1]) + "px " + (this.offset[0]) + "px"; + } + + if (attach.vertical === true) { + if (this.left !== 0) { + css[this.$q.lang.rtl === true ? 'right' : 'left'] = (this.left) + "px"; + } + if (this.right !== 0) { + css[this.$q.lang.rtl === true ? 'left' : 'right'] = (this.right) + "px"; + } + } + else if (attach.horizontal === true) { + if (this.top !== 0) { + css.top = (this.top) + "px"; + } + if (this.bottom !== 0) { + css.bottom = (this.bottom) + "px"; + } + } + + return css + }, + + classes: function classes () { + return ("fixed-" + (this.position) + " q-page-sticky--" + (this.expand === true ? 'expand' : 'shrink')) + } + }, + + render: function render (h) { + var content = slot(this, 'default'); + + return h('div', { + staticClass: 'q-page-sticky row flex-center', + class: this.classes, + style: this.style, + on: this.$listeners + }, + this.expand === true + ? content + : [ h('div', content) ] + ) + } + }); + + var QPageScroller = Vue.extend({ + name: 'QPageScroller', + + mixins: [ QPageSticky ], + + props: { + scrollOffset: { + type: Number, + default: 1000 + }, + + reverse: Boolean, + + duration: { + type: Number, + default: 300 + }, + + offset: { + default: function () { return [18, 18]; } + } + }, + + inject: { + layout: { + default: function default$1 () { + console.error('QPageScroller needs to be used within a QLayout'); + } + } + }, + + data: function data () { + return { + showing: this.__isVisible() + } + }, + + computed: { + height: function height () { + return this.layout.container === true + ? this.layout.containerHeight + : this.layout.height + } + }, + + watch: { + 'layout.scroll.position': function layout_scroll_position () { + this.__updateVisibility(); + }, + + reverse: { + handler: function handler (val) { + if (val === true) { + if (this.heightWatcher === void 0) { + this.heightWatcher = this.$watch('height', this.__updateVisibility); + } + } + else if (this.heightWatcher !== void 0) { + this.__cleanup(); + } + }, + immediate: true + } + }, + + methods: { + __isVisible: function __isVisible () { + return this.reverse === true + ? this.height - this.layout.scroll.position > this.scrollOffset + : this.layout.scroll.position > this.scrollOffset + }, + + __onClick: function __onClick (e) { + var target = this.layout.container === true + ? getScrollTarget(this.$el) + : getScrollTarget(this.layout.$el); + + setScrollPosition(target, this.reverse === true ? this.layout.height : 0, this.duration); + this.$emit('click', e); + }, + + __updateVisibility: function __updateVisibility () { + var newVal = this.__isVisible(); + if (this.showing !== newVal) { + this.showing = newVal; + } + }, + + __cleanup: function __cleanup () { + this.heightWatcher(); + this.heightWatcher = void 0; + } + }, + + render: function render (h) { + return h('transition', { + props: { name: 'q-transition--fade' } + }, + this.showing === true + ? [ + h('div', { + staticClass: 'q-page-scroller', + on: Object.assign({}, this.$listeners, + {click: this.__onClick}) + }, [ + QPageSticky.options.render.call(this, h) + ]) + ] + : null + ) + }, + + beforeDestroy: function beforeDestroy () { + this.heightWatcher !== void 0 && this.__cleanup(); + } + }); + + var QPagination = Vue.extend({ + name: 'QPagination', + + mixins: [ DarkMixin ], + + props: { + value: { + type: Number, + required: true + }, + min: { + type: Number, + default: 1 + }, + max: { + type: Number, + required: true + }, + + color: { + type: String, + default: 'primary' + }, + textColor: String, + + inputStyle: [Array, String, Object], + inputClass: [Array, String, Object], + + size: String, + + disable: Boolean, + + input: Boolean, + + iconPrev: String, + iconNext: String, + iconFirst: String, + iconLast: String, + + toFn: Function, + + boundaryLinks: { + type: Boolean, + default: null + }, + boundaryNumbers: { + type: Boolean, + default: null + }, + directionLinks: { + type: Boolean, + default: null + }, + ellipses: { + type: Boolean, + default: null + }, + maxPages: { + type: Number, + default: 0, + validator: function (v) { return v >= 0; } + } + }, + + data: function data () { + return { + newPage: null + } + }, + + watch: { + min: function min () { + this.model = this.value; + }, + + max: function max () { + this.model = this.value; + } + }, + + computed: { + model: { + get: function get () { + return this.value + }, + set: function set (val) { + val = parseInt(val, 10); + if (this.disable || isNaN(val) || val === 0) { + return + } + var value = between(val, this.min, this.max); + this.$emit('input', value); + } + }, + + inputPlaceholder: function inputPlaceholder () { + return this.model + ' / ' + this.max + }, + + __boundaryLinks: function __boundaryLinks () { + return this.__getBool(this.boundaryLinks, this.input) + }, + + __boundaryNumbers: function __boundaryNumbers () { + return this.__getBool(this.boundaryNumbers, !this.input) + }, + + __directionLinks: function __directionLinks () { + return this.__getBool(this.directionLinks, this.input) + }, + + __ellipses: function __ellipses () { + return this.__getBool(this.ellipses, !this.input) + }, + + icons: function icons () { + var ico = [ + this.iconFirst || this.$q.iconSet.pagination.first, + this.iconPrev || this.$q.iconSet.pagination.prev, + this.iconNext || this.$q.iconSet.pagination.next, + this.iconLast || this.$q.iconSet.pagination.last + ]; + return this.$q.lang.rtl === true ? ico.reverse() : ico + }, + + attrs: function attrs () { + if (this.disable === true) { + return { + 'aria-disabled': '' + } + } + } + }, + + methods: { + set: function set (value) { + this.model = value; + }, + + setByOffset: function setByOffset (offset) { + this.model = this.model + offset; + }, + + __update: function __update () { + this.model = this.newPage; + this.newPage = null; + }, + + __getBool: function __getBool (val, otherwise) { + return [true, false].includes(val) + ? val + : otherwise + }, + + __getBtn: function __getBtn (h, data, props, page) { + var this$1 = this; + + data.props = Object.assign({}, {color: this.color, + flat: true, + size: this.size}, + props); + + if (page !== void 0) { + if (this.toFn !== void 0) { + data.props.to = this.toFn(page); + } + else { + data.on = { click: function () { return this$1.set(page); } }; + } + } + + return h(QBtn, data) + } + }, + + render: function render (h) { + var this$1 = this; + + var + contentStart = [], + contentEnd = [], + contentMiddle = []; + + if (this.__boundaryLinks) { + contentStart.push(this.__getBtn(h, { + key: 'bls' + }, { + disable: this.disable || this.value <= this.min, + icon: this.icons[0] + }, this.min)); + contentEnd.unshift(this.__getBtn(h, { + key: 'ble' + }, { + disable: this.disable || this.value >= this.max, + icon: this.icons[3] + }, this.max)); + } + + if (this.__directionLinks) { + contentStart.push(this.__getBtn(h, { + key: 'bdp' + }, { + disable: this.disable || this.value <= this.min, + icon: this.icons[1] + }, this.value - 1)); + contentEnd.unshift(this.__getBtn(h, { + key: 'bdn' + }, { + disable: this.disable || this.value >= this.max, + icon: this.icons[2] + }, this.value + 1)); + } + + if (this.input === true) { + contentMiddle.push(h(QInput, { + staticClass: 'inline', + style: { + width: ((this.inputPlaceholder.length / 1.5) + "em") + }, + props: { + type: 'number', + dense: true, + value: this.newPage, + disable: this.disable, + dark: this.isDark, + borderless: true, + inputClass: this.inputClass, + inputStyle: this.inputStyle + }, + attrs: { + placeholder: this.inputPlaceholder, + min: this.min, + max: this.max + }, + on: cache(this, 'inp', { + input: function (value) { this$1.newPage = value; }, + keyup: function (e) { isKeyCode(e, 13) === true && this$1.__update(); }, + blur: this.__update + }) + })); + } + else { // is type select + var + maxPages = Math.max( + this.maxPages, + 1 + (this.__ellipses ? 2 : 0) + (this.__boundaryNumbers ? 2 : 0) + ), + pgFrom = this.min, + pgTo = this.max, + ellipsesStart = false, + ellipsesEnd = false, + boundaryStart = false, + boundaryEnd = false; + + if (this.maxPages && maxPages < (this.max - this.min + 1)) { + maxPages = 1 + Math.floor(maxPages / 2) * 2; + pgFrom = Math.max(this.min, Math.min(this.max - maxPages + 1, this.value - Math.floor(maxPages / 2))); + pgTo = Math.min(this.max, pgFrom + maxPages - 1); + if (this.__boundaryNumbers) { + boundaryStart = true; + pgFrom += 1; + } + if (this.__ellipses && pgFrom > (this.min + (this.__boundaryNumbers ? 1 : 0))) { + ellipsesStart = true; + pgFrom += 1; + } + if (this.__boundaryNumbers) { + boundaryEnd = true; + pgTo -= 1; + } + if (this.__ellipses && pgTo < (this.max - (this.__boundaryNumbers ? 1 : 0))) { + ellipsesEnd = true; + pgTo -= 1; + } + } + var style = { + minWidth: ((Math.max(2, String(this.max).length)) + "em") + }; + if (boundaryStart) { + var active = this.min === this.value; + contentStart.push(this.__getBtn(h, { + key: 'bns', + style: style + }, { + disable: this.disable, + flat: !active, + textColor: active ? this.textColor : null, + label: this.min, + ripple: false + }, this.min)); + } + if (boundaryEnd) { + var active$1 = this.max === this.value; + contentEnd.unshift(this.__getBtn(h, { + key: 'bne', + style: style + }, { + disable: this.disable, + flat: !active$1, + textColor: active$1 ? this.textColor : null, + label: this.max, + ripple: false + }, this.max)); + } + if (ellipsesStart) { + contentStart.push(this.__getBtn(h, { + key: 'bes', + style: style + }, { + disable: this.disable, + label: '…' + }, pgFrom - 1)); + } + if (ellipsesEnd) { + contentEnd.unshift(this.__getBtn(h, { + key: 'bee', + style: style + }, { + disable: this.disable, + label: '…' + }, pgTo + 1)); + } + for (var i = pgFrom; i <= pgTo; i++) { + var active$2 = i === this.value; + contentMiddle.push(this.__getBtn(h, { + key: ("bpg" + i), + style: style + }, { + disable: this.disable, + flat: !active$2, + textColor: active$2 ? this.textColor : null, + label: i, + ripple: false + }, i)); + } + } + + return h('div', { + staticClass: 'q-pagination row no-wrap items-center', + class: { disabled: this.disable }, + attrs: this.attrs, + on: this.$listeners + }, [ + contentStart, + + h('div', { + staticClass: 'row justify-center', + on: this.input === true + ? cache(this, 'stop', { input: stop }) + : null + }, [ + contentMiddle + ]), + + contentEnd + ]) + } + }); + + function frameDebounce (fn) { + var wait = false, frame, callArgs; + + function debounced (/* ...args */) { + var this$1 = this; + + callArgs = arguments; + if (wait === true) { return } + + wait = true; + frame = requestAnimationFrame(function () { + fn.apply(this$1, callArgs); + callArgs = void 0; + wait = false; + }); + } + + debounced.cancel = function () { + window.cancelAnimationFrame(frame); + wait = false; + }; + + return debounced + } + + var QParallax = Vue.extend({ + name: 'QParallax', + + props: { + src: String, + height: { + type: Number, + default: 500 + }, + speed: { + type: Number, + default: 1, + validator: function (v) { return v >= 0 && v <= 1; } + }, + + scrollTarget: { + default: void 0 + } + }, + + data: function data () { + return { + scrolling: false, + percentScrolled: 0 + } + }, + + watch: { + height: function height () { + this.__updatePos(); + }, + + scrollTarget: function scrollTarget () { + this.__unconfigureScrollTarget(); + this.__configureScrollTarget(); + } + }, + + methods: { + __update: function __update (percentage) { + this.percentScrolled = percentage; + this.$listeners.scroll !== void 0 && this.$emit('scroll', percentage); + }, + + __onResize: function __onResize () { + if (this.__scrollTarget) { + this.mediaHeight = this.media.naturalHeight || this.media.videoHeight || height(this.media); + this.__updatePos(); + } + }, + + __updatePos: function __updatePos () { + var containerTop, containerHeight, containerBottom, top, bottom; + + if (this.__scrollTarget === window) { + containerTop = 0; + containerHeight = window.innerHeight; + containerBottom = containerHeight; + } + else { + containerTop = offset(this.__scrollTarget).top; + containerHeight = height(this.__scrollTarget); + containerBottom = containerTop + containerHeight; + } + + top = offset(this.$el).top; + bottom = top + this.height; + + if (bottom > containerTop && top < containerBottom) { + var percent = (containerBottom - top) / (this.height + containerHeight); + this.__setPos((this.mediaHeight - this.height) * percent * this.speed); + this.__update(percent); + } + }, + + __setPos: function __setPos (offset) { + // apply it immediately without any delay + this.media.style.transform = "translate3D(-50%," + (Math.round(offset)) + "px, 0)"; + }, + + __configureScrollTarget: function __configureScrollTarget () { + this.__scrollTarget = getScrollTarget(this.$el, this.scrollTarget); + this.__scrollTarget.addEventListener('scroll', this.__updatePos, listenOpts.passive); + this.__onResize(); + }, + + __unconfigureScrollTarget: function __unconfigureScrollTarget () { + if (this.__scrollTarget !== void 0) { + this.__scrollTarget.removeEventListener('scroll', this.__updatePos, listenOpts.passive); + this.__scrollTarget = void 0; + } + } + }, + + render: function render (h) { + return h('div', { + staticClass: 'q-parallax', + style: { height: ((this.height) + "px") }, + on: this.$listeners + }, [ + h('div', { + ref: 'mediaParent', + staticClass: 'q-parallax__media absolute-full' + }, this.$scopedSlots.media !== void 0 ? this.$scopedSlots.media() : [ + h('img', { + ref: 'media', + attrs: { + src: this.src + } + }) + ]), + + h( + 'div', + { staticClass: 'q-parallax__content absolute-full column flex-center' }, + this.$scopedSlots.content !== void 0 + ? this.$scopedSlots.content({ percentScrolled: this.percentScrolled }) + : slot(this, 'default') + ) + ]) + }, + + beforeMount: function beforeMount () { + this.__setPos = frameDebounce(this.__setPos); + }, + + mounted: function mounted () { + this.__update = frameDebounce(this.__update); + this.resizeHandler = frameDebounce(this.__onResize); + + this.media = this.$scopedSlots.media !== void 0 + ? this.$refs.mediaParent.children[0] + : this.$refs.media; + + this.media.onload = this.media.onloadstart = this.media.loadedmetadata = this.__onResize; + + window.addEventListener('resize', this.resizeHandler, listenOpts.passive); + + this.__configureScrollTarget(); + }, + + beforeDestroy: function beforeDestroy () { + window.removeEventListener('resize', this.resizeHandler, listenOpts.passive); + this.__unconfigureScrollTarget(); + this.media.onload = this.media.onloadstart = this.media.loadedmetadata = null; + } + }); + + function clone$1 (data) { + var s = JSON.stringify(data); + if (s) { + return JSON.parse(s) + } + } + + var QPopupEdit = Vue.extend({ + name: 'QPopupEdit', + + props: { + value: { + required: true + }, + title: String, + buttons: Boolean, + labelSet: String, + labelCancel: String, + + color: { + type: String, + default: 'primary' + }, + validate: { + type: Function, + default: function () { return true; } + }, + + autoSave: Boolean, + + /* menu props overrides */ + cover: { + type: Boolean, + default: true + }, + contentClass: String, + /* end of menu props */ + + disable: Boolean + }, + + data: function data () { + return { + initialValue: '' + } + }, + + computed: { + classes: function classes () { + return 'q-popup-edit' + + (this.contentClass !== void 0 ? (" " + (this.contentClass)) : '') + }, + + defaultSlotScope: function defaultSlotScope () { + return { + initialValue: this.initialValue, + value: this.value, + emitValue: this.__emitValue, + validate: this.validate, + set: this.set, + cancel: this.cancel + } + } + }, + + methods: { + set: function set () { + if (this.__hasChanged() === true) { + if (this.validate(this.value) === false) { + return + } + this.$emit('save', this.value, this.initialValue); + } + this.__close(); + }, + + cancel: function cancel () { + if (this.__hasChanged() === true) { + this.$emit('input', this.initialValue); + this.$emit('cancel', this.value, this.initialValue); + } + this.__close(); + }, + + __hasChanged: function __hasChanged () { + return isDeepEqual(this.value, this.initialValue) === false + }, + + __emitValue: function __emitValue (val) { + if (this.disable !== true) { + this.$emit('input', val); + } + }, + + __close: function __close () { + this.validated = true; + this.$refs.menu.showing === true && this.$refs.menu.hide(); + }, + + __reposition: function __reposition () { + var this$1 = this; + + this.$nextTick(function () { + this$1.$refs.menu.updatePosition(); + }); + }, + + __getContent: function __getContent (h) { + var + title = slot(this, 'title', this.title), + child = this.$scopedSlots.default === void 0 + ? [] + : this.$scopedSlots.default(this.defaultSlotScope).slice(); + + title && child.unshift( + h('div', { staticClass: 'q-dialog__title q-mt-sm q-mb-sm' }, [ title ]) + ); + + this.buttons === true && child.push( + h('div', { staticClass: 'q-popup-edit__buttons row justify-center no-wrap' }, [ + h(QBtn, { + props: { + flat: true, + color: this.color, + label: this.labelCancel || this.$q.lang.label.cancel + }, + on: cache(this, 'cancel', { click: this.cancel }) + }), + h(QBtn, { + props: { + flat: true, + color: this.color, + label: this.labelSet || this.$q.lang.label.set + }, + on: cache(this, 'ok', { click: this.set }) + }) + ]) + ); + + return child + } + }, + + render: function render (h) { + var this$1 = this; + + if (this.disable === true) { return } + + return h(QMenu, { + ref: 'menu', + props: Object.assign({}, this.$attrs, + {cover: this.cover, + contentClass: this.classes}), + on: cache(this, 'menu', { + 'before-show': function () { + this$1.validated = false; + this$1.initialValue = clone$1(this$1.value); + this$1.watcher = this$1.$watch('value', this$1.__reposition); + this$1.$emit('before-show'); + }, + show: function () { + this$1.$emit('show'); + }, + 'escape-key': this.cancel, + 'before-hide': function () { + this$1.watcher(); + + if (this$1.validated === false && this$1.__hasChanged() === true) { + if (this$1.autoSave === true && this$1.validate(this$1.value) === true) { + this$1.$emit('save', this$1.value, this$1.initialValue); + } + else { + this$1.$emit('cancel', this$1.value, this$1.initialValue); + this$1.$emit('input', this$1.initialValue); + } + } + + this$1.$emit('before-hide'); + }, + hide: function () { + this$1.$emit('hide'); + }, + keyup: function (e) { + isKeyCode(e, 13) === true && this$1.set(); + } + }) + }, this.__getContent(h)) + } + }); + + var QPopupProxy = Vue.extend({ + name: 'QPopupProxy', + + mixins: [ AnchorMixin ], + + props: { + breakpoint: { + type: [String, Number], + default: 450 + } + }, + + data: function data () { + var breakpoint = parseInt(this.breakpoint, 10); + return { + type: this.$q.screen.width < breakpoint || this.$q.screen.height < breakpoint + ? 'dialog' + : 'menu' + } + }, + + computed: { + parsedBreakpoint: function parsedBreakpoint () { + return parseInt(this.breakpoint, 10) + } + }, + + watch: { + '$q.screen.width': function $q_screen_width (width) { + if (this.$refs.popup.showing !== true) { + this.__updateType(width, this.$q.screen.height, this.parsedBreakpoint); + } + }, + + '$q.screen.height': function $q_screen_height (height) { + if (this.$refs.popup.showing !== true) { + this.__updateType(this.$q.screen.width, height, this.parsedBreakpoint); + } + }, + + breakpoint: function breakpoint (breakpoint$1) { + if (this.$refs.popup.showing !== true) { + this.__updateType(this.$q.screen.width, this.$q.screen.height, parseInt(breakpoint$1, 10)); + } + } + }, + + methods: { + toggle: function toggle (evt) { + this.$refs.popup.toggle(evt); + }, + + show: function show (evt) { + this.$refs.popup.show(evt); + }, + + hide: function hide (evt) { + this.$refs.popup.hide(evt); + }, + + __onHide: function __onHide (evt) { + this.__updateType(this.$q.screen.width, this.$q.screen.height, this.parsedBreakpoint); + this.$emit('hide', evt); + }, + + __updateType: function __updateType (width, height, breakpoint) { + var type = width < breakpoint || height < breakpoint + ? 'dialog' + : 'menu'; + + if (this.type !== type) { + this.type = type; + } + } + }, + + render: function render (h) { + var def = slot(this, 'default'); + + var props = ( + this.type === 'menu' && + def !== void 0 && + def[0] !== void 0 && + def[0].componentOptions !== void 0 && + def[0].componentOptions.Ctor !== void 0 && + def[0].componentOptions.Ctor.sealedOptions !== void 0 && + ['QDate', 'QTime', 'QCarousel', 'QColor'].includes( + def[0].componentOptions.Ctor.sealedOptions.name + ) + ) ? { cover: true, maxHeight: '99vh' } : {}; + + var data = { + ref: 'popup', + props: Object.assign(props, this.$attrs), + on: Object.assign({}, this.$listeners, + {hide: this.__onHide}) + }; + + var component; + + if (this.type === 'dialog') { + component = QDialog; + } + else { + component = QMenu; + data.props.target = this.target; + data.props.contextMenu = this.contextMenu; + data.props.noParentEvent = true; + data.props.separateClosePopup = true; + } + + return h(component, data, def) + } + }); + + function width$1 (val) { + return { transform: ("scale3d(" + val + ",1,1)") } + } + + var QLinearProgress = Vue.extend({ + name: 'QLinearProgress', + + mixins: [ + DarkMixin, + getSizeMixin({ + xs: 2, + sm: 4, + md: 6, + lg: 10, + xl: 14 + }) + ], + + props: { + value: { + type: Number, + default: 0 + }, + buffer: Number, + + color: String, + trackColor: String, + + reverse: Boolean, + stripe: Boolean, + indeterminate: Boolean, + query: Boolean, + rounded: Boolean + }, + + computed: { + motion: function motion () { + return this.indeterminate === true || this.query === true + }, + + classes: function classes () { + return 'q-linear-progress' + + (this.color !== void 0 ? (" text-" + (this.color)) : '') + + (this.reverse === true || this.query === true ? ' q-linear-progress--reverse' : '') + + (this.rounded === true ? ' rounded-borders' : '') + }, + + trackStyle: function trackStyle () { + return width$1(this.buffer !== void 0 ? this.buffer : 1) + }, + + trackClass: function trackClass () { + return 'q-linear-progress__track--' + (this.isDark === true ? 'dark' : 'light') + + (this.trackColor !== void 0 ? (" bg-" + (this.trackColor)) : '') + }, + + modelStyle: function modelStyle () { + return width$1(this.motion ? 1 : this.value) + }, + + modelClasses: function modelClasses () { + return ("q-linear-progress__model--" + (this.motion ? 'in' : '') + "determinate") + }, + + stripeStyle: function stripeStyle () { + return { width: (this.value * 100) + '%' } + }, + + attrs: function attrs () { + return { + role: 'progressbar', + 'aria-valuemin': this.min, + 'aria-valuemax': this.max, + 'aria-valuenow': this.indeterminate === true ? void 0 : this.value + } + } + }, + + render: function render (h) { + var child = [ + h('div', { + staticClass: 'q-linear-progress__track absolute-full', + style: this.trackStyle, + class: this.trackClass + }), + + h('div', { + staticClass: 'q-linear-progress__model absolute-full', + style: this.modelStyle, + class: this.modelClasses + }) + ]; + + this.stripe === true && this.motion === false && child.push( + h('div', { + staticClass: 'q-linear-progress__stripe absolute-full', + style: this.stripeStyle + }) + ); + + return h('div', { + style: this.sizeStyle, + class: this.classes, + attrs: this.attrs, + on: this.$listeners + }, mergeSlot(child, this, 'default')) + } + }); + + var + PULLER_HEIGHT = 40, + OFFSET_TOP = 20; + + var QPullToRefresh = Vue.extend({ + name: 'QPullToRefresh', + + directives: { + TouchPan: TouchPan + }, + + props: { + color: String, + bgColor: String, + icon: String, + noMouse: Boolean, + disable: Boolean, + + scrollTarget: { + default: void 0 + } + }, + + data: function data () { + return { + state: 'pull', + pullRatio: 0, + pulling: false, + pullPosition: -PULLER_HEIGHT, + animating: false, + positionCSS: {} + } + }, + + computed: { + style: function style () { + return { + opacity: this.pullRatio, + transform: ("translateY(" + (this.pullPosition) + "px) rotate(" + (this.pullRatio * 360) + "deg)") + } + }, + + classes: function classes () { + return 'q-pull-to-refresh__puller row flex-center' + + (this.animating === true ? ' q-pull-to-refresh__puller--animating' : '') + + (this.bgColor !== void 0 ? (" bg-" + (this.bgColor)) : '') + } + }, + + watch: { + scrollTarget: function scrollTarget () { + this.updateScrollTarget(); + } + }, + + methods: { + trigger: function trigger () { + var this$1 = this; + + this.$emit('refresh', function () { + this$1.__animateTo({ pos: -PULLER_HEIGHT, ratio: 0 }, function () { + this$1.state = 'pull'; + }); + }); + }, + + updateScrollTarget: function updateScrollTarget () { + this.scrollContainer = getScrollTarget(this.$el, this.scrollTarget); + }, + + __pull: function __pull (event) { + if (event.isFinal === true) { + if (this.pulling === true) { + this.pulling = false; + + if (this.state === 'pulled') { + this.state = 'refreshing'; + this.__animateTo({ pos: OFFSET_TOP }); + this.trigger(); + } + else if (this.state === 'pull') { + this.__animateTo({ pos: -PULLER_HEIGHT, ratio: 0 }); + } + } + + return + } + + if (this.animating === true || this.state === 'refreshing') { + return false + } + + if (event.isFirst === true) { + if (getScrollPosition(this.scrollContainer) !== 0) { + if (this.pulling) { + this.pulling = false; + this.state = 'pull'; + this.__animateTo({ pos: -PULLER_HEIGHT, ratio: 0 }); + } + + return false + } + + this.pulling = true; + + var ref = this.$el.getBoundingClientRect(); + var top = ref.top; + var left = ref.left; + this.positionCSS = { + top: top + 'px', + left: left + 'px', + width: window.getComputedStyle(this.$el).getPropertyValue('width') + }; + } + + prevent(event.evt); + + var distance = Math.min(140, Math.max(0, event.distance.y)); + this.pullPosition = distance - PULLER_HEIGHT; + this.pullRatio = between(distance / (OFFSET_TOP + PULLER_HEIGHT), 0, 1); + + var state = this.pullPosition > OFFSET_TOP ? 'pulled' : 'pull'; + if (this.state !== state) { + this.state = state; + } + }, + + __animateTo: function __animateTo (ref, done) { + var this$1 = this; + var pos = ref.pos; + var ratio = ref.ratio; + + this.animating = true; + this.pullPosition = pos; + + if (ratio !== void 0) { + this.pullRatio = ratio; + } + + clearTimeout(this.timer); + this.timer = setTimeout(function () { + this$1.animating = false; + done && done(); + }, 300); + } + }, + + mounted: function mounted () { + this.updateScrollTarget(); + }, + + beforeDestroy: function beforeDestroy () { + clearTimeout(this.timer); + }, + + render: function render (h) { + return h('div', { + staticClass: 'q-pull-to-refresh overflow-hidden', + on: this.$listeners, + directives: this.disable === true + ? null + : cache(this, 'dir#' + this.noMouse, [{ + name: 'touch-pan', + modifiers: { + down: true, + mightPrevent: true, + mouse: this.noMouse !== true + }, + value: this.__pull + }]) + }, [ + h('div', { + staticClass: 'q-pull-to-refresh__content', + class: this.pulling === true ? 'no-pointer-events' : '' + }, slot(this, 'default')), + + h('div', { + staticClass: 'q-pull-to-refresh__puller-container fixed row flex-center no-pointer-events z-top', + style: this.positionCSS + }, [ + h('div', { + style: this.style, + class: this.classes + }, [ + this.state !== 'refreshing' + ? h(QIcon, { + props: { + name: this.icon || this.$q.iconSet.pullToRefresh.icon, + color: this.color, + size: '32px' + } + }) + : h(QSpinner, { + props: { + size: '24px', + color: this.color + } + }) + ]) + ]) + ]) + } + }); + + var dragType = { + MIN: 0, + RANGE: 1, + MAX: 2 + }; + + var QRange = Vue.extend({ + name: 'QRange', + + mixins: [ SliderMixin ], + + props: { + value: { + type: Object, + default: function () { return ({ + min: null, + max: null + }); }, + validator: function validator (val) { + return 'min' in val && 'max' in val + } + }, + + name: String, + + dragRange: Boolean, + dragOnlyRange: Boolean, + + leftLabelColor: String, + leftLabelTextColor: String, + rightLabelColor: String, + rightLabelTextColor: String, + + leftLabelValue: [String, Number], + rightLabelValue: [String, Number] + }, + + data: function data () { + return { + model: { + min: this.value.min === null ? this.min : this.value.min, + max: this.value.max === null ? this.max : this.value.max + }, + curMinRatio: 0, + curMaxRatio: 0 + } + }, + + watch: { + 'value.min': function value_min (val) { + this.model.min = val === null + ? this.min + : val; + }, + + 'value.max': function value_max (val) { + this.model.max = val === null + ? this.max + : val; + }, + + min: function min (value) { + if (this.model.min < value) { + this.model.min = value; + } + if (this.model.max < value) { + this.model.max = value; + } + }, + + max: function max (value) { + if (this.model.min > value) { + this.model.min = value; + } + if (this.model.max > value) { + this.model.max = value; + } + } + }, + + computed: { + ratioMin: function ratioMin () { + return this.active === true ? this.curMinRatio : this.modelMinRatio + }, + + ratioMax: function ratioMax () { + return this.active === true ? this.curMaxRatio : this.modelMaxRatio + }, + + modelMinRatio: function modelMinRatio () { + return (this.model.min - this.min) / (this.max - this.min) + }, + + modelMaxRatio: function modelMaxRatio () { + return (this.model.max - this.min) / (this.max - this.min) + }, + + trackStyle: function trackStyle () { + var obj; + + return ( obj = {}, obj[this.horizProp] = 100 * this.ratioMin + '%', obj.width = 100 * (this.ratioMax - this.ratioMin) + '%', obj ) + }, + + minThumbStyle: function minThumbStyle () { + var obj; + + return ( obj = {}, obj[this.horizProp] = (100 * this.ratioMin) + '%', obj['z-index'] = this.__nextFocus === 'min' ? 2 : void 0, obj ) + }, + + maxThumbStyle: function maxThumbStyle () { + var obj; + + return ( obj = {}, obj[this.horizProp] = (100 * this.ratioMax) + '%', obj ) + }, + + minThumbClass: function minThumbClass () { + if (this.preventFocus === false && this.focus === 'min') { + return 'q-slider--focus' + } + }, + + maxThumbClass: function maxThumbClass () { + if (this.preventFocus === false && this.focus === 'max') { + return 'q-slider--focus' + } + }, + + events: function events () { + var this$1 = this; + + if (this.editable === true) { + if (this.$q.platform.is.mobile === true) { + return { click: this.__mobileClick } + } + + var evt = { mousedown: this.__activate }; + + this.dragOnlyRange === true && Object.assign(evt, { + focus: function () { this$1.__focus('both'); }, + blur: this.__blur, + keydown: this.__keydown, + keyup: this.__keyup + }); + + return evt + } + }, + + minEvents: function minEvents () { + var this$1 = this; + + if (this.editable === true && this.$q.platform.is.mobile !== true && this.dragOnlyRange !== true) { + return { + focus: function () { this$1.__focus('min'); }, + blur: this.__blur, + keydown: this.__keydown, + keyup: this.__keyup + } + } + }, + + maxEvents: function maxEvents () { + var this$1 = this; + + if (this.editable === true && this.$q.platform.is.mobile !== true && this.dragOnlyRange !== true) { + return { + focus: function () { this$1.__focus('max'); }, + blur: this.__blur, + keydown: this.__keydown, + keyup: this.__keyup + } + } + }, + + minPinClass: function minPinClass () { + var color = this.leftLabelColor || this.labelColor; + if (color) { + return ("text-" + color) + } + }, + + minPinTextClass: function minPinTextClass () { + var color = this.leftLabelTextColor || this.labelTextColor; + if (color) { + return ("text-" + color) + } + }, + + maxPinClass: function maxPinClass () { + var color = this.rightLabelColor || this.labelColor; + if (color) { + return ("text-" + color) + } + }, + + maxPinTextClass: function maxPinTextClass () { + var color = this.rightLabelTextColor || this.labelTextColor; + if (color) { + return ("text-" + color) + } + }, + + minLabel: function minLabel () { + return this.leftLabelValue !== void 0 + ? this.leftLabelValue + : this.model.min + }, + + maxLabel: function maxLabel () { + return this.rightLabelValue !== void 0 + ? this.rightLabelValue + : this.model.max + }, + + minPinStyle: function minPinStyle () { + var percent = (this.reverse === true ? -this.ratioMin : this.ratioMin - 1); + return this.__getPinStyle(percent, this.ratioMin) + }, + + maxPinStyle: function maxPinStyle () { + var percent = (this.reverse === true ? -this.ratioMax : this.ratioMax - 1); + return this.__getPinStyle(percent, this.ratioMax) + }, + + formAttrs: function formAttrs () { + return { + type: 'hidden', + name: this.name, + value: ((this.value.min) + "|" + (this.value.max)) + } + } + }, + + methods: { + __updateValue: function __updateValue (change) { + if (this.model.min !== this.value.min || this.model.max !== this.value.max) { + this.$emit('input', this.model); + } + change === true && this.$emit('change', this.model); + }, + + __getDragging: function __getDragging (event) { + var ref = this.$el.getBoundingClientRect(); + var left = ref.left; + var width = ref.width; + var sensitivity = this.dragOnlyRange ? 0 : this.$refs.minThumb.offsetWidth / (2 * width), + diff = this.max - this.min; + + var dragging = { + left: left, + width: width, + valueMin: this.model.min, + valueMax: this.model.max, + ratioMin: (this.model.min - this.min) / diff, + ratioMax: (this.model.max - this.min) / diff + }; + + var + ratio = getRatio(event, dragging, this.isReversed), + type; + + if (this.dragOnlyRange !== true && ratio < dragging.ratioMin + sensitivity) { + type = dragType.MIN; + } + else if (this.dragOnlyRange === true || ratio < dragging.ratioMax - sensitivity) { + if (this.dragRange || this.dragOnlyRange) { + type = dragType.RANGE; + Object.assign(dragging, { + offsetRatio: ratio, + offsetModel: getModel(ratio, this.min, this.max, this.step, this.decimals), + rangeValue: dragging.valueMax - dragging.valueMin, + rangeRatio: dragging.ratioMax - dragging.ratioMin + }); + } + else { + type = dragging.ratioMax - ratio < ratio - dragging.ratioMin + ? dragType.MAX + : dragType.MIN; + } + } + else { + type = dragType.MAX; + } + + dragging.type = type; + this.__nextFocus = void 0; + + return dragging + }, + + __updatePosition: function __updatePosition (event, dragging) { + if ( dragging === void 0 ) dragging = this.dragging; + + var + ratio = getRatio(event, dragging, this.isReversed), + model = getModel(ratio, this.min, this.max, this.step, this.decimals), + pos; + + switch (dragging.type) { + case dragType.MIN: + if (ratio <= dragging.ratioMax) { + pos = { + minR: ratio, + maxR: dragging.ratioMax, + min: model, + max: dragging.valueMax + }; + this.__nextFocus = 'min'; + } + else { + pos = { + minR: dragging.ratioMax, + maxR: ratio, + min: dragging.valueMax, + max: model + }; + this.__nextFocus = 'max'; + } + break + + case dragType.MAX: + if (ratio >= dragging.ratioMin) { + pos = { + minR: dragging.ratioMin, + maxR: ratio, + min: dragging.valueMin, + max: model + }; + this.__nextFocus = 'max'; + } + else { + pos = { + minR: ratio, + maxR: dragging.ratioMin, + min: model, + max: dragging.valueMin + }; + this.__nextFocus = 'min'; + } + break + + case dragType.RANGE: + var + ratioDelta = ratio - dragging.offsetRatio, + minR = between(dragging.ratioMin + ratioDelta, 0, 1 - dragging.rangeRatio), + modelDelta = model - dragging.offsetModel, + min = between(dragging.valueMin + modelDelta, this.min, this.max - dragging.rangeValue); + + pos = { + minR: minR, + maxR: minR + dragging.rangeRatio, + min: parseFloat(min.toFixed(this.decimals)), + max: parseFloat((min + dragging.rangeValue).toFixed(this.decimals)) + }; + break + } + + this.model = { + min: pos.min, + max: pos.max + }; + + // If either of the values to be emitted are null, set them to the defaults the user has entered. + if (this.model.min === null || this.model.max === null) { + this.model.min = pos.min || this.min; + this.model.max = pos.max || this.max; + } + + if (this.snap !== true || this.step === 0) { + this.curMinRatio = pos.minR; + this.curMaxRatio = pos.maxR; + } + else { + var diff = this.max - this.min; + this.curMinRatio = (this.model.min - this.min) / diff; + this.curMaxRatio = (this.model.max - this.min) / diff; + } + }, + + __focus: function __focus (which) { + this.focus = which; + }, + + __keydown: function __keydown (evt) { + var obj; + + if (!keyCodes.includes(evt.keyCode)) { + return + } + + stopAndPrevent(evt); + + var + step = ([34, 33].includes(evt.keyCode) ? 10 : 1) * this.computedStep, + offset = [34, 37, 40].includes(evt.keyCode) ? -step : step; + + if (this.dragOnlyRange) { + var interval = this.dragOnlyRange ? this.model.max - this.model.min : 0; + + var min = between( + parseFloat((this.model.min + offset).toFixed(this.decimals)), + this.min, + this.max - interval + ); + + this.model = { + min: min, + max: parseFloat((min + interval).toFixed(this.decimals)) + }; + } + else if (this.focus === false) { + return + } + else { + var which = this.focus; + + this.model = Object.assign({}, this.model, + ( obj = {}, obj[which] = between( + parseFloat((this.model[which] + offset).toFixed(this.decimals)), + which === 'min' ? this.min : this.model.min, + which === 'max' ? this.max : this.model.max + ), obj )); + } + + this.__updateValue(); + }, + + __getThumb: function __getThumb (h, which) { + var child = [ + this.__getThumbSvg(h), + h('div', { staticClass: 'q-slider__focus-ring' }) + ]; + + if (this.label === true || this.labelAlways === true) { + child.push( + h('div', { + staticClass: 'q-slider__pin absolute', + style: this[which + 'PinStyle'].pin, + class: this[which + 'PinClass'] + }, [ + h('div', { staticClass: 'q-slider__pin-text-container', style: this[which + 'PinStyle'].pinTextContainer }, [ + h('span', { + staticClass: 'q-slider__pin-text', + class: this[which + 'PinTextClass'] + }, [ + this[which + 'Label'] + ]) + ]) + ]), + + h('div', { + staticClass: 'q-slider__arrow', + class: this[which + 'PinClass'] + }) + ); + } + + return h('div', { + ref: which + 'Thumb', + staticClass: 'q-slider__thumb-container absolute non-selectable', + style: this[which + 'ThumbStyle'], + class: this[which + 'ThumbClass'], + on: this[which + 'Events'], + attrs: { tabindex: this.dragOnlyRange !== true ? this.computedTabindex : null } + }, child) + } + }, + + render: function render (h) { + var track = [ + h('div', { + staticClass: 'q-slider__track absolute', + style: this.trackStyle + }) + ]; + + this.markers === true && track.push( + h('div', { + staticClass: 'q-slider__track-markers absolute-full fit', + style: this.markerStyle + }) + ); + + var child = [ + h('div', { + staticClass: 'q-slider__track-container absolute' + }, track), + + this.__getThumb(h, 'min'), + this.__getThumb(h, 'max') + ]; + + if (this.name !== void 0 && this.disable !== true) { + this.__injectFormInput(child, 'push'); + } + + return h('div', { + staticClass: this.value.min === null || this.value.max === null + ? 'q-slider--no-value' + : void 0, + attrs: Object.assign({}, this.attrs, + {'aria-valuenow': this.value.min + '|' + this.value.max, + tabindex: this.dragOnlyRange && !this.$q.platform.is.mobile + ? this.computedTabindex + : null}), + class: this.classes, + on: this.events, + directives: this.editable === true ? cache(this, 'dir', [{ + name: 'touch-pan', + value: this.__pan, + modifiers: { + horizontal: true, + prevent: true, + stop: true, + mouse: true, + mouseAllDir: true + } + }]) : null + }, child) + } + }); + + var QRating = Vue.extend({ + name: 'QRating', + + mixins: [ SizeMixin, FormMixin ], + + props: { + value: { + type: Number, + required: true + }, + + max: { + type: [String, Number], + default: 5 + }, + + icon: [String, Array], + iconHalf: [String, Array], + iconSelected: [String, Array], + + color: [String, Array], + colorHalf: [String, Array], + colorSelected: [String, Array], + + noReset: Boolean, + noDimming: Boolean, + + readonly: Boolean, + disable: Boolean + }, + + data: function data () { + return { + mouseModel: 0 + } + }, + + computed: { + editable: function editable () { + return this.readonly !== true && this.disable !== true + }, + + classes: function classes () { + return "q-rating--" + (this.editable === true ? '' : 'non-') + "editable" + + (this.noDimming === true ? ' q-rating--no-dimming' : '') + + (this.disable === true ? ' disabled' : '') + + (this.color !== void 0 && Array.isArray(this.color) === false ? (" text-" + (this.color)) : '') + }, + + iconData: function iconData () { + var + iconLen = Array.isArray(this.icon) === true ? this.icon.length : 0, + selIconLen = Array.isArray(this.iconSelected) === true ? this.iconSelected.length : 0, + halfIconLen = Array.isArray(this.iconHalf) === true ? this.iconHalf.length : 0, + colorLen = Array.isArray(this.color) === true ? this.color.length : 0, + selColorLen = Array.isArray(this.colorSelected) === true ? this.colorSelected.length : 0, + halfColorLen = Array.isArray(this.colorHalf) === true ? this.colorHalf.length : 0; + + return { + iconLen: iconLen, + icon: iconLen > 0 ? this.icon[iconLen - 1] : this.icon, + selIconLen: selIconLen, + selIcon: selIconLen > 0 ? this.iconSelected[selIconLen - 1] : this.iconSelected, + halfIconLen: halfIconLen, + halfIcon: halfIconLen > 0 ? this.iconHalf[selIconLen - 1] : this.iconHalf, + colorLen: colorLen, + color: colorLen > 0 ? this.color[colorLen - 1] : this.color, + selColorLen: selColorLen, + selColor: selColorLen > 0 ? this.colorSelected[selColorLen - 1] : this.colorSelected, + halfColorLen: halfColorLen, + halfColor: halfColorLen > 0 ? this.colorHalf[halfColorLen - 1] : this.colorHalf + } + }, + + attrs: function attrs () { + if (this.disable === true) { + return { 'aria-disabled': '' } + } + if (this.readonly === true) { + return { 'aria-readonly': '' } + } + } + }, + + methods: { + __set: function __set (value) { + if (this.editable === true) { + var + model = between(parseInt(value, 10), 1, parseInt(this.max, 10)), + newVal = this.noReset !== true && this.value === model ? 0 : model; + + newVal !== this.value && this.$emit('input', newVal); + this.mouseModel = 0; + } + }, + + __setHoverValue: function __setHoverValue (value) { + if (this.editable === true) { + this.mouseModel = value; + } + }, + + __keyup: function __keyup (e, i) { + switch (e.keyCode) { + case 13: + case 32: + this.__set(i); + return stopAndPrevent(e) + case 37: // LEFT ARROW + case 40: // DOWN ARROW + if (this.$refs[("rt" + (i - 1))]) { + this.$refs[("rt" + (i - 1))].focus(); + } + return stopAndPrevent(e) + case 39: // RIGHT ARROW + case 38: // UP ARROW + if (this.$refs[("rt" + (i + 1))]) { + this.$refs[("rt" + (i + 1))].focus(); + } + return stopAndPrevent(e) + } + } + }, + + render: function render (h) { + var this$1 = this; + var obj; + + var + child = [], + tabindex = this.editable === true ? 0 : null, + icons = this.iconData, + ceil = Math.ceil(this.value); + + var halfIndex = this.iconHalf === void 0 || ceil === this.value + ? -1 + : ceil; + + var loop = function ( i ) { + var + active = (this$1.mouseModel === 0 && this$1.value >= i) || (this$1.mouseModel > 0 && this$1.mouseModel >= i), + half = halfIndex === i && this$1.mouseModel < i, + exSelected = this$1.mouseModel > 0 && (half === true ? ceil : this$1.value) >= i && this$1.mouseModel < i, + name = half === true + ? (i <= icons.halfIconLen ? this$1.iconHalf[i - 1] : icons.halfIcon) + : ( + icons.selIcon !== void 0 && (active === true || exSelected === true) + ? (i <= icons.selIconLen ? this$1.iconSelected[i - 1] : icons.selIcon) + : (i <= icons.iconLen ? this$1.icon[i - 1] : icons.icon) + ), + color = half === true + ? (i <= icons.halfColorLen ? this$1.colorHalf[i - 1] : icons.halfColor) + : ( + icons.selColor !== void 0 && active === true + ? (i <= icons.selColorLen ? this$1.colorSelected[i - 1] : icons.selColor) + : (i <= icons.colorLen ? this$1.color[i - 1] : icons.color) + ); + + child.push( + h(QIcon, { + key: i, + ref: ("rt" + i), + staticClass: 'q-rating__icon', + class: ( obj = { + 'q-rating__icon--active': active === true || half === true, + 'q-rating__icon--exselected': exSelected, + 'q-rating__icon--hovered': this$1.mouseModel === i + }, obj[("text-" + color)] = color !== void 0, obj ), + props: { name: name || this$1.$q.iconSet.rating.icon }, + attrs: { tabindex: tabindex }, + on: cache(this$1, 'i#' + i, { + click: function () { this$1.__set(i); }, + mouseover: function () { this$1.__setHoverValue(i); }, + mouseout: function () { this$1.mouseModel = 0; }, + focus: function () { this$1.__setHoverValue(i); }, + blur: function () { this$1.mouseModel = 0; }, + keyup: function (e) { this$1.__keyup(e, i); } + }) + }, slot(this$1, ("tip-" + i))) + ); + }; + + for (var i = 1; i <= this$1.max; i++) loop( i ); + + if (this.name !== void 0 && this.disable !== true) { + this.__injectFormInput(child, 'push'); + } + + return h('div', { + staticClass: 'q-rating row inline items-center', + class: this.classes, + style: this.sizeStyle, + attrs: this.attrs, + on: this.$listeners + }, child) + } + }); + + var QResponsive = Vue.extend({ + name: 'QResponsive', + + mixins: [ RatioMixin ], + + render: function render (h) { + return h('div', { + staticClass: 'q-responsive', + on: this.$listeners + }, [ + h('div', { + staticClass: 'q-responsive__filler overflow-hidden' + }, [ + h('div', { style: this.ratioStyle }) + ]), + + h('div', { + staticClass: 'q-responsive__content absolute-full fit' + }, slot(this, 'default')) + ]) + } + }); + + var QScrollArea = Vue.extend({ + name: 'QScrollArea', + + mixins: [ DarkMixin ], + + directives: { + TouchPan: TouchPan + }, + + props: { + barStyle: [ Array, String, Object ], + thumbStyle: Object, + contentStyle: [ Array, String, Object ], + contentActiveStyle: [ Array, String, Object ], + + delay: { + type: [String, Number], + default: 1000 + }, + + visible: { + type: Boolean, + default: null + }, + + horizontal: Boolean + }, + + data: function data () { + return { + // state management + tempShowing: false, + panning: false, + hover: false, + + // other... + containerWidth: 0, + containerHeight: 0, + scrollPosition: 0, + scrollSize: 0 + } + }, + + computed: { + classes: function classes () { + return 'q-scrollarea' + + (this.isDark === true ? ' q-scrollarea--dark' : '') + }, + + thumbHidden: function thumbHidden () { + return ( + (this.visible === null ? this.hover : this.visible) !== true && + this.tempShowing === false && + this.panning === false + ) || this.scrollSize <= this.containerSize + }, + + thumbSize: function thumbSize () { + return Math.round( + between( + this.containerSize * this.containerSize / this.scrollSize, + 50, + this.containerSize + ) + ) + }, + + style: function style () { + var pos = this.scrollPercentage * (this.containerSize - this.thumbSize); + return Object.assign( + {}, + this.thumbStyle, + this.horizontal === true + ? { + left: (pos + "px"), + width: ((this.thumbSize) + "px") + } + : { + top: (pos + "px"), + height: ((this.thumbSize) + "px") + } + ) + }, + + mainStyle: function mainStyle () { + return this.thumbHidden === true + ? this.contentStyle + : this.contentActiveStyle + }, + + scrollPercentage: function scrollPercentage () { + var p = between(this.scrollPosition / (this.scrollSize - this.containerSize), 0, 1); + return Math.round(p * 10000) / 10000 + }, + + containerSize: function containerSize () { + return this[("container" + (this.dirProps.suffix))] + }, + + dirProps: function dirProps () { + return this.horizontal === true + ? { prefix: 'horizontal', suffix: 'Width', scroll: 'scrollLeft', classSuffix: 'h absolute-bottom', dir: 'right', dist: 'x' } + : { prefix: 'vertical', suffix: 'Height', scroll: 'scrollTop', classSuffix: 'v absolute-right', dir: 'down', dist: 'y' } + }, + + thumbClass: function thumbClass () { + return "q-scrollarea__thumb--" + (this.dirProps.classSuffix) + + (this.thumbHidden === true ? ' q-scrollarea__thumb--invisible' : '') + }, + + barClass: function barClass () { + return "q-scrollarea__bar--" + (this.dirProps.classSuffix) + + (this.thumbHidden === true ? ' q-scrollarea__bar--invisible' : '') + } + }, + + methods: { + getScrollTarget: function getScrollTarget () { + return this.$refs.target + }, + + getScrollPosition: function getScrollPosition () { + return this.scrollPosition + }, + + setScrollPosition: function setScrollPosition$1 (offset, duration) { + var fn = this.horizontal === true + ? setHorizontalScrollPosition + : setScrollPosition; + + fn(this.$refs.target, offset, duration); + }, + + __updateContainer: function __updateContainer (ref) { + var height = ref.height; + var width = ref.width; + + var change = false; + + if (this.containerWidth !== width) { + this.containerWidth = width; + change = true; + } + + if (this.containerHeight !== height) { + this.containerHeight = height; + change = true; + } + + change === true && this.__startTimer(); + }, + + __updateScroll: function __updateScroll (info) { + if (this.scrollPosition !== info.position) { + this.scrollPosition = info.position; + this.__startTimer(); + } + }, + + __updateScrollSize: function __updateScrollSize (ref) { + var height = ref.height; + var width = ref.width; + + if (this.horizontal === true) { + if (this.scrollSize !== width) { + this.scrollSize = width; + this.__startTimer(); + } + } + else if (this.scrollSize !== height) { + this.scrollSize = height; + this.__startTimer(); + } + }, + + __panThumb: function __panThumb (e) { + if (e.isFirst === true) { + if (this.thumbHidden === true) { + return + } + + this.refPos = this.scrollPosition; + this.panning = true; + } + else if (this.panning !== true) { + return + } + + if (e.isFinal === true) { + this.panning = false; + } + + var multiplier = (this.scrollSize - this.containerSize) / (this.containerSize - this.thumbSize); + var distance = e.distance[this.dirProps.dist]; + var pos = this.refPos + (e.direction === this.dirProps.dir ? 1 : -1) * distance * multiplier; + + this.__setScroll(pos); + }, + + __mouseDown: function __mouseDown (evt) { + if (this.thumbHidden !== true) { + var pos = evt[("offset" + (this.horizontal === true ? 'X' : 'Y'))] - this.thumbSize / 2; + this.__setScroll(pos / this.containerSize * this.scrollSize); + + // activate thumb pan + if (this.$refs.thumb !== void 0) { + this.$refs.thumb.dispatchEvent(new MouseEvent(evt.type, evt)); + } + } + }, + + __startTimer: function __startTimer () { + var this$1 = this; + + if (this.tempShowing === true) { + clearTimeout(this.timer); + } + else { + this.tempShowing = true; + } + + this.timer = setTimeout(function () { + this$1.tempShowing = false; + }, this.delay); + + this.__emitScroll(); + }, + + __setScroll: function __setScroll (offset) { + this.$refs.target[this.dirProps.scroll] = offset; + } + }, + + render: function render (h) { + var this$1 = this; + + return h('div', { + class: this.classes, + on: cache(this, 'desk', { + mouseenter: function () { this$1.hover = true; }, + mouseleave: function () { this$1.hover = false; } + }) + }, [ + h('div', { + ref: 'target', + staticClass: 'scroll relative-position fit hide-scrollbar' + }, [ + h('div', { + staticClass: 'absolute', + style: this.mainStyle, + class: ("full-" + (this.horizontal === true ? 'height' : 'width')) + }, mergeSlot([ + h(QResizeObserver, { + on: cache(this, 'resizeIn', { resize: this.__updateScrollSize }) + }) + ], this, 'default')), + + h(QScrollObserver, { + props: { horizontal: this.horizontal }, + on: cache(this, 'scroll', { scroll: this.__updateScroll }) + }) + ]), + + h(QResizeObserver, { + on: cache(this, 'resizeOut', { resize: this.__updateContainer }) + }), + + h('div', { + staticClass: 'q-scrollarea__bar', + style: this.barStyle, + class: this.barClass, + on: cache(this, 'bar', { + mousedown: this.__mouseDown + }) + }), + + h('div', { + ref: 'thumb', + staticClass: 'q-scrollarea__thumb', + style: this.style, + class: this.thumbClass, + directives: cache(this, 'thumb#' + this.horizontal, [{ + name: 'touch-pan', + modifiers: { + vertical: this.horizontal !== true, + horizontal: this.horizontal, + prevent: true, + mouse: true, + mouseAllDir: true + }, + value: this.__panThumb + }]) + }) + ]) + }, + + created: function created () { + var this$1 = this; + + // we have lots of listeners, so + // ensure we're not emitting same info + // multiple times + this.__emitScroll = debounce(function () { + if (this$1.$listeners.scroll !== void 0) { + var info = { ref: this$1 }; + var prefix = this$1.dirProps.prefix; + + info[prefix + 'Position'] = this$1.scrollPosition; + info[prefix + 'Percentage'] = this$1.scrollPercentage; + info[prefix + 'Size'] = this$1.scrollSize; + info[prefix + 'ContainerSize'] = this$1.containerSize; + + this$1.$emit('scroll', info); + } + }, 0); + } + }); + + var aggBucketSize = 1000; + + var slice = Array.prototype.slice; + + function sumFn (acc, h) { + return acc + h + } + + function getScrollDetails ( + parent, + child, + beforeRef, + afterRef, + horizontal, + stickyStart, + stickyEnd + ) { + var + parentCalc = parent === window ? document.scrollingElement || document.documentElement : parent, + propElSize = horizontal === true ? 'offsetWidth' : 'offsetHeight', + details = { + scrollStart: 0, + scrollViewSize: -stickyStart - stickyEnd, + scrollMaxSize: 0, + offsetStart: -stickyStart, + offsetEnd: -stickyEnd + }; + + if (horizontal === true) { + if (parent === window) { + details.scrollStart = window.pageXOffset || window.scrollX || document.body.scrollLeft || 0; + details.scrollViewSize += window.innerWidth; + } + else { + details.scrollStart = parentCalc.scrollLeft; + details.scrollViewSize += parentCalc.clientWidth; + } + details.scrollMaxSize = parentCalc.scrollWidth; + } + else { + if (parent === window) { + details.scrollStart = window.pageYOffset || window.scrollY || document.body.scrollTop || 0; + details.scrollViewSize += window.innerHeight; + } + else { + details.scrollStart = parentCalc.scrollTop; + details.scrollViewSize += parentCalc.clientHeight; + } + details.scrollMaxSize = parentCalc.scrollHeight; + } + + if (beforeRef !== void 0) { + for (var el = beforeRef.previousElementSibling; el !== null; el = el.previousElementSibling) { + details.offsetStart += el[propElSize]; + } + } + if (afterRef !== void 0) { + for (var el$1 = afterRef.nextElementSibling; el$1 !== null; el$1 = el$1.nextElementSibling) { + details.offsetEnd += el$1[propElSize]; + } + } + + if (child !== parent) { + var + parentRect = parentCalc.getBoundingClientRect(), + childRect = child.getBoundingClientRect(); + + if (horizontal === true) { + details.offsetStart += childRect.left - parentRect.left; + details.offsetEnd -= childRect.width; + } + else { + details.offsetStart += childRect.top - parentRect.top; + details.offsetEnd -= childRect.height; + } + + if (parent !== window) { + details.offsetStart += details.scrollStart; + } + details.offsetEnd += details.scrollMaxSize - details.offsetStart; + } + + return details + } + + function setScroll$1 (parent, scroll, horizontal) { + if (parent === window) { + if (horizontal === true) { + window.scrollTo(scroll, window.pageYOffset || window.scrollY || document.body.scrollTop || 0); + } + else { + window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, scroll); + } + } + else { + parent[horizontal === true ? 'scrollLeft' : 'scrollTop'] = scroll; + } + } + + function sumSize (sizeAgg, size, from, to) { + if (from >= to) { return 0 } + + var + lastTo = size.length, + fromAgg = Math.floor(from / aggBucketSize), + toAgg = Math.floor((to - 1) / aggBucketSize) + 1; + + var total = sizeAgg.slice(fromAgg, toAgg).reduce(sumFn, 0); + + if (from % aggBucketSize !== 0) { + total -= size.slice(fromAgg * aggBucketSize, from).reduce(sumFn, 0); + } + if (to % aggBucketSize !== 0 && to !== lastTo) { + total -= size.slice(to, toAgg * aggBucketSize).reduce(sumFn, 0); + } + + return total + } + + var commonVirtScrollProps = { + virtualScrollSliceSize: { + type: Number, + default: 30 + }, + + virtualScrollItemSize: { + type: Number, + default: 24 + }, + + virtualScrollStickySizeStart: { + type: Number, + default: 0 + }, + + virtualScrollStickySizeEnd: { + type: Number, + default: 0 + } + }; + + var commonVirtPropsList = Object.keys(commonVirtScrollProps); + + var VirtualScroll = { + props: Object.assign({}, {virtualScrollHorizontal: Boolean}, + commonVirtScrollProps), + + data: function data () { + return { + virtualScrollSliceRange: { from: 0, to: 0 } + } + }, + + watch: { + virtualScrollHorizontal: function virtualScrollHorizontal () { + this.__setVirtualScrollSize(); + }, + + needsReset: function needsReset () { + this.reset(); + } + }, + + computed: { + needsReset: function needsReset () { + var this$1 = this; + + return ['virtualScrollItemSize', 'virtualScrollHorizontal'] + .map(function (p) { return this$1[p]; }).join(';') + } + }, + + methods: { + reset: function reset () { + this.__resetVirtualScroll(this.prevToIndex, true); + }, + + refresh: function refresh (toIndex) { + this.__resetVirtualScroll(toIndex === void 0 ? this.prevToIndex : toIndex); + }, + + scrollTo: function scrollTo (toIndex) { + var scrollEl = this.__getVirtualScrollTarget(); + + if (scrollEl === void 0 || scrollEl === null || scrollEl.nodeType === 8) { + return + } + + this.__setVirtualScrollSliceRange( + scrollEl, + getScrollDetails( + scrollEl, + this.__getVirtualScrollEl(), + this.$refs.before, + this.$refs.after, + this.virtualScrollHorizontal, + this.virtualScrollStickySizeStart, + this.virtualScrollStickySizeEnd + ), + Math.min(this.virtualScrollLength - 1, Math.max(0, parseInt(toIndex, 10) || 0)), + 0, + this.prevToIndex > -1 && toIndex > this.prevToIndex ? 'end' : 'start' + ); + }, + + __onVirtualScrollEvt: function __onVirtualScrollEvt () { + var scrollEl = this.__getVirtualScrollTarget(); + + if (scrollEl === void 0 || scrollEl === null || scrollEl.nodeType === 8) { + return + } + + var + scrollDetails = getScrollDetails( + scrollEl, + this.__getVirtualScrollEl(), + this.$refs.before, + this.$refs.after, + this.virtualScrollHorizontal, + this.virtualScrollStickySizeStart, + this.virtualScrollStickySizeEnd + ), + scrollMaxStart = scrollDetails.scrollMaxSize - Math.max(scrollDetails.scrollViewSize, scrollDetails.offsetEnd), + listLastIndex = this.virtualScrollLength - 1; + + if (this.prevScrollStart === scrollDetails.scrollStart) { + return + } + this.prevScrollStart = void 0; + + this.__updateVirtualScrollSizes(this.virtualScrollSliceRange.from); + + if (scrollMaxStart > 0 && scrollDetails.scrollStart >= scrollMaxStart) { + this.__setVirtualScrollSliceRange( + scrollEl, + scrollDetails, + this.virtualScrollLength - 1, + scrollDetails.scrollMaxSize - scrollDetails.offsetEnd - this.virtualScrollSizesAgg.reduce(sumFn, 0) + ); + + return + } + + var + toIndex = 0, + listOffset = scrollDetails.scrollStart - scrollDetails.offsetStart, + offset = listOffset; + + for (var j = 0; listOffset >= this.virtualScrollSizesAgg[j] && toIndex < listLastIndex; j++) { + listOffset -= this.virtualScrollSizesAgg[j]; + toIndex += aggBucketSize; + } + + while (listOffset > 0 && toIndex < listLastIndex) { + listOffset -= this.virtualScrollSizes[toIndex]; + if (listOffset > -scrollDetails.scrollViewSize) { + toIndex++; + offset = listOffset; + } + else { + offset = this.virtualScrollSizes[toIndex] + listOffset; + } + } + + this.__setVirtualScrollSliceRange( + scrollEl, + scrollDetails, + toIndex, + offset + ); + }, + + __setVirtualScrollSliceRange: function __setVirtualScrollSliceRange (scrollEl, scrollDetails, toIndex, offset, align) { + var this$1 = this; + + var + from = Math.max(0, Math.ceil(toIndex - (align === void 0 ? 3 : 2) * this.virtualScrollSliceSizeComputed / 6)), + to = from + this.virtualScrollSliceSizeComputed; + + if (to > this.virtualScrollLength) { + to = this.virtualScrollLength; + from = Math.max(0, to - this.virtualScrollSliceSizeComputed); + } + + var rangeChanged = from !== this.virtualScrollSliceRange.from || to !== this.virtualScrollSliceRange.to; + + if (rangeChanged === false && align === void 0) { + this.__emitScroll(toIndex); + + return + } + + if (rangeChanged === true) { + this.virtualScrollSliceRange = { from: from, to: to }; + this.virtualScrollPaddingBefore = sumSize(this.virtualScrollSizesAgg, this.virtualScrollSizes, 0, from); + this.virtualScrollPaddingAfter = sumSize(this.virtualScrollSizesAgg, this.virtualScrollSizes, to, this.virtualScrollLength); + } + + this.$nextTick(function () { + if (rangeChanged === true) { + this$1.__updateVirtualScrollSizes(from); + } + + var + posStart = this$1.virtualScrollSizes.slice(from, toIndex).reduce(sumFn, scrollDetails.offsetStart + this$1.virtualScrollPaddingBefore), + posEnd = posStart + this$1.virtualScrollSizes[toIndex]; + + var scrollPosition = posStart + offset; + + if (align !== void 0) { + scrollPosition = scrollDetails.scrollStart < posStart && posEnd < scrollDetails.scrollStart + scrollDetails.scrollViewSize + ? scrollDetails.scrollStart + : (align === 'end' ? posEnd - scrollDetails.scrollViewSize : posStart); + } + + this$1.prevScrollStart = scrollPosition; + + this$1.__setScroll( + scrollEl, + scrollPosition, + this$1.virtualScrollHorizontal + ); + + this$1.__emitScroll(toIndex); + }); + }, + + __updateVirtualScrollSizes: function __updateVirtualScrollSizes (from) { + var contentEl = this.$refs.content; + + if (contentEl !== void 0) { + var + children = slice.call(contentEl.children).filter(function (el) { return el.classList.contains('q-virtual-scroll--skip') === false; }), + childrenLength = children.length, + sizeProp = this.virtualScrollHorizontal === true ? 'offsetWidth' : 'offsetHeight'; + + var + index = from, + size, diff; + + for (var i = 0; i < childrenLength;) { + size = children[i][sizeProp]; + i++; + + while (i < childrenLength && children[i].classList.contains('q-virtual-scroll--with-prev') === true) { + size += children[i][sizeProp]; + i++; + } + + diff = size - this.virtualScrollSizes[index]; + + if (diff !== 0) { + this.virtualScrollSizes[index] += diff; + this.virtualScrollSizesAgg[Math.floor(index / aggBucketSize)] += diff; + } + + index++; + } + } + }, + + __resetVirtualScroll: function __resetVirtualScroll (toIndex, fullReset) { + var this$1 = this; + + var defaultSize = this.virtualScrollItemSize; + + if (fullReset === true || Array.isArray(this.virtualScrollSizes) === false) { + this.virtualScrollSizes = []; + } + + var oldVirtualScrollSizesLength = this.virtualScrollSizes.length; + + this.virtualScrollSizes.length = this.virtualScrollLength; + + for (var i = this.virtualScrollLength - 1; i >= oldVirtualScrollSizesLength; i--) { + this.virtualScrollSizes[i] = defaultSize; + } + + var jMax = Math.floor((this.virtualScrollLength - 1) / aggBucketSize); + this.virtualScrollSizesAgg = []; + for (var j = 0; j <= jMax; j++) { + var size = 0; + var iMax = Math.min((j + 1) * aggBucketSize, this.virtualScrollLength); + for (var i$1 = j * aggBucketSize; i$1 < iMax; i$1++) { + size += this.virtualScrollSizes[i$1]; + } + this.virtualScrollSizesAgg.push(size); + } + + this.prevToIndex = -1; + this.prevScrollStart = void 0; + + if (toIndex >= 0) { + this.__updateVirtualScrollSizes(this.virtualScrollSliceRange.from); + + this.$nextTick(function () { + this$1.scrollTo(toIndex); + }); + } + else { + this.virtualScrollPaddingBefore = sumSize(this.virtualScrollSizesAgg, this.virtualScrollSizes, 0, this.virtualScrollSliceRange.from); + this.virtualScrollPaddingAfter = sumSize(this.virtualScrollSizesAgg, this.virtualScrollSizes, this.virtualScrollSliceRange.to, this.virtualScrollLength); + + this.__onVirtualScrollEvt(); + } + }, + + __setVirtualScrollSize: function __setVirtualScrollSize () { + if (this.virtualScrollHorizontal === true) { + this.virtualScrollSliceSizeComputed = typeof window === 'undefined' + ? this.virtualScrollSliceSize + : Math.max(this.virtualScrollSliceSize, Math.ceil(window.innerWidth / this.virtualScrollItemSize * 2)); + } + else { + this.virtualScrollSliceSizeComputed = typeof window === 'undefined' + ? this.virtualScrollSliceSize + : Math.max(this.virtualScrollSliceSize, Math.ceil(window.innerHeight / this.virtualScrollItemSize * 2)); + } + }, + + __padVirtualScroll: function __padVirtualScroll (h, tag, content) { + var obj, obj$1, obj$2, obj$3; + + var paddingSize = this.virtualScrollHorizontal === true ? 'width' : 'height'; + + return [ + tag === 'tbody' + ? h(tag, { + staticClass: 'q-virtual-scroll__padding', + key: 'before', + ref: 'before' + }, [ + h('tr', [ + h('td', { + style: ( obj = {}, obj[paddingSize] = ((this.virtualScrollPaddingBefore) + "px"), obj ), + attrs: { colspan: '100%' } + }) + ]) + ]) + : h(tag, { + staticClass: 'q-virtual-scroll__padding', + key: 'before', + ref: 'before', + style: ( obj$1 = {}, obj$1[paddingSize] = ((this.virtualScrollPaddingBefore) + "px"), obj$1 ) + }), + + h(tag, { + staticClass: 'q-virtual-scroll__content', + key: 'content', + ref: 'content' + }, content), + + tag === 'tbody' + ? h(tag, { + staticClass: 'q-virtual-scroll__padding', + key: 'after', + ref: 'after' + }, [ + h('tr', [ + h('td', { + style: ( obj$2 = {}, obj$2[paddingSize] = ((this.virtualScrollPaddingAfter) + "px"), obj$2 ), + attrs: { colspan: '100%' } + }) + ]) + ]) + : h(tag, { + staticClass: 'q-virtual-scroll__padding', + key: 'after', + ref: 'after', + style: ( obj$3 = {}, obj$3[paddingSize] = ((this.virtualScrollPaddingAfter) + "px"), obj$3 ) + }) + ] + }, + + __emitScroll: function __emitScroll (index) { + if (this.prevToIndex !== index) { + this.$listeners['virtual-scroll'] !== void 0 && this.$emit('virtual-scroll', { + index: index, + from: this.virtualScrollSliceRange.from, + to: this.virtualScrollSliceRange.to - 1, + direction: index < this.prevToIndex ? 'decrease' : 'increase', + ref: this + }); + + this.prevToIndex = index; + } + } + }, + + created: function created () { + this.__setVirtualScrollSize(); + }, + + beforeMount: function beforeMount () { + this.__onVirtualScrollEvt = debounce(this.__onVirtualScrollEvt, 70); + this.__setScroll = frameDebounce(setScroll$1); + this.__setVirtualScrollSize(); + } + }; + + var validateNewValueMode = function (v) { return ['add', 'add-unique', 'toggle'].includes(v); }; + + var QSelect = Vue.extend({ + name: 'QSelect', + + mixins: [ QField, VirtualScroll, CompositionMixin, FormFieldMixin ], + + props: { + value: { + required: true + }, + + multiple: Boolean, + + displayValue: [String, Number], + displayValueSanitize: Boolean, + dropdownIcon: String, + + options: { + type: Array, + default: function () { return []; } + }, + + optionValue: [Function, String], + optionLabel: [Function, String], + optionDisable: [Function, String], + + hideSelected: Boolean, + hideDropdownIcon: Boolean, + fillInput: Boolean, + + maxValues: [Number, String], + + optionsDense: Boolean, + optionsDark: { + type: Boolean, + default: null + }, + optionsSelectedClass: String, + optionsSanitize: Boolean, + + optionsCover: Boolean, + + menuShrink: Boolean, + menuAnchor: String, + menuSelf: String, + menuOffset: Array, + + popupContentClass: String, + popupContentStyle: [String, Array, Object], + + useInput: Boolean, + useChips: Boolean, + + newValueMode: { + type: String, + validator: validateNewValueMode + }, + + mapOptions: Boolean, + emitValue: Boolean, + + inputDebounce: { + type: [Number, String], + default: 500 + }, + + inputClass: [Array, String, Object], + inputStyle: [Array, String, Object], + + tabindex: { + type: [String, Number], + default: 0 + }, + + transitionShow: String, + transitionHide: String, + + behavior: { + type: String, + validator: function (v) { return ['default', 'menu', 'dialog'].includes(v); }, + default: 'default' + } + }, + + data: function data () { + return { + menu: false, + dialog: false, + optionIndex: -1, + inputValue: '', + dialogFieldFocused: false + } + }, + + watch: { + innerValue: { + handler: function handler (val) { + this.innerValueCache = val; + + if ( + this.useInput === true && + this.fillInput === true && + this.multiple !== true && + // Prevent re-entering in filter while filtering + // Also prevent clearing inputValue while filtering + this.innerLoading !== true && + ((this.dialog !== true && this.menu !== true) || this.hasValue !== true) + ) { + this.__resetInputValue(); + if (this.dialog === true || this.menu === true) { + this.filter(''); + } + } + }, + immediate: true + }, + + fillInput: function fillInput () { + this.__resetInputValue(); + }, + + menu: function menu (show) { + this.__updateMenu(show); + } + }, + + computed: { + isOptionsDark: function isOptionsDark () { + return this.optionsDark === null + ? this.isDark + : this.optionsDark + }, + + virtualScrollLength: function virtualScrollLength () { + return Array.isArray(this.options) + ? this.options.length + : 0 + }, + + fieldClass: function fieldClass () { + return ("q-select q-field--auto-height q-select--with" + (this.useInput !== true ? 'out' : '') + "-input") + }, + + computedInputClass: function computedInputClass () { + if (this.hideSelected === true || this.innerValue.length === 0) { + return this.inputClass + } + + return this.inputClass === void 0 + ? 'q-field__input--padding' + : [this.inputClass, 'q-field__input--padding'] + }, + + menuContentClass: function menuContentClass () { + return (this.virtualScrollHorizontal === true ? 'q-virtual-scroll--horizontal' : '') + + (this.popupContentClass ? ' ' + this.popupContentClass : '') + }, + + innerValue: function innerValue () { + var this$1 = this; + + var + mapNull = this.mapOptions === true && this.multiple !== true, + val = this.value !== void 0 && (this.value !== null || mapNull === true) + ? (this.multiple === true && Array.isArray(this.value) ? this.value : [ this.value ]) + : []; + + if (this.mapOptions === true && Array.isArray(this.options) === true) { + var cache = this.mapOptions === true && this.innerValueCache !== void 0 + ? this.innerValueCache + : []; + var values = val.map(function (v) { return this$1.__getOption(v, cache); }); + + return this.value === null && mapNull === true + ? values.filter(function (v) { return v !== null; }) + : values + } + + return val + }, + + noOptions: function noOptions () { + return this.virtualScrollLength === 0 + }, + + selectedString: function selectedString () { + var this$1 = this; + + return this.innerValue + .map(function (opt) { return this$1.getOptionLabel(opt); }) + .join(', ') + }, + + sanitizeFn: function sanitizeFn () { + return this.optionsSanitize === true + ? function () { return true; } + : function (opt) { return opt !== void 0 && opt !== null && opt.sanitize === true; } + }, + + displayAsText: function displayAsText () { + return this.displayValueSanitize === true || ( + this.displayValue === void 0 && ( + this.optionsSanitize === true || + this.innerValue.some(this.sanitizeFn) + ) + ) + }, + + computedTabindex: function computedTabindex () { + return this.focused === true ? this.tabindex : -1 + }, + + selectedScope: function selectedScope () { + var this$1 = this; + + return this.innerValue.map(function (opt, i) { return ({ + index: i, + opt: opt, + sanitize: this$1.sanitizeFn(opt), + selected: true, + removeAtIndex: this$1.__removeAtIndexAndFocus, + toggleOption: this$1.toggleOption, + tabindex: this$1.computedTabindex + }); }) + }, + + optionScope: function optionScope () { + var this$1 = this; + + if (this.virtualScrollLength === 0) { + return [] + } + + var ref = this.virtualScrollSliceRange; + var from = ref.from; + var to = ref.to; + + return this.options.slice(from, to).map(function (opt, i) { + var disable = this$1.isOptionDisabled(opt) === true; + var index = from + i; + + var itemProps = { + clickable: true, + active: false, + activeClass: this$1.computedOptionsSelectedClass, + manualFocus: true, + focused: false, + disable: disable, + tabindex: -1, + dense: this$1.optionsDense, + dark: this$1.isOptionsDark + }; + + if (disable !== true) { + this$1.isOptionSelected(opt) === true && (itemProps.active = true); + this$1.optionIndex === index && (itemProps.focused = true); + } + + var itemEvents = { + click: function () { this$1.toggleOption(opt); } + }; + + if (this$1.$q.platform.is.desktop === true) { + itemEvents.mousemove = function () { this$1.setOptionIndex(index); }; + } + + return { + index: index, + opt: opt, + sanitize: this$1.sanitizeFn(opt), + selected: itemProps.active, + focused: itemProps.focused, + toggleOption: this$1.toggleOption, + setOptionIndex: this$1.setOptionIndex, + itemProps: itemProps, + itemEvents: itemEvents + } + }) + }, + + dropdownArrowIcon: function dropdownArrowIcon () { + return this.dropdownIcon !== void 0 + ? this.dropdownIcon + : this.$q.iconSet.arrow.dropdown + }, + + squaredMenu: function squaredMenu () { + return this.optionsCover === false && + this.outlined !== true && + this.standout !== true && + this.borderless !== true && + this.rounded !== true + }, + + computedOptionsSelectedClass: function computedOptionsSelectedClass () { + return this.optionsSelectedClass !== void 0 + ? this.optionsSelectedClass + : (this.color !== void 0 ? ("text-" + (this.color)) : '') + }, + + innerOptionsValue: function innerOptionsValue () { + var this$1 = this; + + return this.innerValue.map(function (opt) { return this$1.getOptionValue(opt); }) + }, + + // returns method to get value of an option; + // takes into account 'option-value' prop + getOptionValue: function getOptionValue () { + return this.__getPropValueFn('optionValue', 'value') + }, + + // returns method to get label of an option; + // takes into account 'option-label' prop + getOptionLabel: function getOptionLabel () { + return this.__getPropValueFn('optionLabel', 'label') + }, + + // returns method to tell if an option is disabled; + // takes into account 'option-disable' prop + isOptionDisabled: function isOptionDisabled () { + return this.__getPropValueFn('optionDisable', 'disable') + } + }, + + methods: { + getEmittingOptionValue: function getEmittingOptionValue (opt) { + return this.emitValue === true + ? this.getOptionValue(opt) + : opt + }, + + removeAtIndex: function removeAtIndex (index) { + if (index > -1 && index < this.innerValue.length) { + if (this.multiple === true) { + var model = this.value.slice(); + this.$emit('remove', { index: index, value: model.splice(index, 1) }); + this.$emit('input', model); + } + else { + this.$emit('input', null); + } + } + }, + + __removeAtIndexAndFocus: function __removeAtIndexAndFocus (index) { + this.removeAtIndex(index); + this.__focus(); + }, + + add: function add (opt, unique) { + var val = this.getEmittingOptionValue(opt); + + if (this.multiple !== true) { + this.fillInput === true && this.updateInputValue( + this.getOptionLabel(opt), + true, + true + ); + + this.$emit('input', val); + return + } + + if (this.innerValue.length === 0) { + this.$emit('add', { index: 0, value: val }); + this.$emit('input', this.multiple === true ? [ val ] : val); + return + } + + if (unique === true && this.isOptionSelected(opt) === true) { + return + } + + if (this.maxValues !== void 0 && this.value.length >= this.maxValues) { + return + } + + var model = this.value.slice(); + + this.$emit('add', { index: model.length, value: val }); + model.push(val); + this.$emit('input', model); + }, + + toggleOption: function toggleOption (opt, keepOpen) { + if (this.editable !== true || opt === void 0 || this.isOptionDisabled(opt) === true) { + return + } + + var optValue = this.getOptionValue(opt); + + if (this.multiple !== true) { + this.$refs.target !== void 0 && this.$refs.target.focus(); + + if (keepOpen !== true) { + this.updateInputValue( + this.fillInput === true ? this.getOptionLabel(opt) : '', + true, + true + ); + + this.hidePopup(); + } + + if (isDeepEqual(this.getOptionValue(this.innerValue), optValue) !== true) { + this.$emit('input', this.emitValue === true ? optValue : opt); + } + return + } + + (this.hasDialog !== true || this.dialogFieldFocused === true) && this.__focus(); + + this.__selectInputText(); + + if (this.innerValue.length === 0) { + var val = this.emitValue === true ? optValue : opt; + this.$emit('add', { index: 0, value: val }); + this.$emit('input', this.multiple === true ? [ val ] : val); + return + } + + var + model = this.value.slice(), + index = this.innerOptionsValue.findIndex(function (v) { return isDeepEqual(v, optValue); }); + + if (index > -1) { + this.$emit('remove', { index: index, value: model.splice(index, 1) }); + } + else { + if (this.maxValues !== void 0 && model.length >= this.maxValues) { + return + } + + var val$1 = this.emitValue === true ? optValue : opt; + + this.$emit('add', { index: model.length, value: val$1 }); + model.push(val$1); + } + + this.$emit('input', model); + }, + + setOptionIndex: function setOptionIndex (index) { + if (this.$q.platform.is.desktop !== true) { return } + + var val = index > -1 && index < this.virtualScrollLength + ? index + : -1; + + if (this.optionIndex !== val) { + this.optionIndex = val; + } + }, + + moveOptionSelection: function moveOptionSelection (offset, skipInputValue) { + if ( offset === void 0 ) offset = 1; + + if (this.menu === true) { + var index = this.optionIndex; + do { + index = normalizeToInterval( + index + offset, + -1, + this.virtualScrollLength - 1 + ); + } + while (index !== -1 && index !== this.optionIndex && this.isOptionDisabled(this.options[index]) === true) + + if (this.optionIndex !== index) { + this.setOptionIndex(index); + this.scrollTo(index); + + if (skipInputValue !== true && index >= 0 && this.useInput === true && this.fillInput === true) { + var inputValue = this.getOptionLabel(this.options[index]); + if (this.inputValue !== inputValue) { + this.inputValue = inputValue; + } + } + } + } + }, + + __getOption: function __getOption (value, innerValueCache) { + var this$1 = this; + + var fn = function (opt) { return isDeepEqual(this$1.getOptionValue(opt), value); }; + return this.options.find(fn) || innerValueCache.find(fn) || value + }, + + __getPropValueFn: function __getPropValueFn (propName, defaultVal) { + var val = this[propName] !== void 0 + ? this[propName] + : defaultVal; + + return typeof val === 'function' + ? val + : function (opt) { return Object(opt) === opt && val in opt + ? opt[val] + : opt; } + }, + + isOptionSelected: function isOptionSelected (opt) { + var val = this.getOptionValue(opt); + return this.innerOptionsValue.find(function (v) { return isDeepEqual(v, val); }) !== void 0 + }, + + __selectInputText: function __selectInputText () { + if (this.useInput === true && this.$refs.target !== void 0) { + this.$refs.target.select(); + } + }, + + __onTargetKeyup: function __onTargetKeyup (e) { + // if ESC and we have an opened menu + // then stop propagation (might be caught by a QDialog + // and so it will also close the QDialog, which is wrong) + if (isKeyCode(e, 27) === true && this.menu === true) { + stop(e); + // on ESC we need to close the dialog also + this.hidePopup(); + } + + this.$emit('keyup', e); + }, + + __onTargetAutocomplete: function __onTargetAutocomplete (e) { + var this$1 = this; + + var ref = e.target; + var value = ref.value; + + e.target.value = ''; + + if ( + e.keyCode === void 0 && + typeof value === 'string' && + value.length > 0 + ) { + var needle = value.toLocaleLowerCase(); + + var fn = function (opt) { return this$1.getOptionValue(opt).toLocaleLowerCase() === needle; }; + var option = this.options.find(fn); + + if (option !== null) { + this.innerValue.indexOf(option) === -1 && this.toggleOption(option); + } + else { + fn = function (opt) { return this$1.getOptionLabel(opt).toLocaleLowerCase() === needle; }; + option = this.options.find(fn); + + if (option !== null) { + this.innerValue.indexOf(option) === -1 && this.toggleOption(option); + } + } + } + }, + + __onTargetKeypress: function __onTargetKeypress (e) { + this.$emit('keypress', e); + }, + + __onTargetKeydown: function __onTargetKeydown (e) { + var this$1 = this; + + this.$emit('keydown', e); + + if (shouldIgnoreKey(e) === true) { + return + } + + var newValueModeValid = this.inputValue.length > 0 && + (this.newValueMode !== void 0 || this.$listeners['new-value'] !== void 0); + var tabShouldSelect = e.shiftKey !== true && + this.multiple !== true && + (this.optionIndex > -1 || newValueModeValid === true); + + // escape + if (e.keyCode === 27) { + prevent(e); // prevent clearing the inputValue + return + } + + // tab + if (e.keyCode === 9 && tabShouldSelect === false) { + this.__closeMenu(); + return + } + + if (e.target === void 0 || e.target.id !== this.targetUid) { return } + + // down + if ( + e.keyCode === 40 && + this.innerLoading !== true && + this.menu === false + ) { + stopAndPrevent(e); + this.showPopup(); + return + } + + // backspace + if ( + e.keyCode === 8 && + this.multiple === true && + this.inputValue.length === 0 && + Array.isArray(this.value) + ) { + this.removeAtIndex(this.value.length - 1); + return + } + + // up, down + if (e.keyCode === 38 || e.keyCode === 40) { + stopAndPrevent(e); + this.moveOptionSelection(e.keyCode === 38 ? -1 : 1, this.multiple); + } + + var optionsLength = this.virtualScrollLength; + + // keyboard search when not having use-input + if (optionsLength > 0 && this.useInput !== true && e.keyCode >= 48 && e.keyCode <= 90) { + this.menu !== true && this.showPopup(e); + + // clear search buffer if expired + if (this.searchBuffer === void 0 || this.searchBufferExp < Date.now()) { + this.searchBuffer = ''; + } + + var + char = String.fromCharCode(e.keyCode).toLocaleLowerCase(), + keyRepeat = this.searchBuffer.length === 1 && this.searchBuffer[0] === char; + + this.searchBufferExp = Date.now() + 1500; + if (keyRepeat === false) { + this.searchBuffer += char; + } + + var searchRe = new RegExp('^' + this.searchBuffer.split('').join('.*'), 'i'); + + var index = this.optionIndex; + + if (keyRepeat === true || searchRe.test(this.getOptionLabel(this.options[index])) !== true) { + do { + index = normalizeToInterval(index + 1, -1, optionsLength - 1); + } + while (index !== this.optionIndex && ( + this.isOptionDisabled(this.options[index]) === true || + searchRe.test(this.getOptionLabel(this.options[index])) !== true + )) + } + + if (this.optionIndex !== index) { + this.$nextTick(function () { + this$1.setOptionIndex(index); + this$1.scrollTo(index); + + if (index >= 0 && this$1.useInput === true && this$1.fillInput === true) { + var inputValue = this$1.getOptionLabel(this$1.options[index]); + if (this$1.inputValue !== inputValue) { + this$1.inputValue = inputValue; + } + } + }); + } + + return + } + + // enter, space (when not using use-input), or tab (when not using multiple and option selected) + // same target is checked above + if ( + e.keyCode !== 13 && + (this.useInput === true || e.keyCode !== 32) && + (tabShouldSelect === false || e.keyCode !== 9) + ) { return } + + e.keyCode !== 9 && stopAndPrevent(e); + + if (this.optionIndex > -1 && this.optionIndex < optionsLength) { + this.toggleOption(this.options[this.optionIndex]); + return + } + + if (newValueModeValid === true) { + var done = function (val, mode) { + if (mode) { + if (validateNewValueMode(mode) !== true) { + console.error('QSelect: invalid new value mode - ' + mode); + return + } + } + else { + mode = this$1.newValueMode; + } + + if (val === void 0 || val === null) { + return + } + + this$1.updateInputValue('', this$1.multiple !== true, true); + + this$1[mode === 'toggle' ? 'toggleOption' : 'add']( + val, + mode === 'add-unique' + ); + + if (this$1.multiple !== true) { + this$1.$refs.target !== void 0 && this$1.$refs.target.focus(); + this$1.hidePopup(); + } + }; + + if (this.$listeners['new-value'] !== void 0) { + this.$emit('new-value', this.inputValue, done); + } + else { + done(this.inputValue); + } + + if (this.multiple !== true) { + return + } + } + + if (this.menu === true) { + this.__closeMenu(); + } + else if (this.innerLoading !== true) { + this.showPopup(); + } + }, + + __getVirtualScrollEl: function __getVirtualScrollEl () { + return this.hasDialog === true + ? this.$refs.menuContent + : ( + this.$refs.menu !== void 0 && this.$refs.menu.__portal !== void 0 + ? this.$refs.menu.__portal.$el + : void 0 + ) + }, + + __getVirtualScrollTarget: function __getVirtualScrollTarget () { + return this.__getVirtualScrollEl() + }, + + __getSelection: function __getSelection (h, fromDialog) { + var this$1 = this; + var obj; + + if (this.hideSelected === true) { + return fromDialog !== true && this.hasDialog === true + ? [ + h('span', { + domProps: { + textContent: this.inputValue + } + }) + ] + : [] + } + + if (this.$scopedSlots['selected-item'] !== void 0) { + return this.selectedScope.map(function (scope) { return this$1.$scopedSlots['selected-item'](scope); }).slice() + } + + if (this.$scopedSlots.selected !== void 0) { + return this.$scopedSlots.selected().slice() + } + + if (this.useChips === true) { + return this.selectedScope.map(function (scope, i) { + var obj; + + return h(QChip, { + key: 'option-' + i, + props: { + removable: this$1.isOptionDisabled(scope.opt) !== true, + dense: true, + textColor: this$1.color, + tabindex: this$1.computedTabindex + }, + on: cache(this$1, 'rem#' + i, { + remove: function remove () { scope.removeAtIndex(i); } + }) + }, [ + h('span', { + domProps: ( obj = {}, obj[scope.sanitize === true ? 'textContent' : 'innerHTML'] = this$1.getOptionLabel(scope.opt), obj ) + }) + ]); + }) + } + + return [ + h('span', { + domProps: ( obj = {}, obj[this.displayAsText ? 'textContent' : 'innerHTML'] = this.displayValue !== void 0 + ? this.displayValue + : this.selectedString, obj ) + }) + ] + }, + + __getControl: function __getControl (h, fromDialog) { + var child = this.__getSelection(h, fromDialog); + + if (this.useInput === true && (fromDialog === true || this.hasDialog === false)) { + child.push(this.__getInput(h, fromDialog)); + } + else if (this.editable === true) { + var isShadowField = this.hasDialog === true && fromDialog !== true && this.menu === true; + + if (fromDialog !== true) { + child.push(h('input', { + staticClass: 'q-select__autocomplete-input no-outline', + attrs: { + autocomplete: this.$attrs.autocomplete, + tabindex: -1 + }, + on: cache(this, 'acpl', { + keyup: this.__onTargetAutocomplete + }) + })); + } + + child.push(h('div', { + // there can be only one (when dialog is opened the control in dialog should be target) + ref: isShadowField === true ? void 0 : 'target', + staticClass: 'no-outline', + attrs: { + tabindex: this.tabindex, + id: isShadowField === true ? void 0 : this.targetUid + }, + on: cache(this, 'ctrl', { + keydown: this.__onTargetKeydown, + keyup: this.__onTargetKeyup, + keypress: this.__onTargetKeypress + }) + })); + } + + if (this.nameProp !== void 0 && this.disable !== true && this.innerOptionsValue.length > 0) { + var opts = this.innerOptionsValue.map(function (value) { return h('option', { + attrs: { value: value, selected: true } + }); }); + + child.push( + h('select', { + staticClass: 'hidden', + attrs: { + name: this.nameProp, + multiple: this.multiple + } + }, opts) + ); + } + + return h('div', { staticClass: 'q-field__native row items-center', attrs: this.$attrs }, child) + }, + + __getOptions: function __getOptions (h) { + var this$1 = this; + + if (this.menu !== true) { + return void 0 + } + + var fn = this.$scopedSlots.option !== void 0 + ? this.$scopedSlots.option + : function (scope) { + var obj; + + return h(QItem, { + key: scope.index, + props: scope.itemProps, + on: scope.itemEvents + }, [ + h(QItemSection, [ + h(QItemLabel, { + domProps: ( obj = {}, obj[scope.sanitize === true ? 'textContent' : 'innerHTML'] = this$1.getOptionLabel(scope.opt), obj ) + }) + ]) + ]); + }; + + var options = this.__padVirtualScroll(h, 'div', this.optionScope.map(fn)); + + if (this.$scopedSlots['before-options'] !== void 0) { + options = this.$scopedSlots['before-options']().concat(options); + } + + return mergeSlot(options, this, 'after-options') + }, + + __getInnerAppend: function __getInnerAppend (h) { + return this.loading !== true && this.innerLoading !== true && this.hideDropdownIcon !== true + ? [ + h(QIcon, { + staticClass: 'q-select__dropdown-icon', + props: { name: this.dropdownArrowIcon } + }) + ] + : null + }, + + __getInput: function __getInput (h, fromDialog) { + var on = { + input: this.__onInput, + // Safari < 10.2 & UIWebView doesn't fire compositionend when + // switching focus before confirming composition choice + // this also fixes the issue where some browsers e.g. iOS Chrome + // fires "change" instead of "input" on autocomplete. + change: this.__onChange, + keydown: this.__onTargetKeydown, + keyup: this.__onTargetKeyup, + keypress: this.__onTargetKeypress, + focus: this.__selectInputText + }; + + on.compositionstart = on.compositionupdate = on.compositionend = this.__onComposition; + + if (this.hasDialog === true) { + on.click = stop; + } + + return h('input', { + ref: 'target', + staticClass: 'q-field__input q-placeholder col', + style: this.inputStyle, + class: this.computedInputClass, + domProps: { value: this.inputValue !== void 0 ? this.inputValue : '' }, + attrs: Object.assign({}, {type: 'search'}, + this.$attrs, + {tabindex: this.tabindex, + 'data-autofocus': fromDialog === true ? false : this.autofocus, + id: this.targetUid, + disabled: this.disable === true, + readonly: this.readonly === true}), + on: cache(this, 'inp#' + this.hasDialog, on) + }) + }, + + __onChange: function __onChange (e) { + this.__onComposition(e); + }, + + __onInput: function __onInput (e) { + var this$1 = this; + + clearTimeout(this.inputTimer); + + if (e && e.target && e.target.composing === true) { + return + } + + this.inputValue = e.target.value || ''; + // mark it here as user input so that if updateInputValue is called + // before filter is called the indicator is reset + this.userInputValue = true; + + if ( + this.focused !== true && + (this.hasDialog !== true || this.dialogFieldFocused === true) + ) { + this.__focus(); + } + + if (this.$listeners.filter !== void 0) { + this.inputTimer = setTimeout(function () { + this$1.filter(this$1.inputValue); + }, this.inputDebounce); + } + }, + + updateInputValue: function updateInputValue (val, noFiltering, internal) { + this.userInputValue = internal !== true; + + if (this.useInput === true) { + if (this.inputValue !== val) { + this.inputValue = val; + } + + noFiltering !== true && this.filter(val); + } + }, + + filter: function filter (val) { + var this$1 = this; + + if (this.$listeners.filter === void 0 || this.focused !== true) { + return + } + + if (this.innerLoading === true) { + this.$emit('filter-abort'); + } + else { + this.innerLoading = true; + } + + if ( + val !== '' && + this.multiple !== true && + this.innerValue.length > 0 && + this.userInputValue !== true && + val === this.getOptionLabel(this.innerValue[0]) + ) { + val = ''; + } + + var filterId = setTimeout(function () { + this$1.menu === true && (this$1.menu = false); + }, 10); + clearTimeout(this.filterId); + this.filterId = filterId; + + this.$emit( + 'filter', + val, + function (fn, afterFn) { + if (this$1.focused === true && this$1.filterId === filterId) { + clearTimeout(this$1.filterId); + + typeof fn === 'function' && fn(); + + this$1.$nextTick(function () { + this$1.innerLoading = false; + if (this$1.menu === true) { + this$1.__updateMenu(true); + } + else { + this$1.menu = true; + } + + typeof afterFn === 'function' && this$1.$nextTick(function () { afterFn(this$1); }); + }); + } + }, + function () { + if (this$1.focused === true && this$1.filterId === filterId) { + clearTimeout(this$1.filterId); + this$1.innerLoading = false; + } + this$1.menu === true && (this$1.menu = false); + } + ); + }, + + __getControlEvents: function __getControlEvents () { + var this$1 = this; + + var focusout = function (e) { + this$1.__onControlFocusout(e, function () { + this$1.__resetInputValue(); + this$1.__closeMenu(); + }); + }; + + return { + focusin: this.__onControlFocusin, + focusout: focusout, + 'popup-show': this.__onControlPopupShow, + 'popup-hide': function (e) { + e !== void 0 && stop(e); + this$1.$emit('popup-hide', e); + this$1.hasPopupOpen = false; + focusout(e); + }, + click: function (e) { + if (this$1.hasDialog !== true) { + // label from QField will propagate click on the input (except IE) + if ( + (this$1.useInput === true && e.target.classList.contains('q-field__input') !== true) || + (this$1.useInput !== true && e.target.classList.contains('no-outline') === true) + ) { + return + } + + if (this$1.menu === true) { + this$1.__closeMenu(); + this$1.$refs.target !== void 0 && this$1.$refs.target.focus(); + return + } + } + + this$1.showPopup(e); + } + } + }, + + __getControlChild: function __getControlChild (h) { + if ( + this.editable !== false && ( + this.dialog === true || // dialog always has menu displayed, so need to render it + this.noOptions !== true || + this.$scopedSlots['no-option'] !== void 0 + ) + ) { + return this[("__get" + (this.hasDialog === true ? 'Dialog' : 'Menu'))](h) + } + }, + + __getMenu: function __getMenu (h) { + var child = this.noOptions === true + ? ( + this.$scopedSlots['no-option'] !== void 0 + ? this.$scopedSlots['no-option']({ inputValue: this.inputValue }) + : null + ) + : this.__getOptions(h); + + return h(QMenu, { + ref: 'menu', + props: { + value: this.menu, + fit: this.menuShrink !== true, + cover: this.optionsCover === true && this.noOptions !== true && this.useInput !== true, + anchor: this.menuAnchor, + self: this.menuSelf, + offset: this.menuOffset, + contentClass: this.menuContentClass, + contentStyle: this.popupContentStyle, + dark: this.isOptionsDark, + noParentEvent: true, + noRefocus: true, + noFocus: true, + square: this.squaredMenu, + transitionShow: this.transitionShow, + transitionHide: this.transitionHide, + separateClosePopup: true + }, + on: cache(this, 'menu', { + '&scroll': this.__onVirtualScrollEvt, + 'before-hide': this.__closeMenu + }) + }, child) + }, + + __onDialogFieldFocus: function __onDialogFieldFocus (e) { + stop(e); + this.$refs.target !== void 0 && this.$refs.target.focus(); + this.dialogFieldFocused = true; + window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, 0); + }, + + __onDialogFieldBlur: function __onDialogFieldBlur (e) { + var this$1 = this; + + stop(e); + this.$nextTick(function () { + this$1.dialogFieldFocused = false; + }); + }, + + __getDialog: function __getDialog (h) { + var this$1 = this; + + var content = [ + h(QField, { + staticClass: ("col-auto " + (this.fieldClass)), + props: Object.assign({}, this.$props, + {for: this.targetUid, + dark: this.isOptionsDark, + square: true, + loading: this.innerLoading, + filled: true, + stackLabel: this.inputValue.length > 0}), + on: Object.assign({}, this.$listeners, + {focus: this.__onDialogFieldFocus, + blur: this.__onDialogFieldBlur}), + scopedSlots: Object.assign({}, this.$scopedSlots, + {rawControl: function () { return this$1.__getControl(h, true); }, + before: void 0, + after: void 0}) + }) + ]; + + this.menu === true && content.push( + h('div', { + ref: 'menuContent', + staticClass: 'scroll', + class: this.menuContentClass, + style: this.popupContentStyle, + on: cache(this, 'virtMenu', { + click: prevent, + '&scroll': this.__onVirtualScrollEvt + }) + }, ( + this.noOptions === true + ? ( + this.$scopedSlots['no-option'] !== void 0 + ? this.$scopedSlots['no-option']({ inputValue: this.inputValue }) + : null + ) + : this.__getOptions(h) + )) + ); + + return h(QDialog, { + ref: 'dialog', + props: { + value: this.dialog, + dark: this.isOptionsDark, + position: this.useInput === true ? 'top' : void 0, + transitionShow: this.transitionShowComputed, + transitionHide: this.transitionHide + }, + on: cache(this, 'dialog', { + 'before-hide': this.__onDialogBeforeHide, + hide: this.__onDialogHide, + show: this.__onDialogShow + }) + }, [ + h('div', { + staticClass: 'q-select__dialog' + + (this.isOptionsDark === true ? ' q-select__dialog--dark q-dark' : '') + + (this.dialogFieldFocused === true ? ' q-select__dialog--focused' : '') + }, content) + ]) + }, + + __onDialogBeforeHide: function __onDialogBeforeHide () { + this.$refs.dialog.__refocusTarget = this.$el.querySelector('.q-field__native > [tabindex]:last-child'); + this.focused = false; + }, + + __onDialogHide: function __onDialogHide (e) { + this.hidePopup(); + this.$emit('blur', e); + this.__resetInputValue(); + }, + + __onDialogShow: function __onDialogShow () { + var el = document.activeElement; + // IE can have null document.activeElement + if ( + (el === null || el.id !== this.targetUid) && + this.$refs.target !== el && + this.$refs.target !== void 0 + ) { + this.$refs.target.focus(); + } + }, + + __closeMenu: function __closeMenu () { + if (this.dialog === true) { + return + } + + if (this.menu === true) { + this.menu = false; + } + + if (this.focused === false) { + clearTimeout(this.filterId); + this.filterId = void 0; + + if (this.innerLoading === true) { + this.$emit('filter-abort'); + this.innerLoading = false; + } + } + }, + + showPopup: function showPopup (e) { + if (this.hasDialog === true) { + this.__onControlFocusin(e); + this.dialog = true; + } + else { + this.__focus(); + } + + if (this.$listeners.filter !== void 0) { + this.filter(this.inputValue); + } + else if (this.noOptions !== true || this.$scopedSlots['no-option'] !== void 0) { + this.menu = true; + } + }, + + hidePopup: function hidePopup () { + this.dialog = false; + this.__closeMenu(); + }, + + __resetInputValue: function __resetInputValue () { + this.useInput === true && this.updateInputValue( + this.multiple !== true && this.fillInput === true && this.innerValue.length > 0 + ? this.getOptionLabel(this.innerValue[0]) || '' + : '', + true, + true + ); + }, + + __updateMenu: function __updateMenu (show) { + var this$1 = this; + + var optionIndex = -1; + + if (show === true) { + if (this.innerValue.length > 0) { + var val = this.getOptionValue(this.innerValue[0]); + optionIndex = this.options.findIndex(function (v) { return isDeepEqual(this$1.getOptionValue(v), val); }); + } + + this.__resetVirtualScroll(optionIndex); + } + + this.setOptionIndex(optionIndex); + }, + + __onPreRender: function __onPreRender () { + this.hasDialog = this.$q.platform.is.mobile !== true && this.behavior !== 'dialog' + ? false + : this.behavior !== 'menu' && ( + this.useInput === true + ? this.$scopedSlots['no-option'] !== void 0 || this.$listeners.filter !== void 0 || this.noOptions === false + : true + ); + + this.transitionShowComputed = this.hasDialog === true && this.useInput === true && this.$q.platform.is.ios === true + ? 'fade' + : this.transitionShow; + }, + + __onPostRender: function __onPostRender () { + if (this.dialog === false && this.$refs.menu !== void 0) { + this.$refs.menu.updatePosition(); + } + }, + + updateMenuPosition: function updateMenuPosition () { + this.__onPostRender(); + } + }, + + beforeDestroy: function beforeDestroy () { + clearTimeout(this.inputTimer); + } + }); + + var skeletonTypes = [ + 'text', 'rect', 'circle', + 'QBtn', 'QBadge', 'QChip', 'QToolbar', + 'QCheckbox', 'QRadio', 'QToggle', + 'QSlider', 'QRange', 'QInput', + 'QAvatar' + ]; + + var skeletonAnimations = [ + 'wave', 'pulse', 'pulse-x', 'pulse-y', 'fade', 'blink', 'none' + ]; + + var QSkeleton = Vue.extend({ + name: 'QSkeleton', + + mixins: [ DarkMixin, TagMixin ], + + props: { + type: { + type: String, + validator: function (v) { return skeletonTypes.includes(v); }, + default: 'rect' + }, + + animation: { + type: String, + validator: function (v) { return skeletonAnimations.includes(v); }, + default: 'wave' + }, + + square: Boolean, + bordered: Boolean, + + size: String, + width: String, + height: String + }, + + computed: { + style: function style () { + return this.size !== void 0 + ? { width: this.size, height: this.size } + : { width: this.width, height: this.height } + }, + + classes: function classes () { + return "q-skeleton--" + (this.isDark === true ? 'dark' : 'light') + " q-skeleton--type-" + (this.type) + + (this.animation !== 'none' ? (" q-skeleton--anim-" + (this.animation)) : '') + + (this.square === true ? ' q-skeleton--square' : '') + + (this.bordered === true ? ' q-skeleton--bordered' : '') + } + }, + + render: function render (h) { + return h(this.tag, { + staticClass: 'q-skeleton', + class: this.classes, + style: this.style, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + var slotsDef = [ + ['left', 'center', 'start', 'width'], + ['right', 'center', 'end', 'width'], + ['top', 'start', 'center', 'height'], + ['bottom', 'end', 'center', 'height'] + ]; + + var QSlideItem = Vue.extend({ + name: 'QSlideItem', + + mixins: [ DarkMixin ], + + props: { + leftColor: String, + rightColor: String, + topColor: String, + bottomColor: String + }, + + directives: { + TouchPan: TouchPan + }, + + computed: { + langDir: function langDir () { + return this.$q.lang.rtl === true + ? { left: 'right', right: 'left' } + : { left: 'left', right: 'right' } + } + }, + + methods: { + reset: function reset () { + this.$refs.content.style.transform = "translate(0,0)"; + }, + + __pan: function __pan (evt) { + var this$1 = this; + + var node = this.$refs.content; + + if (evt.isFirst) { + this.__dir = null; + this.__size = { left: 0, right: 0, top: 0, bottom: 0 }; + this.__scale = 0; + + node.classList.add('no-transition'); + + slotsDef.forEach(function (slot) { + if (this$1.$scopedSlots[slot[0]] !== void 0) { + var node = this$1.$refs[slot[0] + 'Content']; + node.style.transform = "scale(1)"; + this$1.__size[slot[0]] = node.getBoundingClientRect()[slot[3]]; + } + }); + + this.__axis = (evt.direction === 'up' || evt.direction === 'down') + ? 'Y' + : 'X'; + } + else if (evt.isFinal) { + node.classList.remove('no-transition'); + + if (this.__scale === 1) { + node.style.transform = "translate" + (this.__axis) + "(" + (this.__dir * 100) + "%)"; + + this.timer = setTimeout(function () { + this$1.$emit(this$1.__showing, { reset: this$1.reset }); + this$1.$emit('action', { side: this$1.__showing, reset: this$1.reset }); + }, 230); + } + else { + node.style.transform = "translate(0,0)"; + } + + return + } + else { + evt.direction = this.__axis === 'X' + ? evt.offset.x < 0 ? 'left' : 'right' + : evt.offset.y < 0 ? 'up' : 'down'; + } + + if ( + (this.$scopedSlots.left === void 0 && evt.direction === this.langDir.right) || + (this.$scopedSlots.right === void 0 && evt.direction === this.langDir.left) || + (this.$scopedSlots.top === void 0 && evt.direction === 'down') || + (this.$scopedSlots.bottom === void 0 && evt.direction === 'up') + ) { + node.style.transform = "translate(0,0)"; + return + } + + var showing, dir, dist; + + if (this.__axis === 'X') { + dir = evt.direction === 'left' ? -1 : 1; + showing = dir === 1 ? this.langDir.left : this.langDir.right; + dist = evt.distance.x; + } + else { + dir = evt.direction === 'up' ? -2 : 2; + showing = dir === 2 ? 'top' : 'bottom'; + dist = evt.distance.y; + } + + if (this.__dir !== null && Math.abs(dir) !== Math.abs(this.__dir)) { + return + } + + if (this.__dir !== dir) { + ['left', 'right', 'top', 'bottom'].forEach(function (d) { + if (this$1.$refs[d] !== void 0) { + this$1.$refs[d].style.visibility = showing === d + ? 'visible' + : 'hidden'; + } + }); + this.__showing = showing; + this.__dir = dir; + } + + this.__scale = Math.max(0, Math.min(1, (dist - 40) / this.__size[showing])); + + node.style.transform = "translate" + (this.__axis) + "(" + (dist * dir / Math.abs(dir)) + "px)"; + this.$refs[(showing + "Content")].style.transform = "scale(" + (this.__scale) + ")"; + } + }, + + render: function render (h) { + var this$1 = this; + + var + content = [], + left = this.$scopedSlots[this.langDir.right] !== void 0, + right = this.$scopedSlots[this.langDir.left] !== void 0, + up = this.$scopedSlots.bottom !== void 0, + down = this.$scopedSlots.top !== void 0; + + slotsDef.forEach(function (slot) { + var dir = slot[0]; + + if (this$1.$scopedSlots[dir] !== void 0) { + content.push( + h('div', { + ref: dir, + class: "q-slide-item__" + dir + " absolute-full row no-wrap items-" + (slot[1]) + " justify-" + (slot[2]) + + (this$1[dir + 'Color'] !== void 0 ? (" bg-" + (this$1[dir + 'Color'])) : '') + }, [ + h('div', { ref: dir + 'Content' }, this$1.$scopedSlots[dir]()) + ]) + ); + } + }); + + content.push( + h('div', { + ref: 'content', + key: 'content', + staticClass: 'q-slide-item__content', + directives: left === true || right === true || up === true || down === true ? [{ + name: 'touch-pan', + value: this.__pan, + modifiers: { + left: left, + right: right, + up: up, + down: down, + prevent: true, + stop: true, + mouse: true + } + }] : null + }, slot(this, 'default')) + ); + + return h('div', { + staticClass: 'q-slide-item q-item-type overflow-hidden', + class: this.isDark === true ? "q-slide-item--dark q-dark" : '', + on: this.$listeners + }, content) + }, + + beforeDestroy: function beforeDestroy () { + clearTimeout(this.timer); + } + }); + + var QSpace = Vue.extend({ + name: 'QSpace', + + render: function render (h) { + return h('div', { + staticClass: 'q-space', + on: this.$listeners + }) + } + }); + + var QSpinnerAudio = Vue.extend({ + name: 'QSpinnerAudio', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'fill': 'currentColor', + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 55 80', + 'xmlns': 'http://www.w3.org/2000/svg' + } + }, [ + h('g', { + attrs: { + 'transform': 'matrix(1 0 0 -1 0 80)' + } + }, [ + h('rect', { + attrs: { + 'width': '10', + 'height': '20', + 'rx': '3' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'height', + 'begin': '0s', + 'dur': '4.3s', + 'values': '20;45;57;80;64;32;66;45;64;23;66;13;64;56;34;34;2;23;76;79;20', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('rect', { + attrs: { + 'x': '15', + 'width': '10', + 'height': '80', + 'rx': '3' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'height', + 'begin': '0s', + 'dur': '2s', + 'values': '80;55;33;5;75;23;73;33;12;14;60;80', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('rect', { + attrs: { + 'x': '30', + 'width': '10', + 'height': '50', + 'rx': '3' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'height', + 'begin': '0s', + 'dur': '1.4s', + 'values': '50;34;78;23;56;23;34;76;80;54;21;50', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('rect', { + attrs: { + 'x': '45', + 'width': '10', + 'height': '30', + 'rx': '3' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'height', + 'begin': '0s', + 'dur': '2s', + 'values': '30;45;13;80;56;72;45;76;34;23;67;30', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]) + ]) + ]) + } + }); + + var QSpinnerBall = Vue.extend({ + name: 'QSpinnerBall', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'stroke': 'currentColor', + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 57 57', + 'xmlns': 'http://www.w3.org/2000/svg' + } + }, [ + h('g', { + attrs: { + 'transform': 'translate(1 1)', + 'stroke-width': '2', + 'fill': 'none', + 'fill-rule': 'evenodd' + } + }, [ + h('circle', { + attrs: { + 'cx': '5', + 'cy': '50', + 'r': '5' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'cy', + 'begin': '0s', + 'dur': '2.2s', + 'values': '50;5;50;50', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'cx', + 'begin': '0s', + 'dur': '2.2s', + 'values': '5;27;49;5', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '27', + 'cy': '5', + 'r': '5' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'cy', + 'begin': '0s', + 'dur': '2.2s', + 'from': '5', + 'to': '5', + 'values': '5;50;50;5', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'cx', + 'begin': '0s', + 'dur': '2.2s', + 'from': '27', + 'to': '27', + 'values': '27;49;5;27', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '49', + 'cy': '50', + 'r': '5' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'cy', + 'begin': '0s', + 'dur': '2.2s', + 'values': '50;50;5;50', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'cx', + 'from': '49', + 'to': '49', + 'begin': '0s', + 'dur': '2.2s', + 'values': '49;5;27;49', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]) + ]) + ]) + } + }); + + var QSpinnerBars = Vue.extend({ + name: 'QSpinnerBars', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'fill': 'currentColor', + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 135 140', + 'xmlns': 'http://www.w3.org/2000/svg' + } + }, [ + h('rect', { + attrs: { + 'y': '10', + 'width': '15', + 'height': '120', + 'rx': '6' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'height', + 'begin': '0.5s', + 'dur': '1s', + 'values': '120;110;100;90;80;70;60;50;40;140;120', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'y', + 'begin': '0.5s', + 'dur': '1s', + 'values': '10;15;20;25;30;35;40;45;50;0;10', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('rect', { + attrs: { + 'x': '30', + 'y': '10', + 'width': '15', + 'height': '120', + 'rx': '6' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'height', + 'begin': '0.25s', + 'dur': '1s', + 'values': '120;110;100;90;80;70;60;50;40;140;120', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'y', + 'begin': '0.25s', + 'dur': '1s', + 'values': '10;15;20;25;30;35;40;45;50;0;10', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('rect', { + attrs: { + 'x': '60', + 'width': '15', + 'height': '140', + 'rx': '6' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'height', + 'begin': '0s', + 'dur': '1s', + 'values': '120;110;100;90;80;70;60;50;40;140;120', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'y', + 'begin': '0s', + 'dur': '1s', + 'values': '10;15;20;25;30;35;40;45;50;0;10', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('rect', { + attrs: { + 'x': '90', + 'y': '10', + 'width': '15', + 'height': '120', + 'rx': '6' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'height', + 'begin': '0.25s', + 'dur': '1s', + 'values': '120;110;100;90;80;70;60;50;40;140;120', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'y', + 'begin': '0.25s', + 'dur': '1s', + 'values': '10;15;20;25;30;35;40;45;50;0;10', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('rect', { + attrs: { + 'x': '120', + 'y': '10', + 'width': '15', + 'height': '120', + 'rx': '6' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'height', + 'begin': '0.5s', + 'dur': '1s', + 'values': '120;110;100;90;80;70;60;50;40;140;120', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'y', + 'begin': '0.5s', + 'dur': '1s', + 'values': '10;15;20;25;30;35;40;45;50;0;10', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]) + ]) + } + }); + + var QSpinnerComment = Vue.extend({ + name: 'QSpinnerComment', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'width': this.cSize, + 'height': this.cSize, + 'xmlns': 'http://www.w3.org/2000/svg', + 'viewBox': '0 0 100 100', + 'preserveAspectRatio': 'xMidYMid' + } + }, [ + h('rect', { + attrs: { + 'x': '0', + 'y': '0', + 'width': '100', + 'height': '100', + 'fill': 'none' + } + }), + h('path', { + attrs: { + 'd': 'M78,19H22c-6.6,0-12,5.4-12,12v31c0,6.6,5.4,12,12,12h37.2c0.4,3,1.8,5.6,3.7,7.6c2.4,2.5,5.1,4.1,9.1,4 c-1.4-2.1-2-7.2-2-10.3c0-0.4,0-0.8,0-1.3h8c6.6,0,12-5.4,12-12V31C90,24.4,84.6,19,78,19z', + 'fill': 'currentColor' + } + }), + h('circle', { + attrs: { + 'cx': '30', + 'cy': '47', + 'r': '5', + 'fill': '#fff' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'opacity', + 'from': '0', + 'to': '1', + 'values': '0;1;1', + 'keyTimes': '0;0.2;1', + 'dur': '1s', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '50', + 'cy': '47', + 'r': '5', + 'fill': '#fff' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'opacity', + 'from': '0', + 'to': '1', + 'values': '0;0;1;1', + 'keyTimes': '0;0.2;0.4;1', + 'dur': '1s', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '70', + 'cy': '47', + 'r': '5', + 'fill': '#fff' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'opacity', + 'from': '0', + 'to': '1', + 'values': '0;0;1;1', + 'keyTimes': '0;0.4;0.6;1', + 'dur': '1s', + 'repeatCount': 'indefinite' + } + }) + ]) + ]) + } + }); + + var QSpinnerCube = Vue.extend({ + name: 'QSpinnerCube', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'width': this.cSize, + 'height': this.cSize, + 'xmlns': 'http://www.w3.org/2000/svg', + 'viewBox': '0 0 100 100', + 'preserveAspectRatio': 'xMidYMid' + } + }, [ + h('rect', { + attrs: { + 'x': '0', + 'y': '0', + 'width': '100', + 'height': '100', + 'fill': 'none' + } + }), + h('g', { + attrs: { + 'transform': 'translate(25 25)' + } + }, [ + h('rect', { + attrs: { + 'x': '-20', + 'y': '-20', + 'width': '40', + 'height': '40', + 'fill': 'currentColor', + 'opacity': '0.9' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'scale', + 'from': '1.5', + 'to': '1', + 'repeatCount': 'indefinite', + 'begin': '0s', + 'dur': '1s', + 'calcMode': 'spline', + 'keySplines': '0.2 0.8 0.2 0.8', + 'keyTimes': '0;1' + } + }) + ]) + ]), + h('g', { + attrs: { + 'transform': 'translate(75 25)' + } + }, [ + h('rect', { + attrs: { + 'x': '-20', + 'y': '-20', + 'width': '40', + 'height': '40', + 'fill': 'currentColor', + 'opacity': '0.8' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'scale', + 'from': '1.5', + 'to': '1', + 'repeatCount': 'indefinite', + 'begin': '0.1s', + 'dur': '1s', + 'calcMode': 'spline', + 'keySplines': '0.2 0.8 0.2 0.8', + 'keyTimes': '0;1' + } + }) + ]) + ]), + h('g', { + attrs: { + 'transform': 'translate(25 75)' + } + }, [ + h('rect', { + staticClass: 'cube', + attrs: { + 'x': '-20', + 'y': '-20', + 'width': '40', + 'height': '40', + 'fill': 'currentColor', + 'opacity': '0.7' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'scale', + 'from': '1.5', + 'to': '1', + 'repeatCount': 'indefinite', + 'begin': '0.3s', + 'dur': '1s', + 'calcMode': 'spline', + 'keySplines': '0.2 0.8 0.2 0.8', + 'keyTimes': '0;1' + } + }) + ]) + ]), + h('g', { + attrs: { + 'transform': 'translate(75 75)' + } + }, [ + h('rect', { + staticClass: 'cube', + attrs: { + 'x': '-20', + 'y': '-20', + 'width': '40', + 'height': '40', + 'fill': 'currentColor', + 'opacity': '0.6' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'scale', + 'from': '1.5', + 'to': '1', + 'repeatCount': 'indefinite', + 'begin': '0.2s', + 'dur': '1s', + 'calcMode': 'spline', + 'keySplines': '0.2 0.8 0.2 0.8', + 'keyTimes': '0;1' + } + }) + ]) + ]) + ]) + } + }); + + var QSpinnerDots = Vue.extend({ + name: 'QSpinnerDots', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'fill': 'currentColor', + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 120 30', + 'xmlns': 'http://www.w3.org/2000/svg' + } + }, [ + h('circle', { + attrs: { + 'cx': '15', + 'cy': '15', + 'r': '15' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'r', + 'from': '15', + 'to': '15', + 'begin': '0s', + 'dur': '0.8s', + 'values': '15;9;15', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'fill-opacity', + 'from': '1', + 'to': '1', + 'begin': '0s', + 'dur': '0.8s', + 'values': '1;.5;1', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '60', + 'cy': '15', + 'r': '9', + 'fill-opacity': '.3' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'r', + 'from': '9', + 'to': '9', + 'begin': '0s', + 'dur': '0.8s', + 'values': '9;15;9', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'fill-opacity', + 'from': '.5', + 'to': '.5', + 'begin': '0s', + 'dur': '0.8s', + 'values': '.5;1;.5', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '105', + 'cy': '15', + 'r': '15' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'r', + 'from': '15', + 'to': '15', + 'begin': '0s', + 'dur': '0.8s', + 'values': '15;9;15', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'fill-opacity', + 'from': '1', + 'to': '1', + 'begin': '0s', + 'dur': '0.8s', + 'values': '1;.5;1', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]) + ]) + } + }); + + var QSpinnerFacebook = Vue.extend({ + name: 'QSpinnerFacebook', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 100 100', + 'xmlns': 'http://www.w3.org/2000/svg', + 'preserveAspectRatio': 'xMidYMid' + } + }, [ + h('g', { + attrs: { + 'transform': 'translate(20 50)' + } + }, [ + h('rect', { + attrs: { + 'x': '-10', + 'y': '-30', + 'width': '20', + 'height': '60', + 'fill': 'currentColor', + 'opacity': '0.6' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'scale', + 'from': '2', + 'to': '1', + 'begin': '0s', + 'repeatCount': 'indefinite', + 'dur': '1s', + 'calcMode': 'spline', + 'keySplines': '0.1 0.9 0.4 1', + 'keyTimes': '0;1', + 'values': '2;1' + } + }) + ]) + ]), + h('g', { + attrs: { + 'transform': 'translate(50 50)' + } + }, [ + h('rect', { + attrs: { + 'x': '-10', + 'y': '-30', + 'width': '20', + 'height': '60', + 'fill': 'currentColor', + 'opacity': '0.8' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'scale', + 'from': '2', + 'to': '1', + 'begin': '0.1s', + 'repeatCount': 'indefinite', + 'dur': '1s', + 'calcMode': 'spline', + 'keySplines': '0.1 0.9 0.4 1', + 'keyTimes': '0;1', + 'values': '2;1' + } + }) + ]) + ]), + h('g', { + attrs: { + 'transform': 'translate(80 50)' + } + }, [ + h('rect', { + attrs: { + 'x': '-10', + 'y': '-30', + 'width': '20', + 'height': '60', + 'fill': 'currentColor', + 'opacity': '0.9' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'scale', + 'from': '2', + 'to': '1', + 'begin': '0.2s', + 'repeatCount': 'indefinite', + 'dur': '1s', + 'calcMode': 'spline', + 'keySplines': '0.1 0.9 0.4 1', + 'keyTimes': '0;1', + 'values': '2;1' + } + }) + ]) + ]) + ]) + } + }); + + var QSpinnerGears = Vue.extend({ + name: 'QSpinnerGears', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 100 100', + 'preserveAspectRatio': 'xMidYMid', + 'xmlns': 'http://www.w3.org/2000/svg' + } + }, [ + h('g', { + attrs: { + 'transform': 'translate(-20,-20)' + } + }, [ + h('path', { + attrs: { + 'd': 'M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z', + 'fill': 'currentColor' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'rotate', + 'from': '90 50 50', + 'to': '0 50 50', + 'dur': '1s', + 'repeatCount': 'indefinite' + } + }) + ]) + ]), + h('g', { + attrs: { + 'transform': 'translate(20,20) rotate(15 50 50)' + } + }, [ + h('path', { + attrs: { + 'd': 'M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z', + 'fill': 'currentColor' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'rotate', + 'from': '0 50 50', + 'to': '90 50 50', + 'dur': '1s', + 'repeatCount': 'indefinite' + } + }) + ]) + ]) + ]) + } + }); + + var QSpinnerGrid = Vue.extend({ + name: 'QSpinnerGrid', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'fill': 'currentColor', + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 105 105', + 'xmlns': 'http://www.w3.org/2000/svg' + } + }, [ + h('circle', { + attrs: { + 'cx': '12.5', + 'cy': '12.5', + 'r': '12.5' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'fill-opacity', + 'begin': '0s', + 'dur': '1s', + 'values': '1;.2;1', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '12.5', + 'cy': '52.5', + 'r': '12.5', + 'fill-opacity': '.5' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'fill-opacity', + 'begin': '100ms', + 'dur': '1s', + 'values': '1;.2;1', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '52.5', + 'cy': '12.5', + 'r': '12.5' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'fill-opacity', + 'begin': '300ms', + 'dur': '1s', + 'values': '1;.2;1', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '52.5', + 'cy': '52.5', + 'r': '12.5' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'fill-opacity', + 'begin': '600ms', + 'dur': '1s', + 'values': '1;.2;1', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '92.5', + 'cy': '12.5', + 'r': '12.5' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'fill-opacity', + 'begin': '800ms', + 'dur': '1s', + 'values': '1;.2;1', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '92.5', + 'cy': '52.5', + 'r': '12.5' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'fill-opacity', + 'begin': '400ms', + 'dur': '1s', + 'values': '1;.2;1', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '12.5', + 'cy': '92.5', + 'r': '12.5' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'fill-opacity', + 'begin': '700ms', + 'dur': '1s', + 'values': '1;.2;1', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '52.5', + 'cy': '92.5', + 'r': '12.5' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'fill-opacity', + 'begin': '500ms', + 'dur': '1s', + 'values': '1;.2;1', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '92.5', + 'cy': '92.5', + 'r': '12.5' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'fill-opacity', + 'begin': '200ms', + 'dur': '1s', + 'values': '1;.2;1', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]) + ]) + } + }); + + var QSpinnerHearts = Vue.extend({ + name: 'QSpinnerHearts', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'fill': 'currentColor', + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 140 64', + 'xmlns': 'http://www.w3.org/2000/svg' + } + }, [ + h('path', { + attrs: { + 'd': 'M30.262 57.02L7.195 40.723c-5.84-3.976-7.56-12.06-3.842-18.063 3.715-6 11.467-7.65 17.306-3.68l4.52 3.76 2.6-5.274c3.716-6.002 11.47-7.65 17.304-3.68 5.84 3.97 7.56 12.054 3.842 18.062L34.49 56.118c-.897 1.512-2.793 1.915-4.228.9z', + 'fill-opacity': '.5' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'fill-opacity', + 'begin': '0s', + 'dur': '1.4s', + 'values': '0.5;1;0.5', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('path', { + attrs: { + 'd': 'M105.512 56.12l-14.44-24.272c-3.716-6.008-1.996-14.093 3.843-18.062 5.835-3.97 13.588-2.322 17.306 3.68l2.6 5.274 4.52-3.76c5.84-3.97 13.593-2.32 17.308 3.68 3.718 6.003 1.998 14.088-3.842 18.064L109.74 57.02c-1.434 1.014-3.33.61-4.228-.9z', + 'fill-opacity': '.5' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'fill-opacity', + 'begin': '0.7s', + 'dur': '1.4s', + 'values': '0.5;1;0.5', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('path', { + attrs: { + 'd': 'M67.408 57.834l-23.01-24.98c-5.864-6.15-5.864-16.108 0-22.248 5.86-6.14 15.37-6.14 21.234 0L70 16.168l4.368-5.562c5.863-6.14 15.375-6.14 21.235 0 5.863 6.14 5.863 16.098 0 22.247l-23.007 24.98c-1.43 1.556-3.757 1.556-5.188 0z' + } + }) + ]) + } + }); + + var QSpinnerHourglass = Vue.extend({ + name: 'QSpinnerHourglass', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 100 100', + 'preserveAspectRatio': 'xMidYMid', + 'xmlns': 'http://www.w3.org/2000/svg' + } + }, [ + h('g', [ + h('path', { + staticClass: 'glass', + attrs: { + 'fill': 'none', + 'stroke': 'currentColor', + 'stroke-width': '5', + 'stroke-miterlimit': '10', + 'd': 'M58.4,51.7c-0.9-0.9-1.4-2-1.4-2.3s0.5-0.4,1.4-1.4 C70.8,43.8,79.8,30.5,80,15.5H70H30H20c0.2,15,9.2,28.1,21.6,32.3c0.9,0.9,1.4,1.2,1.4,1.5s-0.5,1.6-1.4,2.5 C29.2,56.1,20.2,69.5,20,85.5h10h40h10C79.8,69.5,70.8,55.9,58.4,51.7z' + } + }), + h('clipPath', { + attrs: { + 'id': 'uil-hourglass-clip1' + } + }, [ + h('rect', { + staticClass: 'clip', + attrs: { + 'x': '15', + 'y': '20', + 'width': '70', + 'height': '25' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'height', + 'from': '25', + 'to': '0', + 'dur': '1s', + 'repeatCount': 'indefinite', + 'values': '25;0;0', + 'keyTimes': '0;0.5;1' + } + }), + h('animate', { + attrs: { + 'attributeName': 'y', + 'from': '20', + 'to': '45', + 'dur': '1s', + 'repeatCount': 'indefinite', + 'values': '20;45;45', + 'keyTimes': '0;0.5;1' + } + }) + ]) + ]), + h('clipPath', { + attrs: { + 'id': 'uil-hourglass-clip2' + } + }, [ + h('rect', { + staticClass: 'clip', + attrs: { + 'x': '15', + 'y': '55', + 'width': '70', + 'height': '25' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'height', + 'from': '0', + 'to': '25', + 'dur': '1s', + 'repeatCount': 'indefinite', + 'values': '0;25;25', + 'keyTimes': '0;0.5;1' + } + }), + h('animate', { + attrs: { + 'attributeName': 'y', + 'from': '80', + 'to': '55', + 'dur': '1s', + 'repeatCount': 'indefinite', + 'values': '80;55;55', + 'keyTimes': '0;0.5;1' + } + }) + ]) + ]), + h('path', { + staticClass: 'sand', + attrs: { + 'd': 'M29,23c3.1,11.4,11.3,19.5,21,19.5S67.9,34.4,71,23H29z', + 'clip-path': 'url(#uil-hourglass-clip1)', + 'fill': 'currentColor' + } + }), + h('path', { + staticClass: 'sand', + attrs: { + 'd': 'M71.6,78c-3-11.6-11.5-20-21.5-20s-18.5,8.4-21.5,20H71.6z', + 'clip-path': 'url(#uil-hourglass-clip2)', + 'fill': 'currentColor' + } + }), + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'rotate', + 'from': '0 50 50', + 'to': '180 50 50', + 'repeatCount': 'indefinite', + 'dur': '1s', + 'values': '0 50 50;0 50 50;180 50 50', + 'keyTimes': '0;0.7;1' + } + }) + ]) + ]) + } + }); + + var QSpinnerInfinity = Vue.extend({ + name: 'QSpinnerInfinity', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 100 100', + 'preserveAspectRatio': 'xMidYMid' + } + }, [ + h('path', { + attrs: { + 'd': 'M24.3,30C11.4,30,5,43.3,5,50s6.4,20,19.3,20c19.3,0,32.1-40,51.4-40C88.6,30,95,43.3,95,50s-6.4,20-19.3,20C56.4,70,43.6,30,24.3,30z', + 'fill': 'none', + 'stroke': 'currentColor', + 'stroke-width': '8', + 'stroke-dasharray': '10.691205342610678 10.691205342610678', + 'stroke-dashoffset': '0' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'stroke-dashoffset', + 'from': '0', + 'to': '21.382410685221355', + 'begin': '0', + 'dur': '2s', + 'repeatCount': 'indefinite', + 'fill': 'freeze' + } + }) + ]) + ]) + } + }); + + var QSpinnerIos = Vue.extend({ + name: 'QSpinnerIos', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'width': this.cSize, + 'height': this.cSize, + 'stroke': 'currentColor', + 'fill': 'currentColor', + 'viewBox': '0 0 64 64' + } + }, [ + h('g', { + attrs: { + 'stroke-width': '4', + 'stroke-linecap': 'round' + } + }, [ + h('line', { + attrs: { + 'y1': '17', + 'y2': '29', + 'transform': 'translate(32,32) rotate(180)' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'dur': '750ms', + 'values': '1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1', + 'repeatCount': 'indefinite' + } + }) + ]), + h('line', { + attrs: { + 'y1': '17', + 'y2': '29', + 'transform': 'translate(32,32) rotate(210)' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'dur': '750ms', + 'values': '0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0', + 'repeatCount': 'indefinite' + } + }) + ]), + h('line', { + attrs: { + 'y1': '17', + 'y2': '29', + 'transform': 'translate(32,32) rotate(240)' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'dur': '750ms', + 'values': '.1;0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1', + 'repeatCount': 'indefinite' + } + }) + ]), + h('line', { + attrs: { + 'y1': '17', + 'y2': '29', + 'transform': 'translate(32,32) rotate(270)' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'dur': '750ms', + 'values': '.15;.1;0;1;.85;.7;.65;.55;.45;.35;.25;.15', + 'repeatCount': 'indefinite' + } + }) + ]), + h('line', { + attrs: { + 'y1': '17', + 'y2': '29', + 'transform': 'translate(32,32) rotate(300)' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'dur': '750ms', + 'values': '.25;.15;.1;0;1;.85;.7;.65;.55;.45;.35;.25', + 'repeatCount': 'indefinite' + } + }) + ]), + h('line', { + attrs: { + 'y1': '17', + 'y2': '29', + 'transform': 'translate(32,32) rotate(330)' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'dur': '750ms', + 'values': '.35;.25;.15;.1;0;1;.85;.7;.65;.55;.45;.35', + 'repeatCount': 'indefinite' + } + }) + ]), + h('line', { + attrs: { + 'y1': '17', + 'y2': '29', + 'transform': 'translate(32,32) rotate(0)' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'dur': '750ms', + 'values': '.45;.35;.25;.15;.1;0;1;.85;.7;.65;.55;.45', + 'repeatCount': 'indefinite' + } + }) + ]), + h('line', { + attrs: { + 'y1': '17', + 'y2': '29', + 'transform': 'translate(32,32) rotate(30)' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'dur': '750ms', + 'values': '.55;.45;.35;.25;.15;.1;0;1;.85;.7;.65;.55', + 'repeatCount': 'indefinite' + } + }) + ]), + h('line', { + attrs: { + 'y1': '17', + 'y2': '29', + 'transform': 'translate(32,32) rotate(60)' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'dur': '750ms', + 'values': '.65;.55;.45;.35;.25;.15;.1;0;1;.85;.7;.65', + 'repeatCount': 'indefinite' + } + }) + ]), + h('line', { + attrs: { + 'y1': '17', + 'y2': '29', + 'transform': 'translate(32,32) rotate(90)' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'dur': '750ms', + 'values': '.7;.65;.55;.45;.35;.25;.15;.1;0;1;.85;.7', + 'repeatCount': 'indefinite' + } + }) + ]), + h('line', { + attrs: { + 'y1': '17', + 'y2': '29', + 'transform': 'translate(32,32) rotate(120)' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'dur': '750ms', + 'values': '.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1;.85', + 'repeatCount': 'indefinite' + } + }) + ]), + h('line', { + attrs: { + 'y1': '17', + 'y2': '29', + 'transform': 'translate(32,32) rotate(150)' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'dur': '750ms', + 'values': '1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1', + 'repeatCount': 'indefinite' + } + }) + ]) + ]) + ]) + } + }); + + var QSpinnerOval = Vue.extend({ + name: 'QSpinnerOval', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'stroke': 'currentColor', + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 38 38', + 'xmlns': 'http://www.w3.org/2000/svg' + } + }, [ + h('g', { + attrs: { + 'transform': 'translate(1 1)', + 'stroke-width': '2', + 'fill': 'none', + 'fill-rule': 'evenodd' + } + }, [ + h('circle', { + attrs: { + 'stroke-opacity': '.5', + 'cx': '18', + 'cy': '18', + 'r': '18' + } + }), + h('path', { + attrs: { + 'd': 'M36 18c0-9.94-8.06-18-18-18' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'rotate', + 'from': '0 18 18', + 'to': '360 18 18', + 'dur': '1s', + 'repeatCount': 'indefinite' + } + }) + ]) + ]) + ]) + } + }); + + var QSpinnerPie = Vue.extend({ + name: 'QSpinnerPie', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 100 100', + 'preserveAspectRatio': 'xMidYMid', + 'xmlns': 'http://www.w3.org/2000/svg' + } + }, [ + h('path', { + attrs: { + 'd': 'M0 50A50 50 0 0 1 50 0L50 50L0 50', + 'fill': 'currentColor', + 'opacity': '0.5' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'rotate', + 'from': '0 50 50', + 'to': '360 50 50', + 'dur': '0.8s', + 'repeatCount': 'indefinite' + } + }) + ]), + h('path', { + attrs: { + 'd': 'M50 0A50 50 0 0 1 100 50L50 50L50 0', + 'fill': 'currentColor', + 'opacity': '0.5' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'rotate', + 'from': '0 50 50', + 'to': '360 50 50', + 'dur': '1.6s', + 'repeatCount': 'indefinite' + } + }) + ]), + h('path', { + attrs: { + 'd': 'M100 50A50 50 0 0 1 50 100L50 50L100 50', + 'fill': 'currentColor', + 'opacity': '0.5' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'rotate', + 'from': '0 50 50', + 'to': '360 50 50', + 'dur': '2.4s', + 'repeatCount': 'indefinite' + } + }) + ]), + h('path', { + attrs: { + 'd': 'M50 100A50 50 0 0 1 0 50L50 50L50 100', + 'fill': 'currentColor', + 'opacity': '0.5' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'rotate', + 'from': '0 50 50', + 'to': '360 50 50', + 'dur': '3.2s', + 'repeatCount': 'indefinite' + } + }) + ]) + ]) + } + }); + + var QSpinnerPuff = Vue.extend({ + name: 'QSpinnerPuff', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'stroke': 'currentColor', + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 44 44', + 'xmlns': 'http://www.w3.org/2000/svg' + } + }, [ + h('g', { + attrs: { + 'fill': 'none', + 'fill-rule': 'evenodd', + 'stroke-width': '2' + } + }, [ + h('circle', { + attrs: { + 'cx': '22', + 'cy': '22', + 'r': '1' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'r', + 'begin': '0s', + 'dur': '1.8s', + 'values': '1; 20', + 'calcMode': 'spline', + 'keyTimes': '0; 1', + 'keySplines': '0.165, 0.84, 0.44, 1', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'begin': '0s', + 'dur': '1.8s', + 'values': '1; 0', + 'calcMode': 'spline', + 'keyTimes': '0; 1', + 'keySplines': '0.3, 0.61, 0.355, 1', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '22', + 'cy': '22', + 'r': '1' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'r', + 'begin': '-0.9s', + 'dur': '1.8s', + 'values': '1; 20', + 'calcMode': 'spline', + 'keyTimes': '0; 1', + 'keySplines': '0.165, 0.84, 0.44, 1', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'begin': '-0.9s', + 'dur': '1.8s', + 'values': '1; 0', + 'calcMode': 'spline', + 'keyTimes': '0; 1', + 'keySplines': '0.3, 0.61, 0.355, 1', + 'repeatCount': 'indefinite' + } + }) + ]) + ]) + ]) + } + }); + + var QSpinnerRadio = Vue.extend({ + name: 'QSpinnerRadio', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 100 100', + 'preserveAspectRatio': 'xMidYMid', + 'xmlns': 'http://www.w3.org/2000/svg' + } + }, [ + h('g', { + attrs: { + 'transform': 'scale(0.55)' + } + }, [ + h('circle', { + attrs: { + 'cx': '30', + 'cy': '150', + 'r': '30', + 'fill': 'currentColor' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'opacity', + 'from': '0', + 'to': '1', + 'dur': '1s', + 'begin': '0', + 'repeatCount': 'indefinite', + 'keyTimes': '0;0.5;1', + 'values': '0;1;1' + } + }) + ]), + h('path', { + attrs: { + 'd': 'M90,150h30c0-49.7-40.3-90-90-90v30C63.1,90,90,116.9,90,150z', + 'fill': 'currentColor' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'opacity', + 'from': '0', + 'to': '1', + 'dur': '1s', + 'begin': '0.1', + 'repeatCount': 'indefinite', + 'keyTimes': '0;0.5;1', + 'values': '0;1;1' + } + }) + ]), + h('path', { + attrs: { + 'd': 'M150,150h30C180,67.2,112.8,0,30,0v30C96.3,30,150,83.7,150,150z', + 'fill': 'currentColor' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'opacity', + 'from': '0', + 'to': '1', + 'dur': '1s', + 'begin': '0.2', + 'repeatCount': 'indefinite', + 'keyTimes': '0;0.5;1', + 'values': '0;1;1' + } + }) + ]) + ]) + ]) + } + }); + + var QSpinnerRings = Vue.extend({ + name: 'QSpinnerRings', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'stroke': 'currentColor', + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 45 45', + 'xmlns': 'http://www.w3.org/2000/svg' + } + }, [ + h('g', { + attrs: { + 'fill': 'none', + 'fill-rule': 'evenodd', + 'transform': 'translate(1 1)', + 'stroke-width': '2' + } + }, [ + h('circle', { + attrs: { + 'cx': '22', + 'cy': '22', + 'r': '6' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'r', + 'begin': '1.5s', + 'dur': '3s', + 'values': '6;22', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'begin': '1.5s', + 'dur': '3s', + 'values': '1;0', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'stroke-width', + 'begin': '1.5s', + 'dur': '3s', + 'values': '2;0', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '22', + 'cy': '22', + 'r': '6' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'r', + 'begin': '3s', + 'dur': '3s', + 'values': '6;22', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'stroke-opacity', + 'begin': '3s', + 'dur': '3s', + 'values': '1;0', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }), + h('animate', { + attrs: { + 'attributeName': 'stroke-width', + 'begin': '3s', + 'dur': '3s', + 'values': '2;0', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'cx': '22', + 'cy': '22', + 'r': '8' + } + }, [ + h('animate', { + attrs: { + 'attributeName': 'r', + 'begin': '0s', + 'dur': '1.5s', + 'values': '6;1;2;3;4;5;6', + 'calcMode': 'linear', + 'repeatCount': 'indefinite' + } + }) + ]) + ]) + ]) + } + }); + + var QSpinnerTail = Vue.extend({ + name: 'QSpinnerTail', + + mixins: [mixin], + + render: function render (h) { + return h('svg', { + staticClass: 'q-spinner', + class: this.classes, + on: this.$listeners, + attrs: { + focusable: 'false' /* needed for IE11 */, + 'width': this.cSize, + 'height': this.cSize, + 'viewBox': '0 0 38 38', + 'xmlns': 'http://www.w3.org/2000/svg' + } + }, [ + h('defs', [ + h('linearGradient', { + attrs: { + 'x1': '8.042%', + 'y1': '0%', + 'x2': '65.682%', + 'y2': '23.865%', + 'id': 'a' + } + }, [ + h('stop', { + attrs: { + 'stop-color': 'currentColor', + 'stop-opacity': '0', + 'offset': '0%' + } + }), + h('stop', { + attrs: { + 'stop-color': 'currentColor', + 'stop-opacity': '.631', + 'offset': '63.146%' + } + }), + h('stop', { + attrs: { + 'stop-color': 'currentColor', + 'offset': '100%' + } + }) + ]) + ]), + h('g', { + attrs: { + 'transform': 'translate(1 1)', + 'fill': 'none', + 'fill-rule': 'evenodd' + } + }, [ + h('path', { + attrs: { + 'd': 'M36 18c0-9.94-8.06-18-18-18', + 'stroke': 'url(#a)', + 'stroke-width': '2' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'rotate', + 'from': '0 18 18', + 'to': '360 18 18', + 'dur': '0.9s', + 'repeatCount': 'indefinite' + } + }) + ]), + h('circle', { + attrs: { + 'fill': 'currentColor', + 'cx': '36', + 'cy': '18', + 'r': '1' + } + }, [ + h('animateTransform', { + attrs: { + 'attributeName': 'transform', + 'type': 'rotate', + 'from': '0 18 18', + 'to': '360 18 18', + 'dur': '0.9s', + 'repeatCount': 'indefinite' + } + }) + ]) + ]) + ]) + } + }); + + var QSplitter = Vue.extend({ + name: 'QSplitter', + + mixins: [ DarkMixin ], + + directives: { + TouchPan: TouchPan + }, + + props: { + value: { + type: Number, + required: true + }, + reverse: Boolean, + unit: { + type: String, + default: '%', + validator: function (v) { return [ '%', 'px' ].includes(v); } + }, + + limits: { + type: Array, + validator: function (v) { + if (v.length !== 2) { return false } + if (typeof v[0] !== 'number' || typeof v[1] !== 'number') { return false } + return v[0] >= 0 && v[0] <= v[1] + } + }, + + emitImmediately: Boolean, + + horizontal: Boolean, + disable: Boolean, + + beforeClass: [Array, String, Object], + afterClass: [Array, String, Object], + + separatorClass: [Array, String, Object], + separatorStyle: [Array, String, Object] + }, + + watch: { + value: { + immediate: true, + handler: function handler (v) { + this.__normalize(v, this.computedLimits); + } + }, + + limits: { + deep: true, + handler: function handler () { + var this$1 = this; + + this.$nextTick(function () { + this$1.__normalize(this$1.value, this$1.computedLimits); + }); + } + } + }, + + computed: { + classes: function classes () { + return (this.horizontal === true ? 'column' : 'row') + + " q-splitter--" + (this.horizontal === true ? 'horizontal' : 'vertical') + + " q-splitter--" + (this.disable === true ? 'disabled' : 'workable') + + (this.isDark === true ? ' q-splitter--dark' : '') + }, + + prop: function prop () { + return this.horizontal === true ? 'height' : 'width' + }, + + side: function side () { + return this.reverse !== true ? 'before' : 'after' + }, + + computedLimits: function computedLimits () { + return this.limits !== void 0 + ? this.limits + : (this.unit === '%' ? [ 10, 90 ] : [ 50, Infinity ]) + }, + + styles: function styles () { + var obj, obj$1; + + return ( obj$1 = {}, obj$1[this.side] = ( obj = {}, obj[this.prop] = this.__getCSSValue(this.value), obj ), obj$1 ) + } + }, + + methods: { + __pan: function __pan (evt) { + if (evt.isFirst === true) { + var size = this.$el.getBoundingClientRect()[this.prop]; + + this.__dir = this.horizontal === true ? 'up' : 'left'; + this.__maxValue = this.unit === '%' ? 100 : size; + this.__value = Math.min(this.__maxValue, this.computedLimits[1], Math.max(this.computedLimits[0], this.value)); + this.__multiplier = (this.reverse !== true ? 1 : -1) * + (this.horizontal === true ? 1 : (this.$q.lang.rtl === true ? -1 : 1)) * + (this.unit === '%' ? (size === 0 ? 0 : 100 / size) : 1); + + this.$el.classList.add('q-splitter--active'); + return + } + + if (evt.isFinal === true) { + if (this.__normalized !== this.value) { + this.$emit('input', this.__normalized); + } + + this.$el.classList.remove('q-splitter--active'); + return + } + + var val = this.__value + + this.__multiplier * + (evt.direction === this.__dir ? -1 : 1) * + evt.distance[this.horizontal === true ? 'y' : 'x']; + + this.__normalized = Math.min(this.__maxValue, this.computedLimits[1], Math.max(this.computedLimits[0], val)); + + this.$refs[this.side].style[this.prop] = this.__getCSSValue(this.__normalized); + + if (this.emitImmediately === true && this.value !== this.__normalized) { + this.$emit('input', this.__normalized); + } + }, + + __normalize: function __normalize (val, limits) { + if (val < limits[0]) { + this.$emit('input', limits[0]); + } + else if (val > limits[1]) { + this.$emit('input', limits[1]); + } + }, + + __getCSSValue: function __getCSSValue (value) { + return (this.unit === '%' ? value : Math.round(value)) + this.unit + } + }, + + render: function render (h) { + var child = [ + h('div', { + ref: 'before', + staticClass: 'q-splitter__panel q-splitter__before' + (this.reverse === true ? ' col' : ''), + style: this.styles.before, + class: this.beforeClass, + on: cache(this, 'stop', { input: stop }) + }, slot(this, 'before')), + + h('div', { + staticClass: 'q-splitter__separator', + style: this.separatorStyle, + class: this.separatorClass + }, [ + h('div', { + staticClass: 'absolute-full q-splitter__separator-area', + directives: this.disable === true ? void 0 : cache(this, 'dir#' + this.horizontal, [{ + name: 'touch-pan', + value: this.__pan, + modifiers: { + horizontal: this.horizontal !== true, + vertical: this.horizontal, + prevent: true, + stop: true, + mouse: true, + mouseAllDir: true + } + }]) + }, slot(this, 'separator')) + ]), + + h('div', { + ref: 'after', + staticClass: 'q-splitter__panel q-splitter__after' + (this.reverse === true ? '' : ' col'), + style: this.styles.after, + class: this.afterClass, + on: cache(this, 'stop', { input: stop }) + }, slot(this, 'after')) + ]; + + return h('div', { + staticClass: 'q-splitter no-wrap', + class: this.classes, + on: this.$listeners + }, mergeSlot(child, this, 'default')) + } + }); + + var StepHeader = Vue.extend({ + name: 'StepHeader', + + directives: { + Ripple: Ripple + }, + + props: { + stepper: {}, + step: {} + }, + + computed: { + isActive: function isActive () { + return this.stepper.value === this.step.name + }, + + isDisable: function isDisable () { + var opt = this.step.disable; + return opt === true || opt === '' + }, + + isError: function isError () { + var opt = this.step.error; + return opt === true || opt === '' + }, + + isDone: function isDone () { + var opt = this.step.done; + return !this.isDisable && (opt === true || opt === '') + }, + + headerNav: function headerNav () { + var + opt = this.step.headerNav, + nav = opt === true || opt === '' || opt === void 0; + + return !this.isDisable && this.stepper.headerNav && (this.isActive || nav) + }, + + hasPrefix: function hasPrefix () { + return this.step.prefix && !this.isActive && !this.isError && !this.isDone + }, + + icon: function icon () { + if (this.isActive) { + return this.step.activeIcon || this.stepper.activeIcon || this.$q.iconSet.stepper.active + } + if (this.isError) { + return this.step.errorIcon || this.stepper.errorIcon || this.$q.iconSet.stepper.error + } + if (!this.isDisable && this.isDone) { + return this.step.doneIcon || this.stepper.doneIcon || this.$q.iconSet.stepper.done + } + + return this.step.icon || this.stepper.inactiveIcon + }, + + color: function color () { + if (this.isActive) { + return this.step.activeColor || this.stepper.activeColor || this.step.color + } + if (this.isError) { + return this.step.errorColor || this.stepper.errorColor + } + if (!this.disable && this.isDone) { + return this.step.doneColor || this.stepper.doneColor || this.step.color || this.stepper.inactiveColor + } + + return this.step.color || this.stepper.inactiveColor + }, + + classes: function classes () { + var obj; + + return ( obj = {}, obj[("text-" + (this.color))] = this.color, obj['q-stepper__tab--error'] = this.isError, obj['q-stepper__tab--active'] = this.isActive, obj['q-stepper__tab--done'] = this.isDone, obj['q-stepper__tab--navigation q-focusable q-hoverable'] = this.headerNav, obj['q-stepper__tab--disabled'] = this.isDisable, obj ) + } + }, + + methods: { + activate: function activate () { + this.$refs.blurTarget !== void 0 && this.$refs.blurTarget.focus(); + !this.isActive && this.stepper.goTo(this.step.name); + }, + keyup: function keyup (e) { + e.keyCode === 13 && !this.isActive && this.stepper.goTo(this.step.name); + } + }, + + render: function render (h) { + var data = { + staticClass: 'q-stepper__tab col-grow flex items-center no-wrap relative-position', + class: this.classes, + directives: this.stepper.headerNav ? [{ + name: 'ripple', + value: this.headerNav + }] : null + }; + + if (this.headerNav) { + data.on = { + click: this.activate, + keyup: this.keyup + }; + data.attrs = { tabindex: this.isDisable === true ? -1 : this.$attrs.tabindex || 0 }; + } + + return h('div', data, [ + h('div', { staticClass: 'q-focus-helper', attrs: { tabindex: -1 }, ref: 'blurTarget' }), + + h('div', { staticClass: 'q-stepper__dot row flex-center q-stepper__line relative-position' }, [ + h('span', { staticClass: 'row flex-center' }, [ + this.hasPrefix === true + ? this.step.prefix + : h(QIcon, { props: { name: this.icon } }) + ]) + ]), + + this.step.title + ? h('div', { + staticClass: 'q-stepper__label q-stepper__line relative-position' + }, [ + h('div', { staticClass: 'q-stepper__title' }, [ this.step.title ]), + this.step.caption + ? h('div', { staticClass: 'q-stepper__caption' }, [ this.step.caption ]) + : null + ]) + : null + ]) + } + }); + + var StepWrapper = Vue.extend({ + name: 'QStepWrapper', + + render: function render (h) { + return h('div', { + staticClass: 'q-stepper__step-content' + }, [ + h('div', { + staticClass: 'q-stepper__step-inner' + }, slot(this, 'default')) + ]) + } + }); + + var QStep = Vue.extend({ + name: 'QStep', + + inject: { + stepper: { + default: function default$1 () { + console.error('QStep needs to be child of QStepper'); + } + } + }, + + mixins: [ PanelChildMixin ], + + props: { + icon: String, + color: String, + title: { + type: String, + required: true + }, + caption: String, + prefix: [ String, Number ], + + doneIcon: String, + doneColor: String, + activeIcon: String, + activeColor: String, + errorIcon: String, + errorColor: String, + + headerNav: { + type: Boolean, + default: true + }, + done: Boolean, + error: Boolean + }, + + computed: { + isActive: function isActive () { + return this.stepper.value === this.name + } + }, + + watch: { + isActive: function isActive (active) { + var this$1 = this; + + if ( + active === true && + this.stepper.vertical === true + ) { + this.$nextTick(function () { + if (this$1.$el !== void 0) { + this$1.$el.scrollTop = 0; + } + }); + } + } + }, + + render: function render (h) { + var vertical = this.stepper.vertical; + var content = vertical === true && this.stepper.keepAlive === true + ? h( + 'keep-alive', + this.isActive === true + ? [ h(StepWrapper, { key: this.name }, slot(this, 'default')) ] + : void 0 + ) + : ( + vertical !== true || this.isActive === true + ? StepWrapper.options.render.call(this, h) + : void 0 + ); + + return h( + 'div', + { + staticClass: 'q-stepper__step', + on: this.$listeners + }, + vertical === true + ? [ + h(StepHeader, { + props: { + stepper: this.stepper, + step: this + } + }), + + this.stepper.animated === true + ? h(QSlideTransition, [ content ]) + : content + ] + : [ content ] + ) + } + }); + + var QStepper = Vue.extend({ + name: 'QStepper', + + provide: function provide () { + return { + stepper: this + } + }, + + mixins: [ DarkMixin, PanelParentMixin ], + + props: { + flat: Boolean, + bordered: Boolean, + alternativeLabels: Boolean, + headerNav: Boolean, + contracted: Boolean, + + inactiveColor: String, + inactiveIcon: String, + doneIcon: String, + doneColor: String, + activeIcon: String, + activeColor: String, + errorIcon: String, + errorColor: String + }, + + computed: { + classes: function classes () { + return "q-stepper--" + (this.vertical === true ? 'vertical' : 'horizontal') + + (this.flat === true || this.isDark === true ? ' q-stepper--flat no-shadow' : '') + + (this.bordered === true || (this.isDark === true && this.flat === false) ? ' q-stepper--bordered' : '') + + (this.contracted === true ? ' q-stepper--contracted' : '') + + (this.isDark === true ? ' q-stepper--dark q-dark' : '') + } + }, + + methods: { + __getContent: function __getContent (h) { + var this$1 = this; + var obj; + + var top = slot(this, 'message', []); + + if (this.vertical === true) { + this.__isValidPanelName(this.value) && this.__updatePanelIndex(); + + return top.concat( + h('div', { + staticClass: 'q-stepper__content', + // stop propagation of content emitted @input + // which would tamper with Panel's model + on: cache(this, 'stop', { input: stop }) + }, slot(this, 'default')) + ) + } + + return [ + h('div', { + staticClass: 'q-stepper__header row items-stretch justify-between', + class: ( obj = {}, obj[("q-stepper__header--" + (this.alternativeLabels ? 'alternative' : 'standard') + "-labels")] = true, obj['q-stepper__header--border'] = !this.flat || this.bordered, obj ) + }, this.__getAllPanels().map(function (panel) { + var step = panel.componentOptions.propsData; + + return h(StepHeader, { + key: step.name, + props: { + stepper: this$1, + step: step + } + }) + })) + ].concat( + top, + + h('div', { + staticClass: 'q-stepper__content q-panel-parent', + directives: this.panelDirectives + }, this.__getPanelContent(h)) + ) + }, + + __renderPanels: function __renderPanels (h) { + return h('div', { + staticClass: 'q-stepper', + class: this.classes, + on: this.$listeners + }, mergeSlot(this.__getContent(h), this, 'navigation')) + } + } + }); + + var QStepperNavigation = Vue.extend({ + name: 'QStepperNavigation', + + render: function render (h) { + return h('div', { + staticClass: 'q-stepper__nav', + on: this.$listeners + }, slot(this, 'default')) + } + }); + + var Top = { + computed: { + marginalsProps: function marginalsProps () { + return { + pagination: this.computedPagination, + pagesNumber: this.pagesNumber, + isFirstPage: this.isFirstPage, + isLastPage: this.isLastPage, + prevPage: this.prevPage, + nextPage: this.nextPage, + + inFullscreen: this.inFullscreen, + toggleFullscreen: this.toggleFullscreen + } + } + }, + + methods: { + getTop: function getTop (h) { + var + top = this.$scopedSlots.top, + topLeft = this.$scopedSlots['top-left'], + topRight = this.$scopedSlots['top-right'], + topSelection = this.$scopedSlots['top-selection'], + hasSelection = this.hasSelectionMode === true && + topSelection !== void 0 && + this.rowsSelectedNumber > 0, + staticClass = 'q-table__top relative-position row items-center'; + + if (top !== void 0) { + return h('div', { staticClass: staticClass }, [ top(this.marginalsProps) ]) + } + + var child; + + if (hasSelection === true) { + child = topSelection(this.marginalsProps).slice(); + } + else { + child = []; + + if (topLeft !== void 0) { + child.push( + h('div', { staticClass: 'q-table-control' }, [ + topLeft(this.marginalsProps) + ]) + ); + } + else if (this.title) { + child.push( + h('div', { staticClass: 'q-table__control' }, [ + h('div', { staticClass: 'q-table__title' }, this.title) + ]) + ); + } + } + + if (topRight !== void 0) { + child.push(h('div', { staticClass: 'q-table__separator col' })); + child.push( + h('div', { staticClass: 'q-table__control' }, [ + topRight(this.marginalsProps) + ]) + ); + } + + if (child.length === 0) { + return + } + + return h('div', { staticClass: staticClass }, child) + } + } + }; + + var QTh = Vue.extend({ + name: 'QTh', + + props: { + props: Object, + autoWidth: Boolean + }, + + render: function render (h) { + var this$1 = this; + + var on = this.$listeners; + + if (this.props === void 0) { + return h('th', { + on: on, + class: this.autoWidth === true ? 'q-table--col-auto-width' : null + }, slot(this, 'default')) + } + + var col, child; + var name = this.$vnode.key; + + if (name) { + col = this.props.colsMap[name]; + if (col === void 0) { return } + } + else { + col = this.props.col; + } + + if (col.sortable === true) { + var action = col.align === 'right' + ? 'unshift' + : 'push'; + + child = uniqueSlot(this, 'default', []); + child[action]( + h(QIcon, { + props: { name: this.$q.iconSet.table.arrowUp }, + staticClass: col.__iconClass + }) + ); + } + else { + child = slot(this, 'default'); + } + + var evt = col.sortable === true + ? { + click: function (evt) { + this$1.props.sort(col); + this$1.$emit('click', evt); + } + } + : {}; + + return h('th', { + on: Object.assign({}, on, evt), + style: col.__thStyle, + class: col.__thClass + + (this.autoWidth === true ? ' q-table--col-auto-width' : '') + }, child) + } + }); + + var TableHeader = { + methods: { + getTableHeader: function getTableHeader (h) { + var child = this.getTableHeaderRow(h); + + if (this.loading === true && this.$scopedSlots.loading === void 0) { + child.push( + h('tr', { staticClass: 'q-table__progress' }, [ + h('th', { + staticClass: 'relative-position', + attrs: { colspan: '100%' } + }, this.__getProgress(h)) + ]) + ); + } + + return h('thead', child) + }, + + getTableHeaderRow: function getTableHeaderRow (h) { + var this$1 = this; + + var + header = this.$scopedSlots.header, + headerCell = this.$scopedSlots['header-cell']; + + if (header !== void 0) { + return header(this.addTableHeaderRowMeta({ + header: true, cols: this.computedCols, sort: this.sort, colsMap: this.computedColsMap + })).slice() + } + + var mapFn; + + if (headerCell !== void 0) { + mapFn = function (col) { return headerCell({ + col: col, cols: this$1.computedCols, sort: this$1.sort, colsMap: this$1.computedColsMap + }); }; + } + else { + mapFn = function (col) { + var props = { + col: col, cols: this$1.computedCols, sort: this$1.sort, colsMap: this$1.computedColsMap + }; + var slot = this$1.$scopedSlots[("header-cell-" + (col.name))]; + + return slot !== void 0 + ? slot(props) + : h(QTh, { + key: col.name, + props: { props: props }, + style: col.headerStyle, + class: col.headerClasses + }, col.label) + }; + } + + var child = this.computedCols.map(mapFn); + + if (this.singleSelection === true && this.grid !== true) { + child.unshift(h('th', { staticClass: 'q-table--col-auto-width' }, [' '])); + } + else if (this.multipleSelection === true) { + child.unshift(h('th', { staticClass: 'q-table--col-auto-width' }, [ + h(QCheckbox, { + props: { + color: this.color, + value: this.someRowsSelected === true + ? null + : this.allRowsSelected, + dark: this.isDark, + dense: this.dense + }, + on: cache(this, 'inp', { + input: function (val) { + if (this$1.someRowsSelected === true) { + val = false; + } + this$1.__updateSelection( + this$1.computedRows.map(this$1.getRowKey), + this$1.computedRows, + val + ); + } + }) + }) + ])); + } + + return [ + h('tr', { + style: this.tableHeaderStyle, + class: this.tableHeaderClass + }, child) + ] + }, + + addTableHeaderRowMeta: function addTableHeaderRowMeta (data) { + var this$1 = this; + + if (this.multipleSelection === true) { + Object.defineProperty(data, 'selected', { + get: function () { return this$1.someRowsSelected === true + ? 'some' + : this$1.allRowsSelected; }, + set: function (val) { + if (this$1.someRowsSelected === true) { + val = false; + } + this$1.__updateSelection( + this$1.computedRows.map(this$1.getRowKey), + this$1.computedRows, + val + ); + }, + configurable: true, + enumerable: true + }); + data.partialSelected = this.someRowsSelected; + data.multipleSelect = true; + } + + return data + } + } + }; + + var TableBody = { + methods: { + getTableRowBody: function getTableRowBody (row, body) { + var + key = this.getRowKey(row), + selected = this.isRowSelected(key); + + return body(this.addBodyRowMeta({ + key: key, + row: row, + cols: this.computedCols, + colsMap: this.computedColsMap, + __trClass: selected ? 'selected' : '' + })) + }, + + getTableRow: function getTableRow (h, row) { + var this$1 = this; + + var + bodyCell = this.$scopedSlots['body-cell'], + key = this.getRowKey(row), + selected = this.isRowSelected(key), + child = bodyCell + ? this.computedCols.map(function (col) { return bodyCell(this$1.addBodyCellMetaData({ row: row, col: col })); }) + : this.computedCols.map(function (col) { + var slot = this$1.$scopedSlots[("body-cell-" + (col.name))]; + return slot !== void 0 + ? slot(this$1.addBodyCellMetaData({ row: row, col: col })) + : h('td', { + class: col.__tdClass, + style: col.__tdStyle + }, this$1.getCellValue(col, row)) + }); + + this.hasSelectionMode === true && child.unshift( + h('td', { staticClass: 'q-table--col-auto-width' }, [ + h(QCheckbox, { + props: { + value: selected, + color: this.color, + dark: this.isDark, + dense: this.dense + }, + on: { + input: function (adding) { + this$1.__updateSelection([ key ], [ row ], adding); + } + } + }) + ]) + ); + + var data = { key: key, class: { selected: selected }, on: {} }; + + if (this.$listeners['row-click'] !== void 0) { + data.class['cursor-pointer'] = true; + data.on.click = function (evt) { + this$1.$emit('row-click', evt, row); + }; + } + + if (this.$listeners['row-dblclick'] !== void 0) { + data.class['cursor-pointer'] = true; + data.on.dblclick = function (evt) { + this$1.$emit('row-dblclick', evt, row); + }; + } + + return h('tr', data, child) + }, + + getTableBody: function getTableBody (h) { + var this$1 = this; + + var + body = this.$scopedSlots.body, + topRow = this.$scopedSlots['top-row'], + bottomRow = this.$scopedSlots['bottom-row'], + mapFn = body !== void 0 + ? function (row) { return this$1.getTableRowBody(row, body); } + : function (row) { return this$1.getTableRow(h, row); }; + + var child = this.computedRows.map(mapFn); + + if (topRow !== void 0) { + child = topRow({ cols: this.computedCols }).concat(child); + } + if (bottomRow !== void 0) { + child = child.concat(bottomRow({ cols: this.computedCols })); + } + + return h('tbody', child) + }, + + getTableRowVirtual: function getTableRowVirtual (h) { + var this$1 = this; + + var body = this.$scopedSlots.body; + + return body !== void 0 + ? function (props) { return this$1.getTableRowBody(props.item, body); } + : function (props) { return this$1.getTableRow(h, props.item); } + }, + + addBodyRowMeta: function addBodyRowMeta (data) { + var this$1 = this; + + this.hasSelectionMode === true && Object.defineProperty(data, 'selected', { + get: function () { return this$1.isRowSelected(data.key); }, + set: function (adding) { + this$1.__updateSelection([ data.key ], [ data.row ], adding); + }, + configurable: true, + enumerable: true + }); + + Object.defineProperty(data, 'expand', { + get: function () { return this$1.isRowExpanded(data.key); }, + set: function (adding) { + this$1.__updateExpanded(data.key, adding); + }, + configurable: true, + enumerable: true + }); + + data.cols = data.cols.map(function (col) { + var c = Object.assign({}, col); + Object.defineProperty(c, 'value', { + get: function () { return this$1.getCellValue(col, data.row); }, + configurable: true, + enumerable: true + }); + return c + }); + + return data + }, + + addBodyCellMetaData: function addBodyCellMetaData (data) { + var this$1 = this; + + Object.defineProperty(data, 'value', { + get: function () { return this$1.getCellValue(data.col, data.row); }, + configurable: true, + enumerable: true + }); + return data + }, + + getCellValue: function getCellValue (col, row) { + var val = typeof col.field === 'function' ? col.field(row) : row[col.field]; + return col.format !== void 0 ? col.format(val, row) : val + } + } + }; + + var Bottom = { + computed: { + navIcon: function navIcon () { + var ico = [ this.$q.iconSet.table.prevPage, this.$q.iconSet.table.nextPage ]; + return this.$q.lang.rtl === true ? ico.reverse() : ico + } + }, + + methods: { + getBottom: function getBottom (h) { + if (this.hideBottom === true) { + return + } + + if (this.nothingToDisplay === true) { + var message = this.loading === true + ? this.loadingLabel || this.$q.lang.table.loading + : (this.filter ? this.noResultsLabel || this.$q.lang.table.noResults : this.noDataLabel || this.$q.lang.table.noData); + + var noData = this.$scopedSlots['no-data']; + var children = noData !== void 0 + ? [ noData({ message: message, icon: this.$q.iconSet.table.warning, filter: this.filter }) ] + : [ + h(QIcon, { + staticClass: 'q-table__bottom-nodata-icon', + props: { name: this.$q.iconSet.table.warning } + }), + message + ]; + + return h('div', { + staticClass: 'q-table__bottom row items-center q-table__bottom--nodata' + }, children) + } + + var bottom = this.$scopedSlots.bottom; + + return h('div', { + staticClass: 'q-table__bottom row items-center', + class: bottom !== void 0 ? null : 'justify-end' + }, bottom !== void 0 ? [ bottom(this.marginalsProps) ] : this.getPaginationRow(h)) + }, + + getPaginationRow: function getPaginationRow (h) { + var this$1 = this; + + var control; + var ref = this.computedPagination; + var rowsPerPage = ref.rowsPerPage; + var paginationLabel = this.paginationLabel || this.$q.lang.table.pagination, + paginationSlot = this.$scopedSlots.pagination, + hasOpts = this.rowsPerPageOptions.length > 1; + + var child = [ + h('div', { staticClass: 'q-table__control' }, [ + h('div', [ + this.hasSelectionMode === true && this.rowsSelectedNumber > 0 + ? (this.selectedRowsLabel || this.$q.lang.table.selectedRecords)(this.rowsSelectedNumber) + : '' + ]) + ]), + + h('div', { staticClass: 'q-table__separator col' }) + ]; + + if (hasOpts === true) { + child.push( + h('div', { staticClass: 'q-table__control' }, [ + h('span', { staticClass: 'q-table__bottom-item' }, [ + this.rowsPerPageLabel || this.$q.lang.table.recordsPerPage + ]), + h(QSelect, { + staticClass: 'q-table__select inline q-table__bottom-item', + props: { + color: this.color, + value: rowsPerPage, + options: this.computedRowsPerPageOptions, + displayValue: rowsPerPage === 0 + ? this.$q.lang.table.allRows + : rowsPerPage, + dark: this.isDark, + borderless: true, + dense: true, + optionsDense: true, + optionsCover: true + }, + on: cache(this, 'pgSize', { + input: function (pag) { + this$1.setPagination({ + page: 1, + rowsPerPage: pag.value + }); + } + }) + }) + ]) + ); + } + + if (paginationSlot !== void 0) { + control = paginationSlot(this.marginalsProps); + } + else { + control = [ + h('span', rowsPerPage !== 0 ? { staticClass: 'q-table__bottom-item' } : {}, [ + rowsPerPage + ? paginationLabel(this.firstRowIndex + 1, Math.min(this.lastRowIndex, this.computedRowsNumber), this.computedRowsNumber) + : paginationLabel(1, this.computedData.rowsNumber, this.computedRowsNumber) + ]) + ]; + + if (rowsPerPage !== 0) { + var size = this.dense === true ? 'sm' : void 0; + + control.push( + h(QBtn, { + props: { + color: this.color, + round: true, + icon: this.navIcon[0], + dense: true, + flat: true, + size: size, + disable: this.isFirstPage + }, + on: cache(this, 'pgPrev', { click: this.prevPage }) + }), + + h(QBtn, { + props: { + color: this.color, + round: true, + icon: this.navIcon[1], + dense: true, + size: size, + flat: true, + disable: this.isLastPage + }, + on: cache(this, 'pgNext', { click: this.nextPage }) + }) + ); + } + } + + child.push( + h('div', { staticClass: 'q-table__control' }, control) + ); + + return child + } + } + }; + + var TableGrid = { + methods: { + getGridBody: function getGridBody (h) { + var this$1 = this; + + var item = this.$scopedSlots.item !== void 0 + ? this.$scopedSlots.item + : function (scope) { + var child = scope.cols.map( + function (col) { return h('div', { staticClass: 'q-table__grid-item-row' }, [ + h('div', { staticClass: 'q-table__grid-item-title' }, [ col.label ]), + h('div', { staticClass: 'q-table__grid-item-value' }, [ col.value ]) + ]); } + ); + + this$1.hasSelectionMode === true && child.unshift( + h('div', { staticClass: 'q-table__grid-item-row' }, [ + h(QCheckbox, { + props: { + value: scope.selected, + color: this$1.color, + dark: this$1.isDark, + dense: true + }, + on: { + input: function (val) { + scope.selected = val; + } + } + }) + ]), + + h(QSeparator, { props: { dark: this$1.isDark } }) + ); + + var data = { + staticClass: 'q-table__grid-item-card' + this$1.cardDefaultClass, + class: this$1.cardClass, + style: this$1.cardStyle, + on: {} + }; + + if (this$1.$listeners['row-click'] !== void 0 || this$1.$listeners['row-dblclick'] !== void 0) { + data.staticClass += ' cursor-pointer'; + } + + if (this$1.$listeners['row-click'] !== void 0) { + data.on.click = function (evt) { + this$1.$emit('row-click', evt, scope.row); + }; + } + + if (this$1.$listeners['row-dblclick'] !== void 0) { + data.on.dblclick = function (evt) { + this$1.$emit('row-dblclick', evt, scope.row); + }; + } + + return h('div', { + staticClass: 'q-table__grid-item col-xs-12 col-sm-6 col-md-4 col-lg-3', + class: scope.selected === true ? 'q-table__grid-item--selected' : '' + }, [ + h('div', data, child) + ]) + }; + + return h('div', { + staticClass: 'q-table__grid-content row', + class: this.cardContainerClass, + style: this.cardContainerStyle + }, this.computedRows.map(function (row) { + var + key = this$1.getRowKey(row), + selected = this$1.isRowSelected(key); + + return item(this$1.addBodyRowMeta({ + key: key, + row: row, + cols: this$1.computedCols, + colsMap: this$1.computedColsMap, + __trClass: selected ? 'selected' : '' + })) + })) + }, + + getGridHeader: function getGridHeader (h) { + var child = this.gridHeader === true + ? [ + h('table', { staticClass: 'q-table' }, [ + this.getTableHeader(h) + ]) + ] + : ( + this.loading === true && this.$scopedSlots.loading === void 0 + ? this.__getProgress(h) + : void 0 + ); + + return h('div', { staticClass: 'q-table__middle' }, child) + } + } + }; + + function getTableMiddle (h, conf, content) { + return h('div', Object.assign({}, conf, + {staticClass: 'q-table__middle' + (conf.staticClass !== void 0 ? ' ' + conf.staticClass : '')}), [ + h('table', { staticClass: 'q-table' }, content) + ]) + } + + var comps = { + list: QList, + table: QMarkupTable + }; + + var QVirtualScroll = Vue.extend({ + name: 'QVirtualScroll', + + mixins: [ VirtualScroll ], + + props: { + type: { + type: String, + default: 'list', + validator: function (v) { return ['list', 'table', '__qtable'].includes(v); } + }, + + items: { + type: Array, + default: function () { return []; } + }, + + itemsFn: Function, + itemsSize: Number, + + scrollTarget: { + default: void 0 + } + }, + + computed: { + virtualScrollLength: function virtualScrollLength () { + return this.itemsSize >= 0 && this.itemsFn !== void 0 + ? parseInt(this.itemsSize, 10) + : (Array.isArray(this.items) ? this.items.length : 0) + }, + + virtualScrollScope: function virtualScrollScope () { + var this$1 = this; + + if (this.virtualScrollLength === 0) { + return [] + } + + var mapFn = function (item, i) { return ({ + index: this$1.virtualScrollSliceRange.from + i, + item: item + }); }; + + if (this.itemsFn === void 0) { + return this.items.slice(this.virtualScrollSliceRange.from, this.virtualScrollSliceRange.to).map(mapFn) + } + + return this.itemsFn(this.virtualScrollSliceRange.from, this.virtualScrollSliceRange.to - this.virtualScrollSliceRange.from).map(mapFn) + }, + + classes: function classes () { + return 'q-virtual-scroll q-virtual-scroll' + (this.virtualScrollHorizontal === true ? '--horizontal' : '--vertical') + + (this.scrollTarget !== void 0 ? '' : ' scroll') + }, + + attrs: function attrs () { + return this.scrollTarget !== void 0 ? void 0 : { tabindex: 0 } + } + }, + + watch: { + virtualScrollLength: function virtualScrollLength () { + this.__resetVirtualScroll(); + }, + + scrollTarget: function scrollTarget () { + this.__unconfigureScrollTarget(); + this.__configureScrollTarget(); + } + }, + + methods: { + __getVirtualScrollEl: function __getVirtualScrollEl () { + return this.$el + }, + + __getVirtualScrollTarget: function __getVirtualScrollTarget () { + return this.__scrollTarget + }, + + __configureScrollTarget: function __configureScrollTarget () { + this.__scrollTarget = getScrollTarget(this.$el, this.scrollTarget); + this.__scrollTarget.addEventListener('scroll', this.__onVirtualScrollEvt, listenOpts.passive); + }, + + __unconfigureScrollTarget: function __unconfigureScrollTarget () { + if (this.__scrollTarget !== void 0) { + this.__scrollTarget.removeEventListener('scroll', this.__onVirtualScrollEvt, listenOpts.passive); + this.__scrollTarget = void 0; + } + } + }, + + beforeMount: function beforeMount () { + this.__resetVirtualScroll(); + }, + + mounted: function mounted () { + this.__configureScrollTarget(); + }, + + beforeDestroy: function beforeDestroy () { + this.__unconfigureScrollTarget(); + }, + + render: function render (h) { + if (this.$scopedSlots.default === void 0) { + console.error("QVirtualScroll: default scoped slot is required for rendering", this); + return + } + + var child = this.__padVirtualScroll( + h, + this.type === 'list' ? 'div' : 'tbody', + this.virtualScrollScope.map(this.$scopedSlots.default) + ); + + if (this.$scopedSlots.before !== void 0) { + child = this.$scopedSlots.before().concat(child); + } + + child = mergeSlot(child, this, 'after'); + + return this.type === '__qtable' + ? getTableMiddle(h, { staticClass: this.classes }, child) + : h(comps[this.type], { + class: this.classes, + attrs: this.attrs, + props: this.$attrs, + on: this.$listeners + }, child) + } + }); + + function sortDate (a, b) { + return (new Date(a)) - (new Date(b)) + } + + var Sort = { + props: { + sortMethod: { + type: Function, + default: function default$1 (data, sortBy, descending) { + var col = this.columns.find(function (def) { return def.name === sortBy; }); + if (col === void 0 || col.field === void 0) { + return data + } + + var + dir = descending === true ? -1 : 1, + val = typeof col.field === 'function' + ? function (v) { return col.field(v); } + : function (v) { return v[col.field]; }; + + return data.sort(function (a, b) { + var assign; + + var + A = val(a), + B = val(b); + + if (A === null || A === void 0) { + return -1 * dir + } + if (B === null || B === void 0) { + return 1 * dir + } + if (col.sort !== void 0) { + return col.sort(A, B, a, b) * dir + } + if (isNumber(A) === true && isNumber(B) === true) { + return (A - B) * dir + } + if (isDate(A) === true && isDate(B) === true) { + return sortDate(A, B) * dir + } + if (typeof A === 'boolean' && typeof B === 'boolean') { + return (A - B) * dir + } + + (assign = [A, B].map(function (s) { return (s + '').toLocaleString().toLowerCase(); }), A = assign[0], B = assign[1]); + + return A < B + ? -1 * dir + : (A === B ? 0 : dir) + }) + } + } + }, + + computed: { + columnToSort: function columnToSort () { + var ref = this.computedPagination; + var sortBy = ref.sortBy; + + if (sortBy) { + return this.columns.find(function (def) { return def.name === sortBy; }) || null + } + } + }, + + methods: { + sort: function sort (col /* String(col name) or Object(col definition) */) { + if (col === Object(col)) { + col = col.name; + } + + var ref = this.computedPagination; + var sortBy = ref.sortBy; + var descending = ref.descending; + + if (sortBy !== col) { + sortBy = col; + descending = false; + } + else if (this.binaryStateSort === true) { + descending = !descending; + } + else if (descending === true) { + sortBy = null; + } + else { + descending = true; + } + + this.setPagination({ sortBy: sortBy, descending: descending, page: 1 }); + } + } + }; + + var Filter = { + props: { + filter: [String, Object], + filterMethod: { + type: Function, + default: function default$1 (rows, terms, cols, cellValue) { + if ( cols === void 0 ) cols = this.computedCols; + if ( cellValue === void 0 ) cellValue = this.getCellValue; + + var lowerTerms = terms ? terms.toLowerCase() : ''; + return rows.filter( + function (row) { return cols.some(function (col) { return (cellValue(col, row) + '').toLowerCase().indexOf(lowerTerms) !== -1; }); } + ) + } + } + }, + + watch: { + filter: { + handler: function handler () { + var this$1 = this; + + this.$nextTick(function () { + this$1.setPagination({ page: 1 }, true); + }); + }, + deep: true + } + } + }; + + function samePagination (oldPag, newPag) { + for (var prop in newPag) { + if (newPag[prop] !== oldPag[prop]) { + return false + } + } + return true + } + + function fixPagination (p) { + if (p.page < 1) { + p.page = 1; + } + if (p.rowsPerPage !== void 0 && p.rowsPerPage < 1) { + p.rowsPerPage = 0; + } + return p + } + + var Pagination = { + props: { + pagination: Object, + rowsPerPageOptions: { + type: Array, + default: function () { return [3, 5, 7, 10, 15, 20, 25, 50, 0]; } + } + }, + + computed: { + computedPagination: function computedPagination () { + return fixPagination(Object.assign({}, this.innerPagination, + this.pagination)) + }, + + firstRowIndex: function firstRowIndex () { + var ref = this.computedPagination; + var page = ref.page; + var rowsPerPage = ref.rowsPerPage; + return (page - 1) * rowsPerPage + }, + + lastRowIndex: function lastRowIndex () { + var ref = this.computedPagination; + var page = ref.page; + var rowsPerPage = ref.rowsPerPage; + return page * rowsPerPage + }, + + isFirstPage: function isFirstPage () { + return this.computedPagination.page === 1 + }, + + pagesNumber: function pagesNumber () { + return this.computedPagination.rowsPerPage === 0 + ? 1 + : Math.max( + 1, + Math.ceil(this.computedRowsNumber / this.computedPagination.rowsPerPage) + ) + }, + + isLastPage: function isLastPage () { + return this.lastRowIndex === 0 + ? true + : this.computedPagination.page >= this.pagesNumber + }, + + computedRowsPerPageOptions: function computedRowsPerPageOptions () { + var this$1 = this; + + return this.rowsPerPageOptions.map(function (count) { return ({ + label: count === 0 ? this$1.$q.lang.table.allRows : '' + count, + value: count + }); }) + } + }, + + watch: { + pagesNumber: function pagesNumber (lastPage, oldLastPage) { + if (lastPage === oldLastPage) { + return + } + + var currentPage = this.computedPagination.page; + if (lastPage && !currentPage) { + this.setPagination({ page: 1 }); + } + else if (lastPage < currentPage) { + this.setPagination({ page: lastPage }); + } + } + }, + + methods: { + __sendServerRequest: function __sendServerRequest (pagination) { + this.requestServerInteraction({ + pagination: pagination, + filter: this.filter + }); + }, + + setPagination: function setPagination (val, forceServerRequest) { + var newPagination = fixPagination(Object.assign({}, this.computedPagination, + val)); + + if (samePagination(this.computedPagination, newPagination)) { + if (this.isServerSide && forceServerRequest) { + this.__sendServerRequest(newPagination); + } + return + } + + if (this.isServerSide) { + this.__sendServerRequest(newPagination); + return + } + + if (this.pagination) { + this.$emit('update:pagination', newPagination); + } + else { + this.innerPagination = newPagination; + } + }, + + prevPage: function prevPage () { + var ref = this.computedPagination; + var page = ref.page; + if (page > 1) { + this.setPagination({ page: page - 1 }); + } + }, + + nextPage: function nextPage () { + var ref = this.computedPagination; + var page = ref.page; + var rowsPerPage = ref.rowsPerPage; + if (this.lastRowIndex > 0 && page * rowsPerPage < this.computedRowsNumber) { + this.setPagination({ page: page + 1 }); + } + } + }, + + created: function created () { + this.$emit('update:pagination', Object.assign({}, this.computedPagination)); + } + }; + + var RowSelection = { + props: { + selection: { + type: String, + default: 'none', + validator: function (v) { return ['single', 'multiple', 'none'].includes(v); } + }, + selected: { + type: Array, + default: function () { return []; } + } + }, + + computed: { + selectedKeys: function selectedKeys () { + var keys = {}; + this.selected.map(this.getRowKey).forEach(function (key) { + keys[key] = true; + }); + return keys + }, + + hasSelectionMode: function hasSelectionMode () { + return this.selection !== 'none' + }, + + singleSelection: function singleSelection () { + return this.selection === 'single' + }, + + multipleSelection: function multipleSelection () { + return this.selection === 'multiple' + }, + + allRowsSelected: function allRowsSelected () { + var this$1 = this; + + return this.computedRows.length > 0 && this.computedRows.every( + function (row) { return this$1.selectedKeys[ this$1.getRowKey(row) ] === true; } + ) + }, + + someRowsSelected: function someRowsSelected () { + var this$1 = this; + + return this.allRowsSelected !== true && + this.computedRows.some(function (row) { return this$1.selectedKeys[ this$1.getRowKey(row) ] === true; }) + }, + + rowsSelectedNumber: function rowsSelectedNumber () { + return this.selected.length + } + }, + + methods: { + isRowSelected: function isRowSelected (key) { + return this.selectedKeys[key] === true + }, + + clearSelection: function clearSelection () { + this.$emit('update:selected', []); + }, + + __updateSelection: function __updateSelection (keys, rows, added) { + var this$1 = this; + + this.$emit('selection', { rows: rows, added: added, keys: keys }); + + var payload = this.singleSelection === true + ? (added === true ? rows : []) + : ( + added === true + ? this.selected.concat(rows) + : this.selected.filter( + function (row) { return keys.includes(this$1.getRowKey(row)) === false; } + ) + ); + + this.$emit('update:selected', payload); + } + } + }; + + function getVal (val) { + return Array.isArray(val) + ? val.slice() + : [] + } + + var RowExpand = { + props: { + expanded: Array // sync + }, + + data: function data () { + return { + innerExpanded: getVal(this.expanded) + } + }, + + watch: { + expanded: function expanded (val) { + this.innerExpanded = getVal(val); + } + }, + + methods: { + isRowExpanded: function isRowExpanded (key) { + return this.innerExpanded.includes(key) + }, + + setExpanded: function setExpanded (val) { + if (this.expanded !== void 0) { + this.$emit('update:expanded', val); + } + else { + this.innerExpanded = val; + } + }, + + __updateExpanded: function __updateExpanded (key, add) { + var target = this.innerExpanded.slice(); + var index = target.indexOf(key); + + if (add === true) { + if (index === -1) { + target.push(key); + this.setExpanded(target); + } + } + else if (index !== -1) { + target.splice(index, 1); + this.setExpanded(target); + } + } + } + }; + + var ColumnSelection = { + props: { + visibleColumns: Array + }, + + computed: { + computedCols: function computedCols () { + var this$1 = this; + + var ref = this.computedPagination; + var sortBy = ref.sortBy; + var descending = ref.descending; + + var cols = this.visibleColumns !== void 0 + ? this.columns.filter(function (col) { return col.required === true || this$1.visibleColumns.includes(col.name) === true; }) + : this.columns; + + return cols.map(function (col) { + col.align = col.align || 'right'; + col.__iconClass = "q-table__sort-icon q-table__sort-icon--" + (col.align); + col.__thClass = "text-" + (col.align) + (col.headerClasses !== void 0 ? ' ' + col.headerClasses : '') + (col.sortable === true ? ' sortable' : '') + (col.name === sortBy ? (" sorted " + (descending === true ? 'sort-desc' : '')) : ''); + col.__tdClass = "text-" + (col.align) + (col.classes !== void 0 ? ' ' + col.classes : ''); + col.__thStyle = col.headerStyle !== void 0 ? col.headerStyle : null; + col.__tdStyle = col.style !== void 0 ? col.style : null; + return col + }) + }, + + computedColsMap: function computedColsMap () { + var names = {}; + this.computedCols.forEach(function (col) { + names[col.name] = col; + }); + return names + } + } + }; + + var commonVirtPropsObj = {}; + commonVirtPropsList.forEach(function (p) { commonVirtPropsObj[p] = {}; }); + + var QTable = Vue.extend({ + name: 'QTable', + + mixins: [ + DarkMixin, + + FullscreenMixin, + Top, + TableHeader, + TableBody, + Bottom, + TableGrid, + Sort, + Filter, + Pagination, + RowSelection, + RowExpand, + ColumnSelection + ], + + props: Object.assign({}, {data: { + type: Array, + default: function () { return []; } + }, + rowKey: { + type: [ String, Function ], + default: 'id' + }, + + columns: Array, + loading: Boolean, + binaryStateSort: Boolean, + + title: String, + + hideHeader: Boolean, + hideBottom: Boolean, + + grid: Boolean, + gridHeader: Boolean, + + dense: Boolean, + flat: Boolean, + bordered: Boolean, + square: Boolean, + separator: { + type: String, + default: 'horizontal', + validator: function (v) { return ['horizontal', 'vertical', 'cell', 'none'].includes(v); } + }, + wrapCells: Boolean, + + virtualScroll: Boolean}, + commonVirtPropsObj, + + {noDataLabel: String, + noResultsLabel: String, + loadingLabel: String, + selectedRowsLabel: Function, + rowsPerPageLabel: String, + paginationLabel: Function, + + color: { + type: String, + default: 'grey-8' + }, + + tableStyle: [String, Array, Object], + tableClass: [String, Array, Object], + tableHeaderStyle: [String, Array, Object], + tableHeaderClass: [String, Array, Object], + cardContainerClass: [String, Array, Object], + cardContainerStyle: [String, Array, Object], + cardStyle: [String, Array, Object], + cardClass: [String, Array, Object]}), + + data: function data () { + return { + innerPagination: { + sortBy: null, + descending: false, + page: 1, + rowsPerPage: 5 + } + } + }, + + watch: { + needsReset: function needsReset () { + this.hasVirtScroll === true && this.$refs.virtScroll !== void 0 && this.$refs.virtScroll.reset(); + } + }, + + computed: { + getRowKey: function getRowKey () { + var this$1 = this; + + return typeof this.rowKey === 'function' + ? this.rowKey + : function (row) { return row[this$1.rowKey]; } + }, + + hasVirtScroll: function hasVirtScroll () { + return this.grid !== true && this.virtualScroll === true + }, + + needsReset: function needsReset () { + var this$1 = this; + + return ['tableStyle', 'tableClass', 'tableHeaderStyle', 'tableHeaderClass', 'containerClass'] + .map(function (p) { return this$1[p]; }).join(';') + }, + + computedData: function computedData () { + var rows = this.data; + + if (rows.length === 0) { + return { + rowsNumber: 0, + rows: rows + } + } + + if (this.isServerSide === true) { + return { + rowsNumber: rows.length, + rows: rows + } + } + + var ref = this.computedPagination; + var sortBy = ref.sortBy; + var descending = ref.descending; + var rowsPerPage = ref.rowsPerPage; + + if (this.filter) { + rows = this.filterMethod(rows, this.filter, this.computedCols, this.getCellValue); + } + + if (this.columnToSort !== void 0) { + rows = this.sortMethod( + this.data === rows ? rows.slice() : rows, + sortBy, + descending + ); + } + + var rowsNumber = rows.length; + + if (rowsPerPage !== 0) { + if (this.firstRowIndex === 0 && this.data !== rows) { + if (rows.length > this.lastRowIndex) { + rows.length = this.lastRowIndex; + } + } + else { + rows = rows.slice(this.firstRowIndex, this.lastRowIndex); + } + } + + return { rowsNumber: rowsNumber, rows: rows } + }, + + computedRows: function computedRows () { + return this.computedData.rows + }, + + computedRowsNumber: function computedRowsNumber () { + return this.isServerSide === true + ? this.computedPagination.rowsNumber || 0 + : this.computedData.rowsNumber + }, + + nothingToDisplay: function nothingToDisplay () { + return this.computedRows.length === 0 + }, + + isServerSide: function isServerSide () { + return this.computedPagination.rowsNumber !== void 0 + }, + + cardDefaultClass: function cardDefaultClass () { + return " q-table__card" + + (this.isDark === true ? ' q-table__card--dark q-dark' : '') + + (this.square === true ? " q-table--square" : '') + + (this.flat === true ? " q-table--flat" : '') + + (this.bordered === true ? " q-table--bordered" : '') + }, + + containerClass: function containerClass () { + return "q-table__container q-table--" + (this.separator) + "-separator column no-wrap" + + (this.loading === true ? ' q-table--loading' : '') + + (this.grid === true ? ' q-table--grid' : this.cardDefaultClass) + + (this.isDark === true ? " q-table--dark" : '') + + (this.dense === true ? " q-table--dense" : '') + + (this.wrapCells === false ? " q-table--no-wrap" : '') + + (this.inFullscreen === true ? " fullscreen scroll" : '') + }, + + virtProps: function virtProps () { + var this$1 = this; + + var props = {}; + + commonVirtPropsList + .forEach(function (p) { props[p] = this$1[p]; }); + + if (props.virtualScrollItemSize === void 0) { + props.virtualScrollItemSize = this.dense === true ? 28 : 48; + } + + return props + } + }, + + render: function render (h) { + var child = [ this.getTop(h) ]; + var data = { staticClass: this.containerClass }; + + if (this.grid === true) { + child.push(this.getGridHeader(h)); + } + else { + Object.assign(data, { + class: this.cardClass, + style: this.cardStyle + }); + } + + child.push( + this.getBody(h), + this.getBottom(h) + ); + + if (this.loading === true && this.$scopedSlots.loading !== void 0) { + child.push( + this.$scopedSlots.loading() + ); + } + + return h('div', data, child) + }, + + methods: { + requestServerInteraction: function requestServerInteraction (prop) { + var this$1 = this; + if ( prop === void 0 ) prop = {}; + + this.$nextTick(function () { + this$1.$emit('request', { + pagination: prop.pagination || this$1.computedPagination, + filter: prop.filter || this$1.filter, + getCellValue: this$1.getCellValue + }); + }); + }, + + resetVirtualScroll: function resetVirtualScroll () { + this.hasVirtScroll === true && this.$refs.virtScroll.reset(); + }, + + getBody: function getBody (h) { + if (this.grid === true) { + return this.getGridBody(h) + } + + var header = this.hideHeader !== true ? this.getTableHeader(h) : null; + + return this.hasVirtScroll === true + ? h(QVirtualScroll, { + ref: 'virtScroll', + props: Object.assign({}, this.virtProps, + {items: this.computedRows, + type: '__qtable'}), + on: cache(this, 'vs', { + 'virtual-scroll': this.__onVScroll + }), + class: this.tableClass, + style: this.tableStyle, + scopedSlots: { + before: header === null + ? void 0 + : function () { return header; }, + default: this.getTableRowVirtual(h) + } + }) + : getTableMiddle(h, { + staticClass: 'scroll', + class: this.tableClass, + style: this.tableStyle + }, [ + header, + this.getTableBody(h) + ]) + }, + + scrollTo: function scrollTo (toIndex) { + if (this.$refs.virtScroll !== void 0) { + this.$refs.virtScroll.scrollTo(toIndex); + return + } + + toIndex = parseInt(toIndex, 10); + var rowEl = this.$el.querySelector(("tbody tr:nth-of-type(" + (toIndex + 1) + ")")); + + if (rowEl !== null) { + var scrollTarget = this.$el.querySelector('.q-table__middle.scroll'); + var offsetTop = rowEl.offsetTop; + var direction = offsetTop < scrollTarget.scrollTop ? 'decrease' : 'increase'; + + scrollTarget.scrollTop = offsetTop; + + this.$emit('virtual-scroll', { + index: toIndex, + from: 0, + to: this.pagination.rowsPerPage - 1, + direction: direction + }); + } + }, + + __onVScroll: function __onVScroll (info) { + this.$emit('virtual-scroll', info); + }, + + __getProgress: function __getProgress (h) { + return [ + h(QLinearProgress, { + staticClass: 'q-table__linear-progress', + props: { + color: this.color, + dark: this.isDark, + indeterminate: true, + trackColor: 'transparent' + } + }) + ] + } + } + }); + + var QTr = Vue.extend({ + name: 'QTr', + + props: { + props: Object, + noHover: Boolean + }, + + computed: { + classes: function classes () { + return 'q-tr' + (this.props === void 0 || this.props.header === true ? '' : ' ' + this.props.__trClass) + + (this.noHover === true ? ' q-tr--no-hover' : '') + } + }, + + render: function render (h) { + return h('tr', { + on: this.$listeners, + class: this.classes + }, slot(this, 'default')) + } + }); + + var QTd = Vue.extend({ + name: 'QTd', + + props: { + props: Object, + autoWidth: Boolean, + noHover: Boolean + }, + + computed: { + classes: function classes () { + return 'q-td' + (this.autoWidth === true ? ' q-table--col-auto-width' : '') + + (this.noHover === true ? ' q-td--no-hover' : '') + } + }, + + render: function render (h) { + var on = this.$listeners; + + if (this.props === void 0) { + return h('td', { + on: on, + class: this.classes + }, slot(this, 'default')) + } + + var name = this.$vnode.key; + + var col = this.props.colsMap !== void 0 && name + ? this.props.colsMap[name] + : this.props.col; + + if (col === void 0) { return } + + return h('td', { + on: on, + style: col.__tdStyle, + class: this.classes + ' ' + col.__tdClass + }, slot(this, 'default')) + } + }); + + var trailingSlashRE = /\/?$/; + + function queryIncludes (current, target) { + for (var key in target) { + if (!(key in current)) { + return false + } + } + return true + } + + function isSameRoute (current, target) { + if (!target) { + return false + } + if (current.path && target.path) { + return ( + current.path.replace(trailingSlashRE, '') === target.path.replace(trailingSlashRE, '') && + current.hash === target.hash && + isDeepEqual(current.query, target.query) + ) + } + if (current.name && target.name) { + return ( + current.name === target.name && + current.hash === target.hash && + isDeepEqual(current.query, target.query) && + isDeepEqual(current.params, target.params) + ) + } + return false + } + + function isIncludedRoute (current, target) { + return ( + current.path.replace(trailingSlashRE, '/').indexOf(target.path.replace(trailingSlashRE, '/')) === 0 && + (!target.hash || current.hash === target.hash) && + queryIncludes(current.query, target.query) + ) + } + + var QRouteTab = Vue.extend({ + name: 'QRouteTab', + + mixins: [ QTab, RouterLinkMixin ], + + props: { + to: { required: true } + }, + + inject: { + __activateRoute: {}, + __recalculateScroll: {} + }, + + watch: { + $route: function $route () { + this.__checkActivation(); + } + }, + + methods: { + __activate: function __activate (e, keyboard) { + if (this.disable !== true) { + this.__checkActivation(true); + } + + if (keyboard === true) { + this.$el.focus(e); + } + else { + this.$refs.blurTarget !== void 0 && this.$refs.blurTarget.focus(e); + } + }, + + __checkActivation: function __checkActivation (selected) { + if ( selected === void 0 ) selected = false; + + var + current = this.$route; + var ref = this.$router.resolve(this.to, current, this.append); + var href = ref.href; + var location = ref.location; + var route = ref.route; + var redirected = route.redirectedFrom !== void 0, + checkFunction = this.exact === true ? isSameRoute : isIncludedRoute, + params = { + name: this.name, + selected: selected, + exact: this.exact, + priorityMatched: route.matched.length, + priorityHref: href.length + }; + + checkFunction(current, route) && this.__activateRoute(Object.assign({}, params, {redirected: redirected})); + redirected === true && checkFunction(current, Object.assign({}, {path: route.redirectedFrom}, + location)) && this.__activateRoute(params); + this.isActive && this.__activateRoute(); + } + }, + + mounted: function mounted () { + this.__recalculateScroll(); + this.$router !== void 0 && this.__checkActivation(); + }, + + beforeDestroy: function beforeDestroy () { + this.__recalculateScroll(); + this.__activateRoute({ remove: true, name: this.name }); + }, + + render: function render (h) { + return this.__renderTab(h, 'router-link', this.routerLinkProps) + } + }); + + var QTime = Vue.extend({ + name: 'QTime', + + mixins: [ DateTimeMixin ], + + directives: { + TouchPan: TouchPan + }, + + props: { + mask: { + default: null + }, + + format24h: { + type: Boolean, + default: null + }, + + defaultDate: { + type: String, + validator: function (v) { return /^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(v); } + }, + + options: Function, + hourOptions: Array, + minuteOptions: Array, + secondOptions: Array, + + withSeconds: Boolean, + nowBtn: Boolean + }, + + data: function data () { + var model = __splitDate( + this.value, + this.__getComputedMask(), + this.__getComputedLocale(), + this.calendar, + this.__getDefaultDateModel() + ); + + var view = 'Hour'; + + if (model.hour !== null) { + if (model.minute === null) { + view = 'Minute'; + } + else if (this.withSeconds === true && model.second === null) { + view = 'Second'; + } + } + + return { + view: view, + isAM: model.hour === null || model.hour < 12, + innerModel: model + } + }, + + watch: { + value: function value (v) { + var model = __splitDate( + v, + this.computedMask, + this.computedLocale, + this.calendar, + this.defaultDateModel + ); + + if ( + model.dateHash !== this.innerModel.dateHash || + model.timeHash !== this.innerModel.timeHash + ) { + this.innerModel = model; + + if (model.hour === null) { + this.view = 'Hour'; + } + else { + this.isAM = model.hour < 12; + } + } + } + }, + + computed: { + classes: function classes () { + return "q-time q-time--" + (this.landscape === true ? 'landscape' : 'portrait') + + (this.isDark === true ? ' q-time--dark q-dark' : '') + + (this.disable === true ? ' disabled' : (this.readonly === true ? ' q-time--readonly' : '')) + + (this.bordered === true ? " q-time--bordered" : '') + + (this.square === true ? " q-time--square no-border-radius" : '') + + (this.flat === true ? " q-time--flat no-shadow" : '') + }, + + computedMask: function computedMask () { + return this.__getComputedMask() + }, + + stringModel: function stringModel () { + var time = this.innerModel; + + return { + hour: time.hour === null + ? '--' + : ( + this.computedFormat24h === true + ? pad(time.hour) + : String( + this.isAM === true + ? (time.hour === 0 ? 12 : time.hour) + : (time.hour > 12 ? time.hour - 12 : time.hour) + ) + ), + minute: time.minute === null + ? '--' + : pad(time.minute), + second: time.second === null + ? '--' + : pad(time.second) + } + }, + + defaultDateModel: function defaultDateModel () { + return this.__getDefaultDateModel() + }, + + computedFormat24h: function computedFormat24h () { + return this.format24h !== null + ? this.format24h + : this.$q.lang.date.format24h + }, + + pointerStyle: function pointerStyle () { + var + forHour = this.view === 'Hour', + divider = forHour === true ? 12 : 60, + amount = this.innerModel[this.view.toLowerCase()], + degrees = Math.round(amount * (360 / divider)) - 180; + + var transform = "rotate(" + degrees + "deg) translateX(-50%)"; + + if ( + forHour === true && + this.computedFormat24h === true && + this.innerModel.hour >= 12 + ) { + transform += ' scale(.7)'; + } + + return { transform: transform } + }, + + minLink: function minLink () { + return this.innerModel.hour !== null + }, + + secLink: function secLink () { + return this.minLink === true && this.innerModel.minute !== null + }, + + hourInSelection: function hourInSelection () { + var this$1 = this; + + return this.hourOptions !== void 0 + ? function (val) { return this$1.hourOptions.includes(val); } + : ( + this.options !== void 0 + ? function (val) { return this$1.options(val, null, null); } + : void 0 + ) + }, + + minuteInSelection: function minuteInSelection () { + var this$1 = this; + + return this.minuteOptions !== void 0 + ? function (val) { return this$1.minuteOptions.includes(val); } + : ( + this.options !== void 0 + ? function (val) { return this$1.options(this$1.innerModel.hour, val, null); } + : void 0 + ) + }, + + secondInSelection: function secondInSelection () { + var this$1 = this; + + return this.secondOptions !== void 0 + ? function (val) { return this$1.secondOptions.includes(val); } + : ( + this.options !== void 0 + ? function (val) { return this$1.options(this$1.innerModel.hour, this$1.innerModel.minute, val); } + : void 0 + ) + }, + + positions: function positions () { + var start, end, offset = 0, step = 1, inSel; + + if (this.view === 'Hour') { + inSel = this.hourInSelection; + + if (this.computedFormat24h === true) { + start = 0; + end = 23; + } + else { + start = 0; + end = 11; + + if (this.isAM === false) { + offset = 12; + } + } + } + else { + start = 0; + end = 55; + step = 5; + + if (this.view === 'Minute') { + inSel = this.minuteInSelection; + } + else { + inSel = this.secondInSelection; + } + } + + var pos = []; + + for (var val = start, index = start; val <= end; val += step, index++) { + var + actualVal = val + offset, + disable = inSel !== void 0 && inSel(actualVal) === false, + label = this.view === 'Hour' && val === 0 + ? (this.format24h === true ? '00' : '12') + : val; + + pos.push({ val: actualVal, index: index, disable: disable, label: label }); + } + + return pos + } + }, + + methods: { + setNow: function setNow () { + this.__updateValue(Object.assign({}, this.__getCurrentDate(), + this.__getCurrentTime())); + this.view = 'Hour'; + }, + + __getDefaultDateModel: function __getDefaultDateModel () { + if (typeof this.defaultDate !== 'string') { + var date = this.__getCurrentDate(); + date.dateHash = date.year + '/' + pad(date.month) + '/' + pad(date.day); + + return date + } + + return __splitDate(this.defaultDate, 'YYYY/MM/DD', void 0, this.calendar) + }, + + __click: function __click (evt) { + // __activate() has already updated the offset + // we only need to change the view now, so: + + if (this.$q.platform.is.desktop !== true) { + this.__drag({ isFirst: true, evt: evt }); + } + + this.__drag({ isFinal: true, evt: evt }); + }, + + __activate: function __activate (evt) { + this.__drag({ isFirst: true, evt: evt }, true); + this.__drag({ isFinal: true, evt: evt }, true); + }, + + __drag: function __drag (event, noViewChange) { + // cases when on a popup getting closed + // on previously emitted value + if (this._isBeingDestroyed === true || this._isDestroyed === true) { + return + } + + if (event.isFirst) { + var + clock = this.$refs.clock; + var ref = clock.getBoundingClientRect(); + var top = ref.top; + var left = ref.left; + var width = ref.width; + var dist = width / 2; + + this.dragging = { + top: top + dist, + left: left + dist, + dist: dist * 0.7 + }; + this.dragCache = null; + this.__updateClock(event.evt); + return + } + + this.__updateClock(event.evt); + + if (event.isFinal && noViewChange !== true) { + this.dragging = false; + + if (this.view === 'Hour') { + this.view = 'Minute'; + } + else if (this.withSeconds && this.view === 'Minute') { + this.view = 'Second'; + } + } + }, + + __updateClock: function __updateClock (evt) { + var + val, + pos = position(evt), + height = Math.abs(pos.top - this.dragging.top), + distance = Math.sqrt( + Math.pow(Math.abs(pos.top - this.dragging.top), 2) + + Math.pow(Math.abs(pos.left - this.dragging.left), 2) + ), + angle = Math.asin(height / distance) * (180 / Math.PI); + + if (pos.top < this.dragging.top) { + angle = this.dragging.left < pos.left ? 90 - angle : 270 + angle; + } + else { + angle = this.dragging.left < pos.left ? angle + 90 : 270 - angle; + } + + if (this.view === 'Hour') { + val = Math.round(angle / 30); + + if (this.computedFormat24h === true) { + if (distance < this.dragging.dist) { + if (val < 12) { + val += 12; + } + } + else if (val === 12) { + val = 0; + } + this.isAM = val < 12; + } + else if (this.isAM === true && val === 12) { + val = 0; + } + else if (this.isAM === false && val !== 12) { + val += 12; + } + } + else { + val = Math.round(angle / 6); + + if (val === 60) { + val = 0; + } + } + + if (this.dragCache === val) { + return + } + + var opt = this[((this.view.toLowerCase()) + "InSelection")]; + + if (opt !== void 0 && opt(val) !== true) { + return + } + + this.dragCache = val; + this[("__set" + (this.view))](val); + }, + + __onKeyupHour: function __onKeyupHour (e) { + if (e.keyCode === 13) { // ENTER + this.view = 'Hour'; + } + else { + var + wrap = this.computedFormat24h === true ? 24 : 12, + offset = this.computedFormat24h !== true && this.isAM === false ? 12 : 0; + + if (e.keyCode === 37) { // ARROW LEFT + this.__setHour(offset + (24 + this.innerModel.hour - 1) % wrap); + } + else if (e.keyCode === 39) { // ARROW RIGHT + this.__setHour(offset + (24 + this.innerModel.hour + 1) % wrap); + } + } + }, + + __onKeyupMinute: function __onKeyupMinute (e) { + if (e.keyCode === 13) { // ENTER + this.view = 'Minute'; + } + else if (e.keyCode === 37) { // ARROW LEFT + this.__setMinute((60 + this.innerModel.minute - 1) % 60); + } + else if (e.keyCode === 39) { // ARROW RIGHT + this.__setMinute((60 + this.innerModel.minute + 1) % 60); + } + }, + + __onKeyupSecond: function __onKeyupSecond (e) { + if (e.keyCode === 13) { // ENTER + this.view = 'Second'; + } + else if (e.keyCode === 37) { // ARROW LEFT + this.__setSecond((60 + this.innerModel.second - 1) % 60); + } + else if (e.keyCode === 39) { // ARROW RIGHT + this.__setSecond((60 + this.innerModel.second + 1) % 60); + } + }, + + __getHeader: function __getHeader (h) { + var this$1 = this; + + var label = [ + h('div', { + staticClass: 'q-time__link', + class: this.view === 'Hour' ? 'q-time__link--active' : 'cursor-pointer', + attrs: { tabindex: this.computedTabindex }, + on: cache(this, 'vH', { + click: function () { this$1.view = 'Hour'; }, + keyup: this.__onKeyupHour + }) + }, [ this.stringModel.hour ]), + + h('div', [ ':' ]), + + h( + 'div', + this.minLink === true + ? { + staticClass: 'q-time__link', + class: this.view === 'Minute' ? 'q-time__link--active' : 'cursor-pointer', + attrs: { tabindex: this.computedTabindex }, + on: cache(this, 'vM', { + click: function () { this$1.view = 'Minute'; }, + keyup: this.__onKeyupMinute + }) + } + : { staticClass: 'q-time__link' }, + [ this.stringModel.minute ] + ) + ]; + + if (this.withSeconds === true) { + label.push( + h('div', [ ':' ]), + + h( + 'div', + this.secLink === true + ? { + staticClass: 'q-time__link', + class: this.view === 'Second' ? 'q-time__link--active' : 'cursor-pointer', + attrs: { tabindex: this.computedTabindex }, + on: cache(this, 'vS', { + click: function () { this$1.view = 'Second'; }, + keyup: this.__onKeyupSecond + }) + } + : { staticClass: 'q-time__link' }, + [ this.stringModel.second ] + ) + ); + } + + return h('div', { + staticClass: 'q-time__header flex flex-center no-wrap', + class: this.headerClass + }, [ + h('div', { + staticClass: 'q-time__header-label row items-center no-wrap', + attrs: { dir: 'ltr' } + }, label), + + this.computedFormat24h === false ? h('div', { + staticClass: 'q-time__header-ampm column items-between no-wrap' + }, [ + h('div', { + staticClass: 'q-time__link', + class: this.isAM === true ? 'q-time__link--active' : 'cursor-pointer', + attrs: { tabindex: this.computedTabindex }, + on: cache(this, 'AM', { + click: this.__setAm, + keyup: function (e) { e.keyCode === 13 && this$1.__setAm(); } + }) + }, [ 'AM' ]), + + h('div', { + staticClass: 'q-time__link', + class: this.isAM !== true ? 'q-time__link--active' : 'cursor-pointer', + attrs: { tabindex: this.computedTabindex }, + on: cache(this, 'PM', { + click: this.__setPm, + keyup: function (e) { e.keyCode === 13 && this$1.__setPm(); } + }) + }, [ 'PM' ]) + ]) : null + ]) + }, + + __getClock: function __getClock (h) { + var this$1 = this; + + var + view = this.view.toLowerCase(), + current = this.innerModel[view]; + + return h('div', { + staticClass: 'q-time__content col relative-position' + }, [ + h('transition', { + props: { name: 'q-transition--scale' } + }, [ + h('div', { + key: 'clock' + this.view, + staticClass: 'q-time__container-parent absolute-full' + }, [ + h('div', { + ref: 'clock', + staticClass: 'q-time__container-child fit overflow-hidden' + }, [ + h('div', { + staticClass: 'q-time__clock cursor-pointer non-selectable', + on: cache(this, 'click', { + click: this.__click, + mousedown: this.__activate + }), + directives: cache(this, 'touch', [{ + name: 'touch-pan', + value: this.__drag, + modifiers: { + stop: true, + prevent: true, + mouse: true + } + }]) + }, [ + h('div', { staticClass: 'q-time__clock-circle fit' }, [ + h('div', { + staticClass: 'q-time__clock-pointer', + style: this.pointerStyle, + class: this.innerModel[view] === null ? 'hidden' : (this.color !== void 0 ? ("text-" + (this.color)) : '') + }), + + this.positions.map(function (pos) { return h('div', { + staticClass: ("q-time__clock-position row flex-center q-time__clock-pos-" + (pos.index)), + class: pos.val === current + ? this$1.headerClass.concat(' q-time__clock-position--active') + : (pos.disable === true ? 'q-time__clock-position--disable' : null) + }, [ h('span', [ pos.label ]) ]); }) + ]) + ]) + ]) + ]) + ]), + + this.nowBtn === true ? h(QBtn, { + staticClass: 'q-time__now-button absolute', + props: { + icon: this.$q.iconSet.datetime.now, + unelevated: true, + size: 'sm', + round: true, + color: this.color, + textColor: this.textColor, + tabindex: this.computedTabindex + }, + on: cache(this, 'now', { + click: this.setNow + }) + }) : null + ]) + }, + + __setHour: function __setHour (hour) { + if (this.innerModel.hour !== hour) { + this.innerModel.hour = hour; + this.innerModel.minute = null; + this.innerModel.second = null; + } + }, + + __setMinute: function __setMinute (minute) { + if (this.innerModel.minute !== minute) { + this.innerModel.minute = minute; + this.innerModel.second = null; + this.withSeconds !== true && this.__updateValue({ minute: minute }); + } + }, + + __setSecond: function __setSecond (second) { + this.innerModel.second !== second && this.__updateValue({ second: second }); + }, + + __setAm: function __setAm () { + if (this.isAM) { return } + + this.isAM = true; + + if (this.innerModel.hour === null) { return } + this.innerModel.hour -= 12; + this.__verifyAndUpdate(); + }, + + __setPm: function __setPm () { + if (!this.isAM) { return } + + this.isAM = false; + + if (this.innerModel.hour === null) { return } + this.innerModel.hour += 12; + this.__verifyAndUpdate(); + }, + + __verifyAndUpdate: function __verifyAndUpdate () { + if (this.hourInSelection !== void 0 && this.hourInSelection(this.innerModel.hour) !== true) { + this.innerModel = __splitDate(); + this.isAM = true; + this.view = 'Hour'; + return + } + + if (this.minuteInSelection !== void 0 && this.minuteInSelection(this.innerModel.minute) !== true) { + this.innerModel.minute = null; + this.innerModel.second = null; + this.view = 'Minute'; + return + } + + if (this.withSeconds === true && this.secondInSelection !== void 0 && this.secondInSelection(this.innerModel.second) !== true) { + this.innerModel.second = null; + this.view = 'Second'; + return + } + + if (this.innerModel.hour === null || this.innerModel.minute === null || (this.withSeconds === true && this.innerModel.second === null)) { + return + } + + this.__updateValue({}); + }, + + __getComputedMask: function __getComputedMask () { + return this.calendar !== 'persian' && this.mask !== null + ? this.mask + : ("HH:mm" + (this.withSeconds === true ? ':ss' : '')) + }, + + __updateValue: function __updateValue (obj) { + var date = Object.assign({}, this.innerModel, + obj); + + var val = this.calendar === 'persian' + ? pad(date.hour) + ':' + + pad(date.minute) + + (this.withSeconds === true ? ':' + pad(date.second) : '') + : formatDate( + new Date( + date.year, + date.month === null ? null : date.month - 1, + date.day, + date.hour, + date.minute, + date.second, + date.millisecond + ), + this.computedMask, + this.computedLocale, + date.year + ); + + date.changed = val !== this.value; + this.$emit('input', val, date); + } + }, + + render: function render (h) { + var child = [ + this.__getClock(h) + ]; + + var def = slot(this, 'default'); + def !== void 0 && child.push( + h('div', { staticClass: 'q-time__actions' }, def) + ); + + if (this.name !== void 0 && this.disable !== true) { + this.__injectFormInput(child, 'push'); + } + + return h('div', { + class: this.classes, + on: this.$listeners, + attrs: { tabindex: -1 } + }, [ + this.__getHeader(h), + h('div', { staticClass: 'q-time__main col overflow-auto' }, child) + ]) + } + }); + + var QTimeline = Vue.extend({ + name: 'QTimeline', + + mixins: [ DarkMixin ], + + provide: function provide () { + return { + __timeline: this + } + }, + + props: { + color: { + type: String, + default: 'primary' + }, + side: { + type: String, + default: 'right', + validator: function (v) { return ['left', 'right'].includes(v); } + }, + layout: { + type: String, + default: 'dense', + validator: function (v) { return ['dense', 'comfortable', 'loose'].includes(v); } + } + }, + + computed: { + classes: function classes () { + return "q-timeline--" + (this.layout) + " q-timeline--" + (this.layout) + "--" + (this.side) + + (this.isDark === true ? ' q-timeline--dark' : '') + } + }, + + render: function render (h) { + return h('ul', { + staticClass: 'q-timeline', + class: this.classes, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + var QTimelineEntry = Vue.extend({ + name: 'QTimelineEntry', + + inject: { + __timeline: { + default: function default$1 () { + console.error('QTimelineEntry needs to be child of QTimeline'); + } + } + }, + + props: { + heading: Boolean, + tag: { + type: String, + default: 'h3' + }, + side: { + type: String, + default: 'right', + validator: function (v) { return ['left', 'right'].includes(v); } + }, + + icon: String, + avatar: String, + + color: String, + + title: String, + subtitle: String, + body: String + }, + + computed: { + colorClass: function colorClass () { + return ("text-" + (this.color || this.__timeline.color)) + }, + + classes: function classes () { + return "q-timeline__entry--" + (this.side) + + (this.icon !== void 0 || this.avatar !== void 0 ? ' q-timeline__entry--icon' : '') + }, + + reverse: function reverse () { + return this.__timeline.layout === 'comfortable' && this.__timeline.side === 'left' + } + }, + + render: function render (h) { + var child = uniqueSlot(this, 'default', []); + + if (this.body !== void 0) { + child.unshift(this.body); + } + + if (this.heading === true) { + var content$1 = [ + h('div'), + h('div'), + h( + this.tag, + { staticClass: 'q-timeline__heading-title' }, + child + ) + ]; + + return h('div', { + staticClass: 'q-timeline__heading', + on: this.$listeners + }, this.reverse === true ? content$1.reverse() : content$1) + } + + var dot; + + if (this.icon !== void 0) { + dot = [ + h(QIcon, { + staticClass: 'row items-center justify-center', + props: { name: this.icon } + }) + ]; + } + else if (this.avatar !== void 0) { + dot = [ + h('img', { + staticClass: 'q-timeline__dot-img', + domProps: { src: this.avatar } + }) + ]; + } + + var content = [ + h('div', { staticClass: 'q-timeline__subtitle' }, [ + h('span', slot(this, 'subtitle', [ this.subtitle ])) + ]), + + h('div', { + staticClass: 'q-timeline__dot', + class: this.colorClass + }, dot), + + h('div', { staticClass: 'q-timeline__content' }, [ + h('h6', { staticClass: 'q-timeline__title' }, slot(this, 'title', [ this.title ])) + ].concat(child)) + ]; + + return h('li', { + staticClass: 'q-timeline__entry', + class: this.classes, + on: this.$listeners + }, this.reverse === true ? content.reverse() : content) + } + }); + + var QToolbar = Vue.extend({ + name: 'QToolbar', + + props: { + inset: Boolean + }, + + render: function render (h) { + return h('div', { + staticClass: 'q-toolbar row no-wrap items-center', + class: this.inset ? 'q-toolbar--inset' : null, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + var QToolbarTitle = Vue.extend({ + name: 'QToolbarTitle', + + props: { + shrink: Boolean + }, + + render: function render (h) { + return h('div', { + staticClass: 'q-toolbar__title ellipsis', + class: this.shrink === true ? 'col-shrink' : null, + on: this.$listeners + }, slot(this, 'default')) + } + }); + + var QTree = Vue.extend({ + name: 'QTree', + + mixins: [ DarkMixin ], + + props: { + nodes: { + type: Array, + required: true + }, + nodeKey: { + type: String, + required: true + }, + labelKey: { + type: String, + default: 'label' + }, + + color: String, + controlColor: String, + textColor: String, + selectedColor: String, + + icon: String, + + tickStrategy: { + type: String, + default: 'none', + validator: function (v) { return ['none', 'strict', 'leaf', 'leaf-filtered'].includes(v); } + }, + ticked: Array, // sync + expanded: Array, // sync + selected: {}, // sync + + defaultExpandAll: Boolean, + accordion: Boolean, + + filter: String, + filterMethod: { + type: Function, + default: function default$1 (node, filter) { + var filt = filter.toLowerCase(); + return node[this.labelKey] && + node[this.labelKey].toLowerCase().indexOf(filt) > -1 + } + }, + + duration: Number, + noConnectors: Boolean, + + noNodesLabel: String, + noResultsLabel: String + }, + + computed: { + classes: function classes () { + return "q-tree" + + (this.noConnectors === true ? " q-tree--no-connectors" : '') + + (this.isDark === true ? " q-tree--dark" : '') + + (this.color !== void 0 ? (" text-" + (this.color)) : '') + }, + + hasSelection: function hasSelection () { + return this.selected !== void 0 + }, + + computedIcon: function computedIcon () { + return this.icon || this.$q.iconSet.tree.icon + }, + + computedControlColor: function computedControlColor () { + return this.controlColor || this.color + }, + + textColorClass: function textColorClass () { + if (this.textColor !== void 0) { + return ("text-" + (this.textColor)) + } + }, + + selectedColorClass: function selectedColorClass () { + var color = this.selectedColor || this.color; + if (color) { + return ("text-" + color) + } + }, + + meta: function meta () { + var this$1 = this; + + var meta = {}; + + var travel = function (node, parent) { + var tickStrategy = node.tickStrategy || (parent ? parent.tickStrategy : this$1.tickStrategy); + var + key = node[this$1.nodeKey], + isParent = node.children && node.children.length > 0, + isLeaf = isParent !== true, + selectable = node.disabled !== true && this$1.hasSelection === true && node.selectable !== false, + expandable = node.disabled !== true && node.expandable !== false, + hasTicking = tickStrategy !== 'none', + strictTicking = tickStrategy === 'strict', + leafFilteredTicking = tickStrategy === 'leaf-filtered', + leafTicking = tickStrategy === 'leaf' || tickStrategy === 'leaf-filtered'; + + var tickable = node.disabled !== true && node.tickable !== false; + if (leafTicking === true && tickable === true && parent && parent.tickable !== true) { + tickable = false; + } + + var lazy = node.lazy; + if (lazy && this$1.lazy[key]) { + lazy = this$1.lazy[key]; + } + + var m = { + key: key, + parent: parent, + isParent: isParent, + isLeaf: isLeaf, + lazy: lazy, + disabled: node.disabled, + link: node.disabled !== true && (selectable === true || (expandable === true && (isParent === true || lazy === true))), + children: [], + matchesFilter: this$1.filter ? this$1.filterMethod(node, this$1.filter) : true, + + selected: key === this$1.selected && selectable === true, + selectable: selectable, + expanded: isParent === true ? this$1.innerExpanded.includes(key) : false, + expandable: expandable, + noTick: node.noTick === true || (strictTicking !== true && lazy && lazy !== 'loaded'), + tickable: tickable, + tickStrategy: tickStrategy, + hasTicking: hasTicking, + strictTicking: strictTicking, + leafFilteredTicking: leafFilteredTicking, + leafTicking: leafTicking, + ticked: strictTicking === true + ? this$1.innerTicked.includes(key) + : (isLeaf === true ? this$1.innerTicked.includes(key) : false) + }; + + meta[key] = m; + + if (isParent === true) { + m.children = node.children.map(function (n) { return travel(n, m); }); + + if (this$1.filter) { + if (m.matchesFilter !== true) { + m.matchesFilter = m.children.some(function (n) { return n.matchesFilter; }); + } + else if ( + m.noTick !== true && + m.disabled !== true && + m.tickable === true && + leafFilteredTicking === true && + m.children.every(function (n) { return n.matchesFilter !== true || n.noTick === true || n.tickable !== true; }) === true + ) { + m.tickable = false; + } + } + + if (m.matchesFilter === true) { + if (m.noTick !== true && strictTicking !== true && m.children.every(function (n) { return n.noTick; }) === true) { + m.noTick = true; + } + + if (leafTicking) { + m.ticked = false; + m.indeterminate = m.children.some(function (node) { return node.indeterminate === true; }); + m.tickable = m.tickable === true && m.children.some(function (node) { return node.tickable; }); + + if (m.indeterminate !== true) { + var sel = m.children + .reduce(function (acc, meta) { return meta.ticked === true ? acc + 1 : acc; }, 0); + + if (sel === m.children.length) { + m.ticked = true; + } + else if (sel > 0) { + m.indeterminate = true; + } + } + + if (m.indeterminate === true) { + m.indeterminateNextState = m.children + .every(function (meta) { return meta.tickable !== true || meta.ticked !== true; }); + } + } + } + } + + return m + }; + + this.nodes.forEach(function (node) { return travel(node, null); }); + return meta + } + }, + + data: function data () { + return { + lazy: {}, + innerTicked: this.ticked || [], + innerExpanded: this.expanded || [] + } + }, + + watch: { + ticked: function ticked (val) { + this.innerTicked = val; + }, + + expanded: function expanded (val) { + this.innerExpanded = val; + } + }, + + methods: { + getNodeByKey: function getNodeByKey (key) { + var this$1 = this; + + var reduce = [].reduce; + + var find = function (result, node) { + if (result || !node) { + return result + } + if (Array.isArray(node) === true) { + return reduce.call(Object(node), find, result) + } + if (node[this$1.nodeKey] === key) { + return node + } + if (node.children) { + return find(null, node.children) + } + }; + + return find(null, this.nodes) + }, + + getTickedNodes: function getTickedNodes () { + var this$1 = this; + + return this.innerTicked.map(function (key) { return this$1.getNodeByKey(key); }) + }, + + getExpandedNodes: function getExpandedNodes () { + var this$1 = this; + + return this.innerExpanded.map(function (key) { return this$1.getNodeByKey(key); }) + }, + + isExpanded: function isExpanded (key) { + return key && this.meta[key] + ? this.meta[key].expanded + : false + }, + + collapseAll: function collapseAll () { + if (this.expanded !== void 0) { + this.$emit('update:expanded', []); + } + else { + this.innerExpanded = []; + } + }, + + expandAll: function expandAll () { + var this$1 = this; + + var + expanded = this.innerExpanded, + travel = function (node) { + if (node.children && node.children.length > 0) { + if (node.expandable !== false && node.disabled !== true) { + expanded.push(node[this$1.nodeKey]); + node.children.forEach(travel); + } + } + }; + + this.nodes.forEach(travel); + + if (this.expanded !== void 0) { + this.$emit('update:expanded', expanded); + } + else { + this.innerExpanded = expanded; + } + }, + + setExpanded: function setExpanded (key, state, node, meta) { + var this$1 = this; + if ( node === void 0 ) node = this.getNodeByKey(key); + if ( meta === void 0 ) meta = this.meta[key]; + + if (meta.lazy && meta.lazy !== 'loaded') { + if (meta.lazy === 'loading') { + return + } + + this.$set(this.lazy, key, 'loading'); + this.$emit('lazy-load', { + node: node, + key: key, + done: function (children) { + this$1.lazy[key] = 'loaded'; + if (children) { + this$1.$set(node, 'children', children); + } + this$1.$nextTick(function () { + var m = this$1.meta[key]; + if (m && m.isParent === true) { + this$1.__setExpanded(key, true); + } + }); + }, + fail: function () { + this$1.$delete(this$1.lazy, key); + } + }); + } + else if (meta.isParent === true && meta.expandable === true) { + this.__setExpanded(key, state); + } + }, + + __setExpanded: function __setExpanded (key, state) { + var this$1 = this; + + var target = this.innerExpanded; + var emit = this.expanded !== void 0; + + if (emit === true) { + target = target.slice(); + } + + if (state) { + if (this.accordion) { + if (this.meta[key]) { + var collapse = []; + if (this.meta[key].parent) { + this.meta[key].parent.children.forEach(function (m) { + if (m.key !== key && m.expandable === true) { + collapse.push(m.key); + } + }); + } + else { + this.nodes.forEach(function (node) { + var k = node[this$1.nodeKey]; + if (k !== key) { + collapse.push(k); + } + }); + } + if (collapse.length > 0) { + target = target.filter(function (k) { return collapse.includes(k) === false; }); + } + } + } + + target = target.concat([ key ]) + .filter(function (key, index, self) { return self.indexOf(key) === index; }); + } + else { + target = target.filter(function (k) { return k !== key; }); + } + + if (emit === true) { + this.$emit("update:expanded", target); + } + else { + this.innerExpanded = target; + } + }, + + isTicked: function isTicked (key) { + return key && this.meta[key] + ? this.meta[key].ticked + : false + }, + + setTicked: function setTicked (keys, state) { + var target = this.innerTicked; + var emit = this.ticked !== void 0; + + if (emit === true) { + target = target.slice(); + } + + if (state) { + target = target.concat(keys) + .filter(function (key, index, self) { return self.indexOf(key) === index; }); + } + else { + target = target.filter(function (k) { return keys.includes(k) === false; }); + } + + if (emit === true) { + this.$emit("update:ticked", target); + } + }, + + __getSlotScope: function __getSlotScope (node, meta, key) { + var this$1 = this; + + var scope = { tree: this, node: node, key: key, color: this.color, dark: this.isDark }; + + Object.defineProperty(scope, 'expanded', { + get: function () { return meta.expanded }, + set: function (val) { val !== meta.expanded && this$1.setExpanded(key, val); }, + configurable: true, + enumerable: true + }); + Object.defineProperty(scope, 'ticked', { + get: function () { return meta.ticked }, + set: function (val) { val !== meta.ticked && this$1.setTicked([ key ], val); }, + configurable: true, + enumerable: true + }); + + return scope + }, + + __getChildren: function __getChildren (h, nodes) { + var this$1 = this; + + return ( + this.filter + ? nodes.filter(function (n) { return this$1.meta[n[this$1.nodeKey]].matchesFilter; }) + : nodes + ).map(function (child) { return this$1.__getNode(h, child); }) + }, + + __getNodeMedia: function __getNodeMedia (h, node) { + if (node.icon !== void 0) { + return h(QIcon, { + staticClass: "q-tree__icon q-mr-sm", + props: { name: node.icon, color: node.iconColor } + }) + } + var src = node.img || node.avatar; + if (src) { + return h('img', { + staticClass: ("q-tree__" + (node.img ? 'img' : 'avatar') + " q-mr-sm"), + attrs: { src: src } + }) + } + }, + + __getNode: function __getNode (h, node) { + var this$1 = this; + + var + key = node[this.nodeKey], + meta = this.meta[key], + header = node.header + ? this.$scopedSlots[("header-" + (node.header))] || this.$scopedSlots['default-header'] + : this.$scopedSlots['default-header']; + + var children = meta.isParent === true + ? this.__getChildren(h, node.children) + : []; + + var isParent = children.length > 0 || (meta.lazy && meta.lazy !== 'loaded'); + + var + body = node.body + ? this.$scopedSlots[("body-" + (node.body))] || this.$scopedSlots['default-body'] + : this.$scopedSlots['default-body'], + slotScope = header !== void 0 || body !== void 0 + ? this.__getSlotScope(node, meta, key) + : null; + + if (body !== void 0) { + body = h('div', { staticClass: 'q-tree__node-body relative-position' }, [ + h('div', { class: this.textColorClass }, [ + body(slotScope) + ]) + ]); + } + + return h('div', { + key: key, + staticClass: 'q-tree__node relative-position', + class: { 'q-tree__node--parent': isParent, 'q-tree__node--child': !isParent } + }, [ + h('div', { + staticClass: 'q-tree__node-header relative-position row no-wrap items-center', + class: { + 'q-tree__node--link q-hoverable q-focusable': meta.link, + 'q-tree__node--selected': meta.selected, + 'q-tree__node--disabled': meta.disabled + }, + attrs: { tabindex: meta.link ? 0 : -1 }, + on: { + click: function (e) { + this$1.__onClick(node, meta, e); + }, + keypress: function (e) { + if (shouldIgnoreKey(e) !== true) { + if (e.keyCode === 13) { this$1.__onClick(node, meta, e, true); } + else if (e.keyCode === 32) { this$1.__onExpandClick(node, meta, e, true); } + } + } + } + }, [ + h('div', { staticClass: 'q-focus-helper', attrs: { tabindex: -1 }, ref: ("blurTarget_" + (meta.key)) }), + + meta.lazy === 'loading' + ? h(QSpinner, { + staticClass: 'q-tree__spinner q-mr-xs', + props: { color: this.computedControlColor } + }) + : ( + isParent === true + ? h(QIcon, { + staticClass: 'q-tree__arrow q-mr-xs', + class: { 'q-tree__arrow--rotate': meta.expanded }, + props: { name: this.computedIcon }, + nativeOn: { + click: function (e) { + this$1.__onExpandClick(node, meta, e); + } + } + }) + : null + ), + + meta.hasTicking === true && meta.noTick !== true + ? h(QCheckbox, { + staticClass: 'q-mr-xs', + props: { + value: meta.indeterminate === true ? null : meta.ticked, + color: this.computedControlColor, + dark: this.isDark, + dense: true, + keepColor: true, + disable: meta.tickable !== true + }, + on: { + keydown: stopAndPrevent, + input: function (v) { + this$1.__onTickedClick(meta, v); + } + } + }) + : null, + + h('div', { + 'staticClass': 'q-tree__node-header-content col row no-wrap items-center', + class: meta.selected ? this.selectedColorClass : this.textColorClass + }, [ + header + ? header(slotScope) + : [ + this.__getNodeMedia(h, node), + h('div', node[this.labelKey]) + ] + ]) + ]), + + isParent === true + ? h(QSlideTransition, { + props: { duration: this.duration }, + on: cache(this, 'slide', { + show: function () { this$1.$emit('after-show'); }, + hide: function () { this$1.$emit('after-hide'); } + }) + }, [ + h('div', { + staticClass: 'q-tree__node-collapsible', + class: this.textColorClass, + directives: [{ name: 'show', value: meta.expanded }] + }, [ + body, + + h('div', { + staticClass: 'q-tree__children', + class: { 'q-tree__node--disabled': meta.disabled } + }, children) + ]) + ]) + : body + ]) + }, + + __blur: function __blur (key) { + var blurTarget = this.$refs[("blurTarget_" + key)]; + blurTarget !== void 0 && blurTarget.focus(); + }, + + __onClick: function __onClick (node, meta, e, keyboard) { + keyboard !== true && this.__blur(meta.key); + + if (this.hasSelection) { + if (meta.selectable) { + this.$emit('update:selected', meta.key !== this.selected ? meta.key : null); + } + } + else { + this.__onExpandClick(node, meta, e, keyboard); + } + + if (typeof node.handler === 'function') { + node.handler(node); + } + }, + + __onExpandClick: function __onExpandClick (node, meta, e, keyboard) { + if (e !== void 0) { + stopAndPrevent(e); + } + keyboard !== true && this.__blur(meta.key); + this.setExpanded(meta.key, !meta.expanded, node, meta); + }, + + __onTickedClick: function __onTickedClick (meta, state) { + if (meta.indeterminate === true) { + state = meta.indeterminateNextState; + } + if (meta.strictTicking) { + this.setTicked([ meta.key ], state); + } + else if (meta.leafTicking) { + var keys = []; + var travel = function (meta) { + if (meta.isParent) { + if (state !== true && meta.noTick !== true && meta.tickable === true) { + keys.push(meta.key); + } + if (meta.leafTicking === true) { + meta.children.forEach(travel); + } + } + else if ( + meta.noTick !== true && + meta.tickable === true && + (meta.leafFilteredTicking !== true || meta.matchesFilter === true) + ) { + keys.push(meta.key); + } + }; + travel(meta); + this.setTicked(keys, state); + } + } + }, + + render: function render (h) { + var children = this.__getChildren(h, this.nodes); + + return h( + 'div', { + class: this.classes + }, + children.length === 0 + ? ( + this.filter + ? this.noResultsLabel || this.$q.lang.tree.noResults + : this.noNodesLabel || this.$q.lang.tree.noNodes + ) + : children + ) + }, + + created: function created () { + this.defaultExpandAll === true && this.expandAll(); + } + }); + + var QUploaderBase = Vue.extend({ + name: 'QUploaderBase', + + mixins: [ DarkMixin, FileMixin ], + + props: { + label: String, + + color: String, + textColor: String, + + square: Boolean, + flat: Boolean, + bordered: Boolean, + + noThumbnails: Boolean, + autoUpload: Boolean, + hideUploadBtn: Boolean, + + disable: Boolean, + readonly: Boolean + }, + + provide: function provide () { + return { + __qUploaderGetInput: this.__getInputControl + } + }, + + data: function data () { + return { + files: [], + queuedFiles: [], + uploadedFiles: [], + dnd: false, + expanded: false, + + uploadSize: 0, + uploadedSize: 0 + } + }, + + watch: { + isUploading: function isUploading (newVal, oldVal) { + if (oldVal === false && newVal === true) { + this.$emit('start'); + } + else if (oldVal === true && newVal === false) { + this.$emit('finish'); + } + } + }, + + computed: { + /* + * When extending: + * Required : isUploading + * Optional: isBusy + */ + + canUpload: function canUpload () { + return this.editable === true && + this.isBusy !== true && + this.isUploading !== true && + this.queuedFiles.length > 0 + }, + + canAddFiles: function canAddFiles () { + return this.editable && + this.isUploading !== true && + (this.multiple === true || this.queuedFiles.length === 0) + }, + + extensions: function extensions () { + if (this.accept !== void 0) { + return this.accept.split(',').map(function (ext) { + ext = ext.trim(); + // support "image/*" + if (ext.endsWith('/*')) { + ext = ext.slice(0, ext.length - 1); + } + return ext + }) + } + }, + + uploadProgress: function uploadProgress () { + return this.uploadSize === 0 + ? 0 + : this.uploadedSize / this.uploadSize + }, + + uploadProgressLabel: function uploadProgressLabel () { + return this.__getProgressLabel(this.uploadProgress) + }, + + uploadedSizeLabel: function uploadedSizeLabel () { + return humanStorageSize(this.uploadedSize) + }, + + uploadSizeLabel: function uploadSizeLabel () { + return humanStorageSize(this.uploadSize) + }, + + colorClass: function colorClass () { + var cls = []; + this.color !== void 0 && cls.push(("bg-" + (this.color))); + this.textColor !== void 0 && cls.push(("text-" + (this.textColor))); + return cls.join(' ') + }, + + editable: function editable () { + return this.disable !== true && this.readonly !== true + } + }, + + methods: { + reset: function reset () { + if (!this.disable) { + this.abort(); + this.uploadedSize = 0; + this.uploadSize = 0; + this.__revokeImgURLs(); + this.files = []; + this.queuedFiles = []; + this.uploadedFiles = []; + } + }, + + removeUploadedFiles: function removeUploadedFiles () { + if (!this.disable) { + this.files = this.files.filter(function (f) { + if (f.__status !== 'uploaded') { + return true + } + + f._img !== void 0 && window.URL.revokeObjectURL(f._img.src); + + return false + }); + this.uploadedFiles = []; + } + }, + + removeQueuedFiles: function removeQueuedFiles () { + var this$1 = this; + + if (!this.disable) { + var removedFiles = []; + + var files = this.files.filter(function (f) { + if (f.__status !== 'idle' && f.__status !== 'failed') { + return true + } + + this$1.uploadSize -= f.size; + removedFiles.push(f); + + f._img !== void 0 && window.URL.revokeObjectURL(f._img.src); + + return false + }); + + if (removedFiles.length > 0) { + this.files = files; + this.queuedFiles = []; + this.$emit('removed', removedFiles); + } + } + }, + + removeFile: function removeFile (file) { + if (this.disable) { return } + + if (file.__status === 'uploaded') { + this.uploadedFiles = this.uploadedFiles.filter(function (f) { return f.name !== file.name; }); + } + else if (file.__status === 'uploading') { + file.__abort(); + } + else { + this.uploadSize -= file.size; + } + + this.files = this.files.filter(function (f) { + if (f.name !== file.name) { + return true + } + + f._img !== void 0 && window.URL.revokeObjectURL(f._img.src); + + return false + }); + this.queuedFiles = this.queuedFiles.filter(function (f) { return f.name !== file.name; }); + this.$emit('removed', [ file ]); + }, + + __revokeImgURLs: function __revokeImgURLs () { + this.files.forEach(function (f) { + f._img !== void 0 && window.URL.revokeObjectURL(f._img.src); + }); + }, + + __getFileInput: function __getFileInput () { + return this.$refs.input || + this.$el.getElementsByClassName('q-uploader__input')[0] + }, + + __getProgressLabel: function __getProgressLabel (p) { + return (p * 100).toFixed(2) + '%' + }, + + __updateFile: function __updateFile (file, status, uploadedSize) { + file.__status = status; + + if (status === 'idle') { + file.__uploaded = 0; + file.__progress = 0; + file.__sizeLabel = humanStorageSize(file.size); + file.__progressLabel = '0.00%'; + return + } + if (status === 'failed') { + this.$forceUpdate(); + return + } + + file.__uploaded = status === 'uploaded' + ? file.size + : uploadedSize; + + file.__progress = status === 'uploaded' + ? 1 + : Math.min(0.9999, file.__uploaded / file.size); + + file.__progressLabel = this.__getProgressLabel(file.__progress); + this.$forceUpdate(); + }, + + __addFiles: function __addFiles (e, fileList) { + var this$1 = this; + + var files = this.__processFiles(e, fileList); + this.__getFileInput().value = ''; + + if (files === void 0) { return } + + files.forEach(function (file) { + this$1.__updateFile(file, 'idle'); + this$1.uploadSize += file.size; + + if (this$1.noThumbnails !== true && file.type.toUpperCase().startsWith('IMAGE')) { + var img = new Image(); + img.src = window.URL.createObjectURL(file); + file.__img = img; + } + }); + + this.files = this.files.concat(files); + this.queuedFiles = this.queuedFiles.concat(files); + this.$emit('added', files); + this.autoUpload === true && this.upload(); + }, + + __getBtn: function __getBtn (h, show, icon, fn) { + if (show === true) { + return h(QBtn, { + props: { + type: 'a', + icon: this.$q.iconSet.uploader[icon], + flat: true, + dense: true + }, + on: icon === 'add' ? null : { click: fn } + }, icon === 'add' ? this.__getInputControl(h) : null) + } + }, + + __getInputControl: function __getInputControl (h) { + return [ + h('input', { + ref: 'input', + staticClass: 'q-uploader__input overflow-hidden absolute-full', + attrs: Object.assign({}, {tabindex: -1, + type: 'file', + title: '', // try to remove default tooltip + accept: this.accept}, + (this.multiple === true ? { multiple: true } : {})), + on: cache(this, 'input', { + mousedown: stop, // need to stop refocus from QBtn + change: this.__addFiles + }) + }) + ] + }, + + __getHeader: function __getHeader (h) { + if (this.$scopedSlots.header !== void 0) { + return this.$scopedSlots.header(this) + } + + return [ + h('div', { + staticClass: 'q-uploader__header-content flex flex-center no-wrap q-gutter-xs' + }, [ + this.__getBtn(h, this.queuedFiles.length > 0, 'removeQueue', this.removeQueuedFiles), + this.__getBtn(h, this.uploadedFiles.length > 0, 'removeUploaded', this.removeUploadedFiles), + + this.isUploading === true + ? h(QSpinner, { staticClass: 'q-uploader__spinner' }) + : null, + + h('div', { staticClass: 'col column justify-center' }, [ + this.label !== void 0 + ? h('div', { staticClass: 'q-uploader__title' }, [ this.label ]) + : null, + + h('div', { staticClass: 'q-uploader__subtitle' }, [ + this.uploadSizeLabel + ' / ' + this.uploadProgressLabel + ]) + ]), + + this.__getBtn(h, this.canAddFiles, 'add', this.pickFiles), + this.__getBtn(h, this.hideUploadBtn === false && this.canUpload === true, 'upload', this.upload), + this.__getBtn(h, this.isUploading, 'clear', this.abort) + ]) + ] + }, + + __getList: function __getList (h) { + var this$1 = this; + + if (this.$scopedSlots.list !== void 0) { + return this.$scopedSlots.list(this) + } + + return this.files.map(function (file) { return h('div', { + key: file.name, + staticClass: 'q-uploader__file relative-position', + class: { + 'q-uploader__file--img': this$1.noThumbnails !== true && file.__img !== void 0, + 'q-uploader__file--failed': file.__status === 'failed', + 'q-uploader__file--uploaded': file.__status === 'uploaded' + }, + style: this$1.noThumbnails !== true && file.__img !== void 0 ? { + backgroundImage: 'url(' + file.__img.src + ')' + } : null + }, [ + h('div', { + staticClass: 'q-uploader__file-header row flex-center no-wrap' + }, [ + file.__status === 'failed' + ? h(QIcon, { + staticClass: 'q-uploader__file-status', + props: { + name: this$1.$q.iconSet.type.negative, + color: 'negative' + } + }) + : null, + + h('div', { staticClass: 'q-uploader__file-header-content col' }, [ + h('div', { staticClass: 'q-uploader__title' }, [ file.name ]), + h('div', { + staticClass: 'q-uploader__subtitle row items-center no-wrap' + }, [ + file.__sizeLabel + ' / ' + file.__progressLabel + ]) + ]), + + file.__status === 'uploading' + ? h(QCircularProgress, { + props: { + value: file.__progress, + min: 0, + max: 1, + indeterminate: file.__progress === 0 + } + }) + : h(QBtn, { + props: { + round: true, + dense: true, + flat: true, + icon: this$1.$q.iconSet.uploader[file.__status === 'uploaded' ? 'done' : 'clear'] + }, + on: { + click: function () { this$1.removeFile(file); } + } + }) + ]) + ]); }) + } + }, + + beforeDestroy: function beforeDestroy () { + this.isUploading === true && this.abort(); + this.files.length > 0 && this.__revokeImgURLs(); + }, + + render: function render (h) { + var children = [ + h('div', { + staticClass: 'q-uploader__header', + class: this.colorClass + }, this.__getHeader(h)), + + h('div', { + staticClass: 'q-uploader__list scroll' + }, this.__getList(h)), + + this.__getDnd(h, 'uploader') + ]; + + this.isBusy === true && children.push( + h('div', { + staticClass: 'q-uploader__overlay absolute-full flex flex-center' + }, [ h(QSpinner) ]) + ); + + return h('div', { + staticClass: 'q-uploader column no-wrap', + class: { + 'q-uploader--dark q-dark': this.isDark, + 'q-uploader--bordered': this.bordered, + 'q-uploader--square no-border-radius': this.square, + 'q-uploader--flat no-shadow': this.flat, + 'disabled q-uploader--disable': this.disable + }, + on: this.canAddFiles === true + ? cache(this, 'drag', { dragover: this.__onDragOver }) + : null + }, children) + } + }); + + function getFn (prop) { + return typeof prop === 'function' + ? prop + : function () { return prop; } + } + + var UploaderXHRMixin = { + props: { + url: [Function, String], + method: { + type: [Function, String], + default: 'POST' + }, + fieldName: { + type: [Function, String], + default: function (file) { return file.name; } + }, + headers: [Function, Array], + formFields: [Function, Array], + withCredentials: [Function, Boolean], + sendRaw: [Function, Boolean], + + batch: [Function, Boolean], + factory: Function + }, + + data: function data () { + return { + xhrs: [], + promises: [], + workingThreads: 0 + } + }, + + computed: { + xhrProps: function xhrProps () { + return { + url: getFn(this.url), + method: getFn(this.method), + headers: getFn(this.headers), + formFields: getFn(this.formFields), + fieldName: getFn(this.fieldName), + withCredentials: getFn(this.withCredentials), + sendRaw: getFn(this.sendRaw), + batch: getFn(this.batch) + } + }, + + isUploading: function isUploading () { + return this.workingThreads > 0 + }, + + isBusy: function isBusy () { + return this.promises.length > 0 + } + }, + + methods: { + abort: function abort () { + this.xhrs.forEach(function (x) { x.abort(); }); + + if (this.promises.length > 0) { + this.abortPromises = true; + } + }, + + upload: function upload () { + var this$1 = this; + + if (this.canUpload === false) { + return + } + + var queue = this.queuedFiles.slice(0); + this.queuedFiles = []; + + if (this.xhrProps.batch(queue)) { + this.__runFactory(queue); + } + else { + queue.forEach(function (file) { + this$1.__runFactory([ file ]); + }); + } + }, + + __runFactory: function __runFactory (files) { + var this$1 = this; + + this.workingThreads++; + + if (typeof this.factory !== 'function') { + this.__uploadFiles(files, {}); + return + } + + var res = this.factory(files); + + if (!res) { + this.$emit( + 'factory-failed', + new Error('QUploader: factory() does not return properly'), + files + ); + this.workingThreads--; + } + else if (typeof res.catch === 'function' && typeof res.then === 'function') { + this.promises.push(res); + + var failed = function (err) { + if (this$1._isBeingDestroyed !== true && this$1._isDestroyed !== true) { + this$1.promises = this$1.promises.filter(function (p) { return p !== res; }); + + if (this$1.promises.length === 0) { + this$1.abortPromises = false; + } + + this$1.queuedFiles = this$1.queuedFiles.concat(files); + files.forEach(function (f) { this$1.__updateFile(f, 'failed'); }); + + this$1.$emit('factory-failed', err, files); + this$1.workingThreads--; + } + }; + + res.then(function (factory) { + if (this$1.abortPromises === true) { + failed(new Error('Aborted')); + } + else if (this$1._isBeingDestroyed !== true && this$1._isDestroyed !== true) { + this$1.promises = this$1.promises.filter(function (p) { return p !== res; }); + this$1.__uploadFiles(files, factory); + } + }).catch(failed); + } + else { + this.__uploadFiles(files, res || {}); + } + }, + + __uploadFiles: function __uploadFiles (files, factory) { + var this$1 = this; + + var + form = new FormData(), + xhr = new XMLHttpRequest(); + + var getProp = function (name, arg) { + return factory[name] !== void 0 + ? getFn(factory[name])(arg) + : this$1.xhrProps[name](arg) + }; + + var url = getProp('url', files); + + if (!url) { + console.error('q-uploader: invalid or no URL specified'); + this.workingThreads--; + return + } + + var fields = getProp('formFields', files); + fields !== void 0 && fields.forEach(function (field) { + form.append(field.name, field.value); + }); + + var + uploadIndex = 0, + uploadIndexSize = 0, + uploadedSize = 0, + maxUploadSize = 0, + aborted; + + xhr.upload.addEventListener('progress', function (e) { + if (aborted === true) { return } + + var loaded = Math.min(maxUploadSize, e.loaded); + + this$1.uploadedSize += loaded - uploadedSize; + uploadedSize = loaded; + + var size = uploadedSize - uploadIndexSize; + for (var i = uploadIndex; size > 0 && i < files.length; i++) { + var + file = files[i], + uploaded = size > file.size; + + if (uploaded) { + size -= file.size; + uploadIndex++; + uploadIndexSize += file.size; + this$1.__updateFile(file, 'uploading', file.size); + } + else { + this$1.__updateFile(file, 'uploading', size); + return + } + } + }, false); + + xhr.onreadystatechange = function () { + if (xhr.readyState < 4) { + return + } + + if (xhr.status && xhr.status < 400) { + this$1.uploadedFiles = this$1.uploadedFiles.concat(files); + files.forEach(function (f) { this$1.__updateFile(f, 'uploaded'); }); + this$1.$emit('uploaded', { files: files, xhr: xhr }); + } + else { + aborted = true; + this$1.uploadedSize -= uploadedSize; + this$1.queuedFiles = this$1.queuedFiles.concat(files); + files.forEach(function (f) { this$1.__updateFile(f, 'failed'); }); + this$1.$emit('failed', { files: files, xhr: xhr }); + } + + this$1.workingThreads--; + this$1.xhrs = this$1.xhrs.filter(function (x) { return x !== xhr; }); + }; + + xhr.open( + getProp('method', files), + url + ); + + if (getProp('withCredentials', files) === true) { + xhr.withCredentials = true; + } + + var headers = getProp('headers', files); + headers !== void 0 && headers.forEach(function (head) { + xhr.setRequestHeader(head.name, head.value); + }); + + var sendRaw = getProp('sendRaw', files); + + files.forEach(function (file) { + this$1.__updateFile(file, 'uploading', 0); + if (sendRaw !== true) { + form.append(getProp('fieldName', file), file, file.name); + } + file.xhr = xhr; + file.__abort = function () { xhr.abort(); }; + maxUploadSize += file.size; + }); + + this.$emit('uploading', { files: files, xhr: xhr }); + this.xhrs.push(xhr); + + if (sendRaw === true) { + xhr.send(new Blob(files)); + } + else { + xhr.send(form); + } + } + } + }; + + var QUploader = Vue.extend({ + name: 'QUploader', + mixins: [ QUploaderBase, UploaderXHRMixin ] + }); + + var QUploaderAddTrigger = Vue.extend({ + name: 'QUploaderAddTrigger', + + inject: { + __qUploaderGetInput: { + default: function default$1 () { + console.error('QUploaderAddTrigger needs to be child of QUploader'); + } + } + }, + + render: function render (h) { + return this.__qUploaderGetInput(h) + } + }); + + var QVideo = Vue.extend({ + name: 'QVideo', + + mixins: [ RatioMixin ], + + props: { + src: { + type: String, + required: true + } + }, + + computed: { + iframeData: function iframeData () { + return { + attrs: { + src: this.src, + frameborder: '0', + allowfullscreen: true + } + } + }, + + classes: function classes () { + return 'q-video' + + (this.ratio !== void 0 ? ' q-video--responsive' : '') + } + }, + + render: function render (h) { + return h('div', { + class: this.classes, + style: this.ratioStyle, + on: this.$listeners + }, [ + h('iframe', this.iframeData) + ]) + } + }); + + + + var components$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + QAjaxBar: QAjaxBar, + QAvatar: QAvatar, + QBadge: QBadge, + QBanner: QBanner, + QBar: QBar, + QBreadcrumbs: QBreadcrumbs, + QBreadcrumbsEl: QBreadcrumbsEl, + QBtn: QBtn, + QBtnDropdown: QBtnDropdown, + QBtnGroup: QBtnGroup, + QBtnToggle: QBtnToggle, + QCard: QCard, + QCardSection: QCardSection, + QCardActions: QCardActions, + QCarousel: QCarousel, + QCarouselSlide: QCarouselSlide, + QCarouselControl: QCarouselControl, + QChatMessage: QChatMessage, + QCheckbox: QCheckbox, + QChip: QChip, + QCircularProgress: QCircularProgress, + QColor: QColor, + QDate: QDate, + QDialog: QDialog, + QDrawer: QDrawer, + QEditor: QEditor, + QExpansionItem: QExpansionItem, + QFab: QFab, + QFabAction: QFabAction, + QField: QField, + QFile: QFile, + QFooter: QFooter, + QForm: QForm, + QHeader: QHeader, + QIcon: QIcon, + QImg: QImg, + QInfiniteScroll: QInfiniteScroll, + QInnerLoading: QInnerLoading, + QInput: QInput, + QIntersection: QIntersection, + QList: QList, + QItem: QItem, + QItemSection: QItemSection, + QItemLabel: QItemLabel, + QKnob: QKnob, + QLayout: QLayout, + QMarkupTable: QMarkupTable, + QMenu: QMenu, + QNoSsr: QNoSsr, + QOptionGroup: QOptionGroup, + QPage: QPage, + QPageContainer: QPageContainer, + QPageScroller: QPageScroller, + QPageSticky: QPageSticky, + QPagination: QPagination, + QParallax: QParallax, + QPopupEdit: QPopupEdit, + QPopupProxy: QPopupProxy, + QLinearProgress: QLinearProgress, + QPullToRefresh: QPullToRefresh, + QRadio: QRadio, + QRange: QRange, + QRating: QRating, + QResizeObserver: QResizeObserver, + QResponsive: QResponsive, + QScrollArea: QScrollArea, + QScrollObserver: QScrollObserver, + QSelect: QSelect, + QSeparator: QSeparator, + QSkeleton: QSkeleton, + QSlideItem: QSlideItem, + QSlideTransition: QSlideTransition, + QSlider: QSlider, + QSpace: QSpace, + QSpinner: QSpinner, + QSpinnerAudio: QSpinnerAudio, + QSpinnerBall: QSpinnerBall, + QSpinnerBars: QSpinnerBars, + QSpinnerComment: QSpinnerComment, + QSpinnerCube: QSpinnerCube, + QSpinnerDots: QSpinnerDots, + QSpinnerFacebook: QSpinnerFacebook, + QSpinnerGears: QSpinnerGears, + QSpinnerGrid: QSpinnerGrid, + QSpinnerHearts: QSpinnerHearts, + QSpinnerHourglass: QSpinnerHourglass, + QSpinnerInfinity: QSpinnerInfinity, + QSpinnerIos: QSpinnerIos, + QSpinnerOval: QSpinnerOval, + QSpinnerPie: QSpinnerPie, + QSpinnerPuff: QSpinnerPuff, + QSpinnerRadio: QSpinnerRadio, + QSpinnerRings: QSpinnerRings, + QSpinnerTail: QSpinnerTail, + QSplitter: QSplitter, + QStep: QStep, + QStepper: QStepper, + QStepperNavigation: QStepperNavigation, + QTabPanels: QTabPanels, + QTabPanel: QTabPanel, + QTable: QTable, + QTh: QTh, + QTr: QTr, + QTd: QTd, + QTabs: QTabs, + QTab: QTab, + QRouteTab: QRouteTab, + QTime: QTime, + QTimeline: QTimeline, + QTimelineEntry: QTimelineEntry, + QToggle: QToggle, + QToolbar: QToolbar, + QToolbarTitle: QToolbarTitle, + QTooltip: QTooltip, + QTree: QTree, + QUploader: QUploader, + QUploaderBase: QUploaderBase, + QUploaderAddTrigger: QUploaderAddTrigger, + QVideo: QVideo, + QVirtualScroll: QVirtualScroll + }); + + /* + * depth + * < 0 --> close all chain + * 0 --> disabled + * > 0 --> close chain up to N parent + */ + + function getDepth (value) { + if (value === false) { + return 0 + } + if (value === true || value === void 0) { + return 1 + } + + var depth = parseInt(value, 10); + return isNaN(depth) ? 0 : depth + } + + var ClosePopup = { + name: 'close-popup', + + bind: function bind (el, ref, vnode) { + var value = ref.value; + + var ctx = { + depth: getDepth(value), + + handler: function handler (evt) { + // allow @click to be emitted + ctx.depth !== 0 && setTimeout(function () { + closePortals(vnode.componentInstance || vnode.context, evt, ctx.depth); + }); + }, + + handlerKey: function handlerKey (evt) { + isKeyCode(evt, 13) === true && ctx.handler(evt); + } + }; + + if (el.__qclosepopup !== void 0) { + el.__qclosepopup_old = el.__qclosepopup; + } + + el.__qclosepopup = ctx; + + el.addEventListener('click', ctx.handler); + el.addEventListener('keyup', ctx.handlerKey); + }, + + update: function update (el, ref) { + var value = ref.value; + var oldValue = ref.oldValue; + + if (el.__qclosepopup !== void 0 && value !== oldValue) { + el.__qclosepopup.depth = getDepth(value); + } + }, + + unbind: function unbind (el) { + var ctx = el.__qclosepopup_old || el.__qclosepopup; + if (ctx !== void 0) { + el.removeEventListener('click', ctx.handler); + el.removeEventListener('keyup', ctx.handlerKey); + delete el[el.__qclosepopup_old ? '__qclosepopup_old' : '__qclosepopup']; + } + } + }; + + var GoBack = { + name: 'go-back', + + bind: function bind (el, ref, vnode) { + var value = ref.value; + var modifiers = ref.modifiers; + + var ctx = { + value: value, + + position: window.history.length - 1, + single: modifiers.single, + + goBack: function goBack () { + var router = vnode.context.$router; + + if (ctx.single === true) { + router.go(-1); + } + else if (client.is.nativeMobile === true) { + router.go(ctx.position - window.history.length); + } + else { + router.replace(ctx.value); + } + }, + + goBackKey: function goBackKey (e) { + // if ENTER key + isKeyCode(e, 13) === true && ctx.goBack(); + } + }; + + if (el.__qgoback) { + el.__qgoback_old = el.__qgoback; + } + + el.__qgoback = ctx; + el.addEventListener('click', ctx.goBack); + el.addEventListener('keyup', ctx.goBackKey); + }, + + update: function update (el, ref) { + var value = ref.value; + var oldValue = ref.oldValue; + var modifiers = ref.modifiers; + + var ctx = el.__qgoback; + + if (ctx !== void 0) { + if (value !== oldValue) { + ctx.value = value; + } + + if (ctx.single !== modifiers.single) { + ctx.single = modifiers.single; + } + } + }, + + unbind: function unbind (el) { + var ctx = el.__qgoback_old || el.__qgoback; + if (ctx !== void 0) { + el.removeEventListener('click', ctx.goBack); + el.removeEventListener('keyup', ctx.goBackKey); + delete el[el.__qgoback_old ? '__qgoback_old' : '__qgoback']; + } + } + }; + + function objectWithoutProperties (obj, exclude) { var target = {}; for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k) && exclude.indexOf(k) === -1) target[k] = obj[k]; return target; } + + var defaultCfg$1 = { + childList: true, + subtree: true, + attributes: true, + characterData: true, + attributeOldValue: true, + characterDataOldValue: true + }; + + function update$1 (el, ctx, ref) { + var ref_modifiers = ref.modifiers; + var once = ref_modifiers.once; + var rest = objectWithoutProperties( ref_modifiers, ["once"] ); + var mod = rest; + var value = ref.value; + + var changed; + + ctx.once = once; + + if (ctx.handler !== value) { + changed = true; + ctx.handler = value; + } + + if (ctx.opts === void 0 || isDeepEqual(mod, ctx.mod) === false) { + changed = true; + ctx.mod = mod; + ctx.opts = Object.keys(mod).length === 0 + ? defaultCfg$1 + : mod; + } + + if (changed === true) { + ctx.observer !== void 0 && ctx.observer.disconnect(); + + ctx.observer = new MutationObserver(function (list) { + if (typeof ctx.handler === 'function') { + var res = ctx.handler(list); + if (res === false || ctx.once === true) { + destroy$1(el); + } + } + }); + + ctx.observer.observe(el, ctx.opts); + } + } + + function destroy$1 (el) { + var ctx = el.__qmutation; + + if (ctx !== void 0) { + ctx.observer !== void 0 && ctx.observer.disconnect(); + delete el.__qmutation; + } + } + + var Mutation = { + name: 'mutation', + + inserted: function inserted (el, binding) { + var ctx = {}; + update$1(el, ctx, binding); + el.__qmutation = ctx; + }, + + update: function update$1$1 (el, binding) { + var ctx = el.__qmutation; + ctx !== void 0 && update$1(el, ctx, binding); + }, + + unbind: destroy$1 + }; + + function updateBinding (ctx, ref) { + var value = ref.value; + var oldValue = ref.oldValue; + + if (typeof value !== 'function') { + ctx.scrollTarget.removeEventListener('scroll', ctx.scroll); + return + } + + ctx.handler = value; + if (typeof oldValue !== 'function') { + ctx.scrollTarget.addEventListener('scroll', ctx.scroll, listenOpts.passive); + ctx.scroll(); + } + } + + var ScrollFire = { + name: 'scroll-fire', + + bind: function bind (el) { + var ctx = { + scroll: debounce(function () { + var containerBottom, elBottom; + + if (ctx.scrollTarget === window) { + elBottom = el.getBoundingClientRect().bottom; + containerBottom = window.innerHeight; + } + else { + elBottom = offset(el).top + height(el); + containerBottom = offset(ctx.scrollTarget).top + height(ctx.scrollTarget); + } + + if (elBottom > 0 && elBottom < containerBottom) { + ctx.scrollTarget.removeEventListener('scroll', ctx.scroll, listenOpts.passive); + ctx.handler(el); + } + }, 25) + }; + + if (el.__qscrollfire) { + el.__qscrollfire_old = el.__qscrollfire; + } + + el.__qscrollfire = ctx; + }, + + inserted: function inserted (el, binding) { + var ctx = el.__qscrollfire; + ctx.scrollTarget = getScrollTarget(el); + updateBinding(ctx, binding); + }, + + update: function update (el, binding) { + if (el.__qscrollfire !== void 0 && binding.value !== binding.oldValue) { + updateBinding(el.__qscrollfire, binding); + } + }, + + unbind: function unbind (el) { + var ctx = el.__qscrollfire_old || el.__qscrollfire; + if (ctx !== void 0) { + ctx.scrollTarget.removeEventListener('scroll', ctx.scroll, listenOpts.passive); + delete el[el.__qscrollfire_old ? '__qscrollfire_old' : '__qscrollfire']; + } + } + }; + + function updateBinding$1 (ctx, ref) { + var value = ref.value; + var oldValue = ref.oldValue; + + if (typeof value !== 'function') { + ctx.scrollTarget.removeEventListener('scroll', ctx.scroll, listenOpts.passive); + return + } + + ctx.handler = value; + if (typeof oldValue !== 'function') { + ctx.scrollTarget.addEventListener('scroll', ctx.scroll, listenOpts.passive); + } + } + + var Scroll = { + name: 'scroll', + + bind: function bind (el) { + var ctx = { + scroll: function scroll () { + ctx.handler( + getScrollPosition(ctx.scrollTarget), + getHorizontalScrollPosition(ctx.scrollTarget) + ); + } + }; + + if (el.__qscroll) { + el.__qscroll_old = el.__qscroll; + } + + el.__qscroll = ctx; + }, + + inserted: function inserted (el, binding) { + var ctx = el.__qscroll; + ctx.scrollTarget = getScrollTarget(el); + updateBinding$1(ctx, binding); + }, + + update: function update (el, binding) { + if (el.__qscroll !== void 0 && binding.oldValue !== binding.value) { + updateBinding$1(el.__qscroll, binding); + } + }, + + unbind: function unbind (el) { + var ctx = el.__qscroll_old || el.__qscroll; + if (ctx !== void 0) { + ctx.scrollTarget.removeEventListener('scroll', ctx.scroll, listenOpts.passive); + delete el[el.__qscroll_old ? '__qscroll_old' : '__qscroll']; + } + } + }; + + function update$2 (el, binding) { + var assign; + + var ctx = el.__qtouchhold; + + if (ctx !== void 0) { + if (binding.oldValue !== binding.value) { + typeof binding.value !== 'function' && ctx.end(); + ctx.handler = binding.value; + } + + // duration in ms, touch in pixels, mouse in pixels + var data = [600, 5, 7]; + + if (typeof binding.arg === 'string' && binding.arg.length) { + binding.arg.split(':').forEach(function (val, index) { + var v = parseInt(val, 10); + v && (data[index] = v); + }); + } + + (assign = data, ctx.duration = assign[0], ctx.touchSensitivity = assign[1], ctx.mouseSensitivity = assign[2]); + } + } + + var TouchHold = { + name: 'touch-hold', + + bind: function bind (el, binding) { + var modifiers = binding.modifiers; + + // early return, we don't need to do anything + if (modifiers.mouse !== true && client.has.touch !== true) { + return + } + + var ctx = { + noop: noop, + + mouseStart: function mouseStart (evt) { + if (typeof ctx.handler === 'function' && leftClick(evt) === true) { + addEvt(ctx, 'temp', [ + [ document, 'mousemove', 'move', 'passiveCapture' ], + [ document, 'click', 'end', 'notPassiveCapture' ] + ]); + ctx.start(evt, true); + } + }, + + touchStart: function touchStart (evt) { + if (evt.target !== void 0 && typeof ctx.handler === 'function') { + var target = getTouchTarget(evt.target); + addEvt(ctx, 'temp', [ + [ target, 'touchmove', 'move', 'passiveCapture' ], + [ target, 'touchcancel', 'end', 'notPassiveCapture' ], + [ target, 'touchend', 'end', 'notPassiveCapture' ] + ]); + ctx.start(evt); + } + }, + + start: function start (evt, mouseEvent) { + ctx.origin = position(evt); + + var startTime = Date.now(); + + if (client.is.mobile === true) { + document.body.classList.add('non-selectable'); + clearSelection(); + + ctx.styleCleanup = function (withDelay) { + ctx.styleCleanup = void 0; + + var remove = function () { + document.body.classList.remove('non-selectable'); + }; + + if (withDelay === true) { + clearSelection(); + setTimeout(remove, 10); + } + else { remove(); } + }; + } + + ctx.triggered = false; + ctx.sensitivity = mouseEvent === true + ? ctx.mouseSensitivity + : ctx.touchSensitivity; + + ctx.timer = setTimeout(function () { + clearSelection(); + ctx.triggered = true; + + ctx.handler({ + evt: evt, + touch: mouseEvent !== true, + mouse: mouseEvent === true, + position: ctx.origin, + duration: Date.now() - startTime + }); + }, ctx.duration); + }, + + move: function move (evt) { + var ref = position(evt); + var top = ref.top; + var left = ref.left; + if ( + Math.abs(left - ctx.origin.left) >= ctx.sensitivity || + Math.abs(top - ctx.origin.top) >= ctx.sensitivity + ) { + clearTimeout(ctx.timer); + } + }, + + end: function end (evt) { + cleanEvt(ctx, 'temp'); + + // delay needed otherwise selection still occurs + ctx.styleCleanup !== void 0 && ctx.styleCleanup(ctx.triggered); + + if (ctx.triggered === true) { + evt !== void 0 && stopAndPrevent(evt); + } + else { + clearTimeout(ctx.timer); + } + } + }; + + if (el.__qtouchhold) { + el.__qtouchhold_old = el.__qtouchhold; + } + + el.__qtouchhold = ctx; + + update$2(el, binding); + + modifiers.mouse === true && addEvt(ctx, 'main', [ + [ el, 'mousedown', 'mouseStart', ("passive" + (modifiers.mouseCapture === true ? 'Capture' : '')) ] + ]); + + client.has.touch === true && addEvt(ctx, 'main', [ + [ el, 'touchstart', 'touchStart', ("passive" + (modifiers.capture === true ? 'Capture' : '')) ], + [ el, 'touchend', 'noop', 'notPassiveCapture' ] + ]); + }, + + update: update$2, + + unbind: function unbind (el) { + var ctx = el.__qtouchhold_old || el.__qtouchhold; + if (ctx !== void 0) { + cleanEvt(ctx, 'main'); + cleanEvt(ctx, 'temp'); + + clearTimeout(ctx.timer); + ctx.styleCleanup !== void 0 && ctx.styleCleanup(); + + delete el[el.__qtouchhold_old ? '__qtouchhold_old' : '__qtouchhold']; + } + } + }; + + var + keyCodes$2 = { + esc: 27, + tab: 9, + enter: 13, + space: 32, + up: 38, + left: 37, + right: 39, + down: 40, + 'delete': [8, 46] + }, + keyRegex = new RegExp(("^([\\d+]+|" + (Object.keys(keyCodes$2).join('|')) + ")$"), 'i'); + + function shouldEnd (evt, origin) { + var ref = position(evt); + var top = ref.top; + var left = ref.left; + + return Math.abs(left - origin.left) >= 7 || + Math.abs(top - origin.top) >= 7 + } + + var TouchRepeat = { + name: 'touch-repeat', + + bind: function bind (el, ref) { + var modifiers = ref.modifiers; + var value = ref.value; + var arg = ref.arg; + + var keyboard = Object.keys(modifiers).reduce(function (acc, key) { + if (keyRegex.test(key) === true) { + var keyCode = isNaN(parseInt(key, 10)) ? keyCodes$2[key.toLowerCase()] : parseInt(key, 10); + keyCode >= 0 && acc.push(keyCode); + } + return acc + }, []); + + // early return, we don't need to do anything + if ( + modifiers.mouse !== true && + client.has.touch !== true && + keyboard.length === 0 + ) { + return + } + + var durations = typeof arg === 'string' && arg.length > 0 + ? arg.split(':').map(function (val) { return parseInt(val, 10); }) + : [0, 600, 300]; + + var durationsLast = durations.length - 1; + + var ctx = { + keyboard: keyboard, + handler: value, + + noop: noop, + + mouseStart: function mouseStart (evt) { + if (ctx.event === void 0 && typeof ctx.handler === 'function' && leftClick(evt) === true) { + addEvt(ctx, 'temp', [ + [ document, 'mousemove', 'move', 'passiveCapture' ], + [ document, 'click', 'end', 'notPassiveCapture' ] + ]); + ctx.start(evt, true); + } + }, + + keyboardStart: function keyboardStart (evt) { + if (typeof ctx.handler === 'function' && isKeyCode(evt, keyboard) === true) { + if (durations[0] === 0 || ctx.event !== void 0) { + stopAndPrevent(evt); + el.focus(); + if (ctx.event !== void 0) { + return + } + } + + addEvt(ctx, 'temp', [ + [ document, 'keyup', 'end', 'notPassiveCapture' ], + [ document, 'click', 'end', 'notPassiveCapture' ] + ]); + ctx.start(evt, false, true); + } + }, + + touchStart: function touchStart (evt) { + if (evt.target !== void 0 && typeof ctx.handler === 'function') { + var target = getTouchTarget(evt.target); + addEvt(ctx, 'temp', [ + [ target, 'touchmove', 'move', 'passiveCapture' ], + [ target, 'touchcancel', 'end', 'notPassiveCapture' ], + [ target, 'touchend', 'end', 'notPassiveCapture' ] + ]); + ctx.start(evt); + } + }, + + start: function start (evt, mouseEvent, keyboardEvent) { + if (keyboardEvent !== true) { + ctx.origin = position(evt); + } + + function styleCleanup (withDelay) { + ctx.styleCleanup = void 0; + + document.documentElement.style.cursor = ''; + + var remove = function () { + document.body.classList.remove('non-selectable'); + }; + + if (withDelay === true) { + clearSelection(); + setTimeout(remove, 10); + } + else { remove(); } + } + + if (client.is.mobile === true) { + document.body.classList.add('non-selectable'); + clearSelection(); + ctx.styleCleanup = styleCleanup; + } + + ctx.event = { + touch: mouseEvent !== true && keyboardEvent !== true, + mouse: mouseEvent === true, + keyboard: keyboardEvent === true, + startTime: Date.now(), + repeatCount: 0 + }; + + var fn = function () { + if (ctx.event === void 0) { + return + } + + if (ctx.event.repeatCount === 0) { + ctx.event.evt = evt; + + if (keyboardEvent === true) { + ctx.event.keyCode = evt.keyCode; + } + else { + ctx.event.position = position(evt); + } + + if (client.is.mobile !== true) { + document.documentElement.style.cursor = 'pointer'; + document.body.classList.add('non-selectable'); + clearSelection(); + ctx.styleCleanup = styleCleanup; + } + } + + ctx.event.duration = Date.now() - ctx.event.startTime; + ctx.event.repeatCount += 1; + + ctx.handler(ctx.event); + + var index = durationsLast < ctx.event.repeatCount + ? durationsLast + : ctx.event.repeatCount; + + ctx.timer = setTimeout(fn, durations[index]); + }; + + if (durations[0] === 0) { + fn(); + } + else { + ctx.timer = setTimeout(fn, durations[0]); + } + }, + + move: function move (evt) { + if (ctx.event !== void 0 && shouldEnd(evt, ctx.origin) === true) { + clearTimeout(ctx.timer); + } + }, + + end: function end (evt) { + if (ctx.event === void 0) { + return + } + + ctx.styleCleanup !== void 0 && ctx.styleCleanup(true); + evt !== void 0 && ctx.event.repeatCount > 0 && stopAndPrevent(evt); + + cleanEvt(ctx, 'temp'); + clearTimeout(ctx.timer); + + ctx.event = void 0; + } + }; + + if (el.__qtouchrepeat !== void 0) { + el.__qtouchrepeat_old = el.__qtouchrepeat; + } + + el.__qtouchrepeat = ctx; + + modifiers.mouse === true && addEvt(ctx, 'main', [ + [ el, 'mousedown', 'mouseStart', ("passive" + (modifiers.mouseCapture === true ? 'Capture' : '')) ] + ]); + + client.has.touch === true && addEvt(ctx, 'main', [ + [ el, 'touchstart', 'touchStart', ("passive" + (modifiers.capture === true ? 'Capture' : '')) ], + [ el, 'touchend', 'noop', 'notPassiveCapture' ] + ]); + + keyboard.length > 0 && addEvt(ctx, 'main', [ + [ el, 'keydown', 'keyboardStart', ("notPassive" + (modifiers.keyCapture === true ? 'Capture' : '')) ] + ]); + }, + + update: function update (el, binding) { + var ctx = el.__qtouchrepeat; + + if (ctx !== void 0 && binding.oldValue !== binding.value) { + typeof binding.value !== 'function' && ctx.end(); + ctx.handler = binding.value; + } + }, + + unbind: function unbind (el) { + var ctx = el.__qtouchrepeat_old || el.__qtouchrepeat; + + if (ctx !== void 0) { + clearTimeout(ctx.timer); + + cleanEvt(ctx, 'main'); + cleanEvt(ctx, 'temp'); + + ctx.styleCleanup !== void 0 && ctx.styleCleanup(); + + delete el[el.__qtouchrepeat_old ? '__qtouchrepeat_old' : '__qtouchrepeat']; + } + } + }; + + + + var directives = /*#__PURE__*/Object.freeze({ + __proto__: null, + ClosePopup: ClosePopup, + GoBack: GoBack, + Intersection: Intersection, + Mutation: Mutation, + Ripple: Ripple, + ScrollFire: ScrollFire, + Scroll: Scroll, + TouchHold: TouchHold, + TouchPan: TouchPan, + TouchRepeat: TouchRepeat, + TouchSwipe: TouchSwipe + }); + + var metaValue; + + function getProp () { + if (Platform.is.winphone) { + return 'msapplication-navbutton-color' + } + if (Platform.is.safari) { + return 'apple-mobile-web-app-status-bar-style' + } + // Chrome, Firefox OS, Opera, Vivaldi + return 'theme-color' + } + + function getMetaTag (v) { + var els = document.getElementsByTagName('META'); + for (var i in els) { + if (els[i].name === v) { + return els[i] + } + } + } + + function setColor (hexColor) { + if (metaValue === void 0) { + // cache it + metaValue = getProp(); + } + + var metaTag = getMetaTag(metaValue); + var newTag = metaTag === void 0; + + if (newTag) { + metaTag = document.createElement('meta'); + metaTag.setAttribute('name', metaValue); + } + + metaTag.setAttribute('content', hexColor); + + if (newTag) { + document.head.appendChild(metaTag); + } + } + + var AddressbarColor = { + install: function install (ref) { + var $q = ref.$q; + var cfg = ref.cfg; + + this.set = isSSR === false && Platform.is.mobile === true && ( + Platform.is.nativeMobile === true || + Platform.is.winphone === true || Platform.is.safari === true || + Platform.is.webkit === true || Platform.is.vivaldi === true + ) + ? function (hexColor) { + var val = hexColor || getBrand('primary'); + + if (Platform.is.nativeMobile === true && window.StatusBar) { + window.StatusBar.backgroundColorByHexString(val); + } + else { + setColor(val); + } + } + : noop; + + $q.addressbarColor = this; + + cfg.addressbarColor && this.set(cfg.addressbarColor); + } + }; + + var prefixes = {}; + + // needed for consistency across browsers, + // including IE11 which does not return anything + function promisify (target, fn) { + try { + var res = target[fn](); + return res === void 0 + ? Promise.resolve() + : res + } + catch (err) { + return Promise.reject(err) + } + } + + var AppFullscreen = { + isCapable: false, + isActive: false, + + request: function request (target) { + return this.isCapable && !this.isActive + ? promisify(target || document.documentElement, prefixes.request) + : this.__getErr() + }, + + exit: function exit () { + return this.isCapable && this.isActive + ? promisify(document, prefixes.exit) + : this.__getErr() + }, + + toggle: function toggle (target) { + return this.isActive + ? this.exit() + : this.request(target) + }, + + install: function install (ref) { + var this$1 = this; + var $q = ref.$q; + + $q.fullscreen = this; + + if (isSSR === true) { return } + + prefixes.request = [ + 'requestFullscreen', + 'msRequestFullscreen', 'mozRequestFullScreen', 'webkitRequestFullscreen' + ].find(function (request) { return document.documentElement[request]; }); + + this.isCapable = prefixes.request !== void 0; + + if (this.isCapable === false) { + // it means the browser does NOT support it + this.__getErr = function () { return Promise.reject('Not capable'); }; + return + } + + this.__getErr = function () { return Promise.resolve(); }; + + prefixes.exit = [ + 'exitFullscreen', + 'msExitFullscreen', 'mozCancelFullScreen', 'webkitExitFullscreen' + ].find(function (exit) { return document[exit]; }); + + this.isActive = !!(document.fullscreenElement || + document.mozFullScreenElement || + document.webkitFullscreenElement || + document.msFullscreenElement) + + ;[ + 'onfullscreenchange', + 'onmsfullscreenchange', 'onwebkitfullscreenchange' + ].forEach(function (evt) { + document[evt] = function () { + this$1.isActive = !this$1.isActive; + }; + }); + + Vue.util.defineReactive(this, 'isActive', this.isActive); + } + }; + + var AppVisibility = { + appVisible: false, + + install: function install (ref) { + var this$1 = this; + var $q = ref.$q; + + if (isSSR === true) { + this.appVisible = $q.appVisible = true; + return + } + + var prop, evt; + + if (typeof document.hidden !== 'undefined') { // Opera 12.10 and Firefox 18 and later support + prop = 'hidden'; + evt = 'visibilitychange'; + } + else if (typeof document.msHidden !== 'undefined') { + prop = 'msHidden'; + evt = 'msvisibilitychange'; + } + else if (typeof document.webkitHidden !== 'undefined') { + prop = 'webkitHidden'; + evt = 'webkitvisibilitychange'; + } + + var update = function () { + this$1.appVisible = $q.appVisible = !document[prop]; + }; + + update(); + + if (evt && typeof document[prop] !== 'undefined') { + Vue.util.defineReactive($q, 'appVisible', this.appVisible); + document.addEventListener(evt, update, false); + } + } + }; + + var BottomSheet = Vue.extend({ + name: 'BottomSheetPlugin', + + mixins: [ DarkMixin ], + + inheritAttrs: false, + + props: { + title: String, + message: String, + actions: Array, + + grid: Boolean, + + cardClass: [String, Array, Object], + cardStyle: [String, Array, Object] + }, + + methods: { + show: function show () { + this.$refs.dialog.show(); + }, + + hide: function hide () { + this.$refs.dialog.hide(); + }, + + onOk: function onOk (action) { + this.$emit('ok', action); + this.hide(); + }, + + __getGrid: function __getGrid (h) { + var this$1 = this; + + return this.actions.map(function (action) { + var img = action.avatar || action.img; + + return action.label === void 0 + ? h(QSeparator, { + staticClass: 'col-all', + props: { dark: this$1.isDark } + }) + : h('div', { + staticClass: 'q-bottom-sheet__item q-hoverable q-focusable cursor-pointer relative-position', + class: action.classes, + attrs: { tabindex: 0 }, + on: { + click: function () { return this$1.onOk(action); }, + keyup: function (e) { + e.keyCode === 13 && this$1.onOk(action); + } + } + }, [ + h('div', { staticClass: 'q-focus-helper' }), + + action.icon + ? h(QIcon, { props: { name: action.icon, color: action.color } }) + : ( + img + ? h('img', { + attrs: { src: img }, + staticClass: action.avatar ? 'q-bottom-sheet__avatar' : null + }) + : h('div', { staticClass: 'q-bottom-sheet__empty-icon' }) + ), + + h('div', [ action.label ]) + ]) + }) + }, + + __getList: function __getList (h) { + var this$1 = this; + + return this.actions.map(function (action) { + var img = action.avatar || action.img; + + return action.label === void 0 + ? h(QSeparator, { props: { spaced: true, dark: this$1.isDark } }) + : h(QItem, { + staticClass: 'q-bottom-sheet__item', + class: action.classes, + props: { + tabindex: 0, + clickable: true, + dark: this$1.isDark + }, + on: { + click: function () { return this$1.onOk(action); }, + keyup: function (e) { + e.keyCode === 13 && this$1.onOk(action); + } + } + }, [ + h(QItemSection, { props: { avatar: true } }, [ + action.icon + ? h(QIcon, { props: { name: action.icon, color: action.color } }) + : ( + img + ? h('img', { + attrs: { src: img }, + staticClass: action.avatar ? 'q-bottom-sheet__avatar' : null + }) + : null + ) + ]), + h(QItemSection, [ action.label ]) + ]) + }) + } + }, + + render: function render (h) { + var this$1 = this; + + var child = []; + + if (this.title) { + child.push( + h(QCardSection, { + staticClass: 'q-dialog__title' + }, [ this.title ]) + ); + } + + if (this.message) { + child.push( + h(QCardSection, { + staticClass: 'q-dialog__message scroll' + }, [ this.message ]) + ); + } + + child.push( + this.grid === true + ? h('div', { + staticClass: 'scroll row items-stretch justify-start' + }, this.__getGrid(h)) + : h('div', { staticClass: 'scroll' }, this.__getList(h)) + ); + + return h(QDialog, { + ref: 'dialog', + + props: Object.assign({}, this.$attrs, + {position: 'bottom'}), + + on: cache(this, 'hide', { + hide: function () { + this$1.$emit('hide'); + } + }) + }, [ + h(QCard, { + staticClass: "q-bottom-sheet q-bottom-sheet--" + (this.grid === true ? 'grid' : 'list') + + (this.isDark === true ? ' q-bottom-sheet--dark q-dark' : ''), + style: this.cardStyle, + class: this.cardClass + }, child) + ]) + } + }); + + function objectWithoutProperties$1 (obj, exclude) { var target = {}; for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k) && exclude.indexOf(k) === -1) target[k] = obj[k]; return target; } + + var ssrAPI = { + onOk: function () { return ssrAPI; }, + okCancel: function () { return ssrAPI; }, + hide: function () { return ssrAPI; } + }; + + function globalDialog (DefaultComponent) { + return function (ref) { + var className = ref.className; + var klass = ref.class; + var style = ref.style; + var component = ref.component; + var root = ref.root; + var parent = ref.parent; + var rest = objectWithoutProperties$1( ref, ["className", "class", "style", "component", "root", "parent"] ); + var props = rest; + + if (isSSR === true) { return ssrAPI } + + klass !== void 0 && (props.cardClass = klass); + style !== void 0 && (props.cardStyle = style); + + var + okFns = [], + cancelFns = [], + API = { + onOk: function onOk (fn) { + okFns.push(fn); + return API + }, + onCancel: function onCancel (fn) { + cancelFns.push(fn); + return API + }, + onDismiss: function onDismiss (fn) { + okFns.push(fn); + cancelFns.push(fn); + return API + }, + hide: function hide () { + vm.$refs.dialog.hide(); + return API + } + }; + + var node = document.createElement('div'); + document.body.appendChild(node); + + var emittedOK = false; + + var on = { + ok: function (data) { + emittedOK = true; + okFns.forEach(function (fn) { fn(data); }); + }, + + hide: function () { + vm.$destroy(); + vm.$el.remove(); + vm = null; + + if (emittedOK !== true) { + cancelFns.forEach(function (fn) { fn(); }); + } + } + }; + + Vue.observable(props); + + var DialogComponent = component !== void 0 + ? component + : DefaultComponent; + + var attrs = component === void 0 + ? props + : void 0; + + var vm = new Vue({ + name: 'QGlobalDialog', + + el: node, + parent: parent === void 0 ? root : parent, + + render: function render (h) { + return h(DialogComponent, { + ref: 'dialog', + props: props, + attrs: attrs, + on: on + }) + }, + + mounted: function mounted () { + this.$refs.dialog.show(); + } + }); + + return API + } + } + + var BottomSheet$1 = { + install: function install (ref) { + var $q = ref.$q; + + this.create = $q.bottomSheet = globalDialog(BottomSheet); + } + }; + + function encode (string) { + return encodeURIComponent(string) + } + + function decode (string) { + return decodeURIComponent(string) + } + + function stringifyCookieValue (value) { + return encode(value === Object(value) ? JSON.stringify(value) : '' + value) + } + + function read (string) { + if (string === '') { + return string + } + + if (string.indexOf('"') === 0) { + // This is a quoted cookie as according to RFC2068, unescape... + string = string.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); + } + + // Replace server-side written pluses with spaces. + // If we can't decode the cookie, ignore it, it's unusable. + // If we can't parse the cookie, ignore it, it's unusable. + string = decode(string.replace(/\+/g, ' ')); + + try { + string = JSON.parse(string); + } + catch (e) {} + + return string + } + + function getString (msOffset) { + var time = new Date(); + time.setMilliseconds(time.getMilliseconds() + msOffset); + return time.toUTCString() + } + + function parseExpireString (str) { + var timestamp = 0; + + var days = str.match(/(\d+)d/); + var hours = str.match(/(\d+)h/); + var minutes = str.match(/(\d+)m/); + var seconds = str.match(/(\d+)s/); + + if (days) { timestamp += days[1] * 864e+5; } + if (hours) { timestamp += hours[1] * 36e+5; } + if (minutes) { timestamp += minutes[1] * 6e+4; } + if (seconds) { timestamp += seconds[1] * 1000; } + + return timestamp === 0 + ? str + : getString(timestamp) + } + + function set (key, val, opts, ssr) { + if ( opts === void 0 ) opts = {}; + + var expire, expireValue; + + if (opts.expires !== void 0) { + // if it's a Date Object + if (Object.prototype.toString.call(opts.expires) === '[object Date]') { + expire = opts.expires.toUTCString(); + } + // if it's a String (eg. "15m", "1h", "13d", "1d 15m", "31s") + // possible units: d (days), h (hours), m (minutes), s (seconds) + else if (typeof opts.expires === 'string') { + expire = parseExpireString(opts.expires); + } + // otherwise it must be a Number (defined in days) + else { + expireValue = parseFloat(opts.expires); + expire = isNaN(expireValue) === false + ? getString(expireValue * 864e+5) + : opts.expires; + } + } + + var keyValue = (encode(key)) + "=" + (stringifyCookieValue(val)); + + var cookie = [ + keyValue, + expire !== void 0 ? '; Expires=' + expire : '', // use expires attribute, max-age is not supported by IE + opts.path ? '; Path=' + opts.path : '', + opts.domain ? '; Domain=' + opts.domain : '', + opts.sameSite ? '; SameSite=' + opts.sameSite : '', + opts.httpOnly ? '; HttpOnly' : '', + opts.secure ? '; Secure' : '', + opts.other ? '; ' + opts.other : '' + ].join(''); + + if (ssr) { + if (ssr.req.qCookies) { + ssr.req.qCookies.push(cookie); + } + else { + ssr.req.qCookies = [ cookie ]; + } + + ssr.res.setHeader('Set-Cookie', ssr.req.qCookies); + + // make temporary update so future get() + // within same SSR timeframe would return the set value + + var all = ssr.req.headers.cookie || ''; + + if (expire !== void 0 && expireValue < 0) { + var val$1 = get(key, ssr); + if (val$1 !== undefined) { + all = all + .replace((key + "=" + val$1 + "; "), '') + .replace(("; " + key + "=" + val$1), '') + .replace((key + "=" + val$1), ''); + } + } + else { + all = all + ? (keyValue + "; " + all) + : cookie; + } + + ssr.req.headers.cookie = all; + } + else { + document.cookie = cookie; + } + } + + function get (key, ssr) { + var + result = key ? null : {}, + cookieSource = ssr ? ssr.req.headers : document, + cookies = cookieSource.cookie ? cookieSource.cookie.split('; ') : [], + i = 0, + l = cookies.length, + parts, + name, + cookie; + + for (; i < l; i++) { + parts = cookies[i].split('='); + name = decode(parts.shift()); + cookie = parts.join('='); + + if (!key) { + result[name] = cookie; + } + else if (key === name) { + result = read(cookie); + break + } + } + + return result + } + + function remove (key, options, ssr) { + set( + key, + '', + Object.assign({}, {expires: -1}, options), + ssr + ); + } + + function has (key, ssr) { + return get(key, ssr) !== null + } + + function getObject (ctx) { + if ( ctx === void 0 ) ctx = {}; + + var ssr = ctx.ssr; + + return { + get: function (key) { return get(key, ssr); }, + set: function (key, val, opts) { return set(key, val, opts, ssr); }, + has: function (key) { return has(key, ssr); }, + remove: function (key, options) { return remove(key, options, ssr); }, + getAll: function () { return get(null, ssr); } + } + } + + var Cookies = { + parseSSR: function parseSSR (/* ssrContext */ ssr) { + return ssr ? getObject({ ssr: ssr }) : this + }, + + install: function install (ref) { + var $q = ref.$q; + var queues = ref.queues; + + if (isSSR === true) { + queues.server.push(function (q, ctx) { + q.cookies = getObject(ctx); + }); + } + else { + Object.assign(this, getObject()); + $q.cookies = this; + } + } + }; + + var DialogPlugin = Vue.extend({ + name: 'DialogPlugin', + + mixins: [ DarkMixin ], + + inheritAttrs: false, + + props: { + title: String, + message: String, + prompt: Object, + options: Object, + + html: Boolean, + + ok: { + type: [String, Object, Boolean], + default: true + }, + cancel: [String, Object, Boolean], + focus: { + type: String, + default: 'ok', + validator: function (v) { return ['ok', 'cancel', 'none'].includes(v); } + }, + + stackButtons: Boolean, + color: String, + + cardClass: [String, Array, Object], + cardStyle: [String, Array, Object] + }, + + computed: { + hasForm: function hasForm () { + return this.prompt !== void 0 || this.options !== void 0 + }, + + okLabel: function okLabel () { + return Object(this.ok) === this.ok + ? this.$q.lang.label.ok + : ( + this.ok === true + ? this.$q.lang.label.ok + : this.ok + ) + }, + + cancelLabel: function cancelLabel () { + return Object(this.cancel) === this.cancel + ? this.$q.lang.label.cancel + : ( + this.cancel === true + ? this.$q.lang.label.cancel + : this.cancel + ) + }, + + vmColor: function vmColor () { + return this.color || (this.isDark === true ? 'amber' : 'primary') + }, + + okDisabled: function okDisabled () { + if (this.prompt !== void 0) { + return this.prompt.isValid !== void 0 && + this.prompt.isValid(this.prompt.model) !== true + } + if (this.options !== void 0) { + return this.options.isValid !== void 0 && + this.options.isValid(this.options.model) !== true + } + }, + + okProps: function okProps () { + return Object.assign( + { + color: this.vmColor, + label: this.okLabel, + ripple: false + }, + Object(this.ok) === this.ok + ? this.ok + : { flat: true }, + { disable: this.okDisabled } + ) + }, + + cancelProps: function cancelProps () { + return Object.assign( + { + color: this.vmColor, + label: this.cancelLabel, + ripple: false + }, + Object(this.cancel) === this.cancel + ? this.cancel + : { flat: true } + ) + } + }, + + methods: { + show: function show () { + this.$refs.dialog.show(); + }, + + hide: function hide () { + this.$refs.dialog.hide(); + }, + + getPrompt: function getPrompt (h) { + var this$1 = this; + + return [ + h(QInput, { + props: { + value: this.prompt.model, + type: this.prompt.type, + label: this.prompt.label, + stackLabel: this.prompt.stackLabel, + outlined: this.prompt.outlined, + filled: this.prompt.filled, + standout: this.prompt.standout, + color: this.vmColor, + dense: true, + autofocus: true, + dark: this.isDark + }, + on: cache(this, 'prompt', { + input: function (v) { this$1.prompt.model = v; }, + keyup: function (evt) { + // if ENTER key + if ( + this$1.okDisabled !== true && + this$1.prompt.type !== 'textarea' && + isKeyCode(evt, 13) === true + ) { + this$1.onOk(); + } + } + }) + }) + ] + }, + + getOptions: function getOptions (h) { + var this$1 = this; + + return [ + h(QOptionGroup, { + props: { + value: this.options.model, + type: this.options.type, + color: this.vmColor, + inline: this.options.inline, + options: this.options.items, + dark: this.isDark + }, + on: cache(this, 'opts', { + input: function (v) { this$1.options.model = v; } + }) + }) + ] + }, + + getButtons: function getButtons (h) { + var child = []; + + this.cancel && child.push(h(QBtn, { + props: this.cancelProps, + attrs: { 'data-autofocus': this.focus === 'cancel' && this.hasForm !== true }, + on: cache(this, 'cancel', { click: this.onCancel }) + })); + + this.ok && child.push(h(QBtn, { + props: this.okProps, + attrs: { 'data-autofocus': this.focus === 'ok' && this.hasForm !== true }, + on: cache(this, 'ok', { click: this.onOk }) + })); + + if (child.length > 0) { + return h(QCardActions, { + staticClass: this.stackButtons === true ? 'items-end' : null, + props: { + vertical: this.stackButtons, + align: 'right' + } + }, child) + } + }, + + onOk: function onOk () { + this.$emit('ok', clone$1(this.getData())); + this.hide(); + }, + + onCancel: function onCancel () { + this.hide(); + }, + + getData: function getData () { + return this.prompt !== void 0 + ? this.prompt.model + : (this.options !== void 0 ? this.options.model : void 0) + }, + + getSection: function getSection (h, staticClass, text) { + return this.html === true + ? h(QCardSection, { + staticClass: staticClass, + domProps: { innerHTML: text } + }) + : h(QCardSection, { staticClass: staticClass }, [ text ]) + } + }, + + render: function render (h) { + var this$1 = this; + + var child = []; + + this.title && child.push( + this.getSection(h, 'q-dialog__title', this.title) + ); + + this.message && child.push( + this.getSection(h, 'q-dialog__message scroll', this.message) + ); + + this.hasForm === true && child.push( + h( + QCardSection, + { staticClass: 'scroll' }, + this.prompt !== void 0 + ? this.getPrompt(h) + : this.getOptions(h) + ) + ); + + if (this.ok || this.cancel) { + child.push(this.getButtons(h)); + } + + return h(QDialog, { + ref: 'dialog', + + props: Object.assign({}, this.$attrs, + {value: this.value}), + + on: cache(this, 'hide', { + hide: function () { + this$1.$emit('hide'); + } + }) + }, [ + h(QCard, { + staticClass: 'q-dialog-plugin' + + (this.isDark === true ? ' q-dialog-plugin--dark q-dark' : ''), + style: this.cardStyle, + class: this.cardClass, + props: { dark: this.isDark } + }, child) + ]) + } + }); + + var Dialog = { + install: function install (ref) { + var $q = ref.$q; + + this.create = $q.dialog = globalDialog(DialogPlugin); + } + }; + + var LoadingBar = { + isActive: false, + start: noop, + stop: noop, + increment: noop, + setDefaults: noop, + + install: function install (ref) { + var this$1 = this; + var $q = ref.$q; + var cfg = ref.cfg; + + if (isSSR === true) { + $q.loadingBar = this; + return + } + + var props = cfg.loadingBar !== void 0 + ? Object.assign({}, cfg.loadingBar) + : {}; + + var bar = $q.loadingBar = new Vue({ + name: 'LoadingBar', + render: function (h) { return h(QAjaxBar, { + ref: 'bar', + props: props + }); } + }).$mount().$refs.bar; + + Object.assign(this, { + start: function (speed) { + bar.start(speed); + this$1.isActive = bar.isActive = bar.calls > 0; + }, + stop: function () { + bar.stop(); + this$1.isActive = bar.isActive = bar.calls > 0; + }, + increment: bar.increment, + setDefaults: function (opts) { + opts === Object(opts) && Object.assign(props, opts); + bar.$parent.$forceUpdate(); + } + }); + + Vue.util.defineReactive(this, 'isActive', this.isActive); + Vue.util.defineReactive(bar, 'isActive', this.isActive); + bar.setDefaults = this.setDefaults; + + document.body.appendChild(bar.$parent.$el); + } + }; + + var + vm, + uid$3 = 0, + timeout, + props = {}, + originalDefaults = { + delay: 0, + message: false, + spinnerSize: 80, + spinnerColor: 'white', + messageColor: 'white', + backgroundColor: 'black', + spinner: QSpinner, + customClass: '' + }, + defaults = Object.assign({}, originalDefaults); + + var Loading = { + isActive: false, + + show: function show (opts) { + var this$1 = this; + + if (isSSR === true) { return } + + props = opts === Object(opts) && opts.ignoreDefaults === true + ? Object.assign({}, originalDefaults, opts) + : Object.assign({}, defaults, opts); + + props.customClass += " text-" + (props.backgroundColor); + props.uid = "l_" + (uid$3++); + + this.isActive = true; + + if (vm !== void 0) { + vm.$forceUpdate(); + return + } + + clearTimeout(timeout); + timeout = setTimeout(function () { + timeout = void 0; + + var node = document.createElement('div'); + document.body.appendChild(node); + + vm = new Vue({ + name: 'QLoading', + + el: node, + + mounted: function mounted () { + preventScroll(true, client); + }, + + render: function (h) { + var obj; + + return h('transition', { + props: { + name: 'q-transition--fade', + appear: true + }, + on: cache(this$1, 'tr', { + 'after-leave': function () { + // might be called to finalize + // previous leave, even if it was cancelled + if (this$1.isActive !== true && vm !== void 0) { + preventScroll(false, client); + vm.$destroy(); + vm.$el.remove(); + vm = void 0; + } + } + }) + }, [ + this$1.isActive === true ? h('div', { + staticClass: 'q-loading fullscreen column flex-center z-max', + key: props.uid, + class: props.customClass.trim() + }, [ + h(props.spinner, { + props: { + color: props.spinnerColor, + size: props.spinnerSize + } + }), + (props.message && h('div', { + class: ("text-" + (props.messageColor)), + domProps: ( obj = {}, obj[props.sanitize === true ? 'textContent' : 'innerHTML'] = props.message, obj ) + })) || void 0 + ]) : null + ]) + } + }); + }, props.delay); + }, + + hide: function hide () { + if (this.isActive === true) { + if (timeout !== void 0) { + clearTimeout(timeout); + timeout = void 0; + } + + this.isActive = false; + } + }, + + setDefaults: function setDefaults (opts) { + opts === Object(opts) && Object.assign(defaults, opts); + }, + + install: function install (ref) { + var $q = ref.$q; + var loading = ref.cfg.loading; + + this.setDefaults(loading); + $q.loading = this; + } + }; + + if (isSSR === false) { + Vue.util.defineReactive(Loading, 'isActive', Loading.isActive); + } + + var updateId, ssrTakeover; + + function normalize (meta) { + if (meta.title) { + meta.title = meta.titleTemplate + ? meta.titleTemplate(meta.title) + : meta.title; + delete meta.titleTemplate; + } + [['meta', 'content'], ['link', 'href']].forEach(function (type) { + var + metaType = meta[type[0]], + metaProp = type[1]; + + for (var name in metaType) { + var metaLink = metaType[name]; + + if (metaLink.template) { + if (Object.keys(metaLink).length === 1) { + delete metaType[name]; + } + else { + metaLink[metaProp] = metaLink.template(metaLink[metaProp] || ''); + delete metaLink.template; + } + } + } + }); + } + + function changed (old, def) { + if (Object.keys(old).length !== Object.keys(def).length) { + return true + } + for (var key in old) { + if (old[key] !== def[key]) { + return true + } + } + } + + function bodyFilter (name) { + return ['class', 'style'].includes(name) === false + } + + function htmlFilter (name) { + return ['lang', 'dir'].includes(name) === false + } + + function diff (meta, other) { + var add = {}, remove = {}; + + if (meta === void 0) { + return { add: other, remove: remove } + } + + if (meta.title !== other.title) { + add.title = other.title; + } + ['meta', 'link', 'script', 'htmlAttr', 'bodyAttr'].forEach(function (type) { + var old = meta[type], cur = other[type]; + remove[type] = []; + + if (old === void 0 || old === null) { + add[type] = cur; + return + } + + add[type] = {}; + + for (var key in old) { + if (cur.hasOwnProperty(key) === false) { + remove[type].push(key); + } + } + for (var key$1 in cur) { + if (old.hasOwnProperty(key$1) === false) { + add[type][key$1] = cur[key$1]; + } + else if (changed(old[key$1], cur[key$1]) === true) { + remove[type].push(key$1); + add[type][key$1] = cur[key$1]; + } + } + }); + + return { add: add, remove: remove } + } + + function apply$1 (ref) { + var add = ref.add; + var remove = ref.remove; + + if (add.title) { + document.title = add.title; + } + + if (Object.keys(remove).length > 0) { + ['meta', 'link', 'script'].forEach(function (type) { + remove[type].forEach(function (name) { + document.head.querySelector((type + "[data-qmeta=\"" + name + "\"]")).remove(); + }); + }); + remove.htmlAttr.filter(htmlFilter).forEach(function (name) { + document.documentElement.removeAttribute(name); + }); + remove.bodyAttr.filter(bodyFilter).forEach(function (name) { + document.body.removeAttribute(name); + }); + } + ['meta', 'link', 'script'].forEach(function (type) { + var metaType = add[type]; + + for (var name in metaType) { + var tag = document.createElement(type); + for (var att in metaType[name]) { + if (att !== 'innerHTML') { + tag.setAttribute(att, metaType[name][att]); + } + } + tag.setAttribute('data-qmeta', name); + if (type === 'script') { + tag.innerHTML = metaType[name].innerHTML || ''; + } + document.head.appendChild(tag); + } + }); + Object.keys(add.htmlAttr).filter(htmlFilter).forEach(function (name) { + document.documentElement.setAttribute(name, add.htmlAttr[name] || ''); + }); + Object.keys(add.bodyAttr).filter(bodyFilter).forEach(function (name) { + document.body.setAttribute(name, add.bodyAttr[name] || ''); + }); + } + + function parseMeta (component, meta) { + if (component._inactive === true) { return } + + // if it has meta + if (hasMeta(component) === true) { + extend(true, meta, component.__qMeta); + + if (component.$options.meta.stopPropagation === true) { + return + } + } + + component.$children.forEach(function (child) { + parseMeta(child, meta); + }); + } + + function updateClient () { + if (ssrTakeover === true) { + ssrTakeover = false; + this.$root.__currentMeta = window.__Q_META__; + document.body.querySelector('script[data-qmeta-init]').remove(); + return + } + + var meta = { + title: '', + titleTemplate: null, + meta: {}, + link: {}, + script: {}, + htmlAttr: {}, + bodyAttr: {} + }; + parseMeta(this.$root, meta); + normalize(meta); + + apply$1(diff(this.$root.__currentMeta, meta)); + this.$root.__currentMeta = meta; + } + + function getAttr (seed) { + return function (att) { + var val = seed[att]; + return att + (val !== void 0 ? ("=\"" + val + "\"") : '') + } + } + + function getHead (meta) { + var output = ''; + if (meta.title) { + output += "" + (meta.title) + ""; + } + ['meta', 'link', 'script'].forEach(function (type) { + var metaType = meta[type]; + + for (var att in metaType) { + var attrs = Object.keys(metaType[att]) + .filter(function (att) { return att !== 'innerHTML'; }) + .map(getAttr(metaType[att])); + + output += "<" + type + " " + (attrs.join(' ')) + " data-qmeta=\"" + att + "\">"; + if (type === 'script') { + output += (metaType[att].innerHTML || '') + ""; + } + } + }); + return output + } + + function getServerMeta (app, html) { + var meta = { + title: '', + titleTemplate: null, + meta: {}, + link: {}, + htmlAttr: {}, + bodyAttr: {}, + noscript: {} + }; + + parseMeta(app, meta); + normalize(meta); + + var tokens = { + '%%Q_HTML_ATTRS%%': Object.keys(meta.htmlAttr) + .filter(htmlFilter) + .map(getAttr(meta.htmlAttr)) + .join(' '), + '%%Q_HEAD_TAGS%%': getHead(meta), + '%%Q_BODY_ATTRS%%': Object.keys(meta.bodyAttr) + .filter(bodyFilter) + .map(getAttr(meta.bodyAttr)) + .join(' '), + '%%Q_BODY_TAGS%%': Object.keys(meta.noscript) + .map(function (name) { return (""); }) + .join('') + + "" + }; + + Object.keys(tokens).forEach(function (key) { + html = html.replace(key, tokens[key]); + }); + + return html + } + + function beforeCreate () { + if (typeof this.$options.meta === 'function') { + if (this.$options.computed === void 0) { + this.$options.computed = {}; + } + this.$options.computed.__qMeta = this.$options.meta; + } + else if (hasMeta(this) === true) { + this.__qMeta = this.$options.meta; + } + } + + // needs to be really fast + function hasMeta (vm) { + return vm.$options.meta !== void 0 && + vm.$options.meta !== null + } + + function triggerMeta () { + hasMeta(this) === true && this.__qMetaUpdate(); + } + + var Meta = { + install: function install (ref) { + var queues = ref.queues; + + if (isSSR === true) { + Vue.prototype.$getMetaHTML = function (app) { return function (html) { return getServerMeta(app, html); }; }; + Vue.mixin({ beforeCreate: beforeCreate }); + + queues.server.push(function (_, ctx) { + ctx.ssr.Q_HTML_ATTRS += ' %%Q_HTML_ATTRS%%'; + Object.assign(ctx.ssr, { + Q_HEAD_TAGS: '%%Q_HEAD_TAGS%%', + Q_BODY_ATTRS: '%%Q_BODY_ATTRS%%', + Q_BODY_TAGS: '%%Q_BODY_TAGS%%' + }); + }); + } + else { + ssrTakeover = fromSSR; + + Vue.mixin({ + beforeCreate: beforeCreate, + created: function created () { + if (hasMeta(this) === true) { + this.__qMetaUnwatch = this.$watch('__qMeta', this.__qMetaUpdate); + } + }, + activated: triggerMeta, + deactivated: triggerMeta, + beforeMount: triggerMeta, + destroyed: function destroyed () { + if (hasMeta(this) === true) { + this.__qMetaUnwatch(); + this.__qMetaUpdate(); + } + }, + methods: { + __qMetaUpdate: function __qMetaUpdate () { + clearTimeout(updateId); + updateId = setTimeout(updateClient.bind(this), 50); + } + } + }); + } + } + }; + + function objectWithoutProperties$2 (obj, exclude) { var target = {}; for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k) && exclude.indexOf(k) === -1) target[k] = obj[k]; return target; } + + var uid$4 = 0; + var defaults$1 = {}; + + var attrs$2 = { role: 'alert' }; + + var positionList = [ + 'top-left', 'top-right', + 'bottom-left', 'bottom-right', + 'top', 'bottom', 'left', 'right', 'center' + ]; + + var badgePositions = [ + 'top-left', 'top-right', + 'bottom-left', 'bottom-right' + ]; + + var notifTypes = { + positive: { + icon: function icon () { return this.$q.iconSet.type.positive }, + color: 'positive' + }, + + negative: { + icon: function icon () { return this.$q.iconSet.type.negative }, + color: 'negative' + }, + + warning: { + icon: function icon () { return this.$q.iconSet.type.warning }, + color: 'warning', + textColor: 'dark' + }, + + info: { + icon: function icon () { return this.$q.iconSet.type.info }, + color: 'info' + } + }; + + var groups = {}; + var positionClass$1 = {}; + + var Notifications = { + name: 'QNotifications', + + created: function created () { + var this$1 = this; + + this.notifs = {}; + + positionList.forEach(function (pos) { + this$1.notifs[pos] = []; + + var + vert = ['left', 'center', 'right'].includes(pos) ? 'center' : (pos.indexOf('top') > -1 ? 'top' : 'bottom'), + align = pos.indexOf('left') > -1 ? 'start' : (pos.indexOf('right') > -1 ? 'end' : 'center'), + classes = ['left', 'right'].includes(pos) ? ("items-" + (pos === 'left' ? 'start' : 'end') + " justify-center") : (pos === 'center' ? 'flex-center' : ("items-" + align)); + + positionClass$1[pos] = "q-notifications__list q-notifications__list--" + vert + " fixed column no-wrap " + classes; + }); + }, + + methods: { + add: function add (config) { + var this$1 = this; + + if (!config) { + console.error('Notify: parameter required'); + return false + } + + var notif = { textColor: 'white' }; + + if (typeof config === 'string' || config.ignoreDefaults !== true) { + Object.assign(notif, defaults$1); + } + + if (Object(config) === config) { + Object.assign(notif, notifTypes[config.type], config); + + if (typeof notif.icon === 'function') { + notif.icon = notif.icon.call(this); + } + } + else { + Object.assign(notif, { message: config }); + } + + notif.meta = { + hasMedia: Boolean(notif.icon || notif.avatar) + }; + + if (notif.position) { + if (!positionList.includes(notif.position)) { + console.error(("Notify: wrong position: " + (notif.position))); + return false + } + } + else { + notif.position = 'bottom'; + } + + if (notif.timeout === void 0) { + notif.timeout = 5000; + } + else { + var t = parseInt(notif.timeout, 10); + if (isNaN(t) || t < 0) { + console.error(("Notify: wrong timeout: " + (notif.timeout))); + return false + } + notif.timeout = t; + } + + if (notif.timeout === 0) { + notif.progress = false; + } + else if (notif.progress === true) { + notif.meta.progressStyle = { + animationDuration: ((notif.timeout + 1000) + "ms") + }; + } + + var actions = (Array.isArray(config.actions) === true ? config.actions : []) + .concat(config.ignoreDefaults !== true && Array.isArray(defaults$1.actions) === true ? defaults$1.actions : []); + + notif.closeBtn && actions.push({ + label: typeof notif.closeBtn === 'string' + ? notif.closeBtn + : this.$q.lang.label.close + }); + + notif.actions = actions.map(function (ref) { + var handler = ref.handler; + var noDismiss = ref.noDismiss; + var rest = objectWithoutProperties$2( ref, ["handler", "noDismiss"] ); + var item = rest; + + return ({ + props: Object.assign({}, {flat: true}, item), + on: { + click: typeof handler === 'function' + ? function () { + handler(); + noDismiss !== true && notif.meta.close(); + } + : function () { + notif.meta.close(); + } + } + }); + }); + + if (notif.multiLine === void 0) { + notif.multiLine = notif.actions.length > 1; + } + + Object.assign(notif.meta, { + staticClass: "q-notification row items-stretch" + + " q-notification--" + (notif.multiLine === true ? 'multi-line' : 'standard') + + (notif.color !== void 0 ? (" bg-" + (notif.color)) : '') + + (notif.textColor !== void 0 ? (" text-" + (notif.textColor)) : '') + + (notif.classes !== void 0 ? (" " + (notif.classes)) : ''), + + wrapperClass: 'q-notification__wrapper col relative-position border-radius-inherit ' + + (notif.multiLine === true ? 'column no-wrap justify-center' : 'row items-center'), + + contentClass: 'q-notification__content row items-center' + + (notif.multiLine === true ? '' : ' col') + }); + + if (notif.group === false) { + notif.group = void 0; + } + else { + if (notif.group === void 0 || notif.group === true) { + // do not replace notifications with different buttons + notif.group = [ + notif.message, + notif.caption, + notif.multiline + ].concat( + notif.actions.map(function (a) { return ((a.props.label) + "*" + (a.props.icon)); }) + ).join('|'); + } + + notif.group += '|' + notif.position; + } + + if (notif.actions.length === 0) { + notif.actions = void 0; + } + else { + notif.meta.actionsClass = 'q-notification__actions row items-center ' + + (notif.multiLine === true ? 'justify-end' : 'col-auto') + + (notif.meta.hasMedia === true ? ' q-notification__actions--with-media' : ''); + } + + var groupNotif = groups[notif.group]; + + // wohoo, new notification + if (groupNotif === void 0) { + notif.meta.uid = uid$4++; + notif.meta.badge = 1; + + if (['left', 'right', 'center'].indexOf(notif.position) !== -1) { + this.notifs[notif.position].splice( + Math.floor(this.notifs[notif.position].length / 2), + 0, + notif + ); + } + else { + var action = notif.position.indexOf('top') > -1 ? 'unshift' : 'push'; + this.notifs[notif.position][action](notif); + } + + if (notif.group !== void 0) { + groups[notif.group] = notif; + } + } + // ok, so it's NOT a new one + else { + // reset timeout if any + if (groupNotif.meta.timer !== void 0) { + clearTimeout(groupNotif.meta.timer); + } + + var original = groups[notif.group]; + + if (notif.badgePosition !== void 0) { + if (badgePositions.includes(notif.badgePosition) === false) { + console.error(("Notify - wrong badgePosition specified: " + (notif.badgePosition))); + return false + } + } + else { + notif.badgePosition = "top-" + (notif.position.indexOf('left') > -1 ? 'right' : 'left'); + } + + notif.meta.uid = original.meta.uid; + notif.meta.badge = original.meta.badge + 1; + notif.meta.badgeStaticClass = "q-notification__badge q-notification__badge--" + (notif.badgePosition) + + (notif.badgeColor !== void 0 ? (" bg-" + (notif.badgeColor)) : '') + + (notif.badgeTextColor !== void 0 ? (" text-" + (notif.badgeTextColor)) : ''); + + notif = Object.assign(original, notif); + } + + notif.meta.close = function () { + this$1.remove(notif); + }; + + this.$forceUpdate(); + + if (notif.timeout > 0) { + notif.meta.timer = setTimeout(function () { + notif.meta.close(); + }, notif.timeout + /* show duration */ 1000); + } + + return notif.meta.close + }, + + remove: function remove (notif) { + if (notif.meta.timer) { clearTimeout(notif.meta.timer); } + + var index = this.notifs[notif.position].indexOf(notif); + if (index !== -1) { + if (notif.group !== void 0) { + delete groups[notif.group]; + } + + var el = this.$refs[("notif_" + (notif.meta.uid))]; + + if (el) { + var ref = getComputedStyle(el); + var width = ref.width; + var height = ref.height; + + el.style.left = (el.offsetLeft) + "px"; + el.style.width = width; + el.style.height = height; + } + + this.notifs[notif.position].splice(index, 1); + + this.$forceUpdate(); + + if (typeof notif.onDismiss === 'function') { + notif.onDismiss(); + } + } + } + }, + + render: function render (h) { + var this$1 = this; + + return h('div', { staticClass: 'q-notifications' }, positionList.map(function (pos) { + return h('transition-group', { + key: pos, + staticClass: positionClass$1[pos], + tag: 'div', + props: { + name: ("q-notification--" + pos), + mode: 'out-in' + } + }, this$1.notifs[pos].map(function (notif) { + var msgChild; + + var meta = notif.meta; + var msgData = { staticClass: 'q-notification__message col' }; + + if (notif.html === true) { + msgData.domProps = { + innerHTML: notif.caption + ? ("
    " + (notif.message) + "
    " + (notif.caption) + "
    ") + : notif.message + }; + } + else { + var msgNode = [ notif.message ]; + msgChild = notif.caption + ? [ + h('div', msgNode), + h('div', { staticClass: 'q-notification__caption' }, [ notif.caption ]) + ] + : msgNode; + } + + var mainChild = []; + + if (meta.hasMedia === true) { + if (notif.icon) { + mainChild.push( + h(QIcon, { + staticClass: 'q-notification__icon col-auto', + attrs: { role: 'img' }, + props: { name: notif.icon } + }) + ); + } + else if (notif.avatar) { + mainChild.push( + h(QAvatar, { staticClass: 'q-notification__avatar col-auto' }, [ + h('img', { attrs: { src: notif.avatar, 'aria-hidden': 'true' } }) + ]) + ); + } + } + + mainChild.push( + h('div', msgData, msgChild) + ); + + var child = [ + h('div', { staticClass: meta.contentClass }, mainChild) + ]; + + notif.progress === true && child.push( + h('div', { + key: ((meta.uid) + "|p|" + (meta.badge)), + staticClass: 'q-notification__progress', + style: meta.progressStyle, + class: notif.progressClass + }) + ); + + notif.actions !== void 0 && child.push( + h('div', { + staticClass: meta.actionsClass + }, notif.actions.map(function (a) { return h(QBtn, { props: a.props, on: a.on }); })) + ); + + meta.badge > 1 && child.push( + h('div', { + key: ((meta.uid) + "|" + (meta.badge)), + staticClass: meta.badgeStaticClass, + style: notif.badgeStyle, + class: notif.badgeClass + }, [ meta.badge ]) + ); + + return h('div', { + ref: ("notif_" + (meta.uid)), + key: meta.uid, + staticClass: meta.staticClass, + attrs: attrs$2 + }, [ + h('div', { staticClass: meta.wrapperClass }, child) + ]) + })) + })) + } + }; + + var Notify = { + create: function create (opts) { + if (isSSR === true) { return noop } + return this.__vm.add(opts) + }, + setDefaults: function setDefaults (opts) { + opts === Object(opts) && Object.assign(defaults$1, opts); + }, + registerType: function registerType (typeName, typeOpts) { + if (isSSR !== true && typeOpts === Object(typeOpts)) { + notifTypes[typeName] = typeOpts; + } + }, + + install: function install (ref) { + var cfg = ref.cfg; + var $q = ref.$q; + + if (isSSR === true) { + $q.notify = noop; + $q.notify.setDefaults = noop; + return + } + + this.setDefaults(cfg.notify); + + $q.notify = this.create.bind(this); + $q.notify.setDefaults = this.setDefaults; + $q.notify.registerType = this.registerType; + + var node = document.createElement('div'); + document.body.appendChild(node); + + this.__vm = new Vue(Notifications); + this.__vm.$mount(node); + } + }; + + function encode$1 (value) { + if (Object.prototype.toString.call(value) === '[object Date]') { + return '__q_date|' + value.toUTCString() + } + if (Object.prototype.toString.call(value) === '[object RegExp]') { + return '__q_expr|' + value.source + } + if (typeof value === 'number') { + return '__q_numb|' + value + } + if (typeof value === 'boolean') { + return '__q_bool|' + (value ? '1' : '0') + } + if (typeof value === 'string') { + return '__q_strn|' + value + } + if (typeof value === 'function') { + return '__q_strn|' + value.toString() + } + if (value === Object(value)) { + return '__q_objt|' + JSON.stringify(value) + } + + // hmm, we don't know what to do with it, + // so just return it as is + return value + } + + function decode$1 (value) { + var type, length, source; + + length = value.length; + if (length < 9) { + // then it wasn't encoded by us + return value + } + + type = value.substr(0, 8); + source = value.substring(9); + + switch (type) { + case '__q_date': + return new Date(source) + + case '__q_expr': + return new RegExp(source) + + case '__q_numb': + return Number(source) + + case '__q_bool': + return Boolean(source === '1') + + case '__q_strn': + return '' + source + + case '__q_objt': + return JSON.parse(source) + + default: + // hmm, we reached here, we don't know the type, + // then it means it wasn't encoded by us, so just + // return whatever value it is + return value + } + } + + function getEmptyStorage () { + return { + has: noop, + getLength: noop, + getItem: noop, + getIndex: noop, + getAll: noop, + set: noop, + remove: noop, + clear: noop, + isEmpty: noop + } + } + + function getStorage (type) { + var + webStorage = window[type + 'Storage'], + get = function (key) { + var item = webStorage.getItem(key); + return item + ? decode$1(item) + : null + }; + + return { + has: function (key) { return webStorage.getItem(key) !== null; }, + getLength: function () { return webStorage.length; }, + getItem: get, + getIndex: function (index) { + return index < webStorage.length + ? get(webStorage.key(index)) + : null + }, + getKey: function (index) { + return index < webStorage.length + ? webStorage.key(index) + : null + }, + getAll: function () { + var key; + var result = {}, len = webStorage.length; + + for (var i = 0; i < len; i++) { + key = webStorage.key(i); + result[key] = get(key); + } + + return result + }, + getAllKeys: function () { + var result = [], len = webStorage.length; + + for (var i = 0; i < len; i++) { + result.push(webStorage.key(i)); + } + + return result + }, + set: function (key, value) { webStorage.setItem(key, encode$1(value)); }, + remove: function (key) { webStorage.removeItem(key); }, + clear: function () { webStorage.clear(); }, + isEmpty: function () { return webStorage.length === 0; } + } + } + + var LocalStorage = { + install: function install (ref) { + var $q = ref.$q; + + var storage = isSSR === true || client.has.webStorage === false + ? getEmptyStorage() + : getStorage('local'); + + $q.localStorage = storage; + Object.assign(this, storage); + } + }; + + var SessionStorage = { + install: function install (ref) { + var $q = ref.$q; + + var storage = isSSR === true || client.has.webStorage === false + ? getEmptyStorage() + : getStorage('session'); + + $q.sessionStorage = storage; + Object.assign(this, storage); + } + }; + + + + var plugins = /*#__PURE__*/Object.freeze({ + __proto__: null, + AddressbarColor: AddressbarColor, + AppFullscreen: AppFullscreen, + AppVisibility: AppVisibility, + BottomSheet: BottomSheet$1, + Cookies: Cookies, + Dark: Dark, + Dialog: Dialog, + LoadingBar: LoadingBar, + Loading: Loading, + Meta: Meta, + Notify: Notify, + Platform: Platform, + Screen: Screen, + LocalStorage: LocalStorage, + SessionStorage: SessionStorage + }); + + function fallback (text) { + var area = document.createElement('textarea'); + area.value = text; + area.contentEditable = true; + area.style.position = 'fixed'; // avoid scrolling to bottom + + document.body.appendChild(area); + area.focus(); + area.select(); + + var res = document.execCommand('copy'); + + area.remove(); + return res + } + + function copyToClipboard (text) { + return navigator.clipboard !== void 0 + ? navigator.clipboard.writeText(text) + : new Promise(function (resolve, reject) { + var res = fallback(text); + if (res) { + resolve(true); + } + else { + reject(res); + } + }) + } + + function clean (link) { + // allow time for iOS + setTimeout(function () { + window.URL.revokeObjectURL(link.href); + }, 10000); + link.remove(); + } + + function exportFile (fileName, rawData, mimeType) { + var blob = new Blob([ rawData ], { type: mimeType || 'text/plain' }); + + // IE11 has its own stuff... + if (window.navigator.msSaveOrOpenBlob) { + return window.navigator.msSaveOrOpenBlob(blob, fileName) + } + + var link = document.createElement('a'); + + link.download = fileName; + link.href = window.URL.createObjectURL(blob); + + link.classList.add('hidden'); + link.style.position = 'fixed'; // avoid scrolling to bottom + document.body.appendChild(link); + + try { + link.click(); + clean(link); + return true + } + catch (err) { + clean(link); + return err + } + } + + function openUrl (url, reject) { + var open = window.open; + + if (Platform.is.cordova === true) { + if (cordova !== void 0 && cordova.InAppBrowser !== void 0 && cordova.InAppBrowser.open !== void 0) { + open = cordova.InAppBrowser.open; + } + else if (navigator !== void 0 && navigator.app !== void 0) { + return navigator.app.loadUrl(url, { + openExternal: true + }) + } + } + else if (Vue.prototype.$q.electron !== void 0) { + return Vue.prototype.$q.electron.shell.openExternal(url) + } + + var win = open(url, '_blank'); + + if (win) { + win.focus(); + return win + } + else { + reject && reject(); + } + } + + + + var utils = /*#__PURE__*/Object.freeze({ + __proto__: null, + clone: clone$1, + colors: colors, + copyToClipboard: copyToClipboard, + date: date, + debounce: debounce, + dom: dom, + event: event, + exportFile: exportFile, + extend: extend, + format: format, + frameDebounce: frameDebounce, + noop: noop, + openURL: openUrl, + patterns: patterns, + scroll: scroll, + throttle: throttle, + uid: uid$2 + }); + + Vue.use({ install: install }, { + components: components$1, + directives: directives, + plugins: plugins, + config: window.quasarConfig || {} + }); + + var index_umd = Object.assign({}, {version: version, + lang: lang, + iconSet: iconSet, + components: components$1, + directives: directives, + plugins: plugins, + utils: utils}, + components$1, + directives, + plugins, + utils); + + return index_umd; + +}))); diff --git a/lnbits/static/vendor/quasar@1.9.7/quasar.umd.min.js b/lnbits/static/vendor/quasar@1.9.7/quasar.umd.min.js new file mode 100644 index 00000000..5071dd6f --- /dev/null +++ b/lnbits/static/vendor/quasar@1.9.7/quasar.umd.min.js @@ -0,0 +1,6 @@ +/*! + * Quasar Framework v1.9.7 + * (c) 2015-present Razvan Stoenescu + * Released under the MIT License. + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):(t=t||self).Quasar=e(t.Vue)}(this,function(t){"use strict";if(void 0!==t){t=t&&t.hasOwnProperty("default")?t.default:t;var e,i="undefined"==typeof window,s=!1,n=i,o=!1,r=!1===i&&("ontouchstart"in window||window.navigator.maxTouchPoints>0),a=!1===i?(navigator.userAgent||navigator.vendor||window.opera).toLowerCase():"",l={has:{touch:!1,webStorage:!1},within:{iframe:!1}},c=!1===i?{userAgent:a,is:Go(a),has:{touch:r,webStorage:function(){try{if(window.localStorage)return!0}catch(t){}return!1}()},within:{iframe:window.self!==window.top}}:l,u={install:function(o,r){var a=this;!0===i?r.server.push(function(t,e){t.platform=a.parseSSR(e.ssr)}):!0===s?(Object.assign(this,c,e,l),r.takeover.push(function(t){n=s=!1,Object.assign(t.platform,c),e=void 0}),t.util.defineReactive(o,"platform",this)):(Object.assign(this,c),o.platform=this)}};!0===i?u.parseSSR=function(t){var e=(t.req.headers["user-agent"]||t.req.headers["User-Agent"]||"").toLowerCase();return Object.assign({},c,{userAgent:e,is:Go(e)})}:o=!0===c.is.ios&&-1===window.navigator.vendor.toLowerCase().indexOf("apple");var h={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0};try{var d=Object.defineProperty({},"passive",{get:function(){Object.assign(h,{hasPassive:!0,passive:{passive:!0},notPassive:{passive:!1},passiveCapture:{passive:!0,capture:!0},notPassiveCapture:{passive:!1,capture:!0}})}});window.addEventListener("qtest",null,d),window.removeEventListener("qtest",null,d)}catch(t){}for(var p,f,m,v,g,_,b,y,w,S,C,x=40,k=800,q={listenOpts:h,leftClick:Jo,middleClick:function(t){return 1===t.button},rightClick:function(t){return 2===t.button},position:tr,getEventPath:er,getMouseWheelDistance:function(t){var e,i=t.deltaX,s=t.deltaY;if((i||s)&&t.deltaMode){var n=1===t.deltaMode?x:k;i*=n,s*=n}return t.shiftKey&&!i&&(s=(e=[i,s])[0],i=e[1]),{x:i,y:s}},stop:ir,prevent:sr,stopAndPrevent:nr,preventDraggable:or,create:rr},$=["sm","md","lg","xl"],T=h.passive,M={width:0,height:0,name:"xs",sizes:{sm:600,md:1024,lg:1440,xl:1920},lt:{sm:!0,md:!0,lg:!0,xl:!0},gt:{xs:!1,sm:!1,md:!1,lg:!1},xs:!0,sm:!1,md:!1,lg:!1,xl:!1,setSizes:Zo,setDebounce:Zo,install:function(e,n,o){var r=this;if(!0!==i){var a,l=void 0!==o.screen&&!0===o.screen.bodyClasses,c=function(t){var e=window.innerWidth,i=window.innerHeight;if(i!==r.height&&(r.height=i),e!==r.width)r.width=e;else if(!0!==t)return;var s=r.sizes;r.gt.xs=e>=s.sm,r.gt.sm=e>=s.md,r.gt.md=e>=s.lg,r.gt.lg=e>=s.xl,r.lt.sm=e0?ar(c,t):c,e.addEventListener("resize",a,T)},r.setDebounce(h),Object.keys(u).length>0?(r.setSizes(u),u=void 0):c()};!0===s?n.takeover.push(d):d(),t.util.defineReactive(e,"screen",this)}else e.screen=this}},B={isActive:!1,mode:!1,install:function(e,n,o){var r=this,a=o.dark;if(this.isActive=!0===a,!0===i)return n.server.push(function(t,e){t.dark={isActive:!1,mode:!1,set:function(i){e.ssr.Q_BODY_CLASSES=e.ssr.Q_BODY_CLASSES.replace(" body--light","").replace(" body--dark","")+" body--"+(!0===i?"dark":"light"),t.dark.isActive=!0===i,t.dark.mode=i},toggle:function(){t.dark.set(!1===t.dark.isActive)}},t.dark.set(a)}),void(this.set=Zo);var l=void 0!==a&&a;if(!0===s){var c=function(t){r.__fromSSR=t},u=this.set;this.set=c,c(l),n.takeover.push(function(){r.set=u,r.set(r.__fromSSR)})}else this.set(l);t.util.defineReactive(this,"isActive",this.isActive),t.util.defineReactive(e,"dark",this)},set:function(t){var e=this;this.mode=t,"auto"===t?(void 0===this.__media&&(this.__media=window.matchMedia("(prefers-color-scheme: dark)"),this.__updateMedia=function(){e.set("auto")},this.__media.addListener(this.__updateMedia)),t=this.__media.matches):void 0!==this.__media&&(this.__media.removeListener(this.__updateMedia),this.__media=void 0),this.isActive=!0===t,document.body.classList.remove("body--"+(!0===t?"light":"dark")),document.body.classList.add("body--"+(!0===t?"dark":"light"))},toggle:function(){B.set(!1===B.isActive)},__media:void 0},P=function(){return!0},L={__history:[],add:Zo,remove:Zo,install:function(t){var e=this;if(!0!==i){var s=c.is,n=s.cordova,o=s.capacitor;if(!0===n||!0===o){this.add=function(t){void 0===t.condition&&(t.condition=P),e.__history.push(t)},this.remove=function(t){var i=e.__history.indexOf(t);i>=0&&e.__history.splice(i,1)};var r=function(){if(e.__history.length){var t=e.__history[e.__history.length-1];!0===t.condition()&&(e.__history.pop(),t.handler())}else l&&"#/"===window.location.hash?navigator.app.exitApp():window.history.back()},a=!0===n?"cordova":"capacitor",l=void 0===t[a]||!1!==t[a].backButtonExit;!0===n?document.addEventListener("deviceready",function(){document.addEventListener("backbutton",r,!1)}):window.Capacitor.Plugins.App.addListener("backButton",r)}}}},z={isoName:"en-us",nativeName:"English (US)",label:{clear:"Clear",ok:"OK",cancel:"Cancel",close:"Close",set:"Set",select:"Select",reset:"Reset",remove:"Remove",update:"Update",create:"Create",search:"Search",filter:"Filter",refresh:"Refresh"},date:{days:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),daysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),firstDayOfWeek:0,format24h:!1},table:{noData:"No data available",noResults:"No matching records found",loading:"Loading...",selectedRecords:function(t){return 1===t?"1 record selected.":(0===t?"No":t)+" records selected."},recordsPerPage:"Records per page:",allRows:"All",pagination:function(t,e,i){return t+"-"+e+" of "+i},columns:"Columns"},editor:{url:"URL",bold:"Bold",italic:"Italic",strikethrough:"Strikethrough",underline:"Underline",unorderedList:"Unordered List",orderedList:"Ordered List",subscript:"Subscript",superscript:"Superscript",hyperlink:"Hyperlink",toggleFullscreen:"Toggle Fullscreen",quote:"Quote",left:"Left align",center:"Center align",right:"Right align",justify:"Justify align",print:"Print",outdent:"Decrease indentation",indent:"Increase indentation",removeFormat:"Remove formatting",formatting:"Formatting",fontSize:"Font Size",align:"Align",hr:"Insert Horizontal Rule",undo:"Undo",redo:"Redo",heading1:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",heading4:"Heading 4",heading5:"Heading 5",heading6:"Heading 6",paragraph:"Paragraph",code:"Code",size1:"Very small",size2:"A bit small",size3:"Normal",size4:"Medium-large",size5:"Big",size6:"Very big",size7:"Maximum",defaultFont:"Default Font",viewSource:"View Source"},tree:{noNodes:"No nodes available",noResults:"No matching nodes found"}},O={install:function(e,s,n){var o=this;!0===i&&s.server.push(function(t,e){var i={lang:t.lang.isoName,dir:!0===t.lang.rtl?"rtl":"ltr"},s=e.ssr.setHtmlAttrs;"function"==typeof s?s(i):e.ssr.Q_HTML_ATTRS=Object.keys(i).map(function(t){return t+"="+i[t]}).join(" ")}),this.set=function(s){if(void 0===s&&(s=z),s.set=o.set,s.getLocale=o.getLocale,s.rtl=!0===s.rtl||!1,!1===i){var n=document.documentElement;n.setAttribute("dir",s.rtl?"rtl":"ltr"),n.setAttribute("lang",s.isoName)}!0===i||void 0!==e.lang?e.lang=s:t.util.defineReactive(e,"lang",s),o.isoName=s.isoName,o.nativeName=s.nativeName,o.props=s},this.set(n)},getLocale:function(){if(!0!==i){var t=navigator.language||navigator.languages[0]||navigator.browserLanguage||navigator.userLanguage||navigator.systemLanguage;return t?t.toLowerCase():void 0}}},E=/^rgb(a)?\((\d{1,3}),(\d{1,3}),(\d{1,3}),?([01]?\.?\d*?)?\)$/,D={rgbToHex:lr,hexToRgb:ur,hsvToRgb:hr,rgbToHsv:dr,textToRgb:pr,lighten:function(t,e){if("string"!=typeof t)throw new TypeError("Expected a string as color");if("number"!=typeof e)throw new TypeError("Expected a numeric percent");var i=pr(t),s=e<0?0:255,n=Math.abs(e)/100,o=i.r,r=i.g,a=i.b;return"#"+(16777216+65536*(Math.round((s-o)*n)+o)+256*(Math.round((s-r)*n)+r)+(Math.round((s-a)*n)+a)).toString(16).slice(1)},luminosity:fr,brightness:function(t){if("string"!=typeof t&&(!t||void 0===t.r))throw new TypeError("Expected a string or a {r, g, b} object as color");var e="string"==typeof t?pr(t):t;return(299*e.r+587*e.g+114*e.b)/1e3},blend:function(t,e){if("string"!=typeof t&&(!t||void 0===t.r))throw new TypeError("Expected a string or a {r, g, b[, a]} object as fgColor");if("string"!=typeof e&&(!e||void 0===e.r))throw new TypeError("Expected a string or a {r, g, b[, a]} object as bgColor");var i="string"==typeof t?pr(t):t,s=i.r/255,n=i.g/255,o=i.b/255,r=void 0!==i.a?i.a/100:1,a="string"==typeof e?pr(e):e,l=a.r/255,c=a.g/255,u=a.b/255,h=void 0!==a.a?a.a/100:1,d=r+h*(1-r),p={r:Math.round((s*r+l*h*(1-r))/d*255),g:Math.round((n*r+c*h*(1-r))/d*255),b:Math.round((o*r+u*h*(1-r))/d*255),a:Math.round(100*d)};return"string"==typeof t?lr(p):p},changeAlpha:function(t,e){if("string"!=typeof t)throw new TypeError("Expected a string as color");if(void 0===e||e<-1||e>1)throw new TypeError("Expected offset to be between -1 and 1");var i=pr(t),s=i.r,n=i.g,o=i.b,r=i.a,a=void 0!==r?r/100:0;return lr({r:s,g:n,b:o,a:Math.round(100*Math.min(1,Math.max(0,a+e)))})},setBrand:mr,getBrand:vr},A=!1,I={install:function(t,n){if(!0!==i){if(!0===s)r=document.body.className,a=r,void 0!==e&&(a=a.replace("desktop","platform-ios mobile")),!0===c.has.touch&&(a=a.replace("no-touch","touch")),!0===c.within.iframe&&(a+=" within-iframe"),r!==a&&(document.body.className=a);else{var o=yr(c,n);!0===c.is.ie&&11===c.is.versionNumber?o.forEach(function(t){return document.body.classList.add(t)}):document.body.classList.add.apply(document.body.classList,o)}var r,a;void 0!==n.brand&&function(t){for(var e in t)mr(e,t[e])}(n.brand),!0===c.is.ios&&document.body.addEventListener("touchstart",Zo),window.addEventListener("keydown",gr,!0)}else t.server.push(function(t,e){var i=yr(t.platform,n),s=e.ssr.setBodyClasses;void 0!==n.screen&&!0===n.screen.bodyClass&&i.push("screen--xs"),"function"==typeof s?s(i):e.ssr.Q_BODY_CLASSES=i.join(" ")})}},F={name:"material-icons",type:{positive:"check_circle",negative:"warning",info:"info",warning:"priority_high"},arrow:{up:"arrow_upward",right:"arrow_forward",down:"arrow_downward",left:"arrow_back",dropdown:"arrow_drop_down"},chevron:{left:"chevron_left",right:"chevron_right"},colorPicker:{spectrum:"gradient",tune:"tune",palette:"style"},pullToRefresh:{icon:"refresh"},carousel:{left:"chevron_left",right:"chevron_right",up:"keyboard_arrow_up",down:"keyboard_arrow_down",navigationIcon:"lens"},chip:{remove:"cancel",selected:"check"},datetime:{arrowLeft:"chevron_left",arrowRight:"chevron_right",now:"access_time",today:"today"},editor:{bold:"format_bold",italic:"format_italic",strikethrough:"strikethrough_s",underline:"format_underlined",unorderedList:"format_list_bulleted",orderedList:"format_list_numbered",subscript:"vertical_align_bottom",superscript:"vertical_align_top",hyperlink:"link",toggleFullscreen:"fullscreen",quote:"format_quote",left:"format_align_left",center:"format_align_center",right:"format_align_right",justify:"format_align_justify",print:"print",outdent:"format_indent_decrease",indent:"format_indent_increase",removeFormat:"format_clear",formatting:"text_format",fontSize:"format_size",align:"format_align_left",hr:"remove",undo:"undo",redo:"redo",heading:"format_size",code:"code",size:"format_size",font:"font_download",viewSource:"code"},expansionItem:{icon:"keyboard_arrow_down",denseIcon:"arrow_drop_down"},fab:{icon:"add",activeIcon:"close"},field:{clear:"cancel",error:"error"},pagination:{first:"first_page",prev:"keyboard_arrow_left",next:"keyboard_arrow_right",last:"last_page"},rating:{icon:"grade"},stepper:{done:"check",active:"edit",error:"warning"},tabs:{left:"chevron_left",right:"chevron_right",up:"keyboard_arrow_up",down:"keyboard_arrow_down"},table:{arrowUp:"arrow_upward",warning:"warning",prevPage:"chevron_left",nextPage:"chevron_right"},tree:{icon:"play_arrow"},uploader:{done:"done",clear:"clear",add:"add_box",upload:"cloud_upload",removeQueue:"clear_all",removeUploaded:"done_all"}},R={install:function(e,s){var n=this;this.set=function(s){void 0===s&&(s=F),s.set=n.set,!0===i||void 0!==e.iconSet?e.iconSet=s:t.util.defineReactive(e,"iconSet",s),n.name=s.name,n.def=s},this.set(s),!0!==i&&t.util.defineReactive(e,"iconMapFn",void 0)}},V=[u,M,B],N={server:[],takeover:[]},j={version:"1.9.7"},H=["B","KB","MB","GB","TB","PB"],Q={humanStorageSize:wr,capitalize:Sr,between:Cr,normalizeToInterval:xr,pad:kr},W=i?null:XMLHttpRequest,Y=i?null:W.prototype.send,U=[],K=[],X=0,G=t.extend({name:"QAjaxBar",props:{position:{type:String,default:"top",validator:function(t){return["top","right","bottom","left"].includes(t)}},size:{type:String,default:"2px"},color:{type:String,default:"red"},skipHijack:Boolean,reverse:Boolean},data:function(){return{calls:0,progress:0,onScreen:!1,animate:!0}},computed:{classes:function(){return"q-loading-bar q-loading-bar--"+this.position+" bg-"+this.color+(!0===this.animate?"":" no-transition")},style:function(){var t=this.onScreen,e=function(t){var e=t.p,i=t.pos,s=t.active,n=t.horiz,o=t.reverse,r=t.dir,a=1,l=1;return n?(o&&(a=-1),"bottom"===i&&(l=-1),{transform:"translate3d("+a*(e-100)+"%,"+(s?0:-200*l)+"%,0)"}):(o&&(l=-1),"right"===i&&(a=-1),{transform:"translate3d("+(s?0:r*a*-200)+"%,"+l*(e-100)+"%,0)"})}({p:this.progress,pos:this.position,active:t,horiz:this.horizontal,reverse:!0===this.$q.lang.rtl&&["top","bottom"].includes(this.position)?!this.reverse:this.reverse,dir:!0===this.$q.lang.rtl?-1:1});return e[this.sizeProp]=this.size,e.opacity=t?1:0,e},horizontal:function(){return"top"===this.position||"bottom"===this.position},sizeProp:function(){return this.horizontal?"height":"width"},attrs:function(){return!0===this.onScreen?{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":this.progress}:{"aria-hidden":"true"}}},methods:{start:function(t){var e=this;void 0===t&&(t=300);var i=this.speed;this.speed=Math.max(0,t)||0,this.calls++,this.calls>1?0===i&&t>0?this.__work():i>0&&t<=0&&clearTimeout(this.timer):(clearTimeout(this.timer),this.$emit("start"),this.progress=0,!0!==this.onScreen&&(this.onScreen=!0,this.animate=!1,this.timer=setTimeout(function(){e.animate=!0,t>0&&e.__work()},100)))},increment:function(t){this.calls>0&&(this.progress=function(t,e){return"number"!=typeof e&&(e=t<25?3*Math.random()+3:t<65?3*Math.random():t<85?2*Math.random():t<99?.6:0),Cr(t+e,0,100)}(this.progress,t))},stop:function(){var t=this;if(this.calls=Math.max(0,this.calls-1),!(this.calls>0)){clearTimeout(this.timer),this.$emit("stop");var e=function(){t.animate=!0,t.progress=100,t.timer=setTimeout(function(){t.onScreen=!1},1e3)};0===this.progress?this.timer=setTimeout(e,1):e()}},__work:function(){var t=this;this.progress<100&&(this.timer=setTimeout(function(){t.increment(),t.__work()},this.speed))}},mounted:function(){!0!==this.skipHijack&&(this.hijacked=!0,function(t,e){function i(){K.forEach(function(t){t()})}U.push(t),K.push(e),++X>1||(W.prototype.send=function(){U.forEach(function(t){t()}),this.addEventListener("loadend",i,!1),Y.apply(this,arguments)})}(this.start,this.stop))},beforeDestroy:function(){var t,e;clearTimeout(this.timer),this.hijacked&&(t=this.start,e=this.stop,U.splice(U.indexOf(t),1),K.splice(K.indexOf(e),1),(X=Math.max(0,X-1))||(W.prototype.send=Y))},render:function(t){return t("div",{class:this.classes,style:this.style,attrs:this.attrs})}}),Z={xs:18,sm:24,md:32,lg:38,xl:46},J=qr(Z),tt={props:{tag:{type:String,default:"div"}}},et=t.extend({name:"QIcon",mixins:[J,tt],props:{tag:{default:"i"},name:String,color:String,left:Boolean,right:Boolean},computed:{classes:function(){return"q-icon notranslate"+(!0===this.left?" on-left":"")+(!0===this.right?" on-right":"")+(void 0!==this.color?" text-"+this.color:"")},type:function(){var t,e=this.name;if(!e)return{none:!0,cls:this.classes};if(void 0!==this.$q.iconMapFn){var i=this.$q.iconMapFn(e);if(void 0!==i){if(void 0===i.icon)return{cls:i.cls+" "+this.classes,content:void 0!==i.content?i.content:" "};e=i.icon}}if(!0===e.startsWith("M")){var s=e.split("|");return{svg:!0,cls:this.classes,path:s[0],viewBox:void 0!==s[1]?s[1]:"0 0 24 24"}}if(!0===e.startsWith("img:"))return{img:!0,cls:this.classes,src:e.substring(4)};var n=" ";return/^[l|f]a[s|r|l|b|d]{0,1} /.test(e)||!0===e.startsWith("icon-")?t=e:!0===e.startsWith("bt-")?t="bt "+e:!0===e.startsWith("eva-")?t="eva "+e:!0===/^ion-(md|ios|logo)/.test(e)?t="ionicons "+e:!0===e.startsWith("ion-")?t="ionicons ion-"+(!0===this.$q.platform.is.ios?"ios":"md")+e.substr(3):!0===e.startsWith("mdi-")?t="mdi "+e:!0===e.startsWith("iconfont ")?t=""+e:!0===e.startsWith("ti-")?t="themify-icon "+e:(t="material-icons",!0===e.startsWith("o_")?(e=e.substring(2),t+="-outlined"):!0===e.startsWith("r_")?(e=e.substring(2),t+="-round"):!0===e.startsWith("s_")&&(e=e.substring(2),t+="-sharp"),n=e),{cls:t+" "+this.classes,content:n}}},render:function(t){var e={class:this.type.cls,style:this.sizeStyle,on:this.$listeners,attrs:{"aria-hidden":"true",role:"presentation"}};return!0===this.type.none?t(this.tag,e,$r(this,"default")):!0===this.type.img?(e.attrs.src=this.type.src,t("img",e)):!0===this.type.svg?(e.attrs.focusable="false",e.attrs.viewBox=this.type.viewBox,t("svg",e,Mr([t("path",{attrs:{d:this.type.path}})],this,"default"))):t(this.tag,e,Mr([this.type.content],this,"default"))}}),it=t.extend({name:"QAvatar",mixins:[J],props:{fontSize:String,color:String,textColor:String,icon:String,square:Boolean,rounded:Boolean},computed:{contentClass:function(){var t;return(t={})["bg-"+this.color]=this.color,t["text-"+this.textColor+" q-chip--colored"]=this.textColor,t["q-avatar__content--square"]=this.square,t["rounded-borders"]=this.rounded,t},contentStyle:function(){if(this.fontSize)return{fontSize:this.fontSize}}},render:function(t){var e=void 0!==this.icon?[t(et,{props:{name:this.icon}})]:void 0;return t("div",{staticClass:"q-avatar",style:this.sizeStyle,on:this.$listeners},[t("div",{staticClass:"q-avatar__content row flex-center overflow-hidden",class:this.contentClass,style:this.contentStyle},Br(e,this,"default"))])}}),st=t.extend({name:"QBadge",props:{color:String,textColor:String,floating:Boolean,transparent:Boolean,multiLine:Boolean,outline:Boolean,label:[Number,String],align:{type:String,validator:function(t){return["top","middle","bottom"].includes(t)}}},computed:{style:function(){if(void 0!==this.align)return{verticalAlign:this.align}},classes:function(){var t=!0===this.outline&&this.color||this.textColor;return"q-badge flex inline items-center no-wrap q-badge--"+(!0===this.multiLine?"multi":"single")+"-line"+(!0===this.outline?" q-badge--outline":void 0!==this.color?" bg-"+this.color:"")+(void 0!==t?" text-"+t:"")+(!0===this.floating?" q-badge--floating":"")+(!0===this.transparent?" q-badge--transparent":"")},attrs:function(){return{role:"alert","aria-label":this.label}}},render:function(t){return t("div",{style:this.style,class:this.classes,attrs:this.attrs,on:this.$listeners},void 0!==this.label?[this.label]:$r(this,"default"))}}),nt={props:{dark:{type:Boolean,default:null}},computed:{isDark:function(){return null===this.dark?this.$q.dark.isActive:this.dark}}},ot={role:"alert"},rt=t.extend({name:"QBanner",mixins:[nt],props:{inlineActions:Boolean,dense:Boolean,rounded:Boolean},render:function(t){var e=$r(this,"action"),i=[t("div",{staticClass:"q-banner__avatar col-auto row items-center"},$r(this,"avatar")),t("div",{staticClass:"q-banner__content col text-body2"},$r(this,"default"))];return void 0!==e&&i.push(t("div",{staticClass:"q-banner__actions row items-center justify-end",class:"col-"+(!0===this.inlineActions?"auto":"all")},e)),t("div",{staticClass:"q-banner row items-center",class:{"q-banner--top-padding":void 0!==e&&!this.inlineActions,"q-banner--dense":this.dense,"q-banner--dark q-dark":this.isDark,"rounded-borders":this.rounded},attrs:ot,on:this.$listeners},i)}}),at={role:"toolbar"},lt=t.extend({name:"QBar",mixins:[nt],props:{dense:Boolean},computed:{classes:function(){return"q-bar--"+(!0===this.dense?"dense":"standard")+" q-bar--"+(!0===this.isDark?"dark":"light")}},render:function(t){return t("div",{staticClass:"q-bar row no-wrap items-center",class:this.classes,attrs:at,on:this.$listeners},$r(this,"default"))}}),ct={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},ut=Object.keys(ct),ht={props:{align:{type:String,validator:function(t){return ut.includes(t)}}},computed:{alignClass:function(){var t=void 0===this.align?!0===this.vertical?"stretch":"left":this.align;return(!0===this.vertical?"items":"justify")+"-"+ct[t]}}},dt=t.extend({name:"QBreadcrumbs",mixins:[ht],props:{separator:{type:String,default:"/"},separatorColor:String,activeColor:{type:String,default:"primary"},gutter:{type:String,validator:function(t){return["none","xs","sm","md","lg","xl"].includes(t)},default:"sm"}},computed:{classes:function(){return this.alignClass+("none"===this.gutter?"":" q-gutter-"+this.gutter)},sepClass:function(){if(this.separatorColor)return"text-"+this.separatorColor},activeClass:function(){return"text-"+this.activeColor}},render:function(t){var e=this,i=$r(this,"default");if(void 0!==i){var s=1,n=[],o=i.filter(function(t){return void 0!==t.tag&&t.tag.endsWith("-QBreadcrumbsEl")}).length,r=void 0!==this.$scopedSlots.separator?this.$scopedSlots.separator:function(){return e.separator};return i.forEach(function(i){if(void 0!==i.tag&&i.tag.endsWith("-QBreadcrumbsEl")){var a=s=0)&&Or(e,t,i,!0===e.qKeyEvent)},keyup:function(e){!0===i.enabled&&!0!==e.qSkipRipple&&!0===br(e,i.modifiers.keyCodes)&&Or(e,t,i,!0)}};Er(i,e),t.__qripple&&(t.__qripple_old=t.__qripple),t.__qripple=i,t.addEventListener("click",i.click,h.passive),t.addEventListener("keyup",i.keyup,h.passive)},update:function(t,e){void 0!==t.__qripple&&Er(t.__qripple,e)},unbind:function(t){var e=t.__qripple_old||t.__qripple;void 0!==e&&(e.abort.forEach(function(t){t()}),t.removeEventListener("click",e.click,h.passive),t.removeEventListener("keyup",e.keyup,h.passive),delete t[t.__qripple_old?"__qripple_old":"__qripple"])}},bt={directives:{Ripple:_t},props:{ripple:{type:[Boolean,Object],default:!0}}},yt={mixins:[bt,ht,qr({xs:8,sm:10,md:14,lg:20,xl:24})],props:{type:String,to:[Object,String],replace:Boolean,label:[Number,String],icon:String,iconRight:String,round:Boolean,outline:Boolean,flat:Boolean,unelevated:Boolean,rounded:Boolean,push:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],align:{default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean},computed:{style:function(){if(!1===this.fab&&!1===this.fabMini)return this.sizeStyle},isRounded:function(){return!0===this.rounded||!0===this.fab||!0===this.fabMini},isActionable:function(){return!0!==this.disable&&!0!==this.loading},computedTabIndex:function(){return!0===this.isActionable?this.tabindex||0:-1},hasRouterLink:function(){return!0!==this.disable&&void 0!==this.to&&null!==this.to&&""!==this.to},isLink:function(){return"a"===this.type||!0===this.hasRouterLink},design:function(){return!0===this.flat?"flat":!0===this.outline?"outline":!0===this.push?"push":!0===this.unelevated?"unelevated":"standard"},attrs:function(){var t={tabindex:this.computedTabIndex};return"a"!==this.type&&(t.type=this.type||"button"),!0===this.hasRouterLink?(t.href=this.$router.resolve(this.to).href,t.role="link"):t.role="a"===this.type?"link":"button",!0===this.loading&&void 0!==this.percentage&&(t.role="progressbar",t["aria-valuemin"]=0,t["aria-valuemax"]=100,t["aria-valuenow"]=this.computedPercentage),!0===this.disable&&(t.disabled="",t["aria-disabled"]=""),t},classes:function(){var t;return void 0!==this.color?t=!0===this.flat||!0===this.outline?"text-"+(this.textColor||this.color):"bg-"+this.color+" text-"+(this.textColor||"white"):this.textColor&&(t="text-"+this.textColor),"q-btn--"+this.design+" q-btn--"+(!0===this.round?"round":"rectangle"+(!0===this.isRounded?" q-btn--rounded":""))+(void 0!==t?" "+t:"")+(!0===this.isActionable?" q-btn--actionable q-focusable q-hoverable":!0===this.disable?" disabled":"")+(!0===this.fab?" q-btn--fab":!0===this.fabMini?" q-btn--fab-mini":"")+(!0===this.noCaps?" q-btn--no-uppercase":"")+(!0===this.noWrap?"":" q-btn--wrap")+(!0===this.dense?" q-btn--dense":"")+(!0===this.stretch?" no-border-radius self-stretch":"")+(!0===this.glossy?" glossy":"")},innerClasses:function(){return this.alignClass+(!0===this.stack?" column":" row")+(!0===this.noWrap?" no-wrap text-no-wrap":"")+(!0===this.loading?" q-btn__content--hidden":"")}}},wt=["left","right","up","down","horizontal","vertical"],St={left:!0,right:!0,up:!0,down:!0,horizontal:!0,vertical:!0,all:!0},Ct=!1===i&&!0!==o&&(!0===c.is.ios||window.navigator.vendor.toLowerCase().indexOf("apple")>-1)?function(){return document}:function(t){return t},xt=h.passiveCapture,kt=void 0,qt=void 0,$t=void 0,Tt={role:"img","aria-hidden":"true"},Mt=t.extend({name:"QBtn",mixins:[yt],props:{percentage:Number,darkPercentage:Boolean},computed:{hasLabel:function(){return void 0!==this.label&&null!==this.label&&""!==this.label},computedRipple:function(){return!1!==this.ripple&&Object.assign({keyCodes:[]},!0===this.ripple?{}:this.ripple)},percentageStyle:function(){var t=Math.max(0,Math.min(100,this.percentage));if(t>0)return{transition:"transform 0.6s",transform:"translateX("+(t-100)+"%)"}}},methods:{click:function(t){var e=this;if(void 0!==t){if(!0===t.defaultPrevented)return;var i=document.activeElement;if("submit"===this.type&&(!0===this.$q.platform.is.ie&&(t.clientX<0||t.clientY<0)||i!==document.body&&!1===this.$el.contains(i)&&!1===i.contains(this.$el))){this.$el.focus();var s=function(){document.removeEventListener("keydown",nr,!0),document.removeEventListener("keyup",s,xt),void 0!==e.$el&&e.$el.removeEventListener("blur",s,xt)};document.addEventListener("keydown",nr,!0),document.addEventListener("keyup",s,xt),this.$el.addEventListener("blur",s,xt)}if(!0===this.hasRouterLink){if(!0===t.ctrlKey||!0===t.shiftKey||!0===t.altKey||!0===t.metaKey)return;nr(t)}}var n=function(){var t=e.$router[!0===e.replace?"replace":"push"](e.to);void 0!==t&&"function"==typeof t.catch&&t.catch(Zo)};this.$emit("click",t,n),!0===this.hasRouterLink&&!1!==t.navigate&&n()},__onKeydown:function(t){!0===br(t,[13,32])&&(nr(t),qt!==this.$el&&(void 0!==qt&&this.__cleanup(),this.$el.focus(),qt=this.$el,this.$el.classList.add("q-btn--active"),document.addEventListener("keyup",this.__onPressEnd,!0),this.$el.addEventListener("blur",this.__onPressEnd,xt))),this.$emit("keydown",t)},__onTouchstart:function(t){if(kt!==this.$el){void 0!==kt&&this.__cleanup(),kt=this.$el;var e=this.touchTargetEl=Ct(t.target);e.addEventListener("touchcancel",this.__onPressEnd,xt),e.addEventListener("touchend",this.__onPressEnd,xt)}this.$emit("touchstart",t)},__onMousedown:function(t){$t!==this.$el&&(void 0!==$t&&this.__cleanup(),$t=this.$el,this.$el.classList.add("q-btn--active"),document.addEventListener("mouseup",this.__onPressEnd,xt)),this.$emit("mousedown",t)},__onPressEnd:function(t){if(void 0===t||"blur"!==t.type||document.activeElement!==this.$el){if(void 0!==t&&"keyup"===t.type){if(qt===this.$el&&!0===br(t,[13,32])){var e=new MouseEvent("click",t);e.qKeyEvent=!0,!0===t.defaultPrevented&&sr(e),!0===t.cancelBubble&&ir(e),this.$el.dispatchEvent(e),nr(t),t.qKeyEvent=!0}this.$emit("keyup",t)}this.__cleanup()}},__cleanup:function(t){if(!0===t||kt!==this.$el&&$t!==this.$el||void 0===this.$refs.blurTarget||this.$refs.blurTarget===document.activeElement||this.$refs.blurTarget.focus(),kt===this.$el){var e=this.touchTargetEl;e.removeEventListener("touchcancel",this.__onPressEnd,xt),e.removeEventListener("touchend",this.__onPressEnd,xt),kt=this.touchTargetEl=void 0}$t===this.$el&&(document.removeEventListener("mouseup",this.__onPressEnd,xt),$t=void 0),qt===this.$el&&(document.removeEventListener("keyup",this.__onPressEnd,!0),void 0!==this.$el&&this.$el.removeEventListener("blur",this.__onPressEnd,xt),qt=void 0),void 0!==this.$el&&this.$el.classList.remove("q-btn--active")},__onLoadingEvt:function(t){nr(t),t.qSkipRipple=!0}},beforeDestroy:function(){this.__cleanup(!0)},render:function(t){var e=[],i={staticClass:"q-btn q-btn-item non-selectable no-outline",class:this.classes,style:this.style,attrs:this.attrs};!0===this.isActionable&&(i.on=Object.assign({},this.$listeners,{click:this.click,keydown:this.__onKeydown,mousedown:this.__onMousedown}),!0===this.$q.platform.has.touch&&(i.on.touchstart=this.__onTouchstart)),!0!==this.disable&&!1!==this.ripple&&(i.directives=[{name:"ripple",value:this.computedRipple,modifiers:{center:this.round}}]),void 0!==this.icon&&e.push(t(et,{attrs:Tt,props:{name:this.icon,left:!1===this.stack&&!0===this.hasLabel}})),!0===this.hasLabel&&e.push(t("div",[this.label])),e=Mr(e,this,"default"),void 0!==this.iconRight&&!1===this.round&&e.push(t(et,{attrs:Tt,props:{name:this.iconRight,right:!1===this.stack&&!0===this.hasLabel}}));var s=[t("div",{staticClass:"q-focus-helper",ref:"blurTarget",attrs:{tabindex:-1}})];return!0===this.loading&&(i.on={click:this.__onLoadingEvt,keyup:this.__onLoadingEvt},void 0!==this.percentage&&s.push(t("div",{staticClass:"q-btn__progress absolute-full overflow-hidden"},[t("div",{staticClass:"q-btn__progress-indicator fit",class:!0===this.darkPercentage?"q-btn__progress--dark":"",style:this.percentageStyle})]))),s.push(t("div",{staticClass:"q-btn__wrapper col row q-anchor--skip"},[t("div",{staticClass:"q-btn__content text-center col items-center q-anchor--skip",class:this.innerClasses},e)])),null!==this.loading&&s.push(t("transition",{props:{name:"q-transition--fade"}},!0===this.loading?[t("div",{key:"loading",staticClass:"absolute-full flex flex-center"},void 0!==this.$scopedSlots.loading?this.$scopedSlots.loading():[t(vt)])]:void 0)),t(!0===this.isLink?"a":"button",i,s)}}),Bt=t.extend({name:"QBtnGroup",props:{unelevated:Boolean,outline:Boolean,flat:Boolean,rounded:Boolean,push:Boolean,stretch:Boolean,glossy:Boolean,spread:Boolean},computed:{classes:function(){var t=this;return["unelevated","outline","flat","rounded","push","stretch","glossy"].filter(function(e){return!0===t[e]}).map(function(t){return"q-btn-group--"+t}).join(" ")}},render:function(t){return t("div",{staticClass:"q-btn-group row no-wrap "+(!0===this.spread?"q-btn-group--spread":"inline"),class:this.classes,on:this.$listeners},$r(this,"default"))}}),Pt={props:{target:{default:!0},noParentEvent:Boolean,contextMenu:Boolean},watch:{contextMenu:function(t){void 0!==this.anchorEl&&(this.__unconfigureAnchorEl(),this.__configureAnchorEl(t))},target:function(){void 0!==this.anchorEl&&this.__unconfigureAnchorEl(),this.__pickAnchorEl()},noParentEvent:function(t){void 0!==this.anchorEl&&(!0===t?this.__unconfigureAnchorEl():this.__configureAnchorEl())}},methods:{__showCondition:function(t){return void 0!==this.anchorEl&&(void 0===t||(void 0===t.touches||t.touches.length<=1))},__contextClick:function(t){var e=this;this.hide(t),this.$nextTick(function(){e.show(t)}),sr(t)},__toggleKey:function(t){!0===br(t,13)&&this.toggle(t)},__mobileCleanup:function(t){this.anchorEl.classList.remove("non-selectable"),clearTimeout(this.touchTimer),!0===this.showing&&void 0!==t&&Vr()},__mobilePrevent:sr,__mobileTouch:function(t){var e=this;if(this.__mobileCleanup(t),!0===this.__showCondition(t)){this.hide(t),this.anchorEl.classList.add("non-selectable");var i=Ct(t.target);Ir(this,"anchor",[[i,"touchmove","__mobileCleanup","passive"],[i,"touchend","__mobileCleanup","passive"],[i,"touchcancel","__mobileCleanup","passive"],[this.anchorEl,"contextmenu","__mobilePrevent","notPassive"]]),this.touchTimer=setTimeout(function(){e.show(t)},300)}},__unconfigureAnchorEl:function(){Fr(this,"anchor")},__configureAnchorEl:function(t){(void 0===t&&(t=this.contextMenu),!0!==this.noParentEvent&&void 0!==this.anchorEl)&&Ir(this,"anchor",!0===t?!0===this.$q.platform.is.mobile?[[this.anchorEl,"touchstart","__mobileTouch","passive"]]:[[this.anchorEl,"click","hide","passive"],[this.anchorEl,"contextmenu","__contextClick","notPassive"]]:[[this.anchorEl,"click","toggle","passive"],[this.anchorEl,"keyup","__toggleKey","passive"]])},__setAnchorEl:function(t){for(this.anchorEl=t;this.anchorEl.classList.contains("q-anchor--skip");)this.anchorEl=this.anchorEl.parentNode;this.__configureAnchorEl()},__pickAnchorEl:function(){if(!1===this.target||""===this.target)this.anchorEl=void 0;else if(!0===this.target)this.__setAnchorEl(this.parentEl);else{var t=this.target;if("string"==typeof this.target)try{t=document.querySelector(this.target)}catch(e){t=void 0}void 0!==t&&null!==t?(this.anchorEl=!0===t._isVue&&void 0!==t.$el?t.$el:t,this.__configureAnchorEl()):(this.anchorEl=void 0,console.error('Anchor: target "'+this.target+'" not found',this))}},__changeScrollEvent:function(t,e){var i=(void 0!==e?"add":"remove")+"EventListener",s=void 0!==e?e:this.__scrollFn;t!==window&&t[i]("scroll",s,h.passive),window[i]("scroll",s,h.passive),this.__scrollFn=e}},created:function(){var t=this;"function"==typeof this.__configureScrollTarget&&"function"==typeof this.__unconfigureScrollTarget&&(this.noParentEventWatcher=this.$watch("noParentEvent",function(){void 0!==t.__scrollTarget&&(t.__unconfigureScrollTarget(),t.__configureScrollTarget())}))},mounted:function(){this.parentEl=this.$el.parentNode,this.__pickAnchorEl(),!0===this.value&&void 0===this.anchorEl&&this.$emit("input",!1)},beforeDestroy:function(){clearTimeout(this.touchTimer),void 0!==this.noParentEventWatcher&&this.noParentEventWatcher(),void 0!==this.__anchorCleanup&&this.__anchorCleanup(),this.__unconfigureAnchorEl()}},Lt={methods:{__nextTick:function(t){this.__tickFn=t},__prepareTick:function(){var t=this;if(void 0!==this.__tickFn){var e=this.__tickFn;this.$nextTick(function(){t.__tickFn===e&&(t.__tickFn(),t.__tickFn=void 0)})}},__clearTick:function(){this.__tickFn=void 0},__setTimeout:function(t,e){clearTimeout(this.__timer),this.__timer=setTimeout(t,e)},__clearTimeout:function(){clearTimeout(this.__timer)}},beforeDestroy:function(){this.__tickFn=void 0,clearTimeout(this.__timer)}},zt={mixins:[Lt],props:{value:{type:Boolean,default:void 0}},data:function(){return{showing:!1}},watch:{value:function(t){this.__processModelChange(t)},$route:function(){!0===this.hideOnRouteChange&&!0===this.showing&&this.hide()}},methods:{toggle:function(t){this[!0===this.showing?"hide":"show"](t)},show:function(t){var e=this;!0===this.disable||void 0!==this.__showCondition&&!0!==this.__showCondition(t)||(void 0!==this.$listeners.input&&!1===i&&(this.$emit("input",!0),this.payload=t,this.$nextTick(function(){e.payload===t&&(e.payload=void 0)})),void 0!==this.value&&void 0!==this.$listeners.input&&!0!==i||this.__processShow(t))},__processShow:function(t){!0!==this.showing&&(void 0!==this.__preparePortal&&this.__preparePortal(),this.showing=!0,this.$emit("before-show",t),void 0!==this.__show?(this.__clearTick(),this.__show(t),this.__prepareTick()):this.$emit("show",t))},hide:function(t){var e=this;!0!==this.disable&&(void 0!==this.$listeners.input&&!1===i&&(this.$emit("input",!1),this.payload=t,this.$nextTick(function(){e.payload===t&&(e.payload=void 0)})),void 0!==this.value&&void 0!==this.$listeners.input&&!0!==i||this.__processHide(t))},__processHide:function(t){!1!==this.showing&&(this.showing=!1,this.$emit("before-hide",t),void 0!==this.__hide?(this.__clearTick(),this.__hide(t),this.__prepareTick()):this.$emit("hide",t))},__processModelChange:function(t){!0===this.disable&&!0===t?void 0!==this.$listeners.input&&this.$emit("input",!1):!0===t!==this.showing&&this["__process"+(!0===t?"Show":"Hide")](this.payload)}}},Ot={inheritAttrs:!1,props:{contentClass:[Array,String,Object],contentStyle:[Array,String,Object]},methods:{__showPortal:function(){void 0!==this.__portal&&document.body.appendChild(this.__portal.$el)},__hidePortal:function(){void 0!==this.__portal&&(this.__portal.$destroy(),this.__portal.$el.remove(),this.__portal=void 0)},__preparePortal:function(){var e=this;void 0===this.__portal&&(this.__portal=new t({name:"QPortal",parent:this,inheritAttrs:!1,render:function(t){return e.__renderPortal(t)},components:this.$options.components,directives:this.$options.directives}).$mount())}},render:function(){void 0!==this.__portal&&this.__portal.$forceUpdate()},beforeDestroy:function(){this.__hidePortal()}},Et={props:{transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"}},data:function(){return{transitionState:this.showing}},watch:{showing:function(t){var e=this;this.transitionShow!==this.transitionHide&&this.$nextTick(function(){e.transitionState=t})}},computed:{transition:function(){return"q-transition--"+(!0===this.transitionState?this.transitionHide:this.transitionShow)}}},Dt=h.notPassiveCapture,At=h.passiveCapture,It={click:[],focus:[]},Ft={name:"click-outside",bind:function(t,e,i){var s=e.value,n=e.arg,o=i.componentInstance||i.context,r={trigger:s,toggleEl:n,handler:function(t){var e=t.target;if(!(void 0===e||8===e.nodeType||e===document.documentElement||!1!==e.classList.contains("no-pointer-events")||void 0!==r.toggleEl&&!1!==r.toggleEl.contains(e)||e!==document.body&&!1!==function(t,e){for(var i=t;void 0!==i;i=i.$parent)if(i===e)return!0;return!1}(function(t){for(var e=t;null!==e;e=e.parentNode){if(null===e.__vue__)return;if(void 0!==e.__vue__)return e.__vue__}}(e),o)))return t.qClickOutside=!0,r.trigger(t)}};t.__qclickoutside&&(t.__qclickoutside_old=t.__qclickoutside),t.__qclickoutside=r,0===It.click.length&&(document.addEventListener("mousedown",Wr,Dt),document.addEventListener("touchstart",Wr,Dt),document.addEventListener("focusin",Wr,At)),It.click.push(r.handler),r.timerFocusin=setTimeout(function(){It.focus.push(r.handler)},500)},update:function(t,e){var i=e.value,s=e.oldValue,n=e.arg,o=t.__qclickoutside;i!==s&&(o.trigger=i),n!==o.arg&&(o.toggleEl=n)},unbind:function(t){var e=t.__qclickoutside_old||t.__qclickoutside;if(void 0!==e){clearTimeout(e.timerFocusin);var i=It.click.findIndex(function(t){return t===e.handler}),s=It.focus.findIndex(function(t){return t===e.handler});i>-1&&It.click.splice(i,1),s>-1&&It.focus.splice(s,1),0===It.click.length&&(clearTimeout(p),document.removeEventListener("mousedown",Wr,Dt),document.removeEventListener("touchstart",Wr,Dt),document.removeEventListener("focusin",Wr,At)),delete t[t.__qclickoutside_old?"__qclickoutside_old":"__qclickoutside"]}}},Rt=!1===i?[null,document,document.body,document.scrollingElement,document.documentElement]:[],Vt={getScrollTarget:Yr,getScrollHeight:Ur,getScrollWidth:function(t){return(t===window?document.body:t).scrollWidth},getScrollPosition:Kr,getHorizontalScrollPosition:Xr,animScrollTo:Gr,animHorizontalScrollTo:Zr,setScrollPosition:ea,setHorizontalScrollPosition:ia,getScrollbarWidth:sa,hasScrollbar:na},Nt=[],jt={__install:function(){this.__installed=!0,window.addEventListener("keyup",function(t){0!==Nt.length&&!0===br(t,27)&&Nt[Nt.length-1].fn(t)})},register:function(t,e){!0===t.$q.platform.is.desktop&&(!0!==this.__installed&&this.__install(),Nt.push({comp:t,fn:e}))},pop:function(t){if(!0===t.$q.platform.is.desktop){var e=Nt.findIndex(function(e){return e.comp===t});e>-1&&Nt.splice(e,1)}}},Ht=t.extend({name:"QMenu",mixins:[nt,Pt,zt,Ot,Et],directives:{ClickOutside:Ft},props:{persistent:Boolean,autoClose:Boolean,separateClosePopup:Boolean,noRefocus:Boolean,noFocus:Boolean,fit:Boolean,cover:Boolean,square:Boolean,anchor:{type:String,validator:oa},self:{type:String,validator:oa},offset:{type:Array,validator:ra},scrollTarget:{default:void 0},touchPosition:Boolean,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null}},computed:{horizSide:function(){return!0===this.$q.lang.rtl?"right":"left"},anchorOrigin:function(){return aa(this.anchor||(!0===this.cover?"center middle":"bottom "+this.horizSide))},selfOrigin:function(){return!0===this.cover?this.anchorOrigin:aa(this.self||"top "+this.horizSide)},menuClass:function(){return(!0===this.square?" q-menu--square":"")+(!0===this.isDark?" q-menu--dark q-dark":"")},hideOnRouteChange:function(){return!0!==this.persistent}},methods:{focus:function(){var t=void 0!==this.__portal&&void 0!==this.__portal.$refs?this.__portal.$refs.inner:void 0;void 0!==t&&!0!==t.contains(document.activeElement)&&(t=t.querySelector("[autofocus], [data-autofocus]")||t).focus()},__show:function(t){var e=this;if(this.__refocusTarget=!1===this.noRefocus&&null!==document.activeElement?document.activeElement:void 0,jt.register(this,function(){!0!==e.persistent&&(e.$emit("escape-key"),e.hide())}),this.__showPortal(),this.__configureScrollTarget(),this.absoluteOffset=void 0,void 0!==t&&(this.touchPosition||this.contextMenu)){var i=tr(t);if(void 0!==i.left){var s=this.anchorEl.getBoundingClientRect(),n=s.top,o=s.left;this.absoluteOffset={left:i.left-o,top:i.top-n}}}void 0===this.unwatch&&(this.unwatch=this.$watch(function(){return e.$q.screen.width+"|"+e.$q.screen.height},this.updatePosition)),this.$el.dispatchEvent(rr("popup-show",{bubbles:!0})),!0!==this.noFocus&&null!==document.activeElement&&document.activeElement.blur(),this.__nextTick(function(){e.updatePosition(),!0!==e.noFocus&&e.focus()}),this.__setTimeout(function(){!0===e.$q.platform.is.ios&&(e.__avoidAutoClose=e.autoClose,e.__portal.$el.click()),e.updatePosition(),e.$emit("show",t)},300)},__hide:function(t){var e=this;this.__anchorCleanup(!0),void 0===this.__refocusTarget||null===this.__refocusTarget||void 0!==t&&!0===t.qClickOutside||this.__refocusTarget.focus(),this.$el.dispatchEvent(rr("popup-hide",{bubbles:!0})),this.__setTimeout(function(){e.__hidePortal(),e.$emit("hide",t)},300)},__anchorCleanup:function(t){this.absoluteOffset=void 0,void 0!==this.unwatch&&(this.unwatch(),this.unwatch=void 0),!0!==t&&!0!==this.showing||(jt.pop(this),this.__unconfigureScrollTarget())},__unconfigureScrollTarget:function(){void 0!==this.__scrollTarget&&(this.__changeScrollEvent(this.__scrollTarget),this.__scrollTarget=void 0)},__configureScrollTarget:function(){void 0===this.anchorEl&&void 0===this.scrollTarget||(this.__scrollTarget=Yr(this.anchorEl,this.scrollTarget),this.__changeScrollEvent(this.__scrollTarget,this.updatePosition))},__onAutoClose:function(t){!0!==this.__avoidAutoClose?(Nr(this,t),void 0!==this.$listeners.click&&this.$emit("click",t)):this.__avoidAutoClose=!1},updatePosition:function(){if(void 0!==this.anchorEl&&void 0!==this.__portal){var t=this.__portal.$el;8!==t.nodeType?la({el:t,offset:this.offset,anchorEl:this.anchorEl,anchorOrigin:this.anchorOrigin,selfOrigin:this.selfOrigin,absoluteOffset:this.absoluteOffset,fit:this.fit,cover:this.cover,maxHeight:this.maxHeight,maxWidth:this.maxWidth}):setTimeout(this.updatePosition,25)}},__onClickOutside:function(t){if(!0!==this.persistent&&!0===this.showing){var e=t.target.classList;return this.hide(t),("touchstart"===t.type||e.contains("q-dialog__backdrop"))&&nr(t),!0}},__renderPortal:function(t){var e=Object.assign({},this.$listeners,{input:ir,"popup-show":ir,"popup-hide":ir});return!0===this.autoClose&&(e.click=this.__onAutoClose),t("transition",{props:{name:this.transition}},[!0===this.showing?t("div",{ref:"inner",staticClass:"q-menu q-position-engine scroll"+this.menuClass,class:this.contentClass,style:this.contentStyle,attrs:Object.assign({},{tabindex:-1},this.$attrs),on:e,directives:[{name:"click-outside",value:this.__onClickOutside,arg:this.anchorEl}]},$r(this,"default")):null])}},mounted:function(){this.__processModelChange(this.value)},beforeDestroy:function(){!0===this.showing&&void 0!==this.anchorEl&&this.anchorEl.dispatchEvent(rr("popup-hide",{bubbles:!0}))}}),Qt=t.extend({name:"QBtnDropdown",mixins:[yt],props:{value:Boolean,split:Boolean,dropdownIcon:String,contentClass:[Array,String,Object],contentStyle:[Array,String,Object],cover:Boolean,persistent:Boolean,autoClose:Boolean,menuAnchor:{type:String,default:"bottom right"},menuSelf:{type:String,default:"top right"},menuOffset:Array,disableMainBtn:Boolean,disableDropdown:Boolean},data:function(){return{showing:this.value}},watch:{value:function(t){void 0!==this.$refs.menu&&this.$refs.menu[t?"show":"hide"]()}},render:function(t){var e=this,i=$r(this,"label",[]),s={"aria-expanded":!0===this.showing?"true":"false","aria-haspopup":!0},n=[t(et,{props:{name:this.dropdownIcon||this.$q.iconSet.arrow.dropdown},staticClass:"q-btn-dropdown__arrow",class:{"rotate-180":this.showing,"q-btn-dropdown__arrow-container":!1===this.split}})];if(!0!==this.disableDropdown&&n.push(t(Ht,{ref:"menu",props:{cover:this.cover,fit:!0,persistent:this.persistent,autoClose:this.autoClose,anchor:this.menuAnchor,self:this.menuSelf,offset:this.menuOffset,contentClass:this.contentClass,contentStyle:this.contentStyle,separateClosePopup:!0},on:Hr(this,"menu",{"before-show":function(t){e.showing=!0,e.$emit("before-show",t)},show:function(t){e.$emit("show",t),e.$emit("input",!0)},"before-hide":function(t){e.showing=!1,e.$emit("before-hide",t)},hide:function(t){e.$emit("hide",t),e.$emit("input",!1)}})},$r(this,"default"))),!1===this.split)return t(Mt,{class:"q-btn-dropdown q-btn-dropdown--simple",props:Object.assign({},this.$props,{disable:!0===this.disable||!0===this.disableMainBtn,noWrap:!0,round:!1}),attrs:s,on:Hr(this,"nonSpl",{click:function(t){e.$emit("click",t)}})},i.concat(n));var o=t(Mt,{class:"q-btn-dropdown--current",props:Object.assign({},this.$props,{disable:!0===this.disable||!0===this.disableMainBtn,noWrap:!0,iconRight:this.iconRight,round:!1}),on:Hr(this,"spl",{click:function(t){e.hide(),e.$emit("click",t)}})},i);return t(Bt,{props:{outline:this.outline,flat:this.flat,rounded:this.rounded,push:this.push,unelevated:this.unelevated,glossy:this.glossy,stretch:this.stretch},staticClass:"q-btn-dropdown q-btn-dropdown--split no-wrap q-btn-item"},[o,t(Mt,{staticClass:"q-btn-dropdown__arrow-container",attrs:s,props:{disable:!0===this.disable||!0===this.disableDropdown,outline:this.outline,flat:this.flat,rounded:this.rounded,push:this.push,size:this.size,color:this.color,textColor:this.textColor,dense:this.dense,ripple:this.ripple}},n)])},methods:{toggle:function(t){this.$refs.menu&&this.$refs.menu.toggle(t)},show:function(t){this.$refs.menu&&this.$refs.menu.show(t)},hide:function(t){this.$refs.menu&&this.$refs.menu.hide(t)}},mounted:function(){!0===this.value&&this.show()}}),Wt={props:{name:String},computed:{formAttrs:function(){return{type:"hidden",name:this.name,value:this.value}}},methods:{__injectFormInput:function(t,e,i){t[e](this.$createElement("input",{staticClass:"hidden",class:i,attrs:this.formAttrs,domProps:this.formDomProps}))}}},Yt={props:{name:String},computed:{nameProp:function(){return this.name||this.for}}},Ut=t.extend({name:"QBtnToggle",mixins:[bt,Wt],props:{value:{required:!0},options:{type:Array,required:!0,validator:function(t){return t.every(function(t){return("label"in t||"icon"in t||"slot"in t)&&"value"in t})}},color:String,textColor:String,toggleColor:{type:String,default:"primary"},toggleTextColor:String,outline:Boolean,flat:Boolean,unelevated:Boolean,rounded:Boolean,push:Boolean,glossy:Boolean,size:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,readonly:Boolean,disable:Boolean,stack:Boolean,stretch:Boolean,spread:Boolean,clearable:Boolean},computed:{hasActiveValue:function(){var t=this;return void 0!==this.options.find(function(e){return e.value===t.value})},formAttrs:function(){return{type:"hidden",name:this.name,value:this.value}}},methods:{__set:function(t,e){!0!==this.readonly&&(this.value===t?!0===this.clearable&&(this.$emit("input",null,null),this.$emit("clear")):this.$emit("input",t,e))}},render:function(t){var e=this,i=this.options.map(function(i,s){return t(Mt,{key:s,on:{click:function(){return e.__set(i.value,i)}},props:{disable:e.disable||i.disable,label:i.label,color:i.value===e.value?i.toggleColor||e.toggleColor:i.color||e.color,textColor:i.value===e.value?i.toggleTextColor||e.toggleTextColor:i.textColor||e.textColor,icon:i.icon,iconRight:i.iconRight,noCaps:!0===e.noCaps||!0===i.noCaps,noWrap:!0===e.noWrap||!0===i.noWrap,outline:e.outline,flat:e.flat,rounded:e.rounded,push:e.push,unelevated:e.unelevated,size:e.size,dense:e.dense,ripple:void 0!==e.ripple?e.ripple:i.ripple,stack:!0===e.stack||!0===i.stack,tabindex:i.tabindex,stretch:e.stretch}},void 0!==i.slot?$r(e,i.slot):void 0)});return void 0!==this.name&&!0!==this.disable&&!0===this.hasActiveValue&&this.__injectFormInput(i,"push"),t(Bt,{staticClass:"q-btn-toggle",props:{outline:this.outline,flat:this.flat,rounded:this.rounded,push:this.push,stretch:this.stretch,unelevated:this.unelevated,glossy:this.glossy,spread:this.spread},on:this.$listeners},i)}}),Kt=t.extend({name:"QCard",mixins:[nt,tt],props:{square:Boolean,flat:Boolean,bordered:Boolean},computed:{classes:function(){return"q-card"+(!0===this.isDark?" q-card--dark q-dark":"")+(!0===this.bordered?" q-card--bordered":"")+(!0===this.square?" q-card--square no-border-radius":"")+(!0===this.flat?" q-card--flat no-shadow":"")}},render:function(t){return t(this.tag,{class:this.classes,on:this.$listeners},$r(this,"default"))}}),Xt=t.extend({name:"QCardSection",mixins:[tt],props:{horizontal:Boolean},computed:{classes:function(){return"q-card__section q-card__section--"+(!0===this.horizontal?"horiz row no-wrap":"vert")}},render:function(t){return t(this.tag,{class:this.classes,on:this.$listeners},$r(this,"default"))}}),Gt=t.extend({name:"QCardActions",mixins:[ht],props:{vertical:Boolean},computed:{classes:function(){return"q-card__actions--"+(!0===this.vertical?"vert column":"horiz row")+" "+this.alignClass}},render:function(t){return t("div",{staticClass:"q-card__actions",class:this.classes,on:this.$listeners},$r(this,"default"))}}),Zt={name:"touch-swipe",bind:function(t,e){var i=e.value,s=e.arg,n=e.modifiers;if(!0===n.mouse||!0===c.has.touch){var o=!0===n.mouseCapture?"Capture":"",r={handler:i,sensitivity:function(t){var e=[.06,6,50];return"string"==typeof t&&t.length&&t.split(":").forEach(function(t,i){var s=parseFloat(t);s&&(e[i]=s)}),e}(s),modifiers:n,direction:Dr(n),noop:Zo,mouseStart:function(t){Rr(t,r)&&Jo(t)&&(Ir(r,"temp",[[document,"mousemove","move","notPassive"+o],[document,"mouseup","end","notPassiveCapture"]]),r.start(t,!0))},touchStart:function(t){if(Rr(t,r)){var e=Ct(t.target);Ir(r,"temp",[[e,"touchmove","move","notPassiveCapture"],[e,"touchcancel","end","notPassiveCapture"],[e,"touchend","end","notPassiveCapture"]]),r.start(t)}},start:function(e,i){!0===c.is.firefox&&or(t,!0);var s=tr(e);r.event={x:s.left,y:s.top,time:Date.now(),mouse:!0===i,dir:!1}},move:function(t){if(void 0!==r.event)if(!1===r.event.dir){var e=Date.now()-r.event.time;if(0!==e){var i=tr(t),s=i.left-r.event.x,n=Math.abs(s),o=i.top-r.event.y,a=Math.abs(o);if(!0!==r.event.mouse){if(nr.sensitivity[0]&&(r.event.dir=o<0?"up":"down"),!0===r.direction.horizontal&&n>a&&a<100&&l>r.sensitivity[0]&&(r.event.dir=s<0?"left":"right"),!0===r.direction.up&&nr.sensitivity[0]&&(r.event.dir="up"),!0===r.direction.down&&n0&&n<100&&c>r.sensitivity[0]&&(r.event.dir="down"),!0===r.direction.left&&n>a&&s<0&&a<100&&l>r.sensitivity[0]&&(r.event.dir="left"),!0===r.direction.right&&n>a&&s>0&&a<100&&l>r.sensitivity[0]&&(r.event.dir="right"),!1!==r.event.dir?(nr(t),!0===r.event.mouse&&(document.body.classList.add("no-pointer-events"),document.body.classList.add("non-selectable"),Vr(),r.styleCleanup=function(t){r.styleCleanup=void 0,document.body.classList.remove("non-selectable");var e=function(){document.body.classList.remove("no-pointer-events")};!0===t?setTimeout(e,50):e()}),r.handler({evt:t,touch:!0!==r.event.mouse,mouse:r.event.mouse,direction:r.event.dir,duration:e,distance:{x:n,y:a}})):r.end(t)}}else nr(t)},end:function(e){void 0!==r.event&&(Fr(r,"temp"),!0===c.is.firefox&&or(t,!1),void 0!==r.styleCleanup&&r.styleCleanup(!0),void 0!==e&&!1!==r.event.dir&&nr(e),r.event=void 0)}};t.__qtouchswipe&&(t.__qtouchswipe_old=t.__qtouchswipe),t.__qtouchswipe=r,!0===n.mouse&&Ir(r,"main",[[t,"mousedown","mouseStart","passive"+o]]),!0===c.has.touch&&Ir(r,"main",[[t,"touchstart","touchStart","passive"+(!0===n.capture?"Capture":"")],[t,"touchmove","noop","notPassiveCapture"]])}},update:function(t,e){void 0!==t.__qtouchswipe&&Ar(t.__qtouchswipe,e)},unbind:function(t){var e=t.__qtouchswipe_old||t.__qtouchswipe;void 0!==e&&(Fr(e,"main"),Fr(e,"temp"),!0===c.is.firefox&&or(t,!1),void 0!==e.styleCleanup&&e.styleCleanup(),delete t[t.__qtouchswipe_old?"__qtouchswipe_old":"__qtouchswipe"])}},Jt=t.extend({name:"QTabPanelWrapper",render:function(t){return t("div",{staticClass:"q-panel scroll",attrs:{role:"tabpanel"},on:Hr(this,"stop",{input:ir})},$r(this,"default"))}}),te={directives:{TouchSwipe:Zt},props:{value:{required:!0},animated:Boolean,infinite:Boolean,swipeable:Boolean,vertical:Boolean,transitionPrev:String,transitionNext:String,keepAlive:Boolean},data:function(){return{panelIndex:null,panelTransition:null}},computed:{panelDirectives:function(){if(!0===this.swipeable)return[{name:"touch-swipe",value:this.__swipe,modifiers:{horizontal:!0!==this.vertical,vertical:this.vertical,mouse:!0}}]},contentKey:function(){return"string"==typeof this.value||"number"==typeof this.value?this.value:String(this.value)},transitionPrevComputed:function(){return this.transitionPrev||"slide-"+(!0===this.vertical?"down":"right")},transitionNextComputed:function(){return this.transitionNext||"slide-"+(!0===this.vertical?"up":"left")}},watch:{value:function(t,e){var i=this,s=!0===this.__isValidPanelName(t)?this.__getPanelIndex(t):-1;!0!==this.__forcedPanelTransition&&this.__updatePanelTransition(-1===s?0:s-1&&s0&&-1!==e&&e!==n.length&&this.__go(t,-1===t?n.length:-1)},__swipe:function(t){var e=!0===this.vertical?"up":"left";this.__go((!0===this.$q.lang.rtl?-1:1)*(t.direction===e?1:-1))},__updatePanelIndex:function(){var t=this.__getPanelIndex(this.value);return this.panelIndex!==t&&(this.panelIndex=t),!0},__getPanelContent:function(t){if(0!==this.panels.length){var e=this.__isValidPanelName(this.value)&&this.__updatePanelIndex()&&this.panels[this.panelIndex],i=!0===this.keepAlive?[t("keep-alive",[t(Jt,{key:this.contentKey},[e])])]:[t("div",{staticClass:"q-panel scroll",key:this.contentKey,attrs:{role:"tabpanel"},on:Hr(this,"stop",{input:ir})},[e])];return!0===this.animated?[t("transition",{props:{name:this.panelTransition}},i)]:i}}},render:function(t){return this.panels=$r(this,"default",[]),this.__renderPanels(t)}},ee={props:{name:{required:!0},disable:Boolean}},ie={props:{fullscreen:Boolean,noRouteFullscreenExit:Boolean},data:function(){return{inFullscreen:!1}},watch:{$route:function(){!0!==this.noRouteFullscreenExit&&this.exitFullscreen()},fullscreen:function(t){this.inFullscreen!==t&&this.toggleFullscreen()},inFullscreen:function(t){this.$emit("update:fullscreen",t),this.$emit("fullscreen",t)}},methods:{toggleFullscreen:function(){!0===this.inFullscreen?this.exitFullscreen():this.setFullscreen()},setFullscreen:function(){!0!==this.inFullscreen&&(this.inFullscreen=!0,this.container=this.$el.parentNode,this.container.replaceChild(this.fullscreenFillerNode,this.$el),document.body.appendChild(this.$el),document.body.classList.add("q-body--fullscreen-mixin"),this.__historyFullscreen={handler:this.exitFullscreen},L.add(this.__historyFullscreen))},exitFullscreen:function(){var t=this;!0===this.inFullscreen&&(void 0!==this.__historyFullscreen&&(L.remove(this.__historyFullscreen),this.__historyFullscreen=void 0),this.container.replaceChild(this.$el,this.fullscreenFillerNode),document.body.classList.remove("q-body--fullscreen-mixin"),this.inFullscreen=!1,void 0!==this.$el.scrollIntoView&&setTimeout(function(){t.$el.scrollIntoView()}))}},beforeMount:function(){this.fullscreenFillerNode=document.createElement("span")},mounted:function(){!0===this.fullscreen&&this.setFullscreen()},beforeDestroy:function(){this.exitFullscreen()}},se="function"==typeof Map,ne="function"==typeof Set,oe="function"==typeof ArrayBuffer,re=t.extend({name:"QCarousel",mixins:[nt,te,ie],props:{height:String,padding:Boolean,controlType:{type:String,validator:function(t){return["regular","flat","outline","push","unelevated"].includes(t)},default:"flat"},controlColor:String,controlTextColor:String,autoplay:[Number,Boolean],arrows:Boolean,prevIcon:String,nextIcon:String,navigation:Boolean,navigationPosition:{type:String,validator:function(t){return["top","right","bottom","left"].includes(t)}},navigationIcon:String,thumbnails:Boolean},computed:{style:function(){if(!0!==this.inFullscreen&&void 0!==this.height)return{height:this.height}},direction:function(){return!0===this.vertical?"vertical":"horizontal"},classes:function(){return"q-carousel q-panel-parent q-carousel--with"+(!0===this.padding?"":"out")+"-padding"+(!0===this.inFullscreen?" fullscreen":"")+(!0===this.isDark?" q-carousel--dark q-dark":"")+(!0===this.arrows?" q-carousel--arrows-"+this.direction:"")+(!0===this.navigation?" q-carousel--navigation-"+this.navigationPositionComputed:"")},arrowIcons:function(){var t=[this.prevIcon||this.$q.iconSet.carousel[!0===this.vertical?"up":"left"],this.nextIcon||this.$q.iconSet.carousel[!0===this.vertical?"down":"right"]];return!1===this.vertical&&!0===this.$q.lang.rtl?t.reverse():t},navIcon:function(){return this.navigationIcon||this.$q.iconSet.carousel.navigationIcon},navigationPositionComputed:function(){return this.navigationPosition||(!0===this.vertical?"right":"bottom")},controlProps:function(){var t;return(t={color:this.controlColor,textColor:this.controlTextColor,round:!0})[this.controlType]=!0,t.dense=!0,t},transitionPrevComputed:function(){return this.transitionPrev||"fade"},transitionNextComputed:function(){return this.transitionNext||"fade"}},watch:{value:function(){this.autoplay&&(clearInterval(this.timer),this.__startTimer())},autoplay:function(t){t?this.__startTimer():clearInterval(this.timer)}},methods:{__startTimer:function(){this.timer=setTimeout(this.next,ha(this.autoplay)?this.autoplay:5e3)},__getNavigationContainer:function(t,e,i){return t("div",{class:"q-carousel__control q-carousel__navigation no-wrap absolute flex q-carousel__navigation--"+e+" q-carousel__navigation--"+this.navigationPositionComputed+(void 0!==this.controlColor?" text-"+this.controlColor:"")},[t("div",{staticClass:"q-carousel__navigation-inner flex no-wrap justify-center"},this.__getAvailablePanels().map(i))])},__getContent:function(t){var e=this,i=[];if(!0===this.navigation)i.push(this.__getNavigationContainer(t,"buttons",function(i){var s=i.componentOptions.propsData.name;return t(Mt,{key:s,class:"q-carousel__navigation-icon q-carousel__navigation-icon--"+(s===e.value?"":"in")+"active",props:Object.assign({icon:e.navIcon,size:"sm"},e.controlProps),on:Hr(e,"nav#"+s,{click:function(){e.goTo(s)}})})}));else if(!0===this.thumbnails){var s=void 0!==this.controlColor?" text-"+this.controlColor:"";i.push(this.__getNavigationContainer(t,"thumbnails",function(i){var n=i.componentOptions.propsData;return t("img",{class:"q-carousel__thumbnail q-carousel__thumbnail--"+(n.name===e.value?"":"in")+"active"+s,attrs:{src:n.imgSrc},key:"tmb#"+n.name,on:Hr(e,"tmb#"+n.name,{click:function(){e.goTo(n.name)}})})}))}return!0===this.arrows&&i.push(t("div",{staticClass:"q-carousel__control q-carousel__arrow q-carousel__prev-arrow q-carousel__prev-arrow--"+this.direction+" absolute flex flex-center"},[t(Mt,{props:Object.assign({icon:this.arrowIcons[0]},this.controlProps),on:Hr(this,"prev",{click:this.previous})})]),t("div",{staticClass:"q-carousel__control q-carousel__arrow q-carousel__next-arrow q-carousel__next-arrow--"+this.direction+" absolute flex flex-center"},[t(Mt,{props:Object.assign({icon:this.arrowIcons[1]},this.controlProps),on:Hr(this,"next",{click:this.next})})])),Mr(i,this,"control")},__renderPanels:function(t){return t("div",{style:this.style,class:this.classes,on:this.$listeners},[t("div",{staticClass:"q-carousel__slides-container",directives:this.panelDirectives},this.__getPanelContent(t))].concat(this.__getContent(t)))}},mounted:function(){this.autoplay&&this.__startTimer()},beforeDestroy:function(){clearInterval(this.timer)}}),ae=t.extend({name:"QCarouselSlide",mixins:[ee],props:{imgSrc:String},computed:{style:function(){if(this.imgSrc)return{backgroundImage:"url("+this.imgSrc+")"}}},render:function(t){return t("div",{staticClass:"q-carousel__slide",style:this.style,on:this.$listeners},$r(this,"default"))}}),le=t.extend({name:"QCarouselControl",props:{position:{type:String,default:"bottom-right",validator:function(t){return["top-right","top-left","bottom-right","bottom-left","top","right","bottom","left"].includes(t)}},offset:{type:Array,default:function(){return[18,18]},validator:function(t){return 2===t.length}}},computed:{classes:function(){return"absolute-"+this.position},style:function(){return{margin:this.offset[1]+"px "+this.offset[0]+"px"}}},render:function(t){return t("div",{staticClass:"q-carousel__control absolute",style:this.style,class:this.classes,on:this.$listeners},$r(this,"default"))}}),ce=t.extend({name:"QChatMessage",props:{sent:Boolean,label:String,bgColor:String,textColor:String,name:String,avatar:String,text:Array,stamp:String,size:String,labelSanitize:Boolean,nameSanitize:Boolean,textSanitize:Boolean,stampSanitize:Boolean},computed:{textClass:function(){return"q-message-text-content q-message-text-content--"+this.op+(void 0!==this.textColor?" text-"+this.textColor:"")},messageClass:function(){return"q-message-text q-message-text--"+this.op+(void 0!==this.bgColor?" text-"+this.bgColor:"")},containerClass:function(){return"q-message-container row items-end no-wrap"+(!0===this.sent?" reverse":"")},sizeClass:function(){if(void 0!==this.size)return"col-"+this.size},op:function(){return!0===this.sent?"sent":"received"}},methods:{__getText:function(t){var e=this,i=!0===this.textSanitize?"textContent":"innerHTML",s=!0===this.stampSanitize?"textContent":"innerHTML";return this.text.map(function(n,o){var r,a;return t("div",{key:o,class:e.messageClass},[t("div",{class:e.textClass},[t("div",{domProps:(r={},r[i]=n,r)}),e.stamp?t("div",{staticClass:"q-message-stamp",domProps:(a={},a[s]=e.stamp,a)}):null])])})},__getMessage:function(t){var e,i=Tr(this,"default",[]);return void 0!==this.stamp&&i.push(t("div",{staticClass:"q-message-stamp",domProps:(e={},e[!0===this.stampSanitize?"textContent":"innerHTML"]=this.stamp,e)})),t("div",{class:this.messageClass},[t("div",{staticClass:"q-message-text-content",class:this.textClass},i)])}},render:function(t){var e,i,s=[];void 0!==this.$scopedSlots.avatar?s.push(this.$scopedSlots.avatar()):void 0!==this.avatar&&s.push(t("img",{class:"q-message-avatar q-message-avatar--"+this.op,attrs:{src:this.avatar,"aria-hidden":"true"}}));var n=[];void 0!==this.name&&n.push(t("div",{class:"q-message-name q-message-name--"+this.op,domProps:(e={},e[!0===this.nameSanitize?"textContent":"innerHTML"]=this.name,e)})),void 0!==this.text&&n.push(this.__getText(t)),void 0!==this.$scopedSlots.default&&n.push(this.__getMessage(t)),s.push(t("div",{class:this.sizeClass},n));var o=[];return this.label&&o.push(t("div",{staticClass:"q-message-label text-center",domProps:(i={},i[!0===this.labelSanitize?"textContent":"innerHTML"]=this.label,i)})),o.push(t("div",{class:this.containerClass},s)),t("div",{class:"q-message q-message-"+this.op,on:this.$listeners},o)}}),ue=qr({xs:30,sm:35,md:40,lg:50,xl:60}),he={computed:{__refocusTargetEl:function(){if(!0!==this.disable)return this.$createElement("span",{ref:"refocusTarget",staticClass:"no-outline",attrs:{tabindex:-1}})}},methods:{__refocusTarget:function(t){void 0!==t&&0===t.type.indexOf("key")?document.activeElement!==this.$el&&!0===this.$el.contains(document.activeElement)&&this.$el.focus():void 0!==t&&!0!==this.$el.contains(t.target)||void 0===this.$refs.refocusTarget||this.$refs.refocusTarget.focus()}}},de={mixins:[nt,ue,Wt,he],props:{value:{required:!0,default:null},val:{},trueValue:{default:!0},falseValue:{default:!1},toggleIndeterminate:Boolean,indeterminateValue:{default:null},label:String,leftLabel:Boolean,fontSize:String,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},computed:{isTrue:function(){return!0===this.modelIsArray?this.index>-1:this.value===this.trueValue},isFalse:function(){return!0===this.modelIsArray?-1===this.index:this.value===this.falseValue},isIndeterminate:function(){return this.value===this.indeterminateValue&&this.value!==this.falseValue},index:function(){if(!0===this.modelIsArray)return this.value.indexOf(this.val)},modelIsArray:function(){return void 0!==this.val&&Array.isArray(this.value)},computedTabindex:function(){return!0===this.disable?-1:this.tabindex||0},labelStyle:function(){if(void 0!==this.fontSize)return{fontSize:this.fontSize}},classes:function(){return"q-"+this.type+" cursor-pointer no-outline row inline no-wrap items-center"+(!0===this.disable?" disabled":"")+(!0===this.isDark?" q-"+this.type+"--dark":"")+(!0===this.dense?" q-"+this.type+"--dense":"")+(!0===this.leftLabel?" reverse":"")},innerClass:function(){var t=!0===this.isTrue?"truthy":!0===this.isFalse?"falsy":"indet",e=void 0===this.color||!0!==this.keepColor&&("toggle"===this.type?!0!==this.isTrue:!0===this.isFalse)?"":" text-"+this.color;return"q-"+this.type+"__inner--"+t+e},formAttrs:function(){var t={type:"checkbox"};return void 0!==this.name&&Object.assign(t,{checked:this.isTrue,name:this.name,value:!0===this.modelIsArray?this.val:this.trueValue}),t},attrs:function(){var t={tabindex:this.computedTabindex,role:"checkbox","aria-label":this.label,"aria-checked":!0===this.isIndeterminate?"mixed":!0===this.isTrue?"true":"false"};return!0===this.disable&&(t["aria-disabled"]=""),t}},methods:{toggle:function(t){var e;(void 0!==t&&(nr(t),this.__refocusTarget(t)),!0!==this.disable)&&(!0===this.modelIsArray?!0===this.isTrue?(e=this.value.slice()).splice(this.index,1):e=this.value.concat([this.val]):e=!0===this.isTrue?!0===this.toggleIndeterminate?this.indeterminateValue:this.falseValue:!0===this.isFalse?this.trueValue:this.falseValue,this.$emit("input",e))},__onKeydown:function(t){13!==t.keyCode&&32!==t.keyCode||nr(t)},__onKeyup:function(t){13!==t.keyCode&&32!==t.keyCode||this.toggle(t)}},render:function(t){var e=this.__getInner(t);!0!==this.disable&&this.__injectFormInput(e,"unshift","q-"+this.type+"__native absolute q-ma-none q-pa-none invisible");var i=[t("div",{staticClass:"q-"+this.type+"__inner relative-position no-pointer-events",class:this.innerClass,style:this.sizeStyle},e)];void 0!==this.__refocusTargetEl&&i.push(this.__refocusTargetEl);var s=void 0!==this.label?Mr([this.label],this,"default"):$r(this,"default");return void 0!==s&&i.push(t("div",{staticClass:"q-"+this.type+"__label q-anchor--skip"},s)),t("div",{class:this.classes,attrs:this.attrs,on:Hr(this,"inpExt",{click:this.toggle,keydown:this.__onKeydown,keyup:this.__onKeyup})},i)}},pe=t.extend({name:"QCheckbox",mixins:[de],methods:{__getInner:function(t){return[t("div",{staticClass:"q-checkbox__bg absolute"},[t("svg",{staticClass:"q-checkbox__svg fit absolute-full",attrs:{focusable:"false",viewBox:"0 0 24 24"}},[t("path",{staticClass:"q-checkbox__truthy",attrs:{fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"}}),t("path",{staticClass:"q-checkbox__indet",attrs:{d:"M4,14H20V10H4"}})])])]}},created:function(){this.type="checkbox"}}),fe=t.extend({name:"QChip",mixins:[bt,nt,qr({xs:8,sm:10,md:14,lg:20,xl:24})],model:{event:"remove"},props:{dense:Boolean,icon:String,iconRight:String,label:[String,Number],color:String,textColor:String,value:{type:Boolean,default:!0},selected:{type:Boolean,default:null},square:Boolean,outline:Boolean,clickable:Boolean,removable:Boolean,tabindex:[String,Number],disable:Boolean},computed:{classes:function(){var t,e=!0===this.outline&&this.color||this.textColor;return(t={})["bg-"+this.color]=!1===this.outline&&void 0!==this.color,t["text-"+e+" q-chip--colored"]=e,t.disabled=this.disable,t["q-chip--dense"]=this.dense,t["q-chip--outline"]=this.outline,t["q-chip--selected"]=this.selected,t["q-chip--clickable cursor-pointer non-selectable q-hoverable"]=this.isClickable,t["q-chip--square"]=this.square,t["q-chip--dark q-dark"]=this.isDark,t},hasLeftIcon:function(){return!0===this.selected||void 0!==this.icon},isClickable:function(){return!1===this.disable&&(!0===this.clickable||null!==this.selected)},computedTabindex:function(){return!0===this.disable?-1:this.tabindex||0}},methods:{__onKeyup:function(t){13===t.keyCode&&this.__onClick(t)},__onClick:function(t){this.disable||(this.$emit("update:selected",!this.selected),this.$emit("click",t))},__onRemove:function(t){void 0!==t.keyCode&&13!==t.keyCode||(nr(t),!this.disable&&this.$emit("remove",!1))},__getContent:function(t){var e=[];!0===this.isClickable&&e.push(t("div",{staticClass:"q-focus-helper"})),!0===this.hasLeftIcon&&e.push(t(et,{staticClass:"q-chip__icon q-chip__icon--left",props:{name:!0===this.selected?this.$q.iconSet.chip.selected:this.icon}}));var i=void 0!==this.label?[t("div",{staticClass:"ellipsis"},[this.label])]:void 0;return e.push(t("div",{staticClass:"q-chip__content col row no-wrap items-center q-anchor--skip"},Br(i,this,"default"))),this.iconRight&&e.push(t(et,{staticClass:"q-chip__icon q-chip__icon--right",props:{name:this.iconRight}})),this.removable&&e.push(t(et,{staticClass:"q-chip__icon q-chip__icon--remove cursor-pointer",props:{name:this.$q.iconSet.chip.remove},attrs:{tabindex:this.computedTabindex},nativeOn:{click:this.__onRemove,keyup:this.__onRemove}})),e}},render:function(t){if(!1!==this.value){var e={staticClass:"q-chip row inline no-wrap items-center",class:this.classes,style:this.sizeStyle};return!0===this.isClickable&&Object.assign(e,{attrs:{tabindex:this.computedTabindex},on:Hr(this,"click",{click:this.__onClick,keyup:this.__onKeyup}),directives:Hr(this,"dir#"+this.ripple,[{name:"ripple",value:this.ripple}])}),t("div",e,this.__getContent(t))}}}),me=100*Math.PI,ve=Math.round(1e3*me)/1e3,ge=t.extend({name:"QCircularProgress",mixins:[J],props:{value:{type:Number,default:0},min:{type:Number,default:0},max:{type:Number,default:100},color:String,centerColor:String,trackColor:String,fontSize:String,thickness:{type:Number,default:.2,validator:function(t){return t>=0&&t<=1}},angle:{type:Number,default:0},indeterminate:Boolean,showValue:Boolean,reverse:Boolean,instantFeedback:Boolean},computed:{svgStyle:function(){return{transform:"rotate3d(0, 0, 1, "+(this.angle-90)+"deg)"}},circleStyle:function(){if(!0!==this.instantFeedback&&!0!==this.indeterminate)return{transition:"stroke-dashoffset 0.6s ease 0s, stroke 0.6s ease"}},dir:function(){return(!0===this.$q.lang.rtl?-1:1)*(this.reverse?-1:1)},viewBox:function(){return 100/(1-this.thickness/2)},viewBoxAttr:function(){return this.viewBox/2+" "+this.viewBox/2+" "+this.viewBox+" "+this.viewBox},strokeDashOffset:function(){var t=1-(this.value-this.min)/(this.max-this.min);return this.dir*t*me},strokeWidth:function(){return this.thickness/2*this.viewBox},attrs:function(){return{role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":!0===this.indeterminate?void 0:this.value}}},methods:{__getCircle:function(t,e){var i=e.thickness,s=e.offset,n=e.color;return t("circle",{staticClass:"q-circular-progress__"+e.cls,class:void 0!==n?"text-"+n:null,style:this.circleStyle,attrs:{fill:"transparent",stroke:"currentColor","stroke-width":i,"stroke-dasharray":ve,"stroke-dashoffset":s,cx:this.viewBox,cy:this.viewBox,r:50}})}},render:function(t){var e=[];void 0!==this.centerColor&&"transparent"!==this.centerColor&&e.push(t("circle",{staticClass:"q-circular-progress__center",class:"text-"+this.centerColor,attrs:{fill:"currentColor",r:50-this.strokeWidth/2,cx:this.viewBox,cy:this.viewBox}})),void 0!==this.trackColor&&"transparent"!==this.trackColor&&e.push(this.__getCircle(t,{cls:"track",thickness:this.strokeWidth,offset:0,color:this.trackColor})),e.push(this.__getCircle(t,{cls:"circle",thickness:this.strokeWidth,offset:this.strokeDashOffset,color:this.color}));var i=[t("svg",{staticClass:"q-circular-progress__svg",style:this.svgStyle,attrs:{focusable:"false",viewBox:this.viewBoxAttr}},e)];return!0===this.showValue&&i.push(t("div",{staticClass:"q-circular-progress__text absolute-full row flex-center content-center",style:{fontSize:this.fontSize}},void 0!==this.$scopedSlots.default?this.$scopedSlots.default():[t("div",[this.value])])),t("div",{staticClass:"q-circular-progress",class:"q-circular-progress--"+(!0===this.indeterminate?"in":"")+"determinate",style:this.sizeStyle,on:this.$listeners,attrs:this.attrs},Br(i,this,"internal"))}}),_e=/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,be=/^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,ye=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,we=/^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/,Se=/^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/,Ce={date:function(t){return/^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(t)},time:function(t){return/^([0-1]?\d|2[0-3]):[0-5]\d$/.test(t)},fulltime:function(t){return/^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(t)},timeOrFulltime:function(t){return/^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(t)},hexColor:function(t){return _e.test(t)},hexaColor:function(t){return be.test(t)},hexOrHexaColor:function(t){return ye.test(t)},rgbColor:function(t){return we.test(t)},rgbaColor:function(t){return Se.test(t)},rgbOrRgbaColor:function(t){return we.test(t)||Se.test(t)},hexOrRgbColor:function(t){return _e.test(t)||we.test(t)},hexaOrRgbaColor:function(t){return be.test(t)||Se.test(t)},anyColor:function(t){return ye.test(t)||we.test(t)||Se.test(t)}},xe={testPattern:Ce},ke=0,qe={name:"touch-pan",bind:function(t,e){var i=e.value,s=e.modifiers;if(!0===s.mouse||!0===c.has.touch){var n={uid:"qvtp_"+ke++,handler:i,modifiers:s,direction:Dr(s),noop:Zo,mouseStart:function(t){Rr(t,n)&&Jo(t)&&(Ir(n,"temp",[[document,"mousemove","move","notPassiveCapture"],[document,"mouseup","end","passiveCapture"]]),n.start(t,!0))},touchStart:function(t){if(Rr(t,n)){var e=Ct(t.target);Ir(n,"temp",[[e,"touchmove","move","notPassiveCapture"],[e,"touchcancel","end","passiveCapture"],[e,"touchend","end","passiveCapture"]]),n.start(t)}},start:function(e,i){!0===c.is.firefox&&or(t,!0),n.lastEvt=e;var o=tr(e);if(!0===i||!0===s.stop){if(!0!==n.direction.all&&(!0!==i||!0!==n.direction.mouseAllDir)){var r=e.type.indexOf("mouse")>-1?new MouseEvent(e.type,e):new TouchEvent(e.type,e);!0===e.defaultPrevented&&sr(r),!0===e.cancelBubble&&ir(r),r.qClonedBy=void 0===e.qClonedBy?[n.uid]:e.qClonedBy.concat(n.uid),r.qKeyEvent=e.qKeyEvent,r.qClickOutside=e.qClickOutside,n.initialEvent={target:e.target,event:r}}ir(e)}n.event={x:o.left,y:o.top,time:Date.now(),mouse:!0===i,detected:!1,isFirst:!0,isFinal:!1,lastX:o.left,lastY:o.top}},move:function(t){if(void 0!==n.event){n.lastEvt=t;var e=!0===n.event.mouse,i=function(){o(t,e),document.documentElement.style.cursor="grabbing",!0===e&&document.body.classList.add("no-pointer-events"),document.body.classList.add("non-selectable"),Vr(),n.styleCleanup=function(t){if(n.styleCleanup=void 0,document.documentElement.style.cursor="",document.body.classList.remove("non-selectable"),!0===e){var i=function(){document.body.classList.remove("no-pointer-events")};!0===t?setTimeout(i,50):i()}}};if(!0!==n.event.detected){if(!0===n.direction.all||!0===e&&!0===n.modifiers.mouseAllDir)return i(),n.event.detected=!0,void n.move(t);var s=tr(t),r=s.left-n.event.x,a=s.top-n.event.y,l=Math.abs(r),c=Math.abs(a);l!==c&&(!0===n.direction.horizontal&&l>c||!0===n.direction.vertical&&l0||!0===n.direction.left&&l>c&&r<0||!0===n.direction.right&&l>c&&r>0?(n.event.detected=!0,n.move(t)):n.end(t,!0))}else{!0!==n.event.isFirst&&o(t,n.event.mouse);var u=pa(t,n,!1),h=u.payload,d=u.synthetic;void 0!==h&&(!1===n.handler(h)?n.end(t):(void 0===n.styleCleanup&&!0===n.event.isFirst&&i(),n.event.lastX=h.position.left,n.event.lastY=h.position.top,n.event.lastDir=!0===d?void 0:h.direction,n.event.isFirst=!1))}}},end:function(e,i){void 0!==n.event&&(Fr(n,"temp"),!0===c.is.firefox&&or(t,!1),void 0!==n.styleCleanup&&n.styleCleanup(!0),!0===i?!0!==n.event.detected&&void 0!==n.initialEvent&&n.initialEvent.target.dispatchEvent(n.initialEvent.event):!0===n.event.detected&&(!0===n.event.isFirst&&n.handler(pa(void 0===e?n.lastEvt:e,n).payload),n.handler(pa(void 0===e?n.lastEvt:e,n,!0).payload)),n.event=void 0,n.initialEvent=void 0,n.lastEvt=void 0)}};t.__qtouchpan&&(t.__qtouchpan_old=t.__qtouchpan),t.__qtouchpan=n,!0===s.mouse&&Ir(n,"main",[[t,"mousedown","mouseStart","passive"+(!0===s.mouseCapture?"Capture":"")]]),!0===c.has.touch&&Ir(n,"main",[[t,"touchstart","touchStart","passive"+(!0===s.capture?"Capture":"")],[t,"touchmove","noop","notPassiveCapture"]])}function o(t,e){!0===s.mouse&&!0===e?nr(t):(!0===s.stop&&ir(t),!0===s.prevent&&sr(t))}},update:function(t,e){void 0!==t.__qtouchpan&&Ar(t.__qtouchpan,e)},unbind:function(t){var e=t.__qtouchpan_old||t.__qtouchpan;void 0!==e&&(Fr(e,"main"),Fr(e,"temp"),!0===c.is.firefox&&or(t,!1),void 0!==e.styleCleanup&&e.styleCleanup(),delete t[t.__qtouchpan_old?"__qtouchpan_old":"__qtouchpan"])}},$e=[34,37,40,33,39,38],Te={mixins:[nt,Wt],directives:{TouchPan:qe},props:{min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1,validator:function(t){return t>=0}},color:String,labelColor:String,labelTextColor:String,dense:Boolean,label:Boolean,labelAlways:Boolean,markers:Boolean,snap:Boolean,reverse:Boolean,disable:Boolean,readonly:Boolean,tabindex:[String,Number],thumbPath:{type:String,default:"M 4, 10 a 6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"}},data:function(){return{active:!1,preventFocus:!1,focus:!1}},computed:{classes:function(){return"q-slider q-slider--"+(!0===this.active?"":"in")+"active"+(!0===this.isReversed?" q-slider--reversed":"")+(void 0!==this.color?" text-"+this.color:"")+(!0===this.disable?" disabled":"")+(!0===this.editable?" q-slider--editable":"")+("both"===this.focus?" q-slider--focus":"")+(this.label||!0===this.labelAlways?" q-slider--label":"")+(!0===this.labelAlways?" q-slider--label-always":"")+(!0===this.isDark?" q-slider--dark":"")+(!0===this.dense?" q-slider--dense":"")},editable:function(){return!this.disable&&!this.readonly},decimals:function(){return(String(this.step).trim("0").split(".")[1]||"").length},computedStep:function(){return 0===this.step?1:this.step},markerStyle:function(){return{backgroundSize:100*this.computedStep/(this.max-this.min)+"% 2px"}},computedTabindex:function(){return!0===this.editable?this.tabindex||0:-1},isReversed:function(){return this.reverse!==(!0===this.$q.lang.rtl)},horizProp:function(){return!0===this.isReversed?"right":"left"},attrs:function(){var t={role:"slider","aria-valuemin":this.min,"aria-valuemax":this.max,"aria-orientation":"horizontal","data-step":this.step};return!0===this.disable&&(t["aria-disabled"]=""),t}},methods:{__getThumbSvg:function(t){return t("svg",{staticClass:"q-slider__thumb absolute",attrs:{focusable:"false",viewBox:"0 0 20 20",width:"20",height:"20"}},[t("path",{attrs:{d:this.thumbPath}})])},__getPinStyle:function(t,e){var i,s=Math.ceil(20*Math.abs(.5-e))+"px";return{pin:{transformOrigin:(!0===this.$q.lang.rtl?s:!0===this.$q.platform.is.ie?"100%":"calc(100% - "+s+")")+" 50%"},pinTextContainer:(i={},i[!0===this.$q.lang.rtl?"left":"right"]=100*t+"%",i.transform="translateX("+Math.ceil(20*(!0===this.$q.lang.rtl?-1:1)*t)+"px)",i)}},__pan:function(t){t.isFinal?(this.dragging&&(this.__updatePosition(t.evt),!0===t.touch&&this.__updateValue(!0),this.dragging=!1),this.active=!1):t.isFirst?(this.dragging=this.__getDragging(t.evt),this.__updatePosition(t.evt),this.__updateValue(),this.active=!0):(this.__updatePosition(t.evt),this.__updateValue())},__blur:function(){this.focus=!1},__activate:function(t){this.__updatePosition(t,this.__getDragging(t)),this.__updateValue(),this.preventFocus=!0,this.active=!0,document.addEventListener("mouseup",this.__deactivate,!0)},__deactivate:function(){this.preventFocus=!1,this.active=!1,this.__updateValue(!0),this.__blur(),document.removeEventListener("mouseup",this.__deactivate,!0)},__mobileClick:function(t){this.__updatePosition(t,this.__getDragging(t)),this.__updateValue(!0)},__keyup:function(t){$e.includes(t.keyCode)&&this.__updateValue(!0)}},beforeDestroy:function(){document.removeEventListener("mouseup",this.__deactivate,!0)}},Me=t.extend({name:"QSlider",mixins:[Te],props:{value:{required:!0,default:null,validator:function(t){return"number"==typeof t||null===t}},labelValue:[String,Number]},data:function(){return{model:null===this.value?this.min:this.value,curRatio:0}},watch:{value:function(t){this.model=null===t?0:Cr(t,this.min,this.max)},min:function(t){this.model=Cr(this.model,t,this.max)},max:function(t){this.model=Cr(this.model,this.min,t)}},computed:{ratio:function(){return!0===this.active?this.curRatio:this.modelRatio},modelRatio:function(){return(this.model-this.min)/(this.max-this.min)},trackStyle:function(){var t;return(t={})[this.horizProp]=0,t.width=100*this.ratio+"%",t},thumbStyle:function(){var t;return(t={})[this.horizProp]=100*this.ratio+"%",t},thumbClass:function(){if(!1===this.preventFocus&&!0===this.focus)return"q-slider--focus"},pinClass:function(){if(void 0!==this.labelColor)return"text-"+this.labelColor},pinTextClass:function(){return"q-slider__pin-value-marker-text"+(void 0!==this.labelTextColor?" text-"+this.labelTextColor:"")},events:function(){if(!0===this.editable)return!0===this.$q.platform.is.mobile?{click:this.__mobileClick}:{mousedown:this.__activate,focus:this.__focus,blur:this.__blur,keydown:this.__keydown,keyup:this.__keyup}},computedLabel:function(){return void 0!==this.labelValue?this.labelValue:this.model},pinStyle:function(){var t=!0===this.reverse?-this.ratio:this.ratio-1;return this.__getPinStyle(t,this.ratio)}},methods:{__updateValue:function(t){this.model!==this.value&&this.$emit("input",this.model),!0===t&&this.$emit("change",this.model)},__getDragging:function(){return this.$el.getBoundingClientRect()},__updatePosition:function(t,e){void 0===e&&(e=this.dragging);var i=fa(t,e,this.isReversed);this.model=ma(i,this.min,this.max,this.step,this.decimals),this.curRatio=!0!==this.snap||0===this.step?i:(this.model-this.min)/(this.max-this.min)},__focus:function(){this.focus=!0},__keydown:function(t){if($e.includes(t.keyCode)){nr(t);var e=([34,33].includes(t.keyCode)?10:1)*this.computedStep,i=[34,37,40].includes(t.keyCode)?-e:e;this.model=Cr(parseFloat((this.model+i).toFixed(this.decimals)),this.min,this.max),this.__updateValue()}}},render:function(t){var e=[this.__getThumbSvg(t),t("div",{staticClass:"q-slider__focus-ring"})];!0!==this.label&&!0!==this.labelAlways||e.push(t("div",{staticClass:"q-slider__pin absolute",style:this.pinStyle.pin,class:this.pinClass},[t("div",{staticClass:"q-slider__pin-text-container",style:this.pinStyle.pinTextContainer},[t("span",{staticClass:"q-slider__pin-text",class:this.pinTextClass},[this.computedLabel])])]),t("div",{staticClass:"q-slider__arrow",class:this.pinClass})),void 0!==this.name&&!0!==this.disable&&this.__injectFormInput(e,"push");var i=[t("div",{staticClass:"q-slider__track absolute",style:this.trackStyle})];return!0===this.markers&&i.push(t("div",{staticClass:"q-slider__track-markers absolute-full fit",style:this.markerStyle})),t("div",{staticClass:null===this.value?" q-slider--no-value":"",attrs:Object.assign({},this.attrs,{"aria-valuenow":this.value,tabindex:this.computedTabindex}),class:this.classes,on:this.events,directives:!0===this.editable?Hr(this,"dir",[{name:"touch-pan",value:this.__pan,modifiers:{horizontal:!0,prevent:!0,stop:!0,mouse:!0,mouseAllDir:!0}}]):null},[t("div",{staticClass:"q-slider__track-container absolute"},i),t("div",{staticClass:"q-slider__thumb-container absolute non-selectable",class:this.thumbClass,style:this.thumbStyle},e)])}}),Be={data:function(){return{canRender:!n}},mounted:function(){!1===this.canRender&&(this.canRender=!0)}},Pe=t.extend({name:"QResizeObserver",mixins:[Be],props:{debounce:{type:[String,Number],default:100}},data:function(){return!0===this.hasObserver?{}:{url:!0===this.$q.platform.is.ie?null:"about:blank"}},methods:{trigger:function(t){!0===t||0===this.debounce||"0"===this.debounce?this.__onResize():this.timer||(this.timer=setTimeout(this.__onResize,this.debounce))},__onResize:function(){if(this.timer=null,this.$el&&this.$el.parentNode){var t=this.$el.parentNode,e={width:t.offsetWidth,height:t.offsetHeight};e.width===this.size.width&&e.height===this.size.height||(this.size=e,this.$emit("resize",this.size))}},__cleanup:function(){void 0!==this.curDocView&&(void 0!==this.curDocView.removeEventListener&&this.curDocView.removeEventListener("resize",this.trigger,h.passive),this.curDocView=void 0)},__onObjLoad:function(){this.__cleanup(),this.$el.contentDocument&&(this.curDocView=this.$el.contentDocument.defaultView,this.curDocView.addEventListener("resize",this.trigger,h.passive)),this.__onResize()}},render:function(t){if(!1!==this.canRender&&!0!==this.hasObserver)return t("object",{style:this.style,attrs:{tabindex:-1,type:"text/html",data:this.url,"aria-hidden":"true"},on:Hr(this,"load",{load:this.__onObjLoad})})},beforeCreate:function(){this.size={width:-1,height:-1},!0!==i&&(this.hasObserver="undefined"!=typeof ResizeObserver,!0!==this.hasObserver&&(this.style=(this.$q.platform.is.ie?"visibility:hidden;":"")+"display:block;position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1;"))},mounted:function(){if(!0===this.hasObserver)return this.observer=new ResizeObserver(this.trigger),this.observer.observe(this.$el.parentNode),void this.__onResize();!0===this.$q.platform.is.ie?(this.url="about:blank",this.__onResize()):this.__onObjLoad()},beforeDestroy:function(){clearTimeout(this.timer),!0!==this.hasObserver?this.__cleanup():this.$el.parentNode&&this.observer.unobserve(this.$el.parentNode)}}),Le=[function(t){return!0===t.selected&&!0===t.exact&&!0!==t.redirected},function(t){return!0===t.selected&&!0===t.exact},function(t){return!0===t.selected&&!0!==t.redirected},function(t){return!0===t.selected},function(t){return!0===t.exact&&!0!==t.redirected},function(t){return!0!==t.redirected},function(t){return!0===t.exact},function(t){return!0}],ze=Le.length,Oe=t.extend({name:"QTabs",mixins:[Lt],provide:function(){return{tabs:this.tabs,__recalculateScroll:this.__recalculateScroll,__activateTab:this.__activateTab,__activateRoute:this.__activateRoute}},props:{value:[Number,String],align:{type:String,default:"center",validator:function(t){return["left","center","right","justify"].includes(t)}},breakpoint:{type:[String,Number],default:600},vertical:Boolean,shrink:Boolean,stretch:Boolean,activeColor:String,activeBgColor:String,indicatorColor:String,leftIcon:String,rightIcon:String,switchIndicator:Boolean,narrowIndicator:Boolean,inlineLabel:Boolean,noCaps:Boolean,dense:Boolean},data:function(){return{tabs:{current:this.value,activeColor:this.activeColor,activeBgColor:this.activeBgColor,indicatorClass:va(this.indicatorColor,this.switchIndicator,this.vertical),narrowIndicator:this.narrowIndicator,inlineLabel:this.inlineLabel,noCaps:this.noCaps},scrollable:!1,leftArrow:!0,rightArrow:!1,justify:!1}},watch:{value:function(t){this.__activateTab(t,!0,!0)},activeColor:function(t){this.tabs.activeColor=t},activeBgColor:function(t){this.tabs.activeBgColor=t},vertical:function(t){this.tabs.indicatorClass=va(this.indicatorColor,this.switchIndicator,t)},indicatorColor:function(t){this.tabs.indicatorClass=va(t,this.switchIndicator,this.vertical)},switchIndicator:function(t){this.tabs.indicatorClass=va(this.indicatorColor,t,this.vertical)},narrowIndicator:function(t){this.tabs.narrowIndicator=t},inlineLabel:function(t){this.tabs.inlineLabel=t},noCaps:function(t){this.tabs.noCaps=t}},computed:{alignClass:function(){return"q-tabs__content--align-"+(!0===this.scrollable?"left":!0===this.justify?"justify":this.align)},classes:function(){return"q-tabs--"+(!0===this.scrollable?"":"not-")+"scrollable q-tabs--"+(!0===this.vertical?"vertical":"horizontal")+(!0===this.dense?" q-tabs--dense":"")+(!0===this.shrink?" col-shrink":"")+(!0===this.stretch?" self-stretch":"")},domProps:function(){return!0===this.vertical?{container:"height",content:"scrollHeight",posLeft:"top",posRight:"bottom"}:{container:"width",content:"scrollWidth",posLeft:"left",posRight:"right"}}},methods:{__activateTab:function(t,e,i){this.tabs.current!==t&&(!0!==i&&this.$emit("input",t),!0!==e&&void 0!==this.$listeners.input||(this.__animate(this.tabs.current,t),this.tabs.current=t))},__activateRoute:function(t){var e=this;this.bufferRoute!==this.$route&&this.buffer.length>0&&(clearTimeout(this.bufferTimer),this.bufferTimer=void 0,this.buffer.length=0),this.bufferRoute=this.$route,void 0!==t&&(!0===t.remove?this.buffer=this.buffer.filter(function(e){return e.name!==t.name}):this.buffer.push(t)),void 0===this.bufferTimer&&(this.bufferTimer=setTimeout(function(){for(var t=[],i=0;i0&&s>i;this.scrollable!==n&&(this.scrollable=n),!0===n&&this.$nextTick(function(){return e.__updateArrows()});var o=i0&&(this.$refs.content[!0===this.vertical?"scrollTop":"scrollLeft"]+=m,this.__updateArrows())}},__updateArrows:function(){var t=this.$refs.content,e=t.getBoundingClientRect(),i=!0===this.vertical?t.scrollTop:t.scrollLeft;this.leftArrow=i>0,this.rightArrow=!0===this.vertical?Math.ceil(i+e.height)=t)&&(n=!0,i=t),e[!0===this.vertical?"scrollTop":"scrollLeft"]=i,this.__updateArrows(),n}},created:function(){this.buffer=[],!0!==this.$q.platform.is.desktop&&(this.__updateArrows=Zo)},beforeDestroy:function(){clearTimeout(this.bufferTimer),clearTimeout(this.animateTimer)},render:function(t){var e=[t(Pe,{on:Hr(this,"resize",{resize:this.__updateContainer})}),t("div",{ref:"content",staticClass:"q-tabs__content row no-wrap items-center self-stretch hide-scrollbar",class:this.alignClass},$r(this,"default"))];return!0===this.$q.platform.is.desktop&&e.push(t(et,{staticClass:"q-tabs__arrow q-tabs__arrow--left absolute q-tab__icon",class:!0===this.leftArrow?"":"q-tabs__arrow--faded",props:{name:this.leftIcon||(!0===this.vertical?this.$q.iconSet.tabs.up:this.$q.iconSet.tabs.left)},nativeOn:{mousedown:this.__scrollToStart,touchstart:this.__scrollToStart,mouseup:this.__stopAnimScroll,mouseleave:this.__stopAnimScroll,touchend:this.__stopAnimScroll}}),t(et,{staticClass:"q-tabs__arrow q-tabs__arrow--right absolute q-tab__icon",class:!0===this.rightArrow?"":"q-tabs__arrow--faded",props:{name:this.rightIcon||(!0===this.vertical?this.$q.iconSet.tabs.down:this.$q.iconSet.tabs.right)},nativeOn:{mousedown:this.__scrollToEnd,touchstart:this.__scrollToEnd,mouseup:this.__stopAnimScroll,mouseleave:this.__stopAnimScroll,touchend:this.__stopAnimScroll}})),t("div",{staticClass:"q-tabs row no-wrap items-center",class:this.classes,on:Object.assign({},{input:ir},this.$listeners),attrs:{role:"tablist"}},e)}}),Ee=0,De=t.extend({name:"QTab",mixins:[bt],inject:{tabs:{default:function(){console.error("QTab/QRouteTab components need to be child of QTabs")}},__activateTab:{},__recalculateScroll:{}},props:{icon:String,label:[Number,String],alert:[Boolean,String],name:{type:[Number,String],default:function(){return"t_"+Ee++}},noCaps:Boolean,tabindex:[String,Number],disable:Boolean},computed:{isActive:function(){return this.tabs.current===this.name},classes:function(){var t;return(t={})["q-tab--"+(this.isActive?"":"in")+"active"]=!0,t["text-"+this.tabs.activeColor]=this.isActive&&this.tabs.activeColor,t["bg-"+this.tabs.activeBgColor]=this.isActive&&this.tabs.activeBgColor,t["q-tab--full"]=this.icon&&this.label&&!this.tabs.inlineLabel,t["q-tab--no-caps"]=!0===this.noCaps||!0===this.tabs.noCaps,t["q-focusable q-hoverable cursor-pointer"]=!this.disable,t.disabled=this.disable,t},computedTabIndex:function(){return!0===this.disable||!0===this.isActive?-1:this.tabindex||0}},methods:{__activate:function(t,e){!0!==e&&void 0!==this.$refs.blurTarget&&this.$refs.blurTarget.focus(),!0!==this.disable&&(void 0!==this.$listeners.click&&this.$emit("click",t),this.__activateTab(this.name))},__onKeyup:function(t){!0===br(t,13)&&this.__activate(t,!0)},__getContent:function(t){var e=this.tabs.narrowIndicator,i=[],s=t("div",{staticClass:"q-tab__indicator",class:this.tabs.indicatorClass});void 0!==this.icon&&i.push(t(et,{staticClass:"q-tab__icon",props:{name:this.icon}})),void 0!==this.label&&i.push(t("div",{staticClass:"q-tab__label"},[this.label])),!1!==this.alert&&i.push(t("div",{staticClass:"q-tab__alert",class:!0!==this.alert?"text-"+this.alert:null})),e&&i.push(s);var n=[t("div",{staticClass:"q-focus-helper",attrs:{tabindex:-1},ref:"blurTarget"}),t("div",{staticClass:"q-tab__content self-stretch flex-center relative-position q-anchor--skip non-selectable",class:!0===this.tabs.inlineLabel?"row no-wrap q-tab__content--inline":"column"},Mr(i,this,"default"))];return!e&&n.push(s),n},__renderTab:function(t,e,i){var s={staticClass:"q-tab relative-position self-stretch flex flex-center text-center",class:this.classes,attrs:{tabindex:this.computedTabIndex,role:"tab","aria-selected":this.isActive},directives:!1!==this.ripple&&!0===this.disable?null:[{name:"ripple",value:this.ripple}]};return s["div"===e?"on":"nativeOn"]=Object.assign({},{input:ir},this.$listeners,{click:this.__activate,keyup:this.__onKeyup}),void 0!==i&&(s.props=i),t(e,s,this.__getContent(t))}},mounted:function(){this.__recalculateScroll()},beforeDestroy:function(){this.__recalculateScroll()},render:function(t){return this.__renderTab(t,"div")}}),Ae=t.extend({name:"QTabPanels",mixins:[nt,te],computed:{classes:function(){return"q-tab-panels q-panel-parent"+(!0===this.isDark?" q-tab-panels--dark q-dark":"")}},methods:{__renderPanels:function(t){return t("div",{class:this.classes,directives:this.panelDirectives,on:this.$listeners},this.__getPanelContent(t))}}}),Ie=t.extend({name:"QTabPanel",mixins:[ee],render:function(t){return t("div",{staticClass:"q-tab-panel",on:this.$listeners},$r(this,"default"))}}),Fe=["rgb(255,204,204)","rgb(255,230,204)","rgb(255,255,204)","rgb(204,255,204)","rgb(204,255,230)","rgb(204,255,255)","rgb(204,230,255)","rgb(204,204,255)","rgb(230,204,255)","rgb(255,204,255)","rgb(255,153,153)","rgb(255,204,153)","rgb(255,255,153)","rgb(153,255,153)","rgb(153,255,204)","rgb(153,255,255)","rgb(153,204,255)","rgb(153,153,255)","rgb(204,153,255)","rgb(255,153,255)","rgb(255,102,102)","rgb(255,179,102)","rgb(255,255,102)","rgb(102,255,102)","rgb(102,255,179)","rgb(102,255,255)","rgb(102,179,255)","rgb(102,102,255)","rgb(179,102,255)","rgb(255,102,255)","rgb(255,51,51)","rgb(255,153,51)","rgb(255,255,51)","rgb(51,255,51)","rgb(51,255,153)","rgb(51,255,255)","rgb(51,153,255)","rgb(51,51,255)","rgb(153,51,255)","rgb(255,51,255)","rgb(255,0,0)","rgb(255,128,0)","rgb(255,255,0)","rgb(0,255,0)","rgb(0,255,128)","rgb(0,255,255)","rgb(0,128,255)","rgb(0,0,255)","rgb(128,0,255)","rgb(255,0,255)","rgb(245,0,0)","rgb(245,123,0)","rgb(245,245,0)","rgb(0,245,0)","rgb(0,245,123)","rgb(0,245,245)","rgb(0,123,245)","rgb(0,0,245)","rgb(123,0,245)","rgb(245,0,245)","rgb(214,0,0)","rgb(214,108,0)","rgb(214,214,0)","rgb(0,214,0)","rgb(0,214,108)","rgb(0,214,214)","rgb(0,108,214)","rgb(0,0,214)","rgb(108,0,214)","rgb(214,0,214)","rgb(163,0,0)","rgb(163,82,0)","rgb(163,163,0)","rgb(0,163,0)","rgb(0,163,82)","rgb(0,163,163)","rgb(0,82,163)","rgb(0,0,163)","rgb(82,0,163)","rgb(163,0,163)","rgb(92,0,0)","rgb(92,46,0)","rgb(92,92,0)","rgb(0,92,0)","rgb(0,92,46)","rgb(0,92,92)","rgb(0,46,92)","rgb(0,0,92)","rgb(46,0,92)","rgb(92,0,92)","rgb(255,255,255)","rgb(205,205,205)","rgb(178,178,178)","rgb(153,153,153)","rgb(127,127,127)","rgb(102,102,102)","rgb(76,76,76)","rgb(51,51,51)","rgb(25,25,25)","rgb(0,0,0)"],Re=t.extend({name:"QColor",mixins:[nt,Wt],directives:{TouchPan:qe},props:{value:String,defaultValue:String,defaultView:{type:String,default:"spectrum",validator:function(t){return["spectrum","tune","palette"].includes(t)}},formatModel:{type:String,default:"auto",validator:function(t){return["auto","hex","rgb","hexa","rgba"].includes(t)}},palette:Array,noHeader:Boolean,noFooter:Boolean,square:Boolean,flat:Boolean,bordered:Boolean,disable:Boolean,readonly:Boolean},data:function(){return{topView:"auto"===this.formatModel?void 0===this.value||null===this.value||""===this.value||this.value.startsWith("#")?"hex":"rgb":this.formatModel.startsWith("hex")?"hex":"rgb",view:this.defaultView,model:this.__parseModel(this.value||this.defaultValue)}},watch:{value:function(t){var e=this.__parseModel(t||this.defaultValue);e.hex!==this.model.hex&&(this.model=e)},defaultValue:function(t){if(!this.value&&t){var e=this.__parseModel(t);e.hex!==this.model.hex&&(this.model=e)}}},computed:{editable:function(){return!0!==this.disable&&!0!==this.readonly},forceHex:function(){return"auto"===this.formatModel?null:this.formatModel.indexOf("hex")>-1},forceAlpha:function(){return"auto"===this.formatModel?null:this.formatModel.indexOf("a")>-1},isHex:function(){return void 0===this.value||null===this.value||""===this.value||this.value.startsWith("#")},isOutputHex:function(){return null!==this.forceHex?this.forceHex:this.isHex},formAttrs:function(){return{type:"hidden",name:this.name,value:this.model[!0===this.isOutputHex?"hex":"rgb"]}},hasAlpha:function(){return null!==this.forceAlpha?this.forceAlpha:void 0!==this.model.a},currentBgColor:function(){return{backgroundColor:this.model.rgb||"#000"}},headerClass:function(){return"q-color-picker__header-content--"+(void 0!==this.model.a&&this.model.a<65||fr(this.model)>.4?"light":"dark")},spectrumStyle:function(){return{background:"hsl("+this.model.h+",100%,50%)"}},spectrumPointerStyle:function(){var t;return(t={top:100-this.model.v+"%"})[!0===this.$q.lang.rtl?"right":"left"]=this.model.s+"%",t},inputsArray:function(){var t=["r","g","b"];return!0===this.hasAlpha&&t.push("a"),t},computedPalette:function(){return void 0!==this.palette&&this.palette.length>0?this.palette:Fe},classes:function(){return"q-color-picker"+(!0===this.bordered?" q-color-picker--bordered":"")+(!0===this.square?" q-color-picker--square no-border-radius":"")+(!0===this.flat?" q-color-picker--flat no-shadow":"")+(!0===this.disable?" disabled":"")+(!0===this.isDark?" q-color-picker--dark q-dark":"")},attrs:function(){return!0===this.disable?{"aria-disabled":""}:!0===this.readonly?{"aria-readonly":""}:void 0}},created:function(){this.__spectrumChange=da(this.__spectrumChange,20)},render:function(t){var e=[this.__getContent(t)];return void 0!==this.name&&!0!==this.disable&&this.__injectFormInput(e,"push"),!0!==this.noHeader&&e.unshift(this.__getHeader(t)),!0!==this.noFooter&&e.push(this.__getFooter(t)),t("div",{class:this.classes,attrs:this.attrs,on:this.$listeners},e)},methods:{__getHeader:function(t){var e=this;return t("div",{staticClass:"q-color-picker__header relative-position overflow-hidden"},[t("div",{staticClass:"q-color-picker__header-bg absolute-full"}),t("div",{staticClass:"q-color-picker__header-content absolute-full",class:this.headerClass,style:this.currentBgColor},[t(Oe,{props:{value:this.topView,dense:!0,align:"justify"},on:Hr(this,"topVTab",{input:function(t){e.topView=t}})},[t(De,{props:{label:"HEX"+(!0===this.hasAlpha?"A":""),name:"hex",ripple:!1}}),t(De,{props:{label:"RGB"+(!0===this.hasAlpha?"A":""),name:"rgb",ripple:!1}})]),t("div",{staticClass:"q-color-picker__header-banner row flex-center no-wrap"},[t("input",{staticClass:"fit",domProps:{value:this.model[this.topView]},attrs:!0!==this.editable?{readonly:!0}:null,on:Hr(this,"topIn",{input:function(t){e.__updateErrorIcon(!0===e.__onEditorChange(t))},change:ir,blur:function(t){!0===e.__onEditorChange(t,!0)&&e.$forceUpdate(),e.__updateErrorIcon(!1)}})}),t(et,{ref:"errorIcon",staticClass:"q-color-picker__error-icon absolute no-pointer-events",props:{name:this.$q.iconSet.type.negative}})])])])},__getContent:function(t){return t(Ae,{props:{value:this.view,animated:!0}},[t(Ie,{staticClass:"q-color-picker__spectrum-tab overflow-hidden",props:{name:"spectrum"}},this.__getSpectrumTab(t)),t(Ie,{staticClass:"q-pa-md q-color-picker__tune-tab",props:{name:"tune"}},this.__getTuneTab(t)),t(Ie,{staticClass:"q-color-picker__palette-tab",props:{name:"palette"}},this.__getPaletteTab(t))])},__getFooter:function(t){var e=this;return t("div",{staticClass:"q-color-picker__footer relative-position overflow-hidden"},[t(Oe,{staticClass:"absolute-full",props:{value:this.view,dense:!0,align:"justify"},on:Hr(this,"ftIn",{input:function(t){e.view=t}})},[t(De,{props:{icon:this.$q.iconSet.colorPicker.spectrum,name:"spectrum",ripple:!1}}),t(De,{props:{icon:this.$q.iconSet.colorPicker.tune,name:"tune",ripple:!1}}),t(De,{props:{icon:this.$q.iconSet.colorPicker.palette,name:"palette",ripple:!1}})])])},__getSpectrumTab:function(t){var e=this;return[t("div",{ref:"spectrum",staticClass:"q-color-picker__spectrum non-selectable relative-position cursor-pointer",style:this.spectrumStyle,class:{readonly:!0!==this.editable},on:!0===this.editable?Hr(this,"spectrT",{click:this.__spectrumClick,mousedown:this.__activate}):null,directives:!0===this.editable?Hr(this,"spectrDir",[{name:"touch-pan",modifiers:{prevent:!0,stop:!0,mouse:!0},value:this.__spectrumPan}]):null},[t("div",{style:{paddingBottom:"100%"}}),t("div",{staticClass:"q-color-picker__spectrum-white absolute-full"}),t("div",{staticClass:"q-color-picker__spectrum-black absolute-full"}),t("div",{staticClass:"absolute",style:this.spectrumPointerStyle},[void 0!==this.model.hex?t("div",{staticClass:"q-color-picker__spectrum-circle"}):null])]),t("div",{staticClass:"q-color-picker__sliders"},[t("div",{staticClass:"q-color-picker__hue non-selectable"},[t(Me,{props:{value:this.model.h,min:0,max:360,fillHandleAlways:!0,readonly:!0!==this.editable,thumbPath:"M5 5 h10 v10 h-10 v-10 z"},on:Hr(this,"hueSlide",{input:this.__onHueChange,change:function(t){return e.__onHueChange(t,!0)}})})]),!0===this.hasAlpha?t("div",{staticClass:"q-color-picker__alpha non-selectable"},[t(Me,{props:{value:this.model.a,min:0,max:100,fillHandleAlways:!0,readonly:!0!==this.editable,thumbPath:"M5 5 h10 v10 h-10 v-10 z"},on:Hr(this,"alphaSlide",{input:function(t){return e.__onNumericChange(t,"a",100)},change:function(t){return e.__onNumericChange(t,"a",100,void 0,!0)}})})]):null])]},__getTuneTab:function(t){var e=this;return[t("div",{staticClass:"row items-center no-wrap"},[t("div",["R"]),t(Me,{props:{value:this.model.r,min:0,max:255,color:"red",dark:this.isDark,readonly:!0!==this.editable},on:Hr(this,"rSlide",{input:function(t){return e.__onNumericChange(t,"r",255)},change:function(t){return e.__onNumericChange(t,"r",255,void 0,!0)}})}),t("input",{domProps:{value:this.model.r},attrs:{maxlength:3,readonly:!0!==this.editable},on:Hr(this,"rIn",{input:function(t){return e.__onNumericChange(t.target.value,"r",255,t)},change:ir,blur:function(t){return e.__onNumericChange(t.target.value,"r",255,t,!0)}})})]),t("div",{staticClass:"row items-center no-wrap"},[t("div",["G"]),t(Me,{props:{value:this.model.g,min:0,max:255,color:"green",dark:this.isDark,readonly:!0!==this.editable},on:Hr(this,"gSlide",{input:function(t){return e.__onNumericChange(t,"g",255)},change:function(t){return e.__onNumericChange(t,"g",255,void 0,!0)}})}),t("input",{domProps:{value:this.model.g},attrs:{maxlength:3,readonly:!0!==this.editable},on:Hr(this,"gIn",{input:function(t){return e.__onNumericChange(t.target.value,"g",255,t)},change:ir,blur:function(t){return e.__onNumericChange(t.target.value,"g",255,t,!0)}})})]),t("div",{staticClass:"row items-center no-wrap"},[t("div",["B"]),t(Me,{props:{value:this.model.b,min:0,max:255,color:"blue",readonly:!0!==this.editable,dark:this.isDark},on:Hr(this,"bSlide",{input:function(t){return e.__onNumericChange(t,"b",255)},change:function(t){return e.__onNumericChange(t,"b",255,void 0,!0)}})}),t("input",{domProps:{value:this.model.b},attrs:{maxlength:3,readonly:!0!==this.editable},on:Hr(this,"bIn",{input:function(t){return e.__onNumericChange(t.target.value,"b",255,t)},change:ir,blur:function(t){return e.__onNumericChange(t.target.value,"b",255,t,!0)}})})]),!0===this.hasAlpha?t("div",{staticClass:"row items-center no-wrap"},[t("div",["A"]),t(Me,{props:{value:this.model.a,color:"grey",readonly:!0!==this.editable,dark:this.isDark},on:Hr(this,"aSlide",{input:function(t){return e.__onNumericChange(t,"a",100)},change:function(t){return e.__onNumericChange(t,"a",100,void 0,!0)}})}),t("input",{domProps:{value:this.model.a},attrs:{maxlength:3,readonly:!0!==this.editable},on:Hr(this,"aIn",{input:function(t){return e.__onNumericChange(t.target.value,"a",100,t)},change:ir,blur:function(t){return e.__onNumericChange(t.target.value,"a",100,t,!0)}})})]):null]},__getPaletteTab:function(t){var e=this;return[t("div",{staticClass:"row items-center q-color-picker__palette-rows",class:!0===this.editable?"q-color-picker__palette-rows--editable":""},this.computedPalette.map(function(i){return t("div",{staticClass:"q-color-picker__cube col-auto",style:{backgroundColor:i},on:!0===e.editable?Hr(e,"palette#"+i,{click:function(){e.__onPalettePick(i)}}):null})}))]},__onSpectrumChange:function(t,e,i){var s=this.$refs.spectrum;if(void 0!==s){var n=s.clientWidth,o=s.clientHeight,r=s.getBoundingClientRect(),a=Math.min(n,Math.max(0,t-r.left));!0===this.$q.lang.rtl&&(a=n-a);var l=Math.min(o,Math.max(0,e-r.top)),c=Math.round(100*a/n),u=Math.round(100*Math.max(0,Math.min(1,-l/o+1))),h=hr({h:this.model.h,s:c,v:u,a:!0===this.hasAlpha?this.model.a:void 0});this.model.s=c,this.model.v=u,this.__update(h,i)}},__onHueChange:function(t,e){var i=hr({h:t=Math.round(t),s:this.model.s,v:this.model.v,a:!0===this.hasAlpha?this.model.a:void 0});this.model.h=t,this.__update(i,e)},__onNumericChange:function(t,e,i,s,n){if(void 0!==s&&ir(s),/^[0-9]+$/.test(t)){var o=Math.floor(Number(t));if(o<0||o>i)!0===n&&this.$forceUpdate();else{var r={r:"r"===e?o:this.model.r,g:"g"===e?o:this.model.g,b:"b"===e?o:this.model.b,a:!0===this.hasAlpha?"a"===e?o:this.model.a:void 0};if("a"!==e){var a=dr(r);this.model.h=a.h,this.model.s=a.s,this.model.v=a.v}if(this.__update(r,n),void 0!==s&&!0!==n&&void 0!==s.target.selectionEnd){var l=s.target.selectionEnd;this.$nextTick(function(){s.target.setSelectionRange(l,l)})}}}else n&&this.$forceUpdate()},__onEditorChange:function(t,e){var i,s=t.target.value;if(ir(t),"hex"===this.topView){if(s.length!==(!0===this.hasAlpha?9:7)||!/^#[0-9A-Fa-f]+$/.test(s))return!0;i=ur(s)}else{var n;if(!s.endsWith(")"))return!0;if(!0!==this.hasAlpha&&s.startsWith("rgb(")){if(3!==(n=s.substring(4,s.length-1).split(",").map(function(t){return parseInt(t,10)})).length||!/^rgb\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3}\)$/.test(s))return!0}else{if(!0!==this.hasAlpha||!s.startsWith("rgba("))return!0;if(4!==(n=s.substring(5,s.length-1).split(",")).length||!/^rgba\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/.test(s))return!0;for(var o=0;o<3;o++){var r=parseInt(n[o],10);if(r<0||r>255)return!0;n[o]=r}var a=parseFloat(n[3]);if(a<0||a>1)return!0;n[3]=a}if(n[0]<0||n[0]>255||n[1]<0||n[1]>255||n[2]<0||n[2]>255||!0===this.hasAlpha&&(n[3]<0||n[3]>1))return!0;i={r:n[0],g:n[1],b:n[2],a:!0===this.hasAlpha?100*n[3]:void 0}}var l=dr(i);if(this.model.h=l.h,this.model.s=l.s,this.model.v=l.v,this.__update(i,e),!0!==e){var c=t.target.selectionEnd;this.$nextTick(function(){t.target.setSelectionRange(c,c)})}},__onPalettePick:function(t){var e=this.__parseModel(t),i={r:e.r,g:e.g,b:e.b,a:e.a};void 0===i.a&&(i.a=this.model.a),this.model.h=e.h,this.model.s=e.s,this.model.v=e.v,this.__update(i,!0)},__update:function(t,e){this.model.hex=lr(t),this.model.rgb=cr(t),this.model.r=t.r,this.model.g=t.g,this.model.b=t.b,this.model.a=t.a;var i=this.model[!0===this.isOutputHex?"hex":"rgb"];this.$emit("input",i),!0===e&&this.$emit("change",i)},__updateErrorIcon:function(t){void 0!==this.$refs.errorIcon&&(this.$refs.errorIcon.$el.style.opacity=t?1:0)},__parseModel:function(t){var e=void 0!==this.forceAlpha?this.forceAlpha:"auto"===this.formatModel?null:this.formatModel.indexOf("a")>-1;if(null===t||void 0===t||""===t||!0!==Ce.anyColor(t))return{h:0,s:0,v:0,r:0,g:0,b:0,a:!0===e?100:void 0,hex:void 0,rgb:void 0};var i=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");if((t=t.replace(/ /g,"")).startsWith("#"))return ur(t);var e=t.substring(t.indexOf("(")+1,t.length-1).split(",");return{r:parseInt(e[0],10),g:parseInt(e[1],10),b:parseInt(e[2],10),a:void 0!==e[3]?100*parseFloat(e[3]):void 0}}(t);return!0===e&&void 0===i.a&&(i.a=100),i.hex=lr(i),i.rgb=cr(i),Object.assign(i,dr(i))},__spectrumPan:function(t){t.isFinal?this.__onSpectrumChange(t.position.left,t.position.top,!0):this.__spectrumChange(t)},__spectrumChange:function(t){this.__onSpectrumChange(t.position.left,t.position.top)},__spectrumClick:function(t){this.__onSpectrumChange(t.pageX-window.pageXOffset,t.pageY-window.pageYOffset,!0)},__activate:function(t){this.__onSpectrumChange(t.pageX-window.pageXOffset,t.pageY-window.pageYOffset)}}}),Ve=[-61,9,38,199,426,686,756,818,1111,1181,1210,1635,2060,2097,2192,2262,2324,2394,2456,3178],Ne={mixins:[nt,Wt],props:{value:{required:!0},mask:{type:String},locale:Object,calendar:{type:String,validator:function(t){return["gregorian","persian"].includes(t)},default:"gregorian"},landscape:Boolean,color:String,textColor:String,square:Boolean,flat:Boolean,bordered:Boolean,readonly:Boolean,disable:Boolean},watch:{mask:function(){var t=this;this.$nextTick(function(){t.__updateValue({},"mask")})},computedLocale:function(){var t=this;this.$nextTick(function(){t.__updateValue({},"locale")})}},computed:{editable:function(){return!0!==this.disable&&!0!==this.readonly},computedColor:function(){return this.color||"primary"},computedTextColor:function(){return this.textColor||"white"},computedTabindex:function(){return!0===this.editable?0:-1},headerClass:function(){var t=[];return void 0!==this.color&&t.push("bg-"+this.color),void 0!==this.textColor&&t.push("text-"+this.textColor),t.join(" ")},computedLocale:function(){return this.__getComputedLocale()}},methods:{__getComputedLocale:function(){return this.locale||this.$q.lang.date},__getCurrentDate:function(){var t=new Date;if("persian"===this.calendar){var e=ba(t);return{year:e.jy,month:e.jm,day:e.jd}}return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}},__getCurrentTime:function(){var t=new Date;return{hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}}}},je=864e5,He=36e5,Qe=6e4,We="YYYY-MM-DDTHH:mm:ss.SSSZ",Ye=/\[((?:[^\]\\]|\\]|\\)*)\]|d{1,4}|M{1,4}|m{1,2}|w{1,2}|Qo|Do|D{1,4}|YY(?:YY)?|H{1,2}|h{1,2}|s{1,2}|S{1,3}|Z{1,2}|a{1,2}|[AQExX]/g,Ue=/(\[[^\]]*\])|d{1,4}|M{1,4}|m{1,2}|w{1,2}|Qo|Do|D{1,4}|YY(?:YY)?|H{1,2}|h{1,2}|s{1,2}|S{1,3}|Z{1,2}|a{1,2}|[AQExX]|([.*+:?^,\s${}()|\\]+)/g,Ke={},Xe={YY:function(t,e,i){var s=this.YYYY(t,e,i)%100;return s>0?kr(s):"-"+kr(Math.abs(s))},YYYY:function(t,e,i){return void 0!==i&&null!==i?i:t.getFullYear()},M:function(t){return t.getMonth()+1},MM:function(t){return kr(t.getMonth()+1)},MMM:function(t,e){return e.monthsShort[t.getMonth()]},MMMM:function(t,e){return e.months[t.getMonth()]},Q:function(t){return Math.ceil((t.getMonth()+1)/3)},Qo:function(t){return Fa(this.Q(t))},D:function(t){return t.getDate()},Do:function(t){return Fa(t.getDate())},DD:function(t){return kr(t.getDate())},DDD:function(t){return Aa(t)},DDDD:function(t){return kr(Aa(t),3)},d:function(t){return t.getDay()},dd:function(t,e){return this.dddd(t,e).slice(0,2)},ddd:function(t,e){return e.daysShort[t.getDay()]},dddd:function(t,e){return e.days[t.getDay()]},E:function(t){return t.getDay()||7},w:function(t){return La(t)},ww:function(t){return kr(La(t))},H:function(t){return t.getHours()},HH:function(t){return kr(t.getHours())},h:function(t){var e=t.getHours();return 0===e?12:e>12?e%12:e},hh:function(t){return kr(this.h(t))},m:function(t){return t.getMinutes()},mm:function(t){return kr(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return kr(t.getSeconds())},S:function(t){return Math.floor(t.getMilliseconds()/100)},SS:function(t){return kr(Math.floor(t.getMilliseconds()/10))},SSS:function(t){return kr(t.getMilliseconds(),3)},A:function(t){return this.H(t)<12?"AM":"PM"},a:function(t){return this.H(t)<12?"am":"pm"},aa:function(t){return this.H(t)<12?"a.m.":"p.m."},Z:function(t){return Ma(t.getTimezoneOffset(),":")},ZZ:function(t){return Ma(t.getTimezoneOffset())},X:function(t){return Math.floor(t.getTime()/1e3)},x:function(t){return t.getTime()}},Ge={isValid:function(t){return"number"==typeof t||!1===isNaN(Date.parse(t))},extractDate:function(t,e,i){var s=Ta(t,e,i);return new Date(s.year,null===s.month?null:s.month-1,s.day,s.hour,s.minute,s.second,s.millisecond)},buildDate:function(t,e){return za(new Date,t,e)},getDayOfWeek:function(t){var e=new Date(t).getDay();return 0===e?7:e},getWeekOfYear:La,isBetweenDates:function(t,e,i,s){void 0===s&&(s={});var n=new Date(e).getTime(),o=new Date(i).getTime(),r=new Date(t).getTime();return s.inclusiveFrom&&n--,s.inclusiveTo&&o++,r>n&&ro)return o}return s},isSameDate:function(t,e,i){var s=new Date(t),n=new Date(e);if(void 0===i)return s.getTime()===n.getTime();switch(i){case"second":if(s.getSeconds()!==n.getSeconds())return!1;case"minute":if(s.getMinutes()!==n.getMinutes())return!1;case"hour":if(s.getHours()!==n.getHours())return!1;case"day":if(s.getDate()!==n.getDate())return!1;case"month":if(s.getMonth()!==n.getMonth())return!1;case"year":if(s.getFullYear()!==n.getFullYear())return!1;break;default:throw new Error("date isSameDate unknown unit "+i)}return!0},daysInMonth:Ia,formatDate:Ra,clone:function(t){return!0===ua(t)?new Date(t.getTime()):t}},Ze=function(t){return["Calendar","Years","Months"].includes(t)},Je=t.extend({name:"QDate",mixins:[Ne],props:{title:String,subtitle:String,emitImmediately:Boolean,mask:{default:"YYYY/MM/DD"},defaultYearMonth:{type:String,validator:function(t){return/^-?[\d]+\/[0-1]\d$/.test(t)}},events:[Array,Function],eventColor:[String,Function],options:[Array,Function],firstDayOfWeek:[String,Number],todayBtn:Boolean,minimal:Boolean,defaultView:{type:String,default:"Calendar",validator:Ze}},data:function(){var t=this.__getModels(this.value,this.mask,this.__getComputedLocale()),e=t.inner,i=t.external,s=!0===this.$q.lang.rtl?"right":"left";return{view:this.defaultView,monthDirection:s,yearDirection:s,startYear:e.year-e.year%20,innerModel:e,extModel:i}},watch:{value:function(t){var e=this,i=this.__getModels(t,this.mask,this.__getComputedLocale()),s=i.inner,n=i.external;this.extModel.dateHash===n.dateHash&&this.extModel.timeHash===n.timeHash||(this.extModel=n),s.dateHash!==this.innerModel.dateHash&&(this.monthDirection=this.innerModel.dateHash0)return this.title;var t,e=this.extModel;if(null===e.dateHash)return" --- ";if("persian"!==this.calendar)t=new Date(e.year,e.month-1,e.day);else{var i=ya(e.year,e.month,e.day);t=new Date(i.gy,i.gm-1,i.gd)}return!0===isNaN(t.valueOf())?" --- ":void 0!==this.computedLocale.headerTitle?this.computedLocale.headerTitle(t,e):this.computedLocale.daysShort[t.getDay()]+", "+this.computedLocale.monthsShort[e.month-1]+" "+e.day},headerSubtitle:function(){return void 0!==this.subtitle&&null!==this.subtitle&&this.subtitle.length>0?this.subtitle:null!==this.extModel.year?this.extModel.year:" --- "},dateArrow:function(){var t=[this.$q.iconSet.datetime.arrowLeft,this.$q.iconSet.datetime.arrowRight];return!0===this.$q.lang.rtl?t.reverse():t},computedFirstDayOfWeek:function(){return void 0!==this.firstDayOfWeek?Number(this.firstDayOfWeek):this.computedLocale.firstDayOfWeek},daysOfWeek:function(){var t=this.computedLocale.daysShort,e=this.computedFirstDayOfWeek;return e>0?t.slice(e,7).concat(t.slice(0,e)):t},daysInMonth:function(){return this.__getDaysInMonth(this.innerModel)},today:function(){return this.__getCurrentDate()},evtFn:function(){var t=this;return"function"==typeof this.events?this.events:function(e){return t.events.includes(e)}},evtColor:function(){var t=this;return"function"==typeof this.eventColor?this.eventColor:function(e){return t.eventColor}},isInSelection:function(){var t=this;return"function"==typeof this.options?this.options:function(e){return t.options.includes(e)}},days:function(){var t,e,i=[];if("persian"!==this.calendar)t=new Date(this.innerModel.year,this.innerModel.month-1,1),e=new Date(this.innerModel.year,this.innerModel.month-1,0).getDate();else{var s=ya(this.innerModel.year,this.innerModel.month,1);t=new Date(s.gy,s.gm-1,s.gd);var n=this.innerModel.month-1,o=this.innerModel.year;0===n&&(n=12,o--),e=Sa(o,n)}var r=t.getDay()-this.computedFirstDayOfWeek-1,a=r<0?r+7:r;if(a<6)for(var l=e-a;l<=e;l++)i.push({i:l,fill:!0});for(var c=i.length,u=this.innerModel.year+"/"+kr(this.innerModel.month)+"/",h=1;h<=this.daysInMonth;h++){var d=u+kr(h);if(void 0!==this.options&&!0!==this.isInSelection(d))i.push({i:h});else{var p=void 0!==this.events&&!0===this.evtFn(d)&&this.evtColor(d);i.push({i:h,in:!0,flat:!0,event:p})}}if(this.innerModel.year===this.extModel.year&&this.innerModel.month===this.extModel.month){var f=c+this.innerModel.day-1;void 0!==i[f]&&Object.assign(i[f],{unelevated:!0,flat:!1,color:this.computedColor,textColor:this.computedTextColor})}this.innerModel.year===this.today.year&&this.innerModel.month===this.today.month&&(i[c+this.today.day-1].today=!0);var m=i.length%7;if(m>0)for(var v=7-m,g=1;g<=v;g++)i.push({i:g,fill:!0});return i},attrs:function(){return!0===this.disable?{"aria-disabled":""}:!0===this.readonly?{"aria-readonly":""}:void 0}},methods:{setToday:function(){this.__updateValue(Object.assign({},this.today),"today"),this.view="Calendar"},setView:function(t){!0===Ze(t)&&(this.view=t)},offsetCalendar:function(t,e){["month","year"].includes(t)&&this["__goTo"+("month"===t?"Month":"Year")](!0===e?-1:1)},__getModels:function(t,e,i){var s=Ta(t,"persian"===this.calendar?"YYYY/MM/DD":e,i,this.calendar);return{external:s,inner:null===s.dateHash?this.__getDefaultModel():Object.assign({},s)}},__getDefaultModel:function(){var t,e;if(void 0!==this.defaultYearMonth){var i=this.defaultYearMonth.split("/");t=parseInt(i[0],10),e=parseInt(i[1],10)}else{var s=void 0!==this.today?this.today:this.__getCurrentDate();t=s.year,e=s.month}return{year:t,month:e,day:1,hour:0,minute:0,second:0,millisecond:0,dateHash:t+"/"+kr(e)+"/01"}},__getHeader:function(t){var e=this;if(!0!==this.minimal)return t("div",{staticClass:"q-date__header",class:this.headerClass},[t("div",{staticClass:"relative-position"},[t("transition",{props:{name:"q-transition--fade"}},[t("div",{key:"h-yr-"+this.headerSubtitle,staticClass:"q-date__header-subtitle q-date__header-link",class:"Years"===this.view?"q-date__header-link--active":"cursor-pointer",attrs:{tabindex:this.computedTabindex},on:Hr(this,"vY",{click:function(){e.view="Years"},keyup:function(t){13===t.keyCode&&(e.view="Years")}})},[this.headerSubtitle])])]),t("div",{staticClass:"q-date__header-title relative-position flex no-wrap"},[t("div",{staticClass:"relative-position col"},[t("transition",{props:{name:"q-transition--fade"}},[t("div",{key:"h-sub"+this.headerTitle,staticClass:"q-date__header-title-label q-date__header-link",class:"Calendar"===this.view?"q-date__header-link--active":"cursor-pointer",attrs:{tabindex:this.computedTabindex},on:Hr(this,"vC",{click:function(){e.view="Calendar"},keyup:function(t){13===t.keyCode&&(e.view="Calendar")}})},[this.headerTitle])])]),!0===this.todayBtn?t(Mt,{staticClass:"q-date__header-today",props:{icon:this.$q.iconSet.datetime.today,flat:!0,size:"sm",round:!0,tabindex:this.computedTabindex},on:Hr(this,"today",{click:this.setToday})}):null])])},__getNavigation:function(t,e){var i=this,s=e.label,n=e.view,o=e.key,r=e.dir,a=e.goTo,l=e.cls;return[t("div",{staticClass:"row items-center q-date__arrow"},[t(Mt,{props:{round:!0,dense:!0,size:"sm",flat:!0,icon:this.dateArrow[0],tabindex:this.computedTabindex},on:Hr(this,"go-#"+n,{click:function(){a(-1)}})})]),t("div",{staticClass:"relative-position overflow-hidden flex flex-center"+l},[t("transition",{props:{name:"q-transition--jump-"+r}},[t("div",{key:o},[t(Mt,{props:{flat:!0,dense:!0,noCaps:!0,label:s,tabindex:this.computedTabindex},on:Hr(this,"view#"+n,{click:function(){i.view=n}})})])])]),t("div",{staticClass:"row items-center q-date__arrow"},[t(Mt,{props:{round:!0,dense:!0,size:"sm",flat:!0,icon:this.dateArrow[1],tabindex:this.computedTabindex},on:Hr(this,"go+#"+n,{click:function(){a(1)}})})])]},__getCalendarView:function(t){var e=this;return[t("div",{key:"calendar-view",staticClass:"q-date__view q-date__calendar"},[t("div",{staticClass:"q-date__navigation row items-center no-wrap"},this.__getNavigation(t,{label:this.computedLocale.months[this.innerModel.month-1],view:"Months",key:this.innerModel.month,dir:this.monthDirection,goTo:this.__goToMonth,cls:" col"}).concat(this.__getNavigation(t,{label:this.innerModel.year,view:"Years",key:this.innerModel.year,dir:this.yearDirection,goTo:this.__goToYear,cls:""}))),t("div",{staticClass:"q-date__calendar-weekdays row items-center no-wrap"},this.daysOfWeek.map(function(e){return t("div",{staticClass:"q-date__calendar-item"},[t("div",[e])])})),t("div",{staticClass:"q-date__calendar-days-container relative-position overflow-hidden"},[t("transition",{props:{name:"q-transition--slide-"+this.monthDirection}},[t("div",{key:this.innerModel.year+"/"+this.innerModel.month,staticClass:"q-date__calendar-days fit"},this.days.map(function(i){return t("div",{staticClass:"q-date__calendar-item q-date__calendar-item--"+(!0===i.fill?"fill":!0===i.in?"in":"out")},[!0===i.in?t(Mt,{staticClass:!0===i.today?"q-date__today":null,props:{dense:!0,flat:i.flat,unelevated:i.unelevated,color:i.color,textColor:i.textColor,label:i.i,tabindex:e.computedTabindex},on:Hr(e,"day#"+i.i,{click:function(){e.__setDay(i.i)}})},!1!==i.event?[t("div",{staticClass:"q-date__event bg-"+i.event})]:null):t("div",[i.i])])}))])])])]},__getMonthsView:function(t){var e=this,i=this.innerModel.year===this.today.year,s=this.computedLocale.monthsShort.map(function(s,n){var o=e.innerModel.month===n+1;return t("div",{staticClass:"q-date__months-item flex flex-center"},[t(Mt,{staticClass:!0===i&&e.today.month===n+1?"q-date__today":null,props:{flat:!o,label:s,unelevated:o,color:o?e.computedColor:null,textColor:o?e.computedTextColor:null,tabindex:e.computedTabindex},on:Hr(e,"month#"+n,{click:function(){e.__setMonth(n+1)}})})])});return t("div",{key:"months-view",staticClass:"q-date__view q-date__months flex flex-center"},s)},__getYearsView:function(t){for(var e=this,i=this.startYear,s=i+20,n=[],o=function(i){var s=e.innerModel.year===i;n.push(t("div",{staticClass:"q-date__years-item flex flex-center"},[t(Mt,{key:"yr"+i,staticClass:e.today.year===i?"q-date__today":null,props:{flat:!s,label:i,dense:!0,unelevated:s,color:s?e.computedColor:null,textColor:s?e.computedTextColor:null,tabindex:e.computedTabindex},on:Hr(e,"yr#"+i,{click:function(){e.__setYear(i)}})})]))},r=i;r<=s;r++)o(r);return t("div",{staticClass:"q-date__view q-date__years flex flex-center"},[t("div",{staticClass:"col-auto"},[t(Mt,{props:{round:!0,dense:!0,flat:!0,icon:this.dateArrow[0],tabindex:this.computedTabindex},on:Hr(this,"y-",{click:function(){e.startYear-=20}})})]),t("div",{staticClass:"q-date__years-content col self-stretch row items-center"},n),t("div",{staticClass:"col-auto"},[t(Mt,{props:{round:!0,dense:!0,flat:!0,icon:this.dateArrow[1],tabindex:this.computedTabindex},on:Hr(this,"y+",{click:function(){e.startYear+=20}})})])])},__getDaysInMonth:function(t){return"persian"!==this.calendar?new Date(t.year,t.month,0).getDate():Sa(t.year,t.month)},__goToMonth:function(t){var e=Number(this.innerModel.month)+t,i=this.yearDirection;13===e?(e=1,this.innerModel.year++,i=!0!==this.$q.lang.rtl?"left":"right"):0===e&&(e=12,this.innerModel.year--,i=!0!==this.$q.lang.rtl?"right":"left"),this.monthDirection=t>0==(!0!==this.$q.lang.rtl)?"left":"right",this.yearDirection=i,this.innerModel.month=e,!0===this.emitImmediately&&this.__updateValue({},"month")},__goToYear:function(t){this.monthDirection=this.yearDirection=t>0==(!0!==this.$q.lang.rtl)?"left":"right",this.innerModel.year=Number(this.innerModel.year)+t,!0===this.emitImmediately&&this.__updateValue({},"year")},__setYear:function(t){this.innerModel.year=t,!0===this.emitImmediately&&this.__updateValue({year:t},"year"),this.view=null===this.extModel.month||"Years"===this.defaultView?"Months":"Calendar"},__setMonth:function(t){this.innerModel.month=t,!0===this.emitImmediately&&this.__updateValue({month:t},"month"),this.view="Calendar"},__setDay:function(t){this.__updateValue({day:t},"day")},__updateValue:function(t,e){var i=this;if(void 0===t.year&&(t.year=this.innerModel.year),void 0===t.month&&(t.month=this.innerModel.month),void 0===t.day||!0===this.emitImmediately&&("year"===e||"month"===e)){t.day=this.innerModel.day;var s=!0===this.emitImmediately?this.__getDaysInMonth(t):this.daysInMonth;t.day=Math.min(t.day,s)}var n="persian"===this.calendar?t.year+"/"+kr(t.month)+"/"+kr(t.day):Ra(new Date(t.year,t.month-1,t.day,this.extModel.hour,this.extModel.minute,this.extModel.second,this.extModel.millisecond),this.mask,this.computedLocale,t.year);if(t.changed=n!==this.value,this.$emit("input",n,e,t),n===this.value&&"today"===e){var o=t.year+"/"+kr(t.month)+"/"+kr(t.day),r=this.innerModel.year+"/"+kr(this.innerModel.month)+"/"+kr(this.innerModel.day);o!==r&&(this.monthDirection=r0&&n>r/2){var a=Math.min(document.scrollingElement.scrollHeight-r,n>=o?1/0:Math.ceil(document.scrollingElement.scrollTop+n-r/2)),l=function(){requestAnimationFrame(function(){document.scrollingElement.scrollTop+=Math.ceil((a-document.scrollingElement.scrollTop)/8),document.scrollingElement.scrollTop!==a&&l()})};l()}document.activeElement.scrollIntoView()}!0===e.$q.platform.is.ios&&e.__portal.$el.click(),e.$emit("show",t)},300)},__hide:function(t){var e=this;this.__removeHistory(),this.__cleanup(!0),void 0!==this.__refocusTarget&&null!==this.__refocusTarget&&this.__refocusTarget.focus(),this.$el.dispatchEvent(rr("popup-hide",{bubbles:!0})),this.__setTimeout(function(){e.__hidePortal(),e.$emit("hide",t)},300)},__cleanup:function(t){clearTimeout(this.shakeTimeout),!0!==t&&!0!==this.showing||(jt.pop(this),this.__updateState(!1,this.maximized),!0!==this.seamless&&(this.__preventScroll(!1),this.__preventFocusout(!1)))},__updateState:function(t,e){!0===e&&(!0===t?ni<1&&document.body.classList.add("q-body--dialog"):ni<2&&document.body.classList.remove("q-body--dialog"),ni+=!0===t?1:-1)},__preventFocusout:function(t){if(!0===this.$q.platform.is.desktop){var e=(!0===t?"add":"remove")+"EventListener";document.body[e]("focusin",this.__onFocusChange)}},__onAutoClose:function(t){this.hide(t),void 0!==this.$listeners.click&&this.$emit("click",t)},__onBackdropClick:function(t){!0!==this.persistent&&!0!==this.noBackdropDismiss?this.hide(t):this.shake()},__onFocusChange:function(t){!0===this.showing&&void 0!==this.__portal&&!0!==function(t,e){if(void 0===t||!0===t.contains(e))return!0;for(var i=t.nextElementSibling;null!==i;i=i.nextElementSibling)if(i.contains(e))return!0;return!1}(this.__portal.$el,t.target)&&this.focus()},__renderPortal:function(t){var e=Object.assign({},this.$listeners,{input:ir,"popup-show":ir,"popup-hide":ir});return!0===this.autoClose&&(e.click=this.__onAutoClose),t("div",{staticClass:"q-dialog fullscreen no-pointer-events",class:this.contentClass,style:this.contentStyle,attrs:this.$attrs},[t("transition",{props:{name:"q-transition--fade"}},!0===this.useBackdrop?[t("div",{staticClass:"q-dialog__backdrop fixed-full",on:Hr(this,"bkdrop",{click:this.__onBackdropClick})})]:null),t("transition",{props:{name:this.transition}},[!0===this.showing?t("div",{ref:"inner",staticClass:"q-dialog__inner flex no-pointer-events",class:this.classes,attrs:{tabindex:-1},on:e},$r(this,"default")):null])])}},mounted:function(){this.__processModelChange(this.value)},beforeDestroy:function(){this.__cleanup()}}),li=["mouseover","mouseout","mouseenter","mouseleave"],ci=t.extend({name:"QDrawer",inject:{layout:{default:function(){console.error("QDrawer needs to be child of QLayout")}}},mixins:[nt,ti,zt,si],directives:{TouchPan:qe},props:{side:{type:String,default:"left",validator:function(t){return["left","right"].includes(t)}},width:{type:Number,default:300},mini:Boolean,miniToOverlay:Boolean,miniWidth:{type:Number,default:57},breakpoint:{type:Number,default:1023},showIfAbove:Boolean,behavior:{type:String,validator:function(t){return["default","desktop","mobile"].includes(t)},default:"default"},bordered:Boolean,elevated:Boolean,contentStyle:[String,Object,Array],contentClass:[String,Object,Array],overlay:Boolean,persistent:Boolean,noSwipeOpen:Boolean,noSwipeClose:Boolean,noSwipeBackdrop:Boolean},data:function(){var t="mobile"===this.behavior||"desktop"!==this.behavior&&this.layout.totalWidth<=this.breakpoint;return{belowBreakpoint:t,showing:!0===this.showIfAbove&&!1===t||!0===this.value}},watch:{belowBreakpoint:function(t){!0===t?(this.lastDesktopState=this.showing,!0===this.showing&&this.hide(!1)):!1===this.overlay&&"mobile"!==this.behavior&&!1!==this.lastDesktopState&&(!0===this.showing?(this.__applyPosition(0),this.__applyBackdrop(0),this.__cleanup()):this.show(!1))},"layout.totalWidth":function(t){this.__updateLocal("belowBreakpoint","mobile"===this.behavior||"desktop"!==this.behavior&&t<=this.breakpoint)},side:function(t,e){this.layout[e].space=!1,this.layout[e].offset=0},behavior:function(t){this.__updateLocal("belowBreakpoint","mobile"===t||"desktop"!==t&&this.layout.totalWidth<=this.breakpoint)},breakpoint:function(t){this.__updateLocal("belowBreakpoint","mobile"===this.behavior||"desktop"!==this.behavior&&this.layout.totalWidth<=t)},"layout.container":function(t){!0===this.showing&&this.__preventScroll(!0!==t)},"layout.scrollbarWidth":function(){this.__applyPosition(!0===this.showing?0:void 0)},offset:function(t){this.__update("offset",t)},onLayout:function(t){this.$emit("on-layout",t),this.__update("space",t)},rightSide:function(){this.__applyPosition()},size:function(t){this.__applyPosition(),this.__updateSizeOnLayout(this.miniToOverlay,t)},miniToOverlay:function(t){this.__updateSizeOnLayout(t,this.size)},"$q.lang.rtl":function(){this.__applyPosition()},mini:function(){!0===this.value&&(this.__animateMini(),this.layout.__animate())},isMini:function(t){this.$emit("mini-state",t)}},computed:{rightSide:function(){return"right"===this.side},otherSide:function(){return!0===this.rightSide?"left":"right"},offset:function(){return!0===this.showing&&!1===this.belowBreakpoint&&!1===this.overlay?!0===this.miniToOverlay?this.miniWidth:this.size:0},size:function(){return!0===this.isMini?this.miniWidth:this.width},fixed:function(){return!0===this.overlay||!0===this.miniToOverlay||this.layout.view.indexOf(this.rightSide?"R":"L")>-1||this.$q.platform.is.ios&&!0===this.layout.container},onLayout:function(){return!0===this.showing&&!1===this.belowBreakpoint&&!1===this.overlay},onScreenOverlay:function(){return!0===this.showing&&!1===this.belowBreakpoint&&!0===this.overlay},backdropClass:function(){return!1===this.showing?"no-pointer-events":null},headerSlot:function(){return!0===this.rightSide?"r"===this.layout.rows.top[2]:"l"===this.layout.rows.top[0]},footerSlot:function(){return!0===this.rightSide?"r"===this.layout.rows.bottom[2]:"l"===this.layout.rows.bottom[0]},aboveStyle:function(){var t={};return!0===this.layout.header.space&&!1===this.headerSlot&&(!0===this.fixed?t.top=this.layout.header.offset+"px":!0===this.layout.header.space&&(t.top=this.layout.header.size+"px")),!0===this.layout.footer.space&&!1===this.footerSlot&&(!0===this.fixed?t.bottom=this.layout.footer.offset+"px":!0===this.layout.footer.space&&(t.bottom=this.layout.footer.size+"px")),t},style:function(){var t={width:this.size+"px"};return!0===this.belowBreakpoint?t:Object.assign(t,this.aboveStyle)},classes:function(){return"q-drawer--"+this.side+(!0===this.bordered?" q-drawer--bordered":"")+(!0===this.isDark?" q-drawer--dark q-dark":"")+(!0===this.belowBreakpoint?" fixed q-drawer--on-top q-drawer--mobile q-drawer--top-padding":" q-drawer--"+(!0===this.isMini?"mini":"standard")+(!0===this.fixed||!0!==this.onLayout?" fixed":"")+(!0===this.overlay||!0===this.miniToOverlay?" q-drawer--on-top":"")+(!0===this.headerSlot?" q-drawer--top-padding":""))},stateDirection:function(){return(!0===this.$q.lang.rtl?-1:1)*(!0===this.rightSide?1:-1)},isMini:function(){return!0===this.mini&&!0!==this.belowBreakpoint},onNativeEvents:function(){var t=this;if(!0!==this.belowBreakpoint){var e={"!click":function(e){t.$emit("click",e)}};return li.forEach(function(i){e[i]=function(e){void 0!==t.$listeners[i]&&t.$emit(i,e)}}),e}},hideOnRouteChange:function(){return!0!==this.persistent&&(!0===this.belowBreakpoint||!0===this.onScreenOverlay)},openDirective:function(){var t,e=!0===this.$q.lang.rtl?this.side:this.otherSide;return[{name:"touch-pan",value:this.__openByTouch,modifiers:(t={},t[e]=!0,t.mouse=!0,t)}]},contentCloseDirective:function(){var t;if(!0!==this.noSwipeClose){var e=!0===this.$q.lang.rtl?this.otherSide:this.side;return[{name:"touch-pan",value:this.__closeByTouch,modifiers:(t={},t[e]=!0,t.mouse=!0,t)}]}},backdropCloseDirective:function(){var t;if(!0!==this.noSwipeBackdrop){var e=!0===this.$q.lang.rtl?this.otherSide:this.side;return[{name:"touch-pan",value:this.__closeByTouch,modifiers:(t={},t[e]=!0,t.mouse=!0,t.mouseAllDir=!0,t)}]}}},methods:{__applyPosition:function(t){var e=this;void 0===t?this.$nextTick(function(){t=!0===e.showing?0:e.size,e.__applyPosition(e.stateDirection*t)}):void 0!==this.$refs.content&&(!0!==this.layout.container||!0!==this.rightSide||!0!==this.belowBreakpoint&&Math.abs(t)!==this.size||(t+=this.stateDirection*this.layout.scrollbarWidth),this.__lastPosition!==t&&(this.$refs.content.style.transform="translateX("+t+"px)",this.__lastPosition=t))},__applyBackdrop:function(t,e){var i=this;void 0!==this.$refs.backdrop?this.$refs.backdrop.style.backgroundColor=this.lastBackdropBg="rgba(0,0,0,"+.4*t+")":!0!==e&&this.$nextTick(function(){i.__applyBackdrop(t,!0)})},__setScrollable:function(t){var e=!0===t?"remove":!0!==this.layout.container?"add":"";""!==e&&document.body.classList[e]("q-body--drawer-toggle")},__animateMini:function(){var t=this;void 0!==this.timerMini?clearTimeout(this.timerMini):void 0!==this.$el&&this.$el.classList.add("q-drawer--mini-animate"),this.timerMini=setTimeout(function(){void 0!==t.$el&&t.$el.classList.remove("q-drawer--mini-animate"),t.timerMini=void 0},150)},__openByTouch:function(t){if(!1===this.showing){var e=this.size,i=Cr(t.distance.x,0,e);if(!0===t.isFinal){var s=this.$refs.content,n=i>=Math.min(75,e);return s.classList.remove("no-transition"),void(!0===n?this.show():(this.layout.__animate(),this.__applyBackdrop(0),this.__applyPosition(this.stateDirection*e),s.classList.remove("q-drawer--delimiter")))}if(this.__applyPosition((!0===this.$q.lang.rtl?!0!==this.rightSide:this.rightSide)?Math.max(e-i,0):Math.min(0,i-e)),this.__applyBackdrop(Cr(i/e,0,1)),!0===t.isFirst){var o=this.$refs.content;o.classList.add("no-transition"),o.classList.add("q-drawer--delimiter")}}},__closeByTouch:function(t){if(!0===this.showing){var e=this.size,i=t.direction===this.side,s=(!0===this.$q.lang.rtl?!0!==i:i)?Cr(t.distance.x,0,e):0;if(!0===t.isFinal){var n=Math.abs(s)0?this.errorMessage:this.innerErrorMessage}},mounted:function(){this.validateIndex=0,void 0===this.focused&&(this.$el.addEventListener("focusin",this.__initDirty),this.$el.addEventListener("focusout",this.__triggerValidation))},beforeDestroy:function(){void 0===this.focused&&(this.$el.removeEventListener("focusin",this.__initDirty),this.$el.removeEventListener("focusout",this.__triggerValidation))},methods:{resetValidation:function(){this.validateIndex++,this.innerLoading=!1,this.isDirty=null,this.innerError=!1,this.innerErrorMessage=void 0},validate:function(t){var e=this;if(void 0===t&&(t=this.value),!this.rules||0===this.rules.length)return!0;this.validateIndex++,!0!==this.innerLoading&&!0!==this.lazyRules&&(this.isDirty=!0);for(var i=function(t,i){e.innerError!==t&&(e.innerError=t);var s=i||void 0;e.innerErrorMessage!==s&&(e.innerErrorMessage=s),!1!==e.innerLoading&&(e.innerLoading=!1)},s=[],n=0;n0;i--)e.push(Math.floor(256*Math.random()));return e}}(),mi=4096,vi=t.extend({name:"QField",mixins:[nt,ui],inheritAttrs:!1,props:{label:String,stackLabel:Boolean,hint:String,hideHint:Boolean,prefix:String,suffix:String,labelColor:String,color:String,bgColor:String,filled:Boolean,outlined:Boolean,borderless:Boolean,standout:[Boolean,String],square:Boolean,loading:Boolean,bottomSlots:Boolean,hideBottomSpace:Boolean,rounded:Boolean,dense:Boolean,itemAligned:Boolean,counter:Boolean,clearable:Boolean,clearIcon:String,disable:Boolean,readonly:Boolean,autofocus:Boolean,for:String,maxlength:[Number,String],maxValues:[Number,String]},data:function(){return{focused:!1,targetUid:Ya(this.for),innerLoading:!1}},watch:{for:function(t){this.targetUid=Ya(t)}},computed:{editable:function(){return!0!==this.disable&&!0!==this.readonly},hasValue:function(){var t=void 0===this.__getControl?this.value:this.innerValue;return void 0!==t&&null!==t&&(""+t).length>0},computedCounter:function(){if(!1!==this.counter){var t="string"==typeof this.value||"number"==typeof this.value?(""+this.value).length:!0===Array.isArray(this.value)?this.value.length:0,e=void 0!==this.maxlength?this.maxlength:this.maxValues;return t+(void 0!==e?" / "+e:"")}},floatingLabel:function(){return!0===this.stackLabel||!0===this.focused||(void 0!==this.inputValue&&!0===this.hideSelected?this.inputValue.length>0:!0===this.hasValue)||void 0!==this.displayValue&&null!==this.displayValue&&(""+this.displayValue).length>0},shouldRenderBottom:function(){return!0===this.bottomSlots||void 0!==this.hint||void 0!==this.rules||!0===this.counter||null!==this.error},classes:function(){var t;return(t={})[this.fieldClass]=void 0!==this.fieldClass,t["q-field--"+this.styleType]=!0,t["q-field--rounded"]=this.rounded,t["q-field--square"]=this.square,t["q-field--focused"]=!0===this.focused||!0===this.hasError,t["q-field--float"]=this.floatingLabel,t["q-field--labeled"]=void 0!==this.label,t["q-field--dense"]=this.dense,t["q-field--item-aligned q-item-type"]=this.itemAligned,t["q-field--dark"]=this.isDark,t["q-field--auto-height"]=void 0===this.__getControl,t["q-field--with-bottom"]=!0!==this.hideBottomSpace&&!0===this.shouldRenderBottom,t["q-field--error"]=this.hasError,t["q-field--readonly"]=!0===this.readonly&&!0!==this.disable,t["q-field--disabled"]=this.disable,t},styleType:function(){return!0===this.filled?"filled":!0===this.outlined?"outlined":!0===this.borderless?"borderless":this.standout?"standout":"standard"},contentClass:function(){var t=[];if(!0===this.hasError)t.push("text-negative");else{if("string"==typeof this.standout&&this.standout.length>0&&!0===this.focused)return this.standout;void 0!==this.color&&t.push("text-"+this.color)}return void 0!==this.bgColor&&t.push("bg-"+this.bgColor),t},labelClass:function(){if(void 0!==this.labelColor&&!0!==this.hasError)return"text-"+this.labelColor},controlSlotScope:function(){return{id:this.targetUid,field:this.$el,editable:this.editable,focused:this.focused,floatingLabel:this.floatingLabel,value:this.value,emitValue:this.__emitValue}},attrs:function(){var t={for:this.targetUid};return!0===this.disable?t["aria-disabled"]="":!0===this.readonly&&(t["aria-readonly"]=""),t}},methods:{focus:function(){void 0===this.showPopup||!0!==this.hasDialog?this.__focus():this.showPopup()},blur:function(){var t=document.activeElement;null!==t&&this.$el.contains(t)&&t.blur()},__focus:function(){var t=document.activeElement,e=this.$refs.target;void 0===e||null!==t&&t.id===this.targetUid||(!0===e.hasAttribute("tabindex")||(e=e.querySelector("[tabindex]")),null!==e&&e!==t&&e.focus())},__getContent:function(t){var e=[];return void 0!==this.$scopedSlots.prepend&&e.push(t("div",{staticClass:"q-field__prepend q-field__marginal row no-wrap items-center",key:"prepend",on:this.slotsEvents},this.$scopedSlots.prepend())),e.push(t("div",{staticClass:"q-field__control-container col relative-position row no-wrap q-anchor--skip"},this.__getControlContainer(t))),void 0!==this.$scopedSlots.append&&e.push(t("div",{staticClass:"q-field__append q-field__marginal row no-wrap items-center",key:"append",on:this.slotsEvents},this.$scopedSlots.append())),!0===this.hasError&&!1===this.noErrorIcon&&e.push(this.__getInnerAppendNode(t,"error",[t(et,{props:{name:this.$q.iconSet.field.error,color:"negative"}})])),!0===this.loading||!0===this.innerLoading?e.push(this.__getInnerAppendNode(t,"inner-loading-append",void 0!==this.$scopedSlots.loading?this.$scopedSlots.loading():[t(vt,{props:{color:this.color}})])):!0===this.clearable&&!0===this.hasValue&&!0===this.editable&&e.push(this.__getInnerAppendNode(t,"inner-clearable-append",[t(et,{staticClass:"cursor-pointer",props:{name:this.clearIcon||this.$q.iconSet.field.clear},on:this.clearableEvents})])),void 0!==this.__getInnerAppend&&e.push(this.__getInnerAppendNode(t,"inner-append",this.__getInnerAppend(t))),void 0!==this.__getControlChild&&e.push(this.__getControlChild(t)),e},__getControlContainer:function(t){var e=[];return void 0!==this.prefix&&null!==this.prefix&&e.push(t("div",{staticClass:"q-field__prefix no-pointer-events row items-center"},[this.prefix])),void 0!==this.__getControl?e.push(this.__getControl(t)):void 0!==this.$scopedSlots.rawControl?e.push(this.$scopedSlots.rawControl()):void 0!==this.$scopedSlots.control&&e.push(t("div",{ref:"target",staticClass:"q-field__native row",attrs:Object.assign({},this.$attrs,{"data-autofocus":this.autofocus})},this.$scopedSlots.control(this.controlSlotScope))),void 0!==this.label&&e.push(t("div",{staticClass:"q-field__label no-pointer-events absolute ellipsis",class:this.labelClass},[this.label])),void 0!==this.suffix&&null!==this.suffix&&e.push(t("div",{staticClass:"q-field__suffix no-pointer-events row items-center"},[this.suffix])),e.concat(void 0!==this.__getDefaultSlot?this.__getDefaultSlot(t):$r(this,"default"))},__getBottom:function(t){var e,i;!0===this.hasError?void 0!==this.computedErrorMessage?(e=[t("div",[this.computedErrorMessage])],i=this.computedErrorMessage):(e=$r(this,"error"),i="q--slot-error"):!0===this.hideHint&&!0!==this.focused||(void 0!==this.hint?(e=[t("div",[this.hint])],i=this.hint):(e=$r(this,"hint"),i="q--slot-hint"));var s=!0===this.counter||void 0!==this.$scopedSlots.counter;if(!0!==this.hideBottomSpace||!1!==s||void 0!==e){var n=t("div",{key:i,staticClass:"q-field__messages col"},e);return t("div",{staticClass:"q-field__bottom row items-start q-field__bottom--"+(!0!==this.hideBottomSpace?"animated":"stale")},[!0===this.hideBottomSpace?n:t("transition",{props:{name:"q-transition--field-message"}},[n]),!0===s?t("div",{staticClass:"q-field__counter"},void 0!==this.$scopedSlots.counter?this.$scopedSlots.counter():[this.computedCounter]):null])}},__getInnerAppendNode:function(t,e,i){return null===i?null:t("div",{staticClass:"q-field__append q-field__marginal row no-wrap items-center q-anchor--skip",key:e},i)},__onControlPopupShow:function(t){void 0!==t&&ir(t),this.$emit("popup-show",t),this.hasPopupOpen=!0,this.__onControlFocusin(t)},__onControlPopupHide:function(t){void 0!==t&&ir(t),this.$emit("popup-hide",t),this.hasPopupOpen=!1,this.__onControlFocusout(t)},__onControlFocusin:function(t){!0===this.editable&&!1===this.focused&&(this.focused=!0,this.$emit("focus",t))},__onControlFocusout:function(t,e){var i=this;clearTimeout(this.focusoutTimer),this.focusoutTimer=setTimeout(function(){(!0!==document.hasFocus()||!0!==i.hasPopupOpen&&void 0!==i.$refs&&void 0!==i.$refs.control&&!1===i.$refs.control.contains(document.activeElement))&&(!0===i.focused&&(i.focused=!1,i.$emit("blur",t)),void 0!==e&&e())})},__clearValue:function(t){ir(t),"file"===this.type&&(sr(t),this.$refs.input.value=null),this.$emit("input",null),this.$emit("clear",this.value)},__emitValue:function(t){this.$emit("input",t)}},render:function(t){return void 0!==this.__onPreRender&&this.__onPreRender(),void 0!==this.__onPostRender&&this.$nextTick(this.__onPostRender),t("label",{staticClass:"q-field row no-wrap items-start",class:this.classes,attrs:this.attrs},[void 0!==this.$scopedSlots.before?t("div",{staticClass:"q-field__before q-field__marginal row no-wrap items-center",on:this.slotsEvents},this.$scopedSlots.before()):null,t("div",{staticClass:"q-field__inner relative-position col self-stretch column justify-center"},[t("div",{ref:"control",staticClass:"q-field__control relative-position row no-wrap",class:this.contentClass,attrs:{tabindex:-1},on:this.controlEvents},this.__getContent(t)),!0===this.shouldRenderBottom?this.__getBottom(t):null]),void 0!==this.$scopedSlots.after?t("div",{staticClass:"q-field__after q-field__marginal row no-wrap items-center",on:this.slotsEvents},this.$scopedSlots.after()):null])},created:function(){void 0!==this.__onPreRender&&this.__onPreRender(),this.slotsEvents={click:sr},this.clearableEvents={click:this.__clearValue},this.controlEvents=void 0!==this.__getControlEvents?this.__getControlEvents():{focusin:this.__onControlFocusin,focusout:this.__onControlFocusout,"popup-show":this.__onControlPopupShow,"popup-hide":this.__onControlPopupHide}},mounted:function(){!0===s&&void 0===this.for&&(this.targetUid=Ya()),!0===this.autofocus&&this.focus()},beforeDestroy:function(){clearTimeout(this.focusoutTimer)}}),gi={props:{multiple:Boolean,accept:String,maxFileSize:Number,maxTotalSize:Number,filter:Function},computed:{extensions:function(){if(void 0!==this.accept)return this.accept.split(",").map(function(t){return(t=t.trim()).endsWith("/*")&&(t=t.slice(0,t.length-1)),t})}},methods:{pickFiles:function(t){if(!0===this.editable){var e=this.__getFileInput();e&&e.click(t)}},addFiles:function(t){this.editable&&t&&this.__addFiles(null,t)},__processFiles:function(t,e){var i=this;if(e=Array.from(e||t.target.files),!(void 0!==this.accept&&0===(e=e.filter(function(t){return i.extensions.some(function(e){return t.type.toUpperCase().startsWith(e.toUpperCase())||t.name.toUpperCase().endsWith(e.toUpperCase())})})).length||void 0!==this.maxFileSize&&0===(e=e.filter(function(t){return t.size<=i.maxFileSize})).length)){if(!0!==this.multiple&&(e=[e[0]]),void 0!==this.maxTotalSize){for(var s=0,n=0;nthis.maxTotalSize){if(n>0){e=e.slice(0,n);break}return}if(0===e.length)return}return"function"==typeof this.filter&&(e=this.filter(e)),e.length>0?e:void 0}},__onDragOver:function(t){nr(t),this.dnd=!0},__onDragLeave:function(t){nr(t),this.dnd=!1},__onDrop:function(t){nr(t);var e=t.dataTransfer.files;e.length>0&&this.__addFiles(null,e),this.dnd=!1},__getDnd:function(t,e){if(!0===this.dnd)return t("div",{staticClass:"q-"+e+"__dnd absolute-full",on:Hr(this,"dnd",{dragenter:nr,dragover:nr,dragleave:this.__onDragLeave,drop:this.__onDrop})})}}},_i={computed:{formDomProps:function(){if("file"===this.type)try{var t="DataTransfer"in window?new DataTransfer:"ClipboardEvent"in window?new ClipboardEvent("").clipboardData:void 0;return Object(this.value)===this.value&&("length"in this.value?Array.from(this.value):[this.value]).forEach(function(e){t.items.add(e)}),{files:t.files}}catch(t){return{files:void 0}}}}},bi={date:"####/##/##",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"},yi={"#":{pattern:"[\\d]",negate:"[^\\d]"},S:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]"},N:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]"},A:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]",transform:function(t){return t.toLocaleUpperCase()}},a:{pattern:"[a-zA-Z]",negate:"[^a-zA-Z]",transform:function(t){return t.toLocaleLowerCase()}},X:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]",transform:function(t){return t.toLocaleUpperCase()}},x:{pattern:"[0-9a-zA-Z]",negate:"[^0-9a-zA-Z]",transform:function(t){return t.toLocaleLowerCase()}}},wi=Object.keys(yi);wi.forEach(function(t){yi[t].regex=new RegExp(yi[t].pattern)});var Si=new RegExp("\\\\([^.*+?^${}()|([\\]])|([.*+?^${}()|[\\]])|(["+wi.join("")+"])|(.)","g"),Ci=/[.*+?^${}()|[\]\\]/g,xi=String.fromCharCode(1),ki={props:{mask:String,reverseFillMask:Boolean,fillMask:[Boolean,String],unmaskedValue:Boolean},watch:{type:function(){this.__updateMaskInternals()},mask:function(t){if(void 0!==t)this.__updateMaskValue(this.innerValue,!0);else{var e=this.__unmask(this.innerValue);this.__updateMaskInternals(),this.value!==e&&this.$emit("input",e)}},fillMask:function(){!0===this.hasMask&&this.__updateMaskValue(this.innerValue,!0)},reverseFillMask:function(){!0===this.hasMask&&this.__updateMaskValue(this.innerValue,!0)},unmaskedValue:function(){!0===this.hasMask&&this.__updateMaskValue(this.innerValue)}},methods:{__getInitialMaskedValue:function(){if(this.__updateMaskInternals(),!0===this.hasMask){var t=this.__mask(this.__unmask(this.value));return!1!==this.fillMask?this.__fillWithMask(t):t}return this.value},__getPaddedMaskMarked:function(t){if(t-1){for(var n=t-e.length;n>0;n--)s+=xi;e=e.slice(0,i)+s+e.slice(i)}return e},__updateMaskInternals:function(){var t=this;if(this.hasMask=void 0!==this.mask&&this.mask.length>0&&["text","search","url","tel","password"].includes(this.type),!1===this.hasMask)return this.computedUnmask=void 0,this.maskMarked="",void(this.maskReplaced="");var e=void 0===bi[this.mask]?this.mask:bi[this.mask],i="string"==typeof this.fillMask&&this.fillMask.length>0?this.fillMask.slice(0,1):"_",s=i.replace(Ci,"\\$&"),n=[],o=[],r=[],a=!0===this.reverseFillMask,l="",c="";e.replace(Si,function(t,e,i,s,u){if(void 0!==s){var h=yi[s];r.push(h),c=h.negate,!0===a&&(o.push("(?:"+c+"+)?("+h.pattern+"+)?(?:"+c+"+)?("+h.pattern+"+)?"),a=!1),o.push("(?:"+c+"+)?("+h.pattern+")?")}else if(void 0!==i)l="\\"+("\\"===i?"":i),r.push(i),n.push("([^"+l+"]+)?"+l+"?");else{var d=void 0!==e?e:u;l="\\"===d?"\\\\\\\\":d.replace(Ci,"\\\\$&"),r.push(d),n.push("([^"+l+"]+)?"+l+"?")}});var u=new RegExp("^"+n.join("")+"("+(""===l?".":"[^"+l+"]")+"+)?$"),h=o.length-1,d=o.map(function(e,i){return 0===i&&!0===t.reverseFillMask?new RegExp("^"+s+"*"+e):i===h?new RegExp("^"+e+"("+(""===c?".":c)+"+)?"+(!0===t.reverseFillMask?"$":s+"*")):new RegExp("^"+e)});this.computedMask=r,this.computedUnmask=function(t){var e=u.exec(t);null!==e&&(t=e.slice(1).join(""));for(var i=[],s=d.length,n=0,o=t;n0?i.join(""):t},this.maskMarked=r.map(function(t){return"string"==typeof t?t:xi}).join(""),this.maskReplaced=this.maskMarked.split(xi).join(i)},__updateMaskValue:function(t,e,i){var s=this,n=this.$refs.input,o=n.selectionEnd,r=n.value.length-o,a=this.__unmask(t);!0===e&&this.__updateMaskInternals();var l=this.__mask(a),c=!1!==this.fillMask?this.__fillWithMask(l):l,u=this.innerValue!==c;n.value!==c&&(n.value=c),!0===u&&(this.innerValue=c),this.$nextTick(function(){if(c!==s.maskReplaced)if("insertFromPaste"!==i||!0===s.reverseFillMask)if(["deleteContentBackward","deleteContentForward"].indexOf(i)>-1){var t=!0===s.reverseFillMask?Math.max(0,c.length-(c===s.maskReplaced?0:Math.min(l.length,r)+1))+1:o;n.setSelectionRange(t,t,"forward")}else if(!0===s.reverseFillMask)if(!0===u){var e=Math.max(0,c.length-(c===s.maskReplaced?0:Math.min(l.length,r+1)));s.__moveCursorRightReverse(n,e,e)}else{var a=c.length-r;n.setSelectionRange(a,a,"backward")}else if(!0===u){var h=Math.max(0,s.maskMarked.indexOf(xi),Math.min(l.length,o)-1);s.__moveCursorRight(n,h,h)}else{var d=o-1;s.__moveCursorRight(n,d,d)}else{var p=o-1;s.__moveCursorRight(n,p,p)}else{var f=!0===s.reverseFillMask?s.maskReplaced.length:0;n.setSelectionRange(f,f,"forward")}});var h=!0===this.unmaskedValue?this.__unmask(c):c;this.value!==h&&this.__emitValue(h,!0)},__moveCursorForPaste:function(t,e,i){var s=this.__mask(this.__unmask(t.value));e=Math.max(0,this.maskMarked.indexOf(xi),Math.min(s.length,e)),t.setSelectionRange(e,i,"forward")},__moveCursorLeft:function(t,e,i,s){for(var n=-1===this.maskMarked.slice(e-1).indexOf(xi),o=Math.max(0,e-1);o>=0;o--)if(this.maskMarked[o]===xi){e=o,!0===n&&e++;break}if(o<0&&void 0!==this.maskMarked[e]&&this.maskMarked[e]!==xi)return this.__moveCursorRight(t,0,0);e>=0&&t.setSelectionRange(e,!0===s?i:e,"backward")},__moveCursorRight:function(t,e,i,s){for(var n=t.value.length,o=Math.min(n,i+1);o<=n;o++){if(this.maskMarked[o]===xi){i=o;break}this.maskMarked[o-1]===xi&&(i=o)}if(o>n&&void 0!==this.maskMarked[i-1]&&this.maskMarked[i-1]!==xi)return this.__moveCursorLeft(t,n,n);t.setSelectionRange(s?e:i,i,"forward")},__moveCursorLeftReverse:function(t,e,i,s){for(var n=this.__getPaddedMaskMarked(t.value.length),o=Math.max(0,e-1);o>=0;o--){if(n[o-1]===xi){e=o;break}if(n[o]===xi&&(e=o,0===o))break}if(o<0&&void 0!==n[e]&&n[e]!==xi)return this.__moveCursorRightReverse(t,0,0);e>=0&&t.setSelectionRange(e,!0===s?i:e,"backward")},__moveCursorRightReverse:function(t,e,i,s){for(var n=t.value.length,o=this.__getPaddedMaskMarked(n),r=-1===o.slice(0,i+1).indexOf(xi),a=Math.min(n,i+1);a<=n;a++)if(o[a-1]===xi){(i=a)>0&&!0===r&&i--;break}if(a>n&&void 0!==o[i-1]&&o[i-1]!==xi)return this.__moveCursorLeftReverse(t,n,n);t.setSelectionRange(!0===s?e:i,i,"forward")},__onMaskedKeydown:function(t){if(!0!==_r(t)){var e=this.$refs.input,i=e.selectionStart,s=e.selectionEnd;if(37===t.keyCode||39===t.keyCode){var n=this["__moveCursor"+(39===t.keyCode?"Right":"Left")+(!0===this.reverseFillMask?"Reverse":"")];t.preventDefault(),n(e,i,s,t.shiftKey)}else 8===t.keyCode&&!0!==this.reverseFillMask&&i===s?this.__moveCursorLeft(e,i,s,!0):46===t.keyCode&&!0===this.reverseFillMask&&i===s&&this.__moveCursorRightReverse(e,i,s,!0);this.$emit("keydown",t)}},__mask:function(t){if(void 0===t||null===t||""===t)return"";if(!0===this.reverseFillMask)return this.__maskReverse(t);for(var e=this.computedMask,i=0,s="",n=0;n=0;o--){var r=e[o],a=t[s];if("string"==typeof r)n=r+n,a===r&&s--;else{if(void 0===a||!r.regex.test(a))return n;do{n=(void 0!==r.transform?r.transform(a):a)+n,a=t[--s]}while(i===o&&void 0!==a&&r.regex.test(a))}}return n},__unmask:function(t){return"string"!=typeof t||void 0===this.computedUnmask?"number"==typeof t?this.computedUnmask(""+t):t:this.computedUnmask(t)},__fillWithMask:function(t){return this.maskReplaced.length-t.length<=0?t:!0===this.reverseFillMask&&t.length>0?this.maskReplaced.slice(0,-t.length)+t:t+this.maskReplaced.slice(t.length)}}},qi=/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/,$i=/(?:[\u3300-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF\uFE30-\uFE4F]|[\uD840-\uD868\uD86A-\uD872][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD873[\uDC00-\uDEAF]|\uD87E[\uDC00-\uDE1F])/,Ti=/[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/,Mi={methods:{__onComposition:function(t){if("compositionend"===t.type||"change"===t.type){if(!0!==t.target.composing)return;t.target.composing=!1,this.__onInput(t)}else"compositionupdate"===t.type?"string"==typeof t.data&&!1===qi.test(t.data)&&!1===$i.test(t.data)&&!1===Ti.test(t.data)&&(t.target.composing=!1):t.target.composing=!0}}},Bi=t.extend({name:"QInput",mixins:[vi,ki,Mi,Yt,_i],props:{value:{required:!1},type:{type:String,default:"text"},debounce:[String,Number],autogrow:Boolean,inputClass:[Array,String,Object],inputStyle:[Array,String,Object]},watch:{value:function(t){if(!0===this.hasMask){if(!0===this.stopValueWatcher)return void(this.stopValueWatcher=!1);this.__updateMaskValue(t)}else this.innerValue!==t&&(this.innerValue=t,"number"===this.type&&!0===this.hasOwnProperty("tempValue")&&(!0===this.typedNumber?this.typedNumber=!1:delete this.tempValue));!0===this.autogrow&&this.$nextTick(this.__adjustHeight)},autogrow:function(t){if(!0===t)this.$nextTick(this.__adjustHeight);else if(this.$attrs.rows>0&&void 0!==this.$refs.input){this.$refs.input.style.height="auto"}},dense:function(){!0===this.autogrow&&this.$nextTick(this.__adjustHeight)}},data:function(){return{innerValue:this.__getInitialMaskedValue()}},computed:{isTextarea:function(){return"textarea"===this.type||!0===this.autogrow},fieldClass:function(){return"q-"+(!0===this.isTextarea?"textarea":"input")+(!0===this.autogrow?" q-textarea--autogrow":"")}},methods:{focus:function(){var t=document.activeElement;void 0===this.$refs.input||this.$refs.input===t||null!==t&&t.id===this.targetUid||this.$refs.input.focus()},select:function(){void 0!==this.$refs.input&&this.$refs.input.select()},__onPaste:function(t){if(!0===this.hasMask&&!0!==this.reverseFillMask){var e=t.target;this.__moveCursorForPaste(e,e.selectionStart,e.selectionEnd)}},__onInput:function(t){if(!t||!t.target||!0!==t.target.composing)if("file"!==this.type){var e=t.target.value;!0===this.hasMask?this.__updateMaskValue(e,!1,t.inputType):this.__emitValue(e),!0===this.autogrow&&this.__adjustHeight()}else this.$emit("input",t.target.files)},__emitValue:function(t,e){var i=this;this.emitValueFn=function(){"number"!==i.type&&!0===i.hasOwnProperty("tempValue")&&delete i.tempValue,i.value!==t&&(!0===e&&(i.stopValueWatcher=!0),i.$emit("input",t)),i.emitValueFn=void 0},"number"===this.type&&(this.typedNumber=!0,this.tempValue=t),void 0!==this.debounce?(clearTimeout(this.emitTimer),this.tempValue=t,this.emitTimer=setTimeout(this.emitValueFn,this.debounce)):this.emitValueFn()},__adjustHeight:function(){var t=this.$refs.input;if(void 0!==t){var e=t.parentNode.style;e.marginBottom=t.scrollHeight-1+"px",t.style.height="1px",t.style.height=t.scrollHeight+"px",e.marginBottom=""}},__onChange:function(t){this.__onComposition(t),clearTimeout(this.emitTimer),void 0!==this.emitValueFn&&this.emitValueFn(),this.$emit("change",t)},__onFinishEditing:function(t){var e=this;void 0!==t&&ir(t),clearTimeout(this.emitTimer),void 0!==this.emitValueFn&&this.emitValueFn(),this.typedNumber=!1,this.stopValueWatcher=!1,delete this.tempValue,"file"!==this.type&&this.$nextTick(function(){void 0!==e.$refs.input&&(e.$refs.input.value=void 0!==e.innerValue?e.innerValue:"")})},__getControl:function(t){var e=Object.assign({},this.$listeners,{input:this.__onInput,paste:this.__onPaste,change:this.__onChange,blur:this.__onFinishEditing,focus:ir});e.compositionstart=e.compositionupdate=e.compositionend=this.__onComposition,!0===this.hasMask&&(e.keydown=this.__onMaskedKeydown);var i=Object.assign({},{tabindex:0,"data-autofocus":this.autofocus,rows:"textarea"===this.type?6:void 0,"aria-label":this.label,name:this.nameProp},this.$attrs,{id:this.targetUid,type:this.type,maxlength:this.maxlength});return!0===this.disable?(i.disabled="",i["aria-disabled"]=""):!0===this.readonly&&(i.readonly="",i["aria-readonly"]=""),!0===this.autogrow&&(i.rows=1,e.animationend=this.__adjustHeight),t(!0===this.isTextarea?"textarea":"input",{ref:"input",staticClass:"q-field__native q-placeholder",style:this.inputStyle,class:this.inputClass,attrs:i,on:e,domProps:"file"!==this.type?{value:!0===this.hasOwnProperty("tempValue")?this.tempValue:void 0!==this.innerValue?this.innerValue:""}:this.formDomProps})}},mounted:function(){!0===this.autogrow&&this.__adjustHeight()},beforeDestroy:function(){this.__onFinishEditing()}}),Pi=t.extend({name:"QTooltip",mixins:[Pt,zt,Ot,Et],props:{maxHeight:{type:String,default:null},maxWidth:{type:String,default:null},transitionShow:{default:"jump-down"},transitionHide:{default:"jump-up"},anchor:{type:String,default:"bottom middle",validator:oa},self:{type:String,default:"top middle",validator:oa},offset:{type:Array,default:function(){return[14,14]},validator:ra},scrollTarget:{default:void 0},delay:{type:Number,default:0},hideDelay:{type:Number,default:0}},computed:{anchorOrigin:function(){return aa(this.anchor)},selfOrigin:function(){return aa(this.self)},hideOnRouteChange:function(){return!0!==this.persistent}},methods:{__show:function(t){var e=this;this.__showPortal(),this.__nextTick(function(){e.observer=new MutationObserver(function(){return e.updatePosition()}),e.observer.observe(e.__portal.$el,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),e.updatePosition(),e.__configureScrollTarget()}),this.__setTimeout(function(){e.$emit("show",t)},300)},__hide:function(t){var e=this;this.__anchorCleanup(),this.__setTimeout(function(){e.__hidePortal(),e.$emit("hide",t)},300)},__anchorCleanup:function(){void 0!==this.observer&&(this.observer.disconnect(),this.observer=void 0),this.__unconfigureScrollTarget(),Fr(this,"tooltipTemp")},updatePosition:function(){if(void 0!==this.anchorEl&&void 0!==this.__portal){var t=this.__portal.$el;8!==t.nodeType?la({el:t,offset:this.offset,anchorEl:this.anchorEl,anchorOrigin:this.anchorOrigin,selfOrigin:this.selfOrigin,maxHeight:this.maxHeight,maxWidth:this.maxWidth}):setTimeout(this.updatePosition,25)}},__delayShow:function(t){var e=this;if(!0===this.$q.platform.is.mobile){Vr(),document.body.classList.add("non-selectable");var i=Ct(this.anchorEl);Ir(this,"tooltipTemp",["touchmove","touchcancel","touchend","click"].map(function(t){return[i,t,"__delayHide","passiveCapture"]}))}this.__setTimeout(function(){e.show(t)},this.delay)},__delayHide:function(t){var e=this;this.__clearTimeout(),!0===this.$q.platform.is.mobile&&(Fr(this,"tooltipTemp"),Vr(),setTimeout(function(){document.body.classList.remove("non-selectable")},10)),this.__setTimeout(function(){e.hide(t)},this.hideDelay)},__configureAnchorEl:function(){!0!==this.noParentEvent&&void 0!==this.anchorEl&&Ir(this,"anchor",!0===this.$q.platform.is.mobile?[[this.anchorEl,"touchstart","__delayShow","passive"]]:[[this.anchorEl,"mouseenter","__delayShow","passive"],[this.anchorEl,"mouseleave","__delayHide","passive"]])},__unconfigureScrollTarget:function(){void 0!==this.__scrollTarget&&(this.__changeScrollEvent(this.__scrollTarget),this.__scrollTarget=void 0)},__configureScrollTarget:function(){if(void 0!==this.anchorEl||void 0!==this.scrollTarget){this.__scrollTarget=Yr(this.anchorEl,this.scrollTarget);var t=!0===this.noParentEvent?this.updatePosition:this.hide;this.__changeScrollEvent(this.__scrollTarget,t)}},__renderPortal:function(t){return t("transition",{props:{name:this.transition}},[!0===this.showing?t("div",{staticClass:"q-tooltip q-tooltip--style q-position-engine no-pointer-events",class:this.contentClass,style:this.contentStyle,attrs:{role:"complementary"}},$r(this,"default")):null])}},mounted:function(){this.__processModelChange(this.value)}}),Li=t.extend({name:"QList",mixins:[nt],props:{bordered:Boolean,dense:Boolean,separator:Boolean,padding:Boolean},computed:{classes:function(){return"q-list"+(!0===this.bordered?" q-list--bordered":"")+(!0===this.dense?" q-list--dense":"")+(!0===this.separator?" q-list--separator":"")+(!0===this.isDark?" q-list--dark":"")+(!0===this.padding?" q-list--padding":"")}},render:function(t){return t("div",{class:this.classes,on:this.$listeners},$r(this,"default"))}}),zi=t.extend({name:"QItem",mixins:[nt,pt,tt],props:{active:Boolean,clickable:Boolean,dense:Boolean,insetLevel:Number,tabindex:[String,Number],focused:Boolean,manualFocus:Boolean},computed:{isClickable:function(){return!0!==this.disable&&(!0===this.clickable||!0===this.hasRouterLink||"a"===this.tag||"label"===this.tag)},classes:function(){var t;return(t={"q-item--clickable q-link cursor-pointer":this.isClickable,"q-focusable q-hoverable":!0===this.isClickable&&!1===this.manualFocus,"q-manual-focusable":!0===this.isClickable&&!0===this.manualFocus,"q-manual-focusable--focused":!0===this.isClickable&&!0===this.focused,"q-item--dense":this.dense,"q-item--dark":this.isDark,"q-item--active":this.active})[this.activeClass]=!0===this.active&&!0!==this.hasRouterLink&&void 0!==this.activeClass,t.disabled=this.disable,t},style:function(){var t;if(void 0!==this.insetLevel)return(t={})["padding"+(!0===this.$q.lang.rtl?"Right":"Left")]=16+56*this.insetLevel+"px",t}},methods:{__getContent:function(t){var e=Tr(this,"default",[]);return!0===this.isClickable&&e.unshift(t("div",{staticClass:"q-focus-helper",attrs:{tabindex:-1},ref:"blurTarget"})),e},__onClick:function(t){!0===this.isClickable&&(void 0!==this.$refs.blurTarget&&(!0!==t.qKeyEvent&&document.activeElement===this.$el?this.$refs.blurTarget.focus():document.activeElement===this.$refs.blurTarget&&this.$el.focus()),this.$emit("click",t))},__onKeyup:function(t){if(!0===this.isClickable&&!0===br(t,13)){nr(t),t.qKeyEvent=!0;var e=new MouseEvent("click",t);e.qKeyEvent=!0,this.$el.dispatchEvent(e)}this.$emit("keyup",t)}},render:function(t){var e={staticClass:"q-item q-item-type row no-wrap",class:this.classes,style:this.style};return e[!0===this.hasRouterLink?"nativeOn":"on"]=Object.assign({},this.$listeners,{click:this.__onClick,keyup:this.__onKeyup}),!0===this.isClickable&&(e.attrs={tabindex:this.tabindex||"0"}),!0===this.hasRouterLink?(e.tag="a",e.props=this.routerLinkProps,t("router-link",e,this.__getContent(t))):t(this.tag,e,this.__getContent(t))}}),Oi=t.extend({name:"QItemSection",props:{avatar:Boolean,thumbnail:Boolean,side:Boolean,top:Boolean,noWrap:Boolean},computed:{classes:function(){var t,e=this.avatar||this.side||this.thumbnail;return(t={"q-item__section--top":this.top,"q-item__section--avatar":this.avatar,"q-item__section--thumbnail":this.thumbnail,"q-item__section--side":e,"q-item__section--nowrap":this.noWrap,"q-item__section--main":!e})["justify-"+(this.top?"start":"center")]=!0,t}},render:function(t){return t("div",{staticClass:"q-item__section column",class:this.classes,on:this.$listeners},$r(this,"default"))}}),Ei=/^https?:\/\//,Di=function(t,e){this.el=t,this.vm=e,this._range=null},Ai={selection:{configurable:!0},hasSelection:{configurable:!0},range:{configurable:!0},parent:{configurable:!0},blockParent:{configurable:!0}};Ai.selection.get=function(){if(this.el){var t=document.getSelection();if(Za(t.anchorNode,this.el)&&Za(t.focusNode,this.el))return t}return null},Ai.hasSelection.get=function(){return null!==this.selection&&this.selection.toString().length>0},Ai.range.get=function(){var t=this.selection;return null!==t&&t.rangeCount?t.getRangeAt(0):this._range},Ai.parent.get=function(){var t=this.range;if(null!==t){var e=t.startContainer;return e.nodeType===document.ELEMENT_NODE?e:e.parentNode}return null},Ai.blockParent.get=function(){var t=this.parent;return null!==t?function t(e,i){if(i&&e===i)return null;var s=e.nodeName.toLowerCase();if(!0===["div","li","ul","ol","blockquote"].includes(s))return e;var n=(window.getComputedStyle?window.getComputedStyle(e):e.currentStyle).display;return"block"===n||"table"===n?e:t(e.parentNode)}(t,this.el):null},Di.prototype.save=function(t){void 0===t&&(t=this.range),null!==t&&(this._range=t)},Di.prototype.restore=function(t){void 0===t&&(t=this._range);var e=document.createRange(),i=document.getSelection();null!==t?(e.setStart(t.startContainer,t.startOffset),e.setEnd(t.endContainer,t.endOffset),i.removeAllRanges(),i.addRange(e)):(i.selectAllChildren(this.el),i.collapseToEnd())},Di.prototype.hasParent=function(t,e){var i=e?this.parent:this.blockParent;return null!==i&&i.nodeName.toLowerCase()===t.toLowerCase()},Di.prototype.hasParents=function(t,e,i){return void 0===i&&(i=this.parent),null!==i&&(null!==i&&!0===t.includes(i.nodeName.toLowerCase())||!0===e&&this.hasParents(t,e,i.parentNode))},Di.prototype.is=function(t,e){switch(t){case"formatBlock":return"DIV"===e&&this.parent===this.el||this.hasParent(e,"PRE"===e);case"link":return this.hasParent("A",!0);case"fontSize":return document.queryCommandValue(t)===e;case"fontName":var i=document.queryCommandValue(t);return i==='"'+e+'"'||i===e;case"fullscreen":return this.vm.inFullscreen;case"viewsource":return this.vm.isViewingSource;case void 0:return!1;default:var s=document.queryCommandState(t);return void 0!==e?s===e:s}},Di.prototype.getParentAttribute=function(t){return null!==this.parent?this.parent.getAttribute(t):null},Di.prototype.can=function(t){return"outdent"===t?this.hasParents(["blockquote","li"],!0):"indent"===t?this.hasParents(["li"],!0):"link"===t?null!==this.selection||this.is("link"):void 0},Di.prototype.apply=function(t,e,i){if(void 0===i&&(i=Zo),"formatBlock"===t)["BLOCKQUOTE","H1","H2","H3","H4","H5","H6"].includes(e)&&this.is(t,e)&&(t="outdent",e=null),"PRE"===e&&this.is(t,"PRE")&&(e="P");else{if("print"===t){i();var s=window.open();return s.document.write("\n \n \n \n Print - "+document.title+"\n \n \n
    "+this.el.innerHTML+"
    \n \n \n "),s.print(),void s.close()}if("link"===t){var n=this.getParentAttribute("href");if(null===n){var o=this.selectWord(this.selection),r=o?o.toString():"";if(!r.length)return;this.vm.editLinkUrl=Ei.test(r)?r:"https://",document.execCommand("createLink",!1,this.vm.editLinkUrl),this.save(o.getRangeAt(0))}else this.vm.editLinkUrl=n,this.range.selectNodeContents(this.parent),this.save();return}if("fullscreen"===t)return this.vm.toggleFullscreen(),void i();if("viewsource"===t)return this.vm.isViewingSource=!1===this.vm.isViewingSource,this.vm.__setContent(this.vm.value),void i()}document.execCommand(t,!1,e),i()},Di.prototype.selectWord=function(t){if(null===t||!0!==t.isCollapsed||void 0===t.modify)return t;var e=document.createRange();e.setStart(t.anchorNode,t.anchorOffset),e.setEnd(t.focusNode,t.focusOffset);var i=e.collapsed?["backward","forward"]:["forward","backward"];e.detach();var s=t.focusNode,n=t.focusOffset;return t.collapse(t.anchorNode,t.anchorOffset),t.modify("move",i[0],"character"),t.modify("move",i[1],"word"),t.extend(s,n),t.modify("extend",i[1],"character"),t.modify("extend",i[0],"word"),t},Object.defineProperties(Di.prototype,Ai);var Ii=Object.prototype.toString,Fi=Object.prototype.hasOwnProperty,Ri={};"Boolean Number String Function Array Date RegExp Object".split(" ").forEach(function(t){Ri["[object "+t+"]"]=t.toLowerCase()});var Vi=t.extend({name:"QEditor",mixins:[ie,nt],props:{value:{type:String,required:!0},readonly:Boolean,disable:Boolean,minHeight:{type:String,default:"10rem"},maxHeight:String,height:String,definitions:Object,fonts:Object,toolbar:{type:Array,validator:function(t){return 0===t.length||t.every(function(t){return t.length})},default:function(){return[["left","center","right","justify"],["bold","italic","underline","strike"],["undo","redo"]]}},toolbarColor:String,toolbarBg:String,toolbarTextColor:String,toolbarToggleColor:{type:String,default:"primary"},toolbarOutline:Boolean,toolbarPush:Boolean,toolbarRounded:Boolean,contentStyle:Object,contentClass:[Object,Array,String],square:Boolean,flat:Boolean,dense:Boolean},computed:{editable:function(){return!this.readonly&&!this.disable},hasToolbar:function(){return this.toolbar&&this.toolbar.length>0},toolbarBackgroundClass:function(){if(this.toolbarBg)return"bg-"+this.toolbarBg},buttonProps:function(){return{type:"a",flat:!0!==this.toolbarOutline&&!0!==this.toolbarPush,noWrap:!0,outline:this.toolbarOutline,push:this.toolbarPush,rounded:this.toolbarRounded,dense:!0,color:this.toolbarColor,disable:!this.editable,size:"sm"}},buttonDef:function(){var t=this.$q.lang.editor,e=this.$q.iconSet.editor;return{bold:{cmd:"bold",icon:e.bold,tip:t.bold,key:66},italic:{cmd:"italic",icon:e.italic,tip:t.italic,key:73},strike:{cmd:"strikeThrough",icon:e.strikethrough,tip:t.strikethrough,key:83},underline:{cmd:"underline",icon:e.underline,tip:t.underline,key:85},unordered:{cmd:"insertUnorderedList",icon:e.unorderedList,tip:t.unorderedList},ordered:{cmd:"insertOrderedList",icon:e.orderedList,tip:t.orderedList},subscript:{cmd:"subscript",icon:e.subscript,tip:t.subscript,htmlTip:"x2"},superscript:{cmd:"superscript",icon:e.superscript,tip:t.superscript,htmlTip:"x2"},link:{cmd:"link",disable:function(t){return t.caret&&!t.caret.can("link")},icon:e.hyperlink,tip:t.hyperlink,key:76},fullscreen:{cmd:"fullscreen",icon:e.toggleFullscreen,tip:t.toggleFullscreen,key:70},viewsource:{cmd:"viewsource",icon:e.viewSource,tip:t.viewSource},quote:{cmd:"formatBlock",param:"BLOCKQUOTE",icon:e.quote,tip:t.quote,key:81},left:{cmd:"justifyLeft",icon:e.left,tip:t.left},center:{cmd:"justifyCenter",icon:e.center,tip:t.center},right:{cmd:"justifyRight",icon:e.right,tip:t.right},justify:{cmd:"justifyFull",icon:e.justify,tip:t.justify},print:{type:"no-state",cmd:"print",icon:e.print,tip:t.print,key:80},outdent:{type:"no-state",disable:function(t){return t.caret&&!t.caret.can("outdent")},cmd:"outdent",icon:e.outdent,tip:t.outdent},indent:{type:"no-state",disable:function(t){return t.caret&&!t.caret.can("indent")},cmd:"indent",icon:e.indent,tip:t.indent},removeFormat:{type:"no-state",cmd:"removeFormat",icon:e.removeFormat,tip:t.removeFormat},hr:{type:"no-state",cmd:"insertHorizontalRule",icon:e.hr,tip:t.hr},undo:{type:"no-state",cmd:"undo",icon:e.undo,tip:t.undo,key:90},redo:{type:"no-state",cmd:"redo",icon:e.redo,tip:t.redo,key:89},h1:{cmd:"formatBlock",param:"H1",icon:e.heading1||e.heading,tip:t.heading1,htmlTip:'

    '+t.heading1+"

    "},h2:{cmd:"formatBlock",param:"H2",icon:e.heading2||e.heading,tip:t.heading2,htmlTip:'

    '+t.heading2+"

    "},h3:{cmd:"formatBlock",param:"H3",icon:e.heading3||e.heading,tip:t.heading3,htmlTip:'

    '+t.heading3+"

    "},h4:{cmd:"formatBlock",param:"H4",icon:e.heading4||e.heading,tip:t.heading4,htmlTip:'

    '+t.heading4+"

    "},h5:{cmd:"formatBlock",param:"H5",icon:e.heading5||e.heading,tip:t.heading5,htmlTip:'
    '+t.heading5+"
    "},h6:{cmd:"formatBlock",param:"H6",icon:e.heading6||e.heading,tip:t.heading6,htmlTip:'
    '+t.heading6+"
    "},p:{cmd:"formatBlock",param:"DIV",icon:e.heading,tip:t.paragraph},code:{cmd:"formatBlock",param:"PRE",icon:e.code,htmlTip:""+t.code+""},"size-1":{cmd:"fontSize",param:"1",icon:e.size1||e.size,tip:t.size1,htmlTip:''+t.size1+""},"size-2":{cmd:"fontSize",param:"2",icon:e.size2||e.size,tip:t.size2,htmlTip:''+t.size2+""},"size-3":{cmd:"fontSize",param:"3",icon:e.size3||e.size,tip:t.size3,htmlTip:''+t.size3+""},"size-4":{cmd:"fontSize",param:"4",icon:e.size4||e.size,tip:t.size4,htmlTip:''+t.size4+""},"size-5":{cmd:"fontSize",param:"5",icon:e.size5||e.size,tip:t.size5,htmlTip:''+t.size5+""},"size-6":{cmd:"fontSize",param:"6",icon:e.size6||e.size,tip:t.size6,htmlTip:''+t.size6+""},"size-7":{cmd:"fontSize",param:"7",icon:e.size7||e.size,tip:t.size7,htmlTip:''+t.size7+""}}},buttons:function(){var t=this,e=this.definitions||{},i=this.definitions||this.fonts?el(!0,{},this.buttonDef,e,function(t,e,i,s){void 0===s&&(s={});var n=Object.keys(s);if(0===n.length)return{};var o={default_font:{cmd:"fontName",param:t,icon:i,tip:e}};return n.forEach(function(t){var e=s[t];o[t]={cmd:"fontName",param:e,icon:i,tip:e,htmlTip:''+e+""}}),o}(this.defaultFont,this.$q.lang.editor.defaultFont,this.$q.iconSet.editor.font,this.fonts)):this.buttonDef;return this.toolbar.map(function(s){return s.map(function(s){if(s.options)return{type:"dropdown",icon:s.icon,label:s.label,size:"sm",dense:!0,fixedLabel:s.fixedLabel,fixedIcon:s.fixedIcon,highlight:s.highlight,list:s.list,options:s.options.map(function(t){return i[t]})};var n=i[s];return n?"no-state"===n.type||e[s]&&(void 0===n.cmd||t.buttonDef[n.cmd]&&"no-state"===t.buttonDef[n.cmd].type)?n:Object.assign({type:"toggle"},n):{type:"slot",slot:s}})})},keys:function(){var t={},e=function(e){e.key&&(t[e.key]={cmd:e.cmd,param:e.param})};return this.buttons.forEach(function(t){t.forEach(function(t){t.options?t.options.forEach(e):e(t)})}),t},innerStyle:function(){return this.inFullscreen?this.contentStyle:[{minHeight:this.minHeight,height:this.height,maxHeight:this.maxHeight},this.contentStyle]},innerClass:function(){return[this.contentClass,{col:this.inFullscreen,"overflow-auto":this.inFullscreen||this.maxHeight}]},attrs:function(){return!0===this.disable?{"aria-disabled":""}:!0===this.readonly?{"aria-readonly":""}:void 0}},data:function(){return{editWatcher:!0,editLinkUrl:null,isViewingSource:!1}},watch:{value:function(t){!0===this.editWatcher?this.__setContent(t):this.editWatcher=!0}},methods:{__onInput:function(){if(!0===this.editWatcher){var t=this.isViewingSource?this.$refs.content.innerText:this.$refs.content.innerHTML;t!==this.value&&(this.editWatcher=!1,this.$emit("input",t))}},__onKeydown:function(t){if(this.$emit("keydown",t),!0!==t.ctrlKey||!0===_r(t))return this.refreshToolbar(),void(this.$q.platform.is.ie&&this.$nextTick(this.__onInput));var e=t.keyCode,i=this.keys[e];if(void 0!==i){var s=i.cmd,n=i.param;nr(t),this.runCmd(s,n,!1)}},__onClick:function(t){this.refreshToolbar(),this.$emit("click",t)},__onBlur:function(){var t=this.$refs.content,e=t.scrollTop,i=t.scrollHeight;this.__offsetBottom=i-e,!0!==this.$q.platform.is.ie&&this.caret.save(),this.$emit("blur")},__onFocus:function(){var t=this;this.$nextTick(function(){void 0!==t.$refs.content&&void 0!==t.__offsetBottom&&(t.$refs.content.scrollTop=t.$refs.content.scrollHeight-t.__offsetBottom)})},__onMouseup:function(t){this.caret.save(),void 0!==this.$listeners.mouseup&&this.$emit("mouseup",t)},__onKeyup:function(t){this.caret.save(),void 0!==this.$listeners.keyup&&this.$emit("keyup",t)},__onTouchend:function(t){this.caret.save(),void 0!==this.$listeners.touchend&&this.$emit("touchend",t)},runCmd:function(t,e,i){var s=this;void 0===i&&(i=!0),this.focus(),this.caret.restore(),this.caret.apply(t,e,function(){s.focus(),s.caret.save(),!0!==s.$q.platform.is.ie&&!0!==s.$q.platform.is.edge||s.$nextTick(s.__onInput),i&&s.refreshToolbar()})},refreshToolbar:function(){var t=this;setTimeout(function(){t.editLinkUrl=null,t.$forceUpdate()},1)},focus:function(){this.$refs.content.focus()},getContentEl:function(){return this.$refs.content},__setContent:function(t){this.isViewingSource?this.$refs.content.innerText=t:this.$refs.content.innerHTML=t}},created:function(){!1===i&&(document.execCommand("defaultParagraphSeparator",!1,"div"),this.defaultFont=window.getComputedStyle(document.body).fontFamily)},mounted:function(){this.caret=new Di(this.$refs.content,this),this.__setContent(this.value),this.refreshToolbar()},render:function(t){var e;if(this.hasToolbar){var s=[];s.push(t("div",{key:"qedt_top",staticClass:"q-editor__toolbar row no-wrap scroll-x",class:this.toolbarBackgroundClass},Ga(t,this))),null!==this.editLinkUrl&&s.push(t("div",{key:"qedt_btm",staticClass:"q-editor__toolbar row no-wrap items-center scroll-x",class:this.toolbarBackgroundClass},function(t,e,i){if(e.caret){var s=e.toolbarColor||e.toolbarTextColor,n=e.editLinkUrl,o=function(){e.caret.restore(),n!==e.editLinkUrl&&document.execCommand("createLink",!1,""===n?" ":n),e.editLinkUrl=null,!0===i&&e.$nextTick(e.__onInput)};return[t("div",{staticClass:"q-mx-xs",class:"text-"+s},[e.$q.lang.editor.url+": "]),t(Bi,{key:"qedt_btm_input",staticClass:"q-ma-none q-pa-none col q-editor-input",props:{value:n,color:s,autofocus:!0,borderless:!0,dense:!0},on:{input:function(t){n=t},keydown:function(t){if(!0!==_r(t))switch(t.keyCode){case 13:return sr(t),o();case 27:sr(t),e.caret.restore(),e.editLinkUrl&&"https://"!==e.editLinkUrl||document.execCommand("unlink"),e.editLinkUrl=null}}}}),Ka(t,[t(Mt,{key:"qedt_btm_rem",attrs:{tabindex:-1},props:Object.assign({},e.buttonProps,{label:e.$q.lang.label.remove,noCaps:!0}),on:{click:function(){e.caret.restore(),document.execCommand("unlink"),e.editLinkUrl=null,!0===i&&e.$nextTick(e.__onInput)}}}),t(Mt,{key:"qedt_btm_upd",props:Object.assign({},e.buttonProps,{label:e.$q.lang.label.update,noCaps:!0}),on:{click:o}})])]}}(t,this,this.$q.platform.is.ie))),e=t("div",{key:"toolbar_ctainer",staticClass:"q-editor__toolbars-container"},s)}var n=Object.assign({},this.$listeners,{input:this.__onInput,keydown:this.__onKeydown,click:this.__onClick,blur:this.__onBlur,focus:this.__onFocus,mouseup:this.__onMouseup,keyup:this.__onKeyup,touchend:this.__onTouchend});return t("div",{staticClass:"q-editor",style:{height:!0===this.inFullscreen?"100vh":null},class:{disabled:this.disable,"fullscreen column":this.inFullscreen,"q-editor--square no-border-radius":this.square,"q-editor--flat":this.flat,"q-editor--dense":this.dense,"q-editor--dark q-dark":this.isDark},attrs:this.attrs},[e,t("div",{ref:"content",staticClass:"q-editor__content",style:this.innerStyle,class:this.innerClass,attrs:{contenteditable:this.editable},domProps:i?{innerHTML:this.value}:void 0,on:n})])}}),Ni=t.extend({name:"QItemLabel",props:{overline:Boolean,caption:Boolean,header:Boolean,lines:[Number,String]},computed:{classes:function(){return{"q-item__label--overline text-overline":this.overline,"q-item__label--caption text-caption":this.caption,"q-item__label--header":this.header,ellipsis:1===parseInt(this.lines,10)}},style:function(){if(void 0!==this.lines&&parseInt(this.lines,10)>1)return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":this.lines}}},render:function(t){return t("div",{staticClass:"q-item__label",style:this.style,class:this.classes,on:this.$listeners},$r(this,"default"))}}),ji=t.extend({name:"QSlideTransition",props:{appear:Boolean,duration:{type:Number,default:300}},methods:{__begin:function(t,e,i){t.style.overflowY="hidden",void 0!==e&&(t.style.height=e+"px"),t.style.transition="height "+this.duration+"ms cubic-bezier(.25, .8, .50, 1)",this.animating=!0,this.done=i},__end:function(t,e){t.style.overflowY=null,t.style.height=null,t.style.transition=null,this.__cleanup(),e!==this.lastEvent&&this.$emit(e)},__cleanup:function(){this.done&&this.done(),this.done=null,this.animating=!1,clearTimeout(this.timer),clearTimeout(this.timerFallback),void 0!==this.el&&this.el.removeEventListener("transitionend",this.animListener),this.animListener=null}},beforeDestroy:function(){this.animating&&this.__cleanup()},render:function(t){var e=this;return t("transition",{props:{css:!1,appear:this.appear},on:Hr(this,"tr",{enter:function(t,i){var s=0;e.el=t,!0===e.animating?(e.__cleanup(),s=t.offsetHeight===t.scrollHeight?0:void 0):e.lastEvent="hide",e.__begin(t,s,i),e.timer=setTimeout(function(){t.style.height=t.scrollHeight+"px",e.animListener=function(i){Object(i)===i&&i.target!==t||e.__end(t,"show")},t.addEventListener("transitionend",e.animListener),e.timerFallback=setTimeout(e.animListener,1.1*e.duration)},100)},leave:function(t,i){var s;e.el=t,!0===e.animating?e.__cleanup():(e.lastEvent="show",s=t.scrollHeight),e.__begin(t,s,i),e.timer=setTimeout(function(){t.style.height=0,e.animListener=function(i){Object(i)===i&&i.target!==t||e.__end(t,"hide")},t.addEventListener("transitionend",e.animListener),e.timerFallback=setTimeout(e.animListener,1.1*e.duration)},100)}})},$r(this,"default"))}}),Hi=t.extend({name:"QSeparator",mixins:[nt],props:{spaced:Boolean,inset:[Boolean,String],vertical:Boolean,color:String},computed:{insetClass:function(){switch(this.inset){case!0:return" q-separator--inset";case"item":return" q-separator--item-inset";case"item-thumbnail":return" q-separator--item-thumbnail-inset";default:return""}},classes:function(){return"q-separator"+this.insetClass+" q-separator--"+(!0===this.vertical?"vertical self-stretch":"horizontal col-grow")+(void 0!==this.color?" bg-"+this.color:"")+(!0===this.isDark?" q-separator--dark":"")+(!0===this.spaced?" q-separator--spaced":"")},attrs:function(){return{role:"separator","aria-orientation":!0===this.vertical?"vertical":"horizontal"}}},render:function(t){return t("hr",{staticClass:"q-separator",class:this.classes,attrs:this.attrs,on:this.$listeners})}}),Qi="q:expansion-item:close",Wi=t.extend({name:"QExpansionItem",mixins:[nt,pt,zt],props:{icon:String,label:String,labelLines:[Number,String],caption:String,captionLines:[Number,String],dense:Boolean,expandIcon:String,expandedIcon:String,expandIconClass:[Array,String,Object],duration:Number,headerInsetLevel:Number,contentInsetLevel:Number,expandSeparator:Boolean,defaultOpened:Boolean,expandIconToggle:Boolean,switchToggleSide:Boolean,denseToggle:Boolean,group:String,popup:Boolean,headerStyle:[Array,String,Object],headerClass:[Array,String,Object]},data:function(){return{showing:void 0!==this.value?this.value:this.defaultOpened}},watch:{showing:function(t){!0===t&&void 0!==this.group&&this.$root.$emit(Qi,this)},group:function(t,e){void 0!==t&&void 0===e?this.$root.$on(Qi,this.__eventHandler):void 0===t&&void 0!==e&&this.$root.$off(Qi,this.__eventHandler)}},computed:{classes:function(){return"q-expansion-item--"+(!0===this.showing?"expanded":"collapsed")+" q-expansion-item--"+(!0===this.popup?"popup":"standard")},contentStyle:function(){var t;if(void 0!==this.contentInsetLevel)return(t={})["padding"+(!0===this.$q.lang.rtl?"Right":"Left")]=56*this.contentInsetLevel+"px",t},isClickable:function(){return!0===this.hasRouterLink||!0!==this.expandIconToggle},expansionIcon:function(){return void 0!==this.expandedIcon&&!0===this.showing?this.expandedIcon:this.expandIcon||this.$q.iconSet.expansionItem[!0===this.denseToggle?"denseIcon":"icon"]},activeToggleIcon:function(){return!0!==this.disable&&(!0===this.hasRouterLink||!0===this.expandIconToggle)}},methods:{__onHeaderClick:function(t){!0!==this.hasRouterLink&&this.toggle(t),this.$emit("click",t)},__toggleIconKeyboard:function(t){13===t.keyCode&&this.__toggleIcon(t,!0)},__toggleIcon:function(t,e){!0!==e&&void 0!==this.$refs.blurTarget&&this.$refs.blurTarget.focus(),this.toggle(t),nr(t)},__eventHandler:function(t){this!==t&&this.group===t.group&&this.hide()},__getToggleIcon:function(t){var e={staticClass:"q-focusable relative-position cursor-pointer"+(!0===this.denseToggle&&!0===this.switchToggleSide?" items-end":""),class:this.expandIconClass,props:{side:!0!==this.switchToggleSide,avatar:this.switchToggleSide}},i=[t(et,{staticClass:"q-expansion-item__toggle-icon",class:void 0===this.expandedIcon&&!0===this.showing?"q-expansion-item__toggle-icon--rotated":void 0,props:{name:this.expansionIcon}})];return!0===this.activeToggleIcon&&(Object.assign(e,{attrs:{tabindex:0},on:Hr(this,"inpExt",{click:this.__toggleIcon,keyup:this.__toggleIconKeyboard})}),i.unshift(t("div",{ref:"blurTarget",staticClass:"q-expansion-item__toggle-focus q-icon q-focus-helper q-focus-helper--rounded",attrs:{tabindex:-1}}))),t(Oi,e,i)},__getHeader:function(t){var e;void 0!==this.$scopedSlots.header?e=this.$scopedSlots.header().slice():(e=[t(Oi,[t(Ni,{props:{lines:this.labelLines}},[this.label||""]),this.caption?t(Ni,{props:{lines:this.captionLines,caption:!0}},[this.caption]):null])],this.icon&&e[!0===this.switchToggleSide?"push":"unshift"](t(Oi,{props:{side:!0===this.switchToggleSide,avatar:!0!==this.switchToggleSide}},[t(et,{props:{name:this.icon}})]))),!0!==this.disable&&e[!0===this.switchToggleSide?"unshift":"push"](this.__getToggleIcon(t));var i={ref:"item",style:this.headerStyle,class:this.headerClass,props:{dark:this.isDark,disable:this.disable,dense:this.dense,insetLevel:this.headerInsetLevel}};if(!0===this.isClickable){var s=!0===this.hasRouterLink?"nativeOn":"on";i.props.clickable=!0,i[s]=Object.assign({},this.$listeners,{click:this.__onHeaderClick}),!0===this.hasRouterLink&&Object.assign(i.props,this.routerLinkProps)}return t(zi,i,e)},__getContent:function(t){var e=this,i=[this.__getHeader(t),t(ji,{props:{duration:this.duration},on:Hr(this,"slide",{show:function(){e.$emit("after-show")},hide:function(){e.$emit("after-hide")}})},[t("div",{staticClass:"q-expansion-item__content relative-position",style:this.contentStyle,directives:[{name:"show",value:this.showing}]},$r(this,"default"))])];return this.expandSeparator&&i.push(t(Hi,{staticClass:"q-expansion-item__border q-expansion-item__border--top absolute-top",props:{dark:this.isDark}}),t(Hi,{staticClass:"q-expansion-item__border q-expansion-item__border--bottom absolute-bottom",props:{dark:this.isDark}})),i}},render:function(t){return t("div",{staticClass:"q-expansion-item q-item-type",class:this.classes},[t("div",{staticClass:"q-expansion-item__container relative-position"},this.__getContent(t))])},created:function(){void 0!==this.group&&this.$root.$on(Qi,this.__eventHandler)},beforeDestroy:function(){void 0!==this.group&&this.$root.$off(Qi,this.__eventHandler)}}),Yi=["top","right","bottom","left"],Ui={props:{type:{type:String,default:"a"},outline:Boolean,push:Boolean,flat:Boolean,unelevated:Boolean,color:String,textColor:String,glossy:Boolean,square:Boolean,label:{type:[String,Number],default:""},labelPosition:{type:String,default:"right",validator:function(t){return Yi.includes(t)}},externalLabel:Boolean,hideLabel:Boolean,labelClass:[Array,String,Object],labelStyle:[Array,String,Object],disable:Boolean},computed:{formClass:function(){return"q-fab--form-"+(!0===this.square?"square":"rounded")},stacked:function(){return!1===this.externalLabel&&["top","bottom"].includes(this.labelPosition)},labelProps:function(){if(!0===this.externalLabel){var t=null===this.hideLabel?!1===this.showing:this.hideLabel;return{action:"push",data:{staticClass:"q-fab__label q-tooltip--style q-fab__label--external q-fab__label--external-"+this.labelPosition+(!0===t?" q-fab__label--external-hidden":""),style:this.labelStyle,class:this.labelClass}}}return{action:["left","top"].includes(this.labelPosition)?"unshift":"push",data:{staticClass:"q-fab__label q-fab__label--internal q-fab__label--internal-"+this.labelPosition+(!0===this.hideLabel?" q-fab__label--internal-hidden":""),style:this.labelStyle,class:this.labelClass}}}}},Ki=["up","right","down","left"],Xi=["left","center","right"],Gi=t.extend({name:"QFab",mixins:[Ui,zt],provide:function(){var t=this;return{__qFabClose:function(e){t.hide(e),t.$refs.trigger&&t.$refs.trigger.$el&&t.$refs.trigger.$el.focus()}}},props:{icon:String,activeIcon:String,hideLabel:{default:null},direction:{type:String,default:"right",validator:function(t){return Ki.includes(t)}},persistent:Boolean,verticalActionsAlign:{type:String,default:"center",validator:function(t){return Xi.includes(t)}}},data:function(){return{showing:!0===this.value}},computed:{hideOnRouteChange:function(){return!0!==this.persistent},classes:function(){return"q-fab--align-"+this.verticalActionsAlign+" "+this.formClass+(!0===this.showing?" q-fab--opened":"")}},render:function(t){var e=[t("div",{staticClass:"q-fab__icon-holder"},[t(et,{staticClass:"q-fab__icon absolute-full",props:{name:this.icon||this.$q.iconSet.fab.icon}}),t(et,{staticClass:"q-fab__active-icon absolute-full",props:{name:this.activeIcon||this.$q.iconSet.fab.activeIcon}})])];return""!==this.label&&e[this.labelProps.action](t("div",this.labelProps.data,[this.label])),t("div",{staticClass:"q-fab z-fab row inline justify-center",class:this.classes,on:this.$listeners},[t("div",{staticClass:"q-fab__actions flex no-wrap inline",class:"q-fab__actions--"+this.direction},$r(this,"default")),t(Mt,{ref:"trigger",class:this.formClass,props:Object.assign({},this.$props,{noWrap:!0,stack:this.stacked,align:void 0,icon:void 0,label:void 0,noCaps:!0,fab:!0}),on:Hr(this,"tog",{click:this.toggle})},Mr(e,this,"tooltip"))])}}),Zi={start:"self-end",center:"self-center",end:"self-start"},Ji=Object.keys(Zi),ts=t.extend({name:"QFabAction",mixins:[Ui],props:{icon:{type:String,required:!0},anchor:{type:String,validator:function(t){return Ji.includes(t)}},to:[String,Object],replace:Boolean},inject:{__qFabClose:{default:function(){console.error("QFabAction needs to be child of QFab")}}},computed:{classes:function(){var t=Zi[this.anchor];return this.formClass+(void 0!==t?" "+t:"")}},methods:{click:function(t){this.__qFabClose(),this.$emit("click",t)}},render:function(t){var e=[t(et,{props:{name:this.icon}})];return""!==this.label&&e[this.labelProps.action](t("div",this.labelProps.data,[this.label])),t(Mt,{class:this.classes,props:Object.assign({},this.$props,{noWrap:!0,stack:this.stacked,icon:void 0,label:void 0,noCaps:!0,fabMini:!0}),on:Object.assign({},this.$listeners,{click:this.click})},Mr(e,this,"default"))}}),es=t.extend({name:"QFile",mixins:[vi,gi,Yt,_i],props:{value:!0===i?{}:[File,FileList,Array],useChips:Boolean,displayValue:[String,Number],maxFiles:[Number,String],tabindex:{type:[String,Number],default:0},counterLabel:Function,inputClass:[Array,String,Object],inputStyle:[Array,String,Object]},data:function(){return{dnd:!1}},computed:{innerValue:function(){return Object(this.value)===this.value?"length"in this.value?Array.from(this.value):[this.value]:[]},selectedString:function(){return this.innerValue.map(function(t){return t.name}).join(", ")},totalSize:function(){return wr(this.innerValue.reduce(function(t,e){return t+e.size},0))},counterProps:function(){return{totalSize:this.totalSize,filesNumber:this.innerValue.length,maxFiles:this.maxFiles}},computedCounter:function(){if(void 0!==this.counterLabel)return this.counterLabel(this.counterProps);var t=this.maxFiles;return this.innerValue.length+(void 0!==t?" / "+t:"")+" ("+this.totalSize+")"}},methods:{removeAtIndex:function(t){var e=this.innerValue.slice();e.splice(t,1),this.__emitValue(e)},removeFile:function(t){var e=this.innerValue.findIndex(t);e>-1&&this.removeAtIndex(e)},__emitValue:function(t){this.$emit("input",!0===this.multiple?t:t[0])},__onKeyup:function(t){13===t.keyCode&&this.pickFiles(t)},__getFileInput:function(){return this.$refs.input},__addFiles:function(t,e){var i=this.__processFiles(t,e);void 0!==i&&this.__emitValue(void 0!==this.maxFiles?i.slice(0,parseInt(this.maxFiles,10)):i)},__getControl:function(t){var e={ref:"target",staticClass:"q-field__native row items-center cursor-pointer",attrs:{tabindex:this.tabindex}};return!0===this.editable&&(e.on=Hr(this,"native",{dragover:this.__onDragOver,keyup:this.__onKeyup})),t("div",e,[this.__getInput(t)].concat(this.__getSelection(t)))},__getControlChild:function(t){return this.__getDnd(t,"file")},__getSelection:function(t){var e=this;return void 0!==this.$scopedSlots.file?this.innerValue.map(function(t,i){return e.$scopedSlots.file({index:i,file:t,ref:e})}):void 0!==this.$scopedSlots.selected?this.$scopedSlots.selected({files:this.innerValue,ref:this}):!0===this.useChips?this.innerValue.map(function(i,s){return t(fe,{key:"file-"+s,props:{removable:e.editable,dense:!0,textColor:e.color,tabindex:e.tabindex},on:Hr(e,"rem#"+s,{remove:function(){e.removeAtIndex(s)}})},[t("span",{staticClass:"ellipsis",domProps:{textContent:i.name}})])}):[t("div",{style:this.inputStyle,class:this.inputClass,domProps:{textContent:void 0!==this.displayValue?this.displayValue:this.selectedString}})]},__getInput:function(t){var e={ref:"input",staticClass:"q-field__input fit absolute-full cursor-pointer",attrs:Object.assign({},{tabindex:-1,type:"file",title:"",accept:this.accept,name:this.nameProp},this.$attrs,{id:this.targetUid,disabled:!0!==this.editable}),domProps:this.formDomProps,on:Hr(this,"input",{change:this.__addFiles})};return!0===this.multiple&&(e.attrs.multiple=!0),t("input",e)}},created:function(){this.fieldClass="q-file q-field--auto-height",this.type="file"}}),is=t.extend({name:"QFooter",inject:{layout:{default:function(){console.error("QFooter needs to be child of QLayout")}}},props:{value:{type:Boolean,default:!0},reveal:Boolean,bordered:Boolean,elevated:Boolean,heightHint:{type:[String,Number],default:50}},data:function(){return{size:parseInt(this.heightHint,10),revealed:!0,windowHeight:n||this.layout.container?0:window.innerHeight}},watch:{value:function(t){this.__update("space",t),this.__updateLocal("revealed",!0),this.layout.__animate()},offset:function(t){this.__update("offset",t)},reveal:function(t){!1===t&&this.__updateLocal("revealed",this.value)},revealed:function(t){this.layout.__animate(),this.$emit("reveal",t)},"layout.scroll":function(){this.__updateRevealed()},"layout.height":function(){this.__updateRevealed()},size:function(){this.__updateRevealed()},"$q.screen.height":function(t){!0!==this.layout.container&&this.__updateLocal("windowHeight",t)}},computed:{fixed:function(){return!0===this.reveal||this.layout.view.indexOf("F")>-1||!0===this.layout.container},containerHeight:function(){return!0===this.layout.container?this.layout.containerHeight:this.windowHeight},offset:function(){if(!0!==this.value)return 0;if(!0===this.fixed)return!0===this.revealed?this.size:0;var t=this.layout.scroll.position+this.containerHeight+this.size-this.layout.height;return t>0?t:0},classes:function(){return(!0===this.fixed?"fixed":"absolute")+"-bottom"+(!0===this.value||!0===this.fixed?"":" hidden")+(!0===this.bordered?" q-footer--bordered":"")+(!0!==this.value||!0===this.fixed&&!0!==this.revealed?" q-footer--hidden":"")},style:function(){var t=this.layout.rows.bottom,e={};return"l"===t[0]&&!0===this.layout.left.space&&(e[!0===this.$q.lang.rtl?"right":"left"]=this.layout.left.size+"px"),"r"===t[2]&&!0===this.layout.right.space&&(e[!0===this.$q.lang.rtl?"left":"right"]=this.layout.right.size+"px"),e}},render:function(t){var e=[t(Pe,{props:{debounce:0},on:Hr(this,"resize",{resize:this.__onResize})})];return!0===this.elevated&&e.push(t("div",{staticClass:"q-layout__shadow absolute-full overflow-hidden no-pointer-events"})),t("footer",{staticClass:"q-footer q-layout__section--marginal",class:this.classes,style:this.style,on:Object.assign({},this.$listeners,{input:ir})},Mr(e,this,"default"))},created:function(){this.layout.instances.footer=this,!0===this.value&&this.__update("size",this.size),this.__update("space",this.value),this.__update("offset",this.offset)},beforeDestroy:function(){this.layout.instances.footer===this&&(this.layout.instances.footer=void 0,this.__update("size",0),this.__update("offset",0),this.__update("space",!1))},methods:{__onResize:function(t){var e=t.height;this.__updateLocal("size",e),this.__update("size",e)},__update:function(t,e){this.layout.footer[t]!==e&&(this.layout.footer[t]=e)},__updateLocal:function(t,e){this[t]!==e&&(this[t]=e)},__updateRevealed:function(){if(!0===this.reveal){var t=this.layout.scroll,e=t.direction,i=t.position,s=t.inflexionPosition;this.__updateLocal("revealed","up"===e||i-s<100||this.layout.height-this.containerHeight-i-this.size<300)}}}}),ss=t.extend({name:"QForm",props:{autofocus:Boolean,noErrorFocus:Boolean,noResetFocus:Boolean,greedy:Boolean},mounted:function(){this.validateIndex=0,!0===this.autofocus&&this.focus()},methods:{validate:function(t){var e=this,i=[],s="boolean"==typeof t?t:!0!==this.noErrorFocus;this.validateIndex++;for(var n=jr(this),o=function(t){e.$emit("validation-"+(!0===t?"success":"error"))},r=function(t){var r=n[t];if("function"==typeof r.validate){var a=r.validate();if("function"==typeof a.then)i.push(a.then(function(t){return{valid:t,comp:r}},function(t){return{valid:!1,comp:r,error:t}}));else if(!0!==a){if(!1===e.greedy)return o(!1),!0===s&&"function"==typeof r.focus&&r.focus(),{v:Promise.resolve(!1)};i.push({valid:!1,comp:r})}}},a=0;a-1});null!==t&&void 0!==t&&t.focus()}},render:function(t){return t("form",{staticClass:"q-form",on:Object.assign({},this.$listeners,{submit:this.submit,reset:this.reset})},$r(this,"default"))}}),ns=t.extend({name:"QHeader",inject:{layout:{default:function(){console.error("QHeader needs to be child of QLayout")}}},props:{value:{type:Boolean,default:!0},reveal:Boolean,revealOffset:{type:Number,default:250},bordered:Boolean,elevated:Boolean,heightHint:{type:[String,Number],default:50}},data:function(){return{size:parseInt(this.heightHint,10),revealed:!0}},watch:{value:function(t){this.__update("space",t),this.__updateLocal("revealed",!0),this.layout.__animate()},offset:function(t){this.__update("offset",t)},reveal:function(t){!1===t&&this.__updateLocal("revealed",this.value)},revealed:function(t){this.layout.__animate(),this.$emit("reveal",t)},"layout.scroll":function(t){!0===this.reveal&&this.__updateLocal("revealed","up"===t.direction||t.position<=this.revealOffset||t.position-t.inflexionPosition<100)}},computed:{fixed:function(){return!0===this.reveal||this.layout.view.indexOf("H")>-1||!0===this.layout.container},offset:function(){if(!0!==this.value)return 0;if(!0===this.fixed)return!0===this.revealed?this.size:0;var t=this.size-this.layout.scroll.position;return t>0?t:0},classes:function(){return(!0===this.fixed?"fixed":"absolute")+"-top"+(!0===this.bordered?" q-header--bordered":"")+(!0!==this.value||!0===this.fixed&&!0!==this.revealed?" q-header--hidden":"")},style:function(){var t=this.layout.rows.top,e={};return"l"===t[0]&&!0===this.layout.left.space&&(e[!0===this.$q.lang.rtl?"right":"left"]=this.layout.left.size+"px"),"r"===t[2]&&!0===this.layout.right.space&&(e[!0===this.$q.lang.rtl?"left":"right"]=this.layout.right.size+"px"),e}},render:function(t){var e=Mr([t(Pe,{props:{debounce:0},on:Hr(this,"resize",{resize:this.__onResize})})],this,"default");return!0===this.elevated&&e.push(t("div",{staticClass:"q-layout__shadow absolute-full overflow-hidden no-pointer-events"})),t("header",{staticClass:"q-header q-layout__section--marginal",class:this.classes,style:this.style,on:Object.assign({},this.$listeners,{input:ir})},e)},created:function(){this.layout.instances.header=this,!0===this.value&&this.__update("size",this.size),this.__update("space",this.value),this.__update("offset",this.offset)},beforeDestroy:function(){this.layout.instances.header===this&&(this.layout.instances.header=void 0,this.__update("size",0),this.__update("offset",0),this.__update("space",!1))},methods:{__onResize:function(t){var e=t.height;this.__updateLocal("size",e),this.__update("size",e)},__update:function(t,e){this.layout.header[t]!==e&&(this.layout.header[t]=e)},__updateLocal:function(t,e){this[t]!==e&&(this[t]=e)}}}),os={props:{ratio:[String,Number]},computed:{ratioStyle:function(){var t=this.ratio||this.naturalRatio;if(void 0!==t)return{paddingBottom:100/t+"%"}}}},rs=t.extend({name:"QImg",mixins:[os],props:{src:String,srcset:String,sizes:String,alt:String,width:String,height:String,placeholderSrc:String,basic:Boolean,contain:Boolean,position:{type:String,default:"50% 50%"},transition:{type:String,default:"fade"},imgClass:[Array,String,Object],imgStyle:Object,nativeContextMenu:Boolean,noDefaultSpinner:Boolean,spinnerColor:String,spinnerSize:String},data:function(){return{currentSrc:"",image:null,isLoading:!!this.src,hasError:!1,naturalRatio:void 0}},watch:{src:function(){this.__load()},srcset:function(t){this.__updateWatcher(t)}},computed:{url:function(){return this.currentSrc||this.placeholderSrc||void 0},attrs:function(){var t={role:"img"};return void 0!==this.alt&&(t["aria-label"]=this.alt),t},imgContainerStyle:function(){return Object.assign({backgroundSize:!0===this.contain?"contain":"cover",backgroundPosition:this.position},this.imgStyle,{backgroundImage:'url("'+this.url+'")'})},style:function(){return{width:this.width,height:this.height}},classes:function(){return"q-img overflow-hidden"+(!0===this.nativeContextMenu?" q-img--menu":"")}},methods:{__onLoad:function(t){this.isLoading=!1,this.hasError=!1,this.__computeRatio(t),this.__updateSrc(),this.__updateWatcher(this.srcset),this.$emit("load",this.currentSrc)},__onError:function(t){clearTimeout(this.ratioTimer),this.isLoading=!1,this.hasError=!0,this.currentSrc="",this.$emit("error",t)},__updateSrc:function(){if(void 0!==this.image&&!1===this.isLoading){var t=this.image.currentSrc||this.image.src;this.currentSrc!==t&&(this.currentSrc=t)}},__updateWatcher:function(t){t?void 0===this.unwatch&&(this.unwatch=this.$watch("$q.screen.width",this.__updateSrc)):void 0!==this.unwatch&&(this.unwatch(),this.unwatch=void 0)},__load:function(){var t=this;if(clearTimeout(this.ratioTimer),this.hasError=!1,!this.src)return this.isLoading=!1,this.image=void 0,void(this.currentSrc="");this.isLoading=!0;var e=new Image;this.image=e,e.onerror=function(i){t.image===e&&!0!==t.destroyed&&t.__onError(i)},e.onload=function(){!0!==t.destroyed&&t.image===e&&(void 0!==e.decode?e.decode().catch(function(i){t.image===e&&!0!==t.destroyed&&t.__onError(i)}).then(function(){t.image===e&&!0!==t.destroyed&&t.__onLoad(e)}):t.__onLoad(e))},e.src=this.src,this.srcset&&(e.srcset=this.srcset),void 0!==this.sizes?e.sizes=this.sizes:Object.assign(e,{height:this.height,width:this.width})},__computeRatio:function(t){var e=this,i=t.naturalHeight,s=t.naturalWidth;i||s?this.naturalRatio=0===i?1:s/i:this.ratioTimer=setTimeout(function(){e.image===t&&!0!==e.destroyed&&e.__computeRatio(t)},100)},__getImage:function(t){var e=!0===this.nativeContextMenu?[t("img",{staticClass:"absolute-full fit",attrs:{src:this.url}})]:void 0,i=void 0!==this.url?t("div",{key:this.url,staticClass:"q-img__image absolute-full",class:this.imgClass,style:this.imgContainerStyle},e):null;return!0===this.basic?i:t("transition",{props:{name:"q-transition--"+this.transition}},[i])},__getContent:function(t){var e=$r(this,!0===this.hasError?"error":"default");return!0===this.basic?t("div",{key:"content",staticClass:"q-img__content absolute-full"},e):t("transition",{props:{name:"q-transition--fade"}},[!0===this.isLoading?t("div",{key:"placeholder",staticClass:"q-img__loading absolute-full flex flex-center"},void 0!==this.$scopedSlots.loading?this.$scopedSlots.loading():!1===this.noDefaultSpinner?[t(vt,{props:{color:this.spinnerColor,size:this.spinnerSize}})]:void 0):t("div",{key:"content",staticClass:"q-img__content absolute-full"},e)])}},render:function(t){return t("div",{class:this.classes,style:this.style,attrs:this.attrs,on:this.$listeners},[t("div",{style:this.ratioStyle}),this.__getImage(t),this.__getContent(t)])},beforeMount:function(){if(void 0!==this.placeholderSrc&&void 0===this.ratio){var t=new Image;t.src=this.placeholderSrc,this.__computeRatio(t)}!0===this.isLoading&&this.__load()},beforeDestroy:function(){this.destroyed=!0,clearTimeout(this.ratioTimer),void 0!==this.unwatch&&this.unwatch()}}),as=t.extend({name:"QInfiniteScroll",props:{offset:{type:Number,default:500},debounce:{type:[String,Number],default:100},scrollTarget:{default:void 0},disable:Boolean,reverse:Boolean},data:function(){return{index:0,fetching:!1,working:!0}},watch:{disable:function(t){!0===t?this.stop():this.resume()},scrollTarget:function(){this.updateScrollTarget()},debounce:function(t){this.__setDebounce(t)}},methods:{poll:function(){if(!0!==this.disable&&!0!==this.fetching&&!1!==this.working){var t=Ur(this.scrollContainer),e=Kr(this.scrollContainer),i=Lr(this.scrollContainer);!1===this.reverse?e+i+this.offset>=t&&this.trigger():e=0}},tabindex:{type:[Number,String],default:0},disable:Boolean,readonly:Boolean},data:function(){return{model:this.value,dragging:!1}},watch:{value:function(t){if(tthis.max))return void(t!==this.model&&(this.model=t));this.model=this.max}this.model!==this.value&&(this.$emit("input",this.model),this.$emit("change",this.model))}},computed:{classes:function(){return{disabled:this.disable,"q-knob--editable":this.editable}},editable:function(){return!this.disable&&!this.readonly},decimals:function(){return(String(this.step).trim("0").split(".")[1]||"").length},computedStep:function(){return 0===this.step?1:this.step},events:function(){return!0===this.$q.platform.is.mobile?{click:this.__click}:{mousedown:this.__activate,click:this.__click,keydown:this.__keydown,keyup:this.__keyup}},attrs:function(){var t={role:"slider","aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":this.value};return!0===this.editable?t.tabindex=this.tabindex:t["aria-"+(!0===this.disable?"disabled":"readonly")]="",t}},methods:{__updateCenterPosition:function(){var t=this.$el.getBoundingClientRect(),e=t.top,i=t.left,s=t.width,n=t.height;this.centerPosition={top:e+n/2,left:i+s/2}},__pan:function(t){t.isFinal?(this.__updatePosition(t.evt,!0),this.dragging=!1):t.isFirst?(this.__updateCenterPosition(),this.dragging=!0,this.__updatePosition(t.evt)):this.__updatePosition(t.evt)},__click:function(t){this.__updateCenterPosition(),this.__updatePosition(t,!0)},__keydown:function(t){if(ds.includes(t.keyCode)){nr(t);var e=([34,33].includes(t.keyCode)?10:1)*this.computedStep,i=[34,37,40].includes(t.keyCode)?-e:e;this.model=Cr(parseFloat((this.model+i).toFixed(this.decimals)),this.min,this.max),this.__updateValue()}},__keyup:function(t){ds.includes(t.keyCode)&&this.__updateValue(!0)},__activate:function(t){this.__updateCenterPosition(),this.__updatePosition(t),this.__updateValue()},__updatePosition:function(t,e){var i=this.centerPosition,s=tr(t),n=Math.abs(s.top-i.top),o=Math.sqrt(Math.pow(n,2)+Math.pow(Math.abs(s.left-i.left),2)),r=Math.asin(n/o)*(180/Math.PI);r=s.top=l/2?(c<0?-1:1)*l:0),a=parseFloat(a.toFixed(this.decimals))}a=Cr(a,this.min,this.max),this.$emit("drag-value",a),this.model!==a&&(this.model=a),this.__updateValue(e)},__updateValue:function(t){this.value!==this.model&&this.$emit("input",this.model),!0===t&&this.$emit("change",this.model)},__getNameInput:function(){return this.$createElement("input",{attrs:this.formAttrs})}},render:function(t){var e={staticClass:"q-knob non-selectable",class:this.classes,attrs:this.attrs,props:Object.assign({},this.$props,{value:this.model,instantFeedback:this.dragging})};return!0===this.editable&&(e.on=this.events,e.directives=Hr(this,"dir",[{name:"touch-pan",value:this.__pan,modifiers:{prevent:!0,stop:!0,mouse:!0}}]),void 0!==this.name&&(e.scopedSlots={internal:this.__getNameInput})),t(ge,e,$r(this,"default"))}}),fs=h.passive,ms=t.extend({name:"QScrollObserver",props:{debounce:[String,Number],horizontal:Boolean,scrollTarget:{default:void 0}},render:Zo,data:function(){return{pos:0,dir:!0===this.horizontal?"right":"down",dirChanged:!1,dirChangePos:0}},watch:{scrollTarget:function(){this.__unconfigureScrollTarget(),this.__configureScrollTarget()}},methods:{getPosition:function(){return{position:this.pos,direction:this.dir,directionChanged:this.dirChanged,inflexionPosition:this.dirChangePos}},trigger:function(t){!0===t||0===this.debounce||"0"===this.debounce?this.__emit():this.timer||(this.timer=this.debounce?setTimeout(this.__emit,this.debounce):requestAnimationFrame(this.__emit))},__emit:function(){var t=!0===this.horizontal?Xr:Kr,e=Math.max(0,t(this.__scrollTarget)),i=e-this.pos,s=!0===this.horizontal?i<0?"left":"right":i<0?"up":"down";this.dirChanged=this.dir!==s,this.dirChanged&&(this.dir=s,this.dirChangePos=this.pos),this.timer=null,this.pos=e,this.$emit("scroll",this.getPosition())},__configureScrollTarget:function(){this.__scrollTarget=Yr(this.$el.parentNode,this.scrollTarget),this.__scrollTarget.addEventListener("scroll",this.trigger,fs),this.trigger(!0)},__unconfigureScrollTarget:function(){void 0!==this.__scrollTarget&&(this.__scrollTarget.removeEventListener("scroll",this.trigger,fs),this.__scrollTarget=void 0)}},mounted:function(){this.__configureScrollTarget()},beforeDestroy:function(){clearTimeout(this.timer),cancelAnimationFrame(this.timer),this.__unconfigureScrollTarget()}}),vs=t.extend({name:"QLayout",provide:function(){return{layout:this}},props:{container:Boolean,view:{type:String,default:"hhh lpr fff",validator:function(t){return/^(h|l)h(h|r) lpr (f|l)f(f|r)$/.test(t.toLowerCase())}}},data:function(){return{height:this.$q.screen.height,width:!0===this.container?0:this.$q.screen.width,containerHeight:0,scrollbarWidth:!0===n?0:sa(),header:{size:0,offset:0,space:!1},right:{size:300,offset:0,space:!1},footer:{size:0,offset:0,space:!1},left:{size:300,offset:0,space:!1},scroll:{position:0,direction:"down"}}},computed:{rows:function(){var t=this.view.toLowerCase().split(" ");return{top:t[0].split(""),middle:t[1].split(""),bottom:t[2].split("")}},style:function(){return!0===this.container?null:{minHeight:this.$q.screen.height+"px"}},targetStyle:function(){var t;if(0!==this.scrollbarWidth)return(t={})[!0===this.$q.lang.rtl?"left":"right"]=this.scrollbarWidth+"px",t},targetChildStyle:function(){var t;if(0!==this.scrollbarWidth)return(t={})[!0===this.$q.lang.rtl?"right":"left"]=0,t[!0===this.$q.lang.rtl?"left":"right"]="-"+this.scrollbarWidth+"px",t.width="calc(100% + "+this.scrollbarWidth+"px)",t},totalWidth:function(){return this.width+this.scrollbarWidth},classes:function(){return"q-layout q-layout--"+(!0===this.container?"containerized":"standard")}},created:function(){this.instances={}},render:function(t){var e=t("div",{class:this.classes,style:this.style,on:this.$listeners},Mr([t(ms,{on:Hr(this,"scroll",{scroll:this.__onPageScroll})}),t(Pe,{on:Hr(this,"resizeOut",{resize:this.__onPageResize})})],this,"default"));return!0===this.container?t("div",{staticClass:"q-layout-container overflow-hidden"},[t(Pe,{on:Hr(this,"resizeIn",{resize:this.__onContainerResize})}),t("div",{staticClass:"absolute-full",style:this.targetStyle},[t("div",{staticClass:"scroll",style:this.targetChildStyle},[e])])]):e},methods:{__animate:function(){var t=this;void 0!==this.timer?clearTimeout(this.timer):document.body.classList.add("q-body--layout-animate"),this.timer=setTimeout(function(){document.body.classList.remove("q-body--layout-animate"),t.timer=void 0},150)},__onPageScroll:function(t){this.scroll=t,void 0!==this.$listeners.scroll&&this.$emit("scroll",t)},__onPageResize:function(t){var e=t.height,i=t.width,s=!1;this.height!==e&&(s=!0,this.height=e,void 0!==this.$listeners["scroll-height"]&&this.$emit("scroll-height",e),this.__updateScrollbarWidth()),this.width!==i&&(s=!0,this.width=i),!0===s&&void 0!==this.$listeners.resize&&this.$emit("resize",{height:e,width:i})},__onContainerResize:function(t){var e=t.height;this.containerHeight!==e&&(this.containerHeight=e,this.__updateScrollbarWidth())},__updateScrollbarWidth:function(){if(!0===this.container){var t=this.height>this.containerHeight?sa():0;this.scrollbarWidth!==t&&(this.scrollbarWidth=t)}}}}),gs=t.extend({name:"QMarkupTable",mixins:[nt],props:{dense:Boolean,flat:Boolean,bordered:Boolean,square:Boolean,separator:{type:String,default:"horizontal",validator:function(t){return["horizontal","vertical","cell","none"].includes(t)}},wrapCells:Boolean},computed:{classes:function(){return"q-table--"+this.separator+"-separator"+(!0===this.isDark?" q-table--dark q-table__card--dark q-dark":"")+(!0===this.dense?" q-table--dense":"")+(!0===this.flat?" q-table--flat":"")+(!0===this.bordered?" q-table--bordered":"")+(!0===this.square?" q-table--square":"")+(!1===this.wrapCells?" q-table--no-wrap":"")}},render:function(t){return t("div",{staticClass:"q-markup-table q-table__container q-table__card",class:this.classes,on:this.$listeners},[t("table",{staticClass:"q-table"},$r(this,"default"))])}}),_s=t.extend({name:"QNoSsr",mixins:[Be,tt],props:{placeholder:String},render:function(t){var e={on:this.$listeners};if(!0===this.canRender){var i=$r(this,"default");return void 0===i?i:i.length>1?t(this.tag,e,i):i[0]}e.staticClass="q-no-ssr-placeholder";var s=$r(this,"placeholder");return void 0!==s?s.length>1?t(this.tag,e,s):s[0]:void 0!==this.placeholder?t(this.tag,e,[this.placeholder]):void 0}}),bs=t.extend({name:"QRadio",mixins:[nt,ue,Wt,he],props:{value:{required:!0},val:{required:!0},label:String,leftLabel:Boolean,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},computed:{isTrue:function(){return this.value===this.val},classes:function(){return"q-radio cursor-pointer no-outline row inline no-wrap items-center"+(!0===this.disable?" disabled":"")+(!0===this.isDark?" q-radio--dark":"")+(!0===this.dense?" q-radio--dense":"")+(!0===this.leftLabel?" reverse":"")},innerClass:function(){var t=void 0===this.color||!0!==this.keepColor&&!0!==this.isTrue?"":" text-"+this.color;return"q-radio__inner--"+(!0===this.isTrue?"truthy":"falsy")+t},computedTabindex:function(){return!0===this.disable?-1:this.tabindex||0},formAttrs:function(){var t={type:"radio"};return void 0!==this.name&&Object.assign(t,{name:this.name,value:this.val}),t},formDomProps:function(){if(void 0!==this.name&&!0===this.isTrue)return{checked:!0}},attrs:function(){var t={tabindex:this.computedTabindex,role:"radio","aria-label":this.label,"aria-checked":!0===this.isTrue?"true":"false"};return!0===this.disable&&(t["aria-disabled"]=""),t}},methods:{set:function(t){void 0!==t&&(nr(t),this.__refocusTarget(t)),!0!==this.disable&&!0!==this.isTrue&&this.$emit("input",this.val)}},render:function(t){var e=this,i=[t("svg",{staticClass:"q-radio__bg absolute",attrs:{focusable:"false",viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,22a10,10 0 0 1 -10,-10a10,10 0 0 1 10,-10a10,10 0 0 1 10,10a10,10 0 0 1 -10,10m0,-22a12,12 0 0 0 -12,12a12,12 0 0 0 12,12a12,12 0 0 0 12,-12a12,12 0 0 0 -12,-12"}}),t("path",{staticClass:"q-radio__check",attrs:{d:"M12,6a6,6 0 0 0 -6,6a6,6 0 0 0 6,6a6,6 0 0 0 6,-6a6,6 0 0 0 -6,-6"}})])];!0!==this.disable&&this.__injectFormInput(i,"unshift","q-radio__native q-ma-none q-pa-none invisible");var s=[t("div",{staticClass:"q-radio__inner relative-position no-pointer-events",class:this.innerClass,style:this.sizeStyle},i)];void 0!==this.__refocusTargetEl&&s.push(this.__refocusTargetEl);var n=void 0!==this.label?Mr([this.label],this,"default"):$r(this,"default");return void 0!==n&&s.push(t("div",{staticClass:"q-radio__label q-anchor--skip"},n)),t("div",{class:this.classes,attrs:this.attrs,on:Hr(this,"inpExt",{click:this.set,keydown:function(t){13!==t.keyCode&&32!==t.keyCode||nr(t)},keyup:function(t){13!==t.keyCode&&32!==t.keyCode||e.set(t)}})},s)}}),ys=t.extend({name:"QToggle",mixins:[de],props:{icon:String,checkedIcon:String,uncheckedIcon:String,indeterminateIcon:String,iconColor:String},computed:{computedIcon:function(){return(!0===this.isTrue?this.checkedIcon:!0===this.isIndeterminate?this.indeterminateIcon:this.uncheckedIcon)||this.icon},computedIconColor:function(){if(!0===this.isTrue)return this.iconColor}},methods:{__getInner:function(t){return[t("div",{staticClass:"q-toggle__track"}),t("div",{staticClass:"q-toggle__thumb absolute flex flex-center no-wrap"},void 0!==this.computedIcon?[t(et,{props:{name:this.computedIcon,color:this.computedIconColor}})]:void 0)]}},created:function(){this.type="toggle"}}),ws={radio:bs,checkbox:pe,toggle:ys},Ss=Object.keys(ws),Cs=t.extend({name:"QOptionGroup",mixins:[nt],props:{value:{required:!0},options:{type:Array,validator:function(t){return t.every(function(t){return"value"in t&&"label"in t})}},name:String,type:{default:"radio",validator:function(t){return Ss.includes(t)}},color:String,keepColor:Boolean,dense:Boolean,size:String,leftLabel:Boolean,inline:Boolean,disable:Boolean},computed:{component:function(){return ws[this.type]},model:function(){return Array.isArray(this.value)?this.value.slice():this.value},classes:function(){return"q-option-group q-gutter-x-sm"+(!0===this.inline?" q-option-group--inline":"")},attrs:function(){if("radio"===this.type){var t={role:"radiogroup"};return!0===this.disable&&(t["aria-disabled"]=""),t}}},methods:{__update:function(t){this.$emit("input",t)}},created:function(){var t=Array.isArray(this.value);"radio"===this.type?t&&console.error("q-option-group: model should not be array"):!1===t&&console.error("q-option-group: model should be array in your case")},render:function(t){var e=this;return t("div",{class:this.classes,attrs:this.attrs,on:this.$listeners},this.options.map(function(i){return t("div",[t(e.component,{props:{value:e.value,val:i.value,name:e.name||i.name,disable:e.disable||i.disable,label:i.label,leftLabel:e.leftLabel||i.leftLabel,color:i.color||e.color,checkedIcon:i.checkedIcon,uncheckedIcon:i.uncheckedIcon,dark:i.dark||e.isDark,size:i.size||e.size,dense:e.dense,keepColor:i.keepColor||e.keepColor},on:Hr(e,"inp",{input:e.__update})})])}))}}),xs=t.extend({name:"QPage",inject:{pageContainer:{default:function(){console.error("QPage needs to be child of QPageContainer")}},layout:{}},props:{padding:Boolean,styleFn:Function},computed:{style:function(){var t=(!0===this.layout.header.space?this.layout.header.size:0)+(!0===this.layout.footer.space?this.layout.footer.size:0);if("function"==typeof this.styleFn){var e=!0===this.layout.container?this.layout.containerHeight:this.$q.screen.height;return this.styleFn(t,e)}return{minHeight:!0===this.layout.container?this.layout.containerHeight-t+"px":0===this.$q.screen.height?"calc(100vh - "+t+"px)":this.$q.screen.height-t+"px"}},classes:function(){if(!0===this.padding)return"q-layout-padding"}},render:function(t){return t("main",{staticClass:"q-page",style:this.style,class:this.classes,on:this.$listeners},$r(this,"default"))}}),ks=t.extend({name:"QPageContainer",inject:{layout:{default:function(){console.error("QPageContainer needs to be child of QLayout")}}},provide:{pageContainer:!0},computed:{style:function(){var t={};return!0===this.layout.header.space&&(t.paddingTop=this.layout.header.size+"px"),!0===this.layout.right.space&&(t["padding"+(!0===this.$q.lang.rtl?"Left":"Right")]=this.layout.right.size+"px"),!0===this.layout.footer.space&&(t.paddingBottom=this.layout.footer.size+"px"),!0===this.layout.left.space&&(t["padding"+(!0===this.$q.lang.rtl?"Right":"Left")]=this.layout.left.size+"px"),t}},render:function(t){return t("div",{staticClass:"q-page-container",style:this.style,on:this.$listeners},$r(this,"default"))}}),qs=t.extend({name:"QPageSticky",inject:{layout:{default:function(){console.error("QPageSticky needs to be child of QLayout")}}},props:{position:{type:String,default:"bottom-right",validator:function(t){return["top-right","top-left","bottom-right","bottom-left","top","right","bottom","left"].includes(t)}},offset:{type:Array,validator:function(t){return 2===t.length}},expand:Boolean},computed:{attach:function(){var t=this.position;return{top:t.indexOf("top")>-1,right:t.indexOf("right")>-1,bottom:t.indexOf("bottom")>-1,left:t.indexOf("left")>-1,vertical:"top"===t||"bottom"===t,horizontal:"left"===t||"right"===t}},top:function(){return this.layout.header.offset},right:function(){return this.layout.right.offset},bottom:function(){return this.layout.footer.offset},left:function(){return this.layout.left.offset},style:function(){var t=0,e=0,i=this.attach,s=!0===this.$q.lang.rtl?-1:1;!0===i.top&&0!==this.top?e=this.top+"px":!0===i.bottom&&0!==this.bottom&&(e=-this.bottom+"px"),!0===i.left&&0!==this.left?t=s*this.left+"px":!0===i.right&&0!==this.right&&(t=-s*this.right+"px");var n={transform:"translate("+t+", "+e+")"};return this.offset&&(n.margin=this.offset[1]+"px "+this.offset[0]+"px"),!0===i.vertical?(0!==this.left&&(n[!0===this.$q.lang.rtl?"right":"left"]=this.left+"px"),0!==this.right&&(n[!0===this.$q.lang.rtl?"left":"right"]=this.right+"px")):!0===i.horizontal&&(0!==this.top&&(n.top=this.top+"px"),0!==this.bottom&&(n.bottom=this.bottom+"px")),n},classes:function(){return"fixed-"+this.position+" q-page-sticky--"+(!0===this.expand?"expand":"shrink")}},render:function(t){var e=$r(this,"default");return t("div",{staticClass:"q-page-sticky row flex-center",class:this.classes,style:this.style,on:this.$listeners},!0===this.expand?e:[t("div",e)])}}),$s=t.extend({name:"QPageScroller",mixins:[qs],props:{scrollOffset:{type:Number,default:1e3},reverse:Boolean,duration:{type:Number,default:300},offset:{default:function(){return[18,18]}}},inject:{layout:{default:function(){console.error("QPageScroller needs to be used within a QLayout")}}},data:function(){return{showing:this.__isVisible()}},computed:{height:function(){return!0===this.layout.container?this.layout.containerHeight:this.layout.height}},watch:{"layout.scroll.position":function(){this.__updateVisibility()},reverse:{handler:function(t){!0===t?void 0===this.heightWatcher&&(this.heightWatcher=this.$watch("height",this.__updateVisibility)):void 0!==this.heightWatcher&&this.__cleanup()},immediate:!0}},methods:{__isVisible:function(){return!0===this.reverse?this.height-this.layout.scroll.position>this.scrollOffset:this.layout.scroll.position>this.scrollOffset},__onClick:function(t){ea(!0===this.layout.container?Yr(this.$el):Yr(this.layout.$el),!0===this.reverse?this.layout.height:0,this.duration),this.$emit("click",t)},__updateVisibility:function(){var t=this.__isVisible();this.showing!==t&&(this.showing=t)},__cleanup:function(){this.heightWatcher(),this.heightWatcher=void 0}},render:function(t){return t("transition",{props:{name:"q-transition--fade"}},!0===this.showing?[t("div",{staticClass:"q-page-scroller",on:Object.assign({},this.$listeners,{click:this.__onClick})},[qs.options.render.call(this,t)])]:null)},beforeDestroy:function(){void 0!==this.heightWatcher&&this.__cleanup()}}),Ts=t.extend({name:"QPagination",mixins:[nt],props:{value:{type:Number,required:!0},min:{type:Number,default:1},max:{type:Number,required:!0},color:{type:String,default:"primary"},textColor:String,inputStyle:[Array,String,Object],inputClass:[Array,String,Object],size:String,disable:Boolean,input:Boolean,iconPrev:String,iconNext:String,iconFirst:String,iconLast:String,toFn:Function,boundaryLinks:{type:Boolean,default:null},boundaryNumbers:{type:Boolean,default:null},directionLinks:{type:Boolean,default:null},ellipses:{type:Boolean,default:null},maxPages:{type:Number,default:0,validator:function(t){return t>=0}}},data:function(){return{newPage:null}},watch:{min:function(){this.model=this.value},max:function(){this.model=this.value}},computed:{model:{get:function(){return this.value},set:function(t){if(t=parseInt(t,10),!this.disable&&!isNaN(t)&&0!==t){var e=Cr(t,this.min,this.max);this.$emit("input",e)}}},inputPlaceholder:function(){return this.model+" / "+this.max},__boundaryLinks:function(){return this.__getBool(this.boundaryLinks,this.input)},__boundaryNumbers:function(){return this.__getBool(this.boundaryNumbers,!this.input)},__directionLinks:function(){return this.__getBool(this.directionLinks,this.input)},__ellipses:function(){return this.__getBool(this.ellipses,!this.input)},icons:function(){var t=[this.iconFirst||this.$q.iconSet.pagination.first,this.iconPrev||this.$q.iconSet.pagination.prev,this.iconNext||this.$q.iconSet.pagination.next,this.iconLast||this.$q.iconSet.pagination.last];return!0===this.$q.lang.rtl?t.reverse():t},attrs:function(){if(!0===this.disable)return{"aria-disabled":""}}},methods:{set:function(t){this.model=t},setByOffset:function(t){this.model=this.model+t},__update:function(){this.model=this.newPage,this.newPage=null},__getBool:function(t,e){return[!0,!1].includes(t)?t:e},__getBtn:function(t,e,i,s){var n=this;return e.props=Object.assign({},{color:this.color,flat:!0,size:this.size},i),void 0!==s&&(void 0!==this.toFn?e.props.to=this.toFn(s):e.on={click:function(){return n.set(s)}}),t(Mt,e)}},render:function(t){var e=this,i=[],s=[],n=[];if(this.__boundaryLinks&&(i.push(this.__getBtn(t,{key:"bls"},{disable:this.disable||this.value<=this.min,icon:this.icons[0]},this.min)),s.unshift(this.__getBtn(t,{key:"ble"},{disable:this.disable||this.value>=this.max,icon:this.icons[3]},this.max))),this.__directionLinks&&(i.push(this.__getBtn(t,{key:"bdp"},{disable:this.disable||this.value<=this.min,icon:this.icons[1]},this.value-1)),s.unshift(this.__getBtn(t,{key:"bdn"},{disable:this.disable||this.value>=this.max,icon:this.icons[2]},this.value+1))),!0===this.input)n.push(t(Bi,{staticClass:"inline",style:{width:this.inputPlaceholder.length/1.5+"em"},props:{type:"number",dense:!0,value:this.newPage,disable:this.disable,dark:this.isDark,borderless:!0,inputClass:this.inputClass,inputStyle:this.inputStyle},attrs:{placeholder:this.inputPlaceholder,min:this.min,max:this.max},on:Hr(this,"inp",{input:function(t){e.newPage=t},keyup:function(t){!0===br(t,13)&&e.__update()},blur:this.__update})}));else{var o=Math.max(this.maxPages,1+(this.__ellipses?2:0)+(this.__boundaryNumbers?2:0)),r=this.min,a=this.max,l=!1,c=!1,u=!1,h=!1;this.maxPages&&othis.min+(this.__boundaryNumbers?1:0)&&(l=!0,r+=1),this.__boundaryNumbers&&(h=!0,a-=1),this.__ellipses&&a=0&&t<=1}},scrollTarget:{default:void 0}},data:function(){return{scrolling:!1,percentScrolled:0}},watch:{height:function(){this.__updatePos()},scrollTarget:function(){this.__unconfigureScrollTarget(),this.__configureScrollTarget()}},methods:{__update:function(t){this.percentScrolled=t,void 0!==this.$listeners.scroll&&this.$emit("scroll",t)},__onResize:function(){this.__scrollTarget&&(this.mediaHeight=this.media.naturalHeight||this.media.videoHeight||Lr(this.media),this.__updatePos())},__updatePos:function(){var t,e,i,s;if(this.__scrollTarget===window?(t=0,i=e=window.innerHeight):i=(t=Pr(this.__scrollTarget).top)+(e=Lr(this.__scrollTarget)),(s=Pr(this.$el).top)+this.height>t&&s20?"pulled":"pull";this.state!==o&&(this.state=o)}else!0===this.pulling&&(this.pulling=!1,"pulled"===this.state?(this.state="refreshing",this.__animateTo({pos:20}),this.trigger()):"pull"===this.state&&this.__animateTo({pos:-40,ratio:0}))},__animateTo:function(t,e){var i=this,s=t.pos,n=t.ratio;this.animating=!0,this.pullPosition=s,void 0!==n&&(this.pullRatio=n),clearTimeout(this.timer),this.timer=setTimeout(function(){i.animating=!1,e&&e()},300)}},mounted:function(){this.updateScrollTarget()},beforeDestroy:function(){clearTimeout(this.timer)},render:function(t){return t("div",{staticClass:"q-pull-to-refresh overflow-hidden",on:this.$listeners,directives:!0===this.disable?null:Hr(this,"dir#"+this.noMouse,[{name:"touch-pan",modifiers:{down:!0,mightPrevent:!0,mouse:!0!==this.noMouse},value:this.__pull}])},[t("div",{staticClass:"q-pull-to-refresh__content",class:!0===this.pulling?"no-pointer-events":""},$r(this,"default")),t("div",{staticClass:"q-pull-to-refresh__puller-container fixed row flex-center no-pointer-events z-top",style:this.positionCSS},[t("div",{style:this.style,class:this.classes},["refreshing"!==this.state?t(et,{props:{name:this.icon||this.$q.iconSet.pullToRefresh.icon,color:this.color,size:"32px"}}):t(vt,{props:{size:"24px",color:this.color}})])])])}}),Os=0,Es=1,Ds=2,As=t.extend({name:"QRange",mixins:[Te],props:{value:{type:Object,default:function(){return{min:null,max:null}},validator:function(t){return"min"in t&&"max"in t}},name:String,dragRange:Boolean,dragOnlyRange:Boolean,leftLabelColor:String,leftLabelTextColor:String,rightLabelColor:String,rightLabelTextColor:String,leftLabelValue:[String,Number],rightLabelValue:[String,Number]},data:function(){return{model:{min:null===this.value.min?this.min:this.value.min,max:null===this.value.max?this.max:this.value.max},curMinRatio:0,curMaxRatio:0}},watch:{"value.min":function(t){this.model.min=null===t?this.min:t},"value.max":function(t){this.model.max=null===t?this.max:t},min:function(t){this.model.mint&&(this.model.min=t),this.model.max>t&&(this.model.max=t)}},computed:{ratioMin:function(){return!0===this.active?this.curMinRatio:this.modelMinRatio},ratioMax:function(){return!0===this.active?this.curMaxRatio:this.modelMaxRatio},modelMinRatio:function(){return(this.model.min-this.min)/(this.max-this.min)},modelMaxRatio:function(){return(this.model.max-this.min)/(this.max-this.min)},trackStyle:function(){var t;return(t={})[this.horizProp]=100*this.ratioMin+"%",t.width=100*(this.ratioMax-this.ratioMin)+"%",t},minThumbStyle:function(){var t;return(t={})[this.horizProp]=100*this.ratioMin+"%",t["z-index"]="min"===this.__nextFocus?2:void 0,t},maxThumbStyle:function(){var t;return(t={})[this.horizProp]=100*this.ratioMax+"%",t},minThumbClass:function(){if(!1===this.preventFocus&&"min"===this.focus)return"q-slider--focus"},maxThumbClass:function(){if(!1===this.preventFocus&&"max"===this.focus)return"q-slider--focus"},events:function(){var t=this;if(!0===this.editable){if(!0===this.$q.platform.is.mobile)return{click:this.__mobileClick};var e={mousedown:this.__activate};return!0===this.dragOnlyRange&&Object.assign(e,{focus:function(){t.__focus("both")},blur:this.__blur,keydown:this.__keydown,keyup:this.__keyup}),e}},minEvents:function(){var t=this;if(!0===this.editable&&!0!==this.$q.platform.is.mobile&&!0!==this.dragOnlyRange)return{focus:function(){t.__focus("min")},blur:this.__blur,keydown:this.__keydown,keyup:this.__keyup}},maxEvents:function(){var t=this;if(!0===this.editable&&!0!==this.$q.platform.is.mobile&&!0!==this.dragOnlyRange)return{focus:function(){t.__focus("max")},blur:this.__blur,keydown:this.__keydown,keyup:this.__keyup}},minPinClass:function(){var t=this.leftLabelColor||this.labelColor;if(t)return"text-"+t},minPinTextClass:function(){var t=this.leftLabelTextColor||this.labelTextColor;if(t)return"text-"+t},maxPinClass:function(){var t=this.rightLabelColor||this.labelColor;if(t)return"text-"+t},maxPinTextClass:function(){var t=this.rightLabelTextColor||this.labelTextColor;if(t)return"text-"+t},minLabel:function(){return void 0!==this.leftLabelValue?this.leftLabelValue:this.model.min},maxLabel:function(){return void 0!==this.rightLabelValue?this.rightLabelValue:this.model.max},minPinStyle:function(){var t=!0===this.reverse?-this.ratioMin:this.ratioMin-1;return this.__getPinStyle(t,this.ratioMin)},maxPinStyle:function(){var t=!0===this.reverse?-this.ratioMax:this.ratioMax-1;return this.__getPinStyle(t,this.ratioMax)},formAttrs:function(){return{type:"hidden",name:this.name,value:this.value.min+"|"+this.value.max}}},methods:{__updateValue:function(t){this.model.min===this.value.min&&this.model.max===this.value.max||this.$emit("input",this.model),!0===t&&this.$emit("change",this.model)},__getDragging:function(t){var e,i=this.$el.getBoundingClientRect(),s=i.left,n=i.width,o=this.dragOnlyRange?0:this.$refs.minThumb.offsetWidth/(2*n),r=this.max-this.min,a={left:s,width:n,valueMin:this.model.min,valueMax:this.model.max,ratioMin:(this.model.min-this.min)/r,ratioMax:(this.model.max-this.min)/r},l=fa(t,a,this.isReversed);return!0!==this.dragOnlyRange&&l=e.ratioMin?(i={minR:e.ratioMin,maxR:s,min:e.valueMin,max:n},this.__nextFocus="max"):(i={minR:s,maxR:e.ratioMin,min:n,max:e.valueMin},this.__nextFocus="min");break;case Es:var o=s-e.offsetRatio,r=Cr(e.ratioMin+o,0,1-e.rangeRatio),a=n-e.offsetModel,l=Cr(e.valueMin+a,this.min,this.max-e.rangeValue);i={minR:r,maxR:r+e.rangeRatio,min:parseFloat(l.toFixed(this.decimals)),max:parseFloat((l+e.rangeValue).toFixed(this.decimals))}}if(this.model={min:i.min,max:i.max},null!==this.model.min&&null!==this.model.max||(this.model.min=i.min||this.min,this.model.max=i.max||this.max),!0!==this.snap||0===this.step)this.curMinRatio=i.minR,this.curMaxRatio=i.maxR;else{var c=this.max-this.min;this.curMinRatio=(this.model.min-this.min)/c,this.curMaxRatio=(this.model.max-this.min)/c}},__focus:function(t){this.focus=t},__keydown:function(t){var e;if($e.includes(t.keyCode)){nr(t);var i=([34,33].includes(t.keyCode)?10:1)*this.computedStep,s=[34,37,40].includes(t.keyCode)?-i:i;if(this.dragOnlyRange){var n=this.dragOnlyRange?this.model.max-this.model.min:0,o=Cr(parseFloat((this.model.min+s).toFixed(this.decimals)),this.min,this.max-n);this.model={min:o,max:parseFloat((o+n).toFixed(this.decimals))}}else{if(!1===this.focus)return;var r=this.focus;this.model=Object.assign({},this.model,((e={})[r]=Cr(parseFloat((this.model[r]+s).toFixed(this.decimals)),"min"===r?this.min:this.model.min,"max"===r?this.max:this.model.max),e))}this.__updateValue()}},__getThumb:function(t,e){var i=[this.__getThumbSvg(t),t("div",{staticClass:"q-slider__focus-ring"})];return!0!==this.label&&!0!==this.labelAlways||i.push(t("div",{staticClass:"q-slider__pin absolute",style:this[e+"PinStyle"].pin,class:this[e+"PinClass"]},[t("div",{staticClass:"q-slider__pin-text-container",style:this[e+"PinStyle"].pinTextContainer},[t("span",{staticClass:"q-slider__pin-text",class:this[e+"PinTextClass"]},[this[e+"Label"]])])]),t("div",{staticClass:"q-slider__arrow",class:this[e+"PinClass"]})),t("div",{ref:e+"Thumb",staticClass:"q-slider__thumb-container absolute non-selectable",style:this[e+"ThumbStyle"],class:this[e+"ThumbClass"],on:this[e+"Events"],attrs:{tabindex:!0!==this.dragOnlyRange?this.computedTabindex:null}},i)}},render:function(t){var e=[t("div",{staticClass:"q-slider__track absolute",style:this.trackStyle})];!0===this.markers&&e.push(t("div",{staticClass:"q-slider__track-markers absolute-full fit",style:this.markerStyle}));var i=[t("div",{staticClass:"q-slider__track-container absolute"},e),this.__getThumb(t,"min"),this.__getThumb(t,"max")];return void 0!==this.name&&!0!==this.disable&&this.__injectFormInput(i,"push"),t("div",{staticClass:null===this.value.min||null===this.value.max?"q-slider--no-value":void 0,attrs:Object.assign({},this.attrs,{"aria-valuenow":this.value.min+"|"+this.value.max,tabindex:this.dragOnlyRange&&!this.$q.platform.is.mobile?this.computedTabindex:null}),class:this.classes,on:this.events,directives:!0===this.editable?Hr(this,"dir",[{name:"touch-pan",value:this.__pan,modifiers:{horizontal:!0,prevent:!0,stop:!0,mouse:!0,mouseAllDir:!0}}]):null},i)}}),Is=t.extend({name:"QRating",mixins:[J,Wt],props:{value:{type:Number,required:!0},max:{type:[String,Number],default:5},icon:[String,Array],iconHalf:[String,Array],iconSelected:[String,Array],color:[String,Array],colorHalf:[String,Array],colorSelected:[String,Array],noReset:Boolean,noDimming:Boolean,readonly:Boolean,disable:Boolean},data:function(){return{mouseModel:0}},computed:{editable:function(){return!0!==this.readonly&&!0!==this.disable},classes:function(){return"q-rating--"+(!0===this.editable?"":"non-")+"editable"+(!0===this.noDimming?" q-rating--no-dimming":"")+(!0===this.disable?" disabled":"")+(void 0!==this.color&&!1===Array.isArray(this.color)?" text-"+this.color:"")},iconData:function(){var t=!0===Array.isArray(this.icon)?this.icon.length:0,e=!0===Array.isArray(this.iconSelected)?this.iconSelected.length:0,i=!0===Array.isArray(this.iconHalf)?this.iconHalf.length:0,s=!0===Array.isArray(this.color)?this.color.length:0,n=!0===Array.isArray(this.colorSelected)?this.colorSelected.length:0,o=!0===Array.isArray(this.colorHalf)?this.colorHalf.length:0;return{iconLen:t,icon:t>0?this.icon[t-1]:this.icon,selIconLen:e,selIcon:e>0?this.iconSelected[e-1]:this.iconSelected,halfIconLen:i,halfIcon:i>0?this.iconHalf[e-1]:this.iconHalf,colorLen:s,color:s>0?this.color[s-1]:this.color,selColorLen:n,selColor:n>0?this.colorSelected[n-1]:this.colorSelected,halfColorLen:o,halfColor:o>0?this.colorHalf[o-1]:this.colorHalf}},attrs:function(){return!0===this.disable?{"aria-disabled":""}:!0===this.readonly?{"aria-readonly":""}:void 0}},methods:{__set:function(t){if(!0===this.editable){var e=Cr(parseInt(t,10),1,parseInt(this.max,10)),i=!0!==this.noReset&&this.value===e?0:e;i!==this.value&&this.$emit("input",i),this.mouseModel=0}},__setHoverValue:function(t){!0===this.editable&&(this.mouseModel=t)},__keyup:function(t,e){switch(t.keyCode){case 13:case 32:return this.__set(e),nr(t);case 37:case 40:return this.$refs["rt"+(e-1)]&&this.$refs["rt"+(e-1)].focus(),nr(t);case 39:case 38:return this.$refs["rt"+(e+1)]&&this.$refs["rt"+(e+1)].focus(),nr(t)}}},render:function(t){for(var e,i=this,s=[],n=!0===this.editable?0:null,o=this.iconData,r=Math.ceil(this.value),a=void 0===this.iconHalf||r===this.value?-1:r,l=function(l){var c=0===i.mouseModel&&i.value>=l||i.mouseModel>0&&i.mouseModel>=l,u=a===l&&i.mouseModel0&&(!0===u?r:i.value)>=l&&i.mouseModel-1&&t>this.prevToIndex?"end":"start")},__onVirtualScrollEvt:function(){var t=this.__getVirtualScrollTarget();if(void 0!==t&&null!==t&&8!==t.nodeType){var e=ll(t,this.__getVirtualScrollEl(),this.$refs.before,this.$refs.after,this.virtualScrollHorizontal,this.virtualScrollStickySizeStart,this.virtualScrollStickySizeEnd),i=e.scrollMaxSize-Math.max(e.scrollViewSize,e.offsetEnd),s=this.virtualScrollLength-1;if(this.prevScrollStart!==e.scrollStart)if(this.prevScrollStart=void 0,this.__updateVirtualScrollSizes(this.virtualScrollSliceRange.from),i>0&&e.scrollStart>=i)this.__setVirtualScrollSliceRange(t,e,this.virtualScrollLength-1,e.scrollMaxSize-e.offsetEnd-this.virtualScrollSizesAgg.reduce(al,0));else{for(var n=0,o=e.scrollStart-e.offsetStart,r=o,a=0;o>=this.virtualScrollSizesAgg[a]&&n0&&n-e.scrollViewSize?(n++,r=o):r=this.virtualScrollSizes[n]+o;this.__setVirtualScrollSliceRange(t,e,n,r)}}},__setVirtualScrollSliceRange:function(t,e,i,s,n){var o=this,r=Math.max(0,Math.ceil(i-(void 0===n?3:2)*this.virtualScrollSliceSizeComputed/6)),a=r+this.virtualScrollSliceSizeComputed;a>this.virtualScrollLength&&(a=this.virtualScrollLength,r=Math.max(0,a-this.virtualScrollSliceSizeComputed));var l=r!==this.virtualScrollSliceRange.from||a!==this.virtualScrollSliceRange.to;!1!==l||void 0!==n?(!0===l&&(this.virtualScrollSliceRange={from:r,to:a},this.virtualScrollPaddingBefore=ul(this.virtualScrollSizesAgg,this.virtualScrollSizes,0,r),this.virtualScrollPaddingAfter=ul(this.virtualScrollSizesAgg,this.virtualScrollSizes,a,this.virtualScrollLength)),this.$nextTick(function(){!0===l&&o.__updateVirtualScrollSizes(r);var a=o.virtualScrollSizes.slice(r,i).reduce(al,e.offsetStart+o.virtualScrollPaddingBefore),c=a+o.virtualScrollSizes[i],u=a+s;void 0!==n&&(u=e.scrollStart=n;o--)this.virtualScrollSizes[o]=s;var r=Math.floor((this.virtualScrollLength-1)/Vs);this.virtualScrollSizesAgg=[];for(var a=0;a<=r;a++){for(var l=0,c=Math.min((a+1)*Vs,this.virtualScrollLength),u=a*Vs;u=0?(this.__updateVirtualScrollSizes(this.virtualScrollSliceRange.from),this.$nextTick(function(){i.scrollTo(t)})):(this.virtualScrollPaddingBefore=ul(this.virtualScrollSizesAgg,this.virtualScrollSizes,0,this.virtualScrollSliceRange.from),this.virtualScrollPaddingAfter=ul(this.virtualScrollSizesAgg,this.virtualScrollSizes,this.virtualScrollSliceRange.to,this.virtualScrollLength),this.__onVirtualScrollEvt())},__setVirtualScrollSize:function(){!0===this.virtualScrollHorizontal?this.virtualScrollSliceSizeComputed="undefined"==typeof window?this.virtualScrollSliceSize:Math.max(this.virtualScrollSliceSize,Math.ceil(window.innerWidth/this.virtualScrollItemSize*2)):this.virtualScrollSliceSizeComputed="undefined"==typeof window?this.virtualScrollSliceSize:Math.max(this.virtualScrollSliceSize,Math.ceil(window.innerHeight/this.virtualScrollItemSize*2))},__padVirtualScroll:function(t,e,i){var s,n,o,r,a=!0===this.virtualScrollHorizontal?"width":"height";return["tbody"===e?t(e,{staticClass:"q-virtual-scroll__padding",key:"before",ref:"before"},[t("tr",[t("td",{style:(s={},s[a]=this.virtualScrollPaddingBefore+"px",s),attrs:{colspan:"100%"}})])]):t(e,{staticClass:"q-virtual-scroll__padding",key:"before",ref:"before",style:(n={},n[a]=this.virtualScrollPaddingBefore+"px",n)}),t(e,{staticClass:"q-virtual-scroll__content",key:"content",ref:"content"},i),"tbody"===e?t(e,{staticClass:"q-virtual-scroll__padding",key:"after",ref:"after"},[t("tr",[t("td",{style:(o={},o[a]=this.virtualScrollPaddingAfter+"px",o),attrs:{colspan:"100%"}})])]):t(e,{staticClass:"q-virtual-scroll__padding",key:"after",ref:"after",style:(r={},r[a]=this.virtualScrollPaddingAfter+"px",r)})]},__emitScroll:function(t){this.prevToIndex!==t&&(void 0!==this.$listeners["virtual-scroll"]&&this.$emit("virtual-scroll",{index:t,from:this.virtualScrollSliceRange.from,to:this.virtualScrollSliceRange.to-1,direction:t-1&&t=this.maxValues)){var s=this.value.slice();this.$emit("add",{index:s.length,value:i}),s.push(i),this.$emit("input",s)}},toggleOption:function(t,e){if(!0===this.editable&&void 0!==t&&!0!==this.isOptionDisabled(t)){var i=this.getOptionValue(t);if(!0!==this.multiple)return void 0!==this.$refs.target&&this.$refs.target.focus(),!0!==e&&(this.updateInputValue(!0===this.fillInput?this.getOptionLabel(t):"",!0,!0),this.hidePopup()),void(!0!==ca(this.getOptionValue(this.innerValue),i)&&this.$emit("input",!0===this.emitValue?i:t));if((!0!==this.hasDialog||!0===this.dialogFieldFocused)&&this.__focus(),this.__selectInputText(),0===this.innerValue.length){var s=!0===this.emitValue?i:t;return this.$emit("add",{index:0,value:s}),void this.$emit("input",!0===this.multiple?[s]:s)}var n=this.value.slice(),o=this.innerOptionsValue.findIndex(function(t){return ca(t,i)});if(o>-1)this.$emit("remove",{index:o,value:n.splice(o,1)});else{if(void 0!==this.maxValues&&n.length>=this.maxValues)return;var r=!0===this.emitValue?i:t;this.$emit("add",{index:n.length,value:r}),n.push(r)}this.$emit("input",n)}},setOptionIndex:function(t){if(!0===this.$q.platform.is.desktop){var e=t>-1&&t=0&&!0===this.useInput&&!0===this.fillInput)){var s=this.getOptionLabel(this.options[i]);this.inputValue!==s&&(this.inputValue=s)}}},__getOption:function(t,e){var i=this,s=function(e){return ca(i.getOptionValue(e),t)};return this.options.find(s)||e.find(s)||t},__getPropValueFn:function(t,e){var i=void 0!==this[t]?this[t]:e;return"function"==typeof i?i:function(t){return Object(t)===t&&i in t?t[i]:t}},isOptionSelected:function(t){var e=this.getOptionValue(t);return void 0!==this.innerOptionsValue.find(function(t){return ca(t,e)})},__selectInputText:function(){!0===this.useInput&&void 0!==this.$refs.target&&this.$refs.target.select()},__onTargetKeyup:function(t){!0===br(t,27)&&!0===this.menu&&(ir(t),this.hidePopup()),this.$emit("keyup",t)},__onTargetAutocomplete:function(t){var e=this,i=t.target.value;if(t.target.value="",void 0===t.keyCode&&"string"==typeof i&&i.length>0){var s=i.toLocaleLowerCase(),n=function(t){return e.getOptionValue(t).toLocaleLowerCase()===s},o=this.options.find(n);null!==o?-1===this.innerValue.indexOf(o)&&this.toggleOption(o):(n=function(t){return e.getOptionLabel(t).toLocaleLowerCase()===s},null!==(o=this.options.find(n))&&-1===this.innerValue.indexOf(o)&&this.toggleOption(o))}},__onTargetKeypress:function(t){this.$emit("keypress",t)},__onTargetKeydown:function(t){var e=this;if(this.$emit("keydown",t),!0!==_r(t)){var i=this.inputValue.length>0&&(void 0!==this.newValueMode||void 0!==this.$listeners["new-value"]),s=!0!==t.shiftKey&&!0!==this.multiple&&(this.optionIndex>-1||!0===i);if(27!==t.keyCode)if(9!==t.keyCode||!1!==s){if(void 0!==t.target&&t.target.id===this.targetUid){if(40===t.keyCode&&!0!==this.innerLoading&&!1===this.menu)return nr(t),void this.showPopup();if(8===t.keyCode&&!0===this.multiple&&0===this.inputValue.length&&Array.isArray(this.value))this.removeAtIndex(this.value.length-1);else{38!==t.keyCode&&40!==t.keyCode||(nr(t),this.moveOptionSelection(38===t.keyCode?-1:1,this.multiple));var n=this.virtualScrollLength;if(n>0&&!0!==this.useInput&&t.keyCode>=48&&t.keyCode<=90){!0!==this.menu&&this.showPopup(t),(void 0===this.searchBuffer||this.searchBufferExp=0&&!0===e.useInput&&!0===e.fillInput){var t=e.getOptionLabel(e.options[l]);e.inputValue!==t&&(e.inputValue=t)}})}else if(13===t.keyCode||!0!==this.useInput&&32===t.keyCode||!1!==s&&9===t.keyCode)if(9!==t.keyCode&&nr(t),this.optionIndex>-1&&this.optionIndex0){var n=this.innerOptionsValue.map(function(e){return t("option",{attrs:{value:e,selected:!0}})});i.push(t("select",{staticClass:"hidden",attrs:{name:this.nameProp,multiple:this.multiple}},n))}return t("div",{staticClass:"q-field__native row items-center",attrs:this.$attrs},i)},__getOptions:function(t){var e=this;if(!0===this.menu){var i=void 0!==this.$scopedSlots.option?this.$scopedSlots.option:function(i){var s;return t(zi,{key:i.index,props:i.itemProps,on:i.itemEvents},[t(Oi,[t(Ni,{domProps:(s={},s[!0===i.sanitize?"textContent":"innerHTML"]=e.getOptionLabel(i.opt),s)})])])},s=this.__padVirtualScroll(t,"div",this.optionScope.map(i));return void 0!==this.$scopedSlots["before-options"]&&(s=this.$scopedSlots["before-options"]().concat(s)),Mr(s,this,"after-options")}},__getInnerAppend:function(t){return!0!==this.loading&&!0!==this.innerLoading&&!0!==this.hideDropdownIcon?[t(et,{staticClass:"q-select__dropdown-icon",props:{name:this.dropdownArrowIcon}})]:null},__getInput:function(t,e){var i={input:this.__onInput,change:this.__onChange,keydown:this.__onTargetKeydown,keyup:this.__onTargetKeyup,keypress:this.__onTargetKeypress,focus:this.__selectInputText};return i.compositionstart=i.compositionupdate=i.compositionend=this.__onComposition,!0===this.hasDialog&&(i.click=ir),t("input",{ref:"target",staticClass:"q-field__input q-placeholder col",style:this.inputStyle,class:this.computedInputClass,domProps:{value:void 0!==this.inputValue?this.inputValue:""},attrs:Object.assign({},{type:"search"},this.$attrs,{tabindex:this.tabindex,"data-autofocus":!0!==e&&this.autofocus,id:this.targetUid,disabled:!0===this.disable,readonly:!0===this.readonly}),on:Hr(this,"inp#"+this.hasDialog,i)})},__onChange:function(t){this.__onComposition(t)},__onInput:function(t){var e=this;clearTimeout(this.inputTimer),t&&t.target&&!0===t.target.composing||(this.inputValue=t.target.value||"",this.userInputValue=!0,!0===this.focused||!0===this.hasDialog&&!0!==this.dialogFieldFocused||this.__focus(),void 0!==this.$listeners.filter&&(this.inputTimer=setTimeout(function(){e.filter(e.inputValue)},this.inputDebounce)))},updateInputValue:function(t,e,i){this.userInputValue=!0!==i,!0===this.useInput&&(this.inputValue!==t&&(this.inputValue=t),!0!==e&&this.filter(t))},filter:function(t){var e=this;if(void 0!==this.$listeners.filter&&!0===this.focused){!0===this.innerLoading?this.$emit("filter-abort"):this.innerLoading=!0,""!==t&&!0!==this.multiple&&this.innerValue.length>0&&!0!==this.userInputValue&&t===this.getOptionLabel(this.innerValue[0])&&(t="");var i=setTimeout(function(){!0===e.menu&&(e.menu=!1)},10);clearTimeout(this.filterId),this.filterId=i,this.$emit("filter",t,function(t,s){!0===e.focused&&e.filterId===i&&(clearTimeout(e.filterId),"function"==typeof t&&t(),e.$nextTick(function(){e.innerLoading=!1,!0===e.menu?e.__updateMenu(!0):e.menu=!0,"function"==typeof s&&e.$nextTick(function(){s(e)})}))},function(){!0===e.focused&&e.filterId===i&&(clearTimeout(e.filterId),e.innerLoading=!1),!0===e.menu&&(e.menu=!1)})}},__getControlEvents:function(){var t=this,e=function(e){t.__onControlFocusout(e,function(){t.__resetInputValue(),t.__closeMenu()})};return{focusin:this.__onControlFocusin,focusout:e,"popup-show":this.__onControlPopupShow,"popup-hide":function(i){void 0!==i&&ir(i),t.$emit("popup-hide",i),t.hasPopupOpen=!1,e(i)},click:function(e){if(!0!==t.hasDialog){if(!0===t.useInput&&!0!==e.target.classList.contains("q-field__input")||!0!==t.useInput&&!0===e.target.classList.contains("no-outline"))return;if(!0===t.menu)return t.__closeMenu(),void(void 0!==t.$refs.target&&t.$refs.target.focus())}t.showPopup(e)}}},__getControlChild:function(t){if(!1!==this.editable&&(!0===this.dialog||!0!==this.noOptions||void 0!==this.$scopedSlots["no-option"]))return this["__get"+(!0===this.hasDialog?"Dialog":"Menu")](t)},__getMenu:function(t){var e=!0===this.noOptions?void 0!==this.$scopedSlots["no-option"]?this.$scopedSlots["no-option"]({inputValue:this.inputValue}):null:this.__getOptions(t);return t(Ht,{ref:"menu",props:{value:this.menu,fit:!0!==this.menuShrink,cover:!0===this.optionsCover&&!0!==this.noOptions&&!0!==this.useInput,anchor:this.menuAnchor,self:this.menuSelf,offset:this.menuOffset,contentClass:this.menuContentClass,contentStyle:this.popupContentStyle,dark:this.isOptionsDark,noParentEvent:!0,noRefocus:!0,noFocus:!0,square:this.squaredMenu,transitionShow:this.transitionShow,transitionHide:this.transitionHide,separateClosePopup:!0},on:Hr(this,"menu",{"&scroll":this.__onVirtualScrollEvt,"before-hide":this.__closeMenu})},e)},__onDialogFieldFocus:function(t){ir(t),void 0!==this.$refs.target&&this.$refs.target.focus(),this.dialogFieldFocused=!0,window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,0)},__onDialogFieldBlur:function(t){var e=this;ir(t),this.$nextTick(function(){e.dialogFieldFocused=!1})},__getDialog:function(t){var e=this,i=[t(vi,{staticClass:"col-auto "+this.fieldClass,props:Object.assign({},this.$props,{for:this.targetUid,dark:this.isOptionsDark,square:!0,loading:this.innerLoading,filled:!0,stackLabel:this.inputValue.length>0}),on:Object.assign({},this.$listeners,{focus:this.__onDialogFieldFocus,blur:this.__onDialogFieldBlur}),scopedSlots:Object.assign({},this.$scopedSlots,{rawControl:function(){return e.__getControl(t,!0)},before:void 0,after:void 0})})];return!0===this.menu&&i.push(t("div",{ref:"menuContent",staticClass:"scroll",class:this.menuContentClass,style:this.popupContentStyle,on:Hr(this,"virtMenu",{click:sr,"&scroll":this.__onVirtualScrollEvt})},!0===this.noOptions?void 0!==this.$scopedSlots["no-option"]?this.$scopedSlots["no-option"]({inputValue:this.inputValue}):null:this.__getOptions(t))),t(ai,{ref:"dialog",props:{value:this.dialog,dark:this.isOptionsDark,position:!0===this.useInput?"top":void 0,transitionShow:this.transitionShowComputed,transitionHide:this.transitionHide},on:Hr(this,"dialog",{"before-hide":this.__onDialogBeforeHide,hide:this.__onDialogHide,show:this.__onDialogShow})},[t("div",{staticClass:"q-select__dialog"+(!0===this.isOptionsDark?" q-select__dialog--dark q-dark":"")+(!0===this.dialogFieldFocused?" q-select__dialog--focused":"")},i)])},__onDialogBeforeHide:function(){this.$refs.dialog.__refocusTarget=this.$el.querySelector(".q-field__native > [tabindex]:last-child"),this.focused=!1},__onDialogHide:function(t){this.hidePopup(),this.$emit("blur",t),this.__resetInputValue()},__onDialogShow:function(){var t=document.activeElement;null!==t&&t.id===this.targetUid||this.$refs.target===t||void 0===this.$refs.target||this.$refs.target.focus()},__closeMenu:function(){!0!==this.dialog&&(!0===this.menu&&(this.menu=!1),!1===this.focused&&(clearTimeout(this.filterId),this.filterId=void 0,!0===this.innerLoading&&(this.$emit("filter-abort"),this.innerLoading=!1)))},showPopup:function(t){!0===this.hasDialog?(this.__onControlFocusin(t),this.dialog=!0):this.__focus(),void 0!==this.$listeners.filter?this.filter(this.inputValue):!0===this.noOptions&&void 0===this.$scopedSlots["no-option"]||(this.menu=!0)},hidePopup:function(){this.dialog=!1,this.__closeMenu()},__resetInputValue:function(){!0===this.useInput&&this.updateInputValue(!0!==this.multiple&&!0===this.fillInput&&this.innerValue.length>0&&this.getOptionLabel(this.innerValue[0])||"",!0,!0)},__updateMenu:function(t){var e=this,i=-1;if(!0===t){if(this.innerValue.length>0){var s=this.getOptionValue(this.innerValue[0]);i=this.options.findIndex(function(t){return ca(e.getOptionValue(t),s)})}this.__resetVirtualScroll(i)}this.setOptionIndex(i)},__onPreRender:function(){this.hasDialog=(!0===this.$q.platform.is.mobile||"dialog"===this.behavior)&&("menu"!==this.behavior&&(!0!==this.useInput||(void 0!==this.$scopedSlots["no-option"]||void 0!==this.$listeners.filter||!1===this.noOptions))),this.transitionShowComputed=!0===this.hasDialog&&!0===this.useInput&&!0===this.$q.platform.is.ios?"fade":this.transitionShow},__onPostRender:function(){!1===this.dialog&&void 0!==this.$refs.menu&&this.$refs.menu.updatePosition()},updateMenuPosition:function(){this.__onPostRender()}},beforeDestroy:function(){clearTimeout(this.inputTimer)}}),Us=["text","rect","circle","QBtn","QBadge","QChip","QToolbar","QCheckbox","QRadio","QToggle","QSlider","QRange","QInput","QAvatar"],Ks=["wave","pulse","pulse-x","pulse-y","fade","blink","none"],Xs=t.extend({name:"QSkeleton",mixins:[nt,tt],props:{type:{type:String,validator:function(t){return Us.includes(t)},default:"rect"},animation:{type:String,validator:function(t){return Ks.includes(t)},default:"wave"},square:Boolean,bordered:Boolean,size:String,width:String,height:String},computed:{style:function(){return void 0!==this.size?{width:this.size,height:this.size}:{width:this.width,height:this.height}},classes:function(){return"q-skeleton--"+(!0===this.isDark?"dark":"light")+" q-skeleton--type-"+this.type+("none"!==this.animation?" q-skeleton--anim-"+this.animation:"")+(!0===this.square?" q-skeleton--square":"")+(!0===this.bordered?" q-skeleton--bordered":"")}},render:function(t){return t(this.tag,{staticClass:"q-skeleton",class:this.classes,style:this.style,on:this.$listeners},$r(this,"default"))}}),Gs=[["left","center","start","width"],["right","center","end","width"],["top","start","center","height"],["bottom","end","center","height"]],Zs=t.extend({name:"QSlideItem",mixins:[nt],props:{leftColor:String,rightColor:String,topColor:String,bottomColor:String},directives:{TouchPan:qe},computed:{langDir:function(){return!0===this.$q.lang.rtl?{left:"right",right:"left"}:{left:"left",right:"right"}}},methods:{reset:function(){this.$refs.content.style.transform="translate(0,0)"},__pan:function(t){var e,i,s,n=this,o=this.$refs.content;if(t.isFirst)this.__dir=null,this.__size={left:0,right:0,top:0,bottom:0},this.__scale=0,o.classList.add("no-transition"),Gs.forEach(function(t){if(void 0!==n.$scopedSlots[t[0]]){var e=n.$refs[t[0]+"Content"];e.style.transform="scale(1)",n.__size[t[0]]=e.getBoundingClientRect()[t[3]]}}),this.__axis="up"===t.direction||"down"===t.direction?"Y":"X";else{if(t.isFinal)return o.classList.remove("no-transition"),void(1===this.__scale?(o.style.transform="translate"+this.__axis+"("+100*this.__dir+"%)",this.timer=setTimeout(function(){n.$emit(n.__showing,{reset:n.reset}),n.$emit("action",{side:n.__showing,reset:n.reset})},230)):o.style.transform="translate(0,0)");t.direction="X"===this.__axis?t.offset.x<0?"left":"right":t.offset.y<0?"up":"down"}void 0===this.$scopedSlots.left&&t.direction===this.langDir.right||void 0===this.$scopedSlots.right&&t.direction===this.langDir.left||void 0===this.$scopedSlots.top&&"down"===t.direction||void 0===this.$scopedSlots.bottom&&"up"===t.direction?o.style.transform="translate(0,0)":("X"===this.__axis?(i="left"===t.direction?-1:1,e=1===i?this.langDir.left:this.langDir.right,s=t.distance.x):(i="up"===t.direction?-2:2,e=2===i?"top":"bottom",s=t.distance.y),null!==this.__dir&&Math.abs(i)!==Math.abs(this.__dir)||(this.__dir!==i&&(["left","right","top","bottom"].forEach(function(t){void 0!==n.$refs[t]&&(n.$refs[t].style.visibility=e===t?"visible":"hidden")}),this.__showing=e,this.__dir=i),this.__scale=Math.max(0,Math.min(1,(s-40)/this.__size[e])),o.style.transform="translate"+this.__axis+"("+s*i/Math.abs(i)+"px)",this.$refs[e+"Content"].style.transform="scale("+this.__scale+")"))}},render:function(t){var e=this,i=[],s=void 0!==this.$scopedSlots[this.langDir.right],n=void 0!==this.$scopedSlots[this.langDir.left],o=void 0!==this.$scopedSlots.bottom,r=void 0!==this.$scopedSlots.top;return Gs.forEach(function(s){var n=s[0];void 0!==e.$scopedSlots[n]&&i.push(t("div",{ref:n,class:"q-slide-item__"+n+" absolute-full row no-wrap items-"+s[1]+" justify-"+s[2]+(void 0!==e[n+"Color"]?" bg-"+e[n+"Color"]:"")},[t("div",{ref:n+"Content"},e.$scopedSlots[n]())]))}),i.push(t("div",{ref:"content",key:"content",staticClass:"q-slide-item__content",directives:!0===s||!0===n||!0===o||!0===r?[{name:"touch-pan",value:this.__pan,modifiers:{left:s,right:n,up:o,down:r,prevent:!0,stop:!0,mouse:!0}}]:null},$r(this,"default"))),t("div",{staticClass:"q-slide-item q-item-type overflow-hidden",class:!0===this.isDark?"q-slide-item--dark q-dark":"",on:this.$listeners},i)},beforeDestroy:function(){clearTimeout(this.timer)}}),Js=t.extend({name:"QSpace",render:function(t){return t("div",{staticClass:"q-space",on:this.$listeners})}}),tn=t.extend({name:"QSpinnerAudio",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",fill:"currentColor",width:this.cSize,height:this.cSize,viewBox:"0 0 55 80",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{transform:"matrix(1 0 0 -1 0 80)"}},[t("rect",{attrs:{width:"10",height:"20",rx:"3"}},[t("animate",{attrs:{attributeName:"height",begin:"0s",dur:"4.3s",values:"20;45;57;80;64;32;66;45;64;23;66;13;64;56;34;34;2;23;76;79;20",calcMode:"linear",repeatCount:"indefinite"}})]),t("rect",{attrs:{x:"15",width:"10",height:"80",rx:"3"}},[t("animate",{attrs:{attributeName:"height",begin:"0s",dur:"2s",values:"80;55;33;5;75;23;73;33;12;14;60;80",calcMode:"linear",repeatCount:"indefinite"}})]),t("rect",{attrs:{x:"30",width:"10",height:"50",rx:"3"}},[t("animate",{attrs:{attributeName:"height",begin:"0s",dur:"1.4s",values:"50;34;78;23;56;23;34;76;80;54;21;50",calcMode:"linear",repeatCount:"indefinite"}})]),t("rect",{attrs:{x:"45",width:"10",height:"30",rx:"3"}},[t("animate",{attrs:{attributeName:"height",begin:"0s",dur:"2s",values:"30;45;13;80;56;72;45;76;34;23;67;30",calcMode:"linear",repeatCount:"indefinite"}})])])])}}),en=t.extend({name:"QSpinnerBall",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",stroke:"currentColor",width:this.cSize,height:this.cSize,viewBox:"0 0 57 57",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{transform:"translate(1 1)","stroke-width":"2",fill:"none","fill-rule":"evenodd"}},[t("circle",{attrs:{cx:"5",cy:"50",r:"5"}},[t("animate",{attrs:{attributeName:"cy",begin:"0s",dur:"2.2s",values:"50;5;50;50",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"cx",begin:"0s",dur:"2.2s",values:"5;27;49;5",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"27",cy:"5",r:"5"}},[t("animate",{attrs:{attributeName:"cy",begin:"0s",dur:"2.2s",from:"5",to:"5",values:"5;50;50;5",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"cx",begin:"0s",dur:"2.2s",from:"27",to:"27",values:"27;49;5;27",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"49",cy:"50",r:"5"}},[t("animate",{attrs:{attributeName:"cy",begin:"0s",dur:"2.2s",values:"50;50;5;50",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"cx",from:"49",to:"49",begin:"0s",dur:"2.2s",values:"49;5;27;49",calcMode:"linear",repeatCount:"indefinite"}})])])])}}),sn=t.extend({name:"QSpinnerBars",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",fill:"currentColor",width:this.cSize,height:this.cSize,viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg"}},[t("rect",{attrs:{y:"10",width:"15",height:"120",rx:"6"}},[t("animate",{attrs:{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"}})]),t("rect",{attrs:{x:"30",y:"10",width:"15",height:"120",rx:"6"}},[t("animate",{attrs:{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"}})]),t("rect",{attrs:{x:"60",width:"15",height:"140",rx:"6"}},[t("animate",{attrs:{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"}})]),t("rect",{attrs:{x:"90",y:"10",width:"15",height:"120",rx:"6"}},[t("animate",{attrs:{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"}})]),t("rect",{attrs:{x:"120",y:"10",width:"15",height:"120",rx:"6"}},[t("animate",{attrs:{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"}})])])}}),nn=t.extend({name:"QSpinnerComment",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",width:this.cSize,height:this.cSize,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"}},[t("rect",{attrs:{x:"0",y:"0",width:"100",height:"100",fill:"none"}}),t("path",{attrs:{d:"M78,19H22c-6.6,0-12,5.4-12,12v31c0,6.6,5.4,12,12,12h37.2c0.4,3,1.8,5.6,3.7,7.6c2.4,2.5,5.1,4.1,9.1,4 c-1.4-2.1-2-7.2-2-10.3c0-0.4,0-0.8,0-1.3h8c6.6,0,12-5.4,12-12V31C90,24.4,84.6,19,78,19z",fill:"currentColor"}}),t("circle",{attrs:{cx:"30",cy:"47",r:"5",fill:"#fff"}},[t("animate",{attrs:{attributeName:"opacity",from:"0",to:"1",values:"0;1;1",keyTimes:"0;0.2;1",dur:"1s",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"50",cy:"47",r:"5",fill:"#fff"}},[t("animate",{attrs:{attributeName:"opacity",from:"0",to:"1",values:"0;0;1;1",keyTimes:"0;0.2;0.4;1",dur:"1s",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"70",cy:"47",r:"5",fill:"#fff"}},[t("animate",{attrs:{attributeName:"opacity",from:"0",to:"1",values:"0;0;1;1",keyTimes:"0;0.4;0.6;1",dur:"1s",repeatCount:"indefinite"}})])])}}),on=t.extend({name:"QSpinnerCube",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",width:this.cSize,height:this.cSize,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"}},[t("rect",{attrs:{x:"0",y:"0",width:"100",height:"100",fill:"none"}}),t("g",{attrs:{transform:"translate(25 25)"}},[t("rect",{attrs:{x:"-20",y:"-20",width:"40",height:"40",fill:"currentColor",opacity:"0.9"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"scale",from:"1.5",to:"1",repeatCount:"indefinite",begin:"0s",dur:"1s",calcMode:"spline",keySplines:"0.2 0.8 0.2 0.8",keyTimes:"0;1"}})])]),t("g",{attrs:{transform:"translate(75 25)"}},[t("rect",{attrs:{x:"-20",y:"-20",width:"40",height:"40",fill:"currentColor",opacity:"0.8"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"scale",from:"1.5",to:"1",repeatCount:"indefinite",begin:"0.1s",dur:"1s",calcMode:"spline",keySplines:"0.2 0.8 0.2 0.8",keyTimes:"0;1"}})])]),t("g",{attrs:{transform:"translate(25 75)"}},[t("rect",{staticClass:"cube",attrs:{x:"-20",y:"-20",width:"40",height:"40",fill:"currentColor",opacity:"0.7"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"scale",from:"1.5",to:"1",repeatCount:"indefinite",begin:"0.3s",dur:"1s",calcMode:"spline",keySplines:"0.2 0.8 0.2 0.8",keyTimes:"0;1"}})])]),t("g",{attrs:{transform:"translate(75 75)"}},[t("rect",{staticClass:"cube",attrs:{x:"-20",y:"-20",width:"40",height:"40",fill:"currentColor",opacity:"0.6"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"scale",from:"1.5",to:"1",repeatCount:"indefinite",begin:"0.2s",dur:"1s",calcMode:"spline",keySplines:"0.2 0.8 0.2 0.8",keyTimes:"0;1"}})])])])}}),rn=t.extend({name:"QSpinnerDots",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",fill:"currentColor",width:this.cSize,height:this.cSize,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg"}},[t("circle",{attrs:{cx:"15",cy:"15",r:"15"}},[t("animate",{attrs:{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"60",cy:"15",r:"9","fill-opacity":".3"}},[t("animate",{attrs:{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"fill-opacity",from:".5",to:".5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"105",cy:"15",r:"15"}},[t("animate",{attrs:{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"}})])])}}),an=t.extend({name:"QSpinnerFacebook",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",width:this.cSize,height:this.cSize,viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"}},[t("g",{attrs:{transform:"translate(20 50)"}},[t("rect",{attrs:{x:"-10",y:"-30",width:"20",height:"60",fill:"currentColor",opacity:"0.6"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"scale",from:"2",to:"1",begin:"0s",repeatCount:"indefinite",dur:"1s",calcMode:"spline",keySplines:"0.1 0.9 0.4 1",keyTimes:"0;1",values:"2;1"}})])]),t("g",{attrs:{transform:"translate(50 50)"}},[t("rect",{attrs:{x:"-10",y:"-30",width:"20",height:"60",fill:"currentColor",opacity:"0.8"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"scale",from:"2",to:"1",begin:"0.1s",repeatCount:"indefinite",dur:"1s",calcMode:"spline",keySplines:"0.1 0.9 0.4 1",keyTimes:"0;1",values:"2;1"}})])]),t("g",{attrs:{transform:"translate(80 50)"}},[t("rect",{attrs:{x:"-10",y:"-30",width:"20",height:"60",fill:"currentColor",opacity:"0.9"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"scale",from:"2",to:"1",begin:"0.2s",repeatCount:"indefinite",dur:"1s",calcMode:"spline",keySplines:"0.1 0.9 0.4 1",keyTimes:"0;1",values:"2;1"}})])])])}}),ln=t.extend({name:"QSpinnerGears",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",width:this.cSize,height:this.cSize,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{transform:"translate(-20,-20)"}},[t("path",{attrs:{d:"M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z",fill:"currentColor"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"90 50 50",to:"0 50 50",dur:"1s",repeatCount:"indefinite"}})])]),t("g",{attrs:{transform:"translate(20,20) rotate(15 50 50)"}},[t("path",{attrs:{d:"M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z",fill:"currentColor"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 50 50",to:"90 50 50",dur:"1s",repeatCount:"indefinite"}})])])])}}),cn=t.extend({name:"QSpinnerGrid",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",fill:"currentColor",width:this.cSize,height:this.cSize,viewBox:"0 0 105 105",xmlns:"http://www.w3.org/2000/svg"}},[t("circle",{attrs:{cx:"12.5",cy:"12.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"0s",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"12.5",cy:"52.5",r:"12.5","fill-opacity":".5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"100ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"52.5",cy:"12.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"300ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"52.5",cy:"52.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"600ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"92.5",cy:"12.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"800ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"92.5",cy:"52.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"400ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"12.5",cy:"92.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"700ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"52.5",cy:"92.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"500ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"92.5",cy:"92.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"200ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})])])}}),un=t.extend({name:"QSpinnerHearts",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",fill:"currentColor",width:this.cSize,height:this.cSize,viewBox:"0 0 140 64",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:"M30.262 57.02L7.195 40.723c-5.84-3.976-7.56-12.06-3.842-18.063 3.715-6 11.467-7.65 17.306-3.68l4.52 3.76 2.6-5.274c3.716-6.002 11.47-7.65 17.304-3.68 5.84 3.97 7.56 12.054 3.842 18.062L34.49 56.118c-.897 1.512-2.793 1.915-4.228.9z","fill-opacity":".5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"0s",dur:"1.4s",values:"0.5;1;0.5",calcMode:"linear",repeatCount:"indefinite"}})]),t("path",{attrs:{d:"M105.512 56.12l-14.44-24.272c-3.716-6.008-1.996-14.093 3.843-18.062 5.835-3.97 13.588-2.322 17.306 3.68l2.6 5.274 4.52-3.76c5.84-3.97 13.593-2.32 17.308 3.68 3.718 6.003 1.998 14.088-3.842 18.064L109.74 57.02c-1.434 1.014-3.33.61-4.228-.9z","fill-opacity":".5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"0.7s",dur:"1.4s",values:"0.5;1;0.5",calcMode:"linear",repeatCount:"indefinite"}})]),t("path",{attrs:{d:"M67.408 57.834l-23.01-24.98c-5.864-6.15-5.864-16.108 0-22.248 5.86-6.14 15.37-6.14 21.234 0L70 16.168l4.368-5.562c5.863-6.14 15.375-6.14 21.235 0 5.863 6.14 5.863 16.098 0 22.247l-23.007 24.98c-1.43 1.556-3.757 1.556-5.188 0z"}})])}}),hn=t.extend({name:"QSpinnerHourglass",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",width:this.cSize,height:this.cSize,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"}},[t("g",[t("path",{staticClass:"glass",attrs:{fill:"none",stroke:"currentColor","stroke-width":"5","stroke-miterlimit":"10",d:"M58.4,51.7c-0.9-0.9-1.4-2-1.4-2.3s0.5-0.4,1.4-1.4 C70.8,43.8,79.8,30.5,80,15.5H70H30H20c0.2,15,9.2,28.1,21.6,32.3c0.9,0.9,1.4,1.2,1.4,1.5s-0.5,1.6-1.4,2.5 C29.2,56.1,20.2,69.5,20,85.5h10h40h10C79.8,69.5,70.8,55.9,58.4,51.7z"}}),t("clipPath",{attrs:{id:"uil-hourglass-clip1"}},[t("rect",{staticClass:"clip",attrs:{x:"15",y:"20",width:"70",height:"25"}},[t("animate",{attrs:{attributeName:"height",from:"25",to:"0",dur:"1s",repeatCount:"indefinite",values:"25;0;0",keyTimes:"0;0.5;1"}}),t("animate",{attrs:{attributeName:"y",from:"20",to:"45",dur:"1s",repeatCount:"indefinite",values:"20;45;45",keyTimes:"0;0.5;1"}})])]),t("clipPath",{attrs:{id:"uil-hourglass-clip2"}},[t("rect",{staticClass:"clip",attrs:{x:"15",y:"55",width:"70",height:"25"}},[t("animate",{attrs:{attributeName:"height",from:"0",to:"25",dur:"1s",repeatCount:"indefinite",values:"0;25;25",keyTimes:"0;0.5;1"}}),t("animate",{attrs:{attributeName:"y",from:"80",to:"55",dur:"1s",repeatCount:"indefinite",values:"80;55;55",keyTimes:"0;0.5;1"}})])]),t("path",{staticClass:"sand",attrs:{d:"M29,23c3.1,11.4,11.3,19.5,21,19.5S67.9,34.4,71,23H29z","clip-path":"url(#uil-hourglass-clip1)",fill:"currentColor"}}),t("path",{staticClass:"sand",attrs:{d:"M71.6,78c-3-11.6-11.5-20-21.5-20s-18.5,8.4-21.5,20H71.6z","clip-path":"url(#uil-hourglass-clip2)",fill:"currentColor"}}),t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 50 50",to:"180 50 50",repeatCount:"indefinite",dur:"1s",values:"0 50 50;0 50 50;180 50 50",keyTimes:"0;0.7;1"}})])])}}),dn=t.extend({name:"QSpinnerInfinity",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",width:this.cSize,height:this.cSize,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"}},[t("path",{attrs:{d:"M24.3,30C11.4,30,5,43.3,5,50s6.4,20,19.3,20c19.3,0,32.1-40,51.4-40C88.6,30,95,43.3,95,50s-6.4,20-19.3,20C56.4,70,43.6,30,24.3,30z",fill:"none",stroke:"currentColor","stroke-width":"8","stroke-dasharray":"10.691205342610678 10.691205342610678","stroke-dashoffset":"0"}},[t("animate",{attrs:{attributeName:"stroke-dashoffset",from:"0",to:"21.382410685221355",begin:"0",dur:"2s",repeatCount:"indefinite",fill:"freeze"}})])])}}),pn=t.extend({name:"QSpinnerIos",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",width:this.cSize,height:this.cSize,stroke:"currentColor",fill:"currentColor",viewBox:"0 0 64 64"}},[t("g",{attrs:{"stroke-width":"4","stroke-linecap":"round"}},[t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(180)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:"1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(210)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:"0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(240)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".1;0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(270)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".15;.1;0;1;.85;.7;.65;.55;.45;.35;.25;.15",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(300)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".25;.15;.1;0;1;.85;.7;.65;.55;.45;.35;.25",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(330)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".35;.25;.15;.1;0;1;.85;.7;.65;.55;.45;.35",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(0)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".45;.35;.25;.15;.1;0;1;.85;.7;.65;.55;.45",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(30)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".55;.45;.35;.25;.15;.1;0;1;.85;.7;.65;.55",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(60)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".65;.55;.45;.35;.25;.15;.1;0;1;.85;.7;.65",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(90)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".7;.65;.55;.45;.35;.25;.15;.1;0;1;.85;.7",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(120)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".85;.7;.65;.55;.45;.35;.25;.15;.1;0;1;.85",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(150)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:"1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1",repeatCount:"indefinite"}})])])])}}),fn=t.extend({name:"QSpinnerOval",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",stroke:"currentColor",width:this.cSize,height:this.cSize,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{transform:"translate(1 1)","stroke-width":"2",fill:"none","fill-rule":"evenodd"}},[t("circle",{attrs:{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}}),t("path",{attrs:{d:"M36 18c0-9.94-8.06-18-18-18"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"}})])])])}}),mn=t.extend({name:"QSpinnerPie",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",width:this.cSize,height:this.cSize,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:"M0 50A50 50 0 0 1 50 0L50 50L0 50",fill:"currentColor",opacity:"0.5"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 50 50",to:"360 50 50",dur:"0.8s",repeatCount:"indefinite"}})]),t("path",{attrs:{d:"M50 0A50 50 0 0 1 100 50L50 50L50 0",fill:"currentColor",opacity:"0.5"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 50 50",to:"360 50 50",dur:"1.6s",repeatCount:"indefinite"}})]),t("path",{attrs:{d:"M100 50A50 50 0 0 1 50 100L50 50L100 50",fill:"currentColor",opacity:"0.5"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 50 50",to:"360 50 50",dur:"2.4s",repeatCount:"indefinite"}})]),t("path",{attrs:{d:"M50 100A50 50 0 0 1 0 50L50 50L50 100",fill:"currentColor",opacity:"0.5"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 50 50",to:"360 50 50",dur:"3.2s",repeatCount:"indefinite"}})])])}}),vn=t.extend({name:"QSpinnerPuff",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",stroke:"currentColor",width:this.cSize,height:this.cSize,viewBox:"0 0 44 44",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{fill:"none","fill-rule":"evenodd","stroke-width":"2"}},[t("circle",{attrs:{cx:"22",cy:"22",r:"1"}},[t("animate",{attrs:{attributeName:"r",begin:"0s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"stroke-opacity",begin:"0s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"22",cy:"22",r:"1"}},[t("animate",{attrs:{attributeName:"r",begin:"-0.9s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"stroke-opacity",begin:"-0.9s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"}})])])])}}),gn=t.extend({name:"QSpinnerRadio",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",width:this.cSize,height:this.cSize,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{transform:"scale(0.55)"}},[t("circle",{attrs:{cx:"30",cy:"150",r:"30",fill:"currentColor"}},[t("animate",{attrs:{attributeName:"opacity",from:"0",to:"1",dur:"1s",begin:"0",repeatCount:"indefinite",keyTimes:"0;0.5;1",values:"0;1;1"}})]),t("path",{attrs:{d:"M90,150h30c0-49.7-40.3-90-90-90v30C63.1,90,90,116.9,90,150z",fill:"currentColor"}},[t("animate",{attrs:{attributeName:"opacity",from:"0",to:"1",dur:"1s",begin:"0.1",repeatCount:"indefinite",keyTimes:"0;0.5;1",values:"0;1;1"}})]),t("path",{attrs:{d:"M150,150h30C180,67.2,112.8,0,30,0v30C96.3,30,150,83.7,150,150z",fill:"currentColor"}},[t("animate",{attrs:{attributeName:"opacity",from:"0",to:"1",dur:"1s",begin:"0.2",repeatCount:"indefinite",keyTimes:"0;0.5;1",values:"0;1;1"}})])])])}}),_n=t.extend({name:"QSpinnerRings",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",stroke:"currentColor",width:this.cSize,height:this.cSize,viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{fill:"none","fill-rule":"evenodd",transform:"translate(1 1)","stroke-width":"2"}},[t("circle",{attrs:{cx:"22",cy:"22",r:"6"}},[t("animate",{attrs:{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"22",cy:"22",r:"6"}},[t("animate",{attrs:{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"22",cy:"22",r:"8"}},[t("animate",{attrs:{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}})])])])}}),bn=t.extend({name:"QSpinnerTail",mixins:[mt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,on:this.$listeners,attrs:{focusable:"false",width:this.cSize,height:this.cSize,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg"}},[t("defs",[t("linearGradient",{attrs:{x1:"8.042%",y1:"0%",x2:"65.682%",y2:"23.865%",id:"a"}},[t("stop",{attrs:{"stop-color":"currentColor","stop-opacity":"0",offset:"0%"}}),t("stop",{attrs:{"stop-color":"currentColor","stop-opacity":".631",offset:"63.146%"}}),t("stop",{attrs:{"stop-color":"currentColor",offset:"100%"}})])]),t("g",{attrs:{transform:"translate(1 1)",fill:"none","fill-rule":"evenodd"}},[t("path",{attrs:{d:"M36 18c0-9.94-8.06-18-18-18",stroke:"url(#a)","stroke-width":"2"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.9s",repeatCount:"indefinite"}})]),t("circle",{attrs:{fill:"currentColor",cx:"36",cy:"18",r:"1"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.9s",repeatCount:"indefinite"}})])])])}}),yn=t.extend({name:"QSplitter",mixins:[nt],directives:{TouchPan:qe},props:{value:{type:Number,required:!0},reverse:Boolean,unit:{type:String,default:"%",validator:function(t){return["%","px"].includes(t)}},limits:{type:Array,validator:function(t){return 2===t.length&&("number"==typeof t[0]&&"number"==typeof t[1]&&(t[0]>=0&&t[0]<=t[1]))}},emitImmediately:Boolean,horizontal:Boolean,disable:Boolean,beforeClass:[Array,String,Object],afterClass:[Array,String,Object],separatorClass:[Array,String,Object],separatorStyle:[Array,String,Object]},watch:{value:{immediate:!0,handler:function(t){this.__normalize(t,this.computedLimits)}},limits:{deep:!0,handler:function(){var t=this;this.$nextTick(function(){t.__normalize(t.value,t.computedLimits)})}}},computed:{classes:function(){return(!0===this.horizontal?"column":"row")+" q-splitter--"+(!0===this.horizontal?"horizontal":"vertical")+" q-splitter--"+(!0===this.disable?"disabled":"workable")+(!0===this.isDark?" q-splitter--dark":"")},prop:function(){return!0===this.horizontal?"height":"width"},side:function(){return!0!==this.reverse?"before":"after"},computedLimits:function(){return void 0!==this.limits?this.limits:"%"===this.unit?[10,90]:[50,1/0]},styles:function(){var t,e;return(e={})[this.side]=((t={})[this.prop]=this.__getCSSValue(this.value),t),e}},methods:{__pan:function(t){if(!0===t.isFirst){var e=this.$el.getBoundingClientRect()[this.prop];return this.__dir=!0===this.horizontal?"up":"left",this.__maxValue="%"===this.unit?100:e,this.__value=Math.min(this.__maxValue,this.computedLimits[1],Math.max(this.computedLimits[0],this.value)),this.__multiplier=(!0!==this.reverse?1:-1)*(!0===this.horizontal?1:!0===this.$q.lang.rtl?-1:1)*("%"===this.unit?0===e?0:100/e:1),void this.$el.classList.add("q-splitter--active")}if(!0===t.isFinal)return this.__normalized!==this.value&&this.$emit("input",this.__normalized),void this.$el.classList.remove("q-splitter--active");var i=this.__value+this.__multiplier*(t.direction===this.__dir?-1:1)*t.distance[!0===this.horizontal?"y":"x"];this.__normalized=Math.min(this.__maxValue,this.computedLimits[1],Math.max(this.computedLimits[0],i)),this.$refs[this.side].style[this.prop]=this.__getCSSValue(this.__normalized),!0===this.emitImmediately&&this.value!==this.__normalized&&this.$emit("input",this.__normalized)},__normalize:function(t,e){te[1]&&this.$emit("input",e[1])},__getCSSValue:function(t){return("%"===this.unit?t:Math.round(t))+this.unit}},render:function(t){var e=[t("div",{ref:"before",staticClass:"q-splitter__panel q-splitter__before"+(!0===this.reverse?" col":""),style:this.styles.before,class:this.beforeClass,on:Hr(this,"stop",{input:ir})},$r(this,"before")),t("div",{staticClass:"q-splitter__separator",style:this.separatorStyle,class:this.separatorClass},[t("div",{staticClass:"absolute-full q-splitter__separator-area",directives:!0===this.disable?void 0:Hr(this,"dir#"+this.horizontal,[{name:"touch-pan",value:this.__pan,modifiers:{horizontal:!0!==this.horizontal,vertical:this.horizontal,prevent:!0,stop:!0,mouse:!0,mouseAllDir:!0}}])},$r(this,"separator"))]),t("div",{ref:"after",staticClass:"q-splitter__panel q-splitter__after"+(!0===this.reverse?"":" col"),style:this.styles.after,class:this.afterClass,on:Hr(this,"stop",{input:ir})},$r(this,"after"))];return t("div",{staticClass:"q-splitter no-wrap",class:this.classes,on:this.$listeners},Mr(e,this,"default"))}}),wn=t.extend({name:"StepHeader",directives:{Ripple:_t},props:{stepper:{},step:{}},computed:{isActive:function(){return this.stepper.value===this.step.name},isDisable:function(){var t=this.step.disable;return!0===t||""===t},isError:function(){var t=this.step.error;return!0===t||""===t},isDone:function(){var t=this.step.done;return!this.isDisable&&(!0===t||""===t)},headerNav:function(){var t=this.step.headerNav,e=!0===t||""===t||void 0===t;return!this.isDisable&&this.stepper.headerNav&&(this.isActive||e)},hasPrefix:function(){return this.step.prefix&&!this.isActive&&!this.isError&&!this.isDone},icon:function(){return this.isActive?this.step.activeIcon||this.stepper.activeIcon||this.$q.iconSet.stepper.active:this.isError?this.step.errorIcon||this.stepper.errorIcon||this.$q.iconSet.stepper.error:!this.isDisable&&this.isDone?this.step.doneIcon||this.stepper.doneIcon||this.$q.iconSet.stepper.done:this.step.icon||this.stepper.inactiveIcon},color:function(){return this.isActive?this.step.activeColor||this.stepper.activeColor||this.step.color:this.isError?this.step.errorColor||this.stepper.errorColor:!this.disable&&this.isDone?this.step.doneColor||this.stepper.doneColor||this.step.color||this.stepper.inactiveColor:this.step.color||this.stepper.inactiveColor},classes:function(){var t;return(t={})["text-"+this.color]=this.color,t["q-stepper__tab--error"]=this.isError,t["q-stepper__tab--active"]=this.isActive,t["q-stepper__tab--done"]=this.isDone,t["q-stepper__tab--navigation q-focusable q-hoverable"]=this.headerNav,t["q-stepper__tab--disabled"]=this.isDisable,t}},methods:{activate:function(){void 0!==this.$refs.blurTarget&&this.$refs.blurTarget.focus(),!this.isActive&&this.stepper.goTo(this.step.name)},keyup:function(t){13===t.keyCode&&!this.isActive&&this.stepper.goTo(this.step.name)}},render:function(t){var e={staticClass:"q-stepper__tab col-grow flex items-center no-wrap relative-position",class:this.classes,directives:this.stepper.headerNav?[{name:"ripple",value:this.headerNav}]:null};return this.headerNav&&(e.on={click:this.activate,keyup:this.keyup},e.attrs={tabindex:!0===this.isDisable?-1:this.$attrs.tabindex||0}),t("div",e,[t("div",{staticClass:"q-focus-helper",attrs:{tabindex:-1},ref:"blurTarget"}),t("div",{staticClass:"q-stepper__dot row flex-center q-stepper__line relative-position"},[t("span",{staticClass:"row flex-center"},[!0===this.hasPrefix?this.step.prefix:t(et,{props:{name:this.icon}})])]),this.step.title?t("div",{staticClass:"q-stepper__label q-stepper__line relative-position"},[t("div",{staticClass:"q-stepper__title"},[this.step.title]),this.step.caption?t("div",{staticClass:"q-stepper__caption"},[this.step.caption]):null]):null])}}),Sn=t.extend({name:"QStepWrapper",render:function(t){return t("div",{staticClass:"q-stepper__step-content"},[t("div",{staticClass:"q-stepper__step-inner"},$r(this,"default"))])}}),Cn=t.extend({name:"QStep",inject:{stepper:{default:function(){console.error("QStep needs to be child of QStepper")}}},mixins:[ee],props:{icon:String,color:String,title:{type:String,required:!0},caption:String,prefix:[String,Number],doneIcon:String,doneColor:String,activeIcon:String,activeColor:String,errorIcon:String,errorColor:String,headerNav:{type:Boolean,default:!0},done:Boolean,error:Boolean},computed:{isActive:function(){return this.stepper.value===this.name}},watch:{isActive:function(t){var e=this;!0===t&&!0===this.stepper.vertical&&this.$nextTick(function(){void 0!==e.$el&&(e.$el.scrollTop=0)})}},render:function(t){var e=this.stepper.vertical,i=!0===e&&!0===this.stepper.keepAlive?t("keep-alive",!0===this.isActive?[t(Sn,{key:this.name},$r(this,"default"))]:void 0):!0!==e||!0===this.isActive?Sn.options.render.call(this,t):void 0;return t("div",{staticClass:"q-stepper__step",on:this.$listeners},!0===e?[t(wn,{props:{stepper:this.stepper,step:this}}),!0===this.stepper.animated?t(ji,[i]):i]:[i])}}),xn=t.extend({name:"QStepper",provide:function(){return{stepper:this}},mixins:[nt,te],props:{flat:Boolean,bordered:Boolean,alternativeLabels:Boolean,headerNav:Boolean,contracted:Boolean,inactiveColor:String,inactiveIcon:String,doneIcon:String,doneColor:String,activeIcon:String,activeColor:String,errorIcon:String,errorColor:String},computed:{classes:function(){return"q-stepper--"+(!0===this.vertical?"vertical":"horizontal")+(!0===this.flat||!0===this.isDark?" q-stepper--flat no-shadow":"")+(!0===this.bordered||!0===this.isDark&&!1===this.flat?" q-stepper--bordered":"")+(!0===this.contracted?" q-stepper--contracted":"")+(!0===this.isDark?" q-stepper--dark q-dark":"")}},methods:{__getContent:function(t){var e,i=this,s=$r(this,"message",[]);return!0===this.vertical?(this.__isValidPanelName(this.value)&&this.__updatePanelIndex(),s.concat(t("div",{staticClass:"q-stepper__content",on:Hr(this,"stop",{input:ir})},$r(this,"default")))):[t("div",{staticClass:"q-stepper__header row items-stretch justify-between",class:(e={},e["q-stepper__header--"+(this.alternativeLabels?"alternative":"standard")+"-labels"]=!0,e["q-stepper__header--border"]=!this.flat||this.bordered,e)},this.__getAllPanels().map(function(e){var s=e.componentOptions.propsData;return t(wn,{key:s.name,props:{stepper:i,step:s}})}))].concat(s,t("div",{staticClass:"q-stepper__content q-panel-parent",directives:this.panelDirectives},this.__getPanelContent(t)))},__renderPanels:function(t){return t("div",{staticClass:"q-stepper",class:this.classes,on:this.$listeners},Mr(this.__getContent(t),this,"navigation"))}}}),kn=t.extend({name:"QStepperNavigation",render:function(t){return t("div",{staticClass:"q-stepper__nav",on:this.$listeners},$r(this,"default"))}}),qn=t.extend({name:"QTh",props:{props:Object,autoWidth:Boolean},render:function(t){var e,i,s=this,n=this.$listeners;if(void 0===this.props)return t("th",{on:n,class:!0===this.autoWidth?"q-table--col-auto-width":null},$r(this,"default"));var o=this.$vnode.key;if(o){if(void 0===(e=this.props.colsMap[o]))return}else e=this.props.col;if(!0===e.sortable){var r="right"===e.align?"unshift":"push";(i=Tr(this,"default",[]))[r](t(et,{props:{name:this.$q.iconSet.table.arrowUp},staticClass:e.__iconClass}))}else i=$r(this,"default");var a=!0===e.sortable?{click:function(t){s.props.sort(e),s.$emit("click",t)}}:{};return t("th",{on:Object.assign({},n,a),style:e.__thStyle,class:e.__thClass+(!0===this.autoWidth?" q-table--col-auto-width":"")},i)}}),$n={methods:{getTableHeader:function(t){var e=this.getTableHeaderRow(t);return!0===this.loading&&void 0===this.$scopedSlots.loading&&e.push(t("tr",{staticClass:"q-table__progress"},[t("th",{staticClass:"relative-position",attrs:{colspan:"100%"}},this.__getProgress(t))])),t("thead",e)},getTableHeaderRow:function(t){var e,i=this,s=this.$scopedSlots.header,n=this.$scopedSlots["header-cell"];if(void 0!==s)return s(this.addTableHeaderRowMeta({header:!0,cols:this.computedCols,sort:this.sort,colsMap:this.computedColsMap})).slice();e=void 0!==n?function(t){return n({col:t,cols:i.computedCols,sort:i.sort,colsMap:i.computedColsMap})}:function(e){var s={col:e,cols:i.computedCols,sort:i.sort,colsMap:i.computedColsMap},n=i.$scopedSlots["header-cell-"+e.name];return void 0!==n?n(s):t(qn,{key:e.name,props:{props:s},style:e.headerStyle,class:e.headerClasses},e.label)};var o=this.computedCols.map(e);return!0===this.singleSelection&&!0!==this.grid?o.unshift(t("th",{staticClass:"q-table--col-auto-width"},[" "])):!0===this.multipleSelection&&o.unshift(t("th",{staticClass:"q-table--col-auto-width"},[t(pe,{props:{color:this.color,value:!0===this.someRowsSelected?null:this.allRowsSelected,dark:this.isDark,dense:this.dense},on:Hr(this,"inp",{input:function(t){!0===i.someRowsSelected&&(t=!1),i.__updateSelection(i.computedRows.map(i.getRowKey),i.computedRows,t)}})})])),[t("tr",{style:this.tableHeaderStyle,class:this.tableHeaderClass},o)]},addTableHeaderRowMeta:function(t){var e=this;return!0===this.multipleSelection&&(Object.defineProperty(t,"selected",{get:function(){return!0===e.someRowsSelected?"some":e.allRowsSelected},set:function(t){!0===e.someRowsSelected&&(t=!1),e.__updateSelection(e.computedRows.map(e.getRowKey),e.computedRows,t)},configurable:!0,enumerable:!0}),t.partialSelected=this.someRowsSelected,t.multipleSelect=!0),t}}},Tn={methods:{getTableRowBody:function(t,e){var i=this.getRowKey(t),s=this.isRowSelected(i);return e(this.addBodyRowMeta({key:i,row:t,cols:this.computedCols,colsMap:this.computedColsMap,__trClass:s?"selected":""}))},getTableRow:function(t,e){var i=this,s=this.$scopedSlots["body-cell"],n=this.getRowKey(e),o=this.isRowSelected(n),r=s?this.computedCols.map(function(t){return s(i.addBodyCellMetaData({row:e,col:t}))}):this.computedCols.map(function(s){var n=i.$scopedSlots["body-cell-"+s.name];return void 0!==n?n(i.addBodyCellMetaData({row:e,col:s})):t("td",{class:s.__tdClass,style:s.__tdStyle},i.getCellValue(s,e))});!0===this.hasSelectionMode&&r.unshift(t("td",{staticClass:"q-table--col-auto-width"},[t(pe,{props:{value:o,color:this.color,dark:this.isDark,dense:this.dense},on:{input:function(t){i.__updateSelection([n],[e],t)}}})]));var a={key:n,class:{selected:o},on:{}};return void 0!==this.$listeners["row-click"]&&(a.class["cursor-pointer"]=!0,a.on.click=function(t){i.$emit("row-click",t,e)}),void 0!==this.$listeners["row-dblclick"]&&(a.class["cursor-pointer"]=!0,a.on.dblclick=function(t){i.$emit("row-dblclick",t,e)}),t("tr",a,r)},getTableBody:function(t){var e=this,i=this.$scopedSlots.body,s=this.$scopedSlots["top-row"],n=this.$scopedSlots["bottom-row"],o=void 0!==i?function(t){return e.getTableRowBody(t,i)}:function(i){return e.getTableRow(t,i)},r=this.computedRows.map(o);return void 0!==s&&(r=s({cols:this.computedCols}).concat(r)),void 0!==n&&(r=r.concat(n({cols:this.computedCols}))),t("tbody",r)},getTableRowVirtual:function(t){var e=this,i=this.$scopedSlots.body;return void 0!==i?function(t){return e.getTableRowBody(t.item,i)}:function(i){return e.getTableRow(t,i.item)}},addBodyRowMeta:function(t){var e=this;return!0===this.hasSelectionMode&&Object.defineProperty(t,"selected",{get:function(){return e.isRowSelected(t.key)},set:function(i){e.__updateSelection([t.key],[t.row],i)},configurable:!0,enumerable:!0}),Object.defineProperty(t,"expand",{get:function(){return e.isRowExpanded(t.key)},set:function(i){e.__updateExpanded(t.key,i)},configurable:!0,enumerable:!0}),t.cols=t.cols.map(function(i){var s=Object.assign({},i);return Object.defineProperty(s,"value",{get:function(){return e.getCellValue(i,t.row)},configurable:!0,enumerable:!0}),s}),t},addBodyCellMetaData:function(t){var e=this;return Object.defineProperty(t,"value",{get:function(){return e.getCellValue(t.col,t.row)},configurable:!0,enumerable:!0}),t},getCellValue:function(t,e){var i="function"==typeof t.field?t.field(e):e[t.field];return void 0!==t.format?t.format(i,e):i}}},Mn={computed:{navIcon:function(){var t=[this.$q.iconSet.table.prevPage,this.$q.iconSet.table.nextPage];return!0===this.$q.lang.rtl?t.reverse():t}},methods:{getBottom:function(t){if(!0!==this.hideBottom){if(!0===this.nothingToDisplay){var e=!0===this.loading?this.loadingLabel||this.$q.lang.table.loading:this.filter?this.noResultsLabel||this.$q.lang.table.noResults:this.noDataLabel||this.$q.lang.table.noData,i=this.$scopedSlots["no-data"];return t("div",{staticClass:"q-table__bottom row items-center q-table__bottom--nodata"},void 0!==i?[i({message:e,icon:this.$q.iconSet.table.warning,filter:this.filter})]:[t(et,{staticClass:"q-table__bottom-nodata-icon",props:{name:this.$q.iconSet.table.warning}}),e])}var s=this.$scopedSlots.bottom;return t("div",{staticClass:"q-table__bottom row items-center",class:void 0!==s?null:"justify-end"},void 0!==s?[s(this.marginalsProps)]:this.getPaginationRow(t))}},getPaginationRow:function(t){var e,i=this,s=this.computedPagination.rowsPerPage,n=this.paginationLabel||this.$q.lang.table.pagination,o=this.$scopedSlots.pagination,r=this.rowsPerPageOptions.length>1,a=[t("div",{staticClass:"q-table__control"},[t("div",[!0===this.hasSelectionMode&&this.rowsSelectedNumber>0?(this.selectedRowsLabel||this.$q.lang.table.selectedRecords)(this.rowsSelectedNumber):""])]),t("div",{staticClass:"q-table__separator col"})];if(!0===r&&a.push(t("div",{staticClass:"q-table__control"},[t("span",{staticClass:"q-table__bottom-item"},[this.rowsPerPageLabel||this.$q.lang.table.recordsPerPage]),t(Ys,{staticClass:"q-table__select inline q-table__bottom-item",props:{color:this.color,value:s,options:this.computedRowsPerPageOptions,displayValue:0===s?this.$q.lang.table.allRows:s,dark:this.isDark,borderless:!0,dense:!0,optionsDense:!0,optionsCover:!0},on:Hr(this,"pgSize",{input:function(t){i.setPagination({page:1,rowsPerPage:t.value})}})})])),void 0!==o)e=o(this.marginalsProps);else if(e=[t("span",0!==s?{staticClass:"q-table__bottom-item"}:{},[s?n(this.firstRowIndex+1,Math.min(this.lastRowIndex,this.computedRowsNumber),this.computedRowsNumber):n(1,this.computedData.rowsNumber,this.computedRowsNumber)])],0!==s){var l=!0===this.dense?"sm":void 0;e.push(t(Mt,{props:{color:this.color,round:!0,icon:this.navIcon[0],dense:!0,flat:!0,size:l,disable:this.isFirstPage},on:Hr(this,"pgPrev",{click:this.prevPage})}),t(Mt,{props:{color:this.color,round:!0,icon:this.navIcon[1],dense:!0,size:l,flat:!0,disable:this.isLastPage},on:Hr(this,"pgNext",{click:this.nextPage})}))}return a.push(t("div",{staticClass:"q-table__control"},e)),a}}},Bn={methods:{getGridBody:function(t){var e=this,i=void 0!==this.$scopedSlots.item?this.$scopedSlots.item:function(i){var s=i.cols.map(function(e){return t("div",{staticClass:"q-table__grid-item-row"},[t("div",{staticClass:"q-table__grid-item-title"},[e.label]),t("div",{staticClass:"q-table__grid-item-value"},[e.value])])});!0===e.hasSelectionMode&&s.unshift(t("div",{staticClass:"q-table__grid-item-row"},[t(pe,{props:{value:i.selected,color:e.color,dark:e.isDark,dense:!0},on:{input:function(t){i.selected=t}}})]),t(Hi,{props:{dark:e.isDark}}));var n={staticClass:"q-table__grid-item-card"+e.cardDefaultClass,class:e.cardClass,style:e.cardStyle,on:{}};return void 0===e.$listeners["row-click"]&&void 0===e.$listeners["row-dblclick"]||(n.staticClass+=" cursor-pointer"),void 0!==e.$listeners["row-click"]&&(n.on.click=function(t){e.$emit("row-click",t,i.row)}),void 0!==e.$listeners["row-dblclick"]&&(n.on.dblclick=function(t){e.$emit("row-dblclick",t,i.row)}),t("div",{staticClass:"q-table__grid-item col-xs-12 col-sm-6 col-md-4 col-lg-3",class:!0===i.selected?"q-table__grid-item--selected":""},[t("div",n,s)])};return t("div",{staticClass:"q-table__grid-content row",class:this.cardContainerClass,style:this.cardContainerStyle},this.computedRows.map(function(t){var s=e.getRowKey(t),n=e.isRowSelected(s);return i(e.addBodyRowMeta({key:s,row:t,cols:e.computedCols,colsMap:e.computedColsMap,__trClass:n?"selected":""}))}))},getGridHeader:function(t){return t("div",{staticClass:"q-table__middle"},!0===this.gridHeader?[t("table",{staticClass:"q-table"},[this.getTableHeader(t)])]:!0===this.loading&&void 0===this.$scopedSlots.loading?this.__getProgress(t):void 0)}}},Pn={list:Li,table:gs},Ln=t.extend({name:"QVirtualScroll",mixins:[Qs],props:{type:{type:String,default:"list",validator:function(t){return["list","table","__qtable"].includes(t)}},items:{type:Array,default:function(){return[]}},itemsFn:Function,itemsSize:Number,scrollTarget:{default:void 0}},computed:{virtualScrollLength:function(){return this.itemsSize>=0&&void 0!==this.itemsFn?parseInt(this.itemsSize,10):Array.isArray(this.items)?this.items.length:0},virtualScrollScope:function(){var t=this;if(0===this.virtualScrollLength)return[];var e=function(e,i){return{index:t.virtualScrollSliceRange.from+i,item:e}};return void 0===this.itemsFn?this.items.slice(this.virtualScrollSliceRange.from,this.virtualScrollSliceRange.to).map(e):this.itemsFn(this.virtualScrollSliceRange.from,this.virtualScrollSliceRange.to-this.virtualScrollSliceRange.from).map(e)},classes:function(){return"q-virtual-scroll q-virtual-scroll"+(!0===this.virtualScrollHorizontal?"--horizontal":"--vertical")+(void 0!==this.scrollTarget?"":" scroll")},attrs:function(){return void 0!==this.scrollTarget?void 0:{tabindex:0}}},watch:{virtualScrollLength:function(){this.__resetVirtualScroll()},scrollTarget:function(){this.__unconfigureScrollTarget(),this.__configureScrollTarget()}},methods:{__getVirtualScrollEl:function(){return this.$el},__getVirtualScrollTarget:function(){return this.__scrollTarget},__configureScrollTarget:function(){this.__scrollTarget=Yr(this.$el,this.scrollTarget),this.__scrollTarget.addEventListener("scroll",this.__onVirtualScrollEvt,h.passive)},__unconfigureScrollTarget:function(){void 0!==this.__scrollTarget&&(this.__scrollTarget.removeEventListener("scroll",this.__onVirtualScrollEvt,h.passive),this.__scrollTarget=void 0)}},beforeMount:function(){this.__resetVirtualScroll()},mounted:function(){this.__configureScrollTarget()},beforeDestroy:function(){this.__unconfigureScrollTarget()},render:function(t){if(void 0!==this.$scopedSlots.default){var e=this.__padVirtualScroll(t,"list"===this.type?"div":"tbody",this.virtualScrollScope.map(this.$scopedSlots.default));return void 0!==this.$scopedSlots.before&&(e=this.$scopedSlots.before().concat(e)),e=Mr(e,this,"after"),"__qtable"===this.type?hl(t,{staticClass:this.classes},e):t(Pn[this.type],{class:this.classes,attrs:this.attrs,props:this.$attrs,on:this.$listeners},e)}console.error("QVirtualScroll: default scoped slot is required for rendering",this)}}),zn={props:{sortMethod:{type:Function,default:function(t,e,i){var s=this.columns.find(function(t){return t.name===e});if(void 0===s||void 0===s.field)return t;var n=!0===i?-1:1,o="function"==typeof s.field?function(t){return s.field(t)}:function(t){return t[s.field]};return t.sort(function(t,e){var i,r=o(t),a=o(e);return null===r||void 0===r?-1*n:null===a||void 0===a?1*n:void 0!==s.sort?s.sort(r,a,t,e)*n:!0===ha(r)&&!0===ha(a)?(r-a)*n:!0===ua(r)&&!0===ua(a)?function(t,e){return new Date(t)-new Date(e)}(r,a)*n:"boolean"==typeof r&&"boolean"==typeof a?(r-a)*n:(r=(i=[r,a].map(function(t){return(t+"").toLocaleString().toLowerCase()}))[0])<(a=i[1])?-1*n:r===a?0:n})}}},computed:{columnToSort:function(){var t=this.computedPagination.sortBy;if(t)return this.columns.find(function(e){return e.name===t})||null}},methods:{sort:function(t){t===Object(t)&&(t=t.name);var e=this.computedPagination,i=e.sortBy,s=e.descending;i!==t?(i=t,s=!1):!0===this.binaryStateSort?s=!s:!0===s?i=null:s=!0,this.setPagination({sortBy:i,descending:s,page:1})}}},On={props:{filter:[String,Object],filterMethod:{type:Function,default:function(t,e,i,s){void 0===i&&(i=this.computedCols),void 0===s&&(s=this.getCellValue);var n=e?e.toLowerCase():"";return t.filter(function(t){return i.some(function(e){return-1!==(s(e,t)+"").toLowerCase().indexOf(n)})})}}},watch:{filter:{handler:function(){var t=this;this.$nextTick(function(){t.setPagination({page:1},!0)})},deep:!0}}},En={props:{pagination:Object,rowsPerPageOptions:{type:Array,default:function(){return[3,5,7,10,15,20,25,50,0]}}},computed:{computedPagination:function(){return dl(Object.assign({},this.innerPagination,this.pagination))},firstRowIndex:function(){var t=this.computedPagination;return(t.page-1)*t.rowsPerPage},lastRowIndex:function(){var t=this.computedPagination;return t.page*t.rowsPerPage},isFirstPage:function(){return 1===this.computedPagination.page},pagesNumber:function(){return 0===this.computedPagination.rowsPerPage?1:Math.max(1,Math.ceil(this.computedRowsNumber/this.computedPagination.rowsPerPage))},isLastPage:function(){return 0===this.lastRowIndex||this.computedPagination.page>=this.pagesNumber},computedRowsPerPageOptions:function(){var t=this;return this.rowsPerPageOptions.map(function(e){return{label:0===e?t.$q.lang.table.allRows:""+e,value:e}})}},watch:{pagesNumber:function(t,e){if(t!==e){var i=this.computedPagination.page;t&&!i?this.setPagination({page:1}):t1&&this.setPagination({page:t-1})},nextPage:function(){var t=this.computedPagination,e=t.page,i=t.rowsPerPage;this.lastRowIndex>0&&e*i0&&this.computedRows.every(function(e){return!0===t.selectedKeys[t.getRowKey(e)]})},someRowsSelected:function(){var t=this;return!0!==this.allRowsSelected&&this.computedRows.some(function(e){return!0===t.selectedKeys[t.getRowKey(e)]})},rowsSelectedNumber:function(){return this.selected.length}},methods:{isRowSelected:function(t){return!0===this.selectedKeys[t]},clearSelection:function(){this.$emit("update:selected",[])},__updateSelection:function(t,e,i){var s=this;this.$emit("selection",{rows:e,added:i,keys:t});var n=!0===this.singleSelection?!0===i?e:[]:!0===i?this.selected.concat(e):this.selected.filter(function(e){return!1===t.includes(s.getRowKey(e))});this.$emit("update:selected",n)}}},An={props:{expanded:Array},data:function(){return{innerExpanded:pl(this.expanded)}},watch:{expanded:function(t){this.innerExpanded=pl(t)}},methods:{isRowExpanded:function(t){return this.innerExpanded.includes(t)},setExpanded:function(t){void 0!==this.expanded?this.$emit("update:expanded",t):this.innerExpanded=t},__updateExpanded:function(t,e){var i=this.innerExpanded.slice(),s=i.indexOf(t);!0===e?-1===s&&(i.push(t),this.setExpanded(i)):-1!==s&&(i.splice(s,1),this.setExpanded(i))}}},In={props:{visibleColumns:Array},computed:{computedCols:function(){var t=this,e=this.computedPagination,i=e.sortBy,s=e.descending;return(void 0!==this.visibleColumns?this.columns.filter(function(e){return!0===e.required||!0===t.visibleColumns.includes(e.name)}):this.columns).map(function(t){return t.align=t.align||"right",t.__iconClass="q-table__sort-icon q-table__sort-icon--"+t.align,t.__thClass="text-"+t.align+(void 0!==t.headerClasses?" "+t.headerClasses:"")+(!0===t.sortable?" sortable":"")+(t.name===i?" sorted "+(!0===s?"sort-desc":""):""),t.__tdClass="text-"+t.align+(void 0!==t.classes?" "+t.classes:""),t.__thStyle=void 0!==t.headerStyle?t.headerStyle:null,t.__tdStyle=void 0!==t.style?t.style:null,t})},computedColsMap:function(){var t={};return this.computedCols.forEach(function(e){t[e.name]=e}),t}}},Fn={};Hs.forEach(function(t){Fn[t]={}});var Rn,Vn,Nn,jn,Hn,Qn=t.extend({name:"QTable",mixins:[nt,ie,{computed:{marginalsProps:function(){return{pagination:this.computedPagination,pagesNumber:this.pagesNumber,isFirstPage:this.isFirstPage,isLastPage:this.isLastPage,prevPage:this.prevPage,nextPage:this.nextPage,inFullscreen:this.inFullscreen,toggleFullscreen:this.toggleFullscreen}}},methods:{getTop:function(t){var e,i=this.$scopedSlots.top,s=this.$scopedSlots["top-left"],n=this.$scopedSlots["top-right"],o=this.$scopedSlots["top-selection"],r=!0===this.hasSelectionMode&&void 0!==o&&this.rowsSelectedNumber>0,a="q-table__top relative-position row items-center";return void 0!==i?t("div",{staticClass:a},[i(this.marginalsProps)]):(!0===r?e=o(this.marginalsProps).slice():(e=[],void 0!==s?e.push(t("div",{staticClass:"q-table-control"},[s(this.marginalsProps)])):this.title&&e.push(t("div",{staticClass:"q-table__control"},[t("div",{staticClass:"q-table__title"},this.title)]))),void 0!==n&&(e.push(t("div",{staticClass:"q-table__separator col"})),e.push(t("div",{staticClass:"q-table__control"},[n(this.marginalsProps)]))),0!==e.length?t("div",{staticClass:a},e):void 0)}}},$n,Tn,Mn,Bn,zn,On,En,Dn,An,In],props:Object.assign({},{data:{type:Array,default:function(){return[]}},rowKey:{type:[String,Function],default:"id"},columns:Array,loading:Boolean,binaryStateSort:Boolean,title:String,hideHeader:Boolean,hideBottom:Boolean,grid:Boolean,gridHeader:Boolean,dense:Boolean,flat:Boolean,bordered:Boolean,square:Boolean,separator:{type:String,default:"horizontal",validator:function(t){return["horizontal","vertical","cell","none"].includes(t)}},wrapCells:Boolean,virtualScroll:Boolean},Fn,{noDataLabel:String,noResultsLabel:String,loadingLabel:String,selectedRowsLabel:Function,rowsPerPageLabel:String,paginationLabel:Function,color:{type:String,default:"grey-8"},tableStyle:[String,Array,Object],tableClass:[String,Array,Object],tableHeaderStyle:[String,Array,Object],tableHeaderClass:[String,Array,Object],cardContainerClass:[String,Array,Object],cardContainerStyle:[String,Array,Object],cardStyle:[String,Array,Object],cardClass:[String,Array,Object]}),data:function(){return{innerPagination:{sortBy:null,descending:!1,page:1,rowsPerPage:5}}},watch:{needsReset:function(){!0===this.hasVirtScroll&&void 0!==this.$refs.virtScroll&&this.$refs.virtScroll.reset()}},computed:{getRowKey:function(){var t=this;return"function"==typeof this.rowKey?this.rowKey:function(e){return e[t.rowKey]}},hasVirtScroll:function(){return!0!==this.grid&&!0===this.virtualScroll},needsReset:function(){var t=this;return["tableStyle","tableClass","tableHeaderStyle","tableHeaderClass","containerClass"].map(function(e){return t[e]}).join(";")},computedData:function(){var t=this.data;if(0===t.length)return{rowsNumber:0,rows:t};if(!0===this.isServerSide)return{rowsNumber:t.length,rows:t};var e=this.computedPagination,i=e.sortBy,s=e.descending,n=e.rowsPerPage;this.filter&&(t=this.filterMethod(t,this.filter,this.computedCols,this.getCellValue)),void 0!==this.columnToSort&&(t=this.sortMethod(this.data===t?t.slice():t,i,s));var o=t.length;return 0!==n&&(0===this.firstRowIndex&&this.data!==t?t.length>this.lastRowIndex&&(t.length=this.lastRowIndex):t=t.slice(this.firstRowIndex,this.lastRowIndex)),{rowsNumber:o,rows:t}},computedRows:function(){return this.computedData.rows},computedRowsNumber:function(){return!0===this.isServerSide?this.computedPagination.rowsNumber||0:this.computedData.rowsNumber},nothingToDisplay:function(){return 0===this.computedRows.length},isServerSide:function(){return void 0!==this.computedPagination.rowsNumber},cardDefaultClass:function(){return" q-table__card"+(!0===this.isDark?" q-table__card--dark q-dark":"")+(!0===this.square?" q-table--square":"")+(!0===this.flat?" q-table--flat":"")+(!0===this.bordered?" q-table--bordered":"")},containerClass:function(){return"q-table__container q-table--"+this.separator+"-separator column no-wrap"+(!0===this.loading?" q-table--loading":"")+(!0===this.grid?" q-table--grid":this.cardDefaultClass)+(!0===this.isDark?" q-table--dark":"")+(!0===this.dense?" q-table--dense":"")+(!1===this.wrapCells?" q-table--no-wrap":"")+(!0===this.inFullscreen?" fullscreen scroll":"")},virtProps:function(){var t=this,e={};return Hs.forEach(function(i){e[i]=t[i]}),void 0===e.virtualScrollItemSize&&(e.virtualScrollItemSize=!0===this.dense?28:48),e}},render:function(t){var e=[this.getTop(t)],i={staticClass:this.containerClass};return!0===this.grid?e.push(this.getGridHeader(t)):Object.assign(i,{class:this.cardClass,style:this.cardStyle}),e.push(this.getBody(t),this.getBottom(t)),!0===this.loading&&void 0!==this.$scopedSlots.loading&&e.push(this.$scopedSlots.loading()),t("div",i,e)},methods:{requestServerInteraction:function(t){var e=this;void 0===t&&(t={}),this.$nextTick(function(){e.$emit("request",{pagination:t.pagination||e.computedPagination,filter:t.filter||e.filter,getCellValue:e.getCellValue})})},resetVirtualScroll:function(){!0===this.hasVirtScroll&&this.$refs.virtScroll.reset()},getBody:function(t){if(!0===this.grid)return this.getGridBody(t);var e=!0!==this.hideHeader?this.getTableHeader(t):null;return!0===this.hasVirtScroll?t(Ln,{ref:"virtScroll",props:Object.assign({},this.virtProps,{items:this.computedRows,type:"__qtable"}),on:Hr(this,"vs",{"virtual-scroll":this.__onVScroll}),class:this.tableClass,style:this.tableStyle,scopedSlots:{before:null===e?void 0:function(){return e},default:this.getTableRowVirtual(t)}}):hl(t,{staticClass:"scroll",class:this.tableClass,style:this.tableStyle},[e,this.getTableBody(t)])},scrollTo:function(t){if(void 0===this.$refs.virtScroll){t=parseInt(t,10);var e=this.$el.querySelector("tbody tr:nth-of-type("+(t+1)+")");if(null!==e){var i=this.$el.querySelector(".q-table__middle.scroll"),s=e.offsetTop,n=s12?t.hour-12:t.hour),minute:null===t.minute?"--":kr(t.minute),second:null===t.second?"--":kr(t.second)}},defaultDateModel:function(){return this.__getDefaultDateModel()},computedFormat24h:function(){return null!==this.format24h?this.format24h:this.$q.lang.date.format24h},pointerStyle:function(){var t="Hour"===this.view,e=!0===t?12:60,i=this.innerModel[this.view.toLowerCase()],s="rotate("+(Math.round(i*(360/e))-180)+"deg) translateX(-50%)";return!0===t&&!0===this.computedFormat24h&&this.innerModel.hour>=12&&(s+=" scale(.7)"),{transform:s}},minLink:function(){return null!==this.innerModel.hour},secLink:function(){return!0===this.minLink&&null!==this.innerModel.minute},hourInSelection:function(){var t=this;return void 0!==this.hourOptions?function(e){return t.hourOptions.includes(e)}:void 0!==this.options?function(e){return t.options(e,null,null)}:void 0},minuteInSelection:function(){var t=this;return void 0!==this.minuteOptions?function(e){return t.minuteOptions.includes(e)}:void 0!==this.options?function(e){return t.options(t.innerModel.hour,e,null)}:void 0},secondInSelection:function(){var t=this;return void 0!==this.secondOptions?function(e){return t.secondOptions.includes(e)}:void 0!==this.options?function(e){return t.options(t.innerModel.hour,t.innerModel.minute,e)}:void 0},positions:function(){var t,e,i,s=0,n=1;"Hour"===this.view?(i=this.hourInSelection,!0===this.computedFormat24h?(t=0,e=23):(t=0,e=11,!1===this.isAM&&(s=12))):(t=0,e=55,n=5,i="Minute"===this.view?this.minuteInSelection:this.secondInSelection);for(var o=[],r=t,a=t;r<=e;r+=n,a++){var l=r+s,c=void 0!==i&&!1===i(l),u="Hour"===this.view&&0===r?!0===this.format24h?"00":"12":r;o.push({val:l,index:a,disable:c,label:u})}return o}},methods:{setNow:function(){this.__updateValue(Object.assign({},this.__getCurrentDate(),this.__getCurrentTime())),this.view="Hour"},__getDefaultDateModel:function(){if("string"!=typeof this.defaultDate){var t=this.__getCurrentDate();return t.dateHash=t.year+"/"+kr(t.month)+"/"+kr(t.day),t}return Ta(this.defaultDate,"YYYY/MM/DD",void 0,this.calendar)},__click:function(t){!0!==this.$q.platform.is.desktop&&this.__drag({isFirst:!0,evt:t}),this.__drag({isFinal:!0,evt:t})},__activate:function(t){this.__drag({isFirst:!0,evt:t},!0),this.__drag({isFinal:!0,evt:t},!0)},__drag:function(t,e){if(!0!==this._isBeingDestroyed&&!0!==this._isDestroyed){if(t.isFirst){var i=this.$refs.clock.getBoundingClientRect(),s=i.top,n=i.left,o=i.width/2;return this.dragging={top:s+o,left:n+o,dist:.7*o},this.dragCache=null,void this.__updateClock(t.evt)}this.__updateClock(t.evt),t.isFinal&&!0!==e&&(this.dragging=!1,"Hour"===this.view?this.view="Minute":this.withSeconds&&"Minute"===this.view&&(this.view="Second"))}},__updateClock:function(t){var e,i=tr(t),s=Math.abs(i.top-this.dragging.top),n=Math.sqrt(Math.pow(Math.abs(i.top-this.dragging.top),2)+Math.pow(Math.abs(i.left-this.dragging.left),2)),o=Math.asin(s/n)*(180/Math.PI);if(o=i.top-1}},duration:Number,noConnectors:Boolean,noNodesLabel:String,noResultsLabel:String},computed:{classes:function(){return"q-tree"+(!0===this.noConnectors?" q-tree--no-connectors":"")+(!0===this.isDark?" q-tree--dark":"")+(void 0!==this.color?" text-"+this.color:"")},hasSelection:function(){return void 0!==this.selected},computedIcon:function(){return this.icon||this.$q.iconSet.tree.icon},computedControlColor:function(){return this.controlColor||this.color},textColorClass:function(){if(void 0!==this.textColor)return"text-"+this.textColor},selectedColorClass:function(){var t=this.selectedColor||this.color;if(t)return"text-"+t},meta:function(){var t=this,e={},i=function(s,n){var o=s.tickStrategy||(n?n.tickStrategy:t.tickStrategy),r=s[t.nodeKey],a=s.children&&s.children.length>0,l=!0!==a,c=!0!==s.disabled&&!0===t.hasSelection&&!1!==s.selectable,u=!0!==s.disabled&&!1!==s.expandable,h="none"!==o,d="strict"===o,p="leaf-filtered"===o,f="leaf"===o||"leaf-filtered"===o,m=!0!==s.disabled&&!1!==s.tickable;!0===f&&!0===m&&n&&!0!==n.tickable&&(m=!1);var v=s.lazy;v&&t.lazy[r]&&(v=t.lazy[r]);var g={key:r,parent:n,isParent:a,isLeaf:l,lazy:v,disabled:s.disabled,link:!0!==s.disabled&&(!0===c||!0===u&&(!0===a||!0===v)),children:[],matchesFilter:!t.filter||t.filterMethod(s,t.filter),selected:r===t.selected&&!0===c,selectable:c,expanded:!0===a&&t.innerExpanded.includes(r),expandable:u,noTick:!0===s.noTick||!0!==d&&v&&"loaded"!==v,tickable:m,tickStrategy:o,hasTicking:h,strictTicking:d,leafFilteredTicking:p,leafTicking:f,ticked:!0===d?t.innerTicked.includes(r):!0===l&&t.innerTicked.includes(r)};if(e[r]=g,!0===a&&(g.children=s.children.map(function(t){return i(t,g)}),t.filter&&(!0!==g.matchesFilter?g.matchesFilter=g.children.some(function(t){return t.matchesFilter}):!0!==g.noTick&&!0!==g.disabled&&!0===g.tickable&&!0===p&&!0===g.children.every(function(t){return!0!==t.matchesFilter||!0===t.noTick||!0!==t.tickable})&&(g.tickable=!1)),!0===g.matchesFilter&&(!0!==g.noTick&&!0!==d&&!0===g.children.every(function(t){return t.noTick})&&(g.noTick=!0),f))){if(g.ticked=!1,g.indeterminate=g.children.some(function(t){return!0===t.indeterminate}),g.tickable=!0===g.tickable&&g.children.some(function(t){return t.tickable}),!0!==g.indeterminate){var _=g.children.reduce(function(t,e){return!0===e.ticked?t+1:t},0);_===g.children.length?g.ticked=!0:_>0&&(g.indeterminate=!0)}!0===g.indeterminate&&(g.indeterminateNextState=g.children.every(function(t){return!0!==t.tickable||!0!==t.ticked}))}return g};return this.nodes.forEach(function(t){return i(t,null)}),e}},data:function(){return{lazy:{},innerTicked:this.ticked||[],innerExpanded:this.expanded||[]}},watch:{ticked:function(t){this.innerTicked=t},expanded:function(t){this.innerExpanded=t}},methods:{getNodeByKey:function(t){var e=this,i=[].reduce,s=function(n,o){return n||!o?n:!0===Array.isArray(o)?i.call(Object(o),s,n):o[e.nodeKey]===t?o:o.children?s(null,o.children):void 0};return s(null,this.nodes)},getTickedNodes:function(){var t=this;return this.innerTicked.map(function(e){return t.getNodeByKey(e)})},getExpandedNodes:function(){var t=this;return this.innerExpanded.map(function(e){return t.getNodeByKey(e)})},isExpanded:function(t){return!(!t||!this.meta[t])&&this.meta[t].expanded},collapseAll:function(){void 0!==this.expanded?this.$emit("update:expanded",[]):this.innerExpanded=[]},expandAll:function(){var t=this,e=this.innerExpanded,i=function(s){s.children&&s.children.length>0&&!1!==s.expandable&&!0!==s.disabled&&(e.push(s[t.nodeKey]),s.children.forEach(i))};this.nodes.forEach(i),void 0!==this.expanded?this.$emit("update:expanded",e):this.innerExpanded=e},setExpanded:function(t,e,i,s){var n=this;if(void 0===i&&(i=this.getNodeByKey(t)),void 0===s&&(s=this.meta[t]),s.lazy&&"loaded"!==s.lazy){if("loading"===s.lazy)return;this.$set(this.lazy,t,"loading"),this.$emit("lazy-load",{node:i,key:t,done:function(e){n.lazy[t]="loaded",e&&n.$set(i,"children",e),n.$nextTick(function(){var e=n.meta[t];e&&!0===e.isParent&&n.__setExpanded(t,!0)})},fail:function(){n.$delete(n.lazy,t)}})}else!0===s.isParent&&!0===s.expandable&&this.__setExpanded(t,e)},__setExpanded:function(t,e){var i=this,s=this.innerExpanded,n=void 0!==this.expanded;if(!0===n&&(s=s.slice()),e){if(this.accordion&&this.meta[t]){var o=[];this.meta[t].parent?this.meta[t].parent.children.forEach(function(e){e.key!==t&&!0===e.expandable&&o.push(e.key)}):this.nodes.forEach(function(e){var s=e[i.nodeKey];s!==t&&o.push(s)}),o.length>0&&(s=s.filter(function(t){return!1===o.includes(t)}))}s=s.concat([t]).filter(function(t,e,i){return i.indexOf(t)===e})}else s=s.filter(function(e){return e!==t});!0===n?this.$emit("update:expanded",s):this.innerExpanded=s},isTicked:function(t){return!(!t||!this.meta[t])&&this.meta[t].ticked},setTicked:function(t,e){var i=this.innerTicked,s=void 0!==this.ticked;!0===s&&(i=i.slice()),i=e?i.concat(t).filter(function(t,e,i){return i.indexOf(t)===e}):i.filter(function(e){return!1===t.includes(e)}),!0===s&&this.$emit("update:ticked",i)},__getSlotScope:function(t,e,i){var s=this,n={tree:this,node:t,key:i,color:this.color,dark:this.isDark};return Object.defineProperty(n,"expanded",{get:function(){return e.expanded},set:function(t){t!==e.expanded&&s.setExpanded(i,t)},configurable:!0,enumerable:!0}),Object.defineProperty(n,"ticked",{get:function(){return e.ticked},set:function(t){t!==e.ticked&&s.setTicked([i],t)},configurable:!0,enumerable:!0}),n},__getChildren:function(t,e){var i=this;return(this.filter?e.filter(function(t){return i.meta[t[i.nodeKey]].matchesFilter}):e).map(function(e){return i.__getNode(t,e)})},__getNodeMedia:function(t,e){if(void 0!==e.icon)return t(et,{staticClass:"q-tree__icon q-mr-sm",props:{name:e.icon,color:e.iconColor}});var i=e.img||e.avatar;return i?t("img",{staticClass:"q-tree__"+(e.img?"img":"avatar")+" q-mr-sm",attrs:{src:i}}):void 0},__getNode:function(t,e){var i=this,s=e[this.nodeKey],n=this.meta[s],o=e.header&&this.$scopedSlots["header-"+e.header]||this.$scopedSlots["default-header"],r=!0===n.isParent?this.__getChildren(t,e.children):[],a=r.length>0||n.lazy&&"loaded"!==n.lazy,l=e.body&&this.$scopedSlots["body-"+e.body]||this.$scopedSlots["default-body"],c=void 0!==o||void 0!==l?this.__getSlotScope(e,n,s):null;return void 0!==l&&(l=t("div",{staticClass:"q-tree__node-body relative-position"},[t("div",{class:this.textColorClass},[l(c)])])),t("div",{key:s,staticClass:"q-tree__node relative-position",class:{"q-tree__node--parent":a,"q-tree__node--child":!a}},[t("div",{staticClass:"q-tree__node-header relative-position row no-wrap items-center",class:{"q-tree__node--link q-hoverable q-focusable":n.link,"q-tree__node--selected":n.selected,"q-tree__node--disabled":n.disabled},attrs:{tabindex:n.link?0:-1},on:{click:function(t){i.__onClick(e,n,t)},keypress:function(t){!0!==_r(t)&&(13===t.keyCode?i.__onClick(e,n,t,!0):32===t.keyCode&&i.__onExpandClick(e,n,t,!0))}}},[t("div",{staticClass:"q-focus-helper",attrs:{tabindex:-1},ref:"blurTarget_"+n.key}),"loading"===n.lazy?t(vt,{staticClass:"q-tree__spinner q-mr-xs",props:{color:this.computedControlColor}}):!0===a?t(et,{staticClass:"q-tree__arrow q-mr-xs",class:{"q-tree__arrow--rotate":n.expanded},props:{name:this.computedIcon},nativeOn:{click:function(t){i.__onExpandClick(e,n,t)}}}):null,!0===n.hasTicking&&!0!==n.noTick?t(pe,{staticClass:"q-mr-xs",props:{value:!0===n.indeterminate?null:n.ticked,color:this.computedControlColor,dark:this.isDark,dense:!0,keepColor:!0,disable:!0!==n.tickable},on:{keydown:nr,input:function(t){i.__onTickedClick(n,t)}}}):null,t("div",{staticClass:"q-tree__node-header-content col row no-wrap items-center",class:n.selected?this.selectedColorClass:this.textColorClass},[o?o(c):[this.__getNodeMedia(t,e),t("div",e[this.labelKey])]])]),!0===a?t(ji,{props:{duration:this.duration},on:Hr(this,"slide",{show:function(){i.$emit("after-show")},hide:function(){i.$emit("after-hide")}})},[t("div",{staticClass:"q-tree__node-collapsible",class:this.textColorClass,directives:[{name:"show",value:n.expanded}]},[l,t("div",{staticClass:"q-tree__children",class:{"q-tree__node--disabled":n.disabled}},r)])]):l])},__blur:function(t){var e=this.$refs["blurTarget_"+t];void 0!==e&&e.focus()},__onClick:function(t,e,i,s){!0!==s&&this.__blur(e.key),this.hasSelection?e.selectable&&this.$emit("update:selected",e.key!==this.selected?e.key:null):this.__onExpandClick(t,e,i,s),"function"==typeof t.handler&&t.handler(t)},__onExpandClick:function(t,e,i,s){void 0!==i&&nr(i),!0!==s&&this.__blur(e.key),this.setExpanded(e.key,!e.expanded,t,e)},__onTickedClick:function(t,e){if(!0===t.indeterminate&&(e=t.indeterminateNextState),t.strictTicking)this.setTicked([t.key],e);else if(t.leafTicking){var i=[],s=function(t){t.isParent?(!0!==e&&!0!==t.noTick&&!0===t.tickable&&i.push(t.key),!0===t.leafTicking&&t.children.forEach(s)):!0===t.noTick||!0!==t.tickable||!0===t.leafFilteredTicking&&!0!==t.matchesFilter||i.push(t.key)};s(t),this.setTicked(i,e)}}},render:function(t){var e=this.__getChildren(t,this.nodes);return t("div",{class:this.classes},0===e.length?this.filter?this.noResultsLabel||this.$q.lang.tree.noResults:this.noNodesLabel||this.$q.lang.tree.noNodes:e)},created:function(){!0===this.defaultExpandAll&&this.expandAll()}}),io=t.extend({name:"QUploaderBase",mixins:[nt,gi],props:{label:String,color:String,textColor:String,square:Boolean,flat:Boolean,bordered:Boolean,noThumbnails:Boolean,autoUpload:Boolean,hideUploadBtn:Boolean,disable:Boolean,readonly:Boolean},provide:function(){return{__qUploaderGetInput:this.__getInputControl}},data:function(){return{files:[],queuedFiles:[],uploadedFiles:[],dnd:!1,expanded:!1,uploadSize:0,uploadedSize:0}},watch:{isUploading:function(t,e){!1===e&&!0===t?this.$emit("start"):!0===e&&!1===t&&this.$emit("finish")}},computed:{canUpload:function(){return!0===this.editable&&!0!==this.isBusy&&!0!==this.isUploading&&this.queuedFiles.length>0},canAddFiles:function(){return this.editable&&!0!==this.isUploading&&(!0===this.multiple||0===this.queuedFiles.length)},extensions:function(){if(void 0!==this.accept)return this.accept.split(",").map(function(t){return(t=t.trim()).endsWith("/*")&&(t=t.slice(0,t.length-1)),t})},uploadProgress:function(){return 0===this.uploadSize?0:this.uploadedSize/this.uploadSize},uploadProgressLabel:function(){return this.__getProgressLabel(this.uploadProgress)},uploadedSizeLabel:function(){return wr(this.uploadedSize)},uploadSizeLabel:function(){return wr(this.uploadSize)},colorClass:function(){var t=[];return void 0!==this.color&&t.push("bg-"+this.color),void 0!==this.textColor&&t.push("text-"+this.textColor),t.join(" ")},editable:function(){return!0!==this.disable&&!0!==this.readonly}},methods:{reset:function(){this.disable||(this.abort(),this.uploadedSize=0,this.uploadSize=0,this.__revokeImgURLs(),this.files=[],this.queuedFiles=[],this.uploadedFiles=[])},removeUploadedFiles:function(){this.disable||(this.files=this.files.filter(function(t){return"uploaded"!==t.__status||(void 0!==t._img&&window.URL.revokeObjectURL(t._img.src),!1)}),this.uploadedFiles=[])},removeQueuedFiles:function(){var t=this;if(!this.disable){var e=[],i=this.files.filter(function(i){return"idle"!==i.__status&&"failed"!==i.__status||(t.uploadSize-=i.size,e.push(i),void 0!==i._img&&window.URL.revokeObjectURL(i._img.src),!1)});e.length>0&&(this.files=i,this.queuedFiles=[],this.$emit("removed",e))}},removeFile:function(t){this.disable||("uploaded"===t.__status?this.uploadedFiles=this.uploadedFiles.filter(function(e){return e.name!==t.name}):"uploading"===t.__status?t.__abort():this.uploadSize-=t.size,this.files=this.files.filter(function(e){return e.name!==t.name||(void 0!==e._img&&window.URL.revokeObjectURL(e._img.src),!1)}),this.queuedFiles=this.queuedFiles.filter(function(e){return e.name!==t.name}),this.$emit("removed",[t]))},__revokeImgURLs:function(){this.files.forEach(function(t){void 0!==t._img&&window.URL.revokeObjectURL(t._img.src)})},__getFileInput:function(){return this.$refs.input||this.$el.getElementsByClassName("q-uploader__input")[0]},__getProgressLabel:function(t){return(100*t).toFixed(2)+"%"},__updateFile:function(t,e,i){if(t.__status=e,"idle"===e)return t.__uploaded=0,t.__progress=0,t.__sizeLabel=wr(t.size),void(t.__progressLabel="0.00%");"failed"!==e?(t.__uploaded="uploaded"===e?t.size:i,t.__progress="uploaded"===e?1:Math.min(.9999,t.__uploaded/t.size),t.__progressLabel=this.__getProgressLabel(t.__progress),this.$forceUpdate()):this.$forceUpdate()},__addFiles:function(t,e){var i=this,s=this.__processFiles(t,e);this.__getFileInput().value="",void 0!==s&&(s.forEach(function(t){if(i.__updateFile(t,"idle"),i.uploadSize+=t.size,!0!==i.noThumbnails&&t.type.toUpperCase().startsWith("IMAGE")){var e=new Image;e.src=window.URL.createObjectURL(t),t.__img=e}}),this.files=this.files.concat(s),this.queuedFiles=this.queuedFiles.concat(s),this.$emit("added",s),!0===this.autoUpload&&this.upload())},__getBtn:function(t,e,i,s){if(!0===e)return t(Mt,{props:{type:"a",icon:this.$q.iconSet.uploader[i],flat:!0,dense:!0},on:"add"===i?null:{click:s}},"add"===i?this.__getInputControl(t):null)},__getInputControl:function(t){return[t("input",{ref:"input",staticClass:"q-uploader__input overflow-hidden absolute-full",attrs:Object.assign({},{tabindex:-1,type:"file",title:"",accept:this.accept},!0===this.multiple?{multiple:!0}:{}),on:Hr(this,"input",{mousedown:ir,change:this.__addFiles})})]},__getHeader:function(t){return void 0!==this.$scopedSlots.header?this.$scopedSlots.header(this):[t("div",{staticClass:"q-uploader__header-content flex flex-center no-wrap q-gutter-xs"},[this.__getBtn(t,this.queuedFiles.length>0,"removeQueue",this.removeQueuedFiles),this.__getBtn(t,this.uploadedFiles.length>0,"removeUploaded",this.removeUploadedFiles),!0===this.isUploading?t(vt,{staticClass:"q-uploader__spinner"}):null,t("div",{staticClass:"col column justify-center"},[void 0!==this.label?t("div",{staticClass:"q-uploader__title"},[this.label]):null,t("div",{staticClass:"q-uploader__subtitle"},[this.uploadSizeLabel+" / "+this.uploadProgressLabel])]),this.__getBtn(t,this.canAddFiles,"add",this.pickFiles),this.__getBtn(t,!1===this.hideUploadBtn&&!0===this.canUpload,"upload",this.upload),this.__getBtn(t,this.isUploading,"clear",this.abort)])]},__getList:function(t){var e=this;return void 0!==this.$scopedSlots.list?this.$scopedSlots.list(this):this.files.map(function(i){return t("div",{key:i.name,staticClass:"q-uploader__file relative-position",class:{"q-uploader__file--img":!0!==e.noThumbnails&&void 0!==i.__img,"q-uploader__file--failed":"failed"===i.__status,"q-uploader__file--uploaded":"uploaded"===i.__status},style:!0!==e.noThumbnails&&void 0!==i.__img?{backgroundImage:"url("+i.__img.src+")"}:null},[t("div",{staticClass:"q-uploader__file-header row flex-center no-wrap"},["failed"===i.__status?t(et,{staticClass:"q-uploader__file-status",props:{name:e.$q.iconSet.type.negative,color:"negative"}}):null,t("div",{staticClass:"q-uploader__file-header-content col"},[t("div",{staticClass:"q-uploader__title"},[i.name]),t("div",{staticClass:"q-uploader__subtitle row items-center no-wrap"},[i.__sizeLabel+" / "+i.__progressLabel])]),"uploading"===i.__status?t(ge,{props:{value:i.__progress,min:0,max:1,indeterminate:0===i.__progress}}):t(Mt,{props:{round:!0,dense:!0,flat:!0,icon:e.$q.iconSet.uploader["uploaded"===i.__status?"done":"clear"]},on:{click:function(){e.removeFile(i)}}})])])})}},beforeDestroy:function(){!0===this.isUploading&&this.abort(),this.files.length>0&&this.__revokeImgURLs()},render:function(t){var e=[t("div",{staticClass:"q-uploader__header",class:this.colorClass},this.__getHeader(t)),t("div",{staticClass:"q-uploader__list scroll"},this.__getList(t)),this.__getDnd(t,"uploader")];return!0===this.isBusy&&e.push(t("div",{staticClass:"q-uploader__overlay absolute-full flex flex-center"},[t(vt)])),t("div",{staticClass:"q-uploader column no-wrap",class:{"q-uploader--dark q-dark":this.isDark,"q-uploader--bordered":this.bordered,"q-uploader--square no-border-radius":this.square,"q-uploader--flat no-shadow":this.flat,"disabled q-uploader--disable":this.disable},on:!0===this.canAddFiles?Hr(this,"drag",{dragover:this.__onDragOver}):null},e)}}),so={props:{url:[Function,String],method:{type:[Function,String],default:"POST"},fieldName:{type:[Function,String],default:function(t){return t.name}},headers:[Function,Array],formFields:[Function,Array],withCredentials:[Function,Boolean],sendRaw:[Function,Boolean],batch:[Function,Boolean],factory:Function},data:function(){return{xhrs:[],promises:[],workingThreads:0}},computed:{xhrProps:function(){return{url:vl(this.url),method:vl(this.method),headers:vl(this.headers),formFields:vl(this.formFields),fieldName:vl(this.fieldName),withCredentials:vl(this.withCredentials),sendRaw:vl(this.sendRaw),batch:vl(this.batch)}},isUploading:function(){return this.workingThreads>0},isBusy:function(){return this.promises.length>0}},methods:{abort:function(){this.xhrs.forEach(function(t){t.abort()}),this.promises.length>0&&(this.abortPromises=!0)},upload:function(){var t=this;if(!1!==this.canUpload){var e=this.queuedFiles.slice(0);this.queuedFiles=[],this.xhrProps.batch(e)?this.__runFactory(e):e.forEach(function(e){t.__runFactory([e])})}},__runFactory:function(t){var e=this;if(this.workingThreads++,"function"==typeof this.factory){var i=this.factory(t);if(i)if("function"==typeof i.catch&&"function"==typeof i.then){this.promises.push(i);var s=function(s){!0!==e._isBeingDestroyed&&!0!==e._isDestroyed&&(e.promises=e.promises.filter(function(t){return t!==i}),0===e.promises.length&&(e.abortPromises=!1),e.queuedFiles=e.queuedFiles.concat(t),t.forEach(function(t){e.__updateFile(t,"failed")}),e.$emit("factory-failed",s,t),e.workingThreads--)};i.then(function(n){!0===e.abortPromises?s(new Error("Aborted")):!0!==e._isBeingDestroyed&&!0!==e._isDestroyed&&(e.promises=e.promises.filter(function(t){return t!==i}),e.__uploadFiles(t,n))}).catch(s)}else this.__uploadFiles(t,i||{});else this.$emit("factory-failed",new Error("QUploader: factory() does not return properly"),t),this.workingThreads--}else this.__uploadFiles(t,{})},__uploadFiles:function(t,e){var i=this,s=new FormData,n=new XMLHttpRequest,o=function(t,s){return void 0!==e[t]?vl(e[t])(s):i.xhrProps[t](s)},r=o("url",t);if(!r)return console.error("q-uploader: invalid or no URL specified"),void this.workingThreads--;var a=o("formFields",t);void 0!==a&&a.forEach(function(t){s.append(t.name,t.value)});var l,c=0,u=0,h=0,d=0;n.upload.addEventListener("progress",function(e){if(!0!==l){var s=Math.min(d,e.loaded);i.uploadedSize+=s-h;for(var n=(h=s)-u,o=c;n>0&&or.size))return void i.__updateFile(r,"uploading",n);n-=r.size,c++,u+=r.size,i.__updateFile(r,"uploading",r.size)}}},!1),n.onreadystatechange=function(){n.readyState<4||(n.status&&n.status<400?(i.uploadedFiles=i.uploadedFiles.concat(t),t.forEach(function(t){i.__updateFile(t,"uploaded")}),i.$emit("uploaded",{files:t,xhr:n})):(l=!0,i.uploadedSize-=h,i.queuedFiles=i.queuedFiles.concat(t),t.forEach(function(t){i.__updateFile(t,"failed")}),i.$emit("failed",{files:t,xhr:n})),i.workingThreads--,i.xhrs=i.xhrs.filter(function(t){return t!==n}))},n.open(o("method",t),r),!0===o("withCredentials",t)&&(n.withCredentials=!0);var p=o("headers",t);void 0!==p&&p.forEach(function(t){n.setRequestHeader(t.name,t.value)});var f=o("sendRaw",t);t.forEach(function(t){i.__updateFile(t,"uploading",0),!0!==f&&s.append(o("fieldName",t),t,t.name),t.xhr=n,t.__abort=function(){n.abort()},d+=t.size}),this.$emit("uploading",{files:t,xhr:n}),this.xhrs.push(n),!0===f?n.send(new Blob(t)):n.send(s)}}},no=t.extend({name:"QUploader",mixins:[io,so]}),oo=t.extend({name:"QUploaderAddTrigger",inject:{__qUploaderGetInput:{default:function(){console.error("QUploaderAddTrigger needs to be child of QUploader")}}},render:function(t){return this.__qUploaderGetInput(t)}}),ro=t.extend({name:"QVideo",mixins:[os],props:{src:{type:String,required:!0}},computed:{iframeData:function(){return{attrs:{src:this.src,frameborder:"0",allowfullscreen:!0}}},classes:function(){return"q-video"+(void 0!==this.ratio?" q-video--responsive":"")}},render:function(t){return t("div",{class:this.classes,style:this.ratioStyle,on:this.$listeners},[t("iframe",this.iframeData)])}}),ao=Object.freeze({__proto__:null,QAjaxBar:G,QAvatar:it,QBadge:st,QBanner:rt,QBar:lt,QBreadcrumbs:dt,QBreadcrumbsEl:ft,QBtn:Mt,QBtnDropdown:Qt,QBtnGroup:Bt,QBtnToggle:Ut,QCard:Kt,QCardSection:Xt,QCardActions:Gt,QCarousel:re,QCarouselSlide:ae,QCarouselControl:le,QChatMessage:ce,QCheckbox:pe,QChip:fe,QCircularProgress:ge,QColor:Re,QDate:Je,QDialog:ai,QDrawer:ci,QEditor:Vi,QExpansionItem:Wi,QFab:Gi,QFabAction:ts,QField:vi,QFile:es,QFooter:is,QForm:ss,QHeader:ns,QIcon:et,QImg:rs,QInfiniteScroll:as,QInnerLoading:ls,QInput:Bi,QIntersection:hs,QList:Li,QItem:zi,QItemSection:Oi,QItemLabel:Ni,QKnob:ps,QLayout:vs,QMarkupTable:gs,QMenu:Ht,QNoSsr:_s,QOptionGroup:Cs,QPage:xs,QPageContainer:ks,QPageScroller:$s,QPageSticky:qs,QPagination:Ts,QParallax:Ms,QPopupEdit:Bs,QPopupProxy:Ps,QLinearProgress:Ls,QPullToRefresh:zs,QRadio:bs,QRange:As,QRating:Is,QResizeObserver:Pe,QResponsive:Fs,QScrollArea:Rs,QScrollObserver:ms,QSelect:Ys,QSeparator:Hi,QSkeleton:Xs,QSlideItem:Zs,QSlideTransition:ji,QSlider:Me,QSpace:Js,QSpinner:vt,QSpinnerAudio:tn,QSpinnerBall:en,QSpinnerBars:sn,QSpinnerComment:nn,QSpinnerCube:on,QSpinnerDots:rn,QSpinnerFacebook:an,QSpinnerGears:ln,QSpinnerGrid:cn,QSpinnerHearts:un,QSpinnerHourglass:hn,QSpinnerInfinity:dn,QSpinnerIos:pn,QSpinnerOval:fn,QSpinnerPie:mn,QSpinnerPuff:vn,QSpinnerRadio:gn,QSpinnerRings:_n,QSpinnerTail:bn,QSplitter:yn,QStep:Cn,QStepper:xn,QStepperNavigation:kn,QTabPanels:Ae,QTabPanel:Ie,QTable:Qn,QTh:qn,QTr:Wn,QTd:Yn,QTabs:Oe,QTab:De,QRouteTab:Kn,QTime:Xn,QTimeline:Gn,QTimelineEntry:Zn,QToggle:ys,QToolbar:Jn,QToolbarTitle:to,QTooltip:Pi,QTree:eo,QUploader:no,QUploaderBase:io,QUploaderAddTrigger:oo,QVideo:ro,QVirtualScroll:Ln}),lo={name:"close-popup",bind:function(t,e,i){var s={depth:gl(e.value),handler:function(t){0!==s.depth&&setTimeout(function(){!function(t,e,i){for(;0!==i&&void 0!==t;){if(void 0!==t.__renderPortal){if(i--,"QMenu"===t.$options.name){t=Nr(t,e);continue}t.hide(e)}t=t.$parent}}(i.componentInstance||i.context,t,s.depth)})},handlerKey:function(t){!0===br(t,13)&&s.handler(t)}};void 0!==t.__qclosepopup&&(t.__qclosepopup_old=t.__qclosepopup),t.__qclosepopup=s,t.addEventListener("click",s.handler),t.addEventListener("keyup",s.handlerKey)},update:function(t,e){var i=e.value,s=e.oldValue;void 0!==t.__qclosepopup&&i!==s&&(t.__qclosepopup.depth=gl(i))},unbind:function(t){var e=t.__qclosepopup_old||t.__qclosepopup;void 0!==e&&(t.removeEventListener("click",e.handler),t.removeEventListener("keyup",e.handlerKey),delete t[t.__qclosepopup_old?"__qclosepopup_old":"__qclosepopup"])}},co={name:"go-back",bind:function(t,e,i){var s=e.value,n=e.modifiers,o={value:s,position:window.history.length-1,single:n.single,goBack:function(){var t=i.context.$router;!0===o.single?t.go(-1):!0===c.is.nativeMobile?t.go(o.position-window.history.length):t.replace(o.value)},goBackKey:function(t){!0===br(t,13)&&o.goBack()}};t.__qgoback&&(t.__qgoback_old=t.__qgoback),t.__qgoback=o,t.addEventListener("click",o.goBack),t.addEventListener("keyup",o.goBackKey)},update:function(t,e){var i=e.value,s=e.oldValue,n=e.modifiers,o=t.__qgoback;void 0!==o&&(i!==s&&(o.value=i),o.single!==n.single&&(o.single=n.single))},unbind:function(t){var e=t.__qgoback_old||t.__qgoback;void 0!==e&&(t.removeEventListener("click",e.goBack),t.removeEventListener("keyup",e.goBackKey),delete t[t.__qgoback_old?"__qgoback_old":"__qgoback"])}},uo={childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0},ho={name:"mutation",inserted:function(t,e){var i={};_l(t,i,e),t.__qmutation=i},update:function(t,e){var i=t.__qmutation;void 0!==i&&_l(t,i,e)},unbind:bl},po={name:"scroll-fire",bind:function(t){var e={scroll:ar(function(){var i,s;e.scrollTarget===window?(s=t.getBoundingClientRect().bottom,i=window.innerHeight):(s=Pr(t).top+Lr(t),i=Pr(e.scrollTarget).top+Lr(e.scrollTarget)),s>0&&s=s.sensitivity||Math.abs(i-s.origin.top)>=s.sensitivity)&&clearTimeout(s.timer)},end:function(t){Fr(s,"temp"),void 0!==s.styleCleanup&&s.styleCleanup(s.triggered),!0===s.triggered?void 0!==t&&nr(t):clearTimeout(s.timer)}};t.__qtouchhold&&(t.__qtouchhold_old=t.__qtouchhold),t.__qtouchhold=s,Sl(t,e),!0===i.mouse&&Ir(s,"main",[[t,"mousedown","mouseStart","passive"+(!0===i.mouseCapture?"Capture":"")]]),!0===c.has.touch&&Ir(s,"main",[[t,"touchstart","touchStart","passive"+(!0===i.capture?"Capture":"")],[t,"touchend","noop","notPassiveCapture"]])}},update:Sl,unbind:function(t){var e=t.__qtouchhold_old||t.__qtouchhold;void 0!==e&&(Fr(e,"main"),Fr(e,"temp"),clearTimeout(e.timer),void 0!==e.styleCleanup&&e.styleCleanup(),delete t[t.__qtouchhold_old?"__qtouchhold_old":"__qtouchhold"])}},vo={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},go=new RegExp("^([\\d+]+|"+Object.keys(vo).join("|")+")$","i"),_o={name:"touch-repeat",bind:function(t,e){var i=e.modifiers,s=e.value,n=e.arg,o=Object.keys(i).reduce(function(t,e){if(!0===go.test(e)){var i=isNaN(parseInt(e,10))?vo[e.toLowerCase()]:parseInt(e,10);i>=0&&t.push(i)}return t},[]);if(!0===i.mouse||!0===c.has.touch||0!==o.length){var r="string"==typeof n&&n.length>0?n.split(":").map(function(t){return parseInt(t,10)}):[0,600,300],a=r.length-1,l={keyboard:o,handler:s,noop:Zo,mouseStart:function(t){void 0===l.event&&"function"==typeof l.handler&&!0===Jo(t)&&(Ir(l,"temp",[[document,"mousemove","move","passiveCapture"],[document,"click","end","notPassiveCapture"]]),l.start(t,!0))},keyboardStart:function(e){if("function"==typeof l.handler&&!0===br(e,o)){if((0===r[0]||void 0!==l.event)&&(nr(e),t.focus(),void 0!==l.event))return;Ir(l,"temp",[[document,"keyup","end","notPassiveCapture"],[document,"click","end","notPassiveCapture"]]),l.start(e,!1,!0)}},touchStart:function(t){if(void 0!==t.target&&"function"==typeof l.handler){var e=Ct(t.target);Ir(l,"temp",[[e,"touchmove","move","passiveCapture"],[e,"touchcancel","end","notPassiveCapture"],[e,"touchend","end","notPassiveCapture"]]),l.start(t)}},start:function(t,e,i){function s(t){l.styleCleanup=void 0,document.documentElement.style.cursor="";var e=function(){document.body.classList.remove("non-selectable")};!0===t?(Vr(),setTimeout(e,10)):e()}!0!==i&&(l.origin=tr(t)),!0===c.is.mobile&&(document.body.classList.add("non-selectable"),Vr(),l.styleCleanup=s),l.event={touch:!0!==e&&!0!==i,mouse:!0===e,keyboard:!0===i,startTime:Date.now(),repeatCount:0};var n=function(){if(void 0!==l.event){0===l.event.repeatCount&&(l.event.evt=t,!0===i?l.event.keyCode=t.keyCode:l.event.position=tr(t),!0!==c.is.mobile&&(document.documentElement.style.cursor="pointer",document.body.classList.add("non-selectable"),Vr(),l.styleCleanup=s)),l.event.duration=Date.now()-l.event.startTime,l.event.repeatCount+=1,l.handler(l.event);var e=a=7||Math.abs(s-e.top)>=7}(t,l.origin)&&clearTimeout(l.timer)},end:function(t){void 0!==l.event&&(void 0!==l.styleCleanup&&l.styleCleanup(!0),void 0!==t&&l.event.repeatCount>0&&nr(t),Fr(l,"temp"),clearTimeout(l.timer),l.event=void 0)}};void 0!==t.__qtouchrepeat&&(t.__qtouchrepeat_old=t.__qtouchrepeat),t.__qtouchrepeat=l,!0===i.mouse&&Ir(l,"main",[[t,"mousedown","mouseStart","passive"+(!0===i.mouseCapture?"Capture":"")]]),!0===c.has.touch&&Ir(l,"main",[[t,"touchstart","touchStart","passive"+(!0===i.capture?"Capture":"")],[t,"touchend","noop","notPassiveCapture"]]),o.length>0&&Ir(l,"main",[[t,"keydown","keyboardStart","notPassive"+(!0===i.keyCapture?"Capture":"")]])}},update:function(t,e){var i=t.__qtouchrepeat;void 0!==i&&e.oldValue!==e.value&&("function"!=typeof e.value&&i.end(),i.handler=e.value)},unbind:function(t){var e=t.__qtouchrepeat_old||t.__qtouchrepeat;void 0!==e&&(clearTimeout(e.timer),Fr(e,"main"),Fr(e,"temp"),void 0!==e.styleCleanup&&e.styleCleanup(),delete t[t.__qtouchrepeat_old?"__qtouchrepeat_old":"__qtouchrepeat"])}},bo=Object.freeze({__proto__:null,ClosePopup:lo,GoBack:co,Intersection:us,Mutation:ho,Ripple:_t,ScrollFire:po,Scroll:fo,TouchHold:mo,TouchPan:qe,TouchRepeat:_o,TouchSwipe:Zt}),yo={install:function(t){var e=t.$q,s=t.cfg;this.set=!1!==i||!0!==u.is.mobile||!0!==u.is.nativeMobile&&!0!==u.is.winphone&&!0!==u.is.safari&&!0!==u.is.webkit&&!0!==u.is.vivaldi?Zo:function(t){var e=t||vr("primary");!0===u.is.nativeMobile&&window.StatusBar?window.StatusBar.backgroundColorByHexString(e):Cl(e)},e.addressbarColor=this,s.addressbarColor&&this.set(s.addressbarColor)}},wo={},So={isCapable:!1,isActive:!1,request:function(t){return this.isCapable&&!this.isActive?xl(t||document.documentElement,wo.request):this.__getErr()},exit:function(){return this.isCapable&&this.isActive?xl(document,wo.exit):this.__getErr()},toggle:function(t){return this.isActive?this.exit():this.request(t)},install:function(e){var s=this;e.$q.fullscreen=this,!0!==i&&(wo.request=["requestFullscreen","msRequestFullscreen","mozRequestFullScreen","webkitRequestFullscreen"].find(function(t){return document.documentElement[t]}),this.isCapable=void 0!==wo.request,!1!==this.isCapable?(this.__getErr=function(){return Promise.resolve()},wo.exit=["exitFullscreen","msExitFullscreen","mozCancelFullScreen","webkitExitFullscreen"].find(function(t){return document[t]}),this.isActive=!!(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement),["onfullscreenchange","onmsfullscreenchange","onwebkitfullscreenchange"].forEach(function(t){document[t]=function(){s.isActive=!s.isActive}}),t.util.defineReactive(this,"isActive",this.isActive)):this.__getErr=function(){return Promise.reject("Not capable")})}},Co={appVisible:!1,install:function(e){var s=this,n=e.$q;if(!0!==i){var o,r;void 0!==document.hidden?(o="hidden",r="visibilitychange"):void 0!==document.msHidden?(o="msHidden",r="msvisibilitychange"):void 0!==document.webkitHidden&&(o="webkitHidden",r="webkitvisibilitychange");var a=function(){s.appVisible=n.appVisible=!document[o]};a(),r&&void 0!==document[o]&&(t.util.defineReactive(n,"appVisible",this.appVisible),document.addEventListener(r,a,!1))}else this.appVisible=n.appVisible=!0}},xo=t.extend({name:"BottomSheetPlugin",mixins:[nt],inheritAttrs:!1,props:{title:String,message:String,actions:Array,grid:Boolean,cardClass:[String,Array,Object],cardStyle:[String,Array,Object]},methods:{show:function(){this.$refs.dialog.show()},hide:function(){this.$refs.dialog.hide()},onOk:function(t){this.$emit("ok",t),this.hide()},__getGrid:function(t){var e=this;return this.actions.map(function(i){var s=i.avatar||i.img;return void 0===i.label?t(Hi,{staticClass:"col-all",props:{dark:e.isDark}}):t("div",{staticClass:"q-bottom-sheet__item q-hoverable q-focusable cursor-pointer relative-position",class:i.classes,attrs:{tabindex:0},on:{click:function(){return e.onOk(i)},keyup:function(t){13===t.keyCode&&e.onOk(i)}}},[t("div",{staticClass:"q-focus-helper"}),i.icon?t(et,{props:{name:i.icon,color:i.color}}):s?t("img",{attrs:{src:s},staticClass:i.avatar?"q-bottom-sheet__avatar":null}):t("div",{staticClass:"q-bottom-sheet__empty-icon"}),t("div",[i.label])])})},__getList:function(t){var e=this;return this.actions.map(function(i){var s=i.avatar||i.img;return void 0===i.label?t(Hi,{props:{spaced:!0,dark:e.isDark}}):t(zi,{staticClass:"q-bottom-sheet__item",class:i.classes,props:{tabindex:0,clickable:!0,dark:e.isDark},on:{click:function(){return e.onOk(i)},keyup:function(t){13===t.keyCode&&e.onOk(i)}}},[t(Oi,{props:{avatar:!0}},[i.icon?t(et,{props:{name:i.icon,color:i.color}}):s?t("img",{attrs:{src:s},staticClass:i.avatar?"q-bottom-sheet__avatar":null}):null]),t(Oi,[i.label])])})}},render:function(t){var e=this,i=[];return this.title&&i.push(t(Xt,{staticClass:"q-dialog__title"},[this.title])),this.message&&i.push(t(Xt,{staticClass:"q-dialog__message scroll"},[this.message])),i.push(!0===this.grid?t("div",{staticClass:"scroll row items-stretch justify-start"},this.__getGrid(t)):t("div",{staticClass:"scroll"},this.__getList(t))),t(ai,{ref:"dialog",props:Object.assign({},this.$attrs,{position:"bottom"}),on:Hr(this,"hide",{hide:function(){e.$emit("hide")}})},[t(Kt,{staticClass:"q-bottom-sheet q-bottom-sheet--"+(!0===this.grid?"grid":"list")+(!0===this.isDark?" q-bottom-sheet--dark q-dark":""),style:this.cardStyle,class:this.cardClass},i)])}}),ko={onOk:function(){return ko},okCancel:function(){return ko},hide:function(){return ko}},qo={install:function(t){var e=t.$q;this.create=e.bottomSheet=kl(xo)}},$o={parseSSR:function(t){return t?Ll({ssr:t}):this},install:function(t){var e=t.$q,s=t.queues;!0===i?s.server.push(function(t,e){t.cookies=Ll(e)}):(Object.assign(this,Ll()),e.cookies=this)}},To=t.extend({name:"DialogPlugin",mixins:[nt],inheritAttrs:!1,props:{title:String,message:String,prompt:Object,options:Object,html:Boolean,ok:{type:[String,Object,Boolean],default:!0},cancel:[String,Object,Boolean],focus:{type:String,default:"ok",validator:function(t){return["ok","cancel","none"].includes(t)}},stackButtons:Boolean,color:String,cardClass:[String,Array,Object],cardStyle:[String,Array,Object]},computed:{hasForm:function(){return void 0!==this.prompt||void 0!==this.options},okLabel:function(){return Object(this.ok)===this.ok?this.$q.lang.label.ok:!0===this.ok?this.$q.lang.label.ok:this.ok},cancelLabel:function(){return Object(this.cancel)===this.cancel?this.$q.lang.label.cancel:!0===this.cancel?this.$q.lang.label.cancel:this.cancel},vmColor:function(){return this.color||(!0===this.isDark?"amber":"primary")},okDisabled:function(){return void 0!==this.prompt?void 0!==this.prompt.isValid&&!0!==this.prompt.isValid(this.prompt.model):void 0!==this.options?void 0!==this.options.isValid&&!0!==this.options.isValid(this.options.model):void 0},okProps:function(){return Object.assign({color:this.vmColor,label:this.okLabel,ripple:!1},Object(this.ok)===this.ok?this.ok:{flat:!0},{disable:this.okDisabled})},cancelProps:function(){return Object.assign({color:this.vmColor,label:this.cancelLabel,ripple:!1},Object(this.cancel)===this.cancel?this.cancel:{flat:!0})}},methods:{show:function(){this.$refs.dialog.show()},hide:function(){this.$refs.dialog.hide()},getPrompt:function(t){var e=this;return[t(Bi,{props:{value:this.prompt.model,type:this.prompt.type,label:this.prompt.label,stackLabel:this.prompt.stackLabel,outlined:this.prompt.outlined,filled:this.prompt.filled,standout:this.prompt.standout,color:this.vmColor,dense:!0,autofocus:!0,dark:this.isDark},on:Hr(this,"prompt",{input:function(t){e.prompt.model=t},keyup:function(t){!0!==e.okDisabled&&"textarea"!==e.prompt.type&&!0===br(t,13)&&e.onOk()}})})]},getOptions:function(t){var e=this;return[t(Cs,{props:{value:this.options.model,type:this.options.type,color:this.vmColor,inline:this.options.inline,options:this.options.items,dark:this.isDark},on:Hr(this,"opts",{input:function(t){e.options.model=t}})})]},getButtons:function(t){var e=[];if(this.cancel&&e.push(t(Mt,{props:this.cancelProps,attrs:{"data-autofocus":"cancel"===this.focus&&!0!==this.hasForm},on:Hr(this,"cancel",{click:this.onCancel})})),this.ok&&e.push(t(Mt,{props:this.okProps,attrs:{"data-autofocus":"ok"===this.focus&&!0!==this.hasForm},on:Hr(this,"ok",{click:this.onOk})})),e.length>0)return t(Gt,{staticClass:!0===this.stackButtons?"items-end":null,props:{vertical:this.stackButtons,align:"right"}},e)},onOk:function(){this.$emit("ok",ol(this.getData())),this.hide()},onCancel:function(){this.hide()},getData:function(){return void 0!==this.prompt?this.prompt.model:void 0!==this.options?this.options.model:void 0},getSection:function(t,e,i){return!0===this.html?t(Xt,{staticClass:e,domProps:{innerHTML:i}}):t(Xt,{staticClass:e},[i])}},render:function(t){var e=this,i=[];return this.title&&i.push(this.getSection(t,"q-dialog__title",this.title)),this.message&&i.push(this.getSection(t,"q-dialog__message scroll",this.message)),!0===this.hasForm&&i.push(t(Xt,{staticClass:"scroll"},void 0!==this.prompt?this.getPrompt(t):this.getOptions(t))),(this.ok||this.cancel)&&i.push(this.getButtons(t)),t(ai,{ref:"dialog",props:Object.assign({},this.$attrs,{value:this.value}),on:Hr(this,"hide",{hide:function(){e.$emit("hide")}})},[t(Kt,{staticClass:"q-dialog-plugin"+(!0===this.isDark?" q-dialog-plugin--dark q-dark":""),style:this.cardStyle,class:this.cardClass,props:{dark:this.isDark}},i)])}}),Mo={install:function(t){var e=t.$q;this.create=e.dialog=kl(To)}},Bo={isActive:!1,start:Zo,stop:Zo,increment:Zo,setDefaults:Zo,install:function(e){var s=this,n=e.$q,o=e.cfg;if(!0!==i){var r=void 0!==o.loadingBar?Object.assign({},o.loadingBar):{},a=n.loadingBar=new t({name:"LoadingBar",render:function(t){return t(G,{ref:"bar",props:r})}}).$mount().$refs.bar;Object.assign(this,{start:function(t){a.start(t),s.isActive=a.isActive=a.calls>0},stop:function(){a.stop(),s.isActive=a.isActive=a.calls>0},increment:a.increment,setDefaults:function(t){t===Object(t)&&Object.assign(r,t),a.$parent.$forceUpdate()}}),t.util.defineReactive(this,"isActive",this.isActive),t.util.defineReactive(a,"isActive",this.isActive),a.setDefaults=this.setDefaults,document.body.appendChild(a.$parent.$el)}else n.loadingBar=this}},Po=0,Lo={},zo={delay:0,message:!1,spinnerSize:80,spinnerColor:"white",messageColor:"white",backgroundColor:"black",spinner:vt,customClass:""},Oo=Object.assign({},zo),Eo={isActive:!1,show:function(e){var s=this;!0!==i&&((Lo=e===Object(e)&&!0===e.ignoreDefaults?Object.assign({},zo,e):Object.assign({},Oo,e)).customClass+=" text-"+Lo.backgroundColor,Lo.uid="l_"+Po++,this.isActive=!0,void 0===Vn?(clearTimeout(Nn),Nn=setTimeout(function(){Nn=void 0;var e=document.createElement("div");document.body.appendChild(e),Vn=new t({name:"QLoading",el:e,mounted:function(){Qa(!0,c)},render:function(t){var e;return t("transition",{props:{name:"q-transition--fade",appear:!0},on:Hr(s,"tr",{"after-leave":function(){!0!==s.isActive&&void 0!==Vn&&(Qa(!1,c),Vn.$destroy(),Vn.$el.remove(),Vn=void 0)}})},[!0===s.isActive?t("div",{staticClass:"q-loading fullscreen column flex-center z-max",key:Lo.uid,class:Lo.customClass.trim()},[t(Lo.spinner,{props:{color:Lo.spinnerColor,size:Lo.spinnerSize}}),Lo.message&&t("div",{class:"text-"+Lo.messageColor,domProps:(e={},e[!0===Lo.sanitize?"textContent":"innerHTML"]=Lo.message,e)})||void 0]):null])}})},Lo.delay)):Vn.$forceUpdate())},hide:function(){!0===this.isActive&&(void 0!==Nn&&(clearTimeout(Nn),Nn=void 0),this.isActive=!1)},setDefaults:function(t){t===Object(t)&&Object.assign(Oo,t)},install:function(t){var e=t.$q,i=t.cfg.loading;this.setDefaults(i),e.loading=this}};!1===i&&t.util.defineReactive(Eo,"isActive",Eo.isActive);var Do={install:function(e){var n=e.queues;!0===i?(t.prototype.$getMetaHTML=function(t){return function(e){return Rl(t,e)}},t.mixin({beforeCreate:Vl}),n.server.push(function(t,e){e.ssr.Q_HTML_ATTRS+=" %%Q_HTML_ATTRS%%",Object.assign(e.ssr,{Q_HEAD_TAGS:"%%Q_HEAD_TAGS%%",Q_BODY_ATTRS:"%%Q_BODY_ATTRS%%",Q_BODY_TAGS:"%%Q_BODY_TAGS%%"})})):(Hn=s,t.mixin({beforeCreate:Vl,created:function(){!0===Nl(this)&&(this.__qMetaUnwatch=this.$watch("__qMeta",this.__qMetaUpdate))},activated:jl,deactivated:jl,beforeMount:jl,destroyed:function(){!0===Nl(this)&&(this.__qMetaUnwatch(),this.__qMetaUpdate())},methods:{__qMetaUpdate:function(){clearTimeout(jn),jn=setTimeout(Il.bind(this),50)}}}))}},Ao=0,Io={},Fo={role:"alert"},Ro=["top-left","top-right","bottom-left","bottom-right","top","bottom","left","right","center"],Vo=["top-left","top-right","bottom-left","bottom-right"],No={positive:{icon:function(){return this.$q.iconSet.type.positive},color:"positive"},negative:{icon:function(){return this.$q.iconSet.type.negative},color:"negative"},warning:{icon:function(){return this.$q.iconSet.type.warning},color:"warning",textColor:"dark"},info:{icon:function(){return this.$q.iconSet.type.info},color:"info"}},jo={},Ho={},Qo={name:"QNotifications",created:function(){var t=this;this.notifs={},Ro.forEach(function(e){t.notifs[e]=[];var i=["left","center","right"].includes(e)?"center":e.indexOf("top")>-1?"top":"bottom",s=e.indexOf("left")>-1?"start":e.indexOf("right")>-1?"end":"center",n=["left","right"].includes(e)?"items-"+("left"===e?"start":"end")+" justify-center":"center"===e?"flex-center":"items-"+s;Ho[e]="q-notifications__list q-notifications__list--"+i+" fixed column no-wrap "+n})},methods:{add:function(t){var e=this;if(!t)return console.error("Notify: parameter required"),!1;var i={textColor:"white"};if("string"!=typeof t&&!0===t.ignoreDefaults||Object.assign(i,Io),Object(t)===t?(Object.assign(i,No[t.type],t),"function"==typeof i.icon&&(i.icon=i.icon.call(this))):Object.assign(i,{message:t}),i.meta={hasMedia:Boolean(i.icon||i.avatar)},i.position){if(!Ro.includes(i.position))return console.error("Notify: wrong position: "+i.position),!1}else i.position="bottom";if(void 0===i.timeout)i.timeout=5e3;else{var s=parseInt(i.timeout,10);if(isNaN(s)||s<0)return console.error("Notify: wrong timeout: "+i.timeout),!1;i.timeout=s}0===i.timeout?i.progress=!1:!0===i.progress&&(i.meta.progressStyle={animationDuration:i.timeout+1e3+"ms"});var n=(!0===Array.isArray(t.actions)?t.actions:[]).concat(!0!==t.ignoreDefaults&&!0===Array.isArray(Io.actions)?Io.actions:[]);i.closeBtn&&n.push({label:"string"==typeof i.closeBtn?i.closeBtn:this.$q.lang.label.close}),i.actions=n.map(function(t){var e=t.handler,s=t.noDismiss,n=function(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&-1===e.indexOf(s)&&(i[s]=t[s]);return i}(t,["handler","noDismiss"]);return{props:Object.assign({},{flat:!0},n),on:{click:"function"==typeof e?function(){e(),!0!==s&&i.meta.close()}:function(){i.meta.close()}}}}),void 0===i.multiLine&&(i.multiLine=i.actions.length>1),Object.assign(i.meta,{staticClass:"q-notification row items-stretch q-notification--"+(!0===i.multiLine?"multi-line":"standard")+(void 0!==i.color?" bg-"+i.color:"")+(void 0!==i.textColor?" text-"+i.textColor:"")+(void 0!==i.classes?" "+i.classes:""),wrapperClass:"q-notification__wrapper col relative-position border-radius-inherit "+(!0===i.multiLine?"column no-wrap justify-center":"row items-center"),contentClass:"q-notification__content row items-center"+(!0===i.multiLine?"":" col")}),!1===i.group?i.group=void 0:(void 0!==i.group&&!0!==i.group||(i.group=[i.message,i.caption,i.multiline].concat(i.actions.map(function(t){return t.props.label+"*"+t.props.icon})).join("|")),i.group+="|"+i.position),0===i.actions.length?i.actions=void 0:i.meta.actionsClass="q-notification__actions row items-center "+(!0===i.multiLine?"justify-end":"col-auto")+(!0===i.meta.hasMedia?" q-notification__actions--with-media":"");var o=jo[i.group];if(void 0===o){if(i.meta.uid=Ao++,i.meta.badge=1,-1!==["left","right","center"].indexOf(i.position))this.notifs[i.position].splice(Math.floor(this.notifs[i.position].length/2),0,i);else{var r=i.position.indexOf("top")>-1?"unshift":"push";this.notifs[i.position][r](i)}void 0!==i.group&&(jo[i.group]=i)}else{void 0!==o.meta.timer&&clearTimeout(o.meta.timer);var a=jo[i.group];if(void 0!==i.badgePosition){if(!1===Vo.includes(i.badgePosition))return console.error("Notify - wrong badgePosition specified: "+i.badgePosition),!1}else i.badgePosition="top-"+(i.position.indexOf("left")>-1?"right":"left");i.meta.uid=a.meta.uid,i.meta.badge=a.meta.badge+1,i.meta.badgeStaticClass="q-notification__badge q-notification__badge--"+i.badgePosition+(void 0!==i.badgeColor?" bg-"+i.badgeColor:"")+(void 0!==i.badgeTextColor?" text-"+i.badgeTextColor:""),i=Object.assign(a,i)}return i.meta.close=function(){e.remove(i)},this.$forceUpdate(),i.timeout>0&&(i.meta.timer=setTimeout(function(){i.meta.close()},i.timeout+1e3)),i.meta.close},remove:function(t){t.meta.timer&&clearTimeout(t.meta.timer);var e=this.notifs[t.position].indexOf(t);if(-1!==e){void 0!==t.group&&delete jo[t.group];var i=this.$refs["notif_"+t.meta.uid];if(i){var s=getComputedStyle(i),n=s.width,o=s.height;i.style.left=i.offsetLeft+"px",i.style.width=n,i.style.height=o}this.notifs[t.position].splice(e,1),this.$forceUpdate(),"function"==typeof t.onDismiss&&t.onDismiss()}}},render:function(t){var e=this;return t("div",{staticClass:"q-notifications"},Ro.map(function(i){return t("transition-group",{key:i,staticClass:Ho[i],tag:"div",props:{name:"q-notification--"+i,mode:"out-in"}},e.notifs[i].map(function(e){var i,s=e.meta,n={staticClass:"q-notification__message col"};if(!0===e.html)n.domProps={innerHTML:e.caption?"
    "+e.message+'
    '+e.caption+"
    ":e.message};else{var o=[e.message];i=e.caption?[t("div",o),t("div",{staticClass:"q-notification__caption"},[e.caption])]:o}var r=[];!0===s.hasMedia&&(e.icon?r.push(t(et,{staticClass:"q-notification__icon col-auto",attrs:{role:"img"},props:{name:e.icon}})):e.avatar&&r.push(t(it,{staticClass:"q-notification__avatar col-auto"},[t("img",{attrs:{src:e.avatar,"aria-hidden":"true"}})]))),r.push(t("div",n,i));var a=[t("div",{staticClass:s.contentClass},r)];return!0===e.progress&&a.push(t("div",{key:s.uid+"|p|"+s.badge,staticClass:"q-notification__progress",style:s.progressStyle,class:e.progressClass})),void 0!==e.actions&&a.push(t("div",{staticClass:s.actionsClass},e.actions.map(function(e){return t(Mt,{props:e.props,on:e.on})}))),s.badge>1&&a.push(t("div",{key:s.uid+"|"+s.badge,staticClass:s.badgeStaticClass,style:e.badgeStyle,class:e.badgeClass},[s.badge])),t("div",{ref:"notif_"+s.uid,key:s.uid,staticClass:s.staticClass,attrs:Fo},[t("div",{staticClass:s.wrapperClass},a)])}))}))}},Wo={create:function(t){return!0===i?Zo:this.__vm.add(t)},setDefaults:function(t){t===Object(t)&&Object.assign(Io,t)},registerType:function(t,e){!0!==i&&e===Object(e)&&(No[t]=e)},install:function(e){var s=e.cfg,n=e.$q;if(!0===i)return n.notify=Zo,void(n.notify.setDefaults=Zo);this.setDefaults(s.notify),n.notify=this.create.bind(this),n.notify.setDefaults=this.setDefaults,n.notify.registerType=this.registerType;var o=document.createElement("div");document.body.appendChild(o),this.__vm=new t(Qo),this.__vm.$mount(o)}},Yo={install:function(t){var e=t.$q,s=!0===i||!1===c.has.webStorage?Hl():Ql("local");e.localStorage=s,Object.assign(this,s)}},Uo={install:function(t){var e=t.$q,s=!0===i||!1===c.has.webStorage?Hl():Ql("session");e.sessionStorage=s,Object.assign(this,s)}},Ko=Object.freeze({__proto__:null,AddressbarColor:yo,AppFullscreen:So,AppVisibility:Co,BottomSheet:qo,Cookies:$o,Dark:B,Dialog:Mo,LoadingBar:Bo,Loading:Eo,Meta:Do,Notify:Wo,Platform:u,Screen:M,LocalStorage:Yo,SessionStorage:Uo}),Xo=Object.freeze({__proto__:null,clone:ol,colors:D,copyToClipboard:function(t){return void 0!==navigator.clipboard?navigator.clipboard.writeText(t):new Promise(function(e,i){var s=function(t){var e=document.createElement("textarea");e.value=t,e.contentEditable=!0,e.style.position="fixed",document.body.appendChild(e),e.focus(),e.select();var i=document.execCommand("copy");return e.remove(),i}(t);s?e(!0):i(s)})},date:Ge,debounce:ar,dom:gt,event:q,exportFile:function(t,e,i){var s=new Blob([e],{type:i||"text/plain"});if(window.navigator.msSaveOrOpenBlob)return window.navigator.msSaveOrOpenBlob(s,t);var n=document.createElement("a");n.download=t,n.href=window.URL.createObjectURL(s),n.classList.add("hidden"),n.style.position="fixed",document.body.appendChild(n);try{return n.click(),Wl(n),!0}catch(t){return Wl(n),t}},extend:el,format:Q,frameDebounce:nl,noop:Zo,openURL:function(e,i){var s=window.open;if(!0===u.is.cordova){if(void 0!==cordova&&void 0!==cordova.InAppBrowser&&void 0!==cordova.InAppBrowser.open)s=cordova.InAppBrowser.open;else if(void 0!==navigator&&void 0!==navigator.app)return navigator.app.loadUrl(e,{openExternal:!0})}else if(void 0!==t.prototype.$q.electron)return t.prototype.$q.electron.shell.openExternal(e);var n=s(e,"_blank");if(n)return n.focus(),n;i&&i()},patterns:xe,scroll:Vt,throttle:da,uid:Wa});return t.use({install:function(t,e){if(void 0===e&&(e={}),!0!==this.__qInstalled){this.__qInstalled=!0;var s=e.config||{};if(u.install(j,N),I.install(N,s),B.install(j,N,s),M.install(j,N,s),L.install(s),O.install(j,N,e.lang),R.install(j,e.iconSet),!0===i?t.mixin({beforeCreate:function(){this.$q=this.$root.$options.$q}}):t.prototype.$q=j,e.components&&Object.keys(e.components).forEach(function(i){var s=e.components[i];"function"==typeof s&&t.component(s.options.name,s)}),e.directives&&Object.keys(e.directives).forEach(function(i){var s=e.directives[i];void 0!==s.name&&void 0!==s.unbind&&t.directive(s.name,s)}),e.plugins){var n={$q:j,queues:N,cfg:s};Object.keys(e.plugins).forEach(function(t){var i=e.plugins[t];"function"==typeof i.install&&!1===V.includes(i)&&i.install(n)})}}}},{components:ao,directives:bo,plugins:Ko,config:window.quasarConfig||{}}),Object.assign({},{version:"1.9.7",lang:O,iconSet:R,components:ao,directives:bo,plugins:Ko,utils:Xo},ao,bo,Ko,Xo)}function Go(t){var o=function(t,e){var i=/(edge|edga|edgios)\/([\w.]+)/.exec(t)||/(opr)[\/]([\w.]+)/.exec(t)||/(vivaldi)[\/]([\w.]+)/.exec(t)||/(chrome|crios)[\/]([\w.]+)/.exec(t)||/(iemobile)[\/]([\w.]+)/.exec(t)||/(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(t)||/(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(t)||/(firefox|fxios)[\/]([\w.]+)/.exec(t)||/(webkit)[\/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[\/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:i[5]||i[3]||i[1]||"",version:i[2]||i[4]||"0",versionNumber:i[4]||i[2]||"0",platform:e[0]||""}}(t,function(t){return/(ipad)/.exec(t)||/(ipod)/.exec(t)||/(windows phone)/.exec(t)||/(iphone)/.exec(t)||/(kindle)/.exec(t)||/(silk)/.exec(t)||/(android)/.exec(t)||/(win)/.exec(t)||/(mac)/.exec(t)||/(linux)/.exec(t)||/(cros)/.exec(t)||/(playbook)/.exec(t)||/(bb)/.exec(t)||/(blackberry)/.exec(t)||[]}(t)),a={};o.browser&&(a[o.browser]=!0,a.version=o.version,a.versionNumber=parseInt(o.versionNumber,10)),o.platform&&(a[o.platform]=!0);var l=a.android||a.ios||a.bb||a.blackberry||a.ipad||a.iphone||a.ipod||a.kindle||a.playbook||a.silk||a["windows phone"];return!0===l||t.indexOf("mobile")>-1?(a.mobile=!0,a.edga||a.edgios?(a.edge=!0,o.browser="edge"):a.crios?(a.chrome=!0,o.browser="chrome"):a.fxios&&(a.firefox=!0,o.browser="firefox")):a.desktop=!0,(a.ipod||a.ipad||a.iphone)&&(a.ios=!0),a["windows phone"]&&(a.winphone=!0,delete a["windows phone"]),(a.chrome||a.opr||a.safari||a.vivaldi||!0===a.mobile&&!0!==a.ios&&!0!==l)&&(a.webkit=!0),(a.rv||a.iemobile)&&(o.browser="ie",a.ie=!0),(a.safari&&a.blackberry||a.bb)&&(o.browser="blackberry",a.blackberry=!0),a.safari&&a.playbook&&(o.browser="playbook",a.playbook=!0),a.opr&&(o.browser="opera",a.opera=!0),a.safari&&a.android&&(o.browser="android",a.android=!0),a.safari&&a.kindle&&(o.browser="kindle",a.kindle=!0),a.safari&&a.silk&&(o.browser="silk",a.silk=!0),a.vivaldi&&(o.browser="vivaldi",a.vivaldi=!0),a.name=o.browser,a.platform=o.platform,!1===i&&(t.indexOf("electron")>-1?a.electron=!0:document.location.href.indexOf("-extension://")>-1?a.bex=!0:void 0!==window.Capacitor?(a.capacitor=!0,a.nativeMobile=!0,a.nativeMobileWrapper="capacitor"):void 0!==window._cordovaNative||void 0!==window.cordova?(a.cordova=!0,a.nativeMobile=!0,a.nativeMobileWrapper="cordova"):!0===r&&!0===a.desktop&&!0===a.mac&&!0===a.safari&&function(t){var i;e={is:Object.assign({},t)},delete t.mac,delete t.desktop;var s=Math.min(window.innerHeight,window.innerWidth)>414?"ipad":"iphone";Object.assign(t,((i={mobile:!0,ios:!0,platform:s})[s]=!0,i))}(a),!0===(s=void 0===a.nativeMobile&&void 0===a.electron&&!!document.querySelector("[data-server-rendered]"))&&(n=!0)),a}function Zo(){}function Jo(t){return 0===t.button}function tr(t){return t.touches&&t.touches[0]?t=t.touches[0]:t.changedTouches&&t.changedTouches[0]?t=t.changedTouches[0]:t.targetTouches&&t.targetTouches[0]&&(t=t.targetTouches[0]),{top:t.clientY,left:t.clientX}}function er(t){if(t.path)return t.path;if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;){if(e.push(i),"HTML"===i.tagName)return e.push(document),e.push(window),e;i=i.parentElement}}function ir(t){t.stopPropagation()}function sr(t){!1!==t.cancelable&&t.preventDefault()}function nr(t){!1!==t.cancelable&&t.preventDefault(),t.stopPropagation()}function or(t,e){if(void 0!==t&&(!0!==e||!0!==t.__dragPrevented)){var i=!0===e?function(t){t.__dragPrevented=!0,t.addEventListener("dragstart",sr,h.notPassiveCapture)}:function(t){delete t.__dragPrevented,t.removeEventListener("dragstart",sr,h.notPassiveCapture)};t.querySelectorAll("a, img").forEach(i)}}function rr(t,e){void 0===e&&(e={});var i=e.bubbles;void 0===i&&(i=!1);var s=e.cancelable;void 0===s&&(s=!1);try{return new Event(t,{bubbles:i,cancelable:s})}catch(e){var n=document.createEvent("Event");return n.initEvent(t,i,s),n}}function ar(t,e,i){var s;function n(){var n=this,o=arguments;clearTimeout(s),!0===i&&void 0===s&&t.apply(this,o),s=setTimeout(function(){s=void 0,!0!==i&&t.apply(n,o)},e)}return void 0===e&&(e=250),n.cancel=function(){clearTimeout(s)},n}function lr(t){var e=t.r,i=t.g,s=t.b,n=t.a,o=void 0!==n;if(e=Math.round(e),i=Math.round(i),s=Math.round(s),e>255||i>255||s>255||o&&n>100)throw new TypeError("Expected 3 numbers below 256 (and optionally one below 100)");return n=o?(256|Math.round(255*n/100)).toString(16).slice(1):"","#"+(s|i<<8|e<<16|1<<24).toString(16).slice(1)+n}function cr(t){var e=t.r,i=t.g,s=t.b,n=t.a;return"rgb"+(void 0!==n?"a":"")+"("+e+","+i+","+s+(void 0!==n?","+n/100:"")+")"}function ur(t){if("string"!=typeof t)throw new TypeError("Expected a string");3===(t=t.replace(/^#/,"")).length?t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:4===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);var e=parseInt(t,16);return t.length>6?{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:Math.round((255&e)/2.55)}:{r:e>>16,g:e>>8&255,b:255&e}}function hr(t){var e,i,s,n,o,r,a,l,c=t.h,u=t.s,h=t.v,d=t.a;switch(r=(h/=100)*(1-(u/=100)),a=h*(1-(o=6*(c/=360)-(n=Math.floor(6*c)))*u),l=h*(1-(1-o)*u),n%6){case 0:e=h,i=l,s=r;break;case 1:e=a,i=h,s=r;break;case 2:e=r,i=h,s=l;break;case 3:e=r,i=a,s=h;break;case 4:e=l,i=r,s=h;break;case 5:e=h,i=r,s=a}return{r:Math.round(255*e),g:Math.round(255*i),b:Math.round(255*s),a:d}}function dr(t){var e,i=t.r,s=t.g,n=t.b,o=t.a,r=Math.max(i,s,n),a=Math.min(i,s,n),l=r-a,c=0===r?0:l/r,u=r/255;switch(r){case a:e=0;break;case i:e=s-n+l*(s=1024&&e=e?s:new Array(e-s.length+1).join(i)+s}function qr(t){return{props:{size:String},computed:{sizeStyle:function(){if(void 0!==this.size)return{fontSize:this.size in t?t[this.size]+"px":this.size}}}}}function $r(t,e,i){return void 0!==t.$scopedSlots[e]?t.$scopedSlots[e]():i}function Tr(t,e,i){return void 0!==t.$scopedSlots[e]?t.$scopedSlots[e]().slice():i}function Mr(t,e,i){return void 0!==e.$scopedSlots[i]?t.concat(e.$scopedSlots[i]()):t}function Br(t,e,i){if(void 0===e.$scopedSlots[i])return t;var s=e.$scopedSlots[i]();return void 0!==t?t.concat(s):s}function Pr(t){if(t===window)return{top:0,left:0};var e=t.getBoundingClientRect();return{top:e.top,left:e.left}}function Lr(t){return t===window?window.innerHeight:t.getBoundingClientRect().height}function zr(t,e){var i=t.style;Object.keys(e).forEach(function(t){i[t]=e[t]})}function Or(t,e,i,s){!0===i.modifiers.stop&&ir(t);var n=i.modifiers,o=n.center,r=n.color;o=!0===o||!0===s;var a=document.createElement("span"),l=document.createElement("span"),c=tr(t),u=e.getBoundingClientRect(),h=u.left,d=u.top,p=u.width,f=u.height,m=Math.sqrt(p*p+f*f),v=m/2,g=(p-m)/2+"px",_=o?g:c.left-h-v+"px",b=(f-m)/2+"px",y=o?b:c.top-d-v+"px";l.className="q-ripple__inner",zr(l,{height:m+"px",width:m+"px",transform:"translate3d("+_+","+y+",0) scale3d(.2,.2,1)",opacity:0}),a.className="q-ripple"+(r?" text-"+r:""),a.setAttribute("dir","ltr"),a.appendChild(l),e.appendChild(a);var w=function(){a.remove(),clearTimeout(S)};i.abort.push(w);var S=setTimeout(function(){l.classList.add("q-ripple__inner--enter"),l.style.transform="translate3d("+g+","+b+",0) scale3d(1,1,1)",l.style.opacity=.2,S=setTimeout(function(){l.classList.remove("q-ripple__inner--enter"),l.classList.add("q-ripple__inner--leave"),l.style.opacity=0,S=setTimeout(function(){a.remove(),i.abort.splice(i.abort.indexOf(w),1)},275)},250)},50)}function Er(t,e){var i=e.value,s=e.modifiers,n=e.arg;t.enabled=!1!==i,!0===t.enabled&&(t.modifiers=Object(i)===i?{stop:!0===i.stop||!0===s.stop,center:!0===i.center||!0===s.center,color:i.color||n,keyCodes:[].concat(i.keyCodes||13)}:{stop:s.stop,center:s.center,color:n,keyCodes:[13]})}function Dr(t){var e={};return wt.forEach(function(i){t[i]&&(e[i]=!0)}),0===Object.keys(e).length?St:(!0===e.horizontal&&(e.left=e.right=!0),!0===e.vertical&&(e.up=e.down=!0),!0===e.left&&!0===e.right&&(e.horizontal=!0),!0===e.up&&!0===e.down&&(e.vertical=!0),!0===e.horizontal&&!0===e.vertical&&(e.all=!0),e)}function Ar(t,e){var i=e.oldValue,s=e.value,n=e.modifiers;i!==s&&("function"!=typeof s&&t.end(),t.handler=s),(t.modifiers.mouseAllDir!==n.mouseAllDir||wt.some(function(e){return n[e]!==t.modifiers[e]}))&&(t.modifiers=n,t.direction=Dr(n))}function Ir(t,e,i){t[e+="Evt"]=void 0!==t[e]?t[e].concat(i):i,i.forEach(function(e){e[0].addEventListener(e[1],t[e[2]],h[e[3]])})}function Fr(t,e){void 0!==t[e+="Evt"]&&(t[e].forEach(function(e){e[0].removeEventListener(e[1],t[e[2]],h[e[3]])}),t[e]=void 0)}function Rr(t,e){return void 0===e.event&&void 0!==t.target&&!0!==t.target.draggable&&"function"==typeof e.handler&&"INPUT"!==t.target.nodeName.toUpperCase()&&(void 0===t.qClonedBy||-1===t.qClonedBy.indexOf(e.uid))}function Vr(){if(void 0!==window.getSelection){var t=window.getSelection();void 0!==t.empty?t.empty():void 0!==t.removeAllRanges&&(t.removeAllRanges(),!0!==u.is.mobile&&t.addRange(document.createRange()))}else void 0!==document.selection&&document.selection.empty()}function Nr(t,e){do{if("QMenu"===t.$options.name){if(t.hide(e),!0===t.separateClosePopup)return t.$parent}else if(void 0!==t.__renderPortal)return void 0!==t.$parent&&"QPopupProxy"===t.$parent.$options.name?(t.hide(e),t.$parent):t;t=t.$parent}while(void 0!==t)}function jr(t,e){return void 0===e&&(e=[]),t.$children.forEach(function(t){e.push(t),t.$children.length>0&&jr(t,e)}),e}function Hr(t,e,s){if(!0===i)return s;var n="__qcache_"+e;return void 0===t[n]?t[n]=s:t[n]}function Qr(t,e){for(var i=t.length-1;i>=0;i--)if(void 0===t[i](e))return}function Wr(t){clearTimeout(p),"focusin"===t.type&&!0===t.target.hasAttribute("tabindex")?p=setTimeout(function(){Qr(It.focus,t)},200):Qr(It.click,t)}function Yr(t,e){if("string"==typeof e)try{e=document.querySelector(e)}catch(t){e=void 0}return void 0===e||null===e?e=t.closest(".scroll,.scroll-y,.overflow-auto"):!0===e._isVue&&void 0!==e.$el&&(e=e.$el),Rt.includes(e)?window:e}function Ur(t){return(t===window?document.body:t).scrollHeight}function Kr(t){return t===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:t.scrollTop}function Xr(t){return t===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:t.scrollLeft}function Gr(t,e,i){void 0===i&&(i=0);var s=Kr(t);i<=0?s!==e&&Jr(t,e):requestAnimationFrame(function(){var n=s+(e-s)/Math.max(16,i)*16;Jr(t,n),n!==e&&Gr(t,e,i-16)})}function Zr(t,e,i){void 0===i&&(i=0);var s=Xr(t);i<=0?s!==e&&ta(t,e):requestAnimationFrame(function(){var n=s+(e-s)/Math.max(16,i)*16;ta(t,n),n!==e&&Zr(t,e,i-16)})}function Jr(t,e){t!==window?t.scrollTop=e:window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,e)}function ta(t,e){t!==window?t.scrollLeft=e:window.scrollTo(e,window.pageYOffset||window.scrollY||document.body.scrollTop||0)}function ea(t,e,i){i?Gr(t,e,i):Jr(t,e)}function ia(t,e,i){i?Zr(t,e,i):ta(t,e)}function sa(){if(void 0!==f)return f;var t=document.createElement("p"),e=document.createElement("div");zr(t,{width:"100%",height:"200px"}),zr(e,{position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var s=t.offsetWidth;return i===s&&(s=e.clientWidth),e.remove(),f=i-s}function na(t,e){return void 0===e&&(e=!0),!(!t||t.nodeType!==Node.ELEMENT_NODE)&&(e?t.scrollHeight>t.clientHeight&&(t.classList.contains("scroll")||t.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(t)["overflow-y"])):t.scrollWidth>t.clientWidth&&(t.classList.contains("scroll")||t.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(t)["overflow-x"])))}function oa(t){var e=t.split(" ");return 2===e.length&&(["top","center","bottom"].includes(e[0])?!!["left","middle","right"].includes(e[1])||(console.error("Anchor/Self position must end with one of left/middle/right"),!1):(console.error("Anchor/Self position must start with one of top/center/bottom"),!1))}function ra(t){return!t||2===t.length&&("number"==typeof t[0]&&"number"==typeof t[1])}function aa(t){var e=t.split(" ");return{vertical:e[0],horizontal:e[1]}}function la(t){if(!0===c.is.ios&&void 0!==window.visualViewport){var e=document.body.style,i=window.visualViewport,s=i.offsetLeft,n=i.offsetTop;s!==m&&(e.setProperty("--q-pe-left",s+"px"),m=s),n!==v&&(e.setProperty("--q-pe-top",n+"px"),v=n)}var o,r=t.el,a=r.scrollLeft,l=r.scrollTop;if(void 0===t.absoluteOffset)o=function(t,e){var i=t.getBoundingClientRect(),s=i.top,n=i.left,o=i.right,r=i.bottom,a=i.width,l=i.height;return void 0!==e&&(s-=e[1],n-=e[0],r+=e[1],o+=e[0],a+=e[0],l+=e[1]),{top:s,left:n,right:o,bottom:r,width:a,height:l,middle:n+(o-n)/2,center:s+(r-s)/2}}(t.anchorEl,!0===t.cover?[0,0]:t.offset);else{var u=t.anchorEl.getBoundingClientRect(),h=u.top,d=u.left,p=h+t.absoluteOffset.top,f=d+t.absoluteOffset.left;o={top:p,left:f,width:1,height:1,right:f+1,center:p,middle:f,bottom:p+1}}var g={maxHeight:t.maxHeight,maxWidth:t.maxWidth,visibility:"visible"};!0!==t.fit&&!0!==t.cover||(g.minWidth=o.width+"px",!0===t.cover&&(g.minHeight=o.height+"px")),Object.assign(t.el.style,g);var _=function(t){return{top:0,center:t.offsetHeight/2,bottom:t.offsetHeight,left:0,middle:t.offsetWidth/2,right:t.offsetWidth}}(t.el),b={top:o[t.anchorOrigin.vertical]-_[t.selfOrigin.vertical],left:o[t.anchorOrigin.horizontal]-_[t.selfOrigin.horizontal]};!function(t,e,i,s,n){var o=i.bottom,r=i.right,a=sa(),l=window.innerHeight-a,c=document.body.clientWidth;if(t.top<0||t.top+o>l)if("center"===n.vertical)t.top=e[s.vertical]>l/2?Math.max(0,l-o):0,t.maxHeight=Math.min(o,l);else if(e[s.vertical]>l/2){var u=Math.min(l,"center"===s.vertical?e.center:s.vertical===n.vertical?e.bottom:e.top);t.maxHeight=Math.min(o,u),t.top=Math.max(0,u-o)}else t.top=Math.max(0,"center"===s.vertical?e.center:s.vertical===n.vertical?e.top:e.bottom),t.maxHeight=Math.min(o,l-t.top);if(t.left<0||t.left+r>c)if(t.maxWidth=Math.min(r,c),"middle"===n.horizontal)t.left=e[s.horizontal]>c/2?Math.max(0,c-r):0;else if(e[s.horizontal]>c/2){var h=Math.min(c,"middle"===s.horizontal?e.middle:s.horizontal===n.horizontal?e.right:e.left);t.maxWidth=Math.min(r,h),t.left=Math.max(0,h-t.maxWidth)}else t.left=Math.max(0,"middle"===s.horizontal?e.middle:s.horizontal===n.horizontal?e.left:e.right),t.maxWidth=Math.min(r,c-t.left)}(b,o,_,t.anchorOrigin,t.selfOrigin),g={top:Math.floor(b.top)+"px",left:Math.floor(b.left)+"px"},void 0!==b.maxHeight&&(g.maxHeight=Math.floor(b.maxHeight)+"px",o.height>b.maxHeight&&(g.minHeight=g.maxHeight)),void 0!==b.maxWidth&&(g.maxWidth=Math.floor(b.maxWidth)+"px",o.width>b.maxWidth&&(g.minWidth=g.maxWidth)),Object.assign(t.el.style,g),t.el.scrollTop!==l&&(t.el.scrollTop=l),t.el.scrollLeft!==a&&(t.el.scrollLeft=a)}function ca(t,e){if(t===e)return!0;if(null!==t&&null!==e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var i,s,n;if(t.constructor===Array){if((i=t.length)!==e.length)return!1;for(s=i;0!=s--;)if(!0!==ca(t[s],e[s]))return!1;return!0}if(!0===se&&t.constructor===Map){if(t.size!==e.size)return!1;for(s=t.entries().next();!0!==s.done;){if(!0!==e.has(s.value[0]))return!1;s=s.next()}for(s=t.entries().next();!0!==s.done;){if(!0!==ca(s.value[1],e.get(s.value[0])))return!1;s=s.next()}return!0}if(!0===ne&&t.constructor===Set){if(t.size!==e.size)return!1;for(s=t.entries().next();!0!==s.done;){if(!0!==e.has(s.value[0]))return!1;s=s.next()}return!0}if(!0===oe&&null!=t.buffer&&t.buffer.constructor===ArrayBuffer){if((i=t.length)!==e.length)return!1;for(s=i;0!=s--;)if(t[s]!==e[s])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if((i=(n=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(s=i;0!=s--;){var o=n[s];if(!0!==ca(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}function ua(t){return"[object Date]"===Object.prototype.toString.call(t)}function ha(t){return"number"==typeof t&&isFinite(t)}function da(t,e){void 0===e&&(e=250);var i,s=!1;return function(){return!1===s&&(s=!0,setTimeout(function(){s=!1},e),i=t.apply(this,arguments)),i}}function pa(t,e,i){var s,n=tr(t),o=n.left-e.event.x,r=n.top-e.event.y,a=Math.abs(o),l=Math.abs(r),c=e.direction;!0===c.horizontal&&!0!==c.vertical?s=o<0?"left":"right":!0!==c.horizontal&&!0===c.vertical?s=r<0?"up":"down":!0===c.up&&r<0?(s="up",a>l&&(!0===c.left&&o<0?s="left":!0===c.right&&o>0&&(s="right"))):!0===c.down&&r>0?(s="down",a>l&&(!0===c.left&&o<0?s="left":!0===c.right&&o>0&&(s="right"))):!0===c.left&&o<0?(s="left",a0&&(s="down"))):!0===c.right&&o>0&&(s="right",a0&&(s="down")));var u=!1;if(void 0===s&&!0!==i){if(!0===e.event.isFirst||void 0===e.event.lastDir)return{};u=!0,"left"===(s=e.event.lastDir)||"right"===s?(n.left-=o,a=0,o=0):(n.top-=r,l=0,r=0)}return{synthetic:u,payload:{evt:t,touch:!0!==e.event.mouse,mouse:!0===e.event.mouse,position:n,direction:s,isFirst:e.event.isFirst,isFinal:!0===i,duration:Date.now()-e.event.time,distance:{x:a,y:l},offset:{x:o,y:r},delta:{x:n.left-e.event.lastX,y:n.top-e.event.lastY}}}}function fa(t,e,i){var s=Cr((tr(t).left-e.left)/e.width,0,1);return!0===i?1-s:s}function ma(t,e,i,s,n){var o=e+t*(i-e);if(s>0){var r=(o-e)%s;o+=(Math.abs(r)>=s/2?(r<0?-1:1)*s:0)-r}return n>0&&(o=parseFloat(o.toFixed(n))),Cr(o,e,i)}function va(t,e,i){var s=!0===i?["left","right"]:["top","bottom"];return"absolute-"+(!0===e?s[0]:s[1])+(t?" text-"+t:"")}function ga(t,e){return t.priorityMatched===e.priorityMatched?e.priorityHref-t.priorityHref:e.priorityMatched-t.priorityMatched}function _a(t){return t.selected=!1,t}function ba(t,e,i){return"[object Date]"===Object.prototype.toString.call(t)&&(i=t.getDate(),e=t.getMonth()+1,t=t.getFullYear()),function(t){var e,i,s,n=ka(t).gy,o=n-621,r=Ca(o,!1),a=xa(n,3,r.march);if((s=t-a)>=0){if(s<=185)return i=1+qa(s,31),e=$a(s,31)+1,{jy:o,jm:i,jd:e};s-=186}else o-=1,s+=179,1===r.leap&&(s+=1);return i=7+qa(s,30),e=$a(s,30)+1,{jy:o,jm:i,jd:e}}(xa(t,e,i))}function ya(t,e,i){return ka(function(t,e,i){var s=Ca(t,!0);return xa(s.gy,3,s.march)+31*(e-1)-qa(e,7)*(e-7)+i-1}(t,e,i))}function wa(t){return 0===function(t){var e,i,s,n,o,r=Ve.length,a=Ve[0];if(t=Ve[r-1])throw new Error("Invalid Jalaali year "+t);for(o=1;o=Ve[l-1])throw new Error("Invalid Jalaali year "+t);for(a=1;a12)return o}else void 0!==h.MMM?o.month=l.indexOf(d[h.MMM])+1:void 0!==h.MMMM&&(o.month=a.indexOf(d[h.MMMM])+1);if(void 0!==h.D){if(o.day=parseInt(d[h.D],10),null===o.year||null===o.month||o.day<1)return o;var v="persian"!==s?new Date(o.year,o.month,0).getDate():Sa(o.year,o.month);if(o.day>v)return o}void 0!==h.H?o.hour=parseInt(d[h.H],10)%24:void 0!==h.h&&(o.hour=parseInt(d[h.h],10)%12,(h.A&&"PM"===d[h.A]||h.a&&"pm"===d[h.a]||h.aa&&"p.m."===d[h.aa])&&(o.hour+=12),o.hour=o.hour%24),void 0!==h.m&&(o.minute=parseInt(d[h.m],10)%60),void 0!==h.s&&(o.second=parseInt(d[h.s],10)%60),void 0!==h.S&&(o.millisecond=parseInt(d[h.S],10)*Math.pow(10,3-d[h.S].length))}return o.dateHash=o.year+"/"+kr(o.month)+"/"+kr(o.day),o.timeHash=kr(o.hour)+":"+kr(o.minute)+":"+kr(o.second),o}function Ma(t,e){void 0===e&&(e="");var i=t>0?"-":"+",s=Math.abs(t),n=s%60;return i+kr(Math.floor(s/60))+e+kr(n)}function Ba(t,e){var i=new Date(t.getFullYear(),e,0,0,0,0,0).getDate();t.setMonth(e-1,Math.min(i,t.getDate()))}function Pa(t,e,i){var s=new Date(t),n=i?1:-1;return Object.keys(e).forEach(function(t){if("month"!==t){var i="year"===t?"FullYear":Sr("days"===t?"date":t);s["set"+i](s["get"+i]()+n*e[t])}else Ba(s,s.getMonth()+1+n*e.month)}),s}function La(t){var e=new Date(t.getFullYear(),t.getMonth(),t.getDate());e.setDate(e.getDate()-(e.getDay()+6)%7+3);var i=new Date(e.getFullYear(),0,4);i.setDate(i.getDate()-(i.getDay()+6)%7+3);var s=e.getTimezoneOffset()-i.getTimezoneOffset();e.setHours(e.getHours()-s);var n=(e-i)/(7*je);return 1+Math.floor(n)}function za(t,e,i){var s=new Date(t),n="set"+(i?"UTC":"");return Object.keys(e).forEach(function(t){if("month"!==t){var i="year"===t?"FullYear":t.charAt(0).toUpperCase()+t.slice(1);s[""+n+i](e[t])}else Ba(s,e.month)}),s}function Oa(t,e){var i=new Date(t);switch(e){case"year":i.setMonth(0);case"month":i.setDate(1);case"day":i.setHours(0);case"hour":i.setMinutes(0);case"minute":i.setSeconds(0);case"second":i.setMilliseconds(0)}return i}function Ea(t,e,i){return(t.getTime()-t.getTimezoneOffset()*Qe-(e.getTime()-e.getTimezoneOffset()*Qe))/i}function Da(t,e,i){void 0===i&&(i="days");var s=new Date(t),n=new Date(e);switch(i){case"years":return s.getFullYear()-n.getFullYear();case"months":return 12*(s.getFullYear()-n.getFullYear())+s.getMonth()-n.getMonth();case"days":return Ea(Oa(s,"day"),Oa(n,"day"),je);case"hours":return Ea(Oa(s,"hour"),Oa(n,"hour"),He);case"minutes":return Ea(Oa(s,"minute"),Oa(n,"minute"),Qe);case"seconds":return Ea(Oa(s,"second"),Oa(n,"second"),1e3)}}function Aa(t){return Da(t,Oa(t,"year"),"days")+1}function Ia(t){return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()}function Fa(t){if(t>=11&&t<=13)return t+"th";switch(t%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"}function Ra(t,e,i,s){if((0===t||t)&&t!==1/0&&t!==-1/0){var n=new Date(t);if(!isNaN(n)){void 0===e&&(e=We);var o=void 0!==i?i:O.props.date;return e.replace(Ye,function(t,e){return t in Xe?Xe[t](n,o,s):void 0===e?t:e.split("\\]").join("]")})}}}function Va(t){(function(t){if(t.target===document.body||t.target.classList.contains("q-layout__backdrop"))return!0;for(var e=er(t),i=t.shiftKey&&!t.deltaX,s=!i&&Math.abs(t.deltaX)<=Math.abs(t.deltaY),n=i||s?t.deltaY:t.deltaX,o=0;o0&&r.scrollTop+r.clientHeight===r.scrollHeight:n<0&&0===r.scrollLeft||n>0&&r.scrollLeft+r.clientWidth===r.scrollWidth}return!0})(t)&&nr(t)}function Na(t){t.target===document&&(document.scrollingElement.scrollTop=document.scrollingElement.scrollTop)}function ja(t){!0!==ii&&(ii=!0,requestAnimationFrame(function(){ii=!1;var e=t.target.height,i=document.scrollingElement,s=i.clientHeight,n=i.scrollTop;void 0!==b&&e===window.innerHeight||(b=s-e,document.scrollingElement.scrollTop=n),n>b&&(document.scrollingElement.scrollTop-=Math.ceil((n-b)/8))}))}function Ha(t,e){var i=document.body,s=void 0!==window.visualViewport;if("add"===t){var n=window.getComputedStyle(i).overflowY;g=Xr(window),_=Kr(window),y=i.style.left,w=i.style.top,i.style.left="-"+g+"px",i.style.top="-"+_+"px","hidden"!==n&&("scroll"===n||i.scrollHeight>window.innerHeight)&&i.classList.add("q-body--force-scrollbar"),i.classList.add("q-body--prevent-scroll"),!0===e.ios&&(!0===s?(window.scrollTo(0,0),window.visualViewport.addEventListener("resize",ja,h.passiveCapture),window.visualViewport.addEventListener("scroll",ja,h.passiveCapture),window.scrollTo(0,0)):window.addEventListener("scroll",Na,h.passiveCapture))}!0===e.desktop&&!0===e.mac&&window[t+"EventListener"]("wheel",Va,h.notPassive),"remove"===t&&(!0===e.ios&&(!0===s?(window.visualViewport.removeEventListener("resize",ja,h.passiveCapture),window.visualViewport.removeEventListener("scroll",ja,h.passiveCapture)):window.removeEventListener("scroll",Na,h.passiveCapture)),i.classList.remove("q-body--prevent-scroll"),i.classList.remove("q-body--force-scrollbar"),i.style.left=y,i.style.top=w,window.scrollTo(g,_),b=void 0)}function Qa(t,e){var i="add";if(!0===t){if(ei++,void 0!==S)return clearTimeout(S),void(S=void 0);if(ei>1)return}else{if(0===ei)return;if(--ei>0)return;if(i="remove",!0===e.ios&&!0===e.nativeMobile)return clearTimeout(S),void(S=setTimeout(function(){Ha(i,e),S=void 0},100))}Ha(i,e)}function Wa(){(void 0===C||hi+16>mi)&&(hi=0,C=fi(mi));var t=C.slice(hi,hi+=16);return t[6]=15&t[6]|64,t[8]=63&t[8]|128,di[t[0]]+di[t[1]]+di[t[2]]+di[t[3]]+"-"+di[t[4]]+di[t[5]]+"-"+di[t[6]]+di[t[7]]+"-"+di[t[8]]+di[t[9]]+"-"+di[t[10]]+di[t[11]]+di[t[12]]+di[t[13]]+di[t[14]]+di[t[15]]}function Ya(t){return void 0===t?"f_"+Wa():t}function Ua(t,e,i){e.handler?e.handler(t,i,i.caret):i.runCmd(e.cmd,e.param)}function Ka(t,e){return t("div",{staticClass:"q-editor__toolbar-group"},e)}function Xa(t,e,i,s,n){void 0===n&&(n=!1);var o=n||"toggle"===i.type&&(i.toggled?i.toggled(e):i.cmd&&e.caret.is(i.cmd,i.param)),r=[],a={click:function(t){s&&s(),Ua(t,i,e)}};if(i.tip&&e.$q.platform.is.desktop){var l=i.key?t("div",[t("small","(CTRL + "+String.fromCharCode(i.key)+")")]):null;r.push(t(Pi,{props:{delay:1e3}},[t("div",{domProps:{innerHTML:i.tip}}),l]))}return t(Mt,{props:Object.assign({},e.buttonProps,{icon:i.icon,color:o?i.toggleColor||e.toolbarToggleColor:i.color||e.toolbarColor,textColor:o&&!e.toolbarPush?null:i.textColor||e.toolbarTextColor,label:i.label,disable:!!i.disable&&("function"!=typeof i.disable||i.disable(e)),size:"sm"}),on:a},r)}function Ga(t,e){if(e.caret)return e.buttons.filter(function(t){return!e.isViewingSource||t.find(function(t){return"viewsource"===t.cmd})}).map(function(i){return Ka(t,i.map(function(i){return(!e.isViewingSource||"viewsource"===i.cmd)&&("slot"===i.type?$r(e,i.slot):"dropdown"===i.type?function(t,e,i){var s,n,o=i.label,r=i.icon;function a(){h.componentInstance.hide()}if("only-icons"===i.list)n=i.options.map(function(i){var s=void 0===i.type&&e.caret.is(i.cmd,i.param);return s&&(o=i.tip,r=i.icon),Xa(t,e,i,a,s)}),s=e.toolbarBackgroundClass,n=[Ka(t,n)];else{var l=void 0!==e.toolbarToggleColor?"text-"+e.toolbarToggleColor:null,c=void 0!==e.toolbarTextColor?"text-"+e.toolbarTextColor:null;n=i.options.map(function(i){var s=!!i.disable&&i.disable(e),n=void 0===i.type&&e.caret.is(i.cmd,i.param);n&&(o=i.tip,r=i.icon);var u=i.htmlTip;return t(zi,{props:{active:n,activeClass:l,clickable:!0,disable:s,dense:!0},on:{click:function(t){a(),e.$refs.content&&e.$refs.content.focus(),e.caret.restore(),Ua(t,i,e)}}},["no-icons"===i.list?null:t(Oi,{class:n?l:c,props:{side:!0}},[t(et,{props:{name:i.icon}})]),t(Oi,[u?t("div",{domProps:{innerHTML:i.htmlTip}}):i.tip?t("div",[i.tip]):null])])}),s=[e.toolbarBackgroundClass,c],n=[t(Li,[n])]}var u=i.highlight&&o!==i.label,h=t(Qt,{props:Object.assign({},e.buttonProps,{noCaps:!0,noWrap:!0,color:u?e.toolbarToggleColor:e.toolbarColor,textColor:u&&!e.toolbarPush?null:e.toolbarTextColor,label:i.fixedLabel?i.label:o,icon:i.fixedIcon?i.icon:r,contentClass:s})},n);return h}(t,e,i):Xa(t,e,i))}))})}function Za(t,e){return t!==e&&(e===document?document.body:e).contains(t)}function Ja(t){return null===t?String(t):Ri[Ii.call(t)]||"object"}function tl(t){if(!t||"object"!==Ja(t))return!1;if(t.constructor&&!Fi.call(t,"constructor")&&!Fi.call(t.constructor.prototype,"isPrototypeOf"))return!1;var e;for(e in t);return void 0===e||Fi.call(t,e)}function el(){var t,e,i,s,n,o,r=arguments,a=arguments[0]||{},l=1,c=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[1]||{},l=2),Object(a)!==a&&"function"!==Ja(a)&&(a={}),c===l&&(a=this,l--);l=s)return 0;var n=e.length,o=Math.floor(i/Vs),r=Math.floor((s-1)/Vs)+1,a=t.slice(o,r).reduce(al,0);return i%Vs!=0&&(a-=e.slice(o*Vs,i).reduce(al,0)),s%Vs!=0&&s!==n&&(a-=e.slice(s,r*Vs).reduce(al,0)),a}function hl(t,e,i){return t("div",Object.assign({},e,{staticClass:"q-table__middle"+(void 0!==e.staticClass?" "+e.staticClass:"")}),[t("table",{staticClass:"q-table"},i)])}function dl(t){return t.page<1&&(t.page=1),void 0!==t.rowsPerPage&&t.rowsPerPage<1&&(t.rowsPerPage=0),t}function pl(t){return Array.isArray(t)?t.slice():[]}function fl(t,e){return!!e&&(t.path&&e.path?t.path.replace(Un,"")===e.path.replace(Un,"")&&t.hash===e.hash&&ca(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&ca(t.query,e.query)&&ca(t.params,e.params)))}function ml(t,e){return 0===t.path.replace(Un,"/").indexOf(e.path.replace(Un,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var i in e)if(!(i in t))return!1;return!0}(t.query,e.query)}function vl(t){return"function"==typeof t?t:function(){return t}}function gl(t){if(!1===t)return 0;if(!0===t||void 0===t)return 1;var e=parseInt(t,10);return isNaN(e)?0:e}function _l(t,e,i){var s,n=i.modifiers,o=n.once,r=function(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&-1===e.indexOf(s)&&(i[s]=t[s]);return i}(n,["once"]),a=i.value;e.once=o,e.handler!==a&&(s=!0,e.handler=a),void 0!==e.opts&&!1!==ca(r,e.mod)||(s=!0,e.mod=r,e.opts=0===Object.keys(r).length?uo:r),!0===s&&(void 0!==e.observer&&e.observer.disconnect(),e.observer=new MutationObserver(function(i){"function"==typeof e.handler&&(!1!==e.handler(i)&&!0!==e.once||bl(t))}),e.observer.observe(t,e.opts))}function bl(t){var e=t.__qmutation;void 0!==e&&(void 0!==e.observer&&e.observer.disconnect(),delete t.__qmutation)}function yl(t,e){var i=e.value,s=e.oldValue;"function"==typeof i?(t.handler=i,"function"!=typeof s&&(t.scrollTarget.addEventListener("scroll",t.scroll,h.passive),t.scroll())):t.scrollTarget.removeEventListener("scroll",t.scroll)}function wl(t,e){var i=e.value,s=e.oldValue;"function"==typeof i?(t.handler=i,"function"!=typeof s&&t.scrollTarget.addEventListener("scroll",t.scroll,h.passive)):t.scrollTarget.removeEventListener("scroll",t.scroll,h.passive)}function Sl(t,e){var i,s=t.__qtouchhold;if(void 0!==s){e.oldValue!==e.value&&("function"!=typeof e.value&&s.end(),s.handler=e.value);var n=[600,5,7];"string"==typeof e.arg&&e.arg.length&&e.arg.split(":").forEach(function(t,e){var i=parseInt(t,10);i&&(n[e]=i)}),i=n,s.duration=i[0],s.touchSensitivity=i[1],s.mouseSensitivity=i[2]}}function Cl(t){void 0===Rn&&(Rn=u.is.winphone?"msapplication-navbutton-color":u.is.safari?"apple-mobile-web-app-status-bar-style":"theme-color");var e=function(t){var e=document.getElementsByTagName("META");for(var i in e)if(e[i].name===t)return e[i]}(Rn),i=void 0===e;i&&(e=document.createElement("meta")).setAttribute("name",Rn),e.setAttribute("content",t),i&&document.head.appendChild(e)}function xl(t,e){try{var i=t[e]();return void 0===i?Promise.resolve():i}catch(t){return Promise.reject(t)}}function kl(e){return function(s){s.className;var n=s.class,o=s.style,r=s.component,a=s.root,l=s.parent,c=function(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&-1===e.indexOf(s)&&(i[s]=t[s]);return i}(s,["className","class","style","component","root","parent"]);if(!0===i)return ko;void 0!==n&&(c.cardClass=n),void 0!==o&&(c.cardStyle=o);var u=[],h=[],d={onOk:function(t){return u.push(t),d},onCancel:function(t){return h.push(t),d},onDismiss:function(t){return u.push(t),h.push(t),d},hide:function(){return _.$refs.dialog.hide(),d}},p=document.createElement("div");document.body.appendChild(p);var f=!1,m={ok:function(t){f=!0,u.forEach(function(e){e(t)})},hide:function(){_.$destroy(),_.$el.remove(),_=null,!0!==f&&h.forEach(function(t){t()})}};t.observable(c);var v=void 0!==r?r:e,g=void 0===r?c:void 0,_=new t({name:"QGlobalDialog",el:p,parent:void 0===l?a:l,render:function(t){return t(v,{ref:"dialog",props:c,attrs:g,on:m})},mounted:function(){this.$refs.dialog.show()}});return d}}function ql(t){return encodeURIComponent(t)}function $l(t){return decodeURIComponent(t)}function Tl(t){if(""===t)return t;0===t.indexOf('"')&&(t=t.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")),t=$l(t.replace(/\+/g," "));try{t=JSON.parse(t)}catch(t){}return t}function Ml(t){var e=new Date;return e.setMilliseconds(e.getMilliseconds()+t),e.toUTCString()}function Bl(t,e,i,s){var n,o,r,a,l,c,u,h;void 0===i&&(i={}),void 0!==i.expires&&("[object Date]"===Object.prototype.toString.call(i.expires)?n=i.expires.toUTCString():"string"==typeof i.expires?(r=i.expires,a=0,l=r.match(/(\d+)d/),c=r.match(/(\d+)h/),u=r.match(/(\d+)m/),h=r.match(/(\d+)s/),l&&(a+=864e5*l[1]),c&&(a+=36e5*c[1]),u&&(a+=6e4*u[1]),h&&(a+=1e3*h[1]),n=0===a?r:Ml(a)):(o=parseFloat(i.expires),n=!1===isNaN(o)?Ml(864e5*o):i.expires));var d,p=ql(t)+"="+ql((d=e)===Object(d)?JSON.stringify(d):""+d),f=[p,void 0!==n?"; Expires="+n:"",i.path?"; Path="+i.path:"",i.domain?"; Domain="+i.domain:"",i.sameSite?"; SameSite="+i.sameSite:"",i.httpOnly?"; HttpOnly":"",i.secure?"; Secure":"",i.other?"; "+i.other:""].join("");if(s){s.req.qCookies?s.req.qCookies.push(f):s.req.qCookies=[f],s.res.setHeader("Set-Cookie",s.req.qCookies);var m=s.req.headers.cookie||"";if(void 0!==n&&o<0){var v=Pl(t,s);void 0!==v&&(m=m.replace(t+"="+v+"; ","").replace("; "+t+"="+v,"").replace(t+"="+v,""))}else m=m?p+"; "+m:f;s.req.headers.cookie=m}else document.cookie=f}function Pl(t,e){for(var i,s,n,o=t?null:{},r=e?e.req.headers:document,a=r.cookie?r.cookie.split("; "):[],l=0,c=a.length;l0&&(["meta","link","script"].forEach(function(t){i[t].forEach(function(e){document.head.querySelector(t+'[data-qmeta="'+e+'"]').remove()})}),i.htmlAttr.filter(Dl).forEach(function(t){document.documentElement.removeAttribute(t)}),i.bodyAttr.filter(El).forEach(function(t){document.body.removeAttribute(t)})),["meta","link","script"].forEach(function(t){var i=e[t];for(var s in i){var n=document.createElement(t);for(var o in i[s])"innerHTML"!==o&&n.setAttribute(o,i[s][o]);n.setAttribute("data-qmeta",s),"script"===t&&(n.innerHTML=i[s].innerHTML||""),document.head.appendChild(n)}}),Object.keys(e.htmlAttr).filter(Dl).forEach(function(t){document.documentElement.setAttribute(t,e.htmlAttr[t]||"")}),Object.keys(e.bodyAttr).filter(El).forEach(function(t){document.body.setAttribute(t,e.bodyAttr[t]||"")}),this.$root.__currentMeta=s}function Fl(t){return function(e){var i=t[e];return e+(void 0!==i?'="'+i+'"':"")}}function Rl(t,e){var i={title:"",titleTemplate:null,meta:{},link:{},htmlAttr:{},bodyAttr:{},noscript:{}};Al(t,i),zl(i);var s={"%%Q_HTML_ATTRS%%":Object.keys(i.htmlAttr).filter(Dl).map(Fl(i.htmlAttr)).join(" "),"%%Q_HEAD_TAGS%%":function(t){var e="";return t.title&&(e+=""+t.title+""),["meta","link","script"].forEach(function(i){var s=t[i];for(var n in s){var o=Object.keys(s[n]).filter(function(t){return"innerHTML"!==t}).map(Fl(s[n]));e+="<"+i+" "+o.join(" ")+' data-qmeta="'+n+'">',"script"===i&&(e+=(s[n].innerHTML||"")+"<\/script>")}}),e}(i),"%%Q_BODY_ATTRS%%":Object.keys(i.bodyAttr).filter(El).map(Fl(i.bodyAttr)).join(" "),"%%Q_BODY_TAGS%%":Object.keys(i.noscript).map(function(t){return'"}).join("")+" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + {% assets 'base_css' %} + + {% endassets %} + {% block styles %}{% endblock %} + {% block title %}LNbits{% endblock %} + + + {% block head_scripts %}{% endblock %} - -
    -
    - - - - -
    - - + + + + LNbits + + USE WITH CAUTION - LNbits wallet is still in BETA + + + Toggle Dark Mode + + + - {% block body %}{% endblock %} -
    + + + + - + + + {% block page %}{% endblock %} + + + + + + + LNbits, free and open-source lightning wallet + + + + View project in GitHub + + + + + + + {% block vue_templates %}{% endblock %} + + {% if DEBUG %} + + + + + {% else %} + {% assets output='__bundle__/vue.js', + 'vendor/quasar@1.9.7/quasar.ie.polyfills.umd.min.js', + 'vendor/vue@2.6.11/vue.min.js', + 'vendor/vue-router@3.1.6/vue-router.min.js', + 'vendor/vuex@3.1.2/vuex.min.js', + 'vendor/quasar@1.9.7/quasar.umd.min.js' %} + + {% endassets %} + {% endif %} + + {% assets filters='rjsmin', output='__bundle__/base.js', + 'vendor/axios@0.19.2/axios.min.js', + 'vendor/underscore@1.9.2/underscore.min.js', + 'js/base.js', + 'js/components.js' %} + + {% endassets %} + + {% block scripts %}{% endblock %} - - diff --git a/lnbits/templates/extensions.html b/lnbits/templates/extensions.html deleted file mode 100644 index 2a742183..00000000 --- a/lnbits/templates/extensions.html +++ /dev/null @@ -1,114 +0,0 @@ - - -{% extends "base.html" %} - - -{% block messages %} - - - ! - - -{% endblock %} - -{% block menuitems %} -
  • - - Wallets - - - -
  • -
  • - - Extensions - - -
      - {% for extension in EXTENSIONS %} - {% if extension.code in user_ext %} -
    • - {{ extension.name }} -
    • - {% endif %} - {% endfor %} -
    • - Manager
    • -
    -
  • -{% endblock %} - -{% block body %} - -
    - - -
    -
    -

    Wallet Control panel

    - - -
    -
    - -
    -

    Bookmark to save your wallet. Wallet is in BETA, use with caution.

    -
    -
    - - -
    - -
    - - {% for extension in EXTENSIONS %} -
    - -
    - -
    - -
    - {% if extension.code in user_ext %} - Disable - {% else %} - Enable - {% endif %} -
    -
    - {% endfor %} - -
    - -
    -
    - - -{% endblock %} diff --git a/lnbits/templates/legacy.html b/lnbits/templates/legacy.html new file mode 100644 index 00000000..ce5e0c5f --- /dev/null +++ b/lnbits/templates/legacy.html @@ -0,0 +1,477 @@ + + + + + + + LNBits Wallet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + + + + + {% block body %}{% endblock %} +
    + + + + + + diff --git a/lnbits/templates/macros.jinja b/lnbits/templates/macros.jinja new file mode 100644 index 00000000..acd15182 --- /dev/null +++ b/lnbits/templates/macros.jinja @@ -0,0 +1,12 @@ +{% macro window_vars(user, wallet) -%} + +{%- endmacro %} diff --git a/lnbits/templates/note.jpg b/lnbits/templates/note.jpg deleted file mode 100644 index a7272d49..00000000 Binary files a/lnbits/templates/note.jpg and /dev/null differ diff --git a/lnbits/templates/wallet.html b/lnbits/templates/wallet.html index 04f4222f..000b42bc 100644 --- a/lnbits/templates/wallet.html +++ b/lnbits/templates/wallet.html @@ -1,6 +1,6 @@ -{% extends "base.html" %} {% block messages %} +{% extends "legacy.html" %} {% block messages %} ! @@ -9,7 +9,7 @@
  • Instant wallet, bookmark to save
  • -{% endblock %} +{% endblock %} {% block menuitems %} @@ -42,7 +42,7 @@ {% endif %} {% endfor %}
  • - Manager
  • + Manager {% endblock %} diff --git a/lnbits/wallets/lnd.py b/lnbits/wallets/lnd.py index 8525708a..f03a887e 100644 --- a/lnbits/wallets/lnd.py +++ b/lnbits/wallets/lnd.py @@ -15,7 +15,8 @@ class LndWallet(Wallet): payment_hash, payment_request = None, None r = post( url=f"{self.endpoint}/v1/invoices", - headers=self.auth_admin, verify=False, + headers=self.auth_admin, + verify=False, json={"value": amount, "memo": memo, "private": True}, ) @@ -33,7 +34,10 @@ class LndWallet(Wallet): def pay_invoice(self, bolt11: str) -> PaymentResponse: r = post( - url=f"{self.endpoint}/v1/channels/transactions", headers=self.auth_admin, verify=False, json={"payment_request": bolt11} + url=f"{self.endpoint}/v1/channels/transactions", + headers=self.auth_admin, + verify=False, + json={"payment_request": bolt11}, ) return PaymentResponse(r, not r.ok) @@ -46,7 +50,12 @@ class LndWallet(Wallet): return TxStatus(r, r.json()["settled"]) def get_payment_status(self, payment_hash: str) -> TxStatus: - r = get(url=f"{self.endpoint}/v1/payments", headers=self.auth_admin, verify=False, params={"include_incomplete": True}) + r = get( + url=f"{self.endpoint}/v1/payments", + headers=self.auth_admin, + verify=False, + params={"include_incomplete": True}, + ) if not r.ok: return TxStatus(r, None) diff --git a/requirements.txt b/requirements.txt index 8c0e0f13..40dca4a2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,18 +3,23 @@ bitstring==3.1.6 certifi==2019.11.28 chardet==3.0.4 click==7.0 +flask-assets==2.0 +flask-compress==1.4.0 flask-talisman==0.7.0 flask==1.1.1 -idna==2.8 +gevent==1.4.0 +greenlet==0.4.15 +gunicorn==20.0.4 +idna==2.9 itsdangerous==1.1.0 jinja2==2.11.1 lnurl==0.3.3 markupsafe==1.1.1 pydantic==1.4 -requests==2.22.0 +pyscss==1.3.5 +requests==2.23.0 six==1.14.0 typing-extensions==3.7.4.1 ; python_version < '3.8' urllib3==1.25.8 +webassets==2.0 werkzeug==1.0.0 -gevent==1.4.0 -greenlet==0.4.15