{
  "corpus": [
    "File: /home/popertots/ragmcp/Crussell/local-dev.sh\nType: function\nName: create_booking\nComments:\nFunction to create a booking\n\nCode:\ncreate_booking() {\n  local TOKEN=$1\n  local START_TIME=$2\n  local SERVICE_IDS_JSON=$3\n  local NOTES=$4\n  local BOOKING_NAME=$5\n  \n  local BOOKING_JSON=\"{\\\"start_time\\\":\\\"$START_TIME\\\",\\\"service_ids\\\":$SERVICE_IDS_JSON\"\n  if [ -n \"$NOTES\" ]; then\n    BOOKING_JSON=\"$BOOKING_JSON,\\\"notes\\\":\\\"$NOTES\\\"\"\n  fi\n  BOOKING_JSON=\"$BOOKING_JSON}\"\n  \n  echo \"\"\n  echo \"\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\"\n  echo \"Creating: $BOOKING_NAME\"\n  echo \"Time: $START_TIME\"\n  echo \"Services: $SERVICE_IDS_JSON\"\n  \n  CREATE_RESPONSE=$(curl -s -w \"\\n%{http_code}\" -X POST \\\n    -H 'Content-Type: application/json' \\\n    -H \"Authorization: Bearer $TOKEN\" \\\n    -d \"$BOOKING_JSON\" \\\n    \"$BASE_URL/bookings\")\n  \n  HTTP_CODE=$(echo \"$CREATE_RESPONSE\" | tail -n1)\n  RESPONSE_BODY=$(echo \"$CREATE_RESPONSE\" | sed '$d')\n  \n  if [ \"$HTTP_CODE\" = \"201\" ]; then\n    echo \"\u2705 Created: $BOOKING_NAME\"\n    BOOKING_ID=$(echo \"$RESPONSE_BODY\" | grep -o '\"id\":\"[^\"]*' | cut -d'\"' -f4)\n    echo \"   Booking ID: $BOOKING_ID\"\n  else\n    echo \"\u274c Failed to create: $BOOKING_NAME (HTTP $HTTP_CODE)\"\n    if [ -n \"$RESPONSE_BODY\" ]; then\n      echo \"Response body: $RESPONSE_BODY\"\n    fi\n  fi\n  \n  sleep 0.2\n}\n",
    "File: /home/popertots/ragmcp/Crussell/local-dev.sh\nType: function\nName: format_london_time\nComments:\nHelper function to format a London time as RFC3339 with 'T' (required by Go backend)\n\nCode:\nformat_london_time() {\n  local DATE_PART=\"$1\"\n  local TIME_PART=\"$2\"\n  TZ=Europe/London date -d \"$DATE_PART $TIME_PART\" +\"%Y-%m-%dT%H:%M:%S%:z\"\n}\n",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- =======================================\n-- NAIL SALON DATABASE SCHEMA\n-- Complete init.sql with GDPR & Tax Compliance\n-- =======================================\n\n-- Enable pgcrypto for generating random IDs\nCREATE EXTENSION IF NOT EXISTS pgcrypto;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- =======================================\n-- ENUMS\n-- =======================================\n\nCREATE TYPE account_role AS ENUM ('unverified_email', 'verified_email', 'admin', 'guest', 'affiliate');",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: create type enum\nName: account_type\nSQL:\nCREATE TYPE account_type AS ENUM ('email', 'google', 'microsoft', 'facebook', 'guest');",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: create type enum\nName: payment_type\nSQL:\nCREATE TYPE payment_type AS ENUM ('deposit', 'full', 'tip', 'balance', 'partial');",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: create type enum\nName: payment_method\nSQL:\nCREATE TYPE payment_method AS ENUM ('online_square', 'in_person_card', 'cash', 'giftcard', 'discount');",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: create type enum\nName: payment_status\nSQL:\nCREATE TYPE payment_status AS ENUM ('pending', 'completed', 'failed', 'refunded');",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: create type enum\nName: booking_status\nSQL:\nCREATE TYPE booking_status AS ENUM ('pending', 'confirmed', 'in_progress', 'completed', 'client_cancelled', 'we_cancelled', 're-schedule', 'no_show');",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- =======================================\n-- SHORT ID GENERATION\n-- =======================================\n\nCREATE OR REPLACE FUNCTION generate_short_id(table_name TEXT)\nRETURNS CHAR(12) AS $$\nDECLARE\n    new_id CHAR(12);\n    collision_count INT := 0;\n    max_attempts INT := 100;\nBEGIN\n    LOOP\n        new_id := substr(encode(gen_random_bytes(6), 'hex'), 1, 12);\n\n        EXECUTE format('SELECT 1 FROM %I WHERE id = $1 LIMIT 1', table_name) USING new_id;\n\n        IF NOT FOUND THEN\n            RETURN new_id;\n        END IF;\n\n        collision_count := collision_count + 1;\n        IF collision_count >= max_attempts THEN\n            RAISE EXCEPTION 'Unable to generate unique ID after % attempts for table %', max_attempts, table_name;\n        END IF;\n    END LOOP;\nEND;\n$$ LANGUAGE plpgsql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE OR REPLACE FUNCTION generate_user_id() RETURNS CHAR(12) AS $$ SELECT generate_short_id('users'); $$ LANGUAGE sql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE OR REPLACE FUNCTION generate_service_id() RETURNS CHAR(12) AS $$ SELECT generate_short_id('services'); $$ LANGUAGE sql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE OR REPLACE FUNCTION generate_booking_id() RETURNS CHAR(12) AS $$ SELECT generate_short_id('bookings'); $$ LANGUAGE sql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE OR REPLACE FUNCTION generate_payment_id() RETURNS CHAR(12) AS $$ SELECT generate_short_id('payments'); $$ LANGUAGE sql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE OR REPLACE FUNCTION generate_referral_code()\nRETURNS CHAR(12) AS $$\nDECLARE\n    new_code CHAR(12);\n    collision_count INT := 0;\n    max_attempts INT := 100;\nBEGIN\n    LOOP\n        new_code := substr(encode(gen_random_bytes(6), 'hex'), 1, 12);\n\n        -- Check against referral_code column in users table (not id column)\n        PERFORM 1 FROM users WHERE referral_code = new_code LIMIT 1;\n\n        IF NOT FOUND THEN\n            RETURN new_code;\n        END IF;\n\n        collision_count := collision_count + 1;\n        IF collision_count >= max_attempts THEN\n            RAISE EXCEPTION 'Unable to generate unique referral code after % attempts', max_attempts;\n        END IF;\n    END LOOP;\nEND;\n$$ LANGUAGE plpgsql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: create\nName: None\nSQL:\n-- =======================================\n-- USERS TABLE\n-- =======================================\n\nCREATE TABLE users (\n    id CHAR(12) PRIMARY KEY DEFAULT generate_user_id(),\n    -- Identity fields\n    n_first_name VARCHAR(50) NOT NULL,          -- vCard N.given\n    n_last_name VARCHAR(50) NOT NULL,           -- vCard N.family\n    fn VARCHAR(120) GENERATED ALWAYS AS (n_first_name || ' ' || n_last_name) STORED, -- vCard FN\n    email VARCHAR(255) UNIQUE,                 -- vCard EMAIL (nullable for social-only/guest)\n    phone VARCHAR(20),                         -- vCard TEL\n    date_of_birth DATE,                        -- vCard BDAY\n    profile_pic_url TEXT,                      -- vCard PHOTO\n    -- Account fields\n    account_role account_role NOT NULL DEFAULT 'unverified_email', -- initial signup role\n    account_type account_type NOT NULL DEFAULT 'email', -- initial signup type (info only)\n    -- Security fields\n    password_hash TEXT,                         -- NULL for pure social logins\n    last_login_at TIMESTAMPTZ DEFAULT NOW(),\n    -- Loyalty fields\n    loyalty_stamps INT NOT NULL DEFAULT 0,\n    referral_code CHAR(12) UNIQUE DEFAULT generate_referral_code(),\n    -- GDPR fields\n    privacy_policy_and_terms_consent BOOLEAN NOT NULL DEFAULT TRUE,\n    policy_consent_updated_at TIMESTAMPTZ DEFAULT NOW(),\n    data_retention_consent BOOLEAN NOT NULL DEFAULT TRUE,\n    data_consent_updated_at TIMESTAMPTZ DEFAULT NOW(),\n    -- Audit fields\n    created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n    updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n    -- staff fields\n    notes TEXT\n);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE TABLE user_social_logins (\n    id BIGSERIAL PRIMARY KEY,\n    user_id CHAR(12) NOT NULL REFERENCES users(id) ON DELETE CASCADE,\n    provider account_type NOT NULL CHECK (provider IN ('google', 'microsoft', 'facebook')),\n    immutable_id TEXT NOT NULL,                  -- the stable provider user ID\n    created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n    updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n\n    UNIQUE (provider, immutable_id),             -- prevents duplicate identities\n    UNIQUE (user_id, provider)                   -- one account per provider per user\n);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_users_email_lower ON users (LOWER(email));",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_users_account_role ON users (account_role);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: generate_service_id\nSQL:\n-- =======================================\n-- SERVICES TABLE\n-- =======================================\n\nCREATE TABLE services (\n    id CHAR(12) PRIMARY KEY DEFAULT generate_service_id(),\n    name VARCHAR(100) NOT NULL,\n    description TEXT,\n    price NUMERIC(10,2) NOT NULL,\n    duration_minutes INT NOT NULL,\n    is_active BOOLEAN NOT NULL DEFAULT TRUE,\n    patch_test_duration_hours INT NOT NULL DEFAULT 0,\n    minimum_age_required INT NOT NULL DEFAULT 16,\n    requires_manual_pricing BOOLEAN NOT NULL DEFAULT FALSE,\n    requires_manual_duration BOOLEAN NOT NULL DEFAULT FALSE,\n    created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n    created_by CHAR(12)\n);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_services_name ON services(name);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE TABLE user_service_patch_tests (\n    id BIGSERIAL PRIMARY KEY,\n    user_id CHAR(12) NOT NULL REFERENCES users(id) ON DELETE CASCADE,\n    service_id CHAR(12) NOT NULL REFERENCES services(id) ON DELETE CASCADE,\n    last_time TIMESTAMPTZ NOT NULL\n);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_service_patch_tests_userid ON user_service_patch_tests(user_id);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: generate_booking_id\nSQL:\n-- =======================================\n-- BOOKINGS TABLE\n-- =======================================\n\nCREATE TABLE bookings (\n    id CHAR(12) PRIMARY KEY DEFAULT generate_booking_id(),\n    user_id CHAR(12) REFERENCES users(id) ON DELETE SET NULL,\n    start_time TIMESTAMPTZ NOT NULL,\n    status booking_status NOT NULL DEFAULT 'pending',\n    notes TEXT,\n    created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n    updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n    created_by CHAR(12)\n);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_bookings_userid ON bookings(user_id);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_bookings_starttime ON bookings(start_time);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_bookings_status ON bookings(status);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_bookings_userid_starttime ON bookings(user_id, start_time);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- =======================================\n-- BOOKING SERVICES JUNCTION TABLE\n-- =======================================\n\nCREATE TABLE booking_services (\n    booking_id CHAR(12) NOT NULL REFERENCES bookings(id) ON DELETE CASCADE,\n    service_id CHAR(12) NOT NULL REFERENCES services(id) ON DELETE RESTRICT,\n    override_price NUMERIC(10,2),\n    override_duration_minutes INT,\n    PRIMARY KEY (booking_id, service_id)\n);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE TABLE user_referrals (\n    referrer_id CHAR(12) NOT NULL REFERENCES users(id) ON DELETE CASCADE,\n    referred_id CHAR(12) NOT NULL REFERENCES users(id) ON DELETE CASCADE,\n    referred_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n    claimed_booking_id CHAR(12) REFERENCES bookings(id) ON DELETE SET NULL,\n    PRIMARY KEY (referrer_id, referred_id)\n);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- =======================================\n-- DEFAULT WORKING HOURS TABLE\n-- =======================================\nCREATE TABLE working_hours (\n    weekday SMALLINT PRIMARY KEY,    -- 0 = Monday, 6 = Sunday\n    start_time TIME NOT NULL,        -- e.g. 09:00\n    end_time TIME NOT NULL,          -- e.g. 17:00\n    is_open BOOLEAN NOT NULL DEFAULT TRUE\n);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_working_hours_weekday ON working_hours(weekday);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nINSERT INTO working_hours VALUES (0, '00:00:00', '00:00:00', FALSE);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nINSERT INTO working_hours VALUES (1, '09:00:00', '17:00:00', TRUE);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nINSERT INTO working_hours VALUES (2, '09:00:00', '17:00:00', TRUE);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nINSERT INTO working_hours VALUES (3, '12:00:00', '20:00:00', TRUE);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nINSERT INTO working_hours VALUES (4, '09:00:00', '17:00:00', TRUE);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nINSERT INTO working_hours VALUES (5, '09:00:00', '17:00:00', TRUE);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nINSERT INTO working_hours VALUES (6, '00:00:00', '00:00:00', FALSE);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- =======================================\n-- EXCEPTIONAL WORKING HOURS\n-- =======================================\n\n-- Exceptional working hours groups (template)\nCREATE TABLE exceptional_working_hours_groups (\n    id SERIAL PRIMARY KEY,\n    name TEXT NOT NULL,             -- e.g. \"Christmas Schedule\"\n    description TEXT NOT NULL       -- e.g. \"Extended hours for holiday period\"\n);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- Exceptional working hours (7 entries per group, one per weekday)\nCREATE TABLE exceptional_working_hours (\n    id SERIAL PRIMARY KEY,\n    group_id INT NOT NULL REFERENCES exceptional_working_hours_groups(id) ON DELETE CASCADE,\n    weekday SMALLINT NOT NULL,      -- 0 = Monday ... 6 = Sunday\n    start_time TIME NOT NULL,\n    end_time TIME NOT NULL,\n    is_open BOOLEAN NOT NULL DEFAULT TRUE\n);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE UNIQUE INDEX idx_group_weekday ON exceptional_working_hours(group_id, weekday);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- Exceptional group applications (assign a group to a specific week)\nCREATE TABLE exceptional_group_applications (\n    id SERIAL PRIMARY KEY,\n    group_id INT NOT NULL REFERENCES exceptional_working_hours_groups(id) ON DELETE CASCADE,\n    week_start DATE NOT NULL        -- Monday of the week this group applies to\n);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE UNIQUE INDEX idx_group_application_week ON exceptional_group_applications(week_start);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- =======================================\n-- PAYMENTS TABLE\n-- =======================================\n\nCREATE SEQUENCE invoice_number_seq\n    START WITH 1\n    INCREMENT BY 1\n    NO MINVALUE\n    NO MAXVALUE\n    CACHE 1;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: create\nName: None\nSQL:\nCREATE TABLE payments (\n    id CHAR(12) PRIMARY KEY DEFAULT generate_payment_id(),\n    booking_id CHAR(12) NOT NULL REFERENCES bookings(id) ON DELETE RESTRICT,\n    payment_type payment_type NOT NULL,\n    payment_method payment_method NOT NULL,\n    vendor_code TEXT,\n    invoice_number INT UNIQUE DEFAULT nextval('invoice_number_seq'),\n    status payment_status NOT NULL DEFAULT 'pending',\n    amount NUMERIC(10,2) NOT NULL,\n    -- VAT fields (NULL until VAT registered - likely won't need but good to be ready for)\n    is_vat_applicable BOOLEAN NOT NULL DEFAULT FALSE,\n    vat_rate NUMERIC(5,2),\n    vat_amount NUMERIC(10,2),\n    net_amount NUMERIC(10,2),\n    created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n    updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n    created_by CHAR(12)\n);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_payments_bookingid ON payments(booking_id);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_payments_status ON payments(status);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_payments_createdat ON payments(created_at);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- =======================================\n-- BUSINESS SETTINGS TABLE (FOR COMPLIANCE)\n-- Stores legal business info for receipts, VAT status, currency, etc.\n-- =======================================\n\nCREATE TABLE business_settings (\n    id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,\n    business_name VARCHAR(255) NOT NULL,\n    business_address TEXT NOT NULL,\n    business_phone VARCHAR(20),\n    business_email VARCHAR(255),\n    vat_registration_number VARCHAR(20),\n    is_vat_registered BOOLEAN NOT NULL DEFAULT FALSE,\n    default_vat_rate NUMERIC(5,2) NOT NULL DEFAULT 20.00,\n    currency_code CHAR(3) NOT NULL DEFAULT 'GBP',\n    website_url TEXT,\n    updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()\n);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- Add trigger to auto-update timestamp\nCREATE OR REPLACE FUNCTION update_business_settings_timestamp()\nRETURNS TRIGGER AS $$\nBEGIN\n    NEW.updated_at = NOW();\n    RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: create trigger\nName: trigger_update_business_settings_timestamp\nSQL:\nCREATE TRIGGER trigger_update_business_settings_timestamp\n    BEFORE UPDATE ON business_settings\n    FOR EACH ROW\n    EXECUTE FUNCTION update_business_settings_timestamp();",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- Insert default row\nINSERT INTO business_settings (\n    business_name,\n    business_address,\n    business_phone,\n    business_email,\n    vat_registration_number,\n    is_vat_registered,\n    default_vat_rate,\n    currency_code,\n    website_url\n) VALUES (\n    'Crussell Nail Art Studio',\n    'Address',\n    '+44 131 123 4567',\n    'crussellnails@gmail.com',\n    NULL,  -- Set this when we register for VAT\n    FALSE, -- Set to TRUE when we register for VAT\n    20.00,\n    'GBP',\n    'https://www.website.co.uk'\n);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_payments_booking_id_status ON payments(booking_id, status);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_bookings_start_time_status ON bookings(start_time, status);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_users_created_at ON users(created_at);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\nCREATE INDEX idx_payments_created_at_status ON payments(created_at, status);",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- =======================================\n-- GDPR COMPLIANCE FUNCTIONS\n-- =======================================\n\n/*\nGDPR COMPLIANCE NOTES:\n- Legal basis for booking data: Contract performance (Art 6(1)(b) GDPR)\n- Legal basis for optional data (marketing): Consent (Art 6(1)(a) GDPR)\n- Data retention: While consent remains and account is active\n- Right to be forgotten: anonymize_user() for registered users\n- Subject access rights: export_all_user_data() provides complete export\n*/\n\n-- Anonymize registered user (Right to be Forgotten)\n-- WHY: GDPR Article 17 - users can request data deletion\n-- WHEN: User requests account deletion\n-- OUTPUT: Converts personal data to anonymous placeholder\nCREATE OR REPLACE FUNCTION anonymize_user(target_id CHAR(12))\nRETURNS VOID AS $$\nBEGIN\n    UPDATE users\n    SET\n        n_first_name = 'Deleted',\n        n_last_name = 'User',\n        email = CONCAT('deleted+', target_id, '@example.com'),\n        phone = NULL,\n        profile_pic_url = NULL,\n        date_of_birth = NULL,\n        account_role = 'guest',\n        loyalty_stamps = 0,\n        data_retention_consent = FALSE,\n        data_consent_updated_at = NOW(),\n        updated_at = NOW(),\n        password_hash = NULL\n    WHERE id = target_id\n      AND account_role != 'guest';\nEND;\n$$ LANGUAGE plpgsql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- Fully delete guest user\n-- WHY: Guest accounts have no ongoing business relationship\n-- WHEN: Cleaning up temporary/incomplete accounts\n-- OUTPUT: Complete removal from database\nCREATE OR REPLACE FUNCTION delete_guest_user(target_id CHAR(12))\nRETURNS VOID AS $$\nBEGIN\n    DELETE FROM users\n    WHERE id = target_id\n      AND account_role = 'guest';\nEND;\n$$ LANGUAGE plpgsql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- Update consent\n-- WHY: GDPR requires tracking consent changes\n-- WHEN: User updates privacy preferences\n-- OUTPUT: Updates consent flags and timestamps\nCREATE OR REPLACE FUNCTION update_data_consent(target_id CHAR(12), consent BOOLEAN)\nRETURNS VOID AS $$\nBEGIN\n    UPDATE users\n    SET data_retention_consent = consent,\n        data_consent_updated_at = NOW(),\n        updated_at = NOW()\n    WHERE id = target_id;\nEND;\n$$ LANGUAGE plpgsql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- Complete Subject Access Request Export\n-- WHY: GDPR Article 15 - users have right to access their data\n-- WHEN: Customer requests \"what data do you have on me?\"\n-- OUTPUT: Complete JSON export of all user data\n-- USE: Call from Go API endpoint, return to user via email/download\nCREATE OR REPLACE FUNCTION export_all_user_data(target_user_id CHAR(12))\nRETURNS JSON AS $$\nDECLARE\n    result JSON;\nBEGIN\n    SELECT json_build_object(\n        'user_profile', (\n            SELECT json_build_object(\n                'id', id,\n                'first_name', n_first_name,\n                'last_name', n_last_name,\n                'full_name', fn,\n                'email', email,\n                'phone', phone,\n                'date_of_birth', date_of_birth,\n                'profile_pic_url', profile_pic_url,\n                'account_role', account_role,\n                'loyalty_stamps', loyalty_stamps,\n                'data_retention_consent', data_retention_consent,\n                'data_consent_updated_at', data_consent_updated_at,\n                'created_at', created_at,\n                'updated_at', updated_at\n            )\n            FROM users WHERE id = target_user_id\n        ),\n        'bookings', (\n            SELECT COALESCE(json_agg(\n                json_build_object(\n                    'booking_id', b.id,\n                    'start_time', b.start_time,\n                    'status', b.status,\n                    'created_at', b.created_at,\n                    'updated_at', b.updated_at,\n                    'created_by', b.created_by,\n                    'updated_by', b.updated_by,\n                    'services', (\n                        SELECT COALESCE(json_agg(\n                            json_build_object(\n                                'service_id', s.id,\n                                'name', s.name,\n                                'description', s.description,\n                                'price', s.price,\n                                'duration_minutes', s.duration_minutes\n                            )\n                        ), '[]'::json)\n                        FROM booking_services bs\n                        JOIN services s ON bs.service_id = s.id\n                        WHERE bs.booking_id = b.id\n                    )\n                )\n            ), '[]'::json)\n            FROM bookings b WHERE b.user_id = target_user_id\n        ),\n        'payments', (\n            SELECT COALESCE(json_agg(\n                json_build_object(\n                    'payment_id', p.id,\n                    'booking_id', p.booking_id,\n                    'payment_type', p.payment_type,\n                    'payment_method', p.payment_method,\n                    'vendor_code', p.vendor_code,\n                    'status', p.status,\n                    'amount', p.amount,\n                    'created_at', p.created_at,\n                    'updated_at', p.updated_at,\n                    'created_by', p.created_by,\n                    'updated_by', p.updated_by\n                )\n            ), '[]'::json)\n            FROM payments p\n            JOIN bookings b ON p.booking_id = b.id\n            WHERE b.user_id = target_user_id\n        ),\n        'export_metadata', json_build_object(\n            'exported_at', NOW(),\n            'exported_by', 'system',\n            'user_id', target_user_id,\n            'format_version', '1.0'\n        )\n    ) INTO result;\n\n    RETURN result;\nEND;\n$$ LANGUAGE plpgsql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- =======================================\n-- TAX COMPLIANCE FUNCTIONS\n-- =======================================\n\n/*\nTAX COMPLIANCE NOTES:\n- Below \u00a390k turnover: No VAT registration required\n- Above \u00a390k turnover: VAT registration mandatory, Making Tax Digital required\n- All businesses: Income tax records required (simplified from April 2026/2027)\n- VAT rate: 20% standard rate applies to nail services\n*/\n\n-- VAT Return Data (for Making Tax Digital submission)\n-- WHY: VAT registered businesses must submit quarterly VAT returns via MTD software\n-- WHEN: Every quarter if VAT registered (\u00a390k+ annual turnover)\n-- OUTPUT: Summary totals for VAT return - total sales, VAT charged, net sales\n-- USE: Export to QuickBooks/Xero for MTD submission to HMRC\nCREATE OR REPLACE FUNCTION get_vat_return_data(\n    start_date DATE,\n    end_date DATE\n)\nRETURNS TABLE (\n    period_start DATE,\n    period_end DATE,\n    total_sales NUMERIC(12,2),\n    total_vat_charged NUMERIC(12,2),\n    net_sales NUMERIC(12,2),\n    transaction_count BIGINT\n) AS $$\nBEGIN\n    RETURN QUERY\n    SELECT\n        start_date as period_start,\n        end_date as period_end,\n        COALESCE(SUM(p.amount), 0) as total_sales,\n        COALESCE(SUM(\n            CASE\n                -- If VAT is explicitly stored, use it\n                WHEN p.vat_amount IS NOT NULL THEN p.vat_amount\n                -- If business is VAT registered but no VAT breakdown, calculate it\n                WHEN (SELECT is_vat_registered FROM business_settings WHERE id = 1) THEN\n                    ROUND(p.amount - (p.amount / (1 + COALESCE(p.vat_rate,\n                        (SELECT default_vat_rate FROM business_settings WHERE id = 1))/100), 2)\n                -- Business not VAT registered = no VAT charged\n                ELSE 0\n            END\n        ), 0) as total_vat_charged,\n        COALESCE(SUM(\n            CASE\n                -- If net amount is explicitly stored, use it\n                WHEN p.net_amount IS NOT NULL THEN p.net_amount\n                -- If business is VAT registered but no net amount, calculate it\n                WHEN (SELECT is_vat_registered FROM business_settings WHERE id = 1) THEN\n                    ROUND(p.amount / (1 + COALESCE(p.vat_rate,\n                        (SELECT default_vat_rate FROM business_settings WHERE id = 1))/100), 2)\n                -- Business not VAT registered = gross amount is net amount\n                ELSE p.amount\n            END\n        ), 0) as net_sales,\n        COUNT(*) as transaction_count\n    FROM payments p\n    JOIN bookings b ON p.booking_id = b.id\n    WHERE p.status = 'completed'\n        AND p.created_at::date BETWEEN start_date AND end_date\n        AND p.payment_type IN ('full', 'partial', 'balance');\nEND;\n$$ LANGUAGE plpgsql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- Detailed Transaction Export (Primary tax function)\n-- WHY: All businesses need transaction records for tax returns and accounting\n-- WHEN: Monthly/quarterly for accounting software import\n-- OUTPUT: CSV-compatible transaction list with customer, service, payment details\n-- USE: Import directly into QuickBooks, Xero, or other accounting software\n-- PARAMETERS: include_vat=false (default for micro businesses), include_vat=true only when VAT registered\nCREATE OR REPLACE FUNCTION export_sales_transactions(\n    start_date DATE,\n    end_date DATE,\n    include_vat BOOLEAN DEFAULT FALSE\n)\nRETURNS TABLE (\n    transaction_date DATE,\n    invoice_number TEXT,\n    customer_name TEXT,\n    customer_email TEXT,\n    service_description TEXT,\n    payment_method TEXT,\n    gross_amount NUMERIC(10,2),\n    net_amount NUMERIC(10,2),\n    vat_amount NUMERIC(10,2),\n    vat_rate NUMERIC(5,2),\n    booking_id CHAR(12),\n    payment_id CHAR(12)\n) AS $$\nBEGIN\n    RETURN QUERY\n    SELECT\n        p.created_at::date as transaction_date,\n        p.invoice_number::text AS invoice_number,\n        COALESCE(u.fn, 'Walk-in Customer') as customer_name,\n        u.email as customer_email,\n        string_agg(s.name, ', ') as service_description,\n        p.payment_method::text as payment_method,\n        p.amount as gross_amount,\n        CASE\n            WHEN include_vat AND p.net_amount IS NOT NULL THEN p.net_amount\n            WHEN include_vat THEN ROUND(p.amount / 1.20, 2)\n            ELSE p.amount\n        END as net_amount,\n        CASE\n            WHEN include_vat AND p.vat_amount IS NOT NULL THEN p.vat_amount\n            WHEN include_vat THEN ROUND(p.amount - (p.amount / 1.20), 2)\n            ELSE 0\n        END as vat_amount,\n        CASE\n            WHEN include_vat THEN COALESCE(p.vat_rate, 20.00)\n            ELSE NULL\n        END as vat_rate,\n        b.id as booking_id,\n        p.id as payment_id\n    FROM payments p\n    JOIN bookings b ON p.booking_id = b.id\n    LEFT JOIN users u ON b.user_id = u.id\n    LEFT JOIN booking_services bs ON b.id = bs.booking_id\n    LEFT JOIN services s ON bs.service_id = s.id\n    WHERE p.status = 'completed'\n        AND p.created_at::date BETWEEN start_date AND end_date\n        AND p.payment_type IN ('full', 'partial', 'balance')\n    GROUP BY p.id, b.id, u.fn, u.email, p.created_at, p.amount, p.net_amount, p.vat_amount, p.vat_rate, p.payment_method, p.invoice_number\n    ORDER BY p.created_at;\nEND;\n$$ LANGUAGE plpgsql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- Monthly Business Summary\n-- WHY: Track business performance trends and payment method preferences\n-- WHEN: Monthly review of business performance\n-- OUTPUT: Month-by-month breakdown of revenue, bookings, payment methods\n-- USE: Personal business insights - \"How am I doing vs last month?\"\nCREATE OR REPLACE FUNCTION get_monthly_business_summary(\n    start_date DATE,\n    end_date DATE\n)\nRETURNS TABLE (\n    month_year TEXT,\n    total_bookings BIGINT,\n    total_revenue NUMERIC(12,2),\n    cash_payments NUMERIC(12,2),\n    card_payments NUMERIC(12,2),\n    online_payments NUMERIC(12,2),\n    avg_transaction NUMERIC(10,2)\n) AS $$\nBEGIN\n    RETURN QUERY\n    SELECT\n        TO_CHAR(p.created_at, 'YYYY-MM') as month_year,\n        COUNT(DISTINCT b.id) as total_bookings,\n        SUM(p.amount) as total_revenue,\n        SUM(CASE WHEN p.payment_method = 'cash' THEN p.amount ELSE 0 END) as cash_payments,\n        SUM(CASE WHEN p.payment_method = 'in_person_card' THEN p.amount ELSE 0 END) as card_payments,\n        SUM(CASE WHEN p.payment_method = 'online_square' THEN p.amount ELSE 0 END) as online_payments,\n        ROUND(AVG(p.amount), 2) as avg_transaction\n    FROM payments p\n    JOIN bookings b ON p.booking_id = b.id\n    WHERE p.status = 'completed'\n        AND p.created_at::date BETWEEN start_date AND end_date\n        AND p.payment_type IN ('full', 'partial', 'balance')\n    GROUP BY TO_CHAR(p.created_at, 'YYYY-MM')\n    ORDER BY month_year;\nEND;\n$$ LANGUAGE plpgsql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- Simple Sales Totals (Quick business snapshot)\n-- WHY: Quick overview of current performance for dashboard/API\n-- WHEN: Dashboard loading, daily/weekly check-ins\n-- OUTPUT: Total sales, transaction count, payment method breakdown\n-- USE: Homepage dashboard, \"How much did I make this week?\" queries\nCREATE OR REPLACE FUNCTION get_sales_totals(\n    start_date DATE,\n    end_date DATE\n)\nRETURNS TABLE (\n    total_sales NUMERIC(12,2),\n    total_transactions BIGINT,\n    cash_total NUMERIC(12,2),\n    card_total NUMERIC(12,2),\n    online_total NUMERIC(12,2)\n) AS $$\nBEGIN\n    RETURN QUERY\n    SELECT\n        COALESCE(SUM(p.amount), 0) as total_sales,\n        COUNT(*) as total_transactions,\n        COALESCE(SUM(CASE WHEN p.payment_method = 'cash' THEN p.amount ELSE 0 END), 0) as cash_total,\n        COALESCE(SUM(CASE WHEN p.payment_method = 'in_person_card' THEN p.amount ELSE 0 END), 0) as card_total,\n        COALESCE(SUM(CASE WHEN p.payment_method = 'online_square' THEN p.amount ELSE 0 END), 0) as online_total\n    FROM payments p\n    JOIN bookings b ON p.booking_id = b.id\n    WHERE p.status = 'completed'\n        AND p.created_at::date BETWEEN start_date AND end_date\n        AND p.payment_type IN ('full', 'partial', 'balance');\nEND;\n$$ LANGUAGE plpgsql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- =======================================\n-- UTILITY FUNCTIONS\n-- =======================================\n\n-- VAT Registration Transition Function\n-- WHY: When crossing \u00a390k threshold, must register for VAT and backfill existing data\n-- WHEN: One-time use when VAT registration becomes mandatory\n-- OUTPUT: Updates all historical payments with VAT breakdown + sets new defaults\n-- USE: Call once when we register for VAT - transforms business from non-VAT to VAT\n-- =======================================\n-- UTILITY FUNCTIONS\n-- =======================================\n\n-- VAT Registration Transition Function\n-- WHY: When crossing \u00a390k threshold, must register for VAT and backfill existing data\n-- WHEN: One-time use when VAT registration becomes mandatory\n-- OUTPUT: Updates all historical payments with VAT breakdown + sets new defaults\n-- USE: Call once when we register for VAT - transforms business from non-VAT to VAT\nCREATE OR REPLACE FUNCTION enable_vat_registration(\n    registration_date DATE DEFAULT CURRENT_DATE,\n    vat_rate NUMERIC(5,2) DEFAULT 20.00,\n    vat_reg_number TEXT DEFAULT NULL\n)\nRETURNS TABLE (\n    payments_updated INT,\n    total_vat_calculated NUMERIC(12,2),\n    total_net_calculated NUMERIC(12,2),\n    registration_effective_date DATE,\n    settings_updated BOOLEAN\n) AS $$\nDECLARE\n    updated_count INT;\n    total_vat NUMERIC(12,2);\n    total_net NUMERIC(12,2);\n    settings_ok BOOLEAN := FALSE;\nBEGIN\n    -- Update all existing completed payments with VAT breakdown\n    UPDATE payments\n    SET\n        vat_rate = enable_vat_registration.vat_rate,\n        vat_amount = ROUND(amount - (amount / (1 + enable_vat_registration.vat_rate/100)), 2),\n        net_amount = ROUND(amount / (1 + enable_vat_registration.vat_rate/100), 2),\n        is_vat_applicable = TRUE,\n        updated_at = NOW()\n    WHERE status = 'completed'\n        AND created_at::date >= registration_date\n        AND vat_amount IS NULL;\n\n    GET DIAGNOSTICS updated_count = ROW_COUNT;\n\n    -- Calculate totals\n    SELECT\n        COALESCE(SUM(vat_amount), 0),\n        COALESCE(SUM(net_amount), 0)\n    INTO total_vat, total_net\n    FROM payments\n    WHERE status = 'completed'\n        AND created_at::date >= registration_date\n        AND vat_amount IS NOT NULL;\n\n    -- Update business_settings to reflect VAT registration\n    UPDATE business_settings\n    SET\n        is_vat_registered = TRUE,\n        vat_registration_number = COALESCE(vat_reg_number, vat_registration_number),\n        default_vat_rate = enable_vat_registration.vat_rate,\n        updated_at = NOW()\n    WHERE id = 1;\n\n    IF FOUND THEN\n        settings_ok := TRUE;\n    END IF;\n\n    RETURN QUERY SELECT\n        updated_count,\n        total_vat,\n        total_net,\n        registration_date,\n        settings_ok;\nEND;\n$$ LANGUAGE plpgsql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- Update payment with VAT (for new payments after VAT registration)\n-- WHY: After VAT registration, all new payments need VAT calculation\n-- WHEN: Called automatically when processing new payments (if VAT registered)\n-- OUTPUT: Updates individual payment with VAT breakdown\n-- USE: Call from Go when processing new payments after VAT registration\n-- =======================================\n-- UPDATE PAYMENT WITH VAT\n-- =======================================\n-- WHY: After VAT registration, all new payments need VAT calculation\n-- WHEN: Called automatically when processing new payments (if VAT registered)\n-- OUTPUT: Updates individual payment with VAT breakdown\n-- USE: Call from Go or backend when processing new payments\nCREATE OR REPLACE FUNCTION apply_vat_to_payment(\n    payment_id CHAR(12),\n    vat_rate NUMERIC(5,2) DEFAULT NULL  -- NULL = use default from business_settings\n)\nRETURNS VOID AS $$\nDECLARE\n    effective_rate NUMERIC(5,2);\nBEGIN\n    -- Determine effective VAT rate\n    IF vat_rate IS NULL THEN\n        SELECT default_vat_rate INTO effective_rate\n        FROM business_settings\n        WHERE id = 1 AND is_vat_registered = TRUE;\n\n        IF NOT FOUND OR effective_rate IS NULL THEN\n            RAISE EXCEPTION 'no vat rate provided and business is not registered for vat';\n        END IF;\n    ELSE\n        effective_rate := vat_rate;\n    END IF;\n\n    -- Update payment with VAT amounts\n    UPDATE payments\n    SET\n        vat_rate = effective_rate,\n        vat_amount = ROUND(amount - (amount / (1 + effective_rate/100)), 2),\n        net_amount = ROUND(amount / (1 + effective_rate/100), 2),\n        is_vat_applicable = TRUE,\n        updated_at = NOW()\n    WHERE id = payment_id\n        AND vat_amount IS NULL;\nEND;\n$$ LANGUAGE plpgsql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- =======================================\n-- SIMPLE VAT CALCULATION HELPER\n-- =======================================\n-- WHY: Manual VAT calculations or validation\n-- WHEN: Checking VAT calculations or manual entry corrections\n-- OUTPUT: net amount and vat amount from gross amount\n-- USE: Manual calculations, validation, or corrections\nCREATE OR REPLACE FUNCTION calculate_vat(\n    gross_amount NUMERIC(10,2),\n    vat_rate NUMERIC(5,2) DEFAULT NULL  -- NULL = use default from business_settings\n)\nRETURNS TABLE(\n    net NUMERIC(10,2),\n    vat NUMERIC(10,2)\n) AS $$\nDECLARE\n    effective_rate NUMERIC(5,2);\nBEGIN\n    -- Determine effective VAT rate\n    IF vat_rate IS NULL THEN\n        SELECT default_vat_rate INTO effective_rate\n        FROM business_settings\n        WHERE id = 1 AND is_vat_registered = TRUE;\n\n        IF NOT FOUND OR effective_rate IS NULL THEN\n            RAISE EXCEPTION 'no vat rate provided and business is not registered for vat';\n        END IF;\n    ELSE\n        effective_rate := vat_rate;\n    END IF;\n\n    -- Return net and VAT\n    RETURN QUERY\n    SELECT\n        ROUND(gross_amount / (1 + effective_rate/100), 2) AS net,\n        gross_amount - ROUND(gross_amount / (1 + effective_rate/100), 2) AS vat;\nEND;\n$$ LANGUAGE plpgsql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: statement\nName: None\nSQL:\n-- =======================================\n-- UK RECEIPT COMPLIANCE FUNCTION\n-- =======================================\n\n/*\nUK RECEIPT REQUIREMENTS:\n- Business name and address (static - provided by application)\n- Date and time of transaction\n- Description of goods/services\n- Amount charged (including VAT if registered)\n- VAT breakdown (if VAT registered)\n- Receipt/invoice number\n- Payment method\n- Customer details (if requested)\n\nVAT RECEIPT REQUIREMENTS (if VAT registered):\n- VAT registration number (static - provided by application)\n- VAT rate applied\n- VAT amount\n- Net amount (excluding VAT)\n- Total amount (including VAT)\n*/\n\n-- Complete Receipt Data for UK Compliance\n-- WHY: Generate legally compliant receipts for customers\n-- WHEN: After each completed payment/booking\n-- OUTPUT: All data needed for receipt printing/email\n-- USE: Call from Go API to generate customer receipts\nCREATE OR REPLACE FUNCTION get_receipt_data(payment_id CHAR(12))\nRETURNS TABLE (\n    -- Business Information\n    business_name TEXT,\n    business_address TEXT,\n    business_phone TEXT,\n    business_email TEXT,\n    vat_registration_number TEXT,\n    is_vat_registered BOOLEAN,\n\n    -- Payment Information\n    payment_id CHAR(12),\n    invoice_number TEXT,\n    transaction_date TIMESTAMPTZ,\n    payment_method TEXT,\n    payment_status TEXT,\n\n    -- Customer Information\n    customer_id CHAR(12),\n    customer_name TEXT,\n    customer_email TEXT,\n    customer_phone TEXT,\n\n    -- Booking Information\n    booking_id CHAR(12),\n    appointment_date TIMESTAMPTZ,\n    booking_status TEXT,\n\n    -- Service Details\n    services JSON,\n    total_duration_minutes INT,\n\n    -- Financial Information\n    gross_amount NUMERIC(10,2),\n    net_amount NUMERIC(10,2),\n    vat_amount NUMERIC(10,2),\n    vat_rate NUMERIC(5,2),\n    is_vat_applicable BOOLEAN,\n\n    -- Receipt Metadata\n    receipt_generated_at TIMESTAMPTZ,\n    currency_code TEXT\n) AS $$\nDECLARE\n    bs RECORD; -- To hold business settings\nBEGIN\n    -- Fetch current business settings (assume single row, id=1)\n    SELECT INTO bs\n        business_name,\n        business_address,\n        business_phone,\n        business_email,\n        vat_registration_number,\n        is_vat_registered,\n        currency_code\n    FROM business_settings\n    WHERE id = 1;\n\n    RETURN QUERY\n    SELECT\n        -- Business Info\n        bs.business_name,\n        bs.business_address,\n        bs.business_phone,\n        bs.business_email,\n        bs.vat_registration_number,\n        bs.is_vat_registered,\n\n        -- Payment Info\n        p.id as payment_id,\n        COALESCE('INV-' || p.invoice_number::text, 'INV-' || p.id) as invoice_number,\n        p.created_at as transaction_date,\n        p.payment_method::text as payment_method,\n        p.status::text as payment_status,\n\n        -- Customer Info\n        u.id as customer_id,\n        CASE\n            WHEN u.account_role = 'guest' OR u.fn = 'Deleted User' THEN 'Walk-in Customer'\n            ELSE u.fn\n        END as customer_name,\n        CASE\n            WHEN u.account_role = 'guest' OR u.fn = 'Deleted User' THEN NULL\n            ELSE u.email\n        END as customer_email,\n        CASE\n            WHEN u.account_role = 'guest' OR u.fn = 'Deleted User' THEN NULL\n            ELSE u.phone\n        END as customer_phone,\n\n        -- Booking Info\n        b.id as booking_id,\n        b.start_time as appointment_date,\n        b.status::text as booking_status,\n\n        -- Service Details\n        COALESCE((\n            SELECT json_agg(\n                json_build_object(\n                    'service_id', s.id,\n                    'name', s.name,\n                    'description', s.description,\n                    'price', s.price,\n                    'duration_minutes', s.duration_minutes\n                )\n                ORDER BY s.name\n            )\n            FROM booking_services bs_inner\n            JOIN services s ON bs_inner.service_id = s.id\n            WHERE bs_inner.booking_id = b.id\n        ), '[]'::json) as services,\n\n        -- Total service duration\n        COALESCE((\n            SELECT SUM(s.duration_minutes)\n            FROM booking_services bs_inner\n            JOIN services s ON bs_inner.service_id = s.id\n            WHERE bs_inner.booking_id = b.id\n        ), 0) as total_duration_minutes,\n\n        -- Financial Info\n        p.amount as gross_amount,\n        COALESCE(p.net_amount, p.amount) as net_amount,\n        COALESCE(p.vat_amount, 0.00) as vat_amount,\n        p.vat_rate as vat_rate,\n        p.is_vat_applicable as is_vat_applicable,\n\n        -- Receipt Metadata\n        NOW() as receipt_generated_at,\n        bs.currency_code as currency_code\n\n    FROM payments p\n    JOIN bookings b ON p.booking_id = b.id\n    LEFT JOIN users u ON b.user_id = u.id\n    WHERE p.id = payment_id;\nEND;\n$$ LANGUAGE plpgsql;",
    "File: /home/popertots/ragmcp/Crussell/init-scripts/init-script.sql\nType: unknown\nName: None\nSQL:\n-- =======================================\n-- FUNCTION USAGE SUMMARY\n-- =======================================\n/*\nThis summary organizes all database functions by their primary purpose, legal basis, and expected usage frequency\u2014\nproviding a clear guide for integration into our application, compliance workflows, and business operations.\n\n--------------------------------------------------------------------------------\n1. FINANCIAL & TAX COMPLIANCE\n--------------------------------------------------------------------------------\n\nREGULAR USE (called from API endpoints or UI):\n- get_sales_totals(start_date, end_date)\n  \u2192 Quick dashboard metrics: total revenue, transaction count, and payment method breakdown.\n- get_receipt_data(payment_id)\n  \u2192 Generate a UK-compliant receipt after every completed payment.\n- calculate_vat(gross_amount, vat_rate)\n  \u2192 Utility for validating or manually computing VAT splits.\n\nPERIODIC USE (monthly/quarterly for accounting or tax filing):\n- export_sales_transactions(start_date, end_date, include_vat)\n  \u2192 Primary export for accounting software (QuickBooks, Xero). Set include_vat = true only if VAT-registered.\n- get_monthly_business_summary(start_date, end_date)\n  \u2192 Analyze trends: bookings, revenue, avg. transaction size, and payment method adoption.\n- get_vat_return_data(start_date, end_date)\n  \u2192 MTD-ready VAT return summary for HMRC (only if VAT-registered).\n\nONE-TIME OR TRANSITIONAL USE:\n- enable_vat_registration(registration_date, vat_rate, vat_reg_number)\n  \u2192 Run once when crossing the \u00a390k VAT threshold to backfill historical payments.\n- apply_vat_to_payment(payment_id, vat_rate)\n  \u2192 Called automatically for every new payment after VAT registration.\n\n--------------------------------------------------------------------------------\n2. GDPR & DATA PRIVACY\n--------------------------------------------------------------------------------\n\nON-DEMAND USE (triggered by user request or admin action):\n- export_all_user_data(user_id)\n  \u2192 Full Subject Access Request (SAR) export in JSON (GDPR Article 15).\n- anonymize_user(user_id)\n  \u2192 Right to Erasure for registered users (GDPR Article 17); preserves audit trail.\n- delete_guest_user(user_id)\n  \u2192 Complete deletion of guest accounts (no contractual basis).\n- update_data_consent(user_id, consent)\n  \u2192 Records updated consent preference with timestamp for auditability.\n\nNOTE: Booking data is retained under contractual necessity (GDPR Art. 6(1)(b)) even if consent is withdrawn.\nOnly optional data (e.g., marketing) is governed by consent.\n\n--------------------------------------------------------------------------------\n3. BUSINESS OPERATIONS & LOYALTY\n--------------------------------------------------------------------------------\n\n- Referral Program: Use user_referrals table + referral_code in users (handled in app logic).\n- Patch Test Tracking: user_service_patch_tests enforces allergen safety (enforced in app based on services.patch_test_duration_hours).\n\n--------------------------------------------------------------------------------\n4. UTILITY & MAINTENANCE\n--------------------------------------------------------------------------------\n\n- generate_*_id() functions: Internal use only (DEFAULT in table definitions).\n- Timestamp triggers (e.g., on business_settings): Automatic\u2014no manual call needed.\n\n--------------------------------------------------------------------------------\nINTEGRATION QUICK REFERENCE\n--------------------------------------------------------------------------------\n\u2022 User deletes account \u2192 anonymize_user() or delete_guest_user()\n\u2022 \"What data do you have?\" \u2192 export_all_user_data()\n\u2022 New payment \u2192 apply_vat_to_payment() (if VAT reg) + get_receipt_data()\n\u2022 Monthly close \u2192 export_sales_transactions(..., include_vat := [true/false])\n\u2022 VAT registration day \u2192 enable_vat_registration() once, then apply_vat_to_payment()\n\u2022 Dashboard load \u2192 get_sales_totals() + get_monthly_business_summary()\n*/",
    "File: /home/popertots/ragmcp/Crussell/backend/main.go\nType: func\nName: init\nCode:\nfunc init() {\n\tjwtSecret := os.Getenv(\"JWT_SECRET_KEY\")\n\tif jwtSecret == \"\" {\n\t\tlog.Fatal(\"FATAL: JWT_SECRET_KEY environment variable not set. Application cannot start.\")\n\t}\n\tauth.InitJWT(jwtSecret)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/main.go\nType: func\nName: initDB\nCode:\nfunc initDB() {\n\tif err := db.Connect(); err != nil {\n\t\tlog.Fatal(\"Failed to connect to DB:\", err)\n\t}\n\tfmt.Println(\"Connected to DB successfully\")\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/main.go\nType: func\nName: initDav\nCode:\nfunc initDav() {\n\tif dav.Service == nil {\n\t\tlog.Fatal(\"Failed to initialize DAV service\")\n\t}\n\tfmt.Println(\"DAV Service connected successfully\")\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/main.go\nType: func\nName: main\nCode:\nfunc main() {\n\tinitDB()\n\tinitDav()\n\n\tr := chi.NewRouter()\n\n\t// --- Global Middleware ---\n\tr.Use(middleware.RequestID)\n\tr.Use(middleware.RealIP)\n\tr.Use(middleware.Logger)\n\tr.Use(middleware.Recoverer)\n\tr.Use(middleware.Timeout(15 * time.Second))\n\tr.Use(func(next http.Handler) http.Handler {\n\t\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\t\tw.Header().Set(\"X-Content-Type-Options\", \"nosniff\")\n\t\t\tw.Header().Set(\"X-Frame-Options\", \"DENY\")\n\t\t\tw.Header().Set(\"X-XSS-Protection\", \"1; mode=block\")\n\t\t\tnext.ServeHTTP(w, r)\n\t\t})\n\t})\n\n\t// All API routes grouped under /api for clarity\n\tr.Route(\"/api\", func(r chi.Router) {\n\n\t\t// --- Public Routes ---\n\t\tr.Get(\"/services\", services.ServicesHandler)\n\t\tr.Post(\"/register\", authHandlers.RegisterHandler)\n\t\tr.Post(\"/login\", authHandlers.LoginHandler)\n\n\t\t// --- Scheduling Routes ---\n\t\tr.Route(\"/scheduling\", func(r chi.Router) {\n\t\t\t// Public GET routes\n\t\t\tr.Get(\"/default-hours\", scheduling.GetDefaultHours)\n\t\t\tr.Get(\"/exceptional-groups\", scheduling.ListExceptionalGroups)\n\t\t\tr.Get(\"/working-hours\", scheduling.GetWorkingHours)\n\t\t\tr.Get(\"/available-hours\", scheduling.GetAvailableHours)\n\n\t\t\t// Admin-only scheduling modifications\n\t\t\tr.Group(func(r chi.Router) {\n\t\t\t\tr.Use(mw.RequireAuth)\n\t\t\t\tr.Use(mw.RequireAdmin)\n\n\t\t\t\tr.Put(\"/default-hours\", scheduling.UpdateDefaultHours)\n\t\t\t\tr.Post(\"/exceptional-groups\", scheduling.CreateExceptionalGroup)\n\t\t\t\tr.Delete(\"/exceptional-groups\", scheduling.DeleteExceptionalGroup)\n\t\t\t\tr.Put(\"/exceptional-applications\", scheduling.UpdateExceptionalApplications)\n\t\t\t})\n\t\t})\n\n\t\t// --- Protected routes (any authenticated user) ---\n\t\tr.Group(func(r chi.Router) {\n\t\t\tr.Use(mw.RequireAuth)\n\n\t\t\tr.Get(\"/user/profile\", user.GetProfileHandler)\n\t\t\tr.Put(\"/user/profile\", user.UpdateProfileHandler)\n\t\t\tr.Delete(\"/user/account\", user.DeleteAccountHandler)\n\t\t\tr.Get(\"/user/loyalty\", user.GetLoyaltyHandler)\n\n\t\t\t// Booking routes for authenticated users\n\t\t\tr.Route(\"/bookings\", func(r chi.Router) {\n\t\t\t\tr.Get(\"/\", bookings.GetAllUserBookingsHandler)\n\t\t\t\tr.Post(\"/\", bookings.CreateBookingHandler)\n\t\t\t\tr.Get(\"/{id}\", bookings.GetBookingHandler)\n\t\t\t\tr.Put(\"/{id}\", bookings.EditBookingHandler)\n\t\t\t\tr.Delete(\"/{id}\", bookings.DeleteBookingHandler)\n\t\t\t})\n\t\t})\n\n\t\t// --- Admin-only routes ---\n\t\tr.Group(func(r chi.Router) {\n\t\t\tr.Use(mw.RequireAuth)\n\t\t\tr.Use(mw.RequireAdmin)\n\n\t\t\tr.Route(\"/admin/services\", func(r chi.Router) {\n\t\t\t\tr.Post(\"/\", services.CreateServiceHandler)\n\t\t\t\tr.Delete(\"/{id}\", services.DeleteServiceHandler)\n\t\t\t\tr.Get(\"/\", services.AllServicesHandler)\n\t\t\t\tr.Put(\"/{id}/toggle\", services.ToggleService)\n\t\t\t})\n\n\t\t\tr.Route(\"/admin/bookings\", func(r chi.Router) {\n\t\t\t\tr.Get(\"/\", bookings.GetAllAdminBookingsHandler)\n\t\t\t\tr.Get(\"/search\", bookings.SearchAdminBookingsHandler)\n\t\t\t\tr.Get(\"/user/{user_id}\", bookings.GetAllBookingsByUserHandler)\n\t\t\t\tr.Get(\"/{id}\", bookings.GetAdminBookingHandler)\n\t\t\t\tr.Put(\"/{id}/progress\", bookings.ProgressBookingHandler)\n\t\t\t\tr.Post(\"/{id}/confirm\", bookings.ConfirmBookingHandler)\n\t\t\t})\n\t\t})\n\t})\n\n\tfmt.Println(\"Server is listening on :8080\")\n\thttp.ListenAndServe(\":8080\", r)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/vite.config.ts\nLanguage: typescript\n\nimport tailwindcss from '@tailwindcss/vite';\nimport { sveltekit } from '@sveltejs/kit/vite';\nimport { defineConfig } from 'vite';\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/vite.config.ts\nLanguage: typescript\n\nexport default defineConfig({\n\tplugins: [tailwindcss(), sveltekit()]\n});",
    "File: /home/popertots/ragmcp/Crussell/frontend/eslint.config.js\nLanguage: javascript\n\nimport prettier from 'eslint-config-prettier';\nimport { fileURLToPath } from 'node:url';\nimport { includeIgnoreFile } from '@eslint/compat';\nimport js from '@eslint/js';\nimport svelte from 'eslint-plugin-svelte';\nimport { defineConfig } from 'eslint/config';\nimport globals from 'globals';\nimport ts from 'typescript-eslint';\nimport svelteConfig from './svelte.config.js';\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/eslint.config.js\nLanguage: javascript\n\nconst gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/eslint.config.js\nLanguage: javascript\n\nexport default defineConfig(\n\tincludeIgnoreFile(gitignorePath),\n\tjs.configs.recommended,\n\t...ts.configs.recommended,\n\t...svelte.configs.recommended,\n\tprettier,\n\t...svelte.configs.prettier,",
    "File: /home/popertots/ragmcp/Crussell/frontend/eslint.config.js\nLanguage: javascript\n\n\t{",
    "File: /home/popertots/ragmcp/Crussell/frontend/eslint.config.js\nLanguage: javascript\n\n\t\tlanguageOptions: {\n\t\t\tglobals: { ...globals.browser, ...globals.node }\n\t\t},",
    "File: /home/popertots/ragmcp/Crussell/frontend/eslint.config.js\nLanguage: javascript\n\n\t\trules: {",
    "File: /home/popertots/ragmcp/Crussell/frontend/eslint.config.js\nLanguage: javascript\n\n\t\t\t// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.",
    "File: /home/popertots/ragmcp/Crussell/frontend/eslint.config.js\nLanguage: javascript\n\n\t\t\t// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors\n\t\t\t'no-undef': 'off'\n\t\t}\n\t},",
    "File: /home/popertots/ragmcp/Crussell/frontend/eslint.config.js\nLanguage: javascript\n\n\t{\n\t\tfiles: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],",
    "File: /home/popertots/ragmcp/Crussell/frontend/eslint.config.js\nLanguage: javascript\n\n\t\tlanguageOptions: {",
    "File: /home/popertots/ragmcp/Crussell/frontend/eslint.config.js\nLanguage: javascript\n\n\t\t\tparserOptions: {\n\t\t\t\tprojectService: true,\n\t\t\t\textraFileExtensions: ['.svelte'],\n\t\t\t\tparser: ts.parser,\n\t\t\t\tsvelteConfig\n\t\t\t}\n\t\t}\n\t}\n);",
    "File: /home/popertots/ragmcp/Crussell/frontend/svelte.config.js\nLanguage: javascript\n\nimport adapter from '@sveltejs/adapter-static';\nimport { vitePreprocess } from '@sveltejs/vite-plugin-svelte';\n\n/** @type {import('@sveltejs/kit').Config} */",
    "File: /home/popertots/ragmcp/Crussell/frontend/svelte.config.js\nLanguage: javascript\n\nconst config = {",
    "File: /home/popertots/ragmcp/Crussell/frontend/svelte.config.js\nLanguage: javascript\n\n\t// Consult https://svelte.dev/docs/kit/integrations",
    "File: /home/popertots/ragmcp/Crussell/frontend/svelte.config.js\nLanguage: javascript\n\n\t// for more information about preprocessors\n\tpreprocess: vitePreprocess(),\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/svelte.config.js\nLanguage: javascript\n\n\tkit: {",
    "File: /home/popertots/ragmcp/Crussell/frontend/svelte.config.js\nLanguage: javascript\n\n\t\t// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.",
    "File: /home/popertots/ragmcp/Crussell/frontend/svelte.config.js\nLanguage: javascript\n\n\t\t// If your environment is not supported, or you settled on a specific environment, switch out the adapter.",
    "File: /home/popertots/ragmcp/Crussell/frontend/svelte.config.js\nLanguage: javascript\n\n\t\t// See https://svelte.dev/docs/kit/adapters for more information about adapters.",
    "File: /home/popertots/ragmcp/Crussell/frontend/svelte.config.js\nLanguage: javascript\n\n\t\tadapter: adapter({\n\t\t\tpages: 'build',\n\t\t\tassets: 'build',\n\t\t\tfallback: 'index.html'\n\t\t}),",
    "File: /home/popertots/ragmcp/Crussell/frontend/svelte.config.js\nLanguage: javascript\n\n\t\talias: {\n\t\t\t$components: './src/components'\n\t\t}\n\t}\n};\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/svelte.config.js\nLanguage: javascript\n\nexport default config;",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/app.d.ts\nLanguage: typescript\n\n// See https://svelte.dev/docs/kit/types#app.d.ts",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/app.d.ts\nLanguage: typescript\n\n// for information about these interfaces",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/app.d.ts\nLanguage: typescript\n\ndeclare global {",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/app.d.ts\nLanguage: typescript\n\n\tnamespace App {",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/app.d.ts\nLanguage: typescript\n\n\t\t// interface Error {}",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/app.d.ts\nLanguage: typescript\n\n\t\t// interface Locals {}",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/app.d.ts\nLanguage: typescript\n\n\t\t// interface PageData {}",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/app.d.ts\nLanguage: typescript\n\n\t\t// interface PageState {}",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/app.d.ts\nLanguage: typescript\n\n\t\t// interface Platform {}\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/app.d.ts\nLanguage: typescript\n\nexport { };\ndeclare module 'swiper/svelte';",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts\nLanguage: typescript\n\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts\nLanguage: typescript\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts\nLanguage: typescript\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts\nLanguage: typescript\n\nexport type WithoutChild<T> = T extends { child?: any } ? Omit<T, \"child\"> : T;",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts\nLanguage: typescript\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts\nLanguage: typescript\n\nexport type WithoutChildren<T> = T extends { children?: any } ? Omit<T, \"children\"> : T;",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts\nLanguage: typescript\n\nexport type WithoutChildrenOrChild<T> = WithoutChildren<WithoutChild<T>>;",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts\nLanguage: typescript\n\nexport type WithElementRef<T, U extends HTMLElement = HTMLElement> = T & { ref?: U | null };",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/index.ts\nLanguage: typescript\n\n// place files you want to import through the `$lib` alias in this folder.",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/+page.svelte\nType: markup\n<section class=\"py-20 text-center\">\n\t{#if authStore.isLoading}\n\t\t<!-- Skeleton loading state -->\n\t\t<div class=\"m-2 mb-4\">\n\t\t\t<Skeleton class=\"mx-auto h-10 w-80 max-w-full\" />\n\t\t</div>\n\t\t<div class=\"mb-8\">\n\t\t\t<Skeleton class=\"mx-auto h-6 w-96 max-w-full\" />\n\t\t</div>\n\t\t<Skeleton class=\"mx-auto h-12 w-48\" />\n\t{:else}\n\t\t<h1 class=\"m-2 mb-4 text-4xl font-bold\">\n\t\t\t{#if !authStore.isAuthenticated}\n\t\t\t\tWelcome to Crussell Nails\n\t\t\t{:else if authStore.currentUser?.role === 'unverified_email'}\n\t\t\t\tWelcome {authStore.currentUser?.firstName}\n\t\t\t{:else}\n\t\t\t\tWelcome back {authStore.currentUser?.firstName}\n\t\t\t{/if}\n\t\t</h1>\n\t\t<p class=\"mb-8 text-lg text-gray-600\">\n\t\t\tProfessional beauty treatments in a calm and friendly environment.\n\t\t</p>\n\t\t<Button href=\"/book\" class=\"px-6 py-3 text-lg\">Book an Appointment</Button>\n\t{/if}\n</section>\n\n<section class=\"mx-auto max-w-4xl px-6 py-16\">\n\t<h2 class=\"mb-8 text-center text-2xl font-semibold\">Our Services</h2>\n\t<div class=\"grid grid-cols-1 gap-8 md:grid-cols-4\">\n\t\t<div class=\"rounded-lg border p-6\">\n\t\t\t<h3 class=\"mb-2 text-lg font-semibold\">Hands</h3>\n\t\t\t<p class=\"text-gray-600\">\n\t\t\t\tLorem hand ipsum nail dolor art sit paint amet, skin consectetur cuticle adipiscing file\n\t\t\t\telit.\n\t\t\t</p>\n\t\t</div>\n\t\t<div class=\"rounded-lg border p-6\">\n\t\t\t<h3 class=\"mb-2 text-lg font-semibold\">Feet</h3>\n\t\t\t<p class=\"text-gray-600\">\n\t\t\t\tLorem foot ipsum nail dolor art sit paint amet, skin consectetur cuticle adipiscing file\n\t\t\t\telit.\n\t\t\t</p>\n\t\t</div>\n\t\t<div class=\"rounded-lg border p-6\">\n\t\t\t<h3 class=\"mb-2 text-lg font-semibold\">Brows</h3>\n\t\t\t<p class=\"text-gray-600\">\n\t\t\t\tLorem brow ipsum eye dolor art sit shape amet, tint consectetur colour adipiscing tweaze\n\t\t\t\telit.\n\t\t\t</p>\n\t\t</div>\n\t\t<div class=\"rounded-lg border p-6\">\n\t\t\t<h3 class=\"mb-2 text-lg font-semibold\">Wax</h3>\n\t\t\t<p class=\"text-gray-600\">\n\t\t\t\tLorem wax ipsum leg dolor body sit sticky amet, back consectetur sack adipiscing crack elit.\n\t\t\t</p>\n\t\t</div>\n\t</div>\n</section>\n\n<PortfolioCarousel />\n\n<section class=\"bg-gray-50 py-16\">\n\t<div class=\"mx-auto max-w-3xl px-6 text-center\">\n\t\t<h2 class=\"mb-4 text-2xl font-semibold\">Why Choose Us?</h2>\n\t\t<p class=\"leading-relaxed text-gray-600\">\n\t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus\n\t\t\ttortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices\n\t\t\tdiam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci\n\t\t\tnec nonummy molestie,\n\t\t</p>\n\t</div>\n</section>\n\n<section class=\"py-20 text-center\">\n\t<h2 class=\"mb-4 text-2xl font-semibold\">Ready to Treat Yourself?</h2>\n\t<Button class=\"px-6 py-3 text-lg\" href=\"prices\">View Price List</Button>\n</section>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/+error.svelte\nType: markup\n<section class=\"py-20 text-center\">\n\t<h1 class=\"mb-4 text-5xl font-bold\">{status}</h1>\n\t<p class=\"mb-6 text-lg text-gray-600\">\n\t\t{status === 404\n\t\t\t? \"Oops! The page you are looking for doesn't exist.\"\n\t\t\t: 'Something went wrong. Please try again later.'}\n\t</p>\n\n\t{#if error?.message}\n\t\t<p class=\"mb-8 text-gray-500\">{error.message}</p>\n\t{/if}\n\n\t<Button href=\"/\" class=\"px-6 py-3 text-lg\">Go Back Home</Button>\n</section>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/+layout.svelte\nType: function\nName: updateToasterPosition\nDoc: \nCode:\n\tfunction updateToasterPosition() {\n\t\t// Use 640px (Tailwind's 'sm' breakpoint) to differentiate desktop and mobile\n\t\tif (typeof window !== 'undefined' && window.innerWidth >= 768) {\n\t\t\ttoasterPosition = 'bottom-center';\n\t\t} else {\n\t\t\ttoasterPosition = 'top-center';\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/+layout.svelte\nType: function\nName: verify_email\nDoc: \nCode:\n\tasync function verify_email() {\n\t\talert('Verifying email address...');\n\t\tconst response = await fetch('/api/verify-email', {\n\t\t\tmethod: 'POST'\n\t\t});\n\n\t\tif (response.ok) {\n\t\t\twindow.location.reload();\n\t\t} else {\n\t\t\talert('Failed to verify email address');\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/+layout.svelte\nType: markup\n<svelte:head>\n\t<link rel=\"icon\" href={favicon} />\n</svelte:head>\n\n<NavBar />\n<Toaster position={toasterPosition} />\n\n<main class=\"pt-16\">\n\t{#if authStore.currentUser?.role === 'unverified_email'}\n\t\t<div class=\"w-full bg-red-600 py-2 pl-8 pr-8 text-center text-sm font-medium text-white\">\n\t\t\tPlease verify your email address to continue. Didn't recieve the email? Check your spam\n\t\t\tfolder, or <button\n\t\t\t\ttype=\"button\"\n\t\t\t\tonclick={verify_email}\n\t\t\t\tclass=\"cursor-pointer border-0 bg-transparent p-0 text-white underline\"\n\t\t\t>\n\t\t\t\tclick here\n\t\t\t</button>\n\t\t\tto resend it.\n\t\t</div>\n\t{/if}\n\t{@render children?.()}\n</main>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/contact/+page.svelte\nType: markup\n<section class=\"py-12\">\n\t<h1 class=\"mb-8 text-center text-2xl font-semibold\">Contact Me</h1>\n\t<ContactCard\n\t\tname=\"Chelsea Russell\"\n\t\trole=\"Owner / Beauty Specialist\"\n\t\tphone=\"+44 8008135\"\n\t\temail=\"chelsea@emailaddress.com\"\n\t\tinstagram=\"crussell\"\n\t\taddress=\"Business Centre, Office Street, Work\"\n\t/>\n</section>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: type\nName: Service\nDoc: \nCode:\n\ttype Service = {\n\t\tid: string;\n\t\tname: string;\n\t\tdescription: string;\n\t\tprice: number;\n\t\tduration_minutes: number;\n\t\tpatch_test_duration_hours: number;\n\t\tminimum_age_required: number;\n\t};\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: fetchServices\nDoc: \nCode:\n\tasync function fetchServices() {\n\t\tservicesLoading = true;\n\t\ttry {\n\t\t\tconst response = await fetch('/api/services', {\n\t\t\t\tmethod: 'GET',\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\t// Optional: If your user endpoint requires auth\n\t\t\t\t\tAuthorization: `Bearer ${authStore.currentToken}`\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (response.ok) {\n\t\t\t\tconst data: Service[] = await response.json();\n\t\t\t\tservices = data;\n\t\t\t} else {\n\t\t\t\tconsole.error('Failed to fetch services:', response.status);\n\t\t\t\ttoast.error('Failed to load services');\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error('Error fetching services:', err);\n\t\t\ttoast.error('Network error loading services');\n\t\t} finally {\n\t\t\tservicesLoading = false;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: fetchHoursForMonth\nDoc: \nCode:\n\tasync function fetchHoursForMonth(date: CalendarDate) {\n\t\tconst monthKey = `${date.year}-${String(date.month).padStart(2, '0')}`;\n\n\t\t// Use cached data if available\n\t\tif (workingHoursCache.has(monthKey) && availableHoursCache.has(monthKey)) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tworkingHours = workingHoursCache.get(monthKey)!;\n\t\t\t\tavailableHours = availableHoursCache.get(monthKey)!;\n\t\t\t}, 0);\n\t\t\treturn;\n\t\t}\n\n\t\tloadingWorkingHours = true;\n\t\tloadingAvailableHours = true;\n\n\t\ttry {\n\t\t\t// Calculate start and end of month\n\t\t\tconst startOfMonth = new CalendarDate(date.year, date.month, 1);\n\t\t\tconst endOfMonth = new CalendarDate(\n\t\t\t\tdate.year,\n\t\t\t\tdate.month,\n\t\t\t\tdate.calendar.getDaysInMonth(date)\n\t\t\t);\n\n\t\t\tconst startStr = startOfMonth.toString();\n\t\t\tconst endStr = endOfMonth.toString();\n\n\t\t\t// Fetch working hours\n\t\t\tconst workingHoursResponse = await fetch(\n\t\t\t\t`/api/scheduling/working-hours?start=${startStr}&end=${endStr}`\n\t\t\t);\n\t\t\tif (!workingHoursResponse.ok) {\n\t\t\t\tthrow new Error(`HTTP error! status: ${workingHoursResponse.status}`);\n\t\t\t}\n\n\t\t\ttype WorkingHoursDay = {\n\t\t\t\tdate: string;\n\t\t\t\tweekday: number;\n\t\t\t\tstartTime: string;\n\t\t\t\tendTime: string;\n\t\t\t\tisOpen: boolean;\n\t\t\t\tsource: string;\n\t\t\t};\n\n\t\t\tconst workingHoursData: Array<WorkingHoursDay> = await workingHoursResponse.json();\n\t\t\tconst workingHoursMap: Record<\n\t\t\t\tstring,\n\t\t\t\t{ isOpen: boolean; startTime: string; endTime: string }\n\t\t\t> = {};\n\n\t\t\tworkingHoursData.forEach((day) => {\n\t\t\t\tworkingHoursMap[day.date] = {\n\t\t\t\t\tisOpen: day.isOpen,\n\t\t\t\t\tstartTime: day.startTime,\n\t\t\t\t\tendTime: day.endTime\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tworkingHoursCache.set(monthKey, workingHoursMap);\n\t\t\tworkingHours = workingHoursMap;\n\n\t\t\t// Fetch available hours\n\t\t\tconst availableHoursResponse = await fetch(\n\t\t\t\t`/api/scheduling/available-hours?start=${startStr}&end=${endStr}`\n\t\t\t);\n\t\t\tif (!availableHoursResponse.ok) {\n\t\t\t\tthrow new Error(`HTTP error! status: ${availableHoursResponse.status}`);\n\t\t\t}\n\n\t\t\ttype AvailableHoursDay = {\n\t\t\t\tdate: string;\n\t\t\t\tweekday: number;\n\t\t\t\tisOpen: boolean;\n\t\t\t\tslots: Array<{ startTime: string; endTime: string }>;\n\t\t\t\tsource: string;\n\t\t\t};\n\n\t\t\tconst availableHoursData: Array<AvailableHoursDay> = await availableHoursResponse.json();\n\t\t\tconst availableHoursMap: Record<\n\t\t\t\tstring,\n\t\t\t\t{ isOpen: boolean; slots: Array<{ startTime: string; endTime: string }> }\n\t\t\t> = {};\n\n\t\t\tavailableHoursData.forEach((day) => {\n\t\t\t\tavailableHoursMap[day.date] = {\n\t\t\t\t\tisOpen: day.isOpen,\n\t\t\t\t\tslots: day.slots\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tavailableHoursCache.set(monthKey, availableHoursMap);\n\t\t\tavailableHours = availableHoursMap;\n\n\t\t\t// Set default selected date if not set\n\t\t\tif (!selectedDate) {\n\t\t\t\tsetDefaultSelectedDate(workingHoursMap);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error('Failed to fetch hours:', error);\n\t\t\t// Fallback to current date if API fails\n\t\t\tif (!selectedDate) {\n\t\t\t\tselectedDate = minDate;\n\t\t\t}\n\t\t} finally {\n\t\t\tloadingWorkingHours = false;\n\t\t\tloadingAvailableHours = false;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: type\nName: WorkingHoursDay\nDoc: \nCode:\n\t\t\ttype WorkingHoursDay = {\n\t\t\t\tdate: string;\n\t\t\t\tweekday: number;\n\t\t\t\tstartTime: string;\n\t\t\t\tendTime: string;\n\t\t\t\tisOpen: boolean;\n\t\t\t\tsource: string;\n\t\t\t};\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: type\nName: AvailableHoursDay\nDoc: \nCode:\n\t\t\ttype AvailableHoursDay = {\n\t\t\t\tdate: string;\n\t\t\t\tweekday: number;\n\t\t\t\tisOpen: boolean;\n\t\t\t\tslots: Array<{ startTime: string; endTime: string }>;\n\t\t\t\tsource: string;\n\t\t\t};\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: setDefaultSelectedDate\nDoc: \nCode:\n\tfunction setDefaultSelectedDate(\n\t\thoursMap: Record<string, { isOpen: boolean; startTime: string; endTime: string }>\n\t) {\n\t\tconst currentDate = new Date();\n\t\tlet nextDate = new Date(currentDate);\n\n\t\tfor (let i = 1; i < 30; i++) {\n\t\t\tnextDate = new Date(currentDate);\n\t\t\tnextDate.setDate(currentDate.getDate() + i);\n\t\t\tconst dateStr = nextDate.toISOString().split('T')[0];\n\n\t\t\tif (hoursMap[dateStr]?.isOpen) {\n\t\t\t\tselectedDate = new CalendarDate(\n\t\t\t\t\tnextDate.getFullYear(),\n\t\t\t\t\tnextDate.getMonth() + 1,\n\t\t\t\t\tnextDate.getDate()\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (!selectedDate) {\n\t\t\tconst tomorrow = new Date();\n\t\t\ttomorrow.setDate(tomorrow.getDate() + 1);\n\t\t\tselectedDate = new CalendarDate(\n\t\t\t\ttomorrow.getFullYear(),\n\t\t\t\ttomorrow.getMonth() + 1,\n\t\t\t\ttomorrow.getDate()\n\t\t\t);\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: calculateEndTime\nDoc: \nCode:\n\tfunction calculateEndTime(startTime: string, durationMinutes: number): string {\n\t\tconst [hours, minutes] = startTime.split(':').map(Number);\n\t\tconst date = new Date();\n\t\tdate.setHours(hours, minutes, 0, 0);\n\t\tdate.setMinutes(date.getMinutes() + durationMinutes);\n\t\tconst endHours = date.getHours().toString().padStart(2, '0');\n\t\tconst endMinutes = date.getMinutes().toString().padStart(2, '0');\n\t\treturn `${endHours}:${endMinutes}`;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: formatTime\nDoc: \nCode:\n\tfunction formatTime(time: string): string {\n\t\tconst parts = time.split(':').map(Number);\n\t\tconst hours = parts[0];\n\t\tconst minutes = parts.length > 1 ? parts[1] : 0;\n\n\t\tif (hours === 12 && minutes === 0) {\n\t\t\treturn 'Noon';\n\t\t} else if (hours === 0 && minutes === 0) {\n\t\t\treturn 'Midnight';\n\t\t}\n\n\t\tconst period = hours >= 12 ? 'PM' : 'AM';\n\t\tconst displayHours = hours % 12 || 12;\n\t\treturn `${displayHours}:${minutes.toString().padStart(2, '0')} ${period}`;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: isDateUnavailable\nDoc: \nCode:\n\tfunction isDateUnavailable(date: DateValue): boolean {\n\t\tif (!(date instanceof CalendarDate)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Check if date is outside allowed range\n\t\tif (date.compare(minDate) < 0 || date.compare(maxCalendarDate) > 0) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Check if we have working hours data\n\t\tif (!workingHours) return true; // Changed from false to true when data not loaded\n\n\t\tconst dateStr = date.toString();\n\t\tconst dayHours = workingHours[dateStr];\n\n\t\t// If no data for this date, assume unavailable\n\t\tif (!dayHours) return true;\n\n\t\t// If closed, mark as unavailable\n\t\tif (!dayHours.isOpen) return true;\n\n\t\t// Check if there are any available time slots for the selected services\n\t\tif (selectedServices.length > 0) {\n\t\t\tconst duration = getTotalDuration();\n\t\t\tconst availableSlots = generateAvailableTimeSlots(duration, date);\n\t\t\t// If no slots available for the required duration, mark as unavailable\n\t\t\tif (availableSlots.length === 0) return true;\n\t\t}\n\n\t\treturn false;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: generateGroupedTimeSlots\nDoc: \nCode:\n\tfunction generateGroupedTimeSlots(\n\t\tduration: number,\n\t\tdate: CalendarDate | undefined\n\t): Array<{\n\t\ttype: 'available' | 'unavailable';\n\t\tstartTime: string;\n\t\tendTime: string;\n\t\tisGrouped?: boolean;\n\t}> {\n\t\tif (!date || !workingHours) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst dateStr = date.toString();\n\t\tconst dayWorkingHours = workingHours[dateStr];\n\n\t\tif (!dayWorkingHours || !dayWorkingHours.isOpen) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst groupedSlots: Array<{\n\t\t\ttype: 'available' | 'unavailable';\n\t\t\tstartTime: string;\n\t\t\tendTime: string;\n\t\t\tisGrouped?: boolean;\n\t\t}> = [];\n\t\tconst [startHour, startMinute] = dayWorkingHours.startTime.split(':').map(Number);\n\t\tconst [endHour, endMinute] = dayWorkingHours.endTime.split(':').map(Number);\n\n\t\tlet startTotalMinutes = startHour * 60 + startMinute;\n\t\tconst endTotalMinutes = endHour * 60 + endMinute;\n\n\t\tconst now = new Date();\n\t\tconst today = new CalendarDate(now.getFullYear(), now.getMonth() + 1, now.getDate());\n\t\tconst isToday = date.compare(today) === 0;\n\n\t\t// Apply 2-hour buffer for today's appointments\n\t\tif (isToday) {\n\t\t\tconst currentMinutes = now.getHours() * 60 + now.getMinutes();\n\t\t\tconst minimumStartMinutes = currentMinutes + 120;\n\t\t\tstartTotalMinutes = Math.max(startTotalMinutes, minimumStartMinutes);\n\t\t}\n\n\t\t// Get available time slots that fit our duration\n\t\tconst availableSlots = generateAvailableTimeSlots(duration, date);\n\n\t\tlet currentUnavailableStart: string | null = null;\n\n\t\t// Generate all 15-minute increments within working hours\n\t\tfor (let minutes = startTotalMinutes; minutes < endTotalMinutes; minutes += 15) {\n\t\t\tconst hour = Math.floor(minutes / 60);\n\t\t\tconst minute = minutes % 60;\n\t\t\tconst timeStr = `${String(hour).padStart(2, '0')}:${String(minute).padStart(2, '0')}`;\n\n\t\t\t// Check if this time slot is available (fits duration and within available hours)\n\t\t\tconst isAvailable = availableSlots.includes(timeStr);\n\n\t\t\tif (isAvailable) {\n\t\t\t\t// If we were building an unavailable group, push it first\n\t\t\t\tif (currentUnavailableStart !== null) {\n\t\t\t\t\tconst groupEndTime = calculatePreviousTime(timeStr); // End before this available slot\n\t\t\t\t\tgroupedSlots.push({\n\t\t\t\t\t\ttype: 'unavailable',\n\t\t\t\t\t\tstartTime: currentUnavailableStart,\n\t\t\t\t\t\tendTime: groupEndTime,\n\t\t\t\t\t\tisGrouped: true\n\t\t\t\t\t});\n\t\t\t\t\tcurrentUnavailableStart = null;\n\t\t\t\t}\n\n\t\t\t\t// Add available slot\n\t\t\t\tconst slotEndTime = calculateEndTime(timeStr, duration);\n\t\t\t\tgroupedSlots.push({\n\t\t\t\t\ttype: 'available',\n\t\t\t\t\tstartTime: timeStr,\n\t\t\t\t\tendTime: slotEndTime\n\t\t\t\t});\n\n\t\t\t\t// If this available slot ends at or after closing time, break out early\n\t\t\t\t// to avoid generating unnecessary slots\n\t\t\t\tif (timeToMinutes(slotEndTime) >= endTotalMinutes) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Start or continue unavailable group\n\t\t\t\tif (currentUnavailableStart === null) {\n\t\t\t\t\tcurrentUnavailableStart = timeStr;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Close any remaining unavailable group at the end of the day\n\t\t// BUT only if there are no available slots that already reach closing time\n\t\tif (currentUnavailableStart !== null) {\n\t\t\tconst lastAvailableSlot = groupedSlots.filter((s) => s.type === 'available').pop();\n\t\t\tconst lastAvailableEnd = lastAvailableSlot ? timeToMinutes(lastAvailableSlot.endTime) : 0;\n\n\t\t\t// Only add the final unavailable group if:\n\t\t\t// 1. It actually contains some time before closing\n\t\t\t// 2. No available slot already reaches closing time\n\t\t\tconst unavailableStartMinutes = timeToMinutes(currentUnavailableStart);\n\n\t\t\tif (unavailableStartMinutes < endTotalMinutes && lastAvailableEnd < endTotalMinutes) {\n\t\t\t\tgroupedSlots.push({\n\t\t\t\t\ttype: 'unavailable',\n\t\t\t\t\tstartTime: currentUnavailableStart,\n\t\t\t\t\tendTime: dayWorkingHours.endTime,\n\t\t\t\t\tisGrouped: true\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn groupedSlots;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: timeToMinutes\nDoc: \nCode:\n\tfunction timeToMinutes(time: string): number {\n\t\tconst [hours, minutes] = time.split(':').map(Number);\n\t\treturn hours * 60 + minutes;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: calculatePreviousTime\nDoc: \nCode:\n\tfunction calculatePreviousTime(time: string): string {\n\t\tconst [hours, minutes] = time.split(':').map(Number);\n\t\tlet totalMinutes = hours * 60 + minutes;\n\t\ttotalMinutes -= 15; // Go back 15 minutes\n\n\t\tconst prevHours = Math.floor(totalMinutes / 60);\n\t\tconst prevMinutes = totalMinutes % 60;\n\t\treturn `${String(prevHours).padStart(2, '0')}:${String(prevMinutes).padStart(2, '0')}`;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: generateAvailableTimeSlots\nDoc: \nCode:\n\tfunction generateAvailableTimeSlots(duration: number, date: CalendarDate | undefined): string[] {\n\t\tif (!date || !workingHours || !availableHours) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst dateStr = date.toString();\n\t\tconst dayWorkingHours = workingHours[dateStr];\n\t\tconst dayAvailableHours = availableHours[dateStr];\n\n\t\t// Add check for slots existence\n\t\tif (\n\t\t\t!dayWorkingHours ||\n\t\t\t!dayWorkingHours.isOpen ||\n\t\t\t!dayAvailableHours ||\n\t\t\t!dayAvailableHours.slots\n\t\t) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst slots: string[] = [];\n\t\tconst now = new Date();\n\t\tconst today = new CalendarDate(now.getFullYear(), now.getMonth() + 1, now.getDate());\n\t\tconst isToday = date.compare(today) === 0;\n\n\t\tfor (const slot of dayAvailableHours.slots) {\n\t\t\tconst [startHour, startMinute] = slot.startTime.split(':').map(Number);\n\t\t\tconst [endHour, endMinute] = slot.endTime.split(':').map(Number);\n\n\t\t\tlet startTotalMinutes = startHour * 60 + startMinute;\n\t\t\tconst endTotalMinutes = endHour * 60 + endMinute;\n\n\t\t\t// Apply 2-hour buffer for today's appointments\n\t\t\tif (isToday) {\n\t\t\t\tconst currentMinutes = now.getHours() * 60 + now.getMinutes();\n\t\t\t\tconst minimumStartMinutes = currentMinutes + 120;\n\t\t\t\tstartTotalMinutes = Math.max(startTotalMinutes, minimumStartMinutes);\n\t\t\t}\n\n\t\t\t// Generate 15-minute increments within this available slot\n\t\t\tfor (let minutes = startTotalMinutes; minutes < endTotalMinutes; minutes += 15) {\n\t\t\t\tconst slotEndMinutes = minutes + duration;\n\n\t\t\t\t// Check if the full duration fits within the available slot\n\t\t\t\tif (slotEndMinutes <= endTotalMinutes) {\n\t\t\t\t\tconst hour = Math.floor(minutes / 60);\n\t\t\t\t\tconst minute = minutes % 60;\n\t\t\t\t\tconst timeStr = `${String(hour).padStart(2, '0')}:${String(minute).padStart(2, '0')}`;\n\t\t\t\t\tslots.push(timeStr);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn slots;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: getTotalDuration\nDoc: \nCode:\n\tfunction getTotalDuration() {\n\t\treturn selectedServices.reduce(\n\t\t\t(total, service: Service) => total + service.duration_minutes,\n\t\t\t0\n\t\t);\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: getTotalPrice\nDoc: \nCode:\n\tfunction getTotalPrice() {\n\t\treturn selectedServices.reduce((total, service: Service) => total + service.price, 0);\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: toggleService\nDoc: \nCode:\n\tfunction toggleService(service: any) {\n\t\tconst index = selectedServices.findIndex((s) => s.id === service.id);\n\t\tconst wasSelected = index >= 0;\n\n\t\tif (wasSelected) {\n\t\t\tselectedServices = selectedServices.filter((s) => s.id !== service.id);\n\t\t} else {\n\t\t\tselectedServices = [...selectedServices, service];\n\t\t}\n\n\t\t// Clear selected date and time when services change, as they may no longer be valid\n\t\tselectedTime = null;\n\t\tselectedDate = undefined;\n\n\t\t// Re-fetch available hours when services change and we're on step 2\n\t\tif (currentStep === 2) {\n\t\t\t// Clear the cache to force refetch with new duration\n\t\t\tavailableHoursCache.clear();\n\t\t\tif (selectedDate) {\n\t\t\t\tfetchHoursForMonth(selectedDate);\n\t\t\t}\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: isServiceSelected\nDoc: \nCode:\n\tfunction isServiceSelected(service: any) {\n\t\treturn selectedServices.some((s) => s.id === service.id);\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: generateAllTimeSlots\nDoc: \nCode:\n\tfunction generateAllTimeSlots(\n\t\tduration: number,\n\t\tdate: CalendarDate | undefined\n\t): Array<{ time: string; type: 'available' | 'unavailable' }> {\n\t\tif (!date || !workingHours) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst dateStr = date.toString();\n\t\tconst dayWorkingHours = workingHours[dateStr];\n\n\t\tif (!dayWorkingHours || !dayWorkingHours.isOpen) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst allSlots: Array<{ time: string; type: 'available' | 'unavailable' }> = [];\n\t\tconst [startHour, startMinute] = dayWorkingHours.startTime.split(':').map(Number);\n\t\tconst [endHour, endMinute] = dayWorkingHours.endTime.split(':').map(Number);\n\n\t\tlet startTotalMinutes = startHour * 60 + startMinute;\n\t\tconst endTotalMinutes = endHour * 60 + endMinute;\n\n\t\tconst now = new Date();\n\t\tconst today = new CalendarDate(now.getFullYear(), now.getMonth() + 1, now.getDate());\n\t\tconst isToday = date.compare(today) === 0;\n\n\t\t// Apply 2-hour buffer for today's appointments\n\t\tif (isToday) {\n\t\t\tconst currentMinutes = now.getHours() * 60 + now.getMinutes();\n\t\t\tconst minimumStartMinutes = currentMinutes + 120;\n\t\t\tstartTotalMinutes = Math.max(startTotalMinutes, minimumStartMinutes);\n\t\t}\n\n\t\t// Get available time slots that fit our duration\n\t\tconst availableSlots = generateAvailableTimeSlots(duration, date);\n\n\t\t// Generate all 15-minute increments within working hours\n\t\tfor (let minutes = startTotalMinutes; minutes < endTotalMinutes; minutes += 15) {\n\t\t\tconst hour = Math.floor(minutes / 60);\n\t\t\tconst minute = minutes % 60;\n\t\t\tconst timeStr = `${String(hour).padStart(2, '0')}:${String(minute).padStart(2, '0')}`;\n\n\t\t\t// Check if this time slot is available (fits duration and within available hours)\n\t\t\tconst isAvailable = availableSlots.includes(timeStr);\n\n\t\t\tallSlots.push({\n\t\t\t\ttime: timeStr,\n\t\t\t\ttype: isAvailable ? 'available' : 'unavailable'\n\t\t\t});\n\t\t}\n\n\t\treturn allSlots;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: formatDuration\nDoc: \nCode:\n\tfunction formatDuration(minutes: number): string {\n\t\tconst hours = Math.floor(minutes / 60);\n\t\tconst remainingMinutes = minutes % 60;\n\n\t\tif (hours === 0) {\n\t\t\treturn `${remainingMinutes} minutes`;\n\t\t} else if (remainingMinutes === 0) {\n\t\t\treturn `${hours} ${hours === 1 ? 'hour' : 'hours'}`;\n\t\t} else {\n\t\t\treturn `${hours} ${hours === 1 ? 'hour' : 'hours'} ${remainingMinutes} minutes`;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: getDayWithOrdinal\nDoc: \nCode:\n\tfunction getDayWithOrdinal(date: CalendarDate): string {\n\t\tconst monthName = new Date(date.year, date.month - 1, date.day).toLocaleDateString('en-GB', {\n\t\t\tmonth: 'long'\n\t\t});\n\t\tconst day = date.day;\n\t\tif (day > 3 && day < 21) return monthName + ' ' + day + 'th';\n\t\tswitch (day % 10) {\n\t\t\tcase 1:\n\t\t\t\treturn monthName + ' ' + day + 'st';\n\t\t\tcase 2:\n\t\t\t\treturn monthName + ' ' + day + 'nd';\n\t\t\tcase 3:\n\t\t\t\treturn monthName + ' ' + day + 'rd';\n\t\t\tdefault:\n\t\t\t\treturn monthName + ' ' + day + 'th';\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: nextStep\nDoc: \nCode:\n\tfunction nextStep() {\n\t\tif (currentStep < 4) {\n\t\t\tcurrentStep++;\n\t\t\tsetTimeout(() => {\n\t\t\t\twindow.scrollTo({ top: 0, behavior: 'smooth' });\n\t\t\t}, 50);\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: prevStep\nDoc: \nCode:\n\tfunction prevStep() {\n\t\tif (currentStep > 1) {\n\t\t\tcurrentStep--;\n\t\t\tsetTimeout(() => {\n\t\t\t\twindow.scrollTo({ top: 0, behavior: 'smooth' });\n\t\t\t}, 50);\n\n\t\t\t// Re-fetch available hours when returning to step 2\n\t\t\tif (currentStep === 2 && selectedDate) {\n\t\t\t\tconst monthKey = `${selectedDate.year}-${String(selectedDate.month).padStart(2, '0')}`;\n\t\t\t\tavailableHoursCache.delete(monthKey); // Force refetch\n\t\t\t\tfetchHoursForMonth(selectedDate);\n\t\t\t}\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: function\nName: handleBooking\nDoc: \nCode:\n\tfunction handleBooking() {\n\t\talert('Booking submitted! (This is just a prototype - no backend connected yet)');\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte\nType: markup\n<div class=\"mx-auto max-w-4xl p-6\">\n\t<div class=\"mb-8 text-center\">\n\t\t<h1 class=\"mb-2 text-3xl font-bold\">Book Your Appointment</h1>\n\t\t<p class=\"text-gray-600\">Professional beauty treatments in a calm and friendly environment</p>\n\t</div>\n\n\t<!-- Progress Indicator -->\n\t<div class=\"mb-8 grid grid-cols-2 gap-4 md:flex md:items-center md:justify-center md:space-x-4\">\n\t\t{#each ['Service', 'Date & Time', 'Details', 'Payment'] as step, index}\n\t\t\t<div class=\"flex items-center justify-start md:justify-center\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"flex h-8 w-8 items-center justify-center rounded-full text-sm font-medium {index +\n\t\t\t\t\t\t1 <=\n\t\t\t\t\tcurrentStep\n\t\t\t\t\t\t? 'bg-primary text-primary-foreground'\n\t\t\t\t\t\t: 'bg-gray-200 text-gray-600'}\"\n\t\t\t\t>\n\t\t\t\t\t{index + 1}\n\t\t\t\t</div>\n\t\t\t\t<span\n\t\t\t\t\tclass=\"ml-2 text-sm font-medium {index + 1 <= currentStep\n\t\t\t\t\t\t? 'text-primary'\n\t\t\t\t\t\t: 'text-gray-600'}\"\n\t\t\t\t>\n\t\t\t\t\t{step}\n\t\t\t\t</span>\n\t\t\t\t{#if index < 3}\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"mx-4 hidden h-0.5 w-8 md:block {index + 1 < currentStep\n\t\t\t\t\t\t\t? 'bg-primary'\n\t\t\t\t\t\t\t: 'bg-gray-200'}\"\n\t\t\t\t\t></div>\n\t\t\t\t{/if}\n\t\t\t</div>\n\t\t{/each}\n\t</div>\n\n\t<!-- Step 1: Service Selection -->\n\t{#if currentStep === 1}\n\t\t<Card.Root>\n\t\t\t<Card.Header>\n\t\t\t\t<Card.Title>Choose Your Services</Card.Title>\n\t\t\t\t<Card.Description>Select one or more treatments for your appointment</Card.Description>\n\t\t\t</Card.Header>\n\t\t\t<Card.Content class=\"space-y-4\">\n\t\t\t\t<div class=\"grid w-full grid-cols-1 gap-4 md:grid-cols-2\">\n\t\t\t\t\t{#if servicesLoading}\n\t\t\t\t\t\t<p>Loading services...</p>\n\t\t\t\t\t{:else if services.length === 0}\n\t\t\t\t\t\t<p>No services available at the moment.</p>\n\t\t\t\t\t{:else}\n\t\t\t\t\t\t{#each services as service}\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tclass=\"focus:ring-primary cursor-pointer rounded-lg p-4 text-left shadow-sm transition-colors hover:bg-fuchsia-50 {isServiceSelected(\n\t\t\t\t\t\t\t\t\tservice\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t? 'bg-fuchsia-100'\n\t\t\t\t\t\t\t\t\t: 'border-ring'}\"\n\t\t\t\t\t\t\t\tonclick={() => toggleService(service)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div class=\"flex items-start justify-between\">\n\t\t\t\t\t\t\t\t\t<div class=\"flex-1\">\n\t\t\t\t\t\t\t\t\t\t<h3 class=\"font-semibold\">{service.name}</h3>\n\t\t\t\t\t\t\t\t\t\t<p class=\"text-sm text-gray-600\">{service.description}</p>\n\t\t\t\t\t\t\t\t\t\t<div class=\"mt-2 flex items-center space-x-4 text-sm text-gray-500\">\n\t\t\t\t\t\t\t\t\t\t\t<span>{service.duration_minutes} mins</span>\n\t\t\t\t\t\t\t\t\t\t\t<span>\u00a3{service.price}</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclass=\"ml-3 flex h-5 w-5 items-center justify-center rounded border-2 {isServiceSelected(\n\t\t\t\t\t\t\t\t\t\t\tservice\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t? 'border-primary bg-primary'\n\t\t\t\t\t\t\t\t\t\t\t: 'border-gray-300'}\"\n\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{#if isServiceSelected(service)}\n\t\t\t\t\t\t\t\t\t\t\t<svg class=\"h-3 w-3 text-white\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\tfill-rule=\"evenodd\"\n\t\t\t\t\t\t\t\t\t\t\t\t\td=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclip-rule=\"evenodd\"\n\t\t\t\t\t\t\t\t\t\t\t\t></path>\n\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t{/if}\n\t\t\t\t</div>\n\n\t\t\t\t{#if selectedServices.length > 0}\n\t\t\t\t\t<div class=\"rounded-lg bg-gray-50 p-4\">\n\t\t\t\t\t\t<h4 class=\"mb-2 font-semibold\">Selected Services</h4>\n\t\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t\t{#each selectedServices as service}\n\t\t\t\t\t\t\t\t<div class=\"flex justify-between text-sm\">\n\t\t\t\t\t\t\t\t\t<span>{service.name}</span>\n\t\t\t\t\t\t\t\t\t<span>{service.duration_minutes} mins \u2022 \u00a3{service.price}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t<Separator class=\"my-2\" />\n\t\t\t\t\t\t\t<div class=\"flex justify-between text-sm font-semibold\">\n\t\t\t\t\t\t\t\t<span>Estimated Duration:</span>\n\t\t\t\t\t\t\t\t<span>{formattedTotalDuration}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"flex justify-between text-sm font-semibold\">\n\t\t\t\t\t\t\t\t<span>Total Cost:</span>\n\t\t\t\t\t\t\t\t<span>\u00a3{getTotalPrice()}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t{/if}\n\t\t\t</Card.Content>\n\t\t\t<Card.Footer class=\"flex justify-end\">\n\t\t\t\t<Button disabled={!canProceedStep1} onclick={nextStep}>Next: Select Date & Time</Button>\n\t\t\t</Card.Footer>\n\t\t</Card.Root>\n\t{/if}\n\n\t<!-- Step 2: Date & Time Selection -->\n\t{#if currentStep === 2}\n\t\t<Card.Root>\n\t\t\t<Card.Header>\n\t\t\t\t<Card.Title>Choose Date & Time</Card.Title>\n\t\t\t\t<Card.Description>\n\t\t\t\t\t{selectedServices.map((s) => s.name).join(', ')} \u2022 {formattedTotalDuration} total \u2022 \u00a3{getTotalPrice()}\n\t\t\t\t</Card.Description>\n\t\t\t</Card.Header>\n\t\t\t<Card.Content class=\"p-0\">\n\t\t\t\t<Card.Root class=\"gap-0 border-0 p-0\">\n\t\t\t\t\t<Card.Content class=\"relative p-0 md:pr-56\">\n\t\t\t\t\t\t<div class=\"flex items-center justify-center p-6\">\n\t\t\t\t\t\t\t<Calendar\n\t\t\t\t\t\t\t\ttype=\"single\"\n\t\t\t\t\t\t\t\tbind:value={selectedDate}\n\t\t\t\t\t\t\t\tbind:placeholder\n\t\t\t\t\t\t\t\t{isDateUnavailable}\n\t\t\t\t\t\t\t\tclass=\"data-unavailable:line-through data-unavailable:opacity-100 bg-transparent p-0 [--cell-size:--spacing(10)] md:[--cell-size:--spacing(12)] [&_[data-outside-month]]:pointer-events-none [&_[data-outside-month]]:opacity-0\"\n\t\t\t\t\t\t\t\tweekdayFormat=\"short\"\n\t\t\t\t\t\t\t\tminValue={minDate}\n\t\t\t\t\t\t\t\tmaxValue={maxCalendarDate}\n\t\t\t\t\t\t\t\tlocale=\"en-GB\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"no-scrollbar inset-y-0 right-0 flex max-h-48 w-full scroll-pb-6 flex-col gap-4 overflow-y-auto border-t p-6 md:absolute md:max-h-none md:w-56 md:border-l md:border-t-0\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{#if (loadingWorkingHours || loadingAvailableHours) && selectedDate}\n\t\t\t\t\t\t\t\t<div class=\"text-center text-sm text-gray-500\">Loading available times...</div>\n\t\t\t\t\t\t\t{:else if groupedTimeSlots.length > 0}\n\t\t\t\t\t\t\t\t{#if selectedDate}\n\t\t\t\t\t\t\t\t\t<div class=\"grid justify-center gap-2\">{getDayWithOrdinal(selectedDate)}</div>\n\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t<!-- Grouped Time Slots Grid - ORIGINAL STYLING BUT WITH GROUPED UNAVAILABLE SLOTS -->\n\t\t\t\t\t\t\t\t<div class=\"grid gap-2\">\n\t\t\t\t\t\t\t\t\t{#each groupedTimeSlots as slot (slot.startTime)}\n\t\t\t\t\t\t\t\t\t\t{#if slot.type === 'available'}\n\t\t\t\t\t\t\t\t\t\t\t<!-- Available slot - individual button -->\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\tonclick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tselectedTime = slot.startTime;\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tclass={`w-full hover:bg-fuchsia-50 ${\n\t\t\t\t\t\t\t\t\t\t\t\t\tslot.startTime === selectedTime ? 'bg-fuchsia-100' : ''\n\t\t\t\t\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{formatTime(slot.startTime)}\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"text-gray-500\">- {formatTime(slot.endTime)}</span>\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t\t\t\t<!-- Unavailable slot - grouped block -->\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"w-full cursor-not-allowed opacity-50 hover:bg-gray-100\"\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{formatTime(slot.startTime)}\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"text-gray-500\">- {formatTime(slot.endTime)}</span>\n\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{:else if selectedServices.length === 0}\n\t\t\t\t\t\t\t\t<p class=\"text-center text-sm text-gray-500\">Select services first</p>\n\t\t\t\t\t\t\t{:else if !selectedDate}\n\t\t\t\t\t\t\t\t<p class=\"text-center text-sm text-gray-500\">Select a date first</p>\n\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t<p class=\"text-center text-sm text-gray-500\">No available slots</p>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Card.Content>\n\t\t\t\t</Card.Root>\n\t\t\t</Card.Content>\n\n\t\t\t<!-- Mobile appointment summary - shown only on mobile -->\n\t\t\t<div class=\"border-t px-6 py-4 text-center text-sm md:hidden\">\n\t\t\t\t{#if selectedDate && selectedTime}\n\t\t\t\t\tAppointment for\n\t\t\t\t\t<span class=\"font-medium\">\n\t\t\t\t\t\t{selectedDate.toDate(getLocalTimeZone()).toLocaleDateString('en-US', {\n\t\t\t\t\t\t\tweekday: 'long',\n\t\t\t\t\t\t\tday: 'numeric',\n\t\t\t\t\t\t\tmonth: 'short'\n\t\t\t\t\t\t})}\n\t\t\t\t\t</span>\n\t\t\t\t\t<br />at <span class=\"font-medium\">{formatTime(selectedTime)}</span>\n\t\t\t\t{:else}\n\t\t\t\t\tSelect a date and time\n\t\t\t\t{/if}\n\t\t\t</div>\n\n\t\t\t<Card.Footer class=\"flex justify-between border-t !py-5 px-6\">\n\t\t\t\t<Button variant=\"outline\" onclick={prevStep}>Back</Button>\n\t\t\t\t<div class=\"flex items-center space-x-4\">\n\t\t\t\t\t<!-- Desktop appointment summary - hidden on mobile -->\n\t\t\t\t\t<div class=\"hidden text-sm md:block\">\n\t\t\t\t\t\t{#if selectedDate && selectedTime}\n\t\t\t\t\t\t\tAppointment for\n\t\t\t\t\t\t\t<span class=\"font-medium\">\n\t\t\t\t\t\t\t\t{selectedDate.toDate(getLocalTimeZone()).toLocaleDateString('en-US', {\n\t\t\t\t\t\t\t\t\tweekday: 'long',\n\t\t\t\t\t\t\t\t\tday: 'numeric',\n\t\t\t\t\t\t\t\t\tmonth: 'short'\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\tat <span class=\"font-medium\">{formatTime(selectedTime)}</span>\n\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\tSelect a date and time\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t</div>\n\t\t\t\t\t<Button disabled={!canProceedStep2} onclick={nextStep}>Next: Your Details</Button>\n\t\t\t\t</div>\n\t\t\t</Card.Footer>\n\t\t</Card.Root>\n\t{/if}\n\n\t<!-- Step 3: Customer Details -->\n\t{#if currentStep === 3}\n\t\t<Card.Root>\n\t\t\t<Card.Header>\n\t\t\t\t<Card.Title>Your Details</Card.Title>\n\t\t\t\t<Card.Description>Please provide your contact information</Card.Description>\n\t\t\t</Card.Header>\n\t\t\t<Card.Content class=\"space-y-6\">\n\t\t\t\t<!-- Booking Summary -->\n\t\t\t\t<div class=\"rounded-lg bg-gray-50 p-4\">\n\t\t\t\t\t<h4 class=\"mb-2 font-semibold\">Booking Summary</h4>\n\t\t\t\t\t<div class=\"space-y-1 text-sm\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<span class=\"font-medium\">Services:</span>\n\t\t\t\t\t\t\t<div class=\"ml-4 mt-1 space-y-1\">\n\t\t\t\t\t\t\t\t{#each selectedServices as service}\n\t\t\t\t\t\t\t\t\t<div class=\"flex justify-between\">\n\t\t\t\t\t\t\t\t\t\t<span>{service.name}</span>\n\t\t\t\t\t\t\t\t\t\t<span>\u00a3{service.price}</span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"flex justify-between\">\n\t\t\t\t\t\t\t<span>Date:</span>\n\t\t\t\t\t\t\t<span class=\"font-medium\">\n\t\t\t\t\t\t\t\t{selectedDate?.toDate(getLocalTimeZone()).toLocaleDateString('en-US', {\n\t\t\t\t\t\t\t\t\tweekday: 'long',\n\t\t\t\t\t\t\t\t\tday: 'numeric',\n\t\t\t\t\t\t\t\t\tmonth: 'long'\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"flex justify-between\">\n\t\t\t\t\t\t\t<span>Time:</span>\n\t\t\t\t\t\t\t<span class=\"font-medium\">{selectedTime}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"flex justify-between\">\n\t\t\t\t\t\t\t<span>Estimated Duration:</span>\n\t\t\t\t\t\t\t<span class=\"font-medium\">{formattedTotalDuration}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<Separator class=\"my-2\" />\n\t\t\t\t\t\t<div class=\"flex justify-between font-semibold\">\n\t\t\t\t\t\t\t<span>Total Cost:</span>\n\t\t\t\t\t\t\t<span>\u00a3{getTotalPrice()}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Contact Form -->\n\t\t\t\t<div class=\"grid gap-4 md:grid-cols-2\">\n\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t<Label for=\"firstName\">First Name *</Label>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tid=\"firstName\"\n\t\t\t\t\t\t\tbind:value={customerInfo.firstName}\n\t\t\t\t\t\t\tplaceholder=\"Enter your first name\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t<Label for=\"lastName\">Last Name *</Label>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tid=\"lastName\"\n\t\t\t\t\t\t\tbind:value={customerInfo.lastName}\n\t\t\t\t\t\t\tplaceholder=\"Enter your last name\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t<Label for=\"email\">Email *</Label>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tid=\"email\"\n\t\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\t\tbind:value={customerInfo.email}\n\t\t\t\t\t\t\tplaceholder=\"Enter your email\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t<Label for=\"phone\">Phone Number *</Label>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tid=\"phone\"\n\t\t\t\t\t\t\ttype=\"tel\"\n\t\t\t\t\t\t\tbind:value={customerInfo.phone}\n\t\t\t\t\t\t\tplaceholder=\"Enter your phone number\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t<Label for=\"requests\">Special Requests (Optional)</Label>\n\t\t\t\t\t<Textarea\n\t\t\t\t\t\tid=\"requests\"\n\t\t\t\t\t\tbind:value={customerInfo.specialRequests}\n\t\t\t\t\t\tplaceholder=\"Any allergies, preferences, or special requirements...\"\n\t\t\t\t\t\trows={3}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"text-sm text-gray-600\">\n\t\t\t\t\t<p>* Required fields</p>\n\t\t\t\t\t<p class=\"mt-2\">\n\t\t\t\t\t\tBy booking, you agree to our Terms & Conditions and Privacy Policy. We'll send you\n\t\t\t\t\t\tappointment reminders via email and SMS.\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</Card.Content>\n\t\t\t<Card.Footer class=\"flex justify-between\">\n\t\t\t\t<Button variant=\"outline\" onclick={prevStep}>Back</Button>\n\t\t\t\t<Button\n\t\t\t\t\tdisabled={!canProceedStep3}\n\t\t\t\t\tonclick={nextStep}\n\t\t\t\t\tclass=\"bg-primary text-primary-foreground\"\n\t\t\t\t>\n\t\t\t\t\tNext: Payment\n\t\t\t\t</Button>\n\t\t\t</Card.Footer>\n\t\t</Card.Root>\n\t{/if}\n\n\t{#if currentStep === 4}\n\t\t<!-- Square Payment Window -->\n\t\t<!-- TODO: Add payment form -->\n\t\t<div class=\"rounded-lg bg-white p-6\">\n\t\t\t<h2 class=\"mb-4 text-2xl font-semibold\">Payment Confirmation</h2>\n\t\t\t<p class=\"text-gray-600\">\n\t\t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus\n\t\t\t\ttortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices\n\t\t\t\tdiam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci\n\t\t\t\tnec nonummy molestie,\n\t\t\t</p>\n\t\t</div>\n\t{/if}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte\nType: function\nName: toggleMode\nDoc: \nCode:\n\tfunction toggleMode() {\n\t\tisLogin = !isLogin;\n\t\tagreedToPolicy = false;\n\t\tformData = {\n\t\t\temail: '',\n\t\t\tpassword: '',\n\t\t\tfirstName: '',\n\t\t\tlastName: '',\n\t\t\tconfirmPassword: '',\n\t\t\tphone: '',\n\t\t\tdateOfBirth: ''\n\t\t};\n\t\tvalidationErrors = {\n\t\t\temail: '',\n\t\t\tphone: '',\n\t\t\tdateOfBirth: ''\n\t\t};\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte\nType: function\nName: validateEmail\nDoc: \nCode:\n\tfunction validateEmail(email: string): boolean {\n\t\t// ASCII-only email regex (safe with most providers)\n\t\tconst asciiRegex = /^[a-zA-Z0-9._%+\\-]+@[a-zA-Z0-9.\\-]+\\.[a-zA-Z]{2,}$/;\n\n\t\t// Unicode-friendly regex (valid per RFC 6531)\n\t\tconst unicodeRegex = /^[\\p{L}\\p{M}0-9._%+-]+@[\\p{L}\\p{M}0-9.-]+\\.[\\p{L}\\p{M}]{2,}$/u;\n\n\t\tif (!email) {\n\t\t\tvalidationErrors.email = '';\n\t\t\treturn true;\n\t\t}\n\n\t\tif (asciiRegex.test(email)) {\n\t\t\t// OK: standard ASCII address\n\t\t\tvalidationErrors.email = '';\n\t\t\treturn true;\n\t\t} else if (unicodeRegex.test(email)) {\n\t\t\t// Looks like a valid internationalised address, but unsupported\n\t\t\tvalidationErrors.email =\n\t\t\t\t'This looks like a valid international email address, ' +\n\t\t\t\t'but our providers only supports standard (A-Z, 0-9) email addresses. ' +\n\t\t\t\t'We are sorry. Please use an ASCII-compatible email.';\n\t\t\treturn false;\n\t\t} else {\n\t\t\t// Not even valid under the Unicode spec\n\t\t\tvalidationErrors.email = 'Invalid email format';\n\t\t\treturn false;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte\nType: function\nName: validatePhone\nDoc: \nCode:\n\tfunction validatePhone(phone: string): boolean {\n\t\tif (!phone) {\n\t\t\tvalidationErrors.phone = '';\n\t\t\treturn true;\n\t\t}\n\n\t\t// Remove spaces, hyphens, parentheses for validation\n\t\tconst cleanPhone = phone.replace(/[\\s\\-()]/g, '');\n\n\t\t// UK phone regex: +44 followed by 10-11 digits, or 0 followed by 10-11 digits\n\t\tconst phoneRegex = /^(\\+44[1-9]\\d{9,10}|0[1-9]\\d{9,10})$/;\n\t\tconst isValid = phoneRegex.test(cleanPhone);\n\t\tvalidationErrors.phone = isValid ? '' : 'Invalid UK phone number';\n\t\treturn isValid;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte\nType: function\nName: formatPhoneInput\nDoc: \nCode:\n\tfunction formatPhoneInput(value: string): string {\n\t\t// Remove all non-digit and non-plus characters\n\t\tlet cleaned = value.replace(/[^\\d+]/g, '');\n\n\t\t// If it starts with +44, format as +44 XXXX XXXXXX\n\t\tif (cleaned.startsWith('+44')) {\n\t\t\tconst digits = cleaned.slice(3);\n\t\t\tif (digits.length <= 4) return `+44 ${digits}`;\n\t\t\tif (digits.length <= 10) return `+44 ${digits.slice(0, 4)} ${digits.slice(4)}`;\n\t\t\treturn `+44 ${digits.slice(0, 4)} ${digits.slice(4, 10)}`;\n\t\t}\n\n\t\t// If it starts with 0, format as 0XXXX XXXXXX\n\t\tif (cleaned.startsWith('0')) {\n\t\t\tif (cleaned.length <= 5) return cleaned;\n\t\t\treturn `${cleaned.slice(0, 5)} ${cleaned.slice(5, 11)}`;\n\t\t}\n\n\t\treturn cleaned;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte\nType: function\nName: handlePhoneInput\nDoc: \nCode:\n\tfunction handlePhoneInput(e: Event) {\n\t\tconst target = e.target as HTMLInputElement;\n\t\tconst cursorPos = target.selectionStart || 0;\n\t\tconst oldLength = formData.phone.length;\n\n\t\tformData.phone = formatPhoneInput(target.value);\n\n\t\t// Adjust cursor position after formatting\n\t\tconst newLength = formData.phone.length;\n\t\tconst diff = newLength - oldLength;\n\n\t\trequestAnimationFrame(() => {\n\t\t\ttarget.setSelectionRange(cursorPos + diff, cursorPos + diff);\n\t\t});\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte\nType: function\nName: validateAge\nDoc: \nCode:\n\tfunction validateAge(dateStr: string): boolean {\n\t\tif (!dateStr) {\n\t\t\tvalidationErrors.dateOfBirth = '';\n\t\t\treturn true;\n\t\t}\n\n\t\tconst dob = new Date(dateStr);\n\t\tconst today = new Date();\n\t\tconst sixteenYearsAgo = new Date(today.getFullYear() - 16, today.getMonth(), today.getDate());\n\n\t\tconst isValid = dob <= sixteenYearsAgo;\n\t\tvalidationErrors.dateOfBirth = isValid\n\t\t\t? ''\n\t\t\t: \"You must be at least 16 years old to register, but you can call for an appointment by clicking 'Contact' at the top of the page.\";\n\t\treturn isValid;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte\nType: function\nName: normalizeFormData\nDoc: \nCode:\n\tfunction normalizeFormData() {\n\t\treturn {\n\t\t\tfirstName: formData.firstName.trim(),\n\t\t\tlastName: formData.lastName.trim(),\n\t\t\temail: formData.email.trim().toLowerCase(),\n\t\t\tpassword: formData.password,\n\t\t\tphone: formData.phone.replace(/[\\s\\-()]/g, ''), // Remove formatting\n\t\t\tdateOfBirth: formData.dateOfBirth.trim(),\n\t\t\tagreedToPolicy: agreedToPolicy\n\t\t};\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte\nType: function\nName: handleSubmit\nDoc: \nCode:\n\tasync function handleSubmit() {\n\t\tif (isLogin) {\n\t\t\t// Login flow with loading toast\n\t\t\tconst loadingToast = toast.loading('Signing in...');\n\n\t\t\ttry {\n\t\t\t\tconst response = await fetch('/api/login', {\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\theaders: { 'Content-Type': 'application/json' },\n\t\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\t\temail: formData.email.trim().toLowerCase(),\n\t\t\t\t\t\tpassword: formData.password\n\t\t\t\t\t})\n\t\t\t\t});\n\n\t\t\t\tif (response.ok) {\n\t\t\t\t\tconst data = await response.json();\n\t\t\t\t\tlocalStorage.setItem('authToken', data.token);\n\t\t\t\t\ttoast.success('Successfully logged in!', { id: loadingToast });\n\t\t\t\t\twindow.location.href = '/';\n\t\t\t\t} else if (response.status === 409) {\n\t\t\t\t\ttoast.error('Login already in progress. Please wait.', { id: loadingToast });\n\t\t\t\t} else if (response.status === 401) {\n\t\t\t\t\ttoast.error('Invalid email or password.', { id: loadingToast });\n\t\t\t\t} else {\n\t\t\t\t\tconst text = await response.text();\n\t\t\t\t\ttoast.error('Error: ' + text, { id: loadingToast });\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error(err);\n\t\t\t\ttoast.error('Network error, please try again later.', { id: loadingToast });\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Validate before submitting\n\t\tconst isEmailValid = validateEmail(formData.email);\n\t\tconst isPhoneValid = validatePhone(formData.phone);\n\t\tconst isAgeValid = validateAge(formData.dateOfBirth);\n\n\t\tif (!isEmailValid || !isPhoneValid || !isAgeValid) {\n\t\t\ttoast.error('Please fix the validation errors before submitting.');\n\t\t\treturn;\n\t\t}\n\n\t\t// Registration flow with loading toast\n\t\tconst loadingToast = toast.loading('Creating your account...');\n\n\t\ttry {\n\t\t\tconst response = await fetch('/api/register', {\n\t\t\t\tmethod: 'POST',\n\t\t\t\theaders: { 'Content-Type': 'application/json' },\n\t\t\t\tbody: JSON.stringify(normalizeFormData())\n\t\t\t});\n\n\t\t\tif (response.ok) {\n\t\t\t\ttoast.success('Account created successfully!', { id: loadingToast });\n\t\t\t\ttoggleMode();\n\t\t\t} else {\n\t\t\t\tconst text = await response.text();\n\t\t\t\ttoast.error('Error: ' + text, { id: loadingToast });\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error(err);\n\t\t\ttoast.error('Network error, please try again later.', { id: loadingToast });\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte\nType: function\nName: handleSocialLogin\nDoc: \nCode:\n\tfunction handleSocialLogin(provider: string) {\n\t\talert(`${provider} login clicked! (This is just a prototype)`);\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte\nType: markup\n<div class=\"mx-auto flex w-full justify-center p-4 pt-2\">\n\t<div class=\"w-full max-w-md space-y-6\">\n\t\t<!-- Header -->\n\t\t<div class=\"space-y-2 text-center\">\n\t\t\t<h1 class=\"text-2xl font-bold\">\n\t\t\t\t{isLogin ? 'Welcome back' : 'Create account'}\n\t\t\t</h1>\n\t\t\t<p class=\"text-muted-foreground\">\n\t\t\t\t{isLogin\n\t\t\t\t\t? 'Sign in to your account to continue'\n\t\t\t\t\t: 'Choose an option below to create your account'}\n\t\t\t</p>\n\t\t</div>\n\n\t\t<!-- Social Login Buttons -->\n\t\t<div class=\"space-y-3\">\n\t\t\t<Button variant=\"outline\" onclick={() => handleSocialLogin('Google')} class=\"w-full\">\n\t\t\t\t<svg class=\"mr-2\" style=\"width: 1rem; height: 1rem;\" viewBox=\"0 0 24 24\">\n\t\t\t\t\t<path\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\td=\"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\td=\"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\td=\"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\td=\"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\tContinue with Google\n\t\t\t</Button>\n\n\t\t\t<Button variant=\"outline\" onclick={() => handleSocialLogin('Microsoft')} class=\"w-full\">\n\t\t\t\t<svg\n\t\t\t\t\tclass=\"mr-2\"\n\t\t\t\t\tstyle=\"width: 1rem; height: 1rem;\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M11.4 24H0V12.6h11.4V24zM24 24H12.6V12.6H24V24zM11.4 11.4H0V0h11.4v11.4zM24 11.4H12.6V0H24v11.4z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\tContinue with Microsoft\n\t\t\t</Button>\n\n\t\t\t<Button variant=\"outline\" onclick={() => handleSocialLogin('Facebook')} class=\"w-full\">\n\t\t\t\t<svg\n\t\t\t\t\tclass=\"mr-2\"\n\t\t\t\t\tstyle=\"width: 1rem; height: 1rem;\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\tContinue with Facebook\n\t\t\t</Button>\n\t\t</div>\n\n\t\t<div class=\"relative\">\n\t\t\t<div class=\"absolute inset-0 flex items-center\">\n\t\t\t\t<Separator class=\"w-full\" />\n\t\t\t</div>\n\t\t\t<div class=\"relative flex justify-center text-xs uppercase\">\n\t\t\t\t<span class=\"bg-background px-2 text-muted-foreground\">or continue with email</span>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<!-- Email/Password Form -->\n\t\t<form\n\t\t\tonsubmit={(e) => {\n\t\t\t\te.preventDefault();\n\t\t\t\thandleSubmit();\n\t\t\t}}\n\t\t\tclass=\"space-y-4\"\n\t\t>\n\t\t\t{#if !isLogin}\n\t\t\t\t<!-- Registration Fields -->\n\t\t\t\t<div class=\"grid grid-cols-2 gap-4\">\n\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t<RequiredLabel forId=\"firstName\" text=\"First Name\" />\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tid=\"firstName\"\n\t\t\t\t\t\t\tplaceholder=\"John\"\n\t\t\t\t\t\t\tbind:value={formData.firstName}\n\t\t\t\t\t\t\tonblur={() => (formData.firstName = formData.firstName.trim())}\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t<RequiredLabel forId=\"lastName\" text=\"Last Name\" />\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tid=\"lastName\"\n\t\t\t\t\t\t\tplaceholder=\"Doe\"\n\t\t\t\t\t\t\tbind:value={formData.lastName}\n\t\t\t\t\t\t\tonblur={() => (formData.lastName = formData.lastName.trim())}\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t<RequiredLabel forId=\"phone\" text=\"Phone Number\" />\n\t\t\t\t\t<Input\n\t\t\t\t\t\tid=\"phone\"\n\t\t\t\t\t\ttype=\"tel\"\n\t\t\t\t\t\tplaceholder=\"07123 456789 or +44 7123 456789\"\n\t\t\t\t\t\tvalue={formData.phone}\n\t\t\t\t\t\toninput={handlePhoneInput}\n\t\t\t\t\t\tonblur={() => validatePhone(formData.phone)}\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t\t{#if validationErrors.phone}\n\t\t\t\t\t\t<p class=\"text-sm text-red-500\">{validationErrors.phone}</p>\n\t\t\t\t\t{/if}\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t<RequiredLabel forId=\"dateOfBirth\" text=\"Date of Birth\" />\n\t\t\t\t\t<Input\n\t\t\t\t\t\tid=\"dateOfBirth\"\n\t\t\t\t\t\ttype=\"date\"\n\t\t\t\t\t\tbind:value={formData.dateOfBirth}\n\t\t\t\t\t\tonblur={() => validateAge(formData.dateOfBirth)}\n\t\t\t\t\t\tmax={new Date(new Date().setFullYear(new Date().getFullYear() - 16))\n\t\t\t\t\t\t\t.toISOString()\n\t\t\t\t\t\t\t.split('T')[0]}\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t\t{#if validationErrors.dateOfBirth}\n\t\t\t\t\t\t<p class=\"text-sm text-red-500\">{validationErrors.dateOfBirth}</p>\n\t\t\t\t\t{/if}\n\t\t\t\t</div>\n\t\t\t{/if}\n\n\t\t\t<div class=\"space-y-2\">\n\t\t\t\t<RequiredLabel forId=\"email\" text=\"Email\" />\n\t\t\t\t<Input\n\t\t\t\t\tid=\"email\"\n\t\t\t\t\ttype=\"email\"\n\t\t\t\t\tplaceholder=\"john@example.com\"\n\t\t\t\t\tbind:value={formData.email}\n\t\t\t\t\tonblur={() => validateEmail(formData.email)}\n\t\t\t\t\trequired\n\t\t\t\t/>\n\t\t\t\t{#if validationErrors.email}\n\t\t\t\t\t<p class=\"text-sm text-red-500\">{validationErrors.email}</p>\n\t\t\t\t{/if}\n\t\t\t</div>\n\n\t\t\t<div class=\"space-y-2\">\n\t\t\t\t<RequiredLabel forId=\"password\" text=\"Password\" />\n\t\t\t\t<Input\n\t\t\t\t\tid=\"password\"\n\t\t\t\t\ttype=\"password\"\n\t\t\t\t\tplaceholder=\"Enter your password\"\n\t\t\t\t\tbind:value={formData.password}\n\t\t\t\t\trequired\n\t\t\t\t/>\n\n\t\t\t\t{#if !isLogin && passwordStrength}\n\t\t\t\t\t<!-- Strength meter bar -->\n\t\t\t\t\t<div class=\"mt-1\">\n\t\t\t\t\t\t<div class=\"h-2 overflow-hidden rounded bg-gray-200\">\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"h-2 transition-all\"\n\t\t\t\t\t\t\t\tstyle=\"\n                  width: {(passwordStrength.score + 1) * 20}%;\n                  background-color: {passwordStrength.score < 2\n\t\t\t\t\t\t\t\t\t? 'var(--chart-1)'\n\t\t\t\t\t\t\t\t\t: passwordStrength.score === 2\n\t\t\t\t\t\t\t\t\t\t? 'orange'\n\t\t\t\t\t\t\t\t\t\t: passwordStrength.score === 3\n\t\t\t\t\t\t\t\t\t\t\t? 'var(--chart-2)'\n\t\t\t\t\t\t\t\t\t\t\t: 'var(--chart-2)'};\n                \"\n\t\t\t\t\t\t\t></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<p class=\"mt-1 text-xs\">\n\t\t\t\t\t\t\t{passwordStrength.feedback.warning\n\t\t\t\t\t\t\t\t? passwordStrength.feedback.warning\n\t\t\t\t\t\t\t\t: `Strength: ${['Very weak', 'Weak', 'Fair', 'Strong', 'Very strong'][passwordStrength.score]}`}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t{#if passwordStrength.feedback.suggestions.length > 0}\n\t\t\t\t\t\t\t<ul class=\"mt-1 ml-4 list-disc text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t{#each passwordStrength.feedback.suggestions as suggestion}\n\t\t\t\t\t\t\t\t\t<li>{suggestion}</li>\n\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t</div>\n\t\t\t\t{/if}\n\t\t\t</div>\n\n\t\t\t{#if !isLogin}\n\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t<RequiredLabel forId=\"confirmPassword\" text=\"Confirm Password\" />\n\t\t\t\t\t<Input\n\t\t\t\t\t\tid=\"confirmPassword\"\n\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\tplaceholder=\"Confirm your password\"\n\t\t\t\t\t\tbind:value={formData.confirmPassword}\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t\t{#if formData.confirmPassword && formData.password !== formData.confirmPassword}\n\t\t\t\t\t\t<p class=\"mt-1 text-sm text-red-500\">Passwords do not match</p>\n\t\t\t\t\t{/if}\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"flex items-center space-x-2\">\n\t\t\t\t\t<Checkbox id=\"privacy\" bind:checked={agreedToPolicy} class=\"mt-1\" />\n\t\t\t\t\t<div class=\"text-sm leading-snug\">\n\t\t\t\t\t\t<Label for=\"privacy\">\n\t\t\t\t\t\t\tI agree to the\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref=\"/terms\"\n\t\t\t\t\t\t\t\tclass=\"font-semibold text-primary hover:underline\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\">Terms & Conditions</a\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\tand\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref=\"/privacy\"\n\t\t\t\t\t\t\t\tclass=\"font-semibold text-primary hover:underline\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\">Privacy Policy</a\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t</Label>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t{/if}\n\n\t\t\t<Button type=\"submit\" class=\"w-full\" disabled={!isFormComplete}>\n\t\t\t\t{isLogin ? 'Sign In' : 'Create Account'}\n\t\t\t</Button>\n\t\t</form>\n\n\t\t<div class=\"text-center text-sm text-muted-foreground\">\n\t\t\t{isLogin ? \"Don't have an account?\" : 'Already have an account?'}\n\t\t\t<Button variant=\"link\" onclick={toggleMode} class=\"px-1 font-semibold text-primary\">\n\t\t\t\t{isLogin ? 'Sign up' : 'Sign in'}\n\t\t\t</Button>\n\t\t</div>\n\t</div>\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/prices/+page.svelte\nType: type\nName: Service\nDoc: \nCode:\n\ttype Service = {\n\t\tid: string;\n\t\tname: string;\n\t\tdescription: string;\n\t\tprice: number;\n\t\tduration_minutes: number;\n\t\tpatch_test_duration_hours: number;\n\t\tminimum_age_required: number;\n\t};\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/prices/+page.svelte\nType: function\nName: fetchServices\nDoc: \nCode:\n\tasync function fetchServices() {\n\t\tservicesLoading = true;\n\t\ttry {\n\t\t\tconst response = await fetch('/api/services', {\n\t\t\t\tmethod: 'GET',\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tAuthorization: `Bearer ${authStore.currentToken}`\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (response.ok) {\n\t\t\t\tconst data: Service[] = await response.json();\n\t\t\t\tservices = data;\n\t\t\t} else {\n\t\t\t\tconsole.error('Failed to fetch services:', response.status);\n\t\t\t\ttoast.error('Failed to load services');\n\t\t\t\t// Fallback to empty array\n\t\t\t\tservices = [];\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error('Error fetching services:', err);\n\t\t\ttoast.error('Network error loading services');\n\t\t\t// Fallback to empty array\n\t\t\tservices = [];\n\t\t} finally {\n\t\t\tservicesLoading = false;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/prices/+page.svelte\nType: function\nName: formatDuration\nDoc: \nCode:\n\tfunction formatDuration(minutes: number): string {\n\t\tconst hours = Math.floor(minutes / 60);\n\t\tconst remainingMinutes = minutes % 60;\n\n\t\tif (hours === 0) {\n\t\t\treturn `${remainingMinutes} minutes`;\n\t\t} else if (remainingMinutes === 0) {\n\t\t\treturn `${hours} ${hours === 1 ? 'hour' : 'hours'}`;\n\t\t} else {\n\t\t\treturn `${hours} ${hours === 1 ? 'hour' : 'hours'} ${remainingMinutes} minutes`;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/prices/+page.svelte\nType: function\nName: formatPrice\nDoc: \nCode:\n\tfunction formatPrice(price: number): string {\n\t\treturn `\u00a3${price.toFixed(2)}`;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/prices/+page.svelte\nType: markup\n<div class=\"mx-auto max-w-4xl p-4 md:p-6\">\n\t<div class=\"mb-6 text-center md:mb-8\">\n\t\t<h1 class=\"mb-2 text-2xl font-bold md:text-3xl\">Our Prices</h1>\n\t\t<p class=\"text-gray-600\">Professional beauty treatments with transparent pricing</p>\n\t</div>\n\n\t{#if servicesLoading}\n\t\t<div class=\"flex justify-center py-12\">\n\t\t\t<div class=\"text-center\">\n\t\t\t\t<div class=\"mb-4 text-lg text-gray-600\">Loading services...</div>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"border-primary inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]\"\n\t\t\t\t></div>\n\t\t\t</div>\n\t\t</div>\n\t{:else if services.length === 0}\n\t\t<div class=\"py-12 text-center\">\n\t\t\t<div class=\"mb-4 text-lg text-gray-600\">No services available at the moment.</div>\n\t\t\t<Button href=\"/contact\" variant=\"outline\">Contact Us</Button>\n\t\t</div>\n\t{:else}\n\t\t<div class=\"space-y-4\">\n\t\t\t{#each services as service, index}\n\t\t\t\t<!-- Service item layout -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"border-muted/40 bg-secondary/50 hover:bg-secondary/80 rounded-lg border p-4 transition-colors\"\n\t\t\t\t>\n\t\t\t\t\t<div class=\"flex items-start justify-between\">\n\t\t\t\t\t\t<div class=\"min-w-0 flex-1\">\n\t\t\t\t\t\t\t<h4 class=\"text-foreground font-semibold\">{service.name}</h4>\n\t\t\t\t\t\t\t<p class=\"text-muted-foreground mt-1 text-sm\">{service.description}</p>\n\t\t\t\t\t\t\t<!-- Duration shown on mobile -->\n\t\t\t\t\t\t\t<p class=\"text-muted-foreground mt-2 text-sm md:hidden\">\n\t\t\t\t\t\t\t\t<span class=\"inline-flex items-center\">\n\t\t\t\t\t\t\t\t\t<svg class=\"text-primary/70 mr-1 h-3 w-3\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\tfill-rule=\"evenodd\"\n\t\t\t\t\t\t\t\t\t\t\td=\"M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V5z\"\n\t\t\t\t\t\t\t\t\t\t\tclip-rule=\"evenodd\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t{formatDuration(service.duration_minutes)}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t{#if service.patch_test_duration_hours > 0}\n\t\t\t\t\t\t\t\t<p class=\"mt-1 text-xs text-amber-600\">\n\t\t\t\t\t\t\t\t\tPatch test required {service.patch_test_duration_hours}h before appointment\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t{#if service.minimum_age_required > 0}\n\t\t\t\t\t\t\t\t<p class=\"mt-1 text-xs text-blue-600\">\n\t\t\t\t\t\t\t\t\tMinimum age: {service.minimum_age_required} years\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ml-4 text-right\">\n\t\t\t\t\t\t\t<!-- Price always visible -->\n\t\t\t\t\t\t\t<div class=\"text-primary text-lg font-semibold\">{formatPrice(service.price)}</div>\n\t\t\t\t\t\t\t<!-- Duration shown on desktop -->\n\t\t\t\t\t\t\t<div class=\"text-muted-foreground hidden text-sm md:block\">\n\t\t\t\t\t\t\t\t{formatDuration(service.duration_minutes)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Separator between services (except last one) -->\n\t\t\t\t{#if index < services.length - 1}\n\t\t\t\t\t<Separator class=\"bg-muted/60\" />\n\t\t\t\t{/if}\n\t\t\t{/each}\n\t\t</div>\n\n\t\t<!-- Important Information -->\n\t\t<Card.Root\n\t\t\tclass=\"mt-6 border-amber-200/60 bg-gradient-to-r from-amber-50 to-amber-100/50 md:mt-8\"\n\t\t>\n\t\t\t<Card.Content class=\"pt-4 md:pt-6\">\n\t\t\t\t<div class=\"space-y-2 text-sm text-amber-900\">\n\t\t\t\t\t<h4 class=\"font-semibold text-amber-800\">Important Information:</h4>\n\t\t\t\t\t<ul class=\"space-y-1 pl-4\">\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\u2022 Prices and durations are estimates and may vary based on individual requirements\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\u2022 Patch tests are required 24-48 hours before certain treatments</li>\n\t\t\t\t\t\t<li>\u2022 24 hours notice required for cancellations</li>\n\t\t\t\t\t\t<li>\u2022 Payment is due at the time of service</li>\n\t\t\t\t\t\t<li>\u2022 Deposit required for new and guest accounts</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</Card.Content>\n\t\t</Card.Root>\n\n\t\t<!-- Call to Action -->\n\t\t<div\n\t\t\tclass=\"from-primary/5 to-secondary/30 mt-6 rounded-xl bg-gradient-to-br p-6 text-center md:mt-8 md:p-8\"\n\t\t>\n\t\t\t<h2 class=\"text-primary mb-4 text-lg font-semibold md:text-xl\">Ready to Book?</h2>\n\t\t\t<div class=\"flex flex-col gap-3 md:flex-row md:justify-center md:gap-4\">\n\t\t\t\t<Button href=\"/book\" class=\"px-6 py-3 md:px-8\">Book Appointment</Button>\n\t\t\t\t<Button\n\t\t\t\t\thref=\"/contact\"\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tclass=\"border-primary/30 hover:bg-primary/10 px-6 py-3 md:px-8\"\n\t\t\t\t>\n\t\t\t\t\tGet in Touch\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t</div>\n\t{/if}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: handleFilesDropped\nDoc: \nCode:\n\tfunction handleFilesDropped(files: File[]) {\n\t\tuploadFiles = files;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: uploadOneOrMany\nDoc: \nCode:\n\tasync function uploadOneOrMany() {\n\t\tif (!uploadFiles.length) return;\n\t\tuploading = true;\n\t\tuploadResults = [];\n\t\tuploadProgress = 0;\n\n\t\tfor (let i = 0; i < uploadFiles.length; i++) {\n\t\t\tconst file = uploadFiles[i];\n\t\t\tconst fd = new FormData();\n\t\t\tfd.append('file', file);\n\n\t\t\ttry {\n\t\t\t\t// Note: API call is mocked here, replace with your actual endpoint\n\t\t\t\t// Mock success/fail\n\t\t\t\tawait new Promise((r) => setTimeout(r, 500)); // Simulate network delay\n\t\t\t\tif (file.name.toLowerCase().includes('fail')) {\n\t\t\t\t\tuploadResults.push({ name: file.name, error: 'Mocked API error' });\n\t\t\t\t} else {\n\t\t\t\t\tuploadResults.push({ name: file.name, url: `/images/${file.name}` });\n\t\t\t\t}\n\t\t\t} catch (err: any) {\n\t\t\t\tuploadResults.push({ name: file.name, error: err?.message || 'Network error' });\n\t\t\t}\n\n\t\t\tuploadProgress = Math.round(((i + 1) / uploadFiles.length) * 100);\n\t\t}\n\n\t\tuploading = false;\n\t\tuploadFiles = [];\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: type\nName: WorkingHourRow\nDoc: \nCode:\n\ttype WorkingHourRow = {\n\t\tid?: number;\n\t\tweekday: number;\n\t\tstart_time: string;\n\t\tend_time: string;\n\t\tis_open: boolean;\n\t};\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: formatTime\nDoc: \nCode:\n\tfunction formatTime(time: string): string {\n\t\tconst [hours, minutes] = time.split(':').map(Number);\n\n\t\t// Special case for 12:00\n\t\tif (hours === 12 && minutes === 0) {\n\t\t\treturn 'Noon';\n\t\t} else if (hours === 0 && minutes === 0) {\n\t\t\treturn 'Midnight';\n\t\t}\n\n\t\tconst period = hours >= 12 ? 'PM' : 'AM';\n\t\tconst displayHours = hours % 12 || 12;\n\t\treturn `${displayHours}:${minutes.toString().padStart(2, '0')} ${period}`;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: timeToInputValue\nDoc: \nCode:\n\tfunction timeToInputValue(time: string): string {\n\t\t// Handle special cases\n\t\tif (time === 'Noon') return '12:00';\n\t\tif (time === 'Midnight') return '00:00';\n\n\t\t// Parse 12-hour format\n\t\tconst match = time.match(/^(\\d{1,2}):(\\d{2})\\s*(AM|PM)$/i);\n\t\tif (!match) return time; // Return as-is if not in expected format\n\n\t\tlet hours = parseInt(match[1]);\n\t\tconst minutes = match[2];\n\t\tconst period = match[3].toUpperCase();\n\n\t\tif (period === 'PM' && hours !== 12) hours += 12;\n\t\tif (period === 'AM' && hours === 12) hours = 0;\n\n\t\treturn `${hours.toString().padStart(2, '0')}:${minutes}`;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: fetchDefaultHours\nDoc: \nCode:\n\tasync function fetchDefaultHours() {\n\t\tif (pageState !== 'authorized') return;\n\n\t\tdefaultHoursIsLoading = true;\n\t\tlet error = null;\n\n\t\ttry {\n\t\t\tconst response = await fetch('/api/scheduling/default-hours', {\n\t\t\t\tmethod: 'GET',\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tAuthorization: `Bearer ${authStore.currentToken}`\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (response.ok) {\n\t\t\t\tconst data = await response.json();\n\t\t\t\tdefaultHours = data.map((hour: any) => ({\n\t\t\t\t\tweekday: hour.weekday,\n\t\t\t\t\tstart_time: formatTime(hour.startTime),\n\t\t\t\t\tend_time: formatTime(hour.endTime),\n\t\t\t\t\tis_open: hour.isOpen\n\t\t\t\t}));\n\t\t\t} else {\n\t\t\t\tconst text = await response.text();\n\t\t\t\terror = 'Failed to load working hours: ' + text;\n\t\t\t\tconsole.error('Error fetching default hours:', text);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\terror = 'Network error: ' + (err instanceof Error ? err.message : 'Unknown error');\n\t\t\tconsole.error('Error fetching default hours:', err);\n\t\t} finally {\n\t\t\tif (error) toast.error(error);\n\t\t\tdefaultHoursIsLoading = false;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: type\nName: ExceptionGroup\nDoc: \nCode:\n\ttype ExceptionGroup = {\n\t\tid?: number;\n\t\tname: string;\n\t\tdescription: string;\n\t\tweekStarts: string[];\n\t\thours: WorkingHourRow[];\n\t};\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: fetchExceptionGroups\nDoc: \nCode:\n\tasync function fetchExceptionGroups() {\n\t\tif (pageState !== 'authorized') return;\n\n\t\texceptionGroupsLoading = true;\n\t\ttry {\n\t\t\tconst response = await fetch('/api/scheduling/exceptional-groups', {\n\t\t\t\tmethod: 'GET',\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tAuthorization: `Bearer ${authStore.currentToken}`\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (response.ok) {\n\t\t\t\tconst data = await response.json();\n\t\t\t\tif (data === null || data.length === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\texceptionGroups = data.map((group: any) => ({\n\t\t\t\t\tid: group.id,\n\t\t\t\t\tname: group.name,\n\t\t\t\t\tdescription: group.description,\n\t\t\t\t\tweekStarts: group.weekStarts || [],\n\t\t\t\t\thours:\n\t\t\t\t\t\tgroup.hours?.map((h: any) => ({\n\t\t\t\t\t\t\tid: h.id,\n\t\t\t\t\t\t\tweekday: h.weekday,\n\t\t\t\t\t\t\tstart_time: formatTime(h.startTime),\n\t\t\t\t\t\t\tend_time: formatTime(h.endTime),\n\t\t\t\t\t\t\tis_open: h.isOpen\n\t\t\t\t\t\t})) || []\n\t\t\t\t}));\n\t\t\t} else {\n\t\t\t\tconsole.error('Failed to fetch exception groups:', response.status);\n\t\t\t\ttoast.error('Failed to load exception groups');\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error('Error fetching exception groups:', err);\n\t\t\ttoast.error('Network error loading exception groups');\n\t\t} finally {\n\t\t\texceptionGroupsLoading = false;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: prepareDefaultHoursEdit\nDoc: \nCode:\n\tfunction prepareDefaultHoursEdit() {\n\t\t// Deep copy the current default hours into the draft state\n\t\tdefaultHoursDraft = JSON.parse(JSON.stringify(defaultHours));\n\t\t// Convert display format back to input format\n\t\tdefaultHoursDraft = defaultHoursDraft.map((row) => ({\n\t\t\t...row,\n\t\t\tstart_time: timeToInputValue(row.start_time),\n\t\t\tend_time: timeToInputValue(row.end_time)\n\t\t}));\n\t\tshowDefaultHoursModal = true;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: confirmSaveDefaultHours\nDoc: \nCode:\n\tasync function confirmSaveDefaultHours() {\n\t\tsavingHours = true;\n\t\tconst loadingToast = toast.loading('Saving default hours...');\n\n\t\ttry {\n\t\t\t// Map snake_case to camelCase for API\n\t\t\tconst payload = defaultHoursDraft.map((hour) => ({\n\t\t\t\tweekday: hour.weekday,\n\t\t\t\tstartTime: hour.start_time,\n\t\t\t\tendTime: hour.end_time,\n\t\t\t\tisOpen: hour.is_open\n\t\t\t}));\n\n\t\t\tconst response = await fetch('/api/scheduling/default-hours', {\n\t\t\t\tmethod: 'PUT',\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tAuthorization: `Bearer ${authStore.currentToken}`\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify(payload)\n\t\t\t});\n\n\t\t\tif (response.ok) {\n\t\t\t\t// Update the main state from the draft state if successful\n\t\t\t\tdefaultHours = JSON.parse(JSON.stringify(defaultHoursDraft));\n\t\t\t\tshowDefaultHoursModal = false;\n\t\t\t\tshowSaveDefaultHoursAlert = false;\n\t\t\t\ttoast.success('Default hours saved successfully!', { id: loadingToast });\n\t\t\t} else if (response.status === 401 || response.status === 403) {\n\t\t\t\ttoast.error('Unauthorized. Please log in again.', { id: loadingToast });\n\t\t\t} else {\n\t\t\t\tconst text = await response.text();\n\t\t\t\ttoast.error('Failed to save: ' + text, { id: loadingToast });\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error('save default hours', err);\n\t\t\ttoast.error('Network error saving hours', { id: loadingToast });\n\t\t} finally {\n\t\t\tsavingHours = false;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: saveExceptionGroup\nDoc: \nCode:\n\tasync function saveExceptionGroup() {\n\t\t// Validate\n\t\tif (!exceptionDraft.name.trim()) {\n\t\t\ttoast.error('Please enter a group name');\n\t\t\treturn;\n\t\t}\n\n\t\tif (exceptionDraft.weekStarts.length === 0) {\n\t\t\ttoast.error('Please add at least one week');\n\t\t\treturn;\n\t\t}\n\n\t\tsavingHours = true;\n\t\tconst loadingToast = toast.loading('Creating exception group...');\n\n\t\ttry {\n\t\t\t// Map to API format\n\t\t\tconst payload = {\n\t\t\t\tname: exceptionDraft.name,\n\t\t\t\tdescription: exceptionDraft.description,\n\t\t\t\tweekStarts: exceptionDraft.weekStarts,\n\t\t\t\thours: exceptionDraft.hours.map((h) => ({\n\t\t\t\t\tweekday: h.weekday,\n\t\t\t\t\tstartTime: h.start_time,\n\t\t\t\t\tendTime: h.end_time,\n\t\t\t\t\tisOpen: h.is_open\n\t\t\t\t}))\n\t\t\t};\n\n\t\t\tconst response = await fetch('/api/scheduling/exceptional-groups', {\n\t\t\t\tmethod: 'POST',\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tAuthorization: `Bearer ${authStore.currentToken}`\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify(payload)\n\t\t\t});\n\n\t\t\tif (response.ok) {\n\t\t\t\ttoast.success('Exception group created successfully!', { id: loadingToast });\n\t\t\t\tshowExceptionModal = false;\n\t\t\t\tresetExceptionForm();\n\t\t\t\tawait fetchExceptionGroups();\n\t\t\t} else {\n\t\t\t\tconst text = await response.text();\n\t\t\t\ttoast.error('Failed to create: ' + text, { id: loadingToast });\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error('Error creating exception group:', err);\n\t\t\ttoast.error('Network error creating exception group', { id: loadingToast });\n\t\t} finally {\n\t\t\tsavingHours = false;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: confirmDeleteExceptionGroup\nDoc: \nCode:\n\tasync function confirmDeleteExceptionGroup() {\n\t\tif (exceptionToDelete === undefined) return;\n\n\t\tconst loadingToast = toast.loading('Deleting exception group...');\n\n\t\ttry {\n\t\t\tconst response = await fetch(`/api/scheduling/exceptional-groups?id=${exceptionToDelete}`, {\n\t\t\t\tmethod: 'DELETE',\n\t\t\t\theaders: {\n\t\t\t\t\tAuthorization: `Bearer ${authStore.currentToken}`\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (response.ok || response.status === 204) {\n\t\t\t\ttoast.success('Exception group deleted successfully!', { id: loadingToast });\n\t\t\t\tshowDeleteExceptionAlert = false;\n\t\t\t\texceptionToDelete = undefined;\n\t\t\t\t// Refresh the exception groups list\n\t\t\t\tawait fetchExceptionGroups();\n\t\t\t} else {\n\t\t\t\tconst text = await response.text();\n\t\t\t\ttoast.error('Failed to delete: ' + text, { id: loadingToast });\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error('Error deleting exception group:', err);\n\t\t\ttoast.error('Network error deleting exception group', { id: loadingToast });\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: openViewExceptionModal\nDoc: \nCode:\n\tfunction openViewExceptionModal(exception: ExceptionGroup) {\n\t\tviewingException = exception;\n\t\tshowViewExceptionModal = true;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: resetExceptionForm\nDoc: \nCode:\n\tfunction resetExceptionForm() {\n\t\texceptionDraft = {\n\t\t\tname: '',\n\t\t\tdescription: '',\n\t\t\tweekStarts: [],\n\t\t\thours: [\n\t\t\t\t{ weekday: 0, start_time: '00:00', end_time: '00:00', is_open: false },\n\t\t\t\t{ weekday: 1, start_time: '09:00', end_time: '17:00', is_open: true },\n\t\t\t\t{ weekday: 2, start_time: '09:00', end_time: '17:00', is_open: true },\n\t\t\t\t{ weekday: 3, start_time: '09:00', end_time: '17:00', is_open: true },\n\t\t\t\t{ weekday: 4, start_time: '12:00', end_time: '20:00', is_open: true },\n\t\t\t\t{ weekday: 5, start_time: '09:00', end_time: '17:00', is_open: true },\n\t\t\t\t{ weekday: 6, start_time: '00:00', end_time: '00:00', is_open: false }\n\t\t\t]\n\t\t};\n\t\tweekRangeFrom = '';\n\t\tweekRangeTo = '';\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: createNewException\nDoc: \nCode:\n\tfunction createNewException() {\n\t\tresetExceptionForm();\n\t\tshowExceptionModal = true;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: addWeekRange\nDoc: \nCode:\n\tfunction addWeekRange() {\n\t\tif (!weekRangeFrom || !weekRangeTo) {\n\t\t\ttoast.error('Please select both start and end dates');\n\t\t\treturn;\n\t\t}\n\n\t\taddWeeksToException(weekRangeFrom, weekRangeTo, exceptionDraft.weekStarts);\n\t\tweekRangeFrom = '';\n\t\tweekRangeTo = '';\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: removeWeek\nDoc: \nCode:\n\tfunction removeWeek(index: number) {\n\t\texceptionDraft.weekStarts = exceptionDraft.weekStarts.filter((_, i) => i !== index);\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: type\nName: User\nDoc: \nCode:\n\ttype User = {\n\t\tid: string;\n\t\tn_first_name: string;\n\t\tn_last_name: string;\n\t\tfn?: string;\n\t\temail?: string;\n\t\tphone?: string;\n\t\tcreated_at?: string;\n\t\tprofile_pic_url?: string;\n\t\tloyalty_stamps?: number;\n\t};\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: type\nName: Booking\nDoc: \nCode:\n\ttype Booking = {\n\t\tid: string;\n\t\tstart_time: string; // ISO 8601\n\t\tstatus:\n\t\t\t| 'pending'\n\t\t\t| 'confirmed'\n\t\t\t| 'in_progress'\n\t\t\t| 'completed'\n\t\t\t| 'client_cancelled'\n\t\t\t| 'we_cancelled'\n\t\t\t| 're-schedule'\n\t\t\t| 'no_show';\n\t\tnotes?: string;\n\t\tcreated_at: string; // ISO 8601\n\t\tupdated_at: string; // ISO 8601\n\t\tcreated_by?: string;\n\n\t\t// Nested user object\n\t\tuser?: {\n\t\t\tid: string;\n\t\t\tfirst_name: string;\n\t\t\tlast_name: string;\n\t\t\tfull_name: string;\n\t\t\temail?: string;\n\t\t\tphone?: string;\n\t\t\tprofile_pic_url?: string;\n\t\t\tdate_of_birth?: string;\n\t\t\taccount_role: string;\n\t\t\tloyalty_stamps?: number;\n\t\t\treferral_code?: string;\n\t\t\treferral_code_uses?: number;\n\t\t\tcreated_at: string;\n\t\t\tnotes?: string;\n\t\t};\n\n\t\t// Services array - always present (backend ensures this)\n\t\tservices: Array<{\n\t\t\tbooking_id: string;\n\t\t\tservice_id: string;\n\t\t\toverride_price?: number;\n\t\t\toverride_duration_minutes?: number;\n\t\t\tservice_name?: string;\n\t\t\tservice_description?: string;\n\t\t\tprice?: number;\n\t\t\tduration_minutes?: number;\n\t\t}>;\n\n\t\t// Payments array\n\t\tpayments: Array<{\n\t\t\tid: string;\n\t\t\tbooking_id: string;\n\t\t\tpayment_type: 'deposit' | 'full' | 'tip' | 'balance' | 'partial';\n\t\t\tpayment_method: 'online_square' | 'in_person_card' | 'cash' | 'giftcard' | 'discount';\n\t\t\tvendor_code?: string;\n\t\t\tinvoice_number?: number;\n\t\t\tstatus: 'pending' | 'completed' | 'failed' | 'refunded';\n\t\t\tamount: number;\n\t\t\tis_vat_applicable: boolean;\n\t\t\tvat_rate?: number;\n\t\t\tvat_amount?: number;\n\t\t\tnet_amount?: number;\n\t\t\tcreated_at: string;\n\t\t\tupdated_at: string;\n\t\t\tcreated_by?: string;\n\t\t}>;\n\n\t\t// Computed/derived fields\n\t\ttotal_amount: number;\n\t\tamount_paid: number;\n\t\tamount_due: number;\n\t\tduration_minutes: number;\n\t};\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: fetchBookings\nDoc: \nCode:\n\tasync function fetchBookings() {\n\t\tif (pageState !== 'authorized') return;\n\t\tloadingSearch = true;\n\t\ttry {\n\t\t\tconst response = await fetch('/api/admin/bookings', {\n\t\t\t\tmethod: 'GET',\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tAuthorization: `Bearer ${authStore.currentToken}`\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (response.ok) {\n\t\t\t\tconst data = await response.json();\n\t\t\t\tconsole.log('Bookings API response:', data); // Debug log\n\n\t\t\t\tif (data.bookings && data.bookings.length === 0) {\n\t\t\t\t\tbookings = [];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Map the response correctly - the backend returns the full Booking objects\n\t\t\t\tbookings = data.bookings.map((b: any) => ({\n\t\t\t\t\tid: b.id,\n\t\t\t\t\tstart_time: b.start_time,\n\t\t\t\t\tstatus: b.status,\n\t\t\t\t\tnotes: b.notes,\n\t\t\t\t\tcreated_at: b.created_at,\n\t\t\t\t\tupdated_at: b.updated_at,\n\t\t\t\t\tcreated_by: b.created_by,\n\t\t\t\t\t// User info is nested under user object\n\t\t\t\t\tuser: b.user\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tid: b.user.id,\n\t\t\t\t\t\t\t\tfull_name: b.user.full_name\n\t\t\t\t\t\t\t\t// Add other user fields if needed\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: undefined,\n\t\t\t\t\t// Services array should be present (even if empty)\n\t\t\t\t\tservices: b.services || [],\n\t\t\t\t\t// Other computed fields from backend\n\t\t\t\t\ttotal_amount: b.total_amount || 0,\n\t\t\t\t\tamount_paid: b.amount_paid || 0,\n\t\t\t\t\tamount_due: b.amount_due || 0,\n\t\t\t\t\tduration_minutes: b.duration_minutes || 0\n\t\t\t\t}));\n\t\t\t\tconsole.log('Mapped bookings:', bookings); // Debug log\n\t\t\t} else {\n\t\t\t\tconst text = await response.text();\n\t\t\t\ttoast.error('Failed to load bookings: ' + text);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error('Error fetching bookings:', err);\n\t\t\ttoast.error('Network error loading bookings');\n\t\t} finally {\n\t\t\tloadingSearch = false;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: searchBookings\nDoc: \nCode:\n\tasync function searchBookings() {\n\t\tif (pageState !== 'authorized') return;\n\t\tloadingSearch = true;\n\n\t\t// If no search query, use the regular get-all endpoint\n\t\tif (!bookingQuery.trim()) {\n\t\t\tawait fetchBookings();\n\t\t\tloadingSearch = false;\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst response = await fetch(\n\t\t\t\t`/api/admin/bookings/search?q=${encodeURIComponent(bookingQuery)}`,\n\t\t\t\t{\n\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\t\tAuthorization: `Bearer ${authStore.currentToken}`\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\tif (response.ok) {\n\t\t\t\tconst data = await response.json();\n\t\t\t\tconsole.log('Search API response:', data); // Debug log\n\n\t\t\t\t// Map the search response correctly (same structure as fetchBookings)\n\t\t\t\tbookings = data.bookings.map((b: any) => ({\n\t\t\t\t\tid: b.id,\n\t\t\t\t\tstart_time: b.start_time,\n\t\t\t\t\tstatus: b.status,\n\t\t\t\t\tnotes: b.notes,\n\t\t\t\t\tcreated_at: b.created_at,\n\t\t\t\t\tupdated_at: b.updated_at,\n\t\t\t\t\tcreated_by: b.created_by,\n\t\t\t\t\tuser: b.user\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tid: b.user.id,\n\t\t\t\t\t\t\t\tfull_name: b.user.full_name\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: undefined,\n\t\t\t\t\tservices: b.services || [],\n\t\t\t\t\ttotal_amount: b.total_amount || 0,\n\t\t\t\t\tamount_paid: b.amount_paid || 0,\n\t\t\t\t\tamount_due: b.amount_due || 0,\n\t\t\t\t\tduration_minutes: b.duration_minutes || 0\n\t\t\t\t}));\n\t\t\t} else {\n\t\t\t\tconst text = await response.text();\n\t\t\t\ttoast.error('Failed to search bookings: ' + text);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error('Error searching bookings:', err);\n\t\t\ttoast.error('Network error searching bookings');\n\t\t} finally {\n\t\t\tloadingSearch = false;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: openBookingModal\nDoc: \nCode:\n\tasync function openBookingModal(bookingId: string) {\n\t\tif (pageState !== 'authorized') return;\n\t\ttry {\n\t\t\tconst response = await fetch(`/api/admin/bookings/${bookingId}`, {\n\t\t\t\tmethod: 'GET',\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tAuthorization: `Bearer ${authStore.currentToken}`\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (response.ok) {\n\t\t\t\tconst data = await response.json();\n\t\t\t\tconsole.log('Booking details API response:', data); // Debug log\n\n\t\t\t\tselectedBooking = {\n\t\t\t\t\tid: data.id,\n\t\t\t\t\tstart_time: data.start_time,\n\t\t\t\t\tstatus: data.status,\n\t\t\t\t\tnotes: data.notes,\n\t\t\t\t\tuser: data.user\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tid: data.user.id,\n\t\t\t\t\t\t\t\tfirst_name: data.user.first_name,\n\t\t\t\t\t\t\t\tlast_name: data.user.last_name,\n\t\t\t\t\t\t\t\tfull_name: data.user.full_name,\n\t\t\t\t\t\t\t\temail: data.user.email,\n\t\t\t\t\t\t\t\tphone: data.user.phone,\n\t\t\t\t\t\t\t\tprofile_pic_url: data.user.profile_pic_url,\n\t\t\t\t\t\t\t\tdate_of_birth: data.user.date_of_birth,\n\t\t\t\t\t\t\t\taccount_role: data.user.account_role,\n\t\t\t\t\t\t\t\tloyalty_stamps: data.user.loyalty_stamps,\n\t\t\t\t\t\t\t\treferral_code: data.user.referral_code,\n\t\t\t\t\t\t\t\treferral_code_uses: data.user.referral_code_uses,\n\t\t\t\t\t\t\t\tcreated_at: data.user.created_at,\n\t\t\t\t\t\t\t\tnotes: data.user.notes\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: undefined,\n\t\t\t\t\tservices: (data.services || []).map((s: any) => ({\n\t\t\t\t\t\tbooking_id: s.booking_id,\n\t\t\t\t\t\tservice_id: s.service_id,\n\t\t\t\t\t\tservice_name: s.service_name,\n\t\t\t\t\t\tservice_description: s.service_description,\n\t\t\t\t\t\tprice: s.price,\n\t\t\t\t\t\tduration_minutes: s.duration_minutes\n\t\t\t\t\t})),\n\t\t\t\t\tpayments: (data.payments || []).map((p: any) => ({\n\t\t\t\t\t\tid: p.id,\n\t\t\t\t\t\tbooking_id: p.booking_id,\n\t\t\t\t\t\tpayment_type: p.payment_type,\n\t\t\t\t\t\tpayment_method: p.payment_method,\n\t\t\t\t\t\tvendor_code: p.vendor_code,\n\t\t\t\t\t\tinvoice_number: p.invoice_number,\n\t\t\t\t\t\tstatus: p.status,\n\t\t\t\t\t\tamount: p.amount,\n\t\t\t\t\t\tis_vat_applicable: p.is_vat_applicable,\n\t\t\t\t\t\tvat_rate: p.vat_rate,\n\t\t\t\t\t\tvat_amount: p.vat_amount,\n\t\t\t\t\t\tnet_amount: p.net_amount,\n\t\t\t\t\t\tcreated_at: p.created_at,\n\t\t\t\t\t\tupdated_at: p.updated_at,\n\t\t\t\t\t\tcreated_by: p.created_by\n\t\t\t\t\t})),\n\t\t\t\t\ttotal_amount: data.total_amount || 0,\n\t\t\t\t\tamount_paid: data.amount_paid || 0,\n\t\t\t\t\tamount_due: data.amount_due || 0,\n\t\t\t\t\tduration_minutes: data.duration_minutes || 0,\n\t\t\t\t\tcreated_at: data.created_at,\n\t\t\t\t\tupdated_at: data.updated_at,\n\t\t\t\t\tcreated_by: data.created_by\n\t\t\t\t};\n\t\t\t\tshowBookingModal = true;\n\t\t\t} else {\n\t\t\t\tconst text = await response.text();\n\t\t\t\ttoast.error('Failed to load booking details: ' + text);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error('Error fetching booking details:', err);\n\t\t\ttoast.error('Network error loading booking details');\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: searchUsers\nDoc: \nCode:\n\tasync function searchUsers() {\n\t\tloadingSearch = true;\n\t\tawait new Promise((r) => setTimeout(r, 500));\n\t\tconst query = userQuery.toLowerCase();\n\t\tusers = [\n\t\t\t{\n\t\t\t\tid: 'user3',\n\t\t\t\tn_first_name: 'Test',\n\t\t\t\tn_last_name: 'Search',\n\t\t\t\temail: 'test@search.com',\n\t\t\t\tphone: '000',\n\t\t\t\tcreated_at: '2025-01-01T00:00:00Z',\n\t\t\t\tloyalty_stamps: 1\n\t\t\t},\n\t\t\t...users\n\t\t].filter(\n\t\t\t(u) =>\n\t\t\t\tu.n_first_name.toLowerCase().includes(query) ||\n\t\t\t\tu.n_last_name.toLowerCase().includes(query) ||\n\t\t\t\tu.email?.toLowerCase().includes(query) ||\n\t\t\t\tu.phone?.includes(query)\n\t\t);\n\t\tloadingSearch = false;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: openUserModal\nDoc: \nCode:\n\tasync function openUserModal(userId: string) {\n\t\tselectedUser = users.find((u) => u.id === userId) || null;\n\t\tif (!selectedUser) return;\n\n\t\t// Filter demo bookings for this user\n\t\tbookingUserHistory = bookings\n\t\t\t.filter((b) => b?.user?.id === userId)\n\t\t\t.sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime());\n\n\t\tshowUserModal = true;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: weekdayLabel\nDoc: \nCode:\n\tfunction weekdayLabel(i: number) {\n\t\treturn dayNames[i];\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: isoDateOf\nDoc: \nCode:\n\tfunction isoDateOf(d: Date) {\n\t\treturn d.toISOString().slice(0, 10);\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: addWeeksToException\nDoc: \nCode:\n\tfunction addWeeksToException(fromISO: string, toISO: string, dest: string[]) {\n\t\tconst from = new Date(fromISO + 'T00:00:00');\n\t\tconst to = new Date(toISO + 'T00:00:00');\n\t\tconst first = new Date(from);\n\t\tconst day = first.getDay();\n\t\tconst daysToMonday = day === 0 ? -6 : 1 - day;\n\n\t\t// Set to the Monday of the current week\n\t\tfirst.setDate(first.getDate() + daysToMonday);\n\n\t\t// Add all Mondays in the range\n\t\tfor (let d = new Date(first); d <= to; d.setDate(d.getDate() + 7)) {\n\t\t\tdest.push(isoDateOf(new Date(d)));\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: type\nName: Service\nDoc: \nCode:\n\ttype Service = {\n\t\tid: string;\n\t\tname: string;\n\t\tdescription: string;\n\t\tprice: number;\n\t\tduration_minutes: number;\n\t\tis_active: boolean;\n\t\tpatch_test_duration_hours: number;\n\t\tminimum_age_required: number;\n\t\tcreated_at: string;\n\t\tupdated_at: string;\n\t\tcreated_by?: string;\n\t\tupdated_by?: string;\n\t};\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: fetchServices\nDoc: \nCode:\n\tasync function fetchServices() {\n\t\tif (pageState !== 'authorized') return;\n\n\t\tservicesLoading = true;\n\t\ttry {\n\t\t\tconst response = await fetch('/api/admin/services', {\n\t\t\t\tmethod: 'GET',\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tAuthorization: `Bearer ${authStore.currentToken}`\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (response.ok) {\n\t\t\t\tconst data = await response.json();\n\t\t\t\tservices = data;\n\t\t\t} else {\n\t\t\t\tconsole.error('Failed to fetch services:', response.status);\n\t\t\t\ttoast.error('Failed to load services');\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error('Error fetching services:', err);\n\t\t\ttoast.error('Network error loading services');\n\t\t} finally {\n\t\t\tservicesLoading = false;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: toggleService\nDoc: \nCode:\n\tasync function toggleService(serviceId: string) {\n\t\tservicesUpdating[serviceId] = true;\n\t\ttry {\n\t\t\tconst response = await fetch(`/api/admin/services/${serviceId}/toggle`, {\n\t\t\t\tmethod: 'PUT',\n\t\t\t\theaders: {\n\t\t\t\t\tAuthorization: `Bearer ${authStore.currentToken}`\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (response.ok) {\n\t\t\t\ttoast.success('Service status updated');\n\t\t\t\t// Refresh the services list\n\t\t\t\tawait fetchServices();\n\t\t\t} else {\n\t\t\t\tconst errorText = await response.text();\n\t\t\t\ttoast.error(`Failed to update service: ${errorText}`);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error('Error toggling service:', err);\n\t\t\ttoast.error('Network error updating service');\n\t\t} finally {\n\t\t\tservicesUpdating[serviceId] = false;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: deleteService\nDoc: \nCode:\n\tasync function deleteService(serviceId: string) {\n\t\tif (!confirm('Are you sure you want to delete this service? This action cannot be undone.')) {\n\t\t\treturn;\n\t\t}\n\n\t\tservicesUpdating[serviceId] = true;\n\n\t\ttry {\n\t\t\tconst response = await fetch(`/api/admin/services/${serviceId}`, {\n\t\t\t\tmethod: 'DELETE',\n\t\t\t\theaders: {\n\t\t\t\t\tAuthorization: `Bearer ${authStore.currentToken}`\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (response.ok) {\n\t\t\t\ttoast.success('Service deleted successfully');\n\t\t\t\t// Refresh the services list\n\t\t\t\tawait fetchServices();\n\t\t\t} else {\n\t\t\t\tconst errorText = await response.text();\n\t\t\t\ttoast.error(`Failed to delete service: ${errorText}`);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error('Error deleting service:', err);\n\t\t\ttoast.error('Network error deleting service');\n\t\t} finally {\n\t\t\tservicesUpdating[serviceId] = false;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: validatePrice\nDoc: \nCode:\n\tfunction validatePrice(price: string): string {\n\t\t// First check if it's a valid number format (allows only digits and one decimal point)\n\t\tconst validFormat = /^\\d*\\.?\\d*$/.test(price);\n\t\tif (!validFormat) {\n\t\t\treturn 'Price must be a valid number (e.g., 4.50)';\n\t\t}\n\n\t\tconst numPrice = parseFloat(price);\n\t\tif (isNaN(numPrice)) {\n\t\t\treturn 'Price must be a valid number';\n\t\t}\n\n\t\tif (numPrice <= 0) {\n\t\t\treturn 'Price must be greater than 0';\n\t\t}\n\n\t\t// Check for exactly 0-2 decimal places\n\t\tconst decimalRegex = /^\\d+(\\.\\d{1,2})?$/;\n\t\tif (!decimalRegex.test(price)) {\n\t\t\treturn 'Price can have up to 2 decimal places';\n\t\t}\n\n\t\treturn '';\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: validateDuration\nDoc: \nCode:\n\tfunction validateDuration(value: number, field: string): string {\n\t\tif (isNaN(value)) {\n\t\t\treturn 'Must be a valid number';\n\t\t}\n\n\t\tif (!Number.isInteger(value)) {\n\t\t\treturn 'Must be a whole number';\n\t\t}\n\n\t\tif (field === 'duration_minutes' && value <= 0) {\n\t\t\treturn 'Duration must be greater than 0';\n\t\t}\n\n\t\tif (field === 'patch_test_duration_hours' && value < 0) {\n\t\t\treturn 'Cannot be negative';\n\t\t}\n\n\t\tif (field === 'minimum_age_required' && (value < 0 || value > 100)) {\n\t\t\treturn 'Must be between 0 and 100';\n\t\t}\n\n\t\treturn '';\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: validateName\nDoc: \nCode:\n\tfunction validateName(name: string): string {\n\t\tif (!name.trim()) {\n\t\t\treturn 'Service name is required';\n\t\t}\n\t\treturn '';\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: updateAllErrors\nDoc: \nCode:\n\tfunction updateAllErrors() {\n\t\tserviceErrors = {\n\t\t\tname: validateName(newService.name),\n\t\t\tprice: validatePrice(newService.price),\n\t\t\tduration_minutes: validateDuration(newService.duration_minutes, 'duration_minutes'),\n\t\t\tpatch_test_duration_hours: validateDuration(\n\t\t\t\tnewService.patch_test_duration_hours,\n\t\t\t\t'patch_test_duration_hours'\n\t\t\t),\n\t\t\tminimum_age_required: validateDuration(\n\t\t\t\tnewService.minimum_age_required,\n\t\t\t\t'minimum_age_required'\n\t\t\t)\n\t\t};\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: validateNameField\nDoc: \nCode:\n\tfunction validateNameField() {\n\t\tserviceErrors.name = validateName(newService.name);\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: validatePriceField\nDoc: \nCode:\n\tfunction validatePriceField() {\n\t\tserviceErrors.price = validatePrice(newService.price);\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: validateDurationField\nDoc: \nCode:\n\tfunction validateDurationField() {\n\t\tserviceErrors.duration_minutes = validateDuration(\n\t\t\tnewService.duration_minutes,\n\t\t\t'duration_minutes'\n\t\t);\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: validatePatchTestField\nDoc: \nCode:\n\tfunction validatePatchTestField() {\n\t\tserviceErrors.patch_test_duration_hours = validateDuration(\n\t\t\tnewService.patch_test_duration_hours,\n\t\t\t'patch_test_duration_hours'\n\t\t);\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: validateMinimumAgeField\nDoc: \nCode:\n\tfunction validateMinimumAgeField() {\n\t\tserviceErrors.minimum_age_required = validateDuration(\n\t\t\tnewService.minimum_age_required,\n\t\t\t'minimum_age_required'\n\t\t);\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: createService\nDoc: \nCode:\n\tasync function createService() {\n\t\t// Update all errors before final validation\n\t\tupdateAllErrors();\n\n\t\t// Check if any errors exist\n\t\tconst hasErrors = Object.values(serviceErrors).some((error) => error !== '');\n\t\tif (hasErrors) {\n\t\t\ttoast.error('Please fix the validation errors before submitting');\n\t\t\treturn;\n\t\t}\n\n\t\t// Additional safety check with the derived property\n\t\tif (!isFormValid) {\n\t\t\ttoast.error('Form validation failed');\n\t\t\treturn;\n\t\t}\n\n\t\tcreatingService = true;\n\t\tconst loadingToast = toast.loading('Creating service...');\n\n\t\ttry {\n\t\t\tconst payload = {\n\t\t\t\tname: newService.name.trim(),\n\t\t\t\tdescription: newService.description.trim() || undefined,\n\t\t\t\tprice: parseFloat(newService.price),\n\t\t\t\tduration_minutes: newService.duration_minutes,\n\t\t\t\tpatch_test_duration_hours: newService.patch_test_duration_hours,\n\t\t\t\tminimum_age_required: newService.minimum_age_required\n\t\t\t};\n\n\t\t\tconst response = await fetch('/api/admin/services', {\n\t\t\t\tmethod: 'POST',\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tAuthorization: `Bearer ${authStore.currentToken}`\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify(payload)\n\t\t\t});\n\n\t\t\tif (response.ok) {\n\t\t\t\tconst createdService = await response.json();\n\t\t\t\ttoast.success('Service created successfully!', { id: loadingToast });\n\n\t\t\t\t// Reset form and close modal\n\t\t\t\tresetServiceForm();\n\t\t\t\tshowServiceModal = false;\n\n\t\t\t\t// Refresh services list\n\t\t\t\tawait fetchServices();\n\t\t\t} else if (response.status === 409) {\n\t\t\t\ttoast.error('A service with this name already exists', { id: loadingToast });\n\t\t\t} else if (response.status === 400) {\n\t\t\t\tconst errorText = await response.text();\n\t\t\t\ttoast.error(`Validation error: ${errorText}`, { id: loadingToast });\n\t\t\t} else {\n\t\t\t\tconst errorText = await response.text();\n\t\t\t\ttoast.error(`Failed to create service: ${errorText}`, { id: loadingToast });\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error('Error creating service:', err);\n\t\t\ttoast.error('Network error creating service', { id: loadingToast });\n\t\t} finally {\n\t\t\tcreatingService = false;\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: resetServiceForm\nDoc: \nCode:\n\tfunction resetServiceForm() {\n\t\tnewService = {\n\t\t\tname: '',\n\t\t\tdescription: '',\n\t\t\tprice: '',\n\t\t\tduration_minutes: 60,\n\t\t\tpatch_test_duration_hours: 0,\n\t\t\tminimum_age_required: 0\n\t\t};\n\t\tserviceErrors = {\n\t\t\tname: '',\n\t\t\tprice: '',\n\t\t\tduration_minutes: '',\n\t\t\tpatch_test_duration_hours: '',\n\t\t\tminimum_age_required: ''\n\t\t};\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: openServiceModal\nDoc: \nCode:\n\tfunction openServiceModal() {\n\t\tresetServiceForm();\n\t\tshowServiceModal = true;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: function\nName: calculateHours\nDoc: \nCode:\n\tfunction calculateHours(startTime: string, endTime: string): string {\n\t\t// Convert formatted times to 24-hour format for calculation\n\t\tconst start = timeToInputValue(startTime);\n\t\tconst end = timeToInputValue(endTime);\n\n\t\tconst [startHours, startMinutes] = start.split(':').map(Number);\n\t\tconst [endHours, endMinutes] = end.split(':').map(Number);\n\n\t\tconst startTotalMinutes = startHours * 60 + startMinutes;\n\t\tconst endTotalMinutes = endHours * 60 + endMinutes;\n\n\t\tconst diffMinutes = endTotalMinutes - startTotalMinutes;\n\t\tconst hours = Math.floor(diffMinutes / 60);\n\t\tconst minutes = diffMinutes % 60;\n\n\t\tif (minutes === 0) {\n\t\t\treturn `${hours}`;\n\t\t}\n\t\treturn `${hours}.${minutes === 30 ? '5' : Math.round((minutes / 60) * 10)}`;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte\nType: markup\n{#if pageState === 'loading'}\n\t<!-- Full page skeleton loading -->\n\t<div class=\"mx-auto max-w-6xl space-y-6 p-6\">\n\t\t<!-- Header Skeleton -->\n\t\t<div class=\"mb-8 flex items-center justify-center text-center\">\n\t\t\t<div class=\"space-y-2\">\n\t\t\t\t<Skeleton class=\"h-8 w-64\" />\n\t\t\t\t<Skeleton class=\"h-4 w-96\" />\n\t\t\t</div>\n\t\t</div>\n\n\t\t<!-- Image Upload Card Skeleton -->\n\t\t<Card.Root>\n\t\t\t<Card.Header>\n\t\t\t\t<Skeleton class=\"h-6 w-32\" />\n\t\t\t\t<Skeleton class=\"h-4 w-48\" />\n\t\t\t</Card.Header>\n\t\t\t<Card.Content class=\"space-y-4\">\n\t\t\t\t<Skeleton class=\"h-32 w-full\" />\n\t\t\t\t<div class=\"flex justify-end\">\n\t\t\t\t\t<Skeleton class=\"h-10 w-40\" />\n\t\t\t\t</div>\n\t\t\t</Card.Content>\n\t\t</Card.Root>\n\n\t\t<!-- Users & Bookings Grid Skeleton -->\n\t\t<div class=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n\t\t\t<!-- Users Card Skeleton -->\n\t\t\t<Card.Root>\n\t\t\t\t<Card.Header>\n\t\t\t\t\t<Skeleton class=\"h-6 w-20\" />\n\t\t\t\t\t<Skeleton class=\"h-4 w-40\" />\n\t\t\t\t</Card.Header>\n\t\t\t\t<Card.Content class=\"space-y-4\">\n\t\t\t\t\t<div class=\"flex gap-2\">\n\t\t\t\t\t\t<Skeleton class=\"h-10 flex-1\" />\n\t\t\t\t\t\t<Skeleton class=\"h-10 w-20\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t{#each Array(3) as _, i}\n\t\t\t\t\t\t\t<Skeleton class=\"h-16 w-full\" />\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t</div>\n\t\t\t\t</Card.Content>\n\t\t\t</Card.Root>\n\n\t\t\t<!-- Bookings Card Skeleton -->\n\t\t\t<Card.Root>\n\t\t\t\t<Card.Header>\n\t\t\t\t\t<Skeleton class=\"h-6 w-24\" />\n\t\t\t\t\t<Skeleton class=\"h-4 w-40\" />\n\t\t\t\t</Card.Header>\n\t\t\t\t<Card.Content class=\"space-y-4\">\n\t\t\t\t\t<div class=\"flex gap-2\">\n\t\t\t\t\t\t<Skeleton class=\"h-10 flex-1\" />\n\t\t\t\t\t\t<Skeleton class=\"h-10 w-20\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t{#each Array(3) as _, i}\n\t\t\t\t\t\t\t<Skeleton class=\"h-16 w-full\" />\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t</div>\n\t\t\t\t</Card.Content>\n\t\t\t</Card.Root>\n\t\t</div>\n\n\t\t<!-- Holiday Hours Card Skeleton -->\n\t\t<Card.Root>\n\t\t\t<Card.Header>\n\t\t\t\t<Skeleton class=\"h-6 w-32\" />\n\t\t\t\t<Skeleton class=\"h-4 w-64\" />\n\t\t\t</Card.Header>\n\t\t\t<Card.Content class=\"space-y-4\">\n\t\t\t\t<div class=\"flex justify-between\">\n\t\t\t\t\t<Skeleton class=\"h-10 w-32\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n\t\t\t\t\t{#each Array(2) as _, i}\n\t\t\t\t\t\t<Skeleton class=\"h-32 w-full\" />\n\t\t\t\t\t{/each}\n\t\t\t\t</div>\n\t\t\t</Card.Content>\n\t\t</Card.Root>\n\n\t\t<!-- Working Hours Card Skeleton -->\n\t\t<Card.Root>\n\t\t\t<Card.Header>\n\t\t\t\t<Skeleton class=\"h-6 w-32\" />\n\t\t\t\t<Skeleton class=\"h-4 w-64\" />\n\t\t\t</Card.Header>\n\t\t\t<Card.Content class=\"space-y-4\">\n\t\t\t\t<div class=\"flex justify-between\">\n\t\t\t\t\t<Skeleton class=\"h-6 w-40\" />\n\t\t\t\t\t<Skeleton class=\"h-10 w-24\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"w-full overflow-x-auto\">\n\t\t\t\t\t<table class=\"w-full table-auto\">\n\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr class=\"text-left text-xs text-gray-500\">\n\t\t\t\t\t\t\t\t<th class=\"py-2\"><Skeleton class=\"h-4 w-12\" /></th>\n\t\t\t\t\t\t\t\t<th class=\"py-2\"><Skeleton class=\"h-4 w-16\" /></th>\n\t\t\t\t\t\t\t\t<th class=\"py-2\"><Skeleton class=\"h-4 w-16\" /></th>\n\t\t\t\t\t\t\t\t<th class=\"py-2\"><Skeleton class=\"h-4 w-16\" /></th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t{#each Array(7) as _, i}\n\t\t\t\t\t\t\t\t<tr class=\"border-t\">\n\t\t\t\t\t\t\t\t\t<td class=\"py-2\"><Skeleton class=\"h-4 w-20\" /></td>\n\t\t\t\t\t\t\t\t\t<td class=\"py-2\"><Skeleton class=\"h-4 w-12\" /></td>\n\t\t\t\t\t\t\t\t\t<td class=\"py-2\"><Skeleton class=\"h-4 w-12\" /></td>\n\t\t\t\t\t\t\t\t\t<td class=\"py-2\"><Skeleton class=\"h-4 w-12\" /></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t</Card.Content>\n\t\t</Card.Root>\n\n\t\t<!-- Services Management Card Skeleton -->\n\t\t<Card.Root>\n\t\t\t<Card.Header>\n\t\t\t\t<Skeleton class=\"h-6 w-40\" />\n\t\t\t\t<Skeleton class=\"h-4 w-80\" />\n\t\t\t</Card.Header>\n\t\t\t<Card.Content class=\"space-y-4\">\n\t\t\t\t<div class=\"flex justify-between\">\n\t\t\t\t\t<Skeleton class=\"h-10 w-32\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"hidden w-full overflow-x-auto md:block\">\n\t\t\t\t\t<table class=\"w-full table-auto border-collapse text-sm\">\n\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr class=\"border-b text-left text-xs text-gray-500\">\n\t\t\t\t\t\t\t\t<th class=\"py-3\"><Skeleton class=\"h-4 w-20\" /></th>\n\t\t\t\t\t\t\t\t<th class=\"py-3\"><Skeleton class=\"h-4 w-32\" /></th>\n\t\t\t\t\t\t\t\t<th class=\"py-3\"><Skeleton class=\"h-4 w-16\" /></th>\n\t\t\t\t\t\t\t\t<th class=\"py-3\"><Skeleton class=\"h-4 w-20\" /></th>\n\t\t\t\t\t\t\t\t<th class=\"py-3\"><Skeleton class=\"h-4 w-16\" /></th>\n\t\t\t\t\t\t\t\t<th class=\"py-3\"><Skeleton class=\"h-4 w-24\" /></th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t{#each Array(3) as _, i}\n\t\t\t\t\t\t\t\t<tr class=\"border-b\">\n\t\t\t\t\t\t\t\t\t<td class=\"py-3\"><Skeleton class=\"h-4 w-32\" /></td>\n\t\t\t\t\t\t\t\t\t<td class=\"py-3\"><Skeleton class=\"h-4 w-48\" /></td>\n\t\t\t\t\t\t\t\t\t<td class=\"py-3\"><Skeleton class=\"h-4 w-16\" /></td>\n\t\t\t\t\t\t\t\t\t<td class=\"py-3\"><Skeleton class=\"h-4 w-20\" /></td>\n\t\t\t\t\t\t\t\t\t<td class=\"py-3\"><Skeleton class=\"h-4 w-16\" /></td>\n\t\t\t\t\t\t\t\t\t<td class=\"py-3\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"flex justify-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-8 w-16\" />\n\t\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-8 w-16\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t</Card.Content>\n\t\t</Card.Root>\n\t</div>\n{:else if pageState === 'authorized'}\n\t<div class=\"mx-auto max-w-6xl space-y-6 p-6\">\n\t\t<div class=\"mb-4 flex items-center justify-center text-center\">\n\t\t\t<div>\n\t\t\t\t<h1 class=\"text-3xl font-bold\">Admin Dashboard</h1>\n\t\t\t\t<p class=\"text-gray-600\">Manage portfolio images, working hours & user bookings</p>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<Card.Root>\n\t\t\t<Card.Header>\n\t\t\t\t<div class=\"flex items-center justify-between\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Card.Title>Image Upload</Card.Title>\n\t\t\t\t\t\t<Card.Description>Upload images for the portfolio or other uses.</Card.Description>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"hidden rounded-lg p-2 md:block\">\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\tclass=\"h-6 w-6\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\" />\n\t\t\t\t\t\t\t<circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\" />\n\t\t\t\t\t\t\t<polyline points=\"21 15 16 10 5 21\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Card.Header>\n\t\t\t<Card.Content class=\"space-y-4\">\n\t\t\t\t<FileDropZone onfiles={handleFilesDropped} accept=\"image/*\" multiple>\n\t\t\t\t\t<div class=\"p-6 text-center\">\n\t\t\t\t\t\t<p class=\"text-sm text-gray-500\">Drop files here, or click to open the file picker</p>\n\t\t\t\t\t</div>\n\t\t\t\t</FileDropZone>\n\n\t\t\t\t<div class=\"mt-4\">\n\t\t\t\t\t<div class=\"text-sm text-gray-600\">Selected files ({uploadFiles.length})</div>\n\t\t\t\t\t<div class=\"mt-2 max-h-40 space-y-2 overflow-y-auto\">\n\t\t\t\t\t\t{#each uploadFiles as f}\n\t\t\t\t\t\t\t<div class=\"flex items-center justify-between rounded bg-gray-50 p-2\">\n\t\t\t\t\t\t\t\t<div>{f.name} \u2022 {Math.round(f.size / 1024)}KB</div>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tclass=\"text-red-500\"\n\t\t\t\t\t\t\t\t\tonclick={() => (uploadFiles = uploadFiles.filter((x) => x !== f))}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tRemove\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t</div>\n\t\t\t\t\t{#if uploadResults.length > 0}\n\t\t\t\t\t\t<div class=\"mt-4 text-sm text-gray-600\">Upload Results</div>\n\t\t\t\t\t\t<div class=\"mt-2 max-h-40 space-y-2 overflow-y-auto\">\n\t\t\t\t\t\t\t{#each uploadResults as result}\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclass=\"rounded p-2 text-xs {result.error\n\t\t\t\t\t\t\t\t\t\t? 'bg-red-100 text-red-800'\n\t\t\t\t\t\t\t\t\t\t: 'bg-emerald-100 text-emerald-800'}\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{result.name}: {result.error\n\t\t\t\t\t\t\t\t\t\t? `Failed: ${result.error}`\n\t\t\t\t\t\t\t\t\t\t: `Success: ${result.url}`}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t{/if}\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"flex items-center justify-end gap-2\">\n\t\t\t\t\t<Button onclick={uploadOneOrMany} disabled={!uploadFiles.length || uploading}>\n\t\t\t\t\t\t{uploading ? `Uploading (${uploadProgress}%)` : 'Upload Selected Files'}\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</Card.Content>\n\t\t</Card.Root>\n\n\t\t<div class=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n\t\t\t<Card.Root class=\"h-full\">\n\t\t\t\t<Card.Header>\n\t\t\t\t\t<div class=\"flex items-start justify-between\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<Card.Title class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\tclass=\"h-5 w-5\"\n\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<path d=\"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2\" />\n\t\t\t\t\t\t\t\t\t<circle cx=\"9\" cy=\"7\" r=\"4\" />\n\t\t\t\t\t\t\t\t\t<path d=\"M23 21v-2a4 4 0 0 0-3-3.87\" />\n\t\t\t\t\t\t\t\t\t<path d=\"M16 3.13a4 4 0 0 1 0 7.75\" />\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\tUsers\n\t\t\t\t\t\t\t</Card.Title>\n\t\t\t\t\t\t\t<Card.Description>Search and manage user details.</Card.Description>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"rounded-full bg-gray-100 px-2 py-0.5 text-xs font-medium\">\n\t\t\t\t\t\t\t<span class=\"text-xs font-semibold\">{users.length}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</Card.Header>\n\t\t\t\t<Card.Content class=\"space-y-4\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"flex gap-2\">\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tplaceholder=\"Name, email or phone\"\n\t\t\t\t\t\t\t\tbind:value={userQuery}\n\t\t\t\t\t\t\t\tonkeyup={(e) => {\n\t\t\t\t\t\t\t\t\tif ((e as KeyboardEvent).key === 'Enter') searchUsers();\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button onclick={searchUsers} disabled={loadingSearch}>Search</Button>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"mt-3 max-h-60 space-y-2 overflow-y-auto\">\n\t\t\t\t\t\t\t{#each users as u}\n\t\t\t\t\t\t\t\t<div class=\"flex items-center justify-between rounded bg-gray-50 p-2\">\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"font-medium\">{u.fn || `${u.n_first_name} ${u.n_last_name}`}</div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"text-xs text-gray-500\">{u.email} \u2022 {u.phone}</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<Button variant=\"outline\" onclick={() => openUserModal(u.id)}>View</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</Card.Content>\n\t\t\t</Card.Root>\n\n\t\t\t<Card.Root class=\"h-full\">\n\t\t\t\t<Card.Header>\n\t\t\t\t\t<div class=\"flex items-start justify-between\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<Card.Title class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\tclass=\"h-5 w-5\"\n\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\" />\n\t\t\t\t\t\t\t\t\t<line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\" />\n\t\t\t\t\t\t\t\t\t<line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\" />\n\t\t\t\t\t\t\t\t\t<line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\" />\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\tBookings\n\t\t\t\t\t\t\t</Card.Title>\n\t\t\t\t\t\t\t<Card.Description>Search and manage booking history.</Card.Description>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"rounded-full bg-gray-100 px-2 py-0.5 text-xs font-medium\">\n\t\t\t\t\t\t\t<span class=\"text-xs font-semibold\">{bookings.length}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</Card.Header>\n\t\t\t\t<Card.Content class=\"space-y-4\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"flex gap-2\">\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tplaceholder=\"Search by customer name, email, phone, or service\"\n\t\t\t\t\t\t\t\tbind:value={bookingQuery}\n\t\t\t\t\t\t\t\tonkeyup={(e) => {\n\t\t\t\t\t\t\t\t\tif ((e as KeyboardEvent).key === 'Enter') searchBookings();\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button onclick={searchBookings} disabled={loadingSearch}>\n\t\t\t\t\t\t\t\t{loadingSearch ? 'Searching...' : 'Search'}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"mt-3 max-h-60 space-y-2 overflow-y-auto\">\n\t\t\t\t\t\t\t{#if loadingSearch}\n\t\t\t\t\t\t\t\t<div class=\"flex items-center justify-center p-4\">\n\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-4 w-32\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{:else if bookings.length === 0}\n\t\t\t\t\t\t\t\t<div class=\"text-center text-sm text-gray-500\">No bookings found.</div>\n\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t{#each bookings as b}\n\t\t\t\t\t\t\t\t\t<div class=\"flex items-center justify-between rounded bg-gray-50 p-2\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"flex-1\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t{(() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst date = new Date(b.start_time);\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst now = new Date();\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst today = new Date(now.getFullYear(), now.getMonth(), now.getDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst bookingDate = new Date(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdate.getFullYear(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdate.getMonth(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdate.getDate()\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst daysDiff = Math.floor(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(bookingDate.getTime() - today.getTime()) / (1000 * 60 * 60 * 24)\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst days = [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Sunday',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Monday',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Tuesday',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Wednesday',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Thursday',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Friday',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Saturday'\n\t\t\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst months = [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Jan',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Feb',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Mar',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Apr',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'May',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'June',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'July',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Aug',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Sept',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Oct',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Nov',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Dec'\n\t\t\t\t\t\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst day = days[date.getDay()];\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst dateNum = date.getDate();\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst month = months[date.getMonth()];\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst year = date.getFullYear();\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst currentYear = now.getFullYear();\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst hours = date.getHours();\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst minutes = date.getMinutes().toString().padStart(2, '0');\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst ampm = hours >= 12 ? 'pm' : 'am';\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst hour12 = hours % 12 || 12;\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst time = `${hour12}:${minutes}${ampm}`;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Today\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (daysDiff === 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn `Today, ${time}`;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Tomorrow\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (daysDiff === 1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn `Tomorrow, ${time}`;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Within next 6 days (2-6 days ahead)\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (daysDiff > 1 && daysDiff <= 6) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn `${day}, ${time}`;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Last 6 days (1-6 days ago)\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (daysDiff < 0 && daysDiff >= -6) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn `Last ${day}, ${time}`;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Otherwise, full date\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst suffix =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdateNum === 1 || dateNum === 21 || dateNum === 31\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'st'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: dateNum === 2 || dateNum === 22\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'nd'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: dateNum === 3 || dateNum === 23\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'rd'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'th';\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst yearStr = year !== currentYear ? ` ${year}` : '';\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn `${day} the ${dateNum}${suffix} of ${month}${yearStr}, ${time}`;\n\t\t\t\t\t\t\t\t\t\t\t\t})()}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"mt-1 flex items-center gap-2 text-xs text-gray-500\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium {b.status ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t'confirmed'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-emerald-100 text-emerald-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: b.status === 'pending'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-amber-100 text-amber-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: b.status === 'in_progress'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-blue-100 text-blue-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: b.status === 'completed'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-green-100 text-green-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: b.status === 'client_cancelled'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-red-100 text-red-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: b.status === 'we_cancelled'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-rose-100 text-rose-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: b.status === 're-schedule'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-purple-100 text-purple-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: b.status === 'no_show'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-gray-100 text-gray-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'bg-gray-100 text-gray-800'}\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"mr-1 h-1.5 w-1.5 rounded-full {b.status === 'confirmed'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-emerald-600'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: b.status === 'pending'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-amber-600'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: b.status === 'in_progress'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-blue-600'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: b.status === 'completed'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-green-600'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: b.status === 'client_cancelled'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-red-600'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: b.status === 'we_cancelled'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-rose-600'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: b.status === 're-schedule'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-purple-600'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: b.status === 'no_show'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-gray-600'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'bg-gray-600'}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{b.status}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span>\u2022 {b.user?.full_name || 'Unknown User'}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\u2022 {(b.services || [])\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.map((s) => s.service_name || 'Unknown Service')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.join(', ')}</span\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<Button variant=\"outline\" onclick={() => openBookingModal(b.id)}>View</Button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</Card.Content>\n\t\t\t</Card.Root>\n\t\t</div>\n\n\t\t<Card.Root>\n\t\t\t<Card.Header>\n\t\t\t\t<div class=\"flex items-center justify-between\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Card.Title>Holiday Hours</Card.Title>\n\t\t\t\t\t\t<Card.Description>\n\t\t\t\t\t\t\tManage temporary schedules for holidays, closures, and special events.\n\t\t\t\t\t\t</Card.Description>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Button variant=\"default\" onclick={createNewException}>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\tclass=\"mr-2 h-4 w-4\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\" />\n\t\t\t\t\t\t\t<line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\tNew Schedule\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</Card.Header>\n\n\t\t\t<Card.Content class=\"space-y-4\">\n\t\t\t\t{#if exceptionGroupsLoading}\n\t\t\t\t\t<div class=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n\t\t\t\t\t\t{#each Array(2) as _, i}\n\t\t\t\t\t\t\t<Skeleton class=\"h-32 w-full\" />\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t</div>\n\t\t\t\t{:else}\n\t\t\t\t\t<div class=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n\t\t\t\t\t\t{#if exceptionGroups.length === 0}\n\t\t\t\t\t\t\t<p class=\"col-span-2 text-sm text-gray-500\">No exception groups found.</p>\n\t\t\t\t\t\t{/if}\n\n\t\t\t\t\t\t{#each exceptionGroups as g}\n\t\t\t\t\t\t\t<div class=\"group relative h-full rounded-lg border p-4 transition-all\">\n\t\t\t\t\t\t\t\t<div class=\"flex h-full flex-col gap-3\">\n\t\t\t\t\t\t\t\t\t<div class=\"flex-1\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"mb-2 flex items-start justify-between\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"rounded-lg bg-gray-50 p-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"h-4 w-4\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<h3 class=\"font-semibold text-gray-900\">{g.name}</h3>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"rounded-full bg-gray-100 px-2 py-0.5 text-xs font-medium\">\n\t\t\t\t\t\t\t\t\t\t\t\t{g.weekStarts?.length || 0} weeks\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<p class=\"mb-3 text-sm text-gray-600\">{g.description}</p>\n\n\t\t\t\t\t\t\t\t\t\t<div class=\"rounded-lg bg-gray-50 p-2\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"mb-1 text-xs font-medium text-gray-500\">Applies to weeks:</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"text-xs text-gray-700\">\n\t\t\t\t\t\t\t\t\t\t\t\t{g.weekStarts\n\t\t\t\t\t\t\t\t\t\t\t\t\t?.slice(0, 3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.map((w) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew Date(w).toLocaleDateString('en-GB', {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tday: 'numeric',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmonth: 'short'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.join(', ')}\n\t\t\t\t\t\t\t\t\t\t\t\t{#if (g.weekStarts?.length ?? 0) > 3}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"text-gray-500\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(+{(g.weekStarts?.length ?? 0) - 3} more)</span\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"flex gap-2 border-t pt-2\">\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\tonclick={() => openViewExceptionModal(g)}\n\t\t\t\t\t\t\t\t\t\t\tclass=\"flex-1\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"mr-1 h-3 w-3\"\n\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"3\" />\n\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t\tView Details\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\tonclick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\texceptionToDelete = g.id;\n\t\t\t\t\t\t\t\t\t\t\t\tshowDeleteExceptionAlert = true;\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"h-3 w-3\"\n\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<polyline points=\"3 6 5 6 21 6\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\td=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t</div>\n\t\t\t\t{/if}\n\t\t\t</Card.Content>\n\t\t</Card.Root>\n\n\t\t<!-- Default Hours Card -->\n\t\t<Card.Root>\n\t\t\t{#if !defaultHoursIsLoading}\n\t\t\t\t<Card.Content class=\"space-y-4\">\n\t\t\t\t\t<div class=\"flex items-center justify-between\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<h3 class=\"text-lg font-semibold\">Weekly Schedule</h3>\n\t\t\t\t\t\t\t<p class=\"text-sm text-gray-500\">\n\t\t\t\t\t\t\t\tYour standard operating hours for each day of the week\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<Button onclick={prepareDefaultHoursEdit} disabled={loadingHours || savingHours}>\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\tclass=\"mr-2 h-4 w-4\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\" />\n\t\t\t\t\t\t\t\t<path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\" />\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\tEdit Schedule\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<!-- Desktop Table -->\n\t\t\t\t\t<div class=\"hidden w-full overflow-x-auto sm:block\">\n\t\t\t\t\t\t<table class=\"w-full table-auto border-collapse\">\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr class=\"border-b text-left text-xs text-gray-500\">\n\t\t\t\t\t\t\t\t\t<th class=\"px-4 py-3\">Day</th>\n\t\t\t\t\t\t\t\t\t<th class=\"px-4 py-3 text-center\">Status</th>\n\t\t\t\t\t\t\t\t\t<th class=\"px-4 py-3\">Opening Time</th>\n\t\t\t\t\t\t\t\t\t<th class=\"px-4 py-3\">Closing Time</th>\n\t\t\t\t\t\t\t\t\t<th class=\"px-4 py-3 text-right\">Total Hours</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody class=\"divide-y divide-gray-200\">\n\t\t\t\t\t\t\t\t{#each defaultHours as row}\n\t\t\t\t\t\t\t\t\t<tr class=\"transition-colors hover:bg-gray-50\">\n\t\t\t\t\t\t\t\t\t\t<td class=\"p-3\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"font-medium\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>{weekdayLabel(row.weekday) === 'Mon'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'Monday'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: weekdayLabel(row.weekday) === 'Tue'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'Tuesday'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: weekdayLabel(row.weekday) === 'Wed'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'Wednesday'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: weekdayLabel(row.weekday) === 'Thu'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'Thursday'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: weekdayLabel(row.weekday) === 'Fri'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'Friday'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: weekdayLabel(row.weekday) === 'Sat'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'Saturday'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'Sunday'}</span\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"px-4 py-4 text-center\">\n\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"inline-flex items-center rounded-full px-3 py-1 text-xs font-medium {row.is_open\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-emerald-100 text-emerald-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 'bg-gray-100 text-gray-800'}\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"mr-1.5 h-1.5 w-1.5 rounded-full {row.is_open\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-emerald-600'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'bg-gray-600'}\"\n\t\t\t\t\t\t\t\t\t\t\t\t></span>\n\t\t\t\t\t\t\t\t\t\t\t\t{row.is_open ? 'Open' : 'Closed'}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"px-4 py-4\">\n\t\t\t\t\t\t\t\t\t\t\t{#if row.is_open}\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"h-4 w-4 text-gray-400\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"10\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<polyline points=\"12 6 12 12 16 14\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"font-medium text-gray-900\">{row.start_time}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"text-gray-400\">\u2014</span>\n\t\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"px-4 py-4\">\n\t\t\t\t\t\t\t\t\t\t\t{#if row.is_open}\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"h-4 w-4 text-gray-400\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"10\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<polyline points=\"12 6 12 12 16 14\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"font-medium text-gray-900\">{row.end_time}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"text-gray-400\">\u2014</span>\n\t\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"px-4 py-4 text-right\">\n\t\t\t\t\t\t\t\t\t\t\t{#if row.is_open}\n\t\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"inline-flex items-center gap-1 text-sm font-medium text-gray-700\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{calculateHours(row.start_time, row.end_time)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"text-xs text-gray-500\">hrs</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"text-gray-400\">\u2014</span>\n\t\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Mobile Cards -->\n\t\t\t\t\t<div class=\"space-y-3 sm:hidden\">\n\t\t\t\t\t\t{#each defaultHours as row}\n\t\t\t\t\t\t\t<div class=\"rounded-lg border p-4 transition-colors hover:bg-gray-50\">\n\t\t\t\t\t\t\t\t<div class=\"mb-3 flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t<div class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"font-semibold text-gray-900\">\n\t\t\t\t\t\t\t\t\t\t\t{weekdayLabel(row.weekday) === 'Mon'\n\t\t\t\t\t\t\t\t\t\t\t\t? 'Monday'\n\t\t\t\t\t\t\t\t\t\t\t\t: weekdayLabel(row.weekday) === 'Tue'\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'Tuesday'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: weekdayLabel(row.weekday) === 'Wed'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'Wednesday'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: weekdayLabel(row.weekday) === 'Thu'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'Thursday'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: weekdayLabel(row.weekday) === 'Fri'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'Friday'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: weekdayLabel(row.weekday) === 'Sat'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'Saturday'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'Sunday'}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tclass=\"inline-flex items-center rounded-full px-2.5 py-1 text-xs font-medium {row.is_open\n\t\t\t\t\t\t\t\t\t\t\t? 'bg-emerald-100 text-emerald-800'\n\t\t\t\t\t\t\t\t\t\t\t: 'bg-gray-100 text-gray-800'}\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclass=\"mr-1.5 h-1.5 w-1.5 rounded-full {row.is_open\n\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-emerald-600'\n\t\t\t\t\t\t\t\t\t\t\t\t: 'bg-gray-600'}\"\n\t\t\t\t\t\t\t\t\t\t></span>\n\t\t\t\t\t\t\t\t\t\t{row.is_open ? 'Open' : 'Closed'}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t{#if row.is_open}\n\t\t\t\t\t\t\t\t\t<div class=\"grid grid-cols-2 gap-3 text-sm\">\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"mb-1 text-xs text-gray-500\">Opening</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"font-medium text-gray-900\">{row.start_time}</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"mb-1 text-xs text-gray-500\">Closing</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"font-medium text-gray-900\">{row.end_time}</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"mt-3 border-t pt-3 text-xs text-gray-600\">\n\t\t\t\t\t\t\t\t\t\tTotal: <span class=\"font-medium text-gray-900\"\n\t\t\t\t\t\t\t\t\t\t\t>{calculateHours(row.start_time, row.end_time)} hours</span\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t\t<div class=\"text-sm text-gray-500\">No hours scheduled for this day</div>\n\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t</div>\n\t\t\t\t</Card.Content>\n\t\t\t{:else}\n\t\t\t\t<!-- Skeleton loading -->\n\t\t\t\t<Card.Content class=\"space-y-4\">\n\t\t\t\t\t<!-- Desktop Skeleton -->\n\t\t\t\t\t<div class=\"hidden w-full overflow-x-auto md:block\">\n\t\t\t\t\t\t<table class=\"w-full table-auto border-collapse\">\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr\n\t\t\t\t\t\t\t\t\tclass=\"border-b bg-gray-50 text-left text-xs font-medium uppercase tracking-wider text-gray-600\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<th class=\"px-4 py-3\">Day</th>\n\t\t\t\t\t\t\t\t\t<th class=\"px-4 py-3 text-center\">Status</th>\n\t\t\t\t\t\t\t\t\t<th class=\"px-4 py-3\">Opening Time</th>\n\t\t\t\t\t\t\t\t\t<th class=\"px-4 py-3\">Closing Time</th>\n\t\t\t\t\t\t\t\t\t<th class=\"px-4 py-3 text-right\">Total Hours</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody class=\"divide-y divide-gray-200\">\n\t\t\t\t\t\t\t\t{#each Array(7) as _, i}\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td class=\"px-4 py-4\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-8 w-8 rounded-full\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-4 w-20\" />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"px-4 py-4 text-center\">\n\t\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"mx-auto h-6 w-16 rounded-full\" />\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"px-4 py-4\">\n\t\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-4 w-20\" />\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"px-4 py-4\">\n\t\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-4 w-20\" />\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"px-4 py-4 text-right\">\n\t\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"ml-auto h-4 w-12\" />\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Mobile Skeleton -->\n\t\t\t\t\t<div class=\"space-y-3 md:hidden\">\n\t\t\t\t\t\t{#each Array(7) as _, i}\n\t\t\t\t\t\t\t<div class=\"rounded-lg border p-4\">\n\t\t\t\t\t\t\t\t<div class=\"mb-3 flex items-center justify-between\">\n\t\t\t\t\t\t\t\t\t<div class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-10 w-10 rounded-full\" />\n\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-5 w-24\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-6 w-16 rounded-full\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"grid grid-cols-2 gap-3\">\n\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-12 w-full\" />\n\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-12 w-full\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t</div>\n\t\t\t\t</Card.Content>\n\t\t\t{/if}\n\t\t</Card.Root>\n\t\t<!-- Services Management Card -->\n\t\t<Card.Root>\n\t\t\t<Card.Header>\n\t\t\t\t<div class=\"flex items-center justify-between\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Card.Title>Services Management</Card.Title>\n\t\t\t\t\t\t<Card.Description>\n\t\t\t\t\t\t\tManage your services - add, edit, toggle availability, or delete services.\n\t\t\t\t\t\t</Card.Description>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Button onclick={openServiceModal}>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\tclass=\"mr-2 h-4 w-4\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\" />\n\t\t\t\t\t\t\t<line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\tAdd Service\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</Card.Header>\n\n\t\t\t<Card.Content class=\"space-y-4\">\n\t\t\t\t<!-- Desktop Table -->\n\t\t\t\t<div class=\"hidden w-full overflow-x-auto md:block\">\n\t\t\t\t\t<table class=\"w-full table-auto border-collapse text-sm\">\n\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr class=\"border-b text-left text-xs text-gray-500\">\n\t\t\t\t\t\t\t\t<th class=\"w-[20%] py-3 font-medium\">Name</th>\n\t\t\t\t\t\t\t\t<th class=\"w-[30%] py-3 font-medium\">Description</th>\n\t\t\t\t\t\t\t\t<th class=\"w-[10%] py-3 text-right font-medium\">Price</th>\n\t\t\t\t\t\t\t\t<th class=\"w-[12%] py-3 text-right font-medium\">Duration</th>\n\t\t\t\t\t\t\t\t<th class=\"w-[12%] py-3 text-center font-medium\">Status</th>\n\t\t\t\t\t\t\t\t<th class=\"w-[16%] py-3 text-center font-medium\">Actions</th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t{#if servicesLoading}\n\t\t\t\t\t\t\t\t{#each Array(3) as _, i}\n\t\t\t\t\t\t\t\t\t<tr class=\"border-b\">\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-3\"><Skeleton class=\"h-4 w-32\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-3\"><Skeleton class=\"h-4 w-48\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-3 text-right\"><Skeleton class=\"ml-auto h-4 w-16\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-3 text-right\"><Skeleton class=\"ml-auto h-4 w-20\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-3 text-center\"><Skeleton class=\"mx-auto h-4 w-16\" /></td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-3 text-center\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"flex justify-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-8 w-16\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-8 w-16\" />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t{#each services as service}\n\t\t\t\t\t\t\t\t\t<tr class=\"border-b hover:bg-gray-50\">\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-3 font-medium\">{service.name}</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-3 text-gray-600\">\n\t\t\t\t\t\t\t\t\t\t\t{#if service.description}\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"line-clamp-2\" title={service.description}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{service.description}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"text-gray-400\">\u2014</span>\n\t\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-3 text-right font-medium\">\u00a3{service.price.toFixed(2)}</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-3 text-right\">{service.duration_minutes} min</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-3 text-center\">\n\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"inline-flex items-center rounded-full px-2 py-1 text-xs font-medium {service.is_active\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-emerald-100 text-emerald-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 'bg-red-100 text-red-800'}\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{service.is_active ? 'Active' : 'Inactive'}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-3\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"flex justify-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonclick={() => toggleService(service.id)}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={servicesUpdating[service.id]}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{servicesUpdating[service.id]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? '...'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: service.is_active\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'Deactivate'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'Activate'}\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tonclick={() => deleteService(service.id)}\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled={servicesUpdating[service.id]}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Mobile Cards (keep the same as before) -->\n\t\t\t\t<div class=\"space-y-4 md:hidden\">\n\t\t\t\t\t{#if servicesLoading}\n\t\t\t\t\t\t{#each Array(3) as _, i}\n\t\t\t\t\t\t\t<div class=\"rounded-lg border p-4\">\n\t\t\t\t\t\t\t\t<div class=\"space-y-3\">\n\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-5 w-32\" />\n\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-4 w-48\" />\n\t\t\t\t\t\t\t\t\t<div class=\"flex justify-between\">\n\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-4 w-16\" />\n\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-4 w-20\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"flex gap-2\">\n\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-8 w-16\" />\n\t\t\t\t\t\t\t\t\t\t<Skeleton class=\"h-8 w-16\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t{:else}\n\t\t\t\t\t\t{#each services as service}\n\t\t\t\t\t\t\t<div class=\"rounded-lg border p-4 hover:bg-gray-50\">\n\t\t\t\t\t\t\t\t<div class=\"space-y-3\">\n\t\t\t\t\t\t\t\t\t<div class=\"flex items-start justify-between\">\n\t\t\t\t\t\t\t\t\t\t<h3 class=\"font-medium\">{service.name}</h3>\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclass=\"inline-flex items-center rounded-full px-2 py-1 text-xs font-medium {service.is_active\n\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-emerald-100 text-emerald-800'\n\t\t\t\t\t\t\t\t\t\t\t\t: 'bg-red-100 text-red-800'}\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{service.is_active ? 'Active' : 'Inactive'}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t{#if service.description}\n\t\t\t\t\t\t\t\t\t\t<p class=\"text-sm text-gray-600\">{service.description}</p>\n\t\t\t\t\t\t\t\t\t{/if}\n\n\t\t\t\t\t\t\t\t\t<div class=\"flex justify-between text-sm\">\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"font-medium\">Price:</span> \u00a3{service.price.toFixed(2)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"font-medium\">Duration:</span>\n\t\t\t\t\t\t\t\t\t\t\t{service.duration_minutes} min\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"flex gap-2 pt-2\">\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\tonclick={() => toggleService(service.id)}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={servicesUpdating[service.id]}\n\t\t\t\t\t\t\t\t\t\t\tclass=\"flex-1\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{servicesUpdating[service.id]\n\t\t\t\t\t\t\t\t\t\t\t\t? '...'\n\t\t\t\t\t\t\t\t\t\t\t\t: service.is_active\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'Deactivate'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 'Activate'}\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\tonclick={() => deleteService(service.id)}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={servicesUpdating[service.id]}\n\t\t\t\t\t\t\t\t\t\t\tclass=\"flex-1\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t{/if}\n\t\t\t\t</div>\n\n\t\t\t\t{#if !servicesLoading && services.length === 0}\n\t\t\t\t\t<div class=\"py-8 text-center text-gray-500\">\n\t\t\t\t\t\tNo services found. Click \"Add Service\" to create your first service.\n\t\t\t\t\t</div>\n\t\t\t\t{/if}\n\t\t\t</Card.Content>\n\t\t</Card.Root>\n\t</div>\n\n\t<!-- Default Hours Modal -->\n\t<Modal.Root bind:open={showDefaultHoursModal}>\n\t\t<Modal.Content class=\"max-h-[90vh] max-w-sm overflow-y-auto md:max-w-lg\">\n\t\t\t<Modal.Header>\n\t\t\t\t<Modal.Title class=\"text-lg font-semibold\">Edit Default Working Hours</Modal.Title>\n\t\t\t\t<Modal.Description>\n\t\t\t\t\tSet the standard open and close times for your business.\n\t\t\t\t</Modal.Description>\n\t\t\t</Modal.Header>\n\n\t\t\t<div class=\"px-4 pb-4\">\n\t\t\t\t<div class=\"w-full overflow-x-auto\">\n\t\t\t\t\t<table class=\"w-full table-auto\">\n\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr class=\"border-b text-left text-xs text-gray-500\">\n\t\t\t\t\t\t\t\t<th class=\"py-2\">Day</th>\n\t\t\t\t\t\t\t\t<th class=\"py-2\">Open</th>\n\t\t\t\t\t\t\t\t<th class=\"py-2\">Start</th>\n\t\t\t\t\t\t\t\t<th class=\"py-2\">End</th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t{#each defaultHoursDraft as row}\n\t\t\t\t\t\t\t\t<tr class=\"border-t\">\n\t\t\t\t\t\t\t\t\t<td class=\"py-2 text-sm\">{weekdayLabel(row.weekday)}</td>\n\t\t\t\t\t\t\t\t\t<td class=\"py-2\">\n\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t\t\t\t\tbind:checked={row.is_open}\n\t\t\t\t\t\t\t\t\t\t\tclass=\"text-primary focus:ring-primary h-4 w-4 rounded border-gray-300 bg-gray-100\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td class=\"py-2\">\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\ttype=\"time\"\n\t\t\t\t\t\t\t\t\t\t\tbind:value={row.start_time}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={!row.is_open}\n\t\t\t\t\t\t\t\t\t\t\tclass=\"max-w-[70px] text-sm\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td class=\"py-2\">\n\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\ttype=\"time\"\n\t\t\t\t\t\t\t\t\t\t\tbind:value={row.end_time}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={!row.is_open}\n\t\t\t\t\t\t\t\t\t\t\tclass=\"max-w-[70px] text-sm\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<Modal.Footer class=\"flex items-center justify-end gap-2\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tonclick={() => {\n\t\t\t\t\t\tshowDefaultHoursModal = false;\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tCancel\n\t\t\t\t</Button>\n\t\t\t\t<Button onclick={() => (showSaveDefaultHoursAlert = true)} disabled={savingHours}>\n\t\t\t\t\tSave Defaults\n\t\t\t\t</Button>\n\t\t\t</Modal.Footer>\n\t\t</Modal.Content>\n\t</Modal.Root>\n\n\t<!-- Save Default Hours Confirmation -->\n\t<AlertDialog.Root bind:open={showSaveDefaultHoursAlert}>\n\t\t<AlertDialog.Content class=\"z-[60]\">\n\t\t\t<AlertDialog.Header>\n\t\t\t\t<AlertDialog.Title>Save default hours?</AlertDialog.Title>\n\t\t\t\t<AlertDialog.Description>\n\t\t\t\t\tAre you sure you want to save these default hours? This will affect future bookings.\n\t\t\t\t</AlertDialog.Description>\n\t\t\t</AlertDialog.Header>\n\t\t\t<AlertDialog.Footer>\n\t\t\t\t<AlertDialog.Cancel>Cancel</AlertDialog.Cancel>\n\t\t\t\t<AlertDialog.Action onclick={confirmSaveDefaultHours}>Continue</AlertDialog.Action>\n\t\t\t</AlertDialog.Footer>\n\t\t</AlertDialog.Content>\n\t</AlertDialog.Root>\n\n\t<!-- Exception Group Modal -->\n\t<Modal.Root bind:open={showExceptionModal}>\n\t\t<Modal.Content class=\"max-h-[90vh] max-w-2xl overflow-y-auto\">\n\t\t\t<Modal.Header>\n\t\t\t\t<Modal.Title class=\"text-lg font-semibold\">Create Exception Schedule</Modal.Title>\n\t\t\t\t<Modal.Description>\n\t\t\t\t\tDefine custom working hours for holidays, closures, or special events.\n\t\t\t\t</Modal.Description>\n\t\t\t</Modal.Header>\n\n\t\t\t<div class=\"space-y-6 px-4 pb-4\">\n\t\t\t\t<!-- Basic Info -->\n\t\t\t\t<div class=\"space-y-4\">\n\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t<label for=\"exception-name\" class=\"text-sm font-medium\">Schedule Name *</label>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tid=\"exception-name\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tplaceholder=\"e.g., Christmas Week, Summer Holiday\"\n\t\t\t\t\t\t\tbind:value={exceptionDraft.name}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t<label for=\"exception-description\" class=\"text-sm font-medium\">Description</label>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tid=\"exception-description\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tplaceholder=\"Brief description of the service, will be shown to customers\"\n\t\t\t\t\t\t\tbind:value={exceptionDraft.description}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<Separator />\n\n\t\t\t\t<!-- Week Selection -->\n\t\t\t\t<div class=\"space-y-4\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h3 class=\"mb-2 text-sm font-medium\">Apply to Weeks *</h3>\n\t\t\t\t\t\t<p class=\"mb-3 text-xs text-gray-500\">\n\t\t\t\t\t\t\tSelect a date range to add all Mondays within that range\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\n\t\t\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t\t\t<label for=\"week-from\" class=\"text-xs text-gray-600\">From Date</label>\n\t\t\t\t\t\t\t\t<Input id=\"week-from\" type=\"date\" bind:value={weekRangeFrom} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t\t\t<label for=\"week-to\" class=\"text-xs text-gray-600\">To Date</label>\n\t\t\t\t\t\t\t\t<Input id=\"week-to\" type=\"date\" bind:value={weekRangeTo} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<Button variant=\"outline\" size=\"sm\" onclick={addWeekRange} class=\"mt-3\">\n\t\t\t\t\t\t\tAdd Week Range\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{#if exceptionDraft.weekStarts.length > 0}\n\t\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t\t<div class=\"text-xs text-gray-600\">\n\t\t\t\t\t\t\t\tSelected weeks ({exceptionDraft.weekStarts.length}):\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"max-h-32 space-y-1 overflow-y-auto rounded border p-2\">\n\t\t\t\t\t\t\t\t{#each exceptionDraft.weekStarts as week, index}\n\t\t\t\t\t\t\t\t\t<div class=\"flex items-center justify-between text-sm\">\n\t\t\t\t\t\t\t\t\t\t<span>Week starting: {week}</span>\n\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\tclass=\"text-xs text-red-500 hover:text-red-700\"\n\t\t\t\t\t\t\t\t\t\t\tonclick={() => removeWeek(index)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tRemove\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t{/if}\n\t\t\t\t</div>\n\n\t\t\t\t<Separator />\n\n\t\t\t\t<!-- Working Hours -->\n\t\t\t\t<div class=\"space-y-4\">\n\t\t\t\t\t<h3 class=\"text-sm font-medium\">Working Hours for these Weeks *</h3>\n\t\t\t\t\t<div class=\"w-full overflow-x-auto\">\n\t\t\t\t\t\t<table class=\"w-full table-auto text-sm\">\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr class=\"text-left text-xs text-gray-500\">\n\t\t\t\t\t\t\t\t\t<th class=\"py-2\">Day</th>\n\t\t\t\t\t\t\t\t\t<th class=\"py-2\">Open</th>\n\t\t\t\t\t\t\t\t\t<th class=\"py-2\">Start</th>\n\t\t\t\t\t\t\t\t\t<th class=\"py-2\">End</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t{#each exceptionDraft.hours as row}\n\t\t\t\t\t\t\t\t\t<tr class=\"border-t\">\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-2\">{weekdayLabel(row.weekday)}</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-2\">\n\t\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t\t\t\t\t\tbind:checked={row.is_open}\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"h-4 w-4 rounded border-gray-300 bg-gray-100\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-2\">\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"time\"\n\t\t\t\t\t\t\t\t\t\t\t\tbind:value={row.start_time}\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={!row.is_open}\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"w-24 text-sm\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td class=\"py-2\">\n\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"time\"\n\t\t\t\t\t\t\t\t\t\t\t\tbind:value={row.end_time}\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={!row.is_open}\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"w-24 text-sm\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<Modal.Footer class=\"flex items-center justify-end gap-2\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tonclick={() => {\n\t\t\t\t\t\tshowExceptionModal = false;\n\t\t\t\t\t\tresetExceptionForm();\n\t\t\t\t\t}}\n\t\t\t\t\tdisabled={savingHours}\n\t\t\t\t>\n\t\t\t\t\tCancel\n\t\t\t\t</Button>\n\t\t\t\t<Button onclick={saveExceptionGroup} disabled={savingHours}>\n\t\t\t\t\t{savingHours ? 'Creating\u2026' : 'Create Schedule'}\n\t\t\t\t</Button>\n\t\t\t</Modal.Footer>\n\t\t</Modal.Content>\n\t</Modal.Root>\n\n\t<!-- Delete Exception Confirmation -->\n\t<AlertDialog.Root bind:open={showDeleteExceptionAlert}>\n\t\t<AlertDialog.Content class=\"z-[60]\">\n\t\t\t<AlertDialog.Header>\n\t\t\t\t<AlertDialog.Title>Delete exception group?</AlertDialog.Title>\n\t\t\t\t<AlertDialog.Description>\n\t\t\t\t\tThis action cannot be undone. This will permanently delete this exception group and all\n\t\t\t\t\tits associated schedule rows.\n\t\t\t\t</AlertDialog.Description>\n\t\t\t</AlertDialog.Header>\n\t\t\t<AlertDialog.Footer>\n\t\t\t\t<AlertDialog.Cancel\n\t\t\t\t\tonclick={() => {\n\t\t\t\t\t\texceptionToDelete = undefined;\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tCancel\n\t\t\t\t</AlertDialog.Cancel>\n\t\t\t\t<AlertDialog.Action onclick={confirmDeleteExceptionGroup}>Delete</AlertDialog.Action>\n\t\t\t</AlertDialog.Footer>\n\t\t</AlertDialog.Content>\n\t</AlertDialog.Root>\n\n\t<!-- View Exception Modal -->\n\t{#if viewingException}\n\t\t<Modal.Root bind:open={showViewExceptionModal}>\n\t\t\t<Modal.Content class=\"max-h-[90vh] max-w-2xl overflow-y-auto\">\n\t\t\t\t<Modal.Header>\n\t\t\t\t\t<Modal.Title class=\"text-lg font-semibold\">{viewingException.name}</Modal.Title>\n\t\t\t\t\t<Modal.Description>\n\t\t\t\t\t\t{viewingException.description || 'Holiday schedule details'}\n\t\t\t\t\t</Modal.Description>\n\t\t\t\t</Modal.Header>\n\n\t\t\t\t<div class=\"space-y-6 px-4 pb-4\">\n\t\t\t\t\t<!-- Applied Weeks -->\n\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t<h3 class=\"text-sm font-medium\">Applied to Weeks</h3>\n\t\t\t\t\t\t<div class=\"max-h-48 space-y-1 overflow-y-auto rounded border bg-gray-50 p-3\">\n\t\t\t\t\t\t\t{#if viewingException.weekStarts && viewingException.weekStarts.length > 0}\n\t\t\t\t\t\t\t\t<div class=\"grid grid-cols-2 gap-2 md:grid-cols-3\">\n\t\t\t\t\t\t\t\t\t{#each viewingException.weekStarts as week}\n\t\t\t\t\t\t\t\t\t\t<div class=\"text-sm\">\n\t\t\t\t\t\t\t\t\t\t\tWeek of {new Date(week).toLocaleDateString('en-GB', {\n\t\t\t\t\t\t\t\t\t\t\t\tday: 'numeric',\n\t\t\t\t\t\t\t\t\t\t\t\tmonth: 'short',\n\t\t\t\t\t\t\t\t\t\t\t\tyear: 'numeric'\n\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t<p class=\"text-sm text-gray-500\">No weeks specified</p>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<Separator />\n\n\t\t\t\t\t<!-- Working Hours -->\n\t\t\t\t\t<div class=\"space-y-4\">\n\t\t\t\t\t\t<h3 class=\"text-sm font-medium\">Working Hours</h3>\n\t\t\t\t\t\t<div class=\"w-full overflow-x-auto\">\n\t\t\t\t\t\t\t<table class=\"w-full table-auto\">\n\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t<tr class=\"text-left text-xs text-gray-500\">\n\t\t\t\t\t\t\t\t\t\t<th class=\"py-2\">Day</th>\n\t\t\t\t\t\t\t\t\t\t<th class=\"py-2\">Status</th>\n\t\t\t\t\t\t\t\t\t\t<th class=\"py-2\">Start</th>\n\t\t\t\t\t\t\t\t\t\t<th class=\"py-2\">End</th>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t{#each viewingException.hours as row}\n\t\t\t\t\t\t\t\t\t\t<tr class=\"border-t\">\n\t\t\t\t\t\t\t\t\t\t\t<td class=\"py-2 text-sm\">{weekdayLabel(row.weekday)}</td>\n\t\t\t\t\t\t\t\t\t\t\t<td class=\"py-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"text-sm font-medium {row.is_open\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'text-emerald-600'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'text-red-600'}\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{row.is_open ? 'Open' : 'Closed'}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t<td class=\"py-2 text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t{row.is_open ? row.start_time : '\u2014'}\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t<td class=\"py-2 text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t{row.is_open ? row.end_time : '\u2014'}\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<Modal.Footer class=\"flex items-center justify-end gap-2\">\n\t\t\t\t\t<Button onclick={() => (showViewExceptionModal = false)}>Close</Button>\n\t\t\t\t</Modal.Footer>\n\t\t\t</Modal.Content>\n\t\t</Modal.Root>\n\t{/if}\n\n\t<!-- User Modal -->\n\t{#if selectedUser}\n\t\t<Modal.Root bind:open={showUserModal}>\n\t\t\t<Modal.Content class=\"max-h-[90vh] max-w-sm overflow-y-auto md:max-w-lg\">\n\t\t\t\t<Modal.Header>\n\t\t\t\t\t<Modal.Title class=\"text-lg font-semibold\">\n\t\t\t\t\t\tUser: {selectedUser.fn || `${selectedUser.n_first_name} ${selectedUser.n_last_name}`}\n\t\t\t\t\t</Modal.Title>\n\t\t\t\t</Modal.Header>\n\n\t\t\t\t<div class=\"grid gap-4 px-4 pb-4 md:grid-cols-2\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"text-sm text-gray-500\">Email</div>\n\t\t\t\t\t\t<div class=\"font-medium\">{selectedUser.email}</div>\n\t\t\t\t\t\t<div class=\"mt-2 text-sm text-gray-500\">Phone</div>\n\t\t\t\t\t\t<div class=\"font-medium\">{selectedUser.phone}</div>\n\t\t\t\t\t\t<div class=\"mt-2 text-sm text-gray-500\">Joined</div>\n\t\t\t\t\t\t<div class=\"font-medium\">\n\t\t\t\t\t\t\t{new Date(selectedUser.created_at || '').toLocaleString()}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"text-sm text-gray-500\">Profile</div>\n\t\t\t\t\t\t{#if selectedUser.profile_pic_url}\n\t\t\t\t\t\t\t<img src={selectedUser.profile_pic_url} alt=\"profile\" class=\"max-h-32 rounded\" />\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t<div class=\"mt-3\">\n\t\t\t\t\t\t\t<div class=\"text-xs text-gray-500\">Loyalty stamps</div>\n\t\t\t\t\t\t\t<div class=\"font-medium\">{selectedUser.loyalty_stamps ?? 0}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<Separator class=\"my-3\" />\n\n\t\t\t\t<div class=\"px-4 pb-4\">\n\t\t\t\t\t<div class=\"mb-2 text-sm text-gray-600\">Recent bookings</div>\n\t\t\t\t\t{#if bookingUserHistory.length === 0}\n\t\t\t\t\t\t<div class=\"text-sm text-gray-500\">No recent bookings</div>\n\t\t\t\t\t{/if}\n\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t{#each bookingUserHistory as hb}\n\t\t\t\t\t\t\t<div class=\"flex items-center justify-between rounded bg-gray-50 p-2\">\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<div class=\"font-medium\">{new Date(hb.start_time).toLocaleString()}</div>\n\t\t\t\t\t\t\t\t\t<div class=\"text-xs text-gray-500\">\n\t\t\t\t\t\t\t\t\t\t{hb.status} \u2022 {hb.services.map((s) => s.service_name).join(', ')}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<Button variant=\"outline\" onclick={() => openBookingModal(hb.id)}>Open</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<Modal.Footer class=\"flex items-center justify-end gap-2\">\n\t\t\t\t\t<Button onclick={() => (showUserModal = false)}>Close</Button>\n\t\t\t\t</Modal.Footer>\n\t\t\t</Modal.Content>\n\t\t</Modal.Root>\n\t{/if}\n\n\t{#if selectedBooking}\n\t\t<Modal.Root bind:open={showBookingModal}>\n\t\t\t<Modal.Content class=\"max-h-[90vh] max-w-sm overflow-y-auto md:max-w-3xl\">\n\t\t\t\t<Modal.Header>\n\t\t\t\t\t<Modal.Title class=\"text-lg font-semibold\">Booking Details</Modal.Title>\n\t\t\t\t\t<div class=\"mt-1 text-sm text-gray-500\">ID: {selectedBooking.id}</div>\n\t\t\t\t</Modal.Header>\n\n\t\t\t\t<div class=\"space-y-6 px-4 pb-4\">\n\t\t\t\t\t<!-- Status Badge -->\n\t\t\t\t\t<div class=\"flex items-center gap-2\">\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclass=\"inline-flex items-center rounded-full px-3 py-1 text-sm font-medium\n\t\t\t\t\t\t{selectedBooking.status === 'pending'\n\t\t\t\t\t\t\t\t? 'bg-yellow-100 text-yellow-800'\n\t\t\t\t\t\t\t\t: selectedBooking.status === 'confirmed'\n\t\t\t\t\t\t\t\t\t? 'bg-emerald-100 text-emerald-800'\n\t\t\t\t\t\t\t\t\t: selectedBooking.status === 'in_progress'\n\t\t\t\t\t\t\t\t\t\t? 'bg-blue-100 text-blue-800'\n\t\t\t\t\t\t\t\t\t\t: selectedBooking.status === 'completed'\n\t\t\t\t\t\t\t\t\t\t\t? 'bg-green-100 text-green-800'\n\t\t\t\t\t\t\t\t\t\t\t: selectedBooking.status === 'client_cancelled'\n\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-red-100 text-red-800'\n\t\t\t\t\t\t\t\t\t\t\t\t: selectedBooking.status === 'we_cancelled'\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-rose-100 text-rose-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: selectedBooking.status === 're-schedule'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-purple-100 text-purple-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: selectedBooking.status === 'no_show'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-gray-100 text-gray-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'bg-gray-100 text-gray-800'}\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{selectedBooking.status.charAt(0).toUpperCase() + selectedBooking.status.slice(1)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Customer Information -->\n\t\t\t\t\t<div class=\"rounded-lg border border-gray-200 bg-gray-50 p-4\">\n\t\t\t\t\t\t<h3 class=\"mb-3 text-sm font-semibold uppercase tracking-wide text-gray-600\">\n\t\t\t\t\t\t\tCustomer Information\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t<div class=\"grid gap-3 md:grid-cols-2\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<div class=\"text-xs text-gray-500\">Name</div>\n\t\t\t\t\t\t\t\t<div class=\"font-medium\">{selectedBooking.user?.full_name || '\u2014'}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<div class=\"text-xs text-gray-500\">Email</div>\n\t\t\t\t\t\t\t\t<div class=\"break-all font-medium\">{selectedBooking.user?.email || '\u2014'}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<div class=\"text-xs text-gray-500\">Phone</div>\n\t\t\t\t\t\t\t\t<div class=\"font-medium\">{selectedBooking.user?.phone || '\u2014'}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<div class=\"text-xs text-gray-500\">Customer ID</div>\n\t\t\t\t\t\t\t\t<div class=\"truncate font-mono text-sm\">{selectedBooking.user?.id || '\u2014'}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{#if selectedBooking.user?.loyalty_stamps !== undefined && selectedBooking.user?.loyalty_stamps !== null}\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<div class=\"text-xs text-gray-500\">Loyalty Stamps</div>\n\t\t\t\t\t\t\t\t\t<div class=\"font-medium\">{selectedBooking.user.loyalty_stamps}</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t{#if selectedBooking.user?.referral_code}\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<div class=\"text-xs text-gray-500\">Referral Code</div>\n\t\t\t\t\t\t\t\t\t<div class=\"font-medium\">{selectedBooking.user.referral_code}</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t{#if selectedBooking.user?.referral_code_uses !== undefined && selectedBooking.user?.referral_code_uses !== null}\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<div class=\"text-xs text-gray-500\">Referral Uses</div>\n\t\t\t\t\t\t\t\t\t<div class=\"font-medium\">{selectedBooking.user.referral_code_uses}</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{#if selectedBooking.user?.notes}\n\t\t\t\t\t\t\t<div class=\"mt-3 rounded-md border border-blue-200 bg-blue-50 p-3\">\n\t\t\t\t\t\t\t\t<div class=\"mb-1 text-xs font-semibold text-blue-800\">Customer Notes</div>\n\t\t\t\t\t\t\t\t<div class=\"text-sm text-blue-900\">{selectedBooking.user.notes}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Appointment Details -->\n\t\t\t\t\t<div class=\"rounded-lg border border-gray-200 bg-gray-50 p-4\">\n\t\t\t\t\t\t<h3 class=\"mb-3 text-sm font-semibold uppercase tracking-wide text-gray-600\">\n\t\t\t\t\t\t\tAppointment Details\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t<div class=\"grid gap-3 md:grid-cols-2\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<div class=\"text-xs text-gray-500\">Scheduled Date & Time</div>\n\t\t\t\t\t\t\t\t<div class=\"font-medium\">\n\t\t\t\t\t\t\t\t\t{new Date(selectedBooking.start_time).toLocaleString()}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<div class=\"text-xs text-gray-500\">Duration</div>\n\t\t\t\t\t\t\t\t<div class=\"font-medium\">{selectedBooking.duration_minutes} minutes</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<div class=\"text-xs text-gray-500\">Created</div>\n\t\t\t\t\t\t\t\t<div class=\"text-sm\">{new Date(selectedBooking.created_at).toLocaleString()}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<div class=\"text-xs text-gray-500\">Last Updated</div>\n\t\t\t\t\t\t\t\t<div class=\"text-sm\">{new Date(selectedBooking.updated_at).toLocaleString()}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{#if selectedBooking.created_by}\n\t\t\t\t\t\t\t\t<div class=\"md:col-span-2\">\n\t\t\t\t\t\t\t\t\t<div class=\"text-xs text-gray-500\">Created By</div>\n\t\t\t\t\t\t\t\t\t<div class=\"text-sm\">{selectedBooking.created_by}</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{#if selectedBooking.notes}\n\t\t\t\t\t\t\t<div class=\"mt-3 rounded-md border border-amber-200 bg-amber-50 p-3\">\n\t\t\t\t\t\t\t\t<div class=\"mb-1 text-xs font-semibold text-amber-800\">Booking Notes</div>\n\t\t\t\t\t\t\t\t<div class=\"text-sm text-amber-900\">{selectedBooking.notes}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Services -->\n\t\t\t\t\t{#if selectedBooking.services && selectedBooking.services.length > 0}\n\t\t\t\t\t\t<div class=\"rounded-lg border border-gray-200 bg-gray-50 p-4\">\n\t\t\t\t\t\t\t<h3 class=\"mb-3 text-sm font-semibold uppercase tracking-wide text-gray-600\">\n\t\t\t\t\t\t\t\tServices\n\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t<div class=\"space-y-3\">\n\t\t\t\t\t\t\t\t{#each selectedBooking.services as service}\n\t\t\t\t\t\t\t\t\t<div class=\"rounded-md border border-gray-300 bg-white p-3\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"font-medium\">{service.service_name || '\u2014'}</div>\n\t\t\t\t\t\t\t\t\t\t{#if service.service_description}\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"mt-1 text-sm text-gray-600\">{service.service_description}</div>\n\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t\t<div class=\"mt-2 flex items-center justify-between text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"text-gray-600\">{service.duration_minutes} min</span>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"font-semibold\">\u00a3{service.price?.toFixed(2) || '0.00'}</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t{/if}\n\n\t\t\t\t\t<!-- Financial Summary -->\n\t\t\t\t\t<div class=\"rounded-lg border border-gray-200 bg-gray-50 p-4\">\n\t\t\t\t\t\t<h3 class=\"mb-3 text-sm font-semibold uppercase tracking-wide text-gray-600\">\n\t\t\t\t\t\t\tFinancial Summary\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t\t<div class=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t<span class=\"text-sm text-gray-600\">Total Amount</span>\n\t\t\t\t\t\t\t\t<span class=\"font-semibold\">\u00a3{selectedBooking.total_amount.toFixed(2)}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"flex items-center justify-between\">\n\t\t\t\t\t\t\t\t<span class=\"text-sm text-gray-600\">Amount Paid</span>\n\t\t\t\t\t\t\t\t<span class=\"font-semibold text-green-700\"\n\t\t\t\t\t\t\t\t\t>\u00a3{selectedBooking.amount_paid.toFixed(2)}</span\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"flex items-center justify-between border-t border-gray-300 pt-2\">\n\t\t\t\t\t\t\t\t<span class=\"font-medium text-gray-900\">Amount Due</span>\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclass=\"text-lg font-bold {selectedBooking.amount_due > 0\n\t\t\t\t\t\t\t\t\t\t? 'text-red-600'\n\t\t\t\t\t\t\t\t\t\t: 'text-green-600'}\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\u00a3{selectedBooking.amount_due.toFixed(2)}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Payments -->\n\t\t\t\t\t{#if selectedBooking.payments && selectedBooking.payments.length > 0}\n\t\t\t\t\t\t<div class=\"rounded-lg border border-gray-200 bg-gray-50 p-4\">\n\t\t\t\t\t\t\t<h3 class=\"mb-3 text-sm font-semibold uppercase tracking-wide text-gray-600\">\n\t\t\t\t\t\t\t\tPayment History\n\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t<div class=\"space-y-3\">\n\t\t\t\t\t\t\t\t{#each selectedBooking.payments as payment}\n\t\t\t\t\t\t\t\t\t<div class=\"rounded-md border border-gray-300 bg-white p-3\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"flex items-start justify-between\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"flex-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"font-medium capitalize\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>{payment.payment_method.replace('_', ' ')}</span\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium\n\t\t\t\t\t\t\t\t\t\t\t{payment.status === 'completed'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-green-100 text-green-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: payment.status === 'pending'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-yellow-100 text-yellow-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: payment.status === 'failed'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-red-100 text-red-800'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'bg-gray-100 text-gray-800'}\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{payment.status}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"mt-1 text-xs text-gray-500\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{payment.payment_type.charAt(0).toUpperCase() +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpayment.payment_type.slice(1)}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t{#if payment.vendor_code || payment.invoice_number}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"mt-1 text-xs text-gray-500\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{#if payment.vendor_code}Vendor: {payment.vendor_code}{/if}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{#if payment.vendor_code && payment.invoice_number}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\u2022\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{#if payment.invoice_number}Invoice: #{payment.invoice_number}{/if}\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t\t\t\t{#if payment.is_vat_applicable}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"mt-2 text-xs text-gray-600\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>Net: \u00a3{payment.net_amount?.toFixed(2) || '0.00'}</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tVAT ({(payment.vat_rate || 0) * 100}%): \u00a3{payment.vat_amount?.toFixed(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t2\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) || '0.00'}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"mt-1 text-xs text-gray-400\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{new Date(payment.created_at).toLocaleString()}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"text-right font-semibold\">\n\t\t\t\t\t\t\t\t\t\t\t\t\u00a3{payment.amount.toFixed(2)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t{/if}\n\t\t\t\t</div>\n\n\t\t\t\t<Modal.Footer class=\"flex items-center justify-end gap-2\">\n\t\t\t\t\t<Button onclick={() => (showBookingModal = false)}>Close</Button>\n\t\t\t\t</Modal.Footer>\n\t\t\t</Modal.Content>\n\t\t</Modal.Root>\n\t{/if}\n\n\t<!-- Booking Modal -->\n\t{#if showServiceModal}\n\t\t<!-- Add Service Modal -->\n\t\t<Modal.Root bind:open={showServiceModal}>\n\t\t\t<Modal.Content class=\"max-h-[90vh] max-w-sm overflow-y-auto md:max-w-lg\">\n\t\t\t\t<Modal.Header>\n\t\t\t\t\t<Modal.Title class=\"text-lg font-semibold\">Add New Service</Modal.Title>\n\t\t\t\t\t<Modal.Description>Create a new service that customers can book.</Modal.Description>\n\t\t\t\t</Modal.Header>\n\n\t\t\t\t<div class=\"space-y-4 px-4 pb-4\">\n\t\t\t\t\t<!-- Service Name -->\n\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t<label for=\"service-name\" class=\"text-sm font-medium\">Service Name *</label>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tid=\"service-name\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tplaceholder=\"e.g., Haircut, Color, Blowdry\"\n\t\t\t\t\t\t\tbind:value={newService.name}\n\t\t\t\t\t\t\tonblur={validateNameField}\n\t\t\t\t\t\t\tclass=\"w-full border-red-500={serviceErrors.name}\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{#if serviceErrors.name}\n\t\t\t\t\t\t\t<p class=\"text-sm text-red-600\">{serviceErrors.name}</p>\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Description -->\n\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t<label for=\"service-description\" class=\"text-sm font-medium\">Description</label>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tid=\"service-description\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tplaceholder=\"Brief description of the service, will be shown to customers\"\n\t\t\t\t\t\t\tbind:value={newService.description}\n\t\t\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Price and Duration - Side by side on desktop -->\n\t\t\t\t\t<div class=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n\t\t\t\t\t\t<!-- Price -->\n\t\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t\t<label for=\"service-price\" class=\"text-sm font-medium\">Price (\u00a3) *</label>\n\t\t\t\t\t\t\t<div class=\"relative\">\n\t\t\t\t\t\t\t\t<span class=\"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-gray-500\">\u00a3</span\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\tid=\"service-price\"\n\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\tstep=\"0.01\"\n\t\t\t\t\t\t\t\t\tmin=\"0\"\n\t\t\t\t\t\t\t\t\tplaceholder=\"0.00\"\n\t\t\t\t\t\t\t\t\tbind:value={newService.price}\n\t\t\t\t\t\t\t\t\tonblur={validatePriceField}\n\t\t\t\t\t\t\t\t\tclass=\"w-full pl-8 border-red-500={serviceErrors.price}\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{#if serviceErrors.price}\n\t\t\t\t\t\t\t\t<p class=\"text-sm text-red-600\">{serviceErrors.price}</p>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<!-- Duration -->\n\t\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t\t<label for=\"service-duration\" class=\"text-sm font-medium\">Duration (minutes) *</label>\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tid=\"service-duration\"\n\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\tmin=\"1\"\n\t\t\t\t\t\t\t\tstep=\"1\"\n\t\t\t\t\t\t\t\tplaceholder=\"60\"\n\t\t\t\t\t\t\t\tbind:value={newService.duration_minutes}\n\t\t\t\t\t\t\t\tonblur={validateDurationField}\n\t\t\t\t\t\t\t\tclass=\"w-full border-red-500={serviceErrors.duration_minutes}\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{#if serviceErrors.duration_minutes}\n\t\t\t\t\t\t\t\t<p class=\"text-sm text-red-600\">{serviceErrors.duration_minutes}</p>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Patch Test and Minimum Age - Side by side on desktop -->\n\t\t\t\t\t<div class=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n\t\t\t\t\t\t<!-- Patch Test Duration -->\n\t\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t\t<label for=\"patch-test-duration\" class=\"text-sm font-medium\"\n\t\t\t\t\t\t\t\t>Patch Test Duration (hours)</label\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tid=\"patch-test-duration\"\n\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\tmin=\"0\"\n\t\t\t\t\t\t\t\tstep=\"1\"\n\t\t\t\t\t\t\t\tplaceholder=\"0\"\n\t\t\t\t\t\t\t\tbind:value={newService.patch_test_duration_hours}\n\t\t\t\t\t\t\t\tonblur={validatePatchTestField}\n\t\t\t\t\t\t\t\tclass=\"w-full border-red-500={serviceErrors.patch_test_duration_hours}\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{#if serviceErrors.patch_test_duration_hours}\n\t\t\t\t\t\t\t\t<p class=\"text-sm text-red-600\">{serviceErrors.patch_test_duration_hours}</p>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t<p class=\"text-xs text-gray-500\">Hours required before service (0 for none)</p>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<!-- Minimum Age -->\n\t\t\t\t\t\t<div class=\"space-y-2\">\n\t\t\t\t\t\t\t<label for=\"minimum-age\" class=\"text-sm font-medium\">Minimum Age</label>\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tid=\"minimum-age\"\n\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\tmin=\"0\"\n\t\t\t\t\t\t\t\tmax=\"100\"\n\t\t\t\t\t\t\t\tstep=\"1\"\n\t\t\t\t\t\t\t\tplaceholder=\"0\"\n\t\t\t\t\t\t\t\tbind:value={newService.minimum_age_required}\n\t\t\t\t\t\t\t\tonblur={validateMinimumAgeField}\n\t\t\t\t\t\t\t\tclass=\"w-full border-red-500={serviceErrors.minimum_age_required}\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{#if serviceErrors.minimum_age_required}\n\t\t\t\t\t\t\t\t<p class=\"text-sm text-red-600\">{serviceErrors.minimum_age_required}</p>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t<p class=\"text-xs text-gray-500\">0 for no age restriction</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<Modal.Footer class=\"flex items-center justify-end gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tonclick={() => {\n\t\t\t\t\t\t\tshowServiceModal = false;\n\t\t\t\t\t\t\tresetServiceForm();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tdisabled={creatingService}\n\t\t\t\t\t>\n\t\t\t\t\t\tCancel\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button onclick={createService} disabled={creatingService || !isFormValid}>\n\t\t\t\t\t\t{creatingService ? 'Creating...' : 'Create Service'}\n\t\t\t\t\t</Button>\n\t\t\t\t</Modal.Footer>\n\t\t\t</Modal.Content>\n\t\t</Modal.Root>\n\t{/if}\n{/if}",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\nimport { error } from '@sveltejs/kit';\nimport type { RequestHandler } from './$types';\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\nconst BACKEND_URL =\n    import.meta.env.VITE_BACKEND_URL || 'http://localhost:8080';\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\nasync function proxyRequest(request: Request, path: string) {",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\n    const incomingUrl = new URL(request.url);\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\n    const queryString = incomingUrl.search;\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\n    const url = `${BACKEND_URL}/api/${path}${queryString}`;\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\n    try {",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\n        const headers = new Headers(request.headers);\n        headers.delete('host');\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\n        const backendRes = await fetch(url, {\n            method: request.method,\n            headers,\n            body: ['GET', 'HEAD'].includes(request.method)\n                ? undefined\n                : await request.text()\n        });\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\n        // Forward everything transparently",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\n        const resHeaders = new Headers(backendRes.headers);",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\n        return new Response(backendRes.body, {\n            status: backendRes.status,\n            headers: resHeaders\n        });",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\n    } catch (err) {\n        console.error('Proxy error:', err);\n        return error(502, 'Backend unreachable');\n    }\n}\n\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\nexport const GET: RequestHandler = ({ request, params }) => proxyRequest(request, params.path);",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\nexport const POST: RequestHandler = ({ request, params }) => proxyRequest(request, params.path);",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\nexport const PUT: RequestHandler = ({ request, params }) => proxyRequest(request, params.path);",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\nexport const DELETE: RequestHandler = ({ request, params }) => proxyRequest(request, params.path);",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts\nLanguage: typescript\n\nexport const PATCH: RequestHandler = ({ request, params }) => proxyRequest(request, params.path);",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n// src/lib/stores/auth.svelte.ts\nimport { browser } from '$app/environment';\nimport { goto } from '$app/navigation';\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\nexport type UserRole = 'unverified_email' | 'verified_email' | 'admin' | 'guest' | 'affiliate';\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\nexport interface DecodedToken {\n    user_id: string;\n    role: UserRole;\n    exp: number;\n}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\nexport interface User {\n    id: string;\n    email: string;\n    role: UserRole;\n    firstName: string;\n    lastName: string;\n    phone?: string;\n    dateOfBirth?: string;\n    loyaltyStamps?: number;\n    referralCode?: string;\n    profilePicUrl?: string;\n}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\nclass AuthStore {\n    private token = $state<string | null>(null);\n    private user = $state<User | null>(null);\n    private loading = $state(true);\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    constructor() {",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        if (browser) {\n            this.initializeAuth();\n        }\n    }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    get isAuthenticated() {\n        return this.token !== null && this.user !== null;\n    }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    get currentUser() {\n        return this.user;\n    }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    get currentToken() {\n        return this.token;\n    }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    get isLoading() {\n        return this.loading;\n    }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    get hasLoaded() {\n        return !this.loading;\n    }\n\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    private initializeAuth() {",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        const storedToken = localStorage.getItem('authToken');",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        if (storedToken) {",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n            const decoded = this.decodeToken(storedToken);",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n            if (decoded && !this.isTokenExpired(decoded)) {\n                this.token = storedToken;",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n                // Set basic user info from token",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n                this.user = {\n                    id: decoded.user_id,\n                    role: decoded.role,\n                    email: '',\n                    firstName: '',\n                    lastName: ''\n                };\n                this.fetchUserProfile();",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n            } else {\n                this.clearAuth();\n            }\n        }\n        this.loading = false;\n    }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    private decodeToken(token: string): DecodedToken | null {",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        try {",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n            const payload = token.split('.')[1];",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n            const decoded = JSON.parse(atob(payload));\n            return decoded;",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        } catch (e) {\n            console.error('Failed to decode token:', e);\n            return null;\n        }\n    }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    private isTokenExpired(decoded: DecodedToken): boolean {\n        return decoded.exp * 1000 < Date.now();\n    }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    // Simple setters - UI handles the API calls",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    setToken(token: string) {\n        this.token = token;",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        if (browser) {\n            localStorage.setItem('authToken', token);\n        }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        // Decode to get basic info",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        const decoded = this.decodeToken(token);",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        if (decoded) {",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n            this.user = {\n                id: decoded.user_id,\n                role: decoded.role,\n                email: '',\n                firstName: '',\n                lastName: ''\n            };\n            this.fetchUserProfile();\n        }\n    }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    private async fetchUserProfile() {\n        if (!this.token) return;\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        try {",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n            const response = await fetch('/api/user/profile', {",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n                headers: {\n                    'Authorization': `Bearer ${this.token}`\n                }\n            });\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n            if (!response.ok) {\n                throw new Error('Failed to fetch profile');\n            }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n            const userData = await response.json();\n            this.user = userData;",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        } catch (error) {\n            console.error('Failed to fetch user profile:', error);\n            this.clearAuth();\n        }\n    }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    // inside AuthStore",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    logout = () => {\n        this.clearAuth();\n        goto('/');\n    };\n\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    private clearAuth() {\n        this.token = null;\n        this.user = null;",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        if (browser) {\n            localStorage.removeItem('authToken');\n        }\n    }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    hasRole(requiredRole: UserRole | UserRole[]): boolean {\n        if (!this.user) return false;\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        const roles = Array.isArray(requiredRole) ? requiredRole : [requiredRole];\n        return roles.includes(this.user.role);\n    }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    isAdmin(): boolean {\n        return this.hasRole('admin');\n    }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    isVerified(): boolean {\n        return this.hasRole(['verified_email', 'admin']);\n    }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    // Refresh token before it expires",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    async refreshTokenIfNeeded() {\n        if (!this.token) return;\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        const decoded = this.decodeToken(this.token);",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        if (!decoded) {\n            this.clearAuth();\n            return;\n        }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        // Refresh if token expires in less than 2 weeks",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        const threeDays = 2 * 7 * 24 * 60 * 60 * 1000;",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n        if (decoded.exp * 1000 - Date.now() < threeDays) {",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n            try {",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n                const response = await fetch('/api/refresh-token', {\n                    method: 'POST',",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n                    headers: {\n                        'Authorization': `Bearer ${this.token}`\n                    }\n                });\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n                if (response.ok) {",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n                    const data = await response.json();\n                    this.setToken(data.token);",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n                } else {\n                    this.clearAuth();\n                }",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n            } catch (error) {\n                console.error('Token refresh failed:', error);\n            }\n        }\n    }\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    // Manual refresh method",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\n    async refreshProfile() {\n        await this.fetchUserProfile();\n    }\n}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts\nLanguage: typescript\n\nexport const authStore = new AuthStore();",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/PortfolioCarousel.svelte\nType: style\n\n\t@keyframes scroll {\n\t\t0% {\n\t\t\ttransform: translateX(0);\n\t\t}\n\t\t100% {\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\t}\n\n\t.animate-scroll {\n\t\tanimation: scroll 40s linear infinite;\n\t\twidth: calc(256px * 16); /* 16 images total (8 duplicated) * 256px width */\n\t}\n\n\t/* images scale on hover */\n\t.group:hover img {\n\t\ttransform: scale(1.05);\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/PortfolioCarousel.svelte\nType: markup\n<section class=\"w-full overflow-hidden py-16\">\n\t<div class=\"mx-auto max-w-6xl px-6\">\n\t\t<h2 class=\"mb-12 text-center text-2xl font-semibold\">Our Portfolio</h2>\n\t</div>\n\n\t<div class=\"relative w-full overflow-hidden\">\n\t\t<div class=\"animate-scroll flex\">\n\t\t\t{#each [...portfolioImages, ...portfolioImages] as image}\n\t\t\t\t<div class=\"group flex-shrink-0\">\n\t\t\t\t\t<img\n\t\t\t\t\t\tsrc={image.src}\n\t\t\t\t\t\talt={image.alt}\n\t\t\t\t\t\tclass=\"h-80 w-64 object-cover saturate-100 transition-all duration-500 md:saturate-25 md:group-hover:saturate-100\"\n\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t{/each}\n\t\t</div>\n\t</div>\n</section>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/ContactCard.svelte\nType: markup\n<div class=\"mx-auto max-w-sm\">\n\t<div class=\"rounded-lg border-3 border-gray-200 bg-white p-6\">\n\t\t<!-- Profile Picture -->\n\t\t<div class=\"mb-4 flex justify-center\">\n\t\t\t<div class=\"h-24 w-24 overflow-hidden rounded-full border-4 border-white shadow-lg\">\n\t\t\t\t<img src={profileImage} alt={altText} class=\"h-full w-full object-cover\" />\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- Name and Role -->\n\t\t<div class=\"mb-4 text-center\">\n\t\t\t<h2 class=\"text-xl font-semibold text-gray-900\">{name}</h2>\n\t\t\t<p class=\"text-gray-500\">{role}</p>\n\t\t</div>\n\n\t\t<!-- Contact Info -->\n\t\t<div class=\"space-y-2\">\n\t\t\t<div class=\"flex items-center space-x-2\">\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-map-pin\"\n\t\t\t\t\t><path d=\"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z\"></path><circle\n\t\t\t\t\t\tcx=\"12\"\n\t\t\t\t\t\tcy=\"10\"\n\t\t\t\t\t\tr=\"3\"\n\t\t\t\t\t></circle></svg\n\t\t\t\t>\n\t\t\t\t<span>{address}</span>\n\t\t\t</div>\n\n\t\t\t<div class=\"flex items-center space-x-2\">\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-phone\"\n\t\t\t\t\t><path\n\t\t\t\t\t\td=\"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z\"\n\t\t\t\t\t></path></svg\n\t\t\t\t>\n\t\t\t\t<a href={`tel:${phone}`} class=\"text-primary hover:underline\">{phone}</a>\n\t\t\t</div>\n\n\t\t\t<div class=\"flex items-center space-x-2\">\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-mail\"\n\t\t\t\t\t><path d=\"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z\"\n\t\t\t\t\t></path><polyline points=\"22,6 12,13 2,6\"></polyline></svg\n\t\t\t\t>\n\t\t\t\t<a href={`mailto:${email}`} class=\"text-primary hover:underline\">{email}</a>\n\t\t\t</div>\n\n\t\t\t<div class=\"flex items-center space-x-2\">\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-instagram\"\n\t\t\t\t\t><rect x=\"2\" y=\"2\" width=\"20\" height=\"20\" rx=\"5\" ry=\"5\"></rect><path\n\t\t\t\t\t\td=\"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z\"\n\t\t\t\t\t></path><line x1=\"17.5\" y1=\"6.5\" x2=\"17.51\" y2=\"6.5\"></line></svg\n\t\t\t\t>\n\t\t\t\t<a\n\t\t\t\t\thref={`https://instagram.com/${instagram}`}\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\trel=\"noopener\"\n\t\t\t\t\tclass=\"text-primary hover:underline\">@{instagram}</a\n\t\t\t\t>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/RequiredLabel.svelte\nType: markup\n<Label for={forId}>\n\t{text}\n\t<span class=\"ml-1 font-bold\" style=\"color: var(--chart-1)\"> * </span>\n</Label>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/NavBar.svelte\nType: function\nName: toggleMenu\nDoc: \nCode:\n\tfunction toggleMenu() {\n\t\tmobileMenuOpen = !mobileMenuOpen;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/NavBar.svelte\nType: function\nName: canShow\nDoc: \nCode:\n\tconst canShow = (link: { href: string; label: string; showWhen: string; width: string }) => {\n\t\tif (authStore.isLoading) return true; // keep skeleton placeholders\n\n\t\t// hide booking link for admins\n\t\tif (link.href === '/book' && authStore.currentUser?.role === 'admin') return false;\n\t\tif (link.href === '/contact' && authStore.currentUser?.role === 'admin') return false;\n\n\t\tif (link.showWhen === 'always') return true;\n\t\tif (link.showWhen === 'guest' && !authStore.isAuthenticated) return true;\n\t\tif (link.showWhen === 'auth' && authStore.isAuthenticated) return true;\n\t\tif (link.showWhen === 'admin' && authStore.currentUser?.role === 'admin') return true;\n\t\treturn false;\n\t};\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/NavBar.svelte\nType: style\n\n\t.frosty-nav {\n\t\tbackdrop-filter: saturate(180%) blur(10px);\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/NavBar.svelte\nType: markup\n<nav\n\tclass=\"fixed left-0 top-0 z-50 w-full border-b border-gray-200\"\n\tclass:frosty-nav={!mobileMenuOpen}\n\tclass:bg-background={mobileMenuOpen}\n>\n\t<div class=\"mx-auto max-w-7xl px-4 md:px-6 lg:px-8\">\n\t\t<div class=\"flex h-16 items-center justify-between\">\n\t\t\t<!-- Left: Social Icons -->\n\t\t\t<div class=\"flex items-center space-x-4\">\n\t\t\t\t<a\n\t\t\t\t\thref=\"https://instagram.com\"\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\trel=\"noopener\"\n\t\t\t\t\tclass=\"hover:text-primary text-gray-600\"\n\t\t\t\t\taria-label=\"Instagram\"\n\t\t\t\t>\n\t\t\t\t\t<svg\n\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\twidth=\"24\"\n\t\t\t\t\t\theight=\"24\"\n\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<rect x=\"2\" y=\"2\" width=\"20\" height=\"20\" rx=\"5\" ry=\"5\"></rect>\n\t\t\t\t\t\t<path d=\"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z\"></path>\n\t\t\t\t\t\t<line x1=\"17.5\" y1=\"6.5\" x2=\"17.51\" y2=\"6.5\"></line>\n\t\t\t\t\t</svg>\n\t\t\t\t</a>\n\t\t\t</div>\n\n\t\t\t<!-- Center: Desktop Links -->\n\t\t\t<div class=\"hidden space-x-8 md:flex\">\n\t\t\t\t{#each links as link}\n\t\t\t\t\t{#if canShow(link)}\n\t\t\t\t\t\t{#if authStore.isLoading}\n\t\t\t\t\t\t\t<Skeleton class={`h-4 ${link.width} rounded`} />\n\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t<a href={link.href} class=\"hover:text-primary font-medium text-gray-800\"\n\t\t\t\t\t\t\t\t>{link.label}</a\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t{/if}\n\t\t\t\t{/each}\n\t\t\t</div>\n\n\t\t\t<!-- Desktop Login Button -->\n\t\t\t<div class=\"hidden items-center md:flex\">\n\t\t\t\t{#if !authStore.isLoading && !authStore.isAuthenticated && $page.url.pathname !== '/login'}\n\t\t\t\t\t<Button href=\"/login\">Login</Button>\n\t\t\t\t{/if}\n\t\t\t\t{#if authStore.isLoading}\n\t\t\t\t\t<Skeleton class=\"h-8 w-16 rounded\" />\n\t\t\t\t{/if}\n\t\t\t</div>\n\n\t\t\t<!-- Mobile: Burger -->\n\t\t\t<div class=\"flex items-center md:hidden\">\n\t\t\t\t<button on:click={toggleMenu} class=\"focus:outline-none\" aria-label=\"Toggle menu\">\n\t\t\t\t\t<svg class=\"h-6 w-6 text-gray-700\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\td=\"M4 6h16M4 12h16M4 18h16\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<!-- Mobile Menu -->\n\t{#if mobileMenuOpen}\n\t\t<div class=\"bg-background border-b border-gray-200 md:hidden\">\n\t\t\t<div class=\"space-y-1 px-2 pb-3 pt-2\">\n\t\t\t\t{#each links as link}\n\t\t\t\t\t{#if canShow(link)}\n\t\t\t\t\t\t{#if authStore.isLoading}\n\t\t\t\t\t\t\t<Skeleton class=\"h-4 w-full rounded\" />\n\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref={link.href}\n\t\t\t\t\t\t\t\tclass=\"text-primary block rounded px-3 py-2 text-center hover:text-gray-800\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{link.label}\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t{/if}\n\t\t\t\t{/each}\n\n\t\t\t\t{#if authStore.isLoading}\n\t\t\t\t\t<Skeleton class=\"mt-2 h-8 w-full rounded\" />\n\t\t\t\t{:else if !authStore.isAuthenticated}\n\t\t\t\t\t<Button href=\"/login\" class=\"mt-2 w-full text-center\">Login</Button>\n\t\t\t\t{/if}\n\t\t\t</div>\n\t\t</div>\n\t{/if}\n</nav>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/Calendar.svelte\nType: markup\n<Card.Root class=\"gap-0 p-0\">\n\t<Card.Content class=\"relative p-0 md:pr-48\">\n\t\t<div class=\"p-6\">\n\t\t\t<Calendar\n\t\t\t\ttype=\"single\"\n\t\t\t\tbind:value\n\t\t\t\tisDateUnavailable={(date) => bookedDates.some((d) => d.compare(date) === 0)}\n\t\t\t\tclass=\"bg-transparent p-0 [--cell-size:--spacing(10)] data-unavailable:line-through data-unavailable:opacity-100 md:[--cell-size:--spacing(12)] [&_[data-outside-month]]:hidden\"\n\t\t\t\tweekdayFormat=\"short\"\n\t\t\t/>\n\t\t</div>\n\t\t<div\n\t\t\tclass=\"no-scrollbar inset-y-0 right-0 flex max-h-72 w-full scroll-pb-6 flex-col gap-4 overflow-y-auto border-t p-6 md:absolute md:max-h-none md:w-48 md:border-t-0 md:border-l\"\n\t\t>\n\t\t\t<div class=\"grid gap-2\">\n\t\t\t\t{#each timeSlots as time (time)}\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant={selectedTime === time ? 'default' : 'outline'}\n\t\t\t\t\t\tonclick={() => (selectedTime = time)}\n\t\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{time}\n\t\t\t\t\t</Button>\n\t\t\t\t{/each}\n\t\t\t</div>\n\t\t</div>\n\t</Card.Content>\n\t<Card.Footer class=\"flex flex-col gap-4 border-t px-6 !py-5 md:flex-row\">\n\t\t<div class=\"text-sm\">\n\t\t\t{#if value && selectedTime}\n\t\t\t\tYour meeting is booked for\n\t\t\t\t<span class=\"font-medium\">\n\t\t\t\t\t{value.toDate(getLocalTimeZone()).toLocaleDateString('en-US', {\n\t\t\t\t\t\tweekday: 'long',\n\t\t\t\t\t\tday: 'numeric',\n\t\t\t\t\t\tmonth: 'short'\n\t\t\t\t\t})}\n\t\t\t\t</span>\n\t\t\t\tat <span class=\"font-medium\">{selectedTime}</span>.\n\t\t\t{:else}\n\t\t\t\tSelect a date and time for your meeting.\n\t\t\t{/if}\n\t\t</div>\n\t\t<Button\n\t\t\tdisabled={!value || !selectedTime}\n\t\t\tclass=\"w-full md:ml-auto md:w-auto\"\n\t\t\tvariant=\"outline\"\n\t\t>\n\t\t\tContinue\n\t\t</Button>\n\t</Card.Footer>\n</Card.Root>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/file-drop-zone.svelte\nType: function\nName: handleDrop\nDoc: \nCode:\n\tfunction handleDrop(e: DragEvent) {\n\t\te.preventDefault();\n\t\tdragging = false;\n\t\tconst files = Array.from(e.dataTransfer?.files ?? []);\n\t\tif (files.length) {\n\t\t\tonfiles(files);\n\t\t}\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/file-drop-zone.svelte\nType: function\nName: handleDragOver\nDoc: \nCode:\n\tfunction handleDragOver(e: DragEvent) {\n\t\te.preventDefault();\n\t\tdragging = true;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/file-drop-zone.svelte\nType: function\nName: handleDragLeave\nDoc: \nCode:\n\tfunction handleDragLeave(e: DragEvent) {\n\t\te.preventDefault();\n\t\tdragging = false;\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/file-drop-zone.svelte\nType: function\nName: handleFileSelect\nDoc: \nCode:\n\tfunction handleFileSelect(e: Event) {\n\t\tconst input = e.target as HTMLInputElement;\n\t\tconst files = Array.from(input.files ?? []);\n\t\tif (files.length) {\n\t\t\tonfiles(files);\n\t\t}\n\t\t// IMPORTANT: Reset the input value so the same file can be selected again\n\t\tinput.value = '';\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/file-drop-zone.svelte\nType: function\nName: openFileSelect\nDoc: \nCode:\n\tfunction openFileSelect() {\n\t\tfileInputEl.click();\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/file-drop-zone.svelte\nType: markup\n<div\n\trole=\"button\"\n\taria-label=\"Drop files or click to upload\"\n\ttabindex=\"0\"\n\tondragover={handleDragOver}\n\tondragleave={handleDragLeave}\n\tondrop={handleDrop}\n\tonclick={openFileSelect}\n\tonkeydown={(e) => {\n\t\t// Allow keyboard users to trigger the click with Enter or Space\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault();\n\t\t\topenFileSelect();\n\t\t}\n\t}}\n\tclass=\"rounded-lg border-2 border-dashed p-6 text-center transition-colors\n\t{dragging ? 'border-primary bg-primary/5' : 'border-gray-300'}\"\n>\n\t<input\n\t\ttype=\"file\"\n\t\tbind:this={fileInputEl}\n\t\t{accept}\n\t\t{multiple}\n\t\tonchange={handleFileSelect}\n\t\tclass=\"sr-only\"\n\t/>\n\n\t{@render children?.()}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/separator/index.ts\nLanguage: typescript\n\nimport Root from \"./separator.svelte\";\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/separator/index.ts\nLanguage: typescript\n\nexport {\n\tRoot,",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/separator/index.ts\nLanguage: typescript\n\n\t//\n\tRoot as Separator,\n};",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/separator/separator.svelte\nType: markup\n<SeparatorPrimitive.Root\n\tbind:ref\n\tdata-slot={dataSlot}\n\tclass={cn(\n\t\t\"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px\",\n\t\tclassName\n\t)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-cell.svelte\nType: markup\n<CalendarPrimitive.Cell\n\tbind:ref\n\tclass={cn(\n\t\t\"size-(--cell-size) relative p-0 text-center text-sm focus-within:z-20 [&:first-child[data-selected]_[data-bits-day]]:rounded-l-md [&:last-child[data-selected]_[data-bits-day]]:rounded-r-md\",\n\t\tclassName\n\t)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-months.svelte\nType: markup\n<div\n\tbind:this={ref}\n\tclass={cn(\"relative flex flex-col gap-4 md:flex-row\", className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-grid.svelte\nType: markup\n<CalendarPrimitive.Grid\n\tbind:ref\n\tclass={cn(\"mt-4 flex w-full border-collapse flex-col gap-1\", className)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-month-select.svelte\nType: markup\n<span\n\tclass={cn(\n\t\t\"has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative flex rounded-md border\",\n\t\tclassName\n\t)}\n>\n\t<CalendarPrimitive.MonthSelect bind:ref class=\"absolute inset-0 opacity-0\" {...restProps}>\n\t\t{#snippet child({ props, monthItems, selectedMonthItem })}\n\t\t\t<select {...props} {value} {onchange}>\n\t\t\t\t{#each monthItems as monthItem (monthItem.value)}\n\t\t\t\t\t<option\n\t\t\t\t\t\tvalue={monthItem.value}\n\t\t\t\t\t\tselected={value !== undefined\n\t\t\t\t\t\t\t? monthItem.value === value\n\t\t\t\t\t\t\t: monthItem.value === selectedMonthItem.value}\n\t\t\t\t\t>\n\t\t\t\t\t\t{monthItem.label}\n\t\t\t\t\t</option>\n\t\t\t\t{/each}\n\t\t\t</select>\n\t\t\t<span\n\t\t\t\tclass=\"[&>svg]:text-muted-foreground flex h-8 select-none items-center gap-1 rounded-md pl-2 pr-1 text-sm font-medium [&>svg]:size-3.5\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t>\n\t\t\t\t{monthItems.find((item) => item.value === value)?.label || selectedMonthItem.label}\n\t\t\t\t<ChevronDownIcon class=\"size-4\" />\n\t\t\t</span>\n\t\t{/snippet}\n\t</CalendarPrimitive.MonthSelect>\n</span>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-year-select.svelte\nType: markup\n<span\n\tclass={cn(\n\t\t\"has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative flex rounded-md border\",\n\t\tclassName\n\t)}\n>\n\t<CalendarPrimitive.YearSelect bind:ref class=\"absolute inset-0 opacity-0\" {...restProps}>\n\t\t{#snippet child({ props, yearItems, selectedYearItem })}\n\t\t\t<select {...props} {value}>\n\t\t\t\t{#each yearItems as yearItem (yearItem.value)}\n\t\t\t\t\t<option\n\t\t\t\t\t\tvalue={yearItem.value}\n\t\t\t\t\t\tselected={value !== undefined\n\t\t\t\t\t\t\t? yearItem.value === value\n\t\t\t\t\t\t\t: yearItem.value === selectedYearItem.value}\n\t\t\t\t\t>\n\t\t\t\t\t\t{yearItem.label}\n\t\t\t\t\t</option>\n\t\t\t\t{/each}\n\t\t\t</select>\n\t\t\t<span\n\t\t\t\tclass=\"[&>svg]:text-muted-foreground flex h-8 select-none items-center gap-1 rounded-md pl-2 pr-1 text-sm font-medium [&>svg]:size-3.5\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t>\n\t\t\t\t{yearItems.find((item) => item.value === value)?.label || selectedYearItem.label}\n\t\t\t\t<ChevronDownIcon class=\"size-4\" />\n\t\t\t</span>\n\t\t{/snippet}\n\t</CalendarPrimitive.YearSelect>\n</span>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-next-button.svelte\nType: markup\n{#snippet Fallback()}\n\t<ChevronRightIcon class=\"size-4\" />\n{/snippet}\n\n<CalendarPrimitive.NextButton\n\tbind:ref\n\tclass={cn(\n\t\tbuttonVariants({ variant }),\n\t\t\"size-(--cell-size) select-none bg-transparent p-0 disabled:opacity-50 rtl:rotate-180\",\n\t\tclassName\n\t)}\n\tchildren={children || Fallback}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-header.svelte\nType: markup\n<CalendarPrimitive.Header\n\tbind:ref\n\tclass={cn(\n\t\t\"h-(--cell-size) flex w-full items-center justify-center gap-1.5 text-sm font-medium\",\n\t\tclassName\n\t)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-head-cell.svelte\nType: markup\n<CalendarPrimitive.HeadCell\n\tbind:ref\n\tclass={cn(\n\t\t\"text-muted-foreground w-(--cell-size) rounded-md text-[0.8rem] font-normal\",\n\t\tclassName\n\t)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/index.ts\nLanguage: typescript\n\nimport Root from \"./calendar.svelte\";\nimport Cell from \"./calendar-cell.svelte\";\nimport Day from \"./calendar-day.svelte\";\nimport Grid from \"./calendar-grid.svelte\";\nimport Header from \"./calendar-header.svelte\";\nimport Months from \"./calendar-months.svelte\";\nimport GridRow from \"./calendar-grid-row.svelte\";\nimport Heading from \"./calendar-heading.svelte\";\nimport GridBody from \"./calendar-grid-body.svelte\";\nimport GridHead from \"./calendar-grid-head.svelte\";\nimport HeadCell from \"./calendar-head-cell.svelte\";\nimport NextButton from \"./calendar-next-button.svelte\";\nimport PrevButton from \"./calendar-prev-button.svelte\";\nimport MonthSelect from \"./calendar-month-select.svelte\";\nimport YearSelect from \"./calendar-year-select.svelte\";\nimport Month from \"./calendar-month.svelte\";\nimport Nav from \"./calendar-nav.svelte\";\nimport Caption from \"./calendar-caption.svelte\";\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/index.ts\nLanguage: typescript\n\nexport {\n\tDay,\n\tCell,\n\tGrid,\n\tHeader,\n\tMonths,\n\tGridRow,\n\tHeading,\n\tGridBody,\n\tGridHead,\n\tHeadCell,\n\tNextButton,\n\tPrevButton,\n\tNav,\n\tMonth,\n\tYearSelect,\n\tMonthSelect,\n\tCaption,",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/index.ts\nLanguage: typescript\n\n\t//\n\tRoot as Calendar,\n};",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-grid-head.svelte\nType: markup\n<CalendarPrimitive.GridHead bind:ref class={cn(className)} {...restProps} />",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-caption.svelte\nType: function\nName: formatYear\nDoc: \nCode:\n\tfunction formatYear(date: DateValue) {\n\t\tconst dateObj = date.toDate(getLocalTimeZone());\n\t\tif (typeof yearFormat === \"function\") return yearFormat(dateObj.getFullYear());\n\t\treturn new DateFormatter(locale, { year: yearFormat }).format(dateObj);\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-caption.svelte\nType: function\nName: formatMonth\nDoc: \nCode:\n\tfunction formatMonth(date: DateValue) {\n\t\tconst dateObj = date.toDate(getLocalTimeZone());\n\t\tif (typeof monthFormat === \"function\") return monthFormat(dateObj.getMonth() + 1);\n\t\treturn new DateFormatter(locale, { month: monthFormat }).format(dateObj);\n\t}\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-caption.svelte\nType: markup\n{#snippet MonthSelect()}\n\t<CalendarMonthSelect\n\t\t{months}\n\t\t{monthFormat}\n\t\tvalue={month.month}\n\t\tonchange={(e) => {\n\t\t\tif (!placeholder) return;\n\t\t\tconst v = Number.parseInt(e.currentTarget.value);\n\t\t\tconst newPlaceholder = placeholder.set({ month: v });\n\t\t\tplaceholder = newPlaceholder.subtract({ months: monthIndex });\n\t\t}}\n\t/>\n{/snippet}\n\n{#snippet YearSelect()}\n\t<CalendarYearSelect {years} {yearFormat} value={month.year} />\n{/snippet}\n\n{#if captionLayout === \"dropdown\"}\n\t{@render MonthSelect()}\n\t{@render YearSelect()}\n{:else if captionLayout === \"dropdown-months\"}\n\t{@render MonthSelect()}\n\t{#if placeholder}\n\t\t{formatYear(placeholder)}\n\t{/if}\n{:else if captionLayout === \"dropdown-years\"}\n\t{#if placeholder}\n\t\t{formatMonth(placeholder)}\n\t{/if}\n\t{@render YearSelect()}\n{:else}\n\t{formatMonth(month)} {formatYear(month)}\n{/if}",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-heading.svelte\nType: markup\n<CalendarPrimitive.Heading\n\tbind:ref\n\tclass={cn(\"px-(--cell-size) text-sm font-medium\", className)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-prev-button.svelte\nType: markup\n{#snippet Fallback()}\n\t<ChevronLeftIcon class=\"size-4\" />\n{/snippet}\n\n<CalendarPrimitive.PrevButton\n\tbind:ref\n\tclass={cn(\n\t\tbuttonVariants({ variant }),\n\t\t\"size-(--cell-size) select-none bg-transparent p-0 disabled:opacity-50 rtl:rotate-180\",\n\t\tclassName\n\t)}\n\tchildren={children || Fallback}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-nav.svelte\nType: markup\n<nav\n\t{...restProps}\n\tbind:this={ref}\n\tclass={cn(\"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1\", className)}\n>\n\t{@render children?.()}\n</nav>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-day.svelte\nType: markup\n<CalendarPrimitive.Day\n\tbind:ref\n\tclass={cn(\n\t\tbuttonVariants({ variant: \"ghost\" }),\n\t\t\"size-(--cell-size) flex select-none flex-col items-center justify-center gap-1 whitespace-nowrap p-0 font-normal leading-none\",\n\t\t\"[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground [&[data-today][data-disabled]]:text-muted-foreground\",\n\t\t\"data-[selected]:bg-primary dark:data-[selected]:hover:bg-accent/50 data-[selected]:text-primary-foreground\",\n\t\t// Outside months\n\t\t\"[&[data-outside-month]:not([data-selected])]:text-muted-foreground [&[data-outside-month]:not([data-selected])]:hover:text-accent-foreground\",\n\t\t// Disabled\n\t\t\"data-[disabled]:text-muted-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n\t\t// Unavailable\n\t\t\"data-[unavailable]:text-muted-foreground data-[unavailable]:line-through\",\n\t\t// hover\n\t\t\"dark:hover:text-accent-foreground\",\n\t\t// focus\n\t\t\"focus:border-ring focus:ring-ring/50 focus:relative\",\n\t\t// inner spans\n\t\t\"[&>span]:text-xs [&>span]:opacity-70\",\n\t\tclassName\n\t)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-grid-body.svelte\nType: markup\n<CalendarPrimitive.GridBody bind:ref class={cn(className)} {...restProps} />",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-grid-row.svelte\nType: markup\n<CalendarPrimitive.GridRow bind:ref class={cn(\"flex\", className)} {...restProps} />",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar.svelte\nType: markup\n<!--\nDiscriminated Unions + Destructing (required for bindable) do not\nget along, so we shut typescript up by casting `value` to `never`.\n-->\n<CalendarPrimitive.Root\n\tbind:value={value as never}\n\tbind:ref\n\tbind:placeholder\n\t{weekdayFormat}\n\t{disableDaysOutsideMonth}\n\tclass={cn(\n\t\t'group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent',\n\t\t// Add fuchsia theme styles for selected date\n\t\t'[&_[data-selected]]:border-primary [&_[data-selected]]:text-primary [&_[data-selected]]:rounded-md [&_[data-selected]]:bg-fuchsia-100 [&_[data-selected]]:shadow-sm',\n\t\t'[&_[data-selected]:hover]:bg-fuchsia-50',\n\t\t// Ensure today indicator works with fuchsia theme\n\t\t'[&_[data-today]:not([data-selected])]:bg-accent [&_[data-today]:not([data-selected])]:text-accent-foreground',\n\t\tclassName\n\t)}\n\t{locale}\n\t{monthFormat}\n\t{yearFormat}\n\t{...restProps}\n>\n\t{#snippet children({ months, weekdays })}\n\t\t<Calendar.Months>\n\t\t\t<Calendar.Nav>\n\t\t\t\t<Calendar.PrevButton variant={buttonVariant} />\n\t\t\t\t<Calendar.NextButton variant={buttonVariant} />\n\t\t\t</Calendar.Nav>\n\t\t\t{#each months as month, monthIndex (month)}\n\t\t\t\t<Calendar.Month>\n\t\t\t\t\t<Calendar.Header>\n\t\t\t\t\t\t<Calendar.Caption\n\t\t\t\t\t\t\t{captionLayout}\n\t\t\t\t\t\t\tmonths={monthsProp}\n\t\t\t\t\t\t\t{monthFormat}\n\t\t\t\t\t\t\t{years}\n\t\t\t\t\t\t\t{yearFormat}\n\t\t\t\t\t\t\tmonth={month.value}\n\t\t\t\t\t\t\tbind:placeholder\n\t\t\t\t\t\t\t{locale}\n\t\t\t\t\t\t\t{monthIndex}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Calendar.Header>\n\t\t\t\t\t<Calendar.Grid>\n\t\t\t\t\t\t<Calendar.GridHead>\n\t\t\t\t\t\t\t<Calendar.GridRow class=\"select-none\">\n\t\t\t\t\t\t\t\t{#each weekdays as weekday (weekday)}\n\t\t\t\t\t\t\t\t\t<Calendar.HeadCell>\n\t\t\t\t\t\t\t\t\t\t{weekday.slice(0, 2)}\n\t\t\t\t\t\t\t\t\t</Calendar.HeadCell>\n\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t</Calendar.GridRow>\n\t\t\t\t\t\t</Calendar.GridHead>\n\t\t\t\t\t\t<Calendar.GridBody>\n\t\t\t\t\t\t\t{#each month.weeks as weekDates (weekDates)}\n\t\t\t\t\t\t\t\t<Calendar.GridRow class=\"mt-2 w-full\">\n\t\t\t\t\t\t\t\t\t{#each weekDates as date (date)}\n\t\t\t\t\t\t\t\t\t\t<Calendar.Cell {date} month={month.value}>\n\t\t\t\t\t\t\t\t\t\t\t{#if day}\n\t\t\t\t\t\t\t\t\t\t\t\t{@render day({\n\t\t\t\t\t\t\t\t\t\t\t\t\tday: date,\n\t\t\t\t\t\t\t\t\t\t\t\t\toutsideMonth: !isEqualMonth(date, month.value)\n\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t\t\t\t\t\t<Calendar.Day />\n\t\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t\t</Calendar.Cell>\n\t\t\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t\t\t</Calendar.GridRow>\n\t\t\t\t\t\t\t{/each}\n\t\t\t\t\t\t</Calendar.GridBody>\n\t\t\t\t\t</Calendar.Grid>\n\t\t\t\t</Calendar.Month>\n\t\t\t{/each}\n\t\t</Calendar.Months>\n\t{/snippet}\n</CalendarPrimitive.Root>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-month.svelte\nType: markup\n<div {...restProps} bind:this={ref} class={cn(\"flex flex-col\", className)}>\n\t{@render children?.()}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/card.svelte\nType: markup\n<div\n\tbind:this={ref}\n\tdata-slot=\"card\"\n\tclass={cn('bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6', className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/card-description.svelte\nType: markup\n<p\n\tbind:this={ref}\n\tdata-slot=\"card-description\"\n\tclass={cn(\"text-muted-foreground text-sm\", className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</p>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/card-footer.svelte\nType: markup\n<div\n\tbind:this={ref}\n\tdata-slot=\"card-footer\"\n\tclass={cn(\"[.border-t]:pt-6 flex items-center px-6\", className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/index.ts\nLanguage: typescript\n\nimport Root from \"./card.svelte\";\nimport Content from \"./card-content.svelte\";\nimport Description from \"./card-description.svelte\";\nimport Footer from \"./card-footer.svelte\";\nimport Header from \"./card-header.svelte\";\nimport Title from \"./card-title.svelte\";\nimport Action from \"./card-action.svelte\";\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/index.ts\nLanguage: typescript\n\nexport {\n\tRoot,\n\tContent,\n\tDescription,\n\tFooter,\n\tHeader,\n\tTitle,\n\tAction,",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/index.ts\nLanguage: typescript\n\n\t//\n\tRoot as Card,\n\tContent as CardContent,\n\tDescription as CardDescription,\n\tFooter as CardFooter,\n\tHeader as CardHeader,\n\tTitle as CardTitle,\n\tAction as CardAction,\n};",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/card-action.svelte\nType: markup\n<div\n\tbind:this={ref}\n\tdata-slot=\"card-action\"\n\tclass={cn(\"col-start-2 row-span-2 row-start-1 self-start justify-self-end\", className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/card-content.svelte\nType: markup\n<div bind:this={ref} data-slot=\"card-content\" class={cn(\"px-6\", className)} {...restProps}>\n\t{@render children?.()}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/card-header.svelte\nType: markup\n<div\n\tbind:this={ref}\n\tdata-slot=\"card-header\"\n\tclass={cn(\n\t\t\"@container/card-header has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6 grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6\",\n\t\tclassName\n\t)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/card-title.svelte\nType: markup\n<div\n\tbind:this={ref}\n\tdata-slot=\"card-title\"\n\tclass={cn(\"font-semibold leading-none\", className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/checkbox/index.ts\nLanguage: typescript\n\nimport Root from \"./checkbox.svelte\";",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/checkbox/index.ts\nLanguage: typescript\n\nexport {\n\tRoot,",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/checkbox/index.ts\nLanguage: typescript\n\n\t//\n\tRoot as Checkbox,\n};",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/checkbox/checkbox.svelte\nType: markup\n<CheckboxPrimitive.Root\n\tbind:ref\n\tdata-slot=\"checkbox\"\n\tclass={cn(\n\t\t\"border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive shadow-xs peer flex size-4 shrink-0 items-center justify-center rounded-[4px] border outline-none transition-shadow focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50\",\n\t\tclassName\n\t)}\n\tbind:checked\n\tbind:indeterminate\n\t{...restProps}\n>\n\t{#snippet children({ checked, indeterminate })}\n\t\t<div data-slot=\"checkbox-indicator\" class=\"text-current transition-none\">\n\t\t\t{#if checked}\n\t\t\t\t<CheckIcon class=\"size-3.5\" />\n\t\t\t{:else if indeterminate}\n\t\t\t\t<MinusIcon class=\"size-3.5\" />\n\t\t\t{/if}\n\t\t</div>\n\t{/snippet}\n</CheckboxPrimitive.Root>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table-header.svelte\nType: markup\n<thead\n\tbind:this={ref}\n\tdata-slot=\"table-header\"\n\tclass={cn(\"[&_tr]:border-b\", className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</thead>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table-row.svelte\nType: markup\n<tr\n\tbind:this={ref}\n\tdata-slot=\"table-row\"\n\tclass={cn(\n\t\t\"hover:[&,&>svelte-css-wrapper]:[&>th,td]:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors\",\n\t\tclassName\n\t)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</tr>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table-footer.svelte\nType: markup\n<tfoot\n\tbind:this={ref}\n\tdata-slot=\"table-footer\"\n\tclass={cn(\"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0\", className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</tfoot>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/index.ts\nLanguage: typescript\n\nimport Root from \"./table.svelte\";\nimport Body from \"./table-body.svelte\";\nimport Caption from \"./table-caption.svelte\";\nimport Cell from \"./table-cell.svelte\";\nimport Footer from \"./table-footer.svelte\";\nimport Head from \"./table-head.svelte\";\nimport Header from \"./table-header.svelte\";\nimport Row from \"./table-row.svelte\";\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/index.ts\nLanguage: typescript\n\nexport {\n\tRoot,\n\tBody,\n\tCaption,\n\tCell,\n\tFooter,\n\tHead,\n\tHeader,\n\tRow,",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/index.ts\nLanguage: typescript\n\n\t//\n\tRoot as Table,\n\tBody as TableBody,\n\tCaption as TableCaption,\n\tCell as TableCell,\n\tFooter as TableFooter,\n\tHead as TableHead,\n\tHeader as TableHeader,\n\tRow as TableRow,\n};",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table-cell.svelte\nType: markup\n<td\n\tbind:this={ref}\n\tdata-slot=\"table-cell\"\n\tclass={cn(\n\t\t\"whitespace-nowrap bg-clip-padding p-2 align-middle [&:has([role=checkbox])]:pr-0\",\n\t\tclassName\n\t)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</td>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table-head.svelte\nType: markup\n<th\n\tbind:this={ref}\n\tdata-slot=\"table-head\"\n\tclass={cn(\n\t\t\"text-foreground h-10 whitespace-nowrap bg-clip-padding px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0\",\n\t\tclassName\n\t)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</th>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table-caption.svelte\nType: markup\n<caption\n\tbind:this={ref}\n\tdata-slot=\"table-caption\"\n\tclass={cn(\"text-muted-foreground mt-4 text-sm\", className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</caption>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table.svelte\nType: markup\n<div data-slot=\"table-container\" class=\"relative w-full overflow-x-auto\">\n\t<table\n\t\tbind:this={ref}\n\t\tdata-slot=\"table\"\n\t\tclass={cn(\"w-full caption-bottom text-sm\", className)}\n\t\t{...restProps}\n\t>\n\t\t{@render children?.()}\n\t</table>\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table-body.svelte\nType: markup\n<tbody\n\tbind:this={ref}\n\tdata-slot=\"table-body\"\n\tclass={cn(\"[&_tr:last-child]:border-0\", className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</tbody>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/textarea/index.ts\nLanguage: typescript\n\nimport Root from \"./textarea.svelte\";\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/textarea/index.ts\nLanguage: typescript\n\nexport {\n\tRoot,",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/textarea/index.ts\nLanguage: typescript\n\n\t//\n\tRoot as Textarea,\n};",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/textarea/textarea.svelte\nType: markup\n<textarea\n\tbind:this={ref}\n\tdata-slot={dataSlot}\n\tclass={cn(\n\t\t\"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 field-sizing-content shadow-xs flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base outline-none transition-[color,box-shadow] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n\t\tclassName\n\t)}\n\tbind:value\n\t{...restProps}\n></textarea>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte\nType: markup\n<AlertDialogPrimitive.Overlay\n\tbind:ref\n\tdata-slot=\"alert-dialog-overlay\"\n\tclass={cn(\n\t\t\"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n\t\tclassName\n\t)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte\nType: markup\n<div\n\tbind:this={ref}\n\tdata-slot=\"alert-dialog-footer\"\n\tclass={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte\nType: markup\n<AlertDialogPrimitive.Action\n\tbind:ref\n\tdata-slot=\"alert-dialog-action\"\n\tclass={cn(buttonVariants(), className)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte\nType: markup\n<AlertDialogPrimitive.Title\n\tbind:ref\n\tdata-slot=\"alert-dialog-title\"\n\tclass={cn(\"text-lg font-semibold\", className)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/index.ts\nLanguage: typescript\n\nimport { AlertDialog as AlertDialogPrimitive } from \"bits-ui\";\nimport Trigger from \"./alert-dialog-trigger.svelte\";\nimport Title from \"./alert-dialog-title.svelte\";\nimport Action from \"./alert-dialog-action.svelte\";\nimport Cancel from \"./alert-dialog-cancel.svelte\";\nimport Footer from \"./alert-dialog-footer.svelte\";\nimport Header from \"./alert-dialog-header.svelte\";\nimport Overlay from \"./alert-dialog-overlay.svelte\";\nimport Content from \"./alert-dialog-content.svelte\";\nimport Description from \"./alert-dialog-description.svelte\";\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/index.ts\nLanguage: typescript\n\nconst Root = AlertDialogPrimitive.Root;",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/index.ts\nLanguage: typescript\n\nconst Portal = AlertDialogPrimitive.Portal;\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/index.ts\nLanguage: typescript\n\nexport {\n\tRoot,\n\tTitle,\n\tAction,\n\tCancel,\n\tPortal,\n\tFooter,\n\tHeader,\n\tTrigger,\n\tOverlay,\n\tContent,\n\tDescription,",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/index.ts\nLanguage: typescript\n\n\t//\n\tRoot as AlertDialog,\n\tTitle as AlertDialogTitle,\n\tAction as AlertDialogAction,\n\tCancel as AlertDialogCancel,\n\tPortal as AlertDialogPortal,\n\tFooter as AlertDialogFooter,\n\tHeader as AlertDialogHeader,\n\tTrigger as AlertDialogTrigger,\n\tOverlay as AlertDialogOverlay,\n\tContent as AlertDialogContent,\n\tDescription as AlertDialogDescription,\n};",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte\nType: markup\n<AlertDialogPrimitive.Portal {...portalProps}>\n\t<AlertDialogOverlay />\n\t<AlertDialogPrimitive.Content\n\t\tbind:ref\n\t\tdata-slot=\"alert-dialog-content\"\n\t\tclass={cn(\n\t\t\t'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 mm:max-w-lg fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200',\n\t\t\tclassName\n\t\t)}\n\t\t{...restProps}\n\t/>\n</AlertDialogPrimitive.Portal>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte\nType: markup\n<AlertDialogPrimitive.Cancel\n\tbind:ref\n\tdata-slot=\"alert-dialog-cancel\"\n\tclass={cn(buttonVariants({ variant: \"outline\" }), className)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte\nType: markup\n<div\n\tbind:this={ref}\n\tdata-slot=\"alert-dialog-header\"\n\tclass={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte\nType: markup\n<AlertDialogPrimitive.Description\n\tbind:ref\n\tdata-slot=\"alert-dialog-description\"\n\tclass={cn(\"text-muted-foreground text-sm\", className)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-trigger.svelte\nType: markup\n<AlertDialogPrimitive.Trigger bind:ref data-slot=\"alert-dialog-trigger\" {...restProps} />",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-title.svelte\nType: markup\n<DialogPrimitive.Title\n\tbind:ref\n\tdata-slot=\"dialog-title\"\n\tclass={cn(\"text-lg font-semibold leading-none\", className)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-overlay.svelte\nType: markup\n<DialogPrimitive.Overlay\n\tbind:ref\n\tdata-slot=\"dialog-overlay\"\n\tclass={cn(\n\t\t\"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n\t\tclassName\n\t)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-description.svelte\nType: markup\n<DialogPrimitive.Description\n\tbind:ref\n\tdata-slot=\"dialog-description\"\n\tclass={cn(\"text-muted-foreground text-sm\", className)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-trigger.svelte\nType: markup\n<DialogPrimitive.Trigger bind:ref data-slot=\"dialog-trigger\" {...restProps} />",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-header.svelte\nType: markup\n<div\n\tbind:this={ref}\n\tdata-slot=\"dialog-header\"\n\tclass={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/index.ts\nLanguage: typescript\n\nimport { Dialog as DialogPrimitive } from \"bits-ui\";\n\nimport Title from \"./dialog-title.svelte\";\nimport Footer from \"./dialog-footer.svelte\";\nimport Header from \"./dialog-header.svelte\";\nimport Overlay from \"./dialog-overlay.svelte\";\nimport Content from \"./dialog-content.svelte\";\nimport Description from \"./dialog-description.svelte\";\nimport Trigger from \"./dialog-trigger.svelte\";\nimport Close from \"./dialog-close.svelte\";\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/index.ts\nLanguage: typescript\n\nconst Root = DialogPrimitive.Root;",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/index.ts\nLanguage: typescript\n\nconst Portal = DialogPrimitive.Portal;\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/index.ts\nLanguage: typescript\n\nexport {\n\tRoot,\n\tTitle,\n\tPortal,\n\tFooter,\n\tHeader,\n\tTrigger,\n\tOverlay,\n\tContent,\n\tDescription,\n\tClose,",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/index.ts\nLanguage: typescript\n\n\t//\n\tRoot as Dialog,\n\tTitle as DialogTitle,\n\tPortal as DialogPortal,\n\tFooter as DialogFooter,\n\tHeader as DialogHeader,\n\tTrigger as DialogTrigger,\n\tOverlay as DialogOverlay,\n\tContent as DialogContent,\n\tDescription as DialogDescription,\n\tClose as DialogClose,\n};",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-footer.svelte\nType: markup\n<div\n\tbind:this={ref}\n\tdata-slot=\"dialog-footer\"\n\tclass={cn(\"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\", className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-content.svelte\nType: markup\n<Dialog.Portal {...portalProps}>\n\t<Dialog.Overlay />\n\t<DialogPrimitive.Content\n\t\tbind:ref\n\t\tdata-slot=\"dialog-content\"\n\t\tclass={cn(\n\t\t\t\"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg\",\n\t\t\tclassName\n\t\t)}\n\t\t{...restProps}\n\t>\n\t\t{@render children?.()}\n\t\t{#if showCloseButton}\n\t\t\t<DialogPrimitive.Close\n\t\t\t\tclass=\"ring-offset-background focus:ring-ring rounded-xs focus:outline-hidden absolute end-4 top-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\"\n\t\t\t>\n\t\t\t\t<XIcon />\n\t\t\t\t<span class=\"sr-only\">Close</span>\n\t\t\t</DialogPrimitive.Close>\n\t\t{/if}\n\t</DialogPrimitive.Content>\n</Dialog.Portal>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-close.svelte\nType: markup\n<DialogPrimitive.Close bind:ref data-slot=\"dialog-close\" {...restProps} />",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-group.svelte\nType: markup\n<SelectPrimitive.Group data-slot=\"select-group\" {...restProps} />",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-trigger.svelte\nType: markup\n<SelectPrimitive.Trigger\n\tbind:ref\n\tdata-slot=\"select-trigger\"\n\tdata-size={size}\n\tclass={cn(\n\t\t\"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 shadow-xs flex w-fit select-none items-center justify-between gap-2 whitespace-nowrap rounded-md border bg-transparent px-3 py-2 text-sm outline-none transition-[color,box-shadow] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t\tclassName\n\t)}\n\t{...restProps}\n>\n\t{@render children?.()}\n\t<ChevronDownIcon class=\"size-4 opacity-50\" />\n</SelectPrimitive.Trigger>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-separator.svelte\nType: markup\n<Separator\n\tbind:ref\n\tdata-slot=\"select-separator\"\n\tclass={cn(\"bg-border pointer-events-none -mx-1 my-1 h-px\", className)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-label.svelte\nType: markup\n<div\n\tbind:this={ref}\n\tdata-slot=\"select-label\"\n\tclass={cn(\"text-muted-foreground px-2 py-1.5 text-xs\", className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/index.ts\nLanguage: typescript\n\nimport { Select as SelectPrimitive } from \"bits-ui\";\n\nimport Group from \"./select-group.svelte\";\nimport Label from \"./select-label.svelte\";\nimport Item from \"./select-item.svelte\";\nimport Content from \"./select-content.svelte\";\nimport Trigger from \"./select-trigger.svelte\";\nimport Separator from \"./select-separator.svelte\";\nimport ScrollDownButton from \"./select-scroll-down-button.svelte\";\nimport ScrollUpButton from \"./select-scroll-up-button.svelte\";\nimport GroupHeading from \"./select-group-heading.svelte\";\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/index.ts\nLanguage: typescript\n\nconst Root = SelectPrimitive.Root;\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/index.ts\nLanguage: typescript\n\nexport {\n\tRoot,\n\tGroup,\n\tLabel,\n\tItem,\n\tContent,\n\tTrigger,\n\tSeparator,\n\tScrollDownButton,\n\tScrollUpButton,\n\tGroupHeading,",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/index.ts\nLanguage: typescript\n\n\t//\n\tRoot as Select,\n\tGroup as SelectGroup,\n\tLabel as SelectLabel,\n\tItem as SelectItem,\n\tContent as SelectContent,\n\tTrigger as SelectTrigger,\n\tSeparator as SelectSeparator,\n\tScrollDownButton as SelectScrollDownButton,\n\tScrollUpButton as SelectScrollUpButton,\n\tGroupHeading as SelectGroupHeading,\n};",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-item.svelte\nType: markup\n<SelectPrimitive.Item\n\tbind:ref\n\t{value}\n\tdata-slot=\"select-item\"\n\tclass={cn(\n\t\t\"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-2 pr-8 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t\tclassName\n\t)}\n\t{...restProps}\n>\n\t{#snippet children({ selected, highlighted })}\n\t\t<span class=\"absolute right-2 flex size-3.5 items-center justify-center\">\n\t\t\t{#if selected}\n\t\t\t\t<CheckIcon class=\"size-4\" />\n\t\t\t{/if}\n\t\t</span>\n\t\t{#if childrenProp}\n\t\t\t{@render childrenProp({ selected, highlighted })}\n\t\t{:else}\n\t\t\t{label || value}\n\t\t{/if}\n\t{/snippet}\n</SelectPrimitive.Item>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-content.svelte\nType: markup\n<SelectPrimitive.Portal {...portalProps}>\n\t<SelectPrimitive.Content\n\t\tbind:ref\n\t\t{sideOffset}\n\t\tdata-slot=\"select-content\"\n\t\tclass={cn(\n\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-h-(--bits-select-content-available-height) origin-(--bits-select-content-transform-origin) relative z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border shadow-md data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n\t\t\tclassName\n\t\t)}\n\t\t{...restProps}\n\t>\n\t\t<SelectScrollUpButton />\n\t\t<SelectPrimitive.Viewport\n\t\t\tclass={cn(\n\t\t\t\t\"h-(--bits-select-anchor-height) min-w-(--bits-select-anchor-width) w-full scroll-my-1 p-1\"\n\t\t\t)}\n\t\t>\n\t\t\t{@render children?.()}\n\t\t</SelectPrimitive.Viewport>\n\t\t<SelectScrollDownButton />\n\t</SelectPrimitive.Content>\n</SelectPrimitive.Portal>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-scroll-down-button.svelte\nType: markup\n<SelectPrimitive.ScrollDownButton\n\tbind:ref\n\tdata-slot=\"select-scroll-down-button\"\n\tclass={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n\t{...restProps}\n>\n\t<ChevronDownIcon class=\"size-4\" />\n</SelectPrimitive.ScrollDownButton>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-scroll-up-button.svelte\nType: markup\n<SelectPrimitive.ScrollUpButton\n\tbind:ref\n\tdata-slot=\"select-scroll-up-button\"\n\tclass={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n\t{...restProps}\n>\n\t<ChevronUpIcon class=\"size-4\" />\n</SelectPrimitive.ScrollUpButton>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-group-heading.svelte\nType: markup\n<SelectPrimitive.GroupHeading\n\tbind:ref\n\tdata-slot=\"select-group-heading\"\n\tclass={cn(\"text-muted-foreground px-2 py-1.5 text-xs\", className)}\n\t{...restProps}\n>\n\t{@render children?.()}\n</SelectPrimitive.GroupHeading>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-legend.svelte\nType: markup\n<FormPrimitive.Legend\n\tbind:ref\n\tclass={cn(\"data-[fs-error]:text-destructive text-sm font-medium leading-none\", className)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-label.svelte\nType: markup\n<FormPrimitive.Label {...restProps} bind:ref>\n\t{#snippet child({ props })}\n\t\t<Label\n\t\t\t{...props}\n\t\t\tdata-slot=\"form-label\"\n\t\t\tclass={cn(\"data-[fs-error]:text-destructive\", className)}\n\t\t>\n\t\t\t{@render children?.()}\n\t\t</Label>\n\t{/snippet}\n</FormPrimitive.Label>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-element-field.svelte\nType: script\n, U extends FormPathLeaves<T>\">\n\timport * as FormPrimitive from \"formsnap\";\n\timport type { FormPathLeaves } from \"sveltekit-superforms\";\n\timport type { HTMLAttributes } from \"svelte/elements\";\n\timport { cn, type WithElementRef, type WithoutChildren } from \"$lib/utils.js\";\n\n\tlet {\n\t\tref = $bindable(null),\n\t\tclass: className,\n\t\tform,\n\t\tname,\n\t\tchildren: childrenProp,\n\t\t...restProps\n\t}: WithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> &\n\t\tFormPrimitive.ElementFieldProps<T, U> = $props();\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-element-field.svelte\nType: markup\n<FormPrimitive.ElementField {form} {name}>\n\t{#snippet children({ constraints, errors, tainted, value })}\n\t\t<div bind:this={ref} class={cn(\"space-y-2\", className)} {...restProps}>\n\t\t\t{@render childrenProp?.({ constraints, errors, tainted, value: value as T[U] })}\n\t\t</div>\n\t{/snippet}\n</FormPrimitive.ElementField>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-description.svelte\nType: markup\n<FormPrimitive.Description\n\tbind:ref\n\tdata-slot=\"form-description\"\n\tclass={cn(\"text-muted-foreground text-sm\", className)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-fieldset.svelte\nType: script\n, U extends FormPath<T>\">\n\timport * as FormPrimitive from \"formsnap\";\n\timport type { FormPath } from \"sveltekit-superforms\";\n\timport { cn, type WithoutChild } from \"$lib/utils.js\";\n\n\tlet {\n\t\tref = $bindable(null),\n\t\tclass: className,\n\t\tform,\n\t\tname,\n\t\t...restProps\n\t}: WithoutChild<FormPrimitive.FieldsetProps<T, U>> = $props();\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-fieldset.svelte\nType: markup\n<FormPrimitive.Fieldset bind:ref {form} {name} class={cn(\"space-y-2\", className)} {...restProps} />",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/index.ts\nLanguage: typescript\n\nimport * as FormPrimitive from \"formsnap\";\nimport Description from \"./form-description.svelte\";\nimport Label from \"./form-label.svelte\";\nimport FieldErrors from \"./form-field-errors.svelte\";\nimport Field from \"./form-field.svelte\";\nimport Fieldset from \"./form-fieldset.svelte\";\nimport Legend from \"./form-legend.svelte\";\nimport ElementField from \"./form-element-field.svelte\";\nimport Button from \"./form-button.svelte\";\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/index.ts\nLanguage: typescript\n\nconst Control = FormPrimitive.Control;\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/index.ts\nLanguage: typescript\n\nexport {\n\tField,\n\tControl,\n\tLabel,\n\tButton,\n\tFieldErrors,\n\tDescription,\n\tFieldset,\n\tLegend,\n\tElementField,",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/index.ts\nLanguage: typescript\n\n\t//\n\tField as FormField,\n\tControl as FormControl,\n\tDescription as FormDescription,\n\tLabel as FormLabel,\n\tFieldErrors as FormFieldErrors,\n\tFieldset as FormFieldset,\n\tLegend as FormLegend,\n\tElementField as FormElementField,\n\tButton as FormButton,\n};",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-field-errors.svelte\nType: markup\n<FormPrimitive.FieldErrors\n\tbind:ref\n\tclass={cn(\"text-destructive text-sm font-medium\", className)}\n\t{...restProps}\n>\n\t{#snippet children({ errors, errorProps })}\n\t\t{#if childrenProp}\n\t\t\t{@render childrenProp({ errors, errorProps })}\n\t\t{:else}\n\t\t\t{#each errors as error (error)}\n\t\t\t\t<div {...errorProps} class={cn(errorClasses)}>{error}</div>\n\t\t\t{/each}\n\t\t{/if}\n\t{/snippet}\n</FormPrimitive.FieldErrors>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-field.svelte\nType: script\n, U extends FormPath<T>\">\n\timport * as FormPrimitive from \"formsnap\";\n\timport type { FormPath } from \"sveltekit-superforms\";\n\timport { cn, type WithElementRef, type WithoutChildren } from \"$lib/utils.js\";\n\timport type { HTMLAttributes } from \"svelte/elements\";\n\n\tlet {\n\t\tref = $bindable(null),\n\t\tclass: className,\n\t\tform,\n\t\tname,\n\t\tchildren: childrenProp,\n\t\t...restProps\n\t}: FormPrimitive.FieldProps<T, U> &\n\t\tWithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> = $props();\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-field.svelte\nType: markup\n<FormPrimitive.Field {form} {name}>\n\t{#snippet children({ constraints, errors, tainted, value })}\n\t\t<div\n\t\t\tbind:this={ref}\n\t\t\tdata-slot=\"form-item\"\n\t\t\tclass={cn(\"space-y-2\", className)}\n\t\t\t{...restProps}\n\t\t>\n\t\t\t{@render childrenProp?.({ constraints, errors, tainted, value: value as T[U] })}\n\t\t</div>\n\t{/snippet}\n</FormPrimitive.Field>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-button.svelte\nType: markup\n<Button.Root bind:ref type=\"submit\" {...restProps} />",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/input/index.ts\nLanguage: typescript\n\nimport Root from \"./input.svelte\";\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/input/index.ts\nLanguage: typescript\n\nexport {\n\tRoot,",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/input/index.ts\nLanguage: typescript\n\n\t//\n\tRoot as Input,\n};",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/input/input.svelte\nType: type\nName: InputType\nDoc: \nCode:\n\ttype InputType = Exclude<HTMLInputTypeAttribute, \"file\">;\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/input/input.svelte\nType: type\nName: Props\nDoc: \nCode:\n\ttype Props = WithElementRef<\n\t\tOmit<HTMLInputAttributes, \"type\"> &\n\t\t\t({ type: \"file\"; files?: FileList } | { type?: InputType; files?: undefined })\n\t>;\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/input/input.svelte\nType: markup\n{#if type === \"file\"}\n\t<input\n\t\tbind:this={ref}\n\t\tdata-slot={dataSlot}\n\t\tclass={cn(\n\t\t\t\"selection:bg-primary dark:bg-input/30 selection:text-primary-foreground border-input ring-offset-background placeholder:text-muted-foreground shadow-xs flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 pt-1.5 text-sm font-medium outline-none transition-[color,box-shadow] disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n\t\t\t\"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n\t\t\tclassName\n\t\t)}\n\t\ttype=\"file\"\n\t\tbind:files\n\t\tbind:value\n\t\t{...restProps}\n\t/>\n{:else}\n\t<input\n\t\tbind:this={ref}\n\t\tdata-slot={dataSlot}\n\t\tclass={cn(\n\t\t\t\"border-input bg-background selection:bg-primary dark:bg-input/30 selection:text-primary-foreground ring-offset-background placeholder:text-muted-foreground shadow-xs flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base outline-none transition-[color,box-shadow] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n\t\t\t\"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n\t\t\t\"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n\t\t\tclassName\n\t\t)}\n\t\t{type}\n\t\tbind:value\n\t\t{...restProps}\n\t/>\n{/if}",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/label/index.ts\nLanguage: typescript\n\nimport Root from \"./label.svelte\";\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/label/index.ts\nLanguage: typescript\n\nexport {\n\tRoot,",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/label/index.ts\nLanguage: typescript\n\n\t//\n\tRoot as Label,\n};",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/label/label.svelte\nType: markup\n<LabelPrimitive.Root\n\tbind:ref\n\tdata-slot=\"label\"\n\tclass={cn(\n\t\t\"flex select-none items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50\",\n\t\tclassName\n\t)}\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/sonner/index.ts\nLanguage: typescript\n\nexport { default as Toaster } from \"./sonner.svelte\";",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/sonner/sonner.svelte\nType: markup\n<Sonner\n\ttheme={mode.current}\n\tclass=\"toaster group\"\n\tstyle=\"--normal-bg: var(--color-popover); --normal-text: var(--color-popover-foreground); --normal-border: var(--color-border);\"\n\t{...restProps}\n/>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/skeleton/index.ts\nLanguage: typescript\n\nimport Root from \"./skeleton.svelte\";\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/skeleton/index.ts\nLanguage: typescript\n\nexport {\n\tRoot,",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/skeleton/index.ts\nLanguage: typescript\n\n\t//\n\tRoot as Skeleton,\n};",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/skeleton/skeleton.svelte\nType: markup\n<div\n\tbind:this={ref}\n\tdata-slot=\"skeleton\"\n\tclass={cn(\"bg-accent animate-pulse rounded-md\", className)}\n\t{...restProps}\n></div>",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/button/button.svelte\nType: type\nName: ButtonVariant\nDoc: \nCode:\n\texport type ButtonVariant = VariantProps<typeof buttonVariants>[\"variant\"];\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/button/button.svelte\nType: type\nName: ButtonSize\nDoc: \nCode:\n\texport type ButtonSize = VariantProps<typeof buttonVariants>[\"size\"];\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/button/button.svelte\nType: type\nName: ButtonProps\nDoc: \nCode:\n\texport type ButtonProps = WithElementRef<HTMLButtonAttributes> &\n\t\tWithElementRef<HTMLAnchorAttributes> & {\n\t\t\tvariant?: ButtonVariant;\n\t\t\tsize?: ButtonSize;\n\t\t};\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/button/button.svelte\nType: markup\n{#if href}\n\t<a\n\t\tbind:this={ref}\n\t\tdata-slot=\"button\"\n\t\tclass={cn(buttonVariants({ variant, size }), className)}\n\t\thref={disabled ? undefined : href}\n\t\taria-disabled={disabled}\n\t\trole={disabled ? \"link\" : undefined}\n\t\ttabindex={disabled ? -1 : undefined}\n\t\t{...restProps}\n\t>\n\t\t{@render children?.()}\n\t</a>\n{:else}\n\t<button\n\t\tbind:this={ref}\n\t\tdata-slot=\"button\"\n\t\tclass={cn(buttonVariants({ variant, size }), className)}\n\t\t{type}\n\t\t{disabled}\n\t\t{...restProps}\n\t>\n\t\t{@render children?.()}\n\t</button>\n{/if}",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/button/index.ts\nLanguage: typescript\n\nimport Root, {\n\ttype ButtonProps,\n\ttype ButtonSize,\n\ttype ButtonVariant,\n\tbuttonVariants,\n} from \"./button.svelte\";\n",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/button/index.ts\nLanguage: typescript\n\nexport {\n\tRoot,\n\ttype ButtonProps as Props,",
    "File: /home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/button/index.ts\nLanguage: typescript\n\n\t//\n\tRoot as Button,\n\tbuttonVariants,\n\ttype ButtonProps,\n\ttype ButtonSize,\n\ttype ButtonVariant,\n};",
    "File: /home/popertots/ragmcp/Crussell/backend/mw/auth.go\nType: type\nName: contextKey\nCode:\ntype contextKey string\n",
    "File: /home/popertots/ragmcp/Crussell/backend/mw/auth.go\nType: var\nName: UserIDKey\nCode:\n\tUserIDKey   contextKey = \"user_id\"\n",
    "File: /home/popertots/ragmcp/Crussell/backend/mw/auth.go\nType: var\nName: UserRoleKey\nCode:\n\tUserRoleKey contextKey = \"user_role\"\n",
    "File: /home/popertots/ragmcp/Crussell/backend/mw/auth.go\nType: func\nName: RequireAuth\nDoc:\nRequireAuth middleware - validates JWT and adds user info to context\n\nCode:\nfunc RequireAuth(next http.Handler) http.Handler {\n\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tauthHeader := r.Header.Get(\"Authorization\")\n\t\tif authHeader == \"\" || !strings.HasPrefix(authHeader, \"Bearer \") {\n\t\t\thttp.Error(w, \"missing or invalid authorization header\", http.StatusUnauthorized)\n\t\t\treturn\n\t\t}\n\n\t\ttokenString := strings.TrimPrefix(authHeader, \"Bearer \")\n\n\t\tuserID, role, err := auth.VerifyToken(tokenString, r.Context())\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"invalid token\", http.StatusUnauthorized)\n\t\t\treturn\n\t\t}\n\n\t\t// Add user info to context\n\t\tctx := context.WithValue(r.Context(), UserIDKey, userID)\n\t\tctx = context.WithValue(ctx, UserRoleKey, role)\n\n\t\tnext.ServeHTTP(w, r.WithContext(ctx))\n\t})\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/mw/auth.go\nType: func\nName: RequireRole\nDoc:\nRequireRole middleware - checks if user has required role(s)\n\nCode:\nfunc RequireRole(allowedRoles ...string) func(http.Handler) http.Handler {\n\treturn func(next http.Handler) http.Handler {\n\t\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\t\trole, ok := r.Context().Value(UserRoleKey).(string)\n\t\t\tif !ok {\n\t\t\t\thttp.Error(w, \"unauthorized\", http.StatusUnauthorized)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Check if user has one of the allowed roles\n\t\t\thasRole := false\n\t\t\tfor _, allowedRole := range allowedRoles {\n\t\t\t\tif role == allowedRole {\n\t\t\t\t\thasRole = true\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif !hasRole {\n\t\t\t\thttp.Error(w, \"forbidden\", http.StatusForbidden)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tnext.ServeHTTP(w, r)\n\t\t})\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/mw/auth.go\nType: func\nName: RequireVerified\nDoc:\nRequireVerified middleware - only allows verified_email and admin\n\nCode:\nfunc RequireVerified(next http.Handler) http.Handler {\n\treturn RequireRole(\"verified_email\", \"admin\")(next)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/mw/auth.go\nType: func\nName: RequireAdmin\nDoc:\nRequireAdmin middleware - only allows admin\n\nCode:\nfunc RequireAdmin(next http.Handler) http.Handler {\n\treturn RequireRole(\"admin\")(next)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/mw/auth.go\nType: func\nName: GetUserID\nDoc:\nHelper functions to get user info from context\n\nCode:\nfunc GetUserID(ctx context.Context) (string, bool) {\n\tuserID, ok := ctx.Value(UserIDKey).(string)\n\treturn userID, ok\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/mw/auth.go\nType: func\nName: GetUserRole\nCode:\nfunc GetUserRole(ctx context.Context) (string, bool) {\n\trole, ok := ctx.Value(UserRoleKey).(string)\n\treturn role, ok\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/db/db.go\nType: var\nName: DB\nCode:\nvar DB *pgxpool.Pool\n",
    "File: /home/popertots/ragmcp/Crussell/backend/db/db.go\nType: func\nName: Connect\nCode:\nfunc Connect() error {\n\t// Connect to Postgres on local network (127.x.x.x)\n\tdsn := fmt.Sprintf(\n\t\t\"postgres://%s:%s@%s:5432/%s\",\n\t\tgetEnv(\"POSTGRES_USER\"),\n\t\tgetEnv(\"POSTGRES_PASSWORD\"),\n\t\tgetEnv(\"POSTGRES_HOST\"),\n\t\tgetEnv(\"POSTGRES_DB\"),\n\t)\n\n\tpool, err := pgxpool.New(context.Background(), dsn)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tDB = pool\n\n\terr = testDB()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/db/db.go\nType: func\nName: testDB\nCode:\nfunc testDB() error {\n\tctx := context.Background()\n\tconn, err := DB.Acquire(ctx)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer conn.Release()\n\n\trow := conn.QueryRow(ctx, \"SELECT 1\")\n\tvar result int\n\terr = row.Scan(&result)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/db/db.go\nType: func\nName: getEnv\nCode:\nfunc getEnv(key string) string {\n\tif val := os.Getenv(key); val != \"\" {\n\t\treturn val\n\t}\n\tlog.Fatal(\"FATAL: Environment variable not set:\", key)\n\treturn \"\"\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/db/db_dev.go\nType: var\nName: DB\nCode:\nvar DB *pgxpool.Pool\n",
    "File: /home/popertots/ragmcp/Crussell/backend/db/db_dev.go\nType: func\nName: Connect\nCode:\nfunc Connect() error {\n\t// Connect to Postgres inside Docker network\n\tdsn := fmt.Sprintf(\n\t\t\"postgres://%s:%s@localhost:5432/%s?sslmode=disable\",\n\t\tgetEnv(\"POSTGRES_USER\"),\n\t\tgetEnv(\"POSTGRES_PASSWORD\"),\n\t\tgetEnv(\"POSTGRES_DB\"),\n\t)\n\n\tpool, err := pgxpool.New(context.Background(), dsn)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tDB = pool\n\n\terr = testDB()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/db/db_dev.go\nType: func\nName: testDB\nCode:\nfunc testDB() error {\n\tctx := context.Background()\n\tconn, err := DB.Acquire(ctx)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer conn.Release()\n\n\trow := conn.QueryRow(ctx, \"SELECT 1\")\n\tvar result int\n\terr = row.Scan(&result)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/db/db_dev.go\nType: func\nName: getEnv\nCode:\nfunc getEnv(key string) string {\n\tif val := os.Getenv(key); val != \"\" {\n\t\treturn val\n\t}\n\tlog.Fatal(\"FATAL: Environment variable not set:\", key)\n\treturn \"\"\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/auth/password.go\nLanguage: go\n\npackage auth",
    "File: /home/popertots/ragmcp/Crussell/backend/auth/jwt.go\nType: var\nName: TokenAuth\nCode:\nvar TokenAuth *jwtauth.JWTAuth\n",
    "File: /home/popertots/ragmcp/Crussell/backend/auth/jwt.go\nType: struct\nName: AuthResponse\nDoc:\nAuthResponse is the response structure for login/refresh endpoints\n\nCode:\ntype AuthResponse struct {\n\tToken string `json:\"token\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/auth/jwt.go\nType: func\nName: InitJWT\nDoc:\nAuthResponse is the response structure for login/refresh endpoints\n\nCode:\nfunc InitJWT(secret string) {\n\tTokenAuth = jwtauth.New(\"HS256\", []byte(secret), nil)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/auth/jwt.go\nType: func\nName: GenerateToken\nDoc:\nGenerateToken creates a JWT with user_id and role\n\nCode:\nfunc GenerateToken(userID string, role string) (string, error) {\n\t_, tokenString, err := TokenAuth.Encode(map[string]interface{}{\n\t\t\"user_id\": userID,\n\t\t\"role\":    role,\n\t\t\"exp\":     time.Now().Add(30 * 24 * time.Hour).Unix(), // 30 days\n\t})\n\treturn tokenString, err\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/auth/jwt.go\nType: func\nName: VerifyToken\nDoc:\nVerifyToken validates JWT and returns user_id and role\n\nCode:\nfunc VerifyToken(tokenString string, ctx context.Context) (userID string, role string, err error) {\n\ttoken, err := TokenAuth.Decode(tokenString)\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\n\tclaims, err := token.AsMap(ctx)\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\n\tuserID, ok := claims[\"user_id\"].(string)\n\tif !ok {\n\t\treturn \"\", \"\", fmt.Errorf(\"invalid user_id claim\")\n\t}\n\n\trole, ok = claims[\"role\"].(string)\n\tif !ok {\n\t\treturn \"\", \"\", fmt.Errorf(\"invalid role claim\")\n\t}\n\n\treturn userID, role, nil\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/services/services.go\nType: struct\nName: Service\nDoc:\nService represents a service in the system\n\nCode:\ntype Service struct {\n\tID                     string    `json:\"id\"`\n\tName                   string    `json:\"name\"`\n\tDescription            string    `json:\"description\"`\n\tPrice                  float64   `json:\"price\"`\n\tDurationMinutes        int       `json:\"duration_minutes\"`\n\tIsActive               bool      `json:\"is_active\"`\n\tPatchTestDurationHours int       `json:\"patch_test_duration_hours\"`\n\tMinimumAgeRequired     int       `json:\"minimum_age_required\"`\n\tCreatedAt              time.Time `json:\"created_at\"`\n\tCreatedBy              *string   `json:\"created_by,omitempty\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/services/services.go\nType: struct\nName: ServiceResponse\nCode:\ntype ServiceResponse struct {\n\tID                     string  `json:\"id\"`\n\tName                   string  `json:\"name\"`\n\tDescription            string  `json:\"description\"`\n\tPrice                  float64 `json:\"price\"`\n\tDurationMinutes        int     `json:\"duration_minutes\"`\n\tPatchTestDurationHours int     `json:\"patch_test_duration_hours\"`\n\tMinimumAgeRequired     int     `json:\"minimum_age_required\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/services/services.go\nType: struct\nName: CreateServiceRequest\nDoc:\nCreateServiceRequest represents the request payload for creating a new service\n\nCode:\ntype CreateServiceRequest struct {\n\tName                   string  `json:\"name\" validate:\"required,min=1,max=100\"`\n\tDescription            *string `json:\"description,omitempty\"`\n\tPrice                  float64 `json:\"price\" validate:\"required,gt=0\"`\n\tDurationMinutes        int     `json:\"duration_minutes\" validate:\"required,gt=0\"`\n\tPatchTestDurationHours int     `json:\"patch_test_duration_hours\" validate:\"gte=0\"`\n\tMinimumAgeRequired     int     `json:\"minimum_age_required\" validate:\"gte=0,lte=100\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/services/services.go\nType: func\nName: ToggleService\nDoc:\nToggleServiceHandler handles toggling a service's active status\n\nCode:\nfunc ToggleService(w http.ResponseWriter, r *http.Request) {\n\tserviceID := chi.URLParam(r, \"id\")\n\tif serviceID == \"\" {\n\t\thttp.Error(w, \"Service ID is required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tquery := \"UPDATE services SET is_active = NOT is_active WHERE id = $1\"\n\tresult, err := db.DB.Exec(r.Context(), query, serviceID)\n\tif err != nil {\n\t\thttp.Error(w, \"Failed to toggle service: \"+err.Error(), http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tif result.RowsAffected() == 0 {\n\t\thttp.Error(w, \"Service not found\", http.StatusNotFound)\n\t\treturn\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\tjson.NewEncoder(w).Encode(map[string]interface{}{\n\t\t\"message\": \"Service toggled successfully\",\n\t\t\"id\":      serviceID,\n\t})\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/services/services.go\nType: func\nName: CreateServiceHandler\nDoc:\nPOST /api/admin/services\n\nCode:\nfunc CreateServiceHandler(w http.ResponseWriter, r *http.Request) {\n\t// Parse and validate request\n\tvar req CreateServiceRequest\n\tif err := json.NewDecoder(r.Body).Decode(&req); err != nil {\n\t\thttp.Error(w, \"Invalid JSON: \"+err.Error(), http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Basic validation\n\tif req.Name == \"\" {\n\t\thttp.Error(w, \"Name is required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\tif req.Price <= 0 {\n\t\thttp.Error(w, \"Price must be greater than 0\", http.StatusBadRequest)\n\t\treturn\n\t}\n\tif req.PatchTestDurationHours < 0 {\n\t\thttp.Error(w, \"Patch test duration cannot be negative\", http.StatusBadRequest)\n\t\treturn\n\t}\n\tif req.MinimumAgeRequired < 0 || req.MinimumAgeRequired > 100 {\n\t\thttp.Error(w, \"Minimum age must be between 0 and 100\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Get user ID from context (if authentication is added later)\n\tvar createdBy *string\n\tif userID, ok := r.Context().Value(mw.UserIDKey).(string); ok {\n\t\tcreatedBy = &userID\n\t}\n\n\t// Insert new service\n\tquery := `\n\t\tINSERT INTO services (\n\t\t\tname, description, price, duration_minutes, \n\t\t\tpatch_test_duration_hours, minimum_age_required, created_by\n\t\t) \n\t\tVALUES ($1, $2, $3, $4, $5, $6, $7)\n\t\tRETURNING \n\t\t\tid, name, description, price, duration_minutes, is_active,\n\t\t\tpatch_test_duration_hours, minimum_age_required, created_at, \n\t\t\tcreated_by\n\t`\n\n\tvar service Service\n\tvar createdByDB sql.NullString\n\n\terr := db.DB.QueryRow(r.Context(),\n\t\tquery,\n\t\treq.Name,\n\t\treq.Description,\n\t\treq.Price,\n\t\treq.DurationMinutes,\n\t\treq.PatchTestDurationHours,\n\t\treq.MinimumAgeRequired,\n\t\tcreatedBy,\n\t).Scan(\n\t\t&service.ID,\n\t\t&service.Name,\n\t\t&service.Description,\n\t\t&service.Price,\n\t\t&service.DurationMinutes,\n\t\t&service.IsActive,\n\t\t&service.PatchTestDurationHours,\n\t\t&service.MinimumAgeRequired,\n\t\t&service.CreatedAt,\n\t\t&createdByDB,\n\t)\n\n\tif err != nil {\n\t\t// Check for duplicate name or other constraints\n\t\tif err.Error() == \"pq: duplicate key value violates unique constraint\" {\n\t\t\thttp.Error(w, \"A service with this name already exists\", http.StatusConflict)\n\t\t\treturn\n\t\t}\n\t\thttp.Error(w, \"Failed to create service: \"+err.Error(), http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Convert nullable fields to pointers\n\tif createdByDB.Valid {\n\t\tservice.CreatedBy = &createdByDB.String\n\t}\n\n\t// Return created service\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusCreated)\n\tif err := json.NewEncoder(w).Encode(service); err != nil {\n\t\thttp.Error(w, \"Failed to encode response: \"+err.Error(), http.StatusInternalServerError)\n\t\treturn\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/services/services.go\nType: func\nName: DeleteServiceHandler\nDoc:\nDeleteServiceHandler handles soft deleting a service (setting is_active to false)\n\nCode:\nfunc DeleteServiceHandler(w http.ResponseWriter, r *http.Request) {\n\tserviceID := chi.URLParam(r, \"id\")\n\tif serviceID == \"\" {\n\t\thttp.Error(w, \"Service ID is required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tquery := \"DELETE FROM services WHERE id = $1\"\n\tresult, err := db.DB.Exec(r.Context(), query, serviceID)\n\tif err != nil {\n\t\thttp.Error(w, \"Failed to delete service: \"+err.Error(), http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tif result.RowsAffected() == 0 {\n\t\thttp.Error(w, \"Service not found\", http.StatusNotFound)\n\t\treturn\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\tjson.NewEncoder(w).Encode(map[string]interface{}{\n\t\t\"message\": \"Service deleted successfully\",\n\t\t\"id\":      serviceID,\n\t})\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/services/services.go\nType: func\nName: ServicesHandler\nDoc:\nServicesHandler returns all services from the database\n\nCode:\nfunc ServicesHandler(w http.ResponseWriter, r *http.Request) {\n\t// Query all active services\n\tquery := `\n\t\tSELECT id, name, description, price, duration_minutes, \n\t\t       patch_test_duration_hours, minimum_age_required\n\t\tFROM services\n\t\tWHERE is_active = TRUE\n\t\tORDER BY name\n\t`\n\n\trows, err := db.DB.Query(r.Context(), query)\n\tif err != nil {\n\t\thttp.Error(w, \"Failed to fetch services: \"+err.Error(), http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer rows.Close()\n\n\tvar services []ServiceResponse\n\n\tfor rows.Next() {\n\t\tvar service ServiceResponse\n\n\t\terr := rows.Scan(\n\t\t\t&service.ID,\n\t\t\t&service.Name,\n\t\t\t&service.Description,\n\t\t\t&service.Price,\n\t\t\t&service.DurationMinutes,\n\t\t\t&service.PatchTestDurationHours,\n\t\t\t&service.MinimumAgeRequired,\n\t\t)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"Failed to read service data: \"+err.Error(), http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\tservices = append(services, service)\n\t}\n\n\tif err = rows.Err(); err != nil {\n\t\thttp.Error(w, \"Error iterating over services: \"+err.Error(), http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Set response headers\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\n\t// Return empty array instead of null if no services found\n\tif services == nil {\n\t\tservices = []ServiceResponse{}\n\t}\n\n\t// Encode response\n\tif err := json.NewEncoder(w).Encode(services); err != nil {\n\t\thttp.Error(w, \"Failed to encode response: \"+err.Error(), http.StatusInternalServerError)\n\t\treturn\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/services/services.go\nType: func\nName: AllServicesHandler\nDoc:\nAllServicesHandler returns all services including inactive ones (useful for admin)\n\nCode:\nfunc AllServicesHandler(w http.ResponseWriter, r *http.Request) {\n\t// Query all services including inactive ones\n\tquery := `\n\t\tSELECT id, name, description, price, duration_minutes, is_active, \n\t\t       patch_test_duration_hours, minimum_age_required, created_at, created_by\n\t\tFROM services\n\t\tORDER BY is_active DESC, name\n\t`\n\n\trows, err := db.DB.Query(r.Context(), query)\n\tif err != nil {\n\t\thttp.Error(w, \"Failed to fetch services: \"+err.Error(), http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer rows.Close()\n\n\tvar services []Service\n\n\tfor rows.Next() {\n\t\tvar service Service\n\t\tvar createdBy sql.NullString\n\n\t\terr := rows.Scan(\n\t\t\t&service.ID,\n\t\t\t&service.Name,\n\t\t\t&service.Description,\n\t\t\t&service.Price,\n\t\t\t&service.DurationMinutes,\n\t\t\t&service.IsActive,\n\t\t\t&service.PatchTestDurationHours,\n\t\t\t&service.MinimumAgeRequired,\n\t\t\t&service.CreatedAt,\n\t\t\t&createdBy,\n\t\t)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"Failed to read service data: \"+err.Error(), http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\t// Convert nullable fields to pointers\n\t\tif createdBy.Valid {\n\t\t\tservice.CreatedBy = &createdBy.String\n\t\t}\n\n\t\tservices = append(services, service)\n\t}\n\n\tif err = rows.Err(); err != nil {\n\t\thttp.Error(w, \"Error iterating over services: \"+err.Error(), http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Set response headers\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\n\t// Return empty array instead of null if no services found\n\tif services == nil {\n\t\tservices = []Service{}\n\t}\n\n\t// Encode response\n\tif err := json.NewEncoder(w).Encode(services); err != nil {\n\t\thttp.Error(w, \"Failed to encode response: \"+err.Error(), http.StatusInternalServerError)\n\t\treturn\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/user/profile.go\nType: var\nName: titleCaser\nCode:\nvar titleCaser = cases.Title(language.English)\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/user/profile.go\nType: struct\nName: UserProfile\nCode:\ntype UserProfile struct {\n\tID            string  `json:\"id\"`\n\tEmail         string  `json:\"email\"`\n\tFirstName     string  `json:\"firstName\"`\n\tLastName      string  `json:\"lastName\"`\n\tPhone         *string `json:\"phone,omitempty\"`\n\tDateOfBirth   *string `json:\"dateOfBirth,omitempty\"`\n\tRole          string  `json:\"role\"`\n\tLoyaltyStamps int     `json:\"loyaltyStamps\"`\n\tReferralCode  string  `json:\"referralCode\"`\n\tProfilePicURL *string `json:\"profilePicUrl,omitempty\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/user/profile.go\nType: struct\nName: UpdateProfileRequest\nCode:\ntype UpdateProfileRequest struct {\n\tFirstName string `json:\"firstName\"`\n\tLastName  string `json:\"lastName\"`\n\tPhone     string `json:\"phone\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/user/profile.go\nType: func\nName: GetProfileHandler\nDoc:\nGET /api/user/profile\n\nCode:\nfunc GetProfileHandler(w http.ResponseWriter, r *http.Request) {\n\tuserID, ok := mw.GetUserID(r.Context())\n\tif !ok {\n\t\thttp.Error(w, \"unauthorized\", http.StatusUnauthorized)\n\t\treturn\n\t}\n\n\tvar user UserProfile\n\terr := db.DB.QueryRow(r.Context(), `\n\t\tSELECT \n\t\t\tid, email, n_first_name, n_last_name, phone,\n\t\t\tdate_of_birth::text, account_role, loyalty_stamps,\n\t\t\treferral_code, profile_pic_url\n\t\tFROM users \n\t\tWHERE id = $1\n\t`, userID).Scan(\n\t\t&user.ID, &user.Email, &user.FirstName, &user.LastName,\n\t\t&user.Phone, &user.DateOfBirth, &user.Role,\n\t\t&user.LoyaltyStamps, &user.ReferralCode, &user.ProfilePicURL,\n\t)\n\n\tif err != nil {\n\t\thttp.Error(w, \"user not found\", http.StatusNotFound)\n\t\treturn\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tjson.NewEncoder(w).Encode(user)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/user/profile.go\nType: func\nName: updateCardDAV\nDoc:\nPUT /api/user/profile\nupdateCardDAV updates an existing contact in SabreDAV using user ID\n\nCode:\nfunc updateCardDAV(userID, firstName, lastName, email, phone, dob string) error {\n\t// Use user ID as filename - consistent with registration\n\tfilename := fmt.Sprintf(\"%s.vcf\", userID)\n\turl := fmt.Sprintf(\"http://nginx/dav/addressbooks/principals/default/default/%s\", filename)\n\n\t// Create vCard with user ID as UID (no need to fetch existing)\n\ttimestamp := time.Now().UTC().Format(\"20060102T150405Z\")\n\tuid := fmt.Sprintf(\"%s@example.com\", userID)\n\n\tvcard := fmt.Sprintf(`BEGIN:VCARD\nVERSION:3.0\nUID:%s\nFN:%s %s\nN:%s;%s;;;\nEMAIL;TYPE=INTERNET:%s\nTEL;TYPE=CELL:%s\nBDAY:%s\nREV:%s\nEND:VCARD`, uid, firstName, lastName, lastName, firstName, email, phone, dob, timestamp)\n\n\t// PUT updated vCard\n\treq, err := http.NewRequest(\"PUT\", url, bytes.NewBufferString(vcard))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to create request: %w\", err)\n\t}\n\n\treq.Header.Set(\"Content-Type\", \"text/vcard; charset=utf-8\")\n\treq.SetBasicAuth(\"admin\", \"admin\")\n\n\tclient := &http.Client{Timeout: 10 * time.Second}\n\tresp, err := client.Do(req)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to update CardDAV: %w\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\tif resp.StatusCode < 200 || resp.StatusCode >= 300 {\n\t\treturn fmt.Errorf(\"CardDAV returned status: %d\", resp.StatusCode)\n\t}\n\n\treturn nil\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/user/profile.go\nType: func\nName: UpdateProfileHandler\nDoc:\nPUT /api/user/profile\n\nCode:\nfunc UpdateProfileHandler(w http.ResponseWriter, r *http.Request) {\n\tuserID, _ := mw.GetUserID(r.Context())\n\n\tvar req UpdateProfileRequest\n\tif err := json.NewDecoder(r.Body).Decode(&req); err != nil {\n\t\thttp.Error(w, \"invalid request\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Normalize input\n\treq.FirstName = strings.TrimSpace(req.FirstName)\n\treq.LastName = strings.TrimSpace(req.LastName)\n\treq.Phone = strings.TrimSpace(req.Phone)\n\n\t// Required fields\n\tif req.FirstName == \"\" || req.LastName == \"\" || req.Phone == \"\" {\n\t\thttp.Error(w, \"first name, last name and phone are required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Validate names (unicode letters, spaces, hyphen, apostrophe, dot)\n\tnameRegex := regexp.MustCompile(`^[\\p{L}\\p{M}\\s\\-'\\.]+$`)\n\n\tif !nameRegex.MatchString(req.FirstName) || !nameRegex.MatchString(req.LastName) {\n\t\thttp.Error(w, \"invalid characters in name\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Validate lengths\n\tif len(req.FirstName) < 1 || len(req.FirstName) > 50 {\n\t\thttp.Error(w, \"first name must be 1-50 characters\", http.StatusBadRequest)\n\t\treturn\n\t}\n\tif len(req.LastName) < 1 || len(req.LastName) > 50 {\n\t\thttp.Error(w, \"last name must be 1-50 characters\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Normalize phone (strip spaces, hyphens, brackets)\n\treq.Phone = strings.Map(func(r rune) rune {\n\t\tif (r >= '0' && r <= '9') || r == '+' {\n\t\t\treturn r\n\t\t}\n\t\treturn -1\n\t}, req.Phone)\n\n\t// Validate UK phone number\n\tphone, err := auth.ValidateUKPhoneNumber(req.Phone)\n\tif err != nil {\n\t\thttp.Error(w, \"invalid phone number format\", http.StatusBadRequest)\n\t\treturn\n\t}\n\treq.Phone = strings.TrimSpace(phone)\n\n\t// Title case names\n\treq.FirstName = titleCaser.String(strings.ToLower(req.FirstName))\n\treq.LastName = titleCaser.String(strings.ToLower(req.LastName))\n\n\t// Fetch user's email and DOB for CardDAV update\n\tvar email string\n\tvar dob time.Time\n\terr = db.DB.QueryRow(r.Context(), `\n\t\tSELECT email, date_of_birth FROM users WHERE id = $1\n\t`, userID).Scan(&email, &dob)\n\n\tif err != nil {\n\t\thttp.Error(w, \"failed to fetch user data\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Update DB\n\t_, err = db.DB.Exec(r.Context(), `\n\t\tUPDATE users \n\t\tSET n_first_name = $1, n_last_name = $2, phone = $3, updated_at = NOW()\n\t\tWHERE id = $4\n\t`, req.FirstName, req.LastName, req.Phone, userID)\n\n\tif err != nil {\n\t\thttp.Error(w, \"update failed\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Update CardDAV (non-blocking)\n\tgo func() {\n\t\tdobStr := dob.Format(\"2006-01-02\")\n\t\tif err := updateCardDAV(userID, req.FirstName, req.LastName, email, req.Phone, dobStr); err != nil {\n\t\t\tfmt.Printf(\"Warning: Failed to update CardDAV contact for user %s: %v\\n\", userID, err)\n\t\t}\n\t}()\n\n\tw.WriteHeader(http.StatusOK)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/user/loyalty.go\nType: struct\nName: LoyaltyResponse\nCode:\ntype LoyaltyResponse struct {\n\tStamps       int    `json:\"stamps\"`\n\tReferralCode string `json:\"referralCode\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/user/loyalty.go\nType: func\nName: GetLoyaltyHandler\nDoc:\nGET /api/user/loyalty\n\nCode:\nfunc GetLoyaltyHandler(w http.ResponseWriter, r *http.Request) {\n\tuserID, _ := mw.GetUserID(r.Context())\n\n\tvar loyalty LoyaltyResponse\n\terr := db.DB.QueryRow(r.Context(), `\n\t\tSELECT loyalty_stamps, referral_code\n\t\tFROM users\n\t\tWHERE id = $1\n\t`, userID).Scan(&loyalty.Stamps, &loyalty.ReferralCode)\n\n\tif err != nil {\n\t\thttp.Error(w, \"failed to get loyalty info\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tjson.NewEncoder(w).Encode(loyalty)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/user/account.go\nType: func\nName: DeleteAccountHandler\nDoc:\nDELETE /api/user/account\n\nCode:\nfunc DeleteAccountHandler(w http.ResponseWriter, r *http.Request) {\n\t// TODO: Delete user's data\n\n\tw.WriteHeader(http.StatusNoContent)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: var\nName: londonLocation\nCode:\nvar londonLocation = func() *time.Location {\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: Booking\nDoc:\nBooking represents a booking in the system\n\nCode:\ntype Booking struct {\n\tID        string    `json:\"id\"`\n\tStartTime time.Time `json:\"start_time\"`\n\tStatus    string    `json:\"status\"`\n\tNotes     *string   `json:\"notes,omitempty\"`\n\tCreatedAt time.Time `json:\"created_at\"`\n\tUpdatedAt time.Time `json:\"updated_at\"`\n\tCreatedBy *string   `json:\"created_by,omitempty\"`\n\n\t// Joined fields\n\tUser            *UserSummary     `json:\"user,omitempty\"`\n\tServices        []BookingService `json:\"services,omitempty\"`\n\tPayments        []Payment        `json:\"payments,omitempty\"`\n\tTotalAmount     float64          `json:\"total_amount\"`\n\tAmountPaid      float64          `json:\"amount_paid\"`\n\tAmountDue       float64          `json:\"amount_due\"`\n\tDurationMinutes int              `json:\"duration_minutes\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: BookingService\nDoc:\nBookingService represents a service associated with a booking\n\nCode:\ntype BookingService struct {\n\tBookingID               string   `json:\"booking_id\"`\n\tServiceID               string   `json:\"service_id\"`\n\tOverridePrice           *float64 `json:\"override_price,omitempty\"`\n\tOverrideDurationMinutes *int     `json:\"override_duration_minutes,omitempty\"`\n\n\t// Service details (joined)\n\tServiceName        *string  `json:\"service_name,omitempty\"`\n\tServiceDescription *string  `json:\"service_description,omitempty\"`\n\tPrice              *float64 `json:\"price,omitempty\"`\n\tDurationMinutes    *int     `json:\"duration_minutes,omitempty\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: Payment\nDoc:\nPayment represents a payment associated with a booking\n\nCode:\ntype Payment struct {\n\tID              string    `json:\"id\"`\n\tBookingID       string    `json:\"booking_id\"`\n\tPaymentType     string    `json:\"payment_type\"`\n\tPaymentMethod   string    `json:\"payment_method\"`\n\tVendorCode      *string   `json:\"vendor_code,omitempty\"`\n\tInvoiceNumber   *int      `json:\"invoice_number,omitempty\"`\n\tStatus          string    `json:\"status\"`\n\tAmount          float64   `json:\"amount\"`\n\tIsVATApplicable bool      `json:\"is_vat_applicable\"`\n\tVATRate         *float64  `json:\"vat_rate,omitempty\"`\n\tVATAmount       *float64  `json:\"vat_amount,omitempty\"`\n\tNetAmount       *float64  `json:\"net_amount,omitempty\"`\n\tCreatedAt       time.Time `json:\"created_at\"`\n\tUpdatedAt       time.Time `json:\"updated_at\"`\n\tCreatedBy       *string   `json:\"created_by,omitempty\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: CreateBookingRequest\nDoc:\nCreateBookingRequest represents the request payload for creating a new booking\n\nCode:\ntype CreateBookingRequest struct {\n\tStartTime  time.Time `json:\"start_time\" validate:\"required\"`\n\tServiceIDs []string  `json:\"service_ids\" validate:\"required,min=1\"`\n\tNotes      *string   `json:\"notes,omitempty\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: EditBookingRequest\nDoc:\nEditBookingRequest represents the request payload for editing a booking's start time\n\nCode:\ntype EditBookingRequest struct {\n\tStartTime time.Time `json:\"start_time\" validate:\"required\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: ProgressBookingRequest\nDoc:\nProgressBookingRequest represents the request payload for updating a booking's status\n\nCode:\ntype ProgressBookingRequest struct {\n\tStatus string `json:\"status\" validate:\"required,oneof=pending confirmed in_progress completed client_cancelled we_cancelled re-schedule no_show\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: ConfirmBookingRequest\nDoc:\nConfirmBookingRequest represents the request payload for confirming a booking\n\nCode:\ntype ConfirmBookingRequest struct {\n\tServiceOverrides []ServiceOverride `json:\"service_overrides,omitempty\"`\n\tNotes            *string           `json:\"notes,omitempty\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: ServiceOverride\nDoc:\nServiceOverride represents override values for a specific service in a booking\n\nCode:\ntype ServiceOverride struct {\n\tServiceID               string   `json:\"service_id\" validate:\"required\"`\n\tOverridePrice           *float64 `json:\"override_price,omitempty\"`\n\tOverrideDurationMinutes *int     `json:\"override_duration_minutes,omitempty\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: DeleteBookingRequest\nDoc:\nDeleteBookingRequest represents the request payload for deleting a booking with payment\n\nCode:\ntype DeleteBookingRequest struct {\n\tReason string `json:\"reason\" validate:\"required,oneof=client_cancelled we_cancelled re-schedule no_show\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: AdminUserSummary\nDoc:\nAdminUserSummary represents a small user summary for admin views\n\nCode:\ntype AdminUserSummary struct {\n\tFullName      string  `json:\"full_name\"`\n\tProfilePicURL *string `json:\"profile_pic_url,omitempty\"`\n\tNotes         *string `json:\"notes,omitempty\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: AdminBookingSummary\nDoc:\nAdminBookingSummary represents a complete booking summary for admin view\n\nCode:\ntype AdminBookingSummary struct {\n\tBooking         Booking                `json:\"booking\"`\n\tUser            *AdminUserSummary      `json:\"user,omitempty\"`\n\tServices        []BookingServiceDetail `json:\"services\"`\n\tPayments        []Payment              `json:\"payments\"`\n\tTotalAmount     float64                `json:\"total_amount\"`\n\tAmountPaid      float64                `json:\"amount_paid\"`\n\tAmountDue       float64                `json:\"amount_due\"`\n\tDurationMinutes int                    `json:\"duration_minutes\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: UserSummary\nCode:\ntype UserSummary struct {\n\tID               string  `json:\"id\"`\n\tFirstName        string  `json:\"first_name\"`\n\tLastName         string  `json:\"last_name\"`\n\tFullName         string  `json:\"full_name\"`\n\tEmail            *string `json:\"email,omitempty\"`\n\tPhone            *string `json:\"phone,omitempty\"`\n\tProfilePicURL    *string `json:\"profile_pic_url,omitempty\"`\n\tDateOfBirth      *string `json:\"date_of_birth,omitempty\"`\n\tAccountRole      string  `json:\"account_role\"`\n\tLoyaltyStamps    *int    `json:\"loyalty_stamps,omitempty\"`\n\tReferralCode     *string `json:\"referral_code,omitempty\"`\n\tReferralCodeUses *int    `json:\"referral_code_uses,omitempty\"`\n\tCreatedAt        string  `json:\"created_at\"`\n\tNotes            *string `json:\"notes,omitempty\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: BookingServiceDetail\nCode:\ntype BookingServiceDetail struct {\n\tServiceName             string   `json:\"service_name\"`\n\tServiceDescription      *string  `json:\"service_description,omitempty\"`\n\tBasePrice               float64  `json:\"base_price\"`\n\tBaseDurationMinutes     int      `json:\"base_duration_minutes\"`\n\tOverridePrice           *float64 `json:\"override_price,omitempty\"`\n\tOverrideDurationMinutes *int     `json:\"override_duration_minutes,omitempty\"`\n\tIsActive                bool     `json:\"is_active\"`\n\tRequiresPatchTest       bool     `json:\"requires_patch_test\"`\n\tMinimumAgeRequired      int      `json:\"minimum_age_required\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: GetAllBookingsRequest\nDoc:\nGetAllBookingsRequest represents query parameters for getting all bookings\n\nCode:\ntype GetAllBookingsRequest struct {\n\tStatus    *string `json:\"status,omitempty\"`\n\tStartDate *string `json:\"start_date,omitempty\"`\n\tEndDate   *string `json:\"end_date,omitempty\"`\n\tPage      int     `json:\"page\"`\n\tPerPage   int     `json:\"per_page\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: BookingListResponse\nDoc:\nBookingListResponse represents a paginated list of bookings\n\nCode:\ntype BookingListResponse struct {\n\tBookings []Booking `json:\"bookings\"`\n\tPage     int       `json:\"page\"`\n\tPerPage  int       `json:\"per_page\"`\n\tTotal    int       `json:\"total\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: SearchBookingsRequest\nDoc:\nSearchBookingsRequest represents search parameters\n\nCode:\ntype SearchBookingsRequest struct {\n\tQuery   string `json:\"query\"`\n\tPage    int    `json:\"page\"`\n\tPerPage int    `json:\"per_page\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: SearchBookingsResponse\nDoc:\nSearchBookingsResponse represents search results\n\nCode:\ntype SearchBookingsResponse struct {\n\tBookings []AdminBookingSummary `json:\"bookings\"`\n\tPage     int                   `json:\"page\"`\n\tPerPage  int                   `json:\"per_page\"`\n\tTotal    int                   `json:\"total\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: UserBookingDetail\nDoc:\nEnhanced booking response for user endpoints\n\nCode:\ntype UserBookingDetail struct {\n\tBooking         Booking `json:\"booking\"`\n\tTotalAmount     float64 `json:\"total_amount\"`\n\tAmountPaid      float64 `json:\"amount_paid\"`\n\tAmountDue       float64 `json:\"amount_due\"`\n\tDurationMinutes int     `json:\"duration_minutes\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: struct\nName: AdminBookingDetail\nDoc:\nEnhanced booking response for admin endpoints\n\nCode:\ntype AdminBookingDetail struct {\n\tBooking         Booking           `json:\"booking\"`\n\tUser            *AdminUserSummary `json:\"user,omitempty\"`\n\tTotalAmount     float64           `json:\"total_amount\"`\n\tAmountPaid      float64           `json:\"amount_paid\"`\n\tAmountDue       float64           `json:\"amount_due\"`\n\tDurationMinutes int               `json:\"duration_minutes\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: func\nName: parseGetAllBookingsRequest\nDoc:\nHelper function to parse query parameters\n\nCode:\nfunc parseGetAllBookingsRequest(r *http.Request) GetAllBookingsRequest {\n\treq := GetAllBookingsRequest{\n\t\tPage:    1,\n\t\tPerPage: 10, // default page size\n\t}\n\n\tif status := r.URL.Query().Get(\"status\"); status != \"\" {\n\t\treq.Status = &status\n\t}\n\n\tif startDate := r.URL.Query().Get(\"start_date\"); startDate != \"\" {\n\t\treq.StartDate = &startDate\n\t}\n\n\tif endDate := r.URL.Query().Get(\"end_date\"); endDate != \"\" {\n\t\treq.EndDate = &endDate\n\t}\n\n\tif pageStr := r.URL.Query().Get(\"page\"); pageStr != \"\" {\n\t\tif page, err := strconv.Atoi(pageStr); err == nil && page > 0 {\n\t\t\treq.Page = page\n\t\t}\n\t}\n\n\tif perPageStr := r.URL.Query().Get(\"per_page\"); perPageStr != \"\" {\n\t\tif perPage, err := strconv.Atoi(perPageStr); err == nil && perPage > 0 && perPage <= 100 {\n\t\t\treq.PerPage = perPage\n\t\t}\n\t}\n\n\treturn req\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: func\nName: GetAllUserBookingsHandler\nDoc:\nGET /api/bookings\n\nCode:\nfunc GetAllUserBookingsHandler(w http.ResponseWriter, r *http.Request) {\n\tuserID, ok := r.Context().Value(mw.UserIDKey).(string)\n\tif !ok || userID == \"\" {\n\t\thttp.Error(w, \"Authentication required\", http.StatusUnauthorized)\n\t\treturn\n\t}\n\n\t// Parse query parameters\n\treq := parseGetAllBookingsRequest(r)\n\n\t// Build base query with user filter\n\tbaseQuery := `\n\t\tSELECT id, start_time, status, notes, created_at, updated_at, created_by\n\t\tFROM bookings\n\t\tWHERE user_id = $1\n\t`\n\n\tcountQuery := `SELECT COUNT(*) FROM bookings WHERE user_id = $1`\n\tvar args []interface{}\n\targs = append(args, userID)\n\tparamCount := 2\n\n\t// Add filters\n\tif req.Status != nil {\n\t\tbaseQuery += fmt.Sprintf(\" AND status = $%d\", paramCount)\n\t\tcountQuery += fmt.Sprintf(\" AND status = $%d\", paramCount)\n\t\targs = append(args, *req.Status)\n\t\tparamCount++\n\t}\n\n\tif req.StartDate != nil {\n\t\tbaseQuery += fmt.Sprintf(\" AND start_time >= $%d\", paramCount)\n\t\tcountQuery += fmt.Sprintf(\" AND start_time >= $%d\", paramCount)\n\t\tstartTime, err := time.ParseInLocation(\"2006-01-02\", *req.StartDate, londonLocation)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"Invalid start_date format, use YYYY-MM-DD\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t\t// Ensure it's at start of day in London time\n\t\tstartTime = time.Date(startTime.Year(), startTime.Month(), startTime.Day(), 0, 0, 0, 0, londonLocation)\n\t\targs = append(args, startTime)\n\t\tparamCount++\n\t}\n\n\tif req.EndDate != nil {\n\t\tbaseQuery += fmt.Sprintf(\" AND start_time <= $%d\", paramCount)\n\t\tcountQuery += fmt.Sprintf(\" AND start_time <= $%d\", paramCount)\n\t\tendTime, err := time.Parse(\"2006-01-02\", *req.EndDate)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"Invalid end_date format, use YYYY-MM-DD\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t\t// Add end of day\n\t\tendTime = endTime.Add(23*time.Hour + 59*time.Minute + 59*time.Second)\n\t\targs = append(args, endTime)\n\t\tparamCount++\n\t}\n\n\t// Add ordering and pagination\n\tbaseQuery += \" ORDER BY start_time ASC\"\n\tif req.PerPage > 0 {\n\t\tbaseQuery += fmt.Sprintf(\" LIMIT $%d OFFSET $%d\", paramCount, paramCount+1)\n\t\targs = append(args, req.PerPage, (req.Page-1)*req.PerPage)\n\t}\n\n\t// Get total count\n\tvar total int\n\terr := db.DB.QueryRow(r.Context(), countQuery, args[:1]...).Scan(&total)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to get booking count for user %s: %v\", userID, err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Get bookings\n\trows, err := db.DB.Query(r.Context(), baseQuery, args...)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to fetch bookings for user %s: %v\", userID, err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer rows.Close()\n\n\tvar bookings []Booking\n\tfor rows.Next() {\n\t\tvar b Booking\n\t\tvar createdBy sql.NullString\n\t\terr := rows.Scan(&b.ID, &b.StartTime, &b.Status, &b.Notes, &b.CreatedAt, &b.UpdatedAt, &createdBy)\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Failed to scan booking row: %v\", err)\n\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\t\tif createdBy.Valid {\n\t\t\tb.CreatedBy = &createdBy.String\n\t\t}\n\t\tbookings = append(bookings, b)\n\t}\n\n\tresponse := BookingListResponse{\n\t\tBookings: bookings,\n\t\tPage:     req.Page,\n\t\tPerPage:  req.PerPage,\n\t\tTotal:    total,\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tif err := json.NewEncoder(w).Encode(response); err != nil {\n\t\tlog.Printf(\"Failed to encode response: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: func\nName: GetAllAdminBookingsHandler\nDoc:\nGET /api/admin/bookings\n\nCode:\nfunc GetAllAdminBookingsHandler(w http.ResponseWriter, r *http.Request) {\n\t// Parse query parameters\n\treq := parseGetAllBookingsRequest(r)\n\n\t// Build base query - only what the component needs\n\tbaseQuery := `\n        WITH booking_totals AS (\n            SELECT \n                bs.booking_id,\n                SUM(COALESCE(bs.override_duration_minutes, s.duration_minutes)) as total_duration,\n                SUM(COALESCE(bs.override_price, s.price)) as total_amount\n            FROM booking_services bs\n            LEFT JOIN services s ON bs.service_id = s.id\n            GROUP BY bs.booking_id\n        ),\n        payment_totals AS (\n            SELECT \n                booking_id,\n                SUM(amount) as total_paid\n            FROM payments \n            WHERE status = 'completed'\n            GROUP BY booking_id\n        )\n        SELECT \n            b.id, \n            b.start_time, \n            b.status,\n            u.fn,\n            COALESCE(bt.total_duration, 0) as duration_minutes,\n            COALESCE(bt.total_amount, 0) - COALESCE(pt.total_paid, 0) as amount_due\n        FROM bookings b\n        LEFT JOIN users u ON b.user_id = u.id\n        LEFT JOIN booking_totals bt ON b.id = bt.booking_id\n        LEFT JOIN payment_totals pt ON b.id = pt.booking_id\n    `\n\n\tcountQuery := `SELECT COUNT(*) FROM bookings b`\n\tvar args []interface{}\n\tparamCount := 1\n\n\t// Add filters\n\twhereAdded := false\n\tif req.Status != nil {\n\t\tbaseQuery += fmt.Sprintf(\" WHERE b.status = $%d\", paramCount)\n\t\tcountQuery += fmt.Sprintf(\" WHERE b.status = $%d\", paramCount)\n\t\targs = append(args, *req.Status)\n\t\tparamCount++\n\t\twhereAdded = true\n\t}\n\n\tif req.StartDate != nil {\n\t\tif whereAdded {\n\t\t\tbaseQuery += fmt.Sprintf(\" AND b.start_time >= $%d\", paramCount)\n\t\t\tcountQuery += fmt.Sprintf(\" AND b.start_time >= $%d\", paramCount)\n\t\t} else {\n\t\t\tbaseQuery += fmt.Sprintf(\" WHERE b.start_time >= $%d\", paramCount)\n\t\t\tcountQuery += fmt.Sprintf(\" WHERE b.start_time >= $%d\", paramCount)\n\t\t\twhereAdded = true\n\t\t}\n\t\tstartTime, err := time.Parse(\"2006-01-02\", *req.StartDate)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"Invalid start_date format, use YYYY-MM-DD\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t\targs = append(args, startTime)\n\t\tparamCount++\n\t}\n\n\tif req.EndDate != nil {\n\t\tif whereAdded {\n\t\t\tbaseQuery += fmt.Sprintf(\" AND b.start_time <= $%d\", paramCount)\n\t\t\tcountQuery += fmt.Sprintf(\" AND b.start_time <= $%d\", paramCount)\n\t\t} else {\n\t\t\tbaseQuery += fmt.Sprintf(\" WHERE b.start_time <= $%d\", paramCount)\n\t\t\tcountQuery += fmt.Sprintf(\" WHERE b.start_time <= $%d\", paramCount)\n\t\t}\n\t\tendTime, err := time.Parse(\"2006-01-02\", *req.EndDate)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"Invalid end_date format, use YYYY-MM-DD\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t\tendTime = endTime.Add(23*time.Hour + 59*time.Minute + 59*time.Second)\n\t\targs = append(args, endTime)\n\t\tparamCount++\n\t}\n\n\t// Add ordering and pagination (NO GROUP BY needed here)\n\tbaseQuery += \" ORDER BY b.start_time ASC\"\n\tif req.PerPage > 0 {\n\t\tbaseQuery += fmt.Sprintf(\" LIMIT $%d OFFSET $%d\", paramCount, paramCount+1)\n\t\targs = append(args, req.PerPage, (req.Page-1)*req.PerPage)\n\t\tparamCount += 2\n\t}\n\n\t// Get total count\n\tcountArgs := args\n\tif req.PerPage > 0 {\n\t\tcountArgs = args[:len(args)-2]\n\t}\n\n\tvar total int\n\terr := db.DB.QueryRow(r.Context(), countQuery, countArgs...).Scan(&total)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to get total booking count: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Get bookings\n\trows, err := db.DB.Query(r.Context(), baseQuery, args...)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to fetch all bookings: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer rows.Close()\n\n\tvar bookings []Booking\n\tbookingIDs := []string{}\n\n\tfor rows.Next() {\n\t\tvar b Booking\n\t\tvar userFullName string\n\n\t\terr := rows.Scan(&b.ID, &b.StartTime, &b.Status, &userFullName, &b.DurationMinutes, &b.AmountDue)\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Failed to scan booking row: %v\", err)\n\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\t// Create minimal user with just full_name\n\t\tb.User = &UserSummary{\n\t\t\tFullName: userFullName,\n\t\t}\n\n\t\tbookings = append(bookings, b)\n\t\tbookingIDs = append(bookingIDs, b.ID)\n\t}\n\n\t// Fetch service names only\n\tif len(bookingIDs) > 0 {\n\t\tservicesQuery := `\n\t\t\tSELECT bs.booking_id, s.name\n\t\t\tFROM booking_services bs\n\t\t\tJOIN services s ON bs.service_id = s.id\n\t\t\tWHERE bs.booking_id = ANY($1)\n\t\t\tORDER BY bs.booking_id, s.name\n\t\t`\n\n\t\tserviceRows, err := db.DB.Query(r.Context(), servicesQuery, bookingIDs)\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Failed to fetch booking services: %v\", err)\n\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\t\tdefer serviceRows.Close()\n\n\t\tservicesByBooking := make(map[string][]BookingService)\n\n\t\tfor serviceRows.Next() {\n\t\t\tvar bookingID string\n\t\t\tvar serviceName string\n\n\t\t\tif err := serviceRows.Scan(&bookingID, &serviceName); err != nil {\n\t\t\t\tlog.Printf(\"Failed to scan service row: %v\", err)\n\t\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tservice := BookingService{\n\t\t\t\tBookingID:   bookingID,\n\t\t\t\tServiceName: &serviceName,\n\t\t\t}\n\t\t\tservicesByBooking[bookingID] = append(servicesByBooking[bookingID], service)\n\t\t}\n\n\t\t// Assign services to each booking\n\t\tfor i := range bookings {\n\t\t\tif services, exists := servicesByBooking[bookings[i].ID]; exists {\n\t\t\t\tbookings[i].Services = services\n\t\t\t}\n\t\t}\n\t}\n\n\tresponse := BookingListResponse{\n\t\tBookings: bookings,\n\t\tPage:     req.Page,\n\t\tPerPage:  req.PerPage,\n\t\tTotal:    total,\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tif err := json.NewEncoder(w).Encode(response); err != nil {\n\t\tlog.Printf(\"Failed to encode response: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: func\nName: GetAllBookingsByUserHandler\nDoc:\nGET /api/admin/bookings/user/{user_id}\n\nCode:\nfunc GetAllBookingsByUserHandler(w http.ResponseWriter, r *http.Request) {\n\tuserID := chi.URLParam(r, \"user_id\")\n\tif userID == \"\" {\n\t\thttp.Error(w, \"User ID is required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Parse query parameters\n\treq := parseGetAllBookingsRequest(r)\n\n\t// Build query with specific user filter\n\tbaseQuery := `\n\t\tSELECT id, user_id, start_time, status, notes, created_at, updated_at, created_by,\n\t\t       u.fn, u.profile_pic_url, u.notes as user_notes\n\t\tFROM bookings b\n\t\tLEFT JOIN users u ON b.user_id = u.id\n\t\tWHERE b.user_id = $1\n\t`\n\n\tcountQuery := `SELECT COUNT(*) FROM bookings WHERE user_id = $1`\n\tvar args []interface{}\n\targs = append(args, userID)\n\tparamCount := 2\n\n\t// Add filters\n\tif req.Status != nil {\n\t\tbaseQuery += fmt.Sprintf(\" AND b.status = $%d\", paramCount)\n\t\tcountQuery += fmt.Sprintf(\" AND status = $%d\", paramCount)\n\t\targs = append(args, *req.Status)\n\t\tparamCount++\n\t}\n\n\tif req.StartDate != nil {\n\t\tbaseQuery += fmt.Sprintf(\" AND b.start_time >= $%d\", paramCount)\n\t\tcountQuery += fmt.Sprintf(\" AND start_time >= $%d\", paramCount)\n\t\tstartTime, err := time.ParseInLocation(\"2006-01-02\", *req.StartDate, londonLocation)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"Invalid start_date format, use YYYY-MM-DD\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t\t// Ensure it's at start of day in London time\n\t\tstartTime = time.Date(startTime.Year(), startTime.Month(), startTime.Day(), 0, 0, 0, 0, londonLocation)\n\t\targs = append(args, startTime)\n\t\tparamCount++\n\t}\n\n\tif req.EndDate != nil {\n\t\tbaseQuery += fmt.Sprintf(\" AND b.start_time <= $%d\", paramCount)\n\t\tcountQuery += fmt.Sprintf(\" AND start_time <= $%d\", paramCount)\n\t\tendTime, err := time.Parse(\"2006-01-02\", *req.EndDate)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"Invalid end_date format, use YYYY-MM-DD\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t\tendTime = endTime.Add(23*time.Hour + 59*time.Minute + 59*time.Second)\n\t\targs = append(args, endTime)\n\t\tparamCount++\n\t}\n\n\t// Add ordering and pagination\n\tbaseQuery += \" ORDER BY b.start_time ASC\"\n\tif req.PerPage > 0 {\n\t\tbaseQuery += fmt.Sprintf(\" LIMIT $%d OFFSET $%d\", paramCount, paramCount+1)\n\t\targs = append(args, req.PerPage, (req.Page-1)*req.PerPage)\n\t}\n\n\t// Get total count\n\tvar total int\n\terr := db.DB.QueryRow(r.Context(), countQuery, args[:1]...).Scan(&total)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to get booking count for user %s: %v\", userID, err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Get bookings\n\trows, err := db.DB.Query(r.Context(), baseQuery, args...)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to fetch bookings for user %s: %v\", userID, err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer rows.Close()\n\n\tvar bookings []Booking\n\tfor rows.Next() {\n\t\tvar b Booking\n\t\tb.User = &UserSummary{}\n\t\tvar createdBy sql.NullString\n\n\t\tvar userFullName, userPicURL, userNotes sql.NullString\n\t\terr := rows.Scan(\n\t\t\t&b.ID, &b.User.ID, &b.StartTime, &b.Status, &b.Notes,\n\t\t\t&b.CreatedAt, &b.UpdatedAt, &createdBy,\n\t\t\t&userFullName, &userPicURL, &userNotes,\n\t\t)\n\t\tif userFullName.Valid {\n\t\t\tb.User.FullName = userFullName.String\n\t\t}\n\t\tif userPicURL.Valid {\n\t\t\tb.User.ProfilePicURL = &userPicURL.String\n\t\t}\n\t\tif userNotes.Valid {\n\t\t\tb.User.Notes = &userNotes.String\n\t\t}\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Failed to scan booking row: %v\", err)\n\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\t\tif createdBy.Valid {\n\t\t\tb.CreatedBy = &createdBy.String\n\t\t}\n\t\tbookings = append(bookings, b)\n\t}\n\n\tresponse := BookingListResponse{\n\t\tBookings: bookings,\n\t\tPage:     req.Page,\n\t\tPerPage:  req.PerPage,\n\t\tTotal:    total,\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tif err := json.NewEncoder(w).Encode(response); err != nil {\n\t\tlog.Printf(\"Failed to encode response: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: func\nName: GetAdminBookingHandler\nDoc:\nGET /api/admin/bookings/{id}\n\nCode:\nfunc GetAdminBookingHandler(w http.ResponseWriter, r *http.Request) {\n\tbookingID := chi.URLParam(r, \"id\")\n\tif bookingID == \"\" {\n\t\thttp.Error(w, \"Booking ID is required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// ----------------------------\n\t// 1. Fetch booking + user\n\t// ----------------------------\n\tvar booking Booking\n\tbooking.User = &UserSummary{}\n\n\terr := db.DB.QueryRow(r.Context(), `\n\t\tSELECT \n\t\t\tb.id, b.user_id, b.start_time, b.status, b.notes,\n\t\t\tb.created_at, b.updated_at, b.created_by,\n\t\t\tu.fn, u.email, u.phone, u.profile_pic_url, u.loyalty_stamps, \n\t\t\tu.referral_code, u.notes\n\t\tFROM bookings b\n\t\tLEFT JOIN users u ON b.user_id = u.id\n\t\tWHERE b.id = $1\n\t`, bookingID).Scan(\n\t\t&booking.ID, &booking.User.ID, &booking.StartTime, &booking.Status, &booking.Notes,\n\t\t&booking.CreatedAt, &booking.UpdatedAt, &booking.CreatedBy,\n\t\t&booking.User.FullName, &booking.User.Email, &booking.User.Phone, &booking.User.ProfilePicURL, &booking.User.LoyaltyStamps,\n\t\t&booking.User.ReferralCode, &booking.User.Notes,\n\t)\n\tif err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\thttp.Error(w, \"Booking not found\", http.StatusNotFound)\n\t\t\treturn\n\t\t}\n\t\tlog.Printf(\"Failed to fetch booking %s: %v\", bookingID, err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// ----------------------------\n\t// 1.5. Fetch referral code uses count\n\t// ----------------------------\n\tvar referralCodeUses int\n\terr = db.DB.QueryRow(r.Context(), `\n    SELECT COUNT(*) \n    FROM user_referrals \n    WHERE referrer_id = $1\n`, booking.User.ID).Scan(&referralCodeUses)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to fetch referral code uses for user %s: %v\", booking.User.ID, err)\n\t\t// Don't fail the entire request, just log and continue with 0\n\t\treferralCodeUses = 0\n\t}\n\tbooking.User.ReferralCodeUses = &referralCodeUses\n\n\t// ----------------------------\n\t// 2. Fetch services and calculate totals\n\t// ----------------------------\n\tserviceRows, err := db.DB.Query(r.Context(), `\n\t\tSELECT \n\t\t\ts.name,\n\t\t\tcoalesce(bs.override_price, s.price) as price,\n\t\t\tcoalesce(bs.override_duration_minutes, s.duration_minutes) as duration_minutes\n\t\tFROM booking_services bs\n\t\tLEFT JOIN services s ON bs.service_id = s.id\n\t\tWHERE bs.booking_id = $1\n\t\tORDER BY s.name\n\t`, bookingID)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to fetch services for booking %s: %v\", bookingID, err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer serviceRows.Close()\n\n\tvar totalAmount float64\n\tvar durationMinutes int\n\n\tfor serviceRows.Next() {\n\t\tvar name string\n\t\tvar price float64\n\t\tvar durationMinutes int\n\n\t\tif err := serviceRows.Scan(&name, &price, &durationMinutes); err != nil {\n\t\t\tlog.Printf(\"Failed to scan service for booking %s: %v\", bookingID, err)\n\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\t// Calculate totals\n\t\ttotalAmount += price\n\t\tdurationMinutes += durationMinutes\n\t\tbooking.Services = append(booking.Services, BookingService{\n\t\t\tServiceName:     &name,\n\t\t\tPrice:           &price,\n\t\t\tDurationMinutes: &durationMinutes,\n\t\t})\n\t}\n\n\tbooking.TotalAmount = totalAmount\n\tbooking.DurationMinutes = durationMinutes\n\n\t// ----------------------------\n\t// 3. Fetch payments and calculate amount paid\n\t// ----------------------------\n\tpaymentRows, err := db.DB.Query(r.Context(), `\n\t\tSELECT\n\t\t\tpayment_type, payment_method, vendor_code, invoice_number,\n\t\t\tstatus, amount, created_at\n\t\tFROM payments\n\t\tWHERE booking_id = $1\n\t\tORDER BY created_at ASC\n\t`, bookingID)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to fetch payments for booking %s: %v\", bookingID, err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer paymentRows.Close()\n\n\tvar payments []Payment\n\tvar amountPaid float64\n\n\tfor paymentRows.Next() {\n\t\tvar p Payment\n\t\tvar vendorCode sql.NullString\n\t\tvar invoiceNumber sql.NullInt32\n\n\t\terr := paymentRows.Scan(\n\t\t\t&p.PaymentType, &p.PaymentMethod, &vendorCode, &invoiceNumber,\n\t\t\t&p.Status, &p.Amount, &p.CreatedAt,\n\t\t)\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Failed to scan payment row for booking %s: %v\", bookingID, err)\n\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\tif vendorCode.Valid && vendorCode.String != \"\" {\n\t\t\tp.VendorCode = &vendorCode.String\n\t\t}\n\t\tif invoiceNumber.Valid {\n\t\t\tnum := int(invoiceNumber.Int32)\n\t\t\tp.InvoiceNumber = &num\n\t\t}\n\n\t\tpayments = append(payments, p)\n\n\t\tif p.Status == \"completed\" {\n\t\t\tamountPaid += p.Amount\n\t\t}\n\t}\n\n\tif len(payments) > 0 {\n\t\tbooking.Payments = payments\n\t}\n\tbooking.AmountPaid = amountPaid\n\tbooking.AmountDue = totalAmount - amountPaid\n\n\t// ----------------------------\n\t// Return JSON response\n\t// ----------------------------\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\tif err := json.NewEncoder(w).Encode(booking); err != nil {\n\t\tlog.Printf(\"Failed to encode booking response: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: func\nName: SearchAdminBookingsHandler\nDoc:\nGET /api/admin/bookings/search\n\nCode:\nfunc SearchAdminBookingsHandler(w http.ResponseWriter, r *http.Request) {\n\tquery := r.URL.Query().Get(\"q\")\n\tif query == \"\" {\n\t\thttp.Error(w, \"Search query 'q' is required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Parse pagination\n\tpage := 1\n\tperPage := 10\n\tif pageStr := r.URL.Query().Get(\"page\"); pageStr != \"\" {\n\t\tif p, err := strconv.Atoi(pageStr); err == nil && p > 0 {\n\t\t\tpage = p\n\t\t}\n\t}\n\tif perPageStr := r.URL.Query().Get(\"per_page\"); perPageStr != \"\" {\n\t\tif pp, err := strconv.Atoi(perPageStr); err == nil && pp > 0 && pp <= 100 {\n\t\t\tperPage = pp\n\t\t}\n\t}\n\n\t// Escape the search query to prevent SQL injection in LIKE patterns\n\tescapedQuery := strings.ReplaceAll(query, `\\`, `\\\\`)\n\tescapedQuery = strings.ReplaceAll(escapedQuery, `%`, `\\%`)\n\tescapedQuery = strings.ReplaceAll(escapedQuery, `_`, `\\_`)\n\tsearchPattern := \"%\" + escapedQuery + \"%\"\n\n\t// Build the main search query using CTEs to match your actual schema\n\tsearchQuery := `\n        WITH booking_totals AS (\n            SELECT \n                bs.booking_id,\n                SUM(COALESCE(bs.override_duration_minutes, s.duration_minutes)) as total_duration,\n                SUM(COALESCE(bs.override_price, s.price)) as total_amount\n            FROM booking_services bs\n            LEFT JOIN services s ON bs.service_id = s.id\n            GROUP BY bs.booking_id\n        ),\n        payment_totals AS (\n            SELECT \n                booking_id,\n                SUM(amount) as total_paid\n            FROM payments \n            WHERE status = 'completed'\n            GROUP BY booking_id\n        )\n        SELECT \n            b.id, \n            b.start_time, \n            b.status,\n            u.fn as full_name,\n            COALESCE(bt.total_duration, 0) as duration_minutes,\n            COALESCE(bt.total_amount, 0) - COALESCE(pt.total_paid, 0) as amount_due\n        FROM bookings b\n        LEFT JOIN users u ON b.user_id = u.id\n        LEFT JOIN booking_totals bt ON b.id = bt.booking_id\n        LEFT JOIN payment_totals pt ON b.id = pt.booking_id\n        WHERE \n            b.id ILIKE $1 ESCAPE '\\' OR\n            b.notes ILIKE $1 ESCAPE '\\' OR\n            b.status::text ILIKE $1 ESCAPE '\\' OR\n            u.n_first_name ILIKE $1 ESCAPE '\\' OR\n            u.n_last_name ILIKE $1 ESCAPE '\\' OR\n            u.fn ILIKE $1 ESCAPE '\\' OR\n            u.email ILIKE $1 ESCAPE '\\' OR\n            u.phone ILIKE $1 ESCAPE '\\' OR\n            EXISTS (\n                SELECT 1 FROM booking_services bs \n                JOIN services s ON bs.service_id = s.id \n                WHERE bs.booking_id = b.id AND s.name ILIKE $1 ESCAPE '\\'\n            )\n        ORDER BY b.start_time ASC\n        LIMIT $2 OFFSET $3\n    `\n\n\tcountQuery := `\n        SELECT COUNT(DISTINCT b.id)\n        FROM bookings b\n        LEFT JOIN users u ON b.user_id = u.id\n        LEFT JOIN booking_services bs ON b.id = bs.booking_id\n        LEFT JOIN services s ON bs.service_id = s.id\n        WHERE \n            b.id ILIKE $1 ESCAPE '\\' OR\n            b.notes ILIKE $1 ESCAPE '\\' OR\n            b.status::text ILIKE $1 ESCAPE '\\' OR\n            u.n_first_name ILIKE $1 ESCAPE '\\' OR\n            u.n_last_name ILIKE $1 ESCAPE '\\' OR\n            u.fn ILIKE $1 ESCAPE '\\' OR\n            u.email ILIKE $1 ESCAPE '\\' OR\n            u.phone ILIKE $1 ESCAPE '\\' OR\n            s.name ILIKE $1 ESCAPE '\\'\n    `\n\n\toffset := (page - 1) * perPage\n\n\t// Get total count\n\tvar total int\n\terr := db.DB.QueryRow(r.Context(), countQuery, searchPattern).Scan(&total)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to get search count: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Get bookings\n\trows, err := db.DB.Query(r.Context(), searchQuery, searchPattern, perPage, offset)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to search bookings: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer rows.Close()\n\n\tvar bookings []Booking\n\tbookingIDs := []string{}\n\n\tfor rows.Next() {\n\t\tvar b Booking\n\t\tvar userFullName string\n\n\t\terr := rows.Scan(&b.ID, &b.StartTime, &b.Status, &userFullName, &b.DurationMinutes, &b.AmountDue)\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Failed to scan booking row: %v\", err)\n\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\t// Create minimal user with just full_name\n\t\tb.User = &UserSummary{\n\t\t\tFullName: userFullName,\n\t\t}\n\n\t\tbookings = append(bookings, b)\n\t\tbookingIDs = append(bookingIDs, b.ID)\n\t}\n\n\t// Fetch service names only (same as GetAllAdminBookingsHandler)\n\tif len(bookingIDs) > 0 {\n\t\tservicesQuery := `\n\t\t\tSELECT bs.booking_id, s.name\n\t\t\tFROM booking_services bs\n\t\t\tJOIN services s ON bs.service_id = s.id\n\t\t\tWHERE bs.booking_id = ANY($1)\n\t\t\tORDER BY bs.booking_id, s.name\n\t\t`\n\n\t\tserviceRows, err := db.DB.Query(r.Context(), servicesQuery, bookingIDs)\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Failed to fetch booking services: %v\", err)\n\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\t\tdefer serviceRows.Close()\n\n\t\tservicesByBooking := make(map[string][]BookingService)\n\n\t\tfor serviceRows.Next() {\n\t\t\tvar bookingID string\n\t\t\tvar serviceName string\n\n\t\t\tif err := serviceRows.Scan(&bookingID, &serviceName); err != nil {\n\t\t\t\tlog.Printf(\"Failed to scan service row: %v\", err)\n\t\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tservice := BookingService{\n\t\t\t\tBookingID:   bookingID,\n\t\t\t\tServiceName: &serviceName,\n\t\t\t}\n\t\t\tservicesByBooking[bookingID] = append(servicesByBooking[bookingID], service)\n\t\t}\n\n\t\t// Assign services to each booking\n\t\tfor i := range bookings {\n\t\t\tif services, exists := servicesByBooking[bookings[i].ID]; exists {\n\t\t\t\tbookings[i].Services = services\n\t\t\t} else {\n\t\t\t\t// Ensure services is never nil\n\t\t\t\tbookings[i].Services = []BookingService{}\n\t\t\t}\n\t\t}\n\t}\n\n\tresponse := BookingListResponse{\n\t\tBookings: bookings,\n\t\tPage:     page,\n\t\tPerPage:  perPage,\n\t\tTotal:    total,\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tif err := json.NewEncoder(w).Encode(response); err != nil {\n\t\tlog.Printf(\"Failed to encode response: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: func\nName: CreateBookingHandler\nDoc:\nPOST /api/bookings\n\nCode:\nfunc CreateBookingHandler(w http.ResponseWriter, r *http.Request) {\n\t// Get user ID from context\n\tuserID, ok := r.Context().Value(mw.UserIDKey).(string)\n\tif !ok || userID == \"\" {\n\t\thttp.Error(w, \"Authentication required\", http.StatusUnauthorized)\n\t\treturn\n\t}\n\n\t// Parse and validate request\n\tvar req CreateBookingRequest\n\tif err := json.NewDecoder(r.Body).Decode(&req); err != nil {\n\t\tlog.Printf(\"Failed to decode request: %v\", err)\n\t\thttp.Error(w, \"Invalid request\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Basic validation\n\tif req.StartTime.IsZero() {\n\t\thttp.Error(w, \"Start time is required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\tif len(req.ServiceIDs) == 0 {\n\t\thttp.Error(w, \"At least one service is required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\tif req.StartTime.Before(time.Now()) {\n\t\thttp.Error(w, \"Start time cannot be in the past\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Get created by from context (if available)\n\tvar createdBy *string\n\tif creatorID, ok := r.Context().Value(mw.UserIDKey).(string); ok {\n\t\tcreatedBy = &creatorID\n\t}\n\n\ttx, err := db.DB.Begin(r.Context())\n\tif err != nil {\n\t\tlog.Printf(\"Failed to start transaction: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer tx.Rollback(r.Context())\n\n\t// Insert new booking\n\tbookingQuery := `\n\t\tINSERT INTO bookings (user_id, start_time, notes, created_by)\n\t\tVALUES ($1, $2, $3, $4)\n\t\tRETURNING id, user_id, start_time, status, notes, created_at, updated_at, created_by\n\t`\n\n\tvar booking Booking\n\tbooking.User = &UserSummary{}\n\terr = tx.QueryRow(r.Context(),\n\t\tbookingQuery,\n\t\tuserID,\n\t\treq.StartTime,\n\t\treq.Notes,\n\t\tcreatedBy,\n\t).Scan(\n\t\t&booking.ID,\n\t\t&booking.User.ID,\n\t\t&booking.StartTime,\n\t\t&booking.Status,\n\t\t&booking.Notes,\n\t\t&booking.CreatedAt,\n\t\t&booking.UpdatedAt,\n\t\t&booking.CreatedBy,\n\t)\n\n\tif err != nil {\n\t\tlog.Printf(\"Failed to create booking for user %s: %v\", userID, err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Insert booking services\n\tserviceQuery := `\n\t\tINSERT INTO booking_services (booking_id, service_id)\n\t\tVALUES ($1, $2)\n\t`\n\tfor _, serviceID := range req.ServiceIDs {\n\t\t_, err := tx.Exec(r.Context(), serviceQuery, booking.ID, serviceID)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\t}\n\n\tif err := tx.Commit(r.Context()); err != nil {\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Return created booking\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusCreated)\n\tif err := json.NewEncoder(w).Encode(booking); err != nil {\n\t\tlog.Printf(\"Failed to encode booking response: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: func\nName: EditBookingHandler\nDoc:\nPUT /api/bookings/{id}\n\nCode:\nfunc EditBookingHandler(w http.ResponseWriter, r *http.Request) {\n\tbookingID := chi.URLParam(r, \"id\")\n\tif bookingID == \"\" {\n\t\thttp.Error(w, \"Booking ID is required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Get user ID from context\n\tuserID, ok := r.Context().Value(mw.UserIDKey).(string)\n\tif !ok || userID == \"\" {\n\t\thttp.Error(w, \"Authentication required\", http.StatusUnauthorized)\n\t\treturn\n\t}\n\n\t// Parse and validate request\n\tvar req EditBookingRequest\n\tif err := json.NewDecoder(r.Body).Decode(&req); err != nil {\n\t\tlog.Printf(\"Failed to decode request: %v\", err)\n\t\thttp.Error(w, \"Invalid request\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tif req.StartTime.IsZero() {\n\t\thttp.Error(w, \"Start time is required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\tif req.StartTime.Before(time.Now()) {\n\t\thttp.Error(w, \"Start time cannot be in the past\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Update booking start time (only for user's own bookings)\n\tquery := `\n\t\tUPDATE bookings \n\t\tSET start_time = $1, updated_at = NOW()\n\t\tWHERE id = $2 AND user_id = $3\n\t\tRETURNING id, user_id, start_time, status, notes, created_at, updated_at, created_by\n\t`\n\n\tvar booking Booking\n\tbooking.User = &UserSummary{}\n\terr := db.DB.QueryRow(r.Context(),\n\t\tquery,\n\t\treq.StartTime,\n\t\tbookingID,\n\t\tuserID,\n\t).Scan(\n\t\t&booking.ID,\n\t\t&booking.User.ID,\n\t\t&booking.StartTime,\n\t\t&booking.Status,\n\t\t&booking.Notes,\n\t\t&booking.CreatedAt,\n\t\t&booking.UpdatedAt,\n\t\t&booking.CreatedBy,\n\t)\n\n\tif err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\thttp.Error(w, \"Booking not found or access denied\", http.StatusNotFound)\n\t\t\treturn\n\t\t}\n\t\tlog.Printf(\"Failed to update booking %s for user %s: %v\", bookingID, userID, err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Return updated booking\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\tif err := json.NewEncoder(w).Encode(booking); err != nil {\n\t\tlog.Printf(\"Failed to encode booking response: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: func\nName: ProgressBookingHandler\nDoc:\nPUT /api/bookings/{id}/progress\n\nCode:\nfunc ProgressBookingHandler(w http.ResponseWriter, r *http.Request) {\n\tbookingID := chi.URLParam(r, \"id\")\n\tif bookingID == \"\" {\n\t\thttp.Error(w, \"Booking ID is required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Parse and validate request\n\tvar req ProgressBookingRequest\n\tif err := json.NewDecoder(r.Body).Decode(&req); err != nil {\n\t\tlog.Printf(\"Failed to decode request: %v\", err)\n\t\thttp.Error(w, \"Invalid request\", http.StatusBadRequest)\n\t\treturn\n\t}\n\tallowed := map[string]bool{\n\t\t\"pending\": true, \"confirmed\": true, \"in_progress\": true,\n\t\t\"completed\": true, \"client_cancelled\": true, \"we_cancelled\": true,\n\t\t\"re-schedule\": true, \"no_show\": true,\n\t}\n\tif !allowed[req.Status] {\n\t\thttp.Error(w, \"Invalid status\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Update booking status\n\tquery := `\n\t\tUPDATE bookings \n\t\tSET status = $1, updated_at = NOW()\n\t\tWHERE id = $2\n\t\tRETURNING id, user_id, start_time, status, notes, created_at, updated_at, created_by\n\t`\n\n\tvar booking Booking\n\tbooking.User = &UserSummary{}\n\terr := db.DB.QueryRow(r.Context(),\n\t\tquery,\n\t\treq.Status,\n\t\tbookingID,\n\t).Scan(\n\t\t&booking.ID,\n\t\t&booking.User.ID,\n\t\t&booking.StartTime,\n\t\t&booking.Status,\n\t\t&booking.Notes,\n\t\t&booking.CreatedAt,\n\t\t&booking.UpdatedAt,\n\t\t&booking.CreatedBy,\n\t)\n\n\tif err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\thttp.Error(w, \"Booking not found\", http.StatusNotFound)\n\t\t\treturn\n\t\t}\n\t\tlog.Printf(\"Failed to update booking status for booking %s: %v\", bookingID, err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Return updated booking\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\tif err := json.NewEncoder(w).Encode(booking); err != nil {\n\t\tlog.Printf(\"Failed to encode booking response: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: func\nName: ConfirmBookingHandler\nDoc:\nPOST /api/bookings/{id}/confirm\n\nCode:\nfunc ConfirmBookingHandler(w http.ResponseWriter, r *http.Request) {\n\tbookingID := chi.URLParam(r, \"id\")\n\tif bookingID == \"\" {\n\t\thttp.Error(w, \"Booking ID is required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Parse and validate request\n\tvar req ConfirmBookingRequest\n\tif err := json.NewDecoder(r.Body).Decode(&req); err != nil {\n\t\tlog.Printf(\"Failed to decode request: %v\", err)\n\t\thttp.Error(w, \"Invalid request\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Validate override values\n\tfor _, override := range req.ServiceOverrides {\n\t\tif override.OverridePrice != nil && *override.OverridePrice < 0 {\n\t\t\thttp.Error(w, \"Override price cannot be negative\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t\tif override.OverrideDurationMinutes != nil && *override.OverrideDurationMinutes <= 0 {\n\t\t\thttp.Error(w, \"Override duration must be positive\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t}\n\n\ttx, err := db.DB.Begin(r.Context())\n\tif err != nil {\n\t\tlog.Printf(\"Failed to start transaction: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer tx.Rollback(r.Context())\n\n\t// Update booking status and notes\n\tbookingQuery := `\n\t\tUPDATE bookings \n\t\tSET status = 'confirmed', notes = COALESCE($1, notes), updated_at = NOW()\n\t\tWHERE id = $2 AND status = 'pending'\n\t\tRETURNING id, user_id, start_time, status, notes, created_at, updated_at, created_by\n\t`\n\n\tvar booking Booking\n\tbooking.User = &UserSummary{}\n\terr = tx.QueryRow(r.Context(),\n\t\tbookingQuery,\n\t\treq.Notes,\n\t\tbookingID,\n\t).Scan(\n\t\t&booking.ID,\n\t\t&booking.User.ID,\n\t\t&booking.StartTime,\n\t\t&booking.Status,\n\t\t&booking.Notes,\n\t\t&booking.CreatedAt,\n\t\t&booking.UpdatedAt,\n\t\t&booking.CreatedBy,\n\t)\n\n\tif err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\thttp.Error(w, \"Booking not found or already confirmed\", http.StatusNotFound)\n\t\t\treturn\n\t\t}\n\t\tlog.Printf(\"Failed to confirm booking %s: %v\", bookingID, err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Update service overrides individually\n\tif len(req.ServiceOverrides) > 0 {\n\t\t// First, verify all service IDs belong to this booking\n\t\tserviceCheckQuery := `\n\t\t\tSELECT COUNT(*) FROM booking_services \n\t\t\tWHERE booking_id = $1 AND service_id = ANY($2)\n\t\t`\n\t\tserviceIDs := make([]string, len(req.ServiceOverrides))\n\t\tfor i, override := range req.ServiceOverrides {\n\t\t\tserviceIDs[i] = override.ServiceID\n\t\t}\n\n\t\tvar count int\n\t\terr = tx.QueryRow(r.Context(), serviceCheckQuery, bookingID, serviceIDs).Scan(&count)\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Failed to verify services for booking %s: %v\", bookingID, err)\n\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\t\tif count != len(req.ServiceOverrides) {\n\t\t\thttp.Error(w, \"One or more service IDs do not belong to this booking\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\n\t\t// Update each service override\n\t\tserviceUpdateQuery := `\n\t\t\tUPDATE booking_services \n\t\t\tSET override_price = $1,\n\t\t\t    override_duration_minutes = $2\n\t\t\tWHERE booking_id = $3 AND service_id = $4\n\t\t`\n\n\t\tfor _, override := range req.ServiceOverrides {\n\t\t\t_, err := tx.Exec(r.Context(),\n\t\t\t\tserviceUpdateQuery,\n\t\t\t\toverride.OverridePrice,\n\t\t\t\toverride.OverrideDurationMinutes,\n\t\t\t\tbookingID,\n\t\t\t\toverride.ServiceID,\n\t\t\t)\n\t\t\tif err != nil {\n\t\t\t\tlog.Printf(\"Failed to update service override for booking %s, service %s: %v\",\n\t\t\t\t\tbookingID, override.ServiceID, err)\n\t\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n\n\tif err := tx.Commit(r.Context()); err != nil {\n\t\tlog.Printf(\"Failed to commit booking confirmation: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Return confirmed booking\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\tif err := json.NewEncoder(w).Encode(booking); err != nil {\n\t\tlog.Printf(\"Failed to encode booking response: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: func\nName: DeleteBookingHandler\nDoc:\nDELETE /api/bookings/{id}\n\nCode:\nfunc DeleteBookingHandler(w http.ResponseWriter, r *http.Request) {\n\tbookingID := chi.URLParam(r, \"id\")\n\tif bookingID == \"\" {\n\t\thttp.Error(w, \"Booking ID is required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Get user ID from context\n\tuserID, ok := r.Context().Value(mw.UserIDKey).(string)\n\tif !ok || userID == \"\" {\n\t\thttp.Error(w, \"Authentication required\", http.StatusUnauthorized)\n\t\treturn\n\t}\n\n\t// Check if booking has payments\n\tvar paymentCount int\n\tpaymentCheckQuery := \"SELECT COUNT(*) FROM payments WHERE booking_id = $1\"\n\terr := db.DB.QueryRow(r.Context(), paymentCheckQuery, bookingID).Scan(&paymentCount)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to check booking %s for user %s: %v\", bookingID, userID, err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tif paymentCount > 0 {\n\t\t// Parse delete reason for bookings with payments\n\t\tvar req DeleteBookingRequest\n\t\tif err := json.NewDecoder(r.Body).Decode(&req); err != nil {\n\t\t\tlog.Printf(\"Failed to decode request: %v\", err)\n\t\t\thttp.Error(w, \"Invalid request\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t\tallowed := map[string]bool{\n\t\t\t\"client_cancelled\": true, \"we_cancelled\": true, \"re-schedule\": true, \"no_show\": true,\n\t\t}\n\t\tif !allowed[req.Reason] {\n\t\t\thttp.Error(w, \"Invalid reason\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\n\t\t// Update booking status instead of deleting\n\t\tquery := `\n\t\t\tUPDATE bookings \n\t\t\tSET status = $1, updated_at = NOW()\n\t\t\tWHERE id = $2 AND user_id = $3\n\t\t`\n\t\tresult, err := db.DB.Exec(r.Context(), query, req.Reason, bookingID, userID)\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Failed to cancel booking %s for user %s: %v\", bookingID, userID, err)\n\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\tif result.RowsAffected() == 0 {\n\t\t\thttp.Error(w, \"Booking not found or access denied\", http.StatusNotFound)\n\t\t\treturn\n\t\t}\n\n\t\tw.Header().Set(\"Content-Type\", \"application/json\")\n\t\tw.WriteHeader(http.StatusOK)\n\t\tjson.NewEncoder(w).Encode(map[string]interface{}{\n\t\t\t\"message\": \"Booking cancelled successfully\",\n\t\t\t\"id\":      bookingID,\n\t\t\t\"status\":  req.Reason,\n\t\t})\n\t\treturn\n\t}\n\n\t// Hard delete if no payments exist\n\tquery := \"DELETE FROM bookings WHERE id = $1 AND user_id = $2\"\n\tresult, err := db.DB.Exec(r.Context(), query, bookingID, userID)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to delete booking %s for user %s: %v\", bookingID, userID, err)\n\t\thttp.Error(w, \"Failed to delete booking\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tif result.RowsAffected() == 0 {\n\t\thttp.Error(w, \"Booking not found or access denied\", http.StatusNotFound)\n\t\treturn\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusOK)\n\tjson.NewEncoder(w).Encode(map[string]interface{}{\n\t\t\"message\": \"Booking deleted successfully\",\n\t\t\"id\":      bookingID,\n\t})\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go\nType: func\nName: GetBookingHandler\nDoc:\nGET /api/bookings/{id}\n\nCode:\nfunc GetBookingHandler(w http.ResponseWriter, r *http.Request) {\n\tbookingID := chi.URLParam(r, \"id\")\n\tif bookingID == \"\" {\n\t\thttp.Error(w, \"Booking ID is required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tuserID, ok := r.Context().Value(mw.UserIDKey).(string)\n\tif !ok || userID == \"\" {\n\t\thttp.Error(w, \"Authentication required\", http.StatusUnauthorized)\n\t\treturn\n\t}\n\n\t// ----------------------------\n\t// 1. Fetch booking\n\t// ----------------------------\n\tvar booking Booking\n\tbooking.Payments = []Payment{}\n\tbooking.User = &UserSummary{}\n\tvar createdBy sql.NullString\n\terr := db.DB.QueryRow(r.Context(), `\n\t\tSELECT id, user_id, start_time, status, notes, created_at, updated_at, created_by\n\t\tFROM bookings\n\t\tWHERE id = $1 AND user_id = $2\n\t`, bookingID, userID).Scan(\n\t\t&booking.ID, &booking.User.ID, &booking.StartTime, &booking.Status,\n\t\t&booking.Notes, &booking.CreatedAt, &booking.UpdatedAt, &createdBy,\n\t)\n\tif err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\thttp.Error(w, \"Booking not found or access denied\", http.StatusNotFound)\n\t\t\treturn\n\t\t}\n\t\tlog.Printf(\"Failed to fetch booking %s for user %s: %v\", bookingID, userID, err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tif createdBy.Valid {\n\t\tbooking.CreatedBy = &createdBy.String\n\t}\n\n\t// ----------------------------\n\t// 2. Fetch services\n\t// ----------------------------\n\tvar totalAmount float64\n\tvar durationMinutes int\n\n\tserviceRows, err := db.DB.Query(r.Context(), `\n        SELECT \n            bs.service_id, bs.override_price, bs.override_duration_minutes,\n            s.name, s.description, s.price, s.duration_minutes\n        FROM booking_services bs\n        LEFT JOIN services s ON bs.service_id = s.id\n        WHERE bs.booking_id = $1\n        ORDER BY s.name\n    `, bookingID)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to fetch services for booking %s: %v\", bookingID, err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer serviceRows.Close()\n\n\tfor serviceRows.Next() {\n\t\tvar s BookingService\n\t\tvar overridePrice sql.NullFloat64\n\t\tvar overrideDuration sql.NullInt32\n\t\tvar name, description sql.NullString\n\t\tvar basePrice sql.NullFloat64\n\t\tvar baseDuration sql.NullInt32\n\n\t\terr := serviceRows.Scan(\n\t\t\t&s.ServiceID,\n\t\t\t&overridePrice, &overrideDuration,\n\t\t\t&name, &description, &basePrice, &baseDuration,\n\t\t)\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Failed to scan service row for booking %s: %v\", bookingID, err)\n\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\tif overridePrice.Valid {\n\t\t\ts.OverridePrice = &overridePrice.Float64\n\t\t\ttotalAmount += *s.OverridePrice\n\t\t} else if basePrice.Valid {\n\t\t\ttotalAmount += basePrice.Float64\n\t\t}\n\n\t\tif overrideDuration.Valid {\n\t\t\td := int(overrideDuration.Int32)\n\t\t\ts.OverrideDurationMinutes = &d\n\t\t\tdurationMinutes += *s.OverrideDurationMinutes\n\t\t} else if baseDuration.Valid {\n\t\t\tdurationMinutes += int(baseDuration.Int32)\n\t\t}\n\n\t\tif name.Valid {\n\t\t\ts.ServiceName = &name.String\n\t\t}\n\t\tif description.Valid {\n\t\t\ts.ServiceDescription = &description.String\n\t\t}\n\t\tif basePrice.Valid {\n\t\t\ts.Price = &basePrice.Float64\n\t\t}\n\t\tif baseDuration.Valid {\n\t\t\td := int(baseDuration.Int32)\n\t\t\ts.DurationMinutes = &d\n\t\t}\n\n\t\tbooking.Services = append(booking.Services, s)\n\t}\n\n\t// ----------------------------\n\t// 3. Fetch payments\n\t// ----------------------------\n\tvar amountPaid float64\n\tpaymentRows, err := db.DB.Query(r.Context(), `\n        SELECT\n            id, payment_type, payment_method, vendor_code, invoice_number,\n            status, amount, is_vat_applicable, vat_rate, vat_amount, net_amount,\n            created_at, updated_at, created_by\n        FROM payments\n        WHERE booking_id = $1\n        ORDER BY created_at ASC\n    `, bookingID)\n\tif err != nil {\n\t\tlog.Printf(\"Failed to fetch payments for booking %s: %v\", bookingID, err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer paymentRows.Close()\n\n\tfor paymentRows.Next() {\n\t\tvar p Payment\n\t\tvar vendorCode sql.NullString\n\t\tvar invoiceNumber sql.NullInt32\n\t\tvar vatRate, vatAmount, netAmount sql.NullFloat64\n\t\tvar createdBy sql.NullString\n\n\t\terr := paymentRows.Scan(\n\t\t\t&p.ID, &p.PaymentType, &p.PaymentMethod, &vendorCode, &invoiceNumber,\n\t\t\t&p.Status, &p.Amount, &p.IsVATApplicable, &vatRate, &vatAmount, &netAmount,\n\t\t\t&p.CreatedAt, &p.UpdatedAt, &createdBy,\n\t\t)\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Failed to scan payment row for booking %s: %v\", bookingID, err)\n\t\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\tif vendorCode.Valid {\n\t\t\tp.VendorCode = &vendorCode.String\n\t\t}\n\t\tif invoiceNumber.Valid {\n\t\t\tnum := int(invoiceNumber.Int32)\n\t\t\tp.InvoiceNumber = &num\n\t\t}\n\t\tif vatRate.Valid {\n\t\t\tp.VATRate = &vatRate.Float64\n\t\t}\n\t\tif vatAmount.Valid {\n\t\t\tp.VATAmount = &vatAmount.Float64\n\t\t}\n\t\tif netAmount.Valid {\n\t\t\tp.NetAmount = &netAmount.Float64\n\t\t}\n\t\tif createdBy.Valid {\n\t\t\tp.CreatedBy = &createdBy.String\n\t\t}\n\n\t\tif p.Status == \"completed\" {\n\t\t\tamountPaid += p.Amount\n\t\t}\n\n\t\tbooking.Payments = append(booking.Payments, p)\n\t}\n\n\tamountDue := totalAmount - amountPaid\n\n\t// Create enhanced response with user-friendly totals\n\tenhancedResponse := struct {\n\t\tBooking         Booking `json:\"booking\"`\n\t\tTotalAmount     float64 `json:\"total_amount\"`\n\t\tAmountPaid      float64 `json:\"amount_paid\"`\n\t\tAmountDue       float64 `json:\"amount_due\"`\n\t\tDurationMinutes int     `json:\"duration_minutes\"`\n\t}{\n\t\tBooking:         booking,\n\t\tTotalAmount:     totalAmount,\n\t\tAmountPaid:      amountPaid,\n\t\tAmountDue:       amountDue,\n\t\tDurationMinutes: durationMinutes,\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tif err := json.NewEncoder(w).Encode(enhancedResponse); err != nil {\n\t\tlog.Printf(\"Failed to encode booking response: %v\", err)\n\t\thttp.Error(w, \"Internal server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/auth/social.go\nLanguage: go\n\npackage auth",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go\nType: var\nName: titleCaser\nCode:\n\ttitleCaser = cases.Title(language.English)\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go\nType: var\nName: loginStateMu\nDoc:\nLogin state management\n\nCode:\n\tloginStateMu    sync.Mutex\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go\nType: var\nName: loginInProgress\nDoc:\nLogin state management\n\nCode:\n\tloginInProgress = make(map[string]bool)\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go\nType: var\nName: loginAttempts\nDoc:\nLogin state management\n\nCode:\n\tloginAttempts   = make(map[string]time.Time)\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go\nType: func\nName: init\nCode:\nfunc init() {\n\tgo func() {\n\t\tticker := time.NewTicker(1 * time.Hour)\n\t\tdefer ticker.Stop()\n\n\t\tfor range ticker.C {\n\t\t\tloginStateMu.Lock()\n\t\t\tnow := time.Now()\n\t\t\tfor userID, lastAttempt := range loginAttempts {\n\t\t\t\t// Remove attempts older than 1 hour\n\t\t\t\tif now.Sub(lastAttempt) > 1*time.Hour {\n\t\t\t\t\tdelete(loginAttempts, userID)\n\t\t\t\t}\n\t\t\t}\n\t\t\tloginStateMu.Unlock()\n\t\t}\n\t}()\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go\nType: struct\nName: RegisterRequest\nCode:\ntype RegisterRequest struct {\n\tFirstName      string `json:\"firstName\"`\n\tLastName       string `json:\"lastName\"`\n\tEmail          string `json:\"email\"`\n\tPassword       string `json:\"password\"`\n\tPhone          string `json:\"phone\"`\n\tDateOfBirth    string `json:\"dateOfBirth\"`\n\tAgreedToPolicy bool   `json:\"agreedToPolicy\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go\nType: struct\nName: LoginRequest\nCode:\ntype LoginRequest struct {\n\tEmail    string `json:\"email\"`\n\tPassword string `json:\"password\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go\nType: func\nName: RegisterHandler\nDoc:\nPOST /api/register\n\nCode:\nfunc RegisterHandler(w http.ResponseWriter, r *http.Request) {\n\tvar req RegisterRequest\n\tif err := json.NewDecoder(r.Body).Decode(&req); err != nil {\n\t\thttp.Error(w, \"invalid request\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Must accept terms\n\tif !req.AgreedToPolicy {\n\t\thttp.Error(w, \"must agree to terms\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Normalize input\n\treq.Email = strings.ToLower(strings.TrimSpace(req.Email))\n\treq.FirstName = strings.TrimSpace(req.FirstName)\n\treq.LastName = strings.TrimSpace(req.LastName)\n\treq.Phone = strings.TrimSpace(req.Phone)\n\treq.DateOfBirth = strings.TrimSpace(req.DateOfBirth)\n\n\t// Check required fields\n\tif req.FirstName == \"\" || req.LastName == \"\" || req.Email == \"\" || req.Phone == \"\" || req.DateOfBirth == \"\" {\n\t\thttp.Error(w, \"all fields are required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Validate name (unicode letters, spaces, hyphen, apostrophe, dot)\n\tnameRegex := regexp.MustCompile(`^[\\p{L}\\p{M}\\s\\-'\\.]+$`)\n\n\tif !nameRegex.MatchString(req.FirstName) {\n\t\thttp.Error(w, \"invalid characters in name\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Validate length\n\tif len(req.FirstName) > 50 || len(req.FirstName) < 1 {\n\t\thttp.Error(w, \"first name must be 1-50 characters\", http.StatusBadRequest)\n\t\treturn\n\t}\n\tif len(req.LastName) > 50 || len(req.LastName) < 1 {\n\t\thttp.Error(w, \"last name must be 1-50 characters\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Validate email format\n\t_, err := mail.ParseAddress(req.Email)\n\tif err != nil {\n\t\thttp.Error(w, \"invalid email format\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Normalize phone (remove spaces, hyphens, parentheses)\n\treq.Phone = strings.Map(func(r rune) rune {\n\t\tif r >= '0' && r <= '9' || r == '+' {\n\t\t\treturn r\n\t\t}\n\t\treturn -1\n\t}, req.Phone)\n\n\t// Validate UK phone number\n\tphone, err := ValidateUKPhoneNumber(req.Phone)\n\tif err != nil {\n\t\thttp.Error(w, \"invalid phone number format\", http.StatusBadRequest)\n\t\treturn\n\t}\n\treq.Phone = strings.TrimSpace(phone)\n\n\t// Convert names to title case\n\treq.FirstName = titleCaser.String(strings.ToLower(req.FirstName))\n\treq.LastName = titleCaser.String(strings.ToLower(req.LastName))\n\n\t// Parse date of birth\n\tdob, err := time.Parse(\"2006-01-02\", req.DateOfBirth)\n\tif err != nil {\n\t\thttp.Error(w, \"invalid date format\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Reject if younger than 16\n\tif !dob.Before(time.Now().AddDate(-16, 0, 0)) {\n\t\thttp.Error(w, \"account creation prohibited for users under 16. Please call to book an appointment.\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Hash password\n\thash, err := bcrypt.GenerateFromPassword([]byte(req.Password), bcrypt.DefaultCost)\n\tif err != nil {\n\t\thttp.Error(w, \"server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\ttx, err := db.DB.Begin(r.Context())\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\thttp.Error(w, \"server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer tx.Rollback(r.Context())\n\n\tnow := time.Now()\n\n\t// Insert and return the generated ID\n\tvar userID string\n\terr = tx.QueryRow(r.Context(), `\n\t\tINSERT INTO users\n\t\t\t(n_first_name, n_last_name, phone, date_of_birth, email, password_hash, \n\t\t\t account_type, privacy_policy_and_terms_consent, policy_consent_updated_at, \n\t\t\t created_at, updated_at)\n\t\tVALUES\n\t\t\t($1, $2, $3, $4, $5, $6, 'email', $7, $8, $8, $8)\n\t\tRETURNING id\n\t`, req.FirstName, req.LastName, req.Phone, dob, req.Email, string(hash), req.AgreedToPolicy, now).Scan(&userID)\n\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\tif strings.Contains(err.Error(), \"duplicate key\") {\n\t\t\thttp.Error(w, \"an account with this email already exists\", http.StatusConflict)\n\t\t} else {\n\t\t\thttp.Error(w, \"could not create user\", http.StatusInternalServerError)\n\t\t}\n\t\treturn\n\t}\n\n\tif err := tx.Commit(r.Context()); err != nil {\n\t\thttp.Error(w, \"server error\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tgo func() {\n\t\tinput := dav.ContactInput{\n\t\t\tUserID:    userID,\n\t\t\tFirstName: req.FirstName,\n\t\t\tLastName:  req.LastName,\n\t\t\tEmail:     req.Email,\n\t\t\tPhone:     req.Phone,\n\t\t\tDOB:       req.DateOfBirth,\n\t\t}\n\t\tif err := dav.Service.CreateContact(1, userID, input); err != nil {\n\t\t\tlog.Printf(\"Warning: Failed to create contact in DAV for user %s: %v\", userID, err)\n\t\t}\n\t}()\n\n\tw.WriteHeader(http.StatusCreated)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go\nType: func\nName: ValidateUKPhoneNumber\nCode:\nfunc ValidateUKPhoneNumber(phone string) (string, error) {\n\tnum, err := phonenumbers.Parse(phone, \"GB\")\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tif !phonenumbers.IsValidNumber(num) {\n\t\treturn \"\", fmt.Errorf(\"invalid phone number\")\n\t}\n\n\t// Check if it's actually a UK number\n\tif phonenumbers.GetRegionCodeForNumber(num) != \"GB\" {\n\t\treturn \"\", fmt.Errorf(\"only UK numbers allowed\")\n\t}\n\n\t// Format in E.164 format (+44...)\n\treturn phonenumbers.Format(num, phonenumbers.E164), nil\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go\nType: func\nName: LoginHandler\nDoc:\nPOST /api/login\n\nCode:\nfunc LoginHandler(w http.ResponseWriter, r *http.Request) {\n\tvar req LoginRequest\n\tif err := json.NewDecoder(r.Body).Decode(&req); err != nil {\n\t\thttp.Error(w, \"invalid request\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Normalize email\n\treq.Email = strings.ToLower(strings.TrimSpace(req.Email))\n\n\tvar userID, passwordHash, role string\n\tctx := context.Background()\n\terr := db.DB.QueryRow(ctx, `\n\t\tSELECT id, password_hash, account_role \n\t\tFROM users\n\t\tWHERE email = $1 AND account_type = 'email'\n\t`, req.Email).Scan(&userID, &passwordHash, &role)\n\n\tif err != nil {\n\t\thttp.Error(w, \"invalid credentials\", http.StatusUnauthorized)\n\t\treturn\n\t}\n\n\t// Check if user is already logging in\n\tloginStateMu.Lock()\n\tif loginInProgress[userID] {\n\t\tloginStateMu.Unlock()\n\t\thttp.Error(w, \"login already in progress\", http.StatusConflict) // 409\n\t\treturn\n\t}\n\tloginInProgress[userID] = true\n\tloginStateMu.Unlock()\n\n\t// Always clear flag when done\n\tdefer func() {\n\t\tloginStateMu.Lock()\n\t\tdelete(loginInProgress, userID)\n\t\tloginStateMu.Unlock()\n\t}()\n\n\t// Enforce 1 attempt per 5s\n\tloginStateMu.Lock()\n\tif last, ok := loginAttempts[userID]; ok {\n\t\tsince := time.Since(last)\n\t\tif since < 5*time.Second {\n\t\t\twait := 5*time.Second - since\n\t\t\tloginStateMu.Unlock()\n\t\t\ttime.Sleep(wait)\n\t\t} else {\n\t\t\tloginStateMu.Unlock()\n\t\t}\n\t} else {\n\t\tloginStateMu.Unlock()\n\t}\n\n\t// Verify password\n\tif err := bcrypt.CompareHashAndPassword([]byte(passwordHash), []byte(req.Password)); err != nil {\n\t\tloginStateMu.Lock()\n\t\tloginAttempts[userID] = time.Now()\n\t\tloginStateMu.Unlock()\n\n\t\thttp.Error(w, \"invalid credentials\", http.StatusUnauthorized)\n\t\treturn\n\t}\n\n\t// On success, clear attempts\n\tloginStateMu.Lock()\n\tdelete(loginAttempts, userID)\n\tloginStateMu.Unlock()\n\n\t// Update last login\n\t_, err = db.DB.Exec(ctx, `UPDATE users SET last_login_at = NOW() WHERE id = $1`, userID)\n\tif err != nil {\n\t\tfmt.Println(\"Failed to update last_login_at:\", err)\n\t}\n\n\t// Generate JWT\n\ttokenString, err := auth.GenerateToken(userID, role)\n\tif err != nil {\n\t\thttp.Error(w, \"could not generate token\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tjson.NewEncoder(w).Encode(auth.AuthResponse{Token: tokenString})\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go\nType: func\nName: RefreshTokenHandler\nDoc:\nPOST /api/refresh-token (requires auth middleware)\n\nCode:\nfunc RefreshTokenHandler(w http.ResponseWriter, r *http.Request) {\n\tuserID, _ := mw.GetUserID(r.Context())\n\trole, _ := mw.GetUserRole(r.Context())\n\n\t// Verify user still exists and role hasn't changed\n\tvar currentRole string\n\terr := db.DB.QueryRow(r.Context(), `\n\t\tSELECT account_role FROM users WHERE id = $1\n\t`, userID).Scan(&currentRole)\n\n\tif err != nil {\n\t\thttp.Error(w, \"user not found\", http.StatusUnauthorized)\n\t\treturn\n\t}\n\n\t// If role changed, force re-login\n\tif currentRole != role {\n\t\thttp.Error(w, \"role changed, please log in again\", http.StatusUnauthorized)\n\t\treturn\n\t}\n\n\t// Generate new token\n\tnewToken, err := auth.GenerateToken(userID, currentRole)\n\tif err != nil {\n\t\thttp.Error(w, \"could not generate token\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tjson.NewEncoder(w).Encode(auth.AuthResponse{Token: newToken})\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/exceptional-hours.go\nType: struct\nName: ExceptionalHours\nCode:\ntype ExceptionalHours struct {\n\tID        int    `json:\"id\"`\n\tGroupID   int    `json:\"groupId\"`\n\tWeekday   int    `json:\"weekday\"`\n\tStartTime string `json:\"startTime\"`\n\tEndTime   string `json:\"endTime\"`\n\tIsOpen    bool   `json:\"isOpen\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/exceptional-hours.go\nType: struct\nName: ExceptionalGroup\nCode:\ntype ExceptionalGroup struct {\n\tID          int                `json:\"id\"`\n\tName        string             `json:\"name\"`\n\tDescription string             `json:\"description\"`\n\tHours       []ExceptionalHours `json:\"hours,omitempty\"`\n\tWeekStarts  []string           `json:\"weekStarts,omitempty\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/exceptional-hours.go\nType: func\nName: ListExceptionalGroups\nDoc:\n--- List Groups with Hours and Applications ---\n\nCode:\nfunc ListExceptionalGroups(w http.ResponseWriter, r *http.Request) {\n\trows, err := db.DB.Query(r.Context(), `\n\t\tSELECT id, name, description\n\t\tFROM exceptional_working_hours_groups\n\t\tORDER BY id DESC\n\t`)\n\tif err != nil {\n\t\thttp.Error(w, \"failed to fetch groups\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer rows.Close()\n\n\tvar groups []ExceptionalGroup\n\tfor rows.Next() {\n\t\tvar g ExceptionalGroup\n\t\tif err := rows.Scan(&g.ID, &g.Name, &g.Description); err != nil {\n\t\t\thttp.Error(w, \"failed to scan group\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\t// Load 7-day hours\n\t\thoursRows, err := db.DB.Query(r.Context(), `\n\t\t\tSELECT id, weekday, start_time::text, end_time::text, is_open\n\t\t\tFROM exceptional_working_hours\n\t\t\tWHERE group_id=$1 ORDER BY weekday\n\t\t`, g.ID)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"failed to fetch group hours\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\tfor hoursRows.Next() {\n\t\t\tvar h ExceptionalHours\n\t\t\tif err := hoursRows.Scan(&h.ID, &h.Weekday, &h.StartTime, &h.EndTime, &h.IsOpen); err != nil {\n\t\t\t\thoursRows.Close()\n\t\t\t\thttp.Error(w, \"failed to scan hours\", http.StatusInternalServerError)\n\t\t\t\treturn\n\t\t\t}\n\t\t\th.GroupID = g.ID\n\t\t\tg.Hours = append(g.Hours, h)\n\t\t}\n\t\thoursRows.Close()\n\n\t\tif err := hoursRows.Err(); err != nil {\n\t\t\thttp.Error(w, \"error iterating hours\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\t// Load applied week starts\n\t\tweekRows, err := db.DB.Query(r.Context(), `\n\t\t\tSELECT week_start\n\t\t\tFROM exceptional_group_applications\n\t\t\tWHERE group_id=$1 ORDER BY week_start\n\t\t`, g.ID)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"failed to fetch applications\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\tfor weekRows.Next() {\n\t\t\tvar weekStart time.Time\n\t\t\tif err := weekRows.Scan(&weekStart); err != nil {\n\t\t\t\tweekRows.Close()\n\t\t\t\thttp.Error(w, \"failed to scan week_start\", http.StatusInternalServerError)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tg.WeekStarts = append(g.WeekStarts, weekStart.Format(\"2006-01-02\"))\n\t\t}\n\t\tweekRows.Close()\n\n\t\tif err := weekRows.Err(); err != nil {\n\t\t\thttp.Error(w, \"error iterating applications\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\tgroups = append(groups, g)\n\t}\n\n\tif err := rows.Err(); err != nil {\n\t\thttp.Error(w, \"error iterating groups\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tjson.NewEncoder(w).Encode(groups)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/exceptional-hours.go\nType: func\nName: CreateExceptionalGroup\nDoc:\n--- Create Group with Hours and Applications (bulk) ---\n\nCode:\nfunc CreateExceptionalGroup(w http.ResponseWriter, r *http.Request) {\n\tvar g ExceptionalGroup\n\tif err := json.NewDecoder(r.Body).Decode(&g); err != nil {\n\t\thttp.Error(w, \"invalid payload\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tif len(g.Hours) != 7 {\n\t\thttp.Error(w, \"must provide exactly 7 weekday entries (0-6)\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Validate weekdays and parse week_starts\n\tweekdaysSeen := make(map[int]bool)\n\tfor _, h := range g.Hours {\n\t\tif h.Weekday < 0 || h.Weekday > 6 {\n\t\t\thttp.Error(w, \"weekday must be 0-6\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t\tif weekdaysSeen[h.Weekday] {\n\t\t\thttp.Error(w, \"duplicate weekday entries\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t\tweekdaysSeen[h.Weekday] = true\n\t}\n\n\tvar parsedWeeks []time.Time\n\tukLocation, _ := time.LoadLocation(\"Europe/London\")\n\tfor _, ws := range g.WeekStarts {\n\t\tweekStart, err := time.ParseInLocation(\"2006-01-02\", ws, ukLocation)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"invalid week_start format, expected YYYY-MM-DD\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t\tif weekStart.Weekday() != time.Monday {\n\t\t\thttp.Error(w, \"week_start must be a Monday\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t\t// Normalize to UK midnight\n\t\tweekStart = time.Date(weekStart.Year(), weekStart.Month(), weekStart.Day(), 0, 0, 0, 0, ukLocation)\n\t\tparsedWeeks = append(parsedWeeks, weekStart)\n\t}\n\n\ttx, err := db.DB.Begin(r.Context())\n\tif err != nil {\n\t\thttp.Error(w, \"failed to start transaction\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer tx.Rollback(r.Context())\n\n\t// Create group\n\terr = tx.QueryRow(r.Context(), `\n\t\tINSERT INTO exceptional_working_hours_groups (name, description)\n\t\tVALUES ($1, $2) RETURNING id\n\t`, g.Name, g.Description).Scan(&g.ID)\n\tif err != nil {\n\t\thttp.Error(w, \"failed to create group\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Insert hours and collect their IDs\n\tinputHours := g.Hours\n\tg.Hours = []ExceptionalHours{} // Clear and rebuild with IDs\n\tfor _, h := range inputHours {\n\t\tvar id int\n\t\terr := tx.QueryRow(r.Context(), `\n\t\t\tINSERT INTO exceptional_working_hours (group_id, weekday, start_time, end_time, is_open)\n\t\t\tVALUES ($1, $2, $3, $4, $5)\n\t\t\tRETURNING id\n\t\t`, g.ID, h.Weekday, h.StartTime, h.EndTime, h.IsOpen).Scan(&id)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"failed to insert hours\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\th.ID = id\n\t\th.GroupID = g.ID\n\t\tg.Hours = append(g.Hours, h)\n\t}\n\n\t// Insert applications\n\tfor _, weekStart := range parsedWeeks {\n\t\t_, err := tx.Exec(r.Context(), `\n\t\t\tINSERT INTO exceptional_group_applications (group_id, week_start)\n\t\t\tVALUES ($1, $2)\n\t\t`, g.ID, weekStart)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"failed to insert application\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\t}\n\n\tif err := tx.Commit(r.Context()); err != nil {\n\t\thttp.Error(w, \"failed to commit transaction\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tw.WriteHeader(http.StatusCreated)\n\tjson.NewEncoder(w).Encode(g)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/exceptional-hours.go\nType: func\nName: DeleteExceptionalGroup\nDoc:\n--- Delete Group (cascades to hours and applications) ---\n\nCode:\nfunc DeleteExceptionalGroup(w http.ResponseWriter, r *http.Request) {\n\t// Extract group ID from URL path or query params\n\t// Assuming you have a router that provides this, e.g. chi, mux, etc.\n\t// For this example, we'll use query param: DELETE /exceptional-groups?id=123\n\tidStr := r.URL.Query().Get(\"id\")\n\tif idStr == \"\" {\n\t\thttp.Error(w, \"missing id parameter\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tid, err := strconv.Atoi(idStr)\n\tif err != nil {\n\t\thttp.Error(w, \"invalid id parameter\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tresult, err := db.DB.Exec(r.Context(), `\n\t\tDELETE FROM exceptional_working_hours_groups WHERE id=$1\n\t`, id)\n\tif err != nil {\n\t\thttp.Error(w, \"failed to delete group\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\trowsAffected := result.RowsAffected()\n\tif rowsAffected == 0 {\n\t\thttp.Error(w, \"group not found\", http.StatusNotFound)\n\t\treturn\n\t}\n\n\tw.WriteHeader(http.StatusNoContent)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/exceptional-hours.go\nType: func\nName: UpdateExceptionalApplications\nDoc:\n--- Update Applied Weeks (replaces all applications for a group) ---\n\nCode:\nfunc UpdateExceptionalApplications(w http.ResponseWriter, r *http.Request) {\n\tvar req struct {\n\t\tGroupID    int      `json:\"groupId\"`\n\t\tWeekStarts []string `json:\"weekStarts\"`\n\t}\n\n\tif err := json.NewDecoder(r.Body).Decode(&req); err != nil {\n\t\thttp.Error(w, \"invalid payload\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Validate and parse weeks\n\tvar parsedWeeks []time.Time\n\tukLocation, _ := time.LoadLocation(\"Europe/London\")\n\tfor _, ws := range req.WeekStarts {\n\t\tweekStart, err := time.ParseInLocation(\"2006-01-02\", ws, ukLocation)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"invalid week_start format, expected YYYY-MM-DD\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t\tif weekStart.Weekday() != time.Monday {\n\t\t\thttp.Error(w, \"week_start must be a Monday\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t\t// Normalize to UK midnight\n\t\tweekStart = time.Date(weekStart.Year(), weekStart.Month(), weekStart.Day(), 0, 0, 0, 0, ukLocation)\n\t\tparsedWeeks = append(parsedWeeks, weekStart)\n\t}\n\n\ttx, err := db.DB.Begin(r.Context())\n\tif err != nil {\n\t\thttp.Error(w, \"failed to start transaction\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer tx.Rollback(r.Context())\n\n\t// Delete existing applications for this group\n\t_, err = tx.Exec(r.Context(), `\n\t\tDELETE FROM exceptional_group_applications WHERE group_id=$1\n\t`, req.GroupID)\n\tif err != nil {\n\t\thttp.Error(w, \"failed to delete existing applications\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\t// Insert new applications\n\tfor _, weekStart := range parsedWeeks {\n\t\t_, err := tx.Exec(r.Context(), `\n\t\t\tINSERT INTO exceptional_group_applications (group_id, week_start)\n\t\t\tVALUES ($1, $2)\n\t\t`, req.GroupID, weekStart)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"failed to insert application\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\t}\n\n\tif err := tx.Commit(r.Context()); err != nil {\n\t\thttp.Error(w, \"failed to commit transaction\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tw.WriteHeader(http.StatusNoContent)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go\nType: struct\nName: DefaultHours\nDoc:\n--- Types ---\n\nCode:\ntype DefaultHours struct {\n\tWeekday   int    `json:\"weekday\"`\n\tStartTime string `json:\"startTime\"`\n\tEndTime   string `json:\"endTime\"`\n\tIsOpen    bool   `json:\"isOpen\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go\nType: struct\nName: DayWorkingHours\nCode:\ntype DayWorkingHours struct {\n\tDate      string `json:\"date\"`\n\tWeekday   int    `json:\"weekday\"`\n\tStartTime string `json:\"startTime\"`\n\tEndTime   string `json:\"endTime\"`\n\tIsOpen    bool   `json:\"isOpen\"`\n\tSource    string `json:\"source\"` // \"default\" or \"exceptional\"\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go\nType: func\nName: GetDefaultHours\nDoc:\n--- Default Hours Handlers ---\n\nCode:\nfunc GetDefaultHours(w http.ResponseWriter, r *http.Request) {\n\trows, err := db.DB.Query(r.Context(), `\n\t\tSELECT weekday, start_time::text, end_time::text, is_open\n\t\tFROM working_hours ORDER BY weekday\n\t`)\n\tif err != nil {\n\t\thttp.Error(w, \"failed to fetch default hours\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer rows.Close()\n\n\tvar hours []DefaultHours\n\tfor rows.Next() {\n\t\tvar h DefaultHours\n\t\tif err := rows.Scan(&h.Weekday, &h.StartTime, &h.EndTime, &h.IsOpen); err != nil {\n\t\t\thttp.Error(w, \"failed to scan default hours\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\t\thours = append(hours, h)\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tjson.NewEncoder(w).Encode(hours)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go\nType: func\nName: UpdateDefaultHours\nCode:\nfunc UpdateDefaultHours(w http.ResponseWriter, r *http.Request) {\n\tvar hours []DefaultHours\n\tif err := json.NewDecoder(r.Body).Decode(&hours); err != nil {\n\t\thttp.Error(w, \"invalid payload\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\ttx, err := db.DB.Begin(r.Context())\n\tif err != nil {\n\t\thttp.Error(w, \"failed to start tx\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\tdefer tx.Rollback(r.Context())\n\n\tfor _, h := range hours {\n\t\t_, err := tx.Exec(r.Context(), `\n\t\t\tUPDATE working_hours\n\t\t\tSET start_time=$1,end_time=$2,is_open=$3\n\t\t\tWHERE weekday=$4\n\t\t`, h.StartTime, h.EndTime, h.IsOpen, h.Weekday)\n\t\tif err != nil {\n\t\t\thttp.Error(w, \"failed to update default hours\", http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\t}\n\n\tif err := tx.Commit(r.Context()); err != nil {\n\t\thttp.Error(w, \"failed to commit\", http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tw.WriteHeader(http.StatusNoContent)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go\nType: func\nName: GetWorkingHours\nDoc:\n--- GetWorkingHours (merged default + applied exceptions, UK-local) ---\n\nCode:\nfunc GetWorkingHours(w http.ResponseWriter, r *http.Request) {\n\tstartStr := r.URL.Query().Get(\"start\")\n\tendStr := r.URL.Query().Get(\"end\")\n\tif startStr == \"\" || endStr == \"\" {\n\t\thttp.Error(w, \"start and end query params required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tukLocation, _ := time.LoadLocation(\"Europe/London\")\n\tstart, err := time.ParseInLocation(\"2006-01-02\", startStr, ukLocation)\n\tif err != nil {\n\t\thttp.Error(w, \"invalid start date\", http.StatusBadRequest)\n\t\treturn\n\t}\n\tend, err := time.ParseInLocation(\"2006-01-02\", endStr, ukLocation)\n\tif err != nil {\n\t\thttp.Error(w, \"invalid end date\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\t// Set to local start/end of day\n\tstart = time.Date(start.Year(), start.Month(), start.Day(), 0, 0, 0, 0, ukLocation)\n\tend = time.Date(end.Year(), end.Month(), end.Day(), 23, 59, 59, 999999999, ukLocation)\n\n\t// Load default hours\n\tdefaultMap := map[int]DefaultHours{}\n\tdefRows, _ := db.DB.Query(r.Context(), `\n\t\tSELECT weekday, start_time::text, end_time::text, is_open\n\t\tFROM working_hours\n\t`)\n\tfor defRows.Next() {\n\t\tvar d DefaultHours\n\t\tif err := defRows.Scan(&d.Weekday, &d.StartTime, &d.EndTime, &d.IsOpen); err == nil {\n\t\t\tdefaultMap[d.Weekday] = d\n\t\t}\n\t}\n\tdefRows.Close()\n\n\t// Load exceptional applications for Mondays in range\n\tappRows, _ := db.DB.Query(r.Context(), `\n\t\tSELECT group_id, week_start\n\t\tFROM exceptional_group_applications\n\t\tWHERE week_start BETWEEN $1 AND $2\n\t`, start, end)\n\ttype appEntry struct {\n\t\tGroupID   int\n\t\tWeekStart time.Time\n\t}\n\tapps := []appEntry{}\n\tgroupIDs := []int{}\n\tfor appRows.Next() {\n\t\tvar a appEntry\n\t\tif err := appRows.Scan(&a.GroupID, &a.WeekStart); err == nil {\n\t\t\ta.WeekStart = time.Date(a.WeekStart.Year(), a.WeekStart.Month(), a.WeekStart.Day(), 0, 0, 0, 0, ukLocation)\n\t\t\tapps = append(apps, a)\n\t\t\tgroupIDs = append(groupIDs, a.GroupID)\n\t\t}\n\t}\n\tappRows.Close()\n\n\texHoursMap := map[int]map[int]ExceptionalHours{}\n\tif len(groupIDs) > 0 {\n\t\tquery, args, _ := sqlIn(\"SELECT group_id, weekday, start_time::text, end_time::text, is_open FROM exceptional_working_hours WHERE group_id IN (%s)\", groupIDs)\n\t\trows, _ := db.DB.Query(r.Context(), query, args...)\n\t\tfor rows.Next() {\n\t\t\tvar h ExceptionalHours\n\t\t\tif err := rows.Scan(&h.GroupID, &h.Weekday, &h.StartTime, &h.EndTime, &h.IsOpen); err == nil {\n\t\t\t\tif _, ok := exHoursMap[h.GroupID]; !ok {\n\t\t\t\t\texHoursMap[h.GroupID] = map[int]ExceptionalHours{}\n\t\t\t\t}\n\t\t\t\texHoursMap[h.GroupID][h.Weekday] = h\n\t\t\t}\n\t\t}\n\t\trows.Close()\n\t}\n\n\t// Generate final result per day\n\tvar results []DayWorkingHours\n\tfor d := start; !d.After(end); d = d.AddDate(0, 0, 1) {\n\t\tweekday := int(d.Weekday())\n\t\tif weekday == 0 {\n\t\t\tweekday = 6 // Go Sunday=0 -> our Sunday=6\n\t\t} else {\n\t\t\tweekday -= 1\n\t\t}\n\n\t\t// Calculate the Monday of this week\n\t\tdaysSinceMonday := int(d.Weekday()) - 1\n\t\tif daysSinceMonday < 0 {\n\t\t\tdaysSinceMonday = 6 // Sunday\n\t\t}\n\t\tweekStart := d.AddDate(0, 0, -daysSinceMonday)\n\t\tweekStart = time.Date(weekStart.Year(), weekStart.Month(), weekStart.Day(), 0, 0, 0, 0, ukLocation)\n\n\t\tvar applied *ExceptionalHours\n\t\tweekStartStr := weekStart.Format(\"2006-01-02\")\n\t\tfor _, a := range apps {\n\t\t\tappWeekStartStr := a.WeekStart.Format(\"2006-01-02\")\n\t\t\tif appWeekStartStr == weekStartStr {\n\t\t\t\tif dayHours, ok := exHoursMap[a.GroupID][weekday]; ok {\n\t\t\t\t\tapplied = &dayHours\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\tvar day DayWorkingHours\n\t\tday.Date = d.Format(\"2006-01-02\")\n\t\tday.Weekday = weekday\n\n\t\tif applied != nil {\n\t\t\tday.StartTime = applied.StartTime\n\t\t\tday.EndTime = applied.EndTime\n\t\t\tday.IsOpen = applied.IsOpen\n\t\t\tday.Source = \"exceptional\"\n\t\t} else if def, ok := defaultMap[weekday]; ok {\n\t\t\tday.StartTime = def.StartTime\n\t\t\tday.EndTime = def.EndTime\n\t\t\tday.IsOpen = def.IsOpen\n\t\t\tday.Source = \"default\"\n\t\t} else {\n\t\t\tday.StartTime = \"00:00\"\n\t\t\tday.EndTime = \"00:00\"\n\t\t\tday.IsOpen = false\n\t\t\tday.Source = \"default\"\n\t\t}\n\n\t\tresults = append(results, day)\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tjson.NewEncoder(w).Encode(results)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go\nType: func\nName: sqlIn\nDoc:\n--- helper: sqlIn generates IN queries dynamically for Postgres ---\n\nCode:\nfunc sqlIn(query string, args []int) (string, []interface{}, error) {\n\tinArgs := []interface{}{}\n\tplaceholders := \"\"\n\tfor i, arg := range args {\n\t\tif i > 0 {\n\t\t\tplaceholders += \",\"\n\t\t}\n\t\tplaceholders += fmt.Sprintf(\"$%d\", i+1)\n\t\tinArgs = append(inArgs, arg)\n\t}\n\tquery = fmt.Sprintf(query, placeholders)\n\treturn query, inArgs, nil\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go\nType: struct\nName: TimeSlot\nDoc:\n--- Types for Available Hours ---\n\nCode:\ntype TimeSlot struct {\n\tStartTime string `json:\"startTime\"`\n\tEndTime   string `json:\"endTime\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go\nType: struct\nName: DayAvailableHours\nCode:\ntype DayAvailableHours struct {\n\tDate    string     `json:\"date\"`\n\tWeekday int        `json:\"weekday\"`\n\tIsOpen  bool       `json:\"isOpen\"`\n\tSlots   []TimeSlot `json:\"slots\"`\n\tSource  string     `json:\"source\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go\nType: func\nName: GetAvailableHours\nDoc:\n--- GetAvailableHours (with bookings, UK-local) ---\n\nCode:\nfunc GetAvailableHours(w http.ResponseWriter, r *http.Request) {\n\tstartStr := r.URL.Query().Get(\"start\")\n\tendStr := r.URL.Query().Get(\"end\")\n\tif startStr == \"\" || endStr == \"\" {\n\t\thttp.Error(w, \"start and end query params required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tukLocation, _ := time.LoadLocation(\"Europe/London\")\n\tstart, _ := time.ParseInLocation(\"2006-01-02\", startStr, ukLocation)\n\tend, _ := time.ParseInLocation(\"2006-01-02\", endStr, ukLocation)\n\n\t// set start/end of day\n\tstart = time.Date(start.Year(), start.Month(), start.Day(), 0, 0, 0, 0, ukLocation)\n\tend = time.Date(end.Year(), end.Month(), end.Day(), 23, 59, 59, 999999999, ukLocation)\n\n\t// Load default hours\n\tdefaultMap := map[int]DefaultHours{}\n\tdefRows, _ := db.DB.Query(r.Context(), `SELECT weekday, start_time::text, end_time::text, is_open FROM working_hours`)\n\tfor defRows.Next() {\n\t\tvar d DefaultHours\n\t\tif err := defRows.Scan(&d.Weekday, &d.StartTime, &d.EndTime, &d.IsOpen); err == nil {\n\t\t\tdefaultMap[d.Weekday] = d\n\t\t}\n\t}\n\tdefRows.Close()\n\n\t// Load exceptional applications for Mondays in range\n\tappRows, _ := db.DB.Query(r.Context(), `\n\t\tSELECT group_id, week_start\n\t\tFROM exceptional_group_applications\n\t\tWHERE week_start BETWEEN $1 AND $2\n\t`, start, end)\n\ttype appEntry struct {\n\t\tGroupID   int\n\t\tWeekStart time.Time\n\t}\n\tapps := []appEntry{}\n\tgroupIDs := []int{}\n\tfor appRows.Next() {\n\t\tvar a appEntry\n\t\tif err := appRows.Scan(&a.GroupID, &a.WeekStart); err == nil {\n\t\t\ta.WeekStart = time.Date(a.WeekStart.Year(), a.WeekStart.Month(), a.WeekStart.Day(), 0, 0, 0, 0, ukLocation)\n\t\t\tapps = append(apps, a)\n\t\t\tgroupIDs = append(groupIDs, a.GroupID)\n\t\t}\n\t}\n\tappRows.Close()\n\n\texHoursMap := map[int]map[int]ExceptionalHours{}\n\tif len(groupIDs) > 0 {\n\t\tquery, args, _ := sqlIn(\"SELECT group_id, weekday, start_time::text, end_time::text, is_open FROM exceptional_working_hours WHERE group_id IN (%s)\", groupIDs)\n\t\trows, _ := db.DB.Query(r.Context(), query, args...)\n\t\tfor rows.Next() {\n\t\t\tvar h ExceptionalHours\n\t\t\tif err := rows.Scan(&h.GroupID, &h.Weekday, &h.StartTime, &h.EndTime, &h.IsOpen); err == nil {\n\t\t\t\tif _, ok := exHoursMap[h.GroupID]; !ok {\n\t\t\t\t\texHoursMap[h.GroupID] = map[int]ExceptionalHours{}\n\t\t\t\t}\n\t\t\t\texHoursMap[h.GroupID][h.Weekday] = h\n\t\t\t}\n\t\t}\n\t\trows.Close()\n\t}\n\n\t// Load bookings\n\tbookingRows, _ := db.DB.Query(r.Context(), `\n\t\tSELECT \n\t\t\tb.start_time, \n\t\t\tCOALESCE(SUM(\n\t\t\t\tCASE \n\t\t\t\t\tWHEN bs.override_duration_minutes IS NOT NULL AND bs.override_duration_minutes > 0 \n\t\t\t\t\t\tTHEN bs.override_duration_minutes \n\t\t\t\t\tELSE s.duration_minutes \n\t\t\t\tEND\n\t\t\t), 0) AS total_duration\n\t\tFROM bookings b\n\t\tLEFT JOIN booking_services bs ON b.id = bs.booking_id\n\t\tLEFT JOIN services s ON bs.service_id = s.id\n\t\tWHERE b.start_time >= $1 AND b.start_time <= $2\n\t\tGROUP BY b.id, b.start_time\n\t\tORDER BY b.start_time\n\t`, start, end)\n\n\tbookings := map[string][]TimeSlot{}\n\tfor bookingRows.Next() {\n\t\tvar t time.Time\n\t\tvar dur int\n\t\tif err := bookingRows.Scan(&t, &dur); err == nil {\n\t\t\tt = t.In(ukLocation)\n\t\t\tdateStr := t.Format(\"2006-01-02\")\n\t\t\tendTime := t.Add(time.Duration(dur) * time.Minute)\n\t\t\tbookings[dateStr] = append(bookings[dateStr], TimeSlot{\n\t\t\t\tStartTime: t.Format(\"15:04\"),\n\t\t\t\tEndTime:   endTime.Format(\"15:04\"),\n\t\t\t})\n\t\t}\n\t}\n\tbookingRows.Close()\n\n\t// Generate available slots per day\n\tvar results []DayAvailableHours\n\tfor d := start; !d.After(end); d = d.AddDate(0, 0, 1) {\n\t\tweekday := int(d.Weekday())\n\t\tif weekday == 0 {\n\t\t\tweekday = 6\n\t\t} else {\n\t\t\tweekday -= 1\n\t\t}\n\n\t\t// Calculate the Monday of this week\n\t\tdaysSinceMonday := int(d.Weekday()) - 1\n\t\tif daysSinceMonday < 0 {\n\t\t\tdaysSinceMonday = 6 // Sunday\n\t\t}\n\t\tweekStart := d.AddDate(0, 0, -daysSinceMonday)\n\t\tweekStart = time.Date(weekStart.Year(), weekStart.Month(), weekStart.Day(), 0, 0, 0, 0, ukLocation)\n\n\t\tvar applied *ExceptionalHours\n\t\tweekStartStr := weekStart.Format(\"2006-01-02\")\n\t\tfor _, a := range apps {\n\t\t\tappWeekStartStr := a.WeekStart.Format(\"2006-01-02\")\n\t\t\tif appWeekStartStr == weekStartStr {\n\t\t\t\tif dayHours, ok := exHoursMap[a.GroupID][weekday]; ok {\n\t\t\t\t\tapplied = &dayHours\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\tvar day DayAvailableHours\n\t\tday.Date = d.Format(\"2006-01-02\")\n\t\tday.Weekday = weekday\n\n\t\tvar baseStart, baseEnd string\n\t\tvar isOpen bool\n\t\tif applied != nil {\n\t\t\tbaseStart = applied.StartTime\n\t\t\tbaseEnd = applied.EndTime\n\t\t\tisOpen = applied.IsOpen\n\t\t\tday.Source = \"exceptional\"\n\t\t} else if def, ok := defaultMap[weekday]; ok {\n\t\t\tbaseStart = def.StartTime\n\t\t\tbaseEnd = def.EndTime\n\t\t\tisOpen = def.IsOpen\n\t\t\tday.Source = \"default\"\n\t\t} else {\n\t\t\tbaseStart = \"00:00\"\n\t\t\tbaseEnd = \"00:00\"\n\t\t\tisOpen = false\n\t\t\tday.Source = \"default\"\n\t\t}\n\n\t\tday.IsOpen = isOpen\n\t\tif isOpen {\n\t\t\tslots := []TimeSlot{{StartTime: baseStart, EndTime: baseEnd}}\n\t\t\tif booked, ok := bookings[day.Date]; ok {\n\t\t\t\tslots = subtractTimeSlots(slots, booked)\n\t\t\t}\n\t\t\tday.Slots = slots\n\t\t} else {\n\t\t\tday.Slots = []TimeSlot{}\n\t\t}\n\n\t\tresults = append(results, day)\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tjson.NewEncoder(w).Encode(results)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go\nType: func\nName: subtractTimeSlots\nDoc:\nsubtractTimeSlots removes gaps from available slots\nReturns the remaining available time slots after removing the gaps\n\nCode:\nfunc subtractTimeSlots(available []TimeSlot, gaps []TimeSlot) []TimeSlot {\n\tif len(gaps) == 0 {\n\t\treturn available\n\t}\n\n\tresult := []TimeSlot{}\n\n\tfor _, slot := range available {\n\t\tcurrent := []TimeSlot{slot}\n\n\t\t// Apply each gap\n\t\tfor _, gap := range gaps {\n\t\t\tvar temp []TimeSlot\n\t\t\tfor _, s := range current {\n\t\t\t\t// Check if gap overlaps with this slot\n\t\t\t\tif gap.EndTime <= s.StartTime || gap.StartTime >= s.EndTime {\n\t\t\t\t\t// No overlap, keep the slot as is\n\t\t\t\t\ttemp = append(temp, s)\n\t\t\t\t} else {\n\t\t\t\t\t// Overlap exists, split the slot\n\t\t\t\t\tif s.StartTime < gap.StartTime {\n\t\t\t\t\t\t// Keep the part before the gap\n\t\t\t\t\t\ttemp = append(temp, TimeSlot{\n\t\t\t\t\t\t\tStartTime: s.StartTime,\n\t\t\t\t\t\t\tEndTime:   gap.StartTime,\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\tif gap.EndTime < s.EndTime {\n\t\t\t\t\t\t// Keep the part after the gap\n\t\t\t\t\t\ttemp = append(temp, TimeSlot{\n\t\t\t\t\t\t\tStartTime: gap.EndTime,\n\t\t\t\t\t\t\tEndTime:   s.EndTime,\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrent = temp\n\t\t}\n\n\t\tresult = append(result, current...)\n\t}\n\n\treturn result\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/admin/analytics.go\nLanguage: go\n\npackage admin",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/admin/bookings.go\nLanguage: go\n\npackage admin",
    "File: /home/popertots/ragmcp/Crussell/backend/handlers/admin/users.go\nLanguage: go\n\npackage admin",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/service_dev.go\nType: var\nName: Service\nCode:\nvar Service *BaseService\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/service_dev.go\nType: func\nName: init\nCode:\nfunc init() {\n\tif err := connect(); err != nil {\n\t\tlog.Fatalf(\"failed to initialize dev service: %v\", err)\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/service_dev.go\nType: func\nName: connect\nCode:\nfunc connect() error {\n\tdsn := fmt.Sprintf(\n\t\t\"postgres://%s:%s@localhost:5432/%s?sslmode=disable\",\n\t\tgetEnv(\"POSTGRES_USER\"),\n\t\tgetEnv(\"POSTGRES_PASSWORD\"),\n\t\tgetEnv(\"POSTGRES_DB\"),\n\t)\n\tpool, err := pgxpool.New(context.Background(), dsn)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tService = newBaseService(pool)\n\treturn testDB(pool)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/service_dev.go\nType: func\nName: testDB\nCode:\nfunc testDB(pool *pgxpool.Pool) error {\n\tvar n int\n\terr := pool.QueryRow(context.Background(), \"SELECT 1\").Scan(&n)\n\tif err != nil || n != 1 {\n\t\treturn fmt.Errorf(\"db test failed: %w\", err)\n\t}\n\treturn nil\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/service_dev.go\nType: func\nName: getEnv\nCode:\nfunc getEnv(key string) string {\n\tif v := os.Getenv(key); v != \"\" {\n\t\treturn v\n\t}\n\tlog.Fatalf(\"FATAL: environment variable %s not set\", key)\n\treturn \"\"\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/types.go\nType: struct\nName: Calendar\nDoc:\n============================================================================\nCalendar Types\n============================================================================\n\nCode:\ntype Calendar struct {\n\tID            int    `json:\"id\"`\n\tPrincipalURI  string `json:\"principaluri\"`\n\tDisplayName   string `json:\"displayname\"`\n\tURI           string `json:\"uri\"`\n\tDescription   string `json:\"description\"`\n\tCalendarOrder int    `json:\"calendarorder\"`\n\tCalendarColor string `json:\"calendarcolor\"`\n\tComponents    string `json:\"components\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/types.go\nType: struct\nName: CalendarEvent\nCode:\ntype CalendarEvent struct {\n\tID             int      `json:\"id\"`\n\tCalendarID     int      `json:\"calendarid\"`\n\tURI            string   `json:\"uri\"`\n\tCalendarData   string   `json:\"calendardata\"`\n\tLastModified   int64    `json:\"lastmodified\"`\n\tEtag           string   `json:\"etag\"`\n\tSize           int      `json:\"size\"`\n\tComponentType  string   `json:\"componenttype\"`\n\tFirstOccurence int64    `json:\"firstoccurence\"`\n\tLastOccurence  int64    `json:\"lastoccurence\"`\n\tUID            string   `json:\"uid\"`\n\tContactURIs    []string `json:\"contact_uris\"` // Extracted from ATTENDEE fields\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/types.go\nType: struct\nName: EventInput\nDoc:\nExtracted from ATTENDEE fields\n\nCode:\ntype EventInput struct {\n\tSummary     string\n\tDescription string\n\tLocation    string\n\tStart       time.Time\n\tEnd         time.Time\n\tAllDay      bool\n\tContactURIs []string // URIs of contacts to attach as attendees\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/types.go\nType: struct\nName: AddressBook\nDoc:\n============================================================================\nCardDAV Types\n============================================================================\n\nCode:\ntype AddressBook struct {\n\tID           int    `json:\"id\"`\n\tPrincipalURI string `json:\"principaluri\"`\n\tDisplayName  string `json:\"displayname\"`\n\tURI          string `json:\"uri\"`\n\tDescription  string `json:\"description\"`\n\tSyncToken    int    `json:\"synctoken\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/types.go\nType: struct\nName: Contact\nCode:\ntype Contact struct {\n\tID            int    `json:\"id\"`\n\tAddressBookID int    `json:\"addressbookid\"`\n\tURI           string `json:\"uri\"`\n\tCardData      string `json:\"carddata\"`\n\tLastModified  int64  `json:\"lastmodified\"`\n\tEtag          string `json:\"etag\"`\n\tSize          int    `json:\"size\"`\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/types.go\nType: struct\nName: ContactInput\nCode:\ntype ContactInput struct {\n\tUserID    string\n\tFirstName string\n\tLastName  string\n\tEmail     string\n\tPhone     string\n\tDOB       string\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/types.go\nType: func\nName: GenerateICalEvent\nDoc:\nGenerateICalEvent creates iCalendar format for UK timezone\n\nCode:\nfunc GenerateICalEvent(input EventInput) string {\n\tuid := fmt.Sprintf(\"%d@example.com\", time.Now().UnixNano())\n\tdtstamp := time.Now().UTC().Format(\"20060102T150405Z\")\n\n\tvar dtstart, dtend string\n\tif input.AllDay {\n\t\tdtstart = fmt.Sprintf(\"DTSTART;VALUE=DATE:%s\", input.Start.Format(\"20060102\"))\n\t\tdtend = fmt.Sprintf(\"DTEND;VALUE=DATE:%s\", input.End.Format(\"20060102\"))\n\t} else {\n\t\tdtstart = fmt.Sprintf(\"DTSTART;TZID=Europe/London:%s\", input.Start.Format(\"20060102T150405\"))\n\t\tdtend = fmt.Sprintf(\"DTEND;TZID=Europe/London:%s\", input.End.Format(\"20060102T150405\"))\n\t}\n\n\t// Build attendees section\n\tattendees := \"\"\n\tfor _, contactURI := range input.ContactURIs {\n\t\tattendees += fmt.Sprintf(\"ATTENDEE;CN=%s:%s\\n\", contactURI, contactURI)\n\t}\n\n\tical := fmt.Sprintf(`BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//Your App//EN\nCALSCALE:GREGORIAN\nBEGIN:VTIMEZONE\nTZID:Europe/London\nBEGIN:DAYLIGHT\nTZOFFSETFROM:+0000\nTZOFFSETTO:+0100\nTZNAME:BST\nDTSTART:19700329T010000\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\nEND:DAYLIGHT\nBEGIN:STANDARD\nTZOFFSETFROM:+0100\nTZOFFSETTO:+0000\nTZNAME:GMT\nDTSTART:19701025T020000\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\nEND:STANDARD\nEND:VTIMEZONE\nBEGIN:VEVENT\nUID:%s\nDTSTAMP:%s\n%s\n%s\nSUMMARY:%s\nDESCRIPTION:%s\nLOCATION:%s\n%sSEQUENCE:0\nSTATUS:CONFIRMED\nTRANSP:OPAQUE\nEND:VEVENT\nEND:VCALENDAR`, uid, dtstamp, dtstart, dtend,\n\t\tescapeICalText(input.Summary),\n\t\tescapeICalText(input.Description),\n\t\tescapeICalText(input.Location),\n\t\tattendees)\n\n\treturn ical\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/types.go\nType: func\nName: GenerateVCard\nDoc:\nGenerateVCard creates vCard format (version 3.0)\n\nCode:\nfunc GenerateVCard(input ContactInput) string {\n\tvcard := fmt.Sprintf(`BEGIN:VCARD\nVERSION:3.0\nUID:%s\nFN:%s %s\nN:%s;%s;;;\nEMAIL;TYPE=INTERNET:%s\nTEL;TYPE=CELL:%s\nBDAY:%s\nREV:%s\nEND:VCARD`,\n\t\tinput.UserID,\n\t\tinput.FirstName, input.LastName,\n\t\tinput.LastName, input.FirstName,\n\t\tinput.Email,\n\t\tinput.Phone,\n\t\tinput.DOB,\n\t\ttime.Now().UTC().Format(\"20060102T150405Z\"))\n\n\treturn vcard\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/types.go\nType: func\nName: escapeICalText\nCode:\nfunc escapeICalText(text string) string {\n\ttext = replaceAll(text, \"\\\\\", \"\\\\\\\\\")\n\ttext = replaceAll(text, \"\\n\", \"\\\\n\")\n\ttext = replaceAll(text, \",\", \"\\\\,\")\n\ttext = replaceAll(text, \";\", \"\\\\;\")\n\treturn text\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/types.go\nType: func\nName: replaceAll\nCode:\nfunc replaceAll(s, old, new string) string {\n\tresult := \"\"\n\tfor _, char := range s {\n\t\tif string(char) == old {\n\t\t\tresult += new\n\t\t} else {\n\t\t\tresult += string(char)\n\t\t}\n\t}\n\treturn result\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/service_prod.go\nType: var\nName: Service\nCode:\nvar Service *BaseService\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/service_prod.go\nType: func\nName: init\nCode:\nfunc init() {\n\tif err := connect(); err != nil {\n\t\tlog.Fatalf(\"failed to initialize prod service: %v\", err)\n\t}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/service_prod.go\nType: func\nName: connect\nCode:\nfunc connect() error {\n\tdsn := fmt.Sprintf(\n\t\t\"postgres://%s:%s@%s:5432/%s\",\n\t\tgetEnv(\"POSTGRES_USER\"),\n\t\tgetEnv(\"POSTGRES_PASSWORD\"),\n\t\tgetEnv(\"POSTGRES_HOST\"),\n\t\tgetEnv(\"POSTGRES_DB\"),\n\t)\n\tpool, err := pgxpool.New(context.Background(), dsn)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tService = newBaseService(pool)\n\treturn testDB(pool)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/service_prod.go\nType: func\nName: testDB\nCode:\nfunc testDB(pool *pgxpool.Pool) error {\n\tvar n int\n\terr := pool.QueryRow(context.Background(), \"SELECT 1\").Scan(&n)\n\tif err != nil || n != 1 {\n\t\treturn fmt.Errorf(\"db test failed: %w\", err)\n\t}\n\treturn nil\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/service_prod.go\nType: func\nName: getEnv\nCode:\nfunc getEnv(key string) string {\n\tif v := os.Getenv(key); v != \"\" {\n\t\treturn v\n\t}\n\tlog.Fatalf(\"FATAL: environment variable %s not set\", key)\n\treturn \"\"\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: struct\nName: BaseService\nDoc:\nBaseService holds shared DB connection\n\nCode:\ntype BaseService struct {\n\tdb *pgxpool.Pool\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: func\nName: newBaseService\nDoc:\nnewBaseService returns a new BaseService instance\n\nCode:\nfunc newBaseService(db *pgxpool.Pool) *BaseService {\n\treturn &BaseService{db: db}\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: method (*BaseService)\nName: ListEventsForMonth\nDoc:\n============================================================================\nCalendar Functions\n============================================================================\n\nCode:\nfunc (s *BaseService) ListEventsForMonth(year int, month time.Month) ([]CalendarEvent, error) {\n\tstart := time.Date(year, month, 1, 0, 0, 0, 0, time.UTC)\n\tend := start.AddDate(0, 1, 0).Add(-time.Second)\n\n\tquery := `\n\t\tSELECT id, calendarid, uri, calendardata, lastmodified, etag, size, componenttype,\n\t\t       firstoccurence, lastoccurence, uid\n\t\tFROM dav_calendarobjects\n\t\tWHERE firstoccurence >= $1 AND firstoccurence <= $2\n\t\tORDER BY firstoccurence\n\t`\n\treturn s.queryEventsWithContacts(query, start.Unix(), end.Unix())\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: method (*BaseService)\nName: ListEventsBetween\nCode:\nfunc (s *BaseService) ListEventsBetween(start, end time.Time) ([]CalendarEvent, error) {\n\tquery := `\n\t\tSELECT id, calendarid, uri, calendardata, lastmodified, etag, size, componenttype,\n\t\t       firstoccurence, lastoccurence, uid\n\t\tFROM dav_calendarobjects\n\t\tWHERE firstoccurence >= $1 AND firstoccurence <= $2\n\t\tORDER BY firstoccurence\n\t`\n\treturn s.queryEventsWithContacts(query, start.Unix(), end.Unix())\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: method (*BaseService)\nName: ListEventsTomorrow\nCode:\nfunc (s *BaseService) ListEventsTomorrow() ([]CalendarEvent, error) {\n\tnow := time.Now()\n\ttomorrow := time.Date(now.Year(), now.Month(), now.Day()+1, 0, 0, 0, 0, now.Location())\n\tdayAfter := tomorrow.Add(24 * time.Hour)\n\treturn s.ListEventsBetween(tomorrow, dayAfter)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: method (*BaseService)\nName: ListEventsThisWeek\nCode:\nfunc (s *BaseService) ListEventsThisWeek() ([]CalendarEvent, error) {\n\tnow := time.Now()\n\tweekday := int(now.Weekday())\n\tif weekday == 0 { // Sunday\n\t\tweekday = 7\n\t}\n\tmonday := now.AddDate(0, 0, -weekday+1)\n\tmonday = time.Date(monday.Year(), monday.Month(), monday.Day(), 0, 0, 0, 0, now.Location())\n\tsunday := monday.AddDate(0, 0, 7)\n\treturn s.ListEventsBetween(monday, sunday)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: method (*BaseService)\nName: GetContactByURI\nDoc:\n============================================================================\nContact Functions\n============================================================================\n\nCode:\nfunc (s *BaseService) GetContactByURI(addressBookID int, uri string) (*Contact, error) {\n\tquery := `\n\t\tSELECT id, addressbookid, uri, carddata, lastmodified, etag, size\n\t\tFROM dav_cards\n\t\tWHERE addressbookid = $1 AND uri = $2\n\t`\n\tvar c Contact\n\terr := s.db.QueryRow(context.Background(), query, addressBookID, uri).Scan(\n\t\t&c.ID, &c.AddressBookID, &c.URI, &c.CardData, &c.LastModified, &c.Etag, &c.Size,\n\t)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"contact not found: %w\", err)\n\t}\n\treturn &c, nil\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: method (*BaseService)\nName: ListAllContacts\nCode:\nfunc (s *BaseService) ListAllContacts() ([]Contact, error) {\n\tquery := `SELECT id, addressbookid, uri, carddata, lastmodified, etag, size FROM dav_cards ORDER BY lastmodified DESC`\n\trows, err := s.db.Query(context.Background(), query)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\n\tvar contacts []Contact\n\tfor rows.Next() {\n\t\tvar c Contact\n\t\tif err := rows.Scan(&c.ID, &c.AddressBookID, &c.URI, &c.CardData, &c.LastModified, &c.Etag, &c.Size); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tcontacts = append(contacts, c)\n\t}\n\treturn contacts, nil\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: method (*BaseService)\nName: ListRecentContacts\nCode:\nfunc (s *BaseService) ListRecentContacts(days int) ([]Contact, error) {\n\tcutoff := time.Now().AddDate(0, 0, -days).Unix()\n\tquery := `SELECT id, addressbookid, uri, carddata, lastmodified, etag, size FROM dav_cards WHERE lastmodified >= $1 ORDER BY lastmodified DESC`\n\trows, err := s.db.Query(context.Background(), query, cutoff)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\n\tvar contacts []Contact\n\tfor rows.Next() {\n\t\tvar c Contact\n\t\tif err := rows.Scan(&c.ID, &c.AddressBookID, &c.URI, &c.CardData, &c.LastModified, &c.Etag, &c.Size); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tcontacts = append(contacts, c)\n\t}\n\treturn contacts, nil\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: method (*BaseService)\nName: queryEventsWithContacts\nDoc:\n============================================================================\nHelper Methods\n============================================================================\n\nCode:\nfunc (s *BaseService) queryEventsWithContacts(query string, args ...interface{}) ([]CalendarEvent, error) {\n\trows, err := s.db.Query(context.Background(), query, args...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer rows.Close()\n\n\tvar events []CalendarEvent\n\tfor rows.Next() {\n\t\tvar e CalendarEvent\n\t\tif err := rows.Scan(\n\t\t\t&e.ID, &e.CalendarID, &e.URI, &e.CalendarData, &e.LastModified, &e.Etag, &e.Size,\n\t\t\t&e.ComponentType, &e.FirstOccurence, &e.LastOccurence, &e.UID,\n\t\t); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\te.ContactURIs = extractContactURIsFromICalendar(e.CalendarData)\n\t\tevents = append(events, e)\n\t}\n\treturn events, nil\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: func\nName: extractContactURIsFromICalendar\nCode:\nfunc extractContactURIsFromICalendar(icalData string) []string {\n\tvar uris []string\n\tfor _, line := range strings.Split(icalData, \"\\n\") {\n\t\tline = strings.TrimSpace(line)\n\t\tif strings.HasPrefix(line, \"ATTENDEE\") {\n\t\t\tparts := strings.Split(line, \":\")\n\t\t\tif len(parts) >= 2 {\n\t\t\t\turis = append(uris, strings.TrimSpace(parts[len(parts)-1]))\n\t\t\t}\n\t\t}\n\t}\n\treturn uris\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: method (*BaseService)\nName: CreateContact\nDoc:\nCreateContact adds a new contact to an address book\n\nCode:\nfunc (s *BaseService) CreateContact(addressBookID int, userID string, input ContactInput) error {\n\tnow := time.Now().Unix()\n\turi := fmt.Sprintf(\"%s.vcf\", userID)\n\tcardData := GenerateVCard(input)\n\n\tquery := `\n\t\tINSERT INTO dav_cards (addressbookid, uri, carddata, lastmodified, etag, size)\n\t\tVALUES ($1, $2, $3, $4, $5, $6)\n\t`\n\t_, err := s.db.Exec(context.Background(), query,\n\t\taddressBookID,\n\t\turi,\n\t\tcardData,\n\t\tnow,\n\t\tfmt.Sprintf(\"%d\", now),\n\t\tlen(cardData),\n\t)\n\treturn err\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: method (*BaseService)\nName: UpdateContact\nDoc:\nUpdateContact updates an existing contact by URI\n\nCode:\nfunc (s *BaseService) UpdateContact(addressBookID int, uri string, input ContactInput) error {\n\tnow := time.Now().Unix()\n\tcardData := GenerateVCard(input)\n\tquery := `\n\t\tUPDATE dav_cards\n\t\tSET carddata = $1, lastmodified = $2, etag = $3, size = $4\n\t\tWHERE addressbookid = $5 AND uri = $6\n\t`\n\t_, err := s.db.Exec(context.Background(), query, cardData, now, fmt.Sprintf(\"%d\", now), len(cardData), addressBookID, uri)\n\treturn err\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: method (*BaseService)\nName: DeleteContact\nDoc:\nDeleteContact deletes a contact by URI\n\nCode:\nfunc (s *BaseService) DeleteContact(addressBookID int, uri string) error {\n\tquery := `DELETE FROM dav_cards WHERE addressbookid = $1 AND uri = $2`\n\t_, err := s.db.Exec(context.Background(), query, addressBookID, uri)\n\treturn err\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: method (*BaseService)\nName: CreateEvent\nDoc:\nCreateEvent adds a new event to a calendar\n\nCode:\nfunc (s *BaseService) CreateEvent(calendarID int, input EventInput) error {\n\tuid := fmt.Sprintf(\"%d@example.com\", time.Now().UnixNano())\n\tnow := time.Now().Unix()\n\tcalendarData := GenerateICalEvent(input)\n\n\tquery := `\n\t\tINSERT INTO dav_calendarobjects\n\t\t\t(calendarid, uri, calendardata, lastmodified, etag, size, componenttype,\n\t\t\t firstoccurence, lastoccurence, uid)\n\t\tVALUES ($1, $2, $3, $4, $5, $6, 'VEVENT', $7, $8, $9)\n\t`\n\t_, err := s.db.Exec(context.Background(), query,\n\t\tcalendarID,\n\t\tuid+\".ics\",\n\t\tcalendarData,\n\t\tnow,\n\t\tfmt.Sprintf(\"%d\", now),\n\t\tlen(calendarData),\n\t\tinput.Start.Unix(),\n\t\tinput.End.Unix(),\n\t\tuid,\n\t)\n\treturn err\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: method (*BaseService)\nName: UpdateEvent\nDoc:\nUpdateEvent updates an existing calendar event by UID\n\nCode:\nfunc (s *BaseService) UpdateEvent(calendarID int, uid string, input EventInput) error {\n\tnow := time.Now().Unix()\n\tcalendarData := GenerateICalEvent(input)\n\n\tquery := `\n\t\tUPDATE dav_calendarobjects\n\t\tSET calendardata = $1, lastmodified = $2, etag = $3, size = $4,\n\t\t    firstoccurence = $5, lastoccurence = $6\n\t\tWHERE calendarid = $7 AND uid = $8\n\t`\n\t_, err := s.db.Exec(context.Background(), query,\n\t\tcalendarData, now, fmt.Sprintf(\"%d\", now), len(calendarData),\n\t\tinput.Start.Unix(), input.End.Unix(),\n\t\tcalendarID, uid,\n\t)\n\treturn err\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: method (*BaseService)\nName: DeleteEvent\nDoc:\nDeleteEvent deletes an event by UID\n\nCode:\nfunc (s *BaseService) DeleteEvent(calendarID int, uid string) error {\n\tquery := `DELETE FROM dav_calendarobjects WHERE calendarid = $1 AND uid = $2`\n\t_, err := s.db.Exec(context.Background(), query, calendarID, uid)\n\treturn err\n}\n",
    "File: /home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go\nType: method (*BaseService)\nName: ListEventsForContact\nDoc:\nListEventsForContactSQL returns all calendar events where the given contact URI is an attendee (SQL optimized)\n\nCode:\nfunc (s *BaseService) ListEventsForContact(contactURI string) ([]CalendarEvent, error) {\n\t// Use pattern matching to find events containing the contact URI in ATTENDEE lines\n\tlikePattern := \"%\" + contactURI + \"%\"\n\n\tquery := `\n\t\tSELECT id, calendarid, uri, calendardata, lastmodified, etag, size, componenttype,\n\t\t       firstoccurence, lastoccurence, uid\n\t\tFROM dav_calendarobjects\n\t\tWHERE calendardata LIKE $1\n\t\tORDER BY firstoccurence\n\t`\n\n\treturn s.queryEventsWithContacts(query, likePattern)\n}\n",
    "File: /home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-kanban/main.js\nLanguage: javascript\n\nvar sF=Object.create;var Vs=Object.defineProperty;var lF=Object.getOwnPropertyDescriptor;var uF=Object.getOwnPropertyNames;var cF=Object.getPrototypeOf,dF=Object.prototype.hasOwnProperty;var fF=(e,t,r)=>t in e?Vs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var hF=(e,t)=>()=>(e&&(t=e(e=0)),t);var wn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Rf=(e,t)=>{for(var r in t)Vs(e,r,{get:t[r],enumerable:!0})},av=(e,t,r,n)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(let i of uF(t))!dF.call(e,i)&&i!==r&&Vs(e,i,{get:()=>t[i],enumerable:!(n=lF(t,i))||n.enumerable});return e};var Ct=(e,t,r)=>(r=e!=null?sF(cF(e)):{},av(t||!e||!e.__esModule?Vs(r,\"default\",{value:e,enumerable:!0}):r,e)),ov=e=>av(Vs({},\"__esModule\",{value:!0}),e);var ur=(e,t,r)=>(fF(e,typeof t!=\"symbol\"?t+\"\":t,r),r);var ln=wn((hi,Zv)=>{\"use strict\";Object.defineProperty(hi,\"__esModule\",{value:!0});function Qr(e){return typeof e==\"object\"&&!(\"toString\"in e)?Object.prototype.toString.call(e).slice(8,-1):e}var eI=typeof process==\"object\"&&!0;function Vr(e,t){if(!e)throw eI?new Error(\"Invariant failed\"):new Error(t())}hi.invariant=Vr;var nh=Object.prototype.hasOwnProperty,tI=Array.prototype.splice,nI=Object.prototype.toString;function Ua(e){return nI.call(e).slice(8,-1)}var bu=Object.assign||function(e,t){return rh(t).forEach(function(r){nh.call(t,r)&&(e[r]=t[r])}),e},rh=typeof Object.getOwnPropertySymbols==\"function\"?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.keys(e)};function sa(e){return Array.isArray(e)?bu(e.constructor(e.length),e):Ua(e)===\"Map\"?new Map(e):Ua(e)===\"Set\"?new Set(e):e&&typeof e==\"object\"?bu(Object.create(Object.getPrototypeOf(e)),e):e}var Gv=function(){function e(){this.commands=bu({},rI),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(t,r){return t===r},this.update.newContext=function(){return new e().update}}return Object.defineProperty(e.prototype,\"isEquals\",{get:function(){return this.update.isEquals},set:function(t){this.update.isEquals=t},enumerable:!0,configurable:!0}),e.prototype.extend=function(t,r){this.commands[t]=r},e.prototype.update=function(t,r){var n=this,i=typeof r==\"function\"?{$apply:r}:r;Array.isArray(t)&&Array.isArray(i)||Vr(!Array.isArray(i),function(){return\"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value.\"}),Vr(typeof i==\"object\"&&i!==null,function(){return\"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the \"+(\"following commands: \"+Object.keys(n.commands).join(\", \")+\".\")});var a=t;return rh(i).forEach(function(o){if(nh.call(n.commands,o)){var s=t===a;a=n.commands[o](i[o],a,i,t),s&&n.isEquals(a,t)&&(a=t)}else{var u=Ua(t)===\"Map\"?n.update(t.get(o),i[o]):n.update(t[o],i[o]),l=Ua(a)===\"Map\"?a.get(o):a[o];(!n.isEquals(u,l)||typeof u==\"undefined\"&&!nh.call(t,o))&&(a===t&&(a=sa(t)),Ua(a)===\"Map\"?a.set(o,u):a[o]=u)}}),a},e}();hi.Context=Gv;var rI={$push:function(e,t,r){return jv(t,r,\"$push\"),e.length?t.concat(e):t},$unshift:function(e,t,r){return jv(t,r,\"$unshift\"),e.length?e.concat(t):t},$splice:function(e,t,r,n){return iI(t,r),e.forEach(function(i){Jv(i),t===n&&i.length&&(t=sa(n)),tI.apply(t,i)}),t},$set:function(e,t,r){return oI(r),e},$toggle:function(e,t){zs(e,\"$toggle\");var r=e.length?sa(t):t;return e.forEach(function(n){r[n]=!t[n]}),r},$unset:function(e,t,r,n){return zs(e,\"$unset\"),e.forEach(function(i){Object.hasOwnProperty.call(t,i)&&(t===n&&(t=sa(n)),delete t[i])}),t},$add:function(e,t,r,n){return qv(t,\"$add\"),zs(e,\"$add\"),Ua(t)===\"Map\"?e.forEach(function(i){var a=i[0],o=i[1];t===n&&t.get(a)!==o&&(t=sa(n)),t.set(a,o)}):e.forEach(function(i){t===n&&!t.has(i)&&(t=sa(n)),t.add(i)}),t},$remove:function(e,t,r,n){return qv(t,\"$remove\"),zs(e,\"$remove\"),e.forEach(function(i){t===n&&t.has(i)&&(t=sa(n)),t.delete(i)}),t},$merge:function(e,t,r,n){return sI(t,e),rh(e).forEach(function(i){e[i]!==t[i]&&(t===n&&(t=sa(n)),t[i]=e[i])}),t},$apply:function(e,t){return aI(e),e(t)}},ih=new Gv;hi.isEquals=ih.update.isEquals;hi.extend=ih.extend;hi.default=ih.update;hi.default.default=Zv.exports=bu(hi.default,hi);function jv(e,t,r){Vr(Array.isArray(e),function(){return\"update(): expected target of \"+Qr(r)+\" to be an array; got \"+Qr(e)+\".\"}),zs(t[r],r)}function zs(e,t){Vr(Array.isArray(e),function(){return\"update(): expected spec of \"+Qr(t)+\" to be an array; got \"+Qr(e)+\". Did you forget to wrap your parameter in an array?\"})}function iI(e,t){Vr(Array.isArray(e),function(){return\"Expected $splice target to be an array; got \"+Qr(e)}),Jv(t.$splice)}function Jv(e){Vr(Array.isArray(e),function(){return\"update(): expected spec of $splice to be an array of arrays; got \"+Qr(e)+\". Did you forget to wrap your parameters in an array?\"})}function aI(e){Vr(typeof e==\"function\",function(){return\"update(): expected spec of $apply to be a function; got \"+Qr(e)+\".\"})}function oI(e){Vr(Object.keys(e).length===1,function(){return\"Cannot have more than one key in an object with $set\"})}function sI(e,t){Vr(t&&typeof t==\"object\",function(){return\"update(): $merge expects a spec of type 'object'; got \"+Qr(t)}),Vr(e&&typeof e==\"object\",function(){return\"update(): $merge expects a target of type 'object'; got \"+Qr(e)})}function qv(e,t){var r=Ua(e);Vr(r===\"Map\"||r===\"Set\",function(){return\"update(): \"+Qr(t)+\" expects a target of type Set or Map; got \"+Qr(r)})}});var tw=wn((JB,ew)=>{\"use strict\";var lI=function(t){return uI(t)&&!cI(t)};function uI(e){return!!e&&typeof e==\"object\"}function cI(e){var t=Object.prototype.toString.call(e);return t===\"[object RegExp]\"||t===\"[object Date]\"||hI(e)}var dI=typeof Symbol==\"function\"&&Symbol.for,fI=dI?Symbol.for(\"react.element\"):60103;function hI(e){return e.$$typeof===fI}function mI(e){return Array.isArray(e)?[]:{}}function Ks(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Mo(mI(e),e,t):e}function pI(e,t,r){return e.concat(t).map(function(n){return Ks(n,r)})}function gI(e,t){if(!t.customMerge)return Mo;var r=t.customMerge(e);return typeof r==\"function\"?r:Mo}function yI(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Qv(e){return Object.keys(e).concat(yI(e))}function Xv(e,t){try{return t in e}catch(r){return!1}}function vI(e,t){return Xv(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function wI(e,t,r){var n={};return r.isMergeableObject(e)&&Qv(e).forEach(function(i){n[i]=Ks(e[i],r)}),Qv(t).forEach(function(i){vI(e,i)||(Xv(e,i)&&r.isMergeableObject(t[i])?n[i]=gI(i,r)(e[i],t[i],r):n[i]=Ks(t[i],r))}),n}function Mo(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||pI,r.isMergeableObject=r.isMergeableObject||lI,r.cloneUnlessOtherwiseSpecified=Ks;var n=Array.isArray(t),i=Array.isArray(e),a=n===i;return a?n?r.arrayMerge(e,t,r):wI(e,t,r):Ks(t,r)}Mo.all=function(t,r){if(!Array.isArray(t))throw new Error(\"first argument should be an array\");return t.reduce(function(n,i){return Mo(n,i,r)},{})};var bI=Mo;ew.exports=bI});var Db=wn((FU,Ch)=>{\"use strict\";var JA=Object.prototype.hasOwnProperty,cr=\"~\";function al(){}Object.create&&(al.prototype=Object.create(null),new al().__proto__||(cr=!1));function ZA(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function bb(e,t,r,n,i){if(typeof r!=\"function\")throw new TypeError(\"The listener must be a function\");var a=new ZA(r,n||e,i),o=cr?cr+t:t;return e._events[o]?e._events[o].fn?e._events[o]=[e._events[o],a]:e._events[o].push(a):(e._events[o]=a,e._eventsCount++),e}function Ru(e,t){--e._eventsCount===0?e._events=new al:delete e._events[t]}function Xn(){this._events=new al,this._eventsCount=0}Xn.prototype.eventNames=function(){var t=[],r,n;if(this._eventsCount===0)return t;for(n in r=this._events)JA.call(r,n)&&t.push(cr?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};Xn.prototype.listeners=function(t){var r=cr?cr+t:t,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=new Array(a);i<a;i++)o[i]=n[i].fn;return o};Xn.prototype.listenerCount=function(t){var r=cr?cr+t:t,n=this._events[r];return n?n.fn?1:n.length:0};Xn.prototype.emit=function(t,r,n,i,a,o){var s=cr?cr+t:t;if(!this._events[s])return!1;var u=this._events[s],l=arguments.length,c,d;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),l){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,r),!0;case 3:return u.fn.call(u.context,r,n),!0;case 4:return u.fn.call(u.context,r,n,i),!0;case 5:return u.fn.call(u.context,r,n,i,a),!0;case 6:return u.fn.call(u.context,r,n,i,a,o),!0}for(d=1,c=new Array(l-1);d<l;d++)c[d-1]=arguments[d];u.fn.apply(u.context,c)}else{var m=u.length,h;for(d=0;d<m;d++)switch(u[d].once&&this.removeListener(t,u[d].fn,void 0,!0),l){case 1:u[d].fn.call(u[d].context);break;case 2:u[d].fn.call(u[d].context,r);break;case 3:u[d].fn.call(u[d].context,r,n);break;case 4:u[d].fn.call(u[d].context,r,n,i);break;default:if(!c)for(h=1,c=new Array(l-1);h<l;h++)c[h-1]=arguments[h];u[d].fn.apply(u[d].context,c)}}return!0};Xn.prototype.on=function(t,r,n){return bb(this,t,r,n,!1)};Xn.prototype.once=function(t,r,n){return bb(this,t,r,n,!0)};Xn.prototype.removeListener=function(t,r,n,i){var a=cr?cr+t:t;if(!this._events[a])return this;if(!r)return Ru(this,a),this;var o=this._events[a];if(o.fn)o.fn===r&&(!i||o.once)&&(!n||o.context===n)&&Ru(this,a);else{for(var s=0,u=[],l=o.length;s<l;s++)(o[s].fn!==r||i&&!o[s].once||n&&o[s].context!==n)&&u.push(o[s]);u.length?this._events[a]=u.length===1?u[0]:u:Ru(this,a)}return this};Xn.prototype.removeAllListeners=function(t){var r;return t?(r=cr?cr+t:t,this._events[r]&&Ru(this,r)):(this._events=new al,this._eventsCount=0),this};Xn.prototype.off=Xn.prototype.removeListener;Xn.prototype.addListener=Xn.prototype.on;Xn.prefixed=cr;Xn.EventEmitter=Xn;typeof Ch!=\"undefined\"&&(Ch.exports=Xn)});var Wu=wn(dn=>{\"use strict\";\"use restrict\";var Ih=32;dn.INT_BITS=Ih;dn.INT_MAX=2147483647;dn.INT_MIN=-1<<Ih-1;dn.sign=function(e){return(e>0)-(e<0)};dn.abs=function(e){var t=e>>Ih-1;return(e^t)-t};dn.min=function(e,t){return t^(e^t)&-(e<t)};dn.max=function(e,t){return e^(e^t)&-(e<t)};dn.isPow2=function(e){return!(e&e-1)&&!!e};dn.log2=function(e){var t,r;return t=(e>65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1};dn.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0};dn.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function Fb(e){var t=32;return e&=-e,e&&t--,e&65535&&(t-=16),e&16711935&&(t-=8),e&252645135&&(t-=4),e&858993459&&(t-=2),e&1431655765&&(t-=1),t}dn.countTrailingZeros=Fb;dn.nextPow2=function(e){return e+=e===0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1};dn.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};dn.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var ll=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=r&1,--i;e[t]=n<<i&255}})(ll);dn.reverse=function(e){return ll[e&255]<<24|ll[e>>>8&255]<<16|ll[e>>>16&255]<<8|ll[e>>>24&255]};dn.interleave2=function(e,t){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1};dn.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};dn.interleave3=function(e,t,r){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|=t<<1,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|r<<2};dn.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};dn.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>Fb(e)+1}});var Ob=wn((lW,Ab)=>{\"use strict\";function Ib(e,t,r){var n=e[r]|0;if(n<=0)return[];var i=new Array(n),a;if(r===e.length-1)for(a=0;a<n;++a)i[a]=t;else for(a=0;a<n;++a)i[a]=Ib(e,t,r+1);return i}function tO(e,t){var r,n;for(r=new Array(e),n=0;n<e;++n)r[n]=t;return r}function nO(e,t){switch(typeof t==\"undefined\"&&(t=0),typeof e){case\"number\":if(e>0)return tO(e|0,t);break;case\"object\":if(typeof e.length==\"number\")return Ib(e,t,0);break}return[]}Ab.exports=nO});var eD={};Rf(eD,{Buffer:()=>fe,INSPECT_MAX_BYTES:()=>$b,SlowBuffer:()=>mO,isBuffer:()=>Qb,kMaxLength:()=>uO});function Hb(){Oh=!0;for(var e=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",t=0,r=e.length;t<r;++t)wi[t]=e[t],Wr[e.charCodeAt(t)]=t;Wr[45]=62,Wr[95]=63}function iO(e){Oh||Hb();var t,r,n,i,a,o,s=e.length;if(s%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");a=e[s-2]===\"=\"?2:e[s-1]===\"=\"?1:0,o=new rO(s*3/4-a),n=a>0?s-4:s;var u=0;for(t=0,r=0;t<n;t+=4,r+=3)i=Wr[e.charCodeAt(t)]<<18|Wr[e.charCodeAt(t+1)]<<12|Wr[e.charCodeAt(t+2)]<<6|Wr[e.charCodeAt(t+3)],o[u++]=i>>16&255,o[u++]=i>>8&255,o[u++]=i&255;return a===2?(i=Wr[e.charCodeAt(t)]<<2|Wr[e.charCodeAt(t+1)]>>4,o[u++]=i&255):a===1&&(i=Wr[e.charCodeAt(t)]<<10|Wr[e.charCodeAt(t+1)]<<4|Wr[e.charCodeAt(t+2)]>>2,o[u++]=i>>8&255,o[u++]=i&255),o}function aO(e){return wi[e>>18&63]+wi[e>>12&63]+wi[e>>6&63]+wi[e&63]}function oO(e,t,r){for(var n,i=[],a=t;a<r;a+=3)n=(e[a]<<16)+(e[a+1]<<8)+e[a+2],i.push(aO(n));return i.join(\"\")}function Lb(e){Oh||Hb();for(var t,r=e.length,n=r%3,i=\"\",a=[],o=16383,s=0,u=r-n;s<u;s+=o)a.push(oO(e,s,s+o>u?u:s+o));return n===1?(t=e[r-1],i+=wi[t>>2],i+=wi[t<<4&63],i+=\"==\"):n===2&&(t=(e[r-2]<<8)+e[r-1],i+=wi[t>>10],i+=wi[t>>4&63],i+=wi[t<<2&63],i+=\"=\"),a.push(i),a.join(\"\")}function Ku(e,t,r,n,i){var a,o,s=i*8-n-1,u=(1<<s)-1,l=u>>1,c=-7,d=r?i-1:0,m=r?-1:1,h=e[t+d];for(d+=m,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=a*256+e[t+d],d+=m,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=o*256+e[t+d],d+=m,c-=8);if(a===0)a=1-l;else{if(a===u)return o?NaN:(h?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-l}return(h?-1:1)*o*Math.pow(2,a-n)}function Bb(e,t,r,n,i,a){var o,s,u,l=a*8-i-1,c=(1<<l)-1,d=c>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,g=n?1:-1,y=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+d>=1?t+=m/u:t+=m*Math.pow(2,1-d),t*u>=2&&(o++,u/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*u-1)*Math.pow(2,i),o=o+d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[r+h]=s&255,h+=g,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[r+h]=o&255,h+=g,o/=256,l-=8);e[r+h-g]|=y*128}function Yu(){return fe.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Wi(e,t){if(Yu()<t)throw new RangeError(\"Invalid typed array length\");return fe.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=fe.prototype):(e===null&&(e=new fe(t)),e.length=t),e}function fe(e,t,r){if(!fe.TYPED_ARRAY_SUPPORT&&!(this instanceof fe))return new fe(e,t,r);if(typeof e==\"number\"){if(typeof t==\"string\")throw new Error(\"If encoding is specified then the first argument must be a string\");return Lh(this,e)}return Ub(this,e,t,r)}function Ub(e,t,r,n){if(typeof t==\"number\")throw new TypeError('\"value\" argument must not be a number');return typeof ArrayBuffer!=\"undefined\"&&t instanceof ArrayBuffer?fO(e,t,r,n):typeof t==\"string\"?dO(e,t,r):hO(e,t)}function Wb(e){if(typeof e!=\"number\")throw new TypeError('\"size\" argument must be a number');if(e<0)throw new RangeError('\"size\" argument must not be negative')}function cO(e,t,r,n){return Wb(t),t<=0?Wi(e,t):r!==void 0?typeof n==\"string\"?Wi(e,t).fill(r,n):Wi(e,t).fill(r):Wi(e,t)}function Lh(e,t){if(Wb(t),e=Wi(e,t<0?0:Ph(t)|0),!fe.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function dO(e,t,r){if((typeof r!=\"string\"||r===\"\")&&(r=\"utf8\"),!fe.isEncoding(r))throw new TypeError('\"encoding\" must be a valid string encoding');var n=Yb(t,r)|0;e=Wi(e,n);var i=e.write(t,r);return i!==n&&(e=e.slice(0,i)),e}function Ah(e,t){var r=t.length<0?0:Ph(t.length)|0;e=Wi(e,r);for(var n=0;n<r;n+=1)e[n]=t[n]&255;return e}function fO(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError(\"'offset' is out of bounds\");if(t.byteLength<r+(n||0))throw new RangeError(\"'length' is out of bounds\");return r===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,r):t=new Uint8Array(t,r,n),fe.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=fe.prototype):e=Ah(e,t),e}function hO(e,t){if(bi(t)){var r=Ph(t.length)|0;return e=Wi(e,r),e.length===0||t.copy(e,0,0,r),e}if(t){if(typeof ArrayBuffer!=\"undefined\"&&t.buffer instanceof ArrayBuffer||\"length\"in t)return typeof t.length!=\"number\"||OO(t.length)?Wi(e,0):Ah(e,t);if(t.type===\"Buffer\"&&Vb(t.data))return Ah(e,t.data)}throw new TypeError(\"First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.\")}function Ph(e){if(e>=Yu())throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+Yu().toString(16)+\" bytes\");return e|0}function mO(e){return+e!=e&&(e=0),fe.alloc(+e)}function bi(e){return!!(e!=null&&e._isBuffer)}function Yb(e,t){if(bi(e))return e.length;if(typeof ArrayBuffer!=\"undefined\"&&typeof ArrayBuffer.isView==\"function\"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!=\"string\"&&(e=\"\"+e);var r=e.length;if(r===0)return 0;for(var n=!1;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":case void 0:return zu(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return r*2;case\"hex\":return r>>>1;case\"base64\":return Zb(e).length;default:if(n)return zu(e).length;t=(\"\"+t).toLowerCase(),n=!0}}function pO(e,t,r){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return xO(this,t,r);case\"utf8\":case\"utf-8\":return jb(this,t,r);case\"ascii\":return EO(this,t,r);case\"latin1\":case\"binary\":return kO(this,t,r);case\"base64\":return DO(this,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return CO(this,t,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),n=!0}}function Ga(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function zb(e,t,r,n,i){if(e.length===0)return-1;if(typeof r==\"string\"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t==\"string\"&&(t=fe.from(t,n)),bi(t))return t.length===0?-1:Nb(e,t,r,n,i);if(typeof t==\"number\")return t=t&255,fe.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==\"function\"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Nb(e,[t],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function Nb(e,t,r,n,i){var a=1,o=e.length,s=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n===\"ucs2\"||n===\"ucs-2\"||n===\"utf16le\"||n===\"utf-16le\")){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,r/=2}function u(h,g){return a===1?h[g]:h.readUInt16BE(g*a)}var l;if(i){var c=-1;for(l=r;l<o;l++)if(u(e,l)===u(t,c===-1?0:l-c)){if(c===-1&&(c=l),l-c+1===s)return c*a}else c!==-1&&(l-=l-c),c=-1}else for(r+s>o&&(r=o-s),l=r;l>=0;l--){for(var d=!0,m=0;m<s;m++)if(u(e,l+m)!==u(t,m)){d=!1;break}if(d)return l}return-1}function gO(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var a=t.length;if(a%2!==0)throw new TypeError(\"Invalid hex string\");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(o*2,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function yO(e,t,r,n){return Gu(zu(t,e.length-r),e,r,n)}function Kb(e,t,r,n){return Gu(IO(t),e,r,n)}function vO(e,t,r,n){return Kb(e,t,r,n)}function wO(e,t,r,n){return Gu(Zb(t),e,r,n)}function bO(e,t,r,n){return Gu(AO(t,e.length-r),e,r,n)}function DO(e,t,r){return t===0&&r===e.length?Lb(e):Lb(e.slice(t,r))}function jb(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=r){var u,l,c,d;switch(s){case 1:a<128&&(o=a);break;case 2:u=e[i+1],(u&192)===128&&(d=(a&31)<<6|u&63,d>127&&(o=d));break;case 3:u=e[i+1],l=e[i+2],(u&192)===128&&(l&192)===128&&(d=(a&15)<<12|(u&63)<<6|l&63,d>2047&&(d<55296||d>57343)&&(o=d));break;case 4:u=e[i+1],l=e[i+2],c=e[i+3],(u&192)===128&&(l&192)===128&&(c&192)===128&&(d=(a&15)<<18|(u&63)<<12|(l&63)<<6|c&63,d>65535&&d<1114112&&(o=d))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=s}return SO(n)}function SO(e){var t=e.length;if(t<=Rb)return String.fromCharCode.apply(String,e);for(var r=\"\",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=Rb));return r}function EO(e,t,r){var n=\"\";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]&127);return n}function kO(e,t,r){var n=\"\";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function xO(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i=\"\",a=t;a<r;++a)i+=FO(e[a]);return i}function CO(e,t,r){for(var n=e.slice(t,r),i=\"\",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}function Pn(e,t,r){if(e%1!==0||e<0)throw new RangeError(\"offset is not uint\");if(e+t>r)throw new RangeError(\"Trying to access beyond buffer length\")}function gr(e,t,r,n,i,a){if(!bi(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('\"value\" argument is out of bounds');if(r+n>e.length)throw new RangeError(\"Index out of range\")}function ju(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i<a;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function qu(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i<a;++i)e[r+i]=t>>>(n?i:3-i)*8&255}function qb(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function Gb(e,t,r,n,i){return i||qb(e,t,r,4),Bb(e,t,r,n,23,4),r+4}function Jb(e,t,r,n,i){return i||qb(e,t,r,8),Bb(e,t,r,n,52,8),r+8}function MO(e){if(e=TO(e).replace(_O,\"\"),e.length<2)return\"\";for(;e.length%4!==0;)e=e+\"=\";return e}function TO(e){return e.trim?e.trim():e.replace(/^\\s+|\\s+$/g,\"\")}function FO(e){return e<16?\"0\"+e.toString(16):e.toString(16)}function zu(e,t){t=t||1/0;for(var r,n=e.length,i=null,a=[],o=0;o<n;++o){if(r=e.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error(\"Invalid code point\")}return a}function IO(e){for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function AO(e,t){for(var r,n,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}function Zb(e){return iO(MO(e))}function Gu(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function OO(e){return e!==e}function Qb(e){return e!=null&&(!!e._isBuffer||Xb(e)||LO(e))}function Xb(e){return!!e.constructor&&typeof e.constructor.isBuffer==\"function\"&&e.constructor.isBuffer(e)}function LO(e){return typeof e.readFloatLE==\"function\"&&typeof e.slice==\"function\"&&Xb(e.slice(0,0))}var wi,Wr,rO,Oh,sO,Vb,$b,Pb,lO,uO,Rb,_O,tD=hF(()=>{wi=[],Wr=[],rO=typeof Uint8Array!=\"undefined\"?Uint8Array:Array,Oh=!1;sO={}.toString,Vb=Array.isArray||function(e){return sO.call(e)==\"[object Array]\"};$b=50,Pb=window;fe.TYPED_ARRAY_SUPPORT=Pb.TYPED_ARRAY_SUPPORT!==void 0?Pb.TYPED_ARRAY_SUPPORT:!0;lO=Yu(),uO=lO;fe.poolSize=8192;fe._augment=function(e){return e.__proto__=fe.prototype,e};fe.from=function(e,t,r){return Ub(null,e,t,r)};fe.TYPED_ARRAY_SUPPORT&&(fe.prototype.__proto__=Uint8Array.prototype,fe.__proto__=Uint8Array);fe.alloc=function(e,t,r){return cO(null,e,t,r)};fe.allocUnsafe=function(e){return Lh(null,e)};fe.allocUnsafeSlow=function(e){return Lh(null,e)};fe.isBuffer=Qb;fe.compare=function(t,r){if(!bi(t)||!bi(r))throw new TypeError(\"Arguments must be Buffers\");if(t===r)return 0;for(var n=t.length,i=r.length,a=0,o=Math.min(n,i);a<o;++a)if(t[a]!==r[a]){n=t[a],i=r[a];break}return n<i?-1:i<n?1:0};fe.isEncoding=function(t){switch(String(t).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}};fe.concat=function(t,r){if(!Vb(t))throw new TypeError('\"list\" argument must be an Array of Buffers');if(t.length===0)return fe.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<t.length;++n)r+=t[n].length;var i=fe.allocUnsafe(r),a=0;for(n=0;n<t.length;++n){var o=t[n];if(!bi(o))throw new TypeError('\"list\" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};fe.byteLength=Yb;fe.prototype._isBuffer=!0;fe.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(var r=0;r<t;r+=2)Ga(this,r,r+1);return this};fe.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(var r=0;r<t;r+=4)Ga(this,r,r+3),Ga(this,r+1,r+2);return this};fe.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(var r=0;r<t;r+=8)Ga(this,r,r+7),Ga(this,r+1,r+6),Ga(this,r+2,r+5),Ga(this,r+3,r+4);return this};fe.prototype.toString=function(){var t=this.length|0;return t===0?\"\":arguments.length===0?jb(this,0,t):pO.apply(this,arguments)};fe.prototype.equals=function(t){if(!bi(t))throw new TypeError(\"Argument must be a Buffer\");return this===t?!0:fe.compare(this,t)===0};fe.prototype.inspect=function(){var t=\"\",r=$b;return this.length>0&&(t=this.toString(\"hex\",0,r).match(/.{2}/g).join(\" \"),this.length>r&&(t+=\" ... \")),\"<Buffer \"+t+\">\"};fe.prototype.compare=function(t,r,n,i,a){if(!bi(t))throw new TypeError(\"Argument must be a Buffer\");if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError(\"out of range index\");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;for(var o=a-i,s=n-r,u=Math.min(o,s),l=this.slice(i,a),c=t.slice(r,n),d=0;d<u;++d)if(l[d]!==c[d]){o=l[d],s=c[d];break}return o<s?-1:s<o?1:0};fe.prototype.includes=function(t,r,n){return this.indexOf(t,r,n)!==-1};fe.prototype.indexOf=function(t,r,n){return zb(this,t,r,n,!0)};fe.prototype.lastIndexOf=function(t,r,n){return zb(this,t,r,n,!1)};fe.prototype.write=function(t,r,n,i){if(r===void 0)i=\"utf8\",n=this.length,r=0;else if(n===void 0&&typeof r==\"string\")i=r,n=this.length,r=0;else if(isFinite(r))r=r|0,isFinite(n)?(n=n|0,i===void 0&&(i=\"utf8\")):(i=n,n=void 0);else throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");var a=this.length-r;if((n===void 0||n>a)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");i||(i=\"utf8\");for(var o=!1;;)switch(i){case\"hex\":return gO(this,t,r,n);case\"utf8\":case\"utf-8\":return yO(this,t,r,n);case\"ascii\":return Kb(this,t,r,n);case\"latin1\":case\"binary\":return vO(this,t,r,n);case\"base64\":return wO(this,t,r,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return bO(this,t,r,n);default:if(o)throw new TypeError(\"Unknown encoding: \"+i);i=(\"\"+i).toLowerCase(),o=!0}};fe.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};Rb=4096;fe.prototype.slice=function(t,r){var n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<t&&(r=t);var i;if(fe.TYPED_ARRAY_SUPPORT)i=this.subarray(t,r),i.__proto__=fe.prototype;else{var a=r-t;i=new fe(a,void 0);for(var o=0;o<a;++o)i[o]=this[o+t]}return i};fe.prototype.readUIntLE=function(t,r,n){t=t|0,r=r|0,n||Pn(t,r,this.length);for(var i=this[t],a=1,o=0;++o<r&&(a*=256);)i+=this[t+o]*a;return i};fe.prototype.readUIntBE=function(t,r,n){t=t|0,r=r|0,n||Pn(t,r,this.length);for(var i=this[t+--r],a=1;r>0&&(a*=256);)i+=this[t+--r]*a;return i};fe.prototype.readUInt8=function(t,r){return r||Pn(t,1,this.length),this[t]};fe.prototype.readUInt16LE=function(t,r){return r||Pn(t,2,this.length),this[t]|this[t+1]<<8};fe.prototype.readUInt16BE=function(t,r){return r||Pn(t,2,this.length),this[t]<<8|this[t+1]};fe.prototype.readUInt32LE=function(t,r){return r||Pn(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};fe.prototype.readUInt32BE=function(t,r){return r||Pn(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};fe.prototype.readIntLE=function(t,r,n){t=t|0,r=r|0,n||Pn(t,r,this.length);for(var i=this[t],a=1,o=0;++o<r&&(a*=256);)i+=this[t+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*r)),i};fe.prototype.readIntBE=function(t,r,n){t=t|0,r=r|0,n||Pn(t,r,this.length);for(var i=r,a=1,o=this[t+--i];i>0&&(a*=256);)o+=this[t+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*r)),o};fe.prototype.readInt8=function(t,r){return r||Pn(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};fe.prototype.readInt16LE=function(t,r){r||Pn(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};fe.prototype.readInt16BE=function(t,r){r||Pn(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};fe.prototype.readInt32LE=function(t,r){return r||Pn(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};fe.prototype.readInt32BE=function(t,r){return r||Pn(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};fe.prototype.readFloatLE=function(t,r){return r||Pn(t,4,this.length),Ku(this,t,!0,23,4)};fe.prototype.readFloatBE=function(t,r){return r||Pn(t,4,this.length),Ku(this,t,!1,23,4)};fe.prototype.readDoubleLE=function(t,r){return r||Pn(t,8,this.length),Ku(this,t,!0,52,8)};fe.prototype.readDoubleBE=function(t,r){return r||Pn(t,8,this.length),Ku(this,t,!1,52,8)};fe.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;gr(this,t,r,n,a,0)}var o=1,s=0;for(this[r]=t&255;++s<n&&(o*=256);)this[r+s]=t/o&255;return r+n};fe.prototype.writeUIntBE=function(t,r,n,i){if(t=+t,r=r|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;gr(this,t,r,n,a,0)}var o=n-1,s=1;for(this[r+o]=t&255;--o>=0&&(s*=256);)this[r+o]=t/s&255;return r+n};fe.prototype.writeUInt8=function(t,r,n){return t=+t,r=r|0,n||gr(this,t,r,1,255,0),fe.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=t&255,r+1};fe.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r|0,n||gr(this,t,r,2,65535,0),fe.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8):ju(this,t,r,!0),r+2};fe.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r|0,n||gr(this,t,r,2,65535,0),fe.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t&255):ju(this,t,r,!1),r+2};fe.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r|0,n||gr(this,t,r,4,4294967295,0),fe.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255):qu(this,t,r,!0),r+4};fe.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r|0,n||gr(this,t,r,4,4294967295,0),fe.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255):qu(this,t,r,!1),r+4};fe.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r|0,!i){var a=Math.pow(2,8*n-1);gr(this,t,r,n,a-1,-a)}var o=0,s=1,u=0;for(this[r]=t&255;++o<n&&(s*=256);)t<0&&u===0&&this[r+o-1]!==0&&(u=1),this[r+o]=(t/s>>0)-u&255;return r+n};fe.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r|0,!i){var a=Math.pow(2,8*n-1);gr(this,t,r,n,a-1,-a)}var o=n-1,s=1,u=0;for(this[r+o]=t&255;--o>=0&&(s*=256);)t<0&&u===0&&this[r+o+1]!==0&&(u=1),this[r+o]=(t/s>>0)-u&255;return r+n};fe.prototype.writeInt8=function(t,r,n){return t=+t,r=r|0,n||gr(this,t,r,1,127,-128),fe.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=t&255,r+1};fe.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r|0,n||gr(this,t,r,2,32767,-32768),fe.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8):ju(this,t,r,!0),r+2};fe.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r|0,n||gr(this,t,r,2,32767,-32768),fe.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t&255):ju(this,t,r,!1),r+2};fe.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r|0,n||gr(this,t,r,4,2147483647,-2147483648),fe.TYPED_ARRAY_SUPPORT?(this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):qu(this,t,r,!0),r+4};fe.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r|0,n||gr(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),fe.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255):qu(this,t,r,!1),r+4};fe.prototype.writeFloatLE=function(t,r,n){return Gb(this,t,r,!0,n)};fe.prototype.writeFloatBE=function(t,r,n){return Gb(this,t,r,!1,n)};fe.prototype.writeDoubleLE=function(t,r,n){return Jb(this,t,r,!0,n)};fe.prototype.writeDoubleBE=function(t,r,n){return Jb(this,t,r,!1,n)};fe.prototype.copy=function(t,r,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError(\"targetStart out of bounds\");if(n<0||n>=this.length)throw new RangeError(\"sourceStart out of bounds\");if(i<0)throw new RangeError(\"sourceEnd out of bounds\");i>this.length&&(i=this.length),t.length-r<i-n&&(i=t.length-r+n);var a=i-n,o;if(this===t&&n<r&&r<i)for(o=a-1;o>=0;--o)t[o+r]=this[o+n];else if(a<1e3||!fe.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)t[o+r]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),r);return a};fe.prototype.fill=function(t,r,n,i){if(typeof t==\"string\"){if(typeof r==\"string\"?(i=r,r=0,n=this.length):typeof n==\"string\"&&(i=n,n=this.length),t.length===1){var a=t.charCodeAt(0);a<256&&(t=a)}if(i!==void 0&&typeof i!=\"string\")throw new TypeError(\"encoding must be a string\");if(typeof i==\"string\"&&!fe.isEncoding(i))throw new TypeError(\"Unknown encoding: \"+i)}else typeof t==\"number\"&&(t=t&255);if(r<0||this.length<r||this.length<n)throw new RangeError(\"Out of range index\");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var o;if(typeof t==\"number\")for(o=r;o<n;++o)this[o]=t;else{var s=bi(t)?t:zu(new fe(t,i).toString()),u=s.length;for(o=0;o<n-r;++o)this[o+r]=s[o%u]}return this};_O=/[^+\\/0-9A-Za-z-_]/g});var nD=wn((uW,Ju)=>{var Ja=(tD(),ov(eD));if(Ja&&Ja.default){Ju.exports=Ja.default;for(let e in Ja)Ju.exports[e]=Ja[e]}else Ja&&(Ju.exports=Ja)});var Xu=wn(bt=>{\"use strict\";var pa=Wu(),Wn=Ob(),rD=nD().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Wn([32,0]),UINT16:Wn([32,0]),UINT32:Wn([32,0]),BIGUINT64:Wn([32,0]),INT8:Wn([32,0]),INT16:Wn([32,0]),INT32:Wn([32,0]),BIGINT64:Wn([32,0]),FLOAT:Wn([32,0]),DOUBLE:Wn([32,0]),DATA:Wn([32,0]),UINT8C:Wn([32,0]),BUFFER:Wn([32,0])});var PO=typeof Uint8ClampedArray!=\"undefined\",NO=typeof BigUint64Array!=\"undefined\",RO=typeof BigInt64Array!=\"undefined\",Sn=window.__TYPEDARRAY_POOL;Sn.UINT8C||(Sn.UINT8C=Wn([32,0]));Sn.BIGUINT64||(Sn.BIGUINT64=Wn([32,0]));Sn.BIGINT64||(Sn.BIGINT64=Wn([32,0]));Sn.BUFFER||(Sn.BUFFER=Wn([32,0]));var Zu=Sn.DATA,Qu=Sn.BUFFER;bt.free=function(t){if(rD.isBuffer(t))Qu[pa.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!==\"[object ArrayBuffer]\"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,n=pa.log2(r)|0;Zu[n].push(t)}};function iD(e){if(e){var t=e.length||e.byteLength,r=pa.log2(t);Zu[r].push(e)}}function HO(e){iD(e.buffer)}bt.freeUint8=bt.freeUint16=bt.freeUint32=bt.freeBigUint64=bt.freeInt8=bt.freeInt16=bt.freeInt32=bt.freeBigInt64=bt.freeFloat32=bt.freeFloat=bt.freeFloat64=bt.freeDouble=bt.freeUint8Clamped=bt.freeDataView=HO;bt.freeArrayBuffer=iD;bt.freeBuffer=function(t){Qu[pa.log2(t.length)].push(t)};bt.malloc=function(t,r){if(r===void 0||r===\"arraybuffer\")return yr(t);switch(r){case\"uint8\":return Nh(t);case\"uint16\":return aD(t);case\"uint32\":return oD(t);case\"int8\":return sD(t);case\"int16\":return lD(t);case\"int32\":return uD(t);case\"float\":case\"float32\":return cD(t);case\"double\":case\"float64\":return dD(t);case\"uint8_clamped\":return fD(t);case\"bigint64\":return mD(t);case\"biguint64\":return hD(t);case\"buffer\":return gD(t);case\"data\":case\"dataview\":return pD(t);default:return null}return null};function yr(t){var t=pa.nextPow2(t),r=pa.log2(t),n=Zu[r];return n.length>0?n.pop():new ArrayBuffer(t)}bt.mallocArrayBuffer=yr;function Nh(e){return new Uint8Array(yr(e),0,e)}bt.mallocUint8=Nh;function aD(e){return new Uint16Array(yr(2*e),0,e)}bt.mallocUint16=aD;function oD(e){return new Uint32Array(yr(4*e),0,e)}bt.mallocUint32=oD;function sD(e){return new Int8Array(yr(e),0,e)}bt.mallocInt8=sD;function lD(e){return new Int16Array(yr(2*e),0,e)}bt.mallocInt16=lD;function uD(e){return new Int32Array(yr(4*e),0,e)}bt.mallocInt32=uD;function cD(e){return new Float32Array(yr(4*e),0,e)}bt.mallocFloat32=bt.mallocFloat=cD;function dD(e){return new Float64Array(yr(8*e),0,e)}bt.mallocFloat64=bt.mallocDouble=dD;function fD(e){return PO?new Uint8ClampedArray(yr(e),0,e):Nh(e)}bt.mallocUint8Clamped=fD;function hD(e){return NO?new BigUint64Array(yr(8*e),0,e):null}bt.mallocBigUint64=hD;function mD(e){return RO?new BigInt64Array(yr(8*e),0,e):null}bt.mallocBigInt64=mD;function pD(e){return new DataView(yr(e),0,e)}bt.mallocDataView=pD;function gD(e){e=pa.nextPow2(e);var t=pa.log2(e),r=Qu[t];return r.length>0?r.pop():new rD(e)}bt.mallocBuffer=gD;bt.clearCache=function(){for(var t=0;t<32;++t)Sn.UINT8[t].length=0,Sn.UINT16[t].length=0,Sn.UINT32[t].length=0,Sn.INT8[t].length=0,Sn.INT16[t].length=0,Sn.INT32[t].length=0,Sn.FLOAT[t].length=0,Sn.DOUBLE[t].length=0,Sn.BIGUINT64[t].length=0,Sn.BIGINT64[t].length=0,Sn.UINT8C[t].length=0,Zu[t].length=0,Qu[t].length=0}});var DD=wn((dW,bD)=>{\"use strict\";bD.exports=BO;var tc=32;function BO(e,t){t<=4*tc?nc(0,t-1,e):rc(0,t-1,e)}function nc(e,t,r){for(var n=2*(e+1),i=e+1;i<=t;++i){for(var a=r[n++],o=r[n++],s=i,u=n-2;s-- >e;){var l=r[u-2],c=r[u-1];if(l<a)break;if(l===a&&c<o)break;r[u]=l,r[u+1]=c,u-=2}r[u]=a,r[u+1]=o}}function yD(e,t,r){e*=2,t*=2;var n=r[e],i=r[e+1];r[e]=r[t],r[e+1]=r[t+1],r[t]=n,r[t+1]=i}function vD(e,t,r){e*=2,t*=2,r[e]=r[t],r[e+1]=r[t+1]}function VO(e,t,r,n){e*=2,t*=2,r*=2;var i=n[e],a=n[e+1];n[e]=n[t],n[e+1]=n[t+1],n[t]=n[r],n[t+1]=n[r+1],n[r]=i,n[r+1]=a}function wD(e,t,r,n,i){e*=2,t*=2,i[e]=i[t],i[t]=r,i[e+1]=i[t+1],i[t+1]=n}function Yi(e,t,r){e*=2,t*=2;var n=r[e],i=r[t];return n<i?!1:n===i?r[e+1]>r[t+1]:!0}function ec(e,t,r,n){e*=2;var i=n[e];return i<t?!0:i===t?n[e+1]<r:!1}function rc(e,t,r){var n=(t-e+1)/6|0,i=e+n,a=t-n,o=e+t>>1,s=o-n,u=o+n,l=i,c=s,d=o,m=u,h=a,g=e+1,y=t-1,v=0;Yi(l,c,r)&&(v=l,l=c,c=v),Yi(m,h,r)&&(v=m,m=h,h=v),Yi(l,d,r)&&(v=l,l=d,d=v),Yi(c,d,r)&&(v=c,c=d,d=v),Yi(l,m,r)&&(v=l,l=m,m=v),Yi(d,m,r)&&(v=d,d=m,m=v),Yi(c,h,r)&&(v=c,c=h,h=v),Yi(c,d,r)&&(v=c,c=d,d=v),Yi(m,h,r)&&(v=m,m=h,h=v);for(var D=r[2*c],I=r[2*c+1],C=r[2*m],x=r[2*m+1],O=2*l,A=2*d,P=2*h,B=2*i,G=2*o,J=2*a,Q=0;Q<2;++Q){var oe=r[O+Q],te=r[A+Q],re=r[P+Q];r[B+Q]=oe,r[G+Q]=te,r[J+Q]=re}vD(s,e,r),vD(u,t,r);for(var ne=g;ne<=y;++ne)if(ec(ne,D,I,r))ne!==g&&yD(ne,g,r),++g;else if(!ec(ne,C,x,r))for(;;)if(ec(y,C,x,r)){ec(y,D,I,r)?(VO(ne,g,y,r),++g,--y):(yD(ne,y,r),--y);break}else{if(--y<ne)break;continue}wD(e,g-1,D,I,r),wD(t,y+1,C,x,r),g-2-e<=tc?nc(e,g-2,r):rc(e,g-2,r),t-(y+2)<=tc?nc(y+2,t,r):rc(y+2,t,r),y-g<=tc?nc(g,y,r):rc(g,y,r)}});var Rh=wn((fW,SD)=>{\"use strict\";SD.exports={init:UO,sweepBipartite:WO,sweepComplete:YO,scanBipartite:zO,scanComplete:KO};var En=Xu(),$O=Wu(),ic=DD(),Fr=1<<28,Qa=1024,Yn=En.mallocInt32(Qa),zi=En.mallocInt32(Qa),Ki=En.mallocInt32(Qa),Za=En.mallocInt32(Qa),Uo=En.mallocInt32(Qa),ul=En.mallocInt32(Qa),dt=En.mallocDouble(Qa*8);function UO(e){var t=$O.nextPow2(e);Yn.length<t&&(En.free(Yn),Yn=En.mallocInt32(t)),zi.length<t&&(En.free(zi),zi=En.mallocInt32(t)),Ki.length<t&&(En.free(Ki),Ki=En.mallocInt32(t)),Za.length<t&&(En.free(Za),Za=En.mallocInt32(t)),Uo.length<t&&(En.free(Uo),Uo=En.mallocInt32(t)),ul.length<t&&(En.free(ul),ul=En.mallocInt32(t));var r=8*t;dt.length<r&&(En.free(dt),dt=En.mallocDouble(r))}function Wo(e,t,r,n){var i=t[n],a=e[r-1];e[i]=a,t[a]=i}function Yo(e,t,r,n){e[r]=n,t[n]=r}function WO(e,t,r,n,i,a,o,s,u,l){for(var c=0,d=2*e,m=e-1,h=d-1,g=r;g<n;++g){var y=a[g],v=d*g;dt[c++]=i[v+m],dt[c++]=-(y+1),dt[c++]=i[v+h],dt[c++]=y}for(var g=o;g<s;++g){var y=l[g]+Fr,D=d*g;dt[c++]=u[D+m],dt[c++]=-y,dt[c++]=u[D+h],dt[c++]=y}var I=c>>>1;ic(dt,I);for(var C=0,x=0,g=0;g<I;++g){var O=dt[2*g+1]|0;if(O>=Fr)O=O-Fr|0,Wo(Ki,Za,x--,O);else if(O>=0)Wo(Yn,zi,C--,O);else if(O<=-Fr){O=-O-Fr|0;for(var A=0;A<C;++A){var P=t(Yn[A],O);if(P!==void 0)return P}Yo(Ki,Za,x++,O)}else{O=-O-1|0;for(var A=0;A<x;++A){var P=t(O,Ki[A]);if(P!==void 0)return P}Yo(Yn,zi,C++,O)}}}function YO(e,t,r,n,i,a,o,s,u,l){for(var c=0,d=2*e,m=e-1,h=d-1,g=r;g<n;++g){var y=a[g]+1<<1,v=d*g;dt[c++]=i[v+m],dt[c++]=-y,dt[c++]=i[v+h],dt[c++]=y}for(var g=o;g<s;++g){var y=l[g]+1<<1,D=d*g;dt[c++]=u[D+m],dt[c++]=-y|1,dt[c++]=u[D+h],dt[c++]=y|1}var I=c>>>1;ic(dt,I);for(var C=0,x=0,O=0,g=0;g<I;++g){var A=dt[2*g+1]|0,P=A&1;if(g<I-1&&A>>1===dt[2*g+3]>>1&&(P=2,g+=1),A<0){for(var B=-(A>>1)-1,G=0;G<O;++G){var J=t(Uo[G],B);if(J!==void 0)return J}if(P!==0)for(var G=0;G<C;++G){var J=t(Yn[G],B);if(J!==void 0)return J}if(P!==1)for(var G=0;G<x;++G){var J=t(Ki[G],B);if(J!==void 0)return J}P===0?Yo(Yn,zi,C++,B):P===1?Yo(Ki,Za,x++,B):P===2&&Yo(Uo,ul,O++,B)}else{var B=(A>>1)-1;P===0?Wo(Yn,zi,C--,B):P===1?Wo(Ki,Za,x--,B):P===2&&Wo(Uo,ul,O--,B)}}}function zO(e,t,r,n,i,a,o,s,u,l,c,d){var m=0,h=2*e,g=t,y=t+e,v=1,D=1;n?D=Fr:v=Fr;for(var I=i;I<a;++I){var C=I+v,x=h*I;dt[m++]=o[x+g],dt[m++]=-C,dt[m++]=o[x+y],dt[m++]=C}for(var I=u;I<l;++I){var C=I+D,O=h*I;dt[m++]=c[O+g],dt[m++]=-C}var A=m>>>1;ic(dt,A);for(var P=0,I=0;I<A;++I){var B=dt[2*I+1]|0;if(B<0){var C=-B,G=!1;if(C>=Fr?(G=!n,C-=Fr):(G=!!n,C-=1),G)Yo(Yn,zi,P++,C);else{var J=d[C],Q=h*C,oe=c[Q+t+1],te=c[Q+t+1+e];e:for(var re=0;re<P;++re){var ne=Yn[re],be=h*ne;if(!(te<o[be+t+1]||o[be+t+1+e]<oe)){for(var pe=t+2;pe<e;++pe)if(c[Q+pe+e]<o[be+pe]||o[be+pe+e]<c[Q+pe])continue e;var De=s[ne],Ce;if(n?Ce=r(J,De):Ce=r(De,J),Ce!==void 0)return Ce}}}}else Wo(Yn,zi,P--,B-v)}}function KO(e,t,r,n,i,a,o,s,u,l,c){for(var d=0,m=2*e,h=t,g=t+e,y=n;y<i;++y){var v=y+Fr,D=m*y;dt[d++]=a[D+h],dt[d++]=-v,dt[d++]=a[D+g],dt[d++]=v}for(var y=s;y<u;++y){var v=y+1,I=m*y;dt[d++]=l[I+h],dt[d++]=-v}var C=d>>>1;ic(dt,C);for(var x=0,y=0;y<C;++y){var O=dt[2*y+1]|0;if(O<0){var v=-O;if(v>=Fr)Yn[x++]=v-Fr;else{v-=1;var A=c[v],P=m*v,B=l[P+t+1],G=l[P+t+1+e];e:for(var J=0;J<x;++J){var Q=Yn[J],oe=o[Q];if(oe===A)break;var te=m*Q;if(!(G<a[te+t+1]||a[te+t+1+e]<B)){for(var re=t+2;re<e;++re)if(l[P+re+e]<a[te+re]||a[te+re+e]<l[P+re])continue e;var ne=r(oe,A);if(ne!==void 0)return ne}}}}else{for(var v=O-Fr,J=x-1;J>=0;--J)if(Yn[J]===v){for(var re=J+1;re<x;++re)Yn[re-1]=Yn[re];break}--x}}}});var _D=wn(Yh=>{\"use strict\";var Xa=\"d\",jo=\"ax\",ED=\"vv\",Hh=\"fp\",cl=\"es\",ac=\"rs\",Uh=\"re\",dl=\"rb\",kD=\"ri\",zo=\"rp\",oc=\"bs\",Wh=\"be\",fl=\"bb\",xD=\"bi\",Ko=\"bp\",Bh=\"rv\",Vh=\"Q\",$h=[Xa,jo,ED,ac,Uh,dl,kD,oc,Wh,fl,xD];function jO(e,t,r){var n=\"bruteForce\"+(e?\"Red\":\"Blue\")+(t?\"Flip\":\"\")+(r?\"Full\":\"\"),i=[\"function \",n,\"(\",$h.join(),\"){\",\"var \",cl,\"=2*\",Xa,\";\"],a=\"for(var i=\"+ac+\",\"+zo+\"=\"+cl+\"*\"+ac+\";i<\"+Uh+\";++i,\"+zo+\"+=\"+cl+\"){var x0=\"+dl+\"[\"+jo+\"+\"+zo+\"],x1=\"+dl+\"[\"+jo+\"+\"+zo+\"+\"+Xa+\"],xi=\"+kD+\"[i];\",o=\"for(var j=\"+oc+\",\"+Ko+\"=\"+cl+\"*\"+oc+\";j<\"+Wh+\";++j,\"+Ko+\"+=\"+cl+\"){var y0=\"+fl+\"[\"+jo+\"+\"+Ko+\"],\"+(r?\"y1=\"+fl+\"[\"+jo+\"+\"+Ko+\"+\"+Xa+\"],\":\"\")+\"yi=\"+xD+\"[j];\";return e?i.push(a,Vh,\":\",o):i.push(o,Vh,\":\",a),r?i.push(\"if(y1<x0||x1<y0)continue;\"):t?i.push(\"if(y0<=x0||x1<y0)continue;\"):i.push(\"if(y0<x0||x1<y0)continue;\"),i.push(\"for(var k=\"+jo+\"+1;k<\"+Xa+\";++k){var r0=\"+dl+\"[k+\"+zo+\"],r1=\"+dl+\"[k+\"+Xa+\"+\"+zo+\"],b0=\"+fl+\"[k+\"+Ko+\"],b1=\"+fl+\"[k+\"+Xa+\"+\"+Ko+\"];if(r1<b0||b1<r0)continue \"+Vh+\";}var \"+Bh+\"=\"+ED+\"(\"),t?i.push(\"yi,xi\"):i.push(\"xi,yi\"),i.push(\");if(\"+Bh+\"!==void 0)return \"+Bh+\";}}}\"),{name:n,code:i.join(\"\")}}function CD(e){var t=\"bruteForce\"+(e?\"Full\":\"Partial\"),r=[],n=$h.slice();e||n.splice(3,0,Hh);var i=[\"function \"+t+\"(\"+n.join()+\"){\"];function a(u,l){var c=jO(u,l,e);r.push(c.code),i.push(\"return \"+c.name+\"(\"+$h.join()+\");\")}i.push(\"if(\"+Uh+\"-\"+ac+\">\"+Wh+\"-\"+oc+\"){\"),e?(a(!0,!1),i.push(\"}else{\"),a(!1,!1)):(i.push(\"if(\"+Hh+\"){\"),a(!0,!0),i.push(\"}else{\"),a(!0,!1),i.push(\"}}else{if(\"+Hh+\"){\"),a(!1,!0),i.push(\"}else{\"),a(!1,!1),i.push(\"}\")),i.push(\"}}return \"+t);var o=r.join(\"\")+i.join(\"\"),s=new Function(o);return s()}Yh.partial=CD(!1);Yh.full=CD(!0)});var zh=wn((mW,MD)=>{\"use strict\";MD.exports=GO;var qO=\"for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m\";function GO(e,t){var r=\"abcdef\".split(\"\").concat(t),n=[];return e.indexOf(\"lo\")>=0&&n.push(\"lo=e[k+n]\"),e.indexOf(\"hi\")>=0&&n.push(\"hi=e[k+o]\"),r.push(qO.replace(\"_\",n.join()).replace(\"$\",e)),Function.apply(void 0,r)}});var ID=wn((pW,FD)=>{\"use strict\";FD.exports=XO;var JO=zh(),TD=JO(\"lo<p0\",[\"p0\"]),ZO=8;function QO(e,t,r,n,i,a){for(var o=2*e,s=o*(r+1)+t,u=r+1;u<n;++u,s+=o)for(var l=i[s],c=u,d=o*(u-1);c>r&&i[d+t]>l;--c,d-=o){for(var m=d,h=d+o,g=0;g<o;++g,++m,++h){var y=i[m];i[m]=i[h],i[h]=y}var v=a[c];a[c]=a[c-1],a[c-1]=v}}function XO(e,t,r,n,i,a){if(n<=r+1)return r;for(var o=r,s=n,u=n+r>>>1,l=2*e,c=u,d=i[l*u+t];o<s;){if(s-o<ZO){QO(e,t,o,s,i,a),d=i[l*u+t];break}var m=s-o,h=Math.random()*m+o|0,g=i[l*h+t],y=Math.random()*m+o|0,v=i[l*y+t],D=Math.random()*m+o|0,I=i[l*D+t];g<=v?I>=v?(c=y,d=v):g>=I?(c=h,d=g):(c=D,d=I):v>=I?(c=y,d=v):I>=g?(c=h,d=g):(c=D,d=I);for(var O=l*(s-1),A=l*c,C=0;C<l;++C,++O,++A){var x=i[O];i[O]=i[A],i[A]=x}var P=a[s-1];a[s-1]=a[c],a[c]=P,c=TD(e,t,o,s-1,i,a,d);for(var O=l*(s-1),A=l*c,C=0;C<l;++C,++O,++A){var x=i[O];i[O]=i[A],i[A]=x}var P=a[s-1];if(a[s-1]=a[c],a[c]=P,u<c){for(s=c-1;o<s&&i[l*(s-1)+t]===d;)s-=1;s+=1}else if(c<u)for(o=c+1;o<s&&i[l*o+t]===d;)o+=1;else break}return TD(e,t,r,u,i,a,i[l*u+t])}});var HD=wn((gW,RD)=>{\"use strict\";RD.exports=fL;var qo=Xu(),Kh=Wu(),PD=_D(),eL=PD.partial,tL=PD.full,ga=Rh(),nL=ID(),Go=zh(),AD=128,rL=1<<22,iL=1<<22,aL=Go(\"!(lo>=p0)&&!(p1>=hi)\",[\"p0\",\"p1\"]),OD=Go(\"lo===p0\",[\"p0\"]),oL=Go(\"lo<p0\",[\"p0\"]),sL=Go(\"hi<=p0\",[\"p0\"]),LD=Go(\"lo<=p0&&p0<=hi\",[\"p0\"]),lL=Go(\"lo<p0&&p0<=hi\",[\"p0\"]),jh=6,qh=2,ND=1024,dr=qo.mallocInt32(ND),eo=qo.mallocDouble(ND);function uL(e,t){var r=8*Kh.log2(t+1)*(e+1)|0,n=Kh.nextPow2(jh*r);dr.length<n&&(qo.free(dr),dr=qo.mallocInt32(n));var i=Kh.nextPow2(qh*r);eo.length<i&&(qo.free(eo),eo=qo.mallocDouble(i))}function ti(e,t,r,n,i,a,o,s,u){var l=jh*e;dr[l]=t,dr[l+1]=r,dr[l+2]=n,dr[l+3]=i,dr[l+4]=a,dr[l+5]=o;var c=qh*e;eo[c]=s,eo[c+1]=u}function cL(e,t,r,n,i,a,o,s,u,l,c){var d=2*e,m=u*d,h=l[m+t];e:for(var g=i,y=i*d;g<a;++g,y+=d){var v=o[y+t],D=o[y+t+e];if(!(h<v||D<h)&&!(n&&h===v)){for(var I=s[g],C=t+1;C<e;++C){var v=o[y+C],D=o[y+C+e],x=l[m+C],O=l[m+C+e];if(D<x||O<v)continue e}var A;if(n?A=r(c,I):A=r(I,c),A!==void 0)return A}}}function dL(e,t,r,n,i,a,o,s,u,l){var c=2*e,d=s*c,m=u[d+t];e:for(var h=n,g=n*c;h<i;++h,g+=c){var y=o[h];if(y!==l){var v=a[g+t],D=a[g+t+e];if(!(m<v||D<m)){for(var I=t+1;I<e;++I){var v=a[g+I],D=a[g+I+e],C=u[d+I],x=u[d+I+e];if(D<C||x<v)continue e}var O=r(y,l);if(O!==void 0)return O}}}}function fL(e,t,r,n,i,a,o,s,u){uL(e,n+o);var l=0,c=2*e,d;for(ti(l++,0,0,n,0,o,r?16:0,-1/0,1/0),r||ti(l++,0,0,o,0,n,1,-1/0,1/0);l>0;){l-=1;var m=l*jh,h=dr[m],g=dr[m+1],y=dr[m+2],v=dr[m+3],D=dr[m+4],I=dr[m+5],C=l*qh,x=eo[C],O=eo[C+1],A=I&1,P=!!(I&16),B=i,G=a,J=s,Q=u;if(A&&(B=s,G=u,J=i,Q=a),!(I&2&&(y=oL(e,h,g,y,B,G,O),g>=y))&&!(I&4&&(g=sL(e,h,g,y,B,G,x),g>=y))){var oe=y-g,te=D-v;if(P){if(e*oe*(oe+te)<iL){if(d=ga.scanComplete(e,h,t,g,y,B,G,v,D,J,Q),d!==void 0)return d;continue}}else if(e*Math.min(oe,te)<AD){if(d=eL(e,h,t,A,g,y,B,G,v,D,J,Q),d!==void 0)return d;continue}else if(e*oe*te<rL){if(d=ga.scanBipartite(e,h,t,A,g,y,B,G,v,D,J,Q),d!==void 0)return d;continue}var re=aL(e,h,g,y,B,G,x,O);if(g<re)if(e*(re-g)<AD){if(d=tL(e,h+1,t,g,re,B,G,v,D,J,Q),d!==void 0)return d}else if(h===e-2){if(A?d=ga.sweepBipartite(e,t,v,D,J,Q,g,re,B,G):d=ga.sweepBipartite(e,t,g,re,B,G,v,D,J,Q),d!==void 0)return d}else ti(l++,h+1,g,re,v,D,A,-1/0,1/0),ti(l++,h+1,v,D,g,re,A^1,-1/0,1/0);if(re<y){var ne=nL(e,h,v,D,J,Q),be=J[c*ne+h],pe=OD(e,h,ne,D,J,Q,be);if(pe<D&&ti(l++,h,re,y,pe,D,(A|4)+(P?16:0),be,O),v<ne&&ti(l++,h,re,y,v,ne,(A|2)+(P?16:0),x,be),ne+1===pe){if(P?d=dL(e,h,t,re,y,B,G,ne,J,Q[ne]):d=cL(e,h,t,A,re,y,B,G,ne,J,Q[ne]),d!==void 0)return d}else if(ne<pe){var De;if(P){if(De=LD(e,h,re,y,B,G,be),re<De){var Ce=OD(e,h,re,De,B,G,be);if(h===e-2){if(re<Ce&&(d=ga.sweepComplete(e,t,re,Ce,B,G,ne,pe,J,Q),d!==void 0)||Ce<De&&(d=ga.sweepBipartite(e,t,Ce,De,B,G,ne,pe,J,Q),d!==void 0))return d}else re<Ce&&ti(l++,h+1,re,Ce,ne,pe,16,-1/0,1/0),Ce<De&&(ti(l++,h+1,Ce,De,ne,pe,0,-1/0,1/0),ti(l++,h+1,ne,pe,Ce,De,1,-1/0,1/0))}}else A?De=lL(e,h,re,y,B,G,be):De=LD(e,h,re,y,B,G,be),re<De&&(h===e-2?A?d=ga.sweepBipartite(e,t,ne,pe,J,Q,re,De,B,G):d=ga.sweepBipartite(e,t,re,De,B,G,ne,pe,J,Q):(ti(l++,h+1,re,De,ne,pe,A,-1/0,1/0),ti(l++,h+1,ne,pe,re,De,A^1,-1/0,1/0)))}}}}}});var UD=wn((yW,$D)=>{\"use strict\";$D.exports=yL;var ya=Xu(),sc=Rh(),hL=HD();function mL(e,t){for(var r=0;r<e;++r)if(!(t[r]<=t[r+e]))return!0;return!1}function BD(e,t,r,n){for(var i=0,a=0,o=0,s=e.length;o<s;++o){var u=e[o];if(!mL(t,u)){for(var l=0;l<2*t;++l)r[i++]=u[l];n[a++]=o}}return a}function lc(e,t,r,n){var i=e.length,a=t.length;if(!(i<=0||a<=0)){var o=e[0].length>>>1;if(!(o<=0)){var s,u=ya.mallocDouble(2*o*i),l=ya.mallocInt32(i);if(i=BD(e,o,u,l),i>0){if(o===1&&n)sc.init(i),s=sc.sweepComplete(o,r,0,i,u,l,0,i,u,l);else{var c=ya.mallocDouble(2*o*a),d=ya.mallocInt32(a);a=BD(t,o,c,d),a>0&&(sc.init(i+a),o===1?s=sc.sweepBipartite(o,r,0,i,u,l,0,a,c,d):s=hL(o,r,n,i,u,l,a,c,d),ya.free(c),ya.free(d))}ya.free(u),ya.free(l)}return s}}}var hl;function VD(e,t){hl.push([e,t])}function pL(e){return hl=[],lc(e,e,VD,!0),hl}function gL(e,t){return hl=[],lc(e,t,VD,!1),hl}function yL(e,t,r){var n;switch(arguments.length){case 1:return pL(e);case 2:return typeof t==\"function\"?lc(e,e,t,!0):gL(e,t);case 3:return lc(e,t,r,!1);default:throw new Error(\"box-intersect: Invalid arguments\")}}});var o0=wn(gt=>{\"use strict\";Object.defineProperty(gt,\"__esModule\",{value:!0});var on=require(\"obsidian\"),Zh=\"YYYY-MM-DD\",Qh=\"gggg-[W]ww\",jD=\"YYYY-MM\",qD=\"YYYY-[Q]Q\",GD=\"YYYY\";function pl(e){var r,n;let t=window.app.plugins.getPlugin(\"periodic-notes\");return t&&((n=(r=t.settings)==null?void 0:r[e])==null?void 0:n.enabled)}function gl(){var e,t,r,n;try{let{internalPlugins:i,plugins:a}=window.app;if(pl(\"daily\")){let{format:l,folder:c,template:d}=((t=(e=a.getPlugin(\"periodic-notes\"))==null?void 0:e.settings)==null?void 0:t.daily)||{};return{format:l||Zh,folder:(c==null?void 0:c.trim())||\"\",template:(d==null?void 0:d.trim())||\"\"}}let{folder:o,format:s,template:u}=((n=(r=i.getPluginById(\"daily-notes\"))==null?void 0:r.instance)==null?void 0:n.options)||{};return{format:s||Zh,folder:(o==null?void 0:o.trim())||\"\",template:(u==null?void 0:u.trim())||\"\"}}catch(i){console.info(\"No custom daily note settings found!\",i)}}function yl(){var e,t,r,n,i,a,o;try{let s=window.app.plugins,u=(e=s.getPlugin(\"calendar\"))==null?void 0:e.options,l=(r=(t=s.getPlugin(\"periodic-notes\"))==null?void 0:t.settings)==null?void 0:r.weekly;if(pl(\"weekly\"))return{format:l.format||Qh,folder:((n=l.folder)==null?void 0:n.trim())||\"\",template:((i=l.template)==null?void 0:i.trim())||\"\"};let c=u||{};return{format:c.weeklyNoteFormat||Qh,folder:((a=c.weeklyNoteFolder)==null?void 0:a.trim())||\"\",template:((o=c.weeklyNoteTemplate)==null?void 0:o.trim())||\"\"}}catch(s){console.info(\"No custom weekly note settings found!\",s)}}function vl(){var t,r,n,i;let e=window.app.plugins;try{let a=pl(\"monthly\")&&((r=(t=e.getPlugin(\"periodic-notes\"))==null?void 0:t.settings)==null?void 0:r.monthly)||{};return{format:a.format||jD,folder:((n=a.folder)==null?void 0:n.trim())||\"\",template:((i=a.template)==null?void 0:i.trim())||\"\"}}catch(a){console.info(\"No custom monthly note settings found!\",a)}}function wl(){var t,r,n,i;let e=window.app.plugins;try{let a=pl(\"quarterly\")&&((r=(t=e.getPlugin(\"periodic-notes\"))==null?void 0:t.settings)==null?void 0:r.quarterly)||{};return{format:a.format||qD,folder:((n=a.folder)==null?void 0:n.trim())||\"\",template:((i=a.template)==null?void 0:i.trim())||\"\"}}catch(a){console.info(\"No custom quarterly note settings found!\",a)}}function bl(){var t,r,n,i;let e=window.app.plugins;try{let a=pl(\"yearly\")&&((r=(t=e.getPlugin(\"periodic-notes\"))==null?void 0:t.settings)==null?void 0:r.yearly)||{};return{format:a.format||GD,folder:((n=a.folder)==null?void 0:n.trim())||\"\",template:((i=a.template)==null?void 0:i.trim())||\"\"}}catch(a){console.info(\"No custom yearly note settings found!\",a)}}function JD(...e){let t=[];for(let n=0,i=e.length;n<i;n++)t=t.concat(e[n].split(\"/\"));let r=[];for(let n=0,i=t.length;n<i;n++){let a=t[n];!a||a===\".\"||r.push(a)}return t[0]===\"\"&&r.unshift(\"\"),r.join(\"/\")}function ML(e){let t=e.substring(e.lastIndexOf(\"/\")+1);return t.lastIndexOf(\".\")!=-1&&(t=t.substring(0,t.lastIndexOf(\".\"))),t}async function TL(e){let t=e.replace(/\\\\/g,\"/\").split(\"/\");if(t.pop(),t.length){let r=JD(...t);window.app.vault.getAbstractFileByPath(r)||await window.app.vault.createFolder(r)}}async function Dl(e,t){t.endsWith(\".md\")||(t+=\".md\");let r=on.normalizePath(JD(e,t));return await TL(r),r}async function Jo(e){let{metadataCache:t,vault:r}=window.app,n=on.normalizePath(e);if(n===\"/\")return Promise.resolve([\"\",null]);try{let i=t.getFirstLinkpathDest(n,\"\"),a=await r.cachedRead(i),o=window.app.foldManager.load(i);return[a,o]}catch(i){return console.error(`Failed to read the daily note template '${n}'`,i),new on.Notice(\"Failed to read the daily note template\"),[\"\",null]}}function ni(e,t=\"day\"){let r=e.clone().startOf(t).format();return`${t}-${r}`}function ZD(e){return e.replace(/\\[[^\\]]*\\]/g,\"\")}function FL(e,t){if(t===\"week\"){let r=ZD(e);return/w{1,2}/i.test(r)&&(/M{1,4}/.test(r)||/D{1,4}/.test(r))}return!1}function Zo(e,t){return QD(e.basename,t)}function IL(e,t){return QD(ML(e),t)}function QD(e,t){let n={day:gl,week:yl,month:vl,quarter:wl,year:bl}[t]().format.split(\"/\").pop(),i=window.moment(e,n,!0);if(!i.isValid())return null;if(FL(n,t)&&t===\"week\"){let a=ZD(n);if(/w{1,2}/i.test(a))return window.moment(e,n.replace(/M{1,4}/g,\"\").replace(/D{1,4}/g,\"\"),!1)}return i}var Xh=class extends Error{};async function XD(e){let t=window.app,{vault:r}=t,n=window.moment,{template:i,format:a,folder:o}=gl(),[s,u]=await Jo(i),l=e.format(a),c=await Dl(o,l);try{let d=await r.create(c,s.replace(/{{\\s*date\\s*}}/gi,l).replace(/{{\\s*time\\s*}}/gi,n().format(\"HH:mm\")).replace(/{{\\s*title\\s*}}/gi,l).replace(/{{\\s*(date|time)\\s*(([+-]\\d+)([yqmwdhs]))?\\s*(:.+?)?}}/gi,(m,h,g,y,v,D)=>{let I=n(),C=e.clone().set({hour:I.get(\"hour\"),minute:I.get(\"minute\"),second:I.get(\"second\")});return g&&C.add(parseInt(y,10),v),D?C.format(D.substring(1).trim()):C.format(a)}).replace(/{{\\s*yesterday\\s*}}/gi,e.clone().subtract(1,\"day\").format(a)).replace(/{{\\s*tomorrow\\s*}}/gi,e.clone().add(1,\"d\").format(a)));return t.foldManager.save(d,u),d}catch(d){console.error(`Failed to create file: '${c}'`,d),new on.Notice(\"Unable to create new file.\")}}function AL(e,t){var r;return(r=t[ni(e,\"day\")])!=null?r:null}function OL(){let{vault:e}=window.app,{folder:t}=gl(),r=e.getAbstractFileByPath(on.normalizePath(t));if(!r)throw new Xh(\"Failed to find daily notes folder\");let n={};return on.Vault.recurseChildren(r,i=>{if(i instanceof on.TFile){let a=Zo(i,\"day\");if(a){let o=ni(a,\"day\");n[o]=i}}}),n}var em=class extends Error{};function LL(){let{moment:e}=window,t=e.localeData()._week.dow,r=[\"sunday\",\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\"];for(;t;)r.push(r.shift()),t--;return r}function PL(e){return LL().indexOf(e.toLowerCase())}async function e0(e){let{vault:t}=window.app,{template:r,format:n,folder:i}=yl(),[a,o]=await Jo(r),s=e.format(n),u=await Dl(i,s);try{let l=await t.create(u,a.replace(/{{\\s*(date|time)\\s*(([+-]\\d+)([yqmwdhs]))?\\s*(:.+?)?}}/gi,(c,d,m,h,g,y)=>{let v=window.moment(),D=e.clone().set({hour:v.get(\"hour\"),minute:v.get(\"minute\"),second:v.get(\"second\")});return m&&D.add(parseInt(h,10),g),y?D.format(y.substring(1).trim()):D.format(n)}).replace(/{{\\s*title\\s*}}/gi,s).replace(/{{\\s*time\\s*}}/gi,window.moment().format(\"HH:mm\")).replace(/{{\\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\\s*:(.*?)}}/gi,(c,d,m)=>{let h=PL(d);return e.weekday(h).format(m.trim())}));return window.app.foldManager.save(l,o),l}catch(l){console.error(`Failed to create file: '${u}'`,l),new on.Notice(\"Unable to create new file.\")}}function NL(e,t){var r;return(r=t[ni(e,\"week\")])!=null?r:null}function RL(){let e={};if(!n0())return e;let{vault:t}=window.app,{folder:r}=yl(),n=t.getAbstractFileByPath(on.normalizePath(r));if(!n)throw new em(\"Failed to find weekly notes folder\");return on.Vault.recurseChildren(n,i=>{if(i instanceof on.TFile){let a=Zo(i,\"week\");if(a){let o=ni(a,\"week\");e[o]=i}}}),e}var tm=class extends Error{};async function t0(e){let{vault:t}=window.app,{template:r,format:n,folder:i}=vl(),[a,o]=await Jo(r),s=e.format(n),u=await Dl(i,s);try{let l=await t.create(u,a.replace(/{{\\s*(date|time)\\s*(([+-]\\d+)([yqmwdhs]))?\\s*(:.+?)?}}/gi,(c,d,m,h,g,y)=>{let v=window.moment(),D=e.clone().set({hour:v.get(\"hour\"),minute:v.get(\"minute\"),second:v.get(\"second\")});return m&&D.add(parseInt(h,10),g),y?D.format(y.substring(1).trim()):D.format(n)}).replace(/{{\\s*date\\s*}}/gi,s).replace(/{{\\s*time\\s*}}/gi,window.moment().format(\"HH:mm\")).replace(/{{\\s*title\\s*}}/gi,s));return window.app.foldManager.save(l,o),l}catch(l){console.error(`Failed to create file: '${u}'`,l),new on.Notice(\"Unable to create new file.\")}}function HL(e,t){var r;return(r=t[ni(e,\"month\")])!=null?r:null}function BL(){let e={};if(!r0())return e;let{vault:t}=window.app,{folder:r}=vl(),n=t.getAbstractFileByPath(on.normalizePath(r));if(!n)throw new tm(\"Failed to find monthly notes folder\");return on.Vault.recurseChildren(n,i=>{if(i instanceof on.TFile){let a=Zo(i,\"month\");if(a){let o=ni(a,\"month\");e[o]=i}}}),e}var nm=class extends Error{};async function VL(e){let{vault:t}=window.app,{template:r,format:n,folder:i}=wl(),[a,o]=await Jo(r),s=e.format(n),u=await Dl(i,s);try{let l=await t.create(u,a.replace(/{{\\s*(date|time)\\s*(([+-]\\d+)([yqmwdhs]))?\\s*(:.+?)?}}/gi,(c,d,m,h,g,y)=>{let v=window.moment(),D=e.clone().set({hour:v.get(\"hour\"),minute:v.get(\"minute\"),second:v.get(\"second\")});return m&&D.add(parseInt(h,10),g),y?D.format(y.substring(1).trim()):D.format(n)}).replace(/{{\\s*date\\s*}}/gi,s).replace(/{{\\s*time\\s*}}/gi,window.moment().format(\"HH:mm\")).replace(/{{\\s*title\\s*}}/gi,s));return window.app.foldManager.save(l,o),l}catch(l){console.error(`Failed to create file: '${u}'`,l),new on.Notice(\"Unable to create new file.\")}}function $L(e,t){var r;return(r=t[ni(e,\"quarter\")])!=null?r:null}function UL(){let e={};if(!i0())return e;let{vault:t}=window.app,{folder:r}=wl(),n=t.getAbstractFileByPath(on.normalizePath(r));if(!n)throw new nm(\"Failed to find quarterly notes folder\");return on.Vault.recurseChildren(n,i=>{if(i instanceof on.TFile){let a=Zo(i,\"quarter\");if(a){let o=ni(a,\"quarter\");e[o]=i}}}),e}var rm=class extends Error{};async function WL(e){let{vault:t}=window.app,{template:r,format:n,folder:i}=bl(),[a,o]=await Jo(r),s=e.format(n),u=await Dl(i,s);try{let l=await t.create(u,a.replace(/{{\\s*(date|time)\\s*(([+-]\\d+)([yqmwdhs]))?\\s*(:.+?)?}}/gi,(c,d,m,h,g,y)=>{let v=window.moment(),D=e.clone().set({hour:v.get(\"hour\"),minute:v.get(\"minute\"),second:v.get(\"second\")});return m&&D.add(parseInt(h,10),g),y?D.format(y.substring(1).trim()):D.format(n)}).replace(/{{\\s*date\\s*}}/gi,s).replace(/{{\\s*time\\s*}}/gi,window.moment().format(\"HH:mm\")).replace(/{{\\s*title\\s*}}/gi,s));return window.app.foldManager.save(l,o),l}catch(l){console.error(`Failed to create file: '${u}'`,l),new on.Notice(\"Unable to create new file.\")}}function YL(e,t){var r;return(r=t[ni(e,\"year\")])!=null?r:null}function zL(){let e={};if(!a0())return e;let{vault:t}=window.app,{folder:r}=bl(),n=t.getAbstractFileByPath(on.normalizePath(r));if(!n)throw new rm(\"Failed to find yearly notes folder\");return on.Vault.recurseChildren(n,i=>{if(i instanceof on.TFile){let a=Zo(i,\"year\");if(a){let o=ni(a,\"year\");e[o]=i}}}),e}function KL(){var n,i;let{app:e}=window,t=e.internalPlugins.plugins[\"daily-notes\"];if(t&&t.enabled)return!0;let r=e.plugins.getPlugin(\"periodic-notes\");return r&&((i=(n=r.settings)==null?void 0:n.daily)==null?void 0:i.enabled)}function n0(){var r,n;let{app:e}=window;if(e.plugins.getPlugin(\"calendar\"))return!0;let t=e.plugins.getPlugin(\"periodic-notes\");return t&&((n=(r=t.settings)==null?void 0:r.weekly)==null?void 0:n.enabled)}function r0(){var r,n;let{app:e}=window,t=e.plugins.getPlugin(\"periodic-notes\");return t&&((n=(r=t.settings)==null?void 0:r.monthly)==null?void 0:n.enabled)}function i0(){var r,n;let{app:e}=window,t=e.plugins.getPlugin(\"periodic-notes\");return t&&((n=(r=t.settings)==null?void 0:r.quarterly)==null?void 0:n.enabled)}function a0(){var r,n;let{app:e}=window,t=e.plugins.getPlugin(\"periodic-notes\");return t&&((n=(r=t.settings)==null?void 0:r.yearly)==null?void 0:n.enabled)}function jL(e){let t={day:gl,week:yl,month:vl,quarter:wl,year:bl}[e];return t()}function qL(e,t){return{day:XD,month:t0,week:e0}[e](t)}gt.DEFAULT_DAILY_NOTE_FORMAT=Zh;gt.DEFAULT_MONTHLY_NOTE_FORMAT=jD;gt.DEFAULT_QUARTERLY_NOTE_FORMAT=qD;gt.DEFAULT_WEEKLY_NOTE_FORMAT=Qh;gt.DEFAULT_YEARLY_NOTE_FORMAT=GD;gt.appHasDailyNotesPluginLoaded=KL;gt.appHasMonthlyNotesPluginLoaded=r0;gt.appHasQuarterlyNotesPluginLoaded=i0;gt.appHasWeeklyNotesPluginLoaded=n0;gt.appHasYearlyNotesPluginLoaded=a0;gt.createDailyNote=XD;gt.createMonthlyNote=t0;gt.createPeriodicNote=qL;gt.createQuarterlyNote=VL;gt.createWeeklyNote=e0;gt.createYearlyNote=WL;gt.getAllDailyNotes=OL;gt.getAllMonthlyNotes=BL;gt.getAllQuarterlyNotes=UL;gt.getAllWeeklyNotes=RL;gt.getAllYearlyNotes=zL;gt.getDailyNote=AL;gt.getDailyNoteSettings=gl;gt.getDateFromFile=Zo;gt.getDateFromPath=IL;gt.getDateUID=ni;gt.getMonthlyNote=HL;gt.getMonthlyNoteSettings=vl;gt.getPeriodicNoteSettings=jL;gt.getQuarterlyNote=$L;gt.getQuarterlyNoteSettings=wl;gt.getTemplateInfo=Jo;gt.getWeeklyNote=NL;gt.getWeeklyNoteSettings=yl;gt.getYearlyNote=YL;gt.getYearlyNoteSettings=bl});var Ic=wn(Ei=>{\"use strict\";Object.defineProperty(Ei,\"__esModule\",{value:!0});require(\"obsidian\");var qi=class extends Error{},fm=class extends qi{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}},hm=class extends qi{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}},mm=class extends qi{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}},ro=class extends qi{},yc=class extends qi{constructor(t){super(`Invalid unit ${t}`)}},vr=class extends qi{},Di=class extends qi{constructor(){super(\"Zone is an abstract class\")}},_e=\"numeric\",oi=\"short\",Or=\"long\",vc={year:_e,month:_e,day:_e},H0={year:_e,month:oi,day:_e},GL={year:_e,month:oi,day:_e,weekday:oi},B0={year:_e,month:Or,day:_e},V0={year:_e,month:Or,day:_e,weekday:Or},$0={hour:_e,minute:_e},U0={hour:_e,minute:_e,second:_e},W0={hour:_e,minute:_e,second:_e,timeZoneName:oi},Y0={hour:_e,minute:_e,second:_e,timeZoneName:Or},z0={hour:_e,minute:_e,hourCycle:\"h23\"},K0={hour:_e,minute:_e,second:_e,hourCycle:\"h23\"},j0={hour:_e,minute:_e,second:_e,hourCycle:\"h23\",timeZoneName:oi},q0={hour:_e,minute:_e,second:_e,hourCycle:\"h23\",timeZoneName:Or},G0={year:_e,month:_e,day:_e,hour:_e,minute:_e},J0={year:_e,month:_e,day:_e,hour:_e,minute:_e,second:_e},Z0={year:_e,month:oi,day:_e,hour:_e,minute:_e},Q0={year:_e,month:oi,day:_e,hour:_e,minute:_e,second:_e},JL={year:_e,month:oi,day:_e,weekday:oi,hour:_e,minute:_e},X0={year:_e,month:Or,day:_e,hour:_e,minute:_e,timeZoneName:oi},eS={year:_e,month:Or,day:_e,hour:_e,minute:_e,second:_e,timeZoneName:oi},tS={year:_e,month:Or,day:_e,weekday:Or,hour:_e,minute:_e,timeZoneName:Or},nS={year:_e,month:Or,day:_e,weekday:Or,hour:_e,minute:_e,second:_e,timeZoneName:Or},oo=class{get type(){throw new Di}get name(){throw new Di}get ianaName(){return this.name}get isUniversal(){throw new Di}offsetName(t,r){throw new Di}formatOffset(t,r){throw new Di}offset(t){throw new Di}equals(t){throw new Di}get isValid(){throw new Di}},im=null,wc=class e extends oo{static get instance(){return im===null&&(im=new e),im}get type(){return\"system\"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:r,locale:n}){return iS(t,r,n)}formatOffset(t,r){return _l(this.offset(t),r)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type===\"system\"}get isValid(){return!0}},pc={};function ZL(e){return pc[e]||(pc[e]=new Intl.DateTimeFormat(\"en-US\",{hour12:!1,timeZone:e,year:\"numeric\",month:\"2-digit\",day:\"2-digit\",hour:\"2-digit\",minute:\"2-digit\",second:\"2-digit\",era:\"short\"})),pc[e]}var QL={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function XL(e,t){let r=e.format(t).replace(/\\u200E/g,\"\"),n=/(\\d+)\\/(\\d+)\\/(\\d+) (AD|BC),? (\\d+):(\\d+):(\\d+)/.exec(r),[,i,a,o,s,u,l,c]=n;return[o,i,a,s,u,l,c]}function e2(e,t){let r=e.formatToParts(t),n=[];for(let i=0;i<r.length;i++){let{type:a,value:o}=r[i],s=QL[a];a===\"era\"?n[s]=o:kt(s)||(n[s]=parseInt(o,10))}return n}var uc={},Da=class e extends oo{static create(t){return uc[t]||(uc[t]=new e(t)),uc[t]}static resetCache(){uc={},pc={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat(\"en-US\",{timeZone:t}).format(),!0}catch(r){return!1}}constructor(t){super(),this.zoneName=t,this.valid=e.isValidZone(t)}get type(){return\"iana\"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:r,locale:n}){return iS(t,r,n,this.name)}formatOffset(t,r){return _l(this.offset(t),r)}offset(t){let r=new Date(t);if(isNaN(r))return NaN;let n=ZL(this.name),[i,a,o,s,u,l,c]=n.formatToParts?e2(n,r):XL(n,r);s===\"BC\"&&(i=-Math.abs(i)+1);let m=Mc({year:i,month:a,day:o,hour:u===24?0:u,minute:l,second:c,millisecond:0}),h=+r,g=h%1e3;return h-=g>=0?g:1e3+g,(m-h)/(60*1e3)}equals(t){return t.type===\"iana\"&&t.name===this.name}get isValid(){return this.valid}},s0={};function t2(e,t={}){let r=JSON.stringify([e,t]),n=s0[r];return n||(n=new Intl.ListFormat(e,t),s0[r]=n),n}var pm={};function gm(e,t={}){let r=JSON.stringify([e,t]),n=pm[r];return n||(n=new Intl.DateTimeFormat(e,t),pm[r]=n),n}var ym={};function n2(e,t={}){let r=JSON.stringify([e,t]),n=ym[r];return n||(n=new Intl.NumberFormat(e,t),ym[r]=n),n}var vm={};function r2(e,t={}){let{base:r,...n}=t,i=JSON.stringify([e,n]),a=vm[i];return a||(a=new Intl.RelativeTimeFormat(e,t),vm[i]=a),a}var xl=null;function i2(){return xl||(xl=new Intl.DateTimeFormat().resolvedOptions().locale,xl)}function a2(e){let t=e.indexOf(\"-x-\");t!==-1&&(e=e.substring(0,t));let r=e.indexOf(\"-u-\");if(r===-1)return[e];{let n,i;try{n=gm(e).resolvedOptions(),i=e}catch(s){let u=e.substring(0,r);n=gm(u).resolvedOptions(),i=u}let{numberingSystem:a,calendar:o}=n;return[i,a,o]}}function o2(e,t,r){return(r||t)&&(e.includes(\"-u-\")||(e+=\"-u\"),r&&(e+=`-ca-${r}`),t&&(e+=`-nu-${t}`)),e}function s2(e){let t=[];for(let r=1;r<=12;r++){let n=mt.utc(2009,r,1);t.push(e(n))}return t}function l2(e){let t=[];for(let r=1;r<=7;r++){let n=mt.utc(2016,11,13+r);t.push(e(n))}return t}function cc(e,t,r,n){let i=e.listingMode();return i===\"error\"?null:i===\"en\"?r(t):n(t)}function u2(e){return e.numberingSystem&&e.numberingSystem!==\"latn\"?!1:e.numberingSystem===\"latn\"||!e.locale||e.locale.startsWith(\"en\")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem===\"latn\"}var wm=class{constructor(t,r,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:i,floor:a,...o}=n;if(!r||Object.keys(o).length>0){let s={useGrouping:!1,...n};n.padTo>0&&(s.minimumIntegerDigits=n.padTo),this.inf=n2(t,s)}}format(t){if(this.inf){let r=this.floor?Math.floor(t):t;return this.inf.format(r)}else{let r=this.floor?Math.floor(t):Om(t,3);return Tn(r,this.padTo)}}},bm=class{constructor(t,r,n){this.opts=n,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=t;else if(t.zone.type===\"fixed\"){let o=-1*(t.offset/60),s=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;t.offset!==0&&Da.create(s).valid?(i=s,this.dt=t):(i=\"UTC\",this.dt=t.offset===0?t:t.setZone(\"UTC\").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type===\"system\"?this.dt=t:t.zone.type===\"iana\"?(this.dt=t,i=t.zone.name):(i=\"UTC\",this.dt=t.setZone(\"UTC\").plus({minutes:t.offset}),this.originalZone=t.zone);let a={...this.opts};a.timeZone=a.timeZone||i,this.dtf=gm(r,a)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(\"\"):this.dtf.format(this.dt.toJSDate())}formatToParts(){let t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(r=>{if(r.type===\"timeZoneName\"){let n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...r,value:n}}else return r}):t}resolvedOptions(){return this.dtf.resolvedOptions()}},Dm=class{constructor(t,r,n){this.opts={style:\"long\",...n},!r&&rS()&&(this.rtf=r2(t,n))}format(t,r){return this.rtf?this.rtf.format(t,r):x2(r,t,this.opts.numeric,this.opts.style!==\"long\")}formatToParts(t,r){return this.rtf?this.rtf.formatToParts(t,r):[]}},mn=class e{static fromOpts(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,r,n,i=!1){let a=t||hn.defaultLocale,o=a||(i?\"en-US\":i2()),s=r||hn.defaultNumberingSystem,u=n||hn.defaultOutputCalendar;return new e(o,s,u,a)}static resetCache(){xl=null,pm={},ym={},vm={}}static fromObject({locale:t,numberingSystem:r,outputCalendar:n}={}){return e.create(t,r,n)}constructor(t,r,n,i){let[a,o,s]=a2(t);this.locale=a,this.numberingSystem=r||o||null,this.outputCalendar=n||s||null,this.intl=o2(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=u2(this)),this.fastNumbersCached}listingMode(){let t=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem===\"latn\")&&(this.outputCalendar===null||this.outputCalendar===\"gregory\");return t&&r?\"en\":\"intl\"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,r=!1){return cc(this,t,sS,()=>{let n=r?{month:t,day:\"numeric\"}:{month:t},i=r?\"format\":\"standalone\";return this.monthsCache[i][t]||(this.monthsCache[i][t]=s2(a=>this.extract(a,n,\"month\"))),this.monthsCache[i][t]})}weekdays(t,r=!1){return cc(this,t,cS,()=>{let n=r?{weekday:t,year:\"numeric\",month:\"long\",day:\"numeric\"}:{weekday:t},i=r?\"format\":\"standalone\";return this.weekdaysCache[i][t]||(this.weekdaysCache[i][t]=l2(a=>this.extract(a,n,\"weekday\"))),this.weekdaysCache[i][t]})}meridiems(){return cc(this,void 0,()=>dS,()=>{if(!this.meridiemCache){let t={hour:\"numeric\",hourCycle:\"h12\"};this.meridiemCache=[mt.utc(2016,11,13,9),mt.utc(2016,11,13,19)].map(r=>this.extract(r,t,\"dayperiod\"))}return this.meridiemCache})}eras(t){return cc(this,t,fS,()=>{let r={era:t};return this.eraCache[t]||(this.eraCache[t]=[mt.utc(-40,1,1),mt.utc(2017,1,1)].map(n=>this.extract(n,r,\"era\"))),this.eraCache[t]})}extract(t,r,n){let i=this.dtFormatter(t,r),a=i.formatToParts(),o=a.find(s=>s.type.toLowerCase()===n);return o?o.value:null}numberFormatter(t={}){return new wm(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,r={}){return new bm(t,this.intl,r)}relFormatter(t={}){return new Dm(this.intl,this.isEnglish(),t)}listFormatter(t={}){return t2(this.intl,t)}isEnglish(){return this.locale===\"en\"||this.locale.toLowerCase()===\"en-us\"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith(\"en-us\")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}},am=null,Kr=class e extends oo{static get utcInstance(){return am===null&&(am=new e(0)),am}static instance(t){return t===0?e.utcInstance:new e(t)}static parseSpecifier(t){if(t){let r=t.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);if(r)return new e(Tc(r[1],r[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return\"fixed\"}get name(){return this.fixed===0?\"UTC\":`UTC${_l(this.fixed,\"narrow\")}`}get ianaName(){return this.fixed===0?\"Etc/UTC\":`Etc/GMT${_l(-this.fixed,\"narrow\")}`}offsetName(){return this.name}formatOffset(t,r){return _l(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type===\"fixed\"&&t.fixed===this.fixed}get isValid(){return!0}},Sm=class extends oo{constructor(t){super(),this.zoneName=t}get type(){return\"invalid\"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return\"\"}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function ba(e,t){if(kt(e)||e===null)return t;if(e instanceof oo)return e;if(c2(e)){let r=e.toLowerCase();return r===\"default\"?t:r===\"local\"||r===\"system\"?wc.instance:r===\"utc\"||r===\"gmt\"?Kr.utcInstance:Kr.parseSpecifier(r)||Da.create(e)}else return ao(e)?Kr.instance(e):typeof e==\"object\"&&\"offset\"in e&&typeof e.offset==\"function\"?e:new Sm(e)}var l0=()=>Date.now(),u0=\"system\",c0=null,d0=null,f0=null,h0=60,m0,hn=class{static get now(){return l0}static set now(t){l0=t}static set defaultZone(t){u0=t}static get defaultZone(){return ba(u0,wc.instance)}static get defaultLocale(){return c0}static set defaultLocale(t){c0=t}static get defaultNumberingSystem(){return d0}static set defaultNumberingSystem(t){d0=t}static get defaultOutputCalendar(){return f0}static set defaultOutputCalendar(t){f0=t}static get twoDigitCutoffYear(){return h0}static set twoDigitCutoffYear(t){h0=t%100}static get throwOnInvalid(){return m0}static set throwOnInvalid(t){m0=t}static resetCaches(){mn.resetCache(),Da.resetCache()}};function kt(e){return typeof e==\"undefined\"}function ao(e){return typeof e==\"number\"}function _c(e){return typeof e==\"number\"&&e%1===0}function c2(e){return typeof e==\"string\"}function d2(e){return Object.prototype.toString.call(e)===\"[object Date]\"}function rS(){try{return typeof Intl!=\"undefined\"&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function f2(e){return Array.isArray(e)?e:[e]}function p0(e,t,r){if(e.length!==0)return e.reduce((n,i)=>{let a=[t(i),i];return n&&r(n[0],a[0])===n[0]?n:a},null)[1]}function h2(e,t){return t.reduce((r,n)=>(r[n]=e[n],r),{})}function rs(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ji(e,t,r){return _c(e)&&e>=t&&e<=r}function m2(e,t){return e-t*Math.floor(e/t)}function Tn(e,t=2){let r=e<0,n;return r?n=\"-\"+(\"\"+-e).padStart(t,\"0\"):n=(\"\"+e).padStart(t,\"0\"),n}function wa(e){if(!(kt(e)||e===null||e===\"\"))return parseInt(e,10)}function to(e){if(!(kt(e)||e===null||e===\"\"))return parseFloat(e)}function Am(e){if(!(kt(e)||e===null||e===\"\")){let t=parseFloat(\"0.\"+e)*1e3;return Math.floor(t)}}function Om(e,t,r=!1){let n=10**t;return(r?Math.trunc:Math.round)(e*n)/n}function Fl(e){return e%4===0&&(e%100!==0||e%400===0)}function Cl(e){return Fl(e)?366:365}function bc(e,t){let r=m2(t-1,12)+1,n=e+(t-r)/12;return r===2?Fl(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function Mc(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Dc(e){let t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,r=e-1,n=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return t===4||n===3?53:52}function Em(e){return e>99?e:e>hn.twoDigitCutoffYear?1900+e:2e3+e}function iS(e,t,r,n=null){let i=new Date(e),a={hourCycle:\"h23\",year:\"numeric\",month:\"2-digit\",day:\"2-digit\",hour:\"2-digit\",minute:\"2-digit\"};n&&(a.timeZone=n);let o={timeZoneName:t,...a},s=new Intl.DateTimeFormat(r,o).formatToParts(i).find(u=>u.type.toLowerCase()===\"timezonename\");return s?s.value:null}function Tc(e,t){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);let n=parseInt(t,10)||0,i=r<0||Object.is(r,-0)?-n:n;return r*60+i}function aS(e){let t=Number(e);if(typeof e==\"boolean\"||e===\"\"||Number.isNaN(t))throw new vr(`Invalid unit value ${e}`);return t}function Sc(e,t){let r={};for(let n in e)if(rs(e,n)){let i=e[n];if(i==null)continue;r[t(n)]=aS(i)}return r}function _l(e,t){let r=Math.trunc(Math.abs(e/60)),n=Math.trunc(Math.abs(e%60)),i=e>=0?\"+\":\"-\";switch(t){case\"short\":return`${i}${Tn(r,2)}:${Tn(n,2)}`;case\"narrow\":return`${i}${r}${n>0?`:${n}`:\"\"}`;case\"techie\":return`${i}${Tn(r,2)}${Tn(n,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Fc(e){return h2(e,[\"hour\",\"minute\",\"second\",\"millisecond\"])}var p2=[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],oS=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],g2=[\"J\",\"F\",\"M\",\"A\",\"M\",\"J\",\"J\",\"A\",\"S\",\"O\",\"N\",\"D\"];function sS(e){switch(e){case\"narrow\":return[...g2];case\"short\":return[...oS];case\"long\":return[...p2];case\"numeric\":return[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\"];case\"2-digit\":return[\"01\",\"02\",\"03\",\"04\",\"05\",\"06\",\"07\",\"08\",\"09\",\"10\",\"11\",\"12\"];default:return null}}var lS=[\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\",\"Sunday\"],uS=[\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\",\"Sun\"],y2=[\"M\",\"T\",\"W\",\"T\",\"F\",\"S\",\"S\"];function cS(e){switch(e){case\"narrow\":return[...y2];case\"short\":return[...uS];case\"long\":return[...lS];case\"numeric\":return[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\"];default:return null}}var dS=[\"AM\",\"PM\"],v2=[\"Before Christ\",\"Anno Domini\"],w2=[\"BC\",\"AD\"],b2=[\"B\",\"A\"];function fS(e){switch(e){case\"narrow\":return[...b2];case\"short\":return[...w2];case\"long\":return[...v2];default:return null}}function D2(e){return dS[e.hour<12?0:1]}function S2(e,t){return cS(t)[e.weekday-1]}function E2(e,t){return sS(t)[e.month-1]}function k2(e,t){return fS(t)[e.year<0?0:1]}function x2(e,t,r=\"always\",n=!1){let i={years:[\"year\",\"yr.\"],quarters:[\"quarter\",\"qtr.\"],months:[\"month\",\"mo.\"],weeks:[\"week\",\"wk.\"],days:[\"day\",\"day\",\"days\"],hours:[\"hour\",\"hr.\"],minutes:[\"minute\",\"min.\"],seconds:[\"second\",\"sec.\"]},a=[\"hours\",\"minutes\",\"seconds\"].indexOf(e)===-1;if(r===\"auto\"&&a){let d=e===\"days\";switch(t){case 1:return d?\"tomorrow\":`next ${i[e][0]}`;case-1:return d?\"yesterday\":`last ${i[e][0]}`;case 0:return d?\"today\":`this ${i[e][0]}`}}let o=Object.is(t,-0)||t<0,s=Math.abs(t),u=s===1,l=i[e],c=n?u?l[1]:l[2]||l[1]:u?i[e][0]:e;return o?`${s} ${c} ago`:`in ${s} ${c}`}function g0(e,t){let r=\"\";for(let n of e)n.literal?r+=n.val:r+=t(n.val);return r}var C2={D:vc,DD:H0,DDD:B0,DDDD:V0,t:$0,tt:U0,ttt:W0,tttt:Y0,T:z0,TT:K0,TTT:j0,TTTT:q0,f:G0,ff:Z0,fff:X0,ffff:tS,F:J0,FF:Q0,FFF:eS,FFFF:nS},Ir=class e{static create(t,r={}){return new e(t,r)}static parseFormat(t){let r=null,n=\"\",i=!1,a=[];for(let o=0;o<t.length;o++){let s=t.charAt(o);s===\"'\"?(n.length>0&&a.push({literal:i||/^\\s+$/.test(n),val:n}),r=null,n=\"\",i=!i):i||s===r?n+=s:(n.length>0&&a.push({literal:/^\\s+$/.test(n),val:n}),n=s,r=s)}return n.length>0&&a.push({literal:i||/^\\s+$/.test(n),val:n}),a}static macroTokenToFormatOpts(t){return C2[t]}constructor(t,r){this.opts=r,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...r}).format()}dtFormatter(t,r={}){return this.loc.dtFormatter(t,{...this.opts,...r})}formatDateTime(t,r){return this.dtFormatter(t,r).format()}formatDateTimeParts(t,r){return this.dtFormatter(t,r).formatToParts()}formatInterval(t,r){return this.dtFormatter(t.start,r).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,r){return this.dtFormatter(t,r).resolvedOptions()}num(t,r=0){if(this.opts.forceSimple)return Tn(t,r);let n={...this.opts};return r>0&&(n.padTo=r),this.loc.numberFormatter(n).format(t)}formatDateTimeFromString(t,r){let n=this.loc.listingMode()===\"en\",i=this.loc.outputCalendar&&this.loc.outputCalendar!==\"gregory\",a=(h,g)=>this.loc.extract(t,h,g),o=h=>t.isOffsetFixed&&t.offset===0&&h.allowZ?\"Z\":t.isValid?t.zone.formatOffset(t.ts,h.format):\"\",s=()=>n?D2(t):a({hour:\"numeric\",hourCycle:\"h12\"},\"dayperiod\"),u=(h,g)=>n?E2(t,h):a(g?{month:h}:{month:h,day:\"numeric\"},\"month\"),l=(h,g)=>n?S2(t,h):a(g?{weekday:h}:{weekday:h,month:\"long\",day:\"numeric\"},\"weekday\"),c=h=>{let g=e.macroTokenToFormatOpts(h);return g?this.formatWithSystemDefault(t,g):h},d=h=>n?k2(t,h):a({era:h},\"era\"),m=h=>{switch(h){case\"S\":return this.num(t.millisecond);case\"u\":case\"SSS\":return this.num(t.millisecond,3);case\"s\":return this.num(t.second);case\"ss\":return this.num(t.second,2);case\"uu\":return this.num(Math.floor(t.millisecond/10),2);case\"uuu\":return this.num(Math.floor(t.millisecond/100));case\"m\":return this.num(t.minute);case\"mm\":return this.num(t.minute,2);case\"h\":return this.num(t.hour%12===0?12:t.hour%12);case\"hh\":return this.num(t.hour%12===0?12:t.hour%12,2);case\"H\":return this.num(t.hour);case\"HH\":return this.num(t.hour,2);case\"Z\":return o({format:\"narrow\",allowZ:this.opts.allowZ});case\"ZZ\":return o({format:\"short\",allowZ:this.opts.allowZ});case\"ZZZ\":return o({format:\"techie\",allowZ:this.opts.allowZ});case\"ZZZZ\":return t.zone.offsetName(t.ts,{format:\"short\",locale:this.loc.locale});case\"ZZZZZ\":return t.zone.offsetName(t.ts,{format:\"long\",locale:this.loc.locale});case\"z\":return t.zoneName;case\"a\":return s();case\"d\":return i?a({day:\"numeric\"},\"day\"):this.num(t.day);case\"dd\":return i?a({day:\"2-digit\"},\"day\"):this.num(t.day,2);case\"c\":return this.num(t.weekday);case\"ccc\":return l(\"short\",!0);case\"cccc\":return l(\"long\",!0);case\"ccccc\":return l(\"narrow\",!0);case\"E\":return this.num(t.weekday);case\"EEE\":return l(\"short\",!1);case\"EEEE\":return l(\"long\",!1);case\"EEEEE\":return l(\"narrow\",!1);case\"L\":return i?a({month:\"numeric\",day:\"numeric\"},\"month\"):this.num(t.month);case\"LL\":return i?a({month:\"2-digit\",day:\"numeric\"},\"month\"):this.num(t.month,2);case\"LLL\":return u(\"short\",!0);case\"LLLL\":return u(\"long\",!0);case\"LLLLL\":return u(\"narrow\",!0);case\"M\":return i?a({month:\"numeric\"},\"month\"):this.num(t.month);case\"MM\":return i?a({month:\"2-digit\"},\"month\"):this.num(t.month,2);case\"MMM\":return u(\"short\",!1);case\"MMMM\":return u(\"long\",!1);case\"MMMMM\":return u(\"narrow\",!1);case\"y\":return i?a({year:\"numeric\"},\"year\"):this.num(t.year);case\"yy\":return i?a({year:\"2-digit\"},\"year\"):this.num(t.year.toString().slice(-2),2);case\"yyyy\":return i?a({year:\"numeric\"},\"year\"):this.num(t.year,4);case\"yyyyyy\":return i?a({year:\"numeric\"},\"year\"):this.num(t.year,6);case\"G\":return d(\"short\");case\"GG\":return d(\"long\");case\"GGGGG\":return d(\"narrow\");case\"kk\":return this.num(t.weekYear.toString().slice(-2),2);case\"kkkk\":return this.num(t.weekYear,4);case\"W\":return this.num(t.weekNumber);case\"WW\":return this.num(t.weekNumber,2);case\"o\":return this.num(t.ordinal);case\"ooo\":return this.num(t.ordinal,3);case\"q\":return this.num(t.quarter);case\"qq\":return this.num(t.quarter,2);case\"X\":return this.num(Math.floor(t.ts/1e3));case\"x\":return this.num(t.ts);default:return c(h)}};return g0(e.parseFormat(r),m)}formatDurationFromString(t,r){let n=u=>{switch(u[0]){case\"S\":return\"millisecond\";case\"s\":return\"second\";case\"m\":return\"minute\";case\"h\":return\"hour\";case\"d\":return\"day\";case\"w\":return\"week\";case\"M\":return\"month\";case\"y\":return\"year\";default:return null}},i=u=>l=>{let c=n(l);return c?this.num(u.get(c),l.length):l},a=e.parseFormat(r),o=a.reduce((u,{literal:l,val:c})=>l?u:u.concat(c),[]),s=t.shiftTo(...o.map(n).filter(u=>u));return g0(a,i(s))}},Ar=class{constructor(t,r){this.reason=t,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},hS=/[A-Za-z_+-]{1,256}(?::?\\/[A-Za-z0-9_+-]{1,256}(?:\\/[A-Za-z0-9_+-]{1,256})?)?/;function is(...e){let t=e.reduce((r,n)=>r+n.source,\"\");return RegExp(`^${t}$`)}function as(...e){return t=>e.reduce(([r,n,i],a)=>{let[o,s,u]=a(t,i);return[{...r,...o},s||n,u]},[{},null,1]).slice(0,2)}function os(e,...t){if(e==null)return[null,null];for(let[r,n]of t){let i=r.exec(e);if(i)return n(i)}return[null,null]}function mS(...e){return(t,r)=>{let n={},i;for(i=0;i<e.length;i++)n[e[i]]=wa(t[r+i]);return[n,null,r+i]}}var pS=/(?:(Z)|([+-]\\d\\d)(?::?(\\d\\d))?)/,_2=`(?:${pS.source}?(?:\\\\[(${hS.source})\\\\])?)?`,Lm=/(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/,gS=RegExp(`${Lm.source}${_2}`),Pm=RegExp(`(?:T${gS.source})?`),M2=/([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/,T2=/(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/,F2=/(\\d{4})-?(\\d{3})/,I2=mS(\"weekYear\",\"weekNumber\",\"weekDay\"),A2=mS(\"year\",\"ordinal\"),O2=/(\\d{4})-(\\d\\d)-(\\d\\d)/,yS=RegExp(`${Lm.source} ?(?:${pS.source}|(${hS.source}))?`),L2=RegExp(`(?: ${yS.source})?`);function ts(e,t,r){let n=e[t];return kt(n)?r:wa(n)}function P2(e,t){return[{year:ts(e,t),month:ts(e,t+1,1),day:ts(e,t+2,1)},null,t+3]}function ss(e,t){return[{hours:ts(e,t,0),minutes:ts(e,t+1,0),seconds:ts(e,t+2,0),milliseconds:Am(e[t+3])},null,t+4]}function Il(e,t){let r=!e[t]&&!e[t+1],n=Tc(e[t+1],e[t+2]),i=r?null:Kr.instance(n);return[{},i,t+3]}function Al(e,t){let r=e[t]?Da.create(e[t]):null;return[{},r,t+1]}var N2=RegExp(`^T?${Lm.source}$`),R2=/^-?P(?:(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)Y)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)W)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)D)?(?:T(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)H)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20})(?:[.,](-?\\d{1,20}))?S)?)?)$/;function H2(e){let[t,r,n,i,a,o,s,u,l]=e,c=t[0]===\"-\",d=u&&u[0]===\"-\",m=(h,g=!1)=>h!==void 0&&(g||h&&c)?-h:h;return[{years:m(to(r)),months:m(to(n)),weeks:m(to(i)),days:m(to(a)),hours:m(to(o)),minutes:m(to(s)),seconds:m(to(u),u===\"-0\"),milliseconds:m(Am(l),d)}]}var B2={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Nm(e,t,r,n,i,a,o){let s={year:t.length===2?Em(wa(t)):wa(t),month:oS.indexOf(r)+1,day:wa(n),hour:wa(i),minute:wa(a)};return o&&(s.second=wa(o)),e&&(s.weekday=e.length>3?lS.indexOf(e)+1:uS.indexOf(e)+1),s}var V2=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\\d\\d)(\\d\\d)))$/;function $2(e){let[,t,r,n,i,a,o,s,u,l,c,d]=e,m=Nm(t,i,n,r,a,o,s),h;return u?h=B2[u]:l?h=0:h=Tc(c,d),[m,new Kr(h)]}function U2(e){return e.replace(/\\([^()]*\\)|[\\n\\t]/g,\" \").replace(/(\\s\\s+)/g,\" \").trim()}var W2=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d\\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,Y2=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d\\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,z2=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \\d|\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) (\\d{4})$/;function y0(e){let[,t,r,n,i,a,o,s]=e;return[Nm(t,i,n,r,a,o,s),Kr.utcInstance]}function K2(e){let[,t,r,n,i,a,o,s]=e;return[Nm(t,s,r,n,i,a,o),Kr.utcInstance]}var j2=is(M2,Pm),q2=is(T2,Pm),G2=is(F2,Pm),J2=is(gS),vS=as(P2,ss,Il,Al),Z2=as(I2,ss,Il,Al),Q2=as(A2,ss,Il,Al),X2=as(ss,Il,Al);function eP(e){return os(e,[j2,vS],[q2,Z2],[G2,Q2],[J2,X2])}function tP(e){return os(U2(e),[V2,$2])}function nP(e){return os(e,[W2,y0],[Y2,y0],[z2,K2])}function rP(e){return os(e,[R2,H2])}var iP=as(ss);function aP(e){return os(e,[N2,iP])}var oP=is(O2,L2),sP=is(yS),lP=as(ss,Il,Al);function uP(e){return os(e,[oP,vS],[sP,lP])}var v0=\"Invalid Duration\",wS={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},cP={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...wS},Yr=146097/400,Qo=146097/4800,dP={years:{quarters:4,months:12,weeks:Yr/7,days:Yr,hours:Yr*24,minutes:Yr*24*60,seconds:Yr*24*60*60,milliseconds:Yr*24*60*60*1e3},quarters:{months:3,weeks:Yr/28,days:Yr/4,hours:Yr*24/4,minutes:Yr*24*60/4,seconds:Yr*24*60*60/4,milliseconds:Yr*24*60*60*1e3/4},months:{weeks:Qo/7,days:Qo,hours:Qo*24,minutes:Qo*24*60,seconds:Qo*24*60*60,milliseconds:Qo*24*60*60*1e3},...wS},io=[\"years\",\"quarters\",\"months\",\"weeks\",\"days\",\"hours\",\"minutes\",\"seconds\",\"milliseconds\"],fP=io.slice(0).reverse();function va(e,t,r=!1){let n={values:r?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new He(n)}function bS(e,t){var n;let r=(n=t.milliseconds)!=null?n:0;for(let i of fP.slice(1))t[i]&&(r+=t[i]*e[i].milliseconds);return r}function w0(e,t){let r=bS(e,t)<0?-1:1;io.reduceRight((n,i)=>{if(kt(t[i]))return n;if(n){let a=t[n]*r,o=e[i][n],s=Math.floor(a/o);t[i]+=s*r,t[n]-=s*o*r}return i},null),io.reduce((n,i)=>{if(kt(t[i]))return n;if(n){let a=t[n]%1;t[n]-=a,t[i]+=a*e[n][i]}return i},null)}function hP(e){let t={};for(let[r,n]of Object.entries(e))n!==0&&(t[r]=n);return t}var He=class e{constructor(t){let r=t.conversionAccuracy===\"longterm\"||!1,n=r?dP:cP;t.matrix&&(n=t.matrix),this.values=t.values,this.loc=t.loc||mn.create(),this.conversionAccuracy=r?\"longterm\":\"casual\",this.invalid=t.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,r){return e.fromObject({milliseconds:t},r)}static fromObject(t,r={}){if(t==null||typeof t!=\"object\")throw new vr(`Duration.fromObject: argument expected to be an object, got ${t===null?\"null\":typeof t}`);return new e({values:Sc(t,e.normalizeUnit),loc:mn.fromObject(r),conversionAccuracy:r.conversionAccuracy,matrix:r.matrix})}static fromDurationLike(t){if(ao(t))return e.fromMillis(t);if(e.isDuration(t))return t;if(typeof t==\"object\")return e.fromObject(t);throw new vr(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,r){let[n]=rP(t);return n?e.fromObject(n,r):e.invalid(\"unparsable\",`the input \"${t}\" can't be parsed as ISO 8601`)}static fromISOTime(t,r){let[n]=aP(t);return n?e.fromObject(n,r):e.invalid(\"unparsable\",`the input \"${t}\" can't be parsed as ISO 8601`)}static invalid(t,r=null){if(!t)throw new vr(\"need to specify a reason the Duration is invalid\");let n=t instanceof Ar?t:new Ar(t,r);if(hn.throwOnInvalid)throw new mm(n);return new e({invalid:n})}static normalizeUnit(t){let r={year:\"years\",years:\"years\",quarter:\"quarters\",quarters:\"quarters\",month:\"months\",months:\"months\",week:\"weeks\",weeks:\"weeks\",day:\"days\",days:\"days\",hour:\"hours\",hours:\"hours\",minute:\"minutes\",minutes:\"minutes\",second:\"seconds\",seconds:\"seconds\",millisecond:\"milliseconds\",milliseconds:\"milliseconds\"}[t&&t.toLowerCase()];if(!r)throw new yc(t);return r}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,r={}){let n={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?Ir.create(this.loc,n).formatDurationFromString(this,t):v0}toHuman(t={}){if(!this.isValid)return v0;let r=io.map(n=>{let i=this.values[n];return kt(i)?null:this.loc.numberFormatter({style:\"unit\",unitDisplay:\"long\",...t,unit:n.slice(0,-1)}).format(i)}).filter(n=>n);return this.loc.listFormatter({type:\"conjunction\",style:t.listStyle||\"narrow\",...t}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t=\"P\";return this.years!==0&&(t+=this.years+\"Y\"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+\"M\"),this.weeks!==0&&(t+=this.weeks+\"W\"),this.days!==0&&(t+=this.days+\"D\"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+=\"T\"),this.hours!==0&&(t+=this.hours+\"H\"),this.minutes!==0&&(t+=this.minutes+\"M\"),(this.seconds!==0||this.milliseconds!==0)&&(t+=Om(this.seconds+this.milliseconds/1e3,3)+\"S\"),t===\"P\"&&(t+=\"T0S\"),t}toISOTime(t={}){if(!this.isValid)return null;let r=this.toMillis();return r<0||r>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:\"extended\",...t,includeOffset:!1},mt.fromMillis(r,{zone:\"UTC\"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.isValid?bS(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;let r=e.fromDurationLike(t),n={};for(let i of io)(rs(r.values,i)||rs(this.values,i))&&(n[i]=r.get(i)+this.get(i));return va(this,{values:n},!0)}minus(t){if(!this.isValid)return this;let r=e.fromDurationLike(t);return this.plus(r.negate())}mapUnits(t){if(!this.isValid)return this;let r={};for(let n of Object.keys(this.values))r[n]=aS(t(this.values[n],n));return va(this,{values:r},!0)}get(t){return this[e.normalizeUnit(t)]}set(t){if(!this.isValid)return this;let r={...this.values,...Sc(t,e.normalizeUnit)};return va(this,{values:r})}reconfigure({locale:t,numberingSystem:r,conversionAccuracy:n,matrix:i}={}){let o={loc:this.loc.clone({locale:t,numberingSystem:r}),matrix:i,conversionAccuracy:n};return va(this,o)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;let t=this.toObject();return w0(this.matrix,t),va(this,{values:t},!0)}rescale(){if(!this.isValid)return this;let t=hP(this.normalize().shiftToAll().toObject());return va(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(o=>e.normalizeUnit(o));let r={},n={},i=this.toObject(),a;for(let o of io)if(t.indexOf(o)>=0){a=o;let s=0;for(let l in n)s+=this.matrix[l][o]*n[l],n[l]=0;ao(i[o])&&(s+=i[o]);let u=Math.trunc(s);r[o]=u,n[o]=(s*1e3-u*1e3)/1e3}else ao(i[o])&&(n[o]=i[o]);for(let o in n)n[o]!==0&&(r[a]+=o===a?n[o]:n[o]/this.matrix[a][o]);return w0(this.matrix,r),va(this,{values:r},!0)}shiftToAll(){return this.isValid?this.shiftTo(\"years\",\"months\",\"weeks\",\"days\",\"hours\",\"minutes\",\"seconds\",\"milliseconds\"):this}negate(){if(!this.isValid)return this;let t={};for(let r of Object.keys(this.values))t[r]=this.values[r]===0?0:-this.values[r];return va(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function r(n,i){return n===void 0||n===0?i===void 0||i===0:n===i}for(let n of io)if(!r(this.values[n],t.values[n]))return!1;return!0}},Xo=\"Invalid Interval\";function mP(e,t){return!e||!e.isValid?ns.invalid(\"missing or invalid start\"):!t||!t.isValid?ns.invalid(\"missing or invalid end\"):t<e?ns.invalid(\"end before start\",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}var ns=class e{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,r=null){if(!t)throw new vr(\"need to specify a reason the Interval is invalid\");let n=t instanceof Ar?t:new Ar(t,r);if(hn.throwOnInvalid)throw new hm(n);return new e({invalid:n})}static fromDateTimes(t,r){let n=El(t),i=El(r),a=mP(n,i);return a==null?new e({start:n,end:i}):a}static after(t,r){let n=He.fromDurationLike(r),i=El(t);return e.fromDateTimes(i,i.plus(n))}static before(t,r){let n=He.fromDurationLike(r),i=El(t);return e.fromDateTimes(i.minus(n),i)}static fromISO(t,r){let[n,i]=(t||\"\").split(\"/\",2);if(n&&i){let a,o;try{a=mt.fromISO(n,r),o=a.isValid}catch(l){o=!1}let s,u;try{s=mt.fromISO(i,r),u=s.isValid}catch(l){u=!1}if(o&&u)return e.fromDateTimes(a,s);if(o){let l=He.fromISO(i,r);if(l.isValid)return e.after(a,l)}else if(u){let l=He.fromISO(n,r);if(l.isValid)return e.before(s,l)}}return e.invalid(\"unparsable\",`the input \"${t}\" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t=\"milliseconds\"){return this.isValid?this.toDuration(t).get(t):NaN}count(t=\"milliseconds\"){if(!this.isValid)return NaN;let r=this.start.startOf(t),n=this.end.startOf(t);return Math.floor(n.diff(r,t).get(t))+(n.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:r}={}){return this.isValid?e.fromDateTimes(t||this.s,r||this.e):this}splitAt(...t){if(!this.isValid)return[];let r=t.map(El).filter(o=>this.contains(o)).sort(),n=[],{s:i}=this,a=0;for(;i<this.e;){let o=r[a]||this.e,s=+o>+this.e?this.e:o;n.push(e.fromDateTimes(i,s)),i=s,a+=1}return n}splitBy(t){let r=He.fromDurationLike(t);if(!this.isValid||!r.isValid||r.as(\"milliseconds\")===0)return[];let{s:n}=this,i=1,a,o=[];for(;n<this.e;){let s=this.start.plus(r.mapUnits(u=>u*i));a=+s>+this.e?this.e:s,o.push(e.fromDateTimes(n,a)),n=a,i+=1}return o}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;let r=this.s>t.s?this.s:t.s,n=this.e<t.e?this.e:t.e;return r>=n?null:e.fromDateTimes(r,n)}union(t){if(!this.isValid)return this;let r=this.s<t.s?this.s:t.s,n=this.e>t.e?this.e:t.e;return e.fromDateTimes(r,n)}static merge(t){let[r,n]=t.sort((i,a)=>i.s-a.s).reduce(([i,a],o)=>a?a.overlaps(o)||a.abutsStart(o)?[i,a.union(o)]:[i.concat([a]),o]:[i,o],[[],null]);return n&&r.push(n),r}static xor(t){let r=null,n=0,i=[],a=t.map(u=>[{time:u.s,type:\"s\"},{time:u.e,type:\"e\"}]),o=Array.prototype.concat(...a),s=o.sort((u,l)=>u.time-l.time);for(let u of s)n+=u.type===\"s\"?1:-1,n===1?r=u.time:(r&&+r!=+u.time&&i.push(e.fromDateTimes(r,u.time)),r=null);return e.merge(i)}difference(...t){return e.xor([this].concat(t)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \\u2013 ${this.e.toISO()})`:Xo}toLocaleString(t=vc,r={}){return this.isValid?Ir.create(this.s.loc.clone(r),t).formatInterval(this):Xo}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Xo}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Xo}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Xo}toFormat(t,{separator:r=\" \\u2013 \"}={}){return this.isValid?`${this.s.toFormat(t)}${r}${this.e.toFormat(t)}`:Xo}toDuration(t,r){return this.isValid?this.e.diff(this.s,t,r):He.invalid(this.invalidReason)}mapEndpoints(t){return e.fromDateTimes(t(this.s),t(this.e))}},es=class{static hasDST(t=hn.defaultZone){let r=mt.now().setZone(t).set({month:12});return!t.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(t){return Da.isValidZone(t)}static normalizeZone(t){return ba(t,hn.defaultZone)}static months(t=\"long\",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:a=\"gregory\"}={}){return(i||mn.create(r,n,a)).months(t)}static monthsFormat(t=\"long\",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:a=\"gregory\"}={}){return(i||mn.create(r,n,a)).months(t,!0)}static weekdays(t=\"long\",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||mn.create(r,n,null)).weekdays(t)}static weekdaysFormat(t=\"long\",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||mn.create(r,n,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return mn.create(t).meridiems()}static eras(t=\"short\",{locale:r=null}={}){return mn.create(r,null,\"gregory\").eras(t)}static features(){return{relative:rS()}}};function b0(e,t){let r=i=>i.toUTC(0,{keepLocalTime:!0}).startOf(\"day\").valueOf(),n=r(t)-r(e);return Math.floor(He.fromMillis(n).as(\"days\"))}function pP(e,t,r){let n=[[\"years\",(u,l)=>l.year-u.year],[\"quarters\",(u,l)=>l.quarter-u.quarter+(l.year-u.year)*4],[\"months\",(u,l)=>l.month-u.month+(l.year-u.year)*12],[\"weeks\",(u,l)=>{let c=b0(u,l);return(c-c%7)/7}],[\"days\",b0]],i={},a=e,o,s;for(let[u,l]of n)r.indexOf(u)>=0&&(o=u,i[u]=l(e,t),s=a.plus(i),s>t?(i[u]--,e=a.plus(i),e>t&&(s=e,i[u]--,e=a.plus(i))):e=s);return[e,i,s,o]}function gP(e,t,r,n){let[i,a,o,s]=pP(e,t,r),u=t-i,l=r.filter(d=>[\"hours\",\"minutes\",\"seconds\",\"milliseconds\"].indexOf(d)>=0);l.length===0&&(o<t&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+u/(o-i)));let c=He.fromObject(a,n);return l.length>0?He.fromMillis(u,n).shiftTo(...l).plus(c):c}var Rm={arab:\"[\\u0660-\\u0669]\",arabext:\"[\\u06F0-\\u06F9]\",bali:\"[\\u1B50-\\u1B59]\",beng:\"[\\u09E6-\\u09EF]\",deva:\"[\\u0966-\\u096F]\",fullwide:\"[\\uFF10-\\uFF19]\",gujr:\"[\\u0AE6-\\u0AEF]\",hanidec:\"[\\u3007|\\u4E00|\\u4E8C|\\u4E09|\\u56DB|\\u4E94|\\u516D|\\u4E03|\\u516B|\\u4E5D]\",khmr:\"[\\u17E0-\\u17E9]\",knda:\"[\\u0CE6-\\u0CEF]\",laoo:\"[\\u0ED0-\\u0ED9]\",limb:\"[\\u1946-\\u194F]\",mlym:\"[\\u0D66-\\u0D6F]\",mong:\"[\\u1810-\\u1819]\",mymr:\"[\\u1040-\\u1049]\",orya:\"[\\u0B66-\\u0B6F]\",tamldec:\"[\\u0BE6-\\u0BEF]\",telu:\"[\\u0C66-\\u0C6F]\",thai:\"[\\u0E50-\\u0E59]\",tibt:\"[\\u0F20-\\u0F29]\",latn:\"\\\\d\"},D0={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},yP=Rm.hanidec.replace(/[\\[|\\]]/g,\"\").split(\"\");function vP(e){let t=parseInt(e,10);if(isNaN(t)){t=\"\";for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(e[r].search(Rm.hanidec)!==-1)t+=yP.indexOf(e[r]);else for(let i in D0){let[a,o]=D0[i];n>=a&&n<=o&&(t+=n-a)}}return parseInt(t,10)}else return t}function ri({numberingSystem:e},t=\"\"){return new RegExp(`${Rm[e||\"latn\"]}${t}`)}var wP=\"missing Intl.DateTimeFormat.formatToParts support\";function Nt(e,t=r=>r){return{regex:e,deser:([r])=>t(vP(r))}}var bP=\"\\xA0\",DS=`[ ${bP}]`,SS=new RegExp(DS,\"g\");function DP(e){return e.replace(/\\./g,\"\\\\.?\").replace(SS,DS)}function S0(e){return e.replace(/\\./g,\"\").replace(SS,\" \").toLowerCase()}function ii(e,t){return e===null?null:{regex:RegExp(e.map(DP).join(\"|\")),deser:([r])=>e.findIndex(n=>S0(r)===S0(n))+t}}function E0(e,t){return{regex:e,deser:([,r,n])=>Tc(r,n),groups:t}}function dc(e){return{regex:e,deser:([t])=>t}}function SP(e){return e.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\")}function EP(e,t){let r=ri(t),n=ri(t,\"{2}\"),i=ri(t,\"{3}\"),a=ri(t,\"{4}\"),o=ri(t,\"{6}\"),s=ri(t,\"{1,2}\"),u=ri(t,\"{1,3}\"),l=ri(t,\"{1,6}\"),c=ri(t,\"{1,9}\"),d=ri(t,\"{2,4}\"),m=ri(t,\"{4,6}\"),h=v=>({regex:RegExp(SP(v.val)),deser:([D])=>D,literal:!0}),y=(v=>{if(e.literal)return h(v);switch(v.val){case\"G\":return ii(t.eras(\"short\"),0);case\"GG\":return ii(t.eras(\"long\"),0);case\"y\":return Nt(l);case\"yy\":return Nt(d,Em);case\"yyyy\":return Nt(a);case\"yyyyy\":return Nt(m);case\"yyyyyy\":return Nt(o);case\"M\":return Nt(s);case\"MM\":return Nt(n);case\"MMM\":return ii(t.months(\"short\",!0),1);case\"MMMM\":return ii(t.months(\"long\",!0),1);case\"L\":return Nt(s);case\"LL\":return Nt(n);case\"LLL\":return ii(t.months(\"short\",!1),1);case\"LLLL\":return ii(t.months(\"long\",!1),1);case\"d\":return Nt(s);case\"dd\":return Nt(n);case\"o\":return Nt(u);case\"ooo\":return Nt(i);case\"HH\":return Nt(n);case\"H\":return Nt(s);case\"hh\":return Nt(n);case\"h\":return Nt(s);case\"mm\":return Nt(n);case\"m\":return Nt(s);case\"q\":return Nt(s);case\"qq\":return Nt(n);case\"s\":return Nt(s);case\"ss\":return Nt(n);case\"S\":return Nt(u);case\"SSS\":return Nt(i);case\"u\":return dc(c);case\"uu\":return dc(s);case\"uuu\":return Nt(r);case\"a\":return ii(t.meridiems(),0);case\"kkkk\":return Nt(a);case\"kk\":return Nt(d,Em);case\"W\":return Nt(s);case\"WW\":return Nt(n);case\"E\":case\"c\":return Nt(r);case\"EEE\":return ii(t.weekdays(\"short\",!1),1);case\"EEEE\":return ii(t.weekdays(\"long\",!1),1);case\"ccc\":return ii(t.weekdays(\"short\",!0),1);case\"cccc\":return ii(t.weekdays(\"long\",!0),1);case\"Z\":case\"ZZ\":return E0(new RegExp(`([+-]${s.source})(?::(${n.source}))?`),2);case\"ZZZ\":return E0(new RegExp(`([+-]${s.source})(${n.source})?`),2);case\"z\":return dc(/[a-z_+-/]{1,256}?/i);case\" \":return dc(/[^\\S\\n\\r]/);default:return h(v)}})(e)||{invalidReason:wP};return y.token=e,y}var kP={year:{\"2-digit\":\"yy\",numeric:\"yyyyy\"},month:{numeric:\"M\",\"2-digit\":\"MM\",short:\"MMM\",long:\"MMMM\"},day:{numeric:\"d\",\"2-digit\":\"dd\"},weekday:{short:\"EEE\",long:\"EEEE\"},dayperiod:\"a\",dayPeriod:\"a\",hour12:{numeric:\"h\",\"2-digit\":\"hh\"},hour24:{numeric:\"H\",\"2-digit\":\"HH\"},minute:{numeric:\"m\",\"2-digit\":\"mm\"},second:{numeric:\"s\",\"2-digit\":\"ss\"},timeZoneName:{long:\"ZZZZZ\",short:\"ZZZ\"}};function xP(e,t,r){let{type:n,value:i}=e;if(n===\"literal\"){let u=/^\\s+$/.test(i);return{literal:!u,val:u?\" \":i}}let a=t[n],o=n;n===\"hour\"&&(t.hour12!=null?o=t.hour12?\"hour12\":\"hour24\":t.hourCycle!=null?t.hourCycle===\"h11\"||t.hourCycle===\"h12\"?o=\"hour12\":o=\"hour24\":o=r.hour12?\"hour12\":\"hour24\");let s=kP[o];if(typeof s==\"object\"&&(s=s[a]),s)return{literal:!1,val:s}}function CP(e){return[`^${e.map(r=>r.regex).reduce((r,n)=>`${r}(${n.source})`,\"\")}$`,e]}function _P(e,t,r){let n=e.match(t);if(n){let i={},a=1;for(let o in r)if(rs(r,o)){let s=r[o],u=s.groups?s.groups+1:1;!s.literal&&s.token&&(i[s.token.val[0]]=s.deser(n.slice(a,a+u))),a+=u}return[n,i]}else return[n,{}]}function MP(e){let t=a=>{switch(a){case\"S\":return\"millisecond\";case\"s\":return\"second\";case\"m\":return\"minute\";case\"h\":case\"H\":return\"hour\";case\"d\":return\"day\";case\"o\":return\"ordinal\";case\"L\":case\"M\":return\"month\";case\"y\":return\"year\";case\"E\":case\"c\":return\"weekday\";case\"W\":return\"weekNumber\";case\"k\":return\"weekYear\";case\"q\":return\"quarter\";default:return null}},r=null,n;return kt(e.z)||(r=Da.create(e.z)),kt(e.Z)||(r||(r=new Kr(e.Z)),n=e.Z),kt(e.q)||(e.M=(e.q-1)*3+1),kt(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),kt(e.u)||(e.S=Am(e.u)),[Object.keys(e).reduce((a,o)=>{let s=t(o);return s&&(a[s]=e[o]),a},{}),r,n]}var om=null;function TP(){return om||(om=mt.fromMillis(1555555555555)),om}function FP(e,t){if(e.literal)return e;let r=Ir.macroTokenToFormatOpts(e.val),n=xS(r,t);return n==null||n.includes(void 0)?e:n}function ES(e,t){return Array.prototype.concat(...e.map(r=>FP(r,t)))}function kS(e,t,r){let n=ES(Ir.parseFormat(r),e),i=n.map(o=>EP(o,e)),a=i.find(o=>o.invalidReason);if(a)return{input:t,tokens:n,invalidReason:a.invalidReason};{let[o,s]=CP(i),u=RegExp(o,\"i\"),[l,c]=_P(t,u,s),[d,m,h]=c?MP(c):[null,null,void 0];if(rs(c,\"a\")&&rs(c,\"H\"))throw new ro(\"Can't include meridiem when specifying 24-hour format\");return{input:t,tokens:n,regex:u,rawMatches:l,matches:c,result:d,zone:m,specificOffset:h}}}function IP(e,t,r){let{result:n,zone:i,specificOffset:a,invalidReason:o}=kS(e,t,r);return[n,i,a,o]}function xS(e,t){if(!e)return null;let n=Ir.create(t,e).dtFormatter(TP()),i=n.formatToParts(),a=n.resolvedOptions();return i.map(o=>xP(o,e,a))}var CS=[0,31,59,90,120,151,181,212,243,273,304,334],_S=[0,31,60,91,121,152,182,213,244,274,305,335];function zr(e,t){return new Ar(\"unit out of range\",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function MS(e,t,r){let n=new Date(Date.UTC(e,t-1,r));e<100&&e>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);let i=n.getUTCDay();return i===0?7:i}function TS(e,t,r){return r+(Fl(e)?_S:CS)[t-1]}function FS(e,t){let r=Fl(e)?_S:CS,n=r.findIndex(a=>a<t),i=t-r[n];return{month:n+1,day:i}}function km(e){let{year:t,month:r,day:n}=e,i=TS(t,r,n),a=MS(t,r,n),o=Math.floor((i-a+10)/7),s;return o<1?(s=t-1,o=Dc(s)):o>Dc(t)?(s=t+1,o=1):s=t,{weekYear:s,weekNumber:o,weekday:a,...Fc(e)}}function k0(e){let{weekYear:t,weekNumber:r,weekday:n}=e,i=MS(t,1,4),a=Cl(t),o=r*7+n-i-3,s;o<1?(s=t-1,o+=Cl(s)):o>a?(s=t+1,o-=Cl(t)):s=t;let{month:u,day:l}=FS(s,o);return{year:s,month:u,day:l,...Fc(e)}}function sm(e){let{year:t,month:r,day:n}=e,i=TS(t,r,n);return{year:t,ordinal:i,...Fc(e)}}function x0(e){let{year:t,ordinal:r}=e,{month:n,day:i}=FS(t,r);return{year:t,month:n,day:i,...Fc(e)}}function AP(e){let t=_c(e.weekYear),r=ji(e.weekNumber,1,Dc(e.weekYear)),n=ji(e.weekday,1,7);return t?r?n?!1:zr(\"weekday\",e.weekday):zr(\"week\",e.week):zr(\"weekYear\",e.weekYear)}function OP(e){let t=_c(e.year),r=ji(e.ordinal,1,Cl(e.year));return t?r?!1:zr(\"ordinal\",e.ordinal):zr(\"year\",e.year)}function IS(e){let t=_c(e.year),r=ji(e.month,1,12),n=ji(e.day,1,bc(e.year,e.month));return t?r?n?!1:zr(\"day\",e.day):zr(\"month\",e.month):zr(\"year\",e.year)}function AS(e){let{hour:t,minute:r,second:n,millisecond:i}=e,a=ji(t,0,23)||t===24&&r===0&&n===0&&i===0,o=ji(r,0,59),s=ji(n,0,59),u=ji(i,0,999);return a?o?s?u?!1:zr(\"millisecond\",i):zr(\"second\",n):zr(\"minute\",r):zr(\"hour\",t)}var lm=\"Invalid DateTime\",C0=864e13;function fc(e){return new Ar(\"unsupported zone\",`the zone \"${e.name}\" is not supported`)}function um(e){return e.weekData===null&&(e.weekData=km(e.c)),e.weekData}function no(e,t){let r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new mt({...r,...t,old:r})}function OS(e,t,r){let n=e-t*60*1e3,i=r.offset(n);if(t===i)return[n,t];n-=(i-t)*60*1e3;let a=r.offset(n);return i===a?[n,i]:[e-Math.min(i,a)*60*1e3,Math.max(i,a)]}function hc(e,t){e+=t*60*1e3;let r=new Date(e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function gc(e,t,r){return OS(Mc(e),t,r)}function _0(e,t){let r=e.o,n=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,a={...e.c,year:n,month:i,day:Math.min(e.c.day,bc(n,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=He.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as(\"milliseconds\"),s=Mc(a),[u,l]=OS(s,r,e.zone);return o!==0&&(u+=o,l=e.zone.offset(u)),{ts:u,o:l}}function Sl(e,t,r,n,i,a){let{setZone:o,zone:s}=r;if(e&&Object.keys(e).length!==0||t){let u=t||s,l=mt.fromObject(e,{...r,zone:u,specificOffset:a});return o?l:l.setZone(s)}else return mt.invalid(new Ar(\"unparsable\",`the input \"${i}\" can't be parsed as ${n}`))}function mc(e,t,r=!0){return e.isValid?Ir.create(mn.create(\"en-US\"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,t):null}function cm(e,t){let r=e.c.year>9999||e.c.year<0,n=\"\";return r&&e.c.year>=0&&(n+=\"+\"),n+=Tn(e.c.year,r?6:4),t?(n+=\"-\",n+=Tn(e.c.month),n+=\"-\",n+=Tn(e.c.day)):(n+=Tn(e.c.month),n+=Tn(e.c.day)),n}function M0(e,t,r,n,i,a){let o=Tn(e.c.hour);return t?(o+=\":\",o+=Tn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!r)&&(o+=\":\")):o+=Tn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!r)&&(o+=Tn(e.c.second),(e.c.millisecond!==0||!n)&&(o+=\".\",o+=Tn(e.c.millisecond,3))),i&&(e.isOffsetFixed&&e.offset===0&&!a?o+=\"Z\":e.o<0?(o+=\"-\",o+=Tn(Math.trunc(-e.o/60)),o+=\":\",o+=Tn(Math.trunc(-e.o%60))):(o+=\"+\",o+=Tn(Math.trunc(e.o/60)),o+=\":\",o+=Tn(Math.trunc(e.o%60)))),a&&(o+=\"[\"+e.zone.ianaName+\"]\"),o}var LS={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},LP={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},PP={ordinal:1,hour:0,minute:0,second:0,millisecond:0},PS=[\"year\",\"month\",\"day\",\"hour\",\"minute\",\"second\",\"millisecond\"],NP=[\"weekYear\",\"weekNumber\",\"weekday\",\"hour\",\"minute\",\"second\",\"millisecond\"],RP=[\"year\",\"ordinal\",\"hour\",\"minute\",\"second\",\"millisecond\"];function T0(e){let t={year:\"year\",years:\"year\",month:\"month\",months:\"month\",day:\"day\",days:\"day\",hour:\"hour\",hours:\"hour\",minute:\"minute\",minutes:\"minute\",quarter:\"quarter\",quarters:\"quarter\",second:\"second\",seconds:\"second\",millisecond:\"millisecond\",milliseconds:\"millisecond\",weekday:\"weekday\",weekdays:\"weekday\",weeknumber:\"weekNumber\",weeksnumber:\"weekNumber\",weeknumbers:\"weekNumber\",weekyear:\"weekYear\",weekyears:\"weekYear\",ordinal:\"ordinal\"}[e.toLowerCase()];if(!t)throw new yc(e);return t}function F0(e,t){let r=ba(t.zone,hn.defaultZone),n=mn.fromObject(t),i=hn.now(),a,o;if(kt(e.year))a=i;else{for(let l of PS)kt(e[l])&&(e[l]=LS[l]);let s=IS(e)||AS(e);if(s)return mt.invalid(s);let u=r.offset(i);[a,o]=gc(e,u,r)}return new mt({ts:a,zone:r,loc:n,o})}function I0(e,t,r){let n=kt(r.round)?!0:r.round,i=(o,s)=>(o=Om(o,n||r.calendary?0:2,!0),t.loc.clone(r).relFormatter(r).format(o,s)),a=o=>r.calendary?t.hasSame(e,o)?0:t.startOf(o).diff(e.startOf(o),o).get(o):t.diff(e,o).get(o);if(r.unit)return i(a(r.unit),r.unit);for(let o of r.units){let s=a(o);if(Math.abs(s)>=1)return i(s,o)}return i(e>t?-0:0,r.units[r.units.length-1])}function A0(e){let t={},r;return e.length>0&&typeof e[e.length-1]==\"object\"?(t=e[e.length-1],r=Array.from(e).slice(0,e.length-1)):r=Array.from(e),[t,r]}var mt=class e{constructor(t){let r=t.zone||hn.defaultZone,n=t.invalid||(Number.isNaN(t.ts)?new Ar(\"invalid input\"):null)||(r.isValid?null:fc(r));this.ts=kt(t.ts)?hn.now():t.ts;let i=null,a=null;if(!n)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(r))[i,a]=[t.old.c,t.old.o];else{let s=r.offset(this.ts);i=hc(this.ts,s),n=Number.isNaN(i.year)?new Ar(\"invalid input\"):null,i=n?null:i,a=n?null:s}this._zone=r,this.loc=t.loc||mn.create(),this.invalid=n,this.weekData=null,this.c=i,this.o=a,this.isLuxonDateTime=!0}static now(){return new e({})}static local(){let[t,r]=A0(arguments),[n,i,a,o,s,u,l]=r;return F0({year:n,month:i,day:a,hour:o,minute:s,second:u,millisecond:l},t)}static utc(){let[t,r]=A0(arguments),[n,i,a,o,s,u,l]=r;return t.zone=Kr.utcInstance,F0({year:n,month:i,day:a,hour:o,minute:s,second:u,millisecond:l},t)}static fromJSDate(t,r={}){let n=d2(t)?t.valueOf():NaN;if(Number.isNaN(n))return e.invalid(\"invalid input\");let i=ba(r.zone,hn.defaultZone);return i.isValid?new e({ts:n,zone:i,loc:mn.fromObject(r)}):e.invalid(fc(i))}static fromMillis(t,r={}){if(ao(t))return t<-C0||t>C0?e.invalid(\"Timestamp out of range\"):new e({ts:t,zone:ba(r.zone,hn.defaultZone),loc:mn.fromObject(r)});throw new vr(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,r={}){if(ao(t))return new e({ts:t*1e3,zone:ba(r.zone,hn.defaultZone),loc:mn.fromObject(r)});throw new vr(\"fromSeconds requires a numerical input\")}static fromObject(t,r={}){t=t||{};let n=ba(r.zone,hn.defaultZone);if(!n.isValid)return e.invalid(fc(n));let i=hn.now(),a=kt(r.specificOffset)?n.offset(i):r.specificOffset,o=Sc(t,T0),s=!kt(o.ordinal),u=!kt(o.year),l=!kt(o.month)||!kt(o.day),c=u||l,d=o.weekYear||o.weekNumber,m=mn.fromObject(r);if((c||s)&&d)throw new ro(\"Can't mix weekYear/weekNumber units with year/month/day or ordinals\");if(l&&s)throw new ro(\"Can't mix ordinal dates with month/day\");let h=d||o.weekday&&!c,g,y,v=hc(i,a);h?(g=NP,y=LP,v=km(v)):s?(g=RP,y=PP,v=sm(v)):(g=PS,y=LS);let D=!1;for(let B of g){let G=o[B];kt(G)?D?o[B]=y[B]:o[B]=v[B]:D=!0}let I=h?AP(o):s?OP(o):IS(o),C=I||AS(o);if(C)return e.invalid(C);let x=h?k0(o):s?x0(o):o,[O,A]=gc(x,a,n),P=new e({ts:O,zone:n,o:A,loc:m});return o.weekday&&c&&t.weekday!==P.weekday?e.invalid(\"mismatched weekday\",`you can't specify both a weekday of ${o.weekday} and a date of ${P.toISO()}`):P}static fromISO(t,r={}){let[n,i]=eP(t);return Sl(n,i,r,\"ISO 8601\",t)}static fromRFC2822(t,r={}){let[n,i]=tP(t);return Sl(n,i,r,\"RFC 2822\",t)}static fromHTTP(t,r={}){let[n,i]=nP(t);return Sl(n,i,r,\"HTTP\",r)}static fromFormat(t,r,n={}){if(kt(t)||kt(r))throw new vr(\"fromFormat requires an input string and a format\");let{locale:i=null,numberingSystem:a=null}=n,o=mn.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),[s,u,l,c]=IP(o,t,r);return c?e.invalid(c):Sl(s,u,n,`format ${r}`,t,l)}static fromString(t,r,n={}){return e.fromFormat(t,r,n)}static fromSQL(t,r={}){let[n,i]=uP(t);return Sl(n,i,r,\"SQL\",t)}static invalid(t,r=null){if(!t)throw new vr(\"need to specify a reason the DateTime is invalid\");let n=t instanceof Ar?t:new Ar(t,r);if(hn.throwOnInvalid)throw new fm(n);return new e({invalid:n})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,r={}){let n=xS(t,mn.fromObject(r));return n?n.map(i=>i?i.val:null).join(\"\"):null}static expandFormat(t,r={}){return ES(Ir.parseFormat(t),mn.fromObject(r)).map(i=>i.val).join(\"\")}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?um(this).weekYear:NaN}get weekNumber(){return this.isValid?um(this).weekNumber:NaN}get weekday(){return this.isValid?um(this).weekday:NaN}get ordinal(){return this.isValid?sm(this.c).ordinal:NaN}get monthShort(){return this.isValid?es.months(\"short\",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?es.months(\"long\",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?es.weekdays(\"short\",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?es.weekdays(\"long\",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:\"short\",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:\"long\",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let t=864e5,r=6e4,n=Mc(this.c),i=this.zone.offset(n-t),a=this.zone.offset(n+t),o=this.zone.offset(n-i*r),s=this.zone.offset(n-a*r);if(o===s)return[this];let u=n-o*r,l=n-s*r,c=hc(u,o),d=hc(l,s);return c.hour===d.hour&&c.minute===d.minute&&c.second===d.second&&c.millisecond===d.millisecond?[no(this,{ts:u}),no(this,{ts:l})]:[this]}get isInLeapYear(){return Fl(this.year)}get daysInMonth(){return bc(this.year,this.month)}get daysInYear(){return this.isValid?Cl(this.year):NaN}get weeksInWeekYear(){return this.isValid?Dc(this.weekYear):NaN}resolvedLocaleOptions(t={}){let{locale:r,numberingSystem:n,calendar:i}=Ir.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:r,numberingSystem:n,outputCalendar:i}}toUTC(t=0,r={}){return this.setZone(Kr.instance(t),r)}toLocal(){return this.setZone(hn.defaultZone)}setZone(t,{keepLocalTime:r=!1,keepCalendarTime:n=!1}={}){if(t=ba(t,hn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let i=this.ts;if(r||n){let a=t.offset(this.ts),o=this.toObject();[i]=gc(o,a,t)}return no(this,{ts:i,zone:t})}else return e.invalid(fc(t))}reconfigure({locale:t,numberingSystem:r,outputCalendar:n}={}){let i=this.loc.clone({locale:t,numberingSystem:r,outputCalendar:n});return no(this,{loc:i})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;let r=Sc(t,T0),n=!kt(r.weekYear)||!kt(r.weekNumber)||!kt(r.weekday),i=!kt(r.ordinal),a=!kt(r.year),o=!kt(r.month)||!kt(r.day),s=a||o,u=r.weekYear||r.weekNumber;if((s||i)&&u)throw new ro(\"Can't mix weekYear/weekNumber units with year/month/day or ordinals\");if(o&&i)throw new ro(\"Can't mix ordinal dates with month/day\");let l;n?l=k0({...km(this.c),...r}):kt(r.ordinal)?(l={...this.toObject(),...r},kt(r.day)&&(l.day=Math.min(bc(l.year,l.month),l.day))):l=x0({...sm(this.c),...r});let[c,d]=gc(l,this.o,this.zone);return no(this,{ts:c,o:d})}plus(t){if(!this.isValid)return this;let r=He.fromDurationLike(t);return no(this,_0(this,r))}minus(t){if(!this.isValid)return this;let r=He.fromDurationLike(t).negate();return no(this,_0(this,r))}startOf(t){if(!this.isValid)return this;let r={},n=He.normalizeUnit(t);switch(n){case\"years\":r.month=1;case\"quarters\":case\"months\":r.day=1;case\"weeks\":case\"days\":r.hour=0;case\"hours\":r.minute=0;case\"minutes\":r.second=0;case\"seconds\":r.millisecond=0;break}if(n===\"weeks\"&&(r.weekday=1),n===\"quarters\"){let i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,r={}){return this.isValid?Ir.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,t):lm}toLocaleString(t=vc,r={}){return this.isValid?Ir.create(this.loc.clone(r),t).formatDateTime(this):lm}toLocaleParts(t={}){return this.isValid?Ir.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t=\"extended\",suppressSeconds:r=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:a=!1}={}){if(!this.isValid)return null;let o=t===\"extended\",s=cm(this,o);return s+=\"T\",s+=M0(this,o,r,n,i,a),s}toISODate({format:t=\"extended\"}={}){return this.isValid?cm(this,t===\"extended\"):null}toISOWeekDate(){return mc(this,\"kkkk-'W'WW-c\")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:r=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:a=!1,format:o=\"extended\"}={}){return this.isValid?(i?\"T\":\"\")+M0(this,o===\"extended\",r,t,n,a):null}toRFC2822(){return mc(this,\"EEE, dd LLL yyyy HH:mm:ss ZZZ\",!1)}toHTTP(){return mc(this.toUTC(),\"EEE, dd LLL yyyy HH:mm:ss 'GMT'\")}toSQLDate(){return this.isValid?cm(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:r=!1,includeOffsetSpace:n=!0}={}){let i=\"HH:mm:ss.SSS\";return(r||t)&&(n&&(i+=\" \"),r?i+=\"z\":t&&(i+=\"ZZ\")),mc(this,i,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():lm}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};let r={...this.c};return t.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,r=\"milliseconds\",n={}){if(!this.isValid||!t.isValid)return He.invalid(\"created by diffing an invalid DateTime\");let i={locale:this.locale,numberingSystem:this.numberingSystem,...n},a=f2(r).map(He.normalizeUnit),o=t.valueOf()>this.valueOf(),s=o?this:t,u=o?t:this,l=gP(s,u,a,i);return o?l.negate():l}diffNow(t=\"milliseconds\",r={}){return this.diff(e.now(),t,r)}until(t){return this.isValid?ns.fromDateTimes(this,t):this}hasSame(t,r){if(!this.isValid)return!1;let n=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(r)<=n&&n<=i.endOf(r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;let r=t.base||e.fromObject({},{zone:this.zone}),n=t.padding?this<r?-t.padding:t.padding:0,i=[\"years\",\"months\",\"days\",\"hours\",\"minutes\",\"seconds\"],a=t.unit;return Array.isArray(t.unit)&&(i=t.unit,a=void 0),I0(r,this.plus(n),{...t,numeric:\"always\",units:i,unit:a})}toRelativeCalendar(t={}){return this.isValid?I0(t.base||e.fromObject({},{zone:this.zone}),this,{...t,numeric:\"auto\",units:[\"years\",\"months\",\"days\"],calendary:!0}):null}static min(...t){if(!t.every(e.isDateTime))throw new vr(\"min requires all arguments be DateTimes\");return p0(t,r=>r.valueOf(),Math.min)}static max(...t){if(!t.every(e.isDateTime))throw new vr(\"max requires all arguments be DateTimes\");return p0(t,r=>r.valueOf(),Math.max)}static fromFormatExplain(t,r,n={}){let{locale:i=null,numberingSystem:a=null}=n,o=mn.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});return kS(o,t,r)}static fromStringExplain(t,r,n={}){return e.fromFormatExplain(t,r,n)}static get DATE_SHORT(){return vc}static get DATE_MED(){return H0}static get DATE_MED_WITH_WEEKDAY(){return GL}static get DATE_FULL(){return B0}static get DATE_HUGE(){return V0}static get TIME_SIMPLE(){return $0}static get TIME_WITH_SECONDS(){return U0}static get TIME_WITH_SHORT_OFFSET(){return W0}static get TIME_WITH_LONG_OFFSET(){return Y0}static get TIME_24_SIMPLE(){return z0}static get TIME_24_WITH_SECONDS(){return K0}static get TIME_24_WITH_SHORT_OFFSET(){return j0}static get TIME_24_WITH_LONG_OFFSET(){return q0}static get DATETIME_SHORT(){return G0}static get DATETIME_SHORT_WITH_SECONDS(){return J0}static get DATETIME_MED(){return Z0}static get DATETIME_MED_WITH_SECONDS(){return Q0}static get DATETIME_MED_WITH_WEEKDAY(){return JL}static get DATETIME_FULL(){return X0}static get DATETIME_FULL_WITH_SECONDS(){return eS}static get DATETIME_HUGE(){return tS}static get DATETIME_HUGE_WITH_SECONDS(){return nS}};function El(e){if(mt.isDateTime(e))return e;if(e&&e.valueOf&&ao(e.valueOf()))return mt.fromJSDate(e);if(e&&typeof e==\"object\")return mt.fromObject(e);throw new vr(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var Hm={renderNullAs:\"\\\\-\",taskCompletionTracking:!1,taskCompletionUseEmojiShorthand:!1,taskCompletionText:\"completion\",taskCompletionDateFormat:\"yyyy-MM-dd\",recursiveSubTaskCompletion:!1,warnOnEmptyResult:!0,refreshEnabled:!0,refreshInterval:2500,defaultDateFormat:\"MMMM dd, yyyy\",defaultDateTimeFormat:\"h:mm a - MMMM dd, yyyy\",maxRecursiveRenderDepth:4,tableIdColumnName:\"File\",tableGroupColumnName:\"Group\",showResultCount:!0},HP={allowHtml:!0};({...Hm,...HP});var xm=class e{constructor(t){ur(this,\"value\");ur(this,\"successful\");this.value=t,this.successful=!0}map(t){return new e(t(this.value))}flatMap(t){return t(this.value)}mapErr(t){return this}bimap(t,r){return this.map(t)}orElse(t){return this.value}cast(){return this}orElseThrow(t){return this.value}},Cm=class e{constructor(t){ur(this,\"error\");ur(this,\"successful\");this.error=t,this.successful=!1}map(t){return this}flatMap(t){return this}mapErr(t){return new e(t(this.error))}bimap(t,r){return this.mapErr(r)}orElse(t){return t}cast(){return this}orElseThrow(t){throw t?new Error(t(this.error)):new Error(\"\"+this.error)}},Ec;(function(e){function t(a){return new xm(a)}e.success=t;function r(a){return new Cm(a)}e.failure=r;function n(a,o,s){return a.successful?o.successful?s(a.value,o.value):r(o.error):r(a.error)}e.flatMap2=n;function i(a,o,s){return n(a,o,(u,l)=>t(s(u,l)))}e.map2=i})(Ec||(Ec={}));var BP=typeof globalThis!=\"undefined\"?globalThis:typeof window!=\"undefined\"||typeof window!=\"undefined\"?window:typeof self!=\"undefined\"?self:{},kc={exports:{}};kc.exports;(function(e,t){(function(r,n){e.exports=n()})(typeof self!=\"undefined\"?self:BP,function(){return function(r){var n={};function i(a){if(n[a])return n[a].exports;var o=n[a]={i:a,l:!1,exports:{}};return r[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=r,i.c=n,i.d=function(a,o,s){i.o(a,o)||Object.defineProperty(a,o,{configurable:!1,enumerable:!0,get:s})},i.r=function(a){Object.defineProperty(a,\"__esModule\",{value:!0})},i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,\"a\",o),o},i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},i.p=\"\",i(i.s=0)}([function(r,n,i){function a(L){if(!(this instanceof a))return new a(L);this._=L}var o=a.prototype;function s(L,K){for(var ee=0;ee<L;ee++)K(ee)}function u(L,K,ee){return function(ue,de){s(de.length,function(ve){ue(de[ve],ve,de)})}(function(ue,de,ve){K=L(K,ue,de,ve)},ee),K}function l(L,K){return u(function(ee,ue,de,ve){return ee.concat([L(ue,de,ve)])},[],K)}function c(L,K){var ee={v:0,buf:K};return s(L,function(){var ue;ee={v:ee.v<<1|(ue=ee.buf,ue[0]>>7),buf:function(de){var ve=u(function(ge,M,H,q){return ge.concat(H===q.length-1?Buffer.from([M,0]).readUInt16BE(0):q.readUInt16BE(H))},[],de);return Buffer.from(l(function(ge){return(ge<<1&65535)>>8},ve))}(ee.buf)}}),ee}function d(){return typeof Buffer!=\"undefined\"}function m(){if(!d())throw new Error(\"Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.\")}function h(L){m();var K=u(function(ve,ge){return ve+ge},0,L);if(K%8!=0)throw new Error(\"The bits [\"+L.join(\", \")+\"] add up to \"+K+\" which is not an even number of bytes; the total should be divisible by 8\");var ee,ue=K/8,de=(ee=function(ve){return ve>48},u(function(ve,ge){return ve||(ee(ge)?ge:ve)},null,L));if(de)throw new Error(de+\" bit range requested exceeds 48 bit (6 byte) Number max.\");return new a(function(ve,ge){var M=ue+ge;return M>ve.length?B(ge,ue.toString()+\" bytes\"):P(M,u(function(H,q){var ie=c(q,H.buf);return{coll:H.coll.concat(ie.v),buf:ie.buf}},{coll:[],buf:ve.slice(ge,M)},L).coll)})}function g(L,K){return new a(function(ee,ue){return m(),ue+K>ee.length?B(ue,K+\" bytes for \"+L):P(ue+K,ee.slice(ue,ue+K))})}function y(L,K){if(typeof(ee=K)!=\"number\"||Math.floor(ee)!==ee||K<0||K>6)throw new Error(L+\" requires integer length in range [0, 6].\");var ee}function v(L){return y(\"uintBE\",L),g(\"uintBE(\"+L+\")\",L).map(function(K){return K.readUIntBE(0,L)})}function D(L){return y(\"uintLE\",L),g(\"uintLE(\"+L+\")\",L).map(function(K){return K.readUIntLE(0,L)})}function I(L){return y(\"intBE\",L),g(\"intBE(\"+L+\")\",L).map(function(K){return K.readIntBE(0,L)})}function C(L){return y(\"intLE\",L),g(\"intLE(\"+L+\")\",L).map(function(K){return K.readIntLE(0,L)})}function x(L){return L instanceof a}function O(L){return{}.toString.call(L)===\"[object Array]\"}function A(L){return d()&&Buffer.isBuffer(L)}function P(L,K){return{status:!0,index:L,value:K,furthest:-1,expected:[]}}function B(L,K){return O(K)||(K=[K]),{status:!1,index:-1,value:null,furthest:L,expected:K}}function G(L,K){if(!K||L.furthest>K.furthest)return L;var ee=L.furthest===K.furthest?function(ue,de){if(function(){if(a._supportsSet!==void 0)return a._supportsSet;var ae=typeof Set!=\"undefined\";return a._supportsSet=ae,ae}()&&Array.from){for(var ve=new Set(ue),ge=0;ge<de.length;ge++)ve.add(de[ge]);var M=Array.from(ve);return M.sort(),M}for(var H={},q=0;q<ue.length;q++)H[ue[q]]=!0;for(var ie=0;ie<de.length;ie++)H[de[ie]]=!0;var ye=[];for(var ce in H)({}).hasOwnProperty.call(H,ce)&&ye.push(ce);return ye.sort(),ye}(L.expected,K.expected):K.expected;return{status:L.status,index:L.index,value:L.value,furthest:K.furthest,expected:ee}}var J={};function Q(L,K){if(A(L))return{offset:K,line:-1,column:-1};L in J||(J[L]={});for(var ee=J[L],ue=0,de=0,ve=0,ge=K;ge>=0;){if(ge in ee){ue=ee[ge].line,ve===0&&(ve=ee[ge].lineStart);break}(L.charAt(ge)===`\n`||L.charAt(ge)===\"\\r\"&&L.charAt(ge+1)!==`\n`)&&(de++,ve===0&&(ve=ge+1)),ge--}var M=ue+de,H=K-ve;return ee[K]={line:M,lineStart:ve},{offset:K,line:M+1,column:H+1}}function oe(L){if(!x(L))throw new Error(\"not a parser: \"+L)}function te(L,K){return typeof L==\"string\"?L.charAt(K):L[K]}function re(L){if(typeof L!=\"number\")throw new Error(\"not a number: \"+L)}function ne(L){if(typeof L!=\"function\")throw new Error(\"not a function: \"+L)}function be(L){if(typeof L!=\"string\")throw new Error(\"not a string: \"+L)}var pe=2,De=3,Ce=8,U=5*Ce,Je=4*Ce,it=\"  \";function N(L,K){return new Array(K+1).join(L)}function Ze(L,K,ee){var ue=K-L.length;return ue<=0?L:N(ee,ue)+L}function It(L,K,ee,ue){return{from:L-K>0?L-K:0,to:L+ee>ue?ue:L+ee}}function Mt(L,K){var ee,ue,de,ve,ge,M=K.index,H=M.offset,q=1;if(H===L.length)return\"Got the end of the input\";if(A(L)){var ie=H-H%Ce,ye=H-ie,ce=It(ie,U,Je+Ce,L.length),ae=l(function(Te){return l(function(Ue){return Ze(Ue.toString(16),2,\"0\")},Te)},function(Te,Ue){var We=Te.length,Ft=[],Hn=0;if(We<=Ue)return[Te.slice()];for(var Ot=0;Ot<We;Ot++)Ft[Hn]||Ft.push([]),Ft[Hn].push(Te[Ot]),(Ot+1)%Ue==0&&Hn++;return Ft}(L.slice(ce.from,ce.to).toJSON().data,Ce));ve=function(Te){return Te.from===0&&Te.to===1?{from:Te.from,to:Te.to}:{from:Te.from/Ce,to:Math.floor(Te.to/Ce)}}(ce),ue=ie/Ce,ee=3*ye,ye>=4&&(ee+=1),q=2,de=l(function(Te){return Te.length<=4?Te.join(\" \"):Te.slice(0,4).join(\" \")+\"  \"+Te.slice(4).join(\" \")},ae),(ge=(8*(ve.to>0?ve.to-1:ve.to)).toString(16).length)<2&&(ge=2)}else{var Se=L.split(/\\r\\n|[\\n\\r\\u2028\\u2029]/);ee=M.column-1,ue=M.line-1,ve=It(ue,pe,De,Se.length),de=Se.slice(ve.from,ve.to),ge=ve.to.toString().length}var nt=ue-ve.from;return A(L)&&(ge=(8*(ve.to>0?ve.to-1:ve.to)).toString(16).length)<2&&(ge=2),u(function(Te,Ue,We){var Ft,Hn=We===nt,Ot=Hn?\"> \":it;return Ft=A(L)?Ze((8*(ve.from+We)).toString(16),ge,\"0\"):Ze((ve.from+We+1).toString(),ge,\" \"),[].concat(Te,[Ot+Ft+\" | \"+Ue],Hn?[it+N(\" \",ge)+\" | \"+Ze(\"\",ee,\" \")+N(\"^\",q)]:[])},[],de).join(`\n`)}function jt(L,K){return[`\n`,\"-- PARSING FAILED \"+N(\"-\",50),`\n\n`,Mt(L,K),`\n\n`,(ee=K.expected,ee.length===1?`Expected:\n\n`+ee[0]:`Expected one of the following: \n\n`+ee.join(\", \")),`\n`].join(\"\");var ee}function vt(L){return L.flags!==void 0?L.flags:[L.global?\"g\":\"\",L.ignoreCase?\"i\":\"\",L.multiline?\"m\":\"\",L.unicode?\"u\":\"\",L.sticky?\"y\":\"\"].join(\"\")}function Wt(){for(var L=[].slice.call(arguments),K=L.length,ee=0;ee<K;ee+=1)oe(L[ee]);return a(function(ue,de){for(var ve,ge=new Array(K),M=0;M<K;M+=1){if(!(ve=G(L[M]._(ue,de),ve)).status)return ve;ge[M]=ve.value,de=ve.index}return G(P(de,ge),ve)})}function Tt(){var L=[].slice.call(arguments);if(L.length===0)throw new Error(\"seqMap needs at least one argument\");var K=L.pop();return ne(K),Wt.apply(null,L).map(function(ee){return K.apply(null,ee)})}function Jt(){var L=[].slice.call(arguments),K=L.length;if(K===0)return jn(\"zero alternates\");for(var ee=0;ee<K;ee+=1)oe(L[ee]);return a(function(ue,de){for(var ve,ge=0;ge<L.length;ge+=1)if((ve=G(L[ge]._(ue,de),ve)).status)return ve;return ve})}function en(L,K){return gn(L,K).or(xn([]))}function gn(L,K){return oe(L),oe(K),Tt(L,K.then(L).many(),function(ee,ue){return[ee].concat(ue)})}function yn(L){be(L);var K=\"'\"+L+\"'\";return a(function(ee,ue){var de=ue+L.length,ve=ee.slice(ue,de);return ve===L?P(de,ve):B(ue,K)})}function vn(L,K){(function(de){if(!(de instanceof RegExp))throw new Error(\"not a regexp: \"+de);for(var ve=vt(de),ge=0;ge<ve.length;ge++){var M=ve.charAt(ge);if(M!==\"i\"&&M!==\"m\"&&M!==\"u\"&&M!==\"s\")throw new Error('unsupported regexp flag \"'+M+'\": '+de)}})(L),arguments.length>=2?re(K):K=0;var ee=function(de){return RegExp(\"^(?:\"+de.source+\")\",vt(de))}(L),ue=\"\"+L;return a(function(de,ve){var ge=ee.exec(de.slice(ve));if(ge){if(0<=K&&K<=ge.length){var M=ge[0],H=ge[K];return P(ve+M.length,H)}return B(ve,\"valid match group (0 to \"+ge.length+\") in \"+ue)}return B(ve,ue)})}function xn(L){return a(function(K,ee){return P(ee,L)})}function jn(L){return a(function(K,ee){return B(ee,L)})}function sn(L){if(x(L))return a(function(K,ee){var ue=L._(K,ee);return ue.index=ee,ue.value=\"\",ue});if(typeof L==\"string\")return sn(yn(L));if(L instanceof RegExp)return sn(vn(L));throw new Error(\"not a string, regexp, or parser: \"+L)}function Rt(L){return oe(L),a(function(K,ee){var ue=L._(K,ee),de=K.slice(ee,ue.index);return ue.status?B(ee,'not \"'+de+'\"'):P(ee,null)})}function Vt(L){return ne(L),a(function(K,ee){var ue=te(K,ee);return ee<K.length&&L(ue)?P(ee+1,ue):B(ee,\"a character/byte matching \"+L)})}function Sr(L,K){arguments.length<2&&(K=L,L=void 0);var ee=a(function(ue,de){return ee._=K()._,ee._(ue,de)});return L?ee.desc(L):ee}function Rr(){return jn(\"fantasy-land/empty\")}o.parse=function(L){if(typeof L!=\"string\"&&!A(L))throw new Error(\".parse must be called with a string or Buffer as its argument\");var K,ee=this.skip(At)._(L,0);return K=ee.status?{status:!0,value:ee.value}:{status:!1,index:Q(L,ee.furthest),expected:ee.expected},delete J[L],K},o.tryParse=function(L){var K=this.parse(L);if(K.status)return K.value;var ee=jt(L,K),ue=new Error(ee);throw ue.type=\"ParsimmonError\",ue.result=K,ue},o.assert=function(L,K){return this.chain(function(ee){return L(ee)?xn(ee):jn(K)})},o.or=function(L){return Jt(this,L)},o.trim=function(L){return this.wrap(L,L)},o.wrap=function(L,K){return Tt(L,this,K,function(ee,ue){return ue})},o.thru=function(L){return L(this)},o.then=function(L){return oe(L),Wt(this,L).map(function(K){return K[1]})},o.many=function(){var L=this;return a(function(K,ee){for(var ue=[],de=void 0;;){if(!(de=G(L._(K,ee),de)).status)return G(P(ee,ue),de);if(ee===de.index)throw new Error(\"infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause\");ee=de.index,ue.push(de.value)}})},o.tieWith=function(L){return be(L),this.map(function(K){if(function(de){if(!O(de))throw new Error(\"not an array: \"+de)}(K),K.length){be(K[0]);for(var ee=K[0],ue=1;ue<K.length;ue++)be(K[ue]),ee+=L+K[ue];return ee}return\"\"})},o.tie=function(){return this.tieWith(\"\")},o.times=function(L,K){var ee=this;return arguments.length<2&&(K=L),re(L),re(K),a(function(ue,de){for(var ve=[],ge=void 0,M=void 0,H=0;H<L;H+=1){if(M=G(ge=ee._(ue,de),M),!ge.status)return M;de=ge.index,ve.push(ge.value)}for(;H<K&&(M=G(ge=ee._(ue,de),M),ge.status);H+=1)de=ge.index,ve.push(ge.value);return G(P(de,ve),M)})},o.result=function(L){return this.map(function(){return L})},o.atMost=function(L){return this.times(0,L)},o.atLeast=function(L){return Tt(this.times(L),this.many(),function(K,ee){return K.concat(ee)})},o.map=function(L){ne(L);var K=this;return a(function(ee,ue){var de=K._(ee,ue);return de.status?G(P(de.index,L(de.value)),de):de})},o.contramap=function(L){ne(L);var K=this;return a(function(ee,ue){var de=K.parse(L(ee.slice(ue)));return de.status?P(ue+ee.length,de.value):de})},o.promap=function(L,K){return ne(L),ne(K),this.contramap(L).map(K)},o.skip=function(L){return Wt(this,L).map(function(K){return K[0]})},o.mark=function(){return Tt(Bt,this,Bt,function(L,K,ee){return{start:L,value:K,end:ee}})},o.node=function(L){return Tt(Bt,this,Bt,function(K,ee,ue){return{name:L,value:ee,start:K,end:ue}})},o.sepBy=function(L){return en(this,L)},o.sepBy1=function(L){return gn(this,L)},o.lookahead=function(L){return this.skip(sn(L))},o.notFollowedBy=function(L){return this.skip(Rt(L))},o.desc=function(L){O(L)||(L=[L]);var K=this;return a(function(ee,ue){var de=K._(ee,ue);return de.status||(de.expected=L),de})},o.fallback=function(L){return this.or(xn(L))},o.ap=function(L){return Tt(L,this,function(K,ee){return K(ee)})},o.chain=function(L){var K=this;return a(function(ee,ue){var de=K._(ee,ue);return de.status?G(L(de.value)._(ee,de.index),de):de})},o.concat=o.or,o.empty=Rr,o.of=xn,o[\"fantasy-land/ap\"]=o.ap,o[\"fantasy-land/chain\"]=o.chain,o[\"fantasy-land/concat\"]=o.concat,o[\"fantasy-land/empty\"]=o.empty,o[\"fantasy-land/of\"]=o.of,o[\"fantasy-land/map\"]=o.map;var Bt=a(function(L,K){return P(K,Q(L,K))}),Hr=a(function(L,K){return K>=L.length?B(K,\"any character/byte\"):P(K+1,te(L,K))}),rn=a(function(L,K){return P(L.length,L.slice(K))}),At=a(function(L,K){return K<L.length?B(K,\"EOF\"):P(K,null)}),Z=vn(/[0-9]/).desc(\"a digit\"),me=vn(/[0-9]*/).desc(\"optional digits\"),Ie=vn(/[a-z]/i).desc(\"a letter\"),at=vn(/[a-z]*/i).desc(\"optional letters\"),Dt=vn(/\\s*/).desc(\"optional whitespace\"),Cn=vn(/\\s+/).desc(\"whitespace\"),_n=yn(\"\\r\"),Ht=yn(`\n`),ar=yn(`\\r\n`),ht=Jt(ar,Ht,_n).desc(\"newline\"),St=Jt(ht,At);a.all=rn,a.alt=Jt,a.any=Hr,a.cr=_n,a.createLanguage=function(L){var K={};for(var ee in L)({}).hasOwnProperty.call(L,ee)&&function(ue){K[ue]=Sr(function(){return L[ue](K)})}(ee);return K},a.crlf=ar,a.custom=function(L){return a(L(P,B))},a.digit=Z,a.digits=me,a.empty=Rr,a.end=St,a.eof=At,a.fail=jn,a.formatError=jt,a.index=Bt,a.isParser=x,a.lazy=Sr,a.letter=Ie,a.letters=at,a.lf=Ht,a.lookahead=sn,a.makeFailure=B,a.makeSuccess=P,a.newline=ht,a.noneOf=function(L){return Vt(function(K){return L.indexOf(K)<0}).desc(\"none of '\"+L+\"'\")},a.notFollowedBy=Rt,a.of=xn,a.oneOf=function(L){for(var K=L.split(\"\"),ee=0;ee<K.length;ee++)K[ee]=\"'\"+K[ee]+\"'\";return Vt(function(ue){return L.indexOf(ue)>=0}).desc(K)},a.optWhitespace=Dt,a.Parser=a,a.range=function(L,K){return Vt(function(ee){return L<=ee&&ee<=K}).desc(L+\"-\"+K)},a.regex=vn,a.regexp=vn,a.sepBy=en,a.sepBy1=gn,a.seq=Wt,a.seqMap=Tt,a.seqObj=function(){for(var L,K={},ee=0,ue=(L=arguments,Array.prototype.slice.call(L)),de=ue.length,ve=0;ve<de;ve+=1){var ge=ue[ve];if(!x(ge)){if(O(ge)&&ge.length===2&&typeof ge[0]==\"string\"&&x(ge[1])){var M=ge[0];if(Object.prototype.hasOwnProperty.call(K,M))throw new Error(\"seqObj: duplicate key \"+M);K[M]=!0,ee++;continue}throw new Error(\"seqObj arguments must be parsers or [string, parser] array pairs.\")}}if(ee===0)throw new Error(\"seqObj expects at least one named parser, found zero\");return a(function(H,q){for(var ie,ye={},ce=0;ce<de;ce+=1){var ae,Se;if(O(ue[ce])?(ae=ue[ce][0],Se=ue[ce][1]):(ae=null,Se=ue[ce]),!(ie=G(Se._(H,q),ie)).status)return ie;ae&&(ye[ae]=ie.value),q=ie.index}return G(P(q,ye),ie)})},a.string=yn,a.succeed=xn,a.takeWhile=function(L){return ne(L),a(function(K,ee){for(var ue=ee;ue<K.length&&L(te(K,ue));)ue++;return P(ue,K.slice(ee,ue))})},a.test=Vt,a.whitespace=Cn,a[\"fantasy-land/empty\"]=Rr,a[\"fantasy-land/of\"]=xn,a.Binary={bitSeq:h,bitSeqObj:function(L){m();var K={},ee=0,ue=l(function(ve){if(O(ve)){var ge=ve;if(ge.length!==2)throw new Error(\"[\"+ge.join(\", \")+\"] should be length 2, got length \"+ge.length);if(be(ge[0]),re(ge[1]),Object.prototype.hasOwnProperty.call(K,ge[0]))throw new Error(\"duplicate key in bitSeqObj: \"+ge[0]);return K[ge[0]]=!0,ee++,ge}return re(ve),[null,ve]},L);if(ee<1)throw new Error(\"bitSeqObj expects at least one named pair, got [\"+L.join(\", \")+\"]\");var de=l(function(ve){return ve[0]},ue);return h(l(function(ve){return ve[1]},ue)).map(function(ve){return u(function(ge,M){return M[0]!==null&&(ge[M[0]]=M[1]),ge},{},l(function(ge,M){return[ge,ve[M]]},de))})},byte:function(L){if(m(),re(L),L>255)throw new Error(\"Value specified to byte constructor (\"+L+\"=0x\"+L.toString(16)+\") is larger in value than a single byte.\");var K=(L>15?\"0x\":\"0x0\")+L.toString(16);return a(function(ee,ue){var de=te(ee,ue);return de===L?P(ue+1,de):B(ue,K)})},buffer:function(L){return g(\"buffer\",L).map(function(K){return Buffer.from(K)})},encodedString:function(L,K){return g(\"string\",K).map(function(ee){return ee.toString(L)})},uintBE:v,uint8BE:v(1),uint16BE:v(2),uint32BE:v(4),uintLE:D,uint8LE:D(1),uint16LE:D(2),uint32LE:D(4),intBE:I,int8BE:I(1),int16BE:I(2),int32BE:I(4),intLE:C,int8LE:C(1),int16LE:C(2),int32LE:C(4),floatBE:g(\"floatBE\",4).map(function(L){return L.readFloatBE(0)}),floatLE:g(\"floatLE\",4).map(function(L){return L.readFloatLE(0)}),doubleBE:g(\"doubleBE\",8).map(function(L){return L.readDoubleBE(0)}),doubleLE:g(\"doubleLE\",8).map(function(L){return L.readDoubleLE(0)})},r.exports=a}])})})(kc,kc.exports);var W=kc.exports,Bm=()=>/[#*0-9]\\uFE0F?\\u20E3|[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23ED-\\u23EF\\u23F1\\u23F2\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB\\u25FC\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692\\u2694-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A7\\u26AA\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C8\\u26CF\\u26D1\\u26D3\\u26E9\\u26F0-\\u26F5\\u26F7\\u26F8\\u26FA\\u2702\\u2708\\u2709\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2733\\u2734\\u2744\\u2747\\u2757\\u2763\\u27A1\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B55\\u3030\\u303D\\u3297\\u3299]\\uFE0F?|[\\u261D\\u270C\\u270D](?:\\uFE0F|\\uD83C[\\uDFFB-\\uDFFF])?|[\\u270A\\u270B](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u2693\\u26A1\\u26AB\\u26C5\\u26CE\\u26D4\\u26EA\\u26FD\\u2705\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2795-\\u2797\\u27B0\\u27BF\\u2B50]|\\u26F9(?:\\uFE0F|\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|\\u2764\\uFE0F?(?:\\u200D(?:\\uD83D\\uDD25|\\uD83E\\uDE79))?|\\uD83C(?:[\\uDC04\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDE02\\uDE37\\uDF21\\uDF24-\\uDF2C\\uDF36\\uDF7D\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E\\uDF9F\\uDFCD\\uDFCE\\uDFD4-\\uDFDF\\uDFF5\\uDFF7]\\uFE0F?|[\\uDF85\\uDFC2\\uDFC7](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\uDFC3\\uDFC4\\uDFCA](?:\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|[\\uDFCB\\uDFCC](?:\\uFE0F|\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|[\\uDCCF\\uDD8E\\uDD91-\\uDD9A\\uDE01\\uDE1A\\uDE2F\\uDE32-\\uDE36\\uDE38-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF20\\uDF2D-\\uDF35\\uDF37-\\uDF7C\\uDF7E-\\uDF84\\uDF86-\\uDF93\\uDFA0-\\uDFC1\\uDFC5\\uDFC6\\uDFC8\\uDFC9\\uDFCF-\\uDFD3\\uDFE0-\\uDFF0\\uDFF8-\\uDFFF]|\\uDDE6\\uD83C[\\uDDE8-\\uDDEC\\uDDEE\\uDDF1\\uDDF2\\uDDF4\\uDDF6-\\uDDFA\\uDDFC\\uDDFD\\uDDFF]|\\uDDE7\\uD83C[\\uDDE6\\uDDE7\\uDDE9-\\uDDEF\\uDDF1-\\uDDF4\\uDDF6-\\uDDF9\\uDDFB\\uDDFC\\uDDFE\\uDDFF]|\\uDDE8\\uD83C[\\uDDE6\\uDDE8\\uDDE9\\uDDEB-\\uDDEE\\uDDF0-\\uDDF5\\uDDF7\\uDDFA-\\uDDFF]|\\uDDE9\\uD83C[\\uDDEA\\uDDEC\\uDDEF\\uDDF0\\uDDF2\\uDDF4\\uDDFF]|\\uDDEA\\uD83C[\\uDDE6\\uDDE8\\uDDEA\\uDDEC\\uDDED\\uDDF7-\\uDDFA]|\\uDDEB\\uD83C[\\uDDEE-\\uDDF0\\uDDF2\\uDDF4\\uDDF7]|\\uDDEC\\uD83C[\\uDDE6\\uDDE7\\uDDE9-\\uDDEE\\uDDF1-\\uDDF3\\uDDF5-\\uDDFA\\uDDFC\\uDDFE]|\\uDDED\\uD83C[\\uDDF0\\uDDF2\\uDDF3\\uDDF7\\uDDF9\\uDDFA]|\\uDDEE\\uD83C[\\uDDE8-\\uDDEA\\uDDF1-\\uDDF4\\uDDF6-\\uDDF9]|\\uDDEF\\uD83C[\\uDDEA\\uDDF2\\uDDF4\\uDDF5]|\\uDDF0\\uD83C[\\uDDEA\\uDDEC-\\uDDEE\\uDDF2\\uDDF3\\uDDF5\\uDDF7\\uDDFC\\uDDFE\\uDDFF]|\\uDDF1\\uD83C[\\uDDE6-\\uDDE8\\uDDEE\\uDDF0\\uDDF7-\\uDDFB\\uDDFE]|\\uDDF2\\uD83C[\\uDDE6\\uDDE8-\\uDDED\\uDDF0-\\uDDFF]|\\uDDF3\\uD83C[\\uDDE6\\uDDE8\\uDDEA-\\uDDEC\\uDDEE\\uDDF1\\uDDF4\\uDDF5\\uDDF7\\uDDFA\\uDDFF]|\\uDDF4\\uD83C\\uDDF2|\\uDDF5\\uD83C[\\uDDE6\\uDDEA-\\uDDED\\uDDF0-\\uDDF3\\uDDF7-\\uDDF9\\uDDFC\\uDDFE]|\\uDDF6\\uD83C\\uDDE6|\\uDDF7\\uD83C[\\uDDEA\\uDDF4\\uDDF8\\uDDFA\\uDDFC]|\\uDDF8\\uD83C[\\uDDE6-\\uDDEA\\uDDEC-\\uDDF4\\uDDF7-\\uDDF9\\uDDFB\\uDDFD-\\uDDFF]|\\uDDF9\\uD83C[\\uDDE6\\uDDE8\\uDDE9\\uDDEB-\\uDDED\\uDDEF-\\uDDF4\\uDDF7\\uDDF9\\uDDFB\\uDDFC\\uDDFF]|\\uDDFA\\uD83C[\\uDDE6\\uDDEC\\uDDF2\\uDDF3\\uDDF8\\uDDFE\\uDDFF]|\\uDDFB\\uD83C[\\uDDE6\\uDDE8\\uDDEA\\uDDEC\\uDDEE\\uDDF3\\uDDFA]|\\uDDFC\\uD83C[\\uDDEB\\uDDF8]|\\uDDFD\\uD83C\\uDDF0|\\uDDFE\\uD83C[\\uDDEA\\uDDF9]|\\uDDFF\\uD83C[\\uDDE6\\uDDF2\\uDDFC]|\\uDFF3\\uFE0F?(?:\\u200D(?:\\u26A7\\uFE0F?|\\uD83C\\uDF08))?|\\uDFF4(?:\\u200D\\u2620\\uFE0F?|\\uDB40\\uDC67\\uDB40\\uDC62\\uDB40(?:\\uDC65\\uDB40\\uDC6E\\uDB40\\uDC67|\\uDC73\\uDB40\\uDC63\\uDB40\\uDC74|\\uDC77\\uDB40\\uDC6C\\uDB40\\uDC73)\\uDB40\\uDC7F)?)|\\uD83D(?:[\\uDC08\\uDC26](?:\\u200D\\u2B1B)?|[\\uDC3F\\uDCFD\\uDD49\\uDD4A\\uDD6F\\uDD70\\uDD73\\uDD76-\\uDD79\\uDD87\\uDD8A-\\uDD8D\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA\\uDECB\\uDECD-\\uDECF\\uDEE0-\\uDEE5\\uDEE9\\uDEF0\\uDEF3]\\uFE0F?|[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66\\uDC67\\uDC6B-\\uDC6D\\uDC72\\uDC74-\\uDC76\\uDC78\\uDC7C\\uDC83\\uDC85\\uDC8F\\uDC91\\uDCAA\\uDD7A\\uDD95\\uDD96\\uDE4C\\uDE4F\\uDEC0\\uDECC](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\uDC6E\\uDC70\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6](?:\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|[\\uDD74\\uDD90](?:\\uFE0F|\\uD83C[\\uDFFB-\\uDFFF])?|[\\uDC00-\\uDC07\\uDC09-\\uDC14\\uDC16-\\uDC25\\uDC27-\\uDC3A\\uDC3C-\\uDC3E\\uDC40\\uDC44\\uDC45\\uDC51-\\uDC65\\uDC6A\\uDC79-\\uDC7B\\uDC7D-\\uDC80\\uDC84\\uDC88-\\uDC8E\\uDC90\\uDC92-\\uDCA9\\uDCAB-\\uDCFC\\uDCFF-\\uDD3D\\uDD4B-\\uDD4E\\uDD50-\\uDD67\\uDDA4\\uDDFB-\\uDE2D\\uDE2F-\\uDE34\\uDE37-\\uDE44\\uDE48-\\uDE4A\\uDE80-\\uDEA2\\uDEA4-\\uDEB3\\uDEB7-\\uDEBF\\uDEC1-\\uDEC5\\uDED0-\\uDED2\\uDED5-\\uDED7\\uDEDC-\\uDEDF\\uDEEB\\uDEEC\\uDEF4-\\uDEFC\\uDFE0-\\uDFEB\\uDFF0]|\\uDC15(?:\\u200D\\uD83E\\uDDBA)?|\\uDC3B(?:\\u200D\\u2744\\uFE0F?)?|\\uDC41\\uFE0F?(?:\\u200D\\uD83D\\uDDE8\\uFE0F?)?|\\uDC68(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDC68\\uDC69]\\u200D\\uD83D(?:\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFC-\\uDFFF])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFE])))?))?|\\uDC69(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?[\\uDC68\\uDC69]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?|\\uDC69\\u200D\\uD83D(?:\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?))|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFC-\\uDFFF])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB-\\uDFFE])))?))?|\\uDC6F(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|\\uDD75(?:\\uFE0F|\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|\\uDE2E(?:\\u200D\\uD83D\\uDCA8)?|\\uDE35(?:\\u200D\\uD83D\\uDCAB)?|\\uDE36(?:\\u200D\\uD83C\\uDF2B\\uFE0F?)?)|\\uD83E(?:[\\uDD0C\\uDD0F\\uDD18-\\uDD1F\\uDD30-\\uDD34\\uDD36\\uDD77\\uDDB5\\uDDB6\\uDDBB\\uDDD2\\uDDD3\\uDDD5\\uDEC3-\\uDEC5\\uDEF0\\uDEF2-\\uDEF8](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\uDD26\\uDD35\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD4\\uDDD6-\\uDDDD](?:\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|[\\uDDDE\\uDDDF](?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|[\\uDD0D\\uDD0E\\uDD10-\\uDD17\\uDD20-\\uDD25\\uDD27-\\uDD2F\\uDD3A\\uDD3F-\\uDD45\\uDD47-\\uDD76\\uDD78-\\uDDB4\\uDDB7\\uDDBA\\uDDBC-\\uDDCC\\uDDD0\\uDDE0-\\uDDFF\\uDE70-\\uDE7C\\uDE80-\\uDE88\\uDE90-\\uDEBD\\uDEBF-\\uDEC2\\uDECE-\\uDEDB\\uDEE0-\\uDEE8]|\\uDD3C(?:\\u200D[\\u2640\\u2642]\\uFE0F?|\\uD83C[\\uDFFB-\\uDFFF])?|\\uDDD1(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83E\\uDDD1))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFC-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFB\\uDFFD-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFD\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFE]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF])))?))?|\\uDEF1(?:\\uD83C(?:\\uDFFB(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFC-\\uDFFF])?|\\uDFFC(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])?|\\uDFFD(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])?|\\uDFFE(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])?|\\uDFFF(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB-\\uDFFE])?))?)/g;function NS(e){return e==null?e:e.shiftToAll().normalize()}function O0(e){return e.includes(\"/\")&&(e=e.substring(e.lastIndexOf(\"/\")+1)),e.endsWith(\".md\")&&(e=e.substring(0,e.length-3)),e}W.alt(W.regex(new RegExp(Bm(),\"\")),W.regex(/[0-9\\p{Letter}_-]+/u).map(e=>e.toLocaleLowerCase()),W.whitespace.map(e=>\"-\"),W.any.map(e=>\"\")).many().map(e=>e.join(\"\"));var VP=W.alt(W.regex(new RegExp(Bm(),\"\")),W.regex(/[0-9\\p{Letter}_-]+/u),W.whitespace.map(e=>\" \"),W.any.map(e=>\" \")).many().map(e=>e.join(\"\").split(/\\s+/).join(\" \").trim());function $P(e){return VP.tryParse(e)}function UP(e){return e=NS(e),e=He.fromObject(Object.fromEntries(Object.entries(e.toObject()).filter(([,t])=>t!=0))),e.toHuman()}var Ml;(function(e){function t(x,O=Hm,A=!1){let P=r(x);if(!P)return O.renderNullAs;switch(P.type){case\"null\":return O.renderNullAs;case\"string\":return P.value;case\"number\":case\"boolean\":return\"\"+P.value;case\"html\":return P.value.outerHTML;case\"widget\":return P.value.markdown();case\"link\":return P.value.markdown();case\"function\":return\"<function>\";case\"array\":let B=\"\";return A&&(B+=\"[\"),B+=P.value.map(G=>t(G,O,!0)).join(\", \"),A&&(B+=\"]\"),B;case\"object\":return\"{ \"+Object.entries(P.value).map(G=>G[0]+\": \"+t(G[1],O,!0)).join(\", \")+\" }\";case\"date\":return P.value.second==0&&P.value.hour==0&&P.value.minute==0?P.value.toFormat(O.defaultDateFormat):P.value.toFormat(O.defaultDateTimeFormat);case\"duration\":return UP(P.value)}}e.toString=t;function r(x){return m(x)?{type:\"null\",value:x}:l(x)?{type:\"number\",value:x}:u(x)?{type:\"string\",value:x}:g(x)?{type:\"boolean\",value:x}:d(x)?{type:\"duration\",value:x}:c(x)?{type:\"date\",value:x}:v(x)?{type:\"widget\",value:x}:h(x)?{type:\"array\",value:x}:y(x)?{type:\"link\",value:x}:C(x)?{type:\"function\",value:x}:D(x)?{type:\"html\",value:x}:I(x)?{type:\"object\",value:x}:void 0}e.wrapValue=r;function n(x,O){if(I(x)){let A={};for(let[P,B]of Object.entries(x))A[P]=n(B,O);return A}else if(h(x)){let A=[];for(let P of x)A.push(n(P,O));return A}else return O(x)}e.mapLeaves=n;function i(x,O,A){var G,J;if(x===void 0&&(x=null),O===void 0&&(O=null),x===null&&O===null)return 0;if(x===null)return-1;if(O===null)return 1;let P=r(x),B=r(O);if(P===void 0&&B===void 0)return 0;if(P===void 0)return-1;if(B===void 0)return 1;if(P.type!=B.type)return P.type.localeCompare(B.type);if(P.value===B.value)return 0;switch(P.type){case\"string\":return P.value.localeCompare(B.value);case\"number\":return P.value<B.value?-1:P.value==B.value?0:1;case\"null\":return 0;case\"boolean\":return P.value==B.value?0:P.value?1:-1;case\"link\":let Q=P.value,oe=B.value,te=A!=null?A:N=>N,re=te(Q.path).localeCompare(te(oe.path));if(re!=0)return re;let ne=Q.type.localeCompare(oe.type);return ne!=0?ne:Q.subpath&&!oe.subpath?1:!Q.subpath&&oe.subpath?-1:!Q.subpath&&!oe.subpath?0:((G=Q.subpath)!=null?G:\"\").localeCompare((J=oe.subpath)!=null?J:\"\");case\"date\":return P.value<B.value?-1:P.value.equals(B.value)?0:1;case\"duration\":return P.value<B.value?-1:P.value.equals(B.value)?0:1;case\"array\":let be=P.value,pe=B.value;for(let N=0;N<Math.min(be.length,pe.length);N++){let Ze=i(be[N],pe[N]);if(Ze!=0)return Ze}return be.length-pe.length;case\"object\":let De=P.value,Ce=B.value,U=Array.from(Object.keys(De)),Je=Array.from(Object.keys(Ce));U.sort(),Je.sort();let it=i(U,Je);if(it!=0)return it;for(let N of U){let Ze=i(De[N],Ce[N]);if(Ze!=0)return Ze}return 0;case\"widget\":case\"html\":case\"function\":return 0}}e.compareValue=i;function a(x){var O;return(O=r(x))==null?void 0:O.type}e.typeOf=a;function o(x){let O=r(x);if(!O)return!1;switch(O.type){case\"number\":return O.value!=0;case\"string\":return O.value.length>0;case\"boolean\":return O.value;case\"link\":return!!O.value.path;case\"date\":return O.value.toMillis()!=0;case\"duration\":return O.value.as(\"seconds\")!=0;case\"object\":return Object.keys(O.value).length>0;case\"array\":return O.value.length>0;case\"null\":return!1;case\"html\":case\"widget\":case\"function\":return!0}}e.isTruthy=o;function s(x){if(x==null)return x;if(e.isArray(x))return[].concat(x.map(O=>s(O)));if(e.isObject(x)){let O={};for(let[A,P]of Object.entries(x))O[A]=s(P);return O}else return x}e.deepCopy=s;function u(x){return typeof x==\"string\"}e.isString=u;function l(x){return typeof x==\"number\"}e.isNumber=l;function c(x){return x instanceof mt}e.isDate=c;function d(x){return x instanceof He}e.isDuration=d;function m(x){return x==null}e.isNull=m;function h(x){return Array.isArray(x)}e.isArray=h;function g(x){return typeof x==\"boolean\"}e.isBoolean=g;function y(x){return x instanceof xc}e.isLink=y;function v(x){return x instanceof Tl}e.isWidget=v;function D(x){return typeof HTMLElement!=\"undefined\"?x instanceof HTMLElement:!1}e.isHtml=D;function I(x){return typeof x==\"object\"&&!D(x)&&!v(x)&&!h(x)&&!d(x)&&!c(x)&&!y(x)&&x!==void 0&&!m(x)}e.isObject=I;function C(x){return typeof x==\"function\"}e.isFunction=C})(Ml||(Ml={}));var L0;(function(e){function t(i){return Ml.isObject(i)&&Object.keys(i).length==2&&\"key\"in i&&\"rows\"in i}e.isElementGroup=t;function r(i){for(let a of i)if(!t(a))return!1;return!0}e.isGrouping=r;function n(i){if(r(i)){let a=0;for(let o of i)a+=n(o.rows);return a}else return i.length}e.count=n})(L0||(L0={}));var xc=class e{constructor(t){ur(this,\"path\");ur(this,\"display\");ur(this,\"subpath\");ur(this,\"embed\");ur(this,\"type\");Object.assign(this,t)}static file(t,r=!1,n){return new e({path:t,embed:r,display:n,subpath:void 0,type:\"file\"})}static infer(t,r=!1,n){if(t.includes(\"#^\")){let i=t.split(\"#^\");return e.block(i[0],i[1],r,n)}else if(t.includes(\"#\")){let i=t.split(\"#\");return e.header(i[0],i[1],r,n)}else return e.file(t,r,n)}static header(t,r,n,i){return new e({path:t,embed:n,display:i,subpath:$P(r),type:\"header\"})}static block(t,r,n,i){return new e({path:t,embed:n,display:i,subpath:r,type:\"block\"})}static fromObject(t){return new e(t)}equals(t){return t==null||t==null?!1:this.path==t.path&&this.type==t.type&&this.subpath==t.subpath}toString(){return this.markdown()}toObject(){return{path:this.path,type:this.type,subpath:this.subpath,display:this.display,embed:this.embed}}withPath(t){return new e(Object.assign({},this,{path:t}))}withDisplay(t){return new e(Object.assign({},this,{display:t}))}withHeader(t){return e.header(this.path,t,this.embed,this.display)}toFile(){return e.file(this.path,this.embed,this.display)}toEmbed(){if(this.embed)return this;{let t=new e(this);return t.embed=!0,t}}fromEmbed(){if(this.embed){let t=new e(this);return t.embed=!1,t}else return this}markdown(){let t=(this.embed?\"!\":\"\")+\"[[\"+this.obsidianLink();return this.display?t+=\"|\"+this.display:(t+=\"|\"+O0(this.path),(this.type==\"header\"||this.type==\"block\")&&(t+=\" > \"+this.subpath)),t+=\"]]\",t}obsidianLink(){var r,n;let t=this.path.replaceAll(\"|\",\"\\\\|\");return this.type==\"header\"?t+\"#\"+((r=this.subpath)==null?void 0:r.replaceAll(\"|\",\"\\\\|\")):this.type==\"block\"?t+\"#^\"+((n=this.subpath)==null?void 0:n.replaceAll(\"|\",\"\\\\|\")):t}fileName(){return O0(this.path).replace(\".md\",\"\")}},Tl=class{constructor(t){ur(this,\"$widget\");this.$widget=t}},_m=class extends Tl{constructor(r,n){super(\"dataview:list-pair\");ur(this,\"key\");ur(this,\"value\");this.key=r,this.value=n}markdown(){return`${Ml.toString(this.key)}: ${Ml.toString(this.value)}`}},Mm=class extends Tl{constructor(r,n){super(\"dataview:external-link\");ur(this,\"url\");ur(this,\"display\");this.url=r,this.display=n}markdown(){var r;return`[${(r=this.display)!=null?r:this.url}](${this.url})`}},P0;(function(e){function t(o,s){return new _m(o,s)}e.listPair=t;function r(o,s){return new Mm(o,s)}e.externalLink=r;function n(o){return o.$widget===\"dataview:list-pair\"}e.isListPair=n;function i(o){return o.$widget===\"dataview:external-link\"}e.isExternalLink=i;function a(o){return n(o)||i(o)}e.isBuiltin=a})(P0||(P0={}));var fn;(function(e){function t(m){return{type:\"variable\",name:m}}e.variable=t;function r(m){return{type:\"literal\",value:m}}e.literal=r;function n(m,h,g){return{type:\"binaryop\",left:m,op:h,right:g}}e.binaryOp=n;function i(m,h){return{type:\"index\",object:m,index:h}}e.index=i;function a(m){let h=m.split(\".\"),g=e.variable(h[0]);for(let y=1;y<h.length;y++)g=e.index(g,e.literal(h[y]));return g}e.indexVariable=a;function o(m,h){return{type:\"lambda\",arguments:m,value:h}}e.lambda=o;function s(m,h){return{type:\"function\",func:m,arguments:h}}e.func=s;function u(m){return{type:\"list\",values:m}}e.list=u;function l(m){return{type:\"object\",values:m}}e.object=l;function c(m){return{type:\"negated\",child:m}}e.negate=c;function d(m){return m==\"<=\"||m==\"<\"||m==\">\"||m==\">=\"||m==\"!=\"||m==\"=\"}e.isCompareOp=d,e.NULL=e.literal(null)})(fn||(fn={}));var Si;(function(e){function t(c){return{type:\"tag\",tag:c}}e.tag=t;function r(c){return{type:\"csv\",path:c}}e.csv=r;function n(c){return{type:\"folder\",folder:c}}e.folder=n;function i(c,d){return{type:\"link\",file:c,direction:d?\"incoming\":\"outgoing\"}}e.link=i;function a(c,d,m){return{type:\"binaryop\",left:c,op:d,right:m}}e.binaryOp=a;function o(c,d){return{type:\"binaryop\",left:c,op:\"&\",right:d}}e.and=o;function s(c,d){return{type:\"binaryop\",left:c,op:\"|\",right:d}}e.or=s;function u(c){return{type:\"negate\",child:c}}e.negate=u;function l(){return{type:\"empty\"}}e.empty=l})(Si||(Si={}));var N0=new RegExp(Bm(),\"\"),Tm={year:He.fromObject({years:1}),years:He.fromObject({years:1}),yr:He.fromObject({years:1}),yrs:He.fromObject({years:1}),month:He.fromObject({months:1}),months:He.fromObject({months:1}),mo:He.fromObject({months:1}),mos:He.fromObject({months:1}),week:He.fromObject({weeks:1}),weeks:He.fromObject({weeks:1}),wk:He.fromObject({weeks:1}),wks:He.fromObject({weeks:1}),w:He.fromObject({weeks:1}),day:He.fromObject({days:1}),days:He.fromObject({days:1}),d:He.fromObject({days:1}),hour:He.fromObject({hours:1}),hours:He.fromObject({hours:1}),hr:He.fromObject({hours:1}),hrs:He.fromObject({hours:1}),h:He.fromObject({hours:1}),minute:He.fromObject({minutes:1}),minutes:He.fromObject({minutes:1}),min:He.fromObject({minutes:1}),mins:He.fromObject({minutes:1}),m:He.fromObject({minutes:1}),second:He.fromObject({seconds:1}),seconds:He.fromObject({seconds:1}),sec:He.fromObject({seconds:1}),secs:He.fromObject({seconds:1}),s:He.fromObject({seconds:1})},Fm={now:()=>mt.local(),today:()=>mt.local().startOf(\"day\"),yesterday:()=>mt.local().startOf(\"day\").minus(He.fromObject({days:1})),tomorrow:()=>mt.local().startOf(\"day\").plus(He.fromObject({days:1})),sow:()=>mt.local().startOf(\"week\"),\"start-of-week\":()=>mt.local().startOf(\"week\"),eow:()=>mt.local().endOf(\"week\"),\"end-of-week\":()=>mt.local().endOf(\"week\"),soy:()=>mt.local().startOf(\"year\"),\"start-of-year\":()=>mt.local().startOf(\"year\"),eoy:()=>mt.local().endOf(\"year\"),\"end-of-year\":()=>mt.local().endOf(\"year\"),som:()=>mt.local().startOf(\"month\"),\"start-of-month\":()=>mt.local().startOf(\"month\"),eom:()=>mt.local().endOf(\"month\"),\"end-of-month\":()=>mt.local().endOf(\"month\")},Im=[\"FROM\",\"WHERE\",\"LIMIT\",\"GROUP\",\"FLATTEN\"];function WP(e){let t=-1;for(;(t=e.indexOf(\"|\",t+1))>=0;)if(!(t>0&&e[t-1]==\"\\\\\"))return[e.substring(0,t).replace(/\\\\\\|/g,\"|\"),e.substring(t+1)];return[e.replace(/\\\\\\|/g,\"|\"),void 0]}function YP(e){let[t,r]=WP(e);return xc.infer(t,!1,r)}function kl(e,t,r){return W.seqMap(e,W.seq(W.optWhitespace,t,W.optWhitespace,e).many(),(n,i)=>{if(i.length==0)return n;let a=r(n,i[0][1],i[0][3]);for(let o=1;o<i.length;o++)a=r(a,i[o][1],i[o][3]);return a})}function zP(e,...t){return W.custom((r,n)=>(i,a)=>{let o=e._(i,a);if(!o.status)return o;for(let s of t){let u=s(o.value)._(i,o.index);if(!u.status)return o;o=u}return o})}var ai=W.createLanguage({number:e=>W.regexp(/-?[0-9]+(\\.[0-9]+)?/).map(t=>Number.parseFloat(t)).desc(\"number\"),string:e=>W.string('\"').then(W.alt(e.escapeCharacter,W.noneOf('\"\\\\')).atLeast(0).map(t=>t.join(\"\"))).skip(W.string('\"')).desc(\"string\"),escapeCharacter:e=>W.string(\"\\\\\").then(W.any).map(t=>t==='\"'?'\"':t===\"\\\\\"?\"\\\\\":\"\\\\\"+t),bool:e=>W.regexp(/true|false|True|False/).map(t=>t.toLowerCase()==\"true\").desc(\"boolean ('true' or 'false')\"),tag:e=>W.seqMap(W.string(\"#\"),W.alt(W.regexp(/[^\\u2000-\\u206F\\u2E00-\\u2E7F'!\"#$%&()*+,.:;<=>?@^`{|}~\\[\\]\\\\\\s]/).desc(\"text\")).many(),(t,r)=>t+r.join(\"\")).desc(\"tag ('#hello/stuff')\"),identifier:e=>W.seqMap(W.alt(W.regexp(/\\p{Letter}/u),W.regexp(N0).desc(\"text\")),W.alt(W.regexp(/[0-9\\p{Letter}_-]/u),W.regexp(N0).desc(\"text\")).many(),(t,r)=>t+r.join(\"\")).desc(\"variable identifier\"),link:e=>W.regexp(/\\[\\[([^\\[\\]]*?)\\]\\]/u,1).map(t=>YP(t)).desc(\"file link\"),embedLink:e=>W.seqMap(W.string(\"!\").atMost(1),e.link,(t,r)=>(t.length>0&&(r.embed=!0),r)).desc(\"file link\"),binaryPlusMinus:e=>W.regexp(/\\+|-/).map(t=>t).desc(\"'+' or '-'\"),binaryMulDiv:e=>W.regexp(/\\*|\\/|%/).map(t=>t).desc(\"'*' or '/' or '%'\"),binaryCompareOp:e=>W.regexp(/>=|<=|!=|>|<|=/).map(t=>t).desc(\"'>=' or '<=' or '!=' or '=' or '>' or '<'\"),binaryBooleanOp:e=>W.regexp(/and|or|&|\\|/i).map(t=>t.toLowerCase()==\"and\"?\"&\":t.toLowerCase()==\"or\"?\"|\":t).desc(\"'and' or 'or'\"),rootDate:e=>W.seqMap(W.regexp(/\\d{4}/),W.string(\"-\"),W.regexp(/\\d{2}/),(t,r,n)=>mt.fromObject({year:Number.parseInt(t),month:Number.parseInt(n)})).desc(\"date in format YYYY-MM[-DDTHH-MM-SS.MS]\"),dateShorthand:e=>W.alt(...Object.keys(Fm).sort((t,r)=>r.length-t.length).map(W.string)),date:e=>zP(e.rootDate,t=>W.seqMap(W.string(\"-\"),W.regexp(/\\d{2}/),(r,n)=>t.set({day:Number.parseInt(n)})),t=>W.seqMap(W.string(\"T\"),W.regexp(/\\d{2}/),(r,n)=>t.set({hour:Number.parseInt(n)})),t=>W.seqMap(W.string(\":\"),W.regexp(/\\d{2}/),(r,n)=>t.set({minute:Number.parseInt(n)})),t=>W.seqMap(W.string(\":\"),W.regexp(/\\d{2}/),(r,n)=>t.set({second:Number.parseInt(n)})),t=>W.alt(W.seqMap(W.string(\".\"),W.regexp(/\\d{3}/),(r,n)=>t.set({millisecond:Number.parseInt(n)})),W.succeed(t)),t=>W.alt(W.seqMap(W.string(\"+\").or(W.string(\"-\")),W.regexp(/\\d{1,2}(:\\d{2})?/),(r,n)=>t.setZone(\"UTC\"+r+n,{keepLocalTime:!0})),W.seqMap(W.string(\"Z\"),()=>t.setZone(\"utc\",{keepLocalTime:!0})),W.seqMap(W.string(\"[\"),W.regexp(/[0-9A-Za-z+-\\/]+/u),W.string(\"]\"),(r,n,i)=>t.setZone(n,{keepLocalTime:!0})))).assert(t=>t.isValid,\"valid date\").desc(\"date in format YYYY-MM[-DDTHH-MM-SS.MS]\"),datePlus:e=>W.alt(e.dateShorthand.map(t=>Fm[t]()),e.date).desc(\"date in format YYYY-MM[-DDTHH-MM-SS.MS] or in shorthand\"),durationType:e=>W.alt(...Object.keys(Tm).sort((t,r)=>r.length-t.length).map(W.string)),duration:e=>W.seqMap(e.number,W.optWhitespace,e.durationType,(t,r,n)=>Tm[n].mapUnits(i=>i*t)).sepBy1(W.string(\",\").trim(W.optWhitespace).or(W.optWhitespace)).map(t=>t.reduce((r,n)=>r.plus(n))).desc(\"duration like 4hr2min\"),rawNull:e=>W.string(\"null\"),tagSource:e=>e.tag.map(t=>Si.tag(t)),csvSource:e=>W.seqMap(W.string(\"csv(\").skip(W.optWhitespace),e.string,W.string(\")\"),(t,r,n)=>Si.csv(r)),linkIncomingSource:e=>e.link.map(t=>Si.link(t.path,!0)),linkOutgoingSource:e=>W.seqMap(W.string(\"outgoing(\").skip(W.optWhitespace),e.link,W.string(\")\"),(t,r,n)=>Si.link(r.path,!1)),folderSource:e=>e.string.map(t=>Si.folder(t)),parensSource:e=>W.seqMap(W.string(\"(\"),W.optWhitespace,e.source,W.optWhitespace,W.string(\")\"),(t,r,n,i,a)=>n),negateSource:e=>W.seqMap(W.alt(W.string(\"-\"),W.string(\"!\")),e.atomSource,(t,r)=>Si.negate(r)),atomSource:e=>W.alt(e.parensSource,e.negateSource,e.linkOutgoingSource,e.linkIncomingSource,e.folderSource,e.tagSource,e.csvSource),binaryOpSource:e=>kl(e.atomSource,e.binaryBooleanOp.map(t=>t),Si.binaryOp),source:e=>e.binaryOpSource,variableField:e=>e.identifier.chain(t=>Im.includes(t.toUpperCase())?W.fail(\"Variable fields cannot be a keyword (\"+Im.join(\" or \")+\")\"):W.succeed(fn.variable(t))).desc(\"variable\"),numberField:e=>e.number.map(t=>fn.literal(t)).desc(\"number\"),stringField:e=>e.string.map(t=>fn.literal(t)).desc(\"string\"),boolField:e=>e.bool.map(t=>fn.literal(t)).desc(\"boolean\"),dateField:e=>W.seqMap(W.string(\"date(\"),W.optWhitespace,e.datePlus,W.optWhitespace,W.string(\")\"),(t,r,n,i,a)=>fn.literal(n)).desc(\"date\"),durationField:e=>W.seqMap(W.string(\"dur(\"),W.optWhitespace,e.duration,W.optWhitespace,W.string(\")\"),(t,r,n,i,a)=>fn.literal(n)).desc(\"duration\"),nullField:e=>e.rawNull.map(t=>fn.NULL),linkField:e=>e.link.map(t=>fn.literal(t)),listField:e=>e.field.sepBy(W.string(\",\").trim(W.optWhitespace)).wrap(W.string(\"[\").skip(W.optWhitespace),W.optWhitespace.then(W.string(\"]\"))).map(t=>fn.list(t)).desc(\"list ('[1, 2, 3]')\"),objectField:e=>W.seqMap(e.identifier.or(e.string),W.string(\":\").trim(W.optWhitespace),e.field,(t,r,n)=>({name:t,value:n})).sepBy(W.string(\",\").trim(W.optWhitespace)).wrap(W.string(\"{\").skip(W.optWhitespace),W.optWhitespace.then(W.string(\"}\"))).map(t=>{let r={};for(let n of t)r[n.name]=n.value;return fn.object(r)}).desc(\"object ('{ a: 1, b: 2 }')\"),atomInlineField:e=>W.alt(e.date,e.duration.map(t=>NS(t)),e.string,e.tag,e.embedLink,e.bool,e.number,e.rawNull),inlineFieldList:e=>e.atomInlineField.sepBy(W.string(\",\").trim(W.optWhitespace).lookahead(e.atomInlineField)),inlineField:e=>W.alt(W.seqMap(e.atomInlineField,W.string(\",\").trim(W.optWhitespace),e.inlineFieldList,(t,r,n)=>[t].concat(n)),e.atomInlineField),atomField:e=>W.alt(e.embedLink.map(t=>fn.literal(t)),e.negatedField,e.linkField,e.listField,e.objectField,e.lambdaField,e.parensField,e.boolField,e.numberField,e.stringField,e.dateField,e.durationField,e.nullField,e.variableField),indexField:e=>W.seqMap(e.atomField,W.alt(e.dotPostfix,e.indexPostfix,e.functionPostfix).many(),(t,r)=>{let n=t;for(let i of r)switch(i.type){case\"dot\":n=fn.index(n,fn.literal(i.field));break;case\"index\":n=fn.index(n,i.field);break;case\"function\":n=fn.func(n,i.fields);break}return n}),negatedField:e=>W.seqMap(W.string(\"!\"),e.indexField,(t,r)=>fn.negate(r)).desc(\"negated field\"),parensField:e=>W.seqMap(W.string(\"(\"),W.optWhitespace,e.field,W.optWhitespace,W.string(\")\"),(t,r,n,i,a)=>n),lambdaField:e=>W.seqMap(e.identifier.sepBy(W.string(\",\").trim(W.optWhitespace)).wrap(W.string(\"(\").trim(W.optWhitespace),W.string(\")\").trim(W.optWhitespace)),W.string(\"=>\").trim(W.optWhitespace),e.field,(t,r,n)=>({type:\"lambda\",arguments:t,value:n})),dotPostfix:e=>W.seqMap(W.string(\".\"),e.identifier,(t,r)=>({type:\"dot\",field:r})),indexPostfix:e=>W.seqMap(W.string(\"[\"),W.optWhitespace,e.field,W.optWhitespace,W.string(\"]\"),(t,r,n,i,a)=>({type:\"index\",field:n})),functionPostfix:e=>W.seqMap(W.string(\"(\"),W.optWhitespace,e.field.sepBy(W.string(\",\").trim(W.optWhitespace)),W.optWhitespace,W.string(\")\"),(t,r,n,i,a)=>({type:\"function\",fields:n})),binaryMulDivField:e=>kl(e.indexField,e.binaryMulDiv,fn.binaryOp),binaryPlusMinusField:e=>kl(e.binaryMulDivField,e.binaryPlusMinus,fn.binaryOp),binaryCompareField:e=>kl(e.binaryPlusMinusField,e.binaryCompareOp,fn.binaryOp),binaryBooleanField:e=>kl(e.binaryCompareField,e.binaryBooleanOp,fn.binaryOp),binaryOpField:e=>e.binaryBooleanField,field:e=>e.binaryOpField});function KP(e){try{return Ec.success(ai.field.tryParse(e))}catch(t){return Ec.failure(\"\"+t)}}var Cc;(function(e){function t(n,i){return{name:n,field:i}}e.named=t;function r(n,i){return{field:n,direction:i}}e.sortBy=r})(Cc||(Cc={}));function jP(e){return W.custom((t,r)=>(n,i)=>{let a=e._(n,i);return a.status?Object.assign({},a,{value:[a.value,n.substring(i,a.index)]}):a})}function qP(e){return e.split(/[\\r\\n]+/).map(t=>t.trim()).join(\"\")}function R0(e,t){return W.eof.map(e).or(W.whitespace.then(t))}var RS=W.createLanguage({queryType:e=>W.alt(W.regexp(/TABLE|LIST|TASK|CALENDAR/i)).map(t=>t.toLowerCase()).desc(\"query type ('TABLE', 'LIST', 'TASK', or 'CALENDAR')\"),explicitNamedField:e=>W.seqMap(ai.field.skip(W.whitespace),W.regexp(/AS/i).skip(W.whitespace),ai.identifier.or(ai.string),(t,r,n)=>Cc.named(n,t)),comment:()=>W.Parser((e,t)=>{let r=e.substring(t);if(!r.startsWith(\"//\"))return W.makeFailure(t,\"Not a comment\");r=r.split(`\n`)[0];let n=r.substring(2).trim();return W.makeSuccess(t+r.length,n)}),namedField:e=>W.alt(e.explicitNamedField,jP(ai.field).map(([t,r])=>Cc.named(qP(r),t))),sortField:e=>W.seqMap(ai.field.skip(W.optWhitespace),W.regexp(/ASCENDING|DESCENDING|ASC|DESC/i).atMost(1),(t,r)=>{let n=r.length==0?\"ascending\":r[0].toLowerCase();return n==\"desc\"&&(n=\"descending\"),n==\"asc\"&&(n=\"ascending\"),{field:t,direction:n}}),headerClause:e=>e.queryType.chain(t=>{switch(t){case\"table\":return R0(()=>({type:t,fields:[],showId:!0}),W.seqMap(W.regexp(/WITHOUT\\s+ID/i).skip(W.optWhitespace).atMost(1),W.sepBy(e.namedField,W.string(\",\").trim(W.optWhitespace)),(r,n)=>({type:t,fields:n,showId:r.length==0})));case\"list\":return R0(()=>({type:t,format:void 0,showId:!0}),W.seqMap(W.regexp(/WITHOUT\\s+ID/i).skip(W.optWhitespace).atMost(1),ai.field.atMost(1),(r,n)=>({type:t,format:n.length==1?n[0]:void 0,showId:r.length==0})));case\"task\":return W.succeed({type:t});case\"calendar\":return W.whitespace.then(W.seqMap(e.namedField,r=>({type:t,showId:!0,field:r})));default:return W.fail(`Unrecognized query type '${t}'`)}}).desc(\"TABLE or LIST or TASK or CALENDAR\"),fromClause:e=>W.seqMap(W.regexp(/FROM/i),W.whitespace,ai.source,(t,r,n)=>n),whereClause:e=>W.seqMap(W.regexp(/WHERE/i),W.whitespace,ai.field,(t,r,n)=>({type:\"where\",clause:n})).desc(\"WHERE <expression>\"),sortByClause:e=>W.seqMap(W.regexp(/SORT/i),W.whitespace,e.sortField.sepBy1(W.string(\",\").trim(W.optWhitespace)),(t,r,n)=>({type:\"sort\",fields:n})).desc(\"SORT field [ASC/DESC]\"),limitClause:e=>W.seqMap(W.regexp(/LIMIT/i),W.whitespace,ai.field,(t,r,n)=>({type:\"limit\",amount:n})).desc(\"LIMIT <value>\"),flattenClause:e=>W.seqMap(W.regexp(/FLATTEN/i).skip(W.whitespace),e.namedField,(t,r)=>({type:\"flatten\",field:r})).desc(\"FLATTEN <value> [AS <name>]\"),groupByClause:e=>W.seqMap(W.regexp(/GROUP BY/i).skip(W.whitespace),e.namedField,(t,r)=>({type:\"group\",field:r})).desc(\"GROUP BY <value> [AS <name>]\"),clause:e=>W.alt(e.fromClause,e.whereClause,e.sortByClause,e.limitClause,e.groupByClause,e.flattenClause),query:e=>W.seqMap(e.headerClause.trim(dm),e.fromClause.trim(dm).atMost(1),e.clause.trim(dm).many(),(t,r,n)=>({header:t,source:r.length==0?Si.folder(\"\"):r[0],operations:n,settings:Hm}))}),dm=W.alt(W.whitespace,RS.comment).many().map(e=>e.join(\"\")),GP=e=>{var t;return e?(t=e.plugins.plugins.dataview)==null?void 0:t.api:window.DataviewAPI},JP=e=>e.plugins.enabledPlugins.has(\"dataview\");Ei.DATE_SHORTHANDS=Fm;Ei.DURATION_TYPES=Tm;Ei.EXPRESSION=ai;Ei.KEYWORDS=Im;Ei.QUERY_LANGUAGE=RS;Ei.getAPI=GP;Ei.isPluginEnabled=JP;Ei.parseField=KP});var HS=wn((Vm,$m)=>{(function(e,t){typeof Vm==\"object\"&&typeof $m!=\"undefined\"?$m.exports=t():typeof define==\"function\"&&define.amd?define(t):e.Mark=t()})(Vm,function(){\"use strict\";var e=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(s){return typeof s}:function(s){return s&&typeof Symbol==\"function\"&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},t=function(s,u){if(!(s instanceof u))throw new TypeError(\"Cannot call a class as a function\")},r=function(){function s(u,l){for(var c=0;c<l.length;c++){var d=l[c];d.enumerable=d.enumerable||!1,d.configurable=!0,\"value\"in d&&(d.writable=!0),Object.defineProperty(u,d.key,d)}}return function(u,l,c){return l&&s(u.prototype,l),c&&s(u,c),u}}(),n=Object.assign||function(s){for(var u=1;u<arguments.length;u++){var l=arguments[u];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(s[c]=l[c])}return s},i=function(){function s(u){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:5e3;t(this,s),this.ctx=u,this.iframes=l,this.exclude=c,this.iframesTimeout=d}return r(s,[{key:\"getContexts\",value:function(){var l=void 0,c=[];return typeof this.ctx==\"undefined\"||!this.ctx?l=[]:NodeList.prototype.isPrototypeOf(this.ctx)?l=Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?l=this.ctx:typeof this.ctx==\"string\"?l=Array.prototype.slice.call(document.querySelectorAll(this.ctx)):l=[this.ctx],l.forEach(function(d){var m=c.filter(function(h){return h.contains(d)}).length>0;c.indexOf(d)===-1&&!m&&c.push(d)}),c}},{key:\"getIframeContents\",value:function(l,c){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},m=void 0;try{var h=l.contentWindow;if(m=h.document,!h||!m)throw new Error(\"iframe inaccessible\")}catch(g){d()}m&&c(m)}},{key:\"isIframeBlank\",value:function(l){var c=\"about:blank\",d=l.getAttribute(\"src\").trim(),m=l.contentWindow.location.href;return m===c&&d!==c&&d}},{key:\"observeIframeLoad\",value:function(l,c,d){var m=this,h=!1,g=null,y=function v(){if(!h){h=!0,activeWindow.clearTimeout(g);try{m.isIframeBlank(l)||(l.removeEventListener(\"load\",v),m.getIframeContents(l,c,d))}catch(D){d()}}};l.addEventListener(\"load\",y),g=activeWindow.setTimeout(y,this.iframesTimeout)}},{key:\"onIframeReady\",value:function(l,c,d){try{l.contentWindow.document.readyState===\"complete\"?this.isIframeBlank(l)?this.observeIframeLoad(l,c,d):this.getIframeContents(l,c,d):this.observeIframeLoad(l,c,d)}catch(m){d()}}},{key:\"waitForIframes\",value:function(l,c){var d=this,m=0;this.forEachIframe(l,function(){return!0},function(h){m++,d.waitForIframes(h.querySelector(\"html\"),function(){--m||c()})},function(h){h||c()})}},{key:\"forEachIframe\",value:function(l,c,d){var m=this,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){},g=l.querySelectorAll(\"iframe\"),y=g.length,v=0;g=Array.prototype.slice.call(g);var D=function(){--y<=0&&h(v)};y||D(),g.forEach(function(I){s.matches(I,m.exclude)?D():m.onIframeReady(I,function(C){c(I)&&(v++,d(C)),D()},D)})}},{key:\"createIterator\",value:function(l,c,d){return document.createNodeIterator(l,c,d,!1)}},{key:\"createInstanceOnIframe\",value:function(l){return new s(l.querySelector(\"html\"),this.iframes)}},{key:\"compareNodeIframe\",value:function(l,c,d){var m=l.compareDocumentPosition(d),h=Node.DOCUMENT_POSITION_PRECEDING;if(m&h)if(c!==null){var g=c.compareDocumentPosition(d),y=Node.DOCUMENT_POSITION_FOLLOWING;if(g&y)return!0}else return!0;return!1}},{key:\"getIteratorNode\",value:function(l){var c=l.previousNode(),d=void 0;return c===null?d=l.nextNode():d=l.nextNode()&&l.nextNode(),{prevNode:c,node:d}}},{key:\"checkIframeFilter\",value:function(l,c,d,m){var h=!1,g=!1;return m.forEach(function(y,v){y.val===d&&(h=v,g=y.handled)}),this.compareNodeIframe(l,c,d)?(h===!1&&!g?m.push({val:d,handled:!0}):h!==!1&&!g&&(m[h].handled=!0),!0):(h===!1&&m.push({val:d,handled:!1}),!1)}},{key:\"handleOpenIframes\",value:function(l,c,d,m){var h=this;l.forEach(function(g){g.handled||h.getIframeContents(g.val,function(y){h.createInstanceOnIframe(y).forEachNode(c,d,m)})})}},{key:\"iterateThroughNodes\",value:function(l,c,d,m,h){for(var g=this,y=this.createIterator(c,l,m),v=[],D=[],I=void 0,C=void 0,x=function(){var A=g.getIteratorNode(y);return C=A.prevNode,I=A.node,I};x();)this.iframes&&this.forEachIframe(c,function(O){return g.checkIframeFilter(I,C,O,v)},function(O){g.createInstanceOnIframe(O).forEachNode(l,function(A){return D.push(A)},m)}),D.push(I);D.forEach(function(O){d(O)}),this.iframes&&this.handleOpenIframes(v,l,d,m),h()}},{key:\"forEachNode\",value:function(l,c,d){var m=this,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:function(){},g=this.getContexts(),y=g.length;y||h(),g.forEach(function(v){var D=function(){m.iterateThroughNodes(l,v,c,d,function(){--y<=0&&h()})};m.iframes?m.waitForIframes(v,D):D()})}}],[{key:\"matches\",value:function(l,c){var d=typeof c==\"string\"?[c]:c,m=l.matches||l.matchesSelector||l.msMatchesSelector||l.mozMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector;if(m){var h=!1;return d.every(function(g){return m.call(l,g)?(h=!0,!1):!0}),h}else return!1}}]),s}(),a=function(){function s(u){t(this,s),this.ctx=u,this.ie=!1;var l=window.navigator.userAgent;(l.indexOf(\"MSIE\")>-1||l.indexOf(\"Trident\")>-1)&&(this.ie=!0)}return r(s,[{key:\"log\",value:function(l){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:\"debug\",d=this.opt.log;this.opt.debug&&(typeof d==\"undefined\"?\"undefined\":e(d))===\"object\"&&typeof d[c]==\"function\"&&d[c](\"mark.js: \"+l)}},{key:\"escapeStr\",value:function(l){return l.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g,\"\\\\$&\")}},{key:\"createRegExp\",value:function(l){return this.opt.wildcards!==\"disabled\"&&(l=this.setupWildcardsRegExp(l)),l=this.escapeStr(l),Object.keys(this.opt.synonyms).length&&(l=this.createSynonymsRegExp(l)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(l=this.setupIgnoreJoinersRegExp(l)),this.opt.diacritics&&(l=this.createDiacriticsRegExp(l)),l=this.createMergedBlanksRegExp(l),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(l=this.createJoinersRegExp(l)),this.opt.wildcards!==\"disabled\"&&(l=this.createWildcardsRegExp(l)),l=this.createAccuracyRegExp(l),l}},{key:\"createSynonymsRegExp\",value:function(l){var c=this.opt.synonyms,d=this.opt.caseSensitive?\"\":\"i\",m=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?\"\\0\":\"\";for(var h in c)if(c.hasOwnProperty(h)){var g=c[h],y=this.opt.wildcards!==\"disabled\"?this.setupWildcardsRegExp(h):this.escapeStr(h),v=this.opt.wildcards!==\"disabled\"?this.setupWildcardsRegExp(g):this.escapeStr(g);y!==\"\"&&v!==\"\"&&(l=l.replace(new RegExp(\"(\"+this.escapeStr(y)+\"|\"+this.escapeStr(v)+\")\",\"gm\"+d),m+(\"(\"+this.processSynomyms(y)+\"|\")+(this.processSynomyms(v)+\")\")+m))}return l}},{key:\"processSynomyms\",value:function(l){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(l=this.setupIgnoreJoinersRegExp(l)),l}},{key:\"setupWildcardsRegExp\",value:function(l){return l=l.replace(/(?:\\\\)*\\?/g,function(c){return c.charAt(0)===\"\\\\\"?\"?\":\"\u0001\"}),l.replace(/(?:\\\\)*\\*/g,function(c){return c.charAt(0)===\"\\\\\"?\"*\":\"\u0002\"})}},{key:\"createWildcardsRegExp\",value:function(l){var c=this.opt.wildcards===\"withSpaces\";return l.replace(/\\u0001/g,c?\"[\\\\S\\\\s]?\":\"\\\\S?\").replace(/\\u0002/g,c?\"[\\\\S\\\\s]*?\":\"\\\\S*\")}},{key:\"setupIgnoreJoinersRegExp\",value:function(l){return l.replace(/[^(|)\\\\]/g,function(c,d,m){var h=m.charAt(d+1);return/[(|)\\\\]/.test(h)||h===\"\"?c:c+\"\\0\"})}},{key:\"createJoinersRegExp\",value:function(l){var c=[],d=this.opt.ignorePunctuation;return Array.isArray(d)&&d.length&&c.push(this.escapeStr(d.join(\"\"))),this.opt.ignoreJoiners&&c.push(\"\\\\u00ad\\\\u200b\\\\u200c\\\\u200d\"),c.length?l.split(/\\u0000+/).join(\"[\"+c.join(\"\")+\"]*\"):l}},{key:\"createDiacriticsRegExp\",value:function(l){var c=this.opt.caseSensitive?\"\":\"i\",d=this.opt.caseSensitive?[\"a\\xE0\\xE1\\u1EA3\\xE3\\u1EA1\\u0103\\u1EB1\\u1EAF\\u1EB3\\u1EB5\\u1EB7\\xE2\\u1EA7\\u1EA5\\u1EA9\\u1EAB\\u1EAD\\xE4\\xE5\\u0101\\u0105\",\"A\\xC0\\xC1\\u1EA2\\xC3\\u1EA0\\u0102\\u1EB0\\u1EAE\\u1EB2\\u1EB4\\u1EB6\\xC2\\u1EA6\\u1EA4\\u1EA8\\u1EAA\\u1EAC\\xC4\\xC5\\u0100\\u0104\",\"c\\xE7\\u0107\\u010D\",\"C\\xC7\\u0106\\u010C\",\"d\\u0111\\u010F\",\"D\\u0110\\u010E\",\"e\\xE8\\xE9\\u1EBB\\u1EBD\\u1EB9\\xEA\\u1EC1\\u1EBF\\u1EC3\\u1EC5\\u1EC7\\xEB\\u011B\\u0113\\u0119\",\"E\\xC8\\xC9\\u1EBA\\u1EBC\\u1EB8\\xCA\\u1EC0\\u1EBE\\u1EC2\\u1EC4\\u1EC6\\xCB\\u011A\\u0112\\u0118\",\"i\\xEC\\xED\\u1EC9\\u0129\\u1ECB\\xEE\\xEF\\u012B\",\"I\\xCC\\xCD\\u1EC8\\u0128\\u1ECA\\xCE\\xCF\\u012A\",\"l\\u0142\",\"L\\u0141\",\"n\\xF1\\u0148\\u0144\",\"N\\xD1\\u0147\\u0143\",\"o\\xF2\\xF3\\u1ECF\\xF5\\u1ECD\\xF4\\u1ED3\\u1ED1\\u1ED5\\u1ED7\\u1ED9\\u01A1\\u1EDF\\u1EE1\\u1EDB\\u1EDD\\u1EE3\\xF6\\xF8\\u014D\",\"O\\xD2\\xD3\\u1ECE\\xD5\\u1ECC\\xD4\\u1ED2\\u1ED0\\u1ED4\\u1ED6\\u1ED8\\u01A0\\u1EDE\\u1EE0\\u1EDA\\u1EDC\\u1EE2\\xD6\\xD8\\u014C\",\"r\\u0159\",\"R\\u0158\",\"s\\u0161\\u015B\\u0219\\u015F\",\"S\\u0160\\u015A\\u0218\\u015E\",\"t\\u0165\\u021B\\u0163\",\"T\\u0164\\u021A\\u0162\",\"u\\xF9\\xFA\\u1EE7\\u0169\\u1EE5\\u01B0\\u1EEB\\u1EE9\\u1EED\\u1EEF\\u1EF1\\xFB\\xFC\\u016F\\u016B\",\"U\\xD9\\xDA\\u1EE6\\u0168\\u1EE4\\u01AF\\u1EEA\\u1EE8\\u1EEC\\u1EEE\\u1EF0\\xDB\\xDC\\u016E\\u016A\",\"y\\xFD\\u1EF3\\u1EF7\\u1EF9\\u1EF5\\xFF\",\"Y\\xDD\\u1EF2\\u1EF6\\u1EF8\\u1EF4\\u0178\",\"z\\u017E\\u017C\\u017A\",\"Z\\u017D\\u017B\\u0179\"]:[\"a\\xE0\\xE1\\u1EA3\\xE3\\u1EA1\\u0103\\u1EB1\\u1EAF\\u1EB3\\u1EB5\\u1EB7\\xE2\\u1EA7\\u1EA5\\u1EA9\\u1EAB\\u1EAD\\xE4\\xE5\\u0101\\u0105A\\xC0\\xC1\\u1EA2\\xC3\\u1EA0\\u0102\\u1EB0\\u1EAE\\u1EB2\\u1EB4\\u1EB6\\xC2\\u1EA6\\u1EA4\\u1EA8\\u1EAA\\u1EAC\\xC4\\xC5\\u0100\\u0104\",\"c\\xE7\\u0107\\u010DC\\xC7\\u0106\\u010C\",\"d\\u0111\\u010FD\\u0110\\u010E\",\"e\\xE8\\xE9\\u1EBB\\u1EBD\\u1EB9\\xEA\\u1EC1\\u1EBF\\u1EC3\\u1EC5\\u1EC7\\xEB\\u011B\\u0113\\u0119E\\xC8\\xC9\\u1EBA\\u1EBC\\u1EB8\\xCA\\u1EC0\\u1EBE\\u1EC2\\u1EC4\\u1EC6\\xCB\\u011A\\u0112\\u0118\",\"i\\xEC\\xED\\u1EC9\\u0129\\u1ECB\\xEE\\xEF\\u012BI\\xCC\\xCD\\u1EC8\\u0128\\u1ECA\\xCE\\xCF\\u012A\",\"l\\u0142L\\u0141\",\"n\\xF1\\u0148\\u0144N\\xD1\\u0147\\u0143\",\"o\\xF2\\xF3\\u1ECF\\xF5\\u1ECD\\xF4\\u1ED3\\u1ED1\\u1ED5\\u1ED7\\u1ED9\\u01A1\\u1EDF\\u1EE1\\u1EDB\\u1EDD\\u1EE3\\xF6\\xF8\\u014DO\\xD2\\xD3\\u1ECE\\xD5\\u1ECC\\xD4\\u1ED2\\u1ED0\\u1ED4\\u1ED6\\u1ED8\\u01A0\\u1EDE\\u1EE0\\u1EDA\\u1EDC\\u1EE2\\xD6\\xD8\\u014C\",\"r\\u0159R\\u0158\",\"s\\u0161\\u015B\\u0219\\u015FS\\u0160\\u015A\\u0218\\u015E\",\"t\\u0165\\u021B\\u0163T\\u0164\\u021A\\u0162\",\"u\\xF9\\xFA\\u1EE7\\u0169\\u1EE5\\u01B0\\u1EEB\\u1EE9\\u1EED\\u1EEF\\u1EF1\\xFB\\xFC\\u016F\\u016BU\\xD9\\xDA\\u1EE6\\u0168\\u1EE4\\u01AF\\u1EEA\\u1EE8\\u1EEC\\u1EEE\\u1EF0\\xDB\\xDC\\u016E\\u016A\",\"y\\xFD\\u1EF3\\u1EF7\\u1EF9\\u1EF5\\xFFY\\xDD\\u1EF2\\u1EF6\\u1EF8\\u1EF4\\u0178\",\"z\\u017E\\u017C\\u017AZ\\u017D\\u017B\\u0179\"],m=[];return l.split(\"\").forEach(function(h){d.every(function(g){if(g.indexOf(h)!==-1){if(m.indexOf(g)>-1)return!1;l=l.replace(new RegExp(\"[\"+g+\"]\",\"gm\"+c),\"[\"+g+\"]\"),m.push(g)}return!0})}),l}},{key:\"createMergedBlanksRegExp\",value:function(l){return l.replace(/[\\s]+/gmi,\"[\\\\s]+\")}},{key:\"createAccuracyRegExp\",value:function(l){var c=this,d=\"!\\\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~\\xA1\\xBF\",m=this.opt.accuracy,h=typeof m==\"string\"?m:m.value,g=typeof m==\"string\"?[]:m.limiters,y=\"\";switch(g.forEach(function(v){y+=\"|\"+c.escapeStr(v)}),h){case\"partially\":default:return\"()(\"+l+\")\";case\"complementary\":return y=\"\\\\s\"+(y||this.escapeStr(d)),\"()([^\"+y+\"]*\"+l+\"[^\"+y+\"]*)\";case\"exactly\":return\"(^|\\\\s\"+y+\")(\"+l+\")(?=$|\\\\s\"+y+\")\"}}},{key:\"getSeparatedKeywords\",value:function(l){var c=this,d=[];return l.forEach(function(m){c.opt.separateWordSearch?m.split(\" \").forEach(function(h){h.trim()&&d.indexOf(h)===-1&&d.push(h)}):m.trim()&&d.indexOf(m)===-1&&d.push(m)}),{keywords:d.sort(function(m,h){return h.length-m.length}),length:d.length}}},{key:\"isNumeric\",value:function(l){return Number(parseFloat(l))==l}},{key:\"checkRanges\",value:function(l){var c=this;if(!Array.isArray(l)||Object.prototype.toString.call(l[0])!==\"[object Object]\")return this.log(\"markRanges() will only accept an array of objects\"),this.opt.noMatch(l),[];var d=[],m=0;return l.sort(function(h,g){return h.start-g.start}).forEach(function(h){var g=c.callNoMatchOnInvalidRanges(h,m),y=g.start,v=g.end,D=g.valid;D&&(h.start=y,h.length=v-y,d.push(h),m=v)}),d}},{key:\"callNoMatchOnInvalidRanges\",value:function(l,c){var d=void 0,m=void 0,h=!1;return l&&typeof l.start!=\"undefined\"?(d=parseInt(l.start,10),m=d+parseInt(l.length,10),this.isNumeric(l.start)&&this.isNumeric(l.length)&&m-c>0&&m-d>0?h=!0:(this.log(\"Ignoring invalid or overlapping range: \"+(\"\"+JSON.stringify(l))),this.opt.noMatch(l))):(this.log(\"Ignoring invalid range: \"+JSON.stringify(l)),this.opt.noMatch(l)),{start:d,end:m,valid:h}}},{key:\"checkWhitespaceRanges\",value:function(l,c,d){var m=void 0,h=!0,g=d.length,y=c-g,v=parseInt(l.start,10)-y;return v=v>g?g:v,m=v+parseInt(l.length,10),m>g&&(m=g,this.log(\"End range automatically set to the max value of \"+g)),v<0||m-v<0||v>g||m>g?(h=!1,this.log(\"Invalid range: \"+JSON.stringify(l)),this.opt.noMatch(l)):d.substring(v,m).replace(/\\s+/g,\"\")===\"\"&&(h=!1,this.log(\"Skipping whitespace only range: \"+JSON.stringify(l)),this.opt.noMatch(l)),{start:v,end:m,valid:h}}},{key:\"getTextNodes\",value:function(l){var c=this,d=\"\",m=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,function(h){m.push({start:d.length,end:(d+=h.textContent).length,node:h})},function(h){return c.matchesExclude(h.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},function(){l({value:d,nodes:m})})}},{key:\"matchesExclude\",value:function(l){return i.matches(l,this.opt.exclude.concat([\"script\",\"style\",\"title\",\"head\",\"html\"]))}},{key:\"wrapRangeInTextNode\",value:function(l,c,d){var m=this.opt.element?this.opt.element:\"mark\",h=l.splitText(c),g=h.splitText(d-c),y=document.createElement(m);return y.setAttribute(\"data-markjs\",\"true\"),this.opt.className&&y.setAttribute(\"class\",this.opt.className),y.textContent=h.textContent,h.parentNode.replaceChild(y,h),g}},{key:\"wrapRangeInMappedTextNode\",value:function(l,c,d,m,h){var g=this;l.nodes.every(function(y,v){var D=l.nodes[v+1];if(typeof D==\"undefined\"||D.start>c){if(!m(y.node))return!1;var I=c-y.start,C=(d>y.end?y.end:d)-y.start,x=l.value.substr(0,y.start),O=l.value.substr(C+y.start);if(y.node=g.wrapRangeInTextNode(y.node,I,C),l.value=x+O,l.nodes.forEach(function(A,P){P>=v&&(l.nodes[P].start>0&&P!==v&&(l.nodes[P].start-=C),l.nodes[P].end-=C)}),d-=C,h(y.node.previousSibling,y.start),d>y.end)c=y.end;else return!1}return!0})}},{key:\"wrapMatches\",value:function(l,c,d,m,h){var g=this,y=c===0?0:c+1;this.getTextNodes(function(v){v.nodes.forEach(function(D){D=D.node;for(var I=void 0;(I=l.exec(D.textContent))!==null&&I[y]!==\"\";)if(d(I[y],D)){var C=I.index;if(y!==0)for(var x=1;x<y;x++)C+=I[x].length;D=g.wrapRangeInTextNode(D,C,C+I[y].length),m(D.previousSibling),l.lastIndex=0}}),h()})}},{key:\"wrapMatchesAcrossElements\",value:function(l,c,d,m,h){var g=this,y=c===0?0:c+1;this.getTextNodes(function(v){for(var D=void 0;(D=l.exec(v.value))!==null&&D[y]!==\"\";){var I=D.index;if(y!==0)for(var C=1;C<y;C++)I+=D[C].length;var x=I+D[y].length;g.wrapRangeInMappedTextNode(v,I,x,function(O){return d(D[y],O)},function(O,A){l.lastIndex=A,m(O)})}h()})}},{key:\"wrapRangeFromIndex\",value:function(l,c,d,m){var h=this;this.getTextNodes(function(g){var y=g.value.length;l.forEach(function(v,D){var I=h.checkWhitespaceRanges(v,y,g.value),C=I.start,x=I.end,O=I.valid;O&&h.wrapRangeInMappedTextNode(g,C,x,function(A){return c(A,v,g.value.substring(C,x),D)},function(A){d(A,v)})}),m()})}},{key:\"unwrapMatches\",value:function(l){for(var c=l.parentNode,d=document.createDocumentFragment();l.firstChild;)d.appendChild(l.removeChild(l.firstChild));c.replaceChild(d,l),this.ie?this.normalizeTextNode(c):c.normalize()}},{key:\"normalizeTextNode\",value:function(l){if(l){if(l.nodeType===3)for(;l.nextSibling&&l.nextSibling.nodeType===3;)l.nodeValue+=l.nextSibling.nodeValue,l.parentNode.removeChild(l.nextSibling);else this.normalizeTextNode(l.firstChild);this.normalizeTextNode(l.nextSibling)}}},{key:\"markRegExp\",value:function(l,c){var d=this;this.opt=c,this.log('Searching with expression \"'+l+'\"');var m=0,h=\"wrapMatches\",g=function(v){m++,d.opt.each(v)};this.opt.acrossElements&&(h=\"wrapMatchesAcrossElements\"),this[h](l,this.opt.ignoreGroups,function(y,v){return d.opt.filter(v,y,m)},g,function(){m===0&&d.opt.noMatch(l),d.opt.done(m)})}},{key:\"mark\",value:function(l,c){var d=this;this.opt=c;var m=0,h=\"wrapMatches\",g=this.getSeparatedKeywords(typeof l==\"string\"?[l]:l),y=g.keywords,v=g.length,D=this.opt.caseSensitive?\"\":\"i\",I=function C(x){var O=new RegExp(d.createRegExp(x),\"gm\"+D),A=0;d.log('Searching with expression \"'+O+'\"'),d[h](O,1,function(P,B){return d.opt.filter(B,x,m,A)},function(P){A++,m++,d.opt.each(P)},function(){A===0&&d.opt.noMatch(x),y[v-1]===x?d.opt.done(m):C(y[y.indexOf(x)+1])})};this.opt.acrossElements&&(h=\"wrapMatchesAcrossElements\"),v===0?this.opt.done(m):I(y[0])}},{key:\"markRanges\",value:function(l,c){var d=this;this.opt=c;var m=0,h=this.checkRanges(l);h&&h.length?(this.log(\"Starting to mark with the following ranges: \"+JSON.stringify(h)),this.wrapRangeFromIndex(h,function(g,y,v,D){return d.opt.filter(g,y,v,D)},function(g,y){m++,d.opt.each(g,y)},function(){d.opt.done(m)})):this.opt.done(m)}},{key:\"unmark\",value:function(l){var c=this;this.opt=l;var d=this.opt.element?this.opt.element:\"*\";d+=\"[data-markjs]\",this.opt.className&&(d+=\".\"+this.opt.className),this.log('Removal selector \"'+d+'\"'),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,function(m){c.unwrapMatches(m)},function(m){var h=i.matches(m,d),g=c.matchesExclude(m);return!h||g?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}},{key:\"opt\",set:function(l){this._opt=n({},{element:\"\",className:\"\",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:\"partially\",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:\"disabled\",each:function(){},noMatch:function(){},filter:function(){return!0},done:function(){},debug:!1,log:window.console},l)},get:function(){return this._opt}},{key:\"iterator\",get:function(){return new i(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}}]),s}();function o(s){var u=this,l=new a(s);return this.mark=function(c,d){return l.mark(c,d),u},this.markRegExp=function(c,d){return l.markRegExp(c,d),u},this.markRanges=function(c,d){return l.markRanges(c,d),u},this.unmark=function(c){return l.unmark(c),u},this}return o})});var Wm=wn((Um,ls)=>{(function(e,t){typeof Um==\"object\"&&typeof ls!=\"undefined\"?ls.exports=t():typeof define==\"function\"&&define.amd?define(t):e.moment=t()})(Um,function(){\"use strict\";var e;function t(){return e.apply(null,arguments)}function r(f){e=f}function n(f){return f instanceof Array||Object.prototype.toString.call(f)===\"[object Array]\"}function i(f){return f!=null&&Object.prototype.toString.call(f)===\"[object Object]\"}function a(f,p){return Object.prototype.hasOwnProperty.call(f,p)}function o(f){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(f).length===0;var p;for(p in f)if(a(f,p))return!1;return!0}function s(f){return f===void 0}function u(f){return typeof f==\"number\"||Object.prototype.toString.call(f)===\"[object Number]\"}function l(f){return f instanceof Date||Object.prototype.toString.call(f)===\"[object Date]\"}function c(f,p){var w=[],S,F=f.length;for(S=0;S<F;++S)w.push(p(f[S],S));return w}function d(f,p){for(var w in p)a(p,w)&&(f[w]=p[w]);return a(p,\"toString\")&&(f.toString=p.toString),a(p,\"valueOf\")&&(f.valueOf=p.valueOf),f}function m(f,p,w,S){return Ry(f,p,w,S,!0).utc()}function h(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(f){return f._pf==null&&(f._pf=h()),f._pf}var y;Array.prototype.some?y=Array.prototype.some:y=function(f){var p=Object(this),w=p.length>>>0,S;for(S=0;S<w;S++)if(S in p&&f.call(this,p[S],S,p))return!0;return!1};function v(f){if(f._isValid==null){var p=g(f),w=y.call(p.parsedDateParts,function(F){return F!=null}),S=!isNaN(f._d.getTime())&&p.overflow<0&&!p.empty&&!p.invalidEra&&!p.invalidMonth&&!p.invalidWeekday&&!p.weekdayMismatch&&!p.nullInput&&!p.invalidFormat&&!p.userInvalidated&&(!p.meridiem||p.meridiem&&w);if(f._strict&&(S=S&&p.charsLeftOver===0&&p.unusedTokens.length===0&&p.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(f))f._isValid=S;else return S}return f._isValid}function D(f){var p=m(NaN);return f!=null?d(g(p),f):g(p).userInvalidated=!0,p}var I=t.momentProperties=[],C=!1;function x(f,p){var w,S,F,j=I.length;if(s(p._isAMomentObject)||(f._isAMomentObject=p._isAMomentObject),s(p._i)||(f._i=p._i),s(p._f)||(f._f=p._f),s(p._l)||(f._l=p._l),s(p._strict)||(f._strict=p._strict),s(p._tzm)||(f._tzm=p._tzm),s(p._isUTC)||(f._isUTC=p._isUTC),s(p._offset)||(f._offset=p._offset),s(p._pf)||(f._pf=g(p)),s(p._locale)||(f._locale=p._locale),j>0)for(w=0;w<j;w++)S=I[w],F=p[S],s(F)||(f[S]=F);return f}function O(f){x(this,f),this._d=new Date(f._d!=null?f._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),C===!1&&(C=!0,t.updateOffset(this),C=!1)}function A(f){return f instanceof O||f!=null&&f._isAMomentObject!=null}function P(f){t.suppressDeprecationWarnings===!1&&typeof console!=\"undefined\"&&console.warn&&console.warn(\"Deprecation warning: \"+f)}function B(f,p){var w=!0;return d(function(){if(t.deprecationHandler!=null&&t.deprecationHandler(null,f),w){var S=[],F,j,se,Pe=arguments.length;for(j=0;j<Pe;j++){if(F=\"\",typeof arguments[j]==\"object\"){F+=`\n[`+j+\"] \";for(se in arguments[0])a(arguments[0],se)&&(F+=se+\": \"+arguments[0][se]+\", \");F=F.slice(0,-2)}else F=arguments[j];S.push(F)}P(f+`\nArguments: `+Array.prototype.slice.call(S).join(\"\")+`\n`+new Error().stack),w=!1}return p.apply(this,arguments)},p)}var G={};function J(f,p){t.deprecationHandler!=null&&t.deprecationHandler(f,p),G[f]||(P(p),G[f]=!0)}t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;function Q(f){return typeof Function!=\"undefined\"&&f instanceof Function||Object.prototype.toString.call(f)===\"[object Function]\"}function oe(f){var p,w;for(w in f)a(f,w)&&(p=f[w],Q(p)?this[w]=p:this[\"_\"+w]=p);this._config=f,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+\"|\"+/\\d{1,2}/.source)}function te(f,p){var w=d({},f),S;for(S in p)a(p,S)&&(i(f[S])&&i(p[S])?(w[S]={},d(w[S],f[S]),d(w[S],p[S])):p[S]!=null?w[S]=p[S]:delete w[S]);for(S in f)a(f,S)&&!a(p,S)&&i(f[S])&&(w[S]=d({},w[S]));return w}function re(f){f!=null&&this.set(f)}var ne;Object.keys?ne=Object.keys:ne=function(f){var p,w=[];for(p in f)a(f,p)&&w.push(p);return w};var be={sameDay:\"[Today at] LT\",nextDay:\"[Tomorrow at] LT\",nextWeek:\"dddd [at] LT\",lastDay:\"[Yesterday at] LT\",lastWeek:\"[Last] dddd [at] LT\",sameElse:\"L\"};function pe(f,p,w){var S=this._calendar[f]||this._calendar.sameElse;return Q(S)?S.call(p,w):S}function De(f,p,w){var S=\"\"+Math.abs(f),F=p-S.length,j=f>=0;return(j?w?\"+\":\"\":\"-\")+Math.pow(10,Math.max(0,F)).toString().substr(1)+S}var Ce=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,U=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Je={},it={};function N(f,p,w,S){var F=S;typeof S==\"string\"&&(F=function(){return this[S]()}),f&&(it[f]=F),p&&(it[p[0]]=function(){return De(F.apply(this,arguments),p[1],p[2])}),w&&(it[w]=function(){return this.localeData().ordinal(F.apply(this,arguments),f)})}function Ze(f){return f.match(/\\[[\\s\\S]/)?f.replace(/^\\[|\\]$/g,\"\"):f.replace(/\\\\/g,\"\")}function It(f){var p=f.match(Ce),w,S;for(w=0,S=p.length;w<S;w++)it[p[w]]?p[w]=it[p[w]]:p[w]=Ze(p[w]);return function(F){var j=\"\",se;for(se=0;se<S;se++)j+=Q(p[se])?p[se].call(F,f):p[se];return j}}function Mt(f,p){return f.isValid()?(p=jt(p,f.localeData()),Je[p]=Je[p]||It(p),Je[p](f)):f.localeData().invalidDate()}function jt(f,p){var w=5;function S(F){return p.longDateFormat(F)||F}for(U.lastIndex=0;w>=0&&U.test(f);)f=f.replace(U,S),U.lastIndex=0,w-=1;return f}var vt={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"};function Wt(f){var p=this._longDateFormat[f],w=this._longDateFormat[f.toUpperCase()];return p||!w?p:(this._longDateFormat[f]=w.match(Ce).map(function(S){return S===\"MMMM\"||S===\"MM\"||S===\"DD\"||S===\"dddd\"?S.slice(1):S}).join(\"\"),this._longDateFormat[f])}var Tt=\"Invalid date\";function Jt(){return this._invalidDate}var en=\"%d\",gn=/\\d{1,2}/;function yn(f){return this._ordinal.replace(\"%d\",f)}var vn={future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",ss:\"%d seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",w:\"a week\",ww:\"%d weeks\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"};function xn(f,p,w,S){var F=this._relativeTime[w];return Q(F)?F(f,p,w,S):F.replace(/%d/i,f)}function jn(f,p){var w=this._relativeTime[f>0?\"future\":\"past\"];return Q(w)?w(p):w.replace(/%s/i,p)}var sn={};function Rt(f,p){var w=f.toLowerCase();sn[w]=sn[w+\"s\"]=sn[p]=f}function Vt(f){return typeof f==\"string\"?sn[f]||sn[f.toLowerCase()]:void 0}function Sr(f){var p={},w,S;for(S in f)a(f,S)&&(w=Vt(S),w&&(p[w]=f[S]));return p}var Rr={};function Bt(f,p){Rr[f]=p}function Hr(f){var p=[],w;for(w in f)a(f,w)&&p.push({unit:w,priority:Rr[w]});return p.sort(function(S,F){return S.priority-F.priority}),p}function rn(f){return f%4===0&&f%100!==0||f%400===0}function At(f){return f<0?Math.ceil(f)||0:Math.floor(f)}function Z(f){var p=+f,w=0;return p!==0&&isFinite(p)&&(w=At(p)),w}function me(f,p){return function(w){return w!=null?(at(this,f,w),t.updateOffset(this,p),this):Ie(this,f)}}function Ie(f,p){return f.isValid()?f._d[\"get\"+(f._isUTC?\"UTC\":\"\")+p]():NaN}function at(f,p,w){f.isValid()&&!isNaN(w)&&(p===\"FullYear\"&&rn(f.year())&&f.month()===1&&f.date()===29?(w=Z(w),f._d[\"set\"+(f._isUTC?\"UTC\":\"\")+p](w,f.month(),b(w,f.month()))):f._d[\"set\"+(f._isUTC?\"UTC\":\"\")+p](w))}function Dt(f){return f=Vt(f),Q(this[f])?this[f]():this}function Cn(f,p){if(typeof f==\"object\"){f=Sr(f);var w=Hr(f),S,F=w.length;for(S=0;S<F;S++)this[w[S].unit](f[w[S].unit])}else if(f=Vt(f),Q(this[f]))return this[f](p);return this}var _n=/\\d/,Ht=/\\d\\d/,ar=/\\d{3}/,ht=/\\d{4}/,St=/[+-]?\\d{6}/,L=/\\d\\d?/,K=/\\d\\d\\d\\d?/,ee=/\\d\\d\\d\\d\\d\\d?/,ue=/\\d{1,3}/,de=/\\d{1,4}/,ve=/[+-]?\\d{1,6}/,ge=/\\d+/,M=/[+-]?\\d+/,H=/Z|[+-]\\d\\d:?\\d\\d/gi,q=/Z|[+-]\\d\\d(?::?\\d\\d)?/gi,ie=/[+-]?\\d+(\\.\\d{1,3})?/,ye=/[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,ce;ce={};function ae(f,p,w){ce[f]=Q(p)?p:function(S,F){return S&&w?w:p}}function Se(f,p){return a(ce,f)?ce[f](p._strict,p._locale):new RegExp(nt(f))}function nt(f){return Te(f.replace(\"\\\\\",\"\").replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,function(p,w,S,F,j){return w||S||F||j}))}function Te(f){return f.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\")}var Ue={};function We(f,p){var w,S=p,F;for(typeof f==\"string\"&&(f=[f]),u(p)&&(S=function(j,se){se[p]=Z(j)}),F=f.length,w=0;w<F;w++)Ue[f[w]]=S}function Ft(f,p){We(f,function(w,S,F,j){F._w=F._w||{},p(w,F._w,F,j)})}function Hn(f,p,w){p!=null&&a(Ue,f)&&Ue[f](p,w._a,w,f)}var Ot=0,or=1,sr=2,Yt=3,Bn=4,Er=5,Gr=6,tu=7,z=8;function k(f,p){return(f%p+p)%p}var _;Array.prototype.indexOf?_=Array.prototype.indexOf:_=function(f){var p;for(p=0;p<this.length;++p)if(this[p]===f)return p;return-1};function b(f,p){if(isNaN(f)||isNaN(p))return NaN;var w=k(p,12);return f+=(p-w)/12,w===1?rn(f)?29:28:31-w%7%2}N(\"M\",[\"MM\",2],\"Mo\",function(){return this.month()+1}),N(\"MMM\",0,0,function(f){return this.localeData().monthsShort(this,f)}),N(\"MMMM\",0,0,function(f){return this.localeData().months(this,f)}),Rt(\"month\",\"M\"),Bt(\"month\",8),ae(\"M\",L),ae(\"MM\",L,Ht),ae(\"MMM\",function(f,p){return p.monthsShortRegex(f)}),ae(\"MMMM\",function(f,p){return p.monthsRegex(f)}),We([\"M\",\"MM\"],function(f,p){p[or]=Z(f)-1}),We([\"MMM\",\"MMMM\"],function(f,p,w,S){var F=w._locale.monthsParse(f,S,w._strict);F!=null?p[or]=F:g(w).invalidMonth=f});var T=\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),V=\"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\"),Y=/D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,X=ye,le=ye;function he(f,p){return f?n(this._months)?this._months[f.month()]:this._months[(this._months.isFormat||Y).test(p)?\"format\":\"standalone\"][f.month()]:n(this._months)?this._months:this._months.standalone}function Me(f,p){return f?n(this._monthsShort)?this._monthsShort[f.month()]:this._monthsShort[Y.test(p)?\"format\":\"standalone\"][f.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Ve(f,p,w){var S,F,j,se=f.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],S=0;S<12;++S)j=m([2e3,S]),this._shortMonthsParse[S]=this.monthsShort(j,\"\").toLocaleLowerCase(),this._longMonthsParse[S]=this.months(j,\"\").toLocaleLowerCase();return w?p===\"MMM\"?(F=_.call(this._shortMonthsParse,se),F!==-1?F:null):(F=_.call(this._longMonthsParse,se),F!==-1?F:null):p===\"MMM\"?(F=_.call(this._shortMonthsParse,se),F!==-1?F:(F=_.call(this._longMonthsParse,se),F!==-1?F:null)):(F=_.call(this._longMonthsParse,se),F!==-1?F:(F=_.call(this._shortMonthsParse,se),F!==-1?F:null))}function Le(f,p,w){var S,F,j;if(this._monthsParseExact)return Ve.call(this,f,p,w);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),S=0;S<12;S++){if(F=m([2e3,S]),w&&!this._longMonthsParse[S]&&(this._longMonthsParse[S]=new RegExp(\"^\"+this.months(F,\"\").replace(\".\",\"\")+\"$\",\"i\"),this._shortMonthsParse[S]=new RegExp(\"^\"+this.monthsShort(F,\"\").replace(\".\",\"\")+\"$\",\"i\")),!w&&!this._monthsParse[S]&&(j=\"^\"+this.months(F,\"\")+\"|^\"+this.monthsShort(F,\"\"),this._monthsParse[S]=new RegExp(j.replace(\".\",\"\"),\"i\")),w&&p===\"MMMM\"&&this._longMonthsParse[S].test(f))return S;if(w&&p===\"MMM\"&&this._shortMonthsParse[S].test(f))return S;if(!w&&this._monthsParse[S].test(f))return S}}function Qe(f,p){var w;if(!f.isValid())return f;if(typeof p==\"string\"){if(/^\\d+$/.test(p))p=Z(p);else if(p=f.localeData().monthsParse(p),!u(p))return f}return w=Math.min(f.date(),b(f.year(),p)),f._d[\"set\"+(f._isUTC?\"UTC\":\"\")+\"Month\"](p,w),f}function ot(f){return f!=null?(Qe(this,f),t.updateOffset(this,!0),this):Ie(this,\"Month\")}function qe(){return b(this.year(),this.month())}function yt(f){return this._monthsParseExact?(a(this,\"_monthsRegex\")||lt.call(this),f?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,\"_monthsShortRegex\")||(this._monthsShortRegex=X),this._monthsShortStrictRegex&&f?this._monthsShortStrictRegex:this._monthsShortRegex)}function st(f){return this._monthsParseExact?(a(this,\"_monthsRegex\")||lt.call(this),f?this._monthsStrictRegex:this._monthsRegex):(a(this,\"_monthsRegex\")||(this._monthsRegex=le),this._monthsStrictRegex&&f?this._monthsStrictRegex:this._monthsRegex)}function lt(){function f(se,Pe){return Pe.length-se.length}var p=[],w=[],S=[],F,j;for(F=0;F<12;F++)j=m([2e3,F]),p.push(this.monthsShort(j,\"\")),w.push(this.months(j,\"\")),S.push(this.months(j,\"\")),S.push(this.monthsShort(j,\"\"));for(p.sort(f),w.sort(f),S.sort(f),F=0;F<12;F++)p[F]=Te(p[F]),w[F]=Te(w[F]);for(F=0;F<24;F++)S[F]=Te(S[F]);this._monthsRegex=new RegExp(\"^(\"+S.join(\"|\")+\")\",\"i\"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp(\"^(\"+w.join(\"|\")+\")\",\"i\"),this._monthsShortStrictRegex=new RegExp(\"^(\"+p.join(\"|\")+\")\",\"i\")}N(\"Y\",0,0,function(){var f=this.year();return f<=9999?De(f,4):\"+\"+f}),N(0,[\"YY\",2],0,function(){return this.year()%100}),N(0,[\"YYYY\",4],0,\"year\"),N(0,[\"YYYYY\",5],0,\"year\"),N(0,[\"YYYYYY\",6,!0],0,\"year\"),Rt(\"year\",\"y\"),Bt(\"year\",1),ae(\"Y\",M),ae(\"YY\",L,Ht),ae(\"YYYY\",de,ht),ae(\"YYYYY\",ve,St),ae(\"YYYYYY\",ve,St),We([\"YYYYY\",\"YYYYYY\"],Ot),We(\"YYYY\",function(f,p){p[Ot]=f.length===2?t.parseTwoDigitYear(f):Z(f)}),We(\"YY\",function(f,p){p[Ot]=t.parseTwoDigitYear(f)}),We(\"Y\",function(f,p){p[Ot]=parseInt(f,10)});function qt(f){return rn(f)?366:365}t.parseTwoDigitYear=function(f){return Z(f)+(Z(f)>68?1900:2e3)};var On=me(\"FullYear\",!0);function Vn(){return rn(this.year())}function ki(f,p,w,S,F,j,se){var Pe;return f<100&&f>=0?(Pe=new Date(f+400,p,w,S,F,j,se),isFinite(Pe.getFullYear())&&Pe.setFullYear(f)):Pe=new Date(f,p,w,S,F,j,se),Pe}function kr(f){var p,w;return f<100&&f>=0?(w=Array.prototype.slice.call(arguments),w[0]=f+400,p=new Date(Date.UTC.apply(null,w)),isFinite(p.getUTCFullYear())&&p.setUTCFullYear(f)):p=new Date(Date.UTC.apply(null,arguments)),p}function Jr(f,p,w){var S=7+p-w,F=(7+kr(f,0,S).getUTCDay()-p)%7;return-F+S-1}function My(f,p,w,S,F){var j=(7+w-S)%7,se=Jr(f,S,F),Pe=1+7*(p-1)+j+se,ut,$t;return Pe<=0?(ut=f-1,$t=qt(ut)+Pe):Pe>qt(f)?(ut=f+1,$t=Pe-qt(f)):(ut=f,$t=Pe),{year:ut,dayOfYear:$t}}function Ns(f,p,w){var S=Jr(f.year(),p,w),F=Math.floor((f.dayOfYear()-S-1)/7)+1,j,se;return F<1?(se=f.year()-1,j=F+xi(se,p,w)):F>xi(f.year(),p,w)?(j=F-xi(f.year(),p,w),se=f.year()+1):(se=f.year(),j=F),{week:j,year:se}}function xi(f,p,w){var S=Jr(f,p,w),F=Jr(f+1,p,w);return(qt(f)-S+F)/7}N(\"w\",[\"ww\",2],\"wo\",\"week\"),N(\"W\",[\"WW\",2],\"Wo\",\"isoWeek\"),Rt(\"week\",\"w\"),Rt(\"isoWeek\",\"W\"),Bt(\"week\",5),Bt(\"isoWeek\",5),ae(\"w\",L),ae(\"ww\",L,Ht),ae(\"W\",L),ae(\"WW\",L,Ht),Ft([\"w\",\"ww\",\"W\",\"WW\"],function(f,p,w,S){p[S.substr(0,1)]=Z(f)});function j_(f){return Ns(f,this._week.dow,this._week.doy).week}var q_={dow:0,doy:6};function G_(){return this._week.dow}function J_(){return this._week.doy}function Z_(f){var p=this.localeData().week(this);return f==null?p:this.add((f-p)*7,\"d\")}function Q_(f){var p=Ns(this,1,4).week;return f==null?p:this.add((f-p)*7,\"d\")}N(\"d\",0,\"do\",\"day\"),N(\"dd\",0,0,function(f){return this.localeData().weekdaysMin(this,f)}),N(\"ddd\",0,0,function(f){return this.localeData().weekdaysShort(this,f)}),N(\"dddd\",0,0,function(f){return this.localeData().weekdays(this,f)}),N(\"e\",0,0,\"weekday\"),N(\"E\",0,0,\"isoWeekday\"),Rt(\"day\",\"d\"),Rt(\"weekday\",\"e\"),Rt(\"isoWeekday\",\"E\"),Bt(\"day\",11),Bt(\"weekday\",11),Bt(\"isoWeekday\",11),ae(\"d\",L),ae(\"e\",L),ae(\"E\",L),ae(\"dd\",function(f,p){return p.weekdaysMinRegex(f)}),ae(\"ddd\",function(f,p){return p.weekdaysShortRegex(f)}),ae(\"dddd\",function(f,p){return p.weekdaysRegex(f)}),Ft([\"dd\",\"ddd\",\"dddd\"],function(f,p,w,S){var F=w._locale.weekdaysParse(f,S,w._strict);F!=null?p.d=F:g(w).invalidWeekday=f}),Ft([\"d\",\"e\",\"E\"],function(f,p,w,S){p[S]=Z(f)});function X_(f,p){return typeof f!=\"string\"?f:isNaN(f)?(f=p.weekdaysParse(f),typeof f==\"number\"?f:null):parseInt(f,10)}function e1(f,p){return typeof f==\"string\"?p.weekdaysParse(f)%7||7:isNaN(f)?null:f}function bf(f,p){return f.slice(p,7).concat(f.slice(0,p))}var t1=\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),Ty=\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\"),n1=\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\"),r1=ye,i1=ye,a1=ye;function o1(f,p){var w=n(this._weekdays)?this._weekdays:this._weekdays[f&&f!==!0&&this._weekdays.isFormat.test(p)?\"format\":\"standalone\"];return f===!0?bf(w,this._week.dow):f?w[f.day()]:w}function s1(f){return f===!0?bf(this._weekdaysShort,this._week.dow):f?this._weekdaysShort[f.day()]:this._weekdaysShort}function l1(f){return f===!0?bf(this._weekdaysMin,this._week.dow):f?this._weekdaysMin[f.day()]:this._weekdaysMin}function u1(f,p,w){var S,F,j,se=f.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],S=0;S<7;++S)j=m([2e3,1]).day(S),this._minWeekdaysParse[S]=this.weekdaysMin(j,\"\").toLocaleLowerCase(),this._shortWeekdaysParse[S]=this.weekdaysShort(j,\"\").toLocaleLowerCase(),this._weekdaysParse[S]=this.weekdays(j,\"\").toLocaleLowerCase();return w?p===\"dddd\"?(F=_.call(this._weekdaysParse,se),F!==-1?F:null):p===\"ddd\"?(F=_.call(this._shortWeekdaysParse,se),F!==-1?F:null):(F=_.call(this._minWeekdaysParse,se),F!==-1?F:null):p===\"dddd\"?(F=_.call(this._weekdaysParse,se),F!==-1||(F=_.call(this._shortWeekdaysParse,se),F!==-1)?F:(F=_.call(this._minWeekdaysParse,se),F!==-1?F:null)):p===\"ddd\"?(F=_.call(this._shortWeekdaysParse,se),F!==-1||(F=_.call(this._weekdaysParse,se),F!==-1)?F:(F=_.call(this._minWeekdaysParse,se),F!==-1?F:null)):(F=_.call(this._minWeekdaysParse,se),F!==-1||(F=_.call(this._weekdaysParse,se),F!==-1)?F:(F=_.call(this._shortWeekdaysParse,se),F!==-1?F:null))}function c1(f,p,w){var S,F,j;if(this._weekdaysParseExact)return u1.call(this,f,p,w);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),S=0;S<7;S++){if(F=m([2e3,1]).day(S),w&&!this._fullWeekdaysParse[S]&&(this._fullWeekdaysParse[S]=new RegExp(\"^\"+this.weekdays(F,\"\").replace(\".\",\"\\\\.?\")+\"$\",\"i\"),this._shortWeekdaysParse[S]=new RegExp(\"^\"+this.weekdaysShort(F,\"\").replace(\".\",\"\\\\.?\")+\"$\",\"i\"),this._minWeekdaysParse[S]=new RegExp(\"^\"+this.weekdaysMin(F,\"\").replace(\".\",\"\\\\.?\")+\"$\",\"i\")),this._weekdaysParse[S]||(j=\"^\"+this.weekdays(F,\"\")+\"|^\"+this.weekdaysShort(F,\"\")+\"|^\"+this.weekdaysMin(F,\"\"),this._weekdaysParse[S]=new RegExp(j.replace(\".\",\"\"),\"i\")),w&&p===\"dddd\"&&this._fullWeekdaysParse[S].test(f))return S;if(w&&p===\"ddd\"&&this._shortWeekdaysParse[S].test(f))return S;if(w&&p===\"dd\"&&this._minWeekdaysParse[S].test(f))return S;if(!w&&this._weekdaysParse[S].test(f))return S}}function d1(f){if(!this.isValid())return f!=null?this:NaN;var p=this._isUTC?this._d.getUTCDay():this._d.getDay();return f!=null?(f=X_(f,this.localeData()),this.add(f-p,\"d\")):p}function f1(f){if(!this.isValid())return f!=null?this:NaN;var p=(this.day()+7-this.localeData()._week.dow)%7;return f==null?p:this.add(f-p,\"d\")}function h1(f){if(!this.isValid())return f!=null?this:NaN;if(f!=null){var p=e1(f,this.localeData());return this.day(this.day()%7?p:p-7)}else return this.day()||7}function m1(f){return this._weekdaysParseExact?(a(this,\"_weekdaysRegex\")||Df.call(this),f?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,\"_weekdaysRegex\")||(this._weekdaysRegex=r1),this._weekdaysStrictRegex&&f?this._weekdaysStrictRegex:this._weekdaysRegex)}function p1(f){return this._weekdaysParseExact?(a(this,\"_weekdaysRegex\")||Df.call(this),f?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,\"_weekdaysShortRegex\")||(this._weekdaysShortRegex=i1),this._weekdaysShortStrictRegex&&f?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function g1(f){return this._weekdaysParseExact?(a(this,\"_weekdaysRegex\")||Df.call(this),f?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,\"_weekdaysMinRegex\")||(this._weekdaysMinRegex=a1),this._weekdaysMinStrictRegex&&f?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Df(){function f(lr,Fi){return Fi.length-lr.length}var p=[],w=[],S=[],F=[],j,se,Pe,ut,$t;for(j=0;j<7;j++)se=m([2e3,1]).day(j),Pe=Te(this.weekdaysMin(se,\"\")),ut=Te(this.weekdaysShort(se,\"\")),$t=Te(this.weekdays(se,\"\")),p.push(Pe),w.push(ut),S.push($t),F.push(Pe),F.push(ut),F.push($t);p.sort(f),w.sort(f),S.sort(f),F.sort(f),this._weekdaysRegex=new RegExp(\"^(\"+F.join(\"|\")+\")\",\"i\"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp(\"^(\"+S.join(\"|\")+\")\",\"i\"),this._weekdaysShortStrictRegex=new RegExp(\"^(\"+w.join(\"|\")+\")\",\"i\"),this._weekdaysMinStrictRegex=new RegExp(\"^(\"+p.join(\"|\")+\")\",\"i\")}function Sf(){return this.hours()%12||12}function y1(){return this.hours()||24}N(\"H\",[\"HH\",2],0,\"hour\"),N(\"h\",[\"hh\",2],0,Sf),N(\"k\",[\"kk\",2],0,y1),N(\"hmm\",0,0,function(){return\"\"+Sf.apply(this)+De(this.minutes(),2)}),N(\"hmmss\",0,0,function(){return\"\"+Sf.apply(this)+De(this.minutes(),2)+De(this.seconds(),2)}),N(\"Hmm\",0,0,function(){return\"\"+this.hours()+De(this.minutes(),2)}),N(\"Hmmss\",0,0,function(){return\"\"+this.hours()+De(this.minutes(),2)+De(this.seconds(),2)});function Fy(f,p){N(f,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),p)})}Fy(\"a\",!0),Fy(\"A\",!1),Rt(\"hour\",\"h\"),Bt(\"hour\",13);function Iy(f,p){return p._meridiemParse}ae(\"a\",Iy),ae(\"A\",Iy),ae(\"H\",L),ae(\"h\",L),ae(\"k\",L),ae(\"HH\",L,Ht),ae(\"hh\",L,Ht),ae(\"kk\",L,Ht),ae(\"hmm\",K),ae(\"hmmss\",ee),ae(\"Hmm\",K),ae(\"Hmmss\",ee),We([\"H\",\"HH\"],Yt),We([\"k\",\"kk\"],function(f,p,w){var S=Z(f);p[Yt]=S===24?0:S}),We([\"a\",\"A\"],function(f,p,w){w._isPm=w._locale.isPM(f),w._meridiem=f}),We([\"h\",\"hh\"],function(f,p,w){p[Yt]=Z(f),g(w).bigHour=!0}),We(\"hmm\",function(f,p,w){var S=f.length-2;p[Yt]=Z(f.substr(0,S)),p[Bn]=Z(f.substr(S)),g(w).bigHour=!0}),We(\"hmmss\",function(f,p,w){var S=f.length-4,F=f.length-2;p[Yt]=Z(f.substr(0,S)),p[Bn]=Z(f.substr(S,2)),p[Er]=Z(f.substr(F)),g(w).bigHour=!0}),We(\"Hmm\",function(f,p,w){var S=f.length-2;p[Yt]=Z(f.substr(0,S)),p[Bn]=Z(f.substr(S))}),We(\"Hmmss\",function(f,p,w){var S=f.length-4,F=f.length-2;p[Yt]=Z(f.substr(0,S)),p[Bn]=Z(f.substr(S,2)),p[Er]=Z(f.substr(F))});function v1(f){return(f+\"\").toLowerCase().charAt(0)===\"p\"}var w1=/[ap]\\.?m?\\.?/i,b1=me(\"Hours\",!0);function D1(f,p,w){return f>11?w?\"pm\":\"PM\":w?\"am\":\"AM\"}var Ay={calendar:be,longDateFormat:vt,invalidDate:Tt,ordinal:en,dayOfMonthOrdinalParse:gn,relativeTime:vn,months:T,monthsShort:V,week:q_,weekdays:t1,weekdaysMin:n1,weekdaysShort:Ty,meridiemParse:w1},tn={},Rs={},Hs;function S1(f,p){var w,S=Math.min(f.length,p.length);for(w=0;w<S;w+=1)if(f[w]!==p[w])return w;return S}function Oy(f){return f&&f.toLowerCase().replace(\"_\",\"-\")}function E1(f){for(var p=0,w,S,F,j;p<f.length;){for(j=Oy(f[p]).split(\"-\"),w=j.length,S=Oy(f[p+1]),S=S?S.split(\"-\"):null;w>0;){if(F=nu(j.slice(0,w).join(\"-\")),F)return F;if(S&&S.length>=w&&S1(j,S)>=w-1)break;w--}p++}return Hs}function k1(f){return f.match(\"^[^/\\\\\\\\]*$\")!=null}function nu(f){var p=null,w;if(tn[f]===void 0&&typeof ls!=\"undefined\"&&ls&&ls.exports&&k1(f))try{p=Hs._abbr,w=require,w(\"./locale/\"+f),na(p)}catch(S){tn[f]=null}return tn[f]}function na(f,p){var w;return f&&(s(p)?w=Ci(f):w=Ef(f,p),w?Hs=w:typeof console!=\"undefined\"&&console.warn&&console.warn(\"Locale \"+f+\" not found. Did you forget to load it?\")),Hs._abbr}function Ef(f,p){if(p!==null){var w,S=Ay;if(p.abbr=f,tn[f]!=null)J(\"defineLocaleOverride\",\"use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.\"),S=tn[f]._config;else if(p.parentLocale!=null)if(tn[p.parentLocale]!=null)S=tn[p.parentLocale]._config;else if(w=nu(p.parentLocale),w!=null)S=w._config;else return Rs[p.parentLocale]||(Rs[p.parentLocale]=[]),Rs[p.parentLocale].push({name:f,config:p}),null;return tn[f]=new re(te(S,p)),Rs[f]&&Rs[f].forEach(function(F){Ef(F.name,F.config)}),na(f),tn[f]}else return delete tn[f],null}function x1(f,p){if(p!=null){var w,S,F=Ay;tn[f]!=null&&tn[f].parentLocale!=null?tn[f].set(te(tn[f]._config,p)):(S=nu(f),S!=null&&(F=S._config),p=te(F,p),S==null&&(p.abbr=f),w=new re(p),w.parentLocale=tn[f],tn[f]=w),na(f)}else tn[f]!=null&&(tn[f].parentLocale!=null?(tn[f]=tn[f].parentLocale,f===na()&&na(f)):tn[f]!=null&&delete tn[f]);return tn[f]}function Ci(f){var p;if(f&&f._locale&&f._locale._abbr&&(f=f._locale._abbr),!f)return Hs;if(!n(f)){if(p=nu(f),p)return p;f=[f]}return E1(f)}function C1(){return ne(tn)}function kf(f){var p,w=f._a;return w&&g(f).overflow===-2&&(p=w[or]<0||w[or]>11?or:w[sr]<1||w[sr]>b(w[Ot],w[or])?sr:w[Yt]<0||w[Yt]>24||w[Yt]===24&&(w[Bn]!==0||w[Er]!==0||w[Gr]!==0)?Yt:w[Bn]<0||w[Bn]>59?Bn:w[Er]<0||w[Er]>59?Er:w[Gr]<0||w[Gr]>999?Gr:-1,g(f)._overflowDayOfYear&&(p<Ot||p>sr)&&(p=sr),g(f)._overflowWeeks&&p===-1&&(p=tu),g(f)._overflowWeekday&&p===-1&&(p=z),g(f).overflow=p),f}var _1=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,M1=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,T1=/Z|[+-]\\d\\d(?::?\\d\\d)?/,ru=[[\"YYYYYY-MM-DD\",/[+-]\\d{6}-\\d\\d-\\d\\d/],[\"YYYY-MM-DD\",/\\d{4}-\\d\\d-\\d\\d/],[\"GGGG-[W]WW-E\",/\\d{4}-W\\d\\d-\\d/],[\"GGGG-[W]WW\",/\\d{4}-W\\d\\d/,!1],[\"YYYY-DDD\",/\\d{4}-\\d{3}/],[\"YYYY-MM\",/\\d{4}-\\d\\d/,!1],[\"YYYYYYMMDD\",/[+-]\\d{10}/],[\"YYYYMMDD\",/\\d{8}/],[\"GGGG[W]WWE\",/\\d{4}W\\d{3}/],[\"GGGG[W]WW\",/\\d{4}W\\d{2}/,!1],[\"YYYYDDD\",/\\d{7}/],[\"YYYYMM\",/\\d{6}/,!1],[\"YYYY\",/\\d{4}/,!1]],xf=[[\"HH:mm:ss.SSSS\",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],[\"HH:mm:ss,SSSS\",/\\d\\d:\\d\\d:\\d\\d,\\d+/],[\"HH:mm:ss\",/\\d\\d:\\d\\d:\\d\\d/],[\"HH:mm\",/\\d\\d:\\d\\d/],[\"HHmmss.SSSS\",/\\d\\d\\d\\d\\d\\d\\.\\d+/],[\"HHmmss,SSSS\",/\\d\\d\\d\\d\\d\\d,\\d+/],[\"HHmmss\",/\\d\\d\\d\\d\\d\\d/],[\"HHmm\",/\\d\\d\\d\\d/],[\"HH\",/\\d\\d/]],F1=/^\\/?Date\\((-?\\d+)/i,I1=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,A1={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ly(f){var p,w,S=f._i,F=_1.exec(S)||M1.exec(S),j,se,Pe,ut,$t=ru.length,lr=xf.length;if(F){for(g(f).iso=!0,p=0,w=$t;p<w;p++)if(ru[p][1].exec(F[1])){se=ru[p][0],j=ru[p][2]!==!1;break}if(se==null){f._isValid=!1;return}if(F[3]){for(p=0,w=lr;p<w;p++)if(xf[p][1].exec(F[3])){Pe=(F[2]||\" \")+xf[p][0];break}if(Pe==null){f._isValid=!1;return}}if(!j&&Pe!=null){f._isValid=!1;return}if(F[4])if(T1.exec(F[4]))ut=\"Z\";else{f._isValid=!1;return}f._f=se+(Pe||\"\")+(ut||\"\"),_f(f)}else f._isValid=!1}function O1(f,p,w,S,F,j){var se=[L1(f),V.indexOf(p),parseInt(w,10),parseInt(S,10),parseInt(F,10)];return j&&se.push(parseInt(j,10)),se}function L1(f){var p=parseInt(f,10);return p<=49?2e3+p:p<=999?1900+p:p}function P1(f){return f.replace(/\\([^()]*\\)|[\\n\\t]/g,\" \").replace(/(\\s\\s+)/g,\" \").replace(/^\\s\\s*/,\"\").replace(/\\s\\s*$/,\"\")}function N1(f,p,w){if(f){var S=Ty.indexOf(f),F=new Date(p[0],p[1],p[2]).getDay();if(S!==F)return g(w).weekdayMismatch=!0,w._isValid=!1,!1}return!0}function R1(f,p,w){if(f)return A1[f];if(p)return 0;var S=parseInt(w,10),F=S%100,j=(S-F)/100;return j*60+F}function Py(f){var p=I1.exec(P1(f._i)),w;if(p){if(w=O1(p[4],p[3],p[2],p[5],p[6],p[7]),!N1(p[1],w,f))return;f._a=w,f._tzm=R1(p[8],p[9],p[10]),f._d=kr.apply(null,f._a),f._d.setUTCMinutes(f._d.getUTCMinutes()-f._tzm),g(f).rfc2822=!0}else f._isValid=!1}function H1(f){var p=F1.exec(f._i);if(p!==null){f._d=new Date(+p[1]);return}if(Ly(f),f._isValid===!1)delete f._isValid;else return;if(Py(f),f._isValid===!1)delete f._isValid;else return;f._strict?f._isValid=!1:t.createFromInputFallback(f)}t.createFromInputFallback=B(\"value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.\",function(f){f._d=new Date(f._i+(f._useUTC?\" UTC\":\"\"))});function bo(f,p,w){return f!=null?f:p!=null?p:w}function B1(f){var p=new Date(t.now());return f._useUTC?[p.getUTCFullYear(),p.getUTCMonth(),p.getUTCDate()]:[p.getFullYear(),p.getMonth(),p.getDate()]}function Cf(f){var p,w,S=[],F,j,se;if(!f._d){for(F=B1(f),f._w&&f._a[sr]==null&&f._a[or]==null&&V1(f),f._dayOfYear!=null&&(se=bo(f._a[Ot],F[Ot]),(f._dayOfYear>qt(se)||f._dayOfYear===0)&&(g(f)._overflowDayOfYear=!0),w=kr(se,0,f._dayOfYear),f._a[or]=w.getUTCMonth(),f._a[sr]=w.getUTCDate()),p=0;p<3&&f._a[p]==null;++p)f._a[p]=S[p]=F[p];for(;p<7;p++)f._a[p]=S[p]=f._a[p]==null?p===2?1:0:f._a[p];f._a[Yt]===24&&f._a[Bn]===0&&f._a[Er]===0&&f._a[Gr]===0&&(f._nextDay=!0,f._a[Yt]=0),f._d=(f._useUTC?kr:ki).apply(null,S),j=f._useUTC?f._d.getUTCDay():f._d.getDay(),f._tzm!=null&&f._d.setUTCMinutes(f._d.getUTCMinutes()-f._tzm),f._nextDay&&(f._a[Yt]=24),f._w&&typeof f._w.d!=\"undefined\"&&f._w.d!==j&&(g(f).weekdayMismatch=!0)}}function V1(f){var p,w,S,F,j,se,Pe,ut,$t;p=f._w,p.GG!=null||p.W!=null||p.E!=null?(j=1,se=4,w=bo(p.GG,f._a[Ot],Ns(Zt(),1,4).year),S=bo(p.W,1),F=bo(p.E,1),(F<1||F>7)&&(ut=!0)):(j=f._locale._week.dow,se=f._locale._week.doy,$t=Ns(Zt(),j,se),w=bo(p.gg,f._a[Ot],$t.year),S=bo(p.w,$t.week),p.d!=null?(F=p.d,(F<0||F>6)&&(ut=!0)):p.e!=null?(F=p.e+j,(p.e<0||p.e>6)&&(ut=!0)):F=j),S<1||S>xi(w,j,se)?g(f)._overflowWeeks=!0:ut!=null?g(f)._overflowWeekday=!0:(Pe=My(w,S,F,j,se),f._a[Ot]=Pe.year,f._dayOfYear=Pe.dayOfYear)}t.ISO_8601=function(){},t.RFC_2822=function(){};function _f(f){if(f._f===t.ISO_8601){Ly(f);return}if(f._f===t.RFC_2822){Py(f);return}f._a=[],g(f).empty=!0;var p=\"\"+f._i,w,S,F,j,se,Pe=p.length,ut=0,$t,lr;for(F=jt(f._f,f._locale).match(Ce)||[],lr=F.length,w=0;w<lr;w++)j=F[w],S=(p.match(Se(j,f))||[])[0],S&&(se=p.substr(0,p.indexOf(S)),se.length>0&&g(f).unusedInput.push(se),p=p.slice(p.indexOf(S)+S.length),ut+=S.length),it[j]?(S?g(f).empty=!1:g(f).unusedTokens.push(j),Hn(j,S,f)):f._strict&&!S&&g(f).unusedTokens.push(j);g(f).charsLeftOver=Pe-ut,p.length>0&&g(f).unusedInput.push(p),f._a[Yt]<=12&&g(f).bigHour===!0&&f._a[Yt]>0&&(g(f).bigHour=void 0),g(f).parsedDateParts=f._a.slice(0),g(f).meridiem=f._meridiem,f._a[Yt]=$1(f._locale,f._a[Yt],f._meridiem),$t=g(f).era,$t!==null&&(f._a[Ot]=f._locale.erasConvertYear($t,f._a[Ot])),Cf(f),kf(f)}function $1(f,p,w){var S;return w==null?p:f.meridiemHour!=null?f.meridiemHour(p,w):(f.isPM!=null&&(S=f.isPM(w),S&&p<12&&(p+=12),!S&&p===12&&(p=0)),p)}function U1(f){var p,w,S,F,j,se,Pe=!1,ut=f._f.length;if(ut===0){g(f).invalidFormat=!0,f._d=new Date(NaN);return}for(F=0;F<ut;F++)j=0,se=!1,p=x({},f),f._useUTC!=null&&(p._useUTC=f._useUTC),p._f=f._f[F],_f(p),v(p)&&(se=!0),j+=g(p).charsLeftOver,j+=g(p).unusedTokens.length*10,g(p).score=j,Pe?j<S&&(S=j,w=p):(S==null||j<S||se)&&(S=j,w=p,se&&(Pe=!0));d(f,w||p)}function W1(f){if(!f._d){var p=Sr(f._i),w=p.day===void 0?p.date:p.day;f._a=c([p.year,p.month,w,p.hour,p.minute,p.second,p.millisecond],function(S){return S&&parseInt(S,10)}),Cf(f)}}function Y1(f){var p=new O(kf(Ny(f)));return p._nextDay&&(p.add(1,\"d\"),p._nextDay=void 0),p}function Ny(f){var p=f._i,w=f._f;return f._locale=f._locale||Ci(f._l),p===null||w===void 0&&p===\"\"?D({nullInput:!0}):(typeof p==\"string\"&&(f._i=p=f._locale.preparse(p)),A(p)?new O(kf(p)):(l(p)?f._d=p:n(w)?U1(f):w?_f(f):z1(f),v(f)||(f._d=null),f))}function z1(f){var p=f._i;s(p)?f._d=new Date(t.now()):l(p)?f._d=new Date(p.valueOf()):typeof p==\"string\"?H1(f):n(p)?(f._a=c(p.slice(0),function(w){return parseInt(w,10)}),Cf(f)):i(p)?W1(f):u(p)?f._d=new Date(p):t.createFromInputFallback(f)}function Ry(f,p,w,S,F){var j={};return(p===!0||p===!1)&&(S=p,p=void 0),(w===!0||w===!1)&&(S=w,w=void 0),(i(f)&&o(f)||n(f)&&f.length===0)&&(f=void 0),j._isAMomentObject=!0,j._useUTC=j._isUTC=F,j._l=w,j._i=f,j._f=p,j._strict=S,Y1(j)}function Zt(f,p,w,S){return Ry(f,p,w,S,!1)}var K1=B(\"moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var f=Zt.apply(null,arguments);return this.isValid()&&f.isValid()?f<this?this:f:D()}),j1=B(\"moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var f=Zt.apply(null,arguments);return this.isValid()&&f.isValid()?f>this?this:f:D()});function Hy(f,p){var w,S;if(p.length===1&&n(p[0])&&(p=p[0]),!p.length)return Zt();for(w=p[0],S=1;S<p.length;++S)(!p[S].isValid()||p[S][f](w))&&(w=p[S]);return w}function q1(){var f=[].slice.call(arguments,0);return Hy(\"isBefore\",f)}function G1(){var f=[].slice.call(arguments,0);return Hy(\"isAfter\",f)}var J1=function(){return Date.now?Date.now():+new Date},Bs=[\"year\",\"quarter\",\"month\",\"week\",\"day\",\"hour\",\"minute\",\"second\",\"millisecond\"];function Z1(f){var p,w=!1,S,F=Bs.length;for(p in f)if(a(f,p)&&!(_.call(Bs,p)!==-1&&(f[p]==null||!isNaN(f[p]))))return!1;for(S=0;S<F;++S)if(f[Bs[S]]){if(w)return!1;parseFloat(f[Bs[S]])!==Z(f[Bs[S]])&&(w=!0)}return!0}function Q1(){return this._isValid}function X1(){return Zr(NaN)}function iu(f){var p=Sr(f),w=p.year||0,S=p.quarter||0,F=p.month||0,j=p.week||p.isoWeek||0,se=p.day||0,Pe=p.hour||0,ut=p.minute||0,$t=p.second||0,lr=p.millisecond||0;this._isValid=Z1(p),this._milliseconds=+lr+$t*1e3+ut*6e4+Pe*1e3*60*60,this._days=+se+j*7,this._months=+F+S*3+w*12,this._data={},this._locale=Ci(),this._bubble()}function au(f){return f instanceof iu}function Mf(f){return f<0?Math.round(-1*f)*-1:Math.round(f)}function eM(f,p,w){var S=Math.min(f.length,p.length),F=Math.abs(f.length-p.length),j=0,se;for(se=0;se<S;se++)(w&&f[se]!==p[se]||!w&&Z(f[se])!==Z(p[se]))&&j++;return j+F}function By(f,p){N(f,0,0,function(){var w=this.utcOffset(),S=\"+\";return w<0&&(w=-w,S=\"-\"),S+De(~~(w/60),2)+p+De(~~w%60,2)})}By(\"Z\",\":\"),By(\"ZZ\",\"\"),ae(\"Z\",q),ae(\"ZZ\",q),We([\"Z\",\"ZZ\"],function(f,p,w){w._useUTC=!0,w._tzm=Tf(q,f)});var tM=/([\\+\\-]|\\d\\d)/gi;function Tf(f,p){var w=(p||\"\").match(f),S,F,j;return w===null?null:(S=w[w.length-1]||[],F=(S+\"\").match(tM)||[\"-\",0,0],j=+(F[1]*60)+Z(F[2]),j===0?0:F[0]===\"+\"?j:-j)}function Ff(f,p){var w,S;return p._isUTC?(w=p.clone(),S=(A(f)||l(f)?f.valueOf():Zt(f).valueOf())-w.valueOf(),w._d.setTime(w._d.valueOf()+S),t.updateOffset(w,!1),w):Zt(f).local()}function If(f){return-Math.round(f._d.getTimezoneOffset())}t.updateOffset=function(){};function nM(f,p,w){var S=this._offset||0,F;if(!this.isValid())return f!=null?this:NaN;if(f!=null){if(typeof f==\"string\"){if(f=Tf(q,f),f===null)return this}else Math.abs(f)<16&&!w&&(f=f*60);return!this._isUTC&&p&&(F=If(this)),this._offset=f,this._isUTC=!0,F!=null&&this.add(F,\"m\"),S!==f&&(!p||this._changeInProgress?Wy(this,Zr(f-S,\"m\"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?S:If(this)}function rM(f,p){return f!=null?(typeof f!=\"string\"&&(f=-f),this.utcOffset(f,p),this):-this.utcOffset()}function iM(f){return this.utcOffset(0,f)}function aM(f){return this._isUTC&&(this.utcOffset(0,f),this._isUTC=!1,f&&this.subtract(If(this),\"m\")),this}function oM(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==\"string\"){var f=Tf(H,this._i);f!=null?this.utcOffset(f):this.utcOffset(0,!0)}return this}function sM(f){return this.isValid()?(f=f?Zt(f).utcOffset():0,(this.utcOffset()-f)%60===0):!1}function lM(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function uM(){if(!s(this._isDSTShifted))return this._isDSTShifted;var f={},p;return x(f,this),f=Ny(f),f._a?(p=f._isUTC?m(f._a):Zt(f._a),this._isDSTShifted=this.isValid()&&eM(f._a,p.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function cM(){return this.isValid()?!this._isUTC:!1}function dM(){return this.isValid()?this._isUTC:!1}function Vy(){return this.isValid()?this._isUTC&&this._offset===0:!1}var fM=/^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,hM=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Zr(f,p){var w=f,S=null,F,j,se;return au(f)?w={ms:f._milliseconds,d:f._days,M:f._months}:u(f)||!isNaN(+f)?(w={},p?w[p]=+f:w.milliseconds=+f):(S=fM.exec(f))?(F=S[1]===\"-\"?-1:1,w={y:0,d:Z(S[sr])*F,h:Z(S[Yt])*F,m:Z(S[Bn])*F,s:Z(S[Er])*F,ms:Z(Mf(S[Gr]*1e3))*F}):(S=hM.exec(f))?(F=S[1]===\"-\"?-1:1,w={y:Ha(S[2],F),M:Ha(S[3],F),w:Ha(S[4],F),d:Ha(S[5],F),h:Ha(S[6],F),m:Ha(S[7],F),s:Ha(S[8],F)}):w==null?w={}:typeof w==\"object\"&&(\"from\"in w||\"to\"in w)&&(se=mM(Zt(w.from),Zt(w.to)),w={},w.ms=se.milliseconds,w.M=se.months),j=new iu(w),au(f)&&a(f,\"_locale\")&&(j._locale=f._locale),au(f)&&a(f,\"_isValid\")&&(j._isValid=f._isValid),j}Zr.fn=iu.prototype,Zr.invalid=X1;function Ha(f,p){var w=f&&parseFloat(f.replace(\",\",\".\"));return(isNaN(w)?0:w)*p}function $y(f,p){var w={};return w.months=p.month()-f.month()+(p.year()-f.year())*12,f.clone().add(w.months,\"M\").isAfter(p)&&--w.months,w.milliseconds=+p-+f.clone().add(w.months,\"M\"),w}function mM(f,p){var w;return f.isValid()&&p.isValid()?(p=Ff(p,f),f.isBefore(p)?w=$y(f,p):(w=$y(p,f),w.milliseconds=-w.milliseconds,w.months=-w.months),w):{milliseconds:0,months:0}}function Uy(f,p){return function(w,S){var F,j;return S!==null&&!isNaN(+S)&&(J(p,\"moment().\"+p+\"(period, number) is deprecated. Please use moment().\"+p+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),j=w,w=S,S=j),F=Zr(w,S),Wy(this,F,f),this}}function Wy(f,p,w,S){var F=p._milliseconds,j=Mf(p._days),se=Mf(p._months);f.isValid()&&(S=S==null?!0:S,se&&Qe(f,Ie(f,\"Month\")+se*w),j&&at(f,\"Date\",Ie(f,\"Date\")+j*w),F&&f._d.setTime(f._d.valueOf()+F*w),S&&t.updateOffset(f,j||se))}var pM=Uy(1,\"add\"),gM=Uy(-1,\"subtract\");function Yy(f){return typeof f==\"string\"||f instanceof String}function yM(f){return A(f)||l(f)||Yy(f)||u(f)||wM(f)||vM(f)||f===null||f===void 0}function vM(f){var p=i(f)&&!o(f),w=!1,S=[\"years\",\"year\",\"y\",\"months\",\"month\",\"M\",\"days\",\"day\",\"d\",\"dates\",\"date\",\"D\",\"hours\",\"hour\",\"h\",\"minutes\",\"minute\",\"m\",\"seconds\",\"second\",\"s\",\"milliseconds\",\"millisecond\",\"ms\"],F,j,se=S.length;for(F=0;F<se;F+=1)j=S[F],w=w||a(f,j);return p&&w}function wM(f){var p=n(f),w=!1;return p&&(w=f.filter(function(S){return!u(S)&&Yy(f)}).length===0),p&&w}function bM(f){var p=i(f)&&!o(f),w=!1,S=[\"sameDay\",\"nextDay\",\"lastDay\",\"nextWeek\",\"lastWeek\",\"sameElse\"],F,j;for(F=0;F<S.length;F+=1)j=S[F],w=w||a(f,j);return p&&w}function DM(f,p){var w=f.diff(p,\"days\",!0);return w<-6?\"sameElse\":w<-1?\"lastWeek\":w<0?\"lastDay\":w<1?\"sameDay\":w<2?\"nextDay\":w<7?\"nextWeek\":\"sameElse\"}function SM(f,p){arguments.length===1&&(arguments[0]?yM(arguments[0])?(f=arguments[0],p=void 0):bM(arguments[0])&&(p=arguments[0],f=void 0):(f=void 0,p=void 0));var w=f||Zt(),S=Ff(w,this).startOf(\"day\"),F=t.calendarFormat(this,S)||\"sameElse\",j=p&&(Q(p[F])?p[F].call(this,w):p[F]);return this.format(j||this.localeData().calendar(F,this,Zt(w)))}function EM(){return new O(this)}function kM(f,p){var w=A(f)?f:Zt(f);return this.isValid()&&w.isValid()?(p=Vt(p)||\"millisecond\",p===\"millisecond\"?this.valueOf()>w.valueOf():w.valueOf()<this.clone().startOf(p).valueOf()):!1}function xM(f,p){var w=A(f)?f:Zt(f);return this.isValid()&&w.isValid()?(p=Vt(p)||\"millisecond\",p===\"millisecond\"?this.valueOf()<w.valueOf():this.clone().endOf(p).valueOf()<w.valueOf()):!1}function CM(f,p,w,S){var F=A(f)?f:Zt(f),j=A(p)?p:Zt(p);return this.isValid()&&F.isValid()&&j.isValid()?(S=S||\"()\",(S[0]===\"(\"?this.isAfter(F,w):!this.isBefore(F,w))&&(S[1]===\")\"?this.isBefore(j,w):!this.isAfter(j,w))):!1}function _M(f,p){var w=A(f)?f:Zt(f),S;return this.isValid()&&w.isValid()?(p=Vt(p)||\"millisecond\",p===\"millisecond\"?this.valueOf()===w.valueOf():(S=w.valueOf(),this.clone().startOf(p).valueOf()<=S&&S<=this.clone().endOf(p).valueOf())):!1}function MM(f,p){return this.isSame(f,p)||this.isAfter(f,p)}function TM(f,p){return this.isSame(f,p)||this.isBefore(f,p)}function FM(f,p,w){var S,F,j;if(!this.isValid())return NaN;if(S=Ff(f,this),!S.isValid())return NaN;switch(F=(S.utcOffset()-this.utcOffset())*6e4,p=Vt(p),p){case\"year\":j=ou(this,S)/12;break;case\"month\":j=ou(this,S);break;case\"quarter\":j=ou(this,S)/3;break;case\"second\":j=(this-S)/1e3;break;case\"minute\":j=(this-S)/6e4;break;case\"hour\":j=(this-S)/36e5;break;case\"day\":j=(this-S-F)/864e5;break;case\"week\":j=(this-S-F)/6048e5;break;default:j=this-S}return w?j:At(j)}function ou(f,p){if(f.date()<p.date())return-ou(p,f);var w=(p.year()-f.year())*12+(p.month()-f.month()),S=f.clone().add(w,\"months\"),F,j;return p-S<0?(F=f.clone().add(w-1,\"months\"),j=(p-S)/(S-F)):(F=f.clone().add(w+1,\"months\"),j=(p-S)/(F-S)),-(w+j)||0}t.defaultFormat=\"YYYY-MM-DDTHH:mm:ssZ\",t.defaultFormatUtc=\"YYYY-MM-DDTHH:mm:ss[Z]\";function IM(){return this.clone().locale(\"en\").format(\"ddd MMM DD YYYY HH:mm:ss [GMT]ZZ\")}function AM(f){if(!this.isValid())return null;var p=f!==!0,w=p?this.clone().utc():this;return w.year()<0||w.year()>9999?Mt(w,p?\"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ\"):Q(Date.prototype.toISOString)?p?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace(\"Z\",Mt(w,\"Z\")):Mt(w,p?\"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYY-MM-DD[T]HH:mm:ss.SSSZ\")}function OM(){if(!this.isValid())return\"moment.invalid(/* \"+this._i+\" */)\";var f=\"moment\",p=\"\",w,S,F,j;return this.isLocal()||(f=this.utcOffset()===0?\"moment.utc\":\"moment.parseZone\",p=\"Z\"),w=\"[\"+f+'(\"]',S=0<=this.year()&&this.year()<=9999?\"YYYY\":\"YYYYYY\",F=\"-MM-DD[T]HH:mm:ss.SSS\",j=p+'[\")]',this.format(w+S+F+j)}function LM(f){f||(f=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var p=Mt(this,f);return this.localeData().postformat(p)}function PM(f,p){return this.isValid()&&(A(f)&&f.isValid()||Zt(f).isValid())?Zr({to:this,from:f}).locale(this.locale()).humanize(!p):this.localeData().invalidDate()}function NM(f){return this.from(Zt(),f)}function RM(f,p){return this.isValid()&&(A(f)&&f.isValid()||Zt(f).isValid())?Zr({from:this,to:f}).locale(this.locale()).humanize(!p):this.localeData().invalidDate()}function HM(f){return this.to(Zt(),f)}function zy(f){var p;return f===void 0?this._locale._abbr:(p=Ci(f),p!=null&&(this._locale=p),this)}var Ky=B(\"moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.\",function(f){return f===void 0?this.localeData():this.locale(f)});function jy(){return this._locale}var su=1e3,Do=60*su,lu=60*Do,qy=(365*400+97)*24*lu;function So(f,p){return(f%p+p)%p}function Gy(f,p,w){return f<100&&f>=0?new Date(f+400,p,w)-qy:new Date(f,p,w).valueOf()}function Jy(f,p,w){return f<100&&f>=0?Date.UTC(f+400,p,w)-qy:Date.UTC(f,p,w)}function BM(f){var p,w;if(f=Vt(f),f===void 0||f===\"millisecond\"||!this.isValid())return this;switch(w=this._isUTC?Jy:Gy,f){case\"year\":p=w(this.year(),0,1);break;case\"quarter\":p=w(this.year(),this.month()-this.month()%3,1);break;case\"month\":p=w(this.year(),this.month(),1);break;case\"week\":p=w(this.year(),this.month(),this.date()-this.weekday());break;case\"isoWeek\":p=w(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case\"day\":case\"date\":p=w(this.year(),this.month(),this.date());break;case\"hour\":p=this._d.valueOf(),p-=So(p+(this._isUTC?0:this.utcOffset()*Do),lu);break;case\"minute\":p=this._d.valueOf(),p-=So(p,Do);break;case\"second\":p=this._d.valueOf(),p-=So(p,su);break}return this._d.setTime(p),t.updateOffset(this,!0),this}function VM(f){var p,w;if(f=Vt(f),f===void 0||f===\"millisecond\"||!this.isValid())return this;switch(w=this._isUTC?Jy:Gy,f){case\"year\":p=w(this.year()+1,0,1)-1;break;case\"quarter\":p=w(this.year(),this.month()-this.month()%3+3,1)-1;break;case\"month\":p=w(this.year(),this.month()+1,1)-1;break;case\"week\":p=w(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case\"isoWeek\":p=w(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case\"day\":case\"date\":p=w(this.year(),this.month(),this.date()+1)-1;break;case\"hour\":p=this._d.valueOf(),p+=lu-So(p+(this._isUTC?0:this.utcOffset()*Do),lu)-1;break;case\"minute\":p=this._d.valueOf(),p+=Do-So(p,Do)-1;break;case\"second\":p=this._d.valueOf(),p+=su-So(p,su)-1;break}return this._d.setTime(p),t.updateOffset(this,!0),this}function $M(){return this._d.valueOf()-(this._offset||0)*6e4}function UM(){return Math.floor(this.valueOf()/1e3)}function WM(){return new Date(this.valueOf())}function YM(){var f=this;return[f.year(),f.month(),f.date(),f.hour(),f.minute(),f.second(),f.millisecond()]}function zM(){var f=this;return{years:f.year(),months:f.month(),date:f.date(),hours:f.hours(),minutes:f.minutes(),seconds:f.seconds(),milliseconds:f.milliseconds()}}function KM(){return this.isValid()?this.toISOString():null}function jM(){return v(this)}function qM(){return d({},g(this))}function GM(){return g(this).overflow}function JM(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}N(\"N\",0,0,\"eraAbbr\"),N(\"NN\",0,0,\"eraAbbr\"),N(\"NNN\",0,0,\"eraAbbr\"),N(\"NNNN\",0,0,\"eraName\"),N(\"NNNNN\",0,0,\"eraNarrow\"),N(\"y\",[\"y\",1],\"yo\",\"eraYear\"),N(\"y\",[\"yy\",2],0,\"eraYear\"),N(\"y\",[\"yyy\",3],0,\"eraYear\"),N(\"y\",[\"yyyy\",4],0,\"eraYear\"),ae(\"N\",Af),ae(\"NN\",Af),ae(\"NNN\",Af),ae(\"NNNN\",sT),ae(\"NNNNN\",lT),We([\"N\",\"NN\",\"NNN\",\"NNNN\",\"NNNNN\"],function(f,p,w,S){var F=w._locale.erasParse(f,S,w._strict);F?g(w).era=F:g(w).invalidEra=f}),ae(\"y\",ge),ae(\"yy\",ge),ae(\"yyy\",ge),ae(\"yyyy\",ge),ae(\"yo\",uT),We([\"y\",\"yy\",\"yyy\",\"yyyy\"],Ot),We([\"yo\"],function(f,p,w,S){var F;w._locale._eraYearOrdinalRegex&&(F=f.match(w._locale._eraYearOrdinalRegex)),w._locale.eraYearOrdinalParse?p[Ot]=w._locale.eraYearOrdinalParse(f,F):p[Ot]=parseInt(f,10)});function ZM(f,p){var w,S,F,j=this._eras||Ci(\"en\")._eras;for(w=0,S=j.length;w<S;++w){switch(typeof j[w].since){case\"string\":F=t(j[w].since).startOf(\"day\"),j[w].since=F.valueOf();break}switch(typeof j[w].until){case\"undefined\":j[w].until=1/0;break;case\"string\":F=t(j[w].until).startOf(\"day\").valueOf(),j[w].until=F.valueOf();break}}return j}function QM(f,p,w){var S,F,j=this.eras(),se,Pe,ut;for(f=f.toUpperCase(),S=0,F=j.length;S<F;++S)if(se=j[S].name.toUpperCase(),Pe=j[S].abbr.toUpperCase(),ut=j[S].narrow.toUpperCase(),w)switch(p){case\"N\":case\"NN\":case\"NNN\":if(Pe===f)return j[S];break;case\"NNNN\":if(se===f)return j[S];break;case\"NNNNN\":if(ut===f)return j[S];break}else if([se,Pe,ut].indexOf(f)>=0)return j[S]}function XM(f,p){var w=f.since<=f.until?1:-1;return p===void 0?t(f.since).year():t(f.since).year()+(p-f.offset)*w}function eT(){var f,p,w,S=this.localeData().eras();for(f=0,p=S.length;f<p;++f)if(w=this.clone().startOf(\"day\").valueOf(),S[f].since<=w&&w<=S[f].until||S[f].until<=w&&w<=S[f].since)return S[f].name;return\"\"}function tT(){var f,p,w,S=this.localeData().eras();for(f=0,p=S.length;f<p;++f)if(w=this.clone().startOf(\"day\").valueOf(),S[f].since<=w&&w<=S[f].until||S[f].until<=w&&w<=S[f].since)return S[f].narrow;return\"\"}function nT(){var f,p,w,S=this.localeData().eras();for(f=0,p=S.length;f<p;++f)if(w=this.clone().startOf(\"day\").valueOf(),S[f].since<=w&&w<=S[f].until||S[f].until<=w&&w<=S[f].since)return S[f].abbr;return\"\"}function rT(){var f,p,w,S,F=this.localeData().eras();for(f=0,p=F.length;f<p;++f)if(w=F[f].since<=F[f].until?1:-1,S=this.clone().startOf(\"day\").valueOf(),F[f].since<=S&&S<=F[f].until||F[f].until<=S&&S<=F[f].since)return(this.year()-t(F[f].since).year())*w+F[f].offset;return this.year()}function iT(f){return a(this,\"_erasNameRegex\")||Of.call(this),f?this._erasNameRegex:this._erasRegex}function aT(f){return a(this,\"_erasAbbrRegex\")||Of.call(this),f?this._erasAbbrRegex:this._erasRegex}function oT(f){return a(this,\"_erasNarrowRegex\")||Of.call(this),f?this._erasNarrowRegex:this._erasRegex}function Af(f,p){return p.erasAbbrRegex(f)}function sT(f,p){return p.erasNameRegex(f)}function lT(f,p){return p.erasNarrowRegex(f)}function uT(f,p){return p._eraYearOrdinalRegex||ge}function Of(){var f=[],p=[],w=[],S=[],F,j,se=this.eras();for(F=0,j=se.length;F<j;++F)p.push(Te(se[F].name)),f.push(Te(se[F].abbr)),w.push(Te(se[F].narrow)),S.push(Te(se[F].name)),S.push(Te(se[F].abbr)),S.push(Te(se[F].narrow));this._erasRegex=new RegExp(\"^(\"+S.join(\"|\")+\")\",\"i\"),this._erasNameRegex=new RegExp(\"^(\"+p.join(\"|\")+\")\",\"i\"),this._erasAbbrRegex=new RegExp(\"^(\"+f.join(\"|\")+\")\",\"i\"),this._erasNarrowRegex=new RegExp(\"^(\"+w.join(\"|\")+\")\",\"i\")}N(0,[\"gg\",2],0,function(){return this.weekYear()%100}),N(0,[\"GG\",2],0,function(){return this.isoWeekYear()%100});function uu(f,p){N(0,[f,f.length],0,p)}uu(\"gggg\",\"weekYear\"),uu(\"ggggg\",\"weekYear\"),uu(\"GGGG\",\"isoWeekYear\"),uu(\"GGGGG\",\"isoWeekYear\"),Rt(\"weekYear\",\"gg\"),Rt(\"isoWeekYear\",\"GG\"),Bt(\"weekYear\",1),Bt(\"isoWeekYear\",1),ae(\"G\",M),ae(\"g\",M),ae(\"GG\",L,Ht),ae(\"gg\",L,Ht),ae(\"GGGG\",de,ht),ae(\"gggg\",de,ht),ae(\"GGGGG\",ve,St),ae(\"ggggg\",ve,St),Ft([\"gggg\",\"ggggg\",\"GGGG\",\"GGGGG\"],function(f,p,w,S){p[S.substr(0,2)]=Z(f)}),Ft([\"gg\",\"GG\"],function(f,p,w,S){p[S]=t.parseTwoDigitYear(f)});function cT(f){return Zy.call(this,f,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function dT(f){return Zy.call(this,f,this.isoWeek(),this.isoWeekday(),1,4)}function fT(){return xi(this.year(),1,4)}function hT(){return xi(this.isoWeekYear(),1,4)}function mT(){var f=this.localeData()._week;return xi(this.year(),f.dow,f.doy)}function pT(){var f=this.localeData()._week;return xi(this.weekYear(),f.dow,f.doy)}function Zy(f,p,w,S,F){var j;return f==null?Ns(this,S,F).year:(j=xi(f,S,F),p>j&&(p=j),gT.call(this,f,p,w,S,F))}function gT(f,p,w,S,F){var j=My(f,p,w,S,F),se=kr(j.year,0,j.dayOfYear);return this.year(se.getUTCFullYear()),this.month(se.getUTCMonth()),this.date(se.getUTCDate()),this}N(\"Q\",0,\"Qo\",\"quarter\"),Rt(\"quarter\",\"Q\"),Bt(\"quarter\",7),ae(\"Q\",_n),We(\"Q\",function(f,p){p[or]=(Z(f)-1)*3});function yT(f){return f==null?Math.ceil((this.month()+1)/3):this.month((f-1)*3+this.month()%3)}N(\"D\",[\"DD\",2],\"Do\",\"date\"),Rt(\"date\",\"D\"),Bt(\"date\",9),ae(\"D\",L),ae(\"DD\",L,Ht),ae(\"Do\",function(f,p){return f?p._dayOfMonthOrdinalParse||p._ordinalParse:p._dayOfMonthOrdinalParseLenient}),We([\"D\",\"DD\"],sr),We(\"Do\",function(f,p){p[sr]=Z(f.match(L)[0])});var Qy=me(\"Date\",!0);N(\"DDD\",[\"DDDD\",3],\"DDDo\",\"dayOfYear\"),Rt(\"dayOfYear\",\"DDD\"),Bt(\"dayOfYear\",4),ae(\"DDD\",ue),ae(\"DDDD\",ar),We([\"DDD\",\"DDDD\"],function(f,p,w){w._dayOfYear=Z(f)});function vT(f){var p=Math.round((this.clone().startOf(\"day\")-this.clone().startOf(\"year\"))/864e5)+1;return f==null?p:this.add(f-p,\"d\")}N(\"m\",[\"mm\",2],0,\"minute\"),Rt(\"minute\",\"m\"),Bt(\"minute\",14),ae(\"m\",L),ae(\"mm\",L,Ht),We([\"m\",\"mm\"],Bn);var wT=me(\"Minutes\",!1);N(\"s\",[\"ss\",2],0,\"second\"),Rt(\"second\",\"s\"),Bt(\"second\",15),ae(\"s\",L),ae(\"ss\",L,Ht),We([\"s\",\"ss\"],Er);var bT=me(\"Seconds\",!1);N(\"S\",0,0,function(){return~~(this.millisecond()/100)}),N(0,[\"SS\",2],0,function(){return~~(this.millisecond()/10)}),N(0,[\"SSS\",3],0,\"millisecond\"),N(0,[\"SSSS\",4],0,function(){return this.millisecond()*10}),N(0,[\"SSSSS\",5],0,function(){return this.millisecond()*100}),N(0,[\"SSSSSS\",6],0,function(){return this.millisecond()*1e3}),N(0,[\"SSSSSSS\",7],0,function(){return this.millisecond()*1e4}),N(0,[\"SSSSSSSS\",8],0,function(){return this.millisecond()*1e5}),N(0,[\"SSSSSSSSS\",9],0,function(){return this.millisecond()*1e6}),Rt(\"millisecond\",\"ms\"),Bt(\"millisecond\",16),ae(\"S\",ue,_n),ae(\"SS\",ue,Ht),ae(\"SSS\",ue,ar);var ra,Xy;for(ra=\"SSSS\";ra.length<=9;ra+=\"S\")ae(ra,ge);function DT(f,p){p[Gr]=Z((\"0.\"+f)*1e3)}for(ra=\"S\";ra.length<=9;ra+=\"S\")We(ra,DT);Xy=me(\"Milliseconds\",!1),N(\"z\",0,0,\"zoneAbbr\"),N(\"zz\",0,0,\"zoneName\");function ST(){return this._isUTC?\"UTC\":\"\"}function ET(){return this._isUTC?\"Coordinated Universal Time\":\"\"}var we=O.prototype;we.add=pM,we.calendar=SM,we.clone=EM,we.diff=FM,we.endOf=VM,we.format=LM,we.from=PM,we.fromNow=NM,we.to=RM,we.toNow=HM,we.get=Dt,we.invalidAt=GM,we.isAfter=kM,we.isBefore=xM,we.isBetween=CM,we.isSame=_M,we.isSameOrAfter=MM,we.isSameOrBefore=TM,we.isValid=jM,we.lang=Ky,we.locale=zy,we.localeData=jy,we.max=j1,we.min=K1,we.parsingFlags=qM,we.set=Cn,we.startOf=BM,we.subtract=gM,we.toArray=YM,we.toObject=zM,we.toDate=WM,we.toISOString=AM,we.inspect=OM,typeof Symbol!=\"undefined\"&&Symbol.for!=null&&(we[Symbol.for(\"nodejs.util.inspect.custom\")]=function(){return\"Moment<\"+this.format()+\">\"}),we.toJSON=KM,we.toString=IM,we.unix=UM,we.valueOf=$M,we.creationData=JM,we.eraName=eT,we.eraNarrow=tT,we.eraAbbr=nT,we.eraYear=rT,we.year=On,we.isLeapYear=Vn,we.weekYear=cT,we.isoWeekYear=dT,we.quarter=we.quarters=yT,we.month=ot,we.daysInMonth=qe,we.week=we.weeks=Z_,we.isoWeek=we.isoWeeks=Q_,we.weeksInYear=mT,we.weeksInWeekYear=pT,we.isoWeeksInYear=fT,we.isoWeeksInISOWeekYear=hT,we.date=Qy,we.day=we.days=d1,we.weekday=f1,we.isoWeekday=h1,we.dayOfYear=vT,we.hour=we.hours=b1,we.minute=we.minutes=wT,we.second=we.seconds=bT,we.millisecond=we.milliseconds=Xy,we.utcOffset=nM,we.utc=iM,we.local=aM,we.parseZone=oM,we.hasAlignedHourOffset=sM,we.isDST=lM,we.isLocal=cM,we.isUtcOffset=dM,we.isUtc=Vy,we.isUTC=Vy,we.zoneAbbr=ST,we.zoneName=ET,we.dates=B(\"dates accessor is deprecated. Use date instead.\",Qy),we.months=B(\"months accessor is deprecated. Use month instead\",ot),we.years=B(\"years accessor is deprecated. Use year instead\",On),we.zone=B(\"moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/\",rM),we.isDSTShifted=B(\"isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information\",uM);function kT(f){return Zt(f*1e3)}function xT(){return Zt.apply(null,arguments).parseZone()}function ev(f){return f}var Lt=re.prototype;Lt.calendar=pe,Lt.longDateFormat=Wt,Lt.invalidDate=Jt,Lt.ordinal=yn,Lt.preparse=ev,Lt.postformat=ev,Lt.relativeTime=xn,Lt.pastFuture=jn,Lt.set=oe,Lt.eras=ZM,Lt.erasParse=QM,Lt.erasConvertYear=XM,Lt.erasAbbrRegex=aT,Lt.erasNameRegex=iT,Lt.erasNarrowRegex=oT,Lt.months=he,Lt.monthsShort=Me,Lt.monthsParse=Le,Lt.monthsRegex=st,Lt.monthsShortRegex=yt,Lt.week=j_,Lt.firstDayOfYear=J_,Lt.firstDayOfWeek=G_,Lt.weekdays=o1,Lt.weekdaysMin=l1,Lt.weekdaysShort=s1,Lt.weekdaysParse=c1,Lt.weekdaysRegex=m1,Lt.weekdaysShortRegex=p1,Lt.weekdaysMinRegex=g1,Lt.isPM=v1,Lt.meridiem=D1;function cu(f,p,w,S){var F=Ci(),j=m().set(S,p);return F[w](j,f)}function tv(f,p,w){if(u(f)&&(p=f,f=void 0),f=f||\"\",p!=null)return cu(f,p,w,\"month\");var S,F=[];for(S=0;S<12;S++)F[S]=cu(f,S,w,\"month\");return F}function Lf(f,p,w,S){typeof f==\"boolean\"?(u(p)&&(w=p,p=void 0),p=p||\"\"):(p=f,w=p,f=!1,u(p)&&(w=p,p=void 0),p=p||\"\");var F=Ci(),j=f?F._week.dow:0,se,Pe=[];if(w!=null)return cu(p,(w+j)%7,S,\"day\");for(se=0;se<7;se++)Pe[se]=cu(p,(se+j)%7,S,\"day\");return Pe}function CT(f,p){return tv(f,p,\"months\")}function _T(f,p){return tv(f,p,\"monthsShort\")}function MT(f,p,w){return Lf(f,p,w,\"weekdays\")}function TT(f,p,w){return Lf(f,p,w,\"weekdaysShort\")}function FT(f,p,w){return Lf(f,p,w,\"weekdaysMin\")}na(\"en\",{eras:[{since:\"0001-01-01\",until:1/0,offset:1,name:\"Anno Domini\",narrow:\"AD\",abbr:\"AD\"},{since:\"0000-12-31\",until:-1/0,offset:1,name:\"Before Christ\",narrow:\"BC\",abbr:\"BC\"}],dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(f){var p=f%10,w=Z(f%100/10)===1?\"th\":p===1?\"st\":p===2?\"nd\":p===3?\"rd\":\"th\";return f+w}}),t.lang=B(\"moment.lang is deprecated. Use moment.locale instead.\",na),t.langData=B(\"moment.langData is deprecated. Use moment.localeData instead.\",Ci);var _i=Math.abs;function IT(){var f=this._data;return this._milliseconds=_i(this._milliseconds),this._days=_i(this._days),this._months=_i(this._months),f.milliseconds=_i(f.milliseconds),f.seconds=_i(f.seconds),f.minutes=_i(f.minutes),f.hours=_i(f.hours),f.months=_i(f.months),f.years=_i(f.years),this}function nv(f,p,w,S){var F=Zr(p,w);return f._milliseconds+=S*F._milliseconds,f._days+=S*F._days,f._months+=S*F._months,f._bubble()}function AT(f,p){return nv(this,f,p,1)}function OT(f,p){return nv(this,f,p,-1)}function rv(f){return f<0?Math.floor(f):Math.ceil(f)}function LT(){var f=this._milliseconds,p=this._days,w=this._months,S=this._data,F,j,se,Pe,ut;return f>=0&&p>=0&&w>=0||f<=0&&p<=0&&w<=0||(f+=rv(Pf(w)+p)*864e5,p=0,w=0),S.milliseconds=f%1e3,F=At(f/1e3),S.seconds=F%60,j=At(F/60),S.minutes=j%60,se=At(j/60),S.hours=se%24,p+=At(se/24),ut=At(iv(p)),w+=ut,p-=rv(Pf(ut)),Pe=At(w/12),w%=12,S.days=p,S.months=w,S.years=Pe,this}function iv(f){return f*4800/146097}function Pf(f){return f*146097/4800}function PT(f){if(!this.isValid())return NaN;var p,w,S=this._milliseconds;if(f=Vt(f),f===\"month\"||f===\"quarter\"||f===\"year\")switch(p=this._days+S/864e5,w=this._months+iv(p),f){case\"month\":return w;case\"quarter\":return w/3;case\"year\":return w/12}else switch(p=this._days+Math.round(Pf(this._months)),f){case\"week\":return p/7+S/6048e5;case\"day\":return p+S/864e5;case\"hour\":return p*24+S/36e5;case\"minute\":return p*1440+S/6e4;case\"second\":return p*86400+S/1e3;case\"millisecond\":return Math.floor(p*864e5)+S;default:throw new Error(\"Unknown unit \"+f)}}function NT(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Z(this._months/12)*31536e6:NaN}function Mi(f){return function(){return this.as(f)}}var RT=Mi(\"ms\"),HT=Mi(\"s\"),BT=Mi(\"m\"),VT=Mi(\"h\"),$T=Mi(\"d\"),UT=Mi(\"w\"),WT=Mi(\"M\"),YT=Mi(\"Q\"),zT=Mi(\"y\");function KT(){return Zr(this)}function jT(f){return f=Vt(f),this.isValid()?this[f+\"s\"]():NaN}function Ba(f){return function(){return this.isValid()?this._data[f]:NaN}}var qT=Ba(\"milliseconds\"),GT=Ba(\"seconds\"),JT=Ba(\"minutes\"),ZT=Ba(\"hours\"),QT=Ba(\"days\"),XT=Ba(\"months\"),eF=Ba(\"years\");function tF(){return At(this.days()/7)}var Ti=Math.round,Eo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function nF(f,p,w,S,F){return F.relativeTime(p||1,!!w,f,S)}function rF(f,p,w,S){var F=Zr(f).abs(),j=Ti(F.as(\"s\")),se=Ti(F.as(\"m\")),Pe=Ti(F.as(\"h\")),ut=Ti(F.as(\"d\")),$t=Ti(F.as(\"M\")),lr=Ti(F.as(\"w\")),Fi=Ti(F.as(\"y\")),ia=j<=w.ss&&[\"s\",j]||j<w.s&&[\"ss\",j]||se<=1&&[\"m\"]||se<w.m&&[\"mm\",se]||Pe<=1&&[\"h\"]||Pe<w.h&&[\"hh\",Pe]||ut<=1&&[\"d\"]||ut<w.d&&[\"dd\",ut];return w.w!=null&&(ia=ia||lr<=1&&[\"w\"]||lr<w.w&&[\"ww\",lr]),ia=ia||$t<=1&&[\"M\"]||$t<w.M&&[\"MM\",$t]||Fi<=1&&[\"y\"]||[\"yy\",Fi],ia[2]=p,ia[3]=+f>0,ia[4]=S,nF.apply(null,ia)}function iF(f){return f===void 0?Ti:typeof f==\"function\"?(Ti=f,!0):!1}function aF(f,p){return Eo[f]===void 0?!1:p===void 0?Eo[f]:(Eo[f]=p,f===\"s\"&&(Eo.ss=p-1),!0)}function oF(f,p){if(!this.isValid())return this.localeData().invalidDate();var w=!1,S=Eo,F,j;return typeof f==\"object\"&&(p=f,f=!1),typeof f==\"boolean\"&&(w=f),typeof p==\"object\"&&(S=Object.assign({},Eo,p),p.s!=null&&p.ss==null&&(S.ss=p.s-1)),F=this.localeData(),j=rF(this,!w,S,F),w&&(j=F.pastFuture(+this,j)),F.postformat(j)}var Nf=Math.abs;function ko(f){return(f>0)-(f<0)||+f}function du(){if(!this.isValid())return this.localeData().invalidDate();var f=Nf(this._milliseconds)/1e3,p=Nf(this._days),w=Nf(this._months),S,F,j,se,Pe=this.asSeconds(),ut,$t,lr,Fi;return Pe?(S=At(f/60),F=At(S/60),f%=60,S%=60,j=At(w/12),w%=12,se=f?f.toFixed(3).replace(/\\.?0+$/,\"\"):\"\",ut=Pe<0?\"-\":\"\",$t=ko(this._months)!==ko(Pe)?\"-\":\"\",lr=ko(this._days)!==ko(Pe)?\"-\":\"\",Fi=ko(this._milliseconds)!==ko(Pe)?\"-\":\"\",ut+\"P\"+(j?$t+j+\"Y\":\"\")+(w?$t+w+\"M\":\"\")+(p?lr+p+\"D\":\"\")+(F||S||f?\"T\":\"\")+(F?Fi+F+\"H\":\"\")+(S?Fi+S+\"M\":\"\")+(f?Fi+se+\"S\":\"\")):\"P0D\"}var xt=iu.prototype;xt.isValid=Q1,xt.abs=IT,xt.add=AT,xt.subtract=OT,xt.as=PT,xt.asMilliseconds=RT,xt.asSeconds=HT,xt.asMinutes=BT,xt.asHours=VT,xt.asDays=$T,xt.asWeeks=UT,xt.asMonths=WT,xt.asQuarters=YT,xt.asYears=zT,xt.valueOf=NT,xt._bubble=LT,xt.clone=KT,xt.get=jT,xt.milliseconds=qT,xt.seconds=GT,xt.minutes=JT,xt.hours=ZT,xt.days=QT,xt.weeks=tF,xt.months=XT,xt.years=eF,xt.humanize=oF,xt.toISOString=du,xt.toString=du,xt.toJSON=du,xt.locale=zy,xt.localeData=jy,xt.toIsoString=B(\"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)\",du),xt.lang=Ky,N(\"X\",0,0,\"unix\"),N(\"x\",0,0,\"valueOf\"),ae(\"x\",M),ae(\"X\",ie),We(\"X\",function(f,p,w){w._d=new Date(parseFloat(f)*1e3)}),We(\"x\",function(f,p,w){w._d=new Date(Z(f))});return t.version=\"2.29.4\",r(Zt),t.fn=we,t.min=q1,t.max=G1,t.now=J1,t.utc=m,t.unix=kT,t.months=CT,t.isDate=l,t.locale=na,t.invalid=D,t.duration=Zr,t.isMoment=A,t.weekdays=MT,t.parseZone=xT,t.localeData=Ci,t.isDuration=au,t.monthsShort=_T,t.weekdaysMin=FT,t.defineLocale=Ef,t.updateLocale=x1,t.locales=C1,t.weekdaysShort=TT,t.normalizeUnits=Vt,t.relativeTimeRounding=iF,t.relativeTimeThreshold=aF,t.calendarFormat=DM,t.prototype=we,t.HTML5_FMT={DATETIME_LOCAL:\"YYYY-MM-DDTHH:mm\",DATETIME_LOCAL_SECONDS:\"YYYY-MM-DDTHH:mm:ss\",DATETIME_LOCAL_MS:\"YYYY-MM-DDTHH:mm:ss.SSS\",DATE:\"YYYY-MM-DD\",TIME:\"HH:mm\",TIME_SECONDS:\"HH:mm:ss\",TIME_MS:\"HH:mm:ss.SSS\",WEEK:\"GGGG-[W]WW\",MONTH:\"YYYY-MM\"},t})});var dx=wn((Fd,_g)=>{(function(t,r){typeof Fd==\"object\"&&typeof _g==\"object\"?_g.exports=r():typeof define==\"function\"&&define.amd?define([],r):typeof Fd==\"object\"?Fd.Choices=r():t.Choices=r()})(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:a})},r.r=function(n){typeof Symbol!=\"undefined\"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(n,\"__esModule\",{value:!0})},r.t=function(n,i){if(i&1&&(n=r(n)),i&8||i&4&&typeof n==\"object\"&&n&&n.__esModule)return n;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,\"default\",{enumerable:!0,value:n}),i&2&&typeof n!=\"string\")for(var o in n)r.d(a,o,function(s){return n[s]}.bind(null,o));return a},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,\"a\",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p=\"/public/assets/scripts/\",r(r.s=4)}([function(e,t,r){\"use strict\";var n=function(x){return i(x)&&!a(x)};function i(C){return!!C&&typeof C==\"object\"}function a(C){var x=Object.prototype.toString.call(C);return x===\"[object RegExp]\"||x===\"[object Date]\"||u(C)}var o=typeof Symbol==\"function\"&&Symbol.for,s=o?Symbol.for(\"react.element\"):60103;function u(C){return C.$$typeof===s}function l(C){return Array.isArray(C)?[]:{}}function c(C,x){return x.clone!==!1&&x.isMergeableObject(C)?D(l(C),C,x):C}function d(C,x,O){return C.concat(x).map(function(A){return c(A,O)})}function m(C,x){if(!x.customMerge)return D;var O=x.customMerge(C);return typeof O==\"function\"?O:D}function h(C){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(C).filter(function(x){return C.propertyIsEnumerable(x)}):[]}function g(C){return Object.keys(C).concat(h(C))}function y(C,x){try{return x in C&&!(Object.hasOwnProperty.call(C,x)&&Object.propertyIsEnumerable.call(C,x))}catch(O){return!1}}function v(C,x,O){var A={};return O.isMergeableObject(C)&&g(C).forEach(function(P){A[P]=c(C[P],O)}),g(x).forEach(function(P){y(C,P)||(!O.isMergeableObject(x[P])||!C[P]?A[P]=c(x[P],O):A[P]=m(P,O)(C[P],x[P],O))}),A}function D(C,x,O){O=O||{},O.arrayMerge=O.arrayMerge||d,O.isMergeableObject=O.isMergeableObject||n,O.cloneUnlessOtherwiseSpecified=c;var A=Array.isArray(x),P=Array.isArray(C),B=A===P;return B?A?O.arrayMerge(C,x,O):v(C,x,O):c(x,O)}D.all=function(x,O){if(!Array.isArray(x))throw new Error(\"first argument should be an array\");return x.reduce(function(A,P){return D(A,P,O)},{})};var I=D;e.exports=I},function(e,t,r){\"use strict\";(function(n,i){var a=r(3),o;typeof self!=\"undefined\"?o=self:typeof window!=\"undefined\"?o=window:typeof n!=\"undefined\"?o=n:o=i;var s=Object(a.a)(o);t.a=s}).call(this,r(5),r(6)(e))},function(e,t,r){(function(n,i){e.exports=i()})(this,function(){return function(n){var i={};function a(o){if(i[o])return i[o].exports;var s=i[o]={i:o,l:!1,exports:{}};return n[o].call(s.exports,s,s.exports,a),s.l=!0,s.exports}return a.m=n,a.c=i,a.d=function(o,s,u){a.o(o,s)||Object.defineProperty(o,s,{enumerable:!0,get:u})},a.r=function(o){typeof Symbol!=\"undefined\"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(o,\"__esModule\",{value:!0})},a.t=function(o,s){if(1&s&&(o=a(o)),8&s||4&s&&typeof o==\"object\"&&o&&o.__esModule)return o;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,\"default\",{enumerable:!0,value:o}),2&s&&typeof o!=\"string\")for(var l in o)a.d(u,l,function(c){return o[c]}.bind(null,l));return u},a.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(s,\"a\",s),s},a.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},a.p=\"\",a(a.s=1)}([function(n,i){n.exports=function(a){return Array.isArray?Array.isArray(a):Object.prototype.toString.call(a)===\"[object Array]\"}},function(n,i,a){function o(m){return(o=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(h){return typeof h}:function(h){return h&&typeof Symbol==\"function\"&&h.constructor===Symbol&&h!==Symbol.prototype?\"symbol\":typeof h})(m)}function s(m,h){for(var g=0;g<h.length;g++){var y=h[g];y.enumerable=y.enumerable||!1,y.configurable=!0,\"value\"in y&&(y.writable=!0),Object.defineProperty(m,y.key,y)}}var u=a(2),l=a(8),c=a(0),d=function(){function m(v,D){var I=D.location,C=I===void 0?0:I,x=D.distance,O=x===void 0?100:x,A=D.threshold,P=A===void 0?.6:A,B=D.maxPatternLength,G=B===void 0?32:B,J=D.caseSensitive,Q=J!==void 0&&J,oe=D.tokenSeparator,te=oe===void 0?/ +/g:oe,re=D.findAllMatches,ne=re!==void 0&&re,be=D.minMatchCharLength,pe=be===void 0?1:be,De=D.id,Ce=De===void 0?null:De,U=D.keys,Je=U===void 0?[]:U,it=D.shouldSort,N=it===void 0||it,Ze=D.getFn,It=Ze===void 0?l:Ze,Mt=D.sortFn,jt=Mt===void 0?function(sn,Rt){return sn.score-Rt.score}:Mt,vt=D.tokenize,Wt=vt!==void 0&&vt,Tt=D.matchAllTokens,Jt=Tt!==void 0&&Tt,en=D.includeMatches,gn=en!==void 0&&en,yn=D.includeScore,vn=yn!==void 0&&yn,xn=D.verbose,jn=xn!==void 0&&xn;(function(sn,Rt){if(!(sn instanceof Rt))throw new TypeError(\"Cannot call a class as a function\")})(this,m),this.options={location:C,distance:O,threshold:P,maxPatternLength:G,isCaseSensitive:Q,tokenSeparator:te,findAllMatches:ne,minMatchCharLength:pe,id:Ce,keys:Je,includeMatches:gn,includeScore:vn,shouldSort:N,getFn:It,sortFn:jt,verbose:jn,tokenize:Wt,matchAllTokens:Jt},this.setCollection(v)}var h,g,y;return h=m,(g=[{key:\"setCollection\",value:function(v){return this.list=v,v}},{key:\"search\",value:function(v){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{limit:!1};this._log(`---------\nSearch pattern: \"`.concat(v,'\"'));var I=this._prepareSearchers(v),C=I.tokenSearchers,x=I.fullSearcher,O=this._search(C,x),A=O.weights,P=O.results;return this._computeScore(A,P),this.options.shouldSort&&this._sort(P),D.limit&&typeof D.limit==\"number\"&&(P=P.slice(0,D.limit)),this._format(P)}},{key:\"_prepareSearchers\",value:function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:\"\",D=[];if(this.options.tokenize)for(var I=v.split(this.options.tokenSeparator),C=0,x=I.length;C<x;C+=1)D.push(new u(I[C],this.options));return{tokenSearchers:D,fullSearcher:new u(v,this.options)}}},{key:\"_search\",value:function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],D=arguments.length>1?arguments[1]:void 0,I=this.list,C={},x=[];if(typeof I[0]==\"string\"){for(var O=0,A=I.length;O<A;O+=1)this._analyze({key:\"\",value:I[O],record:O,index:O},{resultMap:C,results:x,tokenSearchers:v,fullSearcher:D});return{weights:null,results:x}}for(var P={},B=0,G=I.length;B<G;B+=1)for(var J=I[B],Q=0,oe=this.options.keys.length;Q<oe;Q+=1){var te=this.options.keys[Q];if(typeof te!=\"string\"){if(P[te.name]={weight:1-te.weight||1},te.weight<=0||te.weight>1)throw new Error(\"Key weight has to be > 0 and <= 1\");te=te.name}else P[te]={weight:1};this._analyze({key:te,value:this.options.getFn(J,te),record:J,index:B},{resultMap:C,results:x,tokenSearchers:v,fullSearcher:D})}return{weights:P,results:x}}},{key:\"_analyze\",value:function(v,D){var I=v.key,C=v.arrayIndex,x=C===void 0?-1:C,O=v.value,A=v.record,P=v.index,B=D.tokenSearchers,G=B===void 0?[]:B,J=D.fullSearcher,Q=J===void 0?[]:J,oe=D.resultMap,te=oe===void 0?{}:oe,re=D.results,ne=re===void 0?[]:re;if(O!=null){var be=!1,pe=-1,De=0;if(typeof O==\"string\"){this._log(`\nKey: `.concat(I===\"\"?\"-\":I));var Ce=Q.search(O);if(this._log('Full text: \"'.concat(O,'\", score: ').concat(Ce.score)),this.options.tokenize){for(var U=O.split(this.options.tokenSeparator),Je=[],it=0;it<G.length;it+=1){var N=G[it];this._log(`\nPattern: \"`.concat(N.pattern,'\"'));for(var Ze=!1,It=0;It<U.length;It+=1){var Mt=U[It],jt=N.search(Mt),vt={};jt.isMatch?(vt[Mt]=jt.score,be=!0,Ze=!0,Je.push(jt.score)):(vt[Mt]=1,this.options.matchAllTokens||Je.push(1)),this._log('Token: \"'.concat(Mt,'\", score: ').concat(vt[Mt]))}Ze&&(De+=1)}pe=Je[0];for(var Wt=Je.length,Tt=1;Tt<Wt;Tt+=1)pe+=Je[Tt];pe/=Wt,this._log(\"Token score average:\",pe)}var Jt=Ce.score;pe>-1&&(Jt=(Jt+pe)/2),this._log(\"Score average:\",Jt);var en=!this.options.tokenize||!this.options.matchAllTokens||De>=G.length;if(this._log(`\nCheck Matches: `.concat(en)),(be||Ce.isMatch)&&en){var gn=te[P];gn?gn.output.push({key:I,arrayIndex:x,value:O,score:Jt,matchedIndices:Ce.matchedIndices}):(te[P]={item:A,output:[{key:I,arrayIndex:x,value:O,score:Jt,matchedIndices:Ce.matchedIndices}]},ne.push(te[P]))}}else if(c(O))for(var yn=0,vn=O.length;yn<vn;yn+=1)this._analyze({key:I,arrayIndex:yn,value:O[yn],record:A,index:P},{resultMap:te,results:ne,tokenSearchers:G,fullSearcher:Q})}}},{key:\"_computeScore\",value:function(v,D){this._log(`\n\nComputing score:\n`);for(var I=0,C=D.length;I<C;I+=1){for(var x=D[I].output,O=x.length,A=1,P=1,B=0;B<O;B+=1){var G=v?v[x[B].key].weight:1,J=(G===1?x[B].score:x[B].score||.001)*G;G!==1?P=Math.min(P,J):(x[B].nScore=J,A*=J)}D[I].score=P===1?A:P,this._log(D[I])}}},{key:\"_sort\",value:function(v){this._log(`\n\nSorting....`),v.sort(this.options.sortFn)}},{key:\"_format\",value:function(v){var D=[];if(this.options.verbose){var I=[];this._log(`\n\nOutput:\n\n`,JSON.stringify(v,function(J,Q){if(o(Q)===\"object\"&&Q!==null){if(I.indexOf(Q)!==-1)return;I.push(Q)}return Q})),I=null}var C=[];this.options.includeMatches&&C.push(function(J,Q){var oe=J.output;Q.matches=[];for(var te=0,re=oe.length;te<re;te+=1){var ne=oe[te];if(ne.matchedIndices.length!==0){var be={indices:ne.matchedIndices,value:ne.value};ne.key&&(be.key=ne.key),ne.hasOwnProperty(\"arrayIndex\")&&ne.arrayIndex>-1&&(be.arrayIndex=ne.arrayIndex),Q.matches.push(be)}}}),this.options.includeScore&&C.push(function(J,Q){Q.score=J.score});for(var x=0,O=v.length;x<O;x+=1){var A=v[x];if(this.options.id&&(A.item=this.options.getFn(A.item,this.options.id)[0]),C.length){for(var P={item:A.item},B=0,G=C.length;B<G;B+=1)C[B](A,P);D.push(P)}else D.push(A.item)}return D}},{key:\"_log\",value:function(){var v;this.options.verbose&&(v=console).log.apply(v,arguments)}}])&&s(h.prototype,g),y&&s(h,y),m}();n.exports=d},function(n,i,a){function o(d,m){for(var h=0;h<m.length;h++){var g=m[h];g.enumerable=g.enumerable||!1,g.configurable=!0,\"value\"in g&&(g.writable=!0),Object.defineProperty(d,g.key,g)}}var s=a(3),u=a(4),l=a(7),c=function(){function d(y,v){var D=v.location,I=D===void 0?0:D,C=v.distance,x=C===void 0?100:C,O=v.threshold,A=O===void 0?.6:O,P=v.maxPatternLength,B=P===void 0?32:P,G=v.isCaseSensitive,J=G!==void 0&&G,Q=v.tokenSeparator,oe=Q===void 0?/ +/g:Q,te=v.findAllMatches,re=te!==void 0&&te,ne=v.minMatchCharLength,be=ne===void 0?1:ne;(function(pe,De){if(!(pe instanceof De))throw new TypeError(\"Cannot call a class as a function\")})(this,d),this.options={location:I,distance:x,threshold:A,maxPatternLength:B,isCaseSensitive:J,tokenSeparator:oe,findAllMatches:re,minMatchCharLength:be},this.pattern=this.options.isCaseSensitive?y:y.toLowerCase(),this.pattern.length<=B&&(this.patternAlphabet=l(this.pattern))}var m,h,g;return m=d,(h=[{key:\"search\",value:function(y){if(this.options.isCaseSensitive||(y=y.toLowerCase()),this.pattern===y)return{isMatch:!0,score:0,matchedIndices:[[0,y.length-1]]};var v=this.options,D=v.maxPatternLength,I=v.tokenSeparator;if(this.pattern.length>D)return s(y,this.pattern,I);var C=this.options,x=C.location,O=C.distance,A=C.threshold,P=C.findAllMatches,B=C.minMatchCharLength;return u(y,this.pattern,this.patternAlphabet,{location:x,distance:O,threshold:A,findAllMatches:P,minMatchCharLength:B})}}])&&o(m.prototype,h),g&&o(m,g),d}();n.exports=c},function(n,i){var a=/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g;n.exports=function(o,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:/ +/g,l=new RegExp(s.replace(a,\"\\\\$&\").replace(u,\"|\")),c=o.match(l),d=!!c,m=[];if(d)for(var h=0,g=c.length;h<g;h+=1){var y=c[h];m.push([o.indexOf(y),y.length-1])}return{score:d?.5:1,isMatch:d,matchedIndices:m}}},function(n,i,a){var o=a(5),s=a(6);n.exports=function(u,l,c,d){for(var m=d.location,h=m===void 0?0:m,g=d.distance,y=g===void 0?100:g,v=d.threshold,D=v===void 0?.6:v,I=d.findAllMatches,C=I!==void 0&&I,x=d.minMatchCharLength,O=x===void 0?1:x,A=h,P=u.length,B=D,G=u.indexOf(l,A),J=l.length,Q=[],oe=0;oe<P;oe+=1)Q[oe]=0;if(G!==-1){var te=o(l,{errors:0,currentLocation:G,expectedLocation:A,distance:y});if(B=Math.min(te,B),(G=u.lastIndexOf(l,A+J))!==-1){var re=o(l,{errors:0,currentLocation:G,expectedLocation:A,distance:y});B=Math.min(re,B)}}G=-1;for(var ne=[],be=1,pe=J+P,De=1<<J-1,Ce=0;Ce<J;Ce+=1){for(var U=0,Je=pe;U<Je;)o(l,{errors:Ce,currentLocation:A+Je,expectedLocation:A,distance:y})<=B?U=Je:pe=Je,Je=Math.floor((pe-U)/2+U);pe=Je;var it=Math.max(1,A-Je+1),N=C?P:Math.min(A+Je,P)+J,Ze=Array(N+2);Ze[N+1]=(1<<Ce)-1;for(var It=N;It>=it;It-=1){var Mt=It-1,jt=c[u.charAt(Mt)];if(jt&&(Q[Mt]=1),Ze[It]=(Ze[It+1]<<1|1)&jt,Ce!==0&&(Ze[It]|=(ne[It+1]|ne[It])<<1|1|ne[It+1]),Ze[It]&De&&(be=o(l,{errors:Ce,currentLocation:Mt,expectedLocation:A,distance:y}))<=B){if(B=be,(G=Mt)<=A)break;it=Math.max(1,2*A-G)}}if(o(l,{errors:Ce+1,currentLocation:A,expectedLocation:A,distance:y})>B)break;ne=Ze}return{isMatch:G>=0,score:be===0?.001:be,matchedIndices:s(Q,O)}}},function(n,i){n.exports=function(a,o){var s=o.errors,u=s===void 0?0:s,l=o.currentLocation,c=l===void 0?0:l,d=o.expectedLocation,m=d===void 0?0:d,h=o.distance,g=h===void 0?100:h,y=u/a.length,v=Math.abs(m-c);return g?y+v/g:v?1:y}},function(n,i){n.exports=function(){for(var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,s=[],u=-1,l=-1,c=0,d=a.length;c<d;c+=1){var m=a[c];m&&u===-1?u=c:m||u===-1||((l=c-1)-u+1>=o&&s.push([u,l]),u=-1)}return a[c-1]&&c-u>=o&&s.push([u,c-1]),s}},function(n,i){n.exports=function(a){for(var o={},s=a.length,u=0;u<s;u+=1)o[a.charAt(u)]=0;for(var l=0;l<s;l+=1)o[a.charAt(l)]|=1<<s-l-1;return o}},function(n,i,a){var o=a(0);n.exports=function(s,u){return function l(c,d,m){if(d){var h=d.indexOf(\".\"),g=d,y=null;h!==-1&&(g=d.slice(0,h),y=d.slice(h+1));var v=c[g];if(v!=null)if(y||typeof v!=\"string\"&&typeof v!=\"number\")if(o(v))for(var D=0,I=v.length;D<I;D+=1)l(v[D],y,m);else y&&l(v,y,m);else m.push(v.toString())}else m.push(c);return m}(s,u,[])}}])})},function(e,t,r){\"use strict\";r.d(t,\"a\",function(){return n});function n(i){var a,o=i.Symbol;return typeof o==\"function\"?o.observable?a=o.observable:(a=o(\"observable\"),o.observable=a):a=\"@@observable\",a}},function(e,t,r){e.exports=r(7)},function(e,t){var r;r=function(){return this}();try{r=r||new Function(\"return this\")()}catch(n){typeof window==\"object\"&&(r=window)}e.exports=r},function(e,t){e.exports=function(r){if(!r.webpackPolyfill){var n=Object.create(r);n.children||(n.children=[]),Object.defineProperty(n,\"loaded\",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,\"id\",{enumerable:!0,get:function(){return n.i}}),Object.defineProperty(n,\"exports\",{enumerable:!0}),n.webpackPolyfill=1}return n}},function(e,t,r){\"use strict\";r.r(t);var n=r(2),i=r.n(n),a=r(0),o=r.n(a),s=r(1),u=function(){return Math.random().toString(36).substring(7).split(\"\").join(\".\")},l={INIT:\"@@redux/INIT\"+u(),REPLACE:\"@@redux/REPLACE\"+u(),PROBE_UNKNOWN_ACTION:function(){return\"@@redux/PROBE_UNKNOWN_ACTION\"+u()}};function c(z){if(typeof z!=\"object\"||z===null)return!1;for(var k=z;Object.getPrototypeOf(k)!==null;)k=Object.getPrototypeOf(k);return Object.getPrototypeOf(z)===k}function d(z,k,_){var b;if(typeof k==\"function\"&&typeof _==\"function\"||typeof _==\"function\"&&typeof arguments[3]==\"function\")throw new Error(\"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.\");if(typeof k==\"function\"&&typeof _==\"undefined\"&&(_=k,k=void 0),typeof _!=\"undefined\"){if(typeof _!=\"function\")throw new Error(\"Expected the enhancer to be a function.\");return _(d)(z,k)}if(typeof z!=\"function\")throw new Error(\"Expected the reducer to be a function.\");var T=z,V=k,Y=[],X=Y,le=!1;function he(){X===Y&&(X=Y.slice())}function Me(){if(le)throw new Error(\"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.\");return V}function Ve(qe){if(typeof qe!=\"function\")throw new Error(\"Expected the listener to be a function.\");if(le)throw new Error(\"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.\");var yt=!0;return he(),X.push(qe),function(){if(yt){if(le)throw new Error(\"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.\");yt=!1,he();var lt=X.indexOf(qe);X.splice(lt,1)}}}function Le(qe){if(!c(qe))throw new Error(\"Actions must be plain objects. Use custom middleware for async actions.\");if(typeof qe.type==\"undefined\")throw new Error('Actions may not have an undefined \"type\" property. Have you misspelled a constant?');if(le)throw new Error(\"Reducers may not dispatch actions.\");try{le=!0,V=T(V,qe)}finally{le=!1}for(var yt=Y=X,st=0;st<yt.length;st++){var lt=yt[st];lt()}return qe}function Qe(qe){if(typeof qe!=\"function\")throw new Error(\"Expected the nextReducer to be a function.\");T=qe,Le({type:l.REPLACE})}function ot(){var qe,yt=Ve;return qe={subscribe:function(lt){if(typeof lt!=\"object\"||lt===null)throw new TypeError(\"Expected the observer to be an object.\");function qt(){lt.next&&lt.next(Me())}qt();var On=yt(qt);return{unsubscribe:On}}},qe[s.a]=function(){return this},qe}return Le({type:l.INIT}),b={dispatch:Le,subscribe:Ve,getState:Me,replaceReducer:Qe},b[s.a]=ot,b}function m(z){typeof console!=\"undefined\"&&typeof console.error==\"function\"&&console.error(z);try{throw new Error(z)}catch(k){}}function h(z,k){var _=k&&k.type,b=_&&'action \"'+String(_)+'\"'||\"an action\";return\"Given \"+b+', reducer \"'+z+'\" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function g(z,k,_,b){var T=Object.keys(k),V=_&&_.type===l.INIT?\"preloadedState argument passed to createStore\":\"previous state received by the reducer\";if(T.length===0)return\"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.\";if(!c(z))return\"The \"+V+' has unexpected type of \"'+{}.toString.call(z).match(/\\s([a-z|A-Z]+)/)[1]+'\". Expected argument to be an object with the following '+('keys: \"'+T.join('\", \"')+'\"');var Y=Object.keys(z).filter(function(X){return!k.hasOwnProperty(X)&&!b[X]});if(Y.forEach(function(X){b[X]=!0}),!(_&&_.type===l.REPLACE)&&Y.length>0)return\"Unexpected \"+(Y.length>1?\"keys\":\"key\")+\" \"+('\"'+Y.join('\", \"')+'\" found in '+V+\". \")+\"Expected to find one of the known reducer keys instead: \"+('\"'+T.join('\", \"')+'\". Unexpected keys will be ignored.')}function y(z){Object.keys(z).forEach(function(k){var _=z[k],b=_(void 0,{type:l.INIT});if(typeof b==\"undefined\")throw new Error('Reducer \"'+k+`\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof _(void 0,{type:l.PROBE_UNKNOWN_ACTION()})==\"undefined\")throw new Error('Reducer \"'+k+'\" returned undefined when probed with a random type. '+(\"Don't try to handle \"+l.INIT+' or other actions in \"redux/*\" ')+\"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.\")})}function v(z){for(var k=Object.keys(z),_={},b=0;b<k.length;b++){var T=k[b];typeof z[T]==\"function\"&&(_[T]=z[T])}var V=Object.keys(_),Y,X;try{y(_)}catch(le){X=le}return function(he,Me){if(he===void 0&&(he={}),X)throw X;if(0)var Ve;for(var Le=!1,Qe={},ot=0;ot<V.length;ot++){var qe=V[ot],yt=_[qe],st=he[qe],lt=yt(st,Me);if(typeof lt==\"undefined\"){var qt=h(qe,Me);throw new Error(qt)}Qe[qe]=lt,Le=Le||lt!==st}return Le?Qe:he}}function D(z,k){return function(){return k(z.apply(this,arguments))}}function I(z,k){if(typeof z==\"function\")return D(z,k);if(typeof z!=\"object\"||z===null)throw new Error(\"bindActionCreators expected an object or a function, instead received \"+(z===null?\"null\":typeof z)+'. Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');var _={};for(var b in z){var T=z[b];typeof T==\"function\"&&(_[b]=D(T,k))}return _}function C(z,k,_){return k in z?Object.defineProperty(z,k,{value:_,enumerable:!0,configurable:!0,writable:!0}):z[k]=_,z}function x(z,k){var _=Object.keys(z);return Object.getOwnPropertySymbols&&_.push.apply(_,Object.getOwnPropertySymbols(z)),k&&(_=_.filter(function(b){return Object.getOwnPropertyDescriptor(z,b).enumerable})),_}function O(z){for(var k=1;k<arguments.length;k++){var _=arguments[k]!=null?arguments[k]:{};k%2?x(_,!0).forEach(function(b){C(z,b,_[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors(_)):x(_).forEach(function(b){Object.defineProperty(z,b,Object.getOwnPropertyDescriptor(_,b))})}return z}function A(){for(var z=arguments.length,k=new Array(z),_=0;_<z;_++)k[_]=arguments[_];return k.length===0?function(b){return b}:k.length===1?k[0]:k.reduce(function(b,T){return function(){return b(T.apply(void 0,arguments))}})}function P(){for(var z=arguments.length,k=new Array(z),_=0;_<z;_++)k[_]=arguments[_];return function(b){return function(){var T=b.apply(void 0,arguments),V=function(){throw new Error(\"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.\")},Y={getState:T.getState,dispatch:function(){return V.apply(void 0,arguments)}},X=k.map(function(le){return le(Y)});return V=A.apply(void 0,X)(T.dispatch),O({},T,{dispatch:V})}}}function B(){}var G=[];function J(z,k){switch(z===void 0&&(z=G),k.type){case\"ADD_ITEM\":{var _=[].concat(z,[{id:k.id,choiceId:k.choiceId,groupId:k.groupId,value:k.value,label:k.label,active:!0,highlighted:!1,customProperties:k.customProperties,placeholder:k.placeholder||!1,keyCode:null}]);return _.map(function(b){var T=b;return T.highlighted=!1,T})}case\"REMOVE_ITEM\":return z.map(function(b){var T=b;return T.id===k.id&&(T.active=!1),T});case\"HIGHLIGHT_ITEM\":return z.map(function(b){var T=b;return T.id===k.id&&(T.highlighted=k.highlighted),T});default:return z}}var Q=[];function oe(z,k){switch(z===void 0&&(z=Q),k.type){case\"ADD_GROUP\":return[].concat(z,[{id:k.id,value:k.value,active:k.active,disabled:k.disabled}]);case\"CLEAR_CHOICES\":return[];default:return z}}var te=[];function re(z,k){switch(z===void 0&&(z=te),k.type){case\"ADD_CHOICE\":return[].concat(z,[{id:k.id,elementId:k.elementId,groupId:k.groupId,value:k.value,label:k.label||k.value,disabled:k.disabled||!1,selected:!1,active:!0,score:9999,customProperties:k.customProperties,placeholder:k.placeholder||!1,keyCode:null}]);case\"ADD_ITEM\":return k.activateOptions?z.map(function(_){var b=_;return b.active=k.active,b}):k.choiceId>-1?z.map(function(_){var b=_;return b.id===parseInt(k.choiceId,10)&&(b.selected=!0),b}):z;case\"REMOVE_ITEM\":return k.choiceId>-1?z.map(function(_){var b=_;return b.id===parseInt(k.choiceId,10)&&(b.selected=!1),b}):z;case\"FILTER_CHOICES\":return z.map(function(_){var b=_;return b.active=k.results.some(function(T){var V=T.item,Y=T.score;return V.id===b.id?(b.score=Y,!0):!1}),b});case\"ACTIVATE_CHOICES\":return z.map(function(_){var b=_;return b.active=k.active,b});case\"CLEAR_CHOICES\":return te;default:return z}}var ne={loading:!1},be=function(k,_){switch(k===void 0&&(k=ne),_.type){case\"SET_IS_LOADING\":return{loading:_.isLoading};default:return k}},pe=be,De=function(k,_){return Math.floor(Math.random()*(_-k)+k)},Ce=function(k){return Array.from({length:k},function(){return De(0,36).toString(36)}).join(\"\")},U=function(k,_){var b=k.id||k.name&&k.name+\"-\"+Ce(2)||Ce(4);return b=b.replace(/(:|\\.|\\[|\\]|,)/g,\"\"),b=_+\"-\"+b,b},Je=function(k){return Object.prototype.toString.call(k).slice(8,-1)},it=function(k,_){return _!=null&&Je(_)===k},N=function(k,_){return _===void 0&&(_=document.createElement(\"div\")),k.nextSibling?k.parentNode.insertBefore(_,k.nextSibling):k.parentNode.appendChild(_),_.appendChild(k)},Ze=function(k,_,b){if(b===void 0&&(b=1),!(!(k instanceof Element)||typeof _!=\"string\")){for(var T=(b>0?\"next\":\"previous\")+\"ElementSibling\",V=k[T];V;){if(V.matches(_))return V;V=V[T]}return V}},It=function(k,_,b){if(b===void 0&&(b=1),!k)return!1;var T;return b>0?T=_.scrollTop+_.offsetHeight>=k.offsetTop+k.offsetHeight:T=k.offsetTop>=_.scrollTop,T},Mt=function(k){return typeof k!=\"string\"?k:k.replace(/&/g,\"&amp;\").replace(/>/g,\"&rt;\").replace(/</g,\"&lt;\").replace(/\"/g,\"&quot;\")},jt=function(){var z=document.createElement(\"div\");return function(k){var _=k.trim();z.innerHTML=_;for(var b=z.children[0];z.firstChild;)z.removeChild(z.firstChild);return b}}(),vt=function(k,_){var b=k.value,T=k.label,V=T===void 0?b:T,Y=_.value,X=_.label,le=X===void 0?Y:X;return V.localeCompare(le,[],{sensitivity:\"base\",ignorePunctuation:!0,numeric:!0})},Wt=function(k,_){return k.score-_.score},Tt=function(k,_,b){b===void 0&&(b=null);var T=new CustomEvent(_,{detail:b,bubbles:!0,cancelable:!0});return k.dispatchEvent(T)},Jt=function(k,_,b){return b===void 0&&(b=\"value\"),k.some(function(T){return typeof _==\"string\"?T[b]===_.trim():T[b]===_})},en=function(k){return JSON.parse(JSON.stringify(k))},gn=function(k,_){var b=Object.keys(k).sort(),T=Object.keys(_).sort();return b.filter(function(V){return T.indexOf(V)<0})},yn=v({items:J,groups:oe,choices:re,general:pe}),vn=function(k,_){var b=k;if(_.type===\"CLEAR_ALL\")b=void 0;else if(_.type===\"RESET_TO\")return en(_.state);return yn(b,_)},xn=vn;function jn(z,k){for(var _=0;_<k.length;_++){var b=k[_];b.enumerable=b.enumerable||!1,b.configurable=!0,\"value\"in b&&(b.writable=!0),Object.defineProperty(z,b.key,b)}}function sn(z,k,_){return k&&jn(z.prototype,k),_&&jn(z,_),z}var Rt=function(){function z(){this._store=d(xn,window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__())}var k=z.prototype;return k.subscribe=function(b){this._store.subscribe(b)},k.dispatch=function(b){this._store.dispatch(b)},k.isLoading=function(){return this.state.general.loading},k.getChoiceById=function(b){return this.activeChoices.find(function(T){return T.id===parseInt(b,10)})},k.getGroupById=function(b){return this.groups.find(function(T){return T.id===b})},sn(z,[{key:\"state\",get:function(){return this._store.getState()}},{key:\"items\",get:function(){return this.state.items}},{key:\"activeItems\",get:function(){return this.items.filter(function(b){return b.active===!0})}},{key:\"highlightedActiveItems\",get:function(){return this.items.filter(function(b){return b.active&&b.highlighted})}},{key:\"choices\",get:function(){return this.state.choices}},{key:\"activeChoices\",get:function(){return this.choices.filter(function(b){return b.active===!0})}},{key:\"selectableChoices\",get:function(){return this.choices.filter(function(b){return b.disabled!==!0})}},{key:\"searchableChoices\",get:function(){return this.selectableChoices.filter(function(b){return b.placeholder!==!0})}},{key:\"placeholderChoice\",get:function(){return[].concat(this.choices).reverse().find(function(b){return b.placeholder===!0})}},{key:\"groups\",get:function(){return this.state.groups}},{key:\"activeGroups\",get:function(){var b=this.groups,T=this.choices;return b.filter(function(V){var Y=V.active===!0&&V.disabled===!1,X=T.some(function(le){return le.active===!0&&le.disabled===!1});return Y&&X},[])}}]),z}();function Vt(z,k){for(var _=0;_<k.length;_++){var b=k[_];b.enumerable=b.enumerable||!1,b.configurable=!0,\"value\"in b&&(b.writable=!0),Object.defineProperty(z,b.key,b)}}function Sr(z,k,_){return k&&Vt(z.prototype,k),_&&Vt(z,_),z}var Rr=function(){function z(_){var b=_.element,T=_.type,V=_.classNames;this.element=b,this.classNames=V,this.type=T,this.isActive=!1}var k=z.prototype;return k.getChild=function(b){return this.element.querySelector(b)},k.show=function(){return this.element.classList.add(this.classNames.activeState),this.element.setAttribute(\"aria-expanded\",\"true\"),this.isActive=!0,this},k.hide=function(){return this.element.classList.remove(this.classNames.activeState),this.element.setAttribute(\"aria-expanded\",\"false\"),this.isActive=!1,this},Sr(z,[{key:\"distanceFromTopWindow\",get:function(){return this.element.getBoundingClientRect().bottom}}]),z}(),Bt={containerOuter:\"choices\",containerInner:\"choices__inner\",input:\"choices__input\",inputCloned:\"choices__input--cloned\",list:\"choices__list\",listItems:\"choices__list--multiple\",listSingle:\"choices__list--single\",listDropdown:\"choices__list--dropdown\",item:\"choices__item\",itemSelectable:\"choices__item--selectable\",itemDisabled:\"choices__item--disabled\",itemChoice:\"choices__item--choice\",placeholder:\"choices__placeholder\",group:\"choices__group\",groupHeading:\"choices__heading\",button:\"choices__button\",activeState:\"is-active\",focusState:\"is-focused\",openState:\"is-open\",disabledState:\"is-disabled\",highlightedState:\"is-highlighted\",selectedState:\"is-selected\",flippedState:\"is-flipped\",loadingState:\"is-loading\",noResults:\"has-no-results\",noChoices:\"has-no-choices\"},Hr={items:[],choices:[],silent:!1,renderChoiceLimit:-1,maxItemCount:-1,addItems:!0,addItemFilter:null,removeItems:!0,removeItemButton:!1,editItems:!1,duplicateItemsAllowed:!0,delimiter:\",\",paste:!0,searchEnabled:!0,searchChoices:!0,searchFloor:1,searchResultLimit:4,searchFields:[\"label\",\"value\"],position:\"auto\",resetScrollPosition:!0,shouldSort:!0,shouldSortItems:!1,sorter:vt,placeholder:!0,placeholderValue:null,searchPlaceholderValue:null,prependValue:null,appendValue:null,renderSelectedChoices:\"auto\",loadingText:\"Loading...\",noResultsText:\"No results found\",noChoicesText:\"No choices to choose from\",itemSelectText:\"Press to select\",uniqueItemText:\"Only unique values can be added\",customAddItemText:\"Only values matching specific conditions can be added\",addItemText:function(k){return'Press Enter to add <b>\"'+Mt(k)+'\"</b>'},maxItemText:function(k){return\"Only \"+k+\" values can be added\"},valueComparer:function(k,_){return k===_},fuseOptions:{includeScore:!0},callbackOnInit:null,callbackOnCreateTemplates:null,classNames:Bt},rn={showDropdown:\"showDropdown\",hideDropdown:\"hideDropdown\",change:\"change\",choice:\"choice\",search:\"search\",addItem:\"addItem\",removeItem:\"removeItem\",highlightItem:\"highlightItem\",highlightChoice:\"highlightChoice\"},At={ADD_CHOICE:\"ADD_CHOICE\",FILTER_CHOICES:\"FILTER_CHOICES\",ACTIVATE_CHOICES:\"ACTIVATE_CHOICES\",CLEAR_CHOICES:\"CLEAR_CHOICES\",ADD_GROUP:\"ADD_GROUP\",ADD_ITEM:\"ADD_ITEM\",REMOVE_ITEM:\"REMOVE_ITEM\",HIGHLIGHT_ITEM:\"HIGHLIGHT_ITEM\",CLEAR_ALL:\"CLEAR_ALL\"},Z={BACK_KEY:46,DELETE_KEY:8,ENTER_KEY:13,A_KEY:65,ESC_KEY:27,UP_KEY:38,DOWN_KEY:40,PAGE_UP_KEY:33,PAGE_DOWN_KEY:34},me=\"text\",Ie=\"select-one\",at=\"select-multiple\",Dt=4,Cn=function(){function z(_){var b=_.element,T=_.type,V=_.classNames,Y=_.position;this.element=b,this.classNames=V,this.type=T,this.position=Y,this.isOpen=!1,this.isFlipped=!1,this.isFocussed=!1,this.isDisabled=!1,this.isLoading=!1,this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}var k=z.prototype;return k.addEventListeners=function(){this.element.addEventListener(\"focus\",this._onFocus),this.element.addEventListener(\"blur\",this._onBlur)},k.removeEventListeners=function(){this.element.removeEventListener(\"focus\",this._onFocus),this.element.removeEventListener(\"blur\",this._onBlur)},k.shouldFlip=function(b){if(typeof b!=\"number\")return!1;var T=!1;return this.position===\"auto\"?T=!window.matchMedia(\"(min-height: \"+(b+1)+\"px)\").matches:this.position===\"top\"&&(T=!0),T},k.setActiveDescendant=function(b){this.element.setAttribute(\"aria-activedescendant\",b)},k.removeActiveDescendant=function(){this.element.removeAttribute(\"aria-activedescendant\")},k.open=function(b){this.element.classList.add(this.classNames.openState),this.element.setAttribute(\"aria-expanded\",\"true\"),this.isOpen=!0,this.shouldFlip(b)&&(this.element.classList.add(this.classNames.flippedState),this.isFlipped=!0)},k.close=function(){this.element.classList.remove(this.classNames.openState),this.element.setAttribute(\"aria-expanded\",\"false\"),this.removeActiveDescendant(),this.isOpen=!1,this.isFlipped&&(this.element.classList.remove(this.classNames.flippedState),this.isFlipped=!1)},k.focus=function(){this.isFocussed||this.element.focus()},k.addFocusState=function(){this.element.classList.add(this.classNames.focusState)},k.removeFocusState=function(){this.element.classList.remove(this.classNames.focusState)},k.enable=function(){this.element.classList.remove(this.classNames.disabledState),this.element.removeAttribute(\"aria-disabled\"),this.type===Ie&&this.element.setAttribute(\"tabindex\",\"0\"),this.isDisabled=!1},k.disable=function(){this.element.classList.add(this.classNames.disabledState),this.element.setAttribute(\"aria-disabled\",\"true\"),this.type===Ie&&this.element.setAttribute(\"tabindex\",\"-1\"),this.isDisabled=!0},k.wrap=function(b){N(b,this.element)},k.unwrap=function(b){this.element.parentNode.insertBefore(b,this.element),this.element.parentNode.removeChild(this.element)},k.addLoadingState=function(){this.element.classList.add(this.classNames.loadingState),this.element.setAttribute(\"aria-busy\",\"true\"),this.isLoading=!0},k.removeLoadingState=function(){this.element.classList.remove(this.classNames.loadingState),this.element.removeAttribute(\"aria-busy\"),this.isLoading=!1},k._onFocus=function(){this.isFocussed=!0},k._onBlur=function(){this.isFocussed=!1},z}();function _n(z,k){for(var _=0;_<k.length;_++){var b=k[_];b.enumerable=b.enumerable||!1,b.configurable=!0,\"value\"in b&&(b.writable=!0),Object.defineProperty(z,b.key,b)}}function Ht(z,k,_){return k&&_n(z.prototype,k),_&&_n(z,_),z}var ar=function(){function z(_){var b=_.element,T=_.type,V=_.classNames,Y=_.preventPaste;this.element=b,this.type=T,this.classNames=V,this.preventPaste=Y,this.isFocussed=this.element===document.activeElement,this.isDisabled=b.disabled,this._onPaste=this._onPaste.bind(this),this._onInput=this._onInput.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}var k=z.prototype;return k.addEventListeners=function(){this.element.addEventListener(\"paste\",this._onPaste),this.element.addEventListener(\"input\",this._onInput,{passive:!0}),this.element.addEventListener(\"focus\",this._onFocus,{passive:!0}),this.element.addEventListener(\"blur\",this._onBlur,{passive:!0})},k.removeEventListeners=function(){this.element.removeEventListener(\"input\",this._onInput,{passive:!0}),this.element.removeEventListener(\"paste\",this._onPaste),this.element.removeEventListener(\"focus\",this._onFocus,{passive:!0}),this.element.removeEventListener(\"blur\",this._onBlur,{passive:!0})},k.enable=function(){this.element.removeAttribute(\"disabled\"),this.isDisabled=!1},k.disable=function(){this.element.setAttribute(\"disabled\",\"\"),this.isDisabled=!0},k.focus=function(){this.isFocussed||this.element.focus()},k.blur=function(){this.isFocussed&&this.element.blur()},k.clear=function(b){return b===void 0&&(b=!0),this.element.value&&(this.element.value=\"\"),b&&this.setWidth(),this},k.setWidth=function(){var b=this.element,T=b.style,V=b.value,Y=b.placeholder;T.minWidth=Y.length+1+\"ch\",T.width=V.length+1+\"ch\"},k.setActiveDescendant=function(b){this.element.setAttribute(\"aria-activedescendant\",b)},k.removeActiveDescendant=function(){this.element.removeAttribute(\"aria-activedescendant\")},k._onInput=function(){this.type!==Ie&&this.setWidth()},k._onPaste=function(b){this.preventPaste&&b.preventDefault()},k._onFocus=function(){this.isFocussed=!0},k._onBlur=function(){this.isFocussed=!1},Ht(z,[{key:\"placeholder\",set:function(b){this.element.placeholder=b}},{key:\"value\",get:function(){return Mt(this.element.value)},set:function(b){this.element.value=b}}]),z}(),ht=function(){function z(_){var b=_.element;this.element=b,this.scrollPos=this.element.scrollTop,this.height=this.element.offsetHeight}var k=z.prototype;return k.clear=function(){this.element.innerHTML=\"\"},k.append=function(b){this.element.appendChild(b)},k.getChild=function(b){return this.element.querySelector(b)},k.hasChildren=function(){return this.element.hasChildNodes()},k.scrollToTop=function(){this.element.scrollTop=0},k.scrollToChildElement=function(b,T){var V=this;if(b){var Y=this.element.offsetHeight,X=this.element.scrollTop+Y,le=b.offsetHeight,he=b.offsetTop+le,Me=T>0?this.element.scrollTop+he-X:b.offsetTop;activeWindow.requestAnimationFrame(function(){V._animateScroll(Me,T)})}},k._scrollDown=function(b,T,V){var Y=(V-b)/T,X=Y>1?Y:1;this.element.scrollTop=b+X},k._scrollUp=function(b,T,V){var Y=(b-V)/T,X=Y>1?Y:1;this.element.scrollTop=b-X},k._animateScroll=function(b,T){var V=this,Y=Dt,X=this.element.scrollTop,le=!1;T>0?(this._scrollDown(X,Y,b),X<b&&(le=!0)):(this._scrollUp(X,Y,b),X>b&&(le=!0)),le&&activeWindow.requestAnimationFrame(function(){V._animateScroll(b,T)})},z}();function St(z,k){for(var _=0;_<k.length;_++){var b=k[_];b.enumerable=b.enumerable||!1,b.configurable=!0,\"value\"in b&&(b.writable=!0),Object.defineProperty(z,b.key,b)}}function L(z,k,_){return k&&St(z.prototype,k),_&&St(z,_),z}var K=function(){function z(_){var b=_.element,T=_.classNames;if(this.element=b,this.classNames=T,!(b instanceof HTMLInputElement)&&!(b instanceof HTMLSelectElement))throw new TypeError(\"Invalid element passed\");this.isDisabled=!1}var k=z.prototype;return k.conceal=function(){this.element.classList.add(this.classNames.input),this.element.hidden=!0,this.element.tabIndex=-1;var b=this.element.getAttribute(\"style\");b&&this.element.setAttribute(\"data-choice-orig-style\",b),this.element.setAttribute(\"data-choice\",\"active\")},k.reveal=function(){this.element.classList.remove(this.classNames.input),this.element.hidden=!1,this.element.removeAttribute(\"tabindex\");var b=this.element.getAttribute(\"data-choice-orig-style\");b?(this.element.removeAttribute(\"data-choice-orig-style\"),this.element.setAttribute(\"style\",b)):this.element.removeAttribute(\"style\"),this.element.removeAttribute(\"data-choice\"),this.element.value=this.element.value},k.enable=function(){this.element.removeAttribute(\"disabled\"),this.element.disabled=!1,this.isDisabled=!1},k.disable=function(){this.element.setAttribute(\"disabled\",\"\"),this.element.disabled=!0,this.isDisabled=!0},k.triggerEvent=function(b,T){Tt(this.element,b,T)},L(z,[{key:\"isActive\",get:function(){return this.element.dataset.choice===\"active\"}},{key:\"dir\",get:function(){return this.element.dir}},{key:\"value\",get:function(){return this.element.value},set:function(b){this.element.value=b}}]),z}();function ee(z,k){for(var _=0;_<k.length;_++){var b=k[_];b.enumerable=b.enumerable||!1,b.configurable=!0,\"value\"in b&&(b.writable=!0),Object.defineProperty(z,b.key,b)}}function ue(z,k,_){return k&&ee(z.prototype,k),_&&ee(z,_),z}function de(z,k){z.prototype=Object.create(k.prototype),z.prototype.constructor=z,z.__proto__=k}var ve=function(z){de(k,z);function k(_){var b,T=_.element,V=_.classNames,Y=_.delimiter;return b=z.call(this,{element:T,classNames:V})||this,b.delimiter=Y,b}return ue(k,[{key:\"value\",get:function(){return this.element.value},set:function(b){var T=b.map(function(Y){var X=Y.value;return X}),V=T.join(this.delimiter);this.element.setAttribute(\"value\",V),this.element.value=V}}]),k}(K);function ge(z,k){for(var _=0;_<k.length;_++){var b=k[_];b.enumerable=b.enumerable||!1,b.configurable=!0,\"value\"in b&&(b.writable=!0),Object.defineProperty(z,b.key,b)}}function M(z,k,_){return k&&ge(z.prototype,k),_&&ge(z,_),z}function H(z,k){z.prototype=Object.create(k.prototype),z.prototype.constructor=z,z.__proto__=k}var q=function(z){H(k,z);function k(b){var T,V=b.element,Y=b.classNames,X=b.template;return T=z.call(this,{element:V,classNames:Y})||this,T.template=X,T}var _=k.prototype;return _.appendDocFragment=function(T){this.element.innerHTML=\"\",this.element.appendChild(T)},M(k,[{key:\"placeholderOption\",get:function(){return this.element.querySelector('option[value=\"\"]')||this.element.querySelector(\"option[placeholder]\")}},{key:\"optionGroups\",get:function(){return Array.from(this.element.getElementsByTagName(\"OPTGROUP\"))}},{key:\"options\",get:function(){return Array.from(this.element.options)},set:function(T){var V=this,Y=document.createDocumentFragment(),X=function(he){var Me=V.template(he);Y.appendChild(Me)};T.forEach(function(le){return X(le)}),this.appendDocFragment(Y)}}]),k}(K),ie={containerOuter:function(k,_,b,T,V,Y){var X=k.containerOuter,le=Object.assign(document.createElement(\"div\"),{className:X});return le.dataset.type=Y,_&&(le.dir=_),T&&(le.tabIndex=0),b&&(le.setAttribute(\"role\",V?\"combobox\":\"listbox\"),V&&le.setAttribute(\"aria-autocomplete\",\"list\")),le.setAttribute(\"aria-haspopup\",\"true\"),le.setAttribute(\"aria-expanded\",\"false\"),le},containerInner:function(k){var _=k.containerInner;return Object.assign(document.createElement(\"div\"),{className:_})},itemList:function(k,_){var b=k.list,T=k.listSingle,V=k.listItems;return Object.assign(document.createElement(\"div\"),{className:b+\" \"+(_?T:V)})},placeholder:function(k,_){var b=k.placeholder;return Object.assign(document.createElement(\"div\"),{className:b,innerHTML:_})},item:function(k,_,b){var T=k.item,V=k.button,Y=k.highlightedState,X=k.itemSelectable,le=k.placeholder,he=_.id,Me=_.value,Ve=_.label,Le=_.customProperties,Qe=_.active,ot=_.disabled,qe=_.highlighted,yt=_.placeholder,st=Object.assign(document.createElement(\"div\"),{className:T,innerHTML:Ve});if(Object.assign(st.dataset,{item:\"\",id:he,value:Me,customProperties:Le}),Qe&&st.setAttribute(\"aria-selected\",\"true\"),ot&&st.setAttribute(\"aria-disabled\",\"true\"),yt&&st.classList.add(le),st.classList.add(qe?Y:X),b){ot&&st.classList.remove(X),st.dataset.deletable=\"\";var lt=\"Remove item\",qt=Object.assign(document.createElement(\"button\"),{type:\"button\",className:V,innerHTML:lt});qt.setAttribute(\"aria-label\",lt+\": '\"+Me+\"'\"),qt.dataset.button=\"\",st.appendChild(qt)}return st},choiceList:function(k,_){var b=k.list,T=Object.assign(document.createElement(\"div\"),{className:b});return _||T.setAttribute(\"aria-multiselectable\",\"true\"),T.setAttribute(\"role\",\"listbox\"),T},choiceGroup:function(k,_){var b=k.group,T=k.groupHeading,V=k.itemDisabled,Y=_.id,X=_.value,le=_.disabled,he=Object.assign(document.createElement(\"div\"),{className:b+\" \"+(le?V:\"\")});return he.setAttribute(\"role\",\"group\"),Object.assign(he.dataset,{group:\"\",id:Y,value:X}),le&&he.setAttribute(\"aria-disabled\",\"true\"),he.appendChild(Object.assign(document.createElement(\"div\"),{className:T,innerHTML:X})),he},choice:function(k,_,b){var T=k.item,V=k.itemChoice,Y=k.itemSelectable,X=k.selectedState,le=k.itemDisabled,he=k.placeholder,Me=_.id,Ve=_.value,Le=_.label,Qe=_.groupId,ot=_.elementId,qe=_.disabled,yt=_.selected,st=_.placeholder,lt=Object.assign(document.createElement(\"div\"),{id:ot,innerHTML:Le,className:T+\" \"+V});return yt&&lt.classList.add(X),st&&lt.classList.add(he),lt.setAttribute(\"role\",Qe>0?\"treeitem\":\"option\"),Object.assign(lt.dataset,{choice:\"\",id:Me,value:Ve,selectText:b}),qe?(lt.classList.add(le),lt.dataset.choiceDisabled=\"\",lt.setAttribute(\"aria-disabled\",\"true\")):(lt.classList.add(Y),lt.dataset.choiceSelectable=\"\"),lt},input:function(k,_){var b=k.input,T=k.inputCloned,V=Object.assign(document.createElement(\"input\"),{type:\"text\",className:b+\" \"+T,autocomplete:\"off\",autocapitalize:\"off\",spellcheck:!1});return V.setAttribute(\"role\",\"textbox\"),V.setAttribute(\"aria-autocomplete\",\"list\"),V.setAttribute(\"aria-label\",_),V},dropdown:function(k){var _=k.list,b=k.listDropdown,T=document.createElement(\"div\");return T.classList.add(_,b),T.setAttribute(\"aria-expanded\",\"false\"),T},notice:function(k,_,b){var T=k.item,V=k.itemChoice,Y=k.noResults,X=k.noChoices;b===void 0&&(b=\"\");var le=[T,V];return b===\"no-choices\"?le.push(X):b===\"no-results\"&&le.push(Y),Object.assign(document.createElement(\"div\"),{innerHTML:_,className:le.join(\" \")})},option:function(k){var _=k.label,b=k.value,T=k.customProperties,V=k.active,Y=k.disabled,X=new Option(_,b,!1,V);return T&&(X.dataset.customProperties=T),X.disabled=Y,X}},ye=ie,ce=function(k){var _=k.value,b=k.label,T=k.id,V=k.groupId,Y=k.disabled,X=k.elementId,le=k.customProperties,he=k.placeholder,Me=k.keyCode;return{type:At.ADD_CHOICE,value:_,label:b,id:T,groupId:V,disabled:Y,elementId:X,customProperties:le,placeholder:he,keyCode:Me}},ae=function(k){return{type:At.FILTER_CHOICES,results:k}},Se=function(k){return k===void 0&&(k=!0),{type:At.ACTIVATE_CHOICES,active:k}},nt=function(){return{type:At.CLEAR_CHOICES}},Te=function(k){var _=k.value,b=k.label,T=k.id,V=k.choiceId,Y=k.groupId,X=k.customProperties,le=k.placeholder,he=k.keyCode;return{type:At.ADD_ITEM,value:_,label:b,id:T,choiceId:V,groupId:Y,customProperties:X,placeholder:le,keyCode:he}},Ue=function(k,_){return{type:At.REMOVE_ITEM,id:k,choiceId:_}},We=function(k,_){return{type:At.HIGHLIGHT_ITEM,id:k,highlighted:_}},Ft=function(k){var _=k.value,b=k.id,T=k.active,V=k.disabled;return{type:At.ADD_GROUP,value:_,id:b,active:T,disabled:V}},Hn=function(){return{type:\"CLEAR_ALL\"}},Ot=function(k){return{type:\"RESET_TO\",state:k}},or=function(k){return{type:\"SET_IS_LOADING\",isLoading:k}};function sr(z,k){for(var _=0;_<k.length;_++){var b=k[_];b.enumerable=b.enumerable||!1,b.configurable=!0,\"value\"in b&&(b.writable=!0),Object.defineProperty(z,b.key,b)}}function Yt(z,k,_){return k&&sr(z.prototype,k),_&&sr(z,_),z}var Bn=\"-ms-scroll-limit\"in document.documentElement.style&&\"-ms-ime-align\"in document.documentElement.style,Er={},Gr=function(){Yt(z,null,[{key:\"defaults\",get:function(){return Object.preventExtensions({get options(){return Er},get templates(){return ie}})}}]);function z(_,b){var T=this;_===void 0&&(_=\"[data-choice]\"),b===void 0&&(b={}),this.config=o.a.all([Hr,z.defaults.options,b],{arrayMerge:function(Qe,ot){return[].concat(ot)}});var V=gn(this.config,Hr);V.length&&console.warn(\"Unknown config option(s) passed\",V.join(\", \"));var Y=typeof _==\"string\"?document.querySelector(_):_;if(!(Y instanceof HTMLInputElement||Y instanceof HTMLSelectElement))throw TypeError(\"Expected one of the following types text|select-one|select-multiple\");if(this._isTextElement=Y.type===me,this._isSelectOneElement=Y.type===Ie,this._isSelectMultipleElement=Y.type===at,this._isSelectElement=this._isSelectOneElement||this._isSelectMultipleElement,this.config.searchEnabled=this._isSelectMultipleElement||this.config.searchEnabled,[\"auto\",\"always\"].includes(this.config.renderSelectedChoices)||(this.config.renderSelectedChoices=\"auto\"),b.addItemFilter&&typeof b.addItemFilter!=\"function\"){var X=b.addItemFilter instanceof RegExp?b.addItemFilter:new RegExp(b.addItemFilter);this.config.addItemFilter=X.test.bind(X)}if(this._isTextElement?this.passedElement=new ve({element:Y,classNames:this.config.classNames,delimiter:this.config.delimiter}):this.passedElement=new q({element:Y,classNames:this.config.classNames,template:function(Qe){return T._templates.option(Qe)}}),this.initialised=!1,this._store=new Rt,this._initialState={},this._currentState={},this._prevState={},this._currentValue=\"\",this._canSearch=this.config.searchEnabled,this._isScrollingOnIe=!1,this._highlightPosition=0,this._wasTap=!0,this._placeholderValue=this._generatePlaceholderValue(),this._baseId=U(this.passedElement.element,\"choices-\"),this._direction=this.passedElement.dir,!this._direction){var le=window.getComputedStyle(this.passedElement.element),he=le.direction,Me=window.getComputedStyle(document.documentElement),Ve=Me.direction;he!==Ve&&(this._direction=he)}if(this._idNames={itemChoice:\"item-choice\"},this._presetGroups=this.passedElement.optionGroups,this._presetOptions=this.passedElement.options,this._presetChoices=this.config.choices,this._presetItems=this.config.items,this.passedElement.value&&(this._presetItems=this._presetItems.concat(this.passedElement.value.split(this.config.delimiter))),this.passedElement.options&&this.passedElement.options.forEach(function(Le){T._presetChoices.push({value:Le.value,label:Le.innerHTML,selected:Le.selected,disabled:Le.disabled||Le.parentNode.disabled,placeholder:Le.value===\"\"||Le.hasAttribute(\"placeholder\"),customProperties:Le.getAttribute(\"data-custom-properties\")})}),this._render=this._render.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onKeyUp=this._onKeyUp.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onClick=this._onClick.bind(this),this._onTouchMove=this._onTouchMove.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onMouseDown=this._onMouseDown.bind(this),this._onMouseOver=this._onMouseOver.bind(this),this._onFormReset=this._onFormReset.bind(this),this._onAKey=this._onAKey.bind(this),this._onEnterKey=this._onEnterKey.bind(this),this._onEscapeKey=this._onEscapeKey.bind(this),this._onDirectionKey=this._onDirectionKey.bind(this),this._onDeleteKey=this._onDeleteKey.bind(this),this.passedElement.isActive){this.config.silent||console.warn(\"Trying to initialise Choices on element already initialised\"),this.initialised=!0;return}this.init()}var k=z.prototype;return k.init=function(){if(!this.initialised){this._createTemplates(),this._createElements(),this._createStructure(),this._initialState=en(this._store.state),this._store.subscribe(this._render),this._render(),this._addEventListeners();var b=!this.config.addItems||this.passedElement.element.hasAttribute(\"disabled\");b&&this.disable(),this.initialised=!0;var T=this.config.callbackOnInit;T&&typeof T==\"function\"&&T.call(this)}},k.destroy=function(){this.initialised&&(this._removeEventListeners(),this.passedElement.reveal(),this.containerOuter.unwrap(this.passedElement.element),this.clearStore(),this._isSelectElement&&(this.passedElement.options=this._presetOptions),this._templates=null,this.initialised=!1)},k.enable=function(){return this.passedElement.isDisabled&&this.passedElement.enable(),this.containerOuter.isDisabled&&(this._addEventListeners(),this.input.enable(),this.containerOuter.enable()),this},k.disable=function(){return this.passedElement.isDisabled||this.passedElement.disable(),this.containerOuter.isDisabled||(this._removeEventListeners(),this.input.disable(),this.containerOuter.disable()),this},k.highlightItem=function(b,T){if(T===void 0&&(T=!0),!b)return this;var V=b.id,Y=b.groupId,X=Y===void 0?-1:Y,le=b.value,he=le===void 0?\"\":le,Me=b.label,Ve=Me===void 0?\"\":Me,Le=X>=0?this._store.getGroupById(X):null;return this._store.dispatch(We(V,!0)),T&&this.passedElement.triggerEvent(rn.highlightItem,{id:V,value:he,label:Ve,groupValue:Le&&Le.value?Le.value:null}),this},k.unhighlightItem=function(b){if(!b)return this;var T=b.id,V=b.groupId,Y=V===void 0?-1:V,X=b.value,le=X===void 0?\"\":X,he=b.label,Me=he===void 0?\"\":he,Ve=Y>=0?this._store.getGroupById(Y):null;return this._store.dispatch(We(T,!1)),this.passedElement.triggerEvent(rn.highlightItem,{id:T,value:le,label:Me,groupValue:Ve&&Ve.value?Ve.value:null}),this},k.highlightAll=function(){var b=this;return this._store.items.forEach(function(T){return b.highlightItem(T)}),this},k.unhighlightAll=function(){var b=this;return this._store.items.forEach(function(T){return b.unhighlightItem(T)}),this},k.removeActiveItemsByValue=function(b){var T=this;return this._store.activeItems.filter(function(V){return V.value===b}).forEach(function(V){return T._removeItem(V)}),this},k.removeActiveItems=function(b){var T=this;return this._store.activeItems.filter(function(V){var Y=V.id;return Y!==b}).forEach(function(V){return T._removeItem(V)}),this},k.removeHighlightedItems=function(b){var T=this;return b===void 0&&(b=!1),this._store.highlightedActiveItems.forEach(function(V){T._removeItem(V),b&&T._triggerChange(V.value)}),this},k.showDropdown=function(b){var T=this;return this.dropdown.isActive?this:(activeWindow.requestAnimationFrame(function(){T.dropdown.show(),T.containerOuter.open(T.dropdown.distanceFromTopWindow),!b&&T._canSearch&&T.input.focus(),T.passedElement.triggerEvent(rn.showDropdown,{})}),this)},k.hideDropdown=function(b){var T=this;return this.dropdown.isActive?(activeWindow.requestAnimationFrame(function(){T.dropdown.hide(),T.containerOuter.close(),!b&&T._canSearch&&(T.input.removeActiveDescendant(),T.input.blur()),T.passedElement.triggerEvent(rn.hideDropdown,{})}),this):this},k.getValue=function(b){b===void 0&&(b=!1);var T=this._store.activeItems.reduce(function(V,Y){var X=b?Y.value:Y;return V.push(X),V},[]);return this._isSelectOneElement?T[0]:T},k.setValue=function(b){var T=this;return this.initialised?(b.forEach(function(V){return T._setChoiceOrItem(V)}),this):this},k.setChoiceByValue=function(b){var T=this;if(!this.initialised||this._isTextElement)return this;var V=Array.isArray(b)?b:[b];return V.forEach(function(Y){return T._findAndSelectChoiceByValue(Y)}),this},k.setChoices=function(b,T,V,Y){var X=this;if(b===void 0&&(b=[]),T===void 0&&(T=\"value\"),V===void 0&&(V=\"label\"),Y===void 0&&(Y=!1),!this.initialised)throw new ReferenceError(\"setChoices was called on a non-initialized instance of Choices\");if(!this._isSelectElement)throw new TypeError(\"setChoices can't be used with INPUT based Choices\");if(typeof T!=\"string\"||!T)throw new TypeError(\"value parameter must be a name of 'value' field in passed objects\");if(Y&&this.clearChoices(),typeof b==\"function\"){var le=b(this);if(typeof Promise==\"function\"&&le instanceof Promise)return new Promise(function(he){return activeWindow.requestAnimationFrame(he)}).then(function(){return X._handleLoadingState(!0)}).then(function(){return le}).then(function(he){return X.setChoices(he,T,V,Y)}).catch(function(he){X.config.silent||console.error(he)}).then(function(){return X._handleLoadingState(!1)}).then(function(){return X});if(!Array.isArray(le))throw new TypeError(\".setChoices first argument function must return either array of choices or Promise, got: \"+typeof le);return this.setChoices(le,T,V,!1)}if(!Array.isArray(b))throw new TypeError(\".setChoices must be called either with array of choices with a function resulting into Promise of array of choices\");return this.containerOuter.removeLoadingState(),this._startLoading(),b.forEach(function(he){he.choices?X._addGroup({id:parseInt(he.id,10)||null,group:he,valueKey:T,labelKey:V}):X._addChoice({value:he[T],label:he[V],isSelected:he.selected,isDisabled:he.disabled,customProperties:he.customProperties,placeholder:he.placeholder})}),this._stopLoading(),this},k.clearChoices=function(){return this._store.dispatch(nt()),this},k.clearStore=function(){return this._store.dispatch(Hn()),this},k.clearInput=function(){var b=!this._isSelectOneElement;return this.input.clear(b),!this._isTextElement&&this._canSearch&&(this._isSearching=!1,this._store.dispatch(Se(!0))),this},k._render=function(){if(!this._store.isLoading()){this._currentState=this._store.state;var b=this._currentState.choices!==this._prevState.choices||this._currentState.groups!==this._prevState.groups||this._currentState.items!==this._prevState.items,T=this._isSelectElement,V=this._currentState.items!==this._prevState.items;b&&(T&&this._renderChoices(),V&&this._renderItems(),this._prevState=this._currentState)}},k._renderChoices=function(){var b=this,T=this._store,V=T.activeGroups,Y=T.activeChoices,X=document.createDocumentFragment();if(this.choiceList.clear(),this.config.resetScrollPosition&&activeWindow.requestAnimationFrame(function(){return b.choiceList.scrollToTop()}),V.length>=1&&!this._isSearching){var le=Y.filter(function(Qe){return Qe.placeholder===!0&&Qe.groupId===-1});le.length>=1&&(X=this._createChoicesFragment(le,X)),X=this._createGroupsFragment(V,Y,X)}else Y.length>=1&&(X=this._createChoicesFragment(Y,X));if(X.childNodes&&X.childNodes.length>0){var he=this._store.activeItems,Me=this._canAddItem(he,this.input.value);Me.response?(this.choiceList.append(X),this._highlightChoice()):this.choiceList.append(this._getTemplate(\"notice\",Me.notice))}else{var Ve,Le;this._isSearching?(Le=typeof this.config.noResultsText==\"function\"?this.config.noResultsText():this.config.noResultsText,Ve=this._getTemplate(\"notice\",Le,\"no-results\")):(Le=typeof this.config.noChoicesText==\"function\"?this.config.noChoicesText():this.config.noChoicesText,Ve=this._getTemplate(\"notice\",Le,\"no-choices\")),this.choiceList.append(Ve)}},k._renderItems=function(){var b=this._store.activeItems||[];this.itemList.clear();var T=this._createItemsFragment(b);T.childNodes&&this.itemList.append(T)},k._createGroupsFragment=function(b,T,V){var Y=this;V===void 0&&(V=document.createDocumentFragment());var X=function(he){return T.filter(function(Me){return Y._isSelectOneElement?Me.groupId===he.id:Me.groupId===he.id&&(Y.config.renderSelectedChoices===\"always\"||!Me.selected)})};return this.config.shouldSort&&b.sort(this.config.sorter),b.forEach(function(le){var he=X(le);if(he.length>=1){var Me=Y._getTemplate(\"choiceGroup\",le);V.appendChild(Me),Y._createChoicesFragment(he,V,!0)}}),V},k._createChoicesFragment=function(b,T,V){var Y=this;T===void 0&&(T=document.createDocumentFragment()),V===void 0&&(V=!1);var X=this.config,le=X.renderSelectedChoices,he=X.searchResultLimit,Me=X.renderChoiceLimit,Ve=this._isSearching?Wt:this.config.sorter,Le=function(Vn){var ki=le===\"auto\"?Y._isSelectOneElement||!Vn.selected:!0;if(ki){var kr=Y._getTemplate(\"choice\",Vn,Y.config.itemSelectText);T.appendChild(kr)}},Qe=b;le===\"auto\"&&!this._isSelectOneElement&&(Qe=b.filter(function(On){return!On.selected}));var ot=Qe.reduce(function(On,Vn){return Vn.placeholder?On.placeholderChoices.push(Vn):On.normalChoices.push(Vn),On},{placeholderChoices:[],normalChoices:[]}),qe=ot.placeholderChoices,yt=ot.normalChoices;(this.config.shouldSort||this._isSearching)&&yt.sort(Ve);var st=Qe.length,lt=this._isSelectOneElement?[].concat(qe,yt):yt;this._isSearching?st=he:Me&&Me>0&&!V&&(st=Me);for(var qt=0;qt<st;qt+=1)lt[qt]&&Le(lt[qt]);return T},k._createItemsFragment=function(b,T){var V=this;T===void 0&&(T=document.createDocumentFragment());var Y=this.config,X=Y.shouldSortItems,le=Y.sorter,he=Y.removeItemButton;X&&!this._isSelectOneElement&&b.sort(le),this._isTextElement?this.passedElement.value=b:this.passedElement.options=b;var Me=function(Le){var Qe=V._getTemplate(\"item\",Le,he);T.appendChild(Qe)};return b.forEach(Me),T},k._triggerChange=function(b){b!=null&&this.passedElement.triggerEvent(rn.change,{value:b})},k._selectPlaceholderChoice=function(){var b=this._store.placeholderChoice;b&&(this._addItem({value:b.value,label:b.label,choiceId:b.id,groupId:b.groupId,placeholder:b.placeholder}),this._triggerChange(b.value))},k._handleButtonAction=function(b,T){if(!(!b||!T||!this.config.removeItems||!this.config.removeItemButton)){var V=T.parentNode.getAttribute(\"data-id\"),Y=b.find(function(X){return X.id===parseInt(V,10)});this._removeItem(Y),this._triggerChange(Y.value),this._isSelectOneElement&&this._selectPlaceholderChoice()}},k._handleItemAction=function(b,T,V){var Y=this;if(V===void 0&&(V=!1),!(!b||!T||!this.config.removeItems||this._isSelectOneElement)){var X=T.getAttribute(\"data-id\");b.forEach(function(le){le.id===parseInt(X,10)&&!le.highlighted?Y.highlightItem(le):!V&&le.highlighted&&Y.unhighlightItem(le)}),this.input.focus()}},k._handleChoiceAction=function(b,T){if(!(!b||!T)){var V=T.dataset.id,Y=this._store.getChoiceById(V);if(Y){var X=b[0]&&b[0].keyCode?b[0].keyCode:null,le=this.dropdown.isActive;if(Y.keyCode=X,this.passedElement.triggerEvent(rn.choice,{choice:Y}),!Y.selected&&!Y.disabled){var he=this._canAddItem(b,Y.value);he.response&&(this._addItem({value:Y.value,label:Y.label,choiceId:Y.id,groupId:Y.groupId,customProperties:Y.customProperties,placeholder:Y.placeholder,keyCode:Y.keyCode}),this._triggerChange(Y.value))}this.clearInput(),le&&this._isSelectOneElement&&(this.hideDropdown(!0),this.containerOuter.focus())}}},k._handleBackspace=function(b){if(!(!this.config.removeItems||!b)){var T=b[b.length-1],V=b.some(function(Y){return Y.highlighted});this.config.editItems&&!V&&T?(this.input.value=T.value,this.input.setWidth(),this._removeItem(T),this._triggerChange(T.value)):(V||this.highlightItem(T,!1),this.removeHighlightedItems(!0))}},k._startLoading=function(){this._store.dispatch(or(!0))},k._stopLoading=function(){this._store.dispatch(or(!1))},k._handleLoadingState=function(b){b===void 0&&(b=!0);var T=this.itemList.getChild(\".\"+this.config.classNames.placeholder);b?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?T?T.innerHTML=this.config.loadingText:(T=this._getTemplate(\"placeholder\",this.config.loadingText),this.itemList.append(T)):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?T.innerHTML=this._placeholderValue||\"\":this.input.placeholder=this._placeholderValue||\"\")},k._handleSearch=function(b){if(!(!b||!this.input.isFocussed)){var T=this._store.choices,V=this.config,Y=V.searchFloor,X=V.searchChoices,le=T.some(function(Me){return!Me.active});if(b&&b.length>=Y){var he=X?this._searchChoices(b):0;this.passedElement.triggerEvent(rn.search,{value:b,resultCount:he})}else le&&(this._isSearching=!1,this._store.dispatch(Se(!0)))}},k._canAddItem=function(b,T){var V=!0,Y=typeof this.config.addItemText==\"function\"?this.config.addItemText(T):this.config.addItemText;if(!this._isSelectOneElement){var X=Jt(b,T);this.config.maxItemCount>0&&this.config.maxItemCount<=b.length&&(V=!1,Y=typeof this.config.maxItemText==\"function\"?this.config.maxItemText(this.config.maxItemCount):this.config.maxItemText),!this.config.duplicateItemsAllowed&&X&&V&&(V=!1,Y=typeof this.config.uniqueItemText==\"function\"?this.config.uniqueItemText(T):this.config.uniqueItemText),this._isTextElement&&this.config.addItems&&V&&typeof this.config.addItemFilter==\"function\"&&!this.config.addItemFilter(T)&&(V=!1,Y=typeof this.config.customAddItemText==\"function\"?this.config.customAddItemText(T):this.config.customAddItemText)}return{response:V,notice:Y}},k._searchChoices=function(b){var T=typeof b==\"string\"?b.trim():b,V=typeof this._currentValue==\"string\"?this._currentValue.trim():this._currentValue;if(T.length<1&&T===V+\" \")return 0;var Y=this._store.searchableChoices,X=T,le=[].concat(this.config.searchFields),he=Object.assign(this.config.fuseOptions,{keys:le}),Me=new i.a(Y,he),Ve=Me.search(X);return this._currentValue=T,this._highlightPosition=0,this._isSearching=!0,this._store.dispatch(ae(Ve)),Ve.length},k._addEventListeners=function(){var b=document,T=b.documentElement;T.addEventListener(\"touchend\",this._onTouchEnd,!0),this.containerOuter.element.addEventListener(\"keydown\",this._onKeyDown,!0),this.containerOuter.element.addEventListener(\"mousedown\",this._onMouseDown,!0),T.addEventListener(\"click\",this._onClick,{passive:!0}),T.addEventListener(\"touchmove\",this._onTouchMove,{passive:!0}),this.dropdown.element.addEventListener(\"mouseover\",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(this.containerOuter.element.addEventListener(\"focus\",this._onFocus,{passive:!0}),this.containerOuter.element.addEventListener(\"blur\",this._onBlur,{passive:!0})),this.input.element.addEventListener(\"keyup\",this._onKeyUp,{passive:!0}),this.input.element.addEventListener(\"focus\",this._onFocus,{passive:!0}),this.input.element.addEventListener(\"blur\",this._onBlur,{passive:!0}),this.input.element.form&&this.input.element.form.addEventListener(\"reset\",this._onFormReset,{passive:!0}),this.input.addEventListeners()},k._removeEventListeners=function(){var b=document,T=b.documentElement;T.removeEventListener(\"touchend\",this._onTouchEnd,!0),this.containerOuter.element.removeEventListener(\"keydown\",this._onKeyDown,!0),this.containerOuter.element.removeEventListener(\"mousedown\",this._onMouseDown,!0),T.removeEventListener(\"click\",this._onClick),T.removeEventListener(\"touchmove\",this._onTouchMove),this.dropdown.element.removeEventListener(\"mouseover\",this._onMouseOver),this._isSelectOneElement&&(this.containerOuter.element.removeEventListener(\"focus\",this._onFocus),this.containerOuter.element.removeEventListener(\"blur\",this._onBlur)),this.input.element.removeEventListener(\"keyup\",this._onKeyUp),this.input.element.removeEventListener(\"focus\",this._onFocus),this.input.element.removeEventListener(\"blur\",this._onBlur),this.input.element.form&&this.input.element.form.removeEventListener(\"reset\",this._onFormReset),this.input.removeEventListeners()},k._onKeyDown=function(b){var T,V=b.target,Y=b.keyCode,X=b.ctrlKey,le=b.metaKey,he=this._store.activeItems,Me=this.input.isFocussed,Ve=this.dropdown.isActive,Le=this.itemList.hasChildren(),Qe=String.fromCharCode(Y),ot=Z.BACK_KEY,qe=Z.DELETE_KEY,yt=Z.ENTER_KEY,st=Z.A_KEY,lt=Z.ESC_KEY,qt=Z.UP_KEY,On=Z.DOWN_KEY,Vn=Z.PAGE_UP_KEY,ki=Z.PAGE_DOWN_KEY,kr=X||le;!this._isTextElement&&/[a-zA-Z0-9-_ ]/.test(Qe)&&this.showDropdown();var Jr=(T={},T[st]=this._onAKey,T[yt]=this._onEnterKey,T[lt]=this._onEscapeKey,T[qt]=this._onDirectionKey,T[Vn]=this._onDirectionKey,T[On]=this._onDirectionKey,T[ki]=this._onDirectionKey,T[qe]=this._onDeleteKey,T[ot]=this._onDeleteKey,T);Jr[Y]&&Jr[Y]({event:b,target:V,keyCode:Y,metaKey:le,activeItems:he,hasFocusedInput:Me,hasActiveDropdown:Ve,hasItems:Le,hasCtrlDownKeyPressed:kr})},k._onKeyUp=function(b){var T=b.target,V=b.keyCode,Y=this.input.value,X=this._store.activeItems,le=this._canAddItem(X,Y),he=Z.BACK_KEY,Me=Z.DELETE_KEY;if(this._isTextElement){var Ve=le.notice&&Y;if(Ve){var Le=this._getTemplate(\"notice\",le.notice);this.dropdown.element.innerHTML=Le.outerHTML,this.showDropdown(!0)}else this.hideDropdown(!0)}else{var Qe=(V===he||V===Me)&&!T.value,ot=!this._isTextElement&&this._isSearching,qe=this._canSearch&&le.response;Qe&&ot?(this._isSearching=!1,this._store.dispatch(Se(!0))):qe&&this._handleSearch(this.input.value)}this._canSearch=this.config.searchEnabled},k._onAKey=function(b){var T=b.hasItems,V=b.hasCtrlDownKeyPressed;if(V&&T){this._canSearch=!1;var Y=this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement;Y&&this.highlightAll()}},k._onEnterKey=function(b){var T=b.event,V=b.target,Y=b.activeItems,X=b.hasActiveDropdown,le=Z.ENTER_KEY,he=V.hasAttribute(\"data-button\");if(this._isTextElement&&V.value){var Me=this.input.value,Ve=this._canAddItem(Y,Me);Ve.response&&(this.hideDropdown(!0),this._addItem({value:Me}),this._triggerChange(Me),this.clearInput())}if(he&&(this._handleButtonAction(Y,V),T.preventDefault()),X){var Le=this.dropdown.getChild(\".\"+this.config.classNames.highlightedState);Le&&(Y[0]&&(Y[0].keyCode=le),this._handleChoiceAction(Y,Le)),T.preventDefault()}else this._isSelectOneElement&&(this.showDropdown(),T.preventDefault())},k._onEscapeKey=function(b){var T=b.hasActiveDropdown;T&&(this.hideDropdown(!0),this.containerOuter.focus())},k._onDirectionKey=function(b){var T=b.event,V=b.hasActiveDropdown,Y=b.keyCode,X=b.metaKey,le=Z.DOWN_KEY,he=Z.PAGE_UP_KEY,Me=Z.PAGE_DOWN_KEY;if(V||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var Ve=Y===le||Y===Me?1:-1,Le=X||Y===Me||Y===he,Qe=\"[data-choice-selectable]\",ot;if(Le)Ve>0?ot=this.dropdown.element.querySelector(Qe+\":last-of-type\"):ot=this.dropdown.element.querySelector(Qe);else{var qe=this.dropdown.element.querySelector(\".\"+this.config.classNames.highlightedState);qe?ot=Ze(qe,Qe,Ve):ot=this.dropdown.element.querySelector(Qe)}ot&&(It(ot,this.choiceList.element,Ve)||this.choiceList.scrollToChildElement(ot,Ve),this._highlightChoice(ot)),T.preventDefault()}},k._onDeleteKey=function(b){var T=b.event,V=b.target,Y=b.hasFocusedInput,X=b.activeItems;Y&&!V.value&&!this._isSelectOneElement&&(this._handleBackspace(X),T.preventDefault())},k._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},k._onTouchEnd=function(b){var T=b||b.touches[0],V=T.target,Y=this._wasTap&&this.containerOuter.element.contains(V);if(Y){var X=V===this.containerOuter.element||V===this.containerInner.element;X&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),b.stopPropagation()}this._wasTap=!0},k._onMouseDown=function(b){var T=b.target;if(T instanceof HTMLElement){if(Bn&&this.choiceList.element.contains(T)){var V=this.choiceList.element.firstElementChild,Y=this._direction===\"ltr\"?b.offsetX>=V.offsetWidth:b.offsetX<V.offsetLeft;this._isScrollingOnIe=Y}if(T!==this.input.element){var X=T.closest(\"[data-button],[data-item],[data-choice]\");if(X instanceof HTMLElement){var le=b.shiftKey,he=this._store.activeItems,Me=X.dataset;\"button\"in Me?this._handleButtonAction(he,X):\"item\"in Me?this._handleItemAction(he,X,le):\"choice\"in Me&&this._handleChoiceAction(he,X)}b.preventDefault()}}},k._onMouseOver=function(b){var T=b.target;T instanceof HTMLElement&&\"choice\"in T.dataset&&this._highlightChoice(T)},k._onClick=function(b){var T=b.target,V=this.containerOuter.element.contains(T);if(V)!this.dropdown.isActive&&!this.containerOuter.isDisabled?this._isTextElement?document.activeElement!==this.input.element&&this.input.focus():(this.showDropdown(),this.containerOuter.focus()):this._isSelectOneElement&&T!==this.input.element&&!this.dropdown.element.contains(T)&&this.hideDropdown();else{var Y=this._store.highlightedActiveItems.length>0;Y&&this.unhighlightAll(),this.containerOuter.removeFocusState(),this.hideDropdown(!0)}},k._onFocus=function(b){var T=this,V,Y=b.target,X=this.containerOuter.element.contains(Y);if(X){var le=(V={},V[me]=function(){Y===T.input.element&&T.containerOuter.addFocusState()},V[Ie]=function(){T.containerOuter.addFocusState(),Y===T.input.element&&T.showDropdown(!0)},V[at]=function(){Y===T.input.element&&(T.showDropdown(!0),T.containerOuter.addFocusState())},V);le[this.passedElement.element.type]()}},k._onBlur=function(b){var T=this,V=b.target,Y=this.containerOuter.element.contains(V);if(Y&&!this._isScrollingOnIe){var X,le=this._store.activeItems,he=le.some(function(Ve){return Ve.highlighted}),Me=(X={},X[me]=function(){V===T.input.element&&(T.containerOuter.removeFocusState(),he&&T.unhighlightAll(),T.hideDropdown(!0))},X[Ie]=function(){T.containerOuter.removeFocusState(),(V===T.input.element||V===T.containerOuter.element&&!T._canSearch)&&T.hideDropdown(!0)},X[at]=function(){V===T.input.element&&(T.containerOuter.removeFocusState(),T.hideDropdown(!0),he&&T.unhighlightAll())},X);Me[this.passedElement.element.type]()}else this._isScrollingOnIe=!1,this.input.element.focus()},k._onFormReset=function(){this._store.dispatch(Ot(this._initialState))},k._highlightChoice=function(b){var T=this;b===void 0&&(b=null);var V=Array.from(this.dropdown.element.querySelectorAll(\"[data-choice-selectable]\"));if(V.length){var Y=b,X=Array.from(this.dropdown.element.querySelectorAll(\".\"+this.config.classNames.highlightedState));X.forEach(function(le){le.classList.remove(T.config.classNames.highlightedState),le.setAttribute(\"aria-selected\",\"false\")}),Y?this._highlightPosition=V.indexOf(Y):(V.length>this._highlightPosition?Y=V[this._highlightPosition]:Y=V[V.length-1],Y||(Y=V[0])),Y.classList.add(this.config.classNames.highlightedState),Y.setAttribute(\"aria-selected\",\"true\"),this.passedElement.triggerEvent(rn.highlightChoice,{el:Y}),this.dropdown.isActive&&(this.input.setActiveDescendant(Y.id),this.containerOuter.setActiveDescendant(Y.id))}},k._addItem=function(b){var T=b.value,V=b.label,Y=V===void 0?null:V,X=b.choiceId,le=X===void 0?-1:X,he=b.groupId,Me=he===void 0?-1:he,Ve=b.customProperties,Le=Ve===void 0?null:Ve,Qe=b.placeholder,ot=Qe===void 0?!1:Qe,qe=b.keyCode,yt=qe===void 0?null:qe,st=typeof T==\"string\"?T.trim():T,lt=yt,qt=Le,On=this._store.items,Vn=Y||st,ki=le||-1,kr=Me>=0?this._store.getGroupById(Me):null,Jr=On?On.length+1:1;return this.config.prependValue&&(st=this.config.prependValue+st.toString()),this.config.appendValue&&(st+=this.config.appendValue.toString()),this._store.dispatch(Te({value:st,label:Vn,id:Jr,choiceId:ki,groupId:Me,customProperties:Le,placeholder:ot,keyCode:lt})),this._isSelectOneElement&&this.removeActiveItems(Jr),this.passedElement.triggerEvent(rn.addItem,{id:Jr,value:st,label:Vn,customProperties:qt,groupValue:kr&&kr.value?kr.value:void 0,keyCode:lt}),this},k._removeItem=function(b){if(!b||!it(\"Object\",b))return this;var T=b.id,V=b.value,Y=b.label,X=b.choiceId,le=b.groupId,he=le>=0?this._store.getGroupById(le):null;return this._store.dispatch(Ue(T,X)),he&&he.value?this.passedElement.triggerEvent(rn.removeItem,{id:T,value:V,label:Y,groupValue:he.value}):this.passedElement.triggerEvent(rn.removeItem,{id:T,value:V,label:Y}),this},k._addChoice=function(b){var T=b.value,V=b.label,Y=V===void 0?null:V,X=b.isSelected,le=X===void 0?!1:X,he=b.isDisabled,Me=he===void 0?!1:he,Ve=b.groupId,Le=Ve===void 0?-1:Ve,Qe=b.customProperties,ot=Qe===void 0?null:Qe,qe=b.placeholder,yt=qe===void 0?!1:qe,st=b.keyCode,lt=st===void 0?null:st;if(!(typeof T==\"undefined\"||T===null)){var qt=this._store.choices,On=Y||T,Vn=qt?qt.length+1:1,ki=this._baseId+\"-\"+this._idNames.itemChoice+\"-\"+Vn;this._store.dispatch(ce({id:Vn,groupId:Le,elementId:ki,value:T,label:On,disabled:Me,customProperties:ot,placeholder:yt,keyCode:lt})),le&&this._addItem({value:T,label:On,choiceId:Vn,customProperties:ot,placeholder:yt,keyCode:lt})}},k._addGroup=function(b){var T=this,V=b.group,Y=b.id,X=b.valueKey,le=X===void 0?\"value\":X,he=b.labelKey,Me=he===void 0?\"label\":he,Ve=it(\"Object\",V)?V.choices:Array.from(V.getElementsByTagName(\"OPTION\")),Le=Y||Math.floor(new Date().valueOf()*Math.random()),Qe=V.disabled?V.disabled:!1;if(Ve){this._store.dispatch(Ft({value:V.label,id:Le,active:!0,disabled:Qe}));var ot=function(yt){var st=yt.disabled||yt.parentNode&&yt.parentNode.disabled;T._addChoice({value:yt[le],label:it(\"Object\",yt)?yt[Me]:yt.innerHTML,isSelected:yt.selected,isDisabled:st,groupId:Le,customProperties:yt.customProperties,placeholder:yt.placeholder})};Ve.forEach(ot)}else this._store.dispatch(Ft({value:V.label,id:V.id,active:!1,disabled:V.disabled}))},k._getTemplate=function(b){var T;if(!b)return null;for(var V=this.config.classNames,Y=arguments.length,X=new Array(Y>1?Y-1:0),le=1;le<Y;le++)X[le-1]=arguments[le];return(T=this._templates[b]).call.apply(T,[this,V].concat(X))},k._createTemplates=function(){var b=this.config.callbackOnCreateTemplates,T={};b&&typeof b==\"function\"&&(T=b.call(this,jt)),this._templates=o()(ie,T)},k._createElements=function(){this.containerOuter=new Cn({element:this._getTemplate(\"containerOuter\",this._direction,this._isSelectElement,this._isSelectOneElement,this.config.searchEnabled,this.passedElement.element.type),classNames:this.config.classNames,type:this.passedElement.element.type,position:this.config.position}),this.containerInner=new Cn({element:this._getTemplate(\"containerInner\"),classNames:this.config.classNames,type:this.passedElement.element.type,position:this.config.position}),this.input=new ar({element:this._getTemplate(\"input\",this._placeholderValue),classNames:this.config.classNames,type:this.passedElement.element.type,preventPaste:!this.config.paste}),this.choiceList=new ht({element:this._getTemplate(\"choiceList\",this._isSelectOneElement)}),this.itemList=new ht({element:this._getTemplate(\"itemList\",this._isSelectOneElement)}),this.dropdown=new Rr({element:this._getTemplate(\"dropdown\"),classNames:this.config.classNames,type:this.passedElement.element.type})},k._createStructure=function(){this.passedElement.conceal(),this.containerInner.wrap(this.passedElement.element),this.containerOuter.wrap(this.containerInner.element),this._isSelectOneElement?this.input.placeholder=this.config.searchPlaceholderValue||\"\":this._placeholderValue&&(this.input.placeholder=this._placeholderValue,this.input.setWidth()),this.containerOuter.element.appendChild(this.containerInner.element),this.containerOuter.element.appendChild(this.dropdown.element),this.containerInner.element.appendChild(this.itemList.element),this._isTextElement||this.dropdown.element.appendChild(this.choiceList.element),this._isSelectOneElement?this.config.searchEnabled&&this.dropdown.element.insertBefore(this.input.element,this.dropdown.element.firstChild):this.containerInner.element.appendChild(this.input.element),this._isSelectElement&&(this._highlightPosition=0,this._isSearching=!1,this._startLoading(),this._presetGroups.length?this._addPredefinedGroups(this._presetGroups):this._addPredefinedChoices(this._presetChoices),this._stopLoading()),this._isTextElement&&this._addPredefinedItems(this._presetItems)},k._addPredefinedGroups=function(b){var T=this,V=this.passedElement.placeholderOption;V&&V.parentNode.tagName===\"SELECT\"&&this._addChoice({value:V.value,label:V.innerHTML,isSelected:V.selected,isDisabled:V.disabled,placeholder:!0}),b.forEach(function(Y){return T._addGroup({group:Y,id:Y.id||null})})},k._addPredefinedChoices=function(b){var T=this;this.config.shouldSort&&b.sort(this.config.sorter);var V=b.some(function(X){return X.selected}),Y=b.findIndex(function(X){return X.disabled===void 0||!X.disabled});b.forEach(function(X,le){var he=X.value,Me=X.label,Ve=X.customProperties,Le=X.placeholder;if(T._isSelectElement)if(X.choices)T._addGroup({group:X,id:X.id||null});else{var Qe=T._isSelectOneElement&&!V&&le===Y,ot=Qe?!0:X.selected,qe=X.disabled;T._addChoice({value:he,label:Me,isSelected:ot,isDisabled:qe,customProperties:Ve,placeholder:Le})}else T._addChoice({value:he,label:Me,isSelected:X.selected,isDisabled:X.disabled,customProperties:Ve,placeholder:Le})})},k._addPredefinedItems=function(b){var T=this;b.forEach(function(V){typeof V==\"object\"&&V.value&&T._addItem({value:V.value,label:V.label,choiceId:V.id,customProperties:V.customProperties,placeholder:V.placeholder}),typeof V==\"string\"&&T._addItem({value:V})})},k._setChoiceOrItem=function(b){var T=this,V=Je(b).toLowerCase(),Y={object:function(){b.value&&(T._isTextElement?T._addItem({value:b.value,label:b.label,choiceId:b.id,customProperties:b.customProperties,placeholder:b.placeholder}):T._addChoice({value:b.value,label:b.label,isSelected:!0,isDisabled:!1,customProperties:b.customProperties,placeholder:b.placeholder}))},string:function(){T._isTextElement?T._addItem({value:b}):T._addChoice({value:b,label:b,isSelected:!0,isDisabled:!1})}};Y[V]()},k._findAndSelectChoiceByValue=function(b){var T=this,V=this._store.choices,Y=V.find(function(X){return T.config.valueComparer(X.value,b)});Y&&!Y.selected&&this._addItem({value:Y.value,label:Y.label,choiceId:Y.id,groupId:Y.groupId,customProperties:Y.customProperties,placeholder:Y.placeholder,keyCode:Y.keyCode})},k._generatePlaceholderValue=function(){if(this._isSelectElement){var b=this.passedElement.placeholderOption;return b?b.text:!1}var T=this.config,V=T.placeholder,Y=T.placeholderValue,X=this.passedElement.element.dataset;if(V){if(Y)return Y;if(X.placeholder)return X.placeholder}return!1},z}(),tu=t.default=Gr}]).default})});var gC=wn((FZ,pC)=>{var IH=typeof Element!=\"undefined\",AH=typeof Map==\"function\",OH=typeof Set==\"function\",LH=typeof ArrayBuffer==\"function\"&&!!ArrayBuffer.isView;function jd(e,t){if(e===t)return!0;if(e&&t&&typeof e==\"object\"&&typeof t==\"object\"){if(e.constructor!==t.constructor)return!1;var r,n,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!jd(e[n],t[n]))return!1;return!0}var a;if(AH&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;for(a=e.entries();!(n=a.next()).done;)if(!jd(n.value[1],t.get(n.value[0])))return!1;return!0}if(OH&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(LH&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==\"function\"&&typeof t.valueOf==\"function\")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==\"function\"&&typeof t.toString==\"function\")return e.toString()===t.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;if(IH&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((i[n]===\"_owner\"||i[n]===\"__v\"||i[n]===\"__o\")&&e.$$typeof)&&!jd(e[i[n]],t[i[n]]))return!1;return!0}return e!==e&&t!==t}pC.exports=function(t,r){try{return jd(t,r)}catch(n){if((n.message||\"\").match(/stack|recursion/i))return console.warn(\"react-fast-compare cannot handle circular refs\"),!1;throw n}}});var S_=wn((Gne,Dy)=>{(function(){var e;typeof Dy!=\"undefined\"?e=Dy.exports=n:e=function(){return this||(0,eval)(\"this\")}(),e.format=n,e.vsprintf=r,typeof console!=\"undefined\"&&typeof console.log==\"function\"&&(e.printf=t);function t(){console.log(n.apply(null,arguments))}function r(i,a){return n.apply(null,[i].concat(a))}function n(i){for(var a=1,o=[].slice.call(arguments),s=0,u=i.length,l=\"\",c,d=!1,m,h,g=!1,y,v=function(){return o[a++]},D=function(){for(var I=\"\";/\\d/.test(i[s]);)I+=i[s++],c=i[s];return I.length>0?parseInt(I):null};s<u;++s)if(c=i[s],d)switch(d=!1,c==\".\"?(g=!1,c=i[++s]):c==\"0\"&&i[s+1]==\".\"?(g=!0,s+=2,c=i[s]):g=!0,y=D(),c){case\"b\":l+=parseInt(v(),10).toString(2);break;case\"c\":m=v(),typeof m==\"string\"||m instanceof String?l+=m:l+=String.fromCharCode(parseInt(m,10));break;case\"d\":l+=parseInt(v(),10);break;case\"f\":h=String(parseFloat(v()).toFixed(y||6)),l+=g?h:h.replace(/^0/,\"\");break;case\"j\":l+=JSON.stringify(v());break;case\"o\":l+=\"0\"+parseInt(v(),10).toString(8);break;case\"s\":l+=v();break;case\"x\":l+=\"0x\"+parseInt(v(),10).toString(16);break;case\"X\":l+=\"0x\"+parseInt(v(),10).toString(16).toUpperCase();break;default:l+=c;break}else c===\"%\"?d=!0:l+=c;return l}})()});var HB={};Rf(HB,{default:()=>wf});module.exports=ov(HB);function fu(e,t){let r=Object.keys(t).map(n=>mF(e,n,t[n]));return r.length===1?r[0]:function(){r.forEach(n=>n())}}function mF(e,t,r){let n=e[t],i=e.hasOwnProperty(t),a=r(n);return n&&Object.setPrototypeOf(a,n),Object.setPrototypeOf(o,a),e[t]=o,s;function o(...u){return a===n&&e[t]===o&&s(),a.apply(this,u)}function s(){e[t]===o&&(i?e[t]=n:delete e[t]),a!==n&&(a=n,Object.setPrototypeOf(o,n||Function))}}var Rn=require(\"obsidian\");var Ws,Xe,cv,pF,Va,sv,dv,Hf,Wf,Bf,Vf,fv,Us={},hv=[],gF=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,pu=Array.isArray;function Ii(e,t){for(var r in t)e[r]=t[r];return e}function mv(e){var t=e.parentNode;t&&t.removeChild(e)}function xr(e,t,r){var n,i,a,o={};for(a in t)a==\"key\"?n=t[a]:a==\"ref\"?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Ws.call(arguments,2):r),typeof e==\"function\"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return $s(e,o,n,i,null)}function $s(e,t,r,n,i){var a={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i==null?++cv:i,__i:-1,__u:0};return i==null&&Xe.vnode!=null&&Xe.vnode(a),a}function Yf(){return{current:null}}function ct(e){return e.children}function Br(e,t){this.props=e,this.context=t}function $a(e,t){if(t==null)return e.__?$a(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type==\"function\"?$a(e):null}function pv(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return pv(e)}}function $f(e){(!e.__d&&(e.__d=!0)&&Va.push(e)&&!mu.__r++||sv!==Xe.debounceRendering)&&((sv=Xe.debounceRendering)||dv)(mu)}function mu(){var e,t,r,n,i,a,o,s;for(Va.sort(Hf);e=Va.shift();)e.__d&&(t=Va.length,n=void 0,a=(i=(r=e).__v).__e,o=[],s=[],r.__P&&((n=Ii({},i)).__v=i.__v+1,Xe.vnode&&Xe.vnode(n),zf(r.__P,n,i,r.__n,r.__P.ownerSVGElement!==void 0,32&i.__u?[a]:null,o,a==null?$a(i):a,!!(32&i.__u),s),n.__v=i.__v,n.__.__k[n.__i]=n,vv(o,n,s),n.__e!=a&&pv(n)),Va.length>t&&Va.sort(Hf));mu.__r=0}function gv(e,t,r,n,i,a,o,s,u,l,c){var d,m,h,g,y,v=n&&n.__k||hv,D=t.length;for(r.__d=u,yF(r,t,v),u=r.__d,d=0;d<D;d++)(h=r.__k[d])!=null&&typeof h!=\"boolean\"&&typeof h!=\"function\"&&(m=h.__i===-1?Us:v[h.__i]||Us,h.__i=d,zf(e,h,m,i,a,o,s,u,l,c),g=h.__e,h.ref&&m.ref!=h.ref&&(m.ref&&Kf(m.ref,null,h),c.push(h.ref,h.__c||g,h)),y==null&&g!=null&&(y=g),65536&h.__u||m.__k===h.__k?(u&&!u.isConnected&&(u=$a(m)),u=yv(h,u,e)):typeof h.type==\"function\"&&h.__d!==void 0?u=h.__d:g&&(u=g.nextSibling),h.__d=void 0,h.__u&=-196609);r.__d=u,r.__e=y}function yF(e,t,r){var n,i,a,o,s,u=t.length,l=r.length,c=l,d=0;for(e.__k=[],n=0;n<u;n++)o=n+d,(i=e.__k[n]=(i=t[n])==null||typeof i==\"boolean\"||typeof i==\"function\"?null:typeof i==\"string\"||typeof i==\"number\"||typeof i==\"bigint\"||i.constructor==String?$s(null,i,null,null,null):pu(i)?$s(ct,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?$s(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=e,i.__b=e.__b+1,s=vF(i,r,o,c),i.__i=s,a=null,s!==-1&&(c--,(a=r[s])&&(a.__u|=131072)),a==null||a.__v===null?(s==-1&&d--,typeof i.type!=\"function\"&&(i.__u|=65536)):s!==o&&(s===o+1?d++:s>o?c>u-o?d+=s-o:d--:s<o?s==o-1&&(d=s-o):d=0,s!==n+d&&(i.__u|=65536))):(a=r[o])&&a.key==null&&a.__e&&!(131072&a.__u)&&(a.__e==e.__d&&(e.__d=$a(a)),Uf(a,a,!1),r[o]=null,c--);if(c)for(n=0;n<l;n++)(a=r[n])!=null&&!(131072&a.__u)&&(a.__e==e.__d&&(e.__d=$a(a)),Uf(a,a))}function yv(e,t,r){var n,i;if(typeof e.type==\"function\"){for(n=e.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=e,t=yv(n[i],t,r));return t}e.__e!=t&&(r.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function fi(e,t){return t=t||[],e==null||typeof e==\"boolean\"||(pu(e)?e.some(function(r){fi(r,t)}):t.push(e)),t}function vF(e,t,r,n){var i=e.key,a=e.type,o=r-1,s=r+1,u=t[r];if(u===null||u&&i==u.key&&a===u.type&&!(131072&u.__u))return r;if(n>(u!=null&&!(131072&u.__u)?1:0))for(;o>=0||s<t.length;){if(o>=0){if((u=t[o])&&!(131072&u.__u)&&i==u.key&&a===u.type)return o;o--}if(s<t.length){if((u=t[s])&&!(131072&u.__u)&&i==u.key&&a===u.type)return s;s++}}return-1}function lv(e,t,r){t[0]===\"-\"?e.setProperty(t,r==null?\"\":r):e[t]=r==null?\"\":typeof r!=\"number\"||gF.test(t)?r:r+\"px\"}function hu(e,t,r,n,i){var a;e:if(t===\"style\")if(typeof r==\"string\")e.style.cssText=r;else{if(typeof n==\"string\"&&(e.style.cssText=n=\"\"),n)for(t in n)r&&t in r||lv(e.style,t,\"\");if(r)for(t in r)n&&r[t]===n[t]||lv(e.style,t,r[t])}else if(t[0]===\"o\"&&t[1]===\"n\")a=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,\"$1\")),t=t.toLowerCase()in e||t===\"onFocusOut\"||t===\"onFocusIn\"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?n?r.u=n.u:(r.u=Wf,e.addEventListener(t,a?Vf:Bf,a)):e.removeEventListener(t,a?Vf:Bf,a);else{if(i)t=t.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(t!=\"width\"&&t!=\"height\"&&t!=\"href\"&&t!=\"list\"&&t!=\"form\"&&t!=\"tabIndex\"&&t!=\"download\"&&t!=\"rowSpan\"&&t!=\"colSpan\"&&t!=\"role\"&&t in e)try{e[t]=r==null?\"\":r;break e}catch(o){}typeof r==\"function\"||(r==null||r===!1&&t[4]!==\"-\"?e.removeAttribute(t):e.setAttribute(t,r))}}function uv(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.t==null)t.t=Wf++;else if(t.t<r.u)return;return r(Xe.event?Xe.event(t):t)}}}function zf(e,t,r,n,i,a,o,s,u,l){var c,d,m,h,g,y,v,D,I,C,x,O,A,P,B,G=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),a=[s=t.__e=r.__e]),(c=Xe.__b)&&c(t);e:if(typeof G==\"function\")try{if(D=t.props,I=(c=G.contextType)&&n[c.__c],C=c?I?I.props.value:c.__:n,r.__c?v=(d=t.__c=r.__c).__=d.__E:(\"prototype\"in G&&G.prototype.render?t.__c=d=new G(D,C):(t.__c=d=new Br(D,C),d.constructor=G,d.render=bF),I&&I.sub(d),d.props=D,d.state||(d.state={}),d.context=C,d.__n=n,m=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),G.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Ii({},d.__s)),Ii(d.__s,G.getDerivedStateFromProps(D,d.__s))),h=d.props,g=d.state,d.__v=t,m)G.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(G.getDerivedStateFromProps==null&&D!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(D,C),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(D,d.__s,C)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=D,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(J){J&&(J.__=t)}),x=0;x<d._sb.length;x++)d.__h.push(d._sb[x]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(D,d.__s,C),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,g,y)})}if(d.context=C,d.props=D,d.__P=e,d.__e=!1,O=Xe.__r,A=0,\"prototype\"in G&&G.prototype.render){for(d.state=d.__s,d.__d=!1,O&&O(t),c=d.render(d.props,d.state,d.context),P=0;P<d._sb.length;P++)d.__h.push(d._sb[P]);d._sb=[]}else do d.__d=!1,O&&O(t),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++A<25);d.state=d.__s,d.getChildContext!=null&&(n=Ii(Ii({},n),d.getChildContext())),m||d.getSnapshotBeforeUpdate==null||(y=d.getSnapshotBeforeUpdate(h,g)),gv(e,pu(B=c!=null&&c.type===ct&&c.key==null?c.props.children:c)?B:[B],t,r,n,i,a,o,s,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),v&&(d.__E=d.__=null)}catch(J){t.__v=null,u||a!=null?(t.__e=s,t.__u|=u?160:32,a[a.indexOf(s)]=null):(t.__e=r.__e,t.__k=r.__k),Xe.__e(J,t,r)}else a==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=wF(r.__e,t,r,n,i,a,o,u,l);(c=Xe.diffed)&&c(t)}function vv(e,t,r){t.__d=void 0;for(var n=0;n<r.length;n++)Kf(r[n],r[++n],r[++n]);Xe.__c&&Xe.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(a){a.call(i)})}catch(a){Xe.__e(a,i.__v)}})}function wF(e,t,r,n,i,a,o,s,u){var l,c,d,m,h,g,y,v=r.props,D=t.props,I=t.type;if(I===\"svg\"&&(i=!0),a!=null){for(l=0;l<a.length;l++)if((h=a[l])&&\"setAttribute\"in h==!!I&&(I?h.localName===I:h.nodeType===3)){e=h,a[l]=null;break}}if(e==null){if(I===null)return document.createTextNode(D);e=i?document.createElementNS(\"http://www.w3.org/2000/svg\",I):document.createElement(I,D.is&&D),a=null,s=!1}if(I===null)v===D||s&&e.data===D||(e.data=D);else{if(a=a&&Ws.call(e.childNodes),v=r.props||Us,!s&&a!=null)for(v={},l=0;l<e.attributes.length;l++)v[(h=e.attributes[l]).name]=h.value;for(l in v)h=v[l],l==\"children\"||(l==\"dangerouslySetInnerHTML\"?d=h:l===\"key\"||l in D||hu(e,l,null,h,i));for(l in D)h=D[l],l==\"children\"?m=h:l==\"dangerouslySetInnerHTML\"?c=h:l==\"value\"?g=h:l==\"checked\"?y=h:l===\"key\"||s&&typeof h!=\"function\"||v[l]===h||hu(e,l,h,v[l],i);if(c)s||d&&(c.__html===d.__html||c.__html===e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=\"\"),gv(e,pu(m)?m:[m],t,r,n,i&&I!==\"foreignObject\",a,o,a?a[0]:r.__k&&$a(r,0),s,u),a!=null)for(l=a.length;l--;)a[l]!=null&&mv(a[l]);s||(l=\"value\",g!==void 0&&(g!==e[l]||I===\"progress\"&&!g||I===\"option\"&&g!==v[l])&&hu(e,l,g,v[l],!1),l=\"checked\",y!==void 0&&y!==e[l]&&hu(e,l,y,v[l],!1))}return e}function Kf(e,t,r){try{typeof e==\"function\"?e(t):e.current=t}catch(n){Xe.__e(n,r)}}function Uf(e,t,r){var n,i;if(Xe.unmount&&Xe.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Kf(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(a){Xe.__e(a,t)}n.base=n.__P=null}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Uf(n[i],t,r||typeof e.type!=\"function\");r||e.__e==null||mv(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function bF(e,t,r){return this.constructor(e,r)}function xo(e,t,r){var n,i,a,o;Xe.__&&Xe.__(e,t),i=(n=typeof r==\"function\")?null:r&&r.__k||t.__k,a=[],o=[],zf(t,e=(!n&&r||t).__k=xr(ct,null,[e]),i||Us,Us,t.ownerSVGElement!==void 0,!n&&r?[r]:i?null:t.firstChild?Ws.call(t.childNodes):null,a,!n&&r?r:i?i.__e:t.firstChild,n,o),vv(a,e,o)}function jf(e,t){xo(e,t,jf)}function wv(e,t,r){var n,i,a,o,s=Ii({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a==\"key\"?n=t[a]:a==\"ref\"?i=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?Ws.call(arguments,2):r),$s(e.type,s,n||e.key,i||e.ref,null)}function aa(e,t){var r={__c:t=\"__cC\"+fv++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,a;return this.getChildContext||(i=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(s){s.__e=!0,$f(s)})},this.sub=function(o){i.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),s&&s.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}Ws=hv.slice,Xe={__e:function(e,t,r,n){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),o=i.__d),o)return i.__E=i}catch(s){e=s}throw e}},cv=0,pF=function(e){return e!=null&&e.constructor==null},Br.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ii({},this.state),typeof e==\"function\"&&(e=e(Ii({},r),this.props)),e&&Ii(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),$f(this))},Br.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),$f(this))},Br.prototype.render=ct,Va=[],dv=typeof Promise==\"function\"?Promise.prototype.then.bind(Promise.resolve()):activeWindow.setTimeout,Hf=function(e,t){return e.__v.__b-t.__v.__b},mu.__r=0,Wf=0,Bf=uv(!1),Vf=uv(!0),fv=0;var oa,Qt,qf,bv,Co=0,Mv=[],gu=[],an=Xe,Dv=an.__b,Sv=an.__r,Ev=an.diffed,kv=an.__c,xv=an.unmount,Cv=an.__;function _o(e,t){an.__h&&an.__h(Qt,e,Co||t),Co=0;var r=Qt.__H||(Qt.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:gu}),r.__[e]}function Ne(e){return Co=1,Jf(Av,e)}function Jf(e,t,r){var n=_o(oa++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Av(void 0,t),function(s){var u=n.__N?n.__N[0]:n.__[0],l=n.t(u,s);u!==l&&(n.__N=[l,n.__[1]],n.__c.setState({}))}],n.__c=Qt,!Qt.u)){var i=function(s,u,l){if(!n.__c.__H)return!0;var c=n.__c.__H.__.filter(function(m){return!!m.__c});if(c.every(function(m){return!m.__N}))return!a||a.call(this,s,u,l);var d=!1;return c.forEach(function(m){if(m.__N){var h=m.__[0];m.__=m.__N,m.__N=void 0,h!==m.__[0]&&(d=!0)}}),!(!d&&n.__c.props===s)&&(!a||a.call(this,s,u,l))};Qt.u=!0;var a=Qt.shouldComponentUpdate,o=Qt.componentWillUpdate;Qt.componentWillUpdate=function(s,u,l){if(this.__e){var c=a;a=void 0,i(s,u,l),a=c}o&&o.call(this,s,u,l)},Qt.shouldComponentUpdate=i}return n.__N||n.__}function Ae(e,t){var r=_o(oa++,3);!an.__s&&Zf(r.__H,t)&&(r.__=e,r.i=t,Qt.__H.__h.push(r))}function Ai(e,t){var r=_o(oa++,4);!an.__s&&Zf(r.__H,t)&&(r.__=e,r.i=t,Qt.__h.push(r))}function Fe(e){return Co=5,Re(function(){return{current:e}},[])}function Tv(e,t,r){Co=6,Ai(function(){return typeof e==\"function\"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function Re(e,t){var r=_o(oa++,7);return Zf(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function Ye(e,t){return Co=8,Re(function(){return e},t)}function Ee(e){var t=Qt.context[e.__c],r=_o(oa++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(Qt)),t.props.value):e.__}function Fv(e,t){an.useDebugValue&&an.useDebugValue(t?t(e):e)}function Iv(){var e=_o(oa++,11);if(!e.__){for(var t=Qt.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__=\"P\"+r[0]+\"-\"+r[1]++}return e.__}function DF(){for(var e;e=Mv.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(yu),e.__H.__h.forEach(Gf),e.__H.__h=[]}catch(t){e.__H.__h=[],an.__e(t,e.__v)}}an.__b=function(e){Qt=null,Dv&&Dv(e)},an.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Cv&&Cv(e,t)},an.__r=function(e){Sv&&Sv(e),oa=0;var t=(Qt=e.__c).__H;t&&(qf===Qt?(t.__h=[],Qt.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=gu,r.__N=r.i=void 0})):(t.__h.forEach(yu),t.__h.forEach(Gf),t.__h=[],oa=0)),qf=Qt},an.diffed=function(e){Ev&&Ev(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Mv.push(t)!==1&&bv===an.requestAnimationFrame||((bv=an.requestAnimationFrame)||SF)(DF)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==gu&&(r.__=r.__V),r.i=void 0,r.__V=gu})),qf=Qt=null},an.__c=function(e,t){t.some(function(r){try{r.__h.forEach(yu),r.__h=r.__h.filter(function(n){return!n.__||Gf(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],an.__e(n,r.__v)}}),kv&&kv(e,t)},an.unmount=function(e){xv&&xv(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{yu(n)}catch(i){t=i}}),r.__H=void 0,t&&an.__e(t,r.__v))};var _v=typeof activeWindow.requestAnimationFrame==\"function\";function SF(e){var t,r=function(){activeWindow.clearTimeout(n),_v&&activeWindow.cancelAnimationFrame(t),activeWindow.setTimeout(e)},n=activeWindow.setTimeout(r,100);_v&&(t=activeWindow.requestAnimationFrame(r))}function yu(e){var t=Qt,r=e.__c;typeof r==\"function\"&&(e.__c=void 0,r()),Qt=t}function Gf(e){var t=Qt;e.__c=e.__(),Qt=t}function Zf(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Av(e,t){return typeof t==\"function\"?t(e):t}function $v(e,t){for(var r in t)e[r]=t[r];return e}function Xf(e,t){for(var r in e)if(r!==\"__source\"&&!(r in t))return!0;for(var n in t)if(n!==\"__source\"&&e[n]!==t[n])return!0;return!1}function eh(e,t){this.props=e,this.context=t}function zt(e,t){function r(i){var a=this.props.ref,o=a==i.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,i)||!o:Xf(this.props,i)}function n(i){return this.shouldComponentUpdate=r,xr(e,i)}return n.displayName=\"Memo(\"+(e.displayName||e.name)+\")\",n.prototype.isReactComponent=!0,n.__f=!0,n}(eh.prototype=new Br).isPureReactComponent=!0,eh.prototype.shouldComponentUpdate=function(e,t){return Xf(this.props,e)||Xf(this.state,t)};var Ov=Xe.__b;Xe.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ov&&Ov(e)};var EF=typeof Symbol!=\"undefined\"&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function kF(e){function t(r){var n=$v({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=EF,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(e.displayName||e.name)+\")\",t}var Lv=function(e,t){return e==null?null:fi(fi(e).map(t))},xF={map:Lv,forEach:Lv,count:function(e){return e?fi(e).length:0},only:function(e){var t=fi(e);if(t.length!==1)throw\"Children.only\";return t[0]},toArray:fi},CF=Xe.__e;Xe.__e=function(e,t,r,n){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}CF(e,t,r,n)};var Pv=Xe.unmount;function Uv(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c==\"function\"&&n.__c()}),e.__c.__H=null),(e=$v({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Uv(n,t,r)})),e}function Wv(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Wv(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function vu(){this.__u=0,this.t=null,this.__b=null}function Yv(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function _F(e){var t,r,n;function i(a){if(t||(t=e()).then(function(o){r=o.default||o},function(o){n=o}),n)throw n;if(!r)throw t;return xr(r,a)}return i.displayName=\"Lazy\",i.__f=!0,i}function Ys(){this.u=null,this.o=null}Xe.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Pv&&Pv(e)},(vu.prototype=new Br).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=Yv(n.__v),a=!1,o=function(){a||(a=!0,r.__R=null,i?i(s):s())};r.__R=o;var s=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=Wv(u,u.__c.__P,u.__c.__O)}var l;for(n.setState({__a:n.__b=null});l=n.t.pop();)l.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(o,o)},vu.prototype.componentWillUnmount=function(){this.t=[]},vu.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement(\"div\"),n=this.__v.__k[0].__c;this.__v.__k[0]=Uv(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&xr(ct,null,e.fallback);return i&&(i.__u&=-33),[xr(ct,null,t.__a?null:e.children),i]};var Nv=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==\"t\"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function MF(e){return this.getChildContext=function(){return e.context},e.children}function TF(e){var t=this,r=e.i;t.componentWillUnmount=function(){xo(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,i){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),xo(xr(MF,{context:t.context},e.__v),t.l)}function Oi(e,t){var r=xr(TF,{__v:e,i:t});return r.containerInfo=t,r}(Ys.prototype=new Br).__a=function(e){var t=this,r=Yv(t.__v),n=t.o.get(e);return n[0]++,function(i){var a=function(){t.props.revealOrder?(n.push(i),Nv(t,e,n)):i()};r?r(a):a()}},Ys.prototype.render=function(e){this.u=null,this.o=new Map;var t=fi(e.children);e.revealOrder&&e.revealOrder[0]===\"b\"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},Ys.prototype.componentDidUpdate=Ys.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Nv(e,r,t)})};var zv=typeof Symbol!=\"undefined\"&&Symbol.for&&Symbol.for(\"react.element\")||60103,FF=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,IF=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,AF=/[A-Z0-9]/g,OF=typeof document!=\"undefined\",LF=function(e){return(typeof Symbol!=\"undefined\"&&typeof Symbol()==\"symbol\"?/fil|che|rad/:/fil|che|ra/).test(e)};function Li(e,t,r){return t.__k==null&&(t.textContent=\"\"),xo(e,t),typeof r==\"function\"&&r(),e?e.__c:null}function PF(e,t,r){return jf(e,t),typeof r==\"function\"&&r(),e?e.__c:null}Br.prototype.isReactComponent={},[\"componentWillMount\",\"componentWillReceiveProps\",\"componentWillUpdate\"].forEach(function(e){Object.defineProperty(Br.prototype,e,{configurable:!0,get:function(){return this[\"UNSAFE_\"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Rv=Xe.event;function NF(){}function RF(){return this.cancelBubble}function HF(){return this.defaultPrevented}Xe.event=function(e){return Rv&&(e=Rv(e)),e.persist=NF,e.isPropagationStopped=RF,e.isDefaultPrevented=HF,e.nativeEvent=e};var th,BF={enumerable:!1,configurable:!0,get:function(){return this.class}},Hv=Xe.vnode;Xe.vnode=function(e){typeof e.type==\"string\"&&function(t){var r=t.props,n=t.type,i={};for(var a in r){var o=r[a];if(!(a===\"value\"&&\"defaultValue\"in r&&o==null||OF&&a===\"children\"&&n===\"noscript\"||a===\"class\"||a===\"className\")){var s=a.toLowerCase();a===\"defaultValue\"&&\"value\"in r&&r.value==null?a=\"value\":a===\"download\"&&o===!0?o=\"\":s===\"translate\"&&o===\"no\"?o=!1:s===\"ondoubleclick\"?a=\"ondblclick\":s!==\"onchange\"||n!==\"input\"&&n!==\"textarea\"||LF(r.type)?s===\"onfocus\"?a=\"onfocusin\":s===\"onblur\"?a=\"onfocusout\":IF.test(a)?a=s:n.indexOf(\"-\")===-1&&FF.test(a)?a=a.replace(AF,\"-$&\").toLowerCase():o===null&&(o=void 0):s=a=\"oninput\",s===\"oninput\"&&i[a=s]&&(a=\"oninputCapture\"),i[a]=o}}n==\"select\"&&i.multiple&&Array.isArray(i.value)&&(i.value=fi(r.children).forEach(function(u){u.props.selected=i.value.indexOf(u.props.value)!=-1})),n==\"select\"&&i.defaultValue!=null&&(i.value=fi(r.children).forEach(function(u){u.props.selected=i.multiple?i.defaultValue.indexOf(u.props.value)!=-1:i.defaultValue==u.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,\"className\",BF)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=zv,Hv&&Hv(e)};var Bv=Xe.__r;Xe.__r=function(e){Bv&&Bv(e),th=e.__c};var Vv=Xe.diffed;Xe.diffed=function(e){Vv&&Vv(e);var t=e.props,r=e.__e;r!=null&&e.type===\"textarea\"&&\"value\"in t&&t.value!==r.value&&(r.value=t.value==null?\"\":t.value),th=null};var VF={ReactCurrentDispatcher:{current:{readContext:function(e){return th.__n[e.__c].props.value}}}};function $F(e){return xr.bind(null,e)}function wu(e){return!!e&&e.$$typeof===zv}function UF(e){return wu(e)&&e.type===ct}function WF(e){return!!e&&!!e.displayName&&(typeof e.displayName==\"string\"||e.displayName instanceof String)&&e.displayName.startsWith(\"Memo(\")}function YF(e){return wu(e)?wv.apply(null,arguments):e}function Pi(e){return!!e.__k&&(xo(null,e),!0)}function zF(e){return e&&(e.base||e.nodeType===1&&e)||null}var KF=function(e,t){return e(t)},jF=function(e,t){return e(t)},qF=ct;function Kv(e){e()}function GF(e){return e}function JF(){return[!1,Kv]}var ZF=Ai,QF=wu;function XF(e,t){var r=t(),n=Ne({h:{__:r,v:t}}),i=n[0].h,a=n[1];return Ai(function(){i.__=r,i.v=t,Qf(i)&&a({h:i})},[e,r,t]),Ae(function(){return Qf(i)&&a({h:i}),e(function(){Qf(i)&&a({h:i})})},[e]),r}function Qf(e){var t,r,n=e.v,i=e.__;try{var a=n();return!((t=i)===(r=a)&&(t!==0||1/t==1/r)||t!=t&&r!=r)}catch(o){return!0}}var $e={useState:Ne,useId:Iv,useReducer:Jf,useEffect:Ae,useLayoutEffect:Ai,useInsertionEffect:ZF,useTransition:JF,useDeferredValue:GF,useSyncExternalStore:XF,startTransition:Kv,useRef:Fe,useImperativeHandle:Tv,useMemo:Re,useCallback:Ye,useContext:Ee,useDebugValue:Fv,version:\"17.0.2\",Children:xF,render:Li,hydrate:PF,unmountComponentAtNode:Pi,createPortal:Oi,createElement:xr,createContext:aa,createFactory:$F,cloneElement:YF,createRef:Yf,Fragment:ct,isValidElement:wu,isElement:QF,isFragment:UF,isMemo:WF,findDOMNode:zF,Component:Br,PureComponent:eh,memo:zt,forwardRef:kF,flushSync:jF,unstable_batchedUpdates:KF,StrictMode:qF,Suspense:vu,SuspenseList:Ys,lazy:_F,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:VF};function Ge(e){if(typeof e==\"string\"||typeof e==\"number\")return\"\"+e;let t=\"\";if(Array.isArray(e))for(let r=0,n;r<e.length;r++)(n=Ge(e[r]))!==\"\"&&(t+=(t&&\" \")+n);else for(let r in e)e[r]&&(t+=(t&&\" \")+r);return t}var Ss=Ct(ln());var Sh=Ct(ln()),da=require(\"obsidian\");var rw=Ct(tw()),la=Ct(ln());function nw(e){return Object.prototype.toString.call(e)===\"[object Object]\"}function Ni(e){var t,r;return nw(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(nw(r)===!1||r.hasOwnProperty(\"isPrototypeOf\")===!1)))}function DI(e,t){return e.length!==t.length?!1:e.every((r,n,i)=>n===i.length-1?r!==t[n]:r===t[n])}function SI(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}function js(e,t){if(SI(e,t))return 2;if(!DI(e,t))return 3;let r=e.length-1;return e[r]<t[r]?1:0}function un(e,t){let r=t.length?t[0]:null;return r!==null&&e.children&&e.children[r]?un(e.children[r],t.slice(1)):e}function kI(e,t){let r=t;for(let n=e.length-1;n>=0;n--)r={children:{[e[n]]:r}};return r}function qs(e,t){let r=t;for(let n=e.length-2;n>=0;n--)r={children:{[e[n]]:r}};return r}function iw(e,t){let r=t?[e.last(),1,t]:[e.last(),1];return qs(e,{children:{$splice:[r]}})}function aw(e,t,r=0){return qs(e,{children:{$splice:[[e.last()+r,0,...t]]}})}function xI(e,t){return qs(e,{children:{$push:t}})}function CI(e,t){return qs(e,{children:{$unshift:t}})}function Ri(e,t,r,n,i){let a=n?n(un(e,t)):un(e,t),s=js(t,r)===1?-1:0,u=i==null?void 0:i(un(e,t)),l=iw(t,u),c=aw(r,Array.isArray(a)?a:[a],s),d=(0,rw.default)(l,c,{isMergeableObject:h=>Ni(h)||Array.isArray(h)});return(0,la.default)(e,d)}function mi(e,t,r){return(0,la.default)(e,iw(t,r))}function Xr(e,t,r){return(0,la.default)(e,aw(t,r))}function ah(e,t,r){return(0,la.default)(e,xI(t,r))}function ow(e,t,r){return(0,la.default)(e,CI(t,r))}function Du(e,t,r){return(0,la.default)(e,kI(t,r))}function oh(e,t,r){return(0,la.default)(e,qs(t,r))}var Gs=[\"MO\",\"TU\",\"WE\",\"TH\",\"FR\",\"SA\",\"SU\"],Mn=function(){function e(t,r){if(r===0)throw new Error(\"Can't create weekday with n == 0\");this.weekday=t,this.n=r}return e.fromStr=function(t){return new e(Gs.indexOf(t))},e.prototype.nth=function(t){return this.n===t?this:new e(this.weekday,t)},e.prototype.equals=function(t){return this.weekday===t.weekday&&this.n===t.n},e.prototype.toString=function(){var t=Gs[this.weekday];return this.n&&(t=(this.n>0?\"+\":\"\")+String(this.n)+t),t},e.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},e}();var Gt=function(e){return e!=null},Cr=function(e){return typeof e==\"number\"},sh=function(e){return typeof e==\"string\"&&Gs.includes(e)},$n=Array.isArray,$r=function(e,t){t===void 0&&(t=e),arguments.length===1&&(t=e,e=0);for(var r=[],n=e;n<t;n++)r.push(n);return r};var wt=function(e,t){var r=0,n=[];if($n(e))for(;r<t;r++)n[r]=[].concat(e);else for(;r<t;r++)n[r]=e;return n},sw=function(e){return $n(e)?e:[e]};function Wa(e,t,r){r===void 0&&(r=\" \");var n=String(e);return t=t>>0,n.length>t?String(n):(t=t-n.length,t>r.length&&(r+=wt(r,t/r.length)),r.slice(0,t)+String(n))}var lw=function(e,t,r){var n=e.split(t);return r?n.slice(0,r).concat([n.slice(r).join(t)]):n},qn=function(e,t){var r=e%t;return r*t<0?r+t:r},Su=function(e,t){return{div:Math.floor(e/t),mod:qn(e,t)}},_r=function(e){return!Gt(e)||e.length===0},bn=function(e){return!_r(e)},Et=function(e,t){return bn(e)&&e.indexOf(t)!==-1};var pi=function(e,t,r,n,i,a){return n===void 0&&(n=0),i===void 0&&(i=0),a===void 0&&(a=0),new Date(Date.UTC(e,t-1,r,n,i,a))},_I=[31,28,31,30,31,30,31,31,30,31,30,31],cw=1e3*60*60*24,Eu=9999,dw=pi(1970,1,1),MI=[6,0,1,2,3,4,5];var To=function(e){return e%4===0&&e%100!==0||e%400===0},lh=function(e){return e instanceof Date},Ya=function(e){return lh(e)&&!isNaN(e.getTime())};var TI=function(e,t){var r=e.getTime(),n=t.getTime(),i=r-n;return Math.round(i/cw)},Js=function(e){return TI(e,dw)},ku=function(e){return new Date(dw.getTime()+e*cw)},FI=function(e){var t=e.getUTCMonth();return t===1&&To(e.getUTCFullYear())?29:_I[t]},Hi=function(e){return MI[e.getUTCDay()]},uh=function(e,t){var r=pi(e,t+1,1);return[Hi(r),FI(r)]},xu=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},Cu=function(e){var t=new Date(e.getTime());return t},ch=function(e){for(var t=[],r=0;r<e.length;r++)t.push(Cu(e[r]));return t},Bi=function(e){e.sort(function(t,r){return t.getTime()-r.getTime()})},Fo=function(e,t){t===void 0&&(t=!0);var r=new Date(e);return[Wa(r.getUTCFullYear().toString(),4,\"0\"),Wa(r.getUTCMonth()+1,2,\"0\"),Wa(r.getUTCDate(),2,\"0\"),\"T\",Wa(r.getUTCHours(),2,\"0\"),Wa(r.getUTCMinutes(),2,\"0\"),Wa(r.getUTCSeconds(),2,\"0\"),t?\"Z\":\"\"].join(\"\")},Zs=function(e){var t=/^(\\d{4})(\\d{2})(\\d{2})(T(\\d{2})(\\d{2})(\\d{2})Z?)?$/,r=t.exec(e);if(!r)throw new Error(\"Invalid UNTIL value: \".concat(e));return new Date(Date.UTC(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10),parseInt(r[5],10)||0,parseInt(r[6],10)||0,parseInt(r[7],10)||0))},uw=function(e,t){var r=e.toLocaleString(\"sv-SE\",{timeZone:t});return r.replace(\" \",\"T\")+\"Z\"},fw=function(e,t){var r=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(uw(e,r)),i=new Date(uw(e,t!=null?t:\"UTC\")),a=i.getTime()-n.getTime();return new Date(e.getTime()-a)};var II=function(){function e(t,r){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=t,this.args=r,t===\"between\"?(this.maxDate=r.inc?r.before:new Date(r.before.getTime()-1),this.minDate=r.inc?r.after:new Date(r.after.getTime()+1)):t===\"before\"?this.maxDate=r.inc?r.dt:new Date(r.dt.getTime()-1):t===\"after\"&&(this.minDate=r.inc?r.dt:new Date(r.dt.getTime()+1))}return e.prototype.accept=function(t){++this.total;var r=this.minDate&&t<this.minDate,n=this.maxDate&&t>this.maxDate;if(this.method===\"between\"){if(r)return!0;if(n)return!1}else if(this.method===\"before\"){if(n)return!1}else if(this.method===\"after\")return r?!0:(this.add(t),!1);return this.add(t)},e.prototype.add=function(t){return this._result.push(t),!0},e.prototype.getValue=function(){var t=this._result;switch(this.method){case\"all\":case\"between\":return t;case\"before\":case\"after\":default:return t.length?t[t.length-1]:null}},e.prototype.clone=function(){return new e(this.method,this.args)},e}(),Vi=II;var dh=function(e,t){return dh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},dh(e,t)};function Io(e,t){if(typeof t!=\"function\"&&t!==null)throw new TypeError(\"Class extends value \"+String(t)+\" is not a constructor or null\");dh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Un=function(){return Un=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Un.apply(this,arguments)};function Ao(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{l(n.next(c))}catch(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((n=n.apply(e,t||[])).next())})}function Oo(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==\"function\"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError(\"Generator is already executing.\");for(;o&&(o=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){r.label=l[1];break}if(l[0]===6&&r.label<a[1]){r.label=a[1],a=l;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(l);break}a[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(c){l=[6,c],i=0}finally{n=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function AI(e,t){var r=typeof Symbol==\"function\"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a}function hw(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(AI(arguments[t]));return e}function ke(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var OI=function(e){Io(t,e);function t(r,n,i){var a=e.call(this,r,n)||this;return a.iterator=i,a}return t.prototype.add=function(r){return this.iterator(r,this._result.length)?(this._result.push(r),!0):!1},t}(Vi),fh=OI;var LI={dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],tokens:{SKIP:/^[ \\r\\n\\t]+|^\\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,\"day(s)\":/^days?/i,\"weekday(s)\":/^weekdays?/i,\"week(s)\":/^weeks?/i,\"hour(s)\":/^hours?/i,\"minute(s)\":/^minutes?/i,\"month(s)\":/^months?/i,\"year(s)\":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,\"time(s)\":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\\s*|(and|or)\\s*)+/i}},za=LI;var mw=function(e,t){return e.indexOf(t)!==-1},PI=function(e){return e.toString()},NI=function(e,t,r){return\"\".concat(t,\" \").concat(r,\", \").concat(e)},RI=function(){function e(t,r,n,i){if(r===void 0&&(r=PI),n===void 0&&(n=za),i===void 0&&(i=NI),this.text=[],this.language=n||za,this.gettext=r,this.dateFormatter=i,this.rrule=t,this.options=t.options,this.origOptions=t.origOptions,this.origOptions.bymonthday){var a=[].concat(this.options.bymonthday),o=[].concat(this.options.bynmonthday);a.sort(function(c,d){return c-d}),o.sort(function(c,d){return d-c}),this.bymonthday=a.concat(o),this.bymonthday.length||(this.bymonthday=null)}if(Gt(this.origOptions.byweekday)){var s=$n(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],u=String(s);this.byweekday={allWeeks:s.filter(function(c){return!c.n}),someWeeks:s.filter(function(c){return!!c.n}),isWeekdays:u.indexOf(\"MO\")!==-1&&u.indexOf(\"TU\")!==-1&&u.indexOf(\"WE\")!==-1&&u.indexOf(\"TH\")!==-1&&u.indexOf(\"FR\")!==-1&&u.indexOf(\"SA\")===-1&&u.indexOf(\"SU\")===-1,isEveryDay:u.indexOf(\"MO\")!==-1&&u.indexOf(\"TU\")!==-1&&u.indexOf(\"WE\")!==-1&&u.indexOf(\"TH\")!==-1&&u.indexOf(\"FR\")!==-1&&u.indexOf(\"SA\")!==-1&&u.indexOf(\"SU\")!==-1};var l=function(c,d){return c.weekday-d.weekday};this.byweekday.allWeeks.sort(l),this.byweekday.someWeeks.sort(l),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return e.isFullyConvertible=function(t){var r=!0;if(!(t.options.freq in e.IMPLEMENTED)||t.origOptions.until&&t.origOptions.count)return!1;for(var n in t.origOptions){if(mw([\"dtstart\",\"tzid\",\"wkst\",\"freq\"],n))return!0;if(!mw(e.IMPLEMENTED[t.options.freq],n))return!1}return r},e.prototype.isFullyConvertible=function(){return e.isFullyConvertible(this.rrule)},e.prototype.toString=function(){var t=this.gettext;if(!(this.options.freq in e.IMPLEMENTED))return t(\"RRule error: Unable to fully convert this rrule to text\");if(this.text=[t(\"every\")],this[Oe.FREQUENCIES[this.options.freq]](),this.options.until){this.add(t(\"until\"));var r=this.options.until;this.add(this.dateFormatter(r.getUTCFullYear(),this.language.monthNames[r.getUTCMonth()],r.getUTCDate()))}else this.options.count&&this.add(t(\"for\")).add(this.options.count.toString()).add(this.plural(this.options.count)?t(\"times\"):t(\"time\"));return this.isFullyConvertible()||this.add(t(\"(~ approximate)\")),this.text.join(\"\")},e.prototype.HOURLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t(\"hours\"):t(\"hour\"))},e.prototype.MINUTELY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t(\"minutes\"):t(\"minute\"))},e.prototype.DAILY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?t(\"weekdays\"):t(\"weekday\")):this.add(this.plural(this.options.interval)?t(\"days\"):t(\"day\")),this.origOptions.bymonth&&(this.add(t(\"in\")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},e.prototype.WEEKLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?t(\"weeks\"):t(\"week\")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?t(\"weekdays\"):t(\"weekday\")):this.add(t(\"on\")).add(t(\"weekdays\")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?t(\"days\"):t(\"day\")):(this.options.interval===1&&this.add(t(\"week\")),this.origOptions.bymonth&&(this.add(t(\"in\")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.origOptions.byhour&&this._byhour())},e.prototype.MONTHLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(t(\"months\")),this.plural(this.options.interval)&&this.add(t(\"in\"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t(\"months\"):t(\"month\"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(t(\"on\")).add(t(\"weekdays\")):this.byweekday&&this._byweekday()},e.prototype.YEARLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(t(\"years\"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t(\"years\"):t(\"year\"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(t(\"on the\")).add(this.list(this.options.byyearday,this.nth,t(\"and\"))).add(t(\"day\")),this.options.byweekno&&this.add(t(\"in\")).add(this.plural(this.options.byweekno.length)?t(\"weeks\"):t(\"week\")).add(this.list(this.options.byweekno,void 0,t(\"and\")))},e.prototype._bymonthday=function(){var t=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(t(\"on\")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,t(\"or\"))).add(t(\"the\")).add(this.list(this.bymonthday,this.nth,t(\"or\"))):this.add(t(\"on the\")).add(this.list(this.bymonthday,this.nth,t(\"and\")))},e.prototype._byweekday=function(){var t=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(t(\"on\")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(t(\"and\")),this.add(t(\"on the\")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,t(\"and\"))))},e.prototype._byhour=function(){var t=this.gettext;this.add(t(\"at\")).add(this.list(this.origOptions.byhour,void 0,t(\"and\")))},e.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext(\"and\")))},e.prototype.nth=function(t){t=parseInt(t.toString(),10);var r,n=this.gettext;if(t===-1)return n(\"last\");var i=Math.abs(t);switch(i){case 1:case 21:case 31:r=i+n(\"st\");break;case 2:case 22:r=i+n(\"nd\");break;case 3:case 23:r=i+n(\"rd\");break;default:r=i+n(\"th\")}return t<0?r+\" \"+n(\"last\"):r},e.prototype.monthtext=function(t){return this.language.monthNames[t-1]},e.prototype.weekdaytext=function(t){var r=Cr(t)?(t+1)%7:t.getJsWeekday();return(t.n?this.nth(t.n)+\" \":\"\")+this.language.dayNames[r]},e.prototype.plural=function(t){return t%100!==1},e.prototype.add=function(t){return this.text.push(\" \"),this.text.push(t),this},e.prototype.list=function(t,r,n,i){var a=this;i===void 0&&(i=\",\"),$n(t)||(t=[t]);var o=function(u,l,c){for(var d=\"\",m=0;m<u.length;m++)m!==0&&(m===u.length-1?d+=\" \"+c+\" \":d+=l+\" \"),d+=u[m];return d};r=r||function(u){return u.toString()};var s=function(u){return r&&r.call(a,u)};return n?o(t.map(s),i,n):t.map(s).join(i+\" \")},e}(),gi=RI;var HI=function(){function e(t){this.done=!0,this.rules=t}return e.prototype.start=function(t){return this.text=t,this.done=!1,this.nextSymbol()},e.prototype.isDone=function(){return this.done&&this.symbol===null},e.prototype.nextSymbol=function(){var t,r;this.symbol=null,this.value=null;do{if(this.done)return!1;var n=void 0;t=null;for(var i in this.rules){n=this.rules[i];var a=n.exec(this.text);a&&(t===null||a[0].length>t[0].length)&&(t=a,r=i)}if(t!=null&&(this.text=this.text.substr(t[0].length),this.text===\"\"&&(this.done=!0)),t==null){this.done=!0,this.symbol=null,this.value=null;return}}while(r===\"SKIP\");return this.symbol=r,this.value=t,!0},e.prototype.accept=function(t){if(this.symbol===t){if(this.value){var r=this.value;return this.nextSymbol(),r}return this.nextSymbol(),!0}return!1},e.prototype.acceptNumber=function(){return this.accept(\"number\")},e.prototype.expect=function(t){if(this.accept(t))return!0;throw new Error(\"expected \"+t+\" but found \"+this.symbol)},e}();function Qs(e,t){t===void 0&&(t=za);var r={},n=new HI(t.tokens);if(!n.start(e))return null;return i(),r;function i(){n.expect(\"every\");var m=n.acceptNumber();if(m&&(r.interval=parseInt(m[0],10)),n.isDone())throw new Error(\"Unexpected end\");switch(n.symbol){case\"day(s)\":r.freq=Oe.DAILY,n.nextSymbol()&&(o(),d());break;case\"weekday(s)\":r.freq=Oe.WEEKLY,r.byweekday=[Oe.MO,Oe.TU,Oe.WE,Oe.TH,Oe.FR],n.nextSymbol(),o(),d();break;case\"week(s)\":r.freq=Oe.WEEKLY,n.nextSymbol()&&(a(),o(),d());break;case\"hour(s)\":r.freq=Oe.HOURLY,n.nextSymbol()&&(a(),d());break;case\"minute(s)\":r.freq=Oe.MINUTELY,n.nextSymbol()&&(a(),d());break;case\"month(s)\":r.freq=Oe.MONTHLY,n.nextSymbol()&&(a(),d());break;case\"year(s)\":r.freq=Oe.YEARLY,n.nextSymbol()&&(a(),d());break;case\"monday\":case\"tuesday\":case\"wednesday\":case\"thursday\":case\"friday\":case\"saturday\":case\"sunday\":r.freq=Oe.WEEKLY;var h=n.symbol.substr(0,2).toUpperCase();if(r.byweekday=[Oe[h]],!n.nextSymbol())return;for(;n.accept(\"comma\");){if(n.isDone())throw new Error(\"Unexpected end\");var g=u();if(!g)throw new Error(\"Unexpected symbol \"+n.symbol+\", expected weekday\");r.byweekday.push(Oe[g]),n.nextSymbol()}o(),c(),d();break;case\"january\":case\"february\":case\"march\":case\"april\":case\"may\":case\"june\":case\"july\":case\"august\":case\"september\":case\"october\":case\"november\":case\"december\":if(r.freq=Oe.YEARLY,r.bymonth=[s()],!n.nextSymbol())return;for(;n.accept(\"comma\");){if(n.isDone())throw new Error(\"Unexpected end\");var y=s();if(!y)throw new Error(\"Unexpected symbol \"+n.symbol+\", expected month\");r.bymonth.push(y),n.nextSymbol()}a(),d();break;default:throw new Error(\"Unknown symbol\")}}function a(){var m=n.accept(\"on\"),h=n.accept(\"the\");if(m||h)do{var g=l(),y=u(),v=s();if(g)y?(n.nextSymbol(),r.byweekday||(r.byweekday=[]),r.byweekday.push(Oe[y].nth(g))):(r.bymonthday||(r.bymonthday=[]),r.bymonthday.push(g),n.accept(\"day(s)\"));else if(y)n.nextSymbol(),r.byweekday||(r.byweekday=[]),r.byweekday.push(Oe[y]);else if(n.symbol===\"weekday(s)\")n.nextSymbol(),r.byweekday||(r.byweekday=[Oe.MO,Oe.TU,Oe.WE,Oe.TH,Oe.FR]);else if(n.symbol===\"week(s)\"){n.nextSymbol();var D=n.acceptNumber();if(!D)throw new Error(\"Unexpected symbol \"+n.symbol+\", expected week number\");for(r.byweekno=[parseInt(D[0],10)];n.accept(\"comma\");){if(D=n.acceptNumber(),!D)throw new Error(\"Unexpected symbol \"+n.symbol+\"; expected monthday\");r.byweekno.push(parseInt(D[0],10))}}else if(v)n.nextSymbol(),r.bymonth||(r.bymonth=[]),r.bymonth.push(v);else return}while(n.accept(\"comma\")||n.accept(\"the\")||n.accept(\"on\"))}function o(){var m=n.accept(\"at\");if(m)do{var h=n.acceptNumber();if(!h)throw new Error(\"Unexpected symbol \"+n.symbol+\", expected hour\");for(r.byhour=[parseInt(h[0],10)];n.accept(\"comma\");){if(h=n.acceptNumber(),!h)throw new Error(\"Unexpected symbol \"+n.symbol+\"; expected hour\");r.byhour.push(parseInt(h[0],10))}}while(n.accept(\"comma\")||n.accept(\"at\"))}function s(){switch(n.symbol){case\"january\":return 1;case\"february\":return 2;case\"march\":return 3;case\"april\":return 4;case\"may\":return 5;case\"june\":return 6;case\"july\":return 7;case\"august\":return 8;case\"september\":return 9;case\"october\":return 10;case\"november\":return 11;case\"december\":return 12;default:return!1}}function u(){switch(n.symbol){case\"monday\":case\"tuesday\":case\"wednesday\":case\"thursday\":case\"friday\":case\"saturday\":case\"sunday\":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(n.symbol){case\"last\":return n.nextSymbol(),-1;case\"first\":return n.nextSymbol(),1;case\"second\":return n.nextSymbol(),n.accept(\"last\")?-2:2;case\"third\":return n.nextSymbol(),n.accept(\"last\")?-3:3;case\"nth\":var m=parseInt(n.value[1],10);if(m<-366||m>366)throw new Error(\"Nth out of range: \"+m);return n.nextSymbol(),n.accept(\"last\")?-m:m;default:return!1}}function c(){n.accept(\"on\"),n.accept(\"the\");var m=l();if(m)for(r.bymonthday=[m],n.nextSymbol();n.accept(\"comma\");){if(m=l(),!m)throw new Error(\"Unexpected symbol \"+n.symbol+\"; expected monthday\");r.bymonthday.push(m),n.nextSymbol()}}function d(){if(n.symbol===\"until\"){var m=Date.parse(n.text);if(!m)throw new Error(\"Cannot parse until date:\"+n.text);r.until=new Date(m)}else n.accept(\"for\")&&(r.count=parseInt(n.value[0],10),n.expect(\"number\"))}}var pt;(function(e){e[e.YEARLY=0]=\"YEARLY\",e[e.MONTHLY=1]=\"MONTHLY\",e[e.WEEKLY=2]=\"WEEKLY\",e[e.DAILY=3]=\"DAILY\",e[e.HOURLY=4]=\"HOURLY\",e[e.MINUTELY=5]=\"MINUTELY\",e[e.SECONDLY=6]=\"SECONDLY\"})(pt||(pt={}));function Xs(e){return e<pt.HOURLY}var pw=function(e,t){return t===void 0&&(t=za),new Oe(Qs(e,t)||void 0)},Lo=[\"count\",\"until\",\"interval\",\"byweekday\",\"bymonthday\",\"bymonth\"];gi.IMPLEMENTED=[];gi.IMPLEMENTED[pt.HOURLY]=Lo;gi.IMPLEMENTED[pt.MINUTELY]=Lo;gi.IMPLEMENTED[pt.DAILY]=[\"byhour\"].concat(Lo);gi.IMPLEMENTED[pt.WEEKLY]=Lo;gi.IMPLEMENTED[pt.MONTHLY]=Lo;gi.IMPLEMENTED[pt.YEARLY]=[\"byweekno\",\"byyearday\"].concat(Lo);var gw=function(e,t,r,n){return new gi(e,t,r,n).toString()},yw=gi.isFullyConvertible;var Po=function(){function e(t,r,n,i){this.hour=t,this.minute=r,this.second=n,this.millisecond=i||0}return e.prototype.getHours=function(){return this.hour},e.prototype.getMinutes=function(){return this.minute},e.prototype.getSeconds=function(){return this.second},e.prototype.getMilliseconds=function(){return this.millisecond},e.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},e}();var vw=function(e){Io(t,e);function t(r,n,i,a,o,s,u){var l=e.call(this,a,o,s,u)||this;return l.year=r,l.month=n,l.day=i,l}return t.fromDate=function(r){return new this(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.valueOf()%1e3)},t.prototype.getWeekday=function(){return Hi(new Date(this.getTime()))},t.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},t.prototype.getDay=function(){return this.day},t.prototype.getMonth=function(){return this.month},t.prototype.getYear=function(){return this.year},t.prototype.addYears=function(r){this.year+=r},t.prototype.addMonths=function(r){if(this.month+=r,this.month>12){var n=Math.floor(this.month/12),i=qn(this.month,12);this.month=i,this.year+=n,this.month===0&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(r,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+r*7:this.day+=-(this.getWeekday()-n)+r*7,this.fixDay()},t.prototype.addDaily=function(r){this.day+=r,this.fixDay()},t.prototype.addHours=function(r,n,i){for(n&&(this.hour+=Math.floor((23-this.hour)/r)*r);;){this.hour+=r;var a=Su(this.hour,24),o=a.div,s=a.mod;if(o&&(this.hour=s,this.addDaily(o)),_r(i)||Et(i,this.hour))break}},t.prototype.addMinutes=function(r,n,i,a){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/r)*r);;){this.minute+=r;var o=Su(this.minute,60),s=o.div,u=o.mod;if(s&&(this.minute=u,this.addHours(s,!1,i)),(_r(i)||Et(i,this.hour))&&(_r(a)||Et(a,this.minute)))break}},t.prototype.addSeconds=function(r,n,i,a,o){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/r)*r);;){this.second+=r;var s=Su(this.second,60),u=s.div,l=s.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,a)),(_r(i)||Et(i,this.hour))&&(_r(a)||Et(a,this.minute))&&(_r(o)||Et(o,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var r=uh(this.year,this.month-1)[1];if(!(this.day<=r))for(;this.day>r;){if(this.day-=r,++this.month,this.month===13&&(this.month=1,++this.year,this.year>Eu))return;r=uh(this.year,this.month-1)[1]}}},t.prototype.add=function(r,n){var i=r.freq,a=r.interval,o=r.wkst,s=r.byhour,u=r.byminute,l=r.bysecond;switch(i){case pt.YEARLY:return this.addYears(a);case pt.MONTHLY:return this.addMonths(a);case pt.WEEKLY:return this.addWeekly(a,o);case pt.DAILY:return this.addDaily(a);case pt.HOURLY:return this.addHours(a,n,s);case pt.MINUTELY:return this.addMinutes(a,n,s,u);case pt.SECONDLY:return this.addSeconds(a,n,s,u,l)}},t}(Po);function hh(e){for(var t=[],r=Object.keys(e),n=0,i=r;n<i.length;n++){var a=i[n];Et(Dw,a)||t.push(a),lh(e[a])&&!Ya(e[a])&&t.push(a)}if(t.length)throw new Error(\"Invalid options: \"+t.join(\", \"));return Un({},e)}function ww(e){var t=Un(Un({},el),hh(e));if(Gt(t.byeaster)&&(t.freq=Oe.YEARLY),!(Gt(t.freq)&&Oe.FREQUENCIES[t.freq]))throw new Error(\"Invalid frequency: \".concat(t.freq,\" \").concat(e.freq));if(t.dtstart||(t.dtstart=new Date(new Date().setMilliseconds(0))),Gt(t.wkst)?Cr(t.wkst)||(t.wkst=t.wkst.weekday):t.wkst=Oe.MO.weekday,Gt(t.bysetpos)){Cr(t.bysetpos)&&(t.bysetpos=[t.bysetpos]);for(var r=0;r<t.bysetpos.length;r++){var n=t.bysetpos[r];if(n===0||!(n>=-366&&n<=366))throw new Error(\"bysetpos must be between 1 and 366, or between -366 and -1\")}}if(!(t.byweekno||bn(t.byweekno)||bn(t.byyearday)||t.bymonthday||bn(t.bymonthday)||Gt(t.byweekday)||Gt(t.byeaster)))switch(t.freq){case Oe.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case Oe.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case Oe.WEEKLY:t.byweekday=[Hi(t.dtstart)];break}if(Gt(t.bymonth)&&!$n(t.bymonth)&&(t.bymonth=[t.bymonth]),Gt(t.byyearday)&&!$n(t.byyearday)&&Cr(t.byyearday)&&(t.byyearday=[t.byyearday]),!Gt(t.bymonthday))t.bymonthday=[],t.bynmonthday=[];else if($n(t.bymonthday)){for(var i=[],a=[],r=0;r<t.bymonthday.length;r++){var n=t.bymonthday[r];n>0?i.push(n):n<0&&a.push(n)}t.bymonthday=i,t.bynmonthday=a}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);if(Gt(t.byweekno)&&!$n(t.byweekno)&&(t.byweekno=[t.byweekno]),!Gt(t.byweekday))t.bynweekday=null;else if(Cr(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(sh(t.byweekday))t.byweekday=[Mn.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof Mn)!t.byweekday.n||t.freq>Oe.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{for(var o=[],s=[],r=0;r<t.byweekday.length;r++){var u=t.byweekday[r];if(Cr(u)){o.push(u);continue}else if(sh(u)){o.push(Mn.fromStr(u).weekday);continue}!u.n||t.freq>Oe.MONTHLY?o.push(u.weekday):s.push([u.weekday,u.n])}t.byweekday=bn(o)?o:null,t.bynweekday=bn(s)?s:null}return Gt(t.byhour)?Cr(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq<Oe.HOURLY?[t.dtstart.getUTCHours()]:null,Gt(t.byminute)?Cr(t.byminute)&&(t.byminute=[t.byminute]):t.byminute=t.freq<Oe.MINUTELY?[t.dtstart.getUTCMinutes()]:null,Gt(t.bysecond)?Cr(t.bysecond)&&(t.bysecond=[t.bysecond]):t.bysecond=t.freq<Oe.SECONDLY?[t.dtstart.getUTCSeconds()]:null,{parsedOptions:t}}function bw(e){var t=e.dtstart.getTime()%1e3;if(!Xs(e.freq))return[];var r=[];return e.byhour.forEach(function(n){e.byminute.forEach(function(i){e.bysecond.forEach(function(a){r.push(new Po(n,i,a,t))})})}),r}function nl(e){var t=e.split(`\n`).map(BI).filter(function(r){return r!==null});return Un(Un({},t[0]),t[1])}function tl(e){var t={},r=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\\s]+)/i.exec(e);if(!r)return t;var n=r[1],i=r[2];return n&&(t.tzid=n),t.dtstart=Zs(i),t}function BI(e){if(e=e.replace(/^\\s+|\\s+$/,\"\"),!e.length)return null;var t=/^([A-Z]+?)[:;]/.exec(e.toUpperCase());if(!t)return Sw(e);var r=t[1];switch(r.toUpperCase()){case\"RRULE\":case\"EXRULE\":return Sw(e);case\"DTSTART\":return tl(e);default:throw new Error(\"Unsupported RFC prop \".concat(r,\" in \").concat(e))}}function Sw(e){var t=e.replace(/^RRULE:/i,\"\"),r=tl(t),n=e.replace(/^(?:RRULE|EXRULE):/i,\"\").split(\";\");return n.forEach(function(i){var a=i.split(\"=\"),o=a[0],s=a[1];switch(o.toUpperCase()){case\"FREQ\":r.freq=pt[s.toUpperCase()];break;case\"WKST\":r.wkst=Ur[s.toUpperCase()];break;case\"COUNT\":case\"INTERVAL\":case\"BYSETPOS\":case\"BYMONTH\":case\"BYMONTHDAY\":case\"BYYEARDAY\":case\"BYWEEKNO\":case\"BYHOUR\":case\"BYMINUTE\":case\"BYSECOND\":var u=VI(s),l=o.toLowerCase();r[l]=u;break;case\"BYWEEKDAY\":case\"BYDAY\":r.byweekday=$I(s);break;case\"DTSTART\":case\"TZID\":var c=tl(e);r.tzid=c.tzid,r.dtstart=c.dtstart;break;case\"UNTIL\":r.until=Zs(s);break;case\"BYEASTER\":r.byeaster=Number(s);break;default:throw new Error(\"Unknown RRULE property '\"+o+\"'\")}}),r}function VI(e){if(e.indexOf(\",\")!==-1){var t=e.split(\",\");return t.map(Ew)}return Ew(e)}function Ew(e){return/^[+-]?\\d+$/.test(e)?Number(e):e}function $I(e){var t=e.split(\",\");return t.map(function(r){if(r.length===2)return Ur[r];var n=r.match(/^([+-]?\\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError(\"Invalid weekday string: \".concat(r));var i=Number(n[1]),a=n[2],o=Ur[a].weekday;return new Mn(o,i)})}var Ka=function(){function e(t,r){if(isNaN(t.getTime()))throw new RangeError(\"Invalid date passed to DateWithZone\");this.date=t,this.tzid=r}return Object.defineProperty(e.prototype,\"isUTC\",{get:function(){return!this.tzid||this.tzid.toUpperCase()===\"UTC\"},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var t=Fo(this.date.getTime(),this.isUTC);return this.isUTC?\":\".concat(t):\";TZID=\".concat(this.tzid,\":\").concat(t)},e.prototype.getTime=function(){return this.date.getTime()},e.prototype.rezonedDate=function(){return this.isUTC?this.date:fw(this.date,this.tzid)},e}();function rl(e){for(var t=[],r=\"\",n=Object.keys(e),i=Object.keys(el),a=0;a<n.length;a++)if(n[a]!==\"tzid\"&&Et(i,n[a])){var o=n[a].toUpperCase(),s=e[n[a]],u=\"\";if(!(!Gt(s)||$n(s)&&!s.length)){switch(o){case\"FREQ\":u=Oe.FREQUENCIES[e.freq];break;case\"WKST\":Cr(s)?u=new Mn(s).toString():u=s.toString();break;case\"BYWEEKDAY\":o=\"BYDAY\",u=sw(s).map(function(h){return h instanceof Mn?h:$n(h)?new Mn(h[0],h[1]):new Mn(h)}).toString();break;case\"DTSTART\":r=UI(s,e.tzid);break;case\"UNTIL\":u=Fo(s,!e.tzid);break;default:if($n(s)){for(var l=[],c=0;c<s.length;c++)l[c]=String(s[c]);u=l.toString()}else u=String(s)}u&&t.push([o,u])}}var d=t.map(function(h){var g=h[0],y=h[1];return\"\".concat(g,\"=\").concat(y.toString())}).join(\";\"),m=\"\";return d!==\"\"&&(m=\"RRULE:\".concat(d)),[r,m].filter(function(h){return!!h}).join(`\n`)}function UI(e,t){return e?\"DTSTART\"+new Ka(new Date(e),t).toString():\"\"}function WI(e,t){return Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:e.every(function(r,n){return r.getTime()===t[n].getTime()}):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():e===t}var kw=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(t,r,n){r&&(r=r instanceof Date?Cu(r):ch(r)),t===\"all\"?this.all=r:(n._value=r,this[t].push(n))},e.prototype._cacheGet=function(t,r){var n=!1,i=r?Object.keys(r):[],a=function(c){for(var d=0;d<i.length;d++){var m=i[d];if(!WI(r[m],c[m]))return!0}return!1},o=this[t];if(t===\"all\")n=this.all;else if($n(o))for(var s=0;s<o.length;s++){var u=o[s];if(!(i.length&&a(u))){n=u._value;break}}if(!n&&this.all){for(var l=new Vi(t,r),s=0;s<this.all.length&&l.accept(this.all[s]);s++);n=l.getValue(),this._cacheAdd(t,n,r)}return $n(n)?ch(n):n instanceof Date?Cu(n):n},e}();var xw=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],wt(1,31),!0),wt(2,28),!0),wt(3,31),!0),wt(4,30),!0),wt(5,31),!0),wt(6,30),!0),wt(7,31),!0),wt(8,31),!0),wt(9,30),!0),wt(10,31),!0),wt(11,30),!0),wt(12,31),!0),wt(1,7),!0),Cw=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],wt(1,31),!0),wt(2,29),!0),wt(3,31),!0),wt(4,30),!0),wt(5,31),!0),wt(6,30),!0),wt(7,31),!0),wt(8,31),!0),wt(9,30),!0),wt(10,31),!0),wt(11,30),!0),wt(12,31),!0),wt(1,7),!0),YI=$r(1,29),zI=$r(1,30),ua=$r(1,31),Gn=$r(1,32),_w=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],Gn,!0),zI,!0),Gn,!0),ua,!0),Gn,!0),ua,!0),Gn,!0),Gn,!0),ua,!0),Gn,!0),ua,!0),Gn,!0),Gn.slice(0,7),!0),Mw=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],Gn,!0),YI,!0),Gn,!0),ua,!0),Gn,!0),ua,!0),Gn,!0),Gn,!0),ua,!0),Gn,!0),ua,!0),Gn,!0),Gn.slice(0,7),!0),KI=$r(-28,0),jI=$r(-29,0),ca=$r(-30,0),Jn=$r(-31,0),Tw=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],Jn,!0),jI,!0),Jn,!0),ca,!0),Jn,!0),ca,!0),Jn,!0),Jn,!0),ca,!0),Jn,!0),ca,!0),Jn,!0),Jn.slice(0,7),!0),Fw=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],Jn,!0),KI,!0),Jn,!0),ca,!0),Jn,!0),ca,!0),Jn,!0),Jn,!0),ca,!0),Jn,!0),ca,!0),Jn,!0),Jn.slice(0,7),!0),Iw=[0,31,60,91,121,152,182,213,244,274,305,335,366],Aw=[0,31,59,90,120,151,181,212,243,273,304,334,365],mh=function(){for(var e=[],t=0;t<55;t++)e=e.concat($r(7));return e}();function Ow(e,t){var r=pi(e,1,1),n=To(e)?366:365,i=To(e+1)?366:365,a=Js(r),o=Hi(r),s=Un(Un({yearlen:n,nextyearlen:i,yearordinal:a,yearweekday:o},qI(e)),{wnomask:null});if(_r(t.byweekno))return s;s.wnomask=wt(0,n+7);var u,l,c=u=qn(7-o+t.wkst,7);c>=4?(c=0,l=s.yearlen+qn(o-t.wkst,7)):l=n-c;for(var d=Math.floor(l/7),m=qn(l,7),h=Math.floor(d+m/4),g=0;g<t.byweekno.length;g++){var y=t.byweekno[g];if(y<0&&(y+=h+1),y>0&&y<=h){var v=void 0;y>1?(v=c+(y-1)*7,c!==u&&(v-=7-u)):v=c;for(var D=0;D<7&&(s.wnomask[v]=1,v++,s.wdaymask[v]!==t.wkst);D++);}}if(Et(t.byweekno,1)){var v=c+h*7;if(c!==u&&(v-=7-u),v<n)for(var g=0;g<7&&(s.wnomask[v]=1,v+=1,s.wdaymask[v]!==t.wkst);g++);}if(c){var I=void 0;if(Et(t.byweekno,-1))I=-1;else{var C=Hi(pi(e-1,1,1)),x=qn(7-C.valueOf()+t.wkst,7),O=To(e-1)?366:365,A=void 0;x>=4?(x=0,A=O+qn(C-t.wkst,7)):A=n-c,I=Math.floor(52+qn(A,7)/4)}if(Et(t.byweekno,I))for(var v=0;v<c;v++)s.wnomask[v]=1}return s}function qI(e){var t=To(e)?366:365,r=pi(e,1,1),n=Hi(r);return t===365?{mmask:xw,mdaymask:Mw,nmdaymask:Fw,wdaymask:mh.slice(n),mrange:Aw}:{mmask:Cw,mdaymask:_w,nmdaymask:Tw,wdaymask:mh.slice(n),mrange:Iw}}function Lw(e,t,r,n,i,a){var o={lastyear:e,lastmonth:t,nwdaymask:[]},s=[];if(a.freq===Oe.YEARLY)if(_r(a.bymonth))s=[[0,r]];else for(var u=0;u<a.bymonth.length;u++)t=a.bymonth[u],s.push(n.slice(t-1,t+1));else a.freq===Oe.MONTHLY&&(s=[n.slice(t-1,t+1)]);if(_r(s))return o;o.nwdaymask=wt(0,r);for(var u=0;u<s.length;u++)for(var l=s[u],c=l[0],d=l[1]-1,m=0;m<a.bynweekday.length;m++){var h=void 0,g=a.bynweekday[m],y=g[0],v=g[1];v<0?(h=d+(v+1)*7,h-=qn(i[h]-y,7)):(h=c+(v-1)*7,h+=qn(7-i[h]+y,7)),c<=h&&h<=d&&(o.nwdaymask[h]=1)}return o}function Pw(e,t){t===void 0&&(t=0);var r=e%19,n=Math.floor(e/100),i=e%100,a=Math.floor(n/4),o=n%4,s=Math.floor((n+8)/25),u=Math.floor((n-s+1)/3),l=Math.floor(19*r+n-a-u+15)%30,c=Math.floor(i/4),d=i%4,m=Math.floor(32+2*o+2*c-l-d)%7,h=Math.floor((r+11*l+22*m)/451),g=Math.floor((l+m-7*h+114)/31),y=(l+m-7*h+114)%31+1,v=Date.UTC(e,g-1,y+t),D=Date.UTC(e,0,1);return[Math.ceil((v-D)/(1e3*60*60*24))]}var GI=function(){function e(t){this.options=t}return e.prototype.rebuild=function(t,r){var n=this.options;if(t!==this.lastyear&&(this.yearinfo=Ow(t,n)),bn(n.bynweekday)&&(r!==this.lastmonth||t!==this.lastyear)){var i=this.yearinfo,a=i.yearlen,o=i.mrange,s=i.wdaymask;this.monthinfo=Lw(t,r,a,o,s,n)}Gt(n.byeaster)&&(this.eastermask=Pw(t,n.byeaster))},Object.defineProperty(e.prototype,\"lastyear\",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"lastmonth\",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"yearlen\",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"yearordinal\",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"mrange\",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"wdaymask\",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"mmask\",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"wnomask\",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"nwdaymask\",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"nextyearlen\",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"mdaymask\",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"nmdaymask\",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),e.prototype.ydayset=function(){return[$r(this.yearlen),0,this.yearlen]},e.prototype.mdayset=function(t,r){for(var n=this.mrange[r-1],i=this.mrange[r],a=wt(null,this.yearlen),o=n;o<i;o++)a[o]=o;return[a,n,i]},e.prototype.wdayset=function(t,r,n){for(var i=wt(null,this.yearlen+7),a=Js(pi(t,r,n))-this.yearordinal,o=a,s=0;s<7&&(i[a]=a,++a,this.wdaymask[a]!==this.options.wkst);s++);return[i,o,a]},e.prototype.ddayset=function(t,r,n){var i=wt(null,this.yearlen),a=Js(pi(t,r,n))-this.yearordinal;return i[a]=a,[i,a,a+1]},e.prototype.htimeset=function(t,r,n,i){var a=this,o=[];return this.options.byminute.forEach(function(s){o=o.concat(a.mtimeset(t,s,n,i))}),Bi(o),o},e.prototype.mtimeset=function(t,r,n,i){var a=this.options.bysecond.map(function(o){return new Po(t,r,o,i)});return Bi(a),a},e.prototype.stimeset=function(t,r,n,i){return[new Po(t,r,n,i)]},e.prototype.getdayset=function(t){switch(t){case pt.YEARLY:return this.ydayset.bind(this);case pt.MONTHLY:return this.mdayset.bind(this);case pt.WEEKLY:return this.wdayset.bind(this);case pt.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},e.prototype.gettimeset=function(t){switch(t){case pt.HOURLY:return this.htimeset.bind(this);case pt.MINUTELY:return this.mtimeset.bind(this);case pt.SECONDLY:return this.stimeset.bind(this)}},e}(),Nw=GI;function Rw(e,t,r,n,i,a){for(var o=[],s=0;s<e.length;s++){var u=void 0,l=void 0,c=e[s];c<0?(u=Math.floor(c/t.length),l=qn(c,t.length)):(u=Math.floor((c-1)/t.length),l=qn(c-1,t.length));for(var d=[],m=r;m<n;m++){var h=a[m];Gt(h)&&d.push(h)}var g=void 0;u<0?g=d.slice(u)[0]:g=d[u];var y=t[l],v=ku(i.yearordinal+g),D=xu(v,y);Et(o,D)||o.push(D)}return Bi(o),o}function _u(e,t){var r=t.dtstart,n=t.freq,i=t.interval,a=t.until,o=t.bysetpos,s=t.count;if(s===0||i===0)return $i(e);var u=vw.fromDate(r),l=new Nw(t);l.rebuild(u.year,u.month);for(var c=QI(l,u,t);;){var d=l.getdayset(n)(u.year,u.month,u.day),m=d[0],h=d[1],g=d[2],y=ZI(m,h,g,l,t);if(bn(o))for(var v=Rw(o,c,h,g,l,m),D=0;D<v.length;D++){var I=v[D];if(a&&I>a)return $i(e);if(I>=r){var C=Hw(I,t);if(!e.accept(C)||s&&(--s,!s))return $i(e)}}else for(var D=h;D<g;D++){var x=m[D];if(Gt(x))for(var O=ku(l.yearordinal+x),A=0;A<c.length;A++){var P=c[A],I=xu(O,P);if(a&&I>a)return $i(e);if(I>=r){var C=Hw(I,t);if(!e.accept(C)||s&&(--s,!s))return $i(e)}}}if(t.interval===0||(u.add(t,y),u.year>Eu))return $i(e);Xs(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function JI(e,t,r){var n=r.bymonth,i=r.byweekno,a=r.byweekday,o=r.byeaster,s=r.bymonthday,u=r.bynmonthday,l=r.byyearday;return bn(n)&&!Et(n,e.mmask[t])||bn(i)&&!e.wnomask[t]||bn(a)&&!Et(a,e.wdaymask[t])||bn(e.nwdaymask)&&!e.nwdaymask[t]||o!==null&&!Et(e.eastermask,t)||(bn(s)||bn(u))&&!Et(s,e.mdaymask[t])&&!Et(u,e.nmdaymask[t])||bn(l)&&(t<e.yearlen&&!Et(l,t+1)&&!Et(l,-e.yearlen+t)||t>=e.yearlen&&!Et(l,t+1-e.yearlen)&&!Et(l,-e.nextyearlen+t-e.yearlen))}function Hw(e,t){return new Ka(e,t.tzid).rezonedDate()}function $i(e){return e.getValue()}function ZI(e,t,r,n,i){for(var a=!1,o=t;o<r;o++){var s=e[o];a=JI(n,s,i),a&&(e[s]=null)}return a}function QI(e,t,r){var n=r.freq,i=r.byhour,a=r.byminute,o=r.bysecond;return Xs(n)?bw(r):n>=Oe.HOURLY&&bn(i)&&!Et(i,t.hour)||n>=Oe.MINUTELY&&bn(a)&&!Et(a,t.minute)||n>=Oe.SECONDLY&&bn(o)&&!Et(o,t.second)?[]:e.gettimeset(n)(t.hour,t.minute,t.second,t.millisecond)}var Ur={MO:new Mn(0),TU:new Mn(1),WE:new Mn(2),TH:new Mn(3),FR:new Mn(4),SA:new Mn(5),SU:new Mn(6)},el={freq:pt.YEARLY,dtstart:null,interval:1,wkst:Ur.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},Dw=Object.keys(el),Oe=function(){function e(t,r){t===void 0&&(t={}),r===void 0&&(r=!1),this._cache=r?null:new kw,this.origOptions=hh(t);var n=ww(t).parsedOptions;this.options=n}return e.parseText=function(t,r){return Qs(t,r)},e.fromText=function(t,r){return pw(t,r)},e.fromString=function(t){return new e(e.parseString(t)||void 0)},e.prototype._iter=function(t){return _u(t,this.options)},e.prototype._cacheGet=function(t,r){return this._cache?this._cache._cacheGet(t,r):!1},e.prototype._cacheAdd=function(t,r,n){if(this._cache)return this._cache._cacheAdd(t,r,n)},e.prototype.all=function(t){if(t)return this._iter(new fh(\"all\",{},t));var r=this._cacheGet(\"all\");return r===!1&&(r=this._iter(new Vi(\"all\",{})),this._cacheAdd(\"all\",r)),r},e.prototype.between=function(t,r,n,i){if(n===void 0&&(n=!1),!Ya(t)||!Ya(r))throw new Error(\"Invalid date passed in to RRule.between\");var a={before:r,after:t,inc:n};if(i)return this._iter(new fh(\"between\",a,i));var o=this._cacheGet(\"between\",a);return o===!1&&(o=this._iter(new Vi(\"between\",a)),this._cacheAdd(\"between\",o,a)),o},e.prototype.before=function(t,r){if(r===void 0&&(r=!1),!Ya(t))throw new Error(\"Invalid date passed in to RRule.before\");var n={dt:t,inc:r},i=this._cacheGet(\"before\",n);return i===!1&&(i=this._iter(new Vi(\"before\",n)),this._cacheAdd(\"before\",i,n)),i},e.prototype.after=function(t,r){if(r===void 0&&(r=!1),!Ya(t))throw new Error(\"Invalid date passed in to RRule.after\");var n={dt:t,inc:r},i=this._cacheGet(\"after\",n);return i===!1&&(i=this._iter(new Vi(\"after\",n)),this._cacheAdd(\"after\",i,n)),i},e.prototype.count=function(){return this.all().length},e.prototype.toString=function(){return rl(this.origOptions)},e.prototype.toText=function(t,r,n){return gw(this,t,r,n)},e.prototype.isFullyConvertibleToText=function(){return yw(this)},e.prototype.clone=function(){return new e(this.origOptions)},e.FREQUENCIES=[\"YEARLY\",\"MONTHLY\",\"WEEKLY\",\"DAILY\",\"HOURLY\",\"MINUTELY\",\"SECONDLY\"],e.YEARLY=pt.YEARLY,e.MONTHLY=pt.MONTHLY,e.WEEKLY=pt.WEEKLY,e.DAILY=pt.DAILY,e.HOURLY=pt.HOURLY,e.MINUTELY=pt.MINUTELY,e.SECONDLY=pt.SECONDLY,e.MO=Ur.MO,e.TU=Ur.TU,e.WE=Ur.WE,e.TH=Ur.TH,e.FR=Ur.FR,e.SA=Ur.SA,e.SU=Ur.SU,e.parseString=nl,e.optionsToString=rl,e}();function Bw(e,t,r,n,i,a){var o={},s=e.accept;function u(m,h){r.forEach(function(g){g.between(m,h,!0).forEach(function(y){o[Number(y)]=!0})})}i.forEach(function(m){var h=new Ka(m,a).rezonedDate();o[Number(h)]=!0}),e.accept=function(m){var h=Number(m);return isNaN(h)?s.call(this,m):!o[h]&&(u(new Date(h-1),new Date(h+1)),!o[h])?(o[h]=!0,s.call(this,m)):!0},e.method===\"between\"&&(u(e.args.after,e.args.before),e.accept=function(m){var h=Number(m);return o[h]?!0:(o[h]=!0,s.call(this,m))});for(var l=0;l<n.length;l++){var c=new Ka(n[l],a).rezonedDate();if(!e.accept(new Date(c.getTime())))break}t.forEach(function(m){_u(e,m.options)});var d=e._result;switch(Bi(d),e.method){case\"all\":case\"between\":return d;case\"before\":return d.length&&d[d.length-1]||null;case\"after\":default:return d.length&&d[0]||null}}var Vw={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function XI(e,t){var r=[],n=[],i=[],a=[],o=tl(e),s=o.dtstart,u=o.tzid,l=iA(e,t.unfold);return l.forEach(function(c){var d;if(c){var m=rA(c),h=m.name,g=m.parms,y=m.value;switch(h.toUpperCase()){case\"RRULE\":if(g.length)throw new Error(\"unsupported RRULE parm: \".concat(g.join(\",\")));r.push(nl(c));break;case\"RDATE\":var v=(d=/RDATE(?:;TZID=([^:=]+))?/i.exec(c))!==null&&d!==void 0?d:[],D=v[1];D&&!u&&(u=D),n=n.concat($w(y,g));break;case\"EXRULE\":if(g.length)throw new Error(\"unsupported EXRULE parm: \".concat(g.join(\",\")));i.push(nl(y));break;case\"EXDATE\":a=a.concat($w(y,g));break;case\"DTSTART\":break;default:throw new Error(\"unsupported property: \"+h)}}}),{dtstart:s,tzid:u,rrulevals:r,rdatevals:n,exrulevals:i,exdatevals:a}}function eA(e,t){var r=XI(e,t),n=r.rrulevals,i=r.rdatevals,a=r.exrulevals,o=r.exdatevals,s=r.dtstart,u=r.tzid,l=t.cache===!1;if(t.compatible&&(t.forceset=!0,t.unfold=!0),t.forceset||n.length>1||i.length||a.length||o.length){var c=new gh(l);return c.dtstart(s),c.tzid(u||void 0),n.forEach(function(m){c.rrule(new Oe(ph(m,s,u),l))}),i.forEach(function(m){c.rdate(m)}),a.forEach(function(m){c.exrule(new Oe(ph(m,s,u),l))}),o.forEach(function(m){c.exdate(m)}),t.compatible&&t.dtstart&&c.rdate(s),c}var d=n[0]||{};return new Oe(ph(d,d.dtstart||t.dtstart||s,d.tzid||t.tzid||u),l)}function Mu(e,t){return t===void 0&&(t={}),eA(e,tA(t))}function ph(e,t,r){return Un(Un({},e),{dtstart:t,tzid:r})}function tA(e){var t=[],r=Object.keys(e),n=Object.keys(Vw);if(r.forEach(function(i){Et(n,i)||t.push(i)}),t.length)throw new Error(\"Invalid options: \"+t.join(\", \"));return Un(Un({},Vw),e)}function nA(e){if(e.indexOf(\":\")===-1)return{name:\"RRULE\",value:e};var t=lw(e,\":\",1),r=t[0],n=t[1];return{name:r,value:n}}function rA(e){var t=nA(e),r=t.name,n=t.value,i=r.split(\";\");if(!i)throw new Error(\"empty property name\");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function iA(e,t){if(t===void 0&&(t=!1),e=e&&e.trim(),!e)throw new Error(\"Invalid empty string\");if(!t)return e.split(/\\s/);for(var r=e.split(`\n`),n=0;n<r.length;){var i=r[n]=r[n].replace(/\\s+$/g,\"\");i?n>0&&i[0]===\" \"?(r[n-1]+=i.slice(1),r.splice(n,1)):n+=1:r.splice(n,1)}return r}function aA(e){e.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error(\"unsupported RDATE/EXDATE parm: \"+t)})}function $w(e,t){return aA(t),e.split(\",\").map(function(r){return Zs(r)})}function Uw(e){var t=this;return function(r){if(r!==void 0&&(t[\"_\".concat(e)]=r),t[\"_\".concat(e)]!==void 0)return t[\"_\".concat(e)];for(var n=0;n<t._rrule.length;n++){var i=t._rrule[n].origOptions[e];if(i)return i}}}var gh=function(e){Io(t,e);function t(r){r===void 0&&(r=!1);var n=e.call(this,{},r)||this;return n.dtstart=Uw.apply(n,[\"dtstart\"]),n.tzid=Uw.apply(n,[\"tzid\"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return t.prototype._iter=function(r){return Bw(r,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(r){Ww(r,this._rrule)},t.prototype.exrule=function(r){Ww(r,this._exrule)},t.prototype.rdate=function(r){Yw(r,this._rdate)},t.prototype.exdate=function(r){Yw(r,this._exdate)},t.prototype.rrules=function(){return this._rrule.map(function(r){return Mu(r.toString())})},t.prototype.exrules=function(){return this._exrule.map(function(r){return Mu(r.toString())})},t.prototype.rdates=function(){return this._rdate.map(function(r){return new Date(r.getTime())})},t.prototype.exdates=function(){return this._exdate.map(function(r){return new Date(r.getTime())})},t.prototype.valueOf=function(){var r=[];return!this._rrule.length&&this._dtstart&&(r=r.concat(rl({dtstart:this._dtstart}))),this._rrule.forEach(function(n){r=r.concat(n.toString().split(`\n`))}),this._exrule.forEach(function(n){r=r.concat(n.toString().split(`\n`).map(function(i){return i.replace(/^RRULE:/,\"EXRULE:\")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&r.push(zw(\"RDATE\",this._rdate,this.tzid())),this._exdate.length&&r.push(zw(\"EXDATE\",this._exdate,this.tzid())),r},t.prototype.toString=function(){return this.valueOf().join(`\n`)},t.prototype.clone=function(){var r=new t(!!this._cache);return this._rrule.forEach(function(n){return r.rrule(n.clone())}),this._exrule.forEach(function(n){return r.exrule(n.clone())}),this._rdate.forEach(function(n){return r.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return r.exdate(new Date(n.getTime()))}),r},t}(Oe);function Ww(e,t){if(!(e instanceof Oe))throw new TypeError(String(e)+\" is not RRule instance\");Et(t.map(String),String(e))||t.push(e)}function Yw(e,t){if(!(e instanceof Date))throw new TypeError(String(e)+\" is not Date instance\");Et(t.map(Number),Number(e))||(t.push(e),Bi(t))}function zw(e,t,r){var n=!r||r.toUpperCase()===\"UTC\",i=n?\"\".concat(e,\":\"):\"\".concat(e,\";TZID=\").concat(r,\":\"),a=t.map(function(o){return Fo(o.valueOf(),n)}).join(\",\");return\"\".concat(i).concat(a)}var oA={},Kw=oA;var sA={},jw=sA;var lA={},qw=lA;var uA={\"Open as kanban board\":\"\\xD6ffne als Kanban-Board\",\"Create new board\":\"Erstelle ein neues Board\",\"Archive completed cards in active board\":\"Archiviere fertiggestellte Karten im aktiven Board\",\"Error: current file is not a Kanban board\":\"Fehler: Momentan ge\\xF6ffnete Datei ist kein Kanban-Board\",\"Convert empty note to Kanban\":\"Konvertiere leere Notiz in ein Kanban-Board\",\"Error: cannot create Kanban, the current note is not empty\":\"Fehler: Kanban konnte nicht erstellt werden, momentan ge\\xF6ffnete Datei ist nicht leer\",\"New kanban board\":\"Neues Kanban-Board\",\"Untitled Kanban\":\"Unbenanntes Kanban\",\"Toggle between Kanban and markdown mode\":\"Wechsle zwischen Kanban und Markdown Modus\",\"Open as markdown\":\"\\xD6ffne als Markdown\",\"Open board settings\":\"\\xD6ffne Board-Einstellungen\",\"Archive completed cards\":\"Archiviere fertiggestellte Karten\",\"Something went wrong\":\"Etwas ist schief gelaufen\",\"You may wish to open as markdown and inspect or edit the file.\":\"Du kannst die Datei im Markdown Modus \\xF6ffnen und \\xFCberpr\\xFCfen oder bearbeiten.\",\"Are you sure you want to archive all completed cards on this board?\":\"Bist du dir sicher, dass du alle fertiggestellten Karten des Boards archivieren m\\xF6chtest?\",Complete:\"Fertiggestellt\",Archive:\"Archiv\",\"Invalid Kanban file: problems parsing frontmatter\":\"Fehlerhafte Kanban Datei: Probleme beim Parsen des Frontmatters\",\"I don't know how to interpret this line:\":\"Ich wei\\xDF nicht, wie ich diese Zeile interpretieren soll:\",Untitled:\"Unbenannt\",\"Note: No template plugins are currently enabled.\":\"Beachte: Keine Template-Plugins sind derzeit aktiviert.\",default:\"Standard\",\"Search...\":\"Suche...\",\"These settings will take precedence over the default Kanban board settings.\":\"Diese Einstellung wird Vorrang vor der standard Kanban-Board Einstellung haben. \",\"Set the default Kanban board settings. Settings can be overridden on a board-by-board basis.\":\"Stelle standard Kanban-Board Einstellungen ein. Einstellungen k\\xF6nnen auf einer Board-f\\xFCr-Board Basis \\xFCberschrieben werden.\",\"Note template\":\"Notiz Vorlage\",\"This template will be used when creating new notes from Kanban cards.\":\"Diese Vorlage wird beim Erstellen neuer Notizen aus Kanban-Karten verwendet.\",\"No template\":\"Keine Vorlage\",\"Note folder\":\"Notiz Ordner\",\"Notes created from Kanban cards will be placed in this folder. If blank, they will be placed in the default location for this vault.\":\"Notizen, welche aus einer Kanban-Karte erstellt wurden, werden in diesem Ordner platziert. Falls leer, werden die Einstellungen des Vaults verwendet.\",\"Default folder\":\"Standard Ordner\",\"Maximum number of archived cards\":\"Maximale Anzahl archivierter Karten.\",\"Archived cards can be viewed in markdown mode. This setting will begin removing old cards once the limit is reached. Setting this value to -1 will allow a board's archive to grow infinitely.\":\"Archivierte Karten k\\xF6nnen im Markdown-Modus betrachtet werden. Diese Einstellung wird alte Karten l\\xF6schen, sobald das Limit erreicht wird. Eine Einstellung von -1 setzt das Archiv auf eine unendliche Gr\\xF6\\xDFe.\",\"Display card checkbox\":\"Zeige Karten Checkbox\",\"When toggled, a checkbox will be displayed with each card\":\"Wenn aktiviert, wird eine Checkbox mit jeder Karte angezeigt.\",\"Reset to default\":\"Zur\\xFCcksetzen\",\"Date & Time\":\"Datum & Uhrzeit\",\"Date trigger\":\"Datums Ausl\\xF6ser\",\"When this is typed, it will trigger the date selector\":\"Wenn dies eingegeben wird, dann wird die Datumsauswahl angezeigt\",\"Time trigger\":\"Uhrzeit Ausl\\xF6ser\",\"When this is typed, it will trigger the time selector\":\"Wenn dies eingegeben wird, dann wird die Uhrzeitsauswahl angezeigt\",\"Date format\":\"Format des Datums\",\"This format will be used when saving dates in markdown.\":\"Dieses Format wird verwendet, wenn ein Datum in Markdown gespeichert wird.\",\"For more syntax, refer to\":\"F\\xFCr mehr Syntax Informationen siehe\",\"format reference\":\"Formatvorlage\",\"Your current syntax looks like this\":\"Dein momentanes Format sieht so aus\",\"Time format\":\"Format der Uhrzeit\",\"Date display format\":\"Format der Datums Anzeige\",\"This format will be used when displaying dates in Kanban cards.\":\"Dieses Format wird verwendet, wenn ein Datum in einer Kanban-Karte angezeigt wird.\",\"Show relative date\":\"Zeige relatives Datum\",\"Link dates to daily notes\":\"Verbinde Daten zu Daily Notes\",\"When toggled, dates will link to daily notes. Eg. [[2021-04-26]]\":\"Wenn aktiviert, werden Daten mit Daily Notes verbunden. Zum Beispiel [[26.4.2021]]\",\"Add date and time to archived cards\":\"F\\xFCge Datum und Uhrzeit zu archivierten Notizen hinzu\",\"When toggled, the current date and time will be added to the card title when it is archived. Eg. - [ ] 2021-05-14 10:00am My card title\":\"Wenn aktiviert, wird das momentane Datum und die momentane Zeit am Anfang einer Karte hinzugef\\xFCgt, wenn sie archiviert wird. Zum Beispiel: - [ ] 14.05.2021 10:00 Mein Karten Titel\",\"Archive date/time separator\":\"Datum/Uhrzeit Trenner f\\xFCr das Archiv\",\"This will be used to separate the archived date/time from the title\":\"Dies wird verwendet, um das Datum und die Uhrzeit archivierter Karten vom Titel zu trennen\",\"Archive date/time format\":\"Format des Datums und der Uhrzeit f\\xFCr das Archiv\",\"Kanban Plugin\":\"Kanban Erweiterung\",\"New line trigger\":\"Taste f\\xFCr neue Zeile\",\"Shift + Enter\":\"Umschalttaste + Enter\",Enter:\"Enter\",\"Prepend / append new cards\":\"Neue Karten voranf\\xFCgen / anh\\xE4ngen\",\"This setting controls whether new cards are added to the beginning or end of the list.\":\"Diese Einstellung gibt an ob neue Karten am Anfang oder am Ende einer Liste hinzugef\\xFCgt werden.\",Prepend:\"Voranf\\xFCgen\",Append:\"Anh\\xE4ngen\",\"Linked Page Metadata\":\"Metadaten f\\xFCr verkn\\xFCpfte (verlinkte) Notizen\",\"Display metadata for the first note linked within a card. Specify which metadata keys to display below. An optional label can be provided, and labels can be hidden altogether.\":\"Zeigen Sie Metadaten f\\xFCr die erste Notiz an, die innerhalb einer Karte verkn\\xFCpft ist. Geben Sie an, welche Metadatenschl\\xFCssel unten angezeigt werden sollen. Ein optionales Label kann hinzugef\\xFCgt werden, es kann aber auch vollst\\xE4ndig ausgeblendet werden.\",\"Metadata key\":\"Metadatenschl\\xFCssel\",\"Display label\":\"Anzeigelabel\",\"Hide label\":\"Label ausblenden\",\"Drag to rearrange\":\"Zum Neuanordnen ziehen\",Delete:\"L\\xF6schen\",\"Add key\":\"Schl\\xFCssel hinzuf\\xFCgen\",\"Field contains markdown\":\"Feld beinhaltet Markdown\",\"More options\":\"Mehr optionen\",Cancel:\"Abbrechen\",today:\"heute\",yesterday:\"gestern\",tomorrow:\"morgen\",\"Change date\":\"Ver\\xE4ndere Datum\",\"Change time\":\"Ver\\xE4ndere Uhrzeit\",\"Card title...\":\"Karten Titel...\",\"Add card\":\"Karte hinzuf\\xFCgen\",\"Add a card\":\"F\\xFCge eine Karte hinzu\",\"Edit card\":\"Karte editieren\",\"New note from card\":\"Neue Notiz aus Karte erstellen\",\"Archive card\":\"Karte archivieren\",\"Delete card\":\"Karte l\\xF6schen\",\"Edit date\":\"Datum editieren\",\"Add date\":\"Datum hinzuf\\xFCgen\",\"Remove date\":\"Datum entfernen\",\"Edit time\":\"Karte editieren\",\"Add time\":\"Uhrzeit hinzuf\\xFCgen\",\"Remove time\":\"Uhrzeit entfernen\",\"Duplicate card\":\"Karte duplizieren\",\"Enter list title...\":\"Listen Titel eingeben..\",\"Mark cards in this list as complete\":\"Markiere Karten in dieser Liste als fertiggestellt\",\"Add list\":\"Liste hinzuf\\xFCgen\",\"Add a list\":\"F\\xFCge eine Liste hinzu\",\"Move list\":\"Liste verschieben\",Close:\"Schlie\\xDFen\",\"Are you sure you want to delete this list and all its cards?\":\"Bist du dir sicher, dass du diese Liste und alle ihre Karten l\\xF6schen m\\xF6chtest?\",\"Yes, delete list\":\"Ja, l\\xF6sche diese Liste\",\"Are you sure you want to archive this list and all its cards?\":\"Bist du dir sicher, dass du diese Liste und alle ihre Karten archivieren m\\xF6chtest?\",\"Yes, archive list\":\"Ja, archiviere diese Liste\",\"Are you sure you want to archive all cards in this list?\":\"Bist du dir sicher, dass du alle Karten in dieser Liste archivieren m\\xF6chtest?\",\"Yes, archive cards\":\"Ja, archiviere Karten\",\"Edit list\":\"Editiere Liste\",\"Archive cards\":\"Archiviere Karten\",\"Archive list\":\"Archiviere List\",\"Delete list\":\"L\\xF6sche Liste\"},Gw=uA;var cA={\"Open as kanban board\":\"Open as kanban board\",\"Create new board\":\"Create new board\",\"Archive completed cards in active board\":\"Archive completed cards in active board\",\"Error: current file is not a Kanban board\":\"Error: current file is not a Kanban board\",\"Convert empty note to Kanban\":\"Convert empty note to Kanban\",\"Error: cannot create Kanban, the current note is not empty\":\"Error: cannot create Kanban, the current note is not empty\",\"New kanban board\":\"New kanban board\",\"Untitled Kanban\":\"Untitled Kanban\",\"Toggle between Kanban and markdown mode\":\"Toggle between Kanban and markdown mode\",\"View as board\":\"View as board\",\"View as list\":\"View as list\",\"View as table\":\"View as table\",\"Board view\":\"Board view\",\"Open as markdown\":\"Open as markdown\",\"Open board settings\":\"Open board settings\",\"Archive completed cards\":\"Archive completed cards\",\"Something went wrong\":\"Something went wrong\",\"You may wish to open as markdown and inspect or edit the file.\":\"You may wish to open as markdown and inspect or edit the file.\",\"Are you sure you want to archive all completed cards on this board?\":\"Are you sure you want to archive all completed cards on this board?\",Complete:\"Complete\",Archive:\"Archive\",\"Invalid Kanban file: problems parsing frontmatter\":\"Invalid Kanban file: problems parsing frontmatter\",\"I don't know how to interpret this line:\":\"I don't know how to interpret this line:\",Untitled:\"Untitled\",\"Note: No template plugins are currently enabled.\":\"Note: No template plugins are currently enabled.\",default:\"default\",\"Search...\":\"Search...\",\"New line trigger\":\"New line trigger\",\"Select whether Enter or Shift+Enter creates a new line. The opposite of what you choose will create and complete editing of cards and lists.\":\"Select whether Enter or Shift+Enter creates a new line. The opposite of what you choose will create and complete editing of cards and lists.\",\"Shift + Enter\":\"Shift + Enter\",Enter:\"Enter\",\"Prepend / append new cards\":\"Prepend / append new cards\",\"This setting controls whether new cards are added to the beginning or end of the list.\":\"This setting controls whether new cards are added to the beginning or end of the list.\",Prepend:\"Prepend\",\"Prepend (compact)\":\"Prepend (compact)\",Append:\"Append\",\"These settings will take precedence over the default Kanban board settings.\":\"These settings will take precedence over the default Kanban board settings.\",\"Set the default Kanban board settings. Settings can be overridden on a board-by-board basis.\":\"Set the default Kanban board settings. Settings can be overridden on a board-by-board basis.\",\"Note template\":\"Note template\",\"This template will be used when creating new notes from Kanban cards.\":\"This template will be used when creating new notes from Kanban cards.\",\"No template\":\"No template\",\"Note folder\":\"Note folder\",\"Notes created from Kanban cards will be placed in this folder. If blank, they will be placed in the default location for this vault.\":\"Notes created from Kanban cards will be placed in this folder. If blank, they will be placed in the default location for this vault.\",\"Default folder\":\"Default folder\",\"List width\":\"List width\",\"Expand lists to full width in list view\":\"Expand lists to full width in list view\",\"Enter a number to set the list width in pixels.\":\"Enter a number to set the list width in pixels.\",\"Maximum number of archived cards\":\"Maximum number of archived cards\",\"Archived cards can be viewed in markdown mode. This setting will begin removing old cards once the limit is reached. Setting this value to -1 will allow a board's archive to grow infinitely.\":\"Archived cards can be viewed in markdown mode. This setting will begin removing old cards once the limit is reached. Setting this value to -1 will allow a board's archive to grow infinitely.\",\"Display card checkbox\":\"Display card checkbox\",\"When toggled, a checkbox will be displayed with each card\":\"When toggled, a checkbox will be displayed with each card\",\"Reset to default\":\"Reset to default\",\"Date & Time\":\"Date & Time\",\"Date trigger\":\"Date trigger\",\"When this is typed, it will trigger the date selector\":\"When this is typed, it will trigger the date selector\",\"Time trigger\":\"Time trigger\",\"When this is typed, it will trigger the time selector\":\"When this is typed, it will trigger the time selector\",\"Date format\":\"Date format\",\"This format will be used when saving dates in markdown.\":\"This format will be used when saving dates in markdown.\",\"For more syntax, refer to\":\"For more syntax, refer to\",\"format reference\":\"format reference\",\"Your current syntax looks like this\":\"Your current syntax looks like this\",\"Time format\":\"Time format\",\"Date display format\":\"Date display format\",\"This format will be used when displaying dates in Kanban cards.\":\"This format will be used when displaying dates in Kanban cards.\",\"Show relative date\":\"Show relative date\",\"When toggled, cards will display the distance between today and the card's date. eg. 'In 3 days', 'A month ago'. Relative dates will not be shown for dates from the Tasks and Dataview plugins.\":\"When toggled, cards will display the distance between today and the card's date. eg. 'In 3 days', 'A month ago'. Relative dates will not be shown for dates from the Tasks and Dataview plugins.\",\"Move dates to card footer\":\"Move dates to card footer\",\"When toggled, dates will be displayed in the card's footer instead of the card's body.\":\"When toggled, dates will be displayed in the card's footer instead of the card's body.\",\"Move tags to card footer\":\"Move tags to card footer\",\"When toggled, tags will be displayed in the card's footer instead of the card's body.\":\"When toggled, tags will be displayed in the card's footer instead of the card's body.\",\"Move task data to card footer\":\"Move task data to card footer\",\"When toggled, task data (from the Tasks plugin) will be displayed in the card's footer instead of the card's body.\":\"When toggled, task data (from the Tasks plugin) will be displayed in the card's footer instead of the card's body.\",\"Inline metadata position\":\"Inline metadata position\",\"Controls where the inline metadata (from the Dataview plugin) will be displayed.\":\"Controls where the inline metadata (from the Dataview plugin) will be displayed.\",\"Card body\":\"Card body\",\"Card footer\":\"Card footer\",\"Merge with linked page metadata\":\"Merge with linked page metadata\",\"Hide card counts in list titles\":\"Hide card counts in list titles\",\"When toggled, card counts are hidden from the list title\":\"When toggled, card counts are hidden from the list title\",\"Link dates to daily notes\":\"Link dates to daily notes\",\"When toggled, dates will link to daily notes. Eg. [[2021-04-26]]\":\"When toggled, dates will link to daily notes. Eg. [[2021-04-26]]\",\"Add date and time to archived cards\":\"Add date and time to archived cards\",\"When toggled, the current date and time will be added to the card title when it is archived. Eg. - [ ] 2021-05-14 10:00am My card title\":\"When toggled, the current date and time will be added to the card title when it is archived. Eg. - [ ] 2021-05-14 10:00am My card title\",\"Add archive date/time after card title\":\"Add archive date/time after card title\",\"When toggled, the archived date/time will be added after the card title, e.g.- [ ] My card title 2021-05-14 10:00am. By default, it is inserted before the title.\":\"When toggled, the archived date/time will be added after the card title, e.g.- [ ] My card title 2021-05-14 10:00am. By default, it is inserted before the title.\",\"Archive date/time separator\":\"Archive date/time separator\",\"This will be used to separate the archived date/time from the title\":\"This will be used to separate the archived date/time from the title\",\"Archive date/time format\":\"Archive date/time format\",\"Kanban Plugin\":\"Kanban Plugin\",\"Tag click action\":\"Tag click action\",\"Search Kanban Board\":\"Search Kanban Board\",\"Search Obsidian Vault\":\"Search Obsidian Vault\",\"This setting controls whether clicking the tags displayed below the card title opens the Obsidian search or the Kanban board search.\":\"This setting controls whether clicking the tags displayed below the card title opens the Obsidian search or the Kanban board search.\",\"Tag colors\":\"Tag colors\",\"Set colors for tags displayed in cards.\":\"Set colors for tags displayed in cards.\",\"Linked Page Metadata\":\"Linked Page Metadata\",\"Inline Metadata\":\"Inline Metadata\",\"Display metadata for the first note linked within a card. Specify which metadata keys to display below. An optional label can be provided, and labels can be hidden altogether.\":\"Display metadata for the first note linked within a card. Specify which metadata keys to display below. An optional label can be provided, and labels can be hidden altogether.\",\"Board Header Buttons\":\"Board Header Buttons\",\"Calendar: first day of week\":\"Calendar: first day of week\",\"Override which day is used as the start of the week\":\"Override which day is used as the start of the week\",Sunday:\"Sunday\",Monday:\"Monday\",Tuesday:\"Tuesday\",Wednesday:\"Wednesday\",Thursday:\"Thursday\",Friday:\"Friday\",Saturday:\"Saturday\",\"Background color\":\"Background color\",Tag:\"Tag\",\"Text color\":\"Text color\",\"Date is\":\"Date is\",Today:\"Today\",\"After now\":\"After now\",\"Before now\":\"Before now\",\"Between now and\":\"Between now and\",\"Display date colors\":\"Display date colors\",\"Set colors for dates displayed in cards based on the rules below.\":\"Set colors for dates displayed in cards based on the rules below.\",\"Add date color\":\"Add date color\",\"Metadata key\":\"Metadata key\",\"Display label\":\"Display label\",\"Hide label\":\"Hide label\",\"Drag to rearrange\":\"Drag to rearrange\",Delete:\"Delete\",\"Add key\":\"Add key\",\"Add tag\":\"Add tag\",\"Field contains markdown\":\"Field contains markdown\",\"Tag sort order\":\"Tag sort order\",\"Set an explicit sort order for the specified tags.\":\"Set an explicit sort order for the specified tags.\",\"Add tag color\":\"Add tag color\",List:\"List\",Card:\"Card\",Date:\"Date\",Tags:\"Tags\",Priority:\"Priority\",Start:\"Start\",Created:\"Created\",Scheduled:\"Scheduled\",Due:\"Due\",Cancelled:\"Cancelled\",Recurrence:\"Recurrence\",\"Depends on\":\"Depends on\",ID:\"ID\",\"More options\":\"More options\",Cancel:\"Cancel\",Done:\"Done\",Save:\"Save\",today:\"today\",yesterday:\"yesterday\",tomorrow:\"tomorrow\",\"Change date\":\"Change date\",\"Change time\":\"Change time\",\"Card title...\":\"Card title...\",\"Add card\":\"Add card\",\"Add a card\":\"Add a card\",\"Edit card\":\"Edit card\",\"New note from card\":\"New note from card\",\"Archive card\":\"Archive card\",\"Delete card\":\"Delete card\",\"Edit date\":\"Edit date\",\"Add date\":\"Add date\",\"Remove date\":\"Remove date\",\"Edit time\":\"Edit time\",\"Add time\":\"Add time\",\"Remove time\":\"Remove time\",\"Duplicate card\":\"Duplicate card\",\"Split card\":\"Split card\",\"Copy link to card\":\"Copy link to card\",\"Insert card before\":\"Insert card before\",\"Insert card after\":\"Insert card after\",\"Add label\":\"Add label\",\"Move to top\":\"Move to top\",\"Move to bottom\":\"Move to bottom\",\"Move to list\":\"Move to list\",\"Enter list title...\":\"Enter list title...\",\"Mark cards in this list as complete\":\"Mark cards in this list as complete\",\"Add list\":\"Add list\",\"Add a list\":\"Add a list\",\"Move list\":\"Move list\",Close:\"Close\",\"Are you sure you want to delete this list and all its cards?\":\"Are you sure you want to delete this list and all its cards?\",\"Yes, delete list\":\"Yes, delete list\",\"Are you sure you want to archive this list and all its cards?\":\"Are you sure you want to archive this list and all its cards?\",\"Yes, archive list\":\"Yes, archive list\",\"Are you sure you want to archive all cards in this list?\":\"Are you sure you want to archive all cards in this list?\",\"Yes, archive cards\":\"Yes, archive cards\",\"Edit list\":\"Edit list\",\"Archive cards\":\"Archive cards\",\"Archive list\":\"Archive list\",\"Delete list\":\"Delete list\",\"Insert list before\":\"Insert list before\",\"Insert list after\":\"Insert list after\",\"Sort by card text\":\"Sort by card text\",\"Sort by date\":\"Sort by date\",\"Sort by tags\":\"Sort by tags\",\"Sort by\":\"Sort by\",\"Unable to find\":\"Unable to find\",\"Open in default app\":\"Open in default app\",Submit:\"Submit\"},yh=cA;var dA={},Jw=dA;var fA={},Zw=fA;var hA={},Qw=hA;var mA={},Xw=mA;var pA={\"Open as kanban board\":\"Apri come bacheca Kanban\",\"Create new board\":\"Crea nuova bacheca\",\"Archive completed cards in active board\":\"Archivia schede completate nella bacheca attiva\",\"Error: current file is not a Kanban board\":\"Errore: il file corrente non \\xE8 una bacheca Kanban\",\"Convert empty note to Kanban\":\"Converti nota vuota in Kanban\",\"Error: cannot create Kanban, the current note is not empty\":\"Errore: Impossibile creare Kanban, la nota corrente non \\xE8 vuota\",\"New kanban board\":\"Nuova bacheca Kanban\",\"Untitled Kanban\":\"Kanban senza titolo\",\"Open as markdown\":\"Apri come markdown\",\"Open board settings\":\"Apri impostazioni bacheca\",\"Archive completed cards\":\"Archivia schede completate\",Complete:\"Completato\",Archive:\"Archivio\",\"Note: No template plugins are currently enabled.\":\"Nota: Nessun plugin dei modelli attualmente abilitato.\",default:\"predefinito\",\"Search...\":\"Ricerca...\",\"These settings will take precedence over the default Kanban board settings.\":\"Queste impostazioni avranno la precedenza sulle impostazioni predefinite della bacheca Kanban.\",\"Set the default Kanban board settings. Settings can be overridden on a board-by-board basis.\":\"Impostazioni predefinite della bacheca Kanban. Le impostazioni possono essere sovrascritte per ogni bacheca.\",\"Note template\":\"Nota modello\",\"This template will be used when creating new notes from Kanban cards.\":\"Questo modello verr\\xE0 utilizzato durante la creazione di nuove note dalle schede Kanban.\",\"No template\":\"Nessun modello\",\"Note folder\":\"Cartella delle note\",\"Notes created from Kanban cards will be placed in this folder. If blank, they will be placed in the default location for this vault.\":\"Le note create dalle schede Kanban verranno inserite in questa cartella. Se vuota, verranno inserite nella posizione predefinita del vault.\",\"Default folder\":\"Cartella predefinita\",\"Maximum number of archived cards\":\"Numero massimo di schede archiviate\",\"Archived cards can be viewed in markdown mode. This setting will begin removing old cards once the limit is reached. Setting this value to -1 will allow a board's archive to grow infinitely.\":\"Le schede archiviate possono essere visualizzate in modalit\\xE0 Markdown. Le vecchie schede verranno rimosse una volta raggiunto il limite. Impostando il valore -1 il numero di schede archiviate sar\\xE0 illimitato.\",\"Display card checkbox\":\"Mostra casella di controllo\",\"When toggled, a checkbox will be displayed with each card\":\"Se attiva, verr\\xE0 visualizzata una casella di controllo per ogni scheda\",\"Reset to default\":\"Ripristina predefiniti\",\"Date & Time\":\"Data e ora\",\"Date trigger\":\"Selettore data\",\"When this is typed, it will trigger the date selector\":\"Digitando questo, verr\\xE0 attivato il selettore della data\",\"Time trigger\":\"Selettore ora\",\"When this is typed, it will trigger the time selector\":\"Digitando questo, verr\\xE0 attivato il selettore dell'ora\",\"Date format\":\"Formato data\",\"This format will be used when saving dates in markdown.\":\"Formato utilizzato per il salvataggio delle date in Markdown.\",\"For more syntax, refer to\":\"Per maggiori informazioni, vedere\",\"format reference\":\"formato di riferimento\",\"Your current syntax looks like this\":\"Formato corrente\",\"Time format\":\"Formato ora\",\"Date display format\":\"Formato visualizzazione data\",\"This format will be used when displaying dates in Kanban cards.\":\"Formato utilizzato per visualizzare le date nelle schede Kanban.\",\"Show relative date\":\"Mostra data relativa\",\"Link dates to daily notes\":\"Collega date alle Note del giorno\",\"When toggled, dates will link to daily notes. Eg. [[2021-04-26]]\":\"Se attiva, le date verranno collegate alle Note del giorno. Eg. [[2021-04-26]]\",\"Add date and time to archived cards\":\"Aggiungi data e ora alle schede archiviate\",\"When toggled, the current date and time will be added to the card title when it is archived. Eg. - [ ] 2021-05-14 10:00am My card title\":\"Se attiva, la data e l'ora corrente verranno aggiunte all'inizio della scheda quando viene archiviata. Eg. - [ ] 2021-05-14 10:00am Mia scheda\",\"Archive date/time separator\":\"Separatore data/ora dell'archivio\",\"This will be used to separate the archived date/time from the title\":\"Verr\\xE0 usato per separare data e ora dell'archiviazione dal titolo\",\"Archive date/time format\":\"Formato data/ora dell'archivio\",\"Kanban Plugin\":\"Plugin Kanban\",\"More options\":\"Altre opzioni\",Cancel:\"Annulla\",today:\"oggi\",yesterday:\"ieri\",tomorrow:\"domani\",\"Change date\":\"Modifica data\",\"Change time\":\"Modifica ora\",\"Card title...\":\"Titolo elemento...\",\"Add card\":\"Aggiungi elemento\",\"Add a card\":\"Aggiungi un'altra scheda\",\"Edit card\":\"Modifica scheda\",\"New note from card\":\"Nuova nota da scheda\",\"Archive card\":\"Archivia scheda\",\"Delete card\":\"Elimina scheda\",\"Edit date\":\"Modifica data\",\"Add date\":\"Aggiungi data\",\"Remove date\":\"Rimuovi data\",\"Edit time\":\"Modifica ora\",\"Add time\":\"Aggiungi ora\",\"Remove time\":\"Rimuovi ora\",\"Enter list title...\":\"Inserisci titolo lista...\",\"Mark cards in this list as complete\":\"Segna elementi della lista come completati\",\"Add list\":\"Aggiungi lista\",\"Add a list\":\"Aggiungi un'altra lista\",\"Move list\":\"Sposta lista\",Close:\"Chiudi\",\"Are you sure you want to delete this list and all its cards?\":\"Cancellare questa lista e tutte le sue schede?\",\"Yes, delete list\":\"Cancella lista\",\"Are you sure you want to archive this list and all its cards?\":\"Archiviare questa lista e tutte le sue schede?\",\"Yes, archive list\":\"Archivia lista\",\"Are you sure you want to archive all cards in this list?\":\"Archiviare tutte le schede in questa lista?\",\"Yes, archive cards\":\"Archivia schede\",\"Edit list\":\"Modifica lista\",\"Archive cards\":\"Archivia schede\",\"Archive list\":\"Archivia lista\",\"Delete list\":\"Cancella lista\"},eb=pA;var gA={\"Open as kanban board\":\"\\u30AB\\u30F3\\u30D0\\u30F3\\u30DC\\u30FC\\u30C9\\u3068\\u3057\\u3066\\u958B\\u304F\",\"Create new board\":\"\\u30AB\\u30F3\\u30D0\\u30F3\\u30DC\\u30FC\\u30C9\\u3092\\u65B0\\u898F\\u4F5C\\u6210\",\"Archive completed cards in active board\":\"\\u30A2\\u30AF\\u30C6\\u30A3\\u30D6\\u30DC\\u30FC\\u30C9\\u306E\\u5B8C\\u4E86\\u3057\\u305F\\u30AB\\u30FC\\u30C9\\u3092\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\",\"Error: current file is not a Kanban board\":\"\\u30A8\\u30E9\\u30FC: \\u73FE\\u5728\\u306E\\u30D5\\u30A1\\u30A4\\u30EB\\u306F\\u30AB\\u30F3\\u30D0\\u30F3\\u30DC\\u30FC\\u30C9\\u3067\\u306F\\u3042\\u308A\\u307E\\u305B\\u3093\",\"Convert empty note to Kanban\":\"\\u7A7A\\u306E\\u30CE\\u30FC\\u30C8\\u3092\\u30AB\\u30F3\\u30D0\\u30F3\\u306B\\u5909\\u63DB\",\"Error: cannot create Kanban, the current note is not empty\":\"\\u30A8\\u30E9\\u30FC: \\u73FE\\u5728\\u958B\\u3044\\u3066\\u3044\\u308B\\u30CE\\u30FC\\u30C8\\u306F\\u7A7A\\u3067\\u3042\\u308A\\u3001\\u30AB\\u30F3\\u30D0\\u30F3\\u3092\\u4F5C\\u6210\\u3067\\u304D\\u307E\\u305B\\u3093\",\"New kanban board\":\"\\u65B0\\u898F\\u30AB\\u30F3\\u30D0\\u30F3\\u30DC\\u30FC\\u30C9\",\"Untitled Kanban\":\"\\u7121\\u984C\\u306E\\u30AB\\u30F3\\u30D0\\u30F3\",\"Toggle between Kanban and markdown mode\":\"\\u30AB\\u30F3\\u30D0\\u30F3\\u3068\\u30DE\\u30FC\\u30AF\\u30C0\\u30A6\\u30F3\\u306E\\u30E2\\u30FC\\u30C9\\u3092\\u5207\\u308A\\u66FF\\u3048\\u308B\",\"Open as markdown\":\"\\u30DE\\u30FC\\u30AF\\u30C0\\u30A6\\u30F3\\u3068\\u3057\\u3066\\u958B\\u304F\",\"Open board settings\":\"\\u30DC\\u30FC\\u30C9\\u8A2D\\u5B9A\\u3092\\u958B\\u304F\",\"Archive completed cards\":\"\\u5B8C\\u4E86\\u3057\\u305F\\u30AB\\u30FC\\u30C9\\u3092\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\",\"Something went wrong\":\"\\u30A8\\u30E9\\u30FC\\u304C\\u767A\\u751F\\u3057\\u307E\\u3057\\u305F\",\"You may wish to open as markdown and inspect or edit the file.\":\"\\u30DE\\u30FC\\u30AF\\u30C0\\u30A6\\u30F3\\u3068\\u3057\\u3066\\u30D5\\u30A1\\u30A4\\u30EB\\u3092\\u958B\\u3044\\u3066\\u8ABF\\u67FB\\u3059\\u308B\\u304B\\u7DE8\\u96C6\\u3059\\u308B\\u3053\\u3068\\u3092\\u304A\\u3059\\u3059\\u3081\\u3057\\u307E\\u3059\\u3002\",\"Are you sure you want to archive all completed cards on this board?\":\"\\u3053\\u306E\\u30DC\\u30FC\\u30C9\\u306B\\u542B\\u307E\\u308C\\u308B\\u3059\\u3079\\u3066\\u306E\\u5B8C\\u4E86\\u3057\\u305F\\u30AB\\u30FC\\u30C9\\u3092\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\\u3057\\u307E\\u3059\\u304B\\uFF1F\",Complete:\"\\u5B8C\\u4E86\",Archive:\"\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\",\"Invalid Kanban file: problems parsing frontmatter\":\"\\u7121\\u52B9\\u306A\\u30AB\\u30F3\\u30D0\\u30F3\\u30D5\\u30A1\\u30A4\\u30EB: \\u30D5\\u30ED\\u30F3\\u30C8\\u30DE\\u30BF\\u30FC\\u306E\\u30D1\\u30FC\\u30B9\\u306B\\u554F\\u984C\\u304C\\u3042\\u308A\\u307E\\u3059\",\"I don't know how to interpret this line:\":\"\\u3053\\u306E\\u884C\\u3092\\u3069\\u3046\\u89E3\\u91C8\\u3059\\u308C\\u3070\\u3088\\u3044\\u304B\\u5206\\u304B\\u308A\\u307E\\u305B\\u3093\",Untitled:\"\\u7121\\u984C\",\"Note: No template plugins are currently enabled.\":\"\\u30CE\\u30FC\\u30C8:  \\u73FE\\u5728\\u3001\\u30C6\\u30F3\\u30D7\\u30EC\\u30FC\\u30C8\\u306E\\u30D7\\u30E9\\u30B0\\u30A4\\u30F3\\u304C\\u7121\\u52B9\\u5316\\u3055\\u308C\\u3066\\u3044\\u307E\\u3059\",default:\"\\u30C7\\u30D5\\u30A9\\u30EB\\u30C8\",\"Search...\":\"\\u691C\\u7D22\\u2026\",\"New line trigger\":\"\\u6539\\u884C\\u30C8\\u30EA\\u30AC\\u30FC\",\"Shift + Enter\":\"Shift + Enter\",Enter:\"Enter\",\"Prepend / append new cards\":\"\\u5148\\u982D\\u307E\\u305F\\u306F\\u672B\\u5C3E\\u306B\\u65B0\\u898F\\u30AB\\u30FC\\u30C9\\u3092\\u8FFD\\u52A0\\u3059\\u308B\",\"This setting controls whether new cards are added to the beginning or end of the list.\":\"\\u3053\\u306E\\u8A2D\\u5B9A\\u306B\\u3088\\u3063\\u3066\\u65B0\\u898F\\u30AB\\u30FC\\u30C9\\u3092\\u30EA\\u30B9\\u30C8\\u306E\\u5148\\u982D\\u307E\\u305F\\u306F\\u672B\\u5C3E\\u306B\\u8FFD\\u52A0\\u3059\\u308B\\u304B\\u3092\\u6C7A\\u3081\\u307E\\u3059\\u3002\",Prepend:\"\\u5148\\u982D\\u306B\\u8FFD\\u52A0\",\"Prepend (compact)\":\"\\u5148\\u982D\\u306B\\u8FFD\\u52A0(\\u30B3\\u30F3\\u30D1\\u30AF\\u30C8)\",Append:\"\\u672B\\u5C3E\\u306B\\u8FFD\\u52A0\",\"These settings will take precedence over the default Kanban board settings.\":\"\\u3053\\u308C\\u3089\\u306E\\u8A2D\\u5B9A\\u306F\\u30C7\\u30D5\\u30A9\\u30EB\\u30C8\\u306E\\u30AB\\u30F3\\u30D0\\u30F3\\u8A2D\\u5B9A\\u3088\\u308A\\u512A\\u5148\\u3055\\u308C\\u307E\\u3059\\u3002\",\"Set the default Kanban board settings. Settings can be overridden on a board-by-board basis.\":\"\\u30C7\\u30D5\\u30A9\\u30EB\\u30C8\\u306E\\u30AB\\u30F3\\u30D0\\u30F3\\u30DC\\u30FC\\u30C9\\u8A2D\\u5B9A\\u3092\\u30BB\\u30C3\\u30C8\\u3057\\u307E\\u3059\\u3002\\u3053\\u306E\\u8A2D\\u5B9A\\u306F\\u30DC\\u30FC\\u30C9\\u6BCE\\u306B\\u4E0A\\u66F8\\u304D\\u3067\\u304D\\u307E\\u3059\\u3002\",\"Note template\":\"\\u30CE\\u30FC\\u30C8\\u30C6\\u30F3\\u30D7\\u30EC\\u30FC\\u30C8\",\"This template will be used when creating new notes from Kanban cards.\":\"\\u3053\\u306E\\u30C6\\u30F3\\u30D7\\u30EC\\u30FC\\u30C8\\u306F\\u30AB\\u30F3\\u30D0\\u30F3\\u30AB\\u30FC\\u30C9\\u304B\\u3089\\u30CE\\u30FC\\u30C8\\u3092\\u65B0\\u898F\\u4F5C\\u6210\\u3057\\u305F\\u969B\\u306B\\u4F7F\\u7528\\u3055\\u308C\\u307E\\u3059\\u3002\",\"No template\":\"\\u30C6\\u30F3\\u30D7\\u30EC\\u30FC\\u30C8\\u304C\\u3042\\u308A\\u307E\\u305B\\u3093\",\"Note folder\":\"\\u30CE\\u30FC\\u30C8\\u30D5\\u30A9\\u30EB\\u30C0\",\"Notes created from Kanban cards will be placed in this folder. If blank, they will be placed in the default location for this vault.\":\"\\u30AB\\u30F3\\u30D0\\u30F3\\u30AB\\u30FC\\u30C9\\u304B\\u3089\\u4F5C\\u6210\\u3055\\u308C\\u305F\\u30CE\\u30FC\\u30C8\\u306F\\u3053\\u306E\\u30D5\\u30A9\\u30EB\\u30C0\\u5185\\u306B\\u7F6E\\u304B\\u308C\\u307E\\u3059\\u3002\\u30D6\\u30E9\\u30F3\\u30AF\\u306E\\u5834\\u5408\\u306B\\u306F\\u3001\\u3053\\u306E\\u4FDD\\u7BA1\\u5EAB\\u306E\\u30C7\\u30D5\\u30A9\\u30EB\\u30C8\\u30ED\\u30B1\\u30FC\\u30B7\\u30E7\\u30F3\\u306B\\u7F6E\\u304B\\u308C\\u307E\\u3059\\u3002\",\"Default folder\":\"\\u30C7\\u30D5\\u30A9\\u30EB\\u30C8\\u30D5\\u30A9\\u30EB\\u30C0\",\"Maximum number of archived cards\":\"\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\\u3055\\u308C\\u305F\\u30AB\\u30FC\\u30C9\\u306E\\u6700\\u5927\\u6570\",\"Archived cards can be viewed in markdown mode. This setting will begin removing old cards once the limit is reached. Setting this value to -1 will allow a board's archive to grow infinitely.\":\"\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\\u3055\\u308C\\u305F\\u30AB\\u30FC\\u30C9\\u306F\\u30DE\\u30FC\\u30AF\\u30C0\\u30A6\\u30F3\\u30E2\\u30FC\\u30C9\\u3067\\u95B2\\u89A7\\u3067\\u304D\\u307E\\u3059\\u3002\\u3053\\u306E\\u8A2D\\u5B9A\\u306B\\u3088\\u308A\\u6307\\u5B9A\\u3055\\u308C\\u305F\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\\u306E\\u9650\\u754C\\u6570\\u307E\\u3067\\u9054\\u3057\\u305F\\u969B\\u306B\\u306F\\u53E4\\u3044\\u30AB\\u30FC\\u30C9\\u3092\\u524A\\u9664\\u3057\\u307E\\u3059\\u3002\\u3053\\u306E\\u5024\\u3092-1\\u306B\\u8A2D\\u5B9A\\u3059\\u308B\\u3068\\u30DC\\u30FC\\u30C9\\u306E\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\\u9650\\u754C\\u3092\\u7121\\u9650\\u306B\\u3057\\u307E\\u3059\\u3002\",\"Display card checkbox\":\"\\u30AB\\u30FC\\u30C9\\u306E\\u30C1\\u30A7\\u30C3\\u30AF\\u30DC\\u30C3\\u30AF\\u30B9\\u3092\\u8868\\u793A\",\"When toggled, a checkbox will be displayed with each card\":\"\\u6709\\u52B9\\u5316\\u3059\\u308B\\u3068\\u5404\\u30AB\\u30FC\\u30C9\\u306E\\u30C1\\u30A7\\u30C3\\u30AF\\u30DC\\u30C3\\u30AF\\u30B9\\u304C\\u8868\\u793A\\u3055\\u308C\\u307E\\u3059\\u3002\",\"Reset to default\":\"\\u30C7\\u30D5\\u30A9\\u30EB\\u30C8\\u306B\\u30EA\\u30BB\\u30C3\\u30C8\",\"Date & Time\":\"\\u65E5\\u4ED8\\u3068\\u6642\\u9593\",\"Date trigger\":\"\\u65E5\\u4ED8\\u30C8\\u30EA\\u30AC\\u30FC\",\"When this is typed, it will trigger the date selector\":\"\\u3053\\u306E\\u8A2D\\u5B9A\\u306B\\u5165\\u529B\\u3055\\u308C\\u305F\\u6587\\u5B57\\u5217\\u3067\\u65E5\\u4ED8\\u30BB\\u30EC\\u30AF\\u30BF\\u30FC\\u3092\\u30C8\\u30EA\\u30AC\\u30FC\\u3057\\u307E\\u3059\\u3002\",\"Time trigger\":\"\\u6642\\u9593\\u30C8\\u30EA\\u30AC\\u30FC\",\"When this is typed, it will trigger the time selector\":\"\\u3053\\u306E\\u8A2D\\u5B9A\\u306B\\u5165\\u529B\\u3055\\u308C\\u305F\\u6587\\u5B57\\u5217\\u3067\\u6642\\u9593\\u30BB\\u30EC\\u30AF\\u30BF\\u30FC\\u3092\\u30C8\\u30EA\\u30AC\\u30FC\\u3057\\u307E\\u3059\\u3002\",\"Date format\":\"\\u65E5\\u4ED8\\u30D5\\u30A9\\u30FC\\u30DE\\u30C3\\u30C8\",\"This format will be used when saving dates in markdown.\":\"\\u3053\\u306E\\u30D5\\u30A9\\u30FC\\u30DE\\u30C3\\u30C8\\u306F\\u30DE\\u30FC\\u30AF\\u30C0\\u30A6\\u30F3\\u3067\\u65E5\\u4ED8\\u304C\\u4FDD\\u5B58\\u3055\\u308C\\u308B\\u969B\\u306B\\u4F7F\\u7528\\u3055\\u308C\\u307E\\u3059\\u3002\",\"For more syntax, refer to\":\"\\u30B7\\u30F3\\u30BF\\u30C3\\u30AF\\u30B9\\u306B\\u3064\\u3044\\u3066\\u306F\\u3053\\u3061\\u3089\\u3092\\u53C2\\u7167:\",\"format reference\":\"\\u30D5\\u30A9\\u30FC\\u30DE\\u30C3\\u30C8\\u30EA\\u30D5\\u30A1\\u30EC\\u30F3\\u30B9\",\"Your current syntax looks like this\":\"\\u73FE\\u5728\\u306E\\u30B7\\u30F3\\u30BF\\u30C3\\u30AF\\u30B9\\u306F\\u6B21\\u306E\\u3088\\u3046\\u306B\\u898B\\u3048\\u307E\\u3059\",\"Time format\":\"\\u6642\\u9593\\u30D5\\u30A9\\u30FC\\u30DE\\u30C3\\u30C8\",\"Date display format\":\"\\u65E5\\u4ED8\\u8868\\u793A\\u30D5\\u30A9\\u30FC\\u30DE\\u30C3\\u30C8\",\"This format will be used when displaying dates in Kanban cards.\":\"\\u3053\\u306E\\u30D5\\u30A9\\u30FC\\u30DE\\u30C3\\u30C8\\u306F\\u30AB\\u30F3\\u30D0\\u30F3\\u30AB\\u30FC\\u30C9\\u5185\\u306B\\u3066\\u65E5\\u4ED8\\u306E\\u8868\\u793A\\u306B\\u4F7F\\u7528\\u3055\\u308C\\u307E\\u3059\\u3002\",\"Show relative date\":\"\\u76F8\\u5BFE\\u65E5\\u4ED8\\u3092\\u8868\\u793A\",\"Link dates to daily notes\":\"\\u30C7\\u30A4\\u30EA\\u30FC\\u30CE\\u30FC\\u30C8\\u306B\\u65E5\\u4ED8\\u3092\\u30EA\\u30F3\\u30AF\",\"When toggled, dates will link to daily notes. Eg. [[2021-04-26]]\":\"\\u6709\\u52B9\\u5316\\u3059\\u308B\\u3068\\u65E5\\u4ED8\\u304C\\u30C7\\u30A4\\u30EA\\u30FC\\u30CE\\u30FC\\u30C8\\u306B\\u30EA\\u30F3\\u30AF\\u3055\\u308C\\u307E\\u3059\\u3002 \\u4F8B: [[2021-04-26]]\",\"Add date and time to archived cards\":\"\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\\u3055\\u308C\\u305F\\u30AB\\u30FC\\u30C9\\u306B\\u65E5\\u4ED8\\u3068\\u6642\\u9593\\u3092\\u8FFD\\u52A0\",\"When toggled, the current date and time will be added to the card title when it is archived. Eg. - [ ] 2021-05-14 10:00am My card title\":\"\\u6709\\u52B9\\u5316\\u3059\\u308B\\u3068\\u30AB\\u30FC\\u30C9\\u304C\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\\u3055\\u308C\\u305F\\u969B\\u306B\\u73FE\\u5728\\u306E\\u65E5\\u4ED8\\u3068\\u6642\\u9593\\u304C\\u30AB\\u30FC\\u30C9\\u306E\\u6700\\u521D\\u306B\\u8FFD\\u8A18\\u3055\\u308C\\u308B\\u3088\\u3046\\u306B\\u306A\\u308A\\u307E\\u3059\\u3002\\u4F8B: - [ ] 2021-05-14 10:00am \\u30AB\\u30FC\\u30C9\\u30BF\\u30A4\\u30C8\\u30EB\",\"Archive date/time separator\":\"\\u65E5\\u4ED8\\u30FB\\u6642\\u9593\\u30BB\\u30D1\\u30EC\\u30FC\\u30BF\\u30FC\\u3092\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\",\"This will be used to separate the archived date/time from the title\":\"\\u3053\\u308C\\u306F\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\\u3055\\u308C\\u305F\\u65E5\\u4ED8\\u30FB\\u6642\\u9593\\u3092\\u30BF\\u30A4\\u30C8\\u30EB\\u304B\\u3089\\u5206\\u96E2\\u3059\\u308B\\u306E\\u306B\\u4F7F\\u7528\\u3055\\u308C\\u307E\\u3059\\u3002\",\"Archive date/time format\":\"\\u65E5\\u4ED8\\u30FB\\u6642\\u9593\\u30D5\\u30A9\\u30FC\\u30DE\\u30C3\\u30C8\\u3092\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\",\"Kanban Plugin\":\"\\u30AB\\u30F3\\u30D0\\u30F3\\u30D7\\u30E9\\u30B0\\u30A4\\u30F3\",\"Linked Page Metadata\":\"\\u30EA\\u30F3\\u30AF\\u3055\\u308C\\u305F\\u30DA\\u30FC\\u30B8\\u306E\\u30E1\\u30BF\\u30C7\\u30FC\\u30BF\",\"Display metadata for the first note linked within a card. Specify which metadata keys to display below. An optional label can be provided, and labels can be hidden altogether.\":\"\\u30AB\\u30FC\\u30C9\\u5185\\u3067\\u30EA\\u30F3\\u30AF\\u3055\\u308C\\u3066\\u3044\\u308B\\u6700\\u521D\\u306E\\u30CE\\u30FC\\u30C8\\u306E\\u30E1\\u30BF\\u30C7\\u30FC\\u30BF\\u3092\\u8868\\u793A\\u3057\\u307E\\u3059\\u3002\\u4E0B\\u306B\\u8868\\u793A\\u3059\\u308B\\u30E1\\u30BF\\u30C7\\u30FC\\u30BF\\u306E\\u30AD\\u30FC\\u3092\\u6307\\u5B9A\\u3057\\u3066\\u304F\\u3060\\u3055\\u3044\\u3002\\u30AA\\u30D7\\u30B7\\u30E7\\u30F3\\u3068\\u3057\\u3066\\u30E9\\u30D9\\u30EB\\u306E\\u4ED8\\u4E0E\\u304C\\u53EF\\u80FD\\u3067\\u3042\\u308A\\u3001\\u30E9\\u30D9\\u30EB\\u306F\\u5B8C\\u5168\\u306B\\u975E\\u8868\\u793A\\u306B\\u3059\\u308B\\u3053\\u3068\\u304C\\u3067\\u304D\\u307E\\u3059\\u3002\",\"Board Header Buttons\":\"\\u30DC\\u30FC\\u30C9\\u306E\\u30D8\\u30C3\\u30C0\\u30FC\\u30DC\\u30BF\\u30F3\",\"Calendar: first day of week\":\"\\u30AB\\u30EC\\u30F3\\u30C0\\u30FC: \\u9031\\u306E\\u59CB\\u307E\\u308A\",\"Override which day is used as the start of the week\":\"\\u9031\\u306E\\u59CB\\u307E\\u308A\\u3068\\u3057\\u3066\\u4F7F\\u7528\\u3059\\u308B\\u66DC\\u65E5\\u3092\\u5909\\u66F4\\u3057\\u307E\\u3059\\u3002\",Sunday:\"\\u65E5\\u66DC\\u65E5\",Monday:\"\\u6708\\u66DC\\u65E5\",Tuesday:\"\\u706B\\u66DC\\u65E5\",Wednesday:\"\\u6C34\\u66DC\\u65E5\",Thursday:\"\\u6728\\u66DC\\u65E5\",Friday:\"\\u91D1\\u66DC\\u65E5\",Saturday:\"\\u571F\\u66DC\\u65E5\",\"Metadata key\":\"\\u30E1\\u30BF\\u30C7\\u30FC\\u30BF\\u306E\\u30AD\\u30FC\",\"Display label\":\"\\u30E9\\u30D9\\u30EB\\u3092\\u8868\\u793A\",\"Hide label\":\"\\u30E9\\u30D9\\u30EB\\u3092\\u96A0\\u3059\",\"Drag to rearrange\":\"\\u30C9\\u30E9\\u30C3\\u30B0\\u3057\\u3066\\u4E26\\u3079\\u66FF\\u3048\\u308B\",Delete:\"\\u524A\\u9664\",\"Add key\":\"\\u30AD\\u30FC\\u3092\\u8FFD\\u52A0\",\"Field contains markdown\":\"\\u30D5\\u30A3\\u30FC\\u30EB\\u30C9\\u306B\\u30DE\\u30FC\\u30AF\\u30C0\\u30A6\\u30F3\\u3092\\u542B\\u307F\\u307E\\u3059\",\"More options\":\"\\u4ED6\\u306E\\u30AA\\u30D7\\u30B7\\u30E7\\u30F3\",Cancel:\"\\u30AD\\u30E3\\u30F3\\u30BB\\u30EB\",today:\"\\u4ECA\\u65E5\",yesterday:\"\\u6628\\u65E5\",tomorrow:\"\\u660E\\u65E5\",\"Change date\":\"\\u65E5\\u4ED8\\u3092\\u5909\\u66F4\",\"Change time\":\"\\u6642\\u9593\\u3092\\u5909\\u66F4\",\"Card title...\":\"\\u30AB\\u30FC\\u30C9\\u30BF\\u30A4\\u30C8\\u30EB\\u2026\",\"Add card\":\"\\u30AB\\u30FC\\u30C9\\u3092\\u8FFD\\u52A0\",\"Add a card\":\"\\u30AB\\u30FC\\u30C9\\u3092\\u8FFD\\u52A0\",\"Edit card\":\"\\u30AB\\u30FC\\u30C9\\u3092\\u7DE8\\u96C6\",\"New note from card\":\"\\u30AB\\u30FC\\u30C9\\u304B\\u3089\\u30CE\\u30FC\\u30C8\\u3092\\u65B0\\u898F\\u4F5C\\u6210\",\"Archive card\":\"\\u30AB\\u30FC\\u30C9\\u3092\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\",\"Delete card\":\"\\u30AB\\u30FC\\u30C9\\u3092\\u524A\\u9664\",\"Edit date\":\"\\u65E5\\u4ED8\\u3092\\u7DE8\\u96C6\",\"Add date\":\"\\u65E5\\u4ED8\\u3092\\u8FFD\\u52A0\",\"Remove date\":\"\\u65E5\\u4ED8\\u3092\\u524A\\u9664\",\"Edit time\":\"\\u6642\\u9593\\u3092\\u7DE8\\u96C6\",\"Add time\":\"\\u6642\\u9593\\u3092\\u8FFD\\u52A0\",\"Remove time\":\"\\u6642\\u9593\\u3092\\u524A\\u9664\",\"Duplicate card\":\"\\u30AB\\u30FC\\u30C9\\u3092\\u8907\\u88FD\",\"Split card\":\"\\u30AB\\u30FC\\u30C9\\u3092\\u5206\\u5272\",\"Copy link to card\":\"\\u30AB\\u30FC\\u30C9\\u3078\\u306E\\u30EA\\u30F3\\u30AF\\u3092\\u30B3\\u30D4\\u30FC\",\"Enter list title...\":\"\\u30EA\\u30B9\\u30C8\\u30BF\\u30A4\\u30C8\\u30EB\\u3092\\u7DE8\\u96C6\\u2026\",\"Mark cards in this list as complete\":\"\\u3053\\u306E\\u30EA\\u30B9\\u30C8\\u306B\\u542B\\u307E\\u308C\\u308B\\u30AB\\u30FC\\u30C9\\u3092\\u5B8C\\u4E86\\u3068\\u3057\\u3066\\u30DE\\u30FC\\u30AF\\u3059\\u308B\",\"Add list\":\"\\u30EA\\u30B9\\u30C8\\u3092\\u8FFD\\u52A0\",\"Add a list\":\"\\u30EA\\u30B9\\u30C8\\u3092\\u8FFD\\u52A0\",\"Move list\":\"\\u30EA\\u30B9\\u30C8\\u3092\\u79FB\\u52D5\",Close:\"\\u9589\\u3058\\u308B\",\"Are you sure you want to delete this list and all its cards?\":\"\\u3053\\u306E\\u30EA\\u30B9\\u30C8\\u3068\\u542B\\u307E\\u308C\\u308B\\u3059\\u3079\\u3066\\u306E\\u30AB\\u30FC\\u30C9\\u3092\\u524A\\u9664\\u3057\\u307E\\u3059\\u304B\\b\\uFF1F\",\"Yes, delete list\":\"\\u306F\\u3044\\u3001\\u30EA\\u30B9\\u30C8\\u3092\\u524A\\u9664\\u3057\\u307E\\u3059\",\"Are you sure you want to archive this list and all its cards?\":\"\\u3053\\u306E\\u30EA\\u30B9\\u30C8\\u3068\\u542B\\u307E\\u308C\\u308B\\u3059\\u3079\\u3066\\u306E\\u30AB\\u30FC\\u30C9\\u3092\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\\u3057\\u307E\\u3059\\u304B\\uFF1F\",\"Yes, archive list\":\"\\u306F\\u3044\\u3001\\u30EA\\u30B9\\u30C8\\u3092\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\\u3057\\u307E\\u3059\",\"Are you sure you want to archive all cards in this list?\":\"\\u3053\\u306E\\u30EA\\u30B9\\u30C8\\u306B\\u542B\\u307E\\u308C\\u308B\\u3059\\u3079\\u3066\\u306E\\u30AB\\u30FC\\u30C9\\u3092\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\\u3057\\u307E\\u3059\\u304B\\uFF1F\",\"Yes, archive cards\":\"\\u306F\\u3044\\u3001\\u30AB\\u30FC\\u30C9\\u3092\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\\u3057\\u307E\\u3059\",\"Edit list\":\"\\u30EA\\u30B9\\u30C8\\u3092\\u7DE8\\u96C6\",\"Archive cards\":\"\\u30AB\\u30FC\\u30C9\\u3092\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\",\"Archive list\":\"\\u30EA\\u30B9\\u30C8\\u3092\\u30A2\\u30FC\\u30AB\\u30A4\\u30D6\",\"Delete list\":\"\\u30EA\\u30B9\\u30C8\\u3092\\u524A\\u9664\",\"Unable to find\":\"\\u898B\\u3064\\u304B\\u308A\\u307E\\u305B\\u3093\",\"Open in default app\":\"\\u30C7\\u30D5\\u30A9\\u30EB\\u30C8\\u30A2\\u30D7\\u30EA\\u3067\\u958B\\u304F\"},tb=gA;var yA={\"Open as kanban board\":\"\\uCE78\\uBC18 \\uBCF4\\uB4DC\\uB85C \\uC5F4\\uAE30\",\"Create new board\":\"\\uC0C8 \\uBCF4\\uB4DC \\uB9CC\\uB4E4\\uAE30\",\"Archive completed cards in active board\":\"\\uD65C\\uC131 \\uBCF4\\uB4DC\\uC5D0\\uC11C \\uC644\\uB8CC\\uB41C \\uCE74\\uB4DC \\uBCF4\\uAD00\",\"Error: current file is not a Kanban board\":\"\\uC5D0\\uB7EC: \\uD604\\uC7AC \\uD30C\\uC77C\\uC740 \\uCE78\\uBC18 \\uBCF4\\uB4DC\\uAC00 \\uC544\\uB2D9\\uB2C8\\uB2E4.\",\"Convert empty note to Kanban\":\"\\uBE48 \\uB178\\uD2B8\\uB97C \\uCE78\\uBC18 \\uBCF4\\uB4DC\\uB85C \\uBCC0\\uD658\",\"Error: cannot create Kanban, the current note is not empty\":\"\\uC5D0\\uB7EC: \\uCE78\\uBC18\\uC744 \\uC0DD\\uC131\\uD560 \\uC218 \\uC5C6\\uC2B5\\uB2C8\\uB2E4. \\uD604\\uC7AC \\uB178\\uD2B8\\uAC00 \\uBE44\\uC5B4\\uC788\\uC9C0 \\uC54A\\uC2B5\\uB2C8\\uB2E4.\",\"New kanban board\":\"\\uC0C8 \\uBCF4\\uB4DC \\uB9CC\\uB4E4\\uAE30\",\"Untitled Kanban\":\"\\uC774\\uB984 \\uC5C6\\uB294 \\uBCF4\\uB4DC\",\"Toggle between Kanban and markdown mode\":\"\\uCE78\\uBC18 \\uBAA8\\uB4DC\\uC640 \\uB9C8\\uD06C\\uB2E4\\uC6B4 \\uBAA8\\uB4DC \\uC804\\uD658\",\"Open as markdown\":\"\\uB9C8\\uD06C\\uB2E4\\uC6B4\\uC73C\\uB85C \\uC5F4\\uAE30\",\"Open board settings\":\"\\uBCF4\\uB4DC \\uC124\\uC815 \\uC5F4\\uAE30\",\"Archive completed cards\":\"\\uC644\\uB8CC\\uB41C \\uCE74\\uB4DC \\uBCF4\\uAD00\",\"Something went wrong\":\"\\uC54C \\uC218 \\uC5C6\\uB294 \\uBB38\\uC81C\\uAC00 \\uBC1C\\uC0DD\\uD588\\uC2B5\\uB2C8\\uB2E4.\",\"You may wish to open as markdown and inspect or edit the file.\":\"\\uB9C8\\uD06C\\uB2E4\\uC6B4\\uC73C\\uB85C \\uC5F4\\uC5B4 \\uD30C\\uC77C\\uC744 \\uAC80\\uC0AC\\uD558\\uAC70\\uB098 \\uD3B8\\uC9D1\\uD560 \\uC218 \\uC788\\uC2B5\\uB2C8\\uB2E4.\",\"Are you sure you want to archive all completed cards on this board?\":\"\\uC815\\uB9D0 \\uC774 \\uBCF4\\uB4DC\\uC758 \\uBAA8\\uB4E0 \\uC644\\uB8CC\\uB41C \\uCE74\\uB4DC\\uB97C \\uBCF4\\uAD00\\uD558\\uC2DC\\uACA0\\uC2B5\\uB2C8\\uAE4C?\",Complete:\"\\uC644\\uB8CC\\uB428\",Archive:\"\\uBCF4\\uAD00\\uB428\",\"Invalid Kanban file: problems parsing frontmatter\":\"\\uC798\\uBABB\\uB41C \\uCE78\\uBC18 \\uD30C\\uC77C: \\uD504\\uB860\\uD2B8\\uB9E4\\uD130 \\uD30C\\uC2F1 \\uBB38\\uC81C\\uAC00 \\uBC1C\\uC0DD\\uD588\\uC2B5\\uB2C8\\uB2E4.\",\"I don't know how to interpret this line:\":\"\\uC774 \\uC904\\uC744 \\uD574\\uC11D\\uD560 \\uC218 \\uC5C6\\uC2B5\\uB2C8\\uB2E4:\",Untitled:\"\\uC81C\\uBAA9 \\uC5C6\\uC74C\",\"Note: No template plugins are currently enabled.\":\"\\uB178\\uD2B8: \\uD604\\uC7AC \\uD15C\\uD50C\\uB9BF \\uD50C\\uB7EC\\uADF8\\uC778\\uC774 \\uD65C\\uC131\\uD654\\uB418\\uC5B4 \\uC788\\uC9C0 \\uC54A\\uC2B5\\uB2C8\\uB2E4.\",default:\"\\uAE30\\uBCF8\",\"Search...\":\"\\uAC80\\uC0C9\\uD558\\uAE30...\",\"New line trigger\":\"\\uC0C8 \\uC904 \\uB9CC\\uB4E4\\uAE30\",\"Select whether Enter or Shift+Enter creates a new line. The opposite of what you choose will create and complete editing of cards and lists.\":\"Enter \\uB610\\uB294 Shift + Enter \\uC911 \\uC5B4\\uB290 \\uB2E8\\uCD95\\uD0A4\\uB85C \\uC0C8 \\uC904\\uB85C \\uB118\\uC5B4\\uAC08\\uC9C0 \\uC120\\uD0DD\\uD569\\uB2C8\\uB2E4. \\uC120\\uD0DD\\uD558\\uC9C0 \\uC54A\\uC740 \\uB2E8\\uCD95\\uD0A4 (\\uB9CC\\uC57D Enter\\uB97C \\uC120\\uD0DD\\uD588\\uB2E4\\uBA74 Shift + Enter) \\uB294 \\uC9C4\\uD589\\uC911\\uC778 \\uCE74\\uB4DC \\uB610\\uB294 \\uBAA9\\uB85D\\uC758 \\uC0DD\\uC131 \\uBC0F \\uC218\\uC815\\uC744 \\uC644\\uB8CC\\uD569\\uB2C8\\uB2E4.\",\"Shift + Enter\":\"Shift + Enter\",Enter:\"Enter\",\"Prepend / append new cards\":\"\\uC0C8\\uB85C\\uC6B4 \\uCE74\\uB4DC\\uB97C \\uCD94\\uAC00\\uD560 \\uC704\\uCE58\",\"This setting controls whether new cards are added to the beginning or end of the list.\":\"\\uC0C8\\uB85C\\uC6B4 \\uCE74\\uB4DC\\uB97C \\uCD94\\uAC00\\uD558\\uB294 \\uBC84\\uD2BC\\uC774 \\uB9E8 \\uC704\\uC5D0 \\uCD94\\uAC00\\uB420\\uC9C0 \\uB9E8 \\uC544\\uB798\\uC5D0 \\uCD94\\uAC00\\uB420\\uC9C0 \\uC124\\uC815\\uD569\\uB2C8\\uB2E4.\",Prepend:\"\\uC0C1\\uB2E8\",\"Prepend (compact)\":\"\\uC0C1\\uB2E8 (\\uC791\\uC740 \\uBC84\\uD2BC)\",Append:\"\\uD558\\uB2E8\",\"These settings will take precedence over the default Kanban board settings.\":\"\\uC774 \\uC124\\uC815\\uC740 \\uAE30\\uBCF8 \\uCE78\\uBC18 \\uBCF4\\uB4DC \\uC124\\uC815\\uBCF4\\uB2E4 \\uC6B0\\uC120\\uD569\\uB2C8\\uB2E4.\",\"Set the default Kanban board settings. Settings can be overridden on a board-by-board basis.\":\"\\uAE30\\uBCF8 \\uCE78\\uBC18 \\uBCF4\\uB4DC \\uC124\\uC815\\uC744 \\uC124\\uC815\\uD569\\uB2C8\\uB2E4. \\uC124\\uC815\\uC740 \\uBCF4\\uB4DC\\uBCC4\\uB85C \\uC7AC\\uC815\\uC758\\uD560 \\uC218 \\uC788\\uC2B5\\uB2C8\\uB2E4.\",\"Note template\":\"\\uB178\\uD2B8 \\uD15C\\uD50C\\uB9BF\",\"This template will be used when creating new notes from Kanban cards.\":\"\\uC774 \\uD15C\\uD50C\\uB9BF\\uC740 \\uCE78\\uBC18 \\uCE74\\uB4DC\\uC5D0\\uC11C \\uC0C8 \\uB178\\uD2B8\\uB97C \\uB9CC\\uB4E4 \\uB54C \\uC0AC\\uC6A9\\uB429\\uB2C8\\uB2E4.\",\"No template\":\"\\uD15C\\uD50C\\uB9BF \\uC5C6\\uC74C\",\"Note folder\":\"\\uB178\\uD2B8 \\uD3F4\\uB354\",\"Notes created from Kanban cards will be placed in this folder. If blank, they will be placed in the default location for this vault.\":\"\\uCE74\\uB4DC\\uC5D0\\uC11C \\uB9CC\\uB4E0 \\uB178\\uD2B8\\uB294 \\uC774 \\uD3F4\\uB354\\uC5D0 \\uC800\\uC7A5\\uB429\\uB2C8\\uB2E4. \\uB9CC\\uC57D \\uBE44\\uC5B4\\uC788\\uB2E4\\uBA74, \\uAE30\\uBCF8 \\uC704\\uCE58\\uC5D0 \\uC800\\uC7A5\\uB429\\uB2C8\\uB2E4.\",\"Default folder\":\"\\uAE30\\uBCF8 \\uD3F4\\uB354\",\"List width\":\"\\uBAA9\\uB85D \\uB108\\uBE44\",\"Enter a number to set the list width in pixels.\":\"\\uD53D\\uC140 \\uB2E8\\uC704\\uB85C \\uBAA9\\uB85D\\uC758 \\uB108\\uBE44\\uB97C \\uC124\\uC815\\uD569\\uB2C8\\uB2E4.\",\"Maximum number of archived cards\":\"\\uBCF4\\uAD00\\uB41C \\uCE74\\uB4DC\\uC758 \\uCD5C\\uB300 \\uC218\",\"Archived cards can be viewed in markdown mode. This setting will begin removing old cards once the limit is reached. Setting this value to -1 will allow a board's archive to grow infinitely.\":\"\\uBCF4\\uAD00\\uB41C \\uCE74\\uB4DC\\uB294 \\uB9C8\\uD06C\\uB2E4\\uC6B4 \\uBAA8\\uB4DC\\uC5D0\\uC11C \\uBCFC \\uC218 \\uC788\\uC2B5\\uB2C8\\uB2E4. \\uC774 \\uC124\\uC815\\uC740 \\uD55C\\uB3C4\\uC5D0 \\uB3C4\\uB2EC\\uD558\\uBA74 \\uC774\\uC804 \\uCE74\\uB4DC\\uB97C \\uC81C\\uAC70\\uD558\\uAE30 \\uC2DC\\uC791\\uD569\\uB2C8\\uB2E4. \\uC774 \\uAC12\\uC744 -1\\uB85C \\uC124\\uC815\\uD558\\uBA74 \\uBCF4\\uAD00\\uD568\\uC774 \\uBB34\\uD55C\\uC815\\uC73C\\uB85C \\uCEE4\\uC9C8 \\uC218 \\uC788\\uC2B5\\uB2C8\\uB2E4.\",\"Display card checkbox\":\"\\uCE74\\uB4DC\\uC5D0 \\uCCB4\\uD06C\\uBC15\\uC2A4 \\uD45C\\uC2DC\",\"When toggled, a checkbox will be displayed with each card\":\"\\uD65C\\uC131\\uD654\\uD558\\uBA74 \\uAC01 \\uCE74\\uB4DC\\uC5D0 \\uCCB4\\uD06C\\uBC15\\uC2A4\\uAC00 \\uD45C\\uC2DC\\uB429\\uB2C8\\uB2E4.\",\"Reset to default\":\"\\uAE30\\uBCF8\\uAC12\\uC73C\\uB85C \\uCD08\\uAE30\\uD654\",\"Date & Time\":\"\\uB0A0\\uC9DC \\uBC0F \\uC2DC\\uAC04\",\"Date trigger\":\"\\uB0A0\\uC9DC \\uC120\\uD0DD\\uAE30 \\uD2B8\\uB9AC\\uAC70\",\"When this is typed, it will trigger the date selector\":\"\\uC774 \\uD14D\\uC2A4\\uD2B8\\uB97C \\uC785\\uB825\\uD558\\uBA74 \\uB0A0\\uC9DC \\uC120\\uD0DD\\uAE30\\uAC00 \\uD45C\\uC2DC\\uB429\\uB2C8\\uB2E4.\",\"Time trigger\":\"\\uC2DC\\uAC04 \\uC120\\uD0DD\\uAE30 \\uD2B8\\uB9AC\\uAC70\",\"When this is typed, it will trigger the time selector\":\"\\uC774 \\uD14D\\uC2A4\\uD2B8\\uB97C \\uC785\\uB825\\uD558\\uBA74 \\uC2DC\\uAC04 \\uC120\\uD0DD\\uAE30\\uAC00 \\uD45C\\uC2DC\\uB429\\uB2C8\\uB2E4.\",\"Date format\":\"\\uB0A0\\uC9DC \\uD615\\uC2DD\",\"This format will be used when saving dates in markdown.\":\"\\uC774 \\uD615\\uC2DD\\uC740 \\uB9C8\\uD06C\\uB2E4\\uC6B4\\uC5D0\\uC11C \\uB0A0\\uC9DC\\uB97C \\uC800\\uC7A5\\uD560 \\uB54C \\uC0AC\\uC6A9\\uB429\\uB2C8\\uB2E4.\",\"For more syntax, refer to\":\"\\uC790\\uC138\\uD55C \\uBB38\\uBC95\\uC740 \\uB2E4\\uC74C\\uC744 \\uCC38\\uC870\\uD558\\uC138\\uC694.\",\"format reference\":\"\\uD615\\uC2DD \\uCC38\\uC870\",\"Your current syntax looks like this\":\"\\uD604\\uC7AC \\uBB38\\uBC95\\uC740 \\uB2E4\\uC74C\\uACFC \\uAC19\\uC2B5\\uB2C8\\uB2E4.\",\"Time format\":\"\\uC2DC\\uAC04 \\uD615\\uC2DD\",\"Date display format\":\"\\uB0A0\\uC9DC \\uD45C\\uC2DC \\uD615\\uC2DD\",\"This format will be used when displaying dates in Kanban cards.\":\"\\uC774 \\uD615\\uC2DD\\uC740 \\uCE74\\uBC18 \\uBCF4\\uB4DC\\uC5D0\\uC11C \\uB0A0\\uC9DC\\uB97C \\uD45C\\uC2DC\\uD560\\uB54C \\uC0AC\\uC6A9\\uB429\\uB2C8\\uB2E4.\",\"Show relative date\":\"\\uB0A0\\uC9DC\\uB97C \\uC0C1\\uB300\\uC801\\uC73C\\uB85C \\uD45C\\uC2DC\",\"Hide card counts in list titles\":\"\\uBAA9\\uB85D \\uC81C\\uBAA9\\uC5D0 \\uCE74\\uB4DC \\uC218 \\uD45C\\uC2DC \\uC228\\uAE30\\uAE30\",\"When toggled, card counts are hidden from the list title\":\"\\uD65C\\uC131\\uD654\\uD558\\uBA74 \\uBAA9\\uB85D \\uC81C\\uBAA9\\uC5D0 \\uCD1D \\uCE74\\uB4DC \\uC218\\uAC00 \\uD45C\\uC2DC\\uB418\\uC9C0 \\uC54A\\uC2B5\\uB2C8\\uB2E4.\",\"Link dates to daily notes\":\"\\uC77C\\uC77C \\uB178\\uD2B8\\uC5D0 \\uB0A0\\uC9DC \\uC5F0\\uACB0\",\"When toggled, dates will link to daily notes. Eg. [[2021-04-26]]\":\"\\uD65C\\uC131\\uD654\\uD558\\uBA74 \\uB0A0\\uC9DC\\uAC00 \\uC77C\\uC77C \\uB178\\uD2B8\\uC5D0 \\uC5F0\\uACB0\\uB429\\uB2C8\\uB2E4. \\uC608: [[2021-04-26]]\",\"Add date and time to archived cards\":\"\\uBCF4\\uAD00\\uB41C \\uCE74\\uB4DC\\uC5D0 \\uB0A0\\uC9DC\\uC640 \\uC2DC\\uAC04 \\uCD94\\uAC00\",\"When toggled, the current date and time will be added to the card title when it is archived. Eg. - [ ] 2021-05-14 10:00am My card title\":\"\\uD65C\\uC131\\uD654\\uD558\\uBA74 \\uCE74\\uB4DC\\uAC00 \\uBCF4\\uAD00\\uB420 \\uB54C \\uD604\\uC7AC \\uB0A0\\uC9DC\\uC640 \\uC2DC\\uAC04\\uC774 \\uCE74\\uB4DC \\uC81C\\uBAA9\\uC5D0 \\uCD94\\uAC00\\uB429\\uB2C8\\uB2E4. \\uC608: - [ ] 2021-05-14 10:00am \\uB0B4 \\uCE74\\uB4DC \\uC81C\\uBAA9\",\"Add archive date/time after card title\":\"\\uCE74\\uB4DC \\uC81C\\uBAA9 \\uB4A4\\uC5D0 \\uBCF4\\uAD00\\uB41C \\uB0A0\\uC9DC/\\uC2DC\\uAC04 \\uCD94\\uAC00\",\"When toggled, the archived date/time will be added after the card title, e.g.- [ ] My card title 2021-05-14 10:00am. By default, it is inserted before the title.\":\"\\uD65C\\uC131\\uD654\\uD558\\uBA74 \\uCE74\\uB4DC \\uC81C\\uBAA9 \\uB4A4\\uC5D0 \\uBCF4\\uAD00\\uB41C \\uB0A0\\uC9DC/\\uC2DC\\uAC04\\uC774 \\uCD94\\uAC00\\uB429\\uB2C8\\uB2E4. \\uC608: - [ ] \\uB0B4 \\uCE74\\uB4DC \\uC81C\\uBAA9 2021-05-14 10:00am. \\uAE30\\uBCF8\\uC801\\uC73C\\uB85C \\uC81C\\uBAA9 \\uC55E\\uC5D0 \\uC0BD\\uC785\\uB429\\uB2C8\\uB2E4.\",\"Archive date/time separator\":\"\\uBCF4\\uAD00\\uB420 \\uCE74\\uB4DC\\uC758 \\uB0A0\\uC9DC/\\uC2DC\\uAC04 \\uAD6C\\uBD84\\uC790\",\"This will be used to separate the archived date/time from the title\":\"\\uC774 \\uAD6C\\uBD84\\uC790\\uB294 \\uCE74\\uB4DC \\uC81C\\uBAA9\\uACFC \\uBCF4\\uAD00\\uB41C \\uB0A0\\uC9DC/\\uC2DC\\uAC04\\uC744 \\uAD6C\\uBD84\\uD558\\uB294\\uB370 \\uC0AC\\uC6A9\\uB429\\uB2C8\\uB2E4.\",\"Archive date/time format\":\"\\uBCF4\\uAD00\\uB41C \\uCE74\\uB4DC\\uC758 \\uB0A0\\uC9DC/\\uC2DC\\uAC04 \\uD615\\uC2DD\",\"Kanban Plugin\":\"\\uCE78\\uBC18 \\uD50C\\uB7EC\\uADF8\\uC778\",\"Tag colors\":\"\\uD0DC\\uADF8 \\uC0C9\\uC0C1 \\uD45C\\uC2DC\",\"Set colors for tags displayed in cards.\":\"\\uCE74\\uB4DC \\uC81C\\uBAA9 \\uC544\\uB798\\uC5D0 \\uD45C\\uC2DC\\uB418\\uB294 \\uD0DC\\uADF8\\uC758 \\uC0C9\\uC0C1\\uC744 \\uC124\\uC815\\uD569\\uB2C8\\uB2E4.\",\"Linked Page Metadata\":\"\\uB9C1\\uD06C\\uB41C \\uD398\\uC774\\uC9C0 \\uBA54\\uD0C0\\uB370\\uC774\\uD130\",\"Display metadata for the first note linked within a card. Specify which metadata keys to display below. An optional label can be provided, and labels can be hidden altogether.\":\"\\uCE74\\uB4DC \\uB0B4\\uC5D0\\uC11C \\uCCAB \\uBC88\\uC9F8\\uB85C \\uB9C1\\uD06C\\uB41C \\uB178\\uD2B8\\uC758 \\uBA54\\uD0C0\\uB370\\uC774\\uD130\\uB97C \\uD45C\\uC2DC\\uD569\\uB2C8\\uB2E4. \\uC544\\uB798\\uC5D0 \\uD45C\\uC2DC\\uD560 \\uBA54\\uD0C0\\uB370\\uC774\\uD130 \\uD0A4\\uB97C \\uC9C0\\uC815\\uD569\\uB2C8\\uB2E4. \\uC120\\uD0DD\\uC801\\uC73C\\uB85C \\uB808\\uC774\\uBE14\\uC744 \\uC81C\\uACF5\\uD560 \\uC218 \\uC788\\uC73C\\uBA70, \\uB808\\uC774\\uBE14\\uC744 \\uC644\\uC804\\uD788 \\uC228\\uAE38 \\uC218 \\uC788\\uC2B5\\uB2C8\\uB2E4.\",\"Board Header Buttons\":\"\\uBCF4\\uB4DC \\uD5E4\\uB354 \\uBC84\\uD2BC\",\"Calendar: first day of week\":\"\\uB2EC\\uB825: \\uCCAB \\uBC88\\uC9F8 \\uC694\\uC77C\",\"Override which day is used as the start of the week\":\"\\uD55C \\uC8FC\\uC758 \\uC2DC\\uC791\\uC73C\\uB85C \\uC0AC\\uC6A9\\uB418\\uB294 \\uC694\\uC77C\\uC744 \\uC7AC\\uC815\\uC758\\uD569\\uB2C8\\uB2E4.\",Sunday:\"\\uC77C\\uC694\\uC77C\",Monday:\"\\uC6D4\\uC694\\uC77C\",Tuesday:\"\\uD654\\uC694\\uC77C\",Wednesday:\"\\uC218\\uC694\\uC77C\",Thursday:\"\\uBAA9\\uC694\\uC77C\",Friday:\"\\uAE08\\uC694\\uC77C\",Saturday:\"\\uD1A0\\uC694\\uC77C\",\"Background color\":\"\\uBC30\\uACBD \\uC0C9\\uC0C1\",Tag:\"\\uD0DC\\uADF8\",\"Text color\":\"\\uAE00\\uC790 \\uC0C9\\uC0C1\",\"Date is\":\"\\uB0A0\\uC9DC\\uB294\",Today:\"\\uC624\\uB298\",\"After now\":\"\\uC774\\uD6C4\",\"Before now\":\"\\uC774\\uC804\",\"Between now and\":\"\\uACFC\\uC758 \\uC0AC\\uC774\",\"Display date colors\":\"\\uB0A0\\uC9DC \\uC0C9\\uC0C1 \\uD45C\\uC2DC\",\"Set colors for dates displayed in cards based on the rules below.\":\"\\uC544\\uB798 \\uCE74\\uB4DC\\uC5D0 \\uD45C\\uC2DC\\uB41C \\uB0A0\\uC9DC\\uC758 \\uC0C9\\uC0C1\\uC744 \\uC544\\uB798\\uC758 \\uADDC\\uCE59\\uC5D0 \\uB530\\uB77C \\uC124\\uC815\\uD558\\uC138\\uC694.\",\"Add date color\":\"\\uB0A0\\uC9DC \\uC0C9\\uC0C1 \\uCD94\\uAC00\",\"Metadata key\":\"\\uBA54\\uD0C0\\uB370\\uC774\\uD130 \\uD0A4\",\"Display label\":\"\\uD45C\\uC2DC\\uB420 \\uB77C\\uBCA8\",\"Hide label\":\"\\uB77C\\uBCA8 \\uC228\\uAE30\\uAE30\",\"Drag to rearrange\":\"\\uB4DC\\uB798\\uADF8\\uD558\\uC5EC \\uC7AC\\uC815\\uB82C\",Delete:\"\\uC0AD\\uC81C\",\"Add key\":\"\\uD0A4 \\uCD94\\uAC00\",\"Field contains markdown\":\"\\uD544\\uB4DC\\uC5D0 \\uB9C8\\uD06C\\uB2E4\\uC6B4\\uC774 \\uD3EC\\uD568\\uB418\\uC5B4 \\uC788\\uC2B5\\uB2C8\\uB2E4.\",\"Add tag color\":\"\\uD0DC\\uADF8 \\uC0C9\\uC0C1 \\uCD94\\uAC00\",\"More options\":\"\\uB354 \\uB9CE\\uC740 \\uC635\\uC158\",Cancel:\"\\uCDE8\\uC18C\",today:\"\\uC624\\uB298\",yesterday:\"\\uC5B4\\uC81C\",tomorrow:\"\\uB0B4\\uC77C\",\"Change date\":\"\\uB0A0\\uC9DC \\uBCC0\\uACBD\",\"Change time\":\"\\uC2DC\\uAC04 \\uBCC0\\uACBD\",\"Card title...\":\"\\uCE74\\uB4DC \\uC81C\\uBAA9...\",\"Add card\":\"\\uCE74\\uB4DC \\uCD94\\uAC00\",\"Add a card\":\"\\uCE74\\uB4DC \\uCD94\\uAC00\",\"Edit card\":\"\\uCE74\\uB4DC \\uC218\\uC815\",\"New note from card\":\"\\uCE74\\uB4DC\\uC5D0\\uC11C \\uC0C8 \\uB178\\uD2B8 \\uB9CC\\uB4E4\\uAE30\",\"Archive card\":\"\\uCE74\\uB4DC \\uBCF4\\uAD00\",\"Delete card\":\"\\uCE74\\uB4DC \\uC0AD\\uC81C\",\"Edit date\":\"\\uB0A0\\uC9DC \\uC218\\uC815\",\"Add date\":\"\\uB0A0\\uC9DC \\uCD94\\uAC00\",\"Remove date\":\"\\uB0A0\\uC9DC \\uC0AD\\uC81C\",\"Edit time\":\"\\uC2DC\\uAC04 \\uC218\\uC815\",\"Add time\":\"\\uC2DC\\uAC04 \\uCD94\\uAC00\",\"Remove time\":\"\\uC2DC\\uAC04 \\uC0AD\\uC81C\",\"Duplicate card\":\"\\uCE74\\uB4DC \\uBCF5\\uC81C\",\"Split card\":\"\\uCE74\\uB4DC \\uBD84\\uD560\",\"Copy link to card\":\"\\uCE74\\uB4DC \\uB9C1\\uD06C \\uBCF5\\uC0AC\",\"Insert card before\":\"\\uCE74\\uB4DC \\uC704\\uC5D0 \\uC0BD\\uC785\",\"Insert card after\":\"\\uCE74\\uB4DC \\uC544\\uB798\\uC5D0 \\uC0BD\\uC785\",\"Add label\":\"\\uB77C\\uBCA8 \\uCD94\\uAC00\",\"Move to top\":\"\\uB9E8 \\uC704\\uB85C \\uC774\\uB3D9\",\"Move to bottom\":\"\\uB9E8 \\uC544\\uB798\\uB85C \\uC774\\uB3D9\",\"Enter list title...\":\"\\uBAA9\\uB85D \\uC81C\\uBAA9 \\uC785\\uB825...\",\"Mark cards in this list as complete\":\"\\uC774 \\uBAA9\\uB85D\\uC758 \\uCE74\\uB4DC\\uB97C \\uC644\\uB8CC\\uB428\\uC73C\\uB85C \\uD45C\\uC2DC\",\"Add list\":\"\\uBAA9\\uB85D \\uCD94\\uAC00\",\"Add a list\":\"\\uBAA9\\uB85D \\uCD94\\uAC00\",\"Move list\":\"\\uBAA9\\uB85D \\uC774\\uB3D9\",Close:\"\\uB2EB\\uAE30\",\"Are you sure you want to delete this list and all its cards?\":\"\\uC815\\uB9D0\\uB85C \\uC774 \\uBAA9\\uB85D\\uACFC \\uADF8 \\uC548\\uC758 \\uBAA8\\uB4E0 \\uCE74\\uB4DC\\uB97C \\uC0AD\\uC81C\\uD558\\uC2DC\\uACA0\\uC2B5\\uB2C8\\uAE4C?\",\"Yes, delete list\":\"\\uB124, \\uBAA9\\uB85D\\uC744 \\uC0AD\\uC81C\\uD569\\uB2C8\\uB2E4.\",\"Are you sure you want to archive this list and all its cards?\":\"\\uC815\\uB9D0\\uB85C \\uC774 \\uBAA9\\uB85D\\uACFC \\uADF8 \\uC548\\uC758 \\uBAA8\\uB4E0 \\uCE74\\uB4DC\\uB97C \\uBCF4\\uAD00\\uD558\\uC2DC\\uACA0\\uC2B5\\uB2C8\\uAE4C?\",\"Yes, archive list\":\"\\uB124, \\uBAA8\\uB450 \\uBCF4\\uAD00\\uD569\\uB2C8\\uB2E4.\",\"Are you sure you want to archive all cards in this list?\":\"\\uC815\\uB9D0\\uB85C \\uC774 \\uBAA9\\uB85D\\uC758 \\uBAA8\\uB4E0 \\uCE74\\uB4DC\\uB97C \\uBCF4\\uAD00\\uD558\\uC2DC\\uACA0\\uC2B5\\uB2C8\\uAE4C?\",\"Yes, archive cards\":\"\\uB124, \\uBAA8\\uB450 \\uBCF4\\uAD00\\uD569\\uB2C8\\uB2E4.\",\"Edit list\":\"\\uBAA9\\uB85D \\uC218\\uC815\",\"Archive cards\":\"\\uCE74\\uB4DC \\uBCF4\\uAD00\",\"Archive list\":\"\\uBAA9\\uB85D \\uBCF4\\uAD00\",\"Delete list\":\"\\uBAA9\\uB85D \\uC0AD\\uC81C\",\"Insert list before\":\"\\uBAA9\\uB85D\\uC744 \\uC67C\\uCABD\\uC5D0 \\uC0DD\\uC131\",\"Insert list after\":\"\\uBAA9\\uB85D\\uC744 \\uC624\\uB978\\uCABD\\uC5D0 \\uC0DD\\uC131\",\"Sort by card text\":\"\\uB0B4\\uC6A9\\uC73C\\uB85C \\uC815\\uB82C\",\"Sort by date\":\"\\uB0A0\\uC9DC\\uC21C\\uC73C\\uB85C \\uC815\\uB82C\",\"Unable to find\":\"\\uCC3E\\uC744 \\uC218 \\uC5C6\\uC2B5\\uB2C8\\uB2E4.\",\"Open in default app\":\"\\uAE30\\uBCF8 \\uC571\\uC73C\\uB85C \\uC5F4\\uAE30\",Submit:\"\\uD655\\uC778\"},nb=yA;var vA={},rb=vA;var wA={},ib=wA;var bA={},ab=bA;var DA={},ob=DA;var SA={\"Create new board\":\"Criar um novo quadro\",\"Archive completed cards in active board\":\"Arquivar cart\\xF5es conclu\\xEDdos no quadro ativo\",\"Error: current file is not a Kanban board\":\"Erro: o arquivo atual n\\xE3o \\xE9 um quadro Kanban\",\"Convert empty note to Kanban\":\"Converter nota vazia em Kanban\",\"Error: cannot create Kanban, the current note is not empty\":\"Erro: n\\xE3o \\xE9 poss\\xEDvel criar o quadro Kanban, a nota atual n\\xE3o est\\xE1 vazia\",\"Untitled Kanban\":\"Kanban sem t\\xEDtulo\",\"Toggle between Kanban and markdown mode\":\"Alternar entre os modos Kanban e Markdown\",\"Open as markdown\":\"Abrir como markdown\",\"Open board settings\":\"Abrir configura\\xE7\\xF5es do quadro Kanban\",\"Archive completed cards\":\"Arquivar cart\\xF5es conclu\\xEDdos\",Complete:\"Conclu\\xEDdo\",Archive:\"Arquivado\",\"Note: No template plugins are currently enabled.\":\"Nota: N\\xE3o h\\xE1 plug-ins de modelo habilitados no momento.\",default:\"padr\\xE3o\",\"Search...\":\"Pesquisar...\",\"These settings will take precedence over the default Kanban board settings.\":\"Essas configura\\xE7\\xF5es sobrescrever\\xE3o as configura\\xE7\\xF5es padr\\xE3o do quadro Kanban\",\"Set the default Kanban board settings. Settings can be overridden on a board-by-board basis.\":\"Defina as configura\\xE7\\xF5es padr\\xE3o do quadro Kanban. Cada quadro Kanban pode ter sua pr\\xF3pria configura\\xE7\\xE3o.\",\"Note template\":\"Modelo de nota\",\"This template will be used when creating new notes from Kanban cards.\":\"Este modelo ser\\xE1 usado quando uma nova nota Kanban for criada.\",\"No template\":\"Sem modelo\",\"Note folder\":\"Pasta de notas\",\"Notes created from Kanban cards will be placed in this folder. If blank, they will be placed in the default location for this vault.\":\"As notas criadas pelos links dos cart\\xF5es Kanban ser\\xE3o colocadas nesta pasta. Se estiver em branco, ser\\xE3o colocadas no local configurado como padr\\xE3o deste cofre.\",\"Default folder\":\"Pasta padr\\xE3o\",\"Maximum number of archived cards\":\"Quantidade m\\xE1xima de cart\\xF5es arquivados\",\"Archived cards can be viewed in markdown mode. This setting will begin removing old cards once the limit is reached. Setting this value to -1 will allow a board's archive to grow infinitely.\":\"Os cart\\xF5es arquivados podem ser vistos no modo Markdown. Esta configura\\xE7\\xE3o excluir\\xE1 os cart\\xF5es antigos assim que o limite for atingido. Inserir o valor -1 retira o limite para cart\\xF5es arquivados.\",\"Display card checkbox\":\"Exibe uma caixa de sele\\xE7\\xE3o do cart\\xE3o\",\"When toggled, a checkbox will be displayed with each card\":\"Quando ativada, uma caixa de sele\\xE7\\xE3o ser\\xE1 exibida em cada cart\\xE3o.\",\"Reset to default\":\"Redefinir configura\\xE7\\xF5es padr\\xE3o\",\"Date & Time\":\"Data e Hora\",\"Date trigger\":\"Gatilho de data\",\"When this is typed, it will trigger the date selector\":\"Quando este caractere \\xE9 digitado, o seletor de data \\xE9 exibido.\",\"Time trigger\":\"Gatilho de hora\",\"When this is typed, it will trigger the time selector\":\"Quando este caractere \\xE9 digitado, o seletor de hora \\xE9 exibido.\",\"Date format\":\"Formado da data\",\"This format will be used when saving dates in markdown.\":\"Este formato ser\\xE1 usado quando datas forem armazenadas no Markdown.\",\"For more syntax, refer to\":\"Para mais informa\\xE7\\xF5es sobre esta sintaxe, consulte os\",\"format reference\":\"modelos de formato.\",\"Your current syntax looks like this\":\"Sua atual sintaxe est\\xE1 assim\",\"Time format\":\"Formato da hora\",\"Date display format\":\"Formato de exibi\\xE7\\xE3o da data\",\"This format will be used when displaying dates in Kanban cards.\":\"Este ser\\xE1 o formato das datas exibido nos cart\\xF5es do Kanban.\",\"Show relative date\":\"Exibir datas relativas\",\"Link dates to daily notes\":\"Vincular datas a notas di\\xE1rias\",\"When toggled, dates will link to daily notes. Eg. [[2021-04-26]]\":\"Ao ativar, as datas ser\\xE3o vinculadas \\xE0s notas di\\xE1rias. Ex.: [[2021-04-26]]\",\"Add date and time to archived cards\":\"Adicionar data e hora aos cart\\xF5es arquivados\",\"When toggled, the current date and time will be added to the card title when it is archived. Eg. - [ ] 2021-05-14 10:00am My card title\":\"Quando ativada, a data e a hora atuais ser\\xE3o adicionadas ao in\\xEDcio de um cart\\xE3o quando ele for arquivado. Ex.: - [] 2021-05-14 10:00 T\\xEDtulo do meu cart\\xE3o\",\"Archive date/time separator\":\"Separador de data/hora do arquivo\",\"This will be used to separate the archived date/time from the title\":\"Isso ser\\xE1 usado para separar a data/hora arquivada do t\\xEDtulo.\",\"Archive date/time format\":\"Formato de data/hora do arquivo\",\"Kanban Plugin\":\"Plugin Kanban\",\"Linked Page Metadata\":\"Metadados de p\\xE1ginas 'lincadas'\",\"Display metadata for the first note linked within a card. Specify which metadata keys to display below. An optional label can be provided, and labels can be hidden altogether.\":\"Exibe metadados para a primeira nota 'lincada' em um cart\\xE3o. Especifique abaixo quais metadados ser\\xE3o exibidos. Um r\\xF3tulo opcional pode ser fornecido e os r\\xF3tulos podem ser ocultados completamente.\",\"Metadata key\":\"Metadado\",\"Display label\":\"Descri\\xE7\\xE3o personalizada\",\"Hide label\":\"Ocultar\",\"Drag to rearrange\":\"Arraste para reorganizar\",Delete:\"Excluir\",\"Add key\":\"Adicionar metadado\",\"More options\":\"Mais op\\xE7\\xF5es\",Cancel:\"Cancelar\",today:\"hoje\",yesterday:\"ontem\",tomorrow:\"amanh\\xE3\",\"Change date\":\"Alterar data\",\"Change time\":\"Mudar hora\",\"Card title...\":\"T\\xEDtulo do item...\",\"Add card\":\"Adicionar Item\",\"Add a card\":\"Adicione um cart\\xE3o\",\"Edit card\":\"Editar cart\\xE3o\",\"New note from card\":\"Nova nota do cart\\xE3o\",\"Archive card\":\"Arquivar cart\\xE3o\",\"Delete card\":\"Excluir cart\\xE3o\",\"Edit date\":\"Editar data\",\"Add date\":\"Adicionar data\",\"Remove date\":\"Remover data\",\"Edit time\":\"Editar hora\",\"Add time\":\"Adicionar hora\",\"Remove time\":\"Remover hora\",\"Duplicate card\":\"Duplicate card\",\"Enter list title...\":\"Insira o t\\xEDtulo da lista...\",\"Mark cards in this list as complete\":\"Marcar os itens nesta lista como conclu\\xEDdos\",\"Add list\":\"Adicionar lista\",\"Add a list\":\"Adicionar uma lista\",\"Move list\":\"Mover lista\",Close:\"Fechar\",\"Are you sure you want to delete this list and all its cards?\":\"Tem certeza de que deseja excluir esta lista e todos os seus cart\\xF5es?\",\"Yes, delete list\":\"Sim, excluir esta lista\",\"Are you sure you want to archive this list and all its cards?\":\"Tem certeza de que deseja arquivar esta lista e todos os seus cart\\xF5es?\",\"Yes, archive list\":\"Sim, arquivar esta lista\",\"Are you sure you want to archive all cards in this list?\":\"Tem certeza de que deseja arquivar todos os cart\\xF5es desta lista?\",\"Yes, archive cards\":\"Sim, arquivar cart\\xF5es\",\"Edit list\":\"Editar lista\",\"Archive cards\":\"Arquivar cart\\xF5es\",\"Archive list\":\"Arquivar lista\",\"Delete list\":\"Excluir lista\"},sb=SA;var EA={},lb=EA;var kA={\"Open as kanban board\":\"\\u041E\\u0442\\u043A\\u0440\\u044B\\u0442\\u044C \\u043A\\u0430\\u043A Kanban-\\u0434\\u043E\\u0441\\u043A\\u0443\",\"Create new board\":\"\\u0421\\u043E\\u0437\\u0434\\u0430\\u0442\\u044C \\u043D\\u043E\\u0432\\u0443\\u044E \\u0434\\u043E\\u0441\\u043A\\u0443\",\"Archive completed cards in active board\":\"\\u0410\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u0437\\u0430\\u0432\\u0435\\u0440\\u0448\\u0451\\u043D\\u043D\\u044B\\u0435 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438 \\u0432 \\u0430\\u043A\\u0442\\u0438\\u0432\\u043D\\u043E\\u0439 \\u0434\\u043E\\u0441\\u043A\\u0435\",\"Error: current file is not a Kanban board\":\"\\u041E\\u0448\\u0438\\u0431\\u043A\\u0430: \\u0442\\u0435\\u043A\\u0443\\u0449\\u0438\\u0439 \\u0444\\u0430\\u0439\\u043B \\u043D\\u0435 \\u044F\\u0432\\u043B\\u044F\\u0435\\u0442\\u0441\\u044F Kanban-\\u0434\\u043E\\u0441\\u043A\\u043E\\u0439\",\"Convert empty note to Kanban\":\"\\u041A\\u043E\\u043D\\u0432\\u0435\\u0440\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u043F\\u0443\\u0441\\u0442\\u0443\\u044E \\u0437\\u0430\\u043C\\u0435\\u0442\\u043A\\u0443 \\u0432 Kanban\",\"Error: cannot create Kanban, the current note is not empty\":\"\\u041E\\u0448\\u0438\\u0431\\u043A\\u0430: \\u043D\\u0435\\u0432\\u043E\\u0437\\u043C\\u043E\\u0436\\u043D\\u043E \\u0441\\u043E\\u0437\\u0434\\u0430\\u0442\\u044C Kanban, \\u0442\\u0435\\u043A\\u0443\\u0449\\u0430\\u044F \\u0437\\u0430\\u043C\\u0435\\u0442\\u043A\\u0430 \\u043D\\u0435 \\u043F\\u0443\\u0441\\u0442\\u0430\",\"New kanban board\":\"\\u041D\\u043E\\u0432\\u0430\\u044F Kanban-\\u0434\\u043E\\u0441\\u043A\\u0430\",\"Untitled Kanban\":\"\\u0411\\u0435\\u0437\\u044B\\u043C\\u044F\\u043D\\u043D\\u0430\\u044F Kanban-\\u0434\\u043E\\u0441\\u043A\\u0430\",\"Toggle between Kanban and markdown mode\":\"\\u041F\\u0435\\u0440\\u0435\\u043A\\u043B\\u044E\\u0447\\u0438\\u0442\\u044C\\u0441\\u044F \\u043C\\u0435\\u0436\\u0434\\u0443 Kanban \\u0438 markdown \\u0440\\u0435\\u0436\\u0438\\u043C\\u0430\\u043C\\u0438\",\"Open as markdown\":\"\\u041E\\u0442\\u043A\\u0440\\u044B\\u0442\\u044C \\u043A\\u0430\\u043A markdown\",\"Open board settings\":\"\\u041E\\u0442\\u043A\\u0440\\u044B\\u0442\\u044C \\u043D\\u0430\\u0441\\u0442\\u0440\\u043E\\u0439\\u043A\\u0438 \\u0434\\u043E\\u0441\\u043A\\u0438\",\"Archive completed cards\":\"\\u0410\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u0437\\u0430\\u0432\\u0435\\u0440\\u0448\\u0451\\u043D\\u043D\\u044B\\u0435 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438\",\"Something went wrong\":\"\\u0427\\u0442\\u043E-\\u0442\\u043E \\u043F\\u043E\\u0448\\u043B\\u043E \\u043D\\u0435 \\u0442\\u0430\\u043A\",\"You may wish to open as markdown and inspect or edit the file.\":\"\\u0412\\u044B \\u043C\\u043E\\u0436\\u0435\\u0442\\u0435 \\u043E\\u0442\\u043A\\u0440\\u044B\\u0442\\u044C \\u0444\\u0430\\u0439\\u043B \\u043A\\u0430\\u043A markdown \\u0438 \\u043F\\u0440\\u043E\\u0432\\u0435\\u0440\\u0438\\u0442\\u044C \\u0438\\u043B\\u0438 \\u043E\\u0442\\u0440\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u0435\\u0433\\u043E.\",\"Are you sure you want to archive all completed cards on this board?\":\"\\u0412\\u044B \\u0443\\u0432\\u0435\\u0440\\u0435\\u043D\\u044B, \\u0447\\u0442\\u043E \\u0445\\u043E\\u0442\\u0438\\u0442\\u0435 \\u0430\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u0432\\u0441\\u0435 \\u0437\\u0430\\u0432\\u0435\\u0440\\u0448\\u0451\\u0451\\u043D\\u043D\\u044B\\u0435 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438 \\u0432 \\u044D\\u0442\\u043E\\u0439 \\u0434\\u043E\\u0441\\u043A\\u0435?\",Complete:\"\\u0412\\u044B\\u043F\\u043E\\u043B\\u043D\\u0435\\u043D\\u043E\",Archive:\"\\u0410\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C\",\"Invalid Kanban file: problems parsing frontmatter\":\"\\u041D\\u0435\\u0432\\u0435\\u0440\\u043D\\u044B\\u0439 \\u0444\\u0430\\u0439\\u043B Kanban: \\u043D\\u0435 \\u0443\\u0434\\u0430\\u0451\\u0442\\u0441\\u044F \\u043F\\u0430\\u0440\\u0441\\u0438\\u043D\\u0433 frontmatter\",\"I don't know how to interpret this line:\":\"\\u042F \\u043D\\u0435 \\u0437\\u043D\\u0430\\u044E, \\u043A\\u0430\\u043A \\u0438\\u043D\\u0442\\u0435\\u0440\\u043F\\u0440\\u0435\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u044D\\u0442\\u0443 \\u0441\\u0442\\u0440\\u043E\\u043A\\u0443:\",Untitled:\"\\u0411\\u0435\\u0437 \\u0438\\u043C\\u0435\\u043D\\u0438\",\"Note: No template plugins are currently enabled.\":\"\\u041F\\u0440\\u0438\\u043C\\u0435\\u0447\\u0430\\u043D\\u0438\\u0435: \\u0412 \\u043D\\u0430\\u0441\\u0442\\u043E\\u044F\\u0449\\u0435\\u0435 \\u0432\\u0440\\u0435\\u043C\\u044F \\u043D\\u0438 \\u043E\\u0434\\u0438\\u043D \\u043F\\u043B\\u0430\\u0433\\u0438\\u043D \\u0448\\u0430\\u0431\\u043B\\u043E\\u043D\\u0430 \\u043D\\u0435 \\u0432\\u043A\\u043B\\u044E\\u0447\\u0435\\u043D.\",default:\"\\u043F\\u043E \\u0443\\u043C\\u043E\\u043B\\u0447\\u0430\\u043D\\u0438\\u044E\",\"Search...\":\"\\u041D\\u0430\\u0439\\u0442\\u0438...\",\"New line trigger\":\"\\u0422\\u0440\\u0438\\u0433\\u0433\\u0435\\u0440 \\u043D\\u043E\\u0432\\u043E\\u0439 \\u0441\\u0442\\u0440\\u043E\\u043A\\u0438\",\"Select whether Enter or Shift+Enter creates a new line. The opposite of what you choose will create and complete editing of cards and lists.\":\"\\u0412\\u044B\\u0431\\u0435\\u0440\\u0438\\u0442\\u0435, \\u0431\\u0443\\u0434\\u0435\\u0442 \\u043B\\u0438 \\u0441\\u043E\\u0437\\u0434\\u0430\\u0432\\u0430\\u0442\\u044C\\u0441\\u044F \\u043D\\u043E\\u0432\\u0430\\u044F \\u0441\\u0442\\u0440\\u043E\\u043A\\u0430 \\u0441 \\u043F\\u043E\\u043C\\u043E\\u0449\\u044C\\u044E Enter \\u0438\\u043B\\u0438 Shift+Enter. \\u041F\\u0440\\u043E\\u0442\\u0438\\u0432\\u043E\\u043F\\u043E\\u043B\\u043E\\u0436\\u043D\\u043E\\u0441\\u0442\\u044C \\u0442\\u043E\\u043C\\u0443, \\u0447\\u0442\\u043E \\u0432\\u044B \\u0432\\u044B\\u0431\\u0435\\u0440\\u0435\\u0442\\u0435, \\u043F\\u043E\\u0437\\u0432\\u043E\\u043B\\u0438\\u0442 \\u0441\\u043E\\u0437\\u0434\\u0430\\u0442\\u044C \\u0438 \\u0437\\u0430\\u0432\\u0435\\u0440\\u0448\\u0438\\u0442\\u044C \\u0440\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u0435 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u0435\\u043A \\u0438 \\u0441\\u043F\\u0438\\u0441\\u043A\\u043E\\u0432.\",\"Shift + Enter\":\"Shift + Enter\",Enter:\"Enter\",\"Prepend / append new cards\":\"\\u041F\\u043E\\u043B\\u043E\\u0436\\u0435\\u043D\\u0438\\u0435 \\u043D\\u043E\\u0432\\u044B\\u0445 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u0435\\u043A\",\"This setting controls whether new cards are added to the beginning or end of the list.\":\"\\u042D\\u0442\\u0430 \\u043D\\u0430\\u0441\\u0442\\u0440\\u043E\\u0439\\u043A\\u0430 \\u0443\\u043F\\u0440\\u0430\\u0432\\u043B\\u044F\\u0435\\u0442 \\u043F\\u043E\\u043B\\u043E\\u0436\\u0435\\u043D\\u0438\\u0435\\u043C \\u043D\\u043E\\u0432\\u044B\\u0445 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u0435\\u043A, \\u0432 \\u043D\\u0430\\u0447\\u0430\\u043B\\u0435 \\u0438\\u043B\\u0438 \\u0432 \\u043A\\u043E\\u043D\\u0446\\u0435 \\u0441\\u043F\\u0438\\u0441\\u043A\\u0430.\",Prepend:\"\\u0412 \\u043D\\u0430\\u0447\\u0430\\u043B\\u0435\",\"Prepend (compact)\":\"\\u0412 \\u043D\\u0430\\u0447\\u0430\\u043B\\u0435 (\\u043A\\u043E\\u043C\\u043F\\u0430\\u043A\\u0442\\u043D\\u043E)\",Append:\"\\u0412 \\u043A\\u043E\\u043D\\u0446\\u0435\",\"These settings will take precedence over the default Kanban board settings.\":\"\\u042D\\u0442\\u0438 \\u043D\\u0430\\u0441\\u0442\\u0440\\u043E\\u0439\\u043A\\u0438 \\u0431\\u0443\\u0434\\u0443\\u0442 \\u0438\\u043C\\u0435\\u0442\\u044C \\u043F\\u0440\\u0438\\u043E\\u0440\\u0438\\u0442\\u0435\\u0442 \\u043D\\u0430\\u0434 \\u043D\\u0430\\u0441\\u0442\\u0440\\u043E\\u0439\\u043A\\u0430\\u043C\\u0438 \\u0434\\u043E\\u0441\\u043A\\u0438 Kanban \\u043F\\u043E \\u0443\\u043C\\u043E\\u043B\\u0447\\u0430\\u043D\\u0438\\u044E.\",\"Set the default Kanban board settings. Settings can be overridden on a board-by-board basis.\":\"\\u0423\\u0441\\u0442\\u0430\\u043D\\u043E\\u0432\\u0438\\u0442\\u0435 \\u043D\\u0430\\u0441\\u0442\\u0440\\u043E\\u0439\\u043A\\u0438 \\u0434\\u043E\\u0441\\u043A\\u0438 Kanban \\u043F\\u043E \\u0443\\u043C\\u043E\\u043B\\u0447\\u0430\\u043D\\u0438\\u044E. \\u041D\\u0430\\u0441\\u0442\\u0440\\u043E\\u0439\\u043A\\u0438 \\u043C\\u043E\\u0436\\u043D\\u043E \\u043F\\u0435\\u0440\\u0435\\u043E\\u043F\\u0440\\u0435\\u0434\\u0435\\u043B\\u0438\\u0442\\u044C \\u0434\\u043B\\u044F \\u043A\\u0430\\u0436\\u0434\\u043E\\u0439 \\u0434\\u043E\\u0441\\u043A\\u0438.\",\"Note template\":\"\\u0428\\u0430\\u0431\\u043B\\u043E\\u043D \\u0437\\u0430\\u043C\\u0435\\u0442\\u043A\\u0438\",\"This template will be used when creating new notes from Kanban cards.\":\"\\u042D\\u0442\\u043E\\u0442 \\u0448\\u0430\\u0431\\u043B\\u043E\\u043D \\u0431\\u0443\\u0434\\u0435\\u0442 \\u0438\\u0441\\u043F\\u043E\\u043B\\u044C\\u0437\\u043E\\u0432\\u0430\\u0442\\u044C\\u0441\\u044F \\u043F\\u0440\\u0438 \\u0441\\u043E\\u0437\\u0434\\u0430\\u043D\\u0438\\u0438 \\u043D\\u043E\\u0432\\u044B\\u0445 \\u0437\\u0430\\u043C\\u0435\\u0442\\u043E\\u043A \\u0438\\u0437 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u0435\\u043A Kanban.\",\"No template\":\"\\u041D\\u0435\\u0442 \\u0448\\u0430\\u0431\\u043B\\u043E\\u043D\\u0430\",\"Note folder\":\"\\u0414\\u0438\\u0440\\u0435\\u043A\\u0442\\u043E\\u0440\\u0438\\u044F \\u0437\\u0430\\u043C\\u0435\\u0442\\u043E\\u043A\",\"Notes created from Kanban cards will be placed in this folder. If blank, they will be placed in the default location for this vault.\":\"\\u0412 \\u044D\\u0442\\u0443 \\u043F\\u0430\\u043F\\u043A\\u0443 \\u0431\\u0443\\u0434\\u0443\\u0442 \\u043F\\u043E\\u043C\\u0435\\u0449\\u0435\\u043D\\u044B \\u0437\\u0430\\u043C\\u0435\\u0442\\u043A\\u0438, \\u0441\\u043E\\u0437\\u0434\\u0430\\u043D\\u043D\\u044B\\u0435 \\u0438\\u0437 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u0435\\u043A Kanban. \\u0415\\u0441\\u043B\\u0438 \\u043F\\u043E\\u043B\\u0435 \\u043F\\u0443\\u0441\\u0442\\u043E\\u0435, \\u043E\\u043D\\u0438 \\u0431\\u0443\\u0434\\u0443\\u0442 \\u043F\\u043E\\u043C\\u0435\\u0449\\u0435\\u043D\\u044B \\u0432 \\u043F\\u0430\\u043F\\u043A\\u0443 \\u043F\\u043E \\u0443\\u043C\\u043E\\u043B\\u0447\\u0430\\u043D\\u0438\\u044E \\u0434\\u043B\\u044F \\u044D\\u0442\\u043E\\u0433\\u043E \\u0445\\u0440\\u0430\\u043D\\u0438\\u043B\\u0438\\u0449\\u0430.\",\"Default folder\":\"\\u0414\\u0438\\u0440\\u0435\\u043A\\u0442\\u043E\\u0440\\u0438\\u044F \\u043F\\u043E \\u0443\\u043C\\u043E\\u043B\\u0447\\u0430\\u043D\\u0438\\u044E\",\"List width\":\"\\u0428\\u0438\\u0440\\u0438\\u043D\\u0430 \\u0441\\u043F\\u0438\\u0441\\u043A\\u0430\",\"Enter a number to set the list width in pixels.\":\"\\u0412\\u0432\\u0435\\u0434\\u0438\\u0442\\u0435 \\u0447\\u0438\\u0441\\u043B\\u043E, \\u0447\\u0442\\u043E\\u0431\\u044B \\u0443\\u0441\\u0442\\u0430\\u043D\\u043E\\u0432\\u0438\\u0442\\u044C \\u0448\\u0438\\u0440\\u0438\\u043D\\u0443 \\u0441\\u043F\\u0438\\u0441\\u043A\\u0430 \\u0432 \\u043F\\u0438\\u043A\\u0441\\u0435\\u043B\\u044F\\u0445.\",\"Maximum number of archived cards\":\"\\u041C\\u0430\\u043A\\u0441\\u0438\\u043C\\u0430\\u043B\\u044C\\u043D\\u043E\\u0435 \\u043A\\u043E\\u043B\\u0438\\u0447\\u0435\\u0441\\u0442\\u0432\\u043E \\u0430\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u043D\\u044B\\u0445 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u0435\\u043A\",\"Archived cards can be viewed in markdown mode. This setting will begin removing old cards once the limit is reached. Setting this value to -1 will allow a board's archive to grow infinitely.\":\"\\u0410\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u043D\\u044B\\u0435 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438 \\u043C\\u043E\\u0436\\u043D\\u043E \\u043F\\u0440\\u043E\\u0441\\u043C\\u043E\\u0442\\u0440\\u0435\\u0442\\u044C \\u0432 \\u0440\\u0435\\u0436\\u0438\\u043C\\u0435 markdown. \\u042D\\u0442\\u0430 \\u043D\\u0430\\u0441\\u0442\\u0440\\u043E\\u0439\\u043A\\u0430 \\u043D\\u0430\\u0447\\u043D\\u0435\\u0442 \\u0443\\u0434\\u0430\\u043B\\u044F\\u0442\\u044C \\u0441\\u0442\\u0430\\u0440\\u044B\\u0435 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438 \\u043F\\u043E\\u0441\\u043B\\u0435 \\u0434\\u043E\\u0441\\u0442\\u0438\\u0436\\u0435\\u043D\\u0438\\u044F \\u043B\\u0438\\u043C\\u0438\\u0442\\u0430. \\u0423\\u0441\\u0442\\u0430\\u043D\\u043E\\u0432\\u043A\\u0430 \\u044D\\u0442\\u043E\\u0433\\u043E \\u0437\\u043D\\u0430\\u0447\\u0435\\u043D\\u0438\\u044F \\u043D\\u0430 -1 \\u043F\\u043E\\u0437\\u0432\\u043E\\u043B\\u0438\\u0442 \\u0430\\u0440\\u0445\\u0438\\u0432\\u0443 \\u0434\\u043E\\u0441\\u043A\\u0438 \\u0440\\u0430\\u0441\\u0442\\u0438 \\u0431\\u0435\\u0441\\u043A\\u043E\\u043D\\u0435\\u0447\\u043D\\u043E.\",\"Display card checkbox\":\"\\u041F\\u043E\\u043A\\u0430\\u0437\\u044B\\u0432\\u0430\\u0442\\u044C \\u0444\\u043B\\u0430\\u0436\\u043E\\u043A \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438\",\"When toggled, a checkbox will be displayed with each card\":\"\\u041A\\u043E\\u0433\\u0434\\u0430 \\u0432\\u043A\\u043B\\u044E\\u0447\\u0435\\u043D\\u043E, \\u0434\\u043B\\u044F \\u043A\\u0430\\u0436\\u0434\\u043E\\u0439 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438 \\u0431\\u0443\\u0434\\u0435\\u0442 \\u043F\\u043E\\u043A\\u0430\\u0437\\u0430\\u043D \\u0444\\u043B\\u0430\\u0436\\u043E\\u043A\",\"Reset to default\":\"\\u0421\\u0431\\u0440\\u043E\\u0441\\u0438\\u0442\\u044C \\u043D\\u0430\\u0441\\u0442\\u0440\\u043E\\u0439\\u043A\\u0438\",\"Date & Time\":\"\\u0414\\u0430\\u0442\\u0430 \\u0438 \\u0432\\u0440\\u0435\\u043C\\u044F\",\"Date trigger\":\"\\u0422\\u0440\\u0438\\u0433\\u0433\\u0435\\u0440 \\u0434\\u0430\\u0442\\u044B\",\"When this is typed, it will trigger the date selector\":\"\\u0412\\u0432\\u043E\\u0434 \\u0430\\u043A\\u0442\\u0438\\u0432\\u0438\\u0440\\u0443\\u0435\\u0442 \\u0432\\u044B\\u0431\\u043E\\u0440 \\u0434\\u0430\\u0442\\u044B\",\"Time trigger\":\"\\u0422\\u0440\\u0438\\u0433\\u0433\\u0435\\u0440 \\u0432\\u0440\\u0435\\u043C\\u0435\\u043D\\u0438\",\"When this is typed, it will trigger the time selector\":\"\\u0412\\u0432\\u043E\\u0434 \\u0430\\u043A\\u0442\\u0438\\u0432\\u0438\\u0440\\u0443\\u0435\\u0442 \\u0432\\u044B\\u0431\\u043E\\u0440 \\u0432\\u0440\\u0435\\u043C\\u0435\\u043D\\u0438\",\"Date format\":\"\\u0424\\u043E\\u0440\\u043C\\u0430\\u0442 \\u0434\\u0430\\u0442\\u044B\",\"This format will be used when saving dates in markdown.\":\"\\u042D\\u0442\\u043E\\u0442 \\u0444\\u043E\\u0440\\u043C\\u0430\\u0442 \\u0431\\u0443\\u0434\\u0435\\u0442 \\u0438\\u0441\\u043F\\u043E\\u043B\\u044C\\u0437\\u043E\\u0432\\u0430\\u043D \\u043F\\u0440\\u0438 \\u0441\\u043E\\u0445\\u0440\\u0430\\u043D\\u0435\\u043D\\u0438\\u0438 \\u0434\\u0430\\u0442 \\u0432 markdown.\",\"For more syntax, refer to\":\"\\u041F\\u043E\\u043B\\u043D\\u044B\\u0439 \\u0441\\u0438\\u043D\\u0442\\u0430\\u043A\\u0441\\u0438\\u0441 \\u0441\\u043C\\u043E\\u0442\\u0440\\u0438\\u0442\\u0435 \\u043D\\u0430\",\"format reference\":\"\\u0441\\u043F\\u0440\\u0430\\u0432\\u043A\\u0430 \\u043F\\u043E \\u0444\\u043E\\u0440\\u043C\\u0430\\u0442\\u0443\",\"Your current syntax looks like this\":\"\\u0412\\u0430\\u0448 \\u0442\\u0435\\u043A\\u0443\\u0449\\u0438\\u0439 \\u0441\\u0438\\u043D\\u0442\\u0430\\u043A\\u0441\\u0438\\u0441 \\u0432\\u044B\\u0433\\u043B\\u044F\\u0434\\u0438\\u0442 \\u0442\\u0430\\u043A\",\"Time format\":\"\\u0424\\u043E\\u0440\\u043C\\u0430\\u0442 \\u0432\\u0440\\u0435\\u043C\\u0435\\u043D\\u0438\",\"Date display format\":\"\\u0424\\u043E\\u0440\\u043C\\u0430\\u0442 \\u043F\\u043E\\u043A\\u0430\\u0437\\u0430 \\u0434\\u0430\\u0442\\u044B\",\"This format will be used when displaying dates in Kanban cards.\":\"\\u042D\\u0442\\u043E\\u0442 \\u0444\\u043E\\u0440\\u043C\\u0430\\u0442 \\u0431\\u0443\\u0434\\u0435\\u0442 \\u0438\\u0441\\u043F\\u043E\\u043B\\u044C\\u0437\\u043E\\u0432\\u0430\\u043D \\u043F\\u0440\\u0438 \\u043F\\u043E\\u043A\\u0430\\u0437\\u0435 \\u0434\\u0430\\u0442 \\u0432 Kanban-\\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0430\\u0445.\",\"Show relative date\":\"\\u041F\\u043E\\u043A\\u0430\\u0437\\u044B\\u0432\\u0430\\u0442\\u044C \\u043E\\u0442\\u043D\\u043E\\u0441\\u0438\\u0442\\u0435\\u043B\\u044C\\u043D\\u0443\\u044E \\u0434\\u0430\\u0442\\u0443\",\"Hide card counts in list titles\":\"\\u0421\\u043A\\u0440\\u044B\\u0442\\u044C \\u0441\\u0447\\u0451\\u0442\\u0447\\u0438\\u043A\\u0438 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u0435\\u043A \\u0432 \\u0437\\u0430\\u0433\\u043E\\u043B\\u043E\\u0432\\u043A\\u0430\\u0445 \\u0441\\u043F\\u0438\\u0441\\u043A\\u0430\",\"When toggled, card counts are hidden from the list title\":\"\\u041A\\u043E\\u0433\\u0434\\u0430 \\u0432\\u043A\\u043B\\u044E\\u0447\\u0435\\u043D\\u043E, \\u0441\\u0447\\u0451\\u0442\\u0447\\u0438\\u043A\\u0438 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u0435\\u043A \\u0441\\u043A\\u0440\\u044B\\u0442\\u044B \\u0432 \\u0437\\u0430\\u0433\\u043E\\u043B\\u043E\\u0432\\u043A\\u0430\\u0445 \\u0441\\u043F\\u0438\\u0441\\u043A\\u0430\",\"Link dates to daily notes\":\"\\u0421\\u0432\\u044F\\u0437\\u044B\\u0432\\u0430\\u0442\\u044C \\u0434\\u0430\\u0442\\u044B \\u0441 \\u0435\\u0436\\u0435\\u0434\\u043D\\u0435\\u0432\\u043D\\u044B\\u043C\\u0438 \\u0437\\u0430\\u043C\\u0435\\u0442\\u043A\\u0430\\u043C\\u0438\",\"When toggled, dates will link to daily notes. Eg. [[2021-04-26]]\":\"\\u041A\\u043E\\u0433\\u0434\\u0430 \\u0432\\u043A\\u043B\\u044E\\u0447\\u0435\\u043D\\u043E, \\u0434\\u0430\\u0442\\u044B \\u0431\\u0443\\u0434\\u0443\\u0442 \\u0443\\u043A\\u0430\\u0437\\u044B\\u0432\\u0430\\u0442\\u044C \\u043D\\u0430 \\u0435\\u0436\\u0435\\u0434\\u043D\\u0435\\u0432\\u043D\\u044B\\u0435 \\u0437\\u0430\\u043C\\u0435\\u0442\\u043A\\u0438. \\u041D\\u0430\\u043F\\u0440\\u0438\\u043C\\u0435\\u0440, [[2021-04-26]]\",\"Add date and time to archived cards\":\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u043B\\u044F\\u0442\\u044C \\u0434\\u0430\\u0442\\u0443 \\u0438 \\u0432\\u0440\\u0435\\u043C\\u044F \\u043A \\u0430\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u043D\\u044B\\u043C \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0430\\u043C\",\"When toggled, the current date and time will be added to the card title when it is archived. Eg. - [ ] 2021-05-14 10:00am My card title\":\"\\u041A\\u043E\\u0433\\u0434\\u0430 \\u0432\\u043A\\u043B\\u044E\\u0447\\u0435\\u043D\\u043E, \\u0442\\u0435\\u043A\\u0443\\u0449\\u0438\\u0435 \\u0434\\u0430\\u0442\\u0430 \\u0438 \\u0432\\u0440\\u0435\\u043C\\u044F \\u0431\\u0443\\u0434\\u0443\\u0442 \\u0434\\u043E\\u0431\\u0430\\u0432\\u043B\\u0435\\u043D\\u044B \\u043A \\u0437\\u0430\\u0433\\u043E\\u043B\\u043E\\u0432\\u043A\\u0443 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438, \\u043A\\u043E\\u0433\\u0434\\u0430 \\u043E\\u043D\\u0430 \\u0437\\u0430\\u0430\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0430. \\u041D\\u0430\\u043F\\u0440\\u0438\\u043C\\u0435\\u0440, - [ ] 2021-05-14 10:00am \\u041C\\u043E\\u0439 \\u0437\\u0430\\u0433\\u043E\\u043B\\u043E\\u0432\\u043E\\u043A \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438\",\"Add archive date/time after card title\":\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u043B\\u044F\\u0442\\u044C \\u0434\\u0430\\u0442\\u0443/\\u0432\\u0440\\u0435\\u043C\\u044F \\u0430\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u044F \\u043F\\u043E\\u0441\\u043B\\u0435 \\u0437\\u0430\\u0433\\u043E\\u043B\\u043E\\u0432\\u043A\\u0430 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438\",\"When toggled, the archived date/time will be added after the card title, e.g.- [ ] My card title 2021-05-14 10:00am. By default, it is inserted before the title.\":\"\\u041A\\u043E\\u0433\\u0434\\u0430 \\u0432\\u043A\\u043B\\u044E\\u0447\\u0435\\u043D\\u043E, \\u0434\\u0430\\u0442\\u0430 \\u0438 \\u0432\\u0440\\u0435\\u043C\\u044F \\u0430\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u044F \\u0431\\u0443\\u0434\\u0435\\u0442 \\u0434\\u043E\\u0431\\u0430\\u0432\\u043B\\u0435\\u043D\\u043E \\u043F\\u043E\\u0441\\u043B\\u0435 \\u0437\\u0430\\u0433\\u043E\\u043B\\u043E\\u0432\\u043A\\u0430 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438, \\u043D\\u0430\\u043F\\u0440\\u0438\\u043C\\u0435\\u0440, - [ ] \\u041C\\u043E\\u0439 \\u0437\\u0430\\u0433\\u043E\\u043B\\u043E\\u0432\\u043E\\u043A \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438 2021-05-14 10:00am. \\u041F\\u043E \\u0443\\u043C\\u043E\\u043B\\u0447\\u0430\\u043D\\u0438\\u044E \\u0434\\u043E\\u0431\\u0430\\u0432\\u043B\\u0435\\u043D\\u0438\\u0435 \\u043F\\u0440\\u043E\\u0438\\u0437\\u0432\\u043E\\u0434\\u0438\\u0442\\u0441\\u044F \\u043F\\u0435\\u0440\\u0435\\u0434 \\u0437\\u0430\\u0433\\u043E\\u043B\\u043E\\u0432\\u043A\\u043E\\u043C.\",\"Archive date/time separator\":\"\\u0420\\u0430\\u0437\\u0434\\u0435\\u043B\\u0438\\u0442\\u0435\\u043B\\u044C \\u0434\\u0430\\u0442\\u044B/\\u0432\\u0440\\u0435\\u043C\\u0435\\u043D\\u0438 \\u0430\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u044F\",\"This will be used to separate the archived date/time from the title\":\"\\u0411\\u0443\\u0434\\u0435\\u0442 \\u0438\\u0441\\u043F\\u043E\\u043B\\u044C\\u0437\\u043E\\u0432\\u0430\\u0442\\u044C\\u0441\\u044F \\u0434\\u043B\\u044F \\u043E\\u0442\\u0434\\u0435\\u043B\\u0435\\u043D\\u0438\\u044F \\u0434\\u0430\\u0442\\u044B/\\u0432\\u0440\\u0435\\u043C\\u0435\\u043D\\u0438 \\u0430\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u044F \\u043E\\u0442 \\u0437\\u0430\\u0433\\u043E\\u043B\\u043E\\u0432\\u043A\\u0430\",\"Archive date/time format\":\"\\u0424\\u043E\\u0440\\u043C\\u0430\\u0442 \\u0434\\u0430\\u0442\\u044B/\\u0432\\u0440\\u0435\\u043C\\u0435\\u043D\\u0438 \\u0430\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u044F\",\"Kanban Plugin\":\"\\u041F\\u043B\\u0430\\u0433\\u0438\\u043D Kanban\",\"Tag colors\":\"\\u041F\\u043E\\u043A\\u0430\\u0437\\u044B\\u0432\\u0430\\u0442\\u044C \\u0446\\u0432\\u0435\\u0442\\u0430 \\u043C\\u0435\\u0442\\u043E\\u043A\",\"Set colors for tags displayed in cards.\":\"\\u0423\\u0441\\u0442\\u0430\\u043D\\u043E\\u0432\\u0438\\u0442\\u044C \\u0446\\u0432\\u0435\\u0442\\u0430 \\u0434\\u043B\\u044F \\u043C\\u0435\\u0442\\u043E\\u043A \\u043F\\u043E\\u0434 \\u0437\\u0430\\u0433\\u043E\\u043B\\u043E\\u0432\\u043A\\u0430\\u043C\\u0438 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u0435\\u043A.\",\"Linked Page Metadata\":\"\\u041C\\u0435\\u0442\\u0430\\u0434\\u0430\\u043D\\u043D\\u044B\\u0435 \\u0441\\u0432\\u044F\\u0437\\u0430\\u043D\\u043D\\u044B\\u0445 \\u0441\\u0442\\u0440\\u0430\\u043D\\u0438\\u0446\",\"Display metadata for the first note linked within a card. Specify which metadata keys to display below. An optional label can be provided, and labels can be hidden altogether.\":\"\\u041E\\u0442\\u043E\\u0431\\u0440\\u0430\\u0436\\u0435\\u043D\\u0438\\u0435 \\u043C\\u0435\\u0442\\u0430\\u0434\\u0430\\u043D\\u043D\\u044B\\u0445 \\u0434\\u043B\\u044F \\u043F\\u0435\\u0440\\u0432\\u043E\\u0439 \\u0437\\u0430\\u043C\\u0435\\u0442\\u043A\\u0438, \\u0441\\u0432\\u044F\\u0437\\u0430\\u043D\\u043D\\u043E\\u0439 \\u0441 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u043E\\u0439. \\u041D\\u0438\\u0436\\u0435 \\u0443\\u043A\\u0430\\u0436\\u0438\\u0442\\u0435, \\u043A\\u0430\\u043A\\u0438\\u0435 \\u043A\\u043B\\u044E\\u0447\\u0438 \\u043C\\u0435\\u0442\\u0430\\u0434\\u0430\\u043D\\u043D\\u044B\\u0445 \\u043E\\u0442\\u043E\\u0431\\u0440\\u0430\\u0436\\u0430\\u0442\\u044C. \\u041C\\u043E\\u0436\\u043D\\u043E \\u0443\\u043A\\u0430\\u0437\\u0430\\u0442\\u044C \\u0434\\u043E\\u043F\\u043E\\u043B\\u043D\\u0438\\u0442\\u0435\\u043B\\u044C\\u043D\\u0443\\u044E \\u043C\\u0435\\u0442\\u043A\\u0443, \\u043B\\u0438\\u0431\\u043E \\u0441\\u043A\\u0440\\u044B\\u0442\\u044C \\u043C\\u0435\\u0442\\u043A\\u0438 \\u043F\\u043E\\u043B\\u043D\\u043E\\u0441\\u0442\\u044C\\u044E.\",\"Board Header Buttons\":\"\\u041A\\u043D\\u043E\\u043F\\u043A\\u0438 \\u0437\\u0430\\u0433\\u043E\\u043B\\u043E\\u0432\\u043A\\u0430 \\u0434\\u043E\\u0441\\u043A\\u0438\",\"Calendar: first day of week\":\"\\u041A\\u0430\\u043B\\u0435\\u043D\\u0434\\u0430\\u0440\\u044C: \\u043F\\u0435\\u0440\\u0432\\u044B\\u0439 \\u0434\\u0435\\u043D\\u044C \\u043D\\u0435\\u0434\\u0435\\u043B\\u0438\",\"Override which day is used as the start of the week\":\"\\u0423\\u043A\\u0430\\u0436\\u0438\\u0442\\u0435, \\u043A\\u0430\\u043A\\u043E\\u0439 \\u0434\\u0435\\u043D\\u044C \\u0434\\u043E\\u043B\\u0436\\u0435\\u043D \\u0438\\u0441\\u043F\\u043E\\u043B\\u044C\\u0437\\u043E\\u0432\\u0430\\u0442\\u044C\\u0441\\u044F \\u043A\\u0430\\u043A \\u043D\\u0430\\u0447\\u0430\\u043B\\u043E \\u043D\\u0435\\u0434\\u0435\\u043B\\u0438\",Sunday:\"\\u0412\\u043E\\u0441\\u043A\\u0440\\u0435\\u0441\\u0435\\u043D\\u044C\\u0435\",Monday:\"\\u041F\\u043E\\u043D\\u0435\\u0434\\u0435\\u043B\\u044C\\u043D\\u0438\\u043A\",Tuesday:\"\\u0412\\u0442\\u043E\\u0440\\u043D\\u0438\\u043A\",Wednesday:\"\\u0421\\u0440\\u0435\\u0434\\u0430\",Thursday:\"\\u0427\\u0435\\u0442\\u0432\\u0435\\u0440\\u0433\",Friday:\"\\u041F\\u044F\\u0442\\u043D\\u0438\\u0446\\u0430\",Saturday:\"\\u0421\\u0443\\u0431\\u0431\\u043E\\u0442\\u0430\",\"Background color\":\"\\u0426\\u0432\\u0435\\u0442 \\u0444\\u043E\\u043D\\u0430\",Tag:\"\\u041C\\u0435\\u0442\\u043A\\u0430\",\"Text color\":\"\\u0426\\u0432\\u0435\\u0442 \\u0442\\u0435\\u043A\\u0441\\u0442\\u0430\",\"Date is\":\"\\u0414\\u0430\\u0442\\u0430\",Today:\"\\u0421\\u0435\\u0433\\u043E\\u0434\\u043D\\u044F\",\"After now\":\"\\u041F\\u043E\\u0441\\u043B\\u0435 \\u0442\\u0435\\u043A\\u0443\\u0449\\u0435\\u0433\\u043E \\u043C\\u043E\\u043C\\u0435\\u043D\\u0442\\u0430\",\"Before now\":\"\\u0414\\u043E \\u0442\\u0435\\u043A\\u0443\\u0449\\u0435\\u0433\\u043E \\u043C\\u043E\\u043C\\u0435\\u043D\\u0442\\u0430\",\"Between now and\":\"\\u041C\\u0435\\u0436\\u0434\\u0443 \\u0441\\u0435\\u0439\\u0447\\u0430\\u0441 \\u0438\",\"Display date colors\":\"\\u041F\\u043E\\u043A\\u0430\\u0437\\u044B\\u0432\\u0430\\u0442\\u044C \\u0446\\u0432\\u0435\\u0442\\u0430 \\u0434\\u0430\\u0442\\u044B\",\"Set colors for dates displayed in cards based on the rules below.\":\"\\u0423\\u0441\\u0442\\u0430\\u043D\\u043E\\u0432\\u0438\\u0442\\u044C \\u0446\\u0432\\u0435\\u0442\\u0430 \\u0434\\u043B\\u044F \\u0434\\u0430\\u0442\\u044B, \\u043E\\u0442\\u043E\\u0431\\u0440\\u0430\\u0436\\u0430\\u0435\\u043C\\u043E\\u0439 \\u043F\\u043E\\u0434 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u043E\\u0439, \\u0431\\u0430\\u0437\\u0438\\u0440\\u0443\\u044F\\u0441\\u044C \\u043D\\u0430 \\u043F\\u0440\\u0430\\u0432\\u0438\\u043B\\u0430\\u0445 \\u043D\\u0438\\u0436\\u0435\",\"Add date color\":\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C \\u0446\\u0432\\u0435\\u0442 \\u0434\\u0430\\u0442\\u044B\",\"Metadata key\":\"\\u041A\\u043B\\u044E\\u0447 \\u043C\\u0435\\u0442\\u0430\\u0434\\u0430\\u043D\\u043D\\u044B\\u0445\",\"Display label\":\"\\u041F\\u043E\\u043A\\u0430\\u0437\\u0430\\u0442\\u044C \\u044F\\u0440\\u044B\\u043B\\u043A\",\"Hide label\":\"\\u0421\\u043F\\u0440\\u044F\\u0442\\u0430\\u0442\\u044C \\u044F\\u0440\\u043B\\u044B\\u043A\",\"Drag to rearrange\":\"\\u041F\\u043E\\u0442\\u044F\\u043D\\u0438\\u0442\\u0435, \\u0447\\u0442\\u043E\\u0431\\u044B \\u043F\\u0435\\u0440\\u0435\\u0443\\u043F\\u043E\\u0440\\u044F\\u0434\\u043E\\u0447\\u0438\\u0442\\u044C\",Delete:\"\\u0423\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C\",\"Add key\":\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C \\u043A\\u043B\\u044E\\u0447\",\"Field contains markdown\":\"\\u041F\\u043E\\u043B\\u0435 \\u0441\\u043E\\u0434\\u0435\\u0440\\u0436\\u0438\\u0442 markdown\",\"Add tag color\":\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C \\u0446\\u0432\\u0435\\u0442 \\u043C\\u0435\\u0442\\u043A\\u0438\",\"More options\":\"\\u0411\\u043E\\u043B\\u044C\\u0448\\u0435 \\u043D\\u0430\\u0441\\u0442\\u0440\\u043E\\u0435\\u043A\",Cancel:\"\\u041E\\u0442\\u043C\\u0435\\u043D\\u0430\",today:\"\\u0441\\u0435\\u0433\\u043E\\u0434\\u043D\\u044F\",yesterday:\"\\u0432\\u0447\\u0435\\u0440\\u0430\",tomorrow:\"\\u0437\\u0430\\u0432\\u0442\\u0440\\u0430\",\"Change date\":\"\\u0418\\u0437\\u043C\\u0435\\u043D\\u0438\\u0442\\u044C \\u0434\\u0430\\u0442\\u0443\",\"Change time\":\"\\u0418\\u0437\\u043C\\u0435\\u043D\\u0438\\u0442\\u044C \\u0432\\u0440\\u0435\\u043C\\u044F\",\"Card title...\":\"\\u0417\\u0430\\u0433\\u043E\\u043B\\u043E\\u0432\\u043E\\u043A \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438...\",\"Add card\":\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0443\",\"Add a card\":\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0443\",\"Edit card\":\"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0443\",\"New note from card\":\"\\u041D\\u043E\\u0432\\u0430\\u044F \\u0437\\u0430\\u043C\\u0435\\u0442\\u043A\\u0430 \\u0438\\u0437 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438\",\"Archive card\":\"\\u0410\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0443\",\"Delete card\":\"\\u0423\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0443\",\"Edit date\":\"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u0434\\u0430\\u0442\\u0443\",\"Add date\":\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C \\u0434\\u0430\\u0442\\u0443\",\"Remove date\":\"\\u0423\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C \\u0434\\u0430\\u0442\\u0443\",\"Edit time\":\"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u0432\\u0440\\u0435\\u043C\\u044F\",\"Add time\":\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C \\u0432\\u0440\\u0435\\u043C\\u044F\",\"Remove time\":\"\\u0423\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C \\u0432\\u0440\\u0435\\u043C\\u044F\",\"Duplicate card\":\"\\u0414\\u0443\\u0431\\u043B\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0443\",\"Split card\":\"\\u0420\\u0430\\u0437\\u0434\\u0435\\u043B\\u0438\\u0442\\u044C \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0443\",\"Copy link to card\":\"\\u0421\\u043A\\u043E\\u043F\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u0441\\u0441\\u044B\\u043B\\u043A\\u0443 \\u043D\\u0430 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0443\",\"Insert card before\":\"\\u0412\\u0441\\u0442\\u0430\\u0432\\u0438\\u0442\\u044C \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0443 \\u0434\\u043E\",\"Insert card after\":\"\\u0412\\u0441\\u0442\\u0430\\u0432\\u0438\\u0442\\u044C \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0443 \\u043F\\u043E\\u0441\\u043B\\u0435\",\"Add label\":\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C \\u044F\\u0440\\u043B\\u044B\\u043A\",\"Move to top\":\"\\u041F\\u0435\\u0440\\u0435\\u043C\\u0435\\u0441\\u0442\\u0438\\u0442\\u044C \\u0432\\u0432\\u0435\\u0440\\u0445\",\"Move to bottom\":\"\\u041F\\u0435\\u0440\\u0435\\u043C\\u0435\\u0441\\u0442\\u0438\\u0442\\u044C \\u0432\\u043D\\u0438\\u0437\",\"Enter list title...\":\"\\u0412\\u0432\\u0435\\u0434\\u0438\\u0442\\u0435 \\u0437\\u0430\\u0433\\u043E\\u043B\\u043E\\u0432\\u043E\\u043A \\u0441\\u043F\\u0438\\u0441\\u043A\\u0430...\",\"Mark cards in this list as complete\":\"\\u041E\\u0442\\u043C\\u0435\\u0442\\u0438\\u0442\\u044C \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438 \\u0432 \\u044D\\u0442\\u043E\\u043C \\u0441\\u043F\\u0438\\u0441\\u043A\\u0435 \\u043A\\u0430\\u043A \\u0437\\u0430\\u0432\\u0435\\u0440\\u0448\\u0451\\u043D\\u043D\\u044B\\u0435\",\"Add list\":\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C \\u0441\\u043F\\u0438\\u0441\\u043E\\u043A\",\"Add a list\":\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C \\u0441\\u043F\\u0438\\u0441\\u043E\\u043A\",\"Move list\":\"\\u041F\\u0435\\u0440\\u0435\\u043C\\u0435\\u0441\\u0442\\u0438\\u0442\\u044C \\u0441\\u043F\\u0438\\u0441\\u043E\\u043A\",Close:\"\\u0417\\u0430\\u043A\\u0440\\u044B\\u0442\\u044C\",\"Are you sure you want to delete this list and all its cards?\":\"\\u0412\\u044B \\u0443\\u0432\\u0435\\u0440\\u0435\\u043D\\u044B, \\u0447\\u0442\\u043E \\u0445\\u043E\\u0442\\u0438\\u0442\\u0435 \\u0443\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C \\u044D\\u0442\\u043E\\u0442 \\u0441\\u043F\\u0438\\u0441\\u043E\\u043A \\u0438 \\u0432\\u0441\\u0435 \\u0435\\u0433\\u043E \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438?\",\"Yes, delete list\":\"\\u0414\\u0430, \\u0443\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C \\u0441\\u043F\\u0438\\u0441\\u043E\\u043A\",\"Are you sure you want to archive this list and all its cards?\":\"\\u0412\\u044B \\u0443\\u0432\\u0435\\u0440\\u0435\\u043D\\u044B, \\u0447\\u0442\\u043E \\u0445\\u043E\\u0442\\u0438\\u0442\\u0435 \\u0430\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u044D\\u0442\\u043E\\u0442 \\u0441\\u043F\\u0438\\u0441\\u043E\\u043A \\u0438 \\u0432\\u0441\\u0435 \\u0435\\u0433\\u043E \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438?\",\"Yes, archive list\":\"\\u0414\\u0430, \\u0430\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u0441\\u043F\\u0438\\u0441\\u043E\\u043A\",\"Are you sure you want to archive all cards in this list?\":\"\\u0412\\u044B \\u0443\\u0432\\u0435\\u0440\\u0435\\u043D\\u044B, \\u0447\\u0442\\u043E \\u0445\\u043E\\u0442\\u0438\\u0442\\u0435 \\u0430\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u0432\\u0441\\u0435 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438 \\u0432 \\u044D\\u0442\\u043E\\u043C \\u0441\\u043F\\u0438\\u0441\\u043A\\u0435?\",\"Yes, archive cards\":\"\\u0414\\u0430, \\u0430\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438\",\"Edit list\":\"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u0441\\u043F\\u0438\\u0441\\u043E\\u043A\",\"Archive cards\":\"\\u0410\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438\",\"Archive list\":\"\\u0410\\u0440\\u0445\\u0438\\u0432\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u0441\\u043F\\u0438\\u0441\\u043E\\u043A\",\"Delete list\":\"\\u0423\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C \\u0441\\u043F\\u0438\\u0441\\u043E\\u043A\",\"Insert list before\":\"\\u0412\\u0441\\u0442\\u0430\\u0432\\u0438\\u0442\\u044C \\u0441\\u043F\\u0438\\u0441\\u043E\\u043A \\u0434\\u043E\",\"Insert list after\":\"\\u0412\\u0441\\u0442\\u0430\\u0432\\u0438\\u0442\\u044C \\u0441\\u043F\\u0438\\u0441\\u043E\\u043A \\u043F\\u043E\\u0441\\u043B\\u0435\",\"Sort by card text\":\"\\u0421\\u043E\\u0440\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u043F\\u043E \\u0442\\u0435\\u043A\\u0441\\u0442\\u0443 \\u043A\\u0430\\u0440\\u0442\\u043E\\u0447\\u043A\\u0438\",\"Sort by date\":\"\\u0421\\u043E\\u0440\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u0442\\u044C \\u043F\\u043E \\u0434\\u0430\\u0442\\u0435\",\"Unable to find\":\"\\u041D\\u0435\\u0432\\u043E\\u0437\\u043C\\u043E\\u0436\\u043D\\u043E \\u043D\\u0430\\u0439\\u0442\\u0438\",\"Open in default app\":\"\\u041E\\u0442\\u043A\\u0440\\u044B\\u0442\\u044C \\u0432 \\u043F\\u0440\\u0438\\u043B\\u043E\\u0436\\u0435\\u043D\\u0438\\u0438 \\u043F\\u043E \\u0443\\u043C\\u043E\\u043B\\u0447\\u0430\\u043D\\u0438\\u044E\",Submit:\"\\u0421\\u043E\\u0445\\u0440\\u0430\\u043D\\u0438\\u0442\\u044C\"},ub=kA;var xA={},cb=xA;var CA={},Tu=CA;var _A={\"Open as kanban board\":\"\\u6253\\u5F00\\u4E3A\\u770B\\u677F\",\"Create new board\":\"\\u521B\\u5EFA\\u65B0\\u770B\\u677F\",\"Archive completed cards in active board\":\"\\u5728\\u5F53\\u524D\\u770B\\u677F\\u4E2D\\u5F52\\u6863\\u5DF2\\u5B8C\\u6210\\u5361\\u7247\",\"Error: current file is not a Kanban board\":\"\\u9519\\u8BEF\\uFF1A\\u5F53\\u524D\\u6587\\u4EF6\\u4E0D\\u662F\\u770B\\u677F\\u6587\\u4EF6\",\"Convert empty note to Kanban\":\"\\u8F6C\\u6362\\u7A7A\\u767D\\u7B14\\u8BB0\\u4E3A\\u770B\\u677F\",\"Error: cannot create Kanban, the current note is not empty\":\"\\u9519\\u8BEF\\uFF1A\\u65E0\\u6CD5\\u8F6C\\u6362\\u5F53\\u524D\\u6587\\u4EF6\\uFF0C\\u5F53\\u524D\\u7B14\\u8BB0\\u4E0D\\u662F\\u7A7A\\u767D\\u7B14\\u8BB0\",\"New kanban board\":\"\\u65B0\\u770B\\u677F\",\"Untitled Kanban\":\"\\u672A\\u547D\\u540D\\u770B\\u677F\",\"Toggle between Kanban and markdown mode\":\"\\u5728\\u770B\\u677F\\u548C Markdown \\u6A21\\u5F0F\\u4E4B\\u95F4\\u8FDB\\u884C\\u5207\\u6362\",\"Open as markdown\":\"\\u6253\\u5F00\\u4E3A Markdown \\u6587\\u4EF6\",\"Open board settings\":\"\\u6253\\u5F00\\u770B\\u677F\\u8BBE\\u7F6E\",\"Archive completed cards\":\"\\u5F52\\u6863\\u5DF2\\u5B8C\\u6210\\u5361\\u7247\",\"Something went wrong\":\"\\u51FA\\u4E86\\u70B9\\u95EE\\u9898\",\"You may wish to open as markdown and inspect or edit the file.\":\"\\u4F60\\u53EF\\u80FD\\u5E0C\\u671B\\u4EE5 Markdown \\u65B9\\u5F0F\\u6253\\u5F00\\uFF0C\\u5E76\\u68C0\\u67E5\\u6216\\u7F16\\u8F91\\u8BE5\\u6587\\u4EF6\\u3002\",\"Are you sure you want to archive all completed cards on this board?\":\"\\u4F60\\u786E\\u5B9A\\u8981\\u5C06\\u8FD9\\u4E2A\\u677F\\u5757\\u4E0A\\u6240\\u6709\\u5DF2\\u5B8C\\u6210\\u7684\\u5361\\u7247\\u5F52\\u6863\\u5417\\uFF1F\",Complete:\"\\u5B8C\\u6210\",Archive:\"\\u5F52\\u6863\",\"Invalid Kanban file: problems parsing frontmatter\":\"\\u65E0\\u6548\\u7684\\u770B\\u677F\\u6587\\u4EF6\\uFF1A\\u89E3\\u6790 frontmatter \\u65F6\\u51FA\\u73B0\\u95EE\\u9898\",\"I don't know how to interpret this line:\":\"\\u6211\\u4E0D\\u77E5\\u9053\\u5982\\u4F55\\u89E3\\u8BFB\\u8FD9\\u53E5\\u8BDD\\uFF1A\",Untitled:\"\\u672A\\u547D\\u540D\",\"Note: No template plugins are currently enabled.\":\"\\u6CE8\\u610F\\uFF1A\\u5F53\\u524D\\u6CA1\\u6709\\u542F\\u7528\\u6A21\\u677F\\u63D2\\u4EF6\",default:\"\\u9ED8\\u8BA4\",\"Search...\":\"\\u641C\\u7D22\\u2026\\u2026\",\"New line trigger\":\"\\u6362\\u884C\\u89E6\\u53D1\\u5668\",\"Select whether Enter or Shift+Enter creates a new line. The opposite of what you choose will create and complete editing of cards and lists.\":\"\\u9009\\u62E9 Enter \\u6216\\u662F Shift+Enter \\u6765\\u521B\\u5EFA\\u65B0\\u884C, \\u672A\\u9009\\u7528\\u7684\\u5FEB\\u6377\\u952E\\u5C06\\u88AB\\u7528\\u4E8E\\u521B\\u5EFA\\u5361\\u7247\\u548C\\u5217\\uFF0C\\u4EE5\\u53CA\\u5B8C\\u6210\\u5361\\u7247\\u3001\\u5217\\u7684\\u7F16\\u8F91\\u3002\",\"Shift + Enter\":\"Shift + Enter\",Enter:\"Enter\",\"Prepend / append new cards\":\"\\u8FFD\\u52A0\\u65B0\\u5361\\u7247\",\"This setting controls whether new cards are added to the beginning or end of the list.\":\"\\u8BBE\\u7F6E\\u65B0\\u5361\\u7247\\u8FFD\\u52A0\\u5230\\u5217\\u5934\\u90E8\\u6216\\u5C3E\\u90E8\\u3002\",Prepend:\"\\u5934\\u90E8\",\"Prepend (compact)\":\"\\u5934\\u90E8 (\\u7D27\\u51D1)\",Append:\"\\u5C3E\\u90E8\",\"These settings will take precedence over the default Kanban board settings.\":\"\\u5F53\\u524D\\u770B\\u677F\\u8BBE\\u7F6E\\u5C06\\u4F1A\\u8986\\u76D6\\u9ED8\\u8BA4\\u7684\\u770B\\u677F\\u8BBE\\u7F6E\\u3002\",\"Set the default Kanban board settings. Settings can be overridden on a board-by-board basis.\":\"\\u66F4\\u6539\\u9ED8\\u8BA4\\u7684\\u770B\\u677F\\u8BBE\\u7F6E\\u3002\\u4E3A\\u6BCF\\u4E2A\\u770B\\u677F\\u5355\\u72EC\\u8FDB\\u884C\\u8BBE\\u7F6E\\u5C06\\u8986\\u76D6\\u9ED8\\u8BA4\\u8BBE\\u7F6E\\u3002\",\"Note template\":\"\\u7B14\\u8BB0\\u6A21\\u677F\",\"This template will be used when creating new notes from Kanban cards.\":\"\\u4ECE\\u770B\\u677F\\u5361\\u7247\\u521B\\u5EFA\\u65B0\\u7B14\\u8BB0\\u65F6\\u4F1A\\u4F7F\\u7528\\u8BE5\\u6A21\\u677F\\u3002\",\"No template\":\"\\u6CA1\\u6709\\u6A21\\u677F\",\"Note folder\":\"\\u7B14\\u8BB0\\u5B58\\u653E\\u4F4D\\u7F6E\",\"Notes created from Kanban cards will be placed in this folder. If blank, they will be placed in the default location for this vault.\":\"\\u4ECE\\u770B\\u677F\\u5361\\u7247\\u521B\\u5EFA\\u7684\\u7B14\\u8BB0\\u4F1A\\u653E\\u7F6E\\u5230\\u8BE5\\u6587\\u4EF6\\u5939\\u4E2D\\u3002\\u5982\\u679C\\u4E3A\\u7A7A\\uFF0C\\u7B14\\u8BB0\\u5C06\\u4F1A\\u653E\\u7F6E\\u5230 Obsidian \\u7684\\u9ED8\\u8BA4\\u6587\\u4EF6\\u5B58\\u653E\\u4F4D\\u7F6E\\u3002\",\"Default folder\":\"\\u9ED8\\u8BA4\\u6587\\u4EF6\\u5939\",\"List width\":\"\\u5217\\u5BBD\",\"Enter a number to set the list width in pixels.\":\"\\u8F93\\u5165\\u4E00\\u4E2A\\u50CF\\u7D20\\u503C\\u6765\\u8BBE\\u7F6E\\u5217\\u7684\\u5BBD\\u5EA6\",\"Maximum number of archived cards\":\"\\u5355\\u4E2A\\u770B\\u677F\\u5185\\u5DF2\\u5F52\\u6863\\u5361\\u7247\\u7684\\u6700\\u5927\\u6570\\u91CF\",\"Archived cards can be viewed in markdown mode. This setting will begin removing old cards once the limit is reached. Setting this value to -1 will allow a board's archive to grow infinitely.\":\"\\u5DF2\\u5F52\\u6863\\u5361\\u7247\\u53EF\\u4EE5\\u5728 Markdown \\u6A21\\u5F0F\\u4E0B\\u67E5\\u770B\\u3002\\u8BE5\\u8BBE\\u7F6E\\u5C06\\u4F7F\\u5DF2\\u5F52\\u6863\\u5361\\u7247\\u5728\\u8FBE\\u5230\\u6700\\u5927\\u6570\\u91CF\\u65F6\\u5220\\u9664\\u65E7\\u5361\\u3002\\u8BBE\\u7F6E\\u4E3A -1 \\u53EF\\u4EE5\\u6C38\\u4E45\\u4FDD\\u7559\\u6240\\u6709\\u5F52\\u6863\\u5361\\u7247\\u3002\",\"Display card checkbox\":\"\\u5C55\\u793A\\u5361\\u7247\\u590D\\u9009\\u6846\",\"When toggled, a checkbox will be displayed with each card\":\"\\u6253\\u5F00\\u65F6\\uFF0C\\u590D\\u9009\\u6846\\u4F1A\\u51FA\\u73B0\\u5728\\u6BCF\\u5F20\\u5361\\u7247\\u4E0A\",\"Reset to default\":\"\\u8FD8\\u539F\\u521D\\u59CB\\u8BBE\\u7F6E\",\"Date & Time\":\"\\u65E5\\u671F\\u548C\\u65F6\\u95F4\",\"Date trigger\":\"\\u65E5\\u671F\\u89E6\\u53D1\\u6307\\u4EE4\",\"When this is typed, it will trigger the date selector\":\"\\u5F53\\u5728\\u770B\\u677F\\u5361\\u7247\\u4E2D\\u8F93\\u5165\\u8FD9\\u4E2A\\u65F6\\uFF0C\\u4F1A\\u89E6\\u53D1\\u4E00\\u4E2A\\u65E5\\u671F\\u9009\\u62E9\\u5668\",\"Time trigger\":\"\\u65F6\\u95F4\\u89E6\\u53D1\\u6307\\u4EE4\",\"When this is typed, it will trigger the time selector\":\"\\u5F53\\u5728\\u770B\\u677F\\u5361\\u7247\\u4E2D\\u8F93\\u5165\\u8FD9\\u4E2A\\u65F6\\uFF0C\\u4F1A\\u89E6\\u53D1\\u4E00\\u4E2A\\u65F6\\u95F4\\u9009\\u62E9\\u5668\",\"Date format\":\"\\u65E5\\u671F\\u683C\\u5F0F\",\"This format will be used when saving dates in markdown.\":\"\\u8FD9\\u4E2A\\u683C\\u5F0F\\u4F1A\\u5728\\u65E5\\u671F\\u4FDD\\u5B58\\u5230 Markdown \\u683C\\u5F0F\\u65F6\\u4F7F\\u7528\\u3002\",\"For more syntax, refer to\":\"\\u66F4\\u591A\\u683C\\u5F0F\\uFF0C\\u8BF7\\u67E5\\u770B\",\"format reference\":\"\\u683C\\u5F0F\\u53C2\\u8003\",\"Your current syntax looks like this\":\"\\u4F60\\u5F53\\u524D\\u8BBE\\u7F6E\\u7684\\u683C\\u5F0F\\u4F1A\\u662F\",\"Time format\":\"\\u65F6\\u95F4\\u683C\\u5F0F\",\"Date display format\":\"\\u65E5\\u671F\\u5C55\\u793A\\u683C\\u5F0F\",\"This format will be used when displaying dates in Kanban cards.\":\"\\u770B\\u677F\\u5361\\u7247\\u4F1A\\u4EE5\\u8BE5\\u683C\\u5F0F\\u5C55\\u793A\\u65E5\\u671F\\u3002\",\"Show relative date\":\"\\u5C55\\u793A\\u76F8\\u5BF9\\u65E5\\u671F\",\"Hide card counts in list titles\":\"\\u5728\\u5217\\u6807\\u9898\\u4E0A\\u9690\\u85CF\\u5361\\u7247\\u8BA1\\u6570\",\"When toggled, card counts are hidden from the list title\":\"\\u6253\\u5F00\\u65F6\\uFF0C\\u5217\\u6807\\u9898\\u4E0A\\u7684\\u5361\\u7247\\u8BA1\\u6570\\u5C06\\u9690\\u85CF\",\"Link dates to daily notes\":\"\\u94FE\\u63A5\\u65E5\\u671F\\u5230\\u65E5\\u8BB0\",\"When toggled, dates will link to daily notes. Eg. [[2021-04-26]]\":\"\\u6253\\u5F00\\u65F6\\uFF0C\\u65E5\\u671F\\u4F1A\\u81EA\\u52A8\\u94FE\\u63A5\\u5230\\u65E5\\u8BB0\\u9875\\u9762\\uFF0C\\u4F8B\\u5982[[2021-04-26]]\",\"Add date and time to archived cards\":\"\\u6DFB\\u52A0\\u65E5\\u671F\\u548C\\u65F6\\u95F4\\u5230\\u5F52\\u6863\\u5361\\u7247\",\"When toggled, the current date and time will be added to the card title when it is archived. Eg. - [ ] 2021-05-14 10:00am My card title\":\"\\u6253\\u5F00\\u65F6\\uFF0C\\u5F53\\u524D\\u65E5\\u671F\\u548C\\u65F6\\u95F4\\u4F1A\\u88AB\\u6DFB\\u52A0\\u5230\\u5F52\\u6863\\u5361\\u7247\\u7684 frontmatter \\u4E0A\\uFF0C\\u4F8B\\u5982\\u201C- [ ] 2021-05-14 10:00am \\u6211\\u7684\\u5361\\u7247\\u6807\\u9898\\u201D\",\"Archive date/time separator\":\"\\u5F52\\u6863\\u65E5\\u671F\\u6216\\u65F6\\u95F4\\u5206\\u9694\\u7B26Archive date/time separator\",\"This will be used to separate the archived date/time from the title\":\"\\u7528\\u4E8E\\u5206\\u9694\\u6807\\u9898\\u4E0E\\u5F52\\u6863\\u5361\\u7247\\u7684\\u65E5\\u671F\\u6216\\u65F6\\u95F4\",\"Archive date/time format\":\"\\u5F52\\u6863\\u65E5\\u671F\\u6216\\u65F6\\u95F4\\u683C\\u5F0F\",\"Kanban Plugin\":\"\\u770B\\u677F\\u63D2\\u4EF6\",\"Linked Page Metadata\":\"\\u8FDE\\u63A5\\u7684\\u9875\\u9762\\u5143\\u6570\\u636E\",\"Display metadata for the first note linked within a card. Specify which metadata keys to display below. An optional label can be provided, and labels can be hidden altogether.\":\"\\u5C55\\u793A\\u5361\\u7247\\u4E2D\\u7B2C\\u4E00\\u4E2A\\u8FDE\\u63A5\\u6240\\u5BF9\\u5E94\\u7684\\u7B14\\u8BB0\\u5143\\u6570\\u636E\\u3002\\u8BF7\\u5728\\u4E0B\\u65B9\\u6307\\u5B9A\\u54EA\\u4E9B\\u5143\\u6570\\u636E\\u53EF\\u4EE5\\u5C55\\u793A\\u3002\\u4F60\\u53EF\\u4EE5\\u9009\\u62E9\\u5C55\\u793A\\u54EA\\u4E9B\\u6807\\u5FD7\\uFF0C\\u6240\\u6709\\u6807\\u5FD7\\u90FD\\u53EF\\u4EE5\\u88AB\\u9690\\u85CF\\u3002\",\"Board Header Buttons\":\"\\u677F\\u5934\\u6309\\u94AE\",\"Calendar: first day of week\":\"\\u65E5\\u5386\\uFF1A\\u4E00\\u5468\\u7684\\u7B2C\\u4E00\\u5929\",\"Override which day is used as the start of the week\":\"\\u8BBE\\u7F6E\\u54EA\\u4E00\\u5929\\u4F5C\\u4E3A\\u4E00\\u5468\\u7684\\u5F00\\u59CB\",Sunday:\"\\u5468\\u65E5\",Monday:\"\\u5468\\u4E00\",Tuesday:\"\\u5468\\u4E8C\",Wednesday:\"\\u5468\\u4E09\",Thursday:\"\\u5468\\u56DB\",Friday:\"\\u5468\\u4E94\",Saturday:\"\\u5468\\u516D\",\"Metadata key\":\"\\u5143\\u6570\\u636E\\u53C2\\u6570\\u540D\",\"Display label\":\"\\u5C55\\u793A\\u6807\\u5FD7\",\"Hide label\":\"\\u9690\\u85CF\\u6807\\u5FD7\",\"Drag to rearrange\":\"\\u62D6\\u52A8\\u4EE5\\u91CD\\u6392\\u987A\\u5E8F\",Delete:\"\\u5220\\u9664\",\"Add key\":\"\\u6DFB\\u52A0\\u53C2\\u6570\\u540D\",\"Field contains markdown\":\"\\u5B57\\u6BB5\\u5305\\u542B Markdown\",\"More options\":\"\\u66F4\\u591A\\u9009\\u9879\",Cancel:\"\\u53D6\\u6D88\",today:\"\\u4ECA\\u5929\",yesterday:\"\\u6628\\u5929\",tomorrow:\"\\u660E\\u5929\",\"Change date\":\"\\u66F4\\u6539\\u65E5\\u671F\",\"Change time\":\"\\u66F4\\u6539\\u65F6\\u95F4\",\"Card title...\":\"\\u5361\\u7247\\u6807\\u9898\\u2026\\u2026\",\"Add card\":\"\\u6DFB\\u52A0\",\"Add a card\":\"\\u6DFB\\u52A0\\u5361\\u7247\",\"Edit card\":\"\\u7F16\\u8F91\\u5361\\u7247\",\"New note from card\":\"\\u4ECE\\u5361\\u7247\\u65B0\\u5EFA\\u7B14\\u8BB0\",\"Archive card\":\"\\u5F52\\u6863\\u5361\\u7247\",\"Delete card\":\"\\u5220\\u9664\\u5361\\u7247\",\"Edit date\":\"\\u7F16\\u8F91\\u65E5\\u671F\",\"Add date\":\"\\u6DFB\\u52A0\\u65E5\\u671F\",\"Remove date\":\"\\u79FB\\u9664\\u65E5\\u671F\",\"Edit time\":\"\\u7F16\\u8F91\\u65F6\\u95F4\",\"Add time\":\"\\u6DFB\\u52A0\\u65F6\\u95F4\",\"Remove time\":\"\\u79FB\\u9664\\u65F6\\u95F4\",\"Duplicate card\":\"\\u590D\\u5236\\u5361\\u7247\",\"Split card\":\"\\u5206\\u79BB\\u5361\\u7247\",\"Copy link to card\":\"\\u590D\\u5236\\u94FE\\u63A5\\u81F3\\u5361\\u7247\",\"Insert card before\":\"\\u5728\\u4E0A\\u65B9\\u63D2\\u5165\\u5361\\u7247\",\"Insert card after\":\"\\u5728\\u4E0B\\u65B9\\u63D2\\u5165\\u5361\\u7247\",\"Move to top\":\"\\u79FB\\u5230\\u9876\\u90E8\",\"Move to bottom\":\"\\u79FB\\u81F3\\u5E95\\u90E8\",\"Enter list title...\":\"\\u8F93\\u5165\\u65B0\\u7684\\u5217\\u6807\\u9898\\u2026\\u2026\",\"Mark cards in this list as complete\":\"\\u5C06\\u8BE5\\u5217\\u8BBE\\u7F6E\\u4E3A\\u5B8C\\u6210\\u5217\",\"Add list\":\"\\u6DFB\\u52A0\",\"Add a list\":\"\\u6DFB\\u52A0\\u5217\",\"Move list\":\"\\u79FB\\u52A8\\u5217\",Close:\"\\u5173\\u95ED\",\"Are you sure you want to delete this list and all its cards?\":\"\\u4F60\\u786E\\u5B9A\\u4F60\\u8981\\u5220\\u9664\\u6574\\u5217\\u4EE5\\u53CA\\u8BE5\\u5217\\u4E0B\\u6240\\u6709\\u5361\\u7247\\u5417\\uFF1F\",\"Yes, delete list\":\"\\u662F\\uFF0C\\u5220\\u9664\\u5217\",\"Are you sure you want to archive this list and all its cards?\":\"\\u4F60\\u786E\\u5B9A\\u4F60\\u8981\\u5F52\\u6863\\u6574\\u5217\\u4EE5\\u53CA\\u8BE5\\u5217\\u4E0B\\u6240\\u6709\\u5361\\u7247\\u5417\\uFF1F\",\"Yes, archive list\":\"\\u662F, \\u5F52\\u6863\\u5217\",\"Are you sure you want to archive all cards in this list?\":\"\\u4F60\\u786E\\u8BA4\\u4F60\\u8981\\u5F52\\u6863\\u5F53\\u524D\\u5217\\u7684\\u6240\\u6709\\u5361\\u7247\\u5417\\uFF1F\",\"Yes, archive cards\":\"\\u662F\\uFF0C\\u5F52\\u6863\\u6240\\u6709\\u5361\\u7247\",\"Edit list\":\"\\u7F16\\u8F91\\u5217\",\"Archive cards\":\"\\u5F52\\u6863\\u5361\\u7247\",\"Archive list\":\"\\u5F52\\u6863\\u5217\",\"Delete list\":\"\\u5220\\u9664\\u5217\",\"Insert list before\":\"\\u5728\\u4E0A\\u65B9\\u63D2\\u5165\\u5217\",\"Insert list after\":\"\\u5728\\u4E0B\\u65B9\\u63D2\\u5165\\u5217\",\"Sort by card text\":\"\\u4EE5\\u5361\\u7247\\u6587\\u672C\\u6392\\u5E8F\",\"Sort by date\":\"\\u4EE5\\u65E5\\u671F\\u6392\\u5E8F\",\"Unable to find\":\"\\u65E0\\u6CD5\\u627E\\u5230\",\"Open in default app\":\"\\u5728\\u9ED8\\u8BA4\\u5E94\\u7528\\u4E2D\\u6253\\u5F00\",Submit:\"\\u63D0\\u4EA4\"},db=_A;var MA={},fb=MA;var TA={ar:Kw,cz:jw,da:qw,de:Gw,en:yh,es:Jw,fr:Zw,hi:Qw,id:Xw,it:eb,ja:tb,ko:nb,nl:rb,no:ib,pl:ab,\"pt-BR\":sb,pt:ob,ro:lb,ru:ub,sq:cb,tr:Tu,uk:Tu,\"zh-TW\":fb,zh:db},hb=window.localStorage.getItem(\"language\"),vh=TA[hb||\"en\"];function R(e){return vh||console.error(\"Error: kanban locale not found\",hb),vh&&vh[e]||yh[e]}var Ln={prioritySymbols:{Highest:\"\\u{1F53A}\",High:\"\\u23EB\",Medium:\"\\u{1F53C}\",Low:\"\\u{1F53D}\",Lowest:\"\\u23EC\",None:\"\"},startDateSymbol:\"\\u{1F6EB}\",createdDateSymbol:\"\\u2795\",scheduledDateSymbol:\"\\u23F3\",dueDateSymbol:\"\\u{1F4C5}\",doneDateSymbol:\"\\u2705\",cancelledDateSymbol:\"\\u274C\",recurrenceSymbol:\"\\u{1F501}\",dependsOnSymbol:\"\\u26D4\",idSymbol:\"\\u{1F194}\"};function mb(e,t){switch(e){case\"priority\":return FA(t);case\"start\":return Ln.startDateSymbol;case\"created\":return Ln.createdDateSymbol;case\"scheduled\":return Ln.scheduledDateSymbol;case\"due\":return Ln.dueDateSymbol;case\"completion\":return Ln.doneDateSymbol;case\"cancelled\":return Ln.cancelledDateSymbol;case\"repeat\":return Ln.recurrenceSymbol;case\"dependsOn\":return Ln.dependsOnSymbol;case\"id\":return Ln.idSymbol}return e}function No(e){switch(e){case\"priority\":return R(\"Priority\");case\"start\":return R(\"Start\");case\"created\":return R(\"Created\");case\"scheduled\":return R(\"Scheduled\");case\"due\":return R(\"Due\");case\"completion\":return R(\"Done\");case\"cancelled\":return R(\"Cancelled\");case\"repeat\":return R(\"Recurrence\");case\"dependsOn\":return R(\"Depends on\");case\"id\":return R(\"ID\")}return e}function FA(e){switch(e){case\"0\":return Ln.prioritySymbols.Highest;case\"1\":return Ln.prioritySymbols.High;case\"2\":return Ln.prioritySymbols.Medium;case\"4\":return Ln.prioritySymbols.Low;case\"5\":return Ln.prioritySymbols.Lowest}return null}function IA(e){switch(e){case Ln.prioritySymbols.Highest:return\"0\";case Ln.prioritySymbols.High:return\"1\";case Ln.prioritySymbols.Medium:return\"2\";case Ln.prioritySymbols.Low:return\"4\";case Ln.prioritySymbols.Lowest:return\"5\"}return null}function wh(){return app.plugins.enabledPlugins.has(\"obsidian-tasks-plugin\")?app.plugins.plugins[\"obsidian-tasks-plugin\"]:null}function bh(){var e;return(e=app.workspace.editorSuggest.suggests.find(t=>t.settings&&t.settings.taskFormat))==null?void 0:e.settings}function Zn(){var n,i;let e=bh(),t=e==null?void 0:e.statusSettings;if(!t)return\"x\";let r=(n=t.coreStatuses)==null?void 0:n.find(a=>a.type===\"DONE\");return r||(r=(i=t.customStatuses)==null?void 0:i.find(a=>a.type===\"DONE\")),r?r.symbol:\"x\"}function Iu(){var i,a;let e=bh(),t=e==null?void 0:e.statusSettings;if(!t)return\" \";let r=Zn(),n=(i=t.coreStatuses)==null?void 0:i.find(o=>o.nextStatusSymbol===r);return n||(n=(a=t.customStatuses)==null?void 0:a.find(o=>o.nextStatusSymbol===r)),n?n.symbol:\" \"}function pb(e,t){var n,i,a;let r=wh();return r&&(a=(i=(n=r.apiV1)==null?void 0:n.executeToggleTaskDoneCommand)==null?void 0:i.call(n,e,t.path))!=null?a:null}function Ro(e,t){var d,m;let r=wh();if(!r)return null;let n=`- [${e.data.checkChar}] `,i=e.data.titleRaw.split(/\\n\\r?/g),a=bh(),o=!!(a!=null&&a.recurrenceOnNextLine),s=0,u=(m=(d=r.apiV1)==null?void 0:d.executeToggleTaskDoneCommand)==null?void 0:m.call(d,n+i[0],t.path);if(!u)return null;let l=[];return[u.split(/\\n/g).map((h,g)=>{(o&&g===0||!o&&g>0)&&(s=g);let y=h.match(/^- \\[([^\\]]+)\\]/);return y!=null&&y[1]&&l.push(y[1]),[h.replace(/^- \\[[^\\]]+\\] */,\"\"),...i.slice(1)].join(`\n`)}),l,s]}var Fu=Object.freeze({\"[\":\"]\",\"(\":\")\"});function AA(e,t){let r=e.indexOf(\"::\",t);if(!(r<0))return{key:e.substring(t,r).trim(),valueIndex:r+2}}function OA(e,t,r,n){let i=0,a=!1;for(let o=t;o<e.length;o++){let s=e.charAt(o);if(s==\"\\\\\"){a=!a;continue}if(a){a=!1;continue}if(s==r?i++:s==n&&i--,i<0)return{value:e.substring(t,o).trim(),endIndex:o+1};a=!1}}function LA(e,t){let r=e.charAt(t),n=AA(e,t+1);if(n===void 0)return;for(let a of Object.keys(Fu).concat(Object.values(Fu)))if(n.key.includes(a))return;let i=OA(e,n.valueIndex,r,Fu[r]);if(i!==void 0)return{key:n.key,value:i.value,start:t,startValue:n.valueIndex,end:i.endIndex,wrapping:r}}var PA=/([\ud83d\udd3a\u23eb\ud83d\udd3c\ud83d\udd3d\u23ec])\\uFE0F?/u,NA=/\ud83d\udeeb *(\\d{4}-\\d{2}-\\d{2})/u,RA=/\u2795 *(\\d{4}-\\d{2}-\\d{2})/u,HA=/[\u23f3\u231b] *(\\d{4}-\\d{2}-\\d{2})/u,BA=/[\ud83d\udcc5\ud83d\udcc6\ud83d\uddd3] *(\\d{4}-\\d{2}-\\d{2})/u,VA=/\u2705 *(\\d{4}-\\d{2}-\\d{2})/u,$A=/\u274c *(\\d{4}-\\d{2}-\\d{2})/u,UA=/\u26d4\\uFE0F? *([a-zA-Z0-9-_]+)/u,WA=/\ud83c\udd94 *([a-zA-Z0-9-_]+)/u,YA=/\ud83d\udd01 *([a-zA-Z0-9; !]+)/u,yi=new Set([\"priority\",\"start\",\"created\",\"scheduled\",\"due\",\"completion\",\"cancelled\",\"id\",\"dependsOn\",\"repeat\"]),zA=[{regex:PA,key:\"priority\"},{regex:NA,key:\"start\"},{regex:RA,key:\"created\"},{regex:HA,key:\"scheduled\"},{regex:BA,key:\"due\"},{regex:VA,key:\"completion\"},{regex:$A,key:\"cancelled\"},{regex:WA,key:\"id\"},{regex:UA,key:\"dependsOn\"},{regex:YA,key:\"repeat\"}];function KA(e){let t=[];for(let{regex:r,key:n}of zA){let i=r.exec(e);if(!i)continue;let a=i[1],o=i.index+i[0].length;if(n===\"priority\")a=IA(a);else if(n===\"repeat\"){let s=a.length;a=Oe.fromText(a).toText(),o-=s-a.length}t.push({key:n,value:a,start:i.index,startValue:i.index+1,end:o,wrapping:\"emoji-shorthand\"})}return t}function gb(e,t=!1){let r=il(),n=wh(),i=[];if(r)for(let o of Object.keys(Fu)){let s=e.indexOf(o);for(;s>=0;){let u=LA(e,s);if(!u){s=e.indexOf(o,s+1);continue}i.push(u),s=e.indexOf(o,u.end)}}n&&t&&(i=i.concat(KA(e))),i.sort((o,s)=>o.start-s.start);let a=[];for(let o=0;o<i.length;o++){let s=i[o];(o==0||a[a.length-1].end<s.start)&&a.push(s)}return a}function il(){return app.plugins.enabledPlugins.has(\"dataview\")?app.plugins.plugins.dataview:null}var Eh=\"kanban-plugin\";function Mr(){}var Dh=new Map;function $(e){if(Dh.has(e))return Dh.get(e);let t=`${Eh}__${e}`;return Dh.set(e,t),t}function et(e=9){return Math.random().toString(36).slice(2,2+e)}function Au(e,t,r,n,i,a,o){var h,g;let s=un(t,r.slice(0,-1)),u=un(i,a.slice(0,-1)),l=(h=s==null?void 0:s.data)==null?void 0:h.shouldMarkItemsComplete,c=(g=u==null?void 0:u.data)==null?void 0:g.shouldMarkItemsComplete;if(!l&&!c)return{next:o};let d=o.data.checked&&o.data.checkChar===Zn();if(c===d)return{next:o};c&&(o=(0,Sh.default)(o,{data:{checkChar:{$set:Iu()}}}));let m=Ro(o,n.file);if(m){let[y,v,D]=m,I,C;return y.forEach((x,O)=>{O===D?I=n.getNewItem(x,v[O]):C=n.getNewItem(x,v[O])}),{next:I,replacement:C}}return{next:(0,Sh.default)(o,{data:{checked:{$set:c},checkChar:{$set:c?Zn():\" \"}}})}}function Ou(){let e=$e.useRef(!1);return{oncompositionstart:()=>{e.current=!0},oncompositionend:()=>{e.current=!1},getShouldIMEBlockAction:()=>e.current}}var jA=/<%/;async function yb(e,t){let r=t?e.app.vault.getAbstractFileByPath(t):null;if(r&&r instanceof da.TFile){let n=app.workspace.getActiveViewOfType(da.MarkdownView);try{(n==null?void 0:n.getMode())!==\"source\"&&await n.setState({...n.getState(),mode:\"source\"},{history:!1});let{templatesEnabled:i,templaterEnabled:a,templatesPlugin:o,templaterPlugin:s}=kh(e.app),u=await e.app.vault.read(r);if(i&&a)return jA.test(u)?await s.append_template_to_active_file(r):await o.instance.insertTemplate(r);if(i)return await o.instance.insertTemplate(r);if(a)return await s.append_template_to_active_file(r);await e.app.vault.modify(e.app.workspace.getActiveFile(),u)}catch(i){console.error(i),e.setError(i)}}}function ja(e){var s,u,l,c,d;let t=e.internalPlugins.plugins,r=(s=t[\"daily-notes\"])==null?void 0:s.enabled,n=(u=t[\"daily-notes\"])==null?void 0:u.instance.options.format,i=(l=e.plugins.plugins[\"nldates-obsidian\"])==null?void 0:l.settings.format,a=(c=t.templates)==null?void 0:c.enabled,o=(d=t.templates)==null?void 0:d.instance.options.dateFormat;return r&&n||i||a&&o||\"YYYY-MM-DD\"}function Ho(e){var a,o,s;let t=e.internalPlugins.plugins,r=(a=e.plugins.plugins[\"nldates-obsidian\"])==null?void 0:a.settings.timeFormat,n=(o=t.templates)==null?void 0:o.enabled,i=(s=t.templates)==null?void 0:s.instance.options.timeFormat;return r||n&&i||\"HH:mm\"}var vb=/[\\\\^$.*+?()[\\]{}|]/g,qA=RegExp(vb.source);function Qn(e){return e&&qA.test(e)?e.replace(vb,\"\\\\$&\"):e||\"\"}function kh(e){var s;let t=e.internalPlugins.plugins.templates,r=t.enabled,n=e.plugins.plugins[\"templater-obsidian\"],i=e.plugins.enabledPlugins.has(\"templater-obsidian\"),a=n&&((s=this.app.plugins.plugins[\"templater-obsidian\"].settings)==null?void 0:s.empty_file_template),o=r?t.instance.options.folder:n?n.settings.template_folder:void 0;return{templatesPlugin:t,templatesEnabled:r,templaterPlugin:n==null?void 0:n.templater,templaterEnabled:i,templaterEmptyFileTemplate:a,templateFolder:o}}function GA(e){let t=(e||[]).reduce((r,n)=>(n.tagKey&&(r[n.tagKey]=n),r),{});return r=>t[r]?t[r]:null}function Lu(e){let t=e.useSetting(\"tag-colors\");return Re(()=>GA(t),[t])}function xh(e){let t=(e||[]).map(n=>{if(n.isToday)return[\"today\",n];if(n.isBefore)return[\"before\",n];if(n.isAfter)return[\"after\",n];let i=n.direction===\"after\"?1:-1,a=(0,da.moment)();return a.add(n.distance*i,n.unit),[a,n]}),r=(0,da.moment)();return t.sort((n,i)=>n[0]===\"today\"?typeof i[0]==\"string\"?-1:i[0].isSame(r,\"day\")?1:-1:i[0]===\"today\"?typeof n[0]==\"string\"?1:n[0].isSame(r,\"day\")?-1:1:n[0]===\"after\"||n[0]===\"before\"?1:i[0]===\"after\"||i[0]===\"before\"||n[0].isBefore(i[0])?-1:1),n=>{let i=(0,da.moment)(),a=t.find(o=>{let s=o[1];if(s.isToday)return n.isSame(i,\"day\");if(s.isAfter)return n.isAfter(i);if(s.isBefore)return n.isBefore(i);let u=\"days\";return s.unit===\"hours\"&&(u=\"hours\"),s.direction===\"before\"?n.isBetween(o[0],i,u,\"[]\"):n.isBetween(i,o[0],u,\"[]\")});return a?a[1]:null}}function fa(e){let t=e.useSetting(\"date-colors\");return Re(()=>xh(t),[t])}function Pu(e,t){let r=t.find(n=>n.metadataKey===e.key);return r?{...r,value:e.value}:{containsMarkdown:!1,label:e.key,metadataKey:e.key,shouldHideLabel:!1,value:e.value}}function Nu(e,t,r){Ae(()=>{var o;let n=0,i=!1,a=()=>{i||++n===e.length&&t()};for(let s of e)(o=s.current)==null||o.onNodeInserted(a,!0);return()=>{i=!0,r()}},[])}function wb(e,t,r,n,i){return Re(()=>{t=t.trim().toLocaleLowerCase();let a=new Set,o=new Set;return t&&e.children.forEach(s=>{let u=!1;s.children.forEach(l=>{l.data.titleSearch.includes(t)&&(u=!0,o.add(l))}),u&&a.add(s)}),{lanes:a,items:o,query:t,search:(s,u)=>{s||(i(!1),r(\"\"),n(\"\")),i(!0),u?(r(s),n(s)):r(s)}}},[e,t,r,n])}var Sb=Ct(Db(),1);var Bo=Sb.default;var Tr={x:0,y:0,maxX:0,maxY:0},vi={x:0,y:0};function Dn(e){return e.win}function ha(e){return e.doc.body}var xb={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0,toJSON(){}},Cb=[0,0,0,0];function Xt(e){return e===void 0?0:e}function Hu(e,t,r,n){return[e.left+Xt(t==null?void 0:t.x)+Xt(r==null?void 0:r.x)-Xt(n==null?void 0:n.x),e.top+Xt(t==null?void 0:t.y)+Xt(r==null?void 0:r.y)-Xt(n==null?void 0:n.y),e.left+e.width+Xt(t==null?void 0:t.x)+Xt(r==null?void 0:r.x)-Xt(n==null?void 0:n.x),e.top+e.height+Xt(t==null?void 0:t.y)+Xt(r==null?void 0:r.y)-Xt(n==null?void 0:n.y)]}function _h(e,t,r,n){let i=Hu(e,t,r,null);return n===\"top\"?(i[3]=i[1]+35,i):n===\"right\"?(i[0]=i[0]+e.width-35,i):n===\"bottom\"?(i[1]=i[1]+e.height-35,i):(i[2]=i[0]+35,i)}function Bu(e,t,r,n,i,a){return[e-Xt(i==null?void 0:i.x)-Xt(a==null?void 0:a.x),t-Xt(i==null?void 0:i.y)-Xt(a==null?void 0:a.y),r-Xt(i==null?void 0:i.x)-Xt(a==null?void 0:a.x),n-Xt(i==null?void 0:i.y)-Xt(a==null?void 0:a.y)]}var QA=e=>XA(e,(t,r)=>t<r);function XA(e,t){if(e.length===0)return-1;let r=e[0],n=0;for(let i=1;i<e.length;i++)t(e[i],r)&&(n=i,r=e[i]);return n}function _b(e,t,r){let n=Mh(e,t,r);if(!n)return null;let i=n.getData().side,a=n.getHitbox(),o=0,s=0;i===\"left\"?(o=0,s=2):i===\"right\"?(o=2,s=0):i===\"top\"?(o=1,s=3):i===\"bottom\"&&(o=3,s=1);let u=Math.abs(t[o]-a[s]),l=Math.abs(a[o]-a[s]);return[n,l-u]}function Eb(e){return[{x:e[0],y:e[1]},{x:e[2],y:e[1]},{x:e[0],y:e[3]},{x:e[2],y:e[3]}]}function qa(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function kb(e){return{x:(e[0]+e[2])/2,y:(e[1]+e[2])/2}}function Mh(e,t,r){let n=Eb(t)[0],i=kb(t),a=r.entityId,o=e.map(u=>{if(u.entityId===a)return 1/0;let l=u.getData(),c=l.acceptsSort,d=u.getHitbox(),m=kb(d);if(c&&!c.contains(r.getData().type))return qa(i,m);let h=Eb(d)[0],g=l.sortAxis===\"horizontal\"?\"x\":\"y\",y=m[g]>n[g]?1e3:0;return qa(h,n)+y}),s=QA(o);return e[s]?e[s]:null}function Th(e){let{scrollLeft:t,scrollTop:r,scrollWidth:n,scrollHeight:i,offsetWidth:a,offsetHeight:o}=e,s=t,u=r,l=n-a,c=i-o;return{x:s,y:u,maxX:Math.max(l,0),maxY:Math.max(c,0)}}function Mb(e,t,r){let n=Math.trunc((r.x-t.x)*100)/100,i=Math.trunc((r.y-t.y)*100)/100;return[e[0]+n,e[1]+i,e[2]+n,e[3]+i]}function Fh(e,t=[0,0,0,0]){let r=e[0]-t[0],n=e[1]-t[1],i=e[2]+t[2],o=e[3]+t[3]-n;return{width:i-r,height:o}}var Vu=class{constructor(t,r,n,i,a,o,s,u){this.isVisible=!1;this.mounted=!1;this.id=n,this.instanceId=et(),this.scopeId=r,this.entityId=`${r}-${n}`,this.emitter=new Bo,this.dndManager=t,this.index=i,this.children=new Map,this.parent=a,this.scrollParent=o,this.getEntityData=()=>u.current,this.sortManager=s}initNodes(t,r){var n,i;if(this.mounted=!0,this.entityNode=t,this.measureNode=r,r.dataset.hitboxid=this.entityId,(n=this.sortManager)==null||n.registerSortable(this.entityId,this.getEntity(xb),t,r),this.scrollParent)this.scrollParent.registerObserverHandler(this.entityId,r,a=>{var s,u;let o=Dn(a.target);if(a.isIntersecting){let l=this.getEntity(a.boundingClientRect);(s=this.parent)==null||s.children.set(this.entityId,{entity:l,manager:this}),this.dndManager.observeResize(r),(!this.parent||this.parent.isVisible)&&(this.dndManager.registerHitboxEntity(this.entityId,l,o),this.children.forEach((c,d)=>{this.dndManager.registerHitboxEntity(d,c.entity,o)}),this.setVisibility(!0))}else this.dndManager.unregisterHitboxEntity(this.entityId,o),this.children.forEach((l,c)=>{this.dndManager.unregisterHitboxEntity(c,o)}),(u=this.parent)==null||u.children.delete(this.entityId),this.dndManager.unobserveResize(r),this.setVisibility(!1)});else{let a=this.getEntity(r.getBoundingClientRect());this.dndManager.observeResize(r),this.dndManager.registerHitboxEntity(this.entityId,a,Dn(t)),(i=this.parent)==null||i.children.set(this.entityId,{entity:a,manager:this}),this.setVisibility(!0)}}setVisibility(t){this.emitter.emit(\"visibility-change\",t),this.isVisible=t,this.children.forEach(r=>{r.manager.setVisibility(t)})}destroy(){var t,r,n;this.mounted&&(this.mounted=!0,this.dndManager.unobserveResize(this.measureNode),(t=this.sortManager)==null||t.unregisterSortable(this.entityId),(r=this.scrollParent)==null||r.unregisterObserverHandler(this.entityId,this.measureNode),this.entityNode&&this.dndManager.unregisterHitboxEntity(this.entityId,Dn(this.entityNode)),(n=this.parent)==null||n.children.delete(this.entityId))}getPath(){var t;return[...((t=this.parent)==null?void 0:t.getPath())||[],this.index]}getEntity(t){var n,i;let r=this;return{scopeId:this.scopeId,entityId:this.entityId,initial:Hu(t,((n=r.scrollParent)==null?void 0:n.scrollState)||Tr,((i=r.scrollParent)==null?void 0:i.getScrollShift())||vi,null),getParentScrollState(){var a;return((a=r.scrollParent)==null?void 0:a.scrollState)||Tr},getParentScrollShift(){var a;return((a=r.scrollParent)==null?void 0:a.getScrollShift())||vi},recalcInitial(){var a,o;this.initial=Hu(r.measureNode.getBoundingClientRect(),((a=r.scrollParent)==null?void 0:a.scrollState)||Tr,((o=r.scrollParent)==null?void 0:o.getScrollShift())||vi,null)},getHitbox(){return Bu(this.initial[0],this.initial[1],this.initial[2],this.initial[3],this.getParentScrollState(),this.getParentScrollShift())},getPath(){return r.getPath()},getData(){var a;return{...r.getEntityData(),sortAxis:(a=r.sortManager)==null?void 0:a.axis,win:Dn(r.measureNode)}}}}};var Vo=class{constructor(){this.scrollStates=new Map,this.idScopes=new Map}setScrollState(t,r,n){if(this.scrollStates.set(r,n),this.idScopes.has(r)){let i=this.idScopes.get(r);i.has(t)||i.add(t)}else this.idScopes.set(r,new Set([t]))}getScrollState(t){return this.scrollStates.has(t)?this.scrollStates.get(t):Tr}unmountScope(t){let r=[];this.idScopes.forEach((n,i)=>{n.has(t)&&(n.delete(t),n.size===0&&r.push(i))}),r.forEach(n=>{this.idScopes.delete(n),this.scrollStates.delete(n)})}};var cn=$e.createContext(null),ma=$e.createContext(\"\"),ol=$e.createContext(null),sl=$e.createContext(new Vo),$u=$e.createContext(null),$o=$e.createContext(null),Uu=$e.createContext(null);var eO=0,ZU=Array.isArray;function E(e,t,r,n,i,a){var o,s,u={};for(s in t)s==\"ref\"?o=t[s]:u[s]=t[s];var l={type:e,props:u,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--eO,__i:-1,__u:0,__source:i,__self:a};if(typeof e==\"function\"&&(o=e.defaultProps))for(s in o)u[s]===void 0&&(u[s]=o[s]);return Xe.vnode&&Xe.vnode(l),l}function Tb(e){return E(ct,{children:e.children})}var ei=zt(function({id:t,index:r,elementRef:n,measureRef:i,children:a,data:o}){let s=Ee(cn),u=Ee($u),l=Ee(ma),c=Ee($o),d=Ee(ol),m=Fe(o),h=Fe();m.current=o;let g=Re(()=>{if(s){h.current&&h.current.destroy();let y=new Vu(s,l,t,r,c,d,u,m);return n.current&&i.current&&y.initNodes(n.current,i.current),h.current=y,y}return null},[t,r,s,l,c,d,u]);return Nu([n,i],()=>{var y;(y=h.current)==null||y.initNodes(n.current,i.current)},()=>{var y;(y=h.current)==null||y.destroy()}),g?E($o.Provider,{value:g,children:a}):null});function Ui(e){var i;let t=Ee($o),r=Ee(Uu),n=(i=r!=null?r:t==null?void 0:t.getPath())!=null?i:[];return e!==void 0&&n.push(e),Re(()=>n,n)}var pg=Ct(UD());var vL=new Map([[\"avi\",\"video/avi\"],[\"gif\",\"image/gif\"],[\"ico\",\"image/x-icon\"],[\"jpeg\",\"image/jpeg\"],[\"jpg\",\"image/jpeg\"],[\"mkv\",\"video/x-matroska\"],[\"mov\",\"video/quicktime\"],[\"mp4\",\"video/mp4\"],[\"pdf\",\"application/pdf\"],[\"png\",\"image/png\"],[\"zip\",\"application/zip\"],[\"doc\",\"application/msword\"],[\"docx\",\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"]]);function ml(e,t){var r=wL(e);if(typeof r.path!=\"string\"){var n=e.webkitRelativePath;Object.defineProperty(r,\"path\",{value:typeof t==\"string\"?t:typeof n==\"string\"&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}function wL(e){var t=e.name,r=t&&t.lastIndexOf(\".\")!==-1;if(r&&!e.type){var n=t.split(\".\").pop().toLowerCase(),i=vL.get(n);i&&Object.defineProperty(e,\"type\",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var bL=[\".DS_Store\",\"Thumbs.db\"];function Jh(e){return Ao(this,void 0,void 0,function(){return Oo(this,function(t){return[2,DL(e)&&e.dataTransfer?kL(e.dataTransfer,e.type):SL(e)]})})}function DL(e){return!!e.dataTransfer}function SL(e){var t=EL(e.target)?e.target.files?Gh(e.target.files):[]:[];return t.map(function(r){return ml(r)})}function EL(e){return e!==null}function kL(e,t){return Ao(this,void 0,void 0,function(){var r,n;return Oo(this,function(i){switch(i.label){case 0:return e.items?(r=Gh(e.items).filter(function(a){return a.kind===\"file\"}),t!==\"drop\"?[2,r]:[4,Promise.all(r.map(xL))]):[3,2];case 1:return n=i.sent(),[2,WD(zD(n))];case 2:return[2,WD(Gh(e.files).map(function(a){return ml(a)}))]}})})}function WD(e){return e.filter(function(t){return bL.indexOf(t.name)===-1})}function Gh(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(n)}return t}function xL(e){if(typeof e.webkitGetAsEntry!=\"function\")return YD(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?KD(t):YD(e)}function zD(e){return e.reduce(function(t,r){return hw(t,Array.isArray(r)?zD(r):[r])},[])}function YD(e){var t=e.getAsFile();if(!t)return Promise.reject(e+\" is not a File\");var r=ml(t);return Promise.resolve(r)}function CL(e){return Ao(this,void 0,void 0,function(){return Oo(this,function(t){return[2,e.isDirectory?KD(e):_L(e)]})})}function KD(e){var t=e.createReader();return new Promise(function(r,n){var i=[];function a(){var o=this;t.readEntries(function(s){return Ao(o,void 0,void 0,function(){var u,l,c;return Oo(this,function(d){switch(d.label){case 0:if(s.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return u=d.sent(),r(u),[3,4];case 3:return l=d.sent(),n(l),[3,4];case 4:return[3,6];case 5:c=Promise.all(s.map(CL)),i.push(c),a(),d.label=6;case 6:return[2]}})})},function(s){n(s)})}a()})}function _L(e){return Ao(this,void 0,void 0,function(){return Oo(this,function(t){return[2,new Promise(function(r,n){e.file(function(i){var a=ml(i,e.fullPath);r(a)},function(i){n(i)})})]})})}var An=require(\"obsidian\");var Vl=Ct(o0());var pk=require(\"obsidian\");var li=require(\"obsidian\"),cg=Ct(Ic());var $S=Ct(HS()),US=Ct(Wm()),cs=require(\"obsidian\");var{compare:ZP}=new Intl.Collator(void 0,{usage:\"sort\",sensitivity:\"base\",numeric:!0}),fr=ZP,Ol=class{constructor(){this.settled=!1;this.promise=new Promise((t,r)=>{this.resolve=n=>{this.settled=!0,t(n)},this.reject=n=>{this.settled=!0,r(n)}})}},Ac=class{constructor(t){this.onComplete=t;this.queue=[];this.isRunning=!1}clear(){this.queue.length=0,this.isRunning=!1}add(t){this.queue.push(t),this.isRunning||this.run()}async run(){this.isRunning=!0;let{queue:t}=this,r=performance.now();for(;t.length;){let n=t.splice(0,5);try{await Promise.all(n.map(a=>a()))}catch(a){console.error(a)}if(!this.isRunning)return;let i=performance.now();i-r>50&&(await new Promise(a=>activeWindow.setTimeout(a)),r=i)}this.isRunning=!1,this.onComplete()}};var us=require(\"obsidian\"),QP=/\\u00A0/g;function Ym(e){let r=e.replace(QP,\" \").normalize(\"NFC\").split(/\\|(.*)/),n=r[0].split(/#(.*)/);return{root:n[0],subpath:n[1]?\"#\"+n[1]:\"\",alias:r[1]||\"\"}}function BS(e){e.querySelectorAll(\".task-list-item-checkbox\").forEach((r,n)=>{r.dataset.checkboxIndex=n.toString()})}function VS(e){let{contentEl:t,app:r}=e,n=a=>{let o=a.getAttr(\"data-href\")||a.getAttr(\"href\");return o?{href:o,displayText:a.getText().trim()}:null},i=(a,o)=>{if(a.button!==0&&a.button!==1)return;let s=n(o);s&&(a.preventDefault(),r.workspace.openLinkText(s.href,e.file.path,us.Keymap.isModEvent(a)))};t.on(\"click\",\"a.internal-link\",i),t.on(\"auxclick\",\"a.internal-link\",i),t.on(\"dragstart\",\"a.internal-link\",a=>{a.preventDefault()}),t.on(\"contextmenu\",\"a.internal-link\",(a,o)=>{let s=n(o);if(!s)return;let u=new us.Menu;u.addSections([\"title\",\"open\",\"action\",\"view\",\"info\",\"\",\"danger\"]),r.workspace.handleLinkContextMenu(u,s.href,e.file.path),u.showAtMouseEvent(a)}),t.on(\"mouseover\",\"a.internal-link\",(a,o)=>{let s=n(o);s&&r.workspace.trigger(\"hover-link\",{event:a,source:\"preview\",hoverParent:e,targetEl:o,linktext:s.href,sourcePath:e.file.path})}),t.on(\"click\",\"a.external-link\",(a,o)=>{let s=n(o);if(!s||(a.preventDefault(),!s.href||s.href.contains(\" \")))return;try{new URL(s.href)}catch(c){return}let u=us.Keymap.isModEvent(a),l=typeof u==\"boolean\"?\"\":u;window.open(s.href,l)}),t.on(\"contextmenu\",\"a.external-link\",(a,o)=>{let s=n(o);if(!s)return;let u=new us.Menu;u.addSections([\"title\",\"open\",\"selection\",\"clipboard\",\"action\",\"view\",\"info\",\"\",\"danger\"]),r.workspace.handleExternalLinkContextMenu(u,s.href),u.showAtMouseEvent(a)}),t.on(\"click\",\"a.tag\",(a,o)=>{if(a.button!==0)return;let s=o.getText(),u=r.internalPlugins.getPluginById(\"global-search\");e.plugin.getStateManager(e.file).getSetting(\"tag-action\")===\"kanban\"?e.emitter.emit(\"hotkey\",{commandId:\"editor:open-search\",data:s}):u&&u.instance.openGlobalSearch(`tag:${s}`)})}var tt=aa(null),zn=aa(null),Oc=aa(null),Lc=aa(null);function zm(e,t){if(!e)return;let r=e.querySelectorAll(\"a.tag\");r!=null&&r.length&&r.forEach(n=>{let i=t(n.getAttr(\"href\"));i&&n.setCssProps({\"--tag-color\":i.color,\"--tag-background\":i.backgroundColor})})}function Km(e,t){if(!e)return;let r=e.querySelectorAll(\".\"+$(\"date\"));r!=null&&r.length&&r.forEach(n=>{let i=n.dataset.date;if(!i)return;let a=(0,US.default)(i);if(!a.isValid())return;let o=t(a);n.toggleClass(\"has-background\",!!(o!=null&&o.backgroundColor)),o&&n.setCssProps({\"--date-color\":o.color,\"--date-background-color\":o.backgroundColor})})}var Ll=class extends cs.Component{constructor(r,n){super();this.view=r;this.markdown=n;this.isVisible=!1;this.lastWidth=-1;this.lastHeight=-1;this.lastRefWidth=-1;this.lastRefHeight=-1;this.containerEl=createDiv(\"markdown-preview-view markdown-rendered \"+$(\"markdown-preview-view\")),this.mark=new $S.default(this.containerEl),this.renderCapability=new Ol}onload(){this.render()}async render(){var n;if(this.containerEl.empty(),await cs.MarkdownRenderer.render(this.view.app,this.markdown,this.containerEl,this.view.file.path,this),this.renderCapability.resolve(),!((n=this.view)!=null&&n._loaded)||!this._loaded)return;let{containerEl:r}=this;this.resolveLinks(),BS(r),this.observer=new ResizeObserver(i=>{if(!i.length)return;let a=i.first().contentBoxSize[0];if(a.blockSize!==0){if(this.wrapperEl){let o=this.wrapperEl.getBoundingClientRect();(this.lastRefHeight===-1||o.height>0)&&(this.lastRefHeight=o.height,this.lastRefWidth=o.width)}this.lastWidth=a.inlineSize,this.lastHeight=a.blockSize}}),r.win.setTimeout(()=>{this.observer.observe(r,{box:\"border-box\"})}),r.addEventListener(\"click\",i=>{let{targetNode:a}=i;a.instanceOf(HTMLElement)&&a.hasClass(\"task-list-item-checkbox\")&&!a.closest(\".markdown-embed\")&&(i.preventDefault(),i.stopPropagation())},{capture:!0}),r.addEventListener(\"contextmenu\",i=>{let{targetNode:a}=i;a.instanceOf(HTMLElement)&&a.hasClass(\"task-list-item-checkbox\")&&(i.preventDefault(),i.stopPropagation())},{capture:!0})}migrate(r){let{lastRefHeight:n,lastRefWidth:i,containerEl:a}=this;this.wrapperEl=r,n>0&&(r.style.width=`${i}px`,r.style.height=`${n}px`,r.win.setTimeout(()=>{r.style.width=\"\",r.style.height=\"\"},50)),a.parentElement!==r&&r.append(a),this.mark.unmark()}show(){let{wrapperEl:r,containerEl:n}=this;r&&(r.append(n),r.style.minHeight&&(r.style.minHeight=\"\"),this.isVisible=!0)}hide(){let{containerEl:r,wrapperEl:n}=this;n&&(n.style.minHeight=this.lastRefHeight+\"px\",r.detach(),this.isVisible=!1)}set(r){this._loaded&&(this.markdown=r,this.renderCapability=new Ol,this.unload(),this.load())}resolveLinks(){let{containerEl:r,view:n}=this,i=r.findAll(\"a.internal-link\");for(let a of i){let o=this.getInternalLinkHref(a);if(!o)continue;let s=(0,cs.getLinkpath)(o),u=n.app.metadataCache.getFirstLinkpathDest(s,n.file.path);a.toggleClass(\"is-unresolved\",!u)}}getInternalLinkHref(r){let n=r.getAttr(\"data-href\")||r.getAttr(\"href\");return n||null}},Sa=zt(function({entityId:t,className:r,markdownString:n,searchQuery:i,...a}){let{view:o,stateManager:s}=Ee(tt),u=Ee($o),l=Ee(cn),c=Ee(Oc),d=Ee(Lc),m=Lu(s),h=fa(s),g=Fe(),y=Fe();Ae(()=>{var I;if(!u||!t||!g.current)return;let D=(I=u==null?void 0:u.scrollParent)==null?void 0:I.observer;D&&(D.unobserve(u.measureNode),D.observe(u.measureNode))},[c]),Ae(()=>{if(!(!d||!y.current))return d.registerHandler(y.current,D=>{var I,C;D.isIntersecting?(I=g.current)==null||I.show():(C=g.current)==null||C.hide()}),()=>{y.current&&(d==null||d.unregisterHandler(y.current))}},[]),Ae(()=>{let D=x=>{let O=g.current;if(!O||!(u!=null&&u.parent))return;let{dragManager:A}=l;A.dragEntityId!==u.entityId&&A.dragEntityId!==u.parent.entityId&&(O.isVisible&&!x?O.hide():!O.isVisible&&x&&O.show())};if(t&&o.previewCache.has(t)){let x=o.previewCache.get(t);return g.current=x,x.migrate(y.current),u==null||u.emitter.on(\"visibility-change\",D),()=>u==null?void 0:u.emitter.off(\"visibility-change\",D)}let I=new Ll(o,n);I.wrapperEl=y.current;let C=g.current=o.addChild(I);return t&&o.previewCache.set(t,C),y.current.empty(),y.current.append(C.containerEl),zm(y.current,m),Km(y.current,h),u==null||u.emitter.on(\"visibility-change\",D),()=>{var x;(x=g.current)==null||x.renderCapability.resolve(),u==null||u.emitter.off(\"visibility-change\",D)}},[o,t,u]),Ae(()=>{let D=g.current;!D||n===D.markdown||(D.renderCapability.resolve(),D.set(n),D.renderCapability.promise.then(()=>{zm(y.current,m),Km(y.current,h)}))},[n]),Ae(()=>{g.current&&(zm(y.current,m),Km(y.current,h))},[m,h]),Ae(()=>{let D=g.current;D&&(D.mark.unmark(),i&&i.trim()&&D.mark.mark(i))},[i]),Ae(()=>{let D=g.current;y.current&&D&&D.wrapperEl!==y.current&&D.migrate(y.current)},[]);let v;if(!g.current&&o.previewCache.has(t)){let D=o.previewCache.get(t);D.lastRefHeight>0&&(v={width:`${D.lastRefWidth}px`,height:`${D.lastRefHeight}px`})}return E(\"div\",{style:v,ref:y,className:Ge([$(\"markdown-preview-wrapper\"),r]),...a})}),WS=zt(function({entityId:t,className:r,...n}){let{view:i}=Ee(tt),a=Fe(),o=i.previewCache.get(t),s;return o&&o.lastRefHeight>0&&(s={width:`${o.lastRefWidth}px`,height:`${o.lastRefHeight}px`}),E(\"div\",{style:s,ref:u=>{a.current=u,u&&o&&u.childElementCount===0&&u.append(o.containerEl.cloneNode(!0))},className:Ge([$(\"markdown-preview-wrapper\"),r]),...n})});var ck=require(\"@codemirror/commands\"),fs=require(\"@codemirror/state\"),lo=require(\"@codemirror/view\");var xa=require(\"obsidian\");var ft={Item:\"item\",Lane:\"lane\",Board:\"board\",MetadataSetting:\"metadata-setting\",TagColorSetting:\"tag-color\",TagSortSetting:\"tag-sort\",DateColorSetting:\"date-color\"},Pc={accepts:[ft.Item],type:ft.Item,children:[]},Ea={accepts:[ft.Lane],type:ft.Lane},Nc={accepts:[],type:ft.Board},Rc={accepts:[ft.MetadataSetting],type:ft.MetadataSetting,children:[]},Hc={accepts:[ft.TagSortSetting],type:ft.TagSortSetting,children:[]},Bc={accepts:[],type:ft.TagColorSetting,children:[]},Vc={accepts:[],type:ft.DateColorSetting,children:[]};function kn(e){return!(e===null||typeof e==\"number\")}var YS=require(\"@codemirror/state\"),si=require(\"@codemirror/view\"),zS=require(\"obsidian\");var Uc=YS.StateField.define({create(){return null},update(e){return e}}),jm=class extends si.WidgetType{constructor(t,r,n){super(),this.stateManager=t,this.type=n,this.date=r}eq(t){return this.date.isSame(t.date)}toDOM(){return createSpan({cls:`cm-kanban-${this.type}-wrapper`},t=>{t.createSpan({cls:`cm-kanban-${this.type}`,text:this.date.format(this.stateManager.getSetting(this.type===\"time\"?\"time-format\":\"date-display-format\"))})})}ignoreEvent(){return!1}};function XP(e){return(t,r,n,i,a)=>{let o=a.state.field(Uc);if(!o)return;let s=i[1],u=(0,zS.moment)(s,o.getSetting(e===\"date\"?\"date-format\":\"time-format\"));u.isValid()&&t(r,n,si.Decoration.replace({widget:new jm(o,u,e)}))}}var qm=class{constructor(t,r,n){this.decorator=new si.MatchDecorator({regexp:r,decorate:XP(n)}),this.decos=this.decorator.createDeco(t)}update(t){t.docChanged&&(this.decos=this.decorator.createDeco(t.view))}},eN={decorations:e=>e.decos,provide:e=>si.EditorView.atomicRanges.of(t=>{var r;return((r=t.plugin(e))==null?void 0:r.decos)||si.Decoration.none})};function $c(e,t){return si.ViewPlugin.define(r=>{let i=r.state.field(Uc).getSetting(e===\"date\"?\"date-trigger\":\"time-trigger\");return new qm(r,new RegExp(`${Qn(i)}${t}`,\"g\"),e)},eN)}var KS=[$c(\"time\",\"{([^}]+)}\"),$c(\"date\",\"{([^}]+)}\"),$c(\"date\",\"\\\\[\\\\[([^\\\\]]+)\\\\]\\\\]\"),$c(\"date\",\"\\\\[([^\\\\]]+)\\\\]\\\\([^)]+\\\\)\")];var Hl=require(\"obsidian\");var ok=require(\"obsidian\");var ek=require(\"obsidian\");var jS=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Gm={weekdays:{shorthand:[\"\\u0623\\u062D\\u062F\",\"\\u0627\\u062B\\u0646\\u064A\\u0646\",\"\\u062B\\u0644\\u0627\\u062B\\u0627\\u0621\",\"\\u0623\\u0631\\u0628\\u0639\\u0627\\u0621\",\"\\u062E\\u0645\\u064A\\u0633\",\"\\u062C\\u0645\\u0639\\u0629\",\"\\u0633\\u0628\\u062A\"],longhand:[\"\\u0627\\u0644\\u0623\\u062D\\u062F\",\"\\u0627\\u0644\\u0627\\u062B\\u0646\\u064A\\u0646\",\"\\u0627\\u0644\\u062B\\u0644\\u0627\\u062B\\u0627\\u0621\",\"\\u0627\\u0644\\u0623\\u0631\\u0628\\u0639\\u0627\\u0621\",\"\\u0627\\u0644\\u062E\\u0645\\u064A\\u0633\",\"\\u0627\\u0644\\u062C\\u0645\\u0639\\u0629\",\"\\u0627\\u0644\\u0633\\u0628\\u062A\"]},months:{shorthand:[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\"],longhand:[\"\\u064A\\u0646\\u0627\\u064A\\u0631\",\"\\u0641\\u0628\\u0631\\u0627\\u064A\\u0631\",\"\\u0645\\u0627\\u0631\\u0633\",\"\\u0623\\u0628\\u0631\\u064A\\u0644\",\"\\u0645\\u0627\\u064A\\u0648\",\"\\u064A\\u0648\\u0646\\u064A\\u0648\",\"\\u064A\\u0648\\u0644\\u064A\\u0648\",\"\\u0623\\u063A\\u0633\\u0637\\u0633\",\"\\u0633\\u0628\\u062A\\u0645\\u0628\\u0631\",\"\\u0623\\u0643\\u062A\\u0648\\u0628\\u0631\",\"\\u0646\\u0648\\u0641\\u0645\\u0628\\u0631\",\"\\u062F\\u064A\\u0633\\u0645\\u0628\\u0631\"]},firstDayOfWeek:6,rangeSeparator:\" \\u0625\\u0644\\u0649 \",weekAbbreviation:\"Wk\",scrollTitle:\"\\u0642\\u0645 \\u0628\\u0627\\u0644\\u062A\\u0645\\u0631\\u064A\\u0631 \\u0644\\u0644\\u0632\\u064A\\u0627\\u062F\\u0629\",toggleTitle:\"\\u0627\\u0636\\u063A\\u0637 \\u0644\\u0644\\u062A\\u0628\\u062F\\u064A\\u0644\",amPM:[\"\\u0635\",\"\\u0645\"],yearAriaLabel:\"\\u0633\\u0646\\u0629\",monthAriaLabel:\"\\u0634\\u0647\\u0631\",hourAriaLabel:\"\\u0633\\u0627\\u0639\\u0629\",minuteAriaLabel:\"\\u062F\\u0642\\u064A\\u0642\\u0629\",time_24hr:!1};jS.l10ns.ar=Gm;var JW=jS.l10ns;var qS=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Jm={weekdays:{shorthand:[\"So\",\"Mo\",\"Di\",\"Mi\",\"Do\",\"Fr\",\"Sa\"],longhand:[\"Sonntag\",\"Montag\",\"Dienstag\",\"Mittwoch\",\"Donnerstag\",\"Freitag\",\"Samstag\"]},months:{shorthand:[\"J\\xE4n\",\"Feb\",\"M\\xE4r\",\"Apr\",\"Mai\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Okt\",\"Nov\",\"Dez\"],longhand:[\"J\\xE4nner\",\"Februar\",\"M\\xE4rz\",\"April\",\"Mai\",\"Juni\",\"Juli\",\"August\",\"September\",\"Oktober\",\"November\",\"Dezember\"]},firstDayOfWeek:1,weekAbbreviation:\"KW\",rangeSeparator:\" bis \",scrollTitle:\"Zum \\xC4ndern scrollen\",toggleTitle:\"Zum Umschalten klicken\",time_24hr:!0};qS.l10ns.at=Jm;var QW=qS.l10ns;var GS=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Zm={weekdays:{shorthand:[\"B.\",\"B.e.\",\"\\xC7.a.\",\"\\xC7.\",\"C.a.\",\"C.\",\"\\u015E.\"],longhand:[\"Bazar\",\"Bazar ert\\u0259si\",\"\\xC7\\u0259r\\u015F\\u0259nb\\u0259 ax\\u015Fam\\u0131\",\"\\xC7\\u0259r\\u015F\\u0259nb\\u0259\",\"C\\xFCm\\u0259 ax\\u015Fam\\u0131\",\"C\\xFCm\\u0259\",\"\\u015E\\u0259nb\\u0259\"]},months:{shorthand:[\"Yan\",\"Fev\",\"Mar\",\"Apr\",\"May\",\"\\u0130yn\",\"\\u0130yl\",\"Avq\",\"Sen\",\"Okt\",\"Noy\",\"Dek\"],longhand:[\"Yanvar\",\"Fevral\",\"Mart\",\"Aprel\",\"May\",\"\\u0130yun\",\"\\u0130yul\",\"Avqust\",\"Sentyabr\",\"Oktyabr\",\"Noyabr\",\"Dekabr\"]},firstDayOfWeek:1,ordinal:()=>\".\",rangeSeparator:\" - \",weekAbbreviation:\"Hf\",scrollTitle:\"Art\\u0131rmaq \\xFC\\xE7\\xFCn s\\xFCr\\xFC\\u015Fd\\xFCr\\xFCn\",toggleTitle:\"A\\xE7 / Ba\\u011Fla\",amPM:[\"G\\u018F\",\"GS\"],time_24hr:!0};GS.l10ns.az=Zm;var e4=GS.l10ns;var JS=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Qm={weekdays:{shorthand:[\"\\u041D\\u0434\",\"\\u041F\\u043D\",\"\\u0410\\u045E\",\"\\u0421\\u0440\",\"\\u0427\\u0446\",\"\\u041F\\u0442\",\"\\u0421\\u0431\"],longhand:[\"\\u041D\\u044F\\u0434\\u0437\\u0435\\u043B\\u044F\",\"\\u041F\\u0430\\u043D\\u044F\\u0434\\u0437\\u0435\\u043B\\u0430\\u043A\",\"\\u0410\\u045E\\u0442\\u043E\\u0440\\u0430\\u043A\",\"\\u0421\\u0435\\u0440\\u0430\\u0434\\u0430\",\"\\u0427\\u0430\\u0446\\u0432\\u0435\\u0440\",\"\\u041F\\u044F\\u0442\\u043D\\u0456\\u0446\\u0430\",\"\\u0421\\u0443\\u0431\\u043E\\u0442\\u0430\"]},months:{shorthand:[\"\\u0421\\u0442\\u0443\",\"\\u041B\\u044E\\u0442\",\"\\u0421\\u0430\\u043A\",\"\\u041A\\u0440\\u0430\",\"\\u0422\\u0440\\u0430\",\"\\u0427\\u044D\\u0440\",\"\\u041B\\u0456\\u043F\",\"\\u0416\\u043D\\u0456\",\"\\u0412\\u0435\\u0440\",\"\\u041A\\u0430\\u0441\",\"\\u041B\\u0456\\u0441\",\"\\u0421\\u043D\\u0435\"],longhand:[\"\\u0421\\u0442\\u0443\\u0434\\u0437\\u0435\\u043D\\u044C\",\"\\u041B\\u044E\\u0442\\u044B\",\"\\u0421\\u0430\\u043A\\u0430\\u0432\\u0456\\u043A\",\"\\u041A\\u0440\\u0430\\u0441\\u0430\\u0432\\u0456\\u043A\",\"\\u0422\\u0440\\u0430\\u0432\\u0435\\u043D\\u044C\",\"\\u0427\\u044D\\u0440\\u0432\\u0435\\u043D\\u044C\",\"\\u041B\\u0456\\u043F\\u0435\\u043D\\u044C\",\"\\u0416\\u043D\\u0456\\u0432\\u0435\\u043D\\u044C\",\"\\u0412\\u0435\\u0440\\u0430\\u0441\\u0435\\u043D\\u044C\",\"\\u041A\\u0430\\u0441\\u0442\\u0440\\u044B\\u0447\\u043D\\u0456\\u043A\",\"\\u041B\\u0456\\u0441\\u0442\\u0430\\u043F\\u0430\\u0434\",\"\\u0421\\u043D\\u0435\\u0436\\u0430\\u043D\\u044C\"]},firstDayOfWeek:1,ordinal:function(){return\"\"},rangeSeparator:\" \\u2014 \",weekAbbreviation:\"\\u0422\\u044B\\u0434.\",scrollTitle:\"\\u041F\\u0440\\u0430\\u043A\\u0440\\u0443\\u0446\\u0456\\u0446\\u0435 \\u0434\\u043B\\u044F \\u043F\\u0430\\u0432\\u0435\\u043B\\u0456\\u0447\\u044D\\u043D\\u043D\\u044F\",toggleTitle:\"\\u041D\\u0430\\u0446\\u0456\\u0441\\u043D\\u0456\\u0446\\u0435 \\u0434\\u043B\\u044F \\u043F\\u0435\\u0440\\u0430\\u043A\\u043B\\u044E\\u0447\\u044D\\u043D\\u043D\\u044F\",amPM:[\"\\u0414\\u041F\",\"\\u041F\\u041F\"],yearAriaLabel:\"\\u0413\\u043E\\u0434\",time_24hr:!0};JS.l10ns.be=Qm;var n4=JS.l10ns;var ZS=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Xm={weekdays:{shorthand:[\"\\u041D\\u0434\",\"\\u041F\\u043D\",\"\\u0412\\u0442\",\"\\u0421\\u0440\",\"\\u0427\\u0442\",\"\\u041F\\u0442\",\"\\u0421\\u0431\"],longhand:[\"\\u041D\\u0435\\u0434\\u0435\\u043B\\u044F\",\"\\u041F\\u043E\\u043D\\u0435\\u0434\\u0435\\u043B\\u043D\\u0438\\u043A\",\"\\u0412\\u0442\\u043E\\u0440\\u043D\\u0438\\u043A\",\"\\u0421\\u0440\\u044F\\u0434\\u0430\",\"\\u0427\\u0435\\u0442\\u0432\\u044A\\u0440\\u0442\\u044A\\u043A\",\"\\u041F\\u0435\\u0442\\u044A\\u043A\",\"\\u0421\\u044A\\u0431\\u043E\\u0442\\u0430\"]},months:{shorthand:[\"\\u042F\\u043D\\u0443\",\"\\u0424\\u0435\\u0432\",\"\\u041C\\u0430\\u0440\\u0442\",\"\\u0410\\u043F\\u0440\",\"\\u041C\\u0430\\u0439\",\"\\u042E\\u043D\\u0438\",\"\\u042E\\u043B\\u0438\",\"\\u0410\\u0432\\u0433\",\"\\u0421\\u0435\\u043F\",\"\\u041E\\u043A\\u0442\",\"\\u041D\\u043E\\u0435\",\"\\u0414\\u0435\\u043A\"],longhand:[\"\\u042F\\u043D\\u0443\\u0430\\u0440\\u0438\",\"\\u0424\\u0435\\u0432\\u0440\\u0443\\u0430\\u0440\\u0438\",\"\\u041C\\u0430\\u0440\\u0442\",\"\\u0410\\u043F\\u0440\\u0438\\u043B\",\"\\u041C\\u0430\\u0439\",\"\\u042E\\u043D\\u0438\",\"\\u042E\\u043B\\u0438\",\"\\u0410\\u0432\\u0433\\u0443\\u0441\\u0442\",\"\\u0421\\u0435\\u043F\\u0442\\u0435\\u043C\\u0432\\u0440\\u0438\",\"\\u041E\\u043A\\u0442\\u043E\\u043C\\u0432\\u0440\\u0438\",\"\\u041D\\u043E\\u0435\\u043C\\u0432\\u0440\\u0438\",\"\\u0414\\u0435\\u043A\\u0435\\u043C\\u0432\\u0440\\u0438\"]},time_24hr:!0,firstDayOfWeek:1};ZS.l10ns.bg=Xm;var i4=ZS.l10ns;var QS=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},ep={weekdays:{shorthand:[\"\\u09B0\\u09AC\\u09BF\",\"\\u09B8\\u09CB\\u09AE\",\"\\u09AE\\u0999\\u09CD\\u0997\\u09B2\",\"\\u09AC\\u09C1\\u09A7\",\"\\u09AC\\u09C3\\u09B9\\u09B8\\u09CD\\u09AA\\u09A4\\u09BF\",\"\\u09B6\\u09C1\\u0995\\u09CD\\u09B0\",\"\\u09B6\\u09A8\\u09BF\"],longhand:[\"\\u09B0\\u09AC\\u09BF\\u09AC\\u09BE\\u09B0\",\"\\u09B8\\u09CB\\u09AE\\u09AC\\u09BE\\u09B0\",\"\\u09AE\\u0999\\u09CD\\u0997\\u09B2\\u09AC\\u09BE\\u09B0\",\"\\u09AC\\u09C1\\u09A7\\u09AC\\u09BE\\u09B0\",\"\\u09AC\\u09C3\\u09B9\\u09B8\\u09CD\\u09AA\\u09A4\\u09BF\\u09AC\\u09BE\\u09B0\",\"\\u09B6\\u09C1\\u0995\\u09CD\\u09B0\\u09AC\\u09BE\\u09B0\",\"\\u09B6\\u09A8\\u09BF\\u09AC\\u09BE\\u09B0\"]},months:{shorthand:[\"\\u099C\\u09BE\\u09A8\\u09C1\",\"\\u09AB\\u09C7\\u09AC\\u09CD\\u09B0\\u09C1\",\"\\u09AE\\u09BE\\u09B0\\u09CD\\u099A\",\"\\u098F\\u09AA\\u09CD\\u09B0\\u09BF\\u09B2\",\"\\u09AE\\u09C7\",\"\\u099C\\u09C1\\u09A8\",\"\\u099C\\u09C1\\u09B2\\u09BE\\u0987\",\"\\u0986\\u0997\",\"\\u09B8\\u09C7\\u09AA\\u09CD\\u099F\\u09C7\",\"\\u0985\\u0995\\u09CD\\u099F\\u09CB\",\"\\u09A8\\u09AD\\u09C7\",\"\\u09A1\\u09BF\\u09B8\\u09C7\"],longhand:[\"\\u099C\\u09BE\\u09A8\\u09C1\\u09AF\\u09BC\\u09BE\\u09B0\\u09C0\",\"\\u09AB\\u09C7\\u09AC\\u09CD\\u09B0\\u09C1\\u09AF\\u09BC\\u09BE\\u09B0\\u09C0\",\"\\u09AE\\u09BE\\u09B0\\u09CD\\u099A\",\"\\u098F\\u09AA\\u09CD\\u09B0\\u09BF\\u09B2\",\"\\u09AE\\u09C7\",\"\\u099C\\u09C1\\u09A8\",\"\\u099C\\u09C1\\u09B2\\u09BE\\u0987\",\"\\u0986\\u0997\\u09B8\\u09CD\\u099F\",\"\\u09B8\\u09C7\\u09AA\\u09CD\\u099F\\u09C7\\u09AE\\u09CD\\u09AC\\u09B0\",\"\\u0985\\u0995\\u09CD\\u099F\\u09CB\\u09AC\\u09B0\",\"\\u09A8\\u09AD\\u09C7\\u09AE\\u09CD\\u09AC\\u09B0\",\"\\u09A1\\u09BF\\u09B8\\u09C7\\u09AE\\u09CD\\u09AC\\u09B0\"]}};QS.l10ns.bn=ep;var o4=QS.l10ns;var XS=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},tp={firstDayOfWeek:1,weekdays:{shorthand:[\"Ned\",\"Pon\",\"Uto\",\"Sri\",\"\\u010Cet\",\"Pet\",\"Sub\"],longhand:[\"Nedjelja\",\"Ponedjeljak\",\"Utorak\",\"Srijeda\",\"\\u010Cetvrtak\",\"Petak\",\"Subota\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"Maj\",\"Jun\",\"Jul\",\"Avg\",\"Sep\",\"Okt\",\"Nov\",\"Dec\"],longhand:[\"Januar\",\"Februar\",\"Mart\",\"April\",\"Maj\",\"Juni\",\"Juli\",\"Avgust\",\"Septembar\",\"Oktobar\",\"Novembar\",\"Decembar\"]},time_24hr:!0};XS.l10ns.bs=tp;var l4=XS.l10ns;var np=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Wc={weekdays:{shorthand:[\"Dg\",\"Dl\",\"Dt\",\"Dc\",\"Dj\",\"Dv\",\"Ds\"],longhand:[\"Diumenge\",\"Dilluns\",\"Dimarts\",\"Dimecres\",\"Dijous\",\"Divendres\",\"Dissabte\"]},months:{shorthand:[\"Gen\",\"Febr\",\"Mar\\xE7\",\"Abr\",\"Maig\",\"Juny\",\"Jul\",\"Ag\",\"Set\",\"Oct\",\"Nov\",\"Des\"],longhand:[\"Gener\",\"Febrer\",\"Mar\\xE7\",\"Abril\",\"Maig\",\"Juny\",\"Juliol\",\"Agost\",\"Setembre\",\"Octubre\",\"Novembre\",\"Desembre\"]},ordinal:e=>{let t=e%100;if(t>3&&t<21)return\"\\xE8\";switch(t%10){case 1:return\"r\";case 2:return\"n\";case 3:return\"r\";case 4:return\"t\";default:return\"\\xE8\"}},firstDayOfWeek:1,rangeSeparator:\" a \",time_24hr:!0};np.l10ns.cat=np.l10ns.ca=Wc;var c4=np.l10ns;var eE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},rp={weekdays:{shorthand:[\"\\u06CC\\u06D5\\u06A9\\u0634\\u06D5\\u0645\\u0645\\u06D5\",\"\\u062F\\u0648\\u0648\\u0634\\u06D5\\u0645\\u0645\\u06D5\",\"\\u0633\\u06CE\\u0634\\u06D5\\u0645\\u0645\\u06D5\",\"\\u0686\\u0648\\u0627\\u0631\\u0634\\u06D5\\u0645\\u0645\\u06D5\",\"\\u067E\\u06CE\\u0646\\u062C\\u0634\\u06D5\\u0645\\u0645\\u06D5\",\"\\u0647\\u06D5\\u06CC\\u0646\\u06CC\",\"\\u0634\\u06D5\\u0645\\u0645\\u06D5\"],longhand:[\"\\u06CC\\u06D5\\u06A9\\u0634\\u06D5\\u0645\\u0645\\u06D5\",\"\\u062F\\u0648\\u0648\\u0634\\u06D5\\u0645\\u0645\\u06D5\",\"\\u0633\\u06CE\\u0634\\u06D5\\u0645\\u0645\\u06D5\",\"\\u0686\\u0648\\u0627\\u0631\\u0634\\u06D5\\u0645\\u0645\\u06D5\",\"\\u067E\\u06CE\\u0646\\u062C\\u0634\\u06D5\\u0645\\u0645\\u06D5\",\"\\u0647\\u06D5\\u06CC\\u0646\\u06CC\",\"\\u0634\\u06D5\\u0645\\u0645\\u06D5\"]},months:{shorthand:[\"\\u0695\\u06CE\\u0628\\u06D5\\u0646\\u062F\\u0627\\u0646\",\"\\u0695\\u06D5\\u0634\\u06D5\\u0645\\u06D5\",\"\\u0646\\u06D5\\u0648\\u0631\\u06C6\\u0632\",\"\\u06AF\\u0648\\u06B5\\u0627\\u0646\",\"\\u062C\\u06C6\\u0632\\u06D5\\u0631\\u062F\\u0627\\u0646\",\"\\u067E\\u0648\\u0648\\u0634\\u067E\\u06D5\\u0695\",\"\\u06AF\\u06D5\\u0644\\u0627\\u0648\\u06CE\\u0698\",\"\\u062E\\u06D5\\u0631\\u0645\\u0627\\u0646\\u0627\\u0646\",\"\\u0695\\u06D5\\u0632\\u0628\\u06D5\\u0631\",\"\\u06AF\\u06D5\\u06B5\\u0627\\u0695\\u06CE\\u0632\\u0627\\u0646\",\"\\u0633\\u06D5\\u0631\\u0645\\u0627\\u0648\\u06D5\\u0632\",\"\\u0628\\u06D5\\u0641\\u0631\\u0627\\u0646\\u0628\\u0627\\u0631\"],longhand:[\"\\u0695\\u06CE\\u0628\\u06D5\\u0646\\u062F\\u0627\\u0646\",\"\\u0695\\u06D5\\u0634\\u06D5\\u0645\\u06D5\",\"\\u0646\\u06D5\\u0648\\u0631\\u06C6\\u0632\",\"\\u06AF\\u0648\\u06B5\\u0627\\u0646\",\"\\u062C\\u06C6\\u0632\\u06D5\\u0631\\u062F\\u0627\\u0646\",\"\\u067E\\u0648\\u0648\\u0634\\u067E\\u06D5\\u0695\",\"\\u06AF\\u06D5\\u0644\\u0627\\u0648\\u06CE\\u0698\",\"\\u062E\\u06D5\\u0631\\u0645\\u0627\\u0646\\u0627\\u0646\",\"\\u0695\\u06D5\\u0632\\u0628\\u06D5\\u0631\",\"\\u06AF\\u06D5\\u06B5\\u0627\\u0695\\u06CE\\u0632\\u0627\\u0646\",\"\\u0633\\u06D5\\u0631\\u0645\\u0627\\u0648\\u06D5\\u0632\",\"\\u0628\\u06D5\\u0641\\u0631\\u0627\\u0646\\u0628\\u0627\\u0631\"]},firstDayOfWeek:6,ordinal:()=>\"\"};eE.l10ns.ckb=rp;var f4=eE.l10ns;var tE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},ip={weekdays:{shorthand:[\"Ne\",\"Po\",\"\\xDAt\",\"St\",\"\\u010Ct\",\"P\\xE1\",\"So\"],longhand:[\"Ned\\u011Ble\",\"Pond\\u011Bl\\xED\",\"\\xDAter\\xFD\",\"St\\u0159eda\",\"\\u010Ctvrtek\",\"P\\xE1tek\",\"Sobota\"]},months:{shorthand:[\"Led\",\"\\xDAn\",\"B\\u0159e\",\"Dub\",\"Kv\\u011B\",\"\\u010Cer\",\"\\u010Cvc\",\"Srp\",\"Z\\xE1\\u0159\",\"\\u0158\\xEDj\",\"Lis\",\"Pro\"],longhand:[\"Leden\",\"\\xDAnor\",\"B\\u0159ezen\",\"Duben\",\"Kv\\u011Bten\",\"\\u010Cerven\",\"\\u010Cervenec\",\"Srpen\",\"Z\\xE1\\u0159\\xED\",\"\\u0158\\xEDjen\",\"Listopad\",\"Prosinec\"]},firstDayOfWeek:1,ordinal:function(){return\".\"},rangeSeparator:\" do \",weekAbbreviation:\"T\\xFDd.\",scrollTitle:\"Rolujte pro zm\\u011Bnu\",toggleTitle:\"P\\u0159epnout dopoledne/odpoledne\",amPM:[\"dop.\",\"odp.\"],yearAriaLabel:\"Rok\",time_24hr:!0};tE.l10ns.cs=ip;var m4=tE.l10ns;var nE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},ap={weekdays:{shorthand:[\"Sul\",\"Llun\",\"Maw\",\"Mer\",\"Iau\",\"Gwe\",\"Sad\"],longhand:[\"Dydd Sul\",\"Dydd Llun\",\"Dydd Mawrth\",\"Dydd Mercher\",\"Dydd Iau\",\"Dydd Gwener\",\"Dydd Sadwrn\"]},months:{shorthand:[\"Ion\",\"Chwef\",\"Maw\",\"Ebr\",\"Mai\",\"Meh\",\"Gorff\",\"Awst\",\"Medi\",\"Hyd\",\"Tach\",\"Rhag\"],longhand:[\"Ionawr\",\"Chwefror\",\"Mawrth\",\"Ebrill\",\"Mai\",\"Mehefin\",\"Gorffennaf\",\"Awst\",\"Medi\",\"Hydref\",\"Tachwedd\",\"Rhagfyr\"]},firstDayOfWeek:1,ordinal:e=>e===1?\"af\":e===2?\"ail\":e===3||e===4?\"ydd\":e===5||e===6?\"ed\":e>=7&&e<=10||e==12||e==15||e==18||e==20?\"fed\":e==11||e==13||e==14||e==16||e==17||e==19?\"eg\":e>=21&&e<=39?\"ain\":\"\",time_24hr:!0};nE.l10ns.cy=ap;var g4=nE.l10ns;var rE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},op={weekdays:{shorthand:[\"s\\xF8n\",\"man\",\"tir\",\"ons\",\"tors\",\"fre\",\"l\\xF8r\"],longhand:[\"s\\xF8ndag\",\"mandag\",\"tirsdag\",\"onsdag\",\"torsdag\",\"fredag\",\"l\\xF8rdag\"]},months:{shorthand:[\"jan\",\"feb\",\"mar\",\"apr\",\"maj\",\"jun\",\"jul\",\"aug\",\"sep\",\"okt\",\"nov\",\"dec\"],longhand:[\"januar\",\"februar\",\"marts\",\"april\",\"maj\",\"juni\",\"juli\",\"august\",\"september\",\"oktober\",\"november\",\"december\"]},ordinal:()=>\".\",firstDayOfWeek:1,rangeSeparator:\" til \",weekAbbreviation:\"uge\",time_24hr:!0};rE.l10ns.da=op;var v4=rE.l10ns;var iE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},sp={weekdays:{shorthand:[\"So\",\"Mo\",\"Di\",\"Mi\",\"Do\",\"Fr\",\"Sa\"],longhand:[\"Sonntag\",\"Montag\",\"Dienstag\",\"Mittwoch\",\"Donnerstag\",\"Freitag\",\"Samstag\"]},months:{shorthand:[\"Jan\",\"Feb\",\"M\\xE4r\",\"Apr\",\"Mai\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Okt\",\"Nov\",\"Dez\"],longhand:[\"Januar\",\"Februar\",\"M\\xE4rz\",\"April\",\"Mai\",\"Juni\",\"Juli\",\"August\",\"September\",\"Oktober\",\"November\",\"Dezember\"]},firstDayOfWeek:1,weekAbbreviation:\"KW\",rangeSeparator:\" bis \",scrollTitle:\"Zum \\xC4ndern scrollen\",toggleTitle:\"Zum Umschalten klicken\",time_24hr:!0};iE.l10ns.de=sp;var b4=iE.l10ns;var so={weekdays:{shorthand:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],longhand:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],longhand:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:e=>{let t=e%100;if(t>3&&t<21)return\"th\";switch(t%10){case 1:return\"st\";case 2:return\"nd\";case 3:return\"rd\";default:return\"th\"}},rangeSeparator:\" to \",weekAbbreviation:\"Wk\",scrollTitle:\"Scroll to increment\",toggleTitle:\"Click to toggle\",amPM:[\"AM\",\"PM\"],yearAriaLabel:\"Year\",monthAriaLabel:\"Month\",hourAriaLabel:\"Hour\",minuteAriaLabel:\"Minute\",time_24hr:!1},Yc=so;var aE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},lp={firstDayOfWeek:1,rangeSeparator:\" \\u011Dis \",weekAbbreviation:\"Sem\",scrollTitle:\"Rulumu por pligrandigi la valoron\",toggleTitle:\"Klaku por \\u015Dalti\",weekdays:{shorthand:[\"Dim\",\"Lun\",\"Mar\",\"Mer\",\"\\u0134a\\u016D\",\"Ven\",\"Sab\"],longhand:[\"diman\\u0109o\",\"lundo\",\"mardo\",\"merkredo\",\"\\u0135a\\u016Ddo\",\"vendredo\",\"sabato\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"Maj\",\"Jun\",\"Jul\",\"A\\u016Dg\",\"Sep\",\"Okt\",\"Nov\",\"Dec\"],longhand:[\"januaro\",\"februaro\",\"marto\",\"aprilo\",\"majo\",\"junio\",\"julio\",\"a\\u016Dgusto\",\"septembro\",\"oktobro\",\"novembro\",\"decembro\"]},ordinal:()=>\"-a\",time_24hr:!0};aE.l10ns.eo=lp;var E4=aE.l10ns;var oE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},up={weekdays:{shorthand:[\"Dom\",\"Lun\",\"Mar\",\"Mi\\xE9\",\"Jue\",\"Vie\",\"S\\xE1b\"],longhand:[\"Domingo\",\"Lunes\",\"Martes\",\"Mi\\xE9rcoles\",\"Jueves\",\"Viernes\",\"S\\xE1bado\"]},months:{shorthand:[\"Ene\",\"Feb\",\"Mar\",\"Abr\",\"May\",\"Jun\",\"Jul\",\"Ago\",\"Sep\",\"Oct\",\"Nov\",\"Dic\"],longhand:[\"Enero\",\"Febrero\",\"Marzo\",\"Abril\",\"Mayo\",\"Junio\",\"Julio\",\"Agosto\",\"Septiembre\",\"Octubre\",\"Noviembre\",\"Diciembre\"]},ordinal:()=>\"\\xBA\",firstDayOfWeek:1,rangeSeparator:\" a \",time_24hr:!0};oE.l10ns.es=up;var x4=oE.l10ns;var sE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},cp={weekdays:{shorthand:[\"P\",\"E\",\"T\",\"K\",\"N\",\"R\",\"L\"],longhand:[\"P\\xFChap\\xE4ev\",\"Esmasp\\xE4ev\",\"Teisip\\xE4ev\",\"Kolmap\\xE4ev\",\"Neljap\\xE4ev\",\"Reede\",\"Laup\\xE4ev\"]},months:{shorthand:[\"Jaan\",\"Veebr\",\"M\\xE4rts\",\"Apr\",\"Mai\",\"Juuni\",\"Juuli\",\"Aug\",\"Sept\",\"Okt\",\"Nov\",\"Dets\"],longhand:[\"Jaanuar\",\"Veebruar\",\"M\\xE4rts\",\"Aprill\",\"Mai\",\"Juuni\",\"Juuli\",\"August\",\"September\",\"Oktoober\",\"November\",\"Detsember\"]},firstDayOfWeek:1,ordinal:function(){return\".\"},weekAbbreviation:\"N\\xE4d\",rangeSeparator:\" kuni \",scrollTitle:\"Keri, et suurendada\",toggleTitle:\"Kl\\xF5psa, et vahetada\",time_24hr:!0};sE.l10ns.et=cp;var _4=sE.l10ns;var lE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},dp={weekdays:{shorthand:[\"\\u06CC\\u06A9\",\"\\u062F\\u0648\",\"\\u0633\\u0647\",\"\\u0686\\u0647\\u0627\\u0631\",\"\\u067E\\u0646\\u062C\",\"\\u062C\\u0645\\u0639\\u0647\",\"\\u0634\\u0646\\u0628\\u0647\"],longhand:[\"\\u06CC\\u06A9\\u200C\\u0634\\u0646\\u0628\\u0647\",\"\\u062F\\u0648\\u0634\\u0646\\u0628\\u0647\",\"\\u0633\\u0647\\u200C\\u0634\\u0646\\u0628\\u0647\",\"\\u0686\\u0647\\u0627\\u0631\\u0634\\u0646\\u0628\\u0647\",\"\\u067E\\u0646\\u0686\\u200C\\u0634\\u0646\\u0628\\u0647\",\"\\u062C\\u0645\\u0639\\u0647\",\"\\u0634\\u0646\\u0628\\u0647\"]},months:{shorthand:[\"\\u0698\\u0627\\u0646\\u0648\\u06CC\\u0647\",\"\\u0641\\u0648\\u0631\\u06CC\\u0647\",\"\\u0645\\u0627\\u0631\\u0633\",\"\\u0622\\u0648\\u0631\\u06CC\\u0644\",\"\\u0645\\u0647\",\"\\u0698\\u0648\\u0626\\u0646\",\"\\u0698\\u0648\\u0626\\u06CC\\u0647\",\"\\u0627\\u0648\\u062A\",\"\\u0633\\u067E\\u062A\\u0627\\u0645\\u0628\\u0631\",\"\\u0627\\u06A9\\u062A\\u0628\\u0631\",\"\\u0646\\u0648\\u0627\\u0645\\u0628\\u0631\",\"\\u062F\\u0633\\u0627\\u0645\\u0628\\u0631\"],longhand:[\"\\u0698\\u0627\\u0646\\u0648\\u06CC\\u0647\",\"\\u0641\\u0648\\u0631\\u06CC\\u0647\",\"\\u0645\\u0627\\u0631\\u0633\",\"\\u0622\\u0648\\u0631\\u06CC\\u0644\",\"\\u0645\\u0647\",\"\\u0698\\u0648\\u0626\\u0646\",\"\\u0698\\u0648\\u0626\\u06CC\\u0647\",\"\\u0627\\u0648\\u062A\",\"\\u0633\\u067E\\u062A\\u0627\\u0645\\u0628\\u0631\",\"\\u0627\\u06A9\\u062A\\u0628\\u0631\",\"\\u0646\\u0648\\u0627\\u0645\\u0628\\u0631\",\"\\u062F\\u0633\\u0627\\u0645\\u0628\\u0631\"]},firstDayOfWeek:6,ordinal:()=>\"\"};lE.l10ns.fa=dp;var T4=lE.l10ns;var uE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},fp={firstDayOfWeek:1,weekdays:{shorthand:[\"su\",\"ma\",\"ti\",\"ke\",\"to\",\"pe\",\"la\"],longhand:[\"sunnuntai\",\"maanantai\",\"tiistai\",\"keskiviikko\",\"torstai\",\"perjantai\",\"lauantai\"]},months:{shorthand:[\"tammi\",\"helmi\",\"maalis\",\"huhti\",\"touko\",\"kes\\xE4\",\"hein\\xE4\",\"elo\",\"syys\",\"loka\",\"marras\",\"joulu\"],longhand:[\"tammikuu\",\"helmikuu\",\"maaliskuu\",\"huhtikuu\",\"toukokuu\",\"kes\\xE4kuu\",\"hein\\xE4kuu\",\"elokuu\",\"syyskuu\",\"lokakuu\",\"marraskuu\",\"joulukuu\"]},ordinal:()=>\".\",time_24hr:!0};uE.l10ns.fi=fp;var I4=uE.l10ns;var cE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},hp={weekdays:{shorthand:[\"Sun\",\"M\\xE1n\",\"T\\xFDs\",\"Mik\",\"H\\xF3s\",\"Fr\\xED\",\"Ley\"],longhand:[\"Sunnudagur\",\"M\\xE1nadagur\",\"T\\xFDsdagur\",\"Mikudagur\",\"H\\xF3sdagur\",\"Fr\\xEDggjadagur\",\"Leygardagur\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"Mai\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Okt\",\"Nov\",\"Des\"],longhand:[\"Januar\",\"Februar\",\"Mars\",\"Apr\\xEDl\",\"Mai\",\"Juni\",\"Juli\",\"August\",\"Septembur\",\"Oktobur\",\"Novembur\",\"Desembur\"]},ordinal:()=>\".\",firstDayOfWeek:1,rangeSeparator:\" til \",weekAbbreviation:\"vika\",scrollTitle:\"Rulla fyri at broyta\",toggleTitle:\"Tr\\xFDst fyri at skifta\",yearAriaLabel:\"\\xC1r\",time_24hr:!0};cE.l10ns.fo=hp;var O4=cE.l10ns;var dE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},mp={firstDayOfWeek:1,weekdays:{shorthand:[\"dim\",\"lun\",\"mar\",\"mer\",\"jeu\",\"ven\",\"sam\"],longhand:[\"dimanche\",\"lundi\",\"mardi\",\"mercredi\",\"jeudi\",\"vendredi\",\"samedi\"]},months:{shorthand:[\"janv\",\"f\\xE9vr\",\"mars\",\"avr\",\"mai\",\"juin\",\"juil\",\"ao\\xFBt\",\"sept\",\"oct\",\"nov\",\"d\\xE9c\"],longhand:[\"janvier\",\"f\\xE9vrier\",\"mars\",\"avril\",\"mai\",\"juin\",\"juillet\",\"ao\\xFBt\",\"septembre\",\"octobre\",\"novembre\",\"d\\xE9cembre\"]},ordinal:e=>e>1?\"\":\"er\",rangeSeparator:\" au \",weekAbbreviation:\"Sem\",scrollTitle:\"D\\xE9filer pour augmenter la valeur\",toggleTitle:\"Cliquer pour basculer\",time_24hr:!0};dE.l10ns.fr=mp;var P4=dE.l10ns;var fE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},pp={weekdays:{shorthand:[\"\\u039A\\u03C5\",\"\\u0394\\u03B5\",\"\\u03A4\\u03C1\",\"\\u03A4\\u03B5\",\"\\u03A0\\u03AD\",\"\\u03A0\\u03B1\",\"\\u03A3\\u03AC\"],longhand:[\"\\u039A\\u03C5\\u03C1\\u03B9\\u03B1\\u03BA\\u03AE\",\"\\u0394\\u03B5\\u03C5\\u03C4\\u03AD\\u03C1\\u03B1\",\"\\u03A4\\u03C1\\u03AF\\u03C4\\u03B7\",\"\\u03A4\\u03B5\\u03C4\\u03AC\\u03C1\\u03C4\\u03B7\",\"\\u03A0\\u03AD\\u03BC\\u03C0\\u03C4\\u03B7\",\"\\u03A0\\u03B1\\u03C1\\u03B1\\u03C3\\u03BA\\u03B5\\u03C5\\u03AE\",\"\\u03A3\\u03AC\\u03B2\\u03B2\\u03B1\\u03C4\\u03BF\"]},months:{shorthand:[\"\\u0399\\u03B1\\u03BD\",\"\\u03A6\\u03B5\\u03B2\",\"\\u039C\\u03AC\\u03C1\",\"\\u0391\\u03C0\\u03C1\",\"\\u039C\\u03AC\\u03B9\",\"\\u0399\\u03BF\\u03CD\\u03BD\",\"\\u0399\\u03BF\\u03CD\\u03BB\",\"\\u0391\\u03CD\\u03B3\",\"\\u03A3\\u03B5\\u03C0\",\"\\u039F\\u03BA\\u03C4\",\"\\u039D\\u03BF\\u03AD\",\"\\u0394\\u03B5\\u03BA\"],longhand:[\"\\u0399\\u03B1\\u03BD\\u03BF\\u03C5\\u03AC\\u03C1\\u03B9\\u03BF\\u03C2\",\"\\u03A6\\u03B5\\u03B2\\u03C1\\u03BF\\u03C5\\u03AC\\u03C1\\u03B9\\u03BF\\u03C2\",\"\\u039C\\u03AC\\u03C1\\u03C4\\u03B9\\u03BF\\u03C2\",\"\\u0391\\u03C0\\u03C1\\u03AF\\u03BB\\u03B9\\u03BF\\u03C2\",\"\\u039C\\u03AC\\u03B9\\u03BF\\u03C2\",\"\\u0399\\u03BF\\u03CD\\u03BD\\u03B9\\u03BF\\u03C2\",\"\\u0399\\u03BF\\u03CD\\u03BB\\u03B9\\u03BF\\u03C2\",\"\\u0391\\u03CD\\u03B3\\u03BF\\u03C5\\u03C3\\u03C4\\u03BF\\u03C2\",\"\\u03A3\\u03B5\\u03C0\\u03C4\\u03AD\\u03BC\\u03B2\\u03C1\\u03B9\\u03BF\\u03C2\",\"\\u039F\\u03BA\\u03C4\\u03CE\\u03B2\\u03C1\\u03B9\\u03BF\\u03C2\",\"\\u039D\\u03BF\\u03AD\\u03BC\\u03B2\\u03C1\\u03B9\\u03BF\\u03C2\",\"\\u0394\\u03B5\\u03BA\\u03AD\\u03BC\\u03B2\\u03C1\\u03B9\\u03BF\\u03C2\"]},firstDayOfWeek:1,ordinal:function(){return\"\"},weekAbbreviation:\"\\u0395\\u03B2\\u03B4\",rangeSeparator:\" \\u03AD\\u03C9\\u03C2 \",scrollTitle:\"\\u039C\\u03B5\\u03C4\\u03B1\\u03BA\\u03C5\\u03BB\\u03AE\\u03C3\\u03C4\\u03B5 \\u03B3\\u03B9\\u03B1 \\u03C0\\u03C1\\u03BF\\u03C3\\u03B1\\u03CD\\u03BE\\u03B7\\u03C3\\u03B7\",toggleTitle:\"\\u039A\\u03AC\\u03BD\\u03C4\\u03B5 \\u03BA\\u03BB\\u03B9\\u03BA \\u03B3\\u03B9\\u03B1 \\u03B1\\u03BB\\u03BB\\u03B1\\u03B3\\u03AE\",amPM:[\"\\u03A0\\u039C\",\"\\u039C\\u039C\"],yearAriaLabel:\"\\u03C7\\u03C1\\u03CC\\u03BD\\u03BF\\u03C2\",monthAriaLabel:\"\\u03BC\\u03AE\\u03BD\\u03B1\\u03C2\",hourAriaLabel:\"\\u03CE\\u03C1\\u03B1\",minuteAriaLabel:\"\\u03BB\\u03B5\\u03C0\\u03C4\\u03CC\"};fE.l10ns.gr=pp;var R4=fE.l10ns;var hE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},gp={weekdays:{shorthand:[\"\\u05D0\",\"\\u05D1\",\"\\u05D2\",\"\\u05D3\",\"\\u05D4\",\"\\u05D5\",\"\\u05E9\"],longhand:[\"\\u05E8\\u05D0\\u05E9\\u05D5\\u05DF\",\"\\u05E9\\u05E0\\u05D9\",\"\\u05E9\\u05DC\\u05D9\\u05E9\\u05D9\",\"\\u05E8\\u05D1\\u05D9\\u05E2\\u05D9\",\"\\u05D7\\u05DE\\u05D9\\u05E9\\u05D9\",\"\\u05E9\\u05D9\\u05E9\\u05D9\",\"\\u05E9\\u05D1\\u05EA\"]},months:{shorthand:[\"\\u05D9\\u05E0\\u05D5\\u05F3\",\"\\u05E4\\u05D1\\u05E8\\u05F3\",\"\\u05DE\\u05E8\\u05E5\",\"\\u05D0\\u05E4\\u05E8\\u05F3\",\"\\u05DE\\u05D0\\u05D9\",\"\\u05D9\\u05D5\\u05E0\\u05D9\",\"\\u05D9\\u05D5\\u05DC\\u05D9\",\"\\u05D0\\u05D5\\u05D2\\u05F3\",\"\\u05E1\\u05E4\\u05D8\\u05F3\",\"\\u05D0\\u05D5\\u05E7\\u05F3\",\"\\u05E0\\u05D5\\u05D1\\u05F3\",\"\\u05D3\\u05E6\\u05DE\\u05F3\"],longhand:[\"\\u05D9\\u05E0\\u05D5\\u05D0\\u05E8\",\"\\u05E4\\u05D1\\u05E8\\u05D5\\u05D0\\u05E8\",\"\\u05DE\\u05E8\\u05E5\",\"\\u05D0\\u05E4\\u05E8\\u05D9\\u05DC\",\"\\u05DE\\u05D0\\u05D9\",\"\\u05D9\\u05D5\\u05E0\\u05D9\",\"\\u05D9\\u05D5\\u05DC\\u05D9\",\"\\u05D0\\u05D5\\u05D2\\u05D5\\u05E1\\u05D8\",\"\\u05E1\\u05E4\\u05D8\\u05DE\\u05D1\\u05E8\",\"\\u05D0\\u05D5\\u05E7\\u05D8\\u05D5\\u05D1\\u05E8\",\"\\u05E0\\u05D5\\u05D1\\u05DE\\u05D1\\u05E8\",\"\\u05D3\\u05E6\\u05DE\\u05D1\\u05E8\"]},rangeSeparator:\" \\u05D0\\u05DC \",time_24hr:!0};hE.l10ns.he=gp;var B4=hE.l10ns;var mE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},yp={weekdays:{shorthand:[\"\\u0930\\u0935\\u093F\",\"\\u0938\\u094B\\u092E\",\"\\u092E\\u0902\\u0917\\u0932\",\"\\u092C\\u0941\\u0927\",\"\\u0917\\u0941\\u0930\\u0941\",\"\\u0936\\u0941\\u0915\\u094D\\u0930\",\"\\u0936\\u0928\\u093F\"],longhand:[\"\\u0930\\u0935\\u093F\\u0935\\u093E\\u0930\",\"\\u0938\\u094B\\u092E\\u0935\\u093E\\u0930\",\"\\u092E\\u0902\\u0917\\u0932\\u0935\\u093E\\u0930\",\"\\u092C\\u0941\\u0927\\u0935\\u093E\\u0930\",\"\\u0917\\u0941\\u0930\\u0941\\u0935\\u093E\\u0930\",\"\\u0936\\u0941\\u0915\\u094D\\u0930\\u0935\\u093E\\u0930\",\"\\u0936\\u0928\\u093F\\u0935\\u093E\\u0930\"]},months:{shorthand:[\"\\u091C\\u0928\",\"\\u092B\\u0930\",\"\\u092E\\u093E\\u0930\\u094D\\u091A\",\"\\u0905\\u092A\\u094D\\u0930\\u0947\\u0932\",\"\\u092E\\u0908\",\"\\u091C\\u0942\\u0928\",\"\\u091C\\u0942\\u0932\\u093E\\u0908\",\"\\u0905\\u0917\",\"\\u0938\\u093F\\u0924\",\"\\u0905\\u0915\\u094D\\u091F\",\"\\u0928\\u0935\",\"\\u0926\\u093F\"],longhand:[\"\\u091C\\u0928\\u0935\\u0930\\u0940 \",\"\\u092B\\u0930\\u0935\\u0930\\u0940\",\"\\u092E\\u093E\\u0930\\u094D\\u091A\",\"\\u0905\\u092A\\u094D\\u0930\\u0947\\u0932\",\"\\u092E\\u0908\",\"\\u091C\\u0942\\u0928\",\"\\u091C\\u0942\\u0932\\u093E\\u0908\",\"\\u0905\\u0917\\u0938\\u094D\\u0924 \",\"\\u0938\\u093F\\u0924\\u092E\\u094D\\u092C\\u0930\",\"\\u0905\\u0915\\u094D\\u091F\\u0942\\u092C\\u0930\",\"\\u0928\\u0935\\u092E\\u094D\\u092C\\u0930\",\"\\u0926\\u093F\\u0938\\u092E\\u094D\\u092C\\u0930\"]}};mE.l10ns.hi=yp;var $4=mE.l10ns;var pE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},vp={firstDayOfWeek:1,weekdays:{shorthand:[\"Ned\",\"Pon\",\"Uto\",\"Sri\",\"\\u010Cet\",\"Pet\",\"Sub\"],longhand:[\"Nedjelja\",\"Ponedjeljak\",\"Utorak\",\"Srijeda\",\"\\u010Cetvrtak\",\"Petak\",\"Subota\"]},months:{shorthand:[\"Sij\",\"Velj\",\"O\\u017Eu\",\"Tra\",\"Svi\",\"Lip\",\"Srp\",\"Kol\",\"Ruj\",\"Lis\",\"Stu\",\"Pro\"],longhand:[\"Sije\\u010Danj\",\"Velja\\u010Da\",\"O\\u017Eujak\",\"Travanj\",\"Svibanj\",\"Lipanj\",\"Srpanj\",\"Kolovoz\",\"Rujan\",\"Listopad\",\"Studeni\",\"Prosinac\"]},time_24hr:!0};pE.l10ns.hr=vp;var W4=pE.l10ns;var gE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},wp={firstDayOfWeek:1,weekdays:{shorthand:[\"V\",\"H\",\"K\",\"Sz\",\"Cs\",\"P\",\"Szo\"],longhand:[\"Vas\\xE1rnap\",\"H\\xE9tf\\u0151\",\"Kedd\",\"Szerda\",\"Cs\\xFCt\\xF6rt\\xF6k\",\"P\\xE9ntek\",\"Szombat\"]},months:{shorthand:[\"Jan\",\"Feb\",\"M\\xE1r\",\"\\xC1pr\",\"M\\xE1j\",\"J\\xFAn\",\"J\\xFAl\",\"Aug\",\"Szep\",\"Okt\",\"Nov\",\"Dec\"],longhand:[\"Janu\\xE1r\",\"Febru\\xE1r\",\"M\\xE1rcius\",\"\\xC1prilis\",\"M\\xE1jus\",\"J\\xFAnius\",\"J\\xFAlius\",\"Augusztus\",\"Szeptember\",\"Okt\\xF3ber\",\"November\",\"December\"]},ordinal:function(){return\".\"},weekAbbreviation:\"H\\xE9t\",scrollTitle:\"G\\xF6rgessen\",toggleTitle:\"Kattintson a v\\xE1lt\\xE1shoz\",rangeSeparator:\" - \",time_24hr:!0};gE.l10ns.hu=wp;var z4=gE.l10ns;var yE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},bp={weekdays:{shorthand:[\"\\u053F\\u056B\\u0580\",\"\\u0535\\u0580\\u056F\",\"\\u0535\\u0580\\u0584\",\"\\u0549\\u0580\\u0584\",\"\\u0540\\u0576\\u0563\",\"\\u0548\\u0582\\u0580\\u0562\",\"\\u0547\\u0562\\u0569\"],longhand:[\"\\u053F\\u056B\\u0580\\u0561\\u056F\\u056B\",\"\\u0535\\u056F\\u0578\\u0582\\u0577\\u0561\\u0562\\u0569\\u056B\",\"\\u0535\\u0580\\u0565\\u0584\\u0577\\u0561\\u0562\\u0569\\u056B\",\"\\u0549\\u0578\\u0580\\u0565\\u0584\\u0577\\u0561\\u0562\\u0569\\u056B\",\"\\u0540\\u056B\\u0576\\u0563\\u0577\\u0561\\u0562\\u0569\\u056B\",\"\\u0548\\u0582\\u0580\\u0562\\u0561\\u0569\",\"\\u0547\\u0561\\u0562\\u0561\\u0569\"]},months:{shorthand:[\"\\u0540\\u0576\\u057E\",\"\\u0553\\u057F\\u0580\",\"\\u0544\\u0561\\u0580\",\"\\u0531\\u057A\\u0580\",\"\\u0544\\u0561\\u0575\",\"\\u0540\\u0576\\u057D\",\"\\u0540\\u056C\\u057D\",\"\\u0555\\u0563\\u057D\",\"\\u054D\\u0565\\u057A\",\"\\u0540\\u0578\\u056F\",\"\\u0546\\u0574\\u0562\",\"\\u0534\\u0565\\u056F\"],longhand:[\"\\u0540\\u0578\\u0582\\u0576\\u057E\\u0561\\u0580\",\"\\u0553\\u0565\\u057F\\u0580\\u057E\\u0561\\u0580\",\"\\u0544\\u0561\\u0580\\u057F\",\"\\u0531\\u057A\\u0580\\u056B\\u056C\",\"\\u0544\\u0561\\u0575\\u056B\\u057D\",\"\\u0540\\u0578\\u0582\\u0576\\u056B\\u057D\",\"\\u0540\\u0578\\u0582\\u056C\\u056B\\u057D\",\"\\u0555\\u0563\\u0578\\u057D\\u057F\\u0578\\u057D\",\"\\u054D\\u0565\\u057A\\u057F\\u0565\\u0574\\u0562\\u0565\\u0580\",\"\\u0540\\u0578\\u056F\\u057F\\u0565\\u0574\\u0562\\u0565\\u0580\",\"\\u0546\\u0578\\u0575\\u0565\\u0574\\u0562\\u0565\\u0580\",\"\\u0534\\u0565\\u056F\\u057F\\u0565\\u0574\\u0562\\u0565\\u0580\"]},firstDayOfWeek:1,ordinal:function(){return\"\"},rangeSeparator:\" \\u2014 \",weekAbbreviation:\"\\u0547\\u0532\\u054F\",scrollTitle:\"\\u0548\\u056C\\u0578\\u0580\\u0565\\u0584\\u055D \\u0574\\u0565\\u056E\\u0561\\u0581\\u0576\\u0565\\u056C\\u0578\\u0582 \\u0570\\u0561\\u0574\\u0561\\u0580\",toggleTitle:\"\\u054D\\u0565\\u0572\\u0574\\u0565\\u0584\\u055D \\u0583\\u0578\\u056D\\u0565\\u056C\\u0578\\u0582 \\u0570\\u0561\\u0574\\u0561\\u0580\",amPM:[\"\\u0544\\u053F\",\"\\u053F\\u0540\"],yearAriaLabel:\"\\u054F\\u0561\\u0580\\u056B\",monthAriaLabel:\"\\u0531\\u0574\\u056B\\u057D\",hourAriaLabel:\"\\u053A\\u0561\\u0574\",minuteAriaLabel:\"\\u0550\\u0578\\u057A\\u0565\",time_24hr:!0};yE.l10ns.hy=bp;var j4=yE.l10ns;var vE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Dp={weekdays:{shorthand:[\"Min\",\"Sen\",\"Sel\",\"Rab\",\"Kam\",\"Jum\",\"Sab\"],longhand:[\"Minggu\",\"Senin\",\"Selasa\",\"Rabu\",\"Kamis\",\"Jumat\",\"Sabtu\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"Mei\",\"Jun\",\"Jul\",\"Agu\",\"Sep\",\"Okt\",\"Nov\",\"Des\"],longhand:[\"Januari\",\"Februari\",\"Maret\",\"April\",\"Mei\",\"Juni\",\"Juli\",\"Agustus\",\"September\",\"Oktober\",\"November\",\"Desember\"]},firstDayOfWeek:1,ordinal:()=>\"\",time_24hr:!0,rangeSeparator:\" - \"};vE.l10ns.id=Dp;var G4=vE.l10ns;var wE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Sp={weekdays:{shorthand:[\"Sun\",\"M\\xE1n\",\"\\xDEri\",\"Mi\\xF0\",\"Fim\",\"F\\xF6s\",\"Lau\"],longhand:[\"Sunnudagur\",\"M\\xE1nudagur\",\"\\xDEri\\xF0judagur\",\"Mi\\xF0vikudagur\",\"Fimmtudagur\",\"F\\xF6studagur\",\"Laugardagur\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"Ma\\xED\",\"J\\xFAn\",\"J\\xFAl\",\"\\xC1g\\xFA\",\"Sep\",\"Okt\",\"N\\xF3v\",\"Des\"],longhand:[\"Jan\\xFAar\",\"Febr\\xFAar\",\"Mars\",\"Apr\\xEDl\",\"Ma\\xED\",\"J\\xFAn\\xED\",\"J\\xFAl\\xED\",\"\\xC1g\\xFAst\",\"September\",\"Okt\\xF3ber\",\"N\\xF3vember\",\"Desember\"]},ordinal:()=>\".\",firstDayOfWeek:1,rangeSeparator:\" til \",weekAbbreviation:\"vika\",yearAriaLabel:\"\\xC1r\",time_24hr:!0};wE.l10ns.is=Sp;var Z4=wE.l10ns;var bE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Ep={weekdays:{shorthand:[\"Dom\",\"Lun\",\"Mar\",\"Mer\",\"Gio\",\"Ven\",\"Sab\"],longhand:[\"Domenica\",\"Luned\\xEC\",\"Marted\\xEC\",\"Mercoled\\xEC\",\"Gioved\\xEC\",\"Venerd\\xEC\",\"Sabato\"]},months:{shorthand:[\"Gen\",\"Feb\",\"Mar\",\"Apr\",\"Mag\",\"Giu\",\"Lug\",\"Ago\",\"Set\",\"Ott\",\"Nov\",\"Dic\"],longhand:[\"Gennaio\",\"Febbraio\",\"Marzo\",\"Aprile\",\"Maggio\",\"Giugno\",\"Luglio\",\"Agosto\",\"Settembre\",\"Ottobre\",\"Novembre\",\"Dicembre\"]},firstDayOfWeek:1,ordinal:()=>\"\\xB0\",rangeSeparator:\" al \",weekAbbreviation:\"Se\",scrollTitle:\"Scrolla per aumentare\",toggleTitle:\"Clicca per cambiare\",time_24hr:!0};bE.l10ns.it=Ep;var X4=bE.l10ns;var DE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},kp={weekdays:{shorthand:[\"\\u65E5\",\"\\u6708\",\"\\u706B\",\"\\u6C34\",\"\\u6728\",\"\\u91D1\",\"\\u571F\"],longhand:[\"\\u65E5\\u66DC\\u65E5\",\"\\u6708\\u66DC\\u65E5\",\"\\u706B\\u66DC\\u65E5\",\"\\u6C34\\u66DC\\u65E5\",\"\\u6728\\u66DC\\u65E5\",\"\\u91D1\\u66DC\\u65E5\",\"\\u571F\\u66DC\\u65E5\"]},months:{shorthand:[\"1\\u6708\",\"2\\u6708\",\"3\\u6708\",\"4\\u6708\",\"5\\u6708\",\"6\\u6708\",\"7\\u6708\",\"8\\u6708\",\"9\\u6708\",\"10\\u6708\",\"11\\u6708\",\"12\\u6708\"],longhand:[\"1\\u6708\",\"2\\u6708\",\"3\\u6708\",\"4\\u6708\",\"5\\u6708\",\"6\\u6708\",\"7\\u6708\",\"8\\u6708\",\"9\\u6708\",\"10\\u6708\",\"11\\u6708\",\"12\\u6708\"]},time_24hr:!0,rangeSeparator:\" \\u304B\\u3089 \",monthAriaLabel:\"\\u6708\",amPM:[\"\\u5348\\u524D\",\"\\u5348\\u5F8C\"],yearAriaLabel:\"\\u5E74\",hourAriaLabel:\"\\u6642\\u9593\",minuteAriaLabel:\"\\u5206\"};DE.l10ns.ja=kp;var tY=DE.l10ns;var SE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},xp={weekdays:{shorthand:[\"\\u10D9\\u10D5\",\"\\u10DD\\u10E0\",\"\\u10E1\\u10D0\",\"\\u10DD\\u10D7\",\"\\u10EE\\u10E3\",\"\\u10DE\\u10D0\",\"\\u10E8\\u10D0\"],longhand:[\"\\u10D9\\u10D5\\u10D8\\u10E0\\u10D0\",\"\\u10DD\\u10E0\\u10E8\\u10D0\\u10D1\\u10D0\\u10D7\\u10D8\",\"\\u10E1\\u10D0\\u10DB\\u10E8\\u10D0\\u10D1\\u10D0\\u10D7\\u10D8\",\"\\u10DD\\u10D7\\u10EE\\u10E8\\u10D0\\u10D1\\u10D0\\u10D7\\u10D8\",\"\\u10EE\\u10E3\\u10D7\\u10E8\\u10D0\\u10D1\\u10D0\\u10D7\\u10D8\",\"\\u10DE\\u10D0\\u10E0\\u10D0\\u10E1\\u10D9\\u10D4\\u10D5\\u10D8\",\"\\u10E8\\u10D0\\u10D1\\u10D0\\u10D7\\u10D8\"]},months:{shorthand:[\"\\u10D8\\u10D0\\u10DC\",\"\\u10D7\\u10D4\\u10D1\",\"\\u10DB\\u10D0\\u10E0\",\"\\u10D0\\u10DE\\u10E0\",\"\\u10DB\\u10D0\\u10D8\",\"\\u10D8\\u10D5\\u10DC\",\"\\u10D8\\u10D5\\u10DA\",\"\\u10D0\\u10D2\\u10D5\",\"\\u10E1\\u10D4\\u10E5\",\"\\u10DD\\u10E5\\u10E2\",\"\\u10DC\\u10DD\\u10D4\",\"\\u10D3\\u10D4\\u10D9\"],longhand:[\"\\u10D8\\u10D0\\u10DC\\u10D5\\u10D0\\u10E0\\u10D8\",\"\\u10D7\\u10D4\\u10D1\\u10D4\\u10E0\\u10D5\\u10D0\\u10DA\\u10D8\",\"\\u10DB\\u10D0\\u10E0\\u10E2\\u10D8\",\"\\u10D0\\u10DE\\u10E0\\u10D8\\u10DA\\u10D8\",\"\\u10DB\\u10D0\\u10D8\\u10E1\\u10D8\",\"\\u10D8\\u10D5\\u10DC\\u10D8\\u10E1\\u10D8\",\"\\u10D8\\u10D5\\u10DA\\u10D8\\u10E1\\u10D8\",\"\\u10D0\\u10D2\\u10D5\\u10D8\\u10E1\\u10E2\\u10DD\",\"\\u10E1\\u10D4\\u10E5\\u10E2\\u10D4\\u10DB\\u10D1\\u10D4\\u10E0\\u10D8\",\"\\u10DD\\u10E5\\u10E2\\u10DD\\u10DB\\u10D1\\u10D4\\u10E0\\u10D8\",\"\\u10DC\\u10DD\\u10D4\\u10DB\\u10D1\\u10D4\\u10E0\\u10D8\",\"\\u10D3\\u10D4\\u10D9\\u10D4\\u10DB\\u10D1\\u10D4\\u10E0\\u10D8\"]},firstDayOfWeek:1,ordinal:function(){return\"\"},rangeSeparator:\" \\u2014 \",weekAbbreviation:\"\\u10D9\\u10D5.\",scrollTitle:\"\\u10D3\\u10D0\\u10E1\\u10E5\\u10E0\\u10DD\\u10DA\\u10D4\\u10D7 \\u10D2\\u10D0\\u10E1\\u10D0\\u10D3\\u10D8\\u10D3\\u10D4\\u10D1\\u10DA\\u10D0\\u10D3\",toggleTitle:\"\\u10D3\\u10D0\\u10D0\\u10D9\\u10DA\\u10D8\\u10D9\\u10D4\\u10D7 \\u10D2\\u10D0\\u10D3\\u10D0\\u10E0\\u10D7\\u10D5\\u10D8\\u10E1\\u10D7\\u10D5\\u10D8\\u10E1\",amPM:[\"AM\",\"PM\"],yearAriaLabel:\"\\u10EC\\u10D4\\u10DA\\u10D8\",time_24hr:!0};SE.l10ns.ka=xp;var rY=SE.l10ns;var EE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Cp={weekdays:{shorthand:[\"\\u17A2\\u17B6\\u1791\\u17B7\\u178F\\u17D2\\u1799\",\"\\u1785\\u1793\\u17D2\\u1791\",\"\\u17A2\\u1784\\u17D2\\u1782\\u17B6\\u179A\",\"\\u1796\\u17BB\\u1792\",\"\\u1796\\u17D2\\u179A\\u17A0\\u179F.\",\"\\u179F\\u17BB\\u1780\\u17D2\\u179A\",\"\\u179F\\u17C5\\u179A\\u17CD\"],longhand:[\"\\u17A2\\u17B6\\u1791\\u17B7\\u178F\\u17D2\\u1799\",\"\\u1785\\u1793\\u17D2\\u1791\",\"\\u17A2\\u1784\\u17D2\\u1782\\u17B6\\u179A\",\"\\u1796\\u17BB\\u1792\",\"\\u1796\\u17D2\\u179A\\u17A0\\u179F\\u17D2\\u1794\\u178F\\u17B7\\u17CD\",\"\\u179F\\u17BB\\u1780\\u17D2\\u179A\",\"\\u179F\\u17C5\\u179A\\u17CD\"]},months:{shorthand:[\"\\u1798\\u1780\\u179A\\u17B6\",\"\\u1780\\u17BB\\u1798\\u17D2\\u1797\\u17C7\",\"\\u1798\\u17B8\\u1793\\u17B6\",\"\\u1798\\u17C1\\u179F\\u17B6\",\"\\u17A7\\u179F\\u1797\\u17B6\",\"\\u1798\\u17B7\\u1790\\u17BB\\u1793\\u17B6\",\"\\u1780\\u1780\\u17D2\\u1780\\u178A\\u17B6\",\"\\u179F\\u17B8\\u17A0\\u17B6\",\"\\u1780\\u1789\\u17D2\\u1789\\u17B6\",\"\\u178F\\u17BB\\u179B\\u17B6\",\"\\u179C\\u17B7\\u1785\\u17D2\\u1786\\u17B7\\u1780\\u17B6\",\"\\u1792\\u17D2\\u1793\\u17BC\"],longhand:[\"\\u1798\\u1780\\u179A\\u17B6\",\"\\u1780\\u17BB\\u1798\\u17D2\\u1797\\u17C7\",\"\\u1798\\u17B8\\u1793\\u17B6\",\"\\u1798\\u17C1\\u179F\\u17B6\",\"\\u17A7\\u179F\\u1797\\u17B6\",\"\\u1798\\u17B7\\u1790\\u17BB\\u1793\\u17B6\",\"\\u1780\\u1780\\u17D2\\u1780\\u178A\\u17B6\",\"\\u179F\\u17B8\\u17A0\\u17B6\",\"\\u1780\\u1789\\u17D2\\u1789\\u17B6\",\"\\u178F\\u17BB\\u179B\\u17B6\",\"\\u179C\\u17B7\\u1785\\u17D2\\u1786\\u17B7\\u1780\\u17B6\",\"\\u1792\\u17D2\\u1793\\u17BC\"]},ordinal:()=>\"\",firstDayOfWeek:1,rangeSeparator:\" \\u178A\\u179B\\u17CB \",weekAbbreviation:\"\\u179F\\u1794\\u17D2\\u178F\\u17B6\\u17A0\\u17CD\",scrollTitle:\"\\u179A\\u17C6\\u1780\\u17B7\\u179B\\u178A\\u17BE\\u1798\\u17D2\\u1794\\u17B8\\u1794\\u1784\\u17D2\\u1780\\u17BE\\u1793\",toggleTitle:\"\\u1785\\u17BB\\u1785\\u178A\\u17BE\\u1798\\u17D2\\u1794\\u17B8\\u1795\\u17D2\\u179B\\u17B6\\u179F\\u17CB\\u1794\\u17D2\\u178A\\u17BC\\u179A\",yearAriaLabel:\"\\u1786\\u17D2\\u1793\\u17B6\\u17C6\",time_24hr:!0};EE.l10ns.km=Cp;var aY=EE.l10ns;var kE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},_p={weekdays:{shorthand:[\"\\uC77C\",\"\\uC6D4\",\"\\uD654\",\"\\uC218\",\"\\uBAA9\",\"\\uAE08\",\"\\uD1A0\"],longhand:[\"\\uC77C\\uC694\\uC77C\",\"\\uC6D4\\uC694\\uC77C\",\"\\uD654\\uC694\\uC77C\",\"\\uC218\\uC694\\uC77C\",\"\\uBAA9\\uC694\\uC77C\",\"\\uAE08\\uC694\\uC77C\",\"\\uD1A0\\uC694\\uC77C\"]},months:{shorthand:[\"1\\uC6D4\",\"2\\uC6D4\",\"3\\uC6D4\",\"4\\uC6D4\",\"5\\uC6D4\",\"6\\uC6D4\",\"7\\uC6D4\",\"8\\uC6D4\",\"9\\uC6D4\",\"10\\uC6D4\",\"11\\uC6D4\",\"12\\uC6D4\"],longhand:[\"1\\uC6D4\",\"2\\uC6D4\",\"3\\uC6D4\",\"4\\uC6D4\",\"5\\uC6D4\",\"6\\uC6D4\",\"7\\uC6D4\",\"8\\uC6D4\",\"9\\uC6D4\",\"10\\uC6D4\",\"11\\uC6D4\",\"12\\uC6D4\"]},ordinal:()=>\"\\uC77C\",rangeSeparator:\" ~ \",amPM:[\"\\uC624\\uC804\",\"\\uC624\\uD6C4\"]};kE.l10ns.ko=_p;var sY=kE.l10ns;var xE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Mp={weekdays:{shorthand:[\"\\u0416\\u0441\",\"\\u0414\\u0441\",\"\\u0421c\",\"\\u0421\\u0440\",\"\\u0411\\u0441\",\"\\u0416\\u043C\",\"\\u0421\\u0431\"],longhand:[\"\\u0416\\u0435\\u043A\\u0441\\u0435\\u043D\\u0431i\",\"\\u0414\\u04AF\\u0439\\u0441\\u0435\\u043D\\u0431i\",\"\\u0421\\u0435\\u0439\\u0441\\u0435\\u043D\\u0431i\",\"\\u0421\\u04D9\\u0440\\u0441\\u0435\\u043D\\u0431i\",\"\\u0411\\u0435\\u0439\\u0441\\u0435\\u043D\\u0431i\",\"\\u0416\\u04B1\\u043C\\u0430\",\"\\u0421\\u0435\\u043D\\u0431i\"]},months:{shorthand:[\"\\u049A\\u0430\\u04A3\",\"\\u0410\\u049B\\u043F\",\"\\u041D\\u0430\\u0443\",\"\\u0421\\u04D9\\u0443\",\"\\u041C\\u0430\\u043C\",\"\\u041C\\u0430\\u0443\",\"\\u0428i\\u043B\",\"\\u0422\\u0430\\u043C\",\"\\u049A\\u044B\\u0440\",\"\\u049A\\u0430\\u0437\",\"\\u049A\\u0430\\u0440\",\"\\u0416\\u0435\\u043B\"],longhand:[\"\\u049A\\u0430\\u04A3\\u0442\\u0430\\u0440\",\"\\u0410\\u049B\\u043F\\u0430\\u043D\",\"\\u041D\\u0430\\u0443\\u0440\\u044B\\u0437\",\"\\u0421\\u04D9\\u0443i\\u0440\",\"\\u041C\\u0430\\u043C\\u044B\\u0440\",\"\\u041C\\u0430\\u0443\\u0441\\u044B\\u043C\",\"\\u0428i\\u043B\\u0434\\u0435\",\"\\u0422\\u0430\\u043C\\u044B\\u0437\",\"\\u049A\\u044B\\u0440\\u043A\\u04AF\\u0439\\u0435\\u043A\",\"\\u049A\\u0430\\u0437\\u0430\\u043D\",\"\\u049A\\u0430\\u0440\\u0430\\u0448\\u0430\",\"\\u0416\\u0435\\u043B\\u0442\\u043E\\u049B\\u0441\\u0430\\u043D\"]},firstDayOfWeek:1,ordinal:function(){return\"\"},rangeSeparator:\" \\u2014 \",weekAbbreviation:\"\\u0410\\u043F\\u0442\\u0430\",scrollTitle:\"\\u04AE\\u043B\\u043A\\u0435\\u0439\\u0442\\u0443 \\u04AF\\u0448\\u0456\\u043D \\u0430\\u0439\\u043D\\u0430\\u043B\\u0434\\u044B\\u0440\\u044B\\u04A3\\u044B\\u0437\",toggleTitle:\"\\u0410\\u0443\\u044B\\u0441\\u0442\\u044B\\u0440\\u0443 \\u04AF\\u0448\\u0456\\u043D \\u0431\\u0430\\u0441\\u044B\\u04A3\\u044B\\u0437\",amPM:[\"\\u0422\\u0414\",\"\\u0422\\u041A\"],yearAriaLabel:\"\\u0416\\u044B\\u043B\"};xE.l10ns.kz=Mp;var uY=xE.l10ns;var CE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Tp={weekdays:{shorthand:[\"S\",\"Pr\",\"A\",\"T\",\"K\",\"Pn\",\"\\u0160\"],longhand:[\"Sekmadienis\",\"Pirmadienis\",\"Antradienis\",\"Tre\\u010Diadienis\",\"Ketvirtadienis\",\"Penktadienis\",\"\\u0160e\\u0161tadienis\"]},months:{shorthand:[\"Sau\",\"Vas\",\"Kov\",\"Bal\",\"Geg\",\"Bir\",\"Lie\",\"Rgp\",\"Rgs\",\"Spl\",\"Lap\",\"Grd\"],longhand:[\"Sausis\",\"Vasaris\",\"Kovas\",\"Balandis\",\"Gegu\\u017E\\u0117\",\"Bir\\u017Eelis\",\"Liepa\",\"Rugpju\\u0304tis\",\"Rugse\\u0307jis\",\"Spalis\",\"Lapkritis\",\"Gruodis\"]},firstDayOfWeek:1,ordinal:function(){return\"-a\"},rangeSeparator:\" iki \",weekAbbreviation:\"Sav\",scrollTitle:\"Keisti laik\\u0105 pel\\u0117s rateliu\",toggleTitle:\"Perjungti laiko format\\u0105\",time_24hr:!0};CE.l10ns.lt=Tp;var dY=CE.l10ns;var _E=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Fp={firstDayOfWeek:1,weekdays:{shorthand:[\"Sv\",\"Pr\",\"Ot\",\"Tr\",\"Ce\",\"Pk\",\"Se\"],longhand:[\"Sv\\u0113tdiena\",\"Pirmdiena\",\"Otrdiena\",\"Tre\\u0161diena\",\"Ceturtdiena\",\"Piektdiena\",\"Sestdiena\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"Mai\",\"J\\u016Bn\",\"J\\u016Bl\",\"Aug\",\"Sep\",\"Okt\",\"Nov\",\"Dec\"],longhand:[\"Janv\\u0101ris\",\"Febru\\u0101ris\",\"Marts\",\"Apr\\u012Blis\",\"Maijs\",\"J\\u016Bnijs\",\"J\\u016Blijs\",\"Augusts\",\"Septembris\",\"Oktobris\",\"Novembris\",\"Decembris\"]},rangeSeparator:\" l\\u012Bdz \",time_24hr:!0};_E.l10ns.lv=Fp;var hY=_E.l10ns;var ME=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Ip={weekdays:{shorthand:[\"\\u041D\\u0435\",\"\\u041F\\u043E\",\"\\u0412\\u0442\",\"\\u0421\\u0440\",\"\\u0427\\u0435\",\"\\u041F\\u0435\",\"\\u0421\\u0430\"],longhand:[\"\\u041D\\u0435\\u0434\\u0435\\u043B\\u0430\",\"\\u041F\\u043E\\u043D\\u0435\\u0434\\u0435\\u043B\\u043D\\u0438\\u043A\",\"\\u0412\\u0442\\u043E\\u0440\\u043D\\u0438\\u043A\",\"\\u0421\\u0440\\u0435\\u0434\\u0430\",\"\\u0427\\u0435\\u0442\\u0432\\u0440\\u0442\\u043E\\u043A\",\"\\u041F\\u0435\\u0442\\u043E\\u043A\",\"\\u0421\\u0430\\u0431\\u043E\\u0442\\u0430\"]},months:{shorthand:[\"\\u0408\\u0430\\u043D\",\"\\u0424\\u0435\\u0432\",\"\\u041C\\u0430\\u0440\",\"\\u0410\\u043F\\u0440\",\"\\u041C\\u0430\\u0458\",\"\\u0408\\u0443\\u043D\",\"\\u0408\\u0443\\u043B\",\"\\u0410\\u0432\\u0433\",\"\\u0421\\u0435\\u043F\",\"\\u041E\\u043A\\u0442\",\"\\u041D\\u043E\\u0435\",\"\\u0414\\u0435\\u043A\"],longhand:[\"\\u0408\\u0430\\u043D\\u0443\\u0430\\u0440\\u0438\",\"\\u0424\\u0435\\u0432\\u0440\\u0443\\u0430\\u0440\\u0438\",\"\\u041C\\u0430\\u0440\\u0442\",\"\\u0410\\u043F\\u0440\\u0438\\u043B\",\"\\u041C\\u0430\\u0458\",\"\\u0408\\u0443\\u043D\\u0438\",\"\\u0408\\u0443\\u043B\\u0438\",\"\\u0410\\u0432\\u0433\\u0443\\u0441\\u0442\",\"\\u0421\\u0435\\u043F\\u0442\\u0435\\u043C\\u0432\\u0440\\u0438\",\"\\u041E\\u043A\\u0442\\u043E\\u043C\\u0432\\u0440\\u0438\",\"\\u041D\\u043E\\u0435\\u043C\\u0432\\u0440\\u0438\",\"\\u0414\\u0435\\u043A\\u0435\\u043C\\u0432\\u0440\\u0438\"]},firstDayOfWeek:1,weekAbbreviation:\"\\u041D\\u0435\\u0434.\",rangeSeparator:\" \\u0434\\u043E \",time_24hr:!0};ME.l10ns.mk=Ip;var pY=ME.l10ns;var TE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Ap={firstDayOfWeek:1,weekdays:{shorthand:[\"\\u0414\\u0430\",\"\\u041C\\u044F\",\"\\u041B\\u0445\",\"\\u041F\\u04AF\",\"\\u0411\\u0430\",\"\\u0411\\u044F\",\"\\u041D\\u044F\"],longhand:[\"\\u0414\\u0430\\u0432\\u0430\\u0430\",\"\\u041C\\u044F\\u0433\\u043C\\u0430\\u0440\",\"\\u041B\\u0445\\u0430\\u0433\\u0432\\u0430\",\"\\u041F\\u04AF\\u0440\\u044D\\u0432\",\"\\u0411\\u0430\\u0430\\u0441\\u0430\\u043D\",\"\\u0411\\u044F\\u043C\\u0431\\u0430\",\"\\u041D\\u044F\\u043C\"]},months:{shorthand:[\"1-\\u0440 \\u0441\\u0430\\u0440\",\"2-\\u0440 \\u0441\\u0430\\u0440\",\"3-\\u0440 \\u0441\\u0430\\u0440\",\"4-\\u0440 \\u0441\\u0430\\u0440\",\"5-\\u0440 \\u0441\\u0430\\u0440\",\"6-\\u0440 \\u0441\\u0430\\u0440\",\"7-\\u0440 \\u0441\\u0430\\u0440\",\"8-\\u0440 \\u0441\\u0430\\u0440\",\"9-\\u0440 \\u0441\\u0430\\u0440\",\"10-\\u0440 \\u0441\\u0430\\u0440\",\"11-\\u0440 \\u0441\\u0430\\u0440\",\"12-\\u0440 \\u0441\\u0430\\u0440\"],longhand:[\"\\u041D\\u044D\\u0433\\u0434\\u04AF\\u0433\\u044D\\u044D\\u0440 \\u0441\\u0430\\u0440\",\"\\u0425\\u043E\\u0451\\u0440\\u0434\\u0443\\u0433\\u0430\\u0430\\u0440 \\u0441\\u0430\\u0440\",\"\\u0413\\u0443\\u0440\\u0430\\u0432\\u0434\\u0443\\u0433\\u0430\\u0430\\u0440 \\u0441\\u0430\\u0440\",\"\\u0414\\u04E9\\u0440\\u04E9\\u0432\\u0434\\u04AF\\u0433\\u044D\\u044D\\u0440 \\u0441\\u0430\\u0440\",\"\\u0422\\u0430\\u0432\\u0434\\u0443\\u0433\\u0430\\u0430\\u0440 \\u0441\\u0430\\u0440\",\"\\u0417\\u0443\\u0440\\u0433\\u0430\\u0430\\u0434\\u0443\\u0433\\u0430\\u0430\\u0440 \\u0441\\u0430\\u0440\",\"\\u0414\\u043E\\u043B\\u0434\\u0443\\u0433\\u0430\\u0430\\u0440 \\u0441\\u0430\\u0440\",\"\\u041D\\u0430\\u0439\\u043C\\u0434\\u0443\\u0433\\u0430\\u0430\\u0440 \\u0441\\u0430\\u0440\",\"\\u0415\\u0441\\u0434\\u04AF\\u0433\\u044D\\u044D\\u0440 \\u0441\\u0430\\u0440\",\"\\u0410\\u0440\\u0430\\u0432\\u0434\\u0443\\u0433\\u0430\\u0430\\u0440 \\u0441\\u0430\\u0440\",\"\\u0410\\u0440\\u0432\\u0430\\u043D\\u043D\\u044D\\u0433\\u0434\\u04AF\\u0433\\u044D\\u044D\\u0440 \\u0441\\u0430\\u0440\",\"\\u0410\\u0440\\u0432\\u0430\\u043D\\u0445\\u043E\\u0451\\u0440\\u0434\\u0443\\u0433\\u0430\\u0430\\u0440 \\u0441\\u0430\\u0440\"]},rangeSeparator:\"-\\u0441 \",time_24hr:!0};TE.l10ns.mn=Ap;var yY=TE.l10ns;var tN=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},FE={weekdays:{shorthand:[\"Aha\",\"Isn\",\"Sel\",\"Rab\",\"Kha\",\"Jum\",\"Sab\"],longhand:[\"Ahad\",\"Isnin\",\"Selasa\",\"Rabu\",\"Khamis\",\"Jumaat\",\"Sabtu\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mac\",\"Apr\",\"Mei\",\"Jun\",\"Jul\",\"Ogo\",\"Sep\",\"Okt\",\"Nov\",\"Dis\"],longhand:[\"Januari\",\"Februari\",\"Mac\",\"April\",\"Mei\",\"Jun\",\"Julai\",\"Ogos\",\"September\",\"Oktober\",\"November\",\"Disember\"]},firstDayOfWeek:1,ordinal:()=>\"\"},wY=tN.l10ns;var IE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Op={weekdays:{shorthand:[\"\\u1014\\u103D\\u1031\",\"\\u101C\\u102C\",\"\\u1002\\u102B\",\"\\u101F\\u1030\\u1038\",\"\\u1000\\u103C\\u102C\",\"\\u101E\\u1031\\u102C\",\"\\u1014\\u1031\"],longhand:[\"\\u1010\\u1014\\u1004\\u103A\\u1039\\u1002\\u1014\\u103D\\u1031\",\"\\u1010\\u1014\\u1004\\u103A\\u1039\\u101C\\u102C\",\"\\u1021\\u1004\\u103A\\u1039\\u1002\\u102B\",\"\\u1017\\u102F\\u1012\\u1039\\u1013\\u101F\\u1030\\u1038\",\"\\u1000\\u103C\\u102C\\u101E\\u1015\\u1010\\u1031\\u1038\",\"\\u101E\\u1031\\u102C\\u1000\\u103C\\u102C\",\"\\u1005\\u1014\\u1031\"]},months:{shorthand:[\"\\u1007\\u1014\\u103A\",\"\\u1016\\u1031\",\"\\u1019\\u1010\\u103A\",\"\\u1015\\u103C\\u102E\",\"\\u1019\\u1031\",\"\\u1007\\u103D\\u1014\\u103A\",\"\\u101C\\u102D\\u102F\\u1004\\u103A\",\"\\u101E\\u103C\",\"\\u1005\\u1000\\u103A\",\"\\u1021\\u1031\\u102C\\u1000\\u103A\",\"\\u1014\\u102D\\u102F\",\"\\u1012\\u102E\"],longhand:[\"\\u1007\\u1014\\u103A\\u1014\\u101D\\u102B\\u101B\\u102E\",\"\\u1016\\u1031\\u1016\\u1031\\u102C\\u103A\\u101D\\u102B\\u101B\\u102E\",\"\\u1019\\u1010\\u103A\",\"\\u1027\\u1015\\u103C\\u102E\",\"\\u1019\\u1031\",\"\\u1007\\u103D\\u1014\\u103A\",\"\\u1007\\u1030\\u101C\\u102D\\u102F\\u1004\\u103A\",\"\\u101E\\u103C\\u1002\\u102F\\u1010\\u103A\",\"\\u1005\\u1000\\u103A\\u1010\\u1004\\u103A\\u1018\\u102C\",\"\\u1021\\u1031\\u102C\\u1000\\u103A\\u1010\\u102D\\u102F\\u1018\\u102C\",\"\\u1014\\u102D\\u102F\\u101D\\u1004\\u103A\\u1018\\u102C\",\"\\u1012\\u102E\\u1007\\u1004\\u103A\\u1018\\u102C\"]},firstDayOfWeek:1,ordinal:()=>\"\",time_24hr:!0};IE.l10ns.my=Op;var DY=IE.l10ns;var AE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Lp={weekdays:{shorthand:[\"zo\",\"ma\",\"di\",\"wo\",\"do\",\"vr\",\"za\"],longhand:[\"zondag\",\"maandag\",\"dinsdag\",\"woensdag\",\"donderdag\",\"vrijdag\",\"zaterdag\"]},months:{shorthand:[\"jan\",\"feb\",\"mrt\",\"apr\",\"mei\",\"jun\",\"jul\",\"aug\",\"sept\",\"okt\",\"nov\",\"dec\"],longhand:[\"januari\",\"februari\",\"maart\",\"april\",\"mei\",\"juni\",\"juli\",\"augustus\",\"september\",\"oktober\",\"november\",\"december\"]},firstDayOfWeek:1,weekAbbreviation:\"wk\",rangeSeparator:\" t/m \",scrollTitle:\"Scroll voor volgende / vorige\",toggleTitle:\"Klik om te wisselen\",time_24hr:!0,ordinal:e=>e===1||e===8||e>=20?\"ste\":\"de\"};AE.l10ns.nl=Lp;var EY=AE.l10ns;var OE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Pp={weekdays:{shorthand:[\"S\\xF8.\",\"M\\xE5.\",\"Ty.\",\"On.\",\"To.\",\"Fr.\",\"La.\"],longhand:[\"S\\xF8ndag\",\"M\\xE5ndag\",\"Tysdag\",\"Onsdag\",\"Torsdag\",\"Fredag\",\"Laurdag\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mars\",\"Apr\",\"Mai\",\"Juni\",\"Juli\",\"Aug\",\"Sep\",\"Okt\",\"Nov\",\"Des\"],longhand:[\"Januar\",\"Februar\",\"Mars\",\"April\",\"Mai\",\"Juni\",\"Juli\",\"August\",\"September\",\"Oktober\",\"November\",\"Desember\"]},firstDayOfWeek:1,rangeSeparator:\" til \",weekAbbreviation:\"Veke\",scrollTitle:\"Scroll for \\xE5 endre\",toggleTitle:\"Klikk for \\xE5 veksle\",time_24hr:!0,ordinal:()=>\".\"};OE.l10ns.nn=Pp;var xY=OE.l10ns;var LE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Np={weekdays:{shorthand:[\"S\\xF8n\",\"Man\",\"Tir\",\"Ons\",\"Tor\",\"Fre\",\"L\\xF8r\"],longhand:[\"S\\xF8ndag\",\"Mandag\",\"Tirsdag\",\"Onsdag\",\"Torsdag\",\"Fredag\",\"L\\xF8rdag\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"Mai\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Okt\",\"Nov\",\"Des\"],longhand:[\"Januar\",\"Februar\",\"Mars\",\"April\",\"Mai\",\"Juni\",\"Juli\",\"August\",\"September\",\"Oktober\",\"November\",\"Desember\"]},firstDayOfWeek:1,rangeSeparator:\" til \",weekAbbreviation:\"Uke\",scrollTitle:\"Scroll for \\xE5 endre\",toggleTitle:\"Klikk for \\xE5 veksle\",time_24hr:!0,ordinal:()=>\".\"};LE.l10ns.no=Np;var _Y=LE.l10ns;var PE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Rp={weekdays:{shorthand:[\"\\u0A10\\u0A24\",\"\\u0A38\\u0A4B\\u0A2E\",\"\\u0A2E\\u0A70\\u0A17\\u0A32\",\"\\u0A2C\\u0A41\\u0A71\\u0A27\",\"\\u0A35\\u0A40\\u0A30\",\"\\u0A38\\u0A3C\\u0A41\\u0A71\\u0A15\\u0A30\",\"\\u0A38\\u0A3C\\u0A28\\u0A3F\\u0A71\\u0A1A\\u0A30\"],longhand:[\"\\u0A10\\u0A24\\u0A35\\u0A3E\\u0A30\",\"\\u0A38\\u0A4B\\u0A2E\\u0A35\\u0A3E\\u0A30\",\"\\u0A2E\\u0A70\\u0A17\\u0A32\\u0A35\\u0A3E\\u0A30\",\"\\u0A2C\\u0A41\\u0A71\\u0A27\\u0A35\\u0A3E\\u0A30\",\"\\u0A35\\u0A40\\u0A30\\u0A35\\u0A3E\\u0A30\",\"\\u0A38\\u0A3C\\u0A41\\u0A71\\u0A15\\u0A30\\u0A35\\u0A3E\\u0A30\",\"\\u0A38\\u0A3C\\u0A28\\u0A3F\\u0A71\\u0A1A\\u0A30\\u0A35\\u0A3E\\u0A30\"]},months:{shorthand:[\"\\u0A1C\\u0A28\",\"\\u0A2B\\u0A3C\\u0A30\",\"\\u0A2E\\u0A3E\\u0A30\",\"\\u0A05\\u0A2A\\u0A4D\\u0A30\\u0A48\",\"\\u0A2E\\u0A08\",\"\\u0A1C\\u0A42\\u0A28\",\"\\u0A1C\\u0A41\\u0A32\\u0A3E\",\"\\u0A05\\u0A17\",\"\\u0A38\\u0A24\\u0A70\",\"\\u0A05\\u0A15\",\"\\u0A28\\u0A35\\u0A70\",\"\\u0A26\\u0A38\\u0A70\"],longhand:[\"\\u0A1C\\u0A28\\u0A35\\u0A30\\u0A40\",\"\\u0A2B\\u0A3C\\u0A30\\u0A35\\u0A30\\u0A40\",\"\\u0A2E\\u0A3E\\u0A30\\u0A1A\",\"\\u0A05\\u0A2A\\u0A4D\\u0A30\\u0A48\\u0A32\",\"\\u0A2E\\u0A08\",\"\\u0A1C\\u0A42\\u0A28\",\"\\u0A1C\\u0A41\\u0A32\\u0A3E\\u0A08\",\"\\u0A05\\u0A17\\u0A38\\u0A24\",\"\\u0A38\\u0A24\\u0A70\\u0A2C\\u0A30\",\"\\u0A05\\u0A15\\u0A24\\u0A42\\u0A2C\\u0A30\",\"\\u0A28\\u0A35\\u0A70\\u0A2C\\u0A30\",\"\\u0A26\\u0A38\\u0A70\\u0A2C\\u0A30\"]},time_24hr:!0};PE.l10ns.pa=Rp;var TY=PE.l10ns;var NE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Hp={weekdays:{shorthand:[\"Nd\",\"Pn\",\"Wt\",\"\\u015Ar\",\"Cz\",\"Pt\",\"So\"],longhand:[\"Niedziela\",\"Poniedzia\\u0142ek\",\"Wtorek\",\"\\u015Aroda\",\"Czwartek\",\"Pi\\u0105tek\",\"Sobota\"]},months:{shorthand:[\"Sty\",\"Lut\",\"Mar\",\"Kwi\",\"Maj\",\"Cze\",\"Lip\",\"Sie\",\"Wrz\",\"Pa\\u017A\",\"Lis\",\"Gru\"],longhand:[\"Stycze\\u0144\",\"Luty\",\"Marzec\",\"Kwiecie\\u0144\",\"Maj\",\"Czerwiec\",\"Lipiec\",\"Sierpie\\u0144\",\"Wrzesie\\u0144\",\"Pa\\u017Adziernik\",\"Listopad\",\"Grudzie\\u0144\"]},rangeSeparator:\" do \",weekAbbreviation:\"tydz.\",scrollTitle:\"Przewi\\u0144, aby zwi\\u0119kszy\\u0107\",toggleTitle:\"Kliknij, aby prze\\u0142\\u0105czy\\u0107\",firstDayOfWeek:1,time_24hr:!0,ordinal:()=>\".\"};NE.l10ns.pl=Hp;var IY=NE.l10ns;var RE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Bp={weekdays:{shorthand:[\"Dom\",\"Seg\",\"Ter\",\"Qua\",\"Qui\",\"Sex\",\"S\\xE1b\"],longhand:[\"Domingo\",\"Segunda-feira\",\"Ter\\xE7a-feira\",\"Quarta-feira\",\"Quinta-feira\",\"Sexta-feira\",\"S\\xE1bado\"]},months:{shorthand:[\"Jan\",\"Fev\",\"Mar\",\"Abr\",\"Mai\",\"Jun\",\"Jul\",\"Ago\",\"Set\",\"Out\",\"Nov\",\"Dez\"],longhand:[\"Janeiro\",\"Fevereiro\",\"Mar\\xE7o\",\"Abril\",\"Maio\",\"Junho\",\"Julho\",\"Agosto\",\"Setembro\",\"Outubro\",\"Novembro\",\"Dezembro\"]},rangeSeparator:\" at\\xE9 \",time_24hr:!0};RE.l10ns.pt=Bp;var OY=RE.l10ns;var HE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Vp={weekdays:{shorthand:[\"Dum\",\"Lun\",\"Mar\",\"Mie\",\"Joi\",\"Vin\",\"S\\xE2m\"],longhand:[\"Duminic\\u0103\",\"Luni\",\"Mar\\u021Bi\",\"Miercuri\",\"Joi\",\"Vineri\",\"S\\xE2mb\\u0103t\\u0103\"]},months:{shorthand:[\"Ian\",\"Feb\",\"Mar\",\"Apr\",\"Mai\",\"Iun\",\"Iul\",\"Aug\",\"Sep\",\"Oct\",\"Noi\",\"Dec\"],longhand:[\"Ianuarie\",\"Februarie\",\"Martie\",\"Aprilie\",\"Mai\",\"Iunie\",\"Iulie\",\"August\",\"Septembrie\",\"Octombrie\",\"Noiembrie\",\"Decembrie\"]},firstDayOfWeek:1,time_24hr:!0,ordinal:()=>\"\"};HE.l10ns.ro=Vp;var PY=HE.l10ns;var BE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},$p={weekdays:{shorthand:[\"\\u0412\\u0441\",\"\\u041F\\u043D\",\"\\u0412\\u0442\",\"\\u0421\\u0440\",\"\\u0427\\u0442\",\"\\u041F\\u0442\",\"\\u0421\\u0431\"],longhand:[\"\\u0412\\u043E\\u0441\\u043A\\u0440\\u0435\\u0441\\u0435\\u043D\\u044C\\u0435\",\"\\u041F\\u043E\\u043D\\u0435\\u0434\\u0435\\u043B\\u044C\\u043D\\u0438\\u043A\",\"\\u0412\\u0442\\u043E\\u0440\\u043D\\u0438\\u043A\",\"\\u0421\\u0440\\u0435\\u0434\\u0430\",\"\\u0427\\u0435\\u0442\\u0432\\u0435\\u0440\\u0433\",\"\\u041F\\u044F\\u0442\\u043D\\u0438\\u0446\\u0430\",\"\\u0421\\u0443\\u0431\\u0431\\u043E\\u0442\\u0430\"]},months:{shorthand:[\"\\u042F\\u043D\\u0432\",\"\\u0424\\u0435\\u0432\",\"\\u041C\\u0430\\u0440\\u0442\",\"\\u0410\\u043F\\u0440\",\"\\u041C\\u0430\\u0439\",\"\\u0418\\u044E\\u043D\\u044C\",\"\\u0418\\u044E\\u043B\\u044C\",\"\\u0410\\u0432\\u0433\",\"\\u0421\\u0435\\u043D\",\"\\u041E\\u043A\\u0442\",\"\\u041D\\u043E\\u044F\",\"\\u0414\\u0435\\u043A\"],longhand:[\"\\u042F\\u043D\\u0432\\u0430\\u0440\\u044C\",\"\\u0424\\u0435\\u0432\\u0440\\u0430\\u043B\\u044C\",\"\\u041C\\u0430\\u0440\\u0442\",\"\\u0410\\u043F\\u0440\\u0435\\u043B\\u044C\",\"\\u041C\\u0430\\u0439\",\"\\u0418\\u044E\\u043D\\u044C\",\"\\u0418\\u044E\\u043B\\u044C\",\"\\u0410\\u0432\\u0433\\u0443\\u0441\\u0442\",\"\\u0421\\u0435\\u043D\\u0442\\u044F\\u0431\\u0440\\u044C\",\"\\u041E\\u043A\\u0442\\u044F\\u0431\\u0440\\u044C\",\"\\u041D\\u043E\\u044F\\u0431\\u0440\\u044C\",\"\\u0414\\u0435\\u043A\\u0430\\u0431\\u0440\\u044C\"]},firstDayOfWeek:1,ordinal:function(){return\"\"},rangeSeparator:\" \\u2014 \",weekAbbreviation:\"\\u041D\\u0435\\u0434.\",scrollTitle:\"\\u041F\\u0440\\u043E\\u043A\\u0440\\u0443\\u0442\\u0438\\u0442\\u0435 \\u0434\\u043B\\u044F \\u0443\\u0432\\u0435\\u043B\\u0438\\u0447\\u0435\\u043D\\u0438\\u044F\",toggleTitle:\"\\u041D\\u0430\\u0436\\u043C\\u0438\\u0442\\u0435 \\u0434\\u043B\\u044F \\u043F\\u0435\\u0440\\u0435\\u043A\\u043B\\u044E\\u0447\\u0435\\u043D\\u0438\\u044F\",amPM:[\"\\u0414\\u041F\",\"\\u041F\\u041F\"],yearAriaLabel:\"\\u0413\\u043E\\u0434\",time_24hr:!0};BE.l10ns.ru=$p;var RY=BE.l10ns;var VE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Up={weekdays:{shorthand:[\"\\u0D89\",\"\\u0DC3\",\"\\u0D85\",\"\\u0DB6\",\"\\u0DB6\\u0DCA\\u200D\\u0DBB\",\"\\u0DC3\\u0DD2\",\"\\u0DC3\\u0DD9\"],longhand:[\"\\u0D89\\u0DBB\\u0DD2\\u0DAF\\u0DCF\",\"\\u0DC3\\u0DB3\\u0DD4\\u0DAF\\u0DCF\",\"\\u0D85\\u0D9F\\u0DC4\\u0DBB\\u0DD4\\u0DC0\\u0DCF\\u0DAF\\u0DCF\",\"\\u0DB6\\u0DAF\\u0DCF\\u0DAF\\u0DCF\",\"\\u0DB6\\u0DCA\\u200D\\u0DBB\\u0DC4\\u0DC3\\u0DCA\\u0DB4\\u0DAD\\u0DD2\\u0DB1\\u0DCA\\u0DAF\\u0DCF\",\"\\u0DC3\\u0DD2\\u0D9A\\u0DD4\\u0DBB\\u0DCF\\u0DAF\\u0DCF\",\"\\u0DC3\\u0DD9\\u0DB1\\u0DC3\\u0DD4\\u0DBB\\u0DCF\\u0DAF\\u0DCF\"]},months:{shorthand:[\"\\u0DA2\\u0DB1\",\"\\u0DB4\\u0DD9\\u0DB6\",\"\\u0DB8\\u0DCF\\u0DBB\\u0DCA\",\"\\u0D85\\u0DB4\\u0DCA\\u200D\\u0DBB\\u0DDA\",\"\\u0DB8\\u0DD0\\u0DBA\\u0DD2\",\"\\u0DA2\\u0DD4\\u0DB1\\u0DD2\",\"\\u0DA2\\u0DD6\\u0DBD\\u0DD2\",\"\\u0D85\\u0D9C\\u0DDD\",\"\\u0DC3\\u0DD0\\u0DB4\\u0DCA\",\"\\u0D94\\u0D9A\\u0DCA\",\"\\u0DB1\\u0DDC\\u0DC0\\u0DD0\",\"\\u0DAF\\u0DD9\\u0DC3\\u0DD0\"],longhand:[\"\\u0DA2\\u0DB1\\u0DC0\\u0DCF\\u0DBB\\u0DD2\",\"\\u0DB4\\u0DD9\\u0DB6\\u0DBB\\u0DC0\\u0DCF\\u0DBB\\u0DD2\",\"\\u0DB8\\u0DCF\\u0DBB\\u0DCA\\u0DAD\\u0DD4\",\"\\u0D85\\u0DB4\\u0DCA\\u200D\\u0DBB\\u0DDA\\u0DBD\\u0DCA\",\"\\u0DB8\\u0DD0\\u0DBA\\u0DD2\",\"\\u0DA2\\u0DD4\\u0DB1\\u0DD2\",\"\\u0DA2\\u0DD6\\u0DBD\\u0DD2\",\"\\u0D85\\u0D9C\\u0DDD\\u0DC3\\u0DCA\\u0DAD\\u0DD4\",\"\\u0DC3\\u0DD0\\u0DB4\\u0DCA\\u0DAD\\u0DD0\\u0DB8\\u0DCA\\u0DB6\\u0DBB\\u0DCA\",\"\\u0D94\\u0D9A\\u0DCA\\u0DAD\\u0DDD\\u0DB6\\u0DBB\\u0DCA\",\"\\u0DB1\\u0DDC\\u0DC0\\u0DD0\\u0DB8\\u0DCA\\u0DB6\\u0DBB\\u0DCA\",\"\\u0DAF\\u0DD9\\u0DC3\\u0DD0\\u0DB8\\u0DCA\\u0DB6\\u0DBB\\u0DCA\"]},time_24hr:!0};VE.l10ns.si=Up;var BY=VE.l10ns;var $E=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Wp={weekdays:{shorthand:[\"Ned\",\"Pon\",\"Ut\",\"Str\",\"\\u0160tv\",\"Pia\",\"Sob\"],longhand:[\"Nede\\u013Ea\",\"Pondelok\",\"Utorok\",\"Streda\",\"\\u0160tvrtok\",\"Piatok\",\"Sobota\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"M\\xE1j\",\"J\\xFAn\",\"J\\xFAl\",\"Aug\",\"Sep\",\"Okt\",\"Nov\",\"Dec\"],longhand:[\"Janu\\xE1r\",\"Febru\\xE1r\",\"Marec\",\"Apr\\xEDl\",\"M\\xE1j\",\"J\\xFAn\",\"J\\xFAl\",\"August\",\"September\",\"Okt\\xF3ber\",\"November\",\"December\"]},firstDayOfWeek:1,rangeSeparator:\" do \",time_24hr:!0,ordinal:function(){return\".\"}};$E.l10ns.sk=Wp;var $Y=$E.l10ns;var UE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Yp={weekdays:{shorthand:[\"Ned\",\"Pon\",\"Tor\",\"Sre\",\"\\u010Cet\",\"Pet\",\"Sob\"],longhand:[\"Nedelja\",\"Ponedeljek\",\"Torek\",\"Sreda\",\"\\u010Cetrtek\",\"Petek\",\"Sobota\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"Maj\",\"Jun\",\"Jul\",\"Avg\",\"Sep\",\"Okt\",\"Nov\",\"Dec\"],longhand:[\"Januar\",\"Februar\",\"Marec\",\"April\",\"Maj\",\"Junij\",\"Julij\",\"Avgust\",\"September\",\"Oktober\",\"November\",\"December\"]},firstDayOfWeek:1,rangeSeparator:\" do \",time_24hr:!0,ordinal:function(){return\".\"}};UE.l10ns.sl=Yp;var WY=UE.l10ns;var WE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},zp={weekdays:{shorthand:[\"Di\",\"H\\xEB\",\"Ma\",\"M\\xEB\",\"En\",\"Pr\",\"Sh\"],longhand:[\"E Diel\",\"E H\\xEBn\\xEB\",\"E Mart\\xEB\",\"E M\\xEBrkur\\xEB\",\"E Enjte\",\"E Premte\",\"E Shtun\\xEB\"]},months:{shorthand:[\"Jan\",\"Shk\",\"Mar\",\"Pri\",\"Maj\",\"Qer\",\"Kor\",\"Gus\",\"Sht\",\"Tet\",\"N\\xEBn\",\"Dhj\"],longhand:[\"Janar\",\"Shkurt\",\"Mars\",\"Prill\",\"Maj\",\"Qershor\",\"Korrik\",\"Gusht\",\"Shtator\",\"Tetor\",\"N\\xEBntor\",\"Dhjetor\"]},firstDayOfWeek:1,rangeSeparator:\" deri \",weekAbbreviation:\"Java\",yearAriaLabel:\"Viti\",monthAriaLabel:\"Muaji\",hourAriaLabel:\"Ora\",minuteAriaLabel:\"Minuta\",time_24hr:!0};WE.l10ns.sq=zp;var zY=WE.l10ns;var YE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Kp={weekdays:{shorthand:[\"Ned\",\"Pon\",\"Uto\",\"Sre\",\"\\u010Cet\",\"Pet\",\"Sub\"],longhand:[\"Nedelja\",\"Ponedeljak\",\"Utorak\",\"Sreda\",\"\\u010Cetvrtak\",\"Petak\",\"Subota\"]},months:{shorthand:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"Maj\",\"Jun\",\"Jul\",\"Avg\",\"Sep\",\"Okt\",\"Nov\",\"Dec\"],longhand:[\"Januar\",\"Februar\",\"Mart\",\"April\",\"Maj\",\"Jun\",\"Jul\",\"Avgust\",\"Septembar\",\"Oktobar\",\"Novembar\",\"Decembar\"]},firstDayOfWeek:1,weekAbbreviation:\"Ned.\",rangeSeparator:\" do \",time_24hr:!0};YE.l10ns.sr=Kp;var jY=YE.l10ns;var zE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},jp={firstDayOfWeek:1,weekAbbreviation:\"v\",weekdays:{shorthand:[\"s\\xF6n\",\"m\\xE5n\",\"tis\",\"ons\",\"tor\",\"fre\",\"l\\xF6r\"],longhand:[\"s\\xF6ndag\",\"m\\xE5ndag\",\"tisdag\",\"onsdag\",\"torsdag\",\"fredag\",\"l\\xF6rdag\"]},months:{shorthand:[\"jan\",\"feb\",\"mar\",\"apr\",\"maj\",\"jun\",\"jul\",\"aug\",\"sep\",\"okt\",\"nov\",\"dec\"],longhand:[\"januari\",\"februari\",\"mars\",\"april\",\"maj\",\"juni\",\"juli\",\"augusti\",\"september\",\"oktober\",\"november\",\"december\"]},rangeSeparator:\" till \",time_24hr:!0,ordinal:()=>\".\"};zE.l10ns.sv=jp;var GY=zE.l10ns;var KE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},qp={weekdays:{shorthand:[\"\\u0E2D\\u0E32\",\"\\u0E08\",\"\\u0E2D\",\"\\u0E1E\",\"\\u0E1E\\u0E24\",\"\\u0E28\",\"\\u0E2A\"],longhand:[\"\\u0E2D\\u0E32\\u0E17\\u0E34\\u0E15\\u0E22\\u0E4C\",\"\\u0E08\\u0E31\\u0E19\\u0E17\\u0E23\\u0E4C\",\"\\u0E2D\\u0E31\\u0E07\\u0E04\\u0E32\\u0E23\",\"\\u0E1E\\u0E38\\u0E18\",\"\\u0E1E\\u0E24\\u0E2B\\u0E31\\u0E2A\\u0E1A\\u0E14\\u0E35\",\"\\u0E28\\u0E38\\u0E01\\u0E23\\u0E4C\",\"\\u0E40\\u0E2A\\u0E32\\u0E23\\u0E4C\"]},months:{shorthand:[\"\\u0E21.\\u0E04.\",\"\\u0E01.\\u0E1E.\",\"\\u0E21\\u0E35.\\u0E04.\",\"\\u0E40\\u0E21.\\u0E22.\",\"\\u0E1E.\\u0E04.\",\"\\u0E21\\u0E34.\\u0E22.\",\"\\u0E01.\\u0E04.\",\"\\u0E2A.\\u0E04.\",\"\\u0E01.\\u0E22.\",\"\\u0E15.\\u0E04.\",\"\\u0E1E.\\u0E22.\",\"\\u0E18.\\u0E04.\"],longhand:[\"\\u0E21\\u0E01\\u0E23\\u0E32\\u0E04\\u0E21\",\"\\u0E01\\u0E38\\u0E21\\u0E20\\u0E32\\u0E1E\\u0E31\\u0E19\\u0E18\\u0E4C\",\"\\u0E21\\u0E35\\u0E19\\u0E32\\u0E04\\u0E21\",\"\\u0E40\\u0E21\\u0E29\\u0E32\\u0E22\\u0E19\",\"\\u0E1E\\u0E24\\u0E29\\u0E20\\u0E32\\u0E04\\u0E21\",\"\\u0E21\\u0E34\\u0E16\\u0E38\\u0E19\\u0E32\\u0E22\\u0E19\",\"\\u0E01\\u0E23\\u0E01\\u0E0E\\u0E32\\u0E04\\u0E21\",\"\\u0E2A\\u0E34\\u0E07\\u0E2B\\u0E32\\u0E04\\u0E21\",\"\\u0E01\\u0E31\\u0E19\\u0E22\\u0E32\\u0E22\\u0E19\",\"\\u0E15\\u0E38\\u0E25\\u0E32\\u0E04\\u0E21\",\"\\u0E1E\\u0E24\\u0E28\\u0E08\\u0E34\\u0E01\\u0E32\\u0E22\\u0E19\",\"\\u0E18\\u0E31\\u0E19\\u0E27\\u0E32\\u0E04\\u0E21\"]},firstDayOfWeek:1,rangeSeparator:\" \\u0E16\\u0E36\\u0E07 \",scrollTitle:\"\\u0E40\\u0E25\\u0E37\\u0E48\\u0E2D\\u0E19\\u0E40\\u0E1E\\u0E37\\u0E48\\u0E2D\\u0E40\\u0E1E\\u0E34\\u0E48\\u0E21\\u0E2B\\u0E23\\u0E37\\u0E2D\\u0E25\\u0E14\",toggleTitle:\"\\u0E04\\u0E25\\u0E34\\u0E01\\u0E40\\u0E1E\\u0E37\\u0E48\\u0E2D\\u0E40\\u0E1B\\u0E25\\u0E35\\u0E48\\u0E22\\u0E19\",time_24hr:!0,ordinal:()=>\"\"};KE.l10ns.th=qp;var ZY=KE.l10ns;var jE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Gp={weekdays:{shorthand:[\"Paz\",\"Pzt\",\"Sal\",\"\\xC7ar\",\"Per\",\"Cum\",\"Cmt\"],longhand:[\"Pazar\",\"Pazartesi\",\"Sal\\u0131\",\"\\xC7ar\\u015Famba\",\"Per\\u015Fembe\",\"Cuma\",\"Cumartesi\"]},months:{shorthand:[\"Oca\",\"\\u015Eub\",\"Mar\",\"Nis\",\"May\",\"Haz\",\"Tem\",\"A\\u011Fu\",\"Eyl\",\"Eki\",\"Kas\",\"Ara\"],longhand:[\"Ocak\",\"\\u015Eubat\",\"Mart\",\"Nisan\",\"May\\u0131s\",\"Haziran\",\"Temmuz\",\"A\\u011Fustos\",\"Eyl\\xFCl\",\"Ekim\",\"Kas\\u0131m\",\"Aral\\u0131k\"]},firstDayOfWeek:1,ordinal:()=>\".\",rangeSeparator:\" - \",weekAbbreviation:\"Hf\",scrollTitle:\"Art\\u0131rmak i\\xE7in kayd\\u0131r\\u0131n\",toggleTitle:\"A\\xE7/Kapa\",amPM:[\"\\xD6\\xD6\",\"\\xD6S\"],time_24hr:!0};jE.l10ns.tr=Gp;var XY=jE.l10ns;var qE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Jp={firstDayOfWeek:1,weekdays:{shorthand:[\"\\u041D\\u0434\",\"\\u041F\\u043D\",\"\\u0412\\u0442\",\"\\u0421\\u0440\",\"\\u0427\\u0442\",\"\\u041F\\u0442\",\"\\u0421\\u0431\"],longhand:[\"\\u041D\\u0435\\u0434\\u0456\\u043B\\u044F\",\"\\u041F\\u043E\\u043D\\u0435\\u0434\\u0456\\u043B\\u043E\\u043A\",\"\\u0412\\u0456\\u0432\\u0442\\u043E\\u0440\\u043E\\u043A\",\"\\u0421\\u0435\\u0440\\u0435\\u0434\\u0430\",\"\\u0427\\u0435\\u0442\\u0432\\u0435\\u0440\",\"\\u041F'\\u044F\\u0442\\u043D\\u0438\\u0446\\u044F\",\"\\u0421\\u0443\\u0431\\u043E\\u0442\\u0430\"]},months:{shorthand:[\"\\u0421\\u0456\\u0447\",\"\\u041B\\u044E\\u0442\",\"\\u0411\\u0435\\u0440\",\"\\u041A\\u0432\\u0456\",\"\\u0422\\u0440\\u0430\",\"\\u0427\\u0435\\u0440\",\"\\u041B\\u0438\\u043F\",\"\\u0421\\u0435\\u0440\",\"\\u0412\\u0435\\u0440\",\"\\u0416\\u043E\\u0432\",\"\\u041B\\u0438\\u0441\",\"\\u0413\\u0440\\u0443\"],longhand:[\"\\u0421\\u0456\\u0447\\u0435\\u043D\\u044C\",\"\\u041B\\u044E\\u0442\\u0438\\u0439\",\"\\u0411\\u0435\\u0440\\u0435\\u0437\\u0435\\u043D\\u044C\",\"\\u041A\\u0432\\u0456\\u0442\\u0435\\u043D\\u044C\",\"\\u0422\\u0440\\u0430\\u0432\\u0435\\u043D\\u044C\",\"\\u0427\\u0435\\u0440\\u0432\\u0435\\u043D\\u044C\",\"\\u041B\\u0438\\u043F\\u0435\\u043D\\u044C\",\"\\u0421\\u0435\\u0440\\u043F\\u0435\\u043D\\u044C\",\"\\u0412\\u0435\\u0440\\u0435\\u0441\\u0435\\u043D\\u044C\",\"\\u0416\\u043E\\u0432\\u0442\\u0435\\u043D\\u044C\",\"\\u041B\\u0438\\u0441\\u0442\\u043E\\u043F\\u0430\\u0434\",\"\\u0413\\u0440\\u0443\\u0434\\u0435\\u043D\\u044C\"]},time_24hr:!0};qE.l10ns.uk=Jp;var tz=qE.l10ns;var GE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Zp={weekdays:{shorthand:[\"\\u042F\\u043A\\u0448\",\"\\u0414\\u0443\\u0448\",\"\\u0421\\u0435\\u0448\",\"\\u0427\\u043E\\u0440\",\"\\u041F\\u0430\\u0439\",\"\\u0416\\u0443\\u043C\",\"\\u0428\\u0430\\u043D\"],longhand:[\"\\u042F\\u043A\\u0448\\u0430\\u043D\\u0431\\u0430\",\"\\u0414\\u0443\\u0448\\u0430\\u043D\\u0431\\u0430\",\"\\u0421\\u0435\\u0448\\u0430\\u043D\\u0431\\u0430\",\"\\u0427\\u043E\\u0440\\u0448\\u0430\\u043D\\u0431\\u0430\",\"\\u041F\\u0430\\u0439\\u0448\\u0430\\u043D\\u0431\\u0430\",\"\\u0416\\u0443\\u043C\\u0430\",\"\\u0428\\u0430\\u043D\\u0431\\u0430\"]},months:{shorthand:[\"\\u042F\\u043D\\u0432\",\"\\u0424\\u0435\\u0432\",\"\\u041C\\u0430\\u0440\",\"\\u0410\\u043F\\u0440\",\"\\u041C\\u0430\\u0439\",\"\\u0418\\u044E\\u043D\",\"\\u0418\\u044E\\u043B\",\"\\u0410\\u0432\\u0433\",\"\\u0421\\u0435\\u043D\",\"\\u041E\\u043A\\u0442\",\"\\u041D\\u043E\\u044F\",\"\\u0414\\u0435\\u043A\"],longhand:[\"\\u042F\\u043D\\u0432\\u0430\\u0440\",\"\\u0424\\u0435\\u0432\\u0440\\u0430\\u043B\",\"\\u041C\\u0430\\u0440\\u0442\",\"\\u0410\\u043F\\u0440\\u0435\\u043B\",\"\\u041C\\u0430\\u0439\",\"\\u0418\\u044E\\u043D\",\"\\u0418\\u044E\\u043B\",\"\\u0410\\u0432\\u0433\\u0443\\u0441\\u0442\",\"\\u0421\\u0435\\u043D\\u0442\\u044F\\u0431\\u0440\",\"\\u041E\\u043A\\u0442\\u044F\\u0431\\u0440\",\"\\u041D\\u043E\\u044F\\u0431\\u0440\",\"\\u0414\\u0435\\u043A\\u0430\\u0431\\u0440\"]},firstDayOfWeek:1,ordinal:function(){return\"\"},rangeSeparator:\" \\u2014 \",weekAbbreviation:\"\\u04B2\\u0430\\u0444\\u0442\\u0430\",scrollTitle:\"\\u041A\\u0430\\u0442\\u0442\\u0430\\u043B\\u0430\\u0448\\u0442\\u0438\\u0440\\u0438\\u0448 \\u0443\\u0447\\u0443\\u043D \\u0430\\u0439\\u043B\\u0430\\u043D\\u0442\\u0438\\u0440\\u0438\\u043D\\u0433\",toggleTitle:\"\\u040E\\u0442\\u0438\\u0448 \\u0443\\u0447\\u0443\\u043D \\u0431\\u043E\\u0441\\u0438\\u043D\\u0433\",amPM:[\"AM\",\"PM\"],yearAriaLabel:\"\\u0419\\u0438\\u043B\",time_24hr:!0};GE.l10ns.uz=Zp;var rz=GE.l10ns;var JE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Qp={weekdays:{shorthand:[\"Ya\",\"Du\",\"Se\",\"Cho\",\"Pa\",\"Ju\",\"Sha\"],longhand:[\"Yakshanba\",\"Dushanba\",\"Seshanba\",\"Chorshanba\",\"Payshanba\",\"Juma\",\"Shanba\"]},months:{shorthand:[\"Yan\",\"Fev\",\"Mar\",\"Apr\",\"May\",\"Iyun\",\"Iyul\",\"Avg\",\"Sen\",\"Okt\",\"Noy\",\"Dek\"],longhand:[\"Yanvar\",\"Fevral\",\"Mart\",\"Aprel\",\"May\",\"Iyun\",\"Iyul\",\"Avgust\",\"Sentabr\",\"Oktabr\",\"Noyabr\",\"Dekabr\"]},firstDayOfWeek:1,ordinal:function(){return\"\"},rangeSeparator:\" \\u2014 \",weekAbbreviation:\"Hafta\",scrollTitle:\"Kattalashtirish uchun aylantiring\",toggleTitle:\"O\\u2018tish uchun bosing\",amPM:[\"AM\",\"PM\"],yearAriaLabel:\"Yil\",time_24hr:!0};JE.l10ns.uz_latn=Qp;var az=JE.l10ns;var ZE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},Xp={weekdays:{shorthand:[\"CN\",\"T2\",\"T3\",\"T4\",\"T5\",\"T6\",\"T7\"],longhand:[\"Ch\\u1EE7 nh\\u1EADt\",\"Th\\u1EE9 hai\",\"Th\\u1EE9 ba\",\"Th\\u1EE9 t\\u01B0\",\"Th\\u1EE9 n\\u0103m\",\"Th\\u1EE9 s\\xE1u\",\"Th\\u1EE9 b\\u1EA3y\"]},months:{shorthand:[\"Th1\",\"Th2\",\"Th3\",\"Th4\",\"Th5\",\"Th6\",\"Th7\",\"Th8\",\"Th9\",\"Th10\",\"Th11\",\"Th12\"],longhand:[\"Th\\xE1ng m\\u1ED9t\",\"Th\\xE1ng hai\",\"Th\\xE1ng ba\",\"Th\\xE1ng t\\u01B0\",\"Th\\xE1ng n\\u0103m\",\"Th\\xE1ng s\\xE1u\",\"Th\\xE1ng b\\u1EA3y\",\"Th\\xE1ng t\\xE1m\",\"Th\\xE1ng ch\\xEDn\",\"Th\\xE1ng m\\u01B0\\u1EDDi\",\"Th\\xE1ng m\\u01B0\\u1EDDi m\\u1ED9t\",\"Th\\xE1ng m\\u01B0\\u1EDDi hai\"]},firstDayOfWeek:1,rangeSeparator:\" \\u0111\\u1EBFn \"};ZE.l10ns.vn=Xp;var sz=ZE.l10ns;var QE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},eg={weekdays:{shorthand:[\"\\u5468\\u65E5\",\"\\u5468\\u4E00\",\"\\u5468\\u4E8C\",\"\\u5468\\u4E09\",\"\\u5468\\u56DB\",\"\\u5468\\u4E94\",\"\\u5468\\u516D\"],longhand:[\"\\u661F\\u671F\\u65E5\",\"\\u661F\\u671F\\u4E00\",\"\\u661F\\u671F\\u4E8C\",\"\\u661F\\u671F\\u4E09\",\"\\u661F\\u671F\\u56DB\",\"\\u661F\\u671F\\u4E94\",\"\\u661F\\u671F\\u516D\"]},months:{shorthand:[\"\\u4E00\\u6708\",\"\\u4E8C\\u6708\",\"\\u4E09\\u6708\",\"\\u56DB\\u6708\",\"\\u4E94\\u6708\",\"\\u516D\\u6708\",\"\\u4E03\\u6708\",\"\\u516B\\u6708\",\"\\u4E5D\\u6708\",\"\\u5341\\u6708\",\"\\u5341\\u4E00\\u6708\",\"\\u5341\\u4E8C\\u6708\"],longhand:[\"\\u4E00\\u6708\",\"\\u4E8C\\u6708\",\"\\u4E09\\u6708\",\"\\u56DB\\u6708\",\"\\u4E94\\u6708\",\"\\u516D\\u6708\",\"\\u4E03\\u6708\",\"\\u516B\\u6708\",\"\\u4E5D\\u6708\",\"\\u5341\\u6708\",\"\\u5341\\u4E00\\u6708\",\"\\u5341\\u4E8C\\u6708\"]},rangeSeparator:\" \\u81F3 \",weekAbbreviation:\"\\u5468\",scrollTitle:\"\\u6EDA\\u52A8\\u5207\\u6362\",toggleTitle:\"\\u70B9\\u51FB\\u5207\\u6362 12/24 \\u5C0F\\u65F6\\u65F6\\u5236\"};QE.l10ns.zh=eg;var uz=QE.l10ns;var XE=typeof window!=\"undefined\"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},tg={weekdays:{shorthand:[\"\\u9031\\u65E5\",\"\\u9031\\u4E00\",\"\\u9031\\u4E8C\",\"\\u9031\\u4E09\",\"\\u9031\\u56DB\",\"\\u9031\\u4E94\",\"\\u9031\\u516D\"],longhand:[\"\\u661F\\u671F\\u65E5\",\"\\u661F\\u671F\\u4E00\",\"\\u661F\\u671F\\u4E8C\",\"\\u661F\\u671F\\u4E09\",\"\\u661F\\u671F\\u56DB\",\"\\u661F\\u671F\\u4E94\",\"\\u661F\\u671F\\u516D\"]},months:{shorthand:[\"\\u4E00\\u6708\",\"\\u4E8C\\u6708\",\"\\u4E09\\u6708\",\"\\u56DB\\u6708\",\"\\u4E94\\u6708\",\"\\u516D\\u6708\",\"\\u4E03\\u6708\",\"\\u516B\\u6708\",\"\\u4E5D\\u6708\",\"\\u5341\\u6708\",\"\\u5341\\u4E00\\u6708\",\"\\u5341\\u4E8C\\u6708\"],longhand:[\"\\u4E00\\u6708\",\"\\u4E8C\\u6708\",\"\\u4E09\\u6708\",\"\\u56DB\\u6708\",\"\\u4E94\\u6708\",\"\\u516D\\u6708\",\"\\u4E03\\u6708\",\"\\u516B\\u6708\",\"\\u4E5D\\u6708\",\"\\u5341\\u6708\",\"\\u5341\\u4E00\\u6708\",\"\\u5341\\u4E8C\\u6708\"]},rangeSeparator:\" \\u81F3 \",weekAbbreviation:\"\\u9031\",scrollTitle:\"\\u6EFE\\u52D5\\u5207\\u63DB\",toggleTitle:\"\\u9EDE\\u64CA\\u5207\\u63DB 12/24 \\u5C0F\\u6642\\u6642\\u5236\"};XE.l10ns.zh_tw=tg;var dz=XE.l10ns;var nN={ar:Gm,at:Jm,az:Zm,be:Qm,bg:Xm,bn:ep,bs:tp,ca:Wc,ckb:rp,cat:Wc,cs:ip,cy:ap,da:op,de:sp,default:{...so},en:so,eo:lp,es:up,et:cp,fa:dp,fi:fp,fo:hp,fr:mp,gr:pp,he:gp,hi:yp,hr:vp,hu:wp,hy:bp,id:Dp,is:Sp,it:Ep,ja:kp,ka:xp,ko:_p,km:Cp,kz:Mp,lt:Tp,lv:Fp,mk:Ip,mn:Ap,ms:FE,my:Op,nl:Lp,nn:Pp,no:Np,pa:Rp,pl:Hp,pt:Bp,ro:Vp,ru:$p,si:Up,sk:Wp,sl:Yp,sq:zp,sr:Kp,sv:jp,th:qp,tr:Gp,uk:Jp,vn:Xp,zh:eg,zh_tw:tg,uz:Zp,uz_latn:Qp},nn=nN;var tk={ar:nn.ar,cs:nn.cs,da:nn.da,de:nn.de,en:nn.en,\"en-gb\":nn.en,es:nn.es,fr:nn.fr,hi:nn.hi,id:nn.id,it:nn.it,ja:nn.ja,ko:nn.ko,nl:nn.nl,nn:nn.no,pl:nn.pl,pt:nn.pt,\"pt-br\":nn.pt,ro:nn.ro,ru:nn.ru,tr:nn.tr,\"zh-cn\":nn.zh,\"zh-tw\":nn.zh_tw},rN=tk[ek.moment.locale()];function zc(e){let t=e==null?void 0:e.getSetting(\"date-picker-week-start\"),r=rN||tk.en;return t?{...r,firstDayOfWeek:t}:r}var Kc=[\"onChange\",\"onClose\",\"onDayCreate\",\"onDestroy\",\"onKeyDown\",\"onMonthChange\",\"onOpen\",\"onParseConfig\",\"onReady\",\"onValueUpdate\",\"onYearChange\",\"onPreCalendarPosition\"],ka={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:\"F j, Y\",altInput:!1,altInputClass:\"form-control input\",animate:typeof window==\"object\"&&window.navigator.userAgent.indexOf(\"MSIE\")===-1,ariaDateFormat:\"F j, Y\",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:\", \",dateFormat:\"Y-m-d\",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:e=>typeof console!=\"undefined\"&&console.warn(e),getWeek:e=>{let t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);let r=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-r.getTime())/864e5-3+(r.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:\"default\",minuteIncrement:5,mode:\"single\",monthSelectorType:\"dropdown\",nextArrow:\"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>\",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:\"auto\",positionElement:void 0,prevArrow:\"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>\",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1,win:window};var er=(e,t=2)=>`000${e}`.slice(t*-1),wr=e=>e===!0?1:0;function ng(e,t,r){let n;return function(){let i=arguments;r.clearTimeout(n),n=r.setTimeout(()=>e.apply(this,i),t)}}var jc=e=>Array.isArray(e)?e:[e];var rg=()=>{},Pl=(e,t,r)=>r.months[t?\"shorthand\":\"longhand\"][e],nk={D:rg,F:function(e,t,r){e.setMonth(r.months.longhand.indexOf(t))},G:(e,t)=>{e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:(e,t)=>{e.setHours(parseFloat(t))},J:(e,t)=>{e.setDate(parseFloat(t))},K:(e,t,r)=>{e.setHours(e.getHours()%12+12*wr(new RegExp(r.amPM[1],\"i\").test(t)))},M:function(e,t,r){e.setMonth(r.months.shorthand.indexOf(t))},S:(e,t)=>{e.setSeconds(parseFloat(t))},U:(e,t)=>new Date(parseFloat(t)*1e3),W:function(e,t,r){let n=parseInt(t),i=new Date(e.getFullYear(),0,2+(n-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+r.firstDayOfWeek),i},Y:(e,t)=>{e.setFullYear(parseFloat(t))},Z:(e,t)=>new Date(t),d:(e,t)=>{e.setDate(parseFloat(t))},h:(e,t)=>{e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:(e,t)=>{e.setMinutes(parseFloat(t))},j:(e,t)=>{e.setDate(parseFloat(t))},l:rg,m:(e,t)=>{e.setMonth(parseFloat(t)-1)},n:(e,t)=>{e.setMonth(parseFloat(t)-1)},s:(e,t)=>{e.setSeconds(parseFloat(t))},u:(e,t)=>new Date(parseFloat(t)),w:rg,y:(e,t)=>{e.setFullYear(2e3+parseFloat(t))}},Gi={D:\"\",F:\"\",G:\"(\\\\d\\\\d|\\\\d)\",H:\"(\\\\d\\\\d|\\\\d)\",J:\"(\\\\d\\\\d|\\\\d)\\\\w+\",K:\"\",M:\"\",S:\"(\\\\d\\\\d|\\\\d)\",U:\"(.+)\",W:\"(\\\\d\\\\d|\\\\d)\",Y:\"(\\\\d{4})\",Z:\"(.+)\",d:\"(\\\\d\\\\d|\\\\d)\",h:\"(\\\\d\\\\d|\\\\d)\",i:\"(\\\\d\\\\d|\\\\d)\",j:\"(\\\\d\\\\d|\\\\d)\",l:\"\",m:\"(\\\\d\\\\d|\\\\d)\",n:\"(\\\\d\\\\d|\\\\d)\",s:\"(\\\\d\\\\d|\\\\d)\",u:\"(.+)\",w:\"(\\\\d\\\\d|\\\\d)\",y:\"(\\\\d{2})\"},ds={Z:e=>e.toISOString(),D:function(e,t,r){return t.weekdays.shorthand[ds.w(e,t,r)]},F:function(e,t,r){return Pl(ds.n(e,t,r)-1,!1,t)},G:function(e,t,r){return er(ds.h(e,t,r))},H:e=>er(e.getHours()),J:function(e,t){return t.ordinal!==void 0?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:(e,t)=>t.amPM[wr(e.getHours()>11)],M:function(e,t){return Pl(e.getMonth(),!0,t)},S:e=>er(e.getSeconds()),U:e=>e.getTime()/1e3,W:function(e,t,r){return r.getWeek(e)},Y:e=>er(e.getFullYear(),4),d:e=>er(e.getDate()),h:e=>e.getHours()%12?e.getHours()%12:12,i:e=>er(e.getMinutes()),j:e=>e.getDate(),l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:e=>er(e.getMonth()+1),n:e=>e.getMonth()+1,s:e=>e.getSeconds(),u:e=>e.getTime(),w:e=>e.getDay(),y:e=>String(e.getFullYear()).substring(2)};var ig=({config:e=ka,l10n:t=so,isMobile:r=!1})=>(n,i,a)=>{let o=a||t;return e.formatDate!==void 0&&!r?e.formatDate(n,i,o):i.split(\"\").map((s,u,l)=>ds[s]&&l[u-1]!==\"\\\\\"?ds[s](n,o,e):s!==\"\\\\\"?s:\"\").join(\"\")},qc=({config:e=ka,l10n:t=so})=>(r,n,i,a)=>{if(r!==0&&!r)return;let o=a||t,s,u=r;if(r.getDate)s=new Date(r.getTime());else if(typeof r!=\"string\"&&r.toFixed!==void 0)s=new Date(r);else if(typeof r==\"string\"){let l=n||(e||ka).dateFormat,c=String(r).trim();if(c===\"today\")s=new Date,i=!0;else if(e&&e.parseDate)s=e.parseDate(r,l);else if(/Z$/.test(c)||/GMT$/.test(c))s=new Date(r);else{let d,m=[];for(let h=0,g=0,y=\"\";h<l.length;h++){let v=l[h],D=v===\"\\\\\",I=l[h-1]===\"\\\\\"||D;if(Gi[v]&&!I){y+=Gi[v];let C=new RegExp(y).exec(r);C&&(d=!0)&&m[v!==\"Y\"?\"push\":\"unshift\"]({fn:nk[v],val:C[++g]})}else D||(y+=\".\")}s=!e||!e.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),m.forEach(({fn:h,val:g})=>s=h(s,g,o)||s),s=d?s:void 0}}if(!(s.getDate&&!isNaN(s.getTime()))){e.errorHandler(new Error(`Invalid date provided: ${u}`));return}return i===!0&&s.setHours(0,0,0,0),s};function br(e,t,r=!0){return r!==!1?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var rk=(e,t,r)=>e>Math.min(t,r)&&e<Math.max(t,r),Gc=(e,t,r)=>e*3600+t*60+r,ik=e=>{let t=Math.floor(e/3600),r=(e-t*3600)/60;return[t,r,e-t*3600-r*60]},ak={DAY:864e5};function Jc(e){let t=e.defaultHour,r=e.defaultMinute,n=e.defaultSeconds;if(e.minDate!==void 0){let i=e.minDate.getHours(),a=e.minDate.getMinutes(),o=e.minDate.getSeconds();t<i&&(t=i),t===i&&r<a&&(r=a),t===i&&r===a&&n<o&&(n=e.minDate.getSeconds())}if(e.maxDate!==void 0){let i=e.maxDate.getHours(),a=e.maxDate.getMinutes();t=Math.min(t,i),t===i&&(r=Math.min(a,r)),t===i&&r===a&&(n=e.maxDate.getSeconds())}return{hours:t,minutes:r,seconds:n}}function tr(e,t,r){if(r===!0)return e.classList.add(t);e.classList.remove(t)}function Pt(e,t,r,n){let i=e.createElement(t);return r=r||\"\",n=n||\"\",i.className=r,n!==void 0&&(i.textContent=n),i}function Nl(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ag(e,t){if(t(e))return e;if(e.parentNode)return ag(e.parentNode,t)}function Rl(e,t,r){let n=Pt(e,\"div\",\"numInputWrapper\"),i=Pt(e,\"input\",\"numInput \"+t),a=Pt(e,\"span\",\"arrowUp\"),o=Pt(e,\"span\",\"arrowDown\");if(navigator.userAgent.indexOf(\"MSIE 9.0\")===-1?i.type=\"number\":(i.type=\"text\",i.pattern=\"\\\\d*\"),r!==void 0)for(let s in r)i.setAttribute(s,r[s]);return n.appendChild(i),n.appendChild(a),n.appendChild(o),n}function Dr(e){try{return typeof e.composedPath==\"function\"?e.composedPath()[0]:e.target}catch(t){return e.target}}var iN=300;function aN(e,t){let r=e.win||window,n={config:{...ka,...Fn.defaultConfig},l10n:Yc};n.parseDate=qc({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=v,n._setHoursFromDate=h,n._positionCalendar=Vt,n.changeMonth=it,n.changeYear=vt,n.clear=N,n.close=Ze,n.onMouseOver=gn,n._createElement=Pt,n.createDay=P,n.destroy=It,n.isEnabled=Wt,n.jumpToDate=C,n.updateValue=de,n.open=vn,n.redraw=Bt,n.set=Z,n.setDate=Ie,n.toggle=ar;function i(){n.utils={getDaysInMonth(M=n.currentMonth,H=n.currentYear){return M===1&&(H%4===0&&H%100!==0||H%400===0)?29:n.l10n.daysInMonth[M]}}}function a(){n.element=n.input=e,n.isOpen=!1,jn(),Rt(),Cn(),Dt(),i(),n.isMobile||A(),I(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&h(n.config.noCalendar?n.latestSelectedDateObj:void 0),de(!1)),u();let M=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&M&&Vt(),ht(\"onReady\")}function o(){var M;return((M=n.calendarContainer)==null?void 0:M.getRootNode()).activeElement||n.element.doc.activeElement}function s(M){return M.bind(n)}function u(){let M=n.config;M.weekNumbers===!1&&M.showMonths===1||M.noCalendar!==!0&&r.requestAnimationFrame(function(){if(n.calendarContainer!==void 0&&(n.calendarContainer.style.visibility=\"hidden\",n.calendarContainer.style.display=\"block\"),n.daysContainer!==void 0){let H=(n.days.offsetWidth+1)*M.showMonths;n.daysContainer.style.width=H+\"px\",n.calendarContainer.style.width=H+(n.weekWrapper!==void 0?n.weekWrapper.offsetWidth:0)+\"px\",n.calendarContainer.style.removeProperty(\"visibility\"),n.calendarContainer.style.removeProperty(\"display\")}})}function l(M){if(n.selectedDates.length===0){let q=n.config.minDate===void 0||br(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),ie=Jc(n.config);q.setHours(ie.hours,ie.minutes,ie.seconds,q.getMilliseconds()),n.selectedDates=[q],n.latestSelectedDateObj=q}M!==void 0&&M.type!==\"blur\"&&ge(M);let H=n._input.value;m(),de(),n._input.value!==H&&n._debouncedChange()}function c(M,H){return M%12+12*wr(H===n.l10n.amPM[1])}function d(M){switch(M%24){case 0:case 12:return 12;default:return M%12}}function m(){if(n.hourElement===void 0||n.minuteElement===void 0)return;let M=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,H=(parseInt(n.minuteElement.value,10)||0)%60,q=n.secondElement!==void 0?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==void 0&&(M=c(M,n.amPM.textContent));let ie=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&br(n.latestSelectedDateObj,n.config.minDate,!0)===0,ye=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&br(n.latestSelectedDateObj,n.config.maxDate,!0)===0;if(n.config.maxTime!==void 0&&n.config.minTime!==void 0&&n.config.minTime>n.config.maxTime){let ce=Gc(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),ae=Gc(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),Se=Gc(M,H,q);if(Se>ae&&Se<ce){let nt=ik(ce);M=nt[0],H=nt[1],q=nt[2]}}else{if(ye){let ce=n.config.maxTime!==void 0?n.config.maxTime:n.config.maxDate;M=Math.min(M,ce.getHours()),M===ce.getHours()&&(H=Math.min(H,ce.getMinutes())),H===ce.getMinutes()&&(q=Math.min(q,ce.getSeconds()))}if(ie){let ce=n.config.minTime!==void 0?n.config.minTime:n.config.minDate;M=Math.max(M,ce.getHours()),M===ce.getHours()&&H<ce.getMinutes()&&(H=ce.getMinutes()),H===ce.getMinutes()&&(q=Math.max(q,ce.getSeconds()))}}g(M,H,q)}function h(M){let H=M||n.latestSelectedDateObj;H&&H.getHours&&g(H.getHours(),H.getMinutes(),H.getSeconds())}function g(M,H,q){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(M%24,H,q||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=er(n.config.time_24hr?M:(12+M)%12+12*wr(M%12===0)),n.minuteElement.value=er(H),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[wr(M>=12)]),n.secondElement!==void 0&&(n.secondElement.value=er(q)))}function y(M){let H=Dr(M),q=parseInt(H.value)+(M.delta||0);(q/1e3>1||M.key===\"Enter\"&&!/[^\\d]/.test(q.toString()))&&vt(q)}function v(M,H,q,ie){if(Array.isArray(H))return H.forEach(ye=>v(M,ye,q,ie));if(Array.isArray(M))return M.forEach(ye=>v(ye,H,q,ie));M.addEventListener(H,q,ie),n._handlers.push({remove:()=>M.removeEventListener(H,q,ie)})}function D(){ht(\"onChange\")}function I(){if(n.config.wrap&&[\"open\",\"close\",\"toggle\",\"clear\"].forEach(H=>{Array.prototype.forEach.call(n.element.querySelectorAll(`[data-${H}]`),q=>v(q,\"click\",n[H]))}),n.isMobile){Ht();return}let M=ng(yn,50,r);if(n._debouncedChange=ng(D,iN,r),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&v(n.daysContainer,\"mouseover\",H=>{n.config.mode===\"range\"&&gn(Dr(H))}),v(n._input,\"keydown\",en),n.calendarContainer!==void 0&&v(n.calendarContainer,\"keydown\",en),!n.config.inline&&!n.config.static&&v(r,\"resize\",M),r.ontouchstart!==void 0?v(r.document,\"touchstart\",jt):v(r.document,\"mousedown\",jt),v(r.document,\"focus\",jt,{capture:!0}),n.config.clickOpens===!0&&(v(n._input,\"focus\",n.open),v(n._input,\"click\",n.open)),n.daysContainer!==void 0&&(v(n.monthNav,\"click\",ve),v(n.monthNav,[\"keyup\",\"increment\"],y),v(n.daysContainer,\"click\",rn)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){let H=q=>Dr(q).select();v(n.timeContainer,[\"increment\"],l),v(n.timeContainer,\"blur\",l,{capture:!0}),v(n.timeContainer,\"click\",x),v([n.hourElement,n.minuteElement],[\"focus\",\"click\"],H),n.secondElement!==void 0&&v(n.secondElement,\"focus\",()=>n.secondElement&&n.secondElement.select()),n.amPM!==void 0&&v(n.amPM,\"click\",q=>{l(q)})}n.config.allowInput&&v(n._input,\"blur\",Jt)}function C(M,H){let q=M!==void 0?n.parseDate(M):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),ie=n.currentYear,ye=n.currentMonth;try{q!==void 0&&(n.currentYear=q.getFullYear(),n.currentMonth=q.getMonth())}catch(ce){ce.message=\"Invalid date supplied: \"+q,n.config.errorHandler(ce)}H&&n.currentYear!==ie&&(ht(\"onYearChange\"),re()),H&&(n.currentYear!==ie||n.currentMonth!==ye)&&ht(\"onMonthChange\"),n.redraw()}function x(M){let H=Dr(M);~H.className.indexOf(\"arrow\")&&O(M,H.classList.contains(\"arrowUp\")?1:-1)}function O(M,H,q){let ie=M&&Dr(M),ye=q||ie&&ie.parentNode&&ie.parentNode.firstChild,ce=St(\"increment\");ce.delta=H,ye&&ye.dispatchEvent(ce)}function A(){let M=r.document.createDocumentFragment();if(n.calendarContainer=Pt(r.document,\"div\",\"flatpickr-calendar\"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(M.appendChild(pe()),n.innerContainer=Pt(r.document,\"div\",\"flatpickr-innerContainer\"),n.config.weekNumbers){let{weekWrapper:q,weekNumbers:ie}=Je();n.innerContainer.appendChild(q),n.weekNumbers=ie,n.weekWrapper=q}n.rContainer=Pt(r.document,\"div\",\"flatpickr-rContainer\"),n.rContainer.appendChild(Ce()),n.daysContainer||(n.daysContainer=Pt(r.document,\"div\",\"flatpickr-days\"),n.daysContainer.tabIndex=-1),te(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),M.appendChild(n.innerContainer)}n.config.enableTime&&M.appendChild(De()),tr(n.calendarContainer,\"rangeMode\",n.config.mode===\"range\"),tr(n.calendarContainer,\"animate\",n.config.animate===!0),tr(n.calendarContainer,\"multiMonth\",n.config.showMonths>1),n.calendarContainer.appendChild(M);let H=n.config.appendTo!==void 0&&n.config.appendTo.nodeType!==void 0;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?\"inline\":\"static\"),n.config.inline&&(!H&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):n.config.appendTo!==void 0&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){let q=Pt(r.document,\"div\",\"flatpickr-wrapper\");n.element.parentNode&&n.element.parentNode.insertBefore(q,n.element),q.appendChild(n.element),n.altInput&&q.appendChild(n.altInput),q.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo!==void 0?n.config.appendTo:r.document.body).appendChild(n.calendarContainer)}function P(M,H,q,ie){let ye=Wt(H,!0),ce=Pt(r.document,\"span\",M,H.getDate().toString());return ce.dateObj=H,ce.$i=ie,ce.setAttribute(\"aria-label\",n.formatDate(H,n.config.ariaDateFormat)),M.indexOf(\"hidden\")===-1&&br(H,n.now)===0&&(n.todayDateElem=ce,ce.classList.add(\"today\"),ce.setAttribute(\"aria-current\",\"date\")),ye?(ce.tabIndex=-1,L(H)&&(ce.classList.add(\"selected\"),n.selectedDateElem=ce,n.config.mode===\"range\"&&(tr(ce,\"startRange\",n.selectedDates[0]&&br(H,n.selectedDates[0],!0)===0),tr(ce,\"endRange\",n.selectedDates[1]&&br(H,n.selectedDates[1],!0)===0),M===\"nextMonthDay\"&&ce.classList.add(\"inRange\")))):ce.classList.add(\"flatpickr-disabled\"),n.config.mode===\"range\"&&K(H)&&!L(H)&&ce.classList.add(\"inRange\"),n.weekNumbers&&n.config.showMonths===1&&M!==\"prevMonthDay\"&&ie%7===6&&n.weekNumbers.insertAdjacentHTML(\"beforeend\",\"<span class='flatpickr-day'>\"+n.config.getWeek(H)+\"</span>\"),ht(\"onDayCreate\",ce),ce}function B(M){M.focus(),n.config.mode===\"range\"&&gn(M)}function G(M){let H=M>0?0:n.config.showMonths-1,q=M>0?n.config.showMonths:-1;for(let ie=H;ie!=q;ie+=M){let ye=n.daysContainer.children[ie],ce=M>0?0:ye.children.length-1,ae=M>0?ye.children.length:-1;for(let Se=ce;Se!=ae;Se+=M){let nt=ye.children[Se];if(nt.className.indexOf(\"hidden\")===-1&&Wt(nt.dateObj))return nt}}}function J(M,H){let q=M.className.indexOf(\"Month\")===-1?M.dateObj.getMonth():n.currentMonth,ie=H>0?n.config.showMonths:-1,ye=H>0?1:-1;for(let ce=q-n.currentMonth;ce!=ie;ce+=ye){let ae=n.daysContainer.children[ce],Se=q-n.currentMonth===ce?M.$i+H:H<0?ae.children.length-1:0,nt=ae.children.length;for(let Te=Se;Te>=0&&Te<nt&&Te!=(H>0?nt:-1);Te+=ye){let Ue=ae.children[Te];if(Ue.className.indexOf(\"hidden\")===-1&&Wt(Ue.dateObj)&&Math.abs(M.$i-Te)>=Math.abs(H))return B(Ue)}}n.changeMonth(ye),Q(G(ye),0)}function Q(M,H){let q=o(),ie=Tt(q||n.element.doc.body),ye=M!==void 0?M:ie?q:n.selectedDateElem!==void 0&&Tt(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&Tt(n.todayDateElem)?n.todayDateElem:G(H>0?1:-1);ye===void 0?n._input.focus():ie?J(ye,H):B(ye)}function oe(M,H){let q=(new Date(M,H,1).getDay()-n.l10n.firstDayOfWeek+7)%7,ie=n.utils.getDaysInMonth((H-1+12)%12,M),ye=n.utils.getDaysInMonth(H,M),ce=r.document.createDocumentFragment(),ae=n.config.showMonths>1,Se=ae?\"prevMonthDay hidden\":\"prevMonthDay\",nt=ae?\"nextMonthDay hidden\":\"nextMonthDay\",Te=ie+1-q,Ue=0;for(;Te<=ie;Te++,Ue++)ce.appendChild(P(`flatpickr-day ${Se}`,new Date(M,H-1,Te),Te,Ue));for(Te=1;Te<=ye;Te++,Ue++)ce.appendChild(P(\"flatpickr-day\",new Date(M,H,Te),Te,Ue));for(let Ft=ye+1;Ft<=42-q&&(n.config.showMonths===1||Ue%7!==0);Ft++,Ue++)ce.appendChild(P(`flatpickr-day ${nt}`,new Date(M,H+1,Ft%ye),Ft,Ue));let We=Pt(r.document,\"div\",\"dayContainer\");return We.appendChild(ce),We}function te(){if(n.daysContainer===void 0)return;Nl(n.daysContainer),n.weekNumbers&&Nl(n.weekNumbers);let M=n.element.doc.createDocumentFragment();for(let H=0;H<n.config.showMonths;H++){let q=new Date(n.currentYear,n.currentMonth,1);q.setMonth(n.currentMonth+H),M.appendChild(oe(q.getFullYear(),q.getMonth()))}n.daysContainer.appendChild(M),n.days=n.daysContainer.firstChild,n.config.mode===\"range\"&&n.selectedDates.length===1&&gn()}function re(){if(n.config.showMonths>1||n.config.monthSelectorType!==\"dropdown\")return;let M=function(H){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&H<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&H>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML=\"\";for(let H=0;H<12;H++){if(!M(H))continue;let q=Pt(r.document,\"option\",\"flatpickr-monthDropdown-month\");q.value=new Date(n.currentYear,H).getMonth().toString(),q.textContent=Pl(H,n.config.shorthandCurrentMonth,n.l10n),q.tabIndex=-1,n.currentMonth===H&&(q.selected=!0),n.monthsDropdownContainer.appendChild(q)}}function ne(){let M=Pt(r.document,\"div\",\"flatpickr-month\"),H=r.document.createDocumentFragment(),q;n.config.showMonths>1||n.config.monthSelectorType===\"static\"?q=Pt(r.document,\"span\",\"cur-month\"):(n.monthsDropdownContainer=Pt(r.document,\"select\",\"flatpickr-monthDropdown-months\"),n.monthsDropdownContainer.setAttribute(\"aria-label\",n.l10n.monthAriaLabel),v(n.monthsDropdownContainer,\"change\",ae=>{let Se=Dr(ae),nt=parseInt(Se.value,10);n.changeMonth(nt-n.currentMonth),ht(\"onMonthChange\")}),re(),q=n.monthsDropdownContainer);let ie=Rl(r.document,\"cur-year\",{tabindex:\"-1\"}),ye=ie.getElementsByTagName(\"input\")[0];ye.setAttribute(\"aria-label\",n.l10n.yearAriaLabel),n.config.minDate&&ye.setAttribute(\"min\",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(ye.setAttribute(\"max\",n.config.maxDate.getFullYear().toString()),ye.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());let ce=Pt(r.document,\"div\",\"flatpickr-current-month\");return ce.appendChild(q),ce.appendChild(ie),H.appendChild(ce),M.appendChild(H),{container:M,yearElement:ye,monthElement:q}}function be(){Nl(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(let M=n.config.showMonths;M--;){let H=ne();n.yearElements.push(H.yearElement),n.monthElements.push(H.monthElement),n.monthNav.appendChild(H.container)}n.monthNav.appendChild(n.nextMonthNav)}function pe(){return n.monthNav=Pt(r.document,\"div\",\"flatpickr-months\"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=Pt(r.document,\"span\",\"flatpickr-prev-month\"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=Pt(r.document,\"span\",\"flatpickr-next-month\"),n.nextMonthNav.innerHTML=n.config.nextArrow,be(),Object.defineProperty(n,\"_hidePrevMonthArrow\",{get:()=>n.__hidePrevMonthArrow,set(M){n.__hidePrevMonthArrow!==M&&(tr(n.prevMonthNav,\"flatpickr-disabled\",M),n.__hidePrevMonthArrow=M)}}),Object.defineProperty(n,\"_hideNextMonthArrow\",{get:()=>n.__hideNextMonthArrow,set(M){n.__hideNextMonthArrow!==M&&(tr(n.nextMonthNav,\"flatpickr-disabled\",M),n.__hideNextMonthArrow=M)}}),n.currentYearElement=n.yearElements[0],ee(),n.monthNav}function De(){n.calendarContainer.classList.add(\"hasTime\"),n.config.noCalendar&&n.calendarContainer.classList.add(\"noCalendar\");let M=Jc(n.config);n.timeContainer=Pt(r.document,\"div\",\"flatpickr-time\"),n.timeContainer.tabIndex=-1;let H=Pt(r.document,\"span\",\"flatpickr-time-separator\",\":\"),q=Rl(r.document,\"flatpickr-hour\",{\"aria-label\":n.l10n.hourAriaLabel});n.hourElement=q.getElementsByTagName(\"input\")[0];let ie=Rl(r.document,\"flatpickr-minute\",{\"aria-label\":n.l10n.minuteAriaLabel});if(n.minuteElement=ie.getElementsByTagName(\"input\")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=er(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?M.hours:d(M.hours)),n.minuteElement.value=er(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():M.minutes),n.hourElement.setAttribute(\"step\",n.config.hourIncrement.toString()),n.minuteElement.setAttribute(\"step\",n.config.minuteIncrement.toString()),n.hourElement.setAttribute(\"min\",n.config.time_24hr?\"0\":\"1\"),n.hourElement.setAttribute(\"max\",n.config.time_24hr?\"23\":\"12\"),n.hourElement.setAttribute(\"maxlength\",\"2\"),n.minuteElement.setAttribute(\"min\",\"0\"),n.minuteElement.setAttribute(\"max\",\"59\"),n.minuteElement.setAttribute(\"maxlength\",\"2\"),n.timeContainer.appendChild(q),n.timeContainer.appendChild(H),n.timeContainer.appendChild(ie),n.config.time_24hr&&n.timeContainer.classList.add(\"time24hr\"),n.config.enableSeconds){n.timeContainer.classList.add(\"hasSeconds\");let ye=Rl(r.document,\"flatpickr-second\");n.secondElement=ye.getElementsByTagName(\"input\")[0],n.secondElement.value=er(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():M.seconds),n.secondElement.setAttribute(\"step\",n.minuteElement.getAttribute(\"step\")),n.secondElement.setAttribute(\"min\",\"0\"),n.secondElement.setAttribute(\"max\",\"59\"),n.secondElement.setAttribute(\"maxlength\",\"2\"),n.timeContainer.appendChild(Pt(r.document,\"span\",\"flatpickr-time-separator\",\":\")),n.timeContainer.appendChild(ye)}return n.config.time_24hr||(n.amPM=Pt(r.document,\"span\",\"flatpickr-am-pm\",n.l10n.amPM[wr((n.latestSelectedDateObj?parseInt(n.hourElement.value):n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}function Ce(){n.weekdayContainer?Nl(n.weekdayContainer):n.weekdayContainer=Pt(r.document,\"div\",\"flatpickr-weekdays\");for(let M=n.config.showMonths;M--;){let H=Pt(r.document,\"div\",\"flatpickr-weekdaycontainer\");n.weekdayContainer.appendChild(H)}return U(),n.weekdayContainer}function U(){if(!n.weekdayContainer)return;let M=n.l10n.firstDayOfWeek,H=[...n.l10n.weekdays.shorthand];M>0&&M<H.length&&(H=[...H.splice(M,H.length),...H.splice(0,M)]);for(let q=n.config.showMonths;q--;)n.weekdayContainer.children[q].innerHTML=`\n      <span class='flatpickr-weekday'>\n        ${H.join(\"</span><span class='flatpickr-weekday'>\")}\n      </span>\n      `}function Je(){n.calendarContainer.classList.add(\"hasWeeks\");let M=Pt(r.document,\"div\",\"flatpickr-weekwrapper\");M.appendChild(Pt(r.document,\"span\",\"flatpickr-weekday\",n.l10n.weekAbbreviation));let H=Pt(r.document,\"div\",\"flatpickr-weeks\");return M.appendChild(H),{weekWrapper:M,weekNumbers:H}}function it(M,H=!0){let q=H?M:M-n.currentMonth;q<0&&n._hidePrevMonthArrow===!0||q>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=q,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,ht(\"onYearChange\"),re()),te(),ht(\"onMonthChange\"),ee())}function N(M=!0,H=!0){if(n.input.value=\"\",n.altInput!==void 0&&(n.altInput.value=\"\"),n.mobileInput!==void 0&&(n.mobileInput.value=\"\"),n.selectedDates=[],n.latestSelectedDateObj=void 0,H===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){let{hours:q,minutes:ie,seconds:ye}=Jc(n.config);g(q,ie,ye)}n.redraw(),M&&ht(\"onChange\")}function Ze(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove(\"open\"),n._input!==void 0&&n._input.classList.remove(\"active\")),ht(\"onClose\")}function It(){n.config!==void 0&&ht(\"onDestroy\");for(let M=n._handlers.length;M--;)n._handlers[M].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){let M=n.calendarContainer.parentNode;if(M.lastChild&&M.removeChild(M.lastChild),M.parentNode){for(;M.firstChild;)M.parentNode.insertBefore(M.firstChild,M);M.parentNode.removeChild(M)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type=\"text\",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove(\"flatpickr-input\"),n.input.removeAttribute(\"readonly\")),[\"_showTimeInput\",\"latestSelectedDateObj\",\"_hideNextMonthArrow\",\"_hidePrevMonthArrow\",\"__hideNextMonthArrow\",\"__hidePrevMonthArrow\",\"isMobile\",\"isOpen\",\"selectedDateElem\",\"minDateHasTime\",\"maxDateHasTime\",\"days\",\"daysContainer\",\"_input\",\"_positionElement\",\"innerContainer\",\"rContainer\",\"monthNav\",\"todayDateElem\",\"calendarContainer\",\"weekdayContainer\",\"prevMonthNav\",\"nextMonthNav\",\"monthsDropdownContainer\",\"currentMonthElement\",\"currentYearElement\",\"navigationCurrentMonth\",\"selectedDateElem\",\"config\"].forEach(M=>{try{delete n[M]}catch(H){}})}function Mt(M){return n.calendarContainer.contains(M)}function jt(M){if(n.isOpen&&!n.config.inline){let H=Dr(M),q=Mt(H),ye=!(H===n.input||H===n.altInput||n.element.contains(H)||M.path&&M.path.indexOf&&(~M.path.indexOf(n.input)||~M.path.indexOf(n.altInput)))&&!q&&!Mt(M.relatedTarget),ce=!n.config.ignoredFocusElements.some(ae=>ae.contains(H));ye&&ce&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==\"\"&&n.input.value!==void 0&&l(),n.close(),n.config&&n.config.mode===\"range\"&&n.selectedDates.length===1&&n.clear(!1))}}function vt(M){if(!M||n.config.minDate&&M<n.config.minDate.getFullYear()||n.config.maxDate&&M>n.config.maxDate.getFullYear())return;let H=M,q=n.currentYear!==H;n.currentYear=H||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),q&&(n.redraw(),ht(\"onYearChange\"),re())}function Wt(M,H=!0){var ce;let q=n.parseDate(M,void 0,H);if(n.config.minDate&&q&&br(q,n.config.minDate,H!==void 0?H:!n.minDateHasTime)<0||n.config.maxDate&&q&&br(q,n.config.maxDate,H!==void 0?H:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(q===void 0)return!1;let ie=!!n.config.enable,ye=(ce=n.config.enable)!=null?ce:n.config.disable;for(let ae=0,Se;ae<ye.length;ae++){if(Se=ye[ae],typeof Se==\"function\"&&Se(q))return ie;if(Se.getTime&&q!==void 0&&Se.getTime()===q.getTime())return ie;if(typeof Se==\"string\"){let nt=n.parseDate(Se,void 0,!0);return nt&&nt.getTime()===q.getTime()?ie:!ie}else if(typeof Se==\"object\"&&q!==void 0&&Se.from&&Se.to&&q.getTime()>=Se.from.getTime()&&q.getTime()<=Se.to.getTime())return ie}return!ie}function Tt(M){return n.daysContainer!==void 0?M.className.indexOf(\"hidden\")===-1&&M.className.indexOf(\"flatpickr-disabled\")===-1&&n.daysContainer.contains(M):!1}function Jt(M){let H=M.target===n._input,q=n._input.value.trimEnd()!==ue();H&&q&&!(M.relatedTarget&&Mt(M.relatedTarget))&&n.setDate(n._input.value,!0,M.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function en(M){let H=Dr(M),q=n.config.wrap?e.contains(H):H===n._input,ie=n.config.allowInput,ye=n.isOpen&&(!ie||!q),ce=n.config.inline&&q&&!ie;if(M.keyCode===13&&q){if(ie)return n.setDate(n._input.value,!0,H===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),H.blur();n.open()}else if(Mt(H)||ye||ce){let ae=!!n.timeContainer&&n.timeContainer.contains(H);switch(M.keyCode){case 13:ae?(M.preventDefault(),l(),Hr()):rn(M);break;case 27:M.preventDefault(),Hr();break;case 8:case 46:q&&!n.config.allowInput&&(M.preventDefault(),n.clear());break;case 37:case 39:if(!ae&&!q){M.preventDefault();let Se=o();if(n.daysContainer!==void 0&&(ie===!1||Se&&Tt(Se))){let nt=M.keyCode===39?1:-1;M.ctrlKey?(M.stopPropagation(),it(nt),Q(G(1),0)):Q(void 0,nt)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:{M.preventDefault();let Se=M.keyCode===40?1:-1;n.daysContainer&&H.$i!==void 0||H===n.input||H===n.altInput?M.ctrlKey?(M.stopPropagation(),vt(n.currentYear-Se),Q(G(1),0)):ae||Q(void 0,Se*7):H===n.currentYearElement?vt(n.currentYear-Se):n.config.enableTime&&(!ae&&n.hourElement&&n.hourElement.focus(),l(M),n._debouncedChange());break}case 9:if(ae){let Se=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(Te=>Te),nt=Se.indexOf(H);if(nt!==-1){let Te=Se[nt+(M.shiftKey?-1:1)];M.preventDefault(),(Te||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(H)&&M.shiftKey&&(M.preventDefault(),n._input.focus());break;default:break}}if(n.amPM!==void 0&&H===n.amPM)switch(M.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],m(),de();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],m(),de();break}(q||Mt(H))&&ht(\"onKeyDown\",M)}function gn(M,H=\"flatpickr-day\"){if(n.selectedDates.length!==1||M&&(!M.classList.contains(H)||M.classList.contains(\"flatpickr-disabled\")))return;let q=M?M.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),ie=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),ye=Math.min(q,n.selectedDates[0].getTime()),ce=Math.max(q,n.selectedDates[0].getTime()),ae=!1,Se=0,nt=0;for(let Ue=ye;Ue<ce;Ue+=ak.DAY)Wt(new Date(Ue),!0)||(ae=ae||Ue>ye&&Ue<ce,Ue<ie&&(!Se||Ue>Se)?Se=Ue:Ue>ie&&(!nt||Ue<nt)&&(nt=Ue));Array.from(n.rContainer.querySelectorAll(`*:nth-child(-n+${n.config.showMonths}) > .${H}`)).forEach(Ue=>{let Ft=Ue.dateObj.getTime(),Hn=Se>0&&Ft<Se||nt>0&&Ft>nt;if(Hn){Ue.classList.add(\"notAllowed\"),[\"inRange\",\"startRange\",\"endRange\"].forEach(Ot=>{Ue.classList.remove(Ot)});return}else if(ae&&!Hn)return;[\"startRange\",\"inRange\",\"endRange\",\"notAllowed\"].forEach(Ot=>{Ue.classList.remove(Ot)}),M!==void 0&&(M.classList.add(q<=n.selectedDates[0].getTime()?\"startRange\":\"endRange\"),ie<q&&Ft===ie?Ue.classList.add(\"startRange\"):ie>q&&Ft===ie&&Ue.classList.add(\"endRange\"),Ft>=Se&&(nt===0||Ft<=nt)&&rk(Ft,ie,q)&&Ue.classList.add(\"inRange\"))})}function yn(){n.isOpen&&!n.config.static&&!n.config.inline&&Vt()}function vn(M,H=n._positionElement){if(n.isMobile===!0){if(M){M.preventDefault();let ie=Dr(M);ie&&ie.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),ht(\"onOpen\");return}else if(n._input.disabled||n.config.inline)return;let q=n.isOpen;n.isOpen=!0,q||(n.calendarContainer.classList.add(\"open\"),n._input.classList.add(\"active\"),ht(\"onOpen\"),Vt(H)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(M===void 0||!n.timeContainer.contains(M.relatedTarget))&&r.setTimeout(()=>n.hourElement.select(),50)}function xn(M){return H=>{let q=n.config[`_${M}Date`]=n.parseDate(H,n.config.dateFormat),ie=n.config[`_${M===\"min\"?\"max\":\"min\"}Date`];q!==void 0&&(n[M===\"min\"?\"minDateHasTime\":\"maxDateHasTime\"]=q.getHours()>0||q.getMinutes()>0||q.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(ye=>Wt(ye)),!n.selectedDates.length&&M===\"min\"&&h(q),de()),n.daysContainer&&(Bt(),q!==void 0?n.currentYearElement[M]=q.getFullYear().toString():n.currentYearElement.removeAttribute(M),n.currentYearElement.disabled=!!ie&&q!==void 0&&ie.getFullYear()===q.getFullYear())}}function jn(){let M=[\"wrap\",\"weekNumbers\",\"allowInput\",\"allowInvalidPreload\",\"clickOpens\",\"time_24hr\",\"enableTime\",\"noCalendar\",\"altInput\",\"shorthandCurrentMonth\",\"inline\",\"static\",\"enableSeconds\",\"disableMobile\"],H={...JSON.parse(JSON.stringify(e.dataset||{})),...t},q={};n.config.parseDate=H.parseDate,n.config.formatDate=H.formatDate,Object.defineProperty(n.config,\"enable\",{get:()=>n.config._enable,set:ce=>{n.config._enable=at(ce)}}),Object.defineProperty(n.config,\"disable\",{get:()=>n.config._disable,set:ce=>{n.config._disable=at(ce)}});let ie=H.mode===\"time\";if(!H.dateFormat&&(H.enableTime||ie)){let ce=Fn.defaultConfig.dateFormat||ka.dateFormat;q.dateFormat=H.noCalendar||ie?\"H:i\"+(H.enableSeconds?\":S\":\"\"):ce+\" H:i\"+(H.enableSeconds?\":S\":\"\")}if(H.altInput&&(H.enableTime||ie)&&!H.altFormat){let ce=Fn.defaultConfig.altFormat||ka.altFormat;q.altFormat=H.noCalendar||ie?\"h:i\"+(H.enableSeconds?\":S K\":\" K\"):ce+` h:i${H.enableSeconds?\":S\":\"\"} K`}Object.defineProperty(n.config,\"minDate\",{get:()=>n.config._minDate,set:xn(\"min\")}),Object.defineProperty(n.config,\"maxDate\",{get:()=>n.config._maxDate,set:xn(\"max\")});let ye=ce=>ae=>{n.config[ce===\"min\"?\"_minTime\":\"_maxTime\"]=n.parseDate(ae,\"H:i:S\")};Object.defineProperty(n.config,\"minTime\",{get:()=>n.config._minTime,set:ye(\"min\")}),Object.defineProperty(n.config,\"maxTime\",{get:()=>n.config._maxTime,set:ye(\"max\")}),H.mode===\"time\"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,q,H);for(let ce=0;ce<M.length;ce++)n.config[M[ce]]=n.config[M[ce]]===!0||n.config[M[ce]]===\"true\";Kc.filter(ce=>n.config[ce]!==void 0).forEach(ce=>{n.config[ce]=jc(n.config[ce]||[]).map(s)}),n.isMobile=!n.config.disableMobile&&!n.config.inline&&n.config.mode===\"single\"&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(let ce=0;ce<n.config.plugins.length;ce++){let ae=n.config.plugins[ce](n)||{};for(let Se in ae)Kc.indexOf(Se)>-1?n.config[Se]=jc(ae[Se]).map(s).concat(n.config[Se]):typeof H[Se]==\"undefined\"&&(n.config[Se]=ae[Se])}H.altInputClass||(n.config.altInputClass=sn().className+\" \"+n.config.altInputClass),ht(\"onParseConfig\")}function sn(){return n.config.wrap?e.querySelector(\"[data-input]\"):e}function Rt(){typeof n.config.locale!=\"object\"&&typeof Fn.l10ns[n.config.locale]==\"undefined\"&&n.config.errorHandler(new Error(`flatpickr: invalid locale ${n.config.locale}`)),n.l10n={...Fn.l10ns.default,...typeof n.config.locale==\"object\"?n.config.locale:n.config.locale!==\"default\"?Fn.l10ns[n.config.locale]:void 0},Gi.D=`(${n.l10n.weekdays.shorthand.join(\"|\")})`,Gi.l=`(${n.l10n.weekdays.longhand.join(\"|\")})`,Gi.M=`(${n.l10n.months.shorthand.join(\"|\")})`,Gi.F=`(${n.l10n.months.longhand.join(\"|\")})`,Gi.K=`(${n.l10n.amPM[0]}|${n.l10n.amPM[1]}|${n.l10n.amPM[0].toLowerCase()}|${n.l10n.amPM[1].toLowerCase()})`,{...t,...JSON.parse(JSON.stringify(e.dataset||{}))}.time_24hr===void 0&&Fn.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=ig(n),n.parseDate=qc({config:n.config,l10n:n.l10n})}function Vt(M){if(typeof n.config.position==\"function\")return void n.config.position(n,M);if(n.calendarContainer===void 0)return;ht(\"onPreCalendarPosition\");let H=M||n._positionElement,q=Array.prototype.reduce.call(n.calendarContainer.children,(Yt,Bn)=>Yt+Bn.offsetHeight,0),ie=n.calendarContainer.offsetWidth,ye=n.config.position.split(\" \"),ce=ye[0],ae=ye.length>1?ye[1]:null,Se=H.getBoundingClientRect(),nt=r.innerHeight-Se.bottom,Te=ce===\"above\"||ce!==\"below\"&&nt<q&&Se.top>q,Ue=r.pageYOffset+Se.top+(Te?-q-2:H.offsetHeight+2);if(tr(n.calendarContainer,\"arrowTop\",!Te),tr(n.calendarContainer,\"arrowBottom\",Te),n.config.inline)return;let We=r.pageXOffset+Se.left,Ft=!1,Hn=!1;ae===\"center\"?(We-=(ie-Se.width)/2,Ft=!0):ae===\"right\"&&(We-=ie-Se.width,Hn=!0),tr(n.calendarContainer,\"arrowLeft\",!Ft&&!Hn),tr(n.calendarContainer,\"arrowCenter\",Ft),tr(n.calendarContainer,\"arrowRight\",Hn);let Ot=r.document.body.offsetWidth-(r.pageXOffset+Se.right),or=We+ie>r.document.body.offsetWidth,sr=Ot+ie>r.document.body.offsetWidth;if(tr(n.calendarContainer,\"rightMost\",or),!n.config.static)if(n.calendarContainer.style.top=`${Ue}px`,!or)n.calendarContainer.style.left=`${We}px`,n.calendarContainer.style.right=\"auto\";else if(!sr)n.calendarContainer.style.left=\"auto\",n.calendarContainer.style.right=`${Ot}px`;else{let Yt=Sr();if(Yt===void 0)return;let Bn=r.document.body.offsetWidth,Er=Math.max(0,Bn/2-ie/2),Gr=\".flatpickr-calendar.centerMost:before\",tu=\".flatpickr-calendar.centerMost:after\",z=Yt.cssRules.length,k=`{left:${Se.left}px;right:auto;}`;tr(n.calendarContainer,\"rightMost\",!1),tr(n.calendarContainer,\"centerMost\",!0),Yt.insertRule(`${Gr},${tu}${k}`,z),n.calendarContainer.style.left=`${Er}px`,n.calendarContainer.style.right=\"auto\"}}function Sr(){let M=null;for(let H=0;H<r.document.styleSheets.length;H++){let q=r.document.styleSheets[H];if(q.cssRules){try{q.cssRules}catch(ie){continue}M=q;break}}return M!=null?M:Rr()}function Rr(){let M=r.document.createElement(\"style\");return r.document.head.appendChild(M),M.sheet}function Bt(){n.config.noCalendar||n.isMobile||(re(),ee(),te())}function Hr(){n._input.focus(),r.navigator.userAgent.indexOf(\"MSIE\")!==-1||navigator.msMaxTouchPoints!==void 0?r.setTimeout(n.close,0):n.close()}function rn(M){M.preventDefault(),M.stopPropagation();let H=ae=>ae.classList&&ae.classList.contains(\"flatpickr-day\")&&!ae.classList.contains(\"flatpickr-disabled\")&&!ae.classList.contains(\"notAllowed\"),q=ag(Dr(M),H);if(q===void 0)return;let ie=q,ye=n.latestSelectedDateObj=new Date(ie.dateObj.getTime()),ce=(ye.getMonth()<n.currentMonth||ye.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!==\"range\";if(n.selectedDateElem=ie,n.config.mode===\"single\")n.selectedDates=[ye];else if(n.config.mode===\"multiple\"){let ae=L(ye);ae?n.selectedDates.splice(parseInt(ae),1):n.selectedDates.push(ye)}else n.config.mode===\"range\"&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=ye,n.selectedDates.push(ye),br(ye,n.selectedDates[0],!0)!==0&&n.selectedDates.sort((ae,Se)=>ae.getTime()-Se.getTime()));if(m(),ce){let ae=n.currentYear!==ye.getFullYear();n.currentYear=ye.getFullYear(),n.currentMonth=ye.getMonth(),ae&&(ht(\"onYearChange\"),re()),ht(\"onMonthChange\")}if(ee(),te(),de(),!ce&&n.config.mode!==\"range\"&&n.config.showMonths===1?B(ie):n.selectedDateElem!==void 0&&n.hourElement===void 0&&n.selectedDateElem&&n.selectedDateElem.focus(),n.hourElement!==void 0&&n.hourElement!==void 0&&n.hourElement.focus(),n.config.closeOnSelect){let ae=n.config.mode===\"single\"&&!n.config.enableTime,Se=n.config.mode===\"range\"&&n.selectedDates.length===2&&!n.config.enableTime;(ae||Se)&&Hr()}D()}let At={locale:[Rt,U],showMonths:[be,u,Ce],minDate:[C],maxDate:[C],positionElement:[_n],clickOpens:[()=>{n.config.clickOpens===!0?(v(n._input,\"focus\",n.open),v(n._input,\"click\",n.open)):(n._input.removeEventListener(\"focus\",n.open),n._input.removeEventListener(\"click\",n.open))}]};function Z(M,H){if(M!==null&&typeof M==\"object\"){Object.assign(n.config,M);for(let q in M)At[q]!==void 0&&At[q].forEach(ie=>ie())}else n.config[M]=H,At[M]!==void 0?At[M].forEach(q=>q()):Kc.indexOf(M)>-1&&(n.config[M]=jc(H));n.redraw(),de(!0)}function me(M,H){let q=[];if(Array.isArray(M))q=M.map(ie=>n.parseDate(ie,H));else if(M.getDate||typeof M==\"number\")q=[n.parseDate(M,H)];else if(typeof M==\"string\")switch(n.config.mode){case\"single\":case\"time\":q=[n.parseDate(M,H)];break;case\"multiple\":q=M.split(n.config.conjunction).map(ie=>n.parseDate(ie,H));break;case\"range\":q=M.split(n.l10n.rangeSeparator).map(ie=>n.parseDate(ie,H));break;default:break}else n.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(M)}`));n.selectedDates=n.config.allowInvalidPreload?q:q.filter(ie=>ie.getDate&&Wt(ie,!1)),n.config.mode===\"range\"&&n.selectedDates.sort((ie,ye)=>ie.getTime()-ye.getTime())}function Ie(M,H=!1,q=n.config.dateFormat){if(M!==0&&!M||Array.isArray(M)&&M.length===0)return n.clear(H);me(M,q),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),C(void 0,H),h(),n.selectedDates.length===0&&n.clear(!1),de(H),H&&ht(\"onChange\")}function at(M){return M.slice().map(H=>typeof H==\"string\"||typeof H==\"number\"||H.getDate?n.parseDate(H,void 0,!0):H&&typeof H==\"object\"&&H.from&&H.to?{from:n.parseDate(H.from,void 0),to:n.parseDate(H.to,void 0)}:H).filter(H=>H)}function Dt(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;let M=n.config.defaultDate||((n.input.nodeName===\"INPUT\"||n.input.nodeName===\"TEXTAREA\")&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);M&&me(M,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]),n.config.minTime!==void 0&&(n.config.minTime=n.parseDate(n.config.minTime,\"H:i\")),n.config.maxTime!==void 0&&(n.config.maxTime=n.parseDate(n.config.maxTime,\"H:i\")),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}function Cn(){if(n.input=sn(),!n.input){n.config.errorHandler(new Error(\"Invalid input element specified\"));return}n.input._type=n.input.type,n.input.type=\"text\",n.input.classList.add(\"flatpickr-input\"),n._input=n.input,n.config.altInput&&(n.altInput=Pt(r.document,n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type=\"text\",n.input.setAttribute(\"type\",\"hidden\"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute(\"readonly\",\"readonly\"),_n()}function _n(){n._positionElement=n.config.positionElement||n._input}function Ht(){let M=n.config.enableTime?n.config.noCalendar?\"time\":\"datetime-local\":\"date\";n.mobileInput=Pt(r.document,\"input\",n.input.className+\" flatpickr-mobile\"),n.mobileInput.tabIndex=1,n.mobileInput.type=M,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=M===\"datetime-local\"?\"Y-m-d\\\\TH:i:S\":M===\"date\"?\"Y-m-d\":\"H:i:S\",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,\"Y-m-d\")),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,\"Y-m-d\")),n.input.getAttribute(\"step\")&&(n.mobileInput.step=String(n.input.getAttribute(\"step\"))),n.input.type=\"hidden\",n.altInput!==void 0&&(n.altInput.type=\"hidden\");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(H){}v(n.mobileInput,\"change\",H=>{n.setDate(Dr(H).value,!1,n.mobileFormatStr),ht(\"onChange\"),ht(\"onClose\")})}function ar(M){if(n.isOpen===!0)return n.close();n.open(M)}function ht(M,H){if(n.config===void 0)return;let q=n.config[M];if(q!==void 0&&q.length>0)for(let ie=0;q[ie]&&ie<q.length;ie++)q[ie](n.selectedDates,n.input.value,n,H);M===\"onChange\"&&(n.input.dispatchEvent(St(\"change\")),n.input.dispatchEvent(St(\"input\")))}function St(M){let H=r.document.createEvent(\"Event\");return H.initEvent(M,!0,!0),H}function L(M){for(let H=0;H<n.selectedDates.length;H++){let q=n.selectedDates[H];if(q.getDate&&br(q,M)===0)return\"\"+H}return!1}function K(M){return n.config.mode!==\"range\"||n.selectedDates.length<2?!1:br(M,n.selectedDates[0])>=0&&br(M,n.selectedDates[1])<=0}function ee(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach((M,H)=>{let q=new Date(n.currentYear,n.currentMonth,1);q.setMonth(n.currentMonth+H),n.config.showMonths>1||n.config.monthSelectorType===\"static\"?n.monthElements[H].textContent=Pl(q.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+\" \":n.monthsDropdownContainer.value=q.getMonth().toString(),M.value=q.getFullYear().toString()}),n._hidePrevMonthArrow=n.config.minDate!==void 0&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=n.config.maxDate!==void 0&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function ue(M){let H=M||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(q=>n.formatDate(q,H)).filter((q,ie,ye)=>n.config.mode!==\"range\"||n.config.enableTime||ye.indexOf(q)===ie).join(n.config.mode!==\"range\"?n.config.conjunction:n.l10n.rangeSeparator)}function de(M=!0){n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==void 0?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):\"\"),n.input.value=ue(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=ue(n.config.altFormat)),M!==!1&&ht(\"onValueUpdate\")}function ve(M){let H=Dr(M),q=n.prevMonthNav.contains(H),ie=n.nextMonthNav.contains(H);q||ie?it(q?-1:1):n.yearElements.indexOf(H)>=0?H.select():H.classList.contains(\"arrowUp\")?n.changeYear(n.currentYear+1):H.classList.contains(\"arrowDown\")&&n.changeYear(n.currentYear-1)}function ge(M){M.preventDefault();let H=M.type===\"keydown\",q=Dr(M),ie=q;n.amPM!==void 0&&q===n.amPM&&(n.amPM.textContent=n.l10n.amPM[wr(n.amPM.textContent===n.l10n.amPM[0])]);let ye=parseFloat(ie.getAttribute(\"min\")),ce=parseFloat(ie.getAttribute(\"max\")),ae=parseFloat(ie.getAttribute(\"step\")),Se=parseInt(ie.value,10),nt=M.delta||(H?M.which===38?1:-1:0),Te=Se+ae*nt;if(typeof ie.value!=\"undefined\"&&ie.value.length===2){let Ue=ie===n.hourElement,We=ie===n.minuteElement;Te<ye?(Te=ce+Te+wr(!Ue)+(wr(Ue)&&wr(!n.amPM)),We&&O(void 0,-1,n.hourElement)):Te>ce&&(Te=ie===n.hourElement?Te-ce-wr(!n.amPM):ye,We&&O(void 0,1,n.hourElement)),n.amPM&&Ue&&(ae===1?Te+Se===23:Math.abs(Te-Se)>ae)&&(n.amPM.textContent=n.l10n.amPM[wr(n.amPM.textContent===n.l10n.amPM[0])]),ie.value=er(Te)}}return a(),n}function Zc(e,t){let r=Array.prototype.slice.call(e).filter(i=>i.onClickEvent),n=[];for(let i=0;i<r.length;i++){let a=r[i];try{if(a.getAttribute(\"data-fp-omit\")!==null)continue;a._flatpickr!==void 0&&(a._flatpickr.destroy(),a._flatpickr=void 0),a._flatpickr=aN(a,t||{}),n.push(a._flatpickr)}catch(o){console.error(o)}}return n.length===1?n[0]:n}typeof HTMLElement!=\"undefined\"&&typeof HTMLCollection!=\"undefined\"&&typeof NodeList!=\"undefined\"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return Zc(this,e)},HTMLElement.prototype.flatpickr=function(e){return Zc([this],e)});var Fn=function(e,t){return Zc([e],t)};Fn.defaultConfig={};Fn.l10ns={en:{...Yc},default:{...Yc}};Fn.localize=e=>{Fn.l10ns.default={...Fn.l10ns.default,...e}};Fn.setDefaults=e=>{Fn.defaultConfig={...Fn.defaultConfig,...e}};Fn.parseDate=qc({});Fn.formatDate=ig({});Fn.compareDates=br;typeof jQuery!=\"undefined\"&&typeof jQuery.fn!=\"undefined\"&&(jQuery.fn.flatpickr=function(e){return Zc(this,e)});Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof e==\"string\"?parseInt(e,10):e))};typeof window!=\"undefined\"&&(window.flatpickr=Fn);var Qc=Fn;function Xc(e,t,r){let n=t.getSetting(\"date-format\"),i=t.getSetting(\"date-trigger\"),a=t.getSetting(\"link-date-to-daily-note\"),o=(0,ok.moment)(r).format(n),s=a?ed(t.app,o):`{${o}} `,u={line:e.start.line,ch:e.start.ch+i.length};e.editor.replaceRange(s,u,e.end),e.editor.setCursor({line:u.line,ch:u.ch+s.length}),e.editor.focus()}function sk(e,t,r,n){r.createEl(\"input\",{type:\"text\"},i=>{r.win.setTimeout(()=>n(Qc(i,{win:i.win,now:new Date,inline:!0,locale:zc(t),onChange:a=>Xc(e,t,a[0])})))})}function lk(e){let t=e.month(),r=e.clone().startOf(\"month\").weekday(0),n=e.diff(r,\"week\");e.subtract(1,\"month\").startOf(\"month\").weekday(6).add(n,\"week\");let i=e.month();for(;t===i;)e.subtract(1,\"week\"),i=e.month();return e}function uk(e){let t=e.month(),r=e.clone().startOf(\"month\").weekday(6),n=e.diff(r,\"week\");e.add(1,\"month\").startOf(\"month\").weekday(0).add(n,\"week\");let i=e.month();for(;t===i;)e.add(1,\"week\"),i=e.month();return e}function og(e,t,r){let n=(t.getLine(r.line)||\"\").slice(0,r.ch),i=new RegExp(`(?:^|\\\\s)${Qn(e)}{?([^}]*)$`);return n.match(i)}function sg(e,t,r){let n=(t.getLine(r.line)||\"\").slice(0,r.ch),i=new RegExp(`(?:^|\\\\s)${Qn(e)}{?([^}]*)$`);return n.match(i)}var td=class extends Hl.EditorSuggest{constructor(r,n){super(r);this.datepicker=null;this.app=r,this.plugin=n,[...this.scope.keys].forEach(a=>this.scope.unregister(a)),this.suggestEl.addClass($(\"date-suggest\"));let i=a=>{let{datepicker:o}=this;if(!o)return;let s=(0,Hl.moment)(o.selectedDates[0]||new Date),u;if(a===\"right\"?s.weekday()===6?u=uk(s).toDate():u=s.add(1,\"day\").toDate():a===\"left\"?s.weekday()===0?u=lk(s).toDate():u=s.subtract(1,\"day\").toDate():a===\"up\"?u=s.subtract(1,\"week\").toDate():a===\"down\"&&(u=s.add(1,\"week\").toDate()),u)return o.setDate(u,!1),!1};this.scope.register([],\"ArrowLeft\",()=>i(\"left\")),this.scope.register([],\"ArrowRight\",()=>i(\"right\")),this.scope.register([],\"ArrowDown\",()=>i(\"down\")),this.scope.register([],\"ArrowUp\",()=>i(\"up\")),this.scope.register([],\"Enter\",()=>{let a=this.datepicker.selectedDates,o=this.context;return a.length?Xc(o,this.stateManager,a[0]):Xc(o,this.stateManager,new Date),this.close(),!1}),this.scope.register([],\"Escape\",()=>(this.close(),!1))}get stateManager(){return this.context?this.plugin.stateManagers.get(this.context.file):null}getSuggestions(){return[]}renderSuggestion(){}selectSuggestion(){}showSuggestions(){let{datepicker:r,suggestEl:n,context:i,stateManager:a}=this;!r&&a&&(n.empty(),n.addClasses([$(\"date-picker\"),$(\"ignore-click-outside\")]),sk(i,a,n,o=>{this.datepicker=o,this.updatePosition(!0)}))}onTrigger(r,n,i){let a=this.plugin.getStateManager(i);if(!a)return null;let o=a.getSetting(\"date-trigger\");return sg(o,n,r)?{start:{line:r.line,ch:r.ch-o.length},end:r,query:o}:null}close(){super.close(),this.datepicker&&(this.datepicker.destroy(),this.datepicker=null,this.suggestEl.empty())}},nd=class extends Hl.EditorSuggest{constructor(t,r){super(t),this.app=t,this.plugin=r}onTrigger(t,r,n){let i=this.plugin.getStateManager(n);if(!i)return null;let a=i.getSetting(\"time-trigger\"),o=og(a,r,t);return o?(this.times=lg(i),{start:{line:t.line,ch:t.ch-o[1].length-a.length},end:t,query:o[1]}):null}getSuggestions(t){return this.plugin.getStateManager(t.file)?this.times.filter(n=>n.startsWith(t.query)||n.startsWith(\"0\"+t.query)):[]}renderSuggestion(t,r){t.endsWith(\"00\")?r.createEl(\"strong\",{text:t}):r.setText(t)}selectSuggestion(t){let{context:r,plugin:n}=this,i=n.getStateManager(r.file);if(!i)return;let o=`${i.getSetting(\"time-trigger\")}{${t}} `;r.editor.replaceRange(o,r.start,r.end),r.editor.setCursor({line:r.start.line,ch:r.start.ch+o.length}),r.editor.focus()}close(){super.close(),this.times=null}};function Ca(e,t,r){return xa.Platform.isMobile||e.getSetting(\"new-line-trigger\")===\"enter\"?!(t||r):t||r}function oN(e){return new Proxy(e.app,{get(t,r,n){return r===\"vault\"?new Proxy(e.app.vault,{get(i,a,o){return a===\"config\"?new Proxy(e.app.vault.config,{get(s,u,l){return[\"showLineNumber\",\"foldHeading\",\"foldIndent\"].includes(u)?!1:Reflect.get(s,u,l)}}):Reflect.get(i,a,o)}}):Reflect.get(t,r,n)}})}function sN(e,t){return{app:e.app,showSearch:Mr,toggleMode:Mr,onMarkdownScroll:Mr,getMode:()=>\"source\",scroll:0,editMode:null,get editor(){return t()},get file(){return e.file},get path(){return e.file.path}}}function lN(e){var r,n;let t=uN(e);t&&((n=(r=window.CodeMirrorAdapter)==null?void 0:r.Vim)==null||n.enterInsertMode(t))}function uN(e){var t,r,n;return(n=(r=(t=e==null?void 0:e.plugins)==null?void 0:t.find(i=>i!=null&&i.value?\"useNextTextInput\"in i.value&&\"waitForCopy\"in i.value:!1))==null?void 0:r.value)==null?void 0:n.cm}function _a({editorRef:e,onEnter:t,onEscape:r,onChange:n,onPaste:i,className:a,onSubmit:o,editState:s,value:u,placeholder:l}){let{view:c,stateManager:d}=Ee(tt),m=Fe(),h=Fe();Ae(()=>{class y extends c.plugin.MarkdownEditor{constructor(){super(...arguments);this.isKanbanEditor=!0}showTasksPluginAutoSuggest(P,B,G){if(og(d.getSetting(\"time-trigger\"),B,P)||sg(d.getSetting(\"date-trigger\"),B,P))return!1;if(G&&P.line===0)return!0}updateBottomPadding(){}onUpdate(P,B){super.onUpdate(P,B),n&&n(P)}buildLocalExtensions(){let P=super.buildLocalExtensions();P.push(Uc.init(()=>d)),P.push(KS),P.push(fs.Prec.highest(lo.EditorView.domEventHandlers({focus:G=>(c.activeEditor=this.owner,xa.Platform.isMobile&&c.contentEl.addClass(\"is-mobile-editing\"),G.win.setTimeout(()=>{this.app.workspace.activeEditor=this.owner,xa.Platform.isMobile&&this.app.mobileToolbar.update()}),!0),blur:()=>(xa.Platform.isMobile&&(c.contentEl.removeClass(\"is-mobile-editing\"),this.app.mobileToolbar.update()),!0)}))),l&&P.push((0,lo.placeholder)(l)),i&&P.push(fs.Prec.high(lo.EditorView.domEventHandlers({paste:i})));let B=(G,J)=>Q=>(t(Q,G,J)||(this.app.vault.getConfig(\"smartIndentList\")?this.editor.newlineAndIndentContinueMarkdownList():(0,ck.insertBlankLine)(Q)),!0);return P.push(fs.Prec.highest(lo.keymap.of([{key:\"Enter\",run:B(!1,!1),shift:B(!1,!0),preventDefault:!0},{key:\"Mod-Enter\",run:B(!0,!1),shift:B(!0,!0),preventDefault:!0},{key:\"Escape\",run:G=>(r(G),!1),preventDefault:!0}]))),P}}let v=sN(c,()=>I.editor),D=oN(c),I=c.plugin.addChild(new y(D,m.current,v)),C=I.cm;h.current=C,e&&(e.current=C),v.editMode=I,I.set(u||\"\"),kn(s)&&(C.dispatch({userEvent:\"select.pointer\",selection:fs.EditorSelection.single(C.posAtCoords(s,!1))}),C.dom.win.setTimeout(()=>{lN(C)}));let x=()=>{m.current.scrollIntoView({block:\"end\"})};return xa.Platform.isMobile&&C.dom.win.addEventListener(\"keyboardDidShow\",x),()=>{xa.Platform.isMobile&&(C.dom.win.removeEventListener(\"keyboardDidShow\",x),c.activeEditor===v&&(c.activeEditor=null),D.workspace.activeEditor===v&&(D.workspace.activeEditor=null,D.mobileToolbar.update(),c.contentEl.removeClass(\"is-mobile-editing\"))),c.plugin.removeChild(I),h.current=null,e&&(e.current=null)}},[]);let g=[\"cm-table-widget\"];return a&&g.push(a),E(ct,{children:[E(\"div\",{className:Ge(g),ref:m}),xa.Platform.isMobile&&E(\"button\",{onClick:()=>o(h.current),className:Ge([$(\"item-submit-button\"),\"mod-cta\"]),children:R(\"Submit\")})]})}var Bl=require(\"obsidian\");function cN(e,t){if(t)return t.from((0,Bl.moment)());let r=(0,Bl.moment)().startOf(\"day\");if(r.isSame(e,\"day\"))return R(\"today\");let n=e.diff(r,\"day\");return n===-1?R(\"yesterday\"):n===1?R(\"tomorrow\"):e.from(r)}function rd({item:e,stateManager:t}){if(!t.useSetting(\"show-relative-date\")||!e.data.metadata.date)return null;let n=cN(e.data.metadata.date,e.data.metadata.time);return E(\"span\",{className:$(\"item-metadata-date-relative\"),children:n})}function id({item:e,stateManager:t,filePath:r,onEditDate:n,onEditTime:i,getDateColor:a}){var A;let o=t.useSetting(\"move-dates\"),s=t.useSetting(\"date-format\"),u=t.useSetting(\"time-format\"),l=t.useSetting(\"date-display-format\"),c=t.useSetting(\"link-date-to-daily-note\"),d=(A=e.data.metadata.time)!=null?A:e.data.metadata.date,m=Re(()=>d?a(d):null,[d,a]);if(!o||!d)return null;let h=d.format(s);if(!h)return null;let g=!!e.data.metadata.date,y=!!e.data.metadata.time,v=d.format(l),D=y?d.format(u):null,I=h?(0,Bl.getLinkpath)(h):null,C=h?t.app.metadataCache.getFirstLinkpathDest(I,r):null,x=I&&c?E(\"a\",{href:I,\"data-href\":I,className:`internal-link ${C?\"\":\"is-unresolved\"}`,target:\"blank\",rel:\"noopener\",children:v}):v,O={};return c||(O[\"aria-label\"]=R(\"Change date\"),O.onClick=n),E(\"span\",{style:m&&{\"--date-color\":m.color,\"--date-background-color\":m.backgroundColor},className:Ge([$(\"item-metadata-date-wrapper\"),$(\"date\"),{\"has-background\":!!(m!=null&&m.backgroundColor)}]),children:[g&&E(ct,{children:[E(\"span\",{...O,className:`${$(\"item-metadata-date\")} ${c?\"\":\"is-button\"}`,children:x}),\" \"]}),y&&E(\"span\",{onClick:i,className:`${$(\"item-metadata-time\")} is-button`,\"aria-label\":R(\"Change time\"),children:D})]})}function dk({item:e,stateManager:t}){let r=Ee(zn),n=t.getSetting(\"metadata-keys\"),i=t.useSetting(\"inline-metadata-position\")===\"footer\",a=t.useSetting(\"move-task-metadata\"),{inlineMetadata:o}=e.data.metadata;if(!o||!i&&!a)return null;let s=il();return E(\"span\",{className:$(\"item-task-metadata\"),children:o.map((u,l)=>{var O,A;let c=Pu(u,n),{metadataKey:d,value:m,label:h}=c,g=yi.has(d);if(!a&&g||!i&&!g)return null;let y=u.wrapping===\"emoji-shorthand\",v=(A=(O=s==null?void 0:s.api)==null?void 0:O.parse(m))!=null?A:m,D=y&&d===\"priority\",I=!!(v!=null&&v.ts),C=d.replace(/[^a-zA-Z0-9_]/g,\"-\"),x=\"\";return h&&!g?x=h:x=y?mb(d,m):No(d),y||(x+=\": \"),E(\"span\",{className:Ge([$(\"item-task-inline-metadata-item\"),$(`inline-metadata__${C}`),{\"is-task-metadata\":g,\"is-emoji\":y,\"is-date\":I}]),children:[!I&&E(\"span\",{className:$(\"item-task-inline-metadata-item-key\"),children:x}),!D&&E(\"span\",{className:$(\"item-task-inline-metadata-item-value\"),children:E(hs,{searchQuery:r==null?void 0:r.query,dateLabel:I?x:void 0,data:c})})]},l)})})}function ug(e,t){let{stateManager:r,boardModifiers:n}=Ee(tt),i=t||Ui();return Re(()=>({onEditDate:s=>{var u;od(s.view,r,{x:s.clientX,y:s.clientY},sd({stateManager:r,boardModifiers:n,item:e,hasDate:!0,path:i}),(u=e.data.metadata.date)==null?void 0:u.toDate())},onEditTime:s=>{ld(s.view,r,{x:s.clientX,y:s.clientY},ud({stateManager:r,boardModifiers:n,item:e,hasTime:!0,path:i}),e.data.metadata.time)}}),[n,i,e,r])}function dN(e,t,r){let n=0,i=t.split(/\\n\\r?/g),a=[];return i.forEach(o=>{var u,l,c;if(n>r){a.push(o);return}let s=o.match(/^(\\s*>)*(\\s*[-+*]\\s+?\\[)([^\\]])(\\]\\s+)/);if(s){if(n===r){let d=pb(o,e.file);if(d)a.push(d);else{let m=s[3]===\" \"?Zn():\" \",h=(u=s[1])!=null?u:\"\",g=(l=s[2])!=null?l:\"\",y=(c=s[4])!=null?c:\"\";a.push(h+g+m+y+o.slice(s[0].length))}}else a.push(o);n++;return}a.push(o)}),a.join(`\n`)}function ps({tags:e,searchQuery:t,alwaysShow:r}){let{stateManager:n}=Ee(tt),i=Lu(n),a=Ee(zn),o=n.useSetting(\"move-tags\")||r;return!e.length||!o?null:E(\"div\",{className:$(\"item-tags\"),children:e.map((s,u)=>{let l=i(s);return E(\"a\",{href:s,onClick:c=>{c.preventDefault();let d=n.getSetting(\"tag-action\");if(a&&d===\"kanban\"){a.search(s,!0);return}n.app.internalPlugins.getPluginById(\"global-search\").instance.openGlobalSearch(`tag:${s}`)},className:`tag ${$(\"item-tag\")} ${t&&s.toLocaleLowerCase().contains(t)?\"is-search-match\":\"\"}`,style:l&&{\"--tag-color\":l.color,\"--tag-background\":l.backgroundColor},children:[E(\"span\",{children:s[0]}),s.slice(1)]},u)})})}var ad=zt(function({item:t,editState:r,setEditState:n,searchQuery:i,showMetadata:a=!0,isStatic:o}){let{stateManager:s,filePath:u,boardModifiers:l}=Ee(tt),c=fa(s),d=Fe(null);Ae(()=>{r===1?(d.current!==null&&l.updateItem(m,s.updateItemContent(t,d.current)),d.current=null):r===0&&(d.current=null)},[r,s,t]);let m=Ui(),{onEditDate:h,onEditTime:g}=ug(t),y=Ye((x,O,A)=>{if(!Ca(s,O,A))return n(1),!0},[s]),v=Ye(x=>{x.targetNode.instanceOf(HTMLElement)&&(x.targetNode.hasClass($(\"item-metadata-date\"))?h(x):x.targetNode.hasClass($(\"item-metadata-time\"))&&g(x))},[h,g]),D=Ye(()=>n(1),[]),I=Ye(()=>(n(0),!0),[t]),C=Ye(x=>{let O=x.target;if(O.hasClass(\"task-list-item-checkbox\")){if(O.dataset.src)return;let A=parseInt(O.dataset.checkboxIndex,10),P=dN(s,t.data.titleRaw,A),B=s.updateItemContent(t,P);l.updateItem(m,B)}},[m,l,s,t]);return!o&&kn(r)?E(\"div\",{className:$(\"item-input-wrapper\"),children:E(_a,{editState:r,className:$(\"item-input\"),onEnter:y,onEscape:I,onSubmit:D,value:t.data.titleRaw,onChange:x=>{x.docChanged&&(d.current=x.state.doc.toString().trim())}})}):E(\"div\",{onClick:v,className:$(\"item-title\"),children:[o?E(WS,{entityId:t.id,className:$(\"item-markdown\"),markdownString:t.data.title,searchQuery:i,onPointerUp:C}):E(Sa,{entityId:t.id,className:$(\"item-markdown\"),markdownString:t.data.title,searchQuery:i,onPointerUp:C}),a&&E(\"div\",{className:$(\"item-metadata\"),children:[E(rd,{item:t,stateManager:s}),E(id,{item:t,stateManager:s,filePath:u,getDateColor:c}),E(dk,{item:t,stateManager:s}),E(ps,{tags:t.data.metadata.tags,searchQuery:i})]})]})});function fN(e,t=[],r){return t.reduce((n,i)=>{if(yi.has(i.key))return n;let a=Pu(i,r);return n[i.key]=a,n},e||{})}function fk({item:e,searchQuery:t}){let{stateManager:r}=Ee(tt),n=r.useSetting(\"inline-metadata-position\")===\"metadata-table\",i=r.useSetting(\"metadata-keys\"),{fileMetadata:a,fileMetadataOrder:o,inlineMetadata:s}=e.data.metadata,u=Re(()=>{let c=n?fN(a,s,i||[]):a;return!c||!Object.keys(c).length?null:c},[a,s,i]),l=Re(()=>{let c=new Set(o||[]);return n&&(s!=null&&s.length)&&s.forEach(d=>{c.has(d.key)||c.add(d.key)}),Array.from(c)},[o,n,s]);return u?E(\"div\",{className:$(\"item-metadata-wrapper\"),children:E(gN,{metadata:u,order:l,searchQuery:t})}):null}function hN(e,t){let r;if(e.ts?r=(0,li.moment)(e.ts):li.moment.isMoment(e)?r=e:e instanceof Date&&(r=(0,li.moment)(e)),r){let n=t.getSetting(r.hours()===0?\"date-display-format\":\"date-time-display-format\");return r.format(n)}return null}function mN(e,t){if(typeof e!=\"object\"||!e.path)return null;let r=app.vault.getAbstractFileByPath(e.path);if(r&&r instanceof li.TFile){let n=app.fileManager.generateMarkdownLink(r,t.file.path,e.subpath,e.display);return`${e.embed&&n[0]!==\"!\"?\"!\":\"\"}${n}`}return`${e.embed?\"!\":\"\"}[[${e.path}${e.display?`|${e.display}`:\"\"}]]`}function hk(e){if(typeof e==\"string\"&&/^\\d{4}-\\d{2}-\\d{2}/.test(e)){let r=(0,li.moment)(e);if(r.isValid())return r}if(li.moment.isMoment(e))return e;if(e instanceof Date)return(0,li.moment)(e);let t=(0,cg.getAPI)();return t!=null&&t.value.isDate(e)?(0,li.moment)(e.ts):null}function In(e,t){Ni(e)&&e.value&&(e=e.value);let r=hk(e);if(r)return hN(r,t);if(typeof e==\"string\")return e;if(e instanceof li.TFile)return e.path;if(Array.isArray(e))return e.map(i=>In(i,t)).join(\" \");if(e.rrule)return e.toText();let n=(0,cg.getAPI)();return n?n.value.toString(e):`${e}`}function pN(e,t){return In(e.value,t)}function hs({data:e,dateLabel:t,searchQuery:r}){let{view:n,stateManager:i}=Ee(tt),a=fa(i),o=(s,u)=>{let l=mN(s,n),c=hk(s),d=In(s,i),m=r&&d.toLocaleLowerCase().contains(r),h;if(l||e.containsMarkdown)h=E(Sa,{className:\"inline\",markdownString:l||d,searchQuery:r});else if(c){let g=a(c);h=E(\"span\",{className:Ge({[$(\"date\")]:!0,\"is-search-match\":m,\"has-background\":g==null?void 0:g.backgroundColor}),style:g&&{\"--date-color\":g.color,\"--date-background-color\":g.backgroundColor},children:[!!t&&E(\"span\",{className:$(\"item-metadata-date-label\"),children:t}),E(\"span\",{className:$(\"item-metadata-date\"),children:d})]})}else m?h=E(\"span\",{className:\"is-search-match\",children:d}):h=d;return E(ct,{children:[h,u?E(\"span\",{children:u}):null]})};return Array.isArray(e.value)?E(\"span\",{className:Ge([$(\"meta-value\"),\"mod-array\"]),children:e.value.map((s,u,l)=>o(s,u<l.length-1?\", \":void 0))}):E(\"span\",{className:Ge([$(\"meta-value\")]),children:o(e.value)})}var gN=zt(function({metadata:t,order:r,searchQuery:n}){let{stateManager:i}=Ee(tt);return t?(r!=null&&r.length||(r=Object.keys(t)),E(\"table\",{className:$(\"meta-table\"),children:E(\"tbody\",{children:r.map(a=>{let o=t[a];if(!o)return null;let s=(o.label||a).toLocaleLowerCase().contains(n);return E(\"tr\",{className:$(\"meta-row\"),children:[!o.shouldHideLabel&&E(\"td\",{className:Ge([$(\"meta-key\"),{\"is-search-match\":s}]),\"data-key\":a,children:E(\"span\",{children:o.label||a})}),E(\"td\",{colSpan:o.shouldHideLabel?2:1,className:$(\"meta-value-wrapper\"),\"data-value\":pN(o,i),children:a===\"tags\"?E(ps,{searchQuery:n,tags:o.value,alwaysShow:!0}):E(hs,{data:o,searchQuery:n})})]},a)})})})):null});var _t=\"kanban-plugin\";var gk=`**${R(\"Complete\")}**`,yk=\"***\",dg=[\"---\",\"\",`${_t}: board`,\"\",\"---\",\"\",\"\"].join(`\n`);function vk(e){return[\"\",\"\",\"%% kanban:settings\",\"```\",JSON.stringify(e.data.settings),\"```\",\"%%\"].join(`\n`)}function wk(e,t){let r=e.data.metadata.fileMetadata,{titleSearchRaw:n}=e.data,i=[n];if(r){let a=Object.keys(r).filter(o=>{var s;return(s=e.data.metadata.fileMetadataOrder)==null?void 0:s.includes(o)});if(a.length){let o=In(a,t),s=In(a.map(u=>r[u]),t);o&&i.push(o),s&&i.push(s)}}return e.data.metadata.time?(i.push(e.data.metadata.time.format(\"LLLL\")),i.push(In(e.data.metadata.time,t))):e.data.metadata.date&&(i.push(e.data.metadata.date.format(\"LLLL\")),i.push(In(e.data.metadata.date,t))),i.join(\" \").toLocaleLowerCase()}function yN(e,t,r){var n,i,a;if(e.plugins.enabledPlugins.has(\"dataview\")&&((a=(i=(n=e.plugins)==null?void 0:n.plugins)==null?void 0:i.dataview)!=null&&a.api))return e.plugins.plugins.dataview.api.page(t.path,r.path)}function mk(e,t){if(!e)return null;if(e[t])return e[t];let r=t.split(\".\"),n=e;for(let i of r)if(typeof n==\"object\"&&i in n)n=n[i];else{n=null;break}return n}function fg(e,t){let r=e.getSetting(\"metadata-keys\");if(!r.length)return{};if(!t)return{};let n=e.app.metadataCache.getFileCache(t),i=yN(e.app,t,e.file);if(!n&&!i)return{};let a={},o={},s={},u=[],l=!1;return r.forEach(c=>{var h;if(s[c.metadataKey])return;if(s[c.metadataKey]=!0,c.metadataKey===\"tags\"){let g=(n==null?void 0:n.tags)||[];if(Array.isArray((h=n==null?void 0:n.frontmatter)==null?void 0:h.tags)&&(g=[].concat(g,n.frontmatter.tags.map(y=>({tag:`#${y}`})))),(g==null?void 0:g.length)===0)return;u.push(c.metadataKey),a.tags={...c,value:g.map(y=>y.tag).filter(y=>o[y]?!1:(o[y]=!0,!0)).sort(fr)},l=!0;return}let d=mk(i,c.metadataKey),m=mk(n==null?void 0:n.frontmatter,c.metadataKey);if(m!=null&&m!==\"\"&&!(Array.isArray(m)&&m.length===0)){if(typeof m==\"string\"){if(/^\\d{4}-\\d{2}-\\d{2}/.test(m))m=(0,pk.moment)(m);else if(/^\\[\\[[^\\]]+\\]\\]$/.test(m)){let g=(n.frontmatterLinks||[]).find(y=>y.key===c.metadataKey);if(g){let y=e.app.metadataCache.getFirstLinkpathDest(g.link,e.file.path);y&&(m=y)}}}else Array.isArray(m)&&(m=m.map((g,y)=>{if(typeof g==\"string\"&&/^\\[\\[[^\\]]+\\]\\]$/.test(g)){let v=(n.frontmatterLinks||[]).find(D=>D.key===c.metadataKey+\".\"+y.toString());if(v){let D=e.app.metadataCache.getFirstLinkpathDest(v.link,e.file.path);if(D)return D}}return g}));u.push(c.metadataKey),a[c.metadataKey]={...c,value:m},l=!0}else if(d!=null&&d!==\"\"&&!(Array.isArray(d)&&d.length===0)){let g=i[c.metadataKey];u.push(c.metadataKey),a[c.metadataKey]={...c,value:g},l=!0}}),{fileMetadata:l?a:void 0,fileMetadataOrder:u}}function bk(e,t){return!e&&t?!0:![\"metadata-keys\",\"date-trigger\",\"time-trigger\",\"link-date-to-daily-note\",\"date-format\",\"time-format\",\"move-dates\",\"move-tags\",\"inline-metadata-position\",\"move-task-metadata\",\"hide-card-count\",\"tag-colors\",\"date-colors\"].every(n=>e[n]===t[n])}function Dk(e,t){let r=(0,Vl.getDateFromFile)(t,\"day\");if(!r||!r.isValid())return;e.internalPlugins.plugins[\"daily-notes\"].instance.gotoNextExisting(r)}function Sk(e,t){let r=(0,Vl.getDateFromFile)(t,\"day\");if(!r||!r.isValid())return;e.internalPlugins.plugins[\"daily-notes\"].instance.gotoPreviousExisting(r)}function ed(e,t){let r=(0,Vl.getDailyNoteSettings)();return e.vault.getConfig(\"useMarkdownLinks\")?`[${t}](${r.folder?`${encodeURIComponent(r.folder)}/`:\"\"}${encodeURIComponent(t)}.md)`:`[[${t}]]`}function Ek(e){if(!e)return!1;let t=e.match(/---\\s+([\\w\\W]+?)\\s+---/);return!(!t||!t[1].contains(_t))}function hg(e){var r;if(!e)return!1;let t=app.metadataCache.getFileCache(e);return!!((r=t==null?void 0:t.frontmatter)!=null&&r[_t])}function cd(e,t){return t?`${e} (${t})`:e}function od(e,t,r,n,i){return e.document.body.createDiv({cls:`${$(\"date-picker\")} ${$(\"ignore-click-outside\")}`},a=>{a.style.left=`${r.x||0}px`,a.style.top=`${r.y||0}px`,a.createEl(\"input\",{type:\"text\"},o=>{a.win.setTimeout(()=>{let s=null,u=d=>{d.target instanceof d.view.HTMLElement&&d.target.closest(`.${$(\"date-picker\")}`)===null&&c()},l=d=>{d.key===\"Escape\"&&c()},c=()=>{s.destroy(),a.remove(),e.document.body.removeEventListener(\"click\",u),e.document.removeEventListener(\"keydown\",l)};s=Qc(o,{locale:zc(t),defaultDate:i,inline:!0,onChange:d=>{n(d),c()},win:e}),a.win.setTimeout(()=>{let d=a.clientHeight,m=a.clientWidth;r.y+d>e.innerHeight&&(a.style.top=`${(r.y||0)-d}px`),r.x+m>e.innerWidth&&(a.style.left=`${(r.x||0)-m}px`)}),e.document.body.addEventListener(\"click\",u),e.document.addEventListener(\"keydown\",l)})})})}function sd({stateManager:e,boardModifiers:t,item:r,hasDate:n,path:i}){let a=e.getSetting(\"date-format\"),o=e.getSetting(\"link-date-to-daily-note\"),s=e.getSetting(\"date-trigger\"),u=o?\"(?:\\\\[[^\\\\]]+\\\\]\\\\([^)]+\\\\)|\\\\[\\\\[[^\\\\]]+\\\\]\\\\])\":\"{[^}]+}\",l=new RegExp(`(^|\\\\s)${Qn(s)}${u}`);return c=>{let d=c[0],m=(0,An.moment)(d).format(a),h=o?ed(e.app,m):`{${m}}`,g=r.data.titleRaw;n?g=r.data.titleRaw.replace(l,`$1${s}${h}`):g=`${r.data.titleRaw} ${s}${h}`,t.updateItem(i,e.updateItemContent(r,g))}}function lg(e){let t=e.getSetting(\"time-format\"),r=[];for(let n=0;n<24;n++)r.push((0,An.moment)({hour:n}).format(t)),r.push((0,An.moment)({hour:n,minute:15}).format(t)),r.push((0,An.moment)({hour:n,minute:30}).format(t)),r.push((0,An.moment)({hour:n,minute:45}).format(t));return r}function ld(e,t,r,n,i){let a=$(\"time-picker\"),o=t.getSetting(\"time-format\"),s=i==null?void 0:i.format(o);e.document.body.createDiv({cls:`${a} ${$(\"ignore-click-outside\")}`},u=>{let l=lg(t),c=v=>{v.target instanceof v.view.HTMLElement&&v.target.hasClass($(\"time-picker-item\"))&&v.target.dataset.value&&(n(v.target.dataset.value),h())},d=v=>{v.target instanceof v.view.HTMLElement&&v.target.closest(`.${a}`)===null&&h()},m=v=>{v.key===\"Escape\"&&h()},h=()=>{u.remove(),u.removeEventListener(\"click\",c),e.document.body.removeEventListener(\"click\",d),e.document.removeEventListener(\"keydown\",m)};u.style.left=`${r.x||0}px`,u.style.top=`${r.y||0}px`;let g=null,y=null;l.forEach((v,D)=>{let I=v===s;u.createDiv({cls:`${$(\"time-picker-item\")} ${I?\"is-selected\":\"\"}`,text:v},C=>{C.createEl(\"span\",{cls:$(\"time-picker-check\"),prepend:!0},x=>{(0,An.setIcon)(x,\"lucide-check\")}),D%4===0&&C.addClass(\"is-hour\"),C.dataset.value=v,I&&(g=C),D===Math.floor(l.length/2)&&(y=C)})}),u.win.setTimeout(()=>{var I;let v=u.clientHeight,D=u.clientWidth;r.y+v>e.innerHeight&&(u.style.top=`${(r.y||0)-v}px`),r.x+D>e.innerWidth&&(u.style.left=`${(r.x||0)-D}px`),(I=g||y)==null||I.scrollIntoView({block:\"center\",inline:\"nearest\"}),u.addEventListener(\"click\",c),e.document.body.addEventListener(\"click\",d),e.document.addEventListener(\"keydown\",m)})})}function ud({stateManager:e,boardModifiers:t,item:r,hasTime:n,path:i}){let a=e.getSetting(\"time-trigger\"),o=new RegExp(`(^|\\\\s)${Qn(a)}{([^}]+)}`);return s=>{let u=r.data.titleRaw;n?u=r.data.titleRaw.replace(o,`$1${a}{${s}}`):u=`${r.data.titleRaw} ${a}{${s}}`,t.updateItem(i,e.updateItemContent(r,u))}}function xk(e){let t=e.data.metadata.date,r=[];t&&(t.isSame(new Date,\"day\")&&r.push(\"is-today\"),t.isAfter(new Date,\"day\")&&r.push(\"is-future\"),t.isBefore(new Date,\"day\")&&r.push(\"is-past\")),e.data.checked&&e.data.checkChar===Zn()&&r.push(\"is-complete\");for(let n of e.data.metadata.tags)r.push(`has-tag-${n.slice(1)}`);return r}function uo(e,t,r,n){return e.app.fileManager.generateMarkdownLink(t,r,n)}function vN(e){return(0,An.htmlToMarkdown)(e)}function wN(e){return e.replace(/^\\[(.*)\\]\\(app:\\/\\/obsidian.md\\/(.*)\\)$/,\"[$1]($2)\")}function bN(e){var r;let t=e.require(\"electron\").remote.clipboard;if(process.platform===\"darwin\"){if(t.has(\"NSFilenamesPboardType\"))return((r=t.read(\"NSFilenamesPboardType\").match(/<string>.*<\\/string>/g))==null?void 0:r.map(n=>n.replace(/<string>|<\\/string>/g,\"\")))||[];{let n=t.readImage(\"clipboard\");return n.isEmpty()?[t.read(\"public.file-url\").replace(\"file://\",\"\")].filter(i=>i):[{buffer:n.toPNG(),mimeType:\"image/png\",originalName:`Pasted image ${(0,An.moment)().format(\"YYYYMMDDHHmmss\")}.png`}]}}else if(t.has(\"CF_HDROP\")){let n=t.read(\"CF_HDROP\")||\"\",i=[...n].filter((o,s)=>n.charCodeAt(s)!==0).join(\"\").replace(/\\\\/g,\"\\\\\"),a=i.match(/[a-zA-Z]:\\\\/);if(a){let o=i.indexOf(a[0]);return o!==0&&(i=i.slice(o)),i.split(a[0]).filter(s=>s).map(s=>a+s)}}else{let n=t.readImage(\"clipboard\");return n.isEmpty()?[t.readBuffer(\"FileNameW\").toString(\"ucs2\").replace(RegExp(\"\\0\",\"g\"),\"\")].filter(i=>i):[{buffer:n.toPNG(),mimeType:\"image/png\",originalName:`Pasted image ${(0,An.moment)().format(\"YYYYMMDDHHmmss\")}.png`}]}return null}function DN(e){return e.split(\"\\\\\").pop().split(\"/\").pop()}async function SN(e,t,r,n){let i=await e.app.vault.getAvailablePathForAttachments(t,r,e.file),a=await e.app.vault.createBinary(i,n);return uo(e,a,e.file.path)}async function EN(e,t){let r=bN(t);if(!r||r.length===0)return null;let n=t.require(\"fs/promises\"),i=t.require(\"path\");return(await Promise.all(r.map(async a=>{if(typeof a==\"string\"){let s=DN(a).split(\".\"),u=s.pop(),l=s.join(\".\"),c=await e.app.vault.getAvailablePathForAttachments(l,u,e.file),d=e.app.vault.adapter.basePath;await n.copyFile(a,i.join(d,c)),await new Promise(h=>t.setTimeout(h,50));let m=e.app.vault.getAbstractFileByPath(c);return uo(e,m,e.file.path)}else{let o=a.originalName.split(\".\"),s=o.pop(),u=o.join(\".\");return await SN(e,u,s,a.buffer)}}))).filter(a=>a)}function kk(e,t,r){return Promise.all(t.map(n=>{let i=n.name.split(\".\"),a=i.pop(),o=i.join(\".\");if(r){switch(n.type){case\"text/jpg\":a=\"jpg\";break;case\"text/jpeg\":a=\"jpeg\";break;case\"text/png\":a=\"png\";break}o=\"Pasted image \"+(0,An.moment)().format(\"YYYYMMDDHHmmss\")}return new Promise((s,u)=>{let l=new FileReader;l.onload=async c=>{try{let d=await e.app.vault.getAvailablePathForAttachments(o,a,e.file),m=await e.app.vault.createBinary(d,c.target.result);s(uo(e,m,e.file.path))}catch(d){console.error(d),u(d)}},l.readAsArrayBuffer(n)})}))}async function kN(e,t,r){let n=!t.view,i=n?e.getAView().isShiftPressed:!1,a=n?t.clipboardData:t.dataTransfer,o=n&&An.Platform.isDesktopApp?r.require(\"electron\").remote.clipboard:null,s=o?o.availableFormats():[];if(n){if(n&&!i&&!s.includes(\"text/rtf\")){if(An.Platform.isDesktopApp){let g=await EN(e,r);if(g!=null&&g.length)return g}let m=[],h=t.clipboardData.items;for(let g in h){let y=h[g];y.kind===\"file\"&&m.push(y.getAsFile())}if(m.length)return await kk(e,m,!0)}}else{let m=await Jh(t);if(m.length)return await kk(e,m)}let u=a.getData(\"text/html\"),l=a.getData(\"text/plain\"),c=a.getData(\"text/uri-list\"),d=i?l||u:vN(u);return[wN(d||c||l||u||\"\").trim()]}async function Ck(e,t,r){let n=e.app.dragManager.draggable,i=t.view?t.dataTransfer:t.clipboardData;switch(n==null?void 0:n.type){case\"file\":return[uo(e,n.file,e.file.path)];case\"files\":return n.files.map(a=>uo(e,a,e.file.path));case\"folder\":return n.file.children.map(a=>a instanceof An.TFolder?null:uo(e,a,e.file.path)).filter(a=>a);case\"link\":{let a=n.file?uo(e,n.file,(0,An.parseLinktext)(n.linktext).subpath):`[[${n.linktext}]]`,o=new DOMParser().parseFromString(i.getData(\"text/html\"),\"text/html\").documentElement.textContent;return a=a.replace(/]]$/,`|${o}]]`).replace(/^\\[[^\\]].+]\\(/,`[${o}](`),[a]}default:return await kN(e,t,r)}}function dd(e,t){let r,n,i=(...a)=>{r=a,!n&&(n=e.requestAnimationFrame(()=>{n=null,t(...r)}))};return i.cancel=()=>{n&&(e.cancelAnimationFrame(n),n=null)},i}var Tk={outOfTheWay:\"cubic-bezier(0.2, 0, 0, 1)\",drop:\"cubic-bezier(.2,1,.1,1)\"};var gs={outOfTheWay:200,minDropTime:330,maxDropTime:550},Ma=`${gs.outOfTheWay}ms ${Tk.outOfTheWay}`;var Lr={none:\"none\",fluid:`opacity ${Ma}`,snap:`transform ${Ma}, opacity ${Ma}`,drop:e=>{let t=`${e}ms ${Tk.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Ma}`,placeholder:`height ${Ma}, width ${Ma}, margin ${Ma}, border-color ${Ma}`},xN=(e,t)=>e.x===t.x&&e.y===t.y,CN={x:0,y:0},_k=e=>xN(e,CN)?void 0:`translate(${e.x}px, ${e.y}px)`,Fk={moveTo:_k,drop:e=>_k(e)},_N=gs.maxDropTime-gs.minDropTime,Mk=1500,MN=.6;function ys({position:e,destination:t,isCancel:r}){let n=qa(e,t);if(n<=0)return gs.minDropTime;if(n>=Mk)return gs.maxDropTime;let i=n/Mk,a=gs.minDropTime+_N*i,o=r?a*MN:a;return Math.round(o)}function ui(e,t,r){e.style.getPropertyValue(t)!==r&&e.style.setProperty(t,r)}function fd(e,t){e.style.getPropertyValue(t)&&e.style.removeProperty(t)}function mg(e,t,r,n,i){let a=\"htmldnd\",o=et(),s=e-75,u=e+75,l=t-25,c=t+25;return{scopeId:a,entityId:`${a}-${o}`,initial:[s,l,u,c],getParentScrollState(){return Tr},getParentScrollShift(){return vi},recalcInitial(){},getHitbox(){return this.initial},getPath(){return[]},getData(){return{viewId:n,type:ft.Item,id:o,content:r,accepts:[],win:i}}}}var hd=class{constructor(t,r,n,i){this.isHTMLDragging=!1;this.dragOverTimeout=0;this.win=t,this.hitboxEntities=n,this.scrollEntities=i,this.emitter=r}getDragEventData(){return{dragEntity:this.dragEntity,dragEntityId:this.dragEntityId,dragEntityMargin:this.dragEntityMargin,dragOrigin:this.dragOrigin,dragOriginHitbox:this.dragOriginHitbox,dragPosition:this.dragPosition,primaryIntersection:this.primaryIntersection,scrollIntersection:this.scrollIntersection}}dragStart(t,r){var a;let n=(r==null?void 0:r.dataset.hitboxid)||t.currentTarget.dataset.hitboxid;if(!n)return;let i=getComputedStyle(r||t.currentTarget);this.dragEntityId=n,this.dragOrigin={x:t.pageX,y:t.pageY},this.dragPosition={x:t.pageX,y:t.pageY},this.dragEntity=this.hitboxEntities.get(n),this.dragOriginHitbox=(a=this.dragEntity)==null?void 0:a.getHitbox(),this.dragEntityMargin=[parseFloat(i.marginLeft)||0,parseFloat(i.marginTop)||0,parseFloat(i.marginRight)||0,parseFloat(i.marginBottom)||0],this.emitter.emit(\"dragStart\",this.getDragEventData())}dragStartHTML(t,r){this.isHTMLDragging=!0;let n=mg(t.pageX,t.pageY,[],r,t.view);this.dragEntityId=n.entityId,this.dragOrigin={x:t.pageX,y:t.pageY},this.dragPosition={x:t.pageX,y:t.pageY},this.dragEntity=n,this.dragOriginHitbox=n.getHitbox(),this.dragEntityMargin=[0,0,0,0],this.emitter.emit(\"dragStart\",this.getDragEventData())}dragMove(t){this.dragPosition={x:t.pageX,y:t.pageY},this.emitter.emit(\"dragMove\",this.getDragEventData()),this.calculateDragIntersect()}dragMoveHTML(t){this.dragPosition={x:t.pageX,y:t.pageY},this.emitter.emit(\"dragMove\",this.getDragEventData()),this.calculateDragIntersect()}dragEnd(t){this.emitter.emit(\"dragEnd\",this.getDragEventData()),this.dragEntityMargin=void 0,this.dragEntity=void 0,this.dragEntityId=void 0,this.dragOrigin=void 0,this.dragOriginHitbox=void 0,this.dragPosition=void 0,this.scrollIntersection=void 0,this.primaryIntersection=void 0}dragEndHTML(t,r,n,i){this.isHTMLDragging=!1,i||(this.dragEntity=mg(t.pageX,t.pageY,n,r,t.view),this.emitter.emit(\"dragEnd\",this.getDragEventData())),this.dragEntityMargin=void 0,this.dragEntity=void 0,this.dragEntityId=void 0,this.dragOrigin=void 0,this.dragOriginHitbox=void 0,this.dragPosition=void 0,this.scrollIntersection=void 0,this.primaryIntersection=void 0,i&&this.emitter.emit(\"dragEnd\",this.getDragEventData())}onHTMLDragLeave(t){this.win.clearTimeout(this.dragOverTimeout),this.dragOverTimeout=this.win.setTimeout(t,351)}calculateDragIntersect(){if(!this.dragEntity||!this.dragPosition||!this.dragOrigin||!this.dragOriginHitbox)return;let{type:t,win:r}=this.dragEntity.getData(),n=[],i=[],a=[],o=[];if(this.hitboxEntities.forEach(l=>{var d;let c=l.getData();r===c.win&&(c.accepts.includes(t)||(d=c.acceptsSort)!=null&&d.includes(t))&&(n.push(l),i.push(l.getHitbox()))}),this.scrollEntities.forEach(l=>{let c=l.getData();r===c.win&&c.accepts.includes(t)&&(a.push(l),o.push(l.getHitbox()))}),n.length===0&&a.length===0)return;let s=Mb(this.dragOriginHitbox,this.dragOrigin,this.dragPosition);this.handleScrollIntersect(s,this.dragEntity,o,a)||this.handleHitboxIntersect(s,this.dragEntity,i,n)}handleScrollIntersect(t,r,n,i){let a=(0,pg.default)([t],n).map(s=>i[s[1]]),o=_b(a,t,r);if(this.scrollIntersection&&(!o||o[0]!==this.scrollIntersection[0])){let[s,u]=this.scrollIntersection,l=s.getData(),c=s.entityId,d=l.side;this.emitter.emit(\"endDragScroll\",{...this.getDragEventData(),scrollEntity:s,scrollEntityId:c,scrollEntitySide:d,scrollStrength:u},c),this.scrollIntersection=void 0}if(o&&(!this.scrollIntersection||this.scrollIntersection[0]!==o[0])){let[s,u]=o,l=s.getData(),c=s.entityId,d=l.side;this.emitter.emit(\"beginDragScroll\",{...this.getDragEventData(),scrollEntity:s,scrollEntityId:c,scrollEntitySide:d,scrollStrength:u},c),this.scrollIntersection=o}else if(o&&this.scrollIntersection&&o[0]===this.scrollIntersection[0]){let[s,u]=o,l=s.getData(),c=s.entityId,d=l.side;this.emitter.emit(\"updateDragScroll\",{...this.getDragEventData(),scrollEntity:s,scrollEntityId:c,scrollEntitySide:d,scrollStrength:u},c),this.scrollIntersection=o}return!!o}handleHitboxIntersect(t,r,n,i){let a=(0,pg.default)([t],n).map(s=>i[s[1]]),o=Mh(a,t,r);this.primaryIntersection&&this.primaryIntersection!==o&&(this.emitter.emit(\"dragLeave\",this.getDragEventData(),this.primaryIntersection.entityId),this.primaryIntersection=void 0),o&&this.primaryIntersection!==o&&(this.emitter.emit(\"dragEnter\",{...this.getDragEventData(),primaryIntersection:o},o.entityId),this.primaryIntersection=o)}},vs=e=>{e.preventDefault(),e.stopPropagation()};function Ta(e,t){let r=Ee(cn),n=Fe(()=>{});return Ye(i=>{if(t.current!==i&&(n.current(),n.current=()=>{}),!i)return;let a=i,o=u=>{if(u.defaultPrevented||!r||!e.current)return;let l=e.current,c=u.targetNode;for(;c;){if(c.instanceOf(HTMLElement)&&c.dataset.ignoreDrag)return;c=c.parentElement}if(u.button!==0&&u.buttons!==1)return;let d=u.view,m=[\"pen\",\"touch\"].includes(u.pointerType),h=u.pointerId;m||(u.stopPropagation(),u.preventDefault());let g=u,y={x:u.pageX,y:u.pageY},v=!1,D=0;m&&(d.addEventListener(\"contextmenu\",vs,!0),D=d.setTimeout(()=>{r.dragManager.dragStart(g,l),v=!0,d.addEventListener(\"touchmove\",vs,{passive:!1})},500));let I=dd(d,x=>{x.pointerId===h&&(m?v?r.dragManager.dragMove(x):qa(y,{x:x.pageX,y:x.pageY})>5&&(d.clearTimeout(D),d.removeEventListener(\"touchmove\",vs),d.removeEventListener(\"contextmenu\",vs,!0),d.removeEventListener(\"pointermove\",I),d.removeEventListener(\"pointerup\",C),d.removeEventListener(\"pointercancel\",C)):v?r.dragManager.dragMove(x):qa(y,{x:x.pageX,y:x.pageY})>5&&(r.dragManager.dragStart(g,l),v=!0))}),C=x=>{x.pointerId===h&&(d.clearTimeout(D),v=!1,r.dragManager.dragEnd(x),d.removeEventListener(\"pointermove\",I),d.removeEventListener(\"pointerup\",C),d.removeEventListener(\"pointercancel\",C),m&&(d.removeEventListener(\"contextmenu\",vs,!0),d.removeEventListener(\"touchmove\",vs)))};d.addEventListener(\"pointermove\",I),d.addEventListener(\"pointerup\",C),d.addEventListener(\"pointercancel\",C)},s=u=>{u.stopPropagation()};return a.addEventListener(\"pointerdown\",o),a.addEventListener(\"touchstart\",s),()=>{a.removeEventListener(\"pointerdown\",o),a.removeEventListener(\"touchstart\",s)}},[])}function Ik(e){let t=Ee(cn),r=Ye(i=>{t.dragManager.isHTMLDragging?(i.preventDefault(),t.dragManager.dragMoveHTML(i)):t.dragManager.dragStartHTML(i,e.getAView().id),t.dragManager.onHTMLDragLeave(()=>{t.dragManager.dragEndHTML(i,e.getAView().id,[],!0)})},[t,e]),n=Ye(async i=>{t.dragManager.dragEndHTML(i,e.getAView().id,await Ck(e,i,activeWindow),!1)},[t,e]);return{onDragOver:r,onDrop:n}}var Ok=Ct(ln());var Ak=require(\"obsidian\");function Ut({name:e,className:t}){return E(\"span\",{\"data-icon\":e,className:`${$(\"icon\")} ${t||\"\"}`,ref:r=>{r&&(0,Ak.setIcon)(r,e)}})}var md=zt(function({shouldMarkItemsComplete:t,path:r,item:n,stateManager:i,boardModifiers:a}){let o=i.useSetting(\"show-checkboxes\"),[s,u]=Ne(!1),[l,c]=Ne(!1),d=Ye(()=>{let m=Ro(n,i.file);if(m){let[h,g,y]=m,v=h.map((D,I)=>{let C=i.getNewItem(D,g[I]);return I===y&&(C.id=n.id),C});a.replaceItem(r,v)}else a.updateItem(r,(0,Ok.default)(n,{data:{checkChar:{$apply:h=>h===\" \"?Zn():\" \"},$toggle:[\"checked\"]}}))},[n,i,a,...r]);return Ae(()=>{if(l){let m=h=>{h.metaKey||h.ctrlKey?u(!0):u(!1)};return activeWindow.addEventListener(\"keydown\",m),activeWindow.addEventListener(\"keyup\",m),()=>{activeWindow.removeEventListener(\"keydown\",m),activeWindow.removeEventListener(\"keyup\",m)}}},[l]),t||o?E(\"div\",{onMouseEnter:m=>{c(!0),(m.ctrlKey||m.metaKey)&&u(!0)},onMouseLeave:()=>{c(!1),s&&u(!1)},className:$(\"item-prefix-button-wrapper\"),children:[o&&!s&&E(\"input\",{onChange:d,type:\"checkbox\",className:\"task-list-item-checkbox\",checked:n.data.checked,\"data-task\":n.data.checkChar}),(s||!o&&t)&&E(\"a\",{onClick:()=>{a.archiveItem(r)},className:`${$(\"item-prefix-button\")} clickable-icon`,\"aria-label\":s?void 0:\"Archive card\",children:E(Ut,{name:\"sheets-in-box\"})})]}):null});var Lk=Ct(ln()),pd=require(\"obsidian\");var TN=/[\\\\/:\"*?<>|]+/g,FN=/!?\\[\\[([^\\]]*)\\.[^\\]]+\\]\\]/g,IN=/!?\\[\\[([^\\]]*)\\]\\]/g,AN=/!?\\[([^\\]]*)\\]\\([^)]*\\)/g,ON=/#([^\\u2000-\\u206F\\u2E00-\\u2E7F'!\"#$%&()*+,.:;<=>?@^`{|}~[\\]\\\\\\s\\n\\r]+)/g,LN=/\\s+/g;function gd({setEditState:e,item:t,path:r,boardModifiers:n,stateManager:i}){return Ye(a=>{let o={x:a.clientX,y:a.clientY},s=!!t.data.metadata.date,u=!!t.data.metadata.time,l=new pd.Menu().addItem(d=>{d.setIcon(\"lucide-edit\").setTitle(R(\"Edit card\")).onClick(()=>e(o))});l.addItem(d=>{d.setIcon(\"lucide-file-plus-2\").setTitle(R(\"New note from card\")).onClick(async()=>{let m=t.data.titleRaw.split(`\n`)[0].trim(),h=m.replace(FN,\"$1\").replace(IN,\"$1\").replace(AN,\"$1\").replace(ON,\"$1\").replace(TN,\" \").trim().replace(LN,\" \"),g=i.getSetting(\"new-note-folder\"),y=i.getSetting(\"new-note-template\"),v=g?i.app.vault.getAbstractFileByPath(g):i.app.fileManager.getNewFileParent(i.file.path),D=await i.app.fileManager.createNewMarkdownFile(v,h),I=i.app.workspace.splitActiveLeaf();await I.openFile(D),i.app.workspace.setActiveLeaf(I,!1,!0),await yb(i,y);let C=t.data.titleRaw.replace(m,i.app.fileManager.generateMarkdownLink(D,i.file.path));n.updateItem(r,i.updateItemContent(t,C))})}).addItem(d=>{d.setIcon(\"lucide-link\").setTitle(R(\"Copy link to card\")).onClick(()=>{if(t.data.blockId)navigator.clipboard.writeText(`${this.app.fileManager.generateMarkdownLink(i.file,\"\",\"#^\"+t.data.blockId)}`);else{let m=et(6);navigator.clipboard.writeText(`${this.app.fileManager.generateMarkdownLink(i.file,\"\",\"#^\"+m)}`),n.updateItem(r,i.updateItemContent((0,Lk.default)(t,{data:{blockId:{$set:m}}}),t.data.titleRaw))}})}).addSeparator(),/\\n/.test(t.data.titleRaw)&&l.addItem(d=>{d.setIcon(\"lucide-wrap-text\").setTitle(R(\"Split card\")).onClick(async()=>{let m=t.data.titleRaw.split(/[\\r\\n]+/g).map(g=>g.trim()),h=await Promise.all(m.map(g=>i.getNewItem(g,\" \")));n.splitItem(r,h)})}),l.addItem(d=>{d.setIcon(\"lucide-copy\").setTitle(R(\"Duplicate card\")).onClick(()=>n.duplicateEntity(r))}).addItem(d=>{d.setIcon(\"lucide-list-start\").setTitle(R(\"Insert card before\")).onClick(()=>n.insertItems(r,[i.getNewItem(\"\",\" \",!0)]))}).addItem(d=>{d.setIcon(\"lucide-list-end\").setTitle(R(\"Insert card after\")).onClick(()=>{let m=[...r];m[m.length-1]=m[m.length-1]+1,n.insertItems(m,[i.getNewItem(\"\",\" \",!0)])})}).addItem(d=>{d.setIcon(\"lucide-arrow-up\").setTitle(R(\"Move to top\")).onClick(()=>n.moveItemToTop(r))}).addItem(d=>{d.setIcon(\"lucide-arrow-down\").setTitle(R(\"Move to bottom\")).onClick(()=>n.moveItemToBottom(r))}).addItem(d=>{d.setIcon(\"lucide-archive\").setTitle(R(\"Archive card\")).onClick(()=>n.archiveItem(r))}).addItem(d=>{d.setIcon(\"lucide-trash-2\").setTitle(R(\"Delete card\")).onClick(()=>n.deleteEntity(r))}).addSeparator().addItem(d=>{d.setIcon(\"lucide-calendar-check\").setTitle(s?R(\"Edit date\"):R(\"Add date\")).onClick(()=>{var m;od(a.view,i,o,sd({stateManager:i,boardModifiers:n,item:t,hasDate:s,path:r}),(m=t.data.metadata.date)==null?void 0:m.toDate())})}),s&&(l.addItem(d=>{d.setIcon(\"lucide-x\").setTitle(R(\"Remove date\")).onClick(()=>{let m=i.getSetting(\"link-date-to-daily-note\"),h=i.getSetting(\"date-trigger\"),g=m?\"(?:\\\\[[^\\\\]]+\\\\]\\\\([^\\\\)]+\\\\)|\\\\[\\\\[[^\\\\]]+\\\\]\\\\])\":\"{[^}]+}\",y=new RegExp(`(^|\\\\s)${Qn(h)}${g}`),v=t.data.titleRaw.replace(y,\"\").trim();n.updateItem(r,i.updateItemContent(t,v))})}),l.addItem(d=>{d.setIcon(\"lucide-clock\").setTitle(u?R(\"Edit time\"):R(\"Add time\")).onClick(()=>{ld(a.view,i,o,ud({stateManager:i,boardModifiers:n,item:t,hasTime:u,path:r}),t.data.metadata.time)})}),u&&l.addItem(d=>{d.setIcon(\"lucide-x\").setTitle(R(\"Remove time\")).onClick(()=>{let m=i.getSetting(\"time-trigger\"),h=new RegExp(`(^|\\\\s)${Qn(m)}{([^}]+)}`),g=t.data.titleRaw.replace(h,\"\").trim();n.updateItem(r,i.updateItemContent(t,g))})})),l.addSeparator();let c=d=>{let m=i.state.children;if(!(m.length<=1))for(let h=0,g=m.length;h<g;h++)d.addItem(y=>y.setIcon(\"lucide-square-kanban\").setChecked(r[0]===h).setTitle(m[h].data.title).onClick(()=>{r[0]!==h&&i.setState(v=>Ri(v,r,[h,0]))}))};pd.Platform.isPhone?c(l):l.addItem(d=>{let m=d.setTitle(R(\"Move to list\")).setIcon(\"lucide-square-kanban\").setSubmenu();c(m)}),l.showAtPosition(o)},[e,t,r,n,i])}var Pk=$e.memo(function({editState:t,setEditState:r,showMenu:n}){let i=$e.useMemo(()=>t?{\"data-ignore-drag\":!0}:{},[t]);return E(\"div\",{...i,className:$(\"item-postfix-button-wrapper\"),children:kn(t)?E(\"a\",{\"data-ignore-drag\":!0,onPointerDown:a=>a.preventDefault(),onClick:()=>r(0),className:`${$(\"item-postfix-button\")} is-enabled clickable-icon`,\"aria-label\":R(\"Cancel\"),children:E(Ut,{name:\"lucide-x\"})}):E(\"a\",{\"data-ignore-drag\":!0,onPointerDown:a=>a.preventDefault(),onClick:n,className:`${$(\"item-postfix-button\")} clickable-icon`,\"aria-label\":R(\"More options\"),children:E(Ut,{name:\"lucide-more-vertical\"})})})});var Nk=zt(function({item:t,shouldMarkItemsComplete:r,isMatch:n,searchQuery:i,isStatic:a}){let{stateManager:o,boardModifiers:s}=Ee(tt),[u,l]=Ne(0),c=Ee(cn);Ae(()=>{let v=()=>{kn(u)&&l(0)};return c.dragManager.emitter.on(\"dragStart\",v),()=>{c.dragManager.emitter.off(\"dragStart\",v)}},[c,u]),Ae(()=>{t.data.forceEditMode&&l({x:0,y:0})},[t.data.forceEditMode]);let d=Ui(),m=gd({boardModifiers:s,item:t,setEditState:l,stateManager:o,path:d}),h=Ye(v=>{kn(u)||v.targetNode.instanceOf(HTMLAnchorElement)&&(v.targetNode.hasClass(\"internal-link\")||v.targetNode.hasClass(\"external-link\"))||m(v)},[m,u]),g=Ye(v=>l({x:v.clientX,y:v.clientY}),[l]),y=Re(()=>kn(u)?{\"data-ignore-drag\":!0}:{},[u]);return E(\"div\",{onDblClick:g,onContextMenu:h,className:$(\"item-content-wrapper\"),...y,children:[E(\"div\",{className:$(\"item-title-wrapper\"),...y,children:[E(md,{boardModifiers:s,item:t,path:d,shouldMarkItemsComplete:r,stateManager:o}),E(ad,{item:t,searchQuery:n?i:void 0,setEditState:l,editState:u,isStatic:a}),E(Pk,{editState:u,setEditState:l,showMenu:m})]}),E(fk,{searchQuery:n?i:void 0,item:t})]})}),gg=zt(function(t){let r=Fe(null),n=Fe(null),i=Ee(zn),{itemIndex:a,...o}=t,s=Ta(n,n),u=i!=null&&i.query?o.item.data.titleSearch.includes(i.query):!1,l=xk(o.item);return E(\"div\",{ref:c=>{n.current=c,s(c)},className:$(\"item-wrapper\"),children:E(\"div\",{ref:r,className:Ge([$(\"item\"),...l]),children:t.isStatic?E(Nk,{...o,isMatch:u,searchQuery:i==null?void 0:i.query,isStatic:!0}):E(ei,{elementRef:r,measureRef:n,id:t.item.id,index:a,data:t.item,children:E(Nk,{...o,isMatch:u,searchQuery:i==null?void 0:i.query})})})})}),Rk=zt(function({isStatic:t,items:r,shouldMarkItemsComplete:n}){let i=Ee(zn),{view:a}=Ee(tt),o=a.useViewState(_t);return E(ct,{children:r.map((s,u)=>i!=null&&i.query&&!i.items.has(s)?null:E(gg,{item:s,itemIndex:u,shouldMarkItemsComplete:n,isStatic:t},o+s.id))})});var PN=function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{l(n.next(c))}catch(d){o(d)}}function u(c){try{l(n.throw(c))}catch(d){o(d)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((n=n.apply(e,t||[])).next())})};function yd(e){let t=0,r=0,n=e;do t+=n.offsetTop||0,r+=n.offsetLeft||0,n=n.offsetParent;while(n);return{top:t,left:r}}var yg=class{constructor(t){this.element=t}getHorizontalScroll(){return this.element.scrollLeft}getVerticalScroll(){return this.element.scrollTop}getMaxHorizontalScroll(){return this.element.scrollWidth-this.element.clientWidth}getMaxVerticalScroll(){return this.element.scrollHeight-this.element.clientHeight}getHorizontalElementScrollOffset(t,r){return yd(t).left-yd(r).left}getVerticalElementScrollOffset(t,r){return yd(t).top-yd(r).top}scrollTo(t,r){this.element.scrollLeft=t,this.element.scrollTop=r}},vg=class{constructor(){this.element=window}getHorizontalScroll(){return window.scrollX||document.documentElement.scrollLeft}getVerticalScroll(){return window.scrollY||document.documentElement.scrollTop}getMaxHorizontalScroll(){return Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth)-window.innerWidth}getMaxVerticalScroll(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)-window.innerHeight}getHorizontalElementScrollOffset(t){return(window.scrollX||document.documentElement.scrollLeft)+t.getBoundingClientRect().left}getVerticalElementScrollOffset(t){return(window.scrollY||document.documentElement.scrollTop)+t.getBoundingClientRect().top}scrollTo(t,r){window.scrollTo(t,r)}},Ji={elements:[],cancelMethods:[],add:(e,t)=>{Ji.elements.push(e),Ji.cancelMethods.push(t)},remove:(e,t)=>{let r=Ji.elements.indexOf(e);r>-1&&(t&&Ji.cancelMethods[r](),Ji.elements.splice(r,1),Ji.cancelMethods.splice(r,1))}},Hk=typeof window!=\"undefined\",NN={cancelOnUserAction:!0,easing:e=>--e*e*e+1,elementToScroll:Hk?window:null,horizontalOffset:0,maxDuration:3e3,minDuration:250,speed:500,verticalOffset:0};function RN(e,t={}){return PN(this,void 0,void 0,function*(){if(Hk){if(!window.Promise)throw\"Browser doesn't support Promises, and animated-scroll-to depends on it, please provide a polyfill.\"}else return new Promise(x=>{x(!1)});let r,n,i,a=Object.assign(Object.assign({},NN),t),o=a.elementToScroll===window,s=!!a.elementToScroll.nodeName;if(!o&&!s)throw\"Element to scroll needs to be either window or DOM element.\";let u=o?document.documentElement:a.elementToScroll;getComputedStyle(u).getPropertyValue(\"scroll-behavior\")===\"smooth\"&&console.warn(`${u.tagName} has \"scroll-behavior: smooth\" which can mess up with animated-scroll-to's animations`);let c=o?new vg:new yg(a.elementToScroll);if(e instanceof Element){if(i=e,s&&(!a.elementToScroll.contains(i)||a.elementToScroll.isSameNode(i)))throw\"options.elementToScroll has to be a parent of scrollToElement\";r=c.getHorizontalElementScrollOffset(i,a.elementToScroll),n=c.getVerticalElementScrollOffset(i,a.elementToScroll)}else if(typeof e==\"number\")r=c.getHorizontalScroll(),n=e;else if(Array.isArray(e)&&e.length===2)r=e[0]===null?c.getHorizontalScroll():e[0],n=e[1]===null?c.getVerticalScroll():e[1];else throw`Wrong function signature. Check documentation.\nAvailable method signatures are:\n  animateScrollTo(y:number, options)\n  animateScrollTo([x:number | null, y:number | null], options)\n  animateScrollTo(scrollToElement:Element, options)`;r+=a.horizontalOffset,n+=a.verticalOffset;let d=c.getMaxHorizontalScroll(),m=c.getHorizontalScroll();r>d&&(r=d);let h=r-m,g=c.getMaxVerticalScroll(),y=c.getVerticalScroll();n>g&&(n=g);let v=n-y,D=Math.abs(Math.round(h/1e3*a.speed)),I=Math.abs(Math.round(v/1e3*a.speed)),C=D>I?D:I;return C<a.minDuration?C=a.minDuration:C>a.maxDuration&&(C=a.maxDuration),new Promise((x,O)=>{h===0&&v===0&&x(!0),Ji.remove(c.element,!0);let A,P=()=>{oe(),activeWindow.cancelAnimationFrame(A),x(!1)};Ji.add(c.element,P);let B=ne=>ne.preventDefault(),G=a.cancelOnUserAction?P:B,J=a.cancelOnUserAction?{passive:!0}:{passive:!1},Q=[\"wheel\",\"touchstart\",\"keydown\",\"mousedown\"],oe=()=>{Q.forEach(ne=>{c.element.removeEventListener(ne,G,J)})};Q.forEach(ne=>{c.element.addEventListener(ne,G,J)});let te=Date.now(),re=()=>{var ne=Date.now()-te,be=ne/C;let pe=Math.round(m+h*a.easing(be)),De=Math.round(y+v*a.easing(be));ne<C&&(pe!==r||De!==n)?(c.scrollTo(pe,De),A=activeWindow.requestAnimationFrame(re)):(c.scrollTo(r,n),activeWindow.cancelAnimationFrame(A),oe(),Ji.remove(c.element,!1),x(!0))};A=activeWindow.requestAnimationFrame(re)})})}var vd=RN;var kg=Ct(ln());function Bk({children:e}){let t=$e.useMemo(()=>new Vo,[]);return E(sl.Provider,{value:t,children:e})}function Vk(e,t){let r=$e.useContext(ma),n=$e.useRef(null),i=$e.useContext(sl),a=o=>{n.current=o,n.current&&o.win.requestAnimationFrame(()=>{let s=i.getScrollState(e);s&&(s.x!==0||s.y!==0)&&(n.current.scrollLeft=s.x,n.current.scrollTop=s.y)})};return $e.useEffect(()=>{let o=n.current;if(!o)return;let s=dd(o.win,u=>{let l=u.target;i.setScrollState(r,e,{x:l.scrollLeft,y:l.scrollTop})});return o.addEventListener(\"scroll\",s),()=>{o.removeEventListener(\"scroll\",s)}},[i,e,t]),{setRef:a,scrollRef:n}}var HN=\"scroll-container\",wd=8,bd=[\"top\",\"right\",\"bottom\",\"left\"],Dd=class{constructor(t,r,n,i){this.scrollFrame=0;this.observerQueue=[];this.onScroll=()=>{this.activeScroll.size===0&&(this.scrollState=Th(this.scrollEl),this.handleEntityRegistration())};this.onDragEnd=()=>{this.activeScroll.clear()};this.handleBeginDragScroll=({scrollEntitySide:t,scrollStrength:r})=>{this.isDoneScrolling(t)||(this.activeScroll.set(t,r),this.handleDragScroll())};this.handleUpdateDragScroll=({scrollEntitySide:t,scrollStrength:r})=>{this.isDoneScrolling(t)||this.activeScroll.set(t,r)};this.handleEndDragScroll=({scrollEntitySide:t})=>{this.activeScroll.delete(t)};this.dndManager=t,this.instanceId=et(),this.scopeId=r,this.triggerTypes=n,this.scrollState=Tr,this.parent=i,this.activeScroll=new Map,this.observerHandlers=new Map}initNodes(t){this.scrollEl=t,this.scrollEl.dataset.hitboxid=this.instanceId,this.scrollEl.dataset.scrollid=this.instanceId,this.top=this.createScrollEntity(\"top\"),this.right=this.createScrollEntity(\"right\"),this.bottom=this.createScrollEntity(\"bottom\"),this.left=this.createScrollEntity(\"left\"),this.bindScrollHandlers(),this.observer=new IntersectionObserver(n=>{n.forEach(i=>{var o;let a=(o=i.target.dataset)==null?void 0:o.hitboxid;if(a&&this.observerHandlers.has(a)){let s=this.observerHandlers.get(a);s&&s(i)}})},{root:t,threshold:.1});let{observerQueue:r}=this;this.observerQueue=[],r.forEach(([n,i,a])=>{this.observerHandlers.set(n,a),this.observer.observe(i)}),this.scrollEl.addEventListener(\"scroll\",this.onScroll,{passive:!0,capture:!1}),this.dndManager.emitter.on(\"scrollResize\",this.onScroll),this.scrollEl.win.setTimeout(()=>this.onScroll()),this.dndManager.observeResize(this.scrollEl),this.parent?this.parent.registerObserverHandler(this.instanceId,this.scrollEl,n=>{n.isIntersecting?this.handleEntityRegistration():this.handleEntityUnregistration()}):this.handleEntityRegistration()}destroy(){var t;!this.scrollEl&&!this.observer||(this.observerQueue.length=0,this.handleEntityUnregistration(),this.observer.disconnect(),this.unbindScrollHandlers(),this.scrollEl.removeEventListener(\"scroll\",this.onScroll),this.dndManager.emitter.off(\"scrollResize\",this.onScroll),(t=this.parent)==null||t.unregisterObserverHandler(this.instanceId,this.scrollEl),this.dndManager.unobserveResize(this.scrollEl))}handleEntityRegistration(){bd.forEach(t=>{let r=Dn(this.scrollEl),n=this.getId(t),i=this.dndManager.scrollEntities.has(n),a=this.isDoneScrolling(t);!a&&!i?this.dndManager.registerScrollEntity(n,this[t],r):a&&i&&this.dndManager.unregisterScrollEntity(n,r)})}handleEntityUnregistration(){bd.forEach(t=>{let r=Dn(this.scrollEl),n=this.getId(t);this.dndManager.unregisterScrollEntity(n,r)})}registerObserverHandler(t,r,n){this.observer?(this.observerHandlers.set(t,n),this.observer.observe(r)):this.observerQueue.push([t,r,n])}unregisterObserverHandler(t,r){this.observer?(this.observerHandlers.delete(t),this.observer.unobserve(r)):this.observerQueue=this.observerQueue.filter(n=>n[0]!==t)}bindScrollHandlers(){bd.forEach(t=>{let r=this.getId(t);this.dndManager.dragManager.emitter.on(\"beginDragScroll\",this.handleBeginDragScroll,r),this.dndManager.dragManager.emitter.on(\"updateDragScroll\",this.handleUpdateDragScroll,r),this.dndManager.dragManager.emitter.on(\"endDragScroll\",this.handleEndDragScroll,r),this.dndManager.dragManager.emitter.on(\"dragEnd\",this.onDragEnd)})}unbindScrollHandlers(){bd.forEach(t=>{let r=this.getId(t);this.dndManager.dragManager.emitter.off(\"beginDragScroll\",this.handleBeginDragScroll,r),this.dndManager.dragManager.emitter.off(\"updateDragScroll\",this.handleUpdateDragScroll,r),this.dndManager.dragManager.emitter.off(\"endDragScroll\",this.handleEndDragScroll,r),this.dndManager.dragManager.emitter.off(\"dragEnd\",this.onDragEnd)})}isDoneScrolling(t){switch(t){case\"top\":return this.scrollState.y===0;case\"right\":return this.scrollState.x===this.scrollState.maxX;case\"bottom\":return this.scrollState.y===this.scrollState.maxY;case\"left\":return this.scrollState.x===0}}handleDragScroll(){this.activeScroll.size!==0&&this.scrollEl.win.requestAnimationFrame(()=>{let t={left:0,top:0};this.activeScroll.forEach((r,n)=>{if(this.isDoneScrolling(n))return this.activeScroll.delete(n);let i=[\"left\",\"right\"].includes(n)?\"left\":\"top\",a=[\"right\",\"bottom\"].includes(n);t[i]=a?Math.max(wd-wd*r/35,0):Math.min(-wd+wd*r/35,0)}),this.scrollEl.scrollBy(t),this.scrollState=Th(this.scrollEl),this.handleEntityRegistration(),this.handleDragScroll()})}getId(t){return`${this.instanceId}-${t}`}getPath(t){var r,n,i,a;switch(t){case\"right\":return[...((r=this.parent)==null?void 0:r.getPath())||[],1];case\"bottom\":return[...((n=this.parent)==null?void 0:n.getPath())||[],2];case\"left\":return[...((i=this.parent)==null?void 0:i.getPath())||[],3]}return[...((a=this.parent)==null?void 0:a.getPath())||[],0]}getScrollShift(){var r,n,i;let t=(r=this.parent)==null?void 0:r.getScrollShift();return{x:Xt((n=this.parent)==null?void 0:n.scrollState.x)+Xt(t==null?void 0:t.x),y:Xt((i=this.parent)==null?void 0:i.scrollState.y)+Xt(t==null?void 0:t.y)}}createScrollEntity(t){var n,i;let r=this;return{scopeId:this.scopeId,entityId:r.getId(t),initial:_h(this.scrollEl.getBoundingClientRect(),((n=this.parent)==null?void 0:n.scrollState)||Tr,((i=this.parent)==null?void 0:i.getScrollShift())||vi,t),getParentScrollState(){var a;return((a=r.parent)==null?void 0:a.scrollState)||Tr},getParentScrollShift(){var a;return((a=r.parent)==null?void 0:a.getScrollShift())||vi},recalcInitial(){var a,o;this.initial=_h(r.scrollEl.getBoundingClientRect(),((a=r.parent)==null?void 0:a.scrollState)||Tr,((o=r.parent)==null?void 0:o.getScrollShift())||vi,t)},getHitbox(){return Bu(this.initial[0],this.initial[1],this.initial[2],this.initial[3],this.getParentScrollState(),this.getParentScrollShift())},getPath(){return r.getPath(t)},getData(){return{id:r.getId(t),type:HN,side:t,accepts:r.triggerTypes||[],scrollContainer:r.scrollEl,win:Dn(r.scrollEl)}}}}};function $k({scrollRef:e,triggerTypes:t,children:r}){let n=Ee(cn),i=Ee(ma),a=Ee(ol),o=Fe(),s=Re(()=>{if(n){o.current&&o.current.destroy();let u=new Dd(n,i,t||[],a);return o.current=u,u}return null},[n,i,e,t,a]);return Nu([e],()=>{var u;return(u=o.current)==null?void 0:u.initNodes(e.current)},()=>{var u;return(u=o.current)==null?void 0:u.destroy()}),s?E(ol.Provider,{value:s,children:r}):null}function Sd({className:e,children:t,triggerTypes:r,isStatic:n,id:i,index:a}){let{setRef:o,scrollRef:s}=Vk(i,a);return E(\"div\",{ref:o,className:Ge([e,$(\"scroll-container\")]),children:n?t:E($k,{scrollRef:s,triggerTypes:r,children:t})})}function Fa({index:e,accepts:t,className:r,isStatic:n,children:i}){let a=Fe(null),o=Fe(null),s=Re(()=>({id:et(),type:\"placeholder\",accepts:t}),t);return E(\"div\",{ref:o,className:Ge([r,$(\"placeholder\")]),children:E(\"div\",{ref:a,children:n?i:E(ei,{elementRef:a,measureRef:o,id:s.id,index:e,data:s,children:i})})})}var wg={width:0,height:0},BN=100,Ed=class{constructor(t,r,n){this.hitboxDimensions=wg;this.handleDragStart=({dragEntity:t,dragEntityMargin:r,dragOriginHitbox:n})=>{let i=t==null?void 0:t.entityId,a=i?this.sortables.has(i):null;!t||!a||!n||(this.setSortState(!0),this.hitboxDimensions=Fh(n,r),this.activatePlaceholder(this.hitboxDimensions,Lr.none),this.sortables.forEach(([o,s,u])=>{let l=js(t.getPath(),o.getPath()),c=o.entityId;if(l===2)return this.hidden.add(c),this.hideDraggingEntity(u);l===1&&(this.shifted.has(c)||this.shifted.add(c),this.shiftEl(s,Lr.none,this.hitboxDimensions))}))};this.dragEndTimeout=0;this.handleDragEnd=({primaryIntersection:t,dragPosition:r,dragOriginHitbox:n,dragEntity:i})=>{let a=()=>{if(t&&i){let{acceptsSort:l}=t.getData();if(l&&!l.includes(i.getData().type)){let d=this.sortables.get(t.entityId);d&&d[2].removeClass(\"is-dropping\")}}};if(!this.isSorting||!r||!n||!i){if(a(),!t&&i&&this.sortables.has(i.entityId))return this.resetSelf({maintainHidden:!1});if(t&&i){let l=(t==null?void 0:t.getHitbox())||n,c=ys({position:r,destination:{x:l[0],y:l[1]}});return this.dndManager.win.setTimeout(()=>{this.resetSelf({maintainHidden:!1})},c)}return this.resetSelf({maintainHidden:!0})}let{win:o}=this.dndManager;o.clearTimeout(this.dragEnterTimeout),o.clearTimeout(this.dragLeaveTimeout),o.clearTimeout(this.dragEndTimeout);let s=(t==null?void 0:t.getHitbox())||n,u=i.scopeId===\"htmldnd\"?0:ys({position:r,destination:{x:s[0],y:s[1]}});this.dragEndTimeout=o.setTimeout(()=>{let l=i.entityId.split(\":::\").pop(),c=t==null?void 0:t.entityId.split(\":::\").pop();a(),t&&this.sortables.has(t.entityId)&&c!==l&&this.dndManager.onDrop(i,t),this.resetSelf({maintainHidden:!1,shiftTransition:Lr.none,placeholderTransition:Lr.none})},u),this.hitboxDimensions=wg};this.dragEnterTimeout=0;this.handleDragEnter=({dragEntity:t,dragEntityMargin:r,dragOriginHitbox:n,primaryIntersection:i})=>{let a=i==null?void 0:i.entityId,o=a?this.sortables.has(a):null;if(!t||!i||!o||!n){!o&&this.isSorting&&this.resetSelf({maintainHidden:!0,maintainPlaceholder:!0});return}if(t.entityId===i.entityId)return;let{win:s}=this.dndManager;s.clearTimeout(this.dragLeaveTimeout),s.clearTimeout(this.dragEnterTimeout),this.dragEnterTimeout=s.setTimeout(()=>{let u=this.hitboxDimensions=Fh(n,r);this.setSortState(!0),this.activatePlaceholder(u,Lr.placeholder);let{acceptsSort:l}=i.getData();if(l&&!l.includes(t.getData().type)){let d=this.sortables.get(i.entityId);d&&d[2].addClass(\"is-dropping\"),this.sortables.forEach(([m,h])=>{let g=m.entityId;this.shifted.has(g)&&(this.shifted.delete(g),this.resetEl(h))});return}this.sortables.forEach(([d,m])=>{let h=js(i.getPath(),d.getPath()),g=d.entityId;!this.hidden.has(g)&&(h===2||h===1)?this.shifted.has(g)||(this.shifted.add(g),this.shiftEl(m,Lr.outOfTheWay,u)):this.shifted.has(g)&&(this.shifted.delete(g),this.resetEl(m))})},10)};this.dragLeaveTimeout=0;this.handleDragLeave=({dragEntity:t,primaryIntersection:r})=>{if(!this.isSorting)return;let{acceptsSort:n}=r.getData();if(n&&!n.includes(t.getData().type)){let o=this.sortables.get(r.entityId);o&&o[2].removeClass(\"is-dropping\")}let{win:a}=this.dndManager;a.clearTimeout(this.dragLeaveTimeout),a.clearTimeout(this.dragEnterTimeout),this.dragLeaveTimeout=a.setTimeout(()=>{this.resetSelf({maintainHidden:!0,maintainPlaceholder:!0})},BN),this.hitboxDimensions=wg};this.instanceId=et(),this.dndManager=t,this.sortables=new Map,this.shifted=new Set,this.hidden=new Set,this.isSorting=!1,this.axis=r,this.placeholder=null,this.sortListeners=n?[n]:[],t.dragManager.emitter.on(\"dragStart\",this.handleDragStart),t.dragManager.emitter.on(\"dragEnd\",this.handleDragEnd),t.dragManager.emitter.on(\"dragEnter\",this.handleDragEnter),t.dragManager.emitter.on(\"dragLeave\",this.handleDragLeave)}destroy(){this.dndManager.win.clearTimeout(this.dragLeaveTimeout),this.dndManager.win.clearTimeout(this.dragEndTimeout),this.dndManager.dragManager.emitter.off(\"dragStart\",this.handleDragStart),this.dndManager.dragManager.emitter.off(\"dragEnd\",this.handleDragEnd),this.dndManager.dragManager.emitter.off(\"dragEnter\",this.handleDragEnter),this.dndManager.dragManager.emitter.off(\"dragLeave\",this.handleDragLeave)}registerSortable(t,r,n,i){let a=r.getData().type;this.sortables.set(t,[r,n,i]),a===\"placeholder\"?(this.placeholder=[r,n,i],i.dataset.axis=this.axis,ui(i,\"transition\",Lr.none)):ui(n,\"transition\",Lr.none)}unregisterSortable(t){this.sortables.delete(t)}resetSelf({maintainHidden:t,maintainPlaceholder:r,shiftTransition:n,placeholderTransition:i}){this.isSorting&&this.setSortState(!1),this.isPlaceholderActive&&!r&&this.deactivatePlaceholder(i),this.shifted.size>0&&(this.shifted.forEach(a=>{if(this.sortables.has(a)){let[,o]=this.sortables.get(a);this.resetEl(o,n)}}),this.shifted.clear()),!t&&this.hidden.size>0&&(this.hidden.forEach(a=>{if(this.sortables.has(a)){let[,,o]=this.sortables.get(a);this.resetEl(o,n)}}),this.hidden.clear())}activatePlaceholder(t,r){if(this.placeholder){let n=this.axis===\"horizontal\",[,,i]=this.placeholder;ui(i,\"transition\",r),ui(i,n?\"width\":\"height\",`${n?t.width:t.height}px`),this.isPlaceholderActive=!0}}deactivatePlaceholder(t=Lr.placeholder){if(this.placeholder){let[,,r]=this.placeholder;ui(r,\"transition\",t),fd(r,\"width\"),fd(r,\"height\"),this.isPlaceholderActive=!1}}hideDraggingEntity(t){ui(t,\"display\",\"none\")}shiftEl(t,r,n){let i=this.axis===\"horizontal\"?`translate3d(${n.width}px, 0, 0)`:`translate3d(0, ${n.height}px, 0)`;ui(t,\"transition\",r),ui(t,\"transform\",i)}resetEl(t,r=Lr.outOfTheWay){ui(t,\"transition\",r),ui(t,\"transform\",\"translate3d(0, 0, 0)\"),fd(t,\"display\")}addSortNotifier(t){this.sortListeners.push(t)}removeSortNotifier(t){this.sortListeners=this.sortListeners.filter(r=>r!==t)}setSortState(t){this.isSorting!==t&&(this.isSorting=t,this.sortListeners.forEach(r=>r(t)))}};function Uk(e){return E(ct,{children:e.children})}function Ia({axis:e,children:t,onSortChange:r}){let n=Ee(cn),i=Fe(),a=Re(()=>{if(n){i.current&&i.current.destroy();let o=new Ed(n,e,r);return i.current=o,o}return null},[n,e,r]);return Ae(()=>()=>{var o;return(o=i.current)==null?void 0:o.destroy()},[]),a?E($u.Provider,{value:a,children:t}):null}var $N=function(){if(typeof window==\"undefined\"||typeof window.addEventListener!=\"function\")return!1;var e=!1,t=Object.defineProperty({},\"passive\",{get:function(){e=!0}}),r=function(){return null};return window.addEventListener(\"test\",r,t),window.removeEventListener(\"test\",r,t),e},UN=\"ignore-onclickoutside\",Wk=function(t,r){var n;return(n=t.classList)==null?void 0:n.contains(r)},Yk=function(t,r){for(var n=t.target||t;n;){if(Array.isArray(r)){if(r.some(function(i){return Wk(n,i)}))return!0}else if(Wk(n,r))return!0;n=n.parentElement}return!1},WN=function(t){return document.documentElement.clientWidth<=t.clientX||document.documentElement.clientHeight<=t.clientY},zk=function(t){return t.includes(\"touch\")&&$N()?{passive:!0}:!1},YN=function(t,r){var n=r===void 0?{}:r,i=n.refs,a=n.disabled,o=n.eventTypes,s=o===void 0?[\"mousedown\",\"touchstart\"]:o,u=n.excludeScrollbar,l=n.ignoreClass,c=l===void 0?UN:l,d=n.detectIFrame,m=d===void 0?!0:d,h=Ne([]),g=h[0],y=h[1],v=Fe(t);v.current=t;var D=Ye(function(I){return y(function(C){return[].concat(C,[{current:I}])})},[]);return Ae(function(){if(!(!(i!=null&&i.length)&&!g.length)){var I=function(){var P=[];return(i||g).forEach(function(B){var G=B.current;return G&&P.push(G)}),P},C=function(P){!Yk(P,c)&&!(u&&WN(P))&&I().every(function(B){return!B.contains(P.target)})&&v.current(P)},x=function(P){return activeWindow.setTimeout(function(){var B=document,G=B.activeElement;(G==null?void 0:G.tagName)===\"IFRAME\"&&!Yk(G,c)&&!I().includes(G)&&v.current(P)},0)},O=function(){s.forEach(function(P){return document.removeEventListener(P,C,zk(P))}),m&&window.removeEventListener(\"blur\",x)};if(a){O();return}return s.forEach(function(A){return document.addEventListener(A,C,zk(A))}),m&&window.addEventListener(\"blur\",x),function(){return O()}}},[g,c,u,a,m,JSON.stringify(s)]),D},ws=YN;function kd(e,t){var r;if(t.types.includes(\"text/uri-list\")||[\"file\",\"files\",\"link\",\"folder\"].includes((r=e.app.dragManager.draggable)==null?void 0:r.type))return\"link\";if(t.types.includes(\"text/html\")||t.types.includes(\"text/plain\"))return\"copy\"}function bg({addItems:e,editState:t,setEditState:r,hideButton:n}){let{stateManager:i}=Ee(tt),a=Fe(),o=()=>r(0),s=ws(o,{ignoreClass:[$(\"ignore-click-outside\"),\"mobile-toolbar\",\"suggestion-container\"]}),u=l=>{e([i.getNewItem(l,\" \")]);let c=a.current;c&&c.dispatch({changes:{from:0,to:c.state.doc.length,insert:\"\"}})};return kn(t)?E(\"div\",{className:$(\"item-form\"),ref:s,children:E(\"div\",{className:$(\"item-input-wrapper\"),children:E(_a,{editorRef:a,editState:{x:0,y:0},className:$(\"item-input\"),placeholder:R(\"Card title...\"),onEnter:(l,c,d)=>{if(!Ca(i,c,d))return u(l.state.doc.toString()),!0},onSubmit:l=>{u(l.state.doc.toString())},onEscape:o})})}):n?null:E(\"div\",{className:$(\"item-button-wrapper\"),children:E(\"button\",{className:$(\"new-item-button\"),onClick:()=>r({x:0,y:0}),onDragOver:l=>{kd(i,l.dataTransfer)&&r({x:0,y:0})},children:[E(\"span\",{className:$(\"item-button-plus\"),children:\"+\"}),\" \",R(\"Add a card\")]})})}var rx=Ct(ln());function xd(e,t){let r=e.length,n=t.start;for(;n>0&&e[n-1]===\" \";)n--;let i=t.end;for(;i<r-1&&e[i+1]===\" \";)i++;return e.slice(0,n)+\"\\0\".repeat(i-n)+e.slice(i)}function Kk(e){return e.replace(/ *\\0+ */g,\" \").trim()}function jk(e){return e.trim().replace(/(?:\\r\\n|\\n)/g,\"<br>\")}function Dg(e){return e.replace(/<br>/g,`\n`).trim()}function Cd(e){let t=app.vault.getConfig(\"useTab\");return e.trim().replace(/(?:\\r\\n|\\n)/g,t?`\n\t`:`\n    `)}function Sg(e,t){if(!t.data.blockId)return e;let r=e.split(/(?:\\r\\n|\\n)/g);return r[0]+=\" ^\"+t.data.blockId,r.join(`\n`)}function qk(e){let t=e.split(/(?:\\r\\n|\\n)/g);return t[0]=t[0].replace(/\\s+\\^([a-zA-Z0-9-]+)$/,\"\"),t.join(`\n`)}function Eg(e){return e.trim().replace(/(?:\\r\\n|\\n)(?: {4}|\\t)/g,`\n`)}function co(e){e=Dg(e);let t=e.match(/^(.*?)\\s*\\((\\d+)\\)$/);return t==null?{title:e,maxItems:0}:{title:t[1],maxItems:Number(t[2])}}function Gk(e){return E(\"svg\",{...e,xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 16 16\",children:E(\"path\",{fill:\"currentColor\",d:\"M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z\"})})}var $l=Ct(ln()),_d=require(\"obsidian\");var Jk={delete:{description:R(\"Are you sure you want to delete this list and all its cards?\"),confirm:R(\"Yes, delete list\")},archive:{description:R(\"Are you sure you want to archive this list and all its cards?\"),confirm:R(\"Yes, archive list\")},\"archive-items\":{description:R(\"Are you sure you want to archive all cards in this list?\"),confirm:R(\"Yes, archive cards\")}};function Zk({action:e,cancel:t,onAction:r,lane:n}){return Ae(()=>{e&&n.children.length===0&&r()},[e,n.children.length]),!e||e&&n.children.length===0?null:E(\"div\",{className:$(\"action-confirm-wrapper\"),children:[E(\"div\",{className:$(\"action-confirm-text\"),children:Jk[e].description}),E(\"div\",{children:[E(\"button\",{onClick:r,className:$(\"confirm-action-button\"),children:Jk[e].confirm}),E(\"button\",{onClick:t,className:$(\"cancel-action-button\"),children:\"Cancel\"})]})]})}function Qk({setEditState:e,path:t,lane:r}){let{stateManager:n,boardModifiers:i}=Ee(tt),[a,o]=Ne(null);return{settingsMenu:Re(()=>{let u=new Set,l=!1,c=!1;r.children.forEach(h=>{var y;let g=h.data.metadata.inlineMetadata;g&&g.forEach(v=>{v.key!==\"repeat\"&&(u.has(v.key)||u.add(v.key))}),!l&&h.data.metadata.date&&(l=!0),!c&&((y=h.data.metadata.tags)!=null&&y.length)&&(c=!0)});let d=new _d.Menu().addItem(h=>{h.setIcon(\"lucide-edit-3\").setTitle(R(\"Edit list\")).onClick(()=>e({x:0,y:0}))}).addItem(h=>{h.setIcon(\"lucide-archive\").setTitle(R(\"Archive cards\")).onClick(()=>o(\"archive-items\"))}).addSeparator().addItem(h=>{h.setIcon(\"arrow-left-to-line\").setTitle(R(\"Insert list before\")).onClick(()=>i.insertLane(t,{...Ea,id:et(),children:[],data:{title:\"\",shouldMarkItemsComplete:!1,forceEditMode:!0}}))}).addItem(h=>{h.setIcon(\"arrow-right-to-line\").setTitle(R(\"Insert list after\")).onClick(()=>{let g=[...t];g[g.length-1]=g[g.length-1]+1,i.insertLane(g,{...Ea,id:et(),children:[],data:{title:\"\",shouldMarkItemsComplete:!1,forceEditMode:!0}})})}).addSeparator().addItem(h=>{h.setIcon(\"lucide-archive\").setTitle(R(\"Archive list\")).onClick(()=>o(\"archive\"))}).addItem(h=>{h.setIcon(\"lucide-trash-2\").setTitle(R(\"Delete list\")).onClick(()=>o(\"delete\"))}).addSeparator(),m=h=>{h.addItem(g=>{g.setIcon(\"arrow-down-up\").setTitle(R(\"Sort by card text\")).onClick(()=>{let y=r.children.slice(),v=r.data.sorted===0;y.sort((D,I)=>v?I.data.title.localeCompare(D.data.title):D.data.title.localeCompare(I.data.title)),i.updateLane(t,(0,$l.default)(r,{children:{$set:y},data:{sorted:{$set:r.data.sorted===0?1:0}}}))})}),l&&h.addItem(g=>{g.setIcon(\"arrow-down-up\").setTitle(R(\"Sort by date\")).onClick(()=>{let y=r.children.slice(),v=r.data.sorted===2?-1:1;y.sort((D,I)=>{let C=D.data.metadata.time||D.data.metadata.date,x=I.data.metadata.time||I.data.metadata.date;return C&&!x?-1*v:x&&!C?1*v:!C&&!x?0:(C.isBefore(x)?-1:1)*v}),i.updateLane(t,(0,$l.default)(r,{children:{$set:y},data:{sorted:{$set:r.data.sorted===2?3:2}}}))})}),c&&h.addItem(g=>{g.setIcon(\"arrow-down-up\").setTitle(R(\"Sort by tags\")).onClick(()=>{let y=n.getSetting(\"tag-sort\"),v=r.children.slice(),D=r.data.sorted===4;v.sort((I,C)=>{var B,G;let x=I.data.metadata.tags,O=C.data.metadata.tags;if(!(x!=null&&x.length)&&!(O!=null&&O.length))return 0;if(!(x!=null&&x.length))return 1;if(!(O!=null&&O.length))return-1;let A=(B=y==null?void 0:y.findIndex(J=>x.includes(J.tag)))!=null?B:-1,P=(G=y==null?void 0:y.findIndex(J=>O.includes(J.tag)))!=null?G:-1;return A>-1&&P<0?D?1:-1:P>-1&&A<0?D?-1:1:A>-1&&P>-1?D?P-A:A-P:D?fr(O.join(\"\"),x.join(\"\")):fr(x.join(\"\"),O.join(\"\"))}),i.updateLane(t,(0,$l.default)(r,{children:{$set:v},data:{sorted:{$set:r.data.sorted===4?5:4}}}))})}),u.size&&u.forEach(g=>{h.addItem(y=>{y.setIcon(\"arrow-down-up\").setTitle(R(\"Sort by\")+\" \"+No(g).toLocaleLowerCase()).onClick(()=>{let v=r.children.slice(),D=r.data.sorted===g+\"-asc\";v.sort((I,C)=>{var A,P;let x=(A=I.data.metadata.inlineMetadata)==null?void 0:A.find(B=>B.key===g),O=(P=C.data.metadata.inlineMetadata)==null?void 0:P.find(B=>B.key===g);return x===void 0&&O===void 0?0:x===void 0?1:O===void 0?-1:D?fr(In(O.value,n),In(x.value,n)):fr(In(x.value,n),In(O.value,n))}),i.updateLane(t,(0,$l.default)(r,{children:{$set:v},data:{sorted:{$set:r.data.sorted===g+\"-asc\"?g+\"-desc\":g+\"-asc\"}}}))})})})};return _d.Platform.isPhone?m(d):d.addItem(h=>{let g=h.setTitle(R(\"Sort by\")).setIcon(\"arrow-down-up\").setSubmenu();m(g)}),d},[n,o,t,r]),confirmAction:a,setConfirmAction:o}}var Xk=Ct(ln());function ex({lane:e,lanePath:t,editState:r}){let{boardModifiers:n}=Ee(tt);return kn(r)?E(\"div\",{className:$(\"lane-setting-wrapper\"),children:E(\"div\",{className:$(\"checkbox-wrapper\"),children:[E(\"div\",{className:$(\"checkbox-label\"),children:R(\"Mark cards in this list as complete\")}),E(\"div\",{onClick:()=>n.updateLane(t,(0,Xk.default)(e,{data:{$toggle:[\"shouldMarkItemsComplete\"]}})),className:`checkbox-container ${e.data.shouldMarkItemsComplete?\"is-enabled\":\"\"}`})]})}):null}function tx({maxItems:e,itemCount:t,editState:r}){let{stateManager:n}=Ee(tt);return n.getSetting(\"hide-card-count\")||kn(r)?null:E(\"div\",{className:Ge([$(\"lane-title-count\"),{\"wip-exceeded\":e&&e<t}]),children:[t,e>0&&E(ct,{children:[E(\"span\",{className:$(\"lane-title-count-separator\"),children:\"/\"}),E(\"span\",{className:$(\"lane-title-count-limit\"),children:e})]})]})}function nx({maxItems:e,editState:t,setEditState:r,title:n,onChange:i}){let{stateManager:a}=Ee(tt),o=Fe(null);Ae(()=>{t===1?(o.current!==null&&i(o.current),o.current=null):t===0&&o.current!==null&&(o.current=null)},[t]);let s=Ye(d=>{d.docChanged&&(o.current=d.state.doc.toString().trim())},[]),u=Ye((d,m,h)=>{if(!Ca(a,m,h))return r(1),!0},[r,a]),l=Ye(()=>r(1),[r]),c=Ye(()=>r(0),[r]);return E(\"div\",{className:$(\"lane-title\"),children:kn(t)?E(_a,{editState:t,className:$(\"lane-input\"),onChange:s,onEnter:u,onEscape:c,onSubmit:l,value:cd(n,e)}):E(\"div\",{className:$(\"lane-title-text\"),children:E(Sa,{markdownString:n})})})}function zN({settingsMenu:e,editState:t,setEditState:r,setIsItemInputVisible:n}){let{stateManager:i}=Ee(tt);return E(\"div\",{className:$(\"lane-settings-button-wrapper\"),children:kn(t)?E(\"a\",{onClick:()=>r(null),\"aria-label\":R(\"Close\"),className:`${$(\"lane-settings-button\")} is-enabled clickable-icon`,children:E(Ut,{name:\"lucide-x\"})}):E(ct,{children:[n&&E(\"a\",{\"aria-label\":R(\"Add a card\"),className:`${$(\"lane-settings-button\")} clickable-icon`,onClick:()=>n({x:0,y:0}),onDragOver:a=>{kd(i,a.dataTransfer)&&n({x:0,y:0})},children:E(Ut,{name:\"lucide-plus-circle\"})}),E(\"a\",{\"aria-label\":R(\"More options\"),className:`${$(\"lane-settings-button\")} clickable-icon`,onClick:a=>{e.showAtMouseEvent(a)},children:E(Ut,{name:\"lucide-more-vertical\"})})]})})}var ix=zt(function({lane:t,laneIndex:r,bindHandle:n,setIsItemInputVisible:i,isCollapsed:a,toggleIsCollapsed:o}){let[s,u]=Ne(0),l=Ui(r),{boardModifiers:c}=Ee(tt),{settingsMenu:d,confirmAction:m,setConfirmAction:h}=Qk({setEditState:u,path:l,lane:t});Ae(()=>{t.data.forceEditMode&&u(null)},[t.data.forceEditMode]);let g=Ye(v=>{let{title:D,maxItems:I}=co(v);c.updateLane(l,(0,rx.default)(t,{data:{title:{$set:D},maxItems:{$set:I}}}))},[c,t,l]),y=Ye(v=>{!a&&u({x:v.clientX,y:v.clientY})},[a,u]);return E(ct,{children:[E(\"div\",{onDblClick:y,className:$(\"lane-header-wrapper\"),children:[E(\"div\",{className:$(\"lane-grip\"),ref:n,children:E(Gk,{})}),E(\"div\",{onClick:o,className:$(\"lane-collapse\"),children:E(Ut,{name:\"chevron-down\"})}),E(nx,{id:t.id,editState:s,maxItems:t.data.maxItems,onChange:g,setEditState:u,title:t.data.title}),E(tx,{editState:s,itemCount:t.children.length,maxItems:t.data.maxItems}),E(zN,{editState:s,setEditState:u,setIsItemInputVisible:i,settingsMenu:d})]}),E(ex,{editState:s,lane:t,lanePath:l}),m&&E(Zk,{lane:t,action:m,onAction:()=>{switch(m){case\"archive\":c.archiveLane(l);break;case\"archive-items\":c.archiveLaneItems(l);break;case\"delete\":c.deleteEntity(l);break}h(null)},cancel:()=>h(null)})]})});var ax=[ft.Item];function KN({isStatic:e,lane:t,laneIndex:r,collapseDir:n,isCollapsed:i=!1}){var be;let[a,o]=Ne(0),[s,u]=Ne(!1),{stateManager:l,boardModifiers:c,view:d}=Ee(tt),m=Ee(zn),h=d.useViewState(_t),g=Ui(r),y=l.useSetting(\"lane-width\"),v=h===\"list\"&&l.useSetting(\"full-list-lane-width\"),D=l.useSetting(\"new-card-insertion-method\"),I=Re(()=>!(i&&n===\"horizontal\")&&(v||y)?{width:v?\"100%\":`${y}px`}:void 0,[v,y,i]),C=Fe(null),x=Fe(null),O=Fe(null),A=Ta(x,O),P=!!t.data.shouldMarkItemsComplete,B=D===\"prepend-compact\",G=B||D===\"prepend\",J=Ye(()=>{l.setState(pe=>{let De=[...d.getViewState(\"list-collapse\")];return De[r]=!De[r],d.setViewState(\"list-collapse\",De),(0,kg.default)(pe,{data:{settings:{\"list-collapse\":{$set:De}}}})})},[l,r]),Q=Ye(pe=>{c[G?\"prependItems\":\"appendItems\"]([...g,t.children.length-1],pe.map(De=>(0,kg.default)(De,{data:{checked:{$set:P},checkChar:{$set:P?Zn():\" \"}}}))),d.getWindow().setTimeout(()=>{var Ce;let De=(Ce=C.current)==null?void 0:Ce.getElementsByClassName($(\"lane-items\"));De.length&&vd([0,G?0:De[0].scrollHeight],{elementToScroll:De[0],speed:200,minDuration:150,easing:U=>U===1?1:1-Math.pow(2,-10*U)})})},[c,g,t,G]),oe=e?Tb:ei,te=e?Uk:Ia,re=!i||e?ct:ei,ne=Re(()=>{if(!i||e)return{};let pe={id:et(),type:\"lane\",accepts:[ft.Item],acceptsSort:[ft.Lane]};return{elementRef:C,measureRef:x,id:pe.id,index:r,data:pe}},[i,r,e]);return E(Oc.Provider,{value:(be=t.data.sorted)!=null?be:null,children:E(\"div\",{ref:x,className:Ge([$(\"lane-wrapper\"),{\"is-sorting\":s,\"collapse-horizontal\":i&&n===\"horizontal\",\"collapse-vertical\":i&&n===\"vertical\"}]),style:I,children:E(\"div\",{\"data-count\":t.children.length,ref:C,className:Ge([$(\"lane\"),{\"will-prepend\":G}]),children:E(re,{...ne,children:[E(ix,{bindHandle:A,laneIndex:r,lane:t,setIsItemInputVisible:B?o:void 0,isCollapsed:i,toggleIsCollapsed:J}),!(m!=null&&m.query)&&!i&&G&&E(bg,{addItems:Q,hideButton:B,editState:a,setEditState:o}),!i&&E(oe,{elementRef:C,measureRef:x,id:t.id,index:r,data:t,children:E(Sd,{className:Ge([$(\"lane-items\"),$(\"vertical\")]),id:t.id,index:r,isStatic:e,triggerTypes:ax,children:E(te,{onSortChange:u,axis:\"vertical\",children:[E(Rk,{items:t.children,isStatic:e,shouldMarkItemsComplete:P}),E(Fa,{accepts:ax,index:t.children.length,isStatic:e})]})})}),!(m!=null&&m.query)&&!i&&!G&&E(bg,{addItems:Q,editState:a,setEditState:o})]})})})})}var xg=zt(KN);function jN({lanes:e,collapseDir:t}){let r=Ee(zn),{view:n}=Ee(tt),i=n.useViewState(_t)||\"board\",a=n.useViewState(\"list-collapse\")||[];return E(ct,{children:e.map((o,s)=>E(xg,{collapseDir:t,isCollapsed:(r==null?void 0:r.query)&&!r.lanes.has(o)||!!a[s],lane:o,laneIndex:s},i+o.id))})}var ox=zt(jN);var sx=require(\"obsidian\");var Md=class{constructor(t,r){this.scrollResizeDebounce=0;this.handleResize=t=>{let r=!1;t.forEach(n=>{let i=Dn(n.target);this.win===i&&(r=!0,n.target.dataset.scrollid&&(this.win.clearTimeout(this.scrollResizeDebounce),this.scrollResizeDebounce=this.win.setTimeout(()=>{this.emitter.listenerCount(\"scrollResize\")&&this.emitter.emit(\"scrollResize\",null)},50)))}),r&&(this.hitboxEntities.forEach(n=>{n.recalcInitial()}),this.scrollEntities.forEach(n=>{n.recalcInitial()}))};this.win=t,this.emitter=new Bo,this.hitboxEntities=new Map,this.scrollEntities=new Map,this.onDrop=r,this.resizeObserver=new ResizeObserver((0,sx.debounce)(this.handleResize,100,!0)),this.dragManager=new hd(t,this.emitter,this.hitboxEntities,this.scrollEntities)}destroy(){this.resizeObserver.disconnect()}observeResize(t){t.instanceOf(HTMLElement)&&this.resizeObserver.observe(t,{box:\"border-box\"})}unobserveResize(t){t.instanceOf(HTMLElement)&&this.resizeObserver.unobserve(t)}registerHitboxEntity(t,r,n){n===this.win&&this.hitboxEntities.set(t,r)}registerScrollEntity(t,r,n){n===this.win&&this.scrollEntities.set(t,r)}unregisterHitboxEntity(t,r){r===this.win&&this.hitboxEntities.delete(t)}unregisterScrollEntity(t,r){r===this.win&&this.scrollEntities.delete(t)}};function bs({win:e,children:t,onDrop:r}){let n=Fe(r);n.current=r;let i=Re(()=>new Md(e,(a,o)=>n.current(a,o)),[]);return Ae(()=>()=>{i.destroy()},[i]),E(cn.Provider,{value:i,children:E(Bk,{children:t})})}function Cg(e,t,r,n,i,a){let o=[r[0]-n[0],r[1]-n[1],r[2]+n[2],r[3]+n[3]];return{transform:a||`translate3d(${e.x-t.x+o[0]}px, ${e.y-t.y+o[1]}px, 0px)`,width:`${o[2]-o[0]}px`,height:`${o[3]-o[1]}px`,transition:i}}function Ds({children:e}){let t=Ee(cn),[r,n]=Ne(),[i,a]=Ne();return Ae(()=>{if(!t)return;let o=Cb,s=({dragEntity:d,dragOrigin:m,dragPosition:h,dragEntityMargin:g})=>{!d||!h||!m||(o=d.getHitbox(),n(d),a(Cg(h,m,o,g)))},u=({dragOrigin:d,dragPosition:m,dragEntityMargin:h})=>{!m||!d||a(Cg(m,d,o,h))},l=({dragOrigin:d,primaryIntersection:m,dragPosition:h,dragEntityMargin:g})=>{if(m&&h&&d){let y=m.getHitbox(),v={x:y[0],y:y[1]},D=ys({position:h,destination:v}),I=Lr.drop(D),C=Fk.drop(v);a(Cg(h,d,o,g,I,C)),activeWindow.setTimeout(()=>{n(void 0),a(void 0)},D)}else n(void 0),a(void 0)},{emitter:c}=t.dragManager;return c.on(\"dragStart\",s),c.on(\"dragMove\",u),c.on(\"dragEnd\",l),()=>{c.off(\"dragStart\",s),c.off(\"dragMove\",u),c.off(\"dragEnd\",l)}},[t]),!r||!i?null:Oi(e(r,i),r.getData().win.document.body)}function lx(){let e=Ee(cn),[t,r]=Ne(!1);return Ae(()=>{let n=()=>r(!0),i=({primaryIntersection:o,dragPosition:s})=>{let u=(o==null?void 0:o.getHitbox())||[0,0],l={x:u[0],y:u[1]},c=ys({position:s||l,destination:l});activeWindow.setTimeout(()=>r(!1),c)},{emitter:a}=e.dragManager;return a.on(\"dragStart\",n),a.on(\"dragEnd\",i),()=>{a.off(\"dragStart\",n),a.off(\"dragEnd\",i)}},[e]),t}var Zi=Ct(ln()),ux=require(\"obsidian\");function Td(e,t){let r=n=>{let i=t.getSetting(\"archive-date-format\"),a=t.getSetting(\"archive-date-separator\"),o=t.getSetting(\"append-archive-date\"),s=[(0,ux.moment)().format(i)];a&&s.push(a),s.push(n.data.titleRaw),o&&s.reverse();let u=s.join(\" \");return t.updateItemContent(n,u)};return{appendItems:(n,i)=>{t.setState(a=>ah(a,n,i))},prependItems:(n,i)=>{t.setState(a=>ow(a,n,i))},insertItems:(n,i)=>{t.setState(a=>Xr(a,n,i))},replaceItem:(n,i)=>{t.setState(a=>Xr(mi(a,n),n,i))},splitItem:(n,i)=>{t.setState(a=>Xr(mi(a,n),n,i))},moveItemToTop:n=>{t.setState(i=>Ri(i,n,[n[0],0]))},moveItemToBottom:n=>{t.setState(i=>{let a=n[0],o=i.children[a];return Ri(i,n,[a,o.children.length])})},addLane:n=>{t.setState(i=>{let a=e.getViewState(\"list-collapse\")||[],o=s=>{let u=[...s];return u.push(!1),u};return e.setViewState(\"list-collapse\",void 0,o),(0,Zi.default)(ah(i,[],[n]),{data:{settings:{\"list-collapse\":{$set:o(a)}}}})})},insertLane:(n,i)=>{t.setState(a=>{let o=e.getViewState(\"list-collapse\"),s=u=>{let l=[...u];return l.splice(n.last(),0,!1),l};return e.setViewState(\"list-collapse\",void 0,s),(0,Zi.default)(Xr(a,n,[i]),{data:{settings:{\"list-collapse\":{$set:s(o)}}}})})},updateLane:(n,i)=>{t.setState(a=>oh(a,n,{children:{[n[n.length-1]]:{$set:i}}}))},archiveLane:n=>{t.setState(i=>{let o=un(i,n).children;try{let s=e.getViewState(\"list-collapse\"),u=l=>{let c=[...l];return c.splice(n.last(),1),c};return e.setViewState(\"list-collapse\",void 0,u),(0,Zi.default)(mi(i,n),{data:{settings:{\"list-collapse\":{$set:u(s)}},archive:{$unshift:t.getSetting(\"archive-with-date\")?o.map(r):o}}})}catch(s){return t.setError(s),i}})},archiveLaneItems:n=>{t.setState(i=>{let o=un(i,n).children;try{return(0,Zi.default)(Du(i,n,{children:{$set:[]}}),{data:{archive:{$unshift:t.getSetting(\"archive-with-date\")?o.map(r):o}}})}catch(s){return t.setError(s),i}})},deleteEntity:n=>{t.setState(i=>{if(un(i,n).type===ft.Lane){let o=e.getViewState(\"list-collapse\"),s=u=>{let l=[...u];return l.splice(n.last(),1),l};return e.setViewState(\"list-collapse\",void 0,s),(0,Zi.default)(mi(i,n),{data:{settings:{\"list-collapse\":{$set:s(o)}}}})}return mi(i,n)})},updateItem:(n,i)=>{t.setState(a=>oh(a,n,{children:{[n[n.length-1]]:{$set:i}}}))},archiveItem:n=>{t.setState(i=>{let a=un(i,n);try{return(0,Zi.default)(mi(i,n),{data:{archive:{$push:[t.getSetting(\"archive-with-date\")?r(a):a]}}})}catch(o){return t.setError(o),i}})},duplicateEntity:n=>{t.setState(i=>{let a=un(i,n),o=(0,Zi.default)(a,{id:{$set:et()}});if(a.type===ft.Lane){let s=e.getViewState(\"list-collapse\"),u=l=>{let c=[...l];return c.splice(n.last(),0,l[n.last()]),c};return e.setViewState(\"list-collapse\",void 0,u),(0,Zi.default)(Xr(i,n,[o]),{data:{settings:{\"list-collapse\":{$set:u(s)}}}})}return Xr(i,n,[o])})}}}function cx(e,t){return E(GN,{win:e,plugin:t})}var qN=zt(function({view:t}){return Oi(t.getPortal(),t.contentEl)});function GN({win:e,plugin:t}){let r=t.useKanbanViews(e),n=r.map(a=>E(qN,{view:a},a.id)),i=Ye((a,o)=>{if(!a||!o)return;if(a.scopeId===\"htmldnd\"){let I=a.getData(),C=t.getStateManagerFromViewID(I.viewId,I.win),x=o.getPath(),O=un(C.state,x.slice(0,-1));try{let A=I.content.map(P=>{var J,Q,oe;let B=C.getNewItem(P,\" \");if(!!((J=O==null?void 0:O.data)!=null&&J.shouldMarkItemsComplete)){B=(0,Ss.default)(B,{data:{checkChar:{$set:Iu()}}});let te=Ro(B,C.file);if(te){let[re,ne,be]=te,pe=re[be],De=ne[be];return C.getNewItem(pe,De)}}return(0,Ss.default)(B,{data:{checked:{$set:!!((Q=O==null?void 0:O.data)!=null&&Q.shouldMarkItemsComplete)},checkChar:{$set:(oe=O==null?void 0:O.data)!=null&&oe.shouldMarkItemsComplete?Zn():\" \"}}})});return C.setState(P=>Xr(P,x,A))}catch(A){C.setError(A),console.error(A)}return}let s=a.getPath(),u=o.getPath(),l=a.getData(),c=o.getData(),[,d]=a.scopeId.split(\":::\"),[,m]=o.scopeId.split(\":::\"),h=c.acceptsSort&&!c.acceptsSort.includes(l.type);if(d===m){let I=t.getKanbanView(a.scopeId,l.win),C=t.stateManagers.get(I.file);return h&&u.push(0),C.setState(x=>{var G;let O=un(x,s),A=Ri(x,s,u,J=>{if(J.type===ft.Item){let{next:Q}=Au(C,x,s,C,x,u,J);return Q}return J},J=>{if(J.type===ft.Item){let{replacement:Q}=Au(C,x,s,C,x,u,J);return Q}});if(O.type===ft.Lane){let J=s.last(),Q=u.last();J<Q&&(Q-=1);let oe=I.getViewState(\"list-collapse\"),te=re=>{let ne=[...re];return ne.splice(Q,0,ne.splice(J,1)[0]),ne};return I.setViewState(\"list-collapse\",void 0,te),(0,Ss.default)(A,{data:{settings:{\"list-collapse\":{$set:te(oe)}}}})}let P=u.slice(0,-1),B=un(x,P);return((G=B==null?void 0:B.data)==null?void 0:G.sorted)!==void 0?Du(A,P,{data:{$unset:[\"sorted\"]}}):A})}let g=t.getKanbanView(a.scopeId,l.win),y=t.stateManagers.get(g.file),v=t.getKanbanView(o.scopeId,c.win),D=t.stateManagers.get(v.file);y.setState(I=>{let C=un(I,s),x;if(D.setState(O=>{if(h){let P=un(D.state,u);(D.getSetting(\"new-card-insertion-method\")||\"append\")===\"append\"?u.push(P.children.length):u.push(0)}let A=[];if(C.type===ft.Item){let{next:P,replacement:B}=Au(y,I,s,D,O,u,C);x=B,A.push(P)}else A.push(C);if(C.type===ft.Lane){let P=v.getViewState(\"list-collapse\"),B=g.getViewState(\"list-collapse\")[s.last()],G=J=>{let Q=[...J];return Q.splice(u.last(),0,B),Q};return v.setViewState(\"list-collapse\",void 0,G),(0,Ss.default)(Xr(O,u,A),{data:{settings:{\"list-collapse\":{$set:G(P)}}}})}else return Xr(O,u,A)}),C.type===ft.Lane){let O=g.getViewState(\"list-collapse\"),A=P=>{let B=[...P];return B.splice(s.last(),1),B};return g.setViewState(\"list-collapse\",void 0,A),(0,Ss.default)(mi(I,s),{data:{settings:{\"list-collapse\":{$set:A(O)}}}})}else return mi(I,s,x)})},[r]);if(n.length)return E(bs,{win:e,onDrop:i,children:[...n,E(Ds,{children:(a,o)=>{let[s,u]=Re(()=>{if(a.scopeId===\"htmldnd\")return[null,null];let l=a.getData(),c=t.getKanbanView(a.scopeId,l.win),d=t.stateManagers.get(c.file),m=un(d.state,a.getPath()),h=Td(c,d),g=c.file.path;return[m,{view:c,stateManager:d,boardModifiers:h,filePath:g}]},[a]);if((s==null?void 0:s.type)===ft.Lane){let l=(u==null?void 0:u.view.viewSettings[_t])||(u==null?void 0:u.stateManager.getSetting(_t)),c=(u==null?void 0:u.view.viewSettings[\"list-collapse\"])||(u==null?void 0:u.stateManager.getSetting(\"list-collapse\")),d=a.getPath().last();return E(tt.Provider,{value:u,children:E(\"div\",{className:Ge([$(\"drag-container\"),{[$(\"horizontal\")]:l!==\"list\",[$(\"vertical\")]:l===\"list\"}]),style:o,children:E(xg,{lane:s,laneIndex:d,isStatic:!0,isCollapsed:!!c[d],collapseDir:l===\"list\"?\"vertical\":\"horizontal\"})})})}return(s==null?void 0:s.type)===ft.Item?E(tt.Provider,{value:u,children:E(\"div\",{className:$(\"drag-container\"),style:o,children:E(gg,{item:s,itemIndex:0,isStatic:!0})})}):E(\"div\",{})}})]})}var _C=Ct(ln()),ea=require(\"obsidian\");var Wx=Ct(ln()),rt=require(\"obsidian\");var fx=Ct(dx()),Id=Ct(ln()),Aa=require(\"obsidian\");var Ad=\"@\",Od=\"@@\",Ul=\"body\";function JN(e){let t=[];return Aa.Vault.recurseChildren(e.vault.getRoot(),r=>{r instanceof Aa.TFolder&&t.push({value:r.path,label:r.path,selected:!1,disabled:!1})}),t}function ZN(e,t){let r=[],n=t?e.vault.getAbstractFileByPath(t):null;return(!n||!(n instanceof Aa.TFolder))&&(n=e.vault.getRoot()),Aa.Vault.recurseChildren(n,i=>{i instanceof Aa.TFile&&r.push({value:i.path,label:i.basename,selected:!1,disabled:!1})}),r}function hx(e){let{templateFolder:t,templatesEnabled:r,templaterPlugin:n}=kh(e),i=ZN(e,t),a=JN(e),o=\"\";return!r&&!n&&(o=R(\"Note: No template plugins are currently enabled.\")),{templateFiles:i,vaultFolders:a,templateWarning:o}}function Mg({choices:e,key:t,warningText:r,local:n,placeHolderStr:i,manager:a}){return o=>{o.controlEl.createEl(\"select\",{},s=>{s.win.setTimeout(()=>{let u=e,[l,c]=a.getSetting(t,n),d=!1;if(c){let g=u.findIndex(y=>y.value===c);if(g>-1){d=!0;let y=e[g];u=(0,Id.default)(u,{$splice:[[g,1]],$unshift:[(0,Id.default)(y,{placeholder:{$set:!0},value:{$set:\"\"},label:{$apply:v=>`${v} (${R(\"default\")})`}})]})}}d||(u=(0,Id.default)(u,{$unshift:[{placeholder:!0,value:\"\",label:i,selected:!1,disabled:!1}]}));let m=new fx.default(s,{placeholder:!0,position:\"bottom\",searchPlaceholderValue:R(\"Search...\"),searchEnabled:u.length>10,choices:u}).setChoiceByValue(\"\");l&&typeof l==\"string\"&&u.findIndex(g=>g.value===l)>-1&&m.setChoiceByValue(l);let h=g=>{let y=g.detail.value;y?a.applySettingsUpdate({[t]:{$set:y}}):a.applySettingsUpdate({$unset:[t]})};s.addEventListener(\"change\",h),a.cleanupFns.push(()=>{m.destroy(),s.removeEventListener(\"change\",h)})}),r&&o.descEl.createDiv({},u=>{u.createEl(\"strong\",{text:r})})})}}var Hd=Ct(ln()),Hg=require(\"obsidian\");var QN={grad:.9,turn:360,rad:360/(2*Math.PI)},Qi=function(e){return typeof e==\"string\"?e.length>0:typeof e==\"number\"},Nn=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},jr=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Sx=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},mx=function(e){return{r:jr(e.r,0,255),g:jr(e.g,0,255),b:jr(e.b,0,255),a:jr(e.a)}},Tg=function(e){return{r:Nn(e.r),g:Nn(e.g),b:Nn(e.b),a:Nn(e.a,3)}},XN=/^#([0-9a-f]{3,8})$/i,Ld=function(e){var t=e.toString(16);return t.length<2?\"0\"+t:t},Ex=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,a=Math.max(t,r,n),o=a-Math.min(t,r,n),s=o?a===t?(r-n)/o:a===r?2+(n-t)/o:4+(t-r)/o:0;return{h:60*(s<0?s+6:s),s:a?o/a*100:0,v:a/255*100,a:i}},kx=function(e){var t=e.h,r=e.s,n=e.v,i=e.a;t=t/360*6,r/=100,n/=100;var a=Math.floor(t),o=n*(1-r),s=n*(1-(t-a)*r),u=n*(1-(1-t+a)*r),l=a%6;return{r:255*[n,s,o,o,u,n][l],g:255*[u,n,n,s,o,o][l],b:255*[o,o,u,n,n,s][l],a:i}},px=function(e){return{h:Sx(e.h),s:jr(e.s,0,100),l:jr(e.l,0,100),a:jr(e.a)}},gx=function(e){return{h:Nn(e.h),s:Nn(e.s),l:Nn(e.l),a:Nn(e.a,3)}},yx=function(e){return kx((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},Wl=function(e){return{h:(t=Ex(e)).h,s:(i=(200-(r=t.s))*(n=t.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,r,n,i},eR=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,tR=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s+([+-]?\\d*\\.?\\d+)%\\s+([+-]?\\d*\\.?\\d+)%\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,nR=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,rR=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,vx={string:[[function(e){var t=XN.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Nn(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Nn(parseInt(e.substr(6,2),16)/255,2):1}:null:null},\"hex\"],[function(e){var t=nR.exec(e)||rR.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:mx({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},\"rgb\"],[function(e){var t=eR.exec(e)||tR.exec(e);if(!t)return null;var r,n,i=px({h:(r=t[1],n=t[2],n===void 0&&(n=\"deg\"),Number(r)*(QN[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return yx(i)},\"hsl\"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,i=e.a,a=i===void 0?1:i;return Qi(t)&&Qi(r)&&Qi(n)?mx({r:Number(t),g:Number(r),b:Number(n),a:Number(a)}):null},\"rgb\"],[function(e){var t=e.h,r=e.s,n=e.l,i=e.a,a=i===void 0?1:i;if(!Qi(t)||!Qi(r)||!Qi(n))return null;var o=px({h:Number(t),s:Number(r),l:Number(n),a:Number(a)});return yx(o)},\"hsl\"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,a=i===void 0?1:i;if(!Qi(t)||!Qi(r)||!Qi(n))return null;var o=function(s){return{h:Sx(s.h),s:jr(s.s,0,100),v:jr(s.v,0,100),a:jr(s.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(a)});return kx(o)},\"hsv\"]]},wx=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},iR=function(e){return typeof e==\"string\"?wx(e.trim(),vx.string):typeof e==\"object\"&&e!==null?wx(e,vx.object):[null,void 0]};var Fg=function(e,t){var r=Wl(e);return{h:r.h,s:jr(r.s+100*t,0,100),l:r.l,a:r.a}},Ig=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},bx=function(e,t){var r=Wl(e);return{h:r.h,s:r.s,l:jr(r.l+100*t,0,100),a:r.a}},Dx=function(){function e(t){this.parsed=iR(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Nn(Ig(this.rgba),2)},e.prototype.isDark=function(){return Ig(this.rgba)<.5},e.prototype.isLight=function(){return Ig(this.rgba)>=.5},e.prototype.toHex=function(){return t=Tg(this.rgba),r=t.r,n=t.g,i=t.b,o=(a=t.a)<1?Ld(Nn(255*a)):\"\",\"#\"+Ld(r)+Ld(n)+Ld(i)+o;var t,r,n,i,a,o},e.prototype.toRgb=function(){return Tg(this.rgba)},e.prototype.toRgbString=function(){return t=Tg(this.rgba),r=t.r,n=t.g,i=t.b,(a=t.a)<1?\"rgba(\"+r+\", \"+n+\", \"+i+\", \"+a+\")\":\"rgb(\"+r+\", \"+n+\", \"+i+\")\";var t,r,n,i,a},e.prototype.toHsl=function(){return gx(Wl(this.rgba))},e.prototype.toHslString=function(){return t=gx(Wl(this.rgba)),r=t.h,n=t.s,i=t.l,(a=t.a)<1?\"hsla(\"+r+\", \"+n+\"%, \"+i+\"%, \"+a+\")\":\"hsl(\"+r+\", \"+n+\"%, \"+i+\"%)\";var t,r,n,i,a},e.prototype.toHsv=function(){return t=Ex(this.rgba),{h:Nn(t.h),s:Nn(t.s),v:Nn(t.v),a:Nn(t.a,3)};var t},e.prototype.invert=function(){return ci({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),ci(Fg(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),ci(Fg(this.rgba,-t))},e.prototype.grayscale=function(){return ci(Fg(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),ci(bx(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),ci(bx(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t==\"number\"?ci({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Nn(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=Wl(this.rgba);return typeof t==\"number\"?ci({h:t,s:r.s,l:r.l,a:r.a}):Nn(r.h)},e.prototype.isEqual=function(t){return this.toHex()===ci(t).toHex()},e}(),ci=function(e){return e instanceof Dx?e:new Dx(e)};var Rd=Ct(ln());function Pd(){return(Pd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Mx(e,t){if(e==null)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)t.indexOf(r=a[n])>=0||(i[r]=e[r]);return i}function Og(e){var t=Fe(e),r=Fe(function(n){t.current&&t.current(n)});return t.current=e,r.current}var Es=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e<t?t:e},Yl=function(e){return\"touches\"in e},Lg=function(e){return e&&e.ownerDocument.defaultView||self},xx=function(e,t,r){var n=e.getBoundingClientRect(),i=Yl(t)?function(a,o){for(var s=0;s<a.length;s++)if(a[s].identifier===o)return a[s];return a[0]}(t.touches,r):t;return{left:Es((i.pageX-(n.left+Lg(e).pageXOffset))/n.width),top:Es((i.pageY-(n.top+Lg(e).pageYOffset))/n.height)}},Cx=function(e){!Yl(e)&&e.preventDefault()},Ng=$e.memo(function(e){var t=e.onMove,r=e.onKey,n=Mx(e,[\"onMove\",\"onKey\"]),i=Fe(null),a=Og(t),o=Og(r),s=Fe(null),u=Fe(!1),l=Re(function(){var h=function(v){Cx(v),(Yl(v)?v.touches.length>0:v.buttons>0)&&i.current?a(xx(i.current,v,s.current)):y(!1)},g=function(){return y(!1)};function y(v){var D=u.current,I=Lg(i.current),C=v?I.addEventListener:I.removeEventListener;C(D?\"touchmove\":\"mousemove\",h),C(D?\"touchend\":\"mouseup\",g)}return[function(v){var D=v.nativeEvent,I=i.current;if(I&&(Cx(D),!function(x,O){return O&&!Yl(x)}(D,u.current)&&I)){if(Yl(D)){u.current=!0;var C=D.changedTouches||[];C.length&&(s.current=C[0].identifier)}I.focus(),a(xx(I,D,s.current)),y(!0)}},function(v){var D=v.which||v.keyCode;D<37||D>40||(v.preventDefault(),o({left:D===39?.05:D===37?-.05:0,top:D===40?.05:D===38?-.05:0}))},y]},[o,a]),c=l[0],d=l[1],m=l[2];return Ae(function(){return m},[m]),$e.createElement(\"div\",Pd({},n,{onTouchStart:c,onMouseDown:c,className:\"react-colorful__interactive\",ref:i,onKeyDown:d,tabIndex:0,role:\"slider\"}))}),Nd=function(e){return e.filter(Boolean).join(\" \")},Rg=function(e){var t=e.color,r=e.left,n=e.top,i=n===void 0?.5:n,a=Nd([\"react-colorful__pointer\",e.className]);return $e.createElement(\"div\",{className:a,style:{top:100*i+\"%\",left:100*r+\"%\"}},$e.createElement(\"div\",{className:\"react-colorful__pointer-fill\",style:{backgroundColor:t}}))},hr=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r},xG={grad:.9,turn:360,rad:360/(2*Math.PI)};var Tx=function(e){var t=e.s,r=e.v,n=e.a,i=(200-t)*r/100;return{h:hr(e.h),s:hr(i>0&&i<200?t*r/100/(i<=100?i:200-i)*100:0),l:hr(i/2),a:hr(n,2)}},Pg=function(e){var t=Tx(e);return\"hsl(\"+t.h+\", \"+t.s+\"%, \"+t.l+\"%)\"},Ag=function(e){var t=Tx(e);return\"hsla(\"+t.h+\", \"+t.s+\"%, \"+t.l+\"%, \"+t.a+\")\"},aR=function(e){var t=e.h,r=e.s,n=e.v,i=e.a;t=t/360*6,r/=100,n/=100;var a=Math.floor(t),o=n*(1-r),s=n*(1-(t-a)*r),u=n*(1-(1-t+a)*r),l=a%6;return{r:hr(255*[n,s,o,o,u,n][l]),g:hr(255*[u,n,n,s,o,o][l]),b:hr(255*[o,o,u,n,n,s][l]),a:hr(i,2)}};var oR=function(e){var t=/rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return t?sR({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}};var sR=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,a=Math.max(t,r,n),o=a-Math.min(t,r,n),s=o?a===t?(r-n)/o:a===r?2+(n-t)/o:4+(t-r)/o:0;return{h:hr(60*(s<0?s+6:s)),s:hr(a?o/a*100:0),v:hr(a/255*100),a:i}};var lR=$e.memo(function(e){var t=e.hue,r=e.onChange,n=Nd([\"react-colorful__hue\",e.className]);return $e.createElement(\"div\",{className:n},$e.createElement(Ng,{onMove:function(i){r({h:360*i.left})},onKey:function(i){r({h:Es(t+360*i.left,0,360)})},\"aria-label\":\"Hue\",\"aria-valuenow\":hr(t),\"aria-valuemax\":\"360\",\"aria-valuemin\":\"0\"},$e.createElement(Rg,{className:\"react-colorful__hue-pointer\",left:t/360,color:Pg({h:t,s:100,v:100,a:1})})))}),uR=$e.memo(function(e){var t=e.hsva,r=e.onChange,n={backgroundColor:Pg({h:t.h,s:100,v:100,a:1})};return $e.createElement(\"div\",{className:\"react-colorful__saturation\",style:n},$e.createElement(Ng,{onMove:function(i){r({s:100*i.left,v:100-100*i.top})},onKey:function(i){r({s:Es(t.s+100*i.left,0,100),v:Es(t.v-100*i.top,0,100)})},\"aria-label\":\"Color\",\"aria-valuetext\":\"Saturation \"+hr(t.s)+\"%, Brightness \"+hr(t.v)+\"%\"},$e.createElement(Rg,{className:\"react-colorful__saturation-pointer\",top:1-t.v/100,left:t.s/100,color:Pg(t)})))}),cR=function(e,t){if(e===t)return!0;for(var r in e)if(e[r]!==t[r])return!1;return!0},dR=function(e,t){return e.replace(/\\s/g,\"\")===t.replace(/\\s/g,\"\")};function fR(e,t,r){var n=Og(r),i=Ne(function(){return e.toHsva(t)}),a=i[0],o=i[1],s=Fe({color:t,hsva:a});Ae(function(){if(!e.equal(t,s.current.color)){var l=e.toHsva(t);s.current={hsva:l,color:t},o(l)}},[t,e]),Ae(function(){var l;cR(a,s.current.hsva)||e.equal(l=e.fromHsva(a),s.current.color)||(s.current={hsva:a,color:l},n(l))},[a,e,n]);var u=Ye(function(l){o(function(c){return Object.assign({},c,l)})},[]);return[a,u]}var hR,mR=typeof window!=\"undefined\"?Ai:Ae,pR=function(){return hR||(typeof __webpack_nonce__!=\"undefined\"?__webpack_nonce__:void 0)};var _x=new Map,gR=function(e){mR(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!_x.has(t)){var r=t.createElement(\"style\");r.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill-opacity=\".05\"><path d=\"M8 0h8v8H8zM0 8h8v8H0z\"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,_x.set(t,r);var n=pR();n&&r.setAttribute(\"nonce\",n),t.head.appendChild(r)}},[])};var yR=function(e){var t=e.className,r=e.hsva,n=e.onChange,i={backgroundImage:\"linear-gradient(90deg, \"+Ag(Object.assign({},r,{a:0}))+\", \"+Ag(Object.assign({},r,{a:1}))+\")\"},a=Nd([\"react-colorful__alpha\",t]),o=hr(100*r.a);return $e.createElement(\"div\",{className:a},$e.createElement(\"div\",{className:\"react-colorful__alpha-gradient\",style:i}),$e.createElement(Ng,{onMove:function(s){n({a:s.left})},onKey:function(s){n({a:Es(r.a+s.left)})},\"aria-label\":\"Alpha\",\"aria-valuetext\":o+\"%\",\"aria-valuenow\":o,\"aria-valuemin\":\"0\",\"aria-valuemax\":\"100\"},$e.createElement(Rg,{className:\"react-colorful__alpha-pointer\",left:r.a,color:Ag(r)})))},vR=function(e){var t=e.className,r=e.colorModel,n=e.color,i=n===void 0?r.defaultColor:n,a=e.onChange,o=Mx(e,[\"className\",\"colorModel\",\"color\",\"onChange\"]),s=Fe(null);gR(s);var u=fR(r,i,a),l=u[0],c=u[1],d=Nd([\"react-colorful\",t]);return $e.createElement(\"div\",Pd({},o,{ref:s,className:d}),$e.createElement(uR,{hsva:l,onChange:c}),$e.createElement(lR,{hue:l.h,onChange:c}),$e.createElement(yR,{hsva:l,onChange:c,className:\"react-colorful__last-control\"}))};var wR={defaultColor:\"rgba(0, 0, 0, 1)\",toHsva:oR,fromHsva:function(e){var t=aR(e);return\"rgba(\"+t.r+\", \"+t.g+\", \"+t.b+\", \"+t.a+\")\"},equal:dR},Fx=function(e){return $e.createElement(vR,Pd({},e,{colorModel:wR}))};function Ix(e){let t=ci(e);if(!t.isValid())return null;let r=t.toRgb();return{rgba:`rgba(${r.r}, ${r.g}, ${r.b}, ${r.a})`,hexa:t.toHex()}}function zl({color:e,setColor:t,defaultColor:r}){let[n,i]=Ne(e||r),[a,o]=Ne(e||r),[s,u]=Ne(!1),l=Ye(d=>{let m=Ix(d||r);m&&(o(m.hexa),i(m.rgba),t(m.rgba))},[t]);Ae(()=>{if(!e||!r)return;let d=Ix(e||r);d&&(i(d.rgba),o(d.hexa))},[]);let c=ws(()=>{u(!1)});return E(\"div\",{ref:c,className:$(\"color-picker-wrapper\"),children:[s&&E(\"div\",{className:$(\"color-picker\"),children:E(Fx,{color:n,onChange:l})}),E(\"input\",{type:\"text\",value:a,onChange:d=>l(d.target.value),onFocus:()=>{u(!0)}})]})}function bR({tagColorKey:e,deleteKey:t,updateKey:r,defaultColors:n}){return E(\"div\",{className:$(\"setting-item-wrapper\"),children:E(\"div\",{className:$(\"setting-item\"),children:[E(\"div\",{className:`${$(\"setting-controls-wrapper\")} ${$(\"tag-color-input\")}`,children:[E(\"div\",{className:$(\"setting-input-wrapper\"),children:[E(\"div\",{children:[E(\"div\",{className:$(\"setting-item-label\"),children:R(\"Tag\")}),E(\"input\",{type:\"text\",placeholder:\"#tag\",value:e.tagKey,onChange:i=>{let a=i.currentTarget.value;r(a[0]===\"#\"?a:\"#\"+a,e.color,e.backgroundColor)}})]}),E(\"div\",{children:[E(\"div\",{className:$(\"setting-item-label\"),children:R(\"Background color\")}),E(zl,{color:e.backgroundColor,setColor:i=>{r(e.tagKey,e.color,i)},defaultColor:n.backgroundColor})]}),E(\"div\",{children:[E(\"div\",{className:$(\"setting-item-label\"),children:R(\"Text color\")}),E(zl,{color:e.color,setColor:i=>{r(e.tagKey,i,e.backgroundColor)},defaultColor:n.color})]})]}),E(\"div\",{className:$(\"setting-toggle-wrapper\"),children:E(\"div\",{children:E(\"div\",{className:$(\"item-tags\"),children:[E(\"a\",{className:`tag ${$(\"item-tag\")}`,children:\"#tag1\"}),E(\"a\",{className:`tag ${$(\"item-tag\")}`,style:{\"--tag-color\":e.color,\"--tag-background\":e.backgroundColor},children:e.tagKey||\"#tag\"}),E(\"a\",{className:`tag ${$(\"item-tag\")}`,children:\"#tag2\"})]})})})]}),E(\"div\",{className:$(\"setting-button-wrapper\"),children:E(\"div\",{className:\"clickable-icon\",onClick:t,\"aria-label\":R(\"Delete\"),children:E(Ut,{name:\"lucide-trash-2\"})})})]})})}function DR({dataKeys:e,onChange:t}){let[r,n]=Ne(e),i=Re(()=>{let l=createDiv($(\"item-tags\")),c=l.createEl(\"a\",$(\"item-tag\"));l.style.position=\"absolute\",l.style.visibility=\"hidden\",activeDocument.body.append(l);let d=activeWindow.getComputedStyle(c),m=d.getPropertyValue(\"color\").trim(),h=d.getPropertyValue(\"background-color\").trim();return l.remove(),{color:m,backgroundColor:h}},[]),a=l=>{t(l),n(l)},o=()=>{a((0,Rd.default)(r,{$push:[{...Bc,id:et(),data:{tagKey:\"\",color:\"\",backgroundColor:\"\"}}]}))},s=l=>{a((0,Rd.default)(r,{$splice:[[l,1]]}))},u=l=>(c,d,m)=>{a((0,Rd.default)(r,{[l]:{data:{tagKey:{$set:c},color:{$set:d},backgroundColor:{$set:m}}}}))};return E(\"div\",{className:$(\"tag-color-input-wrapper\"),children:[E(\"div\",{className:\"setting-item-info\",children:[E(\"div\",{className:\"setting-item-name\",children:R(\"Tag colors\")}),E(\"div\",{className:\"setting-item-description\",children:R(\"Set colors for tags displayed in cards.\")})]}),E(\"div\",{children:r.map((l,c)=>E(bR,{tagColorKey:l.data,deleteKey:()=>s(c),updateKey:u(c),defaultColors:i},l.id))}),E(\"button\",{className:$(\"add-tag-color-button\"),onClick:()=>{o()},children:R(\"Add tag color\")})]})}function Ax(e,t,r){Li(E(DR,{dataKeys:t,onChange:r,portalContainer:ha(e)}),e)}function Ox(e){Pi(e)}function SR({dateColorKey:e,deleteKey:t,updateKey:r,defaultColors:n,getTimeFormat:i,getDateFormat:a}){let o=\"between\";return e.isToday&&(o=\"today\"),e.isBefore&&(o=\"before\"),e.isAfter&&(o=\"after\"),E(\"div\",{className:$(\"setting-item-wrapper\"),children:E(\"div\",{className:$(\"setting-item\"),children:[E(\"div\",{className:`${$(\"setting-controls-wrapper\")} ${$(\"tag-color-input\")}`,children:[E(\"div\",{children:[E(\"div\",{children:E(\"div\",{className:$(\"setting-item-label\"),children:R(\"Date is\")})}),E(\"div\",{className:$(\"date-color-config\"),children:[E(\"select\",{className:\"dropdown\",defaultValue:o,onChange:s=>{let u={...e};switch(delete u.isAfter,delete u.isBefore,delete u.isToday,s.target.value){case\"today\":u.isToday=!0;break;case\"before\":u.isBefore=!0;break;case\"after\":u.isAfter=!0;break}r(u)},children:[E(\"option\",{value:\"between\",children:R(\"Between now and\")}),E(\"option\",{value:\"today\",children:R(\"Today\")}),E(\"option\",{value:\"after\",children:R(\"After now\")}),E(\"option\",{value:\"before\",children:R(\"Before now\")})]}),!e.isToday&&!e.isAfter&&!e.isBefore&&E(ct,{children:[E(\"input\",{type:\"number\",value:e.distance,onChange:s=>{r({...e,distance:parseInt(s.target.value)})}}),E(\"select\",{className:\"dropdown\",defaultValue:e.unit,onChange:s=>{r({...e,unit:s.target.value})},children:[E(\"option\",{value:\"hours\",children:\"Hours\"}),E(\"option\",{value:\"days\",children:\"Days\"}),E(\"option\",{value:\"weeks\",children:\"Weeks\"}),E(\"option\",{value:\"months\",children:\"Months\"})]}),E(\"select\",{className:\"dropdown\",defaultValue:e.direction,onChange:s=>{r({...e,direction:s.target.value})},children:[E(\"option\",{value:\"after\",children:R(\"After now\")}),E(\"option\",{value:\"before\",children:R(\"Before now\")})]})]})]}),E(\"div\",{className:$(\"date-color-config\"),children:[E(\"div\",{children:[E(\"div\",{className:$(\"setting-item-label\"),children:R(\"Background color\")}),E(zl,{color:e.backgroundColor,setColor:s=>{r({...e,backgroundColor:s})},defaultColor:n.backgroundColor})]}),E(\"div\",{children:[E(\"div\",{className:$(\"setting-item-label\"),children:R(\"Text color\")}),E(zl,{color:e.color,setColor:s=>{r({...e,color:s})},defaultColor:n.color})]})]})]}),E(\"div\",{children:E(\"div\",{className:$(\"date-color-wrapper\"),children:E(\"div\",{className:$(\"item-metadata\"),children:E(\"span\",{style:{\"--date-color\":e.color,\"--date-background-color\":e.backgroundColor},className:Ge([$(\"item-metadata-date-wrapper\"),$(\"date\"),{\"has-background\":!!(e!=null&&e.backgroundColor)}]),children:[E(\"span\",{className:$(\"item-metadata-date is-button\"),children:(0,Hg.moment)().format(a())}),\" \",E(\"span\",{className:$(\"item-metadata-time is-button\"),children:(0,Hg.moment)().format(i())})]})})})})]}),E(\"div\",{className:$(\"setting-button-wrapper\"),children:E(\"div\",{className:\"clickable-icon\",onClick:t,\"aria-label\":R(\"Delete\"),children:E(Ut,{name:\"lucide-trash-2\"})})})]})})}function ER({dataKeys:e,onChange:t,getTimeFormat:r,getDateFormat:n}){let[i,a]=$e.useState(e),o=$e.useMemo(()=>{let d=createDiv($(\"item-metadata\")),m=d.createSpan($(\"item-metadata-date\"));d.style.position=\"absolute\",d.style.visibility=\"hidden\",activeDocument.body.append(d);let h=activeWindow.getComputedStyle(m),g=h.getPropertyValue(\"color\").trim(),y=h.getPropertyValue(\"background-color\").trim();return d.remove(),{color:g,backgroundColor:y}},[]),s=d=>{t(d),a(d)},u=()=>{s((0,Hd.default)(i,{$push:[{...Vc,id:et(),data:{isToday:!1,distance:1,unit:\"days\",direction:\"after\"}}]}))},l=d=>{s((0,Hd.default)(i,{$splice:[[d,1]]}))},c=d=>m=>{s((0,Hd.default)(i,{[d]:{data:{$set:m}}}))};return E(\"div\",{className:$(\"date-color-input-wrapper\"),children:[E(\"div\",{className:\"setting-item-info\",children:[E(\"div\",{className:\"setting-item-name\",children:R(\"Display date colors\")}),E(\"div\",{className:\"setting-item-description\",children:R(\"Set colors for dates displayed in cards based on the rules below.\")})]}),E(\"div\",{children:i.map((d,m)=>E(SR,{dateColorKey:d.data,deleteKey:()=>l(m),updateKey:c(m),defaultColors:o,getTimeFormat:r,getDateFormat:n},d.id))}),E(\"button\",{className:$(\"add-tag-color-button\"),onClick:u,children:R(\"Add date color\")})]})}function Lx(e,t,r,n,i){$e.render(E(ER,{dataKeys:t,onChange:r,portalContainer:ha(e),getDateFormat:n,getTimeFormat:i}),e)}function Px(e){$e.unmountComponentAtNode(e)}var fo=Ct(ln());function ks({id:e,children:t}){let r=$e.useContext(sl),n=$e.useMemo(()=>e||et(),[e]);return $e.useEffect(()=>()=>{r.unmountScope(e)},[e]),E(ma.Provider,{value:n,children:t})}function Nx({isStatic:e,itemIndex:t,item:r,toggleShouldHideLabel:n,toggleContainsMarkdown:i,deleteKey:a,updateKey:o,updateLabel:s}){let u=Fe(null),l=Fe(null),c=Fe(null),d=Ta(l,c),m=E(\"div\",{className:$(\"setting-controls-wrapper\"),children:[E(\"div\",{className:$(\"setting-input-wrapper\"),children:[E(\"div\",{children:[E(\"div\",{className:$(\"setting-item-label\"),children:R(\"Metadata key\")}),E(\"input\",{type:\"text\",value:r.data.metadataKey,onChange:h=>o(h.target.value)})]}),E(\"div\",{children:[E(\"div\",{className:$(\"setting-item-label\"),children:R(\"Display label\")}),E(\"input\",{type:\"text\",value:r.data.label,onChange:h=>s(h.target.value)})]})]}),E(\"div\",{className:$(\"setting-toggle-wrapper\"),children:[E(\"div\",{children:[E(\"div\",{className:`checkbox-container ${r.data.shouldHideLabel?\"is-enabled\":\"\"}`,onClick:n,\"aria-label\":R(\"Hide label\")}),E(\"div\",{className:$(\"setting-item-label\"),children:R(\"Hide label\")})]}),E(\"div\",{children:[E(\"div\",{className:`checkbox-container ${r.data.containsMarkdown?\"is-enabled\":\"\"}`,onClick:i,\"aria-label\":R(\"Field contains markdown\")}),E(\"div\",{className:$(\"setting-item-label\"),children:R(\"Field contains markdown\")})]})]})]});return E(\"div\",{ref:l,className:$(\"setting-item-wrapper\"),children:E(\"div\",{ref:u,className:$(\"setting-item\"),children:[e?m:E(ei,{elementRef:u,measureRef:l,id:r.id,index:t,data:r,children:m}),E(\"div\",{className:$(\"setting-button-wrapper\"),children:[E(\"div\",{className:\"clickable-icon\",onClick:a,\"aria-label\":R(\"Delete\"),children:E(Ut,{name:\"lucide-trash-2\"})}),E(\"div\",{className:\"mobile-option-setting-drag-icon clickable-icon\",\"aria-label\":R(\"Drag to rearrange\"),ref:d,children:E(Ut,{name:\"lucide-grip-horizontal\"})})]})]})})}function kR({onChange:e,inputValue:t,keys:r,setKeys:n}){let i=a=>{e(a),n(a)};return{updateKey:a=>o=>{i((0,fo.default)(r,{[a]:{data:{metadataKey:{$set:o}}}}))},updateLabel:a=>o=>{i((0,fo.default)(r,{[a]:{data:{label:{$set:o}}}}))},toggleShouldHideLabel:a=>()=>{i((0,fo.default)(r,{[a]:{data:{$toggle:[\"shouldHideLabel\"]}}}))},toggleContainsMarkdown:a=>()=>{i((0,fo.default)(r,{[a]:{data:{$toggle:[\"containsMarkdown\"]}}}))},deleteKey:a=>()=>{i((0,fo.default)(r,{$splice:[[a,1]]}))},newKey:()=>{i((0,fo.default)(r,{$push:[{...Rc,id:et(),data:{metadataKey:t,label:\"\",shouldHideLabel:!1,containsMarkdown:!1}}]}))},moveKey:(a,o)=>{let s=a.getPath(),u=o.getPath(),l=s[s.length-1],c=u[u.length-1];if(l===c)return;let d=r.slice(),[m]=d.splice(l,1);d.splice(c,0,m),i(d)}}}var xR=[ft.MetadataSetting];function CR({keys:e,portalContainer:t}){return Oi(E(Ds,{children:(r,n)=>{let a=r.getPath()[0],o=e[a];return E(\"div\",{className:$(\"drag-container\"),style:n,children:E(Nx,{item:o,itemIndex:a,updateKey:Mr,updateLabel:Mr,toggleShouldHideLabel:Mr,toggleContainsMarkdown:Mr,deleteKey:Mr,isStatic:!0})})}}),t)}function _R({scrollEl:e}){let t=Ee(cn);return Ae(()=>{let r=0,n=()=>{e.win.clearTimeout(r),r=e.win.setTimeout(()=>{t.hitboxEntities.forEach(i=>{i.recalcInitial()})},100)};return e.addEventListener(\"scroll\",n,{passive:!0,capture:!1}),()=>{e.removeEventListener(\"scroll\",n)}},[e,t]),null}function MR(e){let[t,r]=Ne(e.dataKeys),[n,i]=Ne(\"\"),{getShouldIMEBlockAction:a,...o}=Ou(),s=Dn(e.scrollEl),{updateKey:u,updateLabel:l,toggleShouldHideLabel:c,toggleContainsMarkdown:d,deleteKey:m,newKey:h,moveKey:g}=kR({onChange:e.onChange,inputValue:n,keys:t,setKeys:r,win:s});return E(ct,{children:[E(bs,{win:s,onDrop:g,children:[E(_R,{scrollEl:e.scrollEl}),E(ks,{children:E(Ia,{axis:\"vertical\",children:[t.map((y,v)=>E(Nx,{item:y,itemIndex:v,updateKey:u(v),updateLabel:l(v),toggleShouldHideLabel:c(v),toggleContainsMarkdown:d(v),deleteKey:m(v)},y.id)),E(Fa,{accepts:xR,index:t.length})]})}),E(CR,{keys:t,portalContainer:e.portalContainer})]}),E(\"div\",{className:$(\"setting-key-input-wrapper\"),children:[E(\"input\",{placeholder:R(\"Metadata key\"),type:\"text\",value:n,onChange:y=>i(y.target.value),onKeyDown:y=>{if(!a()){if(y.key===\"Enter\"){h(),i(\"\");return}y.key===\"Escape\"&&(i(\"\"),y.target.blur())}},...o}),E(\"button\",{onClick:()=>{h(),i(\"\")},children:R(\"Add key\")})]})]})}function Rx(e,t,r,n){Li(E(MR,{dataKeys:r,scrollEl:t,onChange:n,portalContainer:ha(e)}),e)}function Hx(e){Pi(e)}var Bd=Ct(ln());function Bx({isStatic:e,tagIndex:t,tag:r,deleteTag:n,updateTag:i}){let a=Fe(null),o=Fe(null),s=Fe(null),u=Ta(o,s),l=E(\"div\",{className:$(\"setting-controls-wrapper\"),children:E(\"div\",{className:$(\"setting-input-wrapper\"),children:E(\"div\",{children:E(\"input\",{type:\"text\",value:r.data.tag,onChange:c=>i(c.target.value)})})})});return E(\"div\",{ref:o,className:$(\"setting-item-wrapper\"),children:E(\"div\",{ref:a,className:$(\"setting-item\"),children:[e?l:E(ei,{elementRef:a,measureRef:o,id:r.id,index:t,data:r,children:l}),E(\"div\",{className:$(\"setting-button-wrapper\"),children:[E(\"div\",{className:\"clickable-icon\",onClick:n,\"aria-label\":R(\"Delete\"),children:E(Ut,{name:\"lucide-trash-2\"})}),E(\"div\",{className:\"mobile-option-setting-drag-icon clickable-icon\",\"aria-label\":R(\"Drag to rearrange\"),ref:u,children:E(Ut,{name:\"lucide-grip-horizontal\"})})]})]})})}function TR({onChange:e,inputValue:t,tags:r,setTags:n}){let i=a=>{e(a),n(a)};return{updateTag:a=>o=>{i((0,Bd.default)(r,{[a]:{data:{tag:{$set:o}}}}))},deleteTag:a=>()=>{i((0,Bd.default)(r,{$splice:[[a,1]]}))},newTag:()=>{i((0,Bd.default)(r,{$push:[{...Hc,id:et(),data:{tag:t}}]}))},moveTag:(a,o)=>{let s=a.getPath(),u=o.getPath(),l=s[s.length-1],c=u[u.length-1];if(l===c)return;let d=r.slice(),[m]=d.splice(l,1);d.splice(c,0,m),i(d)}}}var FR=[ft.TagSortSetting];function IR({keys:e,portalContainer:t}){return Oi(E(Ds,{children:(r,n)=>{let a=r.getPath()[0],o=e[a];return E(\"div\",{className:Ge([$(\"drag-container\"),$(\"tag-sort-input-wrapper\")]),style:n,children:E(Bx,{tag:o,tagIndex:a,updateTag:Mr,deleteTag:Mr,isStatic:!0})})}}),t)}function AR({scrollEl:e}){let t=Ee(cn);return Ae(()=>{let r=0,n=()=>{e.win.clearTimeout(r),r=e.win.setTimeout(()=>{t==null||t.hitboxEntities.forEach(i=>{i.recalcInitial()})},100)};return e.addEventListener(\"scroll\",n,{passive:!0,capture:!1}),()=>{e.removeEventListener(\"scroll\",n)}},[e,t]),null}function OR(e){let[t,r]=Ne(e.tags),[n,i]=Ne(\"\"),{getShouldIMEBlockAction:a,...o}=Ou(),s=Dn(e.scrollEl),{updateTag:u,deleteTag:l,newTag:c,moveTag:d}=TR({onChange:e.onChange,inputValue:n,tags:t,setTags:r,win:s});return E(\"div\",{className:$(\"tag-sort-input-wrapper\"),children:[E(\"div\",{className:\"setting-item-info\",children:[E(\"div\",{className:\"setting-item-name\",children:R(\"Tag sort order\")}),E(\"div\",{className:\"setting-item-description\",children:R(\"Set an explicit sort order for the specified tags.\")})]}),E(\"div\",{children:E(bs,{win:s,onDrop:d,children:[E(AR,{scrollEl:e.scrollEl}),E(ks,{children:E(Ia,{axis:\"vertical\",children:[t.map((m,h)=>E(Bx,{tag:m,tagIndex:h,updateTag:u(h),deleteTag:l(h)},m.id)),E(Fa,{accepts:FR,index:t.length})]})}),E(IR,{keys:t,portalContainer:e.portalContainer})]})}),E(\"div\",{className:$(\"setting-key-input-wrapper\"),children:[E(\"input\",{placeholder:\"#tag\",type:\"text\",value:n,onChange:m=>{let h=m.target.value;i(h[0]===\"#\"?h:\"#\"+h)},onKeyDown:m=>{if(!a()){if(m.key===\"Enter\"){c(),i(\"\");return}m.key===\"Escape\"&&(i(\"\"),m.target.blur())}},...o}),E(\"button\",{onClick:()=>{c(),i(\"\")},children:R(\"Add tag\")})]})]})}function Vx(e,t,r,n){Li(E(OR,{tags:r,scrollEl:t,onChange:n,portalContainer:ha(e)}),e)}function $x(e){Pi(e)}var Ux=/^\\d+(?:\\.\\d+)?$/,Yx=new Set([_t,\"append-archive-date\",\"archive-date-format\",\"archive-date-separator\",\"archive-with-date\",\"date-colors\",\"date-display-format\",\"date-format\",\"date-picker-week-start\",\"date-time-display-format\",\"date-trigger\",\"full-list-lane-width\",\"hide-card-count\",\"inline-metadata-position\",\"lane-width\",\"link-date-to-daily-note\",\"list-collapse\",\"max-archive-size\",\"metadata-keys\",\"move-dates\",\"move-tags\",\"move-task-metadata\",\"new-card-insertion-method\",\"new-line-trigger\",\"new-note-folder\",\"new-note-template\",\"show-add-list\",\"show-archive-all\",\"show-board-settings\",\"show-checkboxes\",\"show-relative-date\",\"show-search\",\"show-set-view\",\"show-view-as-markdown\",\"table-sizing\",\"tag-action\",\"tag-colors\",\"tag-sort\",\"time-format\",\"time-trigger\"]),Vd=class{constructor(t,r,n){this.cleanupFns=[];this.applyDebounceTimer=0;this.app=t.app,this.plugin=t,this.config=r,this.settings=n}applySettingsUpdate(t){this.win.clearTimeout(this.applyDebounceTimer),this.applyDebounceTimer=this.win.setTimeout(()=>{this.settings=(0,Wx.default)(this.settings,t),this.config.onSettingsChange(this.settings)},1e3)}getSetting(t,r){return r?[this.settings[t],this.plugin.settings[t]]:[this.settings[t],null]}constructUI(t,r,n){this.win=t.win;let{templateFiles:i,vaultFolders:a,templateWarning:o}=hx(this.app);t.createEl(\"h3\",{text:r}),n?t.createEl(\"p\",{text:R(\"These settings will take precedence over the default Kanban board settings.\")}):t.createEl(\"p\",{text:R(\"Set the default Kanban board settings. Settings can be overridden on a board-by-board basis.\")}),new rt.Setting(t).setName(R(\"Display card checkbox\")).setDesc(R(\"When toggled, a checkbox will be displayed with each card\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"show-checkboxes\",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(m=>{this.applySettingsUpdate({\"show-checkboxes\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"show-checkboxes\",n);u.setValue(!!c),this.applySettingsUpdate({$unset:[\"show-checkboxes\"]})})})}),new rt.Setting(t).setName(R(\"New line trigger\")).setDesc(R(\"Select whether Enter or Shift+Enter creates a new line. The opposite of what you choose will create and complete editing of cards and lists.\")).addDropdown(s=>{s.addOption(\"shift-enter\",R(\"Shift + Enter\")),s.addOption(\"enter\",R(\"Enter\"));let[u,l]=this.getSetting(\"new-line-trigger\",n);s.setValue(u||l||\"shift-enter\"),s.onChange(c=>{this.applySettingsUpdate({\"new-line-trigger\":{$set:c}})})}),new rt.Setting(t).setName(R(\"Prepend / append new cards\")).setDesc(R(\"This setting controls whether new cards are added to the beginning or end of the list.\")).addDropdown(s=>{s.addOption(\"prepend\",R(\"Prepend\")),s.addOption(\"prepend-compact\",R(\"Prepend (compact)\")),s.addOption(\"append\",R(\"Append\"));let[u,l]=this.getSetting(\"new-card-insertion-method\",n);s.setValue(u||l||\"append\"),s.onChange(c=>{this.applySettingsUpdate({\"new-card-insertion-method\":{$set:c}})})}),new rt.Setting(t).setName(R(\"Hide card counts in list titles\")).setDesc(R(\"When toggled, card counts are hidden from the list title\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"hide-card-count\",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(m=>{this.applySettingsUpdate({\"hide-card-count\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"hide-card-count\",n);u.setValue(!!c),this.applySettingsUpdate({$unset:[\"hide-card-count\"]})})})}),new rt.Setting(t).setName(R(\"List width\")).setDesc(R(\"Enter a number to set the list width in pixels.\")).addText(s=>{let[u,l]=this.getSetting(\"lane-width\",n);s.inputEl.setAttr(\"type\",\"number\"),s.inputEl.placeholder=`${l||\"272\"} (default)`,s.inputEl.value=u?u.toString():\"\",s.onChange(c=>{if(c&&Ux.test(c)){s.inputEl.removeClass(\"error\"),this.applySettingsUpdate({\"lane-width\":{$set:parseInt(c)}});return}c&&s.inputEl.addClass(\"error\"),this.applySettingsUpdate({$unset:[\"lane-width\"]})})}),new rt.Setting(t).setName(R(\"Expand lists to full width in list view\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"full-list-lane-width\",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(m=>{this.applySettingsUpdate({\"full-list-lane-width\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"full-list-lane-width\",n);u.setValue(!!c),this.applySettingsUpdate({$unset:[\"full-list-lane-width\"]})})})}),new rt.Setting(t).setName(R(\"Maximum number of archived cards\")).setDesc(R(\"Archived cards can be viewed in markdown mode. This setting will begin removing old cards once the limit is reached. Setting this value to -1 will allow a board's archive to grow infinitely.\")).addText(s=>{let[u,l]=this.getSetting(\"max-archive-size\",n);s.inputEl.setAttr(\"type\",\"number\"),s.inputEl.placeholder=`${l||\"-1\"} (default)`,s.inputEl.value=u?u.toString():\"\",s.onChange(c=>{if(c&&Ux.test(c)){s.inputEl.removeClass(\"error\"),this.applySettingsUpdate({\"max-archive-size\":{$set:parseInt(c)}});return}c&&s.inputEl.addClass(\"error\"),this.applySettingsUpdate({$unset:[\"max-archive-size\"]})})}),new rt.Setting(t).setName(R(\"Note template\")).setDesc(R(\"This template will be used when creating new notes from Kanban cards.\")).then(Mg({choices:i,key:\"new-note-template\",warningText:o,local:n,placeHolderStr:R(\"No template\"),manager:this})),new rt.Setting(t).setName(R(\"Note folder\")).setDesc(R(\"Notes created from Kanban cards will be placed in this folder. If blank, they will be placed in the default location for this vault.\")).then(Mg({choices:a,key:\"new-note-folder\",local:n,placeHolderStr:R(\"Default folder\"),manager:this})),t.createEl(\"h4\",{text:R(\"Tags\")}),new rt.Setting(t).setName(R(\"Move tags to card footer\")).setDesc(R(\"When toggled, tags will be displayed in the card's footer instead of the card's body.\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"move-tags\",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(m=>{this.applySettingsUpdate({\"move-tags\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"move-tags\",n);u.setValue(!!c),this.applySettingsUpdate({$unset:[\"move-tags\"]})})})}),new rt.Setting(t).setName(R(\"Tag click action\")).setDesc(R(\"This setting controls whether clicking the tags displayed below the card title opens the Obsidian search or the Kanban board search.\")).addDropdown(s=>{s.addOption(\"kanban\",R(\"Search Kanban Board\")),s.addOption(\"obsidian\",R(\"Search Obsidian Vault\"));let[u,l]=this.getSetting(\"tag-action\",n);s.setValue(u||l||\"obsidian\"),s.onChange(c=>{this.applySettingsUpdate({\"tag-action\":{$set:c}})})}),new rt.Setting(t).then(s=>{let[u,l]=this.getSetting(\"tag-sort\",n),c=(u||l||[]).map(d=>({...Hc,id:et(),data:d}));Vx(s.settingEl,t,c,d=>this.applySettingsUpdate({\"tag-sort\":{$set:d.map(m=>m.data)}})),this.cleanupFns.push(()=>{s.settingEl&&$x(s.settingEl)})}),new rt.Setting(t).then(s=>{let[u]=this.getSetting(\"tag-colors\",n),l=(u||[]).map(c=>({...Bc,id:et(),data:c}));Ax(s.settingEl,l,c=>this.applySettingsUpdate({\"tag-colors\":{$set:c.map(d=>d.data)}})),this.cleanupFns.push(()=>{s.settingEl&&Ox(s.settingEl)})}),t.createEl(\"h4\",{text:R(\"Date & Time\")}),new rt.Setting(t).setName(R(\"Move dates to card footer\")).setDesc(R(\"When toggled, dates will be displayed in the card's footer instead of the card's body.\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"move-dates\",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(m=>{this.applySettingsUpdate({\"move-dates\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"move-dates\",n);u.setValue(c!=null?c:!0),this.applySettingsUpdate({$unset:[\"move-dates\"]})})})}),new rt.Setting(t).setName(R(\"Date trigger\")).setDesc(R(\"When this is typed, it will trigger the date selector\")).addText(s=>{let[u,l]=this.getSetting(\"date-trigger\",n);(u||l)&&s.setValue(u||l),s.setPlaceholder(l||Ad),s.onChange(c=>{c?this.applySettingsUpdate({\"date-trigger\":{$set:c}}):this.applySettingsUpdate({$unset:[\"date-trigger\"]})})}),new rt.Setting(t).setName(R(\"Time trigger\")).setDesc(R(\"When this is typed, it will trigger the time selector\")).addText(s=>{let[u,l]=this.getSetting(\"time-trigger\",n);(u||l)&&s.setValue(u||l),s.setPlaceholder(l||Od),s.onChange(c=>{c?this.applySettingsUpdate({\"time-trigger\":{$set:c}}):this.applySettingsUpdate({$unset:[\"time-trigger\"]})})}),new rt.Setting(t).setName(R(\"Date format\")).then(s=>{s.addMomentFormat(u=>{s.descEl.appendChild(createFragment(m=>{m.appendText(R(\"This format will be used when saving dates in markdown.\")),m.createEl(\"br\"),m.appendText(R(\"For more syntax, refer to\")+\" \"),m.createEl(\"a\",{text:R(\"format reference\"),href:\"https://momentjs.com/docs/#/displaying/format/\"},h=>{h.setAttr(\"target\",\"_blank\")}),m.createEl(\"br\"),m.appendText(R(\"Your current syntax looks like this\")+\": \"),u.setSampleEl(m.createEl(\"b\",{cls:\"u-pop\"})),m.createEl(\"br\")}));let[l,c]=this.getSetting(\"date-format\",n),d=ja(this.app);u.setPlaceholder(d),u.setDefaultFormat(d),(l||c)&&u.setValue(l||c),u.onChange(m=>{m?this.applySettingsUpdate({\"date-format\":{$set:m}}):this.applySettingsUpdate({$unset:[\"date-format\"]})})})}),new rt.Setting(t).setName(R(\"Time format\")).then(s=>{s.addMomentFormat(u=>{s.descEl.appendChild(createFragment(m=>{m.appendText(R(\"For more syntax, refer to\")+\" \"),m.createEl(\"a\",{text:R(\"format reference\"),href:\"https://momentjs.com/docs/#/displaying/format/\"},h=>{h.setAttr(\"target\",\"_blank\")}),m.createEl(\"br\"),m.appendText(R(\"Your current syntax looks like this\")+\": \"),u.setSampleEl(m.createEl(\"b\",{cls:\"u-pop\"})),m.createEl(\"br\")}));let[l,c]=this.getSetting(\"time-format\",n),d=Ho(this.app);u.setPlaceholder(d),u.setDefaultFormat(d),(l||c)&&u.setValue(l||c),u.onChange(m=>{m?this.applySettingsUpdate({\"time-format\":{$set:m}}):this.applySettingsUpdate({$unset:[\"time-format\"]})})})}),new rt.Setting(t).setName(R(\"Date display format\")).then(s=>{s.addMomentFormat(u=>{s.descEl.appendChild(createFragment(m=>{m.appendText(R(\"This format will be used when displaying dates in Kanban cards.\")),m.createEl(\"br\"),m.appendText(R(\"For more syntax, refer to\")+\" \"),m.createEl(\"a\",{text:R(\"format reference\"),href:\"https://momentjs.com/docs/#/displaying/format/\"},h=>{h.setAttr(\"target\",\"_blank\")}),m.createEl(\"br\"),m.appendText(R(\"Your current syntax looks like this\")+\": \"),u.setSampleEl(m.createEl(\"b\",{cls:\"u-pop\"})),m.createEl(\"br\")}));let[l,c]=this.getSetting(\"date-display-format\",n),d=ja(this.app);u.setPlaceholder(d),u.setDefaultFormat(d),(l||c)&&u.setValue(l||c),u.onChange(m=>{m?this.applySettingsUpdate({\"date-display-format\":{$set:m}}):this.applySettingsUpdate({$unset:[\"date-display-format\"]})})})}),new rt.Setting(t).setName(R(\"Show relative date\")).setDesc(R(\"When toggled, cards will display the distance between today and the card's date. eg. 'In 3 days', 'A month ago'. Relative dates will not be shown for dates from the Tasks and Dataview plugins.\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"show-relative-date\",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(m=>{this.applySettingsUpdate({\"show-relative-date\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"show-relative-date\",n);u.setValue(!!c),this.applySettingsUpdate({$unset:[\"show-relative-date\"]})})})}),new rt.Setting(t).setName(R(\"Link dates to daily notes\")).setDesc(R(\"When toggled, dates will link to daily notes. Eg. [[2021-04-26]]\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"link-date-to-daily-note\",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(m=>{this.applySettingsUpdate({\"link-date-to-daily-note\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"link-date-to-daily-note\",n);u.setValue(!!c),this.applySettingsUpdate({$unset:[\"link-date-to-daily-note\"]})})})}),new rt.Setting(t).then(s=>{let[u]=this.getSetting(\"date-colors\",n),l=(u||[]).map(c=>({...Vc,id:et(),data:c}));Lx(s.settingEl,l,c=>this.applySettingsUpdate({\"date-colors\":{$set:c.map(d=>d.data)}}),()=>{let[c,d]=this.getSetting(\"date-display-format\",n),m=ja(this.app);return c||d||m},()=>{let[c,d]=this.getSetting(\"time-format\",n),m=Ho(this.app);return c||d||m}),this.cleanupFns.push(()=>{s.settingEl&&Px(s.settingEl)})}),new rt.Setting(t).setName(R(\"Add date and time to archived cards\")).setDesc(R(\"When toggled, the current date and time will be added to the card title when it is archived. Eg. - [ ] 2021-05-14 10:00am My card title\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"archive-with-date\",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(m=>{this.applySettingsUpdate({\"archive-with-date\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"archive-with-date\",n);u.setValue(!!c),this.applySettingsUpdate({$unset:[\"archive-with-date\"]})})})}),new rt.Setting(t).setName(R(\"Add archive date/time after card title\")).setDesc(R(\"When toggled, the archived date/time will be added after the card title, e.g.- [ ] My card title 2021-05-14 10:00am. By default, it is inserted before the title.\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"append-archive-date\",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(m=>{this.applySettingsUpdate({\"append-archive-date\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"append-archive-date\",n);u.setValue(!!c),this.applySettingsUpdate({$unset:[\"append-archive-date\"]})})})}),new rt.Setting(t).setName(R(\"Archive date/time separator\")).setDesc(R(\"This will be used to separate the archived date/time from the title\")).addText(s=>{let[u,l]=this.getSetting(\"archive-date-separator\",n);s.inputEl.placeholder=l?`${l} (default)`:\"\",s.inputEl.value=u||\"\",s.onChange(c=>{if(c){this.applySettingsUpdate({\"archive-date-separator\":{$set:c}});return}this.applySettingsUpdate({$unset:[\"archive-date-separator\"]})})}),new rt.Setting(t).setName(R(\"Archive date/time format\")).then(s=>{s.addMomentFormat(u=>{s.descEl.appendChild(createFragment(I=>{I.appendText(R(\"For more syntax, refer to\")+\" \"),I.createEl(\"a\",{text:R(\"format reference\"),href:\"https://momentjs.com/docs/#/displaying/format/\"},C=>{C.setAttr(\"target\",\"_blank\")}),I.createEl(\"br\"),I.appendText(R(\"Your current syntax looks like this\")+\": \"),u.setSampleEl(I.createEl(\"b\",{cls:\"u-pop\"})),I.createEl(\"br\")}));let[l,c]=this.getSetting(\"archive-date-format\",n),[d,m]=this.getSetting(\"date-format\",n),h=d||m||ja(this.app),[g,y]=this.getSetting(\"time-format\",n),v=g||y||Ho(this.app),D=`${h} ${v}`;u.setPlaceholder(D),u.setDefaultFormat(D),(l||c)&&u.setValue(l||c),u.onChange(I=>{I?this.applySettingsUpdate({\"archive-date-format\":{$set:I}}):this.applySettingsUpdate({$unset:[\"archive-date-format\"]})})})}),new rt.Setting(t).setName(R(\"Calendar: first day of week\")).setDesc(R(\"Override which day is used as the start of the week\")).addDropdown(s=>{s.addOption(\"\",R(\"default\")),s.addOption(\"0\",R(\"Sunday\")),s.addOption(\"1\",R(\"Monday\")),s.addOption(\"2\",R(\"Tuesday\")),s.addOption(\"3\",R(\"Wednesday\")),s.addOption(\"4\",R(\"Thursday\")),s.addOption(\"5\",R(\"Friday\")),s.addOption(\"6\",R(\"Saturday\"));let[u,l]=this.getSetting(\"date-picker-week-start\",n);s.setValue((u==null?void 0:u.toString())||(l==null?void 0:l.toString())||\"\"),s.onChange(c=>{c?this.applySettingsUpdate({\"date-picker-week-start\":{$set:Number(c)}}):this.applySettingsUpdate({$unset:[\"date-picker-week-start\"]})})}),t.createEl(\"br\"),t.createEl(\"h4\",{text:R(\"Inline Metadata\")}),new rt.Setting(t).setName(R(\"Inline metadata position\")).setDesc(R(\"Controls where the inline metadata (from the Dataview plugin) will be displayed.\")).then(s=>{let u;s.addDropdown(l=>{u=l,l.addOption(\"body\",R(\"Card body\")),l.addOption(\"footer\",R(\"Card footer\")),l.addOption(\"metadata-table\",R(\"Merge with linked page metadata\"));let[c,d]=this.getSetting(\"inline-metadata-position\",n);l.setValue((c==null?void 0:c.toString())||(d==null?void 0:d.toString())||Ul),l.onChange(m=>{m?this.applySettingsUpdate({\"inline-metadata-position\":{$set:m}}):this.applySettingsUpdate({$unset:[\"inline-metadata-position\"]})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"inline-metadata-position\",n);u.setValue(c||Ul),this.applySettingsUpdate({$unset:[\"inline-metadata-position\"]})})})}),new rt.Setting(t).setName(R(\"Move task data to card footer\")).setDesc(R(\"When toggled, task data (from the Tasks plugin) will be displayed in the card's footer instead of the card's body.\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"move-task-metadata\",n);c!==void 0?l.setValue(c):d!==void 0&&l.setValue(d),l.onChange(m=>{this.applySettingsUpdate({\"move-task-metadata\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"move-task-metadata\",n);u.setValue(c!=null?c:!0),this.applySettingsUpdate({$unset:[\"move-task-metadata\"]})})})}),t.createEl(\"br\"),t.createEl(\"h4\",{text:R(\"Linked Page Metadata\")}),t.createEl(\"p\",{cls:$(\"metadata-setting-desc\"),text:R(\"Display metadata for the first note linked within a card. Specify which metadata keys to display below. An optional label can be provided, and labels can be hidden altogether.\")}),new rt.Setting(t).then(s=>{s.settingEl.addClass($(\"draggable-setting-container\"));let[u]=this.getSetting(\"metadata-keys\",n),l=(u||[]).map(c=>({...Rc,id:et(),data:c,win:Dn(t)}));Rx(s.settingEl,t,l,c=>this.applySettingsUpdate({\"metadata-keys\":{$set:c.map(d=>d.data)}})),this.cleanupFns.push(()=>{s.settingEl&&Hx(s.settingEl)})}),t.createEl(\"h4\",{text:R(\"Board Header Buttons\")}),new rt.Setting(t).setName(R(\"Add a list\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"show-add-list\",n);c!=null?l.setValue(c):d!=null?l.setValue(d):l.setValue(!0),l.onChange(m=>{this.applySettingsUpdate({\"show-add-list\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"show-add-list\",n);u.setValue(!!c),this.applySettingsUpdate({$unset:[\"show-add-list\"]})})})}),new rt.Setting(t).setName(R(\"Archive completed cards\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"show-archive-all\",n);c!=null?l.setValue(c):d!=null?l.setValue(d):l.setValue(!0),l.onChange(m=>{this.applySettingsUpdate({\"show-archive-all\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"show-archive-all\",n);u.setValue(!!c),this.applySettingsUpdate({$unset:[\"show-archive-all\"]})})})}),new rt.Setting(t).setName(R(\"Open as markdown\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"show-view-as-markdown\",n);c!=null?l.setValue(c):d!=null?l.setValue(d):l.setValue(!0),l.onChange(m=>{this.applySettingsUpdate({\"show-view-as-markdown\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"show-view-as-markdown\",n);u.setValue(!!c),this.applySettingsUpdate({$unset:[\"show-view-as-markdown\"]})})})}),new rt.Setting(t).setName(R(\"Open board settings\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"show-board-settings\",n);c!=null?l.setValue(c):d!=null?l.setValue(d):l.setValue(!0),l.onChange(m=>{this.applySettingsUpdate({\"show-board-settings\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"show-board-settings\",n);u.setValue(!!c),this.applySettingsUpdate({$unset:[\"show-board-settings\"]})})})}),new rt.Setting(t).setName(R(\"Search...\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"show-search\",n);c!=null?l.setValue(c):d!=null?l.setValue(d):l.setValue(!0),l.onChange(m=>{this.applySettingsUpdate({\"show-search\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"show-search\",n);u.setValue(!!c),this.applySettingsUpdate({$unset:[\"show-search\"]})})})}),new rt.Setting(t).setName(R(\"Board view\")).then(s=>{let u;s.addToggle(l=>{u=l;let[c,d]=this.getSetting(\"show-set-view\",n);c!=null?l.setValue(c):d!=null?l.setValue(d):l.setValue(!0),l.onChange(m=>{this.applySettingsUpdate({\"show-set-view\":{$set:m}})})}).addExtraButton(l=>{l.setIcon(\"lucide-rotate-ccw\").setTooltip(R(\"Reset to default\")).onClick(()=>{let[,c]=this.getSetting(\"show-set-view\",n);u.setValue(!!c),this.applySettingsUpdate({$unset:[\"show-set-view\"]})})})})}cleanUp(){this.win=null,this.cleanupFns.forEach(t=>t()),this.cleanupFns=[]}},$d=class extends rt.Modal{constructor(t,r,n){super(t.app),this.view=t,this.settingsManager=new Vd(t.plugin,r,n)}onOpen(){let{contentEl:t,modalEl:r}=this;r.addClass($(\"board-settings-modal\")),this.settingsManager.constructUI(t,this.view.file.basename,!0)}onClose(){let{contentEl:t}=this;this.settingsManager.cleanUp(),t.empty()}},Ud=class extends rt.PluginSettingTab{constructor(t,r){super(t.app,t),this.plugin=t,this.settingsManager=new Vd(t,r,t.settings)}display(){let{containerEl:t}=this;t.empty(),t.addClass($(\"board-settings-modal\")),this.settingsManager.constructUI(t,R(\"Kanban Plugin\"),!1)}};var xC=Ct(ln());function zx({onNewLane:e,closeLaneForm:t}){let[r,n]=Ne(!1),i=Fe(),a=Fe(),o=ws(()=>t(),{ignoreClass:[$(\"ignore-click-outside\"),\"mobile-toolbar\",\"suggestion-container\"]}),{boardModifiers:s,stateManager:u}=Ee(tt);Ai(()=>{var h;(h=a.current)==null||h.focus()},[]);let l=Ye((h,g)=>{s.addLane({...Ea,id:et(),children:[],data:{...co(g),shouldMarkItemsComplete:r}}),h.dispatch({changes:{from:0,to:h.state.doc.length,insert:\"\"}}),n(!1),e()},[e,n,s]),c=Re(()=>({x:0,y:0}),[]),d=Ye((h,g,y)=>{if(!Ca(u,g,y))return l(h,h.state.doc.toString()),!0},[l]),m=Ye(h=>l(h,h.state.doc.toString()),[l]);return E(\"div\",{ref:o,className:$(\"lane-form-wrapper\"),children:[E(\"div\",{className:$(\"lane-input-wrapper\"),children:E(_a,{className:$(\"lane-input\"),editorRef:i,editState:c,onEnter:d,onEscape:t,onSubmit:m})}),E(\"div\",{className:$(\"checkbox-wrapper\"),children:[E(\"div\",{className:$(\"checkbox-label\"),children:R(\"Mark cards in this list as complete\")}),E(\"div\",{onClick:()=>n(!r),className:`checkbox-container ${r?\"is-enabled\":\"\"}`})]}),E(\"div\",{className:$(\"lane-input-actions\"),children:[E(\"button\",{className:$(\"lane-action-add\"),onClick:()=>{i.current&&l(i.current,i.current.state.doc.toString())},children:R(\"Add list\")}),E(\"button\",{className:$(\"lane-action-cancel\"),onClick:t,children:R(\"Done\")})]})]})}function qx(){return{accessor:(e,t)=>typeof e==\"function\"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Oa(e,t){return typeof e==\"function\"?e(t):e}function Pr(e,t){return r=>{t.setState(n=>({...n,[e]:Oa(r,n[e])}))}}function Kd(e){return e instanceof Function}function LR(e){return Array.isArray(e)&&e.every(t=>typeof t==\"number\")}function PR(e,t){let r=[],n=i=>{i.forEach(a=>{r.push(a);let o=t(a);o!=null&&o.length&&n(o)})};return n(e),r}function ze(e,t,r){let n=[],i;return a=>{let o;r.key&&r.debug&&(o=Date.now());let s=e(a);if(!(s.length!==n.length||s.some((c,d)=>n[d]!==c)))return i;n=s;let l;if(r.key&&r.debug&&(l=Date.now()),i=t(...s),r==null||r.onChange==null||r.onChange(i),r.key&&r.debug&&r!=null&&r.debug()){let c=Math.round((Date.now()-o)*100)/100,d=Math.round((Date.now()-l)*100)/100,m=d/16,h=(g,y)=>{for(g=String(g);g.length<y;)g=\" \"+g;return g};console.info(`%c\\u23F1 ${h(d,5)} /${h(c,5)} ms`,`\n            font-size: .6rem;\n            font-weight: bold;\n            color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,r==null?void 0:r.key)}return i}}function Ke(e,t,r,n){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[t]},key:!1,onChange:n}}function NR(e,t,r,n){let i=()=>{var o;return(o=a.getValue())!=null?o:e.options.renderFallbackValue},a={id:`${t.id}_${r.id}`,row:t,column:r,getValue:()=>t.getValue(n),renderValue:i,getContext:ze(()=>[e,r,t,a],(o,s,u,l)=>({table:o,column:s,row:u,cell:l,getValue:l.getValue,renderValue:l.renderValue}),Ke(e.options,\"debugCells\",\"cell.getContext\"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(a,r,t,e)},{}),a}function RR(e,t,r,n){var i,a;let s={...e._getDefaultColumnDef(),...t},u=s.accessorKey,l=(i=(a=s.id)!=null?a:u?u.replace(\".\",\"_\"):void 0)!=null?i:typeof s.header==\"string\"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:u&&(u.includes(\".\")?c=m=>{let h=m;for(let y of u.split(\".\")){var g;h=(g=h)==null?void 0:g[y]}return h}:c=m=>m[s.accessorKey]),!l)throw new Error;let d={id:`${String(l)}`,accessorFn:c,parent:n,depth:r,columnDef:s,columns:[],getFlatColumns:ze(()=>[!0],()=>{var m;return[d,...(m=d.columns)==null?void 0:m.flatMap(h=>h.getFlatColumns())]},Ke(e.options,\"debugColumns\",\"column.getFlatColumns\")),getLeafColumns:ze(()=>[e._getOrderColumnsFn()],m=>{var h;if((h=d.columns)!=null&&h.length){let g=d.columns.flatMap(y=>y.getLeafColumns());return m(g)}return[d]},Ke(e.options,\"debugColumns\",\"column.getLeafColumns\"))};for(let m of e._features)m.createColumn==null||m.createColumn(d,e);return d}var nr=\"debugHeaders\";function Kx(e,t,r){var n;let a={id:(n=r.id)!=null?n:t.id,column:t,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let o=[],s=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),o.push(u)};return s(a),o},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(a,e)}),a}var HR={createTable:e=>{e.getHeaderGroups=ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,i)=>{var a,o;let s=(a=n==null?void 0:n.map(d=>r.find(m=>m.id===d)).filter(Boolean))!=null?a:[],u=(o=i==null?void 0:i.map(d=>r.find(m=>m.id===d)).filter(Boolean))!=null?o:[],l=r.filter(d=>!(n!=null&&n.includes(d.id))&&!(i!=null&&i.includes(d.id)));return Wd(t,[...s,...l,...u],e)},Ke(e.options,nr,\"getHeaderGroups\")),e.getCenterHeaderGroups=ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,i)=>(r=r.filter(a=>!(n!=null&&n.includes(a.id))&&!(i!=null&&i.includes(a.id))),Wd(t,r,e,\"center\")),Ke(e.options,nr,\"getCenterHeaderGroups\")),e.getLeftHeaderGroups=ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,r,n)=>{var i;let a=(i=n==null?void 0:n.map(o=>r.find(s=>s.id===o)).filter(Boolean))!=null?i:[];return Wd(t,a,e,\"left\")},Ke(e.options,nr,\"getLeftHeaderGroups\")),e.getRightHeaderGroups=ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,r,n)=>{var i;let a=(i=n==null?void 0:n.map(o=>r.find(s=>s.id===o)).filter(Boolean))!=null?i:[];return Wd(t,a,e,\"right\")},Ke(e.options,nr,\"getRightHeaderGroups\")),e.getFooterGroups=ze(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ke(e.options,nr,\"getFooterGroups\")),e.getLeftFooterGroups=ze(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ke(e.options,nr,\"getLeftFooterGroups\")),e.getCenterFooterGroups=ze(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ke(e.options,nr,\"getCenterFooterGroups\")),e.getRightFooterGroups=ze(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ke(e.options,nr,\"getRightFooterGroups\")),e.getFlatHeaders=ze(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),Ke(e.options,nr,\"getFlatHeaders\")),e.getLeftFlatHeaders=ze(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),Ke(e.options,nr,\"getLeftFlatHeaders\")),e.getCenterFlatHeaders=ze(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),Ke(e.options,nr,\"getCenterFlatHeaders\")),e.getRightFlatHeaders=ze(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),Ke(e.options,nr,\"getRightFlatHeaders\")),e.getCenterLeafHeaders=ze(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),Ke(e.options,nr,\"getCenterLeafHeaders\")),e.getLeftLeafHeaders=ze(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),Ke(e.options,nr,\"getLeftLeafHeaders\")),e.getRightLeafHeaders=ze(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),Ke(e.options,nr,\"getRightLeafHeaders\")),e.getLeafHeaders=ze(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,r,n)=>{var i,a,o,s,u,l;return[...(i=(a=t[0])==null?void 0:a.headers)!=null?i:[],...(o=(s=r[0])==null?void 0:s.headers)!=null?o:[],...(u=(l=n[0])==null?void 0:l.headers)!=null?u:[]].map(c=>c.getLeafHeaders()).flat()},Ke(e.options,nr,\"getLeafHeaders\"))}};function Wd(e,t,r,n){var i,a;let o=0,s=function(m,h){h===void 0&&(h=1),o=Math.max(o,h),m.filter(g=>g.getIsVisible()).forEach(g=>{var y;(y=g.columns)!=null&&y.length&&s(g.columns,h+1)},0)};s(e);let u=[],l=(m,h)=>{let g={depth:h,id:[n,`${h}`].filter(Boolean).join(\"_\"),headers:[]},y=[];m.forEach(v=>{let D=[...y].reverse()[0],I=v.column.depth===g.depth,C,x=!1;if(I&&v.column.parent?C=v.column.parent:(C=v.column,x=!0),D&&(D==null?void 0:D.column)===C)D.subHeaders.push(v);else{let O=Kx(r,C,{id:[n,h,C.id,v==null?void 0:v.id].filter(Boolean).join(\"_\"),isPlaceholder:x,placeholderId:x?`${y.filter(A=>A.column===C).length}`:void 0,depth:h,index:y.length});O.subHeaders.push(v),y.push(O)}g.headers.push(v),v.headerGroup=g}),u.push(g),h>0&&l(y,h-1)},c=t.map((m,h)=>Kx(r,m,{depth:o,index:h}));l(c,o-1),u.reverse();let d=m=>m.filter(g=>g.column.getIsVisible()).map(g=>{let y=0,v=0,D=[0];g.subHeaders&&g.subHeaders.length?(D=[],d(g.subHeaders).forEach(C=>{let{colSpan:x,rowSpan:O}=C;y+=x,D.push(O)})):y=1;let I=Math.min(...D);return v=v+I,g.colSpan=y,g.rowSpan=v,{colSpan:y,rowSpan:v}});return d((i=(a=u[0])==null?void 0:a.headers)!=null?i:[]),u}var Zg=(e,t,r,n,i,a,o)=>{let s={id:t,index:n,original:r,depth:i,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(s._valuesCache.hasOwnProperty(u))return s._valuesCache[u];let l=e.getColumn(u);if(l!=null&&l.accessorFn)return s._valuesCache[u]=l.accessorFn(s.original,n),s._valuesCache[u]},getUniqueValues:u=>{if(s._uniqueValuesCache.hasOwnProperty(u))return s._uniqueValuesCache[u];let l=e.getColumn(u);if(l!=null&&l.accessorFn)return l.columnDef.getUniqueValues?(s._uniqueValuesCache[u]=l.columnDef.getUniqueValues(s.original,n),s._uniqueValuesCache[u]):(s._uniqueValuesCache[u]=[s.getValue(u)],s._uniqueValuesCache[u])},renderValue:u=>{var l;return(l=s.getValue(u))!=null?l:e.options.renderFallbackValue},subRows:a!=null?a:[],getLeafRows:()=>PR(s.subRows,u=>u.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let u=[],l=s;for(;;){let c=l.getParentRow();if(!c)break;u.push(c),l=c}return u.reverse()},getAllCells:ze(()=>[e.getAllLeafColumns()],u=>u.map(l=>NR(e,s,l,l.id)),Ke(e.options,\"debugRows\",\"getAllCells\")),_getAllCellsByColumnId:ze(()=>[s.getAllCells()],u=>u.reduce((l,c)=>(l[c.column.id]=c,l),{}),Ke(e.options,\"debugRows\",\"getAllCellsByColumnId\"))};for(let u=0;u<e._features.length;u++){let l=e._features[u];l==null||l.createRow==null||l.createRow(s,e)}return s},BR={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Gx=(e,t,r)=>{var n;let i=r.toLowerCase();return!!(!((n=e.getValue(t))==null||(n=n.toString())==null||(n=n.toLowerCase())==null)&&n.includes(i))};Gx.autoRemove=e=>di(e);var Jx=(e,t,r)=>{var n;return!!(!((n=e.getValue(t))==null||(n=n.toString())==null)&&n.includes(r))};Jx.autoRemove=e=>di(e);var Zx=(e,t,r)=>{var n;return((n=e.getValue(t))==null||(n=n.toString())==null?void 0:n.toLowerCase())===(r==null?void 0:r.toLowerCase())};Zx.autoRemove=e=>di(e);var Qx=(e,t,r)=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(r)};Qx.autoRemove=e=>di(e)||!(e!=null&&e.length);var Xx=(e,t,r)=>!r.some(n=>{var i;return!((i=e.getValue(t))!=null&&i.includes(n))});Xx.autoRemove=e=>di(e)||!(e!=null&&e.length);var eC=(e,t,r)=>r.some(n=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(n)});eC.autoRemove=e=>di(e)||!(e!=null&&e.length);var tC=(e,t,r)=>e.getValue(t)===r;tC.autoRemove=e=>di(e);var nC=(e,t,r)=>e.getValue(t)==r;nC.autoRemove=e=>di(e);var Qg=(e,t,r)=>{let[n,i]=r,a=e.getValue(t);return a>=n&&a<=i};Qg.resolveFilterValue=e=>{let[t,r]=e,n=typeof t!=\"number\"?parseFloat(t):t,i=typeof r!=\"number\"?parseFloat(r):r,a=t===null||Number.isNaN(n)?-1/0:n,o=r===null||Number.isNaN(i)?1/0:i;if(a>o){let s=a;a=o,o=s}return[a,o]};Qg.autoRemove=e=>di(e)||di(e[0])&&di(e[1]);var Xi={includesString:Gx,includesStringSensitive:Jx,equalsString:Zx,arrIncludes:Qx,arrIncludesAll:Xx,arrIncludesSome:eC,equals:tC,weakEquals:nC,inNumberRange:Qg};function di(e){return e==null||e===\"\"}var VR={getDefaultColumnDef:()=>({filterFn:\"auto\"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Pr(\"columnFilters\",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let r=t.getCoreRowModel().flatRows[0],n=r==null?void 0:r.getValue(e.id);return typeof n==\"string\"?Xi.includesString:typeof n==\"number\"?Xi.inNumberRange:typeof n==\"boolean\"||n!==null&&typeof n==\"object\"?Xi.equals:Array.isArray(n)?Xi.arrIncludes:Xi.weakEquals},e.getFilterFn=()=>{var r,n;return Kd(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn===\"auto\"?e.getAutoFilterFn():(r=(n=t.options.filterFns)==null?void 0:n[e.columnDef.filterFn])!=null?r:Xi[e.columnDef.filterFn]},e.getCanFilter=()=>{var r,n,i;return((r=e.columnDef.enableColumnFilter)!=null?r:!0)&&((n=t.options.enableColumnFilters)!=null?n:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var r;return(r=t.getState().columnFilters)==null||(r=r.find(n=>n.id===e.id))==null?void 0:r.value},e.getFilterIndex=()=>{var r,n;return(r=(n=t.getState().columnFilters)==null?void 0:n.findIndex(i=>i.id===e.id))!=null?r:-1},e.setFilterValue=r=>{t.setColumnFilters(n=>{let i=e.getFilterFn(),a=n==null?void 0:n.find(c=>c.id===e.id),o=Oa(r,a?a.value:void 0);if(jx(i,o,e)){var s;return(s=n==null?void 0:n.filter(c=>c.id!==e.id))!=null?s:[]}let u={id:e.id,value:o};if(a){var l;return(l=n==null?void 0:n.map(c=>c.id===e.id?u:c))!=null?l:[]}return n!=null&&n.length?[...n,u]:[u]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let r=e.getAllLeafColumns(),n=i=>{var a;return(a=Oa(t,i))==null?void 0:a.filter(o=>{let s=r.find(u=>u.id===o.id);if(s){let u=s.getFilterFn();if(jx(u,o.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(n)},e.resetColumnFilters=t=>{var r,n;e.setColumnFilters(t?[]:(r=(n=e.initialState)==null?void 0:n.columnFilters)!=null?r:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function jx(e,t,r){return(e&&e.autoRemove?e.autoRemove(t,r):!1)||typeof t==\"undefined\"||typeof t==\"string\"&&!t}var $R=(e,t,r)=>r.reduce((n,i)=>{let a=i.getValue(e);return n+(typeof a==\"number\"?a:0)},0),UR=(e,t,r)=>{let n;return r.forEach(i=>{let a=i.getValue(e);a!=null&&(n>a||n===void 0&&a>=a)&&(n=a)}),n},WR=(e,t,r)=>{let n;return r.forEach(i=>{let a=i.getValue(e);a!=null&&(n<a||n===void 0&&a>=a)&&(n=a)}),n},YR=(e,t,r)=>{let n,i;return r.forEach(a=>{let o=a.getValue(e);o!=null&&(n===void 0?o>=o&&(n=i=o):(n>o&&(n=o),i<o&&(i=o)))}),[n,i]},zR=(e,t)=>{let r=0,n=0;if(t.forEach(i=>{let a=i.getValue(e);a!=null&&(a=+a)>=a&&(++r,n+=a)}),r)return n/r},KR=(e,t)=>{if(!t.length)return;let r=t.map(a=>a.getValue(e));if(!LR(r))return;if(r.length===1)return r[0];let n=Math.floor(r.length/2),i=r.sort((a,o)=>a-o);return r.length%2!==0?i[n]:(i[n-1]+i[n])/2},jR=(e,t)=>Array.from(new Set(t.map(r=>r.getValue(e))).values()),qR=(e,t)=>new Set(t.map(r=>r.getValue(e))).size,GR=(e,t)=>t.length,Bg={sum:$R,min:UR,max:WR,extent:YR,mean:zR,median:KR,unique:jR,uniqueCount:qR,count:GR},JR={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,r;return(t=(r=e.getValue())==null||r.toString==null?void 0:r.toString())!=null?t:null},aggregationFn:\"auto\"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Pr(\"grouping\",e),groupedColumnMode:\"reorder\"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(r=>r!=null&&r.includes(e.id)?r.filter(n=>n!==e.id):[...r!=null?r:[],e.id])},e.getCanGroup=()=>{var r,n;return((r=e.columnDef.enableGrouping)!=null?r:!0)&&((n=t.options.enableGrouping)!=null?n:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.includes(e.id)},e.getGroupedIndex=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let r=e.getCanGroup();return()=>{r&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let r=t.getCoreRowModel().flatRows[0],n=r==null?void 0:r.getValue(e.id);if(typeof n==\"number\")return Bg.sum;if(Object.prototype.toString.call(n)===\"[object Date]\")return Bg.extent},e.getAggregationFn=()=>{var r,n;if(!e)throw new Error;return Kd(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn===\"auto\"?e.getAutoAggregationFn():(r=(n=t.options.aggregationFns)==null?void 0:n[e.columnDef.aggregationFn])!=null?r:Bg[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var r,n;e.setGrouping(t?[]:(r=(n=e.initialState)==null?void 0:n.grouping)!=null?r:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=r=>{if(e._groupingValuesCache.hasOwnProperty(r))return e._groupingValuesCache[r];let n=t.getColumn(r);return n!=null&&n.columnDef.getGroupingValue?(e._groupingValuesCache[r]=n.columnDef.getGroupingValue(e.original),e._groupingValuesCache[r]):e.getValue(r)},e._groupingValuesCache={}},createCell:(e,t,r,n)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===r.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=r.subRows)!=null&&i.length)}}};function ZR(e,t,r){if(!(t!=null&&t.length)||!r)return e;let n=e.filter(a=>!t.includes(a.id));return r===\"remove\"?n:[...t.map(a=>e.find(o=>o.id===a)).filter(Boolean),...n]}var QR={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Pr(\"columnOrder\",e)}),createColumn:(e,t)=>{e.getIndex=ze(r=>[jl(t,r)],r=>r.findIndex(n=>n.id===e.id),Ke(t.options,\"debugColumns\",\"getIndex\")),e.getIsFirstColumn=r=>{var n;return((n=jl(t,r)[0])==null?void 0:n.id)===e.id},e.getIsLastColumn=r=>{var n;let i=jl(t,r);return((n=i[i.length-1])==null?void 0:n.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var r;e.setColumnOrder(t?[]:(r=e.initialState.columnOrder)!=null?r:[])},e._getOrderColumnsFn=ze(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,r,n)=>i=>{let a=[];if(!(t!=null&&t.length))a=i;else{let o=[...t],s=[...i];for(;s.length&&o.length;){let u=o.shift(),l=s.findIndex(c=>c.id===u);l>-1&&a.push(s.splice(l,1)[0])}a=[...a,...s]}return ZR(a,r,n)},Ke(e.options,\"debugTable\",\"_getOrderColumnsFn\"))}},Vg=()=>({left:[],right:[]}),XR={getInitialState:e=>({columnPinning:Vg(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Pr(\"columnPinning\",e)}),createColumn:(e,t)=>{e.pin=r=>{let n=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var a,o;if(r===\"right\"){var s,u;return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(d=>!(n!=null&&n.includes(d))),right:[...((u=i==null?void 0:i.right)!=null?u:[]).filter(d=>!(n!=null&&n.includes(d))),...n]}}if(r===\"left\"){var l,c;return{left:[...((l=i==null?void 0:i.left)!=null?l:[]).filter(d=>!(n!=null&&n.includes(d))),...n],right:((c=i==null?void 0:i.right)!=null?c:[]).filter(d=>!(n!=null&&n.includes(d)))}}return{left:((a=i==null?void 0:i.left)!=null?a:[]).filter(d=>!(n!=null&&n.includes(d))),right:((o=i==null?void 0:i.right)!=null?o:[]).filter(d=>!(n!=null&&n.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(n=>{var i,a,o;return((i=n.columnDef.enablePinning)!=null?i:!0)&&((a=(o=t.options.enableColumnPinning)!=null?o:t.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{let r=e.getLeafColumns().map(s=>s.id),{left:n,right:i}=t.getState().columnPinning,a=r.some(s=>n==null?void 0:n.includes(s)),o=r.some(s=>i==null?void 0:i.includes(s));return a?\"left\":o?\"right\":!1},e.getPinnedIndex=()=>{var r,n;let i=e.getIsPinned();return i?(r=(n=t.getState().columnPinning)==null||(n=n[i])==null?void 0:n.indexOf(e.id))!=null?r:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=ze(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(r,n,i)=>{let a=[...n!=null?n:[],...i!=null?i:[]];return r.filter(o=>!a.includes(o.column.id))},Ke(t.options,\"debugRows\",\"getCenterVisibleCells\")),e.getLeftVisibleCells=ze(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(r,n)=>(n!=null?n:[]).map(a=>r.find(o=>o.column.id===a)).filter(Boolean).map(a=>({...a,position:\"left\"})),Ke(t.options,\"debugRows\",\"getLeftVisibleCells\")),e.getRightVisibleCells=ze(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(r,n)=>(n!=null?n:[]).map(a=>r.find(o=>o.column.id===a)).filter(Boolean).map(a=>({...a,position:\"right\"})),Ke(t.options,\"debugRows\",\"getRightVisibleCells\"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var r,n;return e.setColumnPinning(t?Vg():(r=(n=e.initialState)==null?void 0:n.columnPinning)!=null?r:Vg())},e.getIsSomeColumnsPinned=t=>{var r;let n=e.getState().columnPinning;if(!t){var i,a;return!!((i=n.left)!=null&&i.length||(a=n.right)!=null&&a.length)}return!!((r=n[t])!=null&&r.length)},e.getLeftLeafColumns=ze(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,r)=>(r!=null?r:[]).map(n=>t.find(i=>i.id===n)).filter(Boolean),Ke(e.options,\"debugColumns\",\"getLeftLeafColumns\")),e.getRightLeafColumns=ze(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,r)=>(r!=null?r:[]).map(n=>t.find(i=>i.id===n)).filter(Boolean),Ke(e.options,\"debugColumns\",\"getRightLeafColumns\")),e.getCenterLeafColumns=ze(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n)=>{let i=[...r!=null?r:[],...n!=null?n:[]];return t.filter(a=>!i.includes(a.id))},Ke(e.options,\"debugColumns\",\"getCenterLeafColumns\"))}},Yd={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},$g=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),eH={getDefaultColumnDef:()=>Yd,getInitialState:e=>({columnSizing:{},columnSizingInfo:$g(),...e}),getDefaultOptions:e=>({columnResizeMode:\"onEnd\",columnResizeDirection:\"ltr\",onColumnSizingChange:Pr(\"columnSizing\",e),onColumnSizingInfoChange:Pr(\"columnSizingInfo\",e)}),createColumn:(e,t)=>{e.getSize=()=>{var r,n,i;let a=t.getState().columnSizing[e.id];return Math.min(Math.max((r=e.columnDef.minSize)!=null?r:Yd.minSize,(n=a!=null?a:e.columnDef.size)!=null?n:Yd.size),(i=e.columnDef.maxSize)!=null?i:Yd.maxSize)},e.getStart=ze(r=>[r,jl(t,r),t.getState().columnSizing],(r,n)=>n.slice(0,e.getIndex(r)).reduce((i,a)=>i+a.getSize(),0),Ke(t.options,\"debugColumns\",\"getStart\")),e.getAfter=ze(r=>[r,jl(t,r),t.getState().columnSizing],(r,n)=>n.slice(e.getIndex(r)+1).reduce((i,a)=>i+a.getSize(),0),Ke(t.options,\"debugColumns\",\"getAfter\")),e.resetSize=()=>{t.setColumnSizing(r=>{let{[e.id]:n,...i}=r;return i})},e.getCanResize=()=>{var r,n;return((r=e.columnDef.enableResizing)!=null?r:!0)&&((n=t.options.enableColumnResizing)!=null?n:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let r=0,n=i=>{if(i.subHeaders.length)i.subHeaders.forEach(n);else{var a;r+=(a=i.column.getSize())!=null?a:0}};return n(e),r},e.getStart=()=>{if(e.index>0){let r=e.headerGroup.headers[e.index-1];return r.getStart()+r.getSize()}return 0},e.getResizeHandler=r=>{let n=t.getColumn(e.column.id),i=n==null?void 0:n.getCanResize();return a=>{if(!n||!i||(a.persist==null||a.persist(),Ug(a)&&a.touches&&a.touches.length>1))return;let o=e.getSize(),s=e?e.getLeafHeaders().map(D=>[D.column.id,D.column.getSize()]):[[n.id,n.getSize()]],u=Ug(a)?Math.round(a.touches[0].clientX):a.clientX,l={},c=(D,I)=>{typeof I==\"number\"&&(t.setColumnSizingInfo(C=>{var x,O;let A=t.options.columnResizeDirection===\"rtl\"?-1:1,P=(I-((x=C==null?void 0:C.startOffset)!=null?x:0))*A,B=Math.max(P/((O=C==null?void 0:C.startSize)!=null?O:0),-.999999);return C.columnSizingStart.forEach(G=>{let[J,Q]=G;l[J]=Math.round(Math.max(Q+Q*B,0)*100)/100}),{...C,deltaOffset:P,deltaPercentage:B}}),(t.options.columnResizeMode===\"onChange\"||D===\"end\")&&t.setColumnSizing(C=>({...C,...l})))},d=D=>c(\"move\",D),m=D=>{c(\"end\",D),t.setColumnSizingInfo(I=>({...I,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=r||typeof document!=\"undefined\"?document:null,g={moveHandler:D=>d(D.clientX),upHandler:D=>{h==null||h.removeEventListener(\"mousemove\",g.moveHandler),h==null||h.removeEventListener(\"mouseup\",g.upHandler),m(D.clientX)}},y={moveHandler:D=>(D.cancelable&&(D.preventDefault(),D.stopPropagation()),d(D.touches[0].clientX),!1),upHandler:D=>{var I;h==null||h.removeEventListener(\"touchmove\",y.moveHandler),h==null||h.removeEventListener(\"touchend\",y.upHandler),D.cancelable&&(D.preventDefault(),D.stopPropagation()),m((I=D.touches[0])==null?void 0:I.clientX)}},v=tH()?{passive:!1}:!1;Ug(a)?(h==null||h.addEventListener(\"touchmove\",y.moveHandler,v),h==null||h.addEventListener(\"touchend\",y.upHandler,v)):(h==null||h.addEventListener(\"mousemove\",g.moveHandler,v),h==null||h.addEventListener(\"mouseup\",g.upHandler,v)),t.setColumnSizingInfo(D=>({...D,startOffset:u,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:n.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var r;e.setColumnSizing(t?{}:(r=e.initialState.columnSizing)!=null?r:{})},e.resetHeaderSizeInfo=t=>{var r;e.setColumnSizingInfo(t?$g():(r=e.initialState.columnSizingInfo)!=null?r:$g())},e.getTotalSize=()=>{var t,r;return(t=(r=e.getHeaderGroups()[0])==null?void 0:r.headers.reduce((n,i)=>n+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,r;return(t=(r=e.getLeftHeaderGroups()[0])==null?void 0:r.headers.reduce((n,i)=>n+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,r;return(t=(r=e.getCenterHeaderGroups()[0])==null?void 0:r.headers.reduce((n,i)=>n+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,r;return(t=(r=e.getRightHeaderGroups()[0])==null?void 0:r.headers.reduce((n,i)=>n+i.getSize(),0))!=null?t:0}}},zd=null;function tH(){if(typeof zd==\"boolean\")return zd;let e=!1;try{let t={get passive(){return e=!0,!1}},r=()=>{};window.addEventListener(\"test\",r,t),window.removeEventListener(\"test\",r)}catch(t){e=!1}return zd=e,zd}function Ug(e){return e.type===\"touchstart\"}var nH={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Pr(\"columnVisibility\",e)}),createColumn:(e,t)=>{e.toggleVisibility=r=>{e.getCanHide()&&t.setColumnVisibility(n=>({...n,[e.id]:r!=null?r:!e.getIsVisible()}))},e.getIsVisible=()=>{var r,n;let i=e.columns;return(r=i.length?i.some(a=>a.getIsVisible()):(n=t.getState().columnVisibility)==null?void 0:n[e.id])!=null?r:!0},e.getCanHide=()=>{var r,n;return((r=e.columnDef.enableHiding)!=null?r:!0)&&((n=t.options.enableHiding)!=null?n:!0)},e.getToggleVisibilityHandler=()=>r=>{e.toggleVisibility==null||e.toggleVisibility(r.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=ze(()=>[e.getAllCells(),t.getState().columnVisibility],r=>r.filter(n=>n.column.getIsVisible()),Ke(t.options,\"debugRows\",\"_getAllVisibleCells\")),e.getVisibleCells=ze(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(r,n,i)=>[...r,...n,...i],Ke(t.options,\"debugRows\",\"getVisibleCells\"))},createTable:e=>{let t=(r,n)=>ze(()=>[n(),n().filter(i=>i.getIsVisible()).map(i=>i.id).join(\"_\")],i=>i.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),Ke(e.options,\"debugColumns\",r));e.getVisibleFlatColumns=t(\"getVisibleFlatColumns\",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t(\"getVisibleLeafColumns\",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t(\"getLeftVisibleLeafColumns\",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t(\"getRightVisibleLeafColumns\",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t(\"getCenterVisibleLeafColumns\",()=>e.getCenterLeafColumns()),e.setColumnVisibility=r=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(r),e.resetColumnVisibility=r=>{var n;e.setColumnVisibility(r?{}:(n=e.initialState.columnVisibility)!=null?n:{})},e.toggleAllColumnsVisible=r=>{var n;r=(n=r)!=null?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,a)=>({...i,[a.id]:r||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(r=>!(r.getIsVisible!=null&&r.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(r=>r.getIsVisible==null?void 0:r.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>r=>{var n;e.toggleAllColumnsVisible((n=r.target)==null?void 0:n.checked)}}};function jl(e,t){return t?t===\"center\"?e.getCenterVisibleLeafColumns():t===\"left\"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var rH={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,\"__global__\"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,\"__global__\"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,\"__global__\"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},iH={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Pr(\"globalFilter\",e),globalFilterFn:\"auto\",getColumnCanGlobalFilter:t=>{var r;let n=(r=e.getCoreRowModel().flatRows[0])==null||(r=r._getAllCellsByColumnId()[t.id])==null?void 0:r.getValue();return typeof n==\"string\"||typeof n==\"number\"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var r,n,i,a;return((r=e.columnDef.enableGlobalFilter)!=null?r:!0)&&((n=t.options.enableGlobalFilter)!=null?n:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((a=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Xi.includesString,e.getGlobalFilterFn=()=>{var t,r;let{globalFilterFn:n}=e.options;return Kd(n)?n:n===\"auto\"?e.getGlobalAutoFilterFn():(t=(r=e.options.filterFns)==null?void 0:r[n])!=null?t:Xi[n]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},aH={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Pr(\"expanded\",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,r=!1;e._autoResetExpanded=()=>{var n,i;if(!t){e._queue(()=>{t=!0});return}if((n=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?n:!e.options.manualExpanding){if(r)return;r=!0,e._queue(()=>{e.resetExpanded(),r=!1})}},e.setExpanded=n=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(n),e.toggleAllRowsExpanded=n=>{(n!=null?n:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=n=>{var i,a;e.setExpanded(n?{}:(i=(a=e.initialState)==null?void 0:a.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(n=>n.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>n=>{n.persist==null||n.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let n=e.getState().expanded;return n===!0||Object.values(n).some(Boolean)},e.getIsAllRowsExpanded=()=>{let n=e.getState().expanded;return typeof n==\"boolean\"?n===!0:!(!Object.keys(n).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let n=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{let o=a.split(\".\");n=Math.max(n,o.length)}),n},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=r=>{t.setExpanded(n=>{var i;let a=n===!0?!0:!!(n!=null&&n[e.id]),o={};if(n===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{o[s]=!0}):o=n,r=(i=r)!=null?i:!a,!a&&r)return{...o,[e.id]:!0};if(a&&!r){let{[e.id]:s,...u}=o;return u}return n})},e.getIsExpanded=()=>{var r;let n=t.getState().expanded;return!!((r=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?r:n===!0||n!=null&&n[e.id])},e.getCanExpand=()=>{var r,n,i;return(r=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?r:((n=t.options.enableExpanding)!=null?n:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let r=!0,n=e;for(;r&&n.parentId;)n=t.getRow(n.parentId,!0),r=n.getIsExpanded();return r},e.getToggleExpandedHandler=()=>{let r=e.getCanExpand();return()=>{r&&e.toggleExpanded()}}}},Kg=0,jg=10,Wg=()=>({pageIndex:Kg,pageSize:jg}),oH={getInitialState:e=>({...e,pagination:{...Wg(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Pr(\"pagination\",e)}),createTable:e=>{let t=!1,r=!1;e._autoResetPageIndex=()=>{var n,i;if(!t){e._queue(()=>{t=!0});return}if((n=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?n:!e.options.manualPagination){if(r)return;r=!0,e._queue(()=>{e.resetPageIndex(),r=!1})}},e.setPagination=n=>{let i=a=>Oa(n,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=n=>{var i;e.setPagination(n?Wg():(i=e.initialState.pagination)!=null?i:Wg())},e.setPageIndex=n=>{e.setPagination(i=>{let a=Oa(n,i.pageIndex),o=typeof e.options.pageCount==\"undefined\"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,o)),{...i,pageIndex:a}})},e.resetPageIndex=n=>{var i,a;e.setPageIndex(n?Kg:(i=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?i:Kg)},e.resetPageSize=n=>{var i,a;e.setPageSize(n?jg:(i=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?i:jg)},e.setPageSize=n=>{e.setPagination(i=>{let a=Math.max(1,Oa(n,i.pageSize)),o=i.pageSize*i.pageIndex,s=Math.floor(o/a);return{...i,pageIndex:s,pageSize:a}})},e.setPageCount=n=>e.setPagination(i=>{var a;let o=Oa(n,(a=e.options.pageCount)!=null?a:-1);return typeof o==\"number\"&&(o=Math.max(-1,o)),{...i,pageCount:o}}),e.getPageOptions=ze(()=>[e.getPageCount()],n=>{let i=[];return n&&n>0&&(i=[...new Array(n)].fill(null).map((a,o)=>o)),i},Ke(e.options,\"debugTable\",\"getPageOptions\")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:n}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:n<i-1},e.previousPage=()=>e.setPageIndex(n=>n-1),e.nextPage=()=>e.setPageIndex(n=>n+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var n;return(n=e.options.pageCount)!=null?n:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var n;return(n=e.options.rowCount)!=null?n:e.getPrePaginationRowModel().rows.length}}},Yg=()=>({top:[],bottom:[]}),sH={getInitialState:e=>({rowPinning:Yg(),...e}),getDefaultOptions:e=>({onRowPinningChange:Pr(\"rowPinning\",e)}),createRow:(e,t)=>{e.pin=(r,n,i)=>{let a=n?e.getLeafRows().map(u=>{let{id:l}=u;return l}):[],o=i?e.getParentRows().map(u=>{let{id:l}=u;return l}):[],s=new Set([...o,e.id,...a]);t.setRowPinning(u=>{var l,c;if(r===\"bottom\"){var d,m;return{top:((d=u==null?void 0:u.top)!=null?d:[]).filter(y=>!(s!=null&&s.has(y))),bottom:[...((m=u==null?void 0:u.bottom)!=null?m:[]).filter(y=>!(s!=null&&s.has(y))),...Array.from(s)]}}if(r===\"top\"){var h,g;return{top:[...((h=u==null?void 0:u.top)!=null?h:[]).filter(y=>!(s!=null&&s.has(y))),...Array.from(s)],bottom:((g=u==null?void 0:u.bottom)!=null?g:[]).filter(y=>!(s!=null&&s.has(y)))}}return{top:((l=u==null?void 0:u.top)!=null?l:[]).filter(y=>!(s!=null&&s.has(y))),bottom:((c=u==null?void 0:u.bottom)!=null?c:[]).filter(y=>!(s!=null&&s.has(y)))}})},e.getCanPin=()=>{var r;let{enableRowPinning:n,enablePinning:i}=t.options;return typeof n==\"function\"?n(e):(r=n!=null?n:i)!=null?r:!0},e.getIsPinned=()=>{let r=[e.id],{top:n,bottom:i}=t.getState().rowPinning,a=r.some(s=>n==null?void 0:n.includes(s)),o=r.some(s=>i==null?void 0:i.includes(s));return a?\"top\":o?\"bottom\":!1},e.getPinnedIndex=()=>{var r,n;let i=e.getIsPinned();if(!i)return-1;let a=(r=t._getPinnedRows(i))==null?void 0:r.map(o=>{let{id:s}=o;return s});return(n=a==null?void 0:a.indexOf(e.id))!=null?n:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var r,n;return e.setRowPinning(t?Yg():(r=(n=e.initialState)==null?void 0:n.rowPinning)!=null?r:Yg())},e.getIsSomeRowsPinned=t=>{var r;let n=e.getState().rowPinning;if(!t){var i,a;return!!((i=n.top)!=null&&i.length||(a=n.bottom)!=null&&a.length)}return!!((r=n[t])!=null&&r.length)},e._getPinnedRows=ze(t=>[e.getRowModel().rows,e.getState().rowPinning[t],t],(t,r,n)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(r!=null?r:[]).map(o=>{let s=e.getRow(o,!0);return s.getIsAllParentsExpanded()?s:null}):(r!=null?r:[]).map(o=>t.find(s=>s.id===o))).filter(Boolean).map(o=>({...o,position:n}))},Ke(e.options,\"debugRows\",\"_getPinnedRows\")),e.getTopRows=()=>e._getPinnedRows(\"top\"),e.getBottomRows=()=>e._getPinnedRows(\"bottom\"),e.getCenterRows=ze(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,r,n)=>{let i=new Set([...r!=null?r:[],...n!=null?n:[]]);return t.filter(a=>!i.has(a.id))},Ke(e.options,\"debugRows\",\"getCenterRows\"))}},lH={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Pr(\"rowSelection\",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var r;return e.setRowSelection(t?{}:(r=e.initialState.rowSelection)!=null?r:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(r=>{t=typeof t!=\"undefined\"?t:!e.getIsAllRowsSelected();let n={...r},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(a=>{a.getCanSelect()&&(n[a.id]=!0)}):i.forEach(a=>{delete n[a.id]}),n})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(r=>{let n=typeof t!=\"undefined\"?t:!e.getIsAllPageRowsSelected(),i={...r};return e.getRowModel().rows.forEach(a=>{qg(i,a.id,n,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=ze(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,r)=>Object.keys(t).length?zg(e,r):{rows:[],flatRows:[],rowsById:{}},Ke(e.options,\"debugTable\",\"getSelectedRowModel\")),e.getFilteredSelectedRowModel=ze(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,r)=>Object.keys(t).length?zg(e,r):{rows:[],flatRows:[],rowsById:{}},Ke(e.options,\"debugTable\",\"getFilteredSelectedRowModel\")),e.getGroupedSelectedRowModel=ze(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,r)=>Object.keys(t).length?zg(e,r):{rows:[],flatRows:[],rowsById:{}},Ke(e.options,\"debugTable\",\"getGroupedSelectedRowModel\")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:r}=e.getState(),n=!!(t.length&&Object.keys(r).length);return n&&t.some(i=>i.getCanSelect()&&!r[i.id])&&(n=!1),n},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:r}=e.getState(),n=!!t.length;return n&&t.some(i=>!r[i.id])&&(n=!1),n},e.getIsSomeRowsSelected=()=>{var t;let r=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return r>0&&r<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(r=>r.getCanSelect()).some(r=>r.getIsSelected()||r.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(r,n)=>{let i=e.getIsSelected();t.setRowSelection(a=>{var o;if(r=typeof r!=\"undefined\"?r:!i,e.getCanSelect()&&i===r)return a;let s={...a};return qg(s,e.id,r,(o=n==null?void 0:n.selectChildren)!=null?o:!0,t),s})},e.getIsSelected=()=>{let{rowSelection:r}=t.getState();return Xg(e,r)},e.getIsSomeSelected=()=>{let{rowSelection:r}=t.getState();return Gg(e,r)===\"some\"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:r}=t.getState();return Gg(e,r)===\"all\"},e.getCanSelect=()=>{var r;return typeof t.options.enableRowSelection==\"function\"?t.options.enableRowSelection(e):(r=t.options.enableRowSelection)!=null?r:!0},e.getCanSelectSubRows=()=>{var r;return typeof t.options.enableSubRowSelection==\"function\"?t.options.enableSubRowSelection(e):(r=t.options.enableSubRowSelection)!=null?r:!0},e.getCanMultiSelect=()=>{var r;return typeof t.options.enableMultiRowSelection==\"function\"?t.options.enableMultiRowSelection(e):(r=t.options.enableMultiRowSelection)!=null?r:!0},e.getToggleSelectedHandler=()=>{let r=e.getCanSelect();return n=>{var i;r&&e.toggleSelected((i=n.target)==null?void 0:i.checked)}}}},qg=(e,t,r,n,i)=>{var a;let o=i.getRow(t,!0);r?(o.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),o.getCanSelect()&&(e[t]=!0)):delete e[t],n&&(a=o.subRows)!=null&&a.length&&o.getCanSelectSubRows()&&o.subRows.forEach(s=>qg(e,s.id,r,n,i))};function zg(e,t){let r=e.getState().rowSelection,n=[],i={},a=function(o,s){return o.map(u=>{var l;let c=Xg(u,r);if(c&&(n.push(u),i[u.id]=u),(l=u.subRows)!=null&&l.length&&(u={...u,subRows:a(u.subRows)}),c)return u}).filter(Boolean)};return{rows:a(t.rows),flatRows:n,rowsById:i}}function Xg(e,t){var r;return(r=t[e.id])!=null?r:!1}function Gg(e,t,r){var n;if(!((n=e.subRows)!=null&&n.length))return!1;let i=!0,a=!1;return e.subRows.forEach(o=>{if(!(a&&!i)&&(o.getCanSelect()&&(Xg(o,t)?a=!0:i=!1),o.subRows&&o.subRows.length)){let s=Gg(o,t);s===\"all\"?a=!0:(s===\"some\"&&(a=!0),i=!1)}}),i?\"all\":a?\"some\":!1}var Jg=/([0-9]+)/gm,uH=(e,t,r)=>rC(La(e.getValue(r)).toLowerCase(),La(t.getValue(r)).toLowerCase()),cH=(e,t,r)=>rC(La(e.getValue(r)),La(t.getValue(r))),dH=(e,t,r)=>ey(La(e.getValue(r)).toLowerCase(),La(t.getValue(r)).toLowerCase()),fH=(e,t,r)=>ey(La(e.getValue(r)),La(t.getValue(r))),hH=(e,t,r)=>{let n=e.getValue(r),i=t.getValue(r);return n>i?1:n<i?-1:0},mH=(e,t,r)=>ey(e.getValue(r),t.getValue(r));function ey(e,t){return e===t?0:e>t?1:-1}function La(e){return typeof e==\"number\"?isNaN(e)||e===1/0||e===-1/0?\"\":String(e):typeof e==\"string\"?e:\"\"}function rC(e,t){let r=e.split(Jg).filter(Boolean),n=t.split(Jg).filter(Boolean);for(;r.length&&n.length;){let i=r.shift(),a=n.shift(),o=parseInt(i,10),s=parseInt(a,10),u=[o,s].sort();if(isNaN(u[0])){if(i>a)return 1;if(a>i)return-1;continue}if(isNaN(u[1]))return isNaN(o)?-1:1;if(o>s)return 1;if(s>o)return-1}return r.length-n.length}var Kl={alphanumeric:uH,alphanumericCaseSensitive:cH,text:dH,textCaseSensitive:fH,datetime:hH,basic:mH},pH={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:\"auto\",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Pr(\"sorting\",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let r=t.getFilteredRowModel().flatRows.slice(10),n=!1;for(let i of r){let a=i==null?void 0:i.getValue(e.id);if(Object.prototype.toString.call(a)===\"[object Date]\")return Kl.datetime;if(typeof a==\"string\"&&(n=!0,a.split(Jg).length>1))return Kl.alphanumeric}return n?Kl.text:Kl.basic},e.getAutoSortDir=()=>{let r=t.getFilteredRowModel().flatRows[0];return typeof(r==null?void 0:r.getValue(e.id))==\"string\"?\"asc\":\"desc\"},e.getSortingFn=()=>{var r,n;if(!e)throw new Error;return Kd(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn===\"auto\"?e.getAutoSortingFn():(r=(n=t.options.sortingFns)==null?void 0:n[e.columnDef.sortingFn])!=null?r:Kl[e.columnDef.sortingFn]},e.toggleSorting=(r,n)=>{let i=e.getNextSortingOrder(),a=typeof r!=\"undefined\"&&r!==null;t.setSorting(o=>{let s=o==null?void 0:o.find(h=>h.id===e.id),u=o==null?void 0:o.findIndex(h=>h.id===e.id),l=[],c,d=a?r:i===\"desc\";if(o!=null&&o.length&&e.getCanMultiSort()&&n?s?c=\"toggle\":c=\"add\":o!=null&&o.length&&u!==o.length-1?c=\"replace\":s?c=\"toggle\":c=\"replace\",c===\"toggle\"&&(a||i||(c=\"remove\")),c===\"add\"){var m;l=[...o,{id:e.id,desc:d}],l.splice(0,l.length-((m=t.options.maxMultiSortColCount)!=null?m:Number.MAX_SAFE_INTEGER))}else c===\"toggle\"?l=o.map(h=>h.id===e.id?{...h,desc:d}:h):c===\"remove\"?l=o.filter(h=>h.id!==e.id):l=[{id:e.id,desc:d}];return l})},e.getFirstSortDir=()=>{var r,n;return((r=(n=e.columnDef.sortDescFirst)!=null?n:t.options.sortDescFirst)!=null?r:e.getAutoSortDir()===\"desc\")?\"desc\":\"asc\"},e.getNextSortingOrder=r=>{var n,i;let a=e.getFirstSortDir(),o=e.getIsSorted();return o?o!==a&&((n=t.options.enableSortingRemoval)==null||n)&&(!(r&&(i=t.options.enableMultiRemove)!=null)||i)?!1:o===\"desc\"?\"asc\":\"desc\":a},e.getCanSort=()=>{var r,n;return((r=e.columnDef.enableSorting)!=null?r:!0)&&((n=t.options.enableSorting)!=null?n:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var r,n;return(r=(n=e.columnDef.enableMultiSort)!=null?n:t.options.enableMultiSort)!=null?r:!!e.accessorFn},e.getIsSorted=()=>{var r;let n=(r=t.getState().sorting)==null?void 0:r.find(i=>i.id===e.id);return n?n.desc?\"desc\":\"asc\":!1},e.getSortIndex=()=>{var r,n;return(r=(n=t.getState().sorting)==null?void 0:n.findIndex(i=>i.id===e.id))!=null?r:-1},e.clearSorting=()=>{t.setSorting(r=>r!=null&&r.length?r.filter(n=>n.id!==e.id):[])},e.getToggleSortingHandler=()=>{let r=e.getCanSort();return n=>{r&&(n.persist==null||n.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(n):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var r,n;e.setSorting(t?[]:(r=(n=e.initialState)==null?void 0:n.sorting)!=null?r:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},gH=[HR,nH,QR,XR,BR,VR,rH,iH,pH,JR,aH,oH,sH,lH,eH];function iC(e){var t,r;let n=[...gH,...(t=e._features)!=null?t:[]],i={_features:n},a=i._features.reduce((m,h)=>Object.assign(m,h.getDefaultOptions==null?void 0:h.getDefaultOptions(i)),{}),o=m=>i.options.mergeOptions?i.options.mergeOptions(a,m):{...a,...m},u={...{},...(r=e.initialState)!=null?r:{}};i._features.forEach(m=>{var h;u=(h=m.getInitialState==null?void 0:m.getInitialState(u))!=null?h:u});let l=[],c=!1,d={_features:n,options:{...a,...e},initialState:u,_queue:m=>{l.push(m),c||(c=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();c=!1}).catch(h=>activeWindow.setTimeout(()=>{throw h})))},reset:()=>{i.setState(i.initialState)},setOptions:m=>{let h=Oa(m,i.options);i.options=o(h)},getState:()=>i.options.state,setState:m=>{i.options.onStateChange==null||i.options.onStateChange(m)},_getRowId:(m,h,g)=>{var y;return(y=i.options.getRowId==null?void 0:i.options.getRowId(m,h,g))!=null?y:`${g?[g.id,h].join(\".\"):h}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(m,h)=>{let g=(h?i.getPrePaginationRowModel():i.getRowModel()).rowsById[m];if(!g&&(g=i.getCoreRowModel().rowsById[m],!g))throw new Error;return g},_getDefaultColumnDef:ze(()=>[i.options.defaultColumn],m=>{var h;return m=(h=m)!=null?h:{},{header:g=>{let y=g.header.column.columnDef;return y.accessorKey?y.accessorKey:y.accessorFn?y.id:null},cell:g=>{var y,v;return(y=(v=g.renderValue())==null||v.toString==null?void 0:v.toString())!=null?y:null},...i._features.reduce((g,y)=>Object.assign(g,y.getDefaultColumnDef==null?void 0:y.getDefaultColumnDef()),{}),...m}},Ke(e,\"debugColumns\",\"_getDefaultColumnDef\")),_getColumnDefs:()=>i.options.columns,getAllColumns:ze(()=>[i._getColumnDefs()],m=>{let h=function(g,y,v){return v===void 0&&(v=0),g.map(D=>{let I=RR(i,D,v,y),C=D;return I.columns=C.columns?h(C.columns,I,v+1):[],I})};return h(m)},Ke(e,\"debugColumns\",\"getAllColumns\")),getAllFlatColumns:ze(()=>[i.getAllColumns()],m=>m.flatMap(h=>h.getFlatColumns()),Ke(e,\"debugColumns\",\"getAllFlatColumns\")),_getAllFlatColumnsById:ze(()=>[i.getAllFlatColumns()],m=>m.reduce((h,g)=>(h[g.id]=g,h),{}),Ke(e,\"debugColumns\",\"getAllFlatColumnsById\")),getAllLeafColumns:ze(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(m,h)=>{let g=m.flatMap(y=>y.getLeafColumns());return h(g)},Ke(e,\"debugColumns\",\"getAllLeafColumns\")),getColumn:m=>i._getAllFlatColumnsById()[m]};Object.assign(i,d);for(let m=0;m<i._features.length;m++){let h=i._features[m];h==null||h.createTable==null||h.createTable(i)}return i}function aC(){return e=>ze(()=>[e.options.data],t=>{let r={rows:[],flatRows:[],rowsById:{}},n=function(i,a,o){a===void 0&&(a=0);let s=[];for(let l=0;l<i.length;l++){let c=Zg(e,e._getRowId(i[l],l,o),i[l],l,a,void 0,o==null?void 0:o.id);if(r.flatRows.push(c),r.rowsById[c.id]=c,s.push(c),e.options.getSubRows){var u;c.originalSubRows=e.options.getSubRows(i[l],l),(u=c.originalSubRows)!=null&&u.length&&(c.subRows=n(c.originalSubRows,a+1,c))}}return s};return r.rows=n(t),r},Ke(e.options,\"debugTable\",\"getRowModel\",()=>e._autoResetPageIndex()))}function yH(e,t,r){return r.options.filterFromLeafRows?vH(e,t,r):wH(e,t,r)}function vH(e,t,r){var n;let i=[],a={},o=(n=r.options.maxLeafRowFilterDepth)!=null?n:100,s=function(u,l){l===void 0&&(l=0);let c=[];for(let m=0;m<u.length;m++){var d;let h=u[m],g=Zg(r,h.id,h.original,h.index,h.depth,void 0,h.parentId);if(g.columnFilters=h.columnFilters,(d=h.subRows)!=null&&d.length&&l<o){if(g.subRows=s(h.subRows,l+1),h=g,t(h)&&!g.subRows.length){c.push(h),a[h.id]=h,i.push(h);continue}if(t(h)||g.subRows.length){c.push(h),a[h.id]=h,i.push(h);continue}}else h=g,t(h)&&(c.push(h),a[h.id]=h,i.push(h))}return c};return{rows:s(e),flatRows:i,rowsById:a}}function wH(e,t,r){var n;let i=[],a={},o=(n=r.options.maxLeafRowFilterDepth)!=null?n:100,s=function(u,l){l===void 0&&(l=0);let c=[];for(let m=0;m<u.length;m++){let h=u[m];if(t(h)){var d;if((d=h.subRows)!=null&&d.length&&l<o){let y=Zg(r,h.id,h.original,h.index,h.depth,void 0,h.parentId);y.subRows=s(h.subRows,l+1),h=y}c.push(h),i.push(h),a[h.id]=h}}return c};return{rows:s(e),flatRows:i,rowsById:a}}function oC(){return e=>ze(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,r,n)=>{if(!t.rows.length||!(r!=null&&r.length)&&!n){for(let m=0;m<t.flatRows.length;m++)t.flatRows[m].columnFilters={},t.flatRows[m].columnFiltersMeta={};return t}let i=[],a=[];(r!=null?r:[]).forEach(m=>{var h;let g=e.getColumn(m.id);if(!g)return;let y=g.getFilterFn();y&&i.push({id:m.id,filterFn:y,resolvedValue:(h=y.resolveFilterValue==null?void 0:y.resolveFilterValue(m.value))!=null?h:m.value})});let o=r.map(m=>m.id),s=e.getGlobalFilterFn(),u=e.getAllLeafColumns().filter(m=>m.getCanGlobalFilter());n&&s&&u.length&&(o.push(\"__global__\"),u.forEach(m=>{var h;a.push({id:m.id,filterFn:s,resolvedValue:(h=s.resolveFilterValue==null?void 0:s.resolveFilterValue(n))!=null?h:n})}));let l,c;for(let m=0;m<t.flatRows.length;m++){let h=t.flatRows[m];if(h.columnFilters={},i.length)for(let g=0;g<i.length;g++){l=i[g];let y=l.id;h.columnFilters[y]=l.filterFn(h,y,l.resolvedValue,v=>{h.columnFiltersMeta[y]=v})}if(a.length){for(let g=0;g<a.length;g++){c=a[g];let y=c.id;if(c.filterFn(h,y,c.resolvedValue,v=>{h.columnFiltersMeta[y]=v})){h.columnFilters.__global__=!0;break}}h.columnFilters.__global__!==!0&&(h.columnFilters.__global__=!1)}}let d=m=>{for(let h=0;h<o.length;h++)if(m.columnFilters[o[h]]===!1)return!1;return!0};return yH(t.rows,d,e)},Ke(e.options,\"debugTable\",\"getFilteredRowModel\",()=>e._autoResetPageIndex()))}function sC(){return e=>ze(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,r)=>{if(!r.rows.length||!(t!=null&&t.length))return r;let n=e.getState().sorting,i=[],a=n.filter(u=>{var l;return(l=e.getColumn(u.id))==null?void 0:l.getCanSort()}),o={};a.forEach(u=>{let l=e.getColumn(u.id);l&&(o[u.id]={sortUndefined:l.columnDef.sortUndefined,invertSorting:l.columnDef.invertSorting,sortingFn:l.getSortingFn()})});let s=u=>{let l=u.map(c=>({...c}));return l.sort((c,d)=>{for(let h=0;h<a.length;h+=1){var m;let g=a[h],y=o[g.id],v=y.sortUndefined,D=(m=g==null?void 0:g.desc)!=null?m:!1,I=0;if(v){let C=c.getValue(g.id),x=d.getValue(g.id),O=C===void 0,A=x===void 0;if(O||A){if(v===\"first\")return O?-1:1;if(v===\"last\")return O?1:-1;I=O&&A?0:O?v:-v}}if(I===0&&(I=y.sortingFn(c,d,g.id)),I!==0)return D&&(I*=-1),y.invertSorting&&(I*=-1),I}return c.index-d.index}),l.forEach(c=>{var d;i.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=s(c.subRows))}),l};return{rows:s(r.rows),flatRows:i,rowsById:r.rowsById}},Ke(e.options,\"debugTable\",\"getSortedRowModel\",()=>e._autoResetPageIndex()))}function ty(e,t){return e?bH(e)?xr(e,t):e:null}function bH(e){return DH(e)||typeof e==\"function\"||SH(e)}function DH(e){return typeof e==\"function\"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function SH(e){return typeof e==\"object\"&&typeof e.$$typeof==\"symbol\"&&[\"react.memo\",\"react.forward_ref\"].includes(e.$$typeof.description)}function lC(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=Ne(()=>({current:iC(t)})),[n,i]=Ne(()=>r.current.initialState);return r.current.setOptions(a=>({...a,...e,state:{...n,...e.state},onStateChange:o=>{i(o),e.onStateChange==null||e.onStateChange(o)}})),r.current}var EC=Ct(ln());var fC={\\u00C0:\"A\",\\u00C1:\"A\",\\u00C2:\"A\",\\u00C3:\"A\",\\u00C4:\"A\",\\u00C5:\"A\",\\u1EA4:\"A\",\\u1EAE:\"A\",\\u1EB2:\"A\",\\u1EB4:\"A\",\\u1EB6:\"A\",\\u00C6:\"AE\",\\u1EA6:\"A\",\\u1EB0:\"A\",\\u0202:\"A\",\\u00C7:\"C\",\\u1E08:\"C\",\\u00C8:\"E\",\\u00C9:\"E\",\\u00CA:\"E\",\\u00CB:\"E\",\\u1EBE:\"E\",\\u1E16:\"E\",\\u1EC0:\"E\",\\u1E14:\"E\",\\u1E1C:\"E\",\\u0206:\"E\",\\u00CC:\"I\",\\u00CD:\"I\",\\u00CE:\"I\",\\u00CF:\"I\",\\u1E2E:\"I\",\\u020A:\"I\",\\u00D0:\"D\",\\u00D1:\"N\",\\u00D2:\"O\",\\u00D3:\"O\",\\u00D4:\"O\",\\u00D5:\"O\",\\u00D6:\"O\",\\u00D8:\"O\",\\u1ED0:\"O\",\\u1E4C:\"O\",\\u1E52:\"O\",\\u020E:\"O\",\\u00D9:\"U\",\\u00DA:\"U\",\\u00DB:\"U\",\\u00DC:\"U\",\\u00DD:\"Y\",\\u00E0:\"a\",\\u00E1:\"a\",\\u00E2:\"a\",\\u00E3:\"a\",\\u00E4:\"a\",\\u00E5:\"a\",\\u1EA5:\"a\",\\u1EAF:\"a\",\\u1EB3:\"a\",\\u1EB5:\"a\",\\u1EB7:\"a\",\\u00E6:\"ae\",\\u1EA7:\"a\",\\u1EB1:\"a\",\\u0203:\"a\",\\u00E7:\"c\",\\u1E09:\"c\",\\u00E8:\"e\",\\u00E9:\"e\",\\u00EA:\"e\",\\u00EB:\"e\",\\u1EBF:\"e\",\\u1E17:\"e\",\\u1EC1:\"e\",\\u1E15:\"e\",\\u1E1D:\"e\",\\u0207:\"e\",\\u00EC:\"i\",\\u00ED:\"i\",\\u00EE:\"i\",\\u00EF:\"i\",\\u1E2F:\"i\",\\u020B:\"i\",\\u00F0:\"d\",\\u00F1:\"n\",\\u00F2:\"o\",\\u00F3:\"o\",\\u00F4:\"o\",\\u00F5:\"o\",\\u00F6:\"o\",\\u00F8:\"o\",\\u1ED1:\"o\",\\u1E4D:\"o\",\\u1E53:\"o\",\\u020F:\"o\",\\u00F9:\"u\",\\u00FA:\"u\",\\u00FB:\"u\",\\u00FC:\"u\",\\u00FD:\"y\",\\u00FF:\"y\",\\u0100:\"A\",\\u0101:\"a\",\\u0102:\"A\",\\u0103:\"a\",\\u0104:\"A\",\\u0105:\"a\",\\u0106:\"C\",\\u0107:\"c\",\\u0108:\"C\",\\u0109:\"c\",\\u010A:\"C\",\\u010B:\"c\",\\u010C:\"C\",\\u010D:\"c\",C\\u0306:\"C\",c\\u0306:\"c\",\\u010E:\"D\",\\u010F:\"d\",\\u0110:\"D\",\\u0111:\"d\",\\u0112:\"E\",\\u0113:\"e\",\\u0114:\"E\",\\u0115:\"e\",\\u0116:\"E\",\\u0117:\"e\",\\u0118:\"E\",\\u0119:\"e\",\\u011A:\"E\",\\u011B:\"e\",\\u011C:\"G\",\\u01F4:\"G\",\\u011D:\"g\",\\u01F5:\"g\",\\u011E:\"G\",\\u011F:\"g\",\\u0120:\"G\",\\u0121:\"g\",\\u0122:\"G\",\\u0123:\"g\",\\u0124:\"H\",\\u0125:\"h\",\\u0126:\"H\",\\u0127:\"h\",\\u1E2A:\"H\",\\u1E2B:\"h\",\\u0128:\"I\",\\u0129:\"i\",\\u012A:\"I\",\\u012B:\"i\",\\u012C:\"I\",\\u012D:\"i\",\\u012E:\"I\",\\u012F:\"i\",\\u0130:\"I\",\\u0131:\"i\",\\u0132:\"IJ\",\\u0133:\"ij\",\\u0134:\"J\",\\u0135:\"j\",\\u0136:\"K\",\\u0137:\"k\",\\u1E30:\"K\",\\u1E31:\"k\",K\\u0306:\"K\",k\\u0306:\"k\",\\u0139:\"L\",\\u013A:\"l\",\\u013B:\"L\",\\u013C:\"l\",\\u013D:\"L\",\\u013E:\"l\",\\u013F:\"L\",\\u0140:\"l\",\\u0141:\"l\",\\u0142:\"l\",\\u1E3E:\"M\",\\u1E3F:\"m\",M\\u0306:\"M\",m\\u0306:\"m\",\\u0143:\"N\",\\u0144:\"n\",\\u0145:\"N\",\\u0146:\"n\",\\u0147:\"N\",\\u0148:\"n\",\\u0149:\"n\",N\\u0306:\"N\",n\\u0306:\"n\",\\u014C:\"O\",\\u014D:\"o\",\\u014E:\"O\",\\u014F:\"o\",\\u0150:\"O\",\\u0151:\"o\",\\u0152:\"OE\",\\u0153:\"oe\",P\\u0306:\"P\",p\\u0306:\"p\",\\u0154:\"R\",\\u0155:\"r\",\\u0156:\"R\",\\u0157:\"r\",\\u0158:\"R\",\\u0159:\"r\",R\\u0306:\"R\",r\\u0306:\"r\",\\u0212:\"R\",\\u0213:\"r\",\\u015A:\"S\",\\u015B:\"s\",\\u015C:\"S\",\\u015D:\"s\",\\u015E:\"S\",\\u0218:\"S\",\\u0219:\"s\",\\u015F:\"s\",\\u0160:\"S\",\\u0161:\"s\",\\u0162:\"T\",\\u0163:\"t\",\\u021B:\"t\",\\u021A:\"T\",\\u0164:\"T\",\\u0165:\"t\",\\u0166:\"T\",\\u0167:\"t\",T\\u0306:\"T\",t\\u0306:\"t\",\\u0168:\"U\",\\u0169:\"u\",\\u016A:\"U\",\\u016B:\"u\",\\u016C:\"U\",\\u016D:\"u\",\\u016E:\"U\",\\u016F:\"u\",\\u0170:\"U\",\\u0171:\"u\",\\u0172:\"U\",\\u0173:\"u\",\\u0216:\"U\",\\u0217:\"u\",V\\u0306:\"V\",v\\u0306:\"v\",\\u0174:\"W\",\\u0175:\"w\",\\u1E82:\"W\",\\u1E83:\"w\",X\\u0306:\"X\",x\\u0306:\"x\",\\u0176:\"Y\",\\u0177:\"y\",\\u0178:\"Y\",Y\\u0306:\"Y\",y\\u0306:\"y\",\\u0179:\"Z\",\\u017A:\"z\",\\u017B:\"Z\",\\u017C:\"z\",\\u017D:\"Z\",\\u017E:\"z\",\\u017F:\"s\",\\u0192:\"f\",\\u01A0:\"O\",\\u01A1:\"o\",\\u01AF:\"U\",\\u01B0:\"u\",\\u01CD:\"A\",\\u01CE:\"a\",\\u01CF:\"I\",\\u01D0:\"i\",\\u01D1:\"O\",\\u01D2:\"o\",\\u01D3:\"U\",\\u01D4:\"u\",\\u01D5:\"U\",\\u01D6:\"u\",\\u01D7:\"U\",\\u01D8:\"u\",\\u01D9:\"U\",\\u01DA:\"u\",\\u01DB:\"U\",\\u01DC:\"u\",\\u1EE8:\"U\",\\u1EE9:\"u\",\\u1E78:\"U\",\\u1E79:\"u\",\\u01FA:\"A\",\\u01FB:\"a\",\\u01FC:\"AE\",\\u01FD:\"ae\",\\u01FE:\"O\",\\u01FF:\"o\",\\u00DE:\"TH\",\\u00FE:\"th\",\\u1E54:\"P\",\\u1E55:\"p\",\\u1E64:\"S\",\\u1E65:\"s\",X\\u0301:\"X\",x\\u0301:\"x\",\\u0403:\"\\u0413\",\\u0453:\"\\u0433\",\\u040C:\"\\u041A\",\\u045C:\"\\u043A\",A\\u030B:\"A\",a\\u030B:\"a\",E\\u030B:\"E\",e\\u030B:\"e\",I\\u030B:\"I\",i\\u030B:\"i\",\\u01F8:\"N\",\\u01F9:\"n\",\\u1ED2:\"O\",\\u1ED3:\"o\",\\u1E50:\"O\",\\u1E51:\"o\",\\u1EEA:\"U\",\\u1EEB:\"u\",\\u1E80:\"W\",\\u1E81:\"w\",\\u1EF2:\"Y\",\\u1EF3:\"y\",\\u0200:\"A\",\\u0201:\"a\",\\u0204:\"E\",\\u0205:\"e\",\\u0208:\"I\",\\u0209:\"i\",\\u020C:\"O\",\\u020D:\"o\",\\u0210:\"R\",\\u0211:\"r\",\\u0214:\"U\",\\u0215:\"u\",B\\u030C:\"B\",b\\u030C:\"b\",\\u010C\\u0323:\"C\",\\u010D\\u0323:\"c\",\\u00CA\\u030C:\"E\",\\u00EA\\u030C:\"e\",F\\u030C:\"F\",f\\u030C:\"f\",\\u01E6:\"G\",\\u01E7:\"g\",\\u021E:\"H\",\\u021F:\"h\",J\\u030C:\"J\",\\u01F0:\"j\",\\u01E8:\"K\",\\u01E9:\"k\",M\\u030C:\"M\",m\\u030C:\"m\",P\\u030C:\"P\",p\\u030C:\"p\",Q\\u030C:\"Q\",q\\u030C:\"q\",\\u0158\\u0329:\"R\",\\u0159\\u0329:\"r\",\\u1E66:\"S\",\\u1E67:\"s\",V\\u030C:\"V\",v\\u030C:\"v\",W\\u030C:\"W\",w\\u030C:\"w\",X\\u030C:\"X\",x\\u030C:\"x\",Y\\u030C:\"Y\",y\\u030C:\"y\",A\\u0327:\"A\",a\\u0327:\"a\",B\\u0327:\"B\",b\\u0327:\"b\",\\u1E10:\"D\",\\u1E11:\"d\",\\u0228:\"E\",\\u0229:\"e\",\\u0190\\u0327:\"E\",\\u025B\\u0327:\"e\",\\u1E28:\"H\",\\u1E29:\"h\",I\\u0327:\"I\",i\\u0327:\"i\",\\u0197\\u0327:\"I\",\\u0268\\u0327:\"i\",M\\u0327:\"M\",m\\u0327:\"m\",O\\u0327:\"O\",o\\u0327:\"o\",Q\\u0327:\"Q\",q\\u0327:\"q\",U\\u0327:\"U\",u\\u0327:\"u\",X\\u0327:\"X\",x\\u0327:\"x\",Z\\u0327:\"Z\",z\\u0327:\"z\"},EH=Object.keys(fC).join(\"|\"),kH=new RegExp(EH,\"g\");function xH(e){return e.replace(kH,t=>fC[t])}var rr={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function hC(e,t,r){var n;if(r=r||{},r.threshold=(n=r.threshold)!=null?n:rr.MATCHES,!r.accessors){let o=uC(e,t,r);return{rankedValue:e,rank:o,accessorIndex:-1,accessorThreshold:r.threshold,passed:o>=r.threshold}}let i=TH(e,r.accessors),a={rankedValue:e,rank:rr.NO_MATCH,accessorIndex:-1,accessorThreshold:r.threshold,passed:!1};for(let o=0;o<i.length;o++){let s=i[o],u=uC(s.itemValue,t,r),{minRanking:l,maxRanking:c,threshold:d=r.threshold}=s.attributes;u<l&&u>=rr.MATCHES?u=l:u>c&&(u=c),u=Math.min(u,c),u>=d&&u>a.rank&&(a.rank=u,a.passed=!0,a.accessorIndex=o,a.accessorThreshold=d,a.rankedValue=s.itemValue)}return a}function uC(e,t,r){return e=cC(e,r),t=cC(t,r),t.length>e.length?rr.NO_MATCH:e===t?rr.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?rr.EQUAL:e.startsWith(t)?rr.STARTS_WITH:e.includes(` ${t}`)?rr.WORD_STARTS_WITH:e.includes(t)?rr.CONTAINS:t.length===1?rr.NO_MATCH:CH(e).includes(t)?rr.ACRONYM:_H(e,t))}function CH(e){let t=\"\";return e.split(\" \").forEach(n=>{n.split(\"-\").forEach(a=>{t+=a.substr(0,1)})}),t}function _H(e,t){let r=0,n=0;function i(u,l,c){for(let d=c,m=l.length;d<m;d++)if(l[d]===u)return r+=1,d+1;return-1}function a(u){let l=1/u,c=r/t.length;return rr.MATCHES+c*l}let o=i(t[0],e,0);if(o<0)return rr.NO_MATCH;n=o;for(let u=1,l=t.length;u<l;u++){let c=t[u];if(n=i(c,e,n),!(n>-1))return rr.NO_MATCH}let s=n-o;return a(s)}function mC(e,t){return e.rank===t.rank?0:e.rank>t.rank?-1:1}function cC(e,t){let{keepDiacritics:r}=t;return e=`${e}`,r||(e=xH(e)),e}function MH(e,t){let r=t;typeof t==\"object\"&&(r=t.accessor);let n=r(e);return n==null?[]:Array.isArray(n)?n:[String(n)]}function TH(e,t){let r=[];for(let n=0,i=t.length;n<i;n++){let a=t[n],o=FH(a),s=MH(e,a);for(let u=0,l=s.length;u<l;u++)r.push({itemValue:s[u],attributes:o})}return r}var dC={maxRanking:1/0,minRanking:-1/0};function FH(e){return typeof e==\"function\"?dC:{...dC,...e}}var yC=require(\"obsidian\");var ny=Ct(gC());var vC=zt(function({item:t,hideDateDisplay:r,shouldShowRelativeDate:n}){let{stateManager:i,filePath:a}=Ee(tt),{onEditDate:o,onEditTime:s}=ug(t.item,t.path),u=fa(i);return E(ct,{children:[n?E(rd,{item:t.item,stateManager:i}):null,r?null:E(id,{item:t.item,stateManager:i,filePath:a!=null?a:\"\",onEditDate:o,onEditTime:s,getDateColor:u})]})}),wC=zt(function({item:t,lane:r,path:n}){let{stateManager:i,boardModifiers:a}=Ee(tt),o=Ee(zn),[s,u]=Ne(null),l=!!r.data.shouldMarkItemsComplete,c=gd({boardModifiers:a,item:t,setEditState:u,stateManager:i,path:n}),d=Ye(h=>{kn(s)||h.targetNode.instanceOf(HTMLAnchorElement)&&(h.targetNode.hasClass(\"internal-link\")||h.targetNode.hasClass(\"external-link\"))||c(h)},[c,s]),m=Ye(h=>{u({x:h.clientX,y:h.clientY})},[]);return E(Uu.Provider,{value:n,children:E(\"div\",{onContextMenu:d,onDblClick:m,className:$(\"item-content-wrapper\"),children:E(\"div\",{className:$(\"item-title-wrapper\"),children:[E(md,{boardModifiers:a,item:t,path:n,shouldMarkItemsComplete:l,stateManager:i}),E(ad,{editState:s,item:t,setEditState:u,showMetadata:!1,searchQuery:o==null?void 0:o.query,isStatic:!1})]})})})},(e,t)=>e.lane.data.shouldMarkItemsComplete===t.lane.data.shouldMarkItemsComplete&&(0,ny.default)(e.item,t.item)&&(0,ny.default)(e.path,t.path)),bC=zt(function({lane:t,path:r}){let{stateManager:n}=Ee(tt),i=Ee(zn);return E(\"div\",{className:$(\"cell-flex-wrapper\"),children:[E(Sa,{searchQuery:i==null?void 0:i.query,markdownString:t.data.title}),E(\"div\",{onClick:a=>{let o=new yC.Menu,s=n.state.children;for(let u=0,l=s.length;u<l;u++){let c=s[u];o.addItem(d=>d.setChecked(t===c).setTitle(c.data.title).onClick(()=>{t!==c&&n.setState(m=>{let h=m.children[u];return Ri(m,r,[u,h.children.length])})}))}o.showAtMouseEvent(a)},className:Ge([\"clickable-icon\",$(\"icon-wrapper\"),$(\"lane-menu\")]),children:E(Ut,{name:\"lucide-square-kanban\"})})]})});var xs=qx(),DC=(e,t,r,n)=>{let i=e.getValue(t);if(i===null)return!1;let a=e.original.stateManager,o=i.value?In(i.value,a):In(i,a),s=hC(o,r,{threshold:rr.CONTAINS});return n({itemRank:s}),s.passed},Cs=(e,t,r)=>{var n,i;return!e.columnFiltersMeta[r]&&!t.columnFiltersMeta[r]?null:e.columnFiltersMeta[r]?t.columnFiltersMeta[r]?mC((n=e.columnFiltersMeta[r])==null?void 0:n.itemRank,(i=t.columnFiltersMeta[r])==null?void 0:i.itemRank):1:-1};function PH(e,t){return Re(()=>{var c;let r=[],n=new Set,i=new Set,a=new Set,o=new Map,s=(e==null?void 0:e.children)||[],u=t.getSetting(\"metadata-keys\"),l=t.getSetting(\"inline-metadata-position\")!==\"body\";for(let d=0,m=s.length;d<m;d++){let h=s[d];for(let g=0,y=h.children.length;g<y;g++){let v=h.children[g],D=v.data.metadata,I=D.fileMetadata||{},C=D.fileMetadataOrder||[],x=D.inlineMetadata;!n.has(\"date\")&&D.date&&n.add(\"date\"),!n.has(\"tags\")&&((c=D.tags)!=null&&c.length)&&n.add(\"tags\");for(let O of C)!i.has(O)&&I[O]&&(i.add(O),o.set(O,I[O].label||O));x&&l&&x.forEach(O=>{if(!a.has(O.key)&&(a.add(O.key),!o.has(O.key)))if(yi.has(O.key))o.set(O.key,No(O.key));else{let A=u.find(P=>P.metadataKey===O.key);o.set(O.key,(A==null?void 0:A.label)||O.key)}}),r.push({item:v,lane:h,path:[d,g],stateManager:t})}}return{items:r,metadataLabels:o,metadata:Array.from(n),fileMetadata:Array.from(i),inlineMetadata:Array.from(a)}},[e])}var NH=e=>[xs.accessor(t=>t.item.data.title,{id:\"card\",cell:t=>{let{lane:r,item:n,path:i}=t.row.original;return E(wC,{item:n,lane:r,path:i})},header:()=>R(\"Card\"),sortingFn:(t,r,n)=>{let i=Cs(t,r,n);return i===null?fr(t.getValue(n),r.getValue(n)):i},size:e.card||272}),xs.accessor(t=>t.lane.data.title,{id:\"lane\",cell:t=>{let{lane:r,path:n}=t.row.original;return E(bC,{lane:r,path:n})},header:()=>R(\"List\"),sortingFn:(t,r,n)=>{let i=Cs(t,r,n);return i===null?fr(t.getValue(n),r.getValue(n)):i},size:e.lane})];function SC(e,t){let r=Ee(zn),[n,i]=Ne([]),a=t.useSetting(\"show-relative-date\"),o=t.useSetting(\"move-dates\"),s=t.useSetting(\"move-tags\"),u=t.useSetting(\"inline-metadata-position\")!==\"body\",l=t.useSetting(\"move-task-metadata\"),c=t.useSetting(\"table-sizing\")||{},d=Fe(!1),m=Ye(A=>{i(P=>{let B=A(P);return B.length&&(d.current=B[0].desc),B})},[i]),h=Re(()=>({sorting:n,globalFilter:r==null?void 0:r.query}),[n,r==null?void 0:r.query]),{items:g,metadata:y,fileMetadata:v,inlineMetadata:D,metadataLabels:I}=PH(e,t),C=Re(()=>{let A=[...NH(c)];for(let P of y)switch(P){case\"date\":(a||o)&&A.push(xs.accessor(B=>{var G;return((G=B.item.data.metadata)==null?void 0:G.date)||null},{header:()=>R(\"Date\"),id:\"date\",size:c.date,cell:B=>B.getValue()?E(vC,{item:B.row.original,shouldShowRelativeDate:a,hideDateDisplay:!o}):null,sortUndefined:!1,sortingFn:(B,G,J)=>{let Q=Cs(B,G,J);if(Q===null){let oe=B.getValue(J),te=G.getValue(J);return!oe&&!te?0:oe?te?oe.valueOf()-te.valueOf():d.current?1:-1:d.current?-1:1}return Q},sortDescFirst:!1}));break;case\"tags\":s&&A.push(xs.accessor(B=>{var G;return((G=B.item.data.metadata)==null?void 0:G.tags)||null},{header:()=>R(\"Tags\"),id:\"card-tags\",size:c[\"card-tags\"],cell:B=>{let G=B.table.getState().globalFilter,J=B.getValue();return J!=null&&J.length?E(ps,{tags:J,searchQuery:G}):null},sortUndefined:!1,sortingFn:(B,G,J)=>{var oe,te;let Q=Cs(B,G,J);if(Q===null){let re=B.getValue(J),ne=G.getValue(J);if(!(re!=null&&re.length)&&!(ne!=null&&ne.length))return 0;if(!(re!=null&&re.length))return d.current?-1:1;if(!(ne!=null&&ne.length))return d.current?1:-1;let be=t.getSetting(\"tag-sort\"),pe=(oe=be==null?void 0:be.findIndex(Ce=>re.includes(Ce.tag)))!=null?oe:-1,De=(te=be==null?void 0:be.findIndex(Ce=>ne.includes(Ce.tag)))!=null?te:-1;return pe>-1&&De<0?-1:De>-1&&pe<0?1:pe>-1&&De>-1?pe-De:fr(re.join(\"\"),ne.join(\"\"))}return Q},sortDescFirst:!1}));break}return A},[a,o,s,...y]),x=Re(()=>{var P;let A=[...C];for(let B of D)A.push(xs.accessor(G=>{var Q;let J=(Q=G.item.data.metadata.inlineMetadata)==null?void 0:Q.find(oe=>oe.key===B);return J||null},{id:B,header:(P=I.get(B))!=null?P:B,cell:G=>{var be,pe,De;let J=G.getValue();if(!J)return null;let Q=yi.has(J.key);if(!l&&Q||!u&&!Q)return null;let oe=J.wrapping===\"emoji-shorthand\",te=(De=(pe=(be=il())==null?void 0:be.api)==null?void 0:pe.parse(J.value))!=null?De:J.value,re=oe&&J.key===\"priority\",ne=!!(te!=null&&te.ts);return E(\"span\",{className:Ge([$(\"item-task-inline-metadata-item\"),J.key.replace(/[^a-z0-9]/g,\"-\"),{\"is-task-metadata\":Q,\"is-emoji\":oe,\"is-date\":ne}]),children:!re&&E(\"span\",{className:$(\"item-task-inline-metadata-item-value\"),children:E(hs,{searchQuery:r==null?void 0:r.query,data:{value:te,label:\"\",metadataKey:J.key,shouldHideLabel:!1,containsMarkdown:!1}})})})},sortDescFirst:!1,sortingFn:(G,J,Q)=>{let oe=G.getValue(Q),te=J.getValue(Q);if(oe===null&&te===null)return 0;if(oe===null)return d.current?-1:1;if(te===null)return d.current?1:-1;let re=Cs(G,J,Q);return re===null?fr(In(oe.value,t),In(te.value,t)):re}}));return A},[C,...D,...I.values()]),O=Re(()=>{var P;let A=[...x];for(let B of v)A.push(xs.accessor(G=>{var Q;let J=(Q=G.item.data.metadata)==null?void 0:Q.fileMetadata;return J&&J[B]?J[B]:null},{id:B,header:(P=I.get(B))!=null?P:B,cell:G=>{let J=G.getValue();if(!J)return null;let Q=G.table.getState().globalFilter;return B===\"tags\"?E(ps,{searchQuery:Q,tags:J.value,alwaysShow:!0}):E(hs,{data:J,searchQuery:Q})},sortDescFirst:!1,sortingFn:(G,J,Q)=>{var ne,be;let oe=G.getValue(Q),te=J.getValue(Q);if(!(oe!=null&&oe.value)&&!(te!=null&&te.value))return 0;if(!(oe!=null&&oe.value))return d.current?-1:1;if(!(te!=null&&te.value))return d.current?1:-1;let re=Cs(G,J,Q);if(re===null){if(Q===\"tags\"){let pe=t.getSetting(\"tag-sort\"),De=(ne=pe==null?void 0:pe.findIndex(U=>oe.value.includes(U.tag)))!=null?ne:-1,Ce=(be=pe==null?void 0:pe.findIndex(U=>te.value.includes(U.tag)))!=null?be:-1;if(De>-1&&Ce<0)return-1;if(Ce>-1&&De<0)return 1;if(De>-1&&Ce>-1)return De-Ce}return fr(In(oe.value,t),In(te.value,t))}return re}}));return A},[x,...v,...I.values()]);return{data:g,columns:O,state:h,setSorting:m}}function RH(){let e=Fe(),t=Fe(),r=Fe(new WeakMap),n=Fe([]);Ae(()=>()=>{var o;(o=e.current)==null||o.disconnect(),r.current=null,n.current.length=0},[]);let i=o=>{if(!o||t.current===o)return;e.current&&e.current.disconnect();let s=getComputedStyle(o);e.current=new IntersectionObserver(u=>{u.forEach(l=>{if(!r.current.has(l.target))return;r.current.get(l.target)(l)})},{root:o,threshold:.01,rootMargin:`${s.paddingTop} 0px ${s.paddingBottom} 0px`}),t.current=o,n.current.forEach(u=>e.current.observe(u)),n.current.length=0},a=Re(()=>({registerHandler:(o,s)=>{if(o){if(r.current.set(o,s),!e.current){n.current.push(o);return}e.current.observe(o)}},unregisterHandler:o=>{var s,u,l;o&&((s=r.current)==null||s.delete(o),(u=n.current)!=null&&u.length&&(n.current=n.current.filter(c=>c!==o)),(l=e.current)==null||l.unobserve(o))}}),[]);return{bindObserver:i,context:a}}function kC({boardData:e,stateManager:t}){let{bindObserver:r,context:n}=RH(),{data:i,columns:a,state:o,setSorting:s}=SC(e,t),u=lC({data:i,columns:a,state:o,globalFilterFn:DC,getColumnCanGlobalFilter:()=>!0,enableColumnResizing:!0,columnResizeMode:\"onChange\",columnResizeDirection:t.app.vault.getConfig(\"rightToLeft\")?\"rtl\":\"ltr\",onSortingChange:s,getCoreRowModel:aC(),getSortedRowModel:sC(),getFilteredRowModel:oC()}),l=u.getState(),c=Fe(-1);Ae(()=>{if(c.current===-1){c.current=0;return}activeWindow.clearTimeout(c.current),c.current=activeWindow.setTimeout(()=>{t.getAView()&&t.setState(h=>(0,EC.default)(h,{data:{settings:{\"table-sizing\":{$set:l.columnSizing}}}}))},500)},[l.columnSizing]);let d=u.getCenterTotalSize(),m=Re(()=>({width:d}),[d]);return E(\"div\",{className:`markdown-rendered ${$(\"table-wrapper\")}`,ref:r,children:E(Lc.Provider,{value:n,children:E(\"table\",{style:m,children:[E(\"thead\",{children:u.getHeaderGroups().map(h=>E(\"tr\",{children:h.headers.map(g=>{let y=g.column.getIsSorted();return E(\"th\",{className:\"mod-has-icon\",children:E(\"div\",{className:$(\"table-cell-wrapper\"),style:{width:g.getSize()},children:[g.isPlaceholder?null:E(\"div\",{className:$(\"table-header\"),onClick:g.column.getToggleSortingHandler(),children:[E(\"div\",{children:ty(g.column.columnDef.header,g.getContext())}),E(\"div\",{className:$(\"table-header-sort\"),children:y===\"asc\"?E(Ut,{name:\"lucide-chevron-up\"}):y===\"desc\"?E(Ut,{name:\"lucide-chevron-down\"}):E(Ut,{name:\"lucide-chevrons-up-down\"})})]}),E(\"div\",{onDoubleClick:()=>g.column.resetSize(),onMouseDown:g.getResizeHandler(),onTouchStart:g.getResizeHandler(),className:`resizer ${u.options.columnResizeDirection} ${g.column.getIsResizing()?\"isResizing\":\"\"}`})]})},g.id)})},h.id))}),E(\"tbody\",{children:u.getRowModel().rows.map(h=>E(\"tr\",{children:h.getVisibleCells().map(g=>E(\"td\",{className:Ge({\"mod-has-icon\":g.column.id===\"lane\",\"mod-search-match\":h.columnFiltersMeta[g.column.id]?h.columnFiltersMeta[g.column.id].itemRank.passed:!1}),children:E(\"div\",{className:$(\"table-cell-wrapper\"),style:{width:g.column.getSize()},children:ty(g.column.columnDef.cell,g.getContext())})},g.id))},h.id))})]})})})}var HH=[ft.Item,ft.Lane],BH=[ft.Lane];function VH(e){let t=[];return Array.isArray(e.cssclass)?t.push(...e.cssclass):typeof e.cssclass==\"string\"&&t.push(e.cssclass),Array.isArray(e.cssclasses)?t.push(...e.cssclasses):typeof e.cssclasses==\"string\"&&t.push(e.cssclasses),t}var CC=({view:e,stateManager:t})=>{let r=t.useState(),n=lx(),i=Fe(null),a=Fe(null),[o,s]=Ne(\"\"),[u,l]=Ne(\"\"),[c,d]=Ne(!1),[m,h]=Ne((r==null?void 0:r.children.length)===0),g=t.file.path,y=t.useSetting(\"max-archive-size\"),v=t.useSetting(\"date-colors\"),D=t.useSetting(\"tag-colors\"),I=e.useViewState(_t),C=Ye(()=>{(r==null?void 0:r.children.length)>0&&h(!1)},[r==null?void 0:r.children.length]);Ae(()=>{(r==null?void 0:r.children.length)===0&&!t.hasError()&&h(!0)},[r==null?void 0:r.children.length,t]);let x=Ye(()=>{var J;(J=i.current)==null||J.win.setTimeout(()=>{var oe;let Q=(oe=i.current)==null?void 0:oe.getElementsByClassName($(\"board\"));Q!=null&&Q.length&&vd([Q[0].scrollWidth,0],{elementToScroll:Q[0],speed:300,minDuration:150,easing:te=>te===1?1:1-Math.pow(2,-10*te)})})},[]);Ae(()=>{let J=oe=>{oe.commandId===\"editor:open-search\"&&(typeof oe.data==\"string\"?(d(!0),s(oe.data),l(oe.data)):d(te=>!te))},Q=()=>{h(!0)};return e.emitter.on(\"hotkey\",J),e.emitter.on(\"showLaneForm\",Q),()=>{e.emitter.off(\"hotkey\",J),e.emitter.off(\"showLaneForm\",Q)}},[e]),Ae(()=>{var J;c&&((J=a.current)==null||J.focus())},[c]),Ae(()=>{let J=e.getWindow(),Q=o.trim(),oe;return Q?oe=J.setTimeout(()=>{l(Q)},250):l(\"\"),()=>{J.clearTimeout(oe)}},[o,e]),Ae(()=>{y===void 0||y===-1||typeof y==\"number\"&&(r==null?void 0:r.data.archive.length)>y&&t.setState(J=>(0,xC.default)(J,{data:{archive:{$set:J.data.archive.slice(y*-1)}}}))},[r==null?void 0:r.data.archive.length,y]);let O=Re(()=>Td(e,t),[t,e]),A=Re(()=>({view:e,stateManager:t,boardModifiers:O,filePath:g}),[e,t,O,g,v,D]),P=Ik(t);if(r==null)return E(\"div\",{className:$(\"loading\"),children:E(\"div\",{className:\"sk-pulse\"})});if(r.data.errors.length>0)return E(\"div\",{children:[E(\"div\",{children:\"Error:\"}),r.data.errors.map((J,Q)=>E(\"div\",{children:[E(\"div\",{children:J.description}),E(\"pre\",{children:J.stack})]},Q))]});let B=I===\"list\"?\"vertical\":\"horizontal\",G=wb(r,u,s,l,d);return E(ks,{id:e.id,children:E(tt.Provider,{value:A,children:E(zn.Provider,{value:G,children:E(\"div\",{ref:i,className:Ge([Eh,{\"something-is-dragging\":n},...VH(r.data.frontmatter)]),...P,children:[(m||r.children.length===0)&&E(zx,{onNewLane:x,closeLaneForm:C}),c&&E(\"div\",{className:$(\"search-wrapper\"),children:[E(\"input\",{ref:a,value:o,onChange:J=>{s(J.target.value)},onKeyDown:J=>{J.key===\"Escape\"&&(s(\"\"),l(\"\"),J.target.blur(),d(!1))},type:\"text\",className:$(\"filter-input\"),placeholder:R(\"Search...\")}),E(\"a\",{className:`${$(\"search-cancel-button\")} clickable-icon`,onClick:()=>{s(\"\"),l(\"\"),d(!1)},\"aria-label\":R(\"Cancel\"),children:E(Ut,{name:\"lucide-x\"})})]}),I===\"table\"?E(kC,{boardData:r,stateManager:t}):E(Sd,{id:e.id,className:Ge([$(\"board\"),{[$(\"horizontal\")]:I!==\"list\",[$(\"vertical\")]:I===\"list\",\"is-adding-lane\":m}]),triggerTypes:HH,children:E(\"div\",{children:E(Ia,{axis:B,children:[E(ox,{lanes:r.children,collapseDir:B}),E(Fa,{accepts:BH,className:$(\"lane-placeholder\"),index:r.children.length})]})})})]})})})})};var qr=\"kanban\",ho=\"lucide-trello\",pn=class extends ea.TextFileView{constructor(r,n){super(r);this.actionButtons={};this.viewSettings={};this.initHeaderButtons=(0,ea.debounce)(()=>this._initHeaderButtons(),10,!0);this._initHeaderButtons=async()=>{if(ea.Platform.isPhone)return;let r=this.plugin.getStateManager(this.file);if(r)if(r.getSetting(\"show-board-settings\")&&!this.actionButtons[\"show-board-settings\"]?this.actionButtons[\"show-board-settings\"]=this.addAction(\"lucide-settings\",R(\"Open board settings\"),()=>{this.getBoardSettings()}):!r.getSetting(\"show-board-settings\")&&this.actionButtons[\"show-board-settings\"]&&(this.actionButtons[\"show-board-settings\"].remove(),delete this.actionButtons[\"show-board-settings\"]),r.getSetting(\"show-set-view\")&&!this.actionButtons[\"show-set-view\"]?this.actionButtons[\"show-set-view\"]=this.addAction(\"lucide-view\",R(\"Board view\"),n=>{let i=this.viewSettings[_t]||r.getSetting(_t);new ea.Menu().addItem(a=>a.setTitle(R(\"View as board\")).setIcon(\"lucide-trello\").setChecked(i===\"basic\"||i===\"board\").onClick(()=>this.setView(\"board\"))).addItem(a=>a.setTitle(R(\"View as table\")).setIcon(\"lucide-table\").setChecked(i===\"table\").onClick(()=>this.setView(\"table\"))).addItem(a=>a.setTitle(R(\"View as list\")).setIcon(\"lucide-server\").setChecked(i===\"list\").onClick(()=>this.setView(\"list\"))).showAtMouseEvent(n)}):!r.getSetting(\"show-set-view\")&&this.actionButtons[\"show-set-view\"]&&(this.actionButtons[\"show-set-view\"].remove(),delete this.actionButtons[\"show-set-view\"]),r.getSetting(\"show-search\")&&!this.actionButtons[\"show-search\"]?this.actionButtons[\"show-search\"]=this.addAction(\"lucide-search\",R(\"Search...\"),()=>{this.emitter.emit(\"hotkey\",{commandId:\"editor:open-search\"})}):!r.getSetting(\"show-search\")&&this.actionButtons[\"show-search\"]&&(this.actionButtons[\"show-search\"].remove(),delete this.actionButtons[\"show-search\"]),r.getSetting(\"show-view-as-markdown\")&&!this.actionButtons[\"show-view-as-markdown\"]?this.actionButtons[\"show-view-as-markdown\"]=this.addAction(\"lucide-file-text\",R(\"Open as markdown\"),()=>{this.plugin.kanbanFileModes[this.leaf.id||this.file.path]=\"markdown\",this.plugin.setMarkdownView(this.leaf)}):!r.getSetting(\"show-view-as-markdown\")&&this.actionButtons[\"show-view-as-markdown\"]&&(this.actionButtons[\"show-view-as-markdown\"].remove(),delete this.actionButtons[\"show-view-as-markdown\"]),r.getSetting(\"show-archive-all\")&&!this.actionButtons[\"show-archive-all\"]?this.actionButtons[\"show-archive-all\"]=this.addAction(\"lucide-archive\",R(\"Archive completed cards\"),()=>{this.plugin.stateManagers.get(this.file).archiveCompletedCards()}):!r.getSetting(\"show-archive-all\")&&this.actionButtons[\"show-archive-all\"]&&(this.actionButtons[\"show-archive-all\"].remove(),delete this.actionButtons[\"show-archive-all\"]),r.getSetting(\"show-add-list\")&&!this.actionButtons[\"show-add-list\"]){let n=this.addAction(\"lucide-plus-circle\",R(\"Add a list\"),()=>{this.emitter.emit(\"showLaneForm\",void 0)});n.addClass($(\"ignore-click-outside\")),this.actionButtons[\"show-add-list\"]=n}else!r.getSetting(\"show-add-list\")&&this.actionButtons[\"show-add-list\"]&&(this.actionButtons[\"show-add-list\"].remove(),delete this.actionButtons[\"show-add-list\"])};this.plugin=n,this.emitter=new Bo,this.previewCache=new Map,this.previewQueue=new Ac(()=>this.emitter.emit(\"queueEmpty\")),this.emitter.on(\"hotkey\",({commandId:i})=>{switch(i){case\"daily-notes:goto-prev\":{Sk(this.app,this.file);break}case\"daily-notes:goto-next\":{Dk(this.app,this.file);break}}}),VS(this)}get isPrimary(){var r;return((r=this.plugin.getStateManager(this.file))==null?void 0:r.getAView())===this}get id(){var r;return`${this.leaf.id}:::${(r=this.file)==null?void 0:r.path}`}get isShiftPressed(){return this.plugin.isShiftPressed}async prerender(r){r.children.forEach(n=>{n.children.forEach(i=>{this.previewCache.has(i.id)||this.previewQueue.add(async()=>{let a=this.addChild(new Ll(this,i.data.title));this.previewCache.set(i.id,a),await a.renderCapability.promise})})}),this.previewQueue.isRunning&&await new Promise(n=>{this.emitter.once(\"queueEmpty\",n)}),this.initHeaderButtons()}validatePreviewCache(r){let n=new Set;r.children.forEach(i=>{n.add(i.id),i.children.forEach(a=>{n.add(a.id)})});for(let i of this.previewCache.keys())n.has(i)||(this.removeChild(this.previewCache.get(i)),this.previewCache.delete(i))}setView(r){this.setViewState(_t,r),this.app.fileManager.processFrontMatter(this.file,n=>{n[_t]=r})}setBoard(r,n=!0){this.plugin.stateManagers.get(this.file).setState(r,n)}getBoard(){return this.plugin.stateManagers.get(this.file).state}getViewType(){return qr}getIcon(){return ho}getDisplayText(){var r;return((r=this.file)==null?void 0:r.basename)||\"Kanban\"}getWindow(){return Dn(this.containerEl)}async loadFile(r){return this.plugin.removeView(this),super.loadFile(r)}async onLoadFile(r){try{return await super.onLoadFile(r)}catch(n){let i=this.plugin.stateManagers.get(this.file);throw i==null||i.setError(n),n}}onload(){super.onload(),ea.Platform.isMobile&&this.containerEl.setCssProps({\"--mobile-navbar-height\":this.app.mobileNavbar.containerEl.clientHeight+\"px\"}),this.register(this.containerEl.onWindowMigrated(()=>{this.plugin.removeView(this),this.plugin.addView(this,this.data,this.isPrimary)}))}onunload(){super.onunload(),this.previewQueue.clear(),this.previewCache.clear(),this.emitter.emit(\"queueEmpty\"),this.plugin.removeView(this),this.emitter.removeAllListeners(),this.activeEditor=null,this.actionButtons={}}handleRename(r,n){this.file.path===r&&this.plugin.handleViewFileRename(this,n)}requestSaveToDisk(r){this.data!==r&&this.isPrimary?(this.data=r,this.requestSave()):this.data=r}getViewData(){return this.data}setViewData(r,n){if(!Ek(r)){this.plugin.kanbanFileModes[this.leaf.id||this.file.path]=\"markdown\",this.plugin.removeView(this),this.plugin.setMarkdownView(this.leaf,!1);return}n&&(this.activeEditor=null,this.previewQueue.clear(),this.previewCache.clear(),this.emitter.emit(\"queueEmpty\"),Object.values(this.actionButtons).forEach(i=>i.remove()),this.actionButtons={}),this.plugin.addView(this,r,!n&&this.isPrimary)}async setState(r,n){this.viewSettings={...r.kanbanViewState},await super.setState(r,n)}getState(){let r=super.getState();return r.kanbanViewState={...this.viewSettings},r}setViewState(r,n,i){i?this.plugin.getStateManager(this.file).viewSet.forEach(o=>{o.viewSettings[r]=i(o.viewSettings[r])}):n&&(this.viewSettings[r]=n),this.app.workspace.requestSaveLayout()}populateViewState(r){var n,i,a,o;(i=(n=this.viewSettings)[\"kanban-plugin\"])!=null||(n[\"kanban-plugin\"]=r[\"kanban-plugin\"]||\"board\"),(o=(a=this.viewSettings)[\"list-collapse\"])!=null||(a[\"list-collapse\"]=r[\"list-collapse\"]||[])}getViewState(r){var a;let i=this.plugin.stateManagers.get(this.file).getSetting(r);return(a=this.viewSettings[r])!=null?a:i}useViewState(r){var a;let i=this.plugin.stateManagers.get(this.file).useSetting(r);return(a=this.viewSettings[r])!=null?a:i}getPortal(){let r=this.plugin.stateManagers.get(this.file);return E(CC,{stateManager:r,view:this})}getBoardSettings(){let r=this.plugin.stateManagers.get(this.file),n=r.state;new $d(this,{onSettingsChange:i=>{let a=(0,_C.default)(n,{data:{settings:{$set:i}}});r.setState(a)}},n.data.settings).open()}onPaneMenu(r,n,i=!0){if(n!==\"more-options\"){super.onPaneMenu(r,n);return}r.addItem(a=>{a.setTitle(R(\"Open as markdown\")).setIcon(\"lucide-file-text\").setSection(\"pane\").onClick(()=>{this.plugin.kanbanFileModes[this.leaf.id||this.file.path]=\"markdown\",this.plugin.setMarkdownView(this.leaf)})}).addItem(a=>{a.setTitle(R(\"Open board settings\")).setIcon(\"lucide-settings\").setSection(\"pane\").onClick(()=>{this.getBoardSettings()})}).addItem(a=>{a.setTitle(R(\"Archive completed cards\")).setIcon(\"lucide-archive\").setSection(\"pane\").onClick(()=>{this.plugin.stateManagers.get(this.file).archiveCompletedCards()})}),i&&super.onPaneMenu(r,n)}clear(){}};var Ps=Ct(ln()),K_=require(\"obsidian\");var Y_=require(\"obsidian\"),z_=Ct(Ic());var FC=Ct(Wm()),IC=Ct(Ic()),qd=\"remove\",Gd=\"replace\",AC=\"add\";function mo(e){if(!e)return!1;if(Ni(e)||Array.isArray(e))return!0;let t=(0,IC.getAPI)();return!!(!FC.default.isMoment(e)&&(t!=null&&t.value.isObject(e)))}function OC(e,t,r=()=>!1,n=i=>String(i)){if(!mo(e)||!mo(t))throw new Error(\"both arguments must be objects or arrays\");let i=LC(e,t,[],[],{remove:[],replace:[],add:[]},r,n);return i.remove.reverse().concat(i.replace).concat(i.add)}function LC(e,t,r,n,i,a,o){if(!mo(e)||!mo(t))return i;let s=Object.keys(e),u=Object.keys(t),l=u.length,c=e.length-t.length,d;if(UH(e,t)){for(let m of s){let h=Array.isArray(e)?Number(m):m;if(!(h in t)){if(d=n.concat(h),a(d))continue;i.remove.push({op:qd,path:d})}}for(let m of u){let h=Array.isArray(t)?Number(m):m;MC(h,e,t,r.concat(h),r.concat(h),i,a,o)}}else{for(let h=0;h<c;h++)d=n.concat(h),!a(d)&&i.remove.push({op:qd,path:d});let m=e.slice(c);for(let h=0;h<l;h++)MC(h,m,t,r.concat(h),r.concat(h+c),i,a,o)}return i}function MC(e,t,r,n,i,a,o,s){let u=t[e],l=r[e];o(n,l)||(!(e in t)&&e in r?a.add.push({op:AC,path:n,value:l}):u!==l&&(Object(u)!==u||Object(l)!==l||$H(u,l)?a.replace.push({op:Gd,path:n,value:l}):!mo(u)&&!mo(l)&&s(u)!==s(l)?a.replace.push({op:Gd,path:n,value:l}):LC(t[e],r[e],n,i,a,o,s)))}function $H(e,t){return Object.prototype.toString.call(e)!==Object.prototype.toString.call(t)}function UH(e,t){let r=e.length-t.length;if(Array.isArray(e)&&Array.isArray(t)&&r>0){let n=0,i=0;for(let a=0;a<t.length&&String(e[a])===String(t[a]);a++)n++;for(let a=t.length;a>0&&String(e[a+r])===String(t[a]);a--)i++;return n>=i}return!0}function PC(e,t){if(!mo(e))throw new Error(\"base object must be an object or an array\");if(!Array.isArray(t))throw new Error(\"diff must be an array\");Array.isArray(e)?e=e.slice():e={...e};for(let r of t){let n=r.op,a=r.path.slice(),o=a.pop(),s=e;if(TC(o),o==null)return!1;let u;for(;(u=a.shift())!==null&&u!==void 0;)TC(u),u in s?Array.isArray(s[u])?s=s[u]=s[u].slice():Ni(s[u])?s=s[u]={...s[u]}:s=s[u]:s=s[u]={};if(n===qd||n===Gd){let l=r.path;if(!Object.prototype.hasOwnProperty.call(s,o))throw new Error([\"expected to find property\",l,\"in object\",e].join(\" \"))}n===qd&&typeof o==\"number\"&&(Array.isArray(s)?s.splice(o,1):delete s[o]),(n===Gd||n===AC)&&(s[o]=r.value)}return e}function TC(e){if(e===\"__proto__\"||e===\"constructor\"||e===\"prototype\")throw new Error(\"setting of prototype values not supported\")}var pf=Ct(ln());var WH={};function _s(e,t){let r=t||WH,n=typeof r.includeImageAlt==\"boolean\"?r.includeImageAlt:!0,i=typeof r.includeHtml==\"boolean\"?r.includeHtml:!0;return RC(e,n,i)}function RC(e,t,r){if(YH(e)){if(\"value\"in e)return e.type===\"html\"&&!r?\"\":e.value;if(t&&\"alt\"in e&&e.alt)return e.alt;if(\"children\"in e)return NC(e.children,t,r)}return Array.isArray(e)?NC(e,t,r):\"\"}function NC(e,t,r){let n=[],i=-1;for(;++i<e.length;)n[i]=RC(e[i],t,r);return n.join(\"\")}function YH(e){return!!(e&&typeof e==\"object\")}var H_=require(\"obsidian\");var Jd=function(e){if(e==null)return qH;if(typeof e==\"string\")return jH(e);if(typeof e==\"object\")return Array.isArray(e)?zH(e):KH(e);if(typeof e==\"function\")return Zd(e);throw new Error(\"Expected function, string, or object as test\")};function zH(e){let t=[],r=-1;for(;++r<e.length;)t[r]=Jd(e[r]);return Zd(n);function n(...i){let a=-1;for(;++a<t.length;)if(t[a].call(this,...i))return!0;return!1}}function KH(e){return Zd(t);function t(r){let n;for(n in e)if(r[n]!==e[n])return!1;return!0}}function jH(e){return Zd(t);function t(r){return r&&r.type===e}}function Zd(e){return t;function t(r,...n){return!!(r&&typeof r==\"object\"&&\"type\"in r&&e.call(this,r,...n))}}function qH(){return!0}var ry=!0,Qd=!1,iy=\"skip\",ay=function(e,t,r,n){typeof t==\"function\"&&typeof r!=\"function\"&&(n=r,r=t,t=null);let i=Jd(t),a=n?-1:1;o(e,void 0,[])();function o(s,u,l){let c=s&&typeof s==\"object\"?s:{};if(typeof c.type==\"string\"){let m=typeof c.tagName==\"string\"?c.tagName:typeof c.name==\"string\"?c.name:void 0;Object.defineProperty(d,\"name\",{value:\"node (\"+(s.type+(m?\"<\"+m+\">\":\"\"))+\")\"})}return d;function d(){let m=[],h,g,y;if((!t||i(s,u,l[l.length-1]||null))&&(m=GH(r(s,l)),m[0]===Qd))return m;if(s.children&&m[0]!==iy)for(g=(n?s.children.length:-1)+a,y=l.concat(s);g>-1&&g<s.children.length;){if(h=o(s.children[g],g,y)(),h[0]===Qd)return h;g=typeof h[1]==\"number\"?h[1]:g+a}return m}}};function GH(e){return Array.isArray(e)?e:typeof e==\"number\"?[ry,e]:[e]}var Xd=function(e,t,r,n){typeof t==\"function\"&&typeof r!=\"function\"&&(n=r,r=t,t=null),ay(e,t,i,n);function i(a,o){let s=o[o.length-1];return r(a,s?s.children.indexOf(a):null,s)}};function ef(e){if(e.children.length===0)return null;let t=e.children.length-1;return e.children[t].type===\"blockid\"?t===0?{start:e.children[0].position.start.offset,end:e.children[0].position.start.offset}:{start:e.children[0].position.start.offset,end:e.children[t-1].position.end.offset}:{start:e.children[0].position.start.offset,end:e.children[t].position.end.offset}}function oy(e,t){return t?e.slice(t.start,t.end):\"\"}function HC(e,t){return t<=0?null:e[t-1]}function BC(e,t,r,n=()=>!0){for(let i=t+1,a=e.length;i<a;i++){let o=e[i];if(r===o.type)return o;if(!n(o))return null}return null}var po=require(\"obsidian\");function VC(e,t){return t}function $C(e,t){let r=xh(e.getSetting(\"date-colors\")),n=e.getSetting(\"date-trigger\"),i=e.getSetting(\"date-format\"),a=e.getSetting(\"date-display-format\"),o=e.getSetting(\"time-trigger\"),s=e.getSetting(\"time-format\"),{app:u}=e,l,c,d=m=>{let h=\"\";return c&&(c.backgroundColor?(m+=\" has-background\",h=` style=\"--date-color: ${c.color}; --date-background-color: ${c.backgroundColor};\"`):h=` style=\"--date-color: ${c.color};\"`),{wrapperClass:m,wrapperStyle:h}};return t=t.replace(new RegExp(`(^|\\\\s)${Qn(n)}\\\\[\\\\[([^\\\\]]+)\\\\]\\\\]`,\"g\"),(m,h,g)=>{var C,x;let y=(0,po.moment)(g,i);if(!y.isValid())return m;l=y;let v=u.metadataCache.getFirstLinkpathDest(g,e.file.path);c||(c=r(y));let{wrapperClass:D,wrapperStyle:I}=d($(\"preview-date-wrapper\"));return`${h}<span data-date=\"${l.toISOString()}\" class=\"${D} ${$(\"date\")} ${$(\"preview-date-link\")}\"${I}><a class=\"${$(\"preview-date\")} internal-link\" data-href=\"${(C=v==null?void 0:v.path)!=null?C:g}\" href=\"${(x=v==null?void 0:v.path)!=null?x:g}\" target=\"_blank\" rel=\"noopener\">${y.format(a)}</a></span>`}),t=t.replace(new RegExp(`(^|\\\\s)${Qn(n)}\\\\[([^\\\\]]+)\\\\]\\\\([^)]+\\\\)`,\"g\"),(m,h,g)=>{var C,x;let y=(0,po.moment)(g,i);if(!y.isValid())return m;l=y;let v=u.metadataCache.getFirstLinkpathDest(g,e.file.path);c||(c=r(y));let{wrapperClass:D,wrapperStyle:I}=d($(\"preview-date-wrapper\"));return`${h}<span data-date=\"${l.toISOString()}\" class=\"${D} ${$(\"date\")} ${$(\"preview-date-link\")}\"${I}><a class=\"${$(\"preview-date\")} internal-link\" data-href=\"${(C=v==null?void 0:v.path)!=null?C:g}\" href=\"${(x=v==null?void 0:v.path)!=null?x:g}\" target=\"_blank\" rel=\"noopener\">${y.format(a)}</a></span>`}),t=t.replace(new RegExp(`(^|\\\\s)${Qn(n)}{([^}]+)}`,\"g\"),(m,h,g)=>{let y=(0,po.moment)(g,i);if(!y.isValid())return m;l=y,c||(c=r(y));let{wrapperClass:v,wrapperStyle:D}=d($(\"preview-date-wrapper\"));return`${h}<span data-date=\"${l.toISOString()}\" class=\"${v} ${$(\"date\")}\"${D}><span class=\"${$(\"preview-date\")} ${$(\"item-metadata-date\")}\">${y.format(a)}</span></span>`}),t=t.replace(new RegExp(`(^|\\\\s)${Qn(o)}{([^}]+)}`,\"g\"),(m,h,g)=>{let y=(0,po.moment)(g,s);if(!y.isValid())return m;l?(l.hour(y.hour()),l.minute(y.minute()),l.second(y.second())):(l=y,l.year(1970));let{wrapperClass:v,wrapperStyle:D}=d($(\"preview-time-wrapper\"));return`${h}<span data-date=\"${l.toISOString()}\" class=\"${v} ${$(\"date\")}\"${D}><span class=\"${$(\"preview-time\")} ${$(\"item-metadata-time\")}\">${y.format(s)}</span></span>`}),t}function ql(e,t){let{dateStr:r,timeStr:n,fileAccessor:i}=t.data.metadata;if(r&&(t.data.metadata.date=(0,po.moment)(r,e.getSetting(\"date-format\"))),n){let a=(0,po.moment)(n,e.getSetting(\"time-format\"));if(t.data.metadata.date){let o=t.data.metadata.date;o.hour(a.hour()),o.minute(a.minute()),o.second(a.second()),a=o.clone()}t.data.metadata.time=a}if(i){let a=e.app.metadataCache.getFirstLinkpathDest(i.target,e.file.path);a&&(t.data.metadata.file=a)}return t.data.titleSearch=wk(t,e),t}function UC(e,t){try{t.children.map(r=>{VC(e,r),r.children.map(n=>ql(e,n))})}catch(r){throw e.setError(r),r}return t}function JH(e){return(e.op===\"add\"||e.op===\"replace\")&&[\"title\",\"titleRaw\",\"dateStr\",\"timeStr\",/\\d$/,/\\/fileAccessor\\/.+$/].some(t=>typeof t==\"string\"?e.path.last().toString().endsWith(t):t.test(e.path.last().toString()))}function WC(e,t,r){let n={};return r.reduce((a,o)=>{if(!JH(o))return a;let s=o.path.reduce((l,c)=>(typeof c==\"number\"&&l.push(c),l),[]),u=s.join(\",\");return n[u]||(n[u]=!0,a.push(s)),a},[]).map(a=>{let o=un(t,a);if(o.type===ft.Lane)return VC(e,o);if(o.type===ft.Item)return ql(e,o)}),t}function Kn(e,t,r,n){let i=e.length,a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)o=Array.from(n),o.unshift(t,r),e.splice(...o);else for(r&&e.splice(t,r);a<n.length;)o=n.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function mr(e,t){return e.length>0?(Kn(e,e.length,0,t),e):t}var YC={}.hasOwnProperty;function zC(e){let t={},r=-1;for(;++r<e.length;)ZH(t,e[r]);return t}function ZH(e,t){let r;for(r in t){let i=(YC.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r],o;if(a)for(o in a){YC.call(i,o)||(i[o]=[]);let s=a[o];QH(i[o],Array.isArray(s)?s:s?[s]:[])}}}function QH(e,t){let r=-1,n=[];for(;++r<t.length;)(t[r].add===\"after\"?e:n).push(t[r]);Kn(e,0,0,n)}var KC=/[!-\\/:-@\\[-`\\{-~\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061D-\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1B7D\\u1B7E\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4F\\u2E52-\\u2E5D\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]/;var Nr=Pa(/[A-Za-z]/),pr=Pa(/[\\dA-Za-z]/),jC=Pa(/[#-'*+\\--9=?A-Z^-~]/);function Gl(e){return e!==null&&(e<32||e===127)}var Jl=Pa(/\\d/),qC=Pa(/[\\dA-Fa-f]/),GC=Pa(/[!-/:-@[-`{-~]/);function xe(e){return e!==null&&e<-2}function Kt(e){return e!==null&&(e<0||e===32)}function Be(e){return e===-2||e===-1||e===32}var JC=Pa(KC),ZC=Pa(/\\s/);function Pa(e){return t;function t(r){return r!==null&&e.test(String.fromCharCode(r))}}function je(e,t,r,n){let i=n?n-1:Number.POSITIVE_INFINITY,a=0;return o;function o(u){return Be(u)?(e.enter(r),s(u)):t(u)}function s(u){return Be(u)&&a++<i?(e.consume(u),s):(e.exit(r),t(u))}}var QC={tokenize:XH};function XH(e){let t=e.attempt(this.parser.constructs.contentInitial,n,i),r;return t;function n(s){if(s===null){e.consume(s);return}return e.enter(\"lineEnding\"),e.consume(s),e.exit(\"lineEnding\"),je(e,t,\"linePrefix\")}function i(s){return e.enter(\"paragraph\"),a(s)}function a(s){let u=e.enter(\"chunkText\",{contentType:\"text\",previous:r});return r&&(r.next=u),r=u,o(s)}function o(s){if(s===null){e.exit(\"chunkText\"),e.exit(\"paragraph\"),e.consume(s);return}return xe(s)?(e.consume(s),e.exit(\"chunkText\"),a):(e.consume(s),o)}}var e_={tokenize:e3},XC={tokenize:t3};function e3(e){let t=this,r=[],n=0,i,a,o;return s;function s(C){if(n<r.length){let x=r[n];return t.containerState=x[1],e.attempt(x[0].continuation,u,l)(C)}return l(C)}function u(C){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&I();let x=t.events.length,O=x,A;for(;O--;)if(t.events[O][0]===\"exit\"&&t.events[O][1].type===\"chunkFlow\"){A=t.events[O][1].end;break}D(n);let P=x;for(;P<t.events.length;)t.events[P][1].end=Object.assign({},A),P++;return Kn(t.events,O+1,0,t.events.slice(x)),t.events.length=P,l(C)}return s(C)}function l(C){if(n===r.length){if(!i)return m(C);if(i.currentConstruct&&i.currentConstruct.concrete)return g(C);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(XC,c,d)(C)}function c(C){return i&&I(),D(n),m(C)}function d(C){return t.parser.lazy[t.now().line]=n!==r.length,o=t.now().offset,g(C)}function m(C){return t.containerState={},e.attempt(XC,h,g)(C)}function h(C){return n++,r.push([t.currentConstruct,t.containerState]),m(C)}function g(C){if(C===null){i&&I(),D(0),e.consume(C);return}return i=i||t.parser.flow(t.now()),e.enter(\"chunkFlow\",{contentType:\"flow\",previous:a,_tokenizer:i}),y(C)}function y(C){if(C===null){v(e.exit(\"chunkFlow\"),!0),D(0),e.consume(C);return}return xe(C)?(e.consume(C),v(e.exit(\"chunkFlow\")),n=0,t.interrupt=void 0,s):(e.consume(C),y)}function v(C,x){let O=t.sliceStream(C);if(x&&O.push(null),C.previous=a,a&&(a.next=C),a=C,i.defineSkip(C.start),i.write(O),t.parser.lazy[C.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<o&&(!i.events[A][1].end||i.events[A][1].end.offset>o))return;let P=t.events.length,B=P,G,J;for(;B--;)if(t.events[B][0]===\"exit\"&&t.events[B][1].type===\"chunkFlow\"){if(G){J=t.events[B][1].end;break}G=!0}for(D(n),A=P;A<t.events.length;)t.events[A][1].end=Object.assign({},J),A++;Kn(t.events,B+1,0,t.events.slice(P)),t.events.length=A}}function D(C){let x=r.length;for(;x-- >C;){let O=r[x];t.containerState=O[1],O[0].exit.call(t,e)}r.length=C}function I(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function t3(e,t,r){return je(e,e.attempt(this.parser.constructs.document,t,r),\"linePrefix\",this.parser.constructs.disable.null.includes(\"codeIndented\")?void 0:4)}function sy(e){if(e===null||Kt(e)||ZC(e))return 1;if(JC(e))return 2}function Ms(e,t,r){let n=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}var Zl={name:\"attention\",tokenize:r3,resolveAll:n3};function n3(e,t){let r=-1,n,i,a,o,s,u,l,c;for(;++r<e.length;)if(e[r][0]===\"enter\"&&e[r][1].type===\"attentionSequence\"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]===\"exit\"&&e[n][1].type===\"attentionSequence\"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;u=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let d=Object.assign({},e[n][1].end),m=Object.assign({},e[r][1].start);t_(d,-u),t_(m,u),o={type:u>1?\"strongSequence\":\"emphasisSequence\",start:d,end:Object.assign({},e[n][1].end)},s={type:u>1?\"strongSequence\":\"emphasisSequence\",start:Object.assign({},e[r][1].start),end:m},a={type:u>1?\"strongText\":\"emphasisText\",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},i={type:u>1?\"strong\":\"emphasis\",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},o.start),e[r][1].start=Object.assign({},s.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=mr(l,[[\"enter\",e[n][1],t],[\"exit\",e[n][1],t]])),l=mr(l,[[\"enter\",i,t],[\"enter\",o,t],[\"exit\",o,t],[\"enter\",a,t]]),l=mr(l,Ms(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=mr(l,[[\"exit\",a,t],[\"enter\",s,t],[\"exit\",s,t],[\"exit\",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,l=mr(l,[[\"enter\",e[r][1],t],[\"exit\",e[r][1],t]])):c=0,Kn(e,n-1,r-n+3,l),r=n+l.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type===\"attentionSequence\"&&(e[r][1].type=\"data\");return e}function r3(e,t){let r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=sy(n),a;return o;function o(u){return a=u,e.enter(\"attentionSequence\"),s(u)}function s(u){if(u===a)return e.consume(u),s;let l=e.exit(\"attentionSequence\"),c=sy(u),d=!c||c===2&&i||r.includes(u),m=!i||i===2&&c||r.includes(n);return l._open=!!(a===42?d:d&&(i||!m)),l._close=!!(a===42?m:m&&(c||!d)),t(u)}}function t_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ly={name:\"autolink\",tokenize:i3};function i3(e,t,r){let n=0;return i;function i(h){return e.enter(\"autolink\"),e.enter(\"autolinkMarker\"),e.consume(h),e.exit(\"autolinkMarker\"),e.enter(\"autolinkProtocol\"),a}function a(h){return Nr(h)?(e.consume(h),o):l(h)}function o(h){return h===43||h===45||h===46||pr(h)?(n=1,s(h)):l(h)}function s(h){return h===58?(e.consume(h),n=0,u):(h===43||h===45||h===46||pr(h))&&n++<32?(e.consume(h),s):(n=0,l(h))}function u(h){return h===62?(e.exit(\"autolinkProtocol\"),e.enter(\"autolinkMarker\"),e.consume(h),e.exit(\"autolinkMarker\"),e.exit(\"autolink\"),t):h===null||h===32||h===60||Gl(h)?r(h):(e.consume(h),u)}function l(h){return h===64?(e.consume(h),c):jC(h)?(e.consume(h),l):r(h)}function c(h){return pr(h)?d(h):r(h)}function d(h){return h===46?(e.consume(h),n=0,c):h===62?(e.exit(\"autolinkProtocol\").type=\"autolinkEmail\",e.enter(\"autolinkMarker\"),e.consume(h),e.exit(\"autolinkMarker\"),e.exit(\"autolink\"),t):m(h)}function m(h){if((h===45||pr(h))&&n++<63){let g=h===45?m:d;return e.consume(h),g}return r(h)}}var Na={tokenize:a3,partial:!0};function a3(e,t,r){return n;function n(a){return Be(a)?je(e,i,\"linePrefix\")(a):i(a)}function i(a){return a===null||xe(a)?t(a):r(a)}}var tf={name:\"blockQuote\",tokenize:o3,continuation:{tokenize:s3},exit:l3};function o3(e,t,r){let n=this;return i;function i(o){if(o===62){let s=n.containerState;return s.open||(e.enter(\"blockQuote\",{_container:!0}),s.open=!0),e.enter(\"blockQuotePrefix\"),e.enter(\"blockQuoteMarker\"),e.consume(o),e.exit(\"blockQuoteMarker\"),a}return r(o)}function a(o){return Be(o)?(e.enter(\"blockQuotePrefixWhitespace\"),e.consume(o),e.exit(\"blockQuotePrefixWhitespace\"),e.exit(\"blockQuotePrefix\"),t):(e.exit(\"blockQuotePrefix\"),t(o))}}function s3(e,t,r){let n=this;return i;function i(o){return Be(o)?je(e,a,\"linePrefix\",n.parser.constructs.disable.null.includes(\"codeIndented\")?void 0:4)(o):a(o)}function a(o){return e.attempt(tf,t,r)(o)}}function l3(e){e.exit(\"blockQuote\")}var nf={name:\"characterEscape\",tokenize:u3};function u3(e,t,r){return n;function n(a){return e.enter(\"characterEscape\"),e.enter(\"escapeMarker\"),e.consume(a),e.exit(\"escapeMarker\"),i}function i(a){return GC(a)?(e.enter(\"characterEscapeValue\"),e.consume(a),e.exit(\"characterEscapeValue\"),e.exit(\"characterEscape\"),t):r(a)}}var n_=document.createElement(\"i\");function Ts(e){let t=\"&\"+e+\";\";n_.innerHTML=t;let r=n_.textContent;return r.charCodeAt(r.length-1)===59&&e!==\"semi\"||r===t?!1:r}var rf={name:\"characterReference\",tokenize:c3};function c3(e,t,r){let n=this,i=0,a,o;return s;function s(d){return e.enter(\"characterReference\"),e.enter(\"characterReferenceMarker\"),e.consume(d),e.exit(\"characterReferenceMarker\"),u}function u(d){return d===35?(e.enter(\"characterReferenceMarkerNumeric\"),e.consume(d),e.exit(\"characterReferenceMarkerNumeric\"),l):(e.enter(\"characterReferenceValue\"),a=31,o=pr,c(d))}function l(d){return d===88||d===120?(e.enter(\"characterReferenceMarkerHexadecimal\"),e.consume(d),e.exit(\"characterReferenceMarkerHexadecimal\"),e.enter(\"characterReferenceValue\"),a=6,o=qC,c):(e.enter(\"characterReferenceValue\"),a=7,o=Jl,c(d))}function c(d){if(d===59&&i){let m=e.exit(\"characterReferenceValue\");return o===pr&&!Ts(n.sliceSerialize(m))?r(d):(e.enter(\"characterReferenceMarker\"),e.consume(d),e.exit(\"characterReferenceMarker\"),e.exit(\"characterReference\"),t)}return o(d)&&i++<a?(e.consume(d),c):r(d)}}var r_={tokenize:f3,partial:!0},af={name:\"codeFenced\",tokenize:d3,concrete:!0};function d3(e,t,r){let n=this,i={tokenize:O,partial:!0},a=0,o=0,s;return u;function u(A){return l(A)}function l(A){let P=n.events[n.events.length-1];return a=P&&P[1].type===\"linePrefix\"?P[2].sliceSerialize(P[1],!0).length:0,s=A,e.enter(\"codeFenced\"),e.enter(\"codeFencedFence\"),e.enter(\"codeFencedFenceSequence\"),c(A)}function c(A){return A===s?(o++,e.consume(A),c):o<3?r(A):(e.exit(\"codeFencedFenceSequence\"),Be(A)?je(e,d,\"whitespace\")(A):d(A))}function d(A){return A===null||xe(A)?(e.exit(\"codeFencedFence\"),n.interrupt?t(A):e.check(r_,y,x)(A)):(e.enter(\"codeFencedFenceInfo\"),e.enter(\"chunkString\",{contentType:\"string\"}),m(A))}function m(A){return A===null||xe(A)?(e.exit(\"chunkString\"),e.exit(\"codeFencedFenceInfo\"),d(A)):Be(A)?(e.exit(\"chunkString\"),e.exit(\"codeFencedFenceInfo\"),je(e,h,\"whitespace\")(A)):A===96&&A===s?r(A):(e.consume(A),m)}function h(A){return A===null||xe(A)?d(A):(e.enter(\"codeFencedFenceMeta\"),e.enter(\"chunkString\",{contentType:\"string\"}),g(A))}function g(A){return A===null||xe(A)?(e.exit(\"chunkString\"),e.exit(\"codeFencedFenceMeta\"),d(A)):A===96&&A===s?r(A):(e.consume(A),g)}function y(A){return e.attempt(i,x,v)(A)}function v(A){return e.enter(\"lineEnding\"),e.consume(A),e.exit(\"lineEnding\"),D}function D(A){return a>0&&Be(A)?je(e,I,\"linePrefix\",a+1)(A):I(A)}function I(A){return A===null||xe(A)?e.check(r_,y,x)(A):(e.enter(\"codeFlowValue\"),C(A))}function C(A){return A===null||xe(A)?(e.exit(\"codeFlowValue\"),I(A)):(e.consume(A),C)}function x(A){return e.exit(\"codeFenced\"),t(A)}function O(A,P,B){let G=0;return J;function J(ne){return A.enter(\"lineEnding\"),A.consume(ne),A.exit(\"lineEnding\"),Q}function Q(ne){return A.enter(\"codeFencedFence\"),Be(ne)?je(A,oe,\"linePrefix\",n.parser.constructs.disable.null.includes(\"codeIndented\")?void 0:4)(ne):oe(ne)}function oe(ne){return ne===s?(A.enter(\"codeFencedFenceSequence\"),te(ne)):B(ne)}function te(ne){return ne===s?(G++,A.consume(ne),te):G>=o?(A.exit(\"codeFencedFenceSequence\"),Be(ne)?je(A,re,\"whitespace\")(ne):re(ne)):B(ne)}function re(ne){return ne===null||xe(ne)?(A.exit(\"codeFencedFence\"),P(ne)):B(ne)}}}function f3(e,t,r){let n=this;return i;function i(o){return o===null?r(o):(e.enter(\"lineEnding\"),e.consume(o),e.exit(\"lineEnding\"),a)}function a(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}var Ql={name:\"codeIndented\",tokenize:m3},h3={tokenize:p3,partial:!0};function m3(e,t,r){let n=this;return i;function i(l){return e.enter(\"codeIndented\"),je(e,a,\"linePrefix\",5)(l)}function a(l){let c=n.events[n.events.length-1];return c&&c[1].type===\"linePrefix\"&&c[2].sliceSerialize(c[1],!0).length>=4?o(l):r(l)}function o(l){return l===null?u(l):xe(l)?e.attempt(h3,o,u)(l):(e.enter(\"codeFlowValue\"),s(l))}function s(l){return l===null||xe(l)?(e.exit(\"codeFlowValue\"),o(l)):(e.consume(l),s)}function u(l){return e.exit(\"codeIndented\"),t(l)}}function p3(e,t,r){let n=this;return i;function i(o){return n.parser.lazy[n.now().line]?r(o):xe(o)?(e.enter(\"lineEnding\"),e.consume(o),e.exit(\"lineEnding\"),i):je(e,a,\"linePrefix\",5)(o)}function a(o){let s=n.events[n.events.length-1];return s&&s[1].type===\"linePrefix\"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):xe(o)?i(o):r(o)}}var uy={name:\"codeText\",tokenize:v3,resolve:g3,previous:y3};function g3(e){let t=e.length-4,r=3,n,i;if((e[r][1].type===\"lineEnding\"||e[r][1].type===\"space\")&&(e[t][1].type===\"lineEnding\"||e[t][1].type===\"space\")){for(n=r;++n<t;)if(e[n][1].type===\"codeTextData\"){e[r][1].type=\"codeTextPadding\",e[t][1].type=\"codeTextPadding\",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!==\"lineEnding\"&&(i=n):(n===t||e[n][1].type===\"lineEnding\")&&(e[i][1].type=\"codeTextData\",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function y3(e){return e!==96||this.events[this.events.length-1][1].type===\"characterEscape\"}function v3(e,t,r){let n=this,i=0,a,o;return s;function s(m){return e.enter(\"codeText\"),e.enter(\"codeTextSequence\"),u(m)}function u(m){return m===96?(e.consume(m),i++,u):(e.exit(\"codeTextSequence\"),l(m))}function l(m){return m===null?r(m):m===32?(e.enter(\"space\"),e.consume(m),e.exit(\"space\"),l):m===96?(o=e.enter(\"codeTextSequence\"),a=0,d(m)):xe(m)?(e.enter(\"lineEnding\"),e.consume(m),e.exit(\"lineEnding\"),l):(e.enter(\"codeTextData\"),c(m))}function c(m){return m===null||m===32||m===96||xe(m)?(e.exit(\"codeTextData\"),l(m)):(e.consume(m),c)}function d(m){return m===96?(e.consume(m),a++,d):a===i?(e.exit(\"codeTextSequence\"),e.exit(\"codeText\"),t(m)):(o.type=\"codeTextData\",c(m))}}function of(e){let t={},r=-1,n,i,a,o,s,u,l;for(;++r<e.length;){for(;r in t;)r=t[r];if(n=e[r],r&&n[1].type===\"chunkFlow\"&&e[r-1][1].type===\"listItemPrefix\"&&(u=n[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type===\"lineEndingBlank\"&&(a+=2),a<u.length&&u[a][1].type===\"content\"))for(;++a<u.length&&u[a][1].type!==\"content\";)u[a][1].type===\"chunkText\"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(n[0]===\"enter\")n[1].contentType&&(Object.assign(t,w3(e,r)),r=t[r],l=!0);else if(n[1]._container){for(a=r,i=void 0;a--&&(o=e[a],o[1].type===\"lineEnding\"||o[1].type===\"lineEndingBlank\");)o[0]===\"enter\"&&(i&&(e[i][1].type=\"lineEndingBlank\"),o[1].type=\"lineEnding\",i=a);i&&(n[1].end=Object.assign({},e[i][1].start),s=e.slice(i,r),s.unshift(n),Kn(e,i,r-i+1,s))}}return!l}function w3(e,t){let r=e[t][1],n=e[t][2],i=t-1,a=[],o=r._tokenizer||n.parser[r.contentType](r.start),s=o.events,u=[],l={},c,d,m=-1,h=r,g=0,y=0,v=[y];for(;h;){for(;e[++i][1]!==h;);a.push(i),h._tokenizer||(c=n.sliceStream(h),h.next||c.push(null),d&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=r;++m<s.length;)s[m][0]===\"exit\"&&s[m-1][0]===\"enter\"&&s[m][1].type===s[m-1][1].type&&s[m][1].start.line!==s[m][1].end.line&&(y=m+1,v.push(y),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):v.pop(),m=v.length;m--;){let D=s.slice(v[m],v[m+1]),I=a.pop();u.unshift([I,I+D.length-1]),Kn(e,I,2,D)}for(m=-1;++m<u.length;)l[g+u[m][0]]=g+u[m][1],g+=u[m][1]-u[m][0]-1;return l}var cy={tokenize:S3,resolve:D3},b3={tokenize:E3,partial:!0};function D3(e){return of(e),e}function S3(e,t){let r;return n;function n(s){return e.enter(\"content\"),r=e.enter(\"chunkContent\",{contentType:\"content\"}),i(s)}function i(s){return s===null?a(s):xe(s)?e.check(b3,o,a)(s):(e.consume(s),i)}function a(s){return e.exit(\"chunkContent\"),e.exit(\"content\"),t(s)}function o(s){return e.consume(s),e.exit(\"chunkContent\"),r.next=e.enter(\"chunkContent\",{contentType:\"content\",previous:r}),r=r.next,i}}function E3(e,t,r){let n=this;return i;function i(o){return e.exit(\"chunkContent\"),e.enter(\"lineEnding\"),e.consume(o),e.exit(\"lineEnding\"),je(e,a,\"linePrefix\")}function a(o){if(o===null||xe(o))return r(o);let s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes(\"codeIndented\")&&s&&s[1].type===\"linePrefix\"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(n.parser.constructs.flow,r,t)(o)}}function sf(e,t,r,n,i,a,o,s,u){let l=u||Number.POSITIVE_INFINITY,c=0;return d;function d(D){return D===60?(e.enter(n),e.enter(i),e.enter(a),e.consume(D),e.exit(a),m):D===null||D===32||D===41||Gl(D)?r(D):(e.enter(n),e.enter(o),e.enter(s),e.enter(\"chunkString\",{contentType:\"string\"}),y(D))}function m(D){return D===62?(e.enter(a),e.consume(D),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(s),e.enter(\"chunkString\",{contentType:\"string\"}),h(D))}function h(D){return D===62?(e.exit(\"chunkString\"),e.exit(s),m(D)):D===null||D===60||xe(D)?r(D):(e.consume(D),D===92?g:h)}function g(D){return D===60||D===62||D===92?(e.consume(D),h):h(D)}function y(D){return!c&&(D===null||D===41||Kt(D))?(e.exit(\"chunkString\"),e.exit(s),e.exit(o),e.exit(n),t(D)):c<l&&D===40?(e.consume(D),c++,y):D===41?(e.consume(D),c--,y):D===null||D===32||D===40||Gl(D)?r(D):(e.consume(D),D===92?v:y)}function v(D){return D===40||D===41||D===92?(e.consume(D),y):y(D)}}function lf(e,t,r,n,i,a){let o=this,s=0,u;return l;function l(h){return e.enter(n),e.enter(i),e.consume(h),e.exit(i),e.enter(a),c}function c(h){return s>999||h===null||h===91||h===93&&!u||h===94&&!s&&\"_hiddenFootnoteSupport\"in o.parser.constructs?r(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(n),t):xe(h)?(e.enter(\"lineEnding\"),e.consume(h),e.exit(\"lineEnding\"),c):(e.enter(\"chunkString\",{contentType:\"string\"}),d(h))}function d(h){return h===null||h===91||h===93||xe(h)||s++>999?(e.exit(\"chunkString\"),c(h)):(e.consume(h),u||(u=!Be(h)),h===92?m:d)}function m(h){return h===91||h===92||h===93?(e.consume(h),s++,d):d(h)}}function uf(e,t,r,n,i,a){let o;return s;function s(m){return m===34||m===39||m===40?(e.enter(n),e.enter(i),e.consume(m),e.exit(i),o=m===40?41:m,u):r(m)}function u(m){return m===o?(e.enter(i),e.consume(m),e.exit(i),e.exit(n),t):(e.enter(a),l(m))}function l(m){return m===o?(e.exit(a),u(o)):m===null?r(m):xe(m)?(e.enter(\"lineEnding\"),e.consume(m),e.exit(\"lineEnding\"),je(e,l,\"linePrefix\")):(e.enter(\"chunkString\",{contentType:\"string\"}),c(m))}function c(m){return m===o||m===null||xe(m)?(e.exit(\"chunkString\"),l(m)):(e.consume(m),m===92?d:c)}function d(m){return m===o||m===92?(e.consume(m),c):c(m)}}function go(e,t){let r;return n;function n(i){return xe(i)?(e.enter(\"lineEnding\"),e.consume(i),e.exit(\"lineEnding\"),r=!0,n):Be(i)?je(e,n,r?\"linePrefix\":\"lineSuffix\")(i):t(i)}}function ta(e){return e.replace(/[\\t\\n\\r ]+/g,\" \").replace(/^ | $/g,\"\").toLowerCase().toUpperCase()}var dy={name:\"definition\",tokenize:x3},k3={tokenize:C3,partial:!0};function x3(e,t,r){let n=this,i;return a;function a(h){return e.enter(\"definition\"),o(h)}function o(h){return lf.call(n,e,s,r,\"definitionLabel\",\"definitionLabelMarker\",\"definitionLabelString\")(h)}function s(h){return i=ta(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),h===58?(e.enter(\"definitionMarker\"),e.consume(h),e.exit(\"definitionMarker\"),u):r(h)}function u(h){return Kt(h)?go(e,l)(h):l(h)}function l(h){return sf(e,c,r,\"definitionDestination\",\"definitionDestinationLiteral\",\"definitionDestinationLiteralMarker\",\"definitionDestinationRaw\",\"definitionDestinationString\")(h)}function c(h){return e.attempt(k3,d,d)(h)}function d(h){return Be(h)?je(e,m,\"whitespace\")(h):m(h)}function m(h){return h===null||xe(h)?(e.exit(\"definition\"),n.parser.defined.push(i),t(h)):r(h)}}function C3(e,t,r){return n;function n(s){return Kt(s)?go(e,i)(s):r(s)}function i(s){return uf(e,a,r,\"definitionTitle\",\"definitionTitleMarker\",\"definitionTitleString\")(s)}function a(s){return Be(s)?je(e,o,\"whitespace\")(s):o(s)}function o(s){return s===null||xe(s)?t(s):r(s)}}var fy={name:\"hardBreakEscape\",tokenize:_3};function _3(e,t,r){return n;function n(a){return e.enter(\"hardBreakEscape\"),e.consume(a),i}function i(a){return xe(a)?(e.exit(\"hardBreakEscape\"),t(a)):r(a)}}var hy={name:\"headingAtx\",tokenize:T3,resolve:M3};function M3(e,t){let r=e.length-2,n=3,i,a;return e[n][1].type===\"whitespace\"&&(n+=2),r-2>n&&e[r][1].type===\"whitespace\"&&(r-=2),e[r][1].type===\"atxHeadingSequence\"&&(n===r-1||r-4>n&&e[r-2][1].type===\"whitespace\")&&(r-=n+1===r?2:4),r>n&&(i={type:\"atxHeadingText\",start:e[n][1].start,end:e[r][1].end},a={type:\"chunkText\",start:e[n][1].start,end:e[r][1].end,contentType:\"text\"},Kn(e,n,r-n+1,[[\"enter\",i,t],[\"enter\",a,t],[\"exit\",a,t],[\"exit\",i,t]])),e}function T3(e,t,r){let n=0;return i;function i(c){return e.enter(\"atxHeading\"),a(c)}function a(c){return e.enter(\"atxHeadingSequence\"),o(c)}function o(c){return c===35&&n++<6?(e.consume(c),o):c===null||Kt(c)?(e.exit(\"atxHeadingSequence\"),s(c)):r(c)}function s(c){return c===35?(e.enter(\"atxHeadingSequence\"),u(c)):c===null||xe(c)?(e.exit(\"atxHeading\"),t(c)):Be(c)?je(e,s,\"whitespace\")(c):(e.enter(\"atxHeadingText\"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit(\"atxHeadingSequence\"),s(c))}function l(c){return c===null||c===35||Kt(c)?(e.exit(\"atxHeadingText\"),s(c)):(e.consume(c),l)}}var i_=[\"address\",\"article\",\"aside\",\"base\",\"basefont\",\"blockquote\",\"body\",\"caption\",\"center\",\"col\",\"colgroup\",\"dd\",\"details\",\"dialog\",\"dir\",\"div\",\"dl\",\"dt\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"frame\",\"frameset\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hr\",\"html\",\"iframe\",\"legend\",\"li\",\"link\",\"main\",\"menu\",\"menuitem\",\"nav\",\"noframes\",\"ol\",\"optgroup\",\"option\",\"p\",\"param\",\"search\",\"section\",\"summary\",\"table\",\"tbody\",\"td\",\"tfoot\",\"th\",\"thead\",\"title\",\"tr\",\"track\",\"ul\"],my=[\"pre\",\"script\",\"style\",\"textarea\"];var py={name:\"htmlFlow\",tokenize:O3,resolveTo:A3,concrete:!0},F3={tokenize:P3,partial:!0},I3={tokenize:L3,partial:!0};function A3(e){let t=e.length;for(;t--&&!(e[t][0]===\"enter\"&&e[t][1].type===\"htmlFlow\"););return t>1&&e[t-2][1].type===\"linePrefix\"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function O3(e,t,r){let n=this,i,a,o,s,u;return l;function l(N){return c(N)}function c(N){return e.enter(\"htmlFlow\"),e.enter(\"htmlFlowData\"),e.consume(N),d}function d(N){return N===33?(e.consume(N),m):N===47?(e.consume(N),a=!0,y):N===63?(e.consume(N),i=3,n.interrupt?t:U):Nr(N)?(e.consume(N),o=String.fromCharCode(N),v):r(N)}function m(N){return N===45?(e.consume(N),i=2,h):N===91?(e.consume(N),i=5,s=0,g):Nr(N)?(e.consume(N),i=4,n.interrupt?t:U):r(N)}function h(N){return N===45?(e.consume(N),n.interrupt?t:U):r(N)}function g(N){let Ze=\"CDATA[\";return N===Ze.charCodeAt(s++)?(e.consume(N),s===Ze.length?n.interrupt?t:oe:g):r(N)}function y(N){return Nr(N)?(e.consume(N),o=String.fromCharCode(N),v):r(N)}function v(N){if(N===null||N===47||N===62||Kt(N)){let Ze=N===47,It=o.toLowerCase();return!Ze&&!a&&my.includes(It)?(i=1,n.interrupt?t(N):oe(N)):i_.includes(o.toLowerCase())?(i=6,Ze?(e.consume(N),D):n.interrupt?t(N):oe(N)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(N):a?I(N):C(N))}return N===45||pr(N)?(e.consume(N),o+=String.fromCharCode(N),v):r(N)}function D(N){return N===62?(e.consume(N),n.interrupt?t:oe):r(N)}function I(N){return Be(N)?(e.consume(N),I):J(N)}function C(N){return N===47?(e.consume(N),J):N===58||N===95||Nr(N)?(e.consume(N),x):Be(N)?(e.consume(N),C):J(N)}function x(N){return N===45||N===46||N===58||N===95||pr(N)?(e.consume(N),x):O(N)}function O(N){return N===61?(e.consume(N),A):Be(N)?(e.consume(N),O):C(N)}function A(N){return N===null||N===60||N===61||N===62||N===96?r(N):N===34||N===39?(e.consume(N),u=N,P):Be(N)?(e.consume(N),A):B(N)}function P(N){return N===u?(e.consume(N),u=null,G):N===null||xe(N)?r(N):(e.consume(N),P)}function B(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Kt(N)?O(N):(e.consume(N),B)}function G(N){return N===47||N===62||Be(N)?C(N):r(N)}function J(N){return N===62?(e.consume(N),Q):r(N)}function Q(N){return N===null||xe(N)?oe(N):Be(N)?(e.consume(N),Q):r(N)}function oe(N){return N===45&&i===2?(e.consume(N),be):N===60&&i===1?(e.consume(N),pe):N===62&&i===4?(e.consume(N),Je):N===63&&i===3?(e.consume(N),U):N===93&&i===5?(e.consume(N),Ce):xe(N)&&(i===6||i===7)?(e.exit(\"htmlFlowData\"),e.check(F3,it,te)(N)):N===null||xe(N)?(e.exit(\"htmlFlowData\"),te(N)):(e.consume(N),oe)}function te(N){return e.check(I3,re,it)(N)}function re(N){return e.enter(\"lineEnding\"),e.consume(N),e.exit(\"lineEnding\"),ne}function ne(N){return N===null||xe(N)?te(N):(e.enter(\"htmlFlowData\"),oe(N))}function be(N){return N===45?(e.consume(N),U):oe(N)}function pe(N){return N===47?(e.consume(N),o=\"\",De):oe(N)}function De(N){if(N===62){let Ze=o.toLowerCase();return my.includes(Ze)?(e.consume(N),Je):oe(N)}return Nr(N)&&o.length<8?(e.consume(N),o+=String.fromCharCode(N),De):oe(N)}function Ce(N){return N===93?(e.consume(N),U):oe(N)}function U(N){return N===62?(e.consume(N),Je):N===45&&i===2?(e.consume(N),U):oe(N)}function Je(N){return N===null||xe(N)?(e.exit(\"htmlFlowData\"),it(N)):(e.consume(N),Je)}function it(N){return e.exit(\"htmlFlow\"),t(N)}}function L3(e,t,r){let n=this;return i;function i(o){return xe(o)?(e.enter(\"lineEnding\"),e.consume(o),e.exit(\"lineEnding\"),a):r(o)}function a(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}function P3(e,t,r){return n;function n(i){return e.enter(\"lineEnding\"),e.consume(i),e.exit(\"lineEnding\"),e.attempt(Na,t,r)}}var gy={name:\"htmlText\",tokenize:N3};function N3(e,t,r){let n=this,i,a,o;return s;function s(U){return e.enter(\"htmlText\"),e.enter(\"htmlTextData\"),e.consume(U),u}function u(U){return U===33?(e.consume(U),l):U===47?(e.consume(U),O):U===63?(e.consume(U),C):Nr(U)?(e.consume(U),B):r(U)}function l(U){return U===45?(e.consume(U),c):U===91?(e.consume(U),a=0,g):Nr(U)?(e.consume(U),I):r(U)}function c(U){return U===45?(e.consume(U),h):r(U)}function d(U){return U===null?r(U):U===45?(e.consume(U),m):xe(U)?(o=d,pe(U)):(e.consume(U),d)}function m(U){return U===45?(e.consume(U),h):d(U)}function h(U){return U===62?be(U):U===45?m(U):d(U)}function g(U){let Je=\"CDATA[\";return U===Je.charCodeAt(a++)?(e.consume(U),a===Je.length?y:g):r(U)}function y(U){return U===null?r(U):U===93?(e.consume(U),v):xe(U)?(o=y,pe(U)):(e.consume(U),y)}function v(U){return U===93?(e.consume(U),D):y(U)}function D(U){return U===62?be(U):U===93?(e.consume(U),D):y(U)}function I(U){return U===null||U===62?be(U):xe(U)?(o=I,pe(U)):(e.consume(U),I)}function C(U){return U===null?r(U):U===63?(e.consume(U),x):xe(U)?(o=C,pe(U)):(e.consume(U),C)}function x(U){return U===62?be(U):C(U)}function O(U){return Nr(U)?(e.consume(U),A):r(U)}function A(U){return U===45||pr(U)?(e.consume(U),A):P(U)}function P(U){return xe(U)?(o=P,pe(U)):Be(U)?(e.consume(U),P):be(U)}function B(U){return U===45||pr(U)?(e.consume(U),B):U===47||U===62||Kt(U)?G(U):r(U)}function G(U){return U===47?(e.consume(U),be):U===58||U===95||Nr(U)?(e.consume(U),J):xe(U)?(o=G,pe(U)):Be(U)?(e.consume(U),G):be(U)}function J(U){return U===45||U===46||U===58||U===95||pr(U)?(e.consume(U),J):Q(U)}function Q(U){return U===61?(e.consume(U),oe):xe(U)?(o=Q,pe(U)):Be(U)?(e.consume(U),Q):G(U)}function oe(U){return U===null||U===60||U===61||U===62||U===96?r(U):U===34||U===39?(e.consume(U),i=U,te):xe(U)?(o=oe,pe(U)):Be(U)?(e.consume(U),oe):(e.consume(U),re)}function te(U){return U===i?(e.consume(U),i=void 0,ne):U===null?r(U):xe(U)?(o=te,pe(U)):(e.consume(U),te)}function re(U){return U===null||U===34||U===39||U===60||U===61||U===96?r(U):U===47||U===62||Kt(U)?G(U):(e.consume(U),re)}function ne(U){return U===47||U===62||Kt(U)?G(U):r(U)}function be(U){return U===62?(e.consume(U),e.exit(\"htmlTextData\"),e.exit(\"htmlText\"),t):r(U)}function pe(U){return e.exit(\"htmlTextData\"),e.enter(\"lineEnding\"),e.consume(U),e.exit(\"lineEnding\"),De}function De(U){return Be(U)?je(e,Ce,\"linePrefix\",n.parser.constructs.disable.null.includes(\"codeIndented\")?void 0:4)(U):Ce(U)}function Ce(U){return e.enter(\"htmlTextData\"),o(U)}}var yo={name:\"labelEnd\",tokenize:U3,resolveTo:$3,resolveAll:V3},R3={tokenize:W3},H3={tokenize:Y3},B3={tokenize:z3};function V3(e){let t=-1;for(;++t<e.length;){let r=e[t][1];(r.type===\"labelImage\"||r.type===\"labelLink\"||r.type===\"labelEnd\")&&(e.splice(t+1,r.type===\"labelImage\"?4:2),r.type=\"data\",t++)}return e}function $3(e,t){let r=e.length,n=0,i,a,o,s;for(;r--;)if(i=e[r][1],a){if(i.type===\"link\"||i.type===\"labelLink\"&&i._inactive)break;e[r][0]===\"enter\"&&i.type===\"labelLink\"&&(i._inactive=!0)}else if(o){if(e[r][0]===\"enter\"&&(i.type===\"labelImage\"||i.type===\"labelLink\")&&!i._balanced&&(a=r,i.type!==\"labelLink\")){n=2;break}}else i.type===\"labelEnd\"&&(o=r);let u={type:e[a][1].type===\"labelLink\"?\"link\":\"image\",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:\"label\",start:Object.assign({},e[a][1].start),end:Object.assign({},e[o][1].end)},c={type:\"labelText\",start:Object.assign({},e[a+n+2][1].end),end:Object.assign({},e[o-2][1].start)};return s=[[\"enter\",u,t],[\"enter\",l,t]],s=mr(s,e.slice(a+1,a+n+3)),s=mr(s,[[\"enter\",c,t]]),s=mr(s,Ms(t.parser.constructs.insideSpan.null,e.slice(a+n+4,o-3),t)),s=mr(s,[[\"exit\",c,t],e[o-2],e[o-1],[\"exit\",l,t]]),s=mr(s,e.slice(o+1)),s=mr(s,[[\"exit\",u,t]]),Kn(e,a,e.length,s),e}function U3(e,t,r){let n=this,i=n.events.length,a,o;for(;i--;)if((n.events[i][1].type===\"labelImage\"||n.events[i][1].type===\"labelLink\")&&!n.events[i][1]._balanced){a=n.events[i][1];break}return s;function s(m){return a?a._inactive?d(m):(o=n.parser.defined.includes(ta(n.sliceSerialize({start:a.end,end:n.now()}))),e.enter(\"labelEnd\"),e.enter(\"labelMarker\"),e.consume(m),e.exit(\"labelMarker\"),e.exit(\"labelEnd\"),u):r(m)}function u(m){return m===40?e.attempt(R3,c,o?c:d)(m):m===91?e.attempt(H3,c,o?l:d)(m):o?c(m):d(m)}function l(m){return e.attempt(B3,c,d)(m)}function c(m){return t(m)}function d(m){return a._balanced=!0,r(m)}}function W3(e,t,r){return n;function n(d){return e.enter(\"resource\"),e.enter(\"resourceMarker\"),e.consume(d),e.exit(\"resourceMarker\"),i}function i(d){return Kt(d)?go(e,a)(d):a(d)}function a(d){return d===41?c(d):sf(e,o,s,\"resourceDestination\",\"resourceDestinationLiteral\",\"resourceDestinationLiteralMarker\",\"resourceDestinationRaw\",\"resourceDestinationString\",32)(d)}function o(d){return Kt(d)?go(e,u)(d):c(d)}function s(d){return r(d)}function u(d){return d===34||d===39||d===40?uf(e,l,r,\"resourceTitle\",\"resourceTitleMarker\",\"resourceTitleString\")(d):c(d)}function l(d){return Kt(d)?go(e,c)(d):c(d)}function c(d){return d===41?(e.enter(\"resourceMarker\"),e.consume(d),e.exit(\"resourceMarker\"),e.exit(\"resource\"),t):r(d)}}function Y3(e,t,r){let n=this;return i;function i(s){return lf.call(n,e,a,o,\"reference\",\"referenceMarker\",\"referenceString\")(s)}function a(s){return n.parser.defined.includes(ta(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function o(s){return r(s)}}function z3(e,t,r){return n;function n(a){return e.enter(\"reference\"),e.enter(\"referenceMarker\"),e.consume(a),e.exit(\"referenceMarker\"),i}function i(a){return a===93?(e.enter(\"referenceMarker\"),e.consume(a),e.exit(\"referenceMarker\"),e.exit(\"reference\"),t):r(a)}}var yy={name:\"labelStartImage\",tokenize:K3,resolveAll:yo.resolveAll};function K3(e,t,r){let n=this;return i;function i(s){return e.enter(\"labelImage\"),e.enter(\"labelImageMarker\"),e.consume(s),e.exit(\"labelImageMarker\"),a}function a(s){return s===91?(e.enter(\"labelMarker\"),e.consume(s),e.exit(\"labelMarker\"),e.exit(\"labelImage\"),o):r(s)}function o(s){return s===94&&\"_hiddenFootnoteSupport\"in n.parser.constructs?r(s):t(s)}}var vy={name:\"labelStartLink\",tokenize:j3,resolveAll:yo.resolveAll};function j3(e,t,r){let n=this;return i;function i(o){return e.enter(\"labelLink\"),e.enter(\"labelMarker\"),e.consume(o),e.exit(\"labelMarker\"),e.exit(\"labelLink\"),a}function a(o){return o===94&&\"_hiddenFootnoteSupport\"in n.parser.constructs?r(o):t(o)}}var Xl={name:\"lineEnding\",tokenize:q3};function q3(e,t){return r;function r(n){return e.enter(\"lineEnding\"),e.consume(n),e.exit(\"lineEnding\"),je(e,t,\"linePrefix\")}}var vo={name:\"thematicBreak\",tokenize:G3};function G3(e,t,r){let n=0,i;return a;function a(l){return e.enter(\"thematicBreak\"),o(l)}function o(l){return i=l,s(l)}function s(l){return l===i?(e.enter(\"thematicBreakSequence\"),u(l)):n>=3&&(l===null||xe(l))?(e.exit(\"thematicBreak\"),t(l)):r(l)}function u(l){return l===i?(e.consume(l),n++,u):(e.exit(\"thematicBreakSequence\"),Be(l)?je(e,s,\"whitespace\")(l):s(l))}}var ir={name:\"list\",tokenize:Q3,continuation:{tokenize:X3},exit:tB},J3={tokenize:nB,partial:!0},Z3={tokenize:eB,partial:!0};function Q3(e,t,r){let n=this,i=n.events[n.events.length-1],a=i&&i[1].type===\"linePrefix\"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(h){let g=n.containerState.type||(h===42||h===43||h===45?\"listUnordered\":\"listOrdered\");if(g===\"listUnordered\"?!n.containerState.marker||h===n.containerState.marker:Jl(h)){if(n.containerState.type||(n.containerState.type=g,e.enter(g,{_container:!0})),g===\"listUnordered\")return e.enter(\"listItemPrefix\"),h===42||h===45?e.check(vo,r,l)(h):l(h);if(!n.interrupt||h===49)return e.enter(\"listItemPrefix\"),e.enter(\"listItemValue\"),u(h)}return r(h)}function u(h){return Jl(h)&&++o<10?(e.consume(h),u):(!n.interrupt||o<2)&&(n.containerState.marker?h===n.containerState.marker:h===41||h===46)?(e.exit(\"listItemValue\"),l(h)):r(h)}function l(h){return e.enter(\"listItemMarker\"),e.consume(h),e.exit(\"listItemMarker\"),n.containerState.marker=n.containerState.marker||h,e.check(Na,n.interrupt?r:c,e.attempt(J3,m,d))}function c(h){return n.containerState.initialBlankLine=!0,a++,m(h)}function d(h){return Be(h)?(e.enter(\"listItemPrefixWhitespace\"),e.consume(h),e.exit(\"listItemPrefixWhitespace\"),m):r(h)}function m(h){return n.containerState.size=a+n.sliceSerialize(e.exit(\"listItemPrefix\"),!0).length,t(h)}}function X3(e,t,r){let n=this;return n.containerState._closeFlow=void 0,e.check(Na,i,a);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,je(e,t,\"listItemIndent\",n.containerState.size+1)(s)}function a(s){return n.containerState.furtherBlankLines||!Be(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Z3,t,o)(s))}function o(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,je(e,e.attempt(ir,t,r),\"linePrefix\",n.parser.constructs.disable.null.includes(\"codeIndented\")?void 0:4)(s)}}function eB(e,t,r){let n=this;return je(e,i,\"listItemIndent\",n.containerState.size+1);function i(a){let o=n.events[n.events.length-1];return o&&o[1].type===\"listItemIndent\"&&o[2].sliceSerialize(o[1],!0).length===n.containerState.size?t(a):r(a)}}function tB(e){e.exit(this.containerState.type)}function nB(e,t,r){let n=this;return je(e,i,\"listItemPrefixWhitespace\",n.parser.constructs.disable.null.includes(\"codeIndented\")?void 0:5);function i(a){let o=n.events[n.events.length-1];return!Be(a)&&o&&o[1].type===\"listItemPrefixWhitespace\"?t(a):r(a)}}var cf={name:\"setextUnderline\",tokenize:iB,resolveTo:rB};function rB(e,t){let r=e.length,n,i,a;for(;r--;)if(e[r][0]===\"enter\"){if(e[r][1].type===\"content\"){n=r;break}e[r][1].type===\"paragraph\"&&(i=r)}else e[r][1].type===\"content\"&&e.splice(r,1),!a&&e[r][1].type===\"definition\"&&(a=r);let o={type:\"setextHeading\",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type=\"setextHeadingText\",a?(e.splice(i,0,[\"enter\",o,t]),e.splice(a+1,0,[\"exit\",e[n][1],t]),e[n][1].end=Object.assign({},e[a][1].end)):e[n][1]=o,e.push([\"exit\",o,t]),e}function iB(e,t,r){let n=this,i;return a;function a(l){let c=n.events.length,d;for(;c--;)if(n.events[c][1].type!==\"lineEnding\"&&n.events[c][1].type!==\"linePrefix\"&&n.events[c][1].type!==\"content\"){d=n.events[c][1].type===\"paragraph\";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||d)?(e.enter(\"setextHeadingLine\"),i=l,o(l)):r(l)}function o(l){return e.enter(\"setextHeadingLineSequence\"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit(\"setextHeadingLineSequence\"),Be(l)?je(e,u,\"lineSuffix\")(l):u(l))}function u(l){return l===null||xe(l)?(e.exit(\"setextHeadingLine\"),t(l)):r(l)}}var a_={tokenize:aB};function aB(e){let t=this,r=e.attempt(Na,n,e.attempt(this.parser.constructs.flowInitial,i,je(e,e.attempt(this.parser.constructs.flow,i,e.attempt(cy,i)),\"linePrefix\")));return r;function n(a){if(a===null){e.consume(a);return}return e.enter(\"lineEndingBlank\"),e.consume(a),e.exit(\"lineEndingBlank\"),t.currentConstruct=void 0,r}function i(a){if(a===null){e.consume(a);return}return e.enter(\"lineEnding\"),e.consume(a),e.exit(\"lineEnding\"),t.currentConstruct=void 0,r}}var o_={resolveAll:c_()},s_=u_(\"string\"),l_=u_(\"text\");function u_(e){return{tokenize:t,resolveAll:c_(e===\"text\"?oB:void 0)};function t(r){let n=this,i=this.parser.constructs[e],a=r.attempt(i,o,s);return o;function o(c){return l(c)?a(c):s(c)}function s(c){if(c===null){r.consume(c);return}return r.enter(\"data\"),r.consume(c),u}function u(c){return l(c)?(r.exit(\"data\"),a(c)):(r.consume(c),u)}function l(c){if(c===null)return!0;let d=i[c],m=-1;if(d)for(;++m<d.length;){let h=d[m];if(!h.previous||h.previous.call(n,n.previous))return!0}return!1}}}function c_(e){return t;function t(r,n){let i=-1,a;for(;++i<=r.length;)a===void 0?r[i]&&r[i][1].type===\"data\"&&(a=i,i++):(!r[i]||r[i][1].type!==\"data\")&&(i!==a+2&&(r[a][1].end=r[i-1][1].end,r.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(r,n):r}}function oB(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===\"lineEnding\")&&e[r-1][1].type===\"data\"){let n=e[r-1][1],i=t.sliceStream(n),a=i.length,o=-1,s=0,u;for(;a--;){let l=i[a];if(typeof l==\"string\"){for(o=l.length;l.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(l===-2)u=!0,s++;else if(l!==-1){a++;break}}if(s){let l={type:r===e.length||u||s<2?\"lineSuffix\":\"hardBreakTrailing\",start:{line:n.end.line,column:n.end.column-s,offset:n.end.offset-s,_index:n.start._index+a,_bufferIndex:a?o:n.start._bufferIndex+o},end:Object.assign({},n.end)};n.end=Object.assign({},l.start),n.start.offset===n.end.offset?Object.assign(n,l):(e.splice(r,0,[\"enter\",l,t],[\"exit\",l,t]),r+=2)}r++}return e}function d_(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),i={},a=[],o=[],s=[],u=!0,l={consume:x,enter:O,exit:A,attempt:G(P),check:G(B),interrupt:G(B,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:y,sliceSerialize:g,now:v,defineSkip:D,write:h},d=t.tokenize.call(c,l),m;return t.resolveAll&&a.push(t),c;function h(te){return o=mr(o,te),I(),o[o.length-1]!==null?[]:(J(t,0),c.events=Ms(a,c.events,c),c.events)}function g(te,re){return lB(y(te),re)}function y(te){return sB(o,te)}function v(){let{line:te,column:re,offset:ne,_index:be,_bufferIndex:pe}=n;return{line:te,column:re,offset:ne,_index:be,_bufferIndex:pe}}function D(te){i[te.line]=te.column,oe()}function I(){let te;for(;n._index<o.length;){let re=o[n._index];if(typeof re==\"string\")for(te=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===te&&n._bufferIndex<re.length;)C(re.charCodeAt(n._bufferIndex));else C(re)}}function C(te){u=void 0,m=te,d=d(te)}function x(te){xe(te)?(n.line++,n.column=1,n.offset+=te===-3?2:1,oe()):te!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=te,u=!0}function O(te,re){let ne=re||{};return ne.type=te,ne.start=v(),c.events.push([\"enter\",ne,c]),s.push(ne),ne}function A(te){let re=s.pop();return re.end=v(),c.events.push([\"exit\",re,c]),re}function P(te,re){J(te,re.from)}function B(te,re){re.restore()}function G(te,re){return ne;function ne(be,pe,De){let Ce,U,Je,it;return Array.isArray(be)?Ze(be):\"tokenize\"in be?Ze([be]):N(be);function N(vt){return Wt;function Wt(Tt){let Jt=Tt!==null&&vt[Tt],en=Tt!==null&&vt.null,gn=[...Array.isArray(Jt)?Jt:Jt?[Jt]:[],...Array.isArray(en)?en:en?[en]:[]];return Ze(gn)(Tt)}}function Ze(vt){return Ce=vt,U=0,vt.length===0?De:It(vt[U])}function It(vt){return Wt;function Wt(Tt){return it=Q(),Je=vt,vt.partial||(c.currentConstruct=vt),vt.name&&c.parser.constructs.disable.null.includes(vt.name)?jt(Tt):vt.tokenize.call(re?Object.assign(Object.create(c),re):c,l,Mt,jt)(Tt)}}function Mt(vt){return u=!0,te(Je,it),pe}function jt(vt){return u=!0,it.restore(),++U<Ce.length?It(Ce[U]):De}}}function J(te,re){te.resolveAll&&!a.includes(te)&&a.push(te),te.resolve&&Kn(c.events,re,c.events.length-re,te.resolve(c.events.slice(re),c)),te.resolveTo&&(c.events=te.resolveTo(c.events,c))}function Q(){let te=v(),re=c.previous,ne=c.currentConstruct,be=c.events.length,pe=Array.from(s);return{restore:De,from:be};function De(){n=te,c.previous=re,c.currentConstruct=ne,c.events.length=be,s=pe,oe()}}function oe(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function sB(e,t){let r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(r===i)o=[e[r].slice(n,a)];else{if(o=e.slice(r,i),n>-1){let s=o[0];typeof s==\"string\"?o[0]=s.slice(n):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function lB(e,t){let r=-1,n=[],i;for(;++r<e.length;){let a=e[r],o;if(typeof a==\"string\")o=a;else switch(a){case-5:{o=\"\\r\";break}case-4:{o=`\n`;break}case-3:{o=`\\r\n`;break}case-2:{o=t?\" \":\"\t\";break}case-1:{if(!t&&i)continue;o=\" \";break}default:o=String.fromCharCode(a)}i=a===-2,n.push(o)}return n.join(\"\")}var wy={};Rf(wy,{attentionMarkers:()=>gB,contentInitial:()=>cB,disable:()=>yB,document:()=>uB,flow:()=>fB,flowInitial:()=>dB,insideSpan:()=>pB,string:()=>hB,text:()=>mB});var uB={42:ir,43:ir,45:ir,48:ir,49:ir,50:ir,51:ir,52:ir,53:ir,54:ir,55:ir,56:ir,57:ir,62:tf},cB={91:dy},dB={[-2]:Ql,[-1]:Ql,32:Ql},fB={35:hy,42:vo,45:[cf,vo],60:py,61:cf,95:vo,96:af,126:af},hB={38:rf,92:nf},mB={[-5]:Xl,[-4]:Xl,[-3]:Xl,33:yy,38:rf,42:Zl,60:[ly,gy],91:vy,92:[fy,nf],93:yo,95:Zl,96:uy},pB={null:[Zl,o_]},gB={null:[42,95]},yB={null:[]};function f_(e){let r=zC([wy,...(e||{}).extensions||[]]),n={defined:[],lazy:{},constructs:r,content:i(QC),document:i(e_),flow:i(a_),string:i(s_),text:i(l_)};return n;function i(a){return o;function o(s){return d_(n,a,s)}}}var h_=/[\\0\\t\\n\\r]/g;function m_(){let e=1,t=\"\",r=!0,n;return i;function i(a,o,s){let u=[],l,c,d,m,h;for(a=t+a.toString(o),d=0,t=\"\",r&&(a.charCodeAt(0)===65279&&d++,r=void 0);d<a.length;){if(h_.lastIndex=d,l=h_.exec(a),m=l&&l.index!==void 0?l.index:a.length,h=a.charCodeAt(m),!l){t=a.slice(d);break}if(h===10&&d===m&&n)u.push(-3),n=void 0;else switch(n&&(u.push(-5),n=void 0),d<m&&(u.push(a.slice(d,m)),e+=m-d),h){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:n=!0,e=1}d=m+1}return s&&(n&&u.push(-5),t&&u.push(t),u.push(null)),u}}function p_(e){for(;!of(e););return e}function df(e,t){let r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?\"\\uFFFD\":String.fromCharCode(r)}var vB=/\\\\([!-/:-@[-`{-~])|&(#(?:\\d{1,7}|x[\\da-f]{1,6})|[\\da-z]{1,31});/gi;function g_(e){return e.replace(vB,wB)}function wB(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),a=i===120||i===88;return df(r.slice(a?2:1),a?16:10)}return Ts(r)||e}function Fs(e){return!e||typeof e!=\"object\"?\"\":\"position\"in e||\"type\"in e?y_(e.position):\"start\"in e||\"end\"in e?y_(e):\"line\"in e||\"column\"in e?by(e):\"\"}function by(e){return v_(e&&e.line)+\":\"+v_(e&&e.column)}function y_(e){return by(e&&e.start)+\"-\"+by(e&&e.end)}function v_(e){return e&&typeof e==\"number\"?e:1}var b_={}.hasOwnProperty,ff=function(e,t,r){return typeof t!=\"string\"&&(r=t,t=void 0),bB(r)(p_(f_(r).document().write(m_()(e,t,!0))))};function bB(e){let t={transforms:[],canContainEols:[\"emphasis\",\"fragment\",\"heading\",\"paragraph\",\"strong\"],enter:{autolink:s(Vt),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:s(xn),blockQuote:s(Jt),characterEscape:Q,characterReference:Q,codeFenced:s(en),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:s(en,u),codeText:s(gn,u),codeTextData:Q,data:Q,codeFlowValue:Q,definition:s(yn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:s(vn),hardBreakEscape:s(jn),hardBreakTrailing:s(jn),htmlFlow:s(sn,u),htmlFlowData:Q,htmlText:s(sn,u),htmlTextData:Q,image:s(Rt),label:u,link:s(Vt),listItem:s(Rr),listItemValue:g,listOrdered:s(Sr,h),listUnordered:s(Sr),paragraph:s(Bt),reference:It,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:s(xn),strong:s(Hr),thematicBreak:s(At)},exit:{atxHeading:c(),atxHeadingSequence:P,autolink:c(),autolinkEmail:Tt,autolinkProtocol:Wt,blockQuote:c(),characterEscapeValue:oe,characterReferenceMarkerHexadecimal:jt,characterReferenceMarkerNumeric:jt,characterReferenceValue:vt,codeFenced:c(I),codeFencedFence:D,codeFencedFenceInfo:y,codeFencedFenceMeta:v,codeFlowValue:oe,codeIndented:c(C),codeText:c(pe),codeTextData:oe,data:oe,definition:c(),definitionDestinationString:A,definitionLabelString:x,definitionTitleString:O,emphasis:c(),hardBreakEscape:c(re),hardBreakTrailing:c(re),htmlFlow:c(ne),htmlFlowData:oe,htmlText:c(be),htmlTextData:oe,image:c(Ce),label:Je,labelText:U,lineEnding:te,link:c(De),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Mt,resourceDestinationString:it,resourceTitleString:N,resource:Ze,setextHeading:c(J),setextHeadingLineSequence:G,setextHeadingText:B,strong:c(),thematicBreak:c()}};D_(t,(e||{}).mdastExtensions||[]);let r={};return n;function n(Z){let me={type:\"root\",children:[]},Ie={stack:[me],tokenStack:[],config:t,enter:l,exit:d,buffer:u,resume:m,setData:a,getData:o},at=[],Dt=-1;for(;++Dt<Z.length;)if(Z[Dt][1].type===\"listOrdered\"||Z[Dt][1].type===\"listUnordered\")if(Z[Dt][0]===\"enter\")at.push(Dt);else{let Cn=at.pop();Dt=i(Z,Cn,Dt)}for(Dt=-1;++Dt<Z.length;){let Cn=t[Z[Dt][0]];b_.call(Cn,Z[Dt][1].type)&&Cn[Z[Dt][1].type].call(Object.assign({sliceSerialize:Z[Dt][2].sliceSerialize},Ie),Z[Dt][1])}if(Ie.tokenStack.length>0){let Cn=Ie.tokenStack[Ie.tokenStack.length-1];(Cn[1]||w_).call(Ie,void 0,Cn[0])}for(me.position={start:Ra(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:Ra(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},Dt=-1;++Dt<t.transforms.length;)me=t.transforms[Dt](me)||me;return me}function i(Z,me,Ie){let at=me-1,Dt=-1,Cn=!1,_n,Ht,ar,ht;for(;++at<=Ie;){let St=Z[at];if(St[1].type===\"listUnordered\"||St[1].type===\"listOrdered\"||St[1].type===\"blockQuote\"?(St[0]===\"enter\"?Dt++:Dt--,ht=void 0):St[1].type===\"lineEndingBlank\"?St[0]===\"enter\"&&(_n&&!ht&&!Dt&&!ar&&(ar=at),ht=void 0):St[1].type===\"linePrefix\"||St[1].type===\"listItemValue\"||St[1].type===\"listItemMarker\"||St[1].type===\"listItemPrefix\"||St[1].type===\"listItemPrefixWhitespace\"||(ht=void 0),!Dt&&St[0]===\"enter\"&&St[1].type===\"listItemPrefix\"||Dt===-1&&St[0]===\"exit\"&&(St[1].type===\"listUnordered\"||St[1].type===\"listOrdered\")){if(_n){let L=at;for(Ht=void 0;L--;){let K=Z[L];if(K[1].type===\"lineEnding\"||K[1].type===\"lineEndingBlank\"){if(K[0]===\"exit\")continue;Ht&&(Z[Ht][1].type=\"lineEndingBlank\",Cn=!0),K[1].type=\"lineEnding\",Ht=L}else if(!(K[1].type===\"linePrefix\"||K[1].type===\"blockQuotePrefix\"||K[1].type===\"blockQuotePrefixWhitespace\"||K[1].type===\"blockQuoteMarker\"||K[1].type===\"listItemIndent\"))break}ar&&(!Ht||ar<Ht)&&(_n._spread=!0),_n.end=Object.assign({},Ht?Z[Ht][1].start:St[1].end),Z.splice(Ht||at,0,[\"exit\",_n,St[2]]),at++,Ie++}St[1].type===\"listItemPrefix\"&&(_n={type:\"listItem\",_spread:!1,start:Object.assign({},St[1].start),end:void 0},Z.splice(at,0,[\"enter\",_n,St[2]]),at++,Ie++,ar=void 0,ht=!0)}}return Z[me][1]._spread=Cn,Ie}function a(Z,me){r[Z]=me}function o(Z){return r[Z]}function s(Z,me){return Ie;function Ie(at){l.call(this,Z(at),at),me&&me.call(this,at)}}function u(){this.stack.push({type:\"fragment\",children:[]})}function l(Z,me,Ie){return this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([me,Ie]),Z.position={start:Ra(me.start)},Z}function c(Z){return me;function me(Ie){Z&&Z.call(this,Ie),d.call(this,Ie)}}function d(Z,me){let Ie=this.stack.pop(),at=this.tokenStack.pop();if(at)at[0].type!==Z.type&&(me?me.call(this,Z,at[0]):(at[1]||w_).call(this,Z,at[0]));else throw new Error(\"Cannot close `\"+Z.type+\"` (\"+Fs({start:Z.start,end:Z.end})+\"): it\\u2019s not open\");return Ie.position.end=Ra(Z.end),Ie}function m(){return _s(this.stack.pop())}function h(){a(\"expectingFirstListItemValue\",!0)}function g(Z){if(o(\"expectingFirstListItemValue\")){let me=this.stack[this.stack.length-2];me.start=Number.parseInt(this.sliceSerialize(Z),10),a(\"expectingFirstListItemValue\")}}function y(){let Z=this.resume(),me=this.stack[this.stack.length-1];me.lang=Z}function v(){let Z=this.resume(),me=this.stack[this.stack.length-1];me.meta=Z}function D(){o(\"flowCodeInside\")||(this.buffer(),a(\"flowCodeInside\",!0))}function I(){let Z=this.resume(),me=this.stack[this.stack.length-1];me.value=Z.replace(/^(\\r?\\n|\\r)|(\\r?\\n|\\r)$/g,\"\"),a(\"flowCodeInside\")}function C(){let Z=this.resume(),me=this.stack[this.stack.length-1];me.value=Z.replace(/(\\r?\\n|\\r)$/g,\"\")}function x(Z){let me=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=me,Ie.identifier=ta(this.sliceSerialize(Z)).toLowerCase()}function O(){let Z=this.resume(),me=this.stack[this.stack.length-1];me.title=Z}function A(){let Z=this.resume(),me=this.stack[this.stack.length-1];me.url=Z}function P(Z){let me=this.stack[this.stack.length-1];if(!me.depth){let Ie=this.sliceSerialize(Z).length;me.depth=Ie}}function B(){a(\"setextHeadingSlurpLineEnding\",!0)}function G(Z){let me=this.stack[this.stack.length-1];me.depth=this.sliceSerialize(Z).charCodeAt(0)===61?1:2}function J(){a(\"setextHeadingSlurpLineEnding\")}function Q(Z){let me=this.stack[this.stack.length-1],Ie=me.children[me.children.length-1];(!Ie||Ie.type!==\"text\")&&(Ie=rn(),Ie.position={start:Ra(Z.start)},me.children.push(Ie)),this.stack.push(Ie)}function oe(Z){let me=this.stack.pop();me.value+=this.sliceSerialize(Z),me.position.end=Ra(Z.end)}function te(Z){let me=this.stack[this.stack.length-1];if(o(\"atHardBreak\")){let Ie=me.children[me.children.length-1];Ie.position.end=Ra(Z.end),a(\"atHardBreak\");return}!o(\"setextHeadingSlurpLineEnding\")&&t.canContainEols.includes(me.type)&&(Q.call(this,Z),oe.call(this,Z))}function re(){a(\"atHardBreak\",!0)}function ne(){let Z=this.resume(),me=this.stack[this.stack.length-1];me.value=Z}function be(){let Z=this.resume(),me=this.stack[this.stack.length-1];me.value=Z}function pe(){let Z=this.resume(),me=this.stack[this.stack.length-1];me.value=Z}function De(){let Z=this.stack[this.stack.length-1];if(o(\"inReference\")){let me=o(\"referenceType\")||\"shortcut\";Z.type+=\"Reference\",Z.referenceType=me,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;a(\"referenceType\")}function Ce(){let Z=this.stack[this.stack.length-1];if(o(\"inReference\")){let me=o(\"referenceType\")||\"shortcut\";Z.type+=\"Reference\",Z.referenceType=me,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;a(\"referenceType\")}function U(Z){let me=this.sliceSerialize(Z),Ie=this.stack[this.stack.length-2];Ie.label=g_(me),Ie.identifier=ta(me).toLowerCase()}function Je(){let Z=this.stack[this.stack.length-1],me=this.resume(),Ie=this.stack[this.stack.length-1];if(a(\"inReference\",!0),Ie.type===\"link\"){let at=Z.children;Ie.children=at}else Ie.alt=me}function it(){let Z=this.resume(),me=this.stack[this.stack.length-1];me.url=Z}function N(){let Z=this.resume(),me=this.stack[this.stack.length-1];me.title=Z}function Ze(){a(\"inReference\")}function It(){a(\"referenceType\",\"collapsed\")}function Mt(Z){let me=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=me,Ie.identifier=ta(this.sliceSerialize(Z)).toLowerCase(),a(\"referenceType\",\"full\")}function jt(Z){a(\"characterReferenceType\",Z.type)}function vt(Z){let me=this.sliceSerialize(Z),Ie=o(\"characterReferenceType\"),at;Ie?(at=df(me,Ie===\"characterReferenceMarkerNumeric\"?10:16),a(\"characterReferenceType\")):at=Ts(me);let Dt=this.stack.pop();Dt.value+=at,Dt.position.end=Ra(Z.end)}function Wt(Z){oe.call(this,Z);let me=this.stack[this.stack.length-1];me.url=this.sliceSerialize(Z)}function Tt(Z){oe.call(this,Z);let me=this.stack[this.stack.length-1];me.url=\"mailto:\"+this.sliceSerialize(Z)}function Jt(){return{type:\"blockquote\",children:[]}}function en(){return{type:\"code\",lang:null,meta:null,value:\"\"}}function gn(){return{type:\"inlineCode\",value:\"\"}}function yn(){return{type:\"definition\",identifier:\"\",label:null,title:null,url:\"\"}}function vn(){return{type:\"emphasis\",children:[]}}function xn(){return{type:\"heading\",depth:void 0,children:[]}}function jn(){return{type:\"break\"}}function sn(){return{type:\"html\",value:\"\"}}function Rt(){return{type:\"image\",title:null,url:\"\",alt:null}}function Vt(){return{type:\"link\",title:null,url:\"\",children:[]}}function Sr(Z){return{type:\"list\",ordered:Z.type===\"listOrdered\",start:null,spread:Z._spread,children:[]}}function Rr(Z){return{type:\"listItem\",spread:Z._spread,checked:null,children:[]}}function Bt(){return{type:\"paragraph\",children:[]}}function Hr(){return{type:\"strong\",children:[]}}function rn(){return{type:\"text\",value:\"\"}}function At(){return{type:\"thematicBreak\"}}}function Ra(e){return{line:e.line,column:e.column,offset:e.offset}}function D_(e,t){let r=-1;for(;++r<t.length;){let n=t[r];Array.isArray(n)?D_(e,n):DB(e,n)}}function DB(e,t){let r;for(r in t)if(b_.call(t,r)){if(r===\"canContainEols\"){let n=t[r];n&&e[r].push(...n)}else if(r===\"transforms\"){let n=t[r];n&&e[r].push(...n)}else if(r===\"enter\"||r===\"exit\"){let n=t[r];n&&Object.assign(e[r],n)}}}function w_(e,t){throw e?new Error(\"Cannot close `\"+e.type+\"` (\"+Fs({start:e.start,end:e.end})+\"): a different token (`\"+t.type+\"`, \"+Fs({start:t.start,end:t.end})+\") is open\"):new Error(\"Cannot close document, a token (`\"+t.type+\"`, \"+Fs({start:t.start,end:t.end})+\") is still open\")}var E_=Ct(S_(),1),eu=Object.assign(wo(Error),{eval:wo(EvalError),range:wo(RangeError),reference:wo(ReferenceError),syntax:wo(SyntaxError),type:wo(TypeError),uri:wo(URIError)});function wo(e){return t.displayName=e.displayName||e.name,t;function t(r,...n){let i=r&&(0,E_.default)(r,...n);return new e(i)}}var hf={}.hasOwnProperty,k_={yaml:\"-\",toml:\"+\"};function mf(e){let t=[],r=-1,n=Array.isArray(e)?e:e?[e]:[\"yaml\"];for(;++r<n.length;)t[r]=SB(n[r]);return t}function SB(e){let t=e;if(typeof t==\"string\"){if(!hf.call(k_,t))throw eu(\"Missing matter definition for `%s`\",t);t={type:t,marker:k_[t]}}else if(typeof t!=\"object\")throw eu(\"Expected matter to be an object, not `%j`\",t);if(!hf.call(t,\"type\"))throw eu(\"Missing `type` in matter `%j`\",t);if(!hf.call(t,\"fence\")&&!hf.call(t,\"marker\"))throw eu(\"Missing `marker` or `fence` in matter `%j`\",t);return t}function Sy(e){let t=mf(e),r={},n={},i=-1;for(;++i<t.length;){let a=t[i];r[a.type]=EB(a),n[a.type]=kB,n[a.type+\"Value\"]=xB}return{enter:r,exit:n}}function EB(e){return t;function t(r){this.enter({type:e.type,value:\"\"},r),this.buffer()}}function kB(e){let t=this.resume(),r=this.exit(e);r.value=t.replace(/^(\\r?\\n|\\r)|(\\r?\\n|\\r)$/g,\"\")}function xB(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function ky(e){let t=mf(e),r={},n=-1;for(;++n<t.length;){let i=t[n],a=Ey(i,\"open\").charCodeAt(0),o=CB(i),s=r[a];Array.isArray(s)?s.push(o):r[a]=[o]}return{flow:r}}function CB(e){let t=e.anywhere,r=e.type,n=r+\"Fence\",i=n+\"Sequence\",a=r+\"Value\",o={tokenize:c,partial:!0},s,u=0;return{tokenize:l,concrete:!0};function l(d,m,h){let g=this;return y;function y(P){let B=g.now();return B.column===1&&(B.line===1||t)&&(s=Ey(e,\"open\"),u=0,P===s.charCodeAt(u))?(d.enter(r),d.enter(n),d.enter(i),v(P)):h(P)}function v(P){return u===s.length?(d.exit(i),Be(P)?(d.enter(\"whitespace\"),D(P)):I(P)):P===s.charCodeAt(u++)?(d.consume(P),v):h(P)}function D(P){return Be(P)?(d.consume(P),D):(d.exit(\"whitespace\"),I(P))}function I(P){return xe(P)?(d.exit(n),d.enter(\"lineEnding\"),d.consume(P),d.exit(\"lineEnding\"),s=Ey(e,\"close\"),u=0,d.attempt(o,A,C)):h(P)}function C(P){return P===null||xe(P)?O(P):(d.enter(a),x(P))}function x(P){return P===null||xe(P)?(d.exit(a),O(P)):(d.consume(P),x)}function O(P){return P===null?h(P):(d.enter(\"lineEnding\"),d.consume(P),d.exit(\"lineEnding\"),d.attempt(o,A,C))}function A(P){return d.exit(r),m(P)}}function c(d,m,h){let g=0;return y;function y(C){return C===s.charCodeAt(g)?(d.enter(n),d.enter(i),v(C)):h(C)}function v(C){return g===s.length?(d.exit(i),Be(C)?(d.enter(\"whitespace\"),D(C)):I(C)):C===s.charCodeAt(g++)?(d.consume(C),v):h(C)}function D(C){return Be(C)?(d.consume(C),D):(d.exit(\"whitespace\"),I(C))}function I(C){return C===null||xe(C)?(d.exit(n),m(C)):h(C)}}}function Ey(e,t){return e.marker?x_(e.marker,t).repeat(3):x_(e.fence,t)}function x_(e,t){return typeof e==\"string\"?e:e[t]}var L_=require(\"obsidian\");function Is(e){return e[e.length-1]}function C_(){let e=\"blockid\",t=\"^\";function r(i,a,o){let s=!1,u=0;return l;function l(h){return h!==t.charCodeAt(u)?o(h):(i.enter(e),i.enter(`${e}Marker`),c(h))}function c(h){return u===t.length?(i.exit(`${e}Marker`),d(h)):h!==t.charCodeAt(u)?o(h):(i.consume(h),u++,c)}function d(h){return i.enter(`${e}Data`),i.enter(`${e}Target`),m(h)}function m(h){return Be(h)?o(h):xe(h)||h===null?s?(i.exit(`${e}Target`),i.exit(`${e}Data`),i.exit(e),a(h)):o(h):(s=!0,i.consume(h),m)}}let n={tokenize:r};return{text:{[t.charCodeAt(0)]:n}}}function __(){let e=\"blockid\";function t(i){this.enter({type:e,value:null},i)}function r(i){let a=this.sliceSerialize(i),o=Is(this.stack);o.value=a}function n(i){this.exit(i)}return{enter:{[e]:t},exit:{[`${e}Target`]:r,[e]:n}}}function As(e,t,r){function n(a,o,s){let u=!1,l=0,c=0;return d;function d(v){return v!==t.charCodeAt(l)?s(v):(a.enter(e),a.enter(`${e}Marker`),m(v))}function m(v){return l===t.length?(a.exit(`${e}Marker`),h(v)):v!==t.charCodeAt(l)?s(v):(a.consume(v),l++,m)}function h(v){return xe(v)||v===null?s(v):(a.enter(`${e}Data`),a.enter(`${e}Target`),g(v))}function g(v){return v===r.charCodeAt(c)?u?(a.exit(`${e}Target`),a.exit(`${e}Data`),a.enter(`${e}Marker`),y(v)):s(v):xe(v)||v===null?s(v):(Kt(v)||(u=!0),a.consume(v),g)}function y(v){return c===r.length?(a.exit(`${e}Marker`),a.exit(e),o(v)):v!==r.charCodeAt(c)?s(v):(a.consume(v),c++,y)}}let i={tokenize:n};return{text:{[t.charCodeAt(0)]:i}}}function Os(e,t){function r(a){this.enter({type:e,value:null},a)}function n(a){let o=this.sliceSerialize(a),s=Is(this.stack);s.value=o,t&&t(o,s)}function i(a){this.exit(a)}return{enter:{[e]:r},exit:{[`${e}Target`]:n,[e]:i}}}function M_(e){function t(n){e(this.stack[this.stack.length-1],!1),this.exit(n)}function r(n){e(this.stack[this.stack.length-1],!0),this.exit(n)}return{exit:{link:t,image:r}}}function T_(){let e=\"hashtag\";function r(i,a,o){let s=!1,u=0,l=this;return c;function c(g){return g!==35||l.previous!==null&&!/\\s/.test(String.fromCharCode(l.previous))?o(g):(i.enter(e),i.enter(`${e}Marker`),d(g))}function d(g){return u===1?(i.exit(`${e}Marker`),m(g)):g!==35?o(g):(i.consume(g),u++,d)}function m(g){return i.enter(`${e}Data`),i.enter(`${e}Target`),h(g)}function h(g){return g===null||Kt(g)||/[\\u2000-\\u206F\\u2E00-\\u2E7F'!\"#$%&()*+,.:;<=>?@^`{|}~[\\]\\\\\\s\\n\\r]/.test(String.fromCharCode(g))?s?(i.exit(`${e}Target`),i.exit(`${e}Data`),i.exit(e),a(g)):o(g):(s=!0,i.consume(g),h)}}return{text:{35:{tokenize:r}}}}function F_(){let e=\"hashtag\";function t(i){this.enter({type:e,value:null},i)}function r(i){let a=this.sliceSerialize(i),o=Is(this.stack);o.value=a}function n(i){this.exit(i)}return{enter:{[e]:t},exit:{[`${e}Target`]:r,[e]:n}}}var Ls={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533};var xy={data:\"data\",whitespace:\"whitespace\",lineEnding:\"lineEnding\",lineEndingBlank:\"lineEndingBlank\",linePrefix:\"linePrefix\",lineSuffix:\"lineSuffix\",atxHeading:\"atxHeading\",atxHeadingSequence:\"atxHeadingSequence\",atxHeadingText:\"atxHeadingText\",autolink:\"autolink\",autolinkEmail:\"autolinkEmail\",autolinkMarker:\"autolinkMarker\",autolinkProtocol:\"autolinkProtocol\",characterEscape:\"characterEscape\",characterEscapeValue:\"characterEscapeValue\",characterReference:\"characterReference\",characterReferenceMarker:\"characterReferenceMarker\",characterReferenceMarkerNumeric:\"characterReferenceMarkerNumeric\",characterReferenceMarkerHexadecimal:\"characterReferenceMarkerHexadecimal\",characterReferenceValue:\"characterReferenceValue\",codeFenced:\"codeFenced\",codeFencedFence:\"codeFencedFence\",codeFencedFenceSequence:\"codeFencedFenceSequence\",codeFencedFenceInfo:\"codeFencedFenceInfo\",codeFencedFenceMeta:\"codeFencedFenceMeta\",codeFlowValue:\"codeFlowValue\",codeIndented:\"codeIndented\",codeText:\"codeText\",codeTextData:\"codeTextData\",codeTextPadding:\"codeTextPadding\",codeTextSequence:\"codeTextSequence\",content:\"content\",definition:\"definition\",definitionDestination:\"definitionDestination\",definitionDestinationLiteral:\"definitionDestinationLiteral\",definitionDestinationLiteralMarker:\"definitionDestinationLiteralMarker\",definitionDestinationRaw:\"definitionDestinationRaw\",definitionDestinationString:\"definitionDestinationString\",definitionLabel:\"definitionLabel\",definitionLabelMarker:\"definitionLabelMarker\",definitionLabelString:\"definitionLabelString\",definitionMarker:\"definitionMarker\",definitionTitle:\"definitionTitle\",definitionTitleMarker:\"definitionTitleMarker\",definitionTitleString:\"definitionTitleString\",emphasis:\"emphasis\",emphasisSequence:\"emphasisSequence\",emphasisText:\"emphasisText\",escapeMarker:\"escapeMarker\",hardBreakEscape:\"hardBreakEscape\",hardBreakTrailing:\"hardBreakTrailing\",htmlFlow:\"htmlFlow\",htmlFlowData:\"htmlFlowData\",htmlText:\"htmlText\",htmlTextData:\"htmlTextData\",image:\"image\",label:\"label\",labelText:\"labelText\",labelLink:\"labelLink\",labelImage:\"labelImage\",labelMarker:\"labelMarker\",labelImageMarker:\"labelImageMarker\",labelEnd:\"labelEnd\",link:\"link\",paragraph:\"paragraph\",reference:\"reference\",referenceMarker:\"referenceMarker\",referenceString:\"referenceString\",resource:\"resource\",resourceDestination:\"resourceDestination\",resourceDestinationLiteral:\"resourceDestinationLiteral\",resourceDestinationLiteralMarker:\"resourceDestinationLiteralMarker\",resourceDestinationRaw:\"resourceDestinationRaw\",resourceDestinationString:\"resourceDestinationString\",resourceMarker:\"resourceMarker\",resourceTitle:\"resourceTitle\",resourceTitleMarker:\"resourceTitleMarker\",resourceTitleString:\"resourceTitleString\",setextHeading:\"setextHeading\",setextHeadingText:\"setextHeadingText\",setextHeadingLine:\"setextHeadingLine\",setextHeadingLineSequence:\"setextHeadingLineSequence\",strong:\"strong\",strongSequence:\"strongSequence\",strongText:\"strongText\",thematicBreak:\"thematicBreak\",thematicBreakSequence:\"thematicBreakSequence\",blockQuote:\"blockQuote\",blockQuotePrefix:\"blockQuotePrefix\",blockQuoteMarker:\"blockQuoteMarker\",blockQuotePrefixWhitespace:\"blockQuotePrefixWhitespace\",listOrdered:\"listOrdered\",listUnordered:\"listUnordered\",listItemIndent:\"listItemIndent\",listItemMarker:\"listItemMarker\",listItemPrefix:\"listItemPrefix\",listItemPrefixWhitespace:\"listItemPrefixWhitespace\",listItemValue:\"listItemValue\",chunkDocument:\"chunkDocument\",chunkContent:\"chunkContent\",chunkFlow:\"chunkFlow\",chunkText:\"chunkText\",chunkString:\"chunkString\"};var _B={tokenize:MB},A_={text:{[Ls.leftSquareBracket]:_B}};function MB(e,t,r){let n=this;return i;function i(s){return n.previous!==Ls.eof||!n._gfmTasklistFirstContentOfListItem?r(s):(e.enter(\"taskListCheck\"),e.enter(\"taskListCheckMarker\"),e.consume(s),e.exit(\"taskListCheckMarker\"),a)}function a(s){return Be(s)?(e.enter(\"taskListCheckValueUnchecked\"),e.consume(s),e.exit(\"taskListCheckValueUnchecked\"),o):s!==Ls.rightSquareBracket?(e.enter(\"taskListCheckValueChecked\"),e.consume(s),e.exit(\"taskListCheckValueChecked\"),o):r(s)}function o(s){return s===Ls.rightSquareBracket?(e.enter(\"taskListCheckMarker\"),e.consume(s),e.exit(\"taskListCheckMarker\"),e.exit(\"taskListCheck\"),e.check({tokenize:TB},t,r)):r(s)}}function TB(e,t,r){let n=this;return je(e,i,xy.whitespace);function i(a){let o=n.events[n.events.length-1];return o&&o[1].type===xy.whitespace&&a!==Ls.eof&&!Kt(a)?t(a):r(a)}}var O_={exit:{taskListCheckValueChecked:I_,taskListCheckValueUnchecked:I_,paragraph:FB}};function I_(e){let t=this.stack[this.stack.length-2];t.checked=e.type===\"taskListCheckValueChecked\",t.checkChar=this.sliceSerialize(e)}function FB(e){let t=this.stack[this.stack.length-2],r=this.stack[this.stack.length-1],n=t.children,i=r.children[0],a=-1,o;if(t&&t.type===\"listItem\"&&typeof t.checked==\"boolean\"&&i&&i.type===\"text\"){for(;++a<n.length;){let s=n[a];if(s.type===\"paragraph\"){o=s;break}}o===r&&(i.value=i.value.slice(1),i.value.length===0?r.children.shift():r.position&&i.position&&typeof i.position.start.offset==\"number\"&&(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}this.exit(e)}function IB(e){let t=-1,r=0;for(let n=0,i=e.length;n<i;n++){if(r<3)if(e[n]===\"-\"){r++;continue}else throw new Error(\"Error parsing frontmatter\");if(t<0&&(t=n),e[n]===\"-\"&&/[\\r\\n]/.test(e[n-1])&&e[n+1]===\"-\"&&e[n+2]===\"-\")return(0,L_.parseYaml)(e.slice(t,n-1).trim())}}function AB(e){let t=!1,r=0,n=-1;for(let i=e.length-1;i>=0;i--){if(!t&&/[`%\\n\\r]/.test(e[i])){e[i]===\"`\"&&(r++,r===3&&(t=!0,n=i-1));continue}else if(!t)return{};if(e[i]===\"`\"&&e[i-1]===\"`\"&&e[i-2]===\"`\"&&/[\\r\\n]/.test(e[i-3]))return JSON.parse(e.slice(i+1,n).trim())}}function P_(e){return[A_,As(\"date\",`${e.getSetting(\"date-trigger\")}{`,\"}\"),As(\"dateLink\",`${e.getSetting(\"date-trigger\")}[[`,\"]]\"),As(\"time\",`${e.getSetting(\"time-trigger\")}{`,\"}\"),As(\"embedWikilink\",\"![[\",\"]]\"),As(\"wikilink\",\"[[\",\"]]\"),T_(),C_()]}function N_(e){return[O_,Os(\"date\",(t,r)=>{t&&(r.date=t)}),Os(\"dateLink\",(t,r)=>{t&&(r.date=t)}),Os(\"time\",(t,r)=>{t&&(r.time=t)}),Os(\"embedWikilink\",(t,r)=>{if(!t)return;let n=Ym(t),i=e.app.metadataCache.getFirstLinkpathDest(n.root,e.file.path);r.fileAccessor={target:n.root,isEmbed:!0,stats:i==null?void 0:i.stat}}),Os(\"wikilink\",(t,r)=>{if(!t)return;let n=Ym(t),i=e.app.metadataCache.getFirstLinkpathDest(n.root,e.file.path);if(r.fileAccessor={target:n.root,isEmbed:!1},i){let a=fg(e,i);r.fileMetadata=a.fileMetadata,r.fileMetadataOrder=a.fileMetadataOrder}}),M_((t,r)=>{if(!t.url||/:\\/\\//.test(t.url)||!/.md$/.test(t.url))return;let n=e.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(t.url),e.file.path);if(r)t.type=\"embedLink\",t.fileAccessor={target:decodeURIComponent(t.url),isEmbed:!0,stats:n.stat};else if(t.fileAccessor={target:decodeURIComponent(t.url),isEmbed:!1},n){let i=fg(e,n);t.fileMetadata=i.fileMetadata,t.fileMetadataOrder=i.fileMetadataOrder}}),F_(),__()]}function R_(e,t){let r=IB(t),i={...AB(t)},a={};return Object.keys(r).forEach(o=>{if(o===_t){let s=r[o]===\"basic\"?\"board\":r[o];i[o]=s,a[o]=s}else Yx.has(o)?i[o]=r[o]:a[o]=r[o]}),e.compileSettings(i),{settings:i,frontmatter:a,ast:ff(t,{extensions:[ky([\"yaml\"]),...P_(e)],mdastExtensions:[Sy([\"yaml\"]),...N_(e)]})}}function Cy(e,t){return ff(t,{extensions:P_(e),mdastExtensions:N_(e)})}function gf(e,t,r){var v;let n=e.getSetting(\"move-tags\"),i=e.getSetting(\"move-dates\"),a=r.children.first(),o=r.children.last(),s=a.type===\"paragraph\"?ef(a).start:a.position.start.offset,u=o.type===\"paragraph\"?ef(o).end:o.position.end.offset,l={start:s,end:u},c=oy(t,l);c===\"[\"+(r.checked?r.checkChar:\" \")+\"]\"&&(c=\"\");let d=c,m=\"\";Xd(r,[\"text\",\"wikilink\",\"embedWikilink\",\"image\",\"inlineCode\",\"code\",\"hashtag\"],(D,I,C)=>{var x,O;D.type===\"hashtag\"?(O=(x=C.children.first())==null?void 0:x.value)!=null&&O.startsWith(\"```\")||(m+=\" #\"+D.value):m+=D.value||D.alt||\"\"});let h={titleRaw:qk(Eg(Dg(c))),blockId:void 0,title:\"\",titleSearch:m,titleSearchRaw:m,metadata:{dateStr:void 0,date:void 0,time:void 0,timeStr:void 0,tags:[],fileAccessor:void 0,file:void 0,fileMetadata:void 0,fileMetadataOrder:void 0},checked:r.checked,checkChar:r.checked&&r.checkChar||\" \"};Xd(r,D=>D.type!==\"paragraph\",(D,I,C)=>{var O,A;let x=D;if(x.type===\"blockid\")return h.blockId=x.value,!0;if(x.type===\"hashtag\"&&!((A=(O=C.children.first())==null?void 0:O.value)!=null&&A.startsWith(\"```\")))return h.metadata.tags||(h.metadata.tags=[]),h.metadata.tags.push(\"#\"+x.value),n&&(d=xd(d,{start:D.position.start.offset-l.start,end:D.position.end.offset-l.start})),!0;if(x.type===\"date\"||x.type===\"dateLink\")return h.metadata.dateStr=x.date,i&&(d=xd(d,{start:D.position.start.offset-l.start,end:D.position.end.offset-l.start})),!0;if(x.type===\"time\")return h.metadata.timeStr=x.time,i&&(d=xd(d,{start:D.position.start.offset-l.start,end:D.position.end.offset-l.start})),!0;if(x.type===\"embedWikilink\")return h.metadata.fileAccessor=x.fileAccessor,!0;if(x.type===\"wikilink\"||x.type===\"link\"&&x.fileAccessor)return h.metadata.fileAccessor=x.fileAccessor,h.metadata.fileMetadata=x.fileMetadata,h.metadata.fileMetadataOrder=x.fileMetadataOrder,!0;if(x.type===\"embedLink\")return h.metadata.fileAccessor=x.fileAccessor,!0}),h.title=$C(e,Eg(Kk(d)));let g=h.title.indexOf(`\n`),y=gb(h.title,!0);if(y!=null&&y.length){let D=h.metadata.inlineMetadata=y.reduce((x,O)=>(yi.has(O.key)?(g<=0||O.end<g)&&x.push(O):x.push(O),x),[]),I=e.getSetting(\"move-task-metadata\"),C=e.getSetting(\"inline-metadata-position\")!==\"body\";if(I||C){let x=h.title;for(let O of[...D].reverse()){let A=yi.has(O.key);A&&!I||!A&&!C||(x=x.slice(0,O.start)+x.slice(O.end))}h.title=x}}return(v=h.metadata.tags)==null||v.sort(fr),h}function OB(e,t,r){if(e.type!==\"heading\"||_s(e,{includeImageAlt:!1})!==R(\"Archive\"))return!1;let n=HC(t,r);return n&&n.type===\"thematicBreak\"}function B_(e,t,r,n,i){let a=[],o=[];return n.children.forEach((s,u)=>{if(s.type===\"heading\"){let l=OB(s,n.children,u),c=ef(s),d=oy(i,c),m=!1,h=BC(n.children,u,\"list\",g=>{if(g.type===\"heading\")return!1;if(g.type===\"paragraph\"){let y=_s(g);if(y.startsWith(\"%% kanban:settings\"))return!1;if(y===R(\"Complete\"))return m=!0,!0}return!0});if(l&&h){o.push(...h.children.map(g=>({...Pc,id:et(),data:gf(e,i,g)})));return}h?a.push({...Ea,children:h.children.map(g=>{let y=gf(e,i,g);return{...Pc,id:et(),data:y}}),id:et(),data:{...co(d),shouldMarkItemsComplete:m}}):a.push({...Ea,children:[],id:et(),data:{...co(d),shouldMarkItemsComplete:m}})}}),{...Nc,id:e.file.path,children:a,data:{settings:t,frontmatter:r,archive:o,isSearching:!1,errors:[]}}}function _y(e,t,r){let n=`- [${t.data.checkChar}] ${Sg(Cd(r),t)}`,i=Cy(e,n),a=gf(e,n,i.children[0].children[0]),o=(0,pf.default)(t,{data:{$set:a}});try{ql(e,o)}catch(s){console.error(s)}return o}function V_(e,t,r,n){let i=`- [${r}] ${Cd(t)}`,a=Cy(e,i),o=gf(e,i,a.children[0].children[0]);o.forceEditMode=!!n;let s={...Pc,id:et(),data:o};try{ql(e,s)}catch(u){console.error(u)}return s}function $_(e,t){try{return(0,pf.default)(t,{children:{$set:t.children.map(r=>(0,pf.default)(r,{children:{$set:r.children.map(n=>_y(e,n,n.data.titleRaw))}}))}})}catch(r){throw e.setError(r),r}}function U_(e){return`- [${e.data.checkChar}] ${Sg(Cd(e.data.titleRaw),e)}`}function LB(e){let t=[];return t.push(`## ${jk(cd(e.data.title,e.data.maxItems))}`),t.push(\"\"),e.data.shouldMarkItemsComplete&&t.push(gk),e.children.forEach(r=>{t.push(U_(r))}),t.push(\"\"),t.push(\"\"),t.push(\"\"),t.join(`\n`)}function PB(e){if(e.length){let t=[yk,\"\",`## ${R(\"Archive\")}`,\"\"];return e.forEach(r=>{t.push(U_(r))}),t.join(`\n`)}return\"\"}function W_(e){let t=e.children.reduce((n,i)=>n+LB(i),\"\");return[\"---\",\"\",(0,H_.stringifyYaml)(e.data.frontmatter),\"---\",\"\",\"\"].join(`\n`)+t+PB(e.data.archive)+vk(e)}var NB=[\"id\",\"date\",\"time\",\"titleSearch\",\"titleSearchRaw\",\"file\"],yf=class{constructor(t){this.stateManager=t}newItem(t,r,n){return V_(this.stateManager,t,r,n)}updateItemContent(t,r){return _y(this.stateManager,t,r)}boardToMd(t){return W_(t)}mdToBoard(t){let{ast:r,settings:n,frontmatter:i}=R_(this.stateManager,t),a=B_(this.stateManager,n,i,r,t),{state:o}=this.stateManager,s=(0,z_.getAPI)();if(!this.stateManager.hasError()&&o){let u=OC(o,a,c=>NB.includes(c.last()),c=>c?c instanceof Y_.TFile?c.path:Ni(c)||Array.isArray(c)?String(c):s&&!s.value.isObject(c)?s.value.toString(c):String(c):String(c)),l=PC(o,u);return WC(this.stateManager,l,u)}return UC(this.stateManager,a)}reparseBoard(){return $_(this.stateManager,this.stateManager.state)}};var vf=class{constructor(t,r,n,i,a){this.stateReceivers=[];this.settingsNotifiers=new Map;this.viewSet=new Set;this.compiledSettings={};this.getSetting=(t,r)=>{var n;return(r==null?void 0:r[t])!==void 0?r[t]:((n=this.compiledSettings)==null?void 0:n[t])!==void 0?this.compiledSettings[t]:this.getSettingRaw(t)};this.getSettingRaw=(t,r)=>{var n,i,a;return(r==null?void 0:r[t])!==void 0?r[t]:((a=(i=(n=this.state)==null?void 0:n.data)==null?void 0:i.settings)==null?void 0:a[t])!==void 0?this.state.data.settings[t]:this.getGlobalSetting(t)};this.getGlobalSetting=t=>{let r=this.getGlobalSettings();return(r==null?void 0:r[t])!==void 0?r[t]:null};this.app=t,this.file=r.file,this.onEmpty=i,this.getGlobalSettings=a,this.parser=new yf(this),this.registerView(r,n,!0)}getAView(){return this.viewSet.values().next().value}hasError(){var t,r,n;return!!((n=(r=(t=this.state)==null?void 0:t.data)==null?void 0:r.errors)!=null&&n.length)}async registerView(t,r,n){this.viewSet.has(t)||this.viewSet.add(t),await new Promise(i=>activeWindow.setTimeout(i,10)),n?await this.newBoard(t,r):await t.prerender(this.state),t.populateViewState(this.state.data.settings)}unregisterView(t){this.viewSet.has(t)&&(this.viewSet.delete(t),this.viewSet.size===0&&this.onEmpty())}buildSettingRetrievers(){return{getGlobalSettings:this.getGlobalSettings,getGlobalSetting:this.getGlobalSetting,getSetting:this.getSetting}}async newBoard(t,r){try{let n=this.getParsedBoard(r);await t.prerender(n),this.setState(n,!1)}catch(n){this.setError(n)}}saveToDisk(){if(this.state.data.errors.length>0)return;let t=this.getAView();if(t){let r=this.parser.boardToMd(this.state);t.requestSaveToDisk(r),this.viewSet.forEach(n=>{n.data=r})}}softRefresh(){this.stateReceivers.forEach(t=>t({...this.state}))}forceRefresh(){if(this.state)try{this.compileSettings(),this.state=this.parser.reparseBoard(),this.stateReceivers.forEach(t=>t(this.state)),this.settingsNotifiers.forEach(t=>{t.forEach(r=>r())}),this.viewSet.forEach(t=>t.initHeaderButtons())}catch(t){console.error(t),this.setError(t)}}setState(t,r=!0){var n;try{let i=(n=this.state)==null?void 0:n.data.settings,a=typeof t==\"function\"?t(this.state):t,o=a==null?void 0:a.data.settings;i&&o&&bk(i,o)?(this.state=(0,Ps.default)(this.state,{data:{settings:{$set:o}}}),this.compileSettings(),this.state=this.parser.reparseBoard()):(this.state=a,this.compileSettings()),this.viewSet.forEach(s=>{s.initHeaderButtons(),s.validatePreviewCache(a)}),r&&this.saveToDisk(),this.stateReceivers.forEach(s=>s(this.state)),i!==o&&o&&this.settingsNotifiers.forEach((s,u)=>{(!i&&o||i[u]!==o[u])&&s.forEach(l=>l())})}catch(i){console.error(i),this.setError(i)}}useState(){let[t,r]=Ne(this.state);return Ae(()=>(this.stateReceivers.push(n=>r(n)),r(this.state),()=>{this.stateReceivers.remove(r)}),[]),t}useSetting(t){let[r,n]=Ne(this.getSetting(t));return Ae(()=>{let i=()=>n(this.getSetting(t));return this.settingsNotifiers.has(t)?this.settingsNotifiers.get(t).push(i):this.settingsNotifiers.set(t,[i]),()=>{this.settingsNotifiers.get(t).remove(i)}},[]),r}compileSettings(t){var l,c,d,m,h,g,y,v,D,I;let r=this.getGlobalSetting(\"metadata-keys\")||[],n=this.getSettingRaw(\"metadata-keys\",t)||[],i=Array.from(new Set([...r,...n])),a=this.getSettingRaw(\"date-format\",t)||ja(this.app),o=this.getSettingRaw(\"date-display-format\",t)||a,s=this.getSettingRaw(\"time-format\",t)||Ho(this.app),u=this.getSettingRaw(\"archive-date-format\",t)||`${a} ${s}`;this.compiledSettings={[_t]:this.getSettingRaw(_t,t)||\"board\",\"date-format\":a,\"date-display-format\":o,\"date-time-display-format\":o+\" \"+s,\"date-trigger\":this.getSettingRaw(\"date-trigger\",t)||Ad,\"inline-metadata-position\":this.getSettingRaw(\"inline-metadata-position\",t)||Ul,\"time-format\":s,\"time-trigger\":this.getSettingRaw(\"time-trigger\",t)||Od,\"link-date-to-daily-note\":this.getSettingRaw(\"link-date-to-daily-note\",t),\"move-dates\":this.getSettingRaw(\"move-dates\",t),\"move-tags\":this.getSettingRaw(\"move-tags\",t),\"move-task-metadata\":this.getSettingRaw(\"move-task-metadata\",t),\"metadata-keys\":i,\"archive-date-separator\":this.getSettingRaw(\"archive-date-separator\")||\"\",\"archive-date-format\":u,\"show-add-list\":(l=this.getSettingRaw(\"show-add-list\",t))!=null?l:!0,\"show-archive-all\":(c=this.getSettingRaw(\"show-archive-all\",t))!=null?c:!0,\"show-view-as-markdown\":(d=this.getSettingRaw(\"show-view-as-markdown\",t))!=null?d:!0,\"show-board-settings\":(m=this.getSettingRaw(\"show-board-settings\",t))!=null?m:!0,\"show-search\":(h=this.getSettingRaw(\"show-search\",t))!=null?h:!0,\"show-set-view\":(g=this.getSettingRaw(\"show-set-view\",t))!=null?g:!0,\"tag-colors\":(y=this.getSettingRaw(\"tag-colors\",t))!=null?y:[],\"tag-sort\":(v=this.getSettingRaw(\"tag-sort\",t))!=null?v:[],\"date-colors\":(D=this.getSettingRaw(\"date-colors\",t))!=null?D:[],\"tag-action\":(I=this.getSettingRaw(\"tag-action\",t))!=null?I:\"obsidian\"}}getParsedBoard(t){let r=t.trim(),n={...Nc,id:this.file.path,children:[],data:{archive:[],settings:{[_t]:\"board\"},frontmatter:{},isSearching:!1,errors:[]}};try{r&&(n=this.parser.mdToBoard(r))}catch(i){console.error(i),n=(0,Ps.default)(n,{data:{errors:{$push:[{description:i.toString(),stack:i.stack}]}}})}return n}setError(t){this.setState((0,Ps.default)(this.state,{data:{errors:{$push:[{description:t.toString(),stack:t.stack}]}}}),!1)}onFileMetadataChange(){this.reparseBoardFromMd()}async reparseBoardFromMd(){try{this.setState(this.getParsedBoard(this.getAView().data),!1)}catch(t){console.error(t),this.setError(t)}}async archiveCompletedCards(){let t=this.state,r=[],n=!!this.getSetting(\"archive-with-date\"),i=this.getSetting(\"archive-date-separator\"),a=this.getSetting(\"archive-date-format\"),o=this.getSetting(\"append-archive-date\"),s=l=>{let c=[(0,K_.moment)().format(a)];i&&c.push(i),c.push(l.data.titleRaw),o&&c.reverse();let d=c.join(\" \");return this.parser.updateItemContent(l,d)},u=t.children.map(l=>(0,Ps.default)(l,{children:{$set:l.children.filter(c=>{let d=c.data.checked&&c.data.checkChar===Zn();return(l.data.shouldMarkItemsComplete||d)&&r.push(c),!d&&!l.data.shouldMarkItemsComplete})}}));try{this.setState((0,Ps.default)(t,{children:{$set:u},data:{archive:{$push:n?await Promise.all(r.map(l=>s(l))):r}}}))}catch(l){this.setError(l)}}getNewItem(t,r,n){return this.parser.newItem(t,r,n)}updateItemContent(t,r){return this.parser.updateItemContent(t,r)}};function RB(e){let t=e.embedRegistry.embedByExtension.md({app:e,containerEl:createDiv(),state:{}},null,\"\");t.load(),t.editable=!0,t.showEditor();let r=Object.getPrototypeOf(Object.getPrototypeOf(t.editMode)).constructor;return t.unload(),r}var wf=class extends Rn.Plugin{constructor(){super(...arguments);this.settings={};this.kanbanFileModes={};this.stateManagers=new Map;this.windowRegistry=new Map;this._loaded=!1;this.isShiftPressed=!1;this.handleShift=r=>{this.isShiftPressed=r.shiftKey}}async loadSettings(){this.settings=Object.assign({},await this.loadData())}async saveSettings(){await this.saveData(this.settings)}unload(){super.unload(),Promise.all(this.app.workspace.getLeavesOfType(qr).map(r=>(this.kanbanFileModes[r.id]=\"markdown\",this.setMarkdownView(r))))}onunload(){this.MarkdownEditor=null,this.windowRegistry.forEach((r,n)=>{r.viewStateReceivers.forEach(i=>i([])),this.unmount(n)}),this.unmount(window),this.stateManagers.clear(),this.windowRegistry.clear(),this.kanbanFileModes={},this.app.workspace.unregisterHoverLinkSource(_t)}async onload(){var r,n;await this.loadSettings(),this.MarkdownEditor=RB(this.app),this.registerEditorSuggest(new nd(this.app,this)),this.registerEditorSuggest(new td(this.app,this)),this.registerEvent(this.app.workspace.on(\"window-open\",(i,a)=>{this.mount(a)})),this.registerEvent(this.app.workspace.on(\"window-close\",(i,a)=>{this.unmount(a)})),this.settingsTab=new Ud(this,{onSettingsChange:async i=>{this.settings=i,await this.saveSettings(),this.stateManagers.forEach(a=>{a.forceRefresh()})}}),this.addSettingTab(this.settingsTab),this.registerView(qr,i=>new pn(i,this)),this.registerMonkeyPatches(),this.registerCommands(),this.registerEvents(),this.mount(window),(n=(r=this.app.workspace.floatingSplit)==null?void 0:r.children)==null||n.forEach(i=>{this.mount(i.win)}),this.registerDomEvent(window,\"keydown\",this.handleShift),this.registerDomEvent(window,\"keyup\",this.handleShift),this.addRibbonIcon(ho,R(\"Create new board\"),()=>{this.newKanban()})}getKanbanViews(r){let n=this.windowRegistry.get(r);return n?Array.from(n.viewMap.values()):[]}getKanbanView(r,n){let i=this.windowRegistry.get(n);if(i!=null&&i.viewMap.has(r))return i.viewMap.get(r);for(let a of this.windowRegistry.values())if(a.viewMap.has(r))return a.viewMap.get(r);return null}getStateManager(r){return this.stateManagers.get(r)}getStateManagerFromViewID(r,n){let i=this.getKanbanView(r,n);return i?this.stateManagers.get(i.file):null}useKanbanViews(r){let[n,i]=Ne(this.getKanbanViews(r));return Ae(()=>{let a=this.windowRegistry.get(r);return a==null||a.viewStateReceivers.push(i),()=>{a==null||a.viewStateReceivers.remove(i)}},[r]),n}addView(r,n,i){let a=r.getWindow(),o=this.windowRegistry.get(a);if(!o)return;o.viewMap.has(r.id)||o.viewMap.set(r.id,r);let s=r.file;this.stateManagers.has(s)?this.stateManagers.get(s).registerView(r,n,i):this.stateManagers.set(s,new vf(this.app,r,n,()=>this.stateManagers.delete(s),()=>this.settings)),o.viewStateReceivers.forEach(u=>u(this.getKanbanViews(a)))}removeView(r){let n=Array.from(this.windowRegistry.entries()).find(([,s])=>s.viewMap.has(r.id),[]);if(!n)return;let[i,a]=n,o=r.file;a.viewMap.has(r.id)&&a.viewMap.delete(r.id),this.stateManagers.has(o)&&(this.stateManagers.get(o).unregisterView(r),a.viewStateReceivers.forEach(s=>s(this.getKanbanViews(i))))}handleViewFileRename(r,n){let i=r.getWindow();if(!this.windowRegistry.has(i))return;let a=this.windowRegistry.get(i),o=`${r.leaf.id}:::${n}`;a.viewMap.has(o)&&a.viewMap.delete(o),a.viewMap.has(r.id)||a.viewMap.set(r.id,r),r.isPrimary&&this.getStateManager(r.file).softRefresh()}mount(r){if(this.windowRegistry.has(r))return;let n=r.document.body.createDiv();this.windowRegistry.set(r,{viewMap:new Map,viewStateReceivers:[],appRoot:n}),Li(cx(r,this),n)}unmount(r){if(!this.windowRegistry.has(r))return;let n=this.windowRegistry.get(r);for(let i of n.viewMap.values())this.removeView(i);Pi(n.appRoot),n.appRoot.remove(),n.viewMap.clear(),n.viewStateReceivers.length=0,n.appRoot=null,this.windowRegistry.delete(r)}async setMarkdownView(r,n=!0){await r.setViewState({type:\"markdown\",state:r.view.getState(),popstate:!0},{focus:n})}async setKanbanView(r){await r.setViewState({type:qr,state:r.view.getState(),popstate:!0})}async newKanban(r){var i;let n=r||this.app.fileManager.getNewFileParent(((i=app.workspace.getActiveFile())==null?void 0:i.path)||\"\");try{let a=await app.fileManager.createNewMarkdownFile(n,R(\"Untitled Kanban\"));await this.app.vault.modify(a,dg),await this.app.workspace.getLeaf().setViewState({type:qr,state:{file:a.path}})}catch(a){console.error(\"Error creating kanban board:\",a)}}registerEvents(){this.registerEvent(this.app.workspace.on(\"file-menu\",(n,i,a,o)=>{if(a===\"link-context-menu\")return;let s=i instanceof Rn.TFile,u=i instanceof Rn.TFolder,l=(o==null?void 0:o.view)instanceof Rn.MarkdownView,c=(o==null?void 0:o.view)instanceof pn;if(u){n.addItem(d=>{d.setSection(\"action-primary\").setTitle(R(\"New kanban board\")).setIcon(ho).onClick(()=>this.newKanban(i))});return}if(!Rn.Platform.isMobile&&s&&o&&a===\"sidebar-context-menu\"&&hg(i)){let d=this.getKanbanViews(Dn(o.view.containerEl)),m=!1;for(let h of d)if(h.file===i){h.onPaneMenu(n,\"more-options\",!1),m=!0;break}if(!m){n.addItem(h=>{h.setTitle(R(\"Open as kanban board\")).setIcon(ho).setSection(\"pane\").onClick(()=>{this.kanbanFileModes[o.id||i.path]=qr,this.setKanbanView(o)})});return}}if(l&&s&&[\"more-options\",\"pane-more-options\",\"tab-header\"].includes(a)&&hg(i)&&n.addItem(d=>{d.setTitle(R(\"Open as kanban board\")).setIcon(ho).setSection(\"pane\").onClick(()=>{this.kanbanFileModes[o.id||i.path]=qr,this.setKanbanView(o)})}),s&&c&&([\"pane-more-options\",\"tab-header\"].includes(a)&&n.addItem(d=>{d.setTitle(R(\"Open as markdown\")).setIcon(ho).setSection(\"pane\").onClick(()=>{this.kanbanFileModes[o.id||i.path]=\"markdown\",this.setMarkdownView(o)})}),Rn.Platform.isMobile)){let d=this.stateManagers.get(i),m=o.view,h=m.viewSettings[_t]||d.getSetting(_t);n.addItem(g=>{g.setTitle(R(\"Add a list\")).setIcon(\"lucide-plus-circle\").setSection(\"pane\").onClick(()=>{m.emitter.emit(\"showLaneForm\",void 0)})}).addItem(g=>{g.setTitle(R(\"Archive completed cards\")).setIcon(\"lucide-archive\").setSection(\"pane\").onClick(()=>{d.archiveCompletedCards()})}).addItem(g=>{g.setTitle(R(\"Archive completed cards\")).setIcon(\"lucide-archive\").setSection(\"pane\").onClick(()=>{this.stateManagers.get(i).archiveCompletedCards()})}).addItem(g=>g.setTitle(R(\"View as board\")).setSection(\"pane\").setIcon(\"lucide-trello\").setChecked(h===\"basic\"||h===\"board\").onClick(()=>m.setView(\"board\"))).addItem(g=>g.setTitle(R(\"View as table\")).setSection(\"pane\").setIcon(\"lucide-table\").setChecked(h===\"table\").onClick(()=>m.setView(\"table\"))).addItem(g=>g.setTitle(R(\"View as list\")).setSection(\"pane\").setIcon(\"lucide-server\").setChecked(h===\"list\").onClick(()=>m.setView(\"list\"))).addItem(g=>g.setTitle(R(\"Open board settings\")).setSection(\"pane\").setIcon(\"lucide-settings\").onClick(()=>m.getBoardSettings()))}})),this.registerEvent(app.vault.on(\"rename\",(n,i)=>{app.workspace.getLeavesOfType(qr).forEach(o=>{o.view.handleRename(n.path,i)})}));let r=(0,Rn.debounce)(n=>{this.stateManagers.forEach(i=>{i.file!==n&&i.onFileMetadataChange()})},2e3,!0);this.registerEvent(app.vault.on(\"modify\",n=>{n instanceof Rn.TFile&&r(n)})),this.registerEvent(app.metadataCache.on(\"changed\",n=>{r(n)})),this.registerEvent(app.metadataCache.on(\"dataview:metadata-change\",(n,i)=>{r(i)})),this.registerEvent(app.metadataCache.on(\"dataview:api-ready\",()=>{this.stateManagers.forEach(n=>{n.forceRefresh()})})),app.workspace.registerHoverLinkSource(_t,{display:\"Kanban\",defaultMod:!0})}registerCommands(){this.addCommand({id:\"create-new-kanban-board\",name:R(\"Create new board\"),callback:()=>this.newKanban()}),this.addCommand({id:\"archive-completed-cards\",name:R(\"Archive completed cards in active board\"),checkCallback:r=>{let n=app.workspace.getActiveViewOfType(pn);if(!n)return!1;if(r)return!0;this.stateManagers.get(n.file).archiveCompletedCards()}}),this.addCommand({id:\"toggle-kanban-view\",name:R(\"Toggle between Kanban and markdown mode\"),checkCallback:r=>{let n=app.workspace.getActiveFile();if(!n)return!1;let i=app.metadataCache.getFileCache(n),a=!!(i!=null&&i.frontmatter)&&!!i.frontmatter[_t];if(r)return a;let o=app.workspace.getActiveViewOfType(pn);if(o)this.kanbanFileModes[o.leaf.id||n.path]=\"markdown\",this.setMarkdownView(o.leaf);else if(a){let s=app.workspace.getActiveViewOfType(Rn.MarkdownView);s&&(this.kanbanFileModes[s.leaf.id||n.path]=qr,this.setKanbanView(s.leaf))}}}),this.addCommand({id:\"convert-to-kanban\",name:R(\"Convert empty note to Kanban\"),checkCallback:r=>{let n=app.workspace.getActiveViewOfType(Rn.MarkdownView);if(!n)return!1;let i=n.file.stat.size===0;if(r)return i;i&&app.vault.modify(n.file,dg).then(()=>{this.setKanbanView(n.leaf)}).catch(a=>console.error(a))}}),this.addCommand({id:\"add-kanban-lane\",name:R(\"Add a list\"),checkCallback:r=>{let n=app.workspace.getActiveViewOfType(pn);if(r)return n&&n instanceof pn;n&&n instanceof pn&&n.emitter.emit(\"showLaneForm\",void 0)}}),this.addCommand({id:\"view-board\",name:R(\"View as board\"),checkCallback:r=>{let n=app.workspace.getActiveViewOfType(pn);if(r)return n&&n instanceof pn;n&&n instanceof pn&&n.setView(\"board\")}}),this.addCommand({id:\"view-table\",name:R(\"View as table\"),checkCallback:r=>{let n=app.workspace.getActiveViewOfType(pn);if(r)return n&&n instanceof pn;n&&n instanceof pn&&n.setView(\"table\")}}),this.addCommand({id:\"view-list\",name:R(\"View as list\"),checkCallback:r=>{let n=app.workspace.getActiveViewOfType(pn);if(r)return n&&n instanceof pn;n&&n instanceof pn&&n.setView(\"list\")}}),this.addCommand({id:\"open-board-settings\",name:R(\"Open board settings\"),checkCallback:r=>{let n=app.workspace.getActiveViewOfType(pn);if(!n)return!1;if(r)return!0;n.getBoardSettings()}})}registerMonkeyPatches(){let r=this;this.app.workspace.onLayoutReady(()=>{this.register(fu(app.commands,{executeCommand(n){return function(i){let a=app.workspace.getActiveViewOfType(pn);return a&&(i!=null&&i.id)&&a.emitter.emit(\"hotkey\",{commandId:i.id}),n.call(this,i)}}}))}),this.register(fu(this.app.workspace,{setActiveLeaf(n){return function(...i){n.apply(this,i);let a=this.getActiveViewOfType(pn);a!=null&&a.activeEditor&&(this.activeEditor=a.activeEditor)}}})),this.register(fu(Rn.WorkspaceLeaf.prototype,{detach(n){return function(){var a;let i=(a=this.view)==null?void 0:a.getState();return i!=null&&i.file&&r.kanbanFileModes[this.id||i.file]&&delete r.kanbanFileModes[this.id||i.file],n.apply(this)}},setViewState(n){return function(i,...a){var o;if(r._loaded&&i.type===\"markdown\"&&((o=i.state)!=null&&o.file)&&r.kanbanFileModes[this.id||i.state.file]!==\"markdown\"){let s=r.app.metadataCache.getCache(i.state.file);if(s!=null&&s.frontmatter&&s.frontmatter[_t]){let u={...i,type:qr};return r.kanbanFileModes[i.state.file]=qr,n.apply(this,[u,...a])}}return n.apply(this,[i,...a])}}}))}};\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license  MIT\n */\n/*! Bundled license information:\n\nmark.js/dist/mark.js:\n  (*!***************************************************\n  * mark.js v8.11.1\n  * https://markjs.io/\n  * Copyright (c) 2014\u20132018, Julian K\u00fchnel\n  * Released under the MIT license https://git.io/vwTVl\n  *****************************************************)\n\nmoment/moment.js:\n  (*! moment.js *)\n  (*! version : 2.29.4 *)\n  (*! authors : Tim Wood, Iskren Chernev, Moment.js contributors *)\n  (*! license : MIT *)\n  (*! momentjs.com *)\n\nchoices.js/public/assets/scripts/choices.js:\n  (*! choices.js v9.0.1 | \u00a9 2019 Josh Johnson | https://github.com/jshjohnson/Choices#readme *)\n  (*!\n   * Fuse.js v3.4.5 - Lightweight fuzzy-search (http://fusejs.io)\n   * \n   * Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)\n   * All Rights Reserved. Apache Software License 2.0\n   * \n   * http://www.apache.org/licenses/LICENSE-2.0\n   *)\n\nis-plain-object/dist/is-plain-object.mjs:\n  (*!\n   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>\n   *\n   * Copyright (c) 2014-2017, Jon Schlinkert.\n   * Released under the MIT License.\n   *)\n\n@tanstack/table-core/build/lib/index.mjs:\n  (**\n     * table-core\n     *\n     * Copyright (c) TanStack\n     *\n     * This source code is licensed under the MIT license found in the\n     * LICENSE.md file in the root directory of this source tree.\n     *\n     * @license MIT\n     *)\n\n@tanstack/react-table/build/lib/index.mjs:\n  (**\n     * react-table\n     *\n     * Copyright (c) TanStack\n     *\n     * This source code is licensed under the MIT license found in the\n     * LICENSE.md file in the root directory of this source tree.\n     *\n     * @license MIT\n     *)\n\n@tanstack/match-sorter-utils/build/lib/index.mjs:\n  (**\n     * match-sorter-utils\n     *\n     * Copyright (c) TanStack\n     *\n     * This source code is licensed under the MIT license found in the\n     * LICENSE.md file in the root directory of this source tree.\n     *\n     * @license MIT\n     *)\n  (**\n   * @name match-sorter\n   * @license MIT license.\n   * @copyright (c) 2099 Kent C. Dodds\n   * @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)\n   *)\n*/\n\n/* nosourcemap */",
    "File: /home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js\nLanguage: javascript\n\n\"use strict\";var obsidian_module=require(\"obsidian\"),state=require(\"@codemirror/state\"),view=require(\"@codemirror/view\");const INITIAL_TIMESTAMP=Date.now();var LZString=function(){var r=String.fromCharCode,o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",n=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\",e={};function t(r,o){if(!e[r]){e[r]={};for(var n=0;n<r.length;n++)e[r][r.charAt(n)]=n}return e[r][o]}var i={compressToBase64:function(r){if(null==r)return\"\";var n=i._compress(r,6,function(r){return o.charAt(r)});switch(n.length%4){default:case 0:return n;case 1:return n+\"===\";case 2:return n+\"==\";case 3:return n+\"=\"}},decompressFromBase64:function(r){return null==r?\"\":\"\"==r?null:i._decompress(r.length,32,function(n){return t(o,r.charAt(n))})},compressToUTF16:function(o){return null==o?\"\":i._compress(o,15,function(o){return r(o+32)})+\" \"},decompressFromUTF16:function(r){return null==r?\"\":\"\"==r?null:i._decompress(r.length,16384,function(o){return r.charCodeAt(o)-32})},compressToUint8Array:function(r){for(var o=i.compress(r),n=new Uint8Array(2*o.length),e=0,t=o.length;e<t;e++){var s=o.charCodeAt(e);n[2*e]=s>>>8,n[2*e+1]=s%256}return n},decompressFromUint8Array:function(o){if(null==o)return i.decompress(o);for(var n=new Array(o.length/2),e=0,t=n.length;e<t;e++)n[e]=256*o[2*e]+o[2*e+1];var s=[];return n.forEach(function(o){s.push(r(o))}),i.decompress(s.join(\"\"))},compressToEncodedURIComponent:function(r){return null==r?\"\":i._compress(r,6,function(r){return n.charAt(r)})},decompressFromEncodedURIComponent:function(r){return null==r?\"\":\"\"==r?null:(r=r.replace(/ /g,\"+\"),i._decompress(r.length,32,function(o){return t(n,r.charAt(o))}))},compress:function(o){return i._compress(o,16,function(o){return r(o)})},_compress:function(r,o,n){if(null==r)return\"\";var e,t,i,s={},u={},a=\"\",p=\"\",c=\"\",l=2,f=3,h=2,d=[],m=0,v=0;for(i=0;i<r.length;i+=1)if(a=r.charAt(i),Object.prototype.hasOwnProperty.call(s,a)||(s[a]=f++,u[a]=!0),p=c+a,Object.prototype.hasOwnProperty.call(s,p))c=p;else{if(Object.prototype.hasOwnProperty.call(u,c)){if(c.charCodeAt(0)<256){for(e=0;e<h;e++)m<<=1,v==o-1?(v=0,d.push(n(m)),m=0):v++;for(t=c.charCodeAt(0),e=0;e<8;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;e<h;e++)m=m<<1|t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=c.charCodeAt(0),e=0;e<16;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;0==--l&&(l=Math.pow(2,h),h++),s[p]=f++,c=String(a)}if(\"\"!==c){if(Object.prototype.hasOwnProperty.call(u,c)){if(c.charCodeAt(0)<256){for(e=0;e<h;e++)m<<=1,v==o-1?(v=0,d.push(n(m)),m=0):v++;for(t=c.charCodeAt(0),e=0;e<8;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;e<h;e++)m=m<<1|t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=c.charCodeAt(0),e=0;e<16;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;0==--l&&(l=Math.pow(2,h),h++)}for(t=2,e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;for(;;){if(m<<=1,v==o-1){d.push(n(m));break}v++}return d.join(\"\")},decompress:function(r){return null==r?\"\":\"\"==r?null:i._decompress(r.length,32768,function(o){return r.charCodeAt(o)})},_decompress:function(o,n,e){var t,i,s,u,a,p,c,l=[],f=4,h=4,d=3,m=\"\",v=[],g={val:e(0),position:n,index:1};for(t=0;t<3;t+=1)l[t]=t;for(s=0,a=Math.pow(2,2),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 2:return\"\"}for(l[3]=c,i=c,v.push(c);;){if(g.index>o)return\"\";for(s=0,a=Math.pow(2,d),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(c=s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 2:return v.join(\"\")}if(0==f&&(f=Math.pow(2,d),d++),l[c])m=l[c];else{if(c!==h)return null;m=i+i.charAt(0)}v.push(m),l[h++]=i+m.charAt(0),i=m,0==--f&&(f=Math.pow(2,d),d++)}}};return i}();\"function\"==typeof define&&define.amd?define(function(){return LZString}):\"undefined\"!=typeof module&&null!=module?module.exports=LZString:\"undefined\"!=typeof angular&&null!=angular&&angular.module(\"LZString\",[]).factory(\"LZString\",function(){return LZString});",
    "File: /home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js\nLanguage: javascript\n\nlet REACT_PACKAGES = `!function(){var e,t;e=this,t=function(e){function M(e){return null!==e&&\"object\"==typeof e&&\"function\"==typeof(e=te&&e[te]||e[\"@@iterator\"])?e:null}function t(e,t,n){this.props=e,this.context=t,this.refs=oe,this.updater=n||ne}function n(){}function r(e,t,n){this.props=e,this.context=t,this.refs=oe,this.updater=n||ne}function o(e,t,n){var r,o={},u=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(u=\"\"+t.key),t)ae.call(t,r)&&!ie.hasOwnProperty(r)&&(o[r]=t[r]);var i=arguments.length-2;if(1===i)o.children=n;else if(1<i){for(var l=Array(i),c=0;c<i;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(r in i=e.defaultProps)void 0===o[r]&&(o[r]=i[r]);return{$$typeof:g,type:e,key:u,ref:a,props:o,_owner:w.current}}function D(e,t){return{$$typeof:g,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function c(e){return\"object\"==typeof e&&null!==e&&e.$$typeof===g}function U(e){var t={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+e.replace(/[=:]/g,function(e){return t[e]})}function f(e,t){return\"object\"==typeof e&&null!==e&&null!=e.key?U(\"\"+e.key):t.toString(36)}function s(e,t,n,r,o){var u=!1;if(null===(e=\"undefined\"!==(i=typeof e)&&\"boolean\"!==i?e:null))u=!0;else switch(i){case\"string\":case\"number\":u=!0;break;case\"object\":switch(e.$$typeof){case g:case H:u=!0}}if(u)return o=o(u=e),e=\"\"===r?\".\"+f(u,0):r,ue(o)?(n=\"\",s(o,t,n=null!=e?e.replace(le,\"$&/\")+\"/\":n,\"\",function(e){return e})):null!=o&&(c(o)&&(o=D(o,n+(!o.key||u&&u.key===o.key?\"\":(\"\"+o.key).replace(le,\"$&/\")+\"/\")+e)),t.push(o)),1;if(u=0,r=\"\"===r?\".\":r+\":\",ue(e))for(var a=0;a<e.length;a++){var i,l=r+f(i=e[a],a);u+=s(i,t,n,l,o)}else if(\"function\"==typeof(l=M(e)))for(e=l.call(e),a=0;!(i=e.next()).done;)u+=s(i=i.value,t,n,l=r+f(i,a++),o);else if(\"object\"===i)throw t=String(e),Error(\"Objects are not valid as a React child (found: \"+(\"[object Object]\"===t?\"object with keys {\"+Object.keys(e).join(\", \")+\"}\":t)+\"). If you meant to render a collection of children, use an array instead.\");return u}function u(e,t,n){var r;return null==e||(r=0,s(e,e=[],\"\",\"\",function(e){return t.call(n,e,r++)})),e}function V(t){var e;if(-1===t._status&&((e=(e=t._result)()).then(function(e){0!==t._status&&-1!==t._status||(t._status=1,t._result=e)},function(e){0!==t._status&&-1!==t._status||(t._status=2,t._result=e)}),-1===t._status)&&(t._status=0,t._result=e),1===t._status)return t._result.default;throw t._result}function a(e,t){var n=e.length;for(e.push(t);0<n;){var r=n-1>>>1,o=e[r];if(!(0<p(o,t)))break;e[r]=t,e[n]=o,n=r}}function i(e){return 0===e.length?null:e[0]}function l(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;for(var r=0,o=e.length,u=o>>>1;r<u;){var a=2*(r+1)-1,i=e[a],l=a+1,c=e[l];if(p(i,n)<0)r=l<o&&p(c,i)<0?(e[r]=c,e[l]=n,l):(e[r]=i,e[a]=n,a);else{if(!(l<o&&p(c,n)<0))break;e[r]=c,e[l]=n,r=l}}}return t}function p(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}function y(e){for(var t=i(E);null!==t;){if(null===t.callback)l(E);else{if(!(t.startTime<=e))break;l(E),t.sortIndex=t.expirationTime,a(C,t)}t=i(E)}}function d(e){var t;j=!1,y(e),I||(null!==i(C)?(I=!0,m(b)):null!==(t=i(E))&&_(d,t.startTime-e))}function b(e,t){I=!1,j&&(j=!1,se(L),L=-1),$=!0;var n=P;try{for(y(t),R=i(C);null!==R&&(!(R.expirationTime>t)||e&&!q());){var r,o=R.callback;\"function\"==typeof o?(R.callback=null,P=R.priorityLevel,r=o(R.expirationTime<=t),t=v(),\"function\"==typeof r?R.callback=r:R===i(C)&&l(C),y(t)):l(C),R=i(C)}var u,a=null!==R||(null!==(u=i(E))&&_(d,u.startTime-t),!1);return a}finally{R=null,P=n,$=!1}}function q(){return!(v()-de<ye)}function m(e){O=e,T||(T=!0,be())}function _(e,t){L=fe(function(){e(v())},t)}function A(e){throw Error(\"act(...) is not supported in production builds of React.\")}var N,h,B,v,z,g=Symbol.for(\"react.element\"),H=Symbol.for(\"react.portal\"),W=Symbol.for(\"react.fragment\"),Y=Symbol.for(\"react.strict_mode\"),G=Symbol.for(\"react.profiler\"),J=Symbol.for(\"react.provider\"),K=Symbol.for(\"react.context\"),Q=Symbol.for(\"react.forward_ref\"),X=Symbol.for(\"react.suspense\"),Z=Symbol.for(\"react.memo\"),ee=Symbol.for(\"react.lazy\"),te=Symbol.iterator,ne={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){},enqueueReplaceState:function(e,t,n,r){},enqueueSetState:function(e,t,n,r){}},re=Object.assign,oe={},k=(t.prototype.isReactComponent={},t.prototype.setState=function(e,t){if(\"object\"!=typeof e&&\"function\"!=typeof e&&null!=e)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,e,t,\"setState\")},t.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,\"forceUpdate\")},n.prototype=t.prototype,r.prototype=new n),ue=(k.constructor=r,re(k,t.prototype),k.isPureReactComponent=!0,Array.isArray),ae=Object.prototype.hasOwnProperty,w={current:null},ie={key:!0,ref:!0,__self:!0,__source:!0},le=/\\\\/+/g,S={current:null},x={transition:null},C=(v=\"object\"==typeof performance&&\"function\"==typeof performance.now?(N=performance,function(){return N.now()}):(h=Date,B=h.now(),function(){return h.now()-B}),[]),E=[],ce=1,R=null,P=3,$=!1,I=!1,j=!1,fe=\"function\"==typeof setTimeout?setTimeout:null,se=\"function\"==typeof clearTimeout?clearTimeout:null,pe=\"undefined\"!=typeof setImmediate?setImmediate:null,T=(\"undefined\"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling),!1),O=null,L=-1,ye=5,de=-1,F=function(){if(null!==O){var e=v(),t=(de=e,!0);try{t=O(!0,e)}finally{t?be():(T=!1,O=null)}}else T=!1},be=\"function\"==typeof pe?function(){pe(F)}:\"undefined\"!=typeof MessageChannel?(z=(k=new MessageChannel).port2,k.port1.onmessage=F,function(){z.postMessage(null)}):function(){fe(F,0)};k={ReactCurrentDispatcher:S,ReactCurrentOwner:w,ReactCurrentBatchConfig:x,Scheduler:{__proto__:null,unstable_ImmediatePriority:1,unstable_UserBlockingPriority:2,unstable_NormalPriority:3,unstable_IdlePriority:5,unstable_LowPriority:4,unstable_runWithPriority:function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=P;P=e;try{return t()}finally{P=n}},unstable_next:function(e){switch(P){case 1:case 2:case 3:var t=3;break;default:t=P}var n=P;P=t;try{return e()}finally{P=n}},unstable_scheduleCallback:function(e,t,n){var r=v();switch(n=\"object\"==typeof n&&null!==n&&\"number\"==typeof(n=n.delay)&&0<n?r+n:r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return e={id:ce++,callback:t,priorityLevel:e,startTime:n,expirationTime:o=n+o,sortIndex:-1},r<n?(e.sortIndex=n,a(E,e),null===i(C)&&e===i(E)&&(j?(se(L),L=-1):j=!0,_(d,n-r))):(e.sortIndex=o,a(C,e),I||$||(I=!0,m(b))),e},unstable_cancelCallback:function(e){e.callback=null},unstable_wrapCallback:function(t){var n=P;return function(){var e=P;P=n;try{return t.apply(this,arguments)}finally{P=e}}},unstable_getCurrentPriorityLevel:function(){return P},unstable_shouldYield:q,unstable_requestPaint:function(){},unstable_continueExecution:function(){I||$||(I=!0,m(b))},unstable_pauseExecution:function(){},unstable_getFirstCallbackNode:function(){return i(C)},get unstable_now(){return v},unstable_forceFrameRate:function(e){e<0||125<e?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):ye=0<e?Math.floor(1e3/e):5},unstable_Profiling:null}},e.Children={map:u,forEach:function(e,t,n){u(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return u(e,function(){t++}),t},toArray:function(e){return u(e,function(e){return e})||[]},only:function(e){if(c(e))return e;throw Error(\"React.Children.only expected to receive a single React element child.\")}},e.Component=t,e.Fragment=W,e.Profiler=G,e.PureComponent=r,e.StrictMode=Y,e.Suspense=X,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k,e.act=A,e.cloneElement=function(e,t,n){if(null==e)throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+e+\".\");var r=re({},e.props),o=e.key,u=e.ref,a=e._owner;if(null!=t)for(i in void 0!==t.ref&&(u=t.ref,a=w.current),void 0!==t.key&&(o=\"\"+t.key),e.type&&e.type.defaultProps&&(l=e.type.defaultProps),t)ae.call(t,i)&&!ie.hasOwnProperty(i)&&(r[i]=(void 0===t[i]&&void 0!==l?l:t)[i]);var i=arguments.length-2;if(1===i)r.children=n;else if(1<i){for(var l=Array(i),c=0;c<i;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:g,type:e.type,key:o,ref:u,props:r,_owner:a}},e.createContext=function(e){return(e={$$typeof:K,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:J,_context:e},e.Consumer=e},e.createElement=o,e.createFactory=function(e){var t=o.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:Q,render:e}},e.isValidElement=c,e.lazy=function(e){return{$$typeof:ee,_payload:{_status:-1,_result:e},_init:V}},e.memo=function(e,t){return{$$typeof:Z,type:e,compare:void 0===t?null:t}},e.startTransition=function(e,t){t=x.transition,x.transition={};try{e()}finally{x.transition=t}},e.unstable_act=A,e.useCallback=function(e,t){return S.current.useCallback(e,t)},e.useContext=function(e){return S.current.useContext(e)},e.useDebugValue=function(e,t){},e.useDeferredValue=function(e){return S.current.useDeferredValue(e)},e.useEffect=function(e,t){return S.current.useEffect(e,t)},e.useId=function(){return S.current.useId()},e.useImperativeHandle=function(e,t,n){return S.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return S.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return S.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return S.current.useMemo(e,t)},e.useReducer=function(e,t,n){return S.current.useReducer(e,t,n)},e.useRef=function(e){return S.current.useRef(e)},e.useState=function(e){return S.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return S.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return S.current.useTransition()},e.version=\"18.3.1\"},\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],t):t((e=e||self).React={})}();!function(){var e,n;e=this,n=function(l,e){function S(e){for(var n=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+e,t=1;t<arguments.length;t++)n+=\"&args[]=\"+encodeURIComponent(arguments[t]);return\"Minified React error #\"+e+\"; visit \"+n+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}function o(e,n){U(e,n),U(e+\"Capture\",n)}function U(e,n){for(Ja[e]=n,e=0;e<n.length;e++)Za.add(n[e])}function V(e){if(no.call(lo,e))return!0;if(!no.call(ro,e)){if(to.test(e))return lo[e]=!0;ro[e]=!0}return!1}function A(e,n,t,r){if(null!==t&&0===t.type)return!1;switch(typeof n){case\"function\":case\"symbol\":return!0;case\"boolean\":return r?!1:null!==t?!t.acceptsBooleans:\"data-\"!==(e=e.toLowerCase().slice(0,5))&&\"aria-\"!==e;default:return!1}}function W(e,n,t,r){if(null==n||A(e,n,t,r))return!0;if(!r&&null!==t)switch(t.type){case 3:return!n;case 4:return!1===n;case 5:return isNaN(n);case 6:return isNaN(n)||n<1}return!1}function t(e,n,t,r,l,a,o){this.acceptsBooleans=2===n||3===n||4===n,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=a,this.removeEmptyString=o}function B(e,n,t,r){var l=a.hasOwnProperty(n)?a[n]:null;(null!==l?0!==l.type:r||!(2<n.length)||\"o\"!==n[0]&&\"O\"!==n[0]||\"n\"!==n[1]&&\"N\"!==n[1])&&(W(n,t,l,r)&&(t=null),r||null===l?V(n)&&(null===t?e.removeAttribute(n):e.setAttribute(n,\"\"+t)):l.mustUseProperty?e[l.propertyName]=null===t?3!==l.type&&\"\":t:(n=l.attributeName,r=l.attributeNamespace,null===t?e.removeAttribute(n):(t=3===(l=l.type)||4===l&&!0===t?\"\":\"\"+t,r?e.setAttributeNS(r,n,t):e.setAttribute(n,t))))}function H(e){return null!==e&&\"object\"==typeof e&&\"function\"==typeof(e=So&&e[So]||e[\"@@iterator\"])?e:null}function Q(e,n,t){if(void 0===Ya)try{throw Error()}catch(e){Ya=(n=e.stack.trim().match(/\\\\n( *(at )?)/))&&n[1]||\"\"}return\"\\\\n\"+Ya+e}function j(n,e){if(!n||xo)return\"\";xo=!0;var t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,\"props\",{set:function(){throw Error()}}),\"object\"==typeof Reflect&&Reflect.construct){try{Reflect.construct(e,[])}catch(e){var r=e}Reflect.construct(n,[],e)}else{try{e.call()}catch(e){r=e}n.call(e.prototype)}else{try{throw Error()}catch(e){r=e}n()}}catch(e){if(e&&r&&\"string\"==typeof e.stack){for(var l,a=e.stack.split(\"\\\\n\"),o=r.stack.split(\"\\\\n\"),u=a.length-1,i=o.length-1;1<=u&&0<=i&&a[u]!==o[i];)i--;for(;1<=u&&0<=i;u--,i--)if(a[u]!==o[i]){if(1!==u||1!==i)do{if(u--,--i<0||a[u]!==o[i])return l=\"\\\\n\"+a[u].replace(\" at new \",\" at \"),l=n.displayName&&l.includes(\"<anonymous>\")?l.replace(\"<anonymous>\",n.displayName):l}while(1<=u&&0<=i);break}}}finally{xo=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:\"\")?Q(n):\"\"}function $(e){switch(e.tag){case 5:return Q(e.type);case 16:return Q(\"Lazy\");case 13:return Q(\"Suspense\");case 19:return Q(\"SuspenseList\");case 0:case 2:case 15:return e=j(e.type,!1);case 11:return e=j(e.type.render,!1);case 1:return e=j(e.type,!0);default:return\"\"}}function q(e){if(null!=e){if(\"function\"==typeof e)return e.displayName||e.name||null;if(\"string\"==typeof e)return e;switch(e){case co:return\"Fragment\";case so:return\"Portal\";case po:return\"Profiler\";case fo:return\"StrictMode\";case yo:return\"Suspense\";case vo:return\"SuspenseList\"}if(\"object\"==typeof e)switch(e.$$typeof){case ho:return(e.displayName||\"Context\")+\".Consumer\";case mo:return(e._context.displayName||\"Context\")+\".Provider\";case go:var n=e.render;return e=(e=e.displayName)?e:\"\"!==(e=n.displayName||n.name||\"\")?\"ForwardRef(\"+e+\")\":\"ForwardRef\";case bo:return null!==(n=e.displayName||null)?n:q(e.type)||\"Memo\";case ko:n=e._payload,e=e._init;try{return q(e(n))}catch(e){}}}return null}function K(e){var n=e.type;switch(e.tag){case 24:return\"Cache\";case 9:return(n.displayName||\"Context\")+\".Consumer\";case 10:return(n._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return e=(e=n.render).displayName||e.name||\"\",n.displayName||(\"\"!==e?\"ForwardRef(\"+e+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return n;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return q(n);case 8:return n===fo?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";case 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"==typeof n)return n.displayName||n.name||null;if(\"string\"==typeof n)return n}return null}function Y(e){switch(typeof e){case\"boolean\":case\"number\":case\"string\":case\"undefined\":case\"object\":return e;default:return\"\"}}function X(e){var n=e.type;return(e=e.nodeName)&&\"input\"===e.toLowerCase()&&(\"checkbox\"===n||\"radio\"===n)}function G(e){var n,t,r=X(e)?\"checked\":\"value\",l=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),a=\"\"+e[r];if(!e.hasOwnProperty(r)&&void 0!==l&&\"function\"==typeof l.get&&\"function\"==typeof l.set)return n=l.get,t=l.set,Object.defineProperty(e,r,{configurable:!0,get:function(){return n.call(this)},set:function(e){a=\"\"+e,t.call(this,e)}}),Object.defineProperty(e,r,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(e){a=\"\"+e},stopTracking:function(){e._valueTracker=null,delete e[r]}}}function Z(e){e._valueTracker||(e._valueTracker=G(e))}function J(e){var n,t,r;return!(!e||(n=e._valueTracker)&&(t=n.getValue(),r=\"\",(e=r=e?X(e)?e.checked?\"true\":\"false\":e.value:r)===t||(n.setValue(e),0)))}function ee(n){if(void 0===(n=n||(\"undefined\"!=typeof document?document:void 0)))return null;try{return n.activeElement||n.body}catch(e){return n.body}}function ne(e,n){var t=n.checked;return g({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=t?t:e._wrapperState.initialChecked})}function te(e,n){var t=null==n.defaultValue?\"\":n.defaultValue,r=null!=n.checked?n.checked:n.defaultChecked,t=Y(null!=n.value?n.value:t);e._wrapperState={initialChecked:r,initialValue:t,controlled:\"checkbox\"===n.type||\"radio\"===n.type?null!=n.checked:null!=n.value}}function re(e,n){null!=(n=n.checked)&&B(e,\"checked\",n,!1)}function le(e,n){re(e,n);var t=Y(n.value),r=n.type;if(null!=t)\"number\"===r?(0===t&&\"\"===e.value||e.value!=t)&&(e.value=\"\"+t):e.value!==\"\"+t&&(e.value=\"\"+t);else if(\"submit\"===r||\"reset\"===r)return void e.removeAttribute(\"value\");n.hasOwnProperty(\"value\")?oe(e,n.type,t):n.hasOwnProperty(\"defaultValue\")&&oe(e,n.type,Y(n.defaultValue)),null==n.checked&&null!=n.defaultChecked&&(e.defaultChecked=!!n.defaultChecked)}function ae(e,n,t){if(n.hasOwnProperty(\"value\")||n.hasOwnProperty(\"defaultValue\")){var r=n.type;if((\"submit\"===r||\"reset\"===r)&&null==n.value)return;n=\"\"+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}\"\"!==(t=e.name)&&(e.name=\"\"),e.defaultChecked=!!e._wrapperState.initialChecked,\"\"!==t&&(e.name=t)}function oe(e,n,t){\"number\"===n&&ee(e.ownerDocument)===e||(null==t?e.defaultValue=\"\"+e._wrapperState.initialValue:e.defaultValue!==\"\"+t&&(e.defaultValue=\"\"+t))}function ue(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l<t.length;l++)n[\"$\"+t[l]]=!0;for(t=0;t<e.length;t++)l=n.hasOwnProperty(\"$\"+e[t].value),e[t].selected!==l&&(e[t].selected=l),l&&r&&(e[t].defaultSelected=!0)}else{for(t=\"\"+Y(t),n=null,l=0;l<e.length;l++){if(e[l].value===t)return e[l].selected=!0,void(r&&(e[l].defaultSelected=!0));null!==n||e[l].disabled||(n=e[l])}null!==n&&(n.selected=!0)}}function ie(e,n){if(null!=n.dangerouslySetInnerHTML)throw Error(S(91));return g({},n,{value:void 0,defaultValue:void 0,children:\"\"+e._wrapperState.initialValue})}function se(e,n){var t=n.value;if(null==t){if(t=n.children,n=n.defaultValue,null!=t){if(null!=n)throw Error(S(92));if(Eo(t)){if(1<t.length)throw Error(S(93));t=t[0]}n=t}t=n=null==n?\"\":n}e._wrapperState={initialValue:Y(t)}}function ce(e,n){var t=Y(n.value),r=Y(n.defaultValue);null!=t&&((t=\"\"+t)!==e.value&&(e.value=t),null==n.defaultValue)&&e.defaultValue!==t&&(e.defaultValue=t),null!=r&&(e.defaultValue=\"\"+r)}function fe(e,n){(n=e.textContent)===e._wrapperState.initialValue&&\"\"!==n&&null!==n&&(e.value=n)}function de(e){switch(e){case\"svg\":return\"http://www.w3.org/2000/svg\";case\"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function pe(e,n){return null==e||\"http://www.w3.org/1999/xhtml\"===e?de(n):\"http://www.w3.org/2000/svg\"===e&&\"foreignObject\"===n?\"http://www.w3.org/1999/xhtml\":e}function me(e,n,t){return null==n||\"boolean\"==typeof n||\"\"===n?\"\":t||\"number\"!=typeof n||0===n||zo.hasOwnProperty(e)&&zo[e]?(\"\"+n).trim():n+\"px\"}function he(e,n){for(var t in e=e.style,n){var r,l;n.hasOwnProperty(t)&&(r=0===t.indexOf(\"--\"),l=me(t,n[t],r),\"float\"===t&&(t=\"cssFloat\"),r?e.setProperty(t,l):e[t]=l)}}function ge(e,n){if(n){if(_o[e]&&(null!=n.children||null!=n.dangerouslySetInnerHTML))throw Error(S(137,e));if(null!=n.dangerouslySetInnerHTML){if(null!=n.children)throw Error(S(60));if(\"object\"!=typeof n.dangerouslySetInnerHTML||!(\"__html\"in n.dangerouslySetInnerHTML))throw Error(S(61))}if(null!=n.style&&\"object\"!=typeof n.style)throw Error(S(62))}}function ye(e,n){if(-1===e.indexOf(\"-\"))return\"string\"==typeof n.is;switch(e){case\"annotation-xml\":case\"color-profile\":case\"font-face\":case\"font-face-src\":case\"font-face-uri\":case\"font-face-format\":case\"font-face-name\":case\"missing-glyph\":return!1;default:return!0}}function ve(e){return 3===(e=(e=e.target||e.srcElement||window).correspondingUseElement?e.correspondingUseElement:e).nodeType?e.parentNode:e}function be(e){if(e=ot(e)){if(\"function\"!=typeof To)throw Error(S(280));var n=e.stateNode;n&&(n=it(n),To(e.stateNode,e.type,n))}}function ke(e){Mo?Fo?Fo.push(e):Fo=[e]:Mo=e}function we(){if(Mo){var e=Mo,n=Fo;if(Fo=Mo=null,be(e),n)for(e=0;e<n.length;e++)be(n[e])}}function Se(e,n,t){if(Oo)return e(n,t);Oo=!0;try{return Ro(e,n,t)}finally{Oo=!1,null===Mo&&null===Fo||(Do(),we())}}function xe(e,n){var t=e.stateNode;if(null===t)return null;var r=it(t);if(null===r)return null;switch(t=r[n],n){case\"onClick\":case\"onClickCapture\":case\"onDoubleClick\":case\"onDoubleClickCapture\":case\"onMouseDown\":case\"onMouseDownCapture\":case\"onMouseMove\":case\"onMouseMoveCapture\":case\"onMouseUp\":case\"onMouseUpCapture\":case\"onMouseEnter\":e=!(r=(r=!r.disabled)?r:!(\"button\"===(e=e.type)||\"input\"===e||\"select\"===e||\"textarea\"===e));break;default:e=!1}if(e)return null;if(t&&\"function\"!=typeof t)throw Error(S(231,n,typeof t));return t}function Ee(e,n,t,r,l,a,o,u,i){Bo=!1,Ho=null,Wo.apply($o,arguments)}function Ce(e,n,t,r,l,a,o,u,i){var s;Ee.apply(this,arguments),Bo&&(s=Ho,Bo=!1,Ho=null,Qo||(Qo=!0,jo=s))}function Ne(e){var n=e,t=e;if(e.alternate)for(;n.return;)n=n.return;else for(e=n;0!=(4098&(n=e).flags)&&(t=n.return),e=n.return;);return 3===n.tag?t:null}function ze(e){if(13===e.tag){var n=e.memoizedState;if(null!==(n=null===n&&null!==(e=e.alternate)?e.memoizedState:n))return n.dehydrated}return null}function Pe(e){if(Ne(e)!==e)throw Error(S(188))}function _e(e){var n=e.alternate;if(!n){if(null===(n=Ne(e)))throw Error(S(188));return n!==e?null:e}for(var t=e,r=n;;){var l=t.return;if(null===l)break;var a=l.alternate;if(null===a){if(null===(r=l.return))break;t=r}else{if(l.child===a.child){for(a=l.child;a;){if(a===t)return Pe(l),e;if(a===r)return Pe(l),n;a=a.sibling}throw Error(S(188))}if(t.return!==r.return)t=l,r=a;else{for(var o=!1,u=l.child;u;){if(u===t){o=!0,t=l,r=a;break}if(u===r){o=!0,r=l,t=a;break}u=u.sibling}if(!o){for(u=a.child;u;){if(u===t){o=!0,t=a,r=l;break}if(u===r){o=!0,r=a,t=l;break}u=u.sibling}if(!o)throw Error(S(189))}}if(t.alternate!==r)throw Error(S(190))}}if(3!==t.tag)throw Error(S(188));return t.stateNode.current===t?e:n}function Le(e){return null!==(e=_e(e))?Te(e):null}function Te(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var n=Te(e);if(null!==n)return n;e=e.sibling}return null}function Me(e,n){if(ou&&\"function\"==typeof ou.onCommitFiberRoot)try{ou.onCommitFiberRoot(au,e,void 0,128==(128&e.current.flags))}catch(e){}}function Fe(e){return 0===(e>>>=0)?32:31-(iu(e)/su|0)|0}function Re(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function De(e,n){var t=e.pendingLanes;if(0===t)return 0;var r,l=0,a=e.suspendedLanes,o=e.pingedLanes,u=268435455&t;if(0!==u?0!==(r=u&~a)?l=Re(r):0!==(o&=u)&&(l=Re(o)):0!==(u=t&~a)?l=Re(u):0!==o&&(l=Re(o)),0===l)return 0;if(0!==n&&n!==l&&0==(n&a)&&((o=n&-n)<=(a=l&-l)||16===a&&0!=(4194240&o)))return n;if(0!=(4&l)&&(l|=16&t),0!==(n=e.entangledLanes))for(e=e.entanglements,n&=l;0<n;)l|=e[t=31-uu(n)],n&=~(a=1<<t);return l}function Oe(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;default:return-1}}function Ie(e,n){for(var t=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-uu(a),u=1<<o,i=l[o];-1===i?0!=(u&t)&&0==(u&r)||(l[o]=Oe(u,n)):i<=n&&(e.expiredLanes|=u),a&=~u}}function Ue(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Ve(){var e=cu;return 0==(4194240&(cu<<=1))&&(cu=64),e}function Ae(e){for(var n=[],t=0;t<31;t++)n.push(e);return n}function We(e,n,t){e.pendingLanes|=n,536870912!==n&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[n=31-uu(n)]=t}function Be(e,n){var t=e.pendingLanes&~n,r=(e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements,e.eventTimes);for(e=e.expirationTimes;0<t;){var l=31-uu(t),a=1<<l;n[l]=0,r[l]=-1,e[l]=-1,t&=~a}}function He(e,n){var t=e.entangledLanes|=n;for(e=e.entanglements;t;){var r=31-uu(t),l=1<<r;l&n|e[r]&n&&(e[r]|=n),t&=~l}}function Qe(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}function je(e,n){switch(e){case\"focusin\":case\"focusout\":mu=null;break;case\"dragenter\":case\"dragleave\":hu=null;break;case\"mouseover\":case\"mouseout\":gu=null;break;case\"pointerover\":case\"pointerout\":yu.delete(n.pointerId);break;case\"gotpointercapture\":case\"lostpointercapture\":vu.delete(n.pointerId)}}function $e(e,n,t,r,l,a){return null===e||e.nativeEvent!==a?(e={blockedOn:n,domEventName:t,eventSystemFlags:r,nativeEvent:a,targetContainers:[l]},null!==n&&null!==(n=ot(n))&&fc(n)):(e.eventSystemFlags|=r,n=e.targetContainers,null!==l&&-1===n.indexOf(l)&&n.push(l)),e}function qe(e,n,t,r,l){switch(n){case\"focusin\":return mu=$e(mu,e,n,t,r,l),!0;case\"dragenter\":return hu=$e(hu,e,n,t,r,l),!0;case\"mouseover\":return gu=$e(gu,e,n,t,r,l),!0;case\"pointerover\":var a=l.pointerId;return yu.set(a,$e(yu.get(a)||null,e,n,t,r,l)),!0;case\"gotpointercapture\":return a=l.pointerId,vu.set(a,$e(vu.get(a)||null,e,n,t,r,l)),!0}return!1}function Ke(e){var n=at(e.target);if(null!==n){var t=Ne(n);if(null!==t)if(13===(n=t.tag)){if(null!==(n=ze(t)))return e.blockedOn=n,void mc(e.priority,function(){dc(t)})}else if(3===n&&t.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===t.tag?t.stateNode.containerInfo:null)}e.blockedOn=null}function Ye(e){if(null!==e.blockedOn)return!1;for(var n=e.targetContainers;0<n.length;){var t=rn(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(null!==t)return null!==(n=ot(t))&&fc(n),e.blockedOn=t,!1;var r=new(t=e.nativeEvent).constructor(t.type,t);Lo=r,t.target.dispatchEvent(r),Lo=null,n.shift()}return!0}function Xe(e,n,t){Ye(e)&&t.delete(n)}function Ge(){du=!1,null!==mu&&Ye(mu)&&(mu=null),null!==hu&&Ye(hu)&&(hu=null),null!==gu&&Ye(gu)&&(gu=null),yu.forEach(Xe),vu.forEach(Xe)}function Ze(e,n){e.blockedOn===n&&(e.blockedOn=null,du||(du=!0,qo(Ko,Ge)))}function Je(n){if(0<pu.length){Ze(pu[0],n);for(var e=1;e<pu.length;e++){var t=pu[e];t.blockedOn===n&&(t.blockedOn=null)}}for(null!==mu&&Ze(mu,n),null!==hu&&Ze(hu,n),null!==gu&&Ze(gu,n),yu.forEach(e=function(e){return Ze(e,n)}),vu.forEach(e),e=0;e<bu.length;e++)(t=bu[e]).blockedOn===n&&(t.blockedOn=null);for(;0<bu.length&&null===(e=bu[0]).blockedOn;)Ke(e),null===e.blockedOn&&bu.shift()}function en(e,n,t,r){var l=x,a=wu.transition;wu.transition=null;try{x=1,tn(e,n,t,r)}finally{x=l,wu.transition=a}}function nn(e,n,t,r){var l=x,a=wu.transition;wu.transition=null;try{x=4,tn(e,n,t,r)}finally{x=l,wu.transition=a}}function tn(e,n,t,r){if(Su){var l=rn(e,n,t,r);if(null===l)$n(e,n,r,xu,t),je(e,r);else if(qe(l,e,n,t,r))r.stopPropagation();else if(je(e,r),4&n&&-1<ku.indexOf(e)){for(;null!==l;){var a=ot(l);if(null!==a&&cc(a),null===(a=rn(e,n,t,r))&&$n(e,n,r,xu,t),a===l)break;l=a}null!==l&&r.stopPropagation()}else $n(e,n,r,null,t)}}function rn(e,n,t,r){if((xu=null)!==(e=at(e=ve(r))))if(null===(n=Ne(e)))e=null;else if(13===(t=n.tag)){if(null!==(e=ze(n)))return e;e=null}else if(3===t){if(n.stateNode.current.memoizedState.isDehydrated)return 3===n.tag?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return xu=e,null}function ln(e){switch(e){case\"cancel\":case\"click\":case\"close\":case\"contextmenu\":case\"copy\":case\"cut\":case\"auxclick\":case\"dblclick\":case\"dragend\":case\"dragstart\":case\"drop\":case\"focusin\":case\"focusout\":case\"input\":case\"invalid\":case\"keydown\":case\"keypress\":case\"keyup\":case\"mousedown\":case\"mouseup\":case\"paste\":case\"pause\":case\"play\":case\"pointercancel\":case\"pointerdown\":case\"pointerup\":case\"ratechange\":case\"reset\":case\"resize\":case\"seeked\":case\"submit\":case\"touchcancel\":case\"touchend\":case\"touchstart\":case\"volumechange\":case\"change\":case\"selectionchange\":case\"textInput\":case\"compositionstart\":case\"compositionend\":case\"compositionupdate\":case\"beforeblur\":case\"afterblur\":case\"beforeinput\":case\"blur\":case\"fullscreenchange\":case\"focus\":case\"hashchange\":case\"popstate\":case\"select\":case\"selectstart\":return 1;case\"drag\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"mousemove\":case\"mouseout\":case\"mouseover\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"scroll\":case\"toggle\":case\"touchmove\":case\"wheel\":case\"mouseenter\":case\"mouseleave\":case\"pointerenter\":case\"pointerleave\":return 4;case\"message\":switch(Jo()){case eu:return 1;case nu:return 4;case tu:case ru:return 16;case lu:return 536870912;default:return 16}default:return 16}}function an(){if(Nu)return Nu;for(var e=Cu,n=e.length,t=(\"value\"in Eu?Eu.value:Eu.textContent),r=t.length,l=0;l<n&&e[l]===t[l];l++);for(var a=n-l,o=1;o<=a&&e[n-o]===t[r-o];o++);return Nu=t.slice(l,1<o?1-o:void 0)}function on(e){var n=e.keyCode;return\"charCode\"in e?0===(e=e.charCode)&&13===n&&(e=13):e=n,32<=(e=10===e?13:e)||13===e?e:0}function un(){return!0}function sn(){return!1}function cn(o){function e(e,n,t,r,l){for(var a in this._reactName=e,this._targetInst=t,this.type=n,this.nativeEvent=r,this.target=l,this.currentTarget=null,o)o.hasOwnProperty(a)&&(e=o[a],this[a]=e?e(r):r[a]);return this.isDefaultPrevented=(null!=r.defaultPrevented?r.defaultPrevented:!1===r.returnValue)?un:sn,this.isPropagationStopped=sn,this}return g(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():\"unknown\"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=un)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():\"unknown\"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=un)},persist:function(){},isPersistent:un}),e}function fn(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):!!(e=Vu[e])&&!!n[e]}function dn(e){return fn}function pn(e,n){switch(e){case\"keyup\":return-1!==ju.indexOf(n.keyCode);case\"keydown\":return 229!==n.keyCode;case\"keypress\":case\"mousedown\":case\"focusout\":return!0;default:return!1}}function mn(e){return\"object\"==typeof(e=e.detail)&&\"data\"in e?e.data:null}function hn(e,n){switch(e){case\"compositionend\":return mn(n);case\"keypress\":return 32!==n.which?null:(Xu=!0,Yu);case\"textInput\":return(e=n.data)===Yu&&Xu?null:e;default:return null}}function gn(e,n){if(Gu)return\"compositionend\"===e||!$u&&pn(e,n)?(e=an(),Nu=Cu=Eu=null,Gu=!1,e):null;switch(e){case\"paste\":return null;case\"keypress\":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case\"compositionend\":return Ku&&\"ko\"!==n.locale?null:n.data;default:return null}}function yn(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return\"input\"===n?!!Zu[e.type]:\"textarea\"===n}function vn(e){var n;return!!eo&&((n=(e=\"on\"+e)in document)||((n=document.createElement(\"div\")).setAttribute(e,\"return;\"),n=\"function\"==typeof n[e]),n)}function bn(e,n,t,r){ke(r),0<(n=Kn(n,\"onChange\")).length&&(t=new zu(\"onChange\",\"change\",null,t,r),e.push({event:t,listeners:n}))}function kn(e){Bn(e,0)}function wn(e){if(J(ut(e)))return e}function Sn(e,n){if(\"change\"===e)return n}function xn(){Ju&&(Ju.detachEvent(\"onpropertychange\",En),ei=Ju=null)}function En(e){var n;\"value\"===e.propertyName&&wn(ei)&&(bn(n=[],ei,e,ve(e)),Se(kn,n))}function Cn(e,n,t){\"focusin\"===e?(xn(),ei=t,(Ju=n).attachEvent(\"onpropertychange\",En)):\"focusout\"===e&&xn()}function Nn(e,n){if(\"selectionchange\"===e||\"keyup\"===e||\"keydown\"===e)return wn(ei)}function zn(e,n){if(\"click\"===e)return wn(n)}function Pn(e,n){if(\"input\"===e||\"change\"===e)return wn(n)}function _n(e,n){return e===n&&(0!==e||1/e==1/n)||e!=e&&n!=n}function Ln(e,n){if(!ti(e,n)){if(\"object\"!=typeof e||null===e||\"object\"!=typeof n||null===n)return!1;var t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(r=0;r<t.length;r++){var l=t[r];if(!no.call(n,l)||!ti(e[l],n[l]))return!1}}return!0}function Tn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mn(e,n){var t,r=Tn(e);for(e=0;r;){if(3===r.nodeType){if(t=e+r.textContent.length,e<=n&&n<=t)return{node:r,offset:n-e};e=t}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Tn(r)}}function Fn(e,n){return!(!e||!n)&&(e===n||(!e||3!==e.nodeType)&&(n&&3===n.nodeType?Fn(e,n.parentNode):\"contains\"in e?e.contains(n):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(n))))}function Rn(){for(var e=window,n=ee();n instanceof e.HTMLIFrameElement;){try{var t=\"string\"==typeof n.contentWindow.location.href}catch(e){t=!1}if(!t)break;n=ee((e=n.contentWindow).document)}return n}function Dn(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(\"input\"===n&&(\"text\"===e.type||\"search\"===e.type||\"tel\"===e.type||\"url\"===e.type||\"password\"===e.type)||\"textarea\"===n||\"true\"===e.contentEditable)}function On(e){var n,t,r,l=Rn(),a=e.focusedElem,o=e.selectionRange;if(l!==a&&a&&a.ownerDocument&&Fn(a.ownerDocument.documentElement,a)){null!==o&&Dn(a)&&(l=o.start,void 0===(e=o.end)&&(e=l),\"selectionStart\"in a?(a.selectionStart=l,a.selectionEnd=Math.min(e,a.value.length)):(e=(l=a.ownerDocument||document)&&l.defaultView||window).getSelection&&(e=e.getSelection(),t=a.textContent.length,n=Math.min(o.start,t),o=void 0===o.end?n:Math.min(o.end,t),!e.extend&&o<n&&(t=o,o=n,n=t),t=Mn(a,n),r=Mn(a,o),t)&&r&&(1!==e.rangeCount||e.anchorNode!==t.node||e.anchorOffset!==t.offset||e.focusNode!==r.node||e.focusOffset!==r.offset)&&((l=l.createRange()).setStart(t.node,t.offset),e.removeAllRanges(),o<n?(e.addRange(l),e.extend(r.node,r.offset)):(l.setEnd(r.node,r.offset),e.addRange(l)))),l=[];for(e=a;e=e.parentNode;)1===e.nodeType&&l.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(\"function\"==typeof a.focus&&a.focus(),a=0;a<l.length;a++)(e=l[a]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}function In(e,n,t){var r=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;ui||null==li||li!==ee(r)||(r=\"selectionStart\"in(r=li)&&Dn(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},oi&&Ln(oi,r))||(oi=r,0<(r=Kn(ai,\"onSelect\")).length&&(n=new zu(\"onSelect\",\"select\",null,n,t),e.push({event:n,listeners:r}),n.target=li))}function Un(e,n){var t={};return t[e.toLowerCase()]=n.toLowerCase(),t[\"Webkit\"+e]=\"webkit\"+n,t[\"Moz\"+e]=\"moz\"+n,t}function Vn(e){if(si[e])return si[e];if(ii[e]){var n,t=ii[e];for(n in t)if(t.hasOwnProperty(n)&&n in ci)return si[e]=t[n]}return e}function An(e,n){hi.set(e,n),o(n,[e])}function Wn(e,n,t){var r=e.type||\"unknown-event\";e.currentTarget=t,Ce(r,n,void 0,e),e.currentTarget=null}function Bn(e,n){n=0!=(4&n);for(var t=0;t<e.length;t++){var r=(l=e[t]).event,l=l.listeners;e:{var a=void 0;if(n)for(var o=l.length-1;0<=o;o--){var u=(s=l[o]).instance,i=s.currentTarget,s=s.listener;if(u!==a&&r.isPropagationStopped())break e;Wn(r,s,i),a=u}else for(o=0;o<l.length;o++){if(u=(s=l[o]).instance,i=s.currentTarget,s=s.listener,u!==a&&r.isPropagationStopped())break e;Wn(r,s,i),a=u}}}if(Qo)throw e=jo,Qo=!1,jo=null,e}function c(e,n){var t=n[Fi],r=e+\"__bubble\";(t=void 0===t?n[Fi]=new Set:t).has(r)||(jn(n,e,2,!1),t.add(r))}function Hn(e,n,t){var r=0;n&&(r|=4),jn(t,e,r,n)}function Qn(n){var e;n[wi]||(n[wi]=!0,Za.forEach(function(e){\"selectionchange\"!==e&&(ki.has(e)||Hn(e,!1,n),Hn(e,!0,n))}),null===(e=9===n.nodeType?n:n.ownerDocument))||e[wi]||Hn(\"selectionchange\",!(e[wi]=!0),e)}function jn(e,n,t,r,l){switch(ln(n)){case 1:l=en;break;case 4:l=nn;break;default:l=tn}t=l.bind(null,n,t,e),l=!Io||\"touchstart\"!==n&&\"touchmove\"!==n&&\"wheel\"!==n?void 0:!0,r?void 0!==l?e.addEventListener(n,t,{capture:!0,passive:l}):e.addEventListener(n,t,!0):void 0!==l?e.addEventListener(n,t,{passive:l}):e.addEventListener(n,t,!1)}function $n(g,y,v,e,n){var b=e;if(0==(1&y)&&0==(2&y)&&null!==e)e:for(;;){if(null===e)return;var t=e.tag;if(3===t||4===t){var r=e.stateNode.containerInfo;if(r===n||8===r.nodeType&&r.parentNode===n)break;if(4===t)for(t=e.return;null!==t;){var l=t.tag;if((3===l||4===l)&&((l=t.stateNode.containerInfo)===n||8===l.nodeType&&l.parentNode===n))return;t=t.return}for(;null!==r;){if(null===(t=at(r)))return;if(5===(l=t.tag)||6===l){e=b=t;continue e}r=r.parentNode}}e=e.return}Se(function(){var e,n,t,r=b,l=ve(v),a=[];e:{var o=hi.get(g);if(void 0!==o){var u=zu,i=g;switch(g){case\"keypress\":if(0===on(v))break e;case\"keydown\":case\"keyup\":u=Au;break;case\"focusin\":i=\"focus\",u=Mu;break;case\"focusout\":i=\"blur\",u=Mu;break;case\"beforeblur\":case\"afterblur\":u=Mu;break;case\"click\":if(2===v.button)break e;case\"auxclick\":case\"dblclick\":case\"mousedown\":case\"mousemove\":case\"mouseup\":case\"mouseout\":case\"mouseover\":case\"contextmenu\":u=Lu;break;case\"drag\":case\"dragend\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"dragstart\":case\"drop\":u=Tu;break;case\"touchcancel\":case\"touchend\":case\"touchmove\":case\"touchstart\":u=Bu;break;case fi:case di:case pi:u=Fu;break;case mi:u=Hu;break;case\"scroll\":u=Pu;break;case\"wheel\":u=Qu;break;case\"copy\":case\"cut\":case\"paste\":u=Ru;break;case\"gotpointercapture\":case\"lostpointercapture\":case\"pointercancel\":case\"pointerdown\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"pointerup\":u=Wu}for(var s=!(f=0!=(4&y))&&\"scroll\"===g,c=f?null!==o?o+\"Capture\":null:o,f=[],d=r;null!==d;){var p,m=(p=d).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==c)&&null!=(m=xe(d,c))&&f.push(qn(d,m,p)),s)break;d=d.return}0<f.length&&(o=new u(o,i,null,v,l),a.push({event:o,listeners:f}))}}if(0==(7&y)){if(u=\"mouseout\"===g||\"pointerout\"===g,(!(o=\"mouseover\"===g||\"pointerover\"===g)||v===Lo||!(i=v.relatedTarget||v.fromElement)||!at(i)&&!i[Mi])&&(u||o)&&(o=l.window===l?l:(o=l.ownerDocument)?o.defaultView||o.parentWindow:window,u?(u=r,null!==(i=(i=v.relatedTarget||v.toElement)?at(i):null)&&(i!==(s=Ne(i))||5!==i.tag&&6!==i.tag)&&(i=null)):(u=null,i=r),u!==i)){if(f=Lu,m=\"onMouseLeave\",c=\"onMouseEnter\",d=\"mouse\",\"pointerout\"!==g&&\"pointerover\"!==g||(f=Wu,m=\"onPointerLeave\",c=\"onPointerEnter\",d=\"pointer\"),s=null==u?o:ut(u),p=null==i?o:ut(i),(o=new f(m,d+\"leave\",u,v,l)).target=s,o.relatedTarget=p,m=null,at(l)===r&&((f=new f(c,d+\"enter\",i,v,l)).target=p,f.relatedTarget=s,m=f),s=m,u&&i)e:{for(c=i,d=0,p=f=u;p;p=Yn(p))d++;for(p=0,m=c;m;m=Yn(m))p++;for(;0<d-p;)f=Yn(f),d--;for(;0<p-d;)c=Yn(c),p--;for(;d--;){if(f===c||null!==c&&f===c.alternate)break e;f=Yn(f),c=Yn(c)}f=null}else f=null;null!==u&&Xn(a,o,u,f,!1),null!==i&&null!==s&&Xn(a,s,i,f,!0)}switch(\"select\"===(u=(o=r?ut(r):window).nodeName&&o.nodeName.toLowerCase())||\"input\"===u&&\"file\"===o.type?e=Sn:yn(o)?ni?e=Pn:(e=Nn,n=Cn):!(u=o.nodeName)||\"input\"!==u.toLowerCase()||\"checkbox\"!==o.type&&\"radio\"!==o.type||(e=zn),(e=e&&e(g,r))?bn(a,e,v,l):(n&&n(g,o,r),\"focusout\"===g&&(n=o._wrapperState)&&n.controlled&&\"number\"===o.type&&oe(o,\"number\",o.value)),n=r?ut(r):window,g){case\"focusin\":!yn(n)&&\"true\"!==n.contentEditable||(li=n,ai=r,oi=null);break;case\"focusout\":oi=ai=li=null;break;case\"mousedown\":ui=!0;break;case\"contextmenu\":case\"mouseup\":case\"dragend\":ui=!1,In(a,v,l);break;case\"selectionchange\":if(ri)break;case\"keydown\":case\"keyup\":In(a,v,l)}if($u)e:{switch(g){case\"compositionstart\":var h=\"onCompositionStart\";break e;case\"compositionend\":h=\"onCompositionEnd\";break e;case\"compositionupdate\":h=\"onCompositionUpdate\";break e}h=void 0}else Gu?pn(g,v)&&(h=\"onCompositionEnd\"):\"keydown\"===g&&229===v.keyCode&&(h=\"onCompositionStart\");h&&(Ku&&\"ko\"!==v.locale&&(Gu||\"onCompositionStart\"!==h?\"onCompositionEnd\"===h&&Gu&&(t=an()):(Cu=\"value\"in(Eu=l)?Eu.value:Eu.textContent,Gu=!0)),0<(n=Kn(r,h)).length)&&(h=new Du(h,g,null,v,l),a.push({event:h,listeners:n}),t||null!==(t=mn(v)))&&(h.data=t),(t=(qu?hn:gn)(g,v))&&0<(r=Kn(r,\"onBeforeInput\")).length&&(l=new Ou(\"onBeforeInput\",\"beforeinput\",null,v,l),a.push({event:l,listeners:r}),l.data=t)}Bn(a,y)})}function qn(e,n,t){return{instance:e,listener:n,currentTarget:t}}function Kn(e,n){for(var t=n+\"Capture\",r=[];null!==e;){var l=e,a=l.stateNode;5===l.tag&&null!==a&&(l=a,null!=(a=xe(e,t))&&r.unshift(qn(e,a,l)),null!=(a=xe(e,n)))&&r.push(qn(e,a,l)),e=e.return}return r}function Yn(e){if(null===e)return null;for(;(e=e.return)&&5!==e.tag;);return e||null}function Xn(e,n,t,r,l){for(var a=n._reactName,o=[];null!==t&&t!==r;){var u=t,i=u.alternate,s=u.stateNode;if(null!==i&&i===r)break;5===u.tag&&null!==s&&(u=s,l?null!=(i=xe(t,a))&&o.unshift(qn(t,i,u)):null!=(i=xe(t,a))&&o.push(qn(t,i,u))),t=t.return}0!==o.length&&e.push({event:n,listeners:o})}function Gn(e){return(\"string\"==typeof e?e:\"\"+e).replace(Si,\"\\\\n\").replace(xi,\"\")}function Zn(e,n,t,r){if(n=Gn(n),Gn(e)!==n&&t)throw Error(S(425))}function Jn(){}function et(e,n){return\"textarea\"===e||\"noscript\"===e||\"string\"==typeof n.children||\"number\"==typeof n.children||\"object\"==typeof n.dangerouslySetInnerHTML&&null!==n.dangerouslySetInnerHTML&&null!=n.dangerouslySetInnerHTML.__html}function nt(e){setTimeout(function(){throw e})}function tt(e,n){var t=n,r=0;do{var l=t.nextSibling;if(e.removeChild(t),l&&8===l.nodeType)if(\"/$\"===(t=l.data)){if(0===r)return e.removeChild(l),void Je(n);r--}else\"$\"!==t&&\"$?\"!==t&&\"$!\"!==t||r++}while(t=l);Je(n)}function rt(e){for(;null!=e;e=e.nextSibling){var n=e.nodeType;if(1===n||3===n)break;if(8===n){if(\"$\"===(n=e.data)||\"$!\"===n||\"$?\"===n)break;if(\"/$\"===n)return null}}return e}function lt(e){e=e.previousSibling;for(var n=0;e;){if(8===e.nodeType){var t=e.data;if(\"$\"===t||\"$!\"===t||\"$?\"===t){if(0===n)return e;n--}else\"/$\"===t&&n++}e=e.previousSibling}return null}function at(e){var n=e[Li];if(n)return n;for(var t=e.parentNode;t;){if(n=t[Mi]||t[Li]){if(t=n.alternate,null!==n.child||null!==t&&null!==t.child)for(e=lt(e);null!==e;){if(t=e[Li])return t;e=lt(e)}return n}t=(e=t).parentNode}return null}function ot(e){return!(e=e[Li]||e[Mi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ut(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(S(33))}function it(e){return e[Ti]||null}function st(e){return{current:e}}function s(e,n){Ii<0||(e.current=Oi[Ii],Oi[Ii]=null,Ii--)}function f(e,n,t){Oi[++Ii]=e.current,e.current=n}function ct(e,n){var t=e.type.contextTypes;if(!t)return Ui;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var l,a={};for(l in t)a[l]=n[l];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),a}function h(e){return null!=(e=e.childContextTypes)}function ft(e,n,t){if(v.current!==Ui)throw Error(S(168));f(v,n),f(b,t)}function dt(e,n,t){var r,l=e.stateNode;if(n=n.childContextTypes,\"function\"!=typeof l.getChildContext)return t;for(r in l=l.getChildContext())if(!(r in n))throw Error(S(108,K(e)||\"Unknown\",r));return g({},t,l)}function pt(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ui,Vi=v.current,f(v,e),f(b,b.current),!0}function mt(e,n,t){var r=e.stateNode;if(!r)throw Error(S(169));t?(e=dt(e,n,Vi),r.__reactInternalMemoizedMergedChildContext=e,s(b),s(v),f(v,e)):s(b),f(b,t)}function ht(e){null===Ai?Ai=[e]:Ai.push(e)}function gt(e){Wi=!0,ht(e)}function yt(){if(!Bi&&null!==Ai){Bi=!0;var n=0,e=x;try{var t=Ai;for(x=1;n<t.length;n++)for(var r=t[n];null!==(r=r(!0)););Ai=null,Wi=!1}catch(e){throw null!==Ai&&(Ai=Ai.slice(n+1)),Yo(eu,yt),e}finally{x=e,Bi=!1}}return null}function vt(e,n){Hi[Qi++]=$i,Hi[Qi++]=ji,ji=e,$i=n}function bt(e,n,t){qi[Ki++]=Xi,qi[Ki++]=Gi,qi[Ki++]=Yi,Yi=e;var r,l=Xi,a=(e=Gi,32-uu(l)-1),o=(l&=~(1<<a),t+=1,32-uu(n)+a);Gi=30<o?(o=(l&(1<<(r=a-a%5))-1).toString(32),l>>=r,a-=r,Xi=1<<32-uu(n)+a|t<<a|l,o+e):(Xi=1<<o|t<<a|l,e)}function kt(e){null!==e.return&&(vt(e,1),bt(e,1,0))}function wt(e){for(;e===ji;)ji=Hi[--Qi],Hi[Qi]=null,$i=Hi[--Qi],Hi[Qi]=null;for(;e===Yi;)Yi=qi[--Ki],qi[Ki]=null,Gi=qi[--Ki],qi[Ki]=null,Xi=qi[--Ki],qi[Ki]=null}function St(e,n){var t=ic(5,null,null,0);t.elementType=\"DELETED\",t.stateNode=n,null===(n=(t.return=e).deletions)?(e.deletions=[t],e.flags|=16):n.push(t)}function xt(e,n){switch(e.tag){case 5:var t=e.type;return null!==(n=1!==n.nodeType||t.toLowerCase()!==n.nodeName.toLowerCase()?null:n)&&(e.stateNode=n,Zi=e,k=rt(n.firstChild),!0);case 6:return null!==(n=\"\"===e.pendingProps||3!==n.nodeType?null:n)&&(e.stateNode=n,Zi=e,!(k=null));case 13:return null!==(n=8!==n.nodeType?null:n)&&(t=null!==Yi?{id:Xi,overflow:Gi}:null,e.memoizedState={dehydrated:n,treeContext:t,retryLane:1073741824},(t=ic(18,null,null,0)).stateNode=n,(t.return=e).child=t,Zi=e,!(k=null));default:return!1}}function Et(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function Ct(e){if(E)if(t=k){var n=t;if(!xt(e,t)){if(Et(e))throw Error(S(418));var t=rt(n.nextSibling),r=Zi;t&&xt(e,t)?St(r,n):(e.flags=-4097&e.flags|2,E=!1,Zi=e)}}else{if(Et(e))throw Error(S(418));e.flags=-4097&e.flags|2,E=!1,Zi=e}}function Nt(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Zi=e}function zt(e){if(e!==Zi)return!1;if(!E)return Nt(e),!(E=!0);var n;if(n=(n=(n=3!==e.tag)&&!(n=5!==e.tag)?\"head\"!==(n=e.type)&&\"body\"!==n&&!et(e.type,e.memoizedProps):n)&&k){if(Et(e)){for(e=k;e;)e=rt(e.nextSibling);throw Error(S(418))}for(;n;)St(e,n),n=rt(n.nextSibling)}if(Nt(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(S(317));e:{for(e=e.nextSibling,n=0;e;){if(8===e.nodeType){var t=e.data;if(\"/$\"===t){if(0===n){k=rt(e.nextSibling);break e}n--}else\"$\"!==t&&\"$!\"!==t&&\"$?\"!==t||n++}e=e.nextSibling}k=null}}else k=Zi?rt(e.stateNode.nextSibling):null;return!0}function Pt(){k=Zi=null,E=!1}function _t(e){null===Ji?Ji=[e]:Ji.push(e)}function Lt(e,n,t){if(null!==(e=t.ref)&&\"function\"!=typeof e&&\"object\"!=typeof e){if(t._owner){if(t=t._owner){if(1!==t.tag)throw Error(S(309));var r=t.stateNode}var l,a;if(r)return l=r,a=\"\"+e,null!==n&&null!==n.ref&&\"function\"==typeof n.ref&&n.ref._stringRef===a?n.ref:((n=function(e){var n=l.refs;null===e?delete n[a]:n[a]=e})._stringRef=a,n);throw Error(S(147,e))}if(\"string\"!=typeof e)throw Error(S(284));if(!t._owner)throw Error(S(290,e))}return e}function Tt(e,n){throw e=Object.prototype.toString.call(n),Error(S(31,\"[object Object]\"===e?\"object with keys {\"+Object.keys(n).join(\", \")+\"}\":e))}function Mt(e){return(0,e._init)(e._payload)}function Ft(f){function d(e,n){var t;f&&(null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n))}function p(e,n){if(f)for(;null!==n;)d(e,n),n=n.sibling;return null}function m(e,n){for(e=new Map;null!==n;)null!==n.key?e.set(n.key,n):e.set(n.index,n),n=n.sibling;return e}function o(e,n){return(e=Ca(e,n)).index=0,e.sibling=null,e}function h(e,n,t){if(e.index=t,f){if(null!==(t=e.alternate))return(t=t.index)<n?(e.flags|=2,n):t;e.flags|=2}else e.flags|=1048576;return n}function u(e){return f&&null===e.alternate&&(e.flags|=2),e}function a(e,n,t,r){return null===n||6!==n.tag?(n=_a(t,e.mode,r)).return=e:(n=o(n,t)).return=e,n}function i(e,n,t,r){var l=t.type;return l===co?c(e,n,t.props.children,r,t.key):(null!==n&&(n.elementType===l||\"object\"==typeof l&&null!==l&&l.$$typeof===ko&&Mt(l)===n.type)?(r=o(n,t.props)).ref=Lt(e,n,t):(r=Na(t.type,t.key,t.props,null,e.mode,r)).ref=Lt(e,n,t),r.return=e,r)}function s(e,n,t,r){return null===n||4!==n.tag||n.stateNode.containerInfo!==t.containerInfo||n.stateNode.implementation!==t.implementation?(n=La(t,e.mode,r)).return=e:(n=o(n,t.children||[])).return=e,n}function c(e,n,t,r,l){return null===n||7!==n.tag?(n=za(t,e.mode,r,l)).return=e:(n=o(n,t)).return=e,n}function g(e,n,t){if(\"string\"==typeof n&&\"\"!==n||\"number\"==typeof n)return(n=_a(\"\"+n,e.mode,t)).return=e,n;if(\"object\"==typeof n&&null!==n){switch(n.$$typeof){case io:return(t=Na(n.type,n.key,n.props,null,e.mode,t)).ref=Lt(e,null,n),t.return=e,t;case so:return(n=La(n,e.mode,t)).return=e,n;case ko:return g(e,(0,n._init)(n._payload),t)}if(Eo(n)||H(n))return(n=za(n,e.mode,t,null)).return=e,n;Tt(e,n)}return null}function y(e,n,t,r){var l=null!==n?n.key:null;if(\"string\"==typeof t&&\"\"!==t||\"number\"==typeof t)return null!==l?null:a(e,n,\"\"+t,r);if(\"object\"==typeof t&&null!==t){switch(t.$$typeof){case io:return t.key===l?i(e,n,t,r):null;case so:return t.key===l?s(e,n,t,r):null;case ko:return y(e,n,(l=t._init)(t._payload),r)}if(Eo(t)||H(t))return null!==l?null:c(e,n,t,r,null);Tt(e,t)}return null}function v(e,n,t,r,l){if(\"string\"==typeof r&&\"\"!==r||\"number\"==typeof r)return a(n,e=e.get(t)||null,\"\"+r,l);if(\"object\"==typeof r&&null!==r){switch(r.$$typeof){case io:return i(n,e=e.get(null===r.key?t:r.key)||null,r,l);case so:return s(n,e=e.get(null===r.key?t:r.key)||null,r,l);case ko:return v(e,n,t,(0,r._init)(r._payload),l)}if(Eo(r)||H(r))return c(n,e=e.get(t)||null,r,l,null);Tt(n,r)}return null}function b(n,e,t,r){for(var l=null,a=null,o=e,u=e=0,i=null;null!==o&&u<t.length;u++){o.index>u?(i=o,o=null):i=o.sibling;var s=y(n,o,t[u],r);if(null===s){null===o&&(o=i);break}f&&o&&null===s.alternate&&d(n,o),e=h(s,e,u),null===a?l=s:a.sibling=s,a=s,o=i}if(u===t.length)p(n,o);else if(null===o)for(;u<t.length;u++)null!==(o=g(n,t[u],r))&&(e=h(o,e,u),null===a?l=o:a.sibling=o,a=o);else{for(o=m(n,o);u<t.length;u++)null!==(i=v(o,n,u,t[u],r))&&(f&&null!==i.alternate&&o.delete(null===i.key?u:i.key),e=h(i,e,u),null===a?l=i:a.sibling=i,a=i);f&&o.forEach(function(e){return d(n,e)})}return E&&vt(n,u),l}function k(n,e,t,r){var l=H(t);if(\"function\"!=typeof l)throw Error(S(150));if(null==(t=l.call(t)))throw Error(S(151));for(var a=l=null,o=e,u=e=0,i=null,s=t.next();null!==o&&!s.done;u++,s=t.next()){o.index>u?(i=o,o=null):i=o.sibling;var c=y(n,o,s.value,r);if(null===c){null===o&&(o=i);break}f&&o&&null===c.alternate&&d(n,o),e=h(c,e,u),null===a?l=c:a.sibling=c,a=c,o=i}if(s.done)p(n,o);else if(null===o)for(;!s.done;u++,s=t.next())null!==(s=g(n,s.value,r))&&(e=h(s,e,u),null===a?l=s:a.sibling=s,a=s);else{for(o=m(n,o);!s.done;u++,s=t.next())null!==(s=v(o,n,u,s.value,r))&&(f&&null!==s.alternate&&o.delete(null===s.key?u:s.key),e=h(s,e,u),null===a?l=s:a.sibling=s,a=s);f&&o.forEach(function(e){return d(n,e)})}return E&&vt(n,u),l}function w(e,n,t,r){if(\"object\"==typeof(t=\"object\"==typeof t&&null!==t&&t.type===co&&null===t.key?t.props.children:t)&&null!==t){switch(t.$$typeof){case io:e:{for(var l=t.key,a=n;null!==a;){if(a.key===l){if((l=t.type)===co){if(7===a.tag){p(e,a.sibling),(n=o(a,t.props.children)).return=e,e=n;break e}}else if(a.elementType===l||\"object\"==typeof l&&null!==l&&l.$$typeof===ko&&Mt(l)===a.type){p(e,a.sibling),(n=o(a,t.props)).ref=Lt(e,a,t),n.return=e,e=n;break e}p(e,a);break}d(e,a),a=a.sibling}e=t.type===co?((n=za(t.props.children,e.mode,r,t.key)).return=e,n):((r=Na(t.type,t.key,t.props,null,e.mode,r)).ref=Lt(e,n,t),r.return=e,r)}return u(e);case so:e:{for(a=t.key;null!==n;){if(n.key===a){if(4===n.tag&&n.stateNode.containerInfo===t.containerInfo&&n.stateNode.implementation===t.implementation){p(e,n.sibling),(n=o(n,t.children||[])).return=e,e=n;break e}p(e,n);break}d(e,n),n=n.sibling}(n=La(t,e.mode,r)).return=e,e=n}return u(e);case ko:return w(e,n,(a=t._init)(t._payload),r)}if(Eo(t))return b(e,n,t,r);if(H(t))return k(e,n,t,r);Tt(e,t)}return\"string\"==typeof t&&\"\"!==t||\"number\"==typeof t?(t=\"\"+t,(n=null!==n&&6===n.tag?(p(e,n.sibling),o(n,t)):(p(e,n),_a(t,e.mode,r))).return=e,u(e=n)):p(e,n)}return w}function Rt(){os=as=ls=null}function Dt(e,n){n=rs.current,s(rs),e._currentValue=n}function Ot(e,n,t){for(;null!==e;){var r=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,null!==r&&(r.childLanes|=n)):null!==r&&(r.childLanes&n)!==n&&(r.childLanes|=n),e===t)break;e=e.return}}function It(e,n){(os=as=null)!==(e=(ls=e).dependencies)&&null!==e.firstContext&&(0!=(e.lanes&n)&&(_=!0),e.firstContext=null)}function Ut(e){var n=e._currentValue;if(os!==e)if(e={context:e,memoizedValue:n,next:null},null===as){if(null===ls)throw Error(S(308));as=e,ls.dependencies={lanes:0,firstContext:e}}else as=as.next=e;return n}function Vt(e){null===us?us=[e]:us.push(e)}function At(e,n,t,r){var l=n.interleaved;return null===l?(t.next=t,Vt(n)):(t.next=l.next,l.next=t),n.interleaved=t,Wt(e,r)}function Wt(e,n){e.lanes|=n;var t=e.alternate;for(null!==t&&(t.lanes|=n),e=(t=e).return;null!==e;)e.childLanes|=n,null!==(t=e.alternate)&&(t.childLanes|=n),e=(t=e).return;return 3===t.tag?t.stateNode:null}function Bt(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ht(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Qt(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function jt(e,n,t){var r,l=e.updateQueue;return null===l?null:(l=l.shared,(0!=(2&F)?(null===(r=l.pending)?n.next=n:(n.next=r.next,r.next=n),l.pending=n,is):(null===(r=l.interleaved)?(n.next=n,Vt(l)):(n.next=r.next,r.next=n),l.interleaved=n,Wt))(e,t))}function $t(e,n,t){var r;null!==(n=n.updateQueue)&&(n=n.shared,0!=(4194240&t))&&(r=n.lanes,r&=e.pendingLanes,He(e,n.lanes=t|=r))}function qt(e,n){var t=e.updateQueue,r=e.alternate;if(null!==r&&t===(r=r.updateQueue)){var l=null,a=null;if(null!==(t=t.firstBaseUpdate)){do{var o={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null}}while(null===a?l=a=o:a=a.next=o,null!==(t=t.next));null===a?l=a=n:a=a.next=n}else l=a=n;t={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=t}else null===(e=t.lastBaseUpdate)?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}function Kt(e,n,t,r){var l,a,o=e.updateQueue,u=(ss=!1,o.firstBaseUpdate),i=o.lastBaseUpdate;if(null!==(f=o.shared.pending)&&(o.shared.pending=null,a=(l=f).next,(l.next=null)===i?u=a:i.next=a,i=l,null!==(c=e.alternate))&&(f=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===f?c.firstBaseUpdate=a:f.next=a,c.lastBaseUpdate=l),null!==u){for(var s=o.baseState,i=0,c=a=l=null,f=u;;){var d=f.lane,p=f.eventTime;if((r&d)===d){null!==c&&(c=c.next={eventTime:p,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,next:null});e:{var m=e,h=f,d=n,p=t;switch(h.tag){case 1:if(\"function\"==typeof(m=h.payload)){s=m.call(p,s,d);break e}s=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(d=\"function\"==typeof(m=h.payload)?m.call(p,s,d):m))break e;s=g({},s,d);break e;case 2:ss=!0}}null!==f.callback&&0!==f.lane&&(e.flags|=64,null===(d=o.effects)?o.effects=[f]:d.push(f))}else p={eventTime:p,lane:d,tag:f.tag,payload:f.payload,callback:f.callback,next:null},null===c?(a=c=p,l=s):c=c.next=p,i|=d;if(null===(f=f.next)){if(null===(f=o.shared.pending))break;f=(d=f).next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}if(null===c&&(l=s),o.baseState=l,o.firstBaseUpdate=a,o.lastBaseUpdate=c,null!==(n=o.shared.interleaved))for(o=n;i|=o.lane,(o=o.next)!==n;);else null===u&&(o.shared.lanes=0);Qs|=i,e.lanes=i,e.memoizedState=s}}function Yt(e,n,t){if(e=n.effects,(n.effects=null)!==e)for(n=0;n<e.length;n++){var r=e[n],l=r.callback;if(null!==l){if(r.callback=null,r=t,\"function\"!=typeof l)throw Error(S(191,l));l.call(r)}}}function Xt(e){if(e===cs)throw Error(S(174));return e}function Gt(e,n){switch(f(ps,n),f(ds,e),f(fs,cs),e=n.nodeType){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:pe(null,\"\");break;default:n=pe(n=(e=8===e?n.parentNode:n).namespaceURI||null,e=e.tagName)}s(fs),f(fs,n)}function Zt(e){s(fs),s(ds),s(ps)}function Jt(e){Xt(ps.current);var n=Xt(fs.current),t=pe(n,e.type);n!==t&&(f(ds,e),f(fs,t))}function er(e){ds.current===e&&(s(fs),s(ds))}function nr(e){for(var n=e;null!==n;){if(13===n.tag){var t=n.memoizedState;if(null!==t&&(null===(t=t.dehydrated)||\"$?\"===t.data||\"$!\"===t.data))return n}else if(19===n.tag&&void 0!==n.memoizedProps.revealOrder){if(0!=(128&n.flags))return n}else if(null!==n.child){n=(n.child.return=n).child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function tr(){for(var e=0;e<ms.length;e++)ms[e]._workInProgressVersionPrimary=null;ms.length=0}function n(){throw Error(S(321))}function rr(e,n){if(null===n)return!1;for(var t=0;t<n.length&&t<e.length;t++)if(!ti(e[t],n[t]))return!1;return!0}function lr(e,n,t,r,l,a){if(ys=a,(N=n).memoizedState=null,n.updateQueue=null,n.lanes=0,hs.current=null===e||null===e.memoizedState?xs:Es,e=t(r,l),bs){a=0;do{if(bs=!1,ks=0,25<=a)throw Error(S(301))}while(a+=1,P=z=null,n.updateQueue=null,hs.current=Cs,e=t(r,l),bs)}if(hs.current=Ss,n=null!==z&&null!==z.next,ys=0,P=z=N=null,vs=!1,n)throw Error(S(300));return e}function ar(){var e=0!==ks;return ks=0,e}function or(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===P?N.memoizedState=P=e:P=P.next=e,P}function ur(){e=null===z?null!==(e=N.alternate)?e.memoizedState:null:z.next;var e,n=null===P?N.memoizedState:P.next;if(null!==n)P=n,z=e;else{if(null===e)throw Error(S(310));e={memoizedState:(z=e).memoizedState,baseState:z.baseState,baseQueue:z.baseQueue,queue:z.queue,next:null},null===P?N.memoizedState=P=e:P=P.next=e}return P}function ir(e,n){return\"function\"==typeof n?n(e):n}function sr(e,n,t){if(null===(t=(n=ur()).queue))throw Error(S(311));t.lastRenderedReducer=e;var r,l=(o=z).baseQueue;if(null!==(a=t.pending)&&(null!==l&&(r=l.next,l.next=a.next,a.next=r),o.baseQueue=l=a,t.pending=null),null!==l){var a=l.next,o=o.baseState,u=r=null,i=null,s=a;do{var c,f=s.lane}while((ys&f)===f?(null!==i&&(i=i.next={lane:0,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null}),o=s.hasEagerState?s.eagerState:e(o,s.action)):(c={lane:f,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null},null===i?(u=i=c,r=o):i=i.next=c,N.lanes|=f,Qs|=f),null!==(s=s.next)&&s!==a);null===i?r=o:i.next=u,ti(o,n.memoizedState)||(_=!0),n.memoizedState=o,n.baseState=r,n.baseQueue=i,t.lastRenderedState=o}if(null!==(e=t.interleaved))for(l=e;a=l.lane,N.lanes|=a,Qs|=a,(l=l.next)!==e;);else null===l&&(t.lanes=0);return[n.memoizedState,t.dispatch]}function cr(e,n,t){if(null===(t=(n=ur()).queue))throw Error(S(311));t.lastRenderedReducer=e;var r=t.dispatch,l=t.pending,a=n.memoizedState;if(null!==l){t.pending=null;for(var o=l=l.next;a=e(a,o.action),(o=o.next)!==l;);ti(a,n.memoizedState)||(_=!0),n.memoizedState=a,null===n.baseQueue&&(n.baseState=a),t.lastRenderedState=a}return[a,r]}function fr(e,n,t){}function dr(e,n,t){t=N;var r=ur(),l=n(),a=!ti(r.memoizedState,l);if(a&&(r.memoizedState=l,_=!0),r=r.queue,Er(hr.bind(null,t,r,e),[e]),r.getSnapshot!==n||a||null!==P&&1&P.memoizedState.tag){if(t.flags|=2048,br(9,mr.bind(null,t,r,l,n),void 0,null),null===i)throw Error(S(349));0==(30&ys)&&pr(t,n,l)}return l}function pr(e,n,t){e.flags|=16384,e={getSnapshot:n,value:t},null===(n=N.updateQueue)?(N.updateQueue=n={lastEffect:null,stores:null}).stores=[e]:null===(t=n.stores)?n.stores=[e]:t.push(e)}function mr(e,n,t,r){n.value=t,n.getSnapshot=r,gr(n)&&yr(e)}function hr(e,n,t){return t(function(){gr(n)&&yr(e)})}function gr(e){var n=e.getSnapshot;e=e.value;try{var t=n();return!ti(e,t)}catch(e){return!0}}function yr(e){var n=Wt(e,1);null!==n&&Kl(n,e,1,-1)}function vr(e){var n=or();return\"function\"==typeof e&&(e=e()),e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ir,lastRenderedState:n.memoizedState=n.baseState=e},e=(n.queue=e).dispatch=Or.bind(null,N,e),[n.memoizedState,e]}function br(e,n,t,r){return e={tag:e,create:n,destroy:t,deps:r,next:null},null===(n=N.updateQueue)?(N.updateQueue=n={lastEffect:null,stores:null}).lastEffect=e.next=e:null===(t=n.lastEffect)?n.lastEffect=e.next=e:(r=t.next,(t.next=e).next=r,n.lastEffect=e),e}function kr(e){return ur().memoizedState}function wr(e,n,t,r){var l=or();N.flags|=e,l.memoizedState=br(1|n,t,void 0,void 0===r?null:r)}function Sr(e,n,t,r){var l=ur(),a=(r=void 0===r?null:r,void 0);if(null!==z){var o=z.memoizedState,a=o.destroy;if(null!==r&&rr(r,o.deps))return void(l.memoizedState=br(n,t,a,r))}N.flags|=e,l.memoizedState=br(1|n,t,a,r)}function xr(e,n){return wr(8390656,8,e,n)}function Er(e,n){return Sr(2048,8,e,n)}function Cr(e,n){return Sr(4,2,e,n)}function Nr(e,n){return Sr(4,4,e,n)}function zr(e,n){return\"function\"==typeof n?(e=e(),n(e),function(){n(null)}):null!=n?(e=e(),n.current=e,function(){n.current=null}):void 0}function Pr(e,n,t){return t=null!=t?t.concat([e]):null,Sr(4,4,zr.bind(null,n,e),t)}function _r(e,n){}function Lr(e,n){var t=ur(),r=(n=void 0===n?null:n,t.memoizedState);return null!==r&&null!==n&&rr(n,r[1])?r[0]:(t.memoizedState=[e,n],e)}function Tr(e,n){var t=ur(),r=(n=void 0===n?null:n,t.memoizedState);return null!==r&&null!==n&&rr(n,r[1])?r[0]:(e=e(),t.memoizedState=[e,n],e)}function Mr(e,n,t){return 0==(21&ys)?(e.baseState&&(e.baseState=!1,_=!0),e.memoizedState=t):(ti(t,n)||(t=Ve(),N.lanes|=t,Qs|=t,e.baseState=!0),n)}function Fr(e,n,t){x=0!==(t=x)&&t<4?t:4,e(!0);var r=gs.transition;gs.transition={};try{e(!1),n()}finally{x=t,gs.transition=r}}function Rr(){return ur().memoizedState}function Dr(e,n,t){var r=ql(e);t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},Ir(e)?Ur(n,t):null!==(t=At(e,n,t,r))&&(Kl(t,e,r,m()),Vr(t,n,r))}function Or(e,n,t){var r=ql(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(Ir(e))Ur(n,l);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=n.lastRenderedReducer))try{var o,u=n.lastRenderedState,i=a(u,t);if(l.hasEagerState=!0,l.eagerState=i,ti(i,u))return null===(o=n.interleaved)?(l.next=l,Vt(n)):(l.next=o.next,o.next=l),void(n.interleaved=l)}catch(e){}null!==(t=At(e,n,l,r))&&(Kl(t,e,r,l=m()),Vr(t,n,r))}}function Ir(e){var n=e.alternate;return e===N||null!==n&&n===N}function Ur(e,n){bs=vs=!0;var t=e.pending;null===t?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function Vr(e,n,t){var r;0!=(4194240&t)&&(r=n.lanes,r&=e.pendingLanes,He(e,n.lanes=t|=r))}function Ar(e,n){if(e&&e.defaultProps)for(var t in n=g({},n),e=e.defaultProps)void 0===n[t]&&(n[t]=e[t]);return n}function Wr(e,n,t,r){t=null==(t=t(r,n=e.memoizedState))?n:g({},n,t),e.memoizedState=t,0===e.lanes&&(e.updateQueue.baseState=t)}function Br(e,n,t,r,l,a,o){return\"function\"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!(n.prototype&&n.prototype.isPureReactComponent&&Ln(t,r)&&Ln(l,a))}function Hr(e,n,t){var r=!1,l=Ui,a=n.contextType;return n=new n(t,a=\"object\"==typeof a&&null!==a?Ut(a):(l=h(n)?Vi:v.current,(r=null!=(r=n.contextTypes))?ct(e,l):Ui)),e.memoizedState=null!=n.state?n.state:null,n.updater=Ns,(e.stateNode=n)._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=a),n}function Qr(e,n,t,r){e=n.state,\"function\"==typeof n.componentWillReceiveProps&&n.componentWillReceiveProps(t,r),\"function\"==typeof n.UNSAFE_componentWillReceiveProps&&n.UNSAFE_componentWillReceiveProps(t,r),n.state!==e&&Ns.enqueueReplaceState(n,n.state,null)}function jr(e,n,t,r){var l=e.stateNode,a=(l.props=t,l.state=e.memoizedState,l.refs={},Bt(e),n.contextType);\"object\"==typeof a&&null!==a?l.context=Ut(a):(a=h(n)?Vi:v.current,l.context=ct(e,a)),l.state=e.memoizedState,\"function\"==typeof(a=n.getDerivedStateFromProps)&&(Wr(e,n,a,t),l.state=e.memoizedState),\"function\"==typeof n.getDerivedStateFromProps||\"function\"==typeof l.getSnapshotBeforeUpdate||\"function\"!=typeof l.UNSAFE_componentWillMount&&\"function\"!=typeof l.componentWillMount||(n=l.state,\"function\"==typeof l.componentWillMount&&l.componentWillMount(),\"function\"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount(),n!==l.state&&Ns.enqueueReplaceState(l,l.state,null),Kt(e,t,l,r),l.state=e.memoizedState),\"function\"==typeof l.componentDidMount&&(e.flags|=4194308)}function $r(e,n){try{for(var t=\"\",r=n;t+=$(r),r=r.return;);var l=t}catch(e){l=\"\\\\nError generating stack: \"+e.message+\"\\\\n\"+e.stack}return{value:e,source:n,stack:l,digest:null}}function qr(e,n,t){return{value:e,source:null,stack:null!=t?t:null,digest:null!=n?n:null}}function Kr(e,n){try{console.error(n.value)}catch(e){setTimeout(function(){throw e})}}function Yr(e,n,t){(t=Qt(-1,t)).tag=3,t.payload={element:null};var r=n.value;return t.callback=function(){Gs||(Gs=!0,Zs=r),Kr(e,n)},t}function Xr(n,t,e){(e=Qt(-1,e)).tag=3;var r,l=n.type.getDerivedStateFromError,a=(\"function\"==typeof l&&(r=t.value,e.payload=function(){return l(r)},e.callback=function(){Kr(n,t)}),n.stateNode);return null!==a&&\"function\"==typeof a.componentDidCatch&&(e.callback=function(){Kr(n,t),\"function\"!=typeof l&&(null===Js?Js=new Set([this]):Js.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:\"\"})}),e}function Gr(e,n,t){var r,l=e.pingCache;null===l?(l=e.pingCache=new zs,r=new Set,l.set(n,r)):void 0===(r=l.get(n))&&(r=new Set,l.set(n,r)),r.has(t)||(r.add(t),e=ya.bind(null,e,n,t),n.then(e,e))}function Zr(e){do{var n;if(n=(n=13===e.tag)?null===(n=e.memoizedState)||null!==n.dehydrated:n)return e}while(null!==(e=e.return));return null}function Jr(e,n,t,r,l){return 0==(1&e.mode)?e===n?e.flags|=65536:(e.flags|=128,t.flags|=131072,t.flags&=-52805,1===t.tag&&(null===t.alternate?t.tag=17:((n=Qt(-1,1)).tag=2,jt(t,n,1))),t.lanes|=1):(e.flags|=65536,e.lanes=l),e}function d(e,n,t,r){n.child=null===e?ts(n,null,t,r):ns(n,e.child,t,r)}function el(e,n,t,r,l){t=t.render;var a=n.ref;return It(n,l),r=lr(e,n,t,r,a,l),t=ar(),null===e||_?(E&&t&&kt(n),n.flags|=1,d(e,n,r,l),n.child):(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l,bl(e,n,l))}function nl(e,n,t,r,l){var a;if(null===e)return\"function\"!=typeof(a=t.type)||xa(a)||void 0!==a.defaultProps||null!==t.compare||void 0!==t.defaultProps?((e=Na(t.type,null,r,n,n.mode,l)).ref=n.ref,(e.return=n).child=e):(n.tag=15,n.type=a,tl(e,n,a,r,l));if(a=e.child,0==(e.lanes&l)){var o=a.memoizedProps;if((t=null!==(t=t.compare)?t:Ln)(o,r)&&e.ref===n.ref)return bl(e,n,l)}return n.flags|=1,(e=Ca(a,r)).ref=n.ref,(e.return=n).child=e}function tl(e,n,t,r,l){if(null!==e){var a=e.memoizedProps;if(Ln(a,r)&&e.ref===n.ref){if(_=!1,n.pendingProps=r=a,0==(e.lanes&l))return n.lanes=e.lanes,bl(e,n,l);0!=(131072&e.flags)&&(_=!0)}}return al(e,n,t,r,l)}function rl(e,n,t){var r=n.pendingProps,l=r.children,a=null!==e?e.memoizedState:null;if(\"hidden\"===r.mode)if(0==(1&n.mode))n.memoizedState={baseLanes:0,cachePool:null,transitions:null},f(Bs,O),O|=t;else{if(0==(1073741824&t))return e=null!==a?a.baseLanes|t:t,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,f(Bs,O),O|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:t,f(Bs,O),O|=r}else null!==a?(r=a.baseLanes|t,n.memoizedState=null):r=t,f(Bs,O),O|=r;return d(e,n,l,t),n.child}function ll(e,n){var t=n.ref;(null===e&&null!==t||null!==e&&e.ref!==t)&&(n.flags|=512,n.flags|=2097152)}function al(e,n,t,r,l){var a=ct(n,a=h(t)?Vi:v.current);return It(n,l),t=lr(e,n,t,r,a,l),r=ar(),null===e||_?(E&&r&&kt(n),n.flags|=1,d(e,n,t,l),n.child):(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l,bl(e,n,l))}function ol(e,n,t,r,l){var a,o,u,i,s,c,f,d,p,m;return h(t)?(a=!0,pt(n)):a=!1,It(n,l),r=null===n.stateNode?(vl(e,n),Hr(n,t,r),jr(n,t,r,l),!0):null===e?(o=n.stateNode,u=n.memoizedProps,o.props=u,d=o.context,i=\"object\"==typeof(i=t.contextType)&&null!==i?Ut(i):ct(n,i=h(t)?Vi:v.current),(c=\"function\"==typeof(s=t.getDerivedStateFromProps)||\"function\"==typeof o.getSnapshotBeforeUpdate)||\"function\"!=typeof o.UNSAFE_componentWillReceiveProps&&\"function\"!=typeof o.componentWillReceiveProps||u===r&&d===i||Qr(n,o,r,i),ss=!1,f=n.memoizedState,o.state=f,Kt(n,r,o,l),d=n.memoizedState,u!==r||f!==d||b.current||ss?(\"function\"==typeof s&&(Wr(n,t,s,r),d=n.memoizedState),(u=ss||Br(n,t,u,r,f,d,i))?(c||\"function\"!=typeof o.UNSAFE_componentWillMount&&\"function\"!=typeof o.componentWillMount||(\"function\"==typeof o.componentWillMount&&o.componentWillMount(),\"function\"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),\"function\"==typeof o.componentDidMount&&(n.flags|=4194308)):(\"function\"==typeof o.componentDidMount&&(n.flags|=4194308),n.memoizedProps=r,n.memoizedState=d),o.props=r,o.state=d,o.context=i,u):(\"function\"==typeof o.componentDidMount&&(n.flags|=4194308),!1)):(o=n.stateNode,Ht(e,n),u=n.memoizedProps,i=n.type===n.elementType?u:Ar(n.type,u),o.props=i,c=n.pendingProps,f=o.context,d=\"object\"==typeof(d=t.contextType)&&null!==d?Ut(d):ct(n,d=h(t)?Vi:v.current),(s=\"function\"==typeof(p=t.getDerivedStateFromProps)||\"function\"==typeof o.getSnapshotBeforeUpdate)||\"function\"!=typeof o.UNSAFE_componentWillReceiveProps&&\"function\"!=typeof o.componentWillReceiveProps||u===c&&f===d||Qr(n,o,r,d),ss=!1,f=n.memoizedState,o.state=f,Kt(n,r,o,l),m=n.memoizedState,u!==c||f!==m||b.current||ss?(\"function\"==typeof p&&(Wr(n,t,p,r),m=n.memoizedState),(i=ss||Br(n,t,i,r,f,m,d)||!1)?(s||\"function\"!=typeof o.UNSAFE_componentWillUpdate&&\"function\"!=typeof o.componentWillUpdate||(\"function\"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,m,d),\"function\"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,m,d)),\"function\"==typeof o.componentDidUpdate&&(n.flags|=4),\"function\"==typeof o.getSnapshotBeforeUpdate&&(n.flags|=1024)):(\"function\"!=typeof o.componentDidUpdate||u===e.memoizedProps&&f===e.memoizedState||(n.flags|=4),\"function\"!=typeof o.getSnapshotBeforeUpdate||u===e.memoizedProps&&f===e.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=m),o.props=r,o.state=m,o.context=d,i):(\"function\"!=typeof o.componentDidUpdate||u===e.memoizedProps&&f===e.memoizedState||(n.flags|=4),\"function\"!=typeof o.getSnapshotBeforeUpdate||u===e.memoizedProps&&f===e.memoizedState||(n.flags|=1024),!1)),ul(e,n,t,r,a,l)}function ul(e,n,t,r,l,a){ll(e,n);var o=0!=(128&n.flags);if(!r&&!o)return l&&mt(n,t,!1),bl(e,n,a);r=n.stateNode,Ps.current=n;var u=o&&\"function\"!=typeof t.getDerivedStateFromError?null:r.render();return n.flags|=1,null!==e&&o?(n.child=ns(n,e.child,null,a),n.child=ns(n,null,u,a)):d(e,n,u,a),n.memoizedState=r.state,l&&mt(n,t,!0),n.child}function il(e){var n=e.stateNode;n.pendingContext?ft(e,n.pendingContext,n.pendingContext!==n.context):n.context&&ft(e,n.context,!1),Gt(e,n.containerInfo)}function sl(e,n,t,r,l){return Pt(),_t(l),n.flags|=256,d(e,n,t,r),n.child}function cl(e){return{baseLanes:e,cachePool:null,transitions:null}}function fl(e,n,t){var r,l,a=n.pendingProps,o=C.current,u=!1,i=0!=(128&n.flags);return(r=(r=i)||(null===e||null!==e.memoizedState)&&0!=(2&o))?(u=!0,n.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),f(C,1&o),null===e?(Ct(n),null!==(e=n.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&n.mode)?n.lanes=1:\"$!\"===e.data?n.lanes=8:n.lanes=1073741824,null):(i=a.children,e=a.fallback,u?(a=n.mode,u=n.child,i={mode:\"hidden\",children:i},0==(1&a)&&null!==u?(u.childLanes=0,u.pendingProps=i):u=Pa(i,a,0,null),e=za(e,a,t,null),u.return=n,e.return=n,u.sibling=e,n.child=u,n.child.memoizedState=cl(t),n.memoizedState=_s,e):dl(n,i))):null!==(o=e.memoizedState)&&null!==(r=o.dehydrated)?ml(e,n,i,a,r,o,t):(u?(u=a.fallback,i=n.mode,r=(o=e.child).sibling,l={mode:\"hidden\",children:a.children},0==(1&i)&&n.child!==o?((a=n.child).childLanes=0,a.pendingProps=l,n.deletions=null):(a=Ca(o,l)).subtreeFlags=14680064&o.subtreeFlags,null!==r?u=Ca(r,u):(u=za(u,i,t,null)).flags|=2,u.return=n,a.return=n,a.sibling=u,n.child=a,a=u,u=n.child,i=null===(i=e.child.memoizedState)?cl(t):{baseLanes:i.baseLanes|t,cachePool:null,transitions:i.transitions},u.memoizedState=i,u.childLanes=e.childLanes&~t,n.memoizedState=_s):(e=(u=e.child).sibling,a=Ca(u,{mode:\"visible\",children:a.children}),0==(1&n.mode)&&(a.lanes=t),a.return=n,(a.sibling=null)!==e&&(null===(t=n.deletions)?(n.deletions=[e],n.flags|=16):t.push(e)),n.child=a,n.memoizedState=null),a)}function dl(e,n,t){return((n=Pa({mode:\"visible\",children:n},e.mode,0,null)).return=e).child=n}function pl(e,n,t,r){return null!==r&&_t(r),ns(n,e.child,null,t),(e=dl(n,n.pendingProps.children)).flags|=2,n.memoizedState=null,e}function ml(e,n,t,r,l,a,o){if(t)return 256&n.flags?(n.flags&=-257,pl(e,n,o,r=qr(Error(S(422))))):null!==n.memoizedState?(n.child=e.child,n.flags|=128,null):(a=r.fallback,l=n.mode,r=Pa({mode:\"visible\",children:r.children},l,0,null),(a=za(a,l,o,null)).flags|=2,r.return=n,a.return=n,r.sibling=a,n.child=r,0!=(1&n.mode)&&ns(n,e.child,null,o),n.child.memoizedState=cl(o),n.memoizedState=_s,a);if(0==(1&n.mode))return pl(e,n,o,null);var u;if(\"$!\"===l.data)return r=u=(r=l.nextSibling&&l.nextSibling.dataset)?r.dgst:u,pl(e,n,o,r=qr(a=Error(S(419)),r,void 0));if(u=0!=(o&e.childLanes),_||u){if(null!==(r=i)){switch(o&-o){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}0!==(l=0!=(l&(r.suspendedLanes|o))?0:l)&&l!==a.retryLane&&(Wt(e,a.retryLane=l),Kl(r,e,l,-1))}return ua(),pl(e,n,o,r=qr(Error(S(421))))}return\"$?\"===l.data?(n.flags|=128,n.child=e.child,n=ba.bind(null,e),l._reactRetry=n,null):(e=a.treeContext,k=rt(l.nextSibling),Zi=n,E=!0,(Ji=null)!==e&&(qi[Ki++]=Xi,qi[Ki++]=Gi,qi[Ki++]=Yi,Xi=e.id,Gi=e.overflow,Yi=n),(n=dl(n,r.children)).flags|=4096,n)}function hl(e,n,t){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n),Ot(e.return,n,t)}function gl(e,n,t,r,l){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:r,tail:t,tailMode:l}:(a.isBackwards=n,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=t,a.tailMode=l)}function yl(e,n,t){var r=n.pendingProps,l=r.revealOrder,a=r.tail;if(d(e,n,r.children,t),0!=(2&(r=C.current)))r=1&r|2,n.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=n.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&hl(e,t,n);else if(19===e.tag)hl(e,t,n);else if(null!==e.child){e=(e.child.return=e).child;continue}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(f(C,r),0==(1&n.mode))n.memoizedState=null;else switch(l){case\"forwards\":for(t=n.child,l=null;null!==t;)null!==(e=t.alternate)&&null===nr(e)&&(l=t),t=t.sibling;null===(t=l)?(l=n.child,n.child=null):(l=t.sibling,t.sibling=null),gl(n,!1,l,t,a);break;case\"backwards\":for(l=n.child,n.child=t=null;null!==l;){if(null!==(e=l.alternate)&&null===nr(e)){n.child=l;break}e=l.sibling,l.sibling=t,t=l,l=e}gl(n,!0,t,null,a);break;case\"together\":gl(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function vl(e,n){0==(1&n.mode)&&null!==e&&(e.alternate=null,n.alternate=null,n.flags|=2)}function bl(e,n,t){if(null!==e&&(n.dependencies=e.dependencies),Qs|=n.lanes,0==(t&n.childLanes))return null;if(null!==e&&n.child!==e.child)throw Error(S(153));if(null!==n.child){for(t=Ca(e=n.child,e.pendingProps),(n.child=t).return=n;null!==e.sibling;)e=e.sibling,(t=t.sibling=Ca(e,e.pendingProps)).return=n;t.sibling=null}return n.child}function kl(e,n,t){switch(n.tag){case 3:il(n),Pt();break;case 5:Jt(n);break;case 1:h(n.type)&&pt(n);break;case 4:Gt(n,n.stateNode.containerInfo);break;case 10:var r=n.type._context,l=n.memoizedProps.value;f(rs,r._currentValue),r._currentValue=l;break;case 13:if(null!==(r=n.memoizedState))return null!==r.dehydrated?(f(C,1&C.current),n.flags|=128,null):0!=(t&n.child.childLanes)?fl(e,n,t):(f(C,1&C.current),null!==(e=bl(e,n,t))?e.sibling:null);f(C,1&C.current);break;case 19:if(r=0!=(t&n.childLanes),0!=(128&e.flags)){if(r)return yl(e,n,t);n.flags|=128}if(null!==(l=n.memoizedState)&&(l.rendering=null,l.tail=null,l.lastEffect=null),f(C,C.current),r)break;return null;case 22:case 23:return n.lanes=0,rl(e,n,t)}return bl(e,n,t)}function wl(e,n){if(!E)switch(e.tailMode){case\"hidden\":n=e.tail;for(var t=null;null!==n;)null!==n.alternate&&(t=n),n=n.sibling;null===t?e.tail=null:t.sibling=null;break;case\"collapsed\":for(var t=e.tail,r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?n||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function p(e){var n=null!==e.alternate&&e.alternate.child===e.child,t=0,r=0;if(n)for(var l=e.child;null!==l;)t|=l.lanes|l.childLanes,r=(r|=14680064&l.subtreeFlags)|14680064&l.flags,l.return=e,l=l.sibling;else for(l=e.child;null!==l;)t|=l.lanes|l.childLanes,r=(r|=l.subtreeFlags)|l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=t,n}function Sl(e,n,t){var r=n.pendingProps;switch(wt(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return p(n),null;case 1:return h(n.type)&&(s(b),s(v)),p(n),null;case 3:return r=n.stateNode,Zt(),s(b),s(v),tr(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(zt(n)?n.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&n.flags)||(n.flags|=1024,null!==Ji&&(Zl(Ji),Ji=null))),Ts(e,n),p(n),null;case 5:er(n);var l,a=Xt(ps.current);if(t=n.type,null!==e&&null!=n.stateNode)Ms(e,n,t,r,a),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!r){if(null===n.stateNode)throw Error(S(166));return p(n),null}if(e=Xt(fs.current),zt(n)){r=n.stateNode,t=n.type;var o,u,i=n.memoizedProps;switch(r[Li]=n,r[Ti]=i,e=0!=(1&n.mode),t){case\"dialog\":c(\"cancel\",r),c(\"close\",r);break;case\"iframe\":case\"object\":case\"embed\":c(\"load\",r);break;case\"video\":case\"audio\":for(a=0;a<bi.length;a++)c(bi[a],r);break;case\"source\":c(\"error\",r);break;case\"img\":case\"image\":case\"link\":c(\"error\",r),c(\"load\",r);break;case\"details\":c(\"toggle\",r);break;case\"input\":te(r,i),c(\"invalid\",r);break;case\"select\":r._wrapperState={wasMultiple:!!i.multiple},c(\"invalid\",r);break;case\"textarea\":se(r,i),c(\"invalid\",r)}for(o in ge(t,i),a=null,i)i.hasOwnProperty(o)&&(u=i[o],\"children\"===o?\"string\"==typeof u?r.textContent!==u&&(!0!==i.suppressHydrationWarning&&Zn(r.textContent,u,e),a=[\"children\",u]):\"number\"==typeof u&&r.textContent!==\"\"+u&&(!0!==i.suppressHydrationWarning&&Zn(r.textContent,u,e),a=[\"children\",\"\"+u]):Ja.hasOwnProperty(o)&&null!=u&&\"onScroll\"===o&&c(\"scroll\",r));switch(t){case\"input\":Z(r),ae(r,i,!0);break;case\"textarea\":Z(r),fe(r);break;case\"select\":case\"option\":break;default:\"function\"==typeof i.onClick&&(r.onclick=Jn)}r=a,null!==(n.updateQueue=r)&&(n.flags|=4)}else{o=9===a.nodeType?a:a.ownerDocument,\"http://www.w3.org/1999/xhtml\"===(e=\"http://www.w3.org/1999/xhtml\"===e?de(t):e)?\"script\"===t?((e=o.createElement(\"div\")).innerHTML=\"<script><\\\\/script>\",e=e.removeChild(e.firstChild)):\"string\"==typeof r.is?e=o.createElement(t,{is:r.is}):(e=o.createElement(t),\"select\"===t&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,t),e[Li]=n,e[Ti]=r,Ls(e,n,!1,!1),n.stateNode=e;e:{switch(o=ye(t,r),t){case\"dialog\":c(\"cancel\",e),c(\"close\",e),a=r;break;case\"iframe\":case\"object\":case\"embed\":c(\"load\",e),a=r;break;case\"video\":case\"audio\":for(a=0;a<bi.length;a++)c(bi[a],e);a=r;break;case\"source\":c(\"error\",e),a=r;break;case\"img\":case\"image\":case\"link\":c(\"error\",e),c(\"load\",e),a=r;break;case\"details\":c(\"toggle\",e),a=r;break;case\"input\":te(e,r),a=ne(e,r),c(\"invalid\",e);break;case\"option\":a=r;break;case\"select\":e._wrapperState={wasMultiple:!!r.multiple},a=g({},r,{value:void 0}),c(\"invalid\",e);break;case\"textarea\":se(e,r),a=ie(e,r),c(\"invalid\",e);break;default:a=r}for(i in ge(t,a),u=a)u.hasOwnProperty(i)&&(l=u[i],\"style\"===i?he(e,l):\"dangerouslySetInnerHTML\"===i?null!=(l=l?l.__html:void 0)&&Co(e,l):\"children\"===i?\"string\"==typeof l?\"textarea\"===t&&\"\"===l||No(e,l):\"number\"==typeof l&&No(e,\"\"+l):\"suppressContentEditableWarning\"!==i&&\"suppressHydrationWarning\"!==i&&\"autoFocus\"!==i&&(Ja.hasOwnProperty(i)?null!=l&&\"onScroll\"===i&&c(\"scroll\",e):null!=l&&B(e,i,l,o)));switch(t){case\"input\":Z(e),ae(e,r,!1);break;case\"textarea\":Z(e),fe(e);break;case\"option\":null!=r.value&&e.setAttribute(\"value\",\"\"+Y(r.value));break;case\"select\":e.multiple=!!r.multiple,null!=(i=r.value)?ue(e,!!r.multiple,i,!1):null!=r.defaultValue&&ue(e,!!r.multiple,r.defaultValue,!0);break;default:\"function\"==typeof a.onClick&&(e.onclick=Jn)}switch(t){case\"button\":case\"input\":case\"select\":case\"textarea\":r=!!r.autoFocus;break e;case\"img\":r=!0;break e;default:r=!1}}r&&(n.flags|=4)}null!==n.ref&&(n.flags|=512,n.flags|=2097152)}return p(n),null;case 6:if(e&&null!=n.stateNode)Fs(e,n,e.memoizedProps,r);else{if(\"string\"!=typeof r&&null===n.stateNode)throw Error(S(166));if(t=Xt(ps.current),Xt(fs.current),zt(n)){if(r=n.stateNode,t=n.memoizedProps,r[Li]=n,(i=r.nodeValue!==t)&&null!==(e=Zi))switch(e.tag){case 3:Zn(r.nodeValue,t,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Zn(r.nodeValue,t,0!=(1&e.mode))}i&&(n.flags|=4)}else((r=(9===t.nodeType?t:t.ownerDocument).createTextNode(r))[Li]=n).stateNode=r}return p(n),null;case 13:if(s(C),r=n.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(E&&null!==k&&0!=(1&n.mode)&&0==(128&n.flags)){for(i=k;i;)i=rt(i.nextSibling);Pt(),n.flags|=98560,i=!1}else if(i=zt(n),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(S(318));if(!(i=null!==(i=n.memoizedState)?i.dehydrated:null))throw Error(S(317));i[Li]=n}else Pt(),0==(128&n.flags)&&(n.memoizedState=null),n.flags|=4;p(n),i=!1}else null!==Ji&&(Zl(Ji),Ji=null),i=!0;if(!i)return 65536&n.flags?n:null}return 0!=(128&n.flags)?(n.lanes=t,n):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(n.child.flags|=8192,0!=(1&n.mode))&&(null===e||0!=(1&C.current)?0===I&&(I=3):ua()),null!==n.updateQueue&&(n.flags|=4),p(n),null);case 4:return Zt(),Ts(e,n),null===e&&Qn(n.stateNode.containerInfo),p(n),null;case 10:return Dt(n.type._context),p(n),null;case 17:return h(n.type)&&(s(b),s(v)),p(n),null;case 19:if(s(C),null===(i=n.memoizedState));else{if(r=0!=(128&n.flags),null===(o=i.rendering))if(r)wl(i,!1);else{if(0!==I||null!==e&&0!=(128&e.flags))for(e=n.child;null!==e;){if(null!==(o=nr(e))){for(n.flags|=128,wl(i,!1),null!==(r=o.updateQueue)&&(n.updateQueue=r,n.flags|=4),n.subtreeFlags=0,r=t,t=n.child;null!==t;)e=r,(i=t).flags&=14680066,null===(o=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),t=t.sibling;return f(C,1&C.current|2),n.child}e=e.sibling}null!==i.tail&&y()>Ys&&(n.flags|=128,wl(i,!(r=!0)),n.lanes=4194304)}else{if(!r)if(null!==(e=nr(o))){if(n.flags|=128,r=!0,null!==(t=e.updateQueue)&&(n.updateQueue=t,n.flags|=4),wl(i,!0),null===i.tail&&\"hidden\"===i.tailMode&&!o.alternate&&!E)return p(n),null}else 2*y()-i.renderingStartTime>Ys&&1073741824!==t&&(n.flags|=128,wl(i,!(r=!0)),n.lanes=4194304);i.isBackwards?(o.sibling=n.child,n.child=o):(null!==(t=i.last)?t.sibling=o:n.child=o,i.last=o)}if(null!==i.tail)return n=i.tail,i.rendering=n,i.tail=n.sibling,i.renderingStartTime=y(),n.sibling=null,t=C.current,f(C,r?1&t|2:1&t),n}return p(n),null;case 22:case 23:return O=Bs.current,s(Bs),r=null!==n.memoizedState,null!==e&&null!==e.memoizedState!==r&&(n.flags|=8192),r&&0!=(1&n.mode)?0!=(1073741824&O)&&(p(n),6&n.subtreeFlags)&&(n.flags|=8192):p(n),null;case 24:case 25:return null}throw Error(S(156,n.tag))}function xl(e,n,t){switch(wt(n),n.tag){case 1:return h(n.type)&&(s(b),s(v)),65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 3:return Zt(),s(b),s(v),tr(),0!=(65536&(e=n.flags))&&0==(128&e)?(n.flags=-65537&e|128,n):null;case 5:return er(n),null;case 13:if(s(C),null!==(e=n.memoizedState)&&null!==e.dehydrated){if(null===n.alternate)throw Error(S(340));Pt()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 19:return s(C),null;case 4:return Zt(),null;case 10:return Dt(n.type._context),null;case 22:case 23:return O=Bs.current,s(Bs),null;default:return null}}function El(n,t){var e=n.ref;if(null!==e)if(\"function\"==typeof e)try{e(null)}catch(e){w(n,t,e)}else e.current=null}function Cl(n,t,e){try{e()}catch(e){w(n,t,e)}}function Nl(e,n){if(Ei=Su,Dn(e=Rn())){if(\"selectionStart\"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:if((a=(t=(t=e.ownerDocument)&&t.defaultView||window).getSelection&&t.getSelection())&&0!==a.rangeCount){var t=a.anchorNode,r=a.anchorOffset,l=a.focusNode,a=a.focusOffset;try{t.nodeType,l.nodeType}catch(e){t=null;break e}var o,u=0,i=-1,s=-1,c=0,f=0,d=e,p=null;n:for(;;){for(;d!==t||0!==r&&3!==d.nodeType||(i=u+r),d!==l||0!==a&&3!==d.nodeType||(s=u+a),3===d.nodeType&&(u+=d.nodeValue.length),null!==(o=d.firstChild);)p=d,d=o;for(;;){if(d===e)break n;if(p===t&&++c===r&&(i=u),p===l&&++f===a&&(s=u),null!==(o=d.nextSibling))break;p=(d=p).parentNode}d=o}t=-1===i||-1===s?null:{start:i,end:s}}else t=null;t=t||{start:0,end:0}}else t=null;for(Su=!(Ci={focusedElem:e,selectionRange:t}),T=n;null!==T;)if(e=(n=T).child,0!=(1028&n.subtreeFlags)&&null!==e)e.return=n,T=e;else for(;null!==T;){n=T;try{var m,h,g,y,v=n.alternate;if(0!=(1024&n.flags))switch(n.tag){case 0:case 11:case 15:break;case 1:null!==v&&(m=v.memoizedProps,h=v.memoizedState,y=(g=n.stateNode).getSnapshotBeforeUpdate(n.elementType===n.type?m:Ar(n.type,m),h),g.__reactInternalSnapshotBeforeUpdate=y);break;case 3:var b=n.stateNode.containerInfo;1===b.nodeType?b.textContent=\"\":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(S(163))}}catch(e){w(n,n.return,e)}if(null!==(e=n.sibling)){e.return=n.return,T=e;break}T=n.return}return v=Os,Os=!1,v}function zl(e,n,t){var r=n.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var l,a=r=r.next;do{}while((a.tag&e)===e&&(l=a.destroy,(a.destroy=void 0)!==l)&&Cl(n,t,l),(a=a.next)!==r)}}function Pl(e,n){if(null!==(n=null!==(n=n.updateQueue)?n.lastEffect:null)){var t,r=n=n.next;do{}while((r.tag&e)===e&&(t=r.create,r.destroy=t()),(r=r.next)!==n)}}function _l(e){var n,t=e.ref;null!==t&&(n=e.stateNode,e.tag,e=n,\"function\"==typeof t?t(e):t.current=e)}function Ll(e){var n=e.alternate;null!==n&&(e.alternate=null,Ll(n)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(n=e.stateNode)&&(delete n[Li],delete n[Ti],delete n[Fi],delete n[Ri],delete n[Di]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Tl(e){return 5===e.tag||3===e.tag||4===e.tag}function Ml(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Tl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e=(e.child.return=e).child}if(!(2&e.flags))return e.stateNode}}function Fl(e,n,t){var r=e.tag;if(5===r||6===r)e=e.stateNode,n?(8===t.nodeType?t.parentNode:t).insertBefore(e,n):(8===t.nodeType?(n=t.parentNode).insertBefore(e,t):(n=t).appendChild(e),null==(t=t._reactRootContainer)&&null===n.onclick&&(n.onclick=Jn));else if(4!==r&&null!==(e=e.child))for(Fl(e,n,t),e=e.sibling;null!==e;)Fl(e,n,t),e=e.sibling}function Rl(e,n,t){var r=e.tag;if(5===r||6===r)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Rl(e,n,t),e=e.sibling;null!==e;)Rl(e,n,t),e=e.sibling}function Dl(e,n,t){for(t=t.child;null!==t;)Ol(e,n,t),t=t.sibling}function Ol(e,n,t){if(ou&&\"function\"==typeof ou.onCommitFiberUnmount)try{ou.onCommitFiberUnmount(au,t)}catch(e){}switch(t.tag){case 5:L||El(t,n);case 6:var r=M,l=Is;M=null,Dl(e,n,t),Is=l,null!==(M=r)&&(Is?(e=M,t=t.stateNode,(8===e.nodeType?e.parentNode:e).removeChild(t)):M.removeChild(t.stateNode));break;case 18:null!==M&&(Is?(e=M,t=t.stateNode,8===e.nodeType?tt(e.parentNode,t):1===e.nodeType&&tt(e,t),Je(e)):tt(M,t.stateNode));break;case 4:r=M,l=Is,M=t.stateNode.containerInfo,Is=!0,Dl(e,n,t),M=r,Is=l;break;case 0:case 11:case 14:case 15:if(!L&&null!==(r=t.updateQueue)&&null!==(r=r.lastEffect)){l=r=r.next;do{var a=(o=l).destroy,o=o.tag}while(void 0===a||0==(2&o)&&0==(4&o)||Cl(t,n,a),(l=l.next)!==r)}Dl(e,n,t);break;case 1:if(!L&&(El(t,n),\"function\"==typeof(r=t.stateNode).componentWillUnmount))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(e){w(t,n,e)}Dl(e,n,t);break;case 21:Dl(e,n,t);break;case 22:1&t.mode?(L=(r=L)||null!==t.memoizedState,Dl(e,n,t),L=r):Dl(e,n,t);break;default:Dl(e,n,t)}}function Il(t){var r,e=t.updateQueue;null!==e&&((t.updateQueue=null)===(r=t.stateNode)&&(r=t.stateNode=new Ds),e.forEach(function(e){var n=ka.bind(null,t,e);r.has(e)||(r.add(e),e.then(n,n))}))}function Ul(e,n,t){if(null!==(t=n.deletions))for(var r=0;r<t.length;r++){var l=t[r];try{var a=e,o=n,u=o;e:for(;null!==u;){switch(u.tag){case 5:M=u.stateNode,Is=!1;break e;case 3:case 4:M=u.stateNode.containerInfo,Is=!0;break e}u=u.return}if(null===M)throw Error(S(160));Ol(a,o,l),M=null,Is=!1;var i=l.alternate;null!==i&&(i.return=null),l.return=null}catch(e){w(l,n,e)}}if(12854&n.subtreeFlags)for(n=n.child;null!==n;)Vl(n,e),n=n.sibling}function Vl(n,t,r){var e=n.alternate;switch(r=n.flags,n.tag){case 0:case 11:case 14:case 15:if(Ul(t,n),Al(n),4&r){try{zl(3,n,n.return),Pl(3,n)}catch(e){w(n,n.return,e)}try{zl(5,n,n.return)}catch(e){w(n,n.return,e)}}break;case 1:Ul(t,n),Al(n),512&r&&null!==e&&El(e,e.return);break;case 5:if(Ul(t,n),Al(n),512&r&&null!==e&&El(e,e.return),32&n.flags){var l=n.stateNode;try{No(l,\"\")}catch(e){w(n,n.return,e)}}if(4&r&&null!=(l=n.stateNode)){var a=n.memoizedProps,o=null!==e?e.memoizedProps:a,u=n.type,i=n.updateQueue;if((n.updateQueue=null)!==i)try{\"input\"===u&&\"radio\"===a.type&&null!=a.name&&re(l,a),ye(u,o);for(var s=ye(u,a),o=0;o<i.length;o+=2){var c=i[o],f=i[o+1];\"style\"===c?he(l,f):\"dangerouslySetInnerHTML\"===c?Co(l,f):\"children\"===c?No(l,f):B(l,c,f,s)}switch(u){case\"input\":le(l,a);break;case\"textarea\":ce(l,a);break;case\"select\":var d=l._wrapperState.wasMultiple,p=(l._wrapperState.wasMultiple=!!a.multiple,a.value);null!=p?ue(l,!!a.multiple,p,!1):d!==!!a.multiple&&(null!=a.defaultValue?ue(l,!!a.multiple,a.defaultValue,!0):ue(l,!!a.multiple,a.multiple?[]:\"\",!1))}l[Ti]=a}catch(e){w(n,n.return,e)}}break;case 6:if(Ul(t,n),Al(n),4&r){if(null===n.stateNode)throw Error(S(162));l=n.stateNode,a=n.memoizedProps;try{l.nodeValue=a}catch(e){w(n,n.return,e)}}break;case 3:if(Ul(t,n),Al(n),4&r&&null!==e&&e.memoizedState.isDehydrated)try{Je(t.containerInfo)}catch(e){w(n,n.return,e)}break;case 4:Ul(t,n),Al(n);break;case 13:Ul(t,n),Al(n),8192&(l=n.child).flags&&(a=null!==l.memoizedState,!(l.stateNode.isHidden=a)||null!==l.alternate&&null!==l.alternate.memoizedState||(Ks=y())),4&r&&Il(n);break;case 22:if(c=null!==e&&null!==e.memoizedState,1&n.mode?(L=(s=L)||c,Ul(t,n),L=s):Ul(t,n),Al(n),8192&r){if(s=null!==n.memoizedState,(n.stateNode.isHidden=s)&&!c&&0!=(1&n.mode))for(c=(T=n).child;null!==c;){for(f=T=c;null!==T;){switch(p=(d=T).child,d.tag){case 0:case 11:case 14:case 15:zl(4,d,d.return);break;case 1:El(d,d.return);var m=d.stateNode;if(\"function\"==typeof m.componentWillUnmount){t=(r=d).return;try{e=r,m.props=e.memoizedProps,m.state=e.memoizedState,m.componentWillUnmount()}catch(e){w(r,t,e)}}break;case 5:El(d,d.return);break;case 22:if(null!==d.memoizedState){Ql(f);continue}}null!==p?(p.return=d,T=p):Ql(f)}c=c.sibling}e:for(c=null,f=n;;){if(5===f.tag){if(null===c){c=f;try{l=f.stateNode,s?\"function\"==typeof(a=l.style).setProperty?a.setProperty(\"display\",\"none\",\"important\"):a.display=\"none\":(u=f.stateNode,o=null!=(i=f.memoizedProps.style)&&i.hasOwnProperty(\"display\")?i.display:null,u.style.display=me(\"display\",o))}catch(e){w(n,n.return,e)}}}else if(6===f.tag){if(null===c)try{f.stateNode.nodeValue=s?\"\":f.memoizedProps}catch(e){w(n,n.return,e)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===n)&&null!==f.child){f=(f.child.return=f).child;continue}if(f===n)break;for(;null===f.sibling;){if(null===f.return||f.return===n)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ul(t,n),Al(n),4&r&&Il(n);break;case 21:break;default:Ul(t,n),Al(n)}}function Al(n){var e=n.flags;if(2&e){try{e:{for(var t=n.return;null!==t;){if(Tl(t)){var r=t;break e}t=t.return}throw Error(S(160))}switch(r.tag){case 5:var l=r.stateNode;32&r.flags&&(No(l,\"\"),r.flags&=-33),Rl(n,Ml(n),l);break;case 3:case 4:var a=r.stateNode.containerInfo;Fl(n,Ml(n),a);break;default:throw Error(S(161))}}catch(e){w(n,n.return,e)}n.flags&=-3}4096&e&&(n.flags&=-4097)}function Wl(e,n,t){Bl(T=e,n,t)}function Bl(e,n,t){for(var r=0!=(1&e.mode);null!==T;){var l=T,a=l.child;if(22===l.tag&&r){var o=null!==l.memoizedState||Rs;if(!o){var u=null!==(i=l.alternate)&&null!==i.memoizedState||L,i=Rs,s=L;if(Rs=o,(L=u)&&!s)for(T=l;null!==T;)u=(o=T).child,(22!==o.tag||null===o.memoizedState)&&null!==u?(u.return=o,T=u):jl(l);for(;null!==a;)Bl(T=a,n,t),a=a.sibling;T=l,Rs=i,L=s}Hl(e,n,t)}else 0!=(8772&l.subtreeFlags)&&null!==a?(a.return=l,T=a):Hl(e,n,t)}}function Hl(e,n,t){for(;null!==T;){if(0!=(8772&(n=T).flags)){t=n.alternate;try{if(0!=(8772&n.flags))switch(n.tag){case 0:case 11:case 15:L||Pl(5,n);break;case 1:var r,l=n.stateNode,a=(4&n.flags&&!L&&(null===t?l.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Ar(n.type,t.memoizedProps),l.componentDidUpdate(r,t.memoizedState,l.__reactInternalSnapshotBeforeUpdate))),n.updateQueue);null!==a&&Yt(n,a,l);break;case 3:var o=n.updateQueue;if(null!==o){if((t=null)!==n.child)switch(n.child.tag){case 5:case 1:t=n.child.stateNode}Yt(n,o,t)}break;case 5:var u=n.stateNode;if(null===t&&4&n.flags){t=u;var i=n.memoizedProps;switch(n.type){case\"button\":case\"input\":case\"select\":case\"textarea\":i.autoFocus&&t.focus();break;case\"img\":i.src&&(t.src=i.src)}}break;case 6:case 4:case 12:break;case 13:var s,c,f;null===n.memoizedState&&null!==(s=n.alternate)&&null!==(c=s.memoizedState)&&null!==(f=c.dehydrated)&&Je(f);break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(S(163))}L||512&n.flags&&_l(n)}catch(e){w(n,n.return,e)}}if(n===e){T=null;break}if(null!==(t=n.sibling)){t.return=n.return,T=t;break}T=n.return}}function Ql(e){for(;null!==T;){var n=T;if(n===e){T=null;break}var t=n.sibling;if(null!==t){t.return=n.return,T=t;break}T=n.return}}function jl(e){for(;null!==T;){var n=T;try{switch(n.tag){case 0:case 11:case 15:var t=n.return;try{Pl(4,n)}catch(e){w(n,t,e)}break;case 1:var r=n.stateNode;if(\"function\"==typeof r.componentDidMount){var l=n.return;try{r.componentDidMount()}catch(e){w(n,l,e)}}var a=n.return;try{_l(n)}catch(e){w(n,a,e)}break;case 5:var o=n.return;try{_l(n)}catch(e){w(n,o,e)}}}catch(e){w(n,n.return,e)}if(n===e){T=null;break}var u=n.sibling;if(null!==u){u.return=n.return,T=u;break}T=n.return}}function $l(){Ys=y()+500}function m(){return 0!=(6&F)?y():-1!==ac?ac:ac=y()}function ql(e){return 0==(1&e.mode)?1:0!=(2&F)&&0!==D?D&-D:null!==es.transition?oc=0===oc?Ve():oc:0===(e=x)?void 0===(e=window.event)?16:ln(e.type):e}function Kl(e,n,t,r){if(50<rc)throw rc=0,lc=null,Error(S(185));We(e,t,r),0!=(2&F)&&e===i||(e===i&&(0==(2&F)&&(js|=t),4===I)&&ea(e,D),Yl(e,r),1===t&&0===F&&0==(1&n.mode)&&($l(),Wi)&&yt())}function Yl(e,n){var t=e.callbackNode,r=(Ie(e,n),De(e,e===i?D:0));if(0===r)null!==t&&Xo(t),e.callbackNode=null,e.callbackPriority=0;else if(e.callbackPriority!==(n=r&-r)){if(null!=t&&Xo(t),1===n)(0===e.tag?gt:ht)(na.bind(null,e)),_i(function(){0==(6&F)&&yt()}),t=null;else{switch(Qe(r)){case 1:t=eu;break;case 4:t=nu;break;case 16:t=tu;break;case 536870912:t=lu;break;default:t=tu}t=wa(t,Xl.bind(null,e))}e.callbackPriority=n,e.callbackNode=t}}function Xl(n,e){if(ac=-1,(oc=0)!=(6&F))throw Error(S(327));var t=n.callbackNode;if(ha()&&n.callbackNode!==t)return null;var r=De(n,n===i?D:0);if(0===r)return null;if(0!=(30&r)||0!=(r&n.expiredLanes)||e)e=ia(n,r);else{e=r;var l=F,a=(F|=2,oa());for(i===n&&D===e||(Xs=null,$l(),la(n,e));;)try{ca();break}catch(e){aa(n,e)}Rt(),Vs.current=a,F=l,e=null!==R?0:(i=null,D=0,I)}if(0!==e){if(1===(e=2===e&&0!==(l=Ue(n))?Gl(n,r=l):e))throw t=Hs,la(n,0),ea(n,r),Yl(n,y()),t;if(6===e)ea(n,r);else{if(l=n.current.alternate,0==(30&r)&&!Jl(l)&&1===(e=2===(e=ia(n,r))&&0!==(a=Ue(n))?Gl(n,r=a):e))throw t=Hs,la(n,0),ea(n,r),Yl(n,y()),t;switch(n.finishedWork=l,n.finishedLanes=r,e){case 0:case 1:throw Error(S(345));case 2:pa(n,u,Xs);break;case 3:if(ea(n,r),(130023424&r)===r&&10<(e=Ks+500-y())){if(0!==De(n,0))break;if(((l=n.suspendedLanes)&r)!==r){m(),n.pingedLanes|=n.suspendedLanes&l;break}n.timeoutHandle=Ni(pa.bind(null,n,u,Xs),e)}else pa(n,u,Xs);break;case 4:if(ea(n,r),(4194240&r)!==r){for(e=n.eventTimes,l=-1;0<r;){var o=31-uu(r),a=1<<o;l<(o=e[o])&&(l=o),r&=~a}r=l,10<(r=((r=y()-r)<120?120:r<480?480:r<1080?1080:r<1920?1920:r<3e3?3e3:r<4320?4320:1960*Us(r/1960))-r)?n.timeoutHandle=Ni(pa.bind(null,n,u,Xs),r):pa(n,u,Xs)}break;case 5:pa(n,u,Xs);break;default:throw Error(S(329))}}}return Yl(n,y()),n.callbackNode===t?Xl.bind(null,n):null}function Gl(e,n){var t=qs;return e.current.memoizedState.isDehydrated&&(la(e,n).flags|=256),2!==(e=ia(e,n))&&(n=u,u=t,null!==n)&&Zl(n),e}function Zl(e){null===u?u=e:u.push.apply(u,e)}function Jl(e){for(var n=e;;){if(16384&n.flags){var t=n.updateQueue;if(null!==t&&null!==(t=t.stores))for(var r=0;r<t.length;r++){var l=(a=t[r]).getSnapshot,a=a.value;try{if(!ti(l(),a))return!1}catch(e){return!1}}}if(t=n.child,16384&n.subtreeFlags&&null!==t)t.return=n,n=t;else{if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function ea(e,n){for(n=n&~$s&~js,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var t=31-uu(n),r=1<<t;e[t]=-1,n&=~r}}function na(e){if(0!=(6&F))throw Error(S(327));ha();var n=De(e,0);if(0!=(1&n)){var t,r=ia(e,n);if(1===(r=0!==e.tag&&2===r&&0!==(t=Ue(e))?Gl(e,n=t):r))throw r=Hs,la(e,0),ea(e,n),Yl(e,y()),r;if(6===r)throw Error(S(345));e.finishedWork=e.current.alternate,e.finishedLanes=n,pa(e,u,Xs)}return Yl(e,y()),null}function ta(e,n){var t=F;F|=1;try{return e(n)}finally{0===(F=t)&&($l(),Wi)&&yt()}}function ra(e){null!==nc&&0===nc.tag&&0==(6&F)&&ha();var n=F,t=(F|=1,Ws.transition),r=x;try{if(Ws.transition=null,x=1,e)return e()}finally{x=r,Ws.transition=t,0==(6&(F=n))&&yt()}}function la(e,n){e.finishedWork=null,e.finishedLanes=0;var t,r,l,a=e.timeoutHandle;if(-1!==a&&(e.timeoutHandle=-1,zi(a)),null!==R)for(a=R.return;null!==a;){var o=a;switch(wt(o),o.tag){case 1:null!=(o=o.type.childContextTypes)&&(s(b),s(v));break;case 3:Zt(),s(b),s(v),tr();break;case 5:er(o);break;case 4:Zt();break;case 13:case 19:s(C);break;case 10:Dt(o.type._context);break;case 22:case 23:O=Bs.current,s(Bs)}a=a.return}if(R=e=Ca((i=e).current,null),D=O=n,$s=js=Qs=I=0,(u=qs=Hs=null)!==us){for(n=0;n<us.length;n++)null!==(o=(a=us[n]).interleaved)&&(a.interleaved=null,t=o.next,null!==(r=a.pending)&&(l=r.next,r.next=t,o.next=l),a.pending=o);us=null}return e}function aa(e,n){do{var t=R;try{if(Rt(),hs.current=Ss,vs){for(var r=N.memoizedState;null!==r;){var l=r.queue;null!==l&&(l.pending=null),r=r.next}vs=!1}if(P=z=N=null,bs=!1,ks=ys=0,(As.current=null)===t||null===t.return){I=1,Hs=n,R=null;break}e:{var a=e,o=t.return,u=n;if(n=D,(g=t).flags|=32768,null!==u&&\"object\"==typeof u&&\"function\"==typeof u.then){var i,s=u,c=g,f=c.tag,d=(0!=(1&c.mode)||0!==f&&11!==f&&15!==f||((i=c.alternate)?(c.updateQueue=i.updateQueue,c.memoizedState=i.memoizedState,c.lanes=i.lanes):(c.updateQueue=null,c.memoizedState=null)),Zr(o));if(null!==d){d.flags&=-257,Jr(d,o,g,a,n),1&d.mode&&Gr(a,s,n);var p,u=s,m=(n=d).updateQueue;null===m?((p=new Set).add(u),n.updateQueue=p):m.add(u);break e}if(0==(1&n)){Gr(a,s,n),ua();break e}u=Error(S(426))}else if(E&&1&g.mode){var h=Zr(o);if(null!==h){0==(65536&h.flags)&&(h.flags|=256),Jr(h,o,g,a,n),_t($r(u,g));break e}}a=u=$r(u,g),4!==I&&(I=2),null===qs?qs=[a]:qs.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,n&=-n,a.lanes|=n,qt(a,Yr(a,u,n));break e;case 1:var g=u,y=a.type,v=a.stateNode;if(0==(128&a.flags)&&(\"function\"==typeof y.getDerivedStateFromError||null!==v&&\"function\"==typeof v.componentDidCatch&&(null===Js||!Js.has(v)))){a.flags|=65536,n&=-n,a.lanes|=n,qt(a,Xr(a,g,n));break e}}}while(null!==(a=a.return))}da(t)}catch(e){n=e,R===t&&null!==t&&(R=t=t.return);continue}break}while(1)}function oa(){var e=Vs.current;return Vs.current=Ss,null===e?Ss:e}function ua(){0!==I&&3!==I&&2!==I||(I=4),null===i||0==(268435455&Qs)&&0==(268435455&js)||ea(i,D)}function ia(n,e){var t=F,r=(F|=2,oa());for(i===n&&D===e||(Xs=null,la(n,e));;)try{sa();break}catch(e){aa(n,e)}if(Rt(),F=t,Vs.current=r,null!==R)throw Error(S(261));return i=null,D=0,I}function sa(){for(;null!==R;)fa(R)}function ca(){for(;null!==R&&!Go();)fa(R)}function fa(e){var n=uc(e.alternate,e,O);e.memoizedProps=e.pendingProps,null===n?da(e):R=n,As.current=null}function da(e){var n=e;do{var t=n.alternate;if(e=n.return,0==(32768&n.flags)){if(null!==(t=Sl(t,n,O)))return void(R=t)}else{if(null!==(t=xl(t,n)))return t.flags&=32767,void(R=t);if(null===e)return I=6,void(R=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(n=n.sibling))return void(R=n)}while(R=n=e,null!==n);0===I&&(I=5)}function pa(e,n,t){var r=x,l=Ws.transition;try{Ws.transition=null,x=1,ma(e,n,t,r)}finally{Ws.transition=l,x=r}return null}function ma(e,n,t,r){for(;ha(),null!==nc;);if(0!=(6&F))throw Error(S(327));t=e.finishedWork;var l=e.finishedLanes;if(null!==t){if(e.finishedWork=null,e.finishedLanes=0,t===e.current)throw Error(S(177));e.callbackNode=null,e.callbackPriority=0;var a,o,u=t.lanes|t.childLanes;if(Be(e,u),e===i&&(R=i=null,D=0),0==(2064&t.subtreeFlags)&&0==(2064&t.flags)||ec||(ec=!0,wa(tu,function(){return ha(),null})),u=0!=(15990&t.flags),0!=(15990&t.subtreeFlags)||u?(u=Ws.transition,Ws.transition=null,a=x,x=1,o=F,F|=4,As.current=null,Nl(e,t),Vl(t,e),On(Ci),Su=!!Ei,Ci=Ei=null,Wl(e.current=t,e,l),Zo(),F=o,x=a,Ws.transition=u):e.current=t,ec&&(ec=!1,nc=e,tc=l),0===(u=e.pendingLanes)&&(Js=null),Me(t.stateNode,r),Yl(e,y()),null!==n)for(r=e.onRecoverableError,t=0;t<n.length;t++)r((l=n[t]).value,{componentStack:l.stack,digest:l.digest});if(Gs)throw Gs=!1,e=Zs,Zs=null,e;0!=(1&tc)&&0!==e.tag&&ha(),0!=(1&(u=e.pendingLanes))?e===lc?rc++:(rc=0,lc=e):rc=0,yt()}return null}function ha(){if(null!==nc){var e=Qe(tc),n=Ws.transition,t=x;try{if(Ws.transition=null,x=e<16?16:e,null===nc)var r=!1;else{if(e=nc,nc=null,(tc=0)!=(6&F))throw Error(S(331));var l=F;for(F|=4,T=e.current;null!==T;){var a=T,o=a.child;if(0!=(16&T.flags)){var u=a.deletions;if(null!==u){for(var i=0;i<u.length;i++){var s=u[i];for(T=s;null!==T;){switch((f=T).tag){case 0:case 11:case 15:zl(8,f,a)}var c=f.child;if(null!==c)c.return=f,T=c;else for(;null!==T;){var f,d=(f=T).sibling,p=f.return;if(Ll(f),f===s){T=null;break}if(null!==d){d.return=p,T=d;break}T=p}}}var m=a.alternate;if(null!==m){var h=m.child;if(null!==h){m.child=null;do{var g=h.sibling}while((h.sibling=null)!==(h=g))}}T=a}}if(0!=(2064&a.subtreeFlags)&&null!==o)o.return=a,T=o;else for(;null!==T;){if(0!=(2048&(a=T).flags))switch(a.tag){case 0:case 11:case 15:zl(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,T=y;break}T=a.return}}var v=e.current;for(T=v;null!==T;){var b=(o=T).child;if(0!=(2064&o.subtreeFlags)&&null!==b)b.return=o,T=b;else for(o=v;null!==T;){if(0!=(2048&(u=T).flags))try{switch(u.tag){case 0:case 11:case 15:Pl(9,u)}}catch(e){w(u,u.return,e)}if(u===o){T=null;break}var k=u.sibling;if(null!==k){k.return=u.return,T=k;break}T=u.return}}if(F=l,yt(),ou&&\"function\"==typeof ou.onPostCommitFiberRoot)try{ou.onPostCommitFiberRoot(au,e)}catch(e){}r=!0}return r}finally{x=t,Ws.transition=n}}return!1}function ga(e,n,t){e=jt(e,n=Yr(e,n=$r(t,n),1),1),n=m(),null!==e&&(We(e,1,n),Yl(e,n))}function w(e,n,t){if(3===e.tag)ga(e,e,t);else for(;null!==n;){if(3===n.tag){ga(n,e,t);break}if(1===n.tag){var r=n.stateNode;if(\"function\"==typeof n.type.getDerivedStateFromError||\"function\"==typeof r.componentDidCatch&&(null===Js||!Js.has(r))){n=jt(n,e=Xr(n,e=$r(t,e),1),1),e=m(),null!==n&&(We(n,1,e),Yl(n,e));break}}n=n.return}}function ya(e,n,t){var r=e.pingCache;null!==r&&r.delete(n),n=m(),e.pingedLanes|=e.suspendedLanes&t,i===e&&(D&t)===t&&(4===I||3===I&&(130023424&D)===D&&y()-Ks<500?la(e,0):$s|=t),Yl(e,n)}function va(e,n){0===n&&(0==(1&e.mode)?n=1:(n=fu,0==(130023424&(fu<<=1))&&(fu=4194304)));var t=m();null!==(e=Wt(e,n))&&(We(e,n,t),Yl(e,t))}function ba(e){var n=e.memoizedState,t=0;va(e,t=null!==n?n.retryLane:t)}function ka(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;null!==l&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(S(314))}null!==r&&r.delete(n),va(e,t)}function wa(e,n){return Yo(e,n)}function Sa(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xa(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ea(e){if(\"function\"==typeof e)return xa(e)?1:0;if(null!=e){if((e=e.$$typeof)===go)return 11;if(e===bo)return 14}return 2}function Ca(e,n){var t=e.alternate;return null===t?((t=ic(e.tag,n,e.key,e.mode)).elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,(t.alternate=e).alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=14680064&e.flags,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=null===n?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Na(e,n,t,r,l,a){var o=2;if(\"function\"==typeof(r=e))xa(e)&&(o=1);else if(\"string\"==typeof e)o=5;else e:switch(e){case co:return za(t.children,l,a,n);case fo:l|=o=8;break;case po:return(e=ic(12,t,n,2|l)).elementType=po,e.lanes=a,e;case yo:return(e=ic(13,t,n,l)).elementType=yo,e.lanes=a,e;case vo:return(e=ic(19,t,n,l)).elementType=vo,e.lanes=a,e;case wo:return Pa(t,l,a,n);default:if(\"object\"==typeof e&&null!==e)switch(e.$$typeof){case mo:o=10;break e;case ho:o=9;break e;case go:o=11;break e;case bo:o=14;break e;case ko:o=16,r=null;break e}throw Error(S(130,null==e?e:typeof e,\"\"))}return(n=ic(o,t,n,l)).elementType=e,n.type=r,n.lanes=a,n}function za(e,n,t,r){return(e=ic(7,e,r,n)).lanes=t,e}function Pa(e,n,t,r){return(e=ic(22,e,r,n)).elementType=wo,e.lanes=t,e.stateNode={isHidden:!1},e}function _a(e,n,t){return(e=ic(6,e,null,n)).lanes=t,e}function La(e,n,t){return(n=ic(4,null!==e.children?e.children:[],e.key,n)).lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Ta(e,n,t,r,l){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ae(0),this.expirationTimes=Ae(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ae(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ma(e,n,t,r,l,a,o,u,i,s){return e=new Ta(e,n,t,u,i),1===n?(n=1,!0===a&&(n|=8)):n=0,a=ic(3,null,null,n),(e.current=a).stateNode=e,a.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},Bt(a),e}function Fa(e,n,t){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:so,key:null==r?null:\"\"+r,children:e,containerInfo:n,implementation:t}}function Ra(e){if(!e)return Ui;e:{if(Ne(e=e._reactInternals)!==e||1!==e.tag)throw Error(S(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(h(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}}while(null!==(n=n.return));throw Error(S(171))}if(1===e.tag){var t=e.type;if(h(t))return dt(e,t,n)}return n}function Da(e,n,t,r,l,a,o,u,i,s){return(e=Ma(t,r,!0,e,l,a,o,u,i)).context=Ra(null),t=e.current,(a=Qt(r=m(),l=ql(t))).callback=null!=n?n:null,jt(t,a,l),e.current.lanes=l,We(e,l,r),Yl(e,r),e}function Oa(e,n,t,r){var l=n.current,a=m(),o=ql(l);return t=Ra(t),null===n.context?n.context=t:n.pendingContext=t,(n=Qt(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(n.callback=r),null!==(e=jt(l,n,o))&&(Kl(e,l,o,a),$t(e,l,o)),o}function Ia(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Ua(e,n){var t;null!==(e=e.memoizedState)&&null!==e.dehydrated&&(t=e.retryLane,e.retryLane=0!==t&&t<n?t:n)}function Va(e,n){Ua(e,n),(e=e.alternate)&&Ua(e,n)}function Aa(e){return null===(e=Le(e))?null:e.stateNode}function Wa(e){return null}function Ba(e){this._internalRoot=e}function Ha(e){this._internalRoot=e}function Qa(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function ja(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||\" react-mount-point-unstable \"!==e.nodeValue))}function $a(){}function qa(e,n,t,r,l){var a,o,u;if(l)return\"function\"==typeof r&&(a=r,r=function(){var e=Ia(o);a.call(e)}),o=Da(n,r,e,0,null,!1,!1,\"\",$a),e._reactRootContainer=o,e[Mi]=o.current,Qn(8===e.nodeType?e.parentNode:e),ra(),o;for(;l=e.lastChild;)e.removeChild(l);\"function\"==typeof r&&(u=r,r=function(){var e=Ia(i);u.call(e)});var i=Ma(e,0,!1,null,null,!1,!1,\"\",$a);return e._reactRootContainer=i,e[Mi]=i.current,Qn(8===e.nodeType?e.parentNode:e),ra(function(){Oa(n,i,t,r)}),i}function Ka(e,n,t,r,l){var a,o,u=t._reactRootContainer;return u?(\"function\"==typeof l&&(o=l,l=function(){var e=Ia(a);o.call(e)}),Oa(n,a=u,e,l)):a=qa(t,n,e,l,r),Ia(a)}var Ya,Xa,Ga,Za=new Set,Ja={},eo=!(\"undefined\"==typeof window||void 0===window.document||void 0===window.document.createElement),no=Object.prototype.hasOwnProperty,to=/^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$/,ro={},lo={},a={},ao=(\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(e){a[e]=new t(e,0,!1,e,null,!1,!1)}),[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(e){var n=e[0];a[n]=new t(n,1,!1,e[1],null,!1,!1)}),[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(e){a[e]=new t(e,2,!1,e.toLowerCase(),null,!1,!1)}),[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(e){a[e]=new t(e,2,!1,e,null,!1,!1)}),\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(e){a[e]=new t(e,3,!1,e.toLowerCase(),null,!1,!1)}),[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(e){a[e]=new t(e,3,!0,e,null,!1,!1)}),[\"capture\",\"download\"].forEach(function(e){a[e]=new t(e,4,!1,e,null,!1,!1)}),[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(e){a[e]=new t(e,6,!1,e,null,!1,!1)}),[\"rowSpan\",\"start\"].forEach(function(e){a[e]=new t(e,5,!1,e.toLowerCase(),null,!1,!1)}),/[\\\\-:]([a-z])/g),oo=function(e){return e[1].toUpperCase()},uo=(\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(e){var n=e.replace(ao,oo);a[n]=new t(n,1,!1,e,null,!1,!1)}),\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(e){var n=e.replace(ao,oo);a[n]=new t(n,1,!1,e,\"http://www.w3.org/1999/xlink\",!1,!1)}),[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(e){var n=e.replace(ao,oo);a[n]=new t(n,1,!1,e,\"http://www.w3.org/XML/1998/namespace\",!1,!1)}),[\"tabIndex\",\"crossOrigin\"].forEach(function(e){a[e]=new t(e,1,!1,e.toLowerCase(),null,!1,!1)}),a.xlinkHref=new t(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1),[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(e){a[e]=new t(e,1,!1,e.toLowerCase(),null,!0,!0)}),e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED),io=Symbol.for(\"react.element\"),so=Symbol.for(\"react.portal\"),co=Symbol.for(\"react.fragment\"),fo=Symbol.for(\"react.strict_mode\"),po=Symbol.for(\"react.profiler\"),mo=Symbol.for(\"react.provider\"),ho=Symbol.for(\"react.context\"),go=Symbol.for(\"react.forward_ref\"),yo=Symbol.for(\"react.suspense\"),vo=Symbol.for(\"react.suspense_list\"),bo=Symbol.for(\"react.memo\"),ko=Symbol.for(\"react.lazy\"),wo=(Symbol.for(\"react.scope\"),Symbol.for(\"react.debug_trace_mode\"),Symbol.for(\"react.offscreen\")),So=(Symbol.for(\"react.legacy_hidden\"),Symbol.for(\"react.cache\"),Symbol.for(\"react.tracing_marker\"),Symbol.iterator),g=Object.assign,xo=!1,Eo=Array.isArray,Co=(Ga=function(e,n){if(\"http://www.w3.org/2000/svg\"!==e.namespaceURI||\"innerHTML\"in e)e.innerHTML=n;else{for((Xa=Xa||document.createElement(\"div\")).innerHTML=\"<svg>\"+n.valueOf().toString()+\"</svg>\",n=Xa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}},\"undefined\"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,t,r){MSApp.execUnsafeLocalFunction(function(){return Ga(e,n,t,r)})}:Ga),No=function(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&3===t.nodeType)return void(t.nodeValue=n)}e.textContent=n},zo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Po=[\"Webkit\",\"ms\",\"Moz\",\"O\"],_o=(Object.keys(zo).forEach(function(n){Po.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),zo[e]=zo[n]})}),g({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0})),Lo=null,To=null,Mo=null,Fo=null,Ro=function(e,n){return e(n)},Do=function(){},Oo=!1,Io=!1;if(eo)try{var r={};Object.defineProperty(r,\"passive\",{get:function(){Io=!0}}),window.addEventListener(\"test\",r,r),window.removeEventListener(\"test\",r,r)}catch(e){Io=!1}for(var Uo,Vo,Ao,Wo=function(e,n,t,r,l,a,o,u,i){var s=Array.prototype.slice.call(arguments,3);try{n.apply(t,s)}catch(e){this.onError(e)}},Bo=!1,Ho=null,Qo=!1,jo=null,$o={onError:function(e){Bo=!0,Ho=e}},r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler,qo=r.unstable_scheduleCallback,Ko=r.unstable_NormalPriority,Yo=qo,Xo=r.unstable_cancelCallback,Go=r.unstable_shouldYield,Zo=r.unstable_requestPaint,y=r.unstable_now,Jo=r.unstable_getCurrentPriorityLevel,eu=r.unstable_ImmediatePriority,nu=r.unstable_UserBlockingPriority,tu=Ko,ru=r.unstable_LowPriority,lu=r.unstable_IdlePriority,au=null,ou=null,uu=Math.clz32||Fe,iu=Math.log,su=Math.LN2,cu=64,fu=4194304,x=0,du=!1,pu=[],mu=null,hu=null,gu=null,yu=new Map,vu=new Map,bu=[],ku=\"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit\".split(\" \"),wu=uo.ReactCurrentBatchConfig,Su=!0,xu=null,Eu=null,Cu=null,Nu=null,e={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zu=cn(e),r=g({},e,{view:0,detail:0}),Pu=cn(r),_u=g({},r,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return\"movementX\"in e?e.movementX:(e!==Ao&&(Vo=Ao&&\"mousemove\"===e.type?(Uo=e.screenX-Ao.screenX,e.screenY-Ao.screenY):Uo=0,Ao=e),Uo)},movementY:function(e){return\"movementY\"in e?e.movementY:Vo}}),Lu=cn(_u),Tu=cn(g({},_u,{dataTransfer:0})),Mu=cn(g({},r,{relatedTarget:0})),Fu=cn(g({},e,{animationName:0,elapsedTime:0,pseudoElement:0})),Ru=cn(g({},e,{clipboardData:function(e){return(\"clipboardData\"in e?e:window).clipboardData}})),Du=cn(g({},e,{data:0})),Ou=Du,Iu={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},Uu={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"},Vu={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"},Au=cn(g({},r,{key:function(e){if(e.key){var n=Iu[e.key]||e.key;if(\"Unidentified\"!==n)return n}return\"keypress\"===e.type?13===(e=on(e))?\"Enter\":String.fromCharCode(e):\"keydown\"===e.type||\"keyup\"===e.type?Uu[e.keyCode]||\"Unidentified\":\"\"},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dn,charCode:function(e){return\"keypress\"===e.type?on(e):0},keyCode:function(e){return\"keydown\"===e.type||\"keyup\"===e.type?e.keyCode:0},which:function(e){return\"keypress\"===e.type?on(e):\"keydown\"===e.type||\"keyup\"===e.type?e.keyCode:0}})),Wu=cn(g({},_u,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Bu=cn(g({},r,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dn})),Hu=cn(g({},e,{propertyName:0,elapsedTime:0,pseudoElement:0})),Qu=cn(g({},_u,{deltaX:function(e){return\"deltaX\"in e?e.deltaX:\"wheelDeltaX\"in e?-e.wheelDeltaX:0},deltaY:function(e){return\"deltaY\"in e?e.deltaY:\"wheelDeltaY\"in e?-e.wheelDeltaY:\"wheelDelta\"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),ju=[9,13,27,32],$u=(eo&&\"CompositionEvent\"in window),r=null,qu=(eo&&\"documentMode\"in document&&(r=document.documentMode),eo&&\"TextEvent\"in window&&!r),Ku=eo&&(!$u||r&&8<r&&r<=11),Yu=String.fromCharCode(32),Xu=!1,Gu=!1,Zu={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Ju=null,ei=null,ni=!1,ti=(eo&&(ni=vn(\"input\")&&(!document.documentMode||9<document.documentMode)),\"function\"==typeof Object.is?Object.is:_n),ri=(eo&&\"documentMode\"in document&&document.documentMode<=11),li=null,ai=null,oi=null,ui=!1,ii={animationend:Un(\"Animation\",\"AnimationEnd\"),animationiteration:Un(\"Animation\",\"AnimationIteration\"),animationstart:Un(\"Animation\",\"AnimationStart\"),transitionend:Un(\"Transition\",\"TransitionEnd\")},si={},ci={},fi=(eo&&(ci=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete ii.animationend.animation,delete ii.animationiteration.animation,delete ii.animationstart.animation),\"TransitionEvent\"in window||delete ii.transitionend.transition),Vn(\"animationend\")),di=Vn(\"animationiteration\"),pi=Vn(\"animationstart\"),mi=Vn(\"transitionend\"),hi=new Map,gi=\"abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel\".split(\" \"),yi=0;yi<gi.length;yi++){var vi=gi[yi];An(vi.toLowerCase(),\"on\"+(vi=vi[0].toUpperCase()+vi.slice(1)))}An(fi,\"onAnimationEnd\"),An(di,\"onAnimationIteration\"),An(pi,\"onAnimationStart\"),An(\"dblclick\",\"onDoubleClick\"),An(\"focusin\",\"onFocus\"),An(\"focusout\",\"onBlur\"),An(mi,\"onTransitionEnd\"),U(\"onMouseEnter\",[\"mouseout\",\"mouseover\"]),U(\"onMouseLeave\",[\"mouseout\",\"mouseover\"]),U(\"onPointerEnter\",[\"pointerout\",\"pointerover\"]),U(\"onPointerLeave\",[\"pointerout\",\"pointerover\"]),o(\"onChange\",\"change click focusin focusout input keydown keyup selectionchange\".split(\" \")),o(\"onSelect\",\"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\" \")),o(\"onBeforeInput\",[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]),o(\"onCompositionEnd\",\"compositionend focusout keydown keypress keyup mousedown\".split(\" \")),o(\"onCompositionStart\",\"compositionstart focusout keydown keypress keyup mousedown\".split(\" \")),o(\"onCompositionUpdate\",\"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \"));var bi=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),ki=new Set(\"cancel close invalid load scroll toggle\".split(\" \").concat(bi)),wi=\"_reactListening\"+Math.random().toString(36).slice(2),Si=/\\\\r\\\\n?/g,xi=/\\\\u0000|\\\\uFFFD/g,Ei=null,Ci=null,Ni=\"function\"==typeof setTimeout?setTimeout:void 0,zi=\"function\"==typeof clearTimeout?clearTimeout:void 0,Pi=\"function\"==typeof Promise?Promise:void 0,_i=\"function\"==typeof queueMicrotask?queueMicrotask:void 0!==Pi?function(e){return Pi.resolve(null).then(e).catch(nt)}:Ni,e=Math.random().toString(36).slice(2),Li=\"__reactFiber$\"+e,Ti=\"__reactProps$\"+e,Mi=\"__reactContainer$\"+e,Fi=\"__reactEvents$\"+e,Ri=\"__reactListeners$\"+e,Di=\"__reactHandles$\"+e,Oi=[],Ii=-1,Ui={},v=st(Ui),b=st(!1),Vi=Ui,Ai=null,Wi=!1,Bi=!1,Hi=[],Qi=0,ji=null,$i=0,qi=[],Ki=0,Yi=null,Xi=1,Gi=\"\",Zi=null,k=null,E=!1,Ji=null,es=uo.ReactCurrentBatchConfig,ns=Ft(!0),ts=Ft(!1),rs=st(null),ls=null,as=null,os=null,us=null,is=Wt,ss=!1,cs={},fs=st(cs),ds=st(cs),ps=st(cs),C=st(0),ms=[],hs=uo.ReactCurrentDispatcher,gs=uo.ReactCurrentBatchConfig,ys=0,N=null,z=null,P=null,vs=!1,bs=!1,ks=0,ws=0,Ss={readContext:Ut,useCallback:n,useContext:n,useEffect:n,useImperativeHandle:n,useInsertionEffect:n,useLayoutEffect:n,useMemo:n,useReducer:n,useRef:n,useState:n,useDebugValue:n,useDeferredValue:n,useTransition:n,useMutableSource:n,useSyncExternalStore:n,useId:n,unstable_isNewReconciler:!1},xs={readContext:Ut,useCallback:function(e,n){return or().memoizedState=[e,void 0===n?null:n],e},useContext:Ut,useEffect:xr,useImperativeHandle:function(e,n,t){return t=null!=t?t.concat([e]):null,wr(4194308,4,zr.bind(null,n,e),t)},useLayoutEffect:function(e,n){return wr(4194308,4,e,n)},useInsertionEffect:function(e,n){return wr(4,2,e,n)},useMemo:function(e,n){var t=or();return n=void 0===n?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=or();return n=void 0!==t?t(n):n,r.memoizedState=r.baseState=n,e=(r.queue=e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n}).dispatch=Dr.bind(null,N,e),[r.memoizedState,e]},useRef:function(e){return or().memoizedState=e={current:e}},useState:vr,useDebugValue:_r,useDeferredValue:function(e){return or().memoizedState=e},useTransition:function(){var e=(n=vr(!1))[0],n=Fr.bind(null,n[1]);return[e,or().memoizedState=n]},useMutableSource:function(e,n,t){},useSyncExternalStore:function(e,n,t){var r=N,l=or();if(E){if(void 0===t)throw Error(S(407));t=t()}else{if(t=n(),null===i)throw Error(S(349));0==(30&ys)&&pr(r,n,t)}var a={value:l.memoizedState=t,getSnapshot:n};return l.queue=a,xr(hr.bind(null,r,a,e),[e]),r.flags|=2048,br(9,mr.bind(null,r,a,t,n),void 0,null),t},useId:function(){var e,n=or(),t=i.identifierPrefix;return E?(e=Gi,t=\":\"+t+\"R\"+(e=(Xi&~(1<<32-uu(Xi)-1)).toString(32)+e),0<(e=ks++)&&(t+=\"H\"+e.toString(32)),t+=\":\"):t=\":\"+t+\"r\"+(e=ws++).toString(32)+\":\",n.memoizedState=t},unstable_isNewReconciler:!1},Es={readContext:Ut,useCallback:Lr,useContext:Ut,useEffect:Er,useImperativeHandle:Pr,useInsertionEffect:Cr,useLayoutEffect:Nr,useMemo:Tr,useReducer:sr,useRef:kr,useState:function(e){return sr(ir)},useDebugValue:_r,useDeferredValue:function(e){return Mr(ur(),z.memoizedState,e)},useTransition:function(){return[sr(ir)[0],ur().memoizedState]},useMutableSource:fr,useSyncExternalStore:dr,useId:Rr,unstable_isNewReconciler:!1},Cs={readContext:Ut,useCallback:Lr,useContext:Ut,useEffect:Er,useImperativeHandle:Pr,useInsertionEffect:Cr,useLayoutEffect:Nr,useMemo:Tr,useReducer:cr,useRef:kr,useState:function(e){return cr(ir)},useDebugValue:_r,useDeferredValue:function(e){var n=ur();return null===z?n.memoizedState=e:Mr(n,z.memoizedState,e)},useTransition:function(){return[cr(ir)[0],ur().memoizedState]},useMutableSource:fr,useSyncExternalStore:dr,useId:Rr,unstable_isNewReconciler:!1},Ns={isMounted:function(e){return!!(e=e._reactInternals)&&Ne(e)===e},enqueueSetState:function(e,n,t){e=e._reactInternals;var r=m(),l=ql(e),a=Qt(r,l);a.payload=n,null!=t&&(a.callback=t),null!==(n=jt(e,a,l))&&(Kl(n,e,l,r),$t(n,e,l))},enqueueReplaceState:function(e,n,t){e=e._reactInternals;var r=m(),l=ql(e),a=Qt(r,l);a.tag=1,a.payload=n,null!=t&&(a.callback=t),null!==(n=jt(e,a,l))&&(Kl(n,e,l,r),$t(n,e,l))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var t=m(),r=ql(e),l=Qt(t,r);l.tag=2,null!=n&&(l.callback=n),null!==(n=jt(e,l,r))&&(Kl(n,e,r,t),$t(n,e,r))}},zs=\"function\"==typeof WeakMap?WeakMap:Map,Ps=uo.ReactCurrentOwner,_=!1,_s={dehydrated:null,treeContext:null,retryLane:0},Ls=function(e,n,t,r){for(t=n.child;null!==t;){if(5===t.tag||6===t.tag)e.appendChild(t.stateNode);else if(4!==t.tag&&null!==t.child){t=(t.child.return=t).child;continue}if(t===n)break;for(;null===t.sibling;){if(null===t.return||t.return===n)return;t=t.return}t.sibling.return=t.return,t=t.sibling}},Ts=function(e,n){},Ms=function(e,n,t,r,l){var a,o=e.memoizedProps;if(o!==r){switch(e=n.stateNode,Xt(fs.current),l=null,t){case\"input\":o=ne(e,o),r=ne(e,r),l=[];break;case\"select\":o=g({},o,{value:void 0}),r=g({},r,{value:void 0}),l=[];break;case\"textarea\":o=ie(e,o),r=ie(e,r),l=[];break;default:\"function\"!=typeof o.onClick&&\"function\"==typeof r.onClick&&(e.onclick=Jn)}for(s in ge(t,r),t=null,o)if(!r.hasOwnProperty(s)&&o.hasOwnProperty(s)&&null!=o[s])if(\"style\"===s){var u=o[s];for(a in u)u.hasOwnProperty(a)&&(t=t||{},t[a]=\"\")}else\"dangerouslySetInnerHTML\"!==s&&\"children\"!==s&&\"suppressContentEditableWarning\"!==s&&\"suppressHydrationWarning\"!==s&&\"autoFocus\"!==s&&(Ja.hasOwnProperty(s)?l=l||[]:(l=l||[]).push(s,null));for(s in r){var i=r[s],u=null!=o?o[s]:void 0;if(r.hasOwnProperty(s)&&i!==u&&(null!=i||null!=u))if(\"style\"===s)if(u){for(a in u)!u.hasOwnProperty(a)||i&&i.hasOwnProperty(a)||(t=t||{},t[a]=\"\");for(a in i)i.hasOwnProperty(a)&&u[a]!==i[a]&&(t=t||{},t[a]=i[a])}else t||(l=l||[]).push(s,t),t=i;else\"dangerouslySetInnerHTML\"===s?(i=i?i.__html:void 0,u=u?u.__html:void 0,null!=i&&u!==i&&(l=l||[]).push(s,i)):\"children\"===s?\"string\"!=typeof i&&\"number\"!=typeof i||(l=l||[]).push(s,\"\"+i):\"suppressContentEditableWarning\"!==s&&\"suppressHydrationWarning\"!==s&&(Ja.hasOwnProperty(s)?(null!=i&&\"onScroll\"===s&&c(\"scroll\",e),l||u===i||(l=[])):(l=l||[]).push(s,i))}t&&(l=l||[]).push(\"style\",t);var s=l;(n.updateQueue=s)&&(n.flags|=4)}},Fs=function(e,n,t,r){t!==r&&(n.flags|=4)},Rs=!1,L=!1,Ds=\"function\"==typeof WeakSet?WeakSet:Set,T=null,Os=!1,M=null,Is=!1,Us=Math.ceil,Vs=uo.ReactCurrentDispatcher,As=uo.ReactCurrentOwner,Ws=uo.ReactCurrentBatchConfig,F=0,i=null,R=null,D=0,O=0,Bs=st(0),I=0,Hs=null,Qs=0,js=0,$s=0,qs=null,u=null,Ks=0,Ys=1/0,Xs=null,Gs=!1,Zs=null,Js=null,ec=!1,nc=null,tc=0,rc=0,lc=null,ac=-1,oc=0,uc=function(e,n,t){if(null!==e)if(e.memoizedProps!==n.pendingProps||b.current)_=!0;else{if(0==(e.lanes&t)&&0==(128&n.flags))return _=!1,kl(e,n,t);_=0!=(131072&e.flags)}else _=!1,E&&0!=(1048576&n.flags)&&bt(n,$i,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type,l=(vl(e,n),e=n.pendingProps,ct(n,v.current)),a=(It(n,t),l=lr(null,n,r,e,l,t),ar());return n.flags|=1,n=\"object\"==typeof l&&null!==l&&\"function\"==typeof l.render&&void 0===l.$$typeof?(n.tag=1,n.memoizedState=null,n.updateQueue=null,h(r)?(a=!0,pt(n)):a=!1,n.memoizedState=null!=l.state?l.state:null,Bt(n),l.updater=Ns,jr((n.stateNode=l)._reactInternals=n,r,e,t),ul(null,n,r,!0,a,t)):(n.tag=0,E&&a&&kt(n),d(null,n,l,t),n.child);case 16:r=n.elementType;e:{switch(vl(e,n),e=n.pendingProps,r=(l=r._init)(r._payload),n.type=r,l=n.tag=Ea(r),e=Ar(r,e),l){case 0:n=al(null,n,r,e,t);break e;case 1:n=ol(null,n,r,e,t);break e;case 11:n=el(null,n,r,e,t);break e;case 14:n=nl(null,n,r,Ar(r.type,e),t);break e}throw Error(S(306,r,\"\"))}return n;case 0:return r=n.type,l=n.pendingProps,al(e,n,r,l=n.elementType===r?l:Ar(r,l),t);case 1:return r=n.type,l=n.pendingProps,ol(e,n,r,l=n.elementType===r?l:Ar(r,l),t);case 3:e:{if(il(n),null===e)throw Error(S(387));r=n.pendingProps,l=(a=n.memoizedState).element,Ht(e,n),Kt(n,r,null,t);var o=n.memoizedState,r=o.element;if(a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},n.updateQueue.baseState=a,n.memoizedState=a,256&n.flags){n=sl(e,n,r,t,l=$r(Error(S(423)),n));break e}if(r!==l){n=sl(e,n,r,t,l=$r(Error(S(424)),n));break e}for(k=rt(n.stateNode.containerInfo.firstChild),E=!0,t=ts(Zi=n,Ji=null,r,t),n.child=t;t;)t.flags=-3&t.flags|4096,t=t.sibling}else{if(Pt(),r===l){n=bl(e,n,t);break e}d(e,n,r,t)}n=n.child}return n;case 5:return Jt(n),null===e&&Ct(n),r=n.type,l=n.pendingProps,a=null!==e?e.memoizedProps:null,o=l.children,et(r,l)?o=null:null!==a&&et(r,a)&&(n.flags|=32),ll(e,n),d(e,n,o,t),n.child;case 6:return null===e&&Ct(n),null;case 13:return fl(e,n,t);case 4:return Gt(n,n.stateNode.containerInfo),r=n.pendingProps,null===e?n.child=ns(n,null,r,t):d(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,el(e,n,r,l=n.elementType===r?l:Ar(r,l),t);case 7:return d(e,n,n.pendingProps,t),n.child;case 8:case 12:return d(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,a=n.memoizedProps,o=l.value,f(rs,r._currentValue),r._currentValue=o,null!==a)if(ti(a.value,o)){if(a.children===l.children&&!b.current){n=bl(e,n,t);break e}}else for(null!==(a=n.child)&&(a.return=n);null!==a;){var u=a.dependencies;if(null!==u)for(var i,s,o=a.child,c=u.firstContext;null!==c;){if(c.context===r){1===a.tag&&((c=Qt(-1,t&-t)).tag=2,null!==(i=a.updateQueue))&&(null===(s=(i=i.shared).pending)?c.next=c:(c.next=s.next,s.next=c),i.pending=c),a.lanes|=t,null!==(c=a.alternate)&&(c.lanes|=t),Ot(a.return,t,n),u.lanes|=t;break}c=c.next}else if(10===a.tag)o=a.type===n.type?null:a.child;else if(18===a.tag){if(null===(o=a.return))throw Error(S(341));o.lanes|=t,null!==(u=o.alternate)&&(u.lanes|=t),Ot(o,t,n),o=a.sibling}else o=a.child;if(null!==o)o.return=a;else for(o=a;null!==o;){if(o===n){o=null;break}if(null!==(a=o.sibling)){a.return=o.return,o=a;break}o=o.return}a=o}d(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,It(n,t),r=r(l=Ut(l)),n.flags|=1,d(e,n,r,t),n.child;case 14:return l=Ar(r=n.type,n.pendingProps),nl(e,n,r,l=Ar(r.type,l),t);case 15:return tl(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ar(r,l),vl(e,n),n.tag=1,h(r)?(e=!0,pt(n)):e=!1,It(n,t),Hr(n,r,l),jr(n,r,l,t),ul(null,n,r,!0,e,t);case 19:return yl(e,n,t);case 22:return rl(e,n,t)}throw Error(S(156,n.tag))},ic=function(e,n,t,r){return new Sa(e,n,t,r)},sc=\"function\"==typeof reportError?reportError:function(e){console.error(e)},cc=(Ha.prototype.render=Ba.prototype.render=function(e){var n=this._internalRoot;if(null===n)throw Error(S(409));Oa(e,n,null,null)},Ha.prototype.unmount=Ba.prototype.unmount=function(){var e,n=this._internalRoot;null!==n&&(this._internalRoot=null,e=n.containerInfo,ra(function(){Oa(null,n,null,null)}),e[Mi]=null)},Ha.prototype.unstable_scheduleHydration=function(e){if(e){var n=pc();e={blockedOn:null,target:e,priority:n};for(var t=0;t<bu.length&&0!==n&&n<bu[t].priority;t++);bu.splice(t,0,e),0===t&&Ke(e)}},function(t){switch(t.tag){case 3:var e,n=t.stateNode;n.current.memoizedState.isDehydrated&&0!==(e=Re(n.pendingLanes))&&(He(n,1|e),Yl(n,y()),0==(6&F))&&($l(),yt());break;case 13:ra(function(){var e,n=Wt(t,1);null!==n&&(e=m(),Kl(n,t,1,e))}),Va(t,1)}}),fc=function(e){var n;13===e.tag&&(null!==(n=Wt(e,134217728))&&Kl(n,e,134217728,m()),Va(e,134217728))},dc=function(e){var n,t;13===e.tag&&(null!==(t=Wt(e,n=ql(e)))&&Kl(t,e,n,m()),Va(e,n))},pc=function(){return x},mc=function(e,n){var t=x;try{return x=e,n()}finally{x=t}},To=function(e,n,t){switch(n){case\"input\":if(le(e,t),n=t.name,\"radio\"===t.type&&null!=n){for(t=e;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+n)+'][type=\"radio\"]'),n=0;n<t.length;n++){var r=t[n];if(r!==e&&r.form===e.form){var l=it(r);if(!l)throw Error(S(90));J(r),le(r,l)}}}break;case\"textarea\":ce(e,t);break;case\"select\":null!=(n=t.value)&&ue(e,!!t.multiple,n,!1)}},Ro=ta,Do=ra,_u={usingClientEntryPoint:!1,Events:[ot,ut,it,ke,we,ta]},r={findFiberByHostInstance:at,bundleType:0,version:\"18.3.1-next-f1338f8080-20240426\",rendererPackageName:\"react-dom\"};if(r={bundleType:r.bundleType,version:r.version,rendererPackageName:r.rendererPackageName,rendererConfig:r.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:uo.ReactCurrentDispatcher,findHostInstanceByFiber:Aa,findFiberByHostInstance:r.findFiberByHostInstance||Wa,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:\"18.3.1\"},\"undefined\"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)r=!1;else{e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(e.isDisabled||!e.supportsFiber)r=!0;else{try{au=e.inject(r),ou=e}catch(e){}r=!!e.checkDCE}}l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_u,l.createPortal=function(e,n){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(Qa(n))return Fa(e,n,null,t);throw Error(S(200))},l.createRoot=function(e,n){var t,r,l;if(Qa(e))return t=!1,r=\"\",l=sc,null!=n&&(!0===n.unstable_strictMode&&(t=!0),void 0!==n.identifierPrefix&&(r=n.identifierPrefix),void 0!==n.onRecoverableError)&&(l=n.onRecoverableError),n=Ma(e,1,!1,null,null,t,!1,r,l),e[Mi]=n.current,Qn(8===e.nodeType?e.parentNode:e),new Ba(n);throw Error(S(299))},l.findDOMNode=function(e){if(null==e)return null;if(1!==e.nodeType){var n=e._reactInternals;if(void 0===n){if(\"function\"==typeof e.render)throw Error(S(188));throw e=Object.keys(e).join(\",\"),Error(S(268,e))}e=null===(e=Le(n))?null:e.stateNode}return e},l.flushSync=function(e){return ra(e)},l.hydrate=function(e,n,t){if(ja(n))return Ka(null,e,n,!0,t);throw Error(S(200))},l.hydrateRoot=function(e,n,t){if(!Qa(e))throw Error(S(405));var r=null!=t&&t.hydratedSources||null,l=!1,a=\"\",o=sc;if(null!=t&&(!0===t.unstable_strictMode&&(l=!0),void 0!==t.identifierPrefix&&(a=t.identifierPrefix),void 0!==t.onRecoverableError)&&(o=t.onRecoverableError),n=Da(n,null,e,1,null!=t?t:null,l,!1,a,o),e[Mi]=n.current,Qn(e),r)for(e=0;e<r.length;e++)l=(l=(t=r[e])._getVersion)(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,l]:n.mutableSourceEagerHydrationData.push(t,l);return new Ha(n)},l.render=function(e,n,t){if(ja(n))return Ka(null,e,n,!1,t);throw Error(S(200))},l.unmountComponentAtNode=function(e){if(ja(e))return!!e._reactRootContainer&&(ra(function(){Ka(null,null,e,!1,function(){e._reactRootContainer=null,e[Mi]=null})}),!0);throw Error(S(40))},l.unstable_batchedUpdates=ta,l.unstable_renderSubtreeIntoContainer=function(e,n,t,r){if(!ja(t))throw Error(S(200));if(null==e||void 0===e._reactInternals)throw Error(S(38));return Ka(e,n,t,!1,r)},l.version=\"18.3.1-next-f1338f8080-20240426\"},\"object\"==typeof exports&&\"undefined\"!=typeof module?n(exports,require(\"react\")):\"function\"==typeof define&&define.amd?define([\"exports\",\"react\"],n):n((e=e||self).ReactDOM={},e.React)}();\\n  const jsx = (type, props, key) => {\\n    return React.createElement(type, props);\\n  };\\n  const jsxs = (type, props, key) => {\\n    return React.createElement(type, props);\\n  };\\n  const Fragment = React.Fragment;\\n  React.jsx = jsx;\\n  React.jsxs = jsxs;\\n  React.Fragment = Fragment;\\n  React.jsxRuntime = { jsx, jsxs, Fragment };\\n  window.__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ = { jsx, jsxs, Fragment };\\n  window.__WEBPACK_EXTERNAL_MODULE_react_jsx_dev_runtime__ = { jsx, jsxs, Fragment, jsxDEV: jsx };\\n  window['react/jsx-runtime'] = { jsx, jsxs, Fragment };\\n  window['react/jsx-dev-runtime'] = { jsx, jsxs, Fragment, jsxDEV: jsx };\\n`;",
    "File: /home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js\nLanguage: javascript\n\nconst unpackExcalidraw = () => LZString.decompressFromBase64(\"[encoded data, 5468916 characters]\");",
    "File: /home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js\nLanguage: javascript\n\nlet {react, reactDOM } = new Function(`${REACT_PACKAGES}; return {react: React, reactDOM: ReactDOM};`)();",
    "File: /home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js\nLanguage: javascript\n\nlet excalidrawLib = {};",
    "File: /home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js\nLanguage: javascript\n\nconst loadMathjaxToSVG = () => new Function(`${LZString.decompressFromBase64(\"[encoded data, 1052196 characters]\")}; return MathjaxToSVG;`)();",
    "File: /home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js\nLanguage: javascript\n\nconst PLUGIN_LANGUAGES = {\"ru\": \"[encoded data, 49500 characters]\",\"zh-cn\": \"[encoded data, 41884 characters]\",\"zh-tw\": \"[encoded data, 41780 characters]\",\"es\": \"[encoded data, 58276 characters]\"};",
    "File: /home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js\nLanguage: javascript\n\nconst PLUGIN_VERSION=\"2.16.1\";;function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if(\"default\"!==a){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var obsidian_module__namespace=_interopNamespace(obsidian_module),React__namespace=_interopNamespace(React);let random$3=e=>crypto.getRandomValues(new Uint8Array(e)),customRandom=(e,t,a)=>{let i=(2<<Math.log(e.length-1)/Math.LN2)-1,n=-~(1.6*i*t/e.length);return(r=t)=>{let s=\"\";for(;;){let t=a(n),o=n;for(;o--;)if(s+=e[t[o]&i]||\"\",s.length===r)return s}}},customAlphabet=(e,t=21)=>customRandom(e,t,random$3),nanoid$1=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?\"-\":\"_\")),\"\");const durationTreshold=0;function setDebugging(e){DEBUGGING=!1}let DEBUGGING=!1;const log$2=console.log.bind(window.console),debug=(e,t,...a)=>{console.log(t,...a)};class CustomMutationObserver{originalCallback;observer;name;constructor(e,t){this.originalCallback=e,this.observer=null,this.name=t}observe(e,t){this.observer=new MutationObserver((async(e,t)=>{const a=performance.now();await this.originalCallback(e,t);const i=performance.now()-a;i>durationTreshold&&console.log(`Excalidraw ${this.name} MutationObserver callback took ${i}ms to execute`,t)})),this.observer.observe(e,t)}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null)}}class ErrorHandler{static instance;errorLog=[];errorNoticeTimeout=1e4;maxLogEntries=100;constructor(){}static getInstance(){return ErrorHandler.instance||(ErrorHandler.instance=new ErrorHandler),ErrorHandler.instance}handleError(e,t,a=!0,i){const n=\"string\"==typeof e?new Error(e):e;if(console.error(`[Excalidraw Error] in ${t}:`,n),this.errorLog.push({error:n,context:t,timestamp:Date.now()}),this.errorLog.length>this.maxLogEntries&&(this.errorLog=this.errorLog.slice(this.errorLog.length-this.maxLogEntries)),a){const e=this.formatErrorForUser(n,t);new obsidian_module.Notice(e,i||this.errorNoticeTimeout)}}safeEval(e,t,a,i){try{return a.eval.call(a,e)}catch(e){if(this.handleError(e,`SafeEval in ${t}`),void 0!==i)return i;throw e}}wrapWithTryCatch(e,t,a){try{return e()}catch(e){if(this.handleError(e,t),void 0!==a)return a;throw e}}formatErrorForUser(e,t){let a=e.message;return a.includes(\"Cannot read properties of undefined\")?a=\"A required object was not available. This might be due to a plugin loading issue.\":a.includes(\"is not a function\")?a=\"A required function was not available. This might be due to a plugin version mismatch.\":a.length>100&&(a=a.substring(0,100)+\"...\"),`Excalidraw Error: ${a} (in ${t})`}getErrorLog(){return[...this.errorLog]}clearErrorLog(){this.errorLog=[]}}const errorHandler=ErrorHandler.getInstance();let EXCALIDRAW_PLUGIN=null;const setExcalidrawPlugin=e=>{EXCALIDRAW_PLUGIN=e},THEME={LIGHT:\"light\",DARK:\"dark\"},MD_EXCALIDRAW=\"# Excalidraw Data\",MD_TEXTELEMENTS=\"## Text Elements\",MD_ELEMENTLINKS=\"## Element Links\",MD_EMBEDFILES=\"## Embedded Files\",MD_DRAWING=\"## Drawing\",MD_EX_SECTIONS=[MD_EXCALIDRAW,MD_TEXTELEMENTS,MD_ELEMENTLINKS,MD_EMBEDFILES,MD_DRAWING],ERROR_IFRAME_CONVERSION_CANCELED=\"iframe conversion canceled\",LOCALE=localStorage.getItem(\"language\")?.toLowerCase()||\"en\",CJK_FONTS=\"CJK Fonts\",obsidianToExcalidrawMap={en:\"en-US\",af:\"af-ZA\",am:\"am-ET\",ar:\"ar-SA\",eu:\"eu-ES\",be:\"be-BY\",bg:\"bg-BG\",bn:\"bn-BD\",ca:\"ca-ES\",cs:\"cs-CZ\",da:\"da-DK\",de:\"de-DE\",el:\"el-GR\",eo:\"eo-EO\",es:\"es-ES\",fa:\"fa-IR\",\"fi-fi\":\"fi-FI\",fr:\"fr-FR\",gl:\"gl-ES\",he:\"he-IL\",hi:\"hi-IN\",hu:\"hu-HU\",id:\"id-ID\",it:\"it-IT\",ja:\"ja-JP\",ko:\"ko-KR\",lv:\"lv-LV\",ml:\"ml-IN\",ms:\"ms-MY\",nl:\"nl-NL\",no:\"nb-NO\",oc:\"oc-FR\",pl:\"pl-PL\",pt:\"pt-PT\",\"pt-BR\":\"pt-BR\",ro:\"ro-RO\",ru:\"ru-RU\",sr:\"sr-RS\",se:\"sv-SE\",sk:\"sk-SK\",sq:\"sq-AL\",ta:\"ta-IN\",te:\"te-IN\",th:\"th-TH\",tr:\"tr-TR\",uk:\"uk-UA\",ur:\"ur-PK\",vi:\"vi-VN\",zh:\"zh-CN\",\"zh-tw\":\"zh-TW\"};let{sceneCoordsToViewportCoords:sceneCoordsToViewportCoords,viewportCoordsToSceneCoords:viewportCoordsToSceneCoords,determineFocusDistance:determineFocusDistance,intersectElementWithLine:intersectElementWithLine,getCommonBoundingBox:getCommonBoundingBox,getMaximumGroups:getMaximumGroups,measureText:measureText,getLineHeight:getLineHeight,wrapText:wrapText,getFontString:getFontString,getBoundTextMaxWidth:getBoundTextMaxWidth,exportToSvg:exportToSvg,exportToBlob:exportToBlob,mutateElement:mutateElement,restore:restore,mermaidToExcalidraw:mermaidToExcalidraw,getFontFamilyString:getFontFamilyString,getContainerElement:getContainerElement,refreshTextDimensions:refreshTextDimensions,getCSSFontDefinition:getCSSFontDefinition,loadSceneFonts:loadSceneFonts,loadMermaid:loadMermaid,syncInvalidIndices:syncInvalidIndices}=excalidrawLib;function updateExcalidrawLib(){try{if(!excalidrawLib)throw new Error(\"excalidrawLib is undefined\");const e=[\"sceneCoordsToViewportCoords\",\"viewportCoordsToSceneCoords\",\"determineFocusDistance\",\"intersectElementWithLine\",\"getCommonBoundingBox\",\"measureText\",\"getLineHeight\",\"restore\"];for(const t of e)if(!(t in excalidrawLib)||\"function\"!=typeof excalidrawLib[t])throw new Error(`Required function ${t} is missing from excalidrawLib`);({sceneCoordsToViewportCoords:sceneCoordsToViewportCoords,viewportCoordsToSceneCoords:viewportCoordsToSceneCoords,determineFocusDistance:determineFocusDistance,intersectElementWithLine:intersectElementWithLine,getCommonBoundingBox:getCommonBoundingBox,getMaximumGroups:getMaximumGroups,measureText:measureText,getLineHeight:getLineHeight,wrapText:wrapText,getFontString:getFontString,getBoundTextMaxWidth:getBoundTextMaxWidth,exportToSvg:exportToSvg,exportToBlob:exportToBlob,mutateElement:mutateElement,restore:restore,mermaidToExcalidraw:mermaidToExcalidraw,getFontFamilyString:getFontFamilyString,getContainerElement:getContainerElement,refreshTextDimensions:refreshTextDimensions,getCSSFontDefinition:getCSSFontDefinition,loadSceneFonts:loadSceneFonts,loadMermaid:loadMermaid,syncInvalidIndices:syncInvalidIndices}=excalidrawLib)}catch(e){errorHandler.handleError(e,\"updateExcalidrawLib\",!0)}}const FONTS_STYLE_ID=\"excalidraw-custom-fonts\",CJK_STYLE_ID=\"excalidraw-cjk-fonts\";function JSON_parse(e){return JSON.parse(e.replaceAll(\"&#91;\",\"[\"))}/Mac|iPod|iPhone|iPad/.test(window.navigator.platform);const DEVICE={isDesktop:!document.body.hasClass(\"is-tablet\")&&!document.body.hasClass(\"is-mobile\"),isPhone:document.body.hasClass(\"is-phone\"),isTablet:document.body.hasClass(\"is-tablet\"),isMobile:document.body.hasClass(\"is-mobile\"),isLinux:document.body.hasClass(\"mod-linux\")&&!document.body.hasClass(\"is-android\"),isMacOS:document.body.hasClass(\"mod-macos\")&&!document.body.hasClass(\"is-ios\"),isWindows:document.body.hasClass(\"mod-windows\"),isIOS:document.body.hasClass(\"is-ios\"),isAndroid:document.body.hasClass(\"is-android\")};let ROOTELEMENTSIZE=16;function setRootElementSize(e){if(e)return void(ROOTELEMENTSIZE=e);const t=document.createElement(\"div\");t.style.fontSize=\"1rem\",t.style.display=\"none\",document.body.appendChild(t);const a=getComputedStyle(t),i=parseFloat(a.fontSize);return document.body.removeChild(t),i}const nanoid=customAlphabet(\"1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\",8),KEYCODE={ESC:27},ROUNDNESS={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},THEME_FILTER=\"invert(100%) hue-rotate(180deg) saturate(1.25)\",GITHUB_RELEASES=\"https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/\",URLFETCHTIMEOUT=3e3,PLUGIN_ID=\"obsidian-excalidraw-plugin\",SCRIPT_INSTALL_CODEBLOCK=\"excalidraw-script-install\",SCRIPT_INSTALL_FOLDER=\"Downloaded\",fileid=customAlphabet(\"1234567890abcdef\",40),REG_LINKINDEX_INVALIDCHARS=/[<>:\"\\\\|?*#]/g,REG_SECTION_REF_CLEAN=/([:#|^\\\\\\r\\n]|%%|\\[\\[|]])/g,REG_BLOCK_REF_CLEAN=/[!\"#$%&()*+,.:;<=>?@^`{|}~\\/\\[\\]\\\\\\r\\n]/g,IMAGE_TYPES=[\"jpeg\",\"jpg\",\"png\",\"gif\",\"svg\",\"webp\",\"bmp\",\"ico\",\"jtif\",\"tif\",\"jfif\",\"avif\"],ANIMATED_IMAGE_TYPES=[\"gif\",\"webp\",\"apng\",\"svg\"],EXPORT_TYPES=[\"svg\",\"dark.svg\",\"light.svg\",\"png\",\"dark.png\",\"light.png\"],MAX_IMAGE_SIZE=500,CARD_WIDTH=400,CARD_HEIGHT=500,VIDEO_TYPES=[\"mp4\",\"webm\",\"ogv\",\"mov\",\"mkv\",\"avi\",\"m4v\",\"wmv\"],AUDIO_TYPES=[\"mp3\",\"wav\",\"m4a\",\"3gp\",\"flac\",\"ogg\",\"oga\",\"opus\",\"aac\",\"aiff\",\"aif\",\"mid\",\"midi\"],CODE_TYPES=[\"json\",\"css\",\"js\"],FRONTMATTER_KEYS={plugin:{name:\"excalidraw-plugin\",type:\"text\"},\"export-transparent\":{name:\"excalidraw-export-transparent\",type:\"checkbox\"},mask:{name:\"excalidraw-mask\",type:\"checkbox\"},\"export-dark\":{name:\"excalidraw-export-dark\",type:\"checkbox\"},\"export-svgpadding\":{name:\"excalidraw-export-svgpadding\",type:\"number\",depricated:!0},\"export-padding\":{name:\"excalidraw-export-padding\",type:\"number\"},\"export-pngscale\":{name:\"excalidraw-export-pngscale\",type:\"number\"},\"export-embed-scene\":{name:\"excalidraw-export-embed-scene\",type:\"checkbox\"},\"link-prefix\":{name:\"excalidraw-link-prefix\",type:\"text\"},\"url-prefix\":{name:\"excalidraw-url-prefix\",type:\"text\"},\"link-brackets\":{name:\"excalidraw-link-brackets\",type:\"checkbox\"},\"onload-script\":{name:\"excalidraw-onload-script\",type:\"text\"},\"linkbutton-opacity\":{name:\"excalidraw-linkbutton-opacity\",type:\"number\"},\"default-mode\":{name:\"excalidraw-default-mode\",type:\"text\"},font:{name:\"excalidraw-font\",type:\"text\"},\"font-color\":{name:\"excalidraw-font-color\",type:\"text\"},\"border-color\":{name:\"excalidraw-border-color\",type:\"text\"},\"md-css\":{name:\"excalidraw-css\",type:\"text\"},autoexport:{name:\"excalidraw-autoexport\",type:\"text\"},\"iframe-theme\":{name:\"excalidraw-iframe-theme\",type:\"text\",depricated:!0},\"embeddable-theme\":{name:\"excalidraw-embeddable-theme\",type:\"text\"},\"open-as-markdown\":{name:\"excalidraw-open-md\",type:\"checkbox\"},\"embed-as-markdown\":{name:\"excalidraw-embed-md\",type:\"checkbox\"}},CaptureUpdateAction={IMMEDIATELY:\"IMMEDIATELY\",NEVER:\"NEVER\",EVENTUALLY:\"EVENTUALLY\"},EMBEDDABLE_THEME_FRONTMATTER_VALUES=[\"light\",\"dark\",\"auto\",\"dafault\"],VIEW_TYPE_EXCALIDRAW=\"excalidraw\",VIEW_TYPE_EXCALIDRAW_LOADING=\"excalidraw-loading\",ICON_NAME=\"excalidraw-icon\",RERENDER_EVENT=\"excalidraw-embed-rerender\",BLANK_DRAWING=`{\"type\":\"excalidraw\",\"version\":2,\"source\":\"${GITHUB_RELEASES+PLUGIN_VERSION}\",\"elements\":[],\"appState\":{\"gridSize\":null,\"viewBackgroundColor\":\"#ffffff\"}}`,DARK_BLANK_DRAWING=`{\"type\":\"excalidraw\",\"version\":2,\"source\":\"${GITHUB_RELEASES+PLUGIN_VERSION}\",\"elements\":[],\"appState\":{\"theme\":\"dark\",\"gridSize\":null,\"viewBackgroundColor\":\"#ffffff\"}}`,FRONTMATTER=[\"---\",\"\",`${FRONTMATTER_KEYS.plugin.name}: parsed`,\"tags: [excalidraw]\",\"\",\"---\",\"==\u26a0  Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. \u26a0== You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving'\",\"\",\"\"].join(\"\\n\"),EMPTY_MESSAGE=\"Hit enter to create a new drawing\",TEXT_DISPLAY_RAW_ICON_NAME=\"presentation\",SCRIPTENGINE_ICON_NAME=\"ScriptEngine\",KEYBOARD_EVENT_TYPES=[\"keydown\",\"keyup\",\"keypress\"],EXTENDED_EVENT_TYPES=[\"copy\",\"cut\",\"paste\"],COLOR_NAMES=new Map;COLOR_NAMES.set(\"aliceblue\",\"#f0f8ff\"),COLOR_NAMES.set(\"antiquewhite\",\"#faebd7\"),COLOR_NAMES.set(\"aqua\",\"#00ffff\"),COLOR_NAMES.set(\"aquamarine\",\"#7fffd4\"),COLOR_NAMES.set(\"azure\",\"#f0ffff\"),COLOR_NAMES.set(\"beige\",\"#f5f5dc\"),COLOR_NAMES.set(\"bisque\",\"#ffe4c4\"),COLOR_NAMES.set(\"black\",\"#000000\"),COLOR_NAMES.set(\"blanchedalmond\",\"#ffebcd\"),COLOR_NAMES.set(\"blue\",\"#0000ff\"),COLOR_NAMES.set(\"blueviolet\",\"#8a2be2\"),COLOR_NAMES.set(\"brown\",\"#a52a2a\"),COLOR_NAMES.set(\"burlywood\",\"#deb887\"),COLOR_NAMES.set(\"cadetblue\",\"#5f9ea0\"),COLOR_NAMES.set(\"chartreuse\",\"#7fff00\"),COLOR_NAMES.set(\"chocolate\",\"#d2691e\"),COLOR_NAMES.set(\"coral\",\"#ff7f50\"),COLOR_NAMES.set(\"cornflowerblue\",\"#6495ed\"),COLOR_NAMES.set(\"cornsilk\",\"#fff8dc\"),COLOR_NAMES.set(\"crimson\",\"#dc143c\"),COLOR_NAMES.set(\"cyan\",\"#00ffff\"),COLOR_NAMES.set(\"darkblue\",\"#00008b\"),COLOR_NAMES.set(\"darkcyan\",\"#008b8b\"),COLOR_NAMES.set(\"darkgoldenrod\",\"#b8860b\"),COLOR_NAMES.set(\"darkgray\",\"#a9a9a9\"),COLOR_NAMES.set(\"darkgreen\",\"#006400\"),COLOR_NAMES.set(\"darkkhaki\",\"#bdb76b\"),COLOR_NAMES.set(\"darkmagenta\",\"#8b008b\"),COLOR_NAMES.set(\"darkolivegreen\",\"#556b2f\"),COLOR_NAMES.set(\"darkorange\",\"#ff8c00\"),COLOR_NAMES.set(\"darkorchid\",\"#9932cc\"),COLOR_NAMES.set(\"darkred\",\"#8b0000\"),COLOR_NAMES.set(\"darksalmon\",\"#e9967a\"),COLOR_NAMES.set(\"darkseagreen\",\"#8fbc8f\"),COLOR_NAMES.set(\"darkslateblue\",\"#483d8b\"),COLOR_NAMES.set(\"darkslategray\",\"#2f4f4f\"),COLOR_NAMES.set(\"darkturquoise\",\"#00ced1\"),COLOR_NAMES.set(\"darkviolet\",\"#9400d3\"),COLOR_NAMES.set(\"deeppink\",\"#ff1493\"),COLOR_NAMES.set(\"deepskyblue\",\"#00bfff\"),COLOR_NAMES.set(\"dimgray\",\"#696969\"),COLOR_NAMES.set(\"dodgerblue\",\"#1e90ff\"),COLOR_NAMES.set(\"firebrick\",\"#b22222\"),COLOR_NAMES.set(\"floralwhite\",\"#fffaf0\"),COLOR_NAMES.set(\"forestgreen\",\"#228b22\"),COLOR_NAMES.set(\"fuchsia\",\"#ff00ff\"),COLOR_NAMES.set(\"gainsboro\",\"#dcdcdc\"),COLOR_NAMES.set(\"ghostwhite\",\"#f8f8ff\"),COLOR_NAMES.set(\"gold\",\"#ffd700\"),COLOR_NAMES.set(\"goldenrod\",\"#daa520\"),COLOR_NAMES.set(\"gray\",\"#808080\"),COLOR_NAMES.set(\"green\",\"#008000\"),COLOR_NAMES.set(\"greenyellow\",\"#adff2f\"),COLOR_NAMES.set(\"honeydew\",\"#f0fff0\"),COLOR_NAMES.set(\"hotpink\",\"#ff69b4\"),COLOR_NAMES.set(\"indianred\",\"#cd5c5c\"),COLOR_NAMES.set(\"indigo\",\"#4b0082\"),COLOR_NAMES.set(\"ivory\",\"#fffff0\"),COLOR_NAMES.set(\"khaki\",\"#f0e68c\"),COLOR_NAMES.set(\"lavender\",\"#e6e6fa\"),COLOR_NAMES.set(\"lavenderblush\",\"#fff0f5\"),COLOR_NAMES.set(\"lawngreen\",\"#7cfc00\"),COLOR_NAMES.set(\"lemonchiffon\",\"#fffacd\"),COLOR_NAMES.set(\"lightblue\",\"#add8e6\"),COLOR_NAMES.set(\"lightcoral\",\"#f08080\"),COLOR_NAMES.set(\"lightcyan\",\"#e0ffff\"),COLOR_NAMES.set(\"lightgoldenrodyellow\",\"#fafad2\"),COLOR_NAMES.set(\"lightgrey\",\"#d3d3d3\"),COLOR_NAMES.set(\"lightgreen\",\"#90ee90\"),COLOR_NAMES.set(\"lightpink\",\"#ffb6c1\"),COLOR_NAMES.set(\"lightsalmon\",\"#ffa07a\"),COLOR_NAMES.set(\"lightseagreen\",\"#20b2aa\"),COLOR_NAMES.set(\"lightskyblue\",\"#87cefa\"),COLOR_NAMES.set(\"lightslategray\",\"#778899\"),COLOR_NAMES.set(\"lightsteelblue\",\"#b0c4de\"),COLOR_NAMES.set(\"lightyellow\",\"#ffffe0\"),COLOR_NAMES.set(\"lime\",\"#00ff00\"),COLOR_NAMES.set(\"limegreen\",\"#32cd32\"),COLOR_NAMES.set(\"linen\",\"#faf0e6\"),COLOR_NAMES.set(\"magenta\",\"#ff00ff\"),COLOR_NAMES.set(\"maroon\",\"#800000\"),COLOR_NAMES.set(\"mediumaquamarine\",\"#66cdaa\"),COLOR_NAMES.set(\"mediumblue\",\"#0000cd\"),COLOR_NAMES.set(\"mediumorchid\",\"#ba55d3\"),COLOR_NAMES.set(\"mediumpurple\",\"#9370d8\"),COLOR_NAMES.set(\"mediumseagreen\",\"#3cb371\"),COLOR_NAMES.set(\"mediumslateblue\",\"#7b68ee\"),COLOR_NAMES.set(\"mediumspringgreen\",\"#00fa9a\"),COLOR_NAMES.set(\"mediumturquoise\",\"#48d1cc\"),COLOR_NAMES.set(\"mediumvioletred\",\"#c71585\"),COLOR_NAMES.set(\"midnightblue\",\"#191970\"),COLOR_NAMES.set(\"mintcream\",\"#f5fffa\"),COLOR_NAMES.set(\"mistyrose\",\"#ffe4e1\"),COLOR_NAMES.set(\"moccasin\",\"#ffe4b5\"),COLOR_NAMES.set(\"navajowhite\",\"#ffdead\"),COLOR_NAMES.set(\"navy\",\"#000080\"),COLOR_NAMES.set(\"oldlace\",\"#fdf5e6\"),COLOR_NAMES.set(\"olive\",\"#808000\"),COLOR_NAMES.set(\"olivedrab\",\"#6b8e23\"),COLOR_NAMES.set(\"orange\",\"#ffa500\"),COLOR_NAMES.set(\"orangered\",\"#ff4500\"),COLOR_NAMES.set(\"orchid\",\"#da70d6\"),COLOR_NAMES.set(\"palegoldenrod\",\"#eee8aa\"),COLOR_NAMES.set(\"palegreen\",\"#98fb98\"),COLOR_NAMES.set(\"paleturquoise\",\"#afeeee\"),COLOR_NAMES.set(\"palevioletred\",\"#d87093\"),COLOR_NAMES.set(\"papayawhip\",\"#ffefd5\"),COLOR_NAMES.set(\"peachpuff\",\"#ffdab9\"),COLOR_NAMES.set(\"peru\",\"#cd853f\"),COLOR_NAMES.set(\"pink\",\"#ffc0cb\"),COLOR_NAMES.set(\"plum\",\"#dda0dd\"),COLOR_NAMES.set(\"powderblue\",\"#b0e0e6\"),COLOR_NAMES.set(\"purple\",\"#800080\"),COLOR_NAMES.set(\"rebeccapurple\",\"#663399\"),COLOR_NAMES.set(\"red\",\"#ff0000\"),COLOR_NAMES.set(\"rosybrown\",\"#bc8f8f\"),COLOR_NAMES.set(\"royalblue\",\"#4169e1\"),COLOR_NAMES.set(\"saddlebrown\",\"#8b4513\"),COLOR_NAMES.set(\"salmon\",\"#fa8072\"),COLOR_NAMES.set(\"sandybrown\",\"#f4a460\"),COLOR_NAMES.set(\"seagreen\",\"#2e8b57\"),COLOR_NAMES.set(\"seashell\",\"#fff5ee\"),COLOR_NAMES.set(\"sienna\",\"#a0522d\"),COLOR_NAMES.set(\"silver\",\"#c0c0c0\"),COLOR_NAMES.set(\"skyblue\",\"#87ceeb\"),COLOR_NAMES.set(\"slateblue\",\"#6a5acd\"),COLOR_NAMES.set(\"slategray\",\"#708090\"),COLOR_NAMES.set(\"snow\",\"#fffafa\"),COLOR_NAMES.set(\"springgreen\",\"#00ff7f\"),COLOR_NAMES.set(\"steelblue\",\"#4682b4\"),COLOR_NAMES.set(\"tan\",\"#d2b48c\"),COLOR_NAMES.set(\"teal\",\"#008080\"),COLOR_NAMES.set(\"thistle\",\"#d8bfd8\"),COLOR_NAMES.set(\"tomato\",\"#ff6347\"),COLOR_NAMES.set(\"turquoise\",\"#40e0d0\"),COLOR_NAMES.set(\"violet\",\"#ee82ee\"),COLOR_NAMES.set(\"wheat\",\"#f5deb3\"),COLOR_NAMES.set(\"white\",\"#ffffff\"),COLOR_NAMES.set(\"whitesmoke\",\"#f5f5f5\"),COLOR_NAMES.set(\"yellow\",\"#ffff00\"),COLOR_NAMES.set(\"yellowgreen\",\"#9acd32\");const DEFAULT_MD_EMBED_CSS='.snw-reference{display: none;}.excalidraw-md-host{padding:0px 10px}.excalidraw-md-footer{height:5px}foreignObject{background-color:transparent}p{display:block;margin-block-start:1em;margin-block-end:1em;margin-inline-start:0px;margin-inline-end:0px;color:inherit}table,tr,th,td{color:inherit;border:1px solid;border-collapse:collapse;padding:3px}th{font-weight:bold;border-bottom:double;background-color:silver}.copy-code-button{display:none}code[class*=language-],pre[class*=language-]{color:#393a34;font-family:\"Consolas\",\"Bitstream Vera Sans Mono\",\"Courier New\",Courier,monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;font-size:.9em;line-height:1.2em;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre>code[class*=language-]{font-size:1em}pre[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,code[class*=language-] ::-moz-selection{background:#C1DEF1}pre[class*=language-]::selection,pre[class*=language-] ::selection,code[class*=language-]::selection,code[class*=language-] ::selection{background:#C1DEF1}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;background-color:#0000001a}:not(pre)>code[class*=language-]{padding:.2em;padding-top:1px;padding-bottom:1px;background:#f8f8f8;border:1px solid #dddddd}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:green;font-style:italic}.token.namespace{opacity:.7}.token.string{color:#a31515}.token.punctuation,.token.operator{color:#393a34}.token.url,.token.symbol,.token.number,.token.boolean,.token.variable,.token.constant,.token.inserted{color:#36acaa}.token.atrule,.token.keyword,.token.attr-value,.language-autohotkey .token.selector,.language-json .token.boolean,.language-json .token.number,code[class*=language-css]{color:#00f}.token.function{color:#393a34}.token.deleted,.language-autohotkey .token.tag{color:#9a050f}.token.selector,.language-autohotkey .token.keyword{color:#00009f}.token.important{color:#e90}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.class-name,.language-json .token.property{color:#2b91af}.token.tag,.token.selector{color:maroon}.token.attr-name,.token.property,.token.regex,.token.entity{color:red}.token.directive.tag .tag{background:#ffff00;color:#393a34}.line-numbers.line-numbers .line-numbers-rows{border-right-color:#a5a5a5}.line-numbers .line-numbers-rows>span:before{color:#2b91af}.line-highlight.line-highlight{background:rgba(193,222,241,.2);background:-webkit-linear-gradient(left,rgba(193,222,241,.2) 70%,rgba(221,222,241,0));background:linear-gradient(to right,rgba(193,222,241,.2) 70%,rgba(221,222,241,0))}blockquote{ font-style:italic;background-color:rgb(46,43,42,0.1);margin:0;margin-left:1em;border-radius:0 4px 4px 0;border:1px solid hsl(0,80%,32%);border-left-width:8px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;padding:10px 20px;margin-inline-start:30px;margin-inline-end:30px;}',SCRIPTENGINE_ICON='<g transform=\"translate(-8,-8)\"><path d=\"M24.318 37.983c-1.234-1.232-8.433-3.903-7.401-7.387 1.057-3.484 9.893-12.443 13.669-13.517 3.776-1.074 6.142 6.523 9.012 7.073 2.87.55 6.797-1.572 8.207-3.694 1.384-2.148-3.147-7.413.15-9.168 3.298-1.755 16.389-2.646 19.611-1.284 3.247 1.363-1.611 7.335-.151 9.483 1.46 2.148 6.067 3.746 8.836 3.38 2.769-.368 4.154-6.733 7.728-5.633 3.575 1.1 12.36 8.828 13.67 12.233 1.308 3.406-5.186 5.423-5.79 8.2-.58 2.75-.026 6.705 2.265 8.355 2.266 1.65 9.642-1.78 11.404 1.598 1.762 3.38 1.007 15.35-.806 18.651-1.787 3.353-7.753-.367-9.969 1.31-2.215 1.65-3.901 5.92-3.373 8.67.504 2.777 7.754 4.48 6.445 7.885C96.49 87.543 87.15 95.454 83.5 96.685c-3.65 1.231-4.96-4.741-7.577-5.16-2.593-.393-6.57.707-8.03 2.75-1.436 2.017 2.668 7.806-.63 9.483-3.323 1.676-15.759 2.226-19.157.655-3.373-1.598.554-7.964-1.108-10.138-1.687-2.174-6.394-3.431-9.012-2.907-2.643.55-3.273 7.282-6.747 6.103-3.499-1.126-12.788-9.535-14.172-13.019-1.36-3.484 5.437-5.108 5.966-7.858.529-2.777-.68-7.073-2.744-8.697-2.064-1.624-7.93 2.41-9.642-1.126-1.737-3.537-2.441-16.765-.654-20.118 1.787-3.3 9.062 1.598 11.429.183 2.366-1.44 2.316-7.282 2.769-8.749m.126-.104c-1.234-1.232-8.433-3.903-7.401-7.387 1.057-3.484 9.893-12.443 13.669-13.517 3.776-1.074 6.142 6.523 9.012 7.073 2.87.55 6.797-1.572 8.207-3.694 1.384-2.148-3.147-7.413.15-9.168 3.298-1.755 16.389-2.646 19.611-1.284 3.247 1.363-1.611 7.335-.151 9.483 1.46 2.148 6.067 3.746 8.836 3.38 2.769-.368 4.154-6.733 7.728-5.633 3.575 1.1 12.36 8.828 13.67 12.233 1.308 3.406-5.186 5.423-5.79 8.2-.58 2.75-.026 6.705 2.265 8.355 2.266 1.65 9.642-1.78 11.404 1.598 1.762 3.38 1.007 15.35-.806 18.651-1.787 3.353-7.753-.367-9.969 1.31-2.215 1.65-3.901 5.92-3.373 8.67.504 2.777 7.754 4.48 6.445 7.885C96.49 87.543 87.15 95.454 83.5 96.685c-3.65 1.231-4.96-4.741-7.577-5.16-2.593-.393-6.57.707-8.03 2.75-1.436 2.017 2.668 7.806-.63 9.483-3.323 1.676-15.759 2.226-19.157.655-3.373-1.598.554-7.964-1.108-10.138-1.687-2.174-6.394-3.431-9.012-2.907-2.643.55-3.273 7.282-6.747 6.103-3.499-1.126-12.788-9.535-14.172-13.019-1.36-3.484 5.437-5.108 5.966-7.858.529-2.777-.68-7.073-2.744-8.697-2.064-1.624-7.93 2.41-9.642-1.126-1.737-3.537-2.441-16.765-.654-20.118 1.787-3.3 9.062 1.598 11.429.183 2.366-1.44 2.316-7.282 2.769-8.749\" fill=\"none\" stroke-width=\"2\" stroke-linecap=\"round\" stroke=\"currentColor\"/><path d=\"M81.235 56.502a23.3 23.3 0 0 1-1.46 8.068 20.785 20.785 0 0 1-1.762 3.72 24.068 24.068 0 0 1-5.337 6.26 22.575 22.575 0 0 1-3.449 2.358 23.726 23.726 0 0 1-7.803 2.803 24.719 24.719 0 0 1-8.333 0 24.102 24.102 0 0 1-4.028-1.074 23.71 23.71 0 0 1-3.776-1.729 23.259 23.259 0 0 1-6.369-5.265 23.775 23.775 0 0 1-2.416-3.353 24.935 24.935 0 0 1-1.762-3.72 23.765 23.765 0 0 1-1.083-3.981 23.454 23.454 0 0 1 0-8.173c.252-1.336.604-2.698 1.083-3.956a24.935 24.935 0 0 1 1.762-3.72 22.587 22.587 0 0 1 2.416-3.378c.881-1.048 1.888-2.017 2.946-2.908a24.38 24.38 0 0 1 3.423-2.357 23.71 23.71 0 0 1 3.776-1.73 21.74 21.74 0 0 1 4.028-1.047 23.437 23.437 0 0 1 8.333 0 24.282 24.282 0 0 1 7.803 2.777 26.198 26.198 0 0 1 3.45 2.357 24.62 24.62 0 0 1 5.336 6.287 20.785 20.785 0 0 1 1.762 3.72 21.32 21.32 0 0 1 1.083 3.955c.251 1.336.302 3.405.377 4.086.05.681.05-.68 0 0\" fill=\"none\" stroke-width=\"4\" stroke-linecap=\"round\" stroke=\"currentColor\"/><path d=\"M69.404 56.633c-6.596-3.3-13.216-6.6-19.51-9.744m19.51 9.744c-6.747-3.379-13.493-6.758-19.51-9.744m0 0v19.489m0-19.49v19.49m0 0c4.355-2.148 8.71-4.322 19.51-9.745m-19.51 9.745c3.978-1.965 7.93-3.956 19.51-9.745m0 0h0m0 0h0\" fill=\"currentColor\" stroke-linecap=\"round\" stroke=\"currentColor\" stroke-width=\"4\"/></g>',DISK_ICON_NAME=\"save\",EXPORT_IMG_ICON=' <g transform=\"scale(4.166)\" strokeWidth=\"1.25\" fill=\"none\" stroke=\"currentColor\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M15 8h.01\"></path><path d=\"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5\"></path><path d=\"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4\"></path><path d=\"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598\"></path><path d=\"M19 16v6\"></path><path d=\"M22 19l-3 3l-3 -3\"></path></g>',EXPORT_IMG_ICON_NAME=\"export-img\",EXCALIDRAW_ICON='<path d=\"M24 17h121v121H24z\" style=\"fill:none\" transform=\"matrix(.8843 0 0 .83471 -21.223 -14.19)\"/><path d=\"M119.81 105.98a.549.549 0 0 0-.53-.12c-4.19-6.19-9.52-12.06-14.68-17.73l-.85-.93c0-.11-.05-.21-.12-.3a.548.548 0 0 0-.34-.2l-.17-.18-.12-.09c-.15-.32-.53-.56-.95-.35-1.58.81-3 1.97-4.4 3.04-1.87 1.43-3.7 2.92-5.42 4.52-.7.65-1.39 1.33-1.97 2.09-.28.37-.07.72.27.87-1.22 1.2-2.45 2.45-3.68 3.74-.11.12-.17.28-.16.44.01.16.09.31.22.41l2.16 1.65s.01.03.03.04c3.09 3.05 8.51 7.28 14.25 11.76.85.67 1.71 1.34 2.57 2.01.39.47.76.94 1.12 1.4.19.25.55.3.8.11.13.1.26.21.39.31a.57.57 0 0 0 .8-.1c.07-.09.1-.2.11-.31.04 0 .07.03.1.03.15 0 .31-.06.42-.18l10.18-11.12a.56.56 0 0 0-.04-.8l.01-.01Zm-29.23-3.85c.07.09.14.17.21.25 1.16.98 2.4 2.04 3.66 3.12l-5.12-3.91s-.32-.22-.52-.36c-.11-.08-.21-.16-.31-.24l-.38-.32s.07-.07.1-.11l.35-.35c1.72-1.74 4.67-4.64 6.19-6.06-1.61 1.62-4.87 6.37-4.17 7.98h-.01Zm17.53 13.81-4.22-3.22c-1.65-1.71-3.43-3.4-5.24-5.03 2.28 1.76 4.23 3.25 4.52 3.51 2.21 1.97 2.11 1.61 3.63 2.91l1.83 1.33c-.18.16-.36.33-.53.49l.01.01Zm1.06.81-.08-.06c.16-.13.33-.25.49-.38l-.4.44h-.01Zm-66.93-65.3c.14.72.27 1.43.4 2.11.69 3.7 1.33 7.03 2.55 9.56l.48 1.92c.19.73.46 1.64.71 1.83 2.85 2.52 7.22 6.28 11.89 9.82.21.16.5.15.7-.01.01.02.03.03.04.04.11.1.24.15.38.15.16 0 .31-.06.42-.19 5.98-6.65 10.43-12.12 13.6-16.7.2-.25.3-.54.29-.84.2-.24.41-.48.6-.68a.558.558 0 0 0-.1-.86.578.578 0 0 0-.17-.36c-1.39-1.34-2.42-2.31-3.46-3.28-1.84-1.72-3.74-3.5-7.77-7.51-.02-.02-.05-.04-.07-.06a.555.555 0 0 0-.22-.14c-1.11-.39-3.39-.78-6.26-1.28-4.22-.72-10-1.72-15.2-3.27h-.04v-.01s-.02 0-.03.02h-.01l.04-.02s-.31.01-.37.04c-.08.04-.14.09-.19.15-.05.06-.09.12-.47.2-.38.08.08 0 .11 0h-.11v.03c.07.34.05.58.16.97-.02.1.21 1.02.24 1.11l1.83 7.26h.03Zm30.95 6.54s-.03.04-.04.05l-.64-.71c.22.21.44.42.68.66Zm-7.09 9.39s-.07.08-.1.12l-.02-.02c.04-.03.08-.07.13-.1h-.01Zm-7.07 8.47Zm3.02-28.57c.35.35 1.74 1.65 2.06 1.97-1.45-.66-5.06-2.34-6.74-2.88 1.65.29 3.93.66 4.68.91Zm-19.18-2.77c.84 1.44 1.5 6.49 2.16 11.4-.37-1.58-.69-3.12-.99-4.6-.52-2.56-1-4.85-1.67-6.88.14.01.31.03.49.05 0 .01 0 .02.02.03h-.01Zm-.29-1.21c-.23-.02-.44-.04-.62-.05-.02-.04-.03-.08-.04-.12l.66.18v-.01Zm-2.22.45v-.02.02Zm78.54-1.18c.04-.23-1.1-1.24-.74-1.26.85-.04.86-1.35 0-1.31-1.13.06-2.27.32-3.37.53-1.98.37-3.95.78-5.92 1.21-4.39.94-8.77 1.93-13.1 3.11-1.36.37-2.86.7-4.11 1.36-.42.22-.4.67-.17.95-.09.05-.18.08-.28.09-.37.07-.74.13-1.11.19a.566.566 0 0 0-.39.86c-2.32 3.1-4.96 6.44-7.82 9.95-2.81 3.21-5.73 6.63-8.72 10.14-9.41 11.06-20.08 23.6-31.9 34.64-.23.21-.24.57-.03.8.05.06.12.1.19.13-.16.15-.32.3-.48.44-.1.09-.14.2-.16.32-.08.08-.16.17-.23.25-.21.23-.2.59.03.8.23.21.59.2.8-.03.04-.04.08-.09.12-.13a.84.84 0 0 1 1.22 0c.69.74 1.34 1.44 1.95 2.09l-1.38-1.15a.57.57 0 0 0-.8.07c-.2.24-.17.6.07.8l14.82 12.43c.11.09.24.13.37.13.15 0 .29-.06.4-.17l.36-.36a.56.56 0 0 0 .63-.12c20.09-20.18 36.27-35.43 54.8-49.06.17-.12.25-.32.23-.51a.57.57 0 0 0 .48-.39c3.42-10.46 4.08-19.72 4.28-24.27 0-.03.01-.05.02-.07.02-.05.03-.1.04-.14.03-.11.05-.19.05-.19.26-.78.17-1.53-.15-2.15v.02ZM82.98 58.94c.9-1.03 1.79-2.04 2.67-3.02-5.76 7.58-15.3 19.26-28.81 33.14 9.2-10.18 18.47-20.73 26.14-30.12Zm-32.55 52.81-.03-.03c.11.02.19.04.2.04a.47.47 0 0 0-.17 0v-.01Zm6.9 6.42-.05-.04.03-.03c.02 0 .03.02.04.02 0 .02-.02.03-.03.05h.01Zm8.36-7.21 1.38-1.44c.01.01.02.03.03.05-.47.46-.94.93-1.42 1.39h.01Zm2.24-2.21c.26-.3.56-.65.87-1.02.01-.01.02-.03.04-.04 3.29-3.39 6.68-6.82 10.18-10.25.02-.02.05-.04.07-.06.86-.66 1.82-1.39 2.72-2.08-4.52 4.32-9.11 8.78-13.88 13.46v-.01Zm21.65-55.88c-1.86 2.42-3.9 5.56-5.63 8.07-5.46 7.91-23.04 27.28-23.43 27.65-2.71 2.62-10.88 10.46-16.09 15.37-.14.13-.25.24-.34.35a.794.794 0 0 1 .03-1.13c24.82-23.4 39.88-42.89 46-51.38-.13.33-.24.69-.55 1.09l.01-.02Zm16.51 7.1-.01.02c0-.02-.02-.07.01-.02Zm-.91-5.13Zm-5.89 9.45c-2.26-1.31-3.32-3.27-2.71-5.25l.19-.66c.08-.19.17-.38.28-.57.59-.98 1.49-1.85 2.52-2.36.05-.02.1-.03.15-.04a.795.795 0 0 1-.04-.43c.05-.31.25-.58.66-.58.67 0 2.75.62 3.54 1.3.24.19.47.4.68.63.3.35.74.92.96 1.33.13.06.23.62.38.91.14.46.2.93.18 1.4 0 .02 0 .02.01.03-.03.07 0 .37-.04.4-.1.72-.36 1.43-.75 2.05-.04.05-.07.11-.11.16 0 .01-.02.02-.03.04-.3.43-.65.83-1.08 1.13-1.26.89-2.73 1.16-4.2.79a6.33 6.33 0 0 1-.57-.25l-.02-.03Zm16.27-1.63c-.49 2.05-1.09 4.19-1.8 6.38-.03.08-.03.16-.03.23-.1.01-.19.05-.27.11-4.44 3.26-8.73 6.62-12.98 10.11 3.67-3.32 7.39-6.62 11.23-9.95a6.409 6.409 0 0 0 2.11-3.74l.56-3.37.03-.1c.25-.71 1.34-.4 1.17.33h-.02Z\" style=\"fill:currentColor;fill-rule:nonzero\" transform=\"translate(-26.41 -29.49)\"/>',TAG_PDFEXPORT=\"PDFExport\",TAG_MDREADINGMODE=\"MDReadingMode\",TAG_AUTOEXPORT=\"Autoexport\",modifierKeyTooltipMessages=()=>({WebBrowserDragAction:{\"image-import\":t$d(\"WEB_DRAG_IMPORT_IMAGE\"),\"image-url\":t$d(\"WEB_DRAG_IMAGE_URL\"),link:t$d(\"WEB_DRAG_LINK\"),embeddable:t$d(\"WEB_DRAG_EMBEDDABLE\")},LocalFileDragAction:{\"image-import\":t$d(\"LOCAL_DRAG_IMPORT\"),\"image-url\":t$d(\"LOCAL_DRAG_IMAGE\"),link:t$d(\"LOCAL_DRAG_LINK\"),embeddable:t$d(\"LOCAL_DRAG_EMBEDDABLE\")},InternalDragAction:{image:t$d(\"INTERNAL_DRAG_IMAGE\"),\"image-fullsize\":t$d(\"INTERNAL_DRAG_IMAGE_FULL\"),link:t$d(\"INTERNAL_DRAG_LINK\"),embeddable:t$d(\"INTERNAL_DRAG_EMBEDDABLE\")},LinkClickAction:{\"active-pane\":t$d(\"LINK_CLICK_ACTIVE\"),\"new-pane\":t$d(\"LINK_CLICK_NEW_PANE\"),\"popout-window\":t$d(\"LINK_CLICK_POPOUT\"),\"new-tab\":t$d(\"LINK_CLICK_NEW_TAB\"),\"md-properties\":t$d(\"LINK_CLICK_MD_PROPS\")}}),processModifiers=(e,t)=>{const a=window.ExcalidrawAutomate.plugin.settings,i=(DEVICE.isMacOS||DEVICE.isIOS?a.modifierKeyConfig.Mac:a.modifierKeyConfig.Win)[t];for(const t of i.rules){const{shift:a,ctrl_cmd:i,alt_opt:n,meta_ctrl:r,result:s}=t;if(isSHIFT(e)===a&&isWinCTRLorMacCMD(e)===i&&isWinALTorMacOPT(e)===n&&isWinMETAorMacCTRL(e)===r)return s}return i.defaultAction},labelCTRL=()=>DEVICE.isIOS||DEVICE.isMacOS?\"CMD\":\"CTRL\",labelALT=()=>DEVICE.isIOS||DEVICE.isMacOS?\"OPT\":\"ALT\",labelMETA=()=>DEVICE.isIOS||DEVICE.isMacOS?\"CTRL\":DEVICE.isWindows?\"WIN\":\"META\",labelSHIFT=()=>\"SHIFT\",isWinCTRLorMacCMD=e=>DEVICE.isIOS||DEVICE.isMacOS?e.metaKey:e.ctrlKey,isWinALTorMacOPT=e=>e.altKey,isWinMETAorMacCTRL=e=>DEVICE.isIOS||DEVICE.isMacOS?e.ctrlKey:e.metaKey,isSHIFT=e=>e.shiftKey,setCTRL=(e,t)=>(DEVICE.isIOS||DEVICE.isMacOS?e.metaKey=t:e.ctrlKey=t,e),setALT=(e,t)=>(e.altKey=t,e),setMETA=(e,t)=>(DEVICE.isIOS||DEVICE.isMacOS?e.ctrlKey=t:e.metaKey=t,e),setSHIFT=(e,t)=>(e.shiftKey=t,e),scaleToFullsizeModifier=e=>{const t=window.ExcalidrawAutomate.plugin.settings,a=(DEVICE.isMacOS||DEVICE.isIOS?t.modifierKeyConfig.Mac:t.modifierKeyConfig.Win).InternalDragAction.rules.find((e=>\"image-fullsize\"===e.result));if(!a)return!1;const{shift:i,ctrl_cmd:n,alt_opt:r,meta_ctrl:s,result:o}=a;return isSHIFT(e)===i&&isWinCTRLorMacCMD(e)===n&&isWinALTorMacOPT(e)===r&&isWinMETAorMacCTRL(e)===s},linkClickModifierType=e=>{const t=processModifiers(e,\"LinkClickAction\");return DEVICE.isDesktop||\"popout-window\"!==t?t:\"active-pane\"},webbrowserDragModifierType=e=>processModifiers(e,\"WebBrowserDragAction\"),localFileDragModifierType=e=>processModifiers(e,\"LocalFileDragAction\"),internalDragModifierType=e=>processModifiers(e,\"InternalDragAction\"),emulateCTRLClickForLinks=e=>({shiftKey:e.shiftKey,ctrlKey:e.ctrlKey||!(DEVICE.isIOS||DEVICE.isMacOS),metaKey:e.metaKey||DEVICE.isIOS||DEVICE.isMacOS,altKey:e.altKey}),emulateKeysForLinkClick=e=>{const t={shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1};if(!e)return t;const a=DEVICE.isMacOS||DEVICE.isIOS?\"Mac\":\"Win\",i=window.ExcalidrawAutomate.plugin.settings.modifierKeyConfig,n=i[a]?.LinkClickAction;if(n){const a=n.rules.find((t=>t.result===e));if(!a){const e=n.defaultAction;return emulateKeysForLinkClick(e)}setCTRL(t,a.ctrl_cmd),setALT(t,a.alt_opt),setMETA(t,a.meta_ctrl),setSHIFT(t,a.shift)}return t},anyModifierKeysPressed=e=>e.shiftKey||e.ctrlKey||e.metaKey||e.altKey;function modifierLabel(e,t){const a=\"Mac\"===t||void 0===t&&(DEVICE.isIOS||DEVICE.isMacOS);return e.map((e=>{switch(e){case\"Mod\":return a?\"CMD\":\"CTRL\";case\"Ctrl\":return\"CTRL\";case\"Meta\":return a?\"CMD\":\"WIN\";case\"Shift\":return\"SHIFT\";case\"Alt\":return a?\"OPTION\":\"ALT\";default:return e}})).join(\"+\")}var en={SELECT_FILE_TO_INSERT:\"Select a file to insert\",CONVERT_URL_TO_FILE:\"Save image from URL to local file\",UNZIP_CURRENT_FILE:\"Decompress current Excalidraw file\",ZIP_CURRENT_FILE:\"Compress current Excalidraw file\",PUBLISH_SVG_CHECK:\"Obsidian Publish: Find SVG and PNG exports that are out of date\",EMBEDDABLE_PROPERTIES:\"Embeddable Properties\",EMBEDDABLE_RELATIVE_ZOOM:\"Scale selected embeddable elements to 100% relative to the current canvas zoom\",OPEN_IMAGE_SOURCE:\"Open Excalidraw drawing\",INSTALL_SCRIPT:\"Install the script\",UPDATE_SCRIPT:\"Update available - Click to install\",CHECKING_SCRIPT:\"Checking for newer version - Click to reinstall\",UNABLETOCHECK_SCRIPT:\"Update check failed - Click to reinstall\",UPTODATE_SCRIPT:\"Script is up to date - Click to reinstall\",OPEN_AS_EXCALIDRAW:\"Open as Excalidraw Drawing\",TOGGLE_MODE:\"Toggle between Excalidraw and Markdown mode\",DUPLICATE_IMAGE:\"Duplicate selected image with a different image ID\",CONVERT_NOTE_TO_EXCALIDRAW:\"Convert markdown note to Excalidraw Drawing\",CONVERT_EXCALIDRAW:\"Convert *.excalidraw to *.md files\",CREATE_NEW:\"New drawing\",CONVERT_FILE_KEEP_EXT:\"*.excalidraw => *.excalidraw.md\",CONVERT_FILE_REPLACE_EXT:\"*.excalidraw => *.md (Logseq compatibility)\",DOWNLOAD_LIBRARY:\"Export stencil library as an *.excalidrawlib file\",OPEN_EXISTING_NEW_PANE:\"Open existing drawing - IN A NEW PANE\",OPEN_EXISTING_ACTIVE_PANE:\"Open existing drawing - IN THE CURRENT ACTIVE PANE\",TRANSCLUDE:\"Embed a drawing\",TRANSCLUDE_MOST_RECENT:\"Embed the most recently edited drawing\",TOGGLE_LEFTHANDED_MODE:\"Toggle left-handed mode\",TOGGLE_SPLASHSCREEN:\"Show splash screen in new drawings\",FLIP_IMAGE:\"Open the back-of-the-note for the selected image in a popout window (flip the card)\",NEW_IN_NEW_PANE:\"Create new drawing - IN AN ADJACENT WINDOW\",NEW_IN_NEW_TAB:\"Create new drawing - IN A NEW TAB\",NEW_IN_ACTIVE_PANE:\"Create new drawing - IN THE CURRENT ACTIVE WINDOW\",NEW_IN_POPOUT_WINDOW:\"Create new drawing - IN A POPOUT WINDOW\",NEW_IN_NEW_PANE_EMBED:\"Create new drawing - IN AN ADJACENT WINDOW - and embed into active document\",NEW_IN_NEW_TAB_EMBED:\"Create new drawing - IN A NEW TAB - and embed into active document\",NEW_IN_ACTIVE_PANE_EMBED:\"Create new drawing - IN THE CURRENT ACTIVE WINDOW - and embed into active document\",NEW_IN_POPOUT_WINDOW_EMBED:\"Create new drawing - IN A POPOUT WINDOW - and embed into active document\",TOGGLE_LOCK:\"Toggle Text Element between edit RAW and PREVIEW\",DELETE_FILE:\"Delete selected image or Markdown file from Obsidian Vault\",MARKER_FRAME_SHOW:\"Show Marker Frames\",MARKER_FRAME_HIDE:\"Hide Marker Frames\",MARKER_FRAME_TITLE_SHOW:\"Show Marker Frame Titles\",MARKER_FRAME_TITLE_HIDE:\"Hide Marker Frame Titles\",COPY_ELEMENT_LINK:\"Copy [[link]] for selected element(s)\",COPY_DRAWING_LINK:\"Copy ![[embed link]] for this drawing\",INSERT_LINK_TO_ELEMENT:`Copy [[link]] for selected element to clipboard. ${labelCTRL()}+CLICK to copy 'group=' link. ${labelSHIFT()}+CLICK to copy an 'area=' link.`,INSERT_LINK_TO_ELEMENT_GROUP:\"Copy 'group=' ![[link]] for selected element to clipboard.\",INSERT_LINK_TO_ELEMENT_AREA:\"Copy 'area=' ![[link]] for selected element to clipboard.\",INSERT_LINK_TO_ELEMENT_FRAME:\"Copy 'frame=' ![[link]] for selected element to clipboard.\",INSERT_LINK_TO_ELEMENT_FRAME_CLIPPED:\"Copy 'clippedframe=' ![[link]] for selected element to clipboard.\",INSERT_LINK_TO_ELEMENT_NORMAL:\"Copy [[link]] for selected element to clipboard.\",INSERT_LINK_TO_ELEMENT_ERROR:\"Select a single element in the scene\",INSERT_LINK_TO_ELEMENT_READY:\"Link is READY and available on the clipboard\",INSERT_LINK:\"Insert link to file\",INSERT_COMMAND:\"Insert Obsidian Command as a link\",INSERT_IMAGE:\"Insert image or Excalidraw drawing from your vault\",IMPORT_SVG:\"Import an SVG file as Excalidraw strokes (limited SVG support, TEXT currently not supported)\",IMPORT_SVG_CONTEXTMENU:\"Convert SVG to strokes - with limitations\",INSERT_MD:\"Insert markdown file from vault\",INSERT_PDF:\"Insert PDF file from vault\",INSERT_LAST_ACTIVE_PDF_PAGE_AS_IMAGE:\"Insert last active PDF page as image\",UNIVERSAL_ADD_FILE:\"Insert ANY file\",INSERT_CARD:\"Add back-of-note card\",CONVERT_CARD_TO_FILE:\"Move back-of-note card to File\",ERROR_TRY_AGAIN:\"Please try again.\",PASTE_CODEBLOCK:\"Paste code block\",INSERT_LATEX:\"Insert LaTeX formula (e.g. \\\\binom{n}{k} = \\\\frac{n!}{k!(n-k)!}).\",ENTER_LATEX:\"Enter a valid LaTeX expression\",READ_RELEASE_NOTES:\"Read latest release notes\",RUN_OCR:\"OCR full drawing: Grab text from freedraw + images to clipboard and doc.props\",RERUN_OCR:\"OCR full drawing re-run: Grab text from freedraw + images to clipboard and doc.props\",RUN_OCR_ELEMENTS:\"OCR selected elements: Grab text from freedraw + images to clipboard\",TRAY_MODE:\"Toggle property-panel tray-mode\",SEARCH:\"Search for text in drawing\",CROP_PAGE:\"Crop and mask selected page\",CROP_IMAGE:\"Crop and mask image\",ANNOTATE_IMAGE:\"Annotate image in Excalidraw\",INSERT_ACTIVE_PDF_PAGE_AS_IMAGE:\"Insert active PDF page as image\",RESET_IMG_TO_100:\"Set selected image element size to 100% of original\",RESET_IMG_ASPECT_RATIO:\"Reset selected image element aspect ratio\",TEMPORARY_DISABLE_AUTOSAVE:\"Disable autosave until next time Obsidian starts (only set this if you know what you are doing)\",TEMPORARY_ENABLE_AUTOSAVE:\"Enable autosave\",FONTS_LOADED:\"Excalidraw: CJK Fonts loaded\",FONTS_LOAD_ERROR:\"Excalidraw: Could not find CJK Fonts in the assets folder\\n\",SELECT_LINK_TO_OPEN:\"Select a link to open\",ERROR_CANT_READ_FILEPATH:\"Error, can't read file path. Importing file instead\",NO_SEARCH_RESULT:\"Didn't find a matching element in the drawing\",FORCE_SAVE_ABORTED:\"Force Save aborted because saving is in progress\",LINKLIST_SECOND_ORDER_LINK:\"Second Order Link\",MARKDOWN_EMBED_CUSTOMIZE_LINK_PROMPT_TITLE:\"Customize the Embedded File link\",MARKDOWN_EMBED_CUSTOMIZE_LINK_PROMPT:\"Do not add [[square brackets]] around the filename!<br>For markdown-page images follow this format when editing your link: <mark>filename#^blockref|WIDTHxMAXHEIGHT</mark><br>You can anchor Excalidraw images to 100% of their size by adding <code>|100%</code> to the end of the link.<br>You can change the PDF page by changing <code>#page=1</code> to <code>#page=2</code> etc.<br>PDF rect crop values are: <code>left, bottom, right, top</code>. Eg.: <code>#rect=0,0,500,500</code><br>\",FRAME_CLIPPING_ENABLED:\"Frame Rendering: Enabled\",FRAME_CLIPPING_DISABLED:\"Frame Rendering: Disabled\",ARROW_BINDING_INVERSE_MODE:\"Inverted Mode: Default arrow binding is now disabled. Use CTRL/CMD to temporarily enable binding when needed.\",ARROW_BINDING_NORMAL_MODE:\"Normal Mode: Arrow binding is now enabled. Use CTRL/CMD to temporarily disable binding when needed.\",EXPORT_FILENAME_PROMPT:\"Please provide filename\",EXPORT_FILENAME_PROMPT_PLACEHOLDER:\"filename, leave blank to cancel action\",WARNING_SERIOUS_ERROR:\"WARNING: Excalidraw ran into an unknown problem!\\n\\nThere is a risk that your most recent changes cannot be saved.\\n\\nTo be on the safe side...\\n1) Please select your drawing using CTRL/CMD+A and make a copy with CTRL/CMD+C.\\n2) Then create an empty drawing in a new pane by CTRL/CMD+clicking the Excalidraw ribbon button,\\n3) and paste your work to the new document with CTRL/CMD+V.\",ARIA_LABEL_TRAY_MODE:\"Tray-mode offers an alternative, more spacious canvas\",TRAY_TRAY_MODE:\"Toggle tray-mode\",TOGGLE_COMPACT_MODE:\"Toggle compact-mode\",TRAY_SCRIPT_LIBRARY:\"Script Library\",TRAY_SCRIPT_LIBRARY_ARIA:\"Explore the Excalidraw Script Library\",TRAY_EXPORT:\"Export Image...\",TRAY_EXPORT_ARIA:\"Export image as PNG, SVG, or Excalidraw file\",TRAY_SAVE:\"Save\",TRAY_SWITCH_TO_MD:\"Open as Markdown\",TRAY_SWITCH_TO_MD_ARIA:\"Switch to markdown view\",MASK_FILE_NOTICE:\"This is a mask file. It is used to crop images and mask out parts of the image. Press and hold notice to open the help video.\",INSTALL_SCRIPT_BUTTON:\"Install or update Excalidraw Scripts\",OPEN_AS_MD:\"Open as Markdown\",EXPORT_IMAGE:\"Export Image\",OPEN_LINK:\"Open selected text as link\\n(SHIFT+CLICK to open in a new pane)\",EXPORT_EXCALIDRAW:\"Export to an .Excalidraw file\",LINK_BUTTON_CLICK_NO_TEXT:\"Select an element that contains an internal or external link.\\n\",LINEAR_ELEMENT_LINK_CLICK_ERROR:\"Arrow- and Line-Element links cannot be navigated by \"+labelCTRL()+\" + CLICKing on the element because that also activates the line editor.\\nUse the right-click context menu to open the link, or click the link indicator in the top right corner of the element.\\n\",FILENAME_INVALID_CHARS:'File name cannot contain any of the following characters: * \" \\\\ < > : | ? #',FORCE_SAVE:\"Save (will also update transclusions)\",RAW:\"Change to PREVIEW mode (only affects text-elements with links or transclusions)\",PARSED:\"Change to RAW mode (only affects text-elements with links or transclusions)\",NOFILE:\"Excalidraw (no file)\",COMPATIBILITY_MODE:\"*.excalidraw file opened in compatibility mode. Convert to new format for full plugin functionality.\",CONVERT_FILE:\"Convert to new format\",BACKUP_AVAILABLE:\"We encountered an error while loading your drawing. This might have occurred if Obsidian unexpectedly closed during a save operation. For example, if you accidentally closed Obsidian on your mobile device while saving.<br><br><b>GOOD NEWS:</b> Fortunately, a local backup is available. However, please note that if you last modified this drawing on a different device (e.g., tablet) and you are now on your desktop, that other device likely has a more recent backup.<br><br>I recommend trying to open the drawing on your other device first and restore the backup from its local storage.<br><br>Would you like to load the backup?\",BACKUP_RESTORED:\"Backup restored\",BACKUP_SAVE_AS_FILE:\"This drawing is empty. A non-empty backup is available. Would you like to restore it as a new file and open it in a new tab?\",BACKUP_SAVE:\"Restore\",BACKUP_DELETE:\"Delete Backup\",BACKUP_CANCEL:\"Cancel\",CACHE_NOT_READY:\"I apologize for the inconvenience, but an error occurred while loading your file.<br><br><mark>Having a little patience can save you a lot of time...</mark><br><br>The plugin has a backup cache, but it appears that you have just started Obsidian. Initializing the Backup Cache may take some time, usually up to a minute or more depending on your device's performance. You will receive a notification in the top right corner when the cache initialization is complete.<br><br>Please press OK to attempt loading the file again and check if the cache has finished initializing. If you see a completely empty file behind this message, I recommend waiting until the backup cache is ready before proceeding. Alternatively, you can choose Cancel to manually correct your file.<br>\",OBSIDIAN_TOOLS_PANEL:\"Obsidian Tools Panel\",ERROR_SAVING_IMAGE:\"Unknown error occurred while fetching the image. It could be that for some reason the image is not available or rejected the fetch request from Obsidian\",WARNING_PASTING_ELEMENT_AS_TEXT:\"PASTING EXCALIDRAW ELEMENTS AS A TEXT ELEMENT IS NOT ALLOWED\",USE_INSERT_FILE_MODAL:\"Use 'Insert Any File' to embed a markdown note\",RECURSIVE_INSERT_ERROR:\"You may not recursively insert part of an image into the same image as it would create an infinite loop\",CONVERT_TO_MARKDOWN:\"Convert to file...\",SELECT_TEXTELEMENT_ONLY:\"Select text element only (not container)\",REMOVE_LINK:\"Remove text element link\",LASER_ON:\"Enable laser pointer\",LASER_OFF:\"Disable laser pointer\",WELCOME_RANK_NEXT:\"more drawings until the next rank!\",WELCOME_RANK_LEGENDARY:\"You're at the top. Keep on being legendary!\",WELCOME_COMMAND_PALETTE:'Type \"Excalidraw\" in the Command Palette',WELCOME_OBSIDIAN_MENU:\"Explore the Obsidian Menu in the top right\",WELCOME_SCRIPT_LIBRARY:\"Visit the Script Library\",WELCOME_HELP_MENU:\"Find help in the hamburger-menu\",WELCOME_YOUTUBE_ARIA:\"Visual PKM YouTube Channel\",WELCOME_YOUTUBE_LINK:\"Check out the Visual PKM YouTube channel.\",WELCOME_DISCORD_ARIA:\"Join the Discord Server\",WELCOME_DISCORD_LINK:\"Join the Discord Server\",WELCOME_TWITTER_ARIA:\"Follow me on Twitter\",WELCOME_TWITTER_LINK:\"Follow me on Twitter\",WELCOME_LEARN_ARIA:\"Learn Visual PKM\",WELCOME_LEARN_LINK:\"Sign up for the Visual Thinking Workshop\",WELCOME_DONATE_ARIA:\"Donate to support Excalidraw-Obsidian\",WELCOME_DONATE_LINK:'Say \"Thank You\" & support the plugin.',SAVE_IS_TAKING_LONG:\"Saving your previous file is taking a long time. Please wait...\",SAVE_IS_TAKING_VERY_LONG:\"For better performance, consider splitting large drawings into several smaller files.\",SEARCH_COPIED_TO_CLIPBOARD:\"Markdown ready on clipboard\",SEARCH_COPY_TO_CLIPBOARD_ARIA:\"Copy the entire dialog to the clipboard as Markdown. Ideal for use with tools like ChatGPT to search and understand.\",SEARCH_SHOWHIDE_ARIA:\"Show/Hide search bar\",SEARCH_NEXT:\"Next\",SEARCH_PREVIOUS:\"Previous\",NOTEBOOKLM_LINK_ARIA:\"Ask NotebookLM for help about the plugin. This model is pre-loaded with all my video transcripts, release notes and other helpful content. Chat with NotebookLM to explore my 250+ videos and the Excalidraw documentation.\",NOTEBOOKLM_LINK_TEXT:\"Learn the Plugin. Access the NotebookLM knowledgebase.\",LINKS_BUGS_ARIA:\"Report bugs and raise feature requsts on the plugin's GitHub page\",LINKS_BUGS:\"Report Bugs\",LINKS_YT_ARIA:\"Check out my YouTube channel to learn about Visual Thinking and Excalidraw\",LINKS_YT:\"Learn on YouTube\",LINKS_DISCORD_ARIA:\"Join the Visual Thinking Workshop Discord Server\",LINKS_DISCORD:\"Join the Community\",LINKS_TWITTER:\"Follow me\",LINKS_VTW_ARIA:\"Learn about Visual PKM, Excalidraw, Obsidian, ExcaliBrain and more\",LINKS_VTW:\"Join a Workshop\",LINKS_BOOK_ARIA:\"Read Sketch Your Mind, my book on Visual Thinking\",LINKS_BOOK:\"Read the Book\",LINKS_WIKI:\"Plugin Wiki\",LINKS_WIKI_ARIA:\"Explore the Excalidraw Plugin Wiki\",RELEASE_NOTES_NAME:\"Display Release Notes after update\",RELEASE_NOTES_DESC:\"<b><u>Toggle ON:</u></b> Display release notes each time you update Excalidraw to a newer version.<br><b><u>Toggle OFF:</u></b> Silent mode. You can still read release notes on <a href='https://github.com/zsviczian/obsidian-excalidraw-plugin/releases'>GitHub</a>.\",WARN_ON_MANIFEST_MISMATCH_NAME:\"Warn about incomplete plugin updates\",WARN_ON_MANIFEST_MISMATCH_DESC:\"Checks that the installed Excalidraw executable matches the version shown in Obsidian's plugin list. If they don't match (often after partial sync), you'll see a warning and can update. Disable to stop checking.\",NEWVERSION_NOTIFICATION_NAME:\"Plugin update notification\",NEWVERSION_NOTIFICATION_DESC:\"<b><u>Toggle ON:</u></b> Show a notification when a new version of the plugin is available.<br><b><u>Toggle OFF:</u></b> Silent mode. You need to check for plugin updates in Community Plugins.\",BASIC_HEAD:\"Basic\",BASIC_DESC:'In the \"Basic\" settings, you can configure options such as displaying release notes after updates, receiving plugin update notifications, setting the default location for new drawings, specifying the Excalidraw folder for embedding drawings into active documents, defining an Excalidraw template file, and designating an Excalidraw Automate script folder for managing automation scripts.',FOLDER_NAME:\"Excalidraw folder (CAsE sEnsITive!)\",FOLDER_DESC:\"Default location for new drawings. If empty, drawings will be created in the Vault root.\",CROP_SUFFIX_NAME:\"Crop file suffix\",CROP_SUFFIX_DESC:\"The last part of the filename for new drawings created when cropping an image. Leave empty if you don't need a suffix.\",CROP_PREFIX_NAME:\"Crop file prefix\",CROP_PREFIX_DESC:\"The first part of the filename for new drawings created when cropping an image. Leave empty if you don't need a prefix.\",ANNOTATE_SUFFIX_NAME:\"Annotation file suffix\",ANNOTATE_SUFFIX_DESC:\"The last part of the filename for new drawings created when annotating an image. Leave empty if you don't need a suffix.\",ANNOTATE_PREFIX_NAME:\"Annotation file prefix\",ANNOTATE_PREFIX_DESC:\"The first part of the filename for new drawings created when annotating an image. Leave empty if you don't need a prefix.\",ANNOTATE_PRESERVE_SIZE_NAME:\"Preserve image size when annotating\",ANNOTATE_PRESERVE_SIZE_DESC:\"When annotating an image in markdown the replacement image link will include the width of the original image.\",CROP_FOLDER_NAME:\"Crop file folder (CaSE senSItive!)\",CROP_FOLDER_DESC:\"Default location for new drawings created when cropping an image. If empty, drawings will be created following the Vault attachments settings.\",ANNOTATE_FOLDER_NAME:\"Image annotation file folder (CaSe SeNSitIVe!)\",ANNOTATE_FOLDER_DESC:\"Default location for new drawings created when annotating an image. If empty, drawings will be created following the Vault attachments settings.\",FOLDER_EMBED_NAME:\"Use Excalidraw folder when embedding a drawing into the active document\",FOLDER_EMBED_DESC:\"Define which folder to place the newly inserted drawing into when using the command palette action: 'Create a new drawing and embed into active document'.<br><b><u>Toggle ON:</u></b> Use Excalidraw folder<br><b><u>Toggle OFF:</u></b> Use the attachments folder defined in Obsidian settings.\",TEMPLATE_NAME:\"Excalidraw template file or folder (caSe SenSiTive!)\",TEMPLATE_DESC:\"Full filepath or folderpath to the Excalidraw template.<br><b>Template File:</b>E.g.: If your template is in the default Excalidraw folder and its name is Template.md, the setting would be: Excalidraw/Template.md (or just Excalidraw/Template - you may omit the .md file extension). If you are using Excalidraw in compatibility mode, then your template must be a legacy Excalidraw file as well such as Excalidraw/Template.excalidraw. <br><b>Template Folder:</b> You can also set a folder as your template. In this case you will be prompted which template to use when creating a new drawing.<br><b>Pro Tip:</b> If you are using the Obsidian Templater plugin, you can add Templater code to your different Excalidraw templates to automate configuration of your drawings.\",SCRIPT_FOLDER_NAME:\"Excalidraw Automate script folder (CASE SeNSitiVE!)\",SCRIPT_FOLDER_DESC:\"The files you place in this folder will be treated as Excalidraw Automate scripts. You can access your scripts from Excalidraw via the Obsidian Command Palette. Assign hotkeys to your favorite scripts just like to any other Obsidian command. The folder may not be the root folder of your Vault. \",AI_HEAD:\"AI Settings - Experimental\",AI_DESC:'In the \"AI\" settings, you can configure options for using OpenAI\\'s GPT API. While the OpenAI API is in beta, its use is strictly limited \u2014 as such we require you use your own API key. You can create an OpenAI account, add a small credit (5 USD minimum), and generate your own API key. Once API key is set, you can use the AI tools in Excalidraw.',AI_ENABLED_NAME:\"Enable AI features\",AI_ENABLED_DESC:\"You need to reopen Excalidraw for the changes to take effect.\",AI_OPENAI_TOKEN_NAME:\"OpenAI API key\",AI_OPENAI_TOKEN_DESC:\"You can get your OpenAI API key from your <a href='https://platform.openai.com/api-keys'>OpenAI account</a>.\",AI_OPENAI_TOKEN_PLACEHOLDER:\"Enter your OpenAI API key here\",AI_OPENAI_DEFAULT_MODEL_NAME:\"Default AI model\",AI_OPENAI_DEFAULT_MODEL_DESC:\"The default AI model to use when generating text. This is a freetext field, so you can enter any valid OpenAI model name. Find out more about the available models on the <a href='https://platform.openai.com/docs/models'>OpenAI website</a>.\",AI_OPENAI_DEFAULT_MODEL_PLACEHOLDER:\"Enter your default AI model here. e.g.: gpt-3.5-turbo-1106\",AI_OPENAI_DEFAULT_IMAGE_MODEL_NAME:\"Default Image Generation AI model\",AI_OPENAI_DEFAULT_IMAGE_MODEL_DESC:\"The default AI model to use when generating images. Image editing and variations are only supported by dall-e-2 at this time by OpenAI, for this reason dall-e-2 will automatically be used in such cases regardless of this setting.<br>This is a freetext field, so you can enter any valid OpenAI model name. Find out more about the available models on the <a href='https://platform.openai.com/docs/models'>OpenAI website</a>.\",AI_OPENAI_DEFAULT_IMAGE_MODEL_PLACEHOLDER:\"Enter your default Image Generation AI model here e.g.: dall-e-3\",AI_OPENAI_DEFAULT_VISION_MODEL_NAME:\"Default AI vision model\",AI_OPENAI_DEFAULT_VISION_MODEL_DESC:\"The default AI vision model to use when generating text from images. This is a freetext field, so you can enter any valid OpenAI model name. Find out more about the available models on the <a href='https://platform.openai.com/docs/models'>OpenAI website</a>.\",AI_OPENAI_DEFAULT_API_URL_NAME:\"OpenAI API URL\",AI_OPENAI_DEFAULT_API_URL_DESC:\"The default OpenAI API URL. This is a freetext field, so you can enter any valid OpenAI API compatible URL. Excalidraw will use this URL when posting API requests to OpenAI. I am not doing any error handling on this field, so make sure you enter a valid URL and only change this if you know what you are doing. \",AI_OPENAI_DEFAULT_IMAGE_API_URL_NAME:\"OpenAI Image Generation API URL\",AI_OPENAI_DEFAULT_VISION_MODEL_PLACEHOLDER:\"Enter your default AI vision model here. e.g.: gpt-4o\",SAVING_HEAD:\"Saving\",SAVING_DESC:\"In the 'Saving' section of Excalidraw Settings, you can configure how your drawings are saved. This includes options for compressing Excalidraw JSON in Markdown, setting autosave intervals for both desktop and mobile, defining filename formats, and choosing whether to use the .excalidraw.md or .md file extension. \",COMPRESS_NAME:\"Compress Excalidraw JSON in Markdown\",COMPRESS_DESC:\"By enabling this feature Excalidraw will store the drawing JSON in a Base64 compressed format using the <a href='https://pieroxy.net/blog/pages/lz-string/index.html'>LZ-String</a> algorithm. This will reduce the chance of Excalidraw JSON cluttering your search results in Obsidian. As a side effect, this will also reduce the filesize of Excalidraw drawings. When you switch an Excalidraw drawing to Markdown view, using the options menu in Excalidraw, the file will be saved without compression, so that you can read and edit the JSON string. The drawing will be compressed again once you switch back to Excalidraw view. The setting only has effect 'point forward', meaning, existing drawings will not be affected by the setting until you open them and save them.<br><b><u>Toggle ON:</u></b> Compress drawing JSON<br><b><u>Toggle OFF:</u></b> Leave drawing JSON uncompressed\",DECOMPRESS_FOR_MD_NAME:\"Decompress Excalidraw JSON in Markdown View\",DECOMPRESS_FOR_MD_DESC:\"By enabling this feature Excalidraw will automatically decompress the drawing JSON when you switch to Markdown view. This will allow you to easily read and edit the JSON string. The drawing will be compressed again once you switch back to Excalidraw view and save the drawing (CTRL+S).<br>I recommend switching this feature off as it will result in smaller file sizes and avoiding unnecessary results in Obsidian search. You can always use the 'Excalidraw: Decompress current Excalidraw file' command from the command palette to manually decompress the drawing JSON when you need to read or edit it.\",AUTOSAVE_INTERVAL_DESKTOP_NAME:\"Interval for autosave on Desktop\",AUTOSAVE_INTERVAL_DESKTOP_DESC:\"The time interval between saves. Autosave will skip if there are no changes in the drawing. Excalidraw will also save the file when closing a workspace tab or navigating within Obsidian, but away from the active Excalidraw tab (i.e. clicking on the Obsidian ribbon or checking backlinks, etc.). Excalidraw will not be able to save your work when terminating Obsidian directly either by killing the Obsidian process, or clicking to close Obsidian altogether.\",AUTOSAVE_INTERVAL_MOBILE_NAME:\"Interval for autosave on Mobile\",AUTOSAVE_INTERVAL_MOBILE_DESC:\"I recommend a more frequent interval for Mobiles. Excalidraw will also save the file when closing a workspace tab or navigating within Obsidian, but away from the active Excalidraw tab (i.e. tapping on the Obsidian ribbon or checking backlinks, etc.). Excalidraw will not be able to save your work when terminating Obsidian directly (i.e. swiping it away). Also note, that when you switch apps on a Mobile device, sometimes Android and iOS closes Obsidian in the background to save system resources. In such a case Excalidraw will not be able to save the latest changes.\",FILENAME_HEAD:\"Filename\",FILENAME_DESC:\"<p>Click this link for the <a href='https://momentjs.com/docs/#/displaying/format/'>date and time format reference</a>.</p>\",FILENAME_SAMPLE:\"Filename for a new drawing is: \",FILENAME_EMBED_SAMPLE:\"Filename for a new embedded drawing is: \",FILENAME_PREFIX_NAME:\"Filename prefix\",FILENAME_PREFIX_DESC:\"The first part of the filename\",FILENAME_PREFIX_EMBED_NAME:\"Filename prefix when embedding a new drawing into a markdown note\",FILENAME_PREFIX_EMBED_DESC:\"Should the filename of the newly inserted drawing start with the name of the active markdown note when using the command palette action: <code>Create a new drawing and embed into active document</code>?<br><b><u>Toggle ON:</u></b> Yes, the filename of a new drawing should start with filename of the active document<br><b><u>Toggle OFF:</u></b> No, filename of a new drawing should not include the filename of the active document\",FILENAME_POSTFIX_NAME:\"Custom text after markdown Note's name when embedding\",FILENAME_POSTFIX_DESC:\"Affects filename only when embedding into a markdown document. This text will be inserted after the note's name, but before the date.\",FILENAME_DATE_NAME:\"Filename Date\",FILENAME_DATE_DESC:\"The last part of the filename. Leave empty if you do not want a date.\",FILENAME_EXCALIDRAW_EXTENSION_NAME:\".excalidraw.md or .md\",FILENAME_EXCALIDRAW_EXTENSION_DESC:\"This setting does not apply if you use Excalidraw in compatibility mode, i.e. you are not using Excalidraw markdown files.<br><b><u>Toggle ON:</u></b> filename ends with .excalidraw.md<br><b><u>Toggle OFF:</u></b> filename ends with .md\",DISPLAY_HEAD:\"Excalidraw appearance and behavior\",DISPLAY_DESC:\"In the 'appearance and behavior' section of Excalidraw Settings, you can fine-tune how Excalidraw appears and behaves. This includes options for dynamic styling, left-handed mode, matching Excalidraw and Obsidian themes, default modes, and more.\",OVERRIDE_OBSIDIAN_FONT_SIZE_NAME:\"Limit Obsidian Font Size to Editor Text\",OVERRIDE_OBSIDIAN_FONT_SIZE_DESC:\"Obsidian's custom font size setting affects the entire interface, including Excalidraw and themes that depend on the default font size. Enabling this option restricts font size changes to editor text, which will improve the look of Excalidraw. If parts of the UI look incorrect after enabling, try turning this setting off.\",DYNAMICSTYLE_NAME:\"Dynamic styling\",DYNAMICSTYLE_DESC:\"Change Excalidraw UI colors to match the canvas color\",LEFTHANDED_MODE_NAME:\"Left-handed mode\",LEFTHANDED_MODE_DESC:\"Currently only has effect in tray-mode. If turned on, the tray will be on the right side.<br><b><u>Toggle ON:</u></b> Left-handed mode.<br><b><u>Toggle OFF:</u></b> Right-handed mode.\",IFRAME_MATCH_THEME_NAME:\"Markdown embeds to match Excalidraw theme\",IFRAME_MATCH_THEME_DESC:\"<b><u>Toggle ON:</u></b> Set this to true if for example you are using Obsidian in dark-mode but use excalidraw with a light background. With this setting the embedded Obsidian markdown document will match the Excalidraw theme (i.e. light colors if Excalidraw is in light mode).<br><b><u>Toggle OFF:</u></b> Set this to false if you want the embedded Obsidian markdown document to match the Obsidian theme (i.e. dark colors if Obsidian is in dark mode).\",MATCH_THEME_NAME:\"New drawing to match Obsidian theme\",MATCH_THEME_DESC:\"If theme is dark, new drawing will be created in dark mode. This does not apply when you use a template for new drawings. Also this will not affect when you open an existing drawing. Those will follow the theme of the template/drawing respectively.<br><b><u>Toggle ON:</u></b> Follow Obsidian Theme<br><b><u>Toggle OFF:</u></b> Follow theme defined in your template\",MATCH_THEME_ALWAYS_NAME:\"Existing drawings to match Obsidian theme\",MATCH_THEME_ALWAYS_DESC:\"If theme is dark, drawings will be opened in dark mode. If your theme is light, they will be opened in light mode. <br><b><u>Toggle ON:</u></b> Match Obsidian theme<br><b><u>Toggle OFF:</u></b> Open with the same theme as last saved\",MATCH_THEME_TRIGGER_NAME:\"Excalidraw to follow when Obsidian Theme changes\",MATCH_THEME_TRIGGER_DESC:\"If this option is enabled open Excalidraw pane will switch to light/dark mode when Obsidian theme changes. <br><b><u>Toggle ON:</u></b> Follow theme changes<br><b><u>Toggle OFF:</u></b> Drawings are not affected by Obsidian theme changes\",DEFAULT_OPEN_MODE_NAME:\"Default mode when opening Excalidraw\",DEFAULT_OPEN_MODE_DESC:\"Specifies the mode how Excalidraw opens: Normal, Zen, or View mode. You may also set this behavior on a file level by adding the excalidraw-default-mode frontmatter key with a value of: normal, view, or zen to your document.\",DEFAULT_PEN_MODE_NAME:\"Pen mode\",DEFAULT_PEN_MODE_DESC:\"Should pen mode be automatically enabled when opening Excalidraw?\",ENABLE_DOUBLE_CLICK_TEXT_EDITING_NAME:\"Enable double-click text create\",DISABLE_DOUBLE_TAP_ERASER_NAME:\"Enable double-tap eraser in pen mode\",DISABLE_SINGLE_FINGER_PANNING_NAME:\"Enable single-finger panning in pen mode\",SHOW_PEN_MODE_FREEDRAW_CROSSHAIR_NAME:\"Show (+) crosshair in pen mode\",SHOW_PEN_MODE_FREEDRAW_CROSSHAIR_DESC:\"Show crosshair in pen mode when using the freedraw tool. <b><u>Toggle ON:</u></b> SHOW <b><u>Toggle OFF:</u></b> HIDE<br>The effect depends on the device. Crosshair is typically visible on drawing tablets, MS Surface, but not on iOS.\",SHOW_DRAWING_OR_MD_IN_HOVER_PREVIEW_NAME:\"Render Excalidraw file as an image in hover preview...\",SHOW_DRAWING_OR_MD_IN_HOVER_PREVIEW_DESC:\"...even if the file has the <b>excalidraw-open-md: true</b> frontmatter key.<br>When this setting is off and the file is set to open in md by default, the hover preview will show the markdown side of the document.<br>Note: <b>excalidraw-open-md</b> is different from <b>excalidraw-embed-md</b>. If <b>excalidraw-embed-md</b> is set to true, the hover preview will always show the markdown side, regardless of this setting. To force image rendering when embedding, use <code>![[drawing#^as-image]]</code> in your markdown file.\",SHOW_DRAWING_OR_MD_IN_READING_MODE_NAME:\"Render as image when in markdown reading mode of an Excalidraw file\",SHOW_DRAWING_OR_MD_IN_READING_MODE_DESC:\"When you are in markdown reading mode (aka. reading the back side of the drawing) should the Excalidraw drawing be rendered as an image? This setting will not affect the display of the drawing when you are in Excalidraw mode or when you embed the drawing into a markdown document or when rendering hover preview.<br><ul><li>See other related setting for <a href='#\"+TAG_PDFEXPORT+\"'>PDF Export</a> under 'Embedding and Exporting' further below.</li></ul><br>You must close the active excalidraw/markdown file and reopen it for this change to take effect.\",SHOW_DRAWING_OR_MD_IN_EXPORTPDF_NAME:\"Render Excalidraw as Image in Obsidian PDF Export\",SHOW_DRAWING_OR_MD_IN_EXPORTPDF_DESC:\"This setting controls how Excalidraw files are exported to PDF using Obsidian's built-in <b>Export to PDF</b> feature.<br><ul><li><b>Enabled:</b> The PDF will include the Excalidraw drawing as an image.</li><li><b>Disabled:</b> The PDF will include the markdown content as text.</li></ul>Note: This setting does not affect the PDF export feature within Excalidraw itself.<br>See the other related setting for <a href='#\"+TAG_MDREADINGMODE+\"'>Markdown Reading Mode</a> under 'Appearance and Behavior' further above.<br>\u26a0\ufe0f You must close and reopen the Excalidraw/markdown file for changes to take effect. \u26a0\ufe0f\",MODES_HEAD:\"Modes\",TRAY_MODE_NAME:\"Enable tray-mode\",COMPACT_MODE_NAME:\"Compact-mode on Tablets\",COMPACT_MODE_DESC:\"Overrides tray-mode on tablets, allowing the native Excalidraw compact-mode to be used instead.\",HOTKEY_OVERRIDE_HEAD:\"Hotkey overrides\",HOTKEY_OVERRIDE_DESC:`Some of the Excalidraw hotkeys such as <code>${labelCTRL()}+Enter</code> to edit text or <code>${labelCTRL()}+K</code> to create an element link conflict with Obsidian hotkey settings. The hotkey combinations you add below will override Obsidian's hotkey settings while using Excalidraw, thus you can add <code>${labelCTRL()}+G</code> if you want to default to Group Object in Excalidraw instead of opening Graph View.`,THEME_HEAD:\"Theme and styling\",ZOOM_AND_PAN_HEAD:\"Zoom and Pan\",PAN_WITH_RIGHT_MOUSE_BUTTON_NAME:\"Right-click drag to pan\",PAN_WITH_RIGHT_MOUSE_BUTTON_DESC:\"Right-click and drag to pan the canvas (Miro-style). Press 'm' to open the context menu.\",DEFAULT_PINCHZOOM_NAME:\"Allow pinch zoom in pen mode\",DEFAULT_PINCHZOOM_DESC:\"Pinch zoom in pen mode when using the freedraw tool is disabled by default to prevent unwanted accidental zooming with your palm.<br><b><u>Toggle ON:</u></b> Enable pinch zoom in pen mode<br><b><u>Toggle OFF:</u></b>Disable pinch zoom in pen mode\",DEFAULT_WHEELZOOM_NAME:\"Mouse wheel to zoom by default\",DEFAULT_WHEELZOOM_DESC:`<b><u>Toggle ON:</u></b> Mouse wheel to zoom; ${labelCTRL()} + mouse wheel to scroll</br><b><u>Toggle OFF:</u></b>${labelCTRL()} + mouse wheel to zoom; Mouse wheel to scroll`,ZOOM_TO_FIT_NAME:\"Zoom to fit on view resize\",ZOOM_TO_FIT_DESC:\"Zoom to fit drawing when the pane is resized<br><b><u>Toggle ON:</u></b> Zoom to fit<br><b><u>Toggle OFF:</u></b> Auto zoom disabled\",ZOOM_TO_FIT_ONOPEN_NAME:\"Zoom to fit on file open\",ZOOM_TO_FIT_ONOPEN_DESC:\"Zoom to fit drawing when the drawing is first opened<br><b><u>Toggle ON:</u></b> Zoom to fit<br><b><u>Toggle OFF:</u></b> Auto zoom disabled\",ZOOM_TO_FIT_MAX_LEVEL_NAME:\"Zoom to fit max ZOOM level\",ZOOM_TO_FIT_MAX_LEVEL_DESC:\"Set the maximum level to which zoom to fit will enlarge the drawing. Minimum is 0.5 (50%) and maximum is 10 (1000%).\",ZOOM_STEP_NAME:\"Zoom increment\",ZOOM_STEP_DESC:\"Zoom increment (in percentage points) for actions like mouse wheel zoom. Smaller values give finer control but may require excessive scrolling. Default: 5%.\",ZOOM_MIN_NAME:\"Minimum zoom\",ZOOM_MIN_DESC:\"How far you can zoom out (fit more of the drawing on screen). Default: 10%. Values below 10% were historically unstable\u2014lower with caution and reset to 10% if issues occur.\",ZOOM_MAX_NAME:\"Maximum zoom\",ZOOM_MAX_DESC:\"Upper zoom limit. Default: 3000%. Usually no need to change; included for completeness.\",PEN_HEAD:\"Pen\",GRID_HEAD:\"Grid\",GRID_DYNAMIC_COLOR_NAME:\"Dynamic grid color\",GRID_DYNAMIC_COLOR_DESC:\"<b><u>Toggle ON:</u></b>Change grid color to match the canvas color<br><b><u>Toggle OFF:</u></b>Use the color below as the grid color\",GRID_COLOR_NAME:\"Grid color\",GRID_OPACITY_NAME:\"Grid opacity\",GRID_OPACITY_DESC:\"Grid opacity will also control the opacity of the binding box when binding an arrow to an element.<br>Set the opacity of the grid. 0 is transparent, 100 is opaque.\",GRID_DIRECTION_NAME:\"Grid direction\",GRID_DIRECTION_DESC:\"The first toggle shows/hides the horizontal grid, the second toggle shows/hides the vertical grid.\",GRID_HORIZONTAL:\"Render horizontal grid\",GRID_VERTICAL:\"Render vertical grid\",LASER_HEAD:\"Laser pointer\",LASER_COLOR:\"Laser pointer color\",LASER_DECAY_TIME_NAME:\"Laser pointer decay time\",LASER_DECAY_TIME_DESC:\"Laser pointer decay time in milliseconds. Default is 1000 (i.e. 1 second).\",LASER_DECAY_LENGTH_NAME:\"Laser pointer decay length.\",LASER_DECAY_LENGTH_DESC:\"Laser pointer decay length in line points. Default is 50.\",LINKS_HEAD:\"Links, transclusion and TODOs\",LINKS_HEAD_DESC:\"In the 'Links, transclusion and TODOs' section of Excalidraw Settings, you can configure how Excalidraw handles links, transclusions, and TODO items. This includes options for opening links, managing panes, displaying links with brackets, customizing link prefixes, handling TODO items, and more. \",LINKS_DESC:`${labelCTRL()}+CLICK on <code>[[Text Elements]]</code> to open them as links. If the selected text has more than one <code>[[valid Obsidian links]]</code>, only the first will be opened. If the text starts as a valid web link (i.e. <code>https://</code> or <code>http://</code>), then the plugin will open it in a browser. When Obsidian files change, the matching <code>[[link]]</code> in your drawings will also change. If you don't want text accidentally changing in your drawings use <code>[[links|with aliases]]</code>.`,DRAG_MODIFIER_NAME:\"Link Click and Drag&Drop Modifier Keys\",DRAG_MODIFIER_DESC:\"Modifier key behavior when clicking links and dragging and dropping elements. Excalidraw will not validate your configuration... pay attention to avoid conflicting settings. These settings are different for Apple and non-Apple. If you use Obsidian on multiple platforms, you'll need to make the settings separately. The toggles follow the order of \"+(DEVICE.isIOS||DEVICE.isMacOS?\"SHIFT, CMD, OPT, CONTROL.\":\"SHIFT, CTRL, ALT, META (Windows key).\"),LONG_PRESS_DESKTOP_NAME:\"Long press to open desktop\",LONG_PRESS_DESKTOP_DESC:\"Long press delay in milliseconds to open an Excalidraw Drawing embedded in a Markdown file. \",LONG_PRESS_MOBILE_NAME:\"Long press to open mobile\",LONG_PRESS_MOBILE_DESC:\"Long press delay in milliseconds to open an Excalidraw Drawing embedded in a Markdown file. \",DOUBLE_CLICK_LINK_OPEN_VIEW_MODE:\"Allow double-click to open links in view mode\",FOCUS_ON_EXISTING_TAB_NAME:\"Focus on Existing Tab\",FOCUS_ON_EXISTING_TAB_DESC:\"When opening a link, Excalidraw will focus on the existing tab if the file is already open. Enabling this setting overrides 'Reuse Adjacent Pane' when the file is already open except for the 'Open the back-of-the-note of the selected excalidraw image' command palette action.\",SECOND_ORDER_LINKS_NAME:\"Show second-order links\",SECOND_ORDER_LINKS_DESC:\"Show links when clicking on a link in Excalidraw. Second-order link are backlinks pointing to the link being clicked. When using image icons to connect similar notes, second order links allow you to get to related notes in one click instead of two. See <a href='https://youtube.com/shorts/O_1ls9c6wBY?feature=share'>YT Short</a> to understand.\",ADJACENT_PANE_NAME:\"Reuse adjacent pane\",ADJACENT_PANE_DESC:`When ${labelCTRL()}+${labelALT()} clicking a link in Excalidraw, by default the plugin will open the link in a new pane. Turning this setting on, Excalidraw will first look for an existing pane, and try to open the link there. Excalidraw will look for the other workspace pane based on your focus/navigation history, i.e. the workpane that was active before you activated Excalidraw.`,MAINWORKSPACE_PANE_NAME:\"Open in main workspace\",MAINWORKSPACE_PANE_DESC:`When ${labelCTRL()}+${labelALT()} clicking a link in Excalidraw, by default the plugin will open the link in a new pane in the current active window. Turning this setting on, Excalidraw will open the link in an existing or new pane in the main workspace. `,LINK_BRACKETS_NAME:\"Show <code>[[brackets]]</code> around links\",LINK_BRACKETS_DESC:`In PREVIEW mode, when parsing Text Elements, place brackets around links. You can override this setting for a specific drawing by adding <code>${FRONTMATTER_KEYS[\"link-brackets\"].name}: true/false</code> to the file's frontmatter.`,LINK_PREFIX_NAME:\"Link prefix\",LINK_PREFIX_DESC:`In PREVIEW mode, if the Text Element contains a link, precede the text with these characters. You can override this setting for a specific drawing by adding <code>${FRONTMATTER_KEYS[\"link-prefix\"].name}: \"\ud83d\udccd \"</code> to the file's frontmatter.`,URL_PREFIX_NAME:\"URL prefix\",URL_PREFIX_DESC:`In PREVIEW mode, if the Text Element contains a URL link, precede the text with these characters. You can override this setting for a specific drawing by adding <code>${FRONTMATTER_KEYS[\"url-prefix\"].name}: \"\ud83c\udf10 \"</code> to the file's frontmatter.`,PARSE_TODO_NAME:\"Parse todo\",PARSE_TODO_DESC:\"Convert '- [ ] ' and '- [x] ' to checkbox and tick in the box.\",TODO_NAME:\"Open TODO icon\",TODO_DESC:\"Icon to use for open TODO items\",DONE_NAME:\"Completed TODO icon\",DONE_DESC:\"Icon to use for completed TODO items\",HOVERPREVIEW_NAME:`Hover preview without pressing the ${labelCTRL()} key`,HOVERPREVIEW_DESC:`<b><u>Toggle ON:</u></b> In Exalidraw <u>view mode</u> the hover preview for [[wiki links]] will be shown immediately, without the need to hold the ${labelCTRL()} key. In Excalidraw <u>normal mode</u>, the preview will be shown immediately only when hovering the blue link icon in the top right of the element.<br> <b><u>Toggle OFF:</u></b> Hover preview is shown only when you hold the ${labelCTRL()} key while hovering the link.`,LINKOPACITY_NAME:\"Opacity of link icon\",LINKOPACITY_DESC:\"Opacity of the link indicator icon in the top right corner of an element. 1 is opaque, 0 is transparent.\",LINK_CTRL_CLICK_NAME:`${labelCTRL()}+CLICK on text with [[links]] or [](links) to open them`,LINK_CTRL_CLICK_DESC:`You can turn this feature off if it interferes with default Excalidraw features you want to use. If this is turned off, you can either use ${labelCTRL()} + ${labelMETA()} or the link indicator in the top right of the element to open links.`,TRANSCLUSION_WRAP_NAME:\"Overflow wrap behavior of transcluded text\",TRANSCLUSION_WRAP_DESC:\"Number specifies the character count where the text should be wrapped. Set the text wrapping behavior of transcluded text. Turn this ON to force-wrap text (i.e. no overflow), or OFF to soft-wrap text (at the nearest whitespace).\",TRANSCLUSION_DEFAULT_WRAP_NAME:\"Transclusion word wrap default\",TRANSCLUSION_DEFAULT_WRAP_DESC:\"You can manually set/override word wrapping length using the `![[page#^block]]{NUMBER}` format. Normally you will not want to set a default, because if you transclude text inside a sticky note, then Excalidraw will automatically take care of word wrapping. Set this value to `0` if you do not want to set a default. \",PAGE_TRANSCLUSION_CHARCOUNT_NAME:\"Page transclusion max char count\",PAGE_TRANSCLUSION_CHARCOUNT_DESC:\"The maximum number of characters to display from the page when transcluding an entire page with the ![[markdown page]] format.\",QUOTE_TRANSCLUSION_REMOVE_NAME:\"Quote translusion: remove leading '> ' from each line\",QUOTE_TRANSCLUSION_REMOVE_DESC:\"Remove the leading '> ' from each line of the transclusion. This will improve readability of quotes in text only transclusions<br><b><u>Toggle ON:</u></b> Remove leading '> '<br><b><u>Toggle OFF:</u></b> Do not remove leading '> ' (note it will still be removed from the first row due to Obsidian API functionality)\",GET_URL_TITLE_NAME:\"Use iframely to resolve page title\",GET_URL_TITLE_DESC:\"Use the <code>http://iframely.server.crestify.com/iframely?url=</code> to get title of page when dropping a link into Excalidraw\",PDF_TO_IMAGE:\"PDF to Image\",PDF_TO_IMAGE_SCALE_NAME:\"PDF to Image conversion scale\",PDF_TO_IMAGE_SCALE_DESC:\"Sets the resolution of the image that is generated from the PDF page. Higher resolution will result in bigger images in memory and consequently a higher load on your system (slower performance), but sharper image. Additionally, if you want to copy PDF pages (as images) to Excalidraw.com, the bigger image size may result in exceeding the 2MB limit on Excalidraw.com.\",EMBED_TOEXCALIDRAW_HEAD:\"Embed files into Excalidraw\",EMBED_TOEXCALIDRAW_DESC:\"In the Embed Files section of Excalidraw Settings, you can configure how various files are embedded into Excalidraw. This includes options for embedding interactive markdown files, PDFs, and markdown files as images.\",MD_HEAD:\"Embed markdown into Excalidraw as image\",MD_EMBED_CUSTOMDATA_HEAD_NAME:\"Interactive Markdown Files\",MD_EMBED_CUSTOMDATA_HEAD_DESC:'The below settings will only effect future embeds. Current embeds remain unchanged. The theme setting of embedded frames is under the \"Excalidraw appearance and behavior\" section.',MD_EMBED_SINGLECLICK_EDIT_NAME:\"Single click to edit embedded markdown\",MD_EMBED_SINGLECLICK_EDIT_DESC:\"Single click on an embedded markdown file to edit it. When turned off, the markdown file will first open in preview mode, then switch to edit mode when you click on it again.\",MD_TRANSCLUDE_WIDTH_NAME:\"Default width of a transcluded markdown document\",MD_TRANSCLUDE_WIDTH_DESC:\"The width of the markdown page. This affects the word wrapping when transcluding longer paragraphs, and the width of the image element. You can override the default width of an embedded file using the <code>[[filename#heading|WIDTHxMAXHEIGHT]]</code> syntax in markdown view mode under embedded files.\",MD_TRANSCLUDE_HEIGHT_NAME:\"Default maximum height of a transcluded markdown document\",MD_TRANSCLUDE_HEIGHT_DESC:\"The embedded image will be as high as the markdown text requires, but not higher than this value. You can override this value by editing the embedded image link in markdown view mode with the following syntax <code>[[filename#^blockref|WIDTHxMAXHEIGHT]]</code>.\",MD_DEFAULT_FONT_NAME:\"The default font typeface to use for embedded markdown files.\",MD_DEFAULT_FONT_DESC:'Set this value to \"Virgil\" or \"Cascadia\" or the filename of a valid <code>.ttf</code>, <code>.woff</code>, or <code>.woff2</code> font e.g. <code>MyFont.woff2</code> You can override this setting by adding the following frontmatter-key to the embedded markdown file: <code>excalidraw-font: font_or_filename</code>',MD_DEFAULT_COLOR_NAME:\"The default font color to use for embedded markdown files.\",MD_DEFAULT_COLOR_DESC:'Set this to any valid css color name e.g. \"steelblue\" (<a href=\"https://www.w3schools.com/colors/colors_names.asp\">color names</a>), or a valid hexadecimal color e.g. \"#e67700\", or any other valid css color string. You can override this setting by adding the following frontmatter-key to the embedded markdown file: <code>excalidraw-font-color: steelblue</code>',MD_DEFAULT_BORDER_COLOR_NAME:\"The default border color to use for embedded markdown files.\",MD_DEFAULT_BORDER_COLOR_DESC:'Set this to any valid css color name e.g. \"steelblue\" (<a href=\"https://www.w3schools.com/colors/colors_names.asp\">color names</a>), or a valid hexadecimal color e.g. \"#e67700\", or any other valid css color string. You can override this setting by adding the following frontmatter-key to the embedded markdown file: <code>excalidraw-border-color: gray</code>. Leave empty if you don\\'t want a border. ',MD_CSS_NAME:\"CSS file\",MD_CSS_DESC:`The filename of the CSS to apply to markdown embeds. Provide the filename with extension (e.g. 'md-embed.css'). The css file may also be a plain markdown file (e.g. 'md-embed-css.md'), just make sure the content is written using valid css syntax. If you need to look at the HTML code you are applying the CSS to, then open Obsidian Developer Console (${DEVICE.isIOS||DEVICE.isMacOS?\"CMD+OPT+i\":\"CTRL+SHIFT+i\"}) and type in the following command: \"ExcalidrawAutomate.mostRecentMarkdownSVG\". This will display the most recent SVG generated by Excalidraw. Setting the font-family in the css is has limitations. By default only your operating system's standard fonts are available (see README for details). You can add one custom font beyond that using the setting above. You can override this css setting by adding the following frontmatter-key to the embedded markdown file: \"excalidraw-css: css_file_in_vault|css-snippet\".`,EMBED_HEAD:\"Embedding Excalidraw into your Notes and Exporting\",EMBED_DESC:'In the \"Embed & Export\" settings, you can configure how images and Excalidraw drawings are embedded and exported within your documents. Key settings include choosing the image type for markdown preview (such as Native SVG or PNG), specifying the type of file to insert into the document (original Excalidraw, PNG, or SVG), and managing image caching for embedding in markdown. You can also control image sizing, whether to embed drawings using wiki links or markdown links, and adjust settings related to image themes, background colors, and Obsidian integration. \\n    Additionally, there are settings for auto-export, which automatically generates SVG and/or PNG files to match the title of your Excalidraw drawings, keeping them in sync with file renames and deletions.',EMBED_CANVAS:\"Obsidian Canvas support\",EMBED_CANVAS_NAME:\"Immersive embedding\",EMBED_CANVAS_DESC:\"Hide canvas node border and background when embedding an Excalidraw drawing to Canvas. Note that for a full transparent background for your image, you will still need to configure Excalidraw to export images with transparent background.\",EMBED_CACHING:\"Image caching and rendering optimization\",RENDERING_CONCURRENCY_NAME:\"Image rendering concurrency\",RENDERING_CONCURRENCY_DESC:\"Number of parallel workers to use for image rendering. Increasing this number will speed up the rendering process, but may slow down the rest of the system. The default value is 3. You can increase this number if you have a powerful system.\",EXPORT_SUBHEAD:\"Export Settings\",EMBED_SIZING:\"Image sizing\",EMBED_THEME_BACKGROUND:\"Image theme and background color\",EMBED_IMAGE_CACHE_NAME:\"Cache images for embedding in markdown\",EMBED_IMAGE_CACHE_DESC:\"Cache images for embedding in markdown. This will speed up the embedding process, but in case you compose images of several sub-component drawings, the embedded image in Markdown won't update until you open the drawing and save it to trigger an update of the cache.\",SCENE_IMAGE_CACHE_NAME:\"Cache nested Excalidraws in Scene\",SCENE_IMAGE_CACHE_DESC:\"Cache nested Excalidraws in the Scene for faster scene rendering. This will speed up the rendering process, especially if you have deeply nested Excalidraws in your scene. Excalidraw will try to intelligently identify if any children of a nested Excalidraw have changed and will update the cache accordingly. You may want to turn this off, in case you are suspecting that the cache is not updating properly.\",EMBED_IMAGE_CACHE_CLEAR:\"Purge Cache\",BACKUP_CACHE_CLEAR:\"Purge Backups\",BACKUP_CACHE_CLEAR_CONFIRMATION:\"This action will delete all Excalidraw drawing backups. Backups are used as a safety measure in case your drawing file gets damaged. Each time you open Obsidian the plugin automatically deletes backups for files that no longer exist in your Vault. Are you sure you want to clear all backups?\",EMBED_REUSE_EXPORTED_IMAGE_NAME:\"If found, use the already exported image for preview\",EMBED_REUSE_EXPORTED_IMAGE_DESC:\"This setting works in conjunction with the <a href='#\"+TAG_AUTOEXPORT+\"'>Auto-export SVG/PNG</a> setting. If an exported image that matches the file name of the drawing is available, use that image instead of generating a preview image on the fly. This will result in faster previews especially when you have many embedded objects in the drawing, however, it may happen that your latest changes are not displayed and that the image will not automatically match your Obsidian theme in case you have changed the Obsidian theme since the export was created. This setting only applies to embedding images into markdown documents. For a number of reasons, the same approach cannot be used to expedite the loading of drawings with many embedded objects. See demonstration <a href='https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/1.6.23' target='_blank'>here</a>.\",EMBED_PREVIEW_IMAGETYPE_NAME:\"Image type in markdown preview\",EMBED_PREVIEW_IMAGETYPE_DESC:\"<b><u>Native SVG</u></b>: High Image Quality. Embedded Websites, YouTube videos, Obsidian Links, and external images embedded via a URL will all work. Embedded Obsidian pages will not<br><b><u>SVG Image</u></b>: High Image Quality. Embedded elements and images embedded via URL only have placeholders, links don't work<br><b><u>PNG Image</u></b>: Lower Image Quality, but in some cases better performance with large drawings. Embedded elements and images embedded via URL only have placeholders, links don't work. Also some of the <a href='https://www.youtube.com/watch?v=yZQoJg2RCKI&t=633s' target='_blank'>image block referencing features</a> do not work with PNG embeds.\",PREVIEW_MATCH_OBSIDIAN_NAME:\"Excalidraw preview to match Obsidian theme\",PREVIEW_MATCH_OBSIDIAN_DESC:\"Image preview in documents should match the Obsidian theme. If enabled, when Obsidian is in dark mode, Excalidraw images will render in dark mode. When Obsidian is in light mode, Excalidraw will render light mode as well. You may want to switch 'Export image with background' off for a more Obsidian-integrated look and feel.\",EMBED_WIDTH_NAME:\"Default width of embedded (transcluded) image\",EMBED_WIDTH_DESC:\"The default width of an embedded drawing. This applies to live preview edit and reading mode, as well as to hover previews. You can specify a custom width when embedding an image using the <code>![[drawing.excalidraw|100]]</code> or <code>[[drawing.excalidraw|100x100]]</code> format.\",EMBED_HEIGHT_NAME:\"Default height of embedded (transcluded) image\",EMBED_HEIGHT_DESC:\"The default height of an embedded drawing. This applies to live preview edit and reading mode, as well as to hover previews. You can specify a custom height when embedding an image using the <code>![[drawing.excalidraw|100]]</code> or <code>[[drawing.excalidraw|100x100]]</code> format.\",EMBED_TYPE_NAME:\"Type of file to insert into the document\",EMBED_TYPE_DESC:\"When you embed an image into a document using the command palette this setting will specify if Excalidraw should embed the original Excalidraw file or a PNG or an SVG copy. You need to enable <a href='#\"+TAG_AUTOEXPORT+\"'>auto-export PNG / SVG</a> (see below under Export Settings) for those image types to be available in the dropdown. For drawings that do not have a a corresponding PNG or SVG readily available the command palette action will insert a broken link. You need to open the original drawing and initiate export manually. This option will not autogenerate PNG/SVG files, but will simply reference the already existing files.\",EMBED_MARKDOWN_COMMENT_NAME:\"Embed link to drawing as comment\",EMBED_MARKDOWN_COMMENT_DESC:\"Embed the link to the original Excalidraw file as a markdown link under the image, e.g.:<code>%%[[drawing.excalidraw]]%%</code>.<br>Instead of adding a markdown comment you may also select the embedded SVG or PNG line and use the command palette action: '<code>Excalidraw: Open Excalidraw drawing</code>' to open the drawing.\",EMBED_WIKILINK_NAME:\"Embed Drawing using Wiki link\",EMBED_WIKILINK_DESC:\"<b><u>Toggle ON:</u></b> Excalidraw will embed a [[wiki link]].<br><b><u>Toggle OFF:</u></b> Excalidraw will embed a [markdown](link).\",EXPORT_PNG_SCALE_NAME:\"PNG export image scale\",EXPORT_PNG_SCALE_DESC:\"The size-scale of the exported PNG image\",EXPORT_BACKGROUND_NAME:\"Export image with background\",EXPORT_BACKGROUND_DESC:\"If turned off, the exported image will be transparent.\",EXPORT_PADDING_NAME:\"Image Padding\",EXPORT_PADDING_DESC:\"The padding (in pixels) around the exported SVG or PNG image. Padding is set to 0 for clippedFrame references.If you have curved lines close to the edge of the image they might get cropped during image export. You can increase this value to avoid cropping. You can also override this setting at a file level by adding the <code>excalidraw-export-padding: 5<code> frontmatter key.\",EXPORT_THEME_NAME:\"Export image with theme\",EXPORT_THEME_DESC:\"Export the image matching the dark/light theme of your drawing. If turned off, drawings created in dark mode will appear as they would in light mode.\",EXPORT_EMBED_SCENE_NAME:\"Embed scene in exported image\",EXPORT_EMBED_SCENE_DESC:\"Embed Excalidraw scene in exported image. Can be overridden at a file level by adding the <code>excalidraw-export-embed-scene: true/false<code> frontmatter key. The setting only takes effect the next time you (re)open drawings.\",PDF_EXPORT_SETTINGS:\"PDF Export Settings\",EXPORT_HEAD:\"Auto-export Settings\",EXPORT_SYNC_NAME:\"Keep the .SVG and/or .PNG filenames in sync with the drawing file\",EXPORT_SYNC_DESC:\"When turned on, the plugin will automatically update the filename of the .SVG and/or .PNG files when the drawing in the same folder (and same name) is renamed. The plugin will also automatically delete the .SVG and/or .PNG files when the drawing in the same folder (and same name) is deleted. \",EXPORT_SVG_NAME:\"Auto-export SVG\",EXPORT_SVG_DESC:\"Automatically create an SVG export of your drawing matching the title of your file. The plugin will save the *.SVG file in the same folder as the drawing. Embed the .svg file into your documents instead of Excalidraw making you embeds platform independent. While the auto-export switch is on, this file will get updated every time you edit the Excalidraw drawing with the matching name. You can override this setting on a file level by adding the <code>excalidraw-autoexport</code> frontmatter key. Valid values for this key are <code>none</code>,<code>both</code>,<code>svg</code>, and <code>png</code>.\",EXPORT_PNG_NAME:\"Auto-export PNG\",EXPORT_PNG_DESC:\"Same as the auto-export SVG, but for *.PNG\",EXPORT_BOTH_DARK_AND_LIGHT_NAME:\"Export both dark- and light-themed image\",EXPORT_BOTH_DARK_AND_LIGHT_DESC:\"When enabled, Excalidraw will export two files instead of one: filename.dark.png, filename.light.png and/or filename.dark.svg and filename.light.svg<br>Double files will be exported both if auto-export SVG or PNG (or both) are enabled, as well as when clicking export on a single image.\",COMPATIBILITY_HEAD:\"Compatibility features\",COMPATIBILITY_DESC:\"You should only enable these features if you have a strong reason for wanting to work with excalidraw.com files instead of markdown files. Many of the plugin features are not supported on legacy files. Typical usecase would be if you use set your vault up on top of a Visual Studio Code project folder and you have .excalidraw drawings you want to access from Visual Studio Code as well. Another usecase might be using Excalidraw in Logseq and Obsidian in parallel.\",DUMMY_TEXT_ELEMENT_LINT_SUPPORT_NAME:\"Linter compatibility\",DUMMY_TEXT_ELEMENT_LINT_SUPPORT_DESC:\"Excalidraw is sensitive to the file structure below <code># Excalidraw Data</code>. Automatic linting of documents can create errors in Excalidraw Data. While I've made some effort to make the data loading resilient to lint changes, this solution is not foolproof.<br><mark>The best is to avoid linting or otherwise automatically changing Excalidraw documents using different plugins.</mark><br>Use this setting if for good reasons you have decided to ignore my recommendation and configured linting of Excalidraw files.<br> The <code>## Text Elements</code> section is sensitive to empty lines. A common linting approach is to add an empty line after section headings. In case of Excalidraw this will break/change the first text element in your drawing. To overcome this, you can enable this setting. When enabled, Excalidraw will add a dummy element to the beginning of <code>## Text Elements</code> that the linter can safely modify.\",PRESERVE_TEXT_AFTER_DRAWING_NAME:\"Zotero and Footnotes compatibility\",PRESERVE_TEXT_AFTER_DRAWING_DESC:\"Preserve text after the ## Drawing section of the markdown file. This may have a very slight performance impact when saving very large drawings.\",DEBUGMODE_NAME:\"Enable debug messages\",DEBUGMODE_DESC:\"I recommend restarting Obsidian after enabling/disabling this setting. This enable debug messages in the console. This is useful for troubleshooting issues. If you are experiencing problems with the plugin, please enable this setting, reproduce the issue, and include the console log in the issue you raise on <a href='https://github.com/zsviczian/obsidian-excalidraw-plugin/issues'>GitHub</a>\",SLIDING_PANES_NAME:\"Sliding panes plugin support\",SLIDING_PANES_DESC:\"Need to restart Obsidian for this change to take effect.<br>If you use the <a href='https://github.com/deathau/sliding-panes-obsidian' target='_blank'>Sliding Panes plugin</a> you can enable this setting to make Excalidraw drawings work with the Sliding Panes plugin.<br>Note, that Excalidraw Sliding Panes support causes compatibility issues with Obsidian Workspaces.<br>Note also, that the 'Stack Tabs' feature is now available in Obsidian, providing native support for most of the Sliding Panes functionality.\",EXPORT_EXCALIDRAW_NAME:\"Auto-export Excalidraw\",EXPORT_EXCALIDRAW_DESC:\"Same as the auto-export SVG, but for *.Excalidraw\",SYNC_EXCALIDRAW_NAME:\"Sync *.excalidraw with *.md version of the same drawing\",SYNC_EXCALIDRAW_DESC:\"If the modified date of the *.excalidraw file is more recent than the modified date of the *.md file then update the drawing in the .md file based on the .excalidraw file\",COMPATIBILITY_MODE_NAME:\"New drawings as legacy files\",COMPATIBILITY_MODE_DESC:\"\u26a0\ufe0f Enable this only if you know what you are doing. In 99.9% of the cases you DO NOT want this on. By enabling this feature drawings you create with the ribbon icon, the command palette actions, and the file explorer are going to be all legacy *.excalidraw files. This setting will also turn off the reminder message when you open a legacy file for editing.\",MATHJAX_NAME:\"MathJax (LaTeX) javascript library host\",MATHJAX_DESC:\"If you are using LaTeX equations in Excalidraw, then the plugin needs to load a javascript library for that. Some users are unable to access certain host servers. If you are experiencing issues, try changing the host here. You may need to restart Obsidian after closing settings, for this change to take effect.\",LATEX_DEFAULT_NAME:\"Default LaTeX formula for new equations\",LATEX_DEFAULT_DESC:\"Leave empty if you don't want a default formula. You can add default formatting here such as <code>\\\\color{white}</code>.\",LATEX_PREAMBLE_NAME:\"LaTeX preamble file (CasE SEnSiTivE!)\",LATEX_PREAMBLE_DESC:\"Full filepath to the preamble file, leave empty for default. If the file doesn't exist this option will be ignored.<br><strong>Important:</strong> Requires obsidian reload after change to take effect!\",NONSTANDARD_HEAD:\"Non-Excalidraw.com supported features\",NONSTANDARD_DESC:'These settings in the \"Non-Excalidraw.com Supported Features\" section provide customization options beyond the default Excalidraw.com features. These features are not available on excalidraw.com. When exporting the drawing to Excalidraw.com these features will appear different.\\n    You can configure the number of custom pens displayed next to the Obsidian Menu on the canvas, allowing you to choose from a range of options. Additionally, you can enable a local font option, which adds a local font to the list of fonts on the element properties panel for text elements. ',RENDER_TWEAK_HEAD:\"Rendering tweaks\",MAX_IMAGE_ZOOM_IN_NAME:\"Maximum image zoom in resolution\",MAX_IMAGE_ZOOM_IN_DESC:\"To save on memory and because Apple Safari (Obsidian on iOS) has some hard-coded limitations, Excalidraw.com limits the max resolution of images and large objects when zooming in. You can override this limitation using a multiplicator. This means you are multiplying the limit set by default in Excalidraw, the larger the multiplier the better the image zoom in resolution will be, and the more memory it will consume. I recommend playing with multiple values for this setting. You know you've hit the wall, when zooming in to a larger PNG image suddenly the image disappears from view. The default value is 1. The setting has no effect on iOS.\",CUSTOM_PEN_HEAD:\"Custom pens\",CUSTOM_PEN_NAME:\"Number of custom pens\",CUSTOM_PEN_DESC:\"You will see these pens next to the Obsidian Menu on the canvas. You can customize the pens on the canvas by long-pressing the pen button.\",EXPERIMENTAL_HEAD:\"Miscellaneous features\",EXPERIMENTAL_DESC:\"These miscellaneous features in Excalidraw include options for setting default LaTeX formulas for new equations, enabling a Field Suggester for autocompletion, displaying type indicators for Excalidraw files, enabling immersive image embedding in live preview editing mode, and experimenting with Taskbone Optical Character Recognition for text extraction from images and drawings. Users can also enter a Taskbone API key for extended usage of the OCR service.\",EA_HEAD:\"Excalidraw Automate\",EA_DESC:\"ExcalidrawAutomate is a scripting and automation API for Excalidraw. Unfortunately, the documentation of the API is sparse. I recommend reading the <a href='https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/docs/API/ExcalidrawAutomate.d.ts'>ExcalidrawAutomate.d.ts</a> file, visiting the <a href='https://zsviczian.github.io/obsidian-excalidraw-plugin/'>ExcalidrawAutomate How-to</a> page - though the information here has not been updated for a long while -, and finally to enable the field suggester below. The field suggester will show you the available functions, their parameters and short description as you type. The field suggester is the most up-to-date documentation of the API.\",FIELD_SUGGESTER_NAME:\"Enable Field Suggester\",FIELD_SUGGESTER_DESC:\"Field Suggester borrowed from Breadcrumbs and Templater plugins. The Field Suggester will show an autocomplete menu when you type <code>excalidraw-</code> or <code>ea.</code> with function description as hints on the individual items in the list.\",STARTUP_SCRIPT_NAME:\"Startup script\",STARTUP_SCRIPT_DESC:\"If set, excalidraw will execute the script at plugin startup. This is useful if you want to set any of the Excalidraw Automate hooks. The startup script is a markdown file that should contain the javascript code you want to execute when Excalidraw starts.\",STARTUP_SCRIPT_BUTTON_CREATE:\"Create startup script\",STARTUP_SCRIPT_BUTTON_OPEN:\"Open startup script\",STARTUP_SCRIPT_EXISTS:\"Startup script file already exists\",FILETYPE_NAME:\"Display type (\u270f\ufe0f) for excalidraw.md files in File Explorer\",FILETYPE_DESC:\"Excalidraw files will receive an indicator using the emoji or text defined in the next setting.\",FILETAG_NAME:\"Set the type indicator for excalidraw.md files\",FILETAG_DESC:\"The text or emoji to display as type indicator.\",INSERT_EMOJI:\"Insert an emoji\",LIVEPREVIEW_NAME:\"Immersive image embedding in live preview editing mode\",LIVEPREVIEW_DESC:\"Turn this on to support image embedding styles such as ![[drawing|width|style]] in live preview editing mode. The setting will not affect the currently open documents. You need close the open documents and re-open them for the change to take effect.\",FADE_OUT_EXCALIDRAW_MARKUP_NAME:\"Fade out Excalidraw markup\",FADE_OUT_EXCALIDRAW_MARKUP_DESC:\"In Markdown view mode, the section after the markdown comment %% fades out. The text is still there, but the visual clutter is reduced. Note, you can place the %% in the line right above # Text Elements, in this case the entire drawing markdown will fade out including # Text Elements. The side effect is you won't be able to block reference text in other markdown notes, that is after the %% comment section. This is seldom an issue. Should you want to edit the Excalidraw markdown script, simply switch to markdown view mode and temporarily remove the %% comment.\",EXCALIDRAW_PROPERTIES_NAME:\"Load Excalidraw Properties into Obsidian Suggester\",EXCALIDRAW_PROPERTIES_DESC:\"Toggle this setting to load Excalidraw document properties into Obsidian's property suggester at plugin startup. Enabling this feature simplifies the use of Excalidraw front matter properties, allowing you to leverage many powerful settings. If you prefer not to load these properties automatically, you can disable this feature, but you will need to manually remove any unwanted properties from the suggester. Note that turning on this setting requires restarting the plugin as properties are loaded at startup.\",FONTS_HEAD:\"Fonts\",FONTS_DESC:\"Configure local fontfaces and downloaded CJK fonts for Excalidraw.\",CUSTOM_FONT_HEAD:\"Local font\",ENABLE_FOURTH_FONT_NAME:\"Enable local font option\",ENABLE_FOURTH_FONT_DESC:\"Enabling this option will add a local font to the font list in the properties panel for text elements. Be aware that using this local font may compromise platform independence. Files using the custom font might render differently when opened in a different vault or at a later time, depending on the font settings. Additionally, the 4th font will default to the system font on excalidraw.com or other Excalidraw versions.\",FOURTH_FONT_NAME:\"Local font file\",FOURTH_FONT_DESC:\"Select a .otf, .ttf, .woff, or .woff2 font file from your vault to use as the local font. If no file is selected, Excalidraw will default to the Virgil font. For optimal performance, it is recommended to use a .woff2 file, as Excalidraw will encode only the necessary glyphs when exporting images to SVG. Other font formats will embed the entire font in the exported file, potentially resulting in significantly larger file sizes.\",OFFLINE_CJK_NAME:\"Offline CJK font support\",OFFLINE_CJK_DESC:'<strong>Changes you make here will only take effect after restarting Obsidian.</strong><br>\\n     Excalidraw.com offers handwritten CJK fonts. By default these fonts are not included in the plugin locally, but are served from the Internet. \\n     If you prefer to keep Excalidraw fully local, allowing it to work without Internet access you can download the necessary <a href=\"https://github.com/zsviczian/obsidian-excalidraw-plugin/raw/refs/heads/master/assets/excalidraw-fonts.zip\" target=\"_blank\">font files from GitHub</a>.\\n     After downloading, unzip the contents into a folder within your Vault.<br>\\n     Pre-loading fonts will impact startup performance. For this reason you can select which fonts to load.',CJK_ASSETS_FOLDER_NAME:\"CJK Font Folder (cAsE sENsiTIvE!)\",CJK_ASSETS_FOLDER_DESC:'You can set the location of the CJK fonts folder here. For example, you may choose to place it under <code>Excalidraw/CJK Fonts</code>.<br><br>\\n    <strong>Important:</strong> Do not set this folder to the Vault root! Do not put other fonts in this folder.<br><br>\\n    <strong>Note:</strong> If you\\'re using Obsidian Sync and want to synchronize these font files across your devices, ensure that Obsidian Sync is set to synchronize \"All other file types\".',LOAD_CHINESE_FONTS_NAME:\"Load Chinese fonts from file at startup\",LOAD_JAPANESE_FONTS_NAME:\"Load Japanese fonts from file at startup\",LOAD_KOREAN_FONTS_NAME:\"Load Korean fonts from file at startup\",SCRIPT_SETTINGS_HEAD:\"Settings for installed Scripts\",SCRIPT_SETTINGS_DESC:\"Some of the Excalidraw Automate Scripts include settings. Settings are organized by script. Settings will only become visible in this list after you have executed the newly downloaded script once.\",TASKBONE_HEAD:\"Taskbone Optical Character Recognition\",TASKBONE_DESC:\"This is an experimental integration of optical character recognition into Excalidraw. Please note, that taskbone is an independent external service not provided by Excalidraw, nor the Excalidraw-Obsidian plugin project. The OCR service will grab legible text from freedraw lines and embedded pictures on your canvas and place the recognized text in the frontmatter of your drawing as well as onto clipboard. Having the text in the frontmatter will enable you to search in Obsidian for the text contents of these. Note, that the process of extracting the text from the image is not done locally, but via an online API. The taskbone service stores the image on its servers only as long as necessary for the text extraction. However, if this is a dealbreaker, then please don't use this feature.\",TASKBONE_ENABLE_NAME:\"Enable Taskbone\",TASKBONE_ENABLE_DESC:\"By enabling this service your agree to the Taskbone <a href='https://www.taskbone.com/legal/terms/' target='_blank'>Terms and Conditions</a> and the <a href='https://www.taskbone.com/legal/privacy/' target='_blank'>Privacy Policy</a>.\",TASKBONE_APIKEY_NAME:\"Taskbone API Key\",TASKBONE_APIKEY_DESC:\"Taskbone offers a free service with a reasonable number of scans per month. If you want to use this feature more frequently, or you want to support the developer of Taskbone (as you can imagine, there is no such thing as 'free', providing this awesome OCR service costs some money to the developer of Taskbone), you can purchase a paid API key from <a href='https://www.taskbone.com/' target='_blank'>taskbone.com</a>. In case you have purchased a key, simply overwrite this auto generated free-tier API-key with your paid key.\",HOTKEY_PRESS_COMBO_NANE:\"Press your hotkey combination\",HOTKEY_PRESS_COMBO_DESC:\"Please press the desired key combination\",HOTKEY_BUTTON_ADD_OVERRIDE:\"Add New Override\",HOTKEY_BUTTON_REMOVE:\"Remove\",SELECT_FILE:\"Select a file then press enter.\",SELECT_COMMAND:\"Select a command then press enter.\",SELECT_FILE_WITH_OPTION_TO_SCALE:`Select a file then press ENTER, or ${labelSHIFT()}+${labelMETA()}+ENTER to insert at 100% scale.`,NO_MATCH:\"No file matches your query.\",NO_MATCHING_COMMAND:\"No command matches your query.\",SELECT_FILE_TO_LINK:\"Select the file you want to insert the link for.\",SELECT_COMMAND_PLACEHOLDER:\"Select the command you want to insert the link for.\",SELECT_DRAWING:\"Select the image or drawing you want to insert\",TYPE_FILENAME:\"Type name of drawing to select.\",SELECT_FILE_OR_TYPE_NEW:\"Select existing drawing or type name of a new drawing then press Enter.\",SELECT_TO_EMBED:\"Select the drawing to insert into active document.\",SELECT_MD:\"Select the markdown document you want to insert\",SELECT_PDF:\"Select the PDF document you want to insert\",PDF_PAGES_HEADER:\"Pages to load?\",PDF_PAGES_DESC:\"Format: 1, 3-5, 7, 9-11\",TYPE_SECTION:\"Type section name to select.\",SELECT_SECTION_OR_TYPE_NEW:\"Select existing section or type name of a new section then press Enter.\",INVALID_SECTION_NAME:\"Invalid section name.\",EMPTY_SECTION_MESSAGE:\"Type the Section Name and hit enter to create a new Section\",INFINITE_LOOP_WARNING:\"EXCALIDRAW WARNING\\nAborted loading embedded images due to infinite loop in file:\\n\",SCRIPT_EXECUTION_ERROR:\"Script execution error. Please find error message on the developer console.\",MARKER_FRAME_RENDERING_DISABLED_NOTICE:\"There are hidden marker-frames in the scene.\",LOAD_FROM_BACKUP:\"Excalidraw file was corrupted. Loading from backup file.\",FONT_LOAD_SLOW:\"Loading Fonts...\\n\\n This is taking longer than expected. If this delay occurs regularly then you may download the fonts locally to your Vault. \\n\\n(click=dismiss, right-click=Info)\",FONT_INFO_TITLE:\"Starting v2.5.3 fonts load from the Internet\",FONT_INFO_DETAILED:`\\n      <p>\\n        To improve Obsidian's startup time and manage the large <strong>CJK font family</strong>, \\n        I've moved the CJK fonts out of the plugin's <code>main.js</code>. CJK fonts will be loaded from the internet by default.\\n        This typically shouldn't cause issues as Obsidian caches these files after first use.\\n      </p>\\n      <p>\\n        If you prefer to keep Obsidian 100% local or experience performance issues, you can download the font assets.\\n      </p>\\n      <h3>Instructions:</h3>\\n      <ol>\\n        <li>Download the fonts from <a href=\"https://github.com/zsviczian/obsidian-excalidraw-plugin/raw/refs/heads/master/assets/excalidraw-fonts.zip\">GitHub</a>.</li>\\n        <li>Unzip and copy files into a Vault folder (default: <code>Excalidraw/${CJK_FONTS}</code>; folder names are cAse-senSITive).</li>\\n        <li><mark>DO NOT</mark> set this folder to the Vault root or mix with other local fonts.</li>\\n      </ol>\\n      <h3>For Obsidian Sync Users:</h3>\\n      <p>\\n        Ensure Obsidian Sync is set to synchronize \"All other file types\" or download and unzip the file on all devices.\\n      </p>\\n      <h3>Note:</h3>\\n      <p>\\n        If you find this process cumbersome, please submit a feature request to Obsidian.md for supporting assets in the plugin folder. \\n        Currently, only a single <code>main.js</code> is supported, which leads to large files and slow startup times for complex plugins like Excalidraw. \\n        I apologize for the inconvenience.\\n      </p>\\n    `,GOTO_FULLSCREEN:\"Goto fullscreen mode\",EXIT_FULLSCREEN:\"Exit fullscreen mode\",TOGGLE_FULLSCREEN:\"Toggle fullscreen mode\",TOGGLE_DISABLEBINDING:\"Toggle to invert default binding behavior\",TOGGLE_FRAME_RENDERING:\"Toggle frame rendering\",TOGGLE_FRAME_CLIPPING:\"Toggle frame clipping\",OPEN_LINK_CLICK:\"Open Link\",OPEN_LINK_PROPS:\"Open the image-link or LaTeX-formula editor\",NARROW_TO_HEADING:\"Narrow to heading...\",PIN_VIEW:\"Pin view\",DO_NOT_PIN_VIEW:\"Do not pin view\",NARROW_TO_BLOCK:\"Narrow to block...\",SHOW_ENTIRE_FILE:\"Show entire file\",SELECT_SECTION:\"Select section from document\",SELECT_VIEW:\"Select view from base\",ZOOM_TO_FIT:\"Zoom to fit\",RELOAD:\"Reload original link\",OPEN_IN_BROWSER:\"Open current link in browser\",PROPERTIES:\"Properties\",COPYCODE:\"Copy source to clipboard\",ES_TITLE:\"Embeddable Element Settings\",ES_RENAME:\"Rename File\",ES_ZOOM:\"Embedded Content Scaling\",ES_YOUTUBE_START:\"YouTube Start Time\",ES_YOUTUBE_START_DESC:\"ss, mm:ss, hh:mm:ss\",ES_YOUTUBE_START_INVALID:\"The YouTube Start Time is invalid. Please check the format and try again\",ES_FILENAME_VISIBLE:\"Filename Visible\",ES_BACKGROUND_HEAD:\"Embedded note background color\",ES_BACKGROUND_DESC_INFO:\"Click here for more info on colors\",ES_BACKGROUND_DESC_DETAIL:\"Background color affects only the preview mode of the markdown embeddable. When editing, it follows the Obsidian light/dark theme as set for the scene (via document property) or in plugin settings. The background color has two layers: the element background color (lower layer) and a color on top (upper layer). Selecting 'Match Element Background' means both layers follow the element color. Selecting 'Match Canvas' or a specific background color keeps the element background layer. Setting opacity (e.g., 50%) mixes the canvas or selected color with the element background color. To remove the element background layer, set the element color to transparent in Excalidraw's element properties editor. This makes only the upper layer effective.\",ES_BACKGROUND_MATCH_ELEMENT:\"Match Element Background Color\",ES_BACKGROUND_MATCH_CANVAS:\"Match Canvas Background Color\",ES_BACKGROUND_COLOR:\"Background Color\",ES_BORDER_HEAD:\"Embedded note border color\",ES_BORDER_COLOR:\"Border Color\",ES_BORDER_MATCH_ELEMENT:\"Match Element Border Color\",ES_BACKGROUND_OPACITY:\"Background Opacity\",ES_BORDER_OPACITY:\"Border Opacity\",ES_EMBEDDABLE_SETTINGS:\"Embeddable Markdown Settings\",ES_USE_OBSIDIAN_DEFAULTS:\"Use Obsidian Defaults\",ES_ZOOM_100_RELATIVE_DESC:\"The button will adjust the element scale so it will show the content at 100% relative to the current zoom level of your canvas\",ES_ZOOM_100:\"Relative 100%\",PROMPT_FILE_DOES_NOT_EXIST:\"File does not exist. Do you want to create it?\",PROMPT_ERROR_NO_FILENAME:\"Error: Filename for new file may not be empty\",PROMPT_ERROR_DRAWING_CLOSED:\"Unknown error. It seems as if your drawing was closed or the drawing file is missing\",PROMPT_TITLE_NEW_FILE:\"New File\",PROMPT_TITLE_CONFIRMATION:\"Confirmation\",PROMPT_BUTTON_CREATE_EXCALIDRAW:\"Create EX\",PROMPT_BUTTON_CREATE_EXCALIDRAW_ARIA:\"Create Excalidraw drawing and open in new tab\",PROMPT_BUTTON_CREATE_MARKDOWN:\"Create MD\",PROMPT_BUTTON_CREATE_MARKDOWN_ARIA:\"Create markdown document and open in new tab\",PROMPT_BUTTON_EMBED_MARKDOWN:\"Embed MD\",PROMPT_BUTTON_EMBED_MARKDOWN_ARIA:\"Replace selected element with embedded markdown document\",PROMPT_BUTTON_NEVERMIND:\"Nevermind\",PROMPT_BUTTON_OK:\"OK\",PROMPT_BUTTON_CANCEL:\"Cancel\",PROMPT_BUTTON_INSERT_LINE:\"Insert new line\",PROMPT_BUTTON_INSERT_SPACE:\"Insert space\",PROMPT_BUTTON_INSERT_LINK:\"Insert markdown link to file\",PROMPT_BUTTON_UPPERCASE:\"Uppercase\",PROMPT_BUTTON_SPECIAL_CHARS:\"Special Characters\",PROMPT_SELECT_TEMPLATE:\"Select a template\",WEB_BROWSER_DRAG_ACTION:\"Web Browser Drag Action\",LOCAL_FILE_DRAG_ACTION:\"OS Local File Drag Action\",INTERNAL_DRAG_ACTION:\"Obsidian Internal Drag Action\",PANE_TARGET:\"Link click behavior\",DEFAULT_ACTION_DESC:\"In case none of the combinations apply the default action for this group is: \",FRAME_SETTINGS_TITLE:\"Frame Settings\",FRAME_SETTINGS_ENABLE:\"Enable Frames\",FRAME_SETTIGNS_NAME:\"Display Frame Name\",FRAME_SETTINGS_OUTLINE:\"Display Frame Outline\",FRAME_SETTINGS_CLIP:\"Enable Frame Clipping\",IPM_PAGES_TO_IMPORT_NAME:\"Pages to import\",IPM_SELECT_PAGES_TO_IMPORT:\"Please select pages to import\",IPM_ADD_BORDER_BOX_NAME:\"Add border box\",IPM_ADD_FRAME_NAME:\"Add page to frame\",IPM_ADD_FRAME_DESC:\"For easier handling I recommend to lock the page inside the frame. If, however, you do lock the page inside the frame then the only way to unlock it is to right-click the frame, select remove elements from frame, then unlock the page.\",IPM_GROUP_PAGES_NAME:\"Group pages\",IPM_GROUP_PAGES_DESC:\"This will group all pages into a single group. This is recommended if you are locking the pages after import, because the group will be easier to unlock later rather than unlocking one by one.\",IPM_SELECT_PDF:\"Please select a PDF file\",UPDATE_AVAILABLE:`A newer version of Excalidraw is available in Community Plugins.\\n\\nYou are using ${PLUGIN_VERSION}.\\nThe latest is`,SCRIPT_UPDATES_AVAILABLE:`Script updates available - check the script store.\\n\\n${DEVICE.isDesktop?`This message is available in console.log (${DEVICE.isMacOS?\"CMD+OPT+i\":\"CTRL+SHIFT+i\"})\\n\\n`:\"\"}If you have organized scripts into subfolders under the script store folder and have multiple copies of the same script, you may need to clean up unused versions to clear this alert. For private copies of scripts that should not be updated, store them outside the script store folder.`,ERROR_PNG_TOO_LARGE:\"Error exporting PNG - PNG too large, try a smaller resolution\",WEB_DRAG_IMPORT_IMAGE:\"Import Image to Vault\",WEB_DRAG_IMAGE_URL:\"Insert Image or YouTube Thumbnail with URL\",WEB_DRAG_LINK:\"Insert Link\",WEB_DRAG_EMBEDDABLE:\"Insert Interactive-Frame\",LOCAL_DRAG_IMPORT:\"Import external file or reuse existing file if path is from the Vault\",LOCAL_DRAG_IMAGE:\"Insert Image: with local URI or internal-link if from Vault\",LOCAL_DRAG_LINK:\"Insert Link: local URI or internal-link if from Vault\",LOCAL_DRAG_EMBEDDABLE:\"Insert Interactive-Frame: local URI or internal-link if from Vault\",INTERNAL_DRAG_IMAGE:\"Insert Image\",INTERNAL_DRAG_IMAGE_FULL:\"Insert Image @100%\",INTERNAL_DRAG_LINK:\"Insert Link\",INTERNAL_DRAG_EMBEDDABLE:\"Insert Interactive-Frame\",LINK_CLICK_ACTIVE:\"Open in current active window\",LINK_CLICK_NEW_PANE:\"Open in a new adjacent window\",LINK_CLICK_POPOUT:\"Open in a popout window\",LINK_CLICK_NEW_TAB:\"Open in a new tab\",LINK_CLICK_MD_PROPS:\"Show the Markdown image-properties dialog (only relevant if you have embedded a markdown document as an image)\",EXPORTDIALOG_TITLE:\"Export Drawing\",EXPORTDIALOG_TAB_IMAGE:\"Image\",EXPORTDIALOG_TAB_PDF:\"PDF\",EXPORTDIALOG_SAVE_SETTINGS:\"Save image settings to file doc.properties?\",EXPORTDIALOG_SAVE_SETTINGS_SAVE:\"Save as preset\",EXPORTDIALOG_SAVE_SETTINGS_ONETIME:\"One-time use\",EXPORTDIALOG_IMAGE_SETTINGS:\"Image\",EXPORTDIALOG_IMAGE_DESC:\"PNG supports transparency. External files can include Excalidraw scene data.\",EXPORTDIALOG_PADDING:\"Padding\",EXPORTDIALOG_SCALE:\"Scale\",EXPORTDIALOG_CURRENT_PADDING:\"Current padding:\",EXPORTDIALOG_SIZE_DESC:\"Scale affects output size\",EXPORTDIALOG_SCALE_VALUE:\"Scale:\",EXPORTDIALOG_IMAGE_SIZE:\"Size:\",EXPORTDIALOG_EXPORT_THEME:\"Theme\",EXPORTDIALOG_THEME_LIGHT:\"Light\",EXPORTDIALOG_THEME_DARK:\"Dark\",EXPORTDIALOG_BACKGROUND:\"Background\",EXPORTDIALOG_BACKGROUND_TRANSPARENT:\"Transparent\",EXPORTDIALOG_BACKGROUND_USE_COLOR:\"Use scene color\",EXPORTDIALOG_SELECTED_ELEMENTS:\"Export\",EXPORTDIALOG_SELECTED_ALL:\"Entire scene\",EXPORTDIALOG_SELECTED_SELECTED:\"Selection only\",EXPORTDIALOG_EMBED_SCENE:\"Include scene data?\",EXPORTDIALOG_EMBED_YES:\"Yes\",EXPORTDIALOG_EMBED_NO:\"No\",EXPORTDIALOG_PDF_SETTINGS:\"PDF\",EXPORTDIALOG_PAGE_SIZE:\"Size\",EXPORTDIALOG_PAGE_ORIENTATION:\"Orientation\",EXPORTDIALOG_ORIENTATION_PORTRAIT:\"Portrait\",EXPORTDIALOG_ORIENTATION_LANDSCAPE:\"Landscape\",EXPORTDIALOG_PDF_FIT_TO_PAGE:\"Page Fitting\",EXPORTDIALOG_PDF_FIT_OPTION:\"Fit to page\",EXPORTDIALOG_PDF_FIT_2_OPTION:\"Fit to max 2-pages\",EXPORTDIALOG_PDF_FIT_4_OPTION:\"Fit to max 4-pages\",EXPORTDIALOG_PDF_FIT_6_OPTION:\"Fit to max 6-pages\",EXPORTDIALOG_PDF_FIT_8_OPTION:\"Fit to max 8-pages\",EXPORTDIALOG_PDF_FIT_12_OPTION:\"Fit to max 12-pages\",EXPORTDIALOG_PDF_FIT_16_OPTION:\"Fit to max 16-pages\",EXPORTDIALOG_PDF_SCALE_OPTION:\"Use image scale (may span multiple pages)\",EXPORTDIALOG_PDF_PAPER_COLOR:\"Paper Color\",EXPORTDIALOG_PDF_PAPER_WHITE:\"White\",EXPORTDIALOG_PDF_PAPER_SCENE:\"Use scene color\",EXPORTDIALOG_PDF_PAPER_CUSTOM:\"Custom color\",EXPORTDIALOG_PDF_ALIGNMENT:\"Position on Page\",EXPORTDIALOG_PDF_ALIGN_CENTER:\"Center\",EXPORTDIALOG_PDF_ALIGN_CENTER_LEFT:\"Center Left\",EXPORTDIALOG_PDF_ALIGN_CENTER_RIGHT:\"Center Right\",EXPORTDIALOG_PDF_ALIGN_TOP_LEFT:\"Top Left\",EXPORTDIALOG_PDF_ALIGN_TOP_CENTER:\"Top Center\",EXPORTDIALOG_PDF_ALIGN_TOP_RIGHT:\"Top Right\",EXPORTDIALOG_PDF_ALIGN_BOTTOM_LEFT:\"Bottom Left\",EXPORTDIALOG_PDF_ALIGN_BOTTOM_CENTER:\"Bottom Center\",EXPORTDIALOG_PDF_ALIGN_BOTTOM_RIGHT:\"Bottom Right\",EXPORTDIALOG_PDF_MARGIN:\"Margin\",EXPORTDIALOG_PDF_MARGIN_NONE:\"None\",EXPORTDIALOG_PDF_MARGIN_TINY:\"Small\",EXPORTDIALOG_PDF_MARGIN_NORMAL:\"Normal\",EXPORTDIALOG_SAVE_PDF_SETTINGS:\"Save PDF settings\",EXPORTDIALOG_SAVE_CONFIRMATION:\"PDF config saved to plugin settings as default\",EXPORTDIALOG_PNGTOFILE:\"Export PNG\",EXPORTDIALOG_SVGTOFILE:\"Export SVG\",EXPORTDIALOG_PNGTOVAULT:\"PNG to Vault\",EXPORTDIALOG_SVGTOVAULT:\"SVG to Vault\",EXPORTDIALOG_EXCALIDRAW:\"Excalidraw\",EXPORTDIALOG_PNGTOCLIPBOARD:\"PNG to Clipboard\",EXPORTDIALOG_SVGTOCLIPBOARD:\"SVG to Clipboard\",EXPORTDIALOG_PDF:\"Export PDF\",EXPORTDIALOG_PDF_PROGRESS_NOTICE:\"Exporting PDF. If this image is large, it may take a while.\",EXPORTDIALOG_PDF_PROGRESS_DONE:\"Export complete\",EXPORTDIALOG_PDF_PROGRESS_ERROR:\"Error exporting PDF, check developer console for details\",EXPORTDIALOG_NOT_AVAILALBE:\"Sorry, this feature is only available when the drawing is open in the main Obsidian workspace.\",EXPORTDIALOG_TAB_SCREENSHOT:\"Screenshot\",EXPORTDIALOG_SCREENSHOT_DESC:\"Screenshots will include embeddables such as markdown pages, YouTube, websites, etc. They are only available on desktop, cannot be automatically exported, and only support PNG format.\",SCREENSHOT_DESKTOP_ONLY:\"Screenshot feature is only available on desktop\",SCREENSHOT_FILE_SUCCESS:\"Screenshot saved to vault\",SCREENSHOT_CLIPBOARD_SUCCESS:\"Screenshot copied to clipboard\",SCREENSHOT_CLIPBOARD_ERROR:\"Failed to copy screenshot to clipboard: \",SCREENSHOT_ERROR:\"Error capturing screenshot - see console log\",PDF_EXPORT_DESKTOP_ONLY:\"PDF export is only available on desktop\",UIFM_TITLE:\"Insert File From Vault\",UIFM_SECTION_HEAD:\"Select section heading\",UIFM_ANCHOR:\"Anchor to 100% of original size\",UIFM_ANCHOR_DESC:\"This is a pro feature, use it only if you understand how it works. If enabled even if you change the size of the imported image in Excalidraw, the next time you open the drawing this image will pop back to 100% size. This is useful when embedding an atomic Excalidraw idea into another note and preserving relative sizing of text and icons.\",UIFM_BTN_EMBEDDABLE:\"as Embeddable\",UIFM_BTN_PDF:\"as Pdf\",UIFM_BTN_IMAGE:\"as Image\",RN_WELCOME:\"Welcome to Excalidraw\",COMP_IMG:\"Image & Files\",COMP_IMG_FROM_SYSTEM:\"Import from system\",COMP_IMG_ANY_FILE:\"ANY file from Vault\",COMP_IMG_LaTeX:\"LaTeX formula\",COMP_FRAME:\"Frame Actions\",COMP_FRAME_HINT:\"Toggle Marker Frame. Guide-only frames to define slides/print areas/image references. Hidden in image exports; doesn't contain elements. Hide/show frames via canvas context menu.\",NOTICE_PDF_THEME:\"PDF theme overridden.\\nControl via this file's 'excalidraw-embeddable-theme' document property (overrides plugin).\\n\\nValues: dark, light, auto=Excalidraw, default=Obsidian.\",BOOKMARK_PAGE:\"Save current position in document\",CAPTURE_PAGE:\"Capture current page as image\",VERSION_MISMATCH_NOTICE:\"The version recorded by Obsidian is <b>{VAL_RECORDED}</b>, but the installed Excalidraw code is <b>{VAL_ACTUAL}</b>.\",VERSION_MISMATCH_HEADING:\"Excalidraw version mismatch\",VERSION_MISMATCH_CAUSE:\"This usually happens after a partial sync (e.g. Obsidian Sync Standard) where large files (main.js > 5MB) did not sync, so only <code>manifest.json</code> updated.\",VERSION_MISMATCH_OPTIONS:\"Options:<br><b>1.</b> Re-download the plugin (recommended).<br><b>2.</b> Ignore for now.\",VERSION_MISMATCH_NOTE:\"Note: Updating version info manually may affect tools that read manifest.json directly (e.g. Plugin Update Tracker, BRAT) until a full reinstall.\",VERSION_MISMATCH_DISABLE_NAME:\"Disable future mismatch warnings\",VERSION_MISMATCH_DISABLE_DESC:\"You can re-enable this under: Settings \u2192 Excalidraw \u2192 Basic \u2192 Warn about incomplete plugin updates.\",VERSION_MISMATCH_REDOWNLOAD:\"Re-download plugin\",VERSION_MISMATCH_IGNORE:\"Ignore\"};let locale=null;function loadLocale(lang){if(\"zh\"===lang&&(lang=\"zh-cn\"),Object.keys(PLUGIN_LANGUAGES).includes(lang)){const decompressed=LZString.decompressFromBase64(PLUGIN_LANGUAGES[lang]);let x={};return eval(decompressed),x}return en}function t$d(e){return locale||(locale=loadLocale(LOCALE)),locale&&locale[e]||en[e]}var PreviewImageType;!function(e){e.PNG=\"PNG\",e.SVGIMG=\"SVGIMG\",e.SVG=\"SVG\"}(PreviewImageType||(PreviewImageType={}));class Random{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}let mathjaxLoaded=!1,tex2dataURLExternal,clearVariables,loadMathJaxPromise=null;const loadMathJax=async()=>(loadMathJaxPromise||(loadMathJaxPromise=(async()=>{if(!mathjaxLoaded){const e=await loadMathjaxToSVG();tex2dataURLExternal=e.tex2dataURL,clearVariables=e.clearMathJaxVariables,mathjaxLoaded=!0}})()),loadMathJaxPromise),updateEquation=async(e,t,a,i)=>{await loadMathJax();const n=await tex2dataURLExternal(e,4,a.app);if(n){const e=[];e.push({mimeType:n.mimeType,id:t,dataURL:n.dataURL,created:n.created,size:n.size,hasSVGwithBitmap:!1,shouldScale:!0}),i(e,a)}};async function tex2dataURL(e,t=4,a){return await loadMathJax(),tex2dataURLExternal(e,t,a)}const clearMathJaxVariables=()=>{clearVariables&&clearVariables()};function getMermaidImageElements(e){return e?e.filter((e=>\"image\"===e.type&&e.customData?.mermaidText)):[]}function getMermaidText(e){return e.customData?.mermaidText}function shouldRenderMermaid(){return obsidian_module.requireApiVersion(\"1.4.14\")}const DB_NAME=\"Excalidraw \"+app.appId,CACHE_STORE=\"imageCache\",BACKUP_STORE=\"drawingBAK\",getKey=e=>`${e.filepath}#${e.blockref??\"\"}#${e.sectionref??\"\"}#${e.isDark?1:0}#${e.hasGroupref}#${e.hasArearef}#${e.hasFrameref}#${e.hasClippedFrameref}#${e.hasSectionref}#${e.inlineFonts}#${e.previewImageType===PreviewImageType.SVGIMG?1:e.previewImageType===PreviewImageType.PNG?0:2}#${e.scale}${e.isTransparent?\"#t\":\"\"}`;class ImageCache{dbName;cacheStoreName;backupStoreName;db;isInitializing;plugin;app;initializationNotice=!1;obsidanURLCache=new Map;purgeInvalidCacheTimer=null;purgeInvalidBackupTimer=null;destroy(){this.isInitializing=!0,this.purgeInvalidCacheTimer&&clearTimeout(this.purgeInvalidCacheTimer),this.purgeInvalidBackupTimer&&clearTimeout(this.purgeInvalidBackupTimer),this.db=null,this.plugin=null,this.app=null,this.obsidanURLCache.clear(),this.obsidanURLCache=null}constructor(e,t,a){this.dbName=e,this.cacheStoreName=t,this.backupStoreName=a,this.db=null,this.isInitializing=!1,this.plugin=null}async initializeDB(e){if(this.plugin=e,this.app=e.app,!this.isInitializing&&null===this.db){this.isInitializing=!0;try{const e=indexedDB.open(this.dbName);if(e.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(this.cacheStoreName)||t.createObjectStore(this.cacheStoreName),t.objectStoreNames.contains(this.backupStoreName)||t.createObjectStore(this.backupStoreName)},this.db=await new Promise(((t,a)=>{e.onsuccess=e=>{const a=e.target.result;t(a)},e.onerror=()=>{a(new Error(`Failed to open or create IndexedDB database: ${this.dbName}`))}})),!this.db.objectStoreNames.contains(this.cacheStoreName)||!this.db.objectStoreNames.contains(this.backupStoreName)){const e=this.db.version+1;this.db.close();const t=indexedDB.open(this.dbName,e);t.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(this.cacheStoreName)||t.createObjectStore(this.cacheStoreName),t.objectStoreNames.contains(this.backupStoreName)||t.createObjectStore(this.backupStoreName)},await new Promise(((e,a)=>{t.onsuccess=()=>{t.result.close(),e()},t.onerror=()=>{a(new Error(`Failed to upgrade IndexedDB database: ${this.dbName}`))}})),this.db=await new Promise(((e,t)=>{const a=indexedDB.open(this.dbName);a.onsuccess=()=>{const t=a.result;e(t)},a.onerror=()=>{t(new Error(`Failed to open IndexedDB database: ${this.dbName}`))}}))}this.purgeInvalidCacheTimer=window.setTimeout((async()=>{this.purgeInvalidCacheTimer=null,this.purgeInvalidCacheFiles()}),6e4),this.purgeInvalidBackupTimer=window.setTimeout((async()=>{this.purgeInvalidBackupTimer=null,this.purgeInvalidBackupFiles()}),12e4)}finally{this.isInitializing=!1,this.initializationNotice&&(new obsidian_module.Notice(\"Excalidraw Image Cache is Initialized - You may now retry opening your damaged drawing.\"),this.initializationNotice=!1),console.log(\"Initialized Excalidraw Image Cache\")}}}async purgeInvalidCacheFiles(){return new Promise(((e,t)=>{const a=this.db.transaction(this.cacheStoreName,\"readwrite\"),i=a.objectStore(this.cacheStoreName),n=this.app.vault.getFiles(),r=[],s=i.openCursor();s.onsuccess=s=>{const o=s.target.result;if(o){const e=o.key,t=e.split(\"#\").length-1<12,a=e.split(\"#\")[0],s=n.some((e=>e.path===a)),l=s?n.find((e=>e.path===a)):null;(t||!l||l&&l.stat.mtime>o.value.mtime||!o.value.blob&&!o.value.svg)&&r.push(new Promise(((t,a)=>{const n=i.delete(o.primaryKey);n.onsuccess=()=>t(),n.onerror=t=>{const i=n.error,r=`Failed to delete file with key: ${e}. Error: ${i.message}`;a(new Error(r))}}))),o.continue()}else Promise.all(r).then((()=>{a.commit(),e()})).catch((e=>t(e)))},s.onerror=()=>{const e=s.error;console.log(e);const a=`Failed to purge invalid files from IndexedDB. Error: ${e.message}`;t(new Error(a))}}))}async purgeInvalidBackupFiles(){const e=this.db.transaction(this.backupStoreName,\"readwrite\"),t=e.objectStore(this.backupStoreName),a=this.app.vault.getFiles(),i=[],n=t.openCursor();return await new Promise(((r,s)=>{n.onsuccess=n=>{const o=n.target.result;if(o){const e=o.key,n=a.some((t=>t.path===e));n||i.push(new Promise(((a,i)=>{const n=t.delete(o.primaryKey);n.onsuccess=()=>a(),n.onerror=()=>i(new Error(`Failed to delete backup file with key: ${e}`))}))),o.continue()}else Promise.all(i).then((()=>{e.commit(),r()})).catch((e=>s(e)))},n.onerror=()=>{const e=n.error,t=`Failed to purge invalid backup files from IndexedDB. Error: ${e.message}`;console.log(e),s(new Error(t))}}))}getObjectStore(e,t){return this.db.transaction(t,e).objectStore(t)}async getCacheData(e){const t=this.getObjectStore(\"readonly\",this.cacheStoreName).get(e);return await new Promise(((e,a)=>{t.onsuccess=()=>{const a=t.result;e(a||null)},t.onerror=()=>{a(new Error(\"Failed to retrieve data from IndexedDB.\"))}}))}async getBackupData(e){const t=this.getObjectStore(\"readonly\",this.backupStoreName).get(e);return new Promise(((e,a)=>{t.onsuccess=()=>{const a=t.result;e(a||null)},t.onerror=()=>{a(new Error(\"Failed to retrieve backup data from IndexedDB.\"))}}))}isReady(){return!!this.db&&!this.isInitializing&&!!this.plugin&&this.plugin.settings.allowImageCache}fullyInitialized=!1;async getImageFromCache(e){if(!this.isReady())return null;const t=getKey(e);try{const a=this.fullyInitialized?await this.getCacheData(t):await Promise.race([this.getCacheData(t),new Promise(((e,t)=>setTimeout((()=>{t(void 0)}),100)))]);if(this.fullyInitialized=!0,!a)return;const i=this.app.vault.getAbstractFileByPath(e.filepath.split(\"#\")[0]);if(!(i&&i instanceof obsidian_module.TFile))return;if(a&&a.mtime>=i.stat.mtime){if(hasExcalidrawEmbeddedImagesTreeChanged(i,a.mtime,this.plugin))return;if(a.svg)return convertSVGStringToElement(a.svg);if(this.obsidanURLCache.has(t))return this.obsidanURLCache.get(t);const e=URL.createObjectURL(a.blob);return this.obsidanURLCache.set(t,e),e}return}catch(e){return}}async getBAKFromCache(e){return this.isReady()?this.getBackupData(e):null}addImageToCache(e,t,a){if(!this.isReady())return;const i=this.app.vault.getAbstractFileByPath(e.filepath.split(\"#\")[0]);if(!(i&&i instanceof obsidian_module.TFile))return;let n=null,r=null;a instanceof SVGSVGElement?n=a.outerHTML:r=a;const s={mtime:Date.now(),blob:r,svg:n},o=this.db.transaction(this.cacheStoreName,\"readwrite\").objectStore(this.cacheStoreName),l=getKey(e);o.put(s,l),Boolean(n)||this.obsidanURLCache.set(l,t)}async addBAKToCache(e,t){this.isReady()&&this.db.transaction(this.backupStoreName,\"readwrite\").objectStore(this.backupStoreName).put(t,e)}async removeBAKFromCache(e){if(!this.isReady())return;const t=this.db.transaction(this.backupStoreName,\"readwrite\").objectStore(this.backupStoreName);return new Promise(((a,i)=>{const n=t.delete(e);n.onsuccess=()=>{a()},n.onerror=()=>{i(new Error(`Failed to remove backup file with key: ${e}`))}}))}async clearImageCache(){if(this.isReady())return this.clear(this.cacheStoreName,\"Image cache was cleared\")}async clearBackupCache(){if(this.isReady())return this.clear(this.backupStoreName,\"All backups were cleared\")}async clear(e,t){if(!this.isReady())return;const a=this.db.transaction([e],\"readwrite\").objectStore(e);return new Promise(((i,n)=>{const r=a.clear();r.onsuccess=()=>{new obsidian_module.Notice(t),i()},r.onerror=()=>n(new Error(`Failed to clear ${e}.`))}))}}const imageCache=new ImageCache(DB_NAME,CACHE_STORE,BACKUP_STORE),markdownRendererRecursionWatcthdog=new Set,IMAGE_MIME_TYPES={svg:\"image/svg+xml\",png:\"image/png\",jpg:\"image/jpeg\",jpeg:\"image/jpeg\",gif:\"image/gif\",webp:\"image/webp\",bmp:\"image/bmp\",ico:\"image/x-icon\",avif:\"image/avif\",jfif:\"image/jfif\"},replaceSVGColors=(e,t)=>{if(!t)return e;if(\"string\"==typeof e){for(const[a,i]of Object.entries(t)){if(\"stroke\"===a||\"fill\"===a){const[t,n,r]=e.match(/(<svg[^>]*)(>)/i)||[];if(!t)continue;e=e.replace(t,t.match(new RegExp(`${a}=[\"'][^\"']*[\"']`))?n.replace(new RegExp(`${a}=[\"'][^\"']*[\"']`,\"i\"),`${a}=\"${i}\"`)+r:`${n} ${a}=\"${i}\"${r}`);continue}const t=new RegExp(`fill=\"${a}\"`,\"gi\");e=e.replaceAll(t,`fill=\"${i}\"`);const n=new RegExp(`fill:${a}`,\"gi\");e=e.replaceAll(n,`fill:${i}`);const r=new RegExp(`stroke=\"${a}\"`,\"gi\");e=e.replaceAll(r,`stroke=\"${i}\"`);const s=new RegExp(`stroke:${a}`,\"gi\");e=e.replaceAll(s,`stroke:${i}`)}return e}const a=e=>{if(e instanceof SVGElement){const a=e.getAttribute(\"fill\")?.toLocaleLowerCase(),i=e.getAttribute(\"stroke\")?.toLocaleLowerCase();a&&t[a]&&e.setAttribute(\"fill\",t[a]),i&&t[i]&&e.setAttribute(\"stroke\",t[i])}for(const t of e.childNodes)a(t)};\"fill\"in t&&e.setAttribute(\"fill\",t.fill),\"stroke\"in t&&e.setAttribute(\"stroke\",t.stroke);for(const t of e.childNodes)a(t);return e};class EmbeddedFile{file=null;isSVGwithBitmap=!1;img=\"\";imgInverted=\"\";mtime=0;plugin;mimeType=\"application/octet-stream\";size={height:0,width:0};linkParts;filenameparts;hostPath;attemptCounter=0;isHyperLink=!1;isLocalLink=!1;hyperlink;colorMap=null;pdfPageViewProps;constructor(e,t,a,i){if(this.plugin=e,this.resetImage(t,a),this.file&&(this.plugin.isExcalidrawFile(this.file)||\"svg\"===this.file.extension.toLowerCase()))try{this.colorMap=i?JSON.parse(i.toLocaleLowerCase()):null}catch(e){this.colorMap=null}}get hasSeparateDarkAndLightVersion(){return this.isSVGwithBitmap||this.file&&\"pdf\"===this.file.extension.toLowerCase()}resetImage(e,t){return this.imgInverted=this.img=\"\",this.mtime=0,t.startsWith(\"https://\")||t.startsWith(\"http://\")||t.startsWith(\"ftp://\")||t.startsWith(\"ftps://\")?(this.isHyperLink=!0,void(this.hyperlink=t)):t.startsWith(\"file://\")?(this.isLocalLink=!0,void(this.hyperlink=t)):(this.linkParts=getLinkParts(t),this.hostPath=e,void(this.linkParts.path?(this.linkParts.width||(this.linkParts.width=this.plugin.settings.mdSVGwidth),this.linkParts.height||(this.linkParts.height=this.plugin.settings.mdSVGmaxHeight),this.file=this.plugin.app.metadataCache.getFirstLinkpathDest(this.linkParts.path,e),this.file?(this.filenameparts=getEmbeddedFilenameParts(t),this.filenameparts.filepath=this.file.path):0===this.attemptCounter++&&new obsidian_module.Notice(`Excalidraw Warning: could not find image file: ${t}`,5e3)):new obsidian_module.Notice(`Excalidraw Error\\nIncorrect embedded filename: ${t}`)))}fileChanged(){return!this.isHyperLink&&!this.isLocalLink&&(this.file||(this.file=this.plugin.app.metadataCache.getFirstLinkpathDest(this.linkParts.path,this.hostPath),this.file)?this.mtime!==this.file.stat.mtime:(this.attemptCounter++,!1))}setImage({imgBase64:e,mimeType:t,size:a,isDark:i,isSVGwithBitmap:n,pdfPageViewProps:r}){if(this.file||this.isHyperLink||this.isLocalLink)switch(this.fileChanged()&&(this.imgInverted=this.img=\"\"),this.isSVGwithBitmap=n,this.mtime=this.isHyperLink||this.isLocalLink?0:this.file.stat.mtime,this.pdfPageViewProps=r,this.size=a,this.mimeType=t,i&&this.hasSeparateDarkAndLightVersion){case!0:this.imgInverted=e;break;case!1:this.img=e}}isLoaded(e){if(!this.isHyperLink&&!this.isLocalLink){if(!this.file&&(this.file=this.plugin.app.metadataCache.getFirstLinkpathDest(this.linkParts.path,this.hostPath),!this.file))return this.attemptCounter++,!0;if(this.fileChanged())return!1}return this.hasSeparateDarkAndLightVersion&&e?\"\"!==this.imgInverted:\"\"!==this.img}getImage(e){return this.file||this.isHyperLink||this.isLocalLink?this.hasSeparateDarkAndLightVersion&&e?this.imgInverted:this.img:\"\"}shouldScale(){return this.isHyperLink||this.isLocalLink||!Boolean(this.linkParts&&this.linkParts.original&&this.linkParts.original.endsWith(\"|100%\"))}}class EmbeddedFilesLoader{pdfDocsMap=new Map;plugin;isDark;terminate=!1;uid;constructor(e,t){this.plugin=e,this.isDark=t,this.uid=nanoid()}emptyPDFDocsMap(){this.pdfDocsMap.forEach((e=>e.destroy())),this.pdfDocsMap.clear()}async getObsidianImage(e,t){const a=await this._getObsidianImage(e,t);return this.emptyPDFDocsMap(),a}async getExcalidrawSVG({isDark:e,file:t,depth:a,inFile:i,hasSVGwithBitmap:n,elements:r=[]}){const s=isMaskFile(this.plugin,t),o=hasExportTheme(this.plugin,t)?getExportTheme(this.plugin,t,\"light\"):void 0,l={withBackground:!!hasExportBackground(this.plugin,t)&&getWithBackground(this.plugin,t),withTheme:!!o,isMask:s,skipInliningFonts:!1},c=!Boolean(i instanceof EmbeddedFile?i.colorMap:null)&&this.plugin.settings.allowImageCacheInScene&&t&&imageCache.isReady(),d=Boolean(i instanceof EmbeddedFile&&i.filenameparts),h=d?i.filenameparts:null,p={...d?{...h,inlineFonts:!l.skipInliningFonts}:{filepath:t.path,hasBlockref:!1,hasGroupref:!1,hasTaskbone:!1,hasArearef:!1,hasFrameref:!1,hasClippedFrameref:!1,hasSectionref:!1,inlineFonts:!l.skipInliningFonts,blockref:null,sectionref:null,linkpartReference:null,linkpartAlias:null},isDark:e,previewImageType:PreviewImageType.SVG,scale:1,isTransparent:!l.withBackground},u=c?await imageCache.getImageFromCache(p):void 0,m=u&&u instanceof SVGSVGElement?u:replaceSVGColors(await createSVG(d?h.hasGroupref||h.hasBlockref||h.hasSectionref||h.hasFrameref||h.hasClippedFrameref?h.filepath+h.linkpartReference:t.path:t?.path,!1,d&&h.hasClippedFrameref?{...l,frameRendering:{enabled:!0,name:!1,outline:!1,clip:!0}}:l,this,o,null,null,r,this.plugin,a+1,getExportPadding(this.plugin,t)),i instanceof EmbeddedFile?i.colorMap:null),g=m.querySelectorAll(\"image:not([href^='data:image/svg'])\");if(g.length>0&&(n=!0),n&&e&&!Boolean(u)&&g.forEach((e=>{const t=e.parentElement?.id;m.querySelectorAll(`use[href='#${t}']`).forEach((e=>{e.setAttribute(\"filter\",THEME_FILTER)}))})),!n&&m.getAttribute(\"hasbitmap\")&&(n=!0),c&&!Boolean(u)&&imageCache.addImageToCache(p,\"\",m),!m.hasAttribute(\"width\")&&m.hasAttribute(\"viewBox\")){const e=m.getAttr(\"viewBox\").split(\" \");Boolean(e[2])&&m.setAttribute(\"width\",e[2]),Boolean(e[3])&&m.setAttribute(\"height\",e[3])}return{dataURL:svgToBase64(m.outerHTML),hasSVGwithBitmap:n}}getLocalPath(e){const t=e.split(\"file://\")[1];return t.startsWith(\"/\")?t.substring(1):t}async _getObsidianImage(e,t){if(!this.plugin||!e)return null;const a=this.plugin.app,i=e instanceof EmbeddedFile&&e.isHyperLink,n=e instanceof EmbeddedFile&&e.isLocalLink,r=e instanceof EmbeddedFile?e.hyperlink:\"\",s=e instanceof EmbeddedFile?e.file:e;if(s&&markdownRendererRecursionWatcthdog.has(s))return new obsidian_module.Notice(`Loading of ${s.path}. Please check if there is an inifinite loop of one file embedded in the other.`),null;const o=i?null:e instanceof EmbeddedFile?e.linkParts:{original:s.path,path:s.path,isBlockRef:!1,ref:null,width:this.plugin.settings.mdSVGwidth,height:this.plugin.settings.mdSVGmaxHeight,page:null};let l=!1;const c=!i&&!n&&this.plugin.isExcalidrawFile(s),d=!i&&!n&&\"pdf\"===s.extension.toLowerCase();if(!(i||d||n||IMAGE_TYPES.contains(s.extension)||c||\"md\"===s.extension))return null;const h=i||d||c?null:n?await readLocalFileBinary(this.getLocalPath(e.hyperlink)):await a.vault.readBinary(s);let p=null;if(c){const a=await this.getExcalidrawSVG({isDark:this.isDark,file:s,depth:t,inFile:e,hasSVGwithBitmap:l});p=a.dataURL,l=a.hasSVGwithBitmap}const u=c?p:null,[m,g,f]=d?await this.pdfToDataURL(s,o):[null,null,null];let b=d?\"image/png\":\"image/svg+xml\";const U=i||n?getURLImageExtension(r):s.extension;c||d||(b=getMimeType(U));let E=i?e instanceof EmbeddedFile?await getDataURLFromURL(e.hyperlink,b):null:u??m??(\"svg\"===s?.extension?await getSVGData(a,s,e instanceof EmbeddedFile?e.colorMap:null):\"md\"===s?.extension?null:await getDataURL(h,b));if(!i&&!E&&!n){markdownRendererRecursionWatcthdog.add(s);const e=await this.convertMarkdownToSVG(this.plugin,s,o,t);markdownRendererRecursionWatcthdog.delete(s),E=e.dataURL,l=e.hasSVGwithBitmap}try{const t=d?g:await getImageSize(E);return{mimeType:b,fileId:await generateIdFromFile(i||d||c?(new TextEncoder).encode(E).buffer:h,e instanceof EmbeddedFile?e.filenameparts?.linkpartReference:void 0),dataURL:E,created:i||n?0:s.stat.mtime,hasSVGwithBitmap:l,size:t,pdfPageViewProps:f}}catch(e){return null}}async loadSceneFiles({excalidrawData:e,addFiles:t,depth:a,isThemeChange:i=!1,fileIDWhiteList:n}){if(a>7)return void new obsidian_module.Notice(t$d(\"INFINITE_LOOP_WARNING\")+a.toString(),6e3);const r=e.getFileEntries();let s;void 0===this.isDark&&(this.isDark=\"dark\"===e?.scene?.appState?.theme);const o=[];o.push([]);let l=0;const c=setInterval((()=>{if(0!==o[l].length){try{t(o[l],this.isDark,!1)}catch(e){errorlog({where:\"EmbeddedFileLoader.loadSceneFiles\",error:e})}o.push([]),l++}}),1200),d=function*(){for(;!(s=r.next()).done;){if(n&&!n.has(s.value[0]))continue;const e=s.value[1],t=s.value[0];yield promiseTry((async()=>{if(!this.terminate)if(e.isLoaded(this.isDark)){if(e.hasSeparateDarkAndLightVersion&&(0!==a||i)){const a={mimeType:e.mimeType,id:t,dataURL:e.getImage(this.isDark),created:e.mtime,size:e.size,hasSVGwithBitmap:e.isSVGwithBitmap,shouldScale:e.shouldScale(),pdfPageViewProps:e.pdfPageViewProps};o[l].push(a)}}else{const i=await this._getObsidianImage(e,a);if(i){const a={mimeType:i.mimeType,id:t,dataURL:i.dataURL,created:i.created,size:i.size,hasSVGwithBitmap:i.hasSVGwithBitmap,shouldScale:e.shouldScale(),pdfPageViewProps:i.pdfPageViewProps};o[l].push(a)}}}))}let t;const c=e.getEquationEntries();for(;!(t=c.next()).done;){if(n&&!n.has(t.value[0]))continue;const a=t.value[1],i=t.value[0];yield promiseTry((async()=>{if(!this.terminate&&!e.getEquation(i).isLoaded){const e=a.latex,t=await tex2dataURL(e,4,this.plugin);if(t){const e={mimeType:t.mimeType,id:i,dataURL:t.dataURL,created:t.created,size:t.size,hasSVGwithBitmap:!1,shouldScale:!0};o[l].push(e)}}}))}if(shouldRenderMermaid()){const t=getMermaidImageElements(e.scene.elements);for(const e of t)yield promiseTry((async()=>{if(this.terminate)return;const t=getMermaidText(e),i=await mermaidToExcalidraw(t,{themeVariables:{fontSize:\"20\"}},!0);if(i)if(i?.files)for(const t in i.files){const a={...i.files[t],id:e.fileId,created:Date.now(),hasSVGwithBitmap:!1,shouldScale:!0,size:await getImageSize(i.files[t].dataURL)};o[l].push(a)}else if(i?.elements){if(this.terminate)return;const t=await this.getExcalidrawSVG({isDark:this.isDark,file:null,depth:a,inFile:null,hasSVGwithBitmap:!1,elements:i.elements});if(t?.dataURL){const a=await getImageSize(t.dataURL),i={mimeType:\"image/svg+xml\",id:e.fileId,dataURL:t.dataURL,created:Date.now(),hasSVGwithBitmap:t.hasSVGwithBitmap,size:a,shouldScale:!0};o[l].push(i)}}}))}}.bind(this)(),h=this.plugin.settings.renderingConcurrency;if(await new PromisePool(d,h).all(),clearInterval(c),this.emptyPDFDocsMap(),this.terminate)t(void 0,this.isDark,!0);else try{t(o[l],this.isDark,!0)}catch(e){errorlog({where:\"EmbeddedFileLoader.loadSceneFiles\",error:e})}}async pdfToDataURL(e,t){try{let a=0,i=0;const n=this.pdfDocsMap.get(e.path)??await getPDFDoc(e);this.pdfDocsMap.has(e.path)||this.pdfDocsMap.set(e.path,n);const r=isNaN(t.page)?1:t.page??1,s=this.plugin.settings.pdfScale,o=t.ref.split(\"rect=\")[1]?.split(\",\").map((e=>parseInt(e))),l=o&&4===o.length&&o.every((e=>!isNaN(e)));let c;const d=async e=>{const t=createEl(\"canvas\"),r=t.getContext(\"2d\"),d=await n.getPage(e),h=d.getViewport({scale:s});i=t.height=Math.round(h.height),a=t.width=Math.round(h.width);const p={canvasContext:r,background:\"rgba(0,0,0,0)\",viewport:h};for(let e=0;e<4;e++)try{await d.render(p).promise;break}catch(t){if(3===e)throw t;await sleep(50*(e+1));continue}const[u,m,g,f]=d.view;if(c={left:u,bottom:m,right:g,top:f},c.rotate=d.rotate,l){const e=f-m,n=g-u;if(!d.rotate||0===d.rotate)return a=(o[2]-o[0])*s,i=(o[3]-o[1])*s,cropCanvas(t,{left:(o[0]-u)*s,top:(m+e-o[3])*s,width:a,height:i});if(90===d.rotate)return a=(o[3]-o[1])*s,i=(o[2]-o[0])*s,cropCanvas(t,{left:o[1]*s,top:(e-o[2])*s,width:a,height:i});if(180===d.rotate)return a=(o[2]-o[0])*s,i=(o[3]-o[1])*s,cropCanvas(t,{left:(n-o[2])*s,top:o[1]*s,width:a,height:i});if(270===d.rotate)return a=(o[3]-o[1])*s,i=(o[2]-o[0])*s,cropCanvas(t,{left:(n-o[3])*s,top:o[0]*s,width:a,height:i})}return t},h=await d(r);if(h){if(this.isDark){const e=h.getContext(\"2d\");if(e)try{const t=e.getImageData(0,0,h.width,h.height),a=t.data;for(let e=0;e<a.length;e+=4)a[e]=255-a[e],a[e+1]=255-a[e+1],a[e+2]=255-a[e+2];e.putImageData(t,0,0)}catch(e){}}const e=[`data:image/png;base64,${await new Promise(((e,t)=>{h.toBlob((async t=>{const a=await blobToBase64(t);e(a)}))}))}`,{width:a,height:i},c];return h.width=0,h.height=0,e}}catch(e){return console.log(e),[null,null,null]}}async convertMarkdownToSVG(e,t,a,i){let n=!1;const r=await getTransclusion(a,e.app,t);let s=(r.leadingHashes??\"\")+r.contents;\"\"===s&&(s=\"# Empty markdown file\\nCTRL+Click here to open the file for editing in the current active pane, or CTRL+SHIFT+Click to open it in an adjacent pane.\");const o=e.app.metadataCache.getFileCache(t);let l,c=e.settings.mdFont;switch(o?.frontmatter&&Boolean(o.frontmatter[FRONTMATTER_KEYS.font.name])&&(c=o.frontmatter[FRONTMATTER_KEYS.font.name]),c){case\"Virgil\":l=await getCSSFontDefinition(1);break;case\"Cascadia\":l=await getCSSFontDefinition(3);break;case\"Assistant\":case\"Helvetica\":l=await getCSSFontDefinition(2);break;case\"Excalifont\":l=await getCSSFontDefinition(5);break;case\"Nunito\":l=await getCSSFontDefinition(6);break;case\"Lilita One\":l=await getCSSFontDefinition(7);break;case\"Comic Shanns\":l=await getCSSFontDefinition(8);break;case\"Liberation Sans\":l=await getCSSFontDefinition(9);break;case\"\":l=\"\";break;default:const a=await getFontDataURL(e.app,c,t.path);l=a.fontDef,c=a.fontName}o?.frontmatter&&null!==o.frontmatter.banner&&(s=s.replace(/banner:\\s*.*/,\"\"));const d=o?.frontmatter?o.frontmatter[FRONTMATTER_KEYS[\"font-color\"].name]??e.settings.mdFontColor:e.settings.mdFontColor;let h=o?.frontmatter?o.frontmatter[FRONTMATTER_KEYS[\"md-css\"].name]??\"\":\"\",p=!1;if(h&&\"\"!==h){const a=e.app.metadataCache.getFirstLinkpathDest(h,t.path);a&&(h=await e.app.vault.read(a),p=!0)}if(!p)if(e.settings.mdCSS&&\"\"!==e.settings.mdCSS){const a=e.app.metadataCache.getFirstLinkpathDest(e.settings.mdCSS,t.path);h+=a?`\\n${await e.app.vault.read(a)}`:DEFAULT_MD_EMBED_CSS}else h+=DEFAULT_MD_EMBED_CSS;const u=o?.frontmatter?o.frontmatter[FRONTMATTER_KEYS[\"border-color\"].name]??e.settings.mdBorderColor:e.settings.mdBorderColor;u&&\"\"!==u&&!h.match(/svg/i)&&(h+=`svg{border:2px solid;color:${u};transform:scale(.95)}`);let m=` width=\"${a.width}px\" height=\"100000\"`,g=` width=\"${a.width}px\" height=\"100%\"`;const f=(e,t,a)=>`<svg xmlns=\"http://www.w3.org/2000/svg\"${m}>${a?`<style>${a}</style>`:\"\"}<foreignObject x=\"0\" y=\"0\"${g}>${e}${t}</foreignObject>${\"\"!==l?`<defs><style>${l}</style></defs>`:\"\"}</svg>`,b=createDiv();b.setAttribute(\"xmlns\",\"http://www.w3.org/1999/xhtml\"),b.setAttribute(\"class\",\"excalidraw-md-host\"),\"\"!==c&&(b.style.fontFamily=c),b.style.overflow=\"auto\",b.style.display=\"block\",b.style.color=d&&\"\"!==d?d:\"initial\",await obsidian_module.MarkdownRenderer.render(this.plugin.app,s,b,t.path,this.plugin),b.querySelectorAll(\":scope > *[class^='frontmatter']\").forEach((e=>b.removeChild(e))),await replaceBlobWithBase64(b);const U=Array.from(b.querySelectorAll(\"span[class='internal-embed']\"));for(let a=0;a<U.length;a++){const i=U[a],n=i.getAttribute(\"src\");if(!n)continue;const r=i.getAttribute(\"width\"),s=i.getAttribute(\"height\"),o=new EmbeddedFile(e,t.path,n);if(!o.file)continue;const l=await this._getObsidianImage(o,1),c=createEl(\"img\");r&&c.setAttribute(\"width\",r),s&&c.setAttribute(\"height\",s),c.src=l.dataURL,i.replaceWith(c)}const E=document.body.createDiv();E.style.display=\"none\";const w=E.createEl(\"iframe\").contentWindow.document;if(h){const e=w.createElement(\"style\");e.type=\"text/css\",e.innerHTML=h,w.head.appendChild(e)}const y=w.importNode(b,!0);w.body.appendChild(y);const v=createDiv();v.setAttribute(\"class\",\"excalidraw-md-footer\"),w.body.appendChild(v),w.body.querySelectorAll(\"*\").forEach((e=>{const t=e.style,a=window.getComputedStyle(e);let i=\"\";for(const e in t)t.hasOwnProperty(e)&&(i+=`${e}: ${a[e]};`);e.setAttribute(\"style\",i)}));const T=(new XMLSerializer).serializeToString(y),S=(new XMLSerializer).serializeToString(v);document.body.removeChild(E);const _=new DOMParser,C=_.parseFromString(f(T,S),\"image/svg+xml\").firstElementChild,I=createDiv();I.appendChild(C),document.body.appendChild(I);const x=C.querySelector(\".excalidraw-md-footer\").scrollHeight,A=C.querySelector(\".excalidraw-md-host\").scrollHeight+x,k=A<=a.height?A:a.height;document.body.removeChild(I),m=` width=\"${a.width}px\" height=\"${k}px\"`,g=` width=\"${a.width}px\" height=\"${k}px\"`,b.style.height=k-x+\"px\",b.style.overflow=\"hidden\";const O=b.querySelectorAll(\"img:not([src^='data:image/svg+xml'])\");O.length>0&&(n=!0),n&&this.isDark&&O.forEach((e=>{e instanceof HTMLImageElement&&(e.style.filter=THEME_FILTER)}));const R=f((new XMLSerializer).serializeToString(b),'<div class=\"excalidraw-md-footer\"></div>',h);return e.ea.mostRecentMarkdownSVG=_.parseFromString(R,\"image/svg+xml\").firstElementChild,{dataURL:svgToBase64(R),hasSVGwithBitmap:n}}}const getSVGData=async(e,t,a)=>svgToBase64(replaceSVGColors(await e.vault.read(t),a)),generateIdFromFile=async(e,t)=>{let a;try{const i=new Uint8Array(e);let n;if(t){const e=(new TextEncoder).encode(t);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}else n=i;const r=n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength),s=await window.crypto.subtle.digest(\"SHA-1\",r);a=Array.from(new Uint8Array(s)).map((e=>e.toString(16).padStart(2,\"0\"))).join(\"\")}catch(e){errorlog({where:\"EmbeddedFileLoader.generateIdFromFile\",error:e}),a=fileid()}return a},replaceBlobWithBase64=async e=>{const t=e.querySelectorAll('img[src^=\"blob:app://obsidian.md\"]');for(let e of t){const t=e.src;try{const a=await fetch(t),i=await a.blob(),n=await blobToBase64(i);e.src=`data:${i.type};base64,${n}`}catch(e){console.error(`Failed to fetch or convert blob: ${t}`,e)}}};function isNothing(e){return null==e}function isObject(e){return\"object\"==typeof e&&null!==e}function toArray(e){return Array.isArray(e)?e:isNothing(e)?[]:[e]}function extend(e,t){var a,i,n,r;if(t)for(a=0,i=(r=Object.keys(t)).length;a<i;a+=1)e[n=r[a]]=t[n];return e}function repeat(e,t){var a,i=\"\";for(a=0;a<t;a+=1)i+=e;return i}function isNegativeZero(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}var isNothing_1=isNothing,isObject_1=isObject,toArray_1=toArray,repeat_1=repeat,isNegativeZero_1=isNegativeZero,extend_1=extend,common={isNothing:isNothing_1,isObject:isObject_1,toArray:toArray_1,repeat:repeat_1,isNegativeZero:isNegativeZero_1,extend:extend_1};function formatError(e,t){var a=\"\",i=e.reason||\"(unknown reason)\";return e.mark?(e.mark.name&&(a+='in \"'+e.mark.name+'\" '),a+=\"(\"+(e.mark.line+1)+\":\"+(e.mark.column+1)+\")\",!t&&e.mark.snippet&&(a+=\"\\n\\n\"+e.mark.snippet),i+\" \"+a):i}function YAMLException$1(e,t){Error.call(this),this.name=\"YAMLException\",this.reason=e,this.mark=t,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||\"\"}YAMLException$1.prototype=Object.create(Error.prototype),YAMLException$1.prototype.constructor=YAMLException$1,YAMLException$1.prototype.toString=function(e){return this.name+\": \"+formatError(this,e)};var exception=YAMLException$1;function getLine(e,t,a,i,n){var r=\"\",s=\"\",o=Math.floor(n/2)-1;return i-t>o&&(t=i-o+(r=\" ... \").length),a-i>o&&(a=i+o-(s=\" ...\").length),{str:r+e.slice(t,a).replace(/\\t/g,\"\u2192\")+s,pos:i-t+r.length}}function padStart(e,t){return common.repeat(\" \",t-e.length)+e}function makeSnippet(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),\"number\"!=typeof t.indent&&(t.indent=1),\"number\"!=typeof t.linesBefore&&(t.linesBefore=3),\"number\"!=typeof t.linesAfter&&(t.linesAfter=2);for(var a,i=/\\r?\\n|\\r|\\0/g,n=[0],r=[],s=-1;a=i.exec(e.buffer);)r.push(a.index),n.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var o,l,c=\"\",d=Math.min(e.line+t.linesAfter,r.length).toString().length,h=t.maxLength-(t.indent+d+3);for(o=1;o<=t.linesBefore&&!(s-o<0);o++)l=getLine(e.buffer,n[s-o],r[s-o],e.position-(n[s]-n[s-o]),h),c=common.repeat(\" \",t.indent)+padStart((e.line-o+1).toString(),d)+\" | \"+l.str+\"\\n\"+c;for(l=getLine(e.buffer,n[s],r[s],e.position,h),c+=common.repeat(\" \",t.indent)+padStart((e.line+1).toString(),d)+\" | \"+l.str+\"\\n\",c+=common.repeat(\"-\",t.indent+d+3+l.pos)+\"^\\n\",o=1;o<=t.linesAfter&&!(s+o>=r.length);o++)l=getLine(e.buffer,n[s+o],r[s+o],e.position-(n[s]-n[s+o]),h),c+=common.repeat(\" \",t.indent)+padStart((e.line+o+1).toString(),d)+\" | \"+l.str+\"\\n\";return c.replace(/\\n$/,\"\")}var snippet=makeSnippet,TYPE_CONSTRUCTOR_OPTIONS=[\"kind\",\"multi\",\"resolve\",\"construct\",\"instanceOf\",\"predicate\",\"represent\",\"representName\",\"defaultStyle\",\"styleAliases\"],YAML_NODE_KINDS=[\"scalar\",\"sequence\",\"mapping\"];function compileStyleAliases(e){var t={};return null!==e&&Object.keys(e).forEach((function(a){e[a].forEach((function(e){t[String(e)]=a}))})),t}function Type$1(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===TYPE_CONSTRUCTOR_OPTIONS.indexOf(t))throw new exception('Unknown option \"'+t+'\" is met in definition of \"'+e+'\" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=compileStyleAliases(t.styleAliases||null),-1===YAML_NODE_KINDS.indexOf(this.kind))throw new exception('Unknown kind \"'+this.kind+'\" is specified for \"'+e+'\" YAML type.')}var type$1=Type$1;function compileList(e,t){var a=[];return e[t].forEach((function(e){var t=a.length;a.forEach((function(a,i){a.tag===e.tag&&a.kind===e.kind&&a.multi===e.multi&&(t=i)})),a[t]=e})),a}function compileMap(){var e,t,a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(a.multi[e.kind].push(e),a.multi.fallback.push(e)):a[e.kind][e.tag]=a.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return a}function Schema$1(e){return this.extend(e)}Schema$1.prototype.extend=function(e){var t=[],a=[];if(e instanceof type$1)a.push(e);else if(Array.isArray(e))a=a.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new exception(\"Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })\");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(a=a.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof type$1))throw new exception(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\");if(e.loadKind&&\"scalar\"!==e.loadKind)throw new exception(\"There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.\");if(e.multi)throw new exception(\"There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.\")})),a.forEach((function(e){if(!(e instanceof type$1))throw new exception(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\")}));var i=Object.create(Schema$1.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(a),i.compiledImplicit=compileList(i,\"implicit\"),i.compiledExplicit=compileList(i,\"explicit\"),i.compiledTypeMap=compileMap(i.compiledImplicit,i.compiledExplicit),i};var schema=Schema$1,str=new type$1(\"tag:yaml.org,2002:str\",{kind:\"scalar\",construct:function(e){return null!==e?e:\"\"}}),seq=new type$1(\"tag:yaml.org,2002:seq\",{kind:\"sequence\",construct:function(e){return null!==e?e:[]}}),map=new type$1(\"tag:yaml.org,2002:map\",{kind:\"mapping\",construct:function(e){return null!==e?e:{}}}),failsafe=new schema({explicit:[str,seq,map]});function resolveYamlNull(e){if(null===e)return!0;var t=e.length;return 1===t&&\"~\"===e||4===t&&(\"null\"===e||\"Null\"===e||\"NULL\"===e)}function constructYamlNull(){return null}function isNull(e){return null===e}var _null=new type$1(\"tag:yaml.org,2002:null\",{kind:\"scalar\",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return\"~\"},lowercase:function(){return\"null\"},uppercase:function(){return\"NULL\"},camelcase:function(){return\"Null\"},empty:function(){return\"\"}},defaultStyle:\"lowercase\"});function resolveYamlBoolean(e){if(null===e)return!1;var t=e.length;return 4===t&&(\"true\"===e||\"True\"===e||\"TRUE\"===e)||5===t&&(\"false\"===e||\"False\"===e||\"FALSE\"===e)}function constructYamlBoolean(e){return\"true\"===e||\"True\"===e||\"TRUE\"===e}function isBoolean(e){return\"[object Boolean]\"===Object.prototype.toString.call(e)}var bool=new type$1(\"tag:yaml.org,2002:bool\",{kind:\"scalar\",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(e){return e?\"true\":\"false\"},uppercase:function(e){return e?\"TRUE\":\"FALSE\"},camelcase:function(e){return e?\"True\":\"False\"}},defaultStyle:\"lowercase\"});function isHexCode(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function isOctCode(e){return 48<=e&&e<=55}function isDecCode(e){return 48<=e&&e<=57}function resolveYamlInteger(e){if(null===e)return!1;var t,a=e.length,i=0,n=!1;if(!a)return!1;if(\"-\"!==(t=e[i])&&\"+\"!==t||(t=e[++i]),\"0\"===t){if(i+1===a)return!0;if(\"b\"===(t=e[++i])){for(i++;i<a;i++)if(\"_\"!==(t=e[i])){if(\"0\"!==t&&\"1\"!==t)return!1;n=!0}return n&&\"_\"!==t}if(\"x\"===t){for(i++;i<a;i++)if(\"_\"!==(t=e[i])){if(!isHexCode(e.charCodeAt(i)))return!1;n=!0}return n&&\"_\"!==t}if(\"o\"===t){for(i++;i<a;i++)if(\"_\"!==(t=e[i])){if(!isOctCode(e.charCodeAt(i)))return!1;n=!0}return n&&\"_\"!==t}}if(\"_\"===t)return!1;for(;i<a;i++)if(\"_\"!==(t=e[i])){if(!isDecCode(e.charCodeAt(i)))return!1;n=!0}return!(!n||\"_\"===t)}function constructYamlInteger(e){var t,a=e,i=1;if(-1!==a.indexOf(\"_\")&&(a=a.replace(/_/g,\"\")),\"-\"!==(t=a[0])&&\"+\"!==t||(\"-\"===t&&(i=-1),t=(a=a.slice(1))[0]),\"0\"===a)return 0;if(\"0\"===t){if(\"b\"===a[1])return i*parseInt(a.slice(2),2);if(\"x\"===a[1])return i*parseInt(a.slice(2),16);if(\"o\"===a[1])return i*parseInt(a.slice(2),8)}return i*parseInt(a,10)}function isInteger(e){return\"[object Number]\"===Object.prototype.toString.call(e)&&e%1==0&&!common.isNegativeZero(e)}var int=new type$1(\"tag:yaml.org,2002:int\",{kind:\"scalar\",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(e){return e>=0?\"0b\"+e.toString(2):\"-0b\"+e.toString(2).slice(1)},octal:function(e){return e>=0?\"0o\"+e.toString(8):\"-0o\"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?\"0x\"+e.toString(16).toUpperCase():\"-0x\"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:\"decimal\",styleAliases:{binary:[2,\"bin\"],octal:[8,\"oct\"],decimal:[10,\"dec\"],hexadecimal:[16,\"hex\"]}}),YAML_FLOAT_PATTERN=new RegExp(\"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$\");function resolveYamlFloat(e){return null!==e&&!(!YAML_FLOAT_PATTERN.test(e)||\"_\"===e[e.length-1])}function constructYamlFloat(e){var t,a;return a=\"-\"===(t=e.replace(/_/g,\"\").toLowerCase())[0]?-1:1,\"+-\".indexOf(t[0])>=0&&(t=t.slice(1)),\".inf\"===t?1===a?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:\".nan\"===t?NaN:a*parseFloat(t,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(e,t){var a;if(isNaN(e))switch(t){case\"lowercase\":return\".nan\";case\"uppercase\":return\".NAN\";case\"camelcase\":return\".NaN\"}else if(Number.POSITIVE_INFINITY===e)switch(t){case\"lowercase\":return\".inf\";case\"uppercase\":return\".INF\";case\"camelcase\":return\".Inf\"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case\"lowercase\":return\"-.inf\";case\"uppercase\":return\"-.INF\";case\"camelcase\":return\"-.Inf\"}else if(common.isNegativeZero(e))return\"-0.0\";return a=e.toString(10),SCIENTIFIC_WITHOUT_DOT.test(a)?a.replace(\"e\",\".e\"):a}function isFloat(e){return\"[object Number]\"===Object.prototype.toString.call(e)&&(e%1!=0||common.isNegativeZero(e))}var float=new type$1(\"tag:yaml.org,2002:float\",{kind:\"scalar\",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:\"lowercase\"}),json=failsafe.extend({implicit:[_null,bool,int,float]}),core=json,YAML_DATE_REGEXP=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$\"),YAML_TIMESTAMP_REGEXP=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$\");function resolveYamlTimestamp(e){return null!==e&&(null!==YAML_DATE_REGEXP.exec(e)||null!==YAML_TIMESTAMP_REGEXP.exec(e))}function constructYamlTimestamp(e){var t,a,i,n,r,s,o,l,c=0,d=null;if(null===(t=YAML_DATE_REGEXP.exec(e))&&(t=YAML_TIMESTAMP_REGEXP.exec(e)),null===t)throw new Error(\"Date resolve error\");if(a=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(a,i,n));if(r=+t[4],s=+t[5],o=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+=\"0\";c=+c}return t[9]&&(d=6e4*(60*+t[10]+ +(t[11]||0)),\"-\"===t[9]&&(d=-d)),l=new Date(Date.UTC(a,i,n,r,s,o,c)),d&&l.setTime(l.getTime()-d),l}function representYamlTimestamp(e){return e.toISOString()}var timestamp=new type$1(\"tag:yaml.org,2002:timestamp\",{kind:\"scalar\",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});function resolveYamlMerge(e){return\"<<\"===e||null===e}var merge=new type$1(\"tag:yaml.org,2002:merge\",{kind:\"scalar\",resolve:resolveYamlMerge}),BASE64_MAP=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r\";function resolveYamlBinary(e){if(null===e)return!1;var t,a,i=0,n=e.length,r=BASE64_MAP;for(a=0;a<n;a++)if(!((t=r.indexOf(e.charAt(a)))>64)){if(t<0)return!1;i+=6}return i%8==0}function constructYamlBinary(e){var t,a,i=e.replace(/[\\r\\n=]/g,\"\"),n=i.length,r=BASE64_MAP,s=0,o=[];for(t=0;t<n;t++)t%4==0&&t&&(o.push(s>>16&255),o.push(s>>8&255),o.push(255&s)),s=s<<6|r.indexOf(i.charAt(t));return 0==(a=n%4*6)?(o.push(s>>16&255),o.push(s>>8&255),o.push(255&s)):18===a?(o.push(s>>10&255),o.push(s>>2&255)):12===a&&o.push(s>>4&255),new Uint8Array(o)}function representYamlBinary(e){var t,a,i=\"\",n=0,r=e.length,s=BASE64_MAP;for(t=0;t<r;t++)t%3==0&&t&&(i+=s[n>>18&63],i+=s[n>>12&63],i+=s[n>>6&63],i+=s[63&n]),n=(n<<8)+e[t];return 0==(a=r%3)?(i+=s[n>>18&63],i+=s[n>>12&63],i+=s[n>>6&63],i+=s[63&n]):2===a?(i+=s[n>>10&63],i+=s[n>>4&63],i+=s[n<<2&63],i+=s[64]):1===a&&(i+=s[n>>2&63],i+=s[n<<4&63],i+=s[64],i+=s[64]),i}function isBinary(e){return\"[object Uint8Array]\"===Object.prototype.toString.call(e)}var binary=new type$1(\"tag:yaml.org,2002:binary\",{kind:\"scalar\",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary}),_hasOwnProperty$3=Object.prototype.hasOwnProperty,_toString$2=Object.prototype.toString;function resolveYamlOmap(e){if(null===e)return!0;var t,a,i,n,r,s=[],o=e;for(t=0,a=o.length;t<a;t+=1){if(i=o[t],r=!1,\"[object Object]\"!==_toString$2.call(i))return!1;for(n in i)if(_hasOwnProperty$3.call(i,n)){if(r)return!1;r=!0}if(!r)return!1;if(-1!==s.indexOf(n))return!1;s.push(n)}return!0}function constructYamlOmap(e){return null!==e?e:[]}var omap=new type$1(\"tag:yaml.org,2002:omap\",{kind:\"sequence\",resolve:resolveYamlOmap,construct:constructYamlOmap}),_toString$1=Object.prototype.toString;function resolveYamlPairs(e){if(null===e)return!0;var t,a,i,n,r,s=e;for(r=new Array(s.length),t=0,a=s.length;t<a;t+=1){if(i=s[t],\"[object Object]\"!==_toString$1.call(i))return!1;if(1!==(n=Object.keys(i)).length)return!1;r[t]=[n[0],i[n[0]]]}return!0}function constructYamlPairs(e){if(null===e)return[];var t,a,i,n,r,s=e;for(r=new Array(s.length),t=0,a=s.length;t<a;t+=1)i=s[t],n=Object.keys(i),r[t]=[n[0],i[n[0]]];return r}var pairs=new type$1(\"tag:yaml.org,2002:pairs\",{kind:\"sequence\",resolve:resolveYamlPairs,construct:constructYamlPairs}),_hasOwnProperty$2=Object.prototype.hasOwnProperty;function resolveYamlSet(e){if(null===e)return!0;var t,a=e;for(t in a)if(_hasOwnProperty$2.call(a,t)&&null!==a[t])return!1;return!0}function constructYamlSet(e){return null!==e?e:{}}var set=new type$1(\"tag:yaml.org,2002:set\",{kind:\"mapping\",resolve:resolveYamlSet,construct:constructYamlSet}),_default=core.extend({implicit:[timestamp,merge],explicit:[binary,omap,pairs,set]}),_hasOwnProperty$1=Object.prototype.hasOwnProperty,CONTEXT_FLOW_IN=1,CONTEXT_FLOW_OUT=2,CONTEXT_BLOCK_IN=3,CONTEXT_BLOCK_OUT=4,CHOMPING_CLIP=1,CHOMPING_STRIP=2,CHOMPING_KEEP=3,PATTERN_NON_PRINTABLE=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,PATTERN_NON_ASCII_LINE_BREAKS=/[\\x85\\u2028\\u2029]/,PATTERN_FLOW_INDICATORS=/[,\\[\\]\\{\\}]/,PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\\-]+!)$/i,PATTERN_TAG_URI=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;function _class(e){return Object.prototype.toString.call(e)}function is_EOL(e){return 10===e||13===e}function is_WHITE_SPACE(e){return 9===e||32===e}function is_WS_OR_EOL(e){return 9===e||32===e||10===e||13===e}function is_FLOW_INDICATOR(e){return 44===e||91===e||93===e||123===e||125===e}function fromHexCode(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function escapedHexLen(e){return 120===e?2:117===e?4:85===e?8:0}function fromDecimalCode(e){return 48<=e&&e<=57?e-48:-1}function simpleEscapeSequence(e){return 48===e?\"\\0\":97===e?\"\u0007\":98===e?\"\\b\":116===e||9===e?\"\\t\":110===e?\"\\n\":118===e?\"\\v\":102===e?\"\\f\":114===e?\"\\r\":101===e?\"\u001b\":32===e?\" \":34===e?'\"':47===e?\"/\":92===e?\"\\\\\":78===e?\"\n\":95===e?\"\u00a0\":76===e?\"\\u2028\":80===e?\"\\u2029\":\"\"}function charFromCodepoint(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var simpleEscapeCheck=new Array(256),simpleEscapeMap=new Array(256),i$b=0;i$b<256;i$b++)simpleEscapeCheck[i$b]=simpleEscapeSequence(i$b)?1:0,simpleEscapeMap[i$b]=simpleEscapeSequence(i$b);function State$1(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||_default,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(e,t){var a={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return a.snippet=snippet(a),new exception(t,a)}function throwError(e,t){throw generateError(e,t)}function throwWarning(e,t){e.onWarning&&e.onWarning.call(null,generateError(e,t))}var directiveHandlers={YAML:function(e,t,a){var i,n,r;null!==e.version&&throwError(e,\"duplication of %YAML directive\"),1!==a.length&&throwError(e,\"YAML directive accepts exactly one argument\"),null===(i=/^([0-9]+)\\.([0-9]+)$/.exec(a[0]))&&throwError(e,\"ill-formed argument of the YAML directive\"),n=parseInt(i[1],10),r=parseInt(i[2],10),1!==n&&throwError(e,\"unacceptable YAML version of the document\"),e.version=a[0],e.checkLineBreaks=r<2,1!==r&&2!==r&&throwWarning(e,\"unsupported YAML version of the document\")},TAG:function(e,t,a){var i,n;2!==a.length&&throwError(e,\"TAG directive accepts exactly two arguments\"),i=a[0],n=a[1],PATTERN_TAG_HANDLE.test(i)||throwError(e,\"ill-formed tag handle (first argument) of the TAG directive\"),_hasOwnProperty$1.call(e.tagMap,i)&&throwError(e,'there is a previously declared suffix for \"'+i+'\" tag handle'),PATTERN_TAG_URI.test(n)||throwError(e,\"ill-formed tag prefix (second argument) of the TAG directive\");try{n=decodeURIComponent(n)}catch(t){throwError(e,\"tag prefix is malformed: \"+n)}e.tagMap[i]=n}};function captureSegment(e,t,a,i){var n,r,s,o;if(t<a){if(o=e.input.slice(t,a),i)for(n=0,r=o.length;n<r;n+=1)9===(s=o.charCodeAt(n))||32<=s&&s<=1114111||throwError(e,\"expected valid JSON character\");else PATTERN_NON_PRINTABLE.test(o)&&throwError(e,\"the stream contains non-printable characters\");e.result+=o}}function mergeMappings(e,t,a,i){var n,r,s,o;for(common.isObject(a)||throwError(e,\"cannot merge mappings; the provided source object is unacceptable\"),s=0,o=(n=Object.keys(a)).length;s<o;s+=1)r=n[s],_hasOwnProperty$1.call(t,r)||(t[r]=a[r],i[r]=!0)}function storeMappingPair(e,t,a,i,n,r,s,o,l){var c,d;if(Array.isArray(n))for(c=0,d=(n=Array.prototype.slice.call(n)).length;c<d;c+=1)Array.isArray(n[c])&&throwError(e,\"nested arrays are not supported inside keys\"),\"object\"==typeof n&&\"[object Object]\"===_class(n[c])&&(n[c]=\"[object Object]\");if(\"object\"==typeof n&&\"[object Object]\"===_class(n)&&(n=\"[object Object]\"),n=String(n),null===t&&(t={}),\"tag:yaml.org,2002:merge\"===i)if(Array.isArray(r))for(c=0,d=r.length;c<d;c+=1)mergeMappings(e,t,r[c],a);else mergeMappings(e,t,r,a);else e.json||_hasOwnProperty$1.call(a,n)||!_hasOwnProperty$1.call(t,n)||(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,throwError(e,\"duplicated mapping key\")),\"__proto__\"===n?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[n]=r,delete a[n];return t}function readLineBreak(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):throwError(e,\"a line break is expected\"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function skipSeparationSpace(e,t,a){for(var i=0,n=e.input.charCodeAt(e.position);0!==n;){for(;is_WHITE_SPACE(n);)9===n&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&35===n)do{n=e.input.charCodeAt(++e.position)}while(10!==n&&13!==n&&0!==n);if(!is_EOL(n))break;for(readLineBreak(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===n;)e.lineIndent++,n=e.input.charCodeAt(++e.position)}return-1!==a&&0!==i&&e.lineIndent<a&&throwWarning(e,\"deficient indentation\"),i}function testDocumentSeparator(e){var t,a=e.position;return!(45!==(t=e.input.charCodeAt(a))&&46!==t||t!==e.input.charCodeAt(a+1)||t!==e.input.charCodeAt(a+2)||(a+=3,0!==(t=e.input.charCodeAt(a))&&!is_WS_OR_EOL(t)))}function writeFoldedLines(e,t){1===t?e.result+=\" \":t>1&&(e.result+=common.repeat(\"\\n\",t-1))}function readPlainScalar(e,t,a){var i,n,r,s,o,l,c,d,h=e.kind,p=e.result;if(is_WS_OR_EOL(d=e.input.charCodeAt(e.position))||is_FLOW_INDICATOR(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d)return!1;if((63===d||45===d)&&(is_WS_OR_EOL(i=e.input.charCodeAt(e.position+1))||a&&is_FLOW_INDICATOR(i)))return!1;for(e.kind=\"scalar\",e.result=\"\",n=r=e.position,s=!1;0!==d;){if(58===d){if(is_WS_OR_EOL(i=e.input.charCodeAt(e.position+1))||a&&is_FLOW_INDICATOR(i))break}else if(35===d){if(is_WS_OR_EOL(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&testDocumentSeparator(e)||a&&is_FLOW_INDICATOR(d))break;if(is_EOL(d)){if(o=e.line,l=e.lineStart,c=e.lineIndent,skipSeparationSpace(e,!1,-1),e.lineIndent>=t){s=!0,d=e.input.charCodeAt(e.position);continue}e.position=r,e.line=o,e.lineStart=l,e.lineIndent=c;break}}s&&(captureSegment(e,n,r,!1),writeFoldedLines(e,e.line-o),n=r=e.position,s=!1),is_WHITE_SPACE(d)||(r=e.position+1),d=e.input.charCodeAt(++e.position)}return captureSegment(e,n,r,!1),!!e.result||(e.kind=h,e.result=p,!1)}function readSingleQuotedScalar(e,t){var a,i,n;if(39!==(a=e.input.charCodeAt(e.position)))return!1;for(e.kind=\"scalar\",e.result=\"\",e.position++,i=n=e.position;0!==(a=e.input.charCodeAt(e.position));)if(39===a){if(captureSegment(e,i,e.position,!0),39!==(a=e.input.charCodeAt(++e.position)))return!0;i=e.position,e.position++,n=e.position}else is_EOL(a)?(captureSegment(e,i,n,!0),writeFoldedLines(e,skipSeparationSpace(e,!1,t)),i=n=e.position):e.position===e.lineStart&&testDocumentSeparator(e)?throwError(e,\"unexpected end of the document within a single quoted scalar\"):(e.position++,n=e.position);throwError(e,\"unexpected end of the stream within a single quoted scalar\")}function readDoubleQuotedScalar(e,t){var a,i,n,r,s,o;if(34!==(o=e.input.charCodeAt(e.position)))return!1;for(e.kind=\"scalar\",e.result=\"\",e.position++,a=i=e.position;0!==(o=e.input.charCodeAt(e.position));){if(34===o)return captureSegment(e,a,e.position,!0),e.position++,!0;if(92===o){if(captureSegment(e,a,e.position,!0),is_EOL(o=e.input.charCodeAt(++e.position)))skipSeparationSpace(e,!1,t);else if(o<256&&simpleEscapeCheck[o])e.result+=simpleEscapeMap[o],e.position++;else if((s=escapedHexLen(o))>0){for(n=s,r=0;n>0;n--)(s=fromHexCode(o=e.input.charCodeAt(++e.position)))>=0?r=(r<<4)+s:throwError(e,\"expected hexadecimal character\");e.result+=charFromCodepoint(r),e.position++}else throwError(e,\"unknown escape sequence\");a=i=e.position}else is_EOL(o)?(captureSegment(e,a,i,!0),writeFoldedLines(e,skipSeparationSpace(e,!1,t)),a=i=e.position):e.position===e.lineStart&&testDocumentSeparator(e)?throwError(e,\"unexpected end of the document within a double quoted scalar\"):(e.position++,i=e.position)}throwError(e,\"unexpected end of the stream within a double quoted scalar\")}function readFlowCollection(e,t){var a,i,n,r,s,o,l,c,d,h,p,u,m=!0,g=e.tag,f=e.anchor,b=Object.create(null);if(91===(u=e.input.charCodeAt(e.position)))s=93,c=!1,r=[];else{if(123!==u)return!1;s=125,c=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),u=e.input.charCodeAt(++e.position);0!==u;){if(skipSeparationSpace(e,!0,t),(u=e.input.charCodeAt(e.position))===s)return e.position++,e.tag=g,e.anchor=f,e.kind=c?\"mapping\":\"sequence\",e.result=r,!0;m?44===u&&throwError(e,\"expected the node content, but found ','\"):throwError(e,\"missed comma between flow collection entries\"),p=null,o=l=!1,63===u&&is_WS_OR_EOL(e.input.charCodeAt(e.position+1))&&(o=l=!0,e.position++,skipSeparationSpace(e,!0,t)),a=e.line,i=e.lineStart,n=e.position,composeNode(e,t,CONTEXT_FLOW_IN,!1,!0),h=e.tag,d=e.result,skipSeparationSpace(e,!0,t),u=e.input.charCodeAt(e.position),!l&&e.line!==a||58!==u||(o=!0,u=e.input.charCodeAt(++e.position),skipSeparationSpace(e,!0,t),composeNode(e,t,CONTEXT_FLOW_IN,!1,!0),p=e.result),c?storeMappingPair(e,r,b,h,d,p,a,i,n):o?r.push(storeMappingPair(e,null,b,h,d,p,a,i,n)):r.push(d),skipSeparationSpace(e,!0,t),44===(u=e.input.charCodeAt(e.position))?(m=!0,u=e.input.charCodeAt(++e.position)):m=!1}throwError(e,\"unexpected end of the stream within a flow collection\")}function readBlockScalar(e,t){var a,i,n,r,s=CHOMPING_CLIP,o=!1,l=!1,c=t,d=0,h=!1;if(124===(r=e.input.charCodeAt(e.position)))i=!1;else{if(62!==r)return!1;i=!0}for(e.kind=\"scalar\",e.result=\"\";0!==r;)if(43===(r=e.input.charCodeAt(++e.position))||45===r)CHOMPING_CLIP===s?s=43===r?CHOMPING_KEEP:CHOMPING_STRIP:throwError(e,\"repeat of a chomping mode identifier\");else{if(!((n=fromDecimalCode(r))>=0))break;0===n?throwError(e,\"bad explicit indentation width of a block scalar; it cannot be less than one\"):l?throwError(e,\"repeat of an indentation width identifier\"):(c=t+n-1,l=!0)}if(is_WHITE_SPACE(r)){do{r=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(r));if(35===r)do{r=e.input.charCodeAt(++e.position)}while(!is_EOL(r)&&0!==r)}for(;0!==r;){for(readLineBreak(e),e.lineIndent=0,r=e.input.charCodeAt(e.position);(!l||e.lineIndent<c)&&32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>c&&(c=e.lineIndent),is_EOL(r))d++;else{if(e.lineIndent<c){s===CHOMPING_KEEP?e.result+=common.repeat(\"\\n\",o?1+d:d):s===CHOMPING_CLIP&&o&&(e.result+=\"\\n\");break}for(i?is_WHITE_SPACE(r)?(h=!0,e.result+=common.repeat(\"\\n\",o?1+d:d)):h?(h=!1,e.result+=common.repeat(\"\\n\",d+1)):0===d?o&&(e.result+=\" \"):e.result+=common.repeat(\"\\n\",d):e.result+=common.repeat(\"\\n\",o?1+d:d),o=!0,l=!0,d=0,a=e.position;!is_EOL(r)&&0!==r;)r=e.input.charCodeAt(++e.position);captureSegment(e,a,e.position,!1)}}return!0}function readBlockSequence(e,t){var a,i,n=e.tag,r=e.anchor,s=[],o=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=s),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,throwError(e,\"tab characters must not be used in indentation\")),45===i)&&is_WS_OR_EOL(e.input.charCodeAt(e.position+1));)if(o=!0,e.position++,skipSeparationSpace(e,!0,-1)&&e.lineIndent<=t)s.push(null),i=e.input.charCodeAt(e.position);else if(a=e.line,composeNode(e,t,CONTEXT_BLOCK_IN,!1,!0),s.push(e.result),skipSeparationSpace(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===a||e.lineIndent>t)&&0!==i)throwError(e,\"bad indentation of a sequence entry\");else if(e.lineIndent<t)break;return!!o&&(e.tag=n,e.anchor=r,e.kind=\"sequence\",e.result=s,!0)}function readBlockMapping(e,t,a){var i,n,r,s,o,l,c,d=e.tag,h=e.anchor,p={},u=Object.create(null),m=null,g=null,f=null,b=!1,U=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=p),c=e.input.charCodeAt(e.position);0!==c;){if(b||-1===e.firstTabInLine||(e.position=e.firstTabInLine,throwError(e,\"tab characters must not be used in indentation\")),i=e.input.charCodeAt(e.position+1),r=e.line,63!==c&&58!==c||!is_WS_OR_EOL(i)){if(s=e.line,o=e.lineStart,l=e.position,!composeNode(e,a,CONTEXT_FLOW_OUT,!1,!0))break;if(e.line===r){for(c=e.input.charCodeAt(e.position);is_WHITE_SPACE(c);)c=e.input.charCodeAt(++e.position);if(58===c)is_WS_OR_EOL(c=e.input.charCodeAt(++e.position))||throwError(e,\"a whitespace character is expected after the key-value separator within a block mapping\"),b&&(storeMappingPair(e,p,u,m,g,null,s,o,l),m=g=f=null),U=!0,b=!1,n=!1,m=e.tag,g=e.result;else{if(!U)return e.tag=d,e.anchor=h,!0;throwError(e,\"can not read an implicit mapping pair; a colon is missed\")}}else{if(!U)return e.tag=d,e.anchor=h,!0;throwError(e,\"can not read a block mapping entry; a multiline key may not be an implicit key\")}}else 63===c?(b&&(storeMappingPair(e,p,u,m,g,null,s,o,l),m=g=f=null),U=!0,b=!0,n=!0):b?(b=!1,n=!0):throwError(e,\"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line\"),e.position+=1,c=i;if((e.line===r||e.lineIndent>t)&&(b&&(s=e.line,o=e.lineStart,l=e.position),composeNode(e,t,CONTEXT_BLOCK_OUT,!0,n)&&(b?g=e.result:f=e.result),b||(storeMappingPair(e,p,u,m,g,f,s,o,l),m=g=f=null),skipSeparationSpace(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===r||e.lineIndent>t)&&0!==c)throwError(e,\"bad indentation of a mapping entry\");else if(e.lineIndent<t)break}return b&&storeMappingPair(e,p,u,m,g,null,s,o,l),U&&(e.tag=d,e.anchor=h,e.kind=\"mapping\",e.result=p),U}function readTagProperty(e){var t,a,i,n,r=!1,s=!1;if(33!==(n=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&throwError(e,\"duplication of a tag property\"),60===(n=e.input.charCodeAt(++e.position))?(r=!0,n=e.input.charCodeAt(++e.position)):33===n?(s=!0,a=\"!!\",n=e.input.charCodeAt(++e.position)):a=\"!\",t=e.position,r){do{n=e.input.charCodeAt(++e.position)}while(0!==n&&62!==n);e.position<e.length?(i=e.input.slice(t,e.position),n=e.input.charCodeAt(++e.position)):throwError(e,\"unexpected end of the stream within a verbatim tag\")}else{for(;0!==n&&!is_WS_OR_EOL(n);)33===n&&(s?throwError(e,\"tag suffix cannot contain exclamation marks\"):(a=e.input.slice(t-1,e.position+1),PATTERN_TAG_HANDLE.test(a)||throwError(e,\"named tag handle cannot contain such characters\"),s=!0,t=e.position+1)),n=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),PATTERN_FLOW_INDICATORS.test(i)&&throwError(e,\"tag suffix cannot contain flow indicator characters\")}i&&!PATTERN_TAG_URI.test(i)&&throwError(e,\"tag name cannot contain such characters: \"+i);try{i=decodeURIComponent(i)}catch(t){throwError(e,\"tag name is malformed: \"+i)}return r?e.tag=i:_hasOwnProperty$1.call(e.tagMap,a)?e.tag=e.tagMap[a]+i:\"!\"===a?e.tag=\"!\"+i:\"!!\"===a?e.tag=\"tag:yaml.org,2002:\"+i:throwError(e,'undeclared tag handle \"'+a+'\"'),!0}function readAnchorProperty(e){var t,a;if(38!==(a=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&throwError(e,\"duplication of an anchor property\"),a=e.input.charCodeAt(++e.position),t=e.position;0!==a&&!is_WS_OR_EOL(a)&&!is_FLOW_INDICATOR(a);)a=e.input.charCodeAt(++e.position);return e.position===t&&throwError(e,\"name of an anchor node must contain at least one character\"),e.anchor=e.input.slice(t,e.position),!0}function readAlias(e){var t,a,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!is_WS_OR_EOL(i)&&!is_FLOW_INDICATOR(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&throwError(e,\"name of an alias node must contain at least one character\"),a=e.input.slice(t,e.position),_hasOwnProperty$1.call(e.anchorMap,a)||throwError(e,'unidentified alias \"'+a+'\"'),e.result=e.anchorMap[a],skipSeparationSpace(e,!0,-1),!0}function composeNode(e,t,a,i,n){var r,s,o,l,c,d,h,p,u,m=1,g=!1,f=!1;if(null!==e.listener&&e.listener(\"open\",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,r=s=o=CONTEXT_BLOCK_OUT===a||CONTEXT_BLOCK_IN===a,i&&skipSeparationSpace(e,!0,-1)&&(g=!0,e.lineIndent>t?m=1:e.lineIndent===t?m=0:e.lineIndent<t&&(m=-1)),1===m)for(;readTagProperty(e)||readAnchorProperty(e);)skipSeparationSpace(e,!0,-1)?(g=!0,o=r,e.lineIndent>t?m=1:e.lineIndent===t?m=0:e.lineIndent<t&&(m=-1)):o=!1;if(o&&(o=g||n),1!==m&&CONTEXT_BLOCK_OUT!==a||(p=CONTEXT_FLOW_IN===a||CONTEXT_FLOW_OUT===a?t:t+1,u=e.position-e.lineStart,1===m?o&&(readBlockSequence(e,u)||readBlockMapping(e,u,p))||readFlowCollection(e,p)?f=!0:(s&&readBlockScalar(e,p)||readSingleQuotedScalar(e,p)||readDoubleQuotedScalar(e,p)?f=!0:readAlias(e)?(f=!0,null===e.tag&&null===e.anchor||throwError(e,\"alias node should not have any properties\")):readPlainScalar(e,p,CONTEXT_FLOW_IN===a)&&(f=!0,null===e.tag&&(e.tag=\"?\")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===m&&(f=o&&readBlockSequence(e,u))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if(\"?\"===e.tag){for(null!==e.result&&\"scalar\"!==e.kind&&throwError(e,'unacceptable node kind for !<?> tag; it should be \"scalar\", not \"'+e.kind+'\"'),l=0,c=e.implicitTypes.length;l<c;l+=1)if((h=e.implicitTypes[l]).resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if(\"!\"!==e.tag){if(_hasOwnProperty$1.call(e.typeMap[e.kind||\"fallback\"],e.tag))h=e.typeMap[e.kind||\"fallback\"][e.tag];else for(h=null,l=0,c=(d=e.typeMap.multi[e.kind||\"fallback\"]).length;l<c;l+=1)if(e.tag.slice(0,d[l].tag.length)===d[l].tag){h=d[l];break}h||throwError(e,\"unknown tag !<\"+e.tag+\">\"),null!==e.result&&h.kind!==e.kind&&throwError(e,\"unacceptable node kind for !<\"+e.tag+'> tag; it should be \"'+h.kind+'\", not \"'+e.kind+'\"'),h.resolve(e.result,e.tag)?(e.result=h.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):throwError(e,\"cannot resolve a node with !<\"+e.tag+\"> explicit tag\")}return null!==e.listener&&e.listener(\"close\",e),null!==e.tag||null!==e.anchor||f}function readDocument(e){var t,a,i,n,r=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(n=e.input.charCodeAt(e.position))&&(skipSeparationSpace(e,!0,-1),n=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==n));){for(s=!0,n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!is_WS_OR_EOL(n);)n=e.input.charCodeAt(++e.position);for(i=[],(a=e.input.slice(t,e.position)).length<1&&throwError(e,\"directive name must not be less than one character in length\");0!==n;){for(;is_WHITE_SPACE(n);)n=e.input.charCodeAt(++e.position);if(35===n){do{n=e.input.charCodeAt(++e.position)}while(0!==n&&!is_EOL(n));break}if(is_EOL(n))break;for(t=e.position;0!==n&&!is_WS_OR_EOL(n);)n=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==n&&readLineBreak(e),_hasOwnProperty$1.call(directiveHandlers,a)?directiveHandlers[a](e,a,i):throwWarning(e,'unknown document directive \"'+a+'\"')}skipSeparationSpace(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,skipSeparationSpace(e,!0,-1)):s&&throwError(e,\"directives end mark is expected\"),composeNode(e,e.lineIndent-1,CONTEXT_BLOCK_OUT,!1,!0),skipSeparationSpace(e,!0,-1),e.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(e.input.slice(r,e.position))&&throwWarning(e,\"non-ASCII line breaks are interpreted as content\"),e.documents.push(e.result),e.position===e.lineStart&&testDocumentSeparator(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,skipSeparationSpace(e,!0,-1)):e.position<e.length-1&&throwError(e,\"end of the stream or a document separator is expected\")}function loadDocuments(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+=\"\\n\"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var a=new State$1(e,t),i=e.indexOf(\"\\0\");for(-1!==i&&(a.position=i,throwError(a,\"null byte is not allowed in input\")),a.input+=\"\\0\";32===a.input.charCodeAt(a.position);)a.lineIndent+=1,a.position+=1;for(;a.position<a.length-1;)readDocument(a);return a.documents}function loadAll$1(e,t,a){null!==t&&\"object\"==typeof t&&void 0===a&&(a=t,t=null);var i=loadDocuments(e,a);if(\"function\"!=typeof t)return i;for(var n=0,r=i.length;n<r;n+=1)t(i[n])}function load$1(e,t){var a=loadDocuments(e,t);if(0!==a.length){if(1===a.length)return a[0];throw new exception(\"expected a single document in the stream, but found more\")}}var loadAll_1=loadAll$1,load_1=load$1,loader={loadAll:loadAll_1,load:load_1},_toString=Object.prototype.toString,_hasOwnProperty=Object.prototype.hasOwnProperty,CHAR_BOM=65279,CHAR_TAB=9,CHAR_LINE_FEED=10,CHAR_CARRIAGE_RETURN=13,CHAR_SPACE=32,CHAR_EXCLAMATION=33,CHAR_DOUBLE_QUOTE=34,CHAR_SHARP=35,CHAR_PERCENT=37,CHAR_AMPERSAND=38,CHAR_SINGLE_QUOTE=39,CHAR_ASTERISK=42,CHAR_COMMA=44,CHAR_MINUS=45,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_GREATER_THAN=62,CHAR_QUESTION=63,CHAR_COMMERCIAL_AT=64,CHAR_LEFT_SQUARE_BRACKET=91,CHAR_RIGHT_SQUARE_BRACKET=93,CHAR_GRAVE_ACCENT=96,CHAR_LEFT_CURLY_BRACKET=123,CHAR_VERTICAL_LINE=124,CHAR_RIGHT_CURLY_BRACKET=125,ESCAPE_SEQUENCES={0:\"\\\\0\",7:\"\\\\a\",8:\"\\\\b\",9:\"\\\\t\",10:\"\\\\n\",11:\"\\\\v\",12:\"\\\\f\",13:\"\\\\r\",27:\"\\\\e\",34:'\\\\\"',92:\"\\\\\\\\\",133:\"\\\\N\",160:\"\\\\_\",8232:\"\\\\L\",8233:\"\\\\P\"},DEPRECATED_BOOLEANS_SYNTAX=[\"y\",\"Y\",\"yes\",\"Yes\",\"YES\",\"on\",\"On\",\"ON\",\"n\",\"N\",\"no\",\"No\",\"NO\",\"off\",\"Off\",\"OFF\"],DEPRECATED_BASE60_SYNTAX=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;function compileStyleMap(e,t){var a,i,n,r,s,o,l;if(null===t)return{};for(a={},n=0,r=(i=Object.keys(t)).length;n<r;n+=1)s=i[n],o=String(t[s]),\"!!\"===s.slice(0,2)&&(s=\"tag:yaml.org,2002:\"+s.slice(2)),(l=e.compiledTypeMap.fallback[s])&&_hasOwnProperty.call(l.styleAliases,o)&&(o=l.styleAliases[o]),a[s]=o;return a}function encodeHex(e){var t,a,i;if(t=e.toString(16).toUpperCase(),e<=255)a=\"x\",i=2;else if(e<=65535)a=\"u\",i=4;else{if(!(e<=4294967295))throw new exception(\"code point within a string may not be greater than 0xFFFFFFFF\");a=\"U\",i=8}return\"\\\\\"+a+common.repeat(\"0\",i-t.length)+t}var QUOTING_TYPE_SINGLE=1,QUOTING_TYPE_DOUBLE=2;function State$2(e){this.schema=e.schema||_default,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=common.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=compileStyleMap(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='\"'===e.quotingType?QUOTING_TYPE_DOUBLE:QUOTING_TYPE_SINGLE,this.forceQuotes=e.forceQuotes||!1,this.replacer=\"function\"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=\"\",this.duplicates=[],this.usedDuplicates=null}function indentString(e,t){for(var a,i=common.repeat(\" \",t),n=0,r=-1,s=\"\",o=e.length;n<o;)-1===(r=e.indexOf(\"\\n\",n))?(a=e.slice(n),n=o):(a=e.slice(n,r+1),n=r+1),a.length&&\"\\n\"!==a&&(s+=i),s+=a;return s}function generateNextLine(e,t){return\"\\n\"+common.repeat(\" \",e.indent*t)}function testImplicitResolving(e,t){var a,i;for(a=0,i=e.implicitTypes.length;a<i;a+=1)if(e.implicitTypes[a].resolve(t))return!0;return!1}function isWhitespace(e){return e===CHAR_SPACE||e===CHAR_TAB}function isPrintable(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==CHAR_BOM||65536<=e&&e<=1114111}function isNsCharOrWhitespace(e){return isPrintable(e)&&e!==CHAR_BOM&&e!==CHAR_CARRIAGE_RETURN&&e!==CHAR_LINE_FEED}function isPlainSafe(e,t,a){var i=isNsCharOrWhitespace(e),n=i&&!isWhitespace(e);return(a?i:i&&e!==CHAR_COMMA&&e!==CHAR_LEFT_SQUARE_BRACKET&&e!==CHAR_RIGHT_SQUARE_BRACKET&&e!==CHAR_LEFT_CURLY_BRACKET&&e!==CHAR_RIGHT_CURLY_BRACKET)&&e!==CHAR_SHARP&&!(t===CHAR_COLON&&!n)||isNsCharOrWhitespace(t)&&!isWhitespace(t)&&e===CHAR_SHARP||t===CHAR_COLON&&n}function isPlainSafeFirst(e){return isPrintable(e)&&e!==CHAR_BOM&&!isWhitespace(e)&&e!==CHAR_MINUS&&e!==CHAR_QUESTION&&e!==CHAR_COLON&&e!==CHAR_COMMA&&e!==CHAR_LEFT_SQUARE_BRACKET&&e!==CHAR_RIGHT_SQUARE_BRACKET&&e!==CHAR_LEFT_CURLY_BRACKET&&e!==CHAR_RIGHT_CURLY_BRACKET&&e!==CHAR_SHARP&&e!==CHAR_AMPERSAND&&e!==CHAR_ASTERISK&&e!==CHAR_EXCLAMATION&&e!==CHAR_VERTICAL_LINE&&e!==CHAR_EQUALS&&e!==CHAR_GREATER_THAN&&e!==CHAR_SINGLE_QUOTE&&e!==CHAR_DOUBLE_QUOTE&&e!==CHAR_PERCENT&&e!==CHAR_COMMERCIAL_AT&&e!==CHAR_GRAVE_ACCENT}function isPlainSafeLast(e){return!isWhitespace(e)&&e!==CHAR_COLON}function codePointAt(e,t){var a,i=e.charCodeAt(t);return i>=55296&&i<=56319&&t+1<e.length&&(a=e.charCodeAt(t+1))>=56320&&a<=57343?1024*(i-55296)+a-56320+65536:i}function needIndentIndicator(e){return/^\\n* /.test(e)}var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;function chooseScalarStyle(e,t,a,i,n,r,s,o){var l,c=0,d=null,h=!1,p=!1,u=-1!==i,m=-1,g=isPlainSafeFirst(codePointAt(e,0))&&isPlainSafeLast(codePointAt(e,e.length-1));if(t||s)for(l=0;l<e.length;c>=65536?l+=2:l++){if(!isPrintable(c=codePointAt(e,l)))return STYLE_DOUBLE;g=g&&isPlainSafe(c,d,o),d=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if((c=codePointAt(e,l))===CHAR_LINE_FEED)h=!0,u&&(p=p||l-m-1>i&&\" \"!==e[m+1],m=l);else if(!isPrintable(c))return STYLE_DOUBLE;g=g&&isPlainSafe(c,d,o),d=c}p=p||u&&l-m-1>i&&\" \"!==e[m+1]}return h||p?a>9&&needIndentIndicator(e)?STYLE_DOUBLE:s?r===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:p?STYLE_FOLDED:STYLE_LITERAL:!g||s||n(e)?r===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:STYLE_PLAIN}function writeScalar(e,t,a,i,n){e.dump=function(){if(0===t.length)return e.quotingType===QUOTING_TYPE_DOUBLE?'\"\"':\"''\";if(!e.noCompatMode&&(-1!==DEPRECATED_BOOLEANS_SYNTAX.indexOf(t)||DEPRECATED_BASE60_SYNTAX.test(t)))return e.quotingType===QUOTING_TYPE_DOUBLE?'\"'+t+'\"':\"'\"+t+\"'\";var r=e.indent*Math.max(1,a),s=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-r),o=i||e.flowLevel>-1&&a>=e.flowLevel;switch(chooseScalarStyle(t,o,e.indent,s,(function(t){return testImplicitResolving(e,t)}),e.quotingType,e.forceQuotes&&!i,n)){case STYLE_PLAIN:return t;case STYLE_SINGLE:return\"'\"+t.replace(/'/g,\"''\")+\"'\";case STYLE_LITERAL:return\"|\"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,r));case STYLE_FOLDED:return\">\"+blockHeader(t,e.indent)+dropEndingNewline(indentString(foldString(t,s),r));case STYLE_DOUBLE:return'\"'+escapeString(t)+'\"';default:throw new exception(\"impossible error: invalid scalar style\")}}()}function blockHeader(e,t){var a=needIndentIndicator(e)?String(t):\"\",i=\"\\n\"===e[e.length-1];return a+(!i||\"\\n\"!==e[e.length-2]&&\"\\n\"!==e?i?\"\":\"-\":\"+\")+\"\\n\"}function dropEndingNewline(e){return\"\\n\"===e[e.length-1]?e.slice(0,-1):e}function foldString(e,t){for(var a,i,n,r=/(\\n+)([^\\n]*)/g,s=(a=-1!==(a=e.indexOf(\"\\n\"))?a:e.length,r.lastIndex=a,foldLine(e.slice(0,a),t)),o=\"\\n\"===e[0]||\" \"===e[0];n=r.exec(e);){var l=n[1],c=n[2];i=\" \"===c[0],s+=l+(o||i||\"\"===c?\"\":\"\\n\")+foldLine(c,t),o=i}return s}function foldLine(e,t){if(\"\"===e||\" \"===e[0])return e;for(var a,i,n=/ [^ ]/g,r=0,s=0,o=0,l=\"\";a=n.exec(e);)(o=a.index)-r>t&&(i=s>r?s:o,l+=\"\\n\"+e.slice(r,i),r=i+1),s=o;return l+=\"\\n\",e.length-r>t&&s>r?l+=e.slice(r,s)+\"\\n\"+e.slice(s+1):l+=e.slice(r),l.slice(1)}function escapeString(e){for(var t,a=\"\",i=0,n=0;n<e.length;i>=65536?n+=2:n++)i=codePointAt(e,n),!(t=ESCAPE_SEQUENCES[i])&&isPrintable(i)?(a+=e[n],i>=65536&&(a+=e[n+1])):a+=t||encodeHex(i);return a}function writeFlowSequence(e,t,a){var i,n,r,s=\"\",o=e.tag;for(i=0,n=a.length;i<n;i+=1)r=a[i],e.replacer&&(r=e.replacer.call(a,String(i),r)),(writeNode(e,t,r,!1,!1)||void 0===r&&writeNode(e,t,null,!1,!1))&&(\"\"!==s&&(s+=\",\"+(e.condenseFlow?\"\":\" \")),s+=e.dump);e.tag=o,e.dump=\"[\"+s+\"]\"}function writeBlockSequence(e,t,a,i){var n,r,s,o=\"\",l=e.tag;for(n=0,r=a.length;n<r;n+=1)s=a[n],e.replacer&&(s=e.replacer.call(a,String(n),s)),(writeNode(e,t+1,s,!0,!0,!1,!0)||void 0===s&&writeNode(e,t+1,null,!0,!0,!1,!0))&&(i&&\"\"===o||(o+=generateNextLine(e,t)),e.dump&&CHAR_LINE_FEED===e.dump.charCodeAt(0)?o+=\"-\":o+=\"- \",o+=e.dump);e.tag=l,e.dump=o||\"[]\"}function writeFlowMapping(e,t,a){var i,n,r,s,o,l=\"\",c=e.tag,d=Object.keys(a);for(i=0,n=d.length;i<n;i+=1)o=\"\",\"\"!==l&&(o+=\", \"),e.condenseFlow&&(o+='\"'),s=a[r=d[i]],e.replacer&&(s=e.replacer.call(a,r,s)),writeNode(e,t,r,!1,!1)&&(e.dump.length>1024&&(o+=\"? \"),o+=e.dump+(e.condenseFlow?'\"':\"\")+\":\"+(e.condenseFlow?\"\":\" \"),writeNode(e,t,s,!1,!1)&&(l+=o+=e.dump));e.tag=c,e.dump=\"{\"+l+\"}\"}function writeBlockMapping(e,t,a,i){var n,r,s,o,l,c,d=\"\",h=e.tag,p=Object.keys(a);if(!0===e.sortKeys)p.sort();else if(\"function\"==typeof e.sortKeys)p.sort(e.sortKeys);else if(e.sortKeys)throw new exception(\"sortKeys must be a boolean or a function\");for(n=0,r=p.length;n<r;n+=1)c=\"\",i&&\"\"===d||(c+=generateNextLine(e,t)),o=a[s=p[n]],e.replacer&&(o=e.replacer.call(a,s,o)),writeNode(e,t+1,s,!0,!0,!0)&&((l=null!==e.tag&&\"?\"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&CHAR_LINE_FEED===e.dump.charCodeAt(0)?c+=\"?\":c+=\"? \"),c+=e.dump,l&&(c+=generateNextLine(e,t)),writeNode(e,t+1,o,!0,l)&&(e.dump&&CHAR_LINE_FEED===e.dump.charCodeAt(0)?c+=\":\":c+=\": \",d+=c+=e.dump));e.tag=h,e.dump=d||\"{}\"}function detectType(e,t,a){var i,n,r,s,o,l;for(r=0,s=(n=a?e.explicitTypes:e.implicitTypes).length;r<s;r+=1)if(((o=n[r]).instanceOf||o.predicate)&&(!o.instanceOf||\"object\"==typeof t&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(a?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag=\"?\",o.represent){if(l=e.styleMap[o.tag]||o.defaultStyle,\"[object Function]\"===_toString.call(o.represent))i=o.represent(t,l);else{if(!_hasOwnProperty.call(o.represent,l))throw new exception(\"!<\"+o.tag+'> tag resolver accepts not \"'+l+'\" style');i=o.represent[l](t,l)}e.dump=i}return!0}return!1}function writeNode(e,t,a,i,n,r,s){e.tag=null,e.dump=a,detectType(e,a,!1)||detectType(e,a,!0);var o,l=_toString.call(e.dump),c=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var d,h,p=\"[object Object]\"===l||\"[object Array]\"===l;if(p&&(h=-1!==(d=e.duplicates.indexOf(a))),(null!==e.tag&&\"?\"!==e.tag||h||2!==e.indent&&t>0)&&(n=!1),h&&e.usedDuplicates[d])e.dump=\"*ref_\"+d;else{if(p&&h&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),\"[object Object]\"===l)i&&0!==Object.keys(e.dump).length?(writeBlockMapping(e,t,e.dump,n),h&&(e.dump=\"&ref_\"+d+e.dump)):(writeFlowMapping(e,t,e.dump),h&&(e.dump=\"&ref_\"+d+\" \"+e.dump));else if(\"[object Array]\"===l)i&&0!==e.dump.length?(e.noArrayIndent&&!s&&t>0?writeBlockSequence(e,t-1,e.dump,n):writeBlockSequence(e,t,e.dump,n),h&&(e.dump=\"&ref_\"+d+e.dump)):(writeFlowSequence(e,t,e.dump),h&&(e.dump=\"&ref_\"+d+\" \"+e.dump));else{if(\"[object String]\"!==l){if(\"[object Undefined]\"===l)return!1;if(e.skipInvalid)return!1;throw new exception(\"unacceptable kind of an object to dump \"+l)}\"?\"!==e.tag&&writeScalar(e,e.dump,t,r,c)}null!==e.tag&&\"?\"!==e.tag&&(o=encodeURI(\"!\"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,\"%21\"),o=\"!\"===e.tag[0]?\"!\"+o:\"tag:yaml.org,2002:\"===o.slice(0,18)?\"!!\"+o.slice(18):\"!<\"+o+\">\",e.dump=o+\" \"+e.dump)}return!0}function getDuplicateReferences(e,t){var a,i,n=[],r=[];for(inspectNode(e,n,r),a=0,i=r.length;a<i;a+=1)t.duplicates.push(n[r[a]]);t.usedDuplicates=new Array(i)}function inspectNode(e,t,a){var i,n,r;if(null!==e&&\"object\"==typeof e)if(-1!==(n=t.indexOf(e)))-1===a.indexOf(n)&&a.push(n);else if(t.push(e),Array.isArray(e))for(n=0,r=e.length;n<r;n+=1)inspectNode(e[n],t,a);else for(n=0,r=(i=Object.keys(e)).length;n<r;n+=1)inspectNode(e[i[n]],t,a)}function dump$1(e,t){var a=new State$2(t=t||{});a.noRefs||getDuplicateReferences(e,a);var i=e;return a.replacer&&(i=a.replacer.call({\"\":i},\"\",i)),writeNode(a,0,i,!0,!0)?a.dump+\"\\n\":\"\"}var dump_1=dump$1,dumper={dump:dump_1};function renamed(e,t){return function(){throw new Error(\"Function yaml.\"+e+\" is removed in js-yaml 4. Use yaml.\"+t+\" instead, which is now safe by default.\")}}var Type=type$1,Schema=schema,FAILSAFE_SCHEMA=failsafe,JSON_SCHEMA=json,CORE_SCHEMA=core,DEFAULT_SCHEMA=_default,load$2=loader.load,loadAll=loader.loadAll,dump=dumper.dump,YAMLException=exception,types={binary:binary,float:float,map:map,null:_null,pairs:pairs,set:set,timestamp:timestamp,bool:bool,int:int,merge:merge,omap:omap,seq:seq,str:str},safeLoad=renamed(\"safeLoad\",\"load\"),safeLoadAll=renamed(\"safeLoadAll\",\"loadAll\"),safeDump=renamed(\"safeDump\",\"dump\"),jsYaml={Type:Type,Schema:Schema,FAILSAFE_SCHEMA:FAILSAFE_SCHEMA,JSON_SCHEMA:JSON_SCHEMA,CORE_SCHEMA:CORE_SCHEMA,DEFAULT_SCHEMA:DEFAULT_SCHEMA,load:load$2,loadAll:loadAll,dump:dump,YAMLException:YAMLException,types:types,safeLoad:safeLoad,safeLoadAll:safeLoadAll,safeDump:safeDump};const getParentOfClass=(e,t)=>{let a=e.parentElement;for(;a&&!a.classList.contains(t)&&!(a instanceof window.HTMLBodyElement);)a=a.parentElement;return a?.classList?.contains(t)?a:null};function getExcalidrawViews(e){const t=e.workspace.getLeavesOfType(VIEW_TYPE_EXCALIDRAW).filter((e=>e.view instanceof ExcalidrawView));return t.map((e=>e.view))}function getExcalidraAndMarkdowViewsForFile(e,t){const a=[...e.workspace.getLeavesOfType(VIEW_TYPE_EXCALIDRAW).filter((e=>e.view instanceof ExcalidrawView)),...e.workspace.getLeavesOfType(\"markdown\").filter((e=>e.view instanceof obsidian_module.MarkdownView))];return a.map((e=>e.view)).filter((e=>e.file===t))}const getLeaf=(e,t,a)=>{switch(linkClickModifierType(a)){case\"active-pane\":return t;case\"new-tab\":default:return(()=>{if(!e.settings.openInMainWorkspace)return e.app.workspace.getLeaf(\"tab\");const[a,i]=getLeafLoc(t);return\"main\"===a?e.app.workspace.getLeaf(\"tab\"):getNewOrAdjacentLeaf(e,t)})();case\"new-pane\":return getNewOrAdjacentLeaf(e,t);case\"popout-window\":return e.app.workspace.openPopoutLeaf()}},getLeafLoc=e=>{const t=e.id,a=EXCALIDRAW_PLUGIN.app.workspace.getLayout(),i=e=>e.children.filter((e=>\"leaf\"!==e.type)).map((e=>i(e))).flat().concat(e.children.filter((e=>\"leaf\"===e.type)).map((e=>e.id))),n=i(a.main);return[a.main&&n.contains(t)?\"main\":a.floating&&i(a.floating).contains(t)?\"popout\":a.left&&i(a.left).contains(t)?\"left\":a.right&&i(a.right).contains(t)?\"right\":\"hover\",n]},getNewOrAdjacentLeaf=(e,t)=>{const[a,i]=getLeafLoc(t),n=a=>{let n=e.app.workspace.getMostRecentLeaf();return n&&n!==t&&n.view?.containerEl.ownerDocument===document||(n=null,i.forEach((i=>{const r=e.app.workspace.getLeafById(i);n||!r.view?.navigation||t===r||a&&r?.parent===t?.parent||(n=r)}))),n};if(e.settings.openInMainWorkspace||[\"main\",\"left\",\"right\"].contains(a)){if(!e.settings.openInAdjacentPane){if(\"main\"===a)return e.app.workspace.createLeafBySplit(t);const i=n();return i?\"empty\"===i.view.getViewType()?i:e.app.workspace.createLeafBySplit(i):e.app.workspace.getLeaf(!0)}return n(!0)??e.app.workspace.createLeafBySplit(t)}if(!e.settings.openInAdjacentPane)return e.app.workspace.createLeafBySplit(t);if(\"hover\"===a){const a=new Set;return e.app.workspace.iterateAllLeaves((e=>{e!==t&&t.containerEl.parentElement===e.containerEl.parentElement&&a.add(e)})),0===a.size?e.app.workspace.createLeafBySplit(t):Array.from(a)[0]}if(\"popout\"===a){const a=new Set;return e.app.workspace.iterateAllLeaves((e=>{e!==t&&e.view.navigation&&e.view.containerEl.ownerDocument===t.view.containerEl.ownerDocument&&a.add(e)})),0===a.size?e.app.workspace.createLeafBySplit(t):Array.from(a)[0]}return e.app.workspace.createLeafBySplit(t)},getAttachmentsFolderAndFilePath=async(e,t,a)=>{const{basename:i,extension:n}=splitFolderAndFilename(a),r=e.vault.getFileByPath(t),s=await e.vault.getAvailablePathForAttachments(i,n,r),{folderpath:o}=splitFolderAndFilename(s);return{folder:o,filepath:s}},isObsidianThemeDark=()=>document.body.classList.contains(\"theme-dark\"),getContainerForDocument=e=>{if(e!==document&&EXCALIDRAW_PLUGIN.app.workspace.floatingSplit)for(const t of EXCALIDRAW_PLUGIN.app.workspace.floatingSplit.children)if(t.doc===e)return t;return EXCALIDRAW_PLUGIN.app.workspace.rootSplit},cleanSectionHeading=e=>e?e.replace(REG_SECTION_REF_CLEAN,\"\").replace(/\\s+/g,\" \").trim():e,cleanBlockRef=e=>e?e.replace(REG_BLOCK_REF_CLEAN,\"\").replace(/\\s+/g,\" \").trim():e,getAllWindowDocuments=e=>{const t=new Set;return t.add(document),e.workspace.iterateAllLeaves((e=>{e.view.containerEl.ownerDocument!==document&&t.add(e.view.containerEl.ownerDocument)})),Array.from(t)},obsidianPDFQuoteWithRef=e=>{const t=/^> (.*)\\n\\n\\[\\[([^|\\]]*)\\|[^\\]]*]]$/gm.exec(e);return t?{quote:t[1],link:t[2]}:null},extractSVGPNGFileName=e=>{const t=e.match(/\\[\\[([^\\]|#^]+\\.(?:svg|png))(?:[^\\]]+)?\\]\\]|\\[[^\\]]+\\]\\(([^\\)]+\\.(?:svg|png))\\)/);return t?t[1]||t[2]:null},getFileCSSClasses=e=>{if(e){const t=window?.ExcalidrawAutomate?.plugin;if(!t)return[];const a=t.app.metadataCache.getFileCache(e);if(!a?.frontmatter)return[];const i=obsidian_module.parseFrontMatterEntry(a.frontmatter,\"cssclasses\");return Array.isArray(i)?i:\"string\"==typeof i?Array.from(new Set(i.split(/[, ]+/).filter(Boolean))):[]}return[]},getActivePDFPageNumberFromPDFView=e=>e?.viewer?.child?.pdfViewer?.page,openLeaf=({plugin:e,fnGetLeaf:t,file:a,openState:i})=>{let n=null;if(e.settings.focusOnFileTab&&(e.app.workspace.iterateAllLeaves((t=>{n||t?.view?.file===a&&(e.app.workspace.setActiveLeaf(t,{focus:!0}),n=t)})),n)){if(i){const e=n.openFile(a,i);return{leaf:n,promise:e}}return{leaf:n,promise:Promise.resolve()}}n=t();const r=n.openFile(a,i);return{leaf:n,promise:r}};function mergeMarkdownFiles(e,t){const a=e.indexOf(\"---\",4),i=e.substring(4,a).trim(),n=e.substring(a+3),r=jsYaml.load(i)||{};if(t.startsWith(\"---\\n\")&&t.indexOf(\"---\\n\",4)>0){const e=t.indexOf(\"---\\n\",4);let a=t.substring(4,e).replace(/\\s+$/,\"\");const i=t.substring(e+3),s=jsYaml.load(a)||{},o=Object.keys(r).filter((e=>Array.isArray(r[e])&&Array.isArray(s[e])));if(o.length)for(const e of o){const t=s[e],i=r[e],n=[...t,...i.filter((e=>!t.includes(e)))];a=replaceYamlKeyBlock(a,e,jsYaml.dump({[e]:n}).trimEnd())??a}const l={};for(const e of Object.keys(r))e in s||(l[e]=r[e]);return`---\\n${Object.keys(l).length?a+\"\\n\"+jsYaml.dump(l).trimEnd():a}\\n---\\n${i}\\n\\n${n.trim()}\\n`}{const e=t.trim();return`---\\n${jsYaml.dump(r).trimEnd()}\\n---\\n${e}\\n\\n${n.trim()}\\n`}}function replaceYamlKeyBlock(e,t,a){const i=e.split(/\\r?\\n/);let n=-1;for(let e=0;e<i.length;e++)if(new RegExp(`^${escapeRegex(t)}\\\\s*:`).test(i[e])){n=e;break}if(-1===n)return null;let r=n+1;for(;r<i.length;){const e=i[r];if(\"\"===e.trim())break;if(/^[^\\s].*?:/.test(e))break;if(!/^\\s/.test(e))break;r++}return[...i.slice(0,n),a,...i.slice(r)].join(\"\\n\")}function escapeRegex(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")}const editorInsertText=(e,t)=>{const a=e.getCursor(),i=e.getLine(a.line),n=i.slice(0,a.ch)+t+i.slice(a.ch);e.setLine(a.line,n)},foldExcalidrawSection=e=>{if(!(e&&e instanceof obsidian_module.MarkdownView))return;const t={ed:-1,te:-1,el:-1,ef:-1,d:-1},a=e.currentMode.getFoldInfo()?.folds??[],i=e.editor.lineCount();for(let a=0;a<i;a++){const i=e.editor.getLine(a);switch(i){case\"# Excalidraw Data\":t.ed=a;break;case\"## Text Elements\":t.te=a;break;case\"## Element Links\":t.el=a;break;case\"## Embedded Files\":t.ef=a;break;case\"## Drawing\":t.d=a}if(\"## Drawing\"===i)break}if(t.ed>-1&&t.d>-1){const n=[...a,...t.te>-1?[{from:t.te,to:(t.el>-1?t.el:t.ef>-1?t.ef:t.d)-1}]:[],...t.el>-1?[{from:t.el,to:(t.ef>-1?t.ef:t.d)-1}]:[],...t.ef>-1?[{from:t.ef,to:t.d-1}]:[],{from:t.d,to:i-1},{from:t.ed,to:i-1}];e.currentMode.applyFoldInfo({folds:n,lines:i})}};async function setExcalidrawView(e){await e.setViewState({type:VIEW_TYPE_EXCALIDRAW,state:e.view.getState(),popstate:!0})}async function closeLeafView(e){await e.setViewState({type:\"empty\",state:{}})}function isUnwantedLeaf(e){return!DEVICE.isDesktop&&\"empty\"===e.view?.getViewType()&&e.parent&&!e.parent.parent&&\"split\"===e.parent.type&&1===e.parent.children.length}function getAudioElementHeight(){const e=document.createElement(\"audio\");e.controls=!0,e.src=\"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA\";const t=document.createElement(\"div\");t.style.position=\"absolute\",t.style.left=\"-9999px\",t.style.visibility=\"hidden\",t.style.pointerEvents=\"none\",t.appendChild(e),document.body.appendChild(t);let a=0;try{if(document.body.offsetHeight,a=e.getBoundingClientRect().height,0===a){const i=window.getComputedStyle(e);a=parseFloat(i.height)||0,0===a&&(a=t.getBoundingClientRect().height)}}finally{document.body.removeChild(t)}return Math.round(a)}function splitFolderAndFilename(e){const t=e.lastIndexOf(\"/\"),a=-1==t?e:e.substring(t+1),i=a.lastIndexOf(\".\"),n=e.substring(0,t);return{folderpath:n?obsidian_module.normalizePath(n):\"\",filename:a,basename:a.replace(/\\.[^/.]+$/,\"\"),extension:i>0?a.substring(i+1):\"\"}}const download=(e,t,a)=>{const i=document.createElement(\"a\");i.setAttribute(\"href\",(e?`${e},`:\"\")+t),i.setAttribute(\"download\",a),i.style.display=\"none\",document.body.appendChild(i),i.click(),document.body.removeChild(i)};function getIMGFilename(e,t){return`${e.substring(0,e.lastIndexOf(\".\"))}.${t}`}function getNewUniqueFilepath(e,t,a){let i=obsidian_module.normalizePath(`${a}/${t}`),n=e.getAbstractFileByPath(i),r=0;const s=t.endsWith(\".excalidraw.md\")?\".excalidraw.md\":t.slice(t.lastIndexOf(\".\"));for(;n;)i=obsidian_module.normalizePath(`${a}/${t.slice(0,t.lastIndexOf(s))}_${r}${s}`),r++,n=e.getAbstractFileByPath(i);return i}function getDrawingFilename(e){return e.drawingFilenamePrefix+(\"\"!==e.drawingFilenameDateTime?window.moment().format(e.drawingFilenameDateTime):\"\")+(e.compatibilityMode?\".excalidraw\":e.useExcalidrawExtension?\".excalidraw.md\":\".md\")}function getEmbedFilename(e,t){return((t.drawingEmbedPrefixWithFilename?e:\"\")+t.drawingFilnameEmbedPostfix+(\"\"!==t.drawingFilenameDateTime?window.moment().format(t.drawingFilenameDateTime):\"\")+(t.compatibilityMode?\".excalidraw\":t.useExcalidrawExtension?\".excalidraw.md\":\".md\")).trim()}async function checkAndCreateFolder(e){const t=EXCALIDRAW_PLUGIN.app.vault;e=obsidian_module.normalizePath(e);const a=t.getAbstractFileByPathInsensitive(e);if(!(a&&a instanceof obsidian_module.TFolder))return a&&a instanceof obsidian_module.TFile&&new obsidian_module.Notice(`The folder cannot be created because it already exists as a file: ${e}.`),await t.createFolder(e)}const getURLImageExtension=e=>{const t=e.split(\"?\")[0];return t.substring(t.lastIndexOf(\".\")+1)},getMimeType=e=>IMAGE_MIME_TYPES.hasOwnProperty(e)?IMAGE_MIME_TYPES[e]:\"md\"===e?\"image/svg+xml\":\"application/octet-stream\",getFileFromURL=async(e,t,a=URLFETCHTIMEOUT)=>{try{const t=new Promise((e=>setTimeout((()=>e(null)),a))),i=await Promise.race([fetch(e,{mode:\"no-cors\"}),t]);if(!i)return errorlog({where:getFileFromURL,message:`URL did not load within the timeout period of ${a}ms.\\n\\nTry force-saving again in a few seconds.\\n\\n${e}`,url:e}),null;const n=await i.arrayBuffer();return{status:i.status,headers:Object.fromEntries(i.headers.entries()),arrayBuffer:n,json:null,text:null}}catch(e){return null}},getFileFromURLFallback=async(e,t,a=URLFETCHTIMEOUT)=>{try{const t=new Promise((e=>setTimeout((()=>e(null)),a)));return await Promise.race([t,obsidian_module.requestUrl({url:e,throw:!1})])}catch(t){return errorlog({where:getFileFromURLFallback,message:`URL did not load within timeout period of ${a}ms`,url:e}),null}},getDataURLFromURL=async(e,t,a=URLFETCHTIMEOUT)=>{let i=await getFileFromURL(e,t,a);return i&&200===i?.status||(i=await getFileFromURLFallback(e,t,a)),i&&200===i.status?await getDataURL(i.arrayBuffer,t):e},blobToBase64=async e=>{const t=await e.arrayBuffer(),a=new Uint8Array(t);let i=\"\",n=a.byteLength;for(let e=0;e<n;e++)i+=String.fromCharCode(a[e]);return btoa(i)},getPDFDoc=async e=>(void 0===window.pdfjsLib&&await obsidian_module.loadPdfJs(),await window.pdfjsLib.getDocument(EXCALIDRAW_PLUGIN.app.vault.getResourcePath(e)).promise),readLocalFileBinary=async e=>DEVICE.isDesktop?new Promise(((t,a)=>{const i=decodeURI(e);app.vault.adapter.fs.readFile(i,((e,i)=>{if(e)a(e);else{const e=i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength);t(e)}}))})):null,getPathWithoutExtension=e=>e?e.path.substring(0,e.path.lastIndexOf(\".\")):null;let _VAULT_BASE_URL=null;const VAULT_BASE_URL=()=>_VAULT_BASE_URL||(_VAULT_BASE_URL=DEVICE.isDesktop?EXCALIDRAW_PLUGIN.app.vault.adapter.url.pathToFileURL(EXCALIDRAW_PLUGIN.app.vault.adapter.basePath).toString():\"\",_VAULT_BASE_URL),getInternalLinkOrFileURLLink=(e,t,a,i)=>{if(!DEVICE.isDesktop)return{link:`[${a??\"\"}](${e})`,isInternal:!1,url:e};const n=t.app.vault,r=n.adapter.url.pathToFileURL(e).toString();if(r.startsWith(VAULT_BASE_URL())){const e=obsidian_module.normalizePath(decodeURIComponent(r.substring(VAULT_BASE_URL().length))),s=n.getAbstractFileByPath(e);if(s&&s instanceof obsidian_module.TFile){const e=t.app.metadataCache.fileToLinktext(s,i?.path,!0);return{link:getLink(t,{embed:!1,path:e,alias:a}),isInternal:!0,file:s}}}return{link:`[${a??\"\"}](${r})`,isInternal:!1,url:r}},getLink=(e,{embed:t=!0,path:a,alias:i},n)=>(void 0!==n?n:e.settings.embedWikiLink)?`${t?\"!\":\"\"}[[${a}${i?`|${i}`:\"\"}]]`:`${t?\"!\":\"\"}[${i??\"\"}](${encodeURI(a)})`,getAliasWithSize=(e,t)=>e&&\"\"!==e?`${e}${t?`|${t}`:\"\"}`:t,getCropFileNameAndFolder=async(e,t,a)=>{const i=(e.settings.cropPrefix||\"\")+a+(e.settings.cropSuffix||\"\")+\".md\";if(!e.settings.cropFolder||\"\"===e.settings.cropFolder.trim())return{folderpath:(await getAttachmentsFolderAndFilePath(e.app,t,i)).folder,filename:i};const n=obsidian_module.normalizePath(e.settings.cropFolder);return await checkAndCreateFolder(n),{folderpath:n,filename:i}},getAnnotationFileNameAndFolder=async(e,t,a)=>{const i=(e.settings.annotatePrefix||\"\")+a+(e.settings.annotateSuffix||\"\")+\".md\";if(!e.settings.annotateFolder||\"\"===e.settings.annotateFolder.trim())return{folderpath:(await getAttachmentsFolderAndFilePath(e.app,t,i)).folder,filename:i};const n=obsidian_module.normalizePath(e.settings.annotateFolder);return await checkAndCreateFolder(n),{folderpath:n,filename:i}},getListOfTemplateFiles=e=>{const t=obsidian_module.normalizePath(e.settings.templateFilePath),a=e.app.vault.getAbstractFileByPath(t);if(a&&a instanceof obsidian_module.TFolder)return e.app.vault.getFiles().filter((e=>e.path.startsWith(a.path))).filter((t=>e.isExcalidrawFile(t))).sort(((e,t)=>e.path.localeCompare(t.path)));if(a&&a instanceof obsidian_module.TFile)return[a];const i=e.app.metadataCache.getFirstLinkpathDest(t,\"\");return i?[i]:null},fileShouldDefaultAsExcalidraw=(e,t)=>{if(!e)return!1;const a=t.metadataCache.getCache(e);return a?.frontmatter&&a.frontmatter[FRONTMATTER_KEYS.plugin.name]&&!Boolean(a.frontmatter[FRONTMATTER_KEYS[\"open-as-markdown\"].name])},getExcalidrawEmbeddedFilesFiletree=(e,t)=>{if(!e||!t.isExcalidrawFile(e))return[];const a=new Set,i=t.app,n=e=>Object.keys(i.metadataCache.resolvedLinks[e.path]).forEach((e=>{const r=i.vault.getAbstractFileByPath(e);if(!(r&&r instanceof obsidian_module.TFile))return;const s=t.isExcalidrawFile(r);\"md\"===r.extension&&!s||a.has(r)||(a.add(r),s&&n(r))}));return n(e),Array.from(a)},hasExcalidrawEmbeddedImagesTreeChanged=(e,t,a)=>getExcalidrawEmbeddedFilesFiletree(e,a).some((e=>e.stat.mtime>t));async function exportImageToFile(e,t,a,i){const n=e?.getHookServer();if(n?.onImageExportPathHook)try{t=n.onImageExportPathHook({exportFilepath:t,exportExtension:i,excalidrawFile:e.file,action:\"export\"})??t}catch(e){errorlog({where:\"fileUtils.exportImageToFile\",fn:n.onImageExportPathHook,error:e})}return await createOrOverwriteFile(e.app,t,a)}async function importFileToVault(e,t,a,i,n){let r;const s=n?.getHookServer();if(s?.onImageFilePathHook)try{r=s.onImageFilePathHook({currentImageName:t,drawingFilePath:i.path})}catch(e){errorlog({where:\"fileUtils.importFileToVault\",fn:s.onImageFilePathHook,error:e})}let o;if(r){const{folderpath:t,filename:a}=splitFolderAndFilename(r);await checkAndCreateFolder(t),o=getNewUniqueFilepath(e.vault,a,t)}else{const{folder:a}=await getAttachmentsFolderAndFilePath(e,i.path,t);o=getNewUniqueFilepath(e.vault,t,a)}return await createOrOverwriteFile(e,o,a)}async function createOrOverwriteFile(e,t,a){const{folderpath:i}=splitFolderAndFilename(t);i&&await checkAndCreateFolder(i);const n=e.vault.getAbstractFileByPath(obsidian_module.normalizePath(t));return a instanceof Blob&&(a=await a.arrayBuffer()),a instanceof ArrayBuffer?n&&n instanceof obsidian_module.TFile?(await e.vault.modifyBinary(n,a),n):await e.vault.createBinary(t,a):n&&n instanceof obsidian_module.TFile?(await e.vault.modify(n,a),n):await e.vault.create(t,a)}async function createFileAndAwaitMetacacheUpdate(e,t,a){t=obsidian_module.normalizePath(t);let i=!1;if(\"md\"===t.substring(t.lastIndexOf(\".\")+1)){const n=e.metadataCache,r=e=>{e.path===t&&(n.off(\"changed\",r),i=!0)};n.on(\"changed\",r);const s=await createOrOverwriteFile(e,t,a);s||(i=!0,n.off(\"changed\",r));let o=0;for(;!i&&o++<15;)await sleep(50);return i||n.off(\"changed\",r),s}return await createOrOverwriteFile(e,t,a)}const createLeaf=e=>{const t=e.ownerDocument,a=new obsidian_module.WorkspaceSplit(e.app.workspace,\"vertical\");return a.getRoot=()=>e.app.workspace[t===document?\"rootSplit\":\"floatingSplit\"],a.getContainer=()=>getContainerForDocument(t),a.containerEl.style.width=\"100%\",a.containerEl.style.height=\"100%\",a.containerEl.style.borderRadius=\"var(--embeddable-radius)\",e.plugin.setDebounceActiveLeafChangeHandler(),{leaf:e.app.workspace.createLeafInParent(a,0),rootSplit:a}},useDefaultExcalidrawFrame=e=>!(e.link.startsWith(\"[\")||e.link.startsWith(\"file:\")||e.link.startsWith(\"data:\")),patchMobileView=(e,t)=>{if(!DEVICE.isPhone)return;console.log(\"patching mobile view\");const a=getParentOfClass(e.containerEl,\"mod-top\");if(a){a.hasClass(\"mod-visible\")||a.addClass(\"mod-visible\");const e=new MutationObserver((()=>{t?.keepAlive&&t?.isActive&&!t.isActive()?e.disconnect():a.hasClass(\"mod-visible\")||a.addClass(\"mod-visible\")}));e.observe(a,{attributes:!0,attributeFilter:[\"class\"]});const i=()=>e.disconnect();return t?.keepAlive||window.setTimeout(i,500),i}},processLinkText=(e,t)=>{let a=null;if(e.search(\"#\")>-1){const i=getLinkParts(e,t.file);a=`#${i.isBlockRef?\"^\":\"\"}${i.ref}`,e=i.path}return e.match(REG_LINKINDEX_INVALIDCHARS)?{subpath:a,file:null}:{subpath:a,file:t.app.metadataCache.getFirstLinkpathDest(e,t.file.path)}},generateEmbeddableLink=(e,t)=>e;function setFileToLocalGraph(e,t){let a;if(e.workspace.iterateAllLeaves((e=>{\"localgraph\"===e.view?.getViewType()&&(a=e.view)})),a)try{a.loadFile&&a.file!==t&&a.loadFile(t)}catch(e){console.error(e)}}function predictViewType(e,t){const a=t.extension?.toLowerCase?.()??\"\",i=e?.viewRegistry,n=[\"getViewTypeForFile\",\"getViewTypeByFile\",\"getTypeByFile\"];for(const e of n)if(i?.[e])try{const a=i[e](t);if(\"string\"==typeof a&&a)return a}catch{}const r=[\"getViewTypeByExtension\",\"getTypeByExtension\"];for(const e of r)if(i?.[e])try{const t=i[e](a);if(\"string\"==typeof t&&t)return t}catch{}return\"md\"===a?\"markdown\":\"pdf\"===a?\"pdf\":\"canvas\"===a?\"canvas\":AUDIO_TYPES.contains(a)?\"audio\":VIDEO_TYPES.contains(a)?\"video\":\"empty\"}const getEA=e=>{try{return window.ExcalidrawAutomate.getAPI(e)}catch(e){return console.log({message:\"Excalidraw not available\",fn:getEA}),null}};class CropImage{elements;imageEA;maskEA;bbox;constructor(e,t){this.elements=e;const a=getEA();this.imageEA=a;const i=getEA();this.maskEA=i,this.bbox=a.getBoundingBox(e),this.setBoundingEl(a,\"transparent\"),this.setBoundingEl(i,\"white\"),e.forEach((e=>{const t=cloneElement(e);\"image\"!==e.type&&\"frame\"!==e.type&&(t.opacity=100,i.elementsDict[e.id]=t),\"image\"===e.type&&(a.elementsDict[e.id]=t)})),Object.values(t).forEach((e=>{a.imagesDict[e.id]=e}))}destroy(){this.imageEA.destroy(),this.maskEA.destroy(),this.imageEA=null,this.maskEA=null,this.elements=null,this.bbox=null}setBoundingEl(e,t){const{topX:a,topY:i,width:n,height:r}=this.bbox;e.style.backgroundColor=t,e.style.strokeColor=\"transparent\",e.style.strokeWidth=\"0\",e.style.strokeStyle=\"solid\",e.style.fillStyle=\"solid\",e.style.roughness=0,e.addRect(a,i,n,r)}getViewBoxAndSize(){const e=this.elements.filter((e=>\"frame\"===e.type));e.length>1&&new obsidian_module.Notice(\"Multiple frames are not supported for image cropping. Discarding frames from mask.\");const t=this.imageEA.getElements().filter((e=>\"image\"===e.type)),{x:a,y:i,width:n,height:r}=1===e.length?e[0]:mapToXY(this.imageEA.getBoundingBox(t)),{topX:s,topY:o,width:l,height:c}=this.bbox;return{viewBox:`${a-s} ${i-o} ${n} ${r}`,vbWidth:n,vbHeight:r,width:l,height:c}}async getMaskSVG(){const e=await this.maskEA.createSVG(null,!0,{withBackground:!1,withTheme:!1,isMask:!1},null,null,0),t=e.querySelector(\"defs\"),a=e.querySelector(\"style\"),i=a?a.outerHTML:\"\";return t.parentElement.removeChild(t),{style:i,mask:e.innerHTML}}async getImage(){const e=this.imageEA.getElements().filter((e=>\"image\"===e.type&&!1===e.isDeleted)),t=e.some((e=>0!==e.angle)),a=Object.values(this.imageEA.imagesDict);if(!t&&1===e.length&&1===a.length){const{width:t,height:i}=this.bbox;if(e[0].width===t&&e[0].height===i)return a[0].dataURL}return await this.imageEA.createPNGBase64(null,1,{withBackground:!1,withTheme:!1,isMask:!1},null,null,0)}async buildSVG(){if(0===this.imageEA.getElements().filter((e=>\"image\"===e.type)).length)return void new obsidian_module.Notice(\"No image found. Cannot crop.\");const e=nanoid(),t=nanoid(),{viewBox:a,vbWidth:i,vbHeight:n,width:r,height:s}=this.getViewBoxAndSize(),o=new DOMParser,{style:l,mask:c}=await this.getMaskSVG(),d=`<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"${a}\" width=\"${i}\" height=\"${n}\">\\n<symbol id=\"${t}\"><image width=\"100%\" height=\"100%\" href=\"${await this.getImage()}\"/></symbol>\\n<defs>${l}\\n<mask id=\"${e}\" x=\"0\" y=\"0\" width=\"${r}\" height=\"${s}\" maskUnits=\"userSpaceOnUse\">\\n${c}\\n</mask>\\n</defs>\\n<use x=\"0\" y=\"0\" width=\"${r}\" height=\"${s}\" mask=\"url(#${e})\" mask-type=\"alpha\" href=\"#${t}\"/>\\n</svg>`;return o.parseFromString(d,\"image/svg+xml\").firstElementChild}async getCroppedPNG(){app.plugins.plugins[\"obsidian-excalidraw-plugin\"];const e=await this.buildSVG();return new Promise(((t,a)=>{const i=e.outerHTML,n=document.createElement(\"canvas\"),r=n.getContext(\"2d\");if(!r)return void a(\"Unable to get 2D context\");n.width=e.width.baseVal.value,n.height=e.height.baseVal.value;const s=new Image;s.onload=()=>{r.clearRect(0,0,n.width,n.height),r.drawImage(s,0,0),n.toBlob((e=>{e?t(e):a(new Error(\"Failed to convert to PNG\"))}),\"image/png\",1)},s.src=svgToBase64(i)}))}async getCroppedSVG(){return await this.buildSVG()}}const mapToXY=({topX:e,topY:t,width:a,height:i})=>({x:e,y:t,width:a,height:i});String.prototype.codePointAt||function(){var e=function(){try{var e={},t=Object.defineProperty,a=t(e,e,e)&&t}catch(e){}return a}(),t=function(e){if(null==this)throw TypeError();var t=String(this),a=t.length,i=e?Number(e):0;if(i!=i&&(i=0),!(i<0||i>=a)){var n,r=t.charCodeAt(i);return r>=55296&&r<=56319&&a>i+1&&(n=t.charCodeAt(i+1))>=56320&&n<=57343?1024*(r-55296)+n-56320+65536:r}};e?e(String.prototype,\"codePointAt\",{value:t,configurable:!0,writable:!0}):String.prototype.codePointAt=t}();var TINF_OK=0,TINF_DATA_ERROR=-3;function Tree(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function Data(e,t){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=t,this.destLen=0,this.ltree=new Tree,this.dtree=new Tree}var sltree=new Tree,sdtree=new Tree,length_bits=new Uint8Array(30),length_base=new Uint16Array(30),dist_bits=new Uint8Array(30),dist_base=new Uint16Array(30),clcidx=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),code_tree=new Tree,lengths=new Uint8Array(320);function tinf_build_bits_base(e,t,a,i){var n,r;for(n=0;n<a;++n)e[n]=0;for(n=0;n<30-a;++n)e[n+a]=n/a|0;for(r=i,n=0;n<30;++n)t[n]=r,r+=1<<e[n]}function tinf_build_fixed_trees(e,t){var a;for(a=0;a<7;++a)e.table[a]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,a=0;a<24;++a)e.trans[a]=256+a;for(a=0;a<144;++a)e.trans[24+a]=a;for(a=0;a<8;++a)e.trans[168+a]=280+a;for(a=0;a<112;++a)e.trans[176+a]=144+a;for(a=0;a<5;++a)t.table[a]=0;for(t.table[5]=32,a=0;a<32;++a)t.trans[a]=a}var offs=new Uint16Array(16);function tinf_build_tree(e,t,a,i){var n,r;for(n=0;n<16;++n)e.table[n]=0;for(n=0;n<i;++n)e.table[t[a+n]]++;for(e.table[0]=0,r=0,n=0;n<16;++n)offs[n]=r,r+=e.table[n];for(n=0;n<i;++n)t[a+n]&&(e.trans[offs[t[a+n]]++]=n)}function tinf_getbit(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var t=1&e.tag;return e.tag>>>=1,t}function tinf_read_bits(e,t,a){if(!t)return a;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var i=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,i+a}function tinf_decode_symbol(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var a=0,i=0,n=0,r=e.tag;do{i=2*i+(1&r),r>>>=1,++n,a+=t.table[n],i-=t.table[n]}while(i>=0);return e.tag=r,e.bitcount-=n,t.trans[a+i]}function tinf_decode_trees(e,t,a){var i,n,r,s,o,l;for(i=tinf_read_bits(e,5,257),n=tinf_read_bits(e,5,1),r=tinf_read_bits(e,4,4),s=0;s<19;++s)lengths[s]=0;for(s=0;s<r;++s){var c=tinf_read_bits(e,3,0);lengths[clcidx[s]]=c}for(tinf_build_tree(code_tree,lengths,0,19),o=0;o<i+n;){var d=tinf_decode_symbol(e,code_tree);switch(d){case 16:var h=lengths[o-1];for(l=tinf_read_bits(e,2,3);l;--l)lengths[o++]=h;break;case 17:for(l=tinf_read_bits(e,3,3);l;--l)lengths[o++]=0;break;case 18:for(l=tinf_read_bits(e,7,11);l;--l)lengths[o++]=0;break;default:lengths[o++]=d}}tinf_build_tree(t,lengths,0,i),tinf_build_tree(a,lengths,i,n)}function tinf_inflate_block_data(e,t,a){for(;;){var i,n,r,s,o=tinf_decode_symbol(e,t);if(256===o)return TINF_OK;if(o<256)e.dest[e.destLen++]=o;else for(i=tinf_read_bits(e,length_bits[o-=257],length_base[o]),n=tinf_decode_symbol(e,a),s=r=e.destLen-tinf_read_bits(e,dist_bits[n],dist_base[n]);s<r+i;++s)e.dest[e.destLen++]=e.dest[s]}}function tinf_inflate_uncompressed_block(e){for(var t,a;e.bitcount>8;)e.sourceIndex--,e.bitcount-=8;if((t=256*(t=e.source[e.sourceIndex+1])+e.source[e.sourceIndex])!==(65535&~(256*e.source[e.sourceIndex+3]+e.source[e.sourceIndex+2])))return TINF_DATA_ERROR;for(e.sourceIndex+=4,a=t;a;--a)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,TINF_OK}function tinf_uncompress(e,t){var a,i,n=new Data(e,t);do{switch(a=tinf_getbit(n),tinf_read_bits(n,2,0)){case 0:i=tinf_inflate_uncompressed_block(n);break;case 1:i=tinf_inflate_block_data(n,sltree,sdtree);break;case 2:tinf_decode_trees(n,n.ltree,n.dtree),i=tinf_inflate_block_data(n,n.ltree,n.dtree);break;default:i=TINF_DATA_ERROR}if(i!==TINF_OK)throw new Error(\"Data error\")}while(!a);return n.destLen<n.dest.length?\"function\"==typeof n.dest.slice?n.dest.slice(0,n.destLen):n.dest.subarray(0,n.destLen):n.dest}tinf_build_fixed_trees(sltree,sdtree),tinf_build_bits_base(length_bits,length_base,4,3),tinf_build_bits_base(dist_bits,dist_base,2,1),length_bits[28]=0,length_base[28]=258;var tinyInflate=tinf_uncompress;function derive(e,t,a,i,n){return Math.pow(1-n,3)*e+3*Math.pow(1-n,2)*n*t+3*(1-n)*Math.pow(n,2)*a+Math.pow(n,3)*i}function BoundingBox(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}function Path(){this.commands=[],this.fill=\"black\",this.stroke=null,this.strokeWidth=1}function fail(e){throw new Error(e)}function argument(e,t){e||fail(t)}BoundingBox.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},BoundingBox.prototype.addPoint=function(e,t){\"number\"==typeof e&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),\"number\"==typeof t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))},BoundingBox.prototype.addX=function(e){this.addPoint(e,null)},BoundingBox.prototype.addY=function(e){this.addPoint(null,e)},BoundingBox.prototype.addBezier=function(e,t,a,i,n,r,s,o){var l=[e,t],c=[a,i],d=[n,r],h=[s,o];this.addPoint(e,t),this.addPoint(s,o);for(var p=0;p<=1;p++){var u=6*l[p]-12*c[p]+6*d[p],m=-3*l[p]+9*c[p]-9*d[p]+3*h[p],g=3*c[p]-3*l[p];if(0!==m){var f=Math.pow(u,2)-4*g*m;if(!(f<0)){var b=(-u+Math.sqrt(f))/(2*m);0<b&&b<1&&(0===p&&this.addX(derive(l[p],c[p],d[p],h[p],b)),1===p&&this.addY(derive(l[p],c[p],d[p],h[p],b)));var U=(-u-Math.sqrt(f))/(2*m);0<U&&U<1&&(0===p&&this.addX(derive(l[p],c[p],d[p],h[p],U)),1===p&&this.addY(derive(l[p],c[p],d[p],h[p],U)))}}else{if(0===u)continue;var E=-g/u;0<E&&E<1&&(0===p&&this.addX(derive(l[p],c[p],d[p],h[p],E)),1===p&&this.addY(derive(l[p],c[p],d[p],h[p],E)))}}},BoundingBox.prototype.addQuad=function(e,t,a,i,n,r){var s=e+2/3*(a-e),o=t+2/3*(i-t),l=s+1/3*(n-e),c=o+1/3*(r-t);this.addBezier(e,t,s,o,l,c,n,r)},Path.prototype.moveTo=function(e,t){this.commands.push({type:\"M\",x:e,y:t})},Path.prototype.lineTo=function(e,t){this.commands.push({type:\"L\",x:e,y:t})},Path.prototype.curveTo=Path.prototype.bezierCurveTo=function(e,t,a,i,n,r){this.commands.push({type:\"C\",x1:e,y1:t,x2:a,y2:i,x:n,y:r})},Path.prototype.quadTo=Path.prototype.quadraticCurveTo=function(e,t,a,i){this.commands.push({type:\"Q\",x1:e,y1:t,x:a,y:i})},Path.prototype.close=Path.prototype.closePath=function(){this.commands.push({type:\"Z\"})},Path.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof BoundingBox){var t=e;return this.moveTo(t.x1,t.y1),this.lineTo(t.x2,t.y1),this.lineTo(t.x2,t.y2),this.lineTo(t.x1,t.y2),void this.close()}Array.prototype.push.apply(this.commands,e)},Path.prototype.getBoundingBox=function(){for(var e=new BoundingBox,t=0,a=0,i=0,n=0,r=0;r<this.commands.length;r++){var s=this.commands[r];switch(s.type){case\"M\":e.addPoint(s.x,s.y),t=i=s.x,a=n=s.y;break;case\"L\":e.addPoint(s.x,s.y),i=s.x,n=s.y;break;case\"Q\":e.addQuad(i,n,s.x1,s.y1,s.x,s.y),i=s.x,n=s.y;break;case\"C\":e.addBezier(i,n,s.x1,s.y1,s.x2,s.y2,s.x,s.y),i=s.x,n=s.y;break;case\"Z\":i=t,n=a;break;default:throw new Error(\"Unexpected path command \"+s.type)}}return e.isEmpty()&&e.addPoint(0,0),e},Path.prototype.draw=function(e){e.beginPath();for(var t=0;t<this.commands.length;t+=1){var a=this.commands[t];\"M\"===a.type?e.moveTo(a.x,a.y):\"L\"===a.type?e.lineTo(a.x,a.y):\"C\"===a.type?e.bezierCurveTo(a.x1,a.y1,a.x2,a.y2,a.x,a.y):\"Q\"===a.type?e.quadraticCurveTo(a.x1,a.y1,a.x,a.y):\"Z\"===a.type&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())},Path.prototype.toPathData=function(e){function t(t){return Math.round(t)===t?\"\"+Math.round(t):t.toFixed(e)}function a(){for(var e=arguments,a=\"\",i=0;i<arguments.length;i+=1){var n=e[i];n>=0&&i>0&&(a+=\" \"),a+=t(n)}return a}e=void 0!==e?e:2;for(var i=\"\",n=0;n<this.commands.length;n+=1){var r=this.commands[n];\"M\"===r.type?i+=\"M\"+a(r.x,r.y):\"L\"===r.type?i+=\"L\"+a(r.x,r.y):\"C\"===r.type?i+=\"C\"+a(r.x1,r.y1,r.x2,r.y2,r.x,r.y):\"Q\"===r.type?i+=\"Q\"+a(r.x1,r.y1,r.x,r.y):\"Z\"===r.type&&(i+=\"Z\")}return i},Path.prototype.toSVG=function(e){var t='<path d=\"';return t+=this.toPathData(e),t+='\"',this.fill&&\"black\"!==this.fill&&(null===this.fill?t+=' fill=\"none\"':t+=' fill=\"'+this.fill+'\"'),this.stroke&&(t+=' stroke=\"'+this.stroke+'\" stroke-width=\"'+this.strokeWidth+'\"'),t+\"/>\"},Path.prototype.toDOMElement=function(e){var t=this.toPathData(e),a=document.createElementNS(\"http://www.w3.org/2000/svg\",\"path\");return a.setAttribute(\"d\",t),a};var check={fail:fail,argument:argument,assert:argument},LIMIT16=32768,LIMIT32=2147483648,decode={},encode={},sizeOf={};function constant(e){return function(){return e}}encode.BYTE=function(e){return check.argument(e>=0&&e<=255,\"Byte value should be between 0 and 255.\"),[e]},sizeOf.BYTE=constant(1),encode.CHAR=function(e){return[e.charCodeAt(0)]},sizeOf.CHAR=constant(1),encode.CHARARRAY=function(e){void 0===e&&(e=\"\",console.warn(\"Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name.\"));for(var t=[],a=0;a<e.length;a+=1)t[a]=e.charCodeAt(a);return t},sizeOf.CHARARRAY=function(e){return void 0===e?0:e.length},encode.USHORT=function(e){return[e>>8&255,255&e]},sizeOf.USHORT=constant(2),encode.SHORT=function(e){return e>=LIMIT16&&(e=-(2*LIMIT16-e)),[e>>8&255,255&e]},sizeOf.SHORT=constant(2),encode.UINT24=function(e){return[e>>16&255,e>>8&255,255&e]},sizeOf.UINT24=constant(3),encode.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},sizeOf.ULONG=constant(4),encode.LONG=function(e){return e>=LIMIT32&&(e=-(2*LIMIT32-e)),[e>>24&255,e>>16&255,e>>8&255,255&e]},sizeOf.LONG=constant(4),encode.FIXED=encode.ULONG,sizeOf.FIXED=sizeOf.ULONG,encode.FWORD=encode.SHORT,sizeOf.FWORD=sizeOf.SHORT,encode.UFWORD=encode.USHORT,sizeOf.UFWORD=sizeOf.USHORT,encode.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,255&e]},sizeOf.LONGDATETIME=constant(8),encode.TAG=function(e){return check.argument(4===e.length,\"Tag should be exactly 4 ASCII characters.\"),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},sizeOf.TAG=constant(4),encode.Card8=encode.BYTE,sizeOf.Card8=sizeOf.BYTE,encode.Card16=encode.USHORT,sizeOf.Card16=sizeOf.USHORT,encode.OffSize=encode.BYTE,sizeOf.OffSize=sizeOf.BYTE,encode.SID=encode.USHORT,sizeOf.SID=sizeOf.USHORT,encode.NUMBER=function(e){return e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?encode.NUMBER16(e):encode.NUMBER32(e)},sizeOf.NUMBER=function(e){return encode.NUMBER(e).length},encode.NUMBER16=function(e){return[28,e>>8&255,255&e]},sizeOf.NUMBER16=constant(3),encode.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,255&e]},sizeOf.NUMBER32=constant(5),encode.REAL=function(e){var t=e.toString(),a=/\\.(\\d*?)(?:9{5,20}|0{5,20})\\d{0,2}(?:e(.+)|$)/.exec(t);if(a){var i=parseFloat(\"1e\"+((a[2]?+a[2]:0)+a[1].length));t=(Math.round(e*i)/i).toString()}for(var n=\"\",r=0,s=t.length;r<s;r+=1){var o=t[r];n+=\"e\"===o?\"-\"===t[++r]?\"c\":\"b\":\".\"===o?\"a\":\"-\"===o?\"e\":o}for(var l=[30],c=0,d=(n+=1&n.length?\"f\":\"ff\").length;c<d;c+=2)l.push(parseInt(n.substr(c,2),16));return l},sizeOf.REAL=function(e){return encode.REAL(e).length},encode.NAME=encode.CHARARRAY,sizeOf.NAME=sizeOf.CHARARRAY,encode.STRING=encode.CHARARRAY,sizeOf.STRING=sizeOf.CHARARRAY,decode.UTF8=function(e,t,a){for(var i=[],n=a,r=0;r<n;r++,t+=1)i[r]=e.getUint8(t);return String.fromCharCode.apply(null,i)},decode.UTF16=function(e,t,a){for(var i=[],n=a/2,r=0;r<n;r++,t+=2)i[r]=e.getUint16(t);return String.fromCharCode.apply(null,i)},encode.UTF16=function(e){for(var t=[],a=0;a<e.length;a+=1){var i=e.charCodeAt(a);t[t.length]=i>>8&255,t[t.length]=255&i}return t},sizeOf.UTF16=function(e){return 2*e.length};var eightBitMacEncodings={\"x-mac-croatian\":\"\u00c4\u00c5\u00c7\u00c9\u00d1\u00d6\u00dc\u00e1\u00e0\u00e2\u00e4\u00e3\u00e5\u00e7\u00e9\u00e8\u00ea\u00eb\u00ed\u00ec\u00ee\u00ef\u00f1\u00f3\u00f2\u00f4\u00f6\u00f5\u00fa\u00f9\u00fb\u00fc\u2020\u00b0\u00a2\u00a3\u00a7\u2022\u00b6\u00df\u00ae\u0160\u2122\u00b4\u00a8\u2260\u017d\u00d8\u221e\u00b1\u2264\u2265\u2206\u00b5\u2202\u2211\u220f\u0161\u222b\u00aa\u00ba\u03a9\u017e\u00f8\u00bf\u00a1\u00ac\u221a\u0192\u2248\u0106\u00ab\u010c\u2026\u00a0\u00c0\u00c3\u00d5\u0152\u0153\u0110\u2014\u201c\u201d\u2018\u2019\u00f7\u25ca\uf8ff\u00a9\u2044\u20ac\u2039\u203a\u00c6\u00bb\u2013\u00b7\u201a\u201e\u2030\u00c2\u0107\u00c1\u010d\u00c8\u00cd\u00ce\u00cf\u00cc\u00d3\u00d4\u0111\u00d2\u00da\u00db\u00d9\u0131\u02c6\u02dc\u00af\u03c0\u00cb\u02da\u00b8\u00ca\u00e6\u02c7\",\"x-mac-cyrillic\":\"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u2020\u00b0\u0490\u00a3\u00a7\u2022\u00b6\u0406\u00ae\u00a9\u2122\u0402\u0452\u2260\u0403\u0453\u221e\u00b1\u2264\u2265\u0456\u00b5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040a\u045a\u0458\u0405\u00ac\u221a\u0192\u2248\u2206\u00ab\u00bb\u2026\u00a0\u040b\u045b\u040c\u045c\u0455\u2013\u2014\u201c\u201d\u2018\u2019\u00f7\u201e\u040e\u045e\u040f\u045f\u2116\u0401\u0451\u044f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\",\"x-mac-gaelic\":\"\u00c4\u00c5\u00c7\u00c9\u00d1\u00d6\u00dc\u00e1\u00e0\u00e2\u00e4\u00e3\u00e5\u00e7\u00e9\u00e8\u00ea\u00eb\u00ed\u00ec\u00ee\u00ef\u00f1\u00f3\u00f2\u00f4\u00f6\u00f5\u00fa\u00f9\u00fb\u00fc\u2020\u00b0\u00a2\u00a3\u00a7\u2022\u00b6\u00df\u00ae\u00a9\u2122\u00b4\u00a8\u2260\u00c6\u00d8\u1e02\u00b1\u2264\u2265\u1e03\u010a\u010b\u1e0a\u1e0b\u1e1e\u1e1f\u0120\u0121\u1e40\u00e6\u00f8\u1e41\u1e56\u1e57\u027c\u0192\u017f\u1e60\u00ab\u00bb\u2026\u00a0\u00c0\u00c3\u00d5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\u1e61\u1e9b\u00ff\u0178\u1e6a\u20ac\u2039\u203a\u0176\u0177\u1e6b\u00b7\u1ef2\u1ef3\u204a\u00c2\u00ca\u00c1\u00cb\u00c8\u00cd\u00ce\u00cf\u00cc\u00d3\u00d4\u2663\u00d2\u00da\u00db\u00d9\u0131\u00dd\u00fd\u0174\u0175\u1e84\u1e85\u1e80\u1e81\u1e82\u1e83\",\"x-mac-greek\":\"\u00c4\u00b9\u00b2\u00c9\u00b3\u00d6\u00dc\u0385\u00e0\u00e2\u00e4\u0384\u00a8\u00e7\u00e9\u00e8\u00ea\u00eb\u00a3\u2122\u00ee\u00ef\u2022\u00bd\u2030\u00f4\u00f6\u00a6\u20ac\u00f9\u00fb\u00fc\u2020\u0393\u0394\u0398\u039b\u039e\u03a0\u00df\u00ae\u00a9\u03a3\u03aa\u00a7\u2260\u00b0\u00b7\u0391\u00b1\u2264\u2265\u00a5\u0392\u0395\u0396\u0397\u0399\u039a\u039c\u03a6\u03ab\u03a8\u03a9\u03ac\u039d\u00ac\u039f\u03a1\u2248\u03a4\u00ab\u00bb\u2026\u00a0\u03a5\u03a7\u0386\u0388\u0153\u2013\u2015\u201c\u201d\u2018\u2019\u00f7\u0389\u038a\u038c\u038e\u03ad\u03ae\u03af\u03cc\u038f\u03cd\u03b1\u03b2\u03c8\u03b4\u03b5\u03c6\u03b3\u03b7\u03b9\u03be\u03ba\u03bb\u03bc\u03bd\u03bf\u03c0\u03ce\u03c1\u03c3\u03c4\u03b8\u03c9\u03c2\u03c7\u03c5\u03b6\u03ca\u03cb\u0390\u03b0\u00ad\",\"x-mac-icelandic\":\"\u00c4\u00c5\u00c7\u00c9\u00d1\u00d6\u00dc\u00e1\u00e0\u00e2\u00e4\u00e3\u00e5\u00e7\u00e9\u00e8\u00ea\u00eb\u00ed\u00ec\u00ee\u00ef\u00f1\u00f3\u00f2\u00f4\u00f6\u00f5\u00fa\u00f9\u00fb\u00fc\u00dd\u00b0\u00a2\u00a3\u00a7\u2022\u00b6\u00df\u00ae\u00a9\u2122\u00b4\u00a8\u2260\u00c6\u00d8\u221e\u00b1\u2264\u2265\u00a5\u00b5\u2202\u2211\u220f\u03c0\u222b\u00aa\u00ba\u03a9\u00e6\u00f8\u00bf\u00a1\u00ac\u221a\u0192\u2248\u2206\u00ab\u00bb\u2026\u00a0\u00c0\u00c3\u00d5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\u00f7\u25ca\u00ff\u0178\u2044\u20ac\u00d0\u00f0\u00de\u00fe\u00fd\u00b7\u201a\u201e\u2030\u00c2\u00ca\u00c1\u00cb\u00c8\u00cd\u00ce\u00cf\u00cc\u00d3\u00d4\uf8ff\u00d2\u00da\u00db\u00d9\u0131\u02c6\u02dc\u00af\u02d8\u02d9\u02da\u00b8\u02dd\u02db\u02c7\",\"x-mac-inuit\":\"\u1403\u1404\u1405\u1406\u140a\u140b\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144e\u144f\u1450\u1451\u1455\u1456\u1466\u146d\u146e\u146f\u1470\u1472\u1473\u1483\u148b\u148c\u148d\u148e\u1490\u1491\u00b0\u14a1\u14a5\u14a6\u2022\u00b6\u14a7\u00ae\u00a9\u2122\u14a8\u14aa\u14ab\u14bb\u14c2\u14c3\u14c4\u14c5\u14c7\u14c8\u14d0\u14ef\u14f0\u14f1\u14f2\u14f4\u14f5\u1505\u14d5\u14d6\u14d7\u14d8\u14da\u14db\u14ea\u1528\u1529\u152a\u152b\u152d\u2026\u00a0\u152e\u153e\u1555\u1556\u1557\u2013\u2014\u201c\u201d\u2018\u2019\u1558\u1559\u155a\u155d\u1546\u1547\u1548\u1549\u154b\u154c\u1550\u157f\u1580\u1581\u1582\u1583\u1584\u1585\u158f\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15a0\u15a1\u15a2\u15a3\u15a4\u15a5\u15a6\u157c\u0141\u0142\",\"x-mac-ce\":\"\u00c4\u0100\u0101\u00c9\u0104\u00d6\u00dc\u00e1\u0105\u010c\u00e4\u010d\u0106\u0107\u00e9\u0179\u017a\u010e\u00ed\u010f\u0112\u0113\u0116\u00f3\u0117\u00f4\u00f6\u00f5\u00fa\u011a\u011b\u00fc\u2020\u00b0\u0118\u00a3\u00a7\u2022\u00b6\u00df\u00ae\u00a9\u2122\u0119\u00a8\u2260\u0123\u012e\u012f\u012a\u2264\u2265\u012b\u0136\u2202\u2211\u0142\u013b\u013c\u013d\u013e\u0139\u013a\u0145\u0146\u0143\u00ac\u221a\u0144\u0147\u2206\u00ab\u00bb\u2026\u00a0\u0148\u0150\u00d5\u0151\u014c\u2013\u2014\u201c\u201d\u2018\u2019\u00f7\u25ca\u014d\u0154\u0155\u0158\u2039\u203a\u0159\u0156\u0157\u0160\u201a\u201e\u0161\u015a\u015b\u00c1\u0164\u0165\u00cd\u017d\u017e\u016a\u00d3\u00d4\u016b\u016e\u00da\u016f\u0170\u0171\u0172\u0173\u00dd\u00fd\u0137\u017b\u0141\u017c\u0122\u02c7\",macintosh:\"\u00c4\u00c5\u00c7\u00c9\u00d1\u00d6\u00dc\u00e1\u00e0\u00e2\u00e4\u00e3\u00e5\u00e7\u00e9\u00e8\u00ea\u00eb\u00ed\u00ec\u00ee\u00ef\u00f1\u00f3\u00f2\u00f4\u00f6\u00f5\u00fa\u00f9\u00fb\u00fc\u2020\u00b0\u00a2\u00a3\u00a7\u2022\u00b6\u00df\u00ae\u00a9\u2122\u00b4\u00a8\u2260\u00c6\u00d8\u221e\u00b1\u2264\u2265\u00a5\u00b5\u2202\u2211\u220f\u03c0\u222b\u00aa\u00ba\u03a9\u00e6\u00f8\u00bf\u00a1\u00ac\u221a\u0192\u2248\u2206\u00ab\u00bb\u2026\u00a0\u00c0\u00c3\u00d5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\u00f7\u25ca\u00ff\u0178\u2044\u20ac\u2039\u203a\ufb01\ufb02\u2021\u00b7\u201a\u201e\u2030\u00c2\u00ca\u00c1\u00cb\u00c8\u00cd\u00ce\u00cf\u00cc\u00d3\u00d4\uf8ff\u00d2\u00da\u00db\u00d9\u0131\u02c6\u02dc\u00af\u02d8\u02d9\u02da\u00b8\u02dd\u02db\u02c7\",\"x-mac-romanian\":\"\u00c4\u00c5\u00c7\u00c9\u00d1\u00d6\u00dc\u00e1\u00e0\u00e2\u00e4\u00e3\u00e5\u00e7\u00e9\u00e8\u00ea\u00eb\u00ed\u00ec\u00ee\u00ef\u00f1\u00f3\u00f2\u00f4\u00f6\u00f5\u00fa\u00f9\u00fb\u00fc\u2020\u00b0\u00a2\u00a3\u00a7\u2022\u00b6\u00df\u00ae\u00a9\u2122\u00b4\u00a8\u2260\u0102\u0218\u221e\u00b1\u2264\u2265\u00a5\u00b5\u2202\u2211\u220f\u03c0\u222b\u00aa\u00ba\u03a9\u0103\u0219\u00bf\u00a1\u00ac\u221a\u0192\u2248\u2206\u00ab\u00bb\u2026\u00a0\u00c0\u00c3\u00d5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\u00f7\u25ca\u00ff\u0178\u2044\u20ac\u2039\u203a\u021a\u021b\u2021\u00b7\u201a\u201e\u2030\u00c2\u00ca\u00c1\u00cb\u00c8\u00cd\u00ce\u00cf\u00cc\u00d3\u00d4\uf8ff\u00d2\u00da\u00db\u00d9\u0131\u02c6\u02dc\u00af\u02d8\u02d9\u02da\u00b8\u02dd\u02db\u02c7\",\"x-mac-turkish\":\"\u00c4\u00c5\u00c7\u00c9\u00d1\u00d6\u00dc\u00e1\u00e0\u00e2\u00e4\u00e3\u00e5\u00e7\u00e9\u00e8\u00ea\u00eb\u00ed\u00ec\u00ee\u00ef\u00f1\u00f3\u00f2\u00f4\u00f6\u00f5\u00fa\u00f9\u00fb\u00fc\u2020\u00b0\u00a2\u00a3\u00a7\u2022\u00b6\u00df\u00ae\u00a9\u2122\u00b4\u00a8\u2260\u00c6\u00d8\u221e\u00b1\u2264\u2265\u00a5\u00b5\u2202\u2211\u220f\u03c0\u222b\u00aa\u00ba\u03a9\u00e6\u00f8\u00bf\u00a1\u00ac\u221a\u0192\u2248\u2206\u00ab\u00bb\u2026\u00a0\u00c0\u00c3\u00d5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\u00f7\u25ca\u00ff\u0178\u011e\u011f\u0130\u0131\u015e\u015f\u2021\u00b7\u201a\u201e\u2030\u00c2\u00ca\u00c1\u00cb\u00c8\u00cd\u00ce\u00cf\u00cc\u00d3\u00d4\uf8ff\u00d2\u00da\u00db\u00d9\uf8a0\u02c6\u02dc\u00af\u02d8\u02d9\u02da\u00b8\u02dd\u02db\u02c7\"};decode.MACSTRING=function(e,t,a,i){var n=eightBitMacEncodings[i];if(void 0!==n){for(var r=\"\",s=0;s<a;s++){var o=e.getUint8(t+s);r+=o<=127?String.fromCharCode(o):n[127&o]}return r}};var macEncodingTableCache=\"function\"==typeof WeakMap&&new WeakMap,macEncodingCacheKeys,getMacEncodingTable=function(e){if(!macEncodingCacheKeys)for(var t in macEncodingCacheKeys={},eightBitMacEncodings)macEncodingCacheKeys[t]=new String(t);var a=macEncodingCacheKeys[e];if(void 0!==a){if(macEncodingTableCache){var i=macEncodingTableCache.get(a);if(void 0!==i)return i}var n=eightBitMacEncodings[e];if(void 0!==n){for(var r={},s=0;s<n.length;s++)r[n.charCodeAt(s)]=s+128;return macEncodingTableCache&&macEncodingTableCache.set(a,r),r}}};function isByteEncodable(e){return e>=-128&&e<=127}function encodeVarDeltaRunAsZeroes(e,t,a){for(var i=0,n=e.length;t<n&&i<64&&0===e[t];)++t,++i;return a.push(128|i-1),t}function encodeVarDeltaRunAsBytes(e,t,a){for(var i=0,n=e.length,r=t;r<n&&i<64;){var s=e[r];if(!isByteEncodable(s))break;if(0===s&&r+1<n&&0===e[r+1])break;++r,++i}a.push(i-1);for(var o=t;o<r;++o)a.push(e[o]+256&255);return r}function encodeVarDeltaRunAsWords(e,t,a){for(var i=0,n=e.length,r=t;r<n&&i<64;){var s=e[r];if(0===s)break;if(isByteEncodable(s)&&r+1<n&&isByteEncodable(e[r+1]))break;++r,++i}a.push(64|i-1);for(var o=t;o<r;++o){var l=e[o];a.push(l+65536>>8&255,l+256&255)}return r}encode.MACSTRING=function(e,t){var a=getMacEncodingTable(t);if(void 0!==a){for(var i=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=128&&void 0===(r=a[r]))return;i[n]=r}return i}},sizeOf.MACSTRING=function(e,t){var a=encode.MACSTRING(e,t);return void 0!==a?a.length:0},encode.VARDELTAS=function(e){for(var t=0,a=[];t<e.length;){var i=e[t];t=0===i?encodeVarDeltaRunAsZeroes(e,t,a):i>=-128&&i<=127?encodeVarDeltaRunAsBytes(e,t,a):encodeVarDeltaRunAsWords(e,t,a)}return a},encode.INDEX=function(e){for(var t=1,a=[t],i=[],n=0;n<e.length;n+=1){var r=encode.OBJECT(e[n]);Array.prototype.push.apply(i,r),t+=r.length,a.push(t)}if(0===i.length)return[0,0];for(var s=[],o=1+Math.floor(Math.log(t)/Math.log(2))/8|0,l=[void 0,encode.BYTE,encode.USHORT,encode.UINT24,encode.ULONG][o],c=0;c<a.length;c+=1){var d=l(a[c]);Array.prototype.push.apply(s,d)}return Array.prototype.concat(encode.Card16(e.length),encode.OffSize(o),s,i)},sizeOf.INDEX=function(e){return encode.INDEX(e).length},encode.DICT=function(e){for(var t=[],a=Object.keys(e),i=a.length,n=0;n<i;n+=1){var r=parseInt(a[n],0),s=e[r];t=(t=t.concat(encode.OPERAND(s.value,s.type))).concat(encode.OPERATOR(r))}return t},sizeOf.DICT=function(e){return encode.DICT(e).length},encode.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},encode.OPERAND=function(e,t){var a=[];if(Array.isArray(t))for(var i=0;i<t.length;i+=1)check.argument(e.length===t.length,\"Not enough arguments given for type\"+t),a=a.concat(encode.OPERAND(e[i],t[i]));else if(\"SID\"===t)a=a.concat(encode.NUMBER(e));else if(\"offset\"===t)a=a.concat(encode.NUMBER32(e));else if(\"number\"===t)a=a.concat(encode.NUMBER(e));else{if(\"real\"!==t)throw new Error(\"Unknown operand type \"+t);a=a.concat(encode.REAL(e))}return a},encode.OP=encode.BYTE,sizeOf.OP=sizeOf.BYTE;var wmm=\"function\"==typeof WeakMap&&new WeakMap;function Table(e,t,a){if(t.length&&(\"coverageFormat\"!==t[0].name||1===t[0].value))for(var i=0;i<t.length;i+=1){var n=t[i];this[n.name]=n.value}if(this.tableName=e,this.fields=t,a)for(var r=Object.keys(a),s=0;s<r.length;s+=1){var o=r[s],l=a[o];void 0!==this[o]&&(this[o]=l)}}function ushortList(e,t,a){void 0===a&&(a=t.length);var i=new Array(t.length+1);i[0]={name:e+\"Count\",type:\"USHORT\",value:a};for(var n=0;n<t.length;n++)i[n+1]={name:e+n,type:\"USHORT\",value:t[n]};return i}function tableList(e,t,a){var i=t.length,n=new Array(i+1);n[0]={name:e+\"Count\",type:\"USHORT\",value:i};for(var r=0;r<i;r++)n[r+1]={name:e+r,type:\"TABLE\",value:a(t[r],r)};return n}function recordList(e,t,a){var i=t.length,n=[];n[0]={name:e+\"Count\",type:\"USHORT\",value:i};for(var r=0;r<i;r++)n=n.concat(a(t[r],r));return n}function Coverage(e){1===e.format?Table.call(this,\"coverageTable\",[{name:\"coverageFormat\",type:\"USHORT\",value:1}].concat(ushortList(\"glyph\",e.glyphs))):2===e.format?Table.call(this,\"coverageTable\",[{name:\"coverageFormat\",type:\"USHORT\",value:2}].concat(recordList(\"rangeRecord\",e.ranges,(function(e){return[{name:\"startGlyphID\",type:\"USHORT\",value:e.start},{name:\"endGlyphID\",type:\"USHORT\",value:e.end},{name:\"startCoverageIndex\",type:\"USHORT\",value:e.index}]})))):check.assert(!1,\"Coverage format must be 1 or 2.\")}function ScriptList(e){Table.call(this,\"scriptListTable\",recordList(\"scriptRecord\",e,(function(e,t){var a=e.script,i=a.defaultLangSys;return check.assert(!!i,\"Unable to write GSUB: script \"+e.tag+\" has no default language system.\"),[{name:\"scriptTag\"+t,type:\"TAG\",value:e.tag},{name:\"script\"+t,type:\"TABLE\",value:new Table(\"scriptTable\",[{name:\"defaultLangSys\",type:\"TABLE\",value:new Table(\"defaultLangSys\",[{name:\"lookupOrder\",type:\"USHORT\",value:0},{name:\"reqFeatureIndex\",type:\"USHORT\",value:i.reqFeatureIndex}].concat(ushortList(\"featureIndex\",i.featureIndexes)))}].concat(recordList(\"langSys\",a.langSysRecords,(function(e,t){var a=e.langSys;return[{name:\"langSysTag\"+t,type:\"TAG\",value:e.tag},{name:\"langSys\"+t,type:\"TABLE\",value:new Table(\"langSys\",[{name:\"lookupOrder\",type:\"USHORT\",value:0},{name:\"reqFeatureIndex\",type:\"USHORT\",value:a.reqFeatureIndex}].concat(ushortList(\"featureIndex\",a.featureIndexes)))}]}))))}]})))}function FeatureList(e){Table.call(this,\"featureListTable\",recordList(\"featureRecord\",e,(function(e,t){var a=e.feature;return[{name:\"featureTag\"+t,type:\"TAG\",value:e.tag},{name:\"feature\"+t,type:\"TABLE\",value:new Table(\"featureTable\",[{name:\"featureParams\",type:\"USHORT\",value:a.featureParams}].concat(ushortList(\"lookupListIndex\",a.lookupListIndexes)))}]})))}function LookupList(e,t){Table.call(this,\"lookupListTable\",tableList(\"lookup\",e,(function(e){var a=t[e.lookupType];return check.assert(!!a,\"Unable to write GSUB lookup type \"+e.lookupType+\" tables.\"),new Table(\"lookupTable\",[{name:\"lookupType\",type:\"USHORT\",value:e.lookupType},{name:\"lookupFlag\",type:\"USHORT\",value:e.lookupFlag}].concat(tableList(\"subtable\",e.subtables,a)))})))}encode.CHARSTRING=function(e){if(wmm){var t=wmm.get(e);if(void 0!==t)return t}for(var a=[],i=e.length,n=0;n<i;n+=1){var r=e[n];a=a.concat(encode[r.type](r.value))}return wmm&&wmm.set(e,a),a},sizeOf.CHARSTRING=function(e){return encode.CHARSTRING(e).length},encode.OBJECT=function(e){var t=encode[e.type];return check.argument(void 0!==t,\"No encoding function for type \"+e.type),t(e.value)},sizeOf.OBJECT=function(e){var t=sizeOf[e.type];return check.argument(void 0!==t,\"No sizeOf function for type \"+e.type),t(e.value)},encode.TABLE=function(e){for(var t=[],a=e.fields.length,i=[],n=[],r=0;r<a;r+=1){var s=e.fields[r],o=encode[s.type];check.argument(void 0!==o,\"No encoding function for field type \"+s.type+\" (\"+s.name+\")\");var l=e[s.name];void 0===l&&(l=s.value);var c=o(l);\"TABLE\"===s.type?(n.push(t.length),t=t.concat([0,0]),i.push(c)):t=t.concat(c)}for(var d=0;d<i.length;d+=1){var h=n[d],p=t.length;check.argument(p<65536,\"Table \"+e.tableName+\" too big.\"),t[h]=p>>8,t[h+1]=255&p,t=t.concat(i[d])}return t},sizeOf.TABLE=function(e){for(var t=0,a=e.fields.length,i=0;i<a;i+=1){var n=e.fields[i],r=sizeOf[n.type];check.argument(void 0!==r,\"No sizeOf function for field type \"+n.type+\" (\"+n.name+\")\");var s=e[n.name];void 0===s&&(s=n.value),t+=r(s),\"TABLE\"===n.type&&(t+=2)}return t},encode.RECORD=encode.TABLE,sizeOf.RECORD=sizeOf.TABLE,encode.LITERAL=function(e){return e},sizeOf.LITERAL=function(e){return e.length},Table.prototype.encode=function(){return encode.TABLE(this)},Table.prototype.sizeOf=function(){return sizeOf.TABLE(this)},Coverage.prototype=Object.create(Table.prototype),Coverage.prototype.constructor=Coverage,ScriptList.prototype=Object.create(Table.prototype),ScriptList.prototype.constructor=ScriptList,FeatureList.prototype=Object.create(Table.prototype),FeatureList.prototype.constructor=FeatureList,LookupList.prototype=Object.create(Table.prototype),LookupList.prototype.constructor=LookupList;var table={Table:Table,Record:Table,Coverage:Coverage,ScriptList:ScriptList,FeatureList:FeatureList,LookupList:LookupList,ushortList:ushortList,tableList:tableList,recordList:recordList};function getByte(e,t){return e.getUint8(t)}function getUShort(e,t){return e.getUint16(t,!1)}function getShort(e,t){return e.getInt16(t,!1)}function getULong(e,t){return e.getUint32(t,!1)}function getFixed(e,t){return e.getInt16(t,!1)+e.getUint16(t+2,!1)/65535}function getTag(e,t){for(var a=\"\",i=t;i<t+4;i+=1)a+=String.fromCharCode(e.getInt8(i));return a}function getOffset(e,t,a){for(var i=0,n=0;n<a;n+=1)i<<=8,i+=e.getUint8(t+n);return i}function getBytes(e,t,a){for(var i=[],n=t;n<a;n+=1)i.push(e.getUint8(n));return i}function bytesToString(e){for(var t=\"\",a=0;a<e.length;a+=1)t+=String.fromCharCode(e[a]);return t}var typeOffsets={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function Parser(e,t){this.data=e,this.offset=t,this.relativeOffset=0}Parser.prototype.parseByte=function(){var e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},Parser.prototype.parseChar=function(){var e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},Parser.prototype.parseCard8=Parser.prototype.parseByte,Parser.prototype.parseUShort=function(){var e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},Parser.prototype.parseCard16=Parser.prototype.parseUShort,Parser.prototype.parseSID=Parser.prototype.parseUShort,Parser.prototype.parseOffset16=Parser.prototype.parseUShort,Parser.prototype.parseShort=function(){var e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},Parser.prototype.parseF2Dot14=function(){var e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},Parser.prototype.parseULong=function(){var e=getULong(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},Parser.prototype.parseOffset32=Parser.prototype.parseULong,Parser.prototype.parseFixed=function(){var e=getFixed(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},Parser.prototype.parseString=function(e){var t=this.data,a=this.offset+this.relativeOffset,i=\"\";this.relativeOffset+=e;for(var n=0;n<e;n++)i+=String.fromCharCode(t.getUint8(a+n));return i},Parser.prototype.parseTag=function(){return this.parseString(4)},Parser.prototype.parseLongDateTime=function(){var e=getULong(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},Parser.prototype.parseVersion=function(e){var t=getUShort(this.data,this.offset+this.relativeOffset),a=getUShort(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,void 0===e&&(e=4096),t+a/e/10},Parser.prototype.skip=function(e,t){void 0===t&&(t=1),this.relativeOffset+=typeOffsets[e]*t},Parser.prototype.parseULongList=function(e){void 0===e&&(e=this.parseULong());for(var t=new Array(e),a=this.data,i=this.offset+this.relativeOffset,n=0;n<e;n++)t[n]=a.getUint32(i),i+=4;return this.relativeOffset+=4*e,t},Parser.prototype.parseOffset16List=Parser.prototype.parseUShortList=function(e){void 0===e&&(e=this.parseUShort());for(var t=new Array(e),a=this.data,i=this.offset+this.relativeOffset,n=0;n<e;n++)t[n]=a.getUint16(i),i+=2;return this.relativeOffset+=2*e,t},Parser.prototype.parseShortList=function(e){for(var t=new Array(e),a=this.data,i=this.offset+this.relativeOffset,n=0;n<e;n++)t[n]=a.getInt16(i),i+=2;return this.relativeOffset+=2*e,t},Parser.prototype.parseByteList=function(e){for(var t=new Array(e),a=this.data,i=this.offset+this.relativeOffset,n=0;n<e;n++)t[n]=a.getUint8(i++);return this.relativeOffset+=e,t},Parser.prototype.parseList=function(e,t){t||(t=e,e=this.parseUShort());for(var a=new Array(e),i=0;i<e;i++)a[i]=t.call(this);return a},Parser.prototype.parseList32=function(e,t){t||(t=e,e=this.parseULong());for(var a=new Array(e),i=0;i<e;i++)a[i]=t.call(this);return a},Parser.prototype.parseRecordList=function(e,t){t||(t=e,e=this.parseUShort());for(var a=new Array(e),i=Object.keys(t),n=0;n<e;n++){for(var r={},s=0;s<i.length;s++){var o=i[s],l=t[o];r[o]=l.call(this)}a[n]=r}return a},Parser.prototype.parseRecordList32=function(e,t){t||(t=e,e=this.parseULong());for(var a=new Array(e),i=Object.keys(t),n=0;n<e;n++){for(var r={},s=0;s<i.length;s++){var o=i[s],l=t[o];r[o]=l.call(this)}a[n]=r}return a},Parser.prototype.parseStruct=function(e){if(\"function\"==typeof e)return e.call(this);for(var t=Object.keys(e),a={},i=0;i<t.length;i++){var n=t[i],r=e[n];a[n]=r.call(this)}return a},Parser.prototype.parseValueRecord=function(e){if(void 0===e&&(e=this.parseUShort()),0!==e){var t={};return 1&e&&(t.xPlacement=this.parseShort()),2&e&&(t.yPlacement=this.parseShort()),4&e&&(t.xAdvance=this.parseShort()),8&e&&(t.yAdvance=this.parseShort()),16&e&&(t.xPlaDevice=void 0,this.parseShort()),32&e&&(t.yPlaDevice=void 0,this.parseShort()),64&e&&(t.xAdvDevice=void 0,this.parseShort()),128&e&&(t.yAdvDevice=void 0,this.parseShort()),t}},Parser.prototype.parseValueRecordList=function(){for(var e=this.parseUShort(),t=this.parseUShort(),a=new Array(t),i=0;i<t;i++)a[i]=this.parseValueRecord(e);return a},Parser.prototype.parsePointer=function(e){var t=this.parseOffset16();if(t>0)return new Parser(this.data,this.offset+t).parseStruct(e)},Parser.prototype.parsePointer32=function(e){var t=this.parseOffset32();if(t>0)return new Parser(this.data,this.offset+t).parseStruct(e)},Parser.prototype.parseListOfLists=function(e){for(var t=this.parseOffset16List(),a=t.length,i=this.relativeOffset,n=new Array(a),r=0;r<a;r++){var s=t[r];if(0!==s)if(this.relativeOffset=s,e){for(var o=this.parseOffset16List(),l=new Array(o.length),c=0;c<o.length;c++)this.relativeOffset=s+o[c],l[c]=e.call(this);n[r]=l}else n[r]=this.parseUShortList();else n[r]=void 0}return this.relativeOffset=i,n},Parser.prototype.parseCoverage=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort(),a=this.parseUShort();if(1===t)return{format:1,glyphs:this.parseUShortList(a)};if(2===t){for(var i=new Array(a),n=0;n<a;n++)i[n]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:i}}throw new Error(\"0x\"+e.toString(16)+\": Coverage format must be 1 or 2.\")},Parser.prototype.parseClassDef=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(2===t)return{format:2,ranges:this.parseRecordList({start:Parser.uShort,end:Parser.uShort,classId:Parser.uShort})};throw new Error(\"0x\"+e.toString(16)+\": ClassDef format must be 1 or 2.\")},Parser.list=function(e,t){return function(){return this.parseList(e,t)}},Parser.list32=function(e,t){return function(){return this.parseList32(e,t)}},Parser.recordList=function(e,t){return function(){return this.parseRecordList(e,t)}},Parser.recordList32=function(e,t){return function(){return this.parseRecordList32(e,t)}},Parser.pointer=function(e){return function(){return this.parsePointer(e)}},Parser.pointer32=function(e){return function(){return this.parsePointer32(e)}},Parser.tag=Parser.prototype.parseTag,Parser.byte=Parser.prototype.parseByte,Parser.uShort=Parser.offset16=Parser.prototype.parseUShort,Parser.uShortList=Parser.prototype.parseUShortList,Parser.uLong=Parser.offset32=Parser.prototype.parseULong,Parser.uLongList=Parser.prototype.parseULongList,Parser.struct=Parser.prototype.parseStruct,Parser.coverage=Parser.prototype.parseCoverage,Parser.classDef=Parser.prototype.parseClassDef;var langSysTable={reserved:Parser.uShort,reqFeatureIndex:Parser.uShort,featureIndexes:Parser.uShortList};Parser.prototype.parseScriptList=function(){return this.parsePointer(Parser.recordList({tag:Parser.tag,script:Parser.pointer({defaultLangSys:Parser.pointer(langSysTable),langSysRecords:Parser.recordList({tag:Parser.tag,langSys:Parser.pointer(langSysTable)})})}))||[]},Parser.prototype.parseFeatureList=function(){return this.parsePointer(Parser.recordList({tag:Parser.tag,feature:Parser.pointer({featureParams:Parser.offset16,lookupListIndexes:Parser.uShortList})}))||[]},Parser.prototype.parseLookupList=function(e){return this.parsePointer(Parser.list(Parser.pointer((function(){var t=this.parseUShort();check.argument(1<=t&&t<=9,\"GPOS/GSUB lookup type \"+t+\" unknown.\");var a=this.parseUShort(),i=16&a;return{lookupType:t,lookupFlag:a,subtables:this.parseList(Parser.pointer(e[t])),markFilteringSet:i?this.parseUShort():void 0}}))))||[]},Parser.prototype.parseFeatureVariationsList=function(){return this.parsePointer32((function(){var e=this.parseUShort(),t=this.parseUShort();return check.argument(1===e&&t<1,\"GPOS/GSUB feature variations table unknown.\"),this.parseRecordList32({conditionSetOffset:Parser.offset32,featureTableSubstitutionOffset:Parser.offset32})}))||[]};var parse={getByte:getByte,getCard8:getByte,getUShort:getUShort,getCard16:getUShort,getShort:getShort,getULong:getULong,getFixed:getFixed,getTag:getTag,getOffset:getOffset,getBytes:getBytes,bytesToString:bytesToString,Parser:Parser};function parseCmapTableFormat12(e,t){var a;t.parseUShort(),e.length=t.parseULong(),e.language=t.parseULong(),e.groupCount=a=t.parseULong(),e.glyphIndexMap={};for(var i=0;i<a;i+=1)for(var n=t.parseULong(),r=t.parseULong(),s=t.parseULong(),o=n;o<=r;o+=1)e.glyphIndexMap[o]=s,s++}function parseCmapTableFormat4(e,t,a,i,n){var r;e.length=t.parseUShort(),e.language=t.parseUShort(),e.segCount=r=t.parseUShort()>>1,t.skip(\"uShort\",3),e.glyphIndexMap={};for(var s=new parse.Parser(a,i+n+14),o=new parse.Parser(a,i+n+16+2*r),l=new parse.Parser(a,i+n+16+4*r),c=new parse.Parser(a,i+n+16+6*r),d=i+n+16+8*r,h=0;h<r-1;h+=1)for(var p=void 0,u=s.parseUShort(),m=o.parseUShort(),g=l.parseShort(),f=c.parseUShort(),b=m;b<=u;b+=1)0!==f?(d=c.offset+c.relativeOffset-2,d+=f,d+=2*(b-m),0!==(p=parse.getUShort(a,d))&&(p=p+g&65535)):p=b+g&65535,e.glyphIndexMap[b]=p}function parseCmapTable(e,t){var a={};a.version=parse.getUShort(e,t),check.argument(0===a.version,\"cmap table version should be 0.\"),a.numTables=parse.getUShort(e,t+2);for(var i=-1,n=a.numTables-1;n>=0;n-=1){var r=parse.getUShort(e,t+4+8*n),s=parse.getUShort(e,t+4+8*n+2);if(3===r&&(0===s||1===s||10===s)||0===r&&(0===s||1===s||2===s||3===s||4===s)){i=parse.getULong(e,t+4+8*n+4);break}}if(-1===i)throw new Error(\"No valid cmap sub-tables found.\");var o=new parse.Parser(e,t+i);if(a.format=o.parseUShort(),12===a.format)parseCmapTableFormat12(a,o);else{if(4!==a.format)throw new Error(\"Only format 4 and 12 cmap tables are supported (found format \"+a.format+\").\");parseCmapTableFormat4(a,o,e,t,i)}return a}function addSegment(e,t,a){e.segments.push({end:t,start:t,delta:-(t-a),offset:0,glyphIndex:a})}function addTerminatorSegment(e){e.segments.push({end:65535,start:65535,delta:1,offset:0})}function makeCmapTable(e){var t,a=!0;for(t=e.length-1;t>0;t-=1)if(e.get(t).unicode>65535){console.log(\"Adding CMAP format 12 (needed!)\"),a=!1;break}var i=[{name:\"version\",type:\"USHORT\",value:0},{name:\"numTables\",type:\"USHORT\",value:a?1:2},{name:\"platformID\",type:\"USHORT\",value:3},{name:\"encodingID\",type:\"USHORT\",value:1},{name:\"offset\",type:\"ULONG\",value:a?12:20}];a||(i=i.concat([{name:\"cmap12PlatformID\",type:\"USHORT\",value:3},{name:\"cmap12EncodingID\",type:\"USHORT\",value:10},{name:\"cmap12Offset\",type:\"ULONG\",value:0}])),i=i.concat([{name:\"format\",type:\"USHORT\",value:4},{name:\"cmap4Length\",type:\"USHORT\",value:0},{name:\"language\",type:\"USHORT\",value:0},{name:\"segCountX2\",type:\"USHORT\",value:0},{name:\"searchRange\",type:\"USHORT\",value:0},{name:\"entrySelector\",type:\"USHORT\",value:0},{name:\"rangeShift\",type:\"USHORT\",value:0}]);var n=new table.Table(\"cmap\",i);for(n.segments=[],t=0;t<e.length;t+=1){for(var r=e.get(t),s=0;s<r.unicodes.length;s+=1)addSegment(n,r.unicodes[s],t);n.segments=n.segments.sort((function(e,t){return e.start-t.start}))}addTerminatorSegment(n);var o=n.segments.length,l=0,c=[],d=[],h=[],p=[],u=[],m=[];for(t=0;t<o;t+=1){var g=n.segments[t];g.end<=65535&&g.start<=65535?(c=c.concat({name:\"end_\"+t,type:\"USHORT\",value:g.end}),d=d.concat({name:\"start_\"+t,type:\"USHORT\",value:g.start}),h=h.concat({name:\"idDelta_\"+t,type:\"SHORT\",value:g.delta}),p=p.concat({name:\"idRangeOffset_\"+t,type:\"USHORT\",value:g.offset}),void 0!==g.glyphId&&(u=u.concat({name:\"glyph_\"+t,type:\"USHORT\",value:g.glyphId}))):l+=1,a||void 0===g.glyphIndex||(m=(m=(m=m.concat({name:\"cmap12Start_\"+t,type:\"ULONG\",value:g.start})).concat({name:\"cmap12End_\"+t,type:\"ULONG\",value:g.end})).concat({name:\"cmap12Glyph_\"+t,type:\"ULONG\",value:g.glyphIndex}))}if(n.segCountX2=2*(o-l),n.searchRange=2*Math.pow(2,Math.floor(Math.log(o-l)/Math.log(2))),n.entrySelector=Math.log(n.searchRange/2)/Math.log(2),n.rangeShift=n.segCountX2-n.searchRange,n.fields=n.fields.concat(c),n.fields.push({name:\"reservedPad\",type:\"USHORT\",value:0}),n.fields=n.fields.concat(d),n.fields=n.fields.concat(h),n.fields=n.fields.concat(p),n.fields=n.fields.concat(u),n.cmap4Length=14+2*c.length+2+2*d.length+2*h.length+2*p.length+2*u.length,!a){var f=16+4*m.length;n.cmap12Offset=20+n.cmap4Length,n.fields=n.fields.concat([{name:\"cmap12Format\",type:\"USHORT\",value:12},{name:\"cmap12Reserved\",type:\"USHORT\",value:0},{name:\"cmap12Length\",type:\"ULONG\",value:f},{name:\"cmap12Language\",type:\"ULONG\",value:0},{name:\"cmap12nGroups\",type:\"ULONG\",value:m.length/3}]),n.fields=n.fields.concat(m)}return n}var cmap={parse:parseCmapTable,make:makeCmapTable},cffStandardStrings=[\".notdef\",\"space\",\"exclam\",\"quotedbl\",\"numbersign\",\"dollar\",\"percent\",\"ampersand\",\"quoteright\",\"parenleft\",\"parenright\",\"asterisk\",\"plus\",\"comma\",\"hyphen\",\"period\",\"slash\",\"zero\",\"one\",\"two\",\"three\",\"four\",\"five\",\"six\",\"seven\",\"eight\",\"nine\",\"colon\",\"semicolon\",\"less\",\"equal\",\"greater\",\"question\",\"at\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\"P\",\"Q\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"bracketleft\",\"backslash\",\"bracketright\",\"asciicircum\",\"underscore\",\"quoteleft\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\",\"braceleft\",\"bar\",\"braceright\",\"asciitilde\",\"exclamdown\",\"cent\",\"sterling\",\"fraction\",\"yen\",\"florin\",\"section\",\"currency\",\"quotesingle\",\"quotedblleft\",\"guillemotleft\",\"guilsinglleft\",\"guilsinglright\",\"fi\",\"fl\",\"endash\",\"dagger\",\"daggerdbl\",\"periodcentered\",\"paragraph\",\"bullet\",\"quotesinglbase\",\"quotedblbase\",\"quotedblright\",\"guillemotright\",\"ellipsis\",\"perthousand\",\"questiondown\",\"grave\",\"acute\",\"circumflex\",\"tilde\",\"macron\",\"breve\",\"dotaccent\",\"dieresis\",\"ring\",\"cedilla\",\"hungarumlaut\",\"ogonek\",\"caron\",\"emdash\",\"AE\",\"ordfeminine\",\"Lslash\",\"Oslash\",\"OE\",\"ordmasculine\",\"ae\",\"dotlessi\",\"lslash\",\"oslash\",\"oe\",\"germandbls\",\"onesuperior\",\"logicalnot\",\"mu\",\"trademark\",\"Eth\",\"onehalf\",\"plusminus\",\"Thorn\",\"onequarter\",\"divide\",\"brokenbar\",\"degree\",\"thorn\",\"threequarters\",\"twosuperior\",\"registered\",\"minus\",\"eth\",\"multiply\",\"threesuperior\",\"copyright\",\"Aacute\",\"Acircumflex\",\"Adieresis\",\"Agrave\",\"Aring\",\"Atilde\",\"Ccedilla\",\"Eacute\",\"Ecircumflex\",\"Edieresis\",\"Egrave\",\"Iacute\",\"Icircumflex\",\"Idieresis\",\"Igrave\",\"Ntilde\",\"Oacute\",\"Ocircumflex\",\"Odieresis\",\"Ograve\",\"Otilde\",\"Scaron\",\"Uacute\",\"Ucircumflex\",\"Udieresis\",\"Ugrave\",\"Yacute\",\"Ydieresis\",\"Zcaron\",\"aacute\",\"acircumflex\",\"adieresis\",\"agrave\",\"aring\",\"atilde\",\"ccedilla\",\"eacute\",\"ecircumflex\",\"edieresis\",\"egrave\",\"iacute\",\"icircumflex\",\"idieresis\",\"igrave\",\"ntilde\",\"oacute\",\"ocircumflex\",\"odieresis\",\"ograve\",\"otilde\",\"scaron\",\"uacute\",\"ucircumflex\",\"udieresis\",\"ugrave\",\"yacute\",\"ydieresis\",\"zcaron\",\"exclamsmall\",\"Hungarumlautsmall\",\"dollaroldstyle\",\"dollarsuperior\",\"ampersandsmall\",\"Acutesmall\",\"parenleftsuperior\",\"parenrightsuperior\",\"266 ff\",\"onedotenleader\",\"zerooldstyle\",\"oneoldstyle\",\"twooldstyle\",\"threeoldstyle\",\"fouroldstyle\",\"fiveoldstyle\",\"sixoldstyle\",\"sevenoldstyle\",\"eightoldstyle\",\"nineoldstyle\",\"commasuperior\",\"threequartersemdash\",\"periodsuperior\",\"questionsmall\",\"asuperior\",\"bsuperior\",\"centsuperior\",\"dsuperior\",\"esuperior\",\"isuperior\",\"lsuperior\",\"msuperior\",\"nsuperior\",\"osuperior\",\"rsuperior\",\"ssuperior\",\"tsuperior\",\"ff\",\"ffi\",\"ffl\",\"parenleftinferior\",\"parenrightinferior\",\"Circumflexsmall\",\"hyphensuperior\",\"Gravesmall\",\"Asmall\",\"Bsmall\",\"Csmall\",\"Dsmall\",\"Esmall\",\"Fsmall\",\"Gsmall\",\"Hsmall\",\"Ismall\",\"Jsmall\",\"Ksmall\",\"Lsmall\",\"Msmall\",\"Nsmall\",\"Osmall\",\"Psmall\",\"Qsmall\",\"Rsmall\",\"Ssmall\",\"Tsmall\",\"Usmall\",\"Vsmall\",\"Wsmall\",\"Xsmall\",\"Ysmall\",\"Zsmall\",\"colonmonetary\",\"onefitted\",\"rupiah\",\"Tildesmall\",\"exclamdownsmall\",\"centoldstyle\",\"Lslashsmall\",\"Scaronsmall\",\"Zcaronsmall\",\"Dieresissmall\",\"Brevesmall\",\"Caronsmall\",\"Dotaccentsmall\",\"Macronsmall\",\"figuredash\",\"hypheninferior\",\"Ogoneksmall\",\"Ringsmall\",\"Cedillasmall\",\"questiondownsmall\",\"oneeighth\",\"threeeighths\",\"fiveeighths\",\"seveneighths\",\"onethird\",\"twothirds\",\"zerosuperior\",\"foursuperior\",\"fivesuperior\",\"sixsuperior\",\"sevensuperior\",\"eightsuperior\",\"ninesuperior\",\"zeroinferior\",\"oneinferior\",\"twoinferior\",\"threeinferior\",\"fourinferior\",\"fiveinferior\",\"sixinferior\",\"seveninferior\",\"eightinferior\",\"nineinferior\",\"centinferior\",\"dollarinferior\",\"periodinferior\",\"commainferior\",\"Agravesmall\",\"Aacutesmall\",\"Acircumflexsmall\",\"Atildesmall\",\"Adieresissmall\",\"Aringsmall\",\"AEsmall\",\"Ccedillasmall\",\"Egravesmall\",\"Eacutesmall\",\"Ecircumflexsmall\",\"Edieresissmall\",\"Igravesmall\",\"Iacutesmall\",\"Icircumflexsmall\",\"Idieresissmall\",\"Ethsmall\",\"Ntildesmall\",\"Ogravesmall\",\"Oacutesmall\",\"Ocircumflexsmall\",\"Otildesmall\",\"Odieresissmall\",\"OEsmall\",\"Oslashsmall\",\"Ugravesmall\",\"Uacutesmall\",\"Ucircumflexsmall\",\"Udieresissmall\",\"Yacutesmall\",\"Thornsmall\",\"Ydieresissmall\",\"001.000\",\"001.001\",\"001.002\",\"001.003\",\"Black\",\"Bold\",\"Book\",\"Light\",\"Medium\",\"Regular\",\"Roman\",\"Semibold\"],cffStandardEncoding=[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"space\",\"exclam\",\"quotedbl\",\"numbersign\",\"dollar\",\"percent\",\"ampersand\",\"quoteright\",\"parenleft\",\"parenright\",\"asterisk\",\"plus\",\"comma\",\"hyphen\",\"period\",\"slash\",\"zero\",\"one\",\"two\",\"three\",\"four\",\"five\",\"six\",\"seven\",\"eight\",\"nine\",\"colon\",\"semicolon\",\"less\",\"equal\",\"greater\",\"question\",\"at\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\"P\",\"Q\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"bracketleft\",\"backslash\",\"bracketright\",\"asciicircum\",\"underscore\",\"quoteleft\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\",\"braceleft\",\"bar\",\"braceright\",\"asciitilde\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"exclamdown\",\"cent\",\"sterling\",\"fraction\",\"yen\",\"florin\",\"section\",\"currency\",\"quotesingle\",\"quotedblleft\",\"guillemotleft\",\"guilsinglleft\",\"guilsinglright\",\"fi\",\"fl\",\"\",\"endash\",\"dagger\",\"daggerdbl\",\"periodcentered\",\"\",\"paragraph\",\"bullet\",\"quotesinglbase\",\"quotedblbase\",\"quotedblright\",\"guillemotright\",\"ellipsis\",\"perthousand\",\"\",\"questiondown\",\"\",\"grave\",\"acute\",\"circumflex\",\"tilde\",\"macron\",\"breve\",\"dotaccent\",\"dieresis\",\"\",\"ring\",\"cedilla\",\"\",\"hungarumlaut\",\"ogonek\",\"caron\",\"emdash\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"AE\",\"\",\"ordfeminine\",\"\",\"\",\"\",\"\",\"Lslash\",\"Oslash\",\"OE\",\"ordmasculine\",\"\",\"\",\"\",\"\",\"\",\"ae\",\"\",\"\",\"\",\"dotlessi\",\"\",\"\",\"lslash\",\"oslash\",\"oe\",\"germandbls\"],cffExpertEncoding=[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"space\",\"exclamsmall\",\"Hungarumlautsmall\",\"\",\"dollaroldstyle\",\"dollarsuperior\",\"ampersandsmall\",\"Acutesmall\",\"parenleftsuperior\",\"parenrightsuperior\",\"twodotenleader\",\"onedotenleader\",\"comma\",\"hyphen\",\"period\",\"fraction\",\"zerooldstyle\",\"oneoldstyle\",\"twooldstyle\",\"threeoldstyle\",\"fouroldstyle\",\"fiveoldstyle\",\"sixoldstyle\",\"sevenoldstyle\",\"eightoldstyle\",\"nineoldstyle\",\"colon\",\"semicolon\",\"commasuperior\",\"threequartersemdash\",\"periodsuperior\",\"questionsmall\",\"\",\"asuperior\",\"bsuperior\",\"centsuperior\",\"dsuperior\",\"esuperior\",\"\",\"\",\"isuperior\",\"\",\"\",\"lsuperior\",\"msuperior\",\"nsuperior\",\"osuperior\",\"\",\"\",\"rsuperior\",\"ssuperior\",\"tsuperior\",\"\",\"ff\",\"fi\",\"fl\",\"ffi\",\"ffl\",\"parenleftinferior\",\"\",\"parenrightinferior\",\"Circumflexsmall\",\"hyphensuperior\",\"Gravesmall\",\"Asmall\",\"Bsmall\",\"Csmall\",\"Dsmall\",\"Esmall\",\"Fsmall\",\"Gsmall\",\"Hsmall\",\"Ismall\",\"Jsmall\",\"Ksmall\",\"Lsmall\",\"Msmall\",\"Nsmall\",\"Osmall\",\"Psmall\",\"Qsmall\",\"Rsmall\",\"Ssmall\",\"Tsmall\",\"Usmall\",\"Vsmall\",\"Wsmall\",\"Xsmall\",\"Ysmall\",\"Zsmall\",\"colonmonetary\",\"onefitted\",\"rupiah\",\"Tildesmall\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"exclamdownsmall\",\"centoldstyle\",\"Lslashsmall\",\"\",\"\",\"Scaronsmall\",\"Zcaronsmall\",\"Dieresissmall\",\"Brevesmall\",\"Caronsmall\",\"\",\"Dotaccentsmall\",\"\",\"\",\"Macronsmall\",\"\",\"\",\"figuredash\",\"hypheninferior\",\"\",\"\",\"Ogoneksmall\",\"Ringsmall\",\"Cedillasmall\",\"\",\"\",\"\",\"onequarter\",\"onehalf\",\"threequarters\",\"questiondownsmall\",\"oneeighth\",\"threeeighths\",\"fiveeighths\",\"seveneighths\",\"onethird\",\"twothirds\",\"\",\"\",\"zerosuperior\",\"onesuperior\",\"twosuperior\",\"threesuperior\",\"foursuperior\",\"fivesuperior\",\"sixsuperior\",\"sevensuperior\",\"eightsuperior\",\"ninesuperior\",\"zeroinferior\",\"oneinferior\",\"twoinferior\",\"threeinferior\",\"fourinferior\",\"fiveinferior\",\"sixinferior\",\"seveninferior\",\"eightinferior\",\"nineinferior\",\"centinferior\",\"dollarinferior\",\"periodinferior\",\"commainferior\",\"Agravesmall\",\"Aacutesmall\",\"Acircumflexsmall\",\"Atildesmall\",\"Adieresissmall\",\"Aringsmall\",\"AEsmall\",\"Ccedillasmall\",\"Egravesmall\",\"Eacutesmall\",\"Ecircumflexsmall\",\"Edieresissmall\",\"Igravesmall\",\"Iacutesmall\",\"Icircumflexsmall\",\"Idieresissmall\",\"Ethsmall\",\"Ntildesmall\",\"Ogravesmall\",\"Oacutesmall\",\"Ocircumflexsmall\",\"Otildesmall\",\"Odieresissmall\",\"OEsmall\",\"Oslashsmall\",\"Ugravesmall\",\"Uacutesmall\",\"Ucircumflexsmall\",\"Udieresissmall\",\"Yacutesmall\",\"Thornsmall\",\"Ydieresissmall\"],standardNames=[\".notdef\",\".null\",\"nonmarkingreturn\",\"space\",\"exclam\",\"quotedbl\",\"numbersign\",\"dollar\",\"percent\",\"ampersand\",\"quotesingle\",\"parenleft\",\"parenright\",\"asterisk\",\"plus\",\"comma\",\"hyphen\",\"period\",\"slash\",\"zero\",\"one\",\"two\",\"three\",\"four\",\"five\",\"six\",\"seven\",\"eight\",\"nine\",\"colon\",\"semicolon\",\"less\",\"equal\",\"greater\",\"question\",\"at\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\"P\",\"Q\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"bracketleft\",\"backslash\",\"bracketright\",\"asciicircum\",\"underscore\",\"grave\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\",\"braceleft\",\"bar\",\"braceright\",\"asciitilde\",\"Adieresis\",\"Aring\",\"Ccedilla\",\"Eacute\",\"Ntilde\",\"Odieresis\",\"Udieresis\",\"aacute\",\"agrave\",\"acircumflex\",\"adieresis\",\"atilde\",\"aring\",\"ccedilla\",\"eacute\",\"egrave\",\"ecircumflex\",\"edieresis\",\"iacute\",\"igrave\",\"icircumflex\",\"idieresis\",\"ntilde\",\"oacute\",\"ograve\",\"ocircumflex\",\"odieresis\",\"otilde\",\"uacute\",\"ugrave\",\"ucircumflex\",\"udieresis\",\"dagger\",\"degree\",\"cent\",\"sterling\",\"section\",\"bullet\",\"paragraph\",\"germandbls\",\"registered\",\"copyright\",\"trademark\",\"acute\",\"dieresis\",\"notequal\",\"AE\",\"Oslash\",\"infinity\",\"plusminus\",\"lessequal\",\"greaterequal\",\"yen\",\"mu\",\"partialdiff\",\"summation\",\"product\",\"pi\",\"integral\",\"ordfeminine\",\"ordmasculine\",\"Omega\",\"ae\",\"oslash\",\"questiondown\",\"exclamdown\",\"logicalnot\",\"radical\",\"florin\",\"approxequal\",\"Delta\",\"guillemotleft\",\"guillemotright\",\"ellipsis\",\"nonbreakingspace\",\"Agrave\",\"Atilde\",\"Otilde\",\"OE\",\"oe\",\"endash\",\"emdash\",\"quotedblleft\",\"quotedblright\",\"quoteleft\",\"quoteright\",\"divide\",\"lozenge\",\"ydieresis\",\"Ydieresis\",\"fraction\",\"currency\",\"guilsinglleft\",\"guilsinglright\",\"fi\",\"fl\",\"daggerdbl\",\"periodcentered\",\"quotesinglbase\",\"quotedblbase\",\"perthousand\",\"Acircumflex\",\"Ecircumflex\",\"Aacute\",\"Edieresis\",\"Egrave\",\"Iacute\",\"Icircumflex\",\"Idieresis\",\"Igrave\",\"Oacute\",\"Ocircumflex\",\"apple\",\"Ograve\",\"Uacute\",\"Ucircumflex\",\"Ugrave\",\"dotlessi\",\"circumflex\",\"tilde\",\"macron\",\"breve\",\"dotaccent\",\"ring\",\"cedilla\",\"hungarumlaut\",\"ogonek\",\"caron\",\"Lslash\",\"lslash\",\"Scaron\",\"scaron\",\"Zcaron\",\"zcaron\",\"brokenbar\",\"Eth\",\"eth\",\"Yacute\",\"yacute\",\"Thorn\",\"thorn\",\"minus\",\"multiply\",\"onesuperior\",\"twosuperior\",\"threesuperior\",\"onehalf\",\"onequarter\",\"threequarters\",\"franc\",\"Gbreve\",\"gbreve\",\"Idotaccent\",\"Scedilla\",\"scedilla\",\"Cacute\",\"cacute\",\"Ccaron\",\"ccaron\",\"dcroat\"];function DefaultEncoding(e){this.font=e}function CmapEncoding(e){this.cmap=e}function CffEncoding(e,t){this.encoding=e,this.charset=t}function GlyphNames(e){switch(e.version){case 1:this.names=standardNames.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(var t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<standardNames.length?this.names[t]=standardNames[e.glyphNameIndex[t]]:this.names[t]=e.names[e.glyphNameIndex[t]-standardNames.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(var a=0;a<e.numberOfGlyphs;a++)this.names[a]=standardNames[a+e.glyphNameIndex[a]];break;default:this.names=[]}}function addGlyphNamesAll(e){for(var t,a=e.tables.cmap.glyphIndexMap,i=Object.keys(a),n=0;n<i.length;n+=1){var r=i[n],s=a[r];(t=e.glyphs.get(s)).addUnicode(parseInt(r))}for(var o=0;o<e.glyphs.length;o+=1)t=e.glyphs.get(o),e.cffEncoding?e.isCIDFont?t.name=\"gid\"+o:t.name=e.cffEncoding.charset[o]:e.glyphNames.names&&(t.name=e.glyphNames.glyphIndexToName(o))}function addGlyphNamesToUnicodeMap(e){e._IndexToUnicodeMap={};for(var t=e.tables.cmap.glyphIndexMap,a=Object.keys(t),i=0;i<a.length;i+=1){var n=a[i],r=t[n];void 0===e._IndexToUnicodeMap[r]?e._IndexToUnicodeMap[r]={unicodes:[parseInt(n)]}:e._IndexToUnicodeMap[r].unicodes.push(parseInt(n))}}function addGlyphNames(e,t){t.lowMemory?addGlyphNamesToUnicodeMap(e):addGlyphNamesAll(e)}function line(e,t,a,i,n){e.beginPath(),e.moveTo(t,a),e.lineTo(i,n),e.stroke()}DefaultEncoding.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),a=this.font.glyphs;if(a)for(var i=0;i<a.length;i+=1)for(var n=a.get(i),r=0;r<n.unicodes.length;r+=1)if(n.unicodes[r]===t)return i;return null},CmapEncoding.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.codePointAt(0)]||0},CffEncoding.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),a=this.encoding[t];return this.charset.indexOf(a)},GlyphNames.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},GlyphNames.prototype.glyphIndexToName=function(e){return this.names[e]};var draw={line:line};function getPathDefinition(e,t){var a=t||new Path;return{configurable:!0,get:function(){return\"function\"==typeof a&&(a=a()),a},set:function(e){a=e}}}function Glyph(e){this.bindConstructorValues(e)}function defineDependentProperty(e,t,a){Object.defineProperty(e,t,{get:function(){return e.path,e[a]},set:function(t){e[a]=t},enumerable:!0,configurable:!0})}function GlyphSet(e,t){if(this.font=e,this.glyphs={},Array.isArray(t))for(var a=0;a<t.length;a++){var i=t[a];i.path.unitsPerEm=e.unitsPerEm,this.glyphs[a]=i}this.length=t&&t.length||0}function glyphLoader(e,t){return new Glyph({index:t,font:e})}function ttfGlyphLoader(e,t,a,i,n,r){return function(){var s=new Glyph({index:t,font:e});return s.path=function(){a(s,i,n);var t=r(e.glyphs,s);return t.unitsPerEm=e.unitsPerEm,t},defineDependentProperty(s,\"xMin\",\"_xMin\"),defineDependentProperty(s,\"xMax\",\"_xMax\"),defineDependentProperty(s,\"yMin\",\"_yMin\"),defineDependentProperty(s,\"yMax\",\"_yMax\"),s}}function cffGlyphLoader(e,t,a,i){return function(){var n=new Glyph({index:t,font:e});return n.path=function(){var t=a(e,n,i);return t.unitsPerEm=e.unitsPerEm,t},n}}Glyph.prototype.bindConstructorValues=function(e){this.index=e.index||0,this.name=e.name||null,this.unicode=e.unicode||void 0,this.unicodes=e.unicodes||void 0!==e.unicode?[e.unicode]:[],\"xMin\"in e&&(this.xMin=e.xMin),\"yMin\"in e&&(this.yMin=e.yMin),\"xMax\"in e&&(this.xMax=e.xMax),\"yMax\"in e&&(this.yMax=e.yMax),\"advanceWidth\"in e&&(this.advanceWidth=e.advanceWidth),Object.defineProperty(this,\"path\",getPathDefinition(this,e.path))},Glyph.prototype.addUnicode=function(e){0===this.unicodes.length&&(this.unicode=e),this.unicodes.push(e)},Glyph.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},Glyph.prototype.getPath=function(e,t,a,i,n){var r,s;e=void 0!==e?e:0,t=void 0!==t?t:0,a=void 0!==a?a:72,i||(i={});var o=i.xScale,l=i.yScale;if(i.hinting&&n&&n.hinting&&(s=this.path&&n.hinting.exec(this,a)),s)r=n.hinting.getCommands(s),e=Math.round(e),t=Math.round(t),o=l=1;else{r=this.path.commands;var c=1/(this.path.unitsPerEm||1e3)*a;void 0===o&&(o=c),void 0===l&&(l=c)}for(var d=new Path,h=0;h<r.length;h+=1){var p=r[h];\"M\"===p.type?d.moveTo(e+p.x*o,t+-p.y*l):\"L\"===p.type?d.lineTo(e+p.x*o,t+-p.y*l):\"Q\"===p.type?d.quadraticCurveTo(e+p.x1*o,t+-p.y1*l,e+p.x*o,t+-p.y*l):\"C\"===p.type?d.curveTo(e+p.x1*o,t+-p.y1*l,e+p.x2*o,t+-p.y2*l,e+p.x*o,t+-p.y*l):\"Z\"===p.type&&d.closePath()}return d},Glyph.prototype.getContours=function(){if(void 0===this.points)return[];for(var e=[],t=[],a=0;a<this.points.length;a+=1){var i=this.points[a];t.push(i),i.lastPointOfContour&&(e.push(t),t=[])}return check.argument(0===t.length,\"There are still points left in the current contour.\"),e},Glyph.prototype.getMetrics=function(){for(var e=this.path.commands,t=[],a=[],i=0;i<e.length;i+=1){var n=e[i];\"Z\"!==n.type&&(t.push(n.x),a.push(n.y)),\"Q\"!==n.type&&\"C\"!==n.type||(t.push(n.x1),a.push(n.y1)),\"C\"===n.type&&(t.push(n.x2),a.push(n.y2))}var r={xMin:Math.min.apply(null,t),yMin:Math.min.apply(null,a),xMax:Math.max.apply(null,t),yMax:Math.max.apply(null,a),leftSideBearing:this.leftSideBearing};return isFinite(r.xMin)||(r.xMin=0),isFinite(r.xMax)||(r.xMax=this.advanceWidth),isFinite(r.yMin)||(r.yMin=0),isFinite(r.yMax)||(r.yMax=0),r.rightSideBearing=this.advanceWidth-r.leftSideBearing-(r.xMax-r.xMin),r},Glyph.prototype.draw=function(e,t,a,i,n){this.getPath(t,a,i,n).draw(e)},Glyph.prototype.drawPoints=function(e,t,a,i){function n(t,a,i,n){e.beginPath();for(var r=0;r<t.length;r+=1)e.moveTo(a+t[r].x*n,i+t[r].y*n),e.arc(a+t[r].x*n,i+t[r].y*n,2,0,2*Math.PI,!1);e.closePath(),e.fill()}t=void 0!==t?t:0,a=void 0!==a?a:0,i=void 0!==i?i:24;for(var r=1/this.path.unitsPerEm*i,s=[],o=[],l=this.path,c=0;c<l.commands.length;c+=1){var d=l.commands[c];void 0!==d.x&&s.push({x:d.x,y:-d.y}),void 0!==d.x1&&o.push({x:d.x1,y:-d.y1}),void 0!==d.x2&&o.push({x:d.x2,y:-d.y2})}e.fillStyle=\"blue\",n(s,t,a,r),e.fillStyle=\"red\",n(o,t,a,r)},Glyph.prototype.drawMetrics=function(e,t,a,i){var n;t=void 0!==t?t:0,a=void 0!==a?a:0,i=void 0!==i?i:24,n=1/this.path.unitsPerEm*i,e.lineWidth=1,e.strokeStyle=\"black\",draw.line(e,t,-1e4,t,1e4),draw.line(e,-1e4,a,1e4,a);var r=this.xMin||0,s=this.yMin||0,o=this.xMax||0,l=this.yMax||0,c=this.advanceWidth||0;e.strokeStyle=\"blue\",draw.line(e,t+r*n,-1e4,t+r*n,1e4),draw.line(e,t+o*n,-1e4,t+o*n,1e4),draw.line(e,-1e4,a+-s*n,1e4,a+-s*n),draw.line(e,-1e4,a+-l*n,1e4,a+-l*n),e.strokeStyle=\"green\",draw.line(e,t+c*n,-1e4,t+c*n,1e4)},GlyphSet.prototype.get=function(e){if(void 0===this.glyphs[e]){this.font._push(e),\"function\"==typeof this.glyphs[e]&&(this.glyphs[e]=this.glyphs[e]());var t=this.glyphs[e],a=this.font._IndexToUnicodeMap[e];if(a)for(var i=0;i<a.unicodes.length;i++)t.addUnicode(a.unicodes[i]);this.font.cffEncoding?this.font.isCIDFont?t.name=\"gid\"+e:t.name=this.font.cffEncoding.charset[e]:this.font.glyphNames.names&&(t.name=this.font.glyphNames.glyphIndexToName(e)),this.glyphs[e].advanceWidth=this.font._hmtxTableData[e].advanceWidth,this.glyphs[e].leftSideBearing=this.font._hmtxTableData[e].leftSideBearing}else\"function\"==typeof this.glyphs[e]&&(this.glyphs[e]=this.glyphs[e]());return this.glyphs[e]},GlyphSet.prototype.push=function(e,t){this.glyphs[e]=t,this.length++};var glyphset={GlyphSet:GlyphSet,glyphLoader:glyphLoader,ttfGlyphLoader:ttfGlyphLoader,cffGlyphLoader:cffGlyphLoader};function equals(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var a=0;a<e.length;a+=1)if(!equals(e[a],t[a]))return!1;return!0}return!1}function calcCFFSubroutineBias(e){return e.length<1240?107:e.length<33900?1131:32768}function parseCFFIndex(e,t,a){var i,n,r=[],s=[],o=parse.getCard16(e,t);if(0!==o){var l=parse.getByte(e,t+2);i=t+(o+1)*l+2;for(var c=t+3,d=0;d<o+1;d+=1)r.push(parse.getOffset(e,c,l)),c+=l;n=i+r[o]}else n=t+2;for(var h=0;h<r.length-1;h+=1){var p=parse.getBytes(e,i+r[h],i+r[h+1]);a&&(p=a(p)),s.push(p)}return{objects:s,startOffset:t,endOffset:n}}function parseCFFIndexLowMemory(e,t){var a,i,n=[],r=parse.getCard16(e,t);if(0!==r){var s=parse.getByte(e,t+2);a=t+(r+1)*s+2;for(var o=t+3,l=0;l<r+1;l+=1)n.push(parse.getOffset(e,o,s)),o+=s;i=a+n[r]}else i=t+2;return{offsets:n,startOffset:t,endOffset:i}}function getCffIndexObject(e,t,a,i,n){var r=parse.getCard16(a,i),s=0;0!==r&&(s=i+(r+1)*parse.getByte(a,i+2)+2);var o=parse.getBytes(a,s+t[e],s+t[e+1]);return n&&(o=n(o)),o}function parseFloatOperand(e){for(var t=\"\",a=[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\".\",\"E\",\"E-\",null,\"-\"];;){var i=e.parseByte(),n=i>>4,r=15&i;if(15===n)break;if(t+=a[n],15===r)break;t+=a[r]}return parseFloat(t)}function parseOperand(e,t){if(28===t)return e.parseByte()<<8|e.parseByte();if(29===t)return e.parseByte()<<24|e.parseByte()<<16|e.parseByte()<<8|e.parseByte();if(30===t)return parseFloatOperand(e);if(t>=32&&t<=246)return t-139;if(t>=247&&t<=250)return 256*(t-247)+e.parseByte()+108;if(t>=251&&t<=254)return 256*-(t-251)-e.parseByte()-108;throw new Error(\"Invalid b0 \"+t)}function entriesToObject(e){for(var t={},a=0;a<e.length;a+=1){var i,n=e[a][0],r=e[a][1];if(i=1===r.length?r[0]:r,t.hasOwnProperty(n)&&!isNaN(t[n]))throw new Error(\"Object \"+t+\" already has key \"+n);t[n]=i}return t}function parseCFFDict(e,t,a){t=void 0!==t?t:0;var i=new parse.Parser(e,t),n=[],r=[];for(a=void 0!==a?a:e.length;i.relativeOffset<a;){var s=i.parseByte();s<=21?(12===s&&(s=1200+i.parseByte()),n.push([s,r]),r=[]):r.push(parseOperand(i,s))}return entriesToObject(n)}function getCFFString(e,t){return t<=390?cffStandardStrings[t]:e[t-391]}function interpretDict(e,t,a){for(var i,n={},r=0;r<t.length;r+=1){var s=t[r];if(Array.isArray(s.type)){var o=[];o.length=s.type.length;for(var l=0;l<s.type.length;l++)void 0===(i=void 0!==e[s.op]?e[s.op][l]:void 0)&&(i=void 0!==s.value&&void 0!==s.value[l]?s.value[l]:null),\"SID\"===s.type[l]&&(i=getCFFString(a,i)),o[l]=i;n[s.name]=o}else void 0===(i=e[s.op])&&(i=void 0!==s.value?s.value:null),\"SID\"===s.type&&(i=getCFFString(a,i)),n[s.name]=i}return n}function parseCFFHeader(e,t){var a={};return a.formatMajor=parse.getCard8(e,t),a.formatMinor=parse.getCard8(e,t+1),a.size=parse.getCard8(e,t+2),a.offsetSize=parse.getCard8(e,t+3),a.startOffset=t,a.endOffset=t+4,a}var TOP_DICT_META=[{name:\"version\",op:0,type:\"SID\"},{name:\"notice\",op:1,type:\"SID\"},{name:\"copyright\",op:1200,type:\"SID\"},{name:\"fullName\",op:2,type:\"SID\"},{name:\"familyName\",op:3,type:\"SID\"},{name:\"weight\",op:4,type:\"SID\"},{name:\"isFixedPitch\",op:1201,type:\"number\",value:0},{name:\"italicAngle\",op:1202,type:\"number\",value:0},{name:\"underlinePosition\",op:1203,type:\"number\",value:-100},{name:\"underlineThickness\",op:1204,type:\"number\",value:50},{name:\"paintType\",op:1205,type:\"number\",value:0},{name:\"charstringType\",op:1206,type:\"number\",value:2},{name:\"fontMatrix\",op:1207,type:[\"real\",\"real\",\"real\",\"real\",\"real\",\"real\"],value:[.001,0,0,.001,0,0]},{name:\"uniqueId\",op:13,type:\"number\"},{name:\"fontBBox\",op:5,type:[\"number\",\"number\",\"number\",\"number\"],value:[0,0,0,0]},{name:\"strokeWidth\",op:1208,type:\"number\",value:0},{name:\"xuid\",op:14,type:[],value:null},{name:\"charset\",op:15,type:\"offset\",value:0},{name:\"encoding\",op:16,type:\"offset\",value:0},{name:\"charStrings\",op:17,type:\"offset\",value:0},{name:\"private\",op:18,type:[\"number\",\"offset\"],value:[0,0]},{name:\"ros\",op:1230,type:[\"SID\",\"SID\",\"number\"]},{name:\"cidFontVersion\",op:1231,type:\"number\",value:0},{name:\"cidFontRevision\",op:1232,type:\"number\",value:0},{name:\"cidFontType\",op:1233,type:\"number\",value:0},{name:\"cidCount\",op:1234,type:\"number\",value:8720},{name:\"uidBase\",op:1235,type:\"number\"},{name:\"fdArray\",op:1236,type:\"offset\"},{name:\"fdSelect\",op:1237,type:\"offset\"},{name:\"fontName\",op:1238,type:\"SID\"}],PRIVATE_DICT_META=[{name:\"subrs\",op:19,type:\"offset\",value:0},{name:\"defaultWidthX\",op:20,type:\"number\",value:0},{name:\"nominalWidthX\",op:21,type:\"number\",value:0}];function parseCFFTopDict(e,t){return interpretDict(parseCFFDict(e,0,e.byteLength),TOP_DICT_META,t)}function parseCFFPrivateDict(e,t,a,i){return interpretDict(parseCFFDict(e,t,a),PRIVATE_DICT_META,i)}function gatherCFFTopDicts(e,t,a,i){for(var n=[],r=0;r<a.length;r+=1){var s=parseCFFTopDict(new DataView(new Uint8Array(a[r]).buffer),i);s._subrs=[],s._subrsBias=0,s._defaultWidthX=0,s._nominalWidthX=0;var o=s.private[0],l=s.private[1];if(0!==o&&0!==l){var c=parseCFFPrivateDict(e,l+t,o,i);if(s._defaultWidthX=c.defaultWidthX,s._nominalWidthX=c.nominalWidthX,0!==c.subrs){var d=parseCFFIndex(e,l+c.subrs+t);s._subrs=d.objects,s._subrsBias=calcCFFSubroutineBias(s._subrs)}s._privateDict=c}n.push(s)}return n}function parseCFFCharset(e,t,a,i){var n,r,s=new parse.Parser(e,t);a-=1;var o=[\".notdef\"],l=s.parseCard8();if(0===l)for(var c=0;c<a;c+=1)n=s.parseSID(),o.push(getCFFString(i,n));else if(1===l)for(;o.length<=a;){n=s.parseSID(),r=s.parseCard8();for(var d=0;d<=r;d+=1)o.push(getCFFString(i,n)),n+=1}else{if(2!==l)throw new Error(\"Unknown charset format \"+l);for(;o.length<=a;){n=s.parseSID(),r=s.parseCard16();for(var h=0;h<=r;h+=1)o.push(getCFFString(i,n)),n+=1}}return o}function parseCFFEncoding(e,t,a){var i,n={},r=new parse.Parser(e,t),s=r.parseCard8();if(0===s)for(var o=r.parseCard8(),l=0;l<o;l+=1)n[i=r.parseCard8()]=l;else{if(1!==s)throw new Error(\"Unknown encoding format \"+s);var c=r.parseCard8();i=1;for(var d=0;d<c;d+=1)for(var h=r.parseCard8(),p=r.parseCard8(),u=h;u<=h+p;u+=1)n[u]=i,i+=1}return new CffEncoding(n,a)}function parseCFFCharstring(e,t,a){var i,n,r,s,o,l,c,d,h=new Path,p=[],u=0,m=!1,g=!1,f=0,b=0;if(e.isCIDFont){var U=e.tables.cff.topDict._fdSelect[t.index],E=e.tables.cff.topDict._fdArray[U];o=E._subrs,l=E._subrsBias,c=E._defaultWidthX,d=E._nominalWidthX}else o=e.tables.cff.topDict._subrs,l=e.tables.cff.topDict._subrsBias,c=e.tables.cff.topDict._defaultWidthX,d=e.tables.cff.topDict._nominalWidthX;var w=c;function y(e,t){g&&h.closePath(),h.moveTo(e,t),g=!0}function v(){p.length%2!=0&&!m&&(w=p.shift()+d),u+=p.length>>1,p.length=0,m=!0}return function a(c){for(var U,E,T,S,_,C,I,x,A,k,O,R,M=0;M<c.length;){var L=c[M];switch(M+=1,L){case 1:case 3:case 18:case 23:v();break;case 4:p.length>1&&!m&&(w=p.shift()+d,m=!0),b+=p.pop(),y(f,b);break;case 5:for(;p.length>0;)f+=p.shift(),b+=p.shift(),h.lineTo(f,b);break;case 6:for(;p.length>0&&(f+=p.shift(),h.lineTo(f,b),0!==p.length);)b+=p.shift(),h.lineTo(f,b);break;case 7:for(;p.length>0&&(b+=p.shift(),h.lineTo(f,b),0!==p.length);)f+=p.shift(),h.lineTo(f,b);break;case 8:for(;p.length>0;)i=f+p.shift(),n=b+p.shift(),r=i+p.shift(),s=n+p.shift(),f=r+p.shift(),b=s+p.shift(),h.curveTo(i,n,r,s,f,b);break;case 10:_=p.pop()+l,(C=o[_])&&a(C);break;case 11:return;case 12:switch(L=c[M],M+=1,L){case 35:i=f+p.shift(),n=b+p.shift(),r=i+p.shift(),s=n+p.shift(),I=r+p.shift(),x=s+p.shift(),A=I+p.shift(),k=x+p.shift(),O=A+p.shift(),R=k+p.shift(),f=O+p.shift(),b=R+p.shift(),p.shift(),h.curveTo(i,n,r,s,I,x),h.curveTo(A,k,O,R,f,b);break;case 34:i=f+p.shift(),n=b,r=i+p.shift(),s=n+p.shift(),I=r+p.shift(),x=s,A=I+p.shift(),k=s,O=A+p.shift(),R=b,f=O+p.shift(),h.curveTo(i,n,r,s,I,x),h.curveTo(A,k,O,R,f,b);break;case 36:i=f+p.shift(),n=b+p.shift(),r=i+p.shift(),s=n+p.shift(),I=r+p.shift(),x=s,A=I+p.shift(),k=s,O=A+p.shift(),R=k+p.shift(),f=O+p.shift(),h.curveTo(i,n,r,s,I,x),h.curveTo(A,k,O,R,f,b);break;case 37:i=f+p.shift(),n=b+p.shift(),r=i+p.shift(),s=n+p.shift(),I=r+p.shift(),x=s+p.shift(),A=I+p.shift(),k=x+p.shift(),O=A+p.shift(),R=k+p.shift(),Math.abs(O-f)>Math.abs(R-b)?f=O+p.shift():b=R+p.shift(),h.curveTo(i,n,r,s,I,x),h.curveTo(A,k,O,R,f,b);break;default:console.log(\"Glyph \"+t.index+\": unknown operator 1200\"+L),p.length=0}break;case 14:p.length>0&&!m&&(w=p.shift()+d,m=!0),g&&(h.closePath(),g=!1);break;case 19:case 20:v(),M+=u+7>>3;break;case 21:p.length>2&&!m&&(w=p.shift()+d,m=!0),b+=p.pop(),y(f+=p.pop(),b);break;case 22:p.length>1&&!m&&(w=p.shift()+d,m=!0),y(f+=p.pop(),b);break;case 24:for(;p.length>2;)i=f+p.shift(),n=b+p.shift(),r=i+p.shift(),s=n+p.shift(),f=r+p.shift(),b=s+p.shift(),h.curveTo(i,n,r,s,f,b);f+=p.shift(),b+=p.shift(),h.lineTo(f,b);break;case 25:for(;p.length>6;)f+=p.shift(),b+=p.shift(),h.lineTo(f,b);i=f+p.shift(),n=b+p.shift(),r=i+p.shift(),s=n+p.shift(),f=r+p.shift(),b=s+p.shift(),h.curveTo(i,n,r,s,f,b);break;case 26:for(p.length%2&&(f+=p.shift());p.length>0;)i=f,n=b+p.shift(),r=i+p.shift(),s=n+p.shift(),f=r,b=s+p.shift(),h.curveTo(i,n,r,s,f,b);break;case 27:for(p.length%2&&(b+=p.shift());p.length>0;)i=f+p.shift(),n=b,r=i+p.shift(),s=n+p.shift(),f=r+p.shift(),b=s,h.curveTo(i,n,r,s,f,b);break;case 28:U=c[M],E=c[M+1],p.push((U<<24|E<<16)>>16),M+=2;break;case 29:_=p.pop()+e.gsubrsBias,(C=e.gsubrs[_])&&a(C);break;case 30:for(;p.length>0&&(i=f,n=b+p.shift(),r=i+p.shift(),s=n+p.shift(),f=r+p.shift(),b=s+(1===p.length?p.shift():0),h.curveTo(i,n,r,s,f,b),0!==p.length);)i=f+p.shift(),n=b,r=i+p.shift(),s=n+p.shift(),b=s+p.shift(),f=r+(1===p.length?p.shift():0),h.curveTo(i,n,r,s,f,b);break;case 31:for(;p.length>0&&(i=f+p.shift(),n=b,r=i+p.shift(),s=n+p.shift(),b=s+p.shift(),f=r+(1===p.length?p.shift():0),h.curveTo(i,n,r,s,f,b),0!==p.length);)i=f,n=b+p.shift(),r=i+p.shift(),s=n+p.shift(),f=r+p.shift(),b=s+(1===p.length?p.shift():0),h.curveTo(i,n,r,s,f,b);break;default:L<32?console.log(\"Glyph \"+t.index+\": unknown operator \"+L):L<247?p.push(L-139):L<251?(U=c[M],M+=1,p.push(256*(L-247)+U+108)):L<255?(U=c[M],M+=1,p.push(256*-(L-251)-U-108)):(U=c[M],E=c[M+1],T=c[M+2],S=c[M+3],M+=4,p.push((U<<24|E<<16|T<<8|S)/65536))}}}(a),t.advanceWidth=w,h}function parseCFFFDSelect(e,t,a,i){var n,r=[],s=new parse.Parser(e,t),o=s.parseCard8();if(0===o)for(var l=0;l<a;l++){if((n=s.parseCard8())>=i)throw new Error(\"CFF table CID Font FDSelect has bad FD index value \"+n+\" (FD count \"+i+\")\");r.push(n)}else{if(3!==o)throw new Error(\"CFF Table CID Font FDSelect table has unsupported format \"+o);var c,d=s.parseCard16(),h=s.parseCard16();if(0!==h)throw new Error(\"CFF Table CID Font FDSelect format 3 range has bad initial GID \"+h);for(var p=0;p<d;p++){if(n=s.parseCard8(),c=s.parseCard16(),n>=i)throw new Error(\"CFF table CID Font FDSelect has bad FD index value \"+n+\" (FD count \"+i+\")\");if(c>a)throw new Error(\"CFF Table CID Font FDSelect format 3 range has bad GID \"+c);for(;h<c;h++)r.push(n);h=c}if(c!==a)throw new Error(\"CFF Table CID Font FDSelect format 3 range has bad final GID \"+c)}return r}function parseCFFTable(e,t,a,i){a.tables.cff={};var n=parseCFFHeader(e,t),r=parseCFFIndex(e,n.endOffset,parse.bytesToString),s=parseCFFIndex(e,r.endOffset),o=parseCFFIndex(e,s.endOffset,parse.bytesToString),l=parseCFFIndex(e,o.endOffset);a.gsubrs=l.objects,a.gsubrsBias=calcCFFSubroutineBias(a.gsubrs);var c=gatherCFFTopDicts(e,t,s.objects,o.objects);if(1!==c.length)throw new Error(\"CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = \"+c.length);var d=c[0];if(a.tables.cff.topDict=d,d._privateDict&&(a.defaultWidthX=d._privateDict.defaultWidthX,a.nominalWidthX=d._privateDict.nominalWidthX),void 0!==d.ros[0]&&void 0!==d.ros[1]&&(a.isCIDFont=!0),a.isCIDFont){var h=d.fdArray,p=d.fdSelect;if(0===h||0===p)throw new Error(\"Font is marked as a CID font, but FDArray and/or FDSelect information is missing\");var u=parseCFFIndex(e,h+=t),m=gatherCFFTopDicts(e,t,u.objects,o.objects);d._fdArray=m,p+=t,d._fdSelect=parseCFFFDSelect(e,p,a.numGlyphs,m.length)}var g,f=t+d.private[1],b=parseCFFPrivateDict(e,f,d.private[0],o.objects);if(a.defaultWidthX=b.defaultWidthX,a.nominalWidthX=b.nominalWidthX,0!==b.subrs){var U=f+b.subrs,E=parseCFFIndex(e,U);a.subrs=E.objects,a.subrsBias=calcCFFSubroutineBias(a.subrs)}else a.subrs=[],a.subrsBias=0;i.lowMemory?(g=parseCFFIndexLowMemory(e,t+d.charStrings),a.nGlyphs=g.offsets.length):(g=parseCFFIndex(e,t+d.charStrings),a.nGlyphs=g.objects.length);var w=parseCFFCharset(e,t+d.charset,a.nGlyphs,o.objects);if(0===d.encoding?a.cffEncoding=new CffEncoding(cffStandardEncoding,w):1===d.encoding?a.cffEncoding=new CffEncoding(cffExpertEncoding,w):a.cffEncoding=parseCFFEncoding(e,t+d.encoding,w),a.encoding=a.encoding||a.cffEncoding,a.glyphs=new glyphset.GlyphSet(a),i.lowMemory)a._push=function(i){var n=getCffIndexObject(i,g.offsets,e,t+d.charStrings);a.glyphs.push(i,glyphset.cffGlyphLoader(a,i,parseCFFCharstring,n))};else for(var y=0;y<a.nGlyphs;y+=1){var v=g.objects[y];a.glyphs.push(y,glyphset.cffGlyphLoader(a,y,parseCFFCharstring,v))}}function encodeString(e,t){var a,i=cffStandardStrings.indexOf(e);return i>=0&&(a=i),(i=t.indexOf(e))>=0?a=i+cffStandardStrings.length:(a=cffStandardStrings.length+t.length,t.push(e)),a}function makeHeader(){return new table.Record(\"Header\",[{name:\"major\",type:\"Card8\",value:1},{name:\"minor\",type:\"Card8\",value:0},{name:\"hdrSize\",type:\"Card8\",value:4},{name:\"major\",type:\"Card8\",value:1}])}function makeNameIndex(e){var t=new table.Record(\"Name INDEX\",[{name:\"names\",type:\"INDEX\",value:[]}]);t.names=[];for(var a=0;a<e.length;a+=1)t.names.push({name:\"name_\"+a,type:\"NAME\",value:e[a]});return t}function makeDict(e,t,a){for(var i={},n=0;n<e.length;n+=1){var r=e[n],s=t[r.name];void 0===s||equals(s,r.value)||(\"SID\"===r.type&&(s=encodeString(s,a)),i[r.op]={name:r.name,type:r.type,value:s})}return i}function makeTopDict(e,t){var a=new table.Record(\"Top DICT\",[{name:\"dict\",type:\"DICT\",value:{}}]);return a.dict=makeDict(TOP_DICT_META,e,t),a}function makeTopDictIndex(e){var t=new table.Record(\"Top DICT INDEX\",[{name:\"topDicts\",type:\"INDEX\",value:[]}]);return t.topDicts=[{name:\"topDict_0\",type:\"TABLE\",value:e}],t}function makeStringIndex(e){var t=new table.Record(\"String INDEX\",[{name:\"strings\",type:\"INDEX\",value:[]}]);t.strings=[];for(var a=0;a<e.length;a+=1)t.strings.push({name:\"string_\"+a,type:\"STRING\",value:e[a]});return t}function makeGlobalSubrIndex(){return new table.Record(\"Global Subr INDEX\",[{name:\"subrs\",type:\"INDEX\",value:[]}])}function makeCharsets(e,t){for(var a=new table.Record(\"Charsets\",[{name:\"format\",type:\"Card8\",value:0}]),i=0;i<e.length;i+=1){var n=encodeString(e[i],t);a.fields.push({name:\"glyph_\"+i,type:\"SID\",value:n})}return a}function glyphToOps(e){var t=[],a=e.path;t.push({name:\"width\",type:\"NUMBER\",value:e.advanceWidth});for(var i=0,n=0,r=0;r<a.commands.length;r+=1){var s=void 0,o=void 0,l=a.commands[r];if(\"Q\"===l.type){var c=1/3,d=2/3;l={type:\"C\",x:l.x,y:l.y,x1:Math.round(c*i+d*l.x1),y1:Math.round(c*n+d*l.y1),x2:Math.round(c*l.x+d*l.x1),y2:Math.round(c*l.y+d*l.y1)}}if(\"M\"===l.type)s=Math.round(l.x-i),o=Math.round(l.y-n),t.push({name:\"dx\",type:\"NUMBER\",value:s}),t.push({name:\"dy\",type:\"NUMBER\",value:o}),t.push({name:\"rmoveto\",type:\"OP\",value:21}),i=Math.round(l.x),n=Math.round(l.y);else if(\"L\"===l.type)s=Math.round(l.x-i),o=Math.round(l.y-n),t.push({name:\"dx\",type:\"NUMBER\",value:s}),t.push({name:\"dy\",type:\"NUMBER\",value:o}),t.push({name:\"rlineto\",type:\"OP\",value:5}),i=Math.round(l.x),n=Math.round(l.y);else if(\"C\"===l.type){var h=Math.round(l.x1-i),p=Math.round(l.y1-n),u=Math.round(l.x2-l.x1),m=Math.round(l.y2-l.y1);s=Math.round(l.x-l.x2),o=Math.round(l.y-l.y2),t.push({name:\"dx1\",type:\"NUMBER\",value:h}),t.push({name:\"dy1\",type:\"NUMBER\",value:p}),t.push({name:\"dx2\",type:\"NUMBER\",value:u}),t.push({name:\"dy2\",type:\"NUMBER\",value:m}),t.push({name:\"dx\",type:\"NUMBER\",value:s}),t.push({name:\"dy\",type:\"NUMBER\",value:o}),t.push({name:\"rrcurveto\",type:\"OP\",value:8}),i=Math.round(l.x),n=Math.round(l.y)}}return t.push({name:\"endchar\",type:\"OP\",value:14}),t}function makeCharStringsIndex(e){for(var t=new table.Record(\"CharStrings INDEX\",[{name:\"charStrings\",type:\"INDEX\",value:[]}]),a=0;a<e.length;a+=1){var i=e.get(a),n=glyphToOps(i);t.charStrings.push({name:i.name,type:\"CHARSTRING\",value:n})}return t}function makePrivateDict(e,t){var a=new table.Record(\"Private DICT\",[{name:\"dict\",type:\"DICT\",value:{}}]);return a.dict=makeDict(PRIVATE_DICT_META,e,t),a}function makeCFFTable(e,t){for(var a,i=new table.Table(\"CFF \",[{name:\"header\",type:\"RECORD\"},{name:\"nameIndex\",type:\"RECORD\"},{name:\"topDictIndex\",type:\"RECORD\"},{name:\"stringIndex\",type:\"RECORD\"},{name:\"globalSubrIndex\",type:\"RECORD\"},{name:\"charsets\",type:\"RECORD\"},{name:\"charStringsIndex\",type:\"RECORD\"},{name:\"privateDict\",type:\"RECORD\"}]),n=1/t.unitsPerEm,r={version:t.version,fullName:t.fullName,familyName:t.familyName,weight:t.weightName,fontBBox:t.fontBBox||[0,0,0,0],fontMatrix:[n,0,0,n,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},s=[],o=1;o<e.length;o+=1)a=e.get(o),s.push(a.name);var l=[];i.header=makeHeader(),i.nameIndex=makeNameIndex([t.postScriptName]);var c=makeTopDict(r,l);i.topDictIndex=makeTopDictIndex(c),i.globalSubrIndex=makeGlobalSubrIndex(),i.charsets=makeCharsets(s,l),i.charStringsIndex=makeCharStringsIndex(e),i.privateDict=makePrivateDict({},l),i.stringIndex=makeStringIndex(l);var d=i.header.sizeOf()+i.nameIndex.sizeOf()+i.topDictIndex.sizeOf()+i.stringIndex.sizeOf()+i.globalSubrIndex.sizeOf();return r.charset=d,r.encoding=0,r.charStrings=r.charset+i.charsets.sizeOf(),r.private[1]=r.charStrings+i.charStringsIndex.sizeOf(),c=makeTopDict(r,l),i.topDictIndex=makeTopDictIndex(c),i}var cff={parse:parseCFFTable,make:makeCFFTable};function parseHeadTable(e,t){var a={},i=new parse.Parser(e,t);return a.version=i.parseVersion(),a.fontRevision=Math.round(1e3*i.parseFixed())/1e3,a.checkSumAdjustment=i.parseULong(),a.magicNumber=i.parseULong(),check.argument(1594834165===a.magicNumber,\"Font header has wrong magic number.\"),a.flags=i.parseUShort(),a.unitsPerEm=i.parseUShort(),a.created=i.parseLongDateTime(),a.modified=i.parseLongDateTime(),a.xMin=i.parseShort(),a.yMin=i.parseShort(),a.xMax=i.parseShort(),a.yMax=i.parseShort(),a.macStyle=i.parseUShort(),a.lowestRecPPEM=i.parseUShort(),a.fontDirectionHint=i.parseShort(),a.indexToLocFormat=i.parseShort(),a.glyphDataFormat=i.parseShort(),a}function makeHeadTable(e){var t=Math.round((new Date).getTime()/1e3)+2082844800,a=t;return e.createdTimestamp&&(a=e.createdTimestamp+2082844800),new table.Table(\"head\",[{name:\"version\",type:\"FIXED\",value:65536},{name:\"fontRevision\",type:\"FIXED\",value:65536},{name:\"checkSumAdjustment\",type:\"ULONG\",value:0},{name:\"magicNumber\",type:\"ULONG\",value:1594834165},{name:\"flags\",type:\"USHORT\",value:0},{name:\"unitsPerEm\",type:\"USHORT\",value:1e3},{name:\"created\",type:\"LONGDATETIME\",value:a},{name:\"modified\",type:\"LONGDATETIME\",value:t},{name:\"xMin\",type:\"SHORT\",value:0},{name:\"yMin\",type:\"SHORT\",value:0},{name:\"xMax\",type:\"SHORT\",value:0},{name:\"yMax\",type:\"SHORT\",value:0},{name:\"macStyle\",type:\"USHORT\",value:0},{name:\"lowestRecPPEM\",type:\"USHORT\",value:0},{name:\"fontDirectionHint\",type:\"SHORT\",value:2},{name:\"indexToLocFormat\",type:\"SHORT\",value:0},{name:\"glyphDataFormat\",type:\"SHORT\",value:0}],e)}var head={parse:parseHeadTable,make:makeHeadTable};function parseHheaTable(e,t){var a={},i=new parse.Parser(e,t);return a.version=i.parseVersion(),a.ascender=i.parseShort(),a.descender=i.parseShort(),a.lineGap=i.parseShort(),a.advanceWidthMax=i.parseUShort(),a.minLeftSideBearing=i.parseShort(),a.minRightSideBearing=i.parseShort(),a.xMaxExtent=i.parseShort(),a.caretSlopeRise=i.parseShort(),a.caretSlopeRun=i.parseShort(),a.caretOffset=i.parseShort(),i.relativeOffset+=8,a.metricDataFormat=i.parseShort(),a.numberOfHMetrics=i.parseUShort(),a}function makeHheaTable(e){return new table.Table(\"hhea\",[{name:\"version\",type:\"FIXED\",value:65536},{name:\"ascender\",type:\"FWORD\",value:0},{name:\"descender\",type:\"FWORD\",value:0},{name:\"lineGap\",type:\"FWORD\",value:0},{name:\"advanceWidthMax\",type:\"UFWORD\",value:0},{name:\"minLeftSideBearing\",type:\"FWORD\",value:0},{name:\"minRightSideBearing\",type:\"FWORD\",value:0},{name:\"xMaxExtent\",type:\"FWORD\",value:0},{name:\"caretSlopeRise\",type:\"SHORT\",value:1},{name:\"caretSlopeRun\",type:\"SHORT\",value:0},{name:\"caretOffset\",type:\"SHORT\",value:0},{name:\"reserved1\",type:\"SHORT\",value:0},{name:\"reserved2\",type:\"SHORT\",value:0},{name:\"reserved3\",type:\"SHORT\",value:0},{name:\"reserved4\",type:\"SHORT\",value:0},{name:\"metricDataFormat\",type:\"SHORT\",value:0},{name:\"numberOfHMetrics\",type:\"USHORT\",value:0}],e)}var hhea={parse:parseHheaTable,make:makeHheaTable};function parseHmtxTableAll(e,t,a,i,n){for(var r,s,o=new parse.Parser(e,t),l=0;l<i;l+=1){l<a&&(r=o.parseUShort(),s=o.parseShort());var c=n.get(l);c.advanceWidth=r,c.leftSideBearing=s}}function parseHmtxTableOnLowMemory(e,t,a,i,n){var r,s;e._hmtxTableData={};for(var o=new parse.Parser(t,a),l=0;l<n;l+=1)l<i&&(r=o.parseUShort(),s=o.parseShort()),e._hmtxTableData[l]={advanceWidth:r,leftSideBearing:s}}function parseHmtxTable(e,t,a,i,n,r,s){s.lowMemory?parseHmtxTableOnLowMemory(e,t,a,i,n):parseHmtxTableAll(t,a,i,n,r)}function makeHmtxTable(e){for(var t=new table.Table(\"hmtx\",[]),a=0;a<e.length;a+=1){var i=e.get(a),n=i.advanceWidth||0,r=i.leftSideBearing||0;t.fields.push({name:\"advanceWidth_\"+a,type:\"USHORT\",value:n}),t.fields.push({name:\"leftSideBearing_\"+a,type:\"SHORT\",value:r})}return t}var hmtx={parse:parseHmtxTable,make:makeHmtxTable};function makeLtagTable(e){for(var t=new table.Table(\"ltag\",[{name:\"version\",type:\"ULONG\",value:1},{name:\"flags\",type:\"ULONG\",value:0},{name:\"numTags\",type:\"ULONG\",value:e.length}]),a=\"\",i=12+4*e.length,n=0;n<e.length;++n){var r=a.indexOf(e[n]);r<0&&(r=a.length,a+=e[n]),t.fields.push({name:\"offset \"+n,type:\"USHORT\",value:i+r}),t.fields.push({name:\"length \"+n,type:\"USHORT\",value:e[n].length})}return t.fields.push({name:\"stringPool\",type:\"CHARARRAY\",value:a}),t}function parseLtagTable(e,t){var a=new parse.Parser(e,t),i=a.parseULong();check.argument(1===i,\"Unsupported ltag table version.\"),a.skip(\"uLong\",1);for(var n=a.parseULong(),r=[],s=0;s<n;s++){for(var o=\"\",l=t+a.parseUShort(),c=a.parseUShort(),d=l;d<l+c;++d)o+=String.fromCharCode(e.getInt8(d));r.push(o)}return r}var ltag={make:makeLtagTable,parse:parseLtagTable};function parseMaxpTable(e,t){var a={},i=new parse.Parser(e,t);return a.version=i.parseVersion(),a.numGlyphs=i.parseUShort(),1===a.version&&(a.maxPoints=i.parseUShort(),a.maxContours=i.parseUShort(),a.maxCompositePoints=i.parseUShort(),a.maxCompositeContours=i.parseUShort(),a.maxZones=i.parseUShort(),a.maxTwilightPoints=i.parseUShort(),a.maxStorage=i.parseUShort(),a.maxFunctionDefs=i.parseUShort(),a.maxInstructionDefs=i.parseUShort(),a.maxStackElements=i.parseUShort(),a.maxSizeOfInstructions=i.parseUShort(),a.maxComponentElements=i.parseUShort(),a.maxComponentDepth=i.parseUShort()),a}function makeMaxpTable(e){return new table.Table(\"maxp\",[{name:\"version\",type:\"FIXED\",value:20480},{name:\"numGlyphs\",type:\"USHORT\",value:e}])}var maxp={parse:parseMaxpTable,make:makeMaxpTable},nameTableNames=[\"copyright\",\"fontFamily\",\"fontSubfamily\",\"uniqueID\",\"fullName\",\"version\",\"postScriptName\",\"trademark\",\"manufacturer\",\"designer\",\"description\",\"manufacturerURL\",\"designerURL\",\"license\",\"licenseURL\",\"reserved\",\"preferredFamily\",\"preferredSubfamily\",\"compatibleFullName\",\"sampleText\",\"postScriptFindFontName\",\"wwsFamily\",\"wwsSubfamily\"],macLanguages={0:\"en\",1:\"fr\",2:\"de\",3:\"it\",4:\"nl\",5:\"sv\",6:\"es\",7:\"da\",8:\"pt\",9:\"no\",10:\"he\",11:\"ja\",12:\"ar\",13:\"fi\",14:\"el\",15:\"is\",16:\"mt\",17:\"tr\",18:\"hr\",19:\"zh-Hant\",20:\"ur\",21:\"hi\",22:\"th\",23:\"ko\",24:\"lt\",25:\"pl\",26:\"hu\",27:\"es\",28:\"lv\",29:\"se\",30:\"fo\",31:\"fa\",32:\"ru\",33:\"zh\",34:\"nl-BE\",35:\"ga\",36:\"sq\",37:\"ro\",38:\"cz\",39:\"sk\",40:\"si\",41:\"yi\",42:\"sr\",43:\"mk\",44:\"bg\",45:\"uk\",46:\"be\",47:\"uz\",48:\"kk\",49:\"az-Cyrl\",50:\"az-Arab\",51:\"hy\",52:\"ka\",53:\"mo\",54:\"ky\",55:\"tg\",56:\"tk\",57:\"mn-CN\",58:\"mn\",59:\"ps\",60:\"ks\",61:\"ku\",62:\"sd\",63:\"bo\",64:\"ne\",65:\"sa\",66:\"mr\",67:\"bn\",68:\"as\",69:\"gu\",70:\"pa\",71:\"or\",72:\"ml\",73:\"kn\",74:\"ta\",75:\"te\",76:\"si\",77:\"my\",78:\"km\",79:\"lo\",80:\"vi\",81:\"id\",82:\"tl\",83:\"ms\",84:\"ms-Arab\",85:\"am\",86:\"ti\",87:\"om\",88:\"so\",89:\"sw\",90:\"rw\",91:\"rn\",92:\"ny\",93:\"mg\",94:\"eo\",128:\"cy\",129:\"eu\",130:\"ca\",131:\"la\",132:\"qu\",133:\"gn\",134:\"ay\",135:\"tt\",136:\"ug\",137:\"dz\",138:\"jv\",139:\"su\",140:\"gl\",141:\"af\",142:\"br\",143:\"iu\",144:\"gd\",145:\"gv\",146:\"ga\",147:\"to\",148:\"el-polyton\",149:\"kl\",150:\"az\",151:\"nn\"},macLanguageToScript={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},windowsLanguages={1078:\"af\",1052:\"sq\",1156:\"gsw\",1118:\"am\",5121:\"ar-DZ\",15361:\"ar-BH\",3073:\"ar\",2049:\"ar-IQ\",11265:\"ar-JO\",13313:\"ar-KW\",12289:\"ar-LB\",4097:\"ar-LY\",6145:\"ary\",8193:\"ar-OM\",16385:\"ar-QA\",1025:\"ar-SA\",10241:\"ar-SY\",7169:\"aeb\",14337:\"ar-AE\",9217:\"ar-YE\",1067:\"hy\",1101:\"as\",2092:\"az-Cyrl\",1068:\"az\",1133:\"ba\",1069:\"eu\",1059:\"be\",2117:\"bn\",1093:\"bn-IN\",8218:\"bs-Cyrl\",5146:\"bs\",1150:\"br\",1026:\"bg\",1027:\"ca\",3076:\"zh-HK\",5124:\"zh-MO\",2052:\"zh\",4100:\"zh-SG\",1028:\"zh-TW\",1155:\"co\",1050:\"hr\",4122:\"hr-BA\",1029:\"cs\",1030:\"da\",1164:\"prs\",1125:\"dv\",2067:\"nl-BE\",1043:\"nl\",3081:\"en-AU\",10249:\"en-BZ\",4105:\"en-CA\",9225:\"en-029\",16393:\"en-IN\",6153:\"en-IE\",8201:\"en-JM\",17417:\"en-MY\",5129:\"en-NZ\",13321:\"en-PH\",18441:\"en-SG\",7177:\"en-ZA\",11273:\"en-TT\",2057:\"en-GB\",1033:\"en\",12297:\"en-ZW\",1061:\"et\",1080:\"fo\",1124:\"fil\",1035:\"fi\",2060:\"fr-BE\",3084:\"fr-CA\",1036:\"fr\",5132:\"fr-LU\",6156:\"fr-MC\",4108:\"fr-CH\",1122:\"fy\",1110:\"gl\",1079:\"ka\",3079:\"de-AT\",1031:\"de\",5127:\"de-LI\",4103:\"de-LU\",2055:\"de-CH\",1032:\"el\",1135:\"kl\",1095:\"gu\",1128:\"ha\",1037:\"he\",1081:\"hi\",1038:\"hu\",1039:\"is\",1136:\"ig\",1057:\"id\",1117:\"iu\",2141:\"iu-Latn\",2108:\"ga\",1076:\"xh\",1077:\"zu\",1040:\"it\",2064:\"it-CH\",1041:\"ja\",1099:\"kn\",1087:\"kk\",1107:\"km\",1158:\"quc\",1159:\"rw\",1089:\"sw\",1111:\"kok\",1042:\"ko\",1088:\"ky\",1108:\"lo\",1062:\"lv\",1063:\"lt\",2094:\"dsb\",1134:\"lb\",1071:\"mk\",2110:\"ms-BN\",1086:\"ms\",1100:\"ml\",1082:\"mt\",1153:\"mi\",1146:\"arn\",1102:\"mr\",1148:\"moh\",1104:\"mn\",2128:\"mn-CN\",1121:\"ne\",1044:\"nb\",2068:\"nn\",1154:\"oc\",1096:\"or\",1123:\"ps\",1045:\"pl\",1046:\"pt\",2070:\"pt-PT\",1094:\"pa\",1131:\"qu-BO\",2155:\"qu-EC\",3179:\"qu\",1048:\"ro\",1047:\"rm\",1049:\"ru\",9275:\"smn\",4155:\"smj-NO\",5179:\"smj\",3131:\"se-FI\",1083:\"se\",2107:\"se-SE\",8251:\"sms\",6203:\"sma-NO\",7227:\"sms\",1103:\"sa\",7194:\"sr-Cyrl-BA\",3098:\"sr\",6170:\"sr-Latn-BA\",2074:\"sr-Latn\",1132:\"nso\",1074:\"tn\",1115:\"si\",1051:\"sk\",1060:\"sl\",11274:\"es-AR\",16394:\"es-BO\",13322:\"es-CL\",9226:\"es-CO\",5130:\"es-CR\",7178:\"es-DO\",12298:\"es-EC\",17418:\"es-SV\",4106:\"es-GT\",18442:\"es-HN\",2058:\"es-MX\",19466:\"es-NI\",6154:\"es-PA\",15370:\"es-PY\",10250:\"es-PE\",20490:\"es-PR\",3082:\"es\",1034:\"es\",21514:\"es-US\",14346:\"es-UY\",8202:\"es-VE\",2077:\"sv-FI\",1053:\"sv\",1114:\"syr\",1064:\"tg\",2143:\"tzm\",1097:\"ta\",1092:\"tt\",1098:\"te\",1054:\"th\",1105:\"bo\",1055:\"tr\",1090:\"tk\",1152:\"ug\",1058:\"uk\",1070:\"hsb\",1056:\"ur\",2115:\"uz-Cyrl\",1091:\"uz\",1066:\"vi\",1106:\"cy\",1160:\"wo\",1157:\"sah\",1144:\"ii\",1130:\"yo\"};function getLanguageCode(e,t,a){switch(e){case 0:if(65535===t)return\"und\";if(a)return a[t];break;case 1:return macLanguages[t];case 3:return windowsLanguages[t]}}var utf16=\"utf-16\",macScriptEncodings={0:\"macintosh\",1:\"x-mac-japanese\",2:\"x-mac-chinesetrad\",3:\"x-mac-korean\",6:\"x-mac-greek\",7:\"x-mac-cyrillic\",9:\"x-mac-devanagai\",10:\"x-mac-gurmukhi\",11:\"x-mac-gujarati\",12:\"x-mac-oriya\",13:\"x-mac-bengali\",14:\"x-mac-tamil\",15:\"x-mac-telugu\",16:\"x-mac-kannada\",17:\"x-mac-malayalam\",18:\"x-mac-sinhalese\",19:\"x-mac-burmese\",20:\"x-mac-khmer\",21:\"x-mac-thai\",22:\"x-mac-lao\",23:\"x-mac-georgian\",24:\"x-mac-armenian\",25:\"x-mac-chinesesimp\",26:\"x-mac-tibetan\",27:\"x-mac-mongolian\",28:\"x-mac-ethiopic\",29:\"x-mac-ce\",30:\"x-mac-vietnamese\",31:\"x-mac-extarabic\"},macLanguageEncodings={15:\"x-mac-icelandic\",17:\"x-mac-turkish\",18:\"x-mac-croatian\",24:\"x-mac-ce\",25:\"x-mac-ce\",26:\"x-mac-ce\",27:\"x-mac-ce\",28:\"x-mac-ce\",30:\"x-mac-icelandic\",37:\"x-mac-romanian\",38:\"x-mac-ce\",39:\"x-mac-ce\",40:\"x-mac-ce\",143:\"x-mac-inuit\",146:\"x-mac-gaelic\"};function getEncoding(e,t,a){switch(e){case 0:return utf16;case 1:return macLanguageEncodings[a]||macScriptEncodings[t];case 3:if(1===t||10===t)return utf16}}function parseNameTable(e,t,a){for(var i={},n=new parse.Parser(e,t),r=n.parseUShort(),s=n.parseUShort(),o=n.offset+n.parseUShort(),l=0;l<s;l++){var c=n.parseUShort(),d=n.parseUShort(),h=n.parseUShort(),p=n.parseUShort(),u=nameTableNames[p]||p,m=n.parseUShort(),g=n.parseUShort(),f=getLanguageCode(c,h,a),b=getEncoding(c,d,h);if(void 0!==b&&void 0!==f){var U;if(U=b===utf16?decode.UTF16(e,o+g,m):decode.MACSTRING(e,o+g,m,b)){var E=i[u];void 0===E&&(E=i[u]={}),E[f]=U}}}return 1===r&&n.parseUShort(),i}function reverseDict(e){var t={};for(var a in e)t[e[a]]=parseInt(a);return t}function makeNameRecord(e,t,a,i,n,r){return new table.Record(\"NameRecord\",[{name:\"platformID\",type:\"USHORT\",value:e},{name:\"encodingID\",type:\"USHORT\",value:t},{name:\"languageID\",type:\"USHORT\",value:a},{name:\"nameID\",type:\"USHORT\",value:i},{name:\"length\",type:\"USHORT\",value:n},{name:\"offset\",type:\"USHORT\",value:r}])}function findSubArray(e,t){var a=e.length,i=t.length-a+1;e:for(var n=0;n<i;n++)for(;n<i;n++){for(var r=0;r<a;r++)if(t[n+r]!==e[r])continue e;return n}return-1}function addStringToPool(e,t){var a=findSubArray(e,t);if(a<0){a=t.length;for(var i=0,n=e.length;i<n;++i)t.push(e[i])}return a}function makeNameTable(e,t){var a,i=[],n={},r=reverseDict(nameTableNames);for(var s in e){var o=r[s];if(void 0===o&&(o=s),a=parseInt(o),isNaN(a))throw new Error('Name table entry \"'+s+'\" does not exist, see nameTableNames for complete list.');n[a]=e[s],i.push(a)}for(var l=reverseDict(macLanguages),c=reverseDict(windowsLanguages),d=[],h=[],p=0;p<i.length;p++){var u=n[a=i[p]];for(var m in u){var g=u[m],f=1,b=l[m],U=macLanguageToScript[b],E=getEncoding(f,U,b),w=encode.MACSTRING(g,E);void 0===w&&(f=0,(b=t.indexOf(m))<0&&(b=t.length,t.push(m)),U=4,w=encode.UTF16(g));var y=addStringToPool(w,h);d.push(makeNameRecord(f,U,b,a,w.length,y));var v=c[m];if(void 0!==v){var T=encode.UTF16(g),S=addStringToPool(T,h);d.push(makeNameRecord(3,1,v,a,T.length,S))}}}d.sort((function(e,t){return e.platformID-t.platformID||e.encodingID-t.encodingID||e.languageID-t.languageID||e.nameID-t.nameID}));for(var _=new table.Table(\"name\",[{name:\"format\",type:\"USHORT\",value:0},{name:\"count\",type:\"USHORT\",value:d.length},{name:\"stringOffset\",type:\"USHORT\",value:6+12*d.length}]),C=0;C<d.length;C++)_.fields.push({name:\"record_\"+C,type:\"RECORD\",value:d[C]});return _.fields.push({name:\"strings\",type:\"LITERAL\",value:h}),_}var _name={parse:parseNameTable,make:makeNameTable},unicodeRanges=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];function getUnicodeRange(e){for(var t=0;t<unicodeRanges.length;t+=1){var a=unicodeRanges[t];if(e>=a.begin&&e<a.end)return t}return-1}function parseOS2Table(e,t){var a={},i=new parse.Parser(e,t);a.version=i.parseUShort(),a.xAvgCharWidth=i.parseShort(),a.usWeightClass=i.parseUShort(),a.usWidthClass=i.parseUShort(),a.fsType=i.parseUShort(),a.ySubscriptXSize=i.parseShort(),a.ySubscriptYSize=i.parseShort(),a.ySubscriptXOffset=i.parseShort(),a.ySubscriptYOffset=i.parseShort(),a.ySuperscriptXSize=i.parseShort(),a.ySuperscriptYSize=i.parseShort(),a.ySuperscriptXOffset=i.parseShort(),a.ySuperscriptYOffset=i.parseShort(),a.yStrikeoutSize=i.parseShort(),a.yStrikeoutPosition=i.parseShort(),a.sFamilyClass=i.parseShort(),a.panose=[];for(var n=0;n<10;n++)a.panose[n]=i.parseByte();return a.ulUnicodeRange1=i.parseULong(),a.ulUnicodeRange2=i.parseULong(),a.ulUnicodeRange3=i.parseULong(),a.ulUnicodeRange4=i.parseULong(),a.achVendID=String.fromCharCode(i.parseByte(),i.parseByte(),i.parseByte(),i.parseByte()),a.fsSelection=i.parseUShort(),a.usFirstCharIndex=i.parseUShort(),a.usLastCharIndex=i.parseUShort(),a.sTypoAscender=i.parseShort(),a.sTypoDescender=i.parseShort(),a.sTypoLineGap=i.parseShort(),a.usWinAscent=i.parseUShort(),a.usWinDescent=i.parseUShort(),a.version>=1&&(a.ulCodePageRange1=i.parseULong(),a.ulCodePageRange2=i.parseULong()),a.version>=2&&(a.sxHeight=i.parseShort(),a.sCapHeight=i.parseShort(),a.usDefaultChar=i.parseUShort(),a.usBreakChar=i.parseUShort(),a.usMaxContent=i.parseUShort()),a}function makeOS2Table(e){return new table.Table(\"OS/2\",[{name:\"version\",type:\"USHORT\",value:3},{name:\"xAvgCharWidth\",type:\"SHORT\",value:0},{name:\"usWeightClass\",type:\"USHORT\",value:0},{name:\"usWidthClass\",type:\"USHORT\",value:0},{name:\"fsType\",type:\"USHORT\",value:0},{name:\"ySubscriptXSize\",type:\"SHORT\",value:650},{name:\"ySubscriptYSize\",type:\"SHORT\",value:699},{name:\"ySubscriptXOffset\",type:\"SHORT\",value:0},{name:\"ySubscriptYOffset\",type:\"SHORT\",value:140},{name:\"ySuperscriptXSize\",type:\"SHORT\",value:650},{name:\"ySuperscriptYSize\",type:\"SHORT\",value:699},{name:\"ySuperscriptXOffset\",type:\"SHORT\",value:0},{name:\"ySuperscriptYOffset\",type:\"SHORT\",value:479},{name:\"yStrikeoutSize\",type:\"SHORT\",value:49},{name:\"yStrikeoutPosition\",type:\"SHORT\",value:258},{name:\"sFamilyClass\",type:\"SHORT\",value:0},{name:\"bFamilyType\",type:\"BYTE\",value:0},{name:\"bSerifStyle\",type:\"BYTE\",value:0},{name:\"bWeight\",type:\"BYTE\",value:0},{name:\"bProportion\",type:\"BYTE\",value:0},{name:\"bContrast\",type:\"BYTE\",value:0},{name:\"bStrokeVariation\",type:\"BYTE\",value:0},{name:\"bArmStyle\",type:\"BYTE\",value:0},{name:\"bLetterform\",type:\"BYTE\",value:0},{name:\"bMidline\",type:\"BYTE\",value:0},{name:\"bXHeight\",type:\"BYTE\",value:0},{name:\"ulUnicodeRange1\",type:\"ULONG\",value:0},{name:\"ulUnicodeRange2\",type:\"ULONG\",value:0},{name:\"ulUnicodeRange3\",type:\"ULONG\",value:0},{name:\"ulUnicodeRange4\",type:\"ULONG\",value:0},{name:\"achVendID\",type:\"CHARARRAY\",value:\"XXXX\"},{name:\"fsSelection\",type:\"USHORT\",value:0},{name:\"usFirstCharIndex\",type:\"USHORT\",value:0},{name:\"usLastCharIndex\",type:\"USHORT\",value:0},{name:\"sTypoAscender\",type:\"SHORT\",value:0},{name:\"sTypoDescender\",type:\"SHORT\",value:0},{name:\"sTypoLineGap\",type:\"SHORT\",value:0},{name:\"usWinAscent\",type:\"USHORT\",value:0},{name:\"usWinDescent\",type:\"USHORT\",value:0},{name:\"ulCodePageRange1\",type:\"ULONG\",value:0},{name:\"ulCodePageRange2\",type:\"ULONG\",value:0},{name:\"sxHeight\",type:\"SHORT\",value:0},{name:\"sCapHeight\",type:\"SHORT\",value:0},{name:\"usDefaultChar\",type:\"USHORT\",value:0},{name:\"usBreakChar\",type:\"USHORT\",value:0},{name:\"usMaxContext\",type:\"USHORT\",value:0}],e)}var os2={parse:parseOS2Table,make:makeOS2Table,unicodeRanges:unicodeRanges,getUnicodeRange:getUnicodeRange};function parsePostTable(e,t){var a={},i=new parse.Parser(e,t);switch(a.version=i.parseVersion(),a.italicAngle=i.parseFixed(),a.underlinePosition=i.parseShort(),a.underlineThickness=i.parseShort(),a.isFixedPitch=i.parseULong(),a.minMemType42=i.parseULong(),a.maxMemType42=i.parseULong(),a.minMemType1=i.parseULong(),a.maxMemType1=i.parseULong(),a.version){case 1:a.names=standardNames.slice();break;case 2:a.numberOfGlyphs=i.parseUShort(),a.glyphNameIndex=new Array(a.numberOfGlyphs);for(var n=0;n<a.numberOfGlyphs;n++)a.glyphNameIndex[n]=i.parseUShort();a.names=[];for(var r=0;r<a.numberOfGlyphs;r++)if(a.glyphNameIndex[r]>=standardNames.length){var s=i.parseChar();a.names.push(i.parseString(s))}break;case 2.5:a.numberOfGlyphs=i.parseUShort(),a.offset=new Array(a.numberOfGlyphs);for(var o=0;o<a.numberOfGlyphs;o++)a.offset[o]=i.parseChar()}return a}function makePostTable(){return new table.Table(\"post\",[{name:\"version\",type:\"FIXED\",value:196608},{name:\"italicAngle\",type:\"FIXED\",value:0},{name:\"underlinePosition\",type:\"FWORD\",value:0},{name:\"underlineThickness\",type:\"FWORD\",value:0},{name:\"isFixedPitch\",type:\"ULONG\",value:0},{name:\"minMemType42\",type:\"ULONG\",value:0},{name:\"maxMemType42\",type:\"ULONG\",value:0},{name:\"minMemType1\",type:\"ULONG\",value:0},{name:\"maxMemType1\",type:\"ULONG\",value:0}])}var post={parse:parsePostTable,make:makePostTable},subtableParsers=new Array(9);subtableParsers[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(Parser.coverage),deltaGlyphId:this.parseUShort()}:2===t?{substFormat:2,coverage:this.parsePointer(Parser.coverage),substitute:this.parseOffset16List()}:void check.assert(!1,\"0x\"+e.toString(16)+\": lookup type 1 format must be 1 or 2.\")},subtableParsers[2]=function(){var e=this.parseUShort();return check.argument(1===e,\"GSUB Multiple Substitution Subtable identifier-format must be 1\"),{substFormat:e,coverage:this.parsePointer(Parser.coverage),sequences:this.parseListOfLists()}},subtableParsers[3]=function(){var e=this.parseUShort();return check.argument(1===e,\"GSUB Alternate Substitution Subtable identifier-format must be 1\"),{substFormat:e,coverage:this.parsePointer(Parser.coverage),alternateSets:this.parseListOfLists()}},subtableParsers[4]=function(){var e=this.parseUShort();return check.argument(1===e,\"GSUB ligature table identifier-format must be 1\"),{substFormat:e,coverage:this.parsePointer(Parser.coverage),ligatureSets:this.parseListOfLists((function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}}))}};var lookupRecordDesc={sequenceIndex:Parser.uShort,lookupListIndex:Parser.uShort};function parseGsubTable(e,t){var a=new Parser(e,t=t||0),i=a.parseVersion(1);return check.argument(1===i||1.1===i,\"Unsupported GSUB table version.\"),1===i?{version:i,scripts:a.parseScriptList(),features:a.parseFeatureList(),lookups:a.parseLookupList(subtableParsers)}:{version:i,scripts:a.parseScriptList(),features:a.parseFeatureList(),lookups:a.parseLookupList(subtableParsers),variations:a.parseFeatureVariationsList()}}subtableParsers[5]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{substFormat:t,coverage:this.parsePointer(Parser.coverage),ruleSets:this.parseListOfLists((function(){var e=this.parseUShort(),t=this.parseUShort();return{input:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,lookupRecordDesc)}}))};if(2===t)return{substFormat:t,coverage:this.parsePointer(Parser.coverage),classDef:this.parsePointer(Parser.classDef),classSets:this.parseListOfLists((function(){var e=this.parseUShort(),t=this.parseUShort();return{classes:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,lookupRecordDesc)}}))};if(3===t){var a=this.parseUShort(),i=this.parseUShort();return{substFormat:t,coverages:this.parseList(a,Parser.pointer(Parser.coverage)),lookupRecords:this.parseRecordList(i,lookupRecordDesc)}}check.assert(!1,\"0x\"+e.toString(16)+\": lookup type 5 format must be 1, 2 or 3.\")},subtableParsers[6]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(Parser.coverage),chainRuleSets:this.parseListOfLists((function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(lookupRecordDesc)}}))}:2===t?{substFormat:2,coverage:this.parsePointer(Parser.coverage),backtrackClassDef:this.parsePointer(Parser.classDef),inputClassDef:this.parsePointer(Parser.classDef),lookaheadClassDef:this.parsePointer(Parser.classDef),chainClassSet:this.parseListOfLists((function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(lookupRecordDesc)}}))}:3===t?{substFormat:3,backtrackCoverage:this.parseList(Parser.pointer(Parser.coverage)),inputCoverage:this.parseList(Parser.pointer(Parser.coverage)),lookaheadCoverage:this.parseList(Parser.pointer(Parser.coverage)),lookupRecords:this.parseRecordList(lookupRecordDesc)}:void check.assert(!1,\"0x\"+e.toString(16)+\": lookup type 6 format must be 1, 2 or 3.\")},subtableParsers[7]=function(){var e=this.parseUShort();check.argument(1===e,\"GSUB Extension Substitution subtable identifier-format must be 1\");var t=this.parseUShort(),a=new Parser(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:t,extension:subtableParsers[t].call(a)}},subtableParsers[8]=function(){var e=this.parseUShort();return check.argument(1===e,\"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1\"),{substFormat:e,coverage:this.parsePointer(Parser.coverage),backtrackCoverage:this.parseList(Parser.pointer(Parser.coverage)),lookaheadCoverage:this.parseList(Parser.pointer(Parser.coverage)),substitutes:this.parseUShortList()}};var subtableMakers=new Array(9);function makeGsubTable(e){return new table.Table(\"GSUB\",[{name:\"version\",type:\"ULONG\",value:65536},{name:\"scripts\",type:\"TABLE\",value:new table.ScriptList(e.scripts)},{name:\"features\",type:\"TABLE\",value:new table.FeatureList(e.features)},{name:\"lookups\",type:\"TABLE\",value:new table.LookupList(e.lookups,subtableMakers)}])}subtableMakers[1]=function(e){return 1===e.substFormat?new table.Table(\"substitutionTable\",[{name:\"substFormat\",type:\"USHORT\",value:1},{name:\"coverage\",type:\"TABLE\",value:new table.Coverage(e.coverage)},{name:\"deltaGlyphID\",type:\"USHORT\",value:e.deltaGlyphId}]):new table.Table(\"substitutionTable\",[{name:\"substFormat\",type:\"USHORT\",value:2},{name:\"coverage\",type:\"TABLE\",value:new table.Coverage(e.coverage)}].concat(table.ushortList(\"substitute\",e.substitute)))},subtableMakers[2]=function(e){return check.assert(1===e.substFormat,\"Lookup type 2 substFormat must be 1.\"),new table.Table(\"substitutionTable\",[{name:\"substFormat\",type:\"USHORT\",value:1},{name:\"coverage\",type:\"TABLE\",value:new table.Coverage(e.coverage)}].concat(table.tableList(\"seqSet\",e.sequences,(function(e){return new table.Table(\"sequenceSetTable\",table.ushortList(\"sequence\",e))}))))},subtableMakers[3]=function(e){return check.assert(1===e.substFormat,\"Lookup type 3 substFormat must be 1.\"),new table.Table(\"substitutionTable\",[{name:\"substFormat\",type:\"USHORT\",value:1},{name:\"coverage\",type:\"TABLE\",value:new table.Coverage(e.coverage)}].concat(table.tableList(\"altSet\",e.alternateSets,(function(e){return new table.Table(\"alternateSetTable\",table.ushortList(\"alternate\",e))}))))},subtableMakers[4]=function(e){return check.assert(1===e.substFormat,\"Lookup type 4 substFormat must be 1.\"),new table.Table(\"substitutionTable\",[{name:\"substFormat\",type:\"USHORT\",value:1},{name:\"coverage\",type:\"TABLE\",value:new table.Coverage(e.coverage)}].concat(table.tableList(\"ligSet\",e.ligatureSets,(function(e){return new table.Table(\"ligatureSetTable\",table.tableList(\"ligature\",e,(function(e){return new table.Table(\"ligatureTable\",[{name:\"ligGlyph\",type:\"USHORT\",value:e.ligGlyph}].concat(table.ushortList(\"component\",e.components,e.components.length+1)))})))}))))},subtableMakers[6]=function(e){if(1===e.substFormat){var t=new table.Table(\"chainContextTable\",[{name:\"substFormat\",type:\"USHORT\",value:e.substFormat},{name:\"coverage\",type:\"TABLE\",value:new table.Coverage(e.coverage)}].concat(table.tableList(\"chainRuleSet\",e.chainRuleSets,(function(e){return new table.Table(\"chainRuleSetTable\",table.tableList(\"chainRule\",e,(function(e){var t=table.ushortList(\"backtrackGlyph\",e.backtrack,e.backtrack.length).concat(table.ushortList(\"inputGlyph\",e.input,e.input.length+1)).concat(table.ushortList(\"lookaheadGlyph\",e.lookahead,e.lookahead.length)).concat(table.ushortList(\"substitution\",[],e.lookupRecords.length));return e.lookupRecords.forEach((function(e,a){t=t.concat({name:\"sequenceIndex\"+a,type:\"USHORT\",value:e.sequenceIndex}).concat({name:\"lookupListIndex\"+a,type:\"USHORT\",value:e.lookupListIndex})})),new table.Table(\"chainRuleTable\",t)})))}))));return t}if(2===e.substFormat)check.assert(!1,\"lookup type 6 format 2 is not yet supported.\");else if(3===e.substFormat){var a=[{name:\"substFormat\",type:\"USHORT\",value:e.substFormat}];return a.push({name:\"backtrackGlyphCount\",type:\"USHORT\",value:e.backtrackCoverage.length}),e.backtrackCoverage.forEach((function(e,t){a.push({name:\"backtrackCoverage\"+t,type:\"TABLE\",value:new table.Coverage(e)})})),a.push({name:\"inputGlyphCount\",type:\"USHORT\",value:e.inputCoverage.length}),e.inputCoverage.forEach((function(e,t){a.push({name:\"inputCoverage\"+t,type:\"TABLE\",value:new table.Coverage(e)})})),a.push({name:\"lookaheadGlyphCount\",type:\"USHORT\",value:e.lookaheadCoverage.length}),e.lookaheadCoverage.forEach((function(e,t){a.push({name:\"lookaheadCoverage\"+t,type:\"TABLE\",value:new table.Coverage(e)})})),a.push({name:\"substitutionCount\",type:\"USHORT\",value:e.lookupRecords.length}),e.lookupRecords.forEach((function(e,t){a=a.concat({name:\"sequenceIndex\"+t,type:\"USHORT\",value:e.sequenceIndex}).concat({name:\"lookupListIndex\"+t,type:\"USHORT\",value:e.lookupListIndex})})),new table.Table(\"chainContextTable\",a)}check.assert(!1,\"lookup type 6 format must be 1, 2 or 3.\")};var gsub={parse:parseGsubTable,make:makeGsubTable};function parseMetaTable(e,t){var a=new parse.Parser(e,t),i=a.parseULong();check.argument(1===i,\"Unsupported META table version.\"),a.parseULong(),a.parseULong();for(var n=a.parseULong(),r={},s=0;s<n;s++){var o=a.parseTag(),l=a.parseULong(),c=a.parseULong(),d=decode.UTF8(e,t+l,c);r[o]=d}return r}function makeMetaTable(e){var t=Object.keys(e).length,a=\"\",i=16+12*t,n=new table.Table(\"meta\",[{name:\"version\",type:\"ULONG\",value:1},{name:\"flags\",type:\"ULONG\",value:0},{name:\"offset\",type:\"ULONG\",value:i},{name:\"numTags\",type:\"ULONG\",value:t}]);for(var r in e){var s=a.length;a+=e[r],n.fields.push({name:\"tag \"+r,type:\"TAG\",value:r}),n.fields.push({name:\"offset \"+r,type:\"ULONG\",value:i+s}),n.fields.push({name:\"length \"+r,type:\"ULONG\",value:e[r].length})}return n.fields.push({name:\"stringPool\",type:\"CHARARRAY\",value:a}),n}var meta={parse:parseMetaTable,make:makeMetaTable};function log2(e){return Math.log(e)/Math.log(2)|0}function computeCheckSum(e){for(;e.length%4!=0;)e.push(0);for(var t=0,a=0;a<e.length;a+=4)t+=(e[a]<<24)+(e[a+1]<<16)+(e[a+2]<<8)+e[a+3];return t%Math.pow(2,32)}function makeTableRecord(e,t,a,i){return new table.Record(\"Table Record\",[{name:\"tag\",type:\"TAG\",value:void 0!==e?e:\"\"},{name:\"checkSum\",type:\"ULONG\",value:void 0!==t?t:0},{name:\"offset\",type:\"ULONG\",value:void 0!==a?a:0},{name:\"length\",type:\"ULONG\",value:void 0!==i?i:0}])}function makeSfntTable(e){var t=new table.Table(\"sfnt\",[{name:\"version\",type:\"TAG\",value:\"OTTO\"},{name:\"numTables\",type:\"USHORT\",value:0},{name:\"searchRange\",type:\"USHORT\",value:0},{name:\"entrySelector\",type:\"USHORT\",value:0},{name:\"rangeShift\",type:\"USHORT\",value:0}]);t.tables=e,t.numTables=e.length;var a=Math.pow(2,log2(t.numTables));t.searchRange=16*a,t.entrySelector=log2(a),t.rangeShift=16*t.numTables-t.searchRange;for(var i=[],n=[],r=t.sizeOf()+makeTableRecord().sizeOf()*t.numTables;r%4!=0;)r+=1,n.push({name:\"padding\",type:\"BYTE\",value:0});for(var s=0;s<e.length;s+=1){var o=e[s];check.argument(4===o.tableName.length,\"Table name\"+o.tableName+\" is invalid.\");var l=o.sizeOf(),c=makeTableRecord(o.tableName,computeCheckSum(o.encode()),r,l);for(i.push({name:c.tag+\" Table Record\",type:\"RECORD\",value:c}),n.push({name:o.tableName+\" table\",type:\"RECORD\",value:o}),r+=l,check.argument(!isNaN(r),\"Something went wrong calculating the offset.\");r%4!=0;)r+=1,n.push({name:\"padding\",type:\"BYTE\",value:0})}return i.sort((function(e,t){return e.value.tag>t.value.tag?1:-1})),t.fields=t.fields.concat(i),t.fields=t.fields.concat(n),t}function metricsForChar(e,t,a){for(var i=0;i<t.length;i+=1){var n=e.charToGlyphIndex(t[i]);if(n>0)return e.glyphs.get(n).getMetrics()}return a}function average$1(e){for(var t=0,a=0;a<e.length;a+=1)t+=e[a];return t/e.length}function fontToSfntTable(e){for(var t,a=[],i=[],n=[],r=[],s=[],o=[],l=[],c=0,d=0,h=0,p=0,u=0,m=0;m<e.glyphs.length;m+=1){var g=e.glyphs.get(m),f=0|g.unicode;if(isNaN(g.advanceWidth))throw new Error(\"Glyph \"+g.name+\" (\"+m+\"): advanceWidth is not a number.\");(t>f||void 0===t)&&f>0&&(t=f),c<f&&(c=f);var b=os2.getUnicodeRange(f);if(b<32)d|=1<<b;else if(b<64)h|=1<<b-32;else if(b<96)p|=1<<b-64;else{if(!(b<123))throw new Error(\"Unicode ranges bits > 123 are reserved for internal usage\");u|=1<<b-96}if(\".notdef\"!==g.name){var U=g.getMetrics();a.push(U.xMin),i.push(U.yMin),n.push(U.xMax),r.push(U.yMax),o.push(U.leftSideBearing),l.push(U.rightSideBearing),s.push(g.advanceWidth)}}var E={xMin:Math.min.apply(null,a),yMin:Math.min.apply(null,i),xMax:Math.max.apply(null,n),yMax:Math.max.apply(null,r),advanceWidthMax:Math.max.apply(null,s),advanceWidthAvg:average$1(s),minLeftSideBearing:Math.min.apply(null,o),maxLeftSideBearing:Math.max.apply(null,o),minRightSideBearing:Math.min.apply(null,l)};E.ascender=e.ascender,E.descender=e.descender;var w=head.make({flags:3,unitsPerEm:e.unitsPerEm,xMin:E.xMin,yMin:E.yMin,xMax:E.xMax,yMax:E.yMax,lowestRecPPEM:3,createdTimestamp:e.createdTimestamp}),y=hhea.make({ascender:E.ascender,descender:E.descender,advanceWidthMax:E.advanceWidthMax,minLeftSideBearing:E.minLeftSideBearing,minRightSideBearing:E.minRightSideBearing,xMaxExtent:E.maxLeftSideBearing+(E.xMax-E.xMin),numberOfHMetrics:e.glyphs.length}),v=maxp.make(e.glyphs.length),T=os2.make(Object.assign({xAvgCharWidth:Math.round(E.advanceWidthAvg),usFirstCharIndex:t,usLastCharIndex:c,ulUnicodeRange1:d,ulUnicodeRange2:h,ulUnicodeRange3:p,ulUnicodeRange4:u,sTypoAscender:E.ascender,sTypoDescender:E.descender,sTypoLineGap:0,usWinAscent:E.yMax,usWinDescent:Math.abs(E.yMin),ulCodePageRange1:1,sxHeight:metricsForChar(e,\"xyvw\",{yMax:Math.round(E.ascender/2)}).yMax,sCapHeight:metricsForChar(e,\"HIKLEFJMNTZBDPRAGOQSUVWXY\",E).yMax,usDefaultChar:e.hasChar(\" \")?32:0,usBreakChar:e.hasChar(\" \")?32:0},e.tables.os2)),S=hmtx.make(e.glyphs),_=cmap.make(e.glyphs),C=e.getEnglishName(\"fontFamily\"),I=e.getEnglishName(\"fontSubfamily\"),x=C+\" \"+I,A=e.getEnglishName(\"postScriptName\");A||(A=C.replace(/\\s/g,\"\")+\"-\"+I);var k={};for(var O in e.names)k[O]=e.names[O];k.uniqueID||(k.uniqueID={en:e.getEnglishName(\"manufacturer\")+\":\"+x}),k.postScriptName||(k.postScriptName={en:A}),k.preferredFamily||(k.preferredFamily=e.names.fontFamily),k.preferredSubfamily||(k.preferredSubfamily=e.names.fontSubfamily);var R=[],M=_name.make(k,R),L=R.length>0?ltag.make(R):void 0,D=post.make(),P=cff.make(e.glyphs,{version:e.getEnglishName(\"version\"),fullName:x,familyName:C,weightName:I,postScriptName:A,unitsPerEm:e.unitsPerEm,fontBBox:[0,E.yMin,E.ascender,E.advanceWidthMax]}),N=e.metas&&Object.keys(e.metas).length>0?meta.make(e.metas):void 0,F=[w,y,v,T,M,_,D,P,S];L&&F.push(L),e.tables.gsub&&F.push(gsub.make(e.tables.gsub)),N&&F.push(N);for(var G=makeSfntTable(F),B=computeCheckSum(G.encode()),V=G.fields,$=!1,W=0;W<V.length;W+=1)if(\"head table\"===V[W].name){V[W].value.checkSumAdjustment=2981146554-B,$=!0;break}if(!$)throw new Error(\"Could not find head table with checkSum to adjust.\");return G}var sfnt={make:makeSfntTable,fontToTable:fontToSfntTable,computeCheckSum:computeCheckSum};function searchTag(e,t){for(var a=0,i=e.length-1;a<=i;){var n=a+i>>>1,r=e[n].tag;if(r===t)return n;r<t?a=n+1:i=n-1}return-a-1}function binSearch(e,t){for(var a=0,i=e.length-1;a<=i;){var n=a+i>>>1,r=e[n];if(r===t)return n;r<t?a=n+1:i=n-1}return-a-1}function searchRange(e,t){for(var a,i=0,n=e.length-1;i<=n;){var r=i+n>>>1,s=(a=e[r]).start;if(s===t)return a;s<t?i=r+1:n=r-1}if(i>0)return t>(a=e[i-1]).end?0:a}function Layout(e,t){this.font=e,this.tableName=t}function Position(e){Layout.call(this,e,\"gpos\")}function Substitution(e){Layout.call(this,e,\"gsub\")}function arraysEqual(e,t){var a=e.length;if(a!==t.length)return!1;for(var i=0;i<a;i++)if(e[i]!==t[i])return!1;return!0}function getSubstFormat(e,t,a){for(var i=e.subtables,n=0;n<i.length;n++){var r=i[n];if(r.substFormat===t)return r}if(a)return i.push(a),a}function isBrowser(){return\"undefined\"!=typeof window}function nodeBufferToArrayBuffer(e){for(var t=new ArrayBuffer(e.length),a=new Uint8Array(t),i=0;i<e.length;++i)a[i]=e[i];return t}function arrayBufferToNodeBuffer(e){for(var t=new Buffer(e.byteLength),a=new Uint8Array(e),i=0;i<t.length;++i)t[i]=a[i];return t}function checkArgument(e,t){if(!e)throw t}function parseGlyphCoordinate(e,t,a,i,n){var r;return(t&i)>0?(r=e.parseByte(),0===(t&n)&&(r=-r),r=a+r):r=(t&n)>0?a:a+e.parseShort(),r}function parseGlyph(e,t,a){var i,n,r=new parse.Parser(t,a);if(e.numberOfContours=r.parseShort(),e._xMin=r.parseShort(),e._yMin=r.parseShort(),e._xMax=r.parseShort(),e._yMax=r.parseShort(),e.numberOfContours>0){for(var s=e.endPointIndices=[],o=0;o<e.numberOfContours;o+=1)s.push(r.parseUShort());e.instructionLength=r.parseUShort(),e.instructions=[];for(var l=0;l<e.instructionLength;l+=1)e.instructions.push(r.parseByte());var c=s[s.length-1]+1;i=[];for(var d=0;d<c;d+=1)if(n=r.parseByte(),i.push(n),(8&n)>0)for(var h=r.parseByte(),p=0;p<h;p+=1)i.push(n),d+=1;if(check.argument(i.length===c,\"Bad flags.\"),s.length>0){var u,m=[];if(c>0){for(var g=0;g<c;g+=1)n=i[g],(u={}).onCurve=!!(1&n),u.lastPointOfContour=s.indexOf(g)>=0,m.push(u);for(var f=0,b=0;b<c;b+=1)n=i[b],(u=m[b]).x=parseGlyphCoordinate(r,n,f,2,16),f=u.x;for(var U=0,E=0;E<c;E+=1)n=i[E],(u=m[E]).y=parseGlyphCoordinate(r,n,U,4,32),U=u.y}e.points=m}else e.points=[]}else if(0===e.numberOfContours)e.points=[];else{e.isComposite=!0,e.points=[],e.components=[];for(var w=!0;w;){i=r.parseUShort();var y={glyphIndex:r.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(1&i)>0?(2&i)>0?(y.dx=r.parseShort(),y.dy=r.parseShort()):y.matchedPoints=[r.parseUShort(),r.parseUShort()]:(2&i)>0?(y.dx=r.parseChar(),y.dy=r.parseChar()):y.matchedPoints=[r.parseByte(),r.parseByte()],(8&i)>0?y.xScale=y.yScale=r.parseF2Dot14():(64&i)>0?(y.xScale=r.parseF2Dot14(),y.yScale=r.parseF2Dot14()):(128&i)>0&&(y.xScale=r.parseF2Dot14(),y.scale01=r.parseF2Dot14(),y.scale10=r.parseF2Dot14(),y.yScale=r.parseF2Dot14()),e.components.push(y),w=!!(32&i)}if(256&i){e.instructionLength=r.parseUShort(),e.instructions=[];for(var v=0;v<e.instructionLength;v+=1)e.instructions.push(r.parseByte())}}}function transformPoints$1(e,t){for(var a=[],i=0;i<e.length;i+=1){var n=e[i],r={x:t.xScale*n.x+t.scale01*n.y+t.dx,y:t.scale10*n.x+t.yScale*n.y+t.dy,onCurve:n.onCurve,lastPointOfContour:n.lastPointOfContour};a.push(r)}return a}function getContours(e){for(var t=[],a=[],i=0;i<e.length;i+=1){var n=e[i];a.push(n),n.lastPointOfContour&&(t.push(a),a=[])}return check.argument(0===a.length,\"There are still points left in the current contour.\"),t}function getPath(e){var t=new Path;if(!e)return t;for(var a=getContours(e),i=0;i<a.length;++i){var n=a[i],r=null,s=n[n.length-1],o=n[0];if(s.onCurve)t.moveTo(s.x,s.y);else if(o.onCurve)t.moveTo(o.x,o.y);else{var l={x:.5*(s.x+o.x),y:.5*(s.y+o.y)};t.moveTo(l.x,l.y)}for(var c=0;c<n.length;++c)if(r=s,s=o,o=n[(c+1)%n.length],s.onCurve)t.lineTo(s.x,s.y);else{var d=o;r.onCurve||(s.x,r.x,s.y,r.y),o.onCurve||(d={x:.5*(s.x+o.x),y:.5*(s.y+o.y)}),t.quadraticCurveTo(s.x,s.y,d.x,d.y)}t.closePath()}return t}function buildPath(e,t){if(t.isComposite)for(var a=0;a<t.components.length;a+=1){var i=t.components[a],n=e.get(i.glyphIndex);if(n.getPath(),n.points){var r=void 0;if(void 0===i.matchedPoints)r=transformPoints$1(n.points,i);else{if(i.matchedPoints[0]>t.points.length-1||i.matchedPoints[1]>n.points.length-1)throw Error(\"Matched points out of range in \"+t.name);var s=t.points[i.matchedPoints[0]],o=n.points[i.matchedPoints[1]],l={xScale:i.xScale,scale01:i.scale01,scale10:i.scale10,yScale:i.yScale,dx:0,dy:0};o=transformPoints$1([o],l)[0],l.dx=s.x-o.x,l.dy=s.y-o.y,r=transformPoints$1(n.points,l)}t.points=t.points.concat(r)}}return getPath(t.points)}function parseGlyfTableAll(e,t,a,i){for(var n=new glyphset.GlyphSet(i),r=0;r<a.length-1;r+=1){var s=a[r];s!==a[r+1]?n.push(r,glyphset.ttfGlyphLoader(i,r,parseGlyph,e,t+s,buildPath)):n.push(r,glyphset.glyphLoader(i,r))}return n}function parseGlyfTableOnLowMemory(e,t,a,i){var n=new glyphset.GlyphSet(i);return i._push=function(r){var s=a[r];s!==a[r+1]?n.push(r,glyphset.ttfGlyphLoader(i,r,parseGlyph,e,t+s,buildPath)):n.push(r,glyphset.glyphLoader(i,r))},n}function parseGlyfTable(e,t,a,i,n){return n.lowMemory?parseGlyfTableOnLowMemory(e,t,a,i):parseGlyfTableAll(e,t,a,i)}Layout.prototype={searchTag:searchTag,binSearch:binSearch,getTable:function(e){var t=this.font.tables[this.tableName];return!t&&e&&(t=this.font.tables[this.tableName]=this.createDefaultTable()),t},getScriptNames:function(){var e=this.getTable();return e?e.scripts.map((function(e){return e.tag})):[]},getDefaultScriptName:function(){var e=this.getTable();if(e){for(var t=!1,a=0;a<e.scripts.length;a++){var i=e.scripts[a].tag;if(\"DFLT\"===i)return i;\"latn\"===i&&(t=!0)}return t?\"latn\":void 0}},getScriptTable:function(e,t){var a=this.getTable(t);if(a){e=e||\"DFLT\";var i=a.scripts,n=searchTag(a.scripts,e);if(n>=0)return i[n].script;if(t){var r={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return i.splice(-1-n,0,r),r.script}}},getLangSysTable:function(e,t,a){var i=this.getScriptTable(e,a);if(i){if(!t||\"dflt\"===t||\"DFLT\"===t)return i.defaultLangSys;var n=searchTag(i.langSysRecords,t);if(n>=0)return i.langSysRecords[n].langSys;if(a){var r={tag:t,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return i.langSysRecords.splice(-1-n,0,r),r.langSys}}},getFeatureTable:function(e,t,a,i){var n=this.getLangSysTable(e,t,i);if(n){for(var r,s=n.featureIndexes,o=this.font.tables[this.tableName].features,l=0;l<s.length;l++)if((r=o[s[l]]).tag===a)return r.feature;if(i){var c=o.length;return check.assert(0===c||a>=o[c-1].tag,\"Features must be added in alphabetical order.\"),r={tag:a,feature:{params:0,lookupListIndexes:[]}},o.push(r),s.push(c),r.feature}}},getLookupTables:function(e,t,a,i,n){var r=this.getFeatureTable(e,t,a,n),s=[];if(r){for(var o,l=r.lookupListIndexes,c=this.font.tables[this.tableName].lookups,d=0;d<l.length;d++)(o=c[l[d]]).lookupType===i&&s.push(o);if(0===s.length&&n){o={lookupType:i,lookupFlag:0,subtables:[],markFilteringSet:void 0};var h=c.length;return c.push(o),l.push(h),[o]}}return s},getGlyphClass:function(e,t){switch(e.format){case 1:return e.startGlyph<=t&&t<e.startGlyph+e.classes.length?e.classes[t-e.startGlyph]:0;case 2:var a=searchRange(e.ranges,t);return a?a.classId:0}},getCoverageIndex:function(e,t){switch(e.format){case 1:var a=binSearch(e.glyphs,t);return a>=0?a:-1;case 2:var i=searchRange(e.ranges,t);return i?i.index+t-i.start:-1}},expandCoverage:function(e){if(1===e.format)return e.glyphs;for(var t=[],a=e.ranges,i=0;i<a.length;i++)for(var n=a[i],r=n.start,s=n.end,o=r;o<=s;o++)t.push(o);return t}},Position.prototype=Layout.prototype,Position.prototype.init=function(){var e=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(e)},Position.prototype.getKerningValue=function(e,t,a){for(var i=0;i<e.length;i++)for(var n=e[i].subtables,r=0;r<n.length;r++){var s=n[r],o=this.getCoverageIndex(s.coverage,t);if(!(o<0))switch(s.posFormat){case 1:for(var l=s.pairSets[o],c=0;c<l.length;c++){var d=l[c];if(d.secondGlyph===a)return d.value1&&d.value1.xAdvance||0}break;case 2:var h=this.getGlyphClass(s.classDef1,t),p=this.getGlyphClass(s.classDef2,a),u=s.classRecords[h][p];return u.value1&&u.value1.xAdvance||0}}return 0},Position.prototype.getKerningTables=function(e,t){if(this.font.tables.gpos)return this.getLookupTables(e,t,\"kern\",2)},Substitution.prototype=Layout.prototype,Substitution.prototype.createDefaultTable=function(){return{version:1,scripts:[{tag:\"DFLT\",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},Substitution.prototype.getSingle=function(e,t,a){for(var i=[],n=this.getLookupTables(t,a,e,1),r=0;r<n.length;r++)for(var s=n[r].subtables,o=0;o<s.length;o++){var l=s[o],c=this.expandCoverage(l.coverage),d=void 0;if(1===l.substFormat){var h=l.deltaGlyphId;for(d=0;d<c.length;d++){var p=c[d];i.push({sub:p,by:p+h})}}else{var u=l.substitute;for(d=0;d<c.length;d++)i.push({sub:c[d],by:u[d]})}}return i},Substitution.prototype.getMultiple=function(e,t,a){for(var i=[],n=this.getLookupTables(t,a,e,2),r=0;r<n.length;r++)for(var s=n[r].subtables,o=0;o<s.length;o++){var l=s[o],c=this.expandCoverage(l.coverage),d=void 0;for(d=0;d<c.length;d++){var h=c[d],p=l.sequences[d];i.push({sub:h,by:p})}}return i},Substitution.prototype.getAlternates=function(e,t,a){for(var i=[],n=this.getLookupTables(t,a,e,3),r=0;r<n.length;r++)for(var s=n[r].subtables,o=0;o<s.length;o++)for(var l=s[o],c=this.expandCoverage(l.coverage),d=l.alternateSets,h=0;h<c.length;h++)i.push({sub:c[h],by:d[h]});return i},Substitution.prototype.getLigatures=function(e,t,a){for(var i=[],n=this.getLookupTables(t,a,e,4),r=0;r<n.length;r++)for(var s=n[r].subtables,o=0;o<s.length;o++)for(var l=s[o],c=this.expandCoverage(l.coverage),d=l.ligatureSets,h=0;h<c.length;h++)for(var p=c[h],u=d[h],m=0;m<u.length;m++){var g=u[m];i.push({sub:[p].concat(g.components),by:g.ligGlyph})}return i},Substitution.prototype.addSingle=function(e,t,a,i){var n=getSubstFormat(this.getLookupTables(a,i,e,1,!0)[0],2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});check.assert(1===n.coverage.format,\"Single: unable to modify coverage table format \"+n.coverage.format);var r=t.sub,s=this.binSearch(n.coverage.glyphs,r);s<0&&(s=-1-s,n.coverage.glyphs.splice(s,0,r),n.substitute.splice(s,0,0)),n.substitute[s]=t.by},Substitution.prototype.addMultiple=function(e,t,a,i){check.assert(t.by instanceof Array&&t.by.length>1,'Multiple: \"by\" must be an array of two or more ids');var n=getSubstFormat(this.getLookupTables(a,i,e,2,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},sequences:[]});check.assert(1===n.coverage.format,\"Multiple: unable to modify coverage table format \"+n.coverage.format);var r=t.sub,s=this.binSearch(n.coverage.glyphs,r);s<0&&(s=-1-s,n.coverage.glyphs.splice(s,0,r),n.sequences.splice(s,0,0)),n.sequences[s]=t.by},Substitution.prototype.addAlternate=function(e,t,a,i){var n=getSubstFormat(this.getLookupTables(a,i,e,3,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});check.assert(1===n.coverage.format,\"Alternate: unable to modify coverage table format \"+n.coverage.format);var r=t.sub,s=this.binSearch(n.coverage.glyphs,r);s<0&&(s=-1-s,n.coverage.glyphs.splice(s,0,r),n.alternateSets.splice(s,0,0)),n.alternateSets[s]=t.by},Substitution.prototype.addLigature=function(e,t,a,i){var n=this.getLookupTables(a,i,e,4,!0)[0],r=n.subtables[0];r||(r={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},n.subtables[0]=r),check.assert(1===r.coverage.format,\"Ligature: unable to modify coverage table format \"+r.coverage.format);var s=t.sub[0],o=t.sub.slice(1),l={ligGlyph:t.by,components:o},c=this.binSearch(r.coverage.glyphs,s);if(c>=0){for(var d=r.ligatureSets[c],h=0;h<d.length;h++)if(arraysEqual(d[h].components,o))return;d.push(l)}else c=-1-c,r.coverage.glyphs.splice(c,0,s),r.ligatureSets.splice(c,0,[l])},Substitution.prototype.getFeature=function(e,t,a){if(/ss\\d\\d/.test(e))return this.getSingle(e,t,a);switch(e){case\"aalt\":case\"salt\":return this.getSingle(e,t,a).concat(this.getAlternates(e,t,a));case\"dlig\":case\"liga\":case\"rlig\":return this.getLigatures(e,t,a);case\"ccmp\":return this.getMultiple(e,t,a).concat(this.getLigatures(e,t,a));case\"stch\":return this.getMultiple(e,t,a)}},Substitution.prototype.add=function(e,t,a,i){if(/ss\\d\\d/.test(e))return this.addSingle(e,t,a,i);switch(e){case\"aalt\":case\"salt\":return\"number\"==typeof t.by?this.addSingle(e,t,a,i):this.addAlternate(e,t,a,i);case\"dlig\":case\"liga\":case\"rlig\":return this.addLigature(e,t,a,i);case\"ccmp\":return t.by instanceof Array?this.addMultiple(e,t,a,i):this.addLigature(e,t,a,i)}};var glyf={getPath:getPath,parse:parseGlyfTable},instructionTable,exec,execGlyph,execComponent;function Hinting(e){this.font=e,this.getCommands=function(e){return glyf.getPath(e).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function roundOff(e){return e}function roundToGrid(e){return Math.sign(e)*Math.round(Math.abs(e))}function roundToDoubleGrid(e){return Math.sign(e)*Math.round(Math.abs(2*e))/2}function roundToHalfGrid(e){return Math.sign(e)*(Math.round(Math.abs(e)+.5)-.5)}function roundUpToGrid(e){return Math.sign(e)*Math.ceil(Math.abs(e))}function roundDownToGrid(e){return Math.sign(e)*Math.floor(Math.abs(e))}var roundSuper=function(e){var t=this.srPeriod,a=this.srPhase,i=1;return e<0&&(e=-e,i=-1),e+=this.srThreshold-a,e=Math.trunc(e/t)*t,(e+=a)<0?a*i:e*i},xUnitVector={x:1,y:0,axis:\"x\",distance:function(e,t,a,i){return(a?e.xo:e.x)-(i?t.xo:t.x)},interpolate:function(e,t,a,i){var n,r,s,o,l,c,d;if(!i||i===this)return n=e.xo-t.xo,r=e.xo-a.xo,l=t.x-t.xo,c=a.x-a.xo,0===(d=(s=Math.abs(n))+(o=Math.abs(r)))?void(e.x=e.xo+(l+c)/2):void(e.x=e.xo+(l*o+c*s)/d);n=i.distance(e,t,!0,!0),r=i.distance(e,a,!0,!0),l=i.distance(t,t,!1,!0),c=i.distance(a,a,!1,!0),0!==(d=(s=Math.abs(n))+(o=Math.abs(r)))?xUnitVector.setRelative(e,e,(l*o+c*s)/d,i,!0):xUnitVector.setRelative(e,e,(l+c)/2,i,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(e,t,a,i,n){if(i&&i!==this){var r=n?t.xo:t.x,s=n?t.yo:t.y,o=r+a*i.x,l=s+a*i.y;e.x=o+(e.y-l)/i.normalSlope}else e.x=(n?t.xo:t.x)+a},slope:0,touch:function(e){e.xTouched=!0},touched:function(e){return e.xTouched},untouch:function(e){e.xTouched=!1}},yUnitVector={x:0,y:1,axis:\"y\",distance:function(e,t,a,i){return(a?e.yo:e.y)-(i?t.yo:t.y)},interpolate:function(e,t,a,i){var n,r,s,o,l,c,d;if(!i||i===this)return n=e.yo-t.yo,r=e.yo-a.yo,l=t.y-t.yo,c=a.y-a.yo,0===(d=(s=Math.abs(n))+(o=Math.abs(r)))?void(e.y=e.yo+(l+c)/2):void(e.y=e.yo+(l*o+c*s)/d);n=i.distance(e,t,!0,!0),r=i.distance(e,a,!0,!0),l=i.distance(t,t,!1,!0),c=i.distance(a,a,!1,!0),0!==(d=(s=Math.abs(n))+(o=Math.abs(r)))?yUnitVector.setRelative(e,e,(l*o+c*s)/d,i,!0):yUnitVector.setRelative(e,e,(l+c)/2,i,!0)},normalSlope:0,setRelative:function(e,t,a,i,n){if(i&&i!==this){var r=n?t.xo:t.x,s=n?t.yo:t.y,o=r+a*i.x,l=s+a*i.y;e.y=l+i.normalSlope*(e.x-o)}else e.y=(n?t.yo:t.y)+a},slope:Number.POSITIVE_INFINITY,touch:function(e){e.yTouched=!0},touched:function(e){return e.yTouched},untouch:function(e){e.yTouched=!1}};function UnitVector(e,t){this.x=e,this.y=t,this.axis=void 0,this.slope=t/e,this.normalSlope=-e/t,Object.freeze(this)}function getUnitVector(e,t){var a=Math.sqrt(e*e+t*t);return t/=a,1===(e/=a)&&0===t?xUnitVector:0===e&&1===t?yUnitVector:new UnitVector(e,t)}function HPoint(e,t,a,i){this.x=this.xo=Math.round(64*e)/64,this.y=this.yo=Math.round(64*t)/64,this.lastPointOfContour=a,this.onCurve=i,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Object.freeze(xUnitVector),Object.freeze(yUnitVector),UnitVector.prototype.distance=function(e,t,a,i){return this.x*xUnitVector.distance(e,t,a,i)+this.y*yUnitVector.distance(e,t,a,i)},UnitVector.prototype.interpolate=function(e,t,a,i){var n,r,s,o,l,c,d;s=i.distance(e,t,!0,!0),o=i.distance(e,a,!0,!0),n=i.distance(t,t,!1,!0),r=i.distance(a,a,!1,!0),0!==(d=(l=Math.abs(s))+(c=Math.abs(o)))?this.setRelative(e,e,(n*c+r*l)/d,i,!0):this.setRelative(e,e,(n+r)/2,i,!0)},UnitVector.prototype.setRelative=function(e,t,a,i,n){i=i||this;var r=n?t.xo:t.x,s=n?t.yo:t.y,o=r+a*i.x,l=s+a*i.y,c=i.normalSlope,d=this.slope,h=e.x,p=e.y;e.x=(d*h-c*o+l-p)/(d-c),e.y=d*(e.x-h)+p},UnitVector.prototype.touch=function(e){e.xTouched=!0,e.yTouched=!0},HPoint.prototype.nextTouched=function(e){for(var t=this.nextPointOnContour;!e.touched(t)&&t!==this;)t=t.nextPointOnContour;return t},HPoint.prototype.prevTouched=function(e){for(var t=this.prevPointOnContour;!e.touched(t)&&t!==this;)t=t.prevPointOnContour;return t};var HPZero=Object.freeze(new HPoint(0,0)),defaultState={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function State(e,t){switch(this.env=e,this.stack=[],this.prog=t,e){case\"glyf\":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case\"prep\":this.fv=this.pv=this.dpv=xUnitVector,this.round=roundToGrid}}function initTZone(e){for(var t=e.tZone=new Array(e.gZone.length),a=0;a<t.length;a++)t[a]=new HPoint(0,0)}function skip(e,t){var a,i=e.prog,n=e.ip,r=1;do{if(88===(a=i[++n]))r++;else if(89===a)r--;else if(64===a)n+=i[n+1]+1;else if(65===a)n+=2*i[n+1]+1;else if(a>=176&&a<=183)n+=a-176+1;else if(a>=184&&a<=191)n+=2*(a-184+1);else if(t&&1===r&&27===a)break}while(r>0);e.ip=n}function SVTCA(e,t){exports.DEBUG&&console.log(t.step,\"SVTCA[\"+e.axis+\"]\"),t.fv=t.pv=t.dpv=e}function SPVTCA(e,t){exports.DEBUG&&console.log(t.step,\"SPVTCA[\"+e.axis+\"]\"),t.pv=t.dpv=e}function SFVTCA(e,t){exports.DEBUG&&console.log(t.step,\"SFVTCA[\"+e.axis+\"]\"),t.fv=e}function SPVTL(e,t){var a,i,n=t.stack,r=n.pop(),s=n.pop(),o=t.z2[r],l=t.z1[s];exports.DEBUG&&console.log(\"SPVTL[\"+e+\"]\",r,s),e?(a=o.y-l.y,i=l.x-o.x):(a=l.x-o.x,i=l.y-o.y),t.pv=t.dpv=getUnitVector(a,i)}function SFVTL(e,t){var a,i,n=t.stack,r=n.pop(),s=n.pop(),o=t.z2[r],l=t.z1[s];exports.DEBUG&&console.log(\"SFVTL[\"+e+\"]\",r,s),e?(a=o.y-l.y,i=l.x-o.x):(a=l.x-o.x,i=l.y-o.y),t.fv=getUnitVector(a,i)}function SPVFS(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"SPVFS[]\",a,i),e.pv=e.dpv=getUnitVector(i,a)}function SFVFS(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"SPVFS[]\",a,i),e.fv=getUnitVector(i,a)}function GPV(e){var t=e.stack,a=e.pv;exports.DEBUG&&console.log(e.step,\"GPV[]\"),t.push(16384*a.x),t.push(16384*a.y)}function GFV(e){var t=e.stack,a=e.fv;exports.DEBUG&&console.log(e.step,\"GFV[]\"),t.push(16384*a.x),t.push(16384*a.y)}function SFVTPV(e){e.fv=e.pv,exports.DEBUG&&console.log(e.step,\"SFVTPV[]\")}function ISECT(e){var t=e.stack,a=t.pop(),i=t.pop(),n=t.pop(),r=t.pop(),s=t.pop(),o=e.z0,l=e.z1,c=o[a],d=o[i],h=l[n],p=l[r],u=e.z2[s];exports.DEBUG&&console.log(\"ISECT[], \",a,i,n,r,s);var m=c.x,g=c.y,f=d.x,b=d.y,U=h.x,E=h.y,w=p.x,y=p.y,v=(m-f)*(E-y)-(g-b)*(U-w),T=m*b-g*f,S=U*y-E*w;u.x=(T*(U-w)-S*(m-f))/v,u.y=(T*(E-y)-S*(g-b))/v}function SRP0(e){e.rp0=e.stack.pop(),exports.DEBUG&&console.log(e.step,\"SRP0[]\",e.rp0)}function SRP1(e){e.rp1=e.stack.pop(),exports.DEBUG&&console.log(e.step,\"SRP1[]\",e.rp1)}function SRP2(e){e.rp2=e.stack.pop(),exports.DEBUG&&console.log(e.step,\"SRP2[]\",e.rp2)}function SZP0(e){var t=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,\"SZP0[]\",t),e.zp0=t,t){case 0:e.tZone||initTZone(e),e.z0=e.tZone;break;case 1:e.z0=e.gZone;break;default:throw new Error(\"Invalid zone pointer\")}}function SZP1(e){var t=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,\"SZP1[]\",t),e.zp1=t,t){case 0:e.tZone||initTZone(e),e.z1=e.tZone;break;case 1:e.z1=e.gZone;break;default:throw new Error(\"Invalid zone pointer\")}}function SZP2(e){var t=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,\"SZP2[]\",t),e.zp2=t,t){case 0:e.tZone||initTZone(e),e.z2=e.tZone;break;case 1:e.z2=e.gZone;break;default:throw new Error(\"Invalid zone pointer\")}}function SZPS(e){var t=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,\"SZPS[]\",t),e.zp0=e.zp1=e.zp2=t,t){case 0:e.tZone||initTZone(e),e.z0=e.z1=e.z2=e.tZone;break;case 1:e.z0=e.z1=e.z2=e.gZone;break;default:throw new Error(\"Invalid zone pointer\")}}function SLOOP(e){e.loop=e.stack.pop(),exports.DEBUG&&console.log(e.step,\"SLOOP[]\",e.loop)}function RTG(e){exports.DEBUG&&console.log(e.step,\"RTG[]\"),e.round=roundToGrid}function RTHG(e){exports.DEBUG&&console.log(e.step,\"RTHG[]\"),e.round=roundToHalfGrid}function SMD(e){var t=e.stack.pop();exports.DEBUG&&console.log(e.step,\"SMD[]\",t),e.minDis=t/64}function ELSE(e){exports.DEBUG&&console.log(e.step,\"ELSE[]\"),skip(e,!1)}function JMPR(e){var t=e.stack.pop();exports.DEBUG&&console.log(e.step,\"JMPR[]\",t),e.ip+=t-1}function SCVTCI(e){var t=e.stack.pop();exports.DEBUG&&console.log(e.step,\"SCVTCI[]\",t),e.cvCutIn=t/64}function DUP(e){var t=e.stack;exports.DEBUG&&console.log(e.step,\"DUP[]\"),t.push(t[t.length-1])}function POP(e){exports.DEBUG&&console.log(e.step,\"POP[]\"),e.stack.pop()}function CLEAR(e){exports.DEBUG&&console.log(e.step,\"CLEAR[]\"),e.stack.length=0}function SWAP(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"SWAP[]\"),t.push(a),t.push(i)}function DEPTH(e){var t=e.stack;exports.DEBUG&&console.log(e.step,\"DEPTH[]\"),t.push(t.length)}function LOOPCALL(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"LOOPCALL[]\",a,i);var n=e.ip,r=e.prog;e.prog=e.funcs[a];for(var s=0;s<i;s++)exec(e),exports.DEBUG&&console.log(++e.step,s+1<i?\"next loopcall\":\"done loopcall\",s);e.ip=n,e.prog=r}function CALL(e){var t=e.stack.pop();exports.DEBUG&&console.log(e.step,\"CALL[]\",t);var a=e.ip,i=e.prog;e.prog=e.funcs[t],exec(e),e.ip=a,e.prog=i,exports.DEBUG&&console.log(++e.step,\"returning from\",t)}function CINDEX(e){var t=e.stack,a=t.pop();exports.DEBUG&&console.log(e.step,\"CINDEX[]\",a),t.push(t[t.length-a])}function MINDEX(e){var t=e.stack,a=t.pop();exports.DEBUG&&console.log(e.step,\"MINDEX[]\",a),t.push(t.splice(t.length-a,1)[0])}function FDEF(e){if(\"fpgm\"!==e.env)throw new Error(\"FDEF not allowed here\");var t=e.stack,a=e.prog,i=e.ip,n=t.pop(),r=i;for(exports.DEBUG&&console.log(e.step,\"FDEF[]\",n);45!==a[++i];);e.ip=i,e.funcs[n]=a.slice(r+1,i)}function MDAP(e,t){var a=t.stack.pop(),i=t.z0[a],n=t.fv,r=t.pv;exports.DEBUG&&console.log(t.step,\"MDAP[\"+e+\"]\",a);var s=r.distance(i,HPZero);e&&(s=t.round(s)),n.setRelative(i,HPZero,s,r),n.touch(i),t.rp0=t.rp1=a}function IUP(e,t){var a,i,n,r=t.z2,s=r.length-2;exports.DEBUG&&console.log(t.step,\"IUP[\"+e.axis+\"]\");for(var o=0;o<s;o++)a=r[o],e.touched(a)||(i=a.prevTouched(e))!==a&&(i===(n=a.nextTouched(e))&&e.setRelative(a,a,e.distance(i,i,!1,!0),e,!0),e.interpolate(a,i,n,e))}function SHP(e,t){for(var a=t.stack,i=e?t.rp1:t.rp2,n=(e?t.z0:t.z1)[i],r=t.fv,s=t.pv,o=t.loop,l=t.z2;o--;){var c=a.pop(),d=l[c],h=s.distance(n,n,!1,!0);r.setRelative(d,d,h,s),r.touch(d),exports.DEBUG&&console.log(t.step,(t.loop>1?\"loop \"+(t.loop-o)+\": \":\"\")+\"SHP[\"+(e?\"rp1\":\"rp2\")+\"]\",c)}t.loop=1}function SHC(e,t){var a=t.stack,i=e?t.rp1:t.rp2,n=(e?t.z0:t.z1)[i],r=t.fv,s=t.pv,o=a.pop(),l=t.z2[t.contours[o]],c=l;exports.DEBUG&&console.log(t.step,\"SHC[\"+e+\"]\",o);var d=s.distance(n,n,!1,!0);do{c!==n&&r.setRelative(c,c,d,s),c=c.nextPointOnContour}while(c!==l)}function SHZ(e,t){var a,i,n=t.stack,r=e?t.rp1:t.rp2,s=(e?t.z0:t.z1)[r],o=t.fv,l=t.pv,c=n.pop();switch(exports.DEBUG&&console.log(t.step,\"SHZ[\"+e+\"]\",c),c){case 0:a=t.tZone;break;case 1:a=t.gZone;break;default:throw new Error(\"Invalid zone\")}for(var d=l.distance(s,s,!1,!0),h=a.length-2,p=0;p<h;p++)i=a[p],o.setRelative(i,i,d,l)}function SHPIX(e){for(var t=e.stack,a=e.loop,i=e.fv,n=t.pop()/64,r=e.z2;a--;){var s=t.pop(),o=r[s];exports.DEBUG&&console.log(e.step,(e.loop>1?\"loop \"+(e.loop-a)+\": \":\"\")+\"SHPIX[]\",s,n),i.setRelative(o,o,n),i.touch(o)}e.loop=1}function IP(e){for(var t=e.stack,a=e.rp1,i=e.rp2,n=e.loop,r=e.z0[a],s=e.z1[i],o=e.fv,l=e.dpv,c=e.z2;n--;){var d=t.pop(),h=c[d];exports.DEBUG&&console.log(e.step,(e.loop>1?\"loop \"+(e.loop-n)+\": \":\"\")+\"IP[]\",d,a,\"<->\",i),o.interpolate(h,r,s,l),o.touch(h)}e.loop=1}function MSIRP(e,t){var a=t.stack,i=a.pop()/64,n=a.pop(),r=t.z1[n],s=t.z0[t.rp0],o=t.fv,l=t.pv;o.setRelative(r,s,i,l),o.touch(r),exports.DEBUG&&console.log(t.step,\"MSIRP[\"+e+\"]\",i,n),t.rp1=t.rp0,t.rp2=n,e&&(t.rp0=n)}function ALIGNRP(e){for(var t=e.stack,a=e.rp0,i=e.z0[a],n=e.loop,r=e.fv,s=e.pv,o=e.z1;n--;){var l=t.pop(),c=o[l];exports.DEBUG&&console.log(e.step,(e.loop>1?\"loop \"+(e.loop-n)+\": \":\"\")+\"ALIGNRP[]\",l),r.setRelative(c,i,0,s),r.touch(c)}e.loop=1}function RTDG(e){exports.DEBUG&&console.log(e.step,\"RTDG[]\"),e.round=roundToDoubleGrid}function MIAP(e,t){var a=t.stack,i=a.pop(),n=a.pop(),r=t.z0[n],s=t.fv,o=t.pv,l=t.cvt[i];exports.DEBUG&&console.log(t.step,\"MIAP[\"+e+\"]\",i,\"(\",l,\")\",n);var c=o.distance(r,HPZero);e&&(Math.abs(c-l)<t.cvCutIn&&(c=l),c=t.round(c)),s.setRelative(r,HPZero,c,o),0===t.zp0&&(r.xo=r.x,r.yo=r.y),s.touch(r),t.rp0=t.rp1=n}function NPUSHB(e){var t=e.prog,a=e.ip,i=e.stack,n=t[++a];exports.DEBUG&&console.log(e.step,\"NPUSHB[]\",n);for(var r=0;r<n;r++)i.push(t[++a]);e.ip=a}function NPUSHW(e){var t=e.ip,a=e.prog,i=e.stack,n=a[++t];exports.DEBUG&&console.log(e.step,\"NPUSHW[]\",n);for(var r=0;r<n;r++){var s=a[++t]<<8|a[++t];32768&s&&(s=-(1+(65535^s))),i.push(s)}e.ip=t}function WS(e){var t=e.stack,a=e.store;a||(a=e.store=[]);var i=t.pop(),n=t.pop();exports.DEBUG&&console.log(e.step,\"WS\",i,n),a[n]=i}function RS(e){var t=e.stack,a=e.store,i=t.pop();exports.DEBUG&&console.log(e.step,\"RS\",i);var n=a&&a[i]||0;t.push(n)}function WCVTP(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"WCVTP\",a,i),e.cvt[i]=a/64}function RCVT(e){var t=e.stack,a=t.pop();exports.DEBUG&&console.log(e.step,\"RCVT\",a),t.push(64*e.cvt[a])}function GC(e,t){var a=t.stack,i=a.pop(),n=t.z2[i];exports.DEBUG&&console.log(t.step,\"GC[\"+e+\"]\",i),a.push(64*t.dpv.distance(n,HPZero,e,!1))}function MD(e,t){var a=t.stack,i=a.pop(),n=a.pop(),r=t.z1[i],s=t.z0[n],o=t.dpv.distance(s,r,e,e);exports.DEBUG&&console.log(t.step,\"MD[\"+e+\"]\",i,n,\"->\",o),t.stack.push(Math.round(64*o))}function MPPEM(e){exports.DEBUG&&console.log(e.step,\"MPPEM[]\"),e.stack.push(e.ppem)}function FLIPON(e){exports.DEBUG&&console.log(e.step,\"FLIPON[]\"),e.autoFlip=!0}function LT(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"LT[]\",a,i),t.push(i<a?1:0)}function LTEQ(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"LTEQ[]\",a,i),t.push(i<=a?1:0)}function GT(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"GT[]\",a,i),t.push(i>a?1:0)}function GTEQ(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"GTEQ[]\",a,i),t.push(i>=a?1:0)}function EQ(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"EQ[]\",a,i),t.push(a===i?1:0)}function NEQ(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"NEQ[]\",a,i),t.push(a!==i?1:0)}function ODD(e){var t=e.stack,a=t.pop();exports.DEBUG&&console.log(e.step,\"ODD[]\",a),t.push(Math.trunc(a)%2?1:0)}function EVEN(e){var t=e.stack,a=t.pop();exports.DEBUG&&console.log(e.step,\"EVEN[]\",a),t.push(Math.trunc(a)%2?0:1)}function IF(e){var t=e.stack.pop();exports.DEBUG&&console.log(e.step,\"IF[]\",t),t||(skip(e,!0),exports.DEBUG&&console.log(e.step,\"EIF[]\"))}function EIF(e){exports.DEBUG&&console.log(e.step,\"EIF[]\")}function AND(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"AND[]\",a,i),t.push(a&&i?1:0)}function OR(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"OR[]\",a,i),t.push(a||i?1:0)}function NOT(e){var t=e.stack,a=t.pop();exports.DEBUG&&console.log(e.step,\"NOT[]\",a),t.push(a?0:1)}function DELTAP123(e,t){var a=t.stack,i=a.pop(),n=t.fv,r=t.pv,s=t.ppem,o=t.deltaBase+16*(e-1),l=t.deltaShift,c=t.z0;exports.DEBUG&&console.log(t.step,\"DELTAP[\"+e+\"]\",i,a);for(var d=0;d<i;d++){var h=a.pop(),p=a.pop();if(o+((240&p)>>4)===s){var u=(15&p)-8;u>=0&&u++,exports.DEBUG&&console.log(t.step,\"DELTAPFIX\",h,\"by\",u*l);var m=c[h];n.setRelative(m,m,u*l,r)}}}function SDB(e){var t=e.stack.pop();exports.DEBUG&&console.log(e.step,\"SDB[]\",t),e.deltaBase=t}function SDS(e){var t=e.stack.pop();exports.DEBUG&&console.log(e.step,\"SDS[]\",t),e.deltaShift=Math.pow(.5,t)}function ADD(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"ADD[]\",a,i),t.push(i+a)}function SUB(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"SUB[]\",a,i),t.push(i-a)}function DIV(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"DIV[]\",a,i),t.push(64*i/a)}function MUL(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"MUL[]\",a,i),t.push(i*a/64)}function ABS(e){var t=e.stack,a=t.pop();exports.DEBUG&&console.log(e.step,\"ABS[]\",a),t.push(Math.abs(a))}function NEG(e){var t=e.stack,a=t.pop();exports.DEBUG&&console.log(e.step,\"NEG[]\",a),t.push(-a)}function FLOOR(e){var t=e.stack,a=t.pop();exports.DEBUG&&console.log(e.step,\"FLOOR[]\",a),t.push(64*Math.floor(a/64))}function CEILING(e){var t=e.stack,a=t.pop();exports.DEBUG&&console.log(e.step,\"CEILING[]\",a),t.push(64*Math.ceil(a/64))}function ROUND(e,t){var a=t.stack,i=a.pop();exports.DEBUG&&console.log(t.step,\"ROUND[]\"),a.push(64*t.round(i/64))}function WCVTF(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"WCVTF[]\",a,i),e.cvt[i]=a*e.ppem/e.font.unitsPerEm}function DELTAC123(e,t){var a=t.stack,i=a.pop(),n=t.ppem,r=t.deltaBase+16*(e-1),s=t.deltaShift;exports.DEBUG&&console.log(t.step,\"DELTAC[\"+e+\"]\",i,a);for(var o=0;o<i;o++){var l=a.pop(),c=a.pop();if(r+((240&c)>>4)===n){var d=(15&c)-8;d>=0&&d++;var h=d*s;exports.DEBUG&&console.log(t.step,\"DELTACFIX\",l,\"by\",h),t.cvt[l]+=h}}}function SROUND(e){var t,a=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,\"SROUND[]\",a),e.round=roundSuper,192&a){case 0:t=.5;break;case 64:t=1;break;case 128:t=2;break;default:throw new Error(\"invalid SROUND value\")}switch(e.srPeriod=t,48&a){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error(\"invalid SROUND value\")}a&=15,e.srThreshold=0===a?0:(a/8-.5)*t}function S45ROUND(e){var t,a=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,\"S45ROUND[]\",a),e.round=roundSuper,192&a){case 0:t=Math.sqrt(2)/2;break;case 64:t=Math.sqrt(2);break;case 128:t=2*Math.sqrt(2);break;default:throw new Error(\"invalid S45ROUND value\")}switch(e.srPeriod=t,48&a){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error(\"invalid S45ROUND value\")}a&=15,e.srThreshold=0===a?0:(a/8-.5)*t}function ROFF(e){exports.DEBUG&&console.log(e.step,\"ROFF[]\"),e.round=roundOff}function RUTG(e){exports.DEBUG&&console.log(e.step,\"RUTG[]\"),e.round=roundUpToGrid}function RDTG(e){exports.DEBUG&&console.log(e.step,\"RDTG[]\"),e.round=roundDownToGrid}function SCANCTRL(e){var t=e.stack.pop();exports.DEBUG&&console.log(e.step,\"SCANCTRL[]\",t)}function SDPVTL(e,t){var a,i,n=t.stack,r=n.pop(),s=n.pop(),o=t.z2[r],l=t.z1[s];exports.DEBUG&&console.log(t.step,\"SDPVTL[\"+e+\"]\",r,s),e?(a=o.y-l.y,i=l.x-o.x):(a=l.x-o.x,i=l.y-o.y),t.dpv=getUnitVector(a,i)}function GETINFO(e){var t=e.stack,a=t.pop(),i=0;exports.DEBUG&&console.log(e.step,\"GETINFO[]\",a),1&a&&(i=35),32&a&&(i|=4096),t.push(i)}function ROLL(e){var t=e.stack,a=t.pop(),i=t.pop(),n=t.pop();exports.DEBUG&&console.log(e.step,\"ROLL[]\"),t.push(i),t.push(a),t.push(n)}function MAX(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"MAX[]\",a,i),t.push(Math.max(i,a))}function MIN(e){var t=e.stack,a=t.pop(),i=t.pop();exports.DEBUG&&console.log(e.step,\"MIN[]\",a,i),t.push(Math.min(i,a))}function SCANTYPE(e){var t=e.stack.pop();exports.DEBUG&&console.log(e.step,\"SCANTYPE[]\",t)}function INSTCTRL(e){var t=e.stack.pop(),a=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,\"INSTCTRL[]\",t,a),t){case 1:return void(e.inhibitGridFit=!!a);case 2:return void(e.ignoreCvt=!!a);default:throw new Error(\"invalid INSTCTRL[] selector\")}}function PUSHB(e,t){var a=t.stack,i=t.prog,n=t.ip;exports.DEBUG&&console.log(t.step,\"PUSHB[\"+e+\"]\");for(var r=0;r<e;r++)a.push(i[++n]);t.ip=n}function PUSHW(e,t){var a=t.ip,i=t.prog,n=t.stack;exports.DEBUG&&console.log(t.ip,\"PUSHW[\"+e+\"]\");for(var r=0;r<e;r++){var s=i[++a]<<8|i[++a];32768&s&&(s=-(1+(65535^s))),n.push(s)}t.ip=a}function MDRP_MIRP(e,t,a,i,n,r){var s,o,l,c,d=r.stack,h=e&&d.pop(),p=d.pop(),u=r.rp0,m=r.z0[u],g=r.z1[p],f=r.minDis,b=r.fv,U=r.dpv;l=(o=s=U.distance(g,m,!0,!0))>=0?1:-1,o=Math.abs(o),e&&(c=r.cvt[h],i&&Math.abs(o-c)<r.cvCutIn&&(o=c)),a&&o<f&&(o=f),i&&(o=r.round(o)),b.setRelative(g,m,l*o,U),b.touch(g),exports.DEBUG&&console.log(r.step,(e?\"MIRP[\":\"MDRP[\")+(t?\"M\":\"m\")+(a?\">\":\"_\")+(i?\"R\":\"_\")+(0===n?\"Gr\":1===n?\"Bl\":2===n?\"Wh\":\"\")+\"]\",e?h+\"(\"+r.cvt[h]+\",\"+c+\")\":\"\",p,\"(d =\",s,\"->\",l*o,\")\"),r.rp1=r.rp0,r.rp2=p,t&&(r.rp0=p)}function Token(e){this.char=e,this.state={},this.activeState=null}function ContextRange(e,t,a){this.contextName=a,this.startIndex=e,this.endOffset=t}function ContextChecker(e,t,a){this.contextName=e,this.openRange=null,this.ranges=[],this.checkStart=t,this.checkEnd=a}function ContextParams(e,t){this.context=e,this.index=t,this.length=e.length,this.current=e[t],this.backtrack=e.slice(0,t),this.lookahead=e.slice(t+1)}function Event$1(e){this.eventId=e,this.subscribers=[]}function initializeCoreEvents(e){var t=this,a=[\"start\",\"end\",\"next\",\"newToken\",\"contextStart\",\"contextEnd\",\"insertToken\",\"removeToken\",\"removeRange\",\"replaceToken\",\"replaceRange\",\"composeRUD\",\"updateContextsRanges\"];a.forEach((function(e){Object.defineProperty(t.events,e,{value:new Event$1(e)})})),e&&a.forEach((function(a){var i=e[a];\"function\"==typeof i&&t.events[a].subscribe(i)})),[\"insertToken\",\"removeToken\",\"removeRange\",\"replaceToken\",\"replaceRange\",\"composeRUD\"].forEach((function(e){t.events[e].subscribe(t.updateContextsRanges)}))}function Tokenizer(e){this.tokens=[],this.registeredContexts={},this.contextCheckers=[],this.events={},this.registeredModifiers=[],initializeCoreEvents.call(this,e)}function isArabicChar(e){return/[\\u0600-\\u065F\\u066A-\\u06D2\\u06FA-\\u06FF]/.test(e)}function isIsolatedArabicChar(e){return/[\\u0630\\u0690\\u0621\\u0631\\u0661\\u0671\\u0622\\u0632\\u0672\\u0692\\u06C2\\u0623\\u0673\\u0693\\u06C3\\u0624\\u0694\\u06C4\\u0625\\u0675\\u0695\\u06C5\\u06E5\\u0676\\u0696\\u06C6\\u0627\\u0677\\u0697\\u06C7\\u0648\\u0688\\u0698\\u06C8\\u0689\\u0699\\u06C9\\u068A\\u06CA\\u066B\\u068B\\u06CB\\u068C\\u068D\\u06CD\\u06FD\\u068E\\u06EE\\u06FE\\u062F\\u068F\\u06CF\\u06EF]/.test(e)}function isTashkeelArabicChar(e){return/[\\u0600-\\u0605\\u060C-\\u060E\\u0610-\\u061B\\u061E\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED]/.test(e)}function isLatinChar(e){return/[A-z]/.test(e)}function isWhiteSpace(e){return/\\s/.test(e)}function FeatureQuery(e){this.font=e,this.features={}}function SubstitutionAction(e){this.id=e.id,this.tag=e.tag,this.substitution=e.substitution}function lookupCoverage(e,t){if(!e)return-1;switch(t.format){case 1:return t.glyphs.indexOf(e);case 2:for(var a=t.ranges,i=0;i<a.length;i++){var n=a[i];if(e>=n.start&&e<=n.end){var r=e-n.start;return n.index+r}}break;default:return-1}return-1}function singleSubstitutionFormat1(e,t){return-1===lookupCoverage(e,t.coverage)?null:e+t.deltaGlyphId}function singleSubstitutionFormat2(e,t){var a=lookupCoverage(e,t.coverage);return-1===a?null:t.substitute[a]}function lookupCoverageList(e,t){for(var a=[],i=0;i<e.length;i++){var n=e[i],r=t.current,s=lookupCoverage(r=Array.isArray(r)?r[0]:r,n);-1!==s&&a.push(s)}return a.length!==e.length?-1:a}function chainingSubstitutionFormat3(e,t){var a=t.inputCoverage.length+t.lookaheadCoverage.length+t.backtrackCoverage.length;if(e.context.length<a)return[];var i=lookupCoverageList(t.inputCoverage,e);if(-1===i)return[];var n=t.inputCoverage.length-1;if(e.lookahead.length<t.lookaheadCoverage.length)return[];for(var r=e.lookahead.slice(n);r.length&&isTashkeelArabicChar(r[0].char);)r.shift();var s=new ContextParams(r,0),o=lookupCoverageList(t.lookaheadCoverage,s),l=[].concat(e.backtrack);for(l.reverse();l.length&&isTashkeelArabicChar(l[0].char);)l.shift();if(l.length<t.backtrackCoverage.length)return[];var c=new ContextParams(l,0),d=lookupCoverageList(t.backtrackCoverage,c),h=[];if(i.length===t.inputCoverage.length&&o.length===t.lookaheadCoverage.length&&d.length===t.backtrackCoverage.length)for(var p=0;p<t.lookupRecords.length;p++)for(var u=t.lookupRecords[p].lookupListIndex,m=this.getLookupByIndex(u),g=0;g<m.subtables.length;g++){var f=m.subtables[g],b=this.getLookupMethod(m,f);if(\"12\"===this.getSubstitutionType(m,f))for(var U=0;U<i.length;U++){var E=b(e.get(U));E&&h.push(E)}}return h}function ligatureSubstitutionFormat1(e,t){var a,i=lookupCoverage(e.current,t.coverage);if(-1===i)return null;for(var n=t.ligatureSets[i],r=0;r<n.length;r++){a=n[r];for(var s=0;s<a.components.length&&e.lookahead[s]===a.components[s];s++)if(s===a.components.length-1)return a}return null}function decompositionSubstitutionFormat1(e,t){var a=lookupCoverage(e,t.coverage);return-1===a?null:t.sequences[a]}function arabicWordStartCheck(e){var t=e.current,a=e.get(-1);return null===a&&isArabicChar(t)||!isArabicChar(a)&&isArabicChar(t)}function arabicWordEndCheck(e){var t=e.get(1);return null===t||!isArabicChar(t)}Hinting.prototype.exec=function(e,t){if(\"number\"!=typeof t)throw new Error(\"Point size is not a number!\");if(!(this._errorState>2)){var a=this.font,i=this._prepState;if(!i||i.ppem!==t){var n=this._fpgmState;if(!n){State.prototype=defaultState,(n=this._fpgmState=new State(\"fpgm\",a.tables.fpgm)).funcs=[],n.font=a,exports.DEBUG&&(console.log(\"---EXEC FPGM---\"),n.step=-1);try{exec(n)}catch(e){return console.log(\"Hinting error in FPGM:\"+e),void(this._errorState=3)}}State.prototype=n,(i=this._prepState=new State(\"prep\",a.tables.prep)).ppem=t;var r=a.tables.cvt;if(r)for(var s=i.cvt=new Array(r.length),o=t/a.unitsPerEm,l=0;l<r.length;l++)s[l]=r[l]*o;else i.cvt=[];exports.DEBUG&&(console.log(\"---EXEC PREP---\"),i.step=-1);try{exec(i)}catch(e){this._errorState<2&&console.log(\"Hinting error in PREP:\"+e),this._errorState=2}}if(!(this._errorState>1))try{return execGlyph(e,i)}catch(e){return this._errorState<1&&(console.log(\"Hinting error:\"+e),console.log(\"Note: further hinting errors are silenced\")),void(this._errorState=1)}}},execGlyph=function(e,t){var a,i,n,r=t.ppem/t.font.unitsPerEm,s=r,o=e.components;if(State.prototype=t,o){var l=t.font;i=[],a=[];for(var c=0;c<o.length;c++){var d=o[c],h=l.glyphs.get(d.glyphIndex);n=new State(\"glyf\",h.instructions),exports.DEBUG&&(console.log(\"---EXEC COMP \"+c+\"---\"),n.step=-1),execComponent(h,n,r,s);for(var p=Math.round(d.dx*r),u=Math.round(d.dy*s),m=n.gZone,g=n.contours,f=0;f<m.length;f++){var b=m[f];b.xTouched=b.yTouched=!1,b.xo=b.x=b.x+p,b.yo=b.y=b.y+u}var U=i.length;i.push.apply(i,m);for(var E=0;E<g.length;E++)a.push(g[E]+U)}e.instructions&&!n.inhibitGridFit&&((n=new State(\"glyf\",e.instructions)).gZone=n.z0=n.z1=n.z2=i,n.contours=a,i.push(new HPoint(0,0),new HPoint(Math.round(e.advanceWidth*r),0)),exports.DEBUG&&(console.log(\"---EXEC COMPOSITE---\"),n.step=-1),exec(n),i.length-=2)}else n=new State(\"glyf\",e.instructions),exports.DEBUG&&(console.log(\"---EXEC GLYPH---\"),n.step=-1),execComponent(e,n,r,s),i=n.gZone;return i},execComponent=function(e,t,a,i){for(var n,r,s,o=e.points||[],l=o.length,c=t.gZone=t.z0=t.z1=t.z2=[],d=t.contours=[],h=0;h<l;h++)n=o[h],c[h]=new HPoint(n.x*a,n.y*i,n.lastPointOfContour,n.onCurve);for(var p=0;p<l;p++)n=c[p],r||(r=n,d.push(p)),n.lastPointOfContour?(n.nextPointOnContour=r,r.prevPointOnContour=n,r=void 0):(s=c[p+1],n.nextPointOnContour=s,s.prevPointOnContour=n);if(!t.inhibitGridFit){if(exports.DEBUG){console.log(\"PROCESSING GLYPH\",t.stack);for(var u=0;u<l;u++)console.log(u,c[u].x,c[u].y)}if(c.push(new HPoint(0,0),new HPoint(Math.round(e.advanceWidth*a),0)),exec(t),c.length-=2,exports.DEBUG){console.log(\"FINISHED GLYPH\",t.stack);for(var m=0;m<l;m++)console.log(m,c[m].x,c[m].y)}}},exec=function(e){var t=e.prog;if(t){var a,i=t.length;for(e.ip=0;e.ip<i;e.ip++){if(exports.DEBUG&&e.step++,!(a=instructionTable[t[e.ip]]))throw new Error(\"unknown instruction: 0x\"+Number(t[e.ip]).toString(16));a(e)}}},instructionTable=[SVTCA.bind(void 0,yUnitVector),SVTCA.bind(void 0,xUnitVector),SPVTCA.bind(void 0,yUnitVector),SPVTCA.bind(void 0,xUnitVector),SFVTCA.bind(void 0,yUnitVector),SFVTCA.bind(void 0,xUnitVector),SPVTL.bind(void 0,0),SPVTL.bind(void 0,1),SFVTL.bind(void 0,0),SFVTL.bind(void 0,1),SPVFS,SFVFS,GPV,GFV,SFVTPV,ISECT,SRP0,SRP1,SRP2,SZP0,SZP1,SZP2,SZPS,SLOOP,RTG,RTHG,SMD,ELSE,JMPR,SCVTCI,void 0,void 0,DUP,POP,CLEAR,SWAP,DEPTH,CINDEX,MINDEX,void 0,void 0,void 0,LOOPCALL,CALL,FDEF,void 0,MDAP.bind(void 0,0),MDAP.bind(void 0,1),IUP.bind(void 0,yUnitVector),IUP.bind(void 0,xUnitVector),SHP.bind(void 0,0),SHP.bind(void 0,1),SHC.bind(void 0,0),SHC.bind(void 0,1),SHZ.bind(void 0,0),SHZ.bind(void 0,1),SHPIX,IP,MSIRP.bind(void 0,0),MSIRP.bind(void 0,1),ALIGNRP,RTDG,MIAP.bind(void 0,0),MIAP.bind(void 0,1),NPUSHB,NPUSHW,WS,RS,WCVTP,RCVT,GC.bind(void 0,0),GC.bind(void 0,1),void 0,MD.bind(void 0,0),MD.bind(void 0,1),MPPEM,void 0,FLIPON,void 0,void 0,LT,LTEQ,GT,GTEQ,EQ,NEQ,ODD,EVEN,IF,EIF,AND,OR,NOT,DELTAP123.bind(void 0,1),SDB,SDS,ADD,SUB,DIV,MUL,ABS,NEG,FLOOR,CEILING,ROUND.bind(void 0,0),ROUND.bind(void 0,1),ROUND.bind(void 0,2),ROUND.bind(void 0,3),void 0,void 0,void 0,void 0,WCVTF,DELTAP123.bind(void 0,2),DELTAP123.bind(void 0,3),DELTAC123.bind(void 0,1),DELTAC123.bind(void 0,2),DELTAC123.bind(void 0,3),SROUND,S45ROUND,void 0,void 0,ROFF,void 0,RUTG,RDTG,POP,POP,void 0,void 0,void 0,void 0,void 0,SCANCTRL,SDPVTL.bind(void 0,0),SDPVTL.bind(void 0,1),GETINFO,void 0,ROLL,MAX,MIN,SCANTYPE,INSTCTRL,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,PUSHB.bind(void 0,1),PUSHB.bind(void 0,2),PUSHB.bind(void 0,3),PUSHB.bind(void 0,4),PUSHB.bind(void 0,5),PUSHB.bind(void 0,6),PUSHB.bind(void 0,7),PUSHB.bind(void 0,8),PUSHW.bind(void 0,1),PUSHW.bind(void 0,2),PUSHW.bind(void 0,3),PUSHW.bind(void 0,4),PUSHW.bind(void 0,5),PUSHW.bind(void 0,6),PUSHW.bind(void 0,7),PUSHW.bind(void 0,8),MDRP_MIRP.bind(void 0,0,0,0,0,0),MDRP_MIRP.bind(void 0,0,0,0,0,1),MDRP_MIRP.bind(void 0,0,0,0,0,2),MDRP_MIRP.bind(void 0,0,0,0,0,3),MDRP_MIRP.bind(void 0,0,0,0,1,0),MDRP_MIRP.bind(void 0,0,0,0,1,1),MDRP_MIRP.bind(void 0,0,0,0,1,2),MDRP_MIRP.bind(void 0,0,0,0,1,3),MDRP_MIRP.bind(void 0,0,0,1,0,0),MDRP_MIRP.bind(void 0,0,0,1,0,1),MDRP_MIRP.bind(void 0,0,0,1,0,2),MDRP_MIRP.bind(void 0,0,0,1,0,3),MDRP_MIRP.bind(void 0,0,0,1,1,0),MDRP_MIRP.bind(void 0,0,0,1,1,1),MDRP_MIRP.bind(void 0,0,0,1,1,2),MDRP_MIRP.bind(void 0,0,0,1,1,3),MDRP_MIRP.bind(void 0,0,1,0,0,0),MDRP_MIRP.bind(void 0,0,1,0,0,1),MDRP_MIRP.bind(void 0,0,1,0,0,2),MDRP_MIRP.bind(void 0,0,1,0,0,3),MDRP_MIRP.bind(void 0,0,1,0,1,0),MDRP_MIRP.bind(void 0,0,1,0,1,1),MDRP_MIRP.bind(void 0,0,1,0,1,2),MDRP_MIRP.bind(void 0,0,1,0,1,3),MDRP_MIRP.bind(void 0,0,1,1,0,0),MDRP_MIRP.bind(void 0,0,1,1,0,1),MDRP_MIRP.bind(void 0,0,1,1,0,2),MDRP_MIRP.bind(void 0,0,1,1,0,3),MDRP_MIRP.bind(void 0,0,1,1,1,0),MDRP_MIRP.bind(void 0,0,1,1,1,1),MDRP_MIRP.bind(void 0,0,1,1,1,2),MDRP_MIRP.bind(void 0,0,1,1,1,3),MDRP_MIRP.bind(void 0,1,0,0,0,0),MDRP_MIRP.bind(void 0,1,0,0,0,1),MDRP_MIRP.bind(void 0,1,0,0,0,2),MDRP_MIRP.bind(void 0,1,0,0,0,3),MDRP_MIRP.bind(void 0,1,0,0,1,0),MDRP_MIRP.bind(void 0,1,0,0,1,1),MDRP_MIRP.bind(void 0,1,0,0,1,2),MDRP_MIRP.bind(void 0,1,0,0,1,3),MDRP_MIRP.bind(void 0,1,0,1,0,0),MDRP_MIRP.bind(void 0,1,0,1,0,1),MDRP_MIRP.bind(void 0,1,0,1,0,2),MDRP_MIRP.bind(void 0,1,0,1,0,3),MDRP_MIRP.bind(void 0,1,0,1,1,0),MDRP_MIRP.bind(void 0,1,0,1,1,1),MDRP_MIRP.bind(void 0,1,0,1,1,2),MDRP_MIRP.bind(void 0,1,0,1,1,3),MDRP_MIRP.bind(void 0,1,1,0,0,0),MDRP_MIRP.bind(void 0,1,1,0,0,1),MDRP_MIRP.bind(void 0,1,1,0,0,2),MDRP_MIRP.bind(void 0,1,1,0,0,3),MDRP_MIRP.bind(void 0,1,1,0,1,0),MDRP_MIRP.bind(void 0,1,1,0,1,1),MDRP_MIRP.bind(void 0,1,1,0,1,2),MDRP_MIRP.bind(void 0,1,1,0,1,3),MDRP_MIRP.bind(void 0,1,1,1,0,0),MDRP_MIRP.bind(void 0,1,1,1,0,1),MDRP_MIRP.bind(void 0,1,1,1,0,2),MDRP_MIRP.bind(void 0,1,1,1,0,3),MDRP_MIRP.bind(void 0,1,1,1,1,0),MDRP_MIRP.bind(void 0,1,1,1,1,1),MDRP_MIRP.bind(void 0,1,1,1,1,2),MDRP_MIRP.bind(void 0,1,1,1,1,3)],Token.prototype.setState=function(e,t){return this.state[e]=t,this.activeState={key:e,value:this.state[e]},this.activeState},Token.prototype.getState=function(e){return this.state[e]||null},Tokenizer.prototype.inboundIndex=function(e){return e>=0&&e<this.tokens.length},Tokenizer.prototype.composeRUD=function(e){var t=this,a=e.map((function(e){return t[e[0]].apply(t,e.slice(1).concat(!0))})),i=function(e){return\"object\"==typeof e&&e.hasOwnProperty(\"FAIL\")};if(a.every(i))return{FAIL:\"composeRUD: one or more operations hasn't completed successfully\",report:a.filter(i)};this.dispatch(\"composeRUD\",[a.filter((function(e){return!i(e)}))])},Tokenizer.prototype.replaceRange=function(e,t,a,i){t=null!==t?t:this.tokens.length;var n=a.every((function(e){return e instanceof Token}));if(!isNaN(e)&&this.inboundIndex(e)&&n){var r=this.tokens.splice.apply(this.tokens,[e,t].concat(a));return i||this.dispatch(\"replaceToken\",[e,t,a]),[r,a]}return{FAIL:\"replaceRange: invalid tokens or startIndex.\"}},Tokenizer.prototype.replaceToken=function(e,t,a){if(!isNaN(e)&&this.inboundIndex(e)&&t instanceof Token){var i=this.tokens.splice(e,1,t);return a||this.dispatch(\"replaceToken\",[e,t]),[i[0],t]}return{FAIL:\"replaceToken: invalid token or index.\"}},Tokenizer.prototype.removeRange=function(e,t,a){t=isNaN(t)?this.tokens.length:t;var i=this.tokens.splice(e,t);return a||this.dispatch(\"removeRange\",[i,e,t]),i},Tokenizer.prototype.removeToken=function(e,t){if(!isNaN(e)&&this.inboundIndex(e)){var a=this.tokens.splice(e,1);return t||this.dispatch(\"removeToken\",[a,e]),a}return{FAIL:\"removeToken: invalid token index.\"}},Tokenizer.prototype.insertToken=function(e,t,a){return e.every((function(e){return e instanceof Token}))?(this.tokens.splice.apply(this.tokens,[t,0].concat(e)),a||this.dispatch(\"insertToken\",[e,t]),e):{FAIL:\"insertToken: invalid token(s).\"}},Tokenizer.prototype.registerModifier=function(e,t,a){this.events.newToken.subscribe((function(i,n){var r=[i,n],s=[i,n];if(null===t||!0===t.apply(this,r)){var o=a.apply(this,s);i.setState(e,o)}})),this.registeredModifiers.push(e)},Event$1.prototype.subscribe=function(e){return\"function\"==typeof e?this.subscribers.push(e)-1:{FAIL:\"invalid '\"+this.eventId+\"' event handler\"}},Event$1.prototype.unsubscribe=function(e){this.subscribers.splice(e,1)},ContextParams.prototype.setCurrentIndex=function(e){this.index=e,this.current=this.context[e],this.backtrack=this.context.slice(0,e),this.lookahead=this.context.slice(e+1)},ContextParams.prototype.get=function(e){switch(!0){case 0===e:return this.current;case e<0&&Math.abs(e)<=this.backtrack.length:return this.backtrack.slice(e)[0];case e>0&&e<=this.lookahead.length:return this.lookahead[e-1];default:return null}},Tokenizer.prototype.rangeToText=function(e){if(e instanceof ContextRange)return this.getRangeTokens(e).map((function(e){return e.char})).join(\"\")},Tokenizer.prototype.getText=function(){return this.tokens.map((function(e){return e.char})).join(\"\")},Tokenizer.prototype.getContext=function(e){return this.registeredContexts[e]||null},Tokenizer.prototype.on=function(e,t){var a=this.events[e];return a?a.subscribe(t):null},Tokenizer.prototype.dispatch=function(e,t){var a=this,i=this.events[e];i instanceof Event$1&&i.subscribers.forEach((function(e){e.apply(a,t||[])}))},Tokenizer.prototype.registerContextChecker=function(e,t,a){if(this.getContext(e))return{FAIL:\"context name '\"+e+\"' is already registered.\"};if(\"function\"!=typeof t)return{FAIL:\"missing context start check.\"};if(\"function\"!=typeof a)return{FAIL:\"missing context end check.\"};var i=new ContextChecker(e,t,a);return this.registeredContexts[e]=i,this.contextCheckers.push(i),i},Tokenizer.prototype.getRangeTokens=function(e){var t=e.startIndex+e.endOffset;return[].concat(this.tokens.slice(e.startIndex,t))},Tokenizer.prototype.getContextRanges=function(e){var t=this.getContext(e);return t?t.ranges:{FAIL:\"context checker '\"+e+\"' is not registered.\"}},Tokenizer.prototype.resetContextsRanges=function(){var e=this.registeredContexts;for(var t in e)e.hasOwnProperty(t)&&(e[t].ranges=[])},Tokenizer.prototype.updateContextsRanges=function(){this.resetContextsRanges();for(var e=this.tokens.map((function(e){return e.char})),t=0;t<e.length;t++){var a=new ContextParams(e,t);this.runContextCheck(a)}this.dispatch(\"updateContextsRanges\",[this.registeredContexts])},Tokenizer.prototype.setEndOffset=function(e,t){var a=new ContextRange(this.getContext(t).openRange.startIndex,e,t),i=this.getContext(t).ranges;return a.rangeId=t+\".\"+i.length,i.push(a),this.getContext(t).openRange=null,a},Tokenizer.prototype.runContextCheck=function(e){var t=this,a=e.index;this.contextCheckers.forEach((function(i){var n=i.contextName,r=t.getContext(n).openRange;if(!r&&i.checkStart(e)&&(r=new ContextRange(a,null,n),t.getContext(n).openRange=r,t.dispatch(\"contextStart\",[n,a])),r&&i.checkEnd(e)){var s=a-r.startIndex+1,o=t.setEndOffset(s,n);t.dispatch(\"contextEnd\",[n,o])}}))},Tokenizer.prototype.tokenize=function(e){this.tokens=[],this.resetContextsRanges();var t=Array.from(e);this.dispatch(\"start\");for(var a=0;a<t.length;a++){var i=t[a],n=new ContextParams(t,a);this.dispatch(\"next\",[n]),this.runContextCheck(n);var r=new Token(i);this.tokens.push(r),this.dispatch(\"newToken\",[r,n])}return this.dispatch(\"end\",[this.tokens]),this.tokens},FeatureQuery.prototype.getDefaultScriptFeaturesIndexes=function(){for(var e=this.font.tables.gsub.scripts,t=0;t<e.length;t++){var a=e[t];if(\"DFLT\"===a.tag)return a.script.defaultLangSys.featureIndexes}return[]},FeatureQuery.prototype.getScriptFeaturesIndexes=function(e){if(!this.font.tables.gsub)return[];if(!e)return this.getDefaultScriptFeaturesIndexes();for(var t=this.font.tables.gsub.scripts,a=0;a<t.length;a++){var i=t[a];if(i.tag===e&&i.script.defaultLangSys)return i.script.defaultLangSys.featureIndexes;var n=i.langSysRecords;if(n)for(var r=0;r<n.length;r++){var s=n[r];if(s.tag===e)return s.langSys.featureIndexes}}return this.getDefaultScriptFeaturesIndexes()},FeatureQuery.prototype.mapTagsToFeatures=function(e,t){for(var a={},i=0;i<e.length;i++){var n=e[i].tag,r=e[i].feature;a[n]=r}this.features[t].tags=a},FeatureQuery.prototype.getScriptFeatures=function(e){var t=this.features[e];if(this.features.hasOwnProperty(e))return t;var a=this.getScriptFeaturesIndexes(e);if(!a)return null;var i=this.font.tables.gsub;return t=a.map((function(e){return i.features[e]})),this.features[e]=t,this.mapTagsToFeatures(t,e),t},FeatureQuery.prototype.getSubstitutionType=function(e,t){return e.lookupType.toString()+t.substFormat.toString()},FeatureQuery.prototype.getLookupMethod=function(e,t){var a=this;switch(this.getSubstitutionType(e,t)){case\"11\":return function(e){return singleSubstitutionFormat1.apply(a,[e,t])};case\"12\":return function(e){return singleSubstitutionFormat2.apply(a,[e,t])};case\"63\":return function(e){return chainingSubstitutionFormat3.apply(a,[e,t])};case\"41\":return function(e){return ligatureSubstitutionFormat1.apply(a,[e,t])};case\"21\":return function(e){return decompositionSubstitutionFormat1.apply(a,[e,t])};default:throw new Error(\"lookupType: \"+e.lookupType+\" - substFormat: \"+t.substFormat+\" is not yet supported\")}},FeatureQuery.prototype.lookupFeature=function(e){var t=e.contextParams,a=t.index,i=this.getFeature({tag:e.tag,script:e.script});if(!i)return new Error(\"font '\"+this.font.names.fullName.en+\"' doesn't support feature '\"+e.tag+\"' for script '\"+e.script+\"'.\");for(var n=this.getFeatureLookups(i),r=[].concat(t.context),s=0;s<n.length;s++)for(var o=n[s],l=this.getLookupSubtables(o),c=0;c<l.length;c++){var d=l[c],h=this.getSubstitutionType(o,d),p=this.getLookupMethod(o,d),u=void 0;switch(h){case\"11\":(u=p(t.current))&&r.splice(a,1,new SubstitutionAction({id:11,tag:e.tag,substitution:u}));break;case\"12\":(u=p(t.current))&&r.splice(a,1,new SubstitutionAction({id:12,tag:e.tag,substitution:u}));break;case\"63\":u=p(t),Array.isArray(u)&&u.length&&r.splice(a,1,new SubstitutionAction({id:63,tag:e.tag,substitution:u}));break;case\"41\":(u=p(t))&&r.splice(a,1,new SubstitutionAction({id:41,tag:e.tag,substitution:u}));break;case\"21\":(u=p(t.current))&&r.splice(a,1,new SubstitutionAction({id:21,tag:e.tag,substitution:u}))}t=new ContextParams(r,a),Array.isArray(u)&&!u.length||(u=null)}return r.length?r:null},FeatureQuery.prototype.supports=function(e){if(!e.script)return!1;this.getScriptFeatures(e.script);var t=this.features.hasOwnProperty(e.script);if(!e.tag)return t;var a=this.features[e.script].some((function(t){return t.tag===e.tag}));return t&&a},FeatureQuery.prototype.getLookupSubtables=function(e){return e.subtables||null},FeatureQuery.prototype.getLookupByIndex=function(e){return this.font.tables.gsub.lookups[e]||null},FeatureQuery.prototype.getFeatureLookups=function(e){return e.lookupListIndexes.map(this.getLookupByIndex.bind(this))},FeatureQuery.prototype.getFeature=function(e){if(!this.font)return{FAIL:\"No font was found\"};this.features.hasOwnProperty(e.script)||this.getScriptFeatures(e.script);var t=this.features[e.script];return t?t.tags[e.tag]?this.features[e.script].tags[e.tag]:null:{FAIL:\"No feature for script \"+e.script}};var arabicWordCheck={startCheck:arabicWordStartCheck,endCheck:arabicWordEndCheck};function arabicSentenceStartCheck(e){var t=e.current,a=e.get(-1);return(isArabicChar(t)||isTashkeelArabicChar(t))&&!isArabicChar(a)}function arabicSentenceEndCheck(e){var t=e.get(1);switch(!0){case null===t:return!0;case!isArabicChar(t)&&!isTashkeelArabicChar(t):var a,i=isWhiteSpace(t);if(!i)return!0;if(i)if(a=e.lookahead.some((function(e){return isArabicChar(e)||isTashkeelArabicChar(e)})),!a)return!0;break;default:return!1}}var arabicSentenceCheck={startCheck:arabicSentenceStartCheck,endCheck:arabicSentenceEndCheck};function singleSubstitutionFormat1$1(e,t,a){t[a].setState(e.tag,e.substitution)}function singleSubstitutionFormat2$1(e,t,a){t[a].setState(e.tag,e.substitution)}function chainingSubstitutionFormat3$1(e,t,a){e.substitution.forEach((function(i,n){t[a+n].setState(e.tag,i)}))}function ligatureSubstitutionFormat1$1(e,t,a){var i=t[a];i.setState(e.tag,e.substitution.ligGlyph);for(var n=e.substitution.components.length,r=0;r<n;r++)(i=t[a+r+1]).setState(\"deleted\",!0)}var SUBSTITUTIONS={11:singleSubstitutionFormat1$1,12:singleSubstitutionFormat2$1,63:chainingSubstitutionFormat3$1,41:ligatureSubstitutionFormat1$1};function applySubstitution(e,t,a){e instanceof SubstitutionAction&&SUBSTITUTIONS[e.id]&&SUBSTITUTIONS[e.id](e,t,a)}function willConnectPrev(e){for(var t=[].concat(e.backtrack),a=t.length-1;a>=0;a--){var i=t[a],n=isIsolatedArabicChar(i),r=isTashkeelArabicChar(i);if(!n&&!r)return!0;if(n)return!1}return!1}function willConnectNext(e){if(isIsolatedArabicChar(e.current))return!1;for(var t=0;t<e.lookahead.length;t++)if(!isTashkeelArabicChar(e.lookahead[t]))return!0;return!1}function arabicPresentationForms(e){var t=this,a=\"arab\",i=this.featuresTags[a],n=this.tokenizer.getRangeTokens(e);if(1!==n.length){var r=new ContextParams(n.map((function(e){return e.getState(\"glyphIndex\")})),0),s=new ContextParams(n.map((function(e){return e.char})),0);n.forEach((function(e,o){if(!isTashkeelArabicChar(e.char)){r.setCurrentIndex(o),s.setCurrentIndex(o);var l,c=0;switch(willConnectPrev(s)&&(c|=1),willConnectNext(s)&&(c|=2),c){case 1:l=\"fina\";break;case 2:l=\"init\";break;case 3:l=\"medi\"}if(-1!==i.indexOf(l)){var d=t.query.lookupFeature({tag:l,script:a,contextParams:r});if(d instanceof Error)return console.info(d.message);d.forEach((function(e,t){e instanceof SubstitutionAction&&(applySubstitution(e,n,t),r.context[t]=e.substitution)}))}}}))}}function getContextParams(e,t){return new ContextParams(e.map((function(e){return e.activeState.value})),t||0)}function arabicRequiredLigatures(e){var t=this,a=this.tokenizer.getRangeTokens(e),i=getContextParams(a);i.context.forEach((function(e,n){i.setCurrentIndex(n);var r=t.query.lookupFeature({tag:\"rlig\",script:\"arab\",contextParams:i});r.length&&(r.forEach((function(e){return applySubstitution(e,a,n)})),i=getContextParams(a))}))}function latinWordStartCheck(e){var t=e.current,a=e.get(-1);return null===a&&isLatinChar(t)||!isLatinChar(a)&&isLatinChar(t)}function latinWordEndCheck(e){var t=e.get(1);return null===t||!isLatinChar(t)}var latinWordCheck={startCheck:latinWordStartCheck,endCheck:latinWordEndCheck};function getContextParams$1(e,t){return new ContextParams(e.map((function(e){return e.activeState.value})),t||0)}function latinLigature(e){var t=this,a=this.tokenizer.getRangeTokens(e),i=getContextParams$1(a);i.context.forEach((function(e,n){i.setCurrentIndex(n);var r=t.query.lookupFeature({tag:\"liga\",script:\"latn\",contextParams:i});r.length&&(r.forEach((function(e){return applySubstitution(e,a,n)})),i=getContextParams$1(a))}))}function Bidi(e){this.baseDir=e||\"ltr\",this.tokenizer=new Tokenizer,this.featuresTags={}}function registerContextChecker(e){var t=this.contextChecks[e+\"Check\"];return this.tokenizer.registerContextChecker(e,t.startCheck,t.endCheck)}function tokenizeText(){return registerContextChecker.call(this,\"latinWord\"),registerContextChecker.call(this,\"arabicWord\"),registerContextChecker.call(this,\"arabicSentence\"),this.tokenizer.tokenize(this.text)}function reverseArabicSentences(){var e=this;this.tokenizer.getContextRanges(\"arabicSentence\").forEach((function(t){var a=e.tokenizer.getRangeTokens(t);e.tokenizer.replaceRange(t.startIndex,t.endOffset,a.reverse())}))}function checkGlyphIndexStatus(){if(-1===this.tokenizer.registeredModifiers.indexOf(\"glyphIndex\"))throw new Error(\"glyphIndex modifier is required to apply arabic presentation features.\")}function applyArabicPresentationForms(){var e=this;this.featuresTags.hasOwnProperty(\"arab\")&&(checkGlyphIndexStatus.call(this),this.tokenizer.getContextRanges(\"arabicWord\").forEach((function(t){arabicPresentationForms.call(e,t)})))}function applyArabicRequireLigatures(){var e=this,t=\"arab\";this.featuresTags.hasOwnProperty(t)&&-1!==this.featuresTags[t].indexOf(\"rlig\")&&(checkGlyphIndexStatus.call(this),this.tokenizer.getContextRanges(\"arabicWord\").forEach((function(t){arabicRequiredLigatures.call(e,t)})))}function applyLatinLigatures(){var e=this,t=\"latn\";this.featuresTags.hasOwnProperty(t)&&-1!==this.featuresTags[t].indexOf(\"liga\")&&(checkGlyphIndexStatus.call(this),this.tokenizer.getContextRanges(\"latinWord\").forEach((function(t){latinLigature.call(e,t)})))}function Font(e){(e=e||{}).tables=e.tables||{},e.empty||(checkArgument(e.familyName,\"When creating a new Font object, familyName is required.\"),checkArgument(e.styleName,\"When creating a new Font object, styleName is required.\"),checkArgument(e.unitsPerEm,\"When creating a new Font object, unitsPerEm is required.\"),checkArgument(e.ascender,\"When creating a new Font object, ascender is required.\"),checkArgument(e.descender<=0,\"When creating a new Font object, negative descender value is required.\"),this.names={fontFamily:{en:e.familyName||\" \"},fontSubfamily:{en:e.styleName||\" \"},fullName:{en:e.fullName||e.familyName+\" \"+e.styleName},postScriptName:{en:e.postScriptName||(e.familyName+e.styleName).replace(/\\s/g,\"\")},designer:{en:e.designer||\" \"},designerURL:{en:e.designerURL||\" \"},manufacturer:{en:e.manufacturer||\" \"},manufacturerURL:{en:e.manufacturerURL||\" \"},license:{en:e.license||\" \"},licenseURL:{en:e.licenseURL||\" \"},version:{en:e.version||\"Version 0.1\"},description:{en:e.description||\" \"},copyright:{en:e.copyright||\" \"},trademark:{en:e.trademark||\" \"}},this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.tables=Object.assign(e.tables,{os2:Object.assign({usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,fsSelection:e.fsSelection||this.fsSelectionValues.REGULAR},e.tables.os2)})),this.supported=!0,this.glyphs=new glyphset.GlyphSet(this,e.glyphs||[]),this.encoding=new DefaultEncoding(this),this.position=new Position(this),this.substitution=new Substitution(this),this.tables=this.tables||{},this._push=null,this._hmtxTableData={},Object.defineProperty(this,\"hinting\",{get:function(){return this._hinting?this._hinting:\"truetype\"===this.outlinesFormat?this._hinting=new Hinting(this):void 0}})}function addName(e,t){var a=JSON.stringify(e),i=256;for(var n in t){var r=parseInt(n);if(r&&!(r<256)){if(JSON.stringify(t[n])===a)return r;i<=r&&(i=r+1)}}return t[i]=e,i}function makeFvarAxis(e,t,a){var i=addName(t.name,a);return[{name:\"tag_\"+e,type:\"TAG\",value:t.tag},{name:\"minValue_\"+e,type:\"FIXED\",value:t.minValue<<16},{name:\"defaultValue_\"+e,type:\"FIXED\",value:t.defaultValue<<16},{name:\"maxValue_\"+e,type:\"FIXED\",value:t.maxValue<<16},{name:\"flags_\"+e,type:\"USHORT\",value:0},{name:\"nameID_\"+e,type:\"USHORT\",value:i}]}function parseFvarAxis(e,t,a){var i={},n=new parse.Parser(e,t);return i.tag=n.parseTag(),i.minValue=n.parseFixed(),i.defaultValue=n.parseFixed(),i.maxValue=n.parseFixed(),n.skip(\"uShort\",1),i.name=a[n.parseUShort()]||{},i}function makeFvarInstance(e,t,a,i){for(var n=[{name:\"nameID_\"+e,type:\"USHORT\",value:addName(t.name,i)},{name:\"flags_\"+e,type:\"USHORT\",value:0}],r=0;r<a.length;++r){var s=a[r].tag;n.push({name:\"axis_\"+e+\" \"+s,type:\"FIXED\",value:t.coordinates[s]<<16})}return n}function parseFvarInstance(e,t,a,i){var n={},r=new parse.Parser(e,t);n.name=i[r.parseUShort()]||{},r.skip(\"uShort\",1),n.coordinates={};for(var s=0;s<a.length;++s)n.coordinates[a[s].tag]=r.parseFixed();return n}function makeFvarTable(e,t){var a=new table.Table(\"fvar\",[{name:\"version\",type:\"ULONG\",value:65536},{name:\"offsetToData\",type:\"USHORT\",value:0},{name:\"countSizePairs\",type:\"USHORT\",value:2},{name:\"axisCount\",type:\"USHORT\",value:e.axes.length},{name:\"axisSize\",type:\"USHORT\",value:20},{name:\"instanceCount\",type:\"USHORT\",value:e.instances.length},{name:\"instanceSize\",type:\"USHORT\",value:4+4*e.axes.length}]);a.offsetToData=a.sizeOf();for(var i=0;i<e.axes.length;i++)a.fields=a.fields.concat(makeFvarAxis(i,e.axes[i],t));for(var n=0;n<e.instances.length;n++)a.fields=a.fields.concat(makeFvarInstance(n,e.instances[n],e.axes,t));return a}function parseFvarTable(e,t,a){var i=new parse.Parser(e,t),n=i.parseULong();check.argument(65536===n,\"Unsupported fvar table version.\");var r=i.parseOffset16();i.skip(\"uShort\",1);for(var s=i.parseUShort(),o=i.parseUShort(),l=i.parseUShort(),c=i.parseUShort(),d=[],h=0;h<s;h++)d.push(parseFvarAxis(e,t+r+h*o,a));for(var p=[],u=t+r+s*o,m=0;m<l;m++)p.push(parseFvarInstance(e,u+m*c,d,a));return{axes:d,instances:p}}Bidi.prototype.setText=function(e){this.text=e},Bidi.prototype.contextChecks={latinWordCheck:latinWordCheck,arabicWordCheck:arabicWordCheck,arabicSentenceCheck:arabicSentenceCheck},Bidi.prototype.registerFeatures=function(e,t){var a=this,i=t.filter((function(t){return a.query.supports({script:e,tag:t})}));this.featuresTags.hasOwnProperty(e)?this.featuresTags[e]=this.featuresTags[e].concat(i):this.featuresTags[e]=i},Bidi.prototype.applyFeatures=function(e,t){if(!e)throw new Error(\"No valid font was provided to apply features\");this.query||(this.query=new FeatureQuery(e));for(var a=0;a<t.length;a++){var i=t[a];this.query.supports({script:i.script})&&this.registerFeatures(i.script,i.tags)}},Bidi.prototype.registerModifier=function(e,t,a){this.tokenizer.registerModifier(e,t,a)},Bidi.prototype.checkContextReady=function(e){return!!this.tokenizer.getContext(e)},Bidi.prototype.applyFeaturesToContexts=function(){this.checkContextReady(\"arabicWord\")&&(applyArabicPresentationForms.call(this),applyArabicRequireLigatures.call(this)),this.checkContextReady(\"latinWord\")&&applyLatinLigatures.call(this),this.checkContextReady(\"arabicSentence\")&&reverseArabicSentences.call(this)},Bidi.prototype.processText=function(e){this.text&&this.text===e||(this.setText(e),tokenizeText.call(this),this.applyFeaturesToContexts())},Bidi.prototype.getBidiText=function(e){return this.processText(e),this.tokenizer.getText()},Bidi.prototype.getTextGlyphs=function(e){this.processText(e);for(var t=[],a=0;a<this.tokenizer.tokens.length;a++){var i=this.tokenizer.tokens[a];if(!i.state.deleted){var n=i.activeState.value;t.push(Array.isArray(n)?n[0]:n)}}return t},Font.prototype.hasChar=function(e){return null!==this.encoding.charToGlyphIndex(e)},Font.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)},Font.prototype.charToGlyph=function(e){var t=this.charToGlyphIndex(e),a=this.glyphs.get(t);return a||(a=this.glyphs.get(0)),a},Font.prototype.updateFeatures=function(e){return this.defaultRenderOptions.features.map((function(t){return\"latn\"===t.script?{script:\"latn\",tags:t.tags.filter((function(t){return e[t]}))}:t}))},Font.prototype.stringToGlyphs=function(e,t){var a=this,i=new Bidi;i.registerModifier(\"glyphIndex\",null,(function(e){return a.charToGlyphIndex(e.char)}));var n=t?this.updateFeatures(t.features):this.defaultRenderOptions.features;i.applyFeatures(this,n);for(var r=i.getTextGlyphs(e),s=r.length,o=new Array(s),l=this.glyphs.get(0),c=0;c<s;c+=1)o[c]=this.glyphs.get(r[c])||l;return o},Font.prototype.nameToGlyphIndex=function(e){return this.glyphNames.nameToGlyphIndex(e)},Font.prototype.nameToGlyph=function(e){var t=this.nameToGlyphIndex(e),a=this.glyphs.get(t);return a||(a=this.glyphs.get(0)),a},Font.prototype.glyphIndexToName=function(e){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(e):\"\"},Font.prototype.getKerningValue=function(e,t){e=e.index||e,t=t.index||t;var a=this.position.defaultKerningTables;return a?this.position.getKerningValue(a,e,t):this.kerningPairs[e+\",\"+t]||0},Font.prototype.defaultRenderOptions={kerning:!0,features:[{script:\"arab\",tags:[\"init\",\"medi\",\"fina\",\"rlig\"]},{script:\"latn\",tags:[\"liga\",\"rlig\"]}]},Font.prototype.forEachGlyph=function(e,t,a,i,n,r){t=void 0!==t?t:0,a=void 0!==a?a:0,i=void 0!==i?i:72,n=Object.assign({},this.defaultRenderOptions,n);var s,o=1/this.unitsPerEm*i,l=this.stringToGlyphs(e,n);if(n.kerning){var c=n.script||this.position.getDefaultScriptName();s=this.position.getKerningTables(c,n.language)}for(var d=0;d<l.length;d+=1){var h=l[d];r.call(this,h,t,a,i,n),h.advanceWidth&&(t+=h.advanceWidth*o),n.kerning&&d<l.length-1&&(t+=(s?this.position.getKerningValue(s,h.index,l[d+1].index):this.getKerningValue(h,l[d+1]))*o),n.letterSpacing?t+=n.letterSpacing*i:n.tracking&&(t+=n.tracking/1e3*i)}return t},Font.prototype.getPath=function(e,t,a,i,n){var r=new Path;return this.forEachGlyph(e,t,a,i,n,(function(e,t,a,i){var s=e.getPath(t,a,i,n,this);r.extend(s)})),r},Font.prototype.getPaths=function(e,t,a,i,n){var r=[];return this.forEachGlyph(e,t,a,i,n,(function(e,t,a,i){var s=e.getPath(t,a,i,n,this);r.push(s)})),r},Font.prototype.getAdvanceWidth=function(e,t,a){return this.forEachGlyph(e,0,0,t,a,(function(){}))},Font.prototype.draw=function(e,t,a,i,n,r){this.getPath(t,a,i,n,r).draw(e)},Font.prototype.drawPoints=function(e,t,a,i,n,r){this.forEachGlyph(t,a,i,n,r,(function(t,a,i,n){t.drawPoints(e,a,i,n)}))},Font.prototype.drawMetrics=function(e,t,a,i,n,r){this.forEachGlyph(t,a,i,n,r,(function(t,a,i,n){t.drawMetrics(e,a,i,n)}))},Font.prototype.getEnglishName=function(e){var t=this.names[e];if(t)return t.en},Font.prototype.validate=function(){var e=this;function t(t){var a=e.getEnglishName(t);a&&a.trim().length}t(\"fontFamily\"),t(\"weightName\"),t(\"manufacturer\"),t(\"copyright\"),t(\"version\"),this.unitsPerEm},Font.prototype.toTables=function(){return sfnt.fontToTable(this)},Font.prototype.toBuffer=function(){return console.warn(\"Font.toBuffer is deprecated. Use Font.toArrayBuffer instead.\"),this.toArrayBuffer()},Font.prototype.toArrayBuffer=function(){for(var e=this.toTables().encode(),t=new ArrayBuffer(e.length),a=new Uint8Array(t),i=0;i<e.length;i++)a[i]=e[i];return t},Font.prototype.download=function(e){var t=this.getEnglishName(\"fontFamily\"),a=this.getEnglishName(\"fontSubfamily\");e=e||t.replace(/\\s/g,\"\")+\"-\"+a+\".otf\";var i=this.toArrayBuffer();if(isBrowser())if(window.URL=window.URL||window.webkitURL,window.URL){var n=new DataView(i),r=new Blob([n],{type:\"font/opentype\"}),s=document.createElement(\"a\");s.href=window.URL.createObjectURL(r),s.download=e;var o=document.createEvent(\"MouseEvents\");o.initEvent(\"click\",!0,!1),s.dispatchEvent(o)}else console.warn(\"Font file could not be downloaded. Try using a different browser.\");else{var l=require(\"fs\"),c=arrayBufferToNodeBuffer(i);l.writeFileSync(e,c)}},Font.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},Font.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9},Font.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};var fvar={make:makeFvarTable,parse:parseFvarTable},attachList=function(){return{coverage:this.parsePointer(Parser.coverage),attachPoints:this.parseList(Parser.pointer(Parser.uShortList))}},caretValue=function(){var e=this.parseUShort();return check.argument(1===e||2===e||3===e,\"Unsupported CaretValue table version.\"),1===e?{coordinate:this.parseShort()}:2===e?{pointindex:this.parseShort()}:3===e?{coordinate:this.parseShort()}:void 0},ligGlyph=function(){return this.parseList(Parser.pointer(caretValue))},ligCaretList=function(){return{coverage:this.parsePointer(Parser.coverage),ligGlyphs:this.parseList(Parser.pointer(ligGlyph))}},markGlyphSets=function(){return this.parseUShort(),this.parseList(Parser.pointer(Parser.coverage))};function parseGDEFTable(e,t){var a=new Parser(e,t=t||0),i=a.parseVersion(1);check.argument(1===i||1.2===i||1.3===i,\"Unsupported GDEF table version.\");var n={version:i,classDef:a.parsePointer(Parser.classDef),attachList:a.parsePointer(attachList),ligCaretList:a.parsePointer(ligCaretList),markAttachClassDef:a.parsePointer(Parser.classDef)};return i>=1.2&&(n.markGlyphSets=a.parsePointer(markGlyphSets)),n}var gdef={parse:parseGDEFTable},subtableParsers$1=new Array(10);function parseGposTable(e,t){var a=new Parser(e,t=t||0),i=a.parseVersion(1);return check.argument(1===i||1.1===i,\"Unsupported GPOS table version \"+i),1===i?{version:i,scripts:a.parseScriptList(),features:a.parseFeatureList(),lookups:a.parseLookupList(subtableParsers$1)}:{version:i,scripts:a.parseScriptList(),features:a.parseFeatureList(),lookups:a.parseLookupList(subtableParsers$1),variations:a.parseFeatureVariationsList()}}subtableParsers$1[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{posFormat:1,coverage:this.parsePointer(Parser.coverage),value:this.parseValueRecord()}:2===t?{posFormat:2,coverage:this.parsePointer(Parser.coverage),values:this.parseValueRecordList()}:void check.assert(!1,\"0x\"+e.toString(16)+\": GPOS lookup type 1 format must be 1 or 2.\")},subtableParsers$1[2]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();check.assert(1===t||2===t,\"0x\"+e.toString(16)+\": GPOS lookup type 2 format must be 1 or 2.\");var a=this.parsePointer(Parser.coverage),i=this.parseUShort(),n=this.parseUShort();if(1===t)return{posFormat:t,coverage:a,valueFormat1:i,valueFormat2:n,pairSets:this.parseList(Parser.pointer(Parser.list((function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(i),value2:this.parseValueRecord(n)}}))))};if(2===t){var r=this.parsePointer(Parser.classDef),s=this.parsePointer(Parser.classDef),o=this.parseUShort(),l=this.parseUShort();return{posFormat:t,coverage:a,valueFormat1:i,valueFormat2:n,classDef1:r,classDef2:s,class1Count:o,class2Count:l,classRecords:this.parseList(o,Parser.list(l,(function(){return{value1:this.parseValueRecord(i),value2:this.parseValueRecord(n)}})))}}},subtableParsers$1[3]=function(){return{error:\"GPOS Lookup 3 not supported\"}},subtableParsers$1[4]=function(){return{error:\"GPOS Lookup 4 not supported\"}},subtableParsers$1[5]=function(){return{error:\"GPOS Lookup 5 not supported\"}},subtableParsers$1[6]=function(){return{error:\"GPOS Lookup 6 not supported\"}},subtableParsers$1[7]=function(){return{error:\"GPOS Lookup 7 not supported\"}},subtableParsers$1[8]=function(){return{error:\"GPOS Lookup 8 not supported\"}},subtableParsers$1[9]=function(){return{error:\"GPOS Lookup 9 not supported\"}};var subtableMakers$1=new Array(10);function makeGposTable(e){return new table.Table(\"GPOS\",[{name:\"version\",type:\"ULONG\",value:65536},{name:\"scripts\",type:\"TABLE\",value:new table.ScriptList(e.scripts)},{name:\"features\",type:\"TABLE\",value:new table.FeatureList(e.features)},{name:\"lookups\",type:\"TABLE\",value:new table.LookupList(e.lookups,subtableMakers$1)}])}var gpos={parse:parseGposTable,make:makeGposTable};function parseWindowsKernTable(e){var t={};e.skip(\"uShort\");var a=e.parseUShort();check.argument(0===a,\"Unsupported kern sub-table version.\"),e.skip(\"uShort\",2);var i=e.parseUShort();e.skip(\"uShort\",3);for(var n=0;n<i;n+=1){var r=e.parseUShort(),s=e.parseUShort(),o=e.parseShort();t[r+\",\"+s]=o}return t}function parseMacKernTable(e){var t={};e.skip(\"uShort\"),e.parseULong()>1&&console.warn(\"Only the first kern subtable is supported.\"),e.skip(\"uLong\");var a=255&e.parseUShort();if(e.skip(\"uShort\"),0===a){var i=e.parseUShort();e.skip(\"uShort\",3);for(var n=0;n<i;n+=1){var r=e.parseUShort(),s=e.parseUShort(),o=e.parseShort();t[r+\",\"+s]=o}}return t}function parseKernTable(e,t){var a=new parse.Parser(e,t),i=a.parseUShort();if(0===i)return parseWindowsKernTable(a);if(1===i)return parseMacKernTable(a);throw new Error(\"Unsupported kern table version (\"+i+\").\")}var kern={parse:parseKernTable};function parseLocaTable(e,t,a,i){for(var n=new parse.Parser(e,t),r=i?n.parseUShort:n.parseULong,s=[],o=0;o<a+1;o+=1){var l=r.call(n);i&&(l*=2),s.push(l)}return s}var loca={parse:parseLocaTable};function loadFromFile(e,t){require(\"fs\").readFile(e,(function(e,a){if(e)return t(e.message);t(null,nodeBufferToArrayBuffer(a))}))}function loadFromUrl(e,t){var a=new XMLHttpRequest;a.open(\"get\",e,!0),a.responseType=\"arraybuffer\",a.onload=function(){return a.response?t(null,a.response):t(\"Font could not be loaded: \"+a.statusText)},a.onerror=function(){t(\"Font could not be loaded\")},a.send()}function parseOpenTypeTableEntries(e,t){for(var a=[],i=12,n=0;n<t;n+=1){var r=parse.getTag(e,i),s=parse.getULong(e,i+4),o=parse.getULong(e,i+8),l=parse.getULong(e,i+12);a.push({tag:r,checksum:s,offset:o,length:l,compression:!1}),i+=16}return a}function parseWOFFTableEntries(e,t){for(var a=[],i=44,n=0;n<t;n+=1){var r,s=parse.getTag(e,i),o=parse.getULong(e,i+4),l=parse.getULong(e,i+8),c=parse.getULong(e,i+12);r=l<c&&\"WOFF\",a.push({tag:s,offset:o,compression:r,compressedLength:l,length:c}),i+=20}return a}function uncompressTable(e,t){if(\"WOFF\"===t.compression){var a=new Uint8Array(e.buffer,t.offset+2,t.compressedLength-2),i=new Uint8Array(t.length);if(tinyInflate(a,i),i.byteLength!==t.length)throw new Error(\"Decompression error: \"+t.tag+\" decompressed length doesn't match recorded length\");return{data:new DataView(i.buffer,0),offset:0}}return{data:e,offset:t.offset}}function parseBuffer(e,t){var a,i;t=null==t?{}:t;var n,r,s,o,l,c,d,h,p,u,m,g,f,b=new Font({empty:!0}),U=new DataView(e,0),E=[],w=parse.getTag(U,0);if(w===String.fromCharCode(0,1,0,0)||\"true\"===w||\"typ1\"===w)b.outlinesFormat=\"truetype\",E=parseOpenTypeTableEntries(U,n=parse.getUShort(U,4));else if(\"OTTO\"===w)b.outlinesFormat=\"cff\",E=parseOpenTypeTableEntries(U,n=parse.getUShort(U,4));else{if(\"wOFF\"!==w)throw new Error(\"Unsupported OpenType signature \"+w);var y=parse.getTag(U,4);if(y===String.fromCharCode(0,1,0,0))b.outlinesFormat=\"truetype\";else{if(\"OTTO\"!==y)throw new Error(\"Unsupported OpenType flavor \"+w);b.outlinesFormat=\"cff\"}E=parseWOFFTableEntries(U,n=parse.getUShort(U,12))}for(var v=0;v<n;v+=1){var T=E[v],S=void 0;switch(T.tag){case\"cmap\":S=uncompressTable(U,T),b.tables.cmap=cmap.parse(S.data,S.offset),b.encoding=new CmapEncoding(b.tables.cmap);break;case\"cvt \":S=uncompressTable(U,T),f=new parse.Parser(S.data,S.offset),b.tables.cvt=f.parseShortList(T.length/2);break;case\"fvar\":s=T;break;case\"fpgm\":S=uncompressTable(U,T),f=new parse.Parser(S.data,S.offset),b.tables.fpgm=f.parseByteList(T.length);break;case\"head\":S=uncompressTable(U,T),b.tables.head=head.parse(S.data,S.offset),b.unitsPerEm=b.tables.head.unitsPerEm,a=b.tables.head.indexToLocFormat;break;case\"hhea\":S=uncompressTable(U,T),b.tables.hhea=hhea.parse(S.data,S.offset),b.ascender=b.tables.hhea.ascender,b.descender=b.tables.hhea.descender,b.numberOfHMetrics=b.tables.hhea.numberOfHMetrics;break;case\"hmtx\":h=T;break;case\"ltag\":S=uncompressTable(U,T),i=ltag.parse(S.data,S.offset);break;case\"maxp\":S=uncompressTable(U,T),b.tables.maxp=maxp.parse(S.data,S.offset),b.numGlyphs=b.tables.maxp.numGlyphs;break;case\"name\":m=T;break;case\"OS/2\":S=uncompressTable(U,T),b.tables.os2=os2.parse(S.data,S.offset);break;case\"post\":S=uncompressTable(U,T),b.tables.post=post.parse(S.data,S.offset),b.glyphNames=new GlyphNames(b.tables.post);break;case\"prep\":S=uncompressTable(U,T),f=new parse.Parser(S.data,S.offset),b.tables.prep=f.parseByteList(T.length);break;case\"glyf\":o=T;break;case\"loca\":u=T;break;case\"CFF \":r=T;break;case\"kern\":p=T;break;case\"GDEF\":l=T;break;case\"GPOS\":c=T;break;case\"GSUB\":d=T;break;case\"meta\":g=T}}var _=uncompressTable(U,m);if(b.tables.name=_name.parse(_.data,_.offset,i),b.names=b.tables.name,o&&u){var C=0===a,I=uncompressTable(U,u),x=loca.parse(I.data,I.offset,b.numGlyphs,C),A=uncompressTable(U,o);b.glyphs=glyf.parse(A.data,A.offset,x,b,t)}else{if(!r)throw new Error(\"Font doesn't contain TrueType or CFF outlines.\");var k=uncompressTable(U,r);cff.parse(k.data,k.offset,b,t)}var O=uncompressTable(U,h);if(hmtx.parse(b,O.data,O.offset,b.numberOfHMetrics,b.numGlyphs,b.glyphs,t),addGlyphNames(b,t),p){var R=uncompressTable(U,p);b.kerningPairs=kern.parse(R.data,R.offset)}else b.kerningPairs={};if(l){var M=uncompressTable(U,l);b.tables.gdef=gdef.parse(M.data,M.offset)}if(c){var L=uncompressTable(U,c);b.tables.gpos=gpos.parse(L.data,L.offset),b.position.init()}if(d){var D=uncompressTable(U,d);b.tables.gsub=gsub.parse(D.data,D.offset)}if(s){var P=uncompressTable(U,s);b.tables.fvar=fvar.parse(P.data,P.offset,b.names)}if(g){var N=uncompressTable(U,g);b.tables.meta=meta.parse(N.data,N.offset),b.metas=b.tables.meta}return b}function load(e,t,a){a=null==a?{}:a;var i=\"undefined\"!=typeof window||a.isUrl?loadFromUrl:loadFromFile;return new Promise((function(n,r){i(e,(function(e,i){if(e){if(t)return t(e);r(e)}var s;try{s=parseBuffer(i,a)}catch(e){if(t)return t(e,null);r(e)}if(t)return t(null,s);n(s)}))}))}function loadSync(e,t){return parseBuffer(nodeBufferToArrayBuffer(require(\"fs\").readFileSync(e)),t)}var opentype=Object.freeze({__proto__:null,Font:Font,Glyph:Glyph,Path:Path,BoundingBox:BoundingBox,_parse:parse,parse:parseBuffer,load:load,loadSync:loadSync});function createWorkerBlob(e){const t=new Blob([e],{type:\"text/javascript\"});return URL.createObjectURL(t)}const workerCode='\\nvar LZString=function(){var r=String.fromCharCode,o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",n=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\",e={};function t(r,o){if(!e[r]){e[r]={};for(var n=0;n<r.length;n++)e[r][r.charAt(n)]=n}return e[r][o]}var i={compressToBase64:function(r){if(null==r)return\"\";var n=i._compress(r,6,function(r){return o.charAt(r)});switch(n.length%4){default:case 0:return n;case 1:return n+\"===\";case 2:return n+\"==\";case 3:return n+\"=\"}},decompressFromBase64:function(r){return null==r?\"\":\"\"==r?null:i._decompress(r.length,32,function(n){return t(o,r.charAt(n))})},compressToUTF16:function(o){return null==o?\"\":i._compress(o,15,function(o){return r(o+32)})+\" \"},decompressFromUTF16:function(r){return null==r?\"\":\"\"==r?null:i._decompress(r.length,16384,function(o){return r.charCodeAt(o)-32})},compressToUint8Array:function(r){for(var o=i.compress(r),n=new Uint8Array(2*o.length),e=0,t=o.length;e<t;e++){var s=o.charCodeAt(e);n[2*e]=s>>>8,n[2*e+1]=s%256}return n},decompressFromUint8Array:function(o){if(null==o)return i.decompress(o);for(var n=new Array(o.length/2),e=0,t=n.length;e<t;e++)n[e]=256*o[2*e]+o[2*e+1];var s=[];return n.forEach(function(o){s.push(r(o))}),i.decompress(s.join(\"\"))},compressToEncodedURIComponent:function(r){return null==r?\"\":i._compress(r,6,function(r){return n.charAt(r)})},decompressFromEncodedURIComponent:function(r){return null==r?\"\":\"\"==r?null:(r=r.replace(/ /g,\"+\"),i._decompress(r.length,32,function(o){return t(n,r.charAt(o))}))},compress:function(o){return i._compress(o,16,function(o){return r(o)})},_compress:function(r,o,n){if(null==r)return\"\";var e,t,i,s={},u={},a=\"\",p=\"\",c=\"\",l=2,f=3,h=2,d=[],m=0,v=0;for(i=0;i<r.length;i+=1)if(a=r.charAt(i),Object.prototype.hasOwnProperty.call(s,a)||(s[a]=f++,u[a]=!0),p=c+a,Object.prototype.hasOwnProperty.call(s,p))c=p;else{if(Object.prototype.hasOwnProperty.call(u,c)){if(c.charCodeAt(0)<256){for(e=0;e<h;e++)m<<=1,v==o-1?(v=0,d.push(n(m)),m=0):v++;for(t=c.charCodeAt(0),e=0;e<8;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;e<h;e++)m=m<<1|t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=c.charCodeAt(0),e=0;e<16;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;0==--l&&(l=Math.pow(2,h),h++),s[p]=f++,c=String(a)}if(\"\"!==c){if(Object.prototype.hasOwnProperty.call(u,c)){if(c.charCodeAt(0)<256){for(e=0;e<h;e++)m<<=1,v==o-1?(v=0,d.push(n(m)),m=0):v++;for(t=c.charCodeAt(0),e=0;e<8;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;e<h;e++)m=m<<1|t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=c.charCodeAt(0),e=0;e<16;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;0==--l&&(l=Math.pow(2,h),h++)}for(t=2,e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;for(;;){if(m<<=1,v==o-1){d.push(n(m));break}v++}return d.join(\"\")},decompress:function(r){return null==r?\"\":\"\"==r?null:i._decompress(r.length,32768,function(o){return r.charCodeAt(o)})},_decompress:function(o,n,e){var t,i,s,u,a,p,c,l=[],f=4,h=4,d=3,m=\"\",v=[],g={val:e(0),position:n,index:1};for(t=0;t<3;t+=1)l[t]=t;for(s=0,a=Math.pow(2,2),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 2:return\"\"}for(l[3]=c,i=c,v.push(c);;){if(g.index>o)return\"\";for(s=0,a=Math.pow(2,d),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(c=s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 2:return v.join(\"\")}if(0==f&&(f=Math.pow(2,d),d++),l[c])m=l[c];else{if(c!==h)return null;m=i+i.charAt(0)}v.push(m),l[h++]=i+m.charAt(0),i=m,0==--f&&(f=Math.pow(2,d),d++)}}};return i}();\"function\"==typeof define&&define.amd?define(function(){return LZString}):\"undefined\"!=typeof module&&null!=module?module.exports=LZString:\"undefined\"!=typeof angular&&null!=angular&&angular.module(\"LZString\",[]).factory(\"LZString\",function(){return LZString});\\nself.onmessage = function(e) {\\n  const { data, action, messageId } = e.data;\\n  try {\\n    switch (action) {\\n      case \\'compress\\':\\n        if (!data) throw new Error(\"No input string provided for compression.\");\\n        const compressed = LZString.compressToBase64(data);\\n        let result = \\'\\';\\n        const chunkSize = 256;\\n        for (let i = 0; i < compressed.length; i += chunkSize) {\\n          result += compressed.slice(i, i + chunkSize) + \\'\\\\n\\\\n\\';\\n        }\\n        self.postMessage({ messageId, compressed: result.trim() });\\n        break;\\n      case \\'decompress\\':\\n        if (!data) throw new Error(\"No input string provided for decompression.\");\\n        let cleanedData = \\'\\';\\n        const length = data.length;\\n        for (let i = 0; i < length; i++) {\\n          const char = data[i];\\n          if (char !== \\'\\\\n\\' && char !== \\'\\\\r\\') {\\n            cleanedData += char;\\n          }\\n        }\\n        const decompressed = LZString.decompressFromBase64(cleanedData);\\n        self.postMessage({ messageId, decompressed });\\n        break;\\n      default:\\n        throw new Error(\"Unknown action.\");\\n    }\\n  } catch (error) {\\n    self.postMessage({ messageId, error: error.message });\\n  }\\n};\\n';let worker=null;function initCompressionWorker(){worker||(worker=new Worker(createWorkerBlob(workerCode)))}let messageCounter=0;const pendingOperations=new Map;async function runCompressionWorker(e,t){const a=messageCounter++;return new Promise(((i,n)=>{pendingOperations.set(a,{resolve:i,reject:n}),worker.onmessage||(worker.onmessage=function(e){const{messageId:t,compressed:a,decompressed:i,error:n}=e.data,r=pendingOperations.get(t);r&&(n?r.reject(new Error(n)):a||i?r.resolve(a||i):r.reject(new Error(\"Unexpected response from worker\")),pendingOperations.delete(t))},worker.onerror=function(e){for(const[t,a]of pendingOperations)a.reject(new Error(e.message)),pendingOperations.delete(t)}),worker.postMessage({messageId:a,data:e,action:t})}))}function terminateCompressionWorker(){worker.terminate(),worker=null}let IS_WORKER_SUPPORTED=!1;function canCreateWorkerFromBlob(){try{const e=new Blob([\"self.onmessage = function() {}\"]),t=URL.createObjectURL(e);new Worker(t).terminate(),URL.revokeObjectURL(t),IS_WORKER_SUPPORTED=!0}catch(e){IS_WORKER_SUPPORTED=!1}}canCreateWorkerFromBlob();var commonjsGlobal=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"default\")?e.default:e}var es6PromisePool={exports:{}};es6PromisePool.exports,function(e,t){e.exports=function(){var e=function(){this._listeners={}};e.prototype.addEventListener=function(e,t){this._listeners[e]=this._listeners[e]||[],this._listeners[e].indexOf(t)<0&&this._listeners[e].push(t)},e.prototype.removeEventListener=function(e,t){if(this._listeners[e]){var a=this._listeners[e].indexOf(t);a>=0&&this._listeners[e].splice(a,1)}},e.prototype.dispatchEvent=function(e){if(this._listeners[e.type]&&this._listeners[e.type].length)for(var t=this._listeners[e.type].slice(),a=0,i=t.length;a<i;++a)t[a].call(this,e)};var t=function(e){var t=!1;return{next:function(){return t?{done:!0}:(t=!0,{value:e})}}},a=function(e,t,a){this.target=e,this.type=t,this.data=a},i=function(a,i,n){if(e.call(this),\"number\"!=typeof i||Math.floor(i)!==i||i<1)throw new Error(\"Invalid concurrency\");this._concurrency=i,this._options=n||{},this._options.promise=this._options.promise||Promise,this._iterator=function(e,a){var i,n=typeof e;if(\"object\"===n){if(\"function\"==typeof e.next)return e;if(\"function\"==typeof e.then)return t(e)}return\"function\"===n?\"function\"==typeof(i=e).constructor&&\"GeneratorFunction\"===i.constructor.name?e():function(e){return{next:function(){var t=e();return t?{value:t}:{done:!0}}}}(e):t(a.resolve(e))}(a,this._options.promise),this._done=!1,this._size=0,this._promise=null,this._callbacks=null};return(i.prototype=new e).constructor=i,i.prototype.concurrency=function(e){return void 0!==e&&(this._concurrency=e,this.active()&&this._proceed()),this._concurrency},i.prototype.size=function(){return this._size},i.prototype.active=function(){return!!this._promise},i.prototype.promise=function(){return this._promise},i.prototype.start=function(){var e=this,t=this._options.promise;return this._promise=new t((function(t,a){e._callbacks={reject:a,resolve:t},e._proceed()})),this._promise},i.prototype._fireEvent=function(e,t){this.dispatchEvent(new a(this,e,t))},i.prototype._settle=function(e){e?this._callbacks.reject(e):this._callbacks.resolve(),this._promise=null,this._callbacks=null},i.prototype._onPooledPromiseFulfilled=function(e,t){this._size--,this.active()&&(this._fireEvent(\"fulfilled\",{promise:e,result:t}),this._proceed())},i.prototype._onPooledPromiseRejected=function(e,t){this._size--,this.active()&&(this._fireEvent(\"rejected\",{promise:e,error:t}),this._settle(t||new Error(\"Unknown error\")))},i.prototype._trackPromise=function(e){var t=this;e.then((function(a){t._onPooledPromiseFulfilled(e,a)}),(function(a){t._onPooledPromiseRejected(e,a)})).catch((function(e){t._settle(new Error(\"Promise processing failed: \"+e))}))},i.prototype._proceed=function(){if(!this._done){for(var e={done:!1};this._size<this._concurrency&&!(e=this._iterator.next()).done;)this._size++,this._trackPromise(e.value);this._done=null===e||!!e.done}this._done&&0===this._size&&this._settle()},i.PromisePoolEvent=a,i.PromisePool=i,i}()}(es6PromisePool,es6PromisePool.exports);var es6PromisePoolExports=es6PromisePool.exports,Pool=getDefaultExportFromCjs(es6PromisePoolExports);class VersionMismatchPrompt extends obsidian_module.Modal{plugin;resolvePromise;promise;resolved;isDirty=!1;constructor(e){super(e.app),this.plugin=e}async start(){return this.promise=new Promise((e=>{this.resolvePromise=e})),await this.plugin.loadSettings(),this.buildUI(),this.open(),this.promise}buildUI(){const{contentEl:e}=this;e.empty();const t=this.plugin.manifest.version,a=PLUGIN_VERSION;e.createEl(\"h2\",{text:t$d(\"VERSION_MISMATCH_HEADING\")}),e.createEl(\"p\").innerHTML=t$d(\"VERSION_MISMATCH_NOTICE\").replace(\"{VAL_RECORDED}\",t).replace(\"{VAL_ACTUAL}\",a),e.createEl(\"p\").innerHTML=t$d(\"VERSION_MISMATCH_CAUSE\"),e.createEl(\"p\").innerHTML=t$d(\"VERSION_MISMATCH_OPTIONS\"),e.createEl(\"p\").innerHTML=t$d(\"VERSION_MISMATCH_NOTE\"),new obsidian_module.Setting(e).setName(t$d(\"VERSION_MISMATCH_DISABLE_NAME\")).setDesc(t$d(\"VERSION_MISMATCH_DISABLE_DESC\")).addToggle((e=>e.setValue(!this.plugin.settings.compareManifestToPluginVersion).onChange((async e=>{this.plugin.settings.compareManifestToPluginVersion=!e,this.isDirty=!0}))));const i=e.createDiv({cls:\"ex-version-mismatch-buttons\"}),n=i.createEl(\"button\",{text:t$d(\"VERSION_MISMATCH_REDOWNLOAD\")});n.addEventListener(\"click\",(()=>{this.resolved=!0,this.close()})),i.createEl(\"button\",{text:t$d(\"VERSION_MISMATCH_IGNORE\")}).addEventListener(\"click\",(()=>{this.resolved=!1,this.close()})),i.style.display=\"flex\",i.style.gap=\"0.5rem\",i.style.marginTop=\"1rem\",n.style.backgroundColor=\"var(--interactive-accent)\",n.style.color=\"var(--text-on-accent)\"}async onClose(){super.onClose(),this.isDirty&&await this.plugin.saveSettings(),this.resolved?this.resolvePromise&&this.resolvePromise(!0):this.resolvePromise&&this.resolvePromise(!1)}}let versionMismatchChecked=!1;async function checkVersionMismatch(e){if(!versionMismatchChecked&&e.manifest.version!==PLUGIN_VERSION){versionMismatchChecked=!0;const t=new VersionMismatchPrompt(e);await t.start()&&(e.manifest.version=PLUGIN_VERSION,await e.app.setting.open(),e.app.setting.openTabById(\"community-plugins\"))}}let versionUpdateCheckTimer=null,versionUpdateChecked=!1;async function checkExcalidrawVersion(){if(!versionUpdateChecked){versionUpdateChecked=!0;try{const e=async()=>JSON.parse(await obsidian_module.request({url:\"https://api.github.com/repos/zsviczian/obsidian-excalidraw-plugin/releases?per_page=15&page=1\"})),t=(await e()).filter((e=>!e.draft&&!e.prerelease)).map((e=>({version:e.tag_name,published:new Date(e.published_at)}))).filter((e=>e.version.match(/^\\d+\\.\\d+\\.\\d+$/))).sort(((e,t)=>t.published-e.published))[0].version;isVersionNewerThanOther(t,PLUGIN_VERSION)&&new obsidian_module.Notice(t$d(\"UPDATE_AVAILABLE\")+` ${t}`),await checkScriptUpdates()}catch(e){console.log({where:\"Utils/checkExcalidrawVersion\",error:e})}versionUpdateCheckTimer=window.setTimeout((()=>{versionUpdateChecked=!1,versionUpdateCheckTimer=null}),288e5)}}async function checkScriptUpdates(){try{if(!EXCALIDRAW_PLUGIN?.settings?.scriptFolderPath)return;const e=`${EXCALIDRAW_PLUGIN.settings.scriptFolderPath}/${SCRIPT_INSTALL_FOLDER}/`,t=EXCALIDRAW_PLUGIN.app.vault.getFiles().filter((t=>t.path.startsWith(e)&&\"md\"===t.extension));if(0===t.length)return;const a=new Map;if(JSON.parse(await obsidian_module.request({url:\"https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/ea-scripts/directory-info.json\"})).forEach((e=>a.set(e.fname,e.mtime))),0===a.size)return;const i=[];let n=!1;for(const r of t){const t=r.name;a.has(t)&&a.get(t)>r.stat.mtime&&(i.push(r.path.split(e)?.[1]?.split(\".md\")[0]),n=!0)}if(n){const e=`${t$d(\"SCRIPT_UPDATES_AVAILABLE\")}\\n\\n${i.sort().join(\"\\n\")}`;new obsidian_module.Notice(e,8e3+1e3*i.length),log$2(e)}}catch(e){console.log({where:\"Utils/checkScriptUpdates\",error:e})}}function wrapTextAtCharLength(e,t,a=!1,i=0){if(!t)return e;let n=\"\";if(a){for(const a of e.split(\"\\n\")){const e=a.match(new RegExp(`(.){1,${t}}`,\"g\"));n+=e?`${e.join(\"\\n\")}\\n`:\"\\n\"}return n.replace(/\\n$/,\"\")}const r=new RegExp(`(.{1,${t}})(\\\\s+|$\\\\n?)|([^\\\\s]{1,${t+i}})(\\\\s+|$\\\\n?)?`,\"gm\"),s=e.matchAll(r);let o;for(;!(o=s.next()).done;){n+=o.value[1]?o.value[1].trimEnd():o.value[3].trimEnd();const e=(o.value[2]?o.value[2].split(\"\\n\").length-1:0)+(o.value[4]?o.value[4].split(\"\\n\").length-1:0);n+=\"\\n\".repeat(e),0===e&&(n+=\"\\n\")}return n.replace(/\\n$/,\"\")}function rotatedDimensions(e){const t=getCommonBoundingBox([e]);return[t.minX,t.minY,t.maxX-t.minX,t.maxY-t.minY]}async function getDataURL(e,t){return new Promise(((a,i)=>{const n=new FileReader;n.onload=()=>{const e=n.result;a(e)},n.onerror=e=>i(e),n.readAsDataURL(new Blob([new Uint8Array(e)],{type:t}))}))}async function getFontDataURL(e,t,a,i){let n=\"\",r=\"\",s=\"\";const o=e.metadataCache.getFirstLinkpathDest(t,a);if(o){const t=await e.vault.readBinary(o);let a=\"\",l=\"\";switch(o.extension){case\"woff\":a=\"application/font-woff\",l=\"woff\";break;case\"woff2\":a=\"font/woff2\",l=\"woff2\";break;case\"ttf\":a=\"font/ttf\",l=\"truetype\";break;case\"otf\":a=\"font/otf\",l=\"opentype\";break;default:a=\"application/octet-stream\"}r=i??o.basename,s=await getDataURL(t,a);const c=s.split(\";base64,\",2);s=`${c[0]};charset=utf-8;base64,${c[1]}`,n=` @font-face {font-family: \"${r}\";src: url(\"${s}\") format(\"${l}\")}`}return{fontDef:n,fontName:r,dataURL:s}}function svgToBase64(e){const t=e.replaceAll(\"&nbsp;\",\" \"),a=encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,((e,t)=>String.fromCharCode(parseInt(t,16))));return`data:image/svg+xml;base64,${btoa(a)}`}async function getBinaryFileFromDataURL(e){if(!e)return null;if(e.match(/^(https?|ftp):\\/\\/[^\\s/$.?#].[^\\s]*$/i)){const t=e,a=getURLImageExtension(t),i=getMimeType(a);e=await getDataURLFromURL(t,i)}const t=e.matchAll(/base64,(.*)/g).next();if(!t.value)return null;const a=window.atob(t.value[1]),i=a.length,n=new Uint8Array(i);for(let e=0;e<i;e++)n[e]=a.charCodeAt(e);return n.buffer}async function getSVG(e,t,a,i){let n=e.elements;n.some((e=>\"embeddable\"===e.type))&&(n=JSON.parse(JSON.stringify(n)),n.filter((e=>\"embeddable\"===e.type)).forEach((t=>{t.link=generateEmbeddableLink(t.link,e.appState?.theme??\"light\")}))),n=i?updateElementLinksToObsidianLinks({elements:n,hostFile:i}):n;try{let r;if(t.isMask){const t=new CropImage(n,e.files);r=await t.getCroppedSVG(),t.destroy()}else r=await exportToSvg({elements:n.filter((e=>!0!==e.isDeleted)),appState:{...e.appState,exportBackground:t.withBackground,exportWithDarkMode:!!t.withTheme&&\"light\"!==e.appState?.theme,...t.frameRendering?{frameRendering:t.frameRendering}:{}},files:e.files,exportPadding:t.frameRendering?.enabled?0:a,exportingFrame:null,renderEmbeddables:!0,skipInliningFonts:t.skipInliningFonts});return r&&(r.addClass(\"excalidraw-svg\"),i instanceof obsidian_module.TFile)&&getFileCSSClasses(i).forEach((e=>r.addClass(e))),r}catch(e){return null}}function filterFiles(e){let t={};return Object.entries(e).forEach((([e,a])=>{a.dataURL.startsWith(\"http\")||(t[e]=a)})),t}async function getPNG(e,t,a,i=1){try{if(t.isMask){const t=new CropImage(e.elements,e.files),a=await t.getCroppedPNG();return t.destroy(),a}return await exportToBlob({elements:e.elements.filter((e=>!0!==e.isDeleted)),appState:{...e.appState,exportBackground:t.withBackground,exportWithDarkMode:!!t.withTheme&&\"light\"!==e.appState?.theme,...t.frameRendering?{frameRendering:t.frameRendering}:{}},files:filterFiles(e.files),exportPadding:t.frameRendering?.enabled?0:a,mimeType:\"image/png\",getDimensions:(e,t)=>({width:e*i,height:t*i,scale:i})})}catch(e){return new obsidian_module.Notice(t$d(\"ERROR_PNG_TOO_LARGE\")),errorlog({where:\"Utils.getPNG\",error:e}),null}}async function getQuickImagePreview(e,t,a){if(!e.settings.displayExportedImageIfAvailable)return null;const i=getIMGFilename(t,a),n=e.app.vault.getAbstractFileByPath(i);return n&&n instanceof obsidian_module.TFile?\"png\"===a?await e.app.vault.readBinary(n):await e.app.vault.read(n):null}async function getImageSize(e){return new Promise(((t,a)=>{const i=new Image;i.onload=()=>{t({height:i.naturalHeight,width:i.naturalWidth})},i.onerror=a,i.src=e}))}function addAppendUpdateCustomData(e,t){if(!t)return e;e.customData||(e.customData={});for(const a in t)void 0!==t[a]?e.customData[a]=t[a]:delete e.customData[a];return e}function scaleLoadedImage(e,t){let a=!1;if(!t||!e)return{dirty:a,scene:e};for(const i of t.filter((e=>{if(!Boolean(EXCALIDRAW_PLUGIN))return!0;const t=EXCALIDRAW_PLUGIN.filesMaster.get(e.id);if(!t)return!0;const a=EXCALIDRAW_PLUGIN.app.vault.getAbstractFileByPath(t.path.replace(/#.*$/,\"\").replace(/\\|.*$/,\"\"));return!(!a||a instanceof obsidian_module.TFolder)&&(\"md\"===a.extension||EXCALIDRAW_PLUGIN.isExcalidrawFile(a))}))){const[t,n]=[i.size.width,i.size.height],r=t/n;e.elements.filter((e=>\"image\"===e.type&&e.fileId===i.id)).forEach((e=>{const[s,o]=[e.width,e.height],l=i.shouldScale,c=e.crop,d=Boolean(c);if((e.customData?.isAnchored&&i.shouldScale||!e.customData?.isAnchored&&!i.shouldScale)&&(addAppendUpdateCustomData(e,i.shouldScale?{isAnchored:!1}:{isAnchored:!0}),a=!0),d){if(c.naturalWidth!==t||c.naturalHeight!==n){if(a=!0,e.crop.y+=(n-c.naturalHeight)/2,t<c.width){const a=e.width/c.width;e.crop.x=0,e.crop.width=t,e.width=t*a}else{const a=c.x/(c.naturalWidth-c.x-c.width),i=t-c.width;e.crop.x=a*i/(1+a),e.crop.x+c.width>t&&(e.crop.x=(t-c.width)/2)}if(n<c.height){const t=e.height/c.height;e.crop.y=0,e.crop.height=n,e.height=n*t}else{const t=c.y/(c.naturalHeight-c.y-c.height),a=n-c.height;e.crop.y=t*a/(1+t),e.crop.y+c.height>n&&(e.crop.y=(n-c.height)/2)}e.crop.naturalWidth=t,e.crop.naturalHeight=n,e.crop.width===t&&e.crop.height===n&&(e.crop=null)}}else if(l){if(r!==s/o){a=!0;const i=Math.sqrt(s*o*n/t),r=Math.sqrt(s*o*t/n);e.height=i,e.width=r,e.y+=(o-i)/2,e.x+=(s-r)/2}}else s===t&&o===n||(a=!0,e.height=n,e.width=t,e.y+=(o-n)/2,e.x+=(s-t)/2)}))}return{dirty:a,scene:e}}function setDocLeftHandedMode(e,t){const a=t.createElement(\"style\");a.id=\"excalidraw-left-handed\",a.textContent=\".excalidraw .App-bottom-bar{justify-content:flex-end;}\";const i=t.getElementById(a.id);i&&t.head.removeChild(i),e&&t.head.appendChild(a)}function setLeftHandedMode(e){const t=new Set;EXCALIDRAW_PLUGIN.app.workspace.iterateAllLeaves((a=>{const i=DEVICE.isMobile?document:a.view.containerEl.ownerDocument;i&&(t.has(i)||(t.add(i),setDocLeftHandedMode(e,i)))}))}function calculateTrayModeValue(e){const{defaultTrayMode:t,compactModeOnTablets:a}=e;return DEVICE.isTablet?!a&&t:t}function setTrayMode(e,t){const a=calculateTrayModeValue(t);getExcalidrawViews(e).forEach((e=>e.setTrayMode(a)))}function getLinkParts(e,t){const a=e.match(/(^[^#\\|]*)#?(\\^)?([^\\|]*)?\\|?(\\d*)x?(\\d*)/),i=\"^\"===a[2];let n=parseInt(a[3]?.match(/page=(\\d*)/)?.[1]);return n=isNaN(n)?null:n,{original:e,path:t&&\"\"===a[1]?t.path:a[1],isBlockRef:i,ref:a[3]?.match(/^page=\\d*$/i)?a[3]:i?cleanBlockRef(a[3]):cleanSectionHeading(a[3]),width:a[4]?parseInt(a[4]):void 0,height:a[5]?parseInt(a[5]):void 0,page:n}}async function compressAsync(e){return await runCompressionWorker(e,\"compress\")}function compress(e){const t=LZString.compressToBase64(e);let a=\"\";for(let e=0;e<t.length;e+=256)a+=t.slice(e,e+256)+\"\\n\\n\";return a.trim()}function decompress(e,t=!1){let a=\"\";const i=e.length;for(let t=0;t<i;t++){const i=e[t];\"\\n\"!==i&&\"\\r\"!==i&&(a+=i)}return LZString.decompressFromBase64(a)}function isMaskFile(e,t){if(t){const a=e.app.metadataCache.getFileCache(t);if(a?.frontmatter&&null!==a.frontmatter[FRONTMATTER_KEYS.mask.name]&&void 0!==a.frontmatter[FRONTMATTER_KEYS.mask.name])return Boolean(a.frontmatter[FRONTMATTER_KEYS.mask.name])}return!1}function hasExportTheme(e,t){if(t){const a=e.app.metadataCache.getFileCache(t);if(a?.frontmatter&&null!==a.frontmatter[FRONTMATTER_KEYS[\"export-dark\"].name]&&void 0!==a.frontmatter[FRONTMATTER_KEYS[\"export-dark\"].name])return!0}return!1}function getExportTheme(e,t,a){if(t){const a=e.app.metadataCache.getFileCache(t);if(a?.frontmatter&&null!==a.frontmatter[FRONTMATTER_KEYS[\"export-dark\"].name]&&void 0!==a.frontmatter[FRONTMATTER_KEYS[\"export-dark\"].name])return a.frontmatter[FRONTMATTER_KEYS[\"export-dark\"].name]?\"dark\":\"light\"}return e.settings.exportWithTheme?a:\"light\"}function shouldEmbedScene(e,t){if(t){const a=e.app.metadataCache.getFileCache(t);if(a?.frontmatter&&null!==a.frontmatter[FRONTMATTER_KEYS[\"export-embed-scene\"].name]&&void 0!==a.frontmatter[FRONTMATTER_KEYS[\"export-embed-scene\"].name])return a.frontmatter[FRONTMATTER_KEYS[\"export-embed-scene\"].name]}return e.settings.exportEmbedScene}function hasExportBackground(e,t){if(t){const a=e.app.metadataCache.getFileCache(t);if(a?.frontmatter&&null!==a.frontmatter[FRONTMATTER_KEYS[\"export-transparent\"].name]&&void 0!==a.frontmatter[FRONTMATTER_KEYS[\"export-transparent\"].name])return!0}return!1}function getWithBackground(e,t){if(t){const a=e.app.metadataCache.getFileCache(t);if(a?.frontmatter&&null!==a.frontmatter[FRONTMATTER_KEYS[\"export-transparent\"].name]&&void 0!==a.frontmatter[FRONTMATTER_KEYS[\"export-transparent\"].name])return!a.frontmatter[FRONTMATTER_KEYS[\"export-transparent\"].name]}return e.settings.exportWithBackground}function getExportPadding(e,t){if(t){const a=e.app.metadataCache.getFileCache(t);if(!a?.frontmatter)return e.settings.exportPaddingSVG;if(null!==a.frontmatter[FRONTMATTER_KEYS[\"export-padding\"].name]&&void 0!==a.frontmatter[FRONTMATTER_KEYS[\"export-padding\"].name]){const e=parseInt(a.frontmatter[FRONTMATTER_KEYS[\"export-padding\"].name]);if(!isNaN(e))return e}if(null!==a.frontmatter[FRONTMATTER_KEYS[\"export-svgpadding\"].name]&&void 0!==a.frontmatter[FRONTMATTER_KEYS[\"export-svgpadding\"].name]){const e=parseInt(a.frontmatter[FRONTMATTER_KEYS[\"export-svgpadding\"].name]);if(!isNaN(e))return e}}return e.settings.exportPaddingSVG}function getPNGScale(e,t){if(t){const a=e.app.metadataCache.getFileCache(t);if(a?.frontmatter&&null!==a.frontmatter[FRONTMATTER_KEYS[\"export-pngscale\"].name]&&void 0!==a.frontmatter[FRONTMATTER_KEYS[\"export-pngscale\"].name]){const e=parseFloat(a.frontmatter[FRONTMATTER_KEYS[\"export-pngscale\"].name]);if(!isNaN(e)&&e>0)return e}}return e.settings.pngExportScale}function isVersionNewerThanOther(e,t){if(!e||!t)return!0;const a=e.match(/(\\d*)\\.(\\d*)\\.(\\d*)/),i=t.match(/(\\d*)\\.(\\d*)\\.(\\d*)/);return Boolean(a&&4===a.length&&i&&4===i.length&&!(isNaN(parseInt(a[1]))||isNaN(parseInt(a[2]))||isNaN(parseInt(a[3])))&&!(isNaN(parseInt(i[1]))||isNaN(parseInt(i[2]))||isNaN(parseInt(i[3])))&&(parseInt(a[1])>parseInt(i[1])||parseInt(a[1])>=parseInt(i[1])&&parseInt(a[2])>parseInt(i[2])||parseInt(a[1])>=parseInt(i[1])&&parseInt(a[2])>=parseInt(i[2])&&parseInt(a[3])>parseInt(i[3])))}function getEmbeddedFilenameParts(e){const t=e?.match(/([^#\\^]*)((#\\^)(group=|area=|frame=|clippedframe=|taskbone)?([^\\|]*)|(#)(group=|area=|frame=|clippedframe=|taskbone)?([^\\^\\|]*))(.*)/);return t?{filepath:t[1],hasBlockref:Boolean(t[3]),hasGroupref:\"group=\"===t[4]||\"group=\"===t[7],hasTaskbone:\"taskbone\"===t[4]||\"taskbone\"===t[7],hasArearef:\"area=\"===t[4]||\"area=\"===t[7],hasFrameref:\"frame=\"===t[4]||\"frame=\"===t[7],hasClippedFrameref:\"clippedframe=\"===t[4]||\"clippedframe=\"===t[7],blockref:t[5],hasSectionref:Boolean(t[6]),sectionref:t[8],linkpartReference:t[2],linkpartAlias:t[9]}:{filepath:e,hasBlockref:!1,hasGroupref:!1,hasTaskbone:!1,hasArearef:!1,hasFrameref:!1,hasClippedFrameref:!1,blockref:\"\",hasSectionref:!1,sectionref:\"\",linkpartReference:\"\",linkpartAlias:\"\"}}function isImagePartRef(e){return e.hasGroupref||e.hasArearef||e.hasFrameref||e.hasClippedFrameref}function fragWithHTML(e){return createFragment((t=>t.createDiv().innerHTML=e))}function errorlog(e){console.error({plugin:\"Excalidraw\",...e})}async function sleep$1(e){return new Promise((t=>setTimeout(t,e)))}function _getContainerElement(e,t){return e&&t?.elements&&\"text\"===e.type&&e.containerId?getContainerElement(e,arrayToMap(t.elements)):null}function arrayToMap(e){return e instanceof Map?e:e.reduce(((e,t)=>(e.set(\"string\"==typeof t?t:t.id,t),e)),new Map)}function updateFrontmatterInString(e,t){if(!e||!t)return e;for(const a of t){const t=new RegExp(`${a[0]}:\\\\s.*\\\\n`,\"g\");e=e.match(t)?e.replaceAll(t,`${a[0]}: ${a[1]}\\n`):e.replace(/^---\\n/,`---\\n${a[0]}: ${a[1]}\\n`)}return e}function isHyperLink(e){return e&&!e.includes(\"\\n\")&&!e.includes(\"\\r\")&&e.match(/^https?:(\\d*)?\\/\\/[^\\s]*$/)}function isContainer(e){return\"arrow\"!==e.type&&e.boundElements?.map((e=>e.type)).includes(\"text\")}function hyperlinkIsImage(e){isHyperLink(e);const t=e.split(\"?\")[0];return IMAGE_TYPES.contains(t.substring(t.lastIndexOf(\".\")+1))}function getFilePathFromObsidianURL(e){if(!e)return null;if(!e.startsWith(\"obsidian://\"))return null;try{const t=new URL(e).searchParams.get(\"file\");return t?decodeURIComponent(t):null}catch{return null}}function hyperlinkIsYouTubeLink(e){return isHyperLink(e)&&(e.startsWith(\"https://youtu.be\")||e.startsWith(\"https://www.youtube.com\")||e.startsWith(\"https://youtube.com\")||e.startsWith(\"https//www.youtu.be\"))&&null!==e.match(/(youtu.be\\/|v=)([^?\\/\\&]*)/)}async function getYouTubeThumbnailLink(e){const t=e.match(/(youtu.be\\/|v=)([^?\\/\\&]*)/);if(!t||!t[2])return null;const a=t[2];let i=`https://i.ytimg.com/vi/${a}/maxresdefault.jpg`,n=await obsidian_module.requestUrl({url:i,method:\"get\",contentType:\"image/jpeg\",throw:!1});return n&&200===n.status?i:(i=`https://i.ytimg.com/vi/${a}/hq720.jpg`,n=await obsidian_module.requestUrl({url:i,method:\"get\",contentType:\"image/jpeg\",throw:!1}),n&&200===n.status?i:(i=`https://i.ytimg.com/vi/${a}/mqdefault.jpg`,n=await obsidian_module.requestUrl({url:i,method:\"get\",contentType:\"image/jpeg\",throw:!1}),n&&200===n.status?i:`https://i.ytimg.com/vi/${a}/default.jpg`))}function isCallerFromTemplaterPlugin(e){const t=e.split(\"\\n\");for(const e of t)if(e.trim().startsWith(\"at Templater.\"))return!0;return!1}function convertSVGStringToElement(e){const t=document.createElement(\"div\");t.innerHTML=e;const a=t.firstChild;if(a instanceof SVGSVGElement)return a}function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")}async function addYouTubeThumbnail(e,t,a,i=\"settings\"){const n=e.createDiv({cls:`excalidraw-videoWrapper ${i}`}),r=await getYouTubeThumbnailLink(`https://www.youtube.com/watch?v=${t}`);n.createEl(\"a\",{attr:{href:\"https://www.youtube.com/watch?v=\"+t+(a?\"&t=\"+a:\"\"),target:\"_blank\",rel:\"noopener noreferrer\"}}).createEl(\"img\",{attr:{src:r||`https://i.ytimg.com/vi/${t}/default.jpg`,alt:\"YouTube video thumbnail\",style:\"width: 100%; height: auto; cursor: pointer;\"}})}async function getFontMetrics(e,t){try{const a=await opentype.load(e),i=a.unitsPerEm,n=a.ascender,r=a.descender;return{unitsPerEm:i,ascender:n,descender:r,lineHeight:(n-r)/i,fontName:a.names.fontFamily.en??t}}catch(e){return console.error(\"Error loading font:\",e),null}}function cropCanvas(e,t,a={width:t.width,height:t.height}){const i=createEl(\"canvas\");return i.width=a.width,i.height=a.height,i.getContext(\"2d\").drawImage(e,t.left,t.top,t.width,t.height,0,0,a.width,a.height),i}async function promiseTry(e,...t){return new Promise((a=>{a(e(...t))}))}new Random(Date.now());class PromisePool{pool;entries={};constructor(e,t){this.pool=new Pool(e,t)}all(){const e=e=>{if(e.data.result){const[t,a]=e.data.result;this.entries[t]=a}};return this.pool.addEventListener(\"fulfilled\",e),this.pool.start().then((()=>(setTimeout((()=>{this.pool.removeEventListener(\"fulfilled\",e)})),Object.values(this.entries))))}}class WeakArray{weakArray=[];constructor(){}push(e){this.weakArray.push(new WeakRef(e))}forEach(e){this.weakArray.forEach(((t,a)=>{const i=t.deref();i&&e(i,a)}))}removeObjects(e){this.weakArray=this.weakArray.filter((t=>{const a=t.deref();return a&&!e.has(a)}))}clear(){this.weakArray=[]}}class ScriptEngine{plugin;app;scriptPath;scriptIconMap;eaInstances=new WeakArray;constructor(e){this.plugin=e,this.app=e.app,this.scriptIconMap={},this.loadScripts(),this.registerEventHandlers()}removeViewEAs(e){const t=new Set;this.eaInstances.forEach((a=>{a.targetView===e&&(t.add(a),a.destroy())})),this.eaInstances.removeObjects(t)}destroy(){this.eaInstances.forEach((e=>e.destroy())),this.eaInstances.clear(),this.eaInstances=null,this.scriptIconMap=null,this.plugin=null,this.scriptPath=null}handleSvgFileChange(e){if(!e.endsWith(\".svg\"))return;const t=this.app.vault.getAbstractFileByPath(getIMGFilename(e,\"md\"));t&&t instanceof obsidian_module.TFile&&(this.unloadScript(this.getScriptName(t),t.path),this.loadScript(t))}async deleteEventHandler(e){e instanceof obsidian_module.TFile&&e.path.startsWith(this.scriptPath)&&(this.unloadScript(this.getScriptName(e),e.path),this.handleSvgFileChange(e.path))}async createEventHandler(e){e instanceof obsidian_module.TFile&&e.path.startsWith(this.scriptPath)&&(this.loadScript(e),this.handleSvgFileChange(e.path))}async renameEventHandler(e,t){if(!(e instanceof obsidian_module.TFile))return;const a=t.startsWith(this.scriptPath),i=e.path.startsWith(this.scriptPath);a&&(this.unloadScript(this.getScriptName(t),t),this.handleSvgFileChange(t)),i&&(this.loadScript(e),this.handleSvgFileChange(e.path))}registerEventHandlers(){this.plugin.registerEvent(this.app.vault.on(\"delete\",(e=>this.deleteEventHandler(e)))),this.plugin.registerEvent(this.app.vault.on(\"create\",(e=>this.createEventHandler(e)))),this.plugin.registerEvent(this.app.vault.on(\"rename\",((e,t)=>this.renameEventHandler(e,t))))}updateScriptPath(){this.scriptPath!==this.plugin.settings.scriptFolderPath&&(this.scriptPath&&this.unloadScripts(),this.loadScripts())}getListofScripts(){if(this.scriptPath=this.plugin.settings.scriptFolderPath,this.scriptPath&&(this.scriptPath=obsidian_module.normalizePath(this.scriptPath),this.app.vault.getAbstractFileByPath(this.scriptPath)))return this.app.vault.getFiles().filter((e=>e.path.startsWith(this.scriptPath+\"/\")&&\"md\"===e.extension))}loadScripts(){this.getListofScripts()?.forEach((e=>this.loadScript(e)))}getScriptName(e){let t=\"\",a=\"\";e instanceof obsidian_module.TFile?(t=e.basename,a=e.path):(t=splitFolderAndFilename(e).basename,a=e);const i=a.split(`${this.scriptPath}/`)[1];i||console.warn(`ScriptEngine.getScriptName unexpected basename: ${t}; path: ${a}`);const n=i?.lastIndexOf(\"/\");return n>-1?i.substring(0,n+1)+t:t}async addScriptIconToMap(e,t){const a=getIMGFilename(e,\"svg\"),i=this.app.vault.getAbstractFileByPath(a),n=i&&i instanceof obsidian_module.TFile?await this.app.vault.read(i):null;this.scriptIconMap={...this.scriptIconMap};const r=splitFolderAndFilename(t);this.scriptIconMap[e]={name:r.filename,group:r.folderpath,svgString:n},this.updateToolPannels()}loadScript(e){if(\"md\"!==e.extension)return;const t=this.getScriptName(e);this.addScriptIconToMap(e.path,t),this.plugin.addCommand({id:t,name:`(Script) ${t}`,checkCallback:a=>{if(a)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const i=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!i&&((async()=>{const a=await this.app.vault.read(e);a&&this.executeScript(i,a,t,e)})(),!0)}})}unloadScripts(){const e=this.app.vault.getFiles().filter((e=>e.path.startsWith(this.scriptPath)));e.forEach((e=>{this.unloadScript(this.getScriptName(e),e.path)}))}unloadScript(e,t){if(!t.endsWith(\".md\"))return;delete this.scriptIconMap[t],this.scriptIconMap={...this.scriptIconMap},this.updateToolPannels();const a=`${PLUGIN_ID}:${e}`;this.app.commands.commands[a]&&delete this.app.commands.commands[a]}async executeScript(e,t,a,i){if(!e||!t||!a)return;e.getScene().elements.some((e=>!e.isDeleted&&\"text\"===e.type&&e.id.length>8))&&await e.save(!1,!0),t=t.replace(/^---.*?---\\n/gs,\"\");const n=getEA(e);this.eaInstances.push(n),n.activeScript=a;const r=Object.getPrototypeOf((async()=>{})).constructor;let s=null;return s=await new r(\"ea\",\"utils\",t)(n,{inputPrompt:(t,a,i,n,r,s,o,l,c,d)=>{if(\"object\"==typeof t){const e=t;t=e.header,a=e.placeholder,i=e.value,n=e.buttons,r=e.lines,s=e.displayEditorButtons,o=e.customComponents,l=e.blockPointerInputOutsideModal,c=e.controlsOnTop,d=e.draggable}return ScriptEngine.inputPrompt(e,this.plugin,this.app,t,a,i,n,r,s,o,l,c,d)},suggester:(e,t,a,i)=>ScriptEngine.suggester(this.app,e,t,a,i),scriptFile:i}),s}updateToolPannels(){getExcalidrawViews(this.app).forEach((e=>{e.toolsPanelRef?.current?.updateScriptIconMap(this.scriptIconMap)}))}static async inputPrompt(e,t,a,i,n,r,s,o,l,c,d,h,p=!1){try{return await GenericInputPrompt.Prompt(e,t,a,i,n,r,s,o,l,c,d,h,p)}catch{return}}static async suggester(e,t,a,i,n){try{return await GenericSuggester.Suggest(e,t,a,i,n)}catch(e){return}}}async function insertImageToView(e,t,a,i,n=!0,r=!1){n&&e.clear(),e.style.strokeColor=\"transparent\",e.style.backgroundColor=\"transparent\";const s=e.getExcalidrawAPI();e.canvas.theme=s.getAppState().theme;const o=await e.addImage(t.x,t.y,a,i);return n&&await e.addElementsToView(r,!0,!0),o}function deleteAppStateKeys(e,[...t]){return t.forEach((t=>{delete e[t]})),e}async function insertEmbeddableToView(e,t,a,i,n=!0){n&&e.clear();const r=e.getExcalidrawAPI().getAppState();if(e.plugin.settings.embeddableMarkdownDefaults.backgroundMatchElement?e.style.backgroundColor=r.currentItemBackgroundColor:e.style.backgroundColor=\"transparent\",e.plugin.settings.embeddableMarkdownDefaults.borderMatchElement?e.style.strokeColor=r.currentItemStrokeColor:e.style.strokeColor=\"transparent\",a&&(IMAGE_TYPES.contains(a.extension)||e.isExcalidrawFile(a))&&!ANIMATED_IMAGE_TYPES.contains(a.extension))return await insertImageToView(e,t,i??a,void 0,n);{let r=MAX_IMAGE_SIZE;(a&&AUDIO_TYPES.contains(a.extension.toLowerCase())||i&&AUDIO_TYPES.contains(i.match(/\\[\\[[^\\]]+?\\.([^\\.\\]]+)]]/)?.[1]?.toLocaleLowerCase()))&&(e.style.strokeColor=\"transparent\",e.style.backgroundColor=\"transparent\",r=getAudioElementHeight());const s=e.addEmbeddable(t.x,t.y,MAX_IMAGE_SIZE,r,i,a);return n&&await e.addElementsToView(!1,!0,!0),s}}function getLinkTextFromLink(e){if(!e)return;if(e.match(REG_LINKINDEX_HYPERLINK))return;const t=REGEX_LINK.getRes(e).next();if(!t.value)return;const a=REGEX_LINK.getLink(t);return a.match(REG_LINKINDEX_HYPERLINK)?void 0:a}function openTagSearch(e,t,a){const i=REGEX_TAGS.getResList(e);if(!i.length||!i[0].value||i[0].value.length<2)return;const n=`tag:${i[0].value[1]}`,r=t.internalPlugins.getPluginById(\"global-search\");if(r){const e=r.instance;e&&e.openGlobalSearch(n)}a&&a.isFullscreen()&&a.exitFullscreen()}function getLinkFromMarkdownLink(e){const t=/^\\[[^\\]]*]\\(([^\\)]*)\\)/.exec(e);return t?t[1]:e}function openExternalLink(e,t,a){if((e=getLinkFromMarkdownLink(e)).match(/^cmd:\\/\\/.*/)){const a=e.replace(\"cmd://\",\"\");return t.commands.executeCommandById(a),!0}return!(e.startsWith(\"obsidian://\")||!e.match(REG_LINKINDEX_HYPERLINK)||(window.open(e,\"_blank\"),0))}function parseObsidianLink(e,t,a=!0,i=!0){if(!e)return!1;if(e=getLinkFromMarkdownLink(e),!e?.startsWith(\"obsidian://\"))return!1;const n=new URL(e),r=n.pathname.slice(2),s={};if(n.searchParams.forEach(((e,t)=>{s[t]=decodeURIComponent(e)})),\"open\"===r&&s.vault===t.vault.getName()){const e=s.file,i=t.metadataCache.getFirstLinkpathDest(e,\"\");if(i&&i instanceof obsidian_module.TFile)return a?`[[${i.path}]]`:i.path}return i&&window.open(e,\"_blank\"),!0}function getExcalidrawFileForwardLinks(e,t,a){let i=\"\";const n=e.metadataCache.getLinks()[t.path];if(n&&n.length>0){const r=new Set;n.forEach((i=>{const n=getLinkParts(i.link),s=e.metadataCache.getFirstLinkpathDest(n.path,t.path);if(s&&s.path!==t.path){if(a.has(s.path))return;a.add(s.path),r.add(`[[${s.path}${n.ref?\"#\"+n.ref:\"\"}|Second Order Link: ${s.basename}]]`)}})),i=[...r].join(\" \")}return i}function getFrameBasedOnFrameNameOrId(e,t){const a=t.filter((e=>\"frame\"===e.type)).map((e=>({el:e,id:e.id,name:e.name??\"Frame\"}))).filter((t=>t.id===e||t.name===e)).map((e=>e.el));return 1===a.length?a[0]:null}async function addBackOfTheNoteCard(e,t,a=!0,i,n,r=!1,s){const o=e.data,l=getExcalidrawMarkdownHeaderSection(o),c=o.split(l)[1],d=c&&c.startsWith(\"%%\"),h=l.match(/#\\n+$/m),p=Boolean(h);e.data=o.replace(l,(p?l.substring(0,l.length-h[0].length):l)+`\\n# ${t}\\n\\n${i?i+\"\\n\\n\":\"\"}${d||p?\"#\\n\":\"\"}`),await e.forceSave(!0);let u,m=0;for(await sleep(200);m++<10&&!(u=(await e.app.metadataCache.blockCache.getForFile({isCancelled:()=>!1},e.file)).blocks.filter((e=>e.display&&\"heading\"===e.node?.type)).filter((e=>!MD_EX_SECTIONS.includes(e.display))).map((e=>cleanSectionHeading(e.display))).find((e=>e===t)));)await sleep(200);const g=getEA(e);let{x:f,y:b}=s??g.targetView.currentPosition;if(r){const e=g.getViewCenterPosition();e&&(f=e.x-CARD_WIDTH/2,b=e.y-CARD_HEIGHT/2)}const U=g.addEmbeddable(f,b,CARD_WIDTH,CARD_HEIGHT,`[[${e.file.path}#${t}]]`,void 0,n);await g.addElementsToView(!r,!1,!0);const E=e.excalidrawAPI,w=g.getViewElements().find((e=>e.id===U));return E.selectElements([w]),a&&window.setTimeout((()=>{E.updateScene({appState:{activeEmbeddable:{element:w,state:\"active\"}},captureUpdate:CaptureUpdateAction.NEVER}),u&&e.getEmbeddableLeafElementById(w.id)?.editNode?.()}),200),g.destroy(),w.id}function renderContextMenuAction(e,t,a,i){return e.createElement(\"li\",{key:nanoid$1(),onClick:()=>{i((()=>a()))}},e.createElement(\"button\",{className:\"context-menu-item\"},e.createElement(\"div\",{className:\"context-menu-item__label\"},t),e.createElement(\"kbd\",{className:\"context-menu-item__shortcut\"},\"\")))}function tmpBruteForceCleanup(e){window.setTimeout((()=>{e&&Object.keys(e).forEach((t=>{delete e[t]}))}),500)}function isTextImageTransclusion(e,t,a){const i=e.trim().matchAll(/^!\\[\\[([^|\\]]*)?.*?]]$|^!\\[[^\\]]*?]\\((.*?)\\)$/g).next();if(i?.value?.[0]){const e=i.value[1]??i.value[2],n=t.app.metadataCache.getFirstLinkpathDest(e?.split(\"#\")[0],t.file.path);if(t.file===n)return e?.split(\"#\")[1]&&!isImagePartRef(getEmbeddedFilenameParts(e))||new obsidian_module.Notice(t$d(\"RECURSIVE_INSERT_ERROR\")),!1;if(n&&n instanceof obsidian_module.TFile){if(t.plugin.isExcalidrawFile(n)&&e?.split(\"#\")[1]&&!isImagePartRef(getEmbeddedFilenameParts(e)))return!1;if(\"md\"!==n.extension||t.plugin.isExcalidrawFile(n))return a(e,n),!0;new obsidian_module.Notice(t$d(\"USE_INSERT_FILE_MODAL\"),5e3)}}return!1}function displayFontMessage(e){const t=new obsidian_module.Modal(e);t.onOpen=()=>{const e=t.contentEl;e.createEl(\"h2\",{text:t$d(\"FONT_INFO_TITLE\")});const a=t$d(\"FONT_INFO_DETAILED\");e.createDiv({cls:\"release-notes\"}).innerHTML=a},t.open()}async function toggleImageAnchoring(e,t,a,i){const n=getEA(t);let r=t.getViewElements().find((t=>t.id===e.id));if(r){if(n.copyViewElementsToEAforEditing([r]),r=n.getElements()[0],r.customData||(r.customData={}),r.customData.isAnchored=a,a){const{height:e,width:t}=i.size,a=t-r.width,n=e-r.height;r.height=e,r.width=t,r.x-=a/2,r.y-=n/2}await n.addElementsToView(!1,!1),n.destroy()}else n.destroy()}function onLoadMessages(e,t,a){setTimeout((()=>{!(t.appState.frameRendering?.markerEnabled??1)&&t.elements.some((e=>\"frame\"===e.type&&\"marker\"===e.frameRole))&&new obsidian_module.Notice(t$d(\"MARKER_FRAME_RENDERING_DISABLED_NOTICE\"))}))}class Prompt extends obsidian_module.Modal{prompt_text;default_value;placeholder;prompt_desc;promptEl;resolve;constructor(e,t,a,i,n){super(e),this.prompt_text=t,this.default_value=a,this.placeholder=i,this.prompt_desc=n}onOpen(){this.titleEl.setText(this.prompt_text),this.createForm()}onClose(){this.contentEl.empty()}createForm(){let e=this.contentEl.createDiv();e.addClass(\"excalidraw-prompt-div\"),this.prompt_desc&&(e=e.createDiv(),e.style.width=\"100%\",e.createEl(\"p\").innerHTML=this.prompt_desc);const t=e.createEl(\"form\");t.addClass(\"excalidraw-prompt-form\"),t.type=\"submit\",t.onsubmit=e=>{e.preventDefault(),this.resolve(this.promptEl.value),this.close()},this.promptEl=t.createEl(\"input\"),this.promptEl.type=\"text\",this.promptEl.placeholder=this.placeholder,this.promptEl.value=this.default_value??\"\",this.promptEl.addClass(\"excalidraw-prompt-input\"),this.promptEl.select()}async openAndGetValue(e){this.resolve=e,this.open()}}class GenericInputPrompt extends obsidian_module.Modal{header;waitForClose;view;plugin;resolvePromise;rejectPromise;didSubmit=!1;inputComponent;input;buttons;lines=1;displayEditorButtons=!1;placeholder;selectionStart=0;selectionEnd=0;selectionUpdateTimer=0;customComponents;blockPointerInputOutsideModal=!1;controlsOnTop=!1;draggable=!1;cleanupDragListeners=null;static Prompt(e,t,a,i,n,r,s,o,l,c,d,h,p){return new GenericInputPrompt(e,t,a,i,n,r,s,o,l,c,d,h,p).waitForClose}constructor(e,t,a,i,n,r,s,o,l,c,d,h,p){super(a),this.header=i,this.view=e,this.plugin=t,this.placeholder=n,this.input=r,this.buttons=s,this.lines=o??1,this.displayEditorButtons=this.lines>1&&(l??!1),this.customComponents=c,this.blockPointerInputOutsideModal=d??!1,this.controlsOnTop=h??!1,this.draggable=p??!1,this.waitForClose=new Promise(((e,t)=>{this.resolvePromise=e,this.rejectPromise=t})),this.display(),this.inputComponent.inputEl.focus(),this.open()}display(){this.contentEl.empty(),this.blockPointerInputOutsideModal&&(this.bgEl.style.pointerEvents=this.blockPointerInputOutsideModal?\"none\":\"auto\"),this.titleEl.textContent=this.header;const e=this.contentEl.createDiv();this.controlsOnTop?(this.customComponents?.(e),this.createButtonBar(e),this.inputComponent=this.createInputField(e,this.placeholder,this.input)):(this.inputComponent=this.createInputField(e,this.placeholder,this.input),this.customComponents?.(e),this.createButtonBar(e))}createInputField(e,t,a){const i=new obsidian_module.TextAreaComponent(e);i.inputEl.style.width=\"100%\",i.inputEl.style.height=2*this.lines+\"em\",1===this.lines&&(i.inputEl.style.resize=\"none\",i.inputEl.style.overflow=\"hidden\"),i.setPlaceholder(t??\"\").setValue(a??\"\").onChange((e=>this.input=e));const n=()=>{this.selectionUpdateTimer=this.view.ownerWindow.setTimeout((()=>{this.selectionStart=this.inputComponent.inputEl.selectionStart,this.selectionEnd=this.inputComponent.inputEl.selectionEnd}),30)};return i.inputEl.addEventListener(\"keydown\",this.keyDownCallback.bind(this)),i.inputEl.addEventListener(\"keyup\",n.bind(this)),i.inputEl.addEventListener(\"pointerup\",n.bind(this)),i.inputEl.addEventListener(\"touchend\",n.bind(this)),i.inputEl.addEventListener(\"input\",n.bind(this)),i.inputEl.addEventListener(\"paste\",n.bind(this)),i.inputEl.addEventListener(\"cut\",n.bind(this)),i.inputEl.addEventListener(\"select\",n.bind(this)),i.inputEl.addEventListener(\"selectionchange\",n.bind(this)),i}createButton(e,t,a,i=\"\",n=\"5px\"){const r=new obsidian_module.ButtonComponent(e);return r.buttonEl.style.padding=\"0.5em\",r.buttonEl.style.marginLeft=n,r.setTooltip(i),r.setButtonText(t).onClick(a),r}createButtonBar(e){const t=e.createDiv();t.addClass(\"excalidraw-prompt-buttonbar-\"+(this.controlsOnTop?\"top\":\"bottom\"));const a=t.createDiv(),i=t.createDiv();if(this.buttons&&this.buttons.length>0){let e=null;for(const t of this.buttons){const a=new obsidian_module.ButtonComponent(i);a.buttonEl.style.marginLeft=\"5px\",t.tooltip&&a.setTooltip(t.tooltip),a.setButtonText(t.caption).onClick((e=>{const a=t.action(this.input);a&&(this.input=a),this.submit()})),e=e??a}e&&(e.setCta(),e.buttonEl.style.marginRight=\"0\")}else this.createButton(i,\"\u2705\",this.submitClickCallback.bind(this)).setCta().buttonEl.style.marginRight=\"0\";this.createButton(i,\"\u274c\",this.cancelClickCallback.bind(this),t$d(\"PROMPT_BUTTON_CANCEL\")),this.displayEditorButtons&&(this.createButton(a,\"\u23ce\",(()=>this.insertStringBtnClickCallback(\"\\n\")),t$d(\"PROMPT_BUTTON_INSERT_LINE\"),\"0\"),this.createButton(a,\"\u232b\",this.delBtnClickCallback.bind(this),\"Delete\"),this.createButton(a,\"\u23b5\",(()=>this.insertStringBtnClickCallback(\" \")),t$d(\"PROMPT_BUTTON_INSERT_SPACE\")),this.createButton(a,\"\u00a7\",this.specialCharsBtnClickCallback.bind(this),t$d(\"PROMPT_BUTTON_SPECIAL_CHARS\")),this.view&&this.createButton(a,\"\ud83d\udd17\",this.linkBtnClickCallback.bind(this),t$d(\"PROMPT_BUTTON_INSERT_LINK\")),this.createButton(a,\"\ud83d\udd20\",this.uppercaseBtnClickCallback.bind(this),t$d(\"PROMPT_BUTTON_UPPERCASE\")))}linkBtnClickCallback=()=>{this.view.ownerWindow.clearTimeout(this.selectionUpdateTimer),this.plugin.insertLinkDialog.start(this.view.file.path,(e=>{const t=this.inputComponent.inputEl.value;this.selectionStart>0&&\" \"!==t.slice(this.selectionStart-1,this.selectionStart)&&(e=\" \"+e),this.selectionStart<t.length&&\" \"!==t.slice(this.selectionStart,this.selectionStart+1)&&(e+=\" \");const a=this.inputComponent.inputEl.value.slice(0,this.selectionStart)+e+this.inputComponent.inputEl.value.slice(this.selectionStart);this.inputComponent.inputEl.value=a,this.input=this.inputComponent.inputEl.value,this.inputComponent.inputEl.focus(),this.selectionStart=this.selectionStart+e.length,this.selectionEnd=this.selectionStart+e.length,this.inputComponent.inputEl.setSelectionRange(this.selectionStart,this.selectionStart)}))};insertStringBtnClickCallback=e=>{this.view.ownerWindow.clearTimeout(this.selectionUpdateTimer);const t=this.inputComponent.inputEl.value.slice(0,this.selectionStart)+e+this.inputComponent.inputEl.value.slice(this.selectionStart);this.inputComponent.inputEl.value=t,this.input=this.inputComponent.inputEl.value,this.inputComponent.inputEl.focus(),this.selectionStart=this.selectionStart+1,this.selectionEnd=this.selectionStart,this.inputComponent.inputEl.setSelectionRange(this.selectionStart,this.selectionEnd)};delBtnClickCallback=()=>{if(this.view.ownerWindow.clearTimeout(this.selectionUpdateTimer),0===this.input.length)return;const e=this.selectionEnd>this.selectionStart?this.selectionStart:this.selectionStart>0?this.selectionStart-1:0,t=this.selectionEnd,a=this.inputComponent.inputEl.value.slice(0,e)+this.inputComponent.inputEl.value.slice(t);this.inputComponent.inputEl.value=a,this.input=this.inputComponent.inputEl.value,this.inputComponent.inputEl.focus(),this.selectionStart=e,this.selectionEnd=e,this.inputComponent.inputEl.setSelectionRange(e,e)};uppercaseBtnClickCallback=()=>{if(this.view.ownerWindow.clearTimeout(this.selectionUpdateTimer),this.selectionEnd===this.selectionStart)return;const e=this.inputComponent.inputEl.value.slice(0,this.selectionStart)+this.inputComponent.inputEl.value.slice(this.selectionStart,this.selectionEnd).toUpperCase()+this.inputComponent.inputEl.value.slice(this.selectionEnd);this.inputComponent.inputEl.value=e,this.input=this.inputComponent.inputEl.value,this.inputComponent.inputEl.focus(),this.inputComponent.inputEl.setSelectionRange(this.selectionStart,this.selectionEnd)};submitClickCallback(){this.submit()}cancelClickCallback(){this.cancel()}keyDownCallback=e=>{(\"Enter\"===e.key&&1===this.lines||isWinCTRLorMacCMD(e)&&\"Enter\"===e.key)&&(e.preventDefault(),this.submit()),this.displayEditorButtons&&\"k\"===e.key&&isWinCTRLorMacCMD(e)&&(e.preventDefault(),this.linkBtnClickCallback())};submit(){this.didSubmit=!0,this.close()}cancel(){this.close()}resolveInput(){this.didSubmit?this.resolvePromise(this.input):this.rejectPromise(\"No input given.\")}removeInputListener(){this.inputComponent?.inputEl?.removeEventListener(\"keydown\",this.keyDownCallback)}specialCharsBtnClickCallback=e=>{this.view.ownerWindow.clearTimeout(this.selectionUpdateTimer);const t=document.querySelector(\".excalidraw-special-chars-popup\");if(t)return void t.remove();const a=document.createElement(\"div\");a.className=\"excalidraw-special-chars-popup\",a.style.position=\"absolute\",a.style.zIndex=\"1000\",a.style.background=\"var(--background-primary)\",a.style.border=\"1px solid var(--background-modifier-border)\",a.style.borderRadius=\"4px\",a.style.padding=\"4px\",a.style.boxShadow=\"0 2px 8px var(--background-modifier-box-shadow)\",a.style.display=\"flex\",a.style.flexWrap=\"wrap\",a.style.maxWidth=\"200px\";const i=e.target.getBoundingClientRect();a.style.top=`${i.bottom+5}px`,a.style.left=`${i.left}px`,[\",\",\".\",\":\",\";\",\"!\",\"?\",'\"',\"{\",\"}\",\"[\",\"]\",\"(\",\")\"].forEach((e=>{const t=document.createElement(\"button\");t.textContent=e,t.style.margin=\"2px\",t.style.width=\"28px\",t.style.height=\"28px\",t.style.cursor=\"pointer\",t.style.background=\"var(--interactive-normal)\",t.style.border=\"none\",t.style.borderRadius=\"4px\",t.addEventListener(\"click\",(()=>{this.insertStringBtnClickCallback(e),a.remove()})),a.appendChild(t)}));const n=t=>{a.contains(t.target)||e.target===t.target||(a.remove(),document.removeEventListener(\"click\",n))};document.body.appendChild(a),setTimeout((()=>{document.addEventListener(\"click\",n)}),10)};onOpen(){super.onOpen(),this.inputComponent.inputEl.focus(),this.inputComponent.inputEl.select(),this.draggable&&this.makeModalDraggable()}makeModalDraggable(){let e,t,a,i,n=!1,r=null,s=null;const o=this.modalEl,l=o.querySelector(\".modal-titlebar\")||o.querySelector(\".modal-title\")||o;l.style.cursor=\"move\";const c=e=>{const t=e.target;if(t&&(\"SELECT\"===t.tagName||\"INPUT\"===t.tagName||\"TEXTAREA\"===t.tagName||\"BUTTON\"===t.tagName))if(r=t,\"TEXTAREA\"===t.tagName||\"INPUT\"===t.tagName&&\"number\"!==t.type){const e=t;s={start:e.selectionStart||0,end:e.selectionEnd||0}}else s=null},d=r=>{const s=r.target;if(\"INPUT\"===s.tagName||\"TEXTAREA\"===s.tagName||\"BUTTON\"===s.tagName||\"SELECT\"===s.tagName||s.closest(\"button\")||s.closest(\"input\")||s.closest(\"textarea\")||s.closest(\"select\"))return;if(!l.contains(s)&&!o.querySelector(\".modal-content\")?.contains(s))return;n=!0,e=r.clientX,t=r.clientY;const c=o.getBoundingClientRect();a=c.left,i=c.top,o.style.position=\"absolute\",o.style.margin=\"0\",o.style.left=`${a}px`,o.style.top=`${i}px`},h=r=>{if(!n)return;const s=r.clientX-e,l=r.clientY-t;o.style.left=`${a+s}px`,o.style.top=`${i+l}px`},p=()=>{n&&(n=!1,r&&r.isConnected&&setTimeout((()=>{r.focus(),s&&(\"TEXTAREA\"===r.tagName||\"INPUT\"===r.tagName&&\"number\"!==r.type)&&r.setSelectionRange(s.start,s.end)}),0))};r=this.inputComponent.inputEl,s={start:this.inputComponent.inputEl.selectionStart||0,end:this.inputComponent.inputEl.selectionEnd||0},o.addEventListener(\"focusin\",c),o.addEventListener(\"pointerdown\",d),document.addEventListener(\"pointermove\",h),document.addEventListener(\"pointerup\",p),this.cleanupDragListeners=()=>{o.removeEventListener(\"focusin\",c),o.removeEventListener(\"pointerdown\",d),document.removeEventListener(\"pointermove\",h),document.removeEventListener(\"pointerup\",p)}}onClose(){super.onClose(),this.resolveInput(),this.removeInputListener(),this.cleanupDragListeners&&(this.cleanupDragListeners(),this.cleanupDragListeners=null)}}class GenericSuggester extends obsidian_module.FuzzySuggestModal{displayItems;items;hint;instructions;resolvePromise;rejectPromise;promise;resolved;static Suggest(e,t,a,i,n){return new GenericSuggester(e,t,a,i,n).promise}constructor(e,t,a,i,n){super(e),this.displayItems=t,this.items=a,this.hint=i,this.instructions=n,this.limit=20,this.setPlaceholder(this.hint??\"\"),n&&this.setInstructions(this.instructions),this.promise=new Promise(((e,t)=>{this.resolvePromise=e,this.rejectPromise=t})),this.open()}getItemText(e){return this.displayItems[this.items.indexOf(e)]}getItems(){return this.items}selectSuggestion(e,t){this.resolved=!0,super.selectSuggestion(e,t)}onChooseItem(e){this.resolved=!0,this.resolvePromise(e)}onClose(){super.onClose(),this.resolved||this.rejectPromise(this.inputEl.value)}}class NewFileActions extends obsidian_module.Modal{waitForClose;resolvePromise;rejectPromise;newFile=null;plugin;path;keys;view;openNewFile;parentFile;sourceElement;constructor({plugin:e,path:t,keys:a,view:i,openNewFile:n=!0,parentFile:r,sourceElement:s}){super(e.app),this.plugin=e,this.path=t,this.keys=a,this.view=i,this.openNewFile=n,this.sourceElement=s,this.parentFile=r??i.file,this.waitForClose=new Promise(((e,t)=>{this.resolvePromise=e,this.rejectPromise=t}))}onOpen(){this.createForm()}openFile(e){this.newFile=e,e&&this.openNewFile&&openLeaf({plugin:this.plugin,fnGetLeaf:()=>getLeaf(this.plugin,this.view.leaf,this.keys),file:e,openState:{active:!0}})}onClose(){super.onClose(),this.resolvePromise(this.newFile),this.app=null,this.plugin=null,this.view=null,this.parentFile=null,this.sourceElement=null}createForm(){this.titleEl.setText(t$d(\"PROMPT_TITLE_NEW_FILE\")),this.contentEl.createDiv({cls:\"excalidraw-prompt-center\",text:t$d(\"PROMPT_FILE_DOES_NOT_EXIST\")}),this.contentEl.createDiv({cls:\"excalidraw-prompt-center filepath\",text:this.path}),this.contentEl.createDiv({cls:\"excalidraw-prompt-center\"},(e=>{e.style.textAlign=\"right\";const t=()=>this.path&&\"\"!==this.path?!!this.parentFile||(new obsidian_module.Notice(t$d(\"PROMPT_ERROR_DRAWING_CLOSED\")),!1):(new obsidian_module.Notice(t$d(\"PROMPT_ERROR_NO_FILENAME\")),!1),a=async e=>{if(!this.path.includes(\"/\")){const e=new RegExp(`${escapeRegExp(this.parentFile.name)}$`,\"g\");this.path=this.parentFile.path.replace(e,this.path)}return this.path.match(/\\.md$/)||(this.path=`${this.path}.md`),await createOrOverwriteFile(this.app,this.path,e)};this.sourceElement&&(e.createEl(\"button\",{text:t$d(\"PROMPT_BUTTON_EMBED_MARKDOWN\"),attr:{\"aria-label\":t$d(\"PROMPT_BUTTON_EMBED_MARKDOWN_ARIA\")}}).onclick=async()=>{if(!t)return;const e=await a(\"\");if(e){const t=getEA(this.view);t.copyViewElementsToEAforEditing([this.sourceElement]),t.getElement(this.sourceElement.id).isDeleted=!0,t.addEmbeddable(this.sourceElement.x,this.sourceElement.y,MAX_IMAGE_SIZE,MAX_IMAGE_SIZE,void 0,e),await t.addElementsToView(),t.destroy()}this.close()}),e.createEl(\"button\",{text:t$d(\"PROMPT_BUTTON_CREATE_MARKDOWN\"),attr:{\"aria-label\":t$d(\"PROMPT_BUTTON_CREATE_MARKDOWN_ARIA\")}}).onclick=async()=>{if(!t)return;const e=await a(\"\");this.openFile(e),this.close()},e.createEl(\"button\",{text:t$d(\"PROMPT_BUTTON_CREATE_EXCALIDRAW\"),attr:{\"aria-label\":t$d(\"PROMPT_BUTTON_CREATE_EXCALIDRAW_ARIA\")}}).onclick=async()=>{if(!t)return;const e=await a(await this.plugin.getBlankDrawing());await sleep$1(200),this.openFile(e),this.close()},e.createEl(\"button\",{text:t$d(\"PROMPT_BUTTON_NEVERMIND\")}).onclick=()=>{this.close()}}))}}class MultiOptionConfirmationPrompt extends obsidian_module.Modal{plugin;waitForClose;resolvePromise;rejectPromise;selectedValue=null;message;buttons;ctaButtonLabel=null;constructor(e,t,a,i){super(e.app),this.plugin=e,this.message=t,a&&0!==a.size||(a=new Map([[t$d(\"PROMPT_BUTTON_CANCEL\"),null],[t$d(\"PROMPT_BUTTON_OK\"),!0]]),i||(i=t$d(\"PROMPT_BUTTON_OK\"))),this.ctaButtonLabel=i,this.buttons=a,this.waitForClose=new Promise(((e,t)=>{this.resolvePromise=e,this.rejectPromise=t})),this.display(),this.open()}display(){this.contentEl.empty(),this.titleEl.textContent=t$d(\"PROMPT_TITLE_CONFIRMATION\");const e=this.contentEl.createDiv();e.style.marginBottom=\"1rem\",e.innerHTML=this.message;const t=this.contentEl.createDiv();t.style.display=\"flex\",t.style.justifyContent=\"flex-end\",t.style.flexWrap=\"wrap\";const a=Array.from(this.buttons.entries());let i=null;a.reverse().forEach((([e,n],r)=>{const s=this.createButton(t,e,(()=>{this.selectedValue=n,this.close()}));e===this.ctaButtonLabel&&(i=s.buttonEl,s.setCta()),r<a.length-1&&(s.buttonEl.style.marginRight=\"0.5rem\")})),this.ctaButtonLabel&&i&&i.focus()}createButton(e,t,a){const i=new obsidian_module.ButtonComponent(e);return i.setButtonText(t).onClick(a),i}onOpen(){super.onOpen(),this.contentEl.querySelector(\"button\")?.focus()}onClose(){super.onClose(),this.resolvePromise(this.selectedValue)}}async function linkPrompt(e,t,a,i=t$d(\"SELECT_LINK_TO_OPEN\")){const n=REGEX_LINK.getResList(e).filter((e=>Boolean(e.value))),r=n.map((e=>REGEX_LINK.getLink(e))),s=new Map;r.forEach(((e,t)=>{const a=e.split(\"&rect=\")[0];s.has(a)||s.set(a,[]),s.get(a).push(t)}));const o=new Set;s.forEach((e=>{if(1===e.length)o.add(e[0]);else{const t=e.find((e=>r[e].includes(\"&rect=\")));void 0!==t?o.add(t):o.add(e[0])}})),s.forEach((e=>{const t=e.some((e=>o.has(e)));t||o.add(e[0])}));const l=n.filter(((e,t)=>o.has(t))),c=REGEX_TAGS.getResList(e.replaceAll(/([^\\s])#/g,\"$1 \")).filter((e=>Boolean(e.value)));let d=null,h=null,p=l[0]??c[0];const u=[...l.map((e=>{const t=REGEX_LINK.getAliasOrLink(e);return\"100%\"===t?REGEX_LINK.getLink(e):t})),...c.map((e=>REGEX_TAGS.getTag(e)))],m=[...l,...c];if(await sleep$1(10),m.length>1&&(p=await ScriptEngine.suggester(t,u,m,i),!p))return;if(!p)return;if(REGEX_TAGS.isTag(p))return void openTagSearch(REGEX_TAGS.getTag(p),t);if(openExternalLink(e=REGEX_LINK.getLink(p),t))return;const g=parseObsidianLink(e,t,!1);if(\"boolean\"!=typeof g||!g){if(\"string\"==typeof g&&(e=g),e.search(\"#\")>-1){const t=getLinkParts(e,a?a.file:void 0);d=`#${t.isBlockRef?\"^\":\"\"}${t.ref}`,e=t.path}if(!e.match(REG_LINKINDEX_INVALIDCHARS))return h=t.metadataCache.getFirstLinkpathDest(e,a?a.file.path:\"\"),[h,e,d];new obsidian_module.Notice(t$d(\"FILENAME_INVALID_CHARS\"),4e3)}}const templatePromt=async(e,t)=>1===e.length?e[0]:(await linkPrompt(e.map((e=>`[[${e.path}|${e.name}]]`)).join(\" \"),t,void 0,t$d(\"PROMPT_SELECT_TEMPLATE\"))??[null,null,null])[0];function updateElementIdsInScene({elements:e},t,a){if(\"text\"===t.type){const i=t;if(i.containerId){const t=e.find((e=>e.id===i.containerId));t.boundElements?.filter((e=>e.id===i.id)).forEach((e=>{e.id=a}))}}t.boundElements?.length>0&&t.boundElements.forEach((i=>{const n=e.find((e=>e.id===i.id));if(n.boundElements?.filter((e=>e.id===t.id)).forEach((e=>{e.id=a})),\"text\"===n.type&&(n.containerId=a),\"arrow\"===n.type){const e=n;e.startBinding?.elementId===t.id&&(e.startBinding.elementId=a),e.endBinding?.elementId===t.id&&(e.endBinding.elementId=a)}})),\"frame\"===t.type&&e.filter((e=>e.frameId===t.id)).forEach((e=>{e.frameId=a})),t.id=a}function getPDFCropRect(e){const t=e.link.match(/&rect=(\\d*),(\\d*),(\\d*),(\\d*)/);if(!t||5!==t.length)return null;const a=e.pdfPageViewProps.rotate??0,{left:i,bottom:n}=e.pdfPageViewProps,r=parseInt(t[1]),s=parseInt(t[2]),o=parseInt(t[3]),l=parseInt(t[4]);if(90===a){const t=r,a=o,i=l,n=s*e.scale,c=t*e.scale;return{x:n,y:c,width:i*e.scale-n,height:a*e.scale-c,naturalWidth:e.naturalWidth,naturalHeight:e.naturalHeight}}if(180===a){const t=r,a=o,i=l,n=s*e.scale,c=e.naturalWidth-a*e.scale;return{x:c,y:n,width:e.naturalWidth-c-t*e.scale,height:i*e.scale-n,naturalWidth:e.naturalWidth,naturalHeight:e.naturalHeight}}if(270===a){const t=r,a=s,i=o,n=l,c=e.naturalWidth-n*e.scale,d=e.naturalHeight-i*e.scale;return{x:c,y:d,width:e.naturalWidth-c-a*e.scale,height:e.naturalHeight-d-t*e.scale,naturalWidth:e.naturalWidth,naturalHeight:e.naturalHeight}}const c=r,d=s,h=o,p=l;return{x:(c-i)*e.scale,y:e.naturalHeight-(p-n)*e.scale,width:(h-c)*e.scale,height:(p-d)*e.scale,naturalWidth:e.naturalWidth,naturalHeight:e.naturalHeight}}function getPDFRect({elCrop:e,scale:t,customData:a}){const i=a.pdfPageViewProps?.rotate??0,{left:n,bottom:r}=a&&a.pdfPageViewProps?a.pdfPageViewProps:{left:0,bottom:0};if(90===i){const a=e.y/t,i=e.x/t,n=(e.height+e.y)/t,r=(e.width+e.x)/t;return`&rect=${Math.round(a)},${Math.round(i)},${Math.round(n)},${Math.round(r)}`}if(180===i){const a=(e.naturalWidth-e.x-e.width)/t,i=e.y/t,n=(e.naturalWidth-e.x)/t,r=(e.height+e.y)/t;return`&rect=${Math.round(a)},${Math.round(i)},${Math.round(n)},${Math.round(r)}`}if(270===i){const a=(e.naturalHeight-e.height-e.y)/t,i=(e.naturalWidth-e.width-e.x)/t,n=(e.naturalHeight-e.y)/t,r=(e.naturalWidth-e.x)/t;return`&rect=${Math.round(a)},${Math.round(i)},${Math.round(n)},${Math.round(r)}`}const s=e.x/t+n,o=e.width/t+s,l=r+(e.naturalHeight-e.y)/t,c=l-e.height/t;return`&rect=${Math.round(s)},${Math.round(c)},${Math.round(o)},${Math.round(l)}`}var AutoexportPreference;!function(e){e[e.none=0]=\"none\",e[e.both=1]=\"both\",e[e.png=2]=\"png\",e[e.svg=3]=\"svg\",e[e.inherit=4]=\"inherit\"}(AutoexportPreference||(AutoexportPreference={}));const REGEX_TAGS={EXPR:/(#[\\p{Letter}\\p{Emoji_Presentation}\\p{Number}\\/_-]+)/gu,getResList:e=>{const t=e.matchAll(REGEX_TAGS.EXPR);let a;const i=[];for(;!(a=t.next()).done;)i.push(a);return i},getTag:e=>e.value[1],isTag:e=>e.value[1]?.startsWith(\"#\")},REGEX_LINK={EXPR:/(!)?(\\[\\[([^|\\]]+)\\|?([^\\]]+)?]]|\\[([^\\]]*)]\\(((?:[^\\(\\)]|\\([^\\(\\)]*\\))*)\\))(\\{(\\d+)\\})?/g,getResList:e=>{const t=e.matchAll(REGEX_LINK.EXPR);let a;const i=[];for(;!(a=t.next()).done;)i.push(a);return i},getRes:e=>e.matchAll(REGEX_LINK.EXPR),isTransclusion:e=>!!e.value[1],getLink:e=>e.value[3]?e.value[3]:e.value[6],isWikiLink:e=>!!e.value[3],getAliasOrLink:e=>REGEX_LINK.isWikiLink(e)?e.value[4]?e.value[4]:e.value[3]:e.value[5]?e.value[5]:e.value[6],getWrapLength:(e,t)=>{const a=parseInt(e.value[8]);return isNaN(a)?t>0?t:null:a}},DRAWING_REG=/\\n##? Drawing\\n[^`]*(```json\\n)([\\s\\S]*?)```\\n/gm,DRAWING_REG_FALLBACK=/\\n##? Drawing\\n(```json\\n)?(.*)(```)?(%%)?/gm,DRAWING_COMPRESSED_REG=/(\\n##? Drawing\\n[^`]*(?:```compressed\\-json\\n))([\\s\\S]*?)(```\\n)/gm,DRAWING_COMPRESSED_REG_FALLBACK=/(\\n##? Drawing\\n(?:```compressed\\-json\\n)?)(.*)((```)?(%%)?)/gm,REG_LINKINDEX_HYPERLINK=/^\\w+:\\/\\//,isCompressedMD=e=>null!==e.match(/```compressed\\-json\\n/gm),getDecompressedScene=e=>{let t,a=e.matchAll(DRAWING_COMPRESSED_REG);return t=a.next(),t.done&&(a=e.matchAll(DRAWING_COMPRESSED_REG_FALLBACK),t=a.next()),t.value&&t.value.length>1?[decompress(t.value[2]),t]:[null,t]},changeThemeOfExcalidrawMD=e=>{const t=isCompressedMD(e);let a=t?getDecompressedScene(e)[0]:e;return a?(isObsidianThemeDark?1===(a.match(/\"theme\"\\s*:\\s*\"light\"\\s*,/g)||[]).length&&(a=a.replace(/\"theme\"\\s*:\\s*\"light\"\\s*,/,'\"theme\": \"dark\",')):1===(a.match(/\"theme\"\\s*:\\s*\"dark\"\\s*,/g)||[]).length&&(a=a.replace(/\"theme\"\\s*:\\s*\"dark\"\\s*,/,'\"theme\": \"light\",')),t?e.replace(DRAWING_COMPRESSED_REG,`$1${compress(a)}$3`):a):e};function getJSON(e){let t,a;if(isCompressedMD(e)){const[t,a]=getDecompressedScene(e);return t?{scene:t.substring(0,t.lastIndexOf(\"}\")+1),pos:a.value.index}:{scene:e,pos:a.value?a.value.index:0}}if(t=e.matchAll(DRAWING_REG),a=t.next(),a.done&&(t=e.matchAll(DRAWING_REG_FALLBACK),a=t.next()),a.value&&a.value.length>1){const e=a.value[2];return{scene:e.substr(0,e.lastIndexOf(\"}\")+1),pos:a.value.index}}return{scene:e,pos:a.value?a.value.index:0}}async function getMarkdownDrawingSectionAsync(e,t){return t?`## Drawing\\n\\`\\`\\`compressed-json\\n${await compressAsync(e)}\\n\\`\\`\\`\\n%%`:`## Drawing\\n\\`\\`\\`json\\n${e}\\n\\`\\`\\`\\n%%`}function getMarkdownDrawingSection(e,t){return t?`## Drawing\\n\\`\\`\\`compressed-json\\n${compress(e)}\\n\\`\\`\\`\\n%%`:`## Drawing\\n\\`\\`\\`json\\n${e}\\n\\`\\`\\`\\n%%`}const RE_EXCALIDRAWDATA_WITHSECTION_OK=/^(#\\n+)%%\\n+# Excalidraw Data(?:\\n|$)/m,RE_EXCALIDRAWDATA_WITHSECTION_NOTOK=/#\\n+%%\\n+# Excalidraw Data(?:\\n|$)/m,RE_EXCALIDRAWDATA_NOSECTION_OK=/^(%%\\n+)?# Excalidraw Data(?:\\n|$)/m,RE_TEXTELEMENTS_WITHSECTION_OK=/^#\\n+%%\\n+##? Text Elements(?:\\n|$)/m,RE_TEXTELEMENTS_WITHSECTION_NOTOK=/#\\n+%%\\n+##? Text Elements(?:\\n|$)/m,RE_TEXTELEMENTS_NOSECTION_OK=/^(%%\\n+)?##? Text Elements(?:\\n|$)/m,RE_EXCALIDRAWDATA_FALLBACK_1=/(.*)%%\\n+# Excalidraw Data(?:\\n|$)/m,RE_EXCALIDRAWDATA_FALLBACK_2=/(.*)# Excalidraw Data(?:\\n|$)/m,RE_TEXTELEMENTS_FALLBACK_1=/(.*)%%\\n+##? Text Elements(?:\\n|$)/m,RE_TEXTELEMENTS_FALLBACK_2=/(.*)##? Text Elements(?:\\n|$)/m,RE_DRAWING=/^(%%\\n+)?##? Drawing\\n/m;function getExcalidrawMarkdownHeader(e){const t=e.search(RE_DRAWING);t>0&&(e=e.substring(0,t));const a=e.match(RE_EXCALIDRAWDATA_WITHSECTION_OK);let i=a?.index??-1,n=!1;if(i>0&&(i+=a[1].length),-1===i&&(i=e.search(RE_EXCALIDRAWDATA_WITHSECTION_NOTOK),i>0&&(n=!0)),-1===i&&(i=e.search(RE_EXCALIDRAWDATA_NOSECTION_OK)),-1===i){const t=e.match(RE_EXCALIDRAWDATA_FALLBACK_1);t&&Boolean(t[1])&&(i=t.index+t[1].length)}if(-1===i){const t=e.match(RE_EXCALIDRAWDATA_FALLBACK_2);t&&Boolean(t[1])&&(i=t.index+t[1].length)}if(-1===i&&(i=e.search(RE_TEXTELEMENTS_WITHSECTION_OK),i>0&&(i+=2)),-1===i&&(i=e.search(RE_TEXTELEMENTS_WITHSECTION_NOTOK),i>0&&(n=!0)),-1===i&&(i=e.search(RE_TEXTELEMENTS_NOSECTION_OK)),-1===i){const t=e.match(RE_TEXTELEMENTS_FALLBACK_1);t&&Boolean(t[1])&&(i=t.index+t[1].length)}if(-1===i){const t=e.match(RE_TEXTELEMENTS_FALLBACK_2);t&&Boolean(t[1])&&(i=t.index+t[1].length)}return-1===i&&t>0&&(i=t),-1===i?{header:e.endsWith(\"\\n\")?e:e+\"\\n\",shouldFixTrailingHashtag:n,processingOk:!1}:{header:e.substring(0,i),shouldFixTrailingHashtag:n,processingOk:!0}}const getExcalidrawMarkdownHeaderSection=(e,t)=>{const{header:a,shouldFixTrailingHashtag:i,processingOk:n}=getExcalidrawMarkdownHeader(e);if(!n)return a;const r=updateFrontmatterInString(a,t);return i?r+\"\\n#\\n\":r.endsWith(\"\\n\")?a:a+\"\\n\"};class ExcalidrawData{plugin;view;textElements=null;scene=null;deletedElements=[];file=null;app;showLinkBrackets;linkPrefix;embeddableTheme=\"auto\";urlPrefix;autoexportPreference=AutoexportPreference.inherit;textMode=TextMode.raw;loaded=!1;elementLinks=null;files=null;equations=null;mermaids=null;compatibilityMode=!1;textElementCommentedOut=!1;selectedElementIds={};constructor(e,t){this.plugin=e,this.view=t,this.app=this.plugin.app,this.files=new Map,this.equations=new Map,this.mermaids=new Map}destroy(){this.textElements=null,this.scene=null,this.deletedElements=[],this.file=null,this.app=null,this.showLinkBrackets=null,this.linkPrefix=null,this.embeddableTheme=null,this.urlPrefix=null,this.autoexportPreference=null,this.textMode=null,this.loaded=!1,this.elementLinks=null,this.files=null,this.equations=null,this.mermaids=null,this.compatibilityMode=null,this.textElementCommentedOut=null,this.selectedElementIds=null}initializeNonInitializedFields(){if(!this.scene||!this.scene.elements)return;const e=this.scene.source?.split(\"https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/\")[1]??\"1.8.16\",t=this.scene.elements;for(const e of t){if(\"iframe\"!==e.type||e.customData||(e.type=\"embeddable\"),e.boundElements){const a=new Map;let i=!1;e.boundElements.forEach((e=>{if(\"text\"===e.type)if(i){const a=t.find((t=>t.id===e.id));a&&(a.containerId=null)}else a.set(e.id,e.type),i=!0;else a.set(e.id,e.type)}));const n=Array.from(a,(([e,t])=>({id:e,type:t})));n.length!==e.boundElements.length&&(e.boundElements=n)}e.boundElementIds&&(e.boundElements||(e.boundElements=[]),e.boundElements=e.boundElements.concat(e.boundElementIds.map((e=>({type:\"arrow\",id:e})))),delete e.boundElementIds),\"text\"!==e.type||e.containerId||(e.containerId=null),\"text\"!==e.type||e.originalText||(e.originalText=e.rawText??e.text??\"\"),null===e.x&&(e.x=0),null===e.y&&(e.y=0),null===e.startBinding?.focus&&(e.startBinding.focus=0),null===e.endBinding?.focus&&(e.endBinding.focus=0),null===e.fontSize&&(e.fontSize=20),\"text\"!==e.type||e.hasOwnProperty(\"autoResize\")||(e.autoResize=!0),\"text\"!==e.type||e.hasOwnProperty(\"lineHeight\")||(e.lineHeight=getLineHeight(e.fontFamily)),\"image\"!==e.type||e.hasOwnProperty(\"roundness\")||(e.roundness=null)}try{t.filter((e=>\"text\"===e.type&&e.containerId&&t.some((t=>t.id===e.containerId&&t.boundElements.length>0&&t.boundElements.some((t=>\"text\"===t.type&&t.id!==e.id&&t.id.length>8)))))).forEach((e=>{try{const a=t.filter((t=>t.id===e.containerId))[0],i=a.boundElements.filter((e=>!(\"text\"===e.type&&!t.some((t=>t.id===e.id)))));a.boundElements=[{id:e.id,type:\"text\"}].concat(i)}catch(e){}}));const a=!isVersionNewerThanOther(e,\"1.8.16\");t.filter((e=>e.boundElements&&e.boundElements.length>0)).forEach((e=>{a&&!e.customData?.legacyTextWrap&&addAppendUpdateCustomData(e,{legacyTextWrap:!0});const i=e.boundElements.filter((e=>t.some((t=>t.id===e.id))));i.length!==e.boundElements.length&&(e.boundElements=i)})),t.filter((e=>\"text\"===e.type&&e.containerId&&!t.some((t=>t.id===e.containerId)))).forEach((e=>{e.containerId=null}))}catch{}}async loadData(e,t,a){if(!t)return!1;if(this.loaded=!1,this.selectedElementIds={},this.textElements=new Map,this.elementLinks=new Map,this.file!==t&&(this.files.clear(),this.equations.clear(),this.mermaids.clear()),this.file=t,this.compatibilityMode=!1,this.setShowLinkBrackets(),this.setLinkPrefix(),this.setUrlPrefix(),this.setAutoexportPreferences(),this.setembeddableThemePreference(),this.scene=null,this.plugin.settings.syncExcalidraw){const e=`${t.path.substring(0,t.path.lastIndexOf(\".md\"))}.excalidraw`,a=this.app.vault.getAbstractFileByPath(e);if(a&&a instanceof obsidian_module.TFile&&a.stat.mtime>t.stat.mtime){const e=await this.app.vault.read(a);this.scene=JSON.parse(e)}}let i=null;if(i=(()=>{const t=getJSON(e);if(-1===t.pos)throw new Error(\"Excalidraw JSON not found in the file\");return this.scene||(this.scene=JSON_parse(t.scene)),t})(),this.deletedElements=this.scene.elements.filter((e=>e.isDeleted)),this.scene.elements=this.scene.elements.filter((e=>!e.isDeleted)),this.scene?.elements?.some((e=>\"iframe\"===e.type&&!e.customData))){const e=new MultiOptionConfirmationPrompt(this.plugin,\"This file contains embedded frames which will be migrated to a newer version for compatibility with <a href='https://excalidraw.com'>excalidraw.com</a>.<br>\ud83d\udd04 If you're using Obsidian on multiple devices, you may proceed now, but please, before opening this file on your other devices, update Excalidraw on those as well.<br>\ud83d\udd0d More info is available <a href='https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/1.9.9'>here</a>.<br>\ud83c\udf10 <a href='https://translate.google.com/?sl=en&tl=zh-CN&text=This%20file%20contains%20embedded%20frames%20which%20will%20be%20migrated%20to%20a%20newer%20version%20for%20compatibility%20with%20excalidraw.com.%0A%0AIf%20you%27re%20using%20Obsidian%20on%20multiple%20devices%2C%20you%20may%20proceed%20now%2C%20but%20please%2C%20before%20opening%20this%20file%20on%20your%20other%20devices%2C%20update%20Excalidraw%20on%20those%20as%20well.%0A%0AMore%20info%20is%20available%20here%3A%20https%3A%2F%2Fgithub.com%2Fzsviczian%2Fobsidian-excalidraw-plugin%2Freleases%2Ftag%2F1.9.9%27%3Ehere%3C%2Fa%3E.&op=translate'>Translate</a>.\");if(e.contentEl.focus(),!await e.waitForClose)throw new Error(ERROR_IFRAME_CONVERSION_CANCELED)}this.initializeNonInitializedFields();const n=window.setTimeout((()=>{new obsidian_module.Notice(t$d(\"FONT_LOAD_SLOW\"),15e3).noticeEl.oncontextmenu=()=>{displayFontMessage(this.app)}}),5e3);await loadSceneFonts(this.scene.elements),clearTimeout(n),this.scene.files||(this.scene.files={}),hasExportTheme(this.plugin,this.file)?this.scene.appState.theme=getExportTheme(this.plugin,this.file,\"light\"):this.plugin.settings.matchThemeAlways&&(this.scene.appState.theme=isObsidianThemeDark()?\"dark\":\"light\"),this.scene.appState.hasOwnProperty(\"previousGridSize\")&&(null===this.scene.appState.gridSize?(this.scene.appState.gridSize=this.scene.appState.previousGridSize,this.scene.appState.gridModeEnabled=!1):this.scene.appState.gridModeEnabled=!0,delete this.scene.appState.previousGridSize),this.scene.appState?.gridColor?.hasOwnProperty(\"MajorGridFrequency\")&&(this.scene.appState.gridColor.MajorGridFrequency>1&&(this.scene.gridStep=this.scene.appState.gridColor.MajorGridFrequency),delete this.scene.appState.gridColor.MajorGridFrequency);let r=(e=e.substring(0,i.pos)).search(RE_EXCALIDRAWDATA_NOSECTION_OK);if(-1===r&&(r=e.search(RE_EXCALIDRAWDATA_FALLBACK_2)),-1===r&&(r=e.search(RE_TEXTELEMENTS_NOSECTION_OK)),-1===r&&(r=e.search(RE_TEXTELEMENTS_FALLBACK_2)),-1===r)return await this.setTextMode(a,!1),this.loaded=!0,!0;const s=(e=e.slice(r)).match(/^((%%\\n*)?# Excalidraw Data\\n\\n?## Text Elements(?:\\n|$))/m)??e.match(/^((%%\\n*)?##? Text Elements(?:\\n|$))/m),o=s?s[0]:e.match(/(.*##? Text Elements(?:\\n|$))/m)[0];let l;e=e.slice(o.length),this.textElementCommentedOut=o.startsWith(\"%%\\n\"),r=0;const c=new Map,d=e.indexOf(\"## Element Links\\n\"),h=e.indexOf(\"# Element Links\\n\"),p=(d>-1?e.substring(d+17):e.substring(h+16)).matchAll(/^(.{8}):\\s*(.*)$/gm);for(;!(l=p.next()).done;)c.set(l.value[1],l.value[2]);const u=/^%%\\*\\*\\*>>>text element-link:(\\[\\[[^<*\\]]*]])<<<\\*\\*\\*%%/gm;let m=e.matchAll(/\\s\\^(.{8})[\\n]+/g);for(;!(l=m.next()).done;){let t=e.substring(r,l.value.index);const a=l.value[1],i=this.scene.elements.filter((e=>e.id===a))[0];if(i)if(\"text\"!==i.type)i.link!==t&&(i.link=t,i.version++,i.versionNonce++),this.elementLinks.set(a,t);else{const e=t.matchAll(u).next();e.done||(t=t.replace(u,\"\"),i.link=e.value[1]),c.has(a)&&(i.link=c.get(a),c.delete(a));const n=await this.parse(t);i.rawText=t,this.textElements.set(a,{raw:t,parsed:n.parsed}),n.link&&(i.link=n.link),!i||i.rawText&&\"\"!==i.rawText||(i.rawText=t)}r=l.value.index+12}for(const[e,t]of c){const a=this.scene.elements.filter((t=>t.id===e))[0];a&&(a.link=t,a.version++,a.versionNonce++,this.elementLinks.set(e,t))}const g=e.indexOf(\"## Embedded Files\\n\"),f=e.indexOf(\"# Embedded files\\n\");if(g>-1||f>-1){const t=/([\\w\\d]*):\\s*\\!?\\[\\[([^\\]]*)]]\\s*(\\{[^}]*})?\\n/gm;for(m=(e=g>-1?e.substring(g+18):e.substring(f+17)).matchAll(t);!(l=m.next()).done;){const e=new EmbeddedFile(this.plugin,this.file.path,l.value[2],l.value[3]);this.setFile(l.value[1],e)}const a=/([\\w\\d]*):\\s*((?:https?|file|ftps?):\\/\\/[^\\s]*)\\n/gm;for(m=e.matchAll(a);!(l=m.next()).done;){const e=new EmbeddedFile(this.plugin,null,l.value[2]);this.setFile(l.value[1],e)}const i=/([\\w\\d]*):\\s*\\$\\$([\\s\\S]*?)(\\$\\$\\s*\\n)/gm;for(m=e.matchAll(i);!(l=m.next()).done;)this.setEquation(l.value[1],{latex:l.value[2],isLoaded:!1});const n=getMermaidImageElements(this.scene.elements);n.length>0&&!shouldRenderMermaid()?new obsidian_module.Notice(\"Mermaid images are only supported in Obsidian 1.4.14 and above. Please update Obsidian to see the mermaid images in this drawing. Obsidian mobile 1.4.14 currently only avaiable to Obsidian insiders\",5e3):n.forEach((e=>this.setMermaid(e.fileId,{mermaid:getMermaidText(e),isLoaded:!1})))}return this.findNewTextElementsInScene(),this.findNewElementLinksInScene(),await this.setTextMode(a,!0),this.loaded=!0,!0}async loadLegacyData(e,t){return!!t&&(this.loaded=!1,this.selectedElementIds={},this.compatibilityMode=!0,this.file=t,this.textElements=new Map,this.elementLinks=new Map,this.setShowLinkBrackets(),this.setLinkPrefix(),this.setUrlPrefix(),this.setembeddableThemePreference(),this.scene=JSON.parse(e),this.scene.files||(this.scene.files={}),this.initializeNonInitializedFields(),this.plugin.settings.matchThemeAlways&&(this.scene.appState.theme=isObsidianThemeDark()?\"dark\":\"light\"),this.files.clear(),this.equations.clear(),this.mermaids.clear(),this.findNewTextElementsInScene(),this.findNewElementLinksInScene(),await this.setTextMode(TextMode.raw,!0),this.loaded=!0,!0)}async setTextMode(e,t=!1){this.scene&&(this.textMode=e,await this.updateSceneTextElements(t))}async updateSceneTextElements(e=!1){const t=arrayToMap(this.scene.elements),a=this.scene.elements?.filter((e=>\"text\"===e.type&&!e.isDeleted));for(const e of a){const a=getContainerElement(e,t),i=await this.getText(e.id)??e.originalText??e.text,{text:n,x:r,y:s,width:o,height:l}=refreshTextDimensions(e,a,t,i);try{e.originalText=i,e.text=n,e.x=r,e.y=s,e.width=o,e.height=l}catch(e){}}}async getText(e){const t=this.textElements.get(e);return t?this.textMode===TextMode.parsed?(t.parsed||this.textElements.set(e,{raw:t.raw,parsed:(await this.parse(t.raw)).parsed}),t.parsed):t.raw:null}findNewElementLinksInScene(){let e=!1;const t=this.scene.elements?.filter((e=>\"text\"!==e.type&&e.link&&!this.elementLinks.has(e.id)));if(0===t.length)return e;let a;for(const i of t)a=i.id,i.id.length>8&&(e=!0,a=nanoid(),updateElementIdsInScene(this.scene,i,a)),this.elementLinks.set(a,i.link);return e}findNewTextElementsInScene(e={}){this.selectedElementIds=e;const t=this.scene.elements?.filter((e=>\"text\"===e.type));let a,i=!1;for(const e of t)if(a=e.id,e.id.length>8){if(i=!0,a=nanoid(),this.selectedElementIds[e.id]&&(delete this.selectedElementIds[e.id],this.selectedElementIds[a]=!0),updateElementIdsInScene(this.scene,e,a),this.textElements.has(e.id)){const t=this.textElements.get(e.id);this.textElements.set(a,{raw:t.raw,parsed:t.parsed}),this.textElements.delete(e.id)}if(!this.textElements.has(a)){const t=e.rawText&&\"\"!==e.rawText?e.rawText:e.text;this.textElements.set(a,{raw:t,parsed:null}),this.parseasync(a,t)}}else if(!this.textElements.has(e.id)){const t=e.rawText&&\"\"!==e.rawText?e.rawText:e.text;this.textElements.set(a,{raw:t,parsed:null}),this.parseasync(a,t)}return i}updateElementLinksFromScene(){for(const e of this.elementLinks.keys()){const t=this.scene.elements?.filter((t=>\"text\"!==t.type&&t.id===e&&t.link));0===t.length?this.elementLinks.delete(e):this.elementLinks.set(e,t[0].link)}}async updateTextElementsFromScene(){for(const e of this.textElements.keys()){const t=this.scene.elements?.filter((t=>\"text\"===t.type&&t.id===e));if(0===t.length)this.textElements.delete(e);else{const a=await this.getText(e),i=this.scene.prevTextMode===TextMode.parsed?t[0].rawText:t[0].originalText??t[0].text;a!==(t[0].originalText??t[0].text)&&this.textElements.set(e,{raw:i,parsed:(await this.parse(i)).parsed})}}}async parseasync(e,t){this.textElements.set(e,{raw:t,parsed:(await this.parse(t)).parsed})}parseLinks(e,t,a){return e.substring(t,a.value.index)+(this.showLinkBrackets?\"[[\":\"\")+REGEX_LINK.getAliasOrLink(a)+(this.showLinkBrackets?\"]]\":\"\")}async getTransclusion(e){const t=getLinkParts(e,this.file),a=this.app.metadataCache.getFirstLinkpathDest(t.path,this.file.path);return await getTransclusion(t,this.app,a,this.plugin.settings.pageTransclusionCharLimit)}async parse(e){e=this.parseCheckbox(e);let t=\"\",a=null,i=0;const n=REGEX_LINK.getRes(e);let r,s=!1,o=!1;for(e.match(REG_LINKINDEX_HYPERLINK)&&(a=e,o=!0);!(r=n.next()).done;){if(!a){const e=REGEX_LINK.getLink(r);a=e.match(REG_LINKINDEX_HYPERLINK)?e:`[[${e}]]`}if(REGEX_LINK.isTransclusion(r)){let a=this.parseCheckbox((await this.getTransclusion(REGEX_LINK.getLink(r))).contents).replaceAll(/%%[^%]*%%/gm,\"\");this.plugin.settings.removeTransclusionQuoteSigns&&(a=a.replaceAll(/\\n\\s*>\\s?/gm,\"\\n\")),t+=e.substring(i,r.value.index)+wrapTextAtCharLength(a,REGEX_LINK.getWrapLength(r,this.plugin.settings.wordWrappingDefault),this.plugin.settings.forceWrap)}else{const a=this.parseLinks(e,i,r);if(a&&(t+=a,!o&&!s)){const e=REGEX_LINK.getLink(r);e.match(REG_LINKINDEX_HYPERLINK)?o=!e.startsWith(\"cmd://\"):s=!0}}i=r.value.index+r.value[0].length}return t+=e.substring(i,e.length),s&&(t=this.linkPrefix+t),o&&(t=this.urlPrefix+t),{parsed:t,link:a}}parseCheckbox(e){return this.plugin.settings.parseTODO?e.replaceAll(/^- \\[\\s] /g,`${this.plugin.settings.todo} `).replaceAll(/\\n- \\[\\s] /g,`\\n${this.plugin.settings.todo} `).replaceAll(/^- \\[[^\\s]] /g,`${this.plugin.settings.done} `).replaceAll(/\\n- \\[[^\\s]] /g,`\\n${this.plugin.settings.done} `):e}quickParse(e){if((e=>{const t=REGEX_LINK.getRes(e);let a;for(;!(a=t.next()).done;)if(REGEX_LINK.isTransclusion(a))return!0;return!1})(e))return[null,null];e=this.parseCheckbox(e);let t=\"\",a=null,i=0;const n=REGEX_LINK.getRes(e);let r,s=!1,o=!1;for(e.match(REG_LINKINDEX_HYPERLINK)&&(a=e,o=!0);!(r=n.next()).done;){if(!a){const e=REGEX_LINK.getLink(r);a=e.match(REG_LINKINDEX_HYPERLINK)?e:`[[${e}]]`}const n=this.parseLinks(e,i,r);if(n&&(t+=n,!o&&!s)){const e=REGEX_LINK.getLink(r);e.match(REG_LINKINDEX_HYPERLINK)?o=!e.startsWith(\"cmd://\"):s=!0}i=r.value.index+r.value[0].length}return t+=e.substring(i,e.length),s&&(t=this.linkPrefix+t),o&&(t=this.urlPrefix+t),[t,a]}disableCompression=!1;generateMDBase(e=[]){let t=this.textElementCommentedOut?\"%%\\n\":\"\";t+=\"# Excalidraw Data\\n\\n## Text Elements\\n\",this.plugin.settings.addDummyTextElement&&(t+=\"\\n^_dummy!_\\n\\n\");const a=new Map;for(const e of this.textElements.keys()){const i=this.scene.elements.filter((t=>t.id===e));let n=this.textElements.get(e).raw;i&&1===i.length&&i[0].link&&i[0].rawText===i[0].originalText&&a.set(e,i[0].link),t+=`${n} ^${e}\\n\\n`}if(this.elementLinks.size>0||a.size>0){t+=\"## Element Links\\n\";for(const e of this.elementLinks.keys())t+=`${e}: ${this.elementLinks.get(e)}\\n\\n`;for(const e of a.keys())t+=`${e}: ${a.get(e)}\\n\\n`}if(t+=this.equations.size>0||this.files.size>0?\"## Embedded Files\\n\":\"\",this.equations.size>0)for(const e of this.equations.keys())t+=`${e}: $$${this.equations.get(e).latex.trim()}$$\\n\\n`;if(this.files.size>0)for(const e of this.files.keys()){const a=/(^[^#\\|]*)/,i=this.files.get(e);i.isHyperLink||i.isLocalLink?t+=`${e}: ${i.hyperlink}\\n\\n`:t+=`${e}: [[${i.file?i.linkParts.original.replace(a,this.app.metadataCache.fileToLinktext(i.file,this.file.path)):i.linkParts.original}]]${i.colorMap?\" \"+JSON.stringify(i.colorMap):\"\"}\\n\\n`}return{outString:t,sceneJSONstring:JSON.stringify({type:this.scene.type,version:this.scene.version,source:this.scene.source,elements:this.scene.elements.concat(e),appState:this.scene.appState,files:this.scene.files},null,\"\\t\")}}async generateMDAsync(e=[]){const{outString:t,sceneJSONstring:a}=this.generateMDBase(e);return t+(this.textElementCommentedOut?\"\":\"%%\\n\")+await getMarkdownDrawingSectionAsync(a,!this.disableCompression&&this.plugin.settings.compress)}generateMDSync(e=[]){const{outString:t,sceneJSONstring:a}=this.generateMDBase(e);return t+(this.textElementCommentedOut?\"\":\"%%\\n\")+getMarkdownDrawingSection(a,!this.disableCompression&&this.plugin.settings.compress)}async saveDataURLtoVault(e,t,a,i){const n=this.scene;let r=i;if(!r)switch(r=`Pasted Image ${window.moment().format(\"YYYYMMDDHHmmss_SSS\")}`,t){case\"image/png\":default:r+=\".png\";break;case\"image/jpeg\":r+=\".jpg\";break;case\"image/svg+xml\":r+=\".svg\";break;case\"image/gif\":r+=\".gif\"}const s=await getBinaryFileFromDataURL(e);if(!s)return null;const o=await importFileToVault(this.app,r,s,this.file,this.view),l=new EmbeddedFile(this.plugin,this.file.path,o.path);return l.setImage({imgBase64:e,mimeType:t,size:{height:0,width:0},isDark:\"dark\"===n.appState?.theme,isSVGwithBitmap:\"image/svg+xml\"===t}),this.setFile(a,l),o}syncCroppedPDFs(){const e=this.scene,t=this.plugin.settings.pdfScale;e.elements.filter((e=>\"image\"===e.type&&e.crop&&!e.isDeleted)).forEach((e=>{const a=this.getFile(e.fileId);if(!a.file)return;if(\"pdf\"!==a.file.extension)return;const i=a.linkParts.original.split(\"#\")?.[1];if(!i||!i.startsWith(\"page=\")||i.includes(\"rect\"))return;const n=e.link?e.link.match(/&rect=\\d*,\\d*,\\d*,\\d*(.*)/)?.[1]:\"\",r=a.linkParts.original+getPDFRect({elCrop:e.crop,scale:t,customData:e.customData})+(n||\"]]\");e.link=`[[${r}`,this.elementLinks.set(e.id,e.link)}))}async syncFiles(){let e=!1;const t=this.scene,a=t.elements.filter((e=>\"image\"===e.type)),i=a.map((e=>e.fileId));if(this.files.forEach(((t,a)=>{i.contains(a)||(this.files.delete(a),e=!0)})),this.equations.forEach(((t,a)=>{i.contains(a)||(this.equations.delete(a),e=!0)})),this.mermaids.forEach(((t,a)=>{i.contains(a)||(this.mermaids.delete(a),e=!0)})),!t.files||0===Object.keys(t.files).length)return!1;const n=new Set;i.forEach(((i,r)=>{if(n.has(i)){const s=this.getFile(i),o=this.getEquation(i),l=this.getMermaid(i);if(s&&(s.isHyperLink||s.isLocalLink||s.file&&(\"md\"!==s.file.extension||this.plugin.isExcalidrawFile(s.file))))return;if(l)return;if(getMermaidText(a[r]))return void this.setMermaid(i,{mermaid:getMermaidText(a[r]),isLoaded:!0});if(!s&&!o&&!l)return;const c=fileid();t.elements.filter((e=>e.fileId===i)).sort(((e,t)=>e.updated<t.updated?1:-1))[0].fileId=c,e=!0,n.add(c),s&&this.setFile(c,new EmbeddedFile(this.plugin,this.file.path,s.linkParts.original)),o&&this.setEquation(c,{latex:o.latex,isLoaded:!1})}n.add(i)}));for(const a of Object.keys(t.files)){const i=getMermaidImageElements(t.elements.filter((e=>e.fileId===a)));this.hasFile(a)||this.hasEquation(a)||this.hasMermaid(a)||i.length>0||(e=!0,await this.saveDataURLtoVault(t.files[a].dataURL,t.files[a].mimeType,a,t.files[a].name))}return e}async syncElements(e,t){this.scene=e;let a=!1;return this.compatibilityMode||(a=await this.syncFiles(),this.scene.files={}),this.updateElementLinksFromScene(),a=a||this.syncCroppedPDFs()||this.setLinkPrefix()||this.setUrlPrefix()||this.setShowLinkBrackets()||this.findNewElementLinksInScene(),await this.updateTextElementsFromScene(),a||this.findNewTextElementsInScene(t)}async updateScene(e){this.scene=JSON_parse(e),this.updateElementLinksFromScene();const t=this.setLinkPrefix()||this.setUrlPrefix()||this.setShowLinkBrackets()||this.setembeddableThemePreference()||this.findNewElementLinksInScene();return await this.updateTextElementsFromScene(),!(!t&&!this.findNewTextElementsInScene()||(await this.updateSceneTextElements(),0))}getRawText(e){return this.textElements.get(e)?.raw}getParsedText(e){const t=this.textElements.get(e);return t?t.parsed:null}setTextElement(e,t,a){const[i,n]=this.quickParse(t);return i?(this.textElements.set(e,{raw:t,parsed:i}),[i,n]):(this.parse(t).then((i=>{const n=i.parsed;this.textElements.set(e,{raw:t,parsed:n}),n&&a(n)})),[null,null])}async addTextElement(e,t,a){const i=await this.parse(a);return this.textElements.set(e,{raw:a,parsed:i.parsed}),{parseResult:i.parsed,link:i.link}}deleteTextElement(e){this.textElements.delete(e)}getOpenMode(){const e=this.app.metadataCache.getFileCache(this.file);let t=\"view-mobile\"===this.plugin.settings.defaultMode?DEVICE.isPhone?\"view\":\"normal\":this.plugin.settings.defaultMode;switch(e?.frontmatter&&null!==e.frontmatter[FRONTMATTER_KEYS[\"default-mode\"].name]&&void 0!==e.frontmatter[FRONTMATTER_KEYS[\"default-mode\"].name]&&(t=e.frontmatter[FRONTMATTER_KEYS[\"default-mode\"].name]),t){case\"zen\":return{viewModeEnabled:!1,zenModeEnabled:!0};case\"view\":return{viewModeEnabled:!0,zenModeEnabled:!1};default:return{viewModeEnabled:!1,zenModeEnabled:!1}}}getLinkOpacity(){const e=this.app.metadataCache.getFileCache(this.file);let t=this.plugin.settings.linkOpacity;return e?.frontmatter&&null!==e.frontmatter[FRONTMATTER_KEYS[\"linkbutton-opacity\"].name]&&void 0!==e.frontmatter[FRONTMATTER_KEYS[\"linkbutton-opacity\"].name]&&(t=e.frontmatter[FRONTMATTER_KEYS[\"linkbutton-opacity\"].name]),t}getOnLoadScript(){const e=this.app.metadataCache.getFileCache(this.file);return e?.frontmatter&&null!==e.frontmatter[FRONTMATTER_KEYS[\"onload-script\"].name]&&void 0!==e.frontmatter[FRONTMATTER_KEYS[\"onload-script\"].name]?e.frontmatter[FRONTMATTER_KEYS[\"onload-script\"].name]:null}setLinkPrefix(){const e=this.linkPrefix,t=this.app.metadataCache.getFileCache(this.file);return t?.frontmatter&&void 0!==t.frontmatter[FRONTMATTER_KEYS[\"link-prefix\"].name]?this.linkPrefix=t.frontmatter[FRONTMATTER_KEYS[\"link-prefix\"].name]??\"\":this.linkPrefix=this.plugin.settings.linkPrefix,e!==this.linkPrefix}setUrlPrefix(){const e=this.urlPrefix,t=this.app.metadataCache.getFileCache(this.file);return t?.frontmatter&&void 0!==t.frontmatter[FRONTMATTER_KEYS[\"url-prefix\"].name]?this.urlPrefix=t.frontmatter[FRONTMATTER_KEYS[\"url-prefix\"].name]??\"\":this.urlPrefix=this.plugin.settings.urlPrefix,e!==this.urlPrefix}setAutoexportPreferences(){const e=this.app.metadataCache.getFileCache(this.file);if(e?.frontmatter&&null!==e.frontmatter[FRONTMATTER_KEYS.autoexport.name]&&void 0!==e.frontmatter[FRONTMATTER_KEYS.autoexport.name])switch(e.frontmatter[FRONTMATTER_KEYS.autoexport.name].toLowerCase()){case\"none\":this.autoexportPreference=AutoexportPreference.none;break;case\"both\":this.autoexportPreference=AutoexportPreference.both;break;case\"png\":this.autoexportPreference=AutoexportPreference.png;break;case\"svg\":this.autoexportPreference=AutoexportPreference.svg;break;default:this.autoexportPreference=AutoexportPreference.inherit}else this.autoexportPreference=AutoexportPreference.inherit}setembeddableThemePreference(){const e=this.embeddableTheme,t=this.app.metadataCache.getFileCache(this.file);return t?.frontmatter&&null!==t.frontmatter[FRONTMATTER_KEYS[\"embeddable-theme\"].name]&&void 0!==t.frontmatter[FRONTMATTER_KEYS[\"embeddable-theme\"].name]?(this.embeddableTheme=t.frontmatter[FRONTMATTER_KEYS[\"embeddable-theme\"].name].toLowerCase(),EMBEDDABLE_THEME_FRONTMATTER_VALUES.includes(this.embeddableTheme)||(this.embeddableTheme=\"default\")):t?.frontmatter&&null!==t.frontmatter[FRONTMATTER_KEYS[\"iframe-theme\"].name]&&void 0!==t.frontmatter[FRONTMATTER_KEYS[\"iframe-theme\"].name]?(this.embeddableTheme=t.frontmatter[FRONTMATTER_KEYS[\"iframe-theme\"].name].toLowerCase(),EMBEDDABLE_THEME_FRONTMATTER_VALUES.includes(this.embeddableTheme)||(this.embeddableTheme=\"default\")):this.embeddableTheme=this.plugin.settings.iframeMatchExcalidrawTheme?\"auto\":\"default\",e!==this.embeddableTheme}setShowLinkBrackets(){const e=this.showLinkBrackets,t=this.app.metadataCache.getFileCache(this.file);return t?.frontmatter&&null!==t.frontmatter[FRONTMATTER_KEYS[\"link-brackets\"].name]&&void 0!==t.frontmatter[FRONTMATTER_KEYS[\"link-brackets\"].name]?this.showLinkBrackets=!1!==t.frontmatter[FRONTMATTER_KEYS[\"link-brackets\"].name]:this.showLinkBrackets=this.plugin.settings.showLinkBrackets,e!==this.showLinkBrackets}setFile(e,t){if(!t)return;if(this.files.set(e,t),t.isHyperLink||t.isLocalLink)return void this.plugin.filesMaster.set(e,{isHyperLink:t.isHyperLink,isLocalLink:t.isLocalLink,path:t.hyperlink,blockrefData:null,hasSVGwithBitmap:t.isSVGwithBitmap});if(!t.file)return;const a=t.linkParts.original.split(\"#\");this.plugin.filesMaster.set(e,{isHyperLink:!1,isLocalLink:!1,path:t.file.path+(t.shouldScale()?\"\":\"|100%\"),blockrefData:1===a.length?null:a[1],hasSVGwithBitmap:t.isSVGwithBitmap,colorMapJSON:t.colorMap?JSON.stringify(t.colorMap):null})}getFiles(){return Object.values(this.files)}getFile(e){let t=this.files.get(e);if(t)return t;const a=this.plugin.filesMaster.get(e);return a?(t=new EmbeddedFile(this.plugin,this.file.path,a.blockrefData?a.path+\"#\"+a.blockrefData:a.path,a.colorMapJSON),this.files.set(e,t),t):t}getFileEntries(){return this.files.entries()}deleteFile(e){this.files.delete(e)}hasFile(e){if(this.files.has(e))return!0;if(this.plugin.filesMaster.has(e)){const t=this.plugin.filesMaster.get(e);if(t.isHyperLink||t.isLocalLink)return this.files.set(e,new EmbeddedFile(this.plugin,this.file.path,t.path)),!0;const a=t.path.split(\"|\")[0].split(\"#\")[0];if(!this.app.vault.getAbstractFileByPath(a))return this.plugin.filesMaster.delete(e),!0;const i=t.path.endsWith(\"100%\"),n=new EmbeddedFile(this.plugin,this.file.path,(t.blockrefData?a+\"#\"+t.blockrefData:a)+(i?\"|100%\":\"\"),t.colorMapJSON);return this.files.set(e,n),!0}return!1}setEquation(e,t){this.equations.set(e,{latex:t.latex,isLoaded:t.isLoaded}),this.plugin.equationsMaster.set(e,t.latex)}getEquation(e){let t=this.equations.get(e);if(t)return t;const a=this.plugin.equationsMaster.get(e);return a?(this.equations.set(e,{latex:a,isLoaded:!1}),{latex:a,isLoaded:!1}):t}getEquationEntries(){return this.equations?.entries()}deleteEquation(e){this.equations.delete(e)}hasEquation(e){return!!this.equations.has(e)||!!this.plugin.equationsMaster.has(e)&&(this.equations.set(e,{latex:this.plugin.equationsMaster.get(e),isLoaded:!1}),!0)}setMermaid(e,t){this.mermaids.set(e,{mermaid:t.mermaid,isLoaded:t.isLoaded}),this.plugin.mermaidsMaster.set(e,t.mermaid)}getMermaid(e){let t=this.mermaids.get(e);if(t)return t;const a=this.plugin.mermaidsMaster.get(e);return a?(this.mermaids.set(e,{mermaid:a,isLoaded:!1}),{mermaid:a,isLoaded:!1}):t}getMermaidEntries(){return this.mermaids.entries()}deleteMermaid(e){this.mermaids.delete(e)}hasMermaid(e){return!!this.mermaids.has(e)||!!this.plugin.mermaidsMaster.has(e)&&(this.mermaids.set(e,{mermaid:this.plugin.mermaidsMaster.get(e),isLoaded:!1}),!0)}}const getTransclusion=async(e,t,a,i)=>{if(!e.path)return{contents:e.original.trim(),lineNum:0};if(!(a&&a instanceof obsidian_module.TFile))return{contents:e.original.trim(),lineNum:0};const n=await t.vault.read(a);if(!e.ref)return i?{contents:n.substring(0,i).trim(),lineNum:0}:{contents:n.trim(),lineNum:0};const r=(await t.metadataCache.blockCache.getForFile({isCancelled:()=>!1},a)).blocks.filter((e=>\"comment\"!==e.node.type));if(!r)return{contents:e.original.trim(),lineNum:0};if(e.isBlockRef){let t=r.filter((t=>t.node.id==e.ref))[0]?.node;if(!t)return{contents:e.original.trim(),lineNum:0};[\"blockquote\"].includes(t.type)&&(t=t.children[0]);const a=t.position.start.offset,i=t.position.start.line,s=t.position.end.offset;return{contents:n.substring(a,s).replaceAll(/ \\^\\S*$|^\\^\\S*$/gm,\"\").trim(),lineNum:i}}const s=r.filter((e=>0===e.display.search(/^#+\\s/)));let o=null,l=0,c=null,d=1;for(let t=0;t<s.length;t++){if(o&&!c){let e=t;for(;e<s.length&&s[e].node.depth>d;)e++;return e===s.length&&s[e-1].node.depth>d?{leadingHashes:\"#\".repeat(d)+\" \",contents:n.substring(o).trim(),lineNum:l}:(c=s[e].node.position.start.offset-1,{leadingHashes:\"#\".repeat(d)+\" \",contents:n.substring(o,c).trim(),lineNum:l})}const a=s[t].node.children[0],i=s[t].node.data?.hProperties?.dataHeading,r=a?.children;!o&&(cleanBlockRef(a?.value)===e.ref||cleanBlockRef(a?.title)===e.ref||cleanBlockRef(i)===e.ref||r&&cleanBlockRef(r[0]?.value)===e.ref||cleanSectionHeading(a?.value)===e.ref||cleanSectionHeading(a?.title)===e.ref||cleanSectionHeading(i)===e.ref||r&&cleanSectionHeading(r[0]?.value)===e.ref)&&(o=s[t].node.children[0]?.position.start.offset,d=s[t].node.depth,l=s[t].node.children[0]?.position.start.line)}return o?{leadingHashes:\"#\".repeat(d)+\" \",contents:n.substring(o).trim(),lineNum:l}:{contents:e.original.trim(),lineNum:0}};class ContentSearcher{contentDiv;searchBar;prevButton;nextButton;exportMarkdown;showHideButton;customElemenentContainer;inputContainer;customElement;hitCount;searchBarWrapper;constructor(e,t){this.contentDiv=e,this.customElement=t,this.createSearchElements(),this.setupEventListeners(),e.prepend(this.getSearchBarWrapper())}createSearchElements(){this.searchBarWrapper=createDiv(\"excalidraw-search document-search-container\");const e=createDiv(\"document-search\");this.inputContainer=createDiv(\"search-input-container document-search-input\"),this.searchBar=createEl(\"input\",{type:\"text\",placeholder:\"Find...\"}),this.hitCount=createDiv(\"document-search-count\"),this.inputContainer.appendChild(this.searchBar),this.inputContainer.appendChild(this.hitCount);const t=createDiv(\"document-search-buttons\");this.prevButton=createEl(\"button\",{cls:[\"clickable-icon\",\"document-search-button\"],attr:{\"aria-label\":t$d(\"SEARCH_PREVIOUS\"),\"data-tooltip-position\":\"top\"},type:\"button\"}),this.prevButton.innerHTML=obsidian_module.getIcon(\"arrow-up\").outerHTML,this.nextButton=createEl(\"button\",{cls:[\"clickable-icon\",\"document-search-button\"],attr:{\"aria-label\":t$d(\"SEARCH_NEXT\"),\"data-tooltip-position\":\"top\"},type:\"button\"}),this.nextButton.innerHTML=obsidian_module.getIcon(\"arrow-down\").outerHTML,this.exportMarkdown=createEl(\"button\",{cls:[\"clickable-icon\",\"document-search-button\"],attr:{\"aria-label\":t$d(\"SEARCH_COPY_TO_CLIPBOARD_ARIA\"),\"data-tooltip-position\":\"top\"},type:\"button\"}),this.exportMarkdown.innerHTML=obsidian_module.getIcon(\"clipboard-copy\").outerHTML,this.showHideButton=createEl(\"button\",{cls:[\"clickable-icon\",\"document-search-button\",\"search-visible\"],attr:{\"aria-label\":t$d(\"SEARCH_SHOWHIDE_ARIA\"),\"data-tooltip-position\":\"top\"},type:\"button\"}),this.showHideButton.innerHTML=obsidian_module.getIcon(\"minimize-2\").outerHTML,t.appendChild(this.prevButton),t.appendChild(this.nextButton),t.appendChild(this.exportMarkdown),t.appendChild(this.showHideButton),e.appendChild(this.inputContainer),e.appendChild(t),this.searchBarWrapper.appendChild(e),this.customElemenentContainer=createDiv(),this.customElement&&(this.customElemenentContainer.appendChild(this.customElement),this.searchBarWrapper.appendChild(this.customElemenentContainer))}setupEventListeners(){this.nextButton.onclick=()=>this.navigateSearchResults(\"next\"),this.prevButton.onclick=()=>this.navigateSearchResults(\"previous\"),this.exportMarkdown.onclick=()=>{const e=this.contentDiv.outerHTML,t=e.indexOf(\"<hr\");function a(e,t){const a=new RegExp(`<summary class=\"excalidraw-setting-h${t}\">([^<]+)</summary>`,\"g\");return e.replaceAll(a,`<summary class=\"excalidraw-setting-h${t}\"><h${t}>$1</h${t}></summary>`)}let i=a(t>-1?e.substring(t):e,1);i=a(i,2),i=a(i,3),i=a(i,4),i=i.replaceAll(/<div class=\"setting-item-name\">([^<]+)<\\/div>/g,\"<h5>$1</h5>\");const n=obsidian_module.htmlToMarkdown(i);window.navigator.clipboard.writeText(n),new obsidian_module.Notice(t$d(\"SEARCH_COPIED_TO_CLIPBOARD\"))},this.showHideButton.onclick=()=>{const e=e=>{this.inputContainer.style.opacity=e,this.prevButton.style.opacity=e,this.nextButton.style.opacity=e,this.exportMarkdown.style.opacity=e,this.customElemenentContainer.style.opacity=e};this.showHideButton.hasClass(\"search-visible\")?(this.showHideButton.removeClass(\"search-visible\"),this.showHideButton.addClass(\"search-hidden\"),this.searchBarWrapper.style.backgroundColor=\"transparent\",e(\"0\"),this.showHideButton.innerHTML=obsidian_module.getIcon(\"maximize-2\").outerHTML):(this.showHideButton.removeClass(\"search-hidden\"),this.showHideButton.addClass(\"search-visible\"),this.searchBarWrapper.style.backgroundColor=null,e(null),this.showHideButton.innerHTML=obsidian_module.getIcon(\"minimize-2\").outerHTML)},this.searchBar.addEventListener(\"input\",(e=>{this.clearHighlights();const t=e.target.value;if(t&&t.length>0){this.highlightSearchTerm(t);const e=this.contentDiv.querySelectorAll(\"mark.search-highlight\").length;this.hitCount.textContent=e>0?`1 / ${e}`:\"\",setTimeout((()=>this.navigateSearchResults(\"next\")))}else this.hitCount.textContent=\"\"})),this.searchBar.addEventListener(\"keydown\",(e=>{(e.ctrlKey||e.metaKey)&&\"f\"===e.key?(e.preventDefault(),this.searchBar.focus()):\"Enter\"===e.key&&(e.preventDefault(),this.navigateSearchResults(e.shiftKey?\"previous\":\"next\"))}))}getSearchBarWrapper(){return this.searchBarWrapper}highlightSearchTerm(e){const t=document.createTreeWalker(this.contentDiv,NodeFilter.SHOW_TEXT,{acceptNode:t=>t.nodeValue.toLowerCase().includes(e.toLowerCase())?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),a=[];for(;t.nextNode();)a.push(t.currentNode);a.forEach((t=>{const a=t.nodeValue,i=document.createDocumentFragment();let n,r=0;const s=new RegExp(escapeRegExp(e),\"gi\");for(;null!==(n=s.exec(a));){const e=document.createTextNode(a.slice(r,n.index)),t=document.createElement(\"mark\");t.className=\"search-highlight\",t.textContent=n[0],t.classList.add(\"search-result\"),i.appendChild(e),i.appendChild(t),r=s.lastIndex}i.appendChild(document.createTextNode(a.slice(r))),t.replaceWith(i)}))}clearHighlights(){this.contentDiv.querySelectorAll(\"mark.search-highlight\").forEach((e=>{e.outerHTML=e.innerHTML}))}navigateSearchResults(e){const t=Array.from(this.contentDiv.querySelectorAll(\"mark.search-highlight\"));if(0===t.length)return;const a=t.findIndex((e=>e.classList.contains(\"active-highlight\")));-1!==a&&(t[a].classList.remove(\"active-highlight\"),t[a].style.border=\"none\");let i=0;\"next\"===e?i=a===t.length-1?0:a+1:\"previous\"===e&&(i=0===a?t.length-1:a-1);const n=t[i];n.classList.add(\"active-highlight\"),this.expandParentDetails(n),setTimeout((()=>{n.scrollIntoView({behavior:\"smooth\",block:\"nearest\"})}),100),this.hitCount.textContent=`${i+1} / ${t.length}`}expandParentDetails(e){let t=e.parentElement;for(;t;)\"DETAILS\"===t.tagName&&t.setAttribute(\"open\",\"\"),t=t.parentElement}}const URL$1=\"https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/ea-scripts/index-new.md\";class ScriptInstallPrompt extends obsidian_module.Modal{plugin;contentDiv;constructor(e){super(e.app),this.plugin=e}async onOpen(){this.contentEl.classList.add(\"excalidraw-scriptengine-install\"),this.contentDiv=document.createElement(\"div\"),this.contentEl.appendChild(this.contentDiv),new ContentSearcher(this.contentDiv),this.containerEl.classList.add(\"excalidraw-scriptengine-install\");try{const e=await obsidian_module.request({url:URL$1});if(!e)return new obsidian_module.Notice(\"Error opening the Excalidraw Script Store page. Please double check that you can access the website. I've logged the link in developer console (press CTRL+SHIFT+i)\",5e3),log$2(URL$1),void this.close();await obsidian_module.MarkdownRenderer.render(this.plugin.app,e,this.contentDiv,\"\",this.plugin),this.contentDiv.querySelectorAll(\"h1[data-heading],h2[data-heading],h3[data-heading]\").forEach((e=>{e.setAttribute(\"id\",e.getAttribute(\"data-heading\"))})),this.contentDiv.querySelectorAll(\"a.internal-link\").forEach((e=>{e.removeAttribute(\"target\")}))}catch(e){errorlog({where:\"ScriptInstallPrompt.onOpen\",error:e}),new obsidian_module.Notice(\"Could not open ScriptEngine repository\"),this.close()}}onClose(){this.contentEl.empty()}}function r$e(e){var t,a,i=\"\";if(\"string\"==typeof e||\"number\"==typeof e)i+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(a=r$e(e[t]))&&(i&&(i+=\" \"),i+=a)}else for(a in e)e[a]&&(i&&(i+=\" \"),i+=a);return i}function clsx(){for(var e,t,a=0,i=\"\",n=arguments.length;a<n;a++)(e=arguments[a])&&(t=r$e(e))&&(i&&(i+=\" \"),i+=t);return i}const PENS={default:{type:\"default\",freedrawOnly:!1,strokeColor:\"#000000\",backgroundColor:\"transparent\",fillStyle:\"hachure\",strokeWidth:0,roughness:0,penOptions:{highlighter:!1,constantPressure:!1,hasOutline:!1,outlineWidth:1,options:{thinning:.6,smoothing:.5,streamline:.5,easing:\"easeOutSine\",start:{cap:!0,taper:0,easing:\"linear\"},end:{cap:!0,taper:0,easing:\"linear\"}}}},highlighter:{type:\"highlighter\",freedrawOnly:!0,strokeColor:\"#FFC47C\",backgroundColor:\"#FFC47C\",fillStyle:\"solid\",strokeWidth:2,roughness:null,penOptions:{highlighter:!0,constantPressure:!0,hasOutline:!0,outlineWidth:4,options:{thinning:1,smoothing:.5,streamline:.5,easing:\"linear\",start:{taper:0,cap:!0,easing:\"linear\"},end:{taper:0,cap:!0,easing:\"linear\"}}}},finetip:{type:\"finetip\",freedrawOnly:!1,strokeColor:\"#3E6F8D\",backgroundColor:\"transparent\",fillStyle:\"hachure\",strokeWidth:.5,roughness:0,penOptions:{highlighter:!1,hasOutline:!1,outlineWidth:1,constantPressure:!0,options:{smoothing:.4,thinning:-.5,streamline:.4,easing:\"linear\",start:{taper:5,cap:!1,easing:\"linear\"},end:{taper:5,cap:!1,easing:\"linear\"}}}},fountain:{type:\"fountain\",freedrawOnly:!1,strokeColor:\"#000000\",backgroundColor:\"transparent\",fillStyle:\"hachure\",strokeWidth:2,roughness:0,penOptions:{highlighter:!1,constantPressure:!1,hasOutline:!1,outlineWidth:1,options:{smoothing:.2,thinning:.6,streamline:.2,easing:\"easeInOutSine\",start:{taper:150,cap:!0,easing:\"linear\"},end:{taper:1,cap:!0,easing:\"linear\"}}}},marker:{type:\"marker\",freedrawOnly:!0,strokeColor:\"#B83E3E\",backgroundColor:\"#FF7C7C\",fillStyle:\"dashed\",strokeWidth:2,roughness:3,penOptions:{highlighter:!1,constantPressure:!0,hasOutline:!0,outlineWidth:4,options:{thinning:1,smoothing:.5,streamline:.5,easing:\"linear\",start:{taper:0,cap:!0,easing:\"linear\"},end:{taper:0,cap:!0,easing:\"linear\"}}}},\"thick-thin\":{type:\"thick-thin\",freedrawOnly:!0,strokeColor:\"#CECDCC\",backgroundColor:\"transparent\",fillStyle:\"hachure\",strokeWidth:0,roughness:null,penOptions:{highlighter:!0,constantPressure:!0,hasOutline:!1,outlineWidth:1,options:{thinning:1,smoothing:.5,streamline:.5,easing:\"linear\",start:{taper:0,cap:!0,easing:\"linear\"},end:{cap:!0,taper:!0,easing:\"linear\"}}}},\"thin-thick-thin\":{type:\"thin-thick-thin\",freedrawOnly:!0,strokeColor:\"#CECDCC\",backgroundColor:\"transparent\",fillStyle:\"hachure\",strokeWidth:0,roughness:null,penOptions:{highlighter:!0,constantPressure:!0,hasOutline:!1,outlineWidth:1,options:{thinning:1,smoothing:.5,streamline:.5,easing:\"linear\",start:{cap:!0,taper:!0,easing:\"linear\"},end:{cap:!0,taper:!0,easing:\"linear\"}}}}},EASINGFUNCTIONS={linear:\"linear\",easeInQuad:\"easeInQuad\",easeOutQuad:\"easeOutQuad\",easeInOutQuad:\"easeInOutQuad\",easeInCubic:\"easeInCubic\",easeOutCubic:\"easeOutCubic\",easeInOutCubic:\"easeInOutCubic\",easeInQuart:\"easeInQuart\",easeOutQuart:\"easeOutQuart\",easeInOutQuart:\"easeInOutQuart\",easeInQuint:\"easeInQuint\",easeOutQuint:\"easeOutQuint\",easeInOutQuint:\"easeInOutQuint\",easeInSine:\"easeInSine\",easeOutSine:\"easeOutSine\",easeInOutSine:\"easeInOutSine\",easeInExpo:\"easeInExpo\",easeOutExpo:\"easeOutExpo\",easeInOutExpo:\"easeInOutExpo\",easeInCirc:\"easeInCirc\",easeOutCirc:\"easeOutCirc\",easeInOutCirc:\"easeInOutCirc\",easeInBack:\"easeInBack\",easeOutBack:\"easeOutBack\",easeInOutBack:\"easeInOutBack\",easeInElastic:\"easeInElastic\",easeOutElastic:\"easeOutElastic\",easeInOutElastic:\"easeInOutElastic\",easeInBounce:\"easeInBounce\",easeOutBounce:\"easeOutBounce\",easeInOutBounce:\"easeInOutBounce\"};class PenSettingsModal extends obsidian_module.Modal{plugin;view;pen;api;dirty=!1;constructor(e,t,a){super(e.app),this.plugin=e,this.view=t,this.pen=a,this.api=t.excalidrawAPI}onOpen(){this.containerEl.classList.add(\"excalidraw-release\"),this.titleEl.setText(\"Pen Settings\"),this.createForm()}async onClose(){if(this.dirty){getExcalidrawViews(this.app).forEach((e=>e.updatePinnedCustomPens())),this.plugin.saveSettings();const e=this.plugin.settings.customPens[this.pen],t=this.view.excalidrawAPI;setPen(e,t),t.setActiveTool({type:\"freedraw\"})}}async createForm(){const e=e=>{let t=\"\";if(COLOR_NAMES.has(e))return[COLOR_NAMES.get(e),t];const a=(new Option).style;if(a.color=e,a.color){const e=a.color.match(/^[^\\d]*(\\d*)[^\\d]*(\\d*)[^\\d]*(\\d*)[^\\d]*([\\d\\.]*)?/);return e?(t=e[4]?(0|Math.round(255*parseFloat(e[4]))).toString(16).padStart(2,\"0\"):\"\",[`#${(0|parseInt(e[1])).toString(16).padStart(2,\"0\")}${(0|parseInt(e[2])).toString(16).padStart(2,\"0\")}${(0|parseInt(e[3])).toString(16).padStart(2,\"0\")}`,t]):[null,t]}return[null,t]},t=this.plugin.settings.customPens[this.pen],a=this.contentEl;let i,n,r,s,o;a.createEl(\"h1\",{text:\"Pen settings\"}),new obsidian_module.Setting(a).setName(\"Pen type\").setDesc(\"Select type of pen\").addDropdown((e=>{e.addOption(\"default\",\"Excalidraw Default\").addOption(\"highlighter\",\"Highlighter\").addOption(\"finetip\",\"Fine tip pen\").addOption(\"fountain\",\"Fountain pen\").addOption(\"marker\",\"Marker with Outline\").addOption(\"thick-thin\",\"Mindmap Thick-Thin\").addOption(\"thin-thick-thin\",\"Mindmap Thin-Thick-Thin\").setValue(t.type).onChange((e=>{this.dirty=!0,t.type=e}))})).addButton((e=>e.setButtonText(\"Apply\").onClick((()=>{this.dirty=!0,t.strokeColor=PENS[t.type].strokeColor,t.backgroundColor=PENS[t.type].backgroundColor,t.fillStyle=PENS[t.type].fillStyle,t.strokeWidth=PENS[t.type].strokeWidth,t.roughness=PENS[t.type].roughness,t.penOptions={...PENS[t.type].penOptions},a.empty(),this.createForm()})))),i=new obsidian_module.Setting(a).setName(fragWithHTML(t.freedrawOnly?\"Stroke & fill applies to: <b>Freedraw only</b>\":\"Stroke & fill applies to: <b>All shapes</b>\")).setDesc(fragWithHTML('<b>\"All shapes\"</b> means that if for example, you select a blue pen with dashed fill and then switch to a different tool (e.g. to a line, a circle, an arrow - i.e. not the freedraw tool), those will all have the same blue line and dashed fill.<br><b>\"Only applies to the freedraw line\"</b> means that if for example you are writing black text, and you select a custom pen (e.g. a yellow highlighter), then after using the highlighter you switch to another tool, the previous settings (e.g. black stroke color) will apply to the new shape.')).addToggle((e=>e.setValue(t.freedrawOnly).onChange((e=>{this.dirty=!0,i.setName(fragWithHTML(e?\"Stroke & fill applies to: <b>Freedraw only</b>\":\"Stroke & fill applies to: <b>All shapes</b>\")),t.freedrawOnly=e}))));let l,c,d,h,p,u,m,[g,f]=e(t.strokeColor),b=!1;o=new obsidian_module.Setting(a).setName(fragWithHTML(Boolean(t.strokeColor)?\"Stroke color: <b>Preset color</b>\":\"Stroke color: <b>Current</b>\")).setDesc(fragWithHTML(\"Use <b>current</b> stroke color of the canvas, or set a specific <b>preset color</b> for the pen\")).addToggle((a=>a.setValue(!Boolean(t.strokeColor)).onChange((a=>{this.dirty=!0,n.settingEl.style.display=a?\"none\":\"\",o.setName(fragWithHTML(a?\"Stroke color: <b>Current</b>\":\"Stroke color: <b>Preset color</b>\")),a?delete t.strokeColor:(s.getValue()||([g,f]=e(\"black\"),r.setValue(g),s.setValue(\"black\")),t.strokeColor=s.getValue())})))),n=new obsidian_module.Setting(a).setName(\"Select stroke color\").addButton((a=>a.setButtonText(\"Use Canvas Current\").onClick((()=>{const a=this.api.getAppState(),i=a.resetCustomPen?.currentItemStrokeColor??a.currentItemStrokeColor;[g,f]=e(i),t.strokeColor=i,this.dirty=!0,s.setValue(i),b=!0,r.setValue(g)})))).addText((a=>{s=a,a.setValue(t.strokeColor).onChange((a=>{b=!0,this.dirty=!0,t.strokeColor=a,[g,f]=e(a),g&&r.setValue(g)}))})).addColorPicker((e=>{r=e,e.setValue(g??\"#000000\").onChange((e=>{b?b=!1:(this.dirty=!0,t.strokeColor=e+f,s.setValue(e+f))}))})),n.settingEl.style.display=Boolean(t.strokeColor)?\"\":\"none\";let[U,E]=e(t.backgroundColor);l=new obsidian_module.Setting(a).setName(fragWithHTML(Boolean(t.backgroundColor)?\"Background color: <b>Preset color</b>\":\"Background color: <b>Current</b>\")).setDesc(fragWithHTML(\"Toggle to use the <b>current background color</b> of the canvas; or a <b>preset color</b>\")).addToggle((a=>a.setValue(!Boolean(t.backgroundColor)).onChange((a=>{this.dirty=!0,l.setName(fragWithHTML(a?\"Background color: <b>Current</b>\":\"Background color: <b>Preset color</b>\")),d.settingEl.style.display=a?\"none\":\"\",c.settingEl.style.display=a||\"transparent\"===t.backgroundColor?\"none\":\"\",a?delete t.backgroundColor:(p.getValue()||([U,E]=e(\"black\"),h.setValue(U),p.setValue(\"black\")),u.setValue(!1))})))),d=new obsidian_module.Setting(a).setName(fragWithHTML(\"transparent\"===t.backgroundColor?\"Background: <b>Transparent</b>\":\"Color: <b>Preset color</b>\")).setDesc(\"Background has color or is transparent\").addToggle((e=>{u=e,e.setValue(\"transparent\"===t.backgroundColor).onChange((e=>{this.dirty=!0,c.settingEl.style.display=e?\"none\":\"\",m.settingEl.style.display=e?\"none\":\"\",d.setName(fragWithHTML(e?\"Background: <b>Transparent</b>\":\"Color: <b>Preset color</b>\")),t.backgroundColor=e?\"transparent\":h.getValue()}))})),d.settingEl.style.display=Boolean(t.backgroundColor)?\"\":\"none\";let w,y,v,T,S,_,C,I,x,A=!1;c=new obsidian_module.Setting(a).setName(\"Background color\").addButton((a=>a.setButtonText(\"Use Canvas Current\").onClick((()=>{const a=this.api.getAppState(),i=a.resetCustomPen?.currentItemBackgroundColor??a.currentItemBackgroundColor;[U,E]=e(i),t.backgroundColor=i,this.dirty=!0,p.setValue(i),A=!0,h.setValue(U)})))).addText((a=>{p=a,a.setValue(t.backgroundColor).onChange((a=>{A=!0,this.dirty=!0,t.backgroundColor=a,[U,E]=e(a),U&&h.setValue(U)}))})).addColorPicker((e=>{h=e,e.setValue(U??\"#000000\").onChange((e=>{A?A=!1:(this.dirty=!0,t.backgroundColor=e+E,p.setValue(e+E))}))})),c.settingEl.style.display=Boolean(t.backgroundColor)&&\"transparent\"!==t.backgroundColor?\"\":\"none\",m=new obsidian_module.Setting(a).setName(\"Fill Style\").addDropdown((e=>e.addOption(\"\",\"Unset\").addOption(\"dots\",\"Dots (\u26a0 VERY SLOW performance on large objects!)\").addOption(\"zigzag\",\"Zigzag\").addOption(\"zigzag-line\",\"Zigzag-line\").addOption(\"dashed\",\"Dashed\").addOption(\"hachure\",\"Hachure\").addOption(\"cross-hatch\",\"Cross-hatch\").addOption(\"solid\",\"Solid\").setValue(t.fillStyle).onChange((e=>{this.dirty=!0,t.fillStyle=e})))),m.settingEl.style.display=Boolean(t.backgroundColor)&&\"transparent\"!==t.backgroundColor?\"\":\"none\",w=new obsidian_module.Setting(a).setName(fragWithHTML(`Sloppiness: <b>${null===t.roughness?\"Not Set\":t.roughness<=.5?\"Architect (\":t.roughness<=1.5?\"Artist (\":\"Cartoonist (\"}${null===t.roughness?\"\":`${t.roughness})`}</b>`)).setDesc(\"Line sloppiness of the shape fill pattern\").addSlider((e=>e.setLimits(-.5,3,.5).setValue(null===t.roughness?-.5:t.roughness).onChange((e=>{this.dirty=!0,t.roughness=-.5===e?null:e,w.setName(fragWithHTML(`Sloppiness: <b>${null===t.roughness?\"Not Set\":t.roughness<=.5?\"Architect (\":t.roughness<=1.5?\"Artist (\":\"Cartoonist (\"}${null===t.roughness?\"\":`${t.roughness})`}</b>`))})))),y=new obsidian_module.Setting(a).setName(fragWithHTML(`Stroke Width <b>${0===t.strokeWidth?\"Not Set\":t.strokeWidth}</b>`)).addSlider((e=>e.setLimits(0,5,.5).setValue(t.strokeWidth).onChange((e=>{this.dirty=!0,t.strokeWidth=e,y.setName(fragWithHTML(`Stroke Width <b>${0===t.strokeWidth?\"Not Set\":t.strokeWidth}</b>`))})))),new obsidian_module.Setting(a).setName(\"Highlighter pen?\").addToggle((e=>e.setValue(t.penOptions.highlighter).onChange((e=>{this.dirty=!0,t.penOptions.highlighter=e})))),new obsidian_module.Setting(a).setName(\"Pressure sensitive pen?\").setDesc(fragWithHTML(\"<b>toggle on</b>: pressure sensitive<br><b>toggle off</b>: constant pressure\")).addToggle((e=>e.setValue(!t.penOptions.constantPressure).onChange((e=>{this.dirty=!0,t.penOptions.constantPressure=!e,v.settingEl.style.display=t.penOptions.constantPressure?\"none\":\"\"})))),t.penOptions.hasOutline&&0===t.penOptions.outlineWidth&&(t.penOptions.outlineWidth=.5,this.dirty=!0),!t.penOptions.hasOutline&&t.penOptions.outlineWidth>0&&(t.penOptions.outlineWidth=0,this.dirty=!0),T=new obsidian_module.Setting(a).setName(fragWithHTML(0===t.penOptions.outlineWidth?\"No outline\":`Outline width <b>${t.penOptions.outlineWidth}</b>`)).setDesc(\"If the stroke has an outline, this will mean the stroke color is the outline color, and the background color is the pen stroke's fill color. If the pen does not have an outline then the pen color is the stroke color. The Fill Style setting applies to the fill style of the enclosed shape, not of the line itself. The line can only have solid fill.\").addSlider((e=>e.setLimits(0,8,.5).setValue(t.penOptions.outlineWidth).onChange((e=>{this.dirty=!0,t.penOptions.outlineWidth=e,t.penOptions.hasOutline=e>0,T.setName(fragWithHTML(0===t.penOptions.outlineWidth?\"No outline\":`Outline width <b>${t.penOptions.outlineWidth}</b>`))})))),a.createEl(\"h2\",{text:\"Perfect Freehand settings\"}),a.createEl(\"p\").innerHTML='Read the Perfect Freehand documentation following <a href=\"https://github.com/steveruizok/perfect-freehand#documentation\" target=\"_blank\">this link</a>.',S=new obsidian_module.Setting(a).setName(fragWithHTML(`Thinnning <b>${t.penOptions.options.thinning}</b>`)).setDesc(fragWithHTML(\"The effect of pressure on the stroke's size.<br>To create a stroke with a steady line, set the thinning option to 0.<br>To create a stroke that gets thinner with pressure instead of thicker, use a negative number for the thinning option.\")).addSlider((e=>e.setLimits(-1,1,.05).setValue(t.penOptions.options.thinning).onChange((e=>{this.dirty,S.setName(fragWithHTML(`Thinnning <b>${e}</b>`)),t.penOptions.options.thinning=e})))),_=new obsidian_module.Setting(a).setName(fragWithHTML(`Smoothing <b>${t.penOptions.options.smoothing}</b>`)).setDesc(fragWithHTML(\"How much to soften the stroke's edges.\")).addSlider((e=>e.setLimits(0,1,.05).setValue(t.penOptions.options.smoothing).onChange((e=>{this.dirty,_.setName(fragWithHTML(`Smoothing <b>${e}</b>`)),t.penOptions.options.smoothing=e})))),C=new obsidian_module.Setting(a).setName(fragWithHTML(`Streamline <b>${t.penOptions.options.streamline}</b>`)).setDesc(fragWithHTML(\"\\tHow much to streamline the stroke.\")).addSlider((e=>e.setLimits(0,1,.05).setValue(t.penOptions.options.streamline).onChange((e=>{this.dirty,C.setName(fragWithHTML(`Streamline <b>${e}</b>`)),t.penOptions.options.streamline=e})))),new obsidian_module.Setting(a).setName(\"Easing function\").setDesc(fragWithHTML('An easing function for the tapering effect. For more info <a href=\"https://easings.net/#\" target=\"_blank\">click here</a>')).addDropdown((e=>e.addOptions(EASINGFUNCTIONS).setValue(t.penOptions.options.easing).onChange((e=>{this.dirty=!0,t.penOptions.options.easing=e})))),v=new obsidian_module.Setting(a).setName(\"Simulate Pressure\").setDesc(\"Whether to simulate pressure based on velocity.\").addDropdown((e=>e.addOption(\"true\",\"Always\").addOption(\"false\",\"Never\").addOption(\"\",\"Yes for mouse, No for pen\").setValue(!0===t.penOptions.options.simulatePressure?\"true\":!1===t.penOptions.options.simulatePressure?\"false\":\"\").onChange((e=>{switch(this.dirty=!0,e){case\"true\":t.penOptions.options.simulatePressure=!0;break;case\"false\":t.penOptions.options.simulatePressure=!1;break;default:delete t.penOptions.options.simulatePressure}})))),v.settingEl.style.display=t.penOptions.constantPressure?\"none\":\"\",a.createEl(\"h3\",{text:\"Start\"}),a.createEl(\"p\",{text:\"Tapering options for the start of the line.\"}),new obsidian_module.Setting(a).setName(\"Cap Start\").setDesc(\"Whether to draw a cap\").addToggle((e=>e.setValue(t.penOptions.options.start.cap).onChange((e=>{this.dirty=!0,t.penOptions.options.start.cap=e})))),I=new obsidian_module.Setting(a).setName(fragWithHTML(`Taper: <b>${!0===t.penOptions.options.start.taper?\"true\":t.penOptions.options.start.taper}</b>`)).setDesc(\"The distance to taper. If set to true, the taper will be the total length of the stroke.\").addSlider((e=>e.setLimits(0,151,1).setValue(\"boolean\"==typeof t.penOptions.options.start.taper?151:t.penOptions.options.start.taper).onChange((e=>{this.dirty,t.penOptions.options.start.taper=151===e||e,I.setName(fragWithHTML(`Taper: <b>${!0===t.penOptions.options.start.taper?\"true\":t.penOptions.options.start.taper}</b>`))})))),new obsidian_module.Setting(a).setName(\"Easing function\").setDesc(fragWithHTML('An easing function for the tapering effect. For more info <a href=\"https://easings.net/#\" target=\"_blank\">click here</a>')).addDropdown((e=>e.addOptions(EASINGFUNCTIONS).setValue(t.penOptions.options.start.easing).onChange((e=>{this.dirty=!0,t.penOptions.options.start.easing=e})))),a.createEl(\"h3\",{text:\"End\"}),a.createEl(\"p\",{text:\"Tapering options for the end of the line.\"}),new obsidian_module.Setting(a).setName(\"Cap End\").setDesc(\"Whether to draw a cap\").addToggle((e=>e.setValue(t.penOptions.options.end.cap).onChange((e=>{this.dirty=!0,t.penOptions.options.end.cap=e})))),x=new obsidian_module.Setting(a).setName(fragWithHTML(`Taper: <b>${!0===t.penOptions.options.end.taper?\"true\":t.penOptions.options.end.taper}</b>`)).setDesc(\"The distance to taper. If set to true, the taper will be the total length of the stroke.\").addSlider((e=>e.setLimits(0,151,1).setValue(\"boolean\"==typeof t.penOptions.options.end.taper?151:t.penOptions.options.end.taper).onChange((e=>{this.dirty,t.penOptions.options.end.taper=151===e||e,x.setName(fragWithHTML(`Taper: <b>${!0===t.penOptions.options.end.taper?\"true\":t.penOptions.options.end.taper}</b>`))})))),new obsidian_module.Setting(a).setName(\"Easing function\").setDesc(fragWithHTML('An easing function for the tapering effect. For more info <a href=\"https://easings.net/#\" target=\"_blank\">click here</a>')).addDropdown((e=>e.addOptions(EASINGFUNCTIONS).setValue(t.penOptions.options.end.easing).onChange((e=>{this.dirty=!0,t.penOptions.options.end.easing=e}))))}}const toKebabCase=e=>e.replace(/([a-z0-9])([A-Z])/g,\"$1-$2\").toLowerCase(),mergeClasses=(...e)=>e.filter(((e,t,a)=>Boolean(e)&&\"\"!==e.trim()&&a.indexOf(e)===t)).join(\" \").trim();var defaultAttributes={xmlns:\"http://www.w3.org/2000/svg\",width:24,height:24,viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:2,strokeLinecap:\"round\",strokeLinejoin:\"round\"};const Icon=React.forwardRef((({color:e=\"currentColor\",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:i,className:n=\"\",children:r,iconNode:s,...o},l)=>React.createElement(\"svg\",{ref:l,...defaultAttributes,width:t,height:t,stroke:e,strokeWidth:i?24*Number(a)/Number(t):a,className:mergeClasses(\"lucide\",n),...o},[...s.map((([e,t])=>React.createElement(e,t))),...Array.isArray(r)?r:[r]]))),createLucideIcon=(e,t)=>{const a=React.forwardRef((({className:a,...i},n)=>React.createElement(Icon,{ref:n,iconNode:t,className:mergeClasses(`lucide-${toKebabCase(e)}`,a),...i})));return a.displayName=`${e}`,a},__iconNode$8=[[\"path\",{d:\"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z\",key:\"1fy3hk\"}]],Bookmark=createLucideIcon(\"Bookmark\",__iconNode$8),__iconNode$7=[[\"path\",{d:\"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z\",key:\"1tc9qg\"}],[\"circle\",{cx:\"12\",cy:\"13\",r:\"3\",key:\"1vg3eu\"}]],Camera=createLucideIcon(\"Camera\",__iconNode$7),__iconNode$6=[[\"rect\",{width:\"14\",height:\"14\",x:\"8\",y:\"8\",rx:\"2\",ry:\"2\",key:\"17jyea\"}],[\"path\",{d:\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\",key:\"zix9uf\"}]],Copy=createLucideIcon(\"Copy\",__iconNode$6),__iconNode$5=[[\"path\",{d:\"M6 2v14a2 2 0 0 0 2 2h14\",key:\"ron5a4\"}],[\"path\",{d:\"M18 22V8a2 2 0 0 0-2-2H2\",key:\"7s9ehn\"}]],Crop=createLucideIcon(\"Crop\",__iconNode$5),__iconNode$4=[[\"circle\",{cx:\"12\",cy:\"12\",r:\"10\",key:\"1mglay\"}],[\"path\",{d:\"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20\",key:\"13o1zl\"}],[\"path\",{d:\"M2 12h20\",key:\"9i4pu4\"}]],Globe=createLucideIcon(\"Globe\",__iconNode$4),__iconNode$3=[[\"path\",{d:\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\",key:\"1357e3\"}],[\"path\",{d:\"M3 3v5h5\",key:\"1xhq8a\"}]],RotateCcw=createLucideIcon(\"RotateCcw\",__iconNode$3),__iconNode$2=[[\"path\",{d:\"M3 7V5a2 2 0 0 1 2-2h2\",key:\"aa7l1z\"}],[\"path\",{d:\"M17 3h2a2 2 0 0 1 2 2v2\",key:\"4qcy5o\"}],[\"path\",{d:\"M21 17v2a2 2 0 0 1-2 2h-2\",key:\"6vwrx8\"}],[\"path\",{d:\"M7 21H5a2 2 0 0 1-2-2v-2\",key:\"ioqczr\"}]],Scan=createLucideIcon(\"Scan\",__iconNode$2),__iconNode$1=[[\"path\",{d:\"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z\",key:\"1qme2f\"}],[\"circle\",{cx:\"12\",cy:\"12\",r:\"3\",key:\"1v7zrd\"}]],Settings=createLucideIcon(\"Settings\",__iconNode$1),__iconNode=[[\"path\",{d:\"M5 3a2 2 0 0 0-2 2\",key:\"y57alp\"}],[\"path\",{d:\"M19 3a2 2 0 0 1 2 2\",key:\"18rm91\"}],[\"path\",{d:\"M21 19a2 2 0 0 1-2 2\",key:\"1j7049\"}],[\"path\",{d:\"M5 21a2 2 0 0 1-2-2\",key:\"sbafld\"}],[\"path\",{d:\"M9 3h1\",key:\"1yesri\"}],[\"path\",{d:\"M9 21h1\",key:\"15o7lz\"}],[\"path\",{d:\"M14 3h1\",key:\"1ec4yj\"}],[\"path\",{d:\"M14 21h1\",key:\"v9vybs\"}],[\"path\",{d:\"M3 9v1\",key:\"1r0deq\"}],[\"path\",{d:\"M21 9v1\",key:\"mxsmne\"}],[\"path\",{d:\"M3 14v1\",key:\"vnatye\"}],[\"path\",{d:\"M21 14v1\",key:\"169vum\"}],[\"line\",{x1:\"7\",x2:\"15\",y1:\"8\",y2:\"8\",key:\"1758g8\"}],[\"line\",{x1:\"7\",x2:\"17\",y1:\"12\",y2:\"12\",key:\"197423\"}],[\"line\",{x1:\"7\",x2:\"13\",y1:\"16\",y2:\"16\",key:\"37cgm6\"}]],TextSelect=createLucideIcon(\"TextSelect\",__iconNode),ICONS={ExportImage:React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},React__namespace.createElement(\"g\",{strokeWidth:\"1.25\"},React__namespace.createElement(\"path\",{stroke:\"none\",d:\"M0 0h24v24H0z\",fill:\"none\"}),React__namespace.createElement(\"path\",{d:\"M15 8h.01\"}),React__namespace.createElement(\"path\",{d:\"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5\"}),React__namespace.createElement(\"path\",{d:\"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4\"}),React__namespace.createElement(\"path\",{d:\"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598\"}),React__namespace.createElement(\"path\",{d:\"M19 16v6\"}),React__namespace.createElement(\"path\",{d:\"M22 19l-3 3l-3 -3\"}))),BackOfNote:React__namespace.createElement(TextSelect,null),Reload:React__namespace.createElement(RotateCcw,null),Copy:React__namespace.createElement(Copy,null),Globe:React__namespace.createElement(Globe,null),Crop:React__namespace.createElement(Crop,null),Bookmark:React__namespace.createElement(Bookmark,null),Camera:React__namespace.createElement(Camera,null),ZoomToSelectedElement:React__namespace.createElement(Scan,null),Properties:React__namespace.createElement(Settings,null),ZoomToSection:React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"1\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},React__namespace.createElement(\"text\",{x:\"6\",y:\"18\",fontSize:\"22px\"},\"#\")),ZoomToBlock:React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"1\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},React__namespace.createElement(\"text\",{x:\"1\",y:\"18\",fontSize:\"22px\"},\"#^\")),Learn:React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},React__namespace.createElement(\"path\",{d:\"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z\"}),React__namespace.createElement(\"path\",{d:\"M22 10v6\"}),React__namespace.createElement(\"path\",{d:\"M6 12.5V16a6 3 0 0 0 12 0v-3.5\"})),Discord:React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",fill:\"var(--icon-fill-color)\",stroke:\"none\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",viewBox:\"0 0 640 512\"},React__namespace.createElement(\"path\",{d:\"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z\"})),Github:React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},React__namespace.createElement(\"path\",{d:\"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4\"}),React__namespace.createElement(\"path\",{d:\"M9 18c-4.51 2-5-2-7-2\"})),YouTube:React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},React__namespace.createElement(\"path\",{d:\"M12 19c-2.3 0-6.4-.2-8.1-.6-.7-.2-1.2-.7-1.4-1.4-.3-1.1-.5-3.4-.5-5s.2-3.9.5-5c.2-.7.7-1.2 1.4-1.4C5.6 5.2 9.7 5 12 5s6.4.2 8.1.6c.7.2 1.2.7 1.4 1.4.3 1.1.5 3.4.5 5s-.2 3.9-.5 5c-.2.7-.7 1.2-1.4 1.4-1.7.4-5.8.6-8.1.6 0 0 0 0 0 0z\"}),React__namespace.createElement(\"polygon\",{points:\"10 15 15 12 10 9\"})),heart:React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},React__namespace.createElement(\"path\",{d:\"M20.42 4.58a5.4 5.4 0 0 0-7.65 0l-.77.78-.77-.78a5.4 5.4 0 0 0-7.65 0C1.46 6.7 1.33 10.28 4 13l8 8 8-8c2.67-2.72 2.54-6.3.42-8.42z\"})),twitter:React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},React__namespace.createElement(\"path\",{d:\"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z\"})),exportLibrary:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 200 190\",fill:\"var(--icon-fill-color)\"},React__namespace.createElement(\"g\",{fillRule:\"evenodd\"},React__namespace.createElement(\"path\",{strokeWidth:\"0\",d:\"M50 10h20v20H50\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",d:\"M50 10h20m-20 0h20m0 0v20m0-20v20m0 0H50m20 0H50m0 0V10m0 20V10\"})),React__namespace.createElement(\"g\",{fillRule:\"evenodd\"},React__namespace.createElement(\"path\",{strokeWidth:\"0\",d:\"M90 10h20v20H90\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",d:\"M90 10h20m-20 0h20m0 0v20m0-20v20m0 0H90m20 0H90m0 0V10m0 20V10\"})),React__namespace.createElement(\"g\",{fillRule:\"evenodd\"},React__namespace.createElement(\"path\",{strokeWidth:\"0\",d:\"M130 10h20v20h-20\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",d:\"M130 10h20m-20 0h20m0 0v20m0-20v20m0 0h-20m20 0h-20m0 0V10m0 20V10\"})),React__namespace.createElement(\"g\",{fillRule:\"evenodd\"},React__namespace.createElement(\"path\",{strokeWidth:\"0\",d:\"M170 10h20v20h-20\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",d:\"M170 10h20m-20 0h20m0 0v20m0-20v20m0 0h-20m20 0h-20m0 0V10m0 20V10\"})),React__namespace.createElement(\"g\",{fillRule:\"evenodd\"},React__namespace.createElement(\"path\",{strokeWidth:\"0\",d:\"M70 50h60v80h20l-50 50-50-50h20V50\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",d:\"M70 50h60m-60 0h60m0 0v80m0-80v80m0 0h20m-20 0h20m0 0-50 50m50-50-50 50m0 0-50-50m50 50-50-50m0 0h20m-20 0h20m0 0V50m0 80V50m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0\"})),React__namespace.createElement(\"g\",{fillRule:\"evenodd\"},React__namespace.createElement(\"path\",{strokeWidth:\"0\",d:\"M10 10h20v20H10\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",d:\"M10 10h20m-20 0h20m0 0v20m0-20v20m0 0H10m20 0H10m0 0V10m0 20V10\"}))),insertPDF:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 512 512\",fill:\"var(--icon-fill-color)\",stroke:\"none\"},React__namespace.createElement(\"path\",{d:\"M64 464H96v48H64c-35.3 0-64-28.7-64-64V64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V288H336V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM176 352h32c30.9 0 56 25.1 56 56s-25.1 56-56 56H192v32c0 8.8-7.2 16-16 16s-16-7.2-16-16V448 368c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24H192v48h16zm96-80h32c26.5 0 48 21.5 48 48v64c0 26.5-21.5 48-48 48H304c-8.8 0-16-7.2-16-16V368c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H320v96h16zm80-112c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v32h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v48c0 8.8-7.2 16-16 16s-16-7.2-16-16V432 368z\"})),insertImage:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 512 512\",fill:\"var(--icon-fill-color)\",stroke:\"none\"},React__namespace.createElement(\"path\",{d:\"M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 336H54a6 6 0 0 1-6-6V118a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v276a6 6 0 0 1-6 6zM128 152c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zM96 352h320v-80l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L192 304l-39.515-39.515c-4.686-4.686-12.284-4.686-16.971 0L96 304v48z\"})),insertMD:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 384 512\",fill:\"var(--icon-fill-color)\",stroke:\"none\"},React__namespace.createElement(\"path\",{d:\"M288 248v28c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-28c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm-12 72H108c-6.6 0-12 5.4-12 12v28c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-28c0-6.6-5.4-12-12-12zm108-188.1V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V48C0 21.5 21.5 0 48 0h204.1C264.8 0 277 5.1 286 14.1L369.9 98c9 8.9 14.1 21.2 14.1 33.9zm-128-80V128h76.1L256 51.9zM336 464V176H232c-13.3 0-24-10.7-24-24V48H48v416h288z\"})),insertLaTeX:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 576 512\",stroke:\"none\",fill:\"var(--icon-fill-color)\",strokeWidth:\"20\"},React__namespace.createElement(\"path\",{d:\"M571.31 251.31l-22.62-22.62c-6.25-6.25-16.38-6.25-22.63 0L480 274.75l-46.06-46.06c-6.25-6.25-16.38-6.25-22.63 0l-22.62 22.62c-6.25 6.25-6.25 16.38 0 22.63L434.75 320l-46.06 46.06c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.62c6.25 6.25 16.38 6.25 22.63 0L480 365.25l46.06 46.06c6.25 6.25 16.38 6.25 22.63 0l22.62-22.62c6.25-6.25 6.25-16.38 0-22.63L525.25 320l46.06-46.06c6.25-6.25 6.25-16.38 0-22.63zM552 0H307.65c-14.54 0-27.26 9.8-30.95 23.87l-84.79 322.8-58.41-106.1A32.008 32.008 0 0 0 105.47 224H24c-13.25 0-24 10.74-24 24v48c0 13.25 10.75 24 24 24h43.62l88.88 163.73C168.99 503.5 186.3 512 204.94 512c17.27 0 44.44-9 54.28-41.48L357.03 96H552c13.25 0 24-10.75 24-24V24c0-13.26-10.75-24-24-24z\"})),insertLink:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 512 512\",stroke:\"none\",fill:\"var(--icon-fill-color)\",strokeWidth:\"20\"},React__namespace.createElement(\"path\",{d:\"M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z\"})),search:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 512 512\",stroke:\"var(--icon-fill-color)\",fill:\"var(--icon-fill-color)\",strokeWidth:\"20\"},React__namespace.createElement(\"path\",{d:\"M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z\"})),ocr:React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},React__namespace.createElement(\"path\",{d:\"m6 18 6-12 6 12\"}),React__namespace.createElement(\"path\",{d:\"M8 14h8\"}),React__namespace.createElement(\"path\",{d:\"M3 7V5a2 2 0 0 1 2-2h2\"}),React__namespace.createElement(\"path\",{d:\"M17 3h2a2 2 0 0 1 2 2v2\"}),React__namespace.createElement(\"path\",{d:\"M21 17v2a2 2 0 0 1-2 2h-2\"}),React__namespace.createElement(\"path\",{d:\"M7 21H5a2 2 0 0 1-2-2v-2\"})),scriptEngine:React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 100 100\",stroke:\"var(--icon-fill-color)\",fill:\"var(--icon-fill-color)\",strokeLinecap:\"round\",strokeWidth:\"4\"},React__namespace.createElement(\"g\",{transform:\"translate(-8,-8)\"},React__namespace.createElement(\"path\",{d:\"M24.318 37.983c-1.234-1.232-8.433-3.903-7.401-7.387 1.057-3.484 9.893-12.443 13.669-13.517 3.776-1.074 6.142 6.523 9.012 7.073 2.87.55 6.797-1.572 8.207-3.694 1.384-2.148-3.147-7.413.15-9.168 3.298-1.755 16.389-2.646 19.611-1.284 3.247 1.363-1.611 7.335-.151 9.483 1.46 2.148 6.067 3.746 8.836 3.38 2.769-.368 4.154-6.733 7.728-5.633 3.575 1.1 12.36 8.828 13.67 12.233 1.308 3.406-5.186 5.423-5.79 8.2-.58 2.75-.026 6.705 2.265 8.355 2.266 1.65 9.642-1.78 11.404 1.598 1.762 3.38 1.007 15.35-.806 18.651-1.787 3.353-7.753-.367-9.969 1.31-2.215 1.65-3.901 5.92-3.373 8.67.504 2.777 7.754 4.48 6.445 7.885C96.49 87.543 87.15 95.454 83.5 96.685c-3.65 1.231-4.96-4.741-7.577-5.16-2.593-.393-6.57.707-8.03 2.75-1.436 2.017 2.668 7.806-.63 9.483-3.323 1.676-15.759 2.226-19.157.655-3.373-1.598.554-7.964-1.108-10.138-1.687-2.174-6.394-3.431-9.012-2.907-2.643.55-3.273 7.282-6.747 6.103-3.499-1.126-12.788-9.535-14.172-13.019-1.36-3.484 5.437-5.108 5.966-7.858.529-2.777-.68-7.073-2.744-8.697-2.064-1.624-7.93 2.41-9.642-1.126-1.737-3.537-2.441-16.765-.654-20.118 1.787-3.3 9.062 1.598 11.429.183 2.366-1.44 2.316-7.282 2.769-8.749m.126-.104c-1.234-1.232-8.433-3.903-7.401-7.387 1.057-3.484 9.893-12.443 13.669-13.517 3.776-1.074 6.142 6.523 9.012 7.073 2.87.55 6.797-1.572 8.207-3.694 1.384-2.148-3.147-7.413.15-9.168 3.298-1.755 16.389-2.646 19.611-1.284 3.247 1.363-1.611 7.335-.151 9.483 1.46 2.148 6.067 3.746 8.836 3.38 2.769-.368 4.154-6.733 7.728-5.633 3.575 1.1 12.36 8.828 13.67 12.233 1.308 3.406-5.186 5.423-5.79 8.2-.58 2.75-.026 6.705 2.265 8.355 2.266 1.65 9.642-1.78 11.404 1.598 1.762 3.38 1.007 15.35-.806 18.651-1.787 3.353-7.753-.367-9.969 1.31-2.215 1.65-3.901 5.92-3.373 8.67.504 2.777 7.754 4.48 6.445 7.885C96.49 87.543 87.15 95.454 83.5 96.685c-3.65 1.231-4.96-4.741-7.577-5.16-2.593-.393-6.57.707-8.03 2.75-1.436 2.017 2.668 7.806-.63 9.483-3.323 1.676-15.759 2.226-19.157.655-3.373-1.598.554-7.964-1.108-10.138-1.687-2.174-6.394-3.431-9.012-2.907-2.643.55-3.273 7.282-6.747 6.103-3.499-1.126-12.788-9.535-14.172-13.019-1.36-3.484 5.437-5.108 5.966-7.858.529-2.777-.68-7.073-2.744-8.697-2.064-1.624-7.93 2.41-9.642-1.126-1.737-3.537-2.441-16.765-.654-20.118 1.787-3.3 9.062 1.598 11.429.183 2.366-1.44 2.316-7.282 2.769-8.749\",fill:\"none\",strokeWidth:\"2\"}),React__namespace.createElement(\"path\",{d:\"M81.235 56.502a23.3 23.3 0 0 1-1.46 8.068 20.785 20.785 0 0 1-1.762 3.72 24.068 24.068 0 0 1-5.337 6.26 22.575 22.575 0 0 1-3.449 2.358 23.726 23.726 0 0 1-7.803 2.803 24.719 24.719 0 0 1-8.333 0 24.102 24.102 0 0 1-4.028-1.074 23.71 23.71 0 0 1-3.776-1.729 23.259 23.259 0 0 1-6.369-5.265 23.775 23.775 0 0 1-2.416-3.353 24.935 24.935 0 0 1-1.762-3.72 23.765 23.765 0 0 1-1.083-3.981 23.454 23.454 0 0 1 0-8.173c.252-1.336.604-2.698 1.083-3.956a24.935 24.935 0 0 1 1.762-3.72 22.587 22.587 0 0 1 2.416-3.378c.881-1.048 1.888-2.017 2.946-2.908a24.38 24.38 0 0 1 3.423-2.357 23.71 23.71 0 0 1 3.776-1.73 21.74 21.74 0 0 1 4.028-1.047 23.437 23.437 0 0 1 8.333 0 24.282 24.282 0 0 1 7.803 2.777 26.198 26.198 0 0 1 3.45 2.357 24.62 24.62 0 0 1 5.336 6.287 20.785 20.785 0 0 1 1.762 3.72 21.32 21.32 0 0 1 1.083 3.955c.251 1.336.302 3.405.377 4.086.05.681.05-.68 0 0\",fill:\"none\"}),React__namespace.createElement(\"path\",{d:\"M69.404 56.633c-6.596-3.3-13.216-6.6-19.51-9.744m19.51 9.744c-6.747-3.379-13.493-6.758-19.51-9.744m0 0v19.489m0-19.49v19.49m0 0c4.355-2.148 8.71-4.322 19.51-9.745m-19.51 9.745c3.978-1.965 7.93-3.956 19.51-9.745m0 0h0m0 0h0\"}))),openLink:React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},React__namespace.createElement(\"path\",{d:\"M4 22h14a2 2 0 0 0 2-2V7.5L14.5 2H6a2 2 0 0 0-2 2v7\"}),React__namespace.createElement(\"polyline\",{points:\"14 2 14 8 20 8\"}),React__namespace.createElement(\"path\",{d:\"m10 18 3-3-3-3\"}),React__namespace.createElement(\"path\",{d:\"M4 18v-1a2 2 0 0 1 2-2h6\"})),openLinkProperties:React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"3\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},React__namespace.createElement(\"path\",{d:\"M10 12.5 8 15l2 2.5\"}),React__namespace.createElement(\"path\",{d:\"m14 12.5 2 2.5-2 2.5\"}),React__namespace.createElement(\"path\",{d:\"M14 2v4a2 2 0 0 0 2 2h4\"}),React__namespace.createElement(\"path\",{d:\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z\"})),switchToMarkdown:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 640 512\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"10\",fill:\"var(--icon-fill-color)\"},React__namespace.createElement(\"path\",{d:\"M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z\"})),gotoFullScreen:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 448 512\",stroke:\"var(--icon-fill-color)\",fill:\"var(--icon-fill-color)\",strokeWidth:\"20\"},React__namespace.createElement(\"path\",{d:\"M128 32H32C14.31 32 0 46.31 0 64v96c0 17.69 14.31 32 32 32s32-14.31 32-32V96h64c17.69 0 32-14.31 32-32S145.7 32 128 32zM416 32h-96c-17.69 0-32 14.31-32 32s14.31 32 32 32h64v64c0 17.69 14.31 32 32 32s32-14.31 32-32V64C448 46.31 433.7 32 416 32zM128 416H64v-64c0-17.69-14.31-32-32-32s-32 14.31-32 32v96c0 17.69 14.31 32 32 32h96c17.69 0 32-14.31 32-32S145.7 416 128 416zM416 320c-17.69 0-32 14.31-32 32v64h-64c-17.69 0-32 14.31-32 32s14.31 32 32 32h96c17.69 0 32-14.31 32-32v-96C448 334.3 433.7 320 416 320z\"})),exitFullScreen:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 448 512\",stroke:\"var(--icon-fill-color)\",fill:\"var(--icon-fill-color)\",strokeWidth:\"20\"},React__namespace.createElement(\"path\",{d:\"M128 320H32c-17.69 0-32 14.31-32 32s14.31 32 32 32h64v64c0 17.69 14.31 32 32 32s32-14.31 32-32v-96C160 334.3 145.7 320 128 320zM416 320h-96c-17.69 0-32 14.31-32 32v96c0 17.69 14.31 32 32 32s32-14.31 32-32v-64h64c17.69 0 32-14.31 32-32S433.7 320 416 320zM320 192h96c17.69 0 32-14.31 32-32s-14.31-32-32-32h-64V64c0-17.69-14.31-32-32-32s-32 14.31-32 32v96C288 177.7 302.3 192 320 192zM128 32C110.3 32 96 46.31 96 64v64H32C14.31 128 0 142.3 0 160s14.31 32 32 32h96c17.69 0 32-14.31 32-32V64C160 46.31 145.7 32 128 32z\"})),releaseNotes:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 512 512\",stroke:\"var(--icon-fill-color)\",fill:\"var(--icon-fill-color)\",strokeWidth:\"20\"},React__namespace.createElement(\"path\",{d:\"M0 219.2v212.5c0 14.25 11.62 26.25 26.5 27C75.32 461.2 180.2 471.3 240 511.9V245.2C181.4 205.5 79.99 194.8 29.84 192C13.59 191.1 0 203.6 0 219.2zM482.2 192c-50.09 2.848-151.3 13.47-209.1 53.09C272.1 245.2 272 245.3 272 245.5v266.5c60.04-40.39 164.7-50.76 213.5-53.28C500.4 457.9 512 445.9 512 431.7V219.2C512 203.6 498.4 191.1 482.2 192zM352 96c0-53-43-96-96-96S160 43 160 96s43 96 96 96S352 149 352 96z\"})),rawMode:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 100 60\"},React__namespace.createElement(\"path\",{stroke:\"var(--icon-fill-color)\",strokeWidth:\"4\",d:\"M20 10H10m10 0H10m0 0v40m0-40v40m0 0h10m-10 0h10M40 10H30m10 0H30m0 0v40m0-40v40m0 0h10m-10 0h10M60 10h10m-10 0h10m0 0v40m0-40v40m0 0H60m10 0H60M80 10h10m-10 0h10m0 0v40m0-40v40m0 0H80m10 0H80\"})),parsedMode:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 576 512\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"20\"},React__namespace.createElement(\"path\",{d:\"M574.1 280.4l-45.38-181.8c-5.875-23.63-21.62-44-43-55.75c-21.5-11.75-46.1-14.13-70.25-6.375l-15.25 5.125c-8.375 2.75-12.87 11.88-10 20.25l5 15.13c2.75 8.375 11.88 12.88 20.25 10.13l13.12-4.375c10.88-3.625 23-3.625 33.25 1.75c10.25 5.375 17.5 14.5 20.38 25.75l38.38 153.9c-22.12-6.875-49.75-12.5-81.13-12.5c-34.88 0-73.1 7-114.9 26.75H251.4C210.5 258.6 171.4 251.6 136.5 251.6c-31.38 0-59 5.625-81.12 12.5l38.38-153.9c2.875-11.25 10.12-20.38 20.5-25.75C124.4 79.12 136.5 79.12 147.4 82.74l13.12 4.375c8.375 2.75 17.5-1.75 20.25-10.13l5-15.13C188.6 53.49 184.1 44.37 175.6 41.62l-15.25-5.125c-23.13-7.75-48.75-5.375-70.13 6.375c-21.37 11.75-37.12 32.13-43 55.75L1.875 280.4C.6251 285.4 .0001 290.6 .0001 295.9v70.25C.0001 428.1 51.63 480 115.3 480h37.13c60.25 0 110.4-46 114.9-105.4l2.875-38.63h35.75l2.875 38.63C313.3 433.1 363.4 480 423.6 480h37.13c63.62 0 115.2-51 115.2-113.9V295.9C576 290.6 575.4 285.5 574.1 280.4zM203.4 369.7c-2 26-24.38 46.25-51 46.25H115.2C87 415.1 64 393.6 64 366.1v-37.5c18.12-6.5 43.38-13 72.62-13c23.88 0 47.25 4.375 69.88 13L203.4 369.7zM512 366.1c0 27.5-23 49.88-51.25 49.88h-37.13c-26.62 0-49-20.25-51-46.25l-3.125-41.13c22.62-8.625 46.13-13 70-13c29 0 54.38 6.5 72.5 13V366.1z\"})),convertFile:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",viewBox:\"0 110 700 340\",xmlns:\"http://www.w3.org/2000/svg\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"20\"},React__namespace.createElement(\"path\",{d:\"m593.95 239.4v-1.5742c-0.85547-1.8828-2.043-3.6016-3.5-5.0742l-52.5-52.5c-1.4688-1.457-3.1875-2.6445-5.0742-3.5h-1.5742c-1.4727-0.49219-3.0039-0.78516-4.5508-0.875h-124.25c-4.6406 0-9.0938 1.8438-12.375 5.125s-5.125 7.7344-5.125 12.375v87.5h-70v-105.88-1.0508c-0.089844-1.5469-0.38281-3.0781-0.875-4.5508v-1.5742c-0.85547-1.8828-2.043-3.6016-3.5-5.0742l-52.5-52.5c-1.4727-1.457-3.1914-2.6445-5.0742-3.5h-1.5742c-1.7031-0.875-3.5352-1.4688-5.4258-1.75h-123.55c-4.6406 0-9.0938 1.8438-12.375 5.125s-5.125 7.7344-5.125 12.375v245c0 4.6406 1.8438 9.0938 5.125 12.375s7.7344 5.125 12.375 5.125h175c4.6406 0 9.0938-1.8438 12.375-5.125s5.125-7.7344 5.125-12.375v-52.5h70v122.5c0 4.6406 1.8438 9.0938 5.125 12.375s7.7344 5.125 12.375 5.125h175c4.6406 0 9.0938-1.8438 12.375-5.125s5.125-7.7344 5.125-12.375v-192.5-1.0508c-0.14453-1.5547-0.5-3.0859-1.0508-4.5508zm-313.95 110.6h-140v-210h87.5v35c0 4.6406 1.8438 9.0938 5.125 12.375s7.7344 5.125 12.375 5.125h35v87.5h-52.5c-6.2539 0-12.031 3.3359-15.156 8.75s-3.125 12.086 0 17.5 8.9023 8.75 15.156 8.75h52.5zm140 70v-105h27.824l-5.0742 5.0742c-3.7031 3.1719-5.9141 7.7461-6.1055 12.617-0.1875 4.8711 1.668 9.6016 5.1133 13.051 3.4492 3.4453 8.1797 5.3008 13.051 5.1133 4.8711-0.19141 9.4453-2.4023 12.617-6.1055l35-35c3.2578-3.2773 5.0898-7.7148 5.0898-12.336 0-4.625-1.832-9.0586-5.0898-12.34l-35-35c-4.5078-3.8555-10.66-5.1719-16.348-3.4883-5.6875 1.6797-10.137 6.1289-11.816 11.816-1.6836 5.6914-0.37109 11.844 3.4883 16.348l5.0742 5.0742h-27.824v-69.824h87.5v35c0 4.6406 1.8438 9.0938 5.125 12.375s7.7344 5.125 12.375 5.125h35v157.5z\"})),cog:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 512 512\",fill:\"var(--icon-fill-color)\",stroke:\"none\"},React__namespace.createElement(\"path\",{d:\"M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z\"})),trayMode:React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 640 512\",stroke:\"var(--icon-fill-color)\",fill:\"var(--icon-fill-color)\",strokeWidth:\"20\"},React__namespace.createElement(\"path\",{d:\"M618.1 97.67c-13.02-4.375-27.45 .1562-35.72 11.16L464 266.7l-118.4-157.8c-8.266-11.03-22.64-15.56-35.72-11.16C296.8 102 288 114.2 288 128v256c0 17.69 14.33 32 32 32s32-14.31 32-32v-160l86.41 115.2c12.06 16.12 39.13 16.12 51.19 0L576 224v160c0 17.69 14.33 32 32 32s32-14.31 32-32v-256C640 114.2 631.2 102 618.1 97.67zM224 96.01H32c-17.67 0-32 14.31-32 32s14.33 32 32 32h64v223.1c0 17.69 14.33 31.99 32 31.99s32-14.3 32-31.99V160h64c17.67 0 32-14.31 32-32S241.7 96.01 224 96.01z\"})),copyElementLink:React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 260 260\",\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\"},React__namespace.createElement(\"path\",{stroke:\"var(--icon-fill-color)\",fill:\"none\",strokeLinecap:\"round\",strokeWidth:\"8\",d:\"M10 10h40m-40 0h40m0 0v40m0-40v40m0 0H10m40 0H10m0 0V10m0 40V10M210 10h40m-40 0h40m0 0v40m0-40v40m0 0h-40m40 0h-40m0 0V10m0 40V10M210 210h40m-40 0h40m0 0v40m0-40v40m0 0h-40m40 0h-40m0 0v-40m0 40v-40M10 210h40m-40 0h40m0 0v40m0-40v40m0 0H10m40 0H10m0 0v-40m0 40v-40M30 210V50m0 160V50M50 30h160M50 30h160M230 50v160m0-160v160M50 230h160m-160 0h160\"}),React__namespace.createElement(\"path\",{stroke:\"var(--icon-fill-color)\",fill:\"none\",strokeLinecap:\"round\",strokeWidth:\"16\",d:\"M110 90c-6.67 1.67-30 3.11-40 10-10 6.89-20 21.37-20 31.37S60 153.56 70 160c10 6.44 33.33 8.33 40 10m0-80c-6.67 1.67-30 3.11-40 10-10 6.89-20 21.37-20 31.37S60 153.56 70 160c10 6.44 33.33 8.33 40 10M150 90c6.67 1.67 30 3.11 40 10 10 6.89 20 21.37 20 31.37s-10 22.19-20 28.63c-10 6.44-33.33 8.33-40 10m0-80c6.67 1.67 30 3.11 40 10 10 6.89 20 21.37 20 31.37s-10 22.19-20 28.63c-10 6.44-33.33 8.33-40 10\"}),React__namespace.createElement(\"path\",{stroke:\"var(--icon-fill-color)\",fill:\"none\",strokeLinecap:\"round\",strokeWidth:\"16\",d:\"M89.868 130.198c13.36-.03 66.78-.17 80.13-.2m-80.13.2c13.36-.03 66.78-.17 80.13-.2\"})),importSVG:React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 526 526\"},React__namespace.createElement(\"g\",{fillRule:\"evenodd\",strokeLinecap:\"round\"},React__namespace.createElement(\"path\",{fill:\"var(--input-bg-color)\",strokeWidth:\"0\",d:\"m133.462 71 .33-6.54.97-6.34 1.58-6.13 2.16-5.88 2.69-5.6 3.21-5.27 3.69-4.93 4.13-4.55 4.55-4.13 4.93-3.69 5.27-3.21 5.6-2.69 5.88-2.16 6.13-1.58 6.34-.97 6.54-.33h160v128l.16 3.28.49 3.18.79 3.07 1.07 2.94 1.35 2.8 1.6 2.63 1.84 2.47 2.06 2.27 2.27 2.06 2.47 1.84 2.63 1.6 2.8 1.35 2.94 1.07 3.07.79 3.18.49 3.28.16h128v288l-.33 6.54-.97 6.34-1.58 6.13-2.16 5.88-2.69 5.6-3.21 5.27-3.69 4.93-4.13 4.55-4.55 4.13-4.93 3.69-5.27 3.21-5.6 2.69-5.88 2.16-6.13 1.58-6.34.97-6.54.33h-256l-6.54-.33-6.34-.97-6.13-1.58-5.88-2.16-5.6-2.69-5.27-3.21-4.93-3.69-4.55-4.13-4.13-4.55-3.69-4.93-3.21-5.27-2.69-5.6-2.16-5.88-1.58-6.13-.97-6.34-.33-6.54V343h174.1l-39 39-1.65 1.83-1.43 1.94-1.22 2.05-.99 2.13-.77 2.2-.55 2.25-.33 2.29-.11 2.3.11 2.3.33 2.28.55 2.24.77 2.19.99 2.12 1.22 2.04 1.43 1.93 1.65 1.81 1.83 1.64 1.94 1.42 2.05 1.2 2.13.99 2.2.76 2.25.56 2.29.33 2.3.11 2.3-.1 2.28-.33 2.24-.54 2.19-.77 2.12-.98 2.04-1.21 1.93-1.43 1.81-1.65 80-80 1.65-1.83 1.43-1.94 1.22-2.05.99-2.13.77-2.2.55-2.25.33-2.29.11-2.3-.11-2.3-.33-2.28-.55-2.24-.77-2.19-.99-2.12-1.22-2.04-1.43-1.93-1.65-1.81-80-80-1.83-1.65-1.94-1.43-2.05-1.22-2.13-.99-2.2-.77-2.25-.55-2.29-.33-2.3-.11-2.3.11-2.28.33-2.24.55-2.19.77-2.12.99-2.04 1.22-1.93 1.43-1.81 1.65-1.64 1.83-1.42 1.94-1.2 2.05-.99 2.13-.76 2.2-.56 2.25-.33 2.29-.11 2.3.1 2.3.33 2.28.54 2.24.77 2.19.98 2.12 1.21 2.04 1.43 1.93 1.65 1.81 39 39h-174.1V71\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"18\",d:\"M133.462 71s0 0 0 0m0 0s0 0 0 0m0 0 .33-6.54m-.33 6.54c.13-2.57.26-5.13.33-6.54m0 0c.36-2.33.72-4.67.97-6.34m-.97 6.34c.35-2.26.69-4.53.97-6.34m0 0c.51-1.99 1.03-3.98 1.58-6.13m-1.58 6.13c.4-1.56.81-3.12 1.58-6.13m0 0c.81-2.22 1.62-4.43 2.16-5.88m-2.16 5.88c.45-1.22.9-2.44 2.16-5.88m0 0c.72-1.51 1.45-3.01 2.69-5.6m-2.69 5.6c.69-1.45 1.39-2.9 2.69-5.6m0 0c.93-1.52 1.86-3.05 3.21-5.27m-3.21 5.27c.97-1.59 1.94-3.18 3.21-5.27m0 0c.86-1.15 1.71-2.29 3.69-4.93m-3.69 4.93c.78-1.04 1.56-2.08 3.69-4.93m0 0c1.53-1.69 3.07-3.38 4.13-4.55m-4.13 4.55c1.54-1.69 3.07-3.38 4.13-4.55m0 0c1.03-.93 2.06-1.87 4.55-4.13m-4.55 4.13c.98-.89 1.97-1.78 4.55-4.13m0 0c1.64-1.23 3.28-2.46 4.93-3.69m-4.93 3.69c1.72-1.29 3.45-2.58 4.93-3.69m0 0c1.11-.68 2.23-1.35 5.27-3.21m-5.27 3.21c1.5-.91 3.01-1.83 5.27-3.21m0 0c1.87-.89 3.73-1.79 5.6-2.69m-5.6 2.69c2.09-1 4.17-2.01 5.6-2.69m0 0c1.72-.64 3.44-1.27 5.88-2.16m-5.88 2.16c1.94-.72 3.89-1.43 5.88-2.16m0 0c2.3-.59 4.6-1.19 6.13-1.58m-6.13 1.58c2.32-.6 4.65-1.2 6.13-1.58m0 0c2.06-.31 4.12-.63 6.34-.97m-6.34.97c2.34-.36 4.69-.72 6.34-.97m0 0c2.05-.1 4.09-.21 6.54-.33m-6.54.33c2.06-.1 4.12-.21 6.54-.33m0 0h160m-160 0h160m0 0v128m0-128v128m0 0s0 0 0 0m0 0s0 0 0 0m0 0 .16 3.28m-.16-3.28c.06 1.16.12 2.32.16 3.28m0 0c.13.82.26 1.64.49 3.18m-.49-3.18c.18 1.13.35 2.26.49 3.18m0 0c.24.95.49 1.91.79 3.07m-.79-3.07c.28 1.1.56 2.2.79 3.07m0 0c.39 1.06.78 2.13 1.07 2.94m-1.07-2.94c.42 1.15.84 2.3 1.07 2.94m0 0c.38.79.76 1.57 1.35 2.8m-1.35-2.8c.4.82.79 1.64 1.35 2.8m0 0c.45.75.91 1.5 1.6 2.63m-1.6-2.63c.4.65.8 1.31 1.6 2.63m0 0c.56.76 1.13 1.52 1.84 2.47m-1.84-2.47c.58.79 1.17 1.57 1.84 2.47m0 0c.75.82 1.5 1.65 2.06 2.27m-2.06-2.27c.75.82 1.5 1.65 2.06 2.27m0 0c.74.66 1.47 1.33 2.27 2.06m-2.27-2.06c.89.81 1.78 1.61 2.27 2.06m0 0c.69.51 1.37 1.02 2.47 1.84m-2.47-1.84c.68.5 1.35 1.01 2.47 1.84m0 0c.81.49 1.62.99 2.63 1.6m-2.63-1.6c.74.45 1.47.9 2.63 1.6m0 0c.72.35 1.43.69 2.8 1.35m-2.8-1.35c.61.3 1.22.59 2.8 1.35m0 0c.85.31 1.69.62 2.94 1.07m-2.94-1.07c1.03.38 2.07.75 2.94 1.07m0 0c.83.22 1.67.43 3.07.79m-3.07-.79 3.07.79m0 0c1.07.16 2.14.33 3.18.49m-3.18-.49c1.2.18 2.39.36 3.18.49m0 0 3.28.16m-3.28-.16c.97.04 1.93.09 3.28.16m0 0h128m-128 0h128m0 0v288m0-288v288m0 0s0 0 0 0m0 0s0 0 0 0m0 0c-.1 2.02-.2 4.04-.33 6.54m.33-6.54c-.13 2.52-.26 5.05-.33 6.54m0 0c-.33 2.14-.66 4.29-.97 6.34m.97-6.34c-.32 2.06-.63 4.12-.97 6.34m0 0c-.59 2.28-1.17 4.55-1.58 6.13m1.58-6.13c-.53 2.07-1.07 4.14-1.58 6.13m0 0c-.73 1.99-1.46 3.97-2.16 5.88m2.16-5.88c-.72 1.97-1.44 3.94-2.16 5.88m0 0c-.94 1.97-1.89 3.93-2.69 5.6m2.69-5.6c-.91 1.89-1.82 3.77-2.69 5.6m0 0c-.89 1.46-1.78 2.92-3.21 5.27m3.21-5.27c-.65 1.05-1.29 2.11-3.21 5.27m0 0c-1.13 1.51-2.25 3.01-3.69 4.93m3.69-4.93c-1.29 1.72-2.58 3.44-3.69 4.93m0 0c-1.29 1.42-2.58 2.84-4.13 4.55m4.13-4.55-4.13 4.55m0 0-4.55 4.13m4.55-4.13-4.55 4.13m0 0c-1.2.9-2.41 1.8-4.93 3.69m4.93-3.69-4.93 3.69m0 0c-1.56.95-3.13 1.9-5.27 3.21m5.27-3.21c-1.99 1.21-3.98 2.42-5.27 3.21m0 0c-1.8.86-3.6 1.73-5.6 2.69m5.6-2.69c-1.34.64-2.67 1.28-5.6 2.69m0 0c-2.24.82-4.48 1.65-5.88 2.16m5.88-2.16c-1.38.51-2.77 1.02-5.88 2.16m0 0c-1.46.38-2.93.76-6.13 1.58m6.13-1.58c-1.54.4-3.09.79-6.13 1.58m0 0c-2.12.32-4.24.65-6.34.97m6.34-.97c-2.47.38-4.94.75-6.34.97m0 0c-2.23.11-4.46.22-6.54.33m6.54-.33c-1.97.1-3.93.2-6.54.33m0 0h-256m256 0h-256m0 0s0 0 0 0m0 0s0 0 0 0m0 0c-2.33-.12-4.66-.24-6.54-.33m6.54.33c-1.33-.07-2.65-.13-6.54-.33m0 0c-1.88-.29-3.77-.58-6.34-.97m6.34.97c-2.07-.32-4.14-.63-6.34-.97m0 0c-1.52-.39-3.04-.79-6.13-1.58m6.13 1.58c-2.02-.52-4.04-1.04-6.13-1.58m0 0c-1.6-.59-3.19-1.17-5.88-2.16m5.88 2.16c-1.9-.7-3.8-1.39-5.88-2.16m0 0c-1.41-.68-2.82-1.36-5.6-2.69m5.6 2.69c-1.6-.77-3.2-1.54-5.6-2.69m0 0c-1.4-.86-2.81-1.71-5.27-3.21m5.27 3.21c-2.08-1.27-4.17-2.54-5.27-3.21m0 0c-1.72-1.29-3.43-2.57-4.93-3.69m4.93 3.69c-1.79-1.34-3.57-2.67-4.93-3.69m0 0c-1.18-1.07-2.36-2.15-4.55-4.13m4.55 4.13c-1.64-1.49-3.27-2.97-4.55-4.13m0 0c-1.07-1.19-2.15-2.37-4.13-4.55m4.13 4.55c-1.46-1.61-2.93-3.23-4.13-4.55m0 0-3.69-4.93m3.69 4.93c-.88-1.17-1.76-2.35-3.69-4.93m0 0c-.83-1.37-1.67-2.75-3.21-5.27m3.21 5.27c-1.15-1.89-2.3-3.79-3.21-5.27m0 0c-1.03-2.14-2.05-4.27-2.69-5.6m2.69 5.6c-.68-1.43-1.37-2.85-2.69-5.6m0 0c-.8-2.17-1.59-4.34-2.16-5.88m2.16 5.88c-.82-2.22-1.63-4.44-2.16-5.88m0 0c-.47-1.82-.94-3.64-1.58-6.13m1.58 6.13c-.37-1.44-.74-2.88-1.58-6.13m0 0-.97-6.34m.97 6.34c-.3-1.98-.61-3.97-.97-6.34m0 0c-.13-2.54-.26-5.07-.33-6.54m.33 6.54-.33-6.54m0 0V343m0 112V343m0 0h174.1m-174.1 0h174.1m0 0-39 39m39-39-39 39m0 0s0 0 0 0m0 0s0 0 0 0m0 0c-.65.72-1.3 1.44-1.65 1.83m1.65-1.83c-.34.38-.68.76-1.65 1.83m0 0c-.35.47-.7.95-1.43 1.94m1.43-1.94c-.38.5-.75 1.01-1.43 1.94m0 0c-.32.54-.64 1.08-1.22 2.05m1.22-2.05c-.38.64-.76 1.28-1.22 2.05m0 0c-.2.45-.41.89-.99 2.13m.99-2.13c-.38.82-.76 1.64-.99 2.13m0 0c-.18.53-.36 1.05-.77 2.2m.77-2.2c-.3.88-.61 1.75-.77 2.2m0 0c-.15.61-.3 1.22-.55 2.25m.55-2.25c-.16.68-.33 1.35-.55 2.25m0 0-.33 2.29m.33-2.29c-.13.9-.26 1.79-.33 2.29m0 0-.11 2.3m.11-2.3c-.03.59-.06 1.19-.11 2.3m0 0c.03.54.05 1.08.11 2.3m-.11-2.3c.03.72.07 1.44.11 2.3m0 0c.1.71.21 1.43.33 2.28m-.33-2.28c.1.71.21 1.42.33 2.28m0 0c.22.88.44 1.77.55 2.24m-.55-2.24c.16.66.33 1.32.55 2.24m0 0c.26.72.51 1.45.77 2.19m-.77-2.19c.25.69.49 1.39.77 2.19m0 0c.33.7.65 1.4.99 2.12m-.99-2.12c.37.79.74 1.57.99 2.12m0 0c.38.63.75 1.25 1.22 2.04m-1.22-2.04c.4.67.8 1.35 1.22 2.04m0 0c.38.52.77 1.05 1.43 1.93m-1.43-1.93c.38.52.77 1.05 1.43 1.93m0 0c.46.5.91 1 1.65 1.81m-1.65-1.81c.35.39.7.77 1.65 1.81m0 0c.37.33.75.67 1.83 1.64m-1.83-1.64c.43.39.87.78 1.83 1.64m0 0c.62.45 1.25.91 1.94 1.42m-1.94-1.42c.45.32.9.65 1.94 1.42m0 0c.53.3 1.05.61 2.05 1.2m-2.05-1.2c.43.25.86.5 2.05 1.2m0 0c.78.36 1.56.72 2.13.99m-2.13-.99c.54.25 1.08.5 2.13.99m0 0c.67.23 1.33.46 2.2.76m-2.2-.76c.51.17 1.03.35 2.2.76m0 0c.87.22 1.73.43 2.25.56m-2.25-.56c.79.2 1.57.39 2.25.56m0 0 2.29.33m-2.29-.33c.58.08 1.16.16 2.29.33m0 0c.91.04 1.82.09 2.3.11m-2.3-.11c.89.04 1.79.09 2.3.11m0 0c.48-.02.96-.04 2.3-.1m-2.3.1c.73-.03 1.47-.06 2.3-.1m0 0c.61-.09 1.22-.18 2.28-.33m-2.28.33c.58-.09 1.17-.17 2.28-.33m0 0c.79-.19 1.59-.38 2.24-.54m-2.24.54c.88-.21 1.75-.42 2.24-.54m0 0c.7-.25 1.4-.49 2.19-.77m-2.19.77c.5-.18 1.01-.35 2.19-.77m0 0c.56-.26 1.13-.52 2.12-.98m-2.12.98c.69-.31 1.37-.63 2.12-.98m0 0c.63-.37 1.25-.74 2.04-1.21m-2.04 1.21c.8-.48 1.6-.95 2.04-1.21m0 0c.67-.5 1.34-.99 1.93-1.43m-1.93 1.43c.52-.39 1.05-.78 1.93-1.43m0 0c.43-.39.87-.79 1.81-1.65m-1.81 1.65c.42-.38.83-.76 1.81-1.65m0 0 80-80m-80 80 80-80m0 0s0 0 0 0m0 0s0 0 0 0m0 0c.33-.37.67-.74 1.65-1.83m-1.65 1.83c.63-.7 1.27-1.4 1.65-1.83m0 0c.3-.4.59-.79 1.43-1.94m-1.43 1.94c.42-.57.84-1.13 1.43-1.94m0 0c.4-.68.8-1.35 1.22-2.05m-1.22 2.05c.47-.79.93-1.57 1.22-2.05m0 0c.28-.62.57-1.23.99-2.13m-.99 2.13c.3-.65.6-1.31.99-2.13m0 0c.26-.74.51-1.47.77-2.2m-.77 2.2.77-2.2m0 0 .55-2.25m-.55 2.25c.2-.84.41-1.68.55-2.25m0 0 .33-2.29m-.33 2.29c.11-.75.21-1.49.33-2.29m0 0c.03-.54.05-1.08.11-2.3m-.11 2.3c.04-.91.09-1.81.11-2.3m0 0c-.03-.7-.07-1.41-.11-2.3m.11 2.3c-.04-.75-.07-1.49-.11-2.3m0 0c-.08-.52-.15-1.04-.33-2.28m.33 2.28c-.09-.63-.18-1.26-.33-2.28m0 0-.55-2.24m.55 2.24c-.19-.79-.39-1.58-.55-2.24m0 0-.77-2.19m.77 2.19c-.25-.72-.51-1.44-.77-2.19m0 0c-.23-.5-.46-.99-.99-2.12m.99 2.12c-.39-.83-.78-1.66-.99-2.12m0 0c-.42-.7-.83-1.39-1.22-2.04m1.22 2.04c-.32-.53-.64-1.06-1.22-2.04m0 0c-.47-.64-.95-1.28-1.43-1.93m1.43 1.93c-.47-.63-.94-1.27-1.43-1.93m0 0c-.44-.49-.89-.98-1.65-1.81m1.65 1.81c-.64-.7-1.28-1.4-1.65-1.81m0 0-80-80m80 80-80-80m0 0s0 0 0 0m0 0s0 0 0 0m0 0c-.72-.65-1.44-1.3-1.83-1.65m1.83 1.65c-.68-.62-1.37-1.23-1.83-1.65m0 0c-.51-.38-1.02-.75-1.94-1.43m1.94 1.43c-.58-.43-1.17-.87-1.94-1.43m0 0c-.73-.43-1.45-.86-2.05-1.22m2.05 1.22c-.77-.45-1.53-.9-2.05-1.22m0 0c-.46-.21-.93-.43-2.13-.99m2.13.99-2.13-.99m0 0c-.83-.29-1.65-.57-2.2-.77m2.2.77c-.56-.19-1.12-.39-2.2-.77m0 0c-.65-.16-1.29-.31-2.25-.55m2.25.55c-.57-.14-1.13-.27-2.25-.55m0 0c-.74-.11-1.48-.21-2.29-.33m2.29.33c-.51-.07-1.02-.15-2.29-.33m0 0c-.77-.04-1.54-.07-2.3-.11m2.3.11c-.88-.04-1.76-.08-2.3-.11m0 0c-.49.02-.98.05-2.3.11m2.3-.11c-.88.04-1.77.09-2.3.11m0 0c-.62.09-1.23.18-2.28.33m2.28-.33c-.6.09-1.2.17-2.28.33m0 0c-.45.11-.91.22-2.24.55m2.24-.55c-.79.2-1.58.39-2.24.55m0 0c-.56.2-1.12.4-2.19.77m2.19-.77c-.51.18-1.01.36-2.19.77m0 0c-.85.4-1.7.8-2.12.99m2.12-.99c-.51.24-1.02.48-2.12.99m0 0c-.6.36-1.2.71-2.04 1.22m2.04-1.22c-.46.27-.91.55-2.04 1.22m0 0c-.49.36-.99.73-1.93 1.43m1.93-1.43-1.93 1.43m0 0c-.42.38-.85.77-1.81 1.65m1.81-1.65c-.69.63-1.39 1.27-1.81 1.65m0 0-1.64 1.83m1.64-1.83c-.54.6-1.08 1.21-1.64 1.83m0 0c-.53.73-1.07 1.47-1.42 1.94m1.42-1.94c-.36.5-.73 1-1.42 1.94m0 0c-.35.61-.7 1.21-1.2 2.05m1.2-2.05c-.33.58-.67 1.15-1.2 2.05m0 0c-.26.57-.53 1.15-.99 2.13m.99-2.13c-.39.85-.78 1.69-.99 2.13m0 0c-.24.7-.48 1.4-.76 2.2m.76-2.2c-.17.51-.35 1.01-.76 2.2m0 0c-.17.68-.33 1.35-.56 2.25m.56-2.25c-.2.79-.39 1.57-.56 2.25m0 0c-.09.65-.18 1.29-.33 2.29m.33-2.29c-.06.48-.13.95-.33 2.29m0 0c-.03.71-.07 1.43-.11 2.3m.11-2.3-.11 2.3m0 0c.04.86.08 1.73.1 2.3m-.1-2.3c.03.8.07 1.6.1 2.3m0 0c.13.88.25 1.76.33 2.28m-.33-2.28c.11.73.21 1.47.33 2.28m0 0c.18.74.36 1.49.54 2.24m-.54-2.24c.15.64.31 1.28.54 2.24m0 0c.2.57.4 1.15.77 2.19m-.77-2.19c.21.58.41 1.17.77 2.19m0 0c.23.5.46 1.01.98 2.12m-.98-2.12c.35.76.71 1.53.98 2.12m0 0c.38.64.76 1.29 1.21 2.04m-1.21-2.04 1.21 2.04m0 0c.45.6.89 1.21 1.43 1.93m-1.43-1.93c.3.4.6.81 1.43 1.93m0 0 1.65 1.81m-1.65-1.81c.47.52.94 1.03 1.65 1.81m0 0 39 39m-39-39 39 39m0 0h-174.1m174.1 0h-174.1m0 0V71m0 223.9V71m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0\"})),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeLinecap:\"round\",strokeWidth:\"18\",d:\"M135 343.068H31m104 0H31m0 0s0 0 0 0m0 0s0 0 0 0m0 0c-.74-.04-1.48-.07-2.46-.12m2.46.12c-.77-.04-1.54-.08-2.46-.12m0 0c-.87-.14-1.75-.27-2.39-.37m2.39.37c-.55-.09-1.1-.17-2.39-.37m0 0c-.87-.22-1.74-.44-2.3-.59m2.3.59c-.62-.15-1.24-.31-2.3-.59m0 0c-.82-.29-1.64-.59-2.21-.8m2.21.8c-.52-.18-1.03-.37-2.21-.8m0 0c-.55-.26-1.09-.52-2.1-1.01m2.1 1.01c-.64-.31-1.28-.61-2.1-1.01m0 0c-.74-.45-1.48-.89-1.98-1.2m1.98 1.2c-.42-.25-.84-.51-1.98-1.2m0 0c-.7-.52-1.41-1.05-1.84-1.38m1.84 1.38c-.37-.28-.75-.56-1.84-1.38m0 0c-.4-.36-.8-.71-1.71-1.54m1.71 1.54c-.35-.31-.7-.63-1.71-1.54m0 0c-.43-.47-.85-.95-1.54-1.71m1.54 1.71c-.61-.68-1.23-1.36-1.54-1.71m0 0c-.29-.38-.58-.76-1.38-1.84m1.38 1.84c-.54-.71-1.08-1.43-1.38-1.84m0 0c-.46-.76-.92-1.52-1.2-1.98m1.2 1.98c-.45-.74-.89-1.47-1.2-1.98m0 0c-.37-.77-.74-1.53-1.01-2.1m1.01 2.1c-.3-.62-.6-1.25-1.01-2.1m0 0c-.2-.54-.39-1.07-.8-2.21m.8 2.21c-.2-.54-.4-1.09-.8-2.21m0 0c-.22-.85-.44-1.71-.59-2.3m.59 2.3c-.12-.46-.24-.92-.59-2.3m0 0c-.11-.72-.22-1.43-.37-2.39m.37 2.39c-.08-.48-.15-.96-.37-2.39m0 0c-.03-.74-.07-1.48-.12-2.46m.12 2.46c-.04-.79-.08-1.59-.12-2.46m0 0c.04-.74.07-1.49.12-2.46m-.12 2.46.12-2.46m0 0c.08-.53.16-1.07.37-2.39m-.37 2.39c.09-.56.17-1.12.37-2.39m0 0c.17-.69.35-1.38.59-2.3m-.59 2.3c.15-.61.31-1.23.59-2.3m0 0c.17-.48.34-.96.8-2.21m-.8 2.21c.2-.55.4-1.1.8-2.21m0 0c.25-.52.49-1.03 1.01-2.1m-1.01 2.1c.36-.76.73-1.52 1.01-2.1m0 0c.43-.72.87-1.44 1.2-1.98m-1.2 1.98c.27-.45.55-.91 1.2-1.98m0 0c.54-.73 1.09-1.47 1.38-1.84m-1.38 1.84c.4-.54.81-1.09 1.38-1.84m0 0c.53-.59 1.07-1.18 1.54-1.71m-1.54 1.71c.59-.66 1.19-1.32 1.54-1.71m0 0c.54-.49 1.08-.97 1.71-1.54m-1.71 1.54c.48-.43.95-.86 1.71-1.54m0 0c.46-.35.92-.7 1.84-1.38m-1.84 1.38c.5-.38 1.01-.76 1.84-1.38m0 0c.52-.32 1.04-.63 1.98-1.2m-1.98 1.2c.72-.44 1.44-.88 1.98-1.2m0 0 2.1-1.01m-2.1 1.01c.84-.4 1.67-.81 2.1-1.01m0 0c.45-.17.91-.33 2.21-.8m-2.21.8c.56-.21 1.12-.41 2.21-.8m0 0c.89-.23 1.79-.46 2.3-.59m-2.3.59c.48-.13.95-.25 2.3-.59m0 0c.51-.08 1.02-.16 2.39-.37m-2.39.37 2.39-.37m0 0c.52-.02 1.03-.05 2.46-.12m-2.46.12c.74-.03 1.48-.07 2.46-.12m0 0 103.34-.27m-103.34.27c30.04-.08 60.08-.16 103.34-.27\"}),React__namespace.createElement(\"g\",{fillRule:\"evenodd\",strokeLinecap:\"round\"},React__namespace.createElement(\"path\",{fill:\"var(--input-bg-color)\",strokeWidth:\"0\",d:\"M517.462 135h-128V7l128 128\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"18\",d:\"M517.462 135h-128m128 0h-128m0 0V7m0 128V7m0 0 128 128m-128-128 128 128m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0\"}))),obsidian:React__namespace.createElement(\"svg\",{focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 512 512\"},React__namespace.createElement(\"defs\",null,React__namespace.createElement(\"radialGradient\",{id:\"b\",cx:\"0\",cy:\"0\",r:\"1\",gradientUnits:\"userSpaceOnUse\",gradientTransform:\"matrix(-48 -185 123 -32 179 429.7)\"},React__namespace.createElement(\"stop\",{stopColor:\"#fff\",stopOpacity:\".4\"}),React__namespace.createElement(\"stop\",{offset:\"1\",stopOpacity:\".1\"})),React__namespace.createElement(\"radialGradient\",{id:\"c\",cx:\"0\",cy:\"0\",r:\"1\",gradientUnits:\"userSpaceOnUse\",gradientTransform:\"matrix(41 -310 229 30 341.6 351.3)\"},React__namespace.createElement(\"stop\",{stopColor:\"#fff\",stopOpacity:\".6\"}),React__namespace.createElement(\"stop\",{offset:\"1\",stopColor:\"#fff\",stopOpacity:\".1\"})),React__namespace.createElement(\"radialGradient\",{id:\"d\",cx:\"0\",cy:\"0\",r:\"1\",gradientUnits:\"userSpaceOnUse\",gradientTransform:\"matrix(57 -261 178 39 190.5 296.3)\"},React__namespace.createElement(\"stop\",{stopColor:\"#fff\",stopOpacity:\".8\"}),React__namespace.createElement(\"stop\",{offset:\"1\",stopColor:\"#fff\",stopOpacity:\".4\"})),React__namespace.createElement(\"radialGradient\",{id:\"e\",cx:\"0\",cy:\"0\",r:\"1\",gradientUnits:\"userSpaceOnUse\",gradientTransform:\"matrix(-79 -133 153 -90 321.4 464.2)\"},React__namespace.createElement(\"stop\",{stopColor:\"#fff\",stopOpacity:\".3\"}),React__namespace.createElement(\"stop\",{offset:\"1\",stopOpacity:\".3\"})),React__namespace.createElement(\"radialGradient\",{id:\"f\",cx:\"0\",cy:\"0\",r:\"1\",gradientUnits:\"userSpaceOnUse\",gradientTransform:\"matrix(-29 136 -92 -20 300.7 149.9)\"},React__namespace.createElement(\"stop\",{stopColor:\"#fff\",stopOpacity:\"0\"}),React__namespace.createElement(\"stop\",{offset:\"1\",stopColor:\"#fff\",stopOpacity:\".2\"})),React__namespace.createElement(\"radialGradient\",{id:\"g\",cx:\"0\",cy:\"0\",r:\"1\",gradientUnits:\"userSpaceOnUse\",gradientTransform:\"matrix(72 73 -155 153 137.8 225.2)\"},React__namespace.createElement(\"stop\",{stopColor:\"#fff\",stopOpacity:\".2\"}),React__namespace.createElement(\"stop\",{offset:\"1\",stopColor:\"#fff\",stopOpacity:\".4\"})),React__namespace.createElement(\"radialGradient\",{id:\"h\",cx:\"0\",cy:\"0\",r:\"1\",gradientUnits:\"userSpaceOnUse\",gradientTransform:\"matrix(20 118 -251 43 215.1 273.7)\"},React__namespace.createElement(\"stop\",{stopColor:\"#fff\",stopOpacity:\".1\"}),React__namespace.createElement(\"stop\",{offset:\"1\",stopColor:\"#fff\",stopOpacity:\".3\"})),React__namespace.createElement(\"radialGradient\",{id:\"i\",cx:\"0\",cy:\"0\",r:\"1\",gradientUnits:\"userSpaceOnUse\",gradientTransform:\"matrix(-162 -85 268 -510 374.4 371.7)\"},React__namespace.createElement(\"stop\",{stopColor:\"#fff\",stopOpacity:\".2\"}),React__namespace.createElement(\"stop\",{offset:\".5\",stopColor:\"#fff\",stopOpacity:\".2\"}),React__namespace.createElement(\"stop\",{offset:\"1\",stopColor:\"#fff\",stopOpacity:\".3\"})),React__namespace.createElement(\"filter\",{id:\"a\",x:\"80.1\",y:\"37\",width:\"351.1\",height:\"443.2\",filterUnits:\"userSpaceOnUse\",colorInterpolationFilters:\"sRGB\"},React__namespace.createElement(\"feFlood\",{floodOpacity:\"0\",result:\"BackgroundImageFix\"}),React__namespace.createElement(\"feBlend\",{in:\"SourceGraphic\",in2:\"BackgroundImageFix\",result:\"shape\"}),React__namespace.createElement(\"feGaussianBlur\",{stdDeviation:\"6.5\",result:\"effect1_foregroundBlur_744_9191\"}))),React__namespace.createElement(\"g\",{filter:\"url(#a)\"},React__namespace.createElement(\"path\",{d:\"M359.2 437.5c-2.6 19-21.3 33.9-40 28.7-26.5-7.2-57.2-18.6-84.8-20.7l-42.4-3.2a28 28 0 0 1-18-8.3l-73-74.8a27.7 27.7 0 0 1-5.4-30.7s45-98.6 46.8-103.7c1.6-5.1 7.8-49.9 11.4-73.9a28 28 0 0 1 9-16.5L249 57.2a28 28 0 0 1 40.6 3.4l72.6 91.6a29.5 29.5 0 0 1 6.2 18.3c0 17.3 1.5 53 11.2 76a301.3 301.3 0 0 0 35.6 58.2 14 14 0 0 1 1 15.6c-6.3 10.7-18.9 31.3-36.6 57.6a142.2 142.2 0 0 0-20.5 59.6Z\",fill:\"#000\",fillOpacity:\".3\"})),React__namespace.createElement(\"path\",{id:\"arrow\",d:\"M359.9 434.3c-2.6 19.1-21.3 34-40 28.9-26.4-7.3-57-18.7-84.7-20.8l-42.3-3.2a27.9 27.9 0 0 1-18-8.4l-73-75a27.9 27.9 0 0 1-5.4-31s45.1-99 46.8-104.2c1.7-5.1 7.8-50 11.4-74.2a28 28 0 0 1 9-16.6l86.2-77.5a28 28 0 0 1 40.6 3.5l72.5 92a29.7 29.7 0 0 1 6.2 18.3c0 17.4 1.5 53.2 11.1 76.3a303 303 0 0 0 35.6 58.5 14 14 0 0 1 1.1 15.7c-6.4 10.8-18.9 31.4-36.7 57.9a143.3 143.3 0 0 0-20.4 59.8Z\",fill:\"#6c31e3\"}),React__namespace.createElement(\"path\",{d:\"M182.7 436.4c33.9-68.7 33-118 18.5-153-13.2-32.4-37.9-52.8-57.3-65.5-.4 1.9-1 3.7-1.8 5.4L96.5 324.8a27.9 27.9 0 0 0 5.5 31l72.9 75c2.3 2.3 5 4.2 7.8 5.6Z\",fill:\"url(#b)\"}),React__namespace.createElement(\"path\",{d:\"M274.9 297c9.1.9 18 2.9 26.8 6.1 27.8 10.4 53.1 33.8 74 78.9 1.5-2.6 3-5.1 4.6-7.5a1222 1222 0 0 0 36.7-57.9 14 14 0 0 0-1-15.7 303 303 0 0 1-35.7-58.5c-9.6-23-11-58.9-11.1-76.3 0-6.6-2.1-13.1-6.2-18.3l-72.5-92-1.2-1.5c5.3 17.5 5 31.5 1.7 44.2-3 11.8-8.6 22.5-14.5 33.8-2 3.8-4 7.7-5.9 11.7a140 140 0 0 0-15.8 58c-1 24.2 3.9 54.5 20 95Z\",fill:\"url(#c)\"}),React__namespace.createElement(\"path\",{d:\"M274.8 297c-16.1-40.5-21-70.8-20-95 1-24 8-42 15.8-58l6-11.7c5.8-11.3 11.3-22 14.4-33.8a78.5 78.5 0 0 0-1.7-44.2 28 28 0 0 0-39.4-2l-86.2 77.5a28 28 0 0 0-9 16.6L144.2 216c0 .7-.2 1.3-.3 2 19.4 12.6 44 33 57.3 65.3 2.6 6.4 4.8 13.1 6.4 20.4a200 200 0 0 1 67.2-6.8Z\",fill:\"url(#d)\"}),React__namespace.createElement(\"path\",{d:\"M320 463.2c18.6 5.1 37.3-9.8 39.9-29a153 153 0 0 1 15.9-52.2c-21-45.1-46.3-68.5-74-78.9-29.5-11-61.6-7.3-94.2.6 7.3 33.1 3 76.4-24.8 132.7 3.1 1.6 6.6 2.5 10.1 2.8l43.9 3.3c23.8 1.7 59.3 14 83.2 20.7Z\",fill:\"url(#e)\"}),React__namespace.createElement(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M255 200.5c-1.1 24 1.9 51.4 18 91.8l-5-.5c-14.5-42.1-17.7-63.7-16.6-88 1-24.3 8.9-43 16.7-59 2-4 6.6-11.5 8.6-15.3 5.8-11.3 9.7-17.2 13-27.5 4.8-14.4 3.8-21.2 3.2-28 3.7 24.5-10.4 45.8-21 67.5a145 145 0 0 0-17 59Z\",fill:\"url(#f)\"}),React__namespace.createElement(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M206 285.1c2 4.4 3.7 8 4.9 13.5l-4.3 1c-1.7-6.4-3-11-5.5-16.5-14.6-34.3-38-52-57-65 23 12.4 46.7 31.9 61.9 67Z\",fill:\"url(#g)\"}),React__namespace.createElement(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M211.1 303c8 37.5-1 85.2-27.5 131.6 22.2-46 33-90.1 24-131l3.5-.7Z\",fill:\"url(#h)\"}),React__namespace.createElement(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M302.7 299.5c43.5 16.3 60.3 52 72.8 81.9-15.5-31.2-37-65.7-74.4-78.5-28.4-9.8-52.4-8.6-93.5.7l-.9-4c43.6-10 66.4-11.2 96 0Z\",fill:\"url(#i)\"})),\"add-file\":React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},React__namespace.createElement(\"path\",{d:\"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z\"}),React__namespace.createElement(\"polyline\",{points:\"14 2 14 8 20 8\"}),React__namespace.createElement(\"line\",{x1:\"12\",x2:\"12\",y1:\"18\",y2:\"12\"}),React__namespace.createElement(\"line\",{x1:\"9\",x2:\"15\",y1:\"15\",y2:\"15\"}))},SwordColors={Bronze:{grip:\"#cd7f32\",decoration:\"#96510d\",blade:\"#7A420B\",bladeFillLight:\"#E1B384\",title:\"Apprentice of Sketchnoting\"},Silver:{grip:\"#CECDCC\",decoration:\"#b2b0b0\",blade:\"#979595\",bladeFillLight:\"#F5F5F5\",title:\"Champion of Spatial Thinking\"},Gold:{grip:\"#F5D000\",decoration:\"#D6B600\",blade:\"#B89C00\",bladeFillLight:\"#FFEA70\",title:\"Hero of Visual Notetaking\"},Platinum:{grip:\"#646261\",decoration:\"#323131\",blade:\"#000\",bladeFillLight:\"#8B8988\",title:\"Legend of Visual Thinking\"}},excalidrawSword=e=>{const{grip:t,decoration:a,blade:i,bladeFillLight:n}=SwordColors[e];return React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 528 1140\"},React__namespace.createElement(\"g\",{fillRule:\"evenodd\",strokeLinecap:\"round\"},React__namespace.createElement(\"path\",{fill:n,d:\"m272 979 118-121-80-571-104 1-36 580 104 113-1-2\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeWidth:\"4\",d:\"M271 978c31-30 67-60 117-120M273 979c42-46 89-95 115-120m-1-1c-19-163-41-323-79-569m78 570c-20-165-42-329-78-570m-2 0c-23-2-56-2-102 0m106-1c-34 0-63-1-104 1m0 1c-12 192-21 384-34 574m33-576-31 576m3 2c30 40 71 85 98 112M173 863c38 47 75 87 100 117m1 1s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0\"})),React__namespace.createElement(\"g\",{fill:\"none\",fillRule:\"evenodd\",strokeLinecap:\"round\"},React__namespace.createElement(\"path\",{stroke:i,strokeWidth:\".5\",d:\"M207 287s0 0 0 0m0 0s0 0 0 0m-2 6 7-5m-6 6 6-7m-6 17c0-8 3-14 10-15m-9 12c4-3 5-8 12-14m-11 20c4-7 6-8 11-20m-13 19c4-6 10-10 15-16m-14 27c4-12 7-14 21-28m-23 24c8-6 13-16 23-27m-23 35c14-11 17-26 31-37m-32 37c10-10 16-17 28-35m-29 39c12-6 18-13 31-37m-28 37c5-8 12-14 33-37m-33 47c7-12 20-27 36-44m-36 42c14-17 26-36 38-44m-36 53c8-11 22-26 37-53m-42 48c14-14 29-29 46-49m-45 60c18-29 42-49 52-62m-52 61c18-22 36-40 52-59m-56 63c15-17 34-27 57-65m-54 66 58-63m-62 71c15-18 35-38 64-74m-62 74c25-30 48-57 62-71m-62 78c22-25 42-52 72-75m-71 72c22-26 47-53 70-75m-69 84c25-30 50-67 70-88m-72 87 74-82m-72 85c30-27 58-58 75-89m-75 94c17-23 37-42 79-90m-82 97c24-21 45-47 86-95m-85 94 84-98m-84 105c22-23 40-48 92-105m-93 106c23-30 47-57 90-105m-90 106c29-25 51-56 95-105m-94 108c19-23 38-47 96-109m-93 118c36-44 72-86 93-114m-98 114c30-35 55-69 102-120M197 408c30-26 58-60 110-119M199 412l108-124M198 421c31-37 66-71 111-129M201 418c32-41 71-82 110-130M196 426c38-43 73-77 119-132M198 426l114-130M196 430c41-47 85-87 120-128M198 431c29-29 53-57 113-133M201 436c25-31 51-61 112-127M198 439c28-30 52-61 114-133M194 442c29-33 63-65 123-134M198 442c42-48 85-97 118-132M195 449c28-35 63-63 122-135M198 449c43-49 88-96 117-131M197 459c45-51 86-103 121-139M199 455c47-49 88-100 117-133M196 463c31-40 67-74 121-133M199 463c44-52 90-106 119-137M195 467c41-39 77-90 118-133M196 472c26-34 54-62 121-141M196 478c45-49 89-102 122-138M198 476c26-28 52-58 117-138M195 481c36-41 69-86 124-140M197 481c26-33 55-66 120-141M192 486c45-46 90-93 123-138M196 490c34-34 64-72 123-142M194 494c42-43 83-93 129-138M194 496c30-32 57-65 127-144M195 506c44-55 88-99 125-146M195 504l123-146M197 506c41-41 80-87 127-142M193 511c40-42 77-84 129-148M195 518c26-37 57-72 127-146M193 517c41-52 85-101 128-146M192 523c42-42 77-85 133-147M192 524c49-60 98-116 129-151M193 527c34-34 69-71 128-147M194 528c45-53 88-104 130-149M192 537c48-48 92-98 129-155M192 537c50-56 99-112 132-152M190 540c47-54 97-107 138-152M192 541c39-49 82-97 131-151M191 546c36-38 68-78 136-153M192 549c51-62 105-123 133-154M194 558c27-42 55-72 134-159M190 557c31-35 59-71 135-155M191 564c49-53 91-108 139-162M190 562l137-155M189 567l142-153M190 568c40-43 76-87 137-157M189 572c50-50 98-108 138-155M190 574l139-158M192 579c58-62 109-126 136-156M190 581c44-48 87-98 139-158M191 591c51-58 95-111 140-164M190 588c35-43 70-84 140-162M188 592c32-32 60-65 139-160M188 595l143-162M191 602c31-43 72-87 141-168M189 600c34-32 64-67 142-161M185 610c54-57 102-117 149-165M187 606c53-58 100-114 146-164M191 610c53-54 106-112 141-166M188 615c37-40 74-81 143-167M185 621c46-46 87-94 150-167M187 621c32-35 64-70 148-169M190 625c45-52 94-112 141-169M188 625c56-62 113-124 146-167M189 633l144-172M187 633c34-40 67-76 146-171M186 643c34-44 71-90 148-172M185 639c60-70 119-135 152-172M187 643c39-43 81-86 147-172M187 646c29-37 61-73 148-172M187 651c52-60 102-117 148-174M185 651l152-171M185 661c59-73 121-137 151-175M187 660c31-44 66-83 150-175M183 667c44-51 84-95 153-176M186 667c35-40 68-78 153-179M183 674c40-47 80-99 158-178M184 671c57-69 116-137 155-175M187 678c39-44 79-97 154-180M185 681c55-62 112-126 153-180M187 687c51-62 110-121 152-178M185 684c29-37 62-73 155-179M181 692c50-63 104-125 163-182M185 692l156-183M187 696c39-46 87-96 154-181M185 697c43-51 84-100 156-180M184 704c48-52 103-110 158-184M185 705c54-69 115-138 159-182M184 710c62-70 131-143 157-183M184 712c59-72 119-143 161-186M184 721c60-71 118-142 159-189M184 719c40-50 86-104 162-186M184 722c41-45 81-91 163-186M182 725c63-76 127-148 163-189M179 728c55-59 110-124 167-188M182 731c45-50 92-104 163-190M179 740c43-47 82-97 169-194M182 738l163-191M184 741c50-62 105-129 166-190M182 743c35-45 74-89 166-189M182 753c33-44 67-87 164-193M180 749c42-43 83-88 169-189M181 757c58-70 125-145 166-195M181 757l166-193M179 763c39-39 73-85 172-193M180 764l169-196M176 771c73-77 138-156 171-196M181 770c47-57 98-115 168-196M182 778c68-77 129-153 171-201M178 777c46-54 93-104 171-197M180 780c54-64 113-132 171-197M180 782c50-56 101-118 171-199M180 789c43-52 90-101 170-197M179 789c43-43 83-90 174-198M178 795c63-64 120-138 173-198M178 795c47-52 93-106 175-201M178 803c42-45 82-96 176-206M177 802c55-62 111-128 176-200M176 809c65-65 124-136 180-201M177 810l176-206M175 817c58-71 118-136 182-203M178 816c69-82 141-162 176-205M175 819c39-40 79-86 180-204M176 822c60-66 117-133 180-208M178 827c40-41 76-91 179-203M176 829c36-47 75-90 180-206M174 835c59-62 114-123 180-211M175 835c36-44 75-86 181-209M176 842c38-48 79-98 182-212M177 842c59-66 115-131 182-210M176 849c44-58 96-119 185-212M176 848c36-46 76-92 183-210M177 853c51-56 99-114 181-210M173 856c59-70 122-140 186-215M176 862c35-44 77-87 184-212M175 862c61-69 120-135 187-216M177 862c74-75 142-156 183-208M177 866c53-58 103-119 183-211M180 866c66-70 131-149 182-211M180 869c44-53 89-104 183-211M180 873c61-70 117-142 185-206M182 871c48-55 94-106 181-208M184 873c41-47 82-97 180-204M185 874c64-75 126-147 179-204M190 879c35-42 72-86 174-202M186 878c58-69 116-138 177-203M188 882c38-46 81-96 174-203M189 881c58-65 117-129 177-200M195 883c53-65 105-123 170-201M192 884c48-62 103-120 174-199M196 886c64-76 132-155 172-199M194 885c52-55 102-115 172-194M195 888c42-36 75-79 173-193M197 889c55-58 105-116 171-195M203 895c55-70 115-138 164-192M201 892c53-64 106-125 165-191M203 897c42-53 82-98 166-188M202 896c34-35 68-74 167-189M205 901c54-62 109-127 161-192M207 897c46-57 96-115 161-188M209 899c46-51 92-101 159-185M209 900c37-35 68-74 161-183M210 906c50-62 103-118 163-187M210 905c45-55 92-103 161-184M212 907c50-59 103-117 159-177M213 908c35-45 73-88 157-181M219 912c46-57 97-115 153-181M215 912c50-56 100-112 156-180M219 916c48-60 96-108 152-177M217 915c30-39 61-72 156-178M218 916c45-47 86-91 153-175M220 918c34-37 69-78 153-176M226 918l149-171M225 919c43-50 83-97 149-170M223 924c33-34 64-71 154-174M228 923c34-42 68-82 148-172M226 930c41-44 76-89 147-174M229 925c35-43 72-84 146-168M231 932l144-168M231 929c49-54 99-111 145-165M234 931c29-36 63-69 143-160M233 933l144-163M237 935c49-53 99-111 137-162M236 934c51-55 99-111 142-161M239 942c44-51 88-100 140-163M239 938l139-157M243 941c31-39 65-79 138-156M242 940l135-154M248 945c52-62 99-123 133-153M245 945l134-153M250 947c32-43 66-85 130-148M246 948c44-50 83-97 133-152M247 951c35-36 65-72 134-148M251 952c50-55 101-114 128-151M254 957c34-50 80-99 128-152M255 954c46-59 93-114 128-148M255 956c53-55 101-120 127-149M257 957c37-43 73-83 125-146M261 962c39-49 83-101 118-142M259 961l122-143M258 961c37-42 71-83 127-139M261 965c30-37 61-69 122-142M265 965c48-46 86-99 120-136M262 964c42-50 88-99 123-136M263 967c43-47 88-91 124-134M267 970c33-41 67-79 117-138M272 971c41-45 75-82 116-134M269 972c31-41 66-82 118-136M268 974c30-35 64-68 120-134M270 975l118-134M275 975c31-28 60-62 113-127M273 976c29-31 55-65 115-128M274 980c47-43 87-97 116-128M275 980c26-26 51-57 111-126\"}),React__namespace.createElement(\"path\",{stroke:\"black\",d:\"M272 980c39-30 68-66 119-121M273 982c49-46 92-93 114-126m1 0c-26-177-53-358-78-568m78 570c-18-155-40-312-78-569m3-1c-31-1-59 0-106-3m101 3c-29-2-59 0-101-1m-1 1c-10 204-24 410-31 575m32-576c-10 116-16 231-32 576m-2-1c27 25 44 44 105 120M175 865l98 117m2-2s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0\"})),React__namespace.createElement(\"path\",{fill:\"none\",stroke:i,strokeLinecap:\"round\",strokeWidth:\"4\",d:\"M271 610c1 44 6 217 6 261m-10-263 9 258\"}),React__namespace.createElement(\"g\",{fillOpacity:\".8\",fillRule:\"evenodd\",strokeLinecap:\"round\",strokeOpacity:\".8\"},React__namespace.createElement(\"path\",{fill:\"#dbc9f3\",d:\"m320 484-4-4-5-3-4-3-4-2-5-2-4-1-5-1h-13l-4 1-5 2-4 2-5 3-4 3-5 4-133 117-5 4-2 2-2 2-2 2-2 2-1 3-1 3-19 127 10 7 10 8 10 7 9 8 8 8 8 8 7 8 7 9 6 9 6 9 5 9 4 9 5 10 3 9 4 10 2 10 15-3 8-2 7-1 7-1 6-1 7-1 6-1 6-1h6l6-1h16l4 1h5l-4-10-2-10-3-10-2-10-3-10-1-10-2-10-1-9-1-10v-10l-1-9v-19l1-10 1-9 1-9 1-10 1-9 2-9 2-9 2-9 3-10 3-9 2-9 4-9 3-9 3-9 4-9 4-9 4-9 9-19 2-3 2-4 1-4 1-5 2-4 1-5v-5l1-6v-23l-1-6-1-7-1-7-2-7\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeWidth:\"4\",d:\"M320 484s0 0 0 0m0 0s0 0 0 0m0 0-4-4m4 4-4-4m0 0-5-3m5 3-5-3m0 0-4-3m4 3-4-3m0 0-4-2m4 2-4-2m0 0-5-2m5 2-5-2m0 0-4-1m4 1-4-1m0 0-5-1m5 1-5-1m0 0h-4m4 0h-4m0 0h-5m5 0h-5m0 0h-4m4 0h-4m0 0-4 1m4-1-4 1m0 0-5 2m5-2-5 2m0 0-4 2m4-2-4 2m0 0-5 3m5-3-5 3m0 0-4 3m4-3-4 3m0 0-5 4m5-4-5 4m0 0L116 600m133-117L116 600m0 0s0 0 0 0m0 0s0 0 0 0m0 0-5 4m5-4-5 4m0 0-2 2m2-2-2 2m0 0-2 2m2-2-2 2m0 0-2 2m2-2-2 2m0 0-2 2m2-2-2 2m0 0-1 3m1-3-1 3m0 0-1 3m1-3-1 3m0 0L82 745m19-127L82 745m0 0s0 0 0 0m0 0s0 0 0 0m0 0 10 7m-10-7 10 7m0 0 10 8m-10-8 10 8m0 0 10 7m-10-7 10 7m0 0 9 8m-9-8 9 8m0 0 8 8m-8-8 8 8m0 0 8 8m-8-8 8 8m0 0 7 8m-7-8 7 8m0 0 7 9m-7-9 7 9m0 0 6 9m-6-9 6 9m0 0 6 9m-6-9 6 9m0 0 5 9m-5-9 5 9m0 0 4 9m-4-9 4 9m0 0 5 10m-5-10 5 10m0 0 3 9m-3-9 3 9m0 0 4 10m-4-10 4 10m0 0 2 10m-2-10 2 10m0 0 15-3m-15 3 15-3m0 0 8-2m-8 2 8-2m0 0 7-1m-7 1 7-1m0 0 7-1m-7 1 7-1m0 0 6-1m-6 1 6-1m0 0 7-1m-7 1 7-1m0 0 6-1m-6 1 6-1m0 0 6-1m-6 1 6-1m0 0h6m-6 0h6m0 0 6-1m-6 1 6-1m0 0h5m-5 0h5m0 0h6m-6 0h6m0 0h5m-5 0h5m0 0 4 1m-4-1 4 1m0 0h5m-5 0h5m0 0-4-10m4 10-4-10m0 0-2-10m2 10-2-10m0 0-3-10m3 10-3-10m0 0-2-10m2 10-2-10m0 0-3-10m3 10-3-10m0 0-1-10m1 10-1-10m0 0-2-10m2 10-2-10m0 0-1-9m1 9-1-9m0 0-1-10m1 10-1-10m0 0v-10m0 10v-10m0 0-1-9m1 9-1-9m0 0v-10m0 10v-10m0 0v-9m0 9v-9m0 0 1-10m-1 10 1-10m0 0 1-9m-1 9 1-9m0 0 1-9m-1 9 1-9m0 0 1-10m-1 10 1-10m0 0 1-9m-1 9 1-9m0 0 2-9m-2 9 2-9m0 0 2-9m-2 9 2-9m0 0 2-9m-2 9 2-9m0 0 3-10m-3 10 3-10m0 0 3-9m-3 9 3-9m0 0 2-9m-2 9 2-9m0 0 4-9m-4 9 4-9m0 0 3-9m-3 9 3-9m0 0 3-9m-3 9 3-9m0 0 4-9m-4 9 4-9m0 0 4-9m-4 9 4-9m0 0 4-9m-4 9 4-9m0 0 9-19m-9 19 9-19m0 0 2-3m-2 3 2-3m0 0 2-4m-2 4 2-4m0 0 1-4m-1 4 1-4m0 0 1-5m-1 5 1-5m0 0 2-4m-2 4 2-4m0 0 1-5m-1 5 1-5m0 0v-5m0 5v-5m0 0 1-6m-1 6 1-6m0 0v-5m0 5v-5m0 0v-6m0 6v-6m0 0v-6m0 6v-6m0 0v-6m0 6v-6m0 0-1-6m1 6-1-6m0 0-1-7m1 7-1-7m0 0-1-7m1 7-1-7m0 0-2-7m2 7-2-7m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0\"})),React__namespace.createElement(\"g\",{fillOpacity:\".8\",fillRule:\"evenodd\",strokeLinecap:\"round\",strokeOpacity:\".8\"},React__namespace.createElement(\"path\",{fill:\"#a887e8\",d:\"m434 628 3 4 3 5 2 6 2 5 2 6 1 5 1 7v6l1 13 1 13 1 12 2 13 2 12 3 13 4 12 4 12 4 13 5 12 5 12 7 12 6 11 7 12 8 12 9 12 3 3 2 3 2 3 1 3 1 3 1 3 1 3v5l-1 3-1 2-1 3-1 3-1 2-4 5-61 100-4-9-4-8-4-8-4-8-4-7-5-7-4-7-5-7-4-6-5-6-5-6-5-6-5-5-5-5-5-4-6-5-5-4-6-4-6-4-5-3-6-3-6-3-6-3-6-2-7-2-6-2-7-2-6-1-7-2-7-1h-6l-7-1-4-10-3-10-2-10-3-9-2-10-2-10-1-10-2-9-1-10v-9l-1-10v-19l1-9v-9l1-10 1-9 2-9 1-9 2-10 2-9 3-9 2-9 3-9 3-9 4-9 3-9 4-10 4-9 5-9 4-9 5-9 2-5 2-5 2-5 2-5 1-5 1-5 1-6v-22l-1-6-1-5v-6l-3-12 114 144\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeWidth:\"4\",d:\"M434 628s0 0 0 0m0 0s0 0 0 0m0 0 3 4m-3-4 3 4m0 0 3 5m-3-5 3 5m0 0 2 6m-2-6 2 6m0 0 2 5m-2-5 2 5m0 0 2 6m-2-6 2 6m0 0 1 5m-1-5 1 5m0 0 1 7m-1-7 1 7m0 0v6m0-6v6m0 0 1 13m-1-13 1 13m0 0 1 13m-1-13 1 13m0 0 1 12m-1-12 1 12m0 0 2 13m-2-13 2 13m0 0 2 12m-2-12 2 12m0 0 3 13m-3-13 3 13m0 0 4 12m-4-12 4 12m0 0 4 12m-4-12 4 12m0 0 4 13m-4-13 4 13m0 0 5 12m-5-12 5 12m0 0 5 12m-5-12 5 12m0 0 7 12m-7-12 7 12m0 0 6 11m-6-11 6 11m0 0 7 12m-7-12 7 12m0 0 8 12m-8-12 8 12m0 0 9 12m-9-12 9 12m0 0 3 3m-3-3 3 3m0 0 2 3m-2-3 2 3m0 0 2 3m-2-3 2 3m0 0 1 3m-1-3 1 3m0 0 1 3m-1-3 1 3m0 0 1 3m-1-3 1 3m0 0 1 3m-1-3 1 3m0 0v3m0-3v3m0 0v2m0-2v2m0 0-1 3m1-3-1 3m0 0-1 2m1-2-1 2m0 0-1 3m1-3-1 3m0 0-1 3m1-3-1 3m0 0-1 2m1-2-1 2m0 0-4 5m4-5-4 5m0 0-61 100m61-100-61 100m0 0s0 0 0 0m0 0s0 0 0 0m0 0-4-9m4 9-4-9m0 0-4-8m4 8-4-8m0 0-4-8m4 8-4-8m0 0-4-8m4 8-4-8m0 0-4-7m4 7-4-7m0 0-5-7m5 7-5-7m0 0-4-7m4 7-4-7m0 0-5-7m5 7-5-7m0 0-4-6m4 6-4-6m0 0-5-6m5 6-5-6m0 0-5-6m5 6-5-6m0 0-5-6m5 6-5-6m0 0-5-5m5 5-5-5m0 0-5-5m5 5-5-5m0 0-5-4m5 4-5-4m0 0-6-5m6 5-6-5m0 0-5-4m5 4-5-4m0 0-6-4m6 4-6-4m0 0-6-4m6 4-6-4m0 0-5-3m5 3-5-3m0 0-6-3m6 3-6-3m0 0-6-3m6 3-6-3m0 0-6-3m6 3-6-3m0 0-6-2m6 2-6-2m0 0-7-2m7 2-7-2m0 0-6-2m6 2-6-2m0 0-7-2m7 2-7-2m0 0-6-1m6 1-6-1m0 0-7-2m7 2-7-2m0 0-7-1m7 1-7-1m0 0h-6m6 0h-6m0 0-7-1m7 1-7-1m0 0-4-10m4 10-4-10m0 0-3-10m3 10-3-10m0 0-2-10m2 10-2-10m0 0-3-9m3 9-3-9m0 0-2-10m2 10-2-10m0 0-2-10m2 10-2-10m0 0-1-10m1 10-1-10m0 0-2-9m2 9-2-9m0 0-1-10m1 10-1-10m0 0v-9m0 9v-9m0 0-1-10m1 10-1-10m0 0v-9m0 9v-9m0 0v-10m0 10v-10m0 0 1-9m-1 9 1-9m0 0v-9m0 9v-9m0 0 1-10m-1 10 1-10m0 0 1-9m-1 9 1-9m0 0 2-9m-2 9 2-9m0 0 1-9m-1 9 1-9m0 0 2-10m-2 10 2-10m0 0 2-9m-2 9 2-9m0 0 3-9m-3 9 3-9m0 0 2-9m-2 9 2-9m0 0 3-9m-3 9 3-9m0 0 3-9m-3 9 3-9m0 0 4-9m-4 9 4-9m0 0 3-9m-3 9 3-9m0 0 4-10m-4 10 4-10m0 0 4-9m-4 9 4-9m0 0 5-9m-5 9 5-9m0 0 4-9m-4 9 4-9m0 0 5-9m-5 9 5-9m0 0 2-5m-2 5 2-5m0 0 2-5m-2 5 2-5m0 0 2-5m-2 5 2-5m0 0 2-5m-2 5 2-5m0 0 1-5m-1 5 1-5m0 0 1-5m-1 5 1-5m0 0 1-6m-1 6 1-6m0 0v-5m0 5v-5m0 0v-6m0 6v-6m0 0v-5m0 5v-5m0 0v-6m0 6v-6m0 0-1-6m1 6-1-6m0 0-1-5m1 5-1-5m0 0v-6m0 6v-6m0 0-3-12m3 12-3-12m0 0 114 144M320 484l114 144m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0\"})),React__namespace.createElement(\"g\",{fillOpacity:\".8\",fillRule:\"evenodd\",strokeLinecap:\"round\",strokeOpacity:\".8\"},React__namespace.createElement(\"path\",{fill:\"#6342a0\",d:\"m184 884 2 7 2 7 1 8 1 7 1 7 1 7v7l1 7v7l-1 7v7l-1 7v7l-1 7-3 13-3 13-4 14-5 12-5 13-6 13-6 12-6 13-8 12h14l14 1h14l14 1 13 1 14 2 13 2 14 1 13 3 13 2 13 3 13 3 13 4 12 4 13 4 12 5 7 2 6 2 6 1 6 1h5l5-1 6-1 4-2 5-3 5-3 4-4 4-4 2-3 1-2 2-3 2-3 2-4 1-3 2-4 1-4 25-85-5-11-4-11-6-10-5-10-6-9-6-9-6-8-6-8-7-8-7-7-7-6-7-6-8-6-8-5-8-5-8-4-9-4-9-3-9-3-9-2-10-2-10-2-10-1h-32l-11 1-12 2-11 1-12 3-12 3-13 3\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeWidth:\"4\",d:\"M184 884s0 0 0 0m0 0s0 0 0 0m0 0 2 7m-2-7 2 7m0 0 2 7m-2-7 2 7m0 0 1 8m-1-8 1 8m0 0 1 7m-1-7 1 7m0 0 1 7m-1-7 1 7m0 0 1 7m-1-7 1 7m0 0v7m0-7v7m0 0 1 7m-1-7 1 7m0 0v7m0-7v7m0 0-1 7m1-7-1 7m0 0v7m0-7v7m0 0-1 7m1-7-1 7m0 0v7m0-7v7m0 0-1 7m1-7-1 7m0 0-3 13m3-13-3 13m0 0-3 13m3-13-3 13m0 0-4 14m4-14-4 14m0 0-5 12m5-12-5 12m0 0-5 13m5-13-5 13m0 0-6 13m6-13-6 13m0 0-6 12m6-12-6 12m0 0-6 13m6-13-6 13m0 0-8 12m8-12-8 12m0 0h14m-14 0h14m0 0 14 1m-14-1 14 1m0 0h14m-14 0h14m0 0 14 1m-14-1 14 1m0 0 13 1m-13-1 13 1m0 0 14 2m-14-2 14 2m0 0 13 2m-13-2 13 2m0 0 14 1m-14-1 14 1m0 0 13 3m-13-3 13 3m0 0 13 2m-13-2 13 2m0 0 13 3m-13-3 13 3m0 0 13 3m-13-3 13 3m0 0 13 4m-13-4 13 4m0 0 12 4m-12-4 12 4m0 0 13 4m-13-4 13 4m0 0 12 5m-12-5 12 5m0 0 7 2m-7-2 7 2m0 0 6 2m-6-2 6 2m0 0 6 1m-6-1 6 1m0 0 6 1m-6-1 6 1m0 0h5m-5 0h5m0 0 5-1m-5 1 5-1m0 0 6-1m-6 1 6-1m0 0 4-2m-4 2 4-2m0 0 5-3m-5 3 5-3m0 0 5-3m-5 3 5-3m0 0 4-4m-4 4 4-4m0 0 4-4m-4 4 4-4m0 0 2-3m-2 3 2-3m0 0 1-2m-1 2 1-2m0 0 2-3m-2 3 2-3m0 0 2-3m-2 3 2-3m0 0 2-4m-2 4 2-4m0 0 1-3m-1 3 1-3m0 0 2-4m-2 4 2-4m0 0 1-4m-1 4 1-4m0 0 25-85m-25 85 25-85m0 0s0 0 0 0m0 0s0 0 0 0m0 0-5-11m5 11-5-11m0 0-4-11m4 11-4-11m0 0-6-10m6 10-6-10m0 0-5-10m5 10-5-10m0 0-6-9m6 9-6-9m0 0-6-9m6 9-6-9m0 0-6-8m6 8-6-8m0 0-6-8m6 8-6-8m0 0-7-8m7 8-7-8m0 0-7-7m7 7-7-7m0 0-7-6m7 6-7-6m0 0-7-6m7 6-7-6m0 0-8-6m8 6-8-6m0 0-8-5m8 5-8-5m0 0-8-5m8 5-8-5m0 0-8-4m8 4-8-4m0 0-9-4m9 4-9-4m0 0-9-3m9 3-9-3m0 0-9-3m9 3-9-3m0 0-9-2m9 2-9-2m0 0-10-2m10 2-10-2m0 0-10-2m10 2-10-2m0 0-10-1m10 1-10-1m0 0h-10m10 0h-10m0 0h-11m11 0h-11m0 0h-11m11 0h-11m0 0-11 1m11-1-11 1m0 0-12 2m12-2-12 2m0 0-11 1m11-1-11 1m0 0-12 3m12-3-12 3m0 0-12 3m12-3-12 3m0 0-13 3m13-3-13 3m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0\"})),React__namespace.createElement(\"g\",{fillOpacity:\".8\",fillRule:\"evenodd\",strokeLinecap:\"round\",strokeOpacity:\".8\"},React__namespace.createElement(\"path\",{fill:\"#390f8c\",d:\"m82 745 13 9 6 5 6 4 6 5 5 5 6 5 5 5 5 6 5 5 5 6 5 6 4 6 4 6 4 6 4 6 3 6 4 7 3 6 2 7 3 7 2 7 2 7 2 7 1 6 2 7 1 7 2 6 1 7v7l1 6v33l-1 7-1 7-1 6-1 7-1 6-2 7-1 7-2 6-3 7-2 6-3 7-2 7-3 6-4 7-3 7-3 6-4 7-4 7-4 7-5 6L16 970l-3-4-4-3-2-4-3-4-1-4-2-5-1-4v-9l1-5v-5l2-5 2-5 2-6 3-5 3-6 69-151\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeWidth:\"4\",d:\"M82 745s0 0 0 0m0 0s0 0 0 0m0 0 13 9m-13-9 13 9m0 0 6 5m-6-5 6 5m0 0 6 4m-6-4 6 4m0 0 6 5m-6-5 6 5m0 0 5 5m-5-5 5 5m0 0 6 5m-6-5 6 5m0 0 5 5m-5-5 5 5m0 0 5 6m-5-6 5 6m0 0 5 5m-5-5 5 5m0 0 5 6m-5-6 5 6m0 0 5 6m-5-6 5 6m0 0 4 6m-4-6 4 6m0 0 4 6m-4-6 4 6m0 0 4 6m-4-6 4 6m0 0 4 6m-4-6 4 6m0 0 3 6m-3-6 3 6m0 0 4 7m-4-7 4 7m0 0 3 6m-3-6 3 6m0 0 2 7m-2-7 2 7m0 0 3 7m-3-7 3 7m0 0 2 7m-2-7 2 7m0 0 2 7m-2-7 2 7m0 0 2 7m-2-7 2 7m0 0 1 6m-1-6 1 6m0 0 2 7m-2-7 2 7m0 0 1 7m-1-7 1 7m0 0 2 6m-2-6 2 6m0 0 1 7m-1-7 1 7m0 0v7m0-7v7m0 0 1 6m-1-6 1 6m0 0v7m0-7v7m0 0v7m0-7v7m0 0v6m0-6v6m0 0v7m0-7v7m0 0v6m0-6v6m0 0-1 7m1-7-1 7m0 0-1 7m1-7-1 7m0 0-1 6m1-6-1 6m0 0-1 7m1-7-1 7m0 0-1 6m1-6-1 6m0 0-2 7m2-7-2 7m0 0-1 7m1-7-1 7m0 0-2 6m2-6-2 6m0 0-3 7m3-7-3 7m0 0-2 6m2-6-2 6m0 0-3 7m3-7-3 7m0 0-2 7m2-7-2 7m0 0-3 6m3-6-3 6m0 0-4 7m4-7-4 7m0 0-3 7m3-7-3 7m0 0-3 6m3-6-3 6m0 0-4 7m4-7-4 7m0 0-4 7m4-7-4 7m0 0-4 7m4-7-4 7m0 0-5 6m5-6-5 6m0 0L16 970m128 126L16 970m0 0s0 0 0 0m0 0s0 0 0 0m0 0-3-4m3 4-3-4m0 0-4-3m4 3-4-3m0 0-2-4m2 4-2-4m0 0-3-4m3 4-3-4m0 0-1-4m1 4-1-4m0 0-2-5m2 5-2-5m0 0-1-4m1 4-1-4m0 0v-4m0 4v-4m0 0v-5m0 5v-5m0 0 1-5m-1 5 1-5m0 0v-5m0 5v-5m0 0 2-5m-2 5 2-5m0 0 2-5m-2 5 2-5m0 0 2-6m-2 6 2-6m0 0 3-5m-3 5 3-5m0 0 3-6m-3 6 3-6m0 0 69-151M13 896l69-151m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0\"})),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"#CECDCC\",strokeLinecap:\"round\",strokeWidth:\"10\",d:\"M86 746s0 0 0 0m0 0s0 0 0 0m0 0 11 8m-11-8 11 8m0 0 10 8m-10-8 10 8m0 0 10 9m-10-9 10 9m0 0 8 8m-8-8 8 8m0 0 8 8m-8-8 8 8m0 0 8 8m-8-8 8 8m0 0 6 9m-6-9 6 9m0 0 7 8m-7-8 7 8m0 0 5 8m-5-8 5 8m0 0 6 9m-6-9 6 9m0 0 4 8m-4-8 4 8m0 0 4 9m-4-9 4 9m0 0 4 9m-4-9 4 9m0 0 3 9m-3-9 3 9m0 0 3 9m-3-9 3 9m0 0 3 9m-3-9 3 9m0 0 7-2m-7 2 7-2m0 0 8-1m-8 1 8-1m0 0 7-2m-7 2 7-2m0 0 7-1m-7 1 7-1m0 0 7-1m-7 1 7-1m0 0 7-1m-7 1 7-1m0 0 7-1m-7 1 7-1m0 0 6-1m-6 1 6-1m0 0h6m-6 0h6m0 0 6-1m-6 1 6-1m0 0h6m-6 0h6m0 0 5-1m-5 1 5-1m0 0h5m-5 0h5m0 0h5m-5 0h5m0 0h4m-4 0h4m0 0h4m-4 0h4m0 0-3-11m3 11-3-11m0 0-3-10m3 10-3-10m0 0-3-10m3 10-3-10m0 0-3-10m3 10-3-10m0 0-2-10m2 10-2-10m0 0-2-10m2 10-2-10m0 0-1-10m1 10-1-10m0 0-2-9m2 9-2-9m0 0-1-10m1 10-1-10m0 0v-10m0 10v-10m0 0-1-9m1 9-1-9m0 0v-10m0 10v-10m0 0v-9m0 9v-9m0 0 1-9m-1 9 1-9m0 0 1-10m-1 10 1-10m0 0 1-9m-1 9 1-9m0 0 1-9m-1 9 1-9m0 0 1-10m-1 10 1-10m0 0 2-9m-2 9 2-9m0 0 2-9m-2 9 2-9m0 0 3-9m-3 9 3-9m0 0 2-9m-2 9 2-9m0 0 3-9m-3 9 3-9m0 0 3-9m-3 9 3-9m0 0 3-9m-3 9 3-9m0 0 4-9m-4 9 4-9m0 0 3-9m-3 9 3-9m0 0c2-2 3-5 4-9m-4 9 4-9m0 0 5-9m-5 9 5-9m0 0 4-8m-4 8 4-8m0 0 5-9m-5 9 5-9m0 0 4-11m-4 11 4-11m0 0 4-11m-4 11 4-11m0 0 4-10m-4 10 4-10m0 0 2-11m-2 11 2-11\"}),React__namespace.createElement(\"g\",{fillRule:\"evenodd\",strokeLinecap:\"round\"},React__namespace.createElement(\"path\",{fill:\"#FFF6F0\",d:\"m153 288-19-25 21-20 199-5 23 21-24 28-201 3-4-4\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeWidth:\"4\",d:\"M153 290c-4-9-13-13-20-29m19 25c-8-8-15-18-22-23m4-5c2-6 16-15 20-20m-23 22c10-7 18-16 27-22m-5 2 205-1m-203-2c57-1 114-4 201-2m2 3 24 23m-24-24c3 7 11 10 20 21m0 0c-8 6-9 21-24 24m25-20c-3 2-10 8-22 21m-1 4c-70-1-146 1-207 1m208-5c-64 2-131 3-205 3m-1 1s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0\"})),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"#E6E6E5\",strokeLinecap:\"round\",strokeWidth:\"10\",d:\"M455 1003s0 0 0 0m0 0s0 0 0 0m0 0-5-10m5 10-5-10m0 0-5-10m5 10-5-10m0 0-5-10m5 10-5-10m0 0-6-9m6 9-6-9m0 0-5-9m5 9-5-9m0 0-6-8m6 8-6-8m0 0-7-8m7 8-7-8m0 0-6-8m6 8-6-8m0 0-6-7m6 7-6-7m0 0-7-6m7 6-7-6m0 0-7-6m7 6-7-6m0 0-7-6m7 6-7-6m0 0-8-5m8 5-8-5m0 0-8-5m8 5-8-5m0 0-8-5m8 5-8-5m0 0-8-4m8 4-8-4m0 0-8-3m8 3-8-3m0 0-9-3m9 3-9-3m0 0-9-3m9 3-9-3m0 0-9-2m9 2-9-2m0 0-9-2m9 2-9-2m0 0-10-1m10 1-10-1m0 0-10-1m10 1-10-1m0 0h-10m10 0h-10m0 0h-10m10 0h-10m0 0h-11m11 0h-11m0 0-11 1m11-1-11 1m0 0-11 1m11-1-11 1m0 0-12 2m12-2-12 2m0 0-12 2m12-2-12 2m0 0-12 2m12-2-12 2m0 0-12 3m12-3-12 3m0 0 2 8m-2-8 2 8m0 0 1 7m-1-7 1 7m0 0 2 7m-2-7 2 7m0 0 1 7m-1-7 1 7m0 0 1 7m-1-7 1 7m0 0 1 7m-1-7 1 7m0 0v7m0-7v7m0 0v6m0-6v6m0 0v7m0-7v7m0 0v7m0-7v7m0 0v6m0-6v6m0 0v7m0-7v7m0 0-2 12m2-12-2 12m0 0-2 13m2-13-2 13m0 0-3 12m3-12-3 12m0 0-4 12m4-12-4 12m0 0-4 12m4-12-4 12m0 0-5 12m5-12-5 12m0 0-5 12m5-12-5 12m0 0-6 13m6-13-6 13m0 0-6 12m6-12-6 12m0 0-7 12m7-12-7 12\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"#6d6d6d\",strokeLinecap:\"round\",strokeWidth:\"10\",d:\"M185 883s0 0 0 0m0 0s0 0 0 0m0 0 3 14m-3-14 3 14m0 0 3 13m-3-13 3 13m0 0 1 13m-1-13 1 13m0 0 1 13m-1-13 1 13m0 0 1 13m-1-13 1 13m0 0-1 13m1-13-1 13m0 0-1 13m1-13-1 13m0 0-2 12m2-12-2 12m0 0-3 13m3-13-3 13m0 0-3 13m3-13-3 13m0 0-4 12m4-12-4 12m0 0-5 13m5-13-5 13m0 0-6 13m6-13-6 13m0 0-6 12m6-12-6 12m0 0-7 13m7-13-7 13m0 0-8 13m8-13-8 13\"}),React__namespace.createElement(\"g\",{fillRule:\"evenodd\",strokeLinecap:\"round\"},React__namespace.createElement(\"path\",{fill:a,d:\"m148 291-18-30 23-17 206-3 17 19-22 22-204 9v-5\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"transparent\",strokeWidth:\".5\",d:\"M153 289c-5-11-10-12-24-27m21 29c-3-9-9-16-20-30m-1 1c13-6 16-13 26-21m-22 20c5-6 14-14 25-20m-1 2c67-5 137-8 198-6m-199 2c67 3 132 3 203-1m2 1c3 6 15 17 19 19m-23-22c9 12 17 19 21 24m-2 0c-3 9-8 12-15 29m18-29-20 27m-4-1-206 4m209-5c-64 0-131 3-207 2m0 2s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0\"})),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeLinecap:\"round\",strokeWidth:\"4\",d:\"M153 284c-6-2-17-14-22-25m21 29-21-27m4-1c2-7 8-10 21-24m-26 24c8-7 17-12 27-22m-1 1c75-6 140-6 202-3m-201 1c41 4 81 3 202-2m-3-1c10 7 11 8 25 27m-23-23c5 3 8 9 19 24m-1 0c-8 6-10 19-21 23m25-27c-5 6-9 13-24 25m1 2c-64 1-132 2-206-1m207 0c-56 0-112-2-208 2m1 1s0 0 0 0m0 0s0 0 0 0\"}),React__namespace.createElement(\"g\",{fillRule:\"evenodd\",strokeLinecap:\"round\"},React__namespace.createElement(\"path\",{fill:n,d:\"M298 233c-2-10-12-36-12-60 1-24 8-62 13-84s13-37 17-48 7-13 7-16c-1-3-2-2-9-2-7-1-23 1-31-1-9-2-14-9-18-12l-11-6c-3 0 0 0-5 3s-17 12-26 15-19 2-25 2c-7 0-10-4-12-1-1 3 4 13 5 18 2 5 2 2 5 12l11 47 8 62c2 16 4 23 4 32 0 10-4 18-5 25 0 7 0 13 2 17s4 4 12 4l36-3 35-4\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeWidth:\"4\",d:\"M297 236c-1-10-8-38-8-62s5-61 9-83 12-40 16-51c3-11 7-12 7-14-1-3-2-1-8-1-6-1-19-1-27-4-9-2-18-8-23-11s-6-7-8-8c-3 0-2 1-7 4s-14 12-23 15c-9 4-22 4-29 5-6 0-8-3-9-1s2 10 4 14l3 15c3 10 11 29 15 46l7 60c2 15 1 25 1 35l-1 26c0 7-3 14-1 17 2 2 6 0 14 0h34l35-2m1 0c-2-11-10-37-10-61-1-24 4-61 8-83 5-22 13-39 17-51 4-11 9-15 8-18 0-3-5 2-11 1l-24-3c-8-2-17-5-22-8-5-4-6-11-8-12-3-1-3 1-8 4-6 3-15 11-24 14-9 4-24 5-30 6s-7-4-8-1c-1 2 2 10 3 15l4 14 12 48c4 18 11 43 12 59 2 16-2 25-2 35l-1 26c0 8-1 16 1 18 2 3 4-2 12-2l36-1h34\"})),React__namespace.createElement(\"g\",{fillOpacity:\".8\",fillRule:\"evenodd\",strokeLinecap:\"round\",strokeOpacity:\".8\"},React__namespace.createElement(\"path\",{fill:n,d:\"M293 232c-1-10-6-38-5-61 1-24 7-58 11-80 4-21 12-38 15-50 4-12 9-17 8-19-1-3-9 6-16 5-6 0-13-6-21-8s-20-2-25-4c-5-3-3-12-6-13s-6 5-11 8c-5 2-10 5-18 7s-26 3-32 5c-7 2-5 4-6 7l3 9c0 4-1 2 1 14 2 11 6 35 11 53 4 17 14 37 16 52 2 14-4 26-5 36 0 10 3 16 3 24s-5 21-3 24 9-4 17-5c9-2 20-2 31-2l35-1\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",d:\"M298 234c-1-11-11-36-12-60 0-24 5-62 9-84s11-36 15-47 11-14 11-17c1-3-2 1-9 0l-31-8c-9-3-15-3-20-6-4-3-6-12-9-12s-1 6-6 9-14 8-23 11l-29 4c-6 1-7-1-8 1-1 3-1 10 1 14 1 5 5 3 8 13s5 30 9 48c3 17 9 41 11 57 2 17 2 30 2 40l-2 23c-1 7-3 15-1 18 3 2 7-1 14-1 8 0 21 3 32 2 12 0 29-6 35-6m1 6c-1-10-12-37-12-62a493 493 0 0 1 26-139c4-10 9-8 9-10-1-2-5-2-11-3s-19-1-27-3l-22-11c-4-3-1-6-3-7-2 0-3 3-8 5-6 3-16 11-25 13-8 2-18 0-24 0-6 1-11-1-12 1-1 3 4 11 6 16 2 4 2 0 4 11l8 52 7 56c2 16 2 30 2 41l-2 21c0 6 2 11 4 13 3 3 3 0 11 1l34 3 33 1\"})),React__namespace.createElement(\"g\",{fillOpacity:\".8\",fillRule:\"evenodd\",strokeLinecap:\"round\",strokeOpacity:\".8\"},React__namespace.createElement(\"path\",{fill:t,d:\"M298 233c-1-10-10-35-10-59 0-23 6-60 10-83 5-23 13-41 16-52l4-13c0-3 0-3-6-3-5-1-21 1-29-1-9-2-15-8-20-11l-11-8c-3-1 1-1-4 2l-25 13-27 9c-6 1-8-4-9-3-1 2 0 9 1 14s0 7 4 18c3 10 12 25 16 43 4 17 6 43 7 59 2 16 2 25 2 36l-2 28c-1 7-1 12 1 14s4-1 12-1l33 1 37-3\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeWidth:\"4\",d:\"M297 235c-2-10-10-37-10-61-1-24 5-60 9-82 5-22 14-40 18-51s8-13 7-16c0-3-4-2-11-3-6 0-18 0-26-2s-17-7-22-10-6-7-8-7c-3-1-2 1-7 3-5 3-15 10-23 13-9 4-22 5-28 6-7 1-9-2-10 0s3 9 4 13l3 15c3 10 10 28 14 46s8 45 10 61v35l-2 25c0 7-3 14-1 17s6 1 13 1l33-2 37-1m-1-1c-3-10-11-35-11-59 1-24 9-62 14-85 4-23 12-40 15-51l6-17c-1-2-3 3-9 2a123 123 0 0 1-50-15c-5-3-3-7-5-7-3-1-3 1-8 4s-15 11-24 14-23 4-30 5c-6 1-8-3-8-1-1 2 3 9 4 14l3 14c3 10 11 30 15 48l8 61c1 16 0 25-1 35l-1 24c0 7-1 16 1 19s4-1 11-2l34 1 37-3\"})),React__namespace.createElement(\"g\",{strokeLinecap:\"round\"},React__namespace.createElement(\"path\",{fill:a,d:\"M256 36c3 0 6 2 8 5s4 9 4 13l-3 12c-2 4-5 7-8 8s-6 1-8-1c-3-2-6-6-7-10s-2-9-1-13 4-8 6-10c2-3 7-4 8-4 2-1 1 1 1 1m1-1c3 0 6 4 8 7l3 12c0 5-2 10-4 13-1 3-4 6-7 7-3 0-8-1-10-4-3-2-5-6-5-10V48c1-4 4-8 6-10 3-2 7-2 9-2v1\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeWidth:\"4\",d:\"M252 37c2-1 7-1 9 1l5 10c1 4 2 9 1 13s-4 8-6 11c-3 2-6 3-8 2-3 0-7-3-9-6s-3-8-3-12c-1-4 1-10 3-13s7-5 8-6v-1m0 0c2-1 6 0 9 2 2 2 5 6 6 10v14c-1 4-4 7-6 9-3 2-6 4-9 3-3 0-6-3-8-7-2-3-4-8-4-12s2-9 4-12l8-7v1\"})),React__namespace.createElement(\"g\",{fillRule:\"evenodd\",strokeLinecap:\"round\"},React__namespace.createElement(\"path\",{fill:\"hsla(30, 2%, 62%, 1)\",d:\"m275 624-12-21c-4-9-7-22-12-30s-12-12-19-18l-23-19c-6-4-10-2-12-5-2-4 0-5 0-16l4-53 8-154c2-28-1-14 2-16s8 3 16 3c7 0 25-6 30-3s-3-3-2 22l7 125 9 187\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeWidth:\"4\",d:\"m273 626-9-24c-4-9-6-18-11-26l-21-23-23-14c-5-4-9-4-11-7-2-4-2-2-2-14l3-57 9-154c1-28-1-11 2-13 3-3 11 0 18 0 8-1 25-5 29-2s-3-5-2 19l7 127 12 187m0 0-11-25c-4-9-6-18-11-26-5-7-13-14-21-20-7-6-18-11-23-15-6-3-7-1-9-5s-2-5-2-17c-1-12-1-21 1-56l11-152c3-28-1-14 2-16s10 2 17 2c8-1 24-6 28-4 4 3-2-5-1 19l6 127 14 188\"})),React__namespace.createElement(\"g\",{fill:\"none\",fillRule:\"evenodd\",strokeLinecap:\"round\"},React__namespace.createElement(\"path\",{stroke:i,strokeWidth:\".3\",d:\"M208 292s0 0 0 0m0 0s0 0 0 0m0 3 1-1m-1 1 1-1m-1 5 2-4m-3 4 3-4m-3 5c2 0 2-3 7-6m-6 7c0-2 3-3 5-6m-8 12c4-5 5-8 13-14m-11 12c3-5 6-8 9-10m-11 11c3 3 8-2 12-11m-10 13 11-15m-14 16c5-9 13-9 16-17m-11 19c1-5 6-8 13-15m-13 17c3-2 8-15 16-22m-19 22 18-17m-17 20 20-19m-18 22c4-10 12-18 19-26m-18 30c0-12 13-21 17-33m-19 29c6-6 9-13 20-24m-18 29c7-7 10-19 19-31m-23 30c8-8 18-19 25-29m-25 34c13-16 18-21 32-31m-31 31c6-12 16-20 27-35m-28 41c11-11 11-20 33-40m-34 36 35-36m-36 37c18-13 30-31 39-40m-37 42c9-9 21-21 33-40m-36 41c20-9 29-31 42-44m-40 48c11-11 21-21 38-43m-41 45c13-11 21-22 48-44m-44 43 41-45m-42 52c12-20 34-34 46-52m-47 49c13-13 27-25 46-49m-46 54c9-18 21-31 51-52m-48 51 46-55m-46 60c15-16 25-38 44-62m-48 59c14-15 30-30 50-56m-47 63c12-15 23-27 46-63m-47 61 50-59m-48 64c19-26 40-50 50-61m-53 58 54-62m-52 69c15-21 37-46 48-61m-49 58 54-63m-54 68c15-20 30-40 51-61m-50 59c16-23 35-44 50-59m-51 64c11-14 24-27 48-59m-48 57 51-62m-55 65c16-13 24-25 57-57m-55 57c12-11 22-27 53-60m-50 61c21-18 40-42 54-60m-56 61 54-59m-55 60c20-11 35-28 51-60m-49 63c16-18 30-39 50-62m-52 63c13-16 30-27 51-62m-51 65c14-19 29-33 53-61m-55 60c18-13 30-25 59-56m-57 60c12-13 28-30 53-62m-56 63c27-18 46-44 60-62m-59 64c17-14 33-31 58-61m-52 66c20-27 41-51 54-68m-56 65c8-14 24-26 52-60m-54 62c19-16 34-31 58-60m-59 62 56-63m-55 70c15-26 32-41 51-67m-52 63c21-22 42-47 57-60m-53 65c12-15 21-26 48-67m-50 65c11-15 22-28 54-60m-54 64c12-20 33-39 51-60m-53 61c17-20 36-44 57-65m-59 66c15-11 23-23 56-65m-52 68c11-18 25-32 54-65m-54 69c20-25 39-41 51-64m-51 63c17-20 35-41 55-67m-58 68c23-21 43-45 59-66m-58 66c15-19 30-37 57-65m-55 72c18-21 37-44 54-69m-56 68 55-65m-57 68c20-24 41-45 59-63m-57 60c19-21 36-39 56-65m-55 68c14-17 28-26 58-65m-61 66 57-65m-54 69c17-16 26-33 57-68m-59 66c18-22 40-43 58-64m-55 72c12-15 19-34 57-72m-61 71 60-68m-61 67c23-20 43-41 61-61m-60 62c18-19 34-37 58-67m-59 70c14-18 35-35 64-66m-64 68c24-27 43-48 58-67m-55 67c20-23 46-52 54-63m-54 67c19-26 37-45 58-68m-57 73c11-20 33-44 56-72m-58 68c14-17 31-32 59-67m-61 71c20-16 41-36 60-69m-57 71c21-27 41-50 59-68m-57 73c18-22 30-41 59-72m-61 69 60-70m-59 73c11-20 28-36 57-71m-61 73c21-23 40-44 62-72m-58 74c12-18 32-40 56-67m-58 66c15-19 32-37 57-70m-56 72 56-67m-59 70 61-70m-63 76c26-29 50-63 60-77m-56 74 61-72m-64 77c15-20 36-36 64-77m-62 73c22-26 49-52 62-71m-62 77c15-15 27-38 59-75m-60 73 62-71m-60 75c17-20 30-33 57-74m-60 73c15-15 33-33 64-71m-65 78c14-21 30-42 67-75m-64 71c16-15 29-33 60-70m-62 78c21-28 33-46 60-79m-61 74c23-23 42-49 63-71m-65 78c24-33 47-53 70-75m-66 71c26-27 53-57 61-73m-63 76c24-21 39-47 61-69m-60 69 64-72m-65 74c13-15 30-35 64-68m-63 70c19-19 35-37 65-71m-64 73c24-21 41-48 60-71m-63 71c25-29 50-56 65-71m-62 73c19-18 35-39 60-74m-62 76c15-19 33-39 64-71m-66 78c18-27 41-43 71-73m-69 71c26-29 53-58 64-74m-62 80c17-28 37-51 66-78m-68 76c15-17 25-32 66-78m-68 80c22-17 34-37 64-75m-63 73 67-71m-69 75c23-26 49-48 66-73m-64 74c12-15 26-32 66-77m-68 79c20-16 30-33 68-75m-64 76 65-77m-70 84c19-15 29-35 73-79m-71 77c26-32 51-57 70-79m-71 82c24-20 36-44 73-77m-71 76c21-28 47-54 69-77m-68 82c17-26 38-50 66-76m-67 75c16-23 35-40 67-78m-64 79c19-22 43-49 69-76m-73 76 69-76m-70 83c27-31 53-60 69-81m-67 80c19-22 34-43 67-78m-65 83c16-24 36-46 69-83m-72 79c20-24 41-51 70-76m-68 81c25-35 55-64 64-79m-65 75c27-29 54-56 67-75m-64 79c21-31 41-51 63-81m-65 80c17-17 33-31 69-74m-70 79c19-21 29-36 66-80m-64 79 65-76m-60 79c12-22 35-42 63-79m-64 74 65-73m-61 77c19-27 35-47 59-72m-63 73c23-28 43-52 65-76m-61 75c11-22 34-43 58-72m-62 71c20-18 36-39 64-68m-63 68 62-65m-60 68c11-16 26-33 59-70m-59 69c16-14 28-29 57-67m-53 70 57-68m-53 72c11-25 23-35 51-71m-56 67c15-19 33-37 56-66m-50 70c20-30 39-55 52-64m-55 62 55-65m-50 66c12-17 25-27 46-65m-50 64c20-24 36-46 54-60m-52 59c20-16 37-33 56-60m-58 60c18-18 32-35 52-57m-49 60 52-58m-50 57c14-15 26-32 47-57m-44 61c9-19 25-29 43-56m-46 52c19-19 34-35 49-55m-47 57c10-7 16-24 44-51m-44 51c16-15 29-34 46-52m-47 54c12-17 27-30 49-55m-46 54c10-13 23-26 45-51m-47 56c19-25 39-40 44-52m-40 50c18-22 34-40 43-53m-41 52c5-11 19-22 43-44m-45 44c11-10 20-22 42-47m-41 49c14-10 21-18 44-51m-42 50 43-48m-39 50 37-47m-38 48c8-14 18-22 40-46m-39 50c4-9 15-25 35-48m-35 43c10-13 23-26 38-41m-33 45c12-23 30-32 31-47m-35 44c14-14 28-31 36-41m-36 43c9-13 24-22 39-42m-37 41c11-14 26-25 33-39m-30 46c8-13 18-24 34-40m-36 37 33-39m-33 43c18-22 24-32 35-44m-35 40c9-8 19-16 35-36m-29 35c3-3 12-19 29-30m-34 31c13-9 22-20 36-33m-33 40c11-12 24-31 31-40m-31 39c8-12 18-20 29-38m-24 40c3-10 13-19 26-39m-28 35c3-5 13-14 29-31m-27 37c11-13 18-26 27-36m-30 33 28-33m-24 30c9-8 20-15 21-28m-23 33c7-8 14-14 28-31m-25 33c7-10 8-18 24-29m-26 27 25-30m-23 30c11-9 15-19 20-30m-18 32c4-8 11-13 22-28m-24 27c13-8 21-19 24-25m-24 26c10-6 18-17 25-26m-26 25c10-7 18-8 23-18m-20 23c9-9 17-20 23-27m-20 28c10-12 14-19 20-24m-21 23c6-4 8-10 21-24m-20 23c7 0 12-9 16-17m-17 19c8-6 16-16 20-20m-14 20c3 1 2-8 12-17m-14 20c5-7 8-12 18-21m-21 26c10-10 14-16 19-26m-15 21c4-6 12-12 15-17m-14 21c3-6 9-11 13-19m-13 18c3-6 11-14 15-19m-15 24c0-6 5-15 14-21m-16 17c7-6 13-14 17-19m-13 22c1-5 8-11 16-17m-19 18c4-4 8-7 15-16m-12 16c7-1 10-7 17-19m-16 19c5-7 10-10 14-15m-15 20c5-5 3-10 16-19m-15 17 14-17m-15 21c6-4 10-11 13-14m-12 14c4-4 7-7 12-16m-11 16c5-7 11-9 9-17m-10 17c6-5 9-9 16-12m-10 13c-4-2 4-4 8-10m-12 13 11-15m-11 13c2-4 9-3 13-10m-11 11 9-12m-9 14c0-1 5-1 13-14m-14 17c5-6 5-8 12-12m-13 11 15-9m-12 9 11-11m-10 17c2-9 6-13 8-16m-9 13 10-10m-9 13 10-12m-9 11 8-10m-9 11c3-3 8-4 8-9m-7 11 9-10m-6 13c-2-3 1-4 7-9m-10 7c4-2 6-3 9-8m-8 10c5-1 6-4 7-6m-6 6 6-7m-4 8c0 2 2-1 4-3m-6 5 6-5m-5 6c2 0 3-2 5-4m-4 4 4-4m-3 8 3-5m-3 4 4-4m-3 7 2-4m-3 4 3-5m-2 6 3-3m-3 3 3-3m-2 5 1-2m-1 2 2-2m-1 4 1-1m-1 1 1-1\"}),React__namespace.createElement(\"path\",{stroke:\"transparent\",strokeWidth:\".5\",d:\"m275 627-11-23c-4-9-10-23-15-31s-10-11-17-17l-24-19c-6-3-8 2-10-1-2-4-3-7-3-19l3-56 10-153c2-27-4-11 0-14 3-2 15-1 22-1 8 0 19-3 23-1 5 3 1-6 2 18l8 131 11 184m-2 1-9-26c-3-8-3-18-8-25-6-7-16-10-23-16s-14-18-19-22c-6-4-10 1-12-2-3-4-3-9-4-21-1-13-4-20-2-54 1-35 7-127 9-155s0-10 4-12c5-2 16 2 24 2 8-1 22-8 25-4 4 3-2 0-1 25 0 25 2 74 6 125 3 52 12 152 13 183\"})),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeLinecap:\"round\",strokeWidth:\"4\",d:\"m275 627-13-26c-4-9-5-17-10-25s-12-15-19-21l-23-15c-6-3-9-3-11-7-3-4-3-4-3-16l4-55 8-154c1-28-1-12 3-14 3-3 10 0 18 0 7 0 23-5 28-2 4 4-1-3 0 21l6 127 12 186m-1 0-10-24c-3-9-8-20-13-28s-11-13-18-19l-25-18c-5-3-6-2-8-5s-3-1-3-13c-1-12 0-22 2-57l10-155c2-28-4-12-1-14 4-2 13 1 20 2 8 0 22-3 27 0s1-7 2 18l5 126c3 52 12 155 13 186\"}),React__namespace.createElement(\"g\",{fillRule:\"evenodd\",strokeLinecap:\"round\"},React__namespace.createElement(\"path\",{fill:n,d:\"M273 611c1-4 5-21 9-31 5-10 12-22 18-29 6-8 11-12 18-18 7-5 20-9 24-15 3-5 0 13-5-17l-24-161c-4-31-4-17-5-23-1-7 1-12 1-17-1-4-2-9-4-10s-4 4-8 4l-17-2-15 1c-5 0-11 1-12 3s5 2 6 9c0 6-4-7-2 31 1 38 10 160 12 198l1 31 3 45\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeWidth:\"4\",d:\"M270 610c2-5 6-21 11-30 5-10 11-21 17-29l22-18c7-6 18-8 21-14 2-6 2 9-3-21l-25-158-4-25v-14c-1-3-2-7-4-9s-5-1-9-1l-16 2-13 1c-5 0-9-2-11 0-1 2 2 5 2 12 0 8-2-6 0 32l9 197 2 28 2 47m1 2c1-6 4-24 8-34s10-18 17-26 17-16 24-22c6-5 15-6 18-11s5 12 0-18l-25-163c-5-31-1-18-2-23l-5-12c-1-4 0-10-2-12-1-2-5 0-9 1l-17 1h-12c-4 0-10-2-11 1-2 2 2 4 3 11 0 8-2-7 0 31l10 199c2 38-1 16-1 28l1 47\"})),React__namespace.createElement(\"g\",{fill:\"none\",fillRule:\"evenodd\",strokeLinecap:\"round\"},React__namespace.createElement(\"path\",{stroke:i,strokeWidth:\".5\",d:\"m254 299 7-5m-7 5 7-5m-4 8 4-8m-4 8 4-8m-7 11c4-4 6-4 12-11m-12 11 12-11m-9 13c4-2 4-6 9-13m-9 13 9-13m-11 17c2-5 8-9 17-17m-17 17 17-17m-14 19 14-19m-14 19 14-19m-17 22 23-23m-23 23 23-23m-20 26 20-26m-20 26 20-26m-23 30c10-13 21-22 28-29m-28 29c8-11 17-19 28-29m-25 31c7-9 18-20 25-31m-25 31 25-31m-28 34 33-35m-33 35 33-35m-30 38c9-11 18-20 30-38m-30 38 30-38m-32 41 38-41m-38 41 38-41m-35 43c13-14 27-30 35-43m-35 43 35-43m-38 46c9-10 21-25 44-47m-44 47 44-47m-41 50c11-16 24-32 41-50m-41 50 41-50m-43 53c16-16 32-33 46-51m-46 51c12-16 28-30 46-51m-43 54 43-54m-43 54c9-13 19-24 43-54m-46 57c21-21 37-42 51-56m-51 56 51-56m-48 58c11-12 23-26 48-58m-48 58 48-58m-51 62 53-58m-53 58c14-14 25-29 53-58m-50 61c17-23 38-42 50-61m-50 61 50-61m-53 64 53-59m-53 59c20-21 39-41 53-59m-50 61c16-15 29-35 50-61m-50 61 50-61m-53 64 54-58m-54 58c13-12 24-26 54-58m-51 61 51-61m-51 61 51-61m-53 64c18-21 39-39 54-59m-54 59c20-21 39-41 54-59m-51 62c15-20 33-42 51-62m-51 62c18-23 35-45 51-62m-54 65 54-59m-54 59c17-21 35-41 54-59m-51 61c18-20 34-39 51-61m-51 61 51-61m-53 64c14-17 30-31 54-59m-54 59 54-59m-51 62 51-62m-51 62 51-62m-55 66c22-21 40-43 56-61m-56 61 56-61m-53 63c18-19 34-38 53-63m-53 63 53-63m-55 66 55-60m-55 60c20-24 42-48 55-60m-52 63c12-18 27-32 52-63m-52 63 52-63m-55 66 55-61m-55 61c15-17 33-35 55-61m-52 64c15-18 32-36 52-64m-52 64 52-64m-54 67c16-16 30-34 56-62m-56 62 56-62m-53 64c15-16 26-31 53-64m-53 64c12-14 23-30 53-64m-56 67c17-15 33-32 57-62m-57 62 57-62m-54 65c16-23 35-44 54-65m-54 65 54-65m-57 68c23-24 47-48 58-63m-58 63c18-18 35-38 58-63m-55 66c12-16 26-31 55-66m-55 66 55-66m-58 69c16-14 31-34 58-63m-58 63c15-18 31-34 58-63m-55 66 55-66m-55 66c12-13 24-27 55-66m-58 69c21-22 44-46 59-64m-59 64 59-64m-56 67c20-27 40-49 56-67m-56 67 56-67m-58 70 59-65m-59 65c14-16 28-33 59-65m-56 67c21-26 43-55 56-67m-56 67c15-20 33-40 56-67m-59 70 59-65m-59 65c23-23 44-49 59-65m-56 68 56-68m-56 68c13-14 25-29 56-68m-58 71c22-23 44-46 60-66m-60 66 60-66m-57 69c16-18 29-38 57-69m-57 69c17-23 36-44 57-69m-60 72c12-15 26-28 61-67m-61 67c12-15 26-28 61-67m-58 69 58-69m-58 69 58-69m-61 73c13-16 30-35 61-67m-61 67 61-67m-58 70c20-22 39-48 58-70m-58 70c20-24 38-48 58-70m-61 73c17-23 37-45 62-68m-62 68c18-18 34-37 62-68m-59 70 59-70m-59 70 59-70m-61 73c22-22 44-46 62-69m-62 69c16-17 33-35 62-69m-59 72 59-72m-59 72c13-18 27-34 59-72m-62 75c21-24 42-43 62-69m-62 69c23-26 46-53 62-69m-59 72 59-72m-59 72 59-72m-62 75c21-21 40-46 64-70m-64 70c14-14 27-28 64-70m-61 72c15-15 28-30 61-72m-61 72 61-72m-63 75c15-16 30-31 64-70m-64 70 64-70m-61 73 61-73m-61 73 61-73m-65 77 66-72m-66 72 66-72m-62 74c17-20 34-43 62-74m-62 74c20-22 39-46 62-74m-65 77 65-72m-65 72 65-72m-62 75 62-75m-62 75 62-75m-65 78c19-18 33-39 66-73m-66 73 66-73m-63 76c19-20 38-42 63-76m-63 76 63-76m-65 79c22-23 45-48 66-74m-66 74 66-74m-63 76c23-26 43-51 63-76m-63 76 63-76m-66 79c20-20 36-41 67-73m-67 73 67-73m-64 76c18-22 37-42 64-76m-64 76c18-19 33-40 64-76m-67 79 68-74m-68 74 68-74m-65 76c13-16 28-31 65-76m-65 76 65-76m-68 80 69-75m-69 75 69-75m-66 78c26-33 50-64 66-78m-66 78 66-78m-68 81c19-24 37-43 68-76m-68 76 68-76m-65 78c12-16 27-35 65-78m-65 78 65-78m-68 82c15-15 28-34 69-77m-69 77 69-77m-66 79 66-79m-66 79 66-79m-69 82c23-27 49-53 70-77m-70 77 70-77m-67 80c16-19 33-42 67-80m-67 80 67-80m-69 83 70-77m-70 77c23-26 47-50 70-77m-67 79c12-17 28-32 67-79m-67 79 67-79m-70 82 71-77m-71 77c17-15 32-32 71-77m-68 80c14-16 29-32 68-80m-68 80c16-17 30-36 68-80m-71 84c17-22 34-40 72-80m-72 80c20-24 42-48 72-80m-69 82c16-22 35-42 69-82m-69 82 69-82m-72 85 73-80m-73 80c20-19 37-40 73-80m-70 83c27-28 50-60 70-83m-70 83c16-18 30-38 70-83m-72 86c19-21 39-41 72-80m-72 80c15-19 34-38 72-80m-69 83c24-28 51-58 69-83m-69 83 69-83m-72 86c19-21 38-46 73-81m-73 81 73-81m-70 83 70-83m-70 83 70-83m-73 86c9-7 13-13 32-33m-32 33c14-13 25-26 32-33m-28 36c11-11 18-24 28-36m-28 36 28-36m-1-1 43-47m-43 47c12-15 25-29 43-47m-40 49c13-13 20-25 40-49m-40 49c7-10 15-20 40-49m-73 87c2-5 9-7 13-12m-13 12 13-12m-10 15c1-4 6-10 10-15m-10 15c4-6 6-11 10-15m39-48c7-5 12-13 22-22m-22 22 22-22m-19 24c9-6 12-17 19-24m-19 24c7-7 13-16 19-24m-74 88 10-8m-10 8 10-8m-7 11c2-3 3-7 7-11m-7 11 7-11m53-65 12-10m-12 10 12-10m-9 13c4-4 6-8 9-13m-9 13 9-13m-75 89 7-5m-7 5 7-5m-4 8 4-8m-4 8 4-8m-7 11 4-1m-4 1 4-1m-1 3 1-3m-1 3 1-3\"}),React__namespace.createElement(\"path\",{stroke:\"transparent\",d:\"M271 612c2-5 5-23 10-32 4-10 11-18 17-26l22-22c7-6 17-7 20-13 3-5 3 11-1-19l-27-159c-5-31 0-19-1-26l-4-13c-1-3 1-8-1-10-2-1-5 1-10 2l-16-1-13 2c-4 0-9-3-11-1-1 3 1 7 1 14s-2-9 0 29l10 200 2 25 1 49m-1 1c2-5 6-21 11-31 4-10 11-21 17-29 7-8 16-13 23-19 8-5 19-8 22-13 4-6 3 9-2-21l-28-160c-5-31-1-18-2-24l-2-10c0-4 1-8-1-10s-6 0-10 0l-18-2-12 1c-4 0-9-2-11 0s1 7 2 14c0 7-2-9 0 30l8 200c2 38 1 12 2 24l4 49\"})),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeLinecap:\"round\",strokeWidth:\"4\",d:\"m270 610 10-30a129 129 0 0 1 39-49c8-6 18-7 21-12s2 10-3-20l-24-160c-5-31-4-18-5-25l-1-13c0-4 1-7-1-8-2-2-6-1-10-1h-16l-14 1c-4 1-9-1-11 1s0 4 1 11l1 32 10 198 1 27 3 48m1 2c2-5 3-24 7-33 5-10 11-18 18-26 6-8 16-16 23-21 7-6 16-7 19-13 3-5 3 8-1-21l-24-157c-5-31-2-21-3-27-2-7-5-8-6-11 0-4 4-9 2-11-1-1-6 1-11 1l-17-1h-12c-4 1-11 0-13 3-2 2 1 5 2 13l2 31 8 196c2 37 3 14 4 27v48\"}),React__namespace.createElement(\"g\",{fillRule:\"evenodd\",strokeLinecap:\"round\"},React__namespace.createElement(\"path\",{fill:t,d:\"m273 624-10-21c-4-8-7-18-12-26s-11-17-19-23c-7-5-21-9-27-12-5-4-5-5-7-9-2-3-5-1-5-13 0-11 3-22 5-57l6-153c2-28 1-14 5-17s10-1 17 0c8 0 25 0 29 3 5 3-1-7 0 16l4 127c3 53 8 159 11 189\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeWidth:\"4\",d:\"m272 627-11-25c-4-8-6-19-11-26-5-8-12-14-19-20s-18-13-24-16c-6-4-7-3-9-7-3-3-4-4-4-15l3-56 10-153c2-27-2-12 2-14 3-3 11 0 19 0s23-4 27-1c5 3-1-4-1 20l6 125 12 187m-2 1-10-23c-4-9-6-19-11-27s-11-14-18-20c-6-6-16-13-22-17-6-3-11-1-13-4-3-4-2-4-2-16l2-59 9-153c3-28 1-12 5-14 3-2 11 2 19 2 7 0 21-6 25-3 5 3 0-4 1 20 0 25 1 77 4 129l13 184\"})),React__namespace.createElement(\"g\",{fill:\"none\",fillRule:\"evenodd\",strokeLinecap:\"round\"},React__namespace.createElement(\"path\",{stroke:i,strokeWidth:\".3\",d:\"M207 292s0 0 0 0m0 0s0 0 0 0m1 3v-1m0 1s0 0 0 0m0 4c0-1 0-2 2-3m-3 3 3-3m-4 5c1-1 6-2 7-6m-5 7c0-2 2-3 4-6m-4 8c1-4 5-6 7-11m-9 12c4-2 5-5 10-9m-11 16c2-6 7-13 10-14m-9 9c2-3 9-7 11-13m-9 17c2-3 9-12 17-13m-19 13c8-7 11-11 13-16m-16 19 24-17m-21 17c8-6 13-13 19-19m-16 23c1-6 7-13 15-24m-17 23c4-5 10-15 18-23m-23 32c7-13 13-22 30-31m-26 28c7-10 12-18 23-28m-25 28c14-8 20-23 30-27m-28 30c7-12 19-20 28-32m-27 31c7-9 22-24 25-33m-25 38c10-17 22-28 28-37m-29 35c10-4 17-11 31-30m-33 34c12-12 21-23 32-38m-33 40c17-9 26-28 35-37m-34 39c12-12 17-19 34-43m-30 46c10-11 23-28 37-48m-39 46 38-43m-42 44c12-10 22-16 46-42m-42 43c10-9 22-22 40-45m-44 51c14-11 31-26 48-54m-44 52c10-15 25-29 44-48m-44 54c12-15 24-27 43-55m-43 55 44-56m-47 58c21-18 42-45 49-60m-46 61c12-17 27-35 47-58m-46 59c14-17 28-37 50-55m-51 56c14-18 29-38 51-58m-53 62c15-19 29-37 52-60m-50 57c17-16 31-35 53-59m-53 63c20-19 37-40 48-58m-49 59c21-26 42-49 53-59m-53 60c8-13 19-28 54-61m-54 63 53-61m-53 66 47-64m-48 63 54-62m-54 66c23-25 38-48 52-59m-54 60c13-13 23-26 53-64m-54 66c12-16 30-30 56-62m-55 63c17-15 30-34 53-62m-52 65c16-23 27-39 51-64m-52 62c20-22 42-45 53-61m-52 63c10-16 31-35 55-63m-57 66c12-12 24-25 57-64m-55 63c21-13 36-40 53-57m-54 62c15-15 27-30 54-65m-55 67c24-18 41-38 58-60m-56 61 52-66m-54 63c20-18 45-44 59-58m-59 64c17-19 34-35 56-66m-56 67c20-19 42-46 54-61m-51 60c12-17 30-33 52-59m-55 64c19-17 31-33 60-66m-58 67c15-21 34-42 53-65m-56 69c21-31 47-52 61-65m-59 61 57-60m-56 63c24-24 40-45 53-65m-55 67c14-15 26-27 55-65m-53 68c15-21 36-42 55-62m-55 64c14-18 32-39 56-65m-54 67c14-15 24-32 49-62m-52 62 55-65m-58 66c17-22 36-38 57-61m-53 64c21-24 42-50 54-67m-54 70c13-15 25-35 56-63m-57 62 57-64m-60 70c15-22 38-41 55-70m-54 68c15-18 34-36 57-65m-59 64c13-13 29-28 59-63m-56 69c18-24 36-42 56-67m-60 64c21-18 45-42 61-65m-56 70c16-22 29-37 55-67m-54 68c14-17 30-32 54-64m-57 66c14-14 28-32 60-67m-62 68c16-18 32-34 57-66m-55 65c16-15 32-32 58-63m-58 71c13-21 34-44 60-66m-61 63c23-24 44-52 60-66m-57 69c8-19 29-31 58-68m-58 67c17-18 32-41 56-66m-61 68c15-12 33-27 60-65m-57 68c16-14 31-34 59-67m-55 71c9-19 24-31 59-69m-61 70c14-21 30-36 57-69m-58 74c17-24 34-41 56-73m-57 69c20-25 43-48 59-68m-57 73c16-20 34-37 56-71m-58 69c19-22 38-45 62-69m-63 72c18-19 36-44 60-68m-60 70c17-22 35-41 62-71m-60 74c12-17 31-39 62-67m-62 67c22-25 41-53 58-73m-57 76c21-25 42-46 58-73m-59 71c10-11 24-26 58-67m-62 69c14-9 29-26 60-70m-57 74c25-29 45-56 59-74m-60 79c16-25 34-43 61-77m-61 75c11-16 26-33 61-74m-62 74c15-8 25-25 64-71m-62 72c22-26 43-48 60-71m-63 79 65-76m-61 74c16-26 37-50 58-72m-63 73c18-19 28-35 64-68m-60 67c13-18 33-35 60-68m-63 73c16-12 25-32 60-72m-59 73c21-25 39-48 64-73m-66 77c24-30 48-52 63-76m-63 73c23-23 43-46 66-72m-66 77c14-16 31-27 68-72m-67 73c19-23 36-44 64-73m-67 73c21-24 47-50 68-72m-66 74 64-75m-66 77c23-23 43-51 70-74m-65 73c11-14 29-31 64-70m-65 73c16-14 32-33 65-72m-64 74c21-27 44-53 63-76m-62 83c22-34 45-56 59-80m-62 78 65-75m-67 77c26-28 51-53 70-75m-68 73c12-12 27-31 66-75m-66 78c24-27 45-55 63-77m-64 81 66-76m-65 74c27-27 49-51 63-77m-61 81 64-75m-64 79c19-28 52-55 61-79m-62 79c22-28 43-50 65-77m-65 75c19-19 41-46 64-73m-64 75c21-27 45-54 66-76m-65 81c20-26 52-63 64-77m-67 77c26-27 49-55 67-77m-69 76c26-19 39-41 69-71m-65 74 65-77m-64 83c16-26 34-48 68-82m-70 80c12-16 26-33 66-77m-69 77c26-28 47-50 73-71m-70 74c25-28 52-62 67-76m-69 79c24-24 52-57 71-76m-69 75c18-26 42-51 65-79m-65 82c18-17 40-37 71-81m-69 81c18-24 39-49 64-77m-63 81c17-29 43-54 67-80m-67 76c18-19 36-41 64-73m-66 76c22-24 41-44 66-74m-63 74c11-19 26-32 64-73m-60 78c21-34 46-57 56-77m-59 71c23-26 48-57 62-71m-64 74c20-20 34-31 68-74m-66 73c22-22 43-45 64-71m-58 69c19-21 37-46 55-66m-58 69c22-24 43-48 59-69m-54 75c17-24 37-47 54-72m-55 68c12-21 32-39 55-67m-54 65c14-13 29-36 54-59m-54 64c15-23 32-43 56-67m-55 67c13-18 34-35 52-66m-52 67c13-18 30-37 53-64m-51 63c12-21 25-33 56-60m-58 61c14-14 27-28 53-62m-54 64c20-24 41-46 58-65m-55 64 53-61m-52 64c14-18 24-37 52-61m-49 58c16-20 36-43 50-57m-53 61c13-17 30-29 50-63m-47 60c13-15 21-28 50-55m-49 58c13-16 20-28 50-57m-49 54 46-54m-47 55c19-16 36-39 50-48m-47 50c13-16 31-37 46-51m-44 56c11-20 32-41 41-57m-43 51c19-18 37-37 47-51m-46 53c11-10 16-24 46-51m-44 53c15-18 31-35 41-51m-42 53c15-13 25-29 40-52m-38 51 41-49m-37 50c11-20 33-34 39-50m-39 48c14-15 25-32 38-45m-40 46c17-14 32-33 43-39m-40 40c6-10 20-24 35-42m-38 45c15-12 25-31 40-44m-37 41c11-10 23-23 36-40m-37 42c13-10 31-31 39-41m-34 42 35-41m-34 39c5-6 15-17 34-33m-34 38c5-13 16-21 31-43m-31 41c12-5 23-20 35-38m-36 38c15-13 24-27 36-37m-37 43c12-10 21-20 38-37m-33 34c11-11 19-25 30-37m-27 36c4-8 18-21 26-35m-28 37c7-7 14-16 28-37m-30 36c14-4 19-16 35-27m-31 31c11-15 23-28 28-33m-27 30c12-10 20-21 27-27m-30 30c10-9 21-23 30-34m-25 37c6-7 15-17 27-35m-28 34c6-11 14-19 27-30m-26 27c9-8 16-18 21-23m-22 28 24-31m-22 32c6-9 19-20 23-26m-25 27c8-7 13-17 25-28m-26 30c13-8 16-15 24-28m-22 26 26-24m-21 25 19-22m-20 24c7-11 16-21 22-28m-21 30 19-25m-21 23c10-8 16-17 24-23m-23 25c9-3 9-12 25-26m-24 27c7-8 9-13 21-25m-17 29c0-9 6-13 18-26m-18 24c4-8 11-17 16-21m-19 19c8-4 17-15 23-22m-21 25c3-3 6-10 18-20m-18 20c7-3 10-15 19-20m-17 20c4-5 6-9 16-17m-19 20c6-6 9-13 17-17m-15 16c6-5 11-9 17-19m-15 21c5-2 10-11 19-16m-20 19c7-6 11-11 15-18m-15 19c2-4 12-7 18-21m-15 20c4-7 7-9 13-17m-13 16c5-1 5-5 12-13m-11 16 14-18m-11 22c2-5 7-12 11-16m-14 14c3-4 8-12 11-14m-10 16c4-7 10-5 16-16m-17 15 15-13m-10 19c-1-8 7-12 9-15m-13 10 13-11m-14 13c2-3 8-5 13-14m-11 15c3-2 7-3 10-12m-6 18c-1-9 5-10 10-18m-13 15 11-11m-12 12c5-1 10-5 10-8m-6 9c0-3 3-6 7-11m-9 11c7-1 7-4 10-9m-9 12c2-6 8-8 8-11m-8 10 9-6m-9 8 9-8m-7 12c4-5 6-6 6-13m-6 11c3-3 6-5 8-9m-9 13c2-2 6-4 8-8m-7 7 8-9m-8 10c3-2 5-4 6-8m-5 9 7-7m-6 8c1 0 2-4 7-7m-7 8 6-6m-6 7c3 1 2-2 6-6m-4 7 4-5m-3 6 3-5m-3 5 3-4m-2 6 2-3m-3 4 3-4m-2 6 2-3m-2 3 2-3m-1 5 2-2m-2 2 2-2m-1 4 1-1m-2 1 2-1\"}),React__namespace.createElement(\"path\",{stroke:\"transparent\",strokeWidth:\".5\",d:\"m272 626-11-25c-3-8-4-17-10-24-5-8-14-15-21-21s-14-14-20-17c-5-4-12-2-15-6-2-4 0-6 0-17l4-52c3-34 7-127 9-155s-1-12 3-14c3-2 12-1 19-1 8 1 22-1 26 2s-3-10-2 15c1 24 3 78 7 130l11 182m-3 0c-3-3-8-12-11-19s-3-17-8-24c-5-8-13-15-20-21l-22-20c-5-5-9-6-10-9-2-3-1 1-1-10s-1-20 1-56c1-35 4-130 7-159 2-28 4-9 8-11 5-1 13 2 19 3 7 0 17-4 21-1 3 3 0-4 1 20s1 73 5 125l14 188\"})),React__namespace.createElement(\"path\",{fill:\"none\",stroke:\"black\",strokeLinecap:\"round\",strokeWidth:\"4\",d:\"m271 626-10-23c-4-8-7-18-12-26s-10-15-17-21l-25-16c-6-4-8-3-10-7-2-3-2-2-2-14l3-56 9-154c2-28-2-12 2-14 3-2 11 1 18 1 8 0 22-6 27-3 4 3-1-3 0 21a9897 9897 0 0 0 17 312m2 2-13-24c-3-8-4-18-8-26-5-8-13-15-20-21-7-7-18-13-24-17-5-4-8-1-10-4-2-4-2-6-2-18s-1-20 1-55l8-155c2-28-2-11 1-13 4-3 14-1 22-1s23-1 28 2c4 3-3-7-2 17a4634 4634 0 0 0 17 312\"}),React__namespace.createElement(\"path\",{fill:\"none\",stroke:i,strokeLinecap:\"round\",strokeWidth:\"8\",d:\"m255 296 12 320m-15-322 21 325\"}))},saveIcon=e=>React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:e?\"var(--color-accent)\":\"var(--icon-fill-color)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},React__namespace.createElement(\"path\",{d:\"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z\"}),React__namespace.createElement(\"polyline\",{points:\"17 21 17 13 7 13 7 21\"}),React__namespace.createElement(\"polyline\",{points:\"7 3 7 8 15 8\"})),penIcon=e=>{switch(e.type){case\"highlighter\":return React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},React__namespace.createElement(\"path\",{fill:e.strokeColor??\"var(--icon-fill-color)\",strokeWidth:\"2\",d:\"m9 11-6 6v3h9l3-3\",style:e.strokeColor?{filter:\"var(--theme-filter)\"}:{}}),React__namespace.createElement(\"path\",{fill:\"none\",strokeWidth:\"2\",d:\"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4\"}));case\"finetip\":return React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:e.strokeColor??\"var(--icon-fill-color)\",stroke:e.strokeColor??\"var(--icon-fill-color)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",style:e.strokeColor?{filter:\"var(--theme-filter)\"}:{}},React__namespace.createElement(\"path\",{strokeWidth:\"2\",d:\"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z\"}));case\"fountain\":return React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},React__namespace.createElement(\"path\",{fill:e.strokeColor??\"var(--icon-fill-color)\",d:\"m12 19 7-7 3 3-7 7-3-3z\"}),React__namespace.createElement(\"path\",{fill:\"none\",d:\"m18 13-1.5-7.5L2 2l3.5 14.5L13 18l5-5z\"}),React__namespace.createElement(\"path\",{fill:\"none\",d:\"m2 2 7.586 7.586\"}),React__namespace.createElement(\"circle\",{fill:\"none\",cx:\"11\",cy:\"11\",r:\"2\"}));case\"marker\":return React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 576 512\",fill:e.strokeColor??\"var(--icon-fill-color)\",stroke:e.strokeColor??\"var(--icon-fill-color)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",style:e.strokeColor?{filter:\"var(--theme-filter)\"}:{}},React__namespace.createElement(\"path\",{d:\"M331 315l158.4-215L460.1 70.6 245 229 331 315zm-187 5l0 0V248.3c0-15.3 7.2-29.6 19.5-38.6L436.6 8.4C444 2.9 453 0 462.2 0c11.4 0 22.4 4.5 30.5 12.6l54.8 54.8c8.1 8.1 12.6 19 12.6 30.5c0 9.2-2.9 18.2-8.4 25.6L350.4 396.5c-9 12.3-23.4 19.5-38.6 19.5H240l-25.4 25.4c-12.5 12.5-32.8 12.5-45.3 0l-50.7-50.7c-12.5-12.5-12.5-32.8 0-45.3L144 320zM23 466.3l63-63 70.6 70.6-31 31c-4.5 4.5-10.6 7-17 7H40c-13.3 0-24-10.7-24-24v-4.7c0-6.4 2.5-12.5 7-17z\"}));case\"thick-thin\":return React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 108 106\",strokeWidth:\"2\",fill:e.strokeColor??\"var(--icon-fill-color)\",stroke:e.strokeColor??\"var(--icon-fill-color)\",style:e.strokeColor?{filter:\"var(--theme-filter)\"}:{}},React__namespace.createElement(\"path\",{d:\"m-.58 95.628.22-.89q.22-.89.49-2.44.26-1.54.77-3.35t1.31-3.43q.79-1.61.2-.26-.6 1.34-.03-.14.58-1.49 1.54-2.97.96-1.49 2.54-3.18 1.59-1.68 3.46-2.96 1.86-1.27.81-.54-1.04.73.6-.46 1.64-1.19 2.8-1.81 1.16-.63.16-.08-.99.54 1.21-.5 2.2-1.03 1.11-.58-1.1.45-.03-.07 1.06-.53 2.32-.82 1.26-.3 2.91-.52 1.64-.23 3.05-.18 1.4.05 2.5.12 1.09.07 2.25.24 1.16.17 2.3.49 1.15.32 2.11.78.96.47 2.21 1.01 1.25.55 2.37 1.04t2.34.89q1.22.4 2.5.65 1.29.25 2.44.33 1.16.08 2.35.17 1.18.08 2.26-.1 1.08-.19 2-1.1.92-.91 1.25-1.93.32-1.02.38-2.15t.57.21q.51 1.34-.03-.02-.55-1.37-.96-2.83-.41-1.45.5-.67.92.79-.03-.06-.95-.85-1.52-1.8-.57-.94-1.5-1.52-.93-.57-1.94-1.22-1.01-.65-1.97-1.88-.96-1.22-1.44-2.54-.49-1.32-.65-2.57-.17-1.24-.11-2.35.06-1.11.31-2.91.24-1.79.76-2.77.51-.97 1.29-1.8.77-.84 1.64-1.55.88-.72 1.9-1.33 1.03-.61 2.43-1.15 1.41-.55 2.69-.92 1.29-.37 2.81-.68 1.53-.31 2.83-.58 1.31-.27 2.78-.47 1.47-.2 2.58-.49 1.12-.28 2.19-.58 1.08-.31 2.13-.73 1.05-.42 2.44-1.32 1.39-.9 2.68-1.85 1.3-.95 2.25-1.87.95-.91 2.06-2 1.11-1.09 1.92-1.93.82-.84 1.54-1.82.71-.98 1.4-1.88.69-.9 1.38-1.96.69-1.07 1.25-2.04.55-.97 1.21-1.94.65-.96 1.35-1.79.69-.83 1.46-1.74.77-.9 1.66-1.73.89-.84 2.72-2.31 1.84-1.48 1.84-1.47v.01l-1.1 1.03q-1.1 1.02-1.77 1.92-.68.9-1.39 1.85-.71.96-1.41 1.91-.7.96-1.19 1.92-.48.95-.95 1.92-.46.96-.9 1.95-.43.99-1.02 2.16-.59 1.17-1.17 2.15-.58.97-1.23 2.13t-1.29 2.02q-.64.86-1.3 1.73-.66.88-1.42 1.78-.75.9-1.72 2.03-.97 1.14-1.81 1.89-.85.75-1.98 1.71-1.14.96-2.05 1.61-.91.64-2.42 1.38-1.51.73-2.71 1.21t-2.49.92q-1.3.44-2.35.69-1.06.24-2.1.59-1.03.34-2.06.74-1.03.4-2.29.94-1.26.54-2.27 1.11-1.01.58-1.57 1.57-.56.99-.81 2.06-.25 1.08.56 2.02.8.94-.21-.02-1.02-.96-.01-.48 1 .49 1.87 1.25.87.77 0 0-.88-.77.46-.01 1.34.75 2.6 1.68 1.26.94 2.08 2.03.81 1.09.01.27-.8-.82.3.26 1.11 1.08 1.71 2.1.61 1.02 1.21 2.25.6 1.24.92 2.36.32 1.12-.16.13-.49-.98.02.36.51 1.35.71 2.69.2 1.34.24 2.46.03 1.12-.09 2.42-.13 1.29-.72 3.21-.6 1.92-1.4 3.49-.81 1.58-1.77 2.83-.96 1.24-2.88 2.72-1.92 1.48-2.95 1.85-1.04.36-2.47.76-1.44.41-3.33.72-1.89.32-3.37.41-1.48.09-2.63.15-1.15.05-2.74-.06-1.59-.1-2.8-.29-1.2-.19-3.2-.63-1.99-.45-3.63-.92-1.63-.48-3.28-.79-1.65-.31-2.76-.2-1.11.1-2.21.42-1.11.32.39-.29 1.49-.6-.12.21-1.61.8-.39.19 1.21-.61.29.13-.92.74-1.83 1.34-.92.61.15-.19t.3-.05q-.77.75-1.58 1.57-.81.82.01-.18.82-1 .24.23t-.72 2.72q-.15 1.48-.08 2.4.07.91-.19 2.16-.26 1.26-.81 2.41-.55 1.16-1.36 2.15t-1.84 1.75q-1.03.77-2.21 1.27t-2.44.7q-1.27.2-2.53.1-1.28-.11-2.49-.52-1.22-.41-2.3-1.1-1.08-.68-1.96-1.61-.89-.92-1.52-2.04-.64-1.11-.99-2.34-.36-1.23-.41-2.51l-.04-1.27Z\"}));case\"thin-thick-thin\":return React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 114 113\",strokeWidth:\"2\",fill:e.strokeColor??\"var(--icon-fill-color)\",stroke:e.strokeColor??\"var(--icon-fill-color)\",style:e.strokeColor?{filter:\"var(--theme-filter)\"}:{}},React__namespace.createElement(\"path\",{d:\"m10 103.405.13-1.22q.14-1.22 1.3-3.16 1.15-1.94 2.74-3.46 1.59-1.53 3.35-2.72 1.77-1.2 4-1.95 2.23-.76 4.45-1t4.86-.4q2.64-.15 5.14-.34 2.51-.19 4.85-.94 2.35-.75 4.55-1.71 2.21-.97 4.16-2.26 1.95-1.3 4.03-2.97 2.07-1.67 3.85-3.05 1.78-1.37 3.72-2.48 1.94-1.11 3.3-2.99 1.36-1.89 2.58-3.74 1.22-1.85-.63-3.42-1.85-1.57-3.82-2.86-1.97-1.3-4.11-2.08-2.15-.78-4.21-1.6-2.06-.81-4.02-1.96-1.96-1.14-3.71-2.48-1.74-1.33-3.37-2.77-1.63-1.43-3.23-3.62-1.6-2.18-2.23-4.64-.62-2.46-.36-4.96.27-2.49 1.19-4.46.91-1.97 2.42-3.7 1.5-1.73 3.5-3.15t4.11-2.28q2.1-.86 4.33-1.44 2.24-.58 4.92-.84 2.68-.26 4.83-.19t4.69.35q2.53.28 4.75.66 2.23.38 4.48.2 2.26-.19 4.43-1.3 2.17-1.12 4.2-2.36 2.04-1.24 3.93-2.43 1.9-1.19 3.84-2.14 1.95-.95 4.04-1.78 2.09-.83 4.56-2.28 2.46-1.46 2.46-1.45h.01q.01 0-1.38 1.3-1.38 1.29-3.08 2.59-1.7 1.3-3.5 2.5t-3.42 2.65q-1.62 1.45-3.18 3-1.57 1.56-3.37 3.13-1.8 1.57-3.6 2.91-1.81 1.33-3.92 2.12t-4.24.92q-2.13.14-4.31.26-2.18.12-4.5.39t-4.56.88q-2.25.61-4.24 1.6-1.99 1-3.83 2.29-1.83 1.29.18 2.44 2.01 1.15 4.2 1.92 2.2.78 4.34 1 2.15.22 4.4.69 2.25.46 4.34 1.16 2.08.71 4.33 1.91 2.25 1.21 4.11 2.73 1.87 1.52 3.68 4.03 1.82 2.5 2.74 5 .93 2.5 1.18 5.03.26 2.53-.04 4.81t-1.4 4.85q-1.09 2.58-2.4 4.26-1.3 1.68-3.1 3.44t-4.02 3.62q-2.23 1.85-4.32 3.07-2.08 1.23-4.34 1.99-2.25.76-4.46 1.96t-4.37 2.14q-2.15.93-4.22 1.81t-4.36 1.35q-2.3.46-4.52.82-2.22.35-4.76.38-2.54.04-4.87-.28t-4.67-.67q-2.34-.35-4.72-.54-2.39-.19-4.64.37-2.25.56-4.16 1.66-1.91 1.11-3.52 2.71-1.61 1.6-2.55 2.39l-.94.78Z\"}));default:return React__namespace.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 512 512\",fill:e.strokeColor??\"var(--icon-fill-color)\",stroke:e.strokeColor??\"var(--icon-fill-color)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",style:e.strokeColor?{filter:\"var(--theme-filter)\"}:{}},React__namespace.createElement(\"path\",{d:\"M453.3 19.3l39.4 39.4c25 25 25 65.5 0 90.5l-52.1 52.1 0 0-1-1 0 0-16-16-96-96-17-17 52.1-52.1c25-25 65.5-25 90.5 0zM241 114.9c-9.4-9.4-24.6-9.4-33.9 0L105 217c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L173.1 81c28.1-28.1 73.7-28.1 101.8 0L288 94.1l17 17 96 96 16 16 1 1-17 17L229.5 412.5c-48 48-109.2 80.8-175.8 94.1l-25 5c-7.9 1.6-16-.9-21.7-6.6s-8.1-13.8-6.6-21.7l5-25c13.3-66.6 46.1-127.8 94.1-175.8L254.1 128 241 114.9z\"}))}},stringToSVG=e=>(e.match('class=\"skip\"')||(e=e.replace(/stroke\\s*=\\s*['\"][^\"']*['\"]/g,\"\").replace(/[^-]width\\s*=\\s*['\"][^\"']*['\"]/g,\"\").replace(/[^-]height\\s*=\\s*['\"][^\"']*['\"]/g,\"\").replace(\"<svg \",'<svg style=\"stroke:var(--icon-fill-color);color:var(--icon-fill-color);fill:var(--icon-fill-color);stroke-width:6;\" ')),React__namespace.createElement(\"div\",{dangerouslySetInnerHTML:{__html:e}})),LogoWrapper=({children:e})=>React__namespace.createElement(\"div\",{className:\"welcome-screen-center__logo virgil welcome-screen-decor\"},e,\" \");var top=\"top\",bottom=\"bottom\",right=\"right\",left=\"left\",auto=\"auto\",basePlacements=[top,bottom,right,left],start=\"start\",end=\"end\",clippingParents=\"clippingParents\",viewport=\"viewport\",popper=\"popper\",reference=\"reference\",variationPlacements=basePlacements.reduce((function(e,t){return e.concat([t+\"-\"+start,t+\"-\"+end])}),[]),placements=[].concat(basePlacements,[auto]).reduce((function(e,t){return e.concat([t,t+\"-\"+start,t+\"-\"+end])}),[]),beforeRead=\"beforeRead\",read=\"read\",afterRead=\"afterRead\",beforeMain=\"beforeMain\",main=\"main\",afterMain=\"afterMain\",beforeWrite=\"beforeWrite\",write=\"write\",afterWrite=\"afterWrite\",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(e){return e?(e.nodeName||\"\").toLowerCase():null}function getWindow(e){if(null==e)return window;if(\"[object Window]\"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function isElement(e){return e instanceof getWindow(e).Element||e instanceof Element}function isHTMLElement$1(e){return e instanceof getWindow(e).HTMLElement||e instanceof HTMLElement}function isShadowRoot(e){return\"undefined\"!=typeof ShadowRoot&&(e instanceof getWindow(e).ShadowRoot||e instanceof ShadowRoot)}function applyStyles(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var a=t.styles[e]||{},i=t.attributes[e]||{},n=t.elements[e];isHTMLElement$1(n)&&getNodeName(n)&&(Object.assign(n.style,a),Object.keys(i).forEach((function(e){var t=i[e];!1===t?n.removeAttribute(e):n.setAttribute(e,!0===t?\"\":t)})))}))}function effect$2(e){var t=e.state,a={popper:{position:t.options.strategy,left:\"0\",top:\"0\",margin:\"0\"},arrow:{position:\"absolute\"},reference:{}};return Object.assign(t.elements.popper.style,a.popper),t.styles=a,t.elements.arrow&&Object.assign(t.elements.arrow.style,a.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],n=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:a[e]).reduce((function(e,t){return e[t]=\"\",e}),{});isHTMLElement$1(i)&&getNodeName(i)&&(Object.assign(i.style,r),Object.keys(n).forEach((function(e){i.removeAttribute(e)})))}))}}var applyStyles$1={name:\"applyStyles\",enabled:!0,phase:\"write\",fn:applyStyles,effect:effect$2,requires:[\"computeStyles\"]};function getBasePlacement(e){return e.split(\"-\")[0]}var max$5=Math.max,min$5=Math.min,round$6=Math.round;function getUAString(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+\"/\"+e.version})).join(\" \"):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(e,t,a){void 0===t&&(t=!1),void 0===a&&(a=!1);var i=e.getBoundingClientRect(),n=1,r=1;t&&isHTMLElement$1(e)&&(n=e.offsetWidth>0&&round$6(i.width)/e.offsetWidth||1,r=e.offsetHeight>0&&round$6(i.height)/e.offsetHeight||1);var s=(isElement(e)?getWindow(e):window).visualViewport,o=!isLayoutViewport()&&a,l=(i.left+(o&&s?s.offsetLeft:0))/n,c=(i.top+(o&&s?s.offsetTop:0))/r,d=i.width/n,h=i.height/r;return{width:d,height:h,top:c,right:l+d,bottom:c+h,left:l,x:l,y:c}}function getLayoutRect(e){var t=getBoundingClientRect(e),a=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-a)<=1&&(a=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:a,height:i}}function contains(e,t){var a=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(a&&isShadowRoot(a)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function isTableElement(e){return[\"table\",\"td\",\"th\"].indexOf(getNodeName(e))>=0}function getDocumentElement(e){return((isElement(e)?e.ownerDocument:e.document)||window.document).documentElement}function getParentNode(e){return\"html\"===getNodeName(e)?e:e.assignedSlot||e.parentNode||(isShadowRoot(e)?e.host:null)||getDocumentElement(e)}function getTrueOffsetParent(e){return isHTMLElement$1(e)&&\"fixed\"!==getComputedStyle$1(e).position?e.offsetParent:null}function getContainingBlock(e){var t=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement$1(e)&&\"fixed\"===getComputedStyle$1(e).position)return null;var a=getParentNode(e);for(isShadowRoot(a)&&(a=a.host);isHTMLElement$1(a)&&[\"html\",\"body\"].indexOf(getNodeName(a))<0;){var i=getComputedStyle$1(a);if(\"none\"!==i.transform||\"none\"!==i.perspective||\"paint\"===i.contain||-1!==[\"transform\",\"perspective\"].indexOf(i.willChange)||t&&\"filter\"===i.willChange||t&&i.filter&&\"none\"!==i.filter)return a;a=a.parentNode}return null}function getOffsetParent(e){for(var t=getWindow(e),a=getTrueOffsetParent(e);a&&isTableElement(a)&&\"static\"===getComputedStyle$1(a).position;)a=getTrueOffsetParent(a);return a&&(\"html\"===getNodeName(a)||\"body\"===getNodeName(a)&&\"static\"===getComputedStyle$1(a).position)?t:a||getContainingBlock(e)||t}function getMainAxisFromPlacement(e){return[\"top\",\"bottom\"].indexOf(e)>=0?\"x\":\"y\"}function within(e,t,a){return max$5(e,min$5(t,a))}function withinMaxClamp(e,t,a){var i=within(e,t,a);return i>a?a:i}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(e){return Object.assign({},getFreshSideObject(),e)}function expandToHashMap(e,t){return t.reduce((function(t,a){return t[a]=e,t}),{})}var toPaddingObject=function(e,t){return mergePaddingObject(\"number\"!=typeof(e=\"function\"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:expandToHashMap(e,basePlacements))};function arrow(e){var t,a=e.state,i=e.name,n=e.options,r=a.elements.arrow,s=a.modifiersData.popperOffsets,o=getBasePlacement(a.placement),l=getMainAxisFromPlacement(o),c=[left,right].indexOf(o)>=0?\"height\":\"width\";if(r&&s){var d=toPaddingObject(n.padding,a),h=getLayoutRect(r),p=\"y\"===l?top:left,u=\"y\"===l?bottom:right,m=a.rects.reference[c]+a.rects.reference[l]-s[l]-a.rects.popper[c],g=s[l]-a.rects.reference[l],f=getOffsetParent(r),b=f?\"y\"===l?f.clientHeight||0:f.clientWidth||0:0,U=m/2-g/2,E=d[p],w=b-h[c]-d[u],y=b/2-h[c]/2+U,v=within(E,y,w),T=l;a.modifiersData[i]=((t={})[T]=v,t.centerOffset=v-y,t)}}function effect$1(e){var t=e.state,a=e.options.element,i=void 0===a?\"[data-popper-arrow]\":a;null!=i&&(\"string\"!=typeof i||(i=t.elements.popper.querySelector(i)))&&contains(t.elements.popper,i)&&(t.elements.arrow=i)}var arrow$1={name:\"arrow\",enabled:!0,phase:\"main\",fn:arrow,effect:effect$1,requires:[\"popperOffsets\"],requiresIfExists:[\"preventOverflow\"]};function getVariation(e){return e.split(\"-\")[1]}var unsetSides={top:\"auto\",right:\"auto\",bottom:\"auto\",left:\"auto\"};function roundOffsetsByDPR(e,t){var a=e.x,i=e.y,n=t.devicePixelRatio||1;return{x:round$6(a*n)/n||0,y:round$6(i*n)/n||0}}function mapToStyles(e){var t,a=e.popper,i=e.popperRect,n=e.placement,r=e.variation,s=e.offsets,o=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,h=e.isFixed,p=s.x,u=void 0===p?0:p,m=s.y,g=void 0===m?0:m,f=\"function\"==typeof d?d({x:u,y:g}):{x:u,y:g};u=f.x,g=f.y;var b=s.hasOwnProperty(\"x\"),U=s.hasOwnProperty(\"y\"),E=left,w=top,y=window;if(c){var v=getOffsetParent(a),T=\"clientHeight\",S=\"clientWidth\";v===getWindow(a)&&\"static\"!==getComputedStyle$1(v=getDocumentElement(a)).position&&\"absolute\"===o&&(T=\"scrollHeight\",S=\"scrollWidth\"),(n===top||(n===left||n===right)&&r===end)&&(w=bottom,g-=(h&&v===y&&y.visualViewport?y.visualViewport.height:v[T])-i.height,g*=l?1:-1),n!==left&&(n!==top&&n!==bottom||r!==end)||(E=right,u-=(h&&v===y&&y.visualViewport?y.visualViewport.width:v[S])-i.width,u*=l?1:-1)}var _,C=Object.assign({position:o},c&&unsetSides),I=!0===d?roundOffsetsByDPR({x:u,y:g},getWindow(a)):{x:u,y:g};return u=I.x,g=I.y,l?Object.assign({},C,((_={})[w]=U?\"0\":\"\",_[E]=b?\"0\":\"\",_.transform=(y.devicePixelRatio||1)<=1?\"translate(\"+u+\"px, \"+g+\"px)\":\"translate3d(\"+u+\"px, \"+g+\"px, 0)\",_)):Object.assign({},C,((t={})[w]=U?g+\"px\":\"\",t[E]=b?u+\"px\":\"\",t.transform=\"\",t))}function computeStyles(e){var t=e.state,a=e.options,i=a.gpuAcceleration,n=void 0===i||i,r=a.adaptive,s=void 0===r||r,o=a.roundOffsets,l=void 0===o||o,c={placement:getBasePlacement(t.placement),variation:getVariation(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:\"fixed\"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mapToStyles(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mapToStyles(Object.assign({},c,{offsets:t.modifiersData.arrow,position:\"absolute\",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{\"data-popper-placement\":t.placement})}var computeStyles$1={name:\"computeStyles\",enabled:!0,phase:\"beforeWrite\",fn:computeStyles,data:{}},passive={passive:!0};function effect(e){var t=e.state,a=e.instance,i=e.options,n=i.scroll,r=void 0===n||n,s=i.resize,o=void 0===s||s,l=getWindow(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&c.forEach((function(e){e.addEventListener(\"scroll\",a.update,passive)})),o&&l.addEventListener(\"resize\",a.update,passive),function(){r&&c.forEach((function(e){e.removeEventListener(\"scroll\",a.update,passive)})),o&&l.removeEventListener(\"resize\",a.update,passive)}}var eventListeners={name:\"eventListeners\",enabled:!0,phase:\"write\",fn:function(){},effect:effect,data:{}},hash$1={left:\"right\",right:\"left\",bottom:\"top\",top:\"bottom\"};function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,(function(e){return hash$1[e]}))}var hash={start:\"end\",end:\"start\"};function getOppositeVariationPlacement(e){return e.replace(/start|end/g,(function(e){return hash[e]}))}function getWindowScroll(e){var t=getWindow(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getWindowScroll(e).scrollLeft}function getViewportRect(e,t){var a=getWindow(e),i=getDocumentElement(e),n=a.visualViewport,r=i.clientWidth,s=i.clientHeight,o=0,l=0;if(n){r=n.width,s=n.height;var c=isLayoutViewport();(c||!c&&\"fixed\"===t)&&(o=n.offsetLeft,l=n.offsetTop)}return{width:r,height:s,x:o+getWindowScrollBarX(e),y:l}}function getDocumentRect(e){var t,a=getDocumentElement(e),i=getWindowScroll(e),n=null==(t=e.ownerDocument)?void 0:t.body,r=max$5(a.scrollWidth,a.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),s=max$5(a.scrollHeight,a.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),o=-i.scrollLeft+getWindowScrollBarX(e),l=-i.scrollTop;return\"rtl\"===getComputedStyle$1(n||a).direction&&(o+=max$5(a.clientWidth,n?n.clientWidth:0)-r),{width:r,height:s,x:o,y:l}}function isScrollParent(e){var t=getComputedStyle$1(e),a=t.overflow,i=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(a+n+i)}function getScrollParent(e){return[\"html\",\"body\",\"#document\"].indexOf(getNodeName(e))>=0?e.ownerDocument.body:isHTMLElement$1(e)&&isScrollParent(e)?e:getScrollParent(getParentNode(e))}function listScrollParents(e,t){var a;void 0===t&&(t=[]);var i=getScrollParent(e),n=i===(null==(a=e.ownerDocument)?void 0:a.body),r=getWindow(i),s=n?[r].concat(r.visualViewport||[],isScrollParent(i)?i:[]):i,o=t.concat(s);return n?o:o.concat(listScrollParents(getParentNode(s)))}function rectToClientRect(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function getInnerBoundingClientRect(e,t){var a=getBoundingClientRect(e,!1,\"fixed\"===t);return a.top=a.top+e.clientTop,a.left=a.left+e.clientLeft,a.bottom=a.top+e.clientHeight,a.right=a.left+e.clientWidth,a.width=e.clientWidth,a.height=e.clientHeight,a.x=a.left,a.y=a.top,a}function getClientRectFromMixedType(e,t,a){return t===viewport?rectToClientRect(getViewportRect(e,a)):isElement(t)?getInnerBoundingClientRect(t,a):rectToClientRect(getDocumentRect(getDocumentElement(e)))}function getClippingParents(e){var t=listScrollParents(getParentNode(e)),a=[\"absolute\",\"fixed\"].indexOf(getComputedStyle$1(e).position)>=0&&isHTMLElement$1(e)?getOffsetParent(e):e;return isElement(a)?t.filter((function(e){return isElement(e)&&contains(e,a)&&\"body\"!==getNodeName(e)})):[]}function getClippingRect(e,t,a,i){var n=\"clippingParents\"===t?getClippingParents(e):[].concat(t),r=[].concat(n,[a]),s=r[0],o=r.reduce((function(t,a){var n=getClientRectFromMixedType(e,a,i);return t.top=max$5(n.top,t.top),t.right=min$5(n.right,t.right),t.bottom=min$5(n.bottom,t.bottom),t.left=max$5(n.left,t.left),t}),getClientRectFromMixedType(e,s,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function computeOffsets(e){var t,a=e.reference,i=e.element,n=e.placement,r=n?getBasePlacement(n):null,s=n?getVariation(n):null,o=a.x+a.width/2-i.width/2,l=a.y+a.height/2-i.height/2;switch(r){case top:t={x:o,y:a.y-i.height};break;case bottom:t={x:o,y:a.y+a.height};break;case right:t={x:a.x+a.width,y:l};break;case left:t={x:a.x-i.width,y:l};break;default:t={x:a.x,y:a.y}}var c=r?getMainAxisFromPlacement(r):null;if(null!=c){var d=\"y\"===c?\"height\":\"width\";switch(s){case start:t[c]=t[c]-(a[d]/2-i[d]/2);break;case end:t[c]=t[c]+(a[d]/2-i[d]/2)}}return t}function detectOverflow(e,t){void 0===t&&(t={});var a=t,i=a.placement,n=void 0===i?e.placement:i,r=a.strategy,s=void 0===r?e.strategy:r,o=a.boundary,l=void 0===o?clippingParents:o,c=a.rootBoundary,d=void 0===c?viewport:c,h=a.elementContext,p=void 0===h?popper:h,u=a.altBoundary,m=void 0!==u&&u,g=a.padding,f=void 0===g?0:g,b=mergePaddingObject(\"number\"!=typeof f?f:expandToHashMap(f,basePlacements)),U=p===popper?reference:popper,E=e.rects.popper,w=e.elements[m?U:p],y=getClippingRect(isElement(w)?w:w.contextElement||getDocumentElement(e.elements.popper),l,d,s),v=getBoundingClientRect(e.elements.reference),T=computeOffsets({reference:v,element:E,strategy:\"absolute\",placement:n}),S=rectToClientRect(Object.assign({},E,T)),_=p===popper?S:v,C={top:y.top-_.top+b.top,bottom:_.bottom-y.bottom+b.bottom,left:y.left-_.left+b.left,right:_.right-y.right+b.right},I=e.modifiersData.offset;if(p===popper&&I){var x=I[n];Object.keys(C).forEach((function(e){var t=[right,bottom].indexOf(e)>=0?1:-1,a=[top,bottom].indexOf(e)>=0?\"y\":\"x\";C[e]+=x[a]*t}))}return C}function computeAutoPlacement(e,t){void 0===t&&(t={});var a=t,i=a.placement,n=a.boundary,r=a.rootBoundary,s=a.padding,o=a.flipVariations,l=a.allowedAutoPlacements,c=void 0===l?placements:l,d=getVariation(i),h=d?o?variationPlacements:variationPlacements.filter((function(e){return getVariation(e)===d})):basePlacements,p=h.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=h);var u=p.reduce((function(t,a){return t[a]=detectOverflow(e,{placement:a,boundary:n,rootBoundary:r,padding:s})[getBasePlacement(a)],t}),{});return Object.keys(u).sort((function(e,t){return u[e]-u[t]}))}function getExpandedFallbackPlacements(e){if(getBasePlacement(e)===auto)return[];var t=getOppositePlacement(e);return[getOppositeVariationPlacement(e),t,getOppositeVariationPlacement(t)]}function flip(e){var t=e.state,a=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var n=a.mainAxis,r=void 0===n||n,s=a.altAxis,o=void 0===s||s,l=a.fallbackPlacements,c=a.padding,d=a.boundary,h=a.rootBoundary,p=a.altBoundary,u=a.flipVariations,m=void 0===u||u,g=a.allowedAutoPlacements,f=t.options.placement,b=getBasePlacement(f),U=l||(b!==f&&m?getExpandedFallbackPlacements(f):[getOppositePlacement(f)]),E=[f].concat(U).reduce((function(e,a){return e.concat(getBasePlacement(a)===auto?computeAutoPlacement(t,{placement:a,boundary:d,rootBoundary:h,padding:c,flipVariations:m,allowedAutoPlacements:g}):a)}),[]),w=t.rects.reference,y=t.rects.popper,v=new Map,T=!0,S=E[0],_=0;_<E.length;_++){var C=E[_],I=getBasePlacement(C),x=getVariation(C)===start,A=[top,bottom].indexOf(I)>=0,k=A?\"width\":\"height\",O=detectOverflow(t,{placement:C,boundary:d,rootBoundary:h,altBoundary:p,padding:c}),R=A?x?right:left:x?bottom:top;w[k]>y[k]&&(R=getOppositePlacement(R));var M=getOppositePlacement(R),L=[];if(r&&L.push(O[I]<=0),o&&L.push(O[R]<=0,O[M]<=0),L.every((function(e){return e}))){S=C,T=!1;break}v.set(C,L)}if(T)for(var D=function(e){var t=E.find((function(t){var a=v.get(t);if(a)return a.slice(0,e).every((function(e){return e}))}));if(t)return S=t,\"break\"},P=m?3:1;P>0&&\"break\"!==D(P);P--);t.placement!==S&&(t.modifiersData[i]._skip=!0,t.placement=S,t.reset=!0)}}var flip$1={name:\"flip\",enabled:!0,phase:\"main\",fn:flip,requiresIfExists:[\"offset\"],data:{_skip:!1}};function getSideOffsets(e,t,a){return void 0===a&&(a={x:0,y:0}),{top:e.top-t.height-a.y,right:e.right-t.width+a.x,bottom:e.bottom-t.height+a.y,left:e.left-t.width-a.x}}function isAnySideFullyClipped(e){return[top,right,bottom,left].some((function(t){return e[t]>=0}))}function hide(e){var t=e.state,a=e.name,i=t.rects.reference,n=t.rects.popper,r=t.modifiersData.preventOverflow,s=detectOverflow(t,{elementContext:\"reference\"}),o=detectOverflow(t,{altBoundary:!0}),l=getSideOffsets(s,i),c=getSideOffsets(o,n,r),d=isAnySideFullyClipped(l),h=isAnySideFullyClipped(c);t.modifiersData[a]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{\"data-popper-reference-hidden\":d,\"data-popper-escaped\":h})}var hide$1={name:\"hide\",enabled:!0,phase:\"main\",requiresIfExists:[\"preventOverflow\"],fn:hide};function distanceAndSkiddingToXY(e,t,a){var i=getBasePlacement(e),n=[left,top].indexOf(i)>=0?-1:1,r=\"function\"==typeof a?a(Object.assign({},t,{placement:e})):a,s=r[0],o=r[1];return s=s||0,o=(o||0)*n,[left,right].indexOf(i)>=0?{x:o,y:s}:{x:s,y:o}}function offset(e){var t=e.state,a=e.options,i=e.name,n=a.offset,r=void 0===n?[0,0]:n,s=placements.reduce((function(e,a){return e[a]=distanceAndSkiddingToXY(a,t.rects,r),e}),{}),o=s[t.placement],l=o.x,c=o.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=s}var offset$1={name:\"offset\",enabled:!0,phase:\"main\",requires:[\"popperOffsets\"],fn:offset};function popperOffsets(e){var t=e.state,a=e.name;t.modifiersData[a]=computeOffsets({reference:t.rects.reference,element:t.rects.popper,strategy:\"absolute\",placement:t.placement})}var popperOffsets$1={name:\"popperOffsets\",enabled:!0,phase:\"read\",fn:popperOffsets,data:{}};function getAltAxis(e){return\"x\"===e?\"y\":\"x\"}function preventOverflow(e){var t=e.state,a=e.options,i=e.name,n=a.mainAxis,r=void 0===n||n,s=a.altAxis,o=void 0!==s&&s,l=a.boundary,c=a.rootBoundary,d=a.altBoundary,h=a.padding,p=a.tether,u=void 0===p||p,m=a.tetherOffset,g=void 0===m?0:m,f=detectOverflow(t,{boundary:l,rootBoundary:c,padding:h,altBoundary:d}),b=getBasePlacement(t.placement),U=getVariation(t.placement),E=!U,w=getMainAxisFromPlacement(b),y=getAltAxis(w),v=t.modifiersData.popperOffsets,T=t.rects.reference,S=t.rects.popper,_=\"function\"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,C=\"number\"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,x={x:0,y:0};if(v){if(r){var A,k=\"y\"===w?top:left,O=\"y\"===w?bottom:right,R=\"y\"===w?\"height\":\"width\",M=v[w],L=M+f[k],D=M-f[O],P=u?-S[R]/2:0,N=U===start?T[R]:S[R],F=U===start?-S[R]:-T[R],G=t.elements.arrow,B=u&&G?getLayoutRect(G):{width:0,height:0},V=t.modifiersData[\"arrow#persistent\"]?t.modifiersData[\"arrow#persistent\"].padding:getFreshSideObject(),$=V[k],W=V[O],H=within(0,T[R],B[R]),X=E?T[R]/2-P-H-$-C.mainAxis:N-H-$-C.mainAxis,Y=E?-T[R]/2+P+H+W+C.mainAxis:F+H+W+C.mainAxis,z=t.elements.arrow&&getOffsetParent(t.elements.arrow),K=z?\"y\"===w?z.clientTop||0:z.clientLeft||0:0,Z=null!=(A=null==I?void 0:I[w])?A:0,j=M+Y-Z,q=within(u?min$5(L,M+X-Z-K):L,M,u?max$5(D,j):D);v[w]=q,x[w]=q-M}if(o){var J,Q=\"x\"===w?top:left,ee=\"x\"===w?bottom:right,te=v[y],ae=\"y\"===y?\"height\":\"width\",ie=te+f[Q],ne=te-f[ee],re=-1!==[top,left].indexOf(b),se=null!=(J=null==I?void 0:I[y])?J:0,oe=re?ie:te-T[ae]-S[ae]-se+C.altAxis,le=re?te+T[ae]+S[ae]-se-C.altAxis:ne,ce=u&&re?withinMaxClamp(oe,te,le):within(u?oe:ie,te,u?le:ne);v[y]=ce,x[y]=ce-te}t.modifiersData[i]=x}}var preventOverflow$1={name:\"preventOverflow\",enabled:!0,phase:\"main\",fn:preventOverflow,requiresIfExists:[\"offset\"]};function getHTMLElementScroll(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function getNodeScroll(e){return e!==getWindow(e)&&isHTMLElement$1(e)?getHTMLElementScroll(e):getWindowScroll(e)}function isElementScaled(e){var t=e.getBoundingClientRect(),a=round$6(t.width)/e.offsetWidth||1,i=round$6(t.height)/e.offsetHeight||1;return 1!==a||1!==i}function getCompositeRect(e,t,a){void 0===a&&(a=!1);var i=isHTMLElement$1(t),n=isHTMLElement$1(t)&&isElementScaled(t),r=getDocumentElement(t),s=getBoundingClientRect(e,n,a),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!a)&&((\"body\"!==getNodeName(t)||isScrollParent(r))&&(o=getNodeScroll(t)),isHTMLElement$1(t)?((l=getBoundingClientRect(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):r&&(l.x=getWindowScrollBarX(r))),{x:s.left+o.scrollLeft-l.x,y:s.top+o.scrollTop-l.y,width:s.width,height:s.height}}function order(e){var t=new Map,a=new Set,i=[];function n(e){a.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!a.has(e)){var i=t.get(e);i&&n(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){a.has(e.name)||n(e)})),i}function orderModifiers(e){var t=order(e);return modifierPhases.reduce((function(e,a){return e.concat(t.filter((function(e){return e.phase===a})))}),[])}function debounce(e){var t;return function(){return t||(t=new Promise((function(a){Promise.resolve().then((function(){t=void 0,a(e())}))}))),t}}function mergeByName(e){var t=e.reduce((function(e,t){var a=e[t.name];return e[t.name]=a?Object.assign({},a,t,{options:Object.assign({},a.options,t.options),data:Object.assign({},a.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}var DEFAULT_OPTIONS={placement:\"bottom\",modifiers:[],strategy:\"absolute\"};function areValidElements(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return!t.some((function(e){return!(e&&\"function\"==typeof e.getBoundingClientRect)}))}function popperGenerator(e){void 0===e&&(e={});var t=e,a=t.defaultModifiers,i=void 0===a?[]:a,n=t.defaultOptions,r=void 0===n?DEFAULT_OPTIONS:n;return function(e,t,a){void 0===a&&(a=r);var n={placement:\"bottom\",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],o=!1,l={state:n,setOptions:function(a){var o=\"function\"==typeof a?a(n.options):a;c(),n.options=Object.assign({},r,n.options,o),n.scrollParents={reference:isElement(e)?listScrollParents(e):e.contextElement?listScrollParents(e.contextElement):[],popper:listScrollParents(t)};var d=orderModifiers(mergeByName([].concat(i,n.options.modifiers)));return n.orderedModifiers=d.filter((function(e){return e.enabled})),n.orderedModifiers.forEach((function(e){var t=e.name,a=e.options,i=void 0===a?{}:a,r=e.effect;if(\"function\"==typeof r){var o=r({state:n,name:t,instance:l,options:i});s.push(o||function(){})}})),l.update()},forceUpdate:function(){if(!o){var e=n.elements,t=e.reference,a=e.popper;if(areValidElements(t,a)){n.rects={reference:getCompositeRect(t,getOffsetParent(a),\"fixed\"===n.options.strategy),popper:getLayoutRect(a)},n.reset=!1,n.placement=n.options.placement,n.orderedModifiers.forEach((function(e){return n.modifiersData[e.name]=Object.assign({},e.data)}));for(var i=0;i<n.orderedModifiers.length;i++)if(!0!==n.reset){var r=n.orderedModifiers[i],s=r.fn,c=r.options,d=void 0===c?{}:c,h=r.name;\"function\"==typeof s&&(n=s({state:n,options:d,name:h,instance:l})||n)}else n.reset=!1,i=-1}}},update:debounce((function(){return new Promise((function(e){l.forceUpdate(),e(n)}))})),destroy:function(){c(),o=!0}};if(!areValidElements(e,t))return l;function c(){s.forEach((function(e){return e()})),s=[]}return l.setOptions(a).then((function(e){!o&&a.onFirstUpdate&&a.onFirstUpdate(e)})),l}}var defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$1,flip$1,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers:defaultModifiers});class Suggester{owner;items;suggestions;selectedItem;containerEl;constructor(e,t,a){this.containerEl=t,this.owner=e,t.on(\"click\",\".suggestion-item\",this.onSuggestionClick.bind(this)),t.on(\"mousemove\",\".suggestion-item\",this.onSuggestionMouseover.bind(this)),a.register([],\"ArrowUp\",(()=>(this.setSelectedItem(this.selectedItem-1,!0),!1))),a.register([],\"ArrowDown\",(()=>(this.setSelectedItem(this.selectedItem+1,!0),!1))),a.register([],\"Enter\",(e=>(this.useSelectedItem(e),!1))),a.register([],\"Tab\",(e=>(this.chooseSuggestion(e),!1)))}chooseSuggestion(e){if(!this.items||!this.items.length)return;const t=this.items[this.selectedItem];t&&this.owner.onChooseSuggestion(t,e)}onSuggestionClick(e,t){if(e.preventDefault(),!this.suggestions||!this.suggestions.length)return;const a=this.suggestions.indexOf(t);this.setSelectedItem(a,!1),this.useSelectedItem(e)}onSuggestionMouseover(e,t){if(!this.suggestions||!this.suggestions.length)return;const a=this.suggestions.indexOf(t);this.setSelectedItem(a,!1)}empty(){this.containerEl.empty()}setSuggestions(e){this.containerEl.empty();const t=[];e.forEach((e=>{const a=this.containerEl.createDiv(\"suggestion-item\");this.owner.renderSuggestion(e,a),t.push(a)})),this.items=e,this.suggestions=t,this.setSelectedItem(0,!1)}useSelectedItem(e){if(!this.items||!this.items.length)return;const t=this.items[this.selectedItem];t&&this.owner.selectSuggestion(t,e)}wrap(e,t){return(e%t+t)%t}setSelectedItem(e,t){const a=this.wrap(e,this.suggestions.length),i=this.suggestions[this.selectedItem],n=this.suggestions[a];i&&i.removeClass(\"is-selected\"),n&&n.addClass(\"is-selected\"),this.selectedItem=a,t&&n.scrollIntoView(!1)}}class SuggestionModal extends obsidian_module.FuzzySuggestModal{items=[];suggestions;popper;scope=new obsidian_module.Scope(this.app.scope);suggester;suggestEl;promptEl;emptyStateText=\"No match found\";limit=100;shouldNotOpen;constructor(e,t,a){super(e),this.inputEl=t,this.items=a,this.suggestEl=createDiv(\"suggestion-container\"),this.contentEl=this.suggestEl.createDiv(\"suggestion\"),this.suggester=new Suggester(this,this.contentEl,this.scope),this.scope.register([],\"Escape\",this.onEscape.bind(this)),this.inputEl.addEventListener(\"input\",this.onInputChanged.bind(this)),this.inputEl.addEventListener(\"focus\",this.onFocus.bind(this)),this.inputEl.addEventListener(\"blur\",this.close.bind(this)),this.suggestEl.on(\"mousedown\",\".suggestion-container\",(e=>{e.preventDefault()}))}empty(){this.suggester.empty()}onInputChanged(){if(this.shouldNotOpen)return;const e=this.modifyInput(this.inputEl.value),t=this.getSuggestions(e);t.length>0?this.suggester.setSuggestions(t.slice(0,this.limit)):this.onNoSuggestion(),this.open()}onFocus(){this.shouldNotOpen=!1,this.onInputChanged()}modifyInput(e){return e}onNoSuggestion(){this.empty(),this.renderSuggestion(null,this.contentEl.createDiv(\"suggestion-item\"))}open(){this.app.keymap.pushScope(this.scope),this.inputEl.ownerDocument.body.appendChild(this.suggestEl),this.popper=new WeakRef(createPopper(this.inputEl,this.suggestEl,{placement:\"bottom-start\",modifiers:[{name:\"offset\",options:{offset:[0,10]}},{name:\"flip\",options:{fallbackPlacements:[\"top\"]}}]}))}onEscape(){this.close(),this.shouldNotOpen=!0}close(){this.app.keymap.popScope(this.scope),this.suggester.setSuggestions([]),this.popper?.deref()&&this.popper.deref().destroy(),this.inputEl.removeEventListener(\"input\",this.onInputChanged.bind(this)),this.inputEl.removeEventListener(\"focus\",this.onFocus.bind(this)),this.inputEl.removeEventListener(\"blur\",this.close.bind(this)),this.suggestEl.detach()}createPrompt(e){this.promptEl||(this.promptEl=this.suggestEl.createDiv(\"prompt-instructions\"));const t=this.promptEl.createDiv(\"prompt-instruction\");for(const a of e)t.appendChild(a)}}class FileSuggestionModal extends SuggestionModal{plugin;text;cache;filesAndAliases;file;constructor(e,t,a,i){const n=[];for(const t of a){const a=t.path;n.push({file:t,path:a,alias:\"\"});const i=e.metadataCache.getFileCache(t),r=i?.frontmatter?.aliases||[];for(const e of r)e&&n.push({file:t,path:a,alias:e})}super(e,t.inputEl,n),this.plugin=i,this.limit=20,this.filesAndAliases=n,this.text=t,this.suggestEl.style.maxWidth=\"100%\",this.suggestEl.style.width=`${t.inputEl.clientWidth}px`,this.inputEl.addEventListener(\"input\",(()=>this.getFile())),this.setPlaceholder(t$d(\"SELECT_FILE_TO_INSERT\")),this.emptyStateText=t$d(\"NO_MATCH\")}getFile(){const e=this.inputEl.value,t=this.app.vault.getAbstractFileByPath(e);t!==this.file&&t instanceof obsidian_module.TFile&&(this.file=t,this.onInputChanged())}getSelectedItem(){return this.file}getItemText(e){return`${e.file.path}${e.alias?`|${e.alias}`:\"\"}`}onChooseItem(e){this.file=e.file,this.text.setValue(this.getItemText(e)),this.text.onChanged()}selectSuggestion({item:e}){this.file=e.file,this.text.setValue(this.getItemText(e)),this.onClose(),this.text.onChanged(),this.close()}renderSuggestion(e,t){const{item:a,match:i}=e||{};t.addClass(\"mod-complex\");const n=t.createDiv(\"suggestion-content\"),r=t.createDiv(\"suggestion-aux\"),s=n.createDiv(\"suggestion-title\"),o=n.createDiv(\"suggestion-note\");if(!a)return s.setText(this.emptyStateText),void t.addClass(\"is-selected\");const l=a.file?.path??a.path,c=l.length-a.file.name.length,d=i.matches.map((e=>createSpan(\"suggestion-highlight\"))),h=this.getItemText(a);for(let e=c;e<h.length;e++){const t=i.matches.find((t=>t[0]===e));if(t){const a=d[i.matches.indexOf(t)];s.appendChild(a),a.appendText(h.substring(t[0],t[1])),e+=t[1]-t[0]-1}else s.appendText(h[e])}o.setText(l),this.plugin.isExcalidrawFile(a.file)?obsidian_module.setIcon(r,ICON_NAME):\"md\"===a.file.extension?obsidian_module.setIcon(r,\"square-pen\"):IMAGE_TYPES.includes(a.file.extension)?obsidian_module.setIcon(r,\"image\"):VIDEO_TYPES.includes(a.file.extension)?obsidian_module.setIcon(r,\"monitor-play\"):AUDIO_TYPES.includes(a.file.extension)?obsidian_module.setIcon(r,\"file-audio\"):CODE_TYPES.includes(a.file.extension)?obsidian_module.setIcon(r,\"file-code\"):\"canvas\"===a.file.extension?obsidian_module.setIcon(r,\"layout-dashboard\"):\"pdf\"===a.file.extension?obsidian_module.setIcon(r,\"book-open-text\"):r.setText(a.file.extension)}getItems(){return this.filesAndAliases}}class InsertPDFModal extends obsidian_module.Modal{plugin;view;borderBox=!0;frame=!1;gapSize=20;groupPages=!1;direction=\"right\";numColumns=1;numRows=1;lockAfterImport=!0;pagesToImport=[];pageDimensions={width:0,height:0};importScale=.3;imageSizeMessage;pdfDoc;pdfFile;dirty=!1;constructor(e,t){super(e.app),this.plugin=e,this.view=t}open(e){e&&\"pdf\"===e.extension.toLowerCase()&&(this.pdfFile=e),super.open()}onOpen(){this.containerEl.classList.add(\"excalidraw-release\"),this.titleEl.setText(\"Import PDF\"),this.createForm()}async onClose(){this.dirty&&(this.plugin.settings.pdfImportScale=this.importScale,this.plugin.settings.pdfBorderBox=this.borderBox,this.plugin.settings.pdfFrame=this.frame,this.plugin.settings.pdfGapSize=this.gapSize,this.plugin.settings.pdfGroupPages=this.groupPages,this.plugin.settings.pdfNumColumns=this.numColumns,this.plugin.settings.pdfNumRows=this.numRows,this.plugin.settings.pdfDirection=this.direction,this.plugin.settings.pdfLockAfterImport=this.lockAfterImport,await this.plugin.saveSettings()),this.pdfDoc&&(this.pdfDoc.destroy(),this.pdfDoc=null),this.plugin=null,this.view=null,this.app=null,this.imageSizeMessage.remove(),this.setImageSizeMessage=null}async getPDFPageDimensions(e){try{const t=this.plugin.settings.pdfScale,a=createEl(\"canvas\"),i=(await e.getPage(1)).getViewport({scale:t});this.pageDimensions.height=i.height,this.pageDimensions.width=i.width,a.width=0,a.height=0,this.setImageSizeMessage()}catch(e){console.log(e)}}createPageListFromString(e){const t=e=>e.replace(/\\D/g,\"\");return this.pagesToImport=[],e.split(\",\").forEach((e=>{const a=e.split(\"-\");if(1===a.length){const e=parseInt(t(a[0]));!isNaN(e)&&this.pagesToImport.push(e)}else if(2===a.length){const e=parseInt(t(a[0])),i=parseInt(t(a[1]));if(isNaN(e)||isNaN(i))return;for(let t=e;t<=i;t++)this.pagesToImport.push(t)}})),this.pagesToImport}setImageSizeMessage=()=>this.imageSizeMessage.innerText=`${Math.round(this.pageDimensions.width*this.importScale)} x ${Math.round(this.pageDimensions.height*this.importScale)}`;async createForm(){await this.plugin.loadSettings(),this.borderBox=this.plugin.settings.pdfBorderBox,this.frame=this.plugin.settings.pdfFrame,this.gapSize=this.plugin.settings.pdfGapSize,this.groupPages=this.plugin.settings.pdfGroupPages,this.numColumns=this.plugin.settings.pdfNumColumns,this.numRows=this.plugin.settings.pdfNumRows,this.direction=this.plugin.settings.pdfDirection,this.lockAfterImport=this.plugin.settings.pdfLockAfterImport,this.importScale=this.plugin.settings.pdfImportScale;const e=this.contentEl;let t,a,i,n;const r=()=>this.pdfDoc?0===this.pagesToImport.length?(i.buttonEl.style.display=\"none\",void(n.innerText=t$d(\"IPM_SELECT_PAGES_TO_IMPORT\"))):Math.max(...this.pagesToImport)<=this.pdfDoc.numPages?(i.buttonEl.style.display=\"block\",void(n.innerText=\"\")):(i.buttonEl.style.display=\"none\",void(n.innerText=`The selected document has ${this.pdfDoc.numPages} pages. Please select pages between 1 and ${this.pdfDoc.numPages}`)):(n.innerText=t$d(\"IPM_SELECT_PDF\"),void(i.buttonEl.style.display=\"none\")),s=()=>{0!==a?t.innerHTML=`There are <b>${a}</b> pages in the selected document.`:t.innerText=t$d(\"IPM_SELECT_PDF\")};let o,l;const c=e=>{const t=this.createPageListFromString(e);t.length>15?l.innerHTML=`You are importing <b>${t.length}</b> pages. \u26a0\ufe0f This may take a while. \u26a0\ufe0f`:l.innerHTML=`You are importing <b>${t.length}</b> pages.`,r()},d=async e=>{this.pdfDoc&&await this.pdfDoc.destroy(),this.pdfDoc=null,e&&(this.pdfDoc=await getPDFDoc(e),this.pdfFile=e,this.pdfDoc?(a=this.pdfDoc.numPages,o.setValue(`1-${a}`),c(`1-${a}`),r(),s(),this.getPDFPageDimensions(this.pdfDoc)):i.setDisabled(!0))},h=new obsidian_module.TextComponent(e);h.inputEl.style.width=\"100%\";const p=new FileSuggestionModal(this.app,h,this.app.vault.getFiles().filter((e=>\"pdf\"===e.extension.toLowerCase())),this.plugin);let u,m,g,f,b;h.onChange((async()=>{const e=p.getSelectedItem();await d(e)})),t=e.createEl(\"p\",{text:\"\"}),s(),new obsidian_module.Setting(e).setName(t$d(\"IPM_PAGES_TO_IMPORT_NAME\")).setDesc(\"e.g.: 1,3-5,7,9-10\").addText((e=>{o=e,e.setValue(\"\").onChange((e=>c(e))),e.inputEl.style.width=\"100%\"})),l=e.createEl(\"p\",{text:\"\"}),this.frame=!this.borderBox&&this.frame,new obsidian_module.Setting(e).setName(t$d(\"IPM_ADD_BORDER_BOX_NAME\")).addToggle((e=>{u=e,e.setValue(this.borderBox).onChange((e=>{this.borderBox=e,e&&(this.frame=!1,m.setValue(!1)),this.dirty=!0}))})),new obsidian_module.Setting(e).setName(t$d(\"IPM_ADD_FRAME_NAME\")).setDesc(t$d(\"IPM_ADD_FRAME_DESC\")).addToggle((e=>{m=e,e.setValue(this.frame).onChange((e=>{this.frame=e,e&&(this.borderBox=!1,u.setValue(!1),this.lockAfterImport||(this.lockAfterImport=!0,g.setValue(!0))),this.dirty=!0}))})),new obsidian_module.Setting(e).setName(t$d(\"IPM_GROUP_PAGES_NAME\")).setDesc(t$d(\"IPM_GROUP_PAGES_DESC\")).addToggle((e=>e.setValue(this.groupPages).onChange((e=>{this.groupPages=e,this.dirty=!0})))),new obsidian_module.Setting(e).setName(\"Lock pages on canvas after import\").addToggle((e=>{g=e,e.setValue(this.lockAfterImport).onChange((e=>{this.lockAfterImport=e,this.dirty=!0}))}));const U=()=>{switch(this.direction){case\"down\":f.settingEl.style.display=\"none\",b.settingEl.style.display=\"\";break;case\"right\":f.settingEl.style.display=\"\",b.settingEl.style.display=\"none\"}};let E,w,y;new obsidian_module.Setting(e).setName(\"Import direction\").addDropdown((e=>e.addOptions({down:\"Top > Down\",right:\"Left > Right\"}).setValue(this.direction).onChange((e=>{this.direction=e,U(),this.dirty=!0})))),f=new obsidian_module.Setting(e),f.setName(\"Number of columns\").addSlider((e=>e.setLimits(1,100,1).setValue(this.numColumns).onChange((e=>{this.numColumns=e,E.innerText=` ${e.toString()}`,this.dirty=!0})))).settingEl.createDiv(\"\",(e=>{E=e,e.style.minWidth=\"2.3em\",e.style.textAlign=\"right\",e.innerText=` ${this.numColumns.toString()}`})),b=new obsidian_module.Setting(e),b.setName(\"Number of rows\").addSlider((e=>e.setLimits(1,100,1).setValue(this.numRows).onChange((e=>{this.numRows=e,w.innerText=` ${e.toString()}`,this.dirty=!0})))).settingEl.createDiv(\"\",(e=>{w=e,e.style.minWidth=\"2.3em\",e.style.textAlign=\"right\",e.innerText=` ${this.numRows.toString()}`})),U(),new obsidian_module.Setting(e).setName(\"Size of gap between pages\").addSlider((e=>e.setLimits(10,200,10).setValue(this.gapSize).onChange((e=>{this.gapSize=e,y.innerText=` ${e.toString()}`,this.dirty=!0})))).settingEl.createDiv(\"\",(e=>{y=e,e.style.minWidth=\"2.3em\",e.style.textAlign=\"right\",e.innerText=` ${this.gapSize.toString()}`}));const v=new obsidian_module.Setting(e).setName(\"Imported page size\").setDesc(`${this.pageDimensions.width*this.importScale} x ${this.pageDimensions.height*this.importScale}`).addSlider((e=>e.setLimits(.1,1.5,.1).setValue(this.importScale).onChange((e=>{this.importScale=e,this.dirty=!0,this.setImageSizeMessage()}))));this.imageSizeMessage=v.descEl;const T=new obsidian_module.Setting(e).setDesc(\"Select a document first\").addButton((e=>{e.setButtonText(\"Import PDF\").setCta().onClick((async()=>{const e=getEA(this.view);let t=0,a=0;const i=Math.round(this.pageDimensions.width*this.importScale),r=Math.round(this.pageDimensions.height*this.importScale);for(let s=0;s<this.pagesToImport.length;s++){const o=this.pagesToImport[s];n.innerText=`Importing page ${o} (${s+1} of ${this.pagesToImport.length})`;const l=Math.round(this.pageDimensions.width*this.importScale*t+this.gapSize*t),c=Math.round(this.pageDimensions.height*this.importScale*a+this.gapSize*a);e.style.strokeColor=this.borderBox?\"#000000\":\"transparent\";const d=e.addRect(l,c,i,r),h=e.getElement(d);this.lockAfterImport&&(h.locked=!0);const p=await e.addImage(l,c,this.pdfFile.path+`#page=${o}`,!1,!1),u=e.getElement(p);if(u.width=i,u.height=r,this.lockAfterImport&&(u.locked=!0),e.addToGroup([d,p]),this.frame){const t=e.addFrame(l,c,i,r,`${o}`);e.getElement(t).frameRole=\"marker\",e.addToGroup([t,d,p]),e.getElement(t).link=this.pdfFile.path+`#page=${o}`}switch(this.direction){case\"right\":t=(t+1)%this.numColumns,0===t&&a++;break;case\"down\":a=(a+1)%this.numRows,0===a&&t++}}if(this.groupPages){const t=e.getElements().filter((e=>!this.frame||\"frame\"===e.type)).map((e=>e.id));e.addToGroup(t)}await e.addElementsToView(!0,!0,!1);const s=e.getExcalidrawAPI(),o=e.getElements().map((e=>e.id)),l=e.getViewElements().filter((e=>o.includes(e.id)));s.selectElements(l),s.zoomToFit(l),e.destroy(),this.close()})),i=e,i.buttonEl.style.display=\"none\"}));n=T.descEl,n.addClass(\"mod-warning\"),this.pdfFile?(h.setValue(this.pdfFile.path),await d(this.pdfFile),p.close(),o.inputEl.focus()):h.inputEl.focus(),r()}}class UniversalInsertFileModal extends obsidian_module.Modal{plugin;view;center={x:0,y:0};file;constructor(e,t){super(e.app),this.plugin=e,this.view=t;const a=t.excalidrawAPI.getAppState(),i=t.containerEl.getBoundingClientRect(),n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,s=sceneCoordsToViewportCoords({sceneX:t.currentPosition.x,sceneY:t.currentPosition.y},a);if(s.x>=i.left+150&&s.y<=i.right-150&&s.y>=i.top+150&&s.y<=i.bottom-150){const e=t.currentPosition.x-MAX_IMAGE_SIZE/2,a=t.currentPosition.y-MAX_IMAGE_SIZE/2;this.center={x:e,y:a}}else{const e=i.left+i.width/2,t=i.top+i.height/2,s=Math.max(0,Math.min(n,e)),o=Math.max(0,Math.min(r,t));this.center=viewportCoordsToSceneCoords({clientX:s,clientY:o},a),this.center={x:this.center.x-MAX_IMAGE_SIZE/2,y:this.center.y-MAX_IMAGE_SIZE/2}}}onKeyDown;open(e,t){this.file=e,this.center=t??this.center,super.open()}onOpen(){this.containerEl.classList.add(\"excalidraw-release\"),this.titleEl.setText(t$d(\"UIFM_TITLE\")),this.createForm()}async createForm(){const e=this.contentEl;let t,a,i,n,r,s,o=!1,l=this.file;const c=async()=>{const e=this.plugin.ea,o=l===this.view.file,c=l&&\"md\"===l.extension&&!e.isExcalidrawFile(l),d=l&&(IMAGE_TYPES.contains(l.extension)||e.isExcalidrawFile(l)),h=l&&ANIMATED_IMAGE_TYPES.contains(l.extension),p=l&&!d,u=l&&\"pdf\"===l.extension,m=l&&e.isExcalidrawFile(l),g=l&&\"md\"===l.extension?(await this.plugin.app.metadataCache.blockCache.getForFile({isCancelled:()=>!1},l)).blocks.filter((e=>e.display&&\"heading\"===e.node?.type)).filter((e=>!m||!MD_EX_SECTIONS.includes(e.display))):null;if(c||m&&g?.length>0){for(a.settingEl.style.display=\"\",t.selectEl.style.display=\"block\";t.selectEl.options.length>0;)t.selectEl.remove(0);m||t.addOption(\"\",\"\"),g.forEach((e=>{t.addOption(`#${cleanSectionHeading(e.display)}`,e.display)}))}else a.settingEl.style.display=\"none\",t.selectEl.style.display=\"none\";s.settingEl.style.display=m&&!o?\"\":\"none\",n.buttonEl.style.display=o||!d&&\"md\"!==l?.extension?\"none\":\"block\",i.buttonEl.style.display=p||h||m&&g?.length>0?\"block\":\"none\",r.buttonEl.style.display=u?\"block\":\"none\"},d=(await this.plugin.app.metadataCache.blockCache.getForFile({isCancelled:()=>!1},this.view.file)).blocks.filter((e=>e.display&&\"heading\"===e.node?.type)).filter((e=>!MD_EX_SECTIONS.includes(e.display))),h=new obsidian_module.TextComponent(e);h.inputEl.style.width=\"100%\";const p=new FileSuggestionModal(this.app,h,this.app.vault.getFiles().filter((e=>d?.length>0||e!==this.view.file)),this.plugin);h.onChange((()=>{l=p.getSelectedItem(),c()})),a=new obsidian_module.Setting(e).setName(t$d(\"UIFM_SECTION_HEAD\")).addDropdown((e=>{t=e,t.selectEl.style.width=\"100%\"})),s=new obsidian_module.Setting(e).setName(t$d(\"UIFM_ANCHOR\")).setDesc(t$d(\"UIFM_ANCHOR_DESC\")).addToggle((e=>{e.setValue(o).onChange((e=>{o=e}))})),new obsidian_module.Setting(e).addButton((e=>{e.setButtonText(t$d(\"UIFM_BTN_EMBEDDABLE\")).onClick((async()=>{const e=this.app.metadataCache.fileToLinktext(l,this.view.file.path,\"md\"===l.extension),a=getEA(this.view);a.selectElementsInView([await insertEmbeddableToView(a,this.center,void 0,`[[${e}${t.selectEl.value}]]`)]),a.destroy(),this.close()})),i=e})).addButton((e=>{e.setButtonText(t$d(\"UIFM_BTN_PDF\")).onClick((()=>{new InsertPDFModal(this.plugin,this.view).open(l),this.close()})),r=e})).addButton((e=>{e.setButtonText(t$d(\"UIFM_BTN_IMAGE\")).onClick((async()=>{const e=getEA(this.view),a=l&&\"md\"===l.extension&&!e.isExcalidrawFile(l);e.selectElementsInView([await insertImageToView(e,this.center,a&&t.selectEl.value&&\"\"!==t.selectEl.value?`${l.path}${t.selectEl.value}`:l,e.isExcalidrawFile(l)?!o:void 0)]),e.destroy(),this.close()})),n=e})),this.view.ownerWindow.addEventListener(\"keydown\",this.onKeyDown=e=>{const t=e=>\"none\"!==e.buttonEl.style.display;switch(e.key){case\"Escape\":return void this.close();case\"Enter\":return!t(i)||t(n)||t(r)?!t(n)||t(i)||t(r)?!t(r)||t(i)||t(n)?void 0:void r.buttonEl.click():void n.buttonEl.click():void i.buttonEl.click();case\"i\":return void(t(n)&&n.buttonEl.click());case\"p\":return void(t(r)&&r.buttonEl.click());case\"f\":return void(t(i)&&i.buttonEl.click())}}),h.inputEl.focus(),l&&(h.setValue(l.path),p.close()),c()}onClose(){this.view.ownerWindow.removeEventListener(\"keydown\",this.onKeyDown),this.view=null,this.file=null,this.plugin=null}}function setPen(e,t){const a=t.getAppState();t.updateScene({appState:{currentStrokeOptions:e.penOptions,...e.strokeWidth&&0!==e.strokeWidth?{currentItemStrokeWidth:e.strokeWidth}:null,...e.backgroundColor?{currentItemBackgroundColor:e.backgroundColor}:null,...e.strokeColor?{currentItemStrokeColor:e.strokeColor}:null,...\"\"===e.fillStyle?null:{currentItemFillStyle:e.fillStyle},...e.roughness?null:{currentItemRoughness:e.roughness},...e.freedrawOnly&&!a.resetCustomPen?{resetCustomPen:{currentItemStrokeWidth:a.currentItemStrokeWidth,currentItemBackgroundColor:a.currentItemBackgroundColor,currentItemStrokeColor:a.currentItemStrokeColor,currentItemFillStyle:a.currentItemFillStyle,currentItemRoughness:a.currentItemRoughness}}:null},captureUpdate:CaptureUpdateAction.NEVER})}function resetStrokeOptions(e,t,a){t.updateScene({appState:{...e?{currentItemStrokeWidth:e.currentItemStrokeWidth,currentItemBackgroundColor:e.currentItemBackgroundColor,currentItemStrokeColor:e.currentItemStrokeColor,currentItemFillStyle:e.currentItemFillStyle,currentItemRoughness:e.currentItemRoughness}:null,resetCustomPen:null,...a?{currentStrokeOptions:null}:null},captureUpdate:CaptureUpdateAction.NEVER})}class ObsidianMenu{plugin;toolsRef;view;clickTimestamp;activePen;longpressTimeout={};prevClickTimestamp=0;constructor(e,t,a){this.plugin=e,this.toolsRef=t,this.view=a,this.clickTimestamp=Array.from({length:Object.keys(PENS).length},(()=>0))}actionCustomPenLabelClick(e,t){const a=Date.now();if(a-this.clickTimestamp[e]<500){const t=new PenSettingsModal(this.plugin,this.view,e);return void(async()=>{await this.plugin.loadSettings(),t.open()})()}this.clickTimestamp[e]=a;const i=this.view.excalidrawAPI,n=i.getAppState();n.currentStrokeOptions!==t.penOptions||\"freedraw\"!==n.activeTool.type?(this.activePen={...t},setPen(t,i),i.setActiveTool({type:\"freedraw\"})):resetStrokeOptions(n.resetCustomPen,i,!0)}actionScriptButtonPonterUp(e,t){this.longpressTimeout[e]&&(this.view.ownerWindow.clearTimeout(this.longpressTimeout[e]),this.longpressTimeout[e]=0,(async()=>{const e=this.view.app.vault.getAbstractFileByPath(t);e&&e instanceof obsidian_module.TFile&&this.plugin.scriptEngine.executeScript(this.view,await this.view.app.vault.read(e),this.plugin.scriptEngine.getScriptName(e),e)})())}actionScriptButtonPointerDown(e,t){const a=Date.now();this.longpressTimeout[e]>0&&(this.view.ownerWindow.clearTimeout(this.longpressTimeout[e]),this.longpressTimeout[e]=0),a-this.prevClickTimestamp>=500&&(this.longpressTimeout[e]=this.view.ownerWindow.setTimeout((()=>{this.longpressTimeout[e]=0,(async()=>{await this.plugin.loadSettings();const e=this.plugin.settings.pinnedScripts.indexOf(t);e>-1&&(this.plugin.settings.pinnedScripts.splice(e,1),this.view.excalidrawAPI?.setToast({message:`Pin removed: ${name}`,duration:3e3,closable:!0})),await this.plugin.saveSettings(),getExcalidrawViews(this.plugin.app).forEach((e=>e.updatePinnedScripts()))})()}),1500)),this.prevClickTimestamp=a}actionShowHideMenu(e,t){this.toolsRef.current.setTheme(t.theme),this.toolsRef.current.toggleVisibility(t.zenModeEnabled||e)}actionInsertAnyFile(){this.view.setCurrentPositionToCenter(),new UniversalInsertFileModal(this.plugin,this.view).open()}renderCustomPens(e,t){return t.customPens?.map(((a,i)=>{const n=this.plugin.settings.customPens[i];return t.resetCustomPen&&\"freedraw\"!==t.activeTool.type&&t.currentStrokeOptions===n.penOptions&&setTimeout((()=>resetStrokeOptions(t.resetCustomPen,this.view.excalidrawAPI,!1))),!t.resetCustomPen&&\"freedraw\"===t.activeTool.type&&t.currentStrokeOptions===n.penOptions&&n.freedrawOnly&&setTimeout((()=>setPen(this.activePen,this.view.excalidrawAPI))),this.activePen&&t.resetCustomPen&&\"freedraw\"===t.activeTool.type&&t.currentStrokeOptions===n.penOptions&&n.freedrawOnly&&(this.activePen.strokeWidth=t.currentItemStrokeWidth,this.activePen.backgroundColor=t.currentItemBackgroundColor,this.activePen.strokeColor=t.currentItemStrokeColor,this.activePen.fillStyle=t.currentItemFillStyle,this.activePen.roughness=t.currentItemRoughness),React__namespace.createElement(\"label\",{key:i,className:clsx(\"ToolIcon\",\"ToolIcon_size_medium\",{\"is-mobile\":e}),onClick:this.actionCustomPenLabelClick.bind(this,i,n)},React__namespace.createElement(\"div\",{className:\"ToolIcon__icon\",\"aria-label\":DEVICE.isDesktop?n.type:void 0,style:{...\"freedraw\"===t.activeTool.type&&t.currentStrokeOptions===n.penOptions?{background:\"var(--color-primary)\"}:{}}},penIcon(n)))}))}renderPinnedScriptButtons(e,t){return t?.pinnedScripts?.map(((t,a)=>{const i=this.plugin.scriptEngine.scriptIconMap[t],n=i?.name??\"\",r=i?.svgString?stringToSVG(i.svgString):ICONS.cog;return this.longpressTimeout[a]||(this.longpressTimeout[a]=0),React__namespace.createElement(\"label\",{key:a,className:clsx(\"ToolIcon\",\"ToolIcon_size_medium\",{\"is-mobile\":e}),onPointerUp:this.actionScriptButtonPonterUp.bind(this,a,t),onPointerDown:this.actionScriptButtonPointerDown.bind(this,a,t)},React__namespace.createElement(\"div\",{className:\"ToolIcon__icon\",\"aria-label\":DEVICE.isDesktop?n:void 0},r))}))}renderButton(e,t){return React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(\"label\",{className:clsx(\"ToolIcon\",\"ToolIcon_size_medium\",{\"is-mobile\":e}),onClick:this.actionShowHideMenu.bind(this,e,t)},React__namespace.createElement(\"div\",{className:\"ToolIcon__icon\",\"aria-label\":t$d(\"OBSIDIAN_TOOLS_PANEL\")},ICONS.obsidian)),React__namespace.createElement(\"label\",{className:clsx(\"ToolIcon\",\"ToolIcon_size_medium\",{\"is-mobile\":e}),onClick:this.actionInsertAnyFile.bind(this)},React__namespace.createElement(\"div\",{className:\"ToolIcon__icon\",\"aria-label\":t$d(\"UNIVERSAL_ADD_FILE\")},ICONS[\"add-file\"])),this.renderCustomPens(e,t),this.renderPinnedScriptButtons(e,t))}destroy(){Object.values(this.longpressTimeout).forEach((e=>this.view.ownerWindow.clearTimeout(e))),this.longpressTimeout={},this.activePen=null,this.plugin=null,this.toolsRef=null,this.view=null,this.clickTimestamp=null,this.renderButton=null,this.renderCustomPens=null,this.renderPinnedScriptButtons=null}}class ActionButton extends React__namespace.Component{toastMessageTimeout=0;longpressTimeout=0;constructor(e){super(e),this.state={visible:!0}}componentWillUnmount(){this.render=()=>null}render(){return React__namespace.createElement(\"button\",{style:{},className:\"ToolIcon_type_button ToolIcon_size_small ToolIcon_type_button--show ToolIcon\",title:this.props.title,onClick:e=>{this.toastMessageTimeout&&(window.clearTimeout(this.toastMessageTimeout),this.toastMessageTimeout=0,this.props.action(e)),this.longpressTimeout&&(window.clearTimeout(this.longpressTimeout),this.longpressTimeout=0)},onPointerDown:e=>{this.toastMessageTimeout=window.setTimeout((()=>{new obsidian_module.Notice(this.props.title,3e3),this.toastMessageTimeout=0}),400),this.longpressTimeout=window.setTimeout((()=>{this.props.longpress?this.props.longpress(e):new obsidian_module.Notice(\"Cannot pin this action\",3e3),this.longpressTimeout=0}),1500)}},React__namespace.createElement(\"div\",{className:\"ToolIcon__icon\",\"aria-hidden\":\"true\"},this.props.icon))}}const FIRST_RUN='\\nThe Excalidraw Obsidian plugin is much more than \"just\" a drawing tool. To help you get started here\\'s a showcase of the key Excalidraw plugin features.\\n\\nIf you\\'d like to learn more, please subscribe to my YouTube channel: [Visual PKM](https://www.youtube.com/channel/UCC0gns4a9fhVkGkngvSumAQ) where I regularly share videos about Obsidian-Excalidraw and about tools and techniques for Visual Personal Knowledge Management.\\n\\nThank you & Enjoy!\\n\\n<div class=\"excalidraw-videoWrapper\">\\n<a href=\"https://www.youtube.com/watch?v=P_Q6avJGoWI\" target=\"_blank\"><img src =\"https://i.ytimg.com/vi/P_Q6avJGoWI/maxresdefault.jpg\" style=\"width:100%;\"></a>\\n</div>\\n',RELEASE_NOTES={Intro:'After each update, you\\'ll see these release notes (you can turn this off in the plugin settings).\\n\\nI build this plugin in my free time, as a labor of love. Curious about the philosophy behind it? Check out [\ud83d\udcd5 Sketch Your Mind](https://sketch-your-mind.com). If you find it valuable, say THANK YOU or\u2026\\n\\n<div class=\"ex-coffee-div\"><a href=\"https://ko-fi.com/zsolt\"><img src=\"https://storage.ko-fi.com/cdn/kofi6.png?v=6\" border=\"0\" alt=\"Buy Me a Coffee at ko-fi.com\"  height=45></a></div>\\n',\"2.16.1\":\"\\n## Fixed\\n- Based on a request from [Kevin](https://github.com/Kovah) referencing GDPR, I removed YouTube iframes from settings, scripts, etc., and replaced them with thumbnail images + links to YouTube. [#2234](https://github.com/zsviczian/obsidian-excalidraw-plugin/discussions/2234)\",\"2.16.0\":'\\n<div class=\"excalidraw-videoWrapper\">\\n<a href=\"https://www.youtube.com/watch?v=51EgDgtiZgQ\" target=\"_blank\"><img src =\"https://i.ytimg.com/vi/51EgDgtiZgQ/maxresdefault.jpg\" style=\"width:100%;\"></a>\\n</div>\\n\\n## New from Excalidraw.com\\n- New library search feature [#9903](https://github.com/excalidraw/excalidraw/pull/9903)\\n  - You can rename library items by selecting them, then choosing \"Rename or publish\" from the ... menu.\\n- New compact mode for tablets [#9910](https://github.com/excalidraw/excalidraw/pull/9910)\\n  - New setting in plugin setting `Compact-mode on Tablets` to override tray-mode on tablets in favor of the new compact mode.\\n\\n## New\\n- Embedding PDF as images, frames are now marker frames instead of regular frames. You can reference pages, including their markup in markdown notes, using this syntax: `![[drawing#^frame=12]]` (page 12)\\n- Pinned scripts toolbar is now on the right side in all modes: tray-, normal-, and compact. The toolbar moves into view when the side panel is opened for the stencil library or for search.\\n- Better RTL support, pinned scripts are rendered on the left side in RTL mode.\\n\\n## Fixed\\n- Critical fix: When clicking to follow a link in a markdown embeddable in preview mode to open an Excalidraw drawing in the same tab, the back of the newly opened drawing was overwritten with the content of the source drawing.\\n- PDF++ Links from document to Excalidraw select everything in the scene instead of the linked element. [#2503](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2503)\\n\\n',\"2.15.3\":\"\\n## Fixed\\n- New back of the note cards are not visible until the drawing is saved. When adding a back-of-the-note card using the context menu, the card got placed at the absolute 0,0 position in the scene instead of the current pointer position. [#9949](https://github.com/excalidraw/excalidraw/issues/9949)\\n- Drawings created 4 years ago don't open [#2479](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2479)\\n- On Obsidian Mobile, when an element has multiple links, clicking the link icon, the link selector pops up and immediately closes\\n- Improved handling of importing external images and drag and drop of images from inside Obsidian. Features like (Convert SVG to Strokes) and (Flip the card) now work immediately, you don't need to force save, or wait for autosave to kick in.\\n\\n## New\\n- Added startup check that detects when Obsidian's recorded plugin version differs from the installed Excalidraw code (e.g. after partial sync of large files) and offers to update or ignore, with a setting to disable the check.\\n- When Excalidraw is open in two or more tabs\u2014either as Markdown or Excalidraw\u2014auto-zoom is disabled. This allows you to work in multiple tabs on the same drawing at once: focusing on different areas of the same drawing, or editing the Markdown and Excalidraw views in parallel.\\n\",\"2.15.2\":\"\\n## Fixed:\\n- Pressing enter on a text element erroneously activated all markdown embeddables in the scene. [discord](https://discord.com/channels/1026825302900494357/1412683408424833045)\\n- After updating to PDF++ 0.40.31, touch scrolling of embedded PDF documents stopped working on mobile devices, and the PDF document appeared with the wrong themes in some cases.\\n- Issue with the Kanban board as an active embeddable on mobile phones is fixed.\\n\\n## Fixed in ExcalidrawAutomate\\n- `getActiveEmbeddableViewOrEditor (view?:ExcalidrawView): {view:any}|{file:TFile, editor:Editor}|{node: ObsidianCanvasNode}|null;` no returns the node, instead of the empty view from the leaf.\\n\",\"2.15.1\":'\\n## Fixed\\n- PDF improvements\\n  - It was not possible to scroll the embedded PDF. [#9891](https://github.com/excalidraw/excalidraw/pull/9891)\\n  - Embedded PDF pages were blurred (pixelated).\\n  - Embedded PDF now accurately follows `excalidraw-embeddable-theme` document property.\\n    - auto: follows Excalidraw theme (regardless of Obsidian theme)\\n    - default: follows Obsidian theme (regardless of Excalidraw theme)\\n    - dark: always displays the PDF in dark mode (regardless of Excalidraw and Obsidian themes)\\n    - light: always displays the PDF in light mode (regardless of Excalidraw and Obsidian themes)\\n  - New embeddable-menu buttons:\\n    - Snapshot: inserts an image of the current active page to the scene\\n    - Bookmark: updates the embed link to the current page\\n- Pasting an oversized image triggered an error and caused Excalidraw to discard the scene. [#2453](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2453), [#9878](https://github.com/excalidraw/excalidraw/issues/9878)\\n- Video with local URI will no longer autoplay when the scene loads\\n- Error creating link to element when element is a sticky note\\n- Area link embeds hide the content of the objects within the area [#2461](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2461)\\n- On Obsidian Mobile 1.9.10, embeddables could cause a black/white screen (no active view) until reselecting the Excalidraw page; [#2460](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2460)\\n- Scrolling of embedded web pages on mobile devices is working again.\\n\\n## New\\n- Insert Any File now supports adding Audio files.\\n- New option in settings under \"Zoom and Pan\". Pan with right mouse button (Miro-style): right-click and drag to pan the canvas. Press \\'m\\' for the context menu (disabled while editing text). \ud83d\ude4f [@mfuria](https://github.com/mfuria) for making this happen! [#2450](https://github.com/zsviczian/obsidian-excalidraw-plugin/pull/2450), [#329](https://github.com/zsviczian/excalidraw/pull/329)\\n- Insert image in the main toolbar now opens a dropdown menu of options: Insert from system, insert from Vault, insert Card, and insert LaTeX. [#2448](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2448)\\n\\n## Deprecated\\n- Removed \"Toggle RAW mode\" from the Command Palette and the Obsidian Tools menu due to low usage. RAW mode remains available by adding `excalidraw-plugin: raw` to the note\\'s YAML frontmatter/document properties.\\n\\n## New in ExcalidrawAutomate\\n```ts\\n/**\\n * Returns the center position of the current view in Excalidraw coordinates.\\n * @returns {{x:number, y:number}} The center position of the view.\\n */\\npublic getViewCenterPosition(): {x:number, y:number};\\n```\\n',\"2.15.0\":'\\n<div class=\"excalidraw-videoWrapper\">\\n<a href=\"https://www.youtube.com/watch?v=DqDnzCOoYMc\" target=\"_blank\"><img src =\"https://i.ytimg.com/vi/DqDnzCOoYMc/maxresdefault.jpg\" style=\"width:100%;\"></a>\\n</div>\\n\\n## New\\n- Introducing **Marker Frames**. These are special frames that can be used to mark slides, pages areas for PDF printouts, image references, etc.\\n  To create a marker frame, create a frame and toggle the marker frame in the elements properties panel.\\n    - Markers are not included in exports such as images or PDFs.\\n    - Markers do not contain elements\\n    - Markers can be hidden/shown from the canvas context menu\\n- Updated the \"Printable Layout Wizard\" script\\n  - Now works with marker frames\\n  - Supports different page sizes and orientations within a single PDF document\\n  - The printout may include non-marker frames (e.g., PDF image embeds in frames)\\n- Pro-tip: You can also use marker frames... \\n    - with the Slideshow plugin\\n    - to create image-area references such that the frames do not get rendered in exported images, and you can reference areas by frame name\\n- Performance improvement of Image-area references\\n\\n# New in ExcalidrawAutomate\\n- `createPDF()` now supports `SVG[]` array of SVGs with different sizes.\\n- New function:\\n```ts\\n  /**\\n   * Gets the elements within a specific area.\\n   * @param elements - The elements to check.\\n   * @param param1 - The area to check against.\\n   * @returns The elements within the area.\\n   */\\n  elementsInArea(\\n    elements: NonDeletedExcalidrawElement[], \\n    {x, y, width, height}:{\\n      x:number; y:number; width:number; height:number;\\n    }\\n  ):ExcalidrawElement[] \\n```\\n',\"2.14.3\":'\\n<div class=\"excalidraw-videoWrapper\">\\n<a href=\"https://www.youtube.com/watch?v=29EWeglRm7s\" target=\"_blank\"><img src =\"https://i.ytimg.com/vi/29EWeglRm7s/maxresdefault.jpg\" style=\"width:100%;\"></a>\\n</div>\\n\\nUpdated the Printable Layout Wizard script with the option to exclude empty pages.\\n\\n## Fixed\\n- If a frame is locked, elements created over the frame or dragged over the frame should not be auto-added to the frame. [#9850](https://github.com/excalidraw/excalidraw/issues/9850)\\n\\n## Fixed in ExcalidrawAutomate\\n- Not all AppState properties were being correctly copied to the template when creating a new drawing with ea.create() [#2440](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2440)\\n',\"2.14.2\":'\\n## Fixed\\n- Converting Markdown to Excalidraw (\"Back of note\"/\"Convert markdown to ExcaliDrawing\") no longer appends T00:00:00.000Z to an existing date frontmatter field and handles merging of lists such as tags intelligently [#2414](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2414)\\n- Multi\u2011point line creation on touchscreens (tap\u2013tap\u2013tap) produced a horizontal line after using a pen. Fixed. [#9840](https://github.com/excalidraw/excalidraw/pull/9840#issuecomment-3165319266)\\n\\n## New\\n- Zoom settings (Settings \u2192 Excalidraw \u2192 Appearance and Behavior \u2192 Zoom) [#2434](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2434):\\n  - Zoom increment (default 5%) to fine\u2011tune mouse wheel / gesture precision.\\n  - Minimum zoom (default 10%) controls how far you can zoom out (below 10% may be unstable\u2014use with caution).\\n  - Maximum zoom (default 3000%) defines the upper zoom limit.\\n- Palm Guard script (in script store): Mobile-friendly drawing mode for stylus users. Enters fullscreen, hides UI, shows a draggable minimal toolbar (toggle + exit) to prevent accidental palm taps; single tap to exit. Inspired by [#2409](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2409)\\n\\n<div class=\"excalidraw-videoWrapper\">\\n<a href=\"https://www.youtube.com/watch?v=A_udjVjgWN0\" target=\"_blank\"><img src =\"https://i.ytimg.com/vi/A_udjVjgWN0/maxresdefault.jpg\" style=\"width:100%;\"></a>\\n</div>\\n\\n## ExcalidrawAutomate\\n- Improved `FloatingModal` behavior. Floating Modal now does not trap keyboard events, the header element does not block \"X\" button in the top right corner, all four corners are rounded on Mobile Devices.\\n\\n',\"2.14.1\":'\\n## Fixed\\n- Excalidraw broke Obsidian\\'s UI in Arabic, Persian, and Hebrew due to LTR, RTL conflict. [#2423](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2423) \\n- Styling issues impacting native Obsidian search/replace dialogs. [#2420](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/2420)\\n- Now using native Obsidian attachment location function. \ud83d\ude4f [mnaoumov](https://github.com/mnaoumov) [#2421](https://github.com/zsviczian/obsidian-excalidraw-plugin/pull/2421), potentially fixes [#179](https://github.com/RainCat1998/obsidian-custom-attachment-location/issues/179) of the Obsidian Custom Attachment Location plugin issue.\\n\\n## New\\n- New frontmatter option `excalidraw-embed-md`. When set to `true`, embedding the drawing into a markdown note will render the \"back of the note\" (its markdown content) instead of rendering it as an image.\\n  - If you want to always display the drawing as an image, even when `excalidraw-embed-md` is enabled, use the special embed syntax: `![[drawing#^as-image]]`. Here, `as-image` is a phantom block reference that forces image rendering.\\n- Added Spanish translation by [@Joakim31](https://github.com/Joakim31) [#2425](https://github.com/zsviczian/obsidian-excalidraw-plugin/pull/2425)\\n- Incremental minor updates from the main [Excalidraw project](https://github.com/excalidraw/excalidraw).\\n',\"2.14.0\":'\\n## A Big \"Small\" Update\\n- Added search to Excalidraw Settings, plus added a link to access the public NotebookLM workbook pre-loaded with everything about the plugin\\n- New Taiwan-idiomatic Traditional Chinese translation by [@rlan](https://github.com/rlan) [#2413](https://github.com/zsviczian/obsidian-excalidraw-plugin/pull/2413)\\n'};class ReleaseNotes extends obsidian_module.Modal{plugin;version;constructor(e,t,a){super(e),this.plugin=t,this.version=a}onOpen(){const{containerEl:e,contentEl:t,titleEl:a,headerEl:i}=this;e.classList.add(\"excalidraw-release\"),a.setText(`${t$d(\"RN_WELCOME\")} ${this.version??\"\"}`),this.createForm(),i&&(i.style.pointerEvents=\"none\")}async onClose(){this.contentEl.empty(),await this.plugin.loadSettings(),this.plugin.settings.previousRelease!==PLUGIN_VERSION&&(this.plugin.settings.previousRelease=PLUGIN_VERSION,await this.plugin.saveSettings())}async createForm(){let e=this.plugin.settings.previousRelease;e=this.version===e?\"0.0.0\":e;const t=this.version?Object.keys(RELEASE_NOTES).filter((t=>\"Intro\"===t||isVersionNewerThanOther(t,e))).map((e=>`${\"Intro\"===e?\"\":`# ${e}\\n`}${RELEASE_NOTES[e]}`)).slice(0,10).join(\"\\n\\n---\\n\"):FIRST_RUN;await obsidian_module.MarkdownRenderer.render(this.app,t,this.contentEl,\"\",this.plugin),this.contentEl.createEl(\"p\",{text:\"\"},(e=>{e.style.textAlign=\"right\",e.createEl(\"button\",{text:\"Close\"}).onclick=()=>this.close()}))}}const DPI=96,STANDARD_PAGE_SIZES={A0:{width:3179.52,height:4494.96},A1:{width:2245.76,height:3179.52},A2:{width:1587.76,height:2245.76},A3:{width:1122.56,height:1587.76},A4:{width:794.56,height:1122.56},A5:{width:559.37,height:794.56},A6:{width:397.28,height:559.37},Legal:{width:816,height:1344},Letter:{width:816,height:1056},Tabloid:{width:1056,height:1632},Ledger:{width:1632,height:1056},\"HD Screen\":{width:1920,height:1080},\"MATCH IMAGE\":{width:0,height:0}};function getMarginValue(e){switch(e){case\"none\":return{left:0,right:0,top:0,bottom:0};case\"tiny\":return{left:10,right:10,top:10,bottom:10};default:return{left:60,right:60,top:60,bottom:60}}}function getPageDimensions(e,t,a){let i;return i=STANDARD_PAGE_SIZES[e],a&&0===i.width&&0===i.height&&(i={width:a.width,height:a.height}),\"portrait\"===t||\"MATCH IMAGE\"===e||\"HD Screen\"===e?{width:i.width,height:i.height}:{width:i.height,height:i.width}}function getPageSizePixels(e,t=!1){if(\"object\"==typeof e)return e;const a=STANDARD_PAGE_SIZES[e];if(!a)throw new Error(`Unsupported page size: ${e}`);return t?{width:a.height,height:a.width}:{width:a.width,height:a.height}}function getPageSize(e){if(\"string\"==typeof e)return e;if(!e||\"object\"!=typeof e||\"number\"!=typeof e.width||\"number\"!=typeof e.height)throw new Error(\"Invalid page dimensions\");return{width:e.width/DPI,height:e.height/DPI}}async function getSavePath(e){return(await window.electron.remote.dialog.showSaveDialog({defaultPath:e,filters:[{name:\"PDF Files\",extensions:[\"pdf\"]},{name:\"All Files\",extensions:[\"*\"]}],properties:[\"showOverwriteConfirmation\"]})).filePath}async function printPdf(e,t,a,i,n,r,s=!0,o=\"\",l){const c=document.createElement(\"style\");c.textContent=`\\n    @media print {\\n      /* Ensure the print root expands to the widest page and is not constrained by app layout */\\n      .print {\\n        background-color: ${a} !important;\\n        display: block !important;\\n        width: max-content !important;\\n        max-width: none !important;\\n        overflow: visible !important;\\n        -webkit-print-color-adjust: exact !important;\\n        print-color-adjust: exact !important;\\n        margin: 0 !important;\\n        padding: 0 !important;\\n        position: static !important;\\n        transform: none !important;\\n        box-sizing: content-box !important;\\n      }\\n      .print > * {\\n        width: max-content !important;\\n        max-width: none !important;\\n      }\\n      .print-page {\\n        display: block !important;\\n        break-after: page !important;\\n        page-break-after: always !important;\\n        break-inside: avoid-page !important;\\n        overflow: visible !important;\\n        margin: 0 !important;\\n        position: relative !important;\\n      }\\n      /* Keep spacer tiny; it still establishes the initial page box */\\n      .print-page.dummy-first {\\n        width: 1px !important;\\n        height: 1px !important;\\n      }\\n      .print svg,\\n      .print img,\\n      .print canvas {\\n        max-width: none !important;\\n        max-height: none !important;\\n      }\\n      ${o}\\n    }\\n  `,document.head.appendChild(c);const d=document.body.createDiv(\"print\");d.style.top=\"0\",d.style.left=\"0\",d.style.display=\"flex\",d.appendChild(e);const h={includeName:!1,pageSize:getPageSize(i),landscape:n,margins:r,scaleFactor:100,scale:1,open:s,filepath:t,preferCSSPageSize:!0,...l?{pageRanges:l}:{}};try{await new Promise((e=>{window.electron.ipcRenderer.once(\"print-to-pdf\",e),window.electron.ipcRenderer.send(\"print-to-pdf\",h)}))}finally{d.remove(),c.remove()}}function calculateDimensions(e,t,a,i,n,r,s){const o=e.getAttribute(\"viewBox\")?.split(\" \").map(Number)||[0,0,t,a],[l,c]=o,d=i.width-n.left-n.right,h=i.height-n.top-n.bottom;if(r.fitToPage>0){let e=0,i=100,n=1;const s=1e-6;for(;i-e>s;){const s=(e+i)/2,o=t*s,l=a*s;Math.ceil(o/d)*Math.ceil(l/h)>r.fitToPage?i=s:(n=s,e=s)}r.zoom=Math.round(.99999*n*1e6)/1e6}const p=t*(r.zoom||1),u=a*(r.zoom||1);if(p<=d&&u<=h){const e=calculatePosition(p,u,i.width,i.height,n,s);return{tiles:[{viewBox:`${l} ${c} ${t} ${a}`,width:p,height:u,x:e.x,y:e.y}],pages:1}}const m=Math.ceil(p/d),g=Math.ceil(u/h),f=calculatePosition(p,u,m*d,g*h,{left:0,right:0,top:0,bottom:0},s),b=[];for(let e=0;e<g;e++)for(let t=0;t<m;t++){const a=t*d,o=e*h,m=Math.max(a,f.x),g=Math.max(o,f.y),U=Math.min(a+d,f.x+p),E=Math.min(o+h,f.y+u),w=Math.max(0,U-m),y=Math.max(0,E-g);if(w<=0||y<=0)continue;const v=(m-f.x)/(r.zoom||1),T=(g-f.y)/(r.zoom||1),S=w/(r.zoom||1),_=y/(r.zoom||1);let C=n.left,I=n.top;const x=w/d;C=x>=.99&&x<=1.01?n.left:\"center\"===s||\"top-center\"===s||\"bottom-center\"===s?0===t?n.left+(d-w):n.left:s.endsWith(\"right\")?i.width-n.right-w:n.left;const A=y/h;I=A>=.99&&A<=1.01?n.top:\"center\"===s||\"center-left\"===s||\"center-right\"===s?0===e?n.top+(h-y):n.top:s.startsWith(\"bottom\")?i.height-n.bottom-y:n.top,b.push({viewBox:`${v+l} ${T+c} ${S} ${_}`,width:w,height:y,x:C,y:I})}return{tiles:b,pages:b.length}}function calculatePosition(e,t,a,i,n,r){const s=a-n.left-n.right,o=i-n.top-n.bottom;let l=n.left,c=n.top;return\"center\"===r||\"top-center\"===r||\"bottom-center\"===r?l=n.left+(s-e)/2:r.endsWith(\"right\")&&(l=n.left+s-e),\"center\"===r||\"center-left\"===r||\"center-right\"===r?c=n.top+(o-t)/2:r.startsWith(\"bottom\")&&(c=n.top+o-t),{x:l,y:c}}async function exportToPDF({SVG:e,scale:t={fitToPage:1,zoom:1},pageProps:a,filename:i}){if(!DEVICE.isDesktop)return void new obsidian_module.Notice(t$d(\"PDF_EXPORT_DESKTOP_ONLY\"));const n=await getSavePath(i);if(!n)return;const r=a?.dimensions;if(!r||\"number\"!=typeof r.width||\"number\"!=typeof r.height||r.width<=0||r.height<=0){new obsidian_module.Notice(t$d(\"EXPORTDIALOG_PDF_PROGRESS_NOTICE\"));try{const i=createDiv();i.style.width=\"100%\",i.style.height=\"fit-content\";const r=new Map,s=(e,t)=>`${e.toFixed(2)}x${t.toFixed(2)}`,o=e=>e/DPI,l=e=>`p_${e.replace(/[^\\w-]/g,\"_\")}`;for(const n of e){const e=parseFloat(n.getAttribute(\"width\")||\"0\"),o=parseFloat(n.getAttribute(\"height\")||\"0\"),c={width:e,height:o},d=s(c.width,c.height);r.has(d)||r.set(d,{name:l(d),w:c.width,h:c.height});const{tiles:h}=calculateDimensions(n,e,o,c,a.margin,t,a.alignment),{width:p,height:u}=getPageSizePixels(c,!1),m=r.get(d).name;for(const e of h){const t=createDiv();t.addClass(\"print-page\"),t.addClass(m),t.style.setProperty(\"page\",m),t.style.width=`${p}px`,t.style.height=`${u}px`,t.style.display=\"flex\",t.style.justifyContent=\"start\",t.style.alignItems=\"left\",t.style.left=`${a.margin.left}px`,t.style.top=`${a.margin.top}px`,t.style.position=\"relative\";const r=n.cloneNode(!0);r.setAttribute(\"viewBox\",e.viewBox),r.style.width=`${e.width}px`,r.style.height=`${e.height}px`,r.style.position=\"absolute\",r.style.left=e.x-a.margin.left+\"px\",r.style.top=e.y-a.margin.top+\"px\",t.appendChild(r),i.appendChild(t)}}let c=\"\";for(const{name:e,w:t,h:a}of r.values())c+=`\\n        @page ${e} {\\n          size: ${o(t)}in ${o(a)}in;\\n          margin: 0;\\n        }\\n        .print-page.${e} { page: ${e}; }\\n      `;let d=0,h=0;for(const{w:e,h:t}of r.values())d=Math.max(d,e),h=Math.max(h,t);const p={width:d||800,height:h||600},u=s(p.width,p.height);r.has(u)||(r.set(u,{name:l(u),w:p.width,h:p.height}),c+=`\\n        @page ${r.get(u).name} {\\n          size: ${o(p.width)}in ${o(p.height)}in;\\n          margin: 0;\\n        }\\n        .print-page.${r.get(u).name} { page: ${r.get(u).name}; }\\n      `);const m=r.get(u).name,g=createDiv();g.addClass(\"print-page\"),g.addClass(\"dummy-first\"),g.addClass(m),i.prepend(g),await printPdf(i,n,a.backgroundColor||\"#ffffff\",p,!1,{top:0,right:0,bottom:0,left:0},!0,c,\"2-\")}catch(e){console.error(\"Failed to export to PDF: \",e),new obsidian_module.Notice(t$d(\"EXPORTDIALOG_PDF_PROGRESS_ERROR\"))}new obsidian_module.Notice(t$d(\"EXPORTDIALOG_PDF_PROGRESS_DONE\"))}else{const i=createDiv();i.style.width=\"100%\",i.style.height=\"fit-content\";for(const n of e){const e=parseFloat(n.getAttribute(\"width\")||\"0\"),r=parseFloat(n.getAttribute(\"height\")||\"0\"),s=a.dimensions,{tiles:o}=calculateDimensions(n,e,r,s,a.margin,t,a.alignment),{width:l,height:c}=getPageSizePixels(s,!1);for(const e of o){const t=createDiv();t.addClass(\"print-page\"),t.style.width=`${l}px`,t.style.height=`${c}px`,t.style.display=\"flex\",t.style.justifyContent=\"start\",t.style.alignItems=\"left\",t.style.left=`${a.margin.left}px`,t.style.top=`${a.margin.top}px`,t.style.position=\"relative\";const r=n.cloneNode(!0);r.setAttribute(\"viewBox\",e.viewBox),r.style.width=`${e.width}px`,r.style.height=`${e.height}px`,r.style.position=\"absolute\",r.style.left=e.x-a.margin.left+\"px\",r.style.top=e.y-a.margin.top+\"px\",t.appendChild(r),i.appendChild(t)}}new obsidian_module.Notice(t$d(\"EXPORTDIALOG_PDF_PROGRESS_NOTICE\"));try{await printPdf(i,n,a.backgroundColor||\"#ffffff\",a.dimensions,!1,{top:0,right:0,bottom:0,left:0},!0)}catch(e){console.error(\"Failed to export to PDF: \",e),new obsidian_module.Notice(t$d(\"EXPORTDIALOG_PDF_PROGRESS_ERROR\"))}new obsidian_module.Notice(t$d(\"EXPORTDIALOG_PDF_PROGRESS_DONE\"))}}async function exportSVGToClipboard(e){try{const t=e.outerHTML;await navigator.clipboard.writeText(t)}catch(e){console.error(\"Failed to copy SVG to clipboard: \",e)}}async function exportPNGToClipboard(e){await navigator.clipboard.write([new window.ClipboardItem({\"image/png\":e})])}function exportPNG(e,t){const a=new FileReader;a.readAsDataURL(e),a.onloadend=()=>{const e=a.result;download(null,e,`${t}.png`)}}function exportSVG(e,t){download(null,svgToBase64(e.outerHTML),`${t}.svg`)}class PDFExportSettingsComponent{contentEl;settings;update;constructor(e,t,a){this.contentEl=e,this.settings=t,this.update=a,a||(this.update=()=>{})}isOrientationAndTilingVisible(){return!(\"HD Screen\"===this.settings.pageSize||\"MATCH IMAGE\"===this.settings.pageSize)}render(){const e=Object.keys(STANDARD_PAGE_SIZES).reduce(((e,t)=>({...e,[t]:t})),{});let t;new obsidian_module.Setting(this.contentEl).setName(t$d(\"EXPORTDIALOG_PAGE_SIZE\")).addDropdown((a=>a.addOptions(e).setValue(this.settings.pageSize).onChange((e=>{this.settings.pageSize=e,t.style.display=this.isOrientationAndTilingVisible()?\"block\":\"none\",this.update()})))),t=this.contentEl.createDiv(),t.style.display=this.isOrientationAndTilingVisible()?\"block\":\"none\",new obsidian_module.Setting(t).setName(t$d(\"EXPORTDIALOG_PAGE_ORIENTATION\")).addDropdown((e=>e.addOptions({portrait:t$d(\"EXPORTDIALOG_ORIENTATION_PORTRAIT\"),landscape:t$d(\"EXPORTDIALOG_ORIENTATION_LANDSCAPE\")}).setValue(this.settings.pageOrientation).onChange((e=>{this.settings.pageOrientation=e,this.update()})))),new obsidian_module.Setting(t).setName(t$d(\"EXPORTDIALOG_PDF_FIT_TO_PAGE\")).addDropdown((e=>e.addOptions({scale:t$d(\"EXPORTDIALOG_PDF_SCALE_OPTION\"),fit:t$d(\"EXPORTDIALOG_PDF_FIT_OPTION\"),\"fit-2\":t$d(\"EXPORTDIALOG_PDF_FIT_2_OPTION\"),\"fit-4\":t$d(\"EXPORTDIALOG_PDF_FIT_4_OPTION\"),\"fit-6\":t$d(\"EXPORTDIALOG_PDF_FIT_6_OPTION\"),\"fit-8\":t$d(\"EXPORTDIALOG_PDF_FIT_8_OPTION\"),\"fit-12\":t$d(\"EXPORTDIALOG_PDF_FIT_12_OPTION\"),\"fit-16\":t$d(\"EXPORTDIALOG_PDF_FIT_16_OPTION\")}).setValue(1===this.settings.fitToPage?\"fit\":\"number\"==typeof this.settings.fitToPage?`fit-${this.settings.fitToPage}`:\"scale\").onChange((e=>{this.settings.fitToPage=\"scale\"===e?0:\"fit\"===e?1:parseInt(e.split(\"-\")[1]),this.update()})))),new obsidian_module.Setting(this.contentEl).setName(t$d(\"EXPORTDIALOG_PDF_MARGIN\")).addDropdown((e=>e.addOptions({none:t$d(\"EXPORTDIALOG_PDF_MARGIN_NONE\"),tiny:t$d(\"EXPORTDIALOG_PDF_MARGIN_TINY\"),normal:t$d(\"EXPORTDIALOG_PDF_MARGIN_NORMAL\")}).setValue(this.settings.margin).onChange((e=>{this.settings.margin=e,this.update()}))));const a=new obsidian_module.Setting(this.contentEl).setName(t$d(\"EXPORTDIALOG_PDF_PAPER_COLOR\")).addDropdown((e=>e.addOptions({white:t$d(\"EXPORTDIALOG_PDF_PAPER_WHITE\"),scene:t$d(\"EXPORTDIALOG_PDF_PAPER_SCENE\"),custom:t$d(\"EXPORTDIALOG_PDF_PAPER_CUSTOM\")}).setValue(this.settings.paperColor).onChange((e=>{this.settings.paperColor=e,a.style.display=\"custom\"===e?\"block\":\"none\",this.update()})))).controlEl.createEl(\"input\",{type:\"color\",value:this.settings.customPaperColor});a.style.width=\"50px\",a.style.marginLeft=\"10px\",a.style.display=\"custom\"===this.settings.paperColor?\"block\":\"none\",a.addEventListener(\"change\",(e=>{this.settings.customPaperColor=e.target.value,this.update()})),new obsidian_module.Setting(this.contentEl).setName(t$d(\"EXPORTDIALOG_PDF_ALIGNMENT\")).addDropdown((e=>e.addOptions({center:t$d(\"EXPORTDIALOG_PDF_ALIGN_CENTER\"),\"center-left\":t$d(\"EXPORTDIALOG_PDF_ALIGN_CENTER_LEFT\"),\"center-right\":t$d(\"EXPORTDIALOG_PDF_ALIGN_CENTER_RIGHT\"),\"top-left\":t$d(\"EXPORTDIALOG_PDF_ALIGN_TOP_LEFT\"),\"top-center\":t$d(\"EXPORTDIALOG_PDF_ALIGN_TOP_CENTER\"),\"top-right\":t$d(\"EXPORTDIALOG_PDF_ALIGN_TOP_RIGHT\"),\"bottom-left\":t$d(\"EXPORTDIALOG_PDF_ALIGN_BOTTOM_LEFT\"),\"bottom-center\":t$d(\"EXPORTDIALOG_PDF_ALIGN_BOTTOM_CENTER\"),\"bottom-right\":t$d(\"EXPORTDIALOG_PDF_ALIGN_BOTTOM_RIGHT\")}).setValue(this.settings.alignment).onChange((e=>{this.settings.alignment=e,this.update()}))))}}async function captureScreenshot(e,t){if(!DEVICE.isDesktop)return new obsidian_module.Notice(t$d(\"SCREENSHOT_DESKTOP_ONLY\")),null;const a=e.isFullscreen();a||e.gotoFullscreen();const i=e.excalidrawAPI;i.setForceRenderAllEmbeddables(!0),t.selectedOnly=t.selectedOnly&&e.getViewSelectedElements().length>0;const n=window.require(\"electron\").remote,r=t.selectedOnly?e.getViewSelectedElements():e.getViewElements(),s=new Set(r.map((e=>e.id))),o=[],l=getEA(e),c=n.getCurrentWebContents(),d=c.getZoomFactor();c.setZoomFactor(1),await sleep(100);const h=window.devicePixelRatio||1;t.selectedOnly&&(l.copyViewElementsToEAforEditing(e.getViewElements().filter((e=>!s.has(e.id)))),l.getElements().forEach((e=>{o.push({id:e.id,opacity:e.opacity}),e.opacity=0})),o.length>0&&await l.addElementsToView(!1,!1,!1,!1));let p=l.getBoundingBox(r);p={topX:Math.ceil(p.topX),topY:Math.ceil(p.topY),width:Math.ceil(p.width),height:Math.ceil(p.height)};const u=t.margin,m=Math.floor(i.getAppState().width),g=Math.floor(i.getAppState().height),f=Math.ceil(p.width*t.zoom+2*u),b=Math.ceil(p.height*t.zoom+2*u),U=Math.ceil(f/m),E=Math.ceil(b/g),w=Math.ceil(f/U),y=Math.ceil(b/E),v=w*U,T=y*E,S=(()=>{const{scrollX:e,scrollY:t,zoom:a,viewModeEnabled:n,linkOpacity:r,theme:s}=i.getAppState();return{scrollX:e,scrollY:t,zoom:a,viewModeEnabled:n,linkOpacity:r,theme:s}})();e.updateScene({appState:{viewModeEnabled:!0,linkOpacity:0,theme:t.theme}}),await sleep(50);const _=e.excalidrawWrapperRef.current;let C=\"block\",I=\"block\",x=null,A=null;const k={width:_.style.width,height:_.style.height,left:_.style.left,top:_.style.top,position:_.style.position,overflow:_.style.overflow};try{_.style.width=w+\"px\",_.style.height=y+\"px\",_.style.overflow=\"visible\",e.updateScene({appState:{zoom:{value:t.zoom},width:w,height:y}}),await sleep(200);const{left:a,top:i}=_.getBoundingClientRect(),r=[];for(let s=0;s<E;s++)for(let o=0;o<U;o++){const l=p.topX-u/t.zoom+o*w/t.zoom,c=p.topY-u/t.zoom+s*y/t.zoom;e.updateScene({appState:{scrollX:-l,scrollY:-c,zoom:{value:t.zoom},width:w,height:y}}),await sleep(50),x=_.querySelector(\".layer-ui__wrapper\"),A=_.querySelector(\".App-bottom-bar\"),x&&(C=x.style.display,x.style.display=\"none\"),A&&(I=A.style.display,A.style.display=\"none\"),await sleep(50);const d=o===U-1?v-w*(U-1):w,m=s===E-1?T-y*(E-1):y,g=await n.getCurrentWebContents().capturePage({x:a,y:i,width:d*h,height:m*h});r.push({url:\"data:image/png;base64,\"+g.toPNG().toString(\"base64\"),width:d,height:m,col:o,row:s})}Object.assign(_.style,k);const s=document.createElement(\"canvas\");s.width=v*h,s.height=T*h,s.style.width=`${v}px`,s.style.height=`${T}px`;const o=s.getContext(\"2d\");o.scale(1,1),o.imageSmoothingEnabled=!0,o.imageSmoothingQuality=\"high\";let l=0;for(let e=0;e<E;e++){let t=0;for(let a=0;a<U;a++){const i=r[e*U+a],n=new window.Image;n.src=i.url,await new Promise((e=>{n.onload=e})),o.drawImage(n,t,l),t+=i.width*h}l+=r[e*U].height*h}return new Promise((e=>{s.toBlob((t=>{e(t)}),\"image/png\")}))}catch(e){return console.error(e),new obsidian_module.Notice(t$d(\"SCREENSHOT_ERROR\")),null}finally{t.selectedOnly&&o.length>0&&(l.clear(),l.copyViewElementsToEAforEditing(e.getViewElements().filter((e=>!s.has(e.id)))),o.forEach((e=>{l.getElement(e.id).opacity=e.opacity})),await l.addElementsToView(!1,!1,!1,!1)),c.setZoomFactor(d),x&&(x.style.display=C),A&&(A.style.display=I),O=S,e.updateScene({appState:{...O}}),a||e.exitFullscreen()}var O}class ExportDialog extends obsidian_module.Modal{plugin;view;file;ea;api;padding;scale;theme;transparent;saveSettings;dirty=!1;selectedOnlySetting;hasSelectedElements=!1;boundingBox;embedScene;exportSelectedOnly;saveToVault;pageSize=\"A4\";pageOrientation=\"portrait\";activeTab=\"image\";contentContainer;buttonContainerRow1;buttonContainerRow2;fitToPage=1;paperColor=\"white\";customPaperColor=\"#ffffff\";alignment=\"center\";margin=\"normal\";scaleSetting;constructor(e,t,a){super(e.app),this.plugin=e,this.view=t,this.file=a,this.ea=getEA(this.view),this.api=this.ea.getExcalidrawAPI(),this.padding=getExportPadding(this.plugin,this.file),this.scale=getPNGScale(this.plugin,this.file),this.theme=getExportTheme(this.plugin,this.file,this.api.getAppState().theme),this.boundingBox=this.ea.getBoundingBox(this.ea.getViewElements()),this.embedScene=shouldEmbedScene(this.plugin,this.file),this.exportSelectedOnly=!1,this.saveToVault=!0,this.transparent=!getWithBackground(this.plugin,this.file),this.pageSize=e.settings.pdfSettings.pageSize,this.pageOrientation=e.settings.pdfSettings.pageOrientation,this.fitToPage=e.settings.pdfSettings.fitToPage,this.paperColor=e.settings.pdfSettings.paperColor,this.customPaperColor=e.settings.pdfSettings.customPaperColor,this.alignment=e.settings.pdfSettings.alignment,this.margin=e.settings.pdfSettings.margin,this.saveSettings=!1,this.createForm()}destroy(){this.app=null,this.plugin=null,this.ea.destroy(),this.ea=null,this.view=null,this.file=null,this.api=null,this.theme=null,this.selectedOnlySetting=null,this.containerEl.remove()}get isSelectedOnly(){return this.hasSelectedElements&&this.exportSelectedOnly}updateBoundingBox(){this.isSelectedOnly?this.boundingBox=this.ea.getBoundingBox(this.view.getViewSelectedElements()):this.boundingBox=this.ea.getBoundingBox(this.ea.getViewElements()),this.scaleSetting&&this.scaleSetting.setDesc(this.size())}onOpen(){this.containerEl.classList.add(\"excalidraw-release\"),this.titleEl.setText(t$d(\"EXPORTDIALOG_TITLE\")),this.hasSelectedElements=this.view.getViewSelectedElements().length>0,this.selectedOnlySetting.setVisibility(this.hasSelectedElements),this.updateBoundingBox()}async onClose(){this.dirty=this.saveSettings}createForm(){if(DEVICE.isDesktop){const e=this.contentEl.createDiv(\"nav-buttons-container\"),t=e.createEl(\"button\",{text:t$d(\"EXPORTDIALOG_TAB_IMAGE\"),cls:\"nav-button \"+(\"image\"===this.activeTab?\"is-active\":\"\")}),a=e.createEl(\"button\",{text:t$d(\"EXPORTDIALOG_TAB_PDF\"),cls:\"nav-button \"+(\"pdf\"===this.activeTab?\"is-active\":\"\")}),i=e.createEl(\"button\",{text:t$d(\"EXPORTDIALOG_TAB_SCREENSHOT\"),cls:\"nav-button \"+(\"screenshot\"===this.activeTab?\"is-active\":\"\")});t.onclick=()=>{this.activeTab=\"image\",t.addClass(\"is-active\"),a.removeClass(\"is-active\"),i.removeClass(\"is-active\"),this.renderContent()},a.onclick=()=>{this.activeTab=\"pdf\",a.addClass(\"is-active\"),t.removeClass(\"is-active\"),i.removeClass(\"is-active\"),this.renderContent()},i.onclick=()=>{this.activeTab=\"screenshot\",i.addClass(\"is-active\"),t.removeClass(\"is-active\"),a.removeClass(\"is-active\"),this.renderContent()}}this.contentContainer=this.contentEl.createDiv(),this.buttonContainerRow1=this.contentEl.createDiv({cls:\"excalidraw-export-buttons-div\"}),this.buttonContainerRow2=this.contentEl.createDiv({cls:\"excalidraw-export-buttons-div\"}),this.buttonContainerRow2.style.marginTop=\"10px\",this.renderContent()}createSaveSettingsDropdown(){new obsidian_module.Setting(this.contentContainer).setName(t$d(\"EXPORTDIALOG_SAVE_SETTINGS\")).addDropdown((e=>e.addOption(\"save\",t$d(\"EXPORTDIALOG_SAVE_SETTINGS_SAVE\")).addOption(\"one-time\",t$d(\"EXPORTDIALOG_SAVE_SETTINGS_ONETIME\")).setValue(this.saveSettings?\"save\":\"one-time\").onChange((e=>{this.saveSettings=\"save\"===e}))))}renderContent(){switch(this.contentContainer.empty(),this.buttonContainerRow1.empty(),this.buttonContainerRow2.empty(),this.createHeader(),this.activeTab){case\"pdf\":this.createImageSettings(),this.createPDFSettings(),this.createPDFButton();break;case\"screenshot\":this.view.isInMainObsidianWorkspace&&(this.createImageSettings(!0),this.createImageButtons(!0));break;default:this.createImageSettings(!1),this.createExportSettings(),this.createImageButtons()}}size(){const e=Math.round(this.scale*this.boundingBox.width+2*this.padding),t=Math.round(this.scale*this.boundingBox.height+2*this.padding);return fragWithHTML(`${t$d(\"EXPORTDIALOG_SIZE_DESC\")}<br>${t$d(\"EXPORTDIALOG_SCALE_VALUE\")} <b>${this.scale}</b><br>${t$d(\"EXPORTDIALOG_IMAGE_SIZE\")} <b>${e}x${t}</b>`)}createHeader(){switch(this.activeTab){case\"pdf\":this.contentContainer.createEl(\"h1\",{text:t$d(\"EXPORTDIALOG_PDF_SETTINGS\")});break;case\"screenshot\":this.contentContainer.createEl(\"h1\",{text:t$d(\"EXPORTDIALOG_TAB_SCREENSHOT\")}),this.view.isInMainObsidianWorkspace?this.contentContainer.createEl(\"p\",{text:t$d(\"EXPORTDIALOG_SCREENSHOT_DESC\")}):this.contentContainer.createEl(\"p\",{text:t$d(\"EXPORTDIALOG_NOT_AVAILALBE\")});break;default:this.contentContainer.createEl(\"h1\",{text:t$d(\"EXPORTDIALOG_IMAGE_SETTINGS\")}),this.contentContainer.createEl(\"p\",{text:t$d(\"EXPORTDIALOG_IMAGE_DESC\")})}}createImageSettings(e=!1){let t;this.createSaveSettingsDropdown();const a=()=>fragWithHTML(`${t$d(\"EXPORTDIALOG_CURRENT_PADDING\")} <b>${this.padding}</b>`);t=new obsidian_module.Setting(this.contentContainer).setName(t$d(\"EXPORTDIALOG_PADDING\")).setDesc(a()).addSlider((e=>{e.setLimits(0,100,1).setValue(this.padding).onChange((e=>{this.padding=e,this.scaleSetting.setDesc(this.size()),t.setDesc(a())}))})),this.scaleSetting=new obsidian_module.Setting(this.contentContainer).setName(t$d(\"EXPORTDIALOG_SCALE\")).setDesc(this.size()).addSlider((e=>e.setLimits(.2,7,.1).setValue(this.scale).onChange((e=>{this.scale=e,this.scaleSetting.setDesc(this.size())})))),new obsidian_module.Setting(this.contentContainer).setName(t$d(\"EXPORTDIALOG_EXPORT_THEME\")).addDropdown((e=>e.addOption(\"light\",t$d(\"EXPORTDIALOG_THEME_LIGHT\")).addOption(\"dark\",t$d(\"EXPORTDIALOG_THEME_DARK\")).setValue(this.theme).onChange((e=>{this.theme=e})))),e||new obsidian_module.Setting(this.contentContainer).setName(t$d(\"EXPORTDIALOG_BACKGROUND\")).addDropdown((e=>e.addOption(\"transparent\",t$d(\"EXPORTDIALOG_BACKGROUND_TRANSPARENT\")).addOption(\"with-color\",t$d(\"EXPORTDIALOG_BACKGROUND_USE_COLOR\")).setValue(this.transparent?\"transparent\":\"with-color\").onChange((e=>{this.transparent=\"transparent\"===e})))),this.selectedOnlySetting=new obsidian_module.Setting(this.contentContainer).setName(t$d(\"EXPORTDIALOG_SELECTED_ELEMENTS\")).addDropdown((e=>e.addOption(\"all\",t$d(\"EXPORTDIALOG_SELECTED_ALL\")).addOption(\"selected\",t$d(\"EXPORTDIALOG_SELECTED_SELECTED\")).setValue(this.exportSelectedOnly?\"selected\":\"all\").onChange((e=>{this.exportSelectedOnly=\"selected\"===e,this.updateBoundingBox()})))),this.selectedOnlySetting.setVisibility(this.hasSelectedElements)}createExportSettings(){new obsidian_module.Setting(this.contentContainer).setName(t$d(\"EXPORTDIALOG_EMBED_SCENE\")).addDropdown((e=>e.addOption(\"embed\",t$d(\"EXPORTDIALOG_EMBED_YES\")).addOption(\"no-embed\",t$d(\"EXPORTDIALOG_EMBED_NO\")).setValue(this.embedScene?\"embed\":\"no-embed\").onChange((e=>{this.embedScene=\"embed\"===e}))))}createPDFSettings(){if(!DEVICE.isDesktop)return;this.contentContainer.createEl(\"h1\",{text:t$d(\"EXPORTDIALOG_PDF_SETTINGS\")});const e={pageSize:this.pageSize,pageOrientation:this.pageOrientation,fitToPage:this.fitToPage,paperColor:this.paperColor,customPaperColor:this.customPaperColor,alignment:this.alignment,margin:this.margin};new PDFExportSettingsComponent(this.contentContainer,e,(()=>{this.pageSize=e.pageSize,this.pageOrientation=e.pageOrientation,this.fitToPage=e.fitToPage,this.paperColor=e.paperColor,this.customPaperColor=e.customPaperColor,this.alignment=e.alignment,this.margin=e.margin})).render()}createImageButtons(e=!1){DEVICE.isDesktop&&(this.buttonContainerRow1.createEl(\"button\",{text:t$d(\"EXPORTDIALOG_PNGTOFILE\"),cls:\"excalidraw-export-button\"}).onclick=()=>{e?setTimeout((async()=>{const e=await captureScreenshot(this.view,{zoom:this.scale,margin:this.padding,selectedOnly:this.isSelectedOnly,theme:this.theme});e&&exportPNG(e,this.view.file.basename)})):this.view.exportPNG(this.embedScene,this.isSelectedOnly),this.close()}),this.buttonContainerRow1.createEl(\"button\",{text:t$d(\"EXPORTDIALOG_PNGTOVAULT\"),cls:\"excalidraw-export-button\"}).onclick=()=>{e?setTimeout((async()=>{const e=await captureScreenshot(this.view,{zoom:this.scale,margin:this.padding,selectedOnly:this.isSelectedOnly,theme:this.theme});e&&exportImageToFile(this.view,getIMGFilename(this.view.file.path,\"png\"),e,\".png\")})):this.view.savePNG({scene:this.view.getScene(this.isSelectedOnly)}),this.close()},this.buttonContainerRow1.createEl(\"button\",{text:t$d(\"EXPORTDIALOG_PNGTOCLIPBOARD\"),cls:\"excalidraw-export-button\"}).onclick=async()=>{e?setTimeout((async()=>{const e=await captureScreenshot(this.view,{zoom:this.scale,margin:this.padding,selectedOnly:this.isSelectedOnly,theme:this.theme});e&&exportPNGToClipboard(e)})):this.view.exportPNGToClipboard(this.embedScene,this.isSelectedOnly),this.close()},e||(DEVICE.isDesktop&&(this.buttonContainerRow2.createEl(\"button\",{text:t$d(\"EXPORTDIALOG_EXCALIDRAW\"),cls:\"excalidraw-export-button\"}).onclick=()=>{this.view.exportExcalidraw(),this.close()},this.buttonContainerRow2.createEl(\"button\",{text:t$d(\"EXPORTDIALOG_SVGTOFILE\"),cls:\"excalidraw-export-button\"}).onclick=()=>{this.view.exportSVG(this.embedScene,this.isSelectedOnly),this.close()}),this.buttonContainerRow2.createEl(\"button\",{text:t$d(\"EXPORTDIALOG_SVGTOVAULT\"),cls:\"excalidraw-export-button\"}).onclick=()=>{this.view.saveSVG({scene:this.view.getScene(this.isSelectedOnly)}),this.close()},this.buttonContainerRow2.createEl(\"button\",{text:t$d(\"EXPORTDIALOG_SVGTOCLIPBOARD\"),cls:\"excalidraw-export-button\"}).onclick=async()=>{exportSVGToClipboard(await this.view.getSVG(this.embedScene,this.isSelectedOnly)),this.close()})}createPDFButton(){this.buttonContainerRow1.createEl(\"button\",{text:t$d(\"EXPORTDIALOG_SAVE_PDF_SETTINGS\"),cls:\"excalidraw-export-button\"}).onclick=async()=>{await this.plugin.loadSettings(),this.plugin.settings.pdfSettings={pageSize:this.pageSize,pageOrientation:this.pageOrientation,fitToPage:this.fitToPage,paperColor:this.paperColor,customPaperColor:this.customPaperColor,alignment:this.alignment,margin:this.margin},await this.plugin.saveSettings(),new obsidian_module.Notice(t$d(\"EXPORTDIALOG_SAVE_CONFIRMATION\"))},DEVICE.isDesktop&&(this.buttonContainerRow1.createEl(\"button\",{text:t$d(\"EXPORTDIALOG_PDF\"),cls:\"excalidraw-export-button\"}).onclick=()=>{this.view.exportPDF(this.isSelectedOnly,this.pageSize,this.pageOrientation),this.close()})}getPaperColor(){switch(this.paperColor){case\"white\":return\"light\"===this.theme?\"#ffffff\":\"#000000\";case\"scene\":return this.api.getAppState().viewBackgroundColor;case\"custom\":return this.customPaperColor;default:return\"#ffffff\"}}}let REM_VALUE=16;const STYLE_VARIABLES=[\"--background-modifier-cover\",\"--background-primary-alt\",\"--background-secondary\",\"--background-secondary-alt\",\"--background-modifier-border\",\"--text-normal\",\"--text-muted\",\"--text-accent\",\"--text-accent-hover\",\"--text-faint\",\"--text-highlight-bg\",\"--text-highlight-bg-active\",\"--text-selection\",\"--interactive-normal\",\"--interactive-hover\",\"--interactive-accent\",\"--interactive-accent-hover\",\"--scrollbar-bg\",\"--scrollbar-thumb-bg\",\"--scrollbar-active-thumb-bg\",\"--tab-container-background\",\"--titlebar-background-focused\"],EXCALIDRAW_CONTAINER_CLASS=\"excalidraw__embeddable__outer\";class StylesManager{stylesMap=new Map;styleLight;styleDark;plugin;constructor(e){this.plugin=e,e.app.workspace.onLayoutReady((async()=>{await e.awaitInit(),await this.harvestStyles(),getAllWindowDocuments(e.app).forEach((e=>this.copyPropertiesToTheme(e))),e.registerEvent(e.app.workspace.on(\"css-change\",(()=>this.onCSSChange()))),e.registerEvent(e.app.workspace.on(\"window-open\",(e=>this.onWindowOpen(e)))),e.registerEvent(e.app.workspace.on(\"window-close\",(e=>this.onWindowClose(e))))}))}async onCSSChange(){await this.harvestStyles(),getAllWindowDocuments(this.plugin.app).forEach((e=>{this.copyPropertiesToTheme(e)}))}onWindowOpen(e){this.stylesMap.set(e.doc,{light:document.head.querySelector('style[id=\"excalidraw-embedded-light\"]'),dark:document.head.querySelector('style[id=\"excalidraw-embedded-dark\"]')})}onWindowClose(e){this.stylesMap.delete(e.doc)}async harvestStyles(){REM_VALUE=parseInt(window.getComputedStyle(document.body).getPropertyValue(\"--font-text-size\").trim()),isNaN(REM_VALUE)&&(REM_VALUE=16);const e=document.body,t=document.createElement(\"iframe\");t.style.display=\"none\",e.appendChild(t);const a=new Promise((e=>{t.addEventListener(\"load\",(()=>e()))})),i=t.contentWindow.document,n=t.contentWindow;i.open(),i.write(`<head>${document.head.innerHTML}</head>`),i.close(),await a;const r=t.contentWindow.document.body;r.setAttribute(\"style\",e.getAttribute(\"style\")),r.setAttribute(\"class\",e.getAttribute(\"class\"));const s=e=>{r.classList.remove(\"theme-light\"),r.classList.remove(\"theme-dark\"),r.classList.add(e)},o=()=>{const e=n.getComputedStyle(r),t={};for(const a of STYLE_VARIABLES)t[a]=e.getPropertyValue(a);const a=this.plugin.ea.getCM(e.getPropertyValue(\"--background-primary\"));return a.alphaTo(.9),t[\"--background-primary\"]=a.stringHEX(),Object.entries(t).map((([e,t])=>`${e}: ${t} !important;`)).join(\" \")};s(\"theme-light\"),this.styleLight=o(),s(\"theme-dark\"),this.styleDark=o(),e.removeChild(t)}copyPropertiesToTheme(e){const t=this.stylesMap.get(e);if(t)t.light.innerHTML=`.${EXCALIDRAW_CONTAINER_CLASS} .theme-light {\\n${this.styleLight}\\n}`,t.dark.innerHTML=`.${EXCALIDRAW_CONTAINER_CLASS} .theme-dark {\\n${this.styleDark}\\n}`;else{const t=e.createElement(\"style\");t.type=\"text/css\",t.setAttribute(\"id\",\"excalidraw-embedded-light\"),t.innerHTML=`.${EXCALIDRAW_CONTAINER_CLASS} .theme-light {\\n${this.styleLight}\\n}`,e.head.appendChild(t);const a=e.createElement(\"style\");a.type=\"text/css\",a.setAttribute(\"id\",\"excalidraw-embedded-dark\"),a.innerHTML=`.${EXCALIDRAW_CONTAINER_CLASS} .theme-dark {\\n${this.styleDark}\\n}`,e.head.appendChild(a),this.stylesMap.set(e,{light:t,dark:a})}}destroy(){for(const[e,t]of this.stylesMap)e.head.removeChild(t.light),e.head.removeChild(t.dark);this.plugin=null}}const TOOLS_PANEL_WIDTH=()=>14.4*REM_VALUE;class ToolsPanel extends React__namespace.Component{pos1=0;pos2=0;pos3=0;pos4=0;penDownX=0;penDownY=0;previousWidth=0;previousHeight=0;onRightEdge=!1;onBottomEdge=!1;containerRef;view;componentWillUnmount(){this.containerRef.current&&this.props.observer.deref()?.unobserve(this.containerRef.current),this.setState({scriptIconMap:null}),this.containerRef=null,this.view=null}constructor(e){super(e),this.view=e.view.deref();const t=this.view.packages.react;this.containerRef=t.createRef(),this.state={visible:e.visible,top:50,left:200,theme:\"dark\",excalidrawViewMode:!1,minimized:!1,isDirty:!1,isFullscreen:!1,isPreviewMode:!0,scriptIconMap:{}}}updateScriptIconMap(e){this.setState((()=>({scriptIconMap:e})))}setPreviewMode(e){this.setState((()=>({isPreviewMode:e})))}setFullscreen(e){this.setState((()=>({isFullscreen:e})))}setDirty(e){this.setState((()=>({isDirty:e})))}setExcalidrawViewMode(e){this.setState((()=>({excalidrawViewMode:e})))}toggleVisibility(e){this.setTopCenter(e),this.setState((e=>({visible:!e.visible})))}setTheme(e){this.setState((t=>({theme:e})))}setTopCenter(e){this.setState((()=>({left:(this.containerRef.current.clientWidth-TOOLS_PANEL_WIDTH()-(e?0:TOOLS_PANEL_WIDTH()+4))/2+this.containerRef.current.parentElement.offsetLeft+(e?0:TOOLS_PANEL_WIDTH()+4),top:64+this.containerRef.current.parentElement.offsetTop})))}updatePosition(e=0,t=0){this.setState((()=>{const{offsetTop:a,offsetLeft:i,clientWidth:n,clientHeight:r}=this.containerRef.current.firstElementChild,s=a-e,o=i-t,{clientWidth:l,clientHeight:c,offsetTop:d,offsetLeft:h}=this.containerRef.current.parentElement;return this.previousHeight=c,this.previousWidth=l,this.onBottomEdge=s>=c-r+d,this.onRightEdge=o>=l-n+h,{top:s<d?d:this.onBottomEdge?c-r+d:s,left:o<h?h:this.onRightEdge?l-n+h:o}}))}actionOpenScriptInstallDialog(){new ScriptInstallPrompt(this.view.plugin).open()}actionOpenReleaseNotes(){new ReleaseNotes(this.view.app,this.view.plugin,PLUGIN_VERSION).open()}actionConvertExcalidrawToMD(){this.view.convertExcalidrawToMD()}actionToggleViewMode(){this.state.isPreviewMode?this.view.changeTextMode(TextMode.raw):this.view.changeTextMode(TextMode.parsed)}actionToggleTrayMode(){this.view.toggleTrayMode()}actionToggleFullscreen(){this.state.isFullscreen?this.view.exitFullscreen():this.view.gotoFullscreen()}actionSearch(){search(this.view)}actionOCR(e){this.view.plugin.settings.taskboneEnabled?this.view.plugin.taskbone.getTextForView(this.view,{forceReScan:isWinCTRLorMacCMD(e)}):new obsidian_module.Notice(\"Taskbone OCR is not enabled. Please go to plugins settings to enable it.\",4e3)}actionOpenLink(e){const t=new MouseEvent(\"click\",{ctrlKey:e.ctrlKey||!(DEVICE.isIOS||DEVICE.isMacOS),metaKey:e.metaKey||DEVICE.isIOS||DEVICE.isMacOS,shiftKey:e.shiftKey,altKey:e.altKey});this.view.handleLinkClick(t,!0)}actionOpenLinkProperties(){const e=new MouseEvent(\"click\",{ctrlKey:!0,metaKey:!0,shiftKey:!1,altKey:!1});this.view.handleLinkClick(e)}actionForceSave(){this.view.forceSave()}actionExportLibrary(){this.view.plugin.exportLibrary()}actionExportImage(){const e=this.view;e.exportDialog||(e.exportDialog=new ExportDialog(e.plugin,e,e.file),e.exportDialog.createForm()),e.exportDialog.open()}actionOpenAsMarkdown(){this.view.openAsMarkdown()}actionLinkToElement(e){isWinALTorMacOPT(e)?openExternalLink(\"https://youtu.be/yZQoJg2RCKI\",this.view.app):this.view.copyLinkToSelectedElementToClipboard(isWinCTRLorMacCMD(e)?\"group=\":isSHIFT(e)?\"area=\":\"\")}actionAddAnyFile(){this.props.centerPointer(),new UniversalInsertFileModal(this.view.plugin,this.view).open()}actionInsertImage(){this.props.centerPointer(),this.view.plugin.insertImageDialog.start(this.view)}actionInsertPDF(){this.props.centerPointer(),new InsertPDFModal(this.view.plugin,this.view).open()}actionInsertMarkdown(){this.props.centerPointer(),this.view.plugin.insertMDDialog.start(this.view)}actionInsertBackOfNote(){this.props.centerPointer(),this.view.insertBackOfTheNoteCard()}actionInsertLaTeX(e){isWinALTorMacOPT(e)?openExternalLink(\"https://youtu.be/r08wk-58DPk\",this.view.app):(this.props.centerPointer(),insertLaTeXToView(this.view))}actionInsertLink(){this.props.centerPointer(),this.view.plugin.insertLinkDialog.start(this.view.file.path,((e,t,a)=>this.view.addText(e,t,a)))}actionImportSVG(e){this.view.plugin.importSVGDialog.start(this.view)}actionCropImage(e){this.view.app.commands.executeCommandById(\"obsidian-excalidraw-plugin:crop-image\")}async actionRunScript(e){const t=this.view,a=t.plugin,i=a.app.vault.getAbstractFileByPath(e);i&&i instanceof obsidian_module.TFile&&a.scriptEngine.executeScript(t,await a.app.vault.read(i),a.scriptEngine.getScriptName(i),i)}async actionPinScript(e,t){const a=this.view,i=a.excalidrawAPI,n=a.plugin;await n.loadSettings();const r=n.settings.pinnedScripts.indexOf(e);r>-1?(n.settings.pinnedScripts.splice(r,1),i?.setToast({message:`Pin removed: ${t}`,duration:3e3,closable:!0})):(n.settings.pinnedScripts.push(e),i?.setToast({message:`Pinned: ${t}`,duration:3e3,closable:!0})),await n.saveSettings(),getExcalidrawViews(n.app).forEach((e=>e.updatePinnedScripts()))}islandOnClick(e){e.preventDefault(),Math.abs(this.penDownX-this.pos3)>5||Math.abs(this.penDownY-this.pos4)>5||this.setState((e=>({minimized:!e.minimized})))}islandOnPointerDown(e){const t=e=>{e.preventDefault(),this.pos1=this.pos3-e.clientX,this.pos2=this.pos4-e.clientY,this.pos3=e.clientX,this.pos4=e.clientY,this.updatePosition(this.pos2,this.pos1)},a=()=>{this.view.ownerDocument?.removeEventListener(\"pointerup\",a),this.view.ownerDocument?.removeEventListener(\"pointermove\",t)};e.preventDefault(),this.penDownX=this.pos3=e.clientX,this.penDownY=this.pos4=e.clientY,this.view.ownerDocument.addEventListener(\"pointerup\",a),this.view.ownerDocument.addEventListener(\"pointermove\",t)}render(){return React__namespace.createElement(\"div\",{ref:this.containerRef,className:clsx(\"excalidraw\",{\"theme--dark\":\"dark\"===this.state.theme}),style:{width:\"100%\",height:\"100%\",position:\"absolute\",touchAction:\"none\"}},React__namespace.createElement(\"div\",{className:\"Island\",style:{top:`${this.state.top}px`,left:`${this.state.left}px`,width:\"14.4rem\",display:this.state.visible&&!this.state.excalidrawViewMode?\"block\":\"none\",height:\"fit-content\",maxHeight:\"400px\",zIndex:5}},React__namespace.createElement(\"div\",{style:{height:\"26px\",width:\"100%\",cursor:\"move\"},onClick:this.islandOnClick.bind(this),onPointerDown:this.islandOnPointerDown.bind(this)},React__namespace.createElement(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",role:\"img\",xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 228 26\"},React__namespace.createElement(\"path\",{stroke:\"var(--icon-fill-color)\",strokeWidth:\"2\",d:\"M40,7 h148 M40,13 h148 M40,19 h148\"}))),React__namespace.createElement(\"div\",{className:\"Island App-menu__left scrollbar\",style:{maxHeight:\"350px\",width:\"initial\",\"--padding\":\"0.125rem\",display:this.state.minimized?\"none\":\"block\"}},React__namespace.createElement(\"div\",{className:\"selected-shape-actions\"},React__namespace.createElement(\"fieldset\",null,React__namespace.createElement(\"legend\",null,\"Utility actions\"),React__namespace.createElement(\"div\",{className:\"buttonList buttonListIcon\"},React__namespace.createElement(ActionButton,{key:\"scriptEngine\",title:t$d(\"INSTALL_SCRIPT_BUTTON\"),action:this.actionOpenScriptInstallDialog.bind(this),icon:ICONS.scriptEngine}),React__namespace.createElement(ActionButton,{key:\"release-notes\",title:t$d(\"READ_RELEASE_NOTES\"),action:this.actionOpenReleaseNotes.bind(this),icon:ICONS.releaseNotes}),null===this.state.isPreviewMode?React__namespace.createElement(ActionButton,{key:\"convert\",title:t$d(\"CONVERT_FILE\"),action:this.actionConvertExcalidrawToMD.bind(this),icon:ICONS.convertFile}):!this.state.isPreviewMode&&React__namespace.createElement(ActionButton,{key:\"viewmode\",title:this.state.isPreviewMode?t$d(\"PARSED\"):t$d(\"RAW\"),action:this.actionToggleViewMode.bind(this),icon:this.state.isPreviewMode?ICONS.rawMode:ICONS.parsedMode}),React__namespace.createElement(ActionButton,{key:\"tray-mode\",title:t$d(\"TRAY_MODE\"),action:this.actionToggleTrayMode.bind(this),icon:ICONS.trayMode}),React__namespace.createElement(ActionButton,{key:\"fullscreen\",title:this.state.isFullscreen?t$d(\"EXIT_FULLSCREEN\"):t$d(\"GOTO_FULLSCREEN\"),action:this.actionToggleFullscreen.bind(this),icon:this.state.isFullscreen?ICONS.exitFullScreen:ICONS.gotoFullScreen})),React__namespace.createElement(\"div\",{className:\"buttonList buttonListIcon\"},React__namespace.createElement(ActionButton,{key:\"search\",title:t$d(\"SEARCH\"),action:this.actionSearch.bind(this),icon:ICONS.search}),React__namespace.createElement(ActionButton,{key:\"ocr\",title:t$d(\"RUN_OCR\"),action:this.actionOCR.bind(this),icon:ICONS.ocr}),React__namespace.createElement(ActionButton,{key:\"openLink\",title:t$d(\"OPEN_LINK_CLICK\"),action:this.actionOpenLink.bind(this),icon:ICONS.openLink}),React__namespace.createElement(ActionButton,{key:\"openLinkProperties\",title:t$d(\"OPEN_LINK_PROPS\"),action:this.actionOpenLinkProperties.bind(this),icon:ICONS.openLinkProperties}),React__namespace.createElement(ActionButton,{key:\"save\",title:t$d(\"FORCE_SAVE\"),action:this.actionForceSave.bind(this),icon:saveIcon(this.state.isDirty)}))),React__namespace.createElement(\"fieldset\",null,React__namespace.createElement(\"legend\",null,\"Export actions\"),React__namespace.createElement(\"div\",{className:\"buttonList buttonListIcon\"},React__namespace.createElement(ActionButton,{key:\"lib\",title:t$d(\"DOWNLOAD_LIBRARY\"),action:this.actionExportLibrary.bind(this),icon:ICONS.exportLibrary}),React__namespace.createElement(ActionButton,{key:\"exportIMG\",title:t$d(\"EXPORT_IMAGE\"),action:this.actionExportImage.bind(this),icon:ICONS.ExportImage}),React__namespace.createElement(ActionButton,{key:\"md\",title:t$d(\"OPEN_AS_MD\"),action:this.actionOpenAsMarkdown.bind(this),icon:ICONS.switchToMarkdown}),React__namespace.createElement(ActionButton,{key:\"link-to-element\",title:t$d(\"INSERT_LINK_TO_ELEMENT\"),action:this.actionLinkToElement.bind(this),icon:ICONS.copyElementLink}))),React__namespace.createElement(\"fieldset\",null,React__namespace.createElement(\"legend\",null,\"Insert actions\"),React__namespace.createElement(\"div\",{className:\"buttonList buttonListIcon\"},React__namespace.createElement(ActionButton,{key:\"anyfile\",title:t$d(\"UNIVERSAL_ADD_FILE\"),action:this.actionAddAnyFile.bind(this),icon:ICONS[\"add-file\"]}),React__namespace.createElement(ActionButton,{key:\"image\",title:t$d(\"INSERT_IMAGE\"),action:this.actionInsertImage.bind(this),icon:ICONS.insertImage}),React__namespace.createElement(ActionButton,{key:\"pdf\",title:t$d(\"INSERT_PDF\"),action:this.actionInsertPDF.bind(this),icon:ICONS.insertPDF}),React__namespace.createElement(ActionButton,{key:\"insertMD\",title:t$d(\"INSERT_MD\"),action:this.actionInsertMarkdown.bind(this),icon:ICONS.insertMD}),React__namespace.createElement(ActionButton,{key:\"insertBackOfNote\",title:t$d(\"INSERT_CARD\"),action:this.actionInsertBackOfNote.bind(this),icon:ICONS.BackOfNote}),React__namespace.createElement(ActionButton,{key:\"latex\",title:t$d(\"INSERT_LATEX\"),action:this.actionInsertLaTeX.bind(this),icon:ICONS.insertLaTeX}),React__namespace.createElement(ActionButton,{key:\"link\",title:t$d(\"INSERT_LINK\"),action:this.actionInsertLink.bind(this),icon:ICONS.insertLink}),React__namespace.createElement(ActionButton,{key:\"import-svg\",title:t$d(\"IMPORT_SVG\"),action:this.actionImportSVG.bind(this),icon:ICONS.importSVG}),React__namespace.createElement(ActionButton,{key:\"crop-image\",title:t$d(\"CROP_IMAGE\"),action:this.actionCropImage.bind(this),icon:ICONS.Crop}))),this.renderScriptButtons(!1),this.renderScriptButtons(!0)))))}renderScriptButtons(e){if(0===Object.keys(this.state.scriptIconMap).length)return\"\";if(!this.view.plugin._loaded)return null;const t=`${this.view.plugin.settings.scriptFolderPath}/${SCRIPT_INSTALL_FOLDER}/`,a=a=>e?a.startsWith(t):!a.startsWith(t);if(0===Object.keys(this.state.scriptIconMap).filter((e=>a(e))).length)return\"\";const i=new Set;Object.keys(this.state.scriptIconMap).filter((e=>a(e))).forEach((e=>i.add(this.state.scriptIconMap[e].group)));const n=Array.from(i).sort(((e,t)=>e>t?1:-1));return n.push(n.shift()),React__namespace.createElement(React__namespace.Fragment,null,n.map(((t,a)=>React__namespace.createElement(\"fieldset\",{key:`${t}-${a}`},React__namespace.createElement(\"legend\",null,e?t:\"\"===t?\"User\":\"User/\"+t),React__namespace.createElement(\"div\",{className:\"buttonList buttonListIcon\"},Object.entries(this.state.scriptIconMap).filter((([e,a])=>a.group===t)).sort().map((([e,t])=>React__namespace.createElement(ActionButton,{key:e,title:t.name,action:this.actionRunScript.bind(this,e),longpress:this.actionPinScript.bind(this,e,t.name),icon:new WeakRef(t.svgString?stringToSVG(t.svgString):ICONS.cog).deref()}))))))))}}const getElementsAtPointer=(e,t,a)=>t.filter((t=>{if(a&&t.type!==a)return!1;if(t.locked)return!1;const[i,n,r,s]=rotatedDimensions(t);return i<=e.x&&i+r>=e.x&&n<=e.y&&n+s>=e.y})).reverse(),getTextElementAtPointer=(e,t)=>{const a=t.excalidrawAPI;if(!a)return{id:null,text:null};const i=getElementsAtPointer(e,a.getSceneElements(),\"text\");if(0==i.length)return{id:null,text:null};if(1===i.length)return{id:i[0].id,text:i[0].text};const n=i.filter((e=>{const a=t.textMode===TextMode.parsed?t.excalidrawData.getRawText(e.id):e.text;return!!a&&(!!a.match(REG_LINKINDEX_HYPERLINK)||!!REGEX_LINK.getRes(a).next().value)}));return 0==n.length?{id:i[0].id,text:i[0].text}:{id:n[0].id,text:n[0].text}},getImageElementAtPointer=(e,t)=>{const a=t.excalidrawAPI;if(!a)return;const i=getElementsAtPointer(e,a.getSceneElements(),\"image\");return 0===i.length?{id:null,fileId:null}:i.length>=1?{id:i[0].id,fileId:i[0].fileId}:void 0},getElementWithLinkAtPointer=(e,t)=>{const a=t.excalidrawAPI;if(!a)return;let i=getElementsAtPointer(e,a.getSceneElements()).filter((e=>e.link));if(0===i.length){const n=getElementsAtPointer(e,a.getSceneElements()).map((e=>getBoundTextElementId(e)));i=t.getViewElements().filter((e=>\"text\"===e.type&&e.link&&n.includes(e.id)))}return 0===i.length?{id:null,text:null}:i.length>=1?{id:i[0].id,text:i[0].link}:void 0},CANVAS_VIEWTYPES=new Set([\"markdown\",\"bases\",\"audio\",\"video\",\"pdf\"]);let noticeTimer;function showNoticeOnce(e){noticeTimer||(noticeTimer=window.setTimeout((()=>{noticeTimer=void 0}),1e3),new obsidian_module.Notice(e,6e3))}function getTheme(e,t){return\"dark\"===e.excalidrawData.embeddableTheme?\"theme-dark\":\"light\"===e.excalidrawData.embeddableTheme?\"theme-light\":\"auto\"===e.excalidrawData.embeddableTheme?\"dark\"===t?\"theme-dark\":\"theme-light\":isObsidianThemeDark()?\"theme-dark\":\"theme-light\"}function setPDFViewTheme(e,t){if(t){if(\"auto\"===e.excalidrawData.embeddableTheme){t.viewer?.child?.pdfViewer?.setBackground?.(null,!1);const e=t.containerEl?.querySelector(\".pdf-container\");e&&e.classList.remove(\"mod-themed\");const a=t.containerEl?.querySelector(\".pdf-thumbnail-view\");a&&(a.style.filter=\"var(--theme-filter)\")}else{const e=t.containerEl?.querySelector(\"div.pdfViewer\");e&&e.addClass(\"mod-nofilter\")}if([\"dark\",\"light\"].includes(e.excalidrawData.embeddableTheme)){const e=t.containerEl?.querySelector(\".pdf-container\");e&&!e.classList.contains(\"mod-themed\")&&e.classList.add(\"mod-themed\")}\"light\"===e.excalidrawData.embeddableTheme&&t.viewer?.child?.pdfViewer?.setBackground?.(null,!1),\"dark\"===e.excalidrawData.embeddableTheme&&t.viewer?.child?.pdfViewer?.setBackground?.(document.body.getCssPropertyValue(\"--color-base-00\"),!0)}}function setupPdfViewEnhancements(e,t,a,i){const n=t.current?.node?.child;if(!n)return;const r=()=>{i.current=!0,setPDFViewTheme(e,n),requestAnimationFrame((()=>{i.current=!1}));const r=n.containerEl;let s=r?.style?.height||\"\",o=null;r&&(o=new MutationObserver((()=>{const e=r.style.height||\"\";e!==s&&(s=e,e&&(r.style.height=\"\",s=\"\"))})),o.observe(r,{attributes:!0,attributeFilter:[\"style\"]}));const l=n.containerEl?.querySelector(\".pdf-viewer-container\")||null;let c=!1,d=0,h=0,p=1,u=1;const m=t=>{if(DEVICE.isDesktop&&1!==t.button||DEVICE.isMobile&&0!==t.button||!l)return;t.preventDefault(),t.stopPropagation(),c=!0,d=t.clientX,h=t.clientY;const{sx:a,sy:i}=(e=>{const t=e?.closest(\".excalidraw__embeddable-container\");if(!t)return{sx:1,sy:1};const a=getComputedStyle(t).transform;if(!a||\"none\"===a)return{sx:1,sy:1};if(a.startsWith(\"matrix3d(\")){const e=a.slice(9,-1).split(\",\").map(Number),t=e[0],i=e[1],n=e[4],r=e[5];return{sx:Math.hypot(t,i)||1,sy:Math.hypot(n,r)||1}}if(a.startsWith(\"matrix(\")){const e=a.slice(7,-1).split(\",\").map(Number),t=e[0],i=e[1],n=e[2],r=e[3];return{sx:Math.hypot(t,i)||1,sy:Math.hypot(n,r)||1}}return{sx:1,sy:1}})(l);p=a,u=i,window.addEventListener(\"pointermove\",g,{capture:!0}),window.addEventListener(\"pointerup\",f,{capture:!0,once:!0}),window.addEventListener(\"pointercancel\",f,{capture:!0,once:!0});try{e.contentEl.style.cursor=\"grabbing\"}catch{}},g=e=>{if(!c||!l)return;if(DEVICE.isDesktop&&!(4&e.buttons)||DEVICE.isMobile&&!(1&e.buttons))return;const t=e.clientX-d,a=e.clientY-h;d=e.clientX,h=e.clientY,l.scrollLeft-=t/(p||1),l.scrollTop-=a/(u||1),e.preventDefault(),e.stopPropagation()},f=t=>{c=!1;try{e.contentEl.style.cursor=\"\"}catch{}window.removeEventListener(\"pointermove\",g,{capture:!0}),window.removeEventListener(\"pointerup\",f,{capture:!0}),window.removeEventListener(\"pointercancel\",f,{capture:!0})},b=n.containerEl;if(b?.addEventListener(\"pointerdown\",m,{capture:!0}),a.currentCleanup=()=>{b?.removeEventListener(\"pointerdown\",m,{capture:!0}),window.removeEventListener(\"pointermove\",g,{capture:!0}),window.removeEventListener(\"pointerup\",f,{capture:!0}),window.removeEventListener(\"pointercancel\",f,{capture:!0}),o?.disconnect(),o=null},\"default\"!==e.excalidrawData.embeddableTheme){const r=n.containerEl?.querySelector(\".pdf-container\");if(r){a.current?.disconnect(),a.current=new MutationObserver((()=>{if(!i.current){i.current=!0;try{setPDFViewTheme(e,n),\"default\"!==e.excalidrawData.embeddableTheme&&showNoticeOnce(t$d(\"NOTICE_PDF_THEME\"))}finally{requestAnimationFrame((()=>{i.current=!1}))}}})),a.current.observe(r,{attributes:!0,attributeFilter:[\"class\"]});const s=n.containerEl;if(s){let n=new MutationObserver(((o,l)=>{if(!r.isConnected||!s.contains(r)){l.disconnect(),n=null;try{a.currentCleanup?.()}catch{}try{a.current?.disconnect()}catch{}setTimeout((()=>{t.current?.node?.child?.containerEl?.isConnected&&setupPdfViewEnhancements(e,t,a,i)}),0)}}));n.observe(s,{childList:!0,subtree:!0});const o=a.currentCleanup;a.currentCleanup=()=>{try{o?.()}catch{}try{a.current?.disconnect()}catch{}try{n?.disconnect()}catch{}n=null}}}}},s=t?.current?.node?.child?.containerEl;if(s){const e=\".pdf-viewer-container\";if(s.querySelector(e))r();else{let t=null;const a=new MutationObserver(((a,i)=>{s.querySelector(e)&&(r(),i.disconnect(),t&&clearTimeout(t))}));a.observe(s,{childList:!0,subtree:!0}),t=window.setTimeout((()=>{a.disconnect()}),1e4)}}}function renderWebView(e,t,a,i){const n=e.startsWith(\"data:\");return DEVICE.isDesktop&&!n?React__namespace.createElement(\"webview\",{ref:e=>t.updateEmbeddableRef(a,e),className:\"excalidraw__embeddable\",title:\"Excalidraw Embedded Content\",allowFullScreen:!0,src:e,webpreferences:\"autoplayPolicy=document-user-activation-required\",style:{overflow:\"hidden\",borderRadius:\"var(--embeddable-radius)\"}}):React__namespace.createElement(\"iframe\",{ref:e=>t.updateEmbeddableRef(a,e),className:\"excalidraw__embeddable\",title:\"Excalidraw Embedded Content\",allowFullScreen:!0,allow:\"accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture\",src:n?null:e,style:{overflow:\"hidden\",borderRadius:\"var(--embeddable-radius)\"},srcDoc:n?atob(e.split(\",\")[1]):null})}function RenderObsidianView({mdProps:e,element:t,linkText:a,view:i,containerRef:n,activeEmbeddable:r,theme:s,canvasColor:o,selectedElementId:l}){const{subpath:c,file:d}=processLinkText(a,i);if(!d)return null;const h=i.packages.react,p=h.useRef(null),u=h.useRef(!1),m=h.useRef(!1),g=h.useRef(\"empty\"),f=h.useRef(s),b=h.useRef(t),U=h.useRef(null),E=h.useRef(!1),w=h.useRef(null),y=h.useRef(i.file);h.useEffect((()=>{f.current=s}),[s]),h.useEffect((()=>{b.current=t}),[t]);const v=h.useCallback((e=>{m.current&&e.stopPropagation()}),[m.current]);function T(e,t,a,r,s){if(!a)return;if(!p.current?.hasOwnProperty(\"node\"))return;const o=n.current?.firstElementChild;if(a.useObsidianDefaults)return e?.style.removeProperty(\"--canvas-background\"),o?.style.removeProperty(\"background-color\"),e?.style.removeProperty(\"--canvas-border\"),void o?.style.removeProperty(\"border-color\");const l=i.plugin.ea;if(a.backgroundMatchElement){const i=(a?.backgroundOpacity??50)/100,n=t?.backgroundColor?\"transparent\"===t.backgroundColor.toLowerCase()?\"transparent\":l.getCM(t.backgroundColor).alphaTo(i).stringHEX({alpha:!0}):\"transparent\";\"transparent\"===n?e?.addClass(\"transparent\"):e?.removeClass(\"transparent\"),e?.style.setProperty(\"--canvas-background\",n),e?.style.setProperty(\"--background-primary\",n),o?.style.setProperty(\"background-color\",n)}else if(!(a.backgroundMatchElement??1)){const t=(a.backgroundOpacity??100)/100,i=a.backgroundMatchCanvas?\"transparent\"===r.toLowerCase()?\"transparent\":l.getCM(r).alphaTo(t).stringHEX({alpha:!0}):l.getCM(a.backgroundColor).alphaTo((a.backgroundOpacity??100)/100).stringHEX({alpha:!0});\"transparent\"===i?e?.addClass(\"transparent\"):e?.removeClass(\"transparent\"),e?.style.setProperty(\"--canvas-background\",i),e?.style.setProperty(\"--background-primary\",i),o?.style.setProperty(\"background-color\",i)}switch(s){case\"bases\":e?.style.setProperty(\"--bases-cards-container-background\",\"var(--background-primary)\"),e?.style.setProperty(\"--bases-embed-border-color\",\"var(--background-modifier-border)\"),e?.style.setProperty(\"--bases-table-header-color\",\"var(--text-muted)\"),e?.style.setProperty(\"--bases-table-header-background\",\"var(--background-primary)\"),e?.style.setProperty(\"--bases-table-header-background-hover\",\"var(--background-modifier-hover)\"),e?.style.setProperty(\"--bases-table-header-sort-mask\",\"linear-gradient(to left, transparent var(--size-4-6), black var(--size-4-6))\"),e?.style.setProperty(\"--bases-table-border-color\",\"var(--table-border-color)\"),e?.style.setProperty(\"--bases-table-row-background-hover\",\"var(--table-row-background-hover)\"),e?.style.setProperty(\"--bases-table-cell-shadow-active\",\"0 0 0 2px var(--interactive-accent)\"),e?.style.setProperty(\"--bases-table-cell-background-active\",\"var(--background-primary)\"),e?.style.setProperty(\"--bases-table-cell-background-disabled\",\"var(--background-primary-alt)\"),e?.style.setProperty(\"--bases-cards-container-background\",\"var(--background-primary)\"),e?.style.setProperty(\"--bases-cards-background\",\"var(--background-primary)\"),e?.style.setProperty(\"--bases-cards-cover-background\",\"var(--background-primary-alt)\"),e?.style.setProperty(\"--bases-cards-shadow\",\"0 0 0 1px var(--background-modifier-border)\"),e?.style.setProperty(\"--bases-cards-shadow-hover\",\"0 0 0 1px var(--background-modifier-border-hover)\");break;case\"pdf\":e?.style.setProperty(\"--pdf-sidebar-background\",\"var(--background-primary)\"),e?.style.setProperty(\"--pdf-background\",\"var(--background-primary)\"),e?.style.setProperty(\"--pdf-sidebar-background\",\"var(--background-primary)\")}if(a.borderMatchElement){const i=(a?.borderOpacity??50)/100,n=t?.strokeColor?\"transparent\"===t.strokeColor.toLowerCase()?\"transparent\":l.getCM(t.strokeColor).alphaTo(i).stringHEX({alpha:!0}):\"transparent\";e?.style.setProperty(\"--canvas-border\",n),e?.style.setProperty(\"--canvas-color\",n)}else if(!(a?.borderMatchElement??1)){const t=l.getCM(a.borderColor).alphaTo((a.borderOpacity??100)/100).stringHEX({alpha:!0});e?.style.setProperty(\"--canvas-border\",t),e?.style.setProperty(\"--canvas-color\",t)}}h.useEffect((()=>{if(n?.current)return KEYBOARD_EVENT_TYPES.forEach((e=>n.current.addEventListener(e,v))),n.current.addEventListener(\"click\",S),()=>{n?.current&&(KEYBOARD_EVENT_TYPES.forEach((e=>n.current.removeEventListener(e,v))),EXTENDED_EVENT_TYPES.forEach((e=>n.current.removeEventListener(e,v))),n.current.removeEventListener(\"click\",S))}}),[]),h.useEffect((()=>{if(EXTENDED_EVENT_TYPES.forEach((e=>n.current.removeEventListener(e,v))),n?.current)return m.current&&EXTENDED_EVENT_TYPES.forEach((e=>n.current.addEventListener(e,v))),()=>{n?.current&&EXTENDED_EVENT_TYPES.forEach((e=>n.current.removeEventListener(e,v)))}}),[m.current,n.current]),h.useEffect((()=>{d!==i.file&&(m.current||setFileToLocalGraph(i.app,i.file))}),[m.current]),h.useEffect((()=>{if(!n?.current)return;for(;n.current.hasChildNodes();)n.current.removeChild(n.current.lastChild);n.current.parentElement.style.padding=\"\",p.current={leaf:null,node:null,editNode:null};const a=a=>{obsidian_module.requireApiVersion(\"1.9.10\")||i.app.workspace.activeLeaf===i.leaf&&DEVICE.isDesktop&&(i.ownerWindow.electronWindow.isAlwaysOnTop()||(i.ownerWindow.electronWindow.setAlwaysOnTop(!0),setTimeout((()=>{i.ownerWindow.electronWindow.setAlwaysOnTop(!1)}),500))),p.current.node=i.canvasNodeFactory.createFileNote(d,c,n.current,t.id),T(n.current,t,e,o,a),i.updateEmbeddableLeafRef(t.id,p.current),g.current=\"markdown\"};if(patchMobileView(i),c&&i.canvasNodeFactory.isInitialized()&&\"md\"===d.extension.toLowerCase())a(\"markdown\");else{let r=predictViewType(i.app,d);\"markdown\"!==r&&CANVAS_VIEWTYPES.has(r)&&i.canvasNodeFactory.isInitialized()?(a(r),\"pdf\"===r&&setupPdfViewEnhancements(i,p,U,E)):(async()=>{const{rootSplit:r,leaf:s}=createLeaf(i);p.current.leaf=s,await p.current.leaf.openFile(d,{active:!1,state:{mode:\"preview\"},...c?{eState:{subpath:c}}:{}});const l=p.current.leaf.view?.getViewType();if(g.current=l,\"canvas\"===l&&p.current.leaf.view.canvas?.setReadonly(!0),\"markdown\"===l&&i.canvasNodeFactory.isInitialized())a(\"markdown\"),await p.current.leaf.setViewState({state:{file:null}}),p.current.leaf?.detach();else{const a=r.containerEl.querySelector(\"div.workspace-leaf\");a&&(a.style.borderRadius=\"var(--embeddable-radius)\"),r.containerEl.addClass(\"mod-visible\"),n.current.appendChild(r.containerEl),T(n.current,t,e,o,l),i.updateEmbeddableLeafRef(t.id,p.current)}})()}return()=>{U.currentCleanup?.(),U.current?.disconnect(),U.current=null;try{w.current?.()}catch{}w.current=null,p.current&&(i.canvasNodeFactory.removeNode(p.current.node),p.current.leaf?.detach(),p.current=null)}}),[a,c,n]),h.useEffect((()=>{if(!n.current)return;const t=b.current,a=n.current;a.hasClass(\"canvas-node\")&&T(a,t,e,o,g.current)}),[e?.useObsidianDefaults,e?.backgroundMatchCanvas,e?.backgroundMatchElement,e?.backgroundColor,e?.backgroundOpacity,e?.borderMatchElement,e?.borderColor,e?.borderOpacity,b.current,n.current,o,g.current]),h.useEffect((()=>{u.current&&(p.current?.node&&(n.current?.addClasses([\"is-editing\",\"is-focused\"]),i.canvasNodeFactory.stopEditing(p.current.node)),u.current=!1)}),[u.current,p]);const S=h.useCallback((e=>{if(i.file===y.current&&(m.current&&e?.stopPropagation(),m.current&&!u.current&&p.current)){if(p.current.node){const e=getTheme(i,f.current);return n.current?.addClasses([\"is-editing\",\"is-focused\"]),void i.canvasNodeFactory.startEditing(p.current.node,e)}if(p.current.leaf&&\"markdown\"===g.current){const e=i.excalidrawAPI.getSceneElements().filter((e=>e.id===t.id))[0];if(!e||0!==e.angle)return void new obsidian_module.Notice(\"Sorry, cannot edit rotated markdown documents\");const a=p.current.leaf.view.modes;if(!a)return;patchMobileView(i),p.current.leaf.view.setMode(a.source),u.current=!0}}}),[p.current?.leaf,t.id,i,f.current,m.current,u.current,g.current]),_=h.useCallback((()=>{i.file===y.current&&(m.current&&u.current||(m.current=!0,S()))}),[m.current,u.current,S,i]);return p.current&&(p.current.editNode=_),h.useEffect((()=>{const e=e=>{if(\"Escape\"===e.key&&m.current)return e.preventDefault(),e.stopPropagation(),void i.updateScene({appState:{activeEmbeddable:null}});\"Enter\"!==e.key||u.current||l!==t.id&&r?.element?.id!==t.id||_()};return document.addEventListener(\"keydown\",e,!0),()=>{document.removeEventListener(\"keydown\",e,!0)}}),[S,m.current,i,r,t,l]),h.useEffect((()=>{if(i.file!==y.current)return;if(!n?.current||!p?.current)return;const e=m.current;if(m.current=r?.element.id===t.id&&\"active\"===r?.state,e===m.current)return;d!==i.file&&setFileToLocalGraph(i.app,d);const a=p.current?.node;if(a)if(m.current&&i.plugin.settings.markdownNodeOneClickEditing&&!n.current?.hasClass(\"is-editing\")){const e=getTheme(i,f.current);n.current?.addClasses([\"is-editing\",\"is-focused\"]),i.canvasNodeFactory.startEditing(a,e)}else n.current?.removeClasses([\"is-editing\",\"is-focused\"]),i.canvasNodeFactory.stopEditing(a);else if(p.current.leaf){if(DEVICE.isPhone)if(m.current){if(!w.current){const e=patchMobileView(i,{keepAlive:!0,isActive:()=>m.current});w.current=\"function\"==typeof e?e:null}}else{try{w.current?.()}catch{}w.current=null}if(\"markdown\"===g.current){const e=p.current.leaf?.view.modes;if(!e)return;if(!m.current)return p.current.leaf.view.setMode(e.preview),void(u.current=!1)}}}),[n,p,r?.state,m,r?.element,r?.state,t,i,u,i.canvasNodeFactory,f.current]),null}const CustomEmbeddable=({element:e,view:t,appState:a,linkText:i})=>{const n=t.packages.react,r=n.useRef(null),s=getTheme(t,a.theme),o=e.customData?.mdProps||null,l=Object.keys(a.selectedElementIds);return n.createElement(\"div\",{ref:r,style:{width:\"100%\",height:\"100%\",borderRadius:\"var(--embeddable-radius)\",color:\"var(--text-normal)\",touchAction:\"auto\"},className:`${s} canvas-node ${o?.filenameVisible&&!o.useObsidianDefaults?\"\":\"excalidraw-mdEmbed-hideFilename\"}`},n.createElement(RenderObsidianView,{mdProps:o,element:e,linkText:i,view:t,containerRef:r,activeEmbeddable:a.activeEmbeddable,theme:a.theme,canvasColor:a.viewBackgroundColor,selectedElementId:1===l.length?l[0]:null}))};class CanvasNodeFactory{view;leaf;canvas;nodes=new Map;initialized=!1;isInitialized=()=>this.initialized;observer;constructor(e){this.view=e}async initialize(){const e=this.view.app,t=e.internalPlugins.plugins.canvas;t._loaded||await t.load();const a=this.view.ownerDocument,i=new obsidian_module.WorkspaceSplit(e.workspace,\"vertical\");i.getRoot=()=>e.workspace[a===document?\"rootSplit\":\"floatingSplit\"],i.getContainer=()=>getContainerForDocument(a),this.leaf=e.workspace.createLeafInParent(i,0),this.canvas=t.views.canvas(this.leaf).canvas,this.initialized=!0}createFileNote(e,t,a,i){if(!this.initialized)return;t=t??\"\",this.nodes.has(i)&&(this.canvas.removeNode(this.nodes.get(i)),this.nodes.delete(i));const n=this.canvas.createFileNode({pos:{x:0,y:0},file:e,subpath:t,save:!1});return n.setFilePath(e.path,t),n.render(),n.containerEl.querySelector(\".canvas-node-content-blocker\")?.remove(),a.appendChild(n.containerEl),this.nodes.set(i,n),n}async waitForEditor(e){let t=0;for(;!e.child.editor?.containerEl?.parentElement?.parentElement&&t++<40;)await sleep(25);return e.child.editor?.containerEl?.parentElement?.parentElement}setupThemeObserver(e,t,a){const i=e=>{for(const i of e)if(\"attributes\"===i.type&&\"class\"===i.attributeName){const e=i.target;e.classList.contains(t)&&(e.classList.remove(t),e.classList.add(a))}};this.observer?.disconnect(),this.observer=DEBUGGING?new CustomMutationObserver(i,\"CanvasNodeFactory\"):new MutationObserver(i),this.observer.observe(e,{attributes:!0})}async startEditing(e,t){if(this.initialized&&e&&e.isEditable())try{await this.view.setEmbeddableNodeIsEditing(),e.startEditing(),e.isEditing=!0;const a=isObsidianThemeDark()?\"theme-dark\":\"theme-light\";if(a===t)return;const i=await this.waitForEditor(e);if(!i)return;i.classList.remove(a),i.classList.add(t),this.setupThemeObserver(i,a,t)}catch(t){console.error(\"Error starting edit:\",t),e.isEditing=!1}}stopEditing(e){if(this.initialized&&e&&e.isEditing&&e.isEditable())try{this.view.clearEmbeddableNodeIsEditing(),e.child.showPreview(),e.isEditing=!1,this.observer?.disconnect()}catch(e){console.error(\"Error stopping edit:\",e)}}removeNode(e){this.initialized&&e&&(this.nodes.delete(e.file.path),this.canvas.removeNode(e),e.detach())}purgeNodes(){this.initialized&&(this.nodes.forEach((e=>{this.canvas.removeNode(e),e.detach()})),this.nodes.clear())}destroy(){this.purgeNodes(),this.initialized=!1,this.observer?.disconnect(),this.view=null,this.canvas=null,this.leaf=null}}const REG_YOUTUBE=/^(?:http(?:s)?:\\/\\/)?(?:www\\.)?youtu(?:be\\.com|\\.be)\\/(embed\\/|watch\\?v=|shorts\\/|playlist\\?list=|embed\\/videoseries\\?list=)?([a-zA-Z0-9_-]+)(?:\\?t=|.*&t=|\\?start=|.*&start=)?([a-zA-Z0-9_-]+)?[^\\s]*$/,isYouTube=e=>Boolean(e.match(REG_YOUTUBE)),getYouTubeStartAt=e=>{const t=e.match(REG_YOUTUBE);if(t?.[2]){const e=t[3]?parseInt(t[3]):0,a=Math.floor(e/3600),i=Math.floor((e-3600*a)/60),n=e-3600*a-60*i;return 0===a&&0===i&&0===n?\"\":0===a&&0===i?`${String(n).padStart(2,\"0\")}`:0===a?`${String(i).padStart(2,\"0\")}:${String(n).padStart(2,\"0\")}`:`${String(a).padStart(2,\"0\")}:${String(i).padStart(2,\"0\")}:${String(n).padStart(2,\"0\")}`}return\"\"},isValidYouTubeStart=e=>!!/^[0-9]+$/.test(e)||!!/^[0-9]+:[0-9]+$/.test(e)||!!/^[0-9]+:[0-9]+:[0-9]+$/.test(e)||void 0,updateYouTubeStartTime=(e,t)=>{const a=e.match(REG_YOUTUBE);if(a?.[2]){const i=\"\"===t?\"\":`t=${timeStringToSeconds(t)}`;let n=e;return a[3]?(n=e.replace(/([?&])t=[a-zA-Z0-9_-]+/,`$1${i}`),n=n.replace(/([?&])start=[a-zA-Z0-9_-]+/,`$1${i}`)):n+=(e.includes(\"?\")?\"&\":\"?\")+i,n}return e},timeStringToSeconds=e=>{const t=e.split(\":\").map(Number),a=t.length;return 1===a?t[0]:2===a?60*t[0]+t[1]:3===a?3600*t[0]+60*t[1]+t[2]:0};class EmbeddalbeMDFileCustomDataSettingsComponent{contentEl;mdCustomData;update;isMDFile;constructor(e,t,a,i=!0){this.contentEl=e,this.mdCustomData=t,this.update=a,this.isMDFile=i,a||(this.update=()=>{})}render(){let e;new obsidian_module.Setting(this.contentEl).setName(t$d(\"ES_USE_OBSIDIAN_DEFAULTS\")).addToggle((t=>t.setValue(this.mdCustomData.useObsidianDefaults).onChange((t=>{this.mdCustomData.useObsidianDefaults=t,e.style.display=t?\"none\":\"block\",this.update()})))),this.contentEl.createEl(\"hr\",{cls:\"excalidraw-setting-hr\"}),e=this.contentEl.createDiv(),e.style.display=this.mdCustomData.useObsidianDefaults?\"none\":\"block\";const t=e;this.isMDFile&&new obsidian_module.Setting(t).setName(t$d(\"ES_FILENAME_VISIBLE\")).addToggle((e=>e.setValue(this.mdCustomData.filenameVisible).onChange((e=>{this.mdCustomData.filenameVisible=e})))),t.createEl(\"h4\",{text:t$d(\"ES_BACKGROUND_HEAD\")});const a=t.createDiv({cls:\"excalidraw-setting-desc\"});let i,n,r;a.textContent=t$d(\"ES_BACKGROUND_DESC_INFO\"),a.addEventListener(\"click\",(()=>{a.textContent===t$d(\"ES_BACKGROUND_DESC_INFO\")?a.textContent=t$d(\"ES_BACKGROUND_DESC_DETAIL\"):a.textContent=t$d(\"ES_BACKGROUND_DESC_INFO\")})),new obsidian_module.Setting(t).setName(t$d(\"ES_BACKGROUND_MATCH_ELEMENT\")).addToggle((e=>{n=e,e.setValue(this.mdCustomData.backgroundMatchElement).onChange((e=>{this.mdCustomData.backgroundMatchElement=e,e?(i.settingEl.style.display=\"none\",this.mdCustomData.backgroundMatchCanvas&&r.setValue(!1)):this.mdCustomData.backgroundMatchCanvas||(i.settingEl.style.display=\"\"),this.update()}))})),new obsidian_module.Setting(t).setName(t$d(\"ES_BACKGROUND_MATCH_CANVAS\")).addToggle((e=>{r=e,e.setValue(this.mdCustomData.backgroundMatchCanvas).onChange((e=>{this.mdCustomData.backgroundMatchCanvas=e,e?(i.settingEl.style.display=\"none\",this.mdCustomData.backgroundMatchElement&&n.setValue(!1)):this.mdCustomData.backgroundMatchElement||(i.settingEl.style.display=\"\"),this.update()}))})),this.mdCustomData.backgroundMatchElement&&this.mdCustomData.backgroundMatchCanvas&&r.setValue(!1),i=new obsidian_module.Setting(t).setName(t$d(\"ES_BACKGROUND_COLOR\")).addColorPicker((e=>e.setValue(this.mdCustomData.backgroundColor).onChange((e=>{this.mdCustomData.backgroundColor=e,this.update()})))),i.settingEl.style.display=this.mdCustomData.backgroundMatchElement||this.mdCustomData.backgroundMatchCanvas?\"none\":\"\";const s=e=>fragWithHTML(`Current opacity is <b>${e}%</b>`),o=new obsidian_module.Setting(t).setName(t$d(\"ES_BACKGROUND_OPACITY\")).setDesc(s(this.mdCustomData.backgroundOpacity)).addSlider((e=>e.setLimits(0,100,5).setValue(this.mdCustomData.backgroundOpacity).onChange((e=>{this.mdCustomData.backgroundOpacity=e,o.setDesc(s(e)),this.update()}))));if(this.isMDFile){let e;t.createEl(\"h4\",{text:t$d(\"ES_BORDER_HEAD\")}),new obsidian_module.Setting(t).setName(t$d(\"ES_BORDER_MATCH_ELEMENT\")).addToggle((t=>t.setValue(this.mdCustomData.borderMatchElement).onChange((t=>{this.mdCustomData.borderMatchElement=t,e.settingEl.style.display=t?\"none\":\"\",this.update()})))),e=new obsidian_module.Setting(t).setName(t$d(\"ES_BORDER_COLOR\")).addColorPicker((e=>e.setValue(this.mdCustomData.borderColor).onChange((e=>{this.mdCustomData.borderColor=e,this.update()})))),e.settingEl.style.display=this.mdCustomData.borderMatchElement?\"none\":\"\";const a=new obsidian_module.Setting(t).setName(t$d(\"ES_BORDER_OPACITY\")).setDesc(s(this.mdCustomData.borderOpacity)).addSlider((e=>e.setLimits(0,100,5).setValue(this.mdCustomData.borderOpacity).onChange((e=>{this.mdCustomData.borderOpacity=e,a.setDesc(s(e)),this.update()}))))}}}class EmbeddableSettings extends obsidian_module.Modal{plugin;view;file;element;ea;updatedFilepath=null;zoomValue;isYouTube;youtubeStart=null;isMDFile;notExcalidrawIsInternal;isLocalURI;mdCustomData;onKeyDown;constructor(e,t,a,i){if(super(e.app),this.plugin=e,this.view=t,this.file=a,this.element=i,this.ea=getEA(this.view),this.ea.copyViewElementsToEAforEditing([this.element]),this.zoomValue=i.scale[0],this.isYouTube=isYouTube(this.element.link),this.notExcalidrawIsInternal=this.file&&!this.view.plugin.isExcalidrawFile(this.file),this.isMDFile=this.file&&\"md\"===this.file.extension.toLowerCase(),this.isLocalURI=this.element.link.startsWith(\"file://\"),isYouTube&&(this.youtubeStart=getYouTubeStartAt(this.element.link)),this.mdCustomData=i.customData?.mdProps??t.plugin.settings.embeddableMarkdownDefaults,!i.customData?.mdProps){const e=this.plugin.ea.getCM(i.backgroundColor);this.mdCustomData.backgroundColor=e.stringHEX({alpha:!1}),this.mdCustomData.backgroundOpacity=i.opacity;const t=this.plugin.ea.getCM(i.strokeColor);this.mdCustomData.borderColor=t.stringHEX({alpha:!1}),this.mdCustomData.borderOpacity=i.opacity}}onOpen(){this.containerEl.classList.add(\"excalidraw-release\"),this.createForm()}onClose(){this.containerEl.removeEventListener(\"keydown\",this.onKeyDown),this.plugin=null,this.view=null,this.file=null,this.element=null,this.ea.destroy(),this.ea=null,this.mdCustomData=null}async createForm(){this.contentEl.createEl(\"h1\",{text:t$d(\"ES_TITLE\")}),this.file&&new obsidian_module.Setting(this.contentEl).setName(t$d(\"ES_RENAME\")).addText((e=>e.setValue(getPathWithoutExtension(this.file)).onChange((async e=>{this.updatedFilepath=e}))));const e=()=>fragWithHTML(`${t$d(\"ES_ZOOM_100_RELATIVE_DESC\")}<br>Current zoom is <b>${Math.round(100*this.zoomValue)}%</b>`),t=new obsidian_module.Setting(this.contentEl).setName(t$d(\"ES_ZOOM\")).setDesc(e()).addButton((a=>a.setButtonText(t$d(\"ES_ZOOM_100\")).onClick((()=>{const a=this.view.excalidrawAPI;this.zoomValue=1/a.getAppState().zoom.value,t.setDesc(e())})))).addSlider((a=>a.setLimits(10,400,5).setValue(100*this.zoomValue).onChange((a=>{this.zoomValue=a/100,t.setDesc(e())}))));this.isYouTube&&new obsidian_module.Setting(this.contentEl).setName(t$d(\"ES_YOUTUBE_START\")).setDesc(t$d(\"ES_YOUTUBE_START_DESC\")).addText((e=>e.setValue(this.youtubeStart).onChange((async e=>{this.youtubeStart=e})))),(this.isMDFile||this.notExcalidrawIsInternal)&&(this.contentEl.createEl(\"h3\",{text:t$d(\"ES_EMBEDDABLE_SETTINGS\")}),new EmbeddalbeMDFileCustomDataSettingsComponent(this.contentEl,this.mdCustomData,void 0,this.isMDFile).render()),new obsidian_module.Setting(this.contentEl).addButton((e=>e.setButtonText(t$d(\"PROMPT_BUTTON_CANCEL\")).setTooltip(\"ESC\").onClick(this.close.bind(this)))).addButton((e=>e.setButtonText(t$d(\"PROMPT_BUTTON_OK\")).setTooltip(\"CTRL/Opt+Enter\").setCta().onClick(this.applySettings.bind(this))));const a=e=>{isWinCTRLorMacCMD(e)&&\"Enter\"===e.key&&this.applySettings()};this.onKeyDown=a,this.containerEl.ownerDocument.addEventListener(\"keydown\",a)}async applySettings(){let e=!1;const t=this.ea.getElement(this.element.id);if(this.updatedFilepath){const a=`${this.updatedFilepath}.${this.file.extension}`;if(a!==this.file.path){const i=splitFolderAndFilename(a),n=getNewUniqueFilepath(this.app.vault,i.filename,i.folderpath);if(this.app.vault.getAbstractFileByPath(n))new obsidian_module.Notice(\"File rename failed. A file with this name already exists.\\n\"+n,1e4);else try{await this.app.fileManager.renameFile(this.file,n),t.link=this.element.link.replace(/(\\[\\[)([^#\\]]*)([^\\]]*]])/,`$1${this.plugin.app.metadataCache.fileToLinktext(this.file,this.view.file.path,!0)}$3`),e=!0}catch(e){new obsidian_module.Notice(\"File rename failed. \"+e,1e4)}}}this.isYouTube&&this.youtubeStart!==getYouTubeStartAt(this.element.link)&&(e=!0,\"\"===this.youtubeStart||isValidYouTubeStart(this.youtubeStart)?t.link=updateYouTubeStartTime(t.link,this.youtubeStart):new obsidian_module.Notice(t$d(\"ES_YOUTUBE_START_INVALID\"))),!this.isMDFile||this.mdCustomData.backgroundColor===this.element.customData?.backgroundColor&&this.mdCustomData.borderColor===this.element.customData?.borderColor&&this.mdCustomData.backgroundOpacity===this.element.customData?.backgroundOpacity&&this.mdCustomData.borderOpacity===this.element.customData?.borderOpacity&&this.mdCustomData.filenameVisible===this.element.customData?.filenameVisible||(addAppendUpdateCustomData(t,{mdProps:this.mdCustomData}),e=!0),this.zoomValue!==this.element.scale[0]&&(e=!0,t.scale=[this.zoomValue,this.zoomValue]),e?(async()=>{await this.ea.addElementsToView(),this.ea.viewUpdateScene({appState:{},captureUpdate:CaptureUpdateAction.NEVER}),this.close()})():this.close()}}class EmbeddableMenu{view;containerRef;menuFadeTimeout=0;menuElementId=null;constructor(e,t){this.view=e,this.containerRef=t}destroy(){this.menuFadeTimeout&&(clearTimeout(this.menuFadeTimeout),this.menuFadeTimeout=null),this.view=null,this.containerRef=null,this.updateElement=null,this.handleMouseEnter=null,this.handleMouseLeave=null,this.renderButtons=null}updateElement=async(e,t,a,i=!0)=>{if(!t)return;const n=this.view,r=n.app;if(t=n.excalidrawAPI.getSceneElements().find((e=>e.id===t.id)),!t)return;const s=`[[${r.metadataCache.fileToLinktext(a,n.file.path,\"md\"===a.extension)}${e}]]`,o=getEA(n);o.copyViewElementsToEAforEditing([t]),o.getElement(t.id).link=s,n.excalidrawData.elementLinks.set(t.id,s),await o.addElementsToView(!1,i,!0),o.destroy()};handleMouseEnter(){clearTimeout(this.menuFadeTimeout),this.containerRef.current?.style.setProperty(\"opacity\",\"1\")}handleMouseLeave(){this.menuFadeTimeout=window.setTimeout((()=>{this.containerRef.current?.style.setProperty(\"opacity\",\"0.2\")}),5e3)}async actionBaseViewSelection(e,t,a){this.view.updateScene({appState:{activeEmbeddable:null},captureUpdate:CaptureUpdateAction.NEVER});const i=Array.from((await this.view.app.vault.read(e)).matchAll(/\\s*name\\: (.*)$/gm)).map((e=>e?.[1]));let n,r;n=[\"\"].concat(i.map((e=>`#${cleanSectionHeading(e)}`))),r=[t$d(\"DO_NOT_PIN_VIEW\")].concat(i.map((e=>e)));const s=await ScriptEngine.suggester(this.view.app,r,n,t$d(\"SELECT_VIEW\"));(s||\"\"===s)&&s!==t&&this.updateElement(s,a,e)}async actionMarkdownSelection(e,t,a,i){this.view.updateScene({appState:{activeEmbeddable:null},captureUpdate:CaptureUpdateAction.NEVER});const n=(await this.view.app.metadataCache.blockCache.getForFile({isCancelled:()=>!1},e)).blocks.filter((e=>e.display&&\"heading\"===e.node?.type)).filter((e=>!t||!MD_EX_SECTIONS.includes(e.display)));let r,s;t?(r=n.map((e=>`#${cleanSectionHeading(e.display)}`)),s=n.map((e=>e.display))):(r=[\"\"].concat(n.map((e=>`#${cleanSectionHeading(e.display)}`))),s=[t$d(\"SHOW_ENTIRE_FILE\")].concat(n.map((e=>e.display))));const o=await ScriptEngine.suggester(this.view.app,s,r,t$d(\"SELECT_SECTION\"));(o||\"\"===o)&&o!==a&&this.updateElement(o,i,e)}actionBookmarkPage(e){if(!e)return;const t=this.view.getEmbeddableLeafElementById(e.id)?.node?.child;if(!t)return;const a=getActivePDFPageNumberFromPDFView(t);if(!a)return;const i=t?.file;i&&this.updateElement(`#page=${a}`,e,i,!1)}async actionInsertPageAsImage(e){if(!e)return;const t=this.view.getEmbeddableLeafElementById(e.id)?.node?.child;if(!t)return;const a=getActivePDFPageNumberFromPDFView(t);if(!a)return;const i=t?.file;if(!i)return;const n=getEA(this.view);n.selectElementsInView([]);const r=e.x+e.width+20,s=e.y,o=this.view.app.metadataCache.fileToLinktext(i,this.view.file.path,!1),l=await insertImageToView(n,{x:r,y:s},`${o}#page=${a}`,void 0,void 0,!1);n.selectElementsInView([l]),n.destroy()}async actionMarkdownBlock(e,t,a){if(!e)return;this.view.updateScene({appState:{activeEmbeddable:null},captureUpdate:CaptureUpdateAction.NEVER});const i=(await this.view.app.metadataCache.blockCache.getForFile({isCancelled:()=>!1},e)).blocks.filter((e=>e.display&&e.node&&(\"paragraph\"===e.node.type||\"blockquote\"===e.node.type||\"listItem\"===e.node.type||\"table\"===e.node.type||\"callout\"===e.node.type))),n=[\"entire-file\"].concat(i),r=[t$d(\"SHOW_ENTIRE_FILE\")].concat(i.map((e=>`${e.node?.id?`#^${e.node.id}: `:\"\"}${e.display.trim()}`))),s=await ScriptEngine.suggester(this.view.app,r,n,t$d(\"SELECT_SECTION\"));if(!s)return;if(\"entire-file\"===s){if(\"\"===t)return;return void this.updateElement(\"\",a,e)}let o=s.node.id;if(!o||`#^${o}`!==t){if(!o){const t=s.node?.position?.end?.offset;if(!t)return;o=nanoid();const a=await this.view.app.vault.cachedRead(e);if(!a)return;await this.view.app.vault.modify(e,a.slice(0,t)+` ^${o}`+a.slice(t)),await sleep(200)}this.updateElement(`#^${o}`,a,e)}}actionZoomToElement(e,t){e&&this.view.excalidrawAPI.zoomToFit([e],t??this.view.plugin.settings.zoomToFitMaxLevel,.1)}actionProperties(e,t){e&&new EmbeddableSettings(this.view.plugin,this.view,t,e).open()}actionCrop(e){e&&this.view.app.commands.executeCommandById(\"obsidian-excalidraw-plugin:crop-image\")}actionReload(e,t){e.src=t}actionOpen(e,t){openExternalLink(e.src.startsWith(\"https://www.youtube.com\")||e.src.startsWith(\"https://player.vimeo.com\")?t.link:e.src,this.view.app)}actionCopyCode(e,t){e&&navigator.clipboard.writeText(atob(t.split(\",\")[1]))}renderButtons(e){const t=this.view,a=t?.excalidrawAPI;if(!a)return null;if(!t.file)return null;const i=e.viewModeEnabled&&!t.allowFrameButtonsInViewMode;if(!e.activeEmbeddable||\"active\"!==e.activeEmbeddable.state||i)return this.menuElementId=null,this.menuFadeTimeout&&(clearTimeout(this.menuFadeTimeout),this.menuFadeTimeout=0),null;const n=e.activeEmbeddable?.element;this.menuElementId!==n.id&&(this.menuElementId=n.id,this.handleMouseLeave());let r=n.link;if(!r)return null;const s=useDefaultExcalidrawFrame(n);let o=Boolean(n.link?.match(REG_LINKINDEX_HYPERLINK));if(!s&&!o){if(r.startsWith(\"data:text/html\"))o=!0;else{const e=REGEX_LINK.getRes(n.link).next();if(!e||!e.value&&e.done)return null;r=REGEX_LINK.getLink(e),o=Boolean(r.match(REG_LINKINDEX_HYPERLINK))}if(!o){const{subpath:a,file:i}=processLinkText(r,t);if(!i)return;const s=\"md\"===i.extension,o=\"base\"===i.extension,l=t.plugin.isExcalidrawFile(i),c=\"pdf\"===i.extension,{x:d,y:h}=sceneCoordsToViewportCoords({sceneX:n.x,sceneY:n.y},e),p=h-2.5*ROOTELEMENTSIZE-e.offsetTop+\"px\",u=d-e.offsetLeft+\"px\";return React__namespace.createElement(\"div\",{ref:this.containerRef,className:\"embeddable-menu\",style:{top:p,left:u,opacity:1},onMouseEnter:()=>this.handleMouseEnter(),onPointerDown:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},React__namespace.createElement(\"div\",{className:\"Island\",style:{position:\"relative\",display:\"block\"}},o&&React__namespace.createElement(ActionButton,{key:\"MarkdownSection\",title:t$d(\"PIN_VIEW\"),action:async()=>this.actionBaseViewSelection(i,a,n),icon:ICONS.ZoomToSection}),s&&React__namespace.createElement(ActionButton,{key:\"MarkdownSection\",title:t$d(\"NARROW_TO_HEADING\"),action:async()=>this.actionMarkdownSelection(i,l,a,n),icon:ICONS.ZoomToSection}),s&&!l&&React__namespace.createElement(ActionButton,{key:\"MarkdownBlock\",title:t$d(\"NARROW_TO_BLOCK\"),action:async()=>this.actionMarkdownBlock(i,a,n),icon:ICONS.ZoomToBlock}),React__namespace.createElement(ActionButton,{key:\"ZoomToElement\",title:t$d(\"ZOOM_TO_FIT\"),action:()=>this.actionZoomToElement(n,30),icon:ICONS.ZoomToSelectedElement}),React__namespace.createElement(ActionButton,{key:\"Properties\",title:t$d(\"PROPERTIES\"),action:()=>this.actionProperties(n,i),icon:ICONS.Properties}),c&&React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(ActionButton,{key:\"Crop\",title:t$d(\"CROP_PAGE\"),action:()=>this.actionCrop(n),icon:ICONS.Crop}),React__namespace.createElement(ActionButton,{key:\"Bookmark\",title:t$d(\"BOOKMARK_PAGE\"),action:()=>this.actionBookmarkPage(n),icon:ICONS.Bookmark}),React__namespace.createElement(ActionButton,{key:\"Camera\",title:t$d(\"CAPTURE_PAGE\"),action:()=>this.actionInsertPageAsImage(n),icon:ICONS.Camera}))))}}if(o||s){const i=s?a.getHTMLIFrameElement(n.id):t.getEmbeddableElementById(n.id);if(!i||!i.contentWindow)return null;const{x:o,y:l}=sceneCoordsToViewportCoords({sceneX:n.x,sceneY:n.y},e),c=l-2.5*ROOTELEMENTSIZE-e.offsetTop+\"px\",d=o-e.offsetLeft+\"px\";return React__namespace.createElement(\"div\",{ref:this.containerRef,className:\"embeddable-menu\",style:{top:c,left:d,opacity:1},onMouseEnter:()=>this.handleMouseEnter(),onPointerDown:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},React__namespace.createElement(\"div\",{className:\"Island\",style:{position:\"relative\",display:\"block\"}},i.src!==r&&!i.src.startsWith(\"https://www.youtube.com\")&&!i.src.startsWith(\"https://player.vimeo.com\")&&React__namespace.createElement(ActionButton,{key:\"Reload\",title:t$d(\"RELOAD\"),action:()=>this.actionReload(i,r),icon:ICONS.Reload}),React__namespace.createElement(ActionButton,{key:\"Open\",title:t$d(\"OPEN_IN_BROWSER\"),action:()=>this.actionOpen(i,n),icon:ICONS.Globe}),React__namespace.createElement(ActionButton,{key:\"ZoomToElement\",title:t$d(\"ZOOM_TO_FIT\"),action:()=>this.actionZoomToElement(n),icon:ICONS.ZoomToSelectedElement}),React__namespace.createElement(ActionButton,{key:\"Properties\",title:t$d(\"PROPERTIES\"),action:()=>this.actionProperties(n,null),icon:ICONS.Properties}),r?.startsWith(\"data:text/html\")&&React__namespace.createElement(ActionButton,{key:\"CopyCode\",title:t$d(\"COPYCODE\"),action:()=>this.actionCopyCode(n,r),icon:ICONS.Copy})))}}}const handleImageEditPrompt=async e=>{const t=window.ExcalidrawAutomate.plugin,{openAIAPIToken:a,openAIImageEditsURL:i}=t.settings,{image:n,text:r,imageGenerationProperties:s}=e,o=new FormData;if(o.append(\"model\",\"dall-e-2\"),\"\"!==r.trim()&&o.append(\"prompt\",r),n){const e=await fetch(n).then((e=>e.blob()));o.append(\"image\",e,\"image.png\")}if(s.mask){const e=await fetch(s.mask).then((e=>e.blob()));o.append(\"mask\",e,\"masik.png\")}s.size&&o.append(\"size\",s.size),s.n&&o.append(\"n\",String(s.n));try{const e=await fetch(i,{method:\"post\",body:o,headers:{Authorization:`Bearer ${a}`}});return e?{status:e.status,headers:e.headers,text:null,json:await e.json(),arrayBuffer:null}:null}catch(e){console.log(e)}return null},handleGenericPrompt=async e=>{const t=window.ExcalidrawAutomate.plugin,{openAIAPIToken:a,openAIDefaultTextModel:i,openAIDefaultVisionModel:n,openAIURL:r,openAIImageGenerationURL:s,openAIDefaultImageGenerationModel:o}=t.settings,{image:l,text:c,instruction:d,systemPrompt:h,imageGenerationProperties:p}=e,u=Boolean(p);let m;switch(u?\"dall-e\":l?\"image\":\"text\"){case\"text\":m={model:i,max_tokens:4096,messages:[...h&&\"\"!==h.trim()?[{role:\"system\",content:h}]:[],{role:\"user\",content:c},...d&&\"\"!==d.trim()?[{role:\"user\",content:d}]:[]]};break;case\"image\":m={model:n,max_tokens:4096,messages:[...h&&\"\"!==h.trim()?[{role:\"system\",content:h}]:[],{role:\"user\",content:[{type:\"image_url\",image_url:l},...c?[c]:[],...d&&\"\"!==d.trim()?[d]:[]]}]};break;case\"dall-e\":m={model:o,prompt:c,...p};break;default:return null}try{const e=await fetch(u?s:r,{method:\"post\",contentType:\"application/json\",body:JSON.stringify(m),headers:{\"Content-Type\":\"application/json\",Authorization:`Bearer ${a}`}});return e?{status:e.status,headers:e.headers,text:null,json:await e.json(),arrayBuffer:null}:null}catch(e){console.log(e)}return null},postOpenAI=async e=>{const t=window.ExcalidrawAutomate.plugin,{openAIAPIToken:a}=t.settings,{image:i,imageGenerationProperties:n}=e,r=Boolean(n)&&(Boolean(n.mask)||Boolean(i));return\"\"===a?(new obsidian_module.Notice(\"OpenAI API Token is not set. Please set it in plugin settings.\"),null):r?await handleImageEditPrompt(e):await handleGenericPrompt(e)},extractCodeBlocks=e=>{if(!e)return[];e=e.replaceAll(\"\\r\\n\",\"\\n\").replaceAll(\"\\r\",\"\\n\");const t=[],a=/```([a-zA-Z0-9]*)\\n([\\s\\S]+?)```/g;let i;for(;null!==(i=a.exec(e));){const e=i[1]??\"\",a=i[2].trim();t.push({data:a,type:e})}return t},errorHTML=e=>`<html>\\n  <body style=\"margin: 0; text-align: center\">\\n  <div style=\"display: flex; align-items: center; justify-content: center; flex-direction: column; height: 100vh; padding: 0 60px\">\\n    <div style=\"color:red\">There was an error during generation</div>\\n    </br>\\n    </br>\\n    <div>${e}</div>\\n  </div>\\n  </body>\\n  </html>`;class SelectCard extends obsidian_module.FuzzySuggestModal{app;view;sections;center=!1;x=0;y=0;constructor(e,t,a){super(e),this.app=e,this.view=t,this.sections=a,this.limit=20,this.setInstructions([{command:t$d(\"TYPE_SECTION\"),purpose:\"\"}]),this.inputEl.onkeyup=e=>{if(\"Enter\"==e.key&&this.containerEl.innerText.includes(t$d(\"EMPTY_SECTION_MESSAGE\"))){const e=this.inputEl.value;if(\"\"===e||MD_EX_SECTIONS.includes(e))return new obsidian_module.Notice(t$d(\"INVALID_SECTION_NAME\")),void this.close();addBackOfTheNoteCard(this.view,e,!0,void 0,void 0,this.center,{x:this.x,y:this.y}),this.close()}}}getItems(){return this.sections}getItemText(e){return e}onChooseItem(e){const t=getEA(this.view);if(this.center){const e=t.getViewCenterPosition();e&&(this.x=e.x-CARD_WIDTH/2,this.y=e.y-CARD_HEIGHT/2)}const a=t.addEmbeddable(this.x,this.y,CARD_WIDTH,CARD_HEIGHT,`[[${this.view.file.path}#${e}]]`);(async()=>{await t.addElementsToView(!this.center,!1,!0),t.selectElementsInView([a]),t.destroy()})()}start(e=!1){this.x=this.view.currentPosition.x,this.y=this.view.currentPosition.y,this.center=!!e,this.emptyStateText=t$d(\"EMPTY_SECTION_MESSAGE\"),this.setPlaceholder(t$d(\"SELECT_SECTION_OR_TYPE_NEW\")),this.open()}}const SYSTEM_PROMPT='You are a skilled front-end developer who builds interactive prototypes from wireframes, and is an expert at CSS Grid and Flex design.\\nYour role is to transform low-fidelity wireframes into working front-end HTML code.\\nYOU MUST FOLLOW FOLLOWING RULES:\\n- Use HTML, CSS, JavaScript to build a responsive, accessible, polished prototype\\n- Leverage Tailwind for styling and layout (import as script <script src=\"https://cdn.tailwindcss.com\"><\\/script>)\\n- Inline JavaScript when needed\\n- Fetch dependencies from CDNs when needed (using unpkg or skypack)\\n- Source images from Unsplash or create applicable placeholders\\n- Interpret annotations as intended vs literal UI\\n- Fill gaps using your expertise in UX and business logic\\n- generate primarily for desktop UI, but make it responsive.\\n- Use grid and flexbox wherever applicable.\\n- Convert the wireframe in its entirety, don\\'t omit elements if possible.\\nIf the wireframes, diagrams, or text is unclear or unreadable, refer to provided text for clarification.\\nYour goal is a production-ready prototype that brings the wireframes to life.\\nPlease output JUST THE HTML file containing your best attempt at implementing the provided wireframes.';async function diagramToHTML({image:e,apiKey:t,text:a,theme:i=THEME.LIGHT}){const n={model:EXCALIDRAW_PLUGIN.settings.openAIDefaultVisionModel,max_tokens:4096,temperature:.1,messages:[{role:\"system\",content:SYSTEM_PROMPT},{role:\"user\",content:[{type:\"image_url\",image_url:{url:e,detail:\"high\"}},{type:\"text\",text:`Above is the reference wireframe. Please make a new website based on these and return just the HTML file. Also, please make it for the ${i} theme. What follows are the wireframe's text annotations (if any)...`},{type:\"text\",text:a}]}]};return await fetch(\"https://api.openai.com/v1/chat/completions\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\",Authorization:`Bearer ${t}`},body:JSON.stringify(n)})}class DropManager{view;app;draginfoDiv;constructor(e){this.view=e,this.app=this.view.app}destroy(){this.draginfoDiv&&(this.ownerDocument.body.removeChild(this.draginfoDiv),delete this.draginfoDiv)}get ownerDocument(){return this.view.ownerDocument}get currentPosition(){return this.view.currentPosition}set currentPosition(e){this.view.currentPosition=e}get excalidrawAPI(){return this.view.excalidrawAPI}get plugin(){return this.view.plugin}get file(){return this.view.file}onDrop(e){this.draginfoDiv&&(this.ownerDocument.body.removeChild(this.draginfoDiv),delete this.draginfoDiv);const t=this.excalidrawAPI;if(!t)return!1;const a=t.getAppState();this.currentPosition=viewportCoordsToSceneCoords({clientX:e.clientX,clientY:e.clientY},a);const i=this.app.dragManager.draggable,n=internalDragModifierType(e),r=webbrowserDragModifierType(e),s=localFileDragModifierType(e),o=(t,a,n)=>{if(this.app.workspace.setActiveLeaf(this.view.leaf),!this.view.getHookServer().onDropHook)return!1;try{return this.view.getHookServer().onDropHook({ea:this.view.getHookServer(),event:e,draggable:i,type:t,payload:{files:a,text:n},excalidrawFile:this.file,view:this.view,pointerPosition:this.currentPosition})}catch(e){return new obsidian_module.Notice(\"on drop hook error. See console log for details\"),errorlog({where:\"ExcalidrawView.onDrop\",error:e}),!1}};switch(i?.type){case\"link\":case\"file\":if(!o(\"file\",[i.file],null)){const e=i.file;if(e.path.match(REG_LINKINDEX_INVALIDCHARS))return new obsidian_module.Notice(t$d(\"FILENAME_INVALID_CHARS\"),4e3),!1;if([\"image\",\"image-fullsize\"].contains(n)&&(IMAGE_TYPES.contains(e.extension)||\"md\"===e.extension||\"pdf\"===e.extension.toLowerCase()))return\"pdf\"===e.extension.toLowerCase()?new InsertPDFModal(this.plugin,this.view).open(e):(async()=>{const t=getEA(this.view);t.selectElementsInView([await insertImageToView(t,this.currentPosition,e,!(\"image-fullsize\"===n))]),t.destroy()})(),!1;if(\"embeddable\"===n)return(async()=>{const t=getEA(this.view);t.selectElementsInView([await insertEmbeddableToView(t,this.currentPosition,e)]),t.destroy()})(),!1;this.view.addText(`[[${this.app.metadataCache.fileToLinktext(i.file,this.file.path,!0)}]]`)}return!1;case\"files\":return o(\"file\",i.files,null)||(async()=>{if([\"image\",\"image-fullsize\"].contains(n)){const e=getEA(this.view);e.canvas.theme=t.getAppState().theme;let a=0;const r=[];for(const t of i.files)(IMAGE_TYPES.contains(t.extension)||\"md\"===t.extension)&&(r.push(await e.addImage(this.currentPosition.x+50*a,this.currentPosition.y+50*a,t,!(\"image-fullsize\"===n))),a++,await e.addElementsToView(!1,!1,!0),e.selectElementsInView(r)),\"pdf\"===t.extension.toLowerCase()&&new InsertPDFModal(this.plugin,this.view).open(t);e.destroy()}else{if(\"embeddable\"===n){const e=getEA(this.view);let t=0,a=0;const n=[];for(const r of i.files)n.push(await insertEmbeddableToView(e,{x:this.currentPosition.x+500*t,y:this.currentPosition.y+550*a},r)),t=(t+1)%3,0===t&&a++;return e.destroy(),!1}for(const e of i.files)await this.view.addText(`[[${this.app.metadataCache.fileToLinktext(e,this.file.path,!0)}]]`,void 0,!1),this.currentPosition.y+=2*a.currentItemFontSize;this.view.save(!1)}})(),!1}if(e.dataTransfer.types.includes(\"Files\")){if(e.dataTransfer.types.includes(\"text/plain\")){const t=e.dataTransfer.getData(\"text\");if(t&&o(\"text\",null,t))return!1;if(t&&\"image-url\"===r&&hyperlinkIsImage(t))return this.view.addImageWithURL(t),!1;if(t&&\"link\"===r)return this.plugin.settings.iframelyAllowed&&t.match(/^https?:\\/\\/\\S*$/)?(this.view.addTextWithIframely(t),!1):(this.view.addText(t),!1);if(t&&\"embeddable\"===r){const e=getEA(this.view);return insertEmbeddableToView(e,this.currentPosition,void 0,t).then((()=>e.destroy())),!1}}if(e.dataTransfer.types.includes(\"text/html\")){const t=e.dataTransfer.getData(\"text/html\").match(/src=[\"']([^\"']*)[\"']/);if(t&&\"image-url\"===r&&hyperlinkIsImage(t[1]))return this.view.addImageWithURL(t[1]),!1;if(t&&\"link\"===r)return this.plugin.settings.iframelyAllowed&&t[1].match(/^https?:\\/\\/\\S*$/)?(this.view.addTextWithIframely(t[1]),!1):(this.view.addText(t[1]),!1);if(t&&\"embeddable\"===r){const e=getEA(this.view);return insertEmbeddableToView(e,this.currentPosition,void 0,t[1]).then(e.destroy),!1}}if(e.dataTransfer.types.length>=1&&[\"image-url\",\"image-import\",\"embeddable\"].contains(s)){const t=Array.from(e.dataTransfer.files||[]);for(let a=0;a<t.length;a++){const i=t[a];let n=i?.path;if(!n&&i&&DEVICE.isDesktop){const{webUtils:e}=require(\"electron\");e&&e.getPathForFile&&(n=e.getPathForFile(i))}if(!n)return new obsidian_module.Notice(t$d(\"ERROR_CANT_READ_FILEPATH\"),6e3),!0;const r=getInternalLinkOrFileURLLink(n,this.plugin,e.dataTransfer.files[a].name,this.file),{x:o,y:l}=this.currentPosition,c={x:o+300*a,y:l+300*a};if(r.isInternal)if(\"embeddable\"===s){const e=getEA(this.view);insertEmbeddableToView(e,c,r.file).then((()=>e.destroy()))}else{\"pdf\"===r.file.extension&&new InsertPDFModal(this.plugin,this.view).open(r.file);const e=getEA(this.view);insertImageToView(e,c,r.file).then((()=>e.destroy()))}else{const t=getURLImageExtension(r.url);if(\"image-import\"===s)if(IMAGE_TYPES.contains(t))(async()=>{const t=e.dataTransfer.files[a].name,i=await e.dataTransfer.files[a].arrayBuffer(),n=this.app.metadataCache.getFirstLinkpathDest(t,this.file.path);if(n&&n instanceof obsidian_module.TFile)switch(await ScriptEngine.suggester(this.app,[\"Use the file already in the Vault instead of importing\",\"Overwrite existing file in the Vault\",\"Import the file with a new name\"],[\"Use\",\"Overwrite\",\"Import\"],\"A file with the same name/path already exists in the Vault\\n\"+n.path)){case\"Import\":break;case\"Overwrite\":await this.app.vault.modifyBinary(n,i);default:const e=getEA(this.view);return await insertImageToView(e,c,n),e.destroy(),!1}const r=await importFileToVault(this.app,t,i,this.view.file,this.view),s=getEA(this.view);await insertImageToView(s,c,r),s.destroy()})();else{if(\"excalidraw\"===t)return!0;(async()=>{const t=await importFileToVault(this.app,e.dataTransfer.files[a].name,await e.dataTransfer.files[a].arrayBuffer(),this.view.file,this.view);new UniversalInsertFileModal(this.plugin,this.view).open(t,c)})()}else if(\"embeddable\"!==s&&IMAGE_TYPES.contains(t)){const e=getEA(this.view);insertImageToView(e,c,r.url).then((()=>e.destroy()))}else{const e=getEA(this.view);insertEmbeddableToView(e,c,null,r.url).then((()=>e.destroy())),\"embeddable\"!==s&&new obsidian_module.Notice(\"Not imported to Vault. Embedded with local URI\")}}}return!1}if(e.dataTransfer.types.length>=1&&\"link\"===s){const t=getEA(this.view);for(let a=0;a<e.dataTransfer.files.length;a++){const i=e.dataTransfer.files[a];let n=i?.path;const r=i?.name;if(!n&&i&&DEVICE.isDesktop){const{webUtils:e}=require(\"electron\");e&&e.getPathForFile&&(n=e.getPathForFile(i))}if(!n||!r)return new obsidian_module.Notice(t$d(\"ERROR_CANT_READ_FILEPATH\"),6e3),t.destroy(),!0;const s=getInternalLinkOrFileURLLink(n,this.plugin,r,this.file),o=t.addText(this.currentPosition.x+40*a,this.currentPosition.y+20*a,s.isInternal?s.link:`\ud83d\udcc2 ${r}`);s.isInternal||(t.getElement(o).link=s.link)}return t.addElementsToView().then((()=>t.destroy())),!1}return!0}if(e.dataTransfer.types.includes(\"text/plain\")||e.dataTransfer.types.includes(\"text/uri-list\")||e.dataTransfer.types.includes(\"text/html\")){const t=e.dataTransfer.getData(\"text/html\").match(/src=[\"']([^\"']*)[\"']/),a=t?t[1]:\"\",i=e.dataTransfer.getData(\"text\"),n=e.dataTransfer.getData(\"text/uri-list\");let s=t?a:i;if(s&&\"\"!==s||(s=n),!s||\"\"===s)return!0;if(!o(\"text\",null,s)){if(s&&\"embeddable\"===r&&/^(blob:)?(http|https):\\/\\/[^\\s/$.?#].[^\\s]*$/.test(s))return!0;if(s&&\"image-url\"===r&&hyperlinkIsYouTubeLink(s))return this.view.addYouTubeThumbnail(s),!1;if(n&&\"image-url\"===r&&hyperlinkIsYouTubeLink(n))return this.view.addYouTubeThumbnail(n),!1;if(s&&\"image-url\"===r&&hyperlinkIsImage(s))return this.view.addImageWithURL(s),!1;if(n&&\"image-url\"===r&&hyperlinkIsImage(n))return this.view.addImageWithURL(n),!1;if(s&&\"image-import\"===r&&hyperlinkIsImage(s))return this.view.addImageSaveToVault(s),!1;if(n&&\"image-import\"===r&&hyperlinkIsImage(n))return this.view.addImageSaveToVault(n),!1;if(this.plugin.settings.iframelyAllowed&&s.match(/^https?:\\/\\/\\S*$/))return this.view.addTextWithIframely(s),!1;if(s.startsWith(\"obsidian://open?vault=\")){const t=e.dataTransfer.getData(\"text/html\");if(t){const e=t.match(/href=\"app:\\/\\/obsidian\\.md\\/(.*?)\"/);if(2===e.length){const t=decodeURIComponent(e[1]).split(\"#\"),a=this.app.vault.getAbstractFileByPath(t[0]);if(a&&a instanceof obsidian_module.TFile){const e=this.app.metadataCache.fileToLinktext(a,this.file.path);return void this.view.addText(`[[${e+(t.length>1?\"#\"+t[1]+\"|\"+e:\"\")}]]`)}return this.view.addText(`[[${decodeURIComponent(e[1])}]]`),!1}}const a=s.split(\"file=\");if(2===a.length)return this.view.addText(`[[${decodeURIComponent(a[1])}]]`),!1}this.view.addText(s.replace(/(!\\[\\[.*#[^\\]]*\\]\\])/g,\"$1{40}\"))}return!1}return!o(\"unknown\",null,null)}onDragOver(e){const t=this.dropAction(e.dataTransfer);if(t){this.draginfoDiv||(this.draginfoDiv=createDiv({cls:\"excalidraw-draginfo\"}),this.ownerDocument.body.appendChild(this.draginfoDiv));let a=\"\";this.app.dragManager.draggable?a=modifierKeyTooltipMessages().InternalDragAction[internalDragModifierType(e)]:1===e.dataTransfer.types.length&&e.dataTransfer.types.includes(\"Files\")?(a=modifierKeyTooltipMessages().LocalFileDragAction[localFileDragModifierType(e)],DEVICE.isMacOS&&isWinCTRLorMacCMD(e)&&(a=\"CMD is reserved by MacOS for file system drag actions.\\nCan't use it in Obsidian.\\nUse a combination of SHIFT, CTRL, OPT instead.\")):a=modifierKeyTooltipMessages().WebBrowserDragAction[webbrowserDragModifierType(e)],e.shiftKey||e.ctrlKey||e.altKey||e.metaKey||(a+=DEVICE.isMacOS||DEVICE.isIOS?\"\\nTry SHIFT, OPT, CTRL combinations for other drop actions\":\"\\nTry SHIFT, CTRL, ALT, Meta combinations for other drop actions\"),this.draginfoDiv.innerText!==a&&(this.draginfoDiv.innerText=a);const i=e.clientY-8*parseFloat(getComputedStyle(this.draginfoDiv).fontSize)+\"px\",n=e.clientX-this.draginfoDiv.clientWidth/2+\"px\";return this.draginfoDiv.style.top!==i&&(this.draginfoDiv.style.top=i),this.draginfoDiv.style.left!==n&&(this.draginfoDiv.style.left=n),e.dataTransfer.dropEffect=t,e.preventDefault(),!1}}onDragLeave(){this.draginfoDiv&&(this.ownerDocument.body.removeChild(this.draginfoDiv),delete this.draginfoDiv)}dropAction(e){const t=this.app.dragManager.draggable?.files;return t&&t[0]==this.file&&(t.shift(),this.app.dragManager.draggable.title=`${t.length} files`),[\"file\",\"files\"].includes(this.app.dragManager.draggable?.type)?\"link\":e.types?.includes(\"text/html\")||e.types?.includes(\"text/plain\")||e.types?.includes(\"Files\")?\"copy\":void 0}}const EMBEDDABLE_SEMAPHORE_TIMEOUT=2e3,PREVENT_RELOAD_TIMEOUT=2e3,RE_TAIL=/^## Drawing\\n.*```\\n%%$(.*)/ms;var TextMode;!function(e){e.parsed=\"parsed\",e.raw=\"raw\"}(TextMode||(TextMode={}));const HIDE=\"excalidraw-hidden\",SHOW=\"excalidraw-visible\",addFiles=async(e,t,a)=>{if(!e||0===e.length||!t)return;const i=t.excalidrawAPI;if(!i)return;if(e=e.filter((e=>e&&e.size&&e.size.height>0&&e.size.width>0)),0===e.length)return;const n=scaleLoadedImage(t.getScene(),e);void 0===a&&(a=n.scene.appState.theme),e.filter((e=>\"pdf\"===t.excalidrawData.getFile(e.id)?.file?.extension)).forEach((e=>{n.scene.elements.filter((t=>\"image\"===t.type&&t.fileId===e.id&&(t.crop&&t.crop?.naturalWidth!==e.size.width||!t.customData?.pdfPageViewProps))).forEach((t=>{if(t.crop){n.dirty=!0;const a=e.size.width/t.crop.naturalWidth;t.crop={x:t.crop.x*a,y:t.crop.y*a,width:t.crop.width*a,height:t.crop.height*a,naturalWidth:e.size.width,naturalHeight:e.size.height}}t.customData?.pdfPageViewProps||(n.dirty=!0,addAppendUpdateCustomData(t,{pdfPageViewProps:e.pdfPageViewProps}))}))})),n.dirty&&t.updateScene({elements:n.scene.elements,appState:n.scene.appState,captureUpdate:CaptureUpdateAction.NEVER});for(const i of e)if(t.excalidrawData.hasFile(i.id)&&t.excalidrawData.getFile(i.id).setImage({imgBase64:i.dataURL,mimeType:i.mimeType,size:i.size,isDark:a,isSVGwithBitmap:i.hasSVGwithBitmap,pdfPageViewProps:i.pdfPageViewProps}),t.excalidrawData.hasEquation(i.id)){const e=t.excalidrawData.getEquation(i.id).latex;t.excalidrawData.setEquation(i.id,{latex:e,isLoaded:!0})}i.addFiles(e)},warningUnknowSeriousError=()=>{new obsidian_module.Notice(t$d(\"WARNING_SERIOUS_ERROR\"),6e4)};let windowMigratedDisableZoomOnce=!1;class ExcalidrawView extends obsidian_module.TextFileView{dropManager;hoverPopover;freedrawLastActiveTimestamp=0;exportDialog;excalidrawData;excalidrawRoot;excalidrawAPI=null;excalidrawWrapperRef=null;toolsPanelRef=null;embeddableMenuRef=null;parentMoveObserver;linksAlwaysOpenInANewPane=!1;allowFrameButtonsInViewMode=!1;_hookServer;lastSaveTimestamp=0;lastLoadedFile=null;modifierKeyDown={shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1};currentPosition={x:0,y:0};canvasNodeFactory;embeddableRefs=new Map;embeddableLeafRefs=new Map;semaphores={warnAboutLinearElementLinkClick:!0,embeddableIsEditingSelf:!1,popoutUnload:!1,viewloaded:!1,viewunload:!1,scriptsReady:!1,justLoaded:!1,preventAutozoom:!1,autosaving:!1,dirty:null,preventReload:!1,isEditingText:!1,saving:!1,forceSaving:!1,hoverSleep:!1,wheelTimeout:null};_plugin;autosaveTimer=null;textMode=TextMode.raw;actionButtons={};compatibilityMode=!1;obsidianMenu;embeddableMenu;destroyers=[];isEditingTextResetTimer=null;preventReloadResetTimer=null;editingSelfResetTimer=null;colorChangeTimer=null;previousSceneVersion=0;previousBackgroundColor=\"\";previousTheme=\"\";selectedTextElement=null;selectedImageElement=null;selectedElementWithLink=null;blockOnMouseButtonDown=!1;doubleClickTimestamp=Date.now();hoverPoint={x:0,y:0};hoverPreviewTarget=null;viewModeEnabled=!1;lastMouseEvent=null;editingTextElementId=null;id=this.leaf.id;packages={react:null,reactDOM:null,excalidrawLib:null};constructor(e,t){super(e),this._plugin=t,this.excalidrawData=new ExcalidrawData(t,this),this.canvasNodeFactory=new CanvasNodeFactory(this),this.setHookServer(),this.dropManager=new DropManager(this)}get hookServer(){return this._hookServer}get plugin(){return this._plugin}get excalidrawContainer(){return this.excalidrawWrapperRef?.current?.firstElementChild}get ownerDocument(){return DEVICE.isMobile?document:this.containerEl.ownerDocument}get ownerWindow(){return this.ownerDocument.defaultView}get isInMainObsidianWorkspace(){return document===this.ownerDocument}setHookServer(e){this._hookServer=e||this._plugin.ea}getHookServer(){return this.hookServer??this.plugin.ea}preventAutozoom(){this.semaphores.preventAutozoom=!0,window.setTimeout((()=>{this.semaphores&&(this.semaphores.preventAutozoom=!1)}),1500)}saveExcalidraw(e){if(!e){if(!this.excalidrawAPI)return;e=this.getScene()}exportImageToFile(this,`${this.file.path.substring(0,this.file.path.lastIndexOf(\".md\"))}.excalidraw`,JSON.stringify(e,null,\"\\t\"),\".excalidraw\")}async exportExcalidraw(e){this.excalidrawAPI&&this.file&&(DEVICE.isMobile?new Prompt(this.app,t$d(\"EXPORT_FILENAME_PROMPT\"),this.file.basename,t$d(\"EXPORT_FILENAME_PROMPT_PLACEHOLDER\")).openAndGetValue((async e=>{if(!e)return;e=`${e}.excalidraw`;const t=splitFolderAndFilename(this.file.path).folderpath;await checkAndCreateFolder(t);const a=getNewUniqueFilepath(this.app.vault,e,t),i=await exportImageToFile(this,a,JSON.stringify(this.getScene(),null,\"\\t\"),\".excalidraw\");new obsidian_module.Notice(`Exported to ${i?.name}`,6e3)})):download(\"data:text/plain;charset=utf-8\",encodeURIComponent(JSON.stringify(this.getScene(e),null,\"\\t\")),`${this.file.basename}.excalidraw`))}getViewExportTheme(e){if(e)return e;this.exportDialog||(this.exportDialog=new ExportDialog(this.plugin,this,this.file));const t=this.exportDialog;return t?t.theme:getExportTheme(this.plugin,this.file,this.excalidrawAPI.getAppState().theme)}getViewExportEmbedScene(e){this.exportDialog||(this.exportDialog=new ExportDialog(this.plugin,this,this.file));const t=this.exportDialog;return void 0===e?!!t&&t.embedScene:e}getViewExportPadding(e){if(void 0!==e)return e;this.exportDialog||(this.exportDialog=new ExportDialog(this.plugin,this,this.file));const t=this.exportDialog;return t?t.padding:getExportPadding(this.plugin,this.file)}getViewExportScale(e){if(void 0!==e)return e;this.exportDialog||(this.exportDialog=new ExportDialog(this.plugin,this,this.file));const t=this.exportDialog;return t?t.scale:getPNGScale(this.plugin,this.file)}getViewExportWithBackground(e){if(void 0!==e)return e;this.exportDialog||(this.exportDialog=new ExportDialog(this.plugin,this,this.file));const t=this.exportDialog;return t?!t.transparent:getWithBackground(this.plugin,this.file)}async svg(e,t,a,i=!1){const n={withBackground:this.getViewExportWithBackground(),withTheme:!0,isMask:isMaskFile(this.plugin,this.file),skipInliningFonts:!i};return await getSVG({...e,appState:{...e.appState,theme:this.getViewExportTheme(t),exportEmbedScene:this.getViewExportEmbedScene(a)}},n,this.getViewExportPadding(),this.file)}async saveSVG(e){e||(e={});let{scene:t,embedScene:a,autoexportConfig:i}=e;if(!t){if(!this.excalidrawAPI)return!1;t=this.getScene()}const n=async(e,i)=>{const n=await this.svg(t,i,a,!0);if(!n)return;const r=n.outerHTML;await exportImageToFile(this,e,r,\"dark\"===i?\".dark.svg\":\"light\"===i?\".light.svg\":\".svg\")};(i?.theme?\"both\"===i.theme:this.plugin.settings.autoExportLightAndDark)?(await n(getIMGFilename(this.file.path,\"dark.svg\"),\"dark\"),await n(getIMGFilename(this.file.path,\"light.svg\"),\"light\")):await n(getIMGFilename(this.file.path,\"svg\"),i?.theme)}async exportSVG(e,t){if(!this.excalidrawAPI||!this.file)return;const a=await this.svg(this.getScene(t),void 0,e,!0);a&&exportSVG(a,this.file.basename)}async getSVG(e,t){if(!this.excalidrawAPI||!this.file)return;return await this.svg(this.getScene(t),void 0,e,!0)||void 0}async exportPDF(e,t=\"A4\",a=\"portrait\"){if(!this.excalidrawAPI||!this.file)return;const i=this.getScene(e),n=await this.svg(i,void 0,!1,!0);if(!n)return;const r=this.plugin.ea.getBoundingBox(i.elements),s=getMarginValue(this.exportDialog.margin),[o,l]=[r.width,r.height];exportToPDF({SVG:[n],scale:{zoom:this.exportDialog.scale,fitToPage:\"MATCH IMAGE\"===t||\"HD Screen\"===t?1:this.exportDialog.fitToPage},pageProps:{dimensions:getPageDimensions(t,a,{width:o,height:l}),backgroundColor:this.exportDialog.getPaperColor(),margin:s,alignment:this.exportDialog.alignment},filename:this.file.basename+\".pdf\"})}async png(e,t,a){const i={withBackground:this.getViewExportWithBackground(),withTheme:!0,isMask:isMaskFile(this.plugin,this.file)};return await getPNG({...e,appState:{...e.appState,theme:this.getViewExportTheme(t),exportEmbedScene:this.getViewExportEmbedScene(a)}},i,this.getViewExportPadding(),this.getViewExportScale())}async savePNG(e){e||(e={});let{scene:t,embedScene:a,autoexportConfig:i}=e;if(!t){if(!this.excalidrawAPI)return!1;t=this.getScene()}const n=async(e,i)=>{const n=await this.png(t,i,a);n&&await exportImageToFile(this,e,n,\"dark\"===i?\".dark.png\":\"light\"===i?\".light.png\":\".png\")};(i?.theme?\"both\"===i.theme:this.plugin.settings.autoExportLightAndDark)?(await n(getIMGFilename(this.file.path,\"dark.png\"),\"dark\"),await n(getIMGFilename(this.file.path,\"light.png\"),\"light\")):await n(getIMGFilename(this.file.path,\"png\"),i?.theme)}async exportPNGToClipboard(e,t){if(!this.excalidrawAPI||!this.file)return;const a=await this.png(this.getScene(t),void 0,e);a&&await exportPNGToClipboard(a)}async exportPNG(e,t){if(!this.excalidrawAPI||!this.file)return;const a=await this.png(this.getScene(t),void 0,e);a&&exportPNG(a,this.file.basename)}setPreventReload(){this.semaphores.preventReload=!0,this.preventReloadResetTimer=window.setTimeout((()=>this.semaphores.preventReload=!1),PREVENT_RELOAD_TIMEOUT)}clearPreventReloadTimer(){this.preventReloadResetTimer&&(window.clearTimeout(this.preventReloadResetTimer),this.preventReloadResetTimer=null)}async setEmbeddableNodeIsEditing(){this.clearEmbeddableNodeIsEditingTimer(),this.semaphores.embeddableIsEditingSelf=!0,await this.forceSave(!0)}clearEmbeddableNodeIsEditingTimer(){this.editingSelfResetTimer&&(window.clearTimeout(this.editingSelfResetTimer),this.editingSelfResetTimer=null)}clearEmbeddableNodeIsEditing(){this.clearEmbeddableNodeIsEditingTimer(),this.editingSelfResetTimer=window.setTimeout((()=>this.semaphores.embeddableIsEditingSelf=!1),EMBEDDABLE_SEMAPHORE_TIMEOUT)}async save(e=!0,t=!1,a=!1){if(!this.isLoaded)return;if(!a&&this.semaphores.embeddableIsEditingSelf)return;if(this.semaphores.saving)return;this.semaphores.saving=!0;let i=!1;if(!(this.excalidrawAPI&&this.isLoaded&&this.file&&this.app.vault.getAbstractFileByPath(this.file.path)))return void(this.semaphores.saving=!1);const n=this.isDirty()||t;try{if(n){const a=this.getScene();if(this.compatibilityMode?await this.excalidrawData.syncElements(a):await this.excalidrawData.syncElements(a,this.excalidrawAPI.getAppState().selectedElementIds)&&!this.semaphores.popoutUnload&&await this.loadDrawing(!1,this.excalidrawAPI.getSceneElementsIncludingDeleted().filter((e=>e.isDeleted))),this.clearDirty(),this.clearPreventReloadTimer(),this.semaphores.preventReload=e,await this.prepareGetViewData(),this.semaphores?.viewunload){await this.prepareGetViewData();const e=this.getViewData(),t=this.plugin,a=this.file;return window.setTimeout((async()=>{e&&await t.app.vault.modify(a,e)}),200),void(this.semaphores.saving=!1)}await super.save();const n=this.file.path,r=this.lastSavedData;a&&a.elements&&a.elements.length>0&&window.setTimeout((()=>imageCache.addBAKToCache(n,r)),50),i=this.lastSaveTimestamp===this.file.stat.mtime&&!e&&t,this.lastSaveTimestamp=this.file.stat.mtime,e&&this.setPreventReload()}if(!i&&!this.semaphores.autosaving&&(!this.semaphores.viewunload||this.semaphores.popoutUnload)){const e=this.excalidrawData.autoexportPreference;let t={svg:e===AutoexportPreference.inherit&&this.plugin.settings.autoexportSVG||e===AutoexportPreference.both||e===AutoexportPreference.svg,png:e===AutoexportPreference.inherit&&this.plugin.settings.autoexportPNG||e===AutoexportPreference.both||e===AutoexportPreference.png,excalidraw:!this.compatibilityMode&&this.plugin.settings.autoexportExcalidraw,theme:this.plugin.settings.autoExportLightAndDark?\"both\":this.getViewExportTheme()};if(this.getHookServer().onTriggerAutoexportHook)try{t=this.getHookServer().onTriggerAutoexportHook({excalidrawFile:this.file,autoexportConfig:t})??t}catch(e){errorlog({where:\"ExcalidrawView.save\",fn:this.getHookServer().onTriggerAutoexportHook,error:e})}t.svg&&this.saveSVG({autoexportConfig:t}),t.png&&this.savePNG({autoexportConfig:t}),t.excalidraw&&this.saveExcalidraw()}}catch(e){errorlog({where:\"ExcalidrawView.save\",fn:this.save,error:e}),warningUnknowSeriousError()}this.semaphores.saving=!1,i&&this.reload(!0,this.file),this.resetAutosaveTimer()}viewSaveData=\"\";async prepareGetViewData(){if(!this.excalidrawAPI||!this.excalidrawData.loaded)return void(this.viewSaveData=this.data);const e=this.getScene();if(e){if(!this.compatibilityMode){const e=this.exportDialog?.dirty&&this.exportDialog?.saveSettings?[[FRONTMATTER_KEYS[\"export-padding\"].name,this.exportDialog.padding.toString()],[FRONTMATTER_KEYS[\"export-pngscale\"].name,this.exportDialog.scale.toString()],[FRONTMATTER_KEYS[\"export-dark\"].name,\"dark\"===this.exportDialog.theme?\"true\":\"false\"],[FRONTMATTER_KEYS[\"export-transparent\"].name,this.exportDialog.transparent?\"true\":\"false\"],[FRONTMATTER_KEYS.plugin.name,this.textMode===TextMode.raw?\"raw\":\"parsed\"],[FRONTMATTER_KEYS[\"export-embed-scene\"].name,this.exportDialog.embedScene?\"true\":\"false\"]]:[[FRONTMATTER_KEYS.plugin.name,this.textMode===TextMode.raw?\"raw\":\"parsed\"]];this.exportDialog?.dirty&&(this.exportDialog.dirty=!1);const t=getExcalidrawMarkdownHeaderSection(this.data,e),a=this.plugin.settings.zoteroCompatibility?RE_TAIL.exec(this.data)?.[1]??\"\":\"\";this.excalidrawData.disableCompression||(this.excalidrawData.disableCompression=this.plugin.settings.decompressForMDView&&this.isEditedAsMarkdownInOtherView());const i=IS_WORKER_SUPPORTED?t+await this.excalidrawData.generateMDAsync(this.excalidrawAPI.getSceneElementsIncludingDeleted().filter((e=>e.isDeleted)))+a:t+this.excalidrawData.generateMDSync(this.excalidrawAPI.getSceneElementsIncludingDeleted().filter((e=>e.isDeleted)))+a;return this.excalidrawData.disableCompression=!1,void(this.viewSaveData=i)}this.compatibilityMode?this.viewSaveData=JSON.stringify(e,null,\"\\t\"):this.viewSaveData=this.data}else this.viewSaveData=this.data}getViewData(){return this.viewSaveData??this.data}hiddenMobileLeaves=[];restoreMobileLeaves(){this.hiddenMobileLeaves.length>0&&(this.hiddenMobileLeaves.forEach((e=>{e[0].containerEl.style.display=e[1]})),this.hiddenMobileLeaves=[])}async openLaTeXEditor(e){await this.excalidrawData.syncElements(this.getScene())&&await this.forceSave(!0);const t=this.getViewElements().find((t=>t.id===e&&\"image\"===t.type));if(!t)return;const a=t.fileId;let i=this.excalidrawData.getEquation(a)?.latex;(i||(await this.save(!1),i=this.excalidrawData.getEquation(a)?.latex,i))&&GenericInputPrompt.Prompt(this,this.plugin,this.app,t$d(\"ENTER_LATEX\"),void 0,i,void 0,3).then((async e=>{e&&e!==i&&(this.excalidrawData.setEquation(a,{latex:e,isLoaded:!1}),await this.save(!1),await updateEquation(e,a,this,addFiles),this.setDirty(1))}))}async openEmbeddedLinkEditor(e){const t=this.getViewElements().find((t=>t.id===e&&\"image\"===t.type));if(!t)return;const a=t.fileId,i=this.excalidrawData.getFile(a);if(i)if(i.isHyperLink||i.isLocalLink||!i.file);else{const e=async e=>{if(!e||i.linkParts.original===e)return;const n=Boolean(i.linkParts.original.endsWith(\"|100%\")),r=Boolean(e.endsWith(\"|100%\"));if(i.resetImage(this.file.path,e),this.excalidrawData.setFile(a,i),this.setDirty(2),n!==r&&await toggleImageAnchoring(t,this,r,i),await this.save(!1),await sleep(100),!this.plugin.isExcalidrawFile(i.file)&&!e.endsWith(\"|100%\")){const e=getEA(this);let a=this.getViewElements().find((e=>e.id===t.id));if(!a)return void e.destroy();a&&await e.resetImageAspectRatio(a)&&await e.addElementsToView(!1),e.destroy()}};GenericInputPrompt.Prompt(this,this.plugin,this.app,t$d(\"MARKDOWN_EMBED_CUSTOMIZE_LINK_PROMPT_TITLE\"),void 0,i.linkParts.original,[{caption:\"\u2705\",action:e=>{e.replaceAll(\"\\n\",\"\").trim()}}],3,!1,(e=>e.createEl(\"p\",{text:fragWithHTML(t$d(\"MARKDOWN_EMBED_CUSTOMIZE_LINK_PROMPT\"))})),!1).then(e.bind(this),(()=>{}))}}toggleDisableBinding(){const e=!this.excalidrawAPI.getAppState().invertBindingBehaviour;this.updateScene({appState:{invertBindingBehaviour:e},captureUpdate:CaptureUpdateAction.NEVER}),new obsidian_module.Notice(t$d(e?\"ARROW_BINDING_INVERSE_MODE\":\"ARROW_BINDING_NORMAL_MODE\"))}toggleFrameRendering(){const e=this.excalidrawAPI.getAppState().frameRendering;this.updateScene({appState:{frameRendering:{...e,enabled:!e.enabled}},captureUpdate:CaptureUpdateAction.NEVER}),new obsidian_module.Notice(e.enabled?t$d(\"FRAME_CLIPPING_ENABLED\"):t$d(\"FRAME_CLIPPING_DISABLED\"))}toggleFrameClipping(){const e=this.excalidrawAPI.getAppState().frameRendering;this.updateScene({appState:{frameRendering:{...e,clip:!e.clip}},captureUpdate:CaptureUpdateAction.NEVER}),new obsidian_module.Notice(e.clip?\"Frame Clipping: Enabled\":\"Frame Clipping: Disabled\")}gotoFullscreen(){this.plugin.leafChangeTimeout&&(window.clearTimeout(this.plugin.leafChangeTimeout),this.plugin.clearLeafChangeTimeout()),this.excalidrawWrapperRef&&(this.toolsPanelRef&&this.toolsPanelRef.current&&this.toolsPanelRef.current.setFullscreen(!0),(e=>{let t=e;for(;t&&!t.hasClass(\"workspace-split\");)e.addClass(SHOW),t=(e=t).parentElement;e&&(e.addClass(SHOW),e.querySelectorAll(`div.workspace-split:not(.${SHOW})`).forEach((t=>{t!==e&&t.addClass(SHOW)})),e.querySelector(`div.workspace-leaf-content.${SHOW} > .view-header`).addClass(SHOW),e.querySelectorAll(`div.workspace-tab-container.${SHOW} > div.workspace-leaf:not(.${SHOW})`).forEach((e=>e.addClass(SHOW))),e.querySelectorAll(`div.workspace-tabs.${SHOW} > div.workspace-tab-header-container`).forEach((e=>e.addClass(SHOW))),e.querySelectorAll(`div.workspace-split.${SHOW} > div.workspace-tabs:not(.${SHOW})`).forEach((e=>e.addClass(SHOW))));const a=this.ownerDocument;a.body.querySelectorAll(`div.workspace-split:not(.${SHOW})`).forEach((e=>{e!==t?e.addClass(HIDE):e.addClass(SHOW)})),a.body.querySelector(`div.workspace-leaf-content.${SHOW} > .view-header`).addClass(HIDE),a.body.querySelectorAll(`div.workspace-tab-container.${SHOW} > div.workspace-leaf:not(.${SHOW})`).forEach((e=>e.addClass(HIDE))),a.body.querySelectorAll(`div.workspace-tabs.${SHOW} > div.workspace-tab-header-container`).forEach((e=>e.addClass(HIDE))),a.body.querySelectorAll(`div.workspace-split.${SHOW} > div.workspace-tabs:not(.${SHOW})`).forEach((e=>e.addClass(HIDE))),a.body.querySelectorAll(\"div.workspace-ribbon\").forEach((e=>e.addClass(HIDE))),a.body.querySelectorAll(\"div.mobile-navbar\").forEach((e=>e.addClass(HIDE))),a.body.querySelectorAll(\"div.status-bar\").forEach((e=>e.addClass(HIDE))),a.body.querySelectorAll(\"div.titlebar\").forEach((e=>e.addClass(HIDE)))})(this.contentEl))}isFullscreen(){return Boolean(this.ownerDocument.body.querySelector(\".excalidraw-hidden\"))}exitFullscreen(){this.toolsPanelRef&&this.toolsPanelRef.current&&this.toolsPanelRef.current.setFullscreen(!1);const e=this.ownerDocument;e.querySelectorAll(\".excalidraw-hidden\").forEach((e=>e.removeClass(HIDE))),e.querySelectorAll(\".excalidraw-visible\").forEach((e=>e.removeClass(SHOW)))}removeLinkTooltip(){const e=this.ownerDocument.body.querySelector(\"body>div.excalidraw-tooltip,div.excalidraw-tooltip--visible\");e&&e.classList.remove(\"excalidraw-tooltip--visible\")}handleLinkHookCall(e,t,a){if(this.getHookServer().onLinkClickHook)try{if(!this.getHookServer().onLinkClickHook(e,t,a,this,this.getHookServer()))return!0}catch(e){errorlog({where:\"ExcalidrawView.onLinkOpen\",fn:this.getHookServer().onLinkClickHook,error:e})}return!1}getLinkTextForElement(e,t,a=!1){if(e?.id||t?.id){let i=e.id?this.excalidrawAPI.getSceneElements().find((t=>t.id===e.id)):null,n=t.id?this.excalidrawAPI.getSceneElements().find((e=>e.id===t.id)):null;if(!Boolean(i)&&\"text\"===n?.type){const e=getContainerElement(n,arrayToMap(this.excalidrawAPI.getSceneElements()));if(\"arrow\"===e?.type){const e=getTextElementAtPointer(this.currentPosition,this);e?.id===n.id&&(i=n,n=null)}}if(!a&&[\"arrow\",\"line\"].includes(n?.type))return{linkText:n.link,selectedElement:n,isLinearElement:!0};if(!i&&\"text\"===n?.type)if(a)i=n,n=null;else{const e=getContainerElement(n,arrayToMap(this.excalidrawAPI.getSceneElements()));if(\"arrow\"===e?.type)return{linkText:this.processLinkText(n.rawText,n,e,!1).linkText,selectedElement:e,isLinearElement:!0};i=n,n=null}let r=t?.text??(this.textMode===TextMode.parsed?this.excalidrawData.getRawText(e.id):e.text);return{...this.processLinkText(r,i,n),isLinearElement:!1}}return{linkText:null,selectedElement:null,isLinearElement:!1}}processLinkText(e,t,a,i=!0){if(!e)return{linkText:null,selectedElement:null};if(e.startsWith(\"#\"))return{linkText:e,selectedElement:t??a};const n=parseObsidianLink(e,this.app,i);\"string\"==typeof n&&(e=n);const r=REGEX_LINK.getResList(e);if(!e||0===r.length){if(t?.containerId){const n=_getContainerElement(t,{elements:this.excalidrawAPI.getSceneElements()});if(n){if(e=n.link,e?.startsWith(\"#\"))return{linkText:e,selectedElement:t??a};const r=parseObsidianLink(e,this.app,i);\"string\"==typeof r&&(e=r)}}e&&0!==r.length||(e=t?.link)}return{linkText:e,selectedElement:t??a}}async linkClick(e,t,a,i,n,r=!1){t||(t={id:null,text:null}),a||(a={id:null,fileId:null}),i||(i={id:null,text:null}),e||n||(n=emulateKeysForLinkClick(\"new-tab\")),e&&!n&&(n={shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey});const s=linkClickModifierType(n);let o=null,l=null,{linkText:c,selectedElement:d,isLinearElement:h}=this.getLinkTextForElement(t,i,r);if(d){if(!r&&c&&h)return void(this.semaphores.warnAboutLinearElementLinkClick&&(new obsidian_module.Notice(t$d(\"LINEAR_ELEMENT_LINK_CLICK_ERROR\"),2e4),this.semaphores.warnAboutLinearElementLinkClick=!1));if(!c)return;if(c=c.replaceAll(\"\\n\",\"\"),this.handleLinkHookCall(d,c,e))return;if(openExternalLink(c,this.app))return;const t=parseObsidianLink(c,this.app);if(\"boolean\"==typeof t&&t)return;\"string\"==typeof t&&(c=t);const a=await linkPrompt(c,this.app,this);if(!a)return;[o,c,l]=a}if(a?.id){const e=this.getScene().elements.find((e=>e.id===a.id));if(this.excalidrawData.hasEquation(a.fileId))return this.updateScene({appState:{contextMenu:null}}),void this.openLaTeXEditor(a.id);if(this.excalidrawData.hasMermaid(a.fileId)||getMermaidText(e))return void(shouldRenderMermaid&&this.excalidrawAPI.updateScene({appState:{openDialog:{name:\"ttd\",tab:\"mermaid\"}},captureUpdate:CaptureUpdateAction.NEVER}));if(await this.save(!1),this.excalidrawData.hasFile(a.fileId)){const t=a.fileId,i=this.excalidrawData.getFile(t);if(!i.isHyperLink&&!i.isLocalLink&&i.file&&\"md-properties\"===s)return this.updateScene({appState:{contextMenu:null}}),void this.openEmbeddedLinkEditor(a.id);let n=\" \";const r=this.app.metadataCache?.getBacklinksForFile(i.file)?.data,d=new Set;r&&this.plugin.settings.showSecondOrderLinks&&(n+=Object.keys(r).filter((e=>e!==this.file.path&&e!==i.file.path)).map((e=>{const t=splitFolderAndFilename(e);return d.has(e)?\"\":(d.add(e),`[[${e}|${t$d(\"LINKLIST_SECOND_ORDER_LINK\")}: ${t.basename}]]`)})).join(\" \")),this.plugin.settings.showSecondOrderLinks&&this.plugin.isExcalidrawFile(i.file)&&(n+=getExcalidrawFileForwardLinks(this.app,i.file,d));const h=(i.isHyperLink||i.isLocalLink?`[](${i.hyperlink}) `:`[[${i.linkParts.original}]] `)+(e.link?e.link.match(/$cmd:\\/\\/.*/)||e.link.match(REG_LINKINDEX_HYPERLINK)?`[](${e.link})`:e.link:\"\"),p=await linkPrompt(h+n,this.app,this);if(!p)return;[o,c,l]=p}}if(!c){if(r)return;return void new obsidian_module.Notice(t$d(\"LINK_BUTTON_CLICK_NO_TEXT\"),2e4)}const p=a.id??t.id??i.id,u=this.excalidrawAPI.getSceneElements().filter((e=>e.id===p))[0];if(!this.handleLinkHookCall(u,c,e))try{if(\"active-pane\"!==s&&this.isFullscreen()&&this.exitFullscreen(),!o)return void new NewFileActions({plugin:this.plugin,path:c,keys:n,view:this,sourceElement:u}).open();this.linksAlwaysOpenInANewPane&&!anyModifierKeysPressed(n)&&(n=emulateKeysForLinkClick(\"new-pane\"));try{const e=this.app.plugins.plugins[\"drawio-obsidian\"];if(e&&e._loaded&&\"svg\"===o.extension){const e=await this.app.vault.cachedRead(o);if(/(&lt;|\\<)(mxfile|mxgraph)/i.test(e))return void getLeaf(this.plugin,this.leaf,n).setViewState({type:\"diagram-edit\",state:{file:o.path}})}}catch(e){console.error(e)}await this.forceSaveIfRequired();const{promise:e}=openLeaf({plugin:this.plugin,fnGetLeaf:()=>getLeaf(this.plugin,this.leaf,n),file:o,openState:{active:!this.linksAlwaysOpenInANewPane,...l?{eState:{subpath:l}}:{}}});await e}catch(e){new obsidian_module.Notice(e,4e3)}}async handleLinkClick(e,t=!1){this.removeLinkTooltip();const a=this.getSelectedTextElement(),i=a?.id?null:this.getSelectedImageElement(),n=i?.id||a?.id?null:this.getSelectedElementWithLink();this.linkClick(e instanceof MouseEvent?e:null,a,i,n,e instanceof MouseEvent?null:e,t)}onResize(){if(super.onResize(),this.plugin.leafChangeTimeout)return;const e=this.excalidrawAPI;this.plugin.settings.zoomToFitOnResize&&this.excalidrawAPI&&!this.semaphores.isEditingText&&e&&(e.getAppState()?.editingTextElement||this.zoomToFit(!1))}excalidrawGetSceneVersion;getSceneVersion(e){return this.excalidrawGetSceneVersion||(this.excalidrawGetSceneVersion=this.packages.excalidrawLib.getSceneVersion),this.excalidrawGetSceneVersion(e.filter((e=>!e.isDeleted)))}async forceSave(e=!1){this.semaphores.autosaving||this.semaphores.saving?e||new obsidian_module.Notice(t$d(\"FORCE_SAVE_ABORTED\")):(this.preventReloadResetTimer&&(window.clearTimeout(this.preventReloadResetTimer),this.preventReloadResetTimer=null),this.semaphores.preventReload=!1,this.semaphores.forceSaving=!0,await this.save(!1,!0,!0),this.plugin.triggerEmbedUpdates(),this.loadSceneFiles(),this.semaphores.forceSaving=!1,e||new obsidian_module.Notice(\"Save successful\",1e3))}onload(){this.plugin.settings.overrideObsidianFontSize&&(document.documentElement.style.fontSize=\"\");const e=Boolean(void 0===this.containerEl.onWindowMigrated);this.packages=this.plugin.getPackage(this.ownerWindow),DEVICE.isDesktop&&!e&&(this.ownerWindow!==window&&this.plugin.initializeFonts(),this.destroyers.push(this.containerEl.onWindowMigrated((async()=>{const e=this.file,t=this.leaf;await closeLeafView(t),windowMigratedDisableZoomOnce=!0,t.setViewState({type:VIEW_TYPE_EXCALIDRAW,state:{file:e.path}})})))),this.semaphores.scriptsReady=!0,this.registerDomEvent(this.containerEl,\"wheel\",(e=>{this.semaphores.wheelTimeout&&window.clearTimeout(this.semaphores.wheelTimeout),this.semaphores.hoverSleep&&this.excalidrawAPI&&this.clearHoverPreview(),this.semaphores.wheelTimeout=window.setTimeout((()=>{window.clearTimeout(this.semaphores.wheelTimeout),this.semaphores.wheelTimeout=null}),1e3)}),{passive:!1}),this.actionButtons.scriptInstall=this.addAction(SCRIPTENGINE_ICON_NAME,t$d(\"INSTALL_SCRIPT_BUTTON\"),(()=>{new ScriptInstallPrompt(this.plugin).open()})),this.actionButtons.save=this.addAction(DISK_ICON_NAME,t$d(\"FORCE_SAVE\"),(async()=>this.forceSave())),this.actionButtons.isRaw=this.addAction(TEXT_DISPLAY_RAW_ICON_NAME,t$d(\"RAW\"),(()=>this.changeTextMode(TextMode.parsed))),this.actionButtons.link=this.addAction(\"link\",t$d(\"OPEN_LINK\"),(e=>this.handleLinkClick(e))),this.registerDomEvent(this.ownerWindow,\"resize\",this.onExcalidrawResize.bind(this)),this.app.workspace.onLayoutReady((async()=>{if(!this.plugin)return;await this.plugin.awaitInit();let e=0;for(;e++<50&&(!Boolean(this?.plugin?.activeLeafChangeEventHandler)||!Boolean(this.canvasNodeFactory));)if(await sleep(50),!this?.plugin)return;Boolean(this?.plugin?.activeLeafChangeEventHandler)&&(Boolean(this.plugin.activeLeafChangeEventHandler)&&this?.app?.workspace?.activeLeaf===this.leaf&&this.plugin.activeLeafChangeEventHandler(this.leaf),await this.canvasNodeFactory.initialize(),this.contentEl.addClass(\"excalidraw-view\"),await this.addSlidingPanesListner(),this.addParentMoveObserver(),this.registerDomEvent(this.ownerWindow,\"keydown\",(e=>{this.modifierKeyDown={shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey}}),!1),this.registerDomEvent(this.ownerWindow,\"keyup\",(e=>{this.modifierKeyDown={shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey}}),!1),this.registerDomEvent(this.ownerWindow,\"blur\",(()=>{if(!this.excalidrawAPI||!this.excalidrawData.loaded||!this.isDirty())return;const e=this.excalidrawAPI.getAppState();\"image\"!==e.activeTool.type&&\"active\"!==e.activeEmbeddable?.state&&this.forceSave(!0)}),!1),this.semaphores.viewloaded=!0)})),this.setupAutosaveTimer(),super.onload()}slidingPanesListner;async addSlidingPanesListner(){if(!this.plugin.settings.slidingPanesSupport)return;this.slidingPanesListner=()=>{this.excalidrawAPI&&this.refreshCanvasOffset()};let e=this.app.workspace.rootSplit;for(;!e;)await sleep(50),e=this.app.workspace.rootSplit;this.registerDomEvent(e.containerEl,\"scroll\",this.slidingPanesListner)}removeSlidingPanesListner(){this.slidingPanesListner&&(this.app.workspace.rootSplit.containerEl?.removeEventListener(\"scroll\",this.slidingPanesListner),this.slidingPanesListner=null)}offsetLeft=0;offsetTop=0;addParentMoveObserver(){const e=getParentOfClass(this.containerEl,\"popover\")??getParentOfClass(this.containerEl,\"workspace-leaf\");if(!e)return;const t=e.classList.contains(\"popover\");this.offsetLeft=e.offsetLeft,this.offsetTop=e.offsetTop;const a=async e=>{const t=e[0].target;if(!(t instanceof HTMLElement))return;const{offsetLeft:a,offsetTop:i}=t;a===this.offsetLeft&&i===this.offsetTop||(this.excalidrawAPI&&this.refreshCanvasOffset(),this.offsetLeft=a,this.offsetTop=i)};this.parentMoveObserver=DEBUGGING?new CustomMutationObserver(a,\"parentMoveObserver\"):new MutationObserver(a),this.parentMoveObserver.observe(e,{attributeOldValue:!0,attributeFilter:t?[\"data-x\",\"data-y\"]:[\"class\",\"style\"]})}removeParentMoveObserver(){this.parentMoveObserver&&(this.parentMoveObserver.disconnect(),this.parentMoveObserver=null)}setTheme(e){const t=this.excalidrawAPI;if(!t)return;if(this.file&&hasExportTheme(this.plugin,this.file))return;const a=t.getAppState();this.excalidrawData.scene.theme=e,this.updateScene({appState:{...a,theme:e},captureUpdate:CaptureUpdateAction.NEVER})}prevTextMode;blockTextModeChange=!1;async changeTextMode(e,t=!0){if(this.compatibilityMode)return;if(this.blockTextModeChange)return;this.blockTextModeChange=!0,this.textMode=e,e===TextMode.parsed?this.actionButtons.isRaw.hide():this.actionButtons.isRaw.show(),this.toolsPanelRef&&this.toolsPanelRef.current&&this.toolsPanelRef.current.setPreviewMode(e===TextMode.parsed);const a=this.excalidrawAPI;a&&t&&(await this.save(),this.preventAutozoom(),await this.excalidrawData.loadData(this.data,this.file,this.textMode),this.excalidrawData.scene.appState.theme=a.getAppState().theme,await this.loadDrawing(!1),a.history.clear()),this.prevTextMode=this.textMode,this.blockTextModeChange=!1}autosaveFunction;get autosaveInterval(){return DEVICE.isMobile?this.plugin.settings.autosaveIntervalMobile:this.plugin.settings.autosaveIntervalDesktop}setupAutosaveTimer(){const e=async()=>{if(!this.isLoaded)return void(this.autosaveTimer=window.setTimeout(e,this.autosaveInterval));const t=this.excalidrawAPI;if(!t)return void warningUnknowSeriousError();const a=t.getAppState(),i=\"freedraw\"===a.activeTool?.type&&this.freedrawLastActiveTimestamp>Date.now()-2e3,n=null!==a.editingTextElement,r=null!==a.newElement;this.refreshCanvasOffset(),!this.isDirty()||!this.plugin.settings.autosave||this.semaphores.forceSaving||this.semaphores.autosaving||this.semaphores.embeddableIsEditingSelf||i||n||r?this.autosaveTimer=window.setTimeout(e,this.plugin.activeExcalidrawView===this&&this.semaphores.dirty&&this.plugin.settings.autosave?1e3:this.autosaveInterval):(this.autosaveTimer=null,this.excalidrawAPI&&(this.semaphores.autosaving=!0,this.save().then((()=>this.semaphores.autosaving=!1))),this.autosaveTimer=window.setTimeout(e,this.autosaveInterval))};this.autosaveFunction=e,this.resetAutosaveTimer()}resetAutosaveTimer(){this.autosaveFunction&&(this.autosaveTimer&&(window.clearTimeout(this.autosaveTimer),this.autosaveTimer=null),this.autosaveTimer=window.setTimeout(this.autosaveFunction,this.autosaveInterval))}unload(){super.unload()}async onUnloadFile(e){let t=0;for(;this.semaphores.saving&&t++<200;)await sleep(50),15===t++&&new obsidian_module.Notice(t$d(\"SAVE_IS_TAKING_LONG\")),80===t&&new obsidian_module.Notice(t$d(\"SAVE_IS_TAKING_VERY_LONG\"));t>=200?new obsidian_module.Notice(\"Unknown error, save is taking too long\"):await this.forceSaveIfRequired()}async forceSaveIfRequired(){let e=0,t=!1;for(;this.semaphores.saving&&e++<200;)t=!0,await sleep(40);if(this.excalidrawAPI&&(this.checkSceneVersion(this.excalidrawAPI.getSceneElements()),this.isDirty())){const e=this.file?.path,a=this.plugin;window.setTimeout((()=>{a.triggerEmbedUpdates(e)}),400),t=!0,await this.save(!0,!0,!0)}return t}async onClose(){if(!this.dropManager)return;if(!this.file)return;this.exitFullscreen(),await this.forceSaveIfRequired(),this.excalidrawRoot&&(this.excalidrawRoot.unmount(),this.excalidrawRoot=null),this.clearPreventReloadTimer(),this.clearEmbeddableNodeIsEditingTimer(),this.plugin.scriptEngine?.removeViewEAs(this),this.excalidrawAPI=null,this.dropManager.destroy(),this.dropManager=null,this.canvasNodeFactory&&this.canvasNodeFactory.destroy(),this.canvasNodeFactory=null,this.embeddableLeafRefs.clear(),this.embeddableRefs.clear(),Object.values(this.actionButtons).forEach((e=>e.remove())),this.actionButtons={},this.excalidrawData&&(this.excalidrawData.destroy(),this.excalidrawData=null),this.exportDialog&&(this.exportDialog.destroy(),this.exportDialog=null),this.hoverPreviewTarget=null,this.plugin.ea?.targetView===this&&(this.plugin.ea.targetView=null),this._hookServer?.targetView===this&&(this._hookServer.targetView=null),this._hookServer=null,this.containerEl.onWindowMigrated=null,this.packages={react:null,reactDOM:null,excalidrawLib:null};let e=0;this.app.workspace.iterateAllLeaves((t=>{t!==this.leaf&&t.containerEl?.ownerDocument.defaultView===this.ownerWindow&&e++})),0===e&&this.plugin.deletePackage(this.ownerWindow),this.lastMouseEvent=null,this.requestSave=null,this.leaf.tabHeaderInnerTitleEl.style.color=\"\",await super.onClose(),tmpBruteForceCleanup(this)}onunload(){if(super.onunload(),this.destroyers.forEach((e=>e())),this.restoreMobileLeaves(),this.semaphores.viewunload=!0,this.semaphores.popoutUnload=this.ownerDocument!==document&&0===this.ownerDocument.body.querySelectorAll(\".workspace-tab-header\").length,this.getHookServer().onViewUnloadHook)try{this.getHookServer().onViewUnloadHook(this)}catch(e){errorlog({where:\"ExcalidrawView.onunload\",fn:this.getHookServer().onViewUnloadHook,error:e})}const e=this.containerEl?.ownerDocument?.body.querySelector(\"body>div.excalidraw-tooltip,div.excalidraw-tooltip--visible\");e&&this.containerEl?.ownerDocument?.body.removeChild(e),this.removeParentMoveObserver(),this.removeSlidingPanesListner(),this.autosaveTimer&&(window.clearInterval(this.autosaveTimer),this.autosaveTimer=null),this.autosaveFunction=null}async reload(e=!1,t){const a=t&&t===this.file;if(this.semaphores.embeddableIsEditingSelf)return this.editingSelfResetTimer&&(this.clearEmbeddableNodeIsEditingTimer(),this.semaphores.embeddableIsEditingSelf=!1),void(a&&(this.data=await this.app.vault.read(this.file)));if(this.semaphores.preventReload)return void(this.semaphores.preventReload=!1);if(this.semaphores.saving)return;if(this.lastLoadedFile=null,this.actionButtons.save.querySelector(\"svg\").removeClass(\"excalidraw-dirty\"),this.compatibilityMode)return void this.clearDirty();const i=this.excalidrawAPI;this.file&&i&&(a&&(this.data=await this.app.vault.read(t),this.preventAutozoom()),e?await this.excalidrawData.loadData(this.data,this.file,this.textMode):await this.excalidrawData.setTextMode(this.textMode),this.excalidrawData.scene.appState.theme=i.getAppState().theme,await this.loadDrawing(a,void 0,!0),this.clearDirty())}async zoomToElementId(e,t){let a=0;for(;!this.excalidrawAPI&&a++<100;)await sleep(50);const i=this.excalidrawAPI;if(!i)return;const n=i.getSceneElements();let r=n.filter((t=>t.id===e));if(0===r.length){const t=getFrameBasedOnFrameNameOrId(e,n);if(!t)return;r=[t]}if(t){const e=this.plugin.ea.getElementsInTheSameGroupWithElement(r[0],n);e.length>0&&(r=e)}this.preventAutozoom(),this.zoomToElements(!i.getAppState().viewModeEnabled,r)}setEphemeralState(e){if(!e)return;if(\"all\"===e.rename)return void this.app.fileManager.promptForFileRename(this.file);let t=null;e.match&&e.match.content&&e.match.matches&&e.match.matches.length>=1&&2===e.match.matches[0].length&&(t=[e.match.content.substring(e.match.matches[0][0],e.match.matches[0][1])]);const a=async()=>{let e=0;for(;(this.semaphores.justLoaded||!this.isLoaded||!this.excalidrawAPI||this.excalidrawAPI?.getAppState()?.isLoading)&&e++<100;)await sleep(50)},i=getEmbeddedFilenameParts(e.subpath&&e.subpath.startsWith(\"#^group\")&&!e.subpath.startsWith(\"#^group=\")?\"#^group=\"+e.subpath.substring(7):e.subpath&&e.subpath.startsWith(\"#^area\")&&!e.subpath.startsWith(\"#^area=\")?\"#^area=\"+e.subpath.substring(6):e.subpath);i.hasBlockref&&window.setTimeout((async()=>{if(await a(),i.blockref&&!i.hasGroupref&&!this.getScene()?.elements.find((e=>e.id===i.blockref))){const t=cleanSectionHeading(i.blockref).replaceAll(\" \",\"\");if((await this.getBackOfTheNoteBlocks()).includes(t))return void this.setMarkdownView(e)}window.setTimeout((()=>this.zoomToElementId(i.blockref,i.hasGroupref)))})),i.hasSectionref?t=[`# ${i.sectionref}`]:e.line&&e.line>0&&(t=[this.data.split(\"\\n\")[e.line]]),t&&t.length>0&&(1!==t.length||0!==t[0].length)&&window.setTimeout((async()=>{await a();const n=this.excalidrawAPI;if(!n)return;if(n.getAppState().isLoading)return;const r=n.getSceneElements();if(1===t.length){const e=t[0].match(/ \\^([^ ]+)$/)?.[1]??t[0].match(/^([^ :]+): \\[\\[[^\\]]+]]$/)?.[1];if(e&&r.find((t=>t.id===e)))return this.preventAutozoom(),void window.setTimeout((()=>this.zoomToElements(!n.getAppState().viewModeEnabled,[r.find((t=>t.id===e))])))}if(1===t.length&&t[0].startsWith(\"[\")){let e=REGEX_LINK.getResList(t[0])[0];if(e){const t=REGEX_LINK.getLink(e);if(t){const e=this.plugin.app.metadataCache.getFirstLinkpathDest(t,this.file.path);if(e){let t=[];if(this.excalidrawData.files.forEach(((a,i)=>{a.file?.path===e.path&&t.push(i)})),t.length>0){const e=r.filter((e=>\"image\"===e.type&&t.includes(e.fileId)));if(e.length>0)return this.preventAutozoom(),void window.setTimeout((()=>this.zoomToElements(!n.getAppState().viewModeEnabled,e)))}}}}}if(!this.selectElementsMatchingQuery(r,t,!n.getAppState().viewModeEnabled,i.hasSectionref,i.hasGroupref)){const a=cleanSectionHeading(t[0]);if((await this.getBackOfTheNoteSections()).includes(a)||this.data.includes(t[0]))return void this.setMarkdownView(e)}}))}clear(){this.semaphores.warnAboutLinearElementLinkClick=!0,this.viewSaveData=\"\",this.canvasNodeFactory.purgeNodes(),this.embeddableRefs.clear(),this.embeddableLeafRefs.clear(),delete this.exportDialog;const e=this.excalidrawAPI;e&&(this.activeLoader&&(this.activeLoader.terminate=!0,this.activeLoader=null),this.nextLoader=null,e.resetScene(),this.previousSceneVersion=0)}isLoaded=!1;async setViewData(e,t=!1){if(await this.plugin.awaitInit(),this.lastLoadedFile!==this.file&&(this.isLoaded=!1,this.file)){if(this.plugin.settings.compareManifestToPluginVersion&&checkVersionMismatch(this.plugin),this.plugin.settings.showNewVersionNotification&&checkExcalidrawVersion(),isMaskFile(this.plugin,this.file)){const e=new obsidian_module.Notice(t$d(\"MASK_FILE_NOTICE\"),5e3);let t;this.registerDomEvent(e.noticeEl,\"pointerdown\",(e=>{t=window.setTimeout((()=>{window.open(\"https://youtu.be/uHFd0XoHRxE\")}),1e3)})),this.registerDomEvent(e.noticeEl,\"pointerup\",(e=>{window.clearTimeout(t)}))}t&&this.clear(),this.lastSaveTimestamp=this.file.stat.mtime,this.lastLoadedFile=this.file,e=this.data=e.replaceAll(\"\\r\\n\",\"\\n\").replaceAll(\"\\r\",\"\\n\"),this.app.workspace.onLayoutReady((async()=>{if(!this?.app)return;await this.plugin.awaitInit();let t=0;for(;(!this.semaphores.viewloaded||!this.file||!this.plugin.fourthFontLoaded)&&t++<50;)await sleep(50);if(!this.file)return;if(this.compatibilityMode=\"excalidraw\"===this.file.extension,await this.plugin.loadSettings(),this.compatibilityMode)this.plugin.enableLegacyFilePopoverObserver(),this.actionButtons.isRaw.hide(),this.actionButtons.isParsed.hide(),this.actionButtons.link.hide(),this.textMode=TextMode.raw,await this.excalidrawData.loadLegacyData(e,this.file),this.plugin.settings.compatibilityMode||new obsidian_module.Notice(t$d(\"COMPATIBILITY_MODE\"),4e3),this.excalidrawData.disableCompression=!0;else{this.actionButtons.link.show(),this.excalidrawData.disableCompression=!1;const t=getTextMode(e);this.changeTextMode(t,!1);try{if(!await this.excalidrawData.loadData(e,this.file,this.textMode))return}catch(e){if(errorlog({where:\"ExcalidrawView.setViewData\",error:e}),e.message===ERROR_IFRAME_CONVERSION_CANCELED)return void this.setMarkdownView();const t=this.file,a=this.plugin,i=this.leaf;return(async()=>{let n=!0,r=0;const s=Date.now();for(;!imageCache.isReady()&&n;){const e=`You've been now waiting for <b>${Math.round((Date.now()-s)/1e3)}</b> seconds. `;imageCache.initializationNotice=!0;const t=new MultiOptionConfirmationPrompt(a,`${r>0?r%4==0?e+\"The CACHE is still loading.<br><br>\":r%4==1?e+\"Watch the top right corner for the notification.<br><br>\":r%4==2?e+\"I really, really hope the backup will work for you! <br><br>\":e+\"I am sorry, it is taking a while, there is not much I can do... <br><br>\":\"\"}${t$d(\"CACHE_NOT_READY\")}`);n=await t.waitForClose,r++}const o=await imageCache.getBAKFromCache(t.path);o?new MultiOptionConfirmationPrompt(a,t$d(\"BACKUP_AVAILABLE\")).waitForClose.then((async e=>{e&&(await this.app.vault.modify(t,o),a.excalidrawFileModes[i.id||t.path]=VIEW_TYPE_EXCALIDRAW,setExcalidrawView(i))})):new obsidian_module.Notice(`Error loading drawing:\\n${e.message}${\"Cannot read property 'index' of undefined\"===e.message?\"\\n'# Drawing' section is likely missing\":\"\"}\\n\\nTry manually fixing the file or restoring an earlier version from sync history.`,1e4)})(),void this.setMarkdownView()}}if(imageCache.isReady()&&this.excalidrawData.scene&&this.excalidrawData.scene.elements&&0===this.excalidrawData.scene.elements.length){const t=await imageCache.getBAKFromCache(this.file.path);t&&t.length>e.length&&setTimeout((async()=>{const e=new MultiOptionConfirmationPrompt(this.plugin,t$d(\"BACKUP_SAVE_AS_FILE\"),new Map([[t$d(\"BACKUP_CANCEL\"),0],[t$d(\"BACKUP_DELETE\"),2],[t$d(\"BACKUP_SAVE\"),1]]),t$d(\"BACKUP_SAVE\")),a=await e.waitForClose;if(1===a){const e=getNewUniqueFilepath(this.app.vault,`${this.file.basename}.restored.${this.file.extension}`,this.file.parent.path),a=await createFileAndAwaitMetacacheUpdate(this.app,e,t);await imageCache.removeBAKFromCache(this.file.path),this.plugin.openDrawing(a,\"new-tab\")}else 2===a&&await imageCache.removeBAKFromCache(this.file.path)}))}if(await this.loadDrawing(!0),onLoadMessages(this.plugin,this.excalidrawData.scene,this.data),this.plugin.ea.onFileOpenHook){const e=getEA(this);try{await this.plugin.ea.onFileOpenHook({ea:e,excalidrawFile:this.file,view:this})}catch(e){errorlog({where:\"ExcalidrawView.setViewData.onFileOpenHook\",error:e})}finally{e.destroy()}}const a=this.excalidrawData.getOnLoadScript();if(a){const e=this.file.basename+\"-onlaod-script\",t=()=>{this.excalidrawAPI?this.plugin.scriptEngine.executeScript(this,a,e,this.file):window.setTimeout(t.bind(this),200)};t()}this.isLoaded=!0}))}}getGridColor(e,t){const a=this.plugin.ea.getCM(e),i=a.isDark();let n,r;const s=this.plugin.settings.gridSettings.OPACITY/100;if(this.plugin.settings.gridSettings.DYNAMIC_COLOR)n=(i?a.lighterBy(10):a.darkerBy(10)).alphaTo(s).stringRGB({alpha:!0}),r=(i?a.lighterBy(5):a.darkerBy(5)).alphaTo(s).stringRGB({alpha:!0});else{const e=this.plugin.ea.getCM(this.plugin.settings.gridSettings.COLOR),t=e.isDark();n=e.alphaTo(s).stringRGB({alpha:!0}),r=(t?e.lighterBy(10):e.darkerBy(10)).alphaTo(s).stringRGB({alpha:!0})}return{Bold:r,Regular:n}}activeLoader=null;nextLoader=null;async loadSceneFiles(e=!1,t,a){if(!this.excalidrawAPI)return;const i=new EmbeddedFilesLoader(this.plugin),n=i=>{this.nextLoader=null,this.activeLoader=i,i.loadSceneFiles({excalidrawData:this.excalidrawData,addFiles:(e,t,i=!0)=>{a&&i&&a(),this.file&&this.excalidrawAPI&&(e&&e.length>0&&addFiles(e,this,t),i&&(this.activeLoader=null,this.nextLoader?n(this.nextLoader):this.excalidrawData.getFiles().some((e=>{if(e&&!e.file&&e.attemptCounter<30){const e=this.file.path;return window.setTimeout((async()=>{this&&this.excalidrawAPI&&e===this.file.path&&this.loadSceneFiles()}),2e3),!0}return!1}))))},depth:0,isThemeChange:e,fileIDWhiteList:t})};this.activeLoader?this.nextLoader=i:n(i)}async synchronizeWithData(e){if(this.semaphores.embeddableIsEditingSelf)return;let t=0;for(;this.semaphores.saving&&t++<30;)await sleep(100);if(t>=30)return void errorlog({where:\"ExcalidrawView.synchronizeWithData\",message:`Aborting sync with received file (${this.file.path}) because semaphores.saving remained true for ower 3 seconds`,fn:this.synchronizeWithData});this.semaphores.saving=!0;let a=new Set;try{const t=e.deletedElements.map((e=>e.id)),i=this.excalidrawAPI.getSceneElementsIncludingDeleted().filter((e=>!t.contains(e.id))),n=i.map((e=>e.id)),r=t=>{switch(t.type){case\"text\":this.excalidrawData.textElements.set(t.id,e.textElements.get(t.id));break;case\"image\":e.getFile(t.fileId)?(this.excalidrawData.setFile(t.fileId,e.getFile(t.fileId)),a.add(t.fileId)):e.getEquation(t.fileId)&&(this.excalidrawData.setEquation(t.fileId,e.getEquation(t.fileId)),a.add(t.fileId))}e.elementLinks.has(t.id)&&this.excalidrawData.elementLinks.set(t.id,e.elementLinks.get(t.id))};e.scene.elements.forEach(((t,s,o)=>{const l=i.filter((e=>e.id===t.id))[0];if(l&&(l.version<t.version||l.version===t.version&&JSON.stringify(l)!==JSON.stringify(t))){r(t);const e=n.indexOf(t.id);if(i.splice(e,1),0===s)i.splice(0,0,t),0!==e&&(n.splice(e,1),n.splice(0,0,t.id));else{const a=o[s-1].id,r=n.indexOf(a);i.splice(r+1,0,t),r!==e-1&&(n.splice(e,1),n.splice(r+1,0,t.id))}}else if(l){if(l&&\"image\"===t.type){const i=e.getFile(t.fileId),n=this.excalidrawData.getFile(t.fileId);Boolean(i)&&(l.fileId!==t.fileId||i.file&&n.file!==i.file||i.hyperlink&&n.hyperlink!==i.hyperlink||i.linkParts?.original&&n.linkParts?.original!==i.linkParts?.original)&&(this.excalidrawData.setFile(t.fileId,e.getFile(t.fileId)),a.add(t.fileId))}}else if(r(t),0===s)i.splice(0,0,t),n.splice(0,0,t.id);else{const e=o[s-1].id,a=n.indexOf(e);i.splice(a+1,0,t),n.splice(a+1,0,t.id)}})),this.previousSceneVersion=this.getSceneVersion(i),this.getSceneVersion(e.scene.elements)!==this.previousSceneVersion&&this.setDirty(3),this.updateScene({elements:i,captureUpdate:CaptureUpdateAction.IMMEDIATELY}),a.size>0&&this.loadSceneFiles(!1,a)}catch(e){errorlog({where:\"ExcalidrawView.synchronizeWithData\",message:`Error during sync with received file (${this.file.path})`,fn:this.synchronizeWithData,error:e})}this.semaphores.saving=!1}async loadDrawing(e,t,a=!1){const i=this.excalidrawData.scene,n=getExcalidraAndMarkdowViewsForFile(this.app,this.file).length>1;this.semaphores.justLoaded=e,this.clearDirty();const r=this.excalidrawData.getOpenMode();this.semaphores.preventReload=!1;const s=this.plugin.isPenMode(),o=this.excalidrawAPI;if(o){const l=this.isLoaded?o.getAppState().viewModeEnabled:i.elements.length>0&&r.viewModeEnabled,c=this.isLoaded?o.getAppState().zenModeEnabled:r.zenModeEnabled;this.updateScene({elements:i.elements.concat(t??[]),files:i.files,captureUpdate:CaptureUpdateAction.NEVER},e),this.updateScene({appState:{...a&&n?deleteAppStateKeys(i.appState,[\"scrollX\",\"scrollY\",\"zoom\"]):i.appState,...this.excalidrawData.selectedElementIds?this.excalidrawData.selectedElementIds:{},...i.appState.frameRendering&&void 0===i.appState.frameRendering.markerName?{frameRendering:{...i.appState.frameRendering,markerName:!0,markerEnabled:!0}}:{},zenModeEnabled:c,viewModeEnabled:l,linkOpacity:this.excalidrawData.getLinkOpacity(),trayModeEnabled:calculateTrayModeValue(this.plugin.settings),penMode:s,penDetected:s,allowPinchZoom:this.plugin.settings.allowPinchZoom,allowWheelZoom:this.plugin.settings.allowWheelZoom,pinnedScripts:this.plugin.settings.pinnedScripts,customPens:this.plugin.settings.customPens.slice(0,this.plugin.settings.numberOfCustomPens),gridDirection:this.plugin.settings.gridSettings.GRID_DIRECTION??{horizontal:!0,vertical:!0}},captureUpdate:CaptureUpdateAction.NEVER}),this.app.workspace.getActiveViewOfType(ExcalidrawView)===this.leaf.view&&this.excalidrawWrapperRef&&this.excalidrawWrapperRef.current?.firstElementChild?.focus(),this.onAfterLoadScene(e)}else this.instantiateExcalidraw({elements:i.elements,appState:{...a&&n?deleteAppStateKeys(i.appState,[\"scrollX\",\"scrollY\",\"zoom\"]):i.appState,...i.appState.frameRendering&&void 0===i.appState.frameRendering.markerName?{frameRendering:{...i.appState.frameRendering,markerName:!0,markerEnabled:!0}}:{},zenModeEnabled:r.zenModeEnabled,viewModeEnabled:i.elements.length>0&&r.viewModeEnabled,linkOpacity:this.excalidrawData.getLinkOpacity(),trayModeEnabled:calculateTrayModeValue(this.plugin.settings),penMode:s,penDetected:s,allowPinchZoom:this.plugin.settings.allowPinchZoom,allowWheelZoom:this.plugin.settings.allowWheelZoom,pinnedScripts:this.plugin.settings.pinnedScripts,customPens:this.plugin.settings.customPens.slice(0,this.plugin.settings.numberOfCustomPens),gridDirection:this.plugin.settings.gridSettings.GRID_DIRECTION},files:i.files,libraryItems:await this.getLibrary()});const l=null!==this.data.match(/```compressed\\-json\\n/gm);this.compatibilityMode||this.plugin.settings.compress===l||this.isEditedAsMarkdownInOtherView()||this.setDirty(4)}isEditedAsMarkdownInOtherView(){return this.app.workspace.getLeavesOfType(\"markdown\").filter((e=>e.view.file===this.file)).length>0}onAfterLoadScene(e){this.loadSceneFiles(),this.updateContainerSize(null,!0,e),this.initializeToolsIconPanelAfterLoading()}setDirty(e){this.semaphores.saving||(this.isDirty()||this.resetAutosaveTimer(),this.semaphores.dirty=this.file?.path,this.actionButtons.save.querySelector(\"svg\").addClass(\"excalidraw-dirty\"),!this.semaphores.viewunload&&this.toolsPanelRef?.current&&this.toolsPanelRef.current.setDirty(!0),DEVICE.isMobile||obsidian_module.requireApiVersion(\"0.16.0\")&&(this.leaf.tabHeaderInnerIconEl.style.color=\"var(--color-accent)\",this.leaf.tabHeaderInnerTitleEl.style.color=\"var(--color-accent)\"))}isDirty(){return Boolean(this.semaphores?.dirty)&&this.semaphores.dirty===this.file?.path}clearDirty(){if(this.semaphores.viewunload)return;const e=this.excalidrawAPI;if(!e)return;this.semaphores.dirty=null,this.toolsPanelRef?.current&&this.toolsPanelRef.current.setDirty(!1);const t=e.getSceneElements();t&&(this.previousSceneVersion=this.getSceneVersion(t)),this.actionButtons.save.querySelector(\"svg\").removeClass(\"excalidraw-dirty\"),DEVICE.isMobile||obsidian_module.requireApiVersion(\"0.16.0\")&&(this.leaf.tabHeaderInnerIconEl.style.color=\"\",this.leaf.tabHeaderInnerTitleEl.style.color=\"\")}async initializeToolsIconPanelAfterLoading(){if(this.semaphores.viewunload)return;const e=this.excalidrawAPI;if(!e)return;const t=e.getAppState();let a=0;for(;!this.plugin.scriptEngine&&a++<50;)sleep(50);const i=this.toolsPanelRef?.current;i&&this.plugin.scriptEngine&&(i.setTheme(t.theme),i.setExcalidrawViewMode(t.viewModeEnabled),i.setPreviewMode(this.compatibilityMode?null:this.textMode===TextMode.parsed),i.updateScriptIconMap(this.plugin.scriptEngine.scriptIconMap))}canAcceptExtension(e){return\"excalidraw\"===e}getDisplayText(){return this.file?this.file.basename:t$d(\"NOFILE\")}getViewType(){return VIEW_TYPE_EXCALIDRAW}getIcon(){return ICON_NAME}async setMarkdownView(e){await this.forceSaveIfRequired(),await sleep(200),this.plugin.excalidrawFileModes[this.id||this.file.path]=\"markdown\",this.plugin.setMarkdownView(this.leaf,e)}async openAsMarkdown(e){this.plugin.settings.compress&&this.plugin.settings.decompressForMDView?(this.excalidrawData.disableCompression=!0,await this.save(!0,!0,!0)):this.isDirty()&&await this.save(!0,!0,!0),this.setMarkdownView(e)}async convertExcalidrawToMD(){await this.save();const e=await this.plugin.convertSingleExcalidrawToMD(this.file);await sleep(250),this.plugin.openDrawing(e,\"active-pane\",!0)}convertTextElementToMarkdown(e,t){e&&new Prompt(this.app,\"Filename\",\"\",\"Leave blank to cancel this action\").openAndGetValue((async a=>{if(!a)return;a=`${a}.md`;const i=splitFolderAndFilename(this.file.path).folderpath;await checkAndCreateFolder(i);const n=getNewUniqueFilepath(this.app.vault,a,i),r=[];t&&t.link&&r.push(t.link),r.push(e.rawText);const s=await createOrOverwriteFile(this.app,n,r.join(\"\\n\"));if(s){const a=getEA(this),i=t?[e,t]:[e];a.copyViewElementsToEAforEditing(i),a.getElements().forEach((e=>e.isDeleted=!0));const[n,r,o,l]=t?[t.x,t.y,t.width,t.height]:[e.x,e.y,MAX_IMAGE_SIZE,MAX_IMAGE_SIZE],c=a.addEmbeddable(n,r,o,l,void 0,s);t&&[\"backgroundColor\",\"fillStyle\",\"roughness\",\"roundness\",\"strokeColor\",\"strokeStyle\",\"strokeWidth\"].forEach((e=>{const i=a.getElement(c);e in i&&(i[e]=t[e])})),a.getElement(c),await a.addElementsToView(),a.destroy()}}))}async addYouTubeThumbnail(e){const t=await getYouTubeThumbnailLink(e),a=getEA(this),i=await a.addImage(0,0,t);a.getElement(i).link=e,await a.addElementsToView(!0,!0,!0),a.destroy()}async addImageWithURL(e){const t=getEA(this);await t.addImage(0,0,e),await t.addElementsToView(!0,!0,!0),t.destroy()}async addImageSaveToVault(e){const t=getEA(this),a=getMimeType(getURLImageExtension(e)),i=await getDataURLFromURL(e,a,3e3),n=await generateIdFromFile((new TextEncoder).encode(i).buffer),r=await this.excalidrawData.saveDataURLtoVault(i,a,n);if(!r)return new obsidian_module.Notice(t$d(\"ERROR_SAVING_IMAGE\")),void t.destroy();await t.addImage(0,0,r),await t.addElementsToView(!0,!0,!0),t.destroy()}async addTextWithIframely(e){const t=await this.addText(e),a=`http://iframely.server.crestify.com/iframely?url=${e}`;try{const i=JSON.parse(await obsidian_module.request({url:a}));if(!i||i.error||!i.meta?.title)return;const n=getEA(this),r=n.getViewElements().filter((e=>\"text\"===e.type&&e.id===t));if(1===r.length){n.copyViewElementsToEAforEditing(r);const t=n.getElement(r[0].id);t.text=t.originalText=t.rawText=`[${i.meta.title}](${e})`,await n.addElementsToView(!1,!1,!1),n.destroy()}}catch(e){}}onPaneMenu(e,t){this.excalidrawAPI&&this.getViewSelectedElements().some((e=>\"text\"===e.type))&&e.addItem((e=>{e.setTitle(t$d(\"OPEN_LINK\")).setIcon(\"external-link\").setSection(\"pane\").onClick((e=>{this.handleLinkClick(e)}))})),this.compatibilityMode?e.addItem((e=>{e.setTitle(t$d(\"CONVERT_FILE\")).onClick((()=>this.convertExcalidrawToMD())).setSection(\"pane\")})):e.addItem((e=>{e.setTitle(t$d(\"OPEN_AS_MD\")).setIcon(\"document\").onClick((()=>{this.openAsMarkdown()})).setSection(\"pane\")})),e.addItem((e=>{e.setTitle(t$d(\"EXPORT_IMAGE\")).setIcon(EXPORT_IMG_ICON_NAME).setSection(\"pane\").onClick((async e=>{this.excalidrawAPI&&this.file&&(this.exportDialog||(this.exportDialog=new ExportDialog(this.plugin,this,this.file)),this.exportDialog.open())})).setSection(\"pane\")})).addItem((e=>{e.setTitle(t$d(\"INSTALL_SCRIPT_BUTTON\")).setIcon(SCRIPTENGINE_ICON_NAME).setSection(\"pane\").onClick((()=>{new ScriptInstallPrompt(this.plugin).open()}))})),super.onPaneMenu(e,t)}async getLibrary(){const e=this.plugin.getStencilLibrary();return e?.library?e.library:e?.libraryItems??[]}setCurrentPositionToCenter(){const e=this.excalidrawAPI;if(!e)return;const t=e.getAppState(),{width:a,height:i,offsetLeft:n,offsetTop:r}=t;this.currentPosition=viewportCoordsToSceneCoords({clientX:a/2+n,clientY:i/2+r},t)}getSelectedTextElement(){const e=this.excalidrawAPI;if(!e)return{id:null,text:null};if(e.getAppState().viewModeEnabled&&this.selectedTextElement){const e=this.selectedTextElement;return this.selectedTextElement=null,e}const t=e.getSceneElements().filter((t=>t.id===Object.keys(e.getAppState().selectedElementIds)[0]));if(0===t.length)return{id:null,text:null};if(\"text\"===t[0].type)return{id:t[0].id,text:t[0].text};if([\"image\",\"arrow\"].contains(t[0].type))return{id:null,text:null};const a=t[0].boundElements?.filter((e=>\"text\"===e.type));if(a?.length>0){const t=e.getSceneElements().filter((e=>e.id===a[0].id));if(t.length>0)return{id:t[0].id,text:t[0].text}}if(0===t[0].groupIds.length)return{id:null,text:null};const i=t[0].groupIds[0];return 0===e.getSceneElements().filter((e=>e.groupIds?.includes(i))).filter((e=>\"text\"===e.type)).length?{id:null,text:null}:{id:t[0].id,text:t[0].text}}getSelectedImageElement(){const e=this.excalidrawAPI;if(!e)return{id:null,fileId:null};if(e.getAppState().viewModeEnabled&&this.selectedImageElement){const e=this.selectedImageElement;return this.selectedImageElement=null,e}const t=e.getSceneElements().filter((t=>t.id==Object.keys(e.getAppState().selectedElementIds)[0]));if(0===t.length)return{id:null,fileId:null};if(\"image\"==t[0].type)return{id:t[0].id,fileId:t[0].fileId};if(\"text\"===t[0].type)return{id:null,fileId:null};if(0===t[0].groupIds.length)return{id:null,fileId:null};const a=t[0].groupIds[0],i=e.getSceneElements().filter((e=>e.groupIds?.includes(a))).filter((e=>\"image\"==e.type));return 0===i.length?{id:null,fileId:null}:{id:i[0].id,fileId:i[0].fileId}}getSelectedElementWithLink(){const e=this.excalidrawAPI;if(!e)return{id:null,text:null};if(e.getAppState().viewModeEnabled&&this.selectedElementWithLink){const e=this.selectedElementWithLink;return this.selectedElementWithLink=null,e}const t=e.getSceneElements().filter((t=>t.id==Object.keys(e.getAppState().selectedElementIds)[0]));if(0===t.length)return{id:null,text:null};if(t[0].link)return{id:t[0].id,text:t[0].link};const a=getBoundTextElementId(t[0]);if(a){const t=e.getSceneElements().filter((e=>e.id===a&&e.link));if(t.length>0)return{id:t[0].id,text:t[0].text}}if(0===t[0].groupIds.length)return{id:null,text:null};const i=t[0].groupIds[0],n=e.getSceneElements().filter((e=>e.groupIds?.includes(i))).filter((e=>e.link));return 0===n.length?{id:null,text:null}:{id:n[0].id,text:n[0].link}}async addLink(e,t,a,i){const n=this.excalidrawAPI,r=n.getAppState();if(!r.selectedElementIds||r.selectedElementIds&&1!==Object.keys(r.selectedElementIds).length)return void this.addText(e);const s=Object.keys(n.getAppState().selectedElementIds)[0],o=n.getSceneElements().find((e=>e.id===s));if(!o||!Boolean(i)&&o&&null!==o.link)return o&&new obsidian_module.Notice(\"Selected element already has a link. Inserting link as text.\"),void this.addText(e);const l=getEA(this);l.copyViewElementsToEAforEditing([o]),i?.match(/\\[\\[(.*?)\\]\\]/)?.[1]&&(e=i.replace(/(\\[\\[.*?\\]\\])/,e)),l.getElement(s).link=e,await l.addElementsToView(!1,!0),l.destroy(),Boolean(i)&&this.updateScene({appState:{showHyperlinkPopup:{newValue:\"info\",oldValue:\"editor\"}}})}async addText(e,t,a=!0){const i=this.excalidrawAPI;if(!i)return;const n=i.getAppState(),r=getEA(this);r.style.strokeColor=n.currentItemStrokeColor??\"black\",r.style.opacity=n.currentItemOpacity??1,r.style.fontFamily=t??n.currentItemFontFamily??1,r.style.fontSize=n.currentItemFontSize??20,r.style.textAlign=n.currentItemTextAlign??\"left\";const{width:s,height:o}=n,l=viewportCoordsToSceneCoords({clientX:0,clientY:0},n),c=viewportCoordsToSceneCoords({clientX:s,clientY:o},n),d=l.x>this.currentPosition.x||c.x<this.currentPosition.x||l.y>this.currentPosition.y||c.y<this.currentPosition.y,h=r.addText(this.currentPosition.x,this.currentPosition.y,e);return await this.addElements({newElements:r.getElements(),repositionToCursor:d,save:a,newElementsOnTop:!0}),r.destroy(),h}async addElements({newElements:e,repositionToCursor:t=!1,save:a=!1,images:i,newElementsOnTop:n=!1,shouldRestoreElements:r=!1}){const s=this.excalidrawAPI;if(!s)return!1;const o=arrayToMap(s.getSceneElements()),l=e.filter((e=>\"text\"==e.type));for(let e=0;e<l.length;e++){const t=l[e],{parseResult:a,link:i}=await this.excalidrawData.addTextElement(t.id,t.text,t.rawText);if(i&&(t.link=i),this.textMode===TextMode.parsed&&!t?.isDeleted){const{text:e,x:i,y:n,width:r,height:s}=refreshTextDimensions(t,null,o,a);t.text=e,t.originalText=a,t.x=i,t.y=n,t.width=r,t.height=s}}t&&(e=repositionElementsToCursor(e,this.currentPosition,!0));const c=e.map((e=>e.id)),d=s.getSceneElements(),h=[];for(let t=0;t<d.length;t++){const a=d[t].id;c.includes(a)&&(d[t]=e.filter((e=>e.id===a))[0],h.push(a))}const p=n?d.concat(e.filter((e=>!h.includes(e.id)))):e.filter((e=>!h.includes(e.id))).concat(d),u=[];return i&&Object.keys(i).length>0&&Object.keys(i).forEach((e=>{if(u.push({mimeType:i[e].mimeType,id:i[e].id,dataURL:i[e].dataURL,created:i[e].created}),i[e].file||i[e].isHyperLink){const t=new EmbeddedFile(this.plugin,this.file.path,i[e].isHyperLink?i[e].hyperlink:\"string\"==typeof i[e].file?i[e].file:i[e].file.path),a=s.getAppState();t.setImage({imgBase64:i[e].dataURL,mimeType:i[e].mimeType,size:i[e].size,isDark:\"dark\"===a.theme,isSVGwithBitmap:i[e].hasSVGwithBitmap,pdfPageViewProps:i[e].pdfPageViewProps}),this.excalidrawData.setFile(i[e].id,t),i[e].pdfPageViewProps&&p.filter((t=>\"image\"===t.type&&t.fileId===i[e].id)).forEach((t=>{addAppendUpdateCustomData(t,{pdfPageViewProps:i[e].pdfPageViewProps})}))}i[e].latex&&this.excalidrawData.setEquation(i[e].id,{latex:i[e].latex,isLoaded:!0})})),this.updateScene({elements:p,captureUpdate:CaptureUpdateAction.IMMEDIATELY},r),u.length>0&&s.addFiles(u),s.updateContainerSize(s.getSceneElements().filter((e=>c.includes(e.id))).filter(isContainer)),a?await this.save(!1):this.setDirty(5),!0}getScene(e){const t=this.excalidrawAPI;if(!t)return null;const a=e?this.getViewSelectedElements():t.getSceneElements(),i=t.getAppState(),n={...t.getFiles()};if(n){const e=a.filter((e=>\"image\"===e.type)).map((e=>e.fileId)),t=Object.keys(n).filter((t=>!e.contains(t)));t.forEach((e=>delete n[e]))}const r={...i.activeTool};return[\"freedraw\",\"hand\"].includes(r.type)||(r.type=\"selection\"),r.customType=null,r.lastActiveTool=null,{type:\"excalidraw\",version:2,source:GITHUB_RELEASES+PLUGIN_VERSION,elements:a,appState:{theme:i.theme,viewBackgroundColor:i.viewBackgroundColor,currentItemStrokeColor:i.currentItemStrokeColor,currentItemBackgroundColor:i.currentItemBackgroundColor,currentItemFillStyle:i.currentItemFillStyle,currentItemStrokeWidth:i.currentItemStrokeWidth,currentItemStrokeStyle:i.currentItemStrokeStyle,currentItemRoughness:i.currentItemRoughness,currentItemOpacity:i.currentItemOpacity,currentItemFontFamily:i.currentItemFontFamily,currentItemFontSize:i.currentItemFontSize,currentItemTextAlign:i.currentItemTextAlign,currentItemStartArrowhead:i.currentItemStartArrowhead,currentItemEndArrowhead:i.currentItemEndArrowhead,currentItemArrowType:i.currentItemArrowType,currentItemFrameRole:i.currentItemFrameRole,scrollX:i.scrollX,scrollY:i.scrollY,zoom:i.zoom,currentItemRoundness:i.currentItemRoundness,gridSize:i.gridSize,gridStep:i.gridStep,gridModeEnabled:i.gridModeEnabled,gridColor:i.gridColor,colorPalette:i.colorPalette,currentStrokeOptions:i.currentStrokeOptions,frameRendering:i.frameRendering,objectsSnapModeEnabled:i.objectsSnapModeEnabled,activeTool:r},prevTextMode:this.prevTextMode,files:n}}refreshCanvasOffset(){if(0===this.contentEl.clientWidth||0===this.contentEl.clientHeight)return;const e=this.excalidrawAPI;e&&e.refresh()}refresh(){this.refreshCanvasOffset()}clearHoverPreview(){const e=this.hoverPopover?.containerEl;if(this.hoverPopover&&!e?.parentElement?.hasClass(\"hover-editor\")){if(this.hoverPreviewTarget=null,this.hoverPopover.embed?.editor)return;this.hoverPopover?.hide()}else if(this.hoverPreviewTarget){const e=new MouseEvent(\"click\",{view:this.ownerWindow,bubbles:!0,cancelable:!0});this.hoverPreviewTarget.dispatchEvent(e),this.hoverPreviewTarget=null}}identifyElementClicked(){if(this.selectedTextElement=getTextElementAtPointer(this.currentPosition,this),this.selectedTextElement&&this.selectedTextElement.id){const e=new MouseEvent(\"click\",{ctrlKey:!(DEVICE.isIOS||DEVICE.isMacOS)||this.modifierKeyDown.ctrlKey,metaKey:DEVICE.isIOS||DEVICE.isMacOS||this.modifierKeyDown.metaKey,shiftKey:this.modifierKeyDown.shiftKey,altKey:this.modifierKeyDown.altKey});return this.handleLinkClick(e),void(this.selectedTextElement=null)}if(this.selectedImageElement=getImageElementAtPointer(this.currentPosition,this),this.selectedImageElement&&this.selectedImageElement.id){const e=new MouseEvent(\"click\",{ctrlKey:!(DEVICE.isIOS||DEVICE.isMacOS)||this.modifierKeyDown.ctrlKey,metaKey:DEVICE.isIOS||DEVICE.isMacOS||this.modifierKeyDown.metaKey,shiftKey:this.modifierKeyDown.shiftKey,altKey:this.modifierKeyDown.altKey});return this.handleLinkClick(e),void(this.selectedImageElement=null)}if(this.selectedElementWithLink=getElementWithLinkAtPointer(this.currentPosition,this),this.selectedElementWithLink&&this.selectedElementWithLink.id){const e=new MouseEvent(\"click\",{ctrlKey:!(DEVICE.isIOS||DEVICE.isMacOS)||this.modifierKeyDown.ctrlKey,metaKey:DEVICE.isIOS||DEVICE.isMacOS||this.modifierKeyDown.metaKey,shiftKey:this.modifierKeyDown.shiftKey,altKey:this.modifierKeyDown.altKey});return this.handleLinkClick(e),void(this.selectedElementWithLink=null)}}showHoverPreview(e,t){if(!this.lastMouseEvent)return;const a=this.excalidrawAPI?.getAppState();if(a?.editingTextElement||a?.newElement)return;if(this.semaphores.wheelTimeout)return;if(!e){if(!this.currentPosition)return;e=\"\";const a=getTextElementAtPointer(this.currentPosition,this);if(a&&a.text){const{linkText:i,selectedElement:n}=this.getLinkTextForElement(a,a);if(t=n,!(e=getLinkTextFromLink(i)))return}else{const a=getImageElementAtPointer(this.currentPosition,this),i=a?.id||a?.id?null:getElementWithLinkAtPointer(this.currentPosition,this);if(t=this.excalidrawAPI.getSceneElements().find((e=>e.id===a.id)),!(a&&a.fileId||i?.id))return;if(a?.id){if(!this.excalidrawData.hasFile(a.fileId))return;const i=this.excalidrawData.getFile(a.fileId);if(!i.file)return;if(i.isHyperLink||i.isLocalLink||IMAGE_TYPES.contains(i.file.extension)||\"pdf\"===i.file.extension.toLowerCase()||this.plugin.ea.isExcalidrawFile(i.file)){if(!(e=getLinkTextFromLink(t.link)))return}else{const t=i.linkParts.ref?`#${i.linkParts.isBlockRef?\"^\":\"\"}${i.linkParts.ref}`:\"\";e=i.file.path+t}}if(i?.id){if(!(e=getLinkTextFromLink(i.text)))return;if(this.app.metadataCache.getFirstLinkpathDest(e.split(\"#\")[0],this.file.path)===this.file)return}}}if(this.getHookServer().onLinkHoverHook)try{if(!this.getHookServer().onLinkHoverHook(t,e,this,this.getHookServer()))return}catch(e){errorlog({where:\"ExcalidrawView.showHoverPreview\",fn:this.getHookServer().onLinkHoverHook,error:e})}if(this.semaphores.hoverSleep)return;const i=this.app.metadataCache.getFirstLinkpathDest(e.split(\"#\")[0],this.file.path);i&&(this.ownerDocument.querySelector(`div.popover-title[data-path=\"${i.path}\"]`)||(this.semaphores.hoverSleep=!0,window.setTimeout((()=>this.semaphores.hoverSleep=!1),500),this.plugin.hover.linkText=e,this.plugin.hover.sourcePath=this.file.path,this.hoverPreviewTarget=this.contentEl,this.app.workspace.trigger(\"hover-link\",{event:this.lastMouseEvent,source:VIEW_TYPE_EXCALIDRAW,hoverParent:this,linktext:this.plugin.hover.linkText,sourcePath:this.plugin.hover.sourcePath}),this.hoverPoint=this.currentPosition,this.isFullscreen()&&window.setTimeout((()=>{const e=this.ownerDocument.querySelector(`div.popover-title[data-path=\"${i.path}\"]`)?.parentElement?.parentElement?.parentElement??this.ownerDocument.body.querySelector(\"div.popover\");e&&this.contentEl.append(e)}),400)))}isLinkSelected(){return Boolean(this.getSelectedTextElement().id||this.getSelectedImageElement().id||this.getSelectedElementWithLink().id)}excalidrawDIVonKeyDown(e){this.semaphores?.viewunload||e.target!==this.excalidrawWrapperRef.current&&(this.isFullscreen()&&e.keyCode===KEYCODE.ESC&&this.exitFullscreen(),!isWinCTRLorMacCMD(e)||isSHIFT(e)||isWinALTorMacOPT(e)||this.showHoverPreview())}onPointerDown(e){(isWinCTRLorMacCMD(e)||isWinMETAorMacCTRL(e))&&(this.plugin.settings.allowCtrlClick||isWinMETAorMacCTRL(e))&&(Boolean(this.excalidrawAPI?.getAppState().contextMenu)||window.setTimeout((()=>{this.isLinkSelected()&&this.handleLinkClick(e)})))}onMouseMove(e){this.lastMouseEvent=e.nativeEvent}onMouseOver(){this.clearHoverPreview()}onPointerUpdate(e){if(this.currentPosition=e.pointer,this.hoverPreviewTarget&&(Math.abs(this.hoverPoint.x-e.pointer.x)>50||Math.abs(this.hoverPoint.y-e.pointer.y)>50)&&this.clearHoverPreview(),this.viewModeEnabled)if(this.blockOnMouseButtonDown||\"down\"!==e.button)\"up\"===e.button&&(this.blockOnMouseButtonDown=!1),(isWinCTRLorMacCMD(this.modifierKeyDown)||this.excalidrawAPI.getAppState().isViewModeEnabled&&this.plugin.settings.hoverPreviewWithoutCTRL)&&this.showHoverPreview();else{if(this.blockOnMouseButtonDown=!0,isWinCTRLorMacCMD(this.modifierKeyDown)||isWinMETAorMacCTRL(this.modifierKeyDown))return void this.identifyElementClicked();if(this.plugin.settings.doubleClickLinkOpenViewMode){const e=Date.now();e-this.doubleClickTimestamp<600&&e-this.doubleClickTimestamp>40&&this.identifyElementClicked(),this.doubleClickTimestamp=e}}}updateGridColor(e,t){e||(t=this.excalidrawAPI.getAppState(),e=e??\"transparent\"===t.viewBackgroundColor?\"white\":t.viewBackgroundColor),window.setTimeout((()=>this.updateScene({appState:{gridColor:this.getGridColor(e,t)},captureUpdate:CaptureUpdateAction.NEVER})))}updateGridDirection(e){window.setTimeout((()=>this.updateScene({appState:{gridDirection:{horizontal:e.horizontal,vertical:e.vertical}},captureUpdate:CaptureUpdateAction.NEVER})))}canvasColorChangeHook(e){const t=\"transparent\"===e.viewBackgroundColor?\"white\":e.viewBackgroundColor;if(this.updateGridColor(t,e),setDynamicStyle(this.plugin.ea,this,t,this.plugin.settings.dynamicStyling),this.plugin.ea.onCanvasColorChangeHook)try{this.plugin.ea.onCanvasColorChangeHook(this.plugin.ea,this,e.viewBackgroundColor)}catch(e){errorlog({where:this.canvasColorChangeHook,source:this.plugin.ea.onCanvasColorChangeHook,error:e,message:\"ea.onCanvasColorChangeHook exception\"})}}checkSceneVersion(e){const t=this.getSceneVersion(e);(t>0||0===t&&e.length>0)&&t!==this.previousSceneVersion&&(this.previousSceneVersion=t,this.setDirty(6.1))}shouldSaveImportedImage=!1;onChange(e,t){if(t.activeTool?.type){if(\"image\"===t.activeTool.type&&t.selectedElementIds&&1===Object.keys(t.selectedElementIds).length){const a=e.filter((e=>e.id===Object.keys(t.selectedElementIds)[0]))[0];a&&\"image\"===a.type&&(this.shouldSaveImportedImage=!0)}\"selection\"===t.activeTool.type&&this.shouldSaveImportedImage&&(this.shouldSaveImportedImage=!1,setTimeout((()=>this.save(!0,!0)),100))}if(\"freedraw\"===t.newElement?.type&&(this.freedrawLastActiveTimestamp=Date.now()),(t.newElement||t.editingTextElement||t.selectedLinearElement&&t.selectedLinearElement.isEditing)&&(this.plugin.wasPenModeActivePreviously=t.penMode),this.viewModeEnabled=t.viewModeEnabled,this.semaphores.justLoaded){if((this.excalidrawData?.scene?.elements?.length??0)>0&&0===e.length)return;return this.semaphores.justLoaded=!1,!this.semaphores.preventAutozoom&&this.plugin.settings.zoomToFitOnOpen&&1===getExcalidraAndMarkdowViewsForFile(this.app,this.file).length&&this.zoomToFit(!1,!0),this.previousSceneVersion=this.getSceneVersion(e),this.previousBackgroundColor=t.viewBackgroundColor,this.previousTheme=t.theme,void this.canvasColorChangeHook(t)}t.theme!==this.previousTheme&&this.file===this.excalidrawData.file&&(this.previousTheme=t.theme,this.setDirty(5.1)),t.viewBackgroundColor!==this.previousBackgroundColor&&this.file===this.excalidrawData.file&&(this.previousBackgroundColor=t.viewBackgroundColor,this.setDirty(6),this.colorChangeTimer&&window.clearTimeout(this.colorChangeTimer),this.colorChangeTimer=window.setTimeout((()=>{this.canvasColorChangeHook(t),this.colorChangeTimer=null}),50)),this.semaphores.dirty||null!==t.editingTextElement||null!==t.selectedLinearElement&&t.selectedLinearElement.isEditing||this.checkSceneVersion(e)}onLibraryChange(e){(async()=>{const t={type:\"excalidrawlib\",version:2,source:GITHUB_RELEASES+PLUGIN_VERSION,libraryItems:e};this.plugin.setStencilLibrary(t),await this.plugin.saveSettings()})()}onPaste(e,t){const a=this.excalidrawAPI,i=this.getHookServer();if(e?.elements&&e.elements.filter((e=>\"text\"===e.type&&!e.hasOwnProperty(\"rawText\"))).forEach((e=>e.rawText=e.originalText)),e&&i.onPasteHook)try{const a=i.onPasteHook({ea:i,payload:e,event:t,excalidrawFile:this.file,view:this,pointerPosition:this.currentPosition});if(\"boolean\"==typeof a&&!1===a)return!1}catch(e){errorlog({where:\"ExcalidrawView.onPaste\",fn:i.onPasteHook,error:e})}if(!this.modifierKeyDown.ctrlKey&&null!=t&&DEVICE.isLinux)return!1;if(e&&e.text&&hyperlinkIsImage(e.text))return this.addImageWithURL(e.text),!1;const n=getFilePathFromObsidianURL(e?.text);if(n)return this.addImageWithURL(n),!1;if(e&&e.text&&!this.modifierKeyDown.shiftKey){if(Boolean(e.text.replaceAll(\"\\r\\n\",\"\\n\").replaceAll(\"\\r\",\"\\n\").match(/^`{3}[^\\n]*\\n.+\\n`{3}\\s*$/ms))){const t=e.text;return window.setTimeout((()=>this.pasteCodeBlock(t))),!1}if(isTextImageTransclusion(e.text,this,(async(e,t)=>{const a=getEA(this);if(IMAGE_TYPES.contains(t.extension))a.selectElementsInView([await insertImageToView(a,this.currentPosition,t)]),a.destroy();else if(\"pdf\"!==t.extension)a.selectElementsInView([await insertEmbeddableToView(a,this.currentPosition,t,e)]),a.destroy();else if(e.match(/^[^#]*#page=\\d*(&\\w*=[^&]+){0,}&rect=\\d*,\\d*,\\d*,\\d*/g)){const t=getEA(this),a=await t.addImage(this.currentPosition.x,this.currentPosition.y,e.split(\"&rect=\")[0]),i=t.getElement(a),n=t.imagesDict[i.fileId];i.crop=getPDFCropRect({scale:this.plugin.settings.pdfScale,link:e,naturalHeight:n.size.height,naturalWidth:n.size.width,pdfPageViewProps:n.pdfPageViewProps}),addAppendUpdateCustomData(i,{pdfPageViewProps:n.pdfPageViewProps}),i.crop&&(i.width=i.crop.width/this.plugin.settings.pdfScale,i.height=i.crop.height/this.plugin.settings.pdfScale),i.link=`[[${e}]]`,t.addElementsToView(!1,!1).then((()=>t.destroy()))}else new UniversalInsertFileModal(this.plugin,this).open(t,this.currentPosition);this.setDirty(9)})))return!1;const t=obsidianPDFQuoteWithRef(e.text);if(t){const e=getEA(this),i=a.getAppState(),n=i.currentItemStrokeColor,r=i.viewBackgroundColor;e.style.strokeColor=\"transparent\"===n?e.getCM(\"transparent\"===r?\"white\":r).invert().stringHEX({alpha:!1}):n,e.style.fontFamily=i.currentItemFontFamily,e.style.fontSize=i.currentItemFontSize;const s=e.measureText(t.quote),o=s.width+60,l=e.addText(this.currentPosition.x,this.currentPosition.y,t.quote,{box:!0,boxStrokeColor:\"transparent\",width:Math.min(500,o),height:s.height+60});return e.elementsDict[l].link=`[[${t.link}]]`,e.addElementsToView(!1,!1).then((()=>e.destroy())),!1}}if(e.elements){const t=!(e.elements.some((e=>\"image\"===e.type))&&!e.elements.some((e=>\"image\"!==e.type)));window.setTimeout((()=>this.save(t)),30)}if(e&&e.text&&e.text.match(/(\\[\\[[^\\]]*]])|(\\[[^\\]]*]\\([^)]*\\))/gm)){const e=a.getSceneElements().filter((e=>\"text\"===e.type)).map((e=>e.id));window.setTimeout((async()=>{const t=a.getSceneElementsIncludingDeleted(),i=t.filter((t=>\"text\"===t.type&&!t.isDeleted&&!e.includes(t.id))),n=new Map;let r;const s=(e,t)=>{n.set(r,[e,t])};if(i.forEach((e=>{r=e,isTextImageTransclusion(e.originalText,this,s)})),0===n.size)return void this.save(!1);for(const[e,[a,i]]of n){const a=cloneElement(e);a.isDeleted=!0,this.excalidrawData.deleteTextElement(a.id),t[t.indexOf(e)]=a}this.updateScene({elements:t,captureUpdate:CaptureUpdateAction.NEVER});const o=getEA(this);let l=0;for(const e of i){const t={x:e.x,y:e.y+l};if(n.has(e)){const[a,i]=n.get(e);if(IMAGE_TYPES.contains(i.extension)){const a=await insertImageToView(o,t,i,void 0,!1);l+=o.getElement(a).height-e.height}else if(\"pdf\"!==i.extension){const n=await insertEmbeddableToView(o,t,i,a,!1);l+=o.getElement(n).height-e.height}else new UniversalInsertFileModal(this.plugin,this).open(i,t)}else 0!==l&&(o.copyViewElementsToEAforEditing([e]),o.getElement(e.id).y=t.y)}await o.addElementsToView(!1,!0),o.selectElementsInView(i.map((e=>e.id))),o.destroy()}),200)}return!0}async onThemeChange(e){this.excalidrawData.scene.appState.theme=e,this.loadSceneFiles(!0),this.toolsPanelRef?.current?.setTheme(e),window.setTimeout((()=>setDynamicStyle(this.plugin.ea,this,this.previousBackgroundColor,this.plugin.settings.dynamicStyling)))}onBeforeTextEdit(e,t){if(!t)return;if(window.clearTimeout(this.isEditingTextResetTimer),this.isEditingTextResetTimer=null,this.semaphores.isEditingText=!0,this.compatibilityMode)return e.originalText??e.text;return this.excalidrawData.getRawText(e.id)||e.rawText}onBeforeTextSubmit(e,t,a,i){const n=this.excalidrawAPI;if(!n)return{updatedNextOriginalText:null,nextLink:e?.link??null};if(this.semaphores.isEditingText=!0,this.isEditingTextResetTimer&&window.clearTimeout(this.isEditingTextResetTimer),this.isEditingTextResetTimer=window.setTimeout((()=>{void 0!==this.semaphores?.isEditingText&&(this.semaphores.isEditingText=!1),this.isEditingTextResetTimer=null}),1500),i)return this.excalidrawData.deleteTextElement(e.id),this.setDirty(7),{updatedNextOriginalText:null,nextLink:null};const r=t$d(\"WARNING_PASTING_ELEMENT_AS_TEXT\");if(a.startsWith('{\"type\":\"excalidraw/clipboard\",\"elements\":[{\"'))return window.setTimeout((()=>{const t=this.excalidrawAPI.getSceneElements(),a=t.filter((t=>t.id===e.id));if(1===a.length){const e=cloneElement(a[0]);e.rawText=r,t[t.indexOf(a[0])]=e,this.excalidrawData.setTextElement(e.id,r,(()=>{})),this.updateScene({elements:t,captureUpdate:CaptureUpdateAction.NEVER}),n.history.clear()}})),{updatedNextOriginalText:r,nextLink:null};const s=e.containerId;if(isTextImageTransclusion(a,this,((t,a)=>{window.setTimeout((async()=>{const i=this.excalidrawAPI.getSceneElements(),n=i.filter((t=>t.id===e.id));if(1===n.length){const e={x:n[0].x,y:n[0].y},r=cloneElement(n[0]);r.isDeleted=!0,this.excalidrawData.deleteTextElement(r.id),i[i.indexOf(n[0])]=r,this.updateScene({elements:i,captureUpdate:CaptureUpdateAction.NEVER});const s=getEA(this);if(IMAGE_TYPES.contains(a.extension))s.selectElementsInView([await insertImageToView(s,e,a)]),s.destroy();else if(\"pdf\"!==a.extension)s.selectElementsInView([await insertEmbeddableToView(s,e,a,t)]),s.destroy();else if(getLinkParts(t).page){const i=a.path+\"#\"+t.split(\"#\")[1];s.selectElementsInView([await insertImageToView(s,e,i)])}else new UniversalInsertFileModal(this.plugin,this).open(a,e);this.setDirty(9)}}))})))return{updatedNextOriginalText:null,nextLink:e.link};if(a!==e.originalText||!this.excalidrawData.getRawText(e.id)){this.setDirty(8);const t=async t=>{if(this.textMode===TextMode.raw)return;const a=this.excalidrawAPI.getSceneElements(),i=arrayToMap(a),r=a.filter((t=>t.id===e.id));if(1===r.length){const e=getContainerElement(r[0],i),n=cloneElement(r[0]);if(!r[0]?.isDeleted){const{text:a,x:s,y:o,width:l,height:c}=refreshTextDimensions(r[0],e,i,t);n.x=s,n.y=o,n.width=l,n.height=c,n.originalText=t,n.text=a}a[a.indexOf(r[0])]=n,this.updateScene({elements:a,captureUpdate:CaptureUpdateAction.NEVER}),n.containerId&&this.updateContainerSize(n.containerId),this.setDirty(8.1)}n.history.clear()},[i,r]=this.excalidrawData.setTextElement(e.id,a,t);return i?(s&&this.updateContainerSize(s,!0),this.textMode===TextMode.raw?{updatedNextOriginalText:a,nextLink:r}:a===i?r?{updatedNextOriginalText:i,nextLink:r}:{updatedNextOriginalText:null,nextLink:e.link}:(n.history.clear(),{updatedNextOriginalText:i,nextLink:r})):{updatedNextOriginalText:null,nextLink:e.link}}return s&&this.updateContainerSize(s,!0),this.textMode===TextMode.parsed?{updatedNextOriginalText:this.excalidrawData.getParsedText(e.id),nextLink:e.link}:{updatedNextOriginalText:null,nextLink:e.link}}async onLinkOpen(e,t){if(t.preventDefault(),!e)return;let a=e.link;if(!a||\"\"===a)return;window.setTimeout((()=>this.removeLinkTooltip()),500);let i=t?.detail?.nativeEvent;if(!this.handleLinkHookCall(e,e.link,i)&&!openExternalLink(e.link,this.app)){if(\"text\"===e.type){const t=e.rawText.replaceAll(\"\\n\",\"\");REGEX_LINK.getResList(t).filter((e=>Boolean(e.value))).length>1&&(a=t)}i.shiftKey||i.ctrlKey||i.metaKey||i.altKey||(i=emulateKeysForLinkClick(\"new-tab\")),this.linkClick(i,null,null,{id:e.id,text:a},i,!0)}}onLinkHover(e,t){if(e&&(this.plugin.settings.hoverPreviewWithoutCTRL||isWinCTRLorMacCMD(t))){this.lastMouseEvent=t,this.lastMouseEvent.ctrlKey=!(DEVICE.isIOS||DEVICE.isMacOS)||this.lastMouseEvent.ctrlKey,this.lastMouseEvent.metaKey=DEVICE.isIOS||DEVICE.isMacOS||this.lastMouseEvent.metaKey;const a=e.link;if(!a||\"\"===a)return;if(a.startsWith(\"[[\")){const t=a.match(/\\[\\[(?<link>.*?)\\]\\]/);if(!t)return;let i=t.groups.link;this.showHoverPreview(i,e)}}}onViewModeChange(e){if(this.semaphores.viewunload||this.toolsPanelRef?.current?.setExcalidrawViewMode(e),this.getHookServer().onViewModeChangeHook)try{this.getHookServer().onViewModeChangeHook(e,this,this.getHookServer())}catch(e){errorlog({where:\"ExcalidrawView.onViewModeChange\",fn:this.getHookServer().onViewModeChangeHook,error:e})}}async getBackOfTheNoteSections(){return(await this.app.metadataCache.blockCache.getForFile({isCancelled:()=>!1},this.file)).blocks.filter((e=>e.display&&\"heading\"===e.node?.type)).filter((e=>!MD_EX_SECTIONS.includes(e.display))).map((e=>cleanSectionHeading(e.display)))}async getBackOfTheNoteBlocks(){return(await this.app.metadataCache.blockCache.getForFile({isCancelled:()=>!1},this.file)).blocks.filter((e=>e.display&&e.node&&e.node.hasOwnProperty(\"type\")&&e.node.hasOwnProperty(\"id\"))).map((e=>cleanBlockRef(e.node.id)))}getSingleSelectedImage(){if(!this.excalidrawAPI)return null;const e=this.getViewSelectedElements().filter((e=>\"image\"===e.type));if(1!==e.length)return null;const t=e[0];return{imageEl:t,embeddedFile:this.excalidrawData.getFile(t.fileId)}}async insertBackOfTheNoteCard(e=!1){await this.forceSave(!0);const t=await this.getBackOfTheNoteSections();new SelectCard(this.app,this,t).start(e)}async moveBackOfTheNoteCardToFile(e){e=e??this.getViewSelectedElements().filter((e=>\"embeddable\"===e.type))[0]?.id;const t=this.getEmbeddableLeafElementById(e),a=t?.node?.child;if(!a||a.file!==this.file)return;if(a.lastSavedData!==this.data&&(await this.forceSave(!0),a.lastSavedData!==this.data))return void new obsidian_module.Notice(t$d(\"ERROR_TRY_AGAIN\"));const{folder:i,filepath:n}=await getAttachmentsFolderAndFilePath(this.app,this.file.path,\"dummy\"),r=getNewUniqueFilepath(this.app.vault,a.subpath.replaceAll(\"#\",\"\"),i);let s=await ScriptEngine.inputPrompt(this,this.plugin,this.app,\"Set filename\",\"Enter filename\",r,void 0,3);if(!s)return;s.endsWith(\".md\")||(s+=\".md\");const{folderpath:o,filename:l}=splitFolderAndFilename(s);s=getNewUniqueFilepath(this.app.vault,l,o);try{const t=await createOrOverwriteFile(this.app,s,a.text);if(!t)return void new obsidian_module.Notice(\"Unexpected error\");const i=getEA(this);i.copyViewElementsToEAforEditing([this.getViewElements().find((t=>t.id===e))]),i.getElement(e).link=`[[${t.path}]]`,this.data=this.data.split(a.heading+a.text).join(\"\"),await i.addElementsToView(!1),i.destroy(),await this.forceSave(!0)}catch(e){return void new obsidian_module.Notice(`Unexpected error: ${e.message}`)}}async pasteCodeBlock(e){try{e=e.replaceAll(\"\\r\\n\",\"\\n\").replaceAll(\"\\r\",\"\\n\").trim(),Boolean(e.match(/^`{3}[^\\n]*\\n.+\\n`{3}\\s*$/ms))||(e=\"```\"+(await GenericInputPrompt.Prompt(this,this.plugin,this.app,\"type codeblock type\",\"javascript, html, python, etc.\",\"\")).trim()+\"\\n\"+e+\"\\n```\");let t=(await GenericInputPrompt.Prompt(this,this.plugin,this.app,\"Code Block Title\",\"Enter title or leave empty for automatic title\",\"\")).trim();\"\"===t&&(t=\"Code Block\");const a=await this.getBackOfTheNoteSections();if(a.includes(t)){let e=0;for(;a.includes(`${t} ${++e}`););t=`${t} ${e}`}addBackOfTheNoteCard(this,t,!1,e)}catch(e){}}async convertImageElWithURLToLocalFile(e){const{imageEl:t,embeddedFile:a}=e,i=a.getImage(!1);if(!i&&!i.startsWith(\"data:\"))return new obsidian_module.Notice(\"Image not found\"),!1;const n=getEA(this);n.copyViewElementsToEAforEditing([t]);const r=n.getElement(t.id);r.fileId=fileid(),r.link||(r.link=a.hyperlink);let s=a.getImage(!1);if(!s.startsWith(\"data:\")&&(new obsidian_module.Notice(\"Attempting to download image from URL. This may take a long while. The operation will time out after max 1 minute\"),s=await getDataURLFromURL(s,a.mimeType,3e4),!s.startsWith(\"data:\")))return new obsidian_module.Notice(\"Failed. Could not download image!\"),!1;const o=[];o.push({mimeType:a.mimeType,id:r.fileId,dataURL:s,created:a.mtime}),this.excalidrawAPI.addFiles(o),await n.addElementsToView(!1,!0),n.destroy(),new obsidian_module.Notice(\"Image successfully converted to local file\")}insertLinkAction(e){let t=e.match(/\\[\\[(.*?)\\]\\]/)?.[1];t||(t=e.replaceAll(\"[\",\"\").replaceAll(\"]\",\"\"),t=t.split(\"|\")[0].trim()),this.plugin.insertLinkDialog.start(this.file.path,((t,a,i)=>this.addLink(t,a,i,e)),t)}onContextMenu(e,t,a){const i=this.packages.react,n=[],r=this.excalidrawAPI,s=Object.keys(r.getAppState().selectedElementIds).length>0;if(this.isLinkSelected()&&n.push([renderContextMenuAction(i,t$d(\"OPEN_LINK_CLICK\"),(()=>{const e=emulateKeysForLinkClick(\"new-tab\");this.handleLinkClick(e,!0)}),a)]),t.viewModeEnabled){const e=\"laser\"===t.activeTool?.type;n.push([renderContextMenuAction(i,t$d(e?\"LASER_OFF\":\"LASER_ON\"),(()=>{r.setActiveTool({type:e?\"selection\":\"laser\"})}),a)])}if(!t.viewModeEnabled){const r=this.getViewSelectedElements().filter((e=>\"text\"===e.type));if(1===r.length){const e=r[0],t=this.getViewElements().find((t=>t.id===e.containerId));t&&e.link&&this.excalidrawData.getParsedText(e.id)===e.rawText&&n.push([renderContextMenuAction(i,t$d(\"REMOVE_LINK\"),(async()=>{const t=getEA(this);t.copyViewElementsToEAforEditing([e]),t.getElement(e.id).link=null,await t.addElementsToView(!1),t.destroy()}),a)]),t&&n.push([renderContextMenuAction(i,t$d(\"SELECT_TEXTELEMENT_ONLY\"),(()=>{window.setTimeout((()=>this.excalidrawAPI.selectElements([e])))}),a)]),(!t||t&&\"arrow\"!==t.type)&&n.push([renderContextMenuAction(i,t$d(\"CONVERT_TO_MARKDOWN\"),(()=>{this.convertTextElementToMarkdown(e,t)}),a)])}const o=this.getSingleSelectedImage();if(o&&o.embeddedFile?.isHyperLink&&n.push([renderContextMenuAction(i,t$d(\"CONVERT_URL_TO_FILE\"),(()=>{window.setTimeout((()=>this.convertImageElWithURLToLocalFile(o)))}),a)]),o&&o.embeddedFile&&\"image/svg+xml\"===o.embeddedFile.mimeType&&(!o.embeddedFile.file||o.embeddedFile.file&&!this.plugin.isExcalidrawFile(o.embeddedFile.file))&&n.push([renderContextMenuAction(i,t$d(\"IMPORT_SVG_CONTEXTMENU\"),(async()=>{const e=o.embeddedFile.getImage(!1).split(\",\")[1],t=atob(e);if(!t||\"\"===t)return;const a=getEA(this);a.importSVG(t),a.addToGroup(a.getElements().map((e=>e.id))),await a.addElementsToView(!0,!0,!0,!0),a.destroy()}),a)]),s?n.push([renderContextMenuAction(i,t$d(\"COPY_ELEMENT_LINK\"),(()=>{this.copyLinkToSelectedElementToClipboard(\"\")}),a)]):n.push([renderContextMenuAction(i,t$d(\"COPY_DRAWING_LINK\"),(()=>{const e=this.file.path.match(/(.*)(\\.md)$/)?.[1];navigator.clipboard.writeText(`![[${e??this.file.path}]]`)}),a)]),1===this.getViewSelectedElements().filter((e=>\"embeddable\"===e.type)).length){const e=this.getEmbeddableLeafElementById(this.getViewSelectedElements().filter((e=>\"embeddable\"===e.type))[0].id),t=e?.node?.child;t&&t.file===this.file&&n.push([renderContextMenuAction(i,t$d(\"CONVERT_CARD_TO_FILE\"),(()=>{this.moveBackOfTheNoteCardToFile()}),a)])}if(n.push([renderContextMenuAction(i,t$d(\"INSERT_CARD\"),(()=>{this.insertBackOfTheNoteCard()}),a)]),n.push([renderContextMenuAction(i,t$d(\"UNIVERSAL_ADD_FILE\"),(()=>{new UniversalInsertFileModal(this.plugin,this).open()}),a)]),n.push([renderContextMenuAction(i,t$d(\"INSERT_LINK\"),(()=>{this.plugin.insertLinkDialog.start(this.file.path,((e,t,a)=>this.addLink(e,t,a)))}),a)]),n.push([renderContextMenuAction(i,t$d(\"PASTE_CODEBLOCK\"),(async()=>{const e=await(navigator.clipboard?.readText());e&&\"\"!==e.trim()&&this.pasteCodeBlock(e)}),a)]),!s&&e.some((e=>\"frame\"===e.type&&\"marker\"===e.frameRole))){const{frameRendering:e}=t;n.push([renderContextMenuAction(i,e.markerEnabled&&e.enabled&&e.outline?t$d(\"MARKER_FRAME_HIDE\"):t$d(\"MARKER_FRAME_SHOW\"),(()=>{const t=!(e.markerEnabled&&e.enabled&&e.outline);t?setTimeout((()=>this.updateScene({appState:{frameRendering:{...e,enabled:!0,outline:!0,markerEnabled:t}},captureUpdate:CaptureUpdateAction.NEVER}))):setTimeout((()=>this.updateScene({appState:{frameRendering:{...e,markerEnabled:t}},captureUpdate:CaptureUpdateAction.NEVER})))}),a)]),e.markerEnabled&&e.enabled&&e.outline&&n.push([renderContextMenuAction(i,e.markerName?t$d(\"MARKER_FRAME_TITLE_HIDE\"):t$d(\"MARKER_FRAME_TITLE_SHOW\"),(()=>{setTimeout((()=>this.updateScene({appState:{frameRendering:{...e,markerName:!e.markerName}},captureUpdate:CaptureUpdateAction.NEVER})))}),a)])}}if(0!==n.length)return i.createElement(\"div\",{},...n,i.createElement(\"hr\",{key:nanoid$1(),className:\"context-menu-item-separator\"}))}actionOpenScriptInstallPrompt(){new ScriptInstallPrompt(this.plugin).open()}actionOpenExportImageDialog(){this.exportDialog||(this.exportDialog=new ExportDialog(this.plugin,this,this.file)),this.exportDialog.open()}setExcalidrawAPI(e){this.excalidrawAPI=e,window.setTimeout((()=>{this.onAfterLoadScene(!0),this.excalidrawContainer?.focus()}))}ttdDialog(){return this.packages.react.createElement(this.packages.excalidrawLib.TTDDialog,{onTextSubmit:async e=>{try{const t=await postOpenAI({systemPrompt:\"The user will provide you with a text prompt. Your task is to generate a mermaid diagram based on the prompt. Use the graph, sequenceDiagram, flowchart or classDiagram types based on what best fits the request. Return a single message containing only the mermaid diagram in a codeblock. Avoid the use of `()` parenthesis in the mermaid script.\",text:e,instruction:\"Return a single message containing only the mermaid diagram in a codeblock.\"});if(!t)return{error:new Error(\"Request failed\")};const a=t.json;if(a?.error)return log$2(t),{error:new Error(a.error.message)};if(!a?.choices?.[0]?.message?.content)return log$2(t),{error:new Error(\"Generation failed... see console log for details\")};let i=extractCodeBlocks(a.choices[0]?.message?.content)[0]?.data;return i?(i.startsWith(\"mermaid\")&&(i=i.replace(/^mermaid/,\"\").trim()),{generatedResponse:i,rateLimit:100,rateLimitRemaining:100}):(log$2(t),{error:new Error(\"Generation failed... see console log for details\")})}catch(e){throw new Error(\"Request failed\")}}})}diagramToCode(){return this.packages.react.createElement(this.packages.excalidrawLib.DiagramToCodePlugin,{generate:async({frame:e,children:t})=>{const a=this.excalidrawAPI.getAppState();try{const i=await this.packages.excalidrawLib.exportToBlob({elements:t,appState:{...a,exportBackground:!0,viewBackgroundColor:a.viewBackgroundColor},exportingFrame:e,files:this.excalidrawAPI.getFiles(),mimeType:\"image/jpeg\"}),n=await this.packages.excalidrawLib.getDataURL(i),r=this.packages.excalidrawLib.getTextFromElements(t),s=await diagramToHTML({image:n,apiKey:this.plugin.settings.openAIAPIToken,text:r,theme:a.theme});if(!s.ok){const e=await s.json(),t=e.error?.message||\"Unknown error during generation\";return{html:errorHTML(t)}}const o=await s.json();if(null==o.choices[0].message.content)return{html:errorHTML(\"Nothing generated\")};const l=o.choices[0].message.content;return{html:l.slice(l.indexOf(\"<!DOCTYPE html>\"),l.indexOf(\"</html>\")+7)}}catch(e){return{html:errorHTML(\"Request failed\")}}}})}ttdDialogTrigger(){return this.packages.react.createElement(this.packages.excalidrawLib.TTDDialogTrigger,{})}renderWelcomeScreen(){if(!this.plugin.settings.showSplashscreen)return null;const e=this.packages.react,{WelcomeScreen:t}=this.packages.excalidrawLib,a=this.app.vault.getFiles().filter((e=>this.plugin.isExcalidrawFile(e))).length,i=a<200?\"Bronze\":a<750?\"Silver\":a<2e3?\"Gold\":\"Platinum\",n=a<200?200-a:a<750?750-a:a<2e3?2e3-a:0,{decoration:r,title:s}=SwordColors[i];return e.createElement(t,{},e.createElement(t.Center,{},e.createElement(t.Center.Logo,{},e.createElement(LogoWrapper,{},excalidrawSword(i))),e.createElement(t.Center.Heading,{color:r,message:n>0?`${i}: ${n} ${t$d(\"WELCOME_RANK_NEXT\")}`:`${i}: ${t$d(\"WELCOME_RANK_LEGENDARY\")}`},s),e.createElement(t.Center.Heading,{},t$d(\"WELCOME_COMMAND_PALETTE\"),e.createElement(\"br\"),t$d(\"WELCOME_OBSIDIAN_MENU\"),e.createElement(\"br\"),t$d(\"WELCOME_SCRIPT_LIBRARY\"),e.createElement(\"br\"),t$d(\"WELCOME_HELP_MENU\")),e.createElement(t.Center.Menu,{},e.createElement(t.Center.MenuItemLink,{icon:ICONS.YouTube,href:\"https://www.youtube.com/@VisualPKM\",shortcut:null,\"aria-label\":t$d(\"WELCOME_YOUTUBE_ARIA\")},t$d(\"WELCOME_YOUTUBE_LINK\")),e.createElement(t.Center.MenuItemLink,{icon:ICONS.Discord,href:\"https://discord.gg/DyfAXFwUHc\",shortcut:null,\"aria-label\":t$d(\"WELCOME_DISCORD_ARIA\")},t$d(\"WELCOME_DISCORD_LINK\")),e.createElement(t.Center.MenuItemLink,{icon:ICONS.twitter,href:\"https://twitter.com/zsviczian\",shortcut:null,\"aria-label\":t$d(\"WELCOME_TWITTER_ARIA\")},t$d(\"WELCOME_TWITTER_LINK\")),e.createElement(t.Center.MenuItemLink,{icon:ICONS.Learn,href:\"https://visual-thinking-workshop.com\",shortcut:null,\"aria-label\":t$d(\"WELCOME_LEARN_ARIA\")},t$d(\"WELCOME_LEARN_LINK\")),e.createElement(t.Center.MenuItemLink,{icon:ICONS.heart,href:\"https://ko-fi.com/zsolt\",shortcut:null,\"aria-label\":t$d(\"WELCOME_DONATE_ARIA\")},t$d(\"WELCOME_DONATE_LINK\")))))}renderCustomActionsMenu(){const e=this.packages.react,{MainMenu:t}=this.packages.excalidrawLib;return e.createElement(t,{},e.createElement(t.DefaultItems.ChangeCanvasBackground),e.createElement(t.DefaultItems.ToggleTheme),e.createElement(t.Separator),DEVICE.isPhone?null:e.createElement(t.Item,{icon:ICONS.trayMode,\"aria-label\":t$d(\"ARIA_LABEL_TRAY_MODE\"),onSelect:()=>{DEVICE.isTablet?this.plugin.settings.defaultTrayMode?this.toggleCompactMode():this.toggleTrayMode(!1):this.toggleTrayMode()}},t$d(\"TRAY_TRAY_MODE\")),e.createElement(t.Item,{icon:saveIcon(!1),\"aria-label\":t$d(\"FORCE_SAVE\"),onSelect:()=>this.forceSave()},t$d(\"TRAY_SAVE\")),e.createElement(t.Item,{icon:ICONS.scriptEngine,\"aria-label\":t$d(\"TRAY_SCRIPT_LIBRARY_ARIA\"),onSelect:()=>this.actionOpenScriptInstallPrompt()},t$d(\"TRAY_SCRIPT_LIBRARY\")),e.createElement(t.Item,{icon:ICONS.ExportImage,\"aria-label\":t$d(\"TRAY_EXPORT_ARIA\"),onSelect:()=>this.actionOpenExportImageDialog()},t$d(\"TRAY_EXPORT\")),e.createElement(t.Item,{icon:ICONS.switchToMarkdown,\"aria-label\":t$d(\"TRAY_SWITCH_TO_MD_ARIA\"),onSelect:()=>this.openAsMarkdown()},t$d(\"TRAY_SWITCH_TO_MD\")),e.createElement(t.Separator),e.createElement(t.DefaultItems.Help),e.createElement(t.DefaultItems.ClearCanvas))}renderEmbeddable(e,t){const a=this.packages.react;try{const i=useDefaultExcalidrawFrame(e);if(!this.file||!e||!e.link||0===e.link.length||i)return null;if(e.link.match(REG_LINKINDEX_HYPERLINK)||e.link.startsWith(\"data:\"))return i?null:renderWebView(e.link,this,e.id,t);const n=REGEX_LINK.getRes(e.link).next();if(!n||!n.value&&n.done)return null;let r=REGEX_LINK.getLink(n);return r.match(REG_LINKINDEX_HYPERLINK)?i?null:renderWebView(r,this,e.id,t):a.createElement(CustomEmbeddable,{element:e,view:this,appState:t,linkText:r})}catch(e){return null}}renderEmbeddableMenu(e){return this.embeddableMenu?.renderButtons(e)}renderToolsPanel(e){return this.packages.react.createElement(ToolsPanel,{ref:this.toolsPanelRef,visible:!1,view:new WeakRef(this),centerPointer:()=>this.setCurrentPositionToCenter(),observer:new WeakRef(e.current)})}renderTopRightUI(e,t){return this.obsidianMenu?.renderButton(e,t)}onExcalidrawResize(){try{const e=this.excalidrawAPI;if(!e)return;const t=this.contentEl.clientWidth,a=this.contentEl.clientHeight;if(0===t||0===a)return;const i=e.getAppState(),n=this.editingTextElementId===i.editingTextElement?.id,r=i.editingTextElement&&!n,s=(this.semaphores.isEditingText||n)&&!r;if(this.editingTextElementId=r?i.editingTextElement.id:null,r){const e=this.contentEl.querySelector(\".Island.App-toolbar\")?.clientHeight??0,t=sceneCoordsToViewportCoords({sceneX:0,sceneY:i.editingTextElement.y},i).y,n=a>t-sceneCoordsToViewportCoords({sceneX:0,sceneY:-i.scrollY},i).y+2*e,r=this.excalidrawWrapperRef.current;r&&!n&&(r.style.top=-(i.height-a)+\"px\",r.style.height=`${i.height}px`,this.excalidrawContainer?.querySelector(\".App-bottom-bar\")?.scrollIntoView(),this.headerEl?.scrollIntoView())}if(s){const e=this.excalidrawWrapperRef.current,t=this.excalidrawContainer?.querySelector(\".App-bottom-bar\"),a=this.headerEl;e&&(e.style.top=\"\",e.style.height=\"\",t?.scrollIntoView(),a?.scrollIntoView())}this.toolsPanelRef&&this.toolsPanelRef.current&&this.toolsPanelRef.current.updatePosition(),this.ownerDocument!==document&&this.refreshCanvasOffset()}catch(e){errorlog({where:\"Excalidraw React-Wrapper, onResize\",error:e})}}excalidrawRootElement(e){const t=this.packages.react,{Excalidraw:a}=this.packages.excalidrawLib,i=t.useRef(null),n=t.useRef(null),r=t.useRef(null);this.toolsPanelRef=n,t.useEffect((()=>(this.embeddableMenuRef=r,this.obsidianMenu=new ObsidianMenu(this.plugin,n,this),this.embeddableMenu=new EmbeddableMenu(this,r),this.excalidrawWrapperRef=i,()=>{this.obsidianMenu.destroy(),this.obsidianMenu=null,this.embeddableMenu.destroy(),this.embeddableMenu=null,this.toolsPanelRef.current=null,this.embeddableMenuRef.current=null,this.excalidrawWrapperRef.current=null})),[]);const s=t.useRef(new ResizeObserver((e=>{if(!n||!n.current)return;const{width:t,height:a}=e[0].contentRect;if(0===t||0===a)return;const i=n.current.onRightEdge?n.current.previousWidth-t:0,r=n.current.onBottomEdge?n.current.previousHeight-a:0;n.current.updatePosition(r,i)})));return t.useEffect((()=>(n?.current&&s.current.observe(n.current.containerRef.current),()=>{})),[n,s]),t.createElement(t.Fragment,null,t.createElement(\"div\",{className:\"excalidraw-wrapper\",ref:i,key:\"abc\",tabIndex:0,onKeyDown:this.excalidrawDIVonKeyDown.bind(this),onPointerDown:this.onPointerDown.bind(this),onMouseMove:this.onMouseMove.bind(this),onMouseOver:this.onMouseOver.bind(this),onDragOver:this.dropManager.onDragOver.bind(this.dropManager),onDragLeave:this.dropManager.onDragLeave.bind(this.dropManager)},t.createElement(a,{excalidrawAPI:this.setExcalidrawAPI.bind(this),width:\"100%\",height:\"100%\",UIOptions:{canvasActions:{loadScene:!1,saveScene:!1,saveAsScene:!1,export:!1,saveAsImage:!1,saveToActiveFile:!1}},initState:e?.appState,initialData:e,detectScroll:!0,onPointerUpdate:this.onPointerUpdate.bind(this),libraryReturnUrl:\"app://obsidian.md\",autoFocus:!0,langCode:obsidianToExcalidrawMap[this.plugin.locale]??\"en-EN\",aiEnabled:this.plugin.settings.aiEnabled??!0,onChange:this.onChange.bind(this),onLibraryChange:this.onLibraryChange.bind(this),renderTopRightUI:this.renderTopRightUI.bind(this),renderEmbeddableMenu:this.renderEmbeddableMenu.bind(this),onPaste:this.onPaste.bind(this),onThemeChange:this.onThemeChange.bind(this),onDrop:this.dropManager.onDrop.bind(this.dropManager),onBeforeTextEdit:this.onBeforeTextEdit.bind(this),onBeforeTextSubmit:this.onBeforeTextSubmit.bind(this),onLinkOpen:this.onLinkOpen.bind(this),onLinkHover:this.onLinkHover.bind(this),onContextMenu:this.onContextMenu.bind(this),onViewModeChange:this.onViewModeChange.bind(this),validateEmbeddable:!0,renderWebview:DEVICE.isDesktop,renderEmbeddable:this.renderEmbeddable.bind(this),renderMermaid:shouldRenderMermaid,showDeprecatedFonts:!0,insertLinkAction:this.insertLinkAction.bind(this)},this.renderCustomActionsMenu(),this.renderWelcomeScreen(),this.ttdDialog(),this.diagramToCode(),this.ttdDialogTrigger()),this.renderToolsPanel(s)))}async instantiateExcalidraw(e){for(await this.plugin.awaitInit();!this.semaphores.scriptsReady;)await sleep(50);const t=this.packages.react,a=this.packages.reactDOM;this.clearDirty(),this.excalidrawRoot=a.createRoot(this.contentEl),this.excalidrawRoot.render(t.createElement(this.excalidrawRootElement.bind(this,e)))}updateContainerSize(e,t=!1,a=!1){const i=this.excalidrawAPI;if(!i)return;const n=()=>{const t=e?i.getSceneElements().filter((t=>t.id===e&&\"arrow\"!==t.type)):i.getSceneElements().filter(isContainer);t.length>0&&(a&&(this.semaphores.justLoaded=!0),i.updateContainerSize(t))};t?window.setTimeout((()=>n()),50):n()}zoomToFit(e=!0,t=!1){if(this.semaphores?.viewunload)return;if(document.body.querySelector(\"div.modal-container\"))return;const a=this.excalidrawAPI;if(!a||this.semaphores.isEditingText||this.semaphores.preventAutozoom)return;if(windowMigratedDisableZoomOnce)return void(windowMigratedDisableZoomOnce=!1);const i=this.plugin.settings.zoomToFitMaxLevel,n=a.getSceneElements().filter((e=>e.width<1e4&&e.height<1e4));DEVICE.isMobile&&n.length>1e3||n.length>2500?t&&a.scrollToContent():e?window.setTimeout((()=>a.zoomToFit(n,i,this.isFullscreen()?0:.05)),100):a.zoomToFit(n,i,this.isFullscreen()?0:.05)}updatePinnedScripts(){const e=this.excalidrawAPI;if(!e)return!1;e.updateScene({appState:{pinnedScripts:this.plugin.settings.pinnedScripts},captureUpdate:CaptureUpdateAction.NEVER})}updatePinnedCustomPens(){const e=this.excalidrawAPI;if(!e)return!1;e.updateScene({appState:{customPens:this.plugin.settings.customPens.slice(0,this.plugin.settings.numberOfCustomPens)},captureUpdate:CaptureUpdateAction.NEVER})}updatePinchZoom(){const e=this.excalidrawAPI;if(!e)return!1;e.updateScene({appState:{allowPinchZoom:this.plugin.settings.allowPinchZoom},captureUpdate:CaptureUpdateAction.NEVER})}updateWheelZoom(){const e=this.excalidrawAPI;if(!e)return!1;e.updateScene({appState:{allowWheelZoom:this.plugin.settings.allowWheelZoom},captureUpdate:CaptureUpdateAction.NEVER})}async toggleCompactMode(){const e=!this.plugin.settings.compactModeOnTablets;await this.plugin.loadSettings(),this.plugin.settings.compactModeOnTablets=e,setTrayMode(this.app,this.plugin.settings),await this.plugin.saveSettings()}async toggleTrayMode(e){const t=!this.plugin.settings.defaultTrayMode;await this.plugin.loadSettings(),this.plugin.settings.defaultTrayMode=t,void 0!==e&&(this.plugin.settings.compactModeOnTablets=e),setTrayMode(this.app,this.plugin.settings),await this.plugin.saveSettings()}setTrayMode(e){const t=this.excalidrawAPI;if(!t)return!1;t.updateScene({appState:{trayModeEnabled:e},captureUpdate:CaptureUpdateAction.NEVER}),setTimeout((()=>t.refreshEditorBreakpoints()))}selectElementsMatchingQuery(e,t,a=!0,i=!1,n=!1){let r=getTextElementsMatchingQuery(e.filter((e=>\"text\"===e.type)),t,i).concat(getFrameElementsMatchingQuery(e.filter((e=>\"frame\"===e.type)),t,i)).concat(getElementsWithLinkMatchingQuery(e.filter((e=>e.link)),t,i)).concat(getImagesMatchingQuery(e,t,this.excalidrawData,i));if(0===r.length)return new obsidian_module.Notice(t$d(\"NO_SEARCH_RESULT\")),!1;if(n){const t=this.plugin.ea.getElementsInTheSameGroupWithElement(r[0],e);t.length>0&&(r=t)}return this.zoomToElements(a,r),!0}zoomToElements(e,t){const a=this.excalidrawAPI;if(!a)return;const i=this.plugin.settings.zoomToFitMaxLevel;e&&a.selectElements(t,!0),a.zoomToFit(t,i,.05)}getViewElements(){const e=this.excalidrawAPI;return e?e.getSceneElements():[]}getViewSelectedElements(e=!0){const t=this.excalidrawAPI;if(!t)return[];const a=t.getAppState()?.selectedElementIds;if(!a)return[];const i=Object.keys(a);if(!i)return[];const n=new Set,r=t.getSceneElements().filter((e=>i.includes(e.id))),s=r.filter((e=>e.boundElements&&e.boundElements.filter((e=>\"text\"===e.type)).length>0)).map((e=>e.boundElements.filter((e=>\"text\"===e.type)).map((e=>e.id))[0]));return e&&r.some((e=>\"frame\"===e.type))&&r.filter((e=>\"frame\"===e.type)).forEach((e=>{t.getSceneElements().filter((t=>t.frameId===e.id)).forEach((e=>n.add(e.id)))})),r.forEach((e=>n.add(e.id))),s.forEach((e=>n.add(e))),t.getSceneElements().filter((e=>n.has(e.id)))}async copyLinkToSelectedElementToClipboard(e){const t=this.getViewSelectedElements();if(t.length<1)return void new obsidian_module.Notice(t$d(\"INSERT_LINK_TO_ELEMENT_ERROR\"));let a;if(2===t.length){const e=t.filter((e=>\"text\"===e.type));1===e.length&&e[0].containerId&&1===t.filter((e=>e.boundElements&&e.boundElements.some((e=>\"text\"===e.type)))).length&&(a=e[0].id)}a||(a=1===t.length?t[0].id:this.plugin.ea.getLargestElement(t).id);const i=t.filter((e=>\"frame\"===e.type)),n=1===i.length,r=n&&\"marker\"===i[0].frameRole,s=t.some((e=>e.groupIds&&e.groupIds.length>0));let o={area:{caption:\"Area\",action:()=>{e=\"area=\"}},link:{caption:\"Link\",action:()=>{e=\"\"}},group:{caption:\"Group\",action:()=>{e=\"group=\"}},frame:{caption:\"Frame\",action:()=>{e=\"frame=\",a=i[0].id}},clippedframe:{caption:\"Clipped Frame\",action:()=>{e=\"clippedframe=\",a=i[0].id}}},l=[];switch(e){case\"area=\":l=[o.area,o.link,...s?[o.group]:[],...n&&!r?[o.clippedframe]:[],...n?[o.frame]:[]];break;case\"group=\":l=[...s?[o.group]:[],o.link,o.area,...n&&!r?[o.clippedframe]:[],...n?[o.frame]:[]];break;case\"frame=\":case\"clippedframe=\":l=[...n&&!r?[o.clippedframe]:[],...n?[o.frame]:[],...s?[o.group]:[],o.link,o.area];break;default:l=[{caption:\"Link\",action:()=>{e=\"\"}},{caption:\"Area\",action:()=>{e=\"area=\"}},{caption:\"Group\",action:()=>{e=\"group=\"}},...n&&!r?[o.clippedframe]:[],...n?[o.frame]:[]]}const c=await ScriptEngine.inputPrompt(this,this.plugin,this.app,\"Set link alias\",\"Leave empty if you do not want to set an alias\",\"\",l);navigator.clipboard.writeText(`${e.length>0?\"!\":\"\"}[[${this.file.path}#^${e}${a}${c?`|${c}`:\"\"}]]`),new obsidian_module.Notice(t$d(\"INSERT_LINK_TO_ELEMENT_READY\"))}updateScene(e,t=!1){const a=this.excalidrawAPI;if(!a)return;if(\"string\"==typeof e.storeAction){switch(e.storeAction){case\"capture\":e.captureUpdate=CaptureUpdateAction.IMMEDIATELY;break;case\"none\":e.captureUpdate=CaptureUpdateAction.EVENTUALLY;break;default:e.captureUpdate=CaptureUpdateAction.NEVER}delete e.storeAction}const i=e.elements&&t;i&&(e.elements=restore(e,null,null).elements),Boolean(e.appState)&&(e.forceFlushSync=!0),e.elements&&(e.elements=syncInvalidIndices(e.elements));try{a.updateScene(e)}catch(t){if(errorlog({where:\"ExcalidrawView.updateScene 1st attempt\",fn:this.updateScene,error:t,scene:e,willDoSecondAttempt:!i}),i)warningUnknowSeriousError();else try{e.elements=restore(e,null,null).elements,a.updateScene(e)}catch(t){errorlog({where:\"ExcalidrawView.updateScene 2nd attempt\",fn:this.updateScene,error:t,scene:e}),warningUnknowSeriousError()}}}updateEmbeddableRef(e,t){t&&this.embeddableRefs.set(e,t)}getEmbeddableElementById(e){return this.embeddableRefs.get(e)}updateEmbeddableLeafRef(e,t){t&&this.embeddableLeafRefs.set(e,t)}getEmbeddableLeafElementById(e){if(!e)return null;return this.embeddableLeafRefs.get(e)||null}getActiveEmbeddable(){if(!this.excalidrawAPI)return null;const e=this.excalidrawAPI.getAppState();return e.activeEmbeddable&&\"active\"===e.activeEmbeddable.state?this.getEmbeddableLeafElementById(e.activeEmbeddable?.element?.id):null}get editor(){const e=this.getActiveEmbeddable();if(e){if(e.node&&e.node.isEditing)return e.node.child.editor;if(e.leaf?.view instanceof obsidian_module.MarkdownView)return e.leaf.view.editor}return null}}function getTextMode(e){return e.search(\"excalidraw-plugin: parsed\\n\")>-1||e.search(\"excalidraw-plugin: locked\\n\")>-1?TextMode.parsed:TextMode.raw}var t$c={d:(e,t)=>{for(var a in t)t$c.o(t,a)&&!t$c.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},r$d={};t$c.d(r$d,{QA:()=>w$1,ZP:()=>j$1,qt:()=>x$1,MX:()=>$});const e$d={red:\"hsl(0, 100%, 50%)\",orange:\"hsl(30, 100%, 50%)\",yellow:\"hsl(60, 100%, 50%)\",\"lime green\":\"hsl(90, 100%, 50%)\",green:\"hsl(120, 100%, 50%)\",\"blue green\":\"hsl(150, 100%, 50%)\",cyan:\"hsl(180, 100%, 50%)\",\"sky blue\":\"hsl(210, 100%, 50%)\",blue:\"hsl(240, 100%, 50%)\",purple:\"hsl(270, 100%, 50%)\",magenta:\"hsl(300, 100%, 50%)\",pink:\"hsl(330, 100%, 50%)\"};function s$a(e,t,a){return Math.max(e,Math.min(t,a))}function n$c(e,t){return+e.toFixed(t>=0?t:0)}function a$c(e){const t=e%360;return t<0?t+360:t}function i$a(e){return void 0!==e?s$a(0,e,1):1}function o$b(e){return Math.floor(Math.random()*e)}function h$4(e){var t;const{Cmin:a,Cmax:i,H:n,delta:r}=function(e){const[t,a,i]=Object.values(e).map((e=>e/255)),n=Math.max(t,a,i),r=Math.min(t,a,i),s=n-r;return{Cmin:r,Cmax:n,H:0===s?0:n===t?(a-i)/s%6:n===a?(i-t)/s+2:(t-a)/s+4,delta:s}}(e),s=(i+a)/2,o=0===r?0:r/(1-Math.abs(2*s-1));return{h:a$c(60*n),s:100*o,l:100*s,a:null!==(t=e.a)&&void 0!==t?t:1}}function u$8(e){const{h:t,s:a,l:i,a:n}=e,r=i/100,s=a/100,o=(1-Math.abs(2*r-1))*s,l=o*(1-Math.abs(t/60%2-1)),c=r-o/2,d=t<60||300<=t&&t<360?o:120<=t&&t<240?0:l,h=240<=t&&t<360?0:60<=t&&t<180?o:l,p=t<120?0:180<=t&&t<300?o:l,[u,m,g]=[d,h,p].map((e=>255*(e+c)));return{r:u,g:m,b:g,a:null!=n?n:1}}function l$5(e){const[t,a,i,n]=Object.values(e).map((e=>parseInt(e,16)));return{r:t,g:a,b:i,a:n?n/255:1}}const c$a=/^#?([\\da-f])([\\da-f])([\\da-f])([\\da-f])?$|^#?([\\da-f]{2})([\\da-f]{2})([\\da-f]{2})?([\\da-f]{2})?$/gi,f$3=/hsla?\\s*\\(\\s*([+-]?\\d*\\.?\\d+%?)\\s*,?\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*\\/?\\s*?(\\d*\\.?\\d+%?)?\\s*\\)/gi;function d$2({h:e,s:t,l:a,a:i}){return[u$8({h:a$c(e),s:s$a(0,t,100),l:s$a(0,a,100),a:i$a(i)}),\"hsl\"]}const g$2=/rgba?\\s*\\(\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*\\/?\\s*?(\\d*\\.?\\d+%?)?\\s*\\)/gi;function b$5({r:e,g:t,b:a,a:i}){return[{r:s$a(0,e,255),g:s$a(0,t,255),b:s$a(0,a,255),a:i$a(i)},\"rgb\"]}var p$3,v$2,m$1=function(e,t,a,i,n){if(\"m\"===i)throw new TypeError(\"Private method is not writable\");if(\"a\"===i&&!n)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===i?n.call(e,a):n?n.value=a:t.set(e,a),a},y$1=function(e,t,a,i){if(\"a\"===a&&!i)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!i:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===a?i:\"a\"===a?i.call(e):i?i.value:t.get(e)};class w$1{constructor(e){var t,a;p$3.set(this,{r:0,g:0,b:0,a:1}),v$2.set(this,\"rgb\");const i=w$1.Parsers.map((t=>t(e))).find((e=>\"invalid\"!==e[1]));i?(t=this,a=this,[{set value(e){m$1(t,p$3,e,\"f\")}}.value,{set value(e){m$1(a,v$2,e,\"f\")}}.value]=i):m$1(this,v$2,\"invalid\",\"f\")}get red(){return y$1(this,p$3,\"f\").r}get blue(){return y$1(this,p$3,\"f\").b}get green(){return y$1(this,p$3,\"f\").g}get alpha(){return y$1(this,p$3,\"f\").a}get hue(){return h$4(y$1(this,p$3,\"f\")).h}get saturation(){return h$4(y$1(this,p$3,\"f\")).s}get lightness(){return h$4(y$1(this,p$3,\"f\")).l}get format(){return y$1(this,v$2,\"f\")}isValid(){return\"invalid\"!==y$1(this,v$2,\"f\")}rgba(){return y$1(this,p$3,\"f\")}hsla(){return h$4(y$1(this,p$3,\"f\"))}hexa({round:e=!1}={}){return function(e,t=!1){let{r:a,g:i,b:n,a:r}=e;r&&(r*=255),t&&([a,i,n,r]=[a,i,n,r].map((e=>e&&Math.round(e))));const[s,o,l,c]=[a,i,n,null!=r?r:255].map((e=>e.toString(16).padStart(2,\"0\").toUpperCase()));return{r:s,g:o,b:l,a:c}}(y$1(this,p$3,\"f\"),e)}stringRGB({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[a,i,n,r]=Object.values(y$1(this,p$3,\"f\")).map(((e,a)=>n$c(e,t[a])));return e?`rgba(${a}, ${i}, ${n}, ${r})`:`rgb(${a}, ${i}, ${n})`}stringHEX({alpha:e=!0}={}){const[t,a,i,n]=Object.values(this.hexa({round:!0}));return`#${t}${a}${i}${e?n:\"\"}`}stringHSL({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[a,i,n,r]=Object.values(this.hsla()).map(((e,a)=>n$c(e,t[a])));return e?`hsla(${a}, ${i}%, ${n}%, ${r})`:`hsl(${a}, ${i}%, ${n}%)`}hueTo(e){var t;const{h:a,s:i,l:n,a:r}=this.hsla(),s=\"number\"==typeof e?a$c(e):Number(null!==(t=e$d[e].match(/\\d{1,3}/))&&void 0!==t?t:a);return m$1(this,p$3,u$8({h:s,s:i,l:n,a:r}),\"f\"),this}hueBy(e){const{h:t,s:a,l:i,a:n}=this.hsla();return m$1(this,p$3,u$8({h:a$c(t+e),s:a,l:i,a:n}),\"f\"),this}saturationTo(e){const{h:t,l:a,a:i}=this.hsla();return m$1(this,p$3,u$8({h:t,s:s$a(0,e,100),l:a,a:i}),\"f\"),this}saturateBy(e){const{h:t,s:a,l:i,a:n}=this.hsla();return m$1(this,p$3,u$8({h:t,s:s$a(0,a+e,100),l:i,a:n}),\"f\"),this}desaturateBy(e){return this.saturateBy(-1*e)}lightnessTo(e){const{h:t,s:a,a:i}=this.hsla();return m$1(this,p$3,u$8({h:t,s:a,l:s$a(0,e,100),a:i}),\"f\"),this}lighterBy(e){const{h:t,s:a,l:i,a:n}=this.hsla();return m$1(this,p$3,u$8({h:t,s:a,l:s$a(0,i+e,100),a:n}),\"f\"),this}darkerBy(e){return this.lighterBy(-1*e)}alphaTo(e){return m$1(this,p$3,Object.assign(Object.assign({},y$1(this,p$3,\"f\")),{a:s$a(0,e,1)}),\"f\"),this}alphaBy(e){return m$1(this,p$3,Object.assign(Object.assign({},y$1(this,p$3,\"f\")),{a:s$a(0,y$1(this,p$3,\"f\").a+e,1)}),\"f\"),this}invert({alpha:e=!1}={}){const{r:t,g:a,b:i,a:n}=y$1(this,p$3,\"f\");return m$1(this,p$3,{r:255-t,g:255-a,b:255-i,a:e?1-n:n},\"f\"),this}grayscale(){return this.desaturateBy(100)}rotate(e){return this.hueBy(e)}}function $(){return new w$1({r:o$b(255),g:o$b(255),b:o$b(255),a:Math.random()})}function x$1(e){(e=e.filter(((e,t,a)=>a.indexOf(e)===t))).forEach((e=>e(w$1)))}p$3=new WeakMap,v$2=new WeakMap,w$1.Parsers=[function(e){if(\"object\"===e.constructor.name.toLowerCase()&&function(e){const{r:t,g:a,b:i}=e;return void 0!==t&&void 0!==a&&void 0!==i&&\"number\"==typeof t}(e))return b$5(e);if(\"string\"==typeof e){g$2.lastIndex=0;const t=g$2.exec(e);if(t){const[e,a,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes(\"%\")?+e.slice(0,-1)*(t<3?2.55:.01):+e));return b$5({r:e,g:a,b:i,a:n})}}return[{r:0,g:0,b:0,a:1},\"invalid\"]},function(e){if(\"object\"===e.constructor.name.toLowerCase()&&function(e){const{r:t,g:a,b:i}=e;return void 0!==t&&void 0!==a&&void 0!==i&&\"string\"==typeof t}(e))return[l$5(e),\"hex\"];if(\"string\"==typeof e){c$a.lastIndex=0;const t=c$a.exec(e);if(t){const[e,a,i,n]=t.filter((e=>void 0!==e)).slice(1).map((e=>1===e.length?e.repeat(2):e));return[l$5({r:e,g:a,b:i,a:null!=n?n:\"FF\"}),\"hex\"]}}return[{r:0,g:0,b:0,a:1},\"invalid\"]},function(e){if(\"object\"===e.constructor.name.toLowerCase()&&function(e){const{h:t,s:a,l:i}=e;return void 0!==t&&void 0!==a&&void 0!==i}(e))return d$2(e);if(\"string\"==typeof e){f$3.lastIndex=0;const t=f$3.exec(e);if(t){const[e,a,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes(\"%\")?+e.slice(0,-1)*(0===t?3.59:t<3?1:.01):+e));return d$2({h:e,s:a,l:i,a:n})}}return[{r:0,g:0,b:0,a:1},\"invalid\"]}];const j$1=e=>new w$1(e);r$d.QA;var O$1=r$d.ZP,B=r$d.qt;r$d.MX;var e$c={d:(e,t)=>{for(var a in t)e$c.o(t,a)&&!e$c.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},a$b={};function t$b(e){const t=e%360;return t<0?t+360:t}e$c.d(a$b,{Z:()=>n$b});const n$b=e=>{e.prototype.harmony=function({type:t=\"analogous\",effect:a=\"tones\",amount:i=5}={}){const{h:n,s:r,l:s,a:o}=this.hsla();switch(\"monochromatic\"===t&&(l=i,i=Math.max(2,Math.min(l,10))),t){case\"analogous\":return[-30,0,30].map((t=>new e({h:t$b(n+t),s:r,l:s,a:o})));case\"complementary\":return[0,180].map((t=>new e({h:t$b(n+t),s:r,l:s,a:o})));case\"split-complementary\":return[0,150,210].map((t=>new e({h:t$b(n+t),s:r,l:s,a:o})));case\"double-split-complementary\":return[-30,0,30,150,210].map((t=>new e({h:t$b(n+t),s:r,l:s,a:o})));case\"triad\":return[0,120,240].map((t=>new e({h:t$b(n+t),s:r,l:s,a:o})));case\"rectangle\":return[0,60,180,240].map((t=>new e({h:t$b(n+t),s:r,l:s,a:o})));case\"square\":return[0,90,180,270].map((t=>new e({h:t$b(n+t),s:r,l:s,a:o})));case\"monochromatic\":{const t=\"tones\"===a?r:s;let l=(\"tints\"===a?100-t:t)/i;l=\"tints\"===a?l:-1*l;const c=[t];for(let e=0;e<i;e++)c.push(c[e]+l);return\"tones\"===a?c.map((t=>new e({h:n,s:t,l:s,a:o}))):c.map((t=>new e({h:n,s:r,l:t,a:o})))}}var l}};var r$c=a$b.Z,a$a={d:(e,t)=>{for(var a in t)a$a.o(t,a)&&!a$a.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t$a={};a$a.d(t$a,{Z:()=>k});const e$b=6/29,n$a=Math.pow(e$b,3),c$9=Math.pow(29/3,3),r$b={x:.96422,y:1,z:.82521};function u$7(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function s$9(e,t,a){return Math.max(e,Math.min(t,a))}function o$a(e){const t=e%360;return t<0?t+360:t}function l$4(e){const[t,a,i]=Object.values(e).map((e=>e/255)),n=Math.max(t,a,i),r=Math.min(t,a,i),s=n-r;return{Cmin:r,Cmax:n,H:0===s?0:n===t?(a-i)/s%6:n===a?(i-t)/s+2:(t-a)/s+4,delta:s}}function b$4(e){var t;const{Cmin:a,Cmax:i,H:n,delta:r}=l$4(e),s=(i+a)/2,o=0===r?0:r/(1-Math.abs(2*s-1));return{h:o$a(60*n),s:100*o,l:100*s,a:null!==(t=e.a)&&void 0!==t?t:1}}function h$3(e){var t;const{Cmax:a,H:i,delta:n}=l$4(e),r=0===n?0:n/a;return{h:o$a(60*i),s:100*r,v:100*a,a:null!==(t=e.a)&&void 0!==t?t:1}}function v$1(e){const{h:t,a:a}=b$4(e),{r:i,g:n,b:r}=e;return{h:t,w:Math.min(i,n,r)/2.55,b:100*(1-Math.max(i,n,r)/255),a:a}}function i$9(e){const[t,a,i]=u$7([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Object.values(e).map((e=>{return 100*(t=e,(t/=255)<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4));var t})));return function(e){const[t,a,i]=u$7([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],Object.values(e));return{x:t,y:a,z:i,a:e.a}}({x:t,y:a,z:i,a:e.a})}function m(e){const t=Object.values(i$9(e)).map(((e,t)=>e/(100*Object.values(r$b)[t]))).map((e=>e>n$a?Math.cbrt(e):(c$9*e+16)/116));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2]),alpha:e.a}}function p$2(e){const{l:t,a:a,b:i}=m(e),n=180*Math.atan2(i,a)/Math.PI;return{l:t,c:Math.sqrt(Math.pow(a,2)+Math.pow(i,2)),h:o$a(n),a:e.a}}function f$2(e){const[t,a,i]=Object.values(i$9(e)).map((e=>e/100)),n=a/r$b.y,r=t&&a&&i?t+15*a+3*i:19,s=4*t/r,o=9*a/r,l=r$b.x+15*r$b.y+3*r$b.z,c=4*r$b.x/l,d=9*r$b.y/l;let h=n>n$a?116*Math.cbrt(n)-16:c$9*n,p=13*h*(s-c),u=13*h*(o-d);return h===Number(-0)&&(h=0),p===Number(-0)&&(p=0),u===Number(-0)&&(u=0),{l:h,u:p,v:u,a:e.a}}function M(e){const{x:t,y:a,z:i}=i$9(e),[n,r,s]=u$7([[2/3,0,0],[0,1,0],[-.5,1.5,.5]],[t,a,i]);return{u:n,v:r,w:s,a:e.a}}function w(e){let{r:t,g:a,b:i}=e;const n=Math.min(t,a,i);[t,a,i]=[t,a,i].map((e=>e-n));const r=Math.max(t,a,i);let s=Math.min(t,a);t-=s,a-=s,i&&a&&(i/=2,a/=2),s+=a,i+=a;const o=Math.max(t,s,i);if(o){const e=r/o;[t,s,i]=[t,s,i].map((t=>t*e))}return[t,s,i]=[t,s,i].map((e=>e+n)),{r:t,y:s,b:i,a:e.a}}function O(e){const{r:t,g:a,b:i,a:n}=e,r=1-Math.max(t,a,i)/255,[s,o,l]=1===r?[0,0,0]:[t,a,i].map((e=>100*(1-e/255-r)/(1-r)));return{c:s,m:o,y:l,k:100*r,a:n}}function j(e){const{h:t,s:a,v:i,a:n}=e,r=i/100,s=r*(a/100),o=s*(1-Math.abs(t/60%2-1)),l=r-s,c=t<60||300<=t&&t<360?s:120<=t&&t<240?0:o,d=240<=t&&t<360?0:60<=t&&t<180?s:o,h=t<120?0:180<=t&&t<300?s:o,[p,u,m]=[c,d,h].map((e=>255*(e+l)));return{r:p,g:u,b:m,a:null!=n?n:1}}function x(e){const[t,a,i]=Object.values(function(e){const[t,a,i]=u$7([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],Object.values(e));return{x:t,y:a,z:i,a:e.a}}(e)).map((e=>e/100)),[n,r,s]=u$7([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],[t,a,i]).map((e=>{return s$9(0,255*((t=e)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t),255);var t}));return{r:n,g:r,b:s,a:e.a}}function y(e){const{l:t,a:a,b:i}=e,n=(t+16)/116,r=n+a/500,s=n-i/200,o=Object.values(r$b),[l,c,d]=[r,n,s].map(((e,t)=>(e>e$b?Math.pow(e,3):3*Math.pow(e$b,2)*(e-4/29))*o[t]*100));return x({x:l,y:c,z:d,a:e.alpha})}const k=e=>{e.prototype.mix=function({color:t=\"#fff\",ratio:a=.5,colorspace:i=\"luv\"}={}){const n=this.rgba(),r=(t instanceof e?t:new e(t)).rgba();let s,o;switch(a=s$9(0,a,1),i){case\"hsl\":s=Object.values(b$4(n)),o=Object.values(b$4(r));break;case\"hsv\":s=Object.values(h$3(n)),o=Object.values(h$3(r));break;case\"hwb\":s=Object.values(v$1(n)),o=Object.values(v$1(r));break;case\"lab\":s=Object.values(m(n)),o=Object.values(m(r));break;case\"lch\":s=Object.values(p$2(n)),o=Object.values(p$2(r));break;case\"luv\":s=Object.values(f$2(n)),o=Object.values(f$2(r));break;case\"ryb\":s=Object.values(w(n)),o=Object.values(w(r));break;case\"uvw\":s=Object.values(M(n)),o=Object.values(M(r));break;case\"xyz\":s=Object.values(i$9(n)),o=Object.values(i$9(r));break;case\"cmyk\":s=Object.values(O(n)),o=Object.values(O(r));break;default:s=Object.values(n),o=Object.values(r)}const[l,c,d,h,p]=s.map(((e,t)=>s[t]*(1-a)+o[t]*a));switch(i){case\"hsl\":return new e(function(e){const{h:t,s:a,l:i,a:n}=e,r=i/100,s=a/100,o=(1-Math.abs(2*r-1))*s,l=o*(1-Math.abs(t/60%2-1)),c=r-o/2,d=t<60||300<=t&&t<360?o:120<=t&&t<240?0:l,h=240<=t&&t<360?0:60<=t&&t<180?o:l,p=t<120?0:180<=t&&t<300?o:l,[u,m,g]=[d,h,p].map((e=>255*(e+c)));return{r:u,g:m,b:g,a:null!=n?n:1}}({h:l,s:c,l:d,a:h}));case\"hsv\":return new e(j({h:l,s:c,v:d,a:h}));case\"hwb\":return new e(function(e){const{h:t,b:a,w:i,a:n}=e;return j({h:t,s:100===a?0:100-i/(100-a)*100,v:100-a,a:n})}({h:l,w:c,b:d,a:h}));case\"lab\":return new e(y({l:l,a:c,b:d,alpha:h}));case\"lch\":return new e(function(e){const{l:t,c:a,h:i}=e;return y({l:t,a:a*Math.cos(i*Math.PI/180),b:a*Math.sin(i*Math.PI/180),alpha:e.a})}({l:l,c:c,h:d,a:h}));case\"luv\":return new e(function(e){const{l:t,u:a,v:i}=e,n=t>c$9*n$a?Math.pow((t+16)/116,3):t/c$9,r=r$b.x+15*r$b.y+3*r$b.z,s=(52*t/(a&&t?a+13*t*(4*r$b.x/r):1)-1)/3,o=-5*n,l=n*(39*t/(i&&t?i+13*t*(9*r$b.y/r):1)-5),c=s===-1/3?l-o:(l-o)/(s- -1/3);return x({x:100*c,y:100*n,z:100*(s*c+o),a:e.a})}({l:l,u:c,v:d,a:h}));case\"ryb\":return new e(function(e){let{r:t,y:a,b:i}=e;const n=Math.min(t,a,i);[t,a,i]=[t,a,i].map((e=>e-n));const r=Math.max(t,a,i);let s=Math.min(a,i);a-=s,i-=s,i&&s&&(i*=2,s*=2),t+=a,s+=a;const o=Math.max(t,s,i);if(o){const e=r/o;[t,s,i]=[t,s,i].map((t=>t*e))}return[t,s,i]=[t,s,i].map((e=>e+n)),{r:t,g:s,b:i,a:e.a}}({r:l,y:c,b:d,a:h}));case\"uvw\":return new e(function(e){const{u:t,v:a,w:i}=e,[n,r,s]=u$7([[1.5,0,0],[0,1,0],[1.5,-3,2]],[t,a,i]);return x({x:n,y:r,z:s,a:e.a})}({u:l,v:c,w:d,a:h}));case\"xyz\":return new e(x({x:l,y:c,z:d,a:h}));case\"cmyk\":return new e(function(e){const{c:t,m:a,y:i,k:n,a:r}=e,[s,o,l]=[t,a,i].map((e=>255*(1-e/100)*(1-n/100)));return{r:s,g:o,b:l,a:r}}({c:l,m:c,y:d,k:h,a:p}));default:return new e({r:l,g:c,b:d,a:h})}}};var z=t$a.Z,r$a={d:(e,t)=>{for(var a in t)r$a.o(t,a)&&!r$a.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},b$3={};r$a.d(b$3,{Z:()=>n$9});const g$1=[\"rgb(0,0,0)\",\"rgb(0,0,51)\",\"rgb(0,0,102)\",\"rgb(0,0,153)\",\"rgb(0,0,204)\",\"rgb(0,0,255)\",\"rgb(0,51,0)\",\"rgb(0,51,51)\",\"rgb(0,51,102)\",\"rgb(0,51,153)\",\"rgb(0,51,204)\",\"rgb(0,51,255)\",\"rgb(0,102,0)\",\"rgb(0,102,51)\",\"rgb(0,102,102)\",\"rgb(0,102,153)\",\"rgb(0,102,204)\",\"rgb(0,102,255)\",\"rgb(0,153,0)\",\"rgb(0,153,51)\",\"rgb(0,153,102)\",\"rgb(0,153,153)\",\"rgb(0,153,204)\",\"rgb(0,153,255)\",\"rgb(0,204,0)\",\"rgb(0,204,51)\",\"rgb(0,204,102)\",\"rgb(0,204,153)\",\"rgb(0,204,204)\",\"rgb(0,204,255)\",\"rgb(0,255,0)\",\"rgb(0,255,51)\",\"rgb(0,255,102)\",\"rgb(0,255,153)\",\"rgb(0,255,204)\",\"rgb(0,255,255)\",\"rgb(51,0,0)\",\"rgb(51,0,51)\",\"rgb(51,0,102)\",\"rgb(51,0,153)\",\"rgb(51,0,204)\",\"rgb(51,0,255)\",\"rgb(51,51,0)\",\"rgb(51,51,51)\",\"rgb(51,51,102)\",\"rgb(51,51,153)\",\"rgb(51,51,204)\",\"rgb(51,51,255)\",\"rgb(51,102,0)\",\"rgb(51,102,51)\",\"rgb(51,102,102)\",\"rgb(51,102,153)\",\"rgb(51,102,204)\",\"rgb(51,102,255)\",\"rgb(51,153,0)\",\"rgb(51,153,51)\",\"rgb(51,153,102)\",\"rgb(51,153,153)\",\"rgb(51,153,204)\",\"rgb(51,153,255)\",\"rgb(51,204,0)\",\"rgb(51,204,51)\",\"rgb(51,204,102)\",\"rgb(51,204,153)\",\"rgb(51,204,204)\",\"rgb(51,204,255)\",\"rgb(51,255,0)\",\"rgb(51,255,51)\",\"rgb(51,255,102)\",\"rgb(51,255,153)\",\"rgb(51,255,204)\",\"rgb(51,255,255)\",\"rgb(102,0,0)\",\"rgb(102,0,51)\",\"rgb(102,0,102)\",\"rgb(102,0,153)\",\"rgb(102,0,204)\",\"rgb(102,0,255)\",\"rgb(102,51,0)\",\"rgb(102,51,51)\",\"rgb(102,51,102)\",\"rgb(102,51,153)\",\"rgb(102,51,204)\",\"rgb(102,51,255)\",\"rgb(102,102,0)\",\"rgb(102,102,51)\",\"rgb(102,102,102)\",\"rgb(102,102,153)\",\"rgb(102,102,204)\",\"rgb(102,102,255)\",\"rgb(102,153,0)\",\"rgb(102,153,51)\",\"rgb(102,153,102)\",\"rgb(102,153,153)\",\"rgb(102,153,204)\",\"rgb(102,153,255)\",\"rgb(102,204,0)\",\"rgb(102,204,51)\",\"rgb(102,204,102)\",\"rgb(102,204,153)\",\"rgb(102,204,204)\",\"rgb(102,204,255)\",\"rgb(102,255,0)\",\"rgb(102,255,51)\",\"rgb(102,255,102)\",\"rgb(102,255,153)\",\"rgb(102,255,204)\",\"rgb(102,255,255)\",\"rgb(153,0,0)\",\"rgb(153,0,51)\",\"rgb(153,0,102)\",\"rgb(153,0,153)\",\"rgb(153,0,204)\",\"rgb(153,0,255)\",\"rgb(153,51,0)\",\"rgb(153,51,51)\",\"rgb(153,51,102)\",\"rgb(153,51,153)\",\"rgb(153,51,204)\",\"rgb(153,51,255)\",\"rgb(153,102,0)\",\"rgb(153,102,51)\",\"rgb(153,102,102)\",\"rgb(153,102,153)\",\"rgb(153,102,204)\",\"rgb(153,102,255)\",\"rgb(153,153,0)\",\"rgb(153,153,51)\",\"rgb(153,153,102)\",\"rgb(153,153,153)\",\"rgb(153,153,204)\",\"rgb(153,153,255)\",\"rgb(153,204,0)\",\"rgb(153,204,51)\",\"rgb(153,204,102)\",\"rgb(153,204,153)\",\"rgb(153,204,204)\",\"rgb(153,204,255)\",\"rgb(153,255,0)\",\"rgb(153,255,51)\",\"rgb(153,255,102)\",\"rgb(153,255,153)\",\"rgb(153,255,204)\",\"rgb(153,255,255)\",\"rgb(204,0,0)\",\"rgb(204,0,51)\",\"rgb(204,0,102)\",\"rgb(204,0,153)\",\"rgb(204,0,204)\",\"rgb(204,0,255)\",\"rgb(204,51,0)\",\"rgb(204,51,51)\",\"rgb(204,51,102)\",\"rgb(204,51,153)\",\"rgb(204,51,204)\",\"rgb(204,51,255)\",\"rgb(204,102,0)\",\"rgb(204,102,51)\",\"rgb(204,102,102)\",\"rgb(204,102,153)\",\"rgb(204,102,204)\",\"rgb(204,102,255)\",\"rgb(204,153,0)\",\"rgb(204,153,51)\",\"rgb(204,153,102)\",\"rgb(204,153,153)\",\"rgb(204,153,204)\",\"rgb(204,153,255)\",\"rgb(204,204,0)\",\"rgb(204,204,51)\",\"rgb(204,204,102)\",\"rgb(204,204,153)\",\"rgb(204,204,204)\",\"rgb(204,204,255)\",\"rgb(204,255,0)\",\"rgb(204,255,51)\",\"rgb(204,255,102)\",\"rgb(204,255,153)\",\"rgb(204,255,204)\",\"rgb(204,255,255)\",\"rgb(255,0,0)\",\"rgb(255,0,51)\",\"rgb(255,0,102)\",\"rgb(255,0,153)\",\"rgb(255,0,204)\",\"rgb(255,0,255)\",\"rgb(255,51,0)\",\"rgb(255,51,51)\",\"rgb(255,51,102)\",\"rgb(255,51,153)\",\"rgb(255,51,204)\",\"rgb(255,51,255)\",\"rgb(255,102,0)\",\"rgb(255,102,51)\",\"rgb(255,102,102)\",\"rgb(255,102,153)\",\"rgb(255,102,204)\",\"rgb(255,102,255)\",\"rgb(255,153,0)\",\"rgb(255,153,51)\",\"rgb(255,153,102)\",\"rgb(255,153,153)\",\"rgb(255,153,204)\",\"rgb(255,153,255)\",\"rgb(255,204,0)\",\"rgb(255,204,51)\",\"rgb(255,204,102)\",\"rgb(255,204,153)\",\"rgb(255,204,204)\",\"rgb(255,204,255)\",\"rgb(255,255,0)\",\"rgb(255,255,51)\",\"rgb(255,255,102)\",\"rgb(255,255,153)\",\"rgb(255,255,204)\",\"rgb(255,255,255)\"];function t$9(e){return(e/=255)<.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function o$9(e,t=[0,0,0,1]){var a,i;return null!==(i=null===(a=e.match(/\\d{1,3}/g))||void 0===a?void 0:a.map((e=>+e)))&&void 0!==i?i:t}const n$9=e=>{e.prototype.brightness=function({precision:e=4,percentage:t=!1}={}){const{r:a,g:i,b:n}=this.rgba(),r=+((.299*a+.587*i+.114*n)/255).toFixed(e);return t?100*r:r},e.prototype.luminance=function({precision:e=4,percentage:t=!1}={}){const{r:a,g:i,b:n}=this.rgba(),r=+(.2126*t$9(a)+.7152*t$9(i)+.0722*t$9(n)).toFixed(e);return t?100*r:r},e.prototype.contrast=function({bgColor:t=\"#fff\",precision:a=4,ratio:i=!1}={}){const n=this.luminance(),r=(t instanceof e?t:new e(t)).luminance(),s=((Math.max(n,r)+.05)/(Math.min(n,r)+.05)).toFixed(a);return i?s+\":1\":+s},e.prototype.readableOn=function({bgColor:e=\"#fff\",size:t=\"body\",level:a=\"minimum\"}={}){const i=this.contrast({bgColor:e});return\"body\"===t&&\"enhanced\"===a?i>=7:\"large\"===t&&\"minimum\"===a?i>=3:i>=4.5},e.prototype.equalTo=function(t=\"#fff\"){const a=Object.values(this.rgba()),i=Object.values((t instanceof e?t:new e(t)).rgba());return a.toString()===i.toString()},e.prototype.isLight=function(){return this.brightness()>=.5},e.prototype.isDark=function(){return!this.isLight()},e.prototype.isCool=function(){const{h:e}=this.hsla();return 75<=e&&e<255},e.prototype.isWarm=function(){return!this.isCool()},e.prototype.isTinted=function(){return this.hsla().l>50},e.prototype.isShaded=function(){return this.hsla().l<50},e.prototype.isToned=function(){return this.hsla().s<100},e.prototype.isPureHue=function({reason:e=!0}={}){return this.isTinted()?!!e&&{pure:!1,reason:\"tinted\"}:this.isShaded()?!!e&&{pure:!1,reason:\"shaded\"}:this.isToned()?!!e&&{pure:!1,reason:\"toned\"}:!e||{pure:!0,reason:\"N/A\"}},e.prototype.closestCool=function(){const{h:e}=this.hsla();return this.isCool()?this:this.hueTo(e<75?75:254)},e.prototype.closestWarm=function(){const{h:e}=this.hsla();return this.isWarm()?this:this.hueTo(e<165?74:255)},e.prototype.closestPureHue=function(){const{h:t,a:a}=this.hsla(),{r:i,g:n,b:r,a:s}=function(e){const{h:t,s:a,l:i,a:n}=e,r=i/100,s=a/100,o=(1-Math.abs(2*r-1))*s,l=o*(1-Math.abs(t/60%2-1)),c=r-o/2,d=t<60||300<=t&&t<360?o:120<=t&&t<240?0:l,h=240<=t&&t<360?0:60<=t&&t<180?o:l,p=t<120?0:180<=t&&t<300?o:l,[u,m,g]=[d,h,p].map((e=>255*(e+c)));return{r:u,g:m,b:g,a:null!=n?n:1}}({h:t,s:100,l:50,a:a});return new e({r:i,g:n,b:r,a:s})},e.prototype.closestWebSafe=function(){const{r:t,g:a,b:i,a:n}=this.rgba();let[r,s,o]=new Array(3).fill(0),l=Number.POSITIVE_INFINITY,c={r:t,g:a,b:i,a:n};for(let e=0;e<g$1.length;e++){[r,s,o]=o$9(g$1[e],[r,s,o]);const p=(d=[r,s,o],h=[t,a,i],Math.abs(d[0]-h[0])+Math.abs(d[1]-h[1])+Math.abs(d[2]-h[2]));p<l&&(l=p,c={r:r,g:s,b:o,a:n})}var d,h;return new e(c)}};var e$a=b$3.Z,r$9={d:(e,t)=>{for(var a in t)r$9.o(t,a)&&!r$9.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},g={};r$9.d(g,{Z:()=>a$9});const e$9={maroon:\"rgb(128,0,0)\",\"dark red\":\"rgb(139,0,0)\",brown:\"rgb(165,42,42)\",firebrick:\"rgb(178,34,34)\",crimson:\"rgb(220,20,60)\",red:\"rgb(255,0,0)\",tomato:\"rgb(255,99,71)\",coral:\"rgb(255,127,80)\",\"indian red\":\"rgb(205,92,92)\",\"light coral\":\"rgb(240,128,128)\",\"dark salmon\":\"rgb(233,150,122)\",salmon:\"rgb(250,128,114)\",\"light salmon\":\"rgb(255,160,122)\",\"orange red\":\"rgb(255,69,0)\",\"dark orange\":\"rgb(255,140,0)\",orange:\"rgb(255,165,0)\",gold:\"rgb(255,215,0)\",\"dark golden rod\":\"rgb(184,134,11)\",\"golden rod\":\"rgb(218,165,32)\",\"pale golden rod\":\"rgb(238,232,170)\",\"dark khaki\":\"rgb(189,183,107)\",khaki:\"rgb(240,230,140)\",olive:\"rgb(128,128,0)\",yellow:\"rgb(255,255,0)\",\"yellow green\":\"rgb(154,205,50)\",\"dark olive green\":\"rgb(85,107,47)\",\"olive drab\":\"rgb(107,142,35)\",\"lawn green\":\"rgb(124,252,0)\",\"chart reuse\":\"rgb(127,255,0)\",\"green yellow\":\"rgb(173,255,47)\",\"dark green\":\"rgb(0,100,0)\",green:\"rgb(0,128,0)\",\"forest green\":\"rgb(34,139,34)\",lime:\"rgb(0,255,0)\",\"lime green\":\"rgb(50,205,50)\",\"light green\":\"rgb(144,238,144)\",\"pale green\":\"rgb(152,251,152)\",\"dark sea green\":\"rgb(143,188,143)\",\"medium spring green\":\"rgb(0,250,154)\",\"spring green\":\"rgb(0,255,127)\",\"sea green\":\"rgb(46,139,87)\",\"medium aqua marine\":\"rgb(102,205,170)\",\"medium sea green\":\"rgb(60,179,113)\",\"light sea green\":\"rgb(32,178,170)\",\"dark slate gray\":\"rgb(47,79,79)\",teal:\"rgb(0,128,128)\",\"dark cyan\":\"rgb(0,139,139)\",cyan:\"rgb(0,255,255)\",aqua:\"rgb(0,255,255)\",\"light cyan\":\"rgb(224,255,255)\",\"dark turquoise\":\"rgb(0,206,209)\",turquoise:\"rgb(64,224,208)\",\"medium turquoise\":\"rgb(72,209,204)\",\"pale turquoise\":\"rgb(175,238,238)\",\"aqua marine\":\"rgb(127,255,212)\",\"powder blue\":\"rgb(176,224,230)\",\"cadet blue\":\"rgb(95,158,160)\",\"steel blue\":\"rgb(70,130,180)\",\"corn flower blue\":\"rgb(100,149,237)\",\"deep sky blue\":\"rgb(0,191,255)\",\"dodger blue\":\"rgb(30,144,255)\",\"light blue\":\"rgb(173,216,230)\",\"sky blue\":\"rgb(135,206,235)\",\"light sky blue\":\"rgb(135,206,250)\",\"midnight blue\":\"rgb(25,25,112)\",navy:\"rgb(0,0,128)\",\"dark blue\":\"rgb(0,0,139)\",\"medium blue\":\"rgb(0,0,205)\",blue:\"rgb(0,0,255)\",\"royal blue\":\"rgb(65,105,225)\",\"blue violet\":\"rgb(138,43,226)\",indigo:\"rgb(75,0,130)\",\"dark slate blue\":\"rgb(72,61,139)\",\"slate blue\":\"rgb(106,90,205)\",\"medium slate blue\":\"rgb(123,104,238)\",\"medium purple\":\"rgb(147,112,219)\",\"dark magenta\":\"rgb(139,0,139)\",\"dark violet\":\"rgb(148,0,211)\",\"dark orchid\":\"rgb(153,50,204)\",\"medium orchid\":\"rgb(186,85,211)\",purple:\"rgb(128,0,128)\",thistle:\"rgb(216,191,216)\",plum:\"rgb(221,160,221)\",violet:\"rgb(238,130,238)\",magenta:\"rgb(255,0,255)\",fuchsia:\"rgb(255,0,255)\",orchid:\"rgb(218,112,214)\",\"medium violet red\":\"rgb(199,21,133)\",\"pale violet red\":\"rgb(219,112,147)\",\"deep pink\":\"rgb(255,20,147)\",\"hot pink\":\"rgb(255,105,180)\",\"light pink\":\"rgb(255,182,193)\",pink:\"rgb(255,192,203)\",\"antique white\":\"rgb(250,235,215)\",beige:\"rgb(245,245,220)\",bisque:\"rgb(255,228,196)\",\"blanched almond\":\"rgb(255,235,205)\",wheat:\"rgb(245,222,179)\",\"corn silk\":\"rgb(255,248,220)\",\"lemon chiffon\":\"rgb(255,250,205)\",\"light golden rod yellow\":\"rgb(250,250,210)\",\"light yellow\":\"rgb(255,255,224)\",\"saddle brown\":\"rgb(139,69,19)\",sienna:\"rgb(160,82,45)\",chocolate:\"rgb(210,105,30)\",peru:\"rgb(205,133,63)\",\"sandy brown\":\"rgb(244,164,96)\",\"burly wood\":\"rgb(222,184,135)\",tan:\"rgb(210,180,140)\",\"rosy brown\":\"rgb(188,143,143)\",moccasin:\"rgb(255,228,181)\",\"navajo white\":\"rgb(255,222,173)\",\"peach puff\":\"rgb(255,218,185)\",\"misty rose\":\"rgb(255,228,225)\",\"lavender blush\":\"rgb(255,240,245)\",linen:\"rgb(250,240,230)\",\"old lace\":\"rgb(253,245,230)\",\"papaya whip\":\"rgb(255,239,213)\",\"sea shell\":\"rgb(255,245,238)\",\"mint cream\":\"rgb(245,255,250)\",\"slate gray\":\"rgb(112,128,144)\",\"light slate gray\":\"rgb(119,136,153)\",\"light steel blue\":\"rgb(176,196,222)\",lavender:\"rgb(230,230,250)\",\"floral white\":\"rgb(255,250,240)\",\"alice blue\":\"rgb(240,248,255)\",\"ghost white\":\"rgb(248,248,255)\",honeydew:\"rgb(240,255,240)\",ivory:\"rgb(255,255,240)\",azure:\"rgb(240,255,255)\",snow:\"rgb(255,250,250)\",black:\"rgb(0,0,0)\",\"dim gray\":\"rgb(105,105,105)\",\"dim grey\":\"rgb(105,105,105)\",gray:\"rgb(128,128,128)\",grey:\"rgb(128,128,128)\",\"dark gray\":\"rgb(169,169,169)\",\"dark grey\":\"rgb(169,169,169)\",silver:\"rgb(192,192,192)\",\"light gray\":\"rgb(211,211,211)\",\"light grey\":\"rgb(211,211,211)\",gainsboro:\"rgb(220,220,220)\",gainsborough:\"rgb(220,220,220)\",\"white smoke\":\"rgb(245,245,245)\",white:\"rgb(255,255,255)\",transparent:\"rgba(0,0,0,0)\"};function b$2(e,t=[0,0,0,1]){var a,i;return null!==(i=null===(a=e.match(/\\d{1,3}/g))||void 0===a?void 0:a.map((e=>+e)))&&void 0!==i?i:t}const a$9=e=>{e.prototype.name=function({exact:e=!0}={}){const{r:t,g:a,b:i,a:n}=this.rgba();if(0===n)return\"transparent\";const[r,s]=[Object.keys(e$9),Object.values(e$9)];let o;if(e){const e=this.stringRGB({alpha:!1}).replace(/\\s/g,\"\");o=r.find((t=>e$9[t]===e))}else{let e=Number.POSITIVE_INFINITY;for(let n=0;n<s.length;n++){const d=(l=b$2(s[n]),c=[t,a,i],Math.abs(l[0]-c[0])+Math.abs(l[1]-c[1])+Math.abs(l[2]-c[2]));d<e&&(e=d,o=r[n])}}var l,c;return o?o+(n<1?\" (with opacity)\":\"\"):\"undefined\"},e.Parsers.push((function(e){if(Object.keys(e$9).includes(e)){const[t,a,i,n]=b$2(e$9[e]);return[{r:t,g:a,b:i,a:null!=n?n:1},\"name\"]}return[{r:0,g:0,b:0,a:1},\"invalid\"]}))};var l$3=g.Z,t$8={d:(e,t)=>{for(var a in t)t$8.o(t,a)&&!t$8.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},a$8={};t$8.d(a$8,{Z:()=>d$1});const n$8=6/29,r$8=Math.pow(n$8,3),o$8=Math.pow(29/3,3),e$8={x:.96422,y:1,z:.82521};function c$8(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function s$8(e,t,a){return Math.max(e,Math.min(t,a))}function u$6(e){const t=e%360;return t<0?t+360:t}function i$8(e){const{l:t,a:a,b:i}=function(e){const t=Object.values(function(e){const[t,a,i]=c$8([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Object.values(e).map((e=>{return 100*(t=e,(t/=255)<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4));var t})));return function(e){const[t,a,i]=c$8([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],Object.values(e));return{x:t,y:a,z:i,a:e.a}}({x:t,y:a,z:i,a:e.a})}(e)).map(((e,t)=>e/(100*Object.values(e$8)[t]))).map((e=>e>r$8?Math.cbrt(e):(o$8*e+16)/116));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2]),alpha:e.a}}(e),n=180*Math.atan2(i,a)/Math.PI;return{l:t,c:Math.sqrt(Math.pow(a,2)+Math.pow(i,2)),h:u$6(n),a:e.a}}function h$2(e){const{l:t,c:a,h:i}=e;return function(e){const{l:t,a:a,b:i}=e,n=(t+16)/116,r=n+a/500,s=n-i/200,o=Object.values(e$8),[l,c,d]=[r,n,s].map(((e,t)=>(e>n$8?Math.pow(e,3):3*Math.pow(n$8,2)*(e-4/29))*o[t]*100));return function(e){const[t,a,i]=Object.values(function(e){const[t,a,i]=c$8([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],Object.values(e));return{x:t,y:a,z:i,a:e.a}}(e)).map((e=>e/100)),[n,r,s]=c$8([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],[t,a,i]).map((e=>{return s$8(0,255*((t=e)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t),255);var t}));return{r:n,g:r,b:s,a:e.a}}({x:l,y:c,z:d,a:e.alpha})}({l:t,a:a*Math.cos(i*Math.PI/180),b:a*Math.sin(i*Math.PI/180),alpha:e.a})}const l$2=/lcha?\\s*\\(\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*([+-]?\\d*\\.?\\d+%?)\\s*,?\\s*\\/?\\s*?(\\d*\\.?\\d+%?)?\\s*\\)/gi;function p$1({l:e,c:t,h:a,a:i}){return[h$2({l:s$8(0,e,100),c:s$8(0,t,230),h:u$6(a),a:(n=i,void 0!==n?s$8(0,n,1):1)}),\"lch\"];var n}function f$1(e){if(\"object\"===e.constructor.name.toLowerCase()&&function(e){const{l:t,c:a,h:i}=e;return void 0!==t&&void 0!==a&&void 0!==i}(e))return p$1(e);if(\"string\"==typeof e){l$2.lastIndex=0;const t=l$2.exec(e);if(t){const[e,a,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes(\"%\")?+e.slice(0,-1)*(0===t?1:1===t?2.3:2===t?3.59:.01):+e));return p$1({l:e,c:a,h:i,a:n})}}return[{r:0,g:0,b:0,a:1},\"invalid\"]}const d$1=e=>{e.prototype.lcha=function(){return i$8(this.rgba())},e.prototype.stringLCH=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[a,i,n,r]=Object.values(this.lcha()).map(((e,a)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[a])));return e?`lcha(${a}%, ${i}, ${n}, ${r})`:`lch(${a}%, ${i}, ${n})`},e.Parsers.push(f$1)};var b$1=a$8.Z,t$7={d:(e,t)=>{for(var a in t)t$7.o(t,a)&&!t$7.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},n$7={};t$7.d(n$7,{Z:()=>l$1});const r$7=Math.pow(6/29,3),e$7=Math.pow(29/3,3);function o$7(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function a$7(e,t,a){return Math.max(e,Math.min(t,a))}function u$5(e){const{l:t,u:a,v:i}=e,n=t>e$7*r$7?Math.pow((t+16)/116,3):t/e$7,r=(52*t/(a&&t?a+13*t*.20916005282038627:1)-1)/3,s=-5*n,o=n*(39*t/(i&&t?i+13*t*(9/18.43985):1)-5),l=r===-1/3?o-s:(o-s)/(r- -1/3);return function(e){const[t,a,i]=Object.values(function(e){const[t,a,i]=o$7([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],Object.values(e));return{x:t,y:a,z:i,a:e.a}}(e)).map((e=>e/100)),[n,r,s]=o$7([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],[t,a,i]).map((e=>{return a$7(0,255*((t=e)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t),255);var t}));return{r:n,g:r,b:s,a:e.a}}({x:100*l,y:100*n,z:100*(r*l+s),a:e.a})}const c$7=/color\\s*\\(\\s*luva?\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*([+-]?\\d*\\.?\\d+%?)\\s*,?\\s*([+-]?\\d*\\.?\\d+%?)\\s*,?\\s*\\/?\\s*?(\\d*\\.?\\d+%?)?\\s*\\)/gi;function s$7({l:e,u:t,v:a,a:i}){return[u$5({l:a$7(0,e,100),u:a$7(-100,t,100),v:a$7(-100,a,100),a:(n=i,void 0!==n?a$7(0,n,1):1)}),\"luv\"];var n}function i$7(e){if(\"object\"===e.constructor.name.toLowerCase()&&function(e){const{l:t,u:a,v:i}=e;return void 0!==t&&void 0!==a&&null!=i}(e))return s$7(e);if(\"string\"==typeof e){c$7.lastIndex=0;const t=c$7.exec(e);if(t){const[e,a,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes(\"%\")?+e.slice(0,-1)*(t<3?1:.01):+e));return s$7({l:e,u:a,v:i,a:n})}}return[{r:0,g:0,b:0,a:1},\"invalid\"]}const l$1=e=>{e.prototype.luva=function(){return function(e){const[t,a,i]=Object.values(function(e){const[t,a,i]=o$7([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Object.values(e).map((e=>{return 100*(t=e,(t/=255)<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4));var t})));return function(e){const[t,a,i]=o$7([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],Object.values(e));return{x:t,y:a,z:i,a:e.a}}({x:t,y:a,z:i,a:e.a})}(e)).map((e=>e/100)),n=a/1,r=t&&a&&i?t+15*a+3*i:19,s=4*t/r,o=9*a/r;let l=n>r$7?116*Math.cbrt(n)-16:e$7*n,c=13*l*(s-.20916005282038627),d=13*l*(o-.48807338454488514);return l===Number(-0)&&(l=0),c===Number(-0)&&(c=0),d===Number(-0)&&(d=0),{l:l,u:c,v:d,a:e.a}}(this.rgba())},e.prototype.stringLUV=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[a,i,n,r]=Object.values(this.luva()).map(((e,a)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[a])));return e?`color(luva ${a}%, ${i}%, ${n}%, ${r})`:`color(luv ${a}%, ${i}%, ${n}%)`},e.Parsers.push(i$7)};var v=n$7.Z,t$6={d:(e,t)=>{for(var a in t)t$6.o(t,a)&&!t$6.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},a$6={};t$6.d(a$6,{Z:()=>d});const n$6=6/29,r$6=Math.pow(n$6,3),e$6=Math.pow(29/3,3),o$6={x:.96422,y:1,z:.82521};function c$6(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function s$6(e,t,a){return Math.max(e,Math.min(t,a))}function u$4(e){return void 0!==e?s$6(0,e,1):1}function i$6(e){const t=Object.values(function(e){const[t,a,i]=c$6([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Object.values(e).map((e=>{return 100*(t=e,(t/=255)<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4));var t})));return function(e){const[t,a,i]=c$6([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],Object.values(e));return{x:t,y:a,z:i,a:e.a}}({x:t,y:a,z:i,a:e.a})}(e)).map(((e,t)=>e/(100*Object.values(o$6)[t]))).map((e=>e>r$6?Math.cbrt(e):(e$6*e+16)/116));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2]),alpha:e.a}}function l(e){const{l:t,a:a,b:i}=e,n=(t+16)/116,r=n+a/500,s=n-i/200,o=Object.values(o$6),[l,c,d]=[r,n,s].map(((e,t)=>(e>n$6?Math.pow(e,3):3*Math.pow(n$6,2)*(e-4/29))*o[t]*100));return function(e){const[t,a,i]=Object.values(function(e){const[t,a,i]=c$6([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],Object.values(e));return{x:t,y:a,z:i,a:e.a}}(e)).map((e=>e/100)),[n,r,s]=c$6([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],[t,a,i]).map((e=>{return s$6(0,255*((t=e)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t),255);var t}));return{r:n,g:r,b:s,a:e.a}}({x:l,y:c,z:d,a:e.alpha})}const p=/laba?\\s*\\(\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*([+-]?\\d*\\.?\\d+)\\s*,?\\s*([+-]?\\d*\\.?\\d+)\\s*,?\\s*\\/?\\s*?(\\d*\\.?\\d+%?)?\\s*\\)/gi;function b({l:e,a:t,b:a,alpha:i}){return[l({l:s$6(0,e,100),a:s$6(-160,t,160),b:s$6(-160,a,160),alpha:u$4(i)}),\"lab\"]}function f(e){if(\"object\"===e.constructor.name.toLowerCase()&&function(e){const{l:t,a:a,b:i}=e;return void 0!==t&&void 0!==a&&void 0!==i}(e))return b(e);if(\"string\"==typeof e){p.lastIndex=0;const t=p.exec(e);if(t){const[e,a,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes(\"%\")?+e.slice(0,-1)*(t<3?1:.01):+e));return b({l:e,a:a,b:i,alpha:n})}}return[{r:0,g:0,b:0,a:1},\"invalid\"]}const d=e=>{e.prototype.laba=function(){return i$6(this.rgba())},e.prototype.stringLAB=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[a,i,n,r]=Object.values(this.laba()).map(((e,a)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[a])));return e?`laba(${a}%, ${i}, ${n}, ${r})`:`lab(${a}%, ${i}, ${n})`},e.Parsers.push(f)};var h$1=a$6.Z,t$5={d:(e,t)=>{for(var a in t)t$5.o(t,a)&&!t$5.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},n$5={};function r$5(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function o$5(e,t,a){return Math.max(e,Math.min(t,a))}function e$5(e){const{u:t,v:a,w:i}=e,[n,r,s]=r$5([[1.5,0,0],[0,1,0],[1.5,-3,2]],[t,a,i]);return function(e){const[t,a,i]=Object.values(function(e){const[t,a,i]=r$5([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],Object.values(e));return{x:t,y:a,z:i,a:e.a}}(e)).map((e=>e/100)),[n,r,s]=r$5([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],[t,a,i]).map((e=>{return o$5(0,255*((t=e)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t),255);var t}));return{r:n,g:r,b:s,a:e.a}}({x:n,y:r,z:s,a:e.a})}t$5.d(n$5,{Z:()=>s$5});const a$5=/color\\s*\\(\\s*uvwa?\\s*(\\d*\\.?\\d+)\\s*,?\\s*([+-]?\\d*\\.?\\d+)\\s*,?\\s*([+-]?\\d*\\.?\\d+)\\s*,?\\s*\\/?\\s*?(\\d*\\.?\\d+%?)?\\s*\\)/gi;function u$3({u:e,v:t,w:a,a:i}){return[e$5({u:o$5(0,e,200/3*.96422),v:o$5(0,t,100),w:o$5(-48.211,a,191.2605),a:(n=i,void 0!==n?o$5(0,n,1):1)}),\"uvw\"];var n}function c$5(e){if(\"object\"===e.constructor.name.toLowerCase()&&function(e){const{u:t,v:a,w:i}=e;return void 0!==t&&void 0!==a&&void 0!==i}(e))return u$3(e);if(\"string\"==typeof e){a$5.lastIndex=0;const t=a$5.exec(e);if(t){const[e,a,i,n]=t.filter((e=>void 0!==e)).slice(1).map((e=>e.includes(\"%\")?.01*+e.slice(0,-1):+e));return u$3({u:e,v:a,w:i,a:n})}}return[{r:0,g:0,b:0,a:1},\"invalid\"]}const s$5=e=>{e.prototype.uvwa=function(){return function(e){const{x:t,y:a,z:i}=function(e){const[t,a,i]=r$5([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Object.values(e).map((e=>{return 100*(t=e,(t/=255)<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4));var t})));return function(e){const[t,a,i]=r$5([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],Object.values(e));return{x:t,y:a,z:i,a:e.a}}({x:t,y:a,z:i,a:e.a})}(e),[n,r,s]=r$5([[2/3,0,0],[0,1,0],[-.5,1.5,.5]],[t,a,i]);return{u:n,v:r,w:s,a:e.a}}(this.rgba())},e.prototype.stringUVW=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[a,i,n,r]=Object.values(this.uvwa()).map(((e,a)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[a])));return e?`color(uvwa ${a}, ${i}, ${n}, ${r})`:`color(uvw ${a}, ${i}, ${n})`},e.Parsers.push(c$5)};var i$5=n$5.Z,t$4={d:(e,t)=>{for(var a in t)t$4.o(t,a)&&!t$4.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},n$4={};function r$4(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function o$4(e,t,a){return Math.max(e,Math.min(t,a))}function e$4(e){const[t,a,i]=Object.values(function(e){const[t,a,i]=r$4([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],Object.values(e));return{x:t,y:a,z:i,a:e.a}}(e)).map((e=>e/100)),[n,r,s]=r$4([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],[t,a,i]).map((e=>{return o$4(0,255*((t=e)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t),255);var t}));return{r:n,g:r,b:s,a:e.a}}t$4.d(n$4,{Z:()=>u$2});const a$4=/color\\s*\\(\\s*xyza?\\s*(\\d*\\.?\\d+)\\s*,?\\s*(\\d*\\.?\\d+)\\s*,?\\s*(\\d*\\.?\\d+)\\s*,?\\s*\\/?\\s*?(\\d*\\.?\\d+%?)?\\s*\\)/gi;function s$4({x:e,y:t,z:a,a:i}){return[e$4({x:o$4(0,e,96.422),y:o$4(0,t,100),z:o$4(0,a,82.521),a:(n=i,void 0!==n?o$4(0,n,1):1)}),\"xyz\"];var n}function c$4(e){if(\"object\"===e.constructor.name.toLowerCase()&&function(e){const{x:t,y:a,z:i}=e;return void 0!==t&&void 0!==a&&void 0!==i}(e))return s$4(e);if(\"string\"==typeof e){a$4.lastIndex=0;const t=a$4.exec(e);if(t){const[e,a,i,n]=t.filter((e=>void 0!==e)).slice(1).map((e=>e.includes(\"%\")?.01*+e.slice(0,-1):+e));return s$4({x:e,y:a,z:i,a:n})}}return[{r:0,g:0,b:0,a:1},\"invalid\"]}const u$2=e=>{e.prototype.xyza=function(){return function(e){const[t,a,i]=r$4([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Object.values(e).map((e=>{return 100*(t=e,(t/=255)<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4));var t})));return function(e){const[t,a,i]=r$4([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],Object.values(e));return{x:t,y:a,z:i,a:e.a}}({x:t,y:a,z:i,a:e.a})}(this.rgba())},e.prototype.stringXYZ=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[a,i,n,r]=Object.values(this.xyza()).map(((e,a)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[a])));return e?`color(xyza ${a}, ${i}, ${n}, ${r})`:`color(xyz ${a}, ${i}, ${n})`},e.Parsers.push(c$4)};var i$4=n$4.Z,t$3={d:(e,t)=>{for(var a in t)t$3.o(t,a)&&!t$3.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},n$3={};function r$3(e,t,a){return Math.max(e,Math.min(t,a))}function a$3(e){const t=e%360;return t<0?t+360:t}function o$3(e){const{h:t,a:a}=function(e){var t;const{Cmin:a,Cmax:i,H:n,delta:r}=function(e){const[t,a,i]=Object.values(e).map((e=>e/255)),n=Math.max(t,a,i),r=Math.min(t,a,i),s=n-r;return{Cmin:r,Cmax:n,H:0===s?0:n===t?(a-i)/s%6:n===a?(i-t)/s+2:(t-a)/s+4,delta:s}}(e),s=(i+a)/2,o=0===r?0:r/(1-Math.abs(2*s-1));return{h:a$3(60*n),s:100*o,l:100*s,a:null!==(t=e.a)&&void 0!==t?t:1}}(e),{r:i,g:n,b:r}=e;return{h:t,w:Math.min(i,n,r)/2.55,b:100*(1-Math.max(i,n,r)/255),a:a}}function e$3(e){const{h:t,b:a,w:i,a:n}=e;return function(e){const{h:t,s:a,v:i,a:n}=e,r=i/100,s=r*(a/100),o=s*(1-Math.abs(t/60%2-1)),l=r-s,c=t<60||300<=t&&t<360?s:120<=t&&t<240?0:o,d=240<=t&&t<360?0:60<=t&&t<180?s:o,h=t<120?0:180<=t&&t<300?s:o,[p,u,m]=[c,d,h].map((e=>255*(e+l)));return{r:p,g:u,b:m,a:null!=n?n:1}}({h:t,s:100===a?0:100-i/(100-a)*100,v:100-a,a:n})}t$3.d(n$3,{Z:()=>u$1});const s$3=/hwba?\\s*\\(\\s*([+-]?\\d*\\.?\\d+%?)\\s*,?\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*\\/?\\s*?(\\d*\\.?\\d+%?)?\\s*\\)/gi;function i$3({h:e,w:t,b:a,a:i}){return[e$3({h:a$3(e),w:r$3(0,t,100),b:r$3(0,a,100),a:(n=i,void 0!==n?r$3(0,n,1):1)}),\"hwb\"];var n}function c$3(e){if(\"object\"===e.constructor.name.toLowerCase()&&function(e){const{h:t,w:a,b:i}=e;return void 0!==t&&void 0!==a&&void 0!==i}(e))return i$3(e);if(\"string\"==typeof e){s$3.lastIndex=0;const t=s$3.exec(e);if(t){const[e,a,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes(\"%\")?+e.slice(0,-1)*(0===t?3.59:t<3?1:.01):+e));return i$3({h:e,w:a,b:i,a:n})}}return[{r:0,g:0,b:0,a:1},\"invalid\"]}const u$1=e=>{e.prototype.hwba=function(){return o$3(this.rgba())},e.prototype.stringHWB=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[a,i,n,r]=Object.values(this.hwba()).map(((e,a)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[a])));return e?`hwba(${a$3(a)}, ${i}%, ${n}%, ${r})`:`hwb(${a$3(a)}, ${i}%, ${n}%)`},e.Parsers.push(c$3)};var h=n$3.Z,t$2={d:(e,t)=>{for(var a in t)t$2.o(t,a)&&!t$2.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},n$2={};function r$2(e,t,a){return Math.max(e,Math.min(t,a))}function s$2(e){const t=e%360;return t<0?t+360:t}function e$2(e){const{h:t,s:a,v:i,a:n}=e,r=i/100,s=r*(a/100),o=s*(1-Math.abs(t/60%2-1)),l=r-s,c=t<60||300<=t&&t<360?s:120<=t&&t<240?0:o,d=240<=t&&t<360?0:60<=t&&t<180?s:o,h=t<120?0:180<=t&&t<300?s:o,[p,u,m]=[c,d,h].map((e=>255*(e+l)));return{r:p,g:u,b:m,a:null!=n?n:1}}t$2.d(n$2,{Z:()=>c$2});const a$2=/hsva?\\s*\\(\\s*([+-]?\\d*\\.?\\d+%?)\\s*,?\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*\\/?\\s*?(\\d*\\.?\\d+%?)?\\s*\\)/gi;function o$2({h:e,s:t,v:a,a:i}){return[e$2({h:s$2(e),s:r$2(0,t,100),v:r$2(0,a,100),a:(n=i,void 0!==n?r$2(0,n,1):1)}),\"hsv\"];var n}function i$2(e){if(\"object\"===e.constructor.name.toLowerCase()&&function(e){const{h:t,s:a,v:i}=e;return void 0!==t&&void 0!==a&&void 0!==i}(e))return o$2(e);if(\"string\"==typeof e){a$2.lastIndex=0;const t=a$2.exec(e);if(t){const[e,a,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes(\"%\")?+e.slice(0,-1)*(0===t?3.59:t<3?1:.01):+e));return o$2({h:e,s:a,v:i,a:n})}}return[{r:0,g:0,b:0,a:1},\"invalid\"]}const c$2=e=>{e.prototype.hsva=function(){return function(e){var t;const{Cmax:a,H:i,delta:n}=function(e){const[t,a,i]=Object.values(e).map((e=>e/255)),n=Math.max(t,a,i),r=Math.min(t,a,i),s=n-r;return{Cmin:r,Cmax:n,H:0===s?0:n===t?(a-i)/s%6:n===a?(i-t)/s+2:(t-a)/s+4,delta:s}}(e),r=0===n?0:n/a;return{h:s$2(60*i),s:100*r,v:100*a,a:null!==(t=e.a)&&void 0!==t?t:1}}(this.rgba())},e.prototype.stringHSV=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[a,i,n,r]=Object.values(this.hsva()).map(((e,a)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[a])));return e?`hsva(${s$2(a)}, ${i}%, ${n}%, ${r})`:`hsv(${s$2(a)}, ${i}%, ${n}%)`},e.Parsers.push(i$2)};var u=n$2.Z,t$1={d:(e,t)=>{for(var a in t)t$1.o(t,a)&&!t$1.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},r$1={};function n$1(e,t,a){return Math.max(e,Math.min(t,a))}function o$1(e){let{r:t,y:a,b:i}=e;const n=Math.min(t,a,i);[t,a,i]=[t,a,i].map((e=>e-n));const r=Math.max(t,a,i);let s=Math.min(a,i);a-=s,i-=s,i&&s&&(i*=2,s*=2),t+=a,s+=a;const o=Math.max(t,s,i);if(o){const e=r/o;[t,s,i]=[t,s,i].map((t=>t*e))}return[t,s,i]=[t,s,i].map((e=>e+n)),{r:t,g:s,b:i,a:e.a}}t$1.d(r$1,{Z:()=>i$1});const a$1=/color\\s*\\(\\s*ryba?\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*\\/?\\s*?(\\d*\\.?\\d+%?)?\\s*\\)/gi;function e$1({r:e,y:t,b:a,a:i}){return[o$1({r:n$1(0,e,255),y:n$1(0,t,255),b:n$1(0,a,255),a:(n=i,void 0!==n?n$1(0,n,1):1)}),\"ryb\"];var n}function s$1(e){if(\"object\"===e.constructor.name.toLowerCase()&&function(e){const{r:t,y:a,b:i}=e;return void 0!==t&&void 0!==a&&void 0!==i}(e))return e$1(e);if(\"string\"==typeof e){a$1.lastIndex=0;const t=a$1.exec(e);if(t){const[e,a,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes(\"%\")?+e.slice(0,-1)*(t<3?2.55:.01):+e));return e$1({r:e,y:a,b:i,a:n})}}return[{r:0,g:0,b:0,a:1},\"invalid\"]}const i$1=e=>{e.prototype.ryba=function(){return function(e){let{r:t,g:a,b:i}=e;const n=Math.min(t,a,i);[t,a,i]=[t,a,i].map((e=>e-n));const r=Math.max(t,a,i);let s=Math.min(t,a);t-=s,a-=s,i&&a&&(i/=2,a/=2),s+=a,i+=a;const o=Math.max(t,s,i);if(o){const e=r/o;[t,s,i]=[t,s,i].map((t=>t*e))}return[t,s,i]=[t,s,i].map((e=>e+n)),{r:t,y:s,b:i,a:e.a}}(this.rgba())},e.prototype.stringRYB=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[a,i,n,r]=Object.values(this.ryba()).map(((e,a)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[a])));return e?`color(ryba ${a}, ${i}, ${n}, ${r})`:`color(ryb ${a}, ${i}, ${n})`},e.Parsers.push(s$1)};var c$1=r$1.Z,t={d:(e,a)=>{for(var i in a)t.o(a,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:a[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},n={};function e(e,t,a){return Math.max(e,Math.min(t,a))}function r(e){const{c:t,m:a,y:i,k:n,a:r}=e,[s,o,l]=[t,a,i].map((e=>255*(1-e/100)*(1-n/100)));return{r:s,g:o,b:l,a:r}}t.d(n,{Z:()=>i});const c=/device-cmyka?\\s*\\(\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*(\\d*\\.?\\d+%?)\\s*,?\\s*(\\d*\\.?\\d+%?),?\\s*\\/?\\s*?(\\d*\\.?\\d+%?)?\\s*\\)/gi;function o({c:t,m:a,y:i,k:n,a:s}){return[r({c:e(0,t,100),m:e(0,a,100),y:e(0,i,100),k:e(0,n,100),a:(o=s,void 0!==o?e(0,o,1):1)}),\"cmyk\"];var o}function a(e){if(\"object\"===e.constructor.name.toLowerCase()&&function(e){const{c:t,m:a,y:i,k:n}=e;return void 0!==t&&void 0!==a&&void 0!==i&&void 0!==n}(e))return o(e);if(\"string\"==typeof e){c.lastIndex=0;const t=c.exec(e);if(t){const[e,a,i,n,r]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes(\"%\")?+e.slice(0,-1)*(t<4?1:.01):+e));return o({c:e,m:a,y:i,k:n,a:r})}}return[{r:0,g:0,b:0,a:1},\"invalid\"]}const i=e=>{e.prototype.cmyka=function(){return function(e){const{r:t,g:a,b:i,a:n}=e,r=1-Math.max(t,a,i)/255,[s,o,l]=1===r?[0,0,0]:[t,a,i].map((e=>100*(1-e/255-r)/(1-r)));return{c:s,m:o,y:l,k:100*r,a:n}}(this.rgba())},e.prototype.stringCMYK=function({alpha:e=!0,precision:t=[0,0,0,0,1]}={}){const[a,i,n,r,s]=Object.values(this.cmyka()).map(((e,a)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[a])));return e?`device-cmyk(${a}, ${i}, ${n}, ${r}, ${s})`:`device-cmyk(${a}, ${i}, ${n}, ${r})`},e.Parsers.push(a)};var s=n.Z;class ExcalidrawScene{type=\"excalidraw\";version=2;source=GITHUB_RELEASES+PLUGIN_VERSION;elements=[];constructor(e=[]){this.elements=e}toExJSON(){return{...this,elements:this.elements.map((e=>({...e})))}}}var ARRAY_TYPE=\"undefined\"!=typeof Float32Array?Float32Array:Array;function create$1(){var e=new ARRAY_TYPE(16);return ARRAY_TYPE!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function clone(e){var t=new ARRAY_TYPE(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function fromValues$1(e,t,a,i,n,r,s,o,l,c,d,h,p,u,m,g){var f=new ARRAY_TYPE(16);return f[0]=e,f[1]=t,f[2]=a,f[3]=i,f[4]=n,f[5]=r,f[6]=s,f[7]=o,f[8]=l,f[9]=c,f[10]=d,f[11]=h,f[12]=p,f[13]=u,f[14]=m,f[15]=g,f}function multiply$1(e,t,a){var i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],l=t[5],c=t[6],d=t[7],h=t[8],p=t[9],u=t[10],m=t[11],g=t[12],f=t[13],b=t[14],U=t[15],E=a[0],w=a[1],y=a[2],v=a[3];return e[0]=E*i+w*o+y*h+v*g,e[1]=E*n+w*l+y*p+v*f,e[2]=E*r+w*c+y*u+v*b,e[3]=E*s+w*d+y*m+v*U,E=a[4],w=a[5],y=a[6],v=a[7],e[4]=E*i+w*o+y*h+v*g,e[5]=E*n+w*l+y*p+v*f,e[6]=E*r+w*c+y*u+v*b,e[7]=E*s+w*d+y*m+v*U,E=a[8],w=a[9],y=a[10],v=a[11],e[8]=E*i+w*o+y*h+v*g,e[9]=E*n+w*l+y*p+v*f,e[10]=E*r+w*c+y*u+v*b,e[11]=E*s+w*d+y*m+v*U,E=a[12],w=a[13],y=a[14],v=a[15],e[12]=E*i+w*o+y*h+v*g,e[13]=E*n+w*l+y*p+v*f,e[14]=E*r+w*c+y*u+v*b,e[15]=E*s+w*d+y*m+v*U,e}function create(){var e=new ARRAY_TYPE(3);return ARRAY_TYPE!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function fromValues(e,t,a){var i=new ARRAY_TYPE(3);return i[0]=e,i[1]=t,i[2]=a,i}function transformMat4(e,t,a){var i=t[0],n=t[1],r=t[2],s=a[3]*i+a[7]*n+a[11]*r+a[15];return s=s||1,e[0]=(a[0]*i+a[4]*n+a[8]*r+a[12])/s,e[1]=(a[1]*i+a[5]*n+a[9]*r+a[13])/s,e[2]=(a[2]*i+a[6]*n+a[10]*r+a[14])/s,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)}),create();const random$2=new Random(Date.now()),randomInteger=()=>Math.floor(random$2.next()*2**31),randomId=()=>nanoid$1();function dimensionsFromPoints(e){const t=e.map((([e])=>e)),a=e.map((([,e])=>e)),i=Math.min(...t),n=Math.min(...a);return[Math.max(...t)-i,Math.max(...a)-n]}function getWindingOrder(e){return e.reduce(((e,[t,a],i,n)=>{const r=n[i+1];return((r?r[0]:0)-t)*((r?r[1]:0)+a)+e}),0)>0?\"clockwise\":\"counterclockwise\"}const{min:min$4,max:max$4}=Math;var limit=(e,t=0,a=1)=>min$4(max$4(t,e),a),clip_rgb=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=limit(e[t],0,255)):3===t&&(e[t]=limit(e[t],0,1));return e};const classToType={};for(let e of[\"Boolean\",\"Number\",\"String\",\"Function\",\"Array\",\"Date\",\"RegExp\",\"Undefined\",\"Null\"])classToType[`[object ${e}]`]=e.toLowerCase();function type(e){return classToType[Object.prototype.toString.call(e)]||\"object\"}var unpack=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):\"object\"==type(e[0])&&t?t.split(\"\").filter((t=>void 0!==e[0][t])).map((t=>e[0][t])):e[0].slice(0),last=e=>{if(e.length<2)return null;const t=e.length-1;return\"string\"==type(e[t])?e[t].toLowerCase():null};const{PI:PI$2,min:min$3,max:max$3}=Math,rnd2=e=>Math.round(100*e)/100,rnd3=e=>Math.round(100*e)/100,TWOPI=2*PI$2,PITHIRD=PI$2/3,DEG2RAD=PI$2/180,RAD2DEG=180/PI$2;function reverse3(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}var input={format:{},autodetect:[]};class Color{constructor(...e){const t=this;if(\"object\"===type(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let a=last(e),i=!1;if(!a){i=!0,input.sorted||(input.autodetect=input.autodetect.sort(((e,t)=>t.p-e.p)),input.sorted=!0);for(let t of input.autodetect)if(a=t.test(...e),a)break}if(!input.format[a])throw new Error(\"unknown format: \"+e);{const n=input.format[a].apply(null,i?e:e.slice(0,-1));t._rgb=clip_rgb(n)}3===t._rgb.length&&t._rgb.push(1)}toString(){return\"function\"==type(this.hex)?this.hex():`[${this._rgb.join(\",\")}]`}}const version=\"3.1.2\",chroma=(...e)=>new Color(...e);chroma.version=version;const w3cx11={aliceblue:\"#f0f8ff\",antiquewhite:\"#faebd7\",aqua:\"#00ffff\",aquamarine:\"#7fffd4\",azure:\"#f0ffff\",beige:\"#f5f5dc\",bisque:\"#ffe4c4\",black:\"#000000\",blanchedalmond:\"#ffebcd\",blue:\"#0000ff\",blueviolet:\"#8a2be2\",brown:\"#a52a2a\",burlywood:\"#deb887\",cadetblue:\"#5f9ea0\",chartreuse:\"#7fff00\",chocolate:\"#d2691e\",coral:\"#ff7f50\",cornflowerblue:\"#6495ed\",cornsilk:\"#fff8dc\",crimson:\"#dc143c\",cyan:\"#00ffff\",darkblue:\"#00008b\",darkcyan:\"#008b8b\",darkgoldenrod:\"#b8860b\",darkgray:\"#a9a9a9\",darkgreen:\"#006400\",darkgrey:\"#a9a9a9\",darkkhaki:\"#bdb76b\",darkmagenta:\"#8b008b\",darkolivegreen:\"#556b2f\",darkorange:\"#ff8c00\",darkorchid:\"#9932cc\",darkred:\"#8b0000\",darksalmon:\"#e9967a\",darkseagreen:\"#8fbc8f\",darkslateblue:\"#483d8b\",darkslategray:\"#2f4f4f\",darkslategrey:\"#2f4f4f\",darkturquoise:\"#00ced1\",darkviolet:\"#9400d3\",deeppink:\"#ff1493\",deepskyblue:\"#00bfff\",dimgray:\"#696969\",dimgrey:\"#696969\",dodgerblue:\"#1e90ff\",firebrick:\"#b22222\",floralwhite:\"#fffaf0\",forestgreen:\"#228b22\",fuchsia:\"#ff00ff\",gainsboro:\"#dcdcdc\",ghostwhite:\"#f8f8ff\",gold:\"#ffd700\",goldenrod:\"#daa520\",gray:\"#808080\",green:\"#008000\",greenyellow:\"#adff2f\",grey:\"#808080\",honeydew:\"#f0fff0\",hotpink:\"#ff69b4\",indianred:\"#cd5c5c\",indigo:\"#4b0082\",ivory:\"#fffff0\",khaki:\"#f0e68c\",laserlemon:\"#ffff54\",lavender:\"#e6e6fa\",lavenderblush:\"#fff0f5\",lawngreen:\"#7cfc00\",lemonchiffon:\"#fffacd\",lightblue:\"#add8e6\",lightcoral:\"#f08080\",lightcyan:\"#e0ffff\",lightgoldenrod:\"#fafad2\",lightgoldenrodyellow:\"#fafad2\",lightgray:\"#d3d3d3\",lightgreen:\"#90ee90\",lightgrey:\"#d3d3d3\",lightpink:\"#ffb6c1\",lightsalmon:\"#ffa07a\",lightseagreen:\"#20b2aa\",lightskyblue:\"#87cefa\",lightslategray:\"#778899\",lightslategrey:\"#778899\",lightsteelblue:\"#b0c4de\",lightyellow:\"#ffffe0\",lime:\"#00ff00\",limegreen:\"#32cd32\",linen:\"#faf0e6\",magenta:\"#ff00ff\",maroon:\"#800000\",maroon2:\"#7f0000\",maroon3:\"#b03060\",mediumaquamarine:\"#66cdaa\",mediumblue:\"#0000cd\",mediumorchid:\"#ba55d3\",mediumpurple:\"#9370db\",mediumseagreen:\"#3cb371\",mediumslateblue:\"#7b68ee\",mediumspringgreen:\"#00fa9a\",mediumturquoise:\"#48d1cc\",mediumvioletred:\"#c71585\",midnightblue:\"#191970\",mintcream:\"#f5fffa\",mistyrose:\"#ffe4e1\",moccasin:\"#ffe4b5\",navajowhite:\"#ffdead\",navy:\"#000080\",oldlace:\"#fdf5e6\",olive:\"#808000\",olivedrab:\"#6b8e23\",orange:\"#ffa500\",orangered:\"#ff4500\",orchid:\"#da70d6\",palegoldenrod:\"#eee8aa\",palegreen:\"#98fb98\",paleturquoise:\"#afeeee\",palevioletred:\"#db7093\",papayawhip:\"#ffefd5\",peachpuff:\"#ffdab9\",peru:\"#cd853f\",pink:\"#ffc0cb\",plum:\"#dda0dd\",powderblue:\"#b0e0e6\",purple:\"#800080\",purple2:\"#7f007f\",purple3:\"#a020f0\",rebeccapurple:\"#663399\",red:\"#ff0000\",rosybrown:\"#bc8f8f\",royalblue:\"#4169e1\",saddlebrown:\"#8b4513\",salmon:\"#fa8072\",sandybrown:\"#f4a460\",seagreen:\"#2e8b57\",seashell:\"#fff5ee\",sienna:\"#a0522d\",silver:\"#c0c0c0\",skyblue:\"#87ceeb\",slateblue:\"#6a5acd\",slategray:\"#708090\",slategrey:\"#708090\",snow:\"#fffafa\",springgreen:\"#00ff7f\",steelblue:\"#4682b4\",tan:\"#d2b48c\",teal:\"#008080\",thistle:\"#d8bfd8\",tomato:\"#ff6347\",turquoise:\"#40e0d0\",violet:\"#ee82ee\",wheat:\"#f5deb3\",white:\"#ffffff\",whitesmoke:\"#f5f5f5\",yellow:\"#ffff00\",yellowgreen:\"#9acd32\"},RE_HEX=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,RE_HEXA=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,hex2rgb=e=>{if(e.match(RE_HEX)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(\"\"))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(RE_HEXA)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(\"\"))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=parseInt(e,16);return[t>>24&255,t>>16&255,t>>8&255,Math.round((255&t)/255*100)/100]}throw new Error(`unknown hex color: ${e}`)},{round:round$5}=Math,rgb2hex=(...e)=>{let[t,a,i,n]=unpack(e,\"rgba\"),r=last(e)||\"auto\";void 0===n&&(n=1),\"auto\"===r&&(r=n<1?\"rgba\":\"rgb\"),t=round$5(t),a=round$5(a),i=round$5(i);let s=\"000000\"+(t<<16|a<<8|i).toString(16);s=s.substr(s.length-6);let o=\"0\"+round$5(255*n).toString(16);switch(o=o.substr(o.length-2),r.toLowerCase()){case\"rgba\":return`#${s}${o}`;case\"argb\":return`#${o}${s}`;default:return`#${s}`}};Color.prototype.name=function(){const e=rgb2hex(this._rgb,\"rgb\");for(let t of Object.keys(w3cx11))if(w3cx11[t]===e)return t.toLowerCase();return e},input.format.named=e=>{if(e=e.toLowerCase(),w3cx11[e])return hex2rgb(w3cx11[e]);throw new Error(\"unknown color name: \"+e)},input.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&\"string\"===type(e)&&w3cx11[e.toLowerCase()])return\"named\"}}),Color.prototype.alpha=function(e,t=!1){return void 0!==e&&\"number\"===type(e)?t?(this._rgb[3]=e,this):new Color([this._rgb[0],this._rgb[1],this._rgb[2],e],\"rgb\"):this._rgb[3]},Color.prototype.clipped=function(){return this._rgb._clipped||!1};const labConstants={Kn:18,labWhitePoint:\"d65\",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},ILLUMINANTS=new Map([[\"a\",[1.0985,.35585]],[\"b\",[1.0985,.35585]],[\"c\",[.98074,1.18232]],[\"d50\",[.96422,.82521]],[\"d55\",[.95682,.92149]],[\"d65\",[.95047,1.08883]],[\"e\",[1,1,1]],[\"f2\",[.99186,.67393]],[\"f7\",[.95041,1.08747]],[\"f11\",[1.00962,.6435]],[\"icc\",[.96422,.82521]]]);function setLabWhitePoint(e){const t=ILLUMINANTS.get(String(e).toLowerCase());if(!t)throw new Error(\"unknown Lab illuminant \"+e);labConstants.labWhitePoint=e,labConstants.Xn=t[0],labConstants.Zn=t[1]}function getLabWhitePoint(){return labConstants.labWhitePoint}const lab2rgb=(...e)=>{e=unpack(e,\"lab\");const[t,a,i]=e,[n,r,s]=lab2xyz(t,a,i),[o,l,c]=xyz2rgb(n,r,s);return[o,l,c,e.length>3?e[3]:1]},lab2xyz=(e,t,a)=>{const{kE:i,kK:n,kKE:r,Xn:s,Yn:o,Zn:l}=labConstants,c=(e+16)/116,d=.002*t+c,h=c-.005*a,p=d*d*d,u=h*h*h;return[(p>i?p:(116*d-16)/n)*s,(e>r?Math.pow((e+16)/116,3):e/n)*o,(u>i?u:(116*h-16)/n)*l]},compand=e=>{const t=Math.sign(e);return((e=Math.abs(e))<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)*t},xyz2rgb=(e,t,a)=>{const{MtxAdaptMa:i,MtxAdaptMaI:n,MtxXYZ2RGB:r,RefWhiteRGB:s,Xn:o,Yn:l,Zn:c}=labConstants,d=o*i.m00+l*i.m10+c*i.m20,h=o*i.m01+l*i.m11+c*i.m21,p=o*i.m02+l*i.m12+c*i.m22,u=s.X*i.m00+s.Y*i.m10+s.Z*i.m20,m=s.X*i.m01+s.Y*i.m11+s.Z*i.m21,g=s.X*i.m02+s.Y*i.m12+s.Z*i.m22,f=(e*i.m00+t*i.m10+a*i.m20)*(u/d),b=(e*i.m01+t*i.m11+a*i.m21)*(m/h),U=(e*i.m02+t*i.m12+a*i.m22)*(g/p),E=f*n.m00+b*n.m10+U*n.m20,w=f*n.m01+b*n.m11+U*n.m21,y=f*n.m02+b*n.m12+U*n.m22;return[255*compand(E*r.m00+w*r.m10+y*r.m20),255*compand(E*r.m01+w*r.m11+y*r.m21),255*compand(E*r.m02+w*r.m12+y*r.m22)]},rgb2lab=(...e)=>{const[t,a,i,...n]=unpack(e,\"rgb\"),[r,s,o]=rgb2xyz(t,a,i),[l,c,d]=xyz2lab(r,s,o);return[l,c,d,...n.length>0&&n[0]<1?[n[0]]:[]]};function xyz2lab(e,t,a){const{Xn:i,Yn:n,Zn:r,kE:s,kK:o}=labConstants,l=e/i,c=t/n,d=a/r,h=l>s?Math.pow(l,1/3):(o*l+16)/116,p=c>s?Math.pow(c,1/3):(o*c+16)/116;return[116*p-16,500*(h-p),200*(p-(d>s?Math.pow(d,1/3):(o*d+16)/116))]}function gammaAdjustSRGB(e){const t=Math.sign(e);return((e=Math.abs(e))<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4))*t}const rgb2xyz=(e,t,a)=>{e=gammaAdjustSRGB(e/255),t=gammaAdjustSRGB(t/255),a=gammaAdjustSRGB(a/255);const{MtxRGB2XYZ:i,MtxAdaptMa:n,MtxAdaptMaI:r,Xn:s,Yn:o,Zn:l,As:c,Bs:d,Cs:h}=labConstants;let p=e*i.m00+t*i.m10+a*i.m20,u=e*i.m01+t*i.m11+a*i.m21,m=e*i.m02+t*i.m12+a*i.m22;const g=s*n.m00+o*n.m10+l*n.m20,f=s*n.m01+o*n.m11+l*n.m21,b=s*n.m02+o*n.m12+l*n.m22;let U=p*n.m00+u*n.m10+m*n.m20,E=p*n.m01+u*n.m11+m*n.m21,w=p*n.m02+u*n.m12+m*n.m22;return U*=g/c,E*=f/d,w*=b/h,p=U*r.m00+E*r.m10+w*r.m20,u=U*r.m01+E*r.m11+w*r.m21,m=U*r.m02+E*r.m12+w*r.m22,[p,u,m]};Color.prototype.lab=function(){return rgb2lab(this._rgb)};const lab$1=(...e)=>new Color(...e,\"lab\");Object.assign(chroma,{lab:lab$1,getLabWhitePoint:getLabWhitePoint,setLabWhitePoint:setLabWhitePoint}),input.format.lab=lab2rgb,input.autodetect.push({p:2,test:(...e)=>{if(\"array\"===type(e=unpack(e,\"lab\"))&&3===e.length)return\"lab\"}}),Color.prototype.darken=function(e=1){const t=this.lab();return t[0]-=labConstants.Kn*e,new Color(t,\"lab\").alpha(this.alpha(),!0)},Color.prototype.brighten=function(e=1){return this.darken(-e)},Color.prototype.darker=Color.prototype.darken,Color.prototype.brighter=Color.prototype.brighten,Color.prototype.get=function(e){const[t,a]=e.split(\".\"),i=this[t]();if(a){const e=t.indexOf(a)-(\"ok\"===t.substr(0,2)?2:0);if(e>-1)return i[e];throw new Error(`unknown channel ${a} in mode ${t}`)}return i};const{pow:pow$6}=Math,EPS=1e-7,MAX_ITER=20;Color.prototype.luminance=function(e,t=\"rgb\"){if(void 0!==e&&\"number\"===type(e)){if(0===e)return new Color([0,0,0,this._rgb[3]],\"rgb\");if(1===e)return new Color([255,255,255,this._rgb[3]],\"rgb\");let a=this.luminance(),i=MAX_ITER;const n=(a,r)=>{const s=a.interpolate(r,.5,t),o=s.luminance();return Math.abs(e-o)<EPS||!i--?s:o>e?n(a,s):n(s,r)},r=(a>e?n(new Color([0,0,0]),this):n(this,new Color([255,255,255]))).rgb();return new Color([...r,this._rgb[3]])}return rgb2luminance(...this._rgb.slice(0,3))};const rgb2luminance=(e,t,a)=>.2126*(e=luminance_x(e))+.7152*(t=luminance_x(t))+.0722*luminance_x(a),luminance_x=e=>(e/=255)<=.03928?e/12.92:pow$6((e+.055)/1.055,2.4);var index={},mix=(e,t,a=.5,...i)=>{let n=i[0]||\"lrgb\";if(index[n]||i.length||(n=Object.keys(index)[0]),!index[n])throw new Error(`interpolation mode ${n} is not defined`);return\"object\"!==type(e)&&(e=new Color(e)),\"object\"!==type(t)&&(t=new Color(t)),index[n](e,t,a).alpha(e.alpha()+a*(t.alpha()-e.alpha()))};Color.prototype.mix=Color.prototype.interpolate=function(e,t=.5,...a){return mix(this,e,t,...a)},Color.prototype.premultiply=function(e=!1){const t=this._rgb,a=t[3];return e?(this._rgb=[t[0]*a,t[1]*a,t[2]*a,a],this):new Color([t[0]*a,t[1]*a,t[2]*a,a],\"rgb\")};const{sin:sin$3,cos:cos$4}=Math,lch2lab=(...e)=>{let[t,a,i]=unpack(e,\"lch\");return isNaN(i)&&(i=0),i*=DEG2RAD,[t,cos$4(i)*a,sin$3(i)*a]},lch2rgb=(...e)=>{e=unpack(e,\"lch\");const[t,a,i]=e,[n,r,s]=lch2lab(t,a,i),[o,l,c]=lab2rgb(n,r,s);return[o,l,c,e.length>3?e[3]:1]},hcl2rgb=(...e)=>{const t=reverse3(unpack(e,\"hcl\"));return lch2rgb(...t)},{sqrt:sqrt$4,atan2:atan2$2,round:round$4}=Math,lab2lch=(...e)=>{const[t,a,i]=unpack(e,\"lab\"),n=sqrt$4(a*a+i*i);let r=(atan2$2(i,a)*RAD2DEG+360)%360;return 0===round$4(1e4*n)&&(r=Number.NaN),[t,n,r]},rgb2lch=(...e)=>{const[t,a,i,...n]=unpack(e,\"rgb\"),[r,s,o]=rgb2lab(t,a,i),[l,c,d]=lab2lch(r,s,o);return[l,c,d,...n.length>0&&n[0]<1?[n[0]]:[]]};Color.prototype.lch=function(){return rgb2lch(this._rgb)},Color.prototype.hcl=function(){return reverse3(rgb2lch(this._rgb))};const lch$1=(...e)=>new Color(...e,\"lch\"),hcl=(...e)=>new Color(...e,\"hcl\");Object.assign(chroma,{lch:lch$1,hcl:hcl}),input.format.lch=lch2rgb,input.format.hcl=hcl2rgb,[\"lch\",\"hcl\"].forEach((e=>input.autodetect.push({p:2,test:(...t)=>{if(\"array\"===type(t=unpack(t,e))&&3===t.length)return e}}))),Color.prototype.saturate=function(e=1){const t=this.lch();return t[1]+=labConstants.Kn*e,t[1]<0&&(t[1]=0),new Color(t,\"lch\").alpha(this.alpha(),!0)},Color.prototype.desaturate=function(e=1){return this.saturate(-e)},Color.prototype.set=function(e,t,a=!1){const[i,n]=e.split(\".\"),r=this[i]();if(n){const e=i.indexOf(n)-(\"ok\"===i.substr(0,2)?2:0);if(e>-1){if(\"string\"==type(t))switch(t.charAt(0)){case\"+\":case\"-\":r[e]+=+t;break;case\"*\":r[e]*=+t.substr(1);break;case\"/\":r[e]/=+t.substr(1);break;default:r[e]=+t}else{if(\"number\"!==type(t))throw new Error(\"unsupported value for Color.set\");r[e]=t}const n=new Color(r,i);return a?(this._rgb=n._rgb,this):n}throw new Error(`unknown channel ${n} in mode ${i}`)}return r},Color.prototype.tint=function(e=.5,...t){return mix(this,\"white\",e,...t)},Color.prototype.shade=function(e=.5,...t){return mix(this,\"black\",e,...t)};const rgb$1=(e,t,a)=>{const i=e._rgb,n=t._rgb;return new Color(i[0]+a*(n[0]-i[0]),i[1]+a*(n[1]-i[1]),i[2]+a*(n[2]-i[2]),\"rgb\")};index.rgb=rgb$1;const{sqrt:sqrt$3,pow:pow$5}=Math,lrgb=(e,t,a)=>{const[i,n,r]=e._rgb,[s,o,l]=t._rgb;return new Color(sqrt$3(pow$5(i,2)*(1-a)+pow$5(s,2)*a),sqrt$3(pow$5(n,2)*(1-a)+pow$5(o,2)*a),sqrt$3(pow$5(r,2)*(1-a)+pow$5(l,2)*a),\"rgb\")};index.lrgb=lrgb;const lab=(e,t,a)=>{const i=e.lab(),n=t.lab();return new Color(i[0]+a*(n[0]-i[0]),i[1]+a*(n[1]-i[1]),i[2]+a*(n[2]-i[2]),\"lab\")};index.lab=lab;var interpolate_hsx=(e,t,a,i)=>{let n,r,s,o,l,c,d,h,p,u,m,g;return\"hsl\"===i?(n=e.hsl(),r=t.hsl()):\"hsv\"===i?(n=e.hsv(),r=t.hsv()):\"hcg\"===i?(n=e.hcg(),r=t.hcg()):\"hsi\"===i?(n=e.hsi(),r=t.hsi()):\"lch\"===i||\"hcl\"===i?(i=\"hcl\",n=e.hcl(),r=t.hcl()):\"oklch\"===i&&(n=e.oklch().reverse(),r=t.oklch().reverse()),\"h\"!==i.substr(0,1)&&\"oklch\"!==i||([s,l,d]=n,[o,c,h]=r),isNaN(s)||isNaN(o)?isNaN(s)?isNaN(o)?u=Number.NaN:(u=o,1!=d&&0!=d||\"hsv\"==i||(p=c)):(u=s,1!=h&&0!=h||\"hsv\"==i||(p=l)):(g=o>s&&o-s>180?o-(s+360):o<s&&s-o>180?o+360-s:o-s,u=s+a*g),void 0===p&&(p=l+a*(c-l)),m=d+a*(h-d),new Color(\"oklch\"===i?[m,p,u]:[u,p,m],i)};const lch=(e,t,a)=>interpolate_hsx(e,t,a,\"lch\");index.lch=lch,index.hcl=lch;const num2rgb=e=>{if(\"number\"==type(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error(\"unknown num color: \"+e)},rgb2num=(...e)=>{const[t,a,i]=unpack(e,\"rgb\");return(t<<16)+(a<<8)+i};Color.prototype.num=function(){return rgb2num(this._rgb)};const num$1=(...e)=>new Color(...e,\"num\");Object.assign(chroma,{num:num$1}),input.format.num=num2rgb,input.autodetect.push({p:5,test:(...e)=>{if(1===e.length&&\"number\"===type(e[0])&&e[0]>=0&&e[0]<=16777215)return\"num\"}});const num=(e,t,a)=>{const i=e.num(),n=t.num();return new Color(i+a*(n-i),\"num\")};index.num=num;const{floor:floor$3}=Math,hcg2rgb=(...e)=>{e=unpack(e,\"hcg\");let t,a,i,[n,r,s]=e;s*=255;const o=255*r;if(0===r)t=a=i=s;else{360===n&&(n=0),n>360&&(n-=360),n<0&&(n+=360),n/=60;const e=floor$3(n),l=n-e,c=s*(1-r),d=c+o*(1-l),h=c+o*l,p=c+o;switch(e){case 0:[t,a,i]=[p,h,c];break;case 1:[t,a,i]=[d,p,c];break;case 2:[t,a,i]=[c,p,h];break;case 3:[t,a,i]=[c,d,p];break;case 4:[t,a,i]=[h,c,p];break;case 5:[t,a,i]=[p,c,d]}}return[t,a,i,e.length>3?e[3]:1]},rgb2hcg=(...e)=>{const[t,a,i]=unpack(e,\"rgb\"),n=min$3(t,a,i),r=max$3(t,a,i),s=r-n,o=100*s/255,l=n/(255-s)*100;let c;return 0===s?c=Number.NaN:(t===r&&(c=(a-i)/s),a===r&&(c=2+(i-t)/s),i===r&&(c=4+(t-a)/s),c*=60,c<0&&(c+=360)),[c,o,l]};Color.prototype.hcg=function(){return rgb2hcg(this._rgb)};const hcg$1=(...e)=>new Color(...e,\"hcg\");chroma.hcg=hcg$1,input.format.hcg=hcg2rgb,input.autodetect.push({p:1,test:(...e)=>{if(\"array\"===type(e=unpack(e,\"hcg\"))&&3===e.length)return\"hcg\"}});const hcg=(e,t,a)=>interpolate_hsx(e,t,a,\"hcg\");index.hcg=hcg;const{cos:cos$3}=Math,hsi2rgb=(...e)=>{e=unpack(e,\"hsi\");let t,a,i,[n,r,s]=e;return isNaN(n)&&(n=0),isNaN(r)&&(r=0),n>360&&(n-=360),n<0&&(n+=360),n/=360,n<1/3?(i=(1-r)/3,t=(1+r*cos$3(TWOPI*n)/cos$3(PITHIRD-TWOPI*n))/3,a=1-(i+t)):n<2/3?(n-=1/3,t=(1-r)/3,a=(1+r*cos$3(TWOPI*n)/cos$3(PITHIRD-TWOPI*n))/3,i=1-(t+a)):(n-=2/3,a=(1-r)/3,i=(1+r*cos$3(TWOPI*n)/cos$3(PITHIRD-TWOPI*n))/3,t=1-(a+i)),t=limit(s*t*3),a=limit(s*a*3),i=limit(s*i*3),[255*t,255*a,255*i,e.length>3?e[3]:1]},{min:min$2,sqrt:sqrt$2,acos:acos}=Math,rgb2hsi=(...e)=>{let t,[a,i,n]=unpack(e,\"rgb\");a/=255,i/=255,n/=255;const r=min$2(a,i,n),s=(a+i+n)/3,o=s>0?1-r/s:0;return 0===o?t=NaN:(t=(a-i+(a-n))/2,t/=sqrt$2((a-i)*(a-i)+(a-n)*(i-n)),t=acos(t),n>i&&(t=TWOPI-t),t/=TWOPI),[360*t,o,s]};Color.prototype.hsi=function(){return rgb2hsi(this._rgb)};const hsi$1=(...e)=>new Color(...e,\"hsi\");chroma.hsi=hsi$1,input.format.hsi=hsi2rgb,input.autodetect.push({p:2,test:(...e)=>{if(\"array\"===type(e=unpack(e,\"hsi\"))&&3===e.length)return\"hsi\"}});const hsi=(e,t,a)=>interpolate_hsx(e,t,a,\"hsi\");index.hsi=hsi;const hsl2rgb=(...e)=>{e=unpack(e,\"hsl\");const[t,a,i]=e;let n,r,s;if(0===a)n=r=s=255*i;else{const e=[0,0,0],o=[0,0,0],l=i<.5?i*(1+a):i+a-i*a,c=2*i-l,d=t/360;e[0]=d+1/3,e[1]=d,e[2]=d-1/3;for(let t=0;t<3;t++)e[t]<0&&(e[t]+=1),e[t]>1&&(e[t]-=1),6*e[t]<1?o[t]=c+6*(l-c)*e[t]:2*e[t]<1?o[t]=l:3*e[t]<2?o[t]=c+(l-c)*(2/3-e[t])*6:o[t]=c;[n,r,s]=[255*o[0],255*o[1],255*o[2]]}return e.length>3?[n,r,s,e[3]]:[n,r,s,1]},rgb2hsl$1=(...e)=>{e=unpack(e,\"rgba\");let[t,a,i]=e;t/=255,a/=255,i/=255;const n=min$3(t,a,i),r=max$3(t,a,i),s=(r+n)/2;let o,l;return r===n?(o=0,l=Number.NaN):o=s<.5?(r-n)/(r+n):(r-n)/(2-r-n),t==r?l=(a-i)/(r-n):a==r?l=2+(i-t)/(r-n):i==r&&(l=4+(t-a)/(r-n)),l*=60,l<0&&(l+=360),e.length>3&&void 0!==e[3]?[l,o,s,e[3]]:[l,o,s]};Color.prototype.hsl=function(){return rgb2hsl$1(this._rgb)};const hsl$1=(...e)=>new Color(...e,\"hsl\");chroma.hsl=hsl$1,input.format.hsl=hsl2rgb,input.autodetect.push({p:2,test:(...e)=>{if(\"array\"===type(e=unpack(e,\"hsl\"))&&3===e.length)return\"hsl\"}});const hsl=(e,t,a)=>interpolate_hsx(e,t,a,\"hsl\");index.hsl=hsl;const{floor:floor$2}=Math,hsv2rgb=(...e)=>{e=unpack(e,\"hsv\");let t,a,i,[n,r,s]=e;if(s*=255,0===r)t=a=i=s;else{360===n&&(n=0),n>360&&(n-=360),n<0&&(n+=360),n/=60;const e=floor$2(n),o=n-e,l=s*(1-r),c=s*(1-r*o),d=s*(1-r*(1-o));switch(e){case 0:[t,a,i]=[s,d,l];break;case 1:[t,a,i]=[c,s,l];break;case 2:[t,a,i]=[l,s,d];break;case 3:[t,a,i]=[l,c,s];break;case 4:[t,a,i]=[d,l,s];break;case 5:[t,a,i]=[s,l,c]}}return[t,a,i,e.length>3?e[3]:1]},{min:min$1,max:max$2}=Math,rgb2hsl=(...e)=>{e=unpack(e,\"rgb\");let[t,a,i]=e;const n=min$1(t,a,i),r=max$2(t,a,i),s=r-n;let o,l,c;return c=r/255,0===r?(o=Number.NaN,l=0):(l=s/r,t===r&&(o=(a-i)/s),a===r&&(o=2+(i-t)/s),i===r&&(o=4+(t-a)/s),o*=60,o<0&&(o+=360)),[o,l,c]};Color.prototype.hsv=function(){return rgb2hsl(this._rgb)};const hsv$1=(...e)=>new Color(...e,\"hsv\");chroma.hsv=hsv$1,input.format.hsv=hsv2rgb,input.autodetect.push({p:2,test:(...e)=>{if(\"array\"===type(e=unpack(e,\"hsv\"))&&3===e.length)return\"hsv\"}});const hsv=(e,t,a)=>interpolate_hsx(e,t,a,\"hsv\");function multiplyMatrices(e,t){let a=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map((e=>[e])));let i=t[0].length,n=t[0].map(((e,a)=>t.map((e=>e[a])))),r=e.map((e=>n.map((t=>Array.isArray(e)?e.reduce(((e,a,i)=>e+a*(t[i]||0)),0):t.reduce(((t,a)=>t+a*e),0)))));return 1===a&&(r=r[0]),1===i?r.map((e=>e[0])):r}index.hsv=hsv;const oklab2rgb=(...e)=>{e=unpack(e,\"lab\");const[t,a,i,...n]=e,[r,s,o]=OKLab_to_XYZ([t,a,i]),[l,c,d]=xyz2rgb(r,s,o);return[l,c,d,...n.length>0&&n[0]<1?[n[0]]:[]]};function OKLab_to_XYZ(e){var t=multiplyMatrices([[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],e);return multiplyMatrices([[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],t.map((e=>e**3)))}const rgb2oklab=(...e)=>{const[t,a,i,...n]=unpack(e,\"rgb\");return[...XYZ_to_OKLab(rgb2xyz(t,a,i)),...n.length>0&&n[0]<1?[n[0]]:[]]};function XYZ_to_OKLab(e){const t=multiplyMatrices([[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],e);return multiplyMatrices([[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],t.map((e=>Math.cbrt(e))))}Color.prototype.oklab=function(){return rgb2oklab(this._rgb)};const oklab$1=(...e)=>new Color(...e,\"oklab\");Object.assign(chroma,{oklab:oklab$1}),input.format.oklab=oklab2rgb,input.autodetect.push({p:2,test:(...e)=>{if(\"array\"===type(e=unpack(e,\"oklab\"))&&3===e.length)return\"oklab\"}});const oklab=(e,t,a)=>{const i=e.oklab(),n=t.oklab();return new Color(i[0]+a*(n[0]-i[0]),i[1]+a*(n[1]-i[1]),i[2]+a*(n[2]-i[2]),\"oklab\")};index.oklab=oklab;const oklch$1=(e,t,a)=>interpolate_hsx(e,t,a,\"oklch\");index.oklch=oklch$1;const{pow:pow$4,sqrt:sqrt$1,PI:PI$1,cos:cos$2,sin:sin$2,atan2:atan2$1}=Math;var average=(e,t=\"lrgb\",a=null)=>{const i=e.length;a||(a=Array.from(new Array(i)).map((()=>1)));const n=i/a.reduce((function(e,t){return e+t}));if(a.forEach(((e,t)=>{a[t]*=n})),e=e.map((e=>new Color(e))),\"lrgb\"===t)return _average_lrgb(e,a);const r=e.shift(),s=r.get(t),o=[];let l=0,c=0;for(let e=0;e<s.length;e++)if(s[e]=(s[e]||0)*a[0],o.push(isNaN(s[e])?0:a[0]),\"h\"===t.charAt(e)&&!isNaN(s[e])){const t=s[e]/180*PI$1;l+=cos$2(t)*a[0],c+=sin$2(t)*a[0]}let d=r.alpha()*a[0];e.forEach(((e,i)=>{const n=e.get(t);d+=e.alpha()*a[i+1];for(let e=0;e<s.length;e++)if(!isNaN(n[e]))if(o[e]+=a[i+1],\"h\"===t.charAt(e)){const t=n[e]/180*PI$1;l+=cos$2(t)*a[i+1],c+=sin$2(t)*a[i+1]}else s[e]+=n[e]*a[i+1]}));for(let e=0;e<s.length;e++)if(\"h\"===t.charAt(e)){let t=atan2$1(c/o[e],l/o[e])/PI$1*180;for(;t<0;)t+=360;for(;t>=360;)t-=360;s[e]=t}else s[e]=s[e]/o[e];return d/=i,new Color(s,t).alpha(d>.99999?1:d,!0)};const _average_lrgb=(e,t)=>{const a=e.length,i=[0,0,0,0];for(let n=0;n<e.length;n++){const r=e[n],s=t[n]/a,o=r._rgb;i[0]+=pow$4(o[0],2)*s,i[1]+=pow$4(o[1],2)*s,i[2]+=pow$4(o[2],2)*s,i[3]+=o[3]*s}return i[0]=sqrt$1(i[0]),i[1]=sqrt$1(i[1]),i[2]=sqrt$1(i[2]),i[3]>.9999999&&(i[3]=1),new Color(clip_rgb(i))},{pow:pow$3}=Math;function scale(e){let t=\"rgb\",a=chroma(\"#ccc\"),i=0,n=[0,1],r=[],s=[0,0],o=!1,l=[],c=!1,d=0,h=1,p=!1,u={},m=!0,g=1;const f=function(e){if((e=e||[\"#fff\",\"#000\"])&&\"string\"===type(e)&&chroma.brewer&&chroma.brewer[e.toLowerCase()]&&(e=chroma.brewer[e.toLowerCase()]),\"array\"===type(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(let t=0;t<e.length;t++)e[t]=chroma(e[t]);r.length=0;for(let t=0;t<e.length;t++)r.push(t/(e.length-1))}return w(),l=e};let b=e=>e,U=e=>e;const E=function(e,i){let n,c;if(null==i&&(i=!1),isNaN(e)||null===e)return a;if(i)c=e;else if(o&&o.length>2){const t=function(e){if(null!=o){const t=o.length-1;let a=0;for(;a<t&&e>=o[a];)a++;return a-1}return 0}(e);c=t/(o.length-2)}else c=h!==d?(e-d)/(h-d):1;c=U(c),i||(c=b(c)),1!==g&&(c=pow$3(c,g)),c=s[0]+c*(1-s[0]-s[1]),c=limit(c,0,1);const p=Math.floor(1e4*c);if(m&&u[p])n=u[p];else{if(\"array\"===type(l))for(let e=0;e<r.length;e++){const a=r[e];if(c<=a){n=l[e];break}if(c>=a&&e===r.length-1){n=l[e];break}if(c>a&&c<r[e+1]){c=(c-a)/(r[e+1]-a),n=chroma.interpolate(l[e],l[e+1],c,t);break}}else\"function\"===type(l)&&(n=l(c));m&&(u[p]=n)}return n};var w=()=>u={};f(e);const y=function(e){const t=chroma(E(e));return c&&t[c]?t[c]():t};return y.classes=function(e){if(null!=e){if(\"array\"===type(e))o=e,n=[e[0],e[e.length-1]];else{const t=chroma.analyze(n);o=0===e?[t.min,t.max]:chroma.limits(t,\"e\",e)}return y}return o},y.domain=function(e){if(!arguments.length)return n;d=e[0],h=e[e.length-1],r=[];const t=l.length;if(e.length===t&&d!==h)for(let t of Array.from(e))r.push((t-d)/(h-d));else{for(let e=0;e<t;e++)r.push(e/(t-1));if(e.length>2){const t=e.map(((t,a)=>a/(e.length-1))),a=e.map((e=>(e-d)/(h-d)));a.every(((e,a)=>t[a]===e))||(U=e=>{if(e<=0||e>=1)return e;let i=0;for(;e>=a[i+1];)i++;const n=(e-a[i])/(a[i+1]-a[i]);return t[i]+n*(t[i+1]-t[i])})}}return n=[d,h],y},y.mode=function(e){return arguments.length?(t=e,w(),y):t},y.range=function(e,t){return f(e),y},y.out=function(e){return c=e,y},y.spread=function(e){return arguments.length?(i=e,y):i},y.correctLightness=function(e){return null==e&&(e=!0),p=e,w(),b=p?function(e){const t=E(0,!0).lab()[0],a=E(1,!0).lab()[0],i=t>a;let n=E(e,!0).lab()[0];const r=t+(a-t)*e;let s=n-r,o=0,l=1,c=20;for(;Math.abs(s)>.01&&c-- >0;)i&&(s*=-1),s<0?(o=e,e+=.5*(l-e)):(l=e,e+=.5*(o-e)),n=E(e,!0).lab()[0],s=n-r;return e}:e=>e,y},y.padding=function(e){return null!=e?(\"number\"===type(e)&&(e=[e,e]),s=e,y):s},y.colors=function(t,a){arguments.length<2&&(a=\"hex\");let i=[];if(0===arguments.length)i=l.slice(0);else if(1===t)i=[y(.5)];else if(t>1){const e=n[0],a=n[1]-e;i=__range__(0,t,!1).map((i=>y(e+i/(t-1)*a)))}else{e=[];let t=[];if(o&&o.length>2)for(let e=1,a=o.length,i=1<=a;i?e<a:e>a;i?e++:e--)t.push(.5*(o[e-1]+o[e]));else t=n;i=t.map((e=>y(e)))}return chroma[a]&&(i=i.map((e=>e[a]()))),i},y.cache=function(e){return null!=e?(m=e,y):m},y.gamma=function(e){return null!=e?(g=e,y):g},y.nodata=function(e){return null!=e?(a=chroma(e),y):a},y}function __range__(e,t,a){let i=[],n=e<t,r=a?n?t+1:t-1:t;for(let t=e;n?t<r:t>r;n?t++:t--)i.push(t);return i}const binom_row=function(e){let t=[1,1];for(let a=1;a<e;a++){let e=[1];for(let a=1;a<=t.length;a++)e[a]=(t[a]||0)+t[a-1];t=e}return t},bezier=function(e){let t,a,i,n;if(e=e.map((e=>new Color(e))),2===e.length)[a,i]=e.map((e=>e.lab())),t=function(e){const t=[0,1,2].map((t=>a[t]+e*(i[t]-a[t])));return new Color(t,\"lab\")};else if(3===e.length)[a,i,n]=e.map((e=>e.lab())),t=function(e){const t=[0,1,2].map((t=>(1-e)*(1-e)*a[t]+2*(1-e)*e*i[t]+e*e*n[t]));return new Color(t,\"lab\")};else if(4===e.length){let r;[a,i,n,r]=e.map((e=>e.lab())),t=function(e){const t=[0,1,2].map((t=>(1-e)*(1-e)*(1-e)*a[t]+3*(1-e)*(1-e)*e*i[t]+3*(1-e)*e*e*n[t]+e*e*e*r[t]));return new Color(t,\"lab\")}}else{if(!(e.length>=5))throw new RangeError(\"No point in running bezier with only one color.\");{let a,i,n;a=e.map((e=>e.lab())),n=e.length-1,i=binom_row(n),t=function(e){const t=1-e,r=[0,1,2].map((r=>a.reduce(((a,s,o)=>a+i[o]*t**(n-o)*e**o*s[r]),0)));return new Color(r,\"lab\")}}}return t};var bezier$1=e=>{const t=bezier(e);return t.scale=()=>scale(t),t};const{round:round$3}=Math;Color.prototype.rgb=function(e=!0){return!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(round$3)},Color.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map(((t,a)=>a<3?!1===e?t:round$3(t):t))};const rgb=(...e)=>new Color(...e,\"rgb\");Object.assign(chroma,{rgb:rgb}),input.format.rgb=(...e)=>{const t=unpack(e,\"rgba\");return void 0===t[3]&&(t[3]=1),t},input.autodetect.push({p:3,test:(...e)=>{if(\"array\"===type(e=unpack(e,\"rgba\"))&&(3===e.length||4===e.length&&\"number\"==type(e[3])&&e[3]>=0&&e[3]<=1))return\"rgb\"}});const blend=(e,t,a)=>{if(!blend[a])throw new Error(\"unknown blend mode \"+a);return blend[a](e,t)},blend_f=e=>(t,a)=>{const i=chroma(a).rgb(),n=chroma(t).rgb();return chroma.rgb(e(i,n))},each=e=>(t,a)=>{const i=[];return i[0]=e(t[0],a[0]),i[1]=e(t[1],a[1]),i[2]=e(t[2],a[2]),i},normal=e=>e,multiply=(e,t)=>e*t/255,darken=(e,t)=>e>t?t:e,lighten=(e,t)=>e>t?e:t,screen=(e,t)=>255*(1-(1-e/255)*(1-t/255)),overlay=(e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)),burn=(e,t)=>255*(1-(1-t/255)/(e/255)),dodge=(e,t)=>255===e||(e=t/255*255/(1-e/255))>255?255:e;blend.normal=blend_f(each(normal)),blend.multiply=blend_f(each(multiply)),blend.screen=blend_f(each(screen)),blend.overlay=blend_f(each(overlay)),blend.darken=blend_f(each(darken)),blend.lighten=blend_f(each(lighten)),blend.dodge=blend_f(each(dodge)),blend.burn=blend_f(each(burn));const{pow:pow$2,sin:sin$1,cos:cos$1}=Math;function cubehelix(e=300,t=-1.5,a=1,i=1,n=[0,1]){let r,s=0;\"array\"===type(n)?r=n[1]-n[0]:(r=0,n=[n,n]);const o=function(o){const l=TWOPI*((e+120)/360+t*o),c=pow$2(n[0]+r*o,i),d=(0!==s?a[0]+o*s:a)*c*(1-c)/2,h=cos$1(l),p=sin$1(l);return chroma(clip_rgb([255*(c+d*(-.14861*h+1.78277*p)),255*(c+d*(-.29227*h-.90649*p)),255*(c+d*(1.97294*h)),1]))};return o.start=function(t){return null==t?e:(e=t,o)},o.rotations=function(e){return null==e?t:(t=e,o)},o.gamma=function(e){return null==e?i:(i=e,o)},o.hue=function(e){return null==e?a:(\"array\"===type(a=e)?(s=a[1]-a[0],0===s&&(a=a[1])):s=0,o)},o.lightness=function(e){return null==e?n:(\"array\"===type(e)?(n=e,r=e[1]-e[0]):(n=[e,e],r=0),o)},o.scale=()=>chroma.scale(o),o.hue(a),o}const digits=\"0123456789abcdef\",{floor:floor$1,random:random}=Math;var random$1=()=>{let e=\"#\";for(let t=0;t<6;t++)e+=digits.charAt(floor$1(16*random()));return new Color(e,\"hex\")};const{log:log$1,pow:pow$1,floor:floor,abs:abs$1}=Math;function analyze(e,t=null){const a={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return\"object\"===type(e)&&(e=Object.values(e)),e.forEach((e=>{t&&\"object\"===type(e)&&(e=e[t]),null==e||isNaN(e)||(a.values.push(e),a.sum+=e,e<a.min&&(a.min=e),e>a.max&&(a.max=e),a.count+=1)})),a.domain=[a.min,a.max],a.limits=(e,t)=>limits(a,e,t),a}function limits(e,t=\"equal\",a=7){\"array\"==type(e)&&(e=analyze(e));const{min:i,max:n}=e,r=e.values.sort(((e,t)=>e-t));if(1===a)return[i,n];const s=[];if(\"c\"===t.substr(0,1)&&(s.push(i),s.push(n)),\"e\"===t.substr(0,1)){s.push(i);for(let e=1;e<a;e++)s.push(i+e/a*(n-i));s.push(n)}else if(\"l\"===t.substr(0,1)){if(i<=0)throw new Error(\"Logarithmic scales are only possible for values > 0\");const e=Math.LOG10E*log$1(i),t=Math.LOG10E*log$1(n);s.push(i);for(let i=1;i<a;i++)s.push(pow$1(10,e+i/a*(t-e)));s.push(n)}else if(\"q\"===t.substr(0,1)){s.push(i);for(let e=1;e<a;e++){const t=(r.length-1)*e/a,i=floor(t);if(i===t)s.push(r[i]);else{const e=t-i;s.push(r[i]*(1-e)+r[i+1]*e)}}s.push(n)}else if(\"k\"===t.substr(0,1)){let e;const t=r.length,o=new Array(t),l=new Array(a);let c=!0,d=0,h=null;h=[],h.push(i);for(let e=1;e<a;e++)h.push(i+e/a*(n-i));for(h.push(n);c;){for(let e=0;e<a;e++)l[e]=0;for(let e=0;e<t;e++){const t=r[e];let i,n=Number.MAX_VALUE;for(let r=0;r<a;r++){const a=abs$1(h[r]-t);a<n&&(n=a,i=r),l[i]++,o[e]=i}}const i=new Array(a);for(let e=0;e<a;e++)i[e]=null;for(let a=0;a<t;a++)e=o[a],null===i[e]?i[e]=r[a]:i[e]+=r[a];for(let e=0;e<a;e++)i[e]*=1/l[e];c=!1;for(let e=0;e<a;e++)if(i[e]!==h[e]){c=!0;break}h=i,d++,d>200&&(c=!1)}const p={};for(let e=0;e<a;e++)p[e]=[];for(let a=0;a<t;a++)e=o[a],p[e].push(r[a]);let u=[];for(let e=0;e<a;e++)u.push(p[e][0]),u.push(p[e][p[e].length-1]);u=u.sort(((e,t)=>e-t)),s.push(u[0]);for(let e=1;e<u.length;e+=2){const t=u[e];isNaN(t)||-1!==s.indexOf(t)||s.push(t)}}return s}var contrast=(e,t)=>{e=new Color(e),t=new Color(t);const a=e.luminance(),i=t.luminance();return a>i?(a+.05)/(i+.05):(i+.05)/(a+.05)};const W_offset=.027,P_in=5e-4,P_out=.1,R_scale=1.14,B_threshold=.022,B_exp=1.414;var contrastAPCA=(e,t)=>{e=new Color(e),t=new Color(t),e.alpha()<1&&(e=mix(t,e,e.alpha(),\"rgb\"));const a=lum(...e.rgb()),i=lum(...t.rgb()),n=a>=B_threshold?a:a+Math.pow(B_threshold-a,B_exp),r=i>=B_threshold?i:i+Math.pow(B_threshold-i,B_exp),s=Math.pow(r,.56)-Math.pow(n,.57),o=Math.pow(r,.65)-Math.pow(n,.62),l=Math.abs(r-n)<P_in?0:n<r?s*R_scale:o*R_scale;return 100*(Math.abs(l)<P_out?0:l>0?l-W_offset:l+W_offset)};function lum(e,t,a){return.2126729*Math.pow(e/255,2.4)+.7151522*Math.pow(t/255,2.4)+.072175*Math.pow(a/255,2.4)}const{sqrt:sqrt,pow:pow,min:min,max:max$1,atan2:atan2,abs:abs,cos:cos,sin:sin,exp:exp,PI:PI}=Math;function deltaE(e,t,a=1,i=1,n=1){var r=function(e){return 360*e/(2*PI)},s=function(e){return 2*PI*e/360};e=new Color(e),t=new Color(t);const[o,l,c]=Array.from(e.lab()),[d,h,p]=Array.from(t.lab()),u=(o+d)/2,m=(sqrt(pow(l,2)+pow(c,2))+sqrt(pow(h,2)+pow(p,2)))/2,g=.5*(1-sqrt(pow(m,7)/(pow(m,7)+pow(25,7)))),f=l*(1+g),b=h*(1+g),U=sqrt(pow(f,2)+pow(c,2)),E=sqrt(pow(b,2)+pow(p,2)),w=(U+E)/2,y=r(atan2(c,f)),v=r(atan2(p,b)),T=y>=0?y:y+360,S=v>=0?v:v+360,_=abs(T-S)>180?(T+S+360)/2:(T+S)/2,C=1-.17*cos(s(_-30))+.24*cos(s(2*_))+.32*cos(s(3*_+6))-.2*cos(s(4*_-63));let I=S-T;I=abs(I)<=180?I:S<=T?I+360:I-360,I=2*sqrt(U*E)*sin(s(I)/2);const x=d-o,A=E-U,k=1+.015*pow(u-50,2)/sqrt(20+pow(u-50,2)),O=1+.045*w,R=1+.015*w*C,M=30*exp(-pow((_-275)/25,2)),L=-2*sqrt(pow(w,7)/(pow(w,7)+pow(25,7)))*sin(2*s(M)),D=sqrt(pow(x/(a*k),2)+pow(A/(i*O),2)+pow(I/(n*R),2)+L*(A/(i*O))*(I/(n*R)));return max$1(0,min(100,D))}function distance$1(e,t,a=\"lab\"){e=new Color(e),t=new Color(t);const i=e.get(a),n=t.get(a);let r=0;for(let e in i){const t=(i[e]||0)-(n[e]||0);r+=t*t}return Math.sqrt(r)}var valid=(...e)=>{try{return new Color(...e),!0}catch(e){return!1}},scales={cool:()=>scale([chroma.hsl(180,1,.9),chroma.hsl(250,.7,.4)]),hot:()=>scale([\"#000\",\"#f00\",\"#ff0\",\"#fff\"]).mode(\"rgb\")};const colorbrewer={OrRd:[\"#fff7ec\",\"#fee8c8\",\"#fdd49e\",\"#fdbb84\",\"#fc8d59\",\"#ef6548\",\"#d7301f\",\"#b30000\",\"#7f0000\"],PuBu:[\"#fff7fb\",\"#ece7f2\",\"#d0d1e6\",\"#a6bddb\",\"#74a9cf\",\"#3690c0\",\"#0570b0\",\"#045a8d\",\"#023858\"],BuPu:[\"#f7fcfd\",\"#e0ecf4\",\"#bfd3e6\",\"#9ebcda\",\"#8c96c6\",\"#8c6bb1\",\"#88419d\",\"#810f7c\",\"#4d004b\"],Oranges:[\"#fff5eb\",\"#fee6ce\",\"#fdd0a2\",\"#fdae6b\",\"#fd8d3c\",\"#f16913\",\"#d94801\",\"#a63603\",\"#7f2704\"],BuGn:[\"#f7fcfd\",\"#e5f5f9\",\"#ccece6\",\"#99d8c9\",\"#66c2a4\",\"#41ae76\",\"#238b45\",\"#006d2c\",\"#00441b\"],YlOrBr:[\"#ffffe5\",\"#fff7bc\",\"#fee391\",\"#fec44f\",\"#fe9929\",\"#ec7014\",\"#cc4c02\",\"#993404\",\"#662506\"],YlGn:[\"#ffffe5\",\"#f7fcb9\",\"#d9f0a3\",\"#addd8e\",\"#78c679\",\"#41ab5d\",\"#238443\",\"#006837\",\"#004529\"],Reds:[\"#fff5f0\",\"#fee0d2\",\"#fcbba1\",\"#fc9272\",\"#fb6a4a\",\"#ef3b2c\",\"#cb181d\",\"#a50f15\",\"#67000d\"],RdPu:[\"#fff7f3\",\"#fde0dd\",\"#fcc5c0\",\"#fa9fb5\",\"#f768a1\",\"#dd3497\",\"#ae017e\",\"#7a0177\",\"#49006a\"],Greens:[\"#f7fcf5\",\"#e5f5e0\",\"#c7e9c0\",\"#a1d99b\",\"#74c476\",\"#41ab5d\",\"#238b45\",\"#006d2c\",\"#00441b\"],YlGnBu:[\"#ffffd9\",\"#edf8b1\",\"#c7e9b4\",\"#7fcdbb\",\"#41b6c4\",\"#1d91c0\",\"#225ea8\",\"#253494\",\"#081d58\"],Purples:[\"#fcfbfd\",\"#efedf5\",\"#dadaeb\",\"#bcbddc\",\"#9e9ac8\",\"#807dba\",\"#6a51a3\",\"#54278f\",\"#3f007d\"],GnBu:[\"#f7fcf0\",\"#e0f3db\",\"#ccebc5\",\"#a8ddb5\",\"#7bccc4\",\"#4eb3d3\",\"#2b8cbe\",\"#0868ac\",\"#084081\"],Greys:[\"#ffffff\",\"#f0f0f0\",\"#d9d9d9\",\"#bdbdbd\",\"#969696\",\"#737373\",\"#525252\",\"#252525\",\"#000000\"],YlOrRd:[\"#ffffcc\",\"#ffeda0\",\"#fed976\",\"#feb24c\",\"#fd8d3c\",\"#fc4e2a\",\"#e31a1c\",\"#bd0026\",\"#800026\"],PuRd:[\"#f7f4f9\",\"#e7e1ef\",\"#d4b9da\",\"#c994c7\",\"#df65b0\",\"#e7298a\",\"#ce1256\",\"#980043\",\"#67001f\"],Blues:[\"#f7fbff\",\"#deebf7\",\"#c6dbef\",\"#9ecae1\",\"#6baed6\",\"#4292c6\",\"#2171b5\",\"#08519c\",\"#08306b\"],PuBuGn:[\"#fff7fb\",\"#ece2f0\",\"#d0d1e6\",\"#a6bddb\",\"#67a9cf\",\"#3690c0\",\"#02818a\",\"#016c59\",\"#014636\"],Viridis:[\"#440154\",\"#482777\",\"#3f4a8a\",\"#31678e\",\"#26838f\",\"#1f9d8a\",\"#6cce5a\",\"#b6de2b\",\"#fee825\"],Spectral:[\"#9e0142\",\"#d53e4f\",\"#f46d43\",\"#fdae61\",\"#fee08b\",\"#ffffbf\",\"#e6f598\",\"#abdda4\",\"#66c2a5\",\"#3288bd\",\"#5e4fa2\"],RdYlGn:[\"#a50026\",\"#d73027\",\"#f46d43\",\"#fdae61\",\"#fee08b\",\"#ffffbf\",\"#d9ef8b\",\"#a6d96a\",\"#66bd63\",\"#1a9850\",\"#006837\"],RdBu:[\"#67001f\",\"#b2182b\",\"#d6604d\",\"#f4a582\",\"#fddbc7\",\"#f7f7f7\",\"#d1e5f0\",\"#92c5de\",\"#4393c3\",\"#2166ac\",\"#053061\"],PiYG:[\"#8e0152\",\"#c51b7d\",\"#de77ae\",\"#f1b6da\",\"#fde0ef\",\"#f7f7f7\",\"#e6f5d0\",\"#b8e186\",\"#7fbc41\",\"#4d9221\",\"#276419\"],PRGn:[\"#40004b\",\"#762a83\",\"#9970ab\",\"#c2a5cf\",\"#e7d4e8\",\"#f7f7f7\",\"#d9f0d3\",\"#a6dba0\",\"#5aae61\",\"#1b7837\",\"#00441b\"],RdYlBu:[\"#a50026\",\"#d73027\",\"#f46d43\",\"#fdae61\",\"#fee090\",\"#ffffbf\",\"#e0f3f8\",\"#abd9e9\",\"#74add1\",\"#4575b4\",\"#313695\"],BrBG:[\"#543005\",\"#8c510a\",\"#bf812d\",\"#dfc27d\",\"#f6e8c3\",\"#f5f5f5\",\"#c7eae5\",\"#80cdc1\",\"#35978f\",\"#01665e\",\"#003c30\"],RdGy:[\"#67001f\",\"#b2182b\",\"#d6604d\",\"#f4a582\",\"#fddbc7\",\"#ffffff\",\"#e0e0e0\",\"#bababa\",\"#878787\",\"#4d4d4d\",\"#1a1a1a\"],PuOr:[\"#7f3b08\",\"#b35806\",\"#e08214\",\"#fdb863\",\"#fee0b6\",\"#f7f7f7\",\"#d8daeb\",\"#b2abd2\",\"#8073ac\",\"#542788\",\"#2d004b\"],Set2:[\"#66c2a5\",\"#fc8d62\",\"#8da0cb\",\"#e78ac3\",\"#a6d854\",\"#ffd92f\",\"#e5c494\",\"#b3b3b3\"],Accent:[\"#7fc97f\",\"#beaed4\",\"#fdc086\",\"#ffff99\",\"#386cb0\",\"#f0027f\",\"#bf5b17\",\"#666666\"],Set1:[\"#e41a1c\",\"#377eb8\",\"#4daf4a\",\"#984ea3\",\"#ff7f00\",\"#ffff33\",\"#a65628\",\"#f781bf\",\"#999999\"],Set3:[\"#8dd3c7\",\"#ffffb3\",\"#bebada\",\"#fb8072\",\"#80b1d3\",\"#fdb462\",\"#b3de69\",\"#fccde5\",\"#d9d9d9\",\"#bc80bd\",\"#ccebc5\",\"#ffed6f\"],Dark2:[\"#1b9e77\",\"#d95f02\",\"#7570b3\",\"#e7298a\",\"#66a61e\",\"#e6ab02\",\"#a6761d\",\"#666666\"],Paired:[\"#a6cee3\",\"#1f78b4\",\"#b2df8a\",\"#33a02c\",\"#fb9a99\",\"#e31a1c\",\"#fdbf6f\",\"#ff7f00\",\"#cab2d6\",\"#6a3d9a\",\"#ffff99\",\"#b15928\"],Pastel2:[\"#b3e2cd\",\"#fdcdac\",\"#cbd5e8\",\"#f4cae4\",\"#e6f5c9\",\"#fff2ae\",\"#f1e2cc\",\"#cccccc\"],Pastel1:[\"#fbb4ae\",\"#b3cde3\",\"#ccebc5\",\"#decbe4\",\"#fed9a6\",\"#ffffcc\",\"#e5d8bd\",\"#fddaec\",\"#f2f2f2\"]},colorbrewerTypes=Object.keys(colorbrewer),typeMap=new Map(colorbrewerTypes.map((e=>[e.toLowerCase(),e]))),colorbrewerProxy=\"function\"==typeof Proxy?new Proxy(colorbrewer,{get(e,t){const a=t.toLowerCase();if(typeMap.has(a))return e[typeMap.get(a)]},getOwnPropertyNames:()=>Object.getOwnPropertyNames(colorbrewerTypes)}):colorbrewer,cmyk2rgb=(...e)=>{e=unpack(e,\"cmyk\");const[t,a,i,n]=e,r=e.length>4?e[4]:1;return 1===n?[0,0,0,r]:[t>=1?0:255*(1-t)*(1-n),a>=1?0:255*(1-a)*(1-n),i>=1?0:255*(1-i)*(1-n),r]},{max:max}=Math,rgb2cmyk=(...e)=>{let[t,a,i]=unpack(e,\"rgb\");t/=255,a/=255,i/=255;const n=1-max(t,max(a,i)),r=n<1?1/(1-n):0;return[(1-t-n)*r,(1-a-n)*r,(1-i-n)*r,n]};Color.prototype.cmyk=function(){return rgb2cmyk(this._rgb)};const cmyk=(...e)=>new Color(...e,\"cmyk\");Object.assign(chroma,{cmyk:cmyk}),input.format.cmyk=cmyk2rgb,input.autodetect.push({p:2,test:(...e)=>{if(\"array\"===type(e=unpack(e,\"cmyk\"))&&4===e.length)return\"cmyk\"}});const hsl2css=(...e)=>{const t=unpack(e,\"hsla\");let a=last(e)||\"lsa\";return t[0]=rnd2(t[0]||0)+\"deg\",t[1]=rnd2(100*t[1])+\"%\",t[2]=rnd2(100*t[2])+\"%\",\"hsla\"===a||t.length>3&&t[3]<1?(t[3]=\"/ \"+(t.length>3?t[3]:1),a=\"hsla\"):t.length=3,`${a.substr(0,3)}(${t.join(\" \")})`},lab2css=(...e)=>{const t=unpack(e,\"lab\");let a=last(e)||\"lab\";return t[0]=rnd2(t[0])+\"%\",t[1]=rnd2(t[1]),t[2]=rnd2(t[2]),\"laba\"===a||t.length>3&&t[3]<1?t[3]=\"/ \"+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(\" \")})`},lch2css=(...e)=>{const t=unpack(e,\"lch\");let a=last(e)||\"lab\";return t[0]=rnd2(t[0])+\"%\",t[1]=rnd2(t[1]),t[2]=isNaN(t[2])?\"none\":rnd2(t[2])+\"deg\",\"lcha\"===a||t.length>3&&t[3]<1?t[3]=\"/ \"+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(\" \")})`},oklab2css=(...e)=>{const t=unpack(e,\"lab\");return t[0]=rnd2(100*t[0])+\"%\",t[1]=rnd3(t[1]),t[2]=rnd3(t[2]),t.length>3&&t[3]<1?t[3]=\"/ \"+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(\" \")})`},rgb2oklch=(...e)=>{const[t,a,i,...n]=unpack(e,\"rgb\"),[r,s,o]=rgb2oklab(t,a,i),[l,c,d]=lab2lch(r,s,o);return[l,c,d,...n.length>0&&n[0]<1?[n[0]]:[]]},oklch2css=(...e)=>{const t=unpack(e,\"lch\");return t[0]=rnd2(100*t[0])+\"%\",t[1]=rnd3(t[1]),t[2]=isNaN(t[2])?\"none\":rnd2(t[2])+\"deg\",t.length>3&&t[3]<1?t[3]=\"/ \"+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(\" \")})`},{round:round$2}=Math,rgb2css=(...e)=>{const t=unpack(e,\"rgba\");let a=last(e)||\"rgb\";if(\"hsl\"===a.substr(0,3))return hsl2css(rgb2hsl$1(t),a);if(\"lab\"===a.substr(0,3)){const e=getLabWhitePoint();setLabWhitePoint(\"d50\");const i=lab2css(rgb2lab(t),a);return setLabWhitePoint(e),i}if(\"lch\"===a.substr(0,3)){const e=getLabWhitePoint();setLabWhitePoint(\"d50\");const i=lch2css(rgb2lch(t),a);return setLabWhitePoint(e),i}return\"oklab\"===a.substr(0,5)?oklab2css(rgb2oklab(t)):\"oklch\"===a.substr(0,5)?oklch2css(rgb2oklch(t)):(t[0]=round$2(t[0]),t[1]=round$2(t[1]),t[2]=round$2(t[2]),(\"rgba\"===a||t.length>3&&t[3]<1)&&(t[3]=\"/ \"+(t.length>3?t[3]:1),a=\"rgba\"),`${a.substr(0,3)}(${t.slice(0,\"rgb\"===a?3:4).join(\" \")})`)},oklch2rgb=(...e)=>{e=unpack(e,\"lch\");const[t,a,i,...n]=e,[r,s,o]=lch2lab(t,a,i),[l,c,d]=oklab2rgb(r,s,o);return[l,c,d,...n.length>0&&n[0]<1?[n[0]]:[]]},INT_OR_PCT=/((?:-?\\d+)|(?:-?\\d+(?:\\.\\d+)?)%|none)/.source,FLOAT_OR_PCT=/((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%?)|none)/.source,PCT=/((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%)|none)/.source,RE_S=/\\s*/.source,SEP=/\\s+/.source,COMMA=/\\s*,\\s*/.source,ANLGE=/((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:deg)?)|none)/.source,ALPHA=/\\s*(?:\\/\\s*((?:[01]|[01]?\\.\\d+)|\\d+(?:\\.\\d+)?%))?/.source,RE_RGB=new RegExp(\"^rgba?\\\\(\"+RE_S+[INT_OR_PCT,INT_OR_PCT,INT_OR_PCT].join(SEP)+ALPHA+\"\\\\)$\"),RE_RGB_LEGACY=new RegExp(\"^rgb\\\\(\"+RE_S+[INT_OR_PCT,INT_OR_PCT,INT_OR_PCT].join(COMMA)+RE_S+\"\\\\)$\"),RE_RGBA_LEGACY=new RegExp(\"^rgba\\\\(\"+RE_S+[INT_OR_PCT,INT_OR_PCT,INT_OR_PCT,FLOAT_OR_PCT].join(COMMA)+RE_S+\"\\\\)$\"),RE_HSL=new RegExp(\"^hsla?\\\\(\"+RE_S+[ANLGE,PCT,PCT].join(SEP)+ALPHA+\"\\\\)$\"),RE_HSL_LEGACY=new RegExp(\"^hsl?\\\\(\"+RE_S+[ANLGE,PCT,PCT].join(COMMA)+RE_S+\"\\\\)$\"),RE_HSLA_LEGACY=/^hsla\\(\\s*(-?\\d+(?:\\.\\d+)?),\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*(-?\\d+(?:\\.\\d+)?)%\\s*,\\s*([01]|[01]?\\.\\d+)\\)$/,RE_LAB=new RegExp(\"^lab\\\\(\"+RE_S+[FLOAT_OR_PCT,FLOAT_OR_PCT,FLOAT_OR_PCT].join(SEP)+ALPHA+\"\\\\)$\"),RE_LCH=new RegExp(\"^lch\\\\(\"+RE_S+[FLOAT_OR_PCT,FLOAT_OR_PCT,ANLGE].join(SEP)+ALPHA+\"\\\\)$\"),RE_OKLAB=new RegExp(\"^oklab\\\\(\"+RE_S+[FLOAT_OR_PCT,FLOAT_OR_PCT,FLOAT_OR_PCT].join(SEP)+ALPHA+\"\\\\)$\"),RE_OKLCH=new RegExp(\"^oklch\\\\(\"+RE_S+[FLOAT_OR_PCT,FLOAT_OR_PCT,ANLGE].join(SEP)+ALPHA+\"\\\\)$\"),{round:round$1}=Math,roundRGB=e=>e.map(((e,t)=>t<=2?limit(round$1(e),0,255):e)),percentToAbsolute=(e,t=0,a=100,i=!1)=>(\"string\"==typeof e&&e.endsWith(\"%\")&&(e=parseFloat(e.substring(0,e.length-1))/100,e=i?t+.5*(e+1)*(a-t):t+e*(a-t)),+e),noneToValue=(e,t)=>\"none\"===e?t:e,css2rgb=e=>{if(\"transparent\"===(e=e.toLowerCase().trim()))return[0,0,0,0];let t;if(input.format.named)try{return input.format.named(e)}catch(e){}if((t=e.match(RE_RGB))||(t=e.match(RE_RGB_LEGACY))){let e=t.slice(1,4);for(let t=0;t<3;t++)e[t]=+percentToAbsolute(noneToValue(e[t],0),0,255);e=roundRGB(e);const a=void 0!==t[4]?+percentToAbsolute(t[4],0,1):1;return e[3]=a,e}if(t=e.match(RE_RGBA_LEGACY)){const e=t.slice(1,5);for(let t=0;t<4;t++)e[t]=+percentToAbsolute(e[t],0,255);return e}if((t=e.match(RE_HSL))||(t=e.match(RE_HSL_LEGACY))){const e=t.slice(1,4);e[0]=+noneToValue(e[0].replace(\"deg\",\"\"),0),e[1]=.01*+percentToAbsolute(noneToValue(e[1],0),0,100),e[2]=.01*+percentToAbsolute(noneToValue(e[2],0),0,100);const a=roundRGB(hsl2rgb(e)),i=void 0!==t[4]?+percentToAbsolute(t[4],0,1):1;return a[3]=i,a}if(t=e.match(RE_HSLA_LEGACY)){const e=t.slice(1,4);e[1]*=.01,e[2]*=.01;const a=hsl2rgb(e);for(let e=0;e<3;e++)a[e]=round$1(a[e]);return a[3]=+t[4],a}if(t=e.match(RE_LAB)){const e=t.slice(1,4);e[0]=percentToAbsolute(noneToValue(e[0],0),0,100),e[1]=percentToAbsolute(noneToValue(e[1],0),-125,125,!0),e[2]=percentToAbsolute(noneToValue(e[2],0),-125,125,!0);const a=getLabWhitePoint();setLabWhitePoint(\"d50\");const i=roundRGB(lab2rgb(e));setLabWhitePoint(a);const n=void 0!==t[4]?+percentToAbsolute(t[4],0,1):1;return i[3]=n,i}if(t=e.match(RE_LCH)){const e=t.slice(1,4);e[0]=percentToAbsolute(e[0],0,100),e[1]=percentToAbsolute(noneToValue(e[1],0),0,150,!1),e[2]=+noneToValue(e[2].replace(\"deg\",\"\"),0);const a=getLabWhitePoint();setLabWhitePoint(\"d50\");const i=roundRGB(lch2rgb(e));setLabWhitePoint(a);const n=void 0!==t[4]?+percentToAbsolute(t[4],0,1):1;return i[3]=n,i}if(t=e.match(RE_OKLAB)){const e=t.slice(1,4);e[0]=percentToAbsolute(noneToValue(e[0],0),0,1),e[1]=percentToAbsolute(noneToValue(e[1],0),-.4,.4,!0),e[2]=percentToAbsolute(noneToValue(e[2],0),-.4,.4,!0);const a=roundRGB(oklab2rgb(e)),i=void 0!==t[4]?+percentToAbsolute(t[4],0,1):1;return a[3]=i,a}if(t=e.match(RE_OKLCH)){const e=t.slice(1,4);e[0]=percentToAbsolute(noneToValue(e[0],0),0,1),e[1]=percentToAbsolute(noneToValue(e[1],0),0,.4,!1),e[2]=+noneToValue(e[2].replace(\"deg\",\"\"),0);const a=roundRGB(oklch2rgb(e)),i=void 0!==t[4]?+percentToAbsolute(t[4],0,1):1;return a[3]=i,a}};css2rgb.test=e=>RE_RGB.test(e)||RE_HSL.test(e)||RE_LAB.test(e)||RE_LCH.test(e)||RE_OKLAB.test(e)||RE_OKLCH.test(e)||RE_RGB_LEGACY.test(e)||RE_RGBA_LEGACY.test(e)||RE_HSL_LEGACY.test(e)||RE_HSLA_LEGACY.test(e)||\"transparent\"===e,Color.prototype.css=function(e){return rgb2css(this._rgb,e)};const css=(...e)=>new Color(...e,\"css\");chroma.css=css,input.format.css=css2rgb,input.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&\"string\"===type(e)&&css2rgb.test(e))return\"css\"}}),input.format.gl=(...e)=>{const t=unpack(e,\"rgba\");return t[0]*=255,t[1]*=255,t[2]*=255,t};const gl=(...e)=>new Color(...e,\"gl\");chroma.gl=gl,Color.prototype.gl=function(){const e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]},Color.prototype.hex=function(e){return rgb2hex(this._rgb,e)};const hex=(...e)=>new Color(...e,\"hex\");chroma.hex=hex,input.format.hex=hex2rgb,input.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&\"string\"===type(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return\"hex\"}});const{log:log}=Math,temperature2rgb=e=>{const t=e/100;let a,i,n;return t<66?(a=255,i=t<6?0:-155.25485562709179-.44596950469579133*(i=t-2)+104.49216199393888*log(i),n=t<20?0:.8274096064007395*(n=t-10)-254.76935184120902+115.67994401066147*log(n)):(a=351.97690566805693+.114206453784165*(a=t-55)-40.25366309332127*log(a),i=325.4494125711974+.07943456536662342*(i=t-50)-28.0852963507957*log(i),n=255),[a,i,n,1]},{round:round}=Math,rgb2temperature=(...e)=>{const t=unpack(e,\"rgb\"),a=t[0],i=t[2];let n,r=1e3,s=4e4;for(;s-r>.4;){n=.5*(s+r);const e=temperature2rgb(n);e[2]/e[0]>=i/a?s=n:r=n}return round(n)};Color.prototype.temp=Color.prototype.kelvin=Color.prototype.temperature=function(){return rgb2temperature(this._rgb)};const temp=(...e)=>new Color(...e,\"temp\");Object.assign(chroma,{temp:temp,kelvin:temp,temperature:temp}),input.format.temp=input.format.kelvin=input.format.temperature=temperature2rgb,Color.prototype.oklch=function(){return rgb2oklch(this._rgb)};const oklch=(...e)=>new Color(...e,\"oklch\");function hexWithAlpha(e,t){return chroma(e).alpha(t).css()}function has(e,t){return e.hasAttribute(t)}function get(e,t,a){return e.getAttribute(t)||a||\"\"}function getNum(e,t,a){const i=Number(get(e,t));return Number.isNaN(i)?a||0:i}Object.assign(chroma,{oklch:oklch}),input.format.oklch=oklch2rgb,input.autodetect.push({p:2,test:(...e)=>{if(\"array\"===type(e=unpack(e,\"oklch\"))&&3===e.length)return\"oklch\"}}),Object.assign(chroma,{analyze:analyze,average:average,bezier:bezier$1,blend:blend,brewer:colorbrewerProxy,Color:Color,colors:w3cx11,contrast:contrast,contrastAPCA:contrastAPCA,cubehelix:cubehelix,deltaE:deltaE,distance:distance$1,input:input,interpolate:mix,limits:limits,mix:mix,random:random$1,scale:scale,scales:scales,valid:valid});const attrHandlers={stroke:({el:e,exVals:t})=>{const a=get(e,\"stroke\");t.strokeColor=has(e,\"stroke-opacity\")?hexWithAlpha(a,getNum(e,\"stroke-opacity\")):a},\"stroke-opacity\":({el:e,exVals:t})=>{t.strokeColor=hexWithAlpha(get(e,\"stroke\",\"#000000\"),getNum(e,\"stroke-opacity\"))},\"stroke-width\":({el:e,exVals:t})=>{t.strokeWidth=getNum(e,\"stroke-width\")},fill:({el:e,exVals:t})=>{const a=get(e,\"fill\");t.backgroundColor=\"none\"===a?\"#00000000\":a},\"fill-opacity\":({el:e,exVals:t})=>{t.backgroundColor=hexWithAlpha(get(e,\"fill\",\"#000000\"),getNum(e,\"fill-opacity\"))},opacity:({el:e,exVals:t})=>{t.opacity=getNum(e,\"opacity\",100)}};function presAttrsToElementValues(e){return[...e.attributes].reduce(((t,a)=>{const i=a.name;return Object.keys(attrHandlers).includes(i)&&attrHandlers[i]({el:e,exVals:t}),t}),{})}function filterAttrsToElementValues(e){const t={};return has(e,\"x\")&&(t.x=getNum(e,\"x\")),has(e,\"y\")&&(t.y=getNum(e,\"y\")),has(e,\"width\")&&(t.width=getNum(e,\"width\")),has(e,\"height\")&&(t.height=getNum(e,\"height\")),t}function pointsAttrToPoints(e){let t=[];return has(e,\"points\")&&(t=get(e,\"points\").split(\" \").map((e=>e.split(\",\").map(parseFloat)))),t}function getGroupAttrs(e){return e.reduce(((e,{element:t})=>({...e,...presAttrsToElementValues(t)})),{})}class Group{id=randomId();element;constructor(e){this.element=e}}function createExElement(){return{id:randomId(),x:0,y:0,strokeColor:\"#000000\",backgroundColor:\"#000000\",fillStyle:\"solid\",strokeWidth:1,strokeStyle:\"solid\",roundness:null,roughness:0,opacity:100,width:0,height:0,angle:0,seed:randomInteger(),version:0,versionNonce:0,isDeleted:!1,groupIds:[],boundElementIds:null}}function createExRect(){return{...createExElement(),type:\"rectangle\"}}function createExLine(){return{...createExElement(),type:\"line\",points:[]}}function createExEllipse(){return{...createExElement(),type:\"ellipse\"}}function createExDraw(){return{...createExElement(),type:\"line\",points:[]}}const transformFunctions={matrix:\"matrix\",matrix3d:\"matrix3d\",perspective:\"perspective\",rotate:\"rotate\",rotate3d:\"rotate3d\",rotateX:\"rotateX\",rotateY:\"rotateY\",rotateZ:\"rotateZ\",scale:\"scale\",scale3d:\"scale3d\",scaleX:\"scaleX\",scaleY:\"scaleY\",scaleZ:\"scaleZ\",skew:\"skew\",skewX:\"skewX\",skewY:\"skewY\",translate:\"translate\",translate3d:\"translate3d\",translateX:\"translateX\",translateY:\"translateY\",translateZ:\"translateZ\"},transformFunctionsArr=Object.keys(transformFunctions),defaultUnits={matrix:\"\",matrix3d:\"\",perspective:\"perspective\",rotate:\"deg\",rotate3d:\"deg\",rotateX:\"deg\",rotateY:\"deg\",rotateZ:\"deg\",scale:\"\",scale3d:\"\",scaleX:\"\",scaleY:\"\",scaleZ:\"\",skew:\"skew\",skewX:\"deg\",skewY:\"deg\",translate:\"px\",translate3d:\"px\",translateX:\"px\",translateY:\"px\",translateZ:\"px\"},svgTransformToCSSTransform=e=>{const t=e.match(/(\\w+)\\(([^)]*)\\)/g);if(!t)return\"\";const a=t.map((e=>{const t=e.split(\"(\")[0];if(!t)throw new Error(\"Unable to find transform name\");if(!transformFunctionsArr.includes(t))throw new Error(`transform function name \"${t}\" is not valid`);const a=e.match(/([-+]?[0-9]*\\.?[0-9]+)([a-z])*/g);if(!a)return{type:t,values:[]};let i=a.map((e=>{const[a,i]=e.matchAll(/([-+]?[0-9]*\\.?[0-9]+)|([a-z])*/g);return{unit:i[0]||defaultUnits[t],value:a[0]}}));return i&&\"rotate\"===t&&i?.length>1&&(i=[i[0]]),{type:t,values:i}})),i=a.map((({type:e,values:t})=>`${e}(${t.map((({unit:e,value:t})=>`${t}${e}`)).join(\", \")})`)).join(\" \");return i};function getElementMatrix(e){if(e.hasAttribute(\"transform\")){const t=new DOMMatrix(svgTransformToCSSTransform(e.getAttribute(\"transform\")||\"\"));return multiply$1(create$1(),create$1(),t.toFloat32Array())}return create$1()}function getTransformMatrix(e,t){return t.map((({element:e})=>getElementMatrix(e))).concat([getElementMatrix(e)]).reduce(((e,t)=>multiply$1(e,e,t)),create$1())}function transformPoints(e,t){return e.map((([e,a])=>{const[i,n]=transformMat4(create(),fromValues(e,a,1),t);return[i,n]}))}function distance(e,t){return Math.sqrt(distanceSq(e,t))}function distanceSq(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function distanceToSegmentSq(e,t,a){const i=distanceSq(t,a);if(0===i)return distanceSq(e,t);let n=((e[0]-t[0])*(a[0]-t[0])+(e[1]-t[1])*(a[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),distanceSq(e,lerp(t,a,n))}function lerp(e,t,a){return[e[0]+(t[0]-e[0])*a,e[1]+(t[1]-e[1])*a]}function flatness(e,t){const a=e[t+0],i=e[t+1],n=e[t+2],r=e[t+3];let s=3*i[0]-2*a[0]-r[0];s*=s;let o=3*i[1]-2*a[1]-r[1];o*=o;let l=3*n[0]-2*r[0]-a[0];l*=l;let c=3*n[1]-2*r[1]-a[1];return c*=c,s<l&&(s=l),o<c&&(o=c),s+o}function getPointsOnBezierCurveWithSplitting(e,t,a,i){const n=i||[];if(flatness(e,t)<a){const a=e[t+0];n.length?distance(n[n.length-1],a)>1&&n.push(a):n.push(a),n.push(e[t+3])}else{const i=.5,r=e[t+0],s=e[t+1],o=e[t+2],l=e[t+3],c=lerp(r,s,i),d=lerp(s,o,i),h=lerp(o,l,i),p=lerp(c,d,i),u=lerp(d,h,i),m=lerp(p,u,i);getPointsOnBezierCurveWithSplitting([r,c,p,m],0,a,n),getPointsOnBezierCurveWithSplitting([m,u,h,l],0,a,n)}return n}function simplify(e,t){return simplifyPoints(e,0,e.length,t)}function simplifyPoints(e,t,a,i,n){const r=n||[],s=e[t],o=e[a-1];let l=0,c=1;for(let i=t+1;i<a-1;++i){const t=distanceToSegmentSq(e[i],s,o);t>l&&(l=t,c=i)}return Math.sqrt(l)>i?(simplifyPoints(e,t,c+1,i,r),simplifyPoints(e,c,a,i,r)):(r.length||r.push(s),r.push(o)),r}function pointsOnBezierCurves(e,t=.15,a){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)getPointsOnBezierCurveWithSplitting(e,3*a,t,i);return a&&a>0?simplifyPoints(i,0,i.length,a):i}const COMMAND=0,NUMBER=1,EOD=2,PARAMS={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function tokenize(e){const t=new Array;for(;\"\"!==e;)if(e.match(/^([ \\t\\r\\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:COMMAND,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\\.[0-9]*)?|[-+]?\\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:NUMBER,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:EOD,text:\"\"},t}function isType(e,t){return e.type===t}function parsePath(e){const t=[],a=tokenize(e);let i=\"BOD\",n=0,r=a[n];for(;!isType(r,EOD);){let s=0;const o=[];if(\"BOD\"===i){if(\"M\"!==r.text&&\"m\"!==r.text)return parsePath(\"M0,0\"+e);n++,s=PARAMS[r.text],i=r.text}else isType(r,NUMBER)?s=PARAMS[i]:(n++,s=PARAMS[r.text],i=r.text);if(!(n+s<a.length))throw new Error(\"Path data ended short\");for(let e=n;e<n+s;e++){const t=a[e];if(!isType(t,NUMBER))throw new Error(\"Param not a number: \"+i+\",\"+t.text);o[o.length]=+t.text}if(\"number\"!=typeof PARAMS[i])throw new Error(\"Bad segment: \"+i);{const e={key:i,data:o};t.push(e),n+=s,r=a[n],\"M\"===i&&(i=\"L\"),\"m\"===i&&(i=\"l\")}}return t}function absolutize(e){let t=0,a=0,i=0,n=0;const r=[];for(const{key:s,data:o}of e)switch(s){case\"M\":r.push({key:\"M\",data:[...o]}),[t,a]=o,[i,n]=o;break;case\"m\":t+=o[0],a+=o[1],r.push({key:\"M\",data:[t,a]}),i=t,n=a;break;case\"L\":r.push({key:\"L\",data:[...o]}),[t,a]=o;break;case\"l\":t+=o[0],a+=o[1],r.push({key:\"L\",data:[t,a]});break;case\"C\":r.push({key:\"C\",data:[...o]}),t=o[4],a=o[5];break;case\"c\":{const e=o.map(((e,i)=>i%2?e+a:e+t));r.push({key:\"C\",data:e}),t=e[4],a=e[5];break}case\"Q\":r.push({key:\"Q\",data:[...o]}),t=o[2],a=o[3];break;case\"q\":{const e=o.map(((e,i)=>i%2?e+a:e+t));r.push({key:\"Q\",data:e}),t=e[2],a=e[3];break}case\"A\":r.push({key:\"A\",data:[...o]}),t=o[5],a=o[6];break;case\"a\":t+=o[5],a+=o[6],r.push({key:\"A\",data:[o[0],o[1],o[2],o[3],o[4],t,a]});break;case\"H\":r.push({key:\"H\",data:[...o]}),t=o[0];break;case\"h\":t+=o[0],r.push({key:\"H\",data:[t]});break;case\"V\":r.push({key:\"V\",data:[...o]}),a=o[0];break;case\"v\":a+=o[0],r.push({key:\"V\",data:[a]});break;case\"S\":r.push({key:\"S\",data:[...o]}),t=o[2],a=o[3];break;case\"s\":{const e=o.map(((e,i)=>i%2?e+a:e+t));r.push({key:\"S\",data:e}),t=e[2],a=e[3];break}case\"T\":r.push({key:\"T\",data:[...o]}),t=o[0],a=o[1];break;case\"t\":t+=o[0],a+=o[1],r.push({key:\"T\",data:[t,a]});break;case\"Z\":case\"z\":r.push({key:\"Z\",data:[]}),t=i,a=n}return r}function normalize(e){const t=[];let a=\"\",i=0,n=0,r=0,s=0,o=0,l=0;for(const{key:c,data:d}of e){switch(c){case\"M\":t.push({key:\"M\",data:[...d]}),[i,n]=d,[r,s]=d;break;case\"C\":t.push({key:\"C\",data:[...d]}),i=d[4],n=d[5],o=d[2],l=d[3];break;case\"L\":t.push({key:\"L\",data:[...d]}),[i,n]=d;break;case\"H\":i=d[0],t.push({key:\"L\",data:[i,n]});break;case\"V\":n=d[0],t.push({key:\"L\",data:[i,n]});break;case\"S\":{let e=0,r=0;\"C\"===a||\"S\"===a?(e=i+(i-o),r=n+(n-l)):(e=i,r=n),t.push({key:\"C\",data:[e,r,...d]}),o=d[0],l=d[1],i=d[2],n=d[3];break}case\"T\":{const[e,r]=d;let s=0,c=0;\"Q\"===a||\"T\"===a?(s=i+(i-o),c=n+(n-l)):(s=i,c=n);const h=i+2*(s-i)/3,p=n+2*(c-n)/3,u=e+2*(s-e)/3,m=r+2*(c-r)/3;t.push({key:\"C\",data:[h,p,u,m,e,r]}),o=s,l=c,i=e,n=r;break}case\"Q\":{const[e,a,r,s]=d,c=i+2*(e-i)/3,h=n+2*(a-n)/3,p=r+2*(e-r)/3,u=s+2*(a-s)/3;t.push({key:\"C\",data:[c,h,p,u,r,s]}),o=e,l=a,i=r,n=s;break}case\"A\":{const e=Math.abs(d[0]),a=Math.abs(d[1]),r=d[2],s=d[3],o=d[4],l=d[5],c=d[6];0===e||0===a?(t.push({key:\"C\",data:[i,n,l,c,l,c]}),i=l,n=c):i===l&&n===c||(arcToCubicCurves(i,n,l,c,e,a,r,s,o).forEach((function(e){t.push({key:\"C\",data:e})})),i=l,n=c);break}case\"Z\":t.push({key:\"Z\",data:[]}),i=r,n=s}a=c}return t}function degToRad(e){return Math.PI*e/180}function rotate(e,t,a){return[e*Math.cos(a)-t*Math.sin(a),e*Math.sin(a)+t*Math.cos(a)]}function arcToCubicCurves(e,t,a,i,n,r,s,o,l,c){const d=degToRad(s);let h=[],p=0,u=0,m=0,g=0;if(c)[p,u,m,g]=c;else{[e,t]=rotate(e,t,-d),[a,i]=rotate(a,i,-d);const s=(e-a)/2,c=(t-i)/2;let h=s*s/(n*n)+c*c/(r*r);h>1&&(h=Math.sqrt(h),n*=h,r*=h);const f=n*n,b=r*r,U=f*b-f*c*c-b*s*s,E=f*c*c+b*s*s,w=(o===l?-1:1)*Math.sqrt(Math.abs(U/E));m=w*n*c/r+(e+a)/2,g=w*-r*s/n+(t+i)/2,p=Math.asin(parseFloat(((t-g)/r).toFixed(9))),u=Math.asin(parseFloat(((i-g)/r).toFixed(9))),e<m&&(p=Math.PI-p),a<m&&(u=Math.PI-u),p<0&&(p=2*Math.PI+p),u<0&&(u=2*Math.PI+u),l&&p>u&&(p-=2*Math.PI),!l&&u>p&&(u-=2*Math.PI)}let f=u-p;if(Math.abs(f)>120*Math.PI/180){const e=u,t=a,o=i;u=l&&u>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,h=arcToCubicCurves(a=m+n*Math.cos(u),i=g+r*Math.sin(u),t,o,n,r,s,0,l,[u,e,m,g])}f=u-p;const b=Math.cos(p),U=Math.sin(p),E=Math.cos(u),w=Math.sin(u),y=Math.tan(f/4),v=4/3*n*y,T=4/3*r*y,S=[e,t],_=[e+v*U,t-T*b],C=[a+v*w,i-T*E],I=[a,i];if(_[0]=2*S[0]-_[0],_[1]=2*S[1]-_[1],c)return[_,C,I].concat(h);{h=[_,C,I].concat(h);const e=[];for(let t=0;t<h.length;t+=3){const a=rotate(h[t][0],h[t][1],d),i=rotate(h[t+1][0],h[t+1][1],d),n=rotate(h[t+2][0],h[t+2][1],d);e.push([a[0],a[1],i[0],i[1],n[0],n[1]])}return e}}function pointsOnPath(e,t,a){const i=normalize(absolutize(parsePath(e))),n=[];let r=[],s=[0,0],o=[];const l=()=>{o.length>=4&&r.push(...pointsOnBezierCurves(o,t)),o=[]},c=()=>{l(),r.length&&(n.push(r),r=[])};for(const{key:e,data:t}of i)switch(e){case\"M\":c(),s=[t[0],t[1]],r.push(s);break;case\"L\":l(),r.push([t[0],t[1]]);break;case\"C\":if(!o.length){const e=r.length?r[r.length-1]:s;o.push([e[0],e[1]])}o.push([t[0],t[1]]),o.push([t[2],t[3]]),o.push([t[4],t[5]]);break;case\"Z\":l(),r.push([s[0],s[1]])}if(c(),!a)return n;const d=[];for(const e of n){const t=simplify(e,a);t.length&&d.push(t)}return d}const SUPPORTED_TAGS=[\"svg\",\"path\",\"g\",\"use\",\"circle\",\"ellipse\",\"rect\",\"polyline\",\"polygon\",\"switch\"],nodeValidator=e=>SUPPORTED_TAGS.includes(e.tagName)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;function createTreeWalker(e){return document.createTreeWalker(e,NodeFilter.SHOW_ALL,{acceptNode:nodeValidator})}const presAttrs=(e,t)=>({...getGroupAttrs(t),...presAttrsToElementValues(e),...filterAttrsToElementValues(e)}),skippedUseAttrs=[\"id\"],allwaysPassedUseAttrs=[\"x\",\"y\",\"width\",\"height\",\"href\",\"xlink:href\"],getDefElWithCorrectAttrs=(e,t)=>[...t.attributes].reduce(((a,i)=>(skippedUseAttrs.includes(i.value)||e.hasAttribute(i.name)&&!allwaysPassedUseAttrs.includes(i.name)||a.setAttribute(i.name,t.getAttribute(i.name)||\"\"),a)),e.cloneNode()),walkers={svg:e=>{walk(e,e.tw.nextNode())},switch:e=>{const t={...e,tw:createTreeWalker(e.tw.currentNode),groups:[...e.groups,new Group(e.tw.currentNode)]};walk(t,t.tw.nextNode()),walk(e,e.tw.nextSibling())},g:e=>{const t={...e,tw:createTreeWalker(e.tw.currentNode),groups:[...e.groups,new Group(e.tw.currentNode)]};walk(t,t.tw.nextNode()),walk(e,e.tw.nextSibling())},use:e=>{const{root:t,tw:a,scene:i}=e,n=a.currentNode,r=n.getAttribute(\"href\")||n.getAttribute(\"xlink:href\");if(!r)throw new Error(\"unable to get id of use element\");const s=t.querySelector(r);if(!s)throw new Error(`unable to find def element with id: ${r}`);const o=new ExcalidrawScene,l=getDefElWithCorrectAttrs(s,n);walk({...e,scene:o,tw:createTreeWalker(l)},l);const c=o.elements.pop();c&&i.elements.push(c),walk(e,e.tw.nextNode())},circle:e=>{const{tw:t,scene:a,groups:i}=e,n=t.currentNode,r=getNum(n,\"r\",0),s=2*r,o=getNum(n,\"x\",0)+getNum(n,\"cx\",0)-r,l=getNum(n,\"y\",0)+getNum(n,\"cy\",0)-r,c=getTransformMatrix(n,i),d=fromValues$1(s,0,0,0,0,s,0,0,0,0,1,0,o,l,0,1),h=multiply$1(create$1(),c,d),p={...createExEllipse(),...presAttrs(n,i),x:h[12],y:h[13],width:h[0],height:h[5],groupIds:i.map((e=>e.id))};a.elements.push(p),walk(e,t.nextNode())},ellipse:e=>{const{tw:t,scene:a,groups:i}=e,n=t.currentNode,r=getNum(n,\"rx\",0),s=getNum(n,\"ry\",0),o=getNum(n,\"cx\",0),l=getNum(n,\"cy\",0),c=getNum(n,\"x\",0)+o-r,d=getNum(n,\"y\",0)+l-s,h=2*r,p=2*s,u=getTransformMatrix(n,i),m=fromValues$1(h,0,0,0,0,p,0,0,0,0,1,0,c,d,0,1),g=multiply$1(create$1(),u,m),f={...createExEllipse(),...presAttrs(n,i),x:g[12],y:g[13],width:g[0],height:g[5],groupIds:i.map((e=>e.id))};a.elements.push(f),walk(e,t.nextNode())},line:e=>{walk(e,e.tw.nextNode())},polygon:e=>{const{tw:t,scene:a,groups:i}=e,n=t.currentNode,r=transformPoints(pointsAttrToPoints(n),getTransformMatrix(n,i)),s=r[0][0],o=r[0][1],l=r.map((([e,t])=>[e-s,t-o])),[c,d]=dimensionsFromPoints(l),h={...createExLine(),...getGroupAttrs(i),...presAttrsToElementValues(n),points:l.concat([[0,0]]),x:s,y:o,width:c,height:d};a.elements.push(h),walk(e,e.tw.nextNode())},polyline:e=>{const{tw:t,scene:a,groups:i}=e,n=t.currentNode,r=getTransformMatrix(n,i),s=transformPoints(pointsAttrToPoints(n),r),o=s[0][0],l=s[0][1],c=s.map((([e,t])=>[e-o,t-l])),[d,h]=dimensionsFromPoints(c),p=has(n,\"fill\"),u=get(n,\"fill\"),m=!p||p&&\"none\"!==u,g={...createExLine(),...getGroupAttrs(i),...presAttrsToElementValues(n),points:c.concat(m?[[0,0]]:[]),x:o,y:l,width:d,height:h};a.elements.push(g),walk(e,e.tw.nextNode())},rect:e=>{const{tw:t,scene:a,groups:i}=e,n=t.currentNode,r=getNum(n,\"x\",0),s=getNum(n,\"y\",0),o=getNum(n,\"width\",0),l=getNum(n,\"height\",0),c=getTransformMatrix(n,i),d=fromValues$1(o,0,0,0,0,l,0,0,0,0,1,0,r,s,0,1),h=multiply$1(create$1(),c,d),p=n.hasAttribute(\"rx\")||n.hasAttribute(\"ry\"),u={...createExRect(),...presAttrs(n,i),x:h[12],y:h[13],width:h[0],height:h[5],roundness:p?{type:ROUNDNESS.LEGACY}:null};a.elements.push(u),walk(e,e.tw.nextNode())},path:e=>{const{tw:t,scene:a,groups:i}=e,n=t.currentNode,r=getTransformMatrix(n,i),s=pointsOnPath(get(n,\"d\")),o=get(n,\"fill\",\"black\"),l=get(n,\"fill-rule\",\"nonzero\");let c=[],d=randomId();switch(l){case\"nonzero\":let e=\"clockwise\";c=s.map(((t,a)=>{const s=transformPoints(t,clone(r)),l=s[0][0],c=s[0][1],[h,p]=dimensionsFromPoints(s),u=s.map((([e,t])=>[e-l,t-c])),m=getWindingOrder(u);0===a&&(e=m,d=randomId());let g=o;return e!==m&&(g=\"#FFFFFF\"),{...createExDraw(),strokeWidth:0,strokeColor:\"#00000000\",...presAttrs(n,i),points:u,backgroundColor:g,width:h,height:p,x:l+getNum(n,\"x\",0),y:c+getNum(n,\"y\",0),groupIds:[d]}}));break;case\"evenodd\":c=s.map(((e,t)=>{const a=transformPoints(e,clone(r)),s=a[0][0],o=a[0][1],[l,c]=dimensionsFromPoints(a),h=a.map((([e,t])=>[e-s,t-o]));return 0===t&&(d=randomId()),{...createExDraw(),...presAttrs(n,i),points:h,width:l,height:c,x:s+getNum(n,\"x\",0),y:o+getNum(n,\"y\",0)}}))}a.elements=a.elements.concat(c),walk(e,t.nextNode())}};function walk(e,t){if(!t)return;const a=t.nodeName;walkers[a]&&walkers[a](e)}const svgToExcalidraw=e=>{try{const t=(new DOMParser).parseFromString(e,\"image/svg+xml\"),a=t.querySelectorAll(\"parsererror\"),i=a.length>0;let n=null;if(i)console.error(\"There were errors while parsing the given SVG: \",[...a].map((e=>e.innerHTML)));else{const e=createTreeWalker(t),a=new ExcalidrawScene;walk({tw:e,scene:a,groups:[],root:t},e.nextNode()),Boolean(a.elements.find((e=>0!==e.opacity)))||a.elements.forEach((e=>{e.opacity=100})),a.elements.forEach((e=>{e.opacity<=1&&(e.opacity=100)})),n=a.elements}return{hasErrors:i,errors:i?`${[...a].map((e=>e.innerHTML))}`:\"\",content:n}}catch(e){return console.log(e),{hasErrors:!0,errors:`${e}`,content:[]}}};function BuildLog$1(){var e,t=0,a=!1;function i(t,a){return e.list.push({type:t,data:a?JSON.parse(JSON.stringify(a)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return i(\"check\",{seg1:e,seg2:t})},segmentChop:function(e,t){return i(\"div_seg\",{seg:e,pt:t}),i(\"chop\",{seg:e,pt:t})},statusRemove:function(e){return i(\"pop_seg\",{seg:e})},segmentUpdate:function(e){return i(\"seg_update\",{seg:e})},segmentNew:function(e,t){return i(\"new_seg\",{seg:e,primary:t})},segmentRemove:function(e){return i(\"rem_seg\",{seg:e})},tempStatus:function(e,t,a){return i(\"temp_status\",{seg:e,above:t,below:a})},rewind:function(e){return i(\"rewind\",{seg:e})},status:function(e,t,a){return i(\"status\",{seg:e,above:t,below:a})},vert:function(t){return t===a?e:(a=t,i(\"vert\",{x:t}))},log:function(e){return\"string\"!=typeof e&&(e=JSON.stringify(e,!1,\"  \")),i(\"log\",{txt:e})},reset:function(){return i(\"reset\")},selected:function(e){return i(\"selected\",{segs:e})},chainStart:function(e){return i(\"chain_start\",{seg:e})},chainRemoveHead:function(e,t){return i(\"chain_rem_head\",{index:e,pt:t})},chainRemoveTail:function(e,t){return i(\"chain_rem_tail\",{index:e,pt:t})},chainNew:function(e,t){return i(\"chain_new\",{pt1:e,pt2:t})},chainMatch:function(e){return i(\"chain_match\",{index:e})},chainClose:function(e){return i(\"chain_close\",{index:e})},chainAddHead:function(e,t){return i(\"chain_add_head\",{index:e,pt:t})},chainAddTail:function(e,t){return i(\"chain_add_tail\",{index:e,pt:t})},chainConnect:function(e,t){return i(\"chain_con\",{index1:e,index2:t})},chainReverse:function(e){return i(\"chain_rev\",{index:e})},chainJoin:function(e,t){return i(\"chain_join\",{index1:e,index2:t})},done:function(){return i(\"done\")}},e}var buildLog$1=BuildLog$1;function Epsilon$1(e){\"number\"!=typeof e&&(e=1e-10);var t={epsilon:function(t){return\"number\"==typeof t&&(e=t),e},pointAboveOrOnLine:function(t,a,i){var n=a[0],r=a[1],s=i[0],o=i[1],l=t[0];return(s-n)*(t[1]-r)-(o-r)*(l-n)>=-e},pointBetween:function(t,a,i){var n=t[1]-a[1],r=i[0]-a[0],s=t[0]-a[0],o=i[1]-a[1],l=s*r+n*o;return!(l<e||l-(r*r+o*o)>-e)},pointsSameX:function(t,a){return Math.abs(t[0]-a[0])<e},pointsSameY:function(t,a){return Math.abs(t[1]-a[1])<e},pointsSame:function(e,a){return t.pointsSameX(e,a)&&t.pointsSameY(e,a)},pointsCompare:function(e,a){return t.pointsSameX(e,a)?t.pointsSameY(e,a)?0:e[1]<a[1]?-1:1:e[0]<a[0]?-1:1},pointsCollinear:function(t,a,i){var n=t[0]-a[0],r=t[1]-a[1],s=a[0]-i[0],o=a[1]-i[1];return Math.abs(n*o-s*r)<e},linesIntersect:function(t,a,i,n){var r=a[0]-t[0],s=a[1]-t[1],o=n[0]-i[0],l=n[1]-i[1],c=r*l-s*o;if(Math.abs(c)<e)return!1;var d=t[0]-i[0],h=t[1]-i[1],p=(o*h-l*d)/c,u=(r*h-s*d)/c,m={alongA:0,alongB:0,pt:[t[0]+p*r,t[1]+p*s]};return m.alongA=p<=-e?-2:p<e?-1:p-1<=-e?0:p-1<e?1:2,m.alongB=u<=-e?-2:u<e?-1:u-1<=-e?0:u-1<e?1:2,m},pointInsideRegion:function(t,a){for(var i=t[0],n=t[1],r=a[a.length-1][0],s=a[a.length-1][1],o=!1,l=0;l<a.length;l++){var c=a[l][0],d=a[l][1];d-n>e!=s-n>e&&(r-c)*(n-d)/(s-d)+c-i>e&&(o=!o),r=c,s=d}return o}};return t}var epsilon$1=Epsilon$1,LinkedList$1={create:function(){var e={root:{root:!0,next:null},exists:function(t){return null!==t&&t!==e.root},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,a){for(var i=e.root,n=e.root.next;null!==n;){if(a(n))return t.prev=n.prev,t.next=n,n.prev.next=t,void(n.prev=t);i=n,n=n.next}i.next=t,t.prev=i,t.next=null},findTransition:function(t){for(var a=e.root,i=e.root.next;null!==i&&!t(i);)a=i,i=i.next;return{before:a===e.root?null:a,after:i,insert:function(e){return e.prev=a,e.next=i,a.next=e,null!==i&&(i.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}},linkedList=LinkedList$1,LinkedList=linkedList;function Intersecter$1(e,t,a){function i(e,t){return{id:a?a.segmentId():-1,start:e,end:t,myFill:{above:null,below:null},otherFill:null}}function n(e,t,i){return{id:a?a.segmentId():-1,start:e,end:t,myFill:{above:i.myFill.above,below:i.myFill.below},otherFill:null}}var r=LinkedList.create();function s(e,a){r.insertBefore(e,(function(i){return n=e.isStart,r=e.pt,s=a,o=i.isStart,l=i.pt,c=i.other.pt,(0!==(d=t.pointsCompare(r,l))?d:t.pointsSame(s,c)?0:n!==o?n?1:-1:t.pointAboveOrOnLine(s,o?l:c,o?c:l)?1:-1)<0;var n,r,s,o,l,c,d}))}function o(e,t){var a=function(e,t){var a=LinkedList.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null});return s(a,e.end),a}(e,t);return function(e,t,a){var i=LinkedList.node({isStart:!1,pt:t.end,seg:t,primary:a,other:e,status:null});e.other=i,s(i,e.pt)}(a,e,t),a}function l(e,t){var i=n(t,e.seg.end,e.seg);return function(e,t){a&&a.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,s(e.other,e.pt)}(e,t),o(i,e.primary)}function c(i,n){var s=LinkedList.create();function o(e){return s.findTransition((function(a){var i,n,r,s,o,l;return i=e,n=a.ev,r=i.seg.start,s=i.seg.end,o=n.seg.start,l=n.seg.end,(t.pointsCollinear(r,o,l)?t.pointsCollinear(s,o,l)||t.pointAboveOrOnLine(s,o,l)?1:-1:t.pointAboveOrOnLine(r,o,l)?1:-1)>0}))}function c(e,i){var n=e.seg,r=i.seg,s=n.start,o=n.end,c=r.start,d=r.end;a&&a.checkIntersection(n,r);var h=t.linesIntersect(s,o,c,d);if(!1===h){if(!t.pointsCollinear(s,o,c))return!1;if(t.pointsSame(s,d)||t.pointsSame(o,c))return!1;var p=t.pointsSame(s,c),u=t.pointsSame(o,d);if(p&&u)return i;var m=!p&&t.pointBetween(s,c,d),g=!u&&t.pointBetween(o,c,d);if(p)return g?l(i,o):l(e,d),i;m&&(u||(g?l(i,o):l(e,d)),l(i,s))}else 0===h.alongA&&(-1===h.alongB?l(e,c):0===h.alongB?l(e,h.pt):1===h.alongB&&l(e,d)),0===h.alongB&&(-1===h.alongA?l(i,s):0===h.alongA?l(i,h.pt):1===h.alongA&&l(i,o));return!1}for(var d=[];!r.isEmpty();){var h=r.getHead();if(a&&a.vert(h.pt[0]),h.isStart){a&&a.segmentNew(h.seg,h.primary);var p=o(h),u=p.before?p.before.ev:null,m=p.after?p.after.ev:null;function w(){if(u){var e=c(h,u);if(e)return e}return!!m&&c(h,m)}a&&a.tempStatus(h.seg,!!u&&u.seg,!!m&&m.seg);var g,f,b=w();if(b)e?(f=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(b.seg.myFill.above=!b.seg.myFill.above):b.seg.otherFill=h.seg.myFill,a&&a.segmentUpdate(b.seg),h.other.remove(),h.remove();if(r.getHead()!==h){a&&a.rewind(h.seg);continue}e?(f=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,h.seg.myFill.below=m?m.seg.myFill.above:i,h.seg.myFill.above=f?!h.seg.myFill.below:h.seg.myFill.below):null===h.seg.otherFill&&(g=m?h.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:h.primary?n:i,h.seg.otherFill={above:g,below:g}),a&&a.status(h.seg,!!u&&u.seg,!!m&&m.seg),h.other.status=p.insert(LinkedList.node({ev:h}))}else{var U=h.status;if(null===U)throw new Error(\"PolyBool: Zero-length segment detected; your epsilon is probably too small or too large\");if(s.exists(U.prev)&&s.exists(U.next)&&c(U.prev.ev,U.next.ev),a&&a.statusRemove(U.ev.seg),U.remove(),!h.primary){var E=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=E}d.push(h.seg)}r.getHead().remove()}return a&&a.done(),d}return e?{addRegion:function(e){for(var a,n=e[e.length-1],r=0;r<e.length;r++){a=n,n=e[r];var s=t.pointsCompare(a,n);0!==s&&o(i(s<0?a:n,s<0?n:a),!0)}},calculate:function(e){return c(e,!1)}}:{calculate:function(e,t,a,i){return e.forEach((function(e){o(n(e.start,e.end,e),!0)})),a.forEach((function(e){o(n(e.start,e.end,e),!1)})),c(t,i)}}}var intersecter=Intersecter$1;function SegmentChainer$1(e,t,a){var i=[],n=[];return e.forEach((function(e){var r=e.start,s=e.end;if(t.pointsSame(r,s))console.warn(\"PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large\");else{a&&a.chainStart(e);for(var o={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},c=o,d=0;d<i.length;d++){var h=(f=i[d])[0];f[1];var p=f[f.length-1];if(f[f.length-2],t.pointsSame(h,r)){if(S(d,!0,!0))break}else if(t.pointsSame(h,s)){if(S(d,!0,!1))break}else if(t.pointsSame(p,r)){if(S(d,!1,!0))break}else if(t.pointsSame(p,s)&&S(d,!1,!1))break}if(c===o)return i.push([r,s]),void(a&&a.chainNew(r,s));if(c===l){a&&a.chainMatch(o.index);var u=o.index,m=o.matches_pt1?s:r,g=o.matches_head,f=i[u],b=g?f[0]:f[f.length-1],U=g?f[1]:f[f.length-2],E=g?f[f.length-1]:f[0],w=g?f[f.length-2]:f[1];return t.pointsCollinear(U,b,m)&&(g?(a&&a.chainRemoveHead(o.index,m),f.shift()):(a&&a.chainRemoveTail(o.index,m),f.pop()),b=U),t.pointsSame(E,m)?(i.splice(u,1),t.pointsCollinear(w,E,b)&&(g?(a&&a.chainRemoveTail(o.index,b),f.pop()):(a&&a.chainRemoveHead(o.index,b),f.shift())),a&&a.chainClose(o.index),void n.push(f)):void(g?(a&&a.chainAddHead(o.index,m),f.unshift(m)):(a&&a.chainAddTail(o.index,m),f.push(m)))}var y=o.index,v=l.index;a&&a.chainConnect(y,v);var T=i[y].length<i[v].length;o.matches_head?l.matches_head?T?(_(y),C(y,v)):(_(v),C(v,y)):C(v,y):l.matches_head?C(y,v):T?(_(y),C(v,y)):(_(v),C(y,v))}function S(e,t,a){return c.index=e,c.matches_head=t,c.matches_pt1=a,c===o?(c=l,!1):(c=null,!0)}function _(e){a&&a.chainReverse(e),i[e].reverse()}function C(e,n){var r=i[e],s=i[n],o=r[r.length-1],l=r[r.length-2],c=s[0],d=s[1];t.pointsCollinear(l,o,c)&&(a&&a.chainRemoveTail(e,o),r.pop(),o=l),t.pointsCollinear(o,c,d)&&(a&&a.chainRemoveHead(n,c),s.shift()),a&&a.chainJoin(e,n),i[e]=r.concat(s),i.splice(n,1)}})),n}var segmentChainer=SegmentChainer$1;function select(e,t,a){var i=[];return e.forEach((function(e){var n=(e.myFill.above?8:0)+(e.myFill.below?4:0)+(e.otherFill&&e.otherFill.above?2:0)+(e.otherFill&&e.otherFill.below?1:0);0!==t[n]&&i.push({id:a?a.segmentId():-1,start:e.start,end:e.end,myFill:{above:1===t[n],below:2===t[n]},otherFill:null})})),a&&a.selected(i),i}var SegmentSelector$1={union:function(e,t){return select(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return select(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return select(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return select(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return select(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}},segmentSelector=SegmentSelector$1,GeoJSON$1={toPolygon:function(e,t){function a(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function a(t){var a=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[a]})}for(var i=a(t[0]),n=1;n<t.length;n++)i=e.selectDifference(e.combine(i,a(t[n])));return i}if(\"Polygon\"===t.type)return e.polygon(a(t.coordinates));if(\"MultiPolygon\"===t.type){for(var i=e.segments({inverted:!1,regions:[]}),n=0;n<t.coordinates.length;n++)i=e.selectUnion(e.combine(i,a(t.coordinates[n])));return e.polygon(i)}throw new Error(\"PolyBool: Cannot convert GeoJSON object to PolyBool polygon\")},fromPolygon:function(e,t,a){function i(e,a){return t.pointInsideRegion([.5*(e[0][0]+e[1][0]),.5*(e[0][1]+e[1][1])],a)}function n(e){return{region:e,children:[]}}a=e.polygon(e.segments(a));var r=n(null);function s(e,t){for(var a=0;a<e.children.length;a++)if(i(t,(o=e.children[a]).region))return void s(o,t);var r=n(t);for(a=0;a<e.children.length;a++){var o;i((o=e.children[a]).region,t)&&(r.children.push(o),e.children.splice(a,1),a--)}e.children.push(r)}for(var o=0;o<a.regions.length;o++){var l=a.regions[o];l.length<3||s(r,l)}function c(e,t){for(var a=0,i=e[e.length-1][0],n=e[e.length-1][1],r=[],s=0;s<e.length;s++){var o=e[s][0],l=e[s][1];r.push([o,l]),a+=l*i-o*n,i=o,n=l}return a<0!==t&&r.reverse(),r.push([r[0][0],r[0][1]]),r}var d=[];function h(e){var t=[c(e.region,!1)];d.push(t);for(var a=0;a<e.children.length;a++)t.push(p(e.children[a]))}function p(e){for(var t=0;t<e.children.length;t++)h(e.children[t]);return c(e.region,!0)}for(o=0;o<r.children.length;o++)h(r.children[o]);return d.length<=0?{type:\"Polygon\",coordinates:[]}:1==d.length?{type:\"Polygon\",coordinates:d[0]}:{type:\"MultiPolygon\",coordinates:d}}},geojson=GeoJSON$1,BuildLog=buildLog$1,Epsilon=epsilon$1,Intersecter=intersecter,SegmentChainer=segmentChainer,SegmentSelector=segmentSelector,GeoJSON=geojson,buildLog=!1,epsilon=Epsilon(),PolyBool;function operate(e,t,a){var i=PolyBool.segments(e),n=PolyBool.segments(t),r=a(PolyBool.combine(i,n));return PolyBool.polygon(r)}PolyBool={buildLog:function(e){return!0===e?buildLog=BuildLog():!1===e&&(buildLog=!1),!1!==buildLog&&buildLog.list},epsilon:function(e){return epsilon.epsilon(e)},segments:function(e){var t=Intersecter(!0,epsilon,buildLog);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:Intersecter(!1,epsilon,buildLog).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:SegmentSelector.union(e.combined,buildLog),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:SegmentSelector.intersect(e.combined,buildLog),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:SegmentSelector.difference(e.combined,buildLog),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:SegmentSelector.differenceRev(e.combined,buildLog),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:SegmentSelector.xor(e.combined,buildLog),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:SegmentChainer(e.segments,epsilon,buildLog),inverted:e.inverted}},polygonFromGeoJSON:function(e){return GeoJSON.toPolygon(PolyBool,e)},polygonToGeoJSON:function(e){return GeoJSON.fromPolygon(PolyBool,epsilon,e)},union:function(e,t){return operate(e,t,PolyBool.selectUnion)},intersect:function(e,t){return operate(e,t,PolyBool.selectIntersect)},difference:function(e,t){return operate(e,t,PolyBool.selectDifference)},differenceRev:function(e,t){return operate(e,t,PolyBool.selectDifferenceRev)},xor:function(e,t){return operate(e,t,PolyBool.selectXor)}},\"object\"==typeof window&&(window.PolyBool=PolyBool);var polybooljs=PolyBool,PolyBool$1=getDefaultExportFromCjs(polybooljs);const hyperlink=(e,t)=>`<a onclick='window.open(\"${e}\")'>${t}</a>`,EMBEDDABLE_MDCUSTOMPROPS=\"type EmbeddableMDCustomProps = {<br>useObsidianDefaults: boolean;<br>backgroundMatchCanvas: boolean;<br>backgroundMatchElement: boolean;<br>backgroundColor: string;<br>backgroundOpacity: number;<br>borderMatchElement: boolean;<br>borderColor: string;<br>borderOpacity: number;<br>filenameVisible: boolean;<br>};<br>\",EXCALIDRAW_AUTOMATE_INFO=[{field:\"help\",code:\"help(target: Function | string)\",desc:\"Utility function that provides help about ExcalidrawAutomate functions and properties. I recommend calling this function from Developer Console to print out help to the console.\",after:\"\"},{field:\"isExcalidrawMaskFile\",code:\"isExcalidrawMaskFile(file?:TFile): boolean;\",desc:\"Returns true if the file is an Excalidraw Mask file. If file is not provided, the function will use ea.targetView.file\",after:\"\"},{field:\"plugin\",code:null,desc:\"The ExcalidrawPlugin object\",after:\"\"},{field:\"FloatingModal\",code:null,desc:\"A modified version of the Obsidian.Modal class that allows the modal to be dragged around the screen and that does not dim the background.\",after:\"\"},{field:\"elementsDict\",code:null,desc:\"The {} dictionary object, contains the ExcalidrawElements currently edited in Automate indexed by el.id\",after:'[\"\"]'},{field:\"imagesDict\",code:null,desc:\"the images files including DataURL, indexed by fileId\",after:'[\"\"]'},{field:\"style.strokeColor\",code:\"[string]\",desc:`A valid css color. See ${hyperlink(\"https://www.w3schools.com/colors/default.asp\",\"W3 School Colors\")} for more.`,after:\"\"},{field:\"style.backgroundColor\",code:\"[string]\",desc:`A valid css color. See ${hyperlink(\"https://www.w3schools.com/colors/default.asp\",\"W3 School Colors\")} for more.`,after:\"\"},{field:\"style.angle\",code:\"[number]\",desc:\"Rotation of the object in radian\",after:\"\"},{field:\"style.fillStyle\",code:\"[string]\",desc:\"'hachure' | 'cross-hatch' | 'solid'\",after:\"\"},{field:\"style.strokeWidth\",code:\"[number]\",desc:null,after:\"\"},{field:\"style.strokeStyle\",code:\"[string]\",desc:\"'solid' | 'dashed' | 'dotted'\",after:\"\"},{field:\"style.roughness\",code:\"[number]\",desc:\"0:Architect\\n1:Artist\\n2:Cartoonist\",after:\"\"},{field:\"style.opacity\",code:\"[number]\",desc:\"100: Fully opaque\\n0: Fully transparent\",after:\"\"},{field:\"style.roundness\",code:\"[null | { type: RoundnessType; value?: number };]\",desc:\"set to null for 'sharp', else the stroke will be 'round'<br>type: 1==LEGACY,<br>2==PROPORTIONAL RADIUS,<br>3==ADAPTIVE RADIUS, value: adaptive factor defaults to 32\",after:\"\"},{field:\"style.fontFamily\",code:\"[number]\",desc:\"1: Virgil, 2:Helvetica, 3:Cascadia, 4:Local Font, 5: Excalifont, 6: Nunito, 7: Lilita One, 8: Comic Shanns, 9: Liberation Sans\",after:\"\"},{field:\"style.fontSize\",code:\"[number]\",desc:null,after:\"\"},{field:\"style.textAlign\",code:\"[string]\",desc:\"'left' | 'right' | 'center'\",after:\"\"},{field:\"style.verticalAlign\",code:\"[string]\",desc:\"For future use, has no effect currently; 'top' | 'bottom' | 'middle'\",after:\"\"},{field:\"style.startArrowHead\",code:\"[string]\",desc:\"'triangle' | 'dot' | 'arrow' | 'bar' | null\",after:\"\"},{field:\"style.endArrowHead\",code:\"[string]\",desc:\"'triangle' | 'dot' | 'arrow' | 'bar' | null\",after:\"\"},{field:\"canvas.theme\",code:\"[string]\",desc:\"'dark' | 'light'\",after:\"\"},{field:\"canvas.viewBackgroundColor\",code:\"[string]\",desc:`A valid css color.\\nSee ${hyperlink(\"https://www.w3schools.com/colors/default.asp\",\"W3 School Colors\")} for more.`,after:\"\"},{field:\"canvas.gridSize\",code:\"[number]\",desc:null,after:\"\"},{field:\"setStrokeSharpness\",code:\"setStrokeSharpness(sharpness: number): void;\",desc:\"Set ea.style.roundness. 0: is the legacy value, 3: is the current default value, null is sharp\",after:\"\"},{field:\"addAppendUpdateCustomData\",code:\"addAppendUpdateCustomData(id: string, newData: Partial<Record<string, unknown>>)\",desc:\"Add, modify keys in element customData and preserve existing keys.\\nCreates customData={} if it does not exist.\\nTakes the element ID for an element in the elementsDict and the new data to add or modify.\\nTo delete keys set key value in newData to undefined. so {keyToBeDeleted:undefined} will be deleted.\",after:\"\"},{field:\"addToGroup\",code:\"addToGroup(objectIds: []): string;\",desc:null,after:\"\"},{field:\"toClipboard\",code:\"toClipboard(templatePath?: string): void;\",desc:\"Copies current elements using template to clipboard, ready to be pasted into an excalidraw canvas\",after:\"\"},{field:\"getSceneFromFile\",code:\"async getSceneFromFile(file: TFile): Promise<{elements: ExcalidrawElement[]; appState: AppState;}>;\",desc:\"returns the elements and appState from a file, if the file is not an excalidraw file, it will return null\",after:\"\"},{field:\"getElements\",code:\"getElements(): ExcalidrawElement[];\",desc:\"Get all elements from ExcalidrawAutomate elementsDict\",after:\"\"},{field:\"getElement\",code:\"getElement(id: string): ExcalidrawElement;\",desc:\"Get single element from ExcalidrawAutomate elementsDict\",after:\"\"},{field:\"create\",code:\"async create(params?: {filename?: string, foldername?: string, templatePath?: string, onNewPane?: boolean, silent?: boolean, frontmatterKeys?: {},}): Promise<string>;\",desc:'Create a drawing and save it to filename.\\nIf filename is null: default filename as defined in Excalidraw settings.\\nIf folder is null: default folder as defined in Excalidraw settings\\nReturns the path to the created file.\\nfrontmatterKeys: {\\n  \"excalidraw-plugin\"?: \"raw\" | \"parsed\";\\n  \"excalidraw-link-prefix\"?: string;\\n  \"excalidraw-link-brackets\"?: boolean;\\n  \"excalidraw-url-prefix\"?: string;\\n  \"excalidraw-export-transparent\"?: boolean;\\n  \"excalidraw-export-dark\"?: boolean;\\n  \"excalidraw-export-padding\"?: number;\\n  \"excalidraw-export-pngscale\"?: number;\\n  \"excalidraw-export-embed-scene\"?: boolean;\\n  \"excalidraw-default-mode\"?: \"view\" | \"zen\";\\n  \"excalidraw-onload-script\"?: string;\\n  \"excalidraw-linkbutton-opacity\"?: number;\\n  \"excalidraw-autoexport\"?: boolean;\\n  \"excalidraw-mask\"?: boolean;\\n  \"cssclasses\"?: string;\\n}',after:\"\"},{field:\"createSVG\",code:\"async createSVG(templatePath?: string, embedFont?: boolean, exportSettings?: ExportSettings, loader?: EmbeddedFilesLoader, theme?: string,): Promise<SVGSVGElement>;\",desc:\"Use ExcalidrawAutomate.getExportSettings(boolean,boolean) to create an ExportSettings object.\\nUse ExcalidrawAutomate.getEmbeddedFilesLoader(boolean?) to create an EmbeddedFilesLoader object.\",after:\"\"},{field:\"createPDF\",code:\"async createPDF({SVG: SVGSVGElement[], scale?: PDFExportScale, pageProps?: PDFPageProperties, filename: string}): Promise<void>\",desc:\"Creates a PDF from the provided SVG elements with specified scaling and page properties.\\n\\n@param {Object} params - The parameters for creating the PDF.\\n@param {SVGSVGElement[]} params.SVG - An array of SVG elements to be included in the PDF. If multiple SVGs are provided, each will be added to a new page.\\n@param {PDFExportScale} [params.scale={ fitToPage: true, zoom: 1 }] - The scaling options for the SVG elements.\\n@param {PDFPageProperties} [params.pageProps] - The properties for the PDF pages.\\n@param {string} params.filename - The name of the PDF file to be created.\\n@returns {Promise<ArrayBuffer>} - A promise that resolves to an ArrayBuffer containing the PDF data.\\n\\n@typedef {Object} PDFExportScale\\n@property {boolean} fitToPage - Whether to fit the SVG to the page.\\n@property {number} [zoom=1] - The zoom level for the SVG. Used only if fitToPage is false. If the SVG does not fit the page, it will be tiled over multiple pages.\\n\\n@typedef {Object} PDFPageProperties\\n@property {{width: number, height: number}} [dimensions] - The dimensions of the PDF pages in pixels. Use getPageDimensions to get standard page sizes.\\n@property {string} [backgroundColor] - The background color of the PDF pages.\\n@property {PDFMargin} margin - The margins of the PDF pages in pixels.\\n@property {PDFPageAlignment} alignment - The alignment of the SVG on the PDF pages.\",after:'({\\n  SVG: [svgElement1, svgElement2],\\n  scale: { fitToPage: true },\\n  pageProps: {\\n    dimensions: { width: 595.28, height: 841.89 },\\n    backgroundColor: \"#ffffff\",\\n    margin: { left: 20, right: 20, top: 20, bottom: 20 },\\n    alignment: \"center\"\\n    filename: \"myPDF.pdf\"\\n  }\\n});'},{field:\"createViewSVG\",code:\"async createViewSVG({withBackground?: boolean, theme?: 'light' | 'dark', frameRendering?: FrameRenderingOptions, padding?: number, selectedOnly?: boolean, skipInliningFonts?: boolean, embedScene?: boolean}): Promise<SVGSVGElement>\",desc:'Creates an SVG representation of the current view with specified options.\\n\\n@param {Object} options - The options for creating the SVG.\\n@param {boolean} [options.withBackground=true] - Whether to include the background in the SVG.\\n@param {\"light\" | \"dark\"} [options.theme] - The theme to use for the SVG.\\n@param {FrameRenderingOptions} [options.frameRendering={enabled: true, name: true, outline: true, clip: true}] - The frame rendering options.\\n@param {number} [options.padding] - The padding to apply around the SVG.\\n@param {boolean} [options.selectedOnly=false] - Whether to include only the selected elements in the SVG.\\n@param {boolean} [options.skipInliningFonts=false] - Whether to skip inlining fonts in the SVG.\\n@param {boolean} [options.embedScene=false] - Whether to embed the scene in the SVG.\\n@returns {Promise<SVGSVGElement>} A promise that resolves to the SVG element.\\n\\n@typedef {Object} FrameRenderingOptions\\n@property {boolean} enabled - Whether frame rendering is enabled.\\n@property {boolean} name - Whether to include the name in the frame rendering.\\n@property {boolean} outline - Whether to include the outline in the frame rendering.\\n@property {boolean} clip - Whether to clip the frame rendering.\\n',after:\"({\\n  withBackground: true,\\n  theme: 'light',\\n  frameRendering: { enabled: true, name: true, outline: true, clip: true },\\n  padding: 10,\\n  selectedOnly: false,\\n  skipInliningFonts: false,\\n  embedScene: false,\\n});\"},{field:\"getPagePDFDimensions\",code:\"getPagePDFDimensions(pageSize: PageSize, orientation: PageOrientation): PageDimensions\",desc:'Returns the dimensions of a standard page size in pixels.\\n\\n@param {PageSize} pageSize - The standard page size. Possible values are \"A0\", \"A1\", \"A2\", \"A3\", \"A4\", \"A5\", \"Letter\", \"Legal\", \"Tabloid\".\\n@param {PageOrientation} orientation - The orientation of the page. Possible values are \"portrait\" and \"landscape\".\\n@returns {PageDimensions} - An object containing the width and height of the page in pixels.\\n\\n@typedef {Object} PageDimensions\\n@property {number} width - The width of the page in pixels.\\n@property {number} height - The height of the page in pixels.\\n\\n@typedef {\"A0\" | \"A1\" | \"A2\" | \"A3\" | \"A4\" | \"A5\" | \"Letter\" | \"Legal\" | \"Tabloid\"} PageSize\\n\\n@typedef {\"portrait\" | \"landscape\"} PageOrientation',after:'(\"A4\", \"portrait\");'},{field:\"createPNG\",code:\"async createPNG(templatePath?: string, scale?: number, exportSettings?: ExportSettings, loader?: EmbeddedFilesLoader, theme?: string,padding?: number): Promise<any>;\",desc:\"Create an image based on the objects in ea.getElements(). The elements in ea will be merged with the elements from the provided template file - if any. Use ExcalidrawAutomate.getExportSettings(boolean,boolean) to create an ExportSettings object.\\nUse ExcalidrawAutomate.getEmbeddedFilesLoader(boolean?) to create an EmbeddedFilesLoader object.\",after:\"\"},{field:\"createPNGBase64\",code:\"async craetePNGBase64(templatePath?: string, scale?: number, exportSettings?: ExportSettings, loader?: EmbeddedFilesLoader, theme?: string,padding?: number): Promise<string>;\",desc:\"The same as createPNG but returns a base64 encoded string instead of a file.\",after:\"\"},{field:\"wrapText\",code:\"wrapText(text: string, lineLen: number): string;\",desc:null,after:\"\"},{field:\"addElementsToFrame\",code:\"addElementsToFrame(frameId: string, elementIDs: string[]):void;\",desc:null,after:\"\"},{field:\"addFrame\",code:\"addFrame(topX: number, topY: number, width: number, height: number, name?: string): string;\",desc:null,after:\"\"},{field:\"addRect\",code:\"addRect(topX: number, topY: number, width: number, height: number, id?:string): string;\",desc:null,after:\"\"},{field:\"addDiamond\",code:\"addDiamond(topX: number, topY: number, width: number, height: number, id?:string): string;\",desc:null,after:\"\"},{field:\"addEllipse\",code:\"addEllipse(topX: number, topY: number, width: number, height: number, id?:string): string;\",desc:null,after:\"\"},{field:\"addBlob\",code:\"addBlob(topX: number, topY: number, width: number, height: number, id?: string): string;\",desc:null,after:\"\"},{field:\"refreshTextElementSize\",code:\"refreshTextElementSize(id: string);\",desc:\"Refreshes the size of the text element. Intended to be used when you copyViewElementsToEAforEditing() and then change the text in a text element and want to update the size of the text element to fit the modifid contents.\",after:\"\"},{field:\"addText\",code:'addText(topX: number, topY: number, text: string, formatting?: {autoResize?: boolean; wrapAt?: number; width?: number; height?: number; textAlign?: \"left\" | \"center\" | \"right\"; textVerticalAlign: \"top\" | \"middle\" | \"bottom\"; box?: boolean | \"box\" | \"blob\" | \"ellipse\" | \"diamond\"; boxPadding?: number; boxStrokeColor?: string;}, id?: string,): string;',desc:\"If box is !null, then text will be boxed\\nThe function returns the id of the TextElement. If the text element is boxed i.e. it is a sticky note, then the id of the container object.\\nDefault value for autoResize is true. Setting autoResize to false will wrap the text in the text element without the need for the container. If set to false, you must provide a width value as well.\\nwrapAt will be ignored if autoResize is set to false (and a width is also provided)\",after:\"\"},{field:\"addLine\",code:\"addLine(points: [[x: number, y: number]], id?:string): string;\",desc:null,after:\"\"},{field:\"addArrow\",code:\"addArrow(points: [[x: number, y: number]], formatting?: { startArrowHead?: string; endArrowHead?: string; startObjectId?: string; endObjectId?: string;}, id?:string): string;\",desc:'valid values for startArrowHead and endArrowHead are: \"arrow\"|\"bar\"|\"circle\"|\"circle_outline\"|\"triangle\"|\"triangle_outline\"|\"diamond\"|\"diamond_outline\"|null',after:\"\"},{field:\"addImage\",code:\"async addImage(opts: {topX: number, topY: number, imageFile: TFile|string, scale?: boolean, anchor?: boolean, colorMap?: ColorMap}): Promise<string>;\",desc:\"imageFile may be a TFile or a string that contains a hyperlink.\\nimageFile may also be an obsidian filepath including a reference eg.: 'path/my.pdf#page=3'\\nSet scale to false if you want to embed the image at 100% of its original size. Default is true which will insert a scaled image.\\nanchor will only be evaluated if scale is false. anchor true will add |100% to the end of the filename, resulting in an image that will always pop back to 100% when the source file is updated or when the Excalidraw file is reopened.\\ncolorMap is only used for SVG images and nested Excalidraw images. See the Shade Master script and the Deconstruct Selected Elements script for examples using colorMap.\\ntype ColorMap = { [color: string]: string; }\",after:\"\"},{field:\"addEmbeddable\",code:\"addEmbeddable(topX: number, topY: number, width: number, height: number, url?: string, file?: TFile, embeddableCustomData?: EmbeddableMDCustomProps): string;\",desc:\"Adds an iframe/webview (depending on content and platform) to the drawing. If url is not null then the iframe/webview will be loaded from the url. The url maybe a markdown link to an note in the Vault or a weblink. If url is null then the iframe/webview will be loaded from the file. Both the url and the file may not be null.<br>\"+EMBEDDABLE_MDCUSTOMPROPS,after:\"\"},{field:\"addMermaid\",code:\"async addMermaid(diagram: string, groupElements: boolean = true,): Promise<string[]|string>;\",desc:\"Creates a mermaid diagram and returns the ids of the created elements as a string[]. The elements will be added to ea. To add them to the canvas you'll need to use addElementsToView. Depending on the diagram type the result will be either a single SVG image, or a number of excalidraw elements.<br>If there is an error, the function returns a string with the error message.\",after:\"\"},{field:\"addLaTex\",code:\"async addLaTex(topX: number, topY: number, tex: string): Promise<string>;\",desc:\"This is an async function, you need to avait the results. Adds a LaTex element to the drawing. The tex string is the LaTex code. The function returns the id of the created element.\",after:\"\"},{field:\"tex2dataURL\",code:\"async tex2dataURL(tex: string, scale: number = 4): Promise<{mimeType: MimeType;fileId: FileId;dataURL: DataURL;created: number;size: { height: number; width: number };}> \",desc:\"returns the base64 dataURL of the LaTeX equation rendered as an SVG. tex is the LaTeX equation string\",after:\"\"},{field:\"connectObjects\",code:\"connectObjects(objectA: string, connectionA: ConnectionPoint, objectB: string, connectionB: ConnectionPoint, formatting?: {numberOfPoints?: number; startArrowHead?: string; endArrowHead?: string; padding?: number;},): string;\",desc:'type ConnectionPoint = \"top\" | \"bottom\" | \"left\" | \"right\" | null\\nWhen null is passed as ConnectionPoint then Excalidraw will automatically decide\\nnumberOfPoints is the number of points on the line. Default is 0 i.e. line will only have a start and end point.\\nArrowHead: \"arrow\"|\"bar\"|\"circle\"|\"circle_outline\"|\"triangle\"|\"triangle_outline\"|\"diamond\"|\"diamond_outline\"|null',after:\"\"},{field:\"addLabelToLine\",code:\"addLabelToLine(lineId: string, label: string): string;\",desc:\"Adds a text label to a line or arrow. Currently only works with a simple straight 2-point (start & end) line\",after:\"\"},{field:\"clear\",code:\"clear(): void;\",desc:\"Clears elementsDict and imagesDict only\",after:\"\"},{field:\"reset\",code:\"reset(): void;\",desc:\"clear() + reset all style values to default\",after:\"\"},{field:\"isExcalidrawFile\",code:\"isExcalidrawFile(f: TFile): boolean;\",desc:\"Returns true if MD file is an Excalidraw file\",after:\"\"},{field:\"targetView\",code:\"targetView: ExcalidrawView;\",desc:\"The Obsidian view currently edited\",after:\"\"},{field:\"setView\",code:'setView(view: ExcalidrawView | \"first\" | \"active\"): ExcalidrawView;',desc:null,after:\"\"},{field:\"getExcalidrawAPI\",code:\"getExcalidrawAPI(): any;\",desc:`${hyperlink(\"https://github.com/excalidraw/excalidraw/tree/master/src/packages/excalidraw#ref\",\"Excalidraw API\")}`,after:\"\"},{field:\"getViewElements\",code:\"getViewElements(): ExcalidrawElement[];\",desc:\"Get elements in View\",after:\"\"},{field:\"deleteViewElements\",code:\"deleteViewElements(el: ExcalidrawElement[]): boolean;\",desc:null,after:\"\"},{field:\"addBackOfTheCardNoteToView\",code:\"async addBackOfTheCardNoteToView(sectionTitle: string, activate: boolean = false, sectionBody?: string, embeddableCustomData?: EmbeddableMDCustomProps): Promise<string>\",desc:\"Adds a back of the note card to the current active view. If <b>body</b> is provided the note will be created with the body text, otherwise the note will be created with the title only.<br>Returns the id of the created element.<br>If <b>activate</b> is true, the embedded note will be activated for editing.<br>This is an async function, if you need the element ID of the created element, the function should be awaited.<br>\"+EMBEDDABLE_MDCUSTOMPROPS,after:\"\"},{field:\"getViewSelectedElement\",code:\"getViewSelectedElement(): ExcalidrawElement;\",desc:\"Get the selected element in the view, if more are selected, get the first\",after:\"\"},{field:\"getViewSelectedElements\",code:\"getViewSelectedElements(includeFrameChildren: boolean = true): ExcalidrawElement[];\",desc:\"If a frame is selected this function will return the frame and all its elements unless includeFrameChildren is set to false\",after:\"\"},{field:\"getViewFileForImageElement\",code:\"getViewFileForImageElement(el: ExcalidrawElement): TFile | null;\",desc:\"Returns the TFile file handle for the image element\",after:\"\"},{field:\"updateViewSVGImageColorMap\",code:\"async updateViewSVGImageColorMap(elements: ExcalidrawImageElement | ExcalidrawImageElement[], colors: ColorMap | SVGColorInfo | ColorMap[] | SVGColorInfo[]): Promise<void>;\",desc:'Updates the color map of an SVG image element in the view. If a ColorMap is provided, it will be used directly. If an SVGColorInfo is provided, it will be converted to a ColorMap. The view will be marked as dirty (i.e. will be saved at next scheduled time) and the image will be reset using the color map.\\nSee \"Shade Master\" scritp in Script Library for an example of using this function.\\n\\ntype SVGColorInfo = Map<string, { mappedTo: string; fill: boolean; stroke: boolean; }>\\ntype ColorMap = { [color: string]: string; }',after:\"\"},{field:\"getColorMapForImageElement\",code:\"getColorMapForImageElement(el: ExcalidrawElement): ColorMap\",desc:'Retrieves the color map for an image element. The color map contains information about the mapping of colors used in the image. If the element already has a color map, it will be returned. The colorMap does not include all colors in the image, only those that have been mapped.\\nSee \"Shade Master\" scritp in Script Library for an example of using this function.\\n\\ntype ColorMap = { [color: string]: string; }',after:\"\"},{field:\"getSVGColorInfoForImgElement\",code:\"async getColorMapForImgElement(el: ExcalidrawElement): Promise<SVGColorInfo>\",desc:'This function must be awaited. Retrieves the color map for an SVG image element. The color map contains information about the fill and stroke colors used in the SVG. If the element already has a color map, it will be merged with the colors extracted from the SVG.\\nSee \"Shade Master\" scritp in Script Library for an example of using this function.\\n\\ntype SVGColorInfo = Map<string, { mappedTo: string; fill: boolean; stroke: boolean; }>',after:\"\"},{field:\"getColosFromExcalidrawFile\",code:\"async getColosFromExcalidrawFile(file:TFile, img: ExcalidrawImageElement): Promise<SVGColorInfo>\",desc:'Must be awaited. Extracts the fill (background) and stroke colors from an excalidraw file and returns them as an SVGColorInfo. The SVGColorInfo is a map where the keys are the colors used in the SVG and the values contain information about whether the color is used for fill, stroke, or both.\\nSee \"Shade Master\" scritp in Script Library for an example of using this function.\\n\\ntype SVGColorInfo = Map<string, { mappedTo: string; fill: boolean; stroke: boolean; }>',after:\"\"},{field:\"getColorsFromSVGString\",code:\"getColorsFromSVGString(svgString: string): SVGColorInfo\",desc:'Extracts the fill and stroke colors from an SVG string and returns them as an SVGColorInfo. The SVGColorInfo is a map where the keys are the colors used in the SVG and the values contain information about whether the color is used for fill, stroke, or both.\\nSee \"Shade Master\" scritp in Script Library for an example of using this function.\\n\\ntype SVGColorInfo = Map<string, { mappedTo: string; fill: boolean; stroke: boolean; }>',after:\"\"},{field:\"copyViewElementsToEAforEditing\",code:\"copyViewElementsToEAforEditing(elements: ExcalidrawElement[], copyImages: boolean = false): void;\",desc:\"Copies elements from view to elementsDict for editing. If copyImages is true, then relevant entries from scene.files will also be copied. This is required if you want to generate a PNG for a subset of the elements in the drawing (e.g. for AI generation)\",after:\"\"},{field:\"viewToggleFullScreen\",code:\"viewToggleFullScreen(forceViewMode?: boolean): void;\",desc:null,after:\"\"},{field:\"connectObjectWithViewSelectedElement\",code:\"connectObjectWithViewSelectedElement(objectA: string, connectionA: ConnectionPoint, connectionB: ConnectionPoint, formatting?: {numberOfPoints?: number; startArrowHead?: string; endArrowHead?: string; padding?: number;},): boolean;\",desc:\"Connect an object to the selected element in the view\\nSee tooltip for connectObjects for details\",after:\"\"},{field:\"addElementsToView\",code:\"async addElementsToView(repositionToCursor?: boolean, save?: boolean, newElementsOnTop?: boolean,shouldRestoreElements?: boolean,): Promise<boolean>;\",desc:\"Adds elements from elementsDict to the current view\\nrepositionToCursor: default is false\\nsave: default is true\\nnewElementsOnTop: default is false, i.e. the new elements get to the bottom of the stack\\nnewElementsOnTop controls whether elements created with ExcalidrawAutomate are added at the bottom of the stack or the top of the stack of elements already in the view\\nNote that elements copied to the view with copyViewElementsToEAforEditing retain their position in the stack of elements in the view even if modified using EA\",after:\"\"},{field:\"mostRecentMarkdownSVG\",code:\"mostRecentMarkdownSVG: SVGSVGElement;\",desc:\"Markdown renderer will drop a copy of the most recent SVG here for debugging purposes\",after:\"\"},{field:\"getEmbeddedFilesLoader\",code:\"getEmbeddedFilesLoader(isDark?: boolean): EmbeddedFilesLoader;\",desc:\"Utility function to generate EmbeddedFilesLoader object\",after:\"\"},{field:\"getExportSettings\",code:\"getExportSettings(withBackground: boolean, withTheme: boolean,): ExportSettings;\",desc:\"Utility function to generate ExportSettings object\\nexport interface ExportSettings {\\n  withBackground: boolean;\\n  withTheme: boolean;\\n  isMask: boolean; //if true elements will be processed as mask, clipping, etc.\\n  frameRendering?: { //optional, overrides relevant appState settings for rendering the frame\\n    enabled: boolean;\\n    name: boolean;\\n    outline: boolean;\\n    clip: boolean;\\n  };\\n  skipInliningFonts?: boolean;\\n}\",after:\"\"},{field:\"getElementsInArea\",code:\"getElementsInArea(elements: ExcalidrawElement[], area: {x: number, y: number, width: number, height: number}): ExcalidrawElement[];\",desc:\"Filter the elements and returns only those within the specific area.\",after:\"\"},{field:\"getBoundingBox\",code:\"getBoundingBox(elements: ExcalidrawElement[]): {topX: number, topY: number, width: number, height: number,};\",desc:\"Gets the bounding box of elements. The bounding box is the box encapsulating all of the elements completely.\",after:\"\"},{field:\"getMaximumGroups\",code:\"getMaximumGroups(elements: ExcalidrawElement[]): ExcalidrawElement[][];\",desc:\"Elements grouped by the highest level groups\",after:\"\"},{field:\"getLargestElement\",code:\"getLargestElement(elements: ExcalidrawElement[]): ExcalidrawElement;\",desc:\"Gets the largest element from a group. useful when a text element is grouped with a box, and you want to connect an arrow to the box\",after:\"\"},{field:\"intersectElementWithLine\",code:\"intersectElementWithLine(element: ExcalidrawBindableElement, a: readonly [number, number], b: readonly [number, number], gap?: number,): Point[];\",desc:\"If gap is given, the element is inflated by this value.\\nReturns 2 or 0 intersection points between line going through `a` and `b` and the `element`, in ascending order of distance from `a`.\",after:\"\"},{field:\"getCommonGroupForElements\",code:\"getCommonGroupForElements(elements: ExcalidrawElement[]): string;\",desc:\"Gets the groupId for the group that contains all the elements, or null if such a group does not exist\",after:\"\"},{field:\"getElementsInTheSameGroupWithElement\",code:\"getElementsInTheSameGroupWithElement(element: ExcalidrawElement, elements: ExcalidrawElement[], includeFrameElements: boolean = false): ExcalidrawElement[];\",desc:\"Gets all the elements from elements[] that share one or more groupIds with element.<br>If includeFrameElements is true, then if the frame is part of the group all the elements that are in the frame will also be included in the result set\",after:\"\"},{field:\"getElementsInFrame\",code:\" getElementsInFrame(frameElement: ExcalidrawElement,elements: ExcalidrawElement[],shouldIncludeFrame: boolean = false,): ExcalidrawElement[];\",desc:\"Gets all the elements from elements[] that are inside the frameElement. If shouldIncludeFrame is true, the frameElement will also be included in the result.\",after:\"\"},{field:\"activeScript\",code:\"activeScript: string;\",desc:`Mandatory to set before calling the get and set ScriptSettings functions. Set automatically by the ScriptEngine\\nSee for more details: ${hyperlink(\"https://zsviczian.github.io/obsidian-excalidraw-plugin/ExcalidrawScriptsEngine.html\",\"Script Engine Help\")}`,after:\"\"},{field:\"getScriptSettings\",code:\"getScriptSettings(): {};\",desc:`Returns script settings. Saves settings in plugin settings, under the activeScript key. See for more details: ${hyperlink(\"https://zsviczian.github.io/obsidian-excalidraw-plugin/ExcalidrawScriptsEngine.html\",\"Script Engine Help\")}`,after:\"\"},{field:\"setScriptSettings\",code:\"async setScriptSettings(settings: any): Promise<void>;\",desc:`Sets script settings.\\nSee for more details: ${hyperlink(\"https://zsviczian.github.io/obsidian-excalidraw-plugin/ExcalidrawScriptsEngine.html\",\"Script Engine Help\")}`,after:\"\"},{field:\"openFileInNewOrAdjacentLeaf\",code:\"openFileInNewOrAdjacentLeaf(file: TFile): WorkspaceLeaf;\",desc:\"Open a file in a new workspaceleaf or reuse an existing adjacent leaf depending on Excalidraw Plugin Settings\",after:\"\"},{field:\"measureText\",code:\"measureText(text: string): { width: number; height: number };\",desc:\"Measures text size based on current style settings\",after:\"\"},{field:\"getOriginalImageSize\",code:\"async getOriginalImageSize(imageElement: ExcalidrawImageElement, shouldWaitForImage: boolean=false): Promise<{width: number; height: number}>\",desc:\"Returns the size of the image element at 100% (i.e. the original size) or undefined if the data URL is not available.\\nIf shouldWaitForImage is true, the function will wait for the view to load the image before returning the size.\\nThis is an async function, you need to await the result.\",after:\"\"},{field:\"resetImageAspectRatio\",code:\"async resetImageAspectRatio(imgEl: ExcalidrawImageElement): Promise<boolean>\",desc:\"Resets the image to its original aspect ratio.\\nIf the image is resized then the function returns true.\\nIf the image element is not in EA (only in the view), then if the image is resized, the element is copied to EA for Editing using copyViewElementsToEAforEditing([imgEl]).\\nNote you need to run await ea.addElementsToView(false); to add the modified image to the view.\",after:\"\"},{field:\"verifyMinimumPluginVersion\",code:\"verifyMinimumPluginVersion(requiredVersion: string): boolean;\",desc:'Returns true if plugin version is >= than required\\nrecommended use:\\n<code>if(!ea.verifyMinimumPluginVersion || !ea.verifyMinimumPluginVersion(\"1.5.20\")) {new Notice(\"message\");return;}<code>',after:\"\"},{field:\"selectElementsInView\",code:\"selectElementsInView(elements: ExcalidrawElement[] | string[]):void;\",desc:\"You can supply a list of Excalidraw Elements or the string IDs of those elements. The elements provided will be set as selected in the targetView.\",after:\"\"},{field:\"generateElementId\",code:\"generateElementId(): string;\",desc:\"Returns an 8 character long random id\",after:\"\"},{field:\"cloneElement\",code:\"cloneElement(element: ExcalidrawElement): ExcalidrawElement;\",desc:\"Returns a clone of the element with a new element id\",after:\"\"},{field:\"moveViewElementToZIndex\",code:\"moveViewElementToZIndex(elementId:number, newZIndex:number): void;\",desc:\"Moves the element to a specific position in the z-index\",after:\"\"},{field:\"hexStringToRgb\",code:\"hexStringToRgb(color: string):number[];\",desc:\"Converts a HEX color to an RGB number array. #FF0000 to [255,0,0]\",after:\"\"},{field:\"rgbToHexString\",code:\"rgbToHexString(color: number[]):string;\",desc:\"Converts an RGB number array to a HEX string. [255,0,0] to #FF0000\",after:\"\"},{field:\"hslToRgb\",code:\"hslToRgb(color: number[]):number[];\",desc:\"Converts an HSL number array to an RGB number array. [0,100,50] to [255,0,0]\",after:\"\"},{field:\"rgbToHsl\",code:\"rgbToHsl(color:number[]):number[];\",desc:\"Converts an RGB number array to an HSL number array. [255,0,0] to [0,100,50]\",after:\"\"},{field:\"colorNameToHex\",code:\"colorNameToHex(color:string):string;\",desc:\"Converts a CSS color name to its HEX color equivalent. 'White' to #FFFFFF\",after:\"\"},{field:\"getCM\",code:\"getCM(color:TInput): ColorMaster;\",desc:`Returns a ${hyperlink(\"https://github.com/lbragile/ColorMaster\",\"ColorMaster\")} object. The function also accepts css color names. Under the hood, before calling ColorMaster it uses colorNameToHex to convert the color name to a HEX color.`,after:\"\"},{field:\"obsidian\",code:\"obsidian\",desc:`Access functions and objects available on the ${hyperlink(\"https://github.com/obsidianmd/obsidian-api/blob/master/obsidian.d.ts\",\"Obsidian Module\")}`,after:\"\"},{field:\"getListOfTemplateFiles\",code:\"getListOfTemplateFiles(): TFile[] | null\",desc:\"Returns a list of files in the template folder. If the Excalidraw Template is set as a single file, it returns a single element in the list. If no template is set, it returns null.\",after:\"\"},{field:\"getEmbeddedImagesFiletree\",code:\"getEmbeddedImagesFiletree(excalidrawFile?: TFile): TFile[]\",desc:\"Retruns the embedded images in the scene recursively. If excalidrawFile is not provided, the function will use ea.targetView.file\",after:\"\"},{field:\"getAPI\",code:\"public getAPI(view?:ExcalidrawView):ExcalidrawAutomate\",desc:\"Returns a new instance of ExcalidrawAutomate.\",after:\"\"},{field:\"getAttachmentFilepath\",code:\"async getAttachmentFilepath(filename: string): Promise<string>\",desc:'This asynchronous function should be awaited. It retrieves the filepath to a new file, taking into account the attachments preference settings in Obsidian. If the attachment folder doesn\\'t exist, it creates it. The function returns the complete path to the file. If the provided filename already exists, the function will append \\'_[number]\\' before the extension to generate a unique filename.Prompts the user with a dialog to select new file action.<br> - create markdown file<br> - create excalidraw file<br> - cancel action<br>The new file will be relative to this.targetView.file.path, unless parentFile is provided. If shouldOpenNewFile is true, the new file will be opened in a workspace leaf. targetPane controls which leaf will be used for the new file.<br>Returns the TFile for the new file or null if the user cancelled the action.<br><code>type PaneTarget = \"active-pane\"|\"new-pane\"|\"popout-window\"|\"new-tab\"|\"md-properties\";</code>',after:\"\"},{field:\"getActiveEmbeddableViewOrEditor\",code:\"getActiveEmbeddableViewOrEditor (view?:ExcalidrawView): {view:any}|{file:TFile, editor:Editor}|{node: ObsidianCanvasNode}|null;\",desc:\"Returns the editor or leaf.view of the currently active embedded obsidian file.<br>If view is not provided, ea.targetView is used.<br>If the embedded file is an eligible Obsidian canvas node document the function will return<br><code>{file:TFile, editor:Editor}</code> of {node: ObsidianCanvasNode}, otherwise it will return {view:any}. You can check view type with view.getViewType();\",after:\"\"},{field:\"getViewLastPointerPosition\",code:\"getViewLastPointerPosition(): {x: number, y: number};\",desc:\"@returns the last recorded pointer position on the Excalidraw canvas\",after:\"\"},{field:\"getViewCenterPosition\",code:\"getViewCenterPosition(): {x: number, y: number};\",desc:\"@returns the center position of the current view in Excalidraw coordinates\",after:\"\"},{field:\"getleaf\",code:\"getLeaf(origo: WorkspaceLeaf, targetPane?: PaneTarget): WorkspaceLeaf;\",desc:'Generates a new Obsidian Leaf following Excalidraw plugin settings such as open in Main Workspace or not, open in adjacent pane if available, etc.<br>@param origo: the currently active leaf, the origin of the new leaf<br>@param targetPane: <code>type PaneTarget = \"active-pane\"|\"new-pane\"|\"popout-window\"|\"new-tab\"|\"md-properties\";',after:\"\"},{field:\"newFilePrompt\",code:\"async newFilePrompt(newFileNameOrPath: string, shouldOpenNewFile: boolean, targetPane?: PaneTarget, parentFile?: TFile): Promise<TFile | null>;\",desc:\"\",after:\"\"},{field:\"DEVICE\",code:\"get DEVICE(): DeviceType;\",desc:\"Returns the current device type. Possible values are: <br><code>type DeviceType = {<br>  isDesktop: boolean,<br>  isPhone: boolean,<br>  isTablet: boolean,<br>  isMobile: boolean,<br>  isLinux: boolean,<br>  isMacOS: boolean,<br>  isWindows: boolean,<br>  isIOS: boolean,<br>  isAndroid: boolean<br>};\",after:\"\"},{field:\"checkAndCreateFolder\",code:\"async checkAndCreateFolder(folderpath: string): Promise<TFolder>\",desc:\"Checks if the folder exists, if not, creates it.\",after:\"\"},{field:\"getNewUniqueFilepath\",code:\"getNewUniqueFilepath(filename: string, folderpath: string): string\",desc:\"Checks if the filepath already exists, if so, returns a new filepath with a number appended to the filename else returns the filepath as provided.\",after:\"\"},{field:\"extractCodeBlocks\",code:\"extractCodeBlocks(markdown: string): { data: string, type: string }[]\",desc:\"Grabs the codeblock content from the supplied markdown string. Returns an array of dictionaries with the codeblock content and type\",after:\"\"},{field:\"postOpenAI\",code:\"async postOpenAI(request: AIRequest): Promise<RequestUrlResponse>\",desc:`This asynchronous function should be awaited. It posts the supplied request to the OpenAI API and returns the response.<br>The response is a dictionary with the following keys:<br><code>{image, text, instruction, systemPrompt, responseType}</code><br><b>image</b> should be a dataURL - use ea.createPNGBase64()<br><b>systemPrompt</b>: if <code>undefined</code> the message to OpenAI will not include a system prompt<br><b>text</b> is the actual user prompt, a request must have either an image or a text<br><b>instruction</b> is a user prompt sent as a separate element in the message - I use it to reinforce the type of response I am seeing (e.g. mermaid in a codeblock)<br><b>imageGenerationProperties</b> if provided then the dall-e model will be used. <code> imageGenerationProperties?: {size?: string, quality?: \"standard\" | \"hd\"; n?: number; mask?: string; }</code><br>Different openAI models accept different parameters fr size, quality, n and mask. Consult the API documenation for more information.<br>RequestUrlResponse is defined in the ${hyperlink(\"https://github.com/obsidianmd/obsidian-api/blob/master/obsidian.d.ts\",\"Obsidian API\")}`,after:\"\"},{field:\"convertStringToDataURL\",code:'async convertStringToDataURL (data:string, type: string = \"text/html\"):Promise<string>',desc:\"Converts a string to a DataURL.\",after:\"\"},{field:\"setViewModeEnabled\",code:\"setViewModeEnabled(enabled: boolean): void;\",desc:\"Sets Excalidraw in the targetView to view-mode\",after:\"\"},{field:\"splitFolderAndFilename\",code:\"splitFolderAndFilename(filepath: string): { folderpath: string; filename: string; basename: string; extension: string; }\",desc:\"Splits a file path into its components.\",after:\"\"},{field:\"viewUpdateScene\",code:\"viewUpdateScene(scene:{elements?:ExcalidrawElement[],appState?: AppState,files?: BinaryFileData,captureUpdate?: 'IMMEDIATELY' | 'NEVER' | 'EVENTUALLY'},restore:boolean=false):void\",desc:\"Calls the ExcalidrawAPI updateScene function for the targetView. When restore=true, excalidraw will try to correct errors in the scene such as setting default values to missing element properties. Use captureUpdate to control undo/redo behavior: 'IMMEDIATELY' for immediate undoable updates (most local changes), 'NEVER' for updates that should never be undoable, or 'EVENTUALLY' for updates that should be undoable as part of an async multi-step process. See the ExcalidrawAPI documentation for more information.\",after:\"\"},{field:\"viewZoomToElements\",code:\"viewZoomToElements(selectElements: boolean,elements: ExcalidrawElement[]):void\",desc:\"Zoom tarteView to fit elements provided as input. elements === [] will zoom to fit the entire scene. SelectElements toggles whether the elements should be in a selected state at the end of the operation.\",after:\"\"},{field:\"compressToBase64\",code:\"compressToBase64(str: string):string\",desc:\"Compresses String to a Base64 string using LZString\",after:\"\"},{field:\"decompressFromBase64\",code:\"decompressFromBase64(str: string):string\",desc:\"Decompresses a base 64 compressed string using LZString\",after:\"\"}],EXCALIDRAW_SCRIPTENGINE_INFO=[{field:\"inputPrompt\",code:\"inputPrompt: (opts: {header: string, placeholder?: string, value?: string, buttons?: {caption:string, tooltip?:string, action:Function}[], lines?: number, displayEditorButtons?: boolean, customComponents?: (container: HTMLElement) => void, blockPointerInputOutsideModal?: boolean, controlsOnTop?: boolean});\",desc:\"Opens a prompt that asks for an input.\\nReturns a string with the input.\\nYou need to await the result of inputPrompt.\\nEditor buttons are text editing buttons like delete, enter, allcaps - these are only displayed if lines is greater than 1 \\nCustom components are components that you can add to the prompt. These will be displayed between the text input area and the buttons.\\nblockPointerInputOutsideModal will block pointer input outside the modal. This is useful if you want to prevent the user accidently closing the modal or interacting with the excalidraw canvas while the prompt is open.\\ncontrolsOnTop when set to true will move all the buttons to the top of the modal, leaving the text area at the bottom. This feature was developed for Scribble Helper script to avoid your palm pressing buttons while scribbling.\\nbuttons.action(input: string) => string\\nThe button action function will receive the actual input string. If action returns null, input will be unchanged. If action returns a string, input will receive that value when the promise is resolved. example:\\n<code>let fileType = '';\\nconst filename = await utils.inputPrompt (\\n  'Filename',\\n  '',\\n  '',\\n,  [\\n    {\\n      caption: 'Markdown',\\n      action: ()=>{fileType='md';return;}\\n    },\\n    {\\n      caption: 'Excalidraw',\\n      action: ()=>{fileType='ex';return;}\\n    }\\n  ]\\n);</code>\",after:'({\\n  header: \"\",\\n  placeholder: undefined, //string\\n  value: undefined, //string\\n  buttons: [{ //optional, may leave undefined\\n    caption: \"\", //string\\n    tooltip: undefined, //string\\n    action: (input)=>{} //Function\\n  }],\\n  lines: undefined, //number\\n  displayEditorButtons: undefined, //boolean\\n  customComponents: undefined, //(container: HTMLElement) => void\\n  blockPointerInputOutsideModal: undefined, //boolean\\n  controlsOnTop: undefined, //boolean\\n  draggable: undefined, //boolean\\n});'},{field:\"suggester\",code:\"suggester: (displayItems: string[], items: any[], hint?: string, instructions?:Instruction[]);\",desc:\"Opens a suggester. Displays the displayItems and returns the corresponding item from items[]\\nYou need to await the result of suggester.\\nIf the user cancels (ESC), suggester will return undefined\\nHint and instructions are optional\\n\\n<code>interface Instruction {command: string;purpose: string;}</code>\",after:\"\"},{field:\"scriptFile\",code:\"scriptFile: TFile\",desc:\"The TFile of the currently running script\",after:\"\"}],FRONTMATTER_KEYS_INFO=[{field:\"plugin\",code:null,desc:\"Denotes an excalidraw file. If key is not present, the file will not be recognized as an Excalidarw file. Valid values are 'parsed' and 'raw'\",after:\": parsed\"},{field:\"link-prefix\",code:null,desc:\"Set custom prefix to denote text element containing a valid internal link. Set to empty string if you do not want to show a prefix\",after:': \"\ud83d\udccd\"'},{field:\"url-prefix\",code:null,desc:\"Set custom prefix to denote text element containing a valid external link. Set to empty string if you do not want to show a prefix\",after:': \"\ud83c\udf10\"'},{field:\"link-brackets\",code:null,desc:\"Set to true, if you want to display [[square brackets]] around the links in Text Elements\",after:\": true\"},{field:\"default-mode\",code:null,desc:\"Specifies how Excalidraw should open by default. Valid values are: view|zen\",after:\": view\"},{field:\"linkbutton-opacity\",code:null,desc:\"The opacity of the blue link button in the top right of the element overriding the respective setting in plugin settings. Valid values are between 0 and 1, where 0 means the button is transparent.\",after:\": 0.5\"},{field:\"onload-script\",code:null,desc:\"The value of this field will be executed as javascript code using the Script Engine environment. Use this to initiate custom actions or logic when loading your drawing.\",after:': \"new Notice(`Hello World!\\\\n\\\\nFile: ${ea.targetView.file.basename}`);\"'},{field:\"font\",code:null,desc:\"This key applies to Markdown Embeds. You can control the appearance of the embedded markdown file on a file by file bases by adding the this frontmatter key to your markdown document. Valid values are: Virgil|Cascadia|font_file_name.extension\",after:\": Virgil\"},{field:\"font-color\",code:null,desc:\"This key applies to Markdown Embeds. You can control the appearance of the embedded markdown file on a file by file bases by adding the this frontmatter key to your markdown document. Valid values are: css-color-name|#HEXcolor|any-other-html-standard-format\",after:\": SteelBlue\"},{field:\"border-color\",code:null,desc:\"This key applies to Markdown Embeds. You can control the appearance of the embedded markdown file on a file by file bases by adding the this frontmatter key to your markdown document. Valid values are: css-color-name|#HEXcolor|any-other-html-standard-format\",after:\": SteelBlue\"},{field:\"css\",code:null,desc:'This key applies to Markdown Embeds. You can control the appearance of the embedded markdown file on a file by file bases by adding the this front matter keys to your markdown document. Valid values are: \"css-filename|css snippet\"',after:': \"\"'},{field:\"export-transparent\",code:null,desc:\"If this key is present it will override the default excalidraw embed and export setting. true == Transparent / false == with background\",after:\": true\"},{field:\"export-dark\",code:null,desc:\"If this key is present it will override the default excalidraw embed and export setting. true == Dark mode / false == light mode\",after:\": true\"},{field:\"export-padding\",code:null,desc:\"If this key is present it will override the default excalidraw embed and export setting. This only affects both SVG and PNG export. Specify the export padding for the image.\",after:\": 5\"},{field:\"export-pngscale\",code:null,desc:\"If this key is present it will override the default excalidraw embed and export setting. This only affects export to PNG. Specify the export scale for the image. The typical range is between 0.5 and 5, but you can experiment with other values as well.\",after:\": 1\"},{field:\"export-embed-scene\",code:null,desc:\"If this key is present it will override the default excalidraw embed and export setting.\",after:\": false\"},{field:\"open-md\",code:null,desc:\"If this key is present the file will be opened as a markdown file in the editor\",after:\": true\"},{field:\"embed-md\",code:null,desc:\"If this key is present, when embedding the ![[image]] into a markdown document, it will be embedded as markdown, not as an image.\\nIf however you embed ![[image#^as-image]], i.e. you reference the 'as-image' block, then the image will be embedded as an image.\",after:\": true\"},{field:\"autoexport\",code:null,desc:\"Override autoexport settings for this file. Valid values are\\nnone\\nboth\\npng\\nsvg\",after:\": png\"},{field:\"embeddable-theme\",code:null,desc:\"Override embeddable's theme plugin-settings for this file. 'auto' will match the Excalidraw theme, 'default' will match the Obsidian theme. Valid values are\\ndark\\nlight\\nauto\\ndefault\",after:\": auto\"},{field:\"mask\",code:null,desc:\"If this key is present the drawing will be handled as a mask to crop an image.\",after:\": true\"}];class FloatingModal extends obsidian_module.Modal{dragging=!1;offsetX=0;offsetY=0;pointerDownHandler;pointerMoveHandler;pointerUpHandler;disableKeyCapture=!0;previousActive=null;escListener;modalKeydownStopHandler;constructor(e){super(e),this.pointerDownHandler=this.handlePointerDown.bind(this),this.pointerMoveHandler=this.handlePointerMove.bind(this),this.pointerUpHandler=this.handlePointerUp.bind(this),this.escListener=this.handleEscKey.bind(this),this.modalKeydownStopHandler=e=>e.stopPropagation()}handlePointerDown(e){const t=e.target;if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t instanceof HTMLButtonElement||t.closest(\".clickable-icon\")))if(\"touchstart\"===e.type){if(e.preventDefault(),e.stopPropagation(),1!==e.touches.length)return;const t=e.touches[0];this.dragging=!0;const{modalEl:a}=this;this.offsetX=t.clientX-a.getBoundingClientRect().left,this.offsetY=t.clientY-a.getBoundingClientRect().top,document.addEventListener(\"touchmove\",this.pointerMoveHandler,{passive:!1}),document.addEventListener(\"touchend\",this.pointerUpHandler),document.addEventListener(\"touchcancel\",this.pointerUpHandler)}else{this.dragging=!0;const{modalEl:a}=this,i=e;this.offsetX=i.clientX-a.getBoundingClientRect().left,this.offsetY=i.clientY-a.getBoundingClientRect().top,document.addEventListener(\"pointermove\",this.pointerMoveHandler),document.addEventListener(\"pointerup\",this.pointerUpHandler),t.setPointerCapture(i.pointerId)}}handlePointerMove(e){if(!this.dragging)return;const{modalEl:t}=this;let a,i;if(e.preventDefault(),\"touchmove\"===e.type&&e.stopPropagation(),\"touchmove\"===e.type){const t=e.touches[0];a=t.clientX,i=t.clientY}else{const t=e;a=t.clientX,i=t.clientY}const n=a-this.offsetX,r=i-this.offsetY;t.style.left=`${n}px`,t.style.top=`${r}px`,t.style.transform=\"none\"}handlePointerUp(){this.dragging=!1,document.removeEventListener(\"pointermove\",this.pointerMoveHandler),document.removeEventListener(\"pointerup\",this.pointerUpHandler),document.removeEventListener(\"touchmove\",this.pointerMoveHandler),document.removeEventListener(\"touchend\",this.pointerUpHandler),document.removeEventListener(\"touchcancel\",this.pointerUpHandler)}handleEscKey(e){\"Escape\"===e.key&&(e.stopPropagation(),this.close())}open(){if(super.open(),this.disableKeyCapture){this.previousActive=document.activeElement;try{this.app.keymap.popScope(this.scope)}catch{}try{this.shouldRestoreSelection=!1}catch{}}setTimeout((()=>{const{containerEl:e,modalEl:t,bgEl:a,headerEl:i}=this;if(e.style.pointerEvents=\"none\",a&&(a.style.display=\"none\"),i&&(i.style.pointerEvents=\"none\"),t){t.style.pointerEvents=\"auto\",t.style.position=\"absolute\";const e=t.getBoundingClientRect(),a=window.innerWidth/2-e.width/2,i=window.innerHeight/2-e.height/2;t.style.left=`${a}px`,t.style.top=`${i}px`,t.style.transform=\"none\";const n=window.getComputedStyle(t);t.style.borderBottomLeftRadius=n.borderTopLeftRadius,t.style.borderBottomRightRadius=n.borderTopRightRadius,t.addEventListener(\"pointerdown\",this.pointerDownHandler),t.addEventListener(\"touchstart\",this.pointerDownHandler,{passive:!1}),this.disableKeyCapture&&(t.setAttr(\"tabindex\",\"-1\"),this.previousActive?.isConnected&&this.previousActive.focus({preventScroll:!0}),t.addEventListener(\"keydown\",this.modalKeydownStopHandler,{capture:!0})),document.addEventListener(\"keydown\",this.escListener,{capture:!0})}}))}close(){if(this.disableKeyCapture&&this.previousActive?.isConnected&&document.activeElement===document.body)try{this.previousActive.focus({preventScroll:!0})}catch{}const{modalEl:e}=this;e&&(e.removeEventListener(\"pointerdown\",this.pointerDownHandler),e.removeEventListener(\"touchstart\",this.pointerDownHandler),e.removeEventListener(\"keydown\",this.modalKeydownStopHandler,{capture:!0})),this.handlePointerUp(),document.removeEventListener(\"keydown\",this.escListener,{capture:!0}),super.close()}enableKeyCapture(){this.disableKeyCapture=!1}disableKeyCaptureFn(){this.disableKeyCapture=!0}}B([r$c,z,e$a,l$3,b$1,v,h$1,i$5,i$4,h,u,c$1,s]);const GAP=4;class ExcalidrawAutomate{get obsidian(){return obsidian_module__namespace}get FloatingModal(){return FloatingModal}get LASERPOINTER(){return this.plugin.settings.laserSettings}get DEVICE(){return DEVICE}printStartupBreakdown(){this.plugin.printStarupBreakdown()}addAppendUpdateCustomData(e,t){const a=this.elementsDict[e];if(a)return addAppendUpdateCustomData(a,t)}help(e){if(!e)return void log$2(\"Usage: ea.help(ea.functionName) or ea.help('propertyName') or ea.help('utils.functionName') - notice property name and utils function name is in quotes\");let t;if(\"function\"==typeof e)t=EXCALIDRAW_AUTOMATE_INFO.find((t=>t.field===e.name));else if(\"string\"==typeof e){let a=e;a=a.startsWith(\"utils.\")?a.substring(6):a,a=a.startsWith(\"ea.\")?a.substring(3):a,t=EXCALIDRAW_AUTOMATE_INFO.find((e=>e.field===a)),t||(t=EXCALIDRAW_SCRIPTENGINE_INFO.find((e=>e.field===a)))}if(!t)return void log$2(\"Usage: ea.help(ea.functionName) or ea.help('propertyName') or ea.help('utils.functionName') - notice property name and utils function name is in quotes\");let a=!0;if(t.code&&(a=!1,log$2(`Declaration: ${t.code}`)),t.desc){a=!1;const e=t.desc.replaceAll(\"<br>\",\"\\n\").replace(/<code>(.*?)<\\/code>/g,\"%c\u200b$1%c\").replace(/<b>(.*?)<\\/b>/g,\"%c\u200b$1%c\").replace(/<a onclick='window\\.open\\(\"(.*?)\"\\)'>(.*?)<\\/a>/g,((e,t,a)=>`%c\u200b${a}%c\u200b (link: ${t})`)),i=Array.from({length:(e.match(/%c/g)||[]).length},((e,t)=>t%2==0?\"color: #007bff;\":\"\"));log$2(`Description: ${e}`,...i)}a&&log$2(\"Description not available for this function.\")}async postOpenAI(e){return await postOpenAI(e)}extractCodeBlocks(e){return extractCodeBlocks(e)}async convertStringToDataURL(e,t=\"text/html\"){const a=new Blob([e],{type:t}),i=await new Promise((e=>{const t=new FileReader;t.onload=()=>{if(\"string\"==typeof t.result){const a=t.result.split(\",\")[1];e(a)}else e(null)},t.readAsDataURL(a)}));return i?`data:${t};base64,${i}`:\"about:blank\"}async checkAndCreateFolder(e){return await checkAndCreateFolder(e)}splitFolderAndFilename(e){return splitFolderAndFilename(e)}getNewUniqueFilepath(e,t){return getNewUniqueFilepath(this.plugin.app.vault,e,t)}getListOfTemplateFiles(){return getListOfTemplateFiles(this.plugin)}getEmbeddedImagesFiletree(e){return!e&&this.targetView&&this.targetView.file&&(e=this.targetView.file),e?getExcalidrawEmbeddedFilesFiletree(e,this.plugin):[]}async getAttachmentFilepath(e){if(!this.targetView||!this.targetView?.file)return errorMessage(\"targetView not set\",\"getAttachmentFolderAndFilePath()\"),null;const t=await getAttachmentsFolderAndFilePath(this.plugin.app,this.targetView.file.path,e);return getNewUniqueFilepath(this.plugin.app.vault,e,t.folder)}compressToBase64(e){return LZString.compressToBase64(e)}decompressFromBase64(e){if(!e)throw new Error(\"No input string provided for decompression.\");let t=\"\";const a=e.length;for(let i=0;i<a;i++){const a=e[i];\"\\\\n\"!==a&&\"\\\\r\"!==a&&(t+=a)}return LZString.decompressFromBase64(t)}async newFilePrompt(e,t,a,i){if(!this.targetView||!this.targetView?.file)return errorMessage(\"targetView not set\",\"newFileActions()\"),null;const n=emulateKeysForLinkClick(a),r=new NewFileActions({plugin:this.plugin,path:e,keys:n,view:this.targetView,openNewFile:t,parentFile:i});return r.open(),await r.waitForClose}getLeaf(e,t){const a=emulateKeysForLinkClick(t??\"new-tab\");return getLeaf(this.plugin,e,a)}getActiveEmbeddableViewOrEditor(e){if(!this.targetView&&!e)return null;const t=(e=e??this.targetView).getActiveEmbeddable();if(t){if(t.node&&t.node.isEditing)return{file:t.node.file,editor:t.node.child.editor};if(t.node)return{node:t.node};if(t.leaf&&t.leaf.view)return{view:t.leaf.view}}return null}isExcalidrawMaskFile(e){return e?this.isExcalidrawFile(e)&&isMaskFile(this.plugin,e):this.targetView&&this.targetView?.file?isMaskFile(this.plugin,this.targetView.file):(errorMessage(\"targetView not set\",\"isMaskFile()\"),null)}plugin;elementsDict;imagesDict;mostRecentMarkdownSVG=null;style;canvas;colorPalette;constructor(e,t){this.plugin=e,this.reset(),this.targetView=t}getViewLastPointerPosition(){return this.targetView&&this.targetView?._loaded?this.targetView.currentPosition:(errorMessage(\"targetView not set\",\"getExcalidrawAPI()\"),null)}getViewCenterPosition(){if(!this.targetView||!this.targetView?._loaded)return errorMessage(\"targetView not set\",\"getExcalidrawAPI()\"),null;const e=this.getExcalidrawAPI().getAppState();if(!e)return null;const t=e.zoom?.value??1;return{x:-e.scrollX+e.width/2/t,y:-e.scrollY+e.height/2/t}}getAPI(e){const t=new ExcalidrawAutomate(this.plugin,e);return this.plugin.eaInstances.push(t),t}setFillStyle(e){switch(e){case 0:return this.style.fillStyle=\"hachure\",\"hachure\";case 1:return this.style.fillStyle=\"cross-hatch\",\"cross-hatch\";default:return this.style.fillStyle=\"solid\",\"solid\"}}setStrokeStyle(e){switch(e){case 0:return this.style.strokeStyle=\"solid\",\"solid\";case 1:return this.style.strokeStyle=\"dashed\",\"dashed\";default:return this.style.strokeStyle=\"dotted\",\"dotted\"}}setStrokeSharpness(e){return 0===e?(this.style.roundness={type:ROUNDNESS.LEGACY},\"round\"):(this.style.roundness=null,\"sharp\")}setFontFamily(e){switch(e){case 1:return this.style.fontFamily=4,getFontFamily(4);case 2:return this.style.fontFamily=2,getFontFamily(2);case 3:return this.style.fontFamily=3,getFontFamily(3);default:return this.style.fontFamily=1,getFontFamily(1)}}setTheme(e){return 0===e?(this.canvas.theme=\"light\",\"light\"):(this.canvas.theme=\"dark\",\"dark\")}addToGroup(e){const t=nanoid();return e.forEach((e=>{this.elementsDict[e]?.groupIds?.push(t)})),t}async toClipboard(e){const t=e?await getTemplate(this.plugin,e,!1,new EmbeddedFilesLoader(this.plugin),0):null;let a=t?t.elements:[];a=a.concat(this.getElements()),navigator.clipboard.writeText(JSON.stringify({type:\"excalidraw/clipboard\",elements:a}))}async getSceneFromFile(e){if(!e)return errorMessage(\"file not found\",\"getScene()\"),null;if(!this.isExcalidrawFile(e))return errorMessage(\"file is not an Excalidraw file\",\"getScene()\"),null;const t=await getTemplate(this.plugin,e.path,!1,new EmbeddedFilesLoader(this.plugin),0);return{elements:t.elements,appState:t.appState}}getElements(){const e=[],t=Object.keys(this.elementsDict);for(let a=0;a<t.length;a++)e.push(this.elementsDict[t[a]]);return e}getElement(e){return this.elementsDict[e]}async create(e){const t=e?.templatePath?await getTemplate(this.plugin,e.templatePath,!0,new EmbeddedFilesLoader(this.plugin),0):null;t?.plaintext&&(e.plaintext?e.plaintext=e.plaintext+\"\\n\\n\"+t.plaintext:e.plaintext=t.plaintext);let a,i=t?t.elements:[];if(i=i.concat(this.getElements()),e?.frontmatterKeys){Object.keys(e.frontmatterKeys).includes(\"excalidraw-plugin\")||(e.frontmatterKeys[\"excalidraw-plugin\"]=\"parsed\"),a=\"---\\n\\n\";for(const t of Object.keys(e.frontmatterKeys))a+=`${t}: ${\"\"===e.frontmatterKeys[t]?'\"\"':e.frontmatterKeys[t]}\\n`;a+=\"\\n---\\n\"}else a=t?.frontmatter?t.frontmatter:FRONTMATTER;a+=e.plaintext?e.plaintext.endsWith(\"\\n\\n\")?e.plaintext:e.plaintext.endsWith(\"\\n\")?e.plaintext+\"\\n\":e.plaintext+\"\\n\\n\":\"\",t?.frontmatter&&e?.frontmatterKeys&&(a=mergeMarkdownFiles(t.frontmatter,a));const n=t?.appState??{};Object.keys(n).forEach((e=>{void 0===n[e]&&delete n[e]}));const r={type:\"excalidraw\",version:2,source:GITHUB_RELEASES+PLUGIN_VERSION,elements:i,appState:{...n,theme:n.theme??this.canvas.theme,viewBackgroundColor:n.viewBackgroundColor??this.canvas.viewBackgroundColor,currentItemStrokeColor:n.currentItemStrokeColor??this.style.strokeColor,currentItemBackgroundColor:n.currentItemBackgroundColor??this.style.backgroundColor,currentItemFillStyle:n.currentItemFillStyle??this.style.fillStyle,currentItemStrokeWidth:n.currentItemStrokeWidth??this.style.strokeWidth,currentItemStrokeStyle:n.currentItemStrokeStyle??this.style.strokeStyle,currentItemRoughness:n.currentItemRoughness??this.style.roughness,currentItemOpacity:n.currentItemOpacity??this.style.opacity,currentItemFontFamily:n.currentItemFontFamily??this.style.fontFamily,currentItemFontSize:n.currentItemFontSize??this.style.fontSize,currentItemTextAlign:n.currentItemTextAlign??this.style.textAlign,currentItemStartArrowhead:n.currentItemStartArrowhead??this.style.startArrowHead,currentItemEndArrowhead:n.currentItemEndArrowhead??this.style.endArrowHead,currentItemRoundness:n.currentItemLinearStrokeSharpness??n.currentItemStrokeSharpness??n.currentItemRoundness??this.style.roundness?\"round\":\"sharp\",gridSize:n.gridSize??this.canvas.gridSize,colorPalette:n.colorPalette??this.colorPalette},files:t?.files??{}},s=e?.filename?e.filename+(e.filename.endsWith(\".md\")?\"\":\".excalidraw.md\"):getDrawingFilename(this.plugin.settings),o=e?.foldername?e.foldername:this.plugin.settings.folder,l=this.plugin.settings.compatibilityMode?JSON.stringify(r,null,\"\\t\"):a+(()=>{const e=this.getElements().filter((e=>\"text\"===e.type));let t=\"# Excalidraw Data\\n\\n## Text Elements\\n\";e.forEach((e=>{t+=`${e.rawText??e.originalText??e.text} ^${e.id}\\n\\n`})),this.getElements().filter((e=>\"text\"!==e.type&&e.link)).forEach((e=>{t+=`${e.link} ^${e.id}\\n\\n`})),t+=Object.keys(this.imagesDict).length>0?\"\\n## Embedded Files\\n\":\"\\n\";const a=(e,t,a)=>`${e}: [[${t}]]${a?\" \"+JSON.stringify(a):\"\"}\\n\\n`;return Object.keys(this.imagesDict).forEach((e=>{const i=this.imagesDict[e];if(i.latex)t+=`${e}: $$${i.latex.trim()}$$\\n\\n`;else if(i.file)i.file instanceof obsidian_module.TFile?t+=a(e,i.file.path,i.colorMap):t+=a(e,i.file,i.colorMap);else{const n=i.hyperlink.split(\"#\"),r=this.plugin.app.vault.getAbstractFileByPath(n[0]);if(r&&r instanceof obsidian_module.TFile){const s=2===n.length;t+=a(e,s?`${r.path}#${n[1]}`:r.path,i.colorMap)}else t+=`${e}: ${i.hyperlink}\\n\\n`}})),t+\"%%\\n\"})()+getMarkdownDrawingSection(JSON.stringify(r,null,\"\\t\"),this.plugin.settings.compress);return e.silent?(await this.plugin.createDrawing(s,o,l)).path:this.plugin.createAndOpenDrawing(s,e?.onNewPane&&e.onNewPane?\"new-pane\":\"active-pane\",o,l)}getPagePDFDimensions(e,t){return getPageDimensions(e,t)}async createPDF({SVG:e,scale:t={fitToPage:1,zoom:1},pageProps:a,filename:i}){a||(a={alignment:this.plugin.settings.pdfSettings.alignment,margin:getMarginValue(this.plugin.settings.pdfSettings.margin)}),a.dimensions||(a.dimensions=getPageDimensions(this.plugin.settings.pdfSettings.pageSize,this.plugin.settings.pdfSettings.pageOrientation)),a.backgroundColor||(a.backgroundColor=\"#ffffff\"),await exportToPDF({SVG:e,scale:t,pageProps:a,filename:i})}async createViewSVG({withBackground:e=!0,theme:t,frameRendering:a={enabled:!0,name:!0,outline:!0,clip:!0},padding:i,selectedOnly:n=!1,skipInliningFonts:r=!1,embedScene:s=!1,elementsOverride:o}){if(!this.targetView||!this.targetView.file||!this.targetView._loaded)return void console.log(\"No view loaded\");const l=this.targetView,c=this.targetView.getScene(n);o&&(c.elements=o);const d={withBackground:l.getViewExportWithBackground(e),withTheme:!0,isMask:isMaskFile(this.plugin,l.file),skipInliningFonts:r,frameRendering:a};return await getSVG({...c,appState:{...c.appState,theme:l.getViewExportTheme(t),exportEmbedScene:l.getViewExportEmbedScene(s)}},d,l.getViewExportPadding(i),l.file)}async createSVG(e,t=!1,a,i,n,r){return n||(n=this.plugin.settings.previewMatchObsidianTheme?isObsidianThemeDark()?\"dark\":\"light\":this.plugin.settings.exportWithTheme?void 0:\"light\"),a||(a={withBackground:this.plugin.settings.exportWithBackground,withTheme:!0,isMask:!1,skipInliningFonts:!t}),i||(i=new EmbeddedFilesLoader(this.plugin,n?\"dark\"===n:void 0)),await createSVG(e,t,a,i,n,this.canvas.theme,this.canvas.viewBackgroundColor,this.getElements(),this.plugin,0,r,this.imagesDict)}async createPNG(e,t=1,a,i,n,r){return n||(n=this.plugin.settings.previewMatchObsidianTheme?isObsidianThemeDark()?\"dark\":\"light\":this.plugin.settings.exportWithTheme?void 0:\"light\"),n&&!a&&(a={withBackground:this.plugin.settings.exportWithBackground,withTheme:!0,isMask:!1}),i||(i=new EmbeddedFilesLoader(this.plugin,n?\"dark\"===n:void 0)),await createPNG(e,t,a,i,n,this.canvas.theme,this.canvas.viewBackgroundColor,this.getElements(),this.plugin,0,r,this.imagesDict)}async createPNGBase64(e,t=1,a,i,n,r){const s=await this.createPNG(e,t,a,i,n,r);return`data:image/png;base64,${await blobToBase64(s)}`}wrapText(e,t){return wrapTextAtCharLength(e,t,this.plugin.settings.forceWrap)}boxedElement(e,t,a,i,n,r,s=null,o){return{id:e,type:t,x:a,y:i,width:n,height:r,angle:this.style.angle,strokeColor:this.style.strokeColor,backgroundColor:this.style.backgroundColor,fillStyle:this.style.fillStyle,strokeWidth:this.style.strokeWidth,strokeStyle:this.style.strokeStyle,roughness:this.style.roughness,opacity:this.style.opacity,roundness:this.style.strokeSharpness?\"round\"===this.style.strokeSharpness?{type:ROUNDNESS.ADAPTIVE_RADIUS}:null:this.style.roundness,seed:Math.floor(1e5*Math.random()),version:1,versionNonce:Math.floor(1e9*Math.random()),updated:Date.now(),isDeleted:!1,groupIds:[],boundElements:[],link:s,locked:!1,frameId:null,...o?{scale:o}:{}}}addIFrame(e,t,a,i,n,r){return this.addEmbeddable(e,t,a,i,n,r)}addEmbeddable(e,t,a,i,n,r,s){if(!this.targetView||!this.targetView?._loaded)return errorMessage(\"targetView not set\",\"addEmbeddable()\"),null;if(!n&&!r)return errorMessage(\"Either the url or the file must be set. If both are provided the URL takes precedence\",\"addEmbeddable()\"),null;const o=nanoid();return this.elementsDict[o]=this.boxedElement(o,\"embeddable\",e,t,a,i,n||(r?`[[${this.plugin.app.metadataCache.fileToLinktext(r,this.targetView.file.path,!1)}]]`:\"\"),[1,1]),this.elementsDict[o].customData={mdProps:s??this.plugin.settings.embeddableMarkdownDefaults},o}addElementsToFrame(e,t){this.getElement(e)&&t.forEach((t=>{const a=this.getElement(t);a&&(a.frameId=e)}))}addFrame(e,t,a,i,n){const r=this.addRect(e,t,a,i),s=this.getElement(r);return s.type=\"frame\",s.backgroundColor=\"transparent\",s.strokeColor=\"#000\",s.strokeStyle=\"solid\",s.strokeWidth=2,s.roughness=0,s.roundness=null,n&&(s.name=n),r}addRect(e,t,a,i,n){return n||(n=nanoid()),this.elementsDict[n]=this.boxedElement(n,\"rectangle\",e,t,a,i),n}addDiamond(e,t,a,i,n){return n||(n=nanoid()),this.elementsDict[n]=this.boxedElement(n,\"diamond\",e,t,a,i),n}addEllipse(e,t,a,i,n){return n||(n=nanoid()),this.elementsDict[n]=this.boxedElement(n,\"ellipse\",e,t,a,i),n}addBlob(e,t,a,i,n){const r=.5*i,s=.5*a,o=s/9,l=.8*r,c=[],d=(a,i)=>{const n=a+Math.random()*o-o/2;c.push([n+Math.random()*o-o/2+a%2*o/6+e,i*Math.sqrt(r*r*(1-n*n/(s*s)))+Math.random()*l-l/2+a%2*l/6+t])};let h;for(h=o/2-s;h<=s-o/2;h+=s/6)d(h,1);for(h=s-o/2;h>=o/2-s;h-=s/6)d(h,-1);return c.push(c[0]),n=this.addLine((e=>{const t=getLineBox(e),n=a/t.w,r=i/t.h;let s;for(s=0;s<e.length;s++){let[a,i]=e[s];a=(a-t.x)*n+t.x,i=(i-t.y)*r+t.y,e[s]=[a,i]}return e})(c),n),this.elementsDict[n]=repositionElementsToCursor([this.getElement(n)],{x:e,y:t},!1)[0],n}refreshTextElementSize(e){const t=this.getElement(e);if(\"text\"!==t.type)return;const{w:a,h:i}=_measureText(t.text,t.fontSize,t.fontFamily,getLineHeight(t.fontFamily));t.width=a,t.height=i}addText(e,t,a,i,n){n=n??nanoid();const r=a,s=!(void 0!==i?.width&&!i?.box)||(i?.autoResize??!0);a=i?.wrapAt&&s?this.wrapText(a,i.wrapAt):a;const{w:o,h:l}=_measureText(a,this.style.fontSize,this.style.fontFamily,getLineHeight(this.style.fontFamily)),c=i?.width?i.width:o,d=i?.height?i.height:l;let h=null;const p=this.style.strokeColor;this.style.strokeColor=i?.boxStrokeColor??p;const u=i?.boxPadding??30;if(i?.box)switch(i.box){case\"ellipse\":h=this.addEllipse(e-u,t-u,c+2*u,d+2*u);break;case\"diamond\":h=this.addDiamond(e-u,t-u,c+2*u,d+2*u);break;case\"blob\":h=this.addBlob(e-u,t-u,c+2*u,d+2*u);break;default:h=this.addRect(e-u,t-u,c+2*u,d+2*u)}this.style.strokeColor=p;const m=h&&\"blob\"!==i.box;if(this.elementsDict[n]={text:a,fontSize:this.style.fontSize,fontFamily:this.style.fontFamily,textAlign:i?.textAlign?i.textAlign:this.style.textAlign??\"left\",verticalAlign:i?.textVerticalAlign??this.style.verticalAlign,...this.boxedElement(n,\"text\",e,t,c,d),containerId:m?h:null,originalText:m?r:a,rawText:m?r:a,lineHeight:getLineHeight(this.style.fontFamily),autoResize:!!i?.box||(i?.autoResize??!0)},h&&\"blob\"===i?.box&&this.addToGroup([n,h]),m){const e=this.elementsDict[h];e.boundElements||(e.boundElements=[]),e.boundElements.push({type:\"text\",id:n})}const g=this.getElement(n),f=h&&\"blob\"!==i.box?this.getElement(h):void 0,b=refreshTextDimensions(g,f,arrayToMap(this.getElements()),r);return b&&!i?.width&&(g.width=b.width,g.height=b.height,g.x=b.x,g.y=b.y,g.text=b.text,f&&(f.width=b.width+2*u,f.height=b.height+2*u)),h??n}addLine(e,t){const a=getLineBox(e);return t=t??nanoid(),this.elementsDict[t]={points:normalizeLinePoints(e),lastCommittedPoint:null,startBinding:null,endBinding:null,startArrowhead:null,endArrowhead:null,...this.boxedElement(t,\"line\",e[0][0],e[0][1],a.w,a.h)},t}addArrow(e,t,a){const i=getLineBox(e);a=a??nanoid();const n=e[0],r=e[e.length-1],s=arrayToMap(this.getElements());return this.elementsDict[a]={points:normalizeLinePoints(e),lastCommittedPoint:null,startBinding:{elementId:t?.startObjectId,focus:t?.startObjectId?determineFocusDistance(this.getElement(t?.startObjectId),s,r,n):.1,gap:GAP},endBinding:{elementId:t?.endObjectId,focus:t?.endObjectId?determineFocusDistance(this.getElement(t?.endObjectId),s,n,r):.1,gap:GAP},startArrowhead:void 0!==t?.startArrowHead?t.startArrowHead:this.style.startArrowHead,endArrowhead:void 0!==t?.endArrowHead?t.endArrowHead:this.style.endArrowHead,...this.boxedElement(a,\"arrow\",e[0][0],e[0][1],i.w,i.h)},t?.startObjectId&&(this.elementsDict[t.startObjectId].boundElements||(this.elementsDict[t.startObjectId].boundElements=[]),this.elementsDict[t.startObjectId].boundElements.push({type:\"arrow\",id:a})),t?.endObjectId&&(this.elementsDict[t.endObjectId].boundElements||(this.elementsDict[t.endObjectId].boundElements=[]),this.elementsDict[t.endObjectId].boundElements.push({type:\"arrow\",id:a})),a}async addMermaid(e,t=!0){const a=await mermaidToExcalidraw(e,{themeVariables:{fontSize:`${this.style.fontSize}`},flowchart:{curve:null===this.style.roundness?\"linear\":\"basis\"}}),i=[];if(!a)return null;if(a?.error)return a.error;if(a?.elements&&a.elements.forEach((e=>{i.push(e.id),this.elementsDict[e.id]=e})),a?.files)for(const e in a.files)this.imagesDict[e]={...a.files[e],created:Date.now(),isHyperLink:!1,hyperlink:null,file:null,hasSVGwithBitmap:!1,latex:null};return t&&a?.elements&&i.length>1&&this.addToGroup(i),i}async addImage(e,t,a,i=!0,n=!0){let r,s;\"number\"==typeof e?s=e:(t=e.topY,s=e.topX,a=e.imageFile,i=e.scale??!0,n=e.anchor??!0,r=e.colorMap);const o=nanoid(),l=new EmbeddedFilesLoader(this.plugin,\"dark\"===this.canvas.theme),c=\"string\"==typeof a?await l.getObsidianImage(new EmbeddedFile(this.plugin,\"\",a),0):await l.getObsidianImage(a,0);if(!c)return null;const d=\"string\"==typeof a?c.fileId:\"md\"===a.extension||\"pdf\"===a.extension.toLowerCase()?fileid():c.fileId;if(this.imagesDict[d]={mimeType:c.mimeType,id:d,dataURL:c.dataURL,created:c.created,isHyperLink:\"string\"==typeof a,hyperlink:\"string\"==typeof a?a:null,file:\"string\"==typeof a?null:a.path+(i||!n?\"\":\"|100%\"),hasSVGwithBitmap:c.hasSVGwithBitmap,latex:null,size:{height:c.size.height,width:c.size.width},colorMap:r,pdfPageViewProps:c.pdfPageViewProps},i&&Math.max(c.size.width,c.size.height)>MAX_IMAGE_SIZE){const e=MAX_IMAGE_SIZE/Math.max(c.size.width,c.size.height);c.size.width=e*c.size.width,c.size.height=e*c.size.height}this.elementsDict[o]=this.boxedElement(o,\"image\",s,t,c.size.width,c.size.height);const h=this.elementsDict[o];return h.fileId=d,h.scale=[1,1],h.crop=null,!i&&n&&(h.customData={isAnchored:!0}),o}async addLaTex(e,t,a){const i=nanoid(),n=await tex2dataURL(a,4,this.plugin);return n?(this.imagesDict[n.fileId]={mimeType:n.mimeType,id:n.fileId,dataURL:n.dataURL,created:n.created,file:null,hasSVGwithBitmap:!1,latex:a},this.elementsDict[i]=this.boxedElement(i,\"image\",e,t,n.size.width,n.size.height),this.elementsDict[i].fileId=n.fileId,this.elementsDict[i].scale=[1,1],i):null}async tex2dataURL(e,t=4){return await tex2dataURL(e,t,this.plugin)}connectObjects(e,t,a,i,n){if(!this.elementsDict[e]||!this.elementsDict[a])return;if([\"line\",\"arrow\",\"freedraw\"].includes(this.elementsDict[e].type)||[\"line\",\"arrow\",\"freedraw\"].includes(this.elementsDict[a].type))return;const r=n?.padding?n.padding:10,s=n?.numberOfPoints?n.numberOfPoints:0,o=(e,t)=>{switch(e){case\"bottom\":return[(t.x+(t.x+t.width))/2,t.y+t.height+r];case\"left\":return[t.x-r,(t.y+(t.y+t.height))/2];case\"right\":return[t.x+t.width+r,(t.y+(t.y+t.height))/2];default:return[(t.x+(t.x+t.width))/2,t.y-r]}};let l,c,d,h;const p=this.elementsDict[e],u=this.elementsDict[a];if(!t||!i){const e=p.x+p.width/2,a=u.x+u.width/2,n=p.y+p.height/2,r=u.y+u.height/2;if(!t){const t=intersectElementWithLine(p,[a,r],[e,n],GAP);0===t.length?[l,c]=[e,n]:[l,c]=t[0]}if(!i){const t=intersectElementWithLine(u,[e,n],[a,r],GAP);0===t.length?[d,h]=[a,r]:[d,h]=t[0]}}t&&([l,c]=o(t,this.elementsDict[e])),i&&([d,h]=o(i,this.elementsDict[a]));const m=s+2,g=[];for(let e=0;e<m;e++)g.push([l+e*(d-l)/(m-1),c+e*(h-c)/(m-1)]);return this.addArrow(g,{startArrowHead:n?.startArrowHead,endArrowHead:n?.endArrowHead,startObjectId:e,endObjectId:a})}addLabelToLine(e,t){const a=this.elementsDict[e];if(!a||![\"arrow\",\"line\"].includes(a.type)||2!==a.points.length)return;let i=Math.atan2(a.points[1][1],a.points[1][0]);const n=this.measureText(t);i<0?i<-Math.PI/2&&(i+=Math.PI):i>Math.PI/2&&(i-=Math.PI),this.style.angle=i;const r=this.addText(a.x+a.points[1][0]/2-n.width/2,a.y+a.points[1][1]/2-n.height,t);return this.style.angle=0,r}clear(){this.elementsDict={},this.imagesDict={}}reset(){this.clear(),this.activeScript=null,this.style={strokeColor:\"#000000\",backgroundColor:\"transparent\",angle:0,fillStyle:\"hachure\",strokeWidth:1,strokeStyle:\"solid\",roughness:1,opacity:100,roundness:null,fontFamily:1,fontSize:20,textAlign:\"left\",verticalAlign:\"top\",startArrowHead:null,endArrowHead:\"arrow\"},this.canvas={theme:\"light\",viewBackgroundColor:\"#FFFFFF\",gridSize:0}}isExcalidrawFile(e){return this.plugin.isExcalidrawFile(e)}targetView=null;setView(e){if(!e){const e=this.plugin.app.workspace.getActiveViewOfType(ExcalidrawView);this.targetView=e instanceof ExcalidrawView?e:getExcalidrawViews(this.plugin.app)[0]}if(\"active\"==e){const e=this.plugin.app.workspace.getActiveViewOfType(ExcalidrawView);if(!(e instanceof ExcalidrawView))return;this.targetView=e}return\"first\"==e&&(this.targetView=getExcalidrawViews(this.plugin.app)[0]),e instanceof ExcalidrawView&&(this.targetView=e),this.targetView}getExcalidrawAPI(){return this.targetView&&this.targetView?._loaded?this.targetView.excalidrawAPI:(errorMessage(\"targetView not set\",\"getExcalidrawAPI()\"),null)}getViewElements(){return this.targetView&&this.targetView?._loaded?this.targetView.getViewElements():(errorMessage(\"targetView not set\",\"getViewElements()\"),[])}deleteViewElements(e){if(!this.targetView||!this.targetView?._loaded)return errorMessage(\"targetView not set\",\"deleteViewElements()\"),!1;const t=this.targetView?.excalidrawAPI;if(!t)return!1;const a=e.map((e=>e.id)),i=t.getSceneElements(),n=t.getAppState();return this.targetView.updateScene({elements:i.filter((e=>!a.includes(e.id))),appState:n,captureUpdate:CaptureUpdateAction.IMMEDIATELY}),!0}async addBackOfTheCardNoteToView(e,t=!1,a,i){return this.targetView&&this.targetView?._loaded?(await this.targetView.forceSave(!0),addBackOfTheNoteCard(this.targetView,e,t,a,i)):(errorMessage(\"targetView not set\",\"addBackOfTheCardNoteToView()\"),null)}getViewSelectedElement(){const e=this.getViewSelectedElements();return e?e[0]:null}getViewSelectedElements(e=!0){return this.targetView&&this.targetView?._loaded?this.targetView.getViewSelectedElements(e):(errorMessage(\"targetView not set\",\"getViewSelectedElements()\"),[])}getViewFileForImageElement(e){return getEmbeddedFileForImageElment(this,e)?.file}getColorMapForImageElement(e){const t=getEmbeddedFileForImageElment(this,e)?.colorMap;return t||{}}async updateViewSVGImageColorMap(e,t){const a=Array.isArray(e)?e:[e],i=Array.isArray(t)?t:[t];let n;if(i.length!==a.length)return void errorMessage(\"Elements and colors arrays must have same length\",\"updateViewSVGImageColorMap()\");n=isSVGColorInfo(i[0])?t.map(svgColorInfoToColorMap):t;const r=new Set;for(let e=0;e<a.length;e++){const t=a[e],i=filterColorMap(n[e]),s=getEmbeddedFileForImageElment(this,t);s&&s.file&&i?(i&&\"object\"==typeof i&&0!==Object.keys(i).length?(s.colorMap=i,\"black\"===s.colorMap.fill&&delete s.colorMap.fill,\"none\"===s.colorMap.stroke&&delete s.colorMap.stroke):s.colorMap=null,s.resetImage(this.targetView.file.path,s.linkParts.original),r.add(t.fileId)):errorMessage(\"Must provide an image element and a colorMap as input\",\"updateViewSVGImageColorMap()\")}r.size>0&&(this.targetView.setDirty(),await new Promise((e=>{this.targetView.loadSceneFiles(!1,r,e)})))}async getSVGColorInfoForImgElement(e){if(!this.targetView||!this.targetView?._loaded)return void errorMessage(\"targetView not set\",\"getViewFileForImageElement()\");if(!e||\"image\"!==e.type)return void errorMessage(\"Must provide an image element as input\",\"getViewFileForImageElement()\");const t=getEmbeddedFileForImageElment(this,e),a=t?.file;if(!a||\"svg\"!==a.extension&&!this.isExcalidrawFile(a))return void errorMessage(\"Must provide an SVG or nested Excalidraw image element as input\",\"getColorMapForImgElement()\");if(\"svg\"===a.extension){const e=await this.plugin.app.vault.cachedRead(a),i=this.getColorsFromSVGString(e);return mergeColorMapIntoSVGColorInfo(t.colorMap,i)}const i=await this.getColosFromExcalidrawFile(a,e);return mergeColorMapIntoSVGColorInfo(t.colorMap,i)}async getColosFromExcalidrawFile(e,t){if(!e||!this.isExcalidrawFile(e))return void errorMessage(\"Must provide an Excalidraw file as input\",\"getColosFromExcalidrawFile()\");getEmbeddedFileForImageElment(this,t);const a=new ExcalidrawData(this.plugin);\"excalidraw\"===e.extension?await a.loadLegacyData(await this.plugin.app.vault.cachedRead(e),e):await a.loadData(await this.plugin.app.vault.cachedRead(e),e,TextMode.raw);const i=new Map;return a.loaded?(a.scene.elements.forEach((e=>{\"strokeColor\"in e&&updateOrAddSVGColorInfo(i,e.strokeColor,{stroke:!0}),\"backgroundColor\"in e&&updateOrAddSVGColorInfo(i,e.backgroundColor,{fill:!0})})),i):i}getColorsFromSVGString(e){const t=new Map;return e?(function e(a,i=!1){const n=a.getAttribute(\"fill\");\"none\"!==n&&(n?updateOrAddSVGColorInfo(t,n,{fill:!0}):i&&updateOrAddSVGColorInfo(t,\"fill\",{fill:!0,mappedTo:\"black\"}));const r=a.getAttribute(\"stroke\");r&&\"none\"!==r&&updateOrAddSVGColorInfo(t,r,{stroke:!0});const s=a.getAttribute(\"style\");if(s){const e=s.match(/fill:\\s*([^;}\\s]+)/);e&&\"none\"!==e[1]&&updateOrAddSVGColorInfo(t,e[1],{fill:!0});const a=s.match(/stroke:\\s*([^;}\\s]+)/);a&&\"none\"!==a[1]&&updateOrAddSVGColorInfo(t,a[1],{stroke:!0})}for(const t of Array.from(a.children))e(t)}((new DOMParser).parseFromString(e,\"image/svg+xml\").documentElement,!0),t):t}copyViewElementsToEAforEditing(e,t=!1){if(t&&e.some((e=>\"image\"===e.type))){if(!this.targetView||!this.targetView?._loaded)return void errorMessage(\"targetView not set\",\"copyViewElementsToEAforEditing()\");const t=this.targetView.getScene().files;e.forEach((e=>{if(this.elementsDict[e.id]=cloneElement(e),\"image\"===e.type){const a=this.targetView.excalidrawData.getFile(e.fileId),i=a&&a.file&&a.linkParts&&a.linkParts.ref,n=this.targetView.excalidrawData.getEquation(e.fileId),r=t?.[e.fileId];this.imagesDict[e.fileId]={mimeType:r.mimeType,id:e.fileId,dataURL:r.dataURL,created:r.created,hasSVGwithBitmap:!!a&&a.isSVGwithBitmap,...a?{isHyperLink:a.isHyperLink||Boolean(i),hyperlink:i?`${a.file.path}#${a.linkParts.ref}`:a.hyperlink,file:i?null:a.file,latex:null}:{},...n?{file:null,isHyperLink:!1,hyperlink:null,latex:n.latex}:{}}}}))}else e.forEach((e=>{this.elementsDict[e.id]=cloneElement(e)}))}viewToggleFullScreen(e=!1){if(!this.targetView||!this.targetView?._loaded)return void errorMessage(\"targetView not set\",\"viewToggleFullScreen()\");const t=this.targetView,a=t.isFullscreen();e&&(t.updateScene({appState:{viewModeEnabled:!a},captureUpdate:CaptureUpdateAction.NEVER}),this.targetView.toolsPanelRef?.current?.setExcalidrawViewMode(!a)),a?t.exitFullscreen():t.gotoFullscreen()}setViewModeEnabled(e){if(!this.targetView||!this.targetView?._loaded)return void errorMessage(\"targetView not set\",\"viewToggleFullScreen()\");const t=this.targetView;t.updateScene({appState:{viewModeEnabled:e},captureUpdate:CaptureUpdateAction.NEVER}),t.toolsPanelRef?.current?.setExcalidrawViewMode(e)}viewUpdateScene(e,t=!1){this.targetView&&this.targetView?._loaded?(Boolean(e.storeAction)||(e.storeAction=e.commitToHistory?\"capture\":\"update\"),this.targetView.updateScene({elements:e.elements,appState:e.appState,files:e.files,storeAction:e.storeAction,captureUpdate:e.captureUpdate},t)):errorMessage(\"targetView not set\",\"viewToggleFullScreen()\")}connectObjectWithViewSelectedElement(e,t,a,i){const n=this.getViewSelectedElement();if(!n)return!1;const r=n.id;return this.elementsDict[r]=n,this.connectObjects(e,t,r,a,i),delete this.elementsDict[r],!0}viewZoomToElements(e,t){this.targetView&&this.targetView?._loaded?this.targetView.zoomToElements(e,t):errorMessage(\"targetView not set\",\"viewToggleFullScreen()\")}async addElementsToView(e=!1,t=!0,a=!1,i=!1){if(!this.targetView||!this.targetView?._loaded)return errorMessage(\"targetView not set\",\"addElementsToView()\"),!1;const n=this.getElements();return n.some((e=>\"embeddable\"===e.type))&&patchMobileView(this.targetView),await this.targetView.addElements({newElements:n,repositionToCursor:e,save:t,images:this.imagesDict,newElementsOnTop:a,shouldRestoreElements:i})}registerThisAsViewEA(){return this.targetView&&this.targetView?._loaded?(this.targetView.setHookServer(this),!0):(errorMessage(\"targetView not set\",\"addElementsToView()\"),!1)}deregisterThisAsViewEA(){return this.targetView&&this.targetView?._loaded?(this.targetView.setHookServer(this),!0):(errorMessage(\"targetView not set\",\"addElementsToView()\"),!1)}onViewUnloadHook=null;onViewModeChangeHook=null;onLinkHoverHook=null;onLinkClickHook=null;onDropHook=null;onPasteHook=null;onImageFilePathHook=null;onImageExportPathHook=null;onTriggerAutoexportHook=null;onFileOpenHook;onFileCreateHook;onCanvasColorChangeHook=null;onUpdateElementLinkForExportHook=null;getEmbeddedFilesLoader(e){return new EmbeddedFilesLoader(this.plugin,e)}getExportSettings(e,t,a=!1){return{withBackground:e,withTheme:t,isMask:a}}getElementsInArea(e,t){const{x:a,y:i,width:n,height:r,id:s}=t;return e.filter((e=>{if(\"frame\"===e.type&&\"marker\"===e.frameRole)return!1;if(e.id===s)return!0;const{topX:t,topY:o,width:l,height:c}=this.getBoundingBox([e]);return!(t>=a+n||t+l<=a||o>=i+r||o+c<=i)}))}getBoundingBox(e){const t=getCommonBoundingBox(e);return{topX:t.minX,topY:t.minY,width:t.maxX-t.minX,height:t.maxY-t.minY}}getMaximumGroups(e){return getMaximumGroups(e,arrayToMap(e))}getLargestElement(e){if(!e||0===e.length)return null;let t=e[0];const a=e=>e.height*e.width;let i=a(e[0]);for(let n=1;n<e.length;n++){const r=a(e[n]);r>i&&(i=r,t=e[n])}return t}intersectElementWithLine(e,t,a,i){return intersectElementWithLine(e,t,a,i)}getCommonGroupForElements(e){const t=e.map((e=>e.groupIds)).reduce(((e,t)=>t.filter((t=>e.includes(t)))));return t.length>0?t[0]:null}getElementsInTheSameGroupWithElement(e,t,a=!1){if(!e||!t)return[];const i=\"text\"===e.type&&e.containerId?t.filter((t=>t.id===e.containerId)):[];if(0===e.groupIds.length)return a&&\"frame\"===e.type?this.getElementsInFrame(e,t,!0):1===i.length?[e,i[0]]:[e];const n=1===i.length?t=>t.groupIds.some((t=>e.groupIds.includes(t)))||t===i[0]:t=>t.groupIds.some((t=>e.groupIds.includes(t)));if(a){const e=new Set;return t.filter((e=>n(e))).forEach((a=>{\"frame\"===a.type?this.getElementsInFrame(a,t,!0).forEach((t=>e.add(t.id))):e.add(a.id)})),t.filter((t=>e.has(t.id)))}return t.filter((e=>n(e)))}getElementsInFrame(e,t,a=!1){return e&&t&&\"frame\"===e.type?t.filter((t=>t.frameId===e.id||a&&t.id===e.id)):[]}activeScript=null;getScriptSettings(){return this.activeScript?this.plugin.settings.scriptEngineSettings[this.activeScript]??{}:null}async setScriptSettings(e){if(!this.activeScript)return null;this.plugin.settings.scriptEngineSettings[this.activeScript]=e,await this.plugin.saveSettings()}openFileInNewOrAdjacentLeaf(e,t){if(!(e&&e instanceof obsidian_module.TFile))return null;if(!this.targetView)return null;const{leaf:a,promise:i}=openLeaf({plugin:this.plugin,fnGetLeaf:()=>getNewOrAdjacentLeaf(this.plugin,this.targetView.leaf),file:e,openState:t??{active:!0}});return a}measureText(e){const t=_measureText(e,this.style.fontSize,this.style.fontFamily,getLineHeight(this.style.fontFamily));return{width:t.w??0,height:t.h??0}}async getOriginalImageSize(e,t=!1){if(!this.targetView||!this.targetView?._loaded)return errorMessage(\"targetView not set\",\"getOriginalImageSize()\"),null;if(!e||\"image\"!==e.type)return errorMessage(\"Please provide a single image element as input\",\"getOriginalImageSize()\"),null;const a=this.targetView.excalidrawData.getFile(e.fileId);if(!a)return errorMessage(\"Please provide a single image element as input\",\"getOriginalImageSize()\"),null;const i=\"dark\"===this.getExcalidrawAPI().getAppState().theme;let n=a.getImage(i);if(n||t){if(!n){let e=0;for(;!n&&e<50;)await sleep(100),n=a.getImage(i),e++;if(!n)return}return await getImageSize(n)}}async resetImageAspectRatio(e){if(!this.targetView||!this.targetView?._loaded)return errorMessage(\"targetView not set\",\"resetImageAspectRatio()\"),null;let t,a;if(e.crop)t=e.width*e.height,a=e.crop.width/e.crop.height;else{const i=await this.getOriginalImageSize(e,!0);if(!i)return!1;t=e.width*e.height,a=i.width/i.height}let i=Math.sqrt(t*a),n=Math.sqrt(t/a);const r=e.x+e.width/2,s=e.y+e.height/2;if(i!==e.width||n!==e.height){this.getElement(e.id)||this.copyViewElementsToEAforEditing([e]);const t=this.getElement(e.id);return t.width=i,t.height=n,t.x=r-i/2,t.y=s-n/2,!0}return!1}verifyMinimumPluginVersion(e){return verifyMinimumPluginVersion(e)}isExcalidrawView(e){return e instanceof ExcalidrawView}selectElementsInView(e){if(!this.targetView||!this.targetView?._loaded)return void errorMessage(\"targetView not set\",\"selectElementsInView()\");if(!e||0===e.length)return;const t=this.getExcalidrawAPI();if(\"string\"==typeof e[0]){const a=this.getViewElements().filter((t=>e.includes(t.id)));t.selectElements(a)}else t.selectElements(e)}generateElementId(){return nanoid()}cloneElement(e){const t=JSON.parse(JSON.stringify(e));return t.id=nanoid(),t}moveViewElementToZIndex(e,t){if(!this.targetView||!this.targetView?._loaded)return void errorMessage(\"targetView not set\",\"moveViewElementToZIndex()\");const a=this.getExcalidrawAPI(),i=this.getViewElements(),n=i.filter((t=>t.id===e));if(0===n.length)return void errorMessage(`Element (id: ${e}) not found`,\"moveViewElementToZIndex\");if(t>=i.length)return void a.bringToFront(n);if(t<0)return void a.sendToBack(n);const r=i.indexOf(n[0]);i.splice(t,0,i.splice(r,1)[0]),this.targetView.updateScene({elements:i,captureUpdate:CaptureUpdateAction.IMMEDIATELY})}hexStringToRgb(e){const t=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(e);return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}rgbToHexString(e){return O$1({r:e[0],g:e[1],b:e[2]}).stringHEX({alpha:!1})}hslToRgb(e){const t=O$1({h:e[0],s:e[1],l:e[2]});return[t.red,t.green,t.blue]}rgbToHsl(e){const t=O$1({r:e[0],g:e[1],b:e[2]});return[t.hue,t.saturation,t.lightness]}colorNameToHex(e){return COLOR_NAMES.has(e.toLowerCase().trim())?COLOR_NAMES.get(e.toLowerCase().trim()):e.trim()}getCM(e){if(!e)return void log$2(\"Creates a CM object. Visit https://github.com/lbragile/ColorMaster for documentation.\");\"string\"==typeof e&&(e=this.colorNameToHex(e));const t=O$1(e);return isColorStringTransparent(e)?t.alphaTo(0):t}getPolyBool(){return PolyBool$1.epsilon(1e-10),PolyBool$1}importSVG(e){const t=svgToExcalidraw(e);return t.hasErrors?(new obsidian_module.Notice(`There were errors while parsing the given SVG:\\n${t.errors}`),!1):(this.copyViewElementsToEAforEditing(t.content),!0)}destroy(){this.targetView=null,this.plugin=null,this.elementsDict={},this.imagesDict={},this.mostRecentMarkdownSVG=null,this.activeScript=null,this.style={},this.canvas={},this.colorPalette={}}}function isSVGColorInfo(e){return\"object\"==typeof e&&null!==e&&\"stroke\"in e&&\"fill\"in e&&\"mappedTo\"in e}function mergeColorMapIntoSVGColorInfo(e,t){if(e)for(const a of Object.keys(e))t.has(a)&&(t.get(a).mappedTo=e[a]);return t}function svgColorInfoToColorMap(e){const t={};return e.forEach(((e,a)=>{(e.fill||e.stroke)&&(t[a]=e.mappedTo)})),t}function filterColorMap(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>e.toLocaleLowerCase()!==t?.toLocaleLowerCase())))}function updateOrAddSVGColorInfo(e,t,a){const{fill:i,stroke:n,mappedTo:r}=a;t=t.toLocaleLowerCase();const s=e.get(t)||{mappedTo:t,fill:!1,stroke:!1};return void 0!==i&&(s.fill=i),void 0!==n&&(s.stroke=n),void 0!==r&&(s.mappedTo=r),e.set(t,s)}function getEmbeddedFileForImageElment(e,t){return e.targetView&&e.targetView?._loaded?t&&\"image\"===t.type?e.targetView?.excalidrawData?.getFile(t.fileId):(errorMessage(\"Must provide an image element as input\",\"getViewFileForImageElement()\"),null):(errorMessage(\"targetView not set\",\"getViewFileForImageElement()\"),null)}function errorMessage(e,t){switch(e){case\"targetView not set\":errorlog({where:\"ExcalidrawAutomate\",source:t,message:\"targetView not set, or no longer active. Use setView before calling this function\"});break;case\"mobile not supported\":errorlog({where:\"ExcalidrawAutomate\",source:t,message:\"this function is not available on Obsidian Mobile\"});break;default:errorlog({where:\"ExcalidrawAutomate\",source:t,message:e??\"unknown error\"})}}function isColorStringTransparent(e){return/^(rgba|hsla)\\(.*?,.*?,.*?,\\s*0(\\.0+)?\\)$/i.test(e)||/^#[a-fA-F0-9]{8}00$/i.test(e)}function initExcalidrawAutomate(e){const t=new ExcalidrawAutomate(e);return window.ExcalidrawAutomate=t,t}function normalizeLinePoints(e){const t=[],[a,i]=e[0];for(let n=0;n<e.length;n++)t.push([e[n][0]-a,e[n][1]-i]);return t}function getLineBox(e){const[t,a,i,n]=estimateLineBound(e);return{x:t,y:a,w:i-t,h:n-a}}function getFontFamily(e){return getFontFamilyString({fontFamily:e})}function _measureText(e,t,a,i){t||(t=20),a||(i=getLineHeight(a=1));const n=measureText(e,`${t.toString()}px ${getFontFamily(a)}`,i);return{w:n.width,h:n.height}}async function getTemplate(e,t,a=!1,i,n,r=!1){const s=e.app,o=s.vault,l=getEmbeddedFilenameParts(t),c=obsidian_module.normalizePath(l.filepath),d=s.metadataCache.getFirstLinkpathDest(c,\"\");let h=!1;if(d&&d instanceof obsidian_module.TFile){const t=(await o.read(d)).replaceAll(\"\\r\\n\",\"\\n\").replaceAll(\"\\r\",\"\\n\"),s=new ExcalidrawData(e);if(\"excalidraw\"===d.extension)return await s.loadLegacyData(t,d),{elements:r?updateElementLinksToObsidianLinks({elements:s.scene.elements,hostFile:d}):s.scene.elements,appState:s.scene.appState,frontmatter:\"\",files:s.scene.files,hasSVGwithBitmap:h,plaintext:\"\"};const c=getTextMode(t);await s.loadData(t,d,c);let p=t.search(/^##? Text Elements$/m);-1==p&&(p=t.search(/##? Drawing\\n/));let u,m=s.scene,g=m.elements;if(l.hasGroupref){const t=l.hasSectionref?getTextElementsMatchingQuery(m.elements,[\"# \"+l.sectionref],!0):m.elements.filter((e=>e.id===l.blockref));t.length>0&&(g=e.ea.getElementsInTheSameGroupWithElement(t[0],m.elements,!0))}if(l.hasFrameref||l.hasClippedFrameref){const t=getFrameBasedOnFrameNameOrId(l.blockref,m.elements);t&&(g=\"marker\"===t.frameRole?e.ea.getElementsInArea(m.elements,t).concat(t):e.ea.getElementsInFrame(t,m.elements,l.hasClippedFrameref))}if(l.hasArearef){const t=m.elements.find((e=>e.id===l.blockref));t&&(g=e.ea.getElementsInArea(m.elements,t))}l.hasTaskbone&&(g=g.filter((t=>\"freedraw\"===t.type||\"image\"===t.type&&!e.isExcalidrawFile(s.getFile(t.fileId)?.file)))),g.length<m.elements.length&&(u=new Set,g.filter((e=>\"image\"===e.type)).forEach((e=>u.add(e.fileId)))),a&&await i.loadSceneFiles({excalidrawData:s,addFiles:e=>{if(e&&0!==e.length){for(const t of e)t.hasSVGwithBitmap&&(h=!0),s.scene.files[t.id]={mimeType:t.mimeType,id:t.id,dataURL:t.dataURL,created:t.created};m=scaleLoadedImage(s.scene,e).scene}},depth:n,fileIDWhiteList:u}),s.destroy();const f=getExcalidrawMarkdownHeaderSection(t);let b={};const U=Object.values(m.files).length;U>0&&(u&&U>u.size?Object.values(m.files).filter((e=>u.has(e.id))).forEach((e=>{b[e.id]=e})):b=m.files);const E=f.match(/^---\\n.*\\n---\\n/ms)?.[0]??f;return{elements:r?updateElementLinksToObsidianLinks({elements:g,hostFile:d}):g,appState:m.appState,frontmatter:E,plaintext:E!==f?f.split(/^---\\n.*\\n---\\n/ms)?.[1]??\"\":\"\",files:b,hasSVGwithBitmap:h}}return{elements:[],appState:{},frontmatter:null,files:[],hasSVGwithBitmap:h,plaintext:\"\"}}async function createPNG(e=void 0,t=1,a,i,n=void 0,r=void 0,s=void 0,o=[],l,c,d,h){i||(i=new EmbeddedFilesLoader(l)),d=d??l.settings.exportPaddingSVG;const p=e?await getTemplate(l,e,!0,i,c):null;let u=p?.elements??[];u=u.concat(o);const m=h??{};return p?.files&&Object.values(p.files).forEach((e=>{e.dataURL.startsWith(\"http\")||(m[e.id]=e)})),await getPNG({type:\"excalidraw\",version:2,source:GITHUB_RELEASES+PLUGIN_VERSION,elements:u,appState:{theme:n??p?.appState?.theme??r,viewBackgroundColor:p?.appState?.viewBackgroundColor??s,...p?.appState?.frameRendering?{frameRendering:p.appState.frameRendering}:{}},files:m},{withBackground:a?.withBackground??l.settings.exportWithBackground,withTheme:a?.withTheme??l.settings.exportWithTheme,isMask:a?.isMask??!1},d,t)}const updateElementLinksToObsidianLinks=({elements:e,hostFile:t})=>e.map((e=>{if(e.link&&e.link.startsWith(\"[\")){const a=REGEX_LINK.getResList(e.link)[0];if(!a?.value)return e;let i=REGEX_LINK.getLink(a);if(i.search(\"#\")>-1&&(i=getLinkParts(i,t).path),i.match(REG_LINKINDEX_INVALIDCHARS))return e;const n=EXCALIDRAW_PLUGIN.app.metadataCache.getFirstLinkpathDest(i,t.path);if(!n)return e;let r=EXCALIDRAW_PLUGIN.app.getObsidianUrl(n);if(window.ExcalidrawAutomate?.onUpdateElementLinkForExportHook)try{r=window.ExcalidrawAutomate.onUpdateElementLinkForExportHook({originalLink:e.link,obsidianLink:r,linkedFile:n,hostFile:t})??r}catch(e){errorlog({where:\"excalidrawAutomateUtils.updateElementLinksToObsidianLinks\",fn:window.ExcalidrawAutomate.onUpdateElementLinkForExportHook,error:e})}const s=cloneElement(e);return s.link=r,s}return e}));function addFilterToForeignObjects(e){e.querySelectorAll(\"foreignObject\").forEach((e=>{e.setAttribute(\"filter\",THEME_FILTER)}))}async function createSVG(e=void 0,t=!1,a,i,n=void 0,r=void 0,s=void 0,o=[],l,c,d,h,p=!1){i||(i=new EmbeddedFilesLoader(l)),void 0===a.skipInliningFonts&&(a.skipInliningFonts=!t);const u=e?await getTemplate(l,e,!0,i,c,p):null;let m=u?.elements??[];m=m.concat(o),d=d??l.settings.exportPaddingSVG;const g=h??{};u?.files&&Object.values(u.files).forEach((e=>{g[e.id]=e}));const f=n??u?.appState?.theme??r,b=a?.withTheme??l.settings.exportWithTheme,U=getEmbeddedFilenameParts(e),E=await getSVG({type:\"excalidraw\",version:2,source:GITHUB_RELEASES+PLUGIN_VERSION,elements:m,appState:{theme:f,viewBackgroundColor:u?.appState?.viewBackgroundColor??s,...u?.appState?.frameRendering?{frameRendering:u.appState.frameRendering}:{}},files:g},{withBackground:a?.withBackground??l.settings.exportWithBackground,withTheme:b,isMask:a?.isMask??!1,...U?.hasClippedFrameref?{frameRendering:{enabled:!0,name:!1,outline:!1,clip:!0}}:{}},d,null);if(b&&\"dark\"===f&&addFilterToForeignObjects(E),!U.hasGroupref&&!U.hasClippedFrameref&&(U.hasBlockref||U.hasSectionref)){let e=U.hasSectionref?getTextElementsMatchingQuery(m,[\"# \"+U.sectionref],!0):m.filter((e=>e.id===U.blockref));if(0===e.length&&U.hasFrameref){const t=getFrameBasedOnFrameNameOrId(U.blockref,m);t&&(e=[t])}const t=U.hasFrameref&&1===e.length&&\"frame\"===e[0].type&&\"marker\"!==e[0].frameRole;if(e.length>0&&!t){const t=e[0].containerId;t&&(e=e.concat(m.filter((e=>e.id===t))));const a=l.ea.getBoundingBox(e),i=l.ea.getBoundingBox(m);E.viewBox.baseVal.x=a.topX-i.topX,E.viewBox.baseVal.y=a.topY-i.topY;const n=a.width+2*d;E.viewBox.baseVal.width=n;const r=a.height+2*d;E.viewBox.baseVal.height=r,E.setAttribute(\"width\",`${n}`),E.setAttribute(\"height\",`${r}`)}}return u?.hasSVGwithBitmap&&E.setAttribute(\"hasbitmap\",\"true\"),E}function estimateLineBound(e){let t=1/0,a=1/0,i=-1/0,n=-1/0;for(const[r,s]of e)t=Math.min(t,r),a=Math.min(a,s),i=Math.max(i,r),n=Math.max(n,s);return[t,a,i,n]}function estimateBounds(e){const t=getCommonBoundingBox(e);return[t.minX,t.minY,t.maxX,t.maxY]}function repositionElementsToCursor(e,t,a=!1){const[i,n,r,s]=estimateBounds(e);let[o,l]=[0,0];return[o,l]=a?[t.x-(i+r)/2,t.y-(n+s)/2]:[t.x-i,t.y-n],e.forEach((e=>{e.x=e.x+o,e.y=e.y+l})),restore({elements:e},null,null).elements}const insertLaTeXToView=(e,t=!1)=>{const a=e.plugin.app,i=getEA(e);GenericInputPrompt.Prompt(e,e.plugin,a,t$d(\"ENTER_LATEX\"),\"\\\\color{red}\\\\oint_S {E_n dA = \\\\frac{1}{{\\\\varepsilon _0 }}} Q_{inside}\",e.plugin.settings.latexBoilerplate,void 0,3).then((async e=>{if(e){const a=await i.addLaTex(0,0,e);if(t){const e=i.getElement(a);let{width:t,height:n}=e,{x:r,y:s}=i.getViewCenterPosition();e.x=r-t/2,e.y=s-n/2}await i.addElementsToView(!t,!1,!0),i.selectElementsInView([a])}i.destroy()}))},search=async e=>{const t=e.plugin.ea;t.reset(),t.setView(e);const a=t.getViewElements().filter((e=>\"text\"===e.type||\"frame\"===e.type||e.link||\"image\"===e.type));if(0===a.length)return;let i=await ScriptEngine.inputPrompt(e,e.plugin,e.plugin.app,\"Search for\",\"use quotation marks for exact match\",\"\");if(!i)return;const n=i.matchAll(/\"(.*?)\"/g);let r,s=[];for(;!(r=n.next()).done;)s.push(r.value[1]);i=i.replaceAll(/\"(.*?)\"/g,\"\"),s=s.concat(i.split(\" \").filter((e=>0!==e.length))),t.targetView.selectElementsMatchingQuery(a,s)},getTextElementsMatchingQuery=(e,t,a=!1)=>e&&0!==e.length&&t&&0!==t.length?e.filter((e=>\"text\"===e.type&&t.some((t=>{if(a){const a=(e.customData?.text2Path?.text??e.rawText.toLowerCase().split(\"\\n\")[0].trim()).match(/^#*(# .*)/);return!(!a||2!==a.length)&&a[1]===t.toLowerCase()}return(e.customData?.text2Path?.text??e.rawText.toLowerCase().replaceAll(\"\\n\",\" \").trim()).match(t.toLowerCase())})))):[],getFrameElementsMatchingQuery=(e,t,a=!1)=>e&&0!==e.length&&t&&0!==t.length?e.filter((e=>\"frame\"===e.type&&t.some((t=>{if(a){const a=(e.name?.toLowerCase().split(\"\\n\")[0].trim()??\"\").match(/^#*(# .*)/);return!(!a||2!==a.length)&&a[1]===t.toLowerCase()}return(e.name?e.name.toLowerCase().replaceAll(\"\\n\",\" \").trim():\"\").match(t.toLowerCase())})))):[],getElementsWithLinkMatchingQuery=(e,t,a=!1)=>e&&0!==e.length&&t&&0!==t.length?e.filter((e=>e.link&&t.some((t=>{const i=e.link.toLowerCase().trim();return a?i===t.toLowerCase():i.match(t.toLowerCase())})))):[],getImagesMatchingQuery=(e,t,a,i=!1)=>e&&0!==e.length&&t&&0!==t.length?e.filter((e=>\"image\"===e.type&&t.some((t=>{const n=a.getFile(e.fileId)?.file?.basename.toLowerCase().trim(),r=a.getEquation(e.fileId)?.latex?.toLocaleLowerCase().trim(),s=n??r;return!!s&&(i?s===t.toLowerCase():s.match(t.toLowerCase()))})))):[],cloneElement=e=>{const t=JSON.parse(JSON.stringify(e));return t.version=e.version+1,t.updated=Date.now(),t.versionNonce=Math.floor(1e9*Math.random()),t},verifyMinimumPluginVersion=e=>PLUGIN_VERSION===e||isVersionNewerThanOther(PLUGIN_VERSION,e),getBoundTextElementId=e=>e?.boundElements?.length&&e?.boundElements?.find((e=>\"text\"===e.type))?.id||null,setDynamicStyle=(e,t,a,i,n)=>{if(\"none\"===i){setTimeout((()=>t.updateScene({appState:{dynamicStyle:{}},captureUpdate:CaptureUpdateAction.NEVER})));const e=t.toolsPanelRef?.current?.containerRef?.current;if(e){let t=e.getAttribute(\"style\");t=t.replace(/\\-\\-color\\-primary.*/,\"\"),e.setAttribute(\"style\",t)}return}const r=\"light\"===t?.excalidrawAPI?.getAppState?.()?.theme||\"light\"===t?.excalidrawData?.scene?.appState?.theme;\"transparent\"===a&&(a=\"#ffffff\");const s=10,o=t=>{const a=e.getCM(t),i=a.lightness;return a.lightnessTo(Math.abs(i-100))},l=()=>r?e.getCM(a):o(a),c=l().lightness,d=l().darkerBy(s).isDark(),h=\"gray\"===i,p=t.app.getAccentColor(),u=()=>h?e.getCM(p):e.getCM(p).mix({color:l(),ratio:.2}),m=()=>e.getCM(\"#000000\").lightnessTo(c),g=()=>h?d?m().lighterBy(10):m().darkerBy(10):d?l().lighterBy(10).mix({color:m(),ratio:.5}):l().darkerBy(10).mix({color:m(),ratio:.5}),f=()=>h?d?m().lighterBy(4):m().darkerBy(4):d?l().lighterBy(4).mix({color:m(),ratio:.5}):l().darkerBy(4).mix({color:m(),ratio:.5}),b=l().mix({color:d?\"#f0f0f0\":\"#101010\",ratio:.9}),U=e=>e.stringHEX({alpha:!1}),E={backgroundColor:U(l()),\"--color-primary\":U(u()),\"--color-surface-low\":U(g()),\"--color-surface-mid\":U(g()),\"--color-surface-lowest\":U(f()),\"--color-surface-high\":U(g().lighterBy(s)),\"--color-on-primary-container\":U(d?u().lighterBy(15):u().darkerBy(15)),\"--color-surface-primary-container\":U(d?u().darkerBy(s):u().lighterBy(s)),\"--bold-color\":U(d?u().lighterBy(15):u().darkerBy(15)),\"--color-primary-darker\":U(u().darkerBy(s)),\"--color-primary-darkest\":U(u().darkerBy(20)),\"--button-bg-color\":U(g()),\"--button-gray-1\":U(g()),\"--button-gray-2\":U(f()),\"--input-border-color\":U(g()),\"--input-bg-color\":U(f()),\"--input-label-color\":U(b),\"--island-bg-color\":f().alphaTo(.93).stringHEX(),\"--popup-secondary-bg-color\":f().alphaTo(.93).stringHEX(),\"--icon-fill-color\":U(b),\"--text-primary-color\":U(b),\"--overlay-bg-color\":f().alphaTo(.6).stringHEX(),\"--popup-bg-color\":U(g()),\"--color-on-surface\":U(b),\"--default-border-color\":U(g()),\"--color-gray-40\":U(b),\"--color-surface-highlight\":U(g()),\"--color-gray-20\":U(g()),\"--sidebar-border-color\":U(g()),\"--color-primary-light\":U(u().lighterBy(s)),\"--button-hover-bg\":U(g()),\"--sidebar-bg-color\":f().alphaTo(.93).stringHEX(),\"--sidebar-shadow\":U(g()),\"--popup-text-color\":U(b),\"--code-normal\":U(b),\"--code-background\":U(f()),\"--h1-color\":U(b),\"--h2-color\":U(b),\"--h3-color\":U(b),\"--h4-color\":U(b),color:U(b),\"--excalidraw-caret-color\":U(n?r?o(n):e.getCM(n):r?b:l()),\"--select-highlight-color\":U(g()),\"--color-gray-90\":U(d?b.darkerBy(5):b.lighterBy(5)),\"--color-gray-80\":U(d?b.darkerBy(10):b.lighterBy(10)),\"--color-gray-70\":U(d?b.darkerBy(10):b.lighterBy(10)),\"--default-bg-color\":U(d?b.darkerBy(20):b.lighterBy(20)),\"--color-gray-50\":U(b)},w=Object.keys(E).map((e=>`${e}: ${E[e]}`)).join(\"; \"),y=t.toolsPanelRef?.current?.containerRef?.current;if(y){let e=y.getAttribute(\"style\");e=e.replace(/\\-\\-color\\-primary.*/,\"\"),y.setAttribute(\"style\",e+w)}setTimeout((()=>{const n=t.excalidrawAPI;if(!n)return t=null,e=null,a=null,void(i=null);const r={stroke:U(d?f().lighterBy(15):f().darkerBy(15)),fill:U((d?f().lighterBy(30):f().darkerBy(30)).alphaTo(.2)),nameColor:U(d?f().lighterBy(50):f().darkerBy(50))};n.getSceneElements().filter((e=>\"frame\"===e.type)).forEach((e=>{const a=cloneElement(e);addAppendUpdateCustomData(a,{frameColor:r}),e.customData&&e.customData.frameColor&&e.customData.frameColor.stroke===r.stroke&&e.customData.frameColor.fill===r.fill&&e.customData.frameColor.nameColor===r.nameColor||t.excalidrawAPI.mutateElement(e,{customData:a.customData})})),t.updateScene({appState:{frameColor:r,dynamicStyle:E},captureUpdate:CaptureUpdateAction.NEVER}),t=null,e=null,a=null,i=null}))},startupScript=()=>atob(\"[encoded data, 16696 characters]\"),CATEGORIES={WebBrowserDragAction:t$d(\"WEB_BROWSER_DRAG_ACTION\"),LocalFileDragAction:t$d(\"LOCAL_FILE_DRAG_ACTION\"),InternalDragAction:t$d(\"INTERNAL_DRAG_ACTION\"),LinkClickAction:t$d(\"PANE_TARGET\")};class ModifierKeySettingsComponent{contentEl;modifierKeyConfig;update;isMacOS;constructor(e,t,a){this.contentEl=e,this.modifierKeyConfig=t,this.update=a,this.isMacOS=DEVICE.isMacOS||DEVICE.isIOS}render(){const e=this.isMacOS?\"Mac\":\"Win\",t=this.modifierKeyConfig[e];Object.entries(CATEGORIES).forEach((([e,a])=>{const i=this.contentEl.createEl(\"details\");i.createEl(\"summary\",{text:a,cls:\"excalidraw-setting-h4\"});const n=t[e];i.createDiv({text:t$d(\"DEFAULT_ACTION_DESC\")+modifierKeyTooltipMessages()[e][n.defaultAction],cls:\"setting-item-description\"}),Object.entries(n.rules).forEach((([t,a])=>{const n=new obsidian_module.Setting(i).setName(modifierKeyTooltipMessages()[e][a.result]);n.addToggle((e=>e.setValue(a.shift).setTooltip(\"SHIFT\").onChange((e=>{a.shift=e,this.update()})))),n.addToggle((t=>{t.setValue(a.ctrl_cmd).setTooltip(this.isMacOS?\"CMD\":\"CTRL\").onChange((e=>{a.ctrl_cmd=e,this.update()})),this.isMacOS&&\"LinkClickAction\"!==e&&(t.setDisabled(!0),t.toggleEl.style.opacity=\"0.5\")})),n.addToggle((e=>e.setValue(a.alt_opt).setTooltip(this.isMacOS?\"OPT\":\"ALT\").onChange((e=>{a.alt_opt=e,this.update()})))),n.addToggle((e=>e.setValue(a.meta_ctrl).setTooltip(this.isMacOS?\"CTRL\":\"META\").onChange((e=>{a.meta_ctrl=e,this.update()}))))}))}))}}const CROPPED_PREFIX=\"cropped_\",ANNOTATED_PREFIX=\"annotated_\",carveOutImage=async(e,t)=>{if(!t?.fileId)return;if(!e?.targetView)return;const a=getEA(e.targetView);a.copyViewElementsToEAforEditing([t],!0);const{height:i,width:n}=await e.getOriginalImageSize(t);if(!i||!n||0===i||0===n)return void a.destroy();const r=a.getElement(t.id);r.x=0,r.y=0,r.width=n,r.height=i;const s=r.scale,o=r.angle;r.scale=[1,1],r.angle=0;const l=e.targetView.excalidrawData.getFile(t.fileId);let c=\"\",d=\"\";if(l.file){d=l.file.basename;const e=l.linkParts?.ref?`#${l.linkParts.ref}`:\"\";c=`[[${l.file.path}${e}]]`}else{const e=l.hyperlink?.match(/^.*\\/([^?]*)\\??.*$/)?.[1];c=l.hyperlink,d=t?e.substring(0,e.lastIndexOf(\".\")):\"_image\"}const{folderpath:h,filename:p}=await getCropFileNameAndFolder(e.plugin,e.targetView.file.path,d),u=await createImageCropperFile(a,r.id,c,h,p);if(!u)return void a.destroy();e.clear(),e.copyViewElementsToEAforEditing([t]);const m=e.getElement(t.id);m.isDeleted=!0;const g=await e.addImage(m.x,m.y,u,!0),f=e.getElement(g);f.width=m.width,f.height=m.height,f.scale=s,f.angle=o,await e.addElementsToView(!1,!0,!0),a.destroy()},carveOutPDF=async(e,t,a,i)=>{if(!t||!a||!e?.targetView)return;const n=getEA(e.targetView);let{height:r,width:s}=t;if(!r||!s||0===r||0===s)return void n.destroy();const o=await n.addImage(0,0,a),l=n.getElement(o);l.x=0,l.y=0;const c=t.angle,d=i.basename,h=`[[${a}]]`,{folderpath:p,filename:u}=await getCropFileNameAndFolder(e.plugin,e.targetView.file.path,d),m=await createImageCropperFile(n,l.id,h,p,u);if(!m)return void n.destroy();e.clear();const g=await e.addImage(t.x+t.width+10,t.y,m,!0),f=e.getElement(g),b=f.width/f.height;b>1?(f.width=t.width,f.height=f.width/b):(f.height=t.height,f.width=f.height*b),f.angle=c,await e.addElementsToView(!1,!0,!0),n.destroy()},createImageCropperFile=async(e,t,a,i,n)=>{const r=e.plugin.app.vault,s=e.getElement(t),{width:o,height:l}=s,c=a.match(/\\[\\[([^#]*)#.*]]/)?.[1]?.endsWith(\".pdf\");s.opacity=100,s.locked=!0,s.link=a;const d=e.addFrame(0,0,o,l,\"Adjust frame to crop image. Add elements for mask: White shows, Black hides.\");e.getElement(d).link=a,s.frameId=d,e.style.opacity=50,e.style.fillStyle=\"solid\",e.style.strokeStyle=\"solid\",e.style.strokeColor=\"black\",e.style.backgroundColor=\"black\",e.style.roughness=0,e.style.roundness=null,e.canvas.theme=\"light\",e.canvas.viewBackgroundColor=c?\"#5d5d5d\":\"#3d3d3d\";const h=getListOfTemplateFiles(e.plugin),p=h&&h.length>0?h[0]:null;if(p&&p instanceof obsidian_module.TFile){const{appState:t}=await e.getSceneFromFile(p);t&&(e.style.fontFamily=t.currentItemFontFamily,e.style.fontSize=t.currentItemFontSize)}const u=await e.create({filename:n,foldername:i,onNewPane:!0,frontmatterKeys:{\"excalidraw-mask\":!0,\"excalidraw-export-dark\":!1,\"excalidraw-export-padding\":0,\"excalidraw-export-transparent\":!0,...c?{cssclasses:\"excalidraw-cropped-pdfpage\"}:{}}});let m=r.getAbstractFileByPath(u),g=0;for(;(!m||!e.isExcalidrawFile(m))&&g<50;)await sleep(100),m=r.getAbstractFileByPath(u),g++;if(m&&m instanceof obsidian_module.TFile)return m;new obsidian_module.Notice(\"File not found. NewExcalidraw Drawing is taking too long to create. Please try again.\")},o30=view.Decoration.line({attributes:{class:\"ex-opacity-30\"}}),o15=view.Decoration.line({attributes:{class:\"ex-opacity-15\"}}),o8=view.Decoration.line({attributes:{class:\"ex-opacity-8\"}}),o5=view.Decoration.line({attributes:{class:\"ex-opacity-5\"}}),o0=view.Decoration.line({attributes:{class:\"ex-opacity-0\"}}),HideTextBetweenCommentsExtension=view.ViewPlugin.fromClass(class{view;decorations;reExcalidrawData=/^%%(?:\\r\\n|\\r|\\n)# Excalidraw Data$/gm;reTextElements=/^%%(?:\\r\\n|\\r|\\n)# Text Elements$/gm;reDrawing=/^%%(?:\\r\\n|\\r|\\n)##? Drawing$/gm;linecount=0;isExcalidraw=!1;constructor(e){this.view=e,this.isExcalidraw=e.state.doc.toString().search(/^excalidraw-plugin: /m)>0,this.isExcalidraw?this.decorations=this.updateDecorations(e):this.decorations=view.Decoration.none}updateDecorations(e){const{state:t}=e,{doc:a}=t,i=a.toString();let n=i.search(this.reExcalidrawData);if(-1==n&&(n=i.search(this.reTextElements)),-1==n&&(n=i.search(this.reDrawing)),-1==n)return view.Decoration.none;const r=a.lineAt(n).number,s=a.lines;let o=new state.RangeSetBuilder;for(let e=r;e<=s;e++){const t=a.line(e),i=e-r;o.add(t.from,t.from,0==i?o30:1==i?o15:i<6?o8:i<12?o5:o0)}return o.finish()}update(e){this.isExcalidraw&&e.docChanged&&(this.decorations=this.updateDecorations(e.view))}},{decorations:e=>e.decorations}),EDITOR_FADEOUT=\"fadeOutExcalidrawMarkup\",editorExtensions={[EDITOR_FADEOUT]:HideTextBetweenCommentsExtension};class EditorHandler{plugin;activeEditorExtensions=[];constructor(e){this.plugin=e}destroy(){this.plugin=null}setup(){this.plugin.registerEditorExtension(this.activeEditorExtensions),this.updateCMExtensionState(EDITOR_FADEOUT,this.plugin.settings.fadeOutExcalidrawMarkup)}updateCMExtensionState(e,t){const a=editorExtensions[e];if(a){if(1==t)this.activeEditorExtensions.push(a),this.activeEditorExtensions[this.activeEditorExtensions.length-1].exID=e;else for(let t=0;t<this.activeEditorExtensions.length;t++)if(this.activeEditorExtensions[t].exID===e){this.activeEditorExtensions.splice(t,1);break}this.plugin.app.workspace.updateOptions()}}update(){this.plugin.app.workspace.updateOptions()}}class HotkeyEditor extends obsidian_module.BaseComponent{settings;containerEl;capturing=!1;activeModifiers=[];isDirty=!1;applySettingsUpdate;boundKeydownHandler;boundKeyupHandler;constructor(e,t,a){super(),this.containerEl=e.createDiv(),this.settings=t,this.applySettingsUpdate=a,this.boundKeydownHandler=this.onKeydown.bind(this),this.boundKeyupHandler=this.onKeyup.bind(this)}onload(){this.render()}render(){this.containerEl.empty(),this.settings.modifierKeyOverrides.forEach(((e,t)=>{const a=e.key.toUpperCase();new obsidian_module.Setting(this.containerEl).setDesc(fragWithHTML(`<b>Code:</b> <kbd>${e.modifiers.join(\"+\")} + ${a}</kbd> | <b>Apple:</b> <kbd>${modifierLabel(e.modifiers,\"Mac\")} + ${a}</kbd> | <b>Windows:</b> <kbd>${modifierLabel(e.modifiers,\"Other\")} + ${a}</kbd>`)).addButton((e=>e.setButtonText(t$d(\"HOTKEY_BUTTON_REMOVE\")).setCta().onClick((()=>{this.settings.modifierKeyOverrides.splice(t,1),this.isDirty=!0,this.applySettingsUpdate(),this.render()}))))})),this.capturing?new obsidian_module.Setting(this.containerEl).setName(t$d(\"HOTKEY_PRESS_COMBO_NANE\")).setDesc(t$d(\"HOTKEY_PRESS_COMBO_DESC\")).controlEl.style.cursor=\"pointer\":new obsidian_module.Setting(this.containerEl).addButton((e=>e.setButtonText(t$d(\"HOTKEY_BUTTON_ADD_OVERRIDE\")).setCta().onClick((()=>this.startCapture()))))}startCapture(){this.capturing=!0,this.activeModifiers=[],this.render(),window.addEventListener(\"keydown\",this.boundKeydownHandler),window.addEventListener(\"keyup\",this.boundKeyupHandler)}onKeydown(e){e.preventDefault(),e.stopPropagation();const t=this.getModifiersFromEvent(e);if([\"Control\",\"Shift\",\"Alt\",\"Meta\"].includes(e.key))return void(this.activeModifiers=t);const a=1===e.key.length?e.key.toLowerCase():e.key;this.settings.modifierKeyOverrides.some((e=>e.key===a&&e.modifiers.length===t.length&&e.modifiers.every((e=>t.includes(e)))))||(this.settings.modifierKeyOverrides.push({modifiers:t,key:a}),this.isDirty=!0,this.applySettingsUpdate()),this.stopCapture()}onKeyup(e){e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||this.stopCapture()}stopCapture(){this.capturing=!1,window.removeEventListener(\"keydown\",this.boundKeydownHandler),window.removeEventListener(\"keyup\",this.boundKeyupHandler),this.render()}unload(){this.stopCapture()}getModifiersFromEvent(e){const t=[];return(DEVICE.isMacOS&&e.metaKey||!DEVICE.isMacOS&&e.ctrlKey)&&t.push(\"Mod\"),DEVICE.isMacOS&&e.ctrlKey&&t.push(\"Ctrl\"),!DEVICE.isMacOS&&e.metaKey&&t.push(\"Meta\"),e.shiftKey&&t.push(\"Shift\"),e.altKey&&t.push(\"Alt\"),t}}const createSliderWithText=(e,t)=>{let a;new obsidian_module.Setting(e).setName(t.name).setDesc(t.desc||\"\").addSlider((e=>e.setLimits(t.min,t.max,t.step).setValue(t.value).onChange((async e=>{a.innerText=` ${e.toString()}`,t.onChange(e)})))).settingEl.createDiv(\"\",(e=>{a=e,e.style.minWidth=t.minWidth||\"2.3em\",e.style.textAlign=\"right\",e.innerText=` ${t.value.toString()}`}))},DEFAULT_SETTINGS={disableDoubleClickTextEditing:!1,folder:\"Excalidraw\",cropFolder:\"\",annotateFolder:\"\",embedUseExcalidrawFolder:!1,templateFilePath:\"Excalidraw/Template.excalidraw\",scriptFolderPath:\"Excalidraw/Scripts\",fontAssetsPath:\"Excalidraw/CJK Fonts\",loadChineseFonts:!1,loadJapaneseFonts:!1,loadKoreanFonts:!1,compress:!0,decompressForMDView:!1,onceOffCompressFlagReset:!1,onceOffGPTVersionReset:!1,autosave:!0,autosaveIntervalDesktop:6e4,autosaveIntervalMobile:3e4,drawingFilenamePrefix:\"Drawing \",drawingEmbedPrefixWithFilename:!0,drawingFilnameEmbedPostfix:\" \",drawingFilenameDateTime:\"YYYY-MM-DD HH.mm.ss\",useExcalidrawExtension:!0,cropSuffix:\"\",cropPrefix:CROPPED_PREFIX,annotateSuffix:\"\",annotatePrefix:ANNOTATED_PREFIX,annotatePreserveSize:!1,displaySVGInPreview:void 0,previewImageType:void 0,renderingConcurrency:3,allowImageCache:!0,allowImageCacheInScene:!0,displayExportedImageIfAvailable:!1,previewMatchObsidianTheme:!1,width:\"400\",height:\"\",overrideObsidianFontSize:!1,dynamicStyling:\"colorful\",isLeftHanded:!1,iframeMatchExcalidrawTheme:!0,matchTheme:!1,matchThemeAlways:!1,matchThemeTrigger:!1,defaultMode:\"normal\",defaultPenMode:\"never\",penModeDoubleTapEraser:!0,penModeSingleFingerPanning:!0,penModeCrosshairVisible:!0,panWithRightMouseButton:!1,renderImageInMarkdownReadingMode:!1,renderImageInHoverPreviewForMDNotes:!1,renderImageInMarkdownToPDF:!1,allowPinchZoom:!1,allowWheelZoom:!1,zoomToFitOnOpen:!0,zoomToFitOnResize:!1,zoomToFitMaxLevel:2,zoomStep:.05,zoomMin:.1,zoomMax:30,linkPrefix:\"\ud83d\udccd\",urlPrefix:\"\ud83c\udf10\",parseTODO:!1,todo:\"\u2610\",done:\"\ud83d\uddf9\",hoverPreviewWithoutCTRL:!1,linkOpacity:1,openInAdjacentPane:!0,showSecondOrderLinks:!0,focusOnFileTab:!0,openInMainWorkspace:!0,showLinkBrackets:!0,allowCtrlClick:!0,forceWrap:!1,pageTransclusionCharLimit:200,wordWrappingDefault:0,removeTransclusionQuoteSigns:!0,iframelyAllowed:!0,pngExportScale:1,exportWithTheme:!0,exportWithBackground:!0,exportPaddingSVG:10,exportEmbedScene:!1,keepInSync:!1,autoexportSVG:!1,autoexportPNG:!1,autoExportLightAndDark:!1,autoexportExcalidraw:!1,embedType:\"excalidraw\",embedMarkdownCommentLinks:!0,embedWikiLink:!0,syncExcalidraw:!1,experimentalFileType:!1,experimentalFileTag:\"\u270f\ufe0f\",experimentalLivePreview:!0,fadeOutExcalidrawMarkup:!1,loadPropertySuggestions:!1,experimentalEnableFourthFont:!1,experimantalFourthFont:\"Virgil\",addDummyTextElement:!1,zoteroCompatibility:!1,fieldSuggester:!0,compatibilityMode:!1,drawingOpenCount:0,library:\"deprecated\",library2:{type:\"excalidrawlib\",version:2,source:GITHUB_RELEASES+PLUGIN_VERSION,libraryItems:[]},imageElementNotice:!0,mdSVGwidth:500,mdSVGmaxHeight:800,mdFont:\"Virgil\",mdFontColor:\"Black\",mdBorderColor:\"Black\",mdCSS:\"\",scriptEngineSettings:{},defaultTrayMode:!0,compactModeOnTablets:!0,previousRelease:\"0.0.0\",showReleaseNotes:!0,compareManifestToPluginVersion:!0,showNewVersionNotification:!0,latexBoilerplate:\"\\\\color{blue}\",latexPreambleLocation:\"preamble.sty\",taskboneEnabled:!1,taskboneAPIkey:\"\",pinnedScripts:[],customPens:[{...PENS.default},{...PENS.highlighter},{...PENS.finetip},{...PENS.fountain},{...PENS.marker},{...PENS[\"thick-thin\"]},{...PENS[\"thin-thick-thin\"]},{...PENS.default},{...PENS.default},{...PENS.default}],numberOfCustomPens:0,pdfScale:4,pdfBorderBox:!0,pdfFrame:!1,pdfGapSize:20,pdfGroupPages:!1,pdfLockAfterImport:!0,pdfNumColumns:1,pdfNumRows:1,pdfDirection:\"right\",pdfImportScale:.3,gridSettings:{DYNAMIC_COLOR:!0,COLOR:\"#000000\",OPACITY:50,GRID_DIRECTION:{horizontal:!0,vertical:!0}},laserSettings:{DECAY_LENGTH:50,DECAY_TIME:1e3,COLOR:\"#ff0000\"},embeddableMarkdownDefaults:{useObsidianDefaults:!1,backgroundMatchCanvas:!1,backgroundMatchElement:!0,backgroundColor:\"#fff\",backgroundOpacity:60,borderMatchElement:!0,borderColor:\"#fff\",borderOpacity:0,filenameVisible:!1},markdownNodeOneClickEditing:!1,canvasImmersiveEmbed:!0,startupScriptPath:\"\",aiEnabled:!0,openAIAPIToken:\"\",openAIDefaultTextModel:\"gpt-3.5-turbo-1106\",openAIDefaultVisionModel:\"gpt-4o\",openAIDefaultImageGenerationModel:\"dall-e-3\",openAIURL:\"https://api.openai.com/v1/chat/completions\",openAIImageGenerationURL:\"https://api.openai.com/v1/images/generations\",openAIImageEditsURL:\"https://api.openai.com/v1/images/edits\",openAIImageVariationURL:\"https://api.openai.com/v1/images/variations\",modifierKeyConfig:{Mac:{LocalFileDragAction:{defaultAction:\"image-import\",rules:[{shift:!1,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!1,result:\"image-import\"},{shift:!0,ctrl_cmd:!1,alt_opt:!0,meta_ctrl:!1,result:\"link\"},{shift:!0,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!1,result:\"image-url\"},{shift:!1,ctrl_cmd:!1,alt_opt:!0,meta_ctrl:!1,result:\"embeddable\"}]},WebBrowserDragAction:{defaultAction:\"image-url\",rules:[{shift:!1,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!1,result:\"image-url\"},{shift:!0,ctrl_cmd:!1,alt_opt:!0,meta_ctrl:!1,result:\"link\"},{shift:!1,ctrl_cmd:!1,alt_opt:!0,meta_ctrl:!1,result:\"embeddable\"},{shift:!0,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!1,result:\"image-import\"}]},InternalDragAction:{defaultAction:\"link\",rules:[{shift:!1,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!1,result:\"link\"},{shift:!1,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!0,result:\"embeddable\"},{shift:!0,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!1,result:\"image\"},{shift:!0,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!0,result:\"image-fullsize\"}]},LinkClickAction:{defaultAction:\"new-tab\",rules:[{shift:!1,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!1,result:\"active-pane\"},{shift:!1,ctrl_cmd:!0,alt_opt:!1,meta_ctrl:!1,result:\"new-tab\"},{shift:!1,ctrl_cmd:!0,alt_opt:!0,meta_ctrl:!1,result:\"new-pane\"},{shift:!0,ctrl_cmd:!0,alt_opt:!0,meta_ctrl:!1,result:\"popout-window\"},{shift:!1,ctrl_cmd:!0,alt_opt:!1,meta_ctrl:!0,result:\"md-properties\"}]}},Win:{LocalFileDragAction:{defaultAction:\"image-import\",rules:[{shift:!1,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!1,result:\"image-import\"},{shift:!1,ctrl_cmd:!0,alt_opt:!1,meta_ctrl:!1,result:\"link\"},{shift:!0,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!1,result:\"image-url\"},{shift:!0,ctrl_cmd:!0,alt_opt:!1,meta_ctrl:!1,result:\"embeddable\"}]},WebBrowserDragAction:{defaultAction:\"image-url\",rules:[{shift:!1,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!1,result:\"image-url\"},{shift:!1,ctrl_cmd:!0,alt_opt:!1,meta_ctrl:!1,result:\"link\"},{shift:!0,ctrl_cmd:!0,alt_opt:!1,meta_ctrl:!1,result:\"embeddable\"},{shift:!0,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!1,result:\"image-import\"}]},InternalDragAction:{defaultAction:\"link\",rules:[{shift:!1,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!1,result:\"link\"},{shift:!0,ctrl_cmd:!0,alt_opt:!1,meta_ctrl:!1,result:\"embeddable\"},{shift:!0,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!1,result:\"image\"},{shift:!1,ctrl_cmd:!0,alt_opt:!0,meta_ctrl:!1,result:\"image-fullsize\"}]},LinkClickAction:{defaultAction:\"new-tab\",rules:[{shift:!1,ctrl_cmd:!1,alt_opt:!1,meta_ctrl:!1,result:\"active-pane\"},{shift:!1,ctrl_cmd:!0,alt_opt:!1,meta_ctrl:!1,result:\"new-tab\"},{shift:!1,ctrl_cmd:!0,alt_opt:!0,meta_ctrl:!1,result:\"new-pane\"},{shift:!0,ctrl_cmd:!0,alt_opt:!0,meta_ctrl:!1,result:\"popout-window\"},{shift:!1,ctrl_cmd:!0,alt_opt:!1,meta_ctrl:!0,result:\"md-properties\"}]}}},slidingPanesSupport:!1,areaZoomLimit:1,longPressDesktop:500,longPressMobile:500,doubleClickLinkOpenViewMode:!0,isDebugMode:!1,rank:\"Bronze\",modifierKeyOverrides:[{modifiers:[\"Mod\"],key:\"Enter\"},{modifiers:[\"Mod\"],key:\"k\"},{modifiers:[\"Mod\"],key:\"G\"}],showSplashscreen:!0,pdfSettings:{pageSize:\"A4\",pageOrientation:\"portrait\",fitToPage:1,paperColor:\"white\",customPaperColor:\"#ffffff\",alignment:\"center\",margin:\"normal\"}};class ExcalidrawSettingTab extends obsidian_module.PluginSettingTab{plugin;requestEmbedUpdate=!1;requestReloadDrawings=!1;requestUpdatePinnedPens=!1;requestUpdateDynamicStyling=!1;hotkeyEditor;constructor(e,t){super(e,t),this.plugin=t}applySettingsUpdate(e=!1){e&&(this.requestReloadDrawings=!0)}async hide(){if(this.plugin.settings.overrideObsidianFontSize?(document.documentElement.style.fontSize=\"\",setRootElementSize(16)):document.documentElement.style.fontSize||(document.documentElement.style.fontSize=getComputedStyle(document.body).getPropertyValue(\"--font-text-size\"),setRootElementSize()),this.plugin.settings.scriptFolderPath=obsidian_module.normalizePath(this.plugin.settings.scriptFolderPath),\"/\"!==this.plugin.settings.scriptFolderPath&&\"\"!==this.plugin.settings.scriptFolderPath||(this.plugin.settings.scriptFolderPath=\"Excalidraw/Scripts\"),this.plugin.saveSettings(),this.requestUpdatePinnedPens&&getExcalidrawViews(this.app).forEach((e=>e.updatePinnedCustomPens())),this.requestUpdateDynamicStyling&&getExcalidrawViews(this.app).forEach((e=>setDynamicStyle(this.plugin.ea,e,e.previousBackgroundColor,this.plugin.settings.dynamicStyling))),this.hotkeyEditor.unload(),this.hotkeyEditor.isDirty&&this.plugin.registerHotkeyOverrides(),this.requestReloadDrawings){const e=getExcalidrawViews(this.app);for(const t of e)await t.save(!1),await t.reload(!0);this.requestEmbedUpdate=!0}this.requestEmbedUpdate&&this.plugin.triggerEmbedUpdates(),this.plugin.scriptEngine.updateScriptPath()}async display(){let e;await this.plugin.loadSettings(),this.requestEmbedUpdate=!1,this.requestReloadDrawings=!1;const{containerEl:t}=this;t.addClass(\"excalidraw-settings\"),this.containerEl.empty();const a=createDiv(\"setting-item-description excalidraw-settings-links-container\");new ContentSearcher(t,a),a.createEl(\"a\",{href:\"https://notebooklm.google.com/notebook/42d76a2f-c11d-4002-9286-1683c43d0ab0\",attr:{\"aria-label\":t$d(\"NOTEBOOKLM_LINK_ARIA\"),style:\"margin: auto;\"}},(e=>{e.innerHTML=`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-message-circle-question-mark-icon lucide-message-circle-question-mark\"><path d=\"M7.9 20A9 9 0 1 0 4 16.1L2 22Z\"/><path d=\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\"/><path d=\"M12 17h.01\"/></svg>${t$d(\"NOTEBOOKLM_LINK_TEXT\")}`}));const i=t.createDiv(\"coffee\");i.addClass(\"ex-coffee-div\"),i.createEl(\"a\",{href:\"https://ko-fi.com/zsolt\"}).createEl(\"img\",{attr:{src:\"https://cdn.ko-fi.com/cdn/kofi3.png?v=3\"}}).height=45;const n=[{icon:obsidian_module.getIcon(\"bug\").outerHTML,href:\"https://github.com/zsviczian/obsidian-excalidraw-plugin/issues\",aria:t$d(\"LINKS_BUGS_ARIA\"),text:t$d(\"LINKS_BUGS\")},{icon:obsidian_module.getIcon(\"globe\").outerHTML,href:\"https://excalidraw-obsidian.online/\",aria:t$d(\"LINKS_WIKI_ARIA\"),text:t$d(\"LINKS_WIKI\")},{icon:obsidian_module.getIcon(\"youtube\").outerHTML,href:\"https://www.youtube.com/@VisualPKM\",aria:t$d(\"LINKS_YT_ARIA\"),text:t$d(\"LINKS_YT\")},{icon:'<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" stroke=\"none\" strokeWidth=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" viewBox=\"0 0 640 512\"><path d=\"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z\"/></svg>',href:\"https://discord.gg/DyfAXFwUHc\",aria:t$d(\"LINKS_DISCORD_ARIA\"),text:t$d(\"LINKS_DISCORD\")},{icon:obsidian_module.getIcon(\"twitter\").outerHTML,href:\"https://twitter.com/zsviczian\",aria:t$d(\"LINKS_TWITTER\"),text:t$d(\"LINKS_TWITTER\")},{icon:obsidian_module.getIcon(\"graduation-cap\").outerHTML,href:\"https://visual-thinking-workshop.com\",aria:t$d(\"LINKS_VTW_ARIA\"),text:t$d(\"LINKS_VTW\")},{icon:obsidian_module.getIcon(\"book\").outerHTML,href:\"https://sketch-your-mind.com\",aria:t$d(\"LINKS_BOOK_ARIA\"),text:t$d(\"LINKS_BOOK\")}],r=t.createDiv(\"setting-item-description excalidraw-settings-links-container\");n.forEach((({icon:e,href:t,aria:a,text:i})=>{r.createEl(\"a\",{href:t,attr:{\"aria-label\":a}},(t=>{t.innerHTML=e+i}))})),t.createEl(\"hr\",{cls:\"excalidraw-setting-hr\"}),t.createDiv({text:t$d(\"BASIC_DESC\"),cls:\"setting-item-description\"}),e=this.containerEl.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"BASIC_HEAD\"),cls:\"excalidraw-setting-h1\"}),new obsidian_module.Setting(e).setName(t$d(\"RELEASE_NOTES_NAME\")).setDesc(fragWithHTML(t$d(\"RELEASE_NOTES_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.showReleaseNotes).onChange((async e=>{this.plugin.settings.showReleaseNotes=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"WARN_ON_MANIFEST_MISMATCH_NAME\")).setDesc(fragWithHTML(t$d(\"WARN_ON_MANIFEST_MISMATCH_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.compareManifestToPluginVersion).onChange((async e=>{this.plugin.settings.compareManifestToPluginVersion=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"NEWVERSION_NOTIFICATION_NAME\")).setDesc(fragWithHTML(t$d(\"NEWVERSION_NOTIFICATION_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.showNewVersionNotification).onChange((async e=>{this.plugin.settings.showNewVersionNotification=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"TOGGLE_SPLASHSCREEN\")).addToggle((e=>e.setValue(this.plugin.settings.showSplashscreen).onChange((e=>{this.plugin.settings.showSplashscreen=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"FOLDER_NAME\")).setDesc(fragWithHTML(t$d(\"FOLDER_DESC\"))).addText((e=>e.setPlaceholder(\"e.g.: Excalidraw\").setValue(this.plugin.settings.folder).onChange((async e=>{this.plugin.settings.folder=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"FOLDER_EMBED_NAME\")).setDesc(fragWithHTML(t$d(\"FOLDER_EMBED_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.embedUseExcalidrawFolder).onChange((async e=>{this.plugin.settings.embedUseExcalidrawFolder=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"CROP_FOLDER_NAME\")).setDesc(fragWithHTML(t$d(\"CROP_FOLDER_DESC\"))).addText((e=>e.setPlaceholder(\"e.g.: Excalidraw/Cropped\").setValue(this.plugin.settings.cropFolder).onChange((async e=>{this.plugin.settings.cropFolder=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"ANNOTATE_FOLDER_NAME\")).setDesc(fragWithHTML(t$d(\"ANNOTATE_FOLDER_DESC\"))).addText((e=>e.setPlaceholder(\"e.g.: Excalidraw/Annotations\").setValue(this.plugin.settings.annotateFolder).onChange((async e=>{this.plugin.settings.annotateFolder=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"TEMPLATE_NAME\")).setDesc(fragWithHTML(t$d(\"TEMPLATE_DESC\"))).addText((e=>e.setPlaceholder(\"e.g.: Excalidraw/Template\").setValue(this.plugin.settings.templateFilePath).onChange((async e=>{this.plugin.settings.templateFilePath=e,this.applySettingsUpdate()})))),addYouTubeThumbnail(e,\"jgUpYznHP9A\",216),new obsidian_module.Setting(e).setName(t$d(\"SCRIPT_FOLDER_NAME\")).setDesc(fragWithHTML(t$d(\"SCRIPT_FOLDER_DESC\"))).addText((e=>e.setPlaceholder(\"e.g.: Excalidraw/Scripts\").setValue(this.plugin.settings.scriptFolderPath).onChange((async e=>{this.plugin.settings.scriptFolderPath=e,this.applySettingsUpdate()})))),t.createEl(\"hr\",{cls:\"excalidraw-setting-hr\"}),t.createDiv({text:t$d(\"SAVING_DESC\"),cls:\"setting-item-description\"}),e=this.containerEl.createEl(\"details\");const s=e;e.createEl(\"summary\",{text:t$d(\"SAVING_HEAD\"),cls:\"excalidraw-setting-h1\"}),new obsidian_module.Setting(e).setName(t$d(\"COMPRESS_NAME\")).setDesc(fragWithHTML(t$d(\"COMPRESS_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.compress).onChange((async e=>{this.plugin.settings.compress=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"DECOMPRESS_FOR_MD_NAME\")).setDesc(fragWithHTML(t$d(\"DECOMPRESS_FOR_MD_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.decompressForMDView).onChange((async e=>{this.plugin.settings.decompressForMDView=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"AUTOSAVE_INTERVAL_DESKTOP_NAME\")).setDesc(fragWithHTML(t$d(\"AUTOSAVE_INTERVAL_DESKTOP_DESC\"))).addDropdown((e=>e.addOption(\"15000\",\"Very frequent (every 15 seconds)\").addOption(\"30000\",\"Frequent (every 30 seconds)\").addOption(\"60000\",\"Moderate (every 60 seconds)\").addOption(\"300000\",\"Rare (every 5 minutes)\").addOption(\"900000\",\"Practically never (every 15 minutes)\").setValue(this.plugin.settings.autosaveIntervalDesktop.toString()).onChange((async e=>{this.plugin.settings.autosaveIntervalDesktop=parseInt(e),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"AUTOSAVE_INTERVAL_MOBILE_NAME\")).setDesc(fragWithHTML(t$d(\"AUTOSAVE_INTERVAL_MOBILE_DESC\"))).addDropdown((e=>e.addOption(\"10000\",\"Very frequent (every 10 seconds)\").addOption(\"20000\",\"Frequent (every 20 seconds)\").addOption(\"30000\",\"Moderate (every 30 seconds)\").addOption(\"60000\",\"Rare (every 1 minute)\").addOption(\"300000\",\"Practically never (every 5 minutes)\").setValue(this.plugin.settings.autosaveIntervalMobile.toString()).onChange((async e=>{this.plugin.settings.autosaveIntervalMobile=parseInt(e),this.applySettingsUpdate()})))),e=s.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"FILENAME_HEAD\"),cls:\"excalidraw-setting-h3\"}),e.createDiv(\"\",(e=>{e.innerHTML=t$d(\"FILENAME_DESC\")}));const o=()=>`${t$d(\"FILENAME_SAMPLE\")}<a href='https://www.youtube.com/channel/UCC0gns4a9fhVkGkngvSumAQ' target='_blank'>${getDrawingFilename(this.plugin.settings)}</a></b><br>${t$d(\"FILENAME_EMBED_SAMPLE\")}<a href='https://www.youtube.com/channel/UCC0gns4a9fhVkGkngvSumAQ' target='_blank'>${getEmbedFilename(\"{NOTE_NAME}\",this.plugin.settings)}</a></b>`,l=e.createEl(\"p\",{text:\"\"});let c;l.innerHTML=o(),new obsidian_module.Setting(e).setName(t$d(\"FILENAME_PREFIX_NAME\")).setDesc(fragWithHTML(t$d(\"FILENAME_PREFIX_DESC\"))).addText((e=>e.setPlaceholder(\"e.g.: Drawing \").setValue(this.plugin.settings.drawingFilenamePrefix).onChange((async t=>{this.plugin.settings.drawingFilenamePrefix=t.replaceAll(/[<>:\"/\\\\|?*]/g,\"_\"),e.setValue(this.plugin.settings.drawingFilenamePrefix),l.innerHTML=o(),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"FILENAME_PREFIX_EMBED_NAME\")).setDesc(fragWithHTML(t$d(\"FILENAME_PREFIX_EMBED_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.drawingEmbedPrefixWithFilename).onChange((async e=>{this.plugin.settings.drawingEmbedPrefixWithFilename=e,l.innerHTML=o(),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"FILENAME_POSTFIX_NAME\")).setDesc(fragWithHTML(t$d(\"FILENAME_POSTFIX_DESC\"))).addText((e=>e.setPlaceholder(\"\").setValue(this.plugin.settings.drawingFilnameEmbedPostfix).onChange((async t=>{this.plugin.settings.drawingFilnameEmbedPostfix=t.replaceAll(/[<>:\"/\\\\|?*]/g,\"_\"),e.setValue(this.plugin.settings.drawingFilnameEmbedPostfix),l.innerHTML=o(),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"FILENAME_DATE_NAME\")).setDesc(fragWithHTML(t$d(\"FILENAME_DATE_DESC\"))).addText((e=>e.setPlaceholder(\"YYYY-MM-DD HH.mm.ss\").setValue(this.plugin.settings.drawingFilenameDateTime).onChange((async t=>{this.plugin.settings.drawingFilenameDateTime=t.replaceAll(/[<>:\"/\\\\|?*]/g,\"_\"),e.setValue(this.plugin.settings.drawingFilenameDateTime),l.innerHTML=o(),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"FILENAME_EXCALIDRAW_EXTENSION_NAME\")).setDesc(fragWithHTML(t$d(\"FILENAME_EXCALIDRAW_EXTENSION_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.useExcalidrawExtension).onChange((async e=>{this.plugin.settings.useExcalidrawExtension=e,l.innerHTML=o(),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"CROP_PREFIX_NAME\")).setDesc(fragWithHTML(t$d(\"CROP_PREFIX_DESC\"))).addText((e=>e.setPlaceholder(\"e.g.: cropped_\").setValue(this.plugin.settings.cropPrefix).onChange((async t=>{this.plugin.settings.cropPrefix=t.replaceAll(/[<>:\"/\\\\|?*]/g,\"_\"),e.setValue(this.plugin.settings.cropPrefix),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"CROP_SUFFIX_NAME\")).setDesc(fragWithHTML(t$d(\"CROP_SUFFIX_DESC\"))).addText((e=>e.setPlaceholder(\"e.g.: _cropped\").setValue(this.plugin.settings.cropSuffix).onChange((async t=>{this.plugin.settings.cropSuffix=t.replaceAll(/[<>:\"/\\\\|?*]/g,\"_\"),e.setValue(this.plugin.settings.cropSuffix),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"ANNOTATE_PREFIX_NAME\")).setDesc(fragWithHTML(t$d(\"ANNOTATE_PREFIX_DESC\"))).addText((e=>e.setPlaceholder(\"e.g.: annotated_\").setValue(this.plugin.settings.annotatePrefix).onChange((async t=>{this.plugin.settings.annotatePrefix=t.replaceAll(/[<>:\"/\\\\|?*]/g,\"_\"),e.setValue(this.plugin.settings.annotatePrefix),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"ANNOTATE_SUFFIX_NAME\")).setDesc(fragWithHTML(t$d(\"ANNOTATE_SUFFIX_DESC\"))).addText((e=>e.setPlaceholder(\"e.g.: _annotated\").setValue(this.plugin.settings.annotateSuffix).onChange((async t=>{this.plugin.settings.annotateSuffix=t.replaceAll(/[<>:\"/\\\\|?*]/g,\"_\"),e.setValue(this.plugin.settings.annotateSuffix),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"ANNOTATE_PRESERVE_SIZE_NAME\")).setDesc(fragWithHTML(t$d(\"ANNOTATE_PRESERVE_SIZE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.annotatePreserveSize).onChange((async e=>{this.plugin.settings.annotatePreserveSize=e,this.applySettingsUpdate()})))),t.createEl(\"hr\",{cls:\"excalidraw-setting-hr\"}),t.createDiv({text:t$d(\"AI_DESC\"),cls:\"setting-item-description\"}),e=this.containerEl.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"AI_HEAD\"),cls:\"excalidraw-setting-h1\"}),new obsidian_module.Setting(e).setName(t$d(\"AI_ENABLED_NAME\")).setDesc(fragWithHTML(t$d(\"AI_ENABLED_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.aiEnabled??!0).onChange((async e=>{c.style.display=e?\"block\":\"none\",this.plugin.settings.aiEnabled=e,this.applySettingsUpdate()})))),e=e.createDiv(),c=e,(this.plugin.settings.aiEnabled??1)||(e.style.display=\"none\"),new obsidian_module.Setting(e).setName(t$d(\"AI_OPENAI_TOKEN_NAME\")).setDesc(fragWithHTML(t$d(\"AI_OPENAI_TOKEN_DESC\"))).addText((e=>e.setPlaceholder(t$d(\"AI_OPENAI_TOKEN_PLACEHOLDER\")).setValue(this.plugin.settings.openAIAPIToken).onChange((async e=>{this.plugin.settings.openAIAPIToken=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"AI_OPENAI_DEFAULT_MODEL_NAME\")).setDesc(fragWithHTML(t$d(\"AI_OPENAI_DEFAULT_MODEL_DESC\"))).addText((e=>e.setPlaceholder(t$d(\"AI_OPENAI_DEFAULT_MODEL_PLACEHOLDER\")).setValue(this.plugin.settings.openAIDefaultTextModel).onChange((async e=>{this.plugin.settings.openAIDefaultTextModel=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"AI_OPENAI_DEFAULT_VISION_MODEL_NAME\")).setDesc(fragWithHTML(t$d(\"AI_OPENAI_DEFAULT_VISION_MODEL_DESC\"))).addText((e=>e.setPlaceholder(t$d(\"AI_OPENAI_DEFAULT_VISION_MODEL_PLACEHOLDER\")).setValue(this.plugin.settings.openAIDefaultVisionModel).onChange((async e=>{this.plugin.settings.openAIDefaultVisionModel=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"AI_OPENAI_DEFAULT_IMAGE_MODEL_NAME\")).setDesc(fragWithHTML(t$d(\"AI_OPENAI_DEFAULT_IMAGE_MODEL_DESC\"))).addText((e=>e.setPlaceholder(t$d(\"AI_OPENAI_DEFAULT_IMAGE_MODEL_PLACEHOLDER\")).setValue(this.plugin.settings.openAIDefaultImageGenerationModel).onChange((async e=>{this.plugin.settings.openAIDefaultImageGenerationModel=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"AI_OPENAI_DEFAULT_API_URL_NAME\")).setDesc(fragWithHTML(t$d(\"AI_OPENAI_DEFAULT_API_URL_DESC\"))).addText((e=>e.setPlaceholder(\"e.g.: https://api.openai.com/v1/chat/completions\").setValue(this.plugin.settings.openAIURL).onChange((async e=>{this.plugin.settings.openAIURL=e,this.applySettingsUpdate()})))),t.createEl(\"hr\",{cls:\"excalidraw-setting-hr\"}),t.createDiv({text:t$d(\"DISPLAY_DESC\"),cls:\"setting-item-description\"}),e=this.containerEl.createEl(\"details\");const d=e;e.createEl(\"summary\",{text:t$d(\"DISPLAY_HEAD\"),cls:\"excalidraw-setting-h1\"}),new obsidian_module.Setting(e).setName(t$d(\"ENABLE_DOUBLE_CLICK_TEXT_EDITING_NAME\")).addToggle((e=>e.setValue(!this.plugin.settings.disableDoubleClickTextEditing).onChange((async e=>{this.plugin.settings.disableDoubleClickTextEditing=!e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"SHOW_DRAWING_OR_MD_IN_READING_MODE_NAME\")).setDesc(fragWithHTML(t$d(\"SHOW_DRAWING_OR_MD_IN_READING_MODE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.renderImageInMarkdownReadingMode).onChange((async e=>{this.plugin.settings.renderImageInMarkdownReadingMode=e,this.applySettingsUpdate()})))).nameEl.setAttribute(\"id\",TAG_MDREADINGMODE),new obsidian_module.Setting(e).setName(t$d(\"SHOW_DRAWING_OR_MD_IN_HOVER_PREVIEW_NAME\")).setDesc(fragWithHTML(t$d(\"SHOW_DRAWING_OR_MD_IN_HOVER_PREVIEW_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.renderImageInHoverPreviewForMDNotes).onChange((async e=>{this.plugin.settings.renderImageInHoverPreviewForMDNotes=e,this.applySettingsUpdate()})))),e=d.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"MODES_HEAD\"),cls:\"excalidraw-setting-h3\"}),new obsidian_module.Setting(e).setName(t$d(\"TRAY_MODE_NAME\")).setDesc(fragWithHTML(t$d(\"ARIA_LABEL_TRAY_MODE\"))).addToggle((e=>e.setValue(this.plugin.settings.defaultTrayMode).onChange((e=>{this.plugin.settings.defaultTrayMode=e,setTrayMode(this.app,this.plugin.settings),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"COMPACT_MODE_NAME\")).setDesc(fragWithHTML(t$d(\"COMPACT_MODE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.compactModeOnTablets).onChange((e=>{this.plugin.settings.compactModeOnTablets=e,setTrayMode(this.app,this.plugin.settings),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"LEFTHANDED_MODE_NAME\")).setDesc(fragWithHTML(t$d(\"LEFTHANDED_MODE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.isLeftHanded).onChange((async e=>{this.plugin.settings.isLeftHanded=e,setLeftHandedMode(e),setTimeout((()=>setLeftHandedMode(e))),this.applySettingsUpdate()})))),addYouTubeThumbnail(e,\"H8Njp7ZXYag\",999),e=d.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"HOTKEY_OVERRIDE_HEAD\"),cls:\"excalidraw-setting-h3\"}),e.createEl(\"span\",{},(e=>{e.innerHTML=t$d(\"HOTKEY_OVERRIDE_DESC\")})),this.hotkeyEditor=new HotkeyEditor(e,this.plugin.settings,this.applySettingsUpdate),this.hotkeyEditor.onload(),e=d.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"THEME_HEAD\"),cls:\"excalidraw-setting-h3\"}),new obsidian_module.Setting(e).setName(t$d(\"OVERRIDE_OBSIDIAN_FONT_SIZE_NAME\")).setDesc(fragWithHTML(t$d(\"OVERRIDE_OBSIDIAN_FONT_SIZE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.overrideObsidianFontSize).onChange((e=>{this.plugin.settings.overrideObsidianFontSize=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"DYNAMICSTYLE_NAME\")).setDesc(fragWithHTML(t$d(\"DYNAMICSTYLE_DESC\"))).addDropdown((e=>e.addOption(\"none\",\"Dynamic Styling OFF\").addOption(\"colorful\",\"Match color\").addOption(\"gray\",\"Gray, match tone\").setValue(this.plugin.settings.dynamicStyling).onChange((async e=>{this.requestUpdateDynamicStyling=!0,this.plugin.settings.dynamicStyling=e,this.applySettingsUpdate()})))),addYouTubeThumbnail(e,\"fypDth_-8q0\"),new obsidian_module.Setting(e).setName(t$d(\"IFRAME_MATCH_THEME_NAME\")).setDesc(fragWithHTML(t$d(\"IFRAME_MATCH_THEME_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.iframeMatchExcalidrawTheme).onChange((async e=>{this.plugin.settings.iframeMatchExcalidrawTheme=e,this.applySettingsUpdate(!0)})))),addYouTubeThumbnail(e,\"ICpoyMv6KSs\"),new obsidian_module.Setting(e).setName(t$d(\"MATCH_THEME_NAME\")).setDesc(fragWithHTML(t$d(\"MATCH_THEME_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.matchTheme).onChange((async e=>{this.plugin.settings.matchTheme=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"MATCH_THEME_ALWAYS_NAME\")).setDesc(fragWithHTML(t$d(\"MATCH_THEME_ALWAYS_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.matchThemeAlways).onChange((async e=>{this.plugin.settings.matchThemeAlways=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"MATCH_THEME_TRIGGER_NAME\")).setDesc(fragWithHTML(t$d(\"MATCH_THEME_TRIGGER_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.matchThemeTrigger).onChange((async e=>{this.plugin.settings.matchThemeTrigger=e,e?this.plugin.addThemeObserver():this.plugin.removeThemeObserver(),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"DEFAULT_OPEN_MODE_NAME\")).setDesc(fragWithHTML(t$d(\"DEFAULT_OPEN_MODE_DESC\"))).addDropdown((e=>e.addOption(\"normal\",\"Always in normal-mode\").addOption(\"zen\",\"Always in zen-mode\").addOption(\"view\",\"Always in view-mode\").addOption(\"view-mobile\",\"Usually normal, but view-mode on Phone\").setValue(this.plugin.settings.defaultMode).onChange((async e=>{this.plugin.settings.defaultMode=e,this.applySettingsUpdate()})))),e=d.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"ZOOM_AND_PAN_HEAD\"),cls:\"excalidraw-setting-h3\"}),new obsidian_module.Setting(e).setName(t$d(\"PAN_WITH_RIGHT_MOUSE_BUTTON_NAME\")).setDesc(fragWithHTML(t$d(\"PAN_WITH_RIGHT_MOUSE_BUTTON_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.panWithRightMouseButton).onChange((async e=>{this.plugin.settings.panWithRightMouseButton=e,this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(e).setName(t$d(\"DEFAULT_PINCHZOOM_NAME\")).setDesc(fragWithHTML(t$d(\"DEFAULT_PINCHZOOM_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.allowPinchZoom).onChange((async e=>{this.plugin.settings.allowPinchZoom=e,getExcalidrawViews(this.app).forEach((e=>e.updatePinchZoom())),this.applySettingsUpdate()})))),addYouTubeThumbnail(e,\"rBarRfcSxNo\",107),new obsidian_module.Setting(e).setName(t$d(\"DEFAULT_WHEELZOOM_NAME\")).setDesc(fragWithHTML(t$d(\"DEFAULT_WHEELZOOM_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.allowWheelZoom).onChange((async e=>{this.plugin.settings.allowWheelZoom=e,getExcalidrawViews(this.app).forEach((e=>e.updateWheelZoom())),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"ZOOM_TO_FIT_ONOPEN_NAME\")).setDesc(fragWithHTML(t$d(\"ZOOM_TO_FIT_ONOPEN_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.zoomToFitOnOpen).onChange((async e=>{this.plugin.settings.zoomToFitOnOpen=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"ZOOM_TO_FIT_NAME\")).setDesc(fragWithHTML(t$d(\"ZOOM_TO_FIT_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.zoomToFitOnResize).onChange((async e=>{this.plugin.settings.zoomToFitOnResize=e,this.applySettingsUpdate()})))),createSliderWithText(e,{name:t$d(\"ZOOM_TO_FIT_MAX_LEVEL_NAME\"),desc:t$d(\"ZOOM_TO_FIT_MAX_LEVEL_DESC\"),value:this.plugin.settings.zoomToFitMaxLevel,min:.5,max:10,step:.5,onChange:e=>{this.plugin.settings.zoomToFitMaxLevel=e,this.applySettingsUpdate()}}),createSliderWithText(e,{name:t$d(\"ZOOM_STEP_NAME\"),desc:t$d(\"ZOOM_STEP_DESC\"),value:100*this.plugin.settings.zoomStep,min:1,max:25,step:1,onChange:e=>{this.plugin.settings.zoomStep=e/100,this.applySettingsUpdate()}}),createSliderWithText(e,{name:t$d(\"ZOOM_MIN_NAME\"),desc:t$d(\"ZOOM_MIN_DESC\"),value:100*this.plugin.settings.zoomMin,min:1,max:50,step:1,onChange:e=>{this.plugin.settings.zoomMin=e/100,this.applySettingsUpdate()}}),createSliderWithText(e,{name:t$d(\"ZOOM_MAX_NAME\"),desc:t$d(\"ZOOM_MAX_DESC\"),value:100*this.plugin.settings.zoomMax,min:500,max:6e3,step:100,onChange:e=>{this.plugin.settings.zoomMax=e/100,this.applySettingsUpdate()}}),e=d.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"PEN_HEAD\"),cls:\"excalidraw-setting-h3\"}),new obsidian_module.Setting(e).setName(t$d(\"DEFAULT_PEN_MODE_NAME\")).setDesc(fragWithHTML(t$d(\"DEFAULT_PEN_MODE_DESC\"))).addDropdown((e=>e.addOption(\"never\",\"Never\").addOption(\"mobile\",\"On Obsidian Mobile\").addOption(\"always\",\"Always\").setValue(this.plugin.settings.defaultPenMode).onChange((async e=>{this.plugin.settings.defaultPenMode=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"DISABLE_DOUBLE_TAP_ERASER_NAME\")).addToggle((e=>e.setValue(this.plugin.settings.penModeDoubleTapEraser).onChange((async e=>{this.plugin.settings.penModeDoubleTapEraser=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"DISABLE_SINGLE_FINGER_PANNING_NAME\")).addToggle((e=>e.setValue(this.plugin.settings.penModeSingleFingerPanning).onChange((async e=>{this.plugin.settings.penModeSingleFingerPanning=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"SHOW_PEN_MODE_FREEDRAW_CROSSHAIR_NAME\")).setDesc(fragWithHTML(t$d(\"SHOW_PEN_MODE_FREEDRAW_CROSSHAIR_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.penModeCrosshairVisible).onChange((async e=>{this.plugin.settings.penModeCrosshairVisible=e,this.applySettingsUpdate()})))),e=d.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"GRID_HEAD\"),cls:\"excalidraw-setting-h3\"});const h=()=>{getExcalidrawViews(this.app).forEach((e=>e.updateGridColor()))},p=()=>{getExcalidrawViews(this.app).forEach((e=>e.updateGridDirection(this.plugin.settings.gridSettings.GRID_DIRECTION)))};let u,m,g;new obsidian_module.Setting(e).setName(t$d(\"GRID_DIRECTION_NAME\")).setDesc(t$d(\"GRID_DIRECTION_DESC\")).addToggle((e=>e.setTooltip(t$d(\"GRID_HORIZONTAL\")).setValue(this.plugin.settings.gridSettings.GRID_DIRECTION?.horizontal??!0).onChange((e=>{this.plugin.settings.gridSettings.GRID_DIRECTION||(this.plugin.settings.gridSettings.GRID_DIRECTION={horizontal:!0,vertical:!0}),this.plugin.settings.gridSettings.GRID_DIRECTION.horizontal=e,this.applySettingsUpdate(),p()})))).addToggle((e=>e.setTooltip(t$d(\"GRID_VERTICAL\")).setValue(this.plugin.settings.gridSettings.GRID_DIRECTION?.vertical??!0).onChange((e=>{this.plugin.settings.gridSettings.GRID_DIRECTION||(this.plugin.settings.gridSettings.GRID_DIRECTION={horizontal:!0,vertical:!0}),this.plugin.settings.gridSettings.GRID_DIRECTION.vertical=e,this.applySettingsUpdate(),p()})))),new obsidian_module.Setting(e).setName(t$d(\"GRID_DYNAMIC_COLOR_NAME\")).setDesc(fragWithHTML(t$d(\"GRID_DYNAMIC_COLOR_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.gridSettings.DYNAMIC_COLOR).onChange((async e=>{this.plugin.settings.gridSettings.DYNAMIC_COLOR=e,u.style.display=e?\"none\":\"block\",this.applySettingsUpdate(),h()})))),u=e.createDiv(),u.style.display=this.plugin.settings.gridSettings.DYNAMIC_COLOR?\"none\":\"block\",new obsidian_module.Setting(u).setName(t$d(\"GRID_COLOR_NAME\")).addColorPicker((e=>e.setValue(this.plugin.settings.gridSettings.COLOR).onChange((async e=>{this.plugin.settings.gridSettings.COLOR=e,this.applySettingsUpdate(),h()})))),createSliderWithText(e,{name:t$d(\"GRID_OPACITY_NAME\"),desc:t$d(\"GRID_OPACITY_DESC\"),value:this.plugin.settings.gridSettings.OPACITY,min:0,max:100,step:1,onChange:e=>{this.plugin.settings.gridSettings.OPACITY=e,this.applySettingsUpdate(),h()},minWidth:\"3em\"}),e=d.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"LASER_HEAD\"),cls:\"excalidraw-setting-h3\"}),new obsidian_module.Setting(e).setName(t$d(\"LASER_COLOR\")).addColorPicker((e=>e.setValue(this.plugin.settings.laserSettings.COLOR).onChange((async e=>{this.plugin.settings.laserSettings.COLOR=e,this.applySettingsUpdate()})))),createSliderWithText(e,{name:t$d(\"LASER_DECAY_TIME_NAME\"),desc:t$d(\"LASER_DECAY_TIME_DESC\"),value:this.plugin.settings.laserSettings.DECAY_TIME,min:500,max:2e4,step:500,onChange:e=>{this.plugin.settings.laserSettings.DECAY_TIME=e,this.applySettingsUpdate()},minWidth:\"3em\"}),createSliderWithText(e,{name:t$d(\"LASER_DECAY_LENGTH_NAME\"),desc:t$d(\"LASER_DECAY_LENGTH_DESC\"),value:this.plugin.settings.laserSettings.DECAY_LENGTH,min:25,max:2e3,step:25,onChange:e=>{this.plugin.settings.laserSettings.DECAY_LENGTH=e,this.applySettingsUpdate()},minWidth:\"3em\"}),e=d.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"DRAG_MODIFIER_NAME\"),cls:\"excalidraw-setting-h3\"}),e.createDiv({text:t$d(\"DRAG_MODIFIER_DESC\"),cls:\"setting-item-description\"}),createSliderWithText(e,{name:t$d(\"LONG_PRESS_DESKTOP_NAME\"),desc:t$d(\"LONG_PRESS_DESKTOP_DESC\"),value:this.plugin.settings.longPressDesktop,min:300,max:3e3,step:100,onChange:e=>{this.plugin.settings.longPressDesktop=e,this.applySettingsUpdate(!0)}}),createSliderWithText(e,{name:t$d(\"LONG_PRESS_MOBILE_NAME\"),desc:t$d(\"LONG_PRESS_MOBILE_DESC\"),value:this.plugin.settings.longPressMobile,min:300,max:3e3,step:100,onChange:e=>{this.plugin.settings.longPressMobile=e,this.applySettingsUpdate(!0)}}),new obsidian_module.Setting(e).setName(t$d(\"DOUBLE_CLICK_LINK_OPEN_VIEW_MODE\")).addToggle((e=>e.setValue(this.plugin.settings.doubleClickLinkOpenViewMode).onChange((async e=>{this.plugin.settings.doubleClickLinkOpenViewMode=e,this.applySettingsUpdate()})))),new ModifierKeySettingsComponent(e,this.plugin.settings.modifierKeyConfig,this.applySettingsUpdate).render(),t.createEl(\"hr\",{cls:\"excalidraw-setting-hr\"}),t.createDiv({text:t$d(\"LINKS_HEAD_DESC\"),cls:\"setting-item-description\"}),e=this.containerEl.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"LINKS_HEAD\"),cls:\"excalidraw-setting-h1\"}),e.createEl(\"span\",void 0,(e=>e.innerHTML=t$d(\"LINKS_DESC\"))),new obsidian_module.Setting(e).setName(t$d(\"SECOND_ORDER_LINKS_NAME\")).setDesc(fragWithHTML(t$d(\"SECOND_ORDER_LINKS_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.showSecondOrderLinks).onChange((async e=>{this.plugin.settings.showSecondOrderLinks=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"ADJACENT_PANE_NAME\")).setDesc(fragWithHTML(t$d(\"ADJACENT_PANE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.openInAdjacentPane).onChange((async e=>{this.plugin.settings.openInAdjacentPane=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"FOCUS_ON_EXISTING_TAB_NAME\")).setDesc(fragWithHTML(t$d(\"FOCUS_ON_EXISTING_TAB_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.focusOnFileTab).onChange((async e=>{this.plugin.settings.focusOnFileTab=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"MAINWORKSPACE_PANE_NAME\")).setDesc(fragWithHTML(t$d(\"MAINWORKSPACE_PANE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.openInMainWorkspace).onChange((async e=>{this.plugin.settings.openInMainWorkspace=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(fragWithHTML(t$d(\"LINK_BRACKETS_NAME\"))).setDesc(fragWithHTML(t$d(\"LINK_BRACKETS_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.showLinkBrackets).onChange((e=>{this.plugin.settings.showLinkBrackets=e,this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(e).setName(t$d(\"LINK_PREFIX_NAME\")).setDesc(fragWithHTML(t$d(\"LINK_PREFIX_DESC\"))).addText((e=>e.setPlaceholder(t$d(\"INSERT_EMOJI\")).setValue(this.plugin.settings.linkPrefix).onChange((e=>{this.plugin.settings.linkPrefix=e,this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(e).setName(t$d(\"URL_PREFIX_NAME\")).setDesc(fragWithHTML(t$d(\"URL_PREFIX_DESC\"))).addText((e=>e.setPlaceholder(t$d(\"INSERT_EMOJI\")).setValue(this.plugin.settings.urlPrefix).onChange((e=>{this.plugin.settings.urlPrefix=e,this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(e).setName(t$d(\"PARSE_TODO_NAME\")).setDesc(fragWithHTML(t$d(\"PARSE_TODO_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.parseTODO).onChange((e=>{this.plugin.settings.parseTODO=e,m.setDisabled(!e),g.setDisabled(!e),this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(e).setName(t$d(\"TODO_NAME\")).setDesc(fragWithHTML(t$d(\"TODO_DESC\"))).addText((e=>{m=e,e.setPlaceholder(t$d(\"INSERT_EMOJI\")).setValue(this.plugin.settings.todo).onChange((e=>{this.plugin.settings.todo=e,this.applySettingsUpdate(!0)}))})),m.setDisabled(!this.plugin.settings.parseTODO),new obsidian_module.Setting(e).setName(t$d(\"DONE_NAME\")).setDesc(fragWithHTML(t$d(\"DONE_DESC\"))).setDisabled(!this.plugin.settings.parseTODO).addText((e=>{g=e,e.setPlaceholder(t$d(\"INSERT_EMOJI\")).setValue(this.plugin.settings.done).onChange((e=>{this.plugin.settings.done=e,this.applySettingsUpdate(!0)}))})),g.setDisabled(!this.plugin.settings.parseTODO),createSliderWithText(e,{name:t$d(\"LINKOPACITY_NAME\"),desc:t$d(\"LINKOPACITY_DESC\"),value:this.plugin.settings.linkOpacity,min:0,max:1,step:.05,onChange:e=>{this.plugin.settings.linkOpacity=e,this.applySettingsUpdate(!0)}}),new obsidian_module.Setting(e).setName(t$d(\"HOVERPREVIEW_NAME\")).setDesc(fragWithHTML(t$d(\"HOVERPREVIEW_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.hoverPreviewWithoutCTRL).onChange((async e=>{this.plugin.settings.hoverPreviewWithoutCTRL=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"LINK_CTRL_CLICK_NAME\")).setDesc(fragWithHTML(t$d(\"LINK_CTRL_CLICK_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.allowCtrlClick).onChange((async e=>{this.plugin.settings.allowCtrlClick=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"TRANSCLUSION_WRAP_NAME\")).setDesc(fragWithHTML(t$d(\"TRANSCLUSION_WRAP_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.forceWrap).onChange((async e=>{this.plugin.settings.forceWrap=e,this.applySettingsUpdate(!0)})))).descEl.innerHTML=`<code>![[doc#^ref]]{number}</code> ${t$d(\"TRANSCLUSION_WRAP_DESC\")}`,new obsidian_module.Setting(e).setName(t$d(\"PAGE_TRANSCLUSION_CHARCOUNT_NAME\")).setDesc(fragWithHTML(t$d(\"PAGE_TRANSCLUSION_CHARCOUNT_DESC\"))).addText((e=>e.setPlaceholder(\"Enter a number\").setValue(this.plugin.settings.pageTransclusionCharLimit.toString()).onChange((async t=>{const a=parseInt(t);if(isNaN(a)&&\"\"!==t)e.setValue(this.plugin.settings.pageTransclusionCharLimit.toString());else{if(this.requestEmbedUpdate=!0,\"\"===t)return this.plugin.settings.pageTransclusionCharLimit=10,void this.applySettingsUpdate(!0);this.plugin.settings.pageTransclusionCharLimit=a,e.setValue(this.plugin.settings.pageTransclusionCharLimit.toString()),this.applySettingsUpdate(!0)}})))),new obsidian_module.Setting(e).setName(t$d(\"TRANSCLUSION_DEFAULT_WRAP_NAME\")).setDesc(fragWithHTML(t$d(\"TRANSCLUSION_DEFAULT_WRAP_DESC\"))).addText((e=>e.setPlaceholder(\"Enter a number\").setValue(this.plugin.settings.wordWrappingDefault.toString()).onChange((async t=>{const a=parseInt(t);if(isNaN(a)&&\"\"!==t)e.setValue(this.plugin.settings.wordWrappingDefault.toString());else{if(this.requestEmbedUpdate=!0,\"\"===t)return this.plugin.settings.wordWrappingDefault=0,void this.applySettingsUpdate(!0);this.plugin.settings.wordWrappingDefault=a,e.setValue(this.plugin.settings.wordWrappingDefault.toString()),this.applySettingsUpdate(!0)}})))),new obsidian_module.Setting(e).setName(t$d(\"QUOTE_TRANSCLUSION_REMOVE_NAME\")).setDesc(fragWithHTML(t$d(\"QUOTE_TRANSCLUSION_REMOVE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.removeTransclusionQuoteSigns).onChange((e=>{this.plugin.settings.removeTransclusionQuoteSigns=e,this.requestEmbedUpdate=!0,this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(e).setName(t$d(\"GET_URL_TITLE_NAME\")).setDesc(fragWithHTML(t$d(\"GET_URL_TITLE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.iframelyAllowed).onChange((async e=>{this.plugin.settings.iframelyAllowed=e,this.applySettingsUpdate()})))),t.createEl(\"hr\",{cls:\"excalidraw-setting-hr\"}),t.createDiv({text:t$d(\"EMBED_DESC\"),cls:\"setting-item-description\"}),e=this.containerEl.createEl(\"details\");const f=e;let b,U;e.createEl(\"summary\",{text:t$d(\"EMBED_HEAD\"),cls:\"excalidraw-setting-h1\"}),new obsidian_module.Setting(e).setName(t$d(\"EMBED_PREVIEW_IMAGETYPE_NAME\")).setDesc(fragWithHTML(t$d(\"EMBED_PREVIEW_IMAGETYPE_DESC\"))).addDropdown((e=>e.addOption(PreviewImageType.PNG,\"PNG Image\").addOption(PreviewImageType.SVG,\"Native SVG\").addOption(PreviewImageType.SVGIMG,\"SVG Image\").setValue(this.plugin.settings.previewImageType).onChange((e=>{this.plugin.settings.previewImageType=e,this.requestEmbedUpdate=!0,this.applySettingsUpdate()})))),addYouTubeThumbnail(e,\"yZQoJg2RCKI\"),addYouTubeThumbnail(e,\"opLd1SqaH_I\",8),new obsidian_module.Setting(e).setName(t$d(\"EMBED_TYPE_NAME\")).setDesc(fragWithHTML(t$d(\"EMBED_TYPE_DESC\"))).addDropdown((async e=>{b=e,b.addOption(\"excalidraw\",\"excalidraw\"),this.plugin.settings.autoexportPNG?b.addOption(\"PNG\",\"PNG\"):\"PNG\"===this.plugin.settings.embedType&&(this.plugin.settings.embedType=\"excalidraw\",this.applySettingsUpdate()),this.plugin.settings.autoexportSVG?b.addOption(\"SVG\",\"SVG\"):\"SVG\"===this.plugin.settings.embedType&&(this.plugin.settings.embedType=\"excalidraw\",this.applySettingsUpdate()),b.setValue(this.plugin.settings.embedType).onChange((async e=>{this.plugin.settings.embedType=e,U.settingEl.style.display=\"excalidraw\"===e?\"none\":\"\",this.applySettingsUpdate()}))})),U=new obsidian_module.Setting(e).setName(t$d(\"EMBED_MARKDOWN_COMMENT_NAME\")).setDesc(fragWithHTML(t$d(\"EMBED_MARKDOWN_COMMENT_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.embedMarkdownCommentLinks).onChange((async e=>{this.plugin.settings.embedMarkdownCommentLinks=e,this.applySettingsUpdate()})))),U.settingEl.style.display=\"excalidraw\"===this.plugin.settings.embedType?\"none\":\"\",new obsidian_module.Setting(e).setName(t$d(\"EMBED_WIKILINK_NAME\")).setDesc(fragWithHTML(t$d(\"EMBED_WIKILINK_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.embedWikiLink).onChange((async e=>{this.plugin.settings.embedWikiLink=e,this.applySettingsUpdate()})))),e=f.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"EMBED_CANVAS\"),cls:\"excalidraw-setting-h3\"}),new obsidian_module.Setting(e).setName(t$d(\"EMBED_CANVAS_NAME\")).setDesc(fragWithHTML(t$d(\"EMBED_CANVAS_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.canvasImmersiveEmbed).onChange((async e=>{this.plugin.settings.canvasImmersiveEmbed=e,this.applySettingsUpdate()})))),e=f.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"EMBED_CACHING\"),cls:\"excalidraw-setting-h3\"}),createSliderWithText(e,{name:t$d(\"RENDERING_CONCURRENCY_NAME\"),desc:t$d(\"RENDERING_CONCURRENCY_DESC\"),min:1,max:5,step:1,value:this.plugin.settings.renderingConcurrency,onChange:e=>{this.plugin.settings.renderingConcurrency=e,this.applySettingsUpdate()}}),new obsidian_module.Setting(e).setName(t$d(\"EMBED_IMAGE_CACHE_NAME\")).setDesc(fragWithHTML(t$d(\"EMBED_IMAGE_CACHE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.allowImageCache).onChange((e=>{this.plugin.settings.allowImageCache=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"SCENE_IMAGE_CACHE_NAME\")).setDesc(fragWithHTML(t$d(\"SCENE_IMAGE_CACHE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.allowImageCacheInScene).onChange((e=>{this.plugin.settings.allowImageCacheInScene=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"EMBED_IMAGE_CACHE_CLEAR\")).addButton((e=>e.setButtonText(t$d(\"EMBED_IMAGE_CACHE_CLEAR\")).onClick((()=>{imageCache.clearImageCache()})))),new obsidian_module.Setting(e).setName(t$d(\"BACKUP_CACHE_CLEAR\")).addButton((e=>e.setButtonText(t$d(\"BACKUP_CACHE_CLEAR\")).onClick((()=>{new MultiOptionConfirmationPrompt(this.plugin,t$d(\"BACKUP_CACHE_CLEAR_CONFIRMATION\")).waitForClose.then((e=>{e&&imageCache.clearBackupCache()}))})))),new obsidian_module.Setting(e).setName(t$d(\"EMBED_REUSE_EXPORTED_IMAGE_NAME\")).setDesc(fragWithHTML(t$d(\"EMBED_REUSE_EXPORTED_IMAGE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.displayExportedImageIfAvailable).onChange((async e=>{this.plugin.settings.displayExportedImageIfAvailable=e,this.applySettingsUpdate()})))),e=f.createEl(\"details\");const E=e;e.createEl(\"summary\",{text:t$d(\"EXPORT_SUBHEAD\"),cls:\"excalidraw-setting-h3\"}),addYouTubeThumbnail(e,\"wTtaXmRJ7wg\",171),new obsidian_module.Setting(e).setName(t$d(\"SHOW_DRAWING_OR_MD_IN_EXPORTPDF_NAME\")).setDesc(fragWithHTML(t$d(\"SHOW_DRAWING_OR_MD_IN_EXPORTPDF_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.renderImageInMarkdownToPDF).onChange((async e=>{this.plugin.settings.renderImageInMarkdownToPDF=e,this.applySettingsUpdate()})))).nameEl.setAttribute(\"id\",TAG_PDFEXPORT),new obsidian_module.Setting(e).setName(t$d(\"EXPORT_EMBED_SCENE_NAME\")).setDesc(fragWithHTML(t$d(\"EXPORT_EMBED_SCENE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.exportEmbedScene).onChange((async e=>{this.plugin.settings.exportEmbedScene=e,this.applySettingsUpdate()})))),e=E.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"EMBED_SIZING\"),cls:\"excalidraw-setting-h4\"}),new obsidian_module.Setting(e).setName(t$d(\"EMBED_WIDTH_NAME\")).setDesc(fragWithHTML(t$d(\"EMBED_WIDTH_DESC\"))).addText((e=>e.setPlaceholder(\"e.g.: 400\").setValue(this.plugin.settings.width).onChange((async e=>{this.plugin.settings.width=e,this.applySettingsUpdate(),this.requestEmbedUpdate=!0})))),new obsidian_module.Setting(e).setName(t$d(\"EMBED_HEIGHT_NAME\")).setDesc(fragWithHTML(t$d(\"EMBED_HEIGHT_DESC\"))).addText((e=>e.setPlaceholder(\"e.g.: 400\").setValue(this.plugin.settings.height).onChange((async e=>{this.plugin.settings.height=e,this.applySettingsUpdate(),this.requestEmbedUpdate=!0})))),createSliderWithText(e,{name:t$d(\"EXPORT_PNG_SCALE_NAME\"),desc:t$d(\"EXPORT_PNG_SCALE_DESC\"),value:this.plugin.settings.pngExportScale,min:1,max:5,step:.5,onChange:e=>{this.plugin.settings.pngExportScale=e,this.applySettingsUpdate()}}),createSliderWithText(e,{name:t$d(\"EXPORT_PADDING_NAME\"),desc:fragWithHTML(t$d(\"EXPORT_PADDING_DESC\")),value:this.plugin.settings.exportPaddingSVG,min:0,max:50,step:5,onChange:e=>{this.plugin.settings.exportPaddingSVG=e,this.applySettingsUpdate()}}),e=E.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"EMBED_THEME_BACKGROUND\"),cls:\"excalidraw-setting-h4\"}),new obsidian_module.Setting(e).setName(t$d(\"EXPORT_BACKGROUND_NAME\")).setDesc(fragWithHTML(t$d(\"EXPORT_BACKGROUND_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.exportWithBackground).onChange((async e=>{this.plugin.settings.exportWithBackground=e,this.applySettingsUpdate(),this.requestEmbedUpdate=!0})))),new obsidian_module.Setting(e).setName(t$d(\"EXPORT_THEME_NAME\")).setDesc(fragWithHTML(t$d(\"EXPORT_THEME_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.exportWithTheme).onChange((async e=>{this.plugin.settings.exportWithTheme=e,this.applySettingsUpdate(),this.requestEmbedUpdate=!0})))),new obsidian_module.Setting(e).setName(t$d(\"PREVIEW_MATCH_OBSIDIAN_NAME\")).setDesc(fragWithHTML(t$d(\"PREVIEW_MATCH_OBSIDIAN_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.previewMatchObsidianTheme).onChange((async e=>{this.plugin.settings.previewMatchObsidianTheme=e,this.applySettingsUpdate()})))),e=E.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"PDF_EXPORT_SETTINGS\"),cls:\"excalidraw-setting-h4\"}),new PDFExportSettingsComponent(e,this.plugin.settings.pdfSettings,(()=>{this.applySettingsUpdate()})).render(),e=E.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"EXPORT_HEAD\"),cls:\"excalidraw-setting-h4\"}),e.setAttribute(\"id\",TAG_AUTOEXPORT),new obsidian_module.Setting(e).setName(t$d(\"EXPORT_SYNC_NAME\")).setDesc(fragWithHTML(t$d(\"EXPORT_SYNC_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.keepInSync).onChange((async e=>{this.plugin.settings.keepInSync=e,this.applySettingsUpdate()}))));const w=e=>{let t=0;for(t=0;t<b.selectEl.options.length;t++)b.selectEl.item(t).label===e&&b.selectEl.item(t).remove()};new obsidian_module.Setting(e).setName(t$d(\"EXPORT_SVG_NAME\")).setDesc(fragWithHTML(t$d(\"EXPORT_SVG_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.autoexportSVG).onChange((async e=>{e?b.addOption(\"SVG\",\"SVG\"):(\"SVG\"===this.plugin.settings.embedType&&(b.setValue(\"excalidraw\"),this.plugin.settings.embedType=\"excalidraw\"),w(\"SVG\")),this.plugin.settings.autoexportSVG=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"EXPORT_PNG_NAME\")).setDesc(fragWithHTML(t$d(\"EXPORT_PNG_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.autoexportPNG).onChange((async e=>{e?b.addOption(\"PNG\",\"PNG\"):(\"PNG\"===this.plugin.settings.embedType&&(b.setValue(\"excalidraw\"),this.plugin.settings.embedType=\"excalidraw\"),w(\"PNG\")),this.plugin.settings.autoexportPNG=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"EXPORT_BOTH_DARK_AND_LIGHT_NAME\")).setDesc(fragWithHTML(t$d(\"EXPORT_BOTH_DARK_AND_LIGHT_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.autoExportLightAndDark).onChange((async e=>{this.plugin.settings.autoExportLightAndDark=e,this.applySettingsUpdate()})))),t.createEl(\"hr\",{cls:\"excalidraw-setting-hr\"}),t.createDiv({text:t$d(\"EMBED_TOEXCALIDRAW_DESC\"),cls:\"setting-item-description\"}),e=this.containerEl.createEl(\"details\");const y=e;e.createEl(\"summary\",{text:t$d(\"EMBED_TOEXCALIDRAW_HEAD\"),cls:\"excalidraw-setting-h1\"}),e=y.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"PDF_TO_IMAGE\"),cls:\"excalidraw-setting-h3\"}),addYouTubeThumbnail(e,\"nB4cOfn0xAs\"),new obsidian_module.Setting(e).setName(t$d(\"PDF_TO_IMAGE_SCALE_NAME\")).setDesc(fragWithHTML(t$d(\"PDF_TO_IMAGE_SCALE_DESC\"))).addDropdown((e=>e.addOption(\"0.5\",\"0.5\").addOption(\"1\",\"1\").addOption(\"2\",\"2\").addOption(\"3\",\"3\").addOption(\"4\",\"4\").addOption(\"5\",\"5\").addOption(\"6\",\"6\").setValue(`${this.plugin.settings.pdfScale}`).onChange((e=>{this.plugin.settings.pdfScale=parseFloat(e),this.applySettingsUpdate()})))),e=y.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"MD_EMBED_CUSTOMDATA_HEAD_NAME\"),cls:\"excalidraw-setting-h3\"}),new obsidian_module.Setting(e).setName(t$d(\"MD_EMBED_SINGLECLICK_EDIT_NAME\")).setDesc(fragWithHTML(t$d(\"MD_EMBED_SINGLECLICK_EDIT_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.markdownNodeOneClickEditing).onChange((async e=>{this.plugin.settings.markdownNodeOneClickEditing=e,this.applySettingsUpdate()})))),e.createEl(\"hr\",{cls:\"excalidraw-setting-hr\"}),e.createEl(\"span\",{},(e=>{e.innerHTML=t$d(\"MD_EMBED_CUSTOMDATA_HEAD_DESC\")})),new EmbeddalbeMDFileCustomDataSettingsComponent(e,this.plugin.settings.embeddableMarkdownDefaults,this.applySettingsUpdate).render(),e=y.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"MD_HEAD\"),cls:\"excalidraw-setting-h3\"}),new obsidian_module.Setting(e).setName(t$d(\"MD_TRANSCLUDE_WIDTH_NAME\")).setDesc(fragWithHTML(t$d(\"MD_TRANSCLUDE_WIDTH_DESC\"))).addText((e=>e.setPlaceholder(\"Enter a number e.g. 500\").setValue(this.plugin.settings.mdSVGwidth.toString()).onChange((async t=>{const a=parseInt(t);if(isNaN(a)&&\"\"!==t)e.setValue(this.plugin.settings.mdSVGwidth.toString());else{if(this.requestEmbedUpdate=!0,\"\"===t)return this.plugin.settings.mdSVGwidth=500,void this.applySettingsUpdate(!0);this.plugin.settings.mdSVGwidth=a,this.requestReloadDrawings=!0,e.setValue(this.plugin.settings.mdSVGwidth.toString()),this.applySettingsUpdate(!0)}})))),new obsidian_module.Setting(e).setName(t$d(\"MD_TRANSCLUDE_HEIGHT_NAME\")).setDesc(fragWithHTML(t$d(\"MD_TRANSCLUDE_HEIGHT_DESC\"))).addText((e=>e.setPlaceholder(\"Enter a number e.g. 800\").setValue(this.plugin.settings.mdSVGmaxHeight.toString()).onChange((async t=>{const a=parseInt(t);if(isNaN(a)&&\"\"!==t)e.setValue(this.plugin.settings.mdSVGmaxHeight.toString());else{if(this.requestEmbedUpdate=!0,\"\"===t)return this.plugin.settings.mdSVGmaxHeight=800,void this.applySettingsUpdate(!0);this.plugin.settings.mdSVGmaxHeight=a,this.requestReloadDrawings=!0,e.setValue(this.plugin.settings.mdSVGmaxHeight.toString()),this.applySettingsUpdate(!0)}})))),new obsidian_module.Setting(e).setName(t$d(\"MD_DEFAULT_FONT_NAME\")).setDesc(fragWithHTML(t$d(\"MD_DEFAULT_FONT_DESC\"))).addDropdown((async e=>{e.addOption(\"Virgil\",\"Virgil\"),e.addOption(\"Cascadia\",\"Cascadia\"),e.addOption(\"Assistant\",\"Assistant\"),this.app.vault.getFiles().filter((e=>[\"ttf\",\"woff\",\"woff2\",\"otf\"].contains(e.extension)&&!e.path.startsWith(this.plugin.settings.fontAssetsPath))).forEach((t=>{e.addOption(t.path,t.name)})),e.setValue(this.plugin.settings.mdFont).onChange((e=>{this.requestReloadDrawings=!0,this.plugin.settings.mdFont=e,this.applySettingsUpdate(!0)}))})),new obsidian_module.Setting(e).setName(t$d(\"MD_DEFAULT_COLOR_NAME\")).setDesc(fragWithHTML(t$d(\"MD_DEFAULT_COLOR_DESC\"))).addText((e=>e.setPlaceholder(\"CSS Color-name|RGB-HEX\").setValue(this.plugin.settings.mdFontColor).onChange((e=>{this.requestReloadDrawings=!0,this.plugin.settings.mdFontColor=e,this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(e).setName(t$d(\"MD_DEFAULT_BORDER_COLOR_NAME\")).setDesc(fragWithHTML(t$d(\"MD_DEFAULT_BORDER_COLOR_DESC\"))).addText((e=>e.setPlaceholder(\"CSS Color-name|RGB-HEX\").setValue(this.plugin.settings.mdBorderColor).onChange((e=>{this.requestReloadDrawings=!0,this.plugin.settings.mdBorderColor=e,this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(e).setName(t$d(\"MD_CSS_NAME\")).setDesc(fragWithHTML(t$d(\"MD_CSS_DESC\"))).addText((e=>e.setPlaceholder(\"filename of css file in vault\").setValue(this.plugin.settings.mdCSS).onChange((e=>{this.requestReloadDrawings=!0,this.plugin.settings.mdCSS=e,this.applySettingsUpdate(!0)})))),t.createEl(\"hr\",{cls:\"excalidraw-setting-hr\"}),t.createDiv({text:t$d(\"NONSTANDARD_DESC\"),cls:\"setting-item-description\"}),e=this.containerEl.createEl(\"details\");const v=e;e.createEl(\"summary\",{text:t$d(\"NONSTANDARD_HEAD\"),cls:\"excalidraw-setting-h1\"}),e=v.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"RENDER_TWEAK_HEAD\"),cls:\"excalidraw-setting-h3\"}),createSliderWithText(e,{name:t$d(\"MAX_IMAGE_ZOOM_IN_NAME\"),desc:fragWithHTML(t$d(\"MAX_IMAGE_ZOOM_IN_DESC\")),value:this.plugin.settings.areaZoomLimit,min:1,max:10,step:.5,onChange:e=>{this.plugin.settings.areaZoomLimit=e,this.applySettingsUpdate(),this.plugin.excalidrawConfig.updateValues(this.plugin)}}),e=v.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"CUSTOM_PEN_HEAD\"),cls:\"excalidraw-setting-h3\"}),addYouTubeThumbnail(e,\"OjNhjaH2KjI\",69),new obsidian_module.Setting(e).setName(t$d(\"CUSTOM_PEN_NAME\")).setDesc(t$d(\"CUSTOM_PEN_DESC\")).addDropdown((e=>e.addOption(\"0\",\"0\").addOption(\"1\",\"1\").addOption(\"2\",\"2\").addOption(\"3\",\"3\").addOption(\"4\",\"4\").addOption(\"5\",\"5\").addOption(\"6\",\"6\").addOption(\"7\",\"7\").addOption(\"8\",\"8\").addOption(\"9\",\"9\").addOption(\"10\",\"10\").setValue(this.plugin.settings.numberOfCustomPens.toString()).onChange((e=>{this.plugin.settings.numberOfCustomPens=parseInt(e),this.requestUpdatePinnedPens=!0,this.applySettingsUpdate(!1)})))),t.createEl(\"hr\",{cls:\"excalidraw-setting-hr\"}),t.createDiv({text:t$d(\"FONTS_DESC\"),cls:\"setting-item-description\"}),e=this.containerEl.createEl(\"details\");const T=e;e.createEl(\"summary\",{text:t$d(\"FONTS_HEAD\"),cls:\"excalidraw-setting-h1\"}),e=T.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"CUSTOM_FONT_HEAD\"),cls:\"excalidraw-setting-h3\"}),addYouTubeThumbnail(e,\"eKFmrSQhFA4\"),new obsidian_module.Setting(e).setName(t$d(\"ENABLE_FOURTH_FONT_NAME\")).setDesc(fragWithHTML(t$d(\"ENABLE_FOURTH_FONT_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.experimentalEnableFourthFont).onChange((async e=>{this.requestReloadDrawings=!0,this.plugin.settings.experimentalEnableFourthFont=e,this.applySettingsUpdate(),e&&this.plugin.initializeFonts()})))),new obsidian_module.Setting(e).setName(t$d(\"FOURTH_FONT_NAME\")).setDesc(fragWithHTML(t$d(\"FOURTH_FONT_DESC\"))).addDropdown((async e=>{e.addOption(\"Virgil\",\"Virgil\"),this.app.vault.getFiles().filter((e=>[\"ttf\",\"woff\",\"woff2\",\"otf\"].contains(e.extension)&&!e.path.startsWith(this.plugin.settings.fontAssetsPath))).forEach((t=>{e.addOption(t.path,t.name)})),e.setValue(this.plugin.settings.experimantalFourthFont).onChange((e=>{this.requestReloadDrawings=!0,this.plugin.settings.experimantalFourthFont=e,this.applySettingsUpdate(!0),this.plugin.initializeFonts()}))})),e=T.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"OFFLINE_CJK_NAME\"),cls:\"excalidraw-setting-h3\"}),e.createDiv({cls:\"setting-item-description\"}).innerHTML=t$d(\"OFFLINE_CJK_DESC\"),new obsidian_module.Setting(e).setName(t$d(\"CJK_ASSETS_FOLDER_NAME\")).setDesc(fragWithHTML(t$d(\"CJK_ASSETS_FOLDER_DESC\"))).addText((e=>e.setPlaceholder(\"e.g.: Excalidraw/FontAssets\").setValue(this.plugin.settings.fontAssetsPath).onChange((async e=>{this.plugin.settings.fontAssetsPath=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"LOAD_CHINESE_FONTS_NAME\")).addToggle((e=>e.setValue(this.plugin.settings.loadChineseFonts).onChange((async e=>{this.plugin.settings.loadChineseFonts=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"LOAD_JAPANESE_FONTS_NAME\")).addToggle((e=>e.setValue(this.plugin.settings.loadJapaneseFonts).onChange((async e=>{this.plugin.settings.loadJapaneseFonts=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"LOAD_KOREAN_FONTS_NAME\")).addToggle((e=>e.setValue(this.plugin.settings.loadKoreanFonts).onChange((async e=>{this.plugin.settings.loadKoreanFonts=e,this.applySettingsUpdate()})))),t.createEl(\"hr\",{cls:\"excalidraw-setting-hr\"}),t.createDiv({text:t$d(\"EXPERIMENTAL_DESC\"),cls:\"setting-item-description\"}),e=t.createEl(\"details\");const S=e;let _,C,I;e.createEl(\"summary\",{text:t$d(\"EXPERIMENTAL_HEAD\"),cls:\"excalidraw-setting-h1\"}),addYouTubeThumbnail(e,\"r08wk-58DPk\"),new obsidian_module.Setting(e).setName(t$d(\"LATEX_DEFAULT_NAME\")).setDesc(fragWithHTML(t$d(\"LATEX_DEFAULT_DESC\"))).addText((e=>e.setValue(this.plugin.settings.latexBoilerplate).onChange((e=>{this.plugin.settings.latexBoilerplate=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"LATEX_PREAMBLE_NAME\")).setDesc(fragWithHTML(t$d(\"LATEX_PREAMBLE_DESC\"))).addText((e=>e.setPlaceholder(\"e.g.: preamble.sty\").setValue(this.plugin.settings.latexPreambleLocation).onChange((async e=>{this.plugin.settings.latexPreambleLocation=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"FILETYPE_NAME\")).setDesc(fragWithHTML(t$d(\"FILETYPE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.experimentalFileType).onChange((async e=>{this.plugin.settings.experimentalFileType=e,this.plugin.experimentalFileTypeDisplayToggle(e),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"FILETAG_NAME\")).setDesc(fragWithHTML(t$d(\"FILETAG_DESC\"))).addText((e=>e.setPlaceholder(t$d(\"INSERT_EMOJI\")).setValue(this.plugin.settings.experimentalFileTag).onChange((async e=>{this.plugin.settings.experimentalFileTag=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"LIVEPREVIEW_NAME\")).setDesc(fragWithHTML(t$d(\"LIVEPREVIEW_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.experimentalLivePreview).onChange((async e=>{this.plugin.settings.experimentalLivePreview=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"FADE_OUT_EXCALIDRAW_MARKUP_NAME\")).setDesc(fragWithHTML(t$d(\"FADE_OUT_EXCALIDRAW_MARKUP_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.fadeOutExcalidrawMarkup).onChange((async e=>{this.plugin.settings.fadeOutExcalidrawMarkup=e,this.plugin.editorHandler.updateCMExtensionState(EDITOR_FADEOUT,e),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"EXCALIDRAW_PROPERTIES_NAME\")).setDesc(fragWithHTML(t$d(\"EXCALIDRAW_PROPERTIES_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.loadPropertySuggestions).onChange((async e=>{this.plugin.settings.loadPropertySuggestions=e,this.applySettingsUpdate()})))),e=S.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"TASKBONE_HEAD\"),cls:\"excalidraw-setting-h3\"}),e.createDiv({text:t$d(\"TASKBONE_DESC\"),cls:\"setting-item-description\"}),addYouTubeThumbnail(e,\"7gu4ETx7zro\"),new obsidian_module.Setting(e).setName(t$d(\"TASKBONE_ENABLE_NAME\")).setDesc(fragWithHTML(t$d(\"TASKBONE_ENABLE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.taskboneEnabled).onChange((async e=>{if(_.setDisabled(!e),this.plugin.settings.taskboneEnabled=e,\"\"===this.plugin.settings.taskboneAPIkey){const e=await this.plugin.taskbone.initialize(!1);e&&_.setValue(e)}this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"TASKBONE_APIKEY_NAME\")).setDesc(fragWithHTML(t$d(\"TASKBONE_APIKEY_DESC\"))).addText((e=>{_=e,_.setValue(this.plugin.settings.taskboneAPIkey).onChange((async e=>{this.plugin.settings.taskboneAPIkey=e,this.applySettingsUpdate()})).setDisabled(!this.plugin.settings.taskboneEnabled)})),t.createEl(\"hr\",{cls:\"excalidraw-setting-hr\"}),t.createDiv({cls:\"setting-item-description\"},(e=>{e.innerHTML=t$d(\"EA_DESC\")})),e=t.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"EA_HEAD\"),cls:\"excalidraw-setting-h1\"}),new obsidian_module.Setting(e).setName(t$d(\"FIELD_SUGGESTER_NAME\")).setDesc(fragWithHTML(t$d(\"FIELD_SUGGESTER_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.fieldSuggester).onChange((async e=>{this.plugin.settings.fieldSuggester=e,this.applySettingsUpdate()}))));const x=()=>{const e=obsidian_module.normalizePath(this.plugin.settings.startupScriptPath.endsWith(\".md\")?this.plugin.settings.startupScriptPath:this.plugin.settings.startupScriptPath+\".md\");return Boolean(this.app.vault.getAbstractFileByPath(e))};new obsidian_module.Setting(e).setName(t$d(\"STARTUP_SCRIPT_NAME\")).setDesc(fragWithHTML(t$d(\"STARTUP_SCRIPT_DESC\"))).addText((e=>{C=e,e.setValue(this.plugin.settings.startupScriptPath).onChange((e=>{this.plugin.settings.startupScriptPath=e,I.setButtonText(x()?t$d(\"STARTUP_SCRIPT_BUTTON_OPEN\"):t$d(\"STARTUP_SCRIPT_BUTTON_CREATE\")),this.applySettingsUpdate()}))})).addButton((e=>{I=e,I.setButtonText(x()?t$d(\"STARTUP_SCRIPT_BUTTON_OPEN\"):t$d(\"STARTUP_SCRIPT_BUTTON_CREATE\")).onClick((async()=>{\"\"===this.plugin.settings.startupScriptPath&&(this.plugin.settings.startupScriptPath=obsidian_module.normalizePath(obsidian_module.normalizePath(this.plugin.settings.folder)+\"/ExcalidrawStartup\"),C.setValue(this.plugin.settings.startupScriptPath),this.applySettingsUpdate());const e=obsidian_module.normalizePath(this.plugin.settings.startupScriptPath.endsWith(\".md\")?this.plugin.settings.startupScriptPath:this.plugin.settings.startupScriptPath+\".md\");let t=this.app.vault.getAbstractFileByPath(e);t||(t=await createOrOverwriteFile(this.app,e,startupScript())),I.setButtonText(t$d(\"STARTUP_SCRIPT_BUTTON_OPEN\")),this.app.workspace.openLinkText(t.path,\"\",!0),this.hide()}))})),t.createEl(\"hr\",{cls:\"excalidraw-setting-hr\"}),t.createDiv({text:t$d(\"COMPATIBILITY_DESC\"),cls:\"setting-item-description\"}),e=this.containerEl.createEl(\"details\"),e.createEl(\"summary\",{text:t$d(\"COMPATIBILITY_HEAD\"),cls:\"excalidraw-setting-h1\"}),new obsidian_module.Setting(e).setName(t$d(\"DUMMY_TEXT_ELEMENT_LINT_SUPPORT_NAME\")).setDesc(fragWithHTML(t$d(\"DUMMY_TEXT_ELEMENT_LINT_SUPPORT_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.addDummyTextElement).onChange((e=>{this.plugin.settings.addDummyTextElement=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"PRESERVE_TEXT_AFTER_DRAWING_NAME\")).setDesc(fragWithHTML(t$d(\"PRESERVE_TEXT_AFTER_DRAWING_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.zoteroCompatibility).onChange((e=>{this.plugin.settings.zoteroCompatibility=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"SLIDING_PANES_NAME\")).setDesc(fragWithHTML(t$d(\"SLIDING_PANES_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.slidingPanesSupport).onChange((e=>{this.plugin.settings.slidingPanesSupport=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"COMPATIBILITY_MODE_NAME\")).setDesc(fragWithHTML(t$d(\"COMPATIBILITY_MODE_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.compatibilityMode).onChange((async e=>{this.plugin.settings.compatibilityMode=e,l.innerHTML=o(),this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"EXPORT_EXCALIDRAW_NAME\")).setDesc(fragWithHTML(t$d(\"EXPORT_EXCALIDRAW_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.autoexportExcalidraw).onChange((async e=>{this.plugin.settings.autoexportExcalidraw=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(e).setName(t$d(\"SYNC_EXCALIDRAW_NAME\")).setDesc(fragWithHTML(t$d(\"SYNC_EXCALIDRAW_DESC\"))).addToggle((e=>e.setValue(this.plugin.settings.syncExcalidraw).onChange((async e=>{this.plugin.settings.syncExcalidraw=e,this.applySettingsUpdate()}))));const A=this.plugin.scriptEngine.getListofScripts()?.map((e=>this.plugin.scriptEngine.getScriptName(e)));if(Object.keys(this.plugin.settings.scriptEngineSettings).length>0&&A){const a=(e,t)=>{const a=this.plugin.settings.scriptEngineSettings[e][t];return\"object\"==typeof a?a.height:null},i=(e,t)=>{const a=this.plugin.settings.scriptEngineSettings[e][t];return\"object\"==typeof a?a.value:a},n=(e,t,a)=>{\"object\"==typeof this.plugin.settings.scriptEngineSettings[e][t]?this.plugin.settings.scriptEngineSettings[e][t].value=a:this.plugin.settings.scriptEngineSettings[e][t]=a},r=(t,a,r)=>{new obsidian_module.Setting(e).setName(a).setDesc(fragWithHTML(r??\"\")).addToggle((e=>e.setValue(i(t,a)).onChange((async e=>{n(t,a,e),this.applySettingsUpdate()}))))},s=(t,r,s,o)=>{o&&\"[object Array]\"===Object.prototype.toString.call(o)&&o.length>0?new obsidian_module.Setting(e).setName(r).setDesc(fragWithHTML(s??\"\")).addDropdown((e=>{o.forEach((t=>e.addOption(t.toString(),t.toString()))),e.setValue(i(t,r)).onChange((async e=>{n(t,r,e),this.applySettingsUpdate()}))})):a(t,r)?new obsidian_module.Setting(e).setName(r).setDesc(fragWithHTML(s??\"\")).addTextArea((e=>{e.inputEl.style.minHeight=a(t,r),e.inputEl.style.minWidth=\"400px\",e.inputEl.style.width=\"100%\",e.setValue(i(t,r)).onChange((async e=>{n(t,r,e),this.applySettingsUpdate()}))})):new obsidian_module.Setting(e).setName(r).setDesc(fragWithHTML(s??\"\")).addText((e=>e.setValue(i(t,r)).onChange((async e=>{n(t,r,e),this.applySettingsUpdate()}))))},o=(t,a,r)=>{new obsidian_module.Setting(e).setName(a).setDesc(fragWithHTML(r??\"\")).addText((e=>e.setPlaceholder(\"Enter a number\").setValue(i(t,a).toString()).onChange((async r=>{const s=parseFloat(r);isNaN(s)&&\"\"!==r?e.setValue(i(t,a).toString()):(n(t,a,isNaN(s)?0:s),this.applySettingsUpdate())}))))};t.createEl(\"hr\",{cls:\"excalidraw-setting-hr\"}),t.createDiv({text:t$d(\"SCRIPT_SETTINGS_DESC\"),cls:\"setting-item-description\"}),e=this.containerEl.createEl(\"details\");const l=e;e.createEl(\"summary\",{text:t$d(\"SCRIPT_SETTINGS_HEAD\"),cls:\"excalidraw-setting-h1\"}),addYouTubeThumbnail(e,\"H8Njp7ZXYag\",52),Object.keys(this.plugin.settings.scriptEngineSettings).filter((e=>A.contains(e))).forEach((t=>{const a=this.plugin.settings.scriptEngineSettings[t],i=Object.values(a);0===i.length||i.length>0&&0===i.map((e=>e.hidden?0:1)).reduce(((e,t)=>e+t))||(e=l.createEl(\"details\"),e.createEl(\"summary\",{text:t,cls:\"excalidraw-setting-h3\"}),Object.keys(a).forEach((e=>{const i=a[e];switch(typeof(i.value??i)){case\"boolean\":i.hidden||r(t,e,i.description);break;case\"string\":i.hidden||s(t,e,i.description,i.valueset);break;case\"number\":i.hidden||o(t,e,i.description)}})))}))}}}function around(e,t){const a=Object.keys(t).map((a=>around1(e,a,t[a])));return 1===a.length?a[0]:function(){a.forEach((e=>e()))}}function around1(e,t,a){const i=e[t],n=e.hasOwnProperty(t);let r=a(i);return i&&Object.setPrototypeOf(r,i),Object.setPrototypeOf(s,r),e[t]=s,o;function s(...a){return r===i&&e[t]===s&&o(),r.apply(this,a)}function o(){e[t]===s&&(n?e[t]=i:delete e[t]),r!==i&&(r=i,Object.setPrototypeOf(s,i||Function))}}function dedupe(e,t,a){return i[e]=e,i;function i(...i){return(t[e]===e?t:a).apply(this,i)}}function isHTMLElement(e){return e&&\"object\"==typeof e&&1===e.nodeType&&\"string\"==typeof e.tagName}let plugin,app$1,vault,metadataCache;const getDefaultWidth=e=>{const t=parseInt(e.settings.width);return isNaN(t)||0===t||null===t?\"\"!==getDefaultHeight(e)?\"\":\"400\":e.settings.width},getDefaultHeight=e=>{const t=parseInt(e.settings.height);return isNaN(t)||0===t||null===t?\"\":e.settings.height},initializeMarkdownPostProcessor=e=>{plugin=e,app$1=plugin.app,vault=app$1.vault,metadataCache=app$1.metadataCache},_getPNG=async({imgAttributes:e,filenameParts:t,theme:a,cacheReady:i,img:n,file:r,exportSettings:s,loader:o})=>{const l=parseInt(e.fwidth),c=l>=2400?5:l>=1800?4:l>=1200?3:l>=600?2:1,d={...t,isDark:\"dark\"===a,previewImageType:PreviewImageType.PNG,scale:c,isTransparent:!s.withBackground,inlineFonts:!0};if(i){const e=await imageCache.getImageFromCache(d);if(e&&\"string\"==typeof e)return n.src=e,n}const h=(t.hasGroupref||t.hasFrameref?void 0:await getQuickImagePreview(plugin,r.path,\"png\"))??await createPNG(t.hasGroupref||t.hasFrameref||t.hasClippedFrameref?t.filepath+t.linkpartReference:r.path,c,t.hasClippedFrameref?{...s,frameRendering:{enabled:!0,name:!1,outline:!1,clip:!0}}:s,o,a,null,null,[],plugin,0);return h?(n.src=URL.createObjectURL(h),i&&imageCache.addImageToCache(d,n.src,h),n):null},setStyle=({element:e,imgAttributes:t,onCanvas:a})=>{let i=\"\";i=t.fwidth?`max-width:${t.fwidth}${t.fwidth.match(/\\d$/)?\"px\":\"\"}; `:\"width: fit-content;\",t.fheight&&(i+=`${t.fwidth?\"min-\":\"max-\"}height:${t.fheight}px;`),a||e.setAttribute(\"style\",i),e.classList.add(...Array.from(t.style)),e.hasClass(\"excalidraw-embedded-img\")||e.addClass(\"excalidraw-embedded-img\"),window?.ExcalidrawAutomate?.plugin?.settings?.canvasImmersiveEmbed&&!e.hasClass(\"excalidraw-canvas-immersive\")&&e.addClass(\"excalidraw-canvas-immersive\")},_getSVGIMG=async({filenameParts:e,theme:t,cacheReady:a,img:i,file:n,exportSettings:r,loader:s})=>{r.skipInliningFonts=!1;const o={...e,isDark:\"dark\"===t,previewImageType:PreviewImageType.SVGIMG,scale:1,isTransparent:!r.withBackground,inlineFonts:!r.skipInliningFonts};if(a){const e=await imageCache.getImageFromCache(o);if(e&&\"string\"==typeof e)return i.setAttribute(\"src\",e),i}if(!e.hasBlockref&&!e.hasSectionref){const e=await getQuickImagePreview(plugin,n.path,\"svg\");if(e){const t=convertSVGStringToElement(e);if(t)return addSVGToImgSrc(i,t,a,o)}}const l=convertSVGStringToElement((await createSVG(e.hasGroupref||e.hasBlockref||e.hasSectionref||e.hasFrameref||e.hasClippedFrameref?e.filepath+e.linkpartReference:n.path,!0,e?.hasClippedFrameref?{...r,frameRendering:{enabled:!0,name:!1,outline:!1,clip:!0}}:r,s,t,null,null,[],plugin,0,getExportPadding(plugin,n))).outerHTML);return l?(l.removeAttribute(\"width\"),l.removeAttribute(\"height\"),addSVGToImgSrc(i,l,a,o)):null},_getSVGNative=async({filenameParts:e,theme:t,cacheReady:a,containerElement:i,file:n,exportSettings:r,loader:s})=>{r.skipInliningFonts=!1;const o={...e,isDark:\"dark\"===t,previewImageType:PreviewImageType.SVG,scale:1,isTransparent:!r.withBackground,inlineFonts:!r.skipInliningFonts};let l;a&&(l=await imageCache.getImageFromCache(o));const c=l&&l instanceof SVGSVGElement?l:convertSVGStringToElement((await createSVG(e.hasGroupref||e.hasBlockref||e.hasSectionref||e.hasFrameref||e.hasClippedFrameref?e.filepath+e.linkpartReference:n.path,!1,e.hasClippedFrameref?{...r,frameRendering:{enabled:!0,name:!1,outline:!1,clip:!0}}:r,s,t,null,null,[],plugin,0,getExportPadding(plugin,n),void 0,!0)).outerHTML);return c?(Boolean(l)||a&&imageCache.addImageToCache(o,\"\",c),c.removeAttribute(\"width\"),c.removeAttribute(\"height\"),i.append(c),i):null},getIMG=async(e,t=!1)=>{let a=e.file;if(!e.file){const t=vault.getAbstractFileByPath(e.fname?.split(\"#\")[0]);if(!(t&&t instanceof obsidian_module.TFile))return null;a=t}const i=getEmbeddedFilenameParts(e.fname);e.style=e.style.map((e=>e.replaceAll(\" \",\"-\")));const n=hasExportTheme(plugin,a)?getExportTheme(plugin,a,\"light\"):void 0,r={withBackground:getWithBackground(plugin,a),withTheme:!!n||plugin.settings.exportWithTheme,isMask:isMaskFile(plugin,a)},s=n??(plugin.settings.previewMatchObsidianTheme?isObsidianThemeDark()?\"dark\":\"light\":plugin.settings.exportWithTheme?void 0:\"light\");s&&(r.withTheme=!0);const o=new EmbeddedFilesLoader(plugin,s?\"dark\"===s:void 0),l=imageCache.isReady();switch(await plugin.awaitInit(),plugin.settings.previewImageType){case PreviewImageType.PNG:{const n=createEl(\"img\");return setStyle({element:n,imgAttributes:e,onCanvas:t}),await _getPNG({imgAttributes:e,filenameParts:i,theme:s,cacheReady:l,img:n,file:a,exportSettings:r,loader:o})}case PreviewImageType.SVGIMG:{const n=createEl(\"img\");return setStyle({element:n,imgAttributes:e,onCanvas:t}),await _getSVGIMG({filenameParts:i,theme:s,cacheReady:l,img:n,file:a,exportSettings:r,loader:o})}case PreviewImageType.SVG:{const n=createEl(\"div\");return setStyle({element:n,imgAttributes:e,onCanvas:t}),await _getSVGNative({filenameParts:i,theme:s,cacheReady:l,containerElement:n,file:a,exportSettings:r,loader:o})}}},addSVGToImgSrc=(e,t,a,i)=>{const n=t.outerHTML,r=new Blob([n],{type:\"image/svg+xml\"}),s=URL.createObjectURL(r);return e.setAttribute(\"src\",s),a&&imageCache.addImageToCache(i,s,r),e},createImgElement=async(e,t=!1)=>{const a=await getIMG(e,t);if(!a)return null;let i;a.setAttribute(\"fileSource\",e.fname),e.fwidth&&a.setAttribute(\"w\",e.fwidth),e.fheight&&a.setAttribute(\"h\",e.fheight),a.setAttribute(\"draggable\",\"false\"),a.setAttribute(\"onCanvas\",t?\"true\":\"false\");const n=e=>{if(!isHTMLElement(e.target))return;const t=e.target;if(!(t.hasClass(\"excalidraw-embedded-img\")?e.target:getParentOfClass(t,\"excalidraw-embedded-img\")))return;const i=a.getAttribute(\"fileSource\");if(i){const t=i.match(/([^#]*)(.*)/);if(!t)return;const a=vault.getAbstractFileByPath(t[1]),n=linkClickModifierType(e);if(plugin.isExcalidrawFile(a)&&isMaskFile(plugin,a))return void(async()=>{const e=`[[${a.path}${t[2]?\"#\"+t[2]:\"\"}]] ${getExcalidrawFileForwardLinks(plugin.app,a,new Set)}`,i=await linkPrompt(e,plugin.app);if(!i)return;const[r,s,o]=i;if(plugin.isExcalidrawFile(r))return void plugin.openDrawing(r,n,!0,o);let l=!1;switch(n){case\"active-pane\":l=!1;break;case\"new-pane\":l=\"split\";break;case\"popout-window\":l=\"window\";break;case\"new-tab\":case\"md-properties\":l=\"tab\"}plugin.app.workspace.openLinkText(s,\"\",l,o?{eState:{subpath:o}}:{})})();plugin.openDrawing(a,n,!0,t[2])}};let r;const s=a;return s.addEventListener(\"pointermove\",(e=>{i&&(Math.abs(e.screenX-r.screenX)>10||Math.abs(e.screenY-r.screenY)>10)&&(window.clearTimeout(i),i=null)})),s.addEventListener(\"pointerdown\",(e=>{if(a?.parentElement?.hasClass(\"canvas-node-content\"))return;const t=app$1.plugins.plugins[\"obsidian-excalidraw-plugin\"],s=DEVICE.isDesktop?t.settings.longPressDesktop:t.settings.longPressMobile;i=window.setTimeout((()=>n(e)),s),r=e})),s.addEventListener(\"pointerup\",(()=>{i&&window.clearTimeout(i),i=null})),s.addEventListener(\"dblclick\",n),s.addEventListener(RERENDER_EVENT,(async e=>{e.stopPropagation();const t=a.parentElement,i=a.style.maxWidth,n=a.style.maxHeight,r=a.getAttribute(\"fileSource\"),s=\"true\"===a.getAttribute(\"onCanvas\"),o=await createImgElement({fname:r,fwidth:a.getAttribute(\"w\"),fheight:a.getAttribute(\"h\"),style:[...Array.from(a.classList)]},s);o&&(t.empty(),s||(o.style.maxHeight=n,o.style.maxWidth=i),o.setAttribute(\"fileSource\",r),t.append(o))})),getFileCSSClasses(e.file).forEach((e=>{a.hasClass(e)||a.addClass(e)})),window?.ExcalidrawAutomate?.plugin?.settings?.canvasImmersiveEmbed?a.hasClass(\"excalidraw-canvas-immersive\")||a.addClass(\"excalidraw-canvas-immersive\"):a.hasClass(\"excalidraw-canvas-immersive\")&&a.removeClass(\"excalidraw-canvas-immersive\"),a},createImageDiv=async(e,t=!1)=>{const a=await createImgElement(e,t);return createDiv(e.style.join(\" \"),(e=>e.append(a)))},processReadingMode=async(e,t)=>{for(const a of e){const e=a.getAttribute(\"src\")?.split(\"#\")[0];if(!e)continue;const i=metadataCache.getFirstLinkpathDest(e,t.sourcePath);if(i&&i instanceof obsidian_module.TFile&&plugin.isExcalidrawFile(i)){if(isTextOnlyEmbed(a))continue;a.parentElement.replaceChild(await processInternalEmbed(a,i),a)}}},processInternalEmbed=async(e,t)=>{const a={fname:\"\",fheight:\"\",fwidth:\"\",style:[]},i=e.getAttribute(\"src\");if(!i)return;e.removeClass(\"markdown-embed\"),e.removeClass(\"inline-embed\"),e.addClass(\"media-embed\"),e.addClass(\"image-embed\"),a.fwidth=e.getAttribute(\"width\")?e.getAttribute(\"width\"):getDefaultWidth(plugin),a.fheight=e.getAttribute(\"height\")?e.getAttribute(\"height\"):getDefaultHeight(plugin);let n=e.getAttribute(\"alt\");a.style=[\"excalidraw-svg\"],processAltText(i.split(\"#\")[0],n,a);const r=getEmbeddedFilenameParts(i);return a.fname=t?.path+(r.hasBlockref||r.hasSectionref?r.linkpartReference:\"\"),a.file=t,await createImageDiv(a)};function getDimensionsFromAliasString(e){const t=e.match(/^(?<width>\\d+%|\\d+)(x(?<height>\\d+%|\\d+))?$/)||e.match(/^x(?<height>\\d+%|\\d+)$/);if(t){const{width:e,height:a}=t.groups;return e&&e.startsWith(\"0\")&&\"0\"!==e||a&&a.startsWith(\"0\")&&\"0\"!==a?null:{width:e||void 0,height:a||void 0}}return/^0\\d|^\\d+\\.\\d+/.test(e),null}function parseAlias(e){const t={},a=e.split(\"|\").map((e=>e.trim()));switch(a.length){case 1:const e=getDimensionsFromAliasString(a[0]);if(e)return e;t.style=a[0];break;case 2:const i=getDimensionsFromAliasString(a[0]),n=getDimensionsFromAliasString(a[1]);n?(t.alias=a[0],t.width=n.width,t.height=n.height):i?(t.width=i.width,t.height=i.height,t.style=a[1]):(t.alias=a[0],t.style=a[1]);break;case 3:const r=getDimensionsFromAliasString(a[1]);r?(t.alias=a[0],t.width=r.width,t.height=r.height,t.style=a[2]):(t.alias=a[0],t.style=a[2]);break;default:const s=getDimensionsFromAliasString(a[1]);s?(t.alias=a[0],t.width=s.width,t.height=s.height,t.style=a[a.length-1]):(t.alias=a[0],t.style=a[a.length-1])}return Object.keys(t).forEach((e=>{void 0===t[e]&&delete t[e]})),t}const processAltText=(e,t,a)=>{if(t&&!t.startsWith(e)){const i=parseAlias(t);a.fwidth=i.width??a.fwidth,a.fheight=i.height??a.fheight,i.style&&!i.style.startsWith(e)&&(a.style=[`excalidraw-svg-${i.style}`])}},isTextOnlyEmbed=e=>{const t=e.getAttribute(\"src\");if(!t)return!0;const a=getEmbeddedFilenameParts(t);return!(a.hasArearef||a.hasGroupref||a.hasFrameref||a.hasClippedFrameref)&&(a.hasBlockref||a.hasSectionref)&&\"as-image\"!==a.blockref},tmpObsidianWYSIWYG=async(e,t,a,i,n)=>{const r=app$1.vault.getAbstractFileByPath(t.sourcePath);if(!(r instanceof obsidian_module.TFile))return;if(!plugin.isExcalidrawFile(r))return;if(t.frontmatter?.[\"excalidraw-embed-md\"])return;if(t.remainingNestLevel<4)return;const s=t.containerEl;if(!plugin.settings.renderImageInMarkdownReadingMode&&i)return;if(!plugin.settings.renderImageInMarkdownToPDF&&a)return;let o=s;for(;!o.hasClass(\"print\")&&!o.hasClass(\"dataview\")&&!o.hasClass(\"cm-preview-code-block\")&&!o.hasClass(\"cm-embed-block\")&&!o.hasClass(\"internal-embed\")&&!o.hasClass(\"markdown-reading-view\")&&!o.hasClass(\"markdown-embed\")&&o.parentElement;)o=o.parentElement;if(o.hasClass(\"dataview\")||o.hasClass(\"cm-preview-code-block\")||o.hasClass(\"cm-embed-block\"))return;if(!plugin.settings.renderImageInHoverPreviewForMDNotes){const e=Boolean(t.frontmatter?.[\"excalidraw-open-md\"]);if(n&&e)return}const l={fname:t.sourcePath,fheight:a?\"100%\":getDefaultHeight(plugin),fwidth:a?\"100%\":getDefaultWidth(plugin),style:[\"excalidraw-svg\"]};l.file=r;const c=o.hasClass(\"markdown-embed\"),d=a||i;if(!o.hasClass(\"internal-embed\")&&(c||d)){a&&(o=s);const i=Boolean(e.querySelector(\".frontmatter\"));let n=!1;if(Boolean(t.frontmatter))e.empty();else{let t=e.querySelector(\"div>*[data-heading^='Unable to find \");if(t||(t=e.querySelector(\"div > *[data-heading]\")),t){const e=t.getAttr(\"data-heading\"),a=e.match(/.+(\\^(?:group=|area=|frame=|clippedframe=)[A-Za-z0-9_-]{8,21})/)?.[1];a&&(l.fname=r.path+\"#\"+a,n=!0)}}if(!i&&!n)return void(e.parentElement===s&&s.removeChild(e));o.empty();const d=o.hasClass(\"canvas-node-content\"),h=await createImageDiv(l,d);return c?(o.removeClass(\"markdown-embed\"),o.removeClass(\"inline-embed\"),o.addClass(\"media-embed\"),o.addClass(\"image-embed\"),!d&&h.firstChild instanceof HTMLElement&&(h.firstChild.style.maxHeight=\"100%\",h.firstChild.style.maxWidth=null),void o.appendChild(h.firstChild)):void o.appendChild(h)}if(isTextOnlyEmbed(o))return;if(e.empty(),o.hasAttribute(\"ready\"))return;o.setAttribute(\"ready\",\"\"),o.empty();const h=await processInternalEmbed(o,r);o.appendChild(h);let p=null;const u=e=>{[\"alt\",\"width\",\"height\"].contains(e[0]?.attributeName)&&(p&&window.clearTimeout(p),p=window.setTimeout((async()=>{p=null,o.empty();const e=await processInternalEmbed(o,r);o.appendChild(e)}),500))};(DEBUGGING?new CustomMutationObserver(u,\"markdowPostProcessorObserverFn\"):new MutationObserver(u)).observe(o,{attributes:!0})},docIDs=new Set,markdownPostProcessor=async(e,t)=>{await plugin.awaitSettings();const a=Boolean(document.body.querySelectorAll(\"body > .print\").length>0),i=e.hasClass(\"mod-frontmatter\")||e.firstElementChild?.hasClass(\"frontmatter\")||e.firstElementChild?.hasClass(\"block-language-yaml\");if(a&&i){const e=app$1.vault.getAbstractFileByPath(t.sourcePath);if(e&&e instanceof obsidian_module.TFile&&plugin.isExcalidrawFile(e))return}const n=t.containerEl,r=Boolean(n&&getParentOfClass(n,\"markdown-reading-view\")),s=Boolean(n&&getParentOfClass(n,\"hover-popover\")),o=s&&Boolean(t?.frontmatter?.[\"excalidraw-open-md\"])&&!plugin.settings.renderImageInHoverPreviewForMDNotes,l=e.querySelectorAll(\".internal-embed\");if(a&&plugin.settings.renderImageInMarkdownToPDF)return void await tmpObsidianWYSIWYG(e,t,a,r,s);if(!o&&0===l.length){if(i)docIDs.add(t.docId);else if(docIDs.has(t.docId)&&!e.hasChildNodes()&&docIDs.delete(t.docId),1!==e.querySelectorAll(\"div > *[data-heading]\").length)return;return void await tmpObsidianWYSIWYG(e,t,a,r,s)}const c=Boolean(t.frontmatter?.hasOwnProperty(\"excalidraw-plugin\"));o||r||a||!c?await processReadingMode(l,t):e.style.display=\"none\"},hoverEvent=e=>{e.linktext?(plugin.hover.linkText=e.linktext,plugin.hover.sourcePath=e.sourcePath):plugin.hover.linkText=null},legacyExcalidrawPopoverObserverFn=async e=>{if(0===e.length)return;if(!plugin.hover.linkText)return;if(!plugin.hover.linkText.endsWith(\"excalidraw\"))return;const t=metadataCache.getFirstLinkpathDest(plugin.hover.linkText,plugin.hover.sourcePath?plugin.hover.sourcePath:\"\");if(!t)return;if(!(t instanceof obsidian_module.TFile))return;if(\"excalidraw\"!==t.extension)return;const a=getIMGFilename(t.path,\"svg\"),i=vault.getAbstractFileByPath(a);if(i&&i instanceof obsidian_module.TFile)return;const n=getIMGFilename(t.path,\"png\"),r=vault.getAbstractFileByPath(n);if(r&&r instanceof obsidian_module.TFile)return;if(!plugin.hover.linkText)return;if(1!==e.length)return;if(1!==e[0].addedNodes.length)return;if(\"popover hover-popover\"!==e[0].addedNodes[0].className)return;const s=e[0].addedNodes[0];s.empty();const o=await getIMG({file:t,fname:t.path,fwidth:\"300\",fheight:null,style:[\"excalidraw-svg\"]}),l=createDiv(\"\",(async e=>{e.appendChild(o),e.setAttribute(\"src\",t.path),e.onClickEvent((t=>{t.stopImmediatePropagation();const a=e.getAttribute(\"src\");a&&plugin.openDrawing(vault.getAbstractFileByPath(a),linkClickModifierType(t))}))}));s.appendChild(l)},legacyExcalidrawPopoverObserver=DEBUGGING?new CustomMutationObserver(legacyExcalidrawPopoverObserverFn,\"legacyExcalidrawPopoverObserverFn\"):new MutationObserver(legacyExcalidrawPopoverObserverFn);class FieldSuggester extends obsidian_module.EditorSuggest{plugin;suggestType;latestTriggerInfo;constructor(e){super(e.app),this.plugin=e}onTrigger(e,t,a){if(this.plugin.settings.fieldSuggester){const a=t.getLine(e.line).substring(0,e.ch),i=a.match(/^excalidraw-(.*)$/)?.[1]??a.match(/(^ea|\\Wea)\\.([\\w\\.]*)$/)?.[2]??a.match(/(^utils|\\Wutils)\\.([\\w\\.]*)$/)?.[2];if(void 0!==i)return this.suggestType=a.match(/^excalidraw-(.*)$/)?\"excalidraw\":a.match(/(^ea|\\Wea)\\.([\\w\\.]*)$/)?\"ea\":\"utils\",this.latestTriggerInfo={end:e,start:{ch:e.ch-i.length,line:e.line},query:i},this.latestTriggerInfo}return null}getSuggestions=e=>{const t=e.query.toLowerCase();return(\"ea\"===this.suggestType?EXCALIDRAW_AUTOMATE_INFO:\"utils\"===this.suggestType?EXCALIDRAW_SCRIPTENGINE_INFO:FRONTMATTER_KEYS_INFO).map((e=>e.field)).filter((e=>e.toLowerCase().includes(t)))};renderSuggestion(e,t){const a=e.replace(\"ea\"===this.suggestType?\"ea.\":\"utils\"===this.suggestType?\"utils.\":\"excalidraw-\",\"\"),i=(\"ea\"===this.suggestType?EXCALIDRAW_AUTOMATE_INFO:\"utils\"===this.suggestType?EXCALIDRAW_SCRIPTENGINE_INFO:FRONTMATTER_KEYS_INFO).find((t=>t.field===e));t.createEl(\"b\",{text:a}),t.createEl(\"br\"),i.code&&t.createEl(\"code\",{text:i.code}),i.desc&&t.createDiv(\"div\",(e=>e.innerHTML=i.desc))}selectSuggestion(e){const{context:t}=this;if(t){const a=\"ea\"===this.suggestType?EXCALIDRAW_AUTOMATE_INFO:\"utils\"===this.suggestType?EXCALIDRAW_SCRIPTENGINE_INFO:FRONTMATTER_KEYS_INFO,i=`${e}${a.find((t=>t.field===e))?.after}`;if(t.editor.replaceRange(i,this.latestTriggerInfo.start,this.latestTriggerInfo.end),this.latestTriggerInfo.start.ch===this.latestTriggerInfo.end.ch){const e=this.latestTriggerInfo.end;e.ch+=i.length,t.editor.setCursor(e)}}}}class ExcalidrawConfig{areaLimit=16777216;widthHeightLimit=32767;constructor(e){this.updateValues(e)}updateValues(e){DEVICE.isIOS||(this.areaLimit=16777216*e.settings.areaZoomLimit,this.widthHeightLimit=32767*e.settings.areaZoomLimit)}}class RankMessage extends obsidian_module.Modal{plugin;filecount;rank;color;shield;dark;constructor(e,t,a,i,n,r,s){super(e),this.plugin=t,this.filecount=a,this.rank=i,this.color=n,this.shield=r,this.dark=s}onOpen(){this.containerEl.classList.add(\"excalidraw-release\"),this.titleEl.setText(\"Congratulations, glorious knight!\"),this.createForm()}async onClose(){this.contentEl.empty(),this.plugin=null}async createForm(){const{title:e}=SwordColors[this.rank];this.contentEl.createDiv({cls:\"excalidraw-rank\"},(e=>{e.innerHTML=`<svg xmlns=\"http://www.w3.org/2000/svg\" xml:space=\"preserve\" style=\"enable-background:new 0 0 512 512\" viewBox=\"0 0 511 512\"><path fill=\"${this.color}\" d=\"m389 495 36 7c6 1 11-4 10-10l-6-36a22 22 0 0 0-9-14l-61-46-29 28 45 62a22 22 0 0 0 14 9zm0 0\" data-original=\"#97a7a7\"/><path fill=\"#ffd3bc\" d=\"m333 361-33 4-27 29 1 5 15 13c11 10 27 12 39 3 7-4 12-11 13-20 1-11-3-23-8-34zm0 0\" data-original=\"#ffd3bc\"/><path fill=\"#a5b0bc\" d=\"m288 450-3-50-88-15-87 15-3 50 27 16 28-16v-8c0-6 4-11 10-11h51c6 0 10 5 10 11v8l28 16 27-16zm28-114a332 332 0 0 0-4-6c-14-17-32-30-55-29l16 93 60-33c-5-9-11-18-17-25zm0 0\" data-original=\"#a5b0bc\"/><path fill=\"${this.shield}\" d=\"M281 371c-9-54-24-70-24-70H138s-15 16-24 70l-4 29h175l-4-29zm0 0\" data-original=\"${this.shield}\"/><path fill=\"${this.color}\" d=\"M383 160a30 30 0 1 1-59 0 30 30 0 0 1 59 0zm-312 0a30 30 0 1 1-59 0 30 30 0 0 1 59 0zm0 0\" data-original=\"#97a7a7\"/><path fill=\"#a5b0bc\" d=\"M44 160a153 153 0 1 1 306 0 153 153 0 0 1-306 0zm0 0\" data-original=\"#a5b0bc\"/><path fill=\"#748A8A\" d=\"M107 450v13s-12 10-17 27c-2 7 4 14 11 14h49c7 1 12-5 12-11v-43zm181 0v13s12 10 17 27c2 7-4 14-11 14h-49c-7 1-12-5-12-11v-43zm0 0\" data-original=\"#748A8A\"/><path fill=\"#ffd3bc\" d=\"M44 160s44 76 153 76c110 0 153-76 153-76l-17-30-136-27-127 24zm0 0\" data-original=\"#ffd3bc\"/><path fill=\"#ffbe9c\" d=\"M197 103 70 127l-26 33s5 9 16 20c6-4 50-29 137-29s131 25 138 29c11-11 15-20 15-20l-17-30zm0 0\" data-original=\"#ffbe9c\"/><path fill=\"${this.color}\" d=\"M271 59c-47-18-100-18-147 0-39 15-80 45-80 101 0 0 48-34 153-34s153 34 153 34c0-56-40-86-79-101zm0 0\" data-original=\"#97a7a7\"/><path fill=\"#ff889e\" d=\"M274 201h-18a7 7 0 1 1 0-15h18a7 7 0 1 1 0 15zm-135 0h-18a7 7 0 1 1 0-15h18a7 7 0 1 1 0 15zm0 0\" data-original=\"#ff889e\"/><path fill=\"#748A8A\" d=\"m185 387-75 13-2 47a39 39 0 0 0 2 0c31-10 57-30 75-60zm0 0\" data-original=\"#748A8A\"/><path fill=\"#00000060\" d=\"M186 386c15-24 22-50 25-67a43 43 0 0 0 0-18h-73s-15 16-24 70l-4 29h67a160 160 0 0 0 9-14zm0 0\" data-original=\"#00000060\"/><path fill=\"#748A8A\" d=\"M174 268c-29-4-46-12-54-17a43 43 0 0 0-45 0h-1a153 153 0 0 0 138 62 43 43 0 0 0-38-45zm0 0\" data-original=\"#748A8A\"/><path fill=\"${this.dark}\" d=\"M171 293c-32-4-53-14-64-21a18 18 0 0 0-19 0c-11 7-32 17-64 21-10 1-18 11-16 21 6 31 25 90 84 109a18 18 0 0 0 11 0c58-19 77-78 83-109 2-10-5-20-15-21zm0 0\" data-original=\"${this.dark}\"/><path fill=\"${this.shield}\" d=\"M97 387c-29-11-43-39-50-62 22-5 38-12 50-18 12 6 29 13 50 18-7 23-21 51-50 62zm0 0\" data-original=\"${this.shield}\"/><path fill=\"${this.dark}\" d=\"m327 444 52-51a6 6 0 0 0 0-9c-9-9-24-9-33 0l-28 27c-9 9-9 24 0 33a6 6 0 0 0 9 0zm0 0\" data-original=\"${this.dark}\"/><path d=\"M100 88a8 8 0 0 0-7 8v18a8 8 0 1 0 15 0V96c0-4-3-8-8-8zm49-20a7 7 0 0 0-8 8v36a8 8 0 1 0 15 0V76a8 8 0 0 0-7-8zm145 20a7 7 0 0 0-7 8v18c0 4 3 8 7 8a8 8 0 0 0 8-8V96a8 8 0 0 0-8-8zm-48-20a8 8 0 0 0-8 8v36a8 8 0 1 0 15 0V76c0-4-3-8-7-8zm-49-6c-4 0-7 3-7 7v36a8 8 0 0 0 15 0V69c0-4-3-7-8-7zm68 120c4 0 8-3 8-8v-13a8 8 0 1 0-15 0v13a8 8 0 0 0 7 8zm-135 0c4 0 7-3 7-8v-13a8 8 0 1 0-15 0v13a8 8 0 0 0 8 8zm85 0a8 8 0 0 0-11 1l-7 2-6-2a7 7 0 0 0-11-1c-3 3-3 7 0 11 4 5 11 7 17 7 7 0 14-2 18-7a8 8 0 0 0 0-11zM95 394a8 8 0 0 0 5 0c32-13 47-44 55-67 1-4-2-9-6-10-18-3-34-9-48-17a7 7 0 0 0-7 0c-14 8-30 14-48 17-4 1-7 6-6 10 7 23 22 54 55 67zm2-78c13 6 26 10 41 14-7 18-19 39-41 49a83 83 0 0 1-40-49c15-4 28-8 40-14zm0 0\" data-original=\"#000000\"/><path d=\"M436 455a29 29 0 0 0-11-19l-45-34 4-4c5-5 5-14 0-19-6-6-13-9-22-9a30 30 0 0 0-16 4l-6-16c-5-9-10-17-18-27a375 375 0 0 0-4-6 86 86 0 0 0-37-27c36-22 63-58 73-101a37 37 0 0 0 0-74 161 161 0 0 0-313 0 37 37 0 0 0 0 74c6 27 19 51 38 71-12 7-30 14-56 17-14 2-25 16-22 30 4 19 12 47 29 71a8 8 0 1 0 12-9c-16-22-23-47-26-64-1-6 3-12 9-13 33-4 54-14 67-22 3-2 8-2 11 0 20 13 43 19 67 22 8 1 10 8 8 15-3 18-12 46-31 69-12 15-28 26-47 32h-6c-12-4-23-10-33-18a8 8 0 1 0-9 11c11 10 24 16 38 21l11 1a694 694 0 0 0-1 19v10c-4 4-13 14-17 28-3 12 6 24 18 24h49c11 0 19-8 19-19v-51c0-2 1-3 3-3h51a3 3 0 0 1 3 3v51c0 11 8 19 19 19h49c12 0 21-12 18-24-4-14-13-24-17-28v-10a699 699 0 0 0-1-25 41 41 0 0 0 10 3c0 8 3 15 9 21a14 14 0 0 0 9 4c4 0 7-1 10-4l4-4 33 46a29 29 0 0 0 19 11s36 7 36 7c10 2 20-8 18-18zm-272-68c16-22 24-45 28-65l1-1 21-1a159 159 0 0 0 40-9c4 6 12 22 18 52l4 29H160l4-5zm142-52 17 23-33 18a473 473 0 0 0-19-66c16 4 27 15 35 25zm32-190c-23-11-48-17-73-21a426 426 0 0 0-136 0 267 267 0 0 0-76 23c5-37 29-64 74-81a195 195 0 0 1 141 0c44 17 69 44 74 81a173 173 0 0 0-4-2zm18-6a22 22 0 0 1 0 43h1a162 162 0 0 0 0-43h-1zM197 15c49 0 91 23 118 60-12-9-26-17-41-23A210 210 0 0 0 80 75c27-37 69-60 117-60zM19 160c0-11 9-20 19-21a163 163 0 0 0 0 43c-10-1-19-10-19-22zm130 121c-14-3-27-8-38-16a25 25 0 0 0-14-3 26 26 0 0 0-4 0c-20-21-33-46-38-73a8 8 0 0 0 0-1l-1-3 21 19a196 196 0 0 0 150 38 7 7 0 1 0-1-15 217 217 0 0 1-27 2c-43 0-81-12-112-36-15-12-25-23-30-30l30-13c36-12 74-16 112-16a320 320 0 0 1 143 29c-10 13-38 45-88 59a8 8 0 0 0-5 9 7 7 0 0 0 9 5c42-12 69-34 85-51a138 138 0 0 1 0 2 146 146 0 0 1-140 119h-7c-2-11-12-20-22-21l-23-4zm5 212a4 4 0 0 1-4 4h-49c-2 0-4-3-3-5 4-14 14-23 14-23a8 8 0 0 0 3-6v-5h39v35zm69-69h-51c-10 0-18 8-18 18v1h-39l1-17a115 115 0 0 0 15-8 111 111 0 0 0 15-11h132v3l2 33h-39v-1c0-10-8-18-18-18zm74 68c1 2-1 5-3 5h-49a4 4 0 0 1-4-4v-35h39a872 872 0 0 1 0 5 8 8 0 0 0 3 6s10 9 14 23zm-4-88-1-12 37-21c3 6 4 10 4 15l-20 20-5 7a26 26 0 0 1-14-6l-1-1v-2zm26 23c0-4 2-8 5-11l28-27a15 15 0 0 1 10-4c4 0 8 1 10 3l-50 49a15 15 0 0 1-3-10zm108 67a1 1 0 0 1-1 0l-36-6a14 14 0 0 1-9-6l-34-47 6-6 42 43c2 3 7 3 10 0a8 8 0 0 0 0-11l-42-43 6-5 47 35a14 14 0 0 1 5 9l6 37zm0 0\" data-original=\"#000000\"/></svg>`})),await obsidian_module.MarkdownRenderer.render(this.app,`You have ${this.filecount} Excalidraw drawings in your Vault earning you a new rank: **${this.rank}**! You've ascended to **${e}**!\\n\\nI've spent the past 3+ years building this plugin. If you appreciate my work, consider supporting me on [Ko-Fi](https://ko-fi.com/zsolt) or join the next [Visual Thinking Workshop](https://visual-thinking-workshop.com) cohort.`,this.contentEl,\"\",this.plugin),this.contentEl.createEl(\"p\",{text:\"\"},(e=>{e.style.textAlign=\"right\",e.createEl(\"button\",{text:\"Close\"}).onclick=()=>this.close()}))}}const _0=\"Xiaolai-Regular-09850c4077f3fffe707905872e0e2460.woff2\",_1=\"Xiaolai-Regular-7eb9fffd1aa890d07d0f88cc82e6cfe4.woff2\",_2=\"Xiaolai-Regular-60a3089806700d379f11827ee9843b6b.woff2\",_3=\"Xiaolai-Regular-6fe5c5973cc06f74b2387a631ea36b88.woff2\",_4=\"Xiaolai-Regular-b96d9226ce77ec94ceca043d712182e6.woff2\",_5=\"Xiaolai-Regular-6ae5b42180ad70b971c91e7eefb8eba2.woff2\",_6=\"Xiaolai-Regular-a4c34be6d42152e64b0df90bc4607f64.woff2\",_7=\"Xiaolai-Regular-c69f61a4ab18d0488c8d1fc12e7028e8.woff2\",_8=\"Xiaolai-Regular-e3fcf5180fd466c8915c4e8069491054.woff2\",_9=\"Xiaolai-Regular-c1f94158256bb1f3bf665b053d895af9.woff2\",_10=\"Xiaolai-Regular-544fc28abe2c5c30e62383fd4dac255f.woff2\",_11=\"Xiaolai-Regular-7197d6fda6cba7c3874c53d6381ca239.woff2\",_12=\"Xiaolai-Regular-70c2eb8d64e71a42a834eb857ea9df51.woff2\",_13=\"Xiaolai-Regular-069e77aac84590e2e991d0a0176d34f2.woff2\",_14=\"Xiaolai-Regular-41521fade99856108931b4768b1b2648.woff2\",_15=\"Xiaolai-Regular-a004ddfcb26e67bd6e678c8ed19e25ce.woff2\",_16=\"Xiaolai-Regular-04b718e5623574919c8b0dea5f301444.woff2\",_17=\"Xiaolai-Regular-7e4bde7e9c7f84cd34d8a845e384c746.woff2\",_18=\"Xiaolai-Regular-23686f7f29da6e8008c36dd3a80c83d6.woff2\",_19=\"Xiaolai-Regular-69c09cc5fa3e55c74fc4821f76909cc3.woff2\",_20=\"Xiaolai-Regular-25b7f38e18f035f96cb5e547bd2bd08c.woff2\",_21=\"Xiaolai-Regular-ba3de316d63c7e339987b16f41a0b879.woff2\",_22=\"Xiaolai-Regular-12b52b58eb3df36804b9a654ec9ee194.woff2\",_23=\"Xiaolai-Regular-b1220a3c61f85cc0408deedb4c5f57a2.woff2\",_24=\"Xiaolai-Regular-4535823663ad81405188a528d8f2b1a2.woff2\",_25=\"Xiaolai-Regular-3eaa538115d76932653c21d8dc28f207.woff2\",_26=\"Xiaolai-Regular-7e929f262f30c8ee78bf398150b1a7cd.woff2\",_27=\"Xiaolai-Regular-73e309718fd16cea44b4d54a33581811.woff2\",_28=\"Xiaolai-Regular-9eb5a99df4e76ac3363453ac9ca288b1.woff2\",_29=\"Xiaolai-Regular-3e63ed8162808a9e425ed80a8bc79114.woff2\",_30=\"Xiaolai-Regular-cb17fc3db95f6d139afc9d31a8e93293.woff2\",_31=\"Xiaolai-Regular-c8b71798409ccc126ee264a00aadcf21.woff2\",_32=\"Xiaolai-Regular-11c345711937f0ba4b8f7b6b919c8440.woff2\",_33=\"Xiaolai-Regular-e480d9c614742d05f0e78f274f1e69e6.woff2\",_34=\"Xiaolai-Regular-95429962233afd82db1c27df1500a28c.woff2\",_35=\"Xiaolai-Regular-2cf96d082d35ea3d8106851223ad0d16.woff2\",_36=\"Xiaolai-Regular-2d43040e86ff03ba677f6f9c04cd0805.woff2\",_37=\"Xiaolai-Regular-2a26d20a23b00898ce82f09d2ee47c3f.woff2\",_38=\"Xiaolai-Regular-a365e82ed54697a52f27adcea1315fe8.woff2\",_39=\"Xiaolai-Regular-f5d079153c99a25b9be5b8583c4cc8a7.woff2\",_40=\"Xiaolai-Regular-10a7ae9a371830a80c3d844acf1c02d7.woff2\",_41=\"Xiaolai-Regular-e4bca6cfa53e499cae0a6be4894a90e9.woff2\",_42=\"Xiaolai-Regular-60a41c7e1c68f22424e6d22df544bc82.woff2\",_43=\"Xiaolai-Regular-7ab2bed91166a9dca83a5ebfbe2a7f38.woff2\",_44=\"Xiaolai-Regular-670ba603758d94268e8606f240a42e12.woff2\",_45=\"Xiaolai-Regular-e656f091b9dc4709722c9f4b84d3c797.woff2\",_46=\"Xiaolai-Regular-15dc6d811c9cd078f9086a740d5a1038.woff2\",_47=\"Xiaolai-Regular-f0f13b5c60e0af5553bd359f5513be1b.woff2\",_48=\"Xiaolai-Regular-8c2f33cee3993174f7e87c28e4bf42ee.woff2\",_49=\"Xiaolai-Regular-761d05e3cd968cf574166867998ef06a.woff2\",_50=\"Xiaolai-Regular-642b26e2e5f5fb780b51b593dbc8c851.woff2\",_51=\"Xiaolai-Regular-5572b3513ba8df57a3d5d7303ee6b11b.woff2\",_52=\"Xiaolai-Regular-3c9de2ae0ea4bc91a510942dfa4be8d2.woff2\",_53=\"Xiaolai-Regular-671a2c20b1eb9e4ef8a192833940e319.woff2\",_54=\"Xiaolai-Regular-4dc6d5f188d5c96d44815cd1e81aa885.woff2\",_55=\"Xiaolai-Regular-ce4884f96f11589608b76b726a755803.woff2\",_56=\"Xiaolai-Regular-8f476c4c99813d57cbe6eca4727388ad.woff2\",_57=\"Xiaolai-Regular-5935a5775af3d5c6307ac667bd9ae74e.woff2\",_58=\"Xiaolai-Regular-79f007c1c6d07557120982951ea67998.woff2\",_59=\"Xiaolai-Regular-bafff7a14c27403dcc6cf1432e8ea836.woff2\",_60=\"Xiaolai-Regular-543fa46ace099a7099dad69123399400.woff2\",_61=\"Xiaolai-Regular-4ddc14ed3eb0c3e46364317dfc0144a3.woff2\",_62=\"Xiaolai-Regular-0fa55a080fcd0f9dc2e0b0058b793df8.woff2\",_63=\"Xiaolai-Regular-66493ba5a8367f2928812f446f47b56a.woff2\",_64=\"Xiaolai-Regular-57862b464a55b18c7bf234ce22907d73.woff2\",_65=\"Xiaolai-Regular-8d3bcabb847b56243b16afe62adaaf21.woff2\",_66=\"Xiaolai-Regular-2b77e8ebfb2367ab2662396a60e7d320.woff2\",_67=\"Xiaolai-Regular-0b5d723fdc4e249c140f0909e87d03b4.woff2\",_68=\"Xiaolai-Regular-cdbce89e82cc1ab53a2decbf5819278f.woff2\",_69=\"Xiaolai-Regular-739bc1a567439c7cffcd1614644593d2.woff2\",_70=\"Xiaolai-Regular-72252d73220fa3cd856677888cee1635.woff2\",_71=\"Xiaolai-Regular-08e0dc436ad0ad61ba5558db0674d762.woff2\",_72=\"Xiaolai-Regular-cf6ff4e0f491ca0cf3038187a997b9b4.woff2\",_73=\"Xiaolai-Regular-9cfb2a77a4e45025105ad29a1748b90d.woff2\",_74=\"Xiaolai-Regular-450da755d5bcb70906e1295e559b9602.woff2\",_75=\"Xiaolai-Regular-0986d134c05864f5025962eef9f994a0.woff2\",_76=\"Xiaolai-Regular-1ee544f0f1dac422545c505baa788992.woff2\",_77=\"Xiaolai-Regular-4806e761d750087c2d734fc64596eaff.woff2\",_78=\"Xiaolai-Regular-33432927cd87d40cfe393c7482bf221f.woff2\",_79=\"Xiaolai-Regular-be549ab72f0719d606a5c01e2c0219b6.woff2\",_80=\"Xiaolai-Regular-019d66dcad46dc156b162d267f981c20.woff2\",_81=\"Xiaolai-Regular-b5c1596551c256e0e9cf02028595b092.woff2\",_82=\"Xiaolai-Regular-e5f453bb04da18eed01675eeebd88bf8.woff2\",_83=\"Xiaolai-Regular-cf2cc71752631e579e35b0e423bf2638.woff2\",_84=\"Xiaolai-Regular-6f3256af8454371776bc46670d33cc65.woff2\",_85=\"Xiaolai-Regular-23f228f3999c01983860012330e4be08.woff2\",_86=\"Xiaolai-Regular-21430ee05a1248901da8d0de08744d47.woff2\",_87=\"Xiaolai-Regular-5330a2119a716e4e7224ed108b085dac.woff2\",_88=\"Xiaolai-Regular-cd145ce4a0ea18469358df53c207bc1b.woff2\",_89=\"Xiaolai-Regular-36925dfe329a45086cbb7fc5c20d45ac.woff2\",_90=\"Xiaolai-Regular-4bfaa8ffa64c5ee560aa2daba7c9cbd3.woff2\",_91=\"Xiaolai-Regular-112c051027b2d766c19a519f6ee1f4f7.woff2\",_92=\"Xiaolai-Regular-5b0ed6971aaab9c8ad563230bd5471a7.woff2\",_93=\"Xiaolai-Regular-98f2ad84457de7f3740d9920b8fa8667.woff2\",_94=\"Xiaolai-Regular-733171b4ffcd17ea1fe1c0ba627173bf.woff2\",_95=\"Xiaolai-Regular-684d65f1793cac449dde5d59cb3c47fb.woff2\",_96=\"Xiaolai-Regular-cbaaefaaf326668277aa24dfa93c4d28.woff2\",_97=\"Xiaolai-Regular-58fd02350d0bc52cf1ca3bb32ce9766e.woff2\",_98=\"Xiaolai-Regular-7ccce86603f80a099ddb0cb21d4ae3e3.woff2\",_99=\"Xiaolai-Regular-3717077e38f98d89eae729b6c14e56dc.woff2\",_100=\"Xiaolai-Regular-dbea1af6dcd9860be40c3d18254338f5.woff2\",_101=\"Xiaolai-Regular-4a0fdb40036e87b40aa08dd30584cb85.woff2\",_102=\"Xiaolai-Regular-0f626226ba1272e832aea87bafd9720e.woff2\",_103=\"Xiaolai-Regular-938d90c10ff8c20386af7f242c05d6b0.woff2\",_104=\"Xiaolai-Regular-b6d128682ee29e471486354d486a1b90.woff2\",_105=\"Xiaolai-Regular-e51ef413167c6e14e0c0fdcc585f2fc9.woff2\",_106=\"Xiaolai-Regular-9d81066dd2b337c938df6e90380a00dc.woff2\",_107=\"Xiaolai-Regular-20e7bf72fa05de9adf7dbcc7bf51dde6.woff2\",_108=\"Xiaolai-Regular-4095eb84ef3874e2600247bee0b04026.woff2\",_109=\"Xiaolai-Regular-4ee10ae43505e2e0bc62656ced49c0fa.woff2\",_110=\"Xiaolai-Regular-7494dc504ae00ee9cd0505f990f88c5d.woff2\",_111=\"Xiaolai-Regular-8de5b863cb50dfefdd07cb11c774d579.woff2\",_112=\"Xiaolai-Regular-3e1f8f654357353bf0e04ba5c34b5f7f.woff2\",_113=\"Xiaolai-Regular-2e33e8dc771ef5e1d9127d60a6b73679.woff2\",_114=\"Xiaolai-Regular-173945821411c09f70c95f98d590e697.woff2\",_115=\"Xiaolai-Regular-b358f7a51ece39a3247942b1feabdb29.woff2\",_116=\"Xiaolai-Regular-23ad2d71b280f00b1363b95b7bea94eb.woff2\",_117=\"Xiaolai-Regular-5882ffa04f32584d26109137e2da4352.woff2\",_118=\"Xiaolai-Regular-a203b91dad570bf05a58c3c3ddb529bf.woff2\",_119=\"Xiaolai-Regular-bd77e3c7f9e0b072d96af37f73d1aa32.woff2\",_120=\"Xiaolai-Regular-5a45d991244d4c7140217e1e5f5ca4f4.woff2\",_121=\"Xiaolai-Regular-f56414bf9bced67990def8660e306759.woff2\",_122=\"Xiaolai-Regular-583d166e56ba0de4b77eabb47ef67839.woff2\",_123=\"Xiaolai-Regular-7f855356ab893b0d2b9c1c83b8116f0e.woff2\",_124=\"Xiaolai-Regular-b57aaedfd8ebdf3931f25119dc6a5eb2.woff2\",_125=\"Xiaolai-Regular-b6fd38ca30869792244804b04bc058da.woff2\",_126=\"Xiaolai-Regular-452225341522a7942f0f6aab1a5c91a3.woff2\",_127=\"Xiaolai-Regular-866fa7613df6b3fd272bcfd4530c0bb9.woff2\",_128=\"Xiaolai-Regular-52a84a22fd1369bffeaf21da2d6158dc.woff2\",_129=\"Xiaolai-Regular-829615148e6357d826b9242eb7fbbd1e.woff2\",_130=\"Xiaolai-Regular-c99eda15fc26a2941579560f76c3a5cf.woff2\",_131=\"Xiaolai-Regular-395c35dd584b56b0789f58a0559beaf1.woff2\",_132=\"Xiaolai-Regular-203b0e569e3b14aac86a003dc3fa523e.woff2\",_133=\"Xiaolai-Regular-51a0e808bbc8361236ac521a119758a3.woff2\",_134=\"Xiaolai-Regular-6e092f71c1e634059ada0e52abadce67.woff2\",_135=\"Xiaolai-Regular-0f7fb1e0d5015bb1371343153ecf7ce3.woff2\",_136=\"Xiaolai-Regular-d0cf73942fea1c74edbdf0b3011f4656.woff2\",_137=\"Xiaolai-Regular-968cffdc8ee679da094e77ebf50f58ef.woff2\",_138=\"Xiaolai-Regular-7a07ddc0f0c0f5f4a9bad6ee3dda66b5.woff2\",_139=\"Xiaolai-Regular-ec181b795ac1fb5a50d700b6e996d745.woff2\",_140=\"Xiaolai-Regular-cfb211578629b7e8153b37240de6a9d5.woff2\",_141=\"Xiaolai-Regular-59e9ff77b0efaf684bc09274fb6908c9.woff2\",_142=\"Xiaolai-Regular-2adbc89c11e65905393d3dfc468b9d5b.woff2\",_143=\"Xiaolai-Regular-70e811fd7994e61f408c923de6ddd078.woff2\",_144=\"Xiaolai-Regular-c4a687ac4f0c2766eefc9f77ed99cddf.woff2\",_145=\"Xiaolai-Regular-51502f1206be09c565f1547c406e9558.woff2\",_146=\"Xiaolai-Regular-1fdc0c67ed57263a80fd108c1f6ccf24.woff2\",_147=\"Xiaolai-Regular-e11567fd2accf9957cd0d3c2be937d87.woff2\",_148=\"Xiaolai-Regular-20cc1bbf50e7efb442756cb605672c1f.woff2\",_149=\"Xiaolai-Regular-5d2898fbc097a7e24c6f38d80587621e.woff2\",_150=\"Xiaolai-Regular-ac9ceb44437becc3e9c4dbfebab7fc2d.woff2\",_151=\"Xiaolai-Regular-c16ed9740b85badf16e86ea782a3062f.woff2\",_152=\"Xiaolai-Regular-aa0d470430e6391eca720c7cfa44446f.woff2\",_153=\"Xiaolai-Regular-f2b54d4e7be0eaefe1c2c56836fa5368.woff2\",_154=\"Xiaolai-Regular-99a16ef6a64934d5781933dbd9c46b2e.woff2\",_155=\"Xiaolai-Regular-c40533fdf4cc57177b12803598af7e59.woff2\",_156=\"Xiaolai-Regular-91ddb2969bf2d31ba02ad82998d1314c.woff2\",_157=\"Xiaolai-Regular-774d4f764a1299da5d28ec2f2ffe0d69.woff2\",_158=\"Xiaolai-Regular-7718fe60986d8b42b1be9c5ace5ccf25.woff2\",_159=\"Xiaolai-Regular-aa5c9ca6cf4fba00433b7aa3fa10671a.woff2\",_160=\"Xiaolai-Regular-4f50e5136e136527280bc902c5817561.woff2\",_161=\"Xiaolai-Regular-093b9ef39a46ceae95a1df18a0a3a326.woff2\",_162=\"Xiaolai-Regular-a0ca5df4258213d7fc9fce80f65ce760.woff2\",_163=\"Xiaolai-Regular-d2666cbed13462c5dc36fa2f15c202ca.woff2\",_164=\"Xiaolai-Regular-1e6fd68f1f3902ce48ce8c69df385622.woff2\",_165=\"Xiaolai-Regular-87599f94b6cc129d505b375798d0d751.woff2\",_166=\"Xiaolai-Regular-06c77b8c66e51ed6c63ccb502dd8b8af.woff2\",_167=\"Xiaolai-Regular-13ae07ed2e272d26d59bc0691cd7117a.woff2\",_168=\"Xiaolai-Regular-353f33792a8f60dc69323ddf635a269e.woff2\",_169=\"Xiaolai-Regular-0facdf1ea213ba40261022f5d5ed4493.woff2\",_170=\"Xiaolai-Regular-f8ee5d36068a42b51d0e4a1116cfcec1.woff2\",_171=\"Xiaolai-Regular-79d494361ae093b69e74ee9dbe65bfd4.woff2\",_172=\"Xiaolai-Regular-74e2263a91439c25b91d5132ce9f4d62.woff2\",_173=\"Xiaolai-Regular-ee8bae97908d5147b423f77ad0d3c1bb.woff2\",_174=\"Xiaolai-Regular-56467a5c8840c4d23a60b2f935114848.woff2\",_175=\"Xiaolai-Regular-145aa02cdd91946e67dc934e1acffe75.woff2\",_176=\"Xiaolai-Regular-54acdfc2166ad7fcbd074f75fd4a56ba.woff2\",_177=\"Xiaolai-Regular-29cec36cd205b211da97acabaa62f055.woff2\",_178=\"Xiaolai-Regular-3756e81d3e149cf6099163ee79944fec.woff2\",_179=\"Xiaolai-Regular-8e9f97f01034820170065b2921b4fb5e.woff2\",_180=\"Xiaolai-Regular-13d2887ec8ee73c43acdabc52a05af7b.woff2\",_181=\"Xiaolai-Regular-72536a3d71b694a0d53dd90ddceae41e.woff2\",_182=\"Xiaolai-Regular-603aefd23e350ba7eb124273e3c9bcf1.woff2\",_183=\"Xiaolai-Regular-095c169f3314805276f603a362766abd.woff2\",_184=\"Xiaolai-Regular-9544732d2e62d1a429674f8ee41b5d3a.woff2\",_185=\"Xiaolai-Regular-d3716376641d615e2995605b29bca7b6.woff2\",_186=\"Xiaolai-Regular-5a1ce3117cfe90c48e8fb4a9a00f694d.woff2\",_187=\"Xiaolai-Regular-b7d203b051eff504ff59ddca7576b6a9.woff2\",_188=\"Xiaolai-Regular-4a38cc3e9cf104e69ba246d37f8cf135.woff2\",_189=\"Xiaolai-Regular-982b630266d87db93d2539affb1275c6.woff2\",_190=\"Xiaolai-Regular-9592bfc861f07bcb8d75c196b370e548.woff2\",_191=\"Xiaolai-Regular-a7accba310e821da5505f71c03b76bdb.woff2\",_192=\"Xiaolai-Regular-dac48066b5883d8b4551fc584f0c2a3e.woff2\",_193=\"Xiaolai-Regular-a1f916d6039285c4ffb900cd654e418f.woff2\",_194=\"Xiaolai-Regular-95bfd249da4902577b4b7d76ebdd0b44.woff2\",_195=\"Xiaolai-Regular-93fc8f28a33234bcadf1527cafabd502.woff2\",_196=\"Xiaolai-Regular-903bb6865f3452e2fda42e3a25547bc5.woff2\",_197=\"Xiaolai-Regular-4aca6a43e59aceee2166b0c7e4e85ef1.woff2\",_198=\"Xiaolai-Regular-24476a126f129212beb33f66853ea151.woff2\",_199=\"Xiaolai-Regular-1b611157cd46bb184d4fa4dae2d6a2b8.woff2\",_200=\"Xiaolai-Regular-56a32a7689abd0326e57c10c6c069bb4.woff2\",_201=\"Xiaolai-Regular-3cc70dbb64df5b21f1326cc24dee2195.woff2\",_202=\"Xiaolai-Regular-f6032fc06eb20480f096199713f70885.woff2\",_203=\"Xiaolai-Regular-e2ead7ea7da0437f085f42ffc05f8d13.woff2\",_204=\"Xiaolai-Regular-97f7f48ce90c9429bf32ae51469db74d.woff2\",_205=\"Xiaolai-Regular-24a21c1e4449222e8d1898d69ff3a404.woff2\",_206=\"Xiaolai-Regular-726303e0774b4e678bff8c2deb6ca603.woff2\",_207=\"Xiaolai-Regular-5a7fac4b8b23a6e4e5ba0c9bf1756c91.woff2\",_208=\"Xiaolai-Regular-2b7441d46298788ac94e610ffcc709b6.woff2\",XiaolaiFontFaces=[{uri:_0,descriptors:{unicodeRange:\"U+f9b8-fa6d,U+fe32,U+fe45-fe4f,U+ff02-ff0b,U+ff0d-ff1e,U+ff20-ff2a\"}},{uri:_1,descriptors:{unicodeRange:\"U+20dd-20de,U+25ef,U+ff2b-ffbe,U+ffc2-ffc7,U+ffca-ffcf,U+ffd2-ffd7,U+ffda-ffdc,U+ffe0-ffe6,U+ffe8-ffee\"}},{uri:_2,descriptors:{unicodeRange:\"U+d7eb-d7fb,U+f900-f9b7\"}},{uri:_3,descriptors:{unicodeRange:\"U+d6f2-d7a3,U+d7b0-d7c6,U+d7cb-d7ea\"}},{uri:_4,descriptors:{unicodeRange:\"U+d609-d6f1\"}},{uri:_5,descriptors:{unicodeRange:\"U+d520-d608\"}},{uri:_6,descriptors:{unicodeRange:\"U+d437-d51f\"}},{uri:_7,descriptors:{unicodeRange:\"U+d34e-d436\"}},{uri:_8,descriptors:{unicodeRange:\"U+d265-d34d\"}},{uri:_9,descriptors:{unicodeRange:\"U+d17c-d264\"}},{uri:_10,descriptors:{unicodeRange:\"U+d093-d17b\"}},{uri:_11,descriptors:{unicodeRange:\"U+cfaa-d092\"}},{uri:_12,descriptors:{unicodeRange:\"U+cec1-cfa9\"}},{uri:_13,descriptors:{unicodeRange:\"U+cdd8-cec0\"}},{uri:_14,descriptors:{unicodeRange:\"U+ccf1-cdd7\"}},{uri:_15,descriptors:{unicodeRange:\"U+cc08-ccf0\"}},{uri:_16,descriptors:{unicodeRange:\"U+cb43-cc07\"}},{uri:_17,descriptors:{unicodeRange:\"U+ca83-cb42\"}},{uri:_18,descriptors:{unicodeRange:\"U+c9a1-ca82\"}},{uri:_19,descriptors:{unicodeRange:\"U+c8b8-c9a0\"}},{uri:_20,descriptors:{unicodeRange:\"U+c7cf-c8b7\"}},{uri:_21,descriptors:{unicodeRange:\"U+c6e6-c7ce\"}},{uri:_22,descriptors:{unicodeRange:\"U+c5fd-c6e5\"}},{uri:_23,descriptors:{unicodeRange:\"U+c514-c5fc\"}},{uri:_24,descriptors:{unicodeRange:\"U+c42b-c513\"}},{uri:_25,descriptors:{unicodeRange:\"U+c341-c34e,U+c350-c42a\"}},{uri:_26,descriptors:{unicodeRange:\"U+c258-c340\"}},{uri:_27,descriptors:{unicodeRange:\"U+c16f-c257\"}},{uri:_28,descriptors:{unicodeRange:\"U+c086-c16e\"}},{uri:_29,descriptors:{unicodeRange:\"U+bf9d-c085\"}},{uri:_30,descriptors:{unicodeRange:\"U+beb4-bf9c\"}},{uri:_31,descriptors:{unicodeRange:\"U+bdcb-beb3\"}},{uri:_32,descriptors:{unicodeRange:\"U+bce2-bdca\"}},{uri:_33,descriptors:{unicodeRange:\"U+bbf9-bce1\"}},{uri:_34,descriptors:{unicodeRange:\"U+bb10-bbf8\"}},{uri:_35,descriptors:{unicodeRange:\"U+ba27-bb0f\"}},{uri:_36,descriptors:{unicodeRange:\"U+b93e-ba26\"}},{uri:_37,descriptors:{unicodeRange:\"U+b855-b93d\"}},{uri:_38,descriptors:{unicodeRange:\"U+b76c-b854\"}},{uri:_39,descriptors:{unicodeRange:\"U+b683-b76b\"}},{uri:_40,descriptors:{unicodeRange:\"U+b59a-b682\"}},{uri:_41,descriptors:{unicodeRange:\"U+b4b1-b599\"}},{uri:_42,descriptors:{unicodeRange:\"U+11fb-11ff,U+b3cd-b4b0\"}},{uri:_43,descriptors:{unicodeRange:\"U+11e6-11fa,U+b2f9-b3cc\"}},{uri:_44,descriptors:{unicodeRange:\"U+11d1-11e5,U+b225-b2f8\"}},{uri:_45,descriptors:{unicodeRange:\"U+11bc-11d0,U+b151-b224\"}},{uri:_46,descriptors:{unicodeRange:\"U+11a7-11bb,U+b07d-b150\"}},{uri:_47,descriptors:{unicodeRange:\"U+1191-11a6,U+afaa-b07c\"}},{uri:_48,descriptors:{unicodeRange:\"U+117c-1190,U+aed6-afa9\"}},{uri:_49,descriptors:{unicodeRange:\"U+1167-117b,U+ae02-aed5\"}},{uri:_50,descriptors:{unicodeRange:\"U+1152-115e,U+1160-1166,U+ad2d-ae01\"}},{uri:_51,descriptors:{unicodeRange:\"U+113d-1151,U+ac59-ad2c\"}},{uri:_52,descriptors:{unicodeRange:\"U+1100-113c,U+9f95-9f98,U+9f9c-9f9e,U+9fa1-9fce,U+9fd0,U+a960-a97c,U+ac00-ac58\"}},{uri:_53,descriptors:{unicodeRange:\"U+9771-9772,U+9775,U+9777-977b,U+977d-9784,U+9786-978a,U+978c,U+978e-9790,U+9793,U+9795-9797,U+9799-979f,U+97a1-97a2,U+97a4-97aa,U+97ac,U+97ae,U+97b0-97b1,U+97b3,U+97b5-97e5,U+97e8,U+97ee-97f2,U+97f4,U+97f7-982d\"}},{uri:_54,descriptors:{unicodeRange:\"U+9491,U+9496,U+9498,U+94c7,U+94cf,U+94d3-94d4,U+94da,U+94e6,U+94fb,U+951c,U+9520,U+9527,U+9533,U+953d,U+9543,U+9548,U+954b,U+9555,U+955a,U+9560,U+956e,U+9574-9575,U+9577-957e,U+9580-95e7,U+95ec,U+95ff,U+9607,U+9613,U+9618,U+961b,U+961e,U+9620,U+9623-9629,U+962b-962d,U+962f-9630,U+9637-963a,U+963e,U+9641,U+9643,U+964a,U+964e-964f,U+9651-9653,U+9656-965a,U+965c-965e,U+9660,U+9663,U+9665-9666,U+966b,U+966d-9671,U+9673,U+9678-9684,U+9687,U+9689-968a,U+968c,U+968e,U+9691-9693\"}},{uri:_55,descriptors:{unicodeRange:\"U+923c-9273,U+9275-928d,U+928f-92ad,U+92af-92c7,U+92c9-92ee\"}},{uri:_56,descriptors:{unicodeRange:\"U+9159,U+915b-915c,U+915f-9160,U+9166-9168,U+916b,U+916d,U+9173,U+917a-917c,U+9180-9184,U+9186,U+9188,U+918a,U+918e-918f,U+9193-9199,U+919c-91a1,U+91a4-91a9,U+91ab-91ac,U+91b0-91b3,U+91b6-91b9,U+91bb-91c6,U+91c8,U+91cb,U+91d0,U+91d2-91db,U+91dd-923b\"}},{uri:_57,descriptors:{unicodeRange:\"U+902b-902c,U+9030-9034,U+9037,U+9039-903a,U+903d,U+903f-9040,U+9043,U+9045-9046,U+9048-904c,U+904e,U+9054-9056,U+9059-905a,U+905c-9061,U+9064,U+9066-9067,U+9069-906c,U+906f-9073,U+9076-907c,U+907e,U+9081,U+9084-9087,U+9089-908a,U+908c-9090,U+9092,U+9094,U+9096,U+9098,U+909a,U+909c,U+909e-90a0,U+90a4-90a5,U+90a7-90a9,U+90ab,U+90ad,U+90b2,U+90b7,U+90bc-90bd,U+90bf-90c0,U+90c2-90c3,U+90c6,U+90c8-90c9,U+90cb-90cd,U+90d2,U+90d4-90d6,U+90d8-90da,U+90de-90e0,U+90e3-90e5,U+90e9-90ea,U+90ec,U+90ee,U+90f0-90f3,U+90f5-90f7,U+90f9-90fc,U+90ff-9101,U+9103,U+9105-9118,U+911a-911d,U+911f-9121,U+9124-912e,U+9130,U+9132-9138,U+913a-9142,U+9144-9145,U+9147-9148,U+9151,U+9153-9156,U+9158\"}},{uri:_58,descriptors:{unicodeRange:\"U+8f03-8f65,U+8f6a,U+8f80,U+8f8c,U+8f92,U+8f9d,U+8fa0-8fa2,U+8fa4-8fa7,U+8faa,U+8fac-8faf,U+8fb2-8fb5,U+8fb7-8fb8,U+8fba-8fbc,U+8fbf-8fc0,U+8fc3,U+8fc6,U+8fc9-8fcd,U+8fcf,U+8fd2,U+8fd6-8fd7,U+8fda,U+8fe0-8fe1,U+8fe3,U+8fe7,U+8fec,U+8fef,U+8ff1-8ff2,U+8ff4-8ff6,U+8ffa-8ffc,U+8ffe-8fff,U+9007-9008,U+900c,U+900e,U+9013,U+9015,U+9018-9019,U+901c,U+9023-9025,U+9027-902a\"}},{uri:_59,descriptors:{unicodeRange:\"U+8d03-8d1c,U+8d20,U+8d51-8d52,U+8d57,U+8d5f,U+8d65,U+8d68-8d6a,U+8d6c,U+8d6e-8d6f,U+8d71-8d72,U+8d78-8d80,U+8d82-8d83,U+8d86-8d89,U+8d8c-8d90,U+8d92-8d93,U+8d95-8d9e,U+8da0-8da2,U+8da4-8db0,U+8db2,U+8db6-8db7,U+8db9,U+8dbb,U+8dbd,U+8dc0-8dc2,U+8dc5,U+8dc7-8dca,U+8dcd,U+8dd0,U+8dd2-8dd5,U+8dd8-8dd9,U+8ddc,U+8de0-8de2,U+8de5-8de7,U+8de9,U+8ded-8dee,U+8df0-8df2,U+8df4,U+8df6,U+8dfc,U+8dfe-8e04,U+8e06-8e08,U+8e0b,U+8e0d-8e0e,U+8e10-8e13,U+8e15-8e1c,U+8e20-8e21,U+8e24-8e28,U+8e2b,U+8e2d,U+8e30,U+8e32-8e34,U+8e36-8e38,U+8e3b-8e3c,U+8e3e-8e3f,U+8e43,U+8e45-8e46\"}},{uri:_60,descriptors:{unicodeRange:\"U+8bea,U+8c09,U+8c1e,U+8c38-8c40,U+8c42-8c45,U+8c48,U+8c4a-8c4b,U+8c4d-8c54,U+8c56-8c59,U+8c5b-8c60,U+8c63-8c69,U+8c6c-8c72,U+8c74-8c77,U+8c7b-8c81,U+8c83-8c84,U+8c86-8c88,U+8c8b,U+8c8d-8c93,U+8c95-8c97,U+8c99-8d02\"}},{uri:_61,descriptors:{unicodeRange:\"U+8a64-8a78,U+8a7a-8a88,U+8a8b-8a92,U+8a94-8b06,U+8b08-8b1b\"}},{uri:_62,descriptors:{unicodeRange:\"U+8987-89c0,U+89c3,U+89cd,U+89d3-89d5,U+89d7-89d9,U+89db,U+89dd,U+89df-89e2,U+89e4,U+89e7-89ea,U+89ec-89ee,U+89f0-89f2,U+89f4-89ff,U+8a01-8a06,U+8a08-8a3d,U+8a3f-8a47,U+8a49-8a63\"}},{uri:_63,descriptors:{unicodeRange:\"U+87e3-87e4,U+87e6-87e9,U+87eb-87ed,U+87ef-87f8,U+87fa-87fd,U+87ff-8802,U+8804-8809,U+880b-8812,U+8814,U+8817-881a,U+881c-8820,U+8823-8831,U+8833-8838,U+883a-883b,U+883d-883f,U+8841-8843,U+8846-884b,U+884e-8853,U+8855-8856,U+8858,U+885a-8860,U+8866-8867,U+886a,U+886d,U+886f,U+8871,U+8873-8876,U+8878-887c,U+8880,U+8883,U+8886-8887,U+8889-888a,U+888c,U+888e-8891,U+8893-8895,U+8897-889b,U+889d-88a1,U+88a3,U+88a5-88aa,U+88ac,U+88ae-88b0,U+88b2-88b6,U+88b8-88bb\"}},{uri:_64,descriptors:{unicodeRange:\"U+86e7-86e8,U+86ea-86ec,U+86ef,U+86f5-86f7,U+86fa-86fd,U+86ff,U+8701,U+8704-8706,U+870b-870c,U+870e-8711,U+8714,U+8716,U+8719,U+871b,U+871d,U+871f-8720,U+8724,U+8726-8728,U+872a-872d,U+872f-8730,U+8732-8733,U+8735-8736,U+8738-873a,U+873c-873d,U+8740-8746,U+874a-874b,U+874d,U+874f-8752,U+8754-8756,U+8758,U+875a-875f,U+8761-8762,U+8766-876d,U+876f,U+8771-8773,U+8775,U+8777-877a,U+877f-8781,U+8784,U+8786-8787,U+8789-878a,U+878c,U+878e-8792,U+8794-8796,U+8798-879e,U+87a0-87a7,U+87a9-87aa,U+87ae,U+87b0-87b2,U+87b4,U+87b6-87b9,U+87bb-87bc,U+87be-87bf,U+87c1-87c5,U+87c7-87c9,U+87cc-87d0,U+87d4-87da,U+87dc-87df,U+87e1-87e2\"}},{uri:_65,descriptors:{unicodeRange:\"U+8604,U+8606-8610,U+8612-8615,U+8617-8626,U+8628,U+862a-8637,U+8639-863b,U+863d-864c,U+8652-8653,U+8655-8659,U+865b-865d,U+865f-8661,U+8663-866a,U+866d,U+866f-8670,U+8672-8678,U+8683-8689,U+868e-8692,U+8694,U+8696-869b,U+869e-86a2,U+86a5-86a6,U+86ab,U+86ad-86ae,U+86b2-86b3,U+86b7-86b9,U+86bb-86bf,U+86c1-86c3,U+86c5,U+86c8,U+86cc-86cd,U+86d2-86d3,U+86d5-86d7,U+86da,U+86dc-86dd,U+86e0-86e3,U+86e5-86e6\"}},{uri:_66,descriptors:{unicodeRange:\"U+8456,U+8458,U+845d-8460,U+8462,U+8464-8468,U+846a,U+846e-8470,U+8472,U+8474,U+8477,U+8479,U+847b-8481,U+8483-8486,U+848a,U+848d,U+848f-8496,U+8498,U+849a-849b,U+849d-84a0,U+84a2-84ae,U+84b0-84b1,U+84b3,U+84b5-84b7,U+84bb-84bc,U+84be,U+84c0,U+84c2-84c3,U+84c5-84c8,U+84cb-84cc,U+84ce-84cf,U+84d2,U+84d4-84d5,U+84d7-84dc,U+84de,U+84e1-84e2,U+84e4,U+84e7-84eb,U+84ed-84ef,U+84f1-84fb,U+84fd-84fe,U+8500-850b,U+850d-8510,U+8512,U+8514-8516,U+8518-8519,U+851b-851e,U+8520,U+8522-852a,U+852d-8536,U+853e-8542,U+8544-8547,U+854b-854f\"}},{uri:_67,descriptors:{unicodeRange:\"U+82c2-82c3,U+82c5-82c6,U+82c9,U+82d0,U+82d6,U+82d9-82da,U+82dd,U+82e2,U+82e7-82ea,U+82ec-82ee,U+82f0,U+82f2-82f3,U+82f5-82f6,U+82f8,U+82fa,U+82fc-8300,U+830a-830b,U+830d,U+8310,U+8312-8313,U+8316,U+8318-8319,U+831d-8326,U+8329-832a,U+832e,U+8330,U+8332,U+8337,U+833b,U+833d-833f,U+8341-8342,U+8344-8345,U+8348,U+834a-834e,U+8353,U+8355-8359,U+835d,U+8362,U+8370-8376,U+8379-837a,U+837e-8384,U+8387-8388,U+838a-838d,U+838f-8391,U+8394-8397,U+8399-839a,U+839d,U+839f,U+83a1-83a7,U+83ac-83af,U+83b5,U+83bb,U+83be-83bf,U+83c2-83c4,U+83c6,U+83c8-83c9,U+83cb,U+83cd-83ce,U+83d0-83d3,U+83d5,U+83d7,U+83d9-83db,U+83de,U+83e2-83e4,U+83e6-83e8,U+83eb-83ef,U+83f3-83f7,U+83fa-83fc,U+83fe-8400,U+8402,U+8405,U+8407-840a,U+8410,U+8412-8417,U+8419-841b,U+841e-8423,U+8429-8430,U+8432-8437,U+8439-843b,U+843e-8445,U+8447-8450,U+8452-8455\"}},{uri:_68,descriptors:{unicodeRange:\"U+81a4-81a5,U+81a7,U+81a9,U+81ab-81b2,U+81b4-81b9,U+81bc-81bf,U+81c4-81c5,U+81c7-81c9,U+81cb,U+81cd-81e2,U+81e4-81e6,U+81e8-81e9,U+81eb,U+81ee-81f2,U+81f5-81fa,U+81fd,U+81ff,U+8203,U+8207-820b,U+820e-820f,U+8211,U+8213,U+8215-821a,U+821d,U+8220,U+8224-8227,U+8229,U+822e,U+8232,U+823a,U+823c-823d,U+823f-8243,U+8245-8246,U+8248,U+824a,U+824c-824e,U+8250-8257,U+8259,U+825b-825e,U+8260-8267,U+8269-826d,U+8271,U+8275-8278,U+827b-827c,U+8280-8281,U+8283,U+8285-8287,U+8289,U+828c,U+8290,U+8293-8296,U+829a-829b,U+829e,U+82a0,U+82a2-82a3,U+82a7,U+82b2,U+82b5-82b6,U+82ba-82bc,U+82bf-82c0\"}},{uri:_69,descriptors:{unicodeRange:\"U+8059,U+805b-8068,U+806b-8070,U+8072-807e,U+8081-8082,U+8085,U+8088,U+808a,U+808d-8092,U+8094-8095,U+8097,U+8099,U+809e,U+80a3,U+80a6-80a8,U+80ac,U+80b0,U+80b3,U+80b5-80b6,U+80b8-80b9,U+80bb,U+80c5,U+80c7-80cb,U+80cf-80d5,U+80d8,U+80df-80e0,U+80e2-80e3,U+80e6,U+80ee,U+80f5,U+80f7,U+80f9,U+80fb,U+80fe-8101,U+8103-8105,U+8107-8108,U+810b-810c,U+8115,U+8117,U+8119,U+811b-811d,U+811f-812b,U+812d-812e,U+8130,U+8133-8135,U+8137,U+8139-813d,U+813f-8145,U+8147,U+8149,U+814d-814f,U+8152,U+8156-8158,U+815b-815f,U+8161-8164,U+8166,U+8168,U+816a-816c,U+816f,U+8172-8173,U+8175-8178,U+8181,U+8183-8187,U+8189,U+818b-818e,U+8190,U+8192-8197,U+8199-819a,U+819e-81a2\"}},{uri:_70,descriptors:{unicodeRange:\"U+7f3c-7f41,U+7f43,U+7f46-7f4f,U+7f52-7f53,U+7f56,U+7f59,U+7f5b-7f5e,U+7f60,U+7f63-7f67,U+7f6b-7f6d,U+7f6f-7f70,U+7f73,U+7f75-7f78,U+7f7a-7f7d,U+7f7f-7f80,U+7f82-7f89,U+7f8b,U+7f8d,U+7f8f-7f93,U+7f95-7f99,U+7f9b-7f9c,U+7fa0,U+7fa2-7fa3,U+7fa5-7fa6,U+7fa8-7fae,U+7fb1,U+7fb3-7fb7,U+7fba-7fbb,U+7fbe,U+7fc0,U+7fc2-7fc4,U+7fc6-7fc9,U+7fcb,U+7fcd,U+7fcf-7fd3,U+7fd6-7fd7,U+7fd9-7fde,U+7fe2-7fe4,U+7fe7-7fe8,U+7fea-7fed,U+7fef,U+7ff2,U+7ff4-7ffa,U+7ffd-7fff,U+8002,U+8007-800a,U+800e-800f,U+8011,U+8013,U+801a-801b,U+801d-801f,U+8021,U+8023-8024,U+802b-8030,U+8032,U+8034,U+8039-803a,U+803c,U+803e,U+8040-8041,U+8044-8045,U+8047-8049,U+804e-8051,U+8053,U+8055-8057\"}},{uri:_71,descriptors:{unicodeRange:\"U+7cd8,U+7cda-7cdb,U+7cdd-7cde,U+7ce1-7ce7,U+7ce9-7cee,U+7cf0-7cf7,U+7cf9-7cfa,U+7cfc-7d09,U+7d0b-7d1f,U+7d21,U+7d23-7d26,U+7d28-7d2a,U+7d2c-7d2e,U+7d30-7d6d,U+7d6f-7d76,U+7d78-7d94\"}},{uri:_72,descriptors:{unicodeRange:\"U+7afe,U+7b00-7b02,U+7b05,U+7b07,U+7b09,U+7b0c-7b0e,U+7b10,U+7b12-7b13,U+7b16-7b18,U+7b1a,U+7b1c-7b1d,U+7b1f,U+7b21-7b23,U+7b27,U+7b29,U+7b2d,U+7b2f-7b30,U+7b32,U+7b34-7b37,U+7b39,U+7b3b,U+7b3d,U+7b3f-7b44,U+7b46,U+7b48,U+7b4a,U+7b4d-7b4e,U+7b53,U+7b55,U+7b57,U+7b59,U+7b5c,U+7b5e-7b5f,U+7b61,U+7b63-7b6d,U+7b6f-7b70,U+7b73-7b74,U+7b76,U+7b78,U+7b7a,U+7b7c-7b7d,U+7b7f,U+7b81-7b84,U+7b86-7b8c,U+7b8e-7b8f,U+7b91-7b93,U+7b96,U+7b98-7b9b,U+7b9e-7ba0,U+7ba3-7ba5,U+7bae-7bb0,U+7bb2-7bb3,U+7bb5-7bb7,U+7bb9-7bc0,U+7bc2-7bc5,U+7bc8-7bcb,U+7bcd-7bd0,U+7bd2,U+7bd4-7bd8,U+7bdb-7bdc,U+7bde-7be0,U+7be2-7be4,U+7be7-7be9,U+7beb-7bed,U+7bef-7bf0,U+7bf2-7bf6,U+7bf8-7bfb,U+7bfd,U+7bff-7c06,U+7c08-7c0a,U+7c0d-7c0e,U+7c10-7c13\"}},{uri:_73,descriptors:{unicodeRange:\"U+7a10-7a13,U+7a15-7a16,U+7a18-7a19,U+7a1b-7a1d,U+7a1f,U+7a21-7a22,U+7a24-7a32,U+7a34-7a36,U+7a38,U+7a3a,U+7a3e,U+7a40-7a45,U+7a47-7a50,U+7a52-7a56,U+7a58-7a6f,U+7a71-7a73,U+7a75,U+7a7b-7a7e,U+7a82,U+7a85,U+7a87,U+7a89-7a8c,U+7a8e-7a90,U+7a93-7a94,U+7a99-7a9b,U+7a9e,U+7aa1-7aa4,U+7aa7,U+7aa9-7aab,U+7aae-7ab2,U+7ab4-7abe,U+7ac0-7aca,U+7acc-7ad5,U+7ad7-7ad8,U+7ada-7add,U+7ae1-7ae2,U+7ae4,U+7ae7-7aec,U+7aee,U+7af0-7af8,U+7afb-7afc\"}},{uri:_74,descriptors:{unicodeRange:\"U+790d-7912,U+7914-791d,U+791f-7923,U+7925-7933,U+7935-7939,U+793d,U+793f,U+7942-7945,U+7947,U+794a-7952,U+7954-7955,U+7958-7959,U+7961,U+7963-7964,U+7966,U+7969-796c,U+796e,U+7970-7976,U+7979,U+797b-797f,U+7982-7983,U+7986-7989,U+798b-798e,U+7990-7999,U+799b-79a6,U+79a8-79b2,U+79b4-79b8,U+79bc,U+79bf,U+79c2,U+79c4-79c5,U+79c7-79c8,U+79ca,U+79cc,U+79ce-79d0,U+79d3-79d4,U+79d6-79d7,U+79d9-79de,U+79e0-79e2,U+79e5,U+79e8,U+79ea,U+79ec,U+79ee,U+79f1-79f7,U+79f9-79fa,U+79fc,U+79fe-79ff,U+7a01,U+7a04-7a05,U+7a07-7a0a,U+7a0c,U+7a0f\"}},{uri:_75,descriptors:{unicodeRange:\"U+77d8-77da,U+77dd-77e1,U+77e4,U+77e6,U+77e8,U+77ea,U+77ef-77f2,U+77f4-77f5,U+77f7,U+77f9-77fc,U+7803-7808,U+780a-780b,U+780e-7810,U+7813,U+7815,U+7819,U+781b,U+781e,U+7820-7822,U+7824,U+7828,U+782a-782b,U+782e-782f,U+7831-7833,U+7835-7836,U+783d,U+783f,U+7841-7844,U+7846,U+7848-784b,U+784d,U+784f,U+7851,U+7853-7854,U+7858-785c,U+785e-7869,U+786f-7876,U+7878-787b,U+787d-7886,U+7888,U+788a-788b,U+788f-7890,U+7892,U+7894-7896,U+7899,U+789d-789e,U+78a0,U+78a2,U+78a4,U+78a6,U+78a8-78af,U+78b5-78b8,U+78ba-78bd,U+78bf-78c0,U+78c2-78c4,U+78c6-78c8,U+78cc-78cf,U+78d1-78d3,U+78d6-78d8,U+78da-78e7,U+78e9-78eb,U+78ed-78f1,U+78f3,U+78f5-78f6,U+78f8-78f9,U+78fb-7900,U+7902-7904,U+7906-790c\"}},{uri:_76,descriptors:{unicodeRange:\"U+76af-76b0,U+76b3,U+76b5-76be,U+76c0-76c1,U+76c3-76c4,U+76c7,U+76c9,U+76cb-76cc,U+76d3,U+76d5,U+76d9-76da,U+76dc-76de,U+76e0-76e4,U+76e6-76ed,U+76f0,U+76f3,U+76f5-76f7,U+76fa-76fb,U+76fd,U+76ff-7703,U+7705-7706,U+770a,U+770c,U+770e-7718,U+771b-771e,U+7721,U+7723-7725,U+7727,U+772a-772c,U+772e,U+7730-7734,U+7739,U+773b,U+773d-773f,U+7742,U+7744-7746,U+7748-774f,U+7752-7759,U+775c-7760,U+7764,U+7767,U+7769-776a,U+776d-7778,U+777a-777c,U+7781-7783,U+7786-778b,U+778f-7790,U+7793-779e,U+77a1,U+77a3-77a4,U+77a6,U+77a8,U+77ab,U+77ad-77af,U+77b1-77b2,U+77b4,U+77b6-77ba,U+77bc,U+77be,U+77c0-77cc,U+77ce-77d6\"}},{uri:_77,descriptors:{unicodeRange:\"U+7589-758a,U+758c-758e,U+7590,U+7593,U+7595,U+7598,U+759b-759c,U+759e,U+75a2,U+75a6-75aa,U+75ad,U+75b6-75b7,U+75ba-75bb,U+75bf-75c1,U+75c6,U+75cb-75cc,U+75ce-75d1,U+75d3,U+75d7,U+75d9-75da,U+75dc-75dd,U+75df-75e1,U+75e5,U+75e9,U+75ec-75ef,U+75f2-75f3,U+75f5-75f8,U+75fa-75fb,U+75fd-75fe,U+7602,U+7604,U+7606-7609,U+760b,U+760d-760f,U+7611-7614,U+7616,U+761a,U+761c-761e,U+7621,U+7623,U+7627-7628,U+762c,U+762e-762f,U+7631-7632,U+7636-7637,U+7639-763b,U+763d,U+7641-7642,U+7644-764b,U+764e-7653,U+7655,U+7657-765b,U+765d,U+765f-7662,U+7664-766a,U+766c-766e,U+7670-7677,U+7679-767a,U+767c,U+767f-7681,U+7683,U+7685,U+7689-768a,U+768c-768d,U+768f-7690,U+7692,U+7694-7695,U+7697-7698,U+769a-76a3,U+76a5-76ad\"}},{uri:_78,descriptors:{unicodeRange:\"U+7492-749b,U+749d,U+749f-74a6,U+74aa-74b9,U+74bb-74d1,U+74d3-74db,U+74dd,U+74df,U+74e1,U+74e5,U+74e7-74ed,U+74f0-74f3,U+74f5,U+74f8-74fe,U+7500-7503,U+7505-750c,U+750e,U+7510,U+7512,U+7514-7517,U+751b,U+751d-751e,U+7520-7524,U+7526-7527,U+752a,U+752e,U+7534,U+7536,U+7539,U+753c-753d,U+753f,U+7541-7544,U+7546-7547,U+7549-754a,U+754d,U+7550-7553,U+7555-7558,U+755d-7564,U+7567-7569,U+756b-7571,U+7573,U+7575-7577,U+757a-757e,U+7580-7582,U+7584-7585,U+7587-7588\"}},{uri:_79,descriptors:{unicodeRange:\"U+7372-737d,U+737f-7383,U+7385-7386,U+7388,U+738a,U+738c-738d,U+738f-7390,U+7392-7395,U+7397-739a,U+739c-739e,U+73a0-73a1,U+73a3-73a8,U+73aa,U+73ac-73ad,U+73b1,U+73b4-73b6,U+73b8-73b9,U+73bc-73bf,U+73c1,U+73c3-73c7,U+73cb-73cc,U+73ce,U+73d2-73d8,U+73da-73dd,U+73df,U+73e1-73e4,U+73e6,U+73e8,U+73ea-73ec,U+73ee-73f1,U+73f3-7402,U+7404,U+7407-7408,U+740b-740e,U+7411-7419,U+741c-7421,U+7423-7424,U+7427,U+7429,U+742b,U+742d,U+742f,U+7431-7432,U+7437-743b,U+743d-7440,U+7442-7454,U+7456,U+7458,U+745d,U+7460-746c,U+746e-746f,U+7471-7475,U+7478-747d,U+747f,U+7482,U+7484-7486,U+7488-748a,U+748c-748d,U+748f,U+7491\"}},{uri:_80,descriptors:{unicodeRange:\"U+7054-705d,U+705f-706a,U+706e,U+7071-7074,U+7077,U+7079-707b,U+707d,U+7081-7084,U+7086-7088,U+708b-708d,U+708f-7091,U+7093,U+7097-7098,U+709a-709b,U+709e-70aa,U+70b0,U+70b2,U+70b4-70b6,U+70ba,U+70be-70bf,U+70c4-70c7,U+70c9,U+70cb-70d7,U+70da,U+70dc-70de,U+70e0-70e3,U+70e5,U+70ea,U+70ee,U+70f0-70f6,U+70f8,U+70fa-70fc,U+70fe-7108,U+710b-710f,U+7111-7112,U+7114,U+7117,U+711b-7125,U+7127-712e,U+7132-7135,U+7137-7144,U+7146-7149,U+714b,U+714d,U+714f-715b,U+715d,U+715f-7163,U+7165,U+7169-716d,U+716f-7171,U+7174-7177\"}},{uri:_81,descriptors:{unicodeRange:\"U+722e-722f,U+7232-7234,U+723a,U+723c,U+723e,U+7240-7246,U+7249-724b,U+724e-7251,U+7253-7255,U+7257-7258,U+725a,U+725c,U+725e,U+7260,U+7263-7265,U+7268,U+726a-726d,U+7270-7271,U+7273-7274,U+7276-7278,U+727b-727d,U+7282-7283,U+7285-7289,U+728c,U+728e,U+7290-7291,U+7293-729e,U+72a0-72ab,U+72ae,U+72b1-72b3,U+72b5,U+72ba-72c0,U+72c5-72c7,U+72c9-72cc,U+72cf,U+72d1,U+72d3-72d6,U+72d8,U+72da-72dd,U+72df,U+72e2-72e7,U+72ea-72eb,U+72f5-72f6,U+72f9,U+72fd-7300,U+7302,U+7304-7309,U+730b-730d,U+730f-7312,U+7314,U+7318-731a,U+731f-7320,U+7323-7324,U+7326-7328,U+732d,U+732f-7330,U+7332-7333,U+7335-7336,U+733a-733d,U+7340-734c,U+734e-734f,U+7351,U+7353-7356,U+7358-735f,U+7361-736b,U+736e,U+7370-7371\"}},{uri:_82,descriptors:{unicodeRange:\"U+6ec5-6ec6,U+6ec8-6eca,U+6ecc-6ece,U+6ed0,U+6ed2,U+6ed6,U+6ed8-6ed9,U+6edb-6edd,U+6ee3,U+6ee7,U+6eea-6ef3,U+6ef5-6ef8,U+6efa-6f01,U+6f03-6f05,U+6f07-6f08,U+6f0a-6f0e,U+6f10-6f12,U+6f16-6f1f,U+6f21-6f23,U+6f25-6f28,U+6f2c,U+6f2e,U+6f30,U+6f32,U+6f34-6f35,U+6f37-6f3d,U+6f3f-6f45,U+6f48-6f4a,U+6f4c,U+6f4e-6f57,U+6f59-6f5b,U+6f5d,U+6f5f-6f61,U+6f63-6f65,U+6f67-6f6c,U+6f6f-6f71,U+6f73,U+6f75-6f77,U+6f79,U+6f7b,U+6f7d-6f83,U+6f85-6f87,U+6f8a-6f8b,U+6f8f-6f9b,U+6f9d-6fa0,U+6fa2-6fa6,U+6fa8-6fb1\"}},{uri:_83,descriptors:{unicodeRange:\"U+6d73,U+6d75-6d76,U+6d79-6d7b,U+6d7d-6d81,U+6d83-6d84,U+6d86-6d87,U+6d8a-6d8b,U+6d8d,U+6d8f-6d90,U+6d92,U+6d96-6d9a,U+6d9c,U+6da2,U+6da5,U+6dac-6dad,U+6db0-6db1,U+6db3-6db4,U+6db6-6db7,U+6db9-6dbe,U+6dc1-6dc3,U+6dc8-6dca,U+6dcd-6dd0,U+6dd2-6dd5,U+6dd7,U+6dda-6ddc,U+6ddf,U+6de2-6de3,U+6de5,U+6de7-6dea,U+6ded,U+6def-6df0,U+6df2,U+6df4-6df6,U+6df8,U+6dfa,U+6dfd-6e04,U+6e06-6e09,U+6e0b,U+6e0f,U+6e12-6e13,U+6e15,U+6e18-6e19,U+6e1b-6e1c,U+6e1e-6e1f,U+6e22,U+6e26-6e28,U+6e2a,U+6e2c,U+6e2e,U+6e30-6e31,U+6e33,U+6e35-6e37,U+6e39,U+6e3b-6e42,U+6e45-6e4c,U+6e4f-6e52,U+6e55,U+6e57,U+6e59-6e5a,U+6e5c-6e5e,U+6e60-6e6a,U+6e6c-6e6d,U+6e6f-6e7d,U+6e80-6e82,U+6e84,U+6e87-6e88,U+6e8a-6e8e,U+6e91-6e97,U+6e99-6e9b,U+6e9d-6e9e,U+6ea0-6ea1,U+6ea3-6ea4,U+6ea6,U+6ea8-6ea9,U+6eab-6eae,U+6eb0,U+6eb3,U+6eb5,U+6eb8-6eb9,U+6ebc,U+6ebe-6ec0,U+6ec3-6ec4\"}},{uri:_84,descriptors:{unicodeRange:\"U+6bbb-6bbe,U+6bc0,U+6bc3-6bc4,U+6bc6-6bca,U+6bcc,U+6bce,U+6bd0-6bd1,U+6bd8,U+6bda,U+6bdc-6be0,U+6be2-6be9,U+6bec-6bee,U+6bf0-6bf2,U+6bf4,U+6bf6-6bf8,U+6bfa-6bfc,U+6bfe-6c04,U+6c08-6c0c,U+6c0e,U+6c12,U+6c17,U+6c1c-6c1e,U+6c20,U+6c23,U+6c25,U+6c2b-6c2d,U+6c31,U+6c33,U+6c36-6c37,U+6c39-6c3c,U+6c3e-6c3f,U+6c43-6c45,U+6c48,U+6c4b-6c4f,U+6c51-6c53,U+6c56,U+6c58-6c5a,U+6c62-6c63,U+6c65-6c67,U+6c6b-6c6f,U+6c71,U+6c73,U+6c75,U+6c77-6c78,U+6c7a-6c7c,U+6c7f-6c80,U+6c84,U+6c87,U+6c8a-6c8b,U+6c8d-6c8e,U+6c91-6c92,U+6c95-6c98,U+6c9a,U+6c9c-6c9e,U+6ca0,U+6ca2,U+6ca8,U+6cac,U+6caf-6cb0,U+6cb4-6cb7,U+6cba,U+6cc0-6cc3,U+6cc6-6cc8,U+6ccb,U+6ccd-6ccf,U+6cd1-6cd2,U+6cd8-6cda,U+6cdc-6cdd,U+6cdf,U+6ce4,U+6ce6-6ce7,U+6ce9,U+6cec-6ced,U+6cf2,U+6cf4,U+6cf9,U+6cff-6d00,U+6d02-6d03,U+6d05-6d06,U+6d08-6d0a,U+6d0d,U+6d0f-6d11,U+6d13-6d16,U+6d18,U+6d1c-6d1d,U+6d1f-6d24,U+6d26,U+6d28-6d29,U+6d2c-6d2d,U+6d2f-6d30,U+6d34,U+6d36-6d38,U+6d3a,U+6d3f-6d40,U+6d42,U+6d44,U+6d49,U+6d4c,U+6d50,U+6d55-6d58,U+6d5b,U+6d5d,U+6d5f,U+6d61-6d62,U+6d64-6d65,U+6d67-6d68,U+6d6b-6d6d,U+6d70-6d72\"}},{uri:_85,descriptors:{unicodeRange:\"U+6967-696a,U+696c-696d,U+696f-6970,U+6972-6976,U+697a-697b,U+697d-697f,U+6981,U+6983,U+6985,U+698a-698c,U+698e-6993,U+6996-6997,U+6999-699a,U+699d-69a6,U+69a9-69aa,U+69ac,U+69ae-69b0,U+69b2-69b3,U+69b5-69b6,U+69b8-69ba,U+69bc-69c0,U+69c2-69c9,U+69cb,U+69cd,U+69cf,U+69d1-69d3,U+69d5-69da,U+69dc-69de,U+69e1-69ec,U+69ee-69f1,U+69f3-69fc,U+69fe,U+6a00-6a09,U+6a0b-6a16,U+6a19-6a1e,U+6a20,U+6a22-6a27,U+6a29,U+6a2b-6a2e,U+6a30,U+6a32-6a34,U+6a36-6a3c,U+6a3f-6a43,U+6a45-6a46,U+6a48-6a4a\"}},{uri:_86,descriptors:{unicodeRange:\"U+6830-6831,U+6834-6836,U+683a-683b,U+683f,U+6847,U+684b,U+684d,U+684f,U+6852,U+6856-685f,U+686a,U+686c-6873,U+6875,U+6878-6880,U+6882,U+6884,U+6887-688e,U+6890-6892,U+6894-6896,U+6898-68a1,U+68a3-68a5,U+68a9-68ac,U+68ae,U+68b1-68b2,U+68b4,U+68b6-68bf,U+68c1,U+68c3-68c8,U+68ca,U+68cc,U+68ce-68d1,U+68d3-68d4,U+68d6-68d7,U+68d9,U+68db-68df,U+68e1-68e2,U+68e4-68ed,U+68ef,U+68f2-68f4,U+68f6-68f8,U+68fb,U+68fd-6900,U+6902-6904,U+6906-690a,U+690c,U+690f,U+6911,U+6913-691e,U+6921-6923,U+6925-692c,U+692e-692f,U+6931-6933,U+6935-6938,U+693a-693c,U+693e,U+6940-6941,U+6943-6953,U+6955-6956,U+6958-6959,U+695b-695c,U+695f,U+6961-6962,U+6964-6965\"}},{uri:_87,descriptors:{unicodeRange:\"U+66b8,U+66ba-66bd,U+66bf-66d8,U+66da,U+66de-66e5,U+66e7-66e8,U+66ea-66ef,U+66f1,U+66f5-66f6,U+66f8,U+66fa-66fb,U+66fd,U+6701-6707,U+670c,U+670e-670f,U+6711-6713,U+6716,U+6718-671a,U+671c,U+671e,U+6720-6725,U+6727,U+6729,U+672e,U+6730,U+6732-6733,U+6736-6739,U+673b-673c,U+673e-673f,U+6741,U+6744-6745,U+6747,U+674a-674b,U+674d,U+6752,U+6754-6755,U+6757-675b,U+675d,U+6762-6764,U+6766-6767,U+676b-676c,U+676e,U+6771,U+6774,U+6776,U+6778-677b,U+677d,U+6780,U+6782-6783,U+6785-6786,U+6788,U+678a,U+678c-678f,U+6791-6794,U+6796,U+6799,U+679b,U+679f-67a1,U+67a4,U+67a6,U+67a9,U+67ac,U+67ae,U+67b1-67b2,U+67b4,U+67b9-67c0,U+67c2,U+67c5-67ce,U+67d5-67d7,U+67db,U+67df,U+67e1,U+67e3-67e4,U+67e6-67e8,U+67ea-67eb,U+67ed-67ee,U+67f2,U+67f5-67fc,U+67fe,U+6801-6804,U+6806,U+680d,U+6810,U+6812,U+6814-6815,U+6818-681c,U+681e-6820,U+6822-6828,U+682b-682f\"}},{uri:_88,descriptors:{unicodeRange:\"U+6569-656a,U+656d-656f,U+6571,U+6573,U+6575-6576,U+6578-6586,U+6588-658a,U+658d-658f,U+6592,U+6594-6596,U+6598,U+659a,U+659d-659e,U+65a0,U+65a2-65a3,U+65a6,U+65a8,U+65aa,U+65ac,U+65ae,U+65b1-65b8,U+65ba-65bb,U+65be-65c0,U+65c2,U+65c7-65ca,U+65cd,U+65d0-65d1,U+65d3-65d5,U+65d8-65df,U+65e1,U+65e3-65e4,U+65ea-65eb,U+65f2-65f5,U+65f8-65f9,U+65fb-65ff,U+6601,U+6604-6605,U+6607-6609,U+660b,U+660d,U+6610-6612,U+6616-6618,U+661a-661c,U+661e,U+6621-6624,U+6626,U+6629-662c,U+662e,U+6630,U+6632-6633,U+6637-663b,U+663d,U+663f-6640,U+6642,U+6644-664a,U+664d-664e,U+6650-6651,U+6658-6659,U+665b-665e,U+6660,U+6662-6663,U+6665,U+6667,U+6669-666d,U+6671-6673,U+6675,U+6678-6679,U+667b-667d,U+667f-6681,U+6683,U+6685-6686,U+6688-668b,U+668d-6690,U+6692-6695,U+6698-669c,U+669e-66a6,U+66a9-66ad,U+66af-66b3,U+66b5-66b7\"}},{uri:_89,descriptors:{unicodeRange:\"U+5f30,U+5f32-5f38,U+5f3b,U+5f3d-5f3f,U+5f41-5f4f,U+5f51,U+5f54,U+5f59-5f5c,U+5f5e-5f60,U+5f63,U+5f65,U+5f67-5f68,U+5f6b,U+5f6e-5f6f,U+5f72,U+5f74-5f76,U+5f78,U+5f7a,U+5f7d-5f7f,U+5f83,U+5f86,U+5f8d-5f8f,U+5f91,U+5f93-5f94,U+5f96,U+5f9a-5f9b,U+5f9d-5fa0,U+5fa2-5fa7,U+5fa9,U+5fab-5fac,U+5faf-5fb4,U+5fb6,U+5fb8-5fbb,U+5fbe-5fc2,U+5fc7-5fc8,U+5fca-5fcb,U+5fce,U+5fd3-5fd5,U+5fda-5fdc,U+5fde-5fdf,U+5fe2-5fe3,U+5fe5-5fe6,U+5fe8-5fe9,U+5fec,U+5fef-5ff0,U+5ff2-5ff4,U+5ff6-5ff7,U+5ff9-5ffa,U+5ffc,U+6007-6009,U+600b-600c,U+6010-6011,U+6013,U+6017-6018,U+601a,U+601e-601f,U+6022-6024,U+602c-602e,U+6030-6034,U+6036-603a,U+603d-603e,U+6040,U+6044-604a,U+604c,U+604e-604f,U+6051,U+6053-6054,U+6056-6058,U+605b-605c,U+605e-6061,U+6065-6066,U+606e,U+6071-6072,U+6074-6075,U+6077,U+607e,U+6080-6082,U+6085-6088,U+608a-608b,U+608e-6091,U+6093,U+6095,U+6097-6099,U+609c,U+609e,U+60a1-60a2,U+60a4-60a5,U+60a7,U+60a9-60aa,U+60ae,U+60b0,U+60b3,U+60b5-60b7,U+60b9-60ba,U+60bd-60c4,U+60c7-60c9,U+60cc\"}},{uri:_90,descriptors:{unicodeRange:\"U+635a-635d,U+6360,U+6364-6366,U+6368,U+636a-636c,U+636f-6370,U+6372-6375,U+6378-6379,U+637c-637f,U+6381,U+6383-6386,U+638b,U+638d,U+6391,U+6393-6395,U+6397,U+6399-639f,U+63a1,U+63a4,U+63a6,U+63ab,U+63af,U+63b1-63b2,U+63b5-63b6,U+63b9,U+63bb,U+63bd,U+63bf-63c3,U+63c5,U+63c7-63c8,U+63ca-63cc,U+63d1,U+63d3-63d5,U+63d7-63dd,U+63df,U+63e2,U+63e4-63e8,U+63eb-63ec,U+63ee-63f1,U+63f3,U+63f5,U+63f7,U+63f9-63fc,U+63fe,U+6403-6404,U+6406-640a,U+640d-640e,U+6411-6412,U+6415-641a,U+641d,U+641f,U+6422-6425,U+6427-6429,U+642b,U+642e-6433,U+6435-6439,U+643b-643c,U+643e,U+6440,U+6442-6443,U+6449,U+644b-6451,U+6453,U+6455-6457,U+6459-645d,U+645f-6466,U+6468,U+646a-646c,U+646e-6477,U+647b-6481,U+6483,U+6486,U+6488-648f\"}},{uri:_91,descriptors:{unicodeRange:\"U+61c5-61c7,U+61c9,U+61cc-61d0,U+61d3,U+61d5-61e5,U+61e7-61f4,U+61f6-61fe,U+6200-6205,U+6207,U+6209,U+6213-6214,U+6219,U+621c-621e,U+6220,U+6223,U+6226-6229,U+622b,U+622d,U+622f-6232,U+6235-6236,U+6238-623c,U+6242,U+6244-6246,U+624a,U+624f-6250,U+6255-6257,U+6259-625a,U+625c-6262,U+6264-6265,U+6268,U+6271-6272,U+6274-6275,U+6277-6278,U+627a-627b,U+627d,U+6281-6283,U+6285-6288,U+628b-6290,U+6294,U+6299,U+629c-629e,U+62a3,U+62a6-62a7,U+62a9-62aa,U+62ad-62b0,U+62b2-62b4,U+62b6-62b8,U+62ba,U+62be,U+62c0-62c1,U+62c3,U+62cb,U+62cf,U+62d1,U+62d5,U+62dd-62de,U+62e0-62e1,U+62e4,U+62ea-62eb,U+62f0,U+62f2,U+62f5,U+62f8-62fb,U+6300,U+6303-6306,U+630a-630d,U+630f-6310,U+6312-6315,U+6317-6319,U+631c,U+6326-6327,U+6329,U+632c-632e,U+6330-6331,U+6333-6338,U+633b-633c,U+633e-6341,U+6344,U+6347-6348,U+634a,U+6351-6354,U+6356-6359\"}},{uri:_92,descriptors:{unicodeRange:\"U+5dd0-5dda,U+5ddc,U+5ddf-5de0,U+5de3-5de4,U+5dea,U+5dec-5ded,U+5df0,U+5df5-5df6,U+5df8-5dfc,U+5dff-5e00,U+5e04,U+5e07,U+5e09-5e0b,U+5e0d-5e0e,U+5e12-5e13,U+5e17,U+5e1e-5e25,U+5e28-5e2c,U+5e2f-5e30,U+5e32-5e36,U+5e39-5e3a,U+5e3e-5e41,U+5e43,U+5e46-5e4b,U+5e4d-5e53,U+5e56-5e5a,U+5e5c-5e5d,U+5e5f-5e60,U+5e63-5e71,U+5e75,U+5e77,U+5e79,U+5e7e,U+5e81-5e83,U+5e85,U+5e88-5e89,U+5e8c-5e8e,U+5e92,U+5e98,U+5e9b,U+5e9d,U+5ea1-5ea4,U+5ea8-5eac,U+5eae-5eb2,U+5eb4,U+5eba-5ebd,U+5ebf-5ec8,U+5ecb-5ed0,U+5ed4-5ed5,U+5ed7-5eda,U+5edc-5ee7,U+5ee9,U+5eeb-5ef3,U+5ef5,U+5ef8-5ef9,U+5efb-5efd,U+5f05-5f07,U+5f09,U+5f0c-5f0e,U+5f10,U+5f12,U+5f14,U+5f16,U+5f19-5f1a,U+5f1c-5f1e,U+5f21-5f24,U+5f28,U+5f2b-5f2c,U+5f2e\"}},{uri:_93,descriptors:{unicodeRange:\"U+60cd-60d0,U+60d2-60d4,U+60d6-60d7,U+60d9,U+60db,U+60de,U+60e1-60e5,U+60ea,U+60f1-60f2,U+60f5,U+60f7-60f8,U+60fb-60ff,U+6102-6105,U+6107,U+610a-610c,U+6110-6114,U+6116-6119,U+611b-611e,U+6121-6122,U+6125,U+6128-612a,U+612c-613e,U+6140-6147,U+6149,U+614b,U+614d,U+614f-6150,U+6152-6154,U+6156-615c,U+615e-6161,U+6163-6166,U+6169-616f,U+6171-6174,U+6176,U+6178-618a,U+618c-618d,U+618f-6193,U+6195-619c,U+619e-61a6,U+61aa-61ab,U+61ad-61b6,U+61b8-61bd,U+61bf-61c1,U+61c3-61c4\"}},{uri:_94,descriptors:{unicodeRange:\"U+5cf4-5cfa,U+5cfc-5d01,U+5d04-5d05,U+5d08-5d0d,U+5d0f-5d13,U+5d15,U+5d17-5d1a,U+5d1c-5d1d,U+5d1f-5d23,U+5d25,U+5d28,U+5d2a-5d2c,U+5d2f-5d33,U+5d35-5d3c,U+5d3f-5d46,U+5d48-5d49,U+5d4d-5d57,U+5d59-5d5a,U+5d5c,U+5d5e-5d68,U+5d6a,U+5d6d-5d6e,U+5d70-5d73,U+5d75-5d81,U+5d83-5d98,U+5d9a-5d9c,U+5d9e-5db6,U+5db8-5dc4,U+5dc6-5dcc,U+5dce-5dcf\"}},{uri:_95,descriptors:{unicodeRange:\"U+5b52,U+5b56,U+5b5e,U+5b60-5b61,U+5b67-5b68,U+5b6b,U+5b6d-5b6f,U+5b72,U+5b74,U+5b76-5b79,U+5b7b-5b7c,U+5b7e-5b7f,U+5b82,U+5b86,U+5b8a,U+5b8d-5b8e,U+5b90-5b92,U+5b94,U+5b96,U+5b9f,U+5ba7-5ba9,U+5bac-5baf,U+5bb1-5bb2,U+5bb7,U+5bba-5bbc,U+5bc0-5bc1,U+5bc3,U+5bc8-5bcb,U+5bcd-5bcf,U+5bd1,U+5bd4-5bdc,U+5be0,U+5be2-5be3,U+5be6-5be7,U+5be9-5bed,U+5bef,U+5bf1-5bf7,U+5bfd-5bfe,U+5c00,U+5c02-5c03,U+5c05,U+5c07-5c08,U+5c0b-5c0e,U+5c10,U+5c12-5c13,U+5c17,U+5c19,U+5c1b,U+5c1e-5c21,U+5c23,U+5c26,U+5c28-5c2b,U+5c2d-5c30,U+5c32-5c33,U+5c35-5c37,U+5c43-5c44,U+5c46-5c47,U+5c4c-5c4d,U+5c52-5c54,U+5c56-5c58,U+5c5a-5c5d,U+5c5f,U+5c62,U+5c64,U+5c67-5c6d,U+5c70,U+5c72-5c78,U+5c7b-5c7e,U+5c80,U+5c83-5c87,U+5c89-5c8b,U+5c8e-5c8f,U+5c92-5c93,U+5c95,U+5c9d-5ca1,U+5ca4-5ca8,U+5caa,U+5cae-5cb0,U+5cb2,U+5cb4,U+5cb6,U+5cb9-5cbc,U+5cbe,U+5cc0,U+5cc2-5cc3,U+5cc5-5cca,U+5ccc-5cd1,U+5cd3-5cd8,U+5cda-5ce0,U+5ce2-5ce3,U+5ce7,U+5ce9,U+5ceb-5cec,U+5cee-5cef,U+5cf1-5cf3\"}},{uri:_96,descriptors:{unicodeRange:\"U+593b,U+593d-5940,U+5943,U+5945-5946,U+594a,U+594c-594d,U+5950,U+5952-5953,U+5959,U+595b-595f,U+5961,U+5963-5964,U+5966-5972,U+5975,U+5977,U+597a-597c,U+597e-5980,U+5985,U+5989,U+598b-598c,U+598e-5991,U+5994-5995,U+5998,U+599a-599d,U+599f-59a2,U+59a6-59a7,U+59ac-59ad,U+59b0-59b1,U+59b3-59b8,U+59ba,U+59bc-59bd,U+59bf-59c5,U+59c7-59c9,U+59cc-59cf,U+59d5-59d6,U+59d9,U+59db,U+59de-59e2,U+59e4,U+59e6-59e7,U+59e9-59eb,U+59ed-59f8,U+59fa,U+59fc-59fe,U+5a00,U+5a02,U+5a0a-5a0b,U+5a0d-5a10,U+5a12,U+5a14-5a17,U+5a19-5a1b,U+5a1d-5a1e,U+5a21-5a22,U+5a24,U+5a26-5a28,U+5a2a-5a30,U+5a33,U+5a35,U+5a37-5a3b,U+5a3d-5a3f,U+5a41-5a45,U+5a47-5a48,U+5a4b-5a54,U+5a56-5a59,U+5a5b-5a61,U+5a63-5a66,U+5a68-5a69,U+5a6b-5a73,U+5a78-5a79,U+5a7b-5a7e,U+5a80-5a90\"}},{uri:_97,descriptors:{unicodeRange:\"U+5a91,U+5a93-5a99,U+5a9c-5aa9,U+5aab-5ab1,U+5ab4,U+5ab6-5ab7,U+5ab9-5abd,U+5abf-5ac0,U+5ac3-5ac8,U+5aca-5acb,U+5acd-5ad1,U+5ad3,U+5ad5,U+5ad7,U+5ad9-5adb,U+5add-5adf,U+5ae2,U+5ae4-5ae5,U+5ae7-5ae8,U+5aea,U+5aec-5af0,U+5af2-5b08,U+5b0a-5b15,U+5b18-5b31,U+5b33,U+5b35-5b36,U+5b38-5b3f,U+5b41-5b4f\"}},{uri:_98,descriptors:{unicodeRange:\"U+5843,U+5845-584b,U+584e-5850,U+5852-5853,U+5855-5857,U+5859-585d,U+585f-5864,U+5866-586a,U+586d-587d,U+587f,U+5882,U+5884,U+5886-5888,U+588a-5891,U+5894-5898,U+589b-589d,U+58a0-58a7,U+58aa-58bb,U+58bd-58c0,U+58c2-58c4,U+58c6-58d0,U+58d2-58d4,U+58d6-58e3,U+58e5-58ea,U+58ed,U+58ef,U+58f1-58f2,U+58f4-58f5,U+58f7-58f8,U+58fa-5901,U+5903,U+5905-5906,U+5908-590c,U+590e,U+5910-5913,U+5917-5918,U+591b,U+591d-591e,U+5920-5923,U+5926,U+5928,U+592c,U+5930,U+5932-5933,U+5935-5936\"}},{uri:_99,descriptors:{unicodeRange:\"U+56d0-56d3,U+56d5-56d6,U+56d8-56d9,U+56dc,U+56e3,U+56e5-56ea,U+56ec,U+56ee-56ef,U+56f2-56f3,U+56f6-56f8,U+56fb-56fc,U+5700-5702,U+5705,U+5707,U+570b-571b,U+571d-571e,U+5720-5722,U+5724-5727,U+572b,U+5731-5732,U+5734-5738,U+573c-573d,U+573f,U+5741,U+5743-5746,U+5748-5749,U+574b,U+5752-5756,U+5758-5759,U+5762-5763,U+5765,U+5767,U+576c,U+576e,U+5770-5772,U+5774-5775,U+5778-577a,U+577d-5781,U+5787-578a,U+578d-5791,U+5794-579a,U+579c-579f,U+57a5,U+57a8,U+57aa,U+57ac,U+57af-57b1,U+57b3,U+57b5-57b7,U+57b9-57c1,U+57c4-57ca,U+57cc-57cd,U+57d0-57d1,U+57d3,U+57d6-57d7,U+57db-57dc,U+57de,U+57e1-57e3,U+57e5-57ec,U+57ee,U+57f0-57f3,U+57f5-57f7,U+57fb-57fc,U+57fe-57ff,U+5801,U+5803-5805,U+5808-580a,U+580c,U+580e-5810,U+5812-5814,U+5816-5818,U+581a-581d,U+581f,U+5822-5823,U+5825-5829,U+582b-582f,U+5831-5834,U+5836-5842\"}},{uri:_100,descriptors:{unicodeRange:\"U+55f9-55fc,U+55ff,U+5602-5607,U+560a-560b,U+560d,U+5610-5617,U+5619-561a,U+561c-561d,U+5620-5622,U+5625-5626,U+5628-562b,U+562e-5630,U+5633,U+5635,U+5637-5638,U+563a,U+563c-563e,U+5640-564b,U+564f-5653,U+5655-5656,U+565a-565b,U+565d-5661,U+5663,U+5665-5667,U+566d-5670,U+5672-5675,U+5677-567a,U+567d-5684,U+5687-568d,U+5690-5692,U+5694-56a2,U+56a4-56ae,U+56b0-56b6,U+56b8-56bb,U+56bd-56c9,U+56cb-56cf\"}},{uri:_101,descriptors:{unicodeRange:\"U+5286-5287,U+5289-528f,U+5291-5292,U+5294-529a,U+529c,U+52a4-52a7,U+52ae-52b0,U+52b4-52bd,U+52c0-52c2,U+52c4-52c6,U+52c8,U+52ca,U+52cc-52cf,U+52d1,U+52d3-52d5,U+52d7,U+52d9-52de,U+52e0-52e3,U+52e5-52ef,U+52f1-52f8,U+52fb-52fd,U+5301-5304,U+5307,U+5309-530c,U+530e,U+5311-5314,U+5318,U+531b-531c,U+531e-531f,U+5322,U+5324-5325,U+5327-5329,U+532b-532d,U+532f-5338,U+533c-533d,U+5340,U+5342,U+5344,U+5346,U+534b-534d,U+5350,U+5354,U+5358-5359,U+535b,U+535d,U+5365,U+5368,U+536a,U+536c-536d,U+5372,U+5376,U+5379,U+537b-537e,U+5380-5381,U+5383,U+5387-5388,U+538a,U+538e-5394,U+5396-5397,U+5399,U+539b-539c,U+539e,U+53a0-53a1,U+53a4,U+53a7,U+53aa-53ad,U+53af-53b5,U+53b7-53ba,U+53bc-53be,U+53c0,U+53c3-53c7,U+53ce-53d0,U+53d2-53d3,U+53d5,U+53da,U+53dc-53de,U+53e1-53e2,U+53e7,U+53f4,U+53fa,U+53fe-5400,U+5402,U+5405,U+5407,U+540b,U+5414,U+5418-541a,U+541c,U+5422,U+5424-5425,U+542a,U+5430,U+5433,U+5436-5437,U+543a\"}},{uri:_102,descriptors:{unicodeRange:\"U+5101-5105,U+5108-510a,U+510c-5111,U+5113-5120,U+5122-513e,U+5142,U+5147,U+514a,U+514c,U+514e-5150,U+5152-5153,U+5157-5159,U+515b,U+515d-5161,U+5163-5164,U+5166-5167,U+5169-516a,U+516f,U+5172,U+517a,U+517e-517f,U+5183-5184,U+5186-5187,U+518a-518b,U+518e-5191,U+5193-5194,U+5198,U+519a,U+519d-519f,U+51a1,U+51a3,U+51a6-51aa,U+51ad-51ae,U+51b4,U+51b8-51ba,U+51be-51bf,U+51c1-51c3,U+51c5,U+51c8,U+51ca,U+51cd-51ce,U+51d0,U+51d2-51da,U+51dc,U+51de-51df,U+51e2-51e3,U+51e5-51ea,U+51ec,U+51ee,U+51f1-51f2,U+51f4,U+51f7,U+51fe,U+5204-5205,U+5209,U+520b-520c,U+520f-5210,U+5213-5215,U+521c,U+521e-521f,U+5221-5223,U+5225-5227,U+522a,U+522c,U+522f,U+5231-5232,U+5234-5235,U+523c,U+523e,U+5244-5249,U+524b,U+524e-524f,U+5252-5253,U+5255,U+5257-525b,U+525d,U+525f-5260,U+5262-5264,U+5266,U+5268,U+526b-526e,U+5270-5271,U+5273-527c,U+527e,U+5280,U+5283-5285\"}},{uri:_103,descriptors:{unicodeRange:\"U+543d,U+543f,U+5441-5442,U+5444-5445,U+5447,U+5449,U+544c-544f,U+5451,U+545a,U+545d-5461,U+5463,U+5465,U+5467,U+5469-5470,U+5474,U+5479-547a,U+547e-547f,U+5481,U+5483,U+5485,U+5487-548a,U+548d,U+5491,U+5493,U+5497-5498,U+549c,U+549e-54a2,U+54a5,U+54ae,U+54b0,U+54b2,U+54b5-54b7,U+54b9-54ba,U+54bc,U+54be,U+54c3,U+54c5,U+54ca-54cb,U+54d6,U+54d8,U+54db,U+54e0-54e4,U+54eb-54ec,U+54ef-54f1,U+54f4-54f9,U+54fb,U+54fe,U+5500,U+5502-5505,U+5508,U+550a-550e,U+5512-5513,U+5515-551a,U+551c-551f,U+5521,U+5525-5526,U+5528-5529,U+552b,U+552d,U+5532,U+5534-5536,U+5538-553b,U+553d,U+5540,U+5542,U+5545,U+5547-5548,U+554b-554f,U+5551-5554,U+5557-555b,U+555d-5560,U+5562-5563,U+5568-5569,U+556b,U+556f-5574,U+5579-557a,U+557d,U+557f,U+5585-5586,U+558c-558e,U+5590,U+5592-5593,U+5595-5597,U+559a-559b,U+559e,U+55a0-55a6,U+55a8-55b0,U+55b2,U+55b4,U+55b6,U+55b8,U+55ba,U+55bc,U+55bf-55c3,U+55c6-55c8,U+55ca-55cb,U+55ce-55d0,U+55d5,U+55d7-55db,U+55de,U+55e0,U+55e2,U+55e7,U+55e9,U+55ed-55ee,U+55f0-55f1,U+55f4,U+55f6,U+55f8\"}},{uri:_104,descriptors:{unicodeRange:\"U+4fe0,U+4fe2,U+4fe4-4fe5,U+4fe7,U+4feb-4fec,U+4ff0,U+4ff2,U+4ff4-4ff7,U+4ff9,U+4ffb-4ffd,U+4fff-500b,U+500e,U+5010-5011,U+5013,U+5015-5017,U+501b,U+501d-501e,U+5020,U+5022-5024,U+5027,U+502b,U+502f-5039,U+503b,U+503d,U+503f-5042,U+5044-5046,U+5049-504b,U+504d,U+5050-5054,U+5056-5059,U+505b,U+505d-5064,U+5066-506b,U+506d-5075,U+5078-507a,U+507c-507d,U+5081-5084,U+5086-5087,U+5089-508c,U+508e-50a2,U+50a4,U+50a6,U+50aa-50ab,U+50ad-50b1,U+50b3-50b9,U+50bc-50ce,U+50d0-50d5,U+50d7-50d9,U+50db-50e5,U+50e8-50eb,U+50ef-50f2,U+50f4,U+50f6-50fa,U+50fc-5100\"}},{uri:_105,descriptors:{unicodeRange:\"U+49d5-4a77\"}},{uri:_106,descriptors:{unicodeRange:\"U+4dac-4dad,U+4daf-4db5,U+4e02,U+4e04-4e06,U+4e0f,U+4e12,U+4e17,U+4e1f-4e21,U+4e23,U+4e26,U+4e29,U+4e2e-4e2f,U+4e31,U+4e33,U+4e35,U+4e37,U+4e3c,U+4e40-4e42,U+4e44,U+4e46,U+4e4a,U+4e51,U+4e55,U+4e57,U+4e5a-4e5b,U+4e62-4e65,U+4e67-4e68,U+4e6a-4e6f,U+4e72,U+4e74-4e7d,U+4e7f-4e85,U+4e87,U+4e8a,U+4e90,U+4e96-4e97,U+4e99,U+4e9c-4e9e,U+4ea3,U+4eaa,U+4eaf-4eb1,U+4eb4,U+4eb6-4eb9,U+4ebc-4ebe,U+4ec8,U+4ecc,U+4ecf-4ed0,U+4ed2,U+4eda-4edc,U+4ee0,U+4ee2,U+4ee6-4ee7,U+4ee9,U+4eed-4eef,U+4ef1,U+4ef4,U+4ef8-4efa,U+4efc,U+4efe,U+4f00,U+4f02-4f08,U+4f0b-4f0c,U+4f12-4f16,U+4f1c-4f1d,U+4f21,U+4f23,U+4f28-4f29,U+4f2c-4f2e,U+4f31,U+4f33,U+4f35,U+4f37,U+4f39,U+4f3b,U+4f3e-4f42,U+4f44-4f45,U+4f47-4f4c,U+4f52,U+4f54,U+4f56,U+4f61-4f62,U+4f66,U+4f68,U+4f6a-4f6b,U+4f6d-4f6e,U+4f71-4f72,U+4f75,U+4f77-4f7a,U+4f7d,U+4f80-4f82,U+4f85-4f87,U+4f8a,U+4f8c,U+4f8e,U+4f90,U+4f92-4f93,U+4f95-4f96,U+4f98-4f9a,U+4f9c,U+4f9e-4f9f,U+4fa1-4fa2,U+4fa4,U+4fab,U+4fad,U+4fb0-4fb4,U+4fb6-4fbe,U+4fc0-4fc2,U+4fc6-4fc9,U+4fcb-4fcd,U+4fd2-4fd6,U+4fd9,U+4fdb\"}},{uri:_107,descriptors:{unicodeRange:\"U+4933-49d4\"}},{uri:_108,descriptors:{unicodeRange:\"U+487a-4932\"}},{uri:_109,descriptors:{unicodeRange:\"U+47d2-4879,U+2ce7c,U+2ce88,U+2ce93\"}},{uri:_110,descriptors:{unicodeRange:\"U+4756-47d1,U+2ca02,U+2ca0e,U+2ca7d,U+2caa9,U+2cb29,U+2cb2e,U+2cb31,U+2cb38-2cb39,U+2cb3f,U+2cb41,U+2cb4e,U+2cb5a,U+2cb64,U+2cb69,U+2cb6c,U+2cb6f,U+2cb76,U+2cb78,U+2cb7c,U+2cbb1,U+2cbbf-2cbc0,U+2cbce,U+2cc5f,U+2ccf5-2ccf6,U+2ccfd,U+2ccff,U+2cd02-2cd03,U+2cd0a,U+2cd8b,U+2cd8d,U+2cd8f-2cd90,U+2cd9f-2cda0,U+2cda8,U+2cdad-2cdae,U+2cdd5,U+2ce18,U+2ce1a,U+2ce23,U+2ce26,U+2ce2a\"}},{uri:_111,descriptors:{unicodeRange:\"U+46c3-4755,U+2c488,U+2c494,U+2c497,U+2c542,U+2c613,U+2c618,U+2c621,U+2c629,U+2c62b-2c62d,U+2c62f,U+2c642,U+2c64a-2c64b,U+2c72c,U+2c72f,U+2c79f,U+2c7c1,U+2c7fd,U+2c8d9,U+2c8de,U+2c8e1,U+2c8f3,U+2c907,U+2c90a,U+2c91d\"}},{uri:_112,descriptors:{unicodeRange:\"U+4629-46c2,U+2bdf7,U+2be29,U+2c029-2c02a,U+2c0a9,U+2c0ca,U+2c1d5,U+2c1d9,U+2c1f9,U+2c27c,U+2c288,U+2c2a4,U+2c317,U+2c35b,U+2c361,U+2c364\"}},{uri:_113,descriptors:{unicodeRange:\"U+458e-4628,U+2b7a9,U+2b7c5,U+2b7e6,U+2b7f9,U+2b806,U+2b80a,U+2b81c,U+2b8b8,U+2bac7,U+2bb5f,U+2bb62,U+2bb7c,U+2bb83,U+2bc1b,U+2bd77,U+2bd87\"}},{uri:_114,descriptors:{unicodeRange:\"U+4449-4511,U+2afa2,U+2b127-2b128,U+2b137-2b138,U+2b1ed\"}},{uri:_115,descriptors:{unicodeRange:\"U+439b-4448,U+2a437,U+2a5f1,U+2a602,U+2a61a,U+2a6b2,U+2a7dd,U+2a8fb,U+2a917,U+2aa30,U+2aa36,U+2aa58\"}},{uri:_116,descriptors:{unicodeRange:\"U+4275-430d,U+298c6,U+29a72,U+29d98,U+29ddb,U+29e15,U+29e3d,U+29e49\"}},{uri:_117,descriptors:{unicodeRange:\"U+4132-41de,U+28bef,U+28c47,U+28c4f,U+28c51,U+28c54,U+28d10,U+28d71,U+28dfb,U+28e1f,U+28e36,U+28e89,U+28e99,U+28eeb,U+28f32,U+28ff8,U+292a0\"}},{uri:_118,descriptors:{unicodeRange:\"U+41df-4274,U+292b1,U+29490,U+295cf,U+2967f,U+296f0,U+29719,U+29750\"}},{uri:_119,descriptors:{unicodeRange:\"U+408e-4131,U+285c8-285c9,U+28678,U+28695,U+286d7,U+286fa,U+287e0,U+28946,U+28949,U+2896b,U+28987-28988,U+289ba-289bb,U+28a1e,U+28a29,U+28a43,U+28a71,U+28a99,U+28acd,U+28add,U+28ae4,U+28b49,U+28bc1\"}},{uri:_120,descriptors:{unicodeRange:\"U+3e83-3f2f,U+27139,U+273da-273db,U+273fe,U+27410,U+27449,U+27614-27615,U+27631,U+27684,U+27693,U+2770e,U+27723,U+27752\"}},{uri:_121,descriptors:{unicodeRange:\"U+3f30-3fdb,U+27985,U+27a84,U+27bb3,U+27bbe,U+27bc7,U+27cb8,U+27da0,U+27e10\"}},{uri:_122,descriptors:{unicodeRange:\"U+3fdc-408d,U+27fb7,U+27ff9,U+2808a,U+280bb,U+2815d,U+28277,U+28282,U+282e2,U+282f3,U+283cd,U+28408,U+2840c,U+28455,U+28468,U+2856b\"}},{uri:_123,descriptors:{unicodeRange:\"U+3dd2-3e82,U+26a58,U+26a8c,U+26ab7,U+26aff,U+26b5c,U+26c21,U+26c29,U+26c73,U+26cdd,U+26e40,U+26e65,U+26f94,U+26ff6-26ff8,U+270f4,U+2710d\"}},{uri:_124,descriptors:{unicodeRange:\"U+3d34-3dd1,U+2648d,U+26676,U+2667e,U+266b0,U+2671d,U+2677c,U+267cc,U+268dd,U+268ea,U+26951,U+2696f,U+269dd,U+269fa,U+26a1e\"}},{uri:_125,descriptors:{unicodeRange:\"U+3c76-3d33,U+25d0a,U+25da1,U+25e2e,U+25e56,U+25e62,U+25e65,U+25ec2,U+25ed7-25ed8,U+25ee8,U+25f23,U+25f5c,U+25fd4,U+25fe0,U+25ffb,U+2600c,U+26017,U+26060,U+260ed,U+26221,U+26270,U+26286,U+2634c,U+26402\"}},{uri:_126,descriptors:{unicodeRange:\"U+3bda-3c75,U+25771,U+257a9,U+257b4,U+259c4,U+259d4,U+25ae3-25ae4,U+25af1,U+25bb2,U+25c14,U+25c4b,U+25c64\"}},{uri:_127,descriptors:{unicodeRange:\"U+3b25-3bd9,U+2504a,U+25055,U+25122,U+2512b,U+251a9,U+251cd,U+251e5,U+2521e,U+2524c,U+2542e,U+2548e,U+254d9,U+2550e,U+25532,U+25562,U+255a7-255a8\"}},{uri:_128,descriptors:{unicodeRange:\"U+3a6b-3b24,U+24896,U+249db,U+24a4d,U+24a7d,U+24ac9,U+24b56,U+24b6f,U+24c16,U+24d14,U+24dea,U+24e0e,U+24e37,U+24e6a,U+24e8b,U+24eaa\"}},{uri:_129,descriptors:{unicodeRange:\"U+39a9-3a6a,U+24096,U+24103,U+241ac,U+241c6,U+241fe,U+243bc,U+243f8,U+244d3,U+24629,U+246a5,U+247f1\"}},{uri:_130,descriptors:{unicodeRange:\"U+38e3-39a8,U+23a98,U+23c7f,U+23c97-23c98,U+23cfe,U+23d00,U+23d0e,U+23d40,U+23dd3,U+23df9-23dfa,U+23e23,U+23f7e\"}},{uri:_131,descriptors:{unicodeRange:\"U+3760-382a,U+22ab8,U+22b43,U+22b46,U+22b4f-22b50,U+22ba6,U+22bca,U+22c1d,U+22c24,U+22c55,U+22d4c,U+22de1\"}},{uri:_132,descriptors:{unicodeRange:\"U+382b-38e2,U+231b6,U+231c3-231c4,U+231f5,U+23350,U+23372,U+233d0,U+233d2-233d3,U+233d5,U+233da,U+233df,U+233e4,U+2344a-2344b,U+23451,U+23465,U+234e4,U+2355a,U+23594,U+235c4,U+235cb,U+23638-2363a,U+23647,U+2370c,U+2371c,U+2373f,U+23763-23764,U+237e7,U+237ff,U+23824,U+2383d\"}},{uri:_133,descriptors:{unicodeRange:\"U+3698-375f,U+22218,U+2231e,U+223ad,U+224dc,U+226f3,U+2285b,U+228ab,U+2298f\"}},{uri:_134,descriptors:{unicodeRange:\"U+35e6-3697,U+21c56,U+21cde,U+21d2d,U+21d45,U+21d62,U+21d78,U+21d92,U+21d9c,U+21da1,U+21db7,U+21de0,U+21e33-21e34,U+21f1e,U+21f76,U+21ffa,U+2217b\"}},{uri:_135,descriptors:{unicodeRange:\"U+3444-350e,U+20ad3,U+20b1d,U+20b9f,U+20c41,U+20cbf,U+20cd0,U+20d45,U+20de1,U+20e64,U+20e6d,U+20e95,U+20e9d,U+20ea2,U+20f5f,U+210c1,U+21201,U+2123d,U+21255,U+21274,U+2127b\"}},{uri:_136,descriptors:{unicodeRange:\"U+350f-35e5,U+212d7,U+212e4,U+212fd,U+2131b,U+21336,U+21344,U+2139a,U+213c4,U+21413,U+2146d-2146e,U+215d7,U+21647,U+216b4,U+21706,U+21742,U+218bd,U+219c3\"}},{uri:_137,descriptors:{unicodeRange:\"U+336d-3443,U+2032b,U+20371,U+20381,U+203f9,U+2044a,U+20509,U+20547,U+205d6,U+20628,U+20676,U+2074f,U+20779,U+20807,U+2083a,U+20895,U+208b9,U+2097c,U+2099d\"}},{uri:_138,descriptors:{unicodeRange:\"U+328b-336c,U+2000b,U+20089,U+200a2,U+200a4,U+20164,U+201a2,U+20213\"}},{uri:_139,descriptors:{unicodeRange:\"U+3192-31ba,U+31c0-31e3,U+31f0-321e,U+3220-328a,U+1f250-1f251\"}},{uri:_140,descriptors:{unicodeRange:\"U+2f74-2fd5,U+3000,U+3003-3007,U+3012-3013,U+3018-301c,U+3020-3029,U+302f-303f,U+3041-3096,U+3099-30a1\"}},{uri:_141,descriptors:{unicodeRange:\"U+30a2-30ff,U+3105-312f,U+3131-318e,U+3190-3191\"}},{uri:_142,descriptors:{unicodeRange:\"U+4e36,U+4ea0,U+4f74,U+4f91,U+4f94,U+4fc5,U+507e,U+50ed,U+5182,U+51f5,U+525e,U+5282,U+52f9,U+5326,U+537a,U+53a3,U+5423,U+5459,U+54b4,U+54d9,U+55c9,U+57f4,U+580b,U+5902,U+5925,U+5a08,U+5ab5,U+5b84,U+5be4,U+5c22,U+5cb5,U+5cbd,U+5d3e,U+5e31,U+5e5e,U+5e80,U+5ee8,U+5f82,U+5fc9,U+5fed,U+600a,U+605d,U+609b,U+609d,U+60dd,U+6243,U+6322,U+63ce,U+640c,U+643f,U+6445,U+64d7,U+6534,U+6549,U+656b,U+6603,U+674c,U+680a,U+6864,U+69d4,U+6a65,U+6c2a,U+6c46,U+6c5c,U+6d0e,U+6d48,U+6e2b,U+6eb2,U+6eb7,U+6f89,U+706c,U+70b1,U+7113,U+71d4,U+727f,U+72f3,U+7303,U+7321,U+736c,U+736f,U+74a9,U+74de,U+750d,U+7513,U+7592,U+75c4,U+7605,U+760a,U+761b,U+7625,U+762d,U+7643,U+7707,U+7747,U+77b5,U+7839,U+784e,U+78a5,U+7924,U+793b,U+798a,U+7a03,U+7a06,U+7a78,U+7a80,U+7aad,U+7ba8,U+7be5,U+7cc8,U+7ec1,U+7f0b,U+7f0f,U+7f12,U+7f68,U+7f9d,U+8025,U+809c,U+80ad,U+80b7,U+80e8,U+811e,U+8204,U+8223,U+822d,U+823b,U+824b,U+825a,U+827d,U+827f,U+828f,U+82c8,U+8307,U+831b,U+8347,U+837d,U+839b,U+83a9,U+83f9,U+84b9,U+8579,U+864d,U+867f,U+86b0,U+86d1,U+86d8,U+86f2,U+8764,U+8770,U+8788,U+8797,U+87ac-87ad,U+87b5,U+881b,U+8844,U+88bc,U+88fc,U+8930,U+89cf,U+89d6,U+8ba0,U+8bd4,U+8c02,U+8c2b,U+8c85,U+8e23,U+8f81-8f82,U+8fd5,U+90b6,U+90db,U+914e,U+9164,U+91ad,U+943e,U+94b7-94b8,U+94eb,U+950d,U+9514,U+9516,U+9518,U+9529,U+9538,U+953f,U+954e,U+955f,U+95fc,U+9667,U+96b3,U+9792,U+97b2,U+98a1,U+9969,U+9987,U+9998,U+9a80,U+9a92,U+9a96,U+9adf,U+9cb4,U+9cbd,U+9cd0,U+9cd4,U+9e31,U+9e3a,U+9e71,U+9ee5,U+9eea,U+9ef9,U+9fa0\"}},{uri:_143,descriptors:{unicodeRange:\"U+4e0c,U+4e28,U+4e3f,U+4ec2,U+502e,U+50ba,U+5155,U+5181,U+522d,U+5281,U+5290,U+5369,U+53b6,U+54d5,U+54dc,U+54ff,U+552a,U+553c,U+5588,U+55b5,U+5686,U+570a,U+5776,U+5786,U+57a4,U+5820,U+5865,U+58bc,U+5b32,U+5b65,U+5c1c,U+5c66,U+5c6e,U+5c8d,U+5ddb,U+5f2a,U+5f50,U+5f61,U+6067,U+614a,U+615d,U+619d,U+61d4,U+620b,U+6224-6225,U+6343,U+63ad,U+63f2,U+640b,U+6420,U+6434,U+6496,U+64d0,U+6509,U+652e,U+67a8,U+6833,U+6844,U+684a,U+6920,U+6957,U+6971,U+6a8e,U+6a91,U+6aa0,U+6b43,U+6bea,U+6bf5,U+6c15,U+6cd0,U+6ee0,U+6f24,U+6f2d,U+70c0,U+721d,U+728b,U+72c3,U+72e8,U+730a,U+7338-7339,U+734d,U+746d,U+752f,U+754e,U+770d,U+7735,U+778d,U+77a2,U+77e7,U+7857,U+786d,U+78c9,U+78f2,U+791e,U+7953,U+7b58,U+7b9d,U+7bda,U+7cd7,U+7f32-7f33,U+8022,U+8028-8029,U+8035,U+804d,U+8080,U+80c2,U+80e9,U+80ec,U+80f2,U+810e,U+8221,U+8274,U+82b0,U+82e0,U+83b0,U+8487-8488,U+848e,U+84cd,U+84d0,U+8539,U+857a,U+85a8,U+85b7,U+867c,U+871e,U+8723,U+877e,U+878b,U+8793,U+8803,U+88d2,U+8966,U+89cc,U+89eb,U+8b26,U+8c8a,U+8c98,U+8d33,U+8d47,U+8d55,U+8dbc,U+8e40,U+8e94,U+8f77,U+8f79,U+9058,U+91a2,U+91b5,U+928e,U+9494,U+94b6,U+94de,U+94f4,U+94f9,U+950a,U+950e,U+951e,U+952b,U+953c,U+953e,U+9544,U+9561,U+9564,U+9569,U+95f6,U+9603,U+960d,U+963d,U+9674,U+9794,U+97ab,U+98a5,U+9a9f,U+9ab1,U+9ad1,U+9b0f,U+9b2f,U+9c92,U+9c95,U+9cba,U+9cbc,U+9cc6,U+9ccb,U+9cd8,U+9e32,U+9e38,U+9e5b,U+9e7e,U+9eb4,U+9efb-9efc,U+9f3d\"}},{uri:_144,descriptors:{unicodeRange:\"U+2e3b,U+2e80-2e99,U+2e9b-2ef3,U+2f00-2f73,U+ffffd\"}},{uri:_145,descriptors:{unicodeRange:\"U+4e69,U+4f1b,U+4f67,U+4f7e,U+4fdc,U+50e6,U+5196,U+5202,U+5233,U+523f,U+52a2,U+536e,U+5476,U+54ad,U+54cf,U+5537,U+561e,U+56dd,U+56df,U+5709,U+572c,U+57cf,U+57f8,U+580d,U+5881,U+589a,U+5941,U+59b2,U+5c25,U+5d24,U+5d74,U+5e42,U+5e8b,U+5eb3,U+5ed2,U+5fad,U+6003,U+603c,U+6083,U+6100,U+6126,U+6206,U+62ca,U+638e,U+63b4,U+6426,U+646d,U+6535,U+65c4,U+66db,U+6715,U+6769,U+6798,U+67c3,U+6861,U+698d,U+69ca,U+69ed,U+69f2,U+69ff,U+6a18,U+6b39,U+6bb3,U+6c0d,U+6cb2,U+6cd6,U+6cf7,U+6cfa,U+6d33,U+6e16,U+6e53-6e54,U+6ebb,U+6fb6,U+709d,U+72ad,U+72f7,U+72fb,U+7313,U+739f,U+74ba,U+754b,U+755b,U+758b,U+75ac,U+75d6,U+7617,U+7635,U+7640,U+76a4,U+76b2,U+775a,U+77bd,U+781f,U+79b3,U+7b2b,U+7b31,U+7b3e,U+7b6e,U+7b9c,U+7c0b,U+7c9e,U+7cc1,U+7ce8,U+7ea5,U+7f21,U+7f27,U+7f74,U+7fb0,U+8031,U+8071,U+80ea,U+8114,U+8160,U+81a6,U+81c1,U+829f,U+82a4,U+82fb,U+831a,U+8333,U+836c,U+83b6,U+83f8,U+8411,U+841c,U+8489,U+848c,U+85a4,U+8627,U+8629,U+866e,U+86b5,U+872e,U+8731,U+877b,U+877d,U+87ea,U+8813,U+8816,U+8864,U+88ce,U+88e5,U+897b,U+89cb,U+89f3,U+8bfc,U+8c35,U+8d46,U+8d4d,U+8dba,U+8e3a,U+8f75,U+8f7e,U+8fd3,U+9161,U+9179,U+917e,U+91a3,U+94ac,U+94d7,U+94e5,U+952a,U+952c,U+9545,U+9565,U+9568,U+956a,U+961d,U+96e0,U+972a,U+9730,U+989f,U+98e7,U+990d,U+9967,U+9993,U+9aa3,U+9ac0,U+9ae1,U+9aeb,U+9af9,U+9c86,U+9c8b,U+9ca0-9ca1,U+9ca3,U+9ce2,U+9e48,U+9e6a,U+9e87,U+9ee2,U+9ee9,U+9f17,U+9f19,U+9f2c,U+9f80\"}},{uri:_146,descriptors:{unicodeRange:\"U+4ef3,U+50d6,U+50ec,U+51ab,U+51b1,U+52d6,U+54a9,U+54da,U+55be,U+55cd,U+564d,U+572f,U+574c,U+576b,U+57d8,U+57fd,U+5844,U+59d2,U+5ae0,U+5b16,U+5b37,U+5b5b,U+5b80,U+5d1e,U+5d6b,U+5efe,U+5f11,U+5f56,U+5f58,U+5f73,U+5f8c,U+5fc4,U+5fe4,U+602b,U+6106,U+610d,U+63de,U+63f8,U+641b,U+64e4,U+6634,U+676a,U+67b5,U+681d,U+6883,U+69b1,U+69e0,U+6b37,U+6b9b,U+6d7c,U+6ed7,U+6f36,U+6f72,U+6f8c,U+7035,U+7039,U+7173,U+7178,U+7228,U+728f,U+72b4,U+72ef,U+72f4,U+7331,U+7481,U+74e0,U+7540,U+75c3,U+75e6,U+763c,U+764d,U+76cd,U+7704,U+7743,U+7780,U+7847,U+786a,U+78b9,U+7962,U+7a02,U+7aac,U+7ab3,U+7b0a,U+7b4c,U+7b7b,U+7bfc,U+7c0f,U+7c16,U+7c40,U+7ca2,U+7cc7,U+7cf8,U+7d77,U+7e3b,U+7ea1,U+7ea9,U+7ef2,U+7f02,U+7f07,U+7f0c,U+7f23,U+7f2f,U+7fbc,U+8016,U+8020,U+812c,U+8136,U+8182,U+822f,U+8233,U+825f,U+8268,U+8284,U+8288,U+8291,U+8308,U+8311,U+835b,U+836d,U+83dd,U+8406,U+840f,U+845c,U+84b4,U+84e3,U+850c,U+855e,U+863c,U+86ba,U+86c4,U+86de,U+86f1,U+873e,U+87bd,U+87db,U+880a,U+883c,U+887f,U+88f0,U+890a,U+892b,U+895e,U+89ef,U+8a48,U+8bdc,U+8c18,U+8c33,U+8c94,U+8db1,U+8dcf,U+8dd6,U+8de3,U+8e6f,U+8e90,U+8f7a,U+8fb6,U+902d,U+90be,U+91af,U+936a,U+948b,U+94d8,U+9513,U+953a,U+956c,U+963c,U+9654,U+966c,U+9688,U+97b4,U+996b,U+9a75,U+9a7a,U+9aba,U+9aed,U+9b08,U+9b43,U+9c8e,U+9c94,U+9c9a,U+9e2b,U+9e36,U+9e4b,U+9e4e,U+9e55,U+9e63,U+9e68-9e69,U+9ebd,U+9ec9,U+9f0d,U+9f37,U+9f51\"}},{uri:_147,descriptors:{unicodeRange:\"U+50a7,U+5240,U+5261,U+52ac,U+531a,U+5363,U+5432,U+5452,U+5456,U+5472,U+5478,U+553f,U+5575,U+5581,U+55cc,U+55fe,U+5601,U+572e,U+57d2,U+57ef,U+581e,U+5924,U+5981,U+5997,U+59a3,U+5aaa,U+5ab8,U+5b34,U+5d5d,U+5def,U+5e11,U+5e91,U+5ed1,U+5ef4,U+5f40,U+600d,U+6019,U+601b,U+605a,U+6092,U+60ab,U+6217,U+623d,U+6369,U+65d2,U+6661,U+670a,U+6753,U+67a7,U+6855,U+68f9,U+6939,U+696e,U+6980,U+6a7c,U+6aab,U+6b82,U+6bf3,U+6bf9,U+6c05,U+6c19-6c1a,U+6ca9,U+6cf6,U+6d1a,U+6dab,U+6f74,U+7085,U+7198,U+71b5,U+7256,U+725d,U+727e,U+72fa,U+7322,U+738e,U+73e5,U+750f,U+755a,U+7594,U+75b3,U+760c,U+7615,U+7630,U+763f,U+77ec,U+7817,U+78a1,U+78d9,U+7905,U+7b2a,U+7b2e,U+7b62,U+7b85,U+7bcc,U+7bea,U+7c26,U+7c74,U+7c9c-7c9d,U+7e47,U+7e9b,U+7e9f,U+7ee0,U+7ee8,U+7ef1,U+7f01,U+7f11,U+7f17,U+7f36,U+7f7e,U+7fee,U+802a,U+80cd,U+8112,U+8169,U+8234,U+8279,U+8298,U+82ca,U+82d8,U+82e1,U+83c0,U+83d4,U+83df,U+8401,U+8451,U+845a,U+8476,U+8478,U+84ba,U+84bd,U+84e0,U+851f,U+8548,U+8556,U+8585,U+868d,U+86e9,U+86f4,U+86f8,U+8765,U+8785,U+87ab,U+87ee,U+8832,U+8872,U+88b7,U+88e2-88e3,U+89da,U+8bce,U+8bd3,U+8bd6,U+8bf9,U+8c16,U+8c73,U+8d5c,U+8dde,U+8f6d,U+8f94,U+8fe8,U+9011,U+915e,U+9185,U+918c,U+94ab,U+94d1,U+94f3,U+9515,U+951d,U+9558,U+9567,U+96ce,U+96e9,U+9785,U+9878,U+987c,U+9883,U+98d1,U+9954,U+9963,U+9a93,U+9ac1,U+9acc,U+9b1f,U+9b49,U+9b4d,U+9b51,U+9ca7,U+9cae,U+9cce,U+9cd3,U+9e37,U+9e39,U+9e41,U+9e46,U+9f22,U+9f2f,U+9f39,U+9f85\"}},{uri:_148,descriptors:{unicodeRange:\"U+4e5c,U+4edf,U+4f25,U+4f32,U+4f5e,U+4f76,U+4faa,U+4fe6,U+5028,U+5048,U+5250,U+535f,U+538d,U+53c1,U+5412,U+5443,U+54d4,U+54dd,U+5541,U+5550,U+5577,U+55dd,U+55f3,U+560f,U+562c,U+5657-5658,U+5664,U+56af,U+575c,U+577c,U+57b2,U+57da,U+5800,U+5a62,U+5aeb,U+5c3b,U+5ca3,U+5d26,U+5d9d,U+5f01,U+5fb5,U+5fdd,U+5ff8,U+6029,U+6041,U+6079,U+60b1,U+6222,U+629f,U+6332,U+63bc,U+63e0,U+6485,U+65ab,U+65c3,U+65c6,U+668c,U+669d,U+66be,U+67fd,U+6800,U+68fc,U+690b,U+6924,U+6978,U+69a7,U+6a3e,U+6a50,U+6a5b,U+6a97,U+6b24,U+6b8d,U+6baa,U+6c10,U+6c54,U+6ceb,U+6d04,U+6d4d,U+6eb1,U+6ebd,U+7110,U+71b3,U+71f9,U+7230,U+728d,U+7292,U+72b8,U+72d2,U+7360,U+73a2,U+7511,U+75a0,U+75c8,U+779f,U+7826,U+7877,U+7a39,U+7aa8,U+7ae6,U+7b04,U+7b0f,U+7baa,U+7bac,U+7c1f,U+7ccd,U+7ecb,U+7ed4,U+7ed7,U+7efb,U+7f0d,U+7f5f,U+7faf,U+7fd5,U+7fe5,U+8027,U+80bc,U+80dd,U+80fc,U+8132,U+815a,U+8167,U+816d,U+81ca,U+8228,U+82a1,U+82a9,U+82ab,U+82cc,U+8351,U+8368,U+83b8,U+83d8,U+83ea,U+83f0,U+8497,U+84c1,U+858f,U+85ff,U+867b,U+86a8-86a9,U+870a,U+8722,U+876e,U+877c,U+87e5,U+8888,U+88df,U+8919,U+8bcc,U+8bdf,U+8be8,U+8bee,U+8c20,U+8c2f,U+8d36,U+8df8,U+8e05,U+8e2f,U+8f9a,U+9021,U+908b,U+90b4,U+90ba,U+90d0,U+90eb,U+90fe,U+91aa,U+933e,U+9486-9487,U+948d,U+9490,U+94ad,U+94bd,U+94d6,U+94d9,U+9507,U+9546,U+955e,U+956b,U+95e9,U+9604,U+960b,U+9612,U+9615,U+9617,U+96b9,U+989a-989b,U+989e,U+9a78,U+9a7d,U+9aa0,U+9aa2,U+9ac2,U+9b23,U+9b3b,U+9c82,U+9cca,U+9cd9,U+9e28,U+9e5a,U+9e5e,U+9e6c,U+9efe,U+9f0b\"}},{uri:_149,descriptors:{unicodeRange:\"U+4e47,U+4e8d,U+4f65,U+4f89,U+50ee,U+520e,U+5416,U+5454,U+54bb,U+54c2,U+54d3,U+54de,U+5591,U+55e5,U+560c,U+566b,U+5769,U+578c,U+5793,U+57e4,U+5889,U+593c,U+59ab,U+5ad4,U+5ad8,U+5af1,U+5b53,U+5ba5,U+5c59,U+5c63,U+5d5b,U+5e0f,U+5e14,U+5edb,U+5fbc,U+6004,U+60ad,U+610e,U+61b7,U+624c,U+634c,U+647a,U+64ba,U+65f0,U+6600,U+66f7,U+67e2,U+67f0,U+680c,U+686b,U+6874,U+691f,U+6989,U+6a17,U+6b81,U+6b84,U+6c06-6c07,U+6c3d,U+6d07,U+6d27,U+6d2b,U+6d91,U+6e6b,U+6e8f,U+6fde,U+70bb,U+723b,U+726e,U+72b0,U+72ce,U+72f2,U+7301,U+731e,U+737e,U+7477,U+748e,U+74ff,U+7633,U+7654,U+771a,U+7726,U+7765,U+7768,U+781c,U+7829,U+78d4,U+7913,U+7957,U+79d5,U+79eb,U+7a70,U+7a86,U+7b25,U+7b38,U+7b47,U+7b72,U+7ba6-7ba7,U+7dae,U+7ee1,U+7efe,U+7f26,U+7f31,U+7f35,U+801c,U+8043,U+809f,U+80ab,U+80d7,U+8118,U+8188,U+81cc,U+823e,U+8244,U+824f,U+82b4,U+82c1,U+82e4,U+82f4,U+8306,U+833a,U+835c,U+839c,U+83b3,U+83bc,U+846d,U+867a,U+868b,U+8734,U+87ca,U+886e,U+887e,U+88a2,U+88c9,U+8921,U+8bb5,U+8bf3,U+8c04,U+8c17,U+8c1d,U+8c25,U+8c36,U+8c55,U+8c78,U+8d3d,U+8d40,U+8d59,U+8d67,U+8d91,U+8dbf,U+8deb-8dec,U+8dfd,U+8e14,U+8e41,U+8f8e,U+900b,U+9044,U+9062,U+90cf,U+9123,U+9146,U+9162,U+9172,U+918d,U+9190,U+92c8,U+93ca,U+948c,U+94aa,U+94b2,U+94c8,U+94ca,U+94d5,U+94df,U+94e9-94ea,U+94f7,U+94fc-94fd,U+951b,U+954f,U+9554,U+9559,U+9566,U+9571-9572,U+95f1,U+9608,U+960f,U+97af,U+988f,U+98d5,U+992e,U+9955,U+9ab0,U+9b32,U+9c90,U+9c9e,U+9ca5,U+9ca9,U+9cad,U+9cb1,U+9cc3,U+9e47,U+9ee7,U+9f87\"}},{uri:_150,descriptors:{unicodeRange:\"U+4e93,U+4ec4,U+4ef5,U+4f27,U+4f7b,U+4fe3,U+5080,U+5121,U+51eb,U+5208,U+52f0,U+53f5,U+5453,U+5466,U+54a6,U+54bf,U+54d0,U+5533,U+5549,U+5556,U+556d,U+558f,U+55f2,U+55f5,U+5627,U+567b,U+56d4,U+571c,U+5739,U+57b4,U+5807,U+58c5,U+59a4,U+59af,U+59d8,U+5a09,U+5a0c,U+5a4a,U+5ad2,U+5b6c,U+5ca2,U+5cac,U+5d03,U+5d6c,U+5db7,U+5ebe,U+5f2d,U+5fea,U+6042,U+6120,U+6175,U+6221,U+623e,U+6339,U+638a,U+643d,U+64b8,U+64e2,U+66e9,U+67b3,U+67c1,U+67d2,U+6832,U+6877,U+68f0,U+6934,U+6966,U+6987,U+6998,U+69c1,U+69ce,U+6a3d,U+6a84,U+6aa9,U+6b87,U+6bd6,U+6c16,U+6c18,U+6cd4,U+6cee,U+6de0,U+6e0c,U+6ecf,U+6f4b,U+70b7,U+7168,U+72d9,U+7352,U+73b3,U+73d0,U+7441,U+74d2,U+75a5,U+75e7-75e8,U+7610,U+7619,U+765e,U+772d,U+7812,U+782c,U+784c,U+7850,U+7856,U+789b,U+78f4,U+7a51,U+7b15,U+7b1e,U+7b24,U+7b5a,U+7bb8,U+7bc1,U+7bd9,U+7ed0,U+7ee6,U+7efa,U+7f1b,U+7f1f,U+7f22,U+7f45,U+7f71,U+7fa7,U+7fbf,U+7ff3,U+8052,U+80b1,U+80db,U+80f4,U+81bb,U+81ec,U+8202,U+8210,U+8249,U+828a,U+828e,U+82e3,U+8315,U+8369,U+8378,U+83a8,U+83aa,U+83b4,U+83e1,U+84fc,U+8538,U+853b,U+859c,U+85ae,U+86b4,U+86c9,U+86cf,U+8725,U+879f,U+87b3,U+887d,U+88fe,U+8a8a,U+8ba7,U+8c07,U+8c14,U+8c30,U+8c47,U+8db5,U+8dd7,U+8e1f,U+8e69,U+8e70,U+8e85,U+8f78,U+8f87,U+8f8b,U+8f8f,U+90c4,U+9143,U+917d,U+948f,U+94cd,U+94d2,U+94ef,U+954a,U+9609-960a,U+96d2,U+9708,U+9765,U+97ea,U+9880,U+98a7,U+996c,U+9980,U+9991,U+9a88,U+9ab6,U+9afb,U+9b47,U+9c87,U+9c9b,U+9cb5,U+9cc7,U+9e2c,U+9e42,U+9e58,U+9ecd,U+9ecf,U+9f8a,U+9f8c\"}},{uri:_151,descriptors:{unicodeRange:\"U+4ebb,U+4edd,U+4fa9,U+502c,U+50a5,U+51c7,U+51fc,U+523d,U+5241,U+530f,U+5464,U+549d,U+54a3,U+5514,U+5527,U+555c,U+556e,U+5576,U+55b1,U+55b9,U+55eb,U+5624,U+564c,U+5671,U+5685,U+568f,U+56d7,U+56e1,U+57a1,U+57d9,U+5942,U+5a67,U+5c50,U+5c7a,U+5c98,U+5d06,U+5d27,U+5d6f,U+5df3,U+5dfd,U+5e19,U+5ea0,U+5eb9,U+5eea,U+5ffe,U+600f,U+606b,U+6215,U+622c,U+6266,U+62bb,U+62bf,U+6308,U+6387,U+63b8,U+63c4,U+63c6,U+63f6,U+6441,U+6555,U+659b,U+6677,U+66a7,U+6775,U+678b,U+679e,U+6840,U+6849,U+6860,U+68c2,U+6910,U+6a28,U+6a2f,U+6a79,U+6b92-6b93,U+6bc2,U+6bfd,U+6c29,U+6c32,U+6c86,U+6cc5,U+6d0c,U+6d60,U+6da0,U+6ddd,U+6e86,U+6ed3,U+6edf,U+6fb9,U+6fd1,U+6fef,U+7023,U+7080,U+70ca,U+712f,U+7145,U+7284,U+732c,U+73c8,U+73d9,U+740a,U+7457,U+7596,U+759d,U+75a3,U+75d8,U+75e3-75e4,U+75ff,U+7622,U+7688,U+76b4,U+76e5,U+7818,U+7887,U+789a,U+78b2,U+7b08,U+7b33,U+7c2a,U+7ccc,U+7ea8,U+7ec0,U+7fe6,U+8012,U+8084,U+8093,U+80e4,U+80ef,U+8297,U+82a8,U+82be,U+8331,U+8366,U+83c5,U+83fd,U+8473,U+84a1,U+84ca,U+84d1,U+857b,U+85c1,U+85d3,U+8605,U+8662,U+86aa,U+86b1,U+86d4,U+86ed,U+86f3,U+8709,U+8748,U+874c,U+8763,U+89c7,U+89de,U+89e5,U+8a3e,U+8ba6,U+8c00,U+8c21,U+8c49,U+8c7a,U+8d30,U+8df9,U+8e51,U+8e59,U+8f6b,U+8f73,U+8ff3,U+9016,U+9026,U+902f,U+9099,U+909b,U+90c7,U+914a,U+91ae,U+91ba,U+9495,U+94a3,U+94af,U+94ba,U+94bf,U+94cc,U+94e1,U+94f0,U+9531,U+955d,U+95f3,U+9697,U+96bc,U+975b,U+977c,U+98a2,U+998a,U+9994-9995,U+9a9b,U+9ab7,U+9ac5,U+9c91,U+9ccf,U+9cd5,U+9e29,U+9edc,U+9edf,U+9f83,U+9f88-9f89\"}},{uri:_152,descriptors:{unicodeRange:\"U+4ee8,U+4f22,U+4f43,U+4f57,U+4f5d,U+4f6f,U+4ff8,U+502d,U+507b,U+5345,U+53df,U+53fb,U+544b,U+5482,U+54a7,U+54cc,U+550f,U+5544,U+5555,U+5594,U+55e8,U+55ec,U+55ef,U+564e,U+56f9,U+5704,U+576d,U+5785,U+57ad,U+5914,U+5958,U+599e,U+59aa,U+59be,U+5a06,U+5abe,U+5ae1,U+5b40,U+5bee,U+5cbf,U+5cc4,U+5ccb,U+5d47,U+603f,U+6078,U+607d,U+607f,U+608c,U+609a,U+60fa,U+61ff,U+621b,U+622e,U+626a,U+6371,U+63ae,U+63cd,U+63d6,U+6410,U+6414,U+6421,U+6448,U+64d8,U+6710,U+6748,U+6772,U+680e,U+6954,U+69ab,U+6c68,U+6c8f,U+6ca4,U+6d2e,U+6e4e,U+6e98,U+6fe0,U+7094,U+70e9,U+7116,U+7119,U+723f,U+73c9,U+74e4,U+753e,U+7548,U+75bd,U+75cd,U+7618,U+7634,U+76c5,U+76f1,U+7708,U+7719,U+777e,U+7791,U+77b3,U+7823,U+7827,U+7830,U+7889,U+7893,U+7949,U+795c,U+79e3,U+7a14,U+7a88,U+7a95,U+7aa0,U+7afd,U+7b90,U+7bd1,U+7bfe,U+7da6,U+7ec2,U+7eef,U+7f03-7f04,U+7f08,U+7f58,U+7f61,U+7f9f,U+8174,U+8200,U+828d,U+82c4,U+82d5,U+82dc,U+82f7,U+832d,U+835a,U+840b,U+8438,U+852b,U+869d,U+86ac,U+86d0,U+86f0,U+8782,U+87a8,U+87d1-87d2,U+87e0,U+8839,U+8913,U+891b,U+8934,U+8941,U+89ca,U+89ce,U+8a07,U+8ba3,U+8bc5,U+8bcb,U+8bdb,U+8c11,U+8c15,U+8c29,U+8c32,U+8dc4,U+8dce,U+8ddb,U+8dfa,U+8e09,U+8e1d,U+8e39,U+8e42,U+8e49,U+8e4b,U+8e8f,U+8f71-8f72,U+9004,U+9036,U+9097,U+90dc,U+90e2,U+90e6,U+90ef,U+9104,U+919a,U+91b4,U+938f,U+9497,U+950f,U+9557,U+9562-9563,U+9573,U+9606,U+9649,U+972d,U+973e,U+97a3,U+97eb,U+988c,U+9894,U+98a6,U+9974,U+9977,U+997d,U+9a90,U+9a9d,U+9aef,U+9ca2,U+9ccd,U+9cdf,U+9e20,U+9e4c,U+9e6b,U+9f3e\"}},{uri:_153,descriptors:{unicodeRange:\"U+4ede,U+4ee1,U+4eeb,U+4fda,U+4ffe,U+5025,U+506c,U+50f3,U+5106,U+520d,U+525c,U+52ad,U+530d,U+5310,U+539d,U+53a9,U+53fc,U+5421,U+5477,U+54e7,U+551b,U+5530,U+557e,U+5599,U+55c4,U+55d1,U+55d4,U+55df,U+55e4,U+55ea,U+5623,U+562d,U+5654,U+56eb,U+56f5,U+57a7,U+57d5,U+57dd,U+584d,U+5880,U+58ec,U+59dd,U+5a32,U+5a55,U+5a75,U+5b51,U+5b71,U+5b73,U+5cd2,U+5ce4,U+5e5b,U+5e96,U+5fd2,U+607b,U+61d1,U+634b,U+636d,U+63b3,U+63ff,U+64c0,U+661d,U+6657,U+66dc,U+67a5,U+6841,U+6867,U+6901,U+699b,U+6a47,U+6b46,U+6c21,U+6c24,U+6c35,U+6c4a,U+6c94,U+6ca3,U+6d39,U+6d63,U+6d6f,U+6d94,U+705e,U+71e7,U+726f,U+72cd,U+72de,U+72f0,U+7325,U+7350,U+7391,U+741a,U+757f,U+7583,U+75b1,U+75b4,U+75b8,U+75c2,U+75f1,U+766f,U+7699,U+7751,U+789c,U+7a17,U+7be6,U+7cb2,U+7ea3,U+7eb0,U+7ebe,U+7eeb,U+7f25,U+7f2c,U+7fb8,U+8026,U+8037,U+8153,U+8171,U+8191,U+8214,U+821b,U+8222,U+826e,U+82eb,U+830c,U+8314,U+8334,U+83d6,U+8418,U+843c,U+84ff,U+8564,U+8572,U+8616,U+866c,U+8693,U+86a3,U+86a7,U+86af,U+86b6,U+86c6,U+86ca,U+8708,U+870d,U+8759,U+8760,U+87af,U+87c6,U+8869,U+88c6,U+89d0,U+8b07,U+8baa-8bab,U+8bc2,U+8be4,U+8bf0,U+8c2a,U+8c62,U+8c89,U+8d49,U+8d6d,U+8d84,U+8d94,U+8db8,U+8dc6,U+8e2e,U+8e3d,U+8e47,U+8e7f,U+9005,U+9051,U+907d,U+9082,U+9088,U+90b0,U+90d3,U+9150,U+949c,U+94a4,U+94b9,U+94cb,U+94e0,U+9509,U+9512,U+951f,U+9534,U+9552-9553,U+965f,U+96b0,U+9791,U+9889,U+9990,U+9a9c,U+9aa7,U+9c88,U+9cb2-9cb3,U+9cb6-9cb7,U+9cc5,U+9cdc,U+9e22,U+9e2a,U+9e57,U+9e67,U+9e73,U+9e82,U+9eb8,U+9ee0,U+9f9b\"}},{uri:_154,descriptors:{unicodeRange:\"U+4eb5,U+4f09,U+4f5a,U+4f8f,U+4fce,U+4fdf,U+4fea,U+4ff3,U+500c,U+500f,U+504e,U+5088,U+52be,U+5420,U+5457,U+5499,U+549b,U+54c6,U+54d2,U+558b,U+559f,U+55bd,U+55d6,U+565c,U+567c,U+568e,U+5768,U+577b,U+57a9,U+57ed,U+59f9,U+5a11,U+5a40,U+5ae6,U+5b6a,U+5b93,U+5bb8,U+5c15,U+5c99,U+5c9c,U+5cc1,U+5d2e,U+5d4b,U+5d99,U+5e54,U+5e61,U+5fcf-5fd1,U+6002,U+6006,U+6014,U+60af,U+60c6,U+60da,U+60f4,U+621f,U+62c8,U+631b,U+631e,U+63e9,U+64b5,U+655d,U+6619,U+6635,U+6641,U+67ad,U+67b0,U+67b7,U+67e9,U+684e,U+688f,U+695d,U+696b,U+69b7,U+6a58,U+6c26,U+6d35,U+6d43,U+6d9e,U+6dd9,U+6dec,U+6e11,U+6e6e,U+6e9f,U+6ec2,U+6ee2,U+6ef9,U+6f09,U+6f66,U+6f8d,U+6fc2,U+6fc9,U+729f,U+72c8,U+73de,U+7430,U+7566,U+7579,U+75c9,U+75e2,U+75fc,U+762a,U+7638,U+7678,U+76c2,U+76f9,U+778c,U+77cd,U+77dc,U+7800,U+781d,U+782d,U+783b-783c,U+78a3,U+78ec,U+7980,U+7a23,U+7b95,U+7bdd,U+7c0c,U+7c41,U+7c91,U+7cb3,U+7cc5,U+7ecc,U+7f19,U+7fca,U+8006,U+8069,U+807f,U+80bd,U+80ed,U+814b,U+8198,U+82cb,U+82d2,U+834f,U+8360,U+847a,U+84d6,U+84e5,U+8537,U+85d0,U+8671,U+86a4,U+86ce,U+86f9,U+8703,U+8707,U+8737,U+873b,U+8815,U+8936,U+8bc3,U+8bcf,U+8bd2,U+8bd8,U+8be9,U+8c0c,U+8c0f,U+8c4c,U+8d45,U+8d5d,U+8d73,U+8e31,U+8e6d,U+8e76,U+8fe4,U+9041,U+90d7,U+9169,U+92ae,U+94a1,U+94c4,U+94c9,U+94db,U+94e7,U+9503,U+9506,U+9517,U+9528,U+9537,U+9542,U+9549,U+95fe,U+9616,U+961a,U+96c9,U+96f3,U+9701,U+970e,U+9739,U+9753,U+9798,U+98d2-98d3,U+98d9-98da,U+9968,U+996f,U+9984,U+9997,U+9acb,U+9b03,U+9c85,U+9ca8,U+9cab,U+9e49,U+9e51,U+9e66,U+9f10\"}},{uri:_155,descriptors:{unicodeRange:\"U+4e15,U+4e1e,U+4e2b,U+4eb3,U+4ec9,U+4f0e,U+4f64,U+501c,U+50a9,U+510b,U+51a2,U+51bc,U+527d,U+52d0,U+53fd,U+5429,U+542e,U+5486,U+54af,U+5506,U+5511,U+5522,U+552c,U+556c,U+55b3,U+55d2,U+55e6,U+55fd,U+561f,U+5639,U+5659,U+5662,U+5693,U+572a,U+5892,U+598a,U+5992,U+59a9,U+5a20,U+5ae3,U+5b17,U+5b7d,U+5d34,U+5d3d,U+5d4a,U+5d82,U+5e1a-5e1b,U+5ea5,U+5f0b,U+5f77,U+5fd6,U+5fff,U+6026,U+6035,U+6063,U+60b4,U+60bb,U+60ee,U+612b,U+6194,U+61ca,U+61e6,U+61f5,U+620a,U+6248,U+62a1,U+62d7,U+6376,U+637b,U+652b,U+65bc,U+65cc,U+65ce,U+65d6,U+664c,U+665f,U+6666,U+6684,U+66b9,U+6773,U+6777,U+6787,U+67de,U+6845,U+693d,U+6994,U+6a35,U+6d54,U+6d5c,U+6d8e,U+6dd6,U+6eb4,U+6f2a,U+6f78,U+704f,U+70ec,U+7118,U+714a,U+7172,U+71b9,U+724d,U+728a,U+7337,U+733e,U+7396,U+73b7,U+73cf,U+7428,U+742c,U+742e,U+74ee,U+74f4,U+7525,U+753a,U+7572,U+75d4,U+765c,U+768e,U+7762,U+777d,U+77fd,U+7825,U+7837,U+78b4,U+795f,U+79ed,U+7a1e,U+7b06,U+7b20,U+7ba9,U+7bab,U+7c7c,U+7cbd,U+7cdc,U+7ec9,U+7ef6,U+7f30,U+7f42,U+7f44,U+7f54,U+7f94,U+8004,U+800b,U+8019,U+809b,U+80ae,U+80c4,U+80f1,U+8146,U+816e,U+817c,U+81c0,U+81fc,U+81fe,U+822b,U+830f,U+832f,U+8340,U+8365,U+8385,U+8392,U+83a0,U+8424,U+84af,U+869c,U+8713,U+8717-8718,U+87c0,U+87cb,U+87fe,U+8821,U+8902,U+89d1,U+8bb9,U+8c12,U+8d32,U+8d53,U+8df7,U+8e7c,U+8f7c,U+8f95,U+8fab,U+9052,U+905b,U+9095,U+909d,U+90c5,U+911e,U+9122,U+916a,U+919b,U+948e,U+9492,U+949a,U+94b5,U+94bc,U+94c6,U+94f1,U+9502,U+9511,U+9536,U+956f-9570,U+9602,U+9621,U+9631,U+998b,U+99a5,U+9a81,U+9a9e,U+9ebe,U+9f8b\"}},{uri:_156,descriptors:{unicodeRange:\"U+4f2b,U+4f3d,U+4fac,U+5043,U+5055,U+5140,U+5156,U+51cb,U+5243,U+531d,U+536f,U+53a5,U+53ae,U+53f1,U+541d,U+5431,U+547b,U+5492,U+5494,U+54a4,U+54aa,U+54ce,U+54fd,U+5509,U+5520,U+553e,U+557b,U+55c5,U+55e1,U+55f7,U+5608,U+5636,U+563b,U+5773,U+57a0,U+5811,U+587e,U+58d5,U+59e3,U+5a29,U+5a6a,U+5a76,U+5a7a,U+5ac9,U+5b62,U+5b95,U+5c49,U+5c8c,U+5cab,U+5cb7,U+5d02,U+5d58,U+5e44,U+5e7a,U+5eff,U+5f29,U+5f89,U+5f9c,U+5fa8,U+6005,U+6043,U+60b8,U+60d8,U+60ec,U+60f0,U+6115,U+618e,U+630e,U+637a,U+6390,U+63ac,U+63b0,U+64de,U+6525,U+6538,U+65ee-65ef,U+6631,U+6636,U+6654,U+677c,U+67b8,U+67d8,U+683e,U+6886,U+68b5,U+692d,U+6963,U+6979,U+6988,U+6b59,U+6b9a,U+6c69,U+6c74,U+6cae,U+6ce0,U+6cef,U+6d95,U+6dc5,U+6dde,U+6de6,U+6dfc,U+6ea7,U+6f15,U+6f29,U+7096,U+70c3,U+7131,U+715c,U+7166,U+7266,U+7317,U+731d,U+7329,U+73e9,U+7425,U+7455,U+7490,U+74ef,U+7519,U+75b5,U+75b9,U+75de,U+7656,U+7663,U+7691,U+7729,U+77fe,U+783e,U+787c,U+795a,U+7a79,U+7abf,U+7b3a,U+7b4f,U+7b60,U+7b75,U+7b8d,U+7bb4,U+7bd3,U+7be1,U+7cbc,U+7edb,U+7f1c,U+7f8c,U+7fb2,U+7fb9,U+7fce,U+7ff1,U+810d,U+81c6,U+82a5,U+82aa,U+82de,U+8317,U+8343,U+835e,U+8364,U+836a,U+853a,U+8543,U+854a,U+8559,U+8568,U+85b0,U+85b9,U+864f,U+86e4,U+8715,U+8845,U+8884,U+88e8,U+88f1,U+8983,U+8be1,U+8c1f,U+8c27,U+8c5a,U+8c82,U+8d58,U+8dbe,U+8f98,U+9035,U+9074,U+90a1,U+9149,U+9157,U+93d6,U+949d,U+94c2,U+94e3-94e4,U+95eb,U+95f0,U+9611,U+9619,U+9642,U+968d,U+9706,U+970f,U+97ed,U+988a,U+9893,U+98e8,U+9a77,U+9a87,U+9aa1,U+9abc,U+9cdd,U+9e2f,U+9e33,U+9e44,U+9e5c,U+9e9d,U+9edd\"}},{uri:_157,descriptors:{unicodeRange:\"U+4f58,U+4f6c,U+4f70,U+4fd0,U+5014,U+51bd,U+524c,U+5315,U+5323,U+535e,U+540f,U+542d,U+545b,U+548e,U+549a,U+54ab,U+54fc,U+5567,U+556a,U+5600,U+5618,U+563f,U+5669,U+56f1,U+56ff,U+573b,U+574d,U+579b,U+57b8,U+57c2,U+586c,U+58f9,U+595a,U+598d,U+5993,U+5996,U+59d7,U+5b7a,U+5ba6,U+5c4e,U+5c96,U+5ce5,U+5eb6,U+5f08,U+5f99,U+602f,U+6059,U+606c,U+607a,U+60ed,U+61a9,U+620c,U+6249,U+62a8,U+62c4,U+62ed,U+62fd,U+6342,U+6345,U+6396,U+63a3,U+6402,U+6413,U+642a,U+6487,U+64a9,U+64ac,U+64ae,U+64b7,U+659f,U+65a1,U+667e,U+66f3,U+67e0,U+69db,U+69df,U+6aac,U+6b86,U+6c50,U+6c5e,U+6c76,U+6c85,U+6c8c,U+6cde,U+6d19,U+6d52,U+6da7,U+6db8,U+6e1a,U+6e25,U+6e4d,U+6e5f,U+6ec1,U+6f31,U+6f7a,U+6fa7,U+6fe1,U+701b,U+70ab,U+70f7,U+717d,U+71a8,U+7252,U+72c4,U+72e1,U+7315,U+736d,U+73ae,U+73c0,U+73c2,U+740f,U+75a4,U+7600-7601,U+768b,U+76bf,U+76d4,U+7728,U+772f,U+776c,U+77a0,U+77b0,U+77f8,U+783a,U+78d0,U+78fa,U+7977,U+7a37,U+7a92,U+7afa,U+7b71,U+7b94,U+7cef,U+7f28,U+7fe1,U+808b,U+80e5,U+80eb,U+8110,U+8113,U+812f,U+814c,U+81c3,U+8235,U+82d4,U+8309,U+83c1,U+8431,U+8469,U+84bf,U+84d3,U+84df,U+84e6,U+8511,U+8638,U+86c0,U+86db,U+86fe,U+8757,U+8822,U+8882,U+8885,U+8892,U+88f3,U+892a,U+8ba5,U+8bd9,U+8be0,U+8be7,U+8bfd,U+8c1a,U+8d4a,U+8d4e,U+8d66,U+8dda,U+8e0c,U+8e52,U+8e74,U+8e87,U+8f76,U+8fc2,U+8fe6,U+900d,U+9068,U+90ac,U+90b3,U+90b8,U+90e7,U+9119,U+9131,U+915a,U+916e,U+94b4,U+94d0,U+94e2,U+94ec,U+94ff,U+9522,U+9535,U+9556,U+965b,U+96f9,U+9774,U+9981,U+998d,U+998f,U+9a6e,U+9a7f,U+9a8a,U+9b13,U+9c9f,U+9e3e,U+9e43,U+9e6d,U+9e8b,U+9e92,U+9edb,U+9eef\"}},{uri:_158,descriptors:{unicodeRange:\"U+4e10,U+4e56,U+4e98,U+4ec3,U+4f3a,U+4f5f,U+4f88,U+4f97,U+4fa5,U+4fe8,U+504c,U+5197,U+52fa,U+5364,U+53e8,U+5406,U+543c,U+545c,U+5471,U+5480,U+5495,U+54b3,U+54df,U+54e6,U+54ee,U+557c,U+5583,U+55dc,U+55e3,U+566c,U+592f,U+5944,U+5983,U+59ca,U+59e5,U+5a13,U+5a7f,U+5b09,U+5bd0,U+5e4c,U+5eb5,U+5f1b,U+5f3c,U+608d,U+60cb,U+61a7,U+61ac,U+61cb,U+6233,U+62a0,U+62e7,U+62ee,U+62f4,U+62f7,U+634e,U+6382,U+63c9,U+63ea,U+6400,U+645e,U+6482,U+6556,U+6593,U+6615,U+664f,U+66e6,U+672d,U+675e,U+67da,U+6805,U+6808,U+6868,U+68a2,U+695e,U+69ad,U+6a80,U+6a90,U+6b83,U+6be1,U+6c30,U+6cad,U+6cb1,U+6cf1,U+6d31,U+6d93,U+6dae,U+6dbf,U+6dc6-6dc7,U+6e0d,U+6e32,U+6e3a,U+6e85,U+6eba,U+6f3e,U+6f5e,U+6f7c,U+6fee,U+71ee,U+722a,U+72b7,U+72e9,U+73ba,U+73d1,U+7409,U+7435-7436,U+7459-745a,U+747e,U+7487,U+74e2,U+7504,U+752c-752d,U+7599,U+759f,U+75a1,U+75ca,U+75f0,U+761f,U+7629,U+777f,U+7785,U+77a5,U+77bf,U+78d5,U+7934,U+7940,U+79a7,U+7b19,U+7c38,U+7c95,U+7cb1,U+7ce0,U+7eca,U+7ef7,U+7f2b,U+7f81,U+7fcc,U+8046,U+8148,U+8165,U+819b,U+81ba,U+828b,U+82ae,U+82b7,U+82d3,U+8301,U+830e,U+831c,U+8338,U+837c,U+8393,U+8398,U+83ba,U+83e0,U+83e9,U+853c,U+8654,U+86df,U+8712,U+873f,U+874e,U+8783,U+8859,U+88a4,U+8925,U+8bb7,U+8bff,U+8c19,U+8c1b,U+8c24,U+8c2c,U+8d61,U+8db4,U+8e6c,U+8f8a,U+8fe5,U+8ff8,U+901e,U+90f4,U+912f,U+9163,U+9170,U+91dc,U+949b,U+94a8,U+94b3,U+94c0,U+94e8,U+9525,U+9530,U+9539,U+954c-954d,U+9550,U+955b,U+962a,U+9685,U+96cc,U+9776,U+988d,U+9975,U+9985,U+9a6f,U+9aa5,U+9ab8,U+9c7f,U+9ca4,U+9cb8,U+9e25,U+9e35,U+9e4a\"}},{uri:_159,descriptors:{unicodeRange:\"U+4ea2,U+4ea5,U+4f36,U+4f84,U+4f8d,U+501a,U+5029,U+516e,U+51a5,U+51c4,U+51f8,U+5201,U+527f,U+5321,U+5352,U+5366,U+53e9,U+54c7,U+5632,U+5676,U+56b7,U+56bc,U+56da,U+56e4,U+5703,U+5729,U+5742,U+57a2-57a3,U+5815,U+58d1,U+5919,U+592d,U+5955,U+5a05,U+5a25,U+5a34,U+5b70,U+5b75,U+5bdd,U+5bf0,U+5c41,U+5c79,U+5c91,U+5c94,U+5ce6,U+5ced,U+5d69,U+5dc5,U+5e16,U+5e27,U+5f27,U+5f95,U+5ffb,U+6020,U+604d,U+6055,U+60e6,U+60eb,U+6123,U+618b,U+61a8,U+620d,U+62c7,U+62ce,U+62d9,U+631f,U+634d,U+6452,U+6479,U+64ce,U+64d2,U+655b,U+660a,U+6726,U+67c4,U+6809,U+6853,U+68e3,U+68f1,U+68fa,U+693f,U+6942,U+6995,U+69a8,U+69b4,U+6a71,U+6b89,U+6bcb,U+6bd3,U+6bd9,U+6c40,U+6cf8,U+6cfe,U+6d85,U+6da3,U+6daa,U+6e0e,U+6e43-6e44,U+6f88,U+7078,U+7099,U+70bd,U+70d9,U+70fd,U+7109,U+7184,U+7239,U+733f,U+73f2,U+748b,U+749c,U+749e,U+759a,U+75d2,U+75eb,U+7620,U+766b,U+7693,U+76cf,U+7738,U+773a,U+776b,U+778e,U+77aa,U+7852,U+78be,U+7948,U+795b,U+7960,U+796f,U+79ba,U+7a20,U+7a96,U+7aa5,U+7b03,U+7b28,U+7b50,U+7b77,U+7bc6,U+7bf1,U+7c27,U+7d0a,U+7ead,U+7ec5,U+7ee2,U+7ef0,U+7efd,U+7f0e,U+7f2e,U+7f79,U+7f9a,U+8098,U+80da,U+80e7,U+80f0,U+80f3,U+80fa,U+818a,U+81e7,U+8237-8238,U+8299,U+82b8,U+82ce,U+837b,U+83bd,U+83cf,U+8426,U+8475,U+85c9,U+85d5,U+85dc,U+85e9,U+871a,U+8747,U+8749,U+888d,U+8910,U+891a,U+8bb4,U+8be3,U+8bec,U+8bf2,U+8c06,U+8c0d,U+8d31,U+8d48,U+8de4,U+8e1e,U+8e4a,U+8e66,U+8f84,U+8f97,U+9083,U+90e1,U+9165,U+91c9,U+94b0,U+94f5,U+9504,U+9532,U+956d,U+95f5,U+95fa,U+9668,U+9698,U+96bd,U+9704,U+9773,U+9890,U+996a,U+997a,U+9a74,U+9a8b,U+9cc4,U+9ccc\"}},{uri:_160,descriptors:{unicodeRange:\"U+4ea8,U+4f1e,U+4f51,U+4f63,U+4f7c,U+4f83,U+4fa0,U+4fd1,U+4ffa,U+5018,U+5026,U+508d,U+50bb,U+50f5,U+50fb,U+5162,U+5319,U+5320,U+538c,U+5413,U+541f,U+5475,U+54bd,U+54d1,U+5589,U+5598,U+575f,U+57ae,U+57e0,U+5937,U+5974,U+5978,U+59ae,U+5a1f,U+5a49,U+5ab3,U+5b99,U+5b9b,U+5ba0,U+5be1,U+5be5,U+5c09,U+5c27,U+5de2,U+5e9a,U+5f26,U+5f8a,U+5f98,U+6021,U+606d,U+60bc,U+60d5,U+60e7,U+611a,U+614c,U+6254,U+626f,U+6292,U+6296,U+62b9,U+62e2,U+631a,U+631d,U+6320,U+6346,U+63ba,U+6467,U+64bc,U+658b,U+663c,U+6643,U+6652,U+6656,U+6687,U+66d9,U+66dd,U+66f0,U+673d,U+67ab,U+6816-6817,U+68a7,U+68ad,U+68cd,U+68e0,U+6986,U+69fd,U+6b47,U+6bd7,U+6c1f,U+6c2e-6c2f,U+6cbe,U+6de4,U+6e1d,U+6e83,U+6e9c,U+6ed4-6ed5,U+6f4d,U+70f9,U+7130,U+716e,U+718f,U+71ac,U+71e5,U+72fc,U+731c,U+7334,U+73ca,U+7422,U+7426,U+745f,U+7470,U+75af,U+75f4,U+762b,U+763e,U+7696,U+7737,U+7741,U+77a7,U+77bb,U+77ee,U+785d,U+788c,U+78ca,U+7901,U+796d,U+7985,U+79fd,U+7a3c,U+7a57,U+7a74,U+7b5b,U+7caa,U+7cb9,U+7cd5,U+7eac,U+7eb6,U+7ed1,U+7ee5,U+7f20,U+7f2a,U+7f38,U+7f69,U+7fa1,U+8018,U+8038,U+803f,U+804b,U+80a2,U+80be,U+80d6,U+817a,U+81fb,U+820c,U+82ad,U+82af,U+82bd,U+8327,U+8354,U+835f,U+8367,U+836b,U+840c,U+841d,U+8471,U+849c,U+84b2,U+84c9,U+8517,U+851a,U+8549,U+8681,U+8721,U+8776,U+88d9,U+88f9,U+89c5,U+8c1c,U+8c34,U+8d81,U+8d9f,U+8e0a,U+8e72,U+8eb2,U+8fed,U+901b,U+902e,U+906e,U+9091,U+90aa,U+90af,U+915d,U+9171,U+946b,U+9489,U+9499,U+94a5,U+9508,U+9524,U+952d,U+9551,U+9576,U+95f7,U+9600,U+96b6,U+96c0,U+9756,U+97f6,U+98a0,U+98a4,U+997f,U+9a73,U+9a86,U+9ad3,U+9e3d,U+9ed4\"}},{uri:_161,descriptors:{unicodeRange:\"U+4e4d,U+4e5e,U+4ec7,U+4ed5,U+50da,U+50e7,U+515c,U+51a4,U+51ff,U+5203,U+5254,U+5300,U+533e,U+5375,U+53ee,U+5435,U+543b,U+5455,U+548b,U+548f,U+54d7,U+54fa,U+5578,U+5587,U+55a7,U+560e,U+5760,U+576f,U+5777,U+5830,U+58a9,U+5962,U+59e8,U+5a07,U+5a23,U+5a3c,U+5b5a,U+5bb5,U+5bc5,U+5bde,U+5c7f,U+5cb1,U+5ce8,U+5cea,U+5d29,U+5d4c,U+5e18,U+5f57,U+5f5d,U+5f87,U+5ff1,U+6016,U+601c,U+6064,U+6177,U+61d2,U+625b,U+62e3,U+62f1,U+634f,U+63a0,U+6401,U+6405,U+6495,U+64c2,U+6512,U+6577,U+6590,U+65a7,U+65a9,U+65f7,U+6627,U+6655,U+6714,U+6795,U+67d1,U+67ff,U+68b3,U+68d5,U+68d8,U+6930,U+6960,U+6977,U+69bb,U+69d0,U+6a31,U+6b7c,U+6bb4,U+6c22,U+6c72,U+6c79,U+6c7e,U+6c81,U+6c93,U+6ca5,U+6cbc,U+6ce3,U+6cfb,U+6d3c,U+6da9,U+6df3,U+6e2d,U+6eaf,U+6ec7,U+6f13,U+6f33,U+6f62,U+6fa1,U+7011,U+707c,U+708a,U+70c1,U+70d8,U+70eb,U+711a,U+7194,U+7281,U+7316,U+7357,U+7384,U+7405,U+742a,U+745b,U+7574,U+7578,U+75ea,U+7682,U+7792,U+77d7,U+77e9,U+77eb,U+77f6,U+780c,U+78c5,U+7941,U+79e4,U+7a1a,U+7a9c,U+7ad6,U+7b5d,U+7bf7,U+7c07,U+7c3f,U+7c9f,U+7ca5,U+7cdf,U+7e82,U+7eab,U+7ece,U+7eda,U+7f09,U+7f15,U+7f9e,U+7fdf,U+7fe9,U+803b,U+803d,U+80aa,U+80b4,U+813e,U+8155,U+817b,U+819d,U+821c,U+82b9,U+82df,U+82ef,U+8304,U+83b9,U+8446,U+853d,U+85af,U+85fb,U+8650,U+865e,U+86d9,U+86ee,U+8700,U+8862,U+889c,U+88d4,U+88f8,U+895f,U+8a79,U+8bb3,U+8bb6,U+8bc0,U+8beb,U+8bf5,U+8c23,U+8c79,U+8d1e,U+8dcb,U+8e29,U+8e44,U+8e81,U+8eac,U+8eaf,U+8f8d,U+9050,U+90f8,U+914b,U+948a,U+94be,U+94ee,U+950c,U+9540,U+962e,U+9647,U+9661,U+9699,U+96cf,U+9716,U+9761,U+97a0,U+97e7,U+9a7c,U+9a8f,U+9ae6,U+9cd6,U+9e26\"}},{uri:_162,descriptors:{unicodeRange:\"U+4fa3,U+4fae,U+4fd8,U+4fef,U+50a3,U+5189,U+5195,U+51db,U+51f3,U+51f9,U+5220,U+5228,U+5288,U+52ff,U+532e,U+533f,U+5351,U+53db,U+53ed,U+5450,U+5484,U+5490,U+54c9,U+54e9,U+5501,U+5507,U+5543,U+55d3,U+56a3,U+575e,U+589f,U+5984,U+59ec,U+5a04,U+5a36,U+5a77,U+5a9a-5a9b,U+5ab2,U+5ac2,U+5ad6,U+5bc7,U+5c2c,U+5c34,U+5c51,U+5cd9,U+5d0e,U+5deb,U+5e3c,U+5e87,U+5ed3,U+5f13,U+5f64,U+5fe1,U+606a,U+6096,U+60df,U+60f6,U+60f9,U+6151,U+620e,U+6241,U+6252,U+6273,U+627c,U+6289,U+62c2,U+62cc,U+62ef,U+6361,U+6363,U+63b7,U+63e3,U+6518,U+66ae,U+6756,U+6789,U+6813,U+6829,U+6862,U+6866,U+6893,U+6897,U+690e,U+6984,U+69cc,U+6a1f,U+6a44,U+6a59,U+6ba1,U+6c13,U+6c90,U+6ca6,U+6cbd,U+6ccc,U+6cd3,U+6cd7,U+6d4a,U+6d4f,U+6d5a,U+6d9f,U+6da1,U+6dcc,U+6ea5,U+6ee4,U+6ee6,U+6f2f,U+6f8e,U+701a,U+7095,U+709c,U+70af,U+70db,U+70e8,U+714e,U+715e,U+71a0,U+71ce,U+7235,U+7280,U+72d0,U+72f8,U+73ab,U+7410,U+745c,U+7480,U+74a7-74a8,U+74e3,U+75ae,U+75f9,U+76b1,U+76ce,U+7736,U+77e2-77e3,U+781a,U+789f,U+797a,U+79be,U+79c3,U+79c6,U+79f8,U+7a8d,U+7a98,U+7aa6,U+7aff,U+7b1b,U+7cd9,U+7d6e,U+7ede,U+7eee,U+7f00,U+7f24,U+7f2d,U+7fd8,U+800d,U+8116,U+8151,U+81b3,U+8205,U+82c7,U+82db,U+832c,U+8335,U+8339,U+8386,U+846b,U+8587,U+8611,U+8682,U+868a,U+868c,U+8774,U+88d8,U+88f4,U+8912,U+8b6c,U+8bbd,U+8c0e,U+8c41,U+8d26,U+8d3b-8d3c,U+8d50,U+8dea,U+8e35,U+8f99,U+8fe2,U+8fe9,U+9017,U+914c,U+916f,U+9175-9176,U+918b,U+94a0,U+94ae,U+94ce,U+94f2,U+951a,U+952f,U+9541,U+9640,U+9672,U+968b,U+96cd,U+96ef,U+9713,U+97ec,U+9885,U+9992,U+9a6d,U+9a79,U+9a85,U+9cbb,U+9cd7,U+9cde,U+9e93,U+9f9f\"}},{uri:_163,descriptors:{unicodeRange:\"U+4e11,U+4ed7,U+4fcf,U+4fe9,U+4fed,U+50ac,U+50b2,U+5112,U+5180,U+5188,U+51f6,U+522e,U+5265,U+52cb,U+52df,U+5349,U+5367,U+5378,U+537f,U+5395,U+5398,U+53d4,U+543e,U+5440,U+5446,U+54b8,U+5565-5566,U+5580,U+55bb,U+56ca,U+572d,U+573e,U+574e,U+5782-5784,U+58f3,U+5938-5939,U+5948,U+594e,U+5a1c,U+5a74,U+5ae9,U+5b55,U+5b5c,U+5bb0,U+5bd3,U+5bf8,U+5c3f,U+5d14,U+5d2d,U+5df7,U+5dfe,U+5e05-5e06,U+5e1c,U+5e62,U+5e7b,U+5e7d,U+5ed6,U+5f2f,U+5f66,U+5f6c,U+5fa1,U+604b,U+609f,U+60a6,U+60e8,U+6101,U+6124,U+6127,U+6148,U+61be,U+6247,U+62d8,U+62da,U+633d,U+635e,U+6367,U+6380,U+638f,U+63a9,U+63fd,U+641c,U+64e6,U+655e,U+6572,U+6591,U+65a5,U+6691,U+6735,U+67a2-67a3,U+67ef,U+680b,U+6876,U+6905,U+6a0a,U+6a61,U+6b79,U+6bb7,U+6bbf,U+6c41,U+6c55,U+6c83,U+6c9b,U+6ca7,U+6cfc,U+6d46,U+6d51,U+6d74,U+6d9d,U+6daf,U+6dc0,U+6deb,U+6e17,U+6e24,U+6e89,U+6ea2,U+6ef4,U+6f6d,U+707f,U+70b3,U+70e4,U+70ef,U+710a,U+722c,U+725f,U+7261,U+72ee,U+72f1,U+730e,U+732b,U+7433,U+7538,U+75bc,U+7624,U+7709,U+7750,U+7779,U+7802,U+7898,U+78a7,U+78b1,U+78cb,U+78f7,U+7984,U+7a83,U+7aed,U+7b3c,U+7b4b,U+7c92,U+7c98,U+7ca4,U+7eb9,U+7ee3,U+7ef3,U+7ef5,U+7f05,U+7f55,U+7f62,U+7fc1,U+7fd4,U+7fe0,U+8042,U+806a,U+80a0,U+80a4,U+80c3,U+8102,U+8106,U+814a,U+8154,U+8247,U+8258,U+82cd,U+8328,U+832b,U+8389,U+83ca,U+845b,U+846c,U+84b8,U+8574,U+859b,U+8680,U+8695,U+86c7,U+8702,U+886c,U+8896,U+88b1,U+88e4,U+8bc8,U+8c10,U+8c26,U+8c28,U+8c2d,U+8d4c,U+8d63,U+8f67,U+8f74,U+8fc4,U+9006,U+9063,U+90a2,U+90b1,U+90c1,U+9177,U+9189,U+9493,U+949e,U+94fe,U+9610,U+961c,U+96a7,U+96fe,U+978d,U+97f5,U+9888,U+997c,U+9a84,U+9b3c,U+9b44-9b45,U+9b54,U+9e64,U+9f0e,U+9f9a\"}},{uri:_164,descriptors:{unicodeRange:\"U+4e19,U+4e38,U+4e53,U+4e7e,U+4e9f,U+4ec6,U+4f50,U+4fde,U+502a,U+5154,U+517d,U+51d1,U+51f0,U+5239,U+5256,U+52c9,U+52fe,U+5308,U+532a,U+535c,U+5384,U+53a2,U+53a8,U+53c9,U+53e0,U+5496,U+54ac,U+54c0,U+54c4,U+54e8,U+5561,U+5582,U+561b,U+5631,U+566a,U+5764,U+576a,U+5792,U+57ab,U+584c,U+5885,U+58f6,U+59a8,U+5acc,U+5bc2,U+5c38-5c39,U+5c60,U+5c6f,U+5c82,U+5c90,U+5d16,U+5dcd,U+5e37,U+5e90,U+5eb8,U+5f6a,U+5fcc,U+6012,U+6068,U+6073,U+607c,U+6094,U+6109,U+621a,U+626e,U+6284,U+62d0,U+62e6,U+62fe,U+6321,U+6328,U+632b,U+6349,U+6454,U+65ed,U+660f,U+6674,U+66a8,U+6749,U+674f,U+6760,U+67af,U+6850,U+6854,U+6869,U+68a8,U+68d2,U+68f5,U+6912,U+6b49,U+6b6a,U+6bef,U+6c28,U+6c5d,U+6c82,U+6cab,U+6cb8,U+6cc4,U+6cf5,U+6d47,U+6d78,U+6da4,U+6dc4,U+6dcb,U+6df9,U+6e0a,U+6e23,U+6e5b,U+6eb6,U+6f06,U+6f47,U+6f84,U+6f9c,U+6fd2,U+7076,U+70ac,U+7199,U+723d,U+72ac,U+72ed,U+7476,U+7529,U+752b,U+754f,U+7554,U+75d5,U+7626,U+76ef,U+7720,U+7766,U+7784,U+77ac,U+780d,U+7838,U+7845,U+786b,U+78b3,U+7978,U+79b9,U+79c9,U+79e7,U+7a3d,U+7a84,U+7a9f,U+7b0b,U+7b52,U+7c7d,U+7f1a,U+7fc5,U+7ff0,U+804a,U+8086-8087,U+808c,U+809a,U+80ba,U+810a,U+8180,U+818f,U+81c2,U+81ed,U+8231,U+8292,U+829c,U+82a6,U+82d1,U+8346,U+838e,U+839e,U+83c7,U+83f1,U+8403,U+840e,U+8513,U+857e,U+85e4,U+867e,U+871c,U+87ba,U+87f9,U+884d,U+8944,U+8a93,U+8c05,U+8d2c,U+8d2e,U+8d42-8d43,U+8dfb,U+8e22,U+8eba,U+8f69,U+8f9c,U+8fa3,U+8fa8,U+8fb1,U+900a,U+9038,U+903b,U+9042,U+904f,U+90b5,U+90dd,U+9102,U+9187,U+94a7,U+94c5,U+9523,U+95f8,U+95fd,U+960e,U+964b-964c,U+96c1,U+9709,U+971c,U+97ad,U+9882,U+9965,U+9976,U+9988,U+99a8,U+9a82,U+9a9a,U+9b41,U+9c8d,U+9e45,U+9e70,U+9e9f,U+9f3b,U+9f7f\"}},{uri:_165,descriptors:{unicodeRange:\"U+4e08,U+4e18,U+4e1b,U+4e22,U+4e27,U+4e32,U+4e52,U+4e73,U+4ead,U+4ed4,U+4ed9,U+4ef0,U+4fa6,U+5076,U+5179,U+51bb,U+51c9,U+51ef,U+51fd,U+524a,U+526a,U+529d,U+52ab,U+5306,U+5339,U+53d9,U+540a,U+5410,U+541e,U+5439,U+54b1,U+54ed,U+5564,U+558a,U+55b7,U+5634,U+574a,U+5751,U+57a6,U+57cb,U+57d4,U+5824,U+582a,U+5835,U+5858,U+5893,U+58e4,U+5951,U+5986,U+59da,U+59fb,U+59ff,U+5a03,U+5a46,U+5ac1,U+5b5d,U+5bfa,U+5c18,U+5c3a,U+5c48,U+5c4f,U+5c61,U+5cb3,U+5d1b,U+5e15,U+5e3d,U+5e99,U+5e9e,U+5eca,U+5f0a,U+5f17-5f18,U+5f25,U+5f7c,U+5fcd,U+6028,U+60a0,U+60ac,U+60d1,U+614e,U+6155,U+6168,U+61c8,U+6208,U+6212,U+6251,U+629a-629b,U+62ab-62ac,U+62fc,U+6323,U+632a,U+63d2,U+643a,U+6491-6492,U+649e,U+64b0,U+64c5,U+659c,U+6614,U+662d,U+6664,U+6670,U+6676,U+6746,U+67cf,U+67d4,U+682a,U+6843,U+6846,U+68da,U+6b3a,U+6b67,U+6c27,U+6c5b,U+6c64,U+6c70,U+6caa,U+6cca,U+6ce1,U+6d12,U+6d45,U+6dd1,U+6dd8,U+6e34,U+6e7f,U+6ee5,U+6f02,U+7092,U+70c2,U+70e6,U+7115,U+7237,U+7272,U+727a,U+72c2,U+739b,U+73b2,U+743c,U+751c,U+758f,U+75b2,U+7686,U+76c6,U+76d2,U+76fc,U+775b,U+77a9,U+7816,U+788e,U+7897,U+78b0,U+79bd,U+7a0d,U+7a91,U+7a9d,U+7ae3,U+7bad,U+7cca,U+7d2b,U+7eb1,U+7f06,U+7f14,U+7f1d,U+7f50,U+7ffc,U+8036,U+80bf,U+80c1,U+80ce,U+80f8,U+8109,U+810f,U+8170,U+8179,U+819c,U+821f,U+8230,U+8236,U+8273,U+829d,U+82f9,U+8305,U+8350,U+83b2,U+83cc,U+8404,U+840d,U+8427,U+8482,U+8679,U+8854,U+886b,U+8bbc,U+8be6,U+8c31,U+8c6b,U+8d4b,U+8dcc,U+8e2a,U+8e48,U+8f90,U+8fb0,U+9022,U+903c,U+903e,U+9065,U+916c,U+917f,U+94a9,U+94c3,U+94dd,U+94ed,U+9510,U+953b,U+96c7,U+970d,U+9738,U+9877,U+987d,U+989c,U+98d8,U+9a70,U+9a91,U+9aa4,U+9b42,U+9b4f,U+9e2d,U+9e3f,U+9e7f,U+9f20\"}},{uri:_166,descriptors:{unicodeRange:\"U+4e59,U+4ed3,U+4f0f,U+4f38,U+4f69,U+4fa7,U+4faf,U+4ff1,U+5077,U+5085,U+5144,U+5151,U+51af,U+51b6,U+51cc,U+523a,U+5251,U+5269,U+5272,U+52d8,U+5353,U+5389,U+53f9,U+5401,U+5415,U+541b,U+54f2,U+5524,U+554a,U+559d,U+5609,U+5740,U+575d,U+5806,U+5821,U+586b,U+5915,U+594f,U+5960,U+5999,U+59a5,U+59b9,U+59c6,U+59d1,U+59dc,U+5b5f,U+5b64,U+5b87,U+5bb4,U+5bbf,U+5c16,U+5c1d,U+5c3e,U+5c9a,U+5ca9,U+5cad,U+5cfb,U+5de1,U+5de7,U+5de9,U+5ef7,U+5f04,U+5f70,U+5f79,U+5fc6,U+602a,U+6050,U+6052,U+6070,U+6084,U+60b2,U+60dc,U+60e9,U+6167,U+6170,U+61c2,U+6270,U+6291,U+62b1,U+62bc,U+62dc,U+62df,U+62f3,U+6324,U+633a,U+6377,U+6398,U+63cf,U+640f,U+642c-642d,U+6458,U+6478,U+6500,U+654c,U+6566,U+658c,U+65c1,U+65cb,U+65e8,U+65ec,U+6696-6697,U+6734,U+679a,U+679d,U+67dc,U+67f3-67f4,U+680f,U+683d,U+684c,U+68af,U+699c,U+6bc1,U+6c0f,U+6c1b,U+6c57,U+6c6a,U+6d3d,U+6d6e,U+6d82,U+6db5,U+6dee,U+6e58,U+6eaa,U+6ecb,U+6ede,U+6ee9,U+6f0f,U+6f20,U+6f58,U+704c,U+7070,U+70b8,U+718a,U+7238,U+7262,U+7275,U+72b9,U+72d7,U+72e0,U+741b,U+7434,U+7483,U+74f6-74f7,U+75ab,U+764c,U+7761,U+7855,U+7891,U+78c1,U+79d2,U+7a00,U+7a3b,U+7c97,U+7ea4,U+7eb2,U+7ed2,U+7eea,U+7ef8,U+7f18,U+7fbd,U+8000,U+8010,U+8096,U+809d,U+80a9,U+817f,U+81e3,U+8206,U+8212,U+82ac,U+8302,U+8361,U+8377,U+83f2,U+8461,U+848b,U+84ec,U+8521,U+85aa,U+8870,U+8877,U+8881,U+888b,U+88ad,U+88c2,U+8986,U+8bd1,U+8bf1,U+8d24,U+8d2a,U+8d3e-8d3f,U+8d41,U+8d56,U+8d64,U+8d6b,U+8e0f,U+8f70,U+8f85,U+8f88,U+8fa9,U+9003,U+901d,U+90b9,U+90ce,U+94a6,U+94f8,U+9505,U+95ea,U+95ef,U+95f2,U+95f9,U+9601,U+9605,U+9634,U+966a,U+9677,U+9690,U+9694,U+96d5,U+971e,U+9896-9897,U+9972,U+9a71,U+9a76,U+9a7e,U+9e1f,U+9e23\"}},{uri:_167,descriptors:{unicodeRange:\"U+4e01,U+4e43,U+4ea6,U+4ef2,U+4eff,U+4f26,U+4f2a,U+4f2f,U+4f5b,U+4fa8,U+4fca,U+4fd7,U+5021,U+504f,U+5141,U+51c0,U+51dd,U+51e4,U+51ed,U+5200,U+5237,U+5427,U+5448,U+54a8,U+5706,U+5708,U+5723,U+575b,U+57c3,U+5899,U+58a8,U+58c1,U+5976,U+5988,U+59bb,U+59d0,U+59d3,U+5a18,U+5a31,U+5a92,U+5b54,U+5b85,U+5baa-5bab,U+5bc4,U+5bd2,U+5be8,U+5bff,U+5c65,U+5d07,U+5e1d,U+5e78,U+5e7c,U+5f03,U+5f1f,U+5f39,U+5f6d,U+5f92,U+5faa,U+5fbd,U+5fe7,U+5ffd,U+60a8,U+60ef,U+6108,U+6162,U+622a,U+6234,U+626b,U+626d,U+62c6,U+62d2,U+62d4,U+62d6,U+62e8,U+6316,U+6355,U+63ed,U+6447,U+64a4,U+65f1,U+6606,U+6628,U+664b,U+6668,U+6682,U+66f9,U+66fc,U+66ff,U+6717,U+6740,U+676d,U+67aa,U+67ec,U+67f1,U+6842,U+6851,U+695a,U+6982,U+6a2a,U+6b20,U+6b23,U+6b32,U+6b96,U+6bc5,U+6beb,U+6c60,U+6c9f,U+6cea,U+6cf3,U+6d1e,U+6d53,U+6d66,U+6d69,U+6d8c,U+6d9b,U+6db2,U+6de1,U+6dfb,U+6e14,U+6ed1,U+6eda,U+6ee8,U+6f2b,U+706d,U+7089,U+708e,U+70ad-70ae,U+70e7,U+7126,U+714c,U+71c3,U+71d5,U+7206,U+7259,U+731b,U+73a9,U+73bb,U+74dc,U+7532,U+7545,U+755c,U+75c7,U+7687,U+76d7,U+76f2,U+788d,U+78e8,U+79e6,U+79e9,U+7a3f,U+7a46,U+7a97,U+7af9,U+7bee,U+7c4d,U+7c89,U+7cd6,U+7eb5,U+7ebd,U+7ed8,U+8017,U+8033,U+80c0,U+80de,U+80f6,U+8138,U+817e,U+81a8,U+820d,U+827e,U+82b3,U+82d7,U+83b1,U+84c4,U+84dd,U+8584,U+864e,U+865a,U+866b,U+86cb,U+88d5,U+89e6,U+8bca,U+8bde,U+8bfa,U+8c0a,U+8c37,U+8c46,U+8c6a,U+8c8c,U+8d1d,U+8d29,U+8d4f,U+8d54,U+8d5a,U+8d60,U+8d62,U+8f7f,U+8f96,U+8f9e-8f9f,U+8fc1,U+8fdf,U+8fea,U+8ff7,U+9012,U+906d,U+9075,U+90a6,U+90bb,U+90ca,U+9178,U+9192,U+91ca,U+94bb,U+94dc,U+94fa,U+9501,U+950b,U+9521,U+955c,U+963b,U+9655,U+9675-9676,U+9887,U+9891,U+9971,U+9a97,U+9ece,U+9ed8\"}},{uri:_168,descriptors:{unicodeRange:\"U+4e1d,U+4e39,U+4e4c,U+4e4f,U+4e54,U+4e58,U+4e95,U+4ea1,U+4eab,U+4eae,U+4ec1,U+4f10,U+4f19,U+4f30,U+4f34,U+4fb5,U+503e,U+518c,U+5192,U+51a0,U+51ac,U+51b0,U+51e1,U+5211,U+5242,U+52a3,U+52b2,U+52c3,U+52c7,U+52d2,U+52e4,U+5377,U+539a,U+53a6,U+53e5,U+5417,U+5510,U+552f,U+5531,U+574f-5750,U+5761,U+5851,U+5854,U+58ee,U+593a,U+5949,U+5954,U+5a5a,U+5b8b,U+5bbd,U+5c04,U+5c0a,U+5c4b,U+5ce1,U+5cf0,U+5e10,U+5e8a,U+5e9f,U+5ec9,U+5f31,U+5f84,U+5fd8-5fd9,U+5fe0,U+6015,U+6062,U+6069,U+6076,U+6089,U+60a3,U+60ca,U+620f,U+624e,U+6263,U+6298,U+62a2,U+62bd,U+6311,U+6350,U+6389,U+638c,U+63f4,U+6446,U+644a,U+6469,U+64cd,U+654f,U+6562,U+656c,U+65d7,U+65e6,U+65fa,U+660c,U+6653,U+66b4,U+670b,U+672b,U+676f-6770,U+6881,U+6885,U+68a6,U+68cb,U+68ee,U+6b8a,U+6c88-6c89,U+6cc9,U+6ce5,U+6d01,U+6d17,U+6d1b,U+6d59,U+6d6a,U+6da8,U+6df7,U+6e10,U+6e20-6e21,U+6f5c,U+706f,U+70bc,U+719f,U+7267,U+732a,U+73cd,U+7518,U+756a,U+7586,U+7591,U+75db,U+76c8,U+76d0,U+76d6,U+76d8,U+76df,U+76fe,U+77db,U+7801,U+786c,U+795d,U+7965,U+79cb,U+7a77,U+7a7f,U+7aef,U+7b11,U+7bb1,U+7bc7,U+7ea0,U+7eaf,U+7ed5,U+7edc,U+7f13,U+7f29,U+7f34,U+7f8a,U+7ffb,U+8015,U+8058,U+805a,U+8083,U+80af,U+80c6,U+80cc,U+811a,U+8150,U+82e5,U+8336,U+8352,U+83ab,U+8428,U+8463,U+852c,U+8861,U+89c8,U+8bcd,U+8bd7,U+8bda,U+8be2,U+8bef,U+8bf8,U+8c0b,U+8c13,U+8d34,U+8d3a,U+8d74,U+8d76,U+8da3,U+8dd1,U+8ddd,U+8ddf,U+8df3,U+8f68,U+8f6f,U+8f7d,U+8f91,U+8f9b,U+8fbd,U+8fc8,U+8fd4,U+8feb,U+8ff9,U+900f,U+9057,U+907f-9080,U+90d1,U+90ed,U+91ce,U+9519,U+9526,U+95ed,U+9614,U+9635,U+9644,U+9686,U+96c5,U+96ea,U+9707,U+9732,U+9759,U+978b,U+9876,U+9881,U+9910,U+996e,U+9970,U+9c81,U+9e21,U+9ebb,U+9f84\"}},{uri:_169,descriptors:{unicodeRange:\"U+4e3d,U+4e4e,U+4e71,U+4e8f,U+4ed8,U+4eea,U+4f0a,U+4f0d,U+4f11,U+4f1f,U+4f24,U+4f3c,U+4f73,U+4fc4,U+500d,U+5012,U+501f,U+503a,U+505c,U+507f,U+50a8,U+514d,U+5178,U+517c,U+51b2,U+51b7,U+520a,U+5238,U+523b,U+52b1,U+535a,U+5371,U+5385,U+53eb-53ec,U+53f3,U+53f6,U+5409,U+542b,U+542f,U+5434,U+5462,U+5473,U+547c,U+54c8,U+54ea,U+56fa,U+5733,U+5757,U+5766,U+5802,U+585e,U+590f,U+591c,U+591f,U+5947,U+594b,U+5987,U+5a01,U+5b59,U+5b63,U+5b88,U+5b97,U+5b9c,U+5bbe,U+5bfb,U+5c01,U+5c1a,U+5c24,U+5c3c,U+5c97,U+5c9b,U+5cb8,U+5de6,U+5e01,U+5e2e,U+5e45,U+5e55,U+5e84,U+5ef6,U+5f02,U+5f52,U+5f69,U+5f7b,U+5f90,U+5fae,U+6000,U+600e,U+6025,U+60e0,U+6276,U+6297,U+62b5,U+62cd,U+62d3,U+62e5,U+62e9,U+62ff,U+6302,U+632f,U+63e1,U+6444,U+64ad,U+653b,U+6551,U+6563,U+65a4,U+65e7,U+6620,U+667a,U+66f2,U+671d,U+6731,U+6742,U+675f,U+6768,U+677e-677f,U+6790,U+67b6,U+67d3,U+6863,U+68b0,U+68c9,U+690d,U+6b8b,U+6bcd,U+6bd2,U+6bd5,U+6c38,U+6c61,U+6cbf,U+6cdb,U+6cf0,U+6d2a,U+6d89,U+6da6,U+6f6e,U+6fb3,U+7075,U+707e,U+70df,U+7164,U+7236,U+725b,U+7389,U+73e0,U+745e,U+74e6,U+751a,U+7537,U+75be,U+76ae,U+76db,U+793c,U+7956,U+7981,U+79d8,U+79df,U+79fb,U+7adf,U+7ae5,U+7b14,U+7b26,U+7b54,U+7b79,U+7d2f,U+7eb8,U+7eba,U+7ec6,U+7ee9,U+7eff,U+7f5a,U+7f6a,U+7f72,U+8089,U+80a5,U+80e1,U+8111,U+8131,U+821e,U+822c,U+8270,U+8499,U+8651,U+867d,U+8840,U+8857,U+8863,U+88c1,U+89c9,U+89d2,U+8a89,U+8bed,U+8bfe,U+8c01,U+8c22,U+8d21,U+8d25,U+8d2f,U+8d5e,U+8d75,U+8d8b,U+8dc3,U+8de8,U+8df5,U+8f6e,U+8f86,U+8f89,U+8fc5,U+8ff0,U+8ffd,U+9014,U+904d,U+90ae,U+9274,U+949f,U+952e,U+969c,U+96c4,U+96e8,U+96f6-96f7,U+97e9,U+987f,U+996d,U+9a7b,U+9aa8,U+9c7c,U+9c9c,U+9e4f,U+9f13,U+9f50\"}},{uri:_170,descriptors:{unicodeRange:\"U+4e13,U+4e16,U+4e1c,U+4e24,U+4e3e,U+4e49,U+4e61,U+4e66,U+4e89,U+4e8c,U+4e94,U+4e9b,U+4ea4,U+4eac,U+4ebf,U+4eca,U+4ef6-4ef7,U+4efb,U+4f18,U+4f20,U+4f46,U+4f7f,U+4fe1,U+503c,U+505a,U+5146,U+5148,U+515a,U+5171,U+5177,U+519b,U+51b3,U+51c6,U+51e0,U+5212,U+521b,U+522b,U+529e,U+52bf,U+534e-534f,U+5355,U+5357,U+5382,U+539f,U+53bb,U+53bf,U+53c2,U+53c8,U+53ca,U+53d6-53d8,U+53e3,U+53ea,U+53f0,U+540d,U+5411,U+56db,U+56de,U+56e0,U+56e2,U+578b,U+57ce,U+57fa,U+589e,U+5904,U+5934,U+5982,U+5b89,U+5b8c,U+5bfc,U+5c06,U+5c11,U+5c40,U+5c71,U+5e38,U+5e72,U+5e76,U+5e7f,U+5e94,U+5e9c,U+5f0f,U+5f15,U+5f20,U+5f3a,U+5f62,U+5f88,U+5fc5,U+5fd7,U+5feb,U+601d,U+6027,U+60c5,U+60f3,U+610f,U+6216,U+6218,U+624b,U+624d,U+6279,U+628a,U+6295,U+6301,U+6307,U+636e,U+63a5,U+63a8,U+652f,U+6536,U+653e,U+6548,U+6559,U+6570,U+65bd,U+65e0,U+6602,U+660e,U+6613,U+66f4,U+6700,U+670d,U+671f,U+672f,U+6743,U+674e,U+6751,U+6761,U+6784,U+6797,U+679c,U+67e5,U+6807,U+6837,U+683c,U+6b21,U+6b63-6b65,U+6bcf,U+6bd4,U+6c42,U+6c5f,U+6ca1,U+6cbb,U+6d3b,U+6d41,U+6d88,U+6df1,U+70b9,U+7136,U+7269,U+7279,U+7531,U+754c,U+767e,U+76ca,U+76f8,U+770b,U+7740,U+7814,U+79ef,U+7a0b,U+7a0e,U+7a76,U+7b80,U+7cbe,U+7cfb,U+7e41,U+7ea7,U+7ec4,U+7ec7,U+7ed3,U+7ed9,U+7edf,U+7f8e,U+8001,U+804c,U+8054,U+80b2,U+81f3,U+8425,U+8868,U+88ab,U+897f,U+89c1-89c2,U+89c4,U+89c6,U+89e3,U+8ba1,U+8ba4,U+8bae,U+8bb0,U+8bba,U+8bc1,U+8c03,U+8d28,U+8d39,U+8def,U+8f66,U+8f6c,U+8fd0-8fd1,U+9020,U+9053,U+90a3,U+90fd,U+91cc,U+9500,U+9547,U+95e8,U+95f4,U+961f,U+9645,U+9662,U+96be,U+96c6,U+9700,U+9769,U+97e6,U+9875,U+9879,U+9886,U+9898,U+98ce,U+9996,U+2b5af,U+2cc56,U+2e9f5,U+30edd-30ede\"}},{uri:_171,descriptors:{unicodeRange:\"U+4e03,U+4e30,U+4e34,U+4e45,U+4e60,U+4e70,U+4e88,U+4e91-4e92,U+4ea9,U+4eb2,U+4ec0,U+4ecb,U+4ecd,U+4ee4,U+4fee,U+5019,U+5047,U+50cf,U+5145,U+516d,U+5170,U+5175,U+5199,U+51cf,U+51fb,U+521a,U+5224,U+5267,U+52aa,U+5347-5348,U+534a,U+5356,U+5361,U+536b,U+5370,U+538b,U+53e4,U+53e6,U+5403,U+5426,U+5428,U+542c,U+5438,U+5668,U+56ed,U+56f4,U+56fe,U+57df,U+592a,U+5957,U+5b69,U+5b81,U+5b8f,U+5b98,U+5b9d,U+5ba1,U+5ba4,U+5bb3,U+5bc6,U+5bdf,U+5c3d,U+5c5e,U+5c81,U+5ddd,U+5de8,U+5dee,U+5e0c,U+5e86,U+5e8f,U+5e93,U+5e95,U+5e97,U+5ea7,U+5ead,U+5eb7,U+5f55,U+5f81,U+5f85,U+5ff5,U+6001,U+613f,U+6258,U+6267,U+6269,U+626c,U+627e,U+62db,U+62ec,U+6325,U+635f,U+6362,U+6388,U+6392,U+63a2,U+63a7,U+63aa,U+641e,U+6545,U+6597,U+65e2,U+65e9,U+661f,U+665a,U+666e-666f,U+66fe,U+6728,U+67d0,U+6811,U+6838,U+6865,U+697c,U+6b22,U+6b27,U+6b4c,U+6b62,U+6b66,U+6b7b,U+6bdb,U+6c47,U+6c49,U+6c7d,U+6c99,U+6cfd,U+6d0b,U+6d25,U+6d32,U+6d3e,U+6d4b,U+6e29,U+6e56,U+6e7e,U+6f14,U+6fc0,U+706b,U+70c8,U+7247,U+72af,U+72b6,U+72ec,U+732e,U+73ed,U+7403,U+7533,U+753b,U+7559,U+7565,U+7597,U+767b,U+773c,U+7763,U+77ed,U+77ff,U+7968,U+798f,U+79bb,U+79c0-79c1,U+7ad9,U+7ae0,U+7b51,U+7b7e,U+7cae,U+7d22,U+7ea2,U+7eb3,U+7eb7,U+7ec3,U+7ec8,U+7ecd,U+7edd,U+7efc,U+7f16,U+7f3a,U+7f51,U+7f57,U+7f6e,U+80dc,U+822a,U+8239,U+826f,U+82cf,U+82e6,U+8349,U+8363,U+83dc,U+8457,U+85cf,U+878d,U+8865,U+8a00,U+8b66,U+8ba2,U+8ba8,U+8bad,U+8bb2,U+8bc9,U+8bd5,U+8bfb,U+8d2b,U+8d35,U+8d37,U+8f7b,U+8f93,U+8fce,U+8fdd,U+9000-9002,U+9010,U+9047,U+9093,U+9152,U+9488,U+94a2,U+9633,U+9636,U+963f,U+9646,U+9648,U+964d,U+9664,U+9669,U+9760,U+97f3,U+987a,U+987e,U+9884,U+98de,U+9986,U+9ed1\"}},{uri:_172,descriptors:{unicodeRange:\"U+4e14,U+4e25,U+4e48,U+4e50,U+4e5d,U+4e9a,U+4ec5,U+4efd,U+4f17,U+4f4e-4f4f,U+4f55,U+4f59,U+4f60,U+4f8b,U+4f9b,U+4f9d,U+4fbf,U+4fc3,U+5065,U+513f,U+5149,U+514b,U+516b,U+5174,U+517b,U+518d,U+51b5,U+5207,U+5217-5219,U+521d,U+526f,U+529f,U+52a9,U+52b3,U+5305,U+533b,U+5343,U+5360,U+5373-5374,U+5386,U+53cb-53cd,U+53f2,U+53f7,U+544a,U+5468,U+547d,U+54cd,U+552e,U+5584,U+56f0,U+571f,U+5747,U+575a,U+57f9,U+5883,U+58eb,U+58f0,U+5907,U+590d,U+592e,U+5931,U+5956,U+5965,U+5973,U+5979,U+59cb,U+5b57-5b58,U+5b83,U+5ba2-5ba3,U+5bb9,U+5bcc,U+5c42,U+5c45,U+5c4a,U+5dde,U+5df1,U+5df4,U+5e03,U+5e08,U+5e26,U+5e2d,U+5f71,U+5f80,U+5f8b,U+5fb7,U+606f,U+611f,U+6237,U+623f,U+6253,U+627f,U+6293,U+62a4,U+62c5,U+62c9,U+6309,U+6574,U+6599,U+65ad,U+65af,U+65c5,U+65cf,U+6625,U+663e,U+671b,U+672a,U+6750,U+6781,U+6821,U+6839,U+6848,U+68c0,U+6a21,U+6b3e,U+6bb5,U+6c14,U+6cb3,U+6cb9,U+6ce8,U+6e05,U+6e2f,U+6e38,U+6e90,U+6ee1,U+70ed,U+7167,U+7231,U+7248,U+724c,U+7387,U+738b,U+73af,U+7530,U+75c5,U+767d,U+76d1,U+76f4,U+771f,U+77e5,U+77f3,U+7834,U+7840,U+786e,U+793a,U+795e,U+79f0,U+7a33,U+7a7a,U+7a81,U+7ade,U+7b56,U+7b97,U+7c73,U+7c7b,U+7d20,U+7d27,U+7ea6,U+7eaa,U+7ebf,U+7ee7,U+7eed,U+7ef4,U+7fa4,U+8003,U+80a1,U+81f4,U+8272,U+827a,U+8282,U+82b1,U+82f1,U+8303,U+836f,U+83b7,U+843d,U+88c5,U+8ba9,U+8baf,U+8bb8,U+8bbf,U+8bc4,U+8bc6,U+8bdd,U+8be5,U+8bf7,U+8c08,U+8c61,U+8d1f,U+8d22-8d23,U+8d27,U+8d2d,U+8d38,U+8d5b,U+8d70,U+8d85,U+8d8a,U+8db3,U+8eab,U+8f83,U+8fb9,U+8fdc,U+8fde,U+9009,U+901f,U+914d,U+91c7,U+94b1,U+94c1,U+94f6,U+95fb,U+9632,U+9650,U+968f,U+9752,U+975e,U+987b,U+989d,U+98df,U+9999,U+9a6c,U+9a8c,U+9ec4,U+9feb-9fec\"}},{uri:_173,descriptors:{unicodeRange:\"U+98fb-990c,U+990e-990f,U+9911-992d,U+992f-9953,U+9956-9962,U+9964,U+9966,U+9973,U+9978-9979,U+997b,U+997e,U+9982-9983,U+9989,U+998c,U+998e,U+999a-99a4,U+99a6-99a7,U+99a9-99c8\"}},{uri:_174,descriptors:{unicodeRange:\"U+8e4c-8e50,U+8e53-8e58,U+8e5a-8e65,U+8e67-8e68,U+8e6a-8e6b,U+8e6e,U+8e71,U+8e73,U+8e75,U+8e77-8e7b,U+8e7d-8e7e,U+8e80,U+8e82-8e84,U+8e86,U+8e88-8e8e,U+8e91-8e93,U+8e95-8e9b,U+8e9d,U+8e9f-8eaa,U+8ead-8eae,U+8eb0-8eb1,U+8eb3-8eb9,U+8ebb-8ecd,U+8ecf-8f02\"}},{uri:_175,descriptors:{unicodeRange:\"U+2e3a,U+3001-3002,U+3008-3011,U+3014-3017,U+301d-301f,U+4dae,U+4e00,U+4e07,U+4e09-4e0b,U+4e0d-4e0e,U+4e1a,U+4e2a,U+4e2d,U+4e3a-4e3b,U+4e4b,U+4e5f,U+4e86,U+4e8b,U+4e8e,U+4ea7,U+4eba,U+4ece,U+4ed1,U+4ed6,U+4ee3,U+4ee5,U+4eec,U+4f01,U+4f1a,U+4f4d,U+4f53,U+4f5c,U+4fdd,U+5143,U+5165,U+5168,U+516c,U+5173,U+5176,U+5185,U+519c,U+51fa,U+5206,U+5229,U+5230,U+5236,U+524d,U+529b,U+52a0-52a1,U+52a8,U+5316-5317,U+533a,U+5341,U+5362,U+53d1,U+53ef,U+53f8,U+5404,U+5408,U+540c,U+540e,U+5458,U+548c,U+54c1,U+54e5,U+5546,U+559c,U+56fd,U+5728,U+5730,U+573a,U+5916,U+591a,U+5927,U+5929,U+592b,U+597d,U+59d4,U+5b50,U+5b66,U+5b9a,U+5b9e,U+5bb6,U+5bf9,U+5c0f,U+5c14,U+5c31,U+5c55,U+5de5,U+5df2,U+5e02,U+5e73-5e74,U+5ea6,U+5efa,U+5f00,U+5f53,U+5f97,U+5fc3,U+603b,U+6210-6211,U+6240,U+6280,U+62a5,U+63d0,U+6539,U+653f,U+6587,U+65b0,U+65b9,U+65e5,U+65f6,U+662f,U+6708-6709,U+672c,U+673a,U+675c,U+6765,U+6c11,U+6c34,U+6cd5,U+6ce2,U+6d4e,U+6d77,U+73b0,U+7406,U+751f,U+7528,U+7535,U+7684,U+76ee,U+793e,U+79cd,U+79d1,U+7acb,U+7b2c,U+7b49,U+7ba1,U+7ecf,U+8005,U+800c,U+80fd,U+81ea,U+884c,U+8981,U+8bbe,U+8bf4,U+8d44,U+8d77,U+8fbe,U+8fc7,U+8fd8-8fd9,U+8fdb,U+901a,U+90e8,U+91cd,U+91cf,U+91d1,U+9485,U+957f,U+95ee,U+9762,U+9ad8,U+9ea6,U+9f99,U+9fcf,U+9fd4,U+9fed,U+fe10-fe19,U+fe30-fe31,U+fe33-fe44,U+ff01,U+ff0c,U+ff1f,U+2b4e7,U+2b7f7,U+2b7fc,U+2cb2d,U+2cb3b,U+2cb4a,U+2cb5b,U+2cb73\"}},{uri:_176,descriptors:{unicodeRange:\"U+6490,U+6493-6494,U+6497-6498,U+649a-649d,U+649f-64a3,U+64a5-64a8,U+64aa-64ab,U+64af,U+64b1-64b4,U+64b6,U+64b9,U+64bb,U+64bd-64bf,U+64c1,U+64c3-64c4,U+64c6-64cc,U+64cf,U+64d1,U+64d3-64d6,U+64d9-64dd,U+64df-64e1,U+64e3,U+64e5,U+64e7-64ff,U+6501-6508,U+650a-6511,U+6513-6517,U+6519-6524,U+6526-652a,U+652c-652d,U+6530-6533,U+6537,U+653a,U+653c-653d,U+6540-6544,U+6546-6547,U+654a-654b,U+654d-654e,U+6550,U+6552-6554,U+6557-6558,U+655a,U+655c,U+655f-6561,U+6564-6565,U+6567-6568\"}},{uri:_177,descriptors:{unicodeRange:\"U+9695-9696,U+969a-969b,U+969d-96a6,U+96a8-96af,U+96b1-96b2,U+96b4-96b5,U+96b7-96b8,U+96ba-96bb,U+96bf,U+96c2-96c3,U+96c8,U+96ca-96cb,U+96d0-96d1,U+96d3-96d4,U+96d6-96df,U+96e1-96e7,U+96eb-96ee,U+96f0-96f2,U+96f4-96f5,U+96f8,U+96fa-96fd,U+96ff,U+9702-9703,U+9705,U+970a-970c,U+9710-9712,U+9714-9715,U+9717-971b,U+971d,U+971f-9729,U+972b-972c,U+972e-972f,U+9731,U+9733-9737,U+973a-973d,U+973f-9751,U+9754-9755,U+9757-9758,U+975a,U+975c-975d,U+975f,U+9763-9764,U+9766-9768,U+976a-9770\"}},{uri:_178,descriptors:{unicodeRange:\"U+6af0-6b1f,U+6b25-6b26,U+6b28-6b31,U+6b33-6b36,U+6b38,U+6b3b-6b3d,U+6b3f-6b42,U+6b44-6b45,U+6b48,U+6b4a-6b4b,U+6b4d-6b58,U+6b5a-6b61,U+6b68-6b69,U+6b6b-6b78,U+6b7a,U+6b7d-6b80,U+6b85,U+6b88,U+6b8c,U+6b8e-6b91,U+6b94-6b95,U+6b97-6b99,U+6b9c-6ba0,U+6ba2-6ba9,U+6bab-6bb2,U+6bb6,U+6bb8-6bba\"}},{uri:_179,descriptors:{unicodeRange:\"U+430e-439a,U+29e8a,U+29ec4,U+29edb,U+29ee9,U+29f7e,U+29f83,U+29f8c,U+29fce,U+2a01a,U+2a02f,U+2a082,U+2a0f9,U+2a190,U+2a38c\"}},{uri:_180,descriptors:{unicodeRange:\"U+92ef-933d,U+933f-9369,U+936b-9388\"}},{uri:_181,descriptors:{unicodeRange:\"U+4512-458d,U+2b300,U+2b363,U+2b36f,U+2b372,U+2b37d,U+2b404,U+2b410,U+2b413,U+2b461,U+2b4ef,U+2b4f6,U+2b4f9,U+2b50d-2b50e,U+2b536,U+2b5ae,U+2b5b3,U+2b5e7,U+2b5f4,U+2b61c-2b61d,U+2b626-2b628,U+2b62a,U+2b62c,U+2b695-2b696,U+2b6ad,U+2b6ed\"}},{uri:_182,descriptors:{unicodeRange:\"U+88bd-88c0,U+88c3-88c4,U+88c7-88c8,U+88ca-88cd,U+88cf-88d1,U+88d3,U+88d6-88d7,U+88da-88de,U+88e0-88e1,U+88e6-88e7,U+88e9-88ef,U+88f2,U+88f5-88f7,U+88fa-88fb,U+88fd,U+88ff-8901,U+8903-8909,U+890b-890f,U+8911,U+8914-8918,U+891c-8920,U+8922-8924,U+8926-8929,U+892c-892f,U+8931-8933,U+8935,U+8937-8940,U+8942-8943,U+8945-895d,U+8960-8965,U+8967-897a,U+897c-897e,U+8980,U+8982,U+8984-8985\"}},{uri:_183,descriptors:{unicodeRange:\"U+4b0b-4ba0\"}},{uri:_184,descriptors:{unicodeRange:\"U+7179,U+717b-717c,U+717e-7183,U+7185-7189,U+718b-718e,U+7190-7193,U+7195-7197,U+719a-719e,U+71a1-71a7,U+71a9-71ab,U+71ad-71b2,U+71b4,U+71b6-71b8,U+71ba-71c2,U+71c4-71cd,U+71cf-71d3,U+71d6-71df,U+71e1-71e4,U+71e6,U+71e8-71ed,U+71ef-71f8,U+71fa-7205,U+7207-721c,U+721e-7227,U+7229,U+722b,U+722d\"}},{uri:_185,descriptors:{unicodeRange:\"U+982e-9874,U+988b,U+988e,U+9892,U+9895,U+9899,U+98a3,U+98a8-98cd,U+98cf-98d0,U+98d4,U+98d6-98d7,U+98db-98dd,U+98e0-98e6,U+98e9-98fa\"}},{uri:_186,descriptors:{unicodeRange:\"U+7c14-7c15,U+7c17-7c1e,U+7c20-7c25,U+7c28-7c29,U+7c2b-7c37,U+7c39-7c3e,U+7c42-7c4c,U+7c4e-7c72,U+7c75-7c7a,U+7c7e-7c88,U+7c8a-7c90,U+7c93-7c94,U+7c96,U+7c99-7c9b,U+7ca0-7ca1,U+7ca3,U+7ca6-7ca9,U+7cab-7cad,U+7caf-7cb0,U+7cb4-7cb8,U+7cba-7cbb,U+7cbf-7cc0,U+7cc2-7cc4,U+7cc6,U+7cc9,U+7ccb,U+7cce-7cd4\"}},{uri:_187,descriptors:{unicodeRange:\"U+7d95-7da5,U+7da7-7dad,U+7daf-7e2a\"}},{uri:_188,descriptors:{unicodeRange:\"U+4a78-4b0a\"}},{uri:_189,descriptors:{unicodeRange:\"U+9b30-9b31,U+9b33-9b3a,U+9b3d-9b40,U+9b46,U+9b4a-9b4c,U+9b4e,U+9b50,U+9b52-9b53,U+9b55-9bcf\"}},{uri:_190,descriptors:{unicodeRange:\"U+6a4b-6a4f,U+6a51-6a57,U+6a5a,U+6a5c-6a60,U+6a62-6a64,U+6a66-6a70,U+6a72-6a78,U+6a7a-6a7b,U+6a7d-6a7f,U+6a81-6a83,U+6a85-6a8d,U+6a8f,U+6a92-6a96,U+6a98-6a9f,U+6aa1-6aa8,U+6aaa,U+6aad-6aef\"}},{uri:_191,descriptors:{unicodeRange:\"U+99c9-9a53\"}},{uri:_192,descriptors:{unicodeRange:\"U+8550-8555,U+8557-8558,U+855a-855d,U+855f-8563,U+8565-8567,U+8569-8571,U+8573,U+8575-8578,U+857c-857d,U+857f-8583,U+8586,U+8588-858e,U+8590-859a,U+859d-85a3,U+85a5-85a7,U+85a9,U+85ab-85ad,U+85b1-85b6,U+85b8,U+85ba-85c0,U+85c2-85c8,U+85ca-85ce,U+85d1-85d2,U+85d4,U+85d6-85db,U+85dd-85e3,U+85e5-85e8,U+85ea-85fa,U+85fc-85fe,U+8600-8603\"}},{uri:_193,descriptors:{unicodeRange:\"U+6fb2,U+6fb4-6fb5,U+6fb7-6fb8,U+6fba-6fbf,U+6fc1,U+6fc3-6fc8,U+6fca-6fd0,U+6fd3-6fdd,U+6fdf,U+6fe2-6fed,U+6ff0-7010,U+7012-7019,U+701c-7022,U+7024-7034,U+7036-7038,U+703a-704b,U+704d-704e,U+7050-7053\"}},{uri:_194,descriptors:{unicodeRange:\"U+4ba1-4c2c\"}},{uri:_195,descriptors:{unicodeRange:\"U+9a54-9a6b,U+9a72,U+9a83,U+9a89,U+9a8d-9a8e,U+9a94-9a95,U+9a99,U+9aa6,U+9aa9-9aaf,U+9ab2-9ab5,U+9ab9,U+9abb,U+9abd-9abf,U+9ac3-9ac4,U+9ac6-9aca,U+9acd-9ad0,U+9ad2,U+9ad4-9ad7,U+9ad9-9ade,U+9ae0,U+9ae2-9ae5,U+9ae7-9aea,U+9aec,U+9aee,U+9af0-9af8,U+9afa,U+9afc-9b02,U+9b04-9b07,U+9b09-9b0e,U+9b10-9b12,U+9b14-9b1e,U+9b20-9b22,U+9b24-9b2e\"}},{uri:_196,descriptors:{unicodeRange:\"U+9d1a-9da1\"}},{uri:_197,descriptors:{unicodeRange:\"U+9e13-9e1e,U+9e24,U+9e27,U+9e2e,U+9e30,U+9e34,U+9e3b-9e3c,U+9e40,U+9e4d,U+9e50,U+9e52-9e54,U+9e56,U+9e59,U+9e5d,U+9e5f-9e62,U+9e65,U+9e6e-9e6f,U+9e72,U+9e74-9e7d,U+9e80-9e81,U+9e83-9e86,U+9e89-9e8a,U+9e8c-9e91,U+9e94-9e9c,U+9e9e,U+9ea0-9ea5,U+9ea7-9eb3,U+9eb5-9eb7,U+9eb9-9eba,U+9ebc,U+9ebf-9ec3,U+9ec5-9ec8,U+9eca-9ecc,U+9ed0,U+9ed2-9ed3,U+9ed5-9ed7,U+9ed9-9eda,U+9ede,U+9ee1,U+9ee3-9ee4,U+9ee6,U+9ee8,U+9eeb-9eee,U+9ef0-9ef8\"}},{uri:_198,descriptors:{unicodeRange:\"U+8b1c-8b25,U+8b27-8b65,U+8b67-8b6b,U+8b6d-8b9f,U+8bac,U+8bb1,U+8bbb,U+8bc7,U+8bd0\"}},{uri:_199,descriptors:{unicodeRange:\"U+4cad-4d2f\"}},{uri:_200,descriptors:{unicodeRange:\"U+9c4b-9c7b,U+9c7d-9c7e,U+9c80,U+9c83-9c84,U+9c89-9c8a,U+9c8c,U+9c8f,U+9c93,U+9c96-9c99,U+9c9d,U+9caa,U+9cac,U+9caf,U+9cb9,U+9cbe-9cc2,U+9cc8-9cc9,U+9cd1-9cd2,U+9cda-9cdb,U+9ce0-9ce1,U+9ce3-9d19\"}},{uri:_201,descriptors:{unicodeRange:\"U+9389-938e,U+9390-93c9,U+93cb-93d5,U+93d7-9410\"}},{uri:_202,descriptors:{unicodeRange:\"U+20a0-20b5,U+20b9-20ba,U+20bc-20bd,U+4e2c,U+5107,U+5216,U+5293,U+54f3,U+5523,U+5819,U+5adc,U+5c88,U+5e3b,U+5fee,U+62f6,U+63be,U+6484,U+6499,U+67d9,U+67dd,U+6d5e,U+6f46,U+717a,U+71e0,U+72c1,U+73e7,U+75b0,U+7603,U+7722,U+7809,U+7811,U+7946,U+7967,U+799a,U+7b45,U+7ba2,U+8014,U+80d9,U+8159,U+817d,U+81a3,U+81aa,U+8201,U+833c,U+836e,U+83e5,U+8459,U+84f0,U+8729,U+8753,U+87d3,U+89dc,U+8bf6,U+8c2e,U+8e2c,U+8e9c,U+8e9e,U+8ece,U+8fee,U+9139,U+914f,U+9174,U+9191,U+960c,U+9622,U+9a98,U+9b48,U+9ca6,U+9cb0,U+9da2-9e12,U+9e88,U+9f44,U+9f86\"}},{uri:_203,descriptors:{unicodeRange:\"U+9bd0-9c4a\"}},{uri:_204,descriptors:{unicodeRange:\"U+4c2d-4cac\"}},{uri:_205,descriptors:{unicodeRange:\"U+4d30-4dab\"}},{uri:_206,descriptors:{unicodeRange:\"U+9411-943d,U+943f-946a,U+946c-9484\"}},{uri:_207,descriptors:{unicodeRange:\"U+9efa,U+9efd,U+9eff-9f0a,U+9f0c,U+9f0f,U+9f11-9f12,U+9f14-9f16,U+9f18,U+9f1a-9f1f,U+9f21,U+9f23-9f2b,U+9f2d-9f2e,U+9f30-9f36,U+9f38,U+9f3a,U+9f3c,U+9f3f-9f43,U+9f45-9f4f,U+9f52-9f7e,U+9f81-9f82,U+9f8d-9f94\"}},{uri:_208,descriptors:{unicodeRange:\"U+7e2b-7e3a,U+7e3c-7e40,U+7e42-7e46,U+7e48-7e81,U+7e83-7e9a,U+7e9c-7e9e,U+7eae,U+7eb4,U+7ebb-7ebc,U+7ed6,U+7ee4,U+7eec,U+7ef9,U+7f0a,U+7f10,U+7f1e,U+7f37,U+7f39,U+7f3b\"}}],cjkRanges={c:[[19968,40959],[13312,19903],[63744,64255]],j:[[12352,12447],[12448,12543],[12784,12799]],k:[[4352,4607],[44032,55215]]};function matchesCJKRange(e,t){if(!e?.descriptors?.unicodeRange)return!1;const a=e?.descriptors?.unicodeRange.split(\",\").map((e=>{const[t,a]=e.replace(\"U+\",\"\").split(\"-\").map((e=>parseInt(e,16)));return[t,a||t]}));return Object.entries(t).some((([e,t])=>{if(t){const t=cjkRanges[e];return a.some((e=>t.some((t=>{return i=t,(a=e)[0]<=i[1]&&a[1]>=i[0];var a,i}))))}return!1}))}async function getCJKDataURLs(e){const t=e.getCJKFontSettings();if(!(t.c||t.j||t.k))return;const a=XiaolaiFontFaces.filter((e=>matchesCJKRange(e,t))).map((e=>e.uri)),i=[],n=function*(){for(const t of a)yield promiseTry((async()=>{const a=await e.loadFontFromFile(t);a&&i.push(a)}))}.bind(this)();await new PromisePool(n,5).all();const r=[];for(const e of i){const t=new Blob([e],{type:\"font/woff2\"}),a=await blobToBase64(t);r.push(\"data:font/woff2;base64,\"+a)}return r.length>0&&r}async function switchToExcalidraw(e){const t=e.workspace.getLeavesOfType(VIEW_TYPE_EXCALIDRAW_LOADING);for(const e of t)await(e.view?.switchToeExcalidraw())}class ExcalidrawLoading extends obsidian_module.FileView{plugin;constructor(e,t){super(e),this.plugin=t}onload(){super.onload(),this.displayLoadingText()}async switchToeExcalidraw(){const e=this.app.workspace.activeLeaf;await setExcalidrawView(this.leaf);const t=this.app.workspace.activeLeaf;e===this.leaf&&t!==e&&isUnwantedLeaf(t)&&this.app.workspace.activeLeaf.detach()}getViewType(){return VIEW_TYPE_EXCALIDRAW_LOADING}getDisplayText(){return\"Loading Excalidraw... \"+(this.file?.basename??\"\")}displayLoadingText(){const e=this.contentEl.createEl(\"div\",{text:this.getDisplayText()});e.style.display=\"flex\",e.style.alignItems=\"center\",e.style.justifyContent=\"center\",e.style.height=\"100%\",e.style.fontSize=\"1.5em\"}}class PluginFileManager{plugin;app;excalidrawFiles=new Set;get settings(){return this.plugin.settings}constructor(e){this.plugin=e,this.app=e.app}async initialize(){await this.plugin.awaitInit();const e=this.app.metadataCache;e.getCachedFiles().forEach((t=>{const a=e.getCache(t)?.frontmatter;(a&&void 0!==a[FRONTMATTER_KEYS.plugin.name]||t.match(/\\.excalidraw$/))&&this.updateFileCache(this.app.vault.getAbstractFileByPath(t),a)}))}isExcalidrawFile(e){if(!e)return!1;if(\"excalidraw\"===e.extension)return!0;const t=e?this.plugin.app.metadataCache.getFileCache(e):null;return!!t?.frontmatter&&!!t.frontmatter[FRONTMATTER_KEYS.plugin.name]}updateFileCache(e,t,a=!1){t&&void 0!==t[FRONTMATTER_KEYS.plugin.name]?this.excalidrawFiles.add(e):a||\"excalidraw\"!==e.extension?this.excalidrawFiles.delete(e):this.excalidrawFiles.add(e)}getExcalidrawFiles(){return this.excalidrawFiles}destroy(){this.excalidrawFiles.clear()}async createDrawing(e,t,a){const i=obsidian_module.normalizePath(t||this.settings.folder);await checkAndCreateFolder(i);const n=getNewUniqueFilepath(this.app.vault,e,i),r=await this.app.vault.create(n,a??await this.plugin.getBlankDrawing());let s=0;for(;r instanceof obsidian_module.TFile&&!this.isExcalidrawFile(r)&&s++<10;)await sleep(50);return s>10&&errorlog({file:r,error:\"new drawing not recognized as an excalidraw file\",fn:this.createDrawing}),r}async getBlankDrawing(){const e=getListOfTemplateFiles(this.plugin);if(e){const t=await templatePromt(e,this.app);if(t&&t instanceof obsidian_module.TFile&&(\"md\"==t.extension&&!this.settings.compatibilityMode||\"excalidraw\"==t.extension&&this.settings.compatibilityMode)){const e=await this.app.vault.read(t);if(e)return this.settings.matchTheme?changeThemeOfExcalidrawMD(e):e}}if(this.settings.compatibilityMode)return this.settings.matchTheme&&isObsidianThemeDark()?DARK_BLANK_DRAWING:BLANK_DRAWING;const t=this.settings.matchTheme&&isObsidianThemeDark()?DARK_BLANK_DRAWING:BLANK_DRAWING;return`${FRONTMATTER}\\n${getMarkdownDrawingSection(t,this.settings.compress)}`}async embedDrawing(e){const t=this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView);if(t&&t.file){const a=this.app.metadataCache.fileToLinktext(e,t.file.path,\"excalidraw\"===this.settings.embedType),i=t.editor;if(\"excalidraw\"===this.settings.embedType)return i.replaceSelection(getLink(this.plugin,{path:a})),void i.focus();let n=this.settings.autoExportLightAndDark?getExportTheme(this.plugin,e,this.settings.exportWithTheme&&isObsidianThemeDark()?\"dark\":\"light\"):\"\";n=\"\"===n?\"\":n+\".\";const r=n+this.settings.embedType.toLowerCase();let s=getIMGFilename(e.path,r);if(this.plugin.ea?.onImageExportPathHook)try{s=this.plugin.ea.onImageExportPathHook({exportFilepath:s,exportExtension:r,excalidrawFile:e,action:\"export\"})??s}catch(e){errorlog({where:\"FileManager.embedDrawing\",fn:this.plugin.ea.onImageExportPathHook,error:e})}const o=async e=>await createFileAndAwaitMetacacheUpdate(this.app,e,\"SVG\"===this.settings.embedType?'<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"0\" height=\"0\"></svg>':new Uint8Array([137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,1,0,0,0,1,8,6,0,0,0,31,21,196,137,0,0,0,11,73,68,65,84,120,156,98,0,2,0,0,5,0,1,13,10,45,180,0,0,0,0,73,69,78,68,174,66,96,130]).buffer);let l=this.app.vault.getFileByPath(s);l||(l=await o(s));const c=this.app.metadataCache.fileToLinktext(l,t.file.path,!1),d=\"dark.\"===n?\"light.\":\"dark.\",h=\"\"!==n&&c.endsWith(r)?c.substring(0,c.lastIndexOf(r))+d+this.settings.embedType.toLowerCase():null;h&&await o(l.path.substring(0,l.path.lastIndexOf(r))+d+this.settings.embedType.toLowerCase());const p=this.settings.embedMarkdownCommentLinks;i.replaceSelection(this.settings.embedWikiLink?`![[${c}]]\\n`+(p?`%%[[${a}|\ud83d\udd8b Edit in Excalidraw]]${h?\", and the [[\"+h+\"|\"+d.split(\".\")[0]+\" exported image]]\":\"\"}%%`:\"\"):`![](${encodeURI(c)})\\n`+(p?`%%[\ud83d\udd8b Edit in Excalidraw](${encodeURI(a)})${h?\", and the [\"+d.split(\".\")[0]+\" exported image](\"+encodeURI(h)+\")\":\"\"}%%`:\"\")),i.focus()}}async exportLibrary(){DEVICE.isMobile?new Prompt(this.app,\"Please provide a filename\",\"my-library\",\"filename, leave blank to cancel action\").openAndGetValue((async e=>{if(!e)return;e=`${e}.excalidrawlib`;const t=obsidian_module.normalizePath(this.settings.folder);await checkAndCreateFolder(t);const a=getNewUniqueFilepath(this.app.vault,e,t);this.app.vault.create(a,this.settings.library),new obsidian_module.Notice(`Exported library to ${a}`,6e3)})):download(\"data:text/plain;charset=utf-8\",encodeURIComponent(JSON.stringify(this.settings.library2,null,\"\\t\")),\"my-obsidian-library.excalidrawlib\")}openDrawing(e,t,a=!1,i,n=!1,r){const s=()=>{let e;return\"md-properties\"===t&&(t=\"new-tab\"),\"popout-window\"===t&&(e=this.app.workspace.openPopoutLeaf(r)),\"new-tab\"===t&&(e=this.app.workspace.getLeaf(\"tab\")),e||(e=this.app.workspace.getLeaf(!1),\"empty\"!==e.view.getViewType()&&\"new-pane\"===t&&(e=getNewOrAdjacentLeaf(this.plugin,e))),e},{leaf:o,promise:l}=openLeaf({plugin:this.plugin,fnGetLeaf:()=>s(),file:e,openState:i&&\"\"!==i?{active:a,eState:{subpath:i}}:{active:a}});l.then((()=>{const t=this.plugin.ea;if(n&&t.onFileCreateHook)try{t.onFileCreateHook({ea:t,excalidrawFile:e,view:o.view})}catch(e){console.error(e)}}))}async exportSceneToMD(e,t){if(!e)return\"\";const a=JSON_parse(e),i=a.elements?.filter((e=>\"text\"==e.type));let n,r=\"# Excalidraw Data\\n\\n## Text Elements\\n\";for(const t of i)n=t.id,t.id.length>8&&(n=nanoid(),e=e.replaceAll(t.id,n)),r+=`${t.originalText??t.text} ^${n}\\n\\n`;return r+getMarkdownDrawingSection(JSON.stringify(JSON_parse(e),null,\"\\t\"),void 0===t?this.settings.compress:t)}async renameEventHandler(e,t){if(!(e instanceof obsidian_module.TFile))return;if(!this.isExcalidrawFile(e))return;if(this.moveBAKFile(t,e.path),!this.settings.keepInSync)return;const a=new Map;[EXPORT_TYPES,\"excalidraw\"].flat().forEach((i=>{let n=getIMGFilename(t,i),r=getIMGFilename(e.path,i);if(this.plugin.ea?.onImageExportPathHook)try{n=this.plugin.ea.onImageExportPathHook({exportFilepath:n,exportExtension:i,excalidrawFile:e,oldExcalidrawPath:t,action:\"move\"})??n,r=this.plugin.ea.onImageExportPathHook({exportFilepath:r,exportExtension:i,excalidrawFile:e,action:\"export\"})??r}catch(e){errorlog({where:\"FileManager.renameEventHandler\",fn:this.plugin.ea.onImageExportPathHook,error:e})}a.set(i,{oldImgPath:n,newImgPath:r})})),a.forEach(((e,t)=>{const a=this.app.vault.getFileByPath(obsidian_module.normalizePath(e.oldImgPath));a&&this.app.fileManager.renameFile(a,obsidian_module.normalizePath(e.newImgPath))}))}async modifyEventHandler(e){getExcalidrawViews(this.app).forEach((async t=>{if(!t.semaphores?.viewunload&&t.file&&(t.file.path===e.path||\"excalidraw\"===e.extension&&`${e.path.substring(0,e.path.lastIndexOf(\".excalidraw\"))}.md`===t.file.path)){if(t.semaphores?.preventReload)return void(t.semaphores.preventReload=!1);const a=this.app.workspace.activeLeaf.view;if(!(a!==t&&a instanceof obsidian_module.MarkdownView&&a.file===t.file||a===t&&this.plugin.isRecentSplitViewSwitch())&&t.lastSaveTimestamp+3e5<Date.now())return void t.reload(!0,t.file);if(\"md\"===e.extension){if(t.semaphores?.embeddableIsEditingSelf)return;const a=new ExcalidrawData(this.plugin),i=await this.app.vault.read(e);await a.loadData(i,e,getTextMode(i)),t.synchronizeWithData(a),a.destroy(),t?.isDirty()&&(t.autosaveTimer&&t.autosaveFunction&&clearTimeout(t.autosaveTimer),t.autosaveFunction&&t.autosaveFunction())}else t.reload(!0,t.file)}}))}async removeBAKFromCache(e){imageCache.isReady()&&e&&await imageCache.removeBAKFromCache(e)}async moveBAKFile(e,t){if(!e||!t)return;if(!imageCache.isReady())return;const a=await imageCache.getBAKFromCache(e);a&&(await imageCache.addBAKToCache(t,`${a}`),await this.removeBAKFromCache(e))}async deleteEventHandler(e){if(!(e instanceof obsidian_module.TFile))return;const t=this.getExcalidrawFiles().has(e);if(this.updateFileCache(e,void 0,!0),!t)return;const a=getExcalidrawViews(this.app);for(const t of a)e?.path&&t?.file?.path===e.path&&await t.leaf.setViewState({type:VIEW_TYPE_EXCALIDRAW,state:{file:null}});if(this.removeBAKFromCache(e.path),this.settings.keepInSync){const t=new Map;[EXPORT_TYPES,\"excalidraw\"].flat().forEach((a=>{let i=getIMGFilename(e.path,a);if(this.plugin.ea?.onImageExportPathHook)try{i=this.plugin.ea.onImageExportPathHook({exportFilepath:i,exportExtension:a,excalidrawFile:e,action:\"delete\"})??i}catch(e){errorlog({where:\"FileManager.deleteEventHandler\",fn:this.plugin.ea.onImageExportPathHook,error:e})}t.set(a,i)})),window.setTimeout((()=>{t.forEach(((e,t)=>{const a=this.app.vault.getFileByPath(obsidian_module.normalizePath(e));a&&this.app.vault.delete(a)}))}),500)}}}class ObserverManager{plugin;app;themeObserver;fileExplorerObserver;modalContainerObserver;workspaceDrawerLeftObserver;workspaceDrawerRightObserver;activeViewDoc;get settings(){return this.plugin.settings}constructor(e){this.plugin=e,this.app=e.app}initialize(){try{this.settings.matchThemeTrigger&&this.addThemeObserver(),this.experimentalFileTypeDisplayToggle(this.settings.experimentalFileType),this.addModalContainerObserver()}catch(e){new obsidian_module.Notice(\"Error adding ObserverManager\",6e3),console.error(\"Error adding ObserverManager\",e)}this.plugin.logStartupEvent(\"ObserverManager added\")}destroy(){this.removeThemeObserver(),this.removeModalContainerObserver(),this.workspaceDrawerLeftObserver&&this.workspaceDrawerLeftObserver.disconnect(),this.workspaceDrawerRightObserver&&this.workspaceDrawerRightObserver.disconnect(),this.fileExplorerObserver&&this.fileExplorerObserver.disconnect(),this.workspaceDrawerRightObserver&&this.workspaceDrawerRightObserver.disconnect(),this.workspaceDrawerLeftObserver&&this.workspaceDrawerLeftObserver.disconnect()}addThemeObserver(){if(this.themeObserver)return;const{matchThemeTrigger:e}=this.settings;if(!e)return;const t=async e=>{const{matchThemeTrigger:t}=this.settings;if(!t)return;const a=document.body.classList,i=e[0];if(i?.oldValue===a.value)return;const n=a.contains(\"theme-dark\");i?.oldValue?.includes(\"theme-dark\")!==n&&setTimeout((()=>{const e=isObsidianThemeDark()?\"dark\":\"light\";getExcalidrawViews(this.app).forEach((t=>{t.file&&t.excalidrawAPI&&t.setTheme(e)}))}))};this.themeObserver=DEBUGGING?new CustomMutationObserver(t,\"themeObserver\"):new MutationObserver(t),this.themeObserver.observe(document.body,{attributeOldValue:!0,attributeFilter:[\"class\"]})}removeThemeObserver(){this.themeObserver&&(this.themeObserver.disconnect(),this.themeObserver=null)}experimentalFileTypeDisplayToggle(e){e?this.experimentalFileTypeDisplay():(this.fileExplorerObserver&&this.fileExplorerObserver.disconnect(),this.fileExplorerObserver=null)}async experimentalFileTypeDisplay(){const e=e=>{if(1!==e.childElementCount)return;const t=e.getAttribute(\"data-path\");if(!t)return;const a=this.app.vault.getAbstractFileByPath(t);a&&a instanceof obsidian_module.TFile&&this.plugin.isExcalidrawFile(a)&&e.insertAfter(createDiv({cls:\"nav-file-tag\",text:this.settings.experimentalFileTag}),e.firstChild)},t=t=>{t.filter((e=>e.addedNodes.length>0)).forEach((t=>{t.addedNodes.forEach((t=>{t instanceof Element&&t.querySelectorAll(\".nav-file-title\").forEach(e)}))}))};this.fileExplorerObserver=DEBUGGING?new CustomMutationObserver(t,\"fileExplorerObserver\"):new MutationObserver(t),document.querySelectorAll(\".nav-file-title\").forEach(e);const a=document.querySelector(\".nav-files-container\");a&&this.fileExplorerObserver.observe(a,{childList:!0,subtree:!0})}addModalContainerObserver(){if(!this.plugin.activeExcalidrawView)return;if(this.modalContainerObserver){if(this.activeViewDoc===this.plugin.activeExcalidrawView.ownerDocument)return;this.removeModalContainerObserver()}const e=async e=>{const t=this.plugin.activeExcalidrawView;if(1!==e.length||\"childList\"!==e[0].type||1!==e[0].addedNodes.length||!t||t.semaphores?.viewunload||!t.isDirty())return;const{errorMessage:a}=t.excalidrawAPI.getAppState();a||this.plugin.activeExcalidrawView.save()};this.modalContainerObserver=DEBUGGING?new CustomMutationObserver(e,\"modalContainerObserver\"):new MutationObserver(e),this.activeViewDoc=this.plugin.activeExcalidrawView.ownerDocument,this.modalContainerObserver.observe(this.activeViewDoc.body,{childList:!0})}removeModalContainerObserver(){this.modalContainerObserver&&(this.modalContainerObserver.disconnect(),this.activeViewDoc=null,this.modalContainerObserver=null)}addWorkspaceDrawerObserver(){const e=document.querySelector(\".workspace-drawer.mod-left\"),t=document.querySelector(\".workspace-drawer.mod-right\");if(e||t){const a=async e=>{\"display: none;\"===e[0].oldValue&&this.plugin.activeExcalidrawView&&this.plugin.activeExcalidrawView?.isDirty()&&this.plugin.activeExcalidrawView.save()},i={attributeOldValue:!0,attributeFilter:[\"style\"]};e&&(this.workspaceDrawerLeftObserver=DEBUGGING?new CustomMutationObserver(a,\"slidingDrawerLeftObserver\"):new MutationObserver(a),this.workspaceDrawerLeftObserver.observe(e,i)),t&&(this.workspaceDrawerRightObserver=DEBUGGING?new CustomMutationObserver(a,\"slidingDrawerRightObserver\"):new MutationObserver(a),this.workspaceDrawerRightObserver.observe(t,i))}}}class PackageManager{packageMap=new Map;EXCALIDRAW_PACKAGE;plugin;fallbackPackage=null;constructor(e){this.plugin=e;try{if(this.EXCALIDRAW_PACKAGE=unpackExcalidraw(),excalidrawLib=errorHandler.safeEval(`(function() {${this.EXCALIDRAW_PACKAGE};return ExcalidrawLib;})()`,\"PackageManager constructor - excalidrawLib initialization\",window),!excalidrawLib)throw new Error(\"Failed to initialize excalidrawLib\");updateExcalidrawLib();const e={react:react,reactDOM:reactDOM,excalidrawLib:excalidrawLib};if(!this.validatePackage(e))throw new Error(\"Invalid initial package\");this.setPackage(window,e),this.fallbackPackage=e}catch(e){errorHandler.handleError(e,\"PackageManager constructor\"),new obsidian_module.Notice(\"Error loading the Excalidraw package. Some features may not work correctly.\",1e4),console.error(\"Error loading the Excalidraw package\",e)}e.logStartupEvent(\"Excalidraw package unpacked\")}validatePackage(e){if(!e)return!1;if(!e.react||!e.reactDOM||!e.excalidrawLib)return!1;const t=e.excalidrawLib;return\"object\"==typeof t&&null!==t&&\"function\"==typeof t.restore&&\"function\"==typeof t.exportToSvg}setPackage(e,t){this.validatePackage(t)?(this.packageMap.set(e,t),this.fallbackPackage||(this.fallbackPackage=t)):errorHandler.handleError(\"Attempted to set invalid package\",\"PackageManager.setPackage\")}getPackageMap(){return this.packageMap}getPackage(e){try{if(this.packageMap.has(e)){const t=this.packageMap.get(e);if(this.validatePackage(t))return t;this.packageMap.delete(e)}return errorHandler.wrapWithTryCatch((()=>{const t=errorHandler.safeEval(`(function() {\\n            ${REACT_PACKAGES+this.EXCALIDRAW_PACKAGE};\\n            return {react: React, reactDOM: ReactDOM, excalidrawLib: ExcalidrawLib};\\n          })()`,\"PackageManager.getPackage - package evaluation\",e);if(!t||!this.validatePackage(t))throw new Error(\"Failed to create valid package\");const a={react:t.react,reactDOM:t.reactDOM,excalidrawLib:t.excalidrawLib};return this.packageMap.set(e,a),a}),\"PackageManager.getPackage\",this.fallbackPackage)}catch(e){if(errorHandler.handleError(e,\"PackageManager.getPackage\"),this.fallbackPackage)return this.fallbackPackage;throw new Error(\"Failed to get package and no fallback available\")}}deletePackage(e){try{const t=this.packageMap.get(e);if(!t)return;const{react:a,reactDOM:i,excalidrawLib:n}=t;e.ExcalidrawLib===n&&errorHandler.wrapWithTryCatch((()=>{n&&\"function\"==typeof n.destroyObsidianUtils&&n.destroyObsidianUtils(),delete e.ExcalidrawLib}),\"PackageManager.deletePackage - cleanup ExcalidrawLib\"),e.React===a&&errorHandler.wrapWithTryCatch((()=>{Object.keys(e.React||{}).forEach((t=>{delete e.React[t]})),delete e.React}),\"PackageManager.deletePackage - cleanup React\"),e.ReactDOM===i&&errorHandler.wrapWithTryCatch((()=>{Object.keys(e.ReactDOM||{}).forEach((t=>{delete e.ReactDOM[t]})),delete e.ReactDOM}),\"PackageManager.deletePackage - cleanup ReactDOM\"),this.packageMap.delete(e)}catch(e){errorHandler.handleError(e,\"PackageManager.deletePackage\")}}setExcalidrawPackage(e){this.EXCALIDRAW_PACKAGE=e}destroy(){try{REACT_PACKAGES=\"\",Array.from(this.packageMap.entries()).forEach((([e,t])=>{this.deletePackage(e)})),this.packageMap.clear(),this.EXCALIDRAW_PACKAGE=\"\",this.fallbackPackage=null,react=null,reactDOM=null,excalidrawLib=null}catch(e){errorHandler.handleError(e,\"PackageManager.destroy\")}}}var openDialogAction;!function(e){e[e.openFile=0]=\"openFile\",e[e.insertLinkToDrawing=1]=\"insertLinkToDrawing\"}(openDialogAction||(openDialogAction={}));class OpenFileDialog extends obsidian_module.FuzzySuggestModal{plugin;action;onNewPane;destroy(){this.app=null,this.plugin=null,this.action=null,this.inputEl.onkeyup=null}constructor(e,t){super(e),this.app=e,this.action=openDialogAction.openFile,this.plugin=t,this.onNewPane=!1,this.limit=20,this.setInstructions([{command:t$d(\"TYPE_FILENAME\"),purpose:\"\"}]),this.inputEl.onkeyup=e=>{\"Enter\"==e.key&&this.action==openDialogAction.openFile&&this.containerEl.innerText.includes(EMPTY_MESSAGE)&&(this.plugin.createAndOpenDrawing(`${this.plugin.settings.folder}/${this.inputEl.value}.excalidraw.md`,this.onNewPane?\"new-pane\":\"active-pane\"),this.close())}}getItems(){return(this.app.vault.getFiles()||[]).filter((e=>this.plugin.isExcalidrawFile(e)))}getItemText(e){return e.path}onChooseItem(e){switch(this.action){case openDialogAction.openFile:this.plugin.openDrawing(e,this.onNewPane?\"new-pane\":\"active-pane\",!0);break;case openDialogAction.insertLinkToDrawing:this.plugin.embedDrawing(e)}}start(e,t){switch(this.action=e,this.onNewPane=t,e){case openDialogAction.openFile:this.emptyStateText=EMPTY_MESSAGE,this.setPlaceholder(t$d(\"SELECT_FILE_OR_TYPE_NEW\"));break;case openDialogAction.insertLinkToDrawing:this.emptyStateText=t$d(\"NO_MATCH\"),this.setPlaceholder(t$d(\"SELECT_TO_EMBED\"))}this.open()}}class InsertLinkDialog extends obsidian_module.FuzzySuggestModal{plugin;addText;drawingPath;destroy(){this.app=null,this.addText=null,this.drawingPath=null}constructor(e){super(e.app),this.plugin=e,this.app=e.app,this.limit=20,this.setInstructions([{command:t$d(\"SELECT_FILE\"),purpose:\"\"}]),this.setPlaceholder(t$d(\"SELECT_FILE_TO_LINK\")),this.emptyStateText=t$d(\"NO_MATCH\")}getItems(){return this.app.metadataCache.getLinkSuggestions().filter((e=>!e.path.match(REG_LINKINDEX_INVALIDCHARS)))}getItemText(e){return e.path+(e.alias?`|${e.alias}`:\"\")}onChooseItem(e){let t=e.path;e.file&&(t=this.app.metadataCache.fileToLinktext(e.file,this.drawingPath,!0)),getLink(this.plugin,{embed:!1,path:t,alias:e.alias}),this.addText(getLink(this.plugin,{embed:!1,path:t,alias:e.alias}),t,e.alias)}renderSuggestion(e,t){const{item:a,match:i}=e||{};t.addClass(\"mod-complex\");const n=t.createDiv(\"suggestion-content\"),r=t.createDiv(\"suggestion-aux\"),s=n.createDiv(\"suggestion-title\"),o=n.createDiv(\"suggestion-note\");if(!a)return s.setText(this.emptyStateText),void t.addClass(\"is-selected\");const l=a.file?.path??a.path,c=l.length-(a.file?.name.length??0),d=i.matches.map((e=>createSpan(\"suggestion-highlight\"))),h=this.getItemText(a);for(let e=c;e<h.length;e++){const t=i.matches.find((t=>t[0]===e));if(t){const a=d[i.matches.indexOf(t)];s.appendChild(a),a.appendText(h.substring(t[0],t[1])),e+=t[1]-t[0]-1}else s.appendText(h[e])}o.setText(l),a.file?this.plugin.isExcalidrawFile(a.file)?obsidian_module.setIcon(r,ICON_NAME):\"md\"===a.file.extension?obsidian_module.setIcon(r,\"square-pen\"):IMAGE_TYPES.includes(a.file.extension)?obsidian_module.setIcon(r,\"image\"):VIDEO_TYPES.includes(a.file.extension)?obsidian_module.setIcon(r,\"monitor-play\"):AUDIO_TYPES.includes(a.file.extension)?obsidian_module.setIcon(r,\"file-audio\"):CODE_TYPES.includes(a.file.extension)?obsidian_module.setIcon(r,\"file-code\"):\"canvas\"===a.file.extension?obsidian_module.setIcon(r,\"layout-dashboard\"):\"pdf\"===a.file.extension?obsidian_module.setIcon(r,\"book-open-text\"):r.setText(a.file.extension):obsidian_module.setIcon(r,\"ghost\")}onClose(){window.setTimeout((()=>{this.addText=null})),super.onClose()}inLink;onOpen(){super.onOpen(),this.inLink&&(this.inputEl.value=this.inLink,this.inputEl.dispatchEvent(new Event(\"input\")))}start(e,t,a){this.addText=t,this.drawingPath=e,this.inLink=a,this.open()}}class InsertCommandDialog extends obsidian_module.FuzzySuggestModal{addText;destroy(){this.app=null,this.addText=null}constructor(e){super(e),this.app=e,this.limit=20,this.setInstructions([{command:t$d(\"SELECT_COMMAND\"),purpose:\"\"}]),this.setPlaceholder(t$d(\"SELECT_COMMAND_PLACEHOLDER\")),this.emptyStateText=t$d(\"NO_MATCHING_COMMAND\")}getItems(){return this.app.commands.listCommands()}getItemText(e){return e.name}onChooseItem(e){this.addText(`\u2699\ufe0f[${e.name}](cmd://${e.id})`),this.addText=null}start(e){this.addText=e,this.open()}onClose(){window.setTimeout((()=>{this.addText=null})),super.onClose()}}class InsertImageDialog extends obsidian_module.FuzzySuggestModal{plugin;view;destroy(){this.app=null,this.plugin=null,this.view=null,this.inputEl.onkeyup=null}onClose(){window.setTimeout((()=>{this.view=null})),super.onClose()}constructor(e){super(e.app),this.plugin=e,this.app=e.app,this.limit=20,this.setInstructions([{command:t$d(\"SELECT_FILE_WITH_OPTION_TO_SCALE\"),purpose:\"\"}]),this.setPlaceholder(t$d(\"SELECT_DRAWING\")),this.emptyStateText=t$d(\"NO_MATCH\"),this.inputEl.onkeyup=e=>{\"Enter\"===e.key&&scaleToFullsizeModifier(e)&&this.chooser.values&&(this.onChooseItem(this.chooser.values[this.chooser.selectedItem].item,new KeyboardEvent(\"keypress\",{shiftKey:!0,metaKey:!(DEVICE.isIOS||DEVICE.isMacOS),ctrlKey:DEVICE.isIOS||DEVICE.isMacOS})),this.close())}}getItems(){return(this.app.vault.getFiles()||[]).filter((e=>(IMAGE_TYPES.contains(e.extension)||this.plugin.isExcalidrawFile(e))&&!e.path.match(REG_LINKINDEX_INVALIDCHARS)))}getItemText(e){return e.path}onChooseItem(e,t){const a=getEA(this.view);a.canvas.theme=this.view.excalidrawAPI.getAppState().theme;const i=scaleToFullsizeModifier(t);(async()=>{await a.addImage(0,0,e,!i),await a.addElementsToView(!0,!0,!0),a.destroy()})()}start(e){this.view=e,this.open()}}class ImportSVGDialog extends obsidian_module.FuzzySuggestModal{plugin;view;destroy(){this.app=null,this.plugin=null,this.view=null}constructor(e){super(e.app),this.plugin=e,this.app=e.app,this.limit=20,this.setInstructions([{command:t$d(\"SELECT_FILE\"),purpose:\"\"}]),this.setPlaceholder(t$d(\"SELECT_DRAWING\")),this.emptyStateText=t$d(\"NO_MATCH\")}getItems(){return(this.app.vault.getFiles()||[]).filter((e=>\"svg\"===e.extension&&!e.path.match(REG_LINKINDEX_INVALIDCHARS)))}getItemText(e){return e.path}async onChooseItem(e,t){if(!e)return;const a=getEA(this.view),i=await this.app.vault.read(e);i&&\"\"!==i&&(a.importSVG(i),a.addToGroup(a.getElements().map((e=>e.id))),await a.addElementsToView(!0,!0,!0,!0),a.destroy())}onClose(){window.setTimeout((()=>{this.view=null})),super.onClose()}start(e){this.view=e,this.open()}}class InsertMDDialog extends obsidian_module.FuzzySuggestModal{plugin;view;destroy(){this.app=null,this.plugin=null,this.view=null}constructor(e){super(e.app),this.plugin=e,this.app=e.app,this.limit=20,this.setInstructions([{command:t$d(\"SELECT_FILE\"),purpose:\"\"}]),this.setPlaceholder(t$d(\"SELECT_MD\")),this.emptyStateText=t$d(\"NO_MATCH\")}getItems(){return(this.app.vault.getFiles()||[]).filter((e=>\"md\"===e.extension&&!this.plugin.isExcalidrawFile(e)))}getItemText(e){return e.path}onChooseItem(e){const t=getEA(this.view);(async()=>{await t.addImage(0,0,e),await t.addElementsToView(!0,!1,!0),t.destroy()})()}start(e){this.view=e,this.open()}onClose(){window.setTimeout((()=>{this.view=null})),super.onClose()}}class FrontmatterEditor{frontmatterStr;dataWOfrontmatter;initialized=!1;constructor(e){this.dataWOfrontmatter=e;const t=(e=e.replaceAll(\"\\r\\n\",\"\\n\").replaceAll(\"\\r\",\"\\n\")).split(/^---(?:.|\\n)*(?:^---\\n)/gm);2===t.length&&(this.dataWOfrontmatter=t[1],this.frontmatterStr=e.match(/^---((?:.|\\n)*)(?:^---\\n)/gm)[0].replaceAll(/(^---\\n|^\\n)/gm,\"\").trim()+\"\\n\",this.initialized=!0)}hasKey(e){if(!this.initialized)return!1;const t=new RegExp(`^${e}:`,\"gm\");return Boolean(this.frontmatterStr.match(t))}setKey(e,t){if(this.initialized)if(t=t.replaceAll(\"\\r\\n\",\"\\n\").replaceAll(\"\\r\",\"\\n\").replaceAll(\":\",\";\").trim().split(\"\\n\").join(\" \"),this.hasKey(e)){const a=new RegExp(`^${e}:.*\\\\n(?:\\\\s\\\\s.*\\\\n)*`,\"gm\");this.frontmatterStr=this.frontmatterStr.split(a).join(\"\\n\").trim()+`\\n${e}: ${t}`}else this.frontmatterStr=this.frontmatterStr.trim()+`\\n${e}: ${t}`}get data(){return this.initialized?[\"---\",this.frontmatterStr,\"---\",this.dataWOfrontmatter].join(\"\\n\"):this.dataWOfrontmatter}}const TASKBONE_URL=\"https://api.taskbone.com/\",TASKBONE_OCR_FN=\"execute?id=60f394af-85f6-40bc-9613-5d26dc283cbb\";class Taskbone{plugin;get apiKey(){return this.plugin.settings.taskboneAPIkey}constructor(e){this.plugin=e}destroy(){this.plugin=null}async initialize(e=!0){if(\"\"!==this.plugin.settings.taskboneAPIkey)return;const t=await obsidian_module.requestUrl({url:`${TASKBONE_URL}users/excalidraw-obsidian/identities`,method:\"post\",contentType:\"application/json\",throw:!1});if(!t)return;const a=t.json?.apiKey;return a&&\"string\"==typeof a&&(e&&await this.plugin.loadSettings(),this.plugin.settings.taskboneAPIkey=a,e&&await this.plugin.saveSettings()),a}async getTextForElements(e,t){t.copyViewElementsToEAforEditing(e,!0);const a=t.getBoundingBox(e),i=a.width*a.height,n=Math.sqrt(36e4/i),r=Math.sqrt(i/16e6),s=n>1?n:r>1?1/r:1,o=new EmbeddedFilesLoader(this.plugin,!1),l=await t.createPNG(null,s,{withBackground:!0,withTheme:!0,isMask:!1},o,\"light\");return await this.getTextForImage(l)}async getTextForView(e,{forceReScan:t,selectedElementsOnly:a=!1,addToFrontmatter:i=!0}){await e.forceSave(!0);const n=getEA(e),r=(a?n.getViewSelectedElements():n.getViewElements()).filter((t=>\"freedraw\"===t.type||\"image\"===t.type&&!this.plugin.isExcalidrawFile(e.excalidrawData.getFile(t.fileId)?.file)));if(0===r.length)return new obsidian_module.Notice(\"Aborting OCR because there are no image or freedraw elements on the canvas.\",4e3),void n.destroy();const s=new FrontmatterEditor(e.data);if(i&&s.hasKey(\"taskbone-ocr\")&&!t)return new obsidian_module.Notice(\"The drawing has already been processed, you will find the result in the frontmatter in markdown view mode. If you ran the command from the Obsidian Panel in Excalidraw then you can CTRL(CMD)+click the command to force the rescaning.\",4e3),void n.destroy();const o=await this.getTextForElements(r,n);o&&(i&&(s.setKey(\"taskbone-ocr\",o),e.data=s.data,e.save(!1,!0,!0)),window.navigator.clipboard.writeText(o),new obsidian_module.Notice(`I placed the recognized text onto the system clipboard${i?\" and to document properties\":\"\"}.`)),n.destroy()}async getTextForImage(e){const t=TASKBONE_URL+TASKBONE_OCR_FN;\"\"===this.apiKey&&await this.initialize();const a={records:[{image:await blobToBase64(e)}]},i=await fetch(t,{method:\"post\",contentType:\"application/json\",body:JSON.stringify(a),headers:{\"Content-Type\":\"application/json\",authorization:`Bearer ${this.apiKey}`}}),n=await(i?.json());return n&&200===i.status?n.records[0].text:(new obsidian_module.Notice(\"Something went wrong while processing your request. Please check developer console for more information\"),void log$2(i))}}const haveLinkedFilesChanged=(e,t,a,i,n)=>{if(e++>5)return!1;i.add(a);const r=n.app.metadataCache.resolvedLinks[a];if(!r)return!1;for(const s of Object.keys(r)){if(i.has(s))continue;const r=n.app.vault.getAbstractFileByPath(s);if(r&&r instanceof obsidian_module.TFile){if(console.log(a,{mtimeLinked:r.stat.mtime,mtimeSource:t,path:r.path}),r.stat.mtime>t)return!0;if(n.isExcalidrawFile(r)&&haveLinkedFilesChanged(e,t,r.path,i,n))return!0}}return!1},listOfOutOfSyncImgExports=async(e,t,a)=>{const i=e.app;if(!i.internalPlugins.plugins.publish.instance)return;const n=await i.internalPlugins.plugins.publish.instance.apiList();if(!n||!n.files)return;const r=new Set,s=n.files.filter((e=>e.path.endsWith(\".svg\")||e.path.endsWith(\".png\"))),o=s.length;return s.forEach(((n,s)=>{const l=getIMGFilename(n.path,\"md\"),c=i.vault.getAbstractFileByPath(n.path),d=i.vault.getAbstractFileByPath(l);if(a.innerText=`Status: ${s+1}/${o} ${c?c.name:n.path}`,d&&c&&d instanceof obsidian_module.TFile&&c instanceof obsidian_module.TFile){if(d.stat.mtime<=c.stat.mtime){if(!t)return;if(!haveLinkedFilesChanged(0,d.stat.mtime,d.path,new Set,e))return}r.add(d)}})),Array.from(r)};class PublishOutOfDateFilesDialog extends obsidian_module.Modal{plugin;constructor(e){super(e.app),this.plugin=e}async onClose(){}onOpen(){this.containerEl.classList.add(\"excalidraw-release\"),this.titleEl.setText(\"Out of Date SVG Files\"),this.createForm(!1)}async createForm(e){const t=this.contentEl.createEl(\"details\");t.createEl(\"summary\",{text:\"Video about Obsidian Publish support\"}),t.createEl(\"br\"),addYouTubeThumbnail(t,\"JC1E-jeiWhI\");const a=this.contentEl.createEl(\"p\",{text:\"Collecting data...\"}),i=this.contentEl.createEl(\"p\",{text:\"Status: \"}),n=await listOfOutOfSyncImgExports(this.plugin,e,i);if(i.style.display=\"none\",!n||0===n.length){a.innerText=\"No out of date files found.\";const t=this.contentEl.createDiv({cls:\"excalidraw-prompt-buttons-div\"});return t.createEl(\"button\",{text:\"Close\",cls:\"excalidraw-prompt-button\"}).onclick=()=>{this.close()},void(e||(t.createEl(\"button\",{text:\"Check Recursive\",cls:\"excalidraw-prompt-button\"}).onclick=()=>{this.contentEl.empty(),this.createForm(!0)}))}const r=new Map;a.innerText=\"Select files to open.\",n.forEach((e=>{r.set(e,!0),new obsidian_module.Setting(this.contentEl).setName(e.path).addToggle((t=>t.setValue(!0).onChange((t=>{r.set(e,t)}))))}));const s=this.contentEl.createDiv({cls:\"excalidraw-prompt-buttons-div\"});s.createEl(\"button\",{text:\"Close\",cls:\"excalidraw-prompt-button\"}).onclick=()=>{this.close()},e||(s.createEl(\"button\",{text:\"Check Recursive\",cls:\"excalidraw-prompt-button\"}).onclick=()=>{this.contentEl.empty(),this.createForm(!0)}),s.createEl(\"button\",{text:\"Open Selected\",cls:\"excalidraw-prompt-button\"}).onclick=()=>{r.forEach(((e,t)=>{e&&this.plugin.openDrawing(t,\"new-tab\",!0)})),this.close()}}}const showFrameSettings=e=>{const{enabled:t,clip:a,name:i,outline:n,markerName:r,markerEnabled:s}=e.excalidrawAPI.getAppState().frameRendering,o=new FloatingModal(e.app);o.onOpen=()=>{const{contentEl:l}=o;l.createEl(\"h1\",{text:t$d(\"FRAME_SETTINGS_TITLE\")});const c={enabled:t,clip:a,name:i,outline:n,markerName:r,markerEnabled:s};new obsidian_module.Setting(l).setName(t$d(\"FRAME_SETTINGS_ENABLE\")).addToggle((e=>e.setValue(c.enabled).onChange((e=>{c.enabled=e,hideComponent(d,!e),hideComponent(h,!e),hideComponent(p,!e)}))));const d=new obsidian_module.Setting(l).setName(t$d(\"FRAME_SETTIGNS_NAME\")).addToggle((e=>e.setValue(c.name).onChange((e=>c.name=e)))),h=new obsidian_module.Setting(l).setName(t$d(\"FRAME_SETTINGS_OUTLINE\")).addToggle((e=>e.setValue(c.outline).onChange((e=>c.outline=e)))),p=new obsidian_module.Setting(l).setName(t$d(\"FRAME_SETTINGS_CLIP\")).addToggle((e=>e.setValue(c.clip).onChange((e=>c.clip=e))));hideComponent(d,!c.enabled),hideComponent(h,!c.enabled),hideComponent(p,!c.enabled),new obsidian_module.Setting(l).addButton((t=>t.setButtonText(\"OK\").onClick((()=>{e.updateScene({appState:{frameRendering:c},captureUpdate:CaptureUpdateAction.NEVER}),o.close()}))))},o.open()};function hideComponent(e,t){e.settingEl.style.display=t?\"none\":\"\"}class CommandManager{app;plugin;openDialog;insertLinkDialog;insertCommandDialog;insertImageDialog;importSVGDialog;insertMDDialog;taskbone;forceSaveCommand;get settings(){return this.plugin.settings}get ea(){return this.plugin.ea}isExcalidrawFile(e){return this.plugin.isExcalidrawFile(e)}constructor(e){this.app=e.app,this.plugin=e}initialize(){try{this.taskbone=new Taskbone(this.plugin),this.registerCommands()}catch(e){new obsidian_module.Notice(\"Error registering commands\",6e3),console.error(\"Error registering commands\",e)}this.plugin.logStartupEvent(\"Commands registered\")}destroy(){this.openDialog.destroy(),this.openDialog=null,this.insertLinkDialog.destroy(),this.insertLinkDialog=null,this.insertCommandDialog.destroy(),this.insertCommandDialog=null,this.importSVGDialog.destroy(),this.importSVGDialog=null,this.insertImageDialog.destroy(),this.insertImageDialog=null,this.insertMDDialog.destroy(),this.insertMDDialog=null,this.taskbone&&(this.taskbone.destroy(),this.taskbone=null),this.forceSaveCommand=null}registerEvent(e){this.plugin.registerEvent(e)}addCommand(e){return this.plugin.addCommand(e)}registerCommands(){this.openDialog=new OpenFileDialog(this.app,this.plugin),this.insertLinkDialog=new InsertLinkDialog(this.plugin),this.insertCommandDialog=new InsertCommandDialog(this.app),this.insertImageDialog=new InsertImageDialog(this.plugin),this.importSVGDialog=new ImportSVGDialog(this.plugin),this.insertMDDialog=new InsertMDDialog(this.plugin);const e=(e,t)=>{let a=t.path;t instanceof obsidian_module.TFile&&(a=obsidian_module.normalizePath(t.path.substr(0,t.path.lastIndexOf(t.name)))),this.plugin.createAndOpenDrawing(getDrawingFilename(this.settings),linkClickModifierType(emulateCTRLClickForLinks(e)),a)};this.registerEvent(this.app.workspace.on(\"file-menu\",((t,a)=>{t.addItem((t=>{t.setSection(\"action-primary\").setTitle(t$d(\"CREATE_NEW\")).setIcon(ICON_NAME).onClick((t=>{e(t,a)}))}))}))),this.registerEvent(this.app.workspace.on(\"file-menu\",((e,t)=>{t instanceof obsidian_module.TFile&&\"excalidraw\"==t.extension&&e.addItem((e=>{e.setTitle(t$d(\"CONVERT_FILE_KEEP_EXT\")).onClick((()=>{this.plugin.convertSingleExcalidrawToMD(t,!1,!1)}))}))}))),this.registerEvent(this.app.workspace.on(\"file-menu\",((e,t)=>{t instanceof obsidian_module.TFile&&\"excalidraw\"==t.extension&&e.addItem((e=>{e.setTitle(t$d(\"CONVERT_FILE_REPLACE_EXT\")).onClick((()=>{this.plugin.convertSingleExcalidrawToMD(t,!0,!0)}))}))}))),this.addCommand({id:\"excalidraw-convert-image-from-url-to-local-file\",name:t$d(\"CONVERT_URL_TO_FILE\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(!t)return!1;const a=t.getSingleSelectedImage();return!(!a||!a.embeddedFile?.isHyperLink)&&(!!e||void t.convertImageElWithURLToLocalFile(a))}}),this.addCommand({id:\"excalidraw-unzip-file\",name:t$d(\"UNZIP_CURRENT_FILE\"),checkCallback:e=>{const t=this.app.workspace.getActiveFile();return!!t&&(!!this.isExcalidrawFile(t)&&(!this.app.workspace.getActiveViewOfType(ExcalidrawView)&&(!!e||void(async()=>{const e=(await this.app.vault.read(t)).split(\"\\n## Drawing\\n```compressed-json\\n\");if(2!==e.length)return;const a=e[0]+\"\\n## Drawing\\n```json\\n\",i=e[1].split(\"\\n```\\n%%\");if(2!==i.length)return;const n=decompress(i[0]);n?await createOrOverwriteFile(this.app,t.path,a+n+\"\\n```\\n%%\"+i[1]):new obsidian_module.Notice(\"The compressed string is corrupted. Unable to decompress data.\")})())))}}),this.addCommand({id:\"excalidraw-publish-svg-check\",name:t$d(\"PUBLISH_SVG_CHECK\"),checkCallback:e=>!!this.app.internalPlugins.plugins.publish.instance&&(!!e||void new PublishOutOfDateFilesDialog(this.plugin).open())}),this.addCommand({id:\"excalidraw-embeddable-poroperties\",name:t$d(\"EMBEDDABLE_PROPERTIES\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(!t)return!1;if(!t.excalidrawAPI)return!1;const a=t.getViewSelectedElements().filter((e=>\"embeddable\"===e.type));return 1!==a.length?(e||new obsidian_module.Notice(\"Select a single embeddable element and try again\"),!1):!!e||void new EmbeddableSettings(t.plugin,t,(e=>{const a=REGEX_LINK.getRes(e.link).next();if(!a||!a.value&&a.done)return null;const i=REGEX_LINK.getLink(a),{file:n}=processLinkText(i,t);return n})(a[0]),a[0]).open()}}),this.addCommand({id:\"excalidraw-embeddables-relative-scale\",name:t$d(\"EMBEDDABLE_RELATIVE_ZOOM\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(!t)return!1;if(!t.excalidrawAPI)return!1;const a=t.getViewSelectedElements().filter((e=>\"embeddable\"===e.type));if(0===a.length)return e||new obsidian_module.Notice(\"Select at least one embeddable element and try again\"),!1;if(e)return!0;const i=getEA(t),n=i.getExcalidrawAPI();i.copyViewElementsToEAforEditing(a);const r=1/n.getAppState().zoom.value;i.getElements().forEach((e=>{e.scale=[r,r]})),i.addElementsToView().then((()=>i.destroy()))}}),this.addCommand({id:\"open-image-excalidraw-source\",name:t$d(\"OPEN_IMAGE_SOURCE\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView);if(!t)return!1;if(t.leaf!==this.app.workspace.activeLeaf)return!1;const a=t.editor;if(!a)return!1;const i=a.getCursor(),n=a.getLine(i.line),r=extractSVGPNGFileName(n);if(!r)return!1;const s=this.app.metadataCache.getFirstLinkpathDest(r,t.file.path);if(!s)return!1;const o=getIMGFilename(s.path,\"md\");let l=this.app.metadataCache.getFirstLinkpathDest(o,t.file.path);if(!l&&(o.endsWith(\".dark.md\")&&(l=this.app.metadataCache.getFirstLinkpathDest(o.replace(/\\.dark\\.md$/,\".md\"),t.file.path)),o.endsWith(\".light.md\")&&(l=this.app.metadataCache.getFirstLinkpathDest(o.replace(/\\.light\\.md$/,\".md\"),t.file.path)),!l)){const e=s.basename.replace(/(?:\\.dark|\\.light)$/,\"\"),t=this.app.vault.getMarkdownFiles().filter((t=>t.basename===e));if(1!==t.length)return!1;l=t[0]}if(e)return!0;this.plugin.openDrawing(l,\"new-tab\",!0)}}),this.addCommand({id:\"excalidraw-disable-autosave\",name:t$d(\"TEMPORARY_DISABLE_AUTOSAVE\"),checkCallback:e=>!!this.settings.autosave&&(e||(this.settings.autosave=!1),!0)}),this.addCommand({id:\"excalidraw-enable-autosave\",name:t$d(\"TEMPORARY_ENABLE_AUTOSAVE\"),checkCallback:e=>!this.settings.autosave&&(e||(this.settings.autosave=!0),!0)}),this.addCommand({id:\"excalidraw-download-lib\",name:t$d(\"DOWNLOAD_LIBRARY\"),callback:()=>this.plugin.exportLibrary()}),this.addCommand({id:\"excalidraw-open\",name:t$d(\"OPEN_EXISTING_NEW_PANE\"),callback:()=>{this.openDialog.start(openDialogAction.openFile,!0)}}),this.addCommand({id:\"excalidraw-open-on-current\",name:t$d(\"OPEN_EXISTING_ACTIVE_PANE\"),callback:()=>{this.openDialog.start(openDialogAction.openFile,!1)}}),this.addCommand({id:\"excalidraw-insert-transclusion\",name:t$d(\"TRANSCLUDE\"),checkCallback:e=>e?Boolean(this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView)):(this.openDialog.start(openDialogAction.insertLinkToDrawing,!1),!0)}),this.addCommand({id:\"excalidraw-insert-last-active-transclusion\",name:t$d(\"TRANSCLUDE_MOST_RECENT\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView))&&null!==this.plugin.lastActiveExcalidrawFilePath;const t=this.app.vault.getAbstractFileByPath(this.plugin.lastActiveExcalidrawFilePath);return t instanceof obsidian_module.TFile&&(this.plugin.embedDrawing(t),!0)}}),this.addCommand({id:\"excalidraw-autocreate\",name:t$d(\"NEW_IN_NEW_PANE\"),callback:()=>{this.plugin.createAndOpenDrawing(getDrawingFilename(this.settings),\"new-pane\")}}),this.addCommand({id:\"excalidraw-autocreate-newtab\",name:t$d(\"NEW_IN_NEW_TAB\"),callback:()=>{this.plugin.createAndOpenDrawing(getDrawingFilename(this.settings),\"new-tab\")}}),this.addCommand({id:\"excalidraw-autocreate-on-current\",name:t$d(\"NEW_IN_ACTIVE_PANE\"),callback:()=>{this.plugin.createAndOpenDrawing(getDrawingFilename(this.settings),\"active-pane\")}}),this.addCommand({id:\"excalidraw-autocreate-popout\",name:t$d(\"NEW_IN_POPOUT_WINDOW\"),checkCallback:e=>{if(e)return!DEVICE.isMobile;this.plugin.createAndOpenDrawing(getDrawingFilename(this.settings),\"popout-window\")}});const t=async e=>{const t=this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView);if(!t)return;const a=getEmbedFilename(t.file.basename,this.settings),i=this.settings.embedUseExcalidrawFolder?null:(await getAttachmentsFolderAndFilePath(this.app,t.file.path,a)).folder,n=await this.plugin.createDrawing(a,i);await this.plugin.embedDrawing(n),this.plugin.openDrawing(n,e,!0,void 0,!0)};this.addCommand({id:\"excalidraw-autocreate-and-embed\",name:t$d(\"NEW_IN_NEW_PANE_EMBED\"),checkCallback:e=>e?Boolean(this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView)):(t(\"new-pane\"),!0)}),this.addCommand({id:\"excalidraw-autocreate-and-embed-new-tab\",name:t$d(\"NEW_IN_NEW_TAB_EMBED\"),checkCallback:e=>e?Boolean(this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView)):(t(\"new-tab\"),!0)}),this.addCommand({id:\"excalidraw-autocreate-and-embed-on-current\",name:t$d(\"NEW_IN_ACTIVE_PANE_EMBED\"),checkCallback:e=>e?Boolean(this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView)):(t(\"active-pane\"),!0)}),this.addCommand({id:\"excalidraw-autocreate-and-embed-popout\",name:t$d(\"NEW_IN_POPOUT_WINDOW_EMBED\"),checkCallback:e=>e?!DEVICE.isMobile&&Boolean(this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView)):(t(\"popout-window\"),!0)}),this.addCommand({id:\"run-ocr\",name:t$d(\"RUN_OCR\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return e?Boolean(t):!!t&&(this.settings.taskboneEnabled?(this.taskbone.getTextForView(t,{forceReScan:!1}),!0):(new obsidian_module.Notice(\"Taskbone OCR is not enabled. Please go to plugins settings to enable it.\",4e3),!0))}}),this.addCommand({id:\"rerun-ocr\",name:t$d(\"RERUN_OCR\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return e?Boolean(t):!!t&&(this.settings.taskboneEnabled?(this.taskbone.getTextForView(t,{forceReScan:!0}),!0):(new obsidian_module.Notice(\"Taskbone OCR is not enabled. Please go to plugins settings to enable it.\",4e3),!0))}}),this.addCommand({id:\"run-ocr-selectedelements\",name:t$d(\"RUN_OCR_ELEMENTS\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return e?Boolean(t):!!t&&(this.settings.taskboneEnabled?(this.taskbone.getTextForView(t,{forceReScan:!1,selectedElementsOnly:!0,addToFrontmatter:!1}),!0):(new obsidian_module.Notice(\"Taskbone OCR is not enabled. Please go to plugins settings to enable it.\",4e3),!0))}}),this.addCommand({id:\"search-text\",name:t$d(\"SEARCH\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(search(t),!0)}}),this.addCommand({id:\"fullscreen\",name:t$d(\"TOGGLE_FULLSCREEN\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.isFullscreen()?t.exitFullscreen():t.gotoFullscreen(),!0)}}),this.addCommand({id:\"disable-binding\",name:t$d(\"TOGGLE_DISABLEBINDING\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.toggleDisableBinding(),!0)}}),this.addCommand({id:\"disable-framerendering\",name:t$d(\"TOGGLE_FRAME_RENDERING\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.toggleFrameRendering(),!0)}}),this.addCommand({id:\"frame-settings\",name:t$d(\"FRAME_SETTINGS_TITLE\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(showFrameSettings(t),!0)}}),this.addCommand({id:\"copy-link-to-drawing\",name:t$d(\"COPY_DRAWING_LINK\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(navigator.clipboard.writeText(`![[${t.file.path}]]`),!0)}}),this.addCommand({id:\"disable-frameclipping\",name:t$d(\"TOGGLE_FRAME_CLIPPING\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.toggleFrameClipping(),!0)}}),this.addCommand({id:\"export-image\",name:t$d(\"EXPORT_IMAGE\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.exportDialog||(t.exportDialog=new ExportDialog(this.plugin,t,t.file)),t.exportDialog.open(),!0)}}),this.forceSaveCommand=this.addCommand({id:\"save\",hotkeys:[{modifiers:[\"Ctrl\"],key:\"s\"}],name:t$d(\"FORCE_SAVE\"),checkCallback:e=>this.plugin.forceSaveActiveView(e)}),this.addCommand({id:\"toggle-lock\",name:t$d(\"TOGGLE_LOCK\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return e?!!t&&!t.compatibilityMode&&t.textMode===TextMode.raw:!(!t||t.compatibilityMode||(t.changeTextMode(t.textMode===TextMode.parsed?TextMode.raw:TextMode.parsed),0))}}),this.addCommand({id:\"scriptengine-store\",name:t$d(\"INSTALL_SCRIPT_BUTTON\"),checkCallback:e=>e?Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView)):(new ScriptInstallPrompt(this.plugin).open(),!0)}),this.addCommand({id:\"delete-file\",name:t$d(\"DELETE_FILE\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(t){this.ea.reset(),this.ea.setView(t);const e=this.ea.getViewSelectedElement();if(\"image\"!==e.type)return new obsidian_module.Notice(\"Please select an image or embedded markdown document\",4e3),!0;const a=this.ea.getViewFileForImageElement(e);return a?(this.app.vault.delete(a),this.ea.deleteViewElements([e]),!0):(new obsidian_module.Notice(\"Please select an image or embedded markdown document\",4e3),!0)}return!1}}),this.addCommand({id:\"convert-text2MD\",name:t$d(\"CONVERT_TO_MARKDOWN\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(!t)return!1;const a=t.getViewSelectedElements().filter((e=>\"text\"===e.type));if(1!==a.length)return!1;const i=a[0],n=t.getViewElements().find((e=>e.id===i.containerId));return(!n||\"arrow\"!==n.type)&&(!!e||void t.convertTextElementToMarkdown(i,n))}}),this.addCommand({id:\"insert-link\",hotkeys:[{modifiers:[\"Mod\",\"Shift\"],key:\"k\"}],name:t$d(\"INSERT_LINK\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(this.insertLinkDialog.start(t.file.path,((e,a,i)=>t.addLink(e,a,i))),!0)}}),this.addCommand({id:\"insert-command\",name:t$d(\"INSERT_COMMAND\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(this.insertCommandDialog.start(((e,a,i)=>t.addText(e,a,i))),!0)}}),this.addCommand({id:\"insert-link-to-element\",name:t$d(\"INSERT_LINK_TO_ELEMENT_NORMAL\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.copyLinkToSelectedElementToClipboard(\"\"),!0)}}),this.addCommand({id:\"insert-link-to-element-group\",name:t$d(\"INSERT_LINK_TO_ELEMENT_GROUP\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.copyLinkToSelectedElementToClipboard(\"group=\"),!0)}}),this.addCommand({id:\"insert-link-to-element-frame\",name:t$d(\"INSERT_LINK_TO_ELEMENT_FRAME\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.copyLinkToSelectedElementToClipboard(\"frame=\"),!0)}}),this.addCommand({id:\"insert-link-to-element-frame-clipped\",name:t$d(\"INSERT_LINK_TO_ELEMENT_FRAME_CLIPPED\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.copyLinkToSelectedElementToClipboard(\"clippedframe=\"),!0)}}),this.addCommand({id:\"insert-link-to-element-area\",name:t$d(\"INSERT_LINK_TO_ELEMENT_AREA\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.copyLinkToSelectedElementToClipboard(\"area=\"),!0)}}),this.addCommand({id:\"toggle-lefthanded-mode\",name:t$d(\"TOGGLE_LEFTHANDED_MODE\"),checkCallback:e=>{if(e){if(this.app.workspace.getActiveViewOfType(ExcalidrawView)){const e=this.app.workspace.getActiveViewOfType(ExcalidrawView),t=e?.excalidrawAPI;return!!t&&!!t.getAppState().trayModeEnabled}return!1}return this.app.workspace.getActiveViewOfType(ExcalidrawView),(async()=>{const e=this.settings.isLeftHanded;await this.plugin.loadSettings({applyLefthandedMode:!1}),this.settings.isLeftHanded=!e,this.plugin.saveSettings(),setLeftHandedMode(!e),setTimeout((()=>setLeftHandedMode(!e)))})(),!0}}),this.addCommand({id:\"flip-image\",name:t$d(\"FLIP_IMAGE\"),checkCallback:e=>{if(!DEVICE.isDesktop)return;const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(!t)return!1;if(!t.excalidrawAPI)return!1;const a=t.getViewSelectedElements().filter((e=>{if(\"image\"===e.type){const a=t.excalidrawData.getFile(e.fileId);return!!a&&this.isExcalidrawFile(a.file)}return!1}));if(1!==a.length)return!1;if(e)return!0;const i=a[0];let n=t.excalidrawData.getFile(i.fileId);this.plugin.forceToOpenInMarkdownFilepath=n.file?.path;const r=t.excalidrawAPI.getAppState(),{x:s,y:o}=sceneCoordsToViewportCoords({sceneX:i.x+i.width/2,sceneY:i.y+i.height/2},r),{width:l,height:c}={width:600,height:600},{x:d,y:h}={x:Math.max(0,s-l/2+t.ownerWindow.screenX),y:Math.max(0,o-c/2+t.ownerWindow.screenY)},p=this.settings.focusOnFileTab;DEVICE.isDesktop&&(this.settings.focusOnFileTab=!1),this.plugin.openDrawing(n.file,DEVICE.isMobile?\"new-tab\":\"popout-window\",!0,void 0,!1,{x:d,y:h,width:l,height:c}),this.settings.focusOnFileTab=p}}),this.addCommand({id:\"duplicate-image\",name:t$d(\"DUPLICATE_IMAGE\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(!t)return!1;if(!t.excalidrawAPI)return!1;const a=t.getViewSelectedElements().filter((e=>\"image\"===e.type));if(1!==a.length)return e||new obsidian_module.Notice(\"Select a single image element and try again\"),!1;const i=a[0],n=t.excalidrawData.getFile(i.fileId);return!!n?.file&&(!!e||void(async()=>{const e=getEA(t),a=Boolean(i.customData?.isAnchored),r=await e.addImage(i.x+i.width/5,i.y+i.height/5,n.file,!a,a),s=e.getElement(r);s.width=i.width,s.height=i.height,i.crop&&(s.crop={...i.crop});const o=fileid();e.imagesDict[o]=e.imagesDict[s.fileId],e.imagesDict[o].id=o,delete e.imagesDict[s.fileId],s.fileId=o,await e.addElementsToView(!1,!1,!0),e.selectElementsInView([r]),e.destroy()})())}}),this.addCommand({id:\"reset-image-to-100\",name:t$d(\"RESET_IMG_TO_100\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(!t)return!1;if(!t.excalidrawAPI)return!1;const a=t.getViewSelectedElements().filter((e=>\"image\"===e.type));return 1!==a.length?(e||new obsidian_module.Notice(\"Select a single image element and try again\"),!1):!!e||void(async()=>{const e=a[0];if(!t.excalidrawData.getFile(e.fileId))return await t.forceSave(),t.excalidrawData.getFile(e.fileId),new obsidian_module.Notice(\"Select a single image element and try again\"),!1;const i=new ExcalidrawAutomate(this.plugin,t),n=await i.getOriginalImageSize(e);if(n){i.copyViewElementsToEAforEditing(a);const t=i.getElement(e.id);t.crop?(t.width=t.crop.width,t.height=t.crop.height):(t.width=n.width,t.height=n.height),await i.addElementsToView(!1,!1,!1)}i.destroy()})()}}),this.addCommand({id:\"reset-image-ar\",name:t$d(\"RESET_IMG_ASPECT_RATIO\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(!t)return!1;if(!t.excalidrawAPI)return!1;const a=t.getViewSelectedElements().filter((e=>\"image\"===e.type));return 1!==a.length?(e||new obsidian_module.Notice(\"Select a single image element and try again\"),!1):!!e||void(async()=>{const e=a[0];if(!t.excalidrawData.getFile(e.fileId))return await t.forceSave(),t.excalidrawData.getFile(e.fileId),new obsidian_module.Notice(\"Select a single image element and try again\"),!1;const i=new ExcalidrawAutomate(this.plugin,t);await i.resetImageAspectRatio(e)&&await i.addElementsToView(!1,!1,!1),i.destroy()})()}}),this.addCommand({id:\"open-link-props\",name:t$d(\"OPEN_LINK_PROPS\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(!t)return!1;if(!t.excalidrawAPI)return!1;const a=t.getViewSelectedElements().filter((e=>\"image\"===e.type));if(1!==a.length)return e||new obsidian_module.Notice(\"Select a single image element and try again\"),!1;if(e)return!0;const i=a[0];let n=t.excalidrawData.getFile(i.fileId),r=t.excalidrawData.getEquation(i.fileId);if(!n&&!r)return t.forceSave(),new obsidian_module.Notice(\"Please try again.\"),!1;n&&t.openEmbeddedLinkEditor(i.id),r&&t.openLaTeXEditor(i.id)}}),this.addCommand({id:\"convert-card-to-file\",name:t$d(\"CONVERT_CARD_TO_FILE\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(!t)return!1;if(!t.excalidrawAPI)return!1;const a=t.getViewSelectedElements().filter((e=>\"embeddable\"===e.type));if(1!==a.length)return e||new obsidian_module.Notice(\"Select a single back-of-the-note card and try again\"),!1;const i=t.getEmbeddableLeafElementById(a[0].id),n=i?.node?.child;return n&&n.file===t.file?!!e||void t.moveBackOfTheNoteCardToFile():(e||new obsidian_module.Notice(\"The selected embeddable is not a back-of-the-note card.\"),!1)}}),this.addCommand({id:\"insert-active-pdfpage\",name:t$d(\"INSERT_ACTIVE_PDF_PAGE_AS_IMAGE\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(!t)return!1;const a=t.getViewSelectedElements().filter((e=>\"embeddable\"===e.type));if(1!==a.length)return e||new obsidian_module.Notice(\"Select a single PDF embeddable and try again\"),!1;if(\"pdf\"!==t.getEmbeddableLeafElementById(a[0].id)?.leaf?.view?.getViewType())return!1;const i=getActivePDFPageNumberFromPDFView(t.getEmbeddableLeafElementById(a[0].id)?.leaf?.view);if(!i)return!1;if(e)return!0;const n=a[0],r=new ExcalidrawAutomate(this.plugin,t),s=t.getEmbeddableLeafElementById(n.id)?.leaf?.view,o=s&&s instanceof obsidian_module.FileView?s.file:void 0;(async()=>{const e=await r.addImage(n.x+n.width+10,n.y,`${o?.path}#page=${i}`,!1,!1),t=r.getElement(e),a=t.width/t.height;a>1?(t.width=n.width,t.height=n.width/a):(t.height=n.height,t.width=n.height*a),r.addElementsToView(!1,!0,!0)})()}}),this.addCommand({id:\"crop-image\",name:t$d(\"CROP_IMAGE\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView),a=this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView),i=this.app.workspace.activeLeaf?.view,n=i&&\"canvas\"===i.getViewType();if(!t&&!a&&!n)return!1;if(t){if(!t.excalidrawAPI)return!1;const a=t.getViewSelectedElements().filter((e=>\"embeddable\"===e.type)),i=t.getViewSelectedElements().filter((e=>\"image\"===e.type)),n=0===i.length&&1===a.length&&\"pdf\"===t.getEmbeddableLeafElementById(a[0].id)?.node?.child?.file?.extension,r=1===i.length&&0===a.length;if(!n&&!r)return e||new obsidian_module.Notice(\"Select a single image element or single PDF embeddable and try again\"),!1;const s=n?getActivePDFPageNumberFromPDFView(t.getEmbeddableLeafElementById(a[0].id)?.node?.child):void 0;if(n&&!s)return!1;if(e)return!0;if(n){const e=a[0],i=new ExcalidrawAutomate(this.plugin,t),n=t.getEmbeddableLeafElementById(e.id)?.node?.child,r=n?.file;return void carveOutPDF(i,e,`${r?.path}#page=${s}`,r)}const o=i[0];(async()=>{let e=t.excalidrawData.getFile(o.fileId);if(!e&&(await t.save(),await sleep$1(500),e=t.excalidrawData.getFile(o.fileId),!e))return new obsidian_module.Notice(\"Select a single image element and try again\"),!1;const a=new ExcalidrawAutomate(this.plugin,t);carveOutImage(a,o)})()}const r=async(e,t,a,i,n,r)=>{const s=getEA(),o=await s.addImage(0,0,e?e&&\"pdf\"===a.extension&&r?`${a.path}#${r}`:a:i,!1,!1);if(!o)return void new obsidian_module.Notice(`Can't load image\\n\\n${i}`);let l=\"\",c=\"\";if(e)l=a.basename,c=r?`[[${a.path}#${r}]]`:`[[${a.path}]]`;else{c=i;const e=i.match(/^.*\\/([^?]*)\\??.*$/)?.[1];l=e.substring(0,e.lastIndexOf(\".\"))}const{folderpath:d,filename:h}=await getCropFileNameAndFolder(this.plugin,t.path,l),p=await createImageCropperFile(s,o,c,d,h);s.destroy(),p&&n(this.app.metadataCache.fileToLinktext(p,t.path,!0),p)};if(n){const t=[];if(i.canvas.nodes.forEach((e=>{e.nodeEl.hasClass(\"is-focused\")&&t.push(e)})),1!==t.length)return!1;const a=t[0];let n=\"\",s=!1;a.file&&(n=a.file.extension,s=this.isExcalidrawFile(a.file)),a.url&&(n=getURLImageExtension(a.url));const o=\"pdf\"===n?getActivePDFPageNumberFromPDFView(a?.child):void 0;if(!o&&!IMAGE_TYPES.contains(n)&&!s)return!1;if(e)return!0;const l=(e,t)=>{a.file&&(\"pdf\"===a.file.extension?a.canvas.createFileNode({pos:{x:a.x+a.width+10,y:a.y},file:t}):a.setFile(t)),a.url&&a.canvas.createFileNode({pos:{x:a.x+20,y:a.y+20},file:t})};r(Boolean(a.file),i.file,a.file,a.url,l,o?`page=${o}`:void 0)}if(a){const t=a.editor,i=t.getCursor(),n=t.getLine(i.line),s=REGEX_LINK.getResList(n);if(0===s.length)return!1;let o=REGEX_LINK.getLink(s[0]);const l=REGEX_LINK.isWikiLink(s[0]);let c=REGEX_LINK.getAliasOrLink(s[0]);c===o&&(c=null),o=decodeURI(o);const d=o.split(\"#\"),h=2===d.length,p=this.app.metadataCache.getFirstLinkpathDest(h?d[0]:o,a.file.path),u=p&&p instanceof obsidian_module.TFile,m=!!u&&this.isExcalidrawFile(p);let g=u?p.path:\"\",f=u?p.extension:\"\";if(o.match(/^https?|file/)&&(g=o,f=getURLImageExtension(o)),\"\"===g)return!1;if(\"pdf\"!==f&&!IMAGE_TYPES.contains(f)&&!m)return!1;if(e)return!0;const b=d[1],U=e=>{const a=n.split(s[0].value[0]),r=u&&b?\"\\n\"+getLink(this.plugin,{embed:!1,alias:c??`${p.basename}, ${b.replace(\"=\",\" \")}`,path:`${p.path}#${b}`},l):\"\";t.setLine(i.line,a[0]+getLink(this.plugin,{embed:!0,path:e,alias:c},l)+r+a[1])};r(u,a.file,p,g,U,b)}}}),this.addCommand({id:\"annotate-image\",name:t$d(\"ANNOTATE_IMAGE\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView),a=this.app.workspace.activeLeaf?.view,i=a&&\"canvas\"===a.getViewType();if(!t&&!i)return!1;const n=async(e,t,a,i,n,r)=>{const s=getEA(),o=await s.addImage(0,0,e?e&&\"pdf\"===a.extension&&r?`${a.path}#${r}`:a:i,!1,!1);if(!o)return new obsidian_module.Notice(`Can't load image\\n\\n${i}`),void s.destroy();const l=s.getElement(o);l.locked=!0;const c=this.settings.annotatePreserveSize?await getImageSize(s.imagesDict[l.fileId].dataURL):null;let d,h=\"\";if(e)h=a.basename,a.path;else{const e=i.match(/^.*\\/([^?]*)\\??.*$/)?.[1];h=e.substring(0,e.lastIndexOf(\".\"))}const p=getListOfTemplateFiles(this.plugin);p&&(d=await templatePromt(p,this.app));const{folderpath:u,filename:m}=await getAnnotationFileNameAndFolder(this.plugin,t.path,h),g=await s.create({templatePath:d?.path,filename:m,foldername:u,onNewPane:!0,frontmatterKeys:{...this.settings.matchTheme?{\"excalidraw-export-dark\":isObsidianThemeDark()}:{},...\"pdf\"===a.extension?{cssclasses:\"excalidraw-cropped-pdfpage\"}:{}}});s.destroy();let f=this.app.vault.getAbstractFileByPath(g),b=0;for(;(!f||!this.isExcalidrawFile(f))&&b<50;)await sleep$1(100),f=this.app.vault.getAbstractFileByPath(g),b++;f&&f instanceof obsidian_module.TFile?f&&n(this.app.metadataCache.fileToLinktext(f,t.path,!0),f,c?`${c.width}`:null):new obsidian_module.Notice(\"File not found. NewExcalidraw Drawing is taking too long to create. Please try again.\")};if(i){const t=[];if(a.canvas.nodes.forEach((e=>{e.nodeEl.hasClass(\"is-focused\")&&t.push(e)})),1!==t.length)return!1;const i=t[0];let r=\"\",s=!1;i.file&&(r=i.file.extension,s=this.isExcalidrawFile(i.file)),i.url&&(r=getURLImageExtension(i.url));const o=\"pdf\"===r?getActivePDFPageNumberFromPDFView(i?.child):void 0;if(!o&&!IMAGE_TYPES.contains(r)&&!s)return!1;if(e)return!0;const l=(e,t)=>{i.file&&(\"pdf\"===i.file.extension?i.canvas.createFileNode({pos:{x:i.x+i.width+10,y:i.y},file:t}):i.setFile(t)),i.url&&i.canvas.createFileNode({pos:{x:i.x+20,y:i.y+20},file:t})};n(Boolean(i.file),a.file,i.file,i.url,l,o?`page=${o}`:void 0)}if(t){const a=t.editor,i=a.getCursor(),r=a.getLine(i.line),s=REGEX_LINK.getResList(r);if(0===s.length)return!1;let o=REGEX_LINK.getLink(s[0]);const l=REGEX_LINK.isWikiLink(s[0]);let c=REGEX_LINK.getAliasOrLink(s[0]);c===o&&(c=null),o=decodeURI(o);const d=o.split(\"#\"),h=2===d.length,p=this.app.metadataCache.getFirstLinkpathDest(h?d[0]:o,t.file.path),u=p&&p instanceof obsidian_module.TFile,m=!!u&&this.isExcalidrawFile(p);let g=u?p.path:\"\",f=u?p.extension:\"\";if(o.match(/^https?|file/)&&(g=o,f=getURLImageExtension(o)),\"\"===g)return!1;if(\"pdf\"!==f&&!IMAGE_TYPES.contains(f)&&!m)return!1;if(e)return!0;const b=d[1],U=(e,t,n)=>{const o=r.split(s[0].value[0]),d=u&&b?\"\\n\"+getLink(this.plugin,{embed:!1,alias:getAliasWithSize(c??`${p.basename}, ${b.replace(\"=\",\" \")}`,n),path:`${p.path}#${b}`},l):\"\";a.setLine(i.line,o[0]+getLink(this.plugin,{embed:!0,path:e,alias:getAliasWithSize(c,n)},l)+d+o[1])};n(u,t.file,p,g,U,b)}}}),this.addCommand({id:\"insert-image\",name:t$d(\"INSERT_IMAGE\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(this.insertImageDialog.start(t),!0)}}),this.addCommand({id:\"import-svg\",name:t$d(\"IMPORT_SVG\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(this.importSVGDialog.start(t),!0)}}),this.addCommand({id:\"release-notes\",name:t$d(\"READ_RELEASE_NOTES\"),checkCallback:e=>e?Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView)):(new ReleaseNotes(this.app,this.plugin,PLUGIN_VERSION).open(),!0)}),this.addCommand({id:\"tray-mode\",name:t$d(\"TRAY_MODE\"),checkCallback:e=>{if(e){const e=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(!e||!e.excalidrawAPI)return!1;const t=e.excalidrawAPI.getAppState();return!t.zenModeEnabled&&!t.viewModeEnabled}const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!(!t||!t.excalidrawAPI||(t.toggleTrayMode(),0))}}),this.addCommand({id:\"insert-md\",name:t$d(\"INSERT_MD\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(this.insertMDDialog.start(t),!0)}}),this.addCommand({id:\"insert-pdf\",name:t$d(\"INSERT_PDF\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(new InsertPDFModal(this.plugin,t).open(),!0)}}),this.addCommand({id:\"insert-pdf\",name:t$d(\"INSERT_LAST_ACTIVE_PDF_PAGE_AS_IMAGE\"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(!Boolean(t))return!1;const a=this.plugin.getLastActivePDFPageLink(t.file);return!!a&&(!!e||void(async()=>{const e=getEA(t),i=await insertImageToView(e,t.currentPosition,a,void 0,void 0,!0);e.selectElementsInView([i]),e.destroy()})())}}),this.addCommand({id:\"universal-add-file\",name:t$d(\"UNIVERSAL_ADD_FILE\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(new UniversalInsertFileModal(this.plugin,t).open(),!0)}}),this.addCommand({id:\"universal-card\",name:t$d(\"INSERT_CARD\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.insertBackOfTheNoteCard(),!0)}}),this.addCommand({id:\"insert-LaTeX-symbol\",name:t$d(\"INSERT_LATEX\"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(insertLaTeXToView(t),!0)}}),this.addCommand({id:\"toggle-excalidraw-view\",name:t$d(\"TOGGLE_MODE\"),checkCallback:e=>{const t=this.app.workspace.getActiveFile();if(!t)return!1;const a=this.isExcalidrawFile(t);if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView))?!this.app.workspace.getActiveViewOfType(ExcalidrawView).compatibilityMode:a;const i=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(i)return void i.openAsMarkdown();const n=this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView);n&&a&&(async()=>{await n.save();const e=n.leaf;this.plugin.excalidrawFileModes[e.id||t.path]=VIEW_TYPE_EXCALIDRAW,setExcalidrawView(e)})()}}),this.addCommand({id:\"convert-to-excalidraw\",name:t$d(\"CONVERT_NOTE_TO_EXCALIDRAW\"),checkCallback:e=>{const t=this.app.workspace.getActiveFile(),a=this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView);return!(!t||!a)&&!this.isExcalidrawFile(t)&&(!!e||void(async()=>{await a.save();const e=mergeMarkdownFiles(await this.plugin.getBlankDrawing(),await this.app.vault.read(t));await createOrOverwriteFile(this.app,t.path,e),setExcalidrawView(a.leaf)})())}}),this.addCommand({id:\"convert-excalidraw\",name:t$d(\"CONVERT_EXCALIDRAW\"),checkCallback:e=>{if(e){const e=this.app.vault.getFiles().filter((e=>\"excalidraw\"==e.extension));return e.length>0}return this.plugin.convertExcalidrawToMD(),!0}})}}class EventManager{plugin;app;leafChangeTimeout=null;removeEventLisnters=[];previouslyActiveLeaf;splitViewLeafSwitchTimestamp=0;debunceActiveLeafChangeHandlerTimer=null;get settings(){return this.plugin.settings}get ea(){return this.plugin.ea}get activeExcalidrawView(){return this.plugin.activeExcalidrawView}set activeExcalidrawView(e){this.plugin.activeExcalidrawView=e}registerEvent(e){this.plugin.registerEvent(e)}constructor(e){this.plugin=e,this.app=e.app}destroy(){this.leafChangeTimeout&&(window.clearTimeout(this.leafChangeTimeout),this.leafChangeTimeout=null),this.removeEventLisnters.forEach((e=>e())),this.removeEventLisnters=[]}async initialize(){try{await this.registerEvents()}catch(e){console.error(\"Error registering event listeners\",e)}this.plugin.logStartupEvent(\"Event listeners registered\")}isRecentSplitViewSwitch(){return Date.now()-this.splitViewLeafSwitchTimestamp<3e3}async registerEvents(){await this.plugin.awaitInit(),this.registerEvent(this.app.workspace.on(\"editor-paste\",this.onPasteHandler.bind(this))),this.registerEvent(this.app.vault.on(\"rename\",this.onRenameHandler.bind(this))),this.registerEvent(this.app.vault.on(\"modify\",this.onModifyHandler.bind(this))),this.registerEvent(this.app.vault.on(\"delete\",this.onDeleteHandler.bind(this))),this.registerEvent(this.plugin.app.workspace.on(\"active-leaf-change\",this.onActiveLeafChangeHandler.bind(this))),this.registerEvent(this.app.workspace.on(\"layout-change\",this.onLayoutChangeHandler.bind(this)));const e=this.onClickSaveActiveDrawing.bind(this);this.app.workspace.containerEl.addEventListener(\"click\",e),this.removeEventLisnters.push((()=>{this.app.workspace.containerEl.removeEventListener(\"click\",e)})),this.registerEvent(this.app.workspace.on(\"file-menu\",this.onFileMenuSaveActiveDrawing.bind(this)));const t=this.app.metadataCache;this.registerEvent(t.on(\"changed\",((e,t,a)=>this.plugin.updateFileCache(e,a?.frontmatter)))),this.registerEvent(this.app.workspace.on(\"file-menu\",this.onFileMenuHandler.bind(this))),this.plugin.registerEvent(this.plugin.app.workspace.on(\"editor-menu\",this.onEditorMenuHandler.bind(this)))}setDebounceActiveLeafChangeHandler(){this.debunceActiveLeafChangeHandlerTimer&&window.clearTimeout(this.debunceActiveLeafChangeHandlerTimer),this.debunceActiveLeafChangeHandlerTimer=window.setTimeout((()=>{this.debunceActiveLeafChangeHandlerTimer=null}),50)}onLayoutChangeHandler(){getExcalidrawViews(this.app).forEach((e=>e.refresh()))}onPasteHandler(e,t,a){if(e.defaultPrevented)return;const i=e.clipboardData.getData(\"text/plain\");if(i&&i.startsWith('{\"type\":\"excalidraw/clipboard\"')){e.preventDefault();try{const e=JSON.parse(i),n=1===e.elements.filter((e=>\"text\"===e.type)).length;if(!n&&1!==e.elements?.length)return;const r=n?e.elements.filter((e=>\"text\"===e.type))[0]:e.elements[0];if(\"image\"===r.type){const e=this.plugin.filesMaster.get(r.fileId);if(e&&e.path){let i=e.path;const n=a.file,r=this.app.vault.getAbstractFileByPath(i);n&&r&&r instanceof obsidian_module.TFile&&(i=this.app.metadataCache.fileToLinktext(r,n.path)),editorInsertText(t,getLink(this.plugin,{path:i}))}return}if(\"text\"===r.type)return void editorInsertText(t,r.rawText);if(r.link)return void editorInsertText(t,`${r.link}`)}catch(e){}}}onRenameHandler(e,t){this.plugin.renameEventHandler(e,t)}onModifyHandler(e){this.plugin.modifyEventHandler(e)}onDeleteHandler(e){this.plugin.deleteEventHandler(e)}async onActiveLeafChangeHandler(e){if(this.debunceActiveLeafChangeHandlerTimer)return;if(this.app.workspace.activeLeaf===e&&isUnwantedLeaf(e))return void e.detach();e.view&&\"pdf\"===e.view.getViewType()&&(this.plugin.lastPDFLeafID=e.id),this.leafChangeTimeout&&window.clearTimeout(this.leafChangeTimeout),this.leafChangeTimeout=window.setTimeout((()=>{this.leafChangeTimeout=null}),1e3),this.settings.overrideObsidianFontSize&&e.view&&e.view.getViewType()===VIEW_TYPE_EXCALIDRAW&&(document.documentElement.style.fontSize=\"\");const t=this.activeExcalidrawView,a=e.view instanceof ExcalidrawView?e.view:null;this.activeExcalidrawView=a;const i=this.previouslyActiveLeaf?.view?.file,n=(e?.view).file;if(n&&i===n&&this.previouslyActiveLeaf.view instanceof obsidian_module.MarkdownView&&e.view instanceof ExcalidrawView&&(this.splitViewLeafSwitchTimestamp=Date.now()),this.previouslyActiveLeaf=e,a?(this.plugin.addModalContainerObserver(),this.plugin.lastActiveExcalidrawFilePath=a.file?.path):this.plugin.removeModalContainerObserver(),DEVICE.isMobile&&a&&!t){const e=document.querySelector(\"body>.app-container>.mobile-navbar\");e&&e instanceof HTMLDivElement&&(e.style.position=\"relative\")}if(DEVICE.isMobile&&!a&&t){const e=document.querySelector(\"body>.app-container>.mobile-navbar\");e&&e instanceof HTMLDivElement&&(e.style.position=\"\")}if(t&&t!==a&&(t.leaf!==e&&t?.isDirty()&&!t.semaphores?.viewunload&&await t.save(!0),t.file&&this.plugin.triggerEmbedUpdates(t.file.path)),a&&(!t||t.leaf!==e)){const e=a.file;a.file&&setTimeout((()=>{a&&a._loaded&&a.file?.path===e?.path&&(a.activeLoader||a.loadSceneFiles())}),2e3)}a&&a._loaded&&a.isLoaded&&a.excalidrawAPI&&this.ea.onCanvasColorChangeHook&&this.ea.onCanvasColorChangeHook(this.ea,a,a.excalidrawAPI.getAppState().viewBackgroundColor),this.plugin.popScope&&(this.plugin.popScope(),this.plugin.popScope=null),a&&this.plugin.registerHotkeyOverrides()}onClickSaveActiveDrawing(e){this.activeExcalidrawView&&this.activeExcalidrawView?.isDirty()&&(!e.target||\"excalidraw__canvas\"!==e.target.className&&!getParentOfClass(e.target,\"excalidraw-wrapper\"))&&this.activeExcalidrawView.save()}onFileMenuSaveActiveDrawing(){this.activeExcalidrawView&&this.activeExcalidrawView?.isDirty()&&this.activeExcalidrawView.save()}onFileMenuHandler(e,t,a,i){if(!i)return;const n=i.view;if(!(n&&n instanceof obsidian_module.MarkdownView))return;if(!(t instanceof obsidian_module.TFile))return;const r=this.app.metadataCache.getFileCache(t);r?.frontmatter&&r.frontmatter[FRONTMATTER_KEYS.plugin.name]&&(e.addItem((e=>{e.setTitle(t$d(\"OPEN_AS_EXCALIDRAW\")).setIcon(ICON_NAME).setSection(\"pane\").onClick((async()=>{await n.save(),this.plugin.excalidrawFileModes[i.id||t.path]=VIEW_TYPE_EXCALIDRAW,setExcalidrawView(i)}))})),e.items.unshift(e.items.pop()))}onEditorMenuHandler(e,t,a){if(!(a&&a instanceof obsidian_module.MarkdownView))return;const i=a.file,n=a.leaf;if(!a.file)return;const r=this.app.metadataCache.getFileCache(i);r?.frontmatter&&r.frontmatter[FRONTMATTER_KEYS.plugin.name]&&e.addItem((e=>e.setTitle(t$d(\"OPEN_AS_EXCALIDRAW\")).setIcon(ICON_NAME).setSection(\"excalidraw\").onClick((async()=>{await a.save(),this.plugin.excalidrawFileModes[n.id||i.path]=VIEW_TYPE_EXCALIDRAW,setExcalidrawView(n)}))))}}class ExcalidrawPlugin extends obsidian_module.Plugin{fileManager;observerManager;packageManager;commandManager;eventManager;eaInstances=new WeakArray;fourthFontLoaded=!1;excalidrawConfig;excalidrawFileModes={};settings;activeExcalidrawView=null;lastActiveExcalidrawFilePath=null;hover={linkText:null,sourcePath:null};legacyExcalidrawPopoverObserver;fileExplorerObserver;opencount=0;ea;filesMaster=null;equationsMaster=null;mermaidsMaster=null;scriptEngine;stylesManager;editorHandler;forceToOpenInMarkdownFilepath=null;loadTimestamp;isLocalCJKFontAvailabe=void 0;isReady=!1;startupAnalytics=[];lastLogTimestamp;settingsReady=!1;wasPenModeActivePreviously=!1;popScope=null;lastPDFLeafID=null;constructor(e,t){super(e,t),this.loadTimestamp=INITIAL_TIMESTAMP,this.lastLogTimestamp=this.loadTimestamp,this.filesMaster=new Map,this.equationsMaster=new Map,this.mermaidsMaster=new Map,this.fileManager=new PluginFileManager(this),setExcalidrawPlugin(this)}logStartupEvent(e){const t=Date.now();this.startupAnalytics.push(`${e}\\nTotal: ${t-this.loadTimestamp}ms Delta: ${t-this.lastLogTimestamp}ms\\n`),this.lastLogTimestamp=t}printStarupBreakdown(){console.log(`Excalidraw ${PLUGIN_VERSION} startup breakdown:\\n`+this.startupAnalytics.join(\"\\n\"))}get locale(){return LOCALE}get window(){return window}get document(){return document}async getMermaid(){return await loadMermaid()}isPenMode(){return this.wasPenModeActivePreviously||\"always\"===this.settings.defaultPenMode||\"mobile\"===this.settings.defaultPenMode&&DEVICE.isMobile}getCJKFontSettings(){const e=this.settings.fontAssetsPath;return void 0===this.isLocalCJKFontAvailabe&&(this.isLocalCJKFontAvailabe=this.app.vault.getFiles().some((t=>t.path.startsWith(e)))),this.isLocalCJKFontAvailabe?{c:this.settings.loadChineseFonts,j:this.settings.loadJapaneseFonts,k:this.settings.loadKoreanFonts}:{c:!1,j:!1,k:!1}}async loadFontFromFile(e){const t=this.settings.fontAssetsPath;if(!this.isLocalCJKFontAvailabe)return;const a=this.app.vault.getAbstractFileByPath(obsidian_module.normalizePath(t+\"/\"+e));return a&&a instanceof obsidian_module.TFile?await this.app.vault.readBinary(a):void 0}async onload(){this.logStartupEvent(\"Plugin Constructor ready, starting onload()\"),this.registerView(VIEW_TYPE_EXCALIDRAW,(e=>this.isReady?new ExcalidrawView(e,this):new ExcalidrawLoading(e,this))),this.registerExtensions([\"excalidraw\"],VIEW_TYPE_EXCALIDRAW),obsidian_module.addIcon(ICON_NAME,EXCALIDRAW_ICON),obsidian_module.addIcon(SCRIPTENGINE_ICON_NAME,SCRIPTENGINE_ICON),obsidian_module.addIcon(EXPORT_IMG_ICON_NAME,EXPORT_IMG_ICON),this.addRibbonIcon(ICON_NAME,t$d(\"CREATE_NEW\"),this.actionRibbonClick.bind(this));try{this.loadSettings({reEnableAutosave:!0}).then(this.onloadCheckForOnceOffSettingsUpdates.bind(this))}catch(e){new obsidian_module.Notice(\"Error loading plugin settings\",6e3),console.error(\"Error loading plugin settings\",e)}this.logStartupEvent(\"Settings loaded\");try{this.ea=initExcalidrawAutomate(this)}catch(e){new obsidian_module.Notice(\"Error initializing Excalidraw Automate\",6e3),console.error(\"Error initializing Excalidraw Automate\",e)}this.logStartupEvent(\"Excalidraw Automate initialized\");try{this.addMarkdownPostProcessor()}catch(e){new obsidian_module.Notice(\"Error adding markdown post processor\",6e3),console.error(\"Error adding markdown post processor\",e)}this.logStartupEvent(\"Markdown post processor added\"),this.app.workspace.onLayoutReady(this.onloadOnLayoutReady.bind(this)),this.logStartupEvent(\"Workspace ready event handler added\")}async onloadCheckForOnceOffSettingsUpdates(){const e=!this.settings.onceOffCompressFlagReset||!this.settings.onceOffGPTVersionReset;this.settings.onceOffCompressFlagReset||(this.settings.compress=!0,this.settings.onceOffCompressFlagReset=!0),this.settings.onceOffGPTVersionReset||(this.settings.onceOffGPTVersionReset=!0,\"gpt-4-vision-preview\"===this.settings.openAIDefaultVisionModel&&(this.settings.openAIDefaultVisionModel=\"gpt-4o\")),e&&await this.saveSettings(),this.addSettingTab(new ExcalidrawSettingTab(this.app,this)),this.settingsReady=!0}async onloadOnLayoutReady(){this.loadTimestamp=Date.now(),this.lastLogTimestamp=this.loadTimestamp,this.logStartupEvent(\"\\n----------------------------------\\nWorkspace onLayoutReady event fired (these actions are outside the plugin initialization)\"),await this.awaitSettings(),this.logStartupEvent(\"Settings awaited\"),this.settings.overrideObsidianFontSize||setRootElementSize(),this.packageManager=new PackageManager(this),this.eventManager=new EventManager(this),this.observerManager=new ObserverManager(this),this.commandManager=new CommandManager(this);try{initCompressionWorker()}catch(e){new obsidian_module.Notice(\"Error initializing compression worker\",6e3),console.error(\"Error initializing compression worker\",e)}this.logStartupEvent(\"Compression worker initialized\");try{this.excalidrawConfig=new ExcalidrawConfig(this)}catch(e){new obsidian_module.Notice(\"Error initializing Excalidraw config\",6e3),console.error(\"Error initializing Excalidraw config\",e)}this.logStartupEvent(\"Excalidraw config initialized\"),this.observerManager.initialize();try{this.registerMonkeyPatches()}catch(e){new obsidian_module.Notice(\"Error registering monkey patches\",6e3),console.error(\"Error registering monkey patches\",e)}this.logStartupEvent(\"Monkey patches registered\");try{this.stylesManager=new StylesManager(this)}catch(e){new obsidian_module.Notice(\"Error initializing styles manager\",6e3),console.error(\"Error initializing styles manager\",e)}this.logStartupEvent(\"Styles manager initialized\");try{this.scriptEngine=new ScriptEngine(this)}catch(e){new obsidian_module.Notice(\"Error initializing script engine\",6e3),console.error(\"Error initializing script engine\",e)}this.logStartupEvent(\"Script engine initialized\");try{await this.initializeFonts()}catch(e){new obsidian_module.Notice(\"Error initializing fonts\",6e3),console.error(\"Error initializing fonts\",e)}this.logStartupEvent(\"Fonts initialized\");try{imageCache.initializeDB(this)}catch(e){new obsidian_module.Notice(\"Error initializing image cache\",6e3),console.error(\"Error initializing image cache\",e)}this.logStartupEvent(\"Image cache initialized\");try{this.isReady=!0,await switchToExcalidraw(this.app),this.switchToExcalidarwAfterLoad()}catch(e){new obsidian_module.Notice(\"Error switching views to Excalidraw\",6e3),console.error(\"Error switching views to Excalidraw\",e)}this.logStartupEvent(\"Switched to Excalidraw views\");try{if(this.settings.showReleaseNotes){const e=\"0.0.0\"===this.settings.previousRelease||!this.settings.previousRelease;isVersionNewerThanOther(PLUGIN_VERSION,this.settings.previousRelease??\"0.0.0\")&&new ReleaseNotes(this.app,this,e?null:PLUGIN_VERSION).open()}}catch(e){new obsidian_module.Notice(\"Error opening release notes\",6e3),console.error(\"Error opening release notes\",e)}this.logStartupEvent(\"Release notes opened\"),this.fileManager.initialize(),this.eventManager.initialize();try{this.runStartupScript()}catch(e){new obsidian_module.Notice(\"Error running startup script\",6e3),console.error(\"Error running startup script\",e)}this.logStartupEvent(\"Startup script run\");try{this.editorHandler=new EditorHandler(this),this.editorHandler.setup()}catch(e){new obsidian_module.Notice(\"Error setting up editor handler\",6e3),console.error(\"Error setting up editor handler\",e)}this.logStartupEvent(\"Editor handler initialized\");try{this.registerInstallCodeblockProcessor()}catch(e){new obsidian_module.Notice(\"Error registering script install-codeblock processor\",6e3),console.error(\"Error registering script install-codeblock processor\",e)}this.logStartupEvent(\"Script install-codeblock processor registered\"),this.commandManager.initialize();try{this.registerEditorSuggest(new FieldSuggester(this))}catch(e){new obsidian_module.Notice(\"Error registering editor suggester\",6e3),console.error(\"Error registering editor suggester\",e)}this.logStartupEvent(\"Editor suggester registered\");try{this.setPropertyTypes()}catch(e){new obsidian_module.Notice(\"Error setting up property types\",6e3),console.error(\"Error setting up property types\",e)}this.logStartupEvent(\"Property types set\")}async awaitSettings(){for(;!this.settingsReady;)await sleep$1(20)}async awaitInit(){for(;!this.isReady;)await sleep$1(50)}async setPropertyTypes(){if(!this.settings.loadPropertySuggestions)return;const e=this.app;Object.keys(FRONTMATTER_KEYS).forEach((t=>{if(!0===FRONTMATTER_KEYS[t].depricated)return;const{name:a,type:i}=FRONTMATTER_KEYS[t];e.metadataTypeManager.setType(a,i)}))}async initializeFonts(){const e=await getCJKDataURLs(this);if(\"boolean\"!=typeof e||e||new obsidian_module.Notice(t$d(\"FONTS_LOAD_ERROR\")+this.settings.fontAssetsPath,6e3),\"object\"==typeof e){const t=e.map((e=>`@font-face { font-family: 'Xiaolai'; src: url(\"${e}\"); font-display: swap; font-weight: 400; }`));for(const e of this.getOpenObsidianDocuments())await this.addFonts(t,e,CJK_STYLE_ID);new obsidian_module.Notice(t$d(\"FONTS_LOADED\"))}const t=await getFontDataURL(this.app,this.settings.experimantalFourthFont,\"\",\"Local Font\");if(\"\"===t.dataURL)return void(this.fourthFontLoaded=!0);const a=t.dataURL;let i=this.app.metadataCache.getFirstLinkpathDest(this.settings.experimantalFourthFont,\"\").extension.startsWith(\"woff\")?void 0:await getFontMetrics(a,\"Local Font\");i||(console.log(\"Font Metrics not found, using default\"),i={unitsPerEm:1e3,ascender:750,descender:-250,lineHeight:1.2,fontName:\"Local Font\"}),this.packageManager.getPackageMap().forEach((({excalidrawLib:e})=>{e.registerLocalFont({metrics:i},a)}));for(const e of this.getOpenObsidianDocuments())await this.addFonts([`@font-face{font-family:'Local Font';src:url(\"${a}\");font-display: swap;font-weight: 400;`],e);this.fourthFontLoaded||setTimeout((()=>{this.fourthFontLoaded=!0}),100)}async addFonts(e,t=document,a=FONTS_STYLE_ID){const i=t.createElement(\"style\");i.id=a,i.textContent=e.join(\"\");const n=t.getElementById(a);t.head.appendChild(i),n&&t.head.removeChild(n),await t.fonts.load(\"20px Local Font\")}removeFonts(){this.getOpenObsidianDocuments().forEach((e=>{const t=e.getElementById(FONTS_STYLE_ID);t&&e.head.removeChild(t);const a=e.getElementById(CJK_STYLE_ID);a&&e.head.removeChild(a)}))}getOpenObsidianDocuments(){const e=new Set;return this.app.workspace.iterateAllLeaves((t=>{const a=DEVICE.isMobile?document:t.view.containerEl.ownerDocument;a&&(e.has(a)||e.add(a))})),Array.from(e)}switchToExcalidarwAfterLoad(){let e;for(e of this.app.workspace.getLeavesOfType(\"markdown\"))e.view instanceof obsidian_module.MarkdownView&&this.isExcalidrawFile(e.view.file)&&(fileShouldDefaultAsExcalidraw(e.view.file?.path,this.app)?(this.excalidrawFileModes[e.id||e.view.file.path]=VIEW_TYPE_EXCALIDRAW,setExcalidrawView(e)):foldExcalidrawSection(e.view))}forceSaveActiveView(e){if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.forceSave(),!0)}registerInstallCodeblockProcessor(){const e=async(e,t)=>{let a=null;try{const e=t.parentElement.querySelector(`a[href=\"#${t.previousElementSibling.getAttribute(\"data-heading\")}\"]`);e.style.paddingRight=\"10px\",a=e.parentElement.createEl(\"button\",null,(e=>{e.setText(t$d(\"UPDATE_SCRIPT\")),e.addClass(\"mod-muted\"),e.style.backgroundColor=\"var(--interactive-success)\",e.style.display=\"none\"}))}catch(t){errorlog({where:\"this.registerInstallCodeblockProcessor\",source:e,error:t})}e=e.trim(),t.createEl(\"button\",null,(async t=>{const i=e=>{switch(a&&(a.style.display=\"none\"),e){case\"CHECKING\":t.setText(t$d(\"CHECKING_SCRIPT\")),t.style.backgroundColor=\"var(--interactive-normal)\";break;case\"INSTALL\":t.setText(t$d(\"INSTALL_SCRIPT\")),t.style.backgroundColor=\"var(--interactive-accent)\";break;case\"UPTODATE\":t.setText(t$d(\"UPTODATE_SCRIPT\")),t.style.backgroundColor=\"var(--interactive-normal)\";break;case\"UPDATE\":t.setText(t$d(\"UPDATE_SCRIPT\")),t.style.backgroundColor=\"var(--interactive-success)\",a&&(a.style.display=null);break;case\"ERROR\":t.setText(t$d(\"UNABLETOCHECK_SCRIPT\")),t.style.backgroundColor=\"var(--interactive-normal)\"}};t.addClass(\"mod-muted\");let n=e;try{n=decodeURI(e)}catch(t){errorlog({where:\"ExcalidrawPlugin.registerInstallCodeblockProcessor.codeblockProcessor.onClick\",source:e,error:t})}const r=n.substring(n.lastIndexOf(\"/\")+1),s=`${this.settings.scriptFolderPath}/${SCRIPT_INSTALL_FOLDER}`,o=this.app.vault.getFiles().filter((e=>e.path.startsWith(s)&&e.name===r)).sort(((e,t)=>e.path>t.path?1:-1));let l=o[0];const c=l?.path??`${s}/${r}`,d=getIMGFilename(c,\"svg\");let h=this.app.vault.getAbstractFileByPath(d);if(i(l?\"CHECKING\":\"INSTALL\"),t.onclick=async()=>{const t=async(e,t,a)=>{const i=await obsidian_module.request({url:e});return!i||i.startsWith(\"404: Not Found\")?null:await createOrOverwriteFile(this.app,t?.path??a,i)};try{if(l=await t(e,l,c),!l)throw i(\"ERROR\"),\"File not found\";h=await t(getIMGFilename(e,\"svg\"),h,d),i(\"UPTODATE\"),0===Object.keys(this.scriptEngine.scriptIconMap).length&&this.scriptEngine.loadScripts(),new obsidian_module.Notice(`Installed: ${l.basename}`)}catch(e){new obsidian_module.Notice(`Error installing script: ${r}`),errorlog({where:\"ExcalidrawPlugin.registerInstallCodeblockProcessor.codeblockProcessor.onClick\",error:e})}},a&&(a.onclick=t.onclick),!(l&&l instanceof obsidian_module.TFile))return;const p=new Map;JSON.parse(await obsidian_module.request({url:\"https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/ea-scripts/directory-info.json\"})).forEach((e=>p.set(e.fname,e.mtime)));const u=(e,t)=>{if(0===p.size||!p.has(e))return\"ERROR\";const a=p.get(e);return!t||a>t.stat.mtime?\"UPDATE\":\"UPTODATE\"},m=u(r,l),g=u(getIMGFilename(r,\"svg\"),h&&h instanceof obsidian_module.TFile?h:null);i(\"UPTODATE\"===m&&\"UPTODATE\"===g||\"UPTODATE\"===m&&\"ERROR\"===g?\"UPTODATE\":\"ERROR\"===m?\"ERROR\":\"UPDATE\"===m||\"UPDATE\"===g?\"UPDATE\":\"UPTODATE\")}))};this.registerMarkdownCodeBlockProcessor(SCRIPT_INSTALL_CODEBLOCK,(async(t,a)=>{a.addEventListener(RERENDER_EVENT,(async i=>{i.stopPropagation(),a.empty(),e(t,a)})),e(t,a)}))}addMarkdownPostProcessor(){initializeMarkdownPostProcessor(this),this.registerMarkdownPostProcessor(markdownPostProcessor),this.app.workspace.onLayoutReady((async()=>{await this.awaitInit(),this.registerEvent(this.app.workspace.on(\"hover-link\",hoverEvent)),this.app.vault.getFiles().some((e=>\"excalidraw\"===e.extension))&&this.enableLegacyFilePopoverObserver()}))}enableLegacyFilePopoverObserver(){this.legacyExcalidrawPopoverObserver||(this.legacyExcalidrawPopoverObserver=legacyExcalidrawPopoverObserver,this.legacyExcalidrawPopoverObserver.observe(document.body,{childList:!0,subtree:!1}))}async actionRibbonClick(e){this.createAndOpenDrawing(getDrawingFilename(this.settings),linkClickModifierType(emulateCTRLClickForLinks(e)))}async convertSingleExcalidrawToMD(e,t=!1,a=!1){const i=await this.app.vault.read(e),n=e.name.substring(0,e.name.lastIndexOf(\".excalidraw\"))+(t?\".md\":\".excalidraw.md\"),r=getNewUniqueFilepath(this.app.vault,n,obsidian_module.normalizePath(e.path.substring(0,e.path.lastIndexOf(e.name))));log$2(r);const s=await createOrOverwriteFile(this.app,r,FRONTMATTER+await this.fileManager.exportSceneToMD(i,!1));return this.settings.keepInSync&&EXPORT_TYPES.forEach((t=>{const a=e.path.substring(0,e.path.lastIndexOf(\".excalidraw\"))+t,i=this.app.vault.getAbstractFileByPath(obsidian_module.normalizePath(a));if(i&&i instanceof obsidian_module.TFile){const e=r.substring(0,r.lastIndexOf(\".md\"))+t;this.app.fileManager.renameFile(i,e)}})),a||this.app.vault.delete(e),s}async convertExcalidrawToMD(e=!1,t=!1){const a=this.app.vault.getFiles().filter((e=>\"excalidraw\"==e.extension));for(const i of a)this.convertSingleExcalidrawToMD(i,e,t);new obsidian_module.Notice(`Converted ${a.length} files.`)}registerMonkeyPatches(){this.register(around(obsidian_module.Workspace.prototype,{getActiveViewOfType:t=>dedupe(\"https://github.com/zsviczian/obsidian-excalidraw-plugin/issues\",t,(function(...a){const i=t&&t.apply(this,a),n=e.app?.workspace?.activeLeaf?.view;if(!(n&&n instanceof ExcalidrawView))return i;if(!isCallerFromTemplaterPlugin((new Error).stack))return i;const r=n.getActiveEmbeddable();return r&&r.node&&r.node.isEditing?{file:r.node.file,editor:r.node.child.editor}:i}))})),this.app.plugins.plugins?.[\"obsidian-hover-editor\"]||this.register(around(obsidian_module.WorkspaceLeaf.prototype,{getRoot:e=>function(){const t=e.call(this);return t.getRoot===this.getRoot?t:t.getRoot()}}));const e=this;this.register(around(obsidian_module.WorkspaceLeaf.prototype,{detach:t=>function(){const a=this.view?.getState();return a?.file&&e.excalidrawFileModes[this.id||a.file]&&delete e.excalidrawFileModes[this.id||a.file],t.apply(this)},setViewState:t=>function(a,...i){const n=e._loaded&&\"markdown\"===a.type&&a.state?.file;if(n&&\"markdown\"!==e.excalidrawFileModes[this.id||a.state.file]){const n=a.state.file;if(e.forceToOpenInMarkdownFilepath!==n&&fileShouldDefaultAsExcalidraw(n,this.app)){const r={...a,type:VIEW_TYPE_EXCALIDRAW};return e.excalidrawFileModes[n]=VIEW_TYPE_EXCALIDRAW,t.apply(this,[r,...i])}e.forceToOpenInMarkdownFilepath=null}if(n){const t=this;setTimeout((async()=>{t&&t.view&&t.view instanceof obsidian_module.MarkdownView&&t.view.file&&e.isExcalidrawFile(t.view.file)&&foldExcalidrawSection(t.view)}),500)}return t.apply(this,[a,...i])}}))}async runStartupScript(){if(!this.settings.startupScriptPath||\"\"===this.settings.startupScriptPath)return;const e=this.settings.startupScriptPath.endsWith(\".md\")?this.settings.startupScriptPath:`${this.settings.startupScriptPath}.md`,t=this.app.vault.getAbstractFileByPath(e);if(!(t&&t instanceof obsidian_module.TFile))return void new obsidian_module.Notice(`Startup script not found: ${e}`);const a=await this.app.vault.read(t),i=Object.getPrototypeOf((async()=>{})).constructor;try{await new i(\"ea\",a)(this.ea)}catch(e){new obsidian_module.Notice(`Error running startup script: ${e}`)}}getLastActivePDFPageLink(e){if(!this.lastPDFLeafID)return;const t=this.app.workspace.getLeafById(this.lastPDFLeafID);if(!t||!t.view||\"pdf\"!==t.view.getViewType())return;const a=t.view,i=a.file,n=a.viewer.child.pdfViewer.page;return i&&n?this.app.metadataCache.fileToLinktext(i,e?.path,!1)+`#page=${n}`:void 0}async activeLeafChangeEventHandler(e){this.eventManager.onActiveLeafChangeHandler(e)}setDebounceActiveLeafChangeHandler(){this.eventManager.setDebounceActiveLeafChangeHandler()}getPathForFile(e){let t=\"\";const{webUtils:a}=require(\"electron\");return a&&a.getPathForFile&&(t=a.getPathForFile(e)),t}registerHotkeyOverrides(){if(this.popScope&&(this.popScope(),this.popScope=null),!this.activeExcalidrawView)return;const e=this.app.keymap.getRootScope(),t=this.settings.modifierKeyOverrides.map((t=>e.register(t.modifiers,t.key,(()=>!0))));t.forEach((()=>e.keys.unshift(e.keys.pop())));const a=e.register([\"Mod\"],\"f\",(()=>!0));e.keys.unshift(e.keys.pop());const i=this.commandManager?.forceSaveCommand,n=i&&\"s\"===i.hotkeys[0].key&&i.hotkeys[0].modifiers.includes(\"Ctrl\")?e.register([\"Ctrl\"],\"s\",(()=>this.forceSaveActiveView(!1))):void 0;n&&e.keys.unshift(e.keys.pop()),this.popScope=()=>{t.forEach((t=>e.unregister(t))),e.unregister(a),Boolean(n)&&e.unregister(n)}}async registerEventListeners(){await this.awaitInit();const e=this.app.metadataCache;e.getCachedFiles().forEach((t=>{const a=e.getCache(t)?.frontmatter;(a&&void 0!==a[FRONTMATTER_KEYS.plugin.name]||t.match(/\\.excalidraw$/))&&this.fileManager.updateFileCache(this.app.vault.getAbstractFileByPath(t),a)}))}onunload(){getExcalidrawViews(this.app).forEach((({leaf:e})=>{this.setMarkdownView(e)})),versionUpdateCheckTimer&&window.clearTimeout(versionUpdateCheckTimer),this.scriptEngine&&(this.scriptEngine.destroy(),this.scriptEngine=null),imageCache&&imageCache.destroy(),this.stylesManager.destroy(),this.stylesManager=null,this.removeFonts(),this.eaInstances.forEach((e=>e?.destroy())),this.eaInstances.clear(),this.eaInstances=null,this.ea.destroy(),this.ea=null,window.ExcalidrawAutomate?.destroy(),delete window.ExcalidrawAutomate,this.popScope&&(this.popScope(),this.popScope=null),this.legacyExcalidrawPopoverObserver&&this.legacyExcalidrawPopoverObserver.disconnect(),this.observerManager.destroy(),this.fileExplorerObserver&&this.fileExplorerObserver.disconnect(),this.excalidrawConfig=null,this.editorHandler.destroy(),this.editorHandler=null,this.hover={linkText:null,sourcePath:null},this.fileManager.destroy(),this.equationsMaster.clear(),this.filesMaster.clear(),this.mermaidsMaster.clear(),this.activeExcalidrawView=null,this.lastActiveExcalidrawFilePath=null,this.settings=null,clearMathJaxVariables(),delete window.PolyBool,this.packageManager.destroy(),this.commandManager?.destroy(),this.eventManager.destroy(),terminateCompressionWorker()}async loadSettings(e={applyLefthandedMode:!0,reEnableAutosave:!1}){void 0===e.applyLefthandedMode&&(e.applyLefthandedMode=!0),void 0===e.reEnableAutosave&&(e.reEnableAutosave=!1),this.settings=Object.assign({},DEFAULT_SETTINGS,await this.loadData()),this.settings.previewImageType||(void 0===this.settings.displaySVGInPreview?this.settings.previewImageType=PreviewImageType.SVGIMG:this.settings.previewImageType=this.settings.displaySVGInPreview?PreviewImageType.SVGIMG:PreviewImageType.PNG),e.applyLefthandedMode&&setLeftHandedMode(this.settings.isLeftHanded),e.reEnableAutosave&&(this.settings.autosave=!0),setDebugging(this.settings.isDebugMode)}async saveSettings(){await this.saveData(this.settings)}getStencilLibrary(){return\"\"===this.settings.library||\"deprecated\"===this.settings.library?this.settings.library2:JSON_parse(this.settings.library)}setStencilLibrary(e){this.settings.library=\"deprecated\",this.settings.library2=e}triggerEmbedUpdates(e){const t=new Set;this.app.workspace.getLeavesOfType(\"markdown\").forEach((a=>{const i=DEVICE.isMobile?document:a.view.containerEl.ownerDocument;if(!i)return;if(t.has(i))return;t.add(i);const n=i.createEvent(\"Event\");n.initEvent(RERENDER_EVENT,!0,!1),i.querySelectorAll(\".excalidraw-embedded-img\"+(e?`[fileSource='${e.replaceAll(\"'\",\"\\\\'\")}']`:\"\")).forEach((e=>e.dispatchEvent(n)))}))}async getBlankDrawing(){return await this.fileManager.getBlankDrawing()}async createDrawing(e,t,a){const i=await this.fileManager.createDrawing(e,t,a);if(Date.now()-this.loadTimestamp>1){const e=this.app.vault.getFiles().filter((e=>this.isExcalidrawFile(e))).length,t=e<200?\"Bronze\":e<750?\"Silver\":e<2e3?\"Gold\":\"Platinum\",{grip:a,decoration:i,blade:n}=SwordColors[t];this.settings.rank!==t&&(await this.loadSettings(),this.settings.rank!==t&&(this.settings.rank=t,await this.saveSettings(),new RankMessage(this.app,this,e,t,i,n,a).open()))}return i}async createAndOpenDrawing(e,t,a,i){const n=await this.createDrawing(e,a,i);return this.fileManager.openDrawing(n,t,!0,void 0,!0),n.path}async setMarkdownView(e,t){const a=e.view.getState();await e.setViewState({type:\"markdown\",state:a,popstate:!0},t||{focus:!0});const i=e.view;i instanceof obsidian_module.MarkdownView&&foldExcalidrawSection(i)}isExcalidrawFile(e){return this.fileManager.isExcalidrawFile(e)}openDrawing(e,t,a=!1,i,n=!1,r){this.fileManager.openDrawing(e,t,a,i,n,r)}async embedDrawing(e){return await this.fileManager.embedDrawing(e)}async exportLibrary(){return await this.fileManager.exportLibrary()}async renameEventHandler(e,t){this.fileManager.renameEventHandler(e,t)}async modifyEventHandler(e){this.fileManager.modifyEventHandler(e)}async deleteEventHandler(e){this.fileManager.deleteEventHandler(e)}addThemeObserver(){this.observerManager.addThemeObserver()}removeThemeObserver(){this.observerManager.removeThemeObserver()}addModalContainerObserver(){this.observerManager.addModalContainerObserver()}removeModalContainerObserver(){this.observerManager.removeModalContainerObserver()}experimentalFileTypeDisplayToggle(e){this.observerManager.experimentalFileTypeDisplayToggle(e)}getPackage(e){return this.packageManager.getPackage(e)}deletePackage(e){this.packageManager.deletePackage(e)}get taskbone(){return this.commandManager?.taskbone}get insertImageDialog(){return this.commandManager?.insertImageDialog}get insertMDDialog(){return this.commandManager?.insertMDDialog}get insertLinkDialog(){return this.commandManager?.insertLinkDialog}get importSVGDialog(){return this.commandManager?.importSVGDialog}isRecentSplitViewSwitch(){return this.eventManager.isRecentSplitViewSwitch()}get leafChangeTimeout(){return this.eventManager.leafChangeTimeout}clearLeafChangeTimeout(){this.eventManager.leafChangeTimeout=null}updateFileCache(e,t){this.fileManager.updateFileCache(e,t)}runAction(e){if(this.activeExcalidrawView)switch(e){case\"anyFile\":this.activeExcalidrawView.setCurrentPositionToCenter(),new UniversalInsertFileModal(this,this.activeExcalidrawView).open();break;case\"LaTeX\":insertLaTeXToView(this.activeExcalidrawView,!0);break;case\"card\":this.activeExcalidrawView.insertBackOfTheNoteCard(!0)}}getLabel(e){return t$d(e)}}module.exports=ExcalidrawPlugin;\n\n/* nosourcemap */"
  ],
  "metadata": [
    {
      "file": "/home/popertots/ragmcp/Crussell/local-dev.sh",
      "name": "create_booking",
      "type": "function",
      "line": 213,
      "language": "shell",
      "has_braces": true
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/local-dev.sh",
      "name": "format_london_time",
      "type": "function",
      "line": 266,
      "language": "shell",
      "has_braces": true
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 1,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 9,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "account_type",
      "type": "create type enum",
      "line": 14,
      "language": "sql",
      "enum_values": "email,google,microsoft,facebook,guest"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "payment_type",
      "type": "create type enum",
      "line": 15,
      "language": "sql",
      "enum_values": "deposit,full,tip,balance,partial"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "payment_method",
      "type": "create type enum",
      "line": 16,
      "language": "sql",
      "enum_values": "online_square,in_person_card,cash,giftcard,discount"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "payment_status",
      "type": "create type enum",
      "line": 17,
      "language": "sql",
      "enum_values": "pending,completed,failed,refunded"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "booking_status",
      "type": "create type enum",
      "line": 18,
      "language": "sql",
      "enum_values": "pending,confirmed,in_progress,completed,client_cancelled,we_cancelled,re-schedule,no_show"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 20,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 48,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 49,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 50,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 51,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 53,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "create",
      "line": 78,
      "language": "sql"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 113,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 126,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 127,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "generate_service_id",
      "type": "statement",
      "line": 129,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": "generate_service_id"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 148,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 150,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 157,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "generate_booking_id",
      "type": "statement",
      "line": 159,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": "generate_booking_id"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 174,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 175,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 176,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 177,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 179,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 191,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 199,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 209,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 211,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 212,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 213,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 214,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 215,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 216,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 217,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 219,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 230,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 240,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 242,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 249,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 252,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "create",
      "line": 263,
      "language": "sql"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 282,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 283,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 284,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 286,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 305,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "trigger_update_business_settings_timestamp",
      "type": "create trigger",
      "line": 314,
      "language": "sql"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 319,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 342,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 343,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 344,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 345,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 347,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 386,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 399,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 414,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 504,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 572,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 637,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 675,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 707,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 790,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 836,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "statement",
      "line": 876,
      "language": "sql",
      "tables": "",
      "ctes": "",
      "functions": ""
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/init-scripts/init-script.sql",
      "name": "",
      "type": "unknown",
      "line": 1042,
      "language": "sql"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/main.go",
      "name": "init",
      "type": "func",
      "receiver": "",
      "line": 25,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/main.go",
      "name": "initDB",
      "type": "func",
      "receiver": "",
      "line": 33,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/main.go",
      "name": "initDav",
      "type": "func",
      "receiver": "",
      "line": 40,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/main.go",
      "name": "main",
      "type": "func",
      "receiver": "",
      "line": 47,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/vite.config.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/vite.config.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 5,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/eslint.config.js",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/eslint.config.js",
      "name": "chunk_1",
      "type": "code_block",
      "line": 11,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/eslint.config.js",
      "name": "chunk_2",
      "type": "code_block",
      "line": 13,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/eslint.config.js",
      "name": "chunk_3",
      "type": "code_block",
      "line": 20,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/eslint.config.js",
      "name": "chunk_4",
      "type": "code_block",
      "line": 21,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/eslint.config.js",
      "name": "chunk_5",
      "type": "code_block",
      "line": 24,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/eslint.config.js",
      "name": "chunk_6",
      "type": "code_block",
      "line": 25,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/eslint.config.js",
      "name": "chunk_7",
      "type": "code_block",
      "line": 26,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/eslint.config.js",
      "name": "chunk_8",
      "type": "code_block",
      "line": 30,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/eslint.config.js",
      "name": "chunk_9",
      "type": "code_block",
      "line": 32,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/eslint.config.js",
      "name": "chunk_10",
      "type": "code_block",
      "line": 33,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/svelte.config.js",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/svelte.config.js",
      "name": "chunk_1",
      "type": "code_block",
      "line": 5,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/svelte.config.js",
      "name": "chunk_2",
      "type": "code_block",
      "line": 6,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/svelte.config.js",
      "name": "chunk_3",
      "type": "code_block",
      "line": 7,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/svelte.config.js",
      "name": "chunk_4",
      "type": "code_block",
      "line": 10,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/svelte.config.js",
      "name": "chunk_5",
      "type": "code_block",
      "line": 11,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/svelte.config.js",
      "name": "chunk_6",
      "type": "code_block",
      "line": 12,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/svelte.config.js",
      "name": "chunk_7",
      "type": "code_block",
      "line": 13,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/svelte.config.js",
      "name": "chunk_8",
      "type": "code_block",
      "line": 14,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/svelte.config.js",
      "name": "chunk_9",
      "type": "code_block",
      "line": 19,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/svelte.config.js",
      "name": "chunk_10",
      "type": "code_block",
      "line": 25,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/app.d.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/app.d.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 2,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/app.d.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 3,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/app.d.ts",
      "name": "chunk_3",
      "type": "code_block",
      "line": 4,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/app.d.ts",
      "name": "chunk_4",
      "type": "code_block",
      "line": 5,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/app.d.ts",
      "name": "chunk_5",
      "type": "code_block",
      "line": 6,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/app.d.ts",
      "name": "chunk_6",
      "type": "code_block",
      "line": 7,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/app.d.ts",
      "name": "chunk_7",
      "type": "code_block",
      "line": 8,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/app.d.ts",
      "name": "chunk_8",
      "type": "code_block",
      "line": 9,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/app.d.ts",
      "name": "chunk_9",
      "type": "code_block",
      "line": 13,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 4,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 8,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts",
      "name": "chunk_3",
      "type": "code_block",
      "line": 9,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts",
      "name": "chunk_4",
      "type": "code_block",
      "line": 10,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts",
      "name": "chunk_5",
      "type": "code_block",
      "line": 11,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts",
      "name": "chunk_6",
      "type": "code_block",
      "line": 12,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/utils.ts",
      "name": "chunk_7",
      "type": "code_block",
      "line": 13,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/+page.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/+error.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/+layout.svelte",
      "name": "updateToasterPosition",
      "type": "function",
      "line": 14,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/+layout.svelte",
      "name": "verify_email",
      "type": "function",
      "line": 32,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/+layout.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/contact/+page.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "Service",
      "type": "type",
      "line": 27,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "fetchServices",
      "type": "function",
      "line": 41,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "fetchHoursForMonth",
      "type": "function",
      "line": 118,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "WorkingHoursDay",
      "type": "type",
      "line": 153,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "AvailableHoursDay",
      "type": "type",
      "line": 187,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "setDefaultSelectedDate",
      "type": "function",
      "line": 228,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "calculateEndTime",
      "type": "function",
      "line": 263,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "formatTime",
      "type": "function",
      "line": 274,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "isDateUnavailable",
      "type": "function",
      "line": 294,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "generateGroupedTimeSlots",
      "type": "function",
      "line": 334,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "timeToMinutes",
      "type": "function",
      "line": 450,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "calculatePreviousTime",
      "type": "function",
      "line": 456,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "generateAvailableTimeSlots",
      "type": "function",
      "line": 466,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "getTotalDuration",
      "type": "function",
      "line": 521,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "getTotalPrice",
      "type": "function",
      "line": 528,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "toggleService",
      "type": "function",
      "line": 532,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "isServiceSelected",
      "type": "function",
      "line": 556,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "generateAllTimeSlots",
      "type": "function",
      "line": 566,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "formatDuration",
      "type": "function",
      "line": 620,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "getDayWithOrdinal",
      "type": "function",
      "line": 633,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "nextStep",
      "type": "function",
      "line": 654,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "prevStep",
      "type": "function",
      "line": 663,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "handleBooking",
      "type": "function",
      "line": 679,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/book/+page.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte",
      "name": "toggleMode",
      "type": "function",
      "line": 45,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte",
      "name": "validateEmail",
      "type": "function",
      "line": 65,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte",
      "name": "validatePhone",
      "type": "function",
      "line": 96,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte",
      "name": "formatPhoneInput",
      "type": "function",
      "line": 113,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte",
      "name": "handlePhoneInput",
      "type": "function",
      "line": 135,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte",
      "name": "validateAge",
      "type": "function",
      "line": 152,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte",
      "name": "normalizeFormData",
      "type": "function",
      "line": 170,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte",
      "name": "handleSubmit",
      "type": "function",
      "line": 182,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte",
      "name": "handleSocialLogin",
      "type": "function",
      "line": 250,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/login/+page.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/prices/+page.svelte",
      "name": "Service",
      "type": "type",
      "line": 8,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/prices/+page.svelte",
      "name": "fetchServices",
      "type": "function",
      "line": 22,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/prices/+page.svelte",
      "name": "formatDuration",
      "type": "function",
      "line": 53,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/prices/+page.svelte",
      "name": "formatPrice",
      "type": "function",
      "line": 67,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/prices/+page.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "handleFilesDropped",
      "type": "function",
      "line": 51,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "uploadOneOrMany",
      "type": "function",
      "line": 55,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "WorkingHourRow",
      "type": "type",
      "line": 87,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "formatTime",
      "type": "function",
      "line": 99,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "timeToInputValue",
      "type": "function",
      "line": 115,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "fetchDefaultHours",
      "type": "function",
      "line": 134,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "ExceptionGroup",
      "type": "type",
      "line": 177,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "fetchExceptionGroups",
      "type": "function",
      "line": 208,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "prepareDefaultHoursEdit",
      "type": "function",
      "line": 270,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "confirmSaveDefaultHours",
      "type": "function",
      "line": 283,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "saveExceptionGroup",
      "type": "function",
      "line": 325,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "confirmDeleteExceptionGroup",
      "type": "function",
      "line": 380,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "openViewExceptionModal",
      "type": "function",
      "line": 409,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "resetExceptionForm",
      "type": "function",
      "line": 414,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "createNewException",
      "type": "function",
      "line": 433,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "addWeekRange",
      "type": "function",
      "line": 438,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "removeWeek",
      "type": "function",
      "line": 449,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "User",
      "type": "type",
      "line": 454,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "Booking",
      "type": "type",
      "line": 492,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "fetchBookings",
      "type": "function",
      "line": 572,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "searchBookings",
      "type": "function",
      "line": 631,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "openBookingModal",
      "type": "function",
      "line": 691,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "searchUsers",
      "type": "function",
      "line": 784,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "openUserModal",
      "type": "function",
      "line": 809,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "weekdayLabel",
      "type": "function",
      "line": 822,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "isoDateOf",
      "type": "function",
      "line": 826,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "addWeeksToException",
      "type": "function",
      "line": 830,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "Service",
      "type": "type",
      "line": 847,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "fetchServices",
      "type": "function",
      "line": 867,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "toggleService",
      "type": "function",
      "line": 896,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "deleteService",
      "type": "function",
      "line": 923,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "validatePrice",
      "type": "function",
      "line": 989,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "validateDuration",
      "type": "function",
      "line": 1014,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "validateName",
      "type": "function",
      "line": 1038,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "updateAllErrors",
      "type": "function",
      "line": 1046,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "validateNameField",
      "type": "function",
      "line": 1063,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "validatePriceField",
      "type": "function",
      "line": 1067,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "validateDurationField",
      "type": "function",
      "line": 1071,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "validatePatchTestField",
      "type": "function",
      "line": 1078,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "validateMinimumAgeField",
      "type": "function",
      "line": 1085,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "createService",
      "type": "function",
      "line": 1093,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "resetServiceForm",
      "type": "function",
      "line": 1159,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "openServiceModal",
      "type": "function",
      "line": 1177,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "calculateHours",
      "type": "function",
      "line": 1183,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/admin/+page.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 4,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 7,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_3",
      "type": "code_block",
      "line": 8,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_4",
      "type": "code_block",
      "line": 10,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_5",
      "type": "code_block",
      "line": 12,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_6",
      "type": "code_block",
      "line": 14,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_7",
      "type": "code_block",
      "line": 15,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_8",
      "type": "code_block",
      "line": 18,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_9",
      "type": "code_block",
      "line": 26,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_10",
      "type": "code_block",
      "line": 27,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_11",
      "type": "code_block",
      "line": 28,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_12",
      "type": "code_block",
      "line": 32,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_13",
      "type": "code_block",
      "line": 39,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_14",
      "type": "code_block",
      "line": 40,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_15",
      "type": "code_block",
      "line": 41,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_16",
      "type": "code_block",
      "line": 42,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/routes/api/[...path]/+server.ts",
      "name": "chunk_17",
      "type": "code_block",
      "line": 43,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 5,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 7,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_3",
      "type": "code_block",
      "line": 13,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_4",
      "type": "code_block",
      "line": 26,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_5",
      "type": "code_block",
      "line": 31,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_6",
      "type": "code_block",
      "line": 32,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_7",
      "type": "code_block",
      "line": 37,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_8",
      "type": "code_block",
      "line": 41,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_9",
      "type": "code_block",
      "line": 45,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_10",
      "type": "code_block",
      "line": 49,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_11",
      "type": "code_block",
      "line": 53,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_12",
      "type": "code_block",
      "line": 58,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_13",
      "type": "code_block",
      "line": 59,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_14",
      "type": "code_block",
      "line": 60,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_15",
      "type": "code_block",
      "line": 61,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_16",
      "type": "code_block",
      "line": 62,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_17",
      "type": "code_block",
      "line": 64,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_18",
      "type": "code_block",
      "line": 65,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_19",
      "type": "code_block",
      "line": 73,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_20",
      "type": "code_block",
      "line": 80,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_21",
      "type": "code_block",
      "line": 81,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_22",
      "type": "code_block",
      "line": 82,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_23",
      "type": "code_block",
      "line": 83,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_24",
      "type": "code_block",
      "line": 85,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_25",
      "type": "code_block",
      "line": 91,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_26",
      "type": "code_block",
      "line": 95,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_27",
      "type": "code_block",
      "line": 96,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_28",
      "type": "code_block",
      "line": 98,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_29",
      "type": "code_block",
      "line": 102,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_30",
      "type": "code_block",
      "line": 103,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_31",
      "type": "code_block",
      "line": 104,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_32",
      "type": "code_block",
      "line": 105,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_33",
      "type": "code_block",
      "line": 116,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_34",
      "type": "code_block",
      "line": 119,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_35",
      "type": "code_block",
      "line": 120,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_36",
      "type": "code_block",
      "line": 121,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_37",
      "type": "code_block",
      "line": 126,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_38",
      "type": "code_block",
      "line": 130,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_39",
      "type": "code_block",
      "line": 132,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_40",
      "type": "code_block",
      "line": 138,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_41",
      "type": "code_block",
      "line": 139,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_42",
      "type": "code_block",
      "line": 145,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_43",
      "type": "code_block",
      "line": 148,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_44",
      "type": "code_block",
      "line": 153,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_45",
      "type": "code_block",
      "line": 156,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_46",
      "type": "code_block",
      "line": 160,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_47",
      "type": "code_block",
      "line": 164,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_48",
      "type": "code_block",
      "line": 168,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_49",
      "type": "code_block",
      "line": 169,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_50",
      "type": "code_block",
      "line": 172,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_51",
      "type": "code_block",
      "line": 173,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_52",
      "type": "code_block",
      "line": 178,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_53",
      "type": "code_block",
      "line": 179,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_54",
      "type": "code_block",
      "line": 180,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_55",
      "type": "code_block",
      "line": 181,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_56",
      "type": "code_block",
      "line": 182,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_57",
      "type": "code_block",
      "line": 184,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_58",
      "type": "code_block",
      "line": 189,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_59",
      "type": "code_block",
      "line": 190,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_60",
      "type": "code_block",
      "line": 192,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_61",
      "type": "code_block",
      "line": 195,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_62",
      "type": "code_block",
      "line": 201,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_63",
      "type": "code_block",
      "line": 202,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/stores/auth.svelte.ts",
      "name": "chunk_64",
      "type": "code_block",
      "line": 207,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/PortfolioCarousel.svelte",
      "name": "style_block_1",
      "type": "style",
      "line": 60,
      "language": "css",
      "block_type": "style"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/PortfolioCarousel.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/ContactCard.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/RequiredLabel.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/NavBar.svelte",
      "name": "toggleMenu",
      "type": "function",
      "line": 19,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/NavBar.svelte",
      "name": "canShow",
      "type": "function",
      "line": 29,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/NavBar.svelte",
      "name": "style_block_1",
      "type": "style",
      "line": 148,
      "language": "css",
      "block_type": "style"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/NavBar.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/layout/Calendar.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/file-drop-zone.svelte",
      "name": "handleDrop",
      "type": "function",
      "line": 7,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/file-drop-zone.svelte",
      "name": "handleDragOver",
      "type": "function",
      "line": 16,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/file-drop-zone.svelte",
      "name": "handleDragLeave",
      "type": "function",
      "line": 21,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/file-drop-zone.svelte",
      "name": "handleFileSelect",
      "type": "function",
      "line": 27,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/file-drop-zone.svelte",
      "name": "openFileSelect",
      "type": "function",
      "line": 38,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/file-drop-zone.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/separator/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/separator/index.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 3,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/separator/index.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 5,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/separator/separator.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-cell.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-months.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-grid.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-month-select.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-year-select.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-next-button.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-header.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-head-cell.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/index.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 20,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/index.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 38,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-grid-head.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-caption.svelte",
      "name": "formatYear",
      "type": "function",
      "line": 30,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-caption.svelte",
      "name": "formatMonth",
      "type": "function",
      "line": 36,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-caption.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-heading.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-prev-button.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-nav.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-day.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-grid-body.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-grid-row.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/calendar/calendar-month.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/card.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/card-description.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/card-footer.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/index.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 9,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/index.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 17,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/card-action.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/card-content.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/card-header.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/card/card-title.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/checkbox/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/checkbox/index.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 2,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/checkbox/index.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 4,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/checkbox/checkbox.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table-header.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table-row.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table-footer.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/index.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 10,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/index.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 19,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table-cell.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table-head.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table-caption.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/table/table-body.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/textarea/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/textarea/index.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 3,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/textarea/index.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 5,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/textarea/textarea.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/index.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 12,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/index.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 13,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/index.ts",
      "name": "chunk_3",
      "type": "code_block",
      "line": 15,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/index.ts",
      "name": "chunk_4",
      "type": "code_block",
      "line": 27,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/alert-dialog/alert-dialog-trigger.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-title.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-overlay.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-description.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-trigger.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-header.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/index.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 12,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/index.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 13,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/index.ts",
      "name": "chunk_3",
      "type": "code_block",
      "line": 15,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/index.ts",
      "name": "chunk_4",
      "type": "code_block",
      "line": 26,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-footer.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-content.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/dialog/dialog-close.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-group.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-trigger.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-separator.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-label.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/index.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 13,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/index.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 15,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/index.ts",
      "name": "chunk_3",
      "type": "code_block",
      "line": 26,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-item.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-content.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-scroll-down-button.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-scroll-up-button.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/select/select-group-heading.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-legend.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-label.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-element-field.svelte",
      "name": "script_chunk",
      "type": "script",
      "line": 1,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-element-field.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-description.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-fieldset.svelte",
      "name": "script_chunk",
      "type": "script",
      "line": 1,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-fieldset.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/index.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 11,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/index.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 13,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/index.ts",
      "name": "chunk_3",
      "type": "code_block",
      "line": 23,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-field-errors.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-field.svelte",
      "name": "script_chunk",
      "type": "script",
      "line": 1,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-field.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/form/form-button.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/input/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/input/index.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 3,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/input/index.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 5,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/input/input.svelte",
      "name": "InputType",
      "type": "type",
      "line": 5,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/input/input.svelte",
      "name": "Props",
      "type": "type",
      "line": 7,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/input/input.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/label/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/label/index.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 3,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/label/index.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 5,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/label/label.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/sonner/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/sonner/sonner.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/skeleton/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/skeleton/index.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 3,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/skeleton/index.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 5,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/skeleton/skeleton.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/button/button.svelte",
      "name": "ButtonVariant",
      "type": "type",
      "line": 34,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/button/button.svelte",
      "name": "ButtonSize",
      "type": "type",
      "line": 35,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/button/button.svelte",
      "name": "ButtonProps",
      "type": "type",
      "line": 37,
      "language": "typescript",
      "block_type": "script"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/button/button.svelte",
      "name": "markup",
      "type": "markup",
      "line": 1,
      "language": "svelte",
      "block_type": "markup"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/button/index.ts",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/button/index.ts",
      "name": "chunk_1",
      "type": "code_block",
      "line": 8,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/frontend/src/lib/components/ui/button/index.ts",
      "name": "chunk_2",
      "type": "code_block",
      "line": 11,
      "language": "typescript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/mw/auth.go",
      "name": "contextKey",
      "type": "type",
      "receiver": "",
      "line": 11,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/mw/auth.go",
      "name": "UserIDKey",
      "type": "var",
      "receiver": "",
      "line": 14,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/mw/auth.go",
      "name": "UserRoleKey",
      "type": "var",
      "receiver": "",
      "line": 15,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/mw/auth.go",
      "name": "RequireAuth",
      "type": "func",
      "receiver": "",
      "line": 19,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/mw/auth.go",
      "name": "RequireRole",
      "type": "func",
      "receiver": "",
      "line": 44,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/mw/auth.go",
      "name": "RequireVerified",
      "type": "func",
      "receiver": "",
      "line": 73,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/mw/auth.go",
      "name": "RequireAdmin",
      "type": "func",
      "receiver": "",
      "line": 78,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/mw/auth.go",
      "name": "GetUserID",
      "type": "func",
      "receiver": "",
      "line": 83,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/mw/auth.go",
      "name": "GetUserRole",
      "type": "func",
      "receiver": "",
      "line": 88,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/db/db.go",
      "name": "DB",
      "type": "var",
      "receiver": "",
      "line": 15,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/db/db.go",
      "name": "Connect",
      "type": "func",
      "receiver": "",
      "line": 17,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/db/db.go",
      "name": "testDB",
      "type": "func",
      "receiver": "",
      "line": 42,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/db/db.go",
      "name": "getEnv",
      "type": "func",
      "receiver": "",
      "line": 59,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/db/db_dev.go",
      "name": "DB",
      "type": "var",
      "receiver": "",
      "line": 15,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/db/db_dev.go",
      "name": "Connect",
      "type": "func",
      "receiver": "",
      "line": 17,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/db/db_dev.go",
      "name": "testDB",
      "type": "func",
      "receiver": "",
      "line": 41,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/db/db_dev.go",
      "name": "getEnv",
      "type": "func",
      "receiver": "",
      "line": 58,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/auth/password.go",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/auth/jwt.go",
      "name": "TokenAuth",
      "type": "var",
      "receiver": "",
      "line": 11,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/auth/jwt.go",
      "name": "AuthResponse",
      "type": "struct",
      "receiver": "",
      "line": 14,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/auth/jwt.go",
      "name": "InitJWT",
      "type": "func",
      "receiver": "",
      "line": 18,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/auth/jwt.go",
      "name": "GenerateToken",
      "type": "func",
      "receiver": "",
      "line": 23,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/auth/jwt.go",
      "name": "VerifyToken",
      "type": "func",
      "receiver": "",
      "line": 33,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/services/services.go",
      "name": "Service",
      "type": "struct",
      "receiver": "",
      "line": 15,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/services/services.go",
      "name": "ServiceResponse",
      "type": "struct",
      "receiver": "",
      "line": 28,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/services/services.go",
      "name": "CreateServiceRequest",
      "type": "struct",
      "receiver": "",
      "line": 39,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/services/services.go",
      "name": "ToggleService",
      "type": "func",
      "receiver": "",
      "line": 49,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/services/services.go",
      "name": "CreateServiceHandler",
      "type": "func",
      "receiver": "",
      "line": 77,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/services/services.go",
      "name": "DeleteServiceHandler",
      "type": "func",
      "receiver": "",
      "line": 172,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/services/services.go",
      "name": "ServicesHandler",
      "type": "func",
      "receiver": "",
      "line": 200,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/services/services.go",
      "name": "AllServicesHandler",
      "type": "func",
      "receiver": "",
      "line": 261,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/user/profile.go",
      "name": "titleCaser",
      "type": "var",
      "receiver": "",
      "line": 20,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/user/profile.go",
      "name": "UserProfile",
      "type": "struct",
      "receiver": "",
      "line": 22,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/user/profile.go",
      "name": "UpdateProfileRequest",
      "type": "struct",
      "receiver": "",
      "line": 35,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/user/profile.go",
      "name": "GetProfileHandler",
      "type": "func",
      "receiver": "",
      "line": 42,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/user/profile.go",
      "name": "updateCardDAV",
      "type": "func",
      "receiver": "",
      "line": 74,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/user/profile.go",
      "name": "UpdateProfileHandler",
      "type": "func",
      "receiver": "",
      "line": 118,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/user/loyalty.go",
      "name": "LoyaltyResponse",
      "type": "struct",
      "receiver": "",
      "line": 11,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/user/loyalty.go",
      "name": "GetLoyaltyHandler",
      "type": "func",
      "receiver": "",
      "line": 17,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/user/account.go",
      "name": "DeleteAccountHandler",
      "type": "func",
      "receiver": "",
      "line": 8,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "londonLocation",
      "type": "var",
      "receiver": "",
      "line": 18,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "Booking",
      "type": "struct",
      "receiver": "",
      "line": 27,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "BookingService",
      "type": "struct",
      "receiver": "",
      "line": 47,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "Payment",
      "type": "struct",
      "receiver": "",
      "line": 61,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "CreateBookingRequest",
      "type": "struct",
      "receiver": "",
      "line": 80,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "EditBookingRequest",
      "type": "struct",
      "receiver": "",
      "line": 87,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "ProgressBookingRequest",
      "type": "struct",
      "receiver": "",
      "line": 92,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "ConfirmBookingRequest",
      "type": "struct",
      "receiver": "",
      "line": 97,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "ServiceOverride",
      "type": "struct",
      "receiver": "",
      "line": 103,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "DeleteBookingRequest",
      "type": "struct",
      "receiver": "",
      "line": 110,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "AdminUserSummary",
      "type": "struct",
      "receiver": "",
      "line": 115,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "AdminBookingSummary",
      "type": "struct",
      "receiver": "",
      "line": 122,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "UserSummary",
      "type": "struct",
      "receiver": "",
      "line": 133,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "BookingServiceDetail",
      "type": "struct",
      "receiver": "",
      "line": 150,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "GetAllBookingsRequest",
      "type": "struct",
      "receiver": "",
      "line": 163,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "BookingListResponse",
      "type": "struct",
      "receiver": "",
      "line": 172,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "SearchBookingsRequest",
      "type": "struct",
      "receiver": "",
      "line": 180,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "SearchBookingsResponse",
      "type": "struct",
      "receiver": "",
      "line": 187,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "UserBookingDetail",
      "type": "struct",
      "receiver": "",
      "line": 195,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "AdminBookingDetail",
      "type": "struct",
      "receiver": "",
      "line": 204,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "parseGetAllBookingsRequest",
      "type": "func",
      "receiver": "",
      "line": 214,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "GetAllUserBookingsHandler",
      "type": "func",
      "receiver": "",
      "line": 248,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "GetAllAdminBookingsHandler",
      "type": "func",
      "receiver": "",
      "line": 363,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "GetAllBookingsByUserHandler",
      "type": "func",
      "receiver": "",
      "line": 564,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "GetAdminBookingHandler",
      "type": "func",
      "receiver": "",
      "line": 696,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "SearchAdminBookingsHandler",
      "type": "func",
      "receiver": "",
      "line": 867,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "CreateBookingHandler",
      "type": "func",
      "receiver": "",
      "line": 1067,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "EditBookingHandler",
      "type": "func",
      "receiver": "",
      "line": 1172,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "ProgressBookingHandler",
      "type": "func",
      "receiver": "",
      "line": 1250,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "ConfirmBookingHandler",
      "type": "func",
      "receiver": "",
      "line": 1320,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "DeleteBookingHandler",
      "type": "func",
      "receiver": "",
      "line": 1456,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/bookings/bookings.go",
      "name": "GetBookingHandler",
      "type": "func",
      "receiver": "",
      "line": 1547,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/auth/social.go",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go",
      "name": "titleCaser",
      "type": "var",
      "receiver": "",
      "line": 26,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go",
      "name": "loginStateMu",
      "type": "var",
      "receiver": "",
      "line": 31,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go",
      "name": "loginInProgress",
      "type": "var",
      "receiver": "",
      "line": 32,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go",
      "name": "loginAttempts",
      "type": "var",
      "receiver": "",
      "line": 33,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go",
      "name": "init",
      "type": "func",
      "receiver": "",
      "line": 36,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go",
      "name": "RegisterRequest",
      "type": "struct",
      "receiver": "",
      "line": 55,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go",
      "name": "LoginRequest",
      "type": "struct",
      "receiver": "",
      "line": 65,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go",
      "name": "RegisterHandler",
      "type": "func",
      "receiver": "",
      "line": 71,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go",
      "name": "ValidateUKPhoneNumber",
      "type": "func",
      "receiver": "",
      "line": 216,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go",
      "name": "LoginHandler",
      "type": "func",
      "receiver": "",
      "line": 236,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/auth/local.go",
      "name": "RefreshTokenHandler",
      "type": "func",
      "receiver": "",
      "line": 324,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/exceptional-hours.go",
      "name": "ExceptionalHours",
      "type": "struct",
      "receiver": "",
      "line": 12,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/exceptional-hours.go",
      "name": "ExceptionalGroup",
      "type": "struct",
      "receiver": "",
      "line": 21,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/exceptional-hours.go",
      "name": "ListExceptionalGroups",
      "type": "func",
      "receiver": "",
      "line": 30,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/exceptional-hours.go",
      "name": "CreateExceptionalGroup",
      "type": "func",
      "receiver": "",
      "line": 118,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/exceptional-hours.go",
      "name": "DeleteExceptionalGroup",
      "type": "func",
      "receiver": "",
      "line": 221,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/exceptional-hours.go",
      "name": "UpdateExceptionalApplications",
      "type": "func",
      "receiver": "",
      "line": 255,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go",
      "name": "DefaultHours",
      "type": "struct",
      "receiver": "",
      "line": 13,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go",
      "name": "DayWorkingHours",
      "type": "struct",
      "receiver": "",
      "line": 20,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go",
      "name": "GetDefaultHours",
      "type": "func",
      "receiver": "",
      "line": 30,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go",
      "name": "UpdateDefaultHours",
      "type": "func",
      "receiver": "",
      "line": 55,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go",
      "name": "GetWorkingHours",
      "type": "func",
      "receiver": "",
      "line": 90,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go",
      "name": "sqlIn",
      "type": "func",
      "receiver": "",
      "line": 225,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go",
      "name": "TimeSlot",
      "type": "struct",
      "receiver": "",
      "line": 240,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go",
      "name": "DayAvailableHours",
      "type": "struct",
      "receiver": "",
      "line": 245,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go",
      "name": "GetAvailableHours",
      "type": "func",
      "receiver": "",
      "line": 254,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/scheduling/default-hours.go",
      "name": "subtractTimeSlots",
      "type": "func",
      "receiver": "",
      "line": 427,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/admin/analytics.go",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/admin/bookings.go",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/handlers/admin/users.go",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/service_dev.go",
      "name": "Service",
      "type": "var",
      "receiver": "",
      "line": 15,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/service_dev.go",
      "name": "init",
      "type": "func",
      "receiver": "",
      "line": 17,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/service_dev.go",
      "name": "connect",
      "type": "func",
      "receiver": "",
      "line": 23,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/service_dev.go",
      "name": "testDB",
      "type": "func",
      "receiver": "",
      "line": 39,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/service_dev.go",
      "name": "getEnv",
      "type": "func",
      "receiver": "",
      "line": 48,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/types.go",
      "name": "Calendar",
      "type": "struct",
      "receiver": "",
      "line": 12,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/types.go",
      "name": "CalendarEvent",
      "type": "struct",
      "receiver": "",
      "line": 23,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/types.go",
      "name": "EventInput",
      "type": "struct",
      "receiver": "",
      "line": 38,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/types.go",
      "name": "AddressBook",
      "type": "struct",
      "receiver": "",
      "line": 52,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/types.go",
      "name": "Contact",
      "type": "struct",
      "receiver": "",
      "line": 61,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/types.go",
      "name": "ContactInput",
      "type": "struct",
      "receiver": "",
      "line": 71,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/types.go",
      "name": "GenerateICalEvent",
      "type": "func",
      "receiver": "",
      "line": 85,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/types.go",
      "name": "GenerateVCard",
      "type": "func",
      "receiver": "",
      "line": 147,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/types.go",
      "name": "escapeICalText",
      "type": "func",
      "receiver": "",
      "line": 169,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/types.go",
      "name": "replaceAll",
      "type": "func",
      "receiver": "",
      "line": 177,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/service_prod.go",
      "name": "Service",
      "type": "var",
      "receiver": "",
      "line": 15,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/service_prod.go",
      "name": "init",
      "type": "func",
      "receiver": "",
      "line": 17,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/service_prod.go",
      "name": "connect",
      "type": "func",
      "receiver": "",
      "line": 23,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/service_prod.go",
      "name": "testDB",
      "type": "func",
      "receiver": "",
      "line": 40,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/service_prod.go",
      "name": "getEnv",
      "type": "func",
      "receiver": "",
      "line": 49,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "BaseService",
      "type": "struct",
      "receiver": "",
      "line": 13,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "newBaseService",
      "type": "func",
      "receiver": "",
      "line": 18,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "ListEventsForMonth",
      "type": "method",
      "receiver": "*BaseService",
      "line": 26,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "ListEventsBetween",
      "type": "method",
      "receiver": "*BaseService",
      "line": 40,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "ListEventsTomorrow",
      "type": "method",
      "receiver": "*BaseService",
      "line": 51,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "ListEventsThisWeek",
      "type": "method",
      "receiver": "*BaseService",
      "line": 58,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "GetContactByURI",
      "type": "method",
      "receiver": "*BaseService",
      "line": 74,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "ListAllContacts",
      "type": "method",
      "receiver": "*BaseService",
      "line": 90,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "ListRecentContacts",
      "type": "method",
      "receiver": "*BaseService",
      "line": 109,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "queryEventsWithContacts",
      "type": "method",
      "receiver": "*BaseService",
      "line": 133,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "extractContactURIsFromICalendar",
      "type": "func",
      "receiver": "",
      "line": 155,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "CreateContact",
      "type": "method",
      "receiver": "*BaseService",
      "line": 170,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "UpdateContact",
      "type": "method",
      "receiver": "*BaseService",
      "line": 191,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "DeleteContact",
      "type": "method",
      "receiver": "*BaseService",
      "line": 204,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "CreateEvent",
      "type": "method",
      "receiver": "*BaseService",
      "line": 211,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "UpdateEvent",
      "type": "method",
      "receiver": "*BaseService",
      "line": 237,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "DeleteEvent",
      "type": "method",
      "receiver": "*BaseService",
      "line": 256,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/backend/internal/dav/shared.go",
      "name": "ListEventsForContact",
      "type": "method",
      "receiver": "*BaseService",
      "line": 263,
      "language": "go"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-kanban/main.js",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js",
      "name": "chunk_0",
      "type": "code_block",
      "line": 1,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js",
      "name": "chunk_1",
      "type": "code_block",
      "line": 2,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js",
      "name": "chunk_2",
      "type": "code_block",
      "line": 3,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js",
      "name": "chunk_3",
      "type": "code_block",
      "line": 4,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js",
      "name": "chunk_4",
      "type": "code_block",
      "line": 5,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js",
      "name": "chunk_5",
      "type": "code_block",
      "line": 6,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js",
      "name": "chunk_6",
      "type": "code_block",
      "line": 7,
      "language": "javascript"
    },
    {
      "file": "/home/popertots/ragmcp/Crussell/obsidian/Crussell/.obsidian/plugins/obsidian-excalidraw-plugin/main.js",
      "name": "chunk_7",
      "type": "code_block",
      "line": 8,
      "language": "javascript"
    }
  ]
}