~ianmjones/snippetexpander

de824afa157db95553f4ec15e3276878a5cba39e — Ian M. Jones 1 year, 3 months ago bf94155
Add custom shortcut add/remove for search and paste

Implements: https://todo.sr.ht/~ianmjones/snippetpixie/48
10 files changed, 450 insertions(+), 19 deletions(-)

M cmd/snippetpixiegui/app.go
D cmd/snippetpixiegui/frontend/dist/assets/en-GB-782433d5.js
A cmd/snippetpixiegui/frontend/dist/assets/en-GB-d3e97a3e.js
A cmd/snippetpixiegui/frontend/dist/assets/index-288ebb61.js
D cmd/snippetpixiegui/frontend/dist/assets/index-95462b26.js
R cmd/snippetpixiegui/frontend/dist/assets/{index-b94e7b91.css => index-e2d949f4.css}
M cmd/snippetpixiegui/frontend/dist/index.html
M cmd/snippetpixiegui/frontend/src/components/SettingsScreen.svelte
M cmd/snippetpixiegui/i18n/en-GB.json
M cmd/snippetpixiegui/main.go
M cmd/snippetpixiegui/app.go => cmd/snippetpixiegui/app.go +313 -0
@@ 6,6 6,7 @@ import (
	"fmt"
	"os"
	"os/exec"
	"strings"
	"time"

	"git.sr.ht/~ianmjones/snippetpixie/internal/export"


@@ 312,3 313,315 @@ func (a *App) StartDaemon() error {
func (a *App) GetVersion() string {
	return version
}

// gsettingsInstalled or not?
func gsettingsInstalled() bool {
	_, err := exec.LookPath("gsettings")
	if err != nil {
		return false
	}

	return true
}

// CustomShortcutsEnabled or not?
func (a *App) CustomShortcutsEnabled() bool {
	// TODO: Extend tests for other systems such as KDE if possible?
	if !gsettingsInstalled() {
		return false
	}

	cmd := `gsettings list-relocatable-schemas | grep 'org.gnome.settings-daemon.plugins.media-keys.custom-keybinding'`
	out, err := exec.Command("bash", "-c", cmd).Output()
	if err != nil {
		return false
	}

	return len(out) > 0
}

// countCustomShortcuts that have been set.
func (a *App) countCustomShortcuts() int {
	if !a.CustomShortcutsEnabled() {
		return 0
	}

	// Parse serialized GVariant output and count entries.
	// gsettings call returns something like following for 0, 1, or more entries:
	// @as []
	// ['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']
	// ['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/ ... /custom1/']
	cmd := `gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings | sed 's/^.*\[//' | tr -d [\]] | tr ',' ' ' | xargs | wc -w`
	out, err := exec.Command("bash", "-c", cmd).Output()
	if err != nil {
		return 0
	}

	var count int
	_, err = fmt.Sscan(string(out[:]), &count)
	if err != nil {
		return 0
	}

	return count
}

// getCustomShortcutKey to be used, and whether it already exists.
// If prevBinding is supplied, existing entry must exist for update, negates create flag.
func (a *App) getCustomShortcutKey(command string, binding string, create bool, prevBinding string) (string, bool, error) {
	if !a.CustomShortcutsEnabled() {
		return "", false, errors.New("Custom shortcuts not enabled.")
	}

	if a.countCustomShortcuts() == 0 {
		if create && len(prevBinding) == 0 {
			return "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/", false, nil
		} else {
			return "", false, errors.New("No custom shortcuts defined yet.")
		}
	}

	// Parse serialized GVariant output and get the keys.
	// gsettings call returns something like following for 0, 1, or more entries:
	// @as []
	// ['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']
	// ['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/ ... /custom1/']
	cmd := `gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings | sed 's/^.*\[//' | tr -d [\]] | tr ',' ' ' | xargs | tr ' ' '\n' | sort -n`
	out, err := exec.Command("bash", "-c", cmd).Output()
	if err != nil {
		return "", false, err
	}

	entries := strings.Split(strings.TrimSpace(string(out[:])), "\n")

	newIndex := 0

	for _, entry := range entries {
		_, currBinding, currCommand, err := getCustomShortcutDetails(entry)
		if err != nil {
			return "", false, err
		}

		// If prevBinding given, we're looking for a specific entry to update.
		if len(prevBinding) > 0 && prevBinding == currBinding && command == currCommand {
			return entry, true, nil
		}

		if len(prevBinding) == 0 {
			// Found our existing entry?
			if len(binding) > 0 && binding == currBinding && command == currCommand {
				return entry, true, nil
			}

			if len(binding) > 0 && binding == currBinding {
				return "", false, errors.New("Binding for custom shortcut already in use for another command.")
			}

			// Found our existing entry by command, and we're not currently bothered about the binding.
			if command == currCommand {
				return entry, true, nil
			}

			indexString := strings.TrimSuffix(strings.TrimPrefix(entry, "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom"), "/")

			var currIndex int
			_, err = fmt.Sscan(indexString, &currIndex)
			if err != nil {
				return "", false, err
			}

			// If there's an entry that we can't use that matches our proposed index, bump the proposed index up one.
			if newIndex == currIndex {
				newIndex++
			}
		}
	}

	// Didn't find existing entry, so return new entry key we can use.
	if len(prevBinding) == 0 && create {
		return fmt.Sprintf("/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom%d/", newIndex), false, nil
	}

	return "", false, errors.New("Could not find existing custom shortcut.")
}

// getCustomShortcutDetails for given key.
func getCustomShortcutDetails(key string) (name string, binding string, command string, err error) {
	cmd := fmt.Sprintf("gsettings get org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:%s %s", key, "name")
	out, err := exec.Command("bash", "-c", cmd).Output()
	if err != nil {
		return "", "", "", err
	}

	name = strings.Trim(strings.TrimSpace(string(out[:])), "'")

	cmd = fmt.Sprintf("gsettings get org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:%s %s", key, "binding")
	out, err = exec.Command("bash", "-c", cmd).Output()
	if err != nil {
		return "", "", "", err
	}

	binding = strings.Trim(strings.TrimSpace(string(out[:])), "'")

	cmd = fmt.Sprintf("gsettings get org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:%s %s", key, "command")
	out, err = exec.Command("bash", "-c", cmd).Output()
	if err != nil {
		return "", "", "", err
	}

	command = strings.Trim(strings.TrimSpace(string(out[:])), "'")

	return name, binding, command, nil
}

// SaveCustomShortcut for name, binding and command.
func (a *App) SaveCustomShortcut(name string, binding string, command string, prevBinding string) error {
	key, exists, err := a.getCustomShortcutKey(command, binding, true, prevBinding)
	if err != nil {
		return err
	}

	cmd := fmt.Sprintf("gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:%s %s '%s'", key, "name", name)
	_, err = exec.Command("bash", "-c", cmd).Output()
	if err != nil {
		return err
	}

	cmd = fmt.Sprintf("gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:%s %s '%s'", key, "binding", binding)
	_, err = exec.Command("bash", "-c", cmd).Output()
	if err != nil {
		return err
	}

	cmd = fmt.Sprintf("gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:%s %s '%s'", key, "command", command)
	_, err = exec.Command("bash", "-c", cmd).Output()
	if err != nil {
		return err
	}

	return a.saveSchemaWithKey(key, exists)
}

// saveSchemaWithKey whether it is an update or addition.
func (a *App) saveSchemaWithKey(key string, update bool) error {
	var entries []string

	if a.countCustomShortcuts() > 0 {
		// Parse serialized GVariant output and get the keys.
		// gsettings call returns something like following for 0, 1, or more entries:
		// @as []
		// ['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']
		// ['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/ ... /custom1/']
		cmd := `gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings | sed 's/^.*\[//' | tr -d [\]] | tr ',' ' ' | xargs | tr ' ' '\n' | sort -n`
		out, err := exec.Command("bash", "-c", cmd).Output()
		if err != nil {
			return err
		}

		entries = strings.Split(strings.TrimSpace(string(out[:])), "\n")
	}

	if !update {
		entries = append(entries, key)
	}

	keys := strings.Join(entries, `','`)

	cmd := fmt.Sprintf(`gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['%s']"`, keys)
	_, err := exec.Command("bash", "-c", cmd).Output()
	if err != nil {
		return err
	}

	return nil
}

// GetCustomShortcutBinding for given command.
func (a *App) GetCustomShortcutBinding(command string) (binding string, err error) {
	if a.countCustomShortcuts() == 0 {
		return "", nil
	}

	key, _, err := a.getCustomShortcutKey(command, "", false, "")
	if err != nil {
		return "", nil
	}

	_, binding, _, err = getCustomShortcutDetails(key)
	if err != nil {
		return "", err
	}

	return binding, nil
}

// DeleteCustomShortcut for command and binding.
func (a *App) DeleteCustomShortcut(command string, binding string) error {
	key, _, err := a.getCustomShortcutKey(command, binding, false, "")
	if err != nil {
		return err
	}

	/*
		cmd := fmt.Sprintf("gsettings reset org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:%s %s", key, "name")
		_, err = exec.Command("bash", "-c", cmd).Output()
		if err != nil {
			return err
		}

		cmd = fmt.Sprintf("gsettings reset org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:%s %s", key, "binding")
		_, err = exec.Command("bash", "-c", cmd).Output()
		if err != nil {
			return err
		}

		cmd = fmt.Sprintf("gsettings reset org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:%s %s", key, "command")
		_, err = exec.Command("bash", "-c", cmd).Output()
		if err != nil {
			return err
		}
	*/

	return a.deleteKeyFromSchema(key)
}

// deleteKeyFromSchema
func (a *App) deleteKeyFromSchema(key string) error {
	var entries []string
	var newEntries []string

	// Nothing to do.
	if a.countCustomShortcuts() == 0 {
		return nil
	}

	// Parse serialized GVariant output and get the keys.
	// gsettings call returns something like following for 0, 1, or more entries:
	// @as []
	// ['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']
	// ['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/ ... /custom1/']
	cmd := `gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings | sed 's/^.*\[//' | tr -d [\]] | tr ',' ' ' | xargs | tr ' ' '\n' | sort -n`
	out, err := exec.Command("bash", "-c", cmd).Output()
	if err != nil {
		return err
	}

	entries = strings.Split(strings.TrimSpace(string(out[:])), "\n")

	// Copy all but given key to new entries so key is effectively removed.
	for _, entry := range entries {
		if entry != key {
			newEntries = append(newEntries, entry)
		}
	}

	keys := strings.Join(newEntries, `','`)

	cmd = fmt.Sprintf(`gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['%s']"`, keys)
	_, err = exec.Command("bash", "-c", cmd).Output()
	if err != nil {
		return err
	}

	return nil
}

D cmd/snippetpixiegui/frontend/dist/assets/en-GB-782433d5.js => cmd/snippetpixiegui/frontend/dist/assets/en-GB-782433d5.js +0 -1
@@ 1,1 0,0 @@
const t={title:"Abbreviation",empty:"Please enter an Abbreviation",exists:"That Abbreviation already exists"},e={title:"Body"},n={title:"Add Snippet",error_title:"Error adding snippet"},i={title:"Edit Snippet",error_title:"Error editing snippet",id_not_supplied:"A Snippet ID was not specified for edit.",snippet_not_found:"Could not find Snippet for edit."},o={title:"Remove Snippet",error_title:"Error removing snippet"},s={title:"Import Snippets",new_only_title:"Import Snippets: Discarding Duplicates",update_title:"Import Snippets: Update Existing",error_title:"Error importing snippets"},p={title:"Export Snippets",error_title:"Error exporting snippets"},r={title:"Settings",import_export_title:"Import & Export",get_error_title:"Error getting settings",save_error_title:"Error saving settings",no_connection:"Settings can only be changed when the daemon is running.",autostart_title:"Auto Start",autostart:"Start daemon on login",autoexpand_title:"Auto Expand Snippets",autoexpand:"Auto expand snippets as they are typed",search_and_paste_title:"Search & Paste",focus_search:"Focus search box"},a="Could not connect to the snippetpixied daemon.",d={title:"No Snippets Found",description:"Please try entering a different search term."},l={cancel:"Cancel",save:"Save",remove:"Remove",back:"Back",about:"About"},c="Loading…",_="Search…",u="Clear",g={not_installed:"It does not look like the required snippetpixied daemon is installed.",installed:"It looks like snippetpixied is installed.",start:"Start it?",starting:"Starting snippetpixied…"},b={description:"Your little expandable text snippet helper",source:"Source",licence_title:"Licence",licence:"GNU General Public License Version 2 Plus (GPLv2+)",by:"By"},m={abbreviation:t,body:e,add_snippet:n,edit_snippet:i,remove_snippet:o,import_snippets:s,export_snippets:p,settings:r,no_connection:a,no_snippets_found:d,button:l,loading:c,search:_,clear:u,daemon:g,about:b};export{t as abbreviation,b as about,n as add_snippet,e as body,l as button,u as clear,g as daemon,m as default,i as edit_snippet,p as export_snippets,s as import_snippets,c as loading,a as no_connection,d as no_snippets_found,o as remove_snippet,_ as search,r as settings};

A cmd/snippetpixiegui/frontend/dist/assets/en-GB-d3e97a3e.js => cmd/snippetpixiegui/frontend/dist/assets/en-GB-d3e97a3e.js +1 -0
@@ 0,0 1,1 @@
const t={title:"Abbreviation",empty:"Please enter an Abbreviation",exists:"That Abbreviation already exists"},e={title:"Body"},o={title:"Add Snippet",error_title:"Error adding snippet"},n={title:"Edit Snippet",error_title:"Error editing snippet",id_not_supplied:"A Snippet ID was not specified for edit.",snippet_not_found:"Could not find Snippet for edit."},i={title:"Remove Snippet",error_title:"Error removing snippet"},s={title:"Import Snippets",new_only_title:"Import Snippets: Discarding Duplicates",update_title:"Import Snippets: Update Existing",error_title:"Error importing snippets"},r={title:"Export Snippets",error_title:"Error exporting snippets"},p={title:"Settings",import_export_title:"Import & Export",get_error_title:"Error getting settings",save_error_title:"Error saving settings",no_connection:"Settings can only be changed when the daemon is running.",autostart_title:"Auto Start",autostart:"Start daemon on login",autoexpand_title:"Auto Expand Snippets",autoexpand:"Auto expand snippets as they are typed",search_and_paste_title:"Search & Paste",focus_search:"Focus search box",custom_shortcuts_disabled:"Unable to get or set custom shortcut, please set it manually.",custom_shortcut:"Custom Shortcut",custom_shortcut_empty:"none",remove_custom_shortcut:"Remove custom shortcut",change_custom_shortcut_desc:"To change the custom shortcut, please use your system's settings application.",add_default_custom_shortcut:"Add default custom shortcut"},a="Could not connect to the snippetpixied daemon.",c={title:"No Snippets Found",description:"Please try entering a different search term."},d={cancel:"Cancel",save:"Save",remove:"Remove",back:"Back",about:"About"},l="Loading…",u="Search…",_="Clear",m={not_installed:"It does not look like the required snippetpixied daemon is installed.",installed:"It looks like snippetpixied is installed.",start:"Start it?",starting:"Starting snippetpixied…"},g={description:"Your little expandable text snippet helper",source:"Source",licence_title:"Licence",licence:"GNU General Public License Version 2 Plus (GPLv2+)",by:"By"},h={abbreviation:t,body:e,add_snippet:o,edit_snippet:n,remove_snippet:i,import_snippets:s,export_snippets:r,settings:p,no_connection:a,no_snippets_found:c,button:d,loading:l,search:u,clear:_,daemon:m,about:g};export{t as abbreviation,g as about,o as add_snippet,e as body,d as button,_ as clear,m as daemon,h as default,n as edit_snippet,r as export_snippets,s as import_snippets,l as loading,a as no_connection,c as no_snippets_found,i as remove_snippet,u as search,p as settings};

A cmd/snippetpixiegui/frontend/dist/assets/index-288ebb61.js => cmd/snippetpixiegui/frontend/dist/assets/index-288ebb61.js +5 -0
@@ 0,0 1,5 @@
var Di=Object.defineProperty;var Gi=(e,t,n)=>t in e?Di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ft=(e,t,n)=>(Gi(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();const $i="modulepreload",ji=function(e){return"/"+e},Ln={},Fi=function(t,n,i){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=ji(s),s in Ln)return;Ln[s]=!0;const o=s.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!i)for(let f=r.length-1;f>=0;f--){const p=r[f];if(p.href===s&&(!o||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${l}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":$i,o||(u.as="script",u.crossOrigin=""),u.href=s,document.head.appendChild(u),o)return new Promise((f,p)=>{u.addEventListener("load",f),u.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function G(){}function pn(e,t){for(const n in t)e[n]=t[n];return e}function oi(e){return e()}function Pn(){return Object.create(null)}function Ee(e){e.forEach(oi)}function Qe(e){return typeof e=="function"}function Z(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let bt;function zi(e,t){return e===t?!0:(bt||(bt=document.createElement("a")),bt.href=t,e===bt.href)}function Vi(e){return Object.keys(e).length===0}function mn(e,...t){if(e==null){for(const i of t)i(void 0);return G}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Nn(e){let t;return mn(e,n=>t=n)(),t}function ne(e,t,n){e.$$.on_destroy.push(mn(t,n))}function ht(e,t,n,i){if(e){const r=li(e,t,n,i);return e[0](r)}}function li(e,t,n,i){return e[1]&&i?pn(n.ctx.slice(),e[1](i(t))):n.ctx}function pt(e,t,n,i){if(e[2]&&i){const r=e[2](i(n));if(t.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(t.dirty.length,r.length);for(let l=0;l<o;l+=1)s[l]=t.dirty[l]|r[l];return s}return t.dirty|r}return t.dirty}function mt(e,t,n,i,r,s){if(r){const o=li(t,n,i,s);e.p(o,r)}}function dt(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let i=0;i<n;i++)t[i]=-1;return t}return-1}function Wi(e,t,n){return e.set(n),t}function dn(e){return e&&Qe(e.destroy)?e.destroy:G}function A(e,t){e.appendChild(t)}function g(e,t,n){e.insertBefore(t,n||null)}function _(e){e.parentNode&&e.parentNode.removeChild(e)}function Xi(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function L(e){return document.createElement(e)}function V(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function $(e){return document.createTextNode(e)}function R(){return $(" ")}function ye(){return $("")}function te(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function vt(e){return function(t){return t.preventDefault(),e.call(this,t)}}function c(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function qi(e){return Array.from(e.childNodes)}function z(e,t){t=""+t,e.data!==t&&(e.data=t)}function ze(e,t){e.value=t??""}function X(e,t,n){e.classList.toggle(t,!!n)}function Zi(e,t,{bubbles:n=!1,cancelable:i=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:i})}function Ve(e,t){return new e(t)}let at;function st(e){at=e}function Ct(){if(!at)throw new Error("Function called outside component initialization");return at}function Je(e){Ct().$$.on_mount.push(e)}function ai(e){Ct().$$.after_update.push(e)}function _n(e){Ct().$$.on_destroy.push(e)}function _t(){const e=Ct();return(t,n,{cancelable:i=!1}={})=>{const r=e.$$.callbacks[t];if(r){const s=Zi(t,n,{cancelable:i});return r.slice().forEach(o=>{o.call(e,s)}),!s.defaultPrevented}return!0}}function ut(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach(i=>i.call(this,t))}const Ue=[],ve=[];let De=[];const en=[],ui=Promise.resolve();let tn=!1;function fi(){tn||(tn=!0,ui.then(ci))}function gn(){return fi(),ui}function nn(e){De.push(e)}function Ge(e){en.push(e)}const zt=new Set;let xe=0;function ci(){if(xe!==0)return;const e=at;do{try{for(;xe<Ue.length;){const t=Ue[xe];xe++,st(t),Qi(t.$$)}}catch(t){throw Ue.length=0,xe=0,t}for(st(null),Ue.length=0,xe=0;ve.length;)ve.pop()();for(let t=0;t<De.length;t+=1){const n=De[t];zt.has(n)||(zt.add(n),n())}De.length=0}while(Ue.length);for(;en.length;)en.pop()();tn=!1,zt.clear(),st(e)}function Qi(e){if(e.fragment!==null){e.update(),Ee(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(nn)}}function Ji(e){const t=[],n=[];De.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),De=t}const yt=new Set;let Oe;function ue(){Oe={r:0,c:[],p:Oe}}function fe(){Oe.r||Ee(Oe.c),Oe=Oe.p}function w(e,t){e&&e.i&&(yt.delete(e),e.i(t))}function S(e,t,n,i){if(e&&e.o){if(yt.has(e))return;yt.add(e),Oe.c.push(()=>{yt.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function On(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Bt(e,t){const n={},i={},r={$$scope:1};let s=e.length;for(;s--;){const o=e[s],l=t[s];if(l){for(const a in o)a in l||(i[a]=1);for(const a in l)r[a]||(n[a]=l[a],r[a]=1);e[s]=l}else for(const a in o)r[a]=1}for(const o in i)o in n||(n[o]=void 0);return n}function Tt(e){return typeof e=="object"&&e!==null?e:{}}function $e(e,t,n){const i=e.$$.props[t];i!==void 0&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function U(e){e&&e.c()}function O(e,t,n){const{fragment:i,after_update:r}=e.$$;i&&i.m(t,n),nn(()=>{const s=e.$$.on_mount.map(oi).filter(Qe);e.$$.on_destroy?e.$$.on_destroy.push(...s):Ee(s),e.$$.on_mount=[]}),r.forEach(nn)}function M(e,t){const n=e.$$;n.fragment!==null&&(Ji(n.after_update),Ee(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Yi(e,t){e.$$.dirty[0]===-1&&(Ue.push(e),fi(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function J(e,t,n,i,r,s,o,l=[-1]){const a=at;st(e);const u=e.$$={fragment:null,ctx:[],props:s,update:G,not_equal:r,bound:Pn(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(a?a.$$.context:[])),callbacks:Pn(),dirty:l,skip_bound:!1,root:t.target||a.$$.root};o&&o(u.root);let f=!1;if(u.ctx=n?n(e,t.props||{},(p,h,...m)=>{const d=m.length?m[0]:h;return u.ctx&&r(u.ctx[p],u.ctx[p]=d)&&(!u.skip_bound&&u.bound[p]&&u.bound[p](d),f&&Yi(e,p)),h}):[],u.update(),f=!0,Ee(u.before_update),u.fragment=i?i(u.ctx):!1,t.target){if(t.hydrate){const p=qi(t.target);u.fragment&&u.fragment.l(p),p.forEach(_)}else u.fragment&&u.fragment.c();t.intro&&w(e.$$.fragment),O(e,t.target,t.anchor),ci()}st(a)}class Y{constructor(){Ft(this,"$$");Ft(this,"$$set")}$destroy(){M(this,1),this.$destroy=G}$on(t,n){if(!Qe(n))return G;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!Vi(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ki="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ki);function Vt(e){window.runtime.LogError(e)}function wt(e){window.runtime.BrowserOpenURL(e)}function er(){window.runtime.Quit()}function tr(e,t){return window.go.main.App.AddSnippet(e,t)}function nr(){return window.go.main.App.CustomShortcutsEnabled()}function ir(){return window.go.main.App.DaemonInstalled()}function rr(e,t){return window.go.main.App.DeleteCustomShortcut(e,t)}function sr(){return window.go.main.App.ExportSnippets()}function or(){return window.go.main.App.GetAllSnippets()}function lr(){return window.go.main.App.GetAutoexpandStatus()}function ar(){return window.go.main.App.GetAutostartStatus()}function ur(e){return window.go.main.App.GetCustomShortcutBinding(e)}function hi(e){return window.go.main.App.GetSetting(e)}function pi(e){return window.go.main.App.GetSnippetWithAbbreviation(e)}function fr(e){return window.go.main.App.GetSnippetWithID(e)}function cr(e,t){return window.go.main.App.GetSnippets(e,t)}function hr(){return window.go.main.App.GetVersion()}function mi(e){return window.go.main.App.ImportSnippets(e)}function pr(e){return window.go.main.App.NilUUID(e)}function mr(e,t){return window.go.main.App.PasteSnippetAndQuit(e,t)}function dr(e){return window.go.main.App.Ping(e)}function _r(e){return window.go.main.App.RemoveSnippet(e)}function gr(e,t,n,i){return window.go.main.App.SaveCustomShortcut(e,t,n,i)}function br(e,t){return window.go.main.App.SaveSetting(e,t)}function vr(){return window.go.main.App.SearchAndPasteMode()}function oe(e,t){return window.go.main.App.ShowError(e,t)}function wr(){return window.go.main.App.StartDaemon()}function Er(e){return window.go.main.App.UpdateAutoexpand(e)}function yr(e){return window.go.main.App.UpdateAutostart(e)}function Sr(e,t){return window.go.main.App.UpdateSnippetWithID(e,t)}const Re=[];function di(e,t){return{subscribe:Te(e,t).subscribe}}function Te(e,t=G){let n;const i=new Set;function r(l){if(Z(e,l)&&(e=l,n)){const a=!Re.length;for(const u of i)u[1](),Re.push(u,e);if(a){for(let u=0;u<Re.length;u+=2)Re[u][0](Re[u+1]);Re.length=0}}}function s(l){r(l(e))}function o(l,a=G){const u=[l,a];return i.add(u),i.size===1&&(n=t(r,s)||G),l(e),()=>{i.delete(u),i.size===0&&n&&(n(),n=null)}}return{set:r,update:s,subscribe:o}}function Le(e,t,n){const i=!Array.isArray(e),r=i?[e]:e;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=t.length<2;return di(n,(o,l)=>{let a=!1;const u=[];let f=0,p=G;const h=()=>{if(f)return;p();const d=t(i?u[0]:u,o,l);s?o(d):p=Qe(d)?d:G},m=r.map((d,b)=>mn(d,I=>{u[b]=I,f&=~(1<<b),a&&h()},()=>{f|=1<<b}));return a=!0,h(),function(){Ee(m),p(),a=!1}})}function kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ar=function(t){return Br(t)&&!Tr(t)};function Br(e){return!!e&&typeof e=="object"}function Tr(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Cr(e)}var Ir=typeof Symbol=="function"&&Symbol.for,Hr=Ir?Symbol.for("react.element"):60103;function Cr(e){return e.$$typeof===Hr}function Lr(e){return Array.isArray(e)?[]:{}}function ft(e,t){return t.clone!==!1&&t.isMergeableObject(e)?We(Lr(e),e,t):e}function Pr(e,t,n){return e.concat(t).map(function(i){return ft(i,n)})}function Nr(e,t){if(!t.customMerge)return We;var n=t.customMerge(e);return typeof n=="function"?n:We}function Or(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Mn(e){return Object.keys(e).concat(Or(e))}function _i(e,t){try{return t in e}catch{return!1}}function Mr(e,t){return _i(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function xr(e,t,n){var i={};return n.isMergeableObject(e)&&Mn(e).forEach(function(r){i[r]=ft(e[r],n)}),Mn(t).forEach(function(r){Mr(e,r)||(_i(e,r)&&n.isMergeableObject(t[r])?i[r]=Nr(r,n)(e[r],t[r],n):i[r]=ft(t[r],n))}),i}function We(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Pr,n.isMergeableObject=n.isMergeableObject||Ar,n.cloneUnlessOtherwiseSpecified=ft;var i=Array.isArray(t),r=Array.isArray(e),s=i===r;return s?i?n.arrayMerge(e,t,n):xr(e,t,n):ft(t,n)}We.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(i,r){return We(i,r,n)},{})};var Rr=We,Ur=Rr;const Dr=kr(Ur);var rn=function(e,t){return rn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},rn(e,t)};function Lt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");rn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ee=function(){return ee=Object.assign||function(t){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ee.apply(this,arguments)};function Wt(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,s;i<r;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))}var q;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(q||(q={}));var se;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(se||(se={}));var Xe;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Xe||(Xe={}));function xn(e){return e.type===se.literal}function Gr(e){return e.type===se.argument}function gi(e){return e.type===se.number}function bi(e){return e.type===se.date}function vi(e){return e.type===se.time}function wi(e){return e.type===se.select}function Ei(e){return e.type===se.plural}function $r(e){return e.type===se.pound}function yi(e){return e.type===se.tag}function Si(e){return!!(e&&typeof e=="object"&&e.type===Xe.number)}function sn(e){return!!(e&&typeof e=="object"&&e.type===Xe.dateTime)}var ki=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,jr=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Fr(e){var t={};return e.replace(jr,function(n){var i=n.length;switch(n[0]){case"G":t.era=i===4?"long":i===5?"narrow":"short";break;case"y":t.year=i===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][i-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][i-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=i===4?"short":i===5?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][i-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][i-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][i-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][i-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][i-1];break;case"s":t.second=["numeric","2-digit"][i-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=i<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var zr=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Vr(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(zr).filter(function(h){return h.length>0}),n=[],i=0,r=t;i<r.length;i++){var s=r[i],o=s.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var l=o[0],a=o.slice(1),u=0,f=a;u<f.length;u++){var p=f[u];if(p.length===0)throw new Error("Invalid number skeleton")}n.push({stem:l,options:a})}return n}function Wr(e){return e.replace(/^(.*?)-/,"")}var Rn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Ai=/^(@+)?(\+|#+)?[rs]?$/g,Xr=/(\*)(0+)|(#+)(0+)|(0+)/g,Bi=/^(0+)$/;function Un(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Ai,function(n,i,r){return typeof r!="string"?(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length):r==="+"?t.minimumSignificantDigits=i.length:i[0]==="#"?t.maximumSignificantDigits=i.length:(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length+(typeof r=="string"?r.length:0)),""}),t}function Ti(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function qr(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Bi.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Dn(e){var t={},n=Ti(e);return n||t}function Zr(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Wr(r.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=ee(ee(ee({},t),{notation:"scientific"}),r.options.reduce(function(a,u){return ee(ee({},a),Dn(u))},{}));continue;case"engineering":t=ee(ee(ee({},t),{notation:"engineering"}),r.options.reduce(function(a,u){return ee(ee({},a),Dn(u))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(r.options[0]);continue;case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(Xr,function(a,u,f,p,h,m){if(u)t.minimumIntegerDigits=f.length;else{if(p&&h)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Bi.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(Rn.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(Rn,function(a,u,f,p,h,m){return f==="*"?t.minimumFractionDigits=u.length:p&&p[0]==="#"?t.maximumFractionDigits=p.length:h&&m?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+m.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var s=r.options[0];s==="w"?t=ee(ee({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=ee(ee({},t),Un(s)));continue}if(Ai.test(r.stem)){t=ee(ee({},t),Un(r.stem));continue}var o=Ti(r.stem);o&&(t=ee(ee({},t),o));var l=qr(r.stem);l&&(t=ee(ee({},t),l))}return t}var Et={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function Qr(e,t){for(var n="",i=0;i<e.length;i++){var r=e.charAt(i);if(r==="j"){for(var s=0;i+1<e.length&&e.charAt(i+1)===r;)s++,i++;var o=1+(s&1),l=s<2?1:3+(s>>1),a="a",u=Jr(t);for((u=="H"||u=="k")&&(l=0);l-- >0;)n+=a;for(;o-- >0;)n=u+n}else r==="J"?n+="H":n+=r}return n}function Jr(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,i;n!=="root"&&(i=e.maximize().region);var r=Et[i||""]||Et[n||""]||Et["".concat(n,"-001")]||Et["001"];return r[0]}var Xt,Yr=new RegExp("^".concat(ki.source,"*")),Kr=new RegExp("".concat(ki.source,"*$"));function Q(e,t){return{start:e,end:t}}var es=!!String.prototype.startsWith,ts=!!String.fromCodePoint,ns=!!Object.fromEntries,is=!!String.prototype.codePointAt,rs=!!String.prototype.trimStart,ss=!!String.prototype.trimEnd,os=!!Number.isSafeInteger,ls=os?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},on=!0;try{var as=Hi("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");on=((Xt=as.exec("a"))===null||Xt===void 0?void 0:Xt[0])==="a"}catch{on=!1}var Gn=es?function(t,n,i){return t.startsWith(n,i)}:function(t,n,i){return t.slice(i,i+n.length)===n},ln=ts?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i="",r=t.length,s=0,o;r>s;){if(o=t[s++],o>1114111)throw RangeError(o+" is not a valid code point");i+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return i},$n=ns?Object.fromEntries:function(t){for(var n={},i=0,r=t;i<r.length;i++){var s=r[i],o=s[0],l=s[1];n[o]=l}return n},Ii=is?function(t,n){return t.codePointAt(n)}:function(t,n){var i=t.length;if(!(n<0||n>=i)){var r=t.charCodeAt(n),s;return r<55296||r>56319||n+1===i||(s=t.charCodeAt(n+1))<56320||s>57343?r:(r-55296<<10)+(s-56320)+65536}},us=rs?function(t){return t.trimStart()}:function(t){return t.replace(Yr,"")},fs=ss?function(t){return t.trimEnd()}:function(t){return t.replace(Kr,"")};function Hi(e,t){return new RegExp(e,t)}var an;if(on){var jn=Hi("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");an=function(t,n){var i;jn.lastIndex=n;var r=jn.exec(t);return(i=r[1])!==null&&i!==void 0?i:""}}else an=function(t,n){for(var i=[];;){var r=Ii(t,n);if(r===void 0||Ci(r)||ms(r))break;i.push(r),n+=r>=65536?2:1}return ln.apply(void 0,i)};var cs=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,i){for(var r=[];!this.isEOF();){var s=this.char();if(s===123){var o=this.parseArgument(t,i);if(o.err)return o;r.push(o.val)}else{if(s===125&&t>0)break;if(s===35&&(n==="plural"||n==="selectordinal")){var l=this.clonePosition();this.bump(),r.push({type:se.pound,location:Q(l,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(q.UNMATCHED_CLOSING_TAG,Q(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&un(this.peek()||0)){var o=this.parseTag(t,n);if(o.err)return o;r.push(o.val)}else{var o=this.parseLiteral(t,n);if(o.err)return o;r.push(o.val)}}}return{val:r,err:null}},e.prototype.parseTag=function(t,n){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:se.literal,value:"<".concat(r,"/>"),location:Q(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(t+1,n,!0);if(s.err)return s;var o=s.val,l=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!un(this.char()))return this.error(q.INVALID_TAG,Q(l,this.clonePosition()));var a=this.clonePosition(),u=this.parseTagName();return r!==u?this.error(q.UNMATCHED_CLOSING_TAG,Q(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:se.tag,value:r,children:o,location:Q(i,this.clonePosition())},err:null}:this.error(q.INVALID_TAG,Q(l,this.clonePosition())))}else return this.error(q.UNCLOSED_TAG,Q(i,this.clonePosition()))}else return this.error(q.INVALID_TAG,Q(i,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&ps(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var i=this.clonePosition(),r="";;){var s=this.tryParseQuote(n);if(s){r+=s;continue}var o=this.tryParseUnquoted(t,n);if(o){r+=o;continue}var l=this.tryParseLeftAngleBracket();if(l){r+=l;continue}break}var a=Q(i,this.clonePosition());return{val:{type:se.literal,value:r,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!hs(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var i=this.char();if(i===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(i);this.bump()}return ln.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(n==="plural"||n==="selectordinal")||i===125&&t>0?null:(this.bump(),ln(i))},e.prototype.parseArgument=function(t,n){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(q.EMPTY_ARGUMENT,Q(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(q.MALFORMED_ARGUMENT,Q(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:se.argument,value:r,location:Q(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition())):this.parseArgumentOptions(t,n,r,i);default:return this.error(q.MALFORMED_ARGUMENT,Q(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),i=an(this.message,n),r=n+i.length;this.bumpTo(r);var s=this.clonePosition(),o=Q(t,s);return{value:i,location:o}},e.prototype.parseArgumentOptions=function(t,n,i,r){var s,o=this.clonePosition(),l=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(l){case"":return this.error(q.EXPECT_ARGUMENT_TYPE,Q(o,a));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var h=fs(p.val);if(h.length===0)return this.error(q.EXPECT_ARGUMENT_STYLE,Q(this.clonePosition(),this.clonePosition()));var m=Q(f,this.clonePosition());u={style:h,styleLocation:m}}var d=this.tryParseArgumentClose(r);if(d.err)return d;var b=Q(r,this.clonePosition());if(u&&Gn(u==null?void 0:u.style,"::",0)){var I=us(u.style.slice(2));if(l==="number"){var p=this.parseNumberSkeletonFromString(I,u.styleLocation);return p.err?p:{val:{type:se.number,value:i,location:b,style:p.val},err:null}}else{if(I.length===0)return this.error(q.EXPECT_DATE_TIME_SKELETON,b);var B=I;this.locale&&(B=Qr(I,this.locale));var h={type:Xe.dateTime,pattern:B,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?Fr(B):{}},E=l==="date"?se.date:se.time;return{val:{type:E,value:i,location:b,style:h},err:null}}}return{val:{type:l==="number"?se.number:l==="date"?se.date:se.time,value:i,location:b,style:(s=u==null?void 0:u.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var H=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(q.EXPECT_SELECT_ARGUMENT_OPTIONS,Q(H,ee({},H)));this.bumpSpace();var y=this.parseIdentifierIfPossible(),T=0;if(l!=="select"&&y.value==="offset"){if(!this.bumpIf(":"))return this.error(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Q(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,q.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),y=this.parseIdentifierIfPossible(),T=p.val}var P=this.tryParsePluralOrSelectOptions(t,l,n,y);if(P.err)return P;var d=this.tryParseArgumentClose(r);if(d.err)return d;var k=Q(r,this.clonePosition());return l==="select"?{val:{type:se.select,value:i,options:$n(P.val),location:k},err:null}:{val:{type:se.plural,value:i,options:$n(P.val),offset:T,pluralType:l==="plural"?"cardinal":"ordinal",location:k},err:null}}default:return this.error(q.INVALID_ARGUMENT_TYPE,Q(o,a))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(q.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Q(r,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var i=[];try{i=Vr(t)}catch{return this.error(q.INVALID_NUMBER_SKELETON,n)}return{val:{type:Xe.number,tokens:i,location:n,parsedOptions:this.shouldParseSkeletons?Zr(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,i,r){for(var s,o=!1,l=[],a=new Set,u=r.value,f=r.location;;){if(u.length===0){var p=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_SELECTOR,q.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;f=Q(p,this.clonePosition()),u=this.message.slice(p.offset,this.offset())}else break}if(a.has(u))return this.error(n==="select"?q.DUPLICATE_SELECT_ARGUMENT_SELECTOR:q.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);u==="other"&&(o=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?q.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:q.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Q(this.clonePosition(),this.clonePosition()));var d=this.parseMessage(t+1,n,i);if(d.err)return d;var b=this.tryParseArgumentClose(m);if(b.err)return b;l.push([u,{value:d.val,location:Q(m,this.clonePosition())}]),a.add(u),this.bumpSpace(),s=this.parseIdentifierIfPossible(),u=s.value,f=s.location}return l.length===0?this.error(n==="select"?q.EXPECT_SELECT_ARGUMENT_SELECTOR:q.EXPECT_PLURAL_ARGUMENT_SELECTOR,Q(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(q.MISSING_OTHER_CLAUSE,Q(this.clonePosition(),this.clonePosition())):{val:l,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var i=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var s=!1,o=0;!this.isEOF();){var l=this.char();if(l>=48&&l<=57)s=!0,o=o*10+(l-48),this.bump();else break}var a=Q(r,this.clonePosition());return s?(o*=i,ls(o)?{val:o,err:null}:this.error(n,a)):this.error(t,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=Ii(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Gn(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),i=this.message.indexOf(t,n);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Ci(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),i=this.message.charCodeAt(n+(t>=65536?2:1));return i??null},e}();function un(e){return e>=97&&e<=122||e>=65&&e<=90}function hs(e){return un(e)||e===47}function ps(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Ci(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ms(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function fn(e){e.forEach(function(t){if(delete t.location,wi(t)||Ei(t))for(var n in t.options)delete t.options[n].location,fn(t.options[n].value);else gi(t)&&Si(t.style)||(bi(t)||vi(t))&&sn(t.style)?delete t.style.location:yi(t)&&fn(t.children)})}function ds(e,t){t===void 0&&(t={}),t=ee({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new cs(e,t).parse();if(n.err){var i=SyntaxError(q[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return t!=null&&t.captureLocation||fn(n.val),n.val}function qt(e,t){var n=t&&t.cache?t.cache:Es,i=t&&t.serializer?t.serializer:ws,r=t&&t.strategy?t.strategy:gs;return r(e,{cache:n,serializer:i})}function _s(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Li(e,t,n,i){var r=_s(i)?i:n(i),s=t.get(r);return typeof s>"u"&&(s=e.call(this,i),t.set(r,s)),s}function Pi(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),s=t.get(r);return typeof s>"u"&&(s=e.apply(this,i),t.set(r,s)),s}function bn(e,t,n,i,r){return n.bind(t,e,i,r)}function gs(e,t){var n=e.length===1?Li:Pi;return bn(e,this,n,t.cache.create(),t.serializer)}function bs(e,t){return bn(e,this,Pi,t.cache.create(),t.serializer)}function vs(e,t){return bn(e,this,Li,t.cache.create(),t.serializer)}var ws=function(){return JSON.stringify(arguments)};function vn(){this.cache=Object.create(null)}vn.prototype.get=function(e){return this.cache[e]};vn.prototype.set=function(e,t){this.cache[e]=t};var Es={create:function(){return new vn}},Zt={variadic:bs,monadic:vs},qe;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(qe||(qe={}));var Pt=function(e){Lt(t,e);function t(n,i,r){var s=e.call(this,n)||this;return s.code=i,s.originalMessage=r,s}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Fn=function(e){Lt(t,e);function t(n,i,r,s){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(i,'". Options are "').concat(Object.keys(r).join('", "'),'"'),qe.INVALID_VALUE,s)||this}return t}(Pt),ys=function(e){Lt(t,e);function t(n,i,r){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(i),qe.INVALID_VALUE,r)||this}return t}(Pt),Ss=function(e){Lt(t,e);function t(n,i){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(i,'"'),qe.MISSING_VALUE,i)||this}return t}(Pt),me;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(me||(me={}));function ks(e){return e.length<2?e:e.reduce(function(t,n){var i=t[t.length-1];return!i||i.type!==me.literal||n.type!==me.literal?t.push(n):i.value+=n.value,t},[])}function As(e){return typeof e=="function"}function St(e,t,n,i,r,s,o){if(e.length===1&&xn(e[0]))return[{type:me.literal,value:e[0].value}];for(var l=[],a=0,u=e;a<u.length;a++){var f=u[a];if(xn(f)){l.push({type:me.literal,value:f.value});continue}if($r(f)){typeof s=="number"&&l.push({type:me.literal,value:n.getNumberFormat(t).format(s)});continue}var p=f.value;if(!(r&&p in r))throw new Ss(p,o);var h=r[p];if(Gr(f)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),l.push({type:typeof h=="string"?me.literal:me.object,value:h});continue}if(bi(f)){var m=typeof f.style=="string"?i.date[f.style]:sn(f.style)?f.style.parsedOptions:void 0;l.push({type:me.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(vi(f)){var m=typeof f.style=="string"?i.time[f.style]:sn(f.style)?f.style.parsedOptions:i.time.medium;l.push({type:me.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(gi(f)){var m=typeof f.style=="string"?i.number[f.style]:Si(f.style)?f.style.parsedOptions:void 0;m&&m.scale&&(h=h*(m.scale||1)),l.push({type:me.literal,value:n.getNumberFormat(t,m).format(h)});continue}if(yi(f)){var d=f.children,b=f.value,I=r[b];if(!As(I))throw new ys(b,"function",o);var B=St(d,t,n,i,r,s),E=I(B.map(function(T){return T.value}));Array.isArray(E)||(E=[E]),l.push.apply(l,E.map(function(T){return{type:typeof T=="string"?me.literal:me.object,value:T}}))}if(wi(f)){var H=f.options[h]||f.options.other;if(!H)throw new Fn(f.value,h,Object.keys(f.options),o);l.push.apply(l,St(H.value,t,n,i,r));continue}if(Ei(f)){var H=f.options["=".concat(h)];if(!H){if(!Intl.PluralRules)throw new Pt(`Intl.PluralRules is not available in this environment.
Try polyfilling it using "@formatjs/intl-pluralrules"
`,qe.MISSING_INTL_API,o);var y=n.getPluralRules(t,{type:f.pluralType}).select(h-(f.offset||0));H=f.options[y]||f.options.other}if(!H)throw new Fn(f.value,h,Object.keys(f.options),o);l.push.apply(l,St(H.value,t,n,i,r,h-(f.offset||0)));continue}}return ks(l)}function Bs(e,t){return t?ee(ee(ee({},e||{}),t||{}),Object.keys(e).reduce(function(n,i){return n[i]=ee(ee({},e[i]),t[i]||{}),n},{})):e}function Ts(e,t){return t?Object.keys(e).reduce(function(n,i){return n[i]=Bs(e[i],t[i]),n},ee({},e)):e}function Qt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Is(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:qt(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.NumberFormat).bind.apply(t,Wt([void 0],n,!1)))},{cache:Qt(e.number),strategy:Zt.variadic}),getDateTimeFormat:qt(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.DateTimeFormat).bind.apply(t,Wt([void 0],n,!1)))},{cache:Qt(e.dateTime),strategy:Zt.variadic}),getPluralRules:qt(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.PluralRules).bind.apply(t,Wt([void 0],n,!1)))},{cache:Qt(e.pluralRules),strategy:Zt.variadic})}}var Hs=function(){function e(t,n,i,r){var s=this;if(n===void 0&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(o){var l=s.formatToParts(o);if(l.length===1)return l[0].value;var a=l.reduce(function(u,f){return!u.length||f.type!==me.literal||typeof u[u.length-1]!="string"?u.push(f.value):u[u.length-1]+=f.value,u},[]);return a.length<=1?a[0]||"":a},this.formatToParts=function(o){return St(s.ast,s.locales,s.formatters,s.formats,o,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:r==null?void 0:r.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Ts(e.formats,i),this.formatters=r&&r.formatters||Is(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=ds,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();const Ce={},Cs=(e,t,n)=>n&&(t in Ce||(Ce[t]={}),e in Ce[t]||(Ce[t][e]=n),n),Ni=(e,t)=>{if(t==null)return;if(t in Ce&&e in Ce[t])return Ce[t][e];const n=gt(t);for(let i=0;i<n.length;i++){const r=Ls(n[i],e);if(r)return Cs(e,t,r)}};let wn;const Ye=Te({});function En(e){return e in wn}function Ls(e,t){if(!En(e))return null;const n=function(i){return wn[i]||null}(e);return function(i,r){if(r==null)return;if(r in i)return i[r];const s=r.split(".");let o=i;for(let l=0;l<s.length;l++)if(typeof o=="object"){if(l>0){const a=s.slice(l,s.length).join(".");if(a in o){o=o[a];break}}o=o[s[l]]}else o=void 0;return o}(n,t)}function Ps(e,...t){delete Ce[e],Ye.update(n=>(n[e]=Dr.all([n[e]||{},...t]),n))}Le([Ye],([e])=>Object.keys(e));Ye.subscribe(e=>wn=e);const ot={};function lt(e){return ot[e]}function It(e){return e!=null&&gt(e).some(t=>{var n;return(n=lt(t))===null||n===void 0?void 0:n.size})}function Ns(e,t){return Promise.all(t.map(i=>(function(r,s){ot[r].delete(s),ot[r].size===0&&delete ot[r]}(e,i),i().then(r=>r.default||r)))).then(i=>Ps(e,...i))}const nt={};function Oi(e){if(!It(e))return e in nt?nt[e]:Promise.resolve();const t=function(n){return gt(n).map(i=>{const r=lt(i);return[i,r?[...r]:[]]}).filter(([,i])=>i.length>0)}(e);return nt[e]=Promise.all(t.map(([n,i])=>Ns(n,i))).then(()=>{if(It(e))return Oi(e);delete nt[e]}),nt[e]}function Os(e,t){lt(e)||function(i){ot[i]=new Set}(e);const n=lt(e);lt(e).has(t)||(En(e)||Ye.update(i=>(i[e]={},i)),n.add(t))}function Ms({locale:e,id:t}){console.warn(`[svelte-i18n] The message "${t}" was not found in "${gt(e).join('", "')}".${It(Pe())?`

Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`)}const it={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Ze(){return it}function xs(e){const{formats:t,...n}=e,i=e.initialLocale||e.fallbackLocale;return n.warnOnMissingMessages&&(delete n.warnOnMissingMessages,n.handleMissingMessage==null?n.handleMissingMessage=Ms:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(it,n,{initialLocale:i}),t&&("number"in t&&Object.assign(it.formats.number,t.number),"date"in t&&Object.assign(it.formats.date,t.date),"time"in t&&Object.assign(it.formats.time,t.time)),Ke.set(i)}const kt=Te(!1);let cn;const At=Te(null);function zn(e){return e.split("-").map((t,n,i)=>i.slice(0,n+1).join("-")).reverse()}function gt(e,t=Ze().fallbackLocale){const n=zn(e);return t?[...new Set([...n,...zn(t)])]:n}function Pe(){return cn??void 0}At.subscribe(e=>{cn=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const Ke={...At,set:e=>{if(e&&function(t){if(t==null)return;const n=gt(t);for(let i=0;i<n.length;i++){const r=n[i];if(En(r))return r}}(e)&&It(e)){const{loadingDelay:t}=Ze();let n;return typeof window<"u"&&Pe()!=null&&t?n=window.setTimeout(()=>kt.set(!0),t):kt.set(!0),Oi(e).then(()=>{At.set(e)}).finally(()=>{clearTimeout(n),kt.set(!1)})}return At.set(e)}},Rs=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],Nt=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}},ct=(e,t)=>{const{formats:n}=Ze();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Us=Nt(({locale:e,format:t,...n})=>{if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return t&&(n=ct("number",t)),new Intl.NumberFormat(e,n)}),Ds=Nt(({locale:e,format:t,...n})=>{if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return t?n=ct("date",t):Object.keys(n).length===0&&(n=ct("date","short")),new Intl.DateTimeFormat(e,n)}),Gs=Nt(({locale:e,format:t,...n})=>{if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return t?n=ct("time",t):Object.keys(n).length===0&&(n=ct("time","short")),new Intl.DateTimeFormat(e,n)}),$s=({locale:e=Pe(),...t}={})=>Us({locale:e,...t}),js=({locale:e=Pe(),...t}={})=>Ds({locale:e,...t}),Fs=({locale:e=Pe(),...t}={})=>Gs({locale:e,...t}),zs=Nt((e,t=Pe())=>new Hs(e,t,Ze().formats,{ignoreTag:Ze().ignoreTag})),Vs=(e,t={})=>{var n,i,r,s;let o=t;typeof e=="object"&&(o=e,e=o.id);const{values:l,locale:a=Pe(),default:u}=o;if(a==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=Ni(e,a);if(f){if(typeof f!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),f}else f=(s=(r=(i=(n=Ze()).handleMissingMessage)===null||i===void 0?void 0:i.call(n,{locale:a,id:e,defaultValue:u}))!==null&&r!==void 0?r:u)!==null&&s!==void 0?s:e;if(!l)return f;let p=f;try{p=zs(f,a).format(l)}catch(h){h instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,h.message)}return p},Ws=(e,t)=>Fs(t).format(e),Xs=(e,t)=>js(t).format(e),qs=(e,t)=>$s(t).format(e),Zs=(e,t=Pe())=>Ni(e,t),Se=Le([Ke,Ye],()=>Vs);Le([Ke],()=>Ws);Le([Ke],()=>Xs);Le([Ke],()=>qs);Le([Ke,Ye],()=>Zs);function Qs(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,i,r,s,o=[],l="",a=e.split("/");for(a[0]||a.shift();r=a.shift();)n=r[0],n==="*"?(o.push("wild"),l+="/(.*)"):n===":"?(i=r.indexOf("?",1),s=r.indexOf(".",1),o.push(r.substring(1,~i?i:~s?s:r.length)),l+=~i&&!~s?"(?:/([^/]+?))?":"/([^/]+?)",~s&&(l+=(~i?"?":"")+"\\"+r.substring(s))):l+="/"+r;return{keys:o,pattern:new RegExp("^"+l+(t?"(?=$|/)":"/?$"),"i")}}function Js(e){let t,n,i;const r=[e[2]];var s=e[0];function o(l,a){let u={};if(a!==void 0&&a&4)u=Bt(r,[Tt(l[2])]);else for(let f=0;f<r.length;f+=1)u=pn(u,r[f]);return{props:u}}return s&&(t=Ve(s,o(e)),t.$on("routeEvent",e[7])),{c(){t&&U(t.$$.fragment),n=ye()},m(l,a){t&&O(t,l,a),g(l,n,a),i=!0},p(l,a){if(a&1&&s!==(s=l[0])){if(t){ue();const u=t;S(u.$$.fragment,1,0,()=>{M(u,1)}),fe()}s?(t=Ve(s,o(l,a)),t.$on("routeEvent",l[7]),U(t.$$.fragment),w(t.$$.fragment,1),O(t,n.parentNode,n)):t=null}else if(s){const u=a&4?Bt(r,[Tt(l[2])]):{};t.$set(u)}},i(l){i||(t&&w(t.$$.fragment,l),i=!0)},o(l){t&&S(t.$$.fragment,l),i=!1},d(l){l&&_(n),t&&M(t,l)}}}function Ys(e){let t,n,i;const r=[{params:e[1]},e[2]];var s=e[0];function o(l,a){let u={};if(a!==void 0&&a&6)u=Bt(r,[a&2&&{params:l[1]},a&4&&Tt(l[2])]);else for(let f=0;f<r.length;f+=1)u=pn(u,r[f]);return{props:u}}return s&&(t=Ve(s,o(e)),t.$on("routeEvent",e[6])),{c(){t&&U(t.$$.fragment),n=ye()},m(l,a){t&&O(t,l,a),g(l,n,a),i=!0},p(l,a){if(a&1&&s!==(s=l[0])){if(t){ue();const u=t;S(u.$$.fragment,1,0,()=>{M(u,1)}),fe()}s?(t=Ve(s,o(l,a)),t.$on("routeEvent",l[6]),U(t.$$.fragment),w(t.$$.fragment,1),O(t,n.parentNode,n)):t=null}else if(s){const u=a&6?Bt(r,[a&2&&{params:l[1]},a&4&&Tt(l[2])]):{};t.$set(u)}},i(l){i||(t&&w(t.$$.fragment,l),i=!0)},o(l){t&&S(t.$$.fragment,l),i=!1},d(l){l&&_(n),t&&M(t,l)}}}function Ks(e){let t,n,i,r;const s=[Ys,Js],o=[];function l(a,u){return a[1]?0:1}return t=l(e),n=o[t]=s[t](e),{c(){n.c(),i=ye()},m(a,u){o[t].m(a,u),g(a,i,u),r=!0},p(a,[u]){let f=t;t=l(a),t===f?o[t].p(a,u):(ue(),S(o[f],1,1,()=>{o[f]=null}),fe(),n=o[t],n?n.p(a,u):(n=o[t]=s[t](a),n.c()),w(n,1),n.m(i.parentNode,i))},i(a){r||(w(n),r=!0)},o(a){S(n),r=!1},d(a){a&&_(i),o[t].d(a)}}}function Vn(){const e=window.location.href.indexOf("#/");let t=e>-1?window.location.href.substr(e+1):"/";const n=t.indexOf("?");let i="";return n>-1&&(i=t.substr(n+1),t=t.substr(0,n)),{location:t,querystring:i}}const yn=di(null,function(t){t(Vn());const n=()=>{t(Vn())};return window.addEventListener("hashchange",n,!1),function(){window.removeEventListener("hashchange",n,!1)}});Le(yn,e=>e.location);Le(yn,e=>e.querystring);const Wn=Te(void 0);async function je(e){if(!e||e.length<1||e.charAt(0)!="/"&&e.indexOf("#/")!==0)throw Error("Invalid parameter location");await gn(),history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=(e.charAt(0)=="#"?"":"#")+e}async function Be(){await gn(),window.history.back()}function eo(e){e?window.scrollTo(e.__svelte_spa_router_scrollX,e.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function to(e,t,n){let{routes:i={}}=t,{prefix:r=""}=t,{restoreScrollState:s=!1}=t;class o{constructor(T,P){if(!P||typeof P!="function"&&(typeof P!="object"||P._sveltesparouter!==!0))throw Error("Invalid component object");if(!T||typeof T=="string"&&(T.length<1||T.charAt(0)!="/"&&T.charAt(0)!="*")||typeof T=="object"&&!(T instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:k,keys:x}=Qs(T);this.path=T,typeof P=="object"&&P._sveltesparouter===!0?(this.component=P.component,this.conditions=P.conditions||[],this.userData=P.userData,this.props=P.props||{}):(this.component=()=>Promise.resolve(P),this.conditions=[],this.props={}),this._pattern=k,this._keys=x}match(T){if(r){if(typeof r=="string")if(T.startsWith(r))T=T.substr(r.length)||"/";else return null;else if(r instanceof RegExp){const v=T.match(r);if(v&&v[0])T=T.substr(v[0].length)||"/";else return null}}const P=this._pattern.exec(T);if(P===null)return null;if(this._keys===!1)return P;const k={};let x=0;for(;x<this._keys.length;){try{k[this._keys[x]]=decodeURIComponent(P[x+1]||"")||null}catch{k[this._keys[x]]=null}x++}return k}async checkConditions(T){for(let P=0;P<this.conditions.length;P++)if(!await this.conditions[P](T))return!1;return!0}}const l=[];i instanceof Map?i.forEach((y,T)=>{l.push(new o(T,y))}):Object.keys(i).forEach(y=>{l.push(new o(y,i[y]))});let a=null,u=null,f={};const p=_t();async function h(y,T){await gn(),p(y,T)}let m=null,d=null;s&&(d=y=>{y.state&&(y.state.__svelte_spa_router_scrollY||y.state.__svelte_spa_router_scrollX)?m=y.state:m=null},window.addEventListener("popstate",d),ai(()=>{eo(m)}));let b=null,I=null;const B=yn.subscribe(async y=>{b=y;let T=0;for(;T<l.length;){const P=l[T].match(y.location);if(!P){T++;continue}const k={route:l[T].path,location:y.location,querystring:y.querystring,userData:l[T].userData,params:P&&typeof P=="object"&&Object.keys(P).length?P:null};if(!await l[T].checkConditions(k)){n(0,a=null),I=null,h("conditionsFailed",k);return}h("routeLoading",Object.assign({},k));const x=l[T].component;if(I!=x){x.loading?(n(0,a=x.loading),I=x,n(1,u=x.loadingParams),n(2,f={}),h("routeLoaded",Object.assign({},k,{component:a,name:a.name,params:u}))):(n(0,a=null),I=null);const v=await x();if(y!=b)return;n(0,a=v&&v.default||v),I=x}P&&typeof P=="object"&&Object.keys(P).length?n(1,u=P):n(1,u=null),n(2,f=l[T].props),h("routeLoaded",Object.assign({},k,{component:a,name:a.name,params:u})).then(()=>{Wn.set(u)});return}n(0,a=null),I=null,Wn.set(void 0)});_n(()=>{B(),d&&window.removeEventListener("popstate",d)});function E(y){ut.call(this,e,y)}function H(y){ut.call(this,e,y)}return e.$$set=y=>{"routes"in y&&n(3,i=y.routes),"prefix"in y&&n(4,r=y.prefix),"restoreScrollState"in y&&n(5,s=y.restoreScrollState)},e.$$.update=()=>{e.$$.dirty&32&&(history.scrollRestoration=s?"manual":"auto")},[a,u,f,i,r,s,E,H]}class no extends Y{constructor(t){super(),J(this,t,to,Ks,Z,{routes:3,prefix:4,restoreScrollState:5})}}const we=Te(!1),rt=Te(!1),Ht=Te(!1);function Mi(){const{subscribe:e,set:t,update:n}=Te([]);return{subscribe:e,fetch:async()=>{if(!Nn(we))return;const i=await or();n(r=>i)},search:async(i,r)=>{if(!Nn(we))return;const s=await cr(i,r);n(o=>s)},reset:()=>t([])}}const Me=Mi(),Jt=Te(""),Yt=Mi();function io(e){let t,n,i,r;return{c(){t=V("svg"),n=V("polyline"),i=V("polyline"),c(n,"points","11 17 6 12 11 7"),c(i,"points","18 17 13 12 18 7"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-chevrons-left "+e[2])},m(s,o){g(s,t,o),A(t,n),A(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-chevrons-left "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function ro(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class xi extends Y{constructor(t){super(),J(this,t,ro,io,Z,{size:0,strokeWidth:1,class:2})}}function so(e){let t,n,i,r,s;return{c(){t=V("svg"),n=V("path"),i=V("line"),r=V("line"),c(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),c(i,"x1","18"),c(i,"y1","9"),c(i,"x2","12"),c(i,"y2","15"),c(r,"x1","12"),c(r,"y1","9"),c(r,"x2","18"),c(r,"y2","15"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-delete "+e[2])},m(o,l){g(o,t,l),A(t,n),A(t,i),A(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-delete "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function oo(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class lo extends Y{constructor(t){super(),J(this,t,oo,so,Z,{size:0,strokeWidth:1,class:2})}}function ao(e){let t,n,i,r,s;return{c(){t=V("svg"),n=V("path"),i=V("polyline"),r=V("line"),c(n,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),c(i,"points","7 10 12 15 17 10"),c(r,"x1","12"),c(r,"y1","15"),c(r,"x2","12"),c(r,"y2","3"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-download "+e[2])},m(o,l){g(o,t,l),A(t,n),A(t,i),A(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-download "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function uo(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class fo extends Y{constructor(t){super(),J(this,t,uo,ao,Z,{size:0,strokeWidth:1,class:2})}}function co(e){let t,n,i,r;return{c(){t=V("svg"),n=V("path"),i=V("path"),c(n,"d","M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"),c(i,"d","M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-edit "+e[2])},m(s,o){g(s,t,o),A(t,n),A(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-edit "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function ho(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class po extends Y{constructor(t){super(),J(this,t,ho,co,Z,{size:0,strokeWidth:1,class:2})}}function mo(e){let t,n,i,r,s;return{c(){t=V("svg"),n=V("circle"),i=V("path"),r=V("line"),c(n,"cx","12"),c(n,"cy","12"),c(n,"r","10"),c(i,"d","M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"),c(r,"x1","12"),c(r,"y1","17"),c(r,"x2","12.01"),c(r,"y2","17"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-help-circle "+e[2])},m(o,l){g(o,t,l),A(t,n),A(t,i),A(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-help-circle "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function _o(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class go extends Y{constructor(t){super(),J(this,t,_o,mo,Z,{size:0,strokeWidth:1,class:2})}}function bo(e){let t,n,i,r,s;return{c(){t=V("svg"),n=V("circle"),i=V("line"),r=V("line"),c(n,"cx","12"),c(n,"cy","12"),c(n,"r","10"),c(i,"x1","12"),c(i,"y1","16"),c(i,"x2","12"),c(i,"y2","12"),c(r,"x1","12"),c(r,"y1","8"),c(r,"x2","12.01"),c(r,"y2","8"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-info "+e[2])},m(o,l){g(o,t,l),A(t,n),A(t,i),A(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-info "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function vo(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class wo extends Y{constructor(t){super(),J(this,t,vo,bo,Z,{size:0,strokeWidth:1,class:2})}}function Eo(e){let t,n,i,r,s;return{c(){t=V("svg"),n=V("rect"),i=V("line"),r=V("line"),c(n,"x","3"),c(n,"y","3"),c(n,"width","18"),c(n,"height","18"),c(n,"rx","2"),c(n,"ry","2"),c(i,"x1","12"),c(i,"y1","8"),c(i,"x2","12"),c(i,"y2","16"),c(r,"x1","8"),c(r,"y1","12"),c(r,"x2","16"),c(r,"y2","12"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-plus-square "+e[2])},m(o,l){g(o,t,l),A(t,n),A(t,i),A(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-plus-square "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function yo(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class Ot extends Y{constructor(t){super(),J(this,t,yo,Eo,Z,{size:0,strokeWidth:1,class:2})}}function So(e){let t,n,i,r;return{c(){t=V("svg"),n=V("circle"),i=V("line"),c(n,"cx","11"),c(n,"cy","11"),c(n,"r","8"),c(i,"x1","21"),c(i,"y1","21"),c(i,"x2","16.65"),c(i,"y2","16.65"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-search "+e[2])},m(s,o){g(s,t,o),A(t,n),A(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-search "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function ko(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class Ao extends Y{constructor(t){super(),J(this,t,ko,So,Z,{size:0,strokeWidth:1,class:2})}}function Bo(e){let t,n,i,r;return{c(){t=V("svg"),n=V("circle"),i=V("path"),c(n,"cx","12"),c(n,"cy","12"),c(n,"r","3"),c(i,"d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-settings "+e[2])},m(s,o){g(s,t,o),A(t,n),A(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-settings "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function To(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class Ri extends Y{constructor(t){super(),J(this,t,To,Bo,Z,{size:0,strokeWidth:1,class:2})}}function Io(e){let t,n,i,r,s,o;return{c(){t=V("svg"),n=V("polyline"),i=V("path"),r=V("line"),s=V("line"),c(n,"points","3 6 5 6 21 6"),c(i,"d","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"),c(r,"x1","10"),c(r,"y1","11"),c(r,"x2","10"),c(r,"y2","17"),c(s,"x1","14"),c(s,"y1","11"),c(s,"x2","14"),c(s,"y2","17"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",o="feather feather-trash-2 "+e[2])},m(l,a){g(l,t,a),A(t,n),A(t,i),A(t,r),A(t,s)},p(l,[a]){a&1&&c(t,"width",l[0]),a&1&&c(t,"height",l[0]),a&2&&c(t,"stroke-width",l[1]),a&4&&o!==(o="feather feather-trash-2 "+l[2])&&c(t,"class",o)},i:G,o:G,d(l){l&&_(t)}}}function Ho(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class Co extends Y{constructor(t){super(),J(this,t,Ho,Io,Z,{size:0,strokeWidth:1,class:2})}}function Lo(e){let t,n,i,r,s;return{c(){t=V("svg"),n=V("path"),i=V("polyline"),r=V("line"),c(n,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),c(i,"points","17 8 12 3 7 8"),c(r,"x1","12"),c(r,"y1","3"),c(r,"x2","12"),c(r,"y2","15"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-upload "+e[2])},m(o,l){g(o,t,l),A(t,n),A(t,i),A(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-upload "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function Po(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class hn extends Y{constructor(t){super(),J(this,t,Po,Lo,Z,{size:0,strokeWidth:1,class:2})}}function No(e){let t,n;const i=e[5].default,r=ht(i,e,e[4],null);return{c(){t=L("p"),r&&r.c(),c(t,"class","svelte-hclhr3"),X(t,"error",e[3]),X(t,"warning",e[0]),X(t,"success",e[1]),X(t,"info",e[2])},m(s,o){g(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&16)&&mt(r,i,s,s[4],n?pt(i,s[4],o,null):dt(s[4]),null),(!n||o&8)&&X(t,"error",s[3]),(!n||o&1)&&X(t,"warning",s[0]),(!n||o&2)&&X(t,"success",s[1]),(!n||o&4)&&X(t,"info",s[2])},i(s){n||(w(r,s),n=!0)},o(s){S(r,s),n=!1},d(s){s&&_(t),r&&r.d(s)}}}function Oo(e,t,n){let{$$slots:i={},$$scope:r}=t,{error:s=!1}=t,{warning:o=!1}=t,{success:l=!1}=t,{info:a=!1}=t;return o=s&&o?!1:o,l=(s||o)&&l?!1:l,a=!(s||o||l),e.$$set=u=>{"error"in u&&n(3,s=u.error),"warning"in u&&n(0,o=u.warning),"success"in u&&n(1,l=u.success),"info"in u&&n(2,a=u.info),"$$scope"in u&&n(4,r=u.$$scope)},[o,l,a,s,r,i]}class Mt extends Y{constructor(t){super(),J(this,t,Oo,No,Z,{error:3,warning:0,success:1,info:2})}}function Mo(e){let t=e[0]("no_connection")+"",n;return{c(){n=$(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("no_connection")+"")&&z(n,t)},d(i){i&&_(n)}}}function xo(e){let t,n;return t=new Mt({props:{error:!0,$$slots:{default:[Mo]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p(i,[r]){const s={};r&3&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function Ro(e,t,n){let i;return ne(e,Se,r=>n(0,i=r)),[i]}class Uo extends Y{constructor(t){super(),J(this,t,Ro,xo,Z,{})}}function Do(e){let t,n,i,r;const s=e[5].default,o=ht(s,e,e[4],null);return{c(){t=L("button"),o&&o.c(),t.disabled=e[3],c(t,"class","svelte-1jbd97"),X(t,"primary",e[0]),X(t,"danger",e[1]),X(t,"secondary",e[2])},m(l,a){g(l,t,a),o&&o.m(t,null),n=!0,i||(r=te(t,"click",e[6]),i=!0)},p(l,[a]){o&&o.p&&(!n||a&16)&&mt(o,s,l,l[4],n?pt(s,l[4],a,null):dt(l[4]),null),(!n||a&8)&&(t.disabled=l[3]),(!n||a&1)&&X(t,"primary",l[0]),(!n||a&2)&&X(t,"danger",l[1]),(!n||a&4)&&X(t,"secondary",l[2])},i(l){n||(w(o,l),n=!0)},o(l){S(o,l),n=!1},d(l){l&&_(t),o&&o.d(l),i=!1,r()}}}function Go(e,t,n){let{$$slots:i={},$$scope:r}=t,{primary:s=!1}=t,{danger:o=!1}=t,{secondary:l=!1}=t,{disabled:a=!1}=t;s=!s&&!l&&!o?!0:s,o=s&&o?!1:o,l=(s||o)&&l?!1:l;function u(f){ut.call(this,e,f)}return e.$$set=f=>{"primary"in f&&n(0,s=f.primary),"danger"in f&&n(1,o=f.danger),"secondary"in f&&n(2,l=f.secondary),"disabled"in f&&n(3,a=f.disabled),"$$scope"in f&&n(4,r=f.$$scope)},[s,o,l,a,r,i,u]}class Fe extends Y{constructor(t){super(),J(this,t,Go,Do,Z,{primary:0,danger:1,secondary:2,disabled:3})}}function $o(e){let t=e[0]("daemon.start")+"",n;return{c(){n=$(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("daemon.start")+"")&&z(n,t)},d(i){i&&_(n)}}}function jo(e){let t=e[0]("daemon.installed")+"",n,i,r,s;return r=new Fe({props:{$$slots:{default:[$o]},$$scope:{ctx:e}}}),r.$on("click",e[1]),{c(){n=$(t),i=R(),U(r.$$.fragment)},m(o,l){g(o,n,l),g(o,i,l),O(r,o,l),s=!0},p(o,l){(!s||l&1)&&t!==(t=o[0]("daemon.installed")+"")&&z(n,t);const a={};l&5&&(a.$$scope={dirty:l,ctx:o}),r.$set(a)},i(o){s||(w(r.$$.fragment,o),s=!0)},o(o){S(r.$$.fragment,o),s=!1},d(o){o&&(_(n),_(i)),M(r,o)}}}function Fo(e){let t,n;return t=new Mt({props:{warning:!0,$$slots:{default:[jo]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p(i,[r]){const s={};r&5&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function zo(e,t,n){let i;ne(e,Se,s=>n(0,i=s));async function r(){Ht.update(s=>!0);try{const s=await wr()}catch(s){await oe(i("daemon.start_error_title"),s),Ht.update(o=>!1)}await Me.fetch()}return[i,r]}class Vo extends Y{constructor(t){super(),J(this,t,zo,Fo,Z,{})}}function Wo(e){let t=e[0]("daemon.not_installed")+"",n;return{c(){n=$(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("daemon.not_installed")+"")&&z(n,t)},d(i){i&&_(n)}}}function Xo(e){let t,n;return t=new Mt({props:{error:!0,$$slots:{default:[Wo]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p(i,[r]){const s={};r&3&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function qo(e,t,n){let i;return ne(e,Se,r=>n(0,i=r)),[i]}class Zo extends Y{constructor(t){super(),J(this,t,qo,Xo,Z,{})}}function Qo(e){let t=e[0]("daemon.starting")+"",n;return{c(){n=$(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("daemon.starting")+"")&&z(n,t)},d(i){i&&_(n)}}}function Jo(e){let t,n;return t=new Mt({props:{warning:!0,$$slots:{default:[Qo]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p(i,[r]){const s={};r&3&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function Yo(e,t,n){let i;return ne(e,Se,r=>n(0,i=r)),[i]}class Ko extends Y{constructor(t){super(),J(this,t,Yo,Jo,Z,{})}}function Xn(e){let t,n,i,r,s,o;t=new Uo({});const l=[nl,tl,el],a=[];function u(f,p){return f[2]&&!f[3]?0:f[2]&&f[3]?1:2}return i=u(e),r=a[i]=l[i](e),{c(){U(t.$$.fragment),n=R(),r.c(),s=ye()},m(f,p){O(t,f,p),g(f,n,p),a[i].m(f,p),g(f,s,p),o=!0},p(f,p){let h=i;i=u(f),i!==h&&(ue(),S(a[h],1,1,()=>{a[h]=null}),fe(),r=a[i],r||(r=a[i]=l[i](f),r.c()),w(r,1),r.m(s.parentNode,s))},i(f){o||(w(t.$$.fragment,f),w(r),o=!0)},o(f){S(t.$$.fragment,f),S(r),o=!1},d(f){f&&(_(n),_(s)),M(t,f),a[i].d(f)}}}function el(e){let t,n;return t=new Zo({}),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function tl(e){let t,n;return t=new Ko({}),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function nl(e){let t,n;return t=new Vo({}),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function il(e){let t,n,i,r,s,o=!e[1]&&Xn(e);const l=e[6].default,a=ht(l,e,e[5],null);return{c(){t=L("div"),o&&o.c(),n=R(),a&&a.c(),c(t,"class","screen svelte-i096ea"),X(t,"centered",e[0])},m(u,f){g(u,t,f),o&&o.m(t,null),A(t,n),a&&a.m(t,null),i=!0,r||(s=[te(t,"keyup",e[4]),te(t,"keyup",e[7])],r=!0)},p(u,[f]){u[1]?o&&(ue(),S(o,1,1,()=>{o=null}),fe()):o?(o.p(u,f),f&2&&w(o,1)):(o=Xn(u),o.c(),w(o,1),o.m(t,n)),a&&a.p&&(!i||f&32)&&mt(a,l,u,u[5],i?pt(l,u[5],f,null):dt(u[5]),null),(!i||f&1)&&X(t,"centered",u[0])},i(u){i||(w(o),w(a,u),i=!0)},o(u){S(o),S(a,u),i=!1},d(u){u&&_(t),o&&o.d(),a&&a.d(u),r=!1,Ee(s)}}}function rl(e,t,n){let i,r,s;ne(e,we,h=>n(1,i=h)),ne(e,rt,h=>n(2,r=h)),ne(e,Ht,h=>n(3,s=h));let{$$slots:o={},$$scope:l}=t,{centered:a=!1}=t;const u=_t();function f(h){h.key==="Escape"&&(h.preventDefault(),u("cancel"))}function p(h){ut.call(this,e,h)}return e.$$set=h=>{"centered"in h&&n(0,a=h.centered),"$$scope"in h&&n(5,l=h.$$scope)},[a,i,r,s,f,l,o,p]}class et extends Y{constructor(t){super(),J(this,t,rl,il,Z,{centered:0})}}function sl(e){let t,n,i,r,s,o,l,a;var u=e[0];function f(m,d){return{props:{size:m[2],strokeWidth:m[3]}}}u&&(i=Ve(u,f(e)));const p=e[10].default,h=ht(p,e,e[9],null);return{c(){t=L("div"),n=L("div"),i&&U(i.$$.fragment),s=R(),h&&h.c(),c(n,"class",r="icon-wrapper "+e[1]+" svelte-bhj2u4"),c(t,"class","content svelte-bhj2u4"),c(t,"tabindex","0"),c(t,"title",e[5]),X(t,"centered",e[6]),X(t,"horizontal",e[4])},m(m,d){g(m,t,d),A(t,n),i&&O(i,n,null),A(t,s),h&&h.m(t,null),o=!0,l||(a=[te(t,"click",e[7]),te(t,"keyup",e[8])],l=!0)},p(m,[d]){if(d&1&&u!==(u=m[0])){if(i){ue();const b=i;S(b.$$.fragment,1,0,()=>{M(b,1)}),fe()}u?(i=Ve(u,f(m)),U(i.$$.fragment),w(i.$$.fragment,1),O(i,n,null)):i=null}else if(u){const b={};d&4&&(b.size=m[2]),d&8&&(b.strokeWidth=m[3]),i.$set(b)}(!o||d&2&&r!==(r="icon-wrapper "+m[1]+" svelte-bhj2u4"))&&c(n,"class",r),h&&h.p&&(!o||d&512)&&mt(h,p,m,m[9],o?pt(p,m[9],d,null):dt(m[9]),null),(!o||d&32)&&c(t,"title",m[5]),(!o||d&16)&&X(t,"horizontal",m[4])},i(m){o||(i&&w(i.$$.fragment,m),w(h,m),o=!0)},o(m){i&&S(i.$$.fragment,m),S(h,m),o=!1},d(m){m&&_(t),i&&M(i),h&&h.d(m),l=!1,Ee(a)}}}function ol(e,t,n){let{$$slots:i={},$$scope:r}=t,{icon:s=go}=t,{iconClass:o}=t,{size:l="24"}=t,{strokeWidth:a="2"}=t,{horizontal:u=!1}=t,{title:f=""}=t;const p=!u,h=_t();function m(){h("activate")}function d(b){(b.key==="Enter"||b.key===" ")&&h("activate")}return e.$$set=b=>{"icon"in b&&n(0,s=b.icon),"iconClass"in b&&n(1,o=b.iconClass),"size"in b&&n(2,l=b.size),"strokeWidth"in b&&n(3,a=b.strokeWidth),"horizontal"in b&&n(4,u=b.horizontal),"title"in b&&n(5,f=b.title),"$$scope"in b&&n(9,r=b.$$scope)},[s,o,l,a,u,f,p,m,d,r,i]}class de extends Y{constructor(t){super(),J(this,t,ol,sl,Z,{icon:0,iconClass:1,size:2,strokeWidth:3,horizontal:4,title:5})}}function ll(e,t){t&&setTimeout(()=>{e.focus(),e.select()},250)}function qn(e){let t,n;return{c(){t=L("label"),n=$(e[4]),c(t,"for",e[3])},m(i,r){g(i,t,r),A(t,n)},p(i,r){r&16&&z(n,i[4]),r&8&&c(t,"for",i[3])},d(i){i&&_(t)}}}function Zn(e){let t,n,i,r,s;return n=new Ao({}),{c(){t=L("button"),U(n.$$.fragment),c(t,"class","search-icon svelte-8p6spj"),c(t,"tabindex",-1),c(t,"title",e[6]),X(t,"focussed",e[2])},m(o,l){g(o,t,l),O(n,t,null),i=!0,r||(s=te(t,"click",e[14]),r=!0)},p(o,l){(!i||l&64)&&c(t,"title",o[6]),(!i||l&4)&&X(t,"focussed",o[2])},i(o){i||(w(n.$$.fragment,o),i=!0)},o(o){S(n.$$.fragment,o),i=!1},d(o){o&&_(t),M(n),r=!1,s()}}}function Qn(e){let t,n,i,r,s;return n=new lo({}),{c(){t=L("button"),U(n.$$.fragment),c(t,"class","clear-icon svelte-8p6spj"),c(t,"tabindex",-1),c(t,"title",e[7]),X(t,"focussed",e[2])},m(o,l){g(o,t,l),O(n,t,null),i=!0,r||(s=te(t,"click",e[15]),r=!0)},p(o,l){(!i||l&128)&&c(t,"title",o[7]),(!i||l&4)&&X(t,"focussed",o[2])},i(o){i||(w(n.$$.fragment,o),i=!0)},o(o){S(n.$$.fragment,o),i=!1},d(o){o&&_(t),M(n),r=!1,s()}}}function Jn(e){let t;return{c(){t=L("div"),c(t,"class","error-message svelte-8p6spj")},m(n,i){g(n,t,i),t.innerHTML=e[11]},p(n,i){i&2048&&(t.innerHTML=n[11])},d(n){n&&_(t)}}}function al(e){let t,n,i,r,s,o,l,a,u,f,p,h,m=e[4]&&qn(e),d=e[9]&&Zn(e),b=e[9]&&e[0]&&Qn(e),I=!e[9]&&Jn(e);return{c(){t=L("div"),m&&m.c(),n=R(),i=L("div"),d&&d.c(),r=R(),s=L("input"),l=R(),b&&b.c(),a=R(),I&&I.c(),u=ye(),c(s,"type","text"),c(s,"id",e[3]),c(s,"name",e[3]),c(s,"placeholder",e[5]),c(s,"tabindex",e[10]),c(s,"class","svelte-8p6spj"),X(s,"search",e[9]),X(s,"focussed",e[2]),X(s,"value",e[0]),c(i,"class","input-control svelte-8p6spj"),c(t,"class","input svelte-8p6spj")},m(B,E){g(B,t,E),m&&m.m(t,null),A(t,n),A(t,i),d&&d.m(i,null),A(i,r),A(i,s),ze(s,e[0]),e[18](s),A(i,l),b&&b.m(i,null),g(B,a,E),I&&I.m(B,E),g(B,u,E),f=!0,p||(h=[te(s,"input",e[17]),te(s,"focusin",e[12]),te(s,"focusout",e[13]),dn(o=ll.call(null,s,e[8]))],p=!0)},p(B,[E]){B[4]?m?m.p(B,E):(m=qn(B),m.c(),m.m(t,n)):m&&(m.d(1),m=null),B[9]?d?(d.p(B,E),E&512&&w(d,1)):(d=Zn(B),d.c(),w(d,1),d.m(i,r)):d&&(ue(),S(d,1,1,()=>{d=null}),fe()),(!f||E&8)&&c(s,"id",B[3]),(!f||E&8)&&c(s,"name",B[3]),(!f||E&32)&&c(s,"placeholder",B[5]),(!f||E&1024)&&c(s,"tabindex",B[10]),E&1&&s.value!==B[0]&&ze(s,B[0]),o&&Qe(o.update)&&E&256&&o.update.call(null,B[8]),(!f||E&512)&&X(s,"search",B[9]),(!f||E&4)&&X(s,"focussed",B[2]),(!f||E&1)&&X(s,"value",B[0]),B[9]&&B[0]?b?(b.p(B,E),E&513&&w(b,1)):(b=Qn(B),b.c(),w(b,1),b.m(i,null)):b&&(ue(),S(b,1,1,()=>{b=null}),fe()),B[9]?I&&(I.d(1),I=null):I?I.p(B,E):(I=Jn(B),I.c(),I.m(u.parentNode,u))},i(B){f||(w(d),w(b),f=!0)},o(B){S(d),S(b),f=!1},d(B){B&&(_(t),_(a),_(u)),m&&m.d(),d&&d.d(),e[18](null),b&&b.d(),I&&I.d(B),p=!1,Ee(h)}}}function ul(e,t,n){let i;const r=_t();let{name:s="input"}=t,{label:o=""}=t,{value:l=""}=t,{errorMessage:a=""}=t,{placeholder:u=""}=t,{searchButtonTitle:f=""}=t,{clearButtonTitle:p=""}=t,{autofocus:h=!1}=t,{search:m=!1}=t,{tabindex:d=0}=t,{ref:b}=t,{focussed:I=h}=t;function B(){n(2,I=!0)}function E(){n(2,I=!1)}function H(){r("query",l),document.getElementById(s).focus()}function y(){n(0,l=""),document.getElementById(s).focus()}function T(){l=this.value,n(0,l)}function P(k){ve[k?"unshift":"push"](()=>{b=k,n(1,b)})}return e.$$set=k=>{"name"in k&&n(3,s=k.name),"label"in k&&n(4,o=k.label),"value"in k&&n(0,l=k.value),"errorMessage"in k&&n(16,a=k.errorMessage),"placeholder"in k&&n(5,u=k.placeholder),"searchButtonTitle"in k&&n(6,f=k.searchButtonTitle),"clearButtonTitle"in k&&n(7,p=k.clearButtonTitle),"autofocus"in k&&n(8,h=k.autofocus),"search"in k&&n(9,m=k.search),"tabindex"in k&&n(10,d=k.tabindex),"ref"in k&&n(1,b=k.ref),"focussed"in k&&n(2,I=k.focussed)},e.$$.update=()=>{e.$$.dirty&65536&&n(11,i=a||"&nbsp;")},[l,b,I,s,o,u,f,p,h,m,d,i,B,E,H,y,a,T,P]}class Sn extends Y{constructor(t){super(),J(this,t,ul,al,Z,{name:3,label:4,value:0,errorMessage:16,placeholder:5,searchButtonTitle:6,clearButtonTitle:7,autofocus:8,search:9,tabindex:10,ref:1,focussed:2})}}function Ui(e,t){t&&e.focus()}function fl(e){let t;return{c(){t=$(e[0])},m(n,i){g(n,t,i)},p(n,i){i&1&&z(t,n[0])},d(n){n&&_(t)}}}function cl(e){let t;return{c(){t=$(" ")},m(n,i){g(n,t,i)},p:G,d(n){n&&_(t)}}}function hl(e){let t;function n(s,o){return s[1]?cl:fl}let r=n(e)(e);return{c(){t=L("span"),r.c(),c(t,"class","shortcut-button svelte-11t060e"),X(t,"hide",e[1])},m(s,o){g(s,t,o),r.m(t,null)},p(s,[o]){r.p(s,o)},i:G,o:G,d(s){s&&_(t),r.d()}}}function pl(e,t,n){let{shortcut:i=""}=t;const r=i.length===0;return e.$$set=s=>{"shortcut"in s&&n(0,i=s.shortcut)},[i,r]}class xt extends Y{constructor(t){super(),J(this,t,pl,hl,Z,{shortcut:0})}}function Yn(e){let t,n;return t=new xt({props:{shortcut:e[6]}}),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p(i,r){const s={};r&64&&(s.shortcut=i[6]),t.$set(s)},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function Kn(e){let t,n,i;return n=new po({props:{size:"1.25x"}}),{c(){t=L("div"),U(n.$$.fragment),c(t,"class","edit-icon-wrapper svelte-1ebkg7o")},m(r,s){g(r,t,s),O(n,t,null),i=!0},i(r){i||(w(n.$$.fragment,r),i=!0)},o(r){S(n.$$.fragment,r),i=!1},d(r){r&&_(t),M(n)}}}function ml(e){let t,n,i,r,s,o=e[0].body+"",l,a,u,f,p,h=e[4]&&Yn(e);i=new xt({props:{shortcut:e[0].abbreviation}});let m=!e[4]&&Kn();return{c(){t=L("li"),h&&h.c(),n=R(),U(i.$$.fragment),r=R(),s=L("span"),l=$(o),a=R(),m&&m.c(),c(s,"class","body svelte-1ebkg7o"),c(t,"tabindex",e[1]),c(t,"title",e[7]),c(t,"class","svelte-1ebkg7o"),X(t,"focussed",e[2]),X(t,"active",e[3])},m(d,b){g(d,t,b),h&&h.m(t,null),A(t,n),O(i,t,null),A(t,r),A(t,s),A(s,l),A(t,a),m&&m.m(t,null),e[13](t),u=!0,f||(p=te(t,"click",e[12]),f=!0)},p(d,[b]){d[4]?h?(h.p(d,b),b&16&&w(h,1)):(h=Yn(d),h.c(),w(h,1),h.m(t,n)):h&&(ue(),S(h,1,1,()=>{h=null}),fe());const I={};b&1&&(I.shortcut=d[0].abbreviation),i.$set(I),(!u||b&1)&&o!==(o=d[0].body+"")&&z(l,o),d[4]?m&&(ue(),S(m,1,1,()=>{m=null}),fe()):m?b&16&&w(m,1):(m=Kn(),m.c(),w(m,1),m.m(t,null)),(!u||b&2)&&c(t,"tabindex",d[1]),(!u||b&4)&&X(t,"focussed",d[2]),(!u||b&8)&&X(t,"active",d[3])},i(d){u||(w(h),w(i.$$.fragment,d),w(m),u=!0)},o(d){S(h),S(i.$$.fragment,d),S(m),u=!1},d(d){d&&_(t),h&&h.d(),M(i),m&&m.d(),e[13](null),f=!1,p()}}}function dl(e,t,n){let i;ne(e,Se,E=>n(14,i=E));let{snippet:r}=t,{index:s=-1}=t,{tabindex:o=-1}=t,{focussed:l=!1}=t,{active:a=!1}=t,{selectMode:u=!1}=t,{observer:f=null}=t,p,h=i(u?"use_snippet.title":"edit_snippet.title"),m=s>=0&&s<10?s+1:"";m===10&&(m=0);function d(){return p.classList.contains("is-visible")}function b(E){p.scrollIntoView({behavior:"smooth",block:E})}Je(()=>{f&&f.observe(p)}),_n(()=>{f&&f.unobserve(p)});function I(E){ut.call(this,e,E)}function B(E){ve[E?"unshift":"push"](()=>{p=E,n(5,p)})}return e.$$set=E=>{"snippet"in E&&n(0,r=E.snippet),"index"in E&&n(8,s=E.index),"tabindex"in E&&n(1,o=E.tabindex),"focussed"in E&&n(2,l=E.focussed),"active"in E&&n(3,a=E.active),"selectMode"in E&&n(4,u=E.selectMode),"observer"in E&&n(9,f=E.observer)},[r,o,l,a,u,p,m,h,s,f,d,b,I,B]}class _l extends Y{constructor(t){super(),J(this,t,dl,ml,Z,{snippet:0,index:8,tabindex:1,focussed:2,active:3,selectMode:4,observer:9,isVisible:10,scrollIntoView:11})}get isVisible(){return this.$$.ctx[10]}get scrollIntoView(){return this.$$.ctx[11]}}function ei(e,t,n){const i=e.slice();return i[22]=t[n],i[23]=t,i[24]=n,i}function ti(e){let t,n=e[24],i;const r=()=>e[14](t,n),s=()=>e[14](null,n);function o(){return e[15](e[24])}let l={snippet:e[22],index:e[24],focussed:e[24]===e[4],active:e[5],observer:e[8],selectMode:e[2]};return t=new _l({props:l}),r(),t.$on("click",o),{c(){U(t.$$.fragment)},m(a,u){O(t,a,u),i=!0},p(a,u){e=a,n!==e[24]&&(s(),n=e[24],r());const f={};u&128&&(f.snippet=e[22]),u&16&&(f.focussed=e[24]===e[4]),u&32&&(f.active=e[5]),u&4&&(f.selectMode=e[2]),t.$set(f)},i(a){i||(w(t.$$.fragment,a),i=!0)},o(a){S(t.$$.fragment,a),i=!1},d(a){s(),M(t,a)}}}function gl(e){let t,n,i,r,s,o=On(e[7]),l=[];for(let u=0;u<o.length;u+=1)l[u]=ti(ei(e,o,u));const a=u=>S(l[u],1,1,()=>{l[u]=null});return{c(){t=L("ul");for(let u=0;u<l.length;u+=1)l[u].c();c(t,"tabindex",e[1]),c(t,"class","svelte-1wnqbvs")},m(u,f){g(u,t,f);for(let p=0;p<l.length;p+=1)l[p]&&l[p].m(t,null);e[16](t),i=!0,r||(s=[te(t,"focus",e[9]),te(t,"blur",e[10]),te(t,"keydown",e[12]),dn(n=Ui.call(null,t,e[3]))],r=!0)},p(u,[f]){if(f&2548){o=On(u[7]);let p;for(p=0;p<o.length;p+=1){const h=ei(u,o,p);l[p]?(l[p].p(h,f),w(l[p],1)):(l[p]=ti(h),l[p].c(),w(l[p],1),l[p].m(t,null))}for(ue(),p=o.length;p<l.length;p+=1)a(p);fe()}(!i||f&2)&&c(t,"tabindex",u[1]),n&&Qe(n.update)&&f&8&&n.update.call(null,u[3])},i(u){if(!i){for(let f=0;f<o.length;f+=1)w(l[f]);i=!0}},o(u){l=l.filter(Boolean);for(let f=0;f<l.length;f+=1)S(l[f]);i=!1},d(u){u&&_(t),Xi(l,u),e[16](null),r=!1,Ee(s)}}}function bl(e,t,n){let i;const r=_t();let{snippets:s=null}=t,{tabindex:o=0}=t,{selectMode:l=!1}=t,{autofocus:a=!1}=t,{ref:u}=t,f=0,p=a,h=[];const m=new IntersectionObserver(function(v){for(let N=0;N<v.length;N++)v[N].isIntersecting?v[N].target.classList.add("is-visible"):v[N].target.classList.remove("is-visible")},{root:u,threshold:[.6]});function d(v){return n(4,f=0),v}function b(){n(5,p=!0)}function I(){n(5,p=!1)}function B(v){l?y(i[v]):T(i[v])}function E(v){!s||s.length===0||H(v)&&v.preventDefault()}function H(v){if(v.key==="Home"||v.key==="g")return n(4,f=0),h[f].scrollIntoView("nearest"),!0;if(v.key==="End"||v.key==="G")return n(4,f=s.length-1),h[f].scrollIntoView("nearest"),!0;if(f<s.length-1&&(v.key==="ArrowDown"||v.key==="j"))return n(4,f++,f),h[f].scrollIntoView("nearest"),!0;if(f>0&&(v.key==="ArrowUp"||v.key==="k"))return n(4,f--,f),h[f].scrollIntoView("nearest"),!0;if(v.key==="PageDown"||v.key==="d"){let N=-1,C=-1;for(let ae=0;ae<h.length;ae++)if(h[ae].isVisible())C=ae,N<0&&(N=ae);else if(C>=0)break;const le=h.length-1,re=C-N;return C+re>le?n(4,f=le):n(4,f=C),h[f].scrollIntoView("start"),!0}if(v.key==="PageUp"||v.key==="u"){let N=-1,C=-1;for(let re=0;re<h.length;re++){const ae=h[re];if(ae.isVisible()&&N<0)N=re,C=re;else if(ae.isVisible())C=re;else if(N>=0)break}const le=C-N;return N-le<=0?n(4,f=0):n(4,f=N),h[f].scrollIntoView("end"),!0}if(l&&f>=0&&f<s.length&&v.key==="Enter")return y(i[f]),!0;if(l&&["1","2","3","4","5","6","7","8","9","0"].includes(v.key)){let N=v.key-1;return N===-1&&(N=9),N+1>i.length?!1:(y(i[N]),!0)}return!l&&f>=0&&f<s.length&&(v.key==="ArrowRight"||v.key==="Enter")?(T(i[f]),!0):!1}function y(v){r("itemActivated",{snippet:v})}function T(v){r("itemEdit",{snippet:v})}ai(()=>{h.length!==i.length&&n(6,h.length=i.length,h)});function P(v,N){ve[v?"unshift":"push"](()=>{h[N]=v,n(6,h)})}const k=v=>B(v);function x(v){ve[v?"unshift":"push"](()=>{u=v,n(0,u)})}return e.$$set=v=>{"snippets"in v&&n(13,s=v.snippets),"tabindex"in v&&n(1,o=v.tabindex),"selectMode"in v&&n(2,l=v.selectMode),"autofocus"in v&&n(3,a=v.autofocus),"ref"in v&&n(0,u=v.ref)},e.$$.update=()=>{e.$$.dirty&8192&&n(7,i=d(s))},[u,o,l,a,f,p,h,i,m,b,I,B,E,s,P,k,x]}class vl extends Y{constructor(t){super(),J(this,t,bl,gl,Z,{snippets:13,tabindex:1,selectMode:2,autofocus:3,ref:0})}}function wl(e){let t,n;const i=e[2].default,r=ht(i,e,e[1],null);return{c(){t=L("div"),r&&r.c(),c(t,"class","toolbar svelte-i867mn"),X(t,"bottom",e[0])},m(s,o){g(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&2)&&mt(r,i,s,s[1],n?pt(i,s[1],o,null):dt(s[1]),null),(!n||o&1)&&X(t,"bottom",s[0])},i(s){n||(w(r,s),n=!0)},o(s){S(r,s),n=!1},d(s){s&&_(t),r&&r.d(s)}}}function El(e,t,n){let{$$slots:i={},$$scope:r}=t,{bottom:s=!1}=t;return e.$$set=o=>{"bottom"in o&&n(0,s=o.bottom),"$$scope"in o&&n(1,r=o.$$scope)},[s,r,i]}class Rt extends Y{constructor(t){super(),J(this,t,El,wl,Z,{bottom:0})}}function yl(e){let t;return{c(){t=L("div"),c(t,"class","toolbar-spacer svelte-1a67v9")},m(n,i){g(n,t,i)},p:G,i:G,o:G,d(n){n&&_(t)}}}class kn extends Y{constructor(t){super(),J(this,t,null,yl,Z,{})}}function Sl(e){let t,n,i=e[6]("no_snippets_found.title")+"",r,s,o,l=e[6]("no_snippets_found.description")+"",a;return{c(){t=L("div"),n=L("p"),r=$(i),s=R(),o=L("p"),a=$(l),c(n,"class","no-snippets-found svelte-y4605t"),c(o,"class","no-snippets-found description dimmed svelte-y4605t"),c(t,"class","centered")},m(u,f){g(u,t,f),A(t,n),A(n,r),A(t,s),A(t,o),A(o,a)},p(u,f){f&64&&i!==(i=u[6]("no_snippets_found.title")+"")&&z(r,i),f&64&&l!==(l=u[6]("no_snippets_found.description")+"")&&z(a,l)},i:G,o:G,d(u){u&&_(t)}}}function kl(e){let t,n,i;function r(o){e[21](o)}let s={snippets:e[7],tabindex:2,selectMode:e[0],autofocus:e[8]};return e[4]!==void 0&&(s.ref=e[4]),t=new vl({props:s}),ve.push(()=>$e(t,"ref",r)),t.$on("itemActivated",e[12]),t.$on("itemEdit",e[13]),{c(){U(t.$$.fragment)},m(o,l){O(t,o,l),i=!0},p(o,l){const a={};l&128&&(a.snippets=o[7]),l&1&&(a.selectMode=o[0]),!n&&l&16&&(n=!0,a.ref=o[4],Ge(()=>n=!1)),t.$set(a)},i(o){i||(w(t.$$.fragment,o),i=!0)},o(o){S(t.$$.fragment,o),i=!1},d(o){M(t,o)}}}function ni(e){let t,n;return t=new Rt({props:{bottom:!0,$$slots:{default:[Al]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p(i,r){const s={};r&16777280&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function Al(e){let t,n,i,r,s,o;return t=new de({props:{iconClass:"dimmed",icon:Ot,size:"2.3x",title:e[6]("add_snippet.title")}}),t.$on("activate",e[10]),i=new kn({}),s=new de({props:{iconClass:"dimmed",icon:Ri,size:"2x",title:e[6]("settings.title")}}),s.$on("activate",e[11]),{c(){U(t.$$.fragment),n=R(),U(i.$$.fragment),r=R(),U(s.$$.fragment)},m(l,a){O(t,l,a),g(l,n,a),O(i,l,a),g(l,r,a),O(s,l,a),o=!0},p(l,a){const u={};a&64&&(u.title=l[6]("add_snippet.title")),t.$set(u);const f={};a&64&&(f.title=l[6]("settings.title")),s.$set(f)},i(l){o||(w(t.$$.fragment,l),w(i.$$.fragment,l),w(s.$$.fragment,l),o=!0)},o(l){S(t.$$.fragment,l),S(i.$$.fragment,l),S(s.$$.fragment,l),o=!1},d(l){l&&(_(n),_(r)),M(t,l),M(i,l),M(s,l)}}}function Bl(e){let t,n,i,r,s,o,l,a,u,f,p;function h(y){e[18](y)}function m(y){e[19](y)}function d(y){e[20](y)}let b={search:!0,autofocus:e[1],placeholder:e[6]("search"),searchButtonTitle:e[6]("search"),clearButtonTitle:e[6]("clear"),tabindex:1};e[2]!==void 0&&(b.value=e[2]),e[3]!==void 0&&(b.ref=e[3]),e[5]!==void 0&&(b.focussed=e[5]),n=new Sn({props:b}),ve.push(()=>$e(n,"value",h)),ve.push(()=>$e(n,"ref",m)),ve.push(()=>$e(n,"focussed",d)),n.$on("query",e[9]);const I=[kl,Sl],B=[];function E(y,T){return y[7]?0:1}l=E(e),a=B[l]=I[l](e);let H=!e[0]&&ni(e);return{c(){t=L("div"),U(n.$$.fragment),o=R(),a.c(),u=R(),H&&H.c(),f=ye(),c(t,"class","toolbar top")},m(y,T){g(y,t,T),O(n,t,null),g(y,o,T),B[l].m(y,T),g(y,u,T),H&&H.m(y,T),g(y,f,T),p=!0},p(y,T){const P={};T&2&&(P.autofocus=y[1]),T&64&&(P.placeholder=y[6]("search")),T&64&&(P.searchButtonTitle=y[6]("search")),T&64&&(P.clearButtonTitle=y[6]("clear")),!i&&T&4&&(i=!0,P.value=y[2],Ge(()=>i=!1)),!r&&T&8&&(r=!0,P.ref=y[3],Ge(()=>r=!1)),!s&&T&32&&(s=!0,P.focussed=y[5],Ge(()=>s=!1)),n.$set(P);let k=l;l=E(y),l===k?B[l].p(y,T):(ue(),S(B[k],1,1,()=>{B[k]=null}),fe(),a=B[l],a?a.p(y,T):(a=B[l]=I[l](y),a.c()),w(a,1),a.m(u.parentNode,u)),y[0]?H&&(ue(),S(H,1,1,()=>{H=null}),fe()):H?(H.p(y,T),T&1&&w(H,1)):(H=ni(y),H.c(),w(H,1),H.m(f.parentNode,f))},i(y){p||(w(n.$$.fragment,y),w(a),w(H),p=!0)},o(y){S(n.$$.fragment,y),S(a),S(H),p=!1},d(y){y&&(_(t),_(o),_(u),_(f)),M(n),B[l].d(y),H&&H.d(y)}}}function Tl(e){let t,n;return t=new et({props:{$$slots:{default:[Bl]},$$scope:{ctx:e}}}),t.$on("keyup",e[14]),t.$on("cancel",e[15]),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p(i,[r]){const s={};r&16777471&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function Il(e,t,n){let i,r,s,o;ne(e,we,C=>n(17,i=C)),ne(e,Jt,C=>n(2,r=C)),ne(e,Se,C=>n(6,s=C)),ne(e,Yt,C=>n(7,o=C));let{orderByLastUsed:l=!1}=t,{selectMode:a=!1}=t,{focusSearchBox:u=!0}=t;const f=!u;let p,h,m=u;function d(C){Wi(Jt,r=C.detail,r),Yt.search(r,l)}function b(){je("/snippet/add")}function I(){je("/settings")}function B(C){mr(C.detail.snippet.abbreviation,500)}function E(C){const le=C.detail.snippet.id;je("/snippet/edit/"+le)}function H(C,le,re){Yt.search(C,le)}function y(){m?h.focus():p.focus()}function T(C){C.ctrlKey&&C.key==="n"&&(b(),C.preventDefault()),C.ctrlKey&&C.altKey&&C.key==="s"&&(I(),C.preventDefault()),C.ctrlKey&&C.key==="f"&&(y(),C.preventDefault())}function P(){a&&er()}function k(C){r=C,Jt.set(r)}function x(C){p=C,n(3,p)}function v(C){m=C,n(5,m)}function N(C){h=C,n(4,h)}return e.$$set=C=>{"orderByLastUsed"in C&&n(16,l=C.orderByLastUsed),"selectMode"in C&&n(0,a=C.selectMode),"focusSearchBox"in C&&n(1,u=C.focusSearchBox)},e.$$.update=()=>{e.$$.dirty&196612&&H(r,l)},[a,u,r,p,h,m,s,o,f,d,b,I,B,E,T,P,l,i,k,x,v,N]}class Hl extends Y{constructor(t){super(),J(this,t,Il,Tl,Z,{orderByLastUsed:16,selectMode:0,focusSearchBox:1})}}function ii(e){let t,n,i,r,s,o,l,a;return n=new de({props:{iconClass:"dimmed",icon:Ot,title:e[0]("add_snippet.title"),size:"5x",$$slots:{default:[Cl]},$$scope:{ctx:e}}}),n.$on("activate",e[2]),s=new de({props:{horizontal:!0,iconClass:"dimmed",icon:hn,title:e[0]("import_snippets.title"),size:"1.5x",$$slots:{default:[Ll]},$$scope:{ctx:e}}}),s.$on("activate",e[4]),l=new Rt({props:{bottom:!0,$$slots:{default:[Pl]},$$scope:{ctx:e}}}),{c(){t=L("p"),U(n.$$.fragment),i=R(),r=L("p"),U(s.$$.fragment),o=R(),U(l.$$.fragment),c(t,"class","add-snippet"),c(r,"class","import-snippets")},m(u,f){g(u,t,f),O(n,t,null),g(u,i,f),g(u,r,f),O(s,r,null),g(u,o,f),O(l,u,f),a=!0},p(u,f){const p={};f&1&&(p.title=u[0]("add_snippet.title")),f&33&&(p.$$scope={dirty:f,ctx:u}),n.$set(p);const h={};f&1&&(h.title=u[0]("import_snippets.title")),f&33&&(h.$$scope={dirty:f,ctx:u}),s.$set(h);const m={};f&33&&(m.$$scope={dirty:f,ctx:u}),l.$set(m)},i(u){a||(w(n.$$.fragment,u),w(s.$$.fragment,u),w(l.$$.fragment,u),a=!0)},o(u){S(n.$$.fragment,u),S(s.$$.fragment,u),S(l.$$.fragment,u),a=!1},d(u){u&&(_(t),_(i),_(r),_(o)),M(n),M(s),M(l,u)}}}function Cl(e){let t=e[0]("add_snippet.title")+"",n;return{c(){n=$(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("add_snippet.title")+"")&&z(n,t)},d(i){i&&_(n)}}}function Ll(e){let t=e[0]("import_snippets.title")+"",n;return{c(){n=$(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("import_snippets.title")+"")&&z(n,t)},d(i){i&&_(n)}}}function Pl(e){let t,n,i,r,s,o;return t=new de({props:{iconClass:"dimmed",icon:Ot,size:"2.3x",title:e[0]("add_snippet.title")}}),t.$on("activate",e[2]),i=new kn({}),s=new de({props:{iconClass:"dimmed",icon:Ri,size:"2x",title:e[0]("settings.title")}}),s.$on("activate",e[3]),{c(){U(t.$$.fragment),n=R(),U(i.$$.fragment),r=R(),U(s.$$.fragment)},m(l,a){O(t,l,a),g(l,n,a),O(i,l,a),g(l,r,a),O(s,l,a),o=!0},p(l,a){const u={};a&1&&(u.title=l[0]("add_snippet.title")),t.$set(u);const f={};a&1&&(f.title=l[0]("settings.title")),s.$set(f)},i(l){o||(w(t.$$.fragment,l),w(i.$$.fragment,l),w(s.$$.fragment,l),o=!0)},o(l){S(t.$$.fragment,l),S(i.$$.fragment,l),S(s.$$.fragment,l),o=!1},d(l){l&&(_(n),_(r)),M(t,l),M(i,l),M(s,l)}}}function Nl(e){let t,n,i,r=e[0]("no_snippets_found.title")+"",s,o,l,a,u=e[1]&&ii(e);return{c(){t=L("h1"),t.textContent="Snippet Pixie",n=R(),i=L("p"),s=$(r),o=R(),u&&u.c(),l=ye(),c(i,"class","dimmed")},m(f,p){g(f,t,p),g(f,n,p),g(f,i,p),A(i,s),g(f,o,p),u&&u.m(f,p),g(f,l,p),a=!0},p(f,p){(!a||p&1)&&r!==(r=f[0]("no_snippets_found.title")+"")&&z(s,r),f[1]?u?(u.p(f,p),p&2&&w(u,1)):(u=ii(f),u.c(),w(u,1),u.m(l.parentNode,l)):u&&(ue(),S(u,1,1,()=>{u=null}),fe())},i(f){a||(w(u),a=!0)},o(f){S(u),a=!1},d(f){f&&(_(t),_(n),_(i),_(o),_(l)),u&&u.d(f)}}}function Ol(e){let t,n;return t=new et({props:{centered:!0,$$slots:{default:[Nl]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p(i,[r]){const s={};r&35&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function Ml(e,t,n){let i,r;ne(e,Se,a=>n(0,i=a)),ne(e,we,a=>n(1,r=a));function s(){je("/snippet/add")}function o(){je("/settings")}async function l(){try{const a=await mi(!1)}catch(a){await oe(i("import_snippets.error_title"),a)}await Me.fetch()}return[i,r,s,o,l]}class xl extends Y{constructor(t){super(),J(this,t,Ml,Ol,Z,{})}}function Rl(e){let t,n;return t=new xl({}),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p:G,i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function Ul(e){let t,n;return t=new Hl({props:{selectMode:e[2],orderByLastUsed:e[3],focusSearchBox:e[4]}}),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p(i,r){const s={};r&4&&(s.selectMode=i[2]),r&8&&(s.orderByLastUsed=i[3]),r&16&&(s.focusSearchBox=i[4]),t.$set(s)},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function Dl(e){let t;return{c(){t=$("Checking settings ...")},m(n,i){g(n,t,i)},p:G,i:G,o:G,d(n){n&&_(t)}}}function Gl(e){let t,n,i,r;const s=[Dl,Ul,Rl],o=[];function l(a,u){return a[1]?0:a[0]&&(a[5]&&a[5].length>0||a[2])?1:2}return t=l(e),n=o[t]=s[t](e),{c(){n.c(),i=ye()},m(a,u){o[t].m(a,u),g(a,i,u),r=!0},p(a,[u]){let f=t;t=l(a),t===f?o[t].p(a,u):(ue(),S(o[f],1,1,()=>{o[f]=null}),fe(),n=o[t],n?n.p(a,u):(n=o[t]=s[t](a),n.c()),w(n,1),n.m(i.parentNode,i))},i(a){r||(w(n),r=!0)},o(a){S(n),r=!1},d(a){a&&_(i),o[t].d(a)}}}function $l(e,t,n){let i,r,s;ne(e,Se,p=>n(6,i=p)),ne(e,we,p=>n(0,r=p)),ne(e,Me,p=>n(5,s=p));let o=!0,l=!1,a=!1,u=!0;function f(p){Me.fetch()}return Je(async()=>{if(n(2,l=await vr()),n(3,a=l),l&&r)try{const p=await hi("FOCUS_SEARCH_BOX");n(4,u=p!=="false")}catch(p){await oe(i("settings.get_error_title"),p)}n(1,o=!1)}),e.$$.update=()=>{e.$$.dirty&1&&f()},[r,o,l,a,u,s]}class jl extends Y{constructor(t){super(),J(this,t,$l,Gl,Z,{})}}function Fl(e){let t=e[4]("button.cancel")+"",n;return{c(){n=$(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("button.cancel")+"")&&z(n,t)},d(i){i&&_(n)}}}function zl(e){let t=e[4]("button.save")+"",n;return{c(){n=$(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("button.save")+"")&&z(n,t)},d(i){i&&_(n)}}}function Vl(e){let t,n=e[4]("add_snippet.title")+"",i,r,s,o,l,a,u=e[4]("body.title")+"",f,p,h,m,d,b,I,B,E,H,y;function T(k){e[8](k)}let P={label:e[4]("abbreviation.title"),errorMessage:e[1],autofocus:!0};return e[0]!==void 0&&(P.value=e[0]),s=new Sn({props:P}),ve.push(()=>$e(s,"value",T)),b=new Fe({props:{secondary:!0,$$slots:{default:[Fl]},$$scope:{ctx:e}}}),b.$on("click",e[5]),B=new Fe({props:{primary:!0,disabled:e[3],$$slots:{default:[zl]},$$scope:{ctx:e}}}),B.$on("click",e[6]),{c(){t=L("h2"),i=$(n),r=R(),U(s.$$.fragment),l=R(),a=L("label"),f=$(u),p=R(),h=L("textarea"),m=R(),d=L("div"),U(b.$$.fragment),I=R(),U(B.$$.fragment),c(t,"class","svelte-126nfs4"),c(a,"for","body"),c(h,"id","body"),c(h,"class","svelte-126nfs4"),c(d,"class","button-row svelte-126nfs4")},m(k,x){g(k,t,x),A(t,i),g(k,r,x),O(s,k,x),g(k,l,x),g(k,a,x),A(a,f),g(k,p,x),g(k,h,x),ze(h,e[2]),g(k,m,x),g(k,d,x),O(b,d,null),A(d,I),O(B,d,null),E=!0,H||(y=te(h,"input",e[9]),H=!0)},p(k,x){(!E||x&16)&&n!==(n=k[4]("add_snippet.title")+"")&&z(i,n);const v={};x&16&&(v.label=k[4]("abbreviation.title")),x&2&&(v.errorMessage=k[1]),!o&&x&1&&(o=!0,v.value=k[0],Ge(()=>o=!1)),s.$set(v),(!E||x&16)&&u!==(u=k[4]("body.title")+"")&&z(f,u),x&4&&ze(h,k[2]);const N={};x&2064&&(N.$$scope={dirty:x,ctx:k}),b.$set(N);const C={};x&8&&(C.disabled=k[3]),x&2064&&(C.$$scope={dirty:x,ctx:k}),B.$set(C)},i(k){E||(w(s.$$.fragment,k),w(b.$$.fragment,k),w(B.$$.fragment,k),E=!0)},o(k){S(s.$$.fragment,k),S(b.$$.fragment,k),S(B.$$.fragment,k),E=!1},d(k){k&&(_(t),_(r),_(l),_(a),_(p),_(h),_(m),_(d)),M(s,k),M(b),M(B),H=!1,y()}}}function Wl(e){let t,n;return t=new et({props:{$$slots:{default:[Vl]},$$scope:{ctx:e}}}),t.$on("cancel",e[5]),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p(i,[r]){const s={};r&2079&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function Xl(e,t,n){let i,r,s;ne(e,Se,d=>n(4,r=d)),ne(e,we,d=>n(7,s=d));let o="",l="";async function a(d){if(d.length===0){n(1,u=r("abbreviation.empty"));return}if(!s){n(1,u="");return}try{const b=await pi(d);if(b.hasOwnProperty("abbreviation")&&b.abbreviation.length>0){n(1,u=r("abbreviation.exists"));return}}catch(b){await oe(r("add_snippet.error_title"),b)}n(1,u="")}let u="";function f(){Be()}async function p(){try{const d=await tr(o,l);await Be()}catch(d){await oe(r("add_snippet.error_title"),d)}}function h(d){o=d,n(0,o)}function m(){l=this.value,n(2,l)}return e.$$.update=()=>{e.$$.dirty&1&&a(o),e.$$.dirty&130&&n(3,i=!s||u.length>0)},[o,u,l,i,r,f,p,s,h,m]}class ql extends Y{constructor(t){super(),J(this,t,Xl,Wl,Z,{})}}function Zl(e){let t=e[5]("button.remove")+"",n;return{c(){n=$(t)},m(i,r){g(i,n,r)},p(i,r){r&32&&t!==(t=i[5]("button.remove")+"")&&z(n,t)},d(i){i&&_(n)}}}function Ql(e){let t=e[5]("button.cancel")+"",n;return{c(){n=$(t)},m(i,r){g(i,n,r)},p(i,r){r&32&&t!==(t=i[5]("button.cancel")+"")&&z(n,t)},d(i){i&&_(n)}}}function Jl(e){let t=e[5]("button.save")+"",n;return{c(){n=$(t)},m(i,r){g(i,n,r)},p(i,r){r&32&&t!==(t=i[5]("button.save")+"")&&z(n,t)},d(i){i&&_(n)}}}function Yl(e){let t,n=e[5]("edit_snippet.title")+"",i,r,s,o,l,a,u=e[5]("body.title")+"",f,p,h,m,d,b,I,B,E,H,y,T,P;function k(v){e[11](v)}let x={label:e[5]("abbreviation.title"),errorMessage:e[1],autofocus:!0};return e[0]!==void 0&&(x.value=e[0]),s=new Sn({props:x}),ve.push(()=>$e(s,"value",k)),b=new Fe({props:{danger:!0,disabled:e[3],$$slots:{default:[Zl]},$$scope:{ctx:e}}}),b.$on("click",e[7]),B=new Fe({props:{secondary:!0,$$slots:{default:[Ql]},$$scope:{ctx:e}}}),B.$on("click",e[6]),H=new Fe({props:{primary:!0,disabled:e[4],$$slots:{default:[Jl]},$$scope:{ctx:e}}}),H.$on("click",e[8]),{c(){t=L("h2"),i=$(n),r=R(),U(s.$$.fragment),l=R(),a=L("label"),f=$(u),p=R(),h=L("textarea"),m=R(),d=L("div"),U(b.$$.fragment),I=R(),U(B.$$.fragment),E=R(),U(H.$$.fragment),c(t,"class","svelte-126nfs4"),c(a,"for","body"),c(h,"id","body"),c(h,"class","svelte-126nfs4"),c(d,"class","button-row svelte-126nfs4")},m(v,N){g(v,t,N),A(t,i),g(v,r,N),O(s,v,N),g(v,l,N),g(v,a,N),A(a,f),g(v,p,N),g(v,h,N),ze(h,e[2]),g(v,m,N),g(v,d,N),O(b,d,null),A(d,I),O(B,d,null),A(d,E),O(H,d,null),y=!0,T||(P=te(h,"input",e[12]),T=!0)},p(v,N){(!y||N&32)&&n!==(n=v[5]("edit_snippet.title")+"")&&z(i,n);const C={};N&32&&(C.label=v[5]("abbreviation.title")),N&2&&(C.errorMessage=v[1]),!o&&N&1&&(o=!0,C.value=v[0],Ge(()=>o=!1)),s.$set(C),(!y||N&32)&&u!==(u=v[5]("body.title")+"")&&z(f,u),N&4&&ze(h,v[2]);const le={};N&8&&(le.disabled=v[3]),N&32800&&(le.$$scope={dirty:N,ctx:v}),b.$set(le);const re={};N&32800&&(re.$$scope={dirty:N,ctx:v}),B.$set(re);const ae={};N&16&&(ae.disabled=v[4]),N&32800&&(ae.$$scope={dirty:N,ctx:v}),H.$set(ae)},i(v){y||(w(s.$$.fragment,v),w(b.$$.fragment,v),w(B.$$.fragment,v),w(H.$$.fragment,v),y=!0)},o(v){S(s.$$.fragment,v),S(b.$$.fragment,v),S(B.$$.fragment,v),S(H.$$.fragment,v),y=!1},d(v){v&&(_(t),_(r),_(l),_(a),_(p),_(h),_(m),_(d)),M(s,v),M(b),M(B),M(H),T=!1,P()}}}function Kl(e){let t,n;return t=new et({props:{$$slots:{default:[Yl]},$$scope:{ctx:e}}}),t.$on("cancel",e[6]),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p(i,[r]){const s={};r&32831&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function ea(e,t,n){let i,r,s,o;ne(e,Se,E=>n(5,s=E)),ne(e,we,E=>n(10,o=E));let{params:l={}}=t,a={},u="",f="";async function p(E){if(n(1,h=""),!!a.hasOwnProperty("id")){if(E.length===0){n(1,h=s("abbreviation.empty"));return}if(o)try{const H=await pi(E);H.hasOwnProperty("abbreviation")&&H.abbreviation.length>0&&H.id!==a.id&&n(1,h=s("abbreviation.exists"))}catch(H){await oe(s("edit_snippet.error_title"),H)}}}let h="";function m(){Be()}async function d(){try{await _r(a.abbreviation),await Be()}catch(E){await oe(s("remove_snippet.error_title"),E)}}async function b(){let E={...a};E.abbreviation=u,E.body=f;try{await Sr(a.id,E),await Be()}catch(H){await oe(s("edit_snippet.error_title"),H)}}Je(async()=>{l.hasOwnProperty("id")||(await oe(s("edit_snippet.error_title"),s("edit_snippet.id_not_supplied")),await Be());try{a=await fr(l.id)}catch(H){await oe(s("edit_snippet.error_title"),H),await Be()}let E=!1;try{E=await pr(a.id)}catch(H){await oe(s("edit_snippet.error_title"),H),await Be()}E&&(await oe(s("edit_snippet.error_title"),s("edit_snippet.snippet_not_found")),await Be()),n(0,u=a.abbreviation),n(2,f=a.body)});function I(E){u=E,n(0,u)}function B(){f=this.value,n(2,f)}return e.$$set=E=>{"params"in E&&n(9,l=E.params)},e.$$.update=()=>{e.$$.dirty&1&&p(u),e.$$.dirty&1026&&n(4,i=!o||h.length>0),e.$$.dirty&1024&&n(3,r=!o)},[u,h,f,r,i,s,m,d,b,l,o,I,B]}class ta extends Y{constructor(t){super(),J(this,t,ea,Kl,Z,{params:9})}}function na(e){let t,n,i,r,s,o;return t=new de({props:{horizontal:!0,iconClass:"dimmed",icon:xi,size:"2.5x",title:e[6]("button.back")}}),t.$on("activate",e[8]),i=new kn({}),s=new de({props:{horizontal:!0,iconClass:"dimmed",icon:wo,size:"2.5x",title:e[6]("button.about")}}),s.$on("activate",e[9]),{c(){U(t.$$.fragment),n=R(),U(i.$$.fragment),r=R(),U(s.$$.fragment)},m(l,a){O(t,l,a),g(l,n,a),O(i,l,a),g(l,r,a),O(s,l,a),o=!0},p(l,a){const u={};a[0]&64&&(u.title=l[6]("button.back")),t.$set(u);const f={};a[0]&64&&(f.title=l[6]("button.about")),s.$set(f)},i(l){o||(w(t.$$.fragment,l),w(i.$$.fragment,l),w(s.$$.fragment,l),o=!0)},o(l){S(t.$$.fragment,l),S(i.$$.fragment,l),S(s.$$.fragment,l),o=!1},d(l){l&&(_(n),_(r)),M(t,l),M(i,l),M(s,l)}}}function ia(e){let t,n=e[6]("settings.custom_shortcuts_disabled")+"",i;return{c(){t=L("p"),i=$(n),c(t,"class","dimmed svelte-1fggvh7")},m(r,s){g(r,t,s),A(t,i)},p(r,s){s[0]&64&&n!==(n=r[6]("settings.custom_shortcuts_disabled")+"")&&z(i,n)},i:G,o:G,d(r){r&&_(t)}}}function ra(e){let t,n,i,r;const s=[oa,sa],o=[];function l(a,u){return a[5].length>0?0:1}return t=l(e),n=o[t]=s[t](e),{c(){n.c(),i=ye()},m(a,u){o[t].m(a,u),g(a,i,u),r=!0},p(a,u){let f=t;t=l(a),t===f?o[t].p(a,u):(ue(),S(o[f],1,1,()=>{o[f]=null}),fe(),n=o[t],n?n.p(a,u):(n=o[t]=s[t](a),n.c()),w(n,1),n.m(i.parentNode,i))},i(a){r||(w(n),r=!0)},o(a){S(n),r=!1},d(a){a&&_(i),o[t].d(a)}}}function sa(e){let t,n=e[6]("settings.custom_shortcut")+"",i,r,s,o,l,a;return s=new xt({props:{shortcut:e[6]("settings.custom_shortcut_empty")}}),l=new de({props:{horizontal:!0,iconClass:"dimmed",icon:Ot,size:"2.0x",title:e[6]("settings.add_default_custom_shortcut")}}),l.$on("activate",e[22]),{c(){t=L("p"),i=$(n),r=$(": "),U(s.$$.fragment),o=R(),U(l.$$.fragment),c(t,"class","row svelte-1fggvh7")},m(u,f){g(u,t,f),A(t,i),A(t,r),O(s,t,null),A(t,o),O(l,t,null),a=!0},p(u,f){(!a||f[0]&64)&&n!==(n=u[6]("settings.custom_shortcut")+"")&&z(i,n);const p={};f[0]&64&&(p.shortcut=u[6]("settings.custom_shortcut_empty")),s.$set(p);const h={};f[0]&64&&(h.title=u[6]("settings.add_default_custom_shortcut")),l.$set(h)},i(u){a||(w(s.$$.fragment,u),w(l.$$.fragment,u),a=!0)},o(u){S(s.$$.fragment,u),S(l.$$.fragment,u),a=!1},d(u){u&&_(t),M(s),M(l)}}}function oa(e){let t,n=e[6]("settings.custom_shortcut")+"",i,r,s,o,l,a,u,f=e[6]("settings.change_custom_shortcut_desc")+"",p,h;return s=new xt({props:{shortcut:e[5]}}),l=new de({props:{horizontal:!0,iconClass:"dimmed",icon:Co,size:"1.75x",title:e[6]("settings.remove_custom_shortcut")}}),l.$on("activate",e[21]),{c(){t=L("p"),i=$(n),r=$(": "),U(s.$$.fragment),o=R(),U(l.$$.fragment),a=R(),u=L("p"),p=$(f),c(t,"class","row svelte-1fggvh7"),c(u,"class","dimmed svelte-1fggvh7")},m(m,d){g(m,t,d),A(t,i),A(t,r),O(s,t,null),A(t,o),O(l,t,null),g(m,a,d),g(m,u,d),A(u,p),h=!0},p(m,d){(!h||d[0]&64)&&n!==(n=m[6]("settings.custom_shortcut")+"")&&z(i,n);const b={};d[0]&32&&(b.shortcut=m[5]),s.$set(b);const I={};d[0]&64&&(I.title=m[6]("settings.remove_custom_shortcut")),l.$set(I),(!h||d[0]&64)&&f!==(f=m[6]("settings.change_custom_shortcut_desc")+"")&&z(p,f)},i(m){h||(w(s.$$.fragment,m),w(l.$$.fragment,m),h=!0)},o(m){S(s.$$.fragment,m),S(l.$$.fragment,m),h=!1},d(m){m&&(_(t),_(a),_(u)),M(s),M(l)}}}function la(e){let t=e[6]("settings.no_connection")+"",n;return{c(){n=$(t)},m(i,r){g(i,n,r)},p(i,r){r[0]&64&&t!==(t=i[6]("settings.no_connection")+"")&&z(n,t)},i:G,o:G,d(i){i&&_(n)}}}function aa(e){let t,n=e[6]("settings.import_export_title")+"",i,r,s,o,l,a,u,f,p;o=new de({props:{horizontal:!0,iconClass:"dimmed",icon:hn,size:"1.5x",title:e[6]("import_snippets.new_only_title"),$$slots:{default:[ua]},$$scope:{ctx:e}}}),o.$on("activate",e[25]),a=new de({props:{horizontal:!0,iconClass:"dimmed",icon:hn,size:"1.5x",title:e[6]("import_snippets.update_title"),$$slots:{default:[fa]},$$scope:{ctx:e}}}),a.$on("activate",e[26]);let h=e[7]&&e[7].length>0&&ri(e);return{c(){t=L("h3"),i=$(n),r=R(),s=L("p"),U(o.$$.fragment),l=R(),U(a.$$.fragment),u=R(),h&&h.c(),f=ye(),c(t,"class","svelte-1fggvh7"),c(s,"class","import-snippets svelte-1fggvh7")},m(m,d){g(m,t,d),A(t,i),g(m,r,d),g(m,s,d),O(o,s,null),A(s,l),O(a,s,null),g(m,u,d),h&&h.m(m,d),g(m,f,d),p=!0},p(m,d){(!p||d[0]&64)&&n!==(n=m[6]("settings.import_export_title")+"")&&z(i,n);const b={};d[0]&64&&(b.title=m[6]("import_snippets.new_only_title")),d[0]&64|d[1]&4&&(b.$$scope={dirty:d,ctx:m}),o.$set(b);const I={};d[0]&64&&(I.title=m[6]("import_snippets.update_title")),d[0]&64|d[1]&4&&(I.$$scope={dirty:d,ctx:m}),a.$set(I),m[7]&&m[7].length>0?h?(h.p(m,d),d[0]&128&&w(h,1)):(h=ri(m),h.c(),w(h,1),h.m(f.parentNode,f)):h&&(ue(),S(h,1,1,()=>{h=null}),fe())},i(m){p||(w(o.$$.fragment,m),w(a.$$.fragment,m),w(h),p=!0)},o(m){S(o.$$.fragment,m),S(a.$$.fragment,m),S(h),p=!1},d(m){m&&(_(t),_(r),_(s),_(u),_(f)),M(o),M(a),h&&h.d(m)}}}function ua(e){let t=e[6]("import_snippets.new_only_title")+"",n;return{c(){n=$(t)},m(i,r){g(i,n,r)},p(i,r){r[0]&64&&t!==(t=i[6]("import_snippets.new_only_title")+"")&&z(n,t)},d(i){i&&_(n)}}}function fa(e){let t=e[6]("import_snippets.update_title")+"",n;return{c(){n=$(t)},m(i,r){g(i,n,r)},p(i,r){r[0]&64&&t!==(t=i[6]("import_snippets.update_title")+"")&&z(n,t)},d(i){i&&_(n)}}}function ri(e){let t,n,i;return n=new de({props:{horizontal:!0,iconClass:"dimmed",icon:fo,size:"1.5x",title:e[6]("export_snippets.title"),$$slots:{default:[ca]},$$scope:{ctx:e}}}),n.$on("activate",e[16]),{c(){t=L("p"),U(n.$$.fragment),c(t,"class","export-snippets svelte-1fggvh7")},m(r,s){g(r,t,s),O(n,t,null),i=!0},p(r,s){const o={};s[0]&64&&(o.title=r[6]("export_snippets.title")),s[0]&64|s[1]&4&&(o.$$scope={dirty:s,ctx:r}),n.$set(o)},i(r){i||(w(n.$$.fragment,r),i=!0)},o(r){S(n.$$.fragment,r),i=!1},d(r){r&&_(t),M(n)}}}function ca(e){let t=e[6]("export_snippets.title")+"",n;return{c(){n=$(t)},m(i,r){g(i,n,r)},p(i,r){r[0]&64&&t!==(t=i[6]("export_snippets.title")+"")&&z(n,t)},d(i){i&&_(n)}}}function ha(e){let t,n,i,r=e[6]("settings.title")+"",s,o,l,a=e[6]("settings.autostart_title")+"",u,f,p,h,m,d,b=e[6]("settings.autostart")+"",I,B,E,H=e[6]("settings.autoexpand_title")+"",y,T,P,k,x,v,N=e[6]("settings.autoexpand")+"",C,le,re,ae=e[6]("settings.search_and_paste_title")+"",_e,ge,ce,pe,he,j,ie,F,K,Ne=e[6]("settings.focus_search")+"",Ut,Dt,be,ke,tt,Ae,Gt,An;t=new Rt({props:{$$slots:{default:[na]},$$scope:{ctx:e}}});const Bn=[ra,ia],Ie=[];function Tn(D,W){return D[4]?0:1}ce=Tn(e),pe=Ie[ce]=Bn[ce](e);const In=[aa,la],He=[];function Hn(D,W){return D[0]?0:1}return be=Hn(e),ke=He[be]=In[be](e),{c(){U(t.$$.fragment),n=R(),i=L("h2"),s=$(r),o=R(),l=L("h3"),u=$(a),f=R(),p=L("p"),h=L("label"),m=L("input"),d=R(),I=$(b),B=R(),E=L("h3"),y=$(H),T=R(),P=L("p"),k=L("label"),x=L("input"),v=R(),C=$(N),le=R(),re=L("h3"),_e=$(ae),ge=R(),pe.c(),he=R(),j=L("p"),ie=L("label"),F=L("input"),K=R(),Ut=$(Ne),Dt=R(),ke.c(),tt=ye(),c(i,"class","svelte-1fggvh7"),c(l,"class","svelte-1fggvh7"),c(m,"type","checkbox"),c(p,"class","svelte-1fggvh7"),c(E,"class","svelte-1fggvh7"),c(x,"type","checkbox"),c(P,"class","svelte-1fggvh7"),c(re,"class","svelte-1fggvh7"),c(F,"type","checkbox"),c(j,"class","svelte-1fggvh7")},m(D,W){O(t,D,W),g(D,n,W),g(D,i,W),A(i,s),g(D,o,W),g(D,l,W),A(l,u),g(D,f,W),g(D,p,W),A(p,h),A(h,m),m.checked=e[1],A(h,d),A(h,I),g(D,B,W),g(D,E,W),A(E,y),g(D,T,W),g(D,P,W),A(P,k),A(k,x),x.checked=e[2],A(k,v),A(k,C),g(D,le,W),g(D,re,W),A(re,_e),g(D,ge,W),Ie[ce].m(D,W),g(D,he,W),g(D,j,W),A(j,ie),A(ie,F),F.checked=e[3],A(ie,K),A(ie,Ut),g(D,Dt,W),He[be].m(D,W),g(D,tt,W),Ae=!0,Gt||(An=[te(m,"change",e[17]),te(m,"change",e[18]),dn(Ui.call(null,m,!0)),te(x,"change",e[19]),te(x,"change",e[20]),te(F,"change",e[23]),te(F,"change",e[24])],Gt=!0)},p(D,W){const Cn={};W[0]&64|W[1]&4&&(Cn.$$scope={dirty:W,ctx:D}),t.$set(Cn),(!Ae||W[0]&64)&&r!==(r=D[6]("settings.title")+"")&&z(s,r),(!Ae||W[0]&64)&&a!==(a=D[6]("settings.autostart_title")+"")&&z(u,a),W[0]&2&&(m.checked=D[1]),(!Ae||W[0]&64)&&b!==(b=D[6]("settings.autostart")+"")&&z(I,b),(!Ae||W[0]&64)&&H!==(H=D[6]("settings.autoexpand_title")+"")&&z(y,H),W[0]&4&&(x.checked=D[2]),(!Ae||W[0]&64)&&N!==(N=D[6]("settings.autoexpand")+"")&&z(C,N),(!Ae||W[0]&64)&&ae!==(ae=D[6]("settings.search_and_paste_title")+"")&&z(_e,ae);let $t=ce;ce=Tn(D),ce===$t?Ie[ce].p(D,W):(ue(),S(Ie[$t],1,1,()=>{Ie[$t]=null}),fe(),pe=Ie[ce],pe?pe.p(D,W):(pe=Ie[ce]=Bn[ce](D),pe.c()),w(pe,1),pe.m(he.parentNode,he)),W[0]&8&&(F.checked=D[3]),(!Ae||W[0]&64)&&Ne!==(Ne=D[6]("settings.focus_search")+"")&&z(Ut,Ne);let jt=be;be=Hn(D),be===jt?He[be].p(D,W):(ue(),S(He[jt],1,1,()=>{He[jt]=null}),fe(),ke=He[be],ke?ke.p(D,W):(ke=He[be]=In[be](D),ke.c()),w(ke,1),ke.m(tt.parentNode,tt))},i(D){Ae||(w(t.$$.fragment,D),w(pe),w(ke),Ae=!0)},o(D){S(t.$$.fragment,D),S(pe),S(ke),Ae=!1},d(D){D&&(_(n),_(i),_(o),_(l),_(f),_(p),_(B),_(E),_(T),_(P),_(le),_(re),_(ge),_(he),_(j),_(Dt),_(tt)),M(t,D),Ie[ce].d(D),He[be].d(D),Gt=!1,Ee(An)}}}function pa(e){let t,n;return t=new et({props:{centered:!0,$$slots:{default:[ha]},$$scope:{ctx:e}}}),t.$on("cancel",e[8]),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p(i,r){const s={};r[0]&255|r[1]&4&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}const ma="Snippet Pixie Search & Paste pop-up window",Kt="snippetpixiegui --search-and-paste",si="<Ctrl>grave";function da(e,t,n){let i,r,s;ne(e,Se,j=>n(6,i=j)),ne(e,we,j=>n(0,r=j)),ne(e,Me,j=>n(7,s=j));let o=!1,l=!1,a=!0,u=!1,f=si;function p(){Be()}function h(){je("/about")}async function m(){let j=!1;try{j=await ar()}catch(ie){await oe(i("settings.get_error_title"),ie);return}return j}async function d(j){try{await yr(j)}catch(ie){await oe(i("settings.save_error_title"),ie);return}return j}async function b(){let j=!1;try{j=await lr()}catch(ie){await oe(i("settings.get_error_title"),ie);return}return j}async function I(j){try{await Er(j)}catch(ie){await oe(i("settings.save_error_title"),ie);return}return j}async function B(){let j="";try{j=await hi("FOCUS_SEARCH_BOX")}catch(ie){await oe(i("settings.get_error_title"),ie);return}return j!=="false"}async function E(){let j=!1;try{j=await nr()}catch(ie){await oe(i("settings.get_error_title"),ie);return}return j}async function H(){try{n(5,f=await ur(Kt))}catch(j){await oe(i("settings.get_error_title"),j);return}}async function y(){try{await gr(ma,si,Kt,"")}catch(j){await oe(i("settings.save_error_title"),j)}await H()}async function T(){try{await rr(Kt,f)}catch(j){await oe(i("settings.delete_error_title"),j)}await H()}async function P(j){const ie=j?"true":"false";try{await br("FOCUS_SEARCH_BOX",ie)}catch(F){await oe(i("settings.save_error_title"),F);return}return j}function k(j){Me.fetch()}async function x(j){try{const ie=await mi(j)}catch(ie){await oe(i("import_snippets.error_title"),ie)}await Me.fetch()}async function v(){try{const j=await sr()}catch(j){await oe(i("export_snippets.error_title"),j)}}Je(async()=>{n(1,o=await m()),n(2,l=await b()),n(3,a=await B()),n(4,u=await E()),u&&await H()});function N(){o=this.checked,n(1,o)}const C=()=>d(o);function le(){l=this.checked,n(2,l)}const re=()=>I(l),ae=()=>T(),_e=()=>y();function ge(){a=this.checked,n(3,a)}const ce=()=>P(a),pe=()=>x(!1),he=()=>x(!0);return e.$$.update=()=>{e.$$.dirty[0]&1&&k()},[r,o,l,a,u,f,i,s,p,h,d,I,y,T,P,x,v,N,C,le,re,ae,_e,ge,ce,pe,he]}class _a extends Y{constructor(t){super(),J(this,t,da,pa,Z,{},null,[-1,-1])}}const ga="/assets/snippetpixie-icon-128-1d7040bc.svg";function ba(e){let t,n;return t=new de({props:{horizontal:!0,iconClass:"dimmed",icon:xi,size:"2.5x",title:e[3]("button.back")}}),t.$on("activate",e[4]),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p(i,r){const s={};r&8&&(s.title=i[3]("button.back")),t.$set(s)},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function va(e){let t,n,i,r,s,o,l,a,u,f=e[3]("about.description")+"",p,h,m,d,b,I,B,E,H,y,T=e[3]("about.by")+"",P,k,x,v,N,C,le=e[3]("about.licence_title")+"",re,ae,_e,ge,ce=e[3]("about.licence")+"",pe,he,j,ie;return t=new Rt({props:{$$slots:{default:[ba]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment),n=R(),i=L("img"),s=R(),o=L("h2"),o.textContent="Snippet Pixie",l=R(),a=L("p"),u=L("em"),p=$(f),h=R(),m=L("p"),d=L("a"),b=$(e[2]),I=R(),B=L("p"),E=L("a"),E.textContent="snippetpixie.org",H=R(),y=L("h3"),P=$(T),k=R(),x=L("p"),v=L("a"),v.textContent="ianmjones",N=R(),C=L("h3"),re=$(le),ae=R(),_e=L("p"),ge=L("a"),pe=$(ce),zi(i.src,r=ga)||c(i,"src",r),c(i,"alt","Snippet Pixie icon"),c(o,"class","svelte-sjm2tb"),c(a,"class","svelte-sjm2tb"),c(d,"href",e[0]),c(m,"class","svelte-sjm2tb"),c(E,"href","https://snippetpixie.org"),c(B,"class","svelte-sjm2tb"),c(y,"class","svelte-sjm2tb"),c(v,"href","https://ianmjones.com"),c(x,"class","svelte-sjm2tb"),c(C,"class","svelte-sjm2tb"),c(ge,"href",e[1]),c(_e,"class","svelte-sjm2tb")},m(F,K){O(t,F,K),g(F,n,K),g(F,i,K),g(F,s,K),g(F,o,K),g(F,l,K),g(F,a,K),A(a,u),A(u,p),g(F,h,K),g(F,m,K),A(m,d),A(d,b),g(F,I,K),g(F,B,K),A(B,E),g(F,H,K),g(F,y,K),A(y,P),g(F,k,K),g(F,x,K),A(x,v),g(F,N,K),g(F,C,K),A(C,re),g(F,ae,K),g(F,_e,K),A(_e,ge),A(ge,pe),he=!0,j||(ie=[te(d,"click",vt(e[6])),te(E,"click",vt(e[7])),te(v,"click",vt(e[8])),te(ge,"click",vt(e[9]))],j=!0)},p(F,K){const Ne={};K&1032&&(Ne.$$scope={dirty:K,ctx:F}),t.$set(Ne),(!he||K&8)&&f!==(f=F[3]("about.description")+"")&&z(p,f),(!he||K&4)&&z(b,F[2]),(!he||K&1)&&c(d,"href",F[0]),(!he||K&8)&&T!==(T=F[3]("about.by")+"")&&z(P,T),(!he||K&8)&&le!==(le=F[3]("about.licence_title")+"")&&z(re,le),(!he||K&8)&&ce!==(ce=F[3]("about.licence")+"")&&z(pe,ce),(!he||K&2)&&c(ge,"href",F[1])},i(F){he||(w(t.$$.fragment,F),he=!0)},o(F){S(t.$$.fragment,F),he=!1},d(F){F&&(_(n),_(i),_(s),_(o),_(l),_(a),_(h),_(m),_(I),_(B),_(H),_(y),_(k),_(x),_(N),_(C),_(ae),_(_e)),M(t,F),j=!1,Ee(ie)}}}function wa(e){let t,n;return t=new et({props:{centered:!0,$$slots:{default:[va]},$$scope:{ctx:e}}}),t.$on("cancel",e[4]),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p(i,[r]){const s={};r&1039&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function Ea(e,t,n){let i,r,s,o;ne(e,Se,m=>n(3,o=m));function l(){Be()}let a="";Je(async()=>{n(5,a=await hr())});const u=()=>wt(r),f=()=>wt("https://snippetpixie.org"),p=()=>wt("https://ianmjones.com"),h=()=>wt(s);return e.$$.update=()=>{e.$$.dirty&32&&n(2,i="v"+a),e.$$.dirty&32&&n(0,r="https://git.sr.ht/~ianmjones/snippetpixie/tree/"+a),e.$$.dirty&1&&n(1,s=r+"/item/LICENSE")},[r,s,i,o,l,a,u,f,p,h]}class ya extends Y{constructor(t){super(),J(this,t,Ea,wa,Z,{})}}function Sa(e){let t,n;return t=new no({props:{routes:e[1]}}),{c(){U(t.$$.fragment)},m(i,r){O(t,i,r),n=!0},p:G,i(i){n||(w(t.$$.fragment,i),n=!0)},o(i){S(t.$$.fragment,i),n=!1},d(i){M(t,i)}}}function ka(e){let t;return{c(){t=$("Loading...")},m(n,i){g(n,t,i)},p:G,i:G,o:G,d(n){n&&_(t)}}}function Aa(e){let t,n,i,r;const s=[ka,Sa],o=[];function l(a,u){return a[0]?0:1}return t=l(e),n=o[t]=s[t](e),{c(){n.c(),i=ye()},m(a,u){o[t].m(a,u),g(a,i,u),r=!0},p(a,[u]){let f=t;t=l(a),t===f?o[t].p(a,u):(ue(),S(o[f],1,1,()=>{o[f]=null}),fe(),n=o[t],n?n.p(a,u):(n=o[t]=s[t](a),n.c()),w(n,1),n.m(i.parentNode,i))},i(a){r||(w(n),r=!0)},o(a){S(n),r=!1},d(a){a&&_(i),o[t].d(a)}}}function Ba(e,t,n){let i;ne(e,kt,a=>n(0,i=a));let r;async function s(){try{const a=await dr("Pong");a==="Pong"?we.update(u=>!0):(we.update(u=>!1),Vt("Got '"+a+"' back from Ping instead of 'Pong'.")),rt.update(u=>!0),Ht.update(u=>!1)}catch(a){we.update(u=>!1),Vt("Ping returned: "+a),o()}}async function o(){try{await ir()?rt.update(u=>!0):rt.update(u=>!1)}catch(a){rt.update(u=>!1),Vt("DaemonInstalled returned: "+a)}}Os("en-GB",()=>Fi(()=>import("./en-GB-d3e97a3e.js"),[])),xs({fallbackLocale:"en-GB",initialLocale:Rs()});const l={"/":jl,"/snippet/add":ql,"/snippet/edit/:id":ta,"/settings":_a,"/about":ya};return Je(async()=>{await s(),r=setInterval(s,5e3)}),_n(()=>{clearInterval(r)}),[i,l]}class Ta extends Y{constructor(t){super(),J(this,t,Ba,Aa,Z,{})}}new Ta({target:document.getElementById("app")});

D cmd/snippetpixiegui/frontend/dist/assets/index-95462b26.js => cmd/snippetpixiegui/frontend/dist/assets/index-95462b26.js +0 -5
@@ 1,5 0,0 @@
var Ci=Object.defineProperty;var Li=(e,t,n)=>t in e?Ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xt=(e,t,n)=>(Li(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();const Pi="modulepreload",Ni=function(e){return"/"+e},yn={},Oi=function(t,n,i){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=Ni(s),s in yn)return;yn[s]=!0;const o=s.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!i)for(let f=r.length-1;f>=0;f--){const p=r[f];if(p.href===s&&(!o||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${l}`))return;const a=document.createElement("link");if(a.rel=o?"stylesheet":Pi,o||(a.as="script",a.crossOrigin=""),a.href=s,document.head.appendChild(a),o)return new Promise((f,p)=>{a.addEventListener("load",f),a.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function G(){}function sn(e,t){for(const n in t)e[n]=t[n];return e}function Qn(e){return e()}function Sn(){return Object.create(null)}function de(e){e.forEach(Qn)}function qe(e){return typeof e=="function"}function J(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let _t;function Mi(e,t){return e===t?!0:(_t||(_t=document.createElement("a")),_t.href=t,e===_t.href)}function xi(e){return Object.keys(e).length===0}function on(e,...t){if(e==null){for(const i of t)i(void 0);return G}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function kn(e){let t;return on(e,n=>t=n)(),t}function ie(e,t,n){e.$$.on_destroy.push(on(t,n))}function ft(e,t,n,i){if(e){const r=Jn(e,t,n,i);return e[0](r)}}function Jn(e,t,n,i){return e[1]&&i?sn(n.ctx.slice(),e[1](i(t))):n.ctx}function ct(e,t,n,i){if(e[2]&&i){const r=e[2](i(n));if(t.dirty===void 0)return r;if(typeof r=="object"){const s=[],o=Math.max(t.dirty.length,r.length);for(let l=0;l<o;l+=1)s[l]=t.dirty[l]|r[l];return s}return t.dirty|r}return t.dirty}function ht(e,t,n,i,r,s){if(r){const o=Jn(t,n,i,s);e.p(o,r)}}function pt(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let i=0;i<n;i++)t[i]=-1;return t}return-1}function Ri(e,t,n){return e.set(n),t}function ln(e){return e&&qe(e.destroy)?e.destroy:G}function T(e,t){e.appendChild(t)}function g(e,t,n){e.insertBefore(t,n||null)}function _(e){e.parentNode&&e.parentNode.removeChild(e)}function Ui(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function P(e){return document.createElement(e)}function X(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function j(e){return document.createTextNode(e)}function R(){return j(" ")}function we(){return j("")}function ne(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function gt(e){return function(t){return t.preventDefault(),e.call(this,t)}}function c(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Di(e){return Array.from(e.childNodes)}function z(e,t){t=""+t,e.data!==t&&(e.data=t)}function je(e,t){e.value=t??""}function W(e,t,n){e.classList.toggle(t,!!n)}function Gi(e,t,{bubbles:n=!1,cancelable:i=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:i})}function Fe(e,t){return new e(t)}let ot;function it(e){ot=e}function It(){if(!ot)throw new Error("Function called outside component initialization");return ot}function Ze(e){It().$$.on_mount.push(e)}function Yn(e){It().$$.after_update.push(e)}function an(e){It().$$.on_destroy.push(e)}function mt(){const e=It();return(t,n,{cancelable:i=!1}={})=>{const r=e.$$.callbacks[t];if(r){const s=Gi(t,n,{cancelable:i});return r.slice().forEach(o=>{o.call(e,s)}),!s.defaultPrevented}return!0}}function lt(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach(i=>i.call(this,t))}const xe=[],he=[];let Re=[];const Wt=[],Kn=Promise.resolve();let Xt=!1;function ei(){Xt||(Xt=!0,Kn.then(ti))}function un(){return ei(),Kn}function qt(e){Re.push(e)}function Ue(e){Wt.push(e)}const Rt=new Set;let Oe=0;function ti(){if(Oe!==0)return;const e=ot;do{try{for(;Oe<xe.length;){const t=xe[Oe];Oe++,it(t),$i(t.$$)}}catch(t){throw xe.length=0,Oe=0,t}for(it(null),xe.length=0,Oe=0;he.length;)he.pop()();for(let t=0;t<Re.length;t+=1){const n=Re[t];Rt.has(n)||(Rt.add(n),n())}Re.length=0}while(xe.length);for(;Wt.length;)Wt.pop()();Xt=!1,Rt.clear(),it(e)}function $i(e){if(e.fragment!==null){e.update(),de(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(qt)}}function ji(e){const t=[],n=[];Re.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),Re=t}const wt=new Set;let Le;function ae(){Le={r:0,c:[],p:Le}}function ue(){Le.r||de(Le.c),Le=Le.p}function y(e,t){e&&e.i&&(wt.delete(e),e.i(t))}function k(e,t,n,i){if(e&&e.o){if(wt.has(e))return;wt.add(e),Le.c.push(()=>{wt.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function An(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function kt(e,t){const n={},i={},r={$$scope:1};let s=e.length;for(;s--;){const o=e[s],l=t[s];if(l){for(const u in o)u in l||(i[u]=1);for(const u in l)r[u]||(n[u]=l[u],r[u]=1);e[s]=l}else for(const u in o)r[u]=1}for(const o in i)o in n||(n[o]=void 0);return n}function At(e){return typeof e=="object"&&e!==null?e:{}}function De(e,t,n){const i=e.$$.props[t];i!==void 0&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function U(e){e&&e.c()}function M(e,t,n){const{fragment:i,after_update:r}=e.$$;i&&i.m(t,n),qt(()=>{const s=e.$$.on_mount.map(Qn).filter(qe);e.$$.on_destroy?e.$$.on_destroy.push(...s):de(s),e.$$.on_mount=[]}),r.forEach(qt)}function x(e,t){const n=e.$$;n.fragment!==null&&(ji(n.after_update),de(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Fi(e,t){e.$$.dirty[0]===-1&&(xe.push(e),ei(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function K(e,t,n,i,r,s,o,l=[-1]){const u=ot;it(e);const a=e.$$={fragment:null,ctx:[],props:s,update:G,not_equal:r,bound:Sn(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Sn(),dirty:l,skip_bound:!1,root:t.target||u.$$.root};o&&o(a.root);let f=!1;if(a.ctx=n?n(e,t.props||{},(p,h,...m)=>{const d=m.length?m[0]:h;return a.ctx&&r(a.ctx[p],a.ctx[p]=d)&&(!a.skip_bound&&a.bound[p]&&a.bound[p](d),f&&Fi(e,p)),h}):[],a.update(),f=!0,de(a.before_update),a.fragment=i?i(a.ctx):!1,t.target){if(t.hydrate){const p=Di(t.target);a.fragment&&a.fragment.l(p),p.forEach(_)}else a.fragment&&a.fragment.c();t.intro&&y(e.$$.fragment),M(e,t.target,t.anchor),ti()}it(u)}class ee{constructor(){xt(this,"$$");xt(this,"$$set")}$destroy(){x(this,1),this.$destroy=G}$on(t,n){if(!qe(n))return G;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!xi(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const zi="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(zi);function Ut(e){window.runtime.LogError(e)}function bt(e){window.runtime.BrowserOpenURL(e)}function Vi(){window.runtime.Quit()}function Wi(e,t){return window.go.main.App.AddSnippet(e,t)}function Xi(){return window.go.main.App.DaemonInstalled()}function qi(){return window.go.main.App.ExportSnippets()}function Zi(){return window.go.main.App.GetAllSnippets()}function Qi(){return window.go.main.App.GetAutoexpandStatus()}function Ji(){return window.go.main.App.GetAutostartStatus()}function ni(e){return window.go.main.App.GetSetting(e)}function ii(e){return window.go.main.App.GetSnippetWithAbbreviation(e)}function Yi(e){return window.go.main.App.GetSnippetWithID(e)}function Ki(e,t){return window.go.main.App.GetSnippets(e,t)}function er(){return window.go.main.App.GetVersion()}function ri(e){return window.go.main.App.ImportSnippets(e)}function tr(e){return window.go.main.App.NilUUID(e)}function nr(e,t){return window.go.main.App.PasteSnippetAndQuit(e,t)}function ir(e){return window.go.main.App.Ping(e)}function rr(e){return window.go.main.App.RemoveSnippet(e)}function sr(e,t){return window.go.main.App.SaveSetting(e,t)}function or(){return window.go.main.App.SearchAndPasteMode()}function oe(e,t){return window.go.main.App.ShowError(e,t)}function lr(){return window.go.main.App.StartDaemon()}function ar(e){return window.go.main.App.UpdateAutoexpand(e)}function ur(e){return window.go.main.App.UpdateAutostart(e)}function fr(e,t){return window.go.main.App.UpdateSnippetWithID(e,t)}const Me=[];function si(e,t){return{subscribe:ke(e,t).subscribe}}function ke(e,t=G){let n;const i=new Set;function r(l){if(J(e,l)&&(e=l,n)){const u=!Me.length;for(const a of i)a[1](),Me.push(a,e);if(u){for(let a=0;a<Me.length;a+=2)Me[a][0](Me[a+1]);Me.length=0}}}function s(l){r(l(e))}function o(l,u=G){const a=[l,u];return i.add(a),i.size===1&&(n=t(r,s)||G),l(e),()=>{i.delete(a),i.size===0&&n&&(n(),n=null)}}return{set:r,update:s,subscribe:o}}function Ie(e,t,n){const i=!Array.isArray(e),r=i?[e]:e;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=t.length<2;return si(n,(o,l)=>{let u=!1;const a=[];let f=0,p=G;const h=()=>{if(f)return;p();const d=t(i?a[0]:a,o,l);s?o(d):p=qe(d)?d:G},m=r.map((d,b)=>on(d,C=>{a[b]=C,f&=~(1<<b),u&&h()},()=>{f|=1<<b}));return u=!0,h(),function(){de(m),p(),u=!1}})}function cr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hr=function(t){return pr(t)&&!mr(t)};function pr(e){return!!e&&typeof e=="object"}function mr(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||gr(e)}var dr=typeof Symbol=="function"&&Symbol.for,_r=dr?Symbol.for("react.element"):60103;function gr(e){return e.$$typeof===_r}function br(e){return Array.isArray(e)?[]:{}}function at(e,t){return t.clone!==!1&&t.isMergeableObject(e)?ze(br(e),e,t):e}function vr(e,t,n){return e.concat(t).map(function(i){return at(i,n)})}function wr(e,t){if(!t.customMerge)return ze;var n=t.customMerge(e);return typeof n=="function"?n:ze}function Er(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Bn(e){return Object.keys(e).concat(Er(e))}function oi(e,t){try{return t in e}catch{return!1}}function yr(e,t){return oi(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Sr(e,t,n){var i={};return n.isMergeableObject(e)&&Bn(e).forEach(function(r){i[r]=at(e[r],n)}),Bn(t).forEach(function(r){yr(e,r)||(oi(e,r)&&n.isMergeableObject(t[r])?i[r]=wr(r,n)(e[r],t[r],n):i[r]=at(t[r],n))}),i}function ze(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||vr,n.isMergeableObject=n.isMergeableObject||hr,n.cloneUnlessOtherwiseSpecified=at;var i=Array.isArray(t),r=Array.isArray(e),s=i===r;return s?i?n.arrayMerge(e,t,n):Sr(e,t,n):at(t,n)}ze.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(i,r){return ze(i,r,n)},{})};var kr=ze,Ar=kr;const Br=cr(Ar);var Zt=function(e,t){return Zt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},Zt(e,t)};function Ht(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Zt(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var te=function(){return te=Object.assign||function(t){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},te.apply(this,arguments)};function Dt(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,s;i<r;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))}var q;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(q||(q={}));var re;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(re||(re={}));var Ve;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Ve||(Ve={}));function Tn(e){return e.type===re.literal}function Tr(e){return e.type===re.argument}function li(e){return e.type===re.number}function ai(e){return e.type===re.date}function ui(e){return e.type===re.time}function fi(e){return e.type===re.select}function ci(e){return e.type===re.plural}function Ir(e){return e.type===re.pound}function hi(e){return e.type===re.tag}function pi(e){return!!(e&&typeof e=="object"&&e.type===Ve.number)}function Qt(e){return!!(e&&typeof e=="object"&&e.type===Ve.dateTime)}var mi=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Hr=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Cr(e){var t={};return e.replace(Hr,function(n){var i=n.length;switch(n[0]){case"G":t.era=i===4?"long":i===5?"narrow":"short";break;case"y":t.year=i===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][i-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][i-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=i===4?"short":i===5?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][i-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][i-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][i-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][i-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][i-1];break;case"s":t.second=["numeric","2-digit"][i-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=i<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var Lr=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Pr(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Lr).filter(function(h){return h.length>0}),n=[],i=0,r=t;i<r.length;i++){var s=r[i],o=s.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var l=o[0],u=o.slice(1),a=0,f=u;a<f.length;a++){var p=f[a];if(p.length===0)throw new Error("Invalid number skeleton")}n.push({stem:l,options:u})}return n}function Nr(e){return e.replace(/^(.*?)-/,"")}var In=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,di=/^(@+)?(\+|#+)?[rs]?$/g,Or=/(\*)(0+)|(#+)(0+)|(0+)/g,_i=/^(0+)$/;function Hn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(di,function(n,i,r){return typeof r!="string"?(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length):r==="+"?t.minimumSignificantDigits=i.length:i[0]==="#"?t.maximumSignificantDigits=i.length:(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length+(typeof r=="string"?r.length:0)),""}),t}function gi(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Mr(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!_i.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Cn(e){var t={},n=gi(e);return n||t}function xr(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Nr(r.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=te(te(te({},t),{notation:"scientific"}),r.options.reduce(function(u,a){return te(te({},u),Cn(a))},{}));continue;case"engineering":t=te(te(te({},t),{notation:"engineering"}),r.options.reduce(function(u,a){return te(te({},u),Cn(a))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(r.options[0]);continue;case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(Or,function(u,a,f,p,h,m){if(a)t.minimumIntegerDigits=f.length;else{if(p&&h)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(_i.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(In.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(In,function(u,a,f,p,h,m){return f==="*"?t.minimumFractionDigits=a.length:p&&p[0]==="#"?t.maximumFractionDigits=p.length:h&&m?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+m.length):(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length),""});var s=r.options[0];s==="w"?t=te(te({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=te(te({},t),Hn(s)));continue}if(di.test(r.stem)){t=te(te({},t),Hn(r.stem));continue}var o=gi(r.stem);o&&(t=te(te({},t),o));var l=Mr(r.stem);l&&(t=te(te({},t),l))}return t}var vt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function Rr(e,t){for(var n="",i=0;i<e.length;i++){var r=e.charAt(i);if(r==="j"){for(var s=0;i+1<e.length&&e.charAt(i+1)===r;)s++,i++;var o=1+(s&1),l=s<2?1:3+(s>>1),u="a",a=Ur(t);for((a=="H"||a=="k")&&(l=0);l-- >0;)n+=u;for(;o-- >0;)n=a+n}else r==="J"?n+="H":n+=r}return n}function Ur(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,i;n!=="root"&&(i=e.maximize().region);var r=vt[i||""]||vt[n||""]||vt["".concat(n,"-001")]||vt["001"];return r[0]}var Gt,Dr=new RegExp("^".concat(mi.source,"*")),Gr=new RegExp("".concat(mi.source,"*$"));function Q(e,t){return{start:e,end:t}}var $r=!!String.prototype.startsWith,jr=!!String.fromCodePoint,Fr=!!Object.fromEntries,zr=!!String.prototype.codePointAt,Vr=!!String.prototype.trimStart,Wr=!!String.prototype.trimEnd,Xr=!!Number.isSafeInteger,qr=Xr?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Jt=!0;try{var Zr=vi("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Jt=((Gt=Zr.exec("a"))===null||Gt===void 0?void 0:Gt[0])==="a"}catch{Jt=!1}var Ln=$r?function(t,n,i){return t.startsWith(n,i)}:function(t,n,i){return t.slice(i,i+n.length)===n},Yt=jr?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i="",r=t.length,s=0,o;r>s;){if(o=t[s++],o>1114111)throw RangeError(o+" is not a valid code point");i+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return i},Pn=Fr?Object.fromEntries:function(t){for(var n={},i=0,r=t;i<r.length;i++){var s=r[i],o=s[0],l=s[1];n[o]=l}return n},bi=zr?function(t,n){return t.codePointAt(n)}:function(t,n){var i=t.length;if(!(n<0||n>=i)){var r=t.charCodeAt(n),s;return r<55296||r>56319||n+1===i||(s=t.charCodeAt(n+1))<56320||s>57343?r:(r-55296<<10)+(s-56320)+65536}},Qr=Vr?function(t){return t.trimStart()}:function(t){return t.replace(Dr,"")},Jr=Wr?function(t){return t.trimEnd()}:function(t){return t.replace(Gr,"")};function vi(e,t){return new RegExp(e,t)}var Kt;if(Jt){var Nn=vi("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Kt=function(t,n){var i;Nn.lastIndex=n;var r=Nn.exec(t);return(i=r[1])!==null&&i!==void 0?i:""}}else Kt=function(t,n){for(var i=[];;){var r=bi(t,n);if(r===void 0||wi(r)||ts(r))break;i.push(r),n+=r>=65536?2:1}return Yt.apply(void 0,i)};var Yr=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,i){for(var r=[];!this.isEOF();){var s=this.char();if(s===123){var o=this.parseArgument(t,i);if(o.err)return o;r.push(o.val)}else{if(s===125&&t>0)break;if(s===35&&(n==="plural"||n==="selectordinal")){var l=this.clonePosition();this.bump(),r.push({type:re.pound,location:Q(l,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(q.UNMATCHED_CLOSING_TAG,Q(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&en(this.peek()||0)){var o=this.parseTag(t,n);if(o.err)return o;r.push(o.val)}else{var o=this.parseLiteral(t,n);if(o.err)return o;r.push(o.val)}}}return{val:r,err:null}},e.prototype.parseTag=function(t,n){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:re.literal,value:"<".concat(r,"/>"),location:Q(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(t+1,n,!0);if(s.err)return s;var o=s.val,l=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!en(this.char()))return this.error(q.INVALID_TAG,Q(l,this.clonePosition()));var u=this.clonePosition(),a=this.parseTagName();return r!==a?this.error(q.UNMATCHED_CLOSING_TAG,Q(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:re.tag,value:r,children:o,location:Q(i,this.clonePosition())},err:null}:this.error(q.INVALID_TAG,Q(l,this.clonePosition())))}else return this.error(q.UNCLOSED_TAG,Q(i,this.clonePosition()))}else return this.error(q.INVALID_TAG,Q(i,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&es(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var i=this.clonePosition(),r="";;){var s=this.tryParseQuote(n);if(s){r+=s;continue}var o=this.tryParseUnquoted(t,n);if(o){r+=o;continue}var l=this.tryParseLeftAngleBracket();if(l){r+=l;continue}break}var u=Q(i,this.clonePosition());return{val:{type:re.literal,value:r,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Kr(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var i=this.char();if(i===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(i);this.bump()}return Yt.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(n==="plural"||n==="selectordinal")||i===125&&t>0?null:(this.bump(),Yt(i))},e.prototype.parseArgument=function(t,n){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(q.EMPTY_ARGUMENT,Q(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(q.MALFORMED_ARGUMENT,Q(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:re.argument,value:r,location:Q(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(i,this.clonePosition())):this.parseArgumentOptions(t,n,r,i);default:return this.error(q.MALFORMED_ARGUMENT,Q(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),i=Kt(this.message,n),r=n+i.length;this.bumpTo(r);var s=this.clonePosition(),o=Q(t,s);return{value:i,location:o}},e.prototype.parseArgumentOptions=function(t,n,i,r){var s,o=this.clonePosition(),l=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(l){case"":return this.error(q.EXPECT_ARGUMENT_TYPE,Q(o,u));case"number":case"date":case"time":{this.bumpSpace();var a=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var h=Jr(p.val);if(h.length===0)return this.error(q.EXPECT_ARGUMENT_STYLE,Q(this.clonePosition(),this.clonePosition()));var m=Q(f,this.clonePosition());a={style:h,styleLocation:m}}var d=this.tryParseArgumentClose(r);if(d.err)return d;var b=Q(r,this.clonePosition());if(a&&Ln(a==null?void 0:a.style,"::",0)){var C=Qr(a.style.slice(2));if(l==="number"){var p=this.parseNumberSkeletonFromString(C,a.styleLocation);return p.err?p:{val:{type:re.number,value:i,location:b,style:p.val},err:null}}else{if(C.length===0)return this.error(q.EXPECT_DATE_TIME_SKELETON,b);var A=C;this.locale&&(A=Rr(C,this.locale));var h={type:Ve.dateTime,pattern:A,location:a.styleLocation,parsedOptions:this.shouldParseSkeletons?Cr(A):{}},w=l==="date"?re.date:re.time;return{val:{type:w,value:i,location:b,style:h},err:null}}}return{val:{type:l==="number"?re.number:l==="date"?re.date:re.time,value:i,location:b,style:(s=a==null?void 0:a.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var I=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(q.EXPECT_SELECT_ARGUMENT_OPTIONS,Q(I,te({},I)));this.bumpSpace();var E=this.parseIdentifierIfPossible(),B=0;if(l!=="select"&&E.value==="offset"){if(!this.bumpIf(":"))return this.error(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Q(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,q.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),E=this.parseIdentifierIfPossible(),B=p.val}var L=this.tryParsePluralOrSelectOptions(t,l,n,E);if(L.err)return L;var d=this.tryParseArgumentClose(r);if(d.err)return d;var S=Q(r,this.clonePosition());return l==="select"?{val:{type:re.select,value:i,options:Pn(L.val),location:S},err:null}:{val:{type:re.plural,value:i,options:Pn(L.val),offset:B,pluralType:l==="plural"?"cardinal":"ordinal",location:S},err:null}}default:return this.error(q.INVALID_ARGUMENT_TYPE,Q(o,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Q(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(q.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Q(r,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var i=[];try{i=Pr(t)}catch{return this.error(q.INVALID_NUMBER_SKELETON,n)}return{val:{type:Ve.number,tokens:i,location:n,parsedOptions:this.shouldParseSkeletons?xr(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,i,r){for(var s,o=!1,l=[],u=new Set,a=r.value,f=r.location;;){if(a.length===0){var p=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_SELECTOR,q.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;f=Q(p,this.clonePosition()),a=this.message.slice(p.offset,this.offset())}else break}if(u.has(a))return this.error(n==="select"?q.DUPLICATE_SELECT_ARGUMENT_SELECTOR:q.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);a==="other"&&(o=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?q.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:q.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Q(this.clonePosition(),this.clonePosition()));var d=this.parseMessage(t+1,n,i);if(d.err)return d;var b=this.tryParseArgumentClose(m);if(b.err)return b;l.push([a,{value:d.val,location:Q(m,this.clonePosition())}]),u.add(a),this.bumpSpace(),s=this.parseIdentifierIfPossible(),a=s.value,f=s.location}return l.length===0?this.error(n==="select"?q.EXPECT_SELECT_ARGUMENT_SELECTOR:q.EXPECT_PLURAL_ARGUMENT_SELECTOR,Q(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(q.MISSING_OTHER_CLAUSE,Q(this.clonePosition(),this.clonePosition())):{val:l,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var i=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var s=!1,o=0;!this.isEOF();){var l=this.char();if(l>=48&&l<=57)s=!0,o=o*10+(l-48),this.bump();else break}var u=Q(r,this.clonePosition());return s?(o*=i,qr(o)?{val:o,err:null}:this.error(n,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=bi(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Ln(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),i=this.message.indexOf(t,n);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&wi(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),i=this.message.charCodeAt(n+(t>=65536?2:1));return i??null},e}();function en(e){return e>=97&&e<=122||e>=65&&e<=90}function Kr(e){return en(e)||e===47}function es(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function wi(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ts(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function tn(e){e.forEach(function(t){if(delete t.location,fi(t)||ci(t))for(var n in t.options)delete t.options[n].location,tn(t.options[n].value);else li(t)&&pi(t.style)||(ai(t)||ui(t))&&Qt(t.style)?delete t.style.location:hi(t)&&tn(t.children)})}function ns(e,t){t===void 0&&(t={}),t=te({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Yr(e,t).parse();if(n.err){var i=SyntaxError(q[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return t!=null&&t.captureLocation||tn(n.val),n.val}function $t(e,t){var n=t&&t.cache?t.cache:as,i=t&&t.serializer?t.serializer:ls,r=t&&t.strategy?t.strategy:rs;return r(e,{cache:n,serializer:i})}function is(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Ei(e,t,n,i){var r=is(i)?i:n(i),s=t.get(r);return typeof s>"u"&&(s=e.call(this,i),t.set(r,s)),s}function yi(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),s=t.get(r);return typeof s>"u"&&(s=e.apply(this,i),t.set(r,s)),s}function fn(e,t,n,i,r){return n.bind(t,e,i,r)}function rs(e,t){var n=e.length===1?Ei:yi;return fn(e,this,n,t.cache.create(),t.serializer)}function ss(e,t){return fn(e,this,yi,t.cache.create(),t.serializer)}function os(e,t){return fn(e,this,Ei,t.cache.create(),t.serializer)}var ls=function(){return JSON.stringify(arguments)};function cn(){this.cache=Object.create(null)}cn.prototype.get=function(e){return this.cache[e]};cn.prototype.set=function(e,t){this.cache[e]=t};var as={create:function(){return new cn}},jt={variadic:ss,monadic:os},We;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(We||(We={}));var Ct=function(e){Ht(t,e);function t(n,i,r){var s=e.call(this,n)||this;return s.code=i,s.originalMessage=r,s}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),On=function(e){Ht(t,e);function t(n,i,r,s){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(i,'". Options are "').concat(Object.keys(r).join('", "'),'"'),We.INVALID_VALUE,s)||this}return t}(Ct),us=function(e){Ht(t,e);function t(n,i,r){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(i),We.INVALID_VALUE,r)||this}return t}(Ct),fs=function(e){Ht(t,e);function t(n,i){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(i,'"'),We.MISSING_VALUE,i)||this}return t}(Ct),ce;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(ce||(ce={}));function cs(e){return e.length<2?e:e.reduce(function(t,n){var i=t[t.length-1];return!i||i.type!==ce.literal||n.type!==ce.literal?t.push(n):i.value+=n.value,t},[])}function hs(e){return typeof e=="function"}function Et(e,t,n,i,r,s,o){if(e.length===1&&Tn(e[0]))return[{type:ce.literal,value:e[0].value}];for(var l=[],u=0,a=e;u<a.length;u++){var f=a[u];if(Tn(f)){l.push({type:ce.literal,value:f.value});continue}if(Ir(f)){typeof s=="number"&&l.push({type:ce.literal,value:n.getNumberFormat(t).format(s)});continue}var p=f.value;if(!(r&&p in r))throw new fs(p,o);var h=r[p];if(Tr(f)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),l.push({type:typeof h=="string"?ce.literal:ce.object,value:h});continue}if(ai(f)){var m=typeof f.style=="string"?i.date[f.style]:Qt(f.style)?f.style.parsedOptions:void 0;l.push({type:ce.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(ui(f)){var m=typeof f.style=="string"?i.time[f.style]:Qt(f.style)?f.style.parsedOptions:i.time.medium;l.push({type:ce.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(li(f)){var m=typeof f.style=="string"?i.number[f.style]:pi(f.style)?f.style.parsedOptions:void 0;m&&m.scale&&(h=h*(m.scale||1)),l.push({type:ce.literal,value:n.getNumberFormat(t,m).format(h)});continue}if(hi(f)){var d=f.children,b=f.value,C=r[b];if(!hs(C))throw new us(b,"function",o);var A=Et(d,t,n,i,r,s),w=C(A.map(function(B){return B.value}));Array.isArray(w)||(w=[w]),l.push.apply(l,w.map(function(B){return{type:typeof B=="string"?ce.literal:ce.object,value:B}}))}if(fi(f)){var I=f.options[h]||f.options.other;if(!I)throw new On(f.value,h,Object.keys(f.options),o);l.push.apply(l,Et(I.value,t,n,i,r));continue}if(ci(f)){var I=f.options["=".concat(h)];if(!I){if(!Intl.PluralRules)throw new Ct(`Intl.PluralRules is not available in this environment.
Try polyfilling it using "@formatjs/intl-pluralrules"
`,We.MISSING_INTL_API,o);var E=n.getPluralRules(t,{type:f.pluralType}).select(h-(f.offset||0));I=f.options[E]||f.options.other}if(!I)throw new On(f.value,h,Object.keys(f.options),o);l.push.apply(l,Et(I.value,t,n,i,r,h-(f.offset||0)));continue}}return cs(l)}function ps(e,t){return t?te(te(te({},e||{}),t||{}),Object.keys(e).reduce(function(n,i){return n[i]=te(te({},e[i]),t[i]||{}),n},{})):e}function ms(e,t){return t?Object.keys(e).reduce(function(n,i){return n[i]=ps(e[i],t[i]),n},te({},e)):e}function Ft(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function ds(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:$t(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.NumberFormat).bind.apply(t,Dt([void 0],n,!1)))},{cache:Ft(e.number),strategy:jt.variadic}),getDateTimeFormat:$t(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.DateTimeFormat).bind.apply(t,Dt([void 0],n,!1)))},{cache:Ft(e.dateTime),strategy:jt.variadic}),getPluralRules:$t(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.PluralRules).bind.apply(t,Dt([void 0],n,!1)))},{cache:Ft(e.pluralRules),strategy:jt.variadic})}}var _s=function(){function e(t,n,i,r){var s=this;if(n===void 0&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(o){var l=s.formatToParts(o);if(l.length===1)return l[0].value;var u=l.reduce(function(a,f){return!a.length||f.type!==ce.literal||typeof a[a.length-1]!="string"?a.push(f.value):a[a.length-1]+=f.value,a},[]);return u.length<=1?u[0]||"":u},this.formatToParts=function(o){return Et(s.ast,s.locales,s.formatters,s.formats,o,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:r==null?void 0:r.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=ms(e.formats,i),this.formatters=r&&r.formatters||ds(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=ns,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();const Te={},gs=(e,t,n)=>n&&(t in Te||(Te[t]={}),e in Te[t]||(Te[t][e]=n),n),Si=(e,t)=>{if(t==null)return;if(t in Te&&e in Te[t])return Te[t][e];const n=dt(t);for(let i=0;i<n.length;i++){const r=bs(n[i],e);if(r)return gs(e,t,r)}};let hn;const Qe=ke({});function pn(e){return e in hn}function bs(e,t){if(!pn(e))return null;const n=function(i){return hn[i]||null}(e);return function(i,r){if(r==null)return;if(r in i)return i[r];const s=r.split(".");let o=i;for(let l=0;l<s.length;l++)if(typeof o=="object"){if(l>0){const u=s.slice(l,s.length).join(".");if(u in o){o=o[u];break}}o=o[s[l]]}else o=void 0;return o}(n,t)}function vs(e,...t){delete Te[e],Qe.update(n=>(n[e]=Br.all([n[e]||{},...t]),n))}Ie([Qe],([e])=>Object.keys(e));Qe.subscribe(e=>hn=e);const rt={};function st(e){return rt[e]}function Bt(e){return e!=null&&dt(e).some(t=>{var n;return(n=st(t))===null||n===void 0?void 0:n.size})}function ws(e,t){return Promise.all(t.map(i=>(function(r,s){rt[r].delete(s),rt[r].size===0&&delete rt[r]}(e,i),i().then(r=>r.default||r)))).then(i=>vs(e,...i))}const et={};function ki(e){if(!Bt(e))return e in et?et[e]:Promise.resolve();const t=function(n){return dt(n).map(i=>{const r=st(i);return[i,r?[...r]:[]]}).filter(([,i])=>i.length>0)}(e);return et[e]=Promise.all(t.map(([n,i])=>ws(n,i))).then(()=>{if(Bt(e))return ki(e);delete et[e]}),et[e]}function Es(e,t){st(e)||function(i){rt[i]=new Set}(e);const n=st(e);st(e).has(t)||(pn(e)||Qe.update(i=>(i[e]={},i)),n.add(t))}function ys({locale:e,id:t}){console.warn(`[svelte-i18n] The message "${t}" was not found in "${dt(e).join('", "')}".${Bt(He())?`

Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`)}const tt={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Xe(){return tt}function Ss(e){const{formats:t,...n}=e,i=e.initialLocale||e.fallbackLocale;return n.warnOnMissingMessages&&(delete n.warnOnMissingMessages,n.handleMissingMessage==null?n.handleMissingMessage=ys:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(tt,n,{initialLocale:i}),t&&("number"in t&&Object.assign(tt.formats.number,t.number),"date"in t&&Object.assign(tt.formats.date,t.date),"time"in t&&Object.assign(tt.formats.time,t.time)),Je.set(i)}const yt=ke(!1);let nn;const St=ke(null);function Mn(e){return e.split("-").map((t,n,i)=>i.slice(0,n+1).join("-")).reverse()}function dt(e,t=Xe().fallbackLocale){const n=Mn(e);return t?[...new Set([...n,...Mn(t)])]:n}function He(){return nn??void 0}St.subscribe(e=>{nn=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const Je={...St,set:e=>{if(e&&function(t){if(t==null)return;const n=dt(t);for(let i=0;i<n.length;i++){const r=n[i];if(pn(r))return r}}(e)&&Bt(e)){const{loadingDelay:t}=Xe();let n;return typeof window<"u"&&He()!=null&&t?n=window.setTimeout(()=>yt.set(!0),t):yt.set(!0),ki(e).then(()=>{St.set(e)}).finally(()=>{clearTimeout(n),yt.set(!1)})}return St.set(e)}},ks=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],Lt=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}},ut=(e,t)=>{const{formats:n}=Xe();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},As=Lt(({locale:e,format:t,...n})=>{if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return t&&(n=ut("number",t)),new Intl.NumberFormat(e,n)}),Bs=Lt(({locale:e,format:t,...n})=>{if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return t?n=ut("date",t):Object.keys(n).length===0&&(n=ut("date","short")),new Intl.DateTimeFormat(e,n)}),Ts=Lt(({locale:e,format:t,...n})=>{if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return t?n=ut("time",t):Object.keys(n).length===0&&(n=ut("time","short")),new Intl.DateTimeFormat(e,n)}),Is=({locale:e=He(),...t}={})=>As({locale:e,...t}),Hs=({locale:e=He(),...t}={})=>Bs({locale:e,...t}),Cs=({locale:e=He(),...t}={})=>Ts({locale:e,...t}),Ls=Lt((e,t=He())=>new _s(e,t,Xe().formats,{ignoreTag:Xe().ignoreTag})),Ps=(e,t={})=>{var n,i,r,s;let o=t;typeof e=="object"&&(o=e,e=o.id);const{values:l,locale:u=He(),default:a}=o;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=Si(e,u);if(f){if(typeof f!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),f}else f=(s=(r=(i=(n=Xe()).handleMissingMessage)===null||i===void 0?void 0:i.call(n,{locale:u,id:e,defaultValue:a}))!==null&&r!==void 0?r:a)!==null&&s!==void 0?s:e;if(!l)return f;let p=f;try{p=Ls(f,u).format(l)}catch(h){h instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,h.message)}return p},Ns=(e,t)=>Cs(t).format(e),Os=(e,t)=>Hs(t).format(e),Ms=(e,t)=>Is(t).format(e),xs=(e,t=He())=>Si(e,t),_e=Ie([Je,Qe],()=>Ps);Ie([Je],()=>Ns);Ie([Je],()=>Os);Ie([Je],()=>Ms);Ie([Je,Qe],()=>xs);function Rs(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,i,r,s,o=[],l="",u=e.split("/");for(u[0]||u.shift();r=u.shift();)n=r[0],n==="*"?(o.push("wild"),l+="/(.*)"):n===":"?(i=r.indexOf("?",1),s=r.indexOf(".",1),o.push(r.substring(1,~i?i:~s?s:r.length)),l+=~i&&!~s?"(?:/([^/]+?))?":"/([^/]+?)",~s&&(l+=(~i?"?":"")+"\\"+r.substring(s))):l+="/"+r;return{keys:o,pattern:new RegExp("^"+l+(t?"(?=$|/)":"/?$"),"i")}}function Us(e){let t,n,i;const r=[e[2]];var s=e[0];function o(l,u){let a={};if(u!==void 0&&u&4)a=kt(r,[At(l[2])]);else for(let f=0;f<r.length;f+=1)a=sn(a,r[f]);return{props:a}}return s&&(t=Fe(s,o(e)),t.$on("routeEvent",e[7])),{c(){t&&U(t.$$.fragment),n=we()},m(l,u){t&&M(t,l,u),g(l,n,u),i=!0},p(l,u){if(u&1&&s!==(s=l[0])){if(t){ae();const a=t;k(a.$$.fragment,1,0,()=>{x(a,1)}),ue()}s?(t=Fe(s,o(l,u)),t.$on("routeEvent",l[7]),U(t.$$.fragment),y(t.$$.fragment,1),M(t,n.parentNode,n)):t=null}else if(s){const a=u&4?kt(r,[At(l[2])]):{};t.$set(a)}},i(l){i||(t&&y(t.$$.fragment,l),i=!0)},o(l){t&&k(t.$$.fragment,l),i=!1},d(l){l&&_(n),t&&x(t,l)}}}function Ds(e){let t,n,i;const r=[{params:e[1]},e[2]];var s=e[0];function o(l,u){let a={};if(u!==void 0&&u&6)a=kt(r,[u&2&&{params:l[1]},u&4&&At(l[2])]);else for(let f=0;f<r.length;f+=1)a=sn(a,r[f]);return{props:a}}return s&&(t=Fe(s,o(e)),t.$on("routeEvent",e[6])),{c(){t&&U(t.$$.fragment),n=we()},m(l,u){t&&M(t,l,u),g(l,n,u),i=!0},p(l,u){if(u&1&&s!==(s=l[0])){if(t){ae();const a=t;k(a.$$.fragment,1,0,()=>{x(a,1)}),ue()}s?(t=Fe(s,o(l,u)),t.$on("routeEvent",l[6]),U(t.$$.fragment),y(t.$$.fragment,1),M(t,n.parentNode,n)):t=null}else if(s){const a=u&6?kt(r,[u&2&&{params:l[1]},u&4&&At(l[2])]):{};t.$set(a)}},i(l){i||(t&&y(t.$$.fragment,l),i=!0)},o(l){t&&k(t.$$.fragment,l),i=!1},d(l){l&&_(n),t&&x(t,l)}}}function Gs(e){let t,n,i,r;const s=[Ds,Us],o=[];function l(u,a){return u[1]?0:1}return t=l(e),n=o[t]=s[t](e),{c(){n.c(),i=we()},m(u,a){o[t].m(u,a),g(u,i,a),r=!0},p(u,[a]){let f=t;t=l(u),t===f?o[t].p(u,a):(ae(),k(o[f],1,1,()=>{o[f]=null}),ue(),n=o[t],n?n.p(u,a):(n=o[t]=s[t](u),n.c()),y(n,1),n.m(i.parentNode,i))},i(u){r||(y(n),r=!0)},o(u){k(n),r=!1},d(u){u&&_(i),o[t].d(u)}}}function xn(){const e=window.location.href.indexOf("#/");let t=e>-1?window.location.href.substr(e+1):"/";const n=t.indexOf("?");let i="";return n>-1&&(i=t.substr(n+1),t=t.substr(0,n)),{location:t,querystring:i}}const mn=si(null,function(t){t(xn());const n=()=>{t(xn())};return window.addEventListener("hashchange",n,!1),function(){window.removeEventListener("hashchange",n,!1)}});Ie(mn,e=>e.location);Ie(mn,e=>e.querystring);const Rn=ke(void 0);async function Ge(e){if(!e||e.length<1||e.charAt(0)!="/"&&e.indexOf("#/")!==0)throw Error("Invalid parameter location");await un(),history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=(e.charAt(0)=="#"?"":"#")+e}async function ve(){await un(),window.history.back()}function $s(e){e?window.scrollTo(e.__svelte_spa_router_scrollX,e.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function js(e,t,n){let{routes:i={}}=t,{prefix:r=""}=t,{restoreScrollState:s=!1}=t;class o{constructor(B,L){if(!L||typeof L!="function"&&(typeof L!="object"||L._sveltesparouter!==!0))throw Error("Invalid component object");if(!B||typeof B=="string"&&(B.length<1||B.charAt(0)!="/"&&B.charAt(0)!="*")||typeof B=="object"&&!(B instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:S,keys:O}=Rs(B);this.path=B,typeof L=="object"&&L._sveltesparouter===!0?(this.component=L.component,this.conditions=L.conditions||[],this.userData=L.userData,this.props=L.props||{}):(this.component=()=>Promise.resolve(L),this.conditions=[],this.props={}),this._pattern=S,this._keys=O}match(B){if(r){if(typeof r=="string")if(B.startsWith(r))B=B.substr(r.length)||"/";else return null;else if(r instanceof RegExp){const v=B.match(r);if(v&&v[0])B=B.substr(v[0].length)||"/";else return null}}const L=this._pattern.exec(B);if(L===null)return null;if(this._keys===!1)return L;const S={};let O=0;for(;O<this._keys.length;){try{S[this._keys[O]]=decodeURIComponent(L[O+1]||"")||null}catch{S[this._keys[O]]=null}O++}return S}async checkConditions(B){for(let L=0;L<this.conditions.length;L++)if(!await this.conditions[L](B))return!1;return!0}}const l=[];i instanceof Map?i.forEach((E,B)=>{l.push(new o(B,E))}):Object.keys(i).forEach(E=>{l.push(new o(E,i[E]))});let u=null,a=null,f={};const p=mt();async function h(E,B){await un(),p(E,B)}let m=null,d=null;s&&(d=E=>{E.state&&(E.state.__svelte_spa_router_scrollY||E.state.__svelte_spa_router_scrollX)?m=E.state:m=null},window.addEventListener("popstate",d),Yn(()=>{$s(m)}));let b=null,C=null;const A=mn.subscribe(async E=>{b=E;let B=0;for(;B<l.length;){const L=l[B].match(E.location);if(!L){B++;continue}const S={route:l[B].path,location:E.location,querystring:E.querystring,userData:l[B].userData,params:L&&typeof L=="object"&&Object.keys(L).length?L:null};if(!await l[B].checkConditions(S)){n(0,u=null),C=null,h("conditionsFailed",S);return}h("routeLoading",Object.assign({},S));const O=l[B].component;if(C!=O){O.loading?(n(0,u=O.loading),C=O,n(1,a=O.loadingParams),n(2,f={}),h("routeLoaded",Object.assign({},S,{component:u,name:u.name,params:a}))):(n(0,u=null),C=null);const v=await O();if(E!=b)return;n(0,u=v&&v.default||v),C=O}L&&typeof L=="object"&&Object.keys(L).length?n(1,a=L):n(1,a=null),n(2,f=l[B].props),h("routeLoaded",Object.assign({},S,{component:u,name:u.name,params:a})).then(()=>{Rn.set(a)});return}n(0,u=null),C=null,Rn.set(void 0)});an(()=>{A(),d&&window.removeEventListener("popstate",d)});function w(E){lt.call(this,e,E)}function I(E){lt.call(this,e,E)}return e.$$set=E=>{"routes"in E&&n(3,i=E.routes),"prefix"in E&&n(4,r=E.prefix),"restoreScrollState"in E&&n(5,s=E.restoreScrollState)},e.$$.update=()=>{e.$$.dirty&32&&(history.scrollRestoration=s?"manual":"auto")},[u,a,f,i,r,s,w,I]}class Fs extends ee{constructor(t){super(),K(this,t,js,Gs,J,{routes:3,prefix:4,restoreScrollState:5})}}const pe=ke(!1),nt=ke(!1),Tt=ke(!1);function Ai(){const{subscribe:e,set:t,update:n}=ke([]);return{subscribe:e,fetch:async()=>{if(!kn(pe))return;const i=await Zi();n(r=>i)},search:async(i,r)=>{if(!kn(pe))return;const s=await Ki(i,r);n(o=>s)},reset:()=>t([])}}const Pe=Ai(),zt=ke(""),Vt=Ai();function zs(e){let t,n,i,r;return{c(){t=X("svg"),n=X("polyline"),i=X("polyline"),c(n,"points","11 17 6 12 11 7"),c(i,"points","18 17 13 12 18 7"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-chevrons-left "+e[2])},m(s,o){g(s,t,o),T(t,n),T(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-chevrons-left "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function Vs(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class Bi extends ee{constructor(t){super(),K(this,t,Vs,zs,J,{size:0,strokeWidth:1,class:2})}}function Ws(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("path"),i=X("line"),r=X("line"),c(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),c(i,"x1","18"),c(i,"y1","9"),c(i,"x2","12"),c(i,"y2","15"),c(r,"x1","12"),c(r,"y1","9"),c(r,"x2","18"),c(r,"y2","15"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-delete "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-delete "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function Xs(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class qs extends ee{constructor(t){super(),K(this,t,Xs,Ws,J,{size:0,strokeWidth:1,class:2})}}function Zs(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("path"),i=X("polyline"),r=X("line"),c(n,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),c(i,"points","7 10 12 15 17 10"),c(r,"x1","12"),c(r,"y1","15"),c(r,"x2","12"),c(r,"y2","3"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-download "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-download "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function Qs(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class Js extends ee{constructor(t){super(),K(this,t,Qs,Zs,J,{size:0,strokeWidth:1,class:2})}}function Ys(e){let t,n,i,r;return{c(){t=X("svg"),n=X("path"),i=X("path"),c(n,"d","M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"),c(i,"d","M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-edit "+e[2])},m(s,o){g(s,t,o),T(t,n),T(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-edit "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function Ks(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class eo extends ee{constructor(t){super(),K(this,t,Ks,Ys,J,{size:0,strokeWidth:1,class:2})}}function to(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("circle"),i=X("path"),r=X("line"),c(n,"cx","12"),c(n,"cy","12"),c(n,"r","10"),c(i,"d","M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"),c(r,"x1","12"),c(r,"y1","17"),c(r,"x2","12.01"),c(r,"y2","17"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-help-circle "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-help-circle "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function no(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class io extends ee{constructor(t){super(),K(this,t,no,to,J,{size:0,strokeWidth:1,class:2})}}function ro(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("circle"),i=X("line"),r=X("line"),c(n,"cx","12"),c(n,"cy","12"),c(n,"r","10"),c(i,"x1","12"),c(i,"y1","16"),c(i,"x2","12"),c(i,"y2","12"),c(r,"x1","12"),c(r,"y1","8"),c(r,"x2","12.01"),c(r,"y2","8"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-info "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-info "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function so(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class oo extends ee{constructor(t){super(),K(this,t,so,ro,J,{size:0,strokeWidth:1,class:2})}}function lo(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("rect"),i=X("line"),r=X("line"),c(n,"x","3"),c(n,"y","3"),c(n,"width","18"),c(n,"height","18"),c(n,"rx","2"),c(n,"ry","2"),c(i,"x1","12"),c(i,"y1","8"),c(i,"x2","12"),c(i,"y2","16"),c(r,"x1","8"),c(r,"y1","12"),c(r,"x2","16"),c(r,"y2","12"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-plus-square "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-plus-square "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function ao(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class dn extends ee{constructor(t){super(),K(this,t,ao,lo,J,{size:0,strokeWidth:1,class:2})}}function uo(e){let t,n,i,r;return{c(){t=X("svg"),n=X("circle"),i=X("line"),c(n,"cx","11"),c(n,"cy","11"),c(n,"r","8"),c(i,"x1","21"),c(i,"y1","21"),c(i,"x2","16.65"),c(i,"y2","16.65"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-search "+e[2])},m(s,o){g(s,t,o),T(t,n),T(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-search "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function fo(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class co extends ee{constructor(t){super(),K(this,t,fo,uo,J,{size:0,strokeWidth:1,class:2})}}function ho(e){let t,n,i,r;return{c(){t=X("svg"),n=X("circle"),i=X("path"),c(n,"cx","12"),c(n,"cy","12"),c(n,"r","3"),c(i,"d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",r="feather feather-settings "+e[2])},m(s,o){g(s,t,o),T(t,n),T(t,i)},p(s,[o]){o&1&&c(t,"width",s[0]),o&1&&c(t,"height",s[0]),o&2&&c(t,"stroke-width",s[1]),o&4&&r!==(r="feather feather-settings "+s[2])&&c(t,"class",r)},i:G,o:G,d(s){s&&_(t)}}}function po(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class Ti extends ee{constructor(t){super(),K(this,t,po,ho,J,{size:0,strokeWidth:1,class:2})}}function mo(e){let t,n,i,r,s;return{c(){t=X("svg"),n=X("path"),i=X("polyline"),r=X("line"),c(n,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),c(i,"points","17 8 12 3 7 8"),c(r,"x1","12"),c(r,"y1","3"),c(r,"x2","12"),c(r,"y2","15"),c(t,"xmlns","http://www.w3.org/2000/svg"),c(t,"width",e[0]),c(t,"height",e[0]),c(t,"fill","none"),c(t,"viewBox","0 0 24 24"),c(t,"stroke","currentColor"),c(t,"stroke-width",e[1]),c(t,"stroke-linecap","round"),c(t,"stroke-linejoin","round"),c(t,"class",s="feather feather-upload "+e[2])},m(o,l){g(o,t,l),T(t,n),T(t,i),T(t,r)},p(o,[l]){l&1&&c(t,"width",o[0]),l&1&&c(t,"height",o[0]),l&2&&c(t,"stroke-width",o[1]),l&4&&s!==(s="feather feather-upload "+o[2])&&c(t,"class",s)},i:G,o:G,d(o){o&&_(t)}}}function _o(e,t,n){let{size:i="24"}=t,{strokeWidth:r=2}=t,{class:s=""}=t;return i!=="100%"&&(i=i.slice(-1)==="x"?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=o=>{"size"in o&&n(0,i=o.size),"strokeWidth"in o&&n(1,r=o.strokeWidth),"class"in o&&n(2,s=o.class)},[i,r,s]}class rn extends ee{constructor(t){super(),K(this,t,_o,mo,J,{size:0,strokeWidth:1,class:2})}}function go(e){let t,n;const i=e[5].default,r=ft(i,e,e[4],null);return{c(){t=P("p"),r&&r.c(),c(t,"class","svelte-hclhr3"),W(t,"error",e[3]),W(t,"warning",e[0]),W(t,"success",e[1]),W(t,"info",e[2])},m(s,o){g(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&16)&&ht(r,i,s,s[4],n?ct(i,s[4],o,null):pt(s[4]),null),(!n||o&8)&&W(t,"error",s[3]),(!n||o&1)&&W(t,"warning",s[0]),(!n||o&2)&&W(t,"success",s[1]),(!n||o&4)&&W(t,"info",s[2])},i(s){n||(y(r,s),n=!0)},o(s){k(r,s),n=!1},d(s){s&&_(t),r&&r.d(s)}}}function bo(e,t,n){let{$$slots:i={},$$scope:r}=t,{error:s=!1}=t,{warning:o=!1}=t,{success:l=!1}=t,{info:u=!1}=t;return o=s&&o?!1:o,l=(s||o)&&l?!1:l,u=!(s||o||l),e.$$set=a=>{"error"in a&&n(3,s=a.error),"warning"in a&&n(0,o=a.warning),"success"in a&&n(1,l=a.success),"info"in a&&n(2,u=a.info),"$$scope"in a&&n(4,r=a.$$scope)},[o,l,u,s,r,i]}class Pt extends ee{constructor(t){super(),K(this,t,bo,go,J,{error:3,warning:0,success:1,info:2})}}function vo(e){let t=e[0]("no_connection")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("no_connection")+"")&&z(n,t)},d(i){i&&_(n)}}}function wo(e){let t,n;return t=new Pt({props:{error:!0,$$slots:{default:[vo]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&3&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Eo(e,t,n){let i;return ie(e,_e,r=>n(0,i=r)),[i]}class yo extends ee{constructor(t){super(),K(this,t,Eo,wo,J,{})}}function So(e){let t,n,i,r;const s=e[5].default,o=ft(s,e,e[4],null);return{c(){t=P("button"),o&&o.c(),t.disabled=e[3],c(t,"class","svelte-1jbd97"),W(t,"primary",e[0]),W(t,"danger",e[1]),W(t,"secondary",e[2])},m(l,u){g(l,t,u),o&&o.m(t,null),n=!0,i||(r=ne(t,"click",e[6]),i=!0)},p(l,[u]){o&&o.p&&(!n||u&16)&&ht(o,s,l,l[4],n?ct(s,l[4],u,null):pt(l[4]),null),(!n||u&8)&&(t.disabled=l[3]),(!n||u&1)&&W(t,"primary",l[0]),(!n||u&2)&&W(t,"danger",l[1]),(!n||u&4)&&W(t,"secondary",l[2])},i(l){n||(y(o,l),n=!0)},o(l){k(o,l),n=!1},d(l){l&&_(t),o&&o.d(l),i=!1,r()}}}function ko(e,t,n){let{$$slots:i={},$$scope:r}=t,{primary:s=!1}=t,{danger:o=!1}=t,{secondary:l=!1}=t,{disabled:u=!1}=t;s=!s&&!l&&!o?!0:s,o=s&&o?!1:o,l=(s||o)&&l?!1:l;function a(f){lt.call(this,e,f)}return e.$$set=f=>{"primary"in f&&n(0,s=f.primary),"danger"in f&&n(1,o=f.danger),"secondary"in f&&n(2,l=f.secondary),"disabled"in f&&n(3,u=f.disabled),"$$scope"in f&&n(4,r=f.$$scope)},[s,o,l,u,r,i,a]}class $e extends ee{constructor(t){super(),K(this,t,ko,So,J,{primary:0,danger:1,secondary:2,disabled:3})}}function Ao(e){let t=e[0]("daemon.start")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("daemon.start")+"")&&z(n,t)},d(i){i&&_(n)}}}function Bo(e){let t=e[0]("daemon.installed")+"",n,i,r,s;return r=new $e({props:{$$slots:{default:[Ao]},$$scope:{ctx:e}}}),r.$on("click",e[1]),{c(){n=j(t),i=R(),U(r.$$.fragment)},m(o,l){g(o,n,l),g(o,i,l),M(r,o,l),s=!0},p(o,l){(!s||l&1)&&t!==(t=o[0]("daemon.installed")+"")&&z(n,t);const u={};l&5&&(u.$$scope={dirty:l,ctx:o}),r.$set(u)},i(o){s||(y(r.$$.fragment,o),s=!0)},o(o){k(r.$$.fragment,o),s=!1},d(o){o&&(_(n),_(i)),x(r,o)}}}function To(e){let t,n;return t=new Pt({props:{warning:!0,$$slots:{default:[Bo]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&5&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Io(e,t,n){let i;ie(e,_e,s=>n(0,i=s));async function r(){Tt.update(s=>!0);try{const s=await lr()}catch(s){await oe(i("daemon.start_error_title"),s),Tt.update(o=>!1)}await Pe.fetch()}return[i,r]}class Ho extends ee{constructor(t){super(),K(this,t,Io,To,J,{})}}function Co(e){let t=e[0]("daemon.not_installed")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("daemon.not_installed")+"")&&z(n,t)},d(i){i&&_(n)}}}function Lo(e){let t,n;return t=new Pt({props:{error:!0,$$slots:{default:[Co]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&3&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Po(e,t,n){let i;return ie(e,_e,r=>n(0,i=r)),[i]}class No extends ee{constructor(t){super(),K(this,t,Po,Lo,J,{})}}function Oo(e){let t=e[0]("daemon.starting")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("daemon.starting")+"")&&z(n,t)},d(i){i&&_(n)}}}function Mo(e){let t,n;return t=new Pt({props:{warning:!0,$$slots:{default:[Oo]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&3&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function xo(e,t,n){let i;return ie(e,_e,r=>n(0,i=r)),[i]}class Ro extends ee{constructor(t){super(),K(this,t,xo,Mo,J,{})}}function Un(e){let t,n,i,r,s,o;t=new yo({});const l=[Go,Do,Uo],u=[];function a(f,p){return f[2]&&!f[3]?0:f[2]&&f[3]?1:2}return i=a(e),r=u[i]=l[i](e),{c(){U(t.$$.fragment),n=R(),r.c(),s=we()},m(f,p){M(t,f,p),g(f,n,p),u[i].m(f,p),g(f,s,p),o=!0},p(f,p){let h=i;i=a(f),i!==h&&(ae(),k(u[h],1,1,()=>{u[h]=null}),ue(),r=u[i],r||(r=u[i]=l[i](f),r.c()),y(r,1),r.m(s.parentNode,s))},i(f){o||(y(t.$$.fragment,f),y(r),o=!0)},o(f){k(t.$$.fragment,f),k(r),o=!1},d(f){f&&(_(n),_(s)),x(t,f),u[i].d(f)}}}function Uo(e){let t,n;return t=new No({}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Do(e){let t,n;return t=new Ro({}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Go(e){let t,n;return t=new Ho({}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function $o(e){let t,n,i,r,s,o=!e[1]&&Un(e);const l=e[6].default,u=ft(l,e,e[5],null);return{c(){t=P("div"),o&&o.c(),n=R(),u&&u.c(),c(t,"class","screen svelte-i096ea"),W(t,"centered",e[0])},m(a,f){g(a,t,f),o&&o.m(t,null),T(t,n),u&&u.m(t,null),i=!0,r||(s=[ne(t,"keyup",e[4]),ne(t,"keyup",e[7])],r=!0)},p(a,[f]){a[1]?o&&(ae(),k(o,1,1,()=>{o=null}),ue()):o?(o.p(a,f),f&2&&y(o,1)):(o=Un(a),o.c(),y(o,1),o.m(t,n)),u&&u.p&&(!i||f&32)&&ht(u,l,a,a[5],i?ct(l,a[5],f,null):pt(a[5]),null),(!i||f&1)&&W(t,"centered",a[0])},i(a){i||(y(o),y(u,a),i=!0)},o(a){k(o),k(u,a),i=!1},d(a){a&&_(t),o&&o.d(),u&&u.d(a),r=!1,de(s)}}}function jo(e,t,n){let i,r,s;ie(e,pe,h=>n(1,i=h)),ie(e,nt,h=>n(2,r=h)),ie(e,Tt,h=>n(3,s=h));let{$$slots:o={},$$scope:l}=t,{centered:u=!1}=t;const a=mt();function f(h){h.key==="Escape"&&(h.preventDefault(),a("cancel"))}function p(h){lt.call(this,e,h)}return e.$$set=h=>{"centered"in h&&n(0,u=h.centered),"$$scope"in h&&n(5,l=h.$$scope)},[u,i,r,s,f,l,o,p]}class Ye extends ee{constructor(t){super(),K(this,t,jo,$o,J,{centered:0})}}function Fo(e){let t,n,i,r,s,o,l,u;var a=e[0];function f(m,d){return{props:{size:m[2],strokeWidth:m[3]}}}a&&(i=Fe(a,f(e)));const p=e[10].default,h=ft(p,e,e[9],null);return{c(){t=P("div"),n=P("div"),i&&U(i.$$.fragment),s=R(),h&&h.c(),c(n,"class",r="icon-wrapper "+e[1]+" svelte-bhj2u4"),c(t,"class","content svelte-bhj2u4"),c(t,"tabindex","0"),c(t,"title",e[5]),W(t,"centered",e[6]),W(t,"horizontal",e[4])},m(m,d){g(m,t,d),T(t,n),i&&M(i,n,null),T(t,s),h&&h.m(t,null),o=!0,l||(u=[ne(t,"click",e[7]),ne(t,"keyup",e[8])],l=!0)},p(m,[d]){if(d&1&&a!==(a=m[0])){if(i){ae();const b=i;k(b.$$.fragment,1,0,()=>{x(b,1)}),ue()}a?(i=Fe(a,f(m)),U(i.$$.fragment),y(i.$$.fragment,1),M(i,n,null)):i=null}else if(a){const b={};d&4&&(b.size=m[2]),d&8&&(b.strokeWidth=m[3]),i.$set(b)}(!o||d&2&&r!==(r="icon-wrapper "+m[1]+" svelte-bhj2u4"))&&c(n,"class",r),h&&h.p&&(!o||d&512)&&ht(h,p,m,m[9],o?ct(p,m[9],d,null):pt(m[9]),null),(!o||d&32)&&c(t,"title",m[5]),(!o||d&16)&&W(t,"horizontal",m[4])},i(m){o||(i&&y(i.$$.fragment,m),y(h,m),o=!0)},o(m){i&&k(i.$$.fragment,m),k(h,m),o=!1},d(m){m&&_(t),i&&x(i),h&&h.d(m),l=!1,de(u)}}}function zo(e,t,n){let{$$slots:i={},$$scope:r}=t,{icon:s=io}=t,{iconClass:o}=t,{size:l="24"}=t,{strokeWidth:u="2"}=t,{horizontal:a=!1}=t,{title:f=""}=t;const p=!a,h=mt();function m(){h("activate")}function d(b){(b.key==="Enter"||b.key===" ")&&h("activate")}return e.$$set=b=>{"icon"in b&&n(0,s=b.icon),"iconClass"in b&&n(1,o=b.iconClass),"size"in b&&n(2,l=b.size),"strokeWidth"in b&&n(3,u=b.strokeWidth),"horizontal"in b&&n(4,a=b.horizontal),"title"in b&&n(5,f=b.title),"$$scope"in b&&n(9,r=b.$$scope)},[s,o,l,u,a,f,p,m,d,r,i]}class me extends ee{constructor(t){super(),K(this,t,zo,Fo,J,{icon:0,iconClass:1,size:2,strokeWidth:3,horizontal:4,title:5})}}function Vo(e,t){t&&setTimeout(()=>{e.focus(),e.select()},250)}function Dn(e){let t,n;return{c(){t=P("label"),n=j(e[4]),c(t,"for",e[3])},m(i,r){g(i,t,r),T(t,n)},p(i,r){r&16&&z(n,i[4]),r&8&&c(t,"for",i[3])},d(i){i&&_(t)}}}function Gn(e){let t,n,i,r,s;return n=new co({}),{c(){t=P("button"),U(n.$$.fragment),c(t,"class","search-icon svelte-8p6spj"),c(t,"tabindex",-1),c(t,"title",e[6]),W(t,"focussed",e[2])},m(o,l){g(o,t,l),M(n,t,null),i=!0,r||(s=ne(t,"click",e[14]),r=!0)},p(o,l){(!i||l&64)&&c(t,"title",o[6]),(!i||l&4)&&W(t,"focussed",o[2])},i(o){i||(y(n.$$.fragment,o),i=!0)},o(o){k(n.$$.fragment,o),i=!1},d(o){o&&_(t),x(n),r=!1,s()}}}function $n(e){let t,n,i,r,s;return n=new qs({}),{c(){t=P("button"),U(n.$$.fragment),c(t,"class","clear-icon svelte-8p6spj"),c(t,"tabindex",-1),c(t,"title",e[7]),W(t,"focussed",e[2])},m(o,l){g(o,t,l),M(n,t,null),i=!0,r||(s=ne(t,"click",e[15]),r=!0)},p(o,l){(!i||l&128)&&c(t,"title",o[7]),(!i||l&4)&&W(t,"focussed",o[2])},i(o){i||(y(n.$$.fragment,o),i=!0)},o(o){k(n.$$.fragment,o),i=!1},d(o){o&&_(t),x(n),r=!1,s()}}}function jn(e){let t;return{c(){t=P("div"),c(t,"class","error-message svelte-8p6spj")},m(n,i){g(n,t,i),t.innerHTML=e[11]},p(n,i){i&2048&&(t.innerHTML=n[11])},d(n){n&&_(t)}}}function Wo(e){let t,n,i,r,s,o,l,u,a,f,p,h,m=e[4]&&Dn(e),d=e[9]&&Gn(e),b=e[9]&&e[0]&&$n(e),C=!e[9]&&jn(e);return{c(){t=P("div"),m&&m.c(),n=R(),i=P("div"),d&&d.c(),r=R(),s=P("input"),l=R(),b&&b.c(),u=R(),C&&C.c(),a=we(),c(s,"type","text"),c(s,"id",e[3]),c(s,"name",e[3]),c(s,"placeholder",e[5]),c(s,"tabindex",e[10]),c(s,"class","svelte-8p6spj"),W(s,"search",e[9]),W(s,"focussed",e[2]),W(s,"value",e[0]),c(i,"class","input-control svelte-8p6spj"),c(t,"class","input svelte-8p6spj")},m(A,w){g(A,t,w),m&&m.m(t,null),T(t,n),T(t,i),d&&d.m(i,null),T(i,r),T(i,s),je(s,e[0]),e[18](s),T(i,l),b&&b.m(i,null),g(A,u,w),C&&C.m(A,w),g(A,a,w),f=!0,p||(h=[ne(s,"input",e[17]),ne(s,"focusin",e[12]),ne(s,"focusout",e[13]),ln(o=Vo.call(null,s,e[8]))],p=!0)},p(A,[w]){A[4]?m?m.p(A,w):(m=Dn(A),m.c(),m.m(t,n)):m&&(m.d(1),m=null),A[9]?d?(d.p(A,w),w&512&&y(d,1)):(d=Gn(A),d.c(),y(d,1),d.m(i,r)):d&&(ae(),k(d,1,1,()=>{d=null}),ue()),(!f||w&8)&&c(s,"id",A[3]),(!f||w&8)&&c(s,"name",A[3]),(!f||w&32)&&c(s,"placeholder",A[5]),(!f||w&1024)&&c(s,"tabindex",A[10]),w&1&&s.value!==A[0]&&je(s,A[0]),o&&qe(o.update)&&w&256&&o.update.call(null,A[8]),(!f||w&512)&&W(s,"search",A[9]),(!f||w&4)&&W(s,"focussed",A[2]),(!f||w&1)&&W(s,"value",A[0]),A[9]&&A[0]?b?(b.p(A,w),w&513&&y(b,1)):(b=$n(A),b.c(),y(b,1),b.m(i,null)):b&&(ae(),k(b,1,1,()=>{b=null}),ue()),A[9]?C&&(C.d(1),C=null):C?C.p(A,w):(C=jn(A),C.c(),C.m(a.parentNode,a))},i(A){f||(y(d),y(b),f=!0)},o(A){k(d),k(b),f=!1},d(A){A&&(_(t),_(u),_(a)),m&&m.d(),d&&d.d(),e[18](null),b&&b.d(),C&&C.d(A),p=!1,de(h)}}}function Xo(e,t,n){let i;const r=mt();let{name:s="input"}=t,{label:o=""}=t,{value:l=""}=t,{errorMessage:u=""}=t,{placeholder:a=""}=t,{searchButtonTitle:f=""}=t,{clearButtonTitle:p=""}=t,{autofocus:h=!1}=t,{search:m=!1}=t,{tabindex:d=0}=t,{ref:b}=t,{focussed:C=h}=t;function A(){n(2,C=!0)}function w(){n(2,C=!1)}function I(){r("query",l),document.getElementById(s).focus()}function E(){n(0,l=""),document.getElementById(s).focus()}function B(){l=this.value,n(0,l)}function L(S){he[S?"unshift":"push"](()=>{b=S,n(1,b)})}return e.$$set=S=>{"name"in S&&n(3,s=S.name),"label"in S&&n(4,o=S.label),"value"in S&&n(0,l=S.value),"errorMessage"in S&&n(16,u=S.errorMessage),"placeholder"in S&&n(5,a=S.placeholder),"searchButtonTitle"in S&&n(6,f=S.searchButtonTitle),"clearButtonTitle"in S&&n(7,p=S.clearButtonTitle),"autofocus"in S&&n(8,h=S.autofocus),"search"in S&&n(9,m=S.search),"tabindex"in S&&n(10,d=S.tabindex),"ref"in S&&n(1,b=S.ref),"focussed"in S&&n(2,C=S.focussed)},e.$$.update=()=>{e.$$.dirty&65536&&n(11,i=u||"&nbsp;")},[l,b,C,s,o,a,f,p,h,m,d,i,A,w,I,E,u,B,L]}class _n extends ee{constructor(t){super(),K(this,t,Xo,Wo,J,{name:3,label:4,value:0,errorMessage:16,placeholder:5,searchButtonTitle:6,clearButtonTitle:7,autofocus:8,search:9,tabindex:10,ref:1,focussed:2})}}function Ii(e,t){t&&e.focus()}function qo(e){let t;return{c(){t=j(e[0])},m(n,i){g(n,t,i)},p(n,i){i&1&&z(t,n[0])},d(n){n&&_(t)}}}function Zo(e){let t;return{c(){t=j(" ")},m(n,i){g(n,t,i)},p:G,d(n){n&&_(t)}}}function Qo(e){let t;function n(s,o){return s[1]?Zo:qo}let r=n(e)(e);return{c(){t=P("span"),r.c(),c(t,"class","shortcut-button svelte-11t060e"),W(t,"hide",e[1])},m(s,o){g(s,t,o),r.m(t,null)},p(s,[o]){r.p(s,o)},i:G,o:G,d(s){s&&_(t),r.d()}}}function Jo(e,t,n){let{shortcut:i=""}=t;const r=i.length===0;return e.$$set=s=>{"shortcut"in s&&n(0,i=s.shortcut)},[i,r]}class Hi extends ee{constructor(t){super(),K(this,t,Jo,Qo,J,{shortcut:0})}}function Fn(e){let t,n;return t=new Hi({props:{shortcut:e[6]}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,r){const s={};r&64&&(s.shortcut=i[6]),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function zn(e){let t,n,i;return n=new eo({props:{size:"1.25x"}}),{c(){t=P("div"),U(n.$$.fragment),c(t,"class","edit-icon-wrapper svelte-1ebkg7o")},m(r,s){g(r,t,s),M(n,t,null),i=!0},i(r){i||(y(n.$$.fragment,r),i=!0)},o(r){k(n.$$.fragment,r),i=!1},d(r){r&&_(t),x(n)}}}function Yo(e){let t,n,i,r,s,o=e[0].body+"",l,u,a,f,p,h=e[4]&&Fn(e);i=new Hi({props:{shortcut:e[0].abbreviation}});let m=!e[4]&&zn();return{c(){t=P("li"),h&&h.c(),n=R(),U(i.$$.fragment),r=R(),s=P("span"),l=j(o),u=R(),m&&m.c(),c(s,"class","body svelte-1ebkg7o"),c(t,"tabindex",e[1]),c(t,"title",e[7]),c(t,"class","svelte-1ebkg7o"),W(t,"focussed",e[2]),W(t,"active",e[3])},m(d,b){g(d,t,b),h&&h.m(t,null),T(t,n),M(i,t,null),T(t,r),T(t,s),T(s,l),T(t,u),m&&m.m(t,null),e[13](t),a=!0,f||(p=ne(t,"click",e[12]),f=!0)},p(d,[b]){d[4]?h?(h.p(d,b),b&16&&y(h,1)):(h=Fn(d),h.c(),y(h,1),h.m(t,n)):h&&(ae(),k(h,1,1,()=>{h=null}),ue());const C={};b&1&&(C.shortcut=d[0].abbreviation),i.$set(C),(!a||b&1)&&o!==(o=d[0].body+"")&&z(l,o),d[4]?m&&(ae(),k(m,1,1,()=>{m=null}),ue()):m?b&16&&y(m,1):(m=zn(),m.c(),y(m,1),m.m(t,null)),(!a||b&2)&&c(t,"tabindex",d[1]),(!a||b&4)&&W(t,"focussed",d[2]),(!a||b&8)&&W(t,"active",d[3])},i(d){a||(y(h),y(i.$$.fragment,d),y(m),a=!0)},o(d){k(h),k(i.$$.fragment,d),k(m),a=!1},d(d){d&&_(t),h&&h.d(),x(i),m&&m.d(),e[13](null),f=!1,p()}}}function Ko(e,t,n){let i;ie(e,_e,w=>n(14,i=w));let{snippet:r}=t,{index:s=-1}=t,{tabindex:o=-1}=t,{focussed:l=!1}=t,{active:u=!1}=t,{selectMode:a=!1}=t,{observer:f=null}=t,p,h=i(a?"use_snippet.title":"edit_snippet.title"),m=s>=0&&s<10?s+1:"";m===10&&(m=0);function d(){return p.classList.contains("is-visible")}function b(w){p.scrollIntoView({behavior:"smooth",block:w})}Ze(()=>{f&&f.observe(p)}),an(()=>{f&&f.unobserve(p)});function C(w){lt.call(this,e,w)}function A(w){he[w?"unshift":"push"](()=>{p=w,n(5,p)})}return e.$$set=w=>{"snippet"in w&&n(0,r=w.snippet),"index"in w&&n(8,s=w.index),"tabindex"in w&&n(1,o=w.tabindex),"focussed"in w&&n(2,l=w.focussed),"active"in w&&n(3,u=w.active),"selectMode"in w&&n(4,a=w.selectMode),"observer"in w&&n(9,f=w.observer)},[r,o,l,u,a,p,m,h,s,f,d,b,C,A]}class el extends ee{constructor(t){super(),K(this,t,Ko,Yo,J,{snippet:0,index:8,tabindex:1,focussed:2,active:3,selectMode:4,observer:9,isVisible:10,scrollIntoView:11})}get isVisible(){return this.$$.ctx[10]}get scrollIntoView(){return this.$$.ctx[11]}}function Vn(e,t,n){const i=e.slice();return i[22]=t[n],i[23]=t,i[24]=n,i}function Wn(e){let t,n=e[24],i;const r=()=>e[14](t,n),s=()=>e[14](null,n);function o(){return e[15](e[24])}let l={snippet:e[22],index:e[24],focussed:e[24]===e[4],active:e[5],observer:e[8],selectMode:e[2]};return t=new el({props:l}),r(),t.$on("click",o),{c(){U(t.$$.fragment)},m(u,a){M(t,u,a),i=!0},p(u,a){e=u,n!==e[24]&&(s(),n=e[24],r());const f={};a&128&&(f.snippet=e[22]),a&16&&(f.focussed=e[24]===e[4]),a&32&&(f.active=e[5]),a&4&&(f.selectMode=e[2]),t.$set(f)},i(u){i||(y(t.$$.fragment,u),i=!0)},o(u){k(t.$$.fragment,u),i=!1},d(u){s(),x(t,u)}}}function tl(e){let t,n,i,r,s,o=An(e[7]),l=[];for(let a=0;a<o.length;a+=1)l[a]=Wn(Vn(e,o,a));const u=a=>k(l[a],1,1,()=>{l[a]=null});return{c(){t=P("ul");for(let a=0;a<l.length;a+=1)l[a].c();c(t,"tabindex",e[1]),c(t,"class","svelte-1wnqbvs")},m(a,f){g(a,t,f);for(let p=0;p<l.length;p+=1)l[p]&&l[p].m(t,null);e[16](t),i=!0,r||(s=[ne(t,"focus",e[9]),ne(t,"blur",e[10]),ne(t,"keydown",e[12]),ln(n=Ii.call(null,t,e[3]))],r=!0)},p(a,[f]){if(f&2548){o=An(a[7]);let p;for(p=0;p<o.length;p+=1){const h=Vn(a,o,p);l[p]?(l[p].p(h,f),y(l[p],1)):(l[p]=Wn(h),l[p].c(),y(l[p],1),l[p].m(t,null))}for(ae(),p=o.length;p<l.length;p+=1)u(p);ue()}(!i||f&2)&&c(t,"tabindex",a[1]),n&&qe(n.update)&&f&8&&n.update.call(null,a[3])},i(a){if(!i){for(let f=0;f<o.length;f+=1)y(l[f]);i=!0}},o(a){l=l.filter(Boolean);for(let f=0;f<l.length;f+=1)k(l[f]);i=!1},d(a){a&&_(t),Ui(l,a),e[16](null),r=!1,de(s)}}}function nl(e,t,n){let i;const r=mt();let{snippets:s=null}=t,{tabindex:o=0}=t,{selectMode:l=!1}=t,{autofocus:u=!1}=t,{ref:a}=t,f=0,p=u,h=[];const m=new IntersectionObserver(function(v){for(let N=0;N<v.length;N++)v[N].isIntersecting?v[N].target.classList.add("is-visible"):v[N].target.classList.remove("is-visible")},{root:a,threshold:[.6]});function d(v){return n(4,f=0),v}function b(){n(5,p=!0)}function C(){n(5,p=!1)}function A(v){l?E(i[v]):B(i[v])}function w(v){!s||s.length===0||I(v)&&v.preventDefault()}function I(v){if(v.key==="Home"||v.key==="g")return n(4,f=0),h[f].scrollIntoView("nearest"),!0;if(v.key==="End"||v.key==="G")return n(4,f=s.length-1),h[f].scrollIntoView("nearest"),!0;if(f<s.length-1&&(v.key==="ArrowDown"||v.key==="j"))return n(4,f++,f),h[f].scrollIntoView("nearest"),!0;if(f>0&&(v.key==="ArrowUp"||v.key==="k"))return n(4,f--,f),h[f].scrollIntoView("nearest"),!0;if(v.key==="PageDown"||v.key==="d"){let N=-1,H=-1;for(let se=0;se<h.length;se++)if(h[se].isVisible())H=se,N<0&&(N=se);else if(H>=0)break;const D=h.length-1,V=H-N;return H+V>D?n(4,f=D):n(4,f=H),h[f].scrollIntoView("start"),!0}if(v.key==="PageUp"||v.key==="u"){let N=-1,H=-1;for(let V=0;V<h.length;V++){const se=h[V];if(se.isVisible()&&N<0)N=V,H=V;else if(se.isVisible())H=V;else if(N>=0)break}const D=H-N;return N-D<=0?n(4,f=0):n(4,f=N),h[f].scrollIntoView("end"),!0}if(l&&f>=0&&f<s.length&&v.key==="Enter")return E(i[f]),!0;if(l&&["1","2","3","4","5","6","7","8","9","0"].includes(v.key)){let N=v.key-1;return N===-1&&(N=9),N+1>i.length?!1:(E(i[N]),!0)}return!l&&f>=0&&f<s.length&&(v.key==="ArrowRight"||v.key==="Enter")?(B(i[f]),!0):!1}function E(v){r("itemActivated",{snippet:v})}function B(v){r("itemEdit",{snippet:v})}Yn(()=>{h.length!==i.length&&n(6,h.length=i.length,h)});function L(v,N){he[v?"unshift":"push"](()=>{h[N]=v,n(6,h)})}const S=v=>A(v);function O(v){he[v?"unshift":"push"](()=>{a=v,n(0,a)})}return e.$$set=v=>{"snippets"in v&&n(13,s=v.snippets),"tabindex"in v&&n(1,o=v.tabindex),"selectMode"in v&&n(2,l=v.selectMode),"autofocus"in v&&n(3,u=v.autofocus),"ref"in v&&n(0,a=v.ref)},e.$$.update=()=>{e.$$.dirty&8192&&n(7,i=d(s))},[a,o,l,u,f,p,h,i,m,b,C,A,w,s,L,S,O]}class il extends ee{constructor(t){super(),K(this,t,nl,tl,J,{snippets:13,tabindex:1,selectMode:2,autofocus:3,ref:0})}}function rl(e){let t,n;const i=e[2].default,r=ft(i,e,e[1],null);return{c(){t=P("div"),r&&r.c(),c(t,"class","toolbar svelte-i867mn"),W(t,"bottom",e[0])},m(s,o){g(s,t,o),r&&r.m(t,null),n=!0},p(s,[o]){r&&r.p&&(!n||o&2)&&ht(r,i,s,s[1],n?ct(i,s[1],o,null):pt(s[1]),null),(!n||o&1)&&W(t,"bottom",s[0])},i(s){n||(y(r,s),n=!0)},o(s){k(r,s),n=!1},d(s){s&&_(t),r&&r.d(s)}}}function sl(e,t,n){let{$$slots:i={},$$scope:r}=t,{bottom:s=!1}=t;return e.$$set=o=>{"bottom"in o&&n(0,s=o.bottom),"$$scope"in o&&n(1,r=o.$$scope)},[s,r,i]}class Nt extends ee{constructor(t){super(),K(this,t,sl,rl,J,{bottom:0})}}function ol(e){let t;return{c(){t=P("div"),c(t,"class","toolbar-spacer svelte-1a67v9")},m(n,i){g(n,t,i)},p:G,i:G,o:G,d(n){n&&_(t)}}}class gn extends ee{constructor(t){super(),K(this,t,null,ol,J,{})}}function ll(e){let t,n,i=e[6]("no_snippets_found.title")+"",r,s,o,l=e[6]("no_snippets_found.description")+"",u;return{c(){t=P("div"),n=P("p"),r=j(i),s=R(),o=P("p"),u=j(l),c(n,"class","no-snippets-found svelte-y4605t"),c(o,"class","no-snippets-found description dimmed svelte-y4605t"),c(t,"class","centered")},m(a,f){g(a,t,f),T(t,n),T(n,r),T(t,s),T(t,o),T(o,u)},p(a,f){f&64&&i!==(i=a[6]("no_snippets_found.title")+"")&&z(r,i),f&64&&l!==(l=a[6]("no_snippets_found.description")+"")&&z(u,l)},i:G,o:G,d(a){a&&_(t)}}}function al(e){let t,n,i;function r(o){e[21](o)}let s={snippets:e[7],tabindex:2,selectMode:e[0],autofocus:e[8]};return e[4]!==void 0&&(s.ref=e[4]),t=new il({props:s}),he.push(()=>De(t,"ref",r)),t.$on("itemActivated",e[12]),t.$on("itemEdit",e[13]),{c(){U(t.$$.fragment)},m(o,l){M(t,o,l),i=!0},p(o,l){const u={};l&128&&(u.snippets=o[7]),l&1&&(u.selectMode=o[0]),!n&&l&16&&(n=!0,u.ref=o[4],Ue(()=>n=!1)),t.$set(u)},i(o){i||(y(t.$$.fragment,o),i=!0)},o(o){k(t.$$.fragment,o),i=!1},d(o){x(t,o)}}}function Xn(e){let t,n;return t=new Nt({props:{bottom:!0,$$slots:{default:[ul]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,r){const s={};r&16777280&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function ul(e){let t,n,i,r,s,o;return t=new me({props:{iconClass:"dimmed",icon:dn,size:"2.3x",title:e[6]("add_snippet.title")}}),t.$on("activate",e[10]),i=new gn({}),s=new me({props:{iconClass:"dimmed",icon:Ti,size:"2x",title:e[6]("settings.title")}}),s.$on("activate",e[11]),{c(){U(t.$$.fragment),n=R(),U(i.$$.fragment),r=R(),U(s.$$.fragment)},m(l,u){M(t,l,u),g(l,n,u),M(i,l,u),g(l,r,u),M(s,l,u),o=!0},p(l,u){const a={};u&64&&(a.title=l[6]("add_snippet.title")),t.$set(a);const f={};u&64&&(f.title=l[6]("settings.title")),s.$set(f)},i(l){o||(y(t.$$.fragment,l),y(i.$$.fragment,l),y(s.$$.fragment,l),o=!0)},o(l){k(t.$$.fragment,l),k(i.$$.fragment,l),k(s.$$.fragment,l),o=!1},d(l){l&&(_(n),_(r)),x(t,l),x(i,l),x(s,l)}}}function fl(e){let t,n,i,r,s,o,l,u,a,f,p;function h(E){e[18](E)}function m(E){e[19](E)}function d(E){e[20](E)}let b={search:!0,autofocus:e[1],placeholder:e[6]("search"),searchButtonTitle:e[6]("search"),clearButtonTitle:e[6]("clear"),tabindex:1};e[2]!==void 0&&(b.value=e[2]),e[3]!==void 0&&(b.ref=e[3]),e[5]!==void 0&&(b.focussed=e[5]),n=new _n({props:b}),he.push(()=>De(n,"value",h)),he.push(()=>De(n,"ref",m)),he.push(()=>De(n,"focussed",d)),n.$on("query",e[9]);const C=[al,ll],A=[];function w(E,B){return E[7]?0:1}l=w(e),u=A[l]=C[l](e);let I=!e[0]&&Xn(e);return{c(){t=P("div"),U(n.$$.fragment),o=R(),u.c(),a=R(),I&&I.c(),f=we(),c(t,"class","toolbar top")},m(E,B){g(E,t,B),M(n,t,null),g(E,o,B),A[l].m(E,B),g(E,a,B),I&&I.m(E,B),g(E,f,B),p=!0},p(E,B){const L={};B&2&&(L.autofocus=E[1]),B&64&&(L.placeholder=E[6]("search")),B&64&&(L.searchButtonTitle=E[6]("search")),B&64&&(L.clearButtonTitle=E[6]("clear")),!i&&B&4&&(i=!0,L.value=E[2],Ue(()=>i=!1)),!r&&B&8&&(r=!0,L.ref=E[3],Ue(()=>r=!1)),!s&&B&32&&(s=!0,L.focussed=E[5],Ue(()=>s=!1)),n.$set(L);let S=l;l=w(E),l===S?A[l].p(E,B):(ae(),k(A[S],1,1,()=>{A[S]=null}),ue(),u=A[l],u?u.p(E,B):(u=A[l]=C[l](E),u.c()),y(u,1),u.m(a.parentNode,a)),E[0]?I&&(ae(),k(I,1,1,()=>{I=null}),ue()):I?(I.p(E,B),B&1&&y(I,1)):(I=Xn(E),I.c(),y(I,1),I.m(f.parentNode,f))},i(E){p||(y(n.$$.fragment,E),y(u),y(I),p=!0)},o(E){k(n.$$.fragment,E),k(u),k(I),p=!1},d(E){E&&(_(t),_(o),_(a),_(f)),x(n),A[l].d(E),I&&I.d(E)}}}function cl(e){let t,n;return t=new Ye({props:{$$slots:{default:[fl]},$$scope:{ctx:e}}}),t.$on("keyup",e[14]),t.$on("cancel",e[15]),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&16777471&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function hl(e,t,n){let i,r,s,o;ie(e,pe,H=>n(17,i=H)),ie(e,zt,H=>n(2,r=H)),ie(e,_e,H=>n(6,s=H)),ie(e,Vt,H=>n(7,o=H));let{orderByLastUsed:l=!1}=t,{selectMode:u=!1}=t,{focusSearchBox:a=!0}=t;const f=!a;let p,h,m=a;function d(H){Ri(zt,r=H.detail,r),Vt.search(r,l)}function b(){Ge("/snippet/add")}function C(){Ge("/settings")}function A(H){nr(H.detail.snippet.abbreviation,500)}function w(H){const D=H.detail.snippet.id;Ge("/snippet/edit/"+D)}function I(H,D,V){Vt.search(H,D)}function E(){m?h.focus():p.focus()}function B(H){H.ctrlKey&&H.key==="n"&&(b(),H.preventDefault()),H.ctrlKey&&H.altKey&&H.key==="s"&&(C(),H.preventDefault()),H.ctrlKey&&H.key==="f"&&(E(),H.preventDefault())}function L(){u&&Vi()}function S(H){r=H,zt.set(r)}function O(H){p=H,n(3,p)}function v(H){m=H,n(5,m)}function N(H){h=H,n(4,h)}return e.$$set=H=>{"orderByLastUsed"in H&&n(16,l=H.orderByLastUsed),"selectMode"in H&&n(0,u=H.selectMode),"focusSearchBox"in H&&n(1,a=H.focusSearchBox)},e.$$.update=()=>{e.$$.dirty&196612&&I(r,l)},[u,a,r,p,h,m,s,o,f,d,b,C,A,w,B,L,l,i,S,O,v,N]}class pl extends ee{constructor(t){super(),K(this,t,hl,cl,J,{orderByLastUsed:16,selectMode:0,focusSearchBox:1})}}function qn(e){let t,n,i,r,s,o,l,u;return n=new me({props:{iconClass:"dimmed",icon:dn,title:e[0]("add_snippet.title"),size:"5x",$$slots:{default:[ml]},$$scope:{ctx:e}}}),n.$on("activate",e[2]),s=new me({props:{horizontal:!0,iconClass:"dimmed",icon:rn,title:e[0]("import_snippets.title"),size:"1.5x",$$slots:{default:[dl]},$$scope:{ctx:e}}}),s.$on("activate",e[4]),l=new Nt({props:{bottom:!0,$$slots:{default:[_l]},$$scope:{ctx:e}}}),{c(){t=P("p"),U(n.$$.fragment),i=R(),r=P("p"),U(s.$$.fragment),o=R(),U(l.$$.fragment),c(t,"class","add-snippet"),c(r,"class","import-snippets")},m(a,f){g(a,t,f),M(n,t,null),g(a,i,f),g(a,r,f),M(s,r,null),g(a,o,f),M(l,a,f),u=!0},p(a,f){const p={};f&1&&(p.title=a[0]("add_snippet.title")),f&33&&(p.$$scope={dirty:f,ctx:a}),n.$set(p);const h={};f&1&&(h.title=a[0]("import_snippets.title")),f&33&&(h.$$scope={dirty:f,ctx:a}),s.$set(h);const m={};f&33&&(m.$$scope={dirty:f,ctx:a}),l.$set(m)},i(a){u||(y(n.$$.fragment,a),y(s.$$.fragment,a),y(l.$$.fragment,a),u=!0)},o(a){k(n.$$.fragment,a),k(s.$$.fragment,a),k(l.$$.fragment,a),u=!1},d(a){a&&(_(t),_(i),_(r),_(o)),x(n),x(s),x(l,a)}}}function ml(e){let t=e[0]("add_snippet.title")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("add_snippet.title")+"")&&z(n,t)},d(i){i&&_(n)}}}function dl(e){let t=e[0]("import_snippets.title")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&1&&t!==(t=i[0]("import_snippets.title")+"")&&z(n,t)},d(i){i&&_(n)}}}function _l(e){let t,n,i,r,s,o;return t=new me({props:{iconClass:"dimmed",icon:dn,size:"2.3x",title:e[0]("add_snippet.title")}}),t.$on("activate",e[2]),i=new gn({}),s=new me({props:{iconClass:"dimmed",icon:Ti,size:"2x",title:e[0]("settings.title")}}),s.$on("activate",e[3]),{c(){U(t.$$.fragment),n=R(),U(i.$$.fragment),r=R(),U(s.$$.fragment)},m(l,u){M(t,l,u),g(l,n,u),M(i,l,u),g(l,r,u),M(s,l,u),o=!0},p(l,u){const a={};u&1&&(a.title=l[0]("add_snippet.title")),t.$set(a);const f={};u&1&&(f.title=l[0]("settings.title")),s.$set(f)},i(l){o||(y(t.$$.fragment,l),y(i.$$.fragment,l),y(s.$$.fragment,l),o=!0)},o(l){k(t.$$.fragment,l),k(i.$$.fragment,l),k(s.$$.fragment,l),o=!1},d(l){l&&(_(n),_(r)),x(t,l),x(i,l),x(s,l)}}}function gl(e){let t,n,i,r=e[0]("no_snippets_found.title")+"",s,o,l,u,a=e[1]&&qn(e);return{c(){t=P("h1"),t.textContent="Snippet Pixie",n=R(),i=P("p"),s=j(r),o=R(),a&&a.c(),l=we(),c(i,"class","dimmed")},m(f,p){g(f,t,p),g(f,n,p),g(f,i,p),T(i,s),g(f,o,p),a&&a.m(f,p),g(f,l,p),u=!0},p(f,p){(!u||p&1)&&r!==(r=f[0]("no_snippets_found.title")+"")&&z(s,r),f[1]?a?(a.p(f,p),p&2&&y(a,1)):(a=qn(f),a.c(),y(a,1),a.m(l.parentNode,l)):a&&(ae(),k(a,1,1,()=>{a=null}),ue())},i(f){u||(y(a),u=!0)},o(f){k(a),u=!1},d(f){f&&(_(t),_(n),_(i),_(o),_(l)),a&&a.d(f)}}}function bl(e){let t,n;return t=new Ye({props:{centered:!0,$$slots:{default:[gl]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&35&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function vl(e,t,n){let i,r;ie(e,_e,u=>n(0,i=u)),ie(e,pe,u=>n(1,r=u));function s(){Ge("/snippet/add")}function o(){Ge("/settings")}async function l(){try{const u=await ri(!1)}catch(u){await oe(i("import_snippets.error_title"),u)}await Pe.fetch()}return[i,r,s,o,l]}class wl extends ee{constructor(t){super(),K(this,t,vl,bl,J,{})}}function El(e){let t,n;return t=new wl({}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p:G,i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function yl(e){let t,n;return t=new pl({props:{selectMode:e[2],orderByLastUsed:e[3],focusSearchBox:e[4]}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,r){const s={};r&4&&(s.selectMode=i[2]),r&8&&(s.orderByLastUsed=i[3]),r&16&&(s.focusSearchBox=i[4]),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Sl(e){let t;return{c(){t=j("Checking settings ...")},m(n,i){g(n,t,i)},p:G,i:G,o:G,d(n){n&&_(t)}}}function kl(e){let t,n,i,r;const s=[Sl,yl,El],o=[];function l(u,a){return u[1]?0:u[0]&&(u[5]&&u[5].length>0||u[2])?1:2}return t=l(e),n=o[t]=s[t](e),{c(){n.c(),i=we()},m(u,a){o[t].m(u,a),g(u,i,a),r=!0},p(u,[a]){let f=t;t=l(u),t===f?o[t].p(u,a):(ae(),k(o[f],1,1,()=>{o[f]=null}),ue(),n=o[t],n?n.p(u,a):(n=o[t]=s[t](u),n.c()),y(n,1),n.m(i.parentNode,i))},i(u){r||(y(n),r=!0)},o(u){k(n),r=!1},d(u){u&&_(i),o[t].d(u)}}}function Al(e,t,n){let i,r,s;ie(e,_e,p=>n(6,i=p)),ie(e,pe,p=>n(0,r=p)),ie(e,Pe,p=>n(5,s=p));let o=!0,l=!1,u=!1,a=!0;function f(p){Pe.fetch()}return Ze(async()=>{if(n(2,l=await or()),n(3,u=l),l&&r)try{const p=await ni("FOCUS_SEARCH_BOX");n(4,a=p!=="false")}catch(p){await oe(i("settings.get_error_title"),p)}n(1,o=!1)}),e.$$.update=()=>{e.$$.dirty&1&&f()},[r,o,l,u,a,s]}class Bl extends ee{constructor(t){super(),K(this,t,Al,kl,J,{})}}function Tl(e){let t=e[4]("button.cancel")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("button.cancel")+"")&&z(n,t)},d(i){i&&_(n)}}}function Il(e){let t=e[4]("button.save")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("button.save")+"")&&z(n,t)},d(i){i&&_(n)}}}function Hl(e){let t,n=e[4]("add_snippet.title")+"",i,r,s,o,l,u,a=e[4]("body.title")+"",f,p,h,m,d,b,C,A,w,I,E;function B(S){e[8](S)}let L={label:e[4]("abbreviation.title"),errorMessage:e[1],autofocus:!0};return e[0]!==void 0&&(L.value=e[0]),s=new _n({props:L}),he.push(()=>De(s,"value",B)),b=new $e({props:{secondary:!0,$$slots:{default:[Tl]},$$scope:{ctx:e}}}),b.$on("click",e[5]),A=new $e({props:{primary:!0,disabled:e[3],$$slots:{default:[Il]},$$scope:{ctx:e}}}),A.$on("click",e[6]),{c(){t=P("h2"),i=j(n),r=R(),U(s.$$.fragment),l=R(),u=P("label"),f=j(a),p=R(),h=P("textarea"),m=R(),d=P("div"),U(b.$$.fragment),C=R(),U(A.$$.fragment),c(t,"class","svelte-126nfs4"),c(u,"for","body"),c(h,"id","body"),c(h,"class","svelte-126nfs4"),c(d,"class","button-row svelte-126nfs4")},m(S,O){g(S,t,O),T(t,i),g(S,r,O),M(s,S,O),g(S,l,O),g(S,u,O),T(u,f),g(S,p,O),g(S,h,O),je(h,e[2]),g(S,m,O),g(S,d,O),M(b,d,null),T(d,C),M(A,d,null),w=!0,I||(E=ne(h,"input",e[9]),I=!0)},p(S,O){(!w||O&16)&&n!==(n=S[4]("add_snippet.title")+"")&&z(i,n);const v={};O&16&&(v.label=S[4]("abbreviation.title")),O&2&&(v.errorMessage=S[1]),!o&&O&1&&(o=!0,v.value=S[0],Ue(()=>o=!1)),s.$set(v),(!w||O&16)&&a!==(a=S[4]("body.title")+"")&&z(f,a),O&4&&je(h,S[2]);const N={};O&2064&&(N.$$scope={dirty:O,ctx:S}),b.$set(N);const H={};O&8&&(H.disabled=S[3]),O&2064&&(H.$$scope={dirty:O,ctx:S}),A.$set(H)},i(S){w||(y(s.$$.fragment,S),y(b.$$.fragment,S),y(A.$$.fragment,S),w=!0)},o(S){k(s.$$.fragment,S),k(b.$$.fragment,S),k(A.$$.fragment,S),w=!1},d(S){S&&(_(t),_(r),_(l),_(u),_(p),_(h),_(m),_(d)),x(s,S),x(b),x(A),I=!1,E()}}}function Cl(e){let t,n;return t=new Ye({props:{$$slots:{default:[Hl]},$$scope:{ctx:e}}}),t.$on("cancel",e[5]),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&2079&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Ll(e,t,n){let i,r,s;ie(e,_e,d=>n(4,r=d)),ie(e,pe,d=>n(7,s=d));let o="",l="";async function u(d){if(d.length===0){n(1,a=r("abbreviation.empty"));return}if(!s){n(1,a="");return}try{const b=await ii(d);if(b.hasOwnProperty("abbreviation")&&b.abbreviation.length>0){n(1,a=r("abbreviation.exists"));return}}catch(b){await oe(r("add_snippet.error_title"),b)}n(1,a="")}let a="";function f(){ve()}async function p(){try{const d=await Wi(o,l);await ve()}catch(d){await oe(r("add_snippet.error_title"),d)}}function h(d){o=d,n(0,o)}function m(){l=this.value,n(2,l)}return e.$$.update=()=>{e.$$.dirty&1&&u(o),e.$$.dirty&130&&n(3,i=!s||a.length>0)},[o,a,l,i,r,f,p,s,h,m]}class Pl extends ee{constructor(t){super(),K(this,t,Ll,Cl,J,{})}}function Nl(e){let t=e[5]("button.remove")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&32&&t!==(t=i[5]("button.remove")+"")&&z(n,t)},d(i){i&&_(n)}}}function Ol(e){let t=e[5]("button.cancel")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&32&&t!==(t=i[5]("button.cancel")+"")&&z(n,t)},d(i){i&&_(n)}}}function Ml(e){let t=e[5]("button.save")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&32&&t!==(t=i[5]("button.save")+"")&&z(n,t)},d(i){i&&_(n)}}}function xl(e){let t,n=e[5]("edit_snippet.title")+"",i,r,s,o,l,u,a=e[5]("body.title")+"",f,p,h,m,d,b,C,A,w,I,E,B,L;function S(v){e[11](v)}let O={label:e[5]("abbreviation.title"),errorMessage:e[1],autofocus:!0};return e[0]!==void 0&&(O.value=e[0]),s=new _n({props:O}),he.push(()=>De(s,"value",S)),b=new $e({props:{danger:!0,disabled:e[3],$$slots:{default:[Nl]},$$scope:{ctx:e}}}),b.$on("click",e[7]),A=new $e({props:{secondary:!0,$$slots:{default:[Ol]},$$scope:{ctx:e}}}),A.$on("click",e[6]),I=new $e({props:{primary:!0,disabled:e[4],$$slots:{default:[Ml]},$$scope:{ctx:e}}}),I.$on("click",e[8]),{c(){t=P("h2"),i=j(n),r=R(),U(s.$$.fragment),l=R(),u=P("label"),f=j(a),p=R(),h=P("textarea"),m=R(),d=P("div"),U(b.$$.fragment),C=R(),U(A.$$.fragment),w=R(),U(I.$$.fragment),c(t,"class","svelte-126nfs4"),c(u,"for","body"),c(h,"id","body"),c(h,"class","svelte-126nfs4"),c(d,"class","button-row svelte-126nfs4")},m(v,N){g(v,t,N),T(t,i),g(v,r,N),M(s,v,N),g(v,l,N),g(v,u,N),T(u,f),g(v,p,N),g(v,h,N),je(h,e[2]),g(v,m,N),g(v,d,N),M(b,d,null),T(d,C),M(A,d,null),T(d,w),M(I,d,null),E=!0,B||(L=ne(h,"input",e[12]),B=!0)},p(v,N){(!E||N&32)&&n!==(n=v[5]("edit_snippet.title")+"")&&z(i,n);const H={};N&32&&(H.label=v[5]("abbreviation.title")),N&2&&(H.errorMessage=v[1]),!o&&N&1&&(o=!0,H.value=v[0],Ue(()=>o=!1)),s.$set(H),(!E||N&32)&&a!==(a=v[5]("body.title")+"")&&z(f,a),N&4&&je(h,v[2]);const D={};N&8&&(D.disabled=v[3]),N&32800&&(D.$$scope={dirty:N,ctx:v}),b.$set(D);const V={};N&32800&&(V.$$scope={dirty:N,ctx:v}),A.$set(V);const se={};N&16&&(se.disabled=v[4]),N&32800&&(se.$$scope={dirty:N,ctx:v}),I.$set(se)},i(v){E||(y(s.$$.fragment,v),y(b.$$.fragment,v),y(A.$$.fragment,v),y(I.$$.fragment,v),E=!0)},o(v){k(s.$$.fragment,v),k(b.$$.fragment,v),k(A.$$.fragment,v),k(I.$$.fragment,v),E=!1},d(v){v&&(_(t),_(r),_(l),_(u),_(p),_(h),_(m),_(d)),x(s,v),x(b),x(A),x(I),B=!1,L()}}}function Rl(e){let t,n;return t=new Ye({props:{$$slots:{default:[xl]},$$scope:{ctx:e}}}),t.$on("cancel",e[6]),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&32831&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Ul(e,t,n){let i,r,s,o;ie(e,_e,w=>n(5,s=w)),ie(e,pe,w=>n(10,o=w));let{params:l={}}=t,u={},a="",f="";async function p(w){if(n(1,h=""),!!u.hasOwnProperty("id")){if(w.length===0){n(1,h=s("abbreviation.empty"));return}if(o)try{const I=await ii(w);I.hasOwnProperty("abbreviation")&&I.abbreviation.length>0&&I.id!==u.id&&n(1,h=s("abbreviation.exists"))}catch(I){await oe(s("edit_snippet.error_title"),I)}}}let h="";function m(){ve()}async function d(){try{await rr(u.abbreviation),await ve()}catch(w){await oe(s("remove_snippet.error_title"),w)}}async function b(){let w={...u};w.abbreviation=a,w.body=f;try{await fr(u.id,w),await ve()}catch(I){await oe(s("edit_snippet.error_title"),I)}}Ze(async()=>{l.hasOwnProperty("id")||(await oe(s("edit_snippet.error_title"),s("edit_snippet.id_not_supplied")),await ve());try{u=await Yi(l.id)}catch(I){await oe(s("edit_snippet.error_title"),I),await ve()}let w=!1;try{w=await tr(u.id)}catch(I){await oe(s("edit_snippet.error_title"),I),await ve()}w&&(await oe(s("edit_snippet.error_title"),s("edit_snippet.snippet_not_found")),await ve()),n(0,a=u.abbreviation),n(2,f=u.body)});function C(w){a=w,n(0,a)}function A(){f=this.value,n(2,f)}return e.$$set=w=>{"params"in w&&n(9,l=w.params)},e.$$.update=()=>{e.$$.dirty&1&&p(a),e.$$.dirty&1026&&n(4,i=!o||h.length>0),e.$$.dirty&1024&&n(3,r=!o)},[a,h,f,r,i,s,m,d,b,l,o,C,A]}class Dl extends ee{constructor(t){super(),K(this,t,Ul,Rl,J,{params:9})}}function Gl(e){let t,n,i,r,s,o;return t=new me({props:{horizontal:!0,iconClass:"dimmed",icon:Bi,size:"2.5x",title:e[4]("button.back")}}),t.$on("activate",e[6]),i=new gn({}),s=new me({props:{horizontal:!0,iconClass:"dimmed",icon:oo,size:"2.5x",title:e[4]("button.about")}}),s.$on("activate",e[7]),{c(){U(t.$$.fragment),n=R(),U(i.$$.fragment),r=R(),U(s.$$.fragment)},m(l,u){M(t,l,u),g(l,n,u),M(i,l,u),g(l,r,u),M(s,l,u),o=!0},p(l,u){const a={};u&16&&(a.title=l[4]("button.back")),t.$set(a);const f={};u&16&&(f.title=l[4]("button.about")),s.$set(f)},i(l){o||(y(t.$$.fragment,l),y(i.$$.fragment,l),y(s.$$.fragment,l),o=!0)},o(l){k(t.$$.fragment,l),k(i.$$.fragment,l),k(s.$$.fragment,l),o=!1},d(l){l&&(_(n),_(r)),x(t,l),x(i,l),x(s,l)}}}function $l(e){let t=e[4]("settings.no_connection")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("settings.no_connection")+"")&&z(n,t)},i:G,o:G,d(i){i&&_(n)}}}function jl(e){let t,n=e[4]("settings.import_export_title")+"",i,r,s,o,l,u,a,f,p;o=new me({props:{horizontal:!0,iconClass:"dimmed",icon:rn,size:"1.5x",$$slots:{default:[Fl]},$$scope:{ctx:e}}}),o.$on("activate",e[19]),u=new me({props:{horizontal:!0,iconClass:"dimmed",icon:rn,size:"1.5x",$$slots:{default:[zl]},$$scope:{ctx:e}}}),u.$on("activate",e[20]);let h=e[5]&&e[5].length>0&&Zn(e);return{c(){t=P("h3"),i=j(n),r=R(),s=P("p"),U(o.$$.fragment),l=R(),U(u.$$.fragment),a=R(),h&&h.c(),f=we(),c(t,"class","svelte-jq6614"),c(s,"class","import-snippets svelte-jq6614")},m(m,d){g(m,t,d),T(t,i),g(m,r,d),g(m,s,d),M(o,s,null),T(s,l),M(u,s,null),g(m,a,d),h&&h.m(m,d),g(m,f,d),p=!0},p(m,d){(!p||d&16)&&n!==(n=m[4]("settings.import_export_title")+"")&&z(i,n);const b={};d&33554448&&(b.$$scope={dirty:d,ctx:m}),o.$set(b);const C={};d&33554448&&(C.$$scope={dirty:d,ctx:m}),u.$set(C),m[5]&&m[5].length>0?h?(h.p(m,d),d&32&&y(h,1)):(h=Zn(m),h.c(),y(h,1),h.m(f.parentNode,f)):h&&(ae(),k(h,1,1,()=>{h=null}),ue())},i(m){p||(y(o.$$.fragment,m),y(u.$$.fragment,m),y(h),p=!0)},o(m){k(o.$$.fragment,m),k(u.$$.fragment,m),k(h),p=!1},d(m){m&&(_(t),_(r),_(s),_(a),_(f)),x(o),x(u),h&&h.d(m)}}}function Fl(e){let t=e[4]("import_snippets.new_only_title")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("import_snippets.new_only_title")+"")&&z(n,t)},d(i){i&&_(n)}}}function zl(e){let t=e[4]("import_snippets.update_title")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("import_snippets.update_title")+"")&&z(n,t)},d(i){i&&_(n)}}}function Zn(e){let t,n,i;return n=new me({props:{horizontal:!0,iconClass:"dimmed",icon:Js,size:"1.5x",$$slots:{default:[Vl]},$$scope:{ctx:e}}}),n.$on("activate",e[12]),{c(){t=P("p"),U(n.$$.fragment),c(t,"class","export-snippets svelte-jq6614")},m(r,s){g(r,t,s),M(n,t,null),i=!0},p(r,s){const o={};s&33554448&&(o.$$scope={dirty:s,ctx:r}),n.$set(o)},i(r){i||(y(n.$$.fragment,r),i=!0)},o(r){k(n.$$.fragment,r),i=!1},d(r){r&&_(t),x(n)}}}function Vl(e){let t=e[4]("export_snippets.title")+"",n;return{c(){n=j(t)},m(i,r){g(i,n,r)},p(i,r){r&16&&t!==(t=i[4]("export_snippets.title")+"")&&z(n,t)},d(i){i&&_(n)}}}function Wl(e){let t,n,i,r=e[4]("settings.title")+"",s,o,l,u=e[4]("settings.autostart_title")+"",a,f,p,h,m,d,b=e[4]("settings.autostart")+"",C,A,w,I=e[4]("settings.autoexpand_title")+"",E,B,L,S,O,v,N=e[4]("settings.autoexpand")+"",H,D,V,se=e[4]("settings.search_and_paste_title")+"",Ee,ye,Se,Ae,le,Ne,Ce=e[4]("settings.focus_search")+"",F,Y,fe,ge,Ke,be,Ot,bn;t=new Nt({props:{$$slots:{default:[Gl]},$$scope:{ctx:e}}});const vn=[jl,$l],Be=[];function wn($,Z){return $[0]?0:1}return fe=wn(e),ge=Be[fe]=vn[fe](e),{c(){U(t.$$.fragment),n=R(),i=P("h2"),s=j(r),o=R(),l=P("h3"),a=j(u),f=R(),p=P("p"),h=P("label"),m=P("input"),d=R(),C=j(b),A=R(),w=P("h3"),E=j(I),B=R(),L=P("p"),S=P("label"),O=P("input"),v=R(),H=j(N),D=R(),V=P("h3"),Ee=j(se),ye=R(),Se=P("p"),Ae=P("label"),le=P("input"),Ne=R(),F=j(Ce),Y=R(),ge.c(),Ke=we(),c(i,"class","svelte-jq6614"),c(l,"class","svelte-jq6614"),c(m,"type","checkbox"),c(p,"class","svelte-jq6614"),c(w,"class","svelte-jq6614"),c(O,"type","checkbox"),c(L,"class","svelte-jq6614"),c(V,"class","svelte-jq6614"),c(le,"type","checkbox"),c(Se,"class","svelte-jq6614")},m($,Z){M(t,$,Z),g($,n,Z),g($,i,Z),T(i,s),g($,o,Z),g($,l,Z),T(l,a),g($,f,Z),g($,p,Z),T(p,h),T(h,m),m.checked=e[1],T(h,d),T(h,C),g($,A,Z),g($,w,Z),T(w,E),g($,B,Z),g($,L,Z),T(L,S),T(S,O),O.checked=e[2],T(S,v),T(S,H),g($,D,Z),g($,V,Z),T(V,Ee),g($,ye,Z),g($,Se,Z),T(Se,Ae),T(Ae,le),le.checked=e[3],T(Ae,Ne),T(Ae,F),g($,Y,Z),Be[fe].m($,Z),g($,Ke,Z),be=!0,Ot||(bn=[ne(m,"change",e[13]),ne(m,"change",e[14]),ln(Ii.call(null,m,!0)),ne(O,"change",e[15]),ne(O,"change",e[16]),ne(le,"change",e[17]),ne(le,"change",e[18])],Ot=!0)},p($,Z){const En={};Z&33554448&&(En.$$scope={dirty:Z,ctx:$}),t.$set(En),(!be||Z&16)&&r!==(r=$[4]("settings.title")+"")&&z(s,r),(!be||Z&16)&&u!==(u=$[4]("settings.autostart_title")+"")&&z(a,u),Z&2&&(m.checked=$[1]),(!be||Z&16)&&b!==(b=$[4]("settings.autostart")+"")&&z(C,b),(!be||Z&16)&&I!==(I=$[4]("settings.autoexpand_title")+"")&&z(E,I),Z&4&&(O.checked=$[2]),(!be||Z&16)&&N!==(N=$[4]("settings.autoexpand")+"")&&z(H,N),(!be||Z&16)&&se!==(se=$[4]("settings.search_and_paste_title")+"")&&z(Ee,se),Z&8&&(le.checked=$[3]),(!be||Z&16)&&Ce!==(Ce=$[4]("settings.focus_search")+"")&&z(F,Ce);let Mt=fe;fe=wn($),fe===Mt?Be[fe].p($,Z):(ae(),k(Be[Mt],1,1,()=>{Be[Mt]=null}),ue(),ge=Be[fe],ge?ge.p($,Z):(ge=Be[fe]=vn[fe]($),ge.c()),y(ge,1),ge.m(Ke.parentNode,Ke))},i($){be||(y(t.$$.fragment,$),y(ge),be=!0)},o($){k(t.$$.fragment,$),k(ge),be=!1},d($){$&&(_(n),_(i),_(o),_(l),_(f),_(p),_(A),_(w),_(B),_(L),_(D),_(V),_(ye),_(Se),_(Y),_(Ke)),x(t,$),Be[fe].d($),Ot=!1,de(bn)}}}function Xl(e){let t,n;return t=new Ye({props:{centered:!0,$$slots:{default:[Wl]},$$scope:{ctx:e}}}),t.$on("cancel",e[6]),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&33554495&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function ql(e,t,n){let i,r,s;ie(e,_e,D=>n(4,i=D)),ie(e,pe,D=>n(0,r=D)),ie(e,Pe,D=>n(5,s=D));function o(){ve()}function l(){Ge("/about")}let u=!1,a=!1,f=!0;async function p(){let D=!1;try{D=await Ji()}catch(V){await oe(i("settings.get_error_title"),V);return}return D}async function h(D){try{await ur(D)}catch(V){await oe(i("settings.save_error_title"),V);return}return D}async function m(){let D=!1;try{D=await Qi()}catch(V){await oe(i("settings.get_error_title"),V);return}return D}async function d(D){try{await ar(D)}catch(V){await oe(i("settings.save_error_title"),V);return}return D}async function b(){let D="";try{D=await ni("FOCUS_SEARCH_BOX")}catch(V){await oe(i("settings.get_error_title"),V);return}return D!=="false"}async function C(D){const V=D?"true":"false";try{await sr("FOCUS_SEARCH_BOX",V)}catch(se){await oe(i("settings.save_error_title"),se);return}return D}function A(D){Pe.fetch()}async function w(D){try{const V=await ri(D)}catch(V){await oe(i("import_snippets.error_title"),V)}await Pe.fetch()}async function I(){try{const D=await qi()}catch(D){await oe(i("export_snippets.error_title"),D)}}Ze(async()=>{n(1,u=await p()),n(2,a=await m()),n(3,f=await b())});function E(){u=this.checked,n(1,u)}const B=()=>h(u);function L(){a=this.checked,n(2,a)}const S=()=>d(a);function O(){f=this.checked,n(3,f)}const v=()=>C(f),N=()=>w(!1),H=()=>w(!0);return e.$$.update=()=>{e.$$.dirty&1&&A()},[r,u,a,f,i,s,o,l,h,d,C,w,I,E,B,L,S,O,v,N,H]}class Zl extends ee{constructor(t){super(),K(this,t,ql,Xl,J,{})}}const Ql="/assets/snippetpixie-icon-128-1d7040bc.svg";function Jl(e){let t,n;return t=new me({props:{horizontal:!0,iconClass:"dimmed",icon:Bi,size:"2.5x",title:e[3]("button.back")}}),t.$on("activate",e[4]),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,r){const s={};r&8&&(s.title=i[3]("button.back")),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function Yl(e){let t,n,i,r,s,o,l,u,a,f=e[3]("about.description")+"",p,h,m,d,b,C,A,w,I,E,B=e[3]("about.by")+"",L,S,O,v,N,H,D=e[3]("about.licence_title")+"",V,se,Ee,ye,Se=e[3]("about.licence")+"",Ae,le,Ne,Ce;return t=new Nt({props:{$$slots:{default:[Jl]},$$scope:{ctx:e}}}),{c(){U(t.$$.fragment),n=R(),i=P("img"),s=R(),o=P("h2"),o.textContent="Snippet Pixie",l=R(),u=P("p"),a=P("em"),p=j(f),h=R(),m=P("p"),d=P("a"),b=j(e[2]),C=R(),A=P("p"),w=P("a"),w.textContent="snippetpixie.org",I=R(),E=P("h3"),L=j(B),S=R(),O=P("p"),v=P("a"),v.textContent="ianmjones",N=R(),H=P("h3"),V=j(D),se=R(),Ee=P("p"),ye=P("a"),Ae=j(Se),Mi(i.src,r=Ql)||c(i,"src",r),c(i,"alt","Snippet Pixie icon"),c(o,"class","svelte-sjm2tb"),c(u,"class","svelte-sjm2tb"),c(d,"href",e[0]),c(m,"class","svelte-sjm2tb"),c(w,"href","https://snippetpixie.org"),c(A,"class","svelte-sjm2tb"),c(E,"class","svelte-sjm2tb"),c(v,"href","https://ianmjones.com"),c(O,"class","svelte-sjm2tb"),c(H,"class","svelte-sjm2tb"),c(ye,"href",e[1]),c(Ee,"class","svelte-sjm2tb")},m(F,Y){M(t,F,Y),g(F,n,Y),g(F,i,Y),g(F,s,Y),g(F,o,Y),g(F,l,Y),g(F,u,Y),T(u,a),T(a,p),g(F,h,Y),g(F,m,Y),T(m,d),T(d,b),g(F,C,Y),g(F,A,Y),T(A,w),g(F,I,Y),g(F,E,Y),T(E,L),g(F,S,Y),g(F,O,Y),T(O,v),g(F,N,Y),g(F,H,Y),T(H,V),g(F,se,Y),g(F,Ee,Y),T(Ee,ye),T(ye,Ae),le=!0,Ne||(Ce=[ne(d,"click",gt(e[6])),ne(w,"click",gt(e[7])),ne(v,"click",gt(e[8])),ne(ye,"click",gt(e[9]))],Ne=!0)},p(F,Y){const fe={};Y&1032&&(fe.$$scope={dirty:Y,ctx:F}),t.$set(fe),(!le||Y&8)&&f!==(f=F[3]("about.description")+"")&&z(p,f),(!le||Y&4)&&z(b,F[2]),(!le||Y&1)&&c(d,"href",F[0]),(!le||Y&8)&&B!==(B=F[3]("about.by")+"")&&z(L,B),(!le||Y&8)&&D!==(D=F[3]("about.licence_title")+"")&&z(V,D),(!le||Y&8)&&Se!==(Se=F[3]("about.licence")+"")&&z(Ae,Se),(!le||Y&2)&&c(ye,"href",F[1])},i(F){le||(y(t.$$.fragment,F),le=!0)},o(F){k(t.$$.fragment,F),le=!1},d(F){F&&(_(n),_(i),_(s),_(o),_(l),_(u),_(h),_(m),_(C),_(A),_(I),_(E),_(S),_(O),_(N),_(H),_(se),_(Ee)),x(t,F),Ne=!1,de(Ce)}}}function Kl(e){let t,n;return t=new Ye({props:{centered:!0,$$slots:{default:[Yl]},$$scope:{ctx:e}}}),t.$on("cancel",e[4]),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p(i,[r]){const s={};r&1039&&(s.$$scope={dirty:r,ctx:i}),t.$set(s)},i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function ea(e,t,n){let i,r,s,o;ie(e,_e,m=>n(3,o=m));function l(){ve()}let u="";Ze(async()=>{n(5,u=await er())});const a=()=>bt(r),f=()=>bt("https://snippetpixie.org"),p=()=>bt("https://ianmjones.com"),h=()=>bt(s);return e.$$.update=()=>{e.$$.dirty&32&&n(2,i="v"+u),e.$$.dirty&32&&n(0,r="https://git.sr.ht/~ianmjones/snippetpixie/tree/"+u),e.$$.dirty&1&&n(1,s=r+"/item/LICENSE")},[r,s,i,o,l,u,a,f,p,h]}class ta extends ee{constructor(t){super(),K(this,t,ea,Kl,J,{})}}function na(e){let t,n;return t=new Fs({props:{routes:e[1]}}),{c(){U(t.$$.fragment)},m(i,r){M(t,i,r),n=!0},p:G,i(i){n||(y(t.$$.fragment,i),n=!0)},o(i){k(t.$$.fragment,i),n=!1},d(i){x(t,i)}}}function ia(e){let t;return{c(){t=j("Loading...")},m(n,i){g(n,t,i)},p:G,i:G,o:G,d(n){n&&_(t)}}}function ra(e){let t,n,i,r;const s=[ia,na],o=[];function l(u,a){return u[0]?0:1}return t=l(e),n=o[t]=s[t](e),{c(){n.c(),i=we()},m(u,a){o[t].m(u,a),g(u,i,a),r=!0},p(u,[a]){let f=t;t=l(u),t===f?o[t].p(u,a):(ae(),k(o[f],1,1,()=>{o[f]=null}),ue(),n=o[t],n?n.p(u,a):(n=o[t]=s[t](u),n.c()),y(n,1),n.m(i.parentNode,i))},i(u){r||(y(n),r=!0)},o(u){k(n),r=!1},d(u){u&&_(i),o[t].d(u)}}}function sa(e,t,n){let i;ie(e,yt,u=>n(0,i=u));let r;async function s(){try{const u=await ir("Pong");u==="Pong"?pe.update(a=>!0):(pe.update(a=>!1),Ut("Got '"+u+"' back from Ping instead of 'Pong'.")),nt.update(a=>!0),Tt.update(a=>!1)}catch(u){pe.update(a=>!1),Ut("Ping returned: "+u),o()}}async function o(){try{await Xi()?nt.update(a=>!0):nt.update(a=>!1)}catch(u){nt.update(a=>!1),Ut("DaemonInstalled returned: "+u)}}Es("en-GB",()=>Oi(()=>import("./en-GB-782433d5.js"),[])),Ss({fallbackLocale:"en-GB",initialLocale:ks()});const l={"/":Bl,"/snippet/add":Pl,"/snippet/edit/:id":Dl,"/settings":Zl,"/about":ta};return Ze(async()=>{await s(),r=setInterval(s,5e3)}),an(()=>{clearInterval(r)}),[i,l]}class oa extends ee{constructor(t){super(),K(this,t,sa,ra,J,{})}}new oa({target:document.getElementById("app")});

R cmd/snippetpixiegui/frontend/dist/assets/index-b94e7b91.css => cmd/snippetpixiegui/frontend/dist/assets/index-e2d949f4.css +1 -1
@@ 1,1 1,1 @@
:root{--nord0: #2E3440;--nord1: #3B4252;--nord2: #434C5E;--nord3: #4C566A;--nord4: #D8DEE9;--nord5: #E5E9F0;--nord6: #ECEFF4;--nord7: #8FBCBB;--nord8: #88C0D0;--nord9: #81A1C1;--nord10: #5E81AC;--nord11: #BF616A;--nord12: #D08770;--nord13: #EBCB8B;--nord14: #A3BE8C;--nord15: #B48EAD}:root{--background-color: var(--nord0);--primary-text-color: var(--nord6);--secondary-text-color: var(--nord5);--tertiary-text-color: var(--nord4);--highlight-color: var(--nord7);--primary-color: var(--nord8);--secondary-color: var(--nord9);--tertiary-color: var(--nord10);--error-color: var(--nord11);--danger-color: var(--nord12);--warning-color: var(--nord13);--success-color: var(--nord14);--selected-text-background-color: var(--nord3);--input-background-color: var(--nord1);--border-color: var(--nord3)}body{font-family:source code pro,monospace;background-color:var(--background-color);color:var(--primary-text-color);padding:0;margin:0}#app>.screen{height:calc(100vh - 2rem);margin:1rem}a{text-decoration:underline;color:var(--primary-color)}label{text-align:left;margin-top:.3rem}input[type=text],input[type=search],textarea{background-color:var(--input-background-color);border-color:var(--border-color);color:var(--primary-text-color);border-style:solid;border-width:1px;border-radius:.3rem;font-size:1.2rem;padding:.3rem}textarea{resize:none}input[type=checkbox]{accent-color:var(--primary-color)}:focus-visible{outline:none}:focus{border-color:var(--highlight-color)}label:focus-within{color:var(--highlight-color)}::selection{background-color:var(--selected-text-background-color)}.error{color:var(--error-color);border:var(--error-color) 1px solid;padding:.5rem;border-radius:.3rem}.danger{color:var(--danger-color);border:var(--danger-color) 1px solid;padding:.5rem;border-radius:.3rem}.warning{color:var(--warning-color);border:var(--warning-color) 1px solid;padding:.5rem;border-radius:.3rem}.success{color:var(--success-color);border:var(--success-color) 1px solid;padding:.5rem;border-radius:.3rem}.dimmed{opacity:.5}.centered{display:flex;flex-direction:column;align-items:center}p.svelte-hclhr3{align-self:stretch;margin-top:0;text-align:center}button.svelte-1jbd97{margin-left:.5rem;border-style:solid;border-width:.1rem;border-radius:.3rem;box-shadow:.1rem .1rem .1rem var(--border-color);min-width:5rem;padding:.3rem}button.svelte-1jbd97:hover:not(:disabled),button.svelte-1jbd97:focus:not(:disabled){background-color:var(--highlight-color);color:var(--background-color);border-color:var(--highlight-color);cursor:pointer}button.svelte-1jbd97:active{box-shadow:0 0}button.svelte-1jbd97:disabled{cursor:not-allowed;opacity:.5}.primary.svelte-1jbd97{background-color:var(--primary-color);color:var(--background-color);border-color:var(--primary-color)}.danger.svelte-1jbd97{background-color:var(--error-color);color:var(--primary-text-color);border-color:var(--error-color)}.secondary.svelte-1jbd97{background-color:var(--background-color);color:var(--secondary-color);border-color:var(--secondary-color)}.screen.svelte-i096ea{display:flex;flex-direction:column;row-gap:.25rem;height:100%}.content.svelte-bhj2u4.svelte-bhj2u4{cursor:pointer}.content.svelte-bhj2u4.svelte-bhj2u4:hover,.content.svelte-bhj2u4.svelte-bhj2u4:focus{color:var(--highlight-color);opacity:1}.horizontal.svelte-bhj2u4.svelte-bhj2u4{display:flex;align-items:center;gap:.5rem}.horizontal.svelte-bhj2u4 .icon-wrapper.svelte-bhj2u4{display:inline-block}.icon-wrapper.svelte-bhj2u4.svelte-bhj2u4{display:flex;align-items:center}.content.svelte-bhj2u4:hover .icon-wrapper.svelte-bhj2u4{opacity:1}div.input.svelte-8p6spj{display:flex;flex-direction:column;width:100%}div.input-control.svelte-8p6spj{display:flex}input.svelte-8p6spj{flex:1 0 auto}input.search.svelte-8p6spj{border-top-left-radius:0;border-bottom-left-radius:0;border-left:none;margin-left:0}input.search.value.svelte-8p6spj{border-radius:0;border-right:none;margin-right:0}.search-icon.svelte-8p6spj,.clear-icon.svelte-8p6spj{display:flex;background-color:var(--input-background-color);color:var(--primary-text-color);border:none;font-size:1.2rem;padding:.3rem;cursor:pointer}.search-icon.svelte-8p6spj{border-top:1px solid var(--border-color);border-left:1px solid var(--border-color);border-bottom:1px solid var(--border-color);border-top-left-radius:.3rem;border-bottom-left-radius:.3rem;margin-right:0}.clear-icon.svelte-8p6spj{border-top:1px solid var(--border-color);border-right:1px solid var(--border-color);border-bottom:1px solid var(--border-color);border-top-right-radius:.3rem;border-bottom-right-radius:.3rem;margin-left:0}.search-icon.svelte-8p6spj:focus,.clear-icon.svelte-8p6spj:focus{color:var(--highlight-color)}.focussed.svelte-8p6spj{border-color:var(--highlight-color)}div.error-message.svelte-8p6spj{color:var(--error-color)}.shortcut-button.svelte-11t060e{background-color:var(--input-background-color);border-color:var(--border-color);color:var(--primary-text-color);border-style:solid;border-width:1px;border-radius:.3rem;font-size:1.2rem;padding:.3rem}.hide.svelte-11t060e{visibility:hidden}li.svelte-1ebkg7o{display:flex;gap:.3rem;align-items:center;margin:0 0 .25rem;padding:.3rem;border-radius:.3rem;cursor:pointer}li.svelte-1ebkg7o:first-of-type{margin-top:.5rem}li.svelte-1ebkg7o:last-of-type{margin-bottom:0}li.svelte-1ebkg7o:focus,.focussed.svelte-1ebkg7o{color:var(--background-color);background-color:var(--secondary-color)}li.active.svelte-1ebkg7o:focus,.focussed.active.svelte-1ebkg7o{color:var(--background-color);background-color:var(--primary-color)}li.svelte-1ebkg7o:hover,li.active.svelte-1ebkg7o:hover{color:var(--background-color);background-color:var(--highlight-color)}.body.svelte-1ebkg7o{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1 1 auto}.edit-icon-wrapper.svelte-1ebkg7o{display:flex}ul.svelte-1wnqbvs{display:flex;flex-direction:column;flex-grow:1;list-style:none;overflow:hidden;overflow-y:scroll;margin:0;padding:0}.toolbar.svelte-i867mn{display:flex;gap:.3rem;align-items:center;align-self:stretch;margin:0;padding:0}.toolbar.bottom.svelte-i867mn{border-top:var(--border-color) 1px solid;padding-top:.3rem;padding-bottom:0;margin-top:auto}.toolbar .toolbar-spacer.svelte-1a67v9{flex-grow:1}.no-snippets-found.svelte-y4605t{font-size:1.5rem}.no-snippets-found.description.svelte-y4605t{font-size:1.2rem;margin-top:0}h2.svelte-126nfs4{align-self:center}#body.svelte-126nfs4{flex:1 0 auto;height:1em}.button-row.svelte-126nfs4{margin-top:.5rem;display:flex;justify-content:flex-end}h2.svelte-jq6614,h3.svelte-jq6614{margin:.5rem 0 .2rem}p.svelte-jq6614{margin:.2rem 0 .5rem}h2.svelte-sjm2tb,h3.svelte-sjm2tb{margin:.5rem 0 .2rem}p.svelte-sjm2tb{margin:.2rem 0 .5rem;text-align:center}
:root{--nord0: #2E3440;--nord1: #3B4252;--nord2: #434C5E;--nord3: #4C566A;--nord4: #D8DEE9;--nord5: #E5E9F0;--nord6: #ECEFF4;--nord7: #8FBCBB;--nord8: #88C0D0;--nord9: #81A1C1;--nord10: #5E81AC;--nord11: #BF616A;--nord12: #D08770;--nord13: #EBCB8B;--nord14: #A3BE8C;--nord15: #B48EAD}:root{--background-color: var(--nord0);--primary-text-color: var(--nord6);--secondary-text-color: var(--nord5);--tertiary-text-color: var(--nord4);--highlight-color: var(--nord7);--primary-color: var(--nord8);--secondary-color: var(--nord9);--tertiary-color: var(--nord10);--error-color: var(--nord11);--danger-color: var(--nord12);--warning-color: var(--nord13);--success-color: var(--nord14);--selected-text-background-color: var(--nord3);--input-background-color: var(--nord1);--border-color: var(--nord3)}body{font-family:source code pro,monospace;background-color:var(--background-color);color:var(--primary-text-color);padding:0;margin:0}#app>.screen{height:calc(100vh - 2rem);margin:1rem}a{text-decoration:underline;color:var(--primary-color)}label{text-align:left;margin-top:.3rem}input[type=text],input[type=search],textarea{background-color:var(--input-background-color);border-color:var(--border-color);color:var(--primary-text-color);border-style:solid;border-width:1px;border-radius:.3rem;font-size:1.2rem;padding:.3rem}textarea{resize:none}input[type=checkbox]{accent-color:var(--primary-color)}:focus-visible{outline:none}:focus{border-color:var(--highlight-color)}label:focus-within{color:var(--highlight-color)}::selection{background-color:var(--selected-text-background-color)}.error{color:var(--error-color);border:var(--error-color) 1px solid;padding:.5rem;border-radius:.3rem}.danger{color:var(--danger-color);border:var(--danger-color) 1px solid;padding:.5rem;border-radius:.3rem}.warning{color:var(--warning-color);border:var(--warning-color) 1px solid;padding:.5rem;border-radius:.3rem}.success{color:var(--success-color);border:var(--success-color) 1px solid;padding:.5rem;border-radius:.3rem}.dimmed{opacity:.5}.centered{display:flex;flex-direction:column;align-items:center}p.svelte-hclhr3{align-self:stretch;margin-top:0;text-align:center}button.svelte-1jbd97{margin-left:.5rem;border-style:solid;border-width:.1rem;border-radius:.3rem;box-shadow:.1rem .1rem .1rem var(--border-color);min-width:5rem;padding:.3rem}button.svelte-1jbd97:hover:not(:disabled),button.svelte-1jbd97:focus:not(:disabled){background-color:var(--highlight-color);color:var(--background-color);border-color:var(--highlight-color);cursor:pointer}button.svelte-1jbd97:active{box-shadow:0 0}button.svelte-1jbd97:disabled{cursor:not-allowed;opacity:.5}.primary.svelte-1jbd97{background-color:var(--primary-color);color:var(--background-color);border-color:var(--primary-color)}.danger.svelte-1jbd97{background-color:var(--error-color);color:var(--primary-text-color);border-color:var(--error-color)}.secondary.svelte-1jbd97{background-color:var(--background-color);color:var(--secondary-color);border-color:var(--secondary-color)}.screen.svelte-i096ea{display:flex;flex-direction:column;row-gap:.25rem;height:100%}.content.svelte-bhj2u4.svelte-bhj2u4{cursor:pointer}.content.svelte-bhj2u4.svelte-bhj2u4:hover,.content.svelte-bhj2u4.svelte-bhj2u4:focus{color:var(--highlight-color);opacity:1}.horizontal.svelte-bhj2u4.svelte-bhj2u4{display:flex;align-items:center;gap:.5rem}.horizontal.svelte-bhj2u4 .icon-wrapper.svelte-bhj2u4{display:inline-block}.icon-wrapper.svelte-bhj2u4.svelte-bhj2u4{display:flex;align-items:center}.content.svelte-bhj2u4:hover .icon-wrapper.svelte-bhj2u4{opacity:1}div.input.svelte-8p6spj{display:flex;flex-direction:column;width:100%}div.input-control.svelte-8p6spj{display:flex}input.svelte-8p6spj{flex:1 0 auto}input.search.svelte-8p6spj{border-top-left-radius:0;border-bottom-left-radius:0;border-left:none;margin-left:0}input.search.value.svelte-8p6spj{border-radius:0;border-right:none;margin-right:0}.search-icon.svelte-8p6spj,.clear-icon.svelte-8p6spj{display:flex;background-color:var(--input-background-color);color:var(--primary-text-color);border:none;font-size:1.2rem;padding:.3rem;cursor:pointer}.search-icon.svelte-8p6spj{border-top:1px solid var(--border-color);border-left:1px solid var(--border-color);border-bottom:1px solid var(--border-color);border-top-left-radius:.3rem;border-bottom-left-radius:.3rem;margin-right:0}.clear-icon.svelte-8p6spj{border-top:1px solid var(--border-color);border-right:1px solid var(--border-color);border-bottom:1px solid var(--border-color);border-top-right-radius:.3rem;border-bottom-right-radius:.3rem;margin-left:0}.search-icon.svelte-8p6spj:focus,.clear-icon.svelte-8p6spj:focus{color:var(--highlight-color)}.focussed.svelte-8p6spj{border-color:var(--highlight-color)}div.error-message.svelte-8p6spj{color:var(--error-color)}.shortcut-button.svelte-11t060e{background-color:var(--input-background-color);border-color:var(--border-color);color:var(--primary-text-color);border-style:solid;border-width:1px;border-radius:.3rem;font-size:1.2rem;padding:.3rem}.hide.svelte-11t060e{visibility:hidden}li.svelte-1ebkg7o{display:flex;gap:.3rem;align-items:center;margin:0 0 .25rem;padding:.3rem;border-radius:.3rem;cursor:pointer}li.svelte-1ebkg7o:first-of-type{margin-top:.5rem}li.svelte-1ebkg7o:last-of-type{margin-bottom:0}li.svelte-1ebkg7o:focus,.focussed.svelte-1ebkg7o{color:var(--background-color);background-color:var(--secondary-color)}li.active.svelte-1ebkg7o:focus,.focussed.active.svelte-1ebkg7o{color:var(--background-color);background-color:var(--primary-color)}li.svelte-1ebkg7o:hover,li.active.svelte-1ebkg7o:hover{color:var(--background-color);background-color:var(--highlight-color)}.body.svelte-1ebkg7o{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1 1 auto}.edit-icon-wrapper.svelte-1ebkg7o{display:flex}ul.svelte-1wnqbvs{display:flex;flex-direction:column;flex-grow:1;list-style:none;overflow:hidden;overflow-y:scroll;margin:0;padding:0}.toolbar.svelte-i867mn{display:flex;gap:.3rem;align-items:center;align-self:stretch;margin:0;padding:0}.toolbar.bottom.svelte-i867mn{border-top:var(--border-color) 1px solid;padding-top:.3rem;padding-bottom:0;margin-top:auto}.toolbar .toolbar-spacer.svelte-1a67v9{flex-grow:1}.no-snippets-found.svelte-y4605t{font-size:1.5rem}.no-snippets-found.description.svelte-y4605t{font-size:1.2rem;margin-top:0}h2.svelte-126nfs4{align-self:center}#body.svelte-126nfs4{flex:1 0 auto;height:1em}.button-row.svelte-126nfs4{margin-top:.5rem;display:flex;justify-content:flex-end}h2.svelte-1fggvh7,h3.svelte-1fggvh7{margin:.5rem 0 .2rem}p.svelte-1fggvh7{margin:.2rem 0 .5rem;text-align:center}p.row.svelte-1fggvh7{display:flex;align-items:center;gap:.25rem}h2.svelte-sjm2tb,h3.svelte-sjm2tb{margin:.5rem 0 .2rem}p.svelte-sjm2tb{margin:.2rem 0 .5rem;text-align:center}

M cmd/snippetpixiegui/frontend/dist/index.html => cmd/snippetpixiegui/frontend/dist/index.html +2 -2
@@ 5,8 5,8 @@
	<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
	
	<title>Snippet Pixie</title>
  <script type="module" crossorigin src="/assets/index-95462b26.js"></script>
  <link rel="stylesheet" href="/assets/index-b94e7b91.css">
  <script type="module" crossorigin src="/assets/index-288ebb61.js"></script>
  <link rel="stylesheet" href="/assets/index-e2d949f4.css">
</head>
<body>
<div id="app"></div>

M cmd/snippetpixiegui/frontend/src/components/SettingsScreen.svelte => cmd/snippetpixiegui/frontend/src/components/SettingsScreen.svelte +105 -5
@@ 1,19 1,26 @@
<script>
	import {onMount} from "svelte";
	import {_} from "svelte-i18n";
	import {pop, push} from "svelte-spa-router";
	import {
		ChevronsLeftIcon,
		DownloadIcon,
		InfoIcon,
		PlusSquareIcon,
		Trash2Icon,
		UploadIcon
	} from "svelte-feather-icons";
	import {
		CustomShortcutsEnabled,
		DeleteCustomShortcut,
		ExportSnippets,
		GetAutostartStatus,
		GetAutoexpandStatus,
		GetCustomShortcutBinding,
		GetSetting,
		ImportSnippets,
		SaveSetting,
		SaveCustomShortcut,
		ShowError,
		UpdateAutostart,
		UpdateAutoexpand


@@ 24,7 31,17 @@
	import Toolbar from "./Toolbar.svelte";
	import ToolbarSpacer from "./ToolbarSpacer.svelte";
	import IconButton from "./IconButton.svelte";
	import {onMount} from "svelte";
	import ShortcutButton from "./ShortcutButton.svelte";

	const customShortcutName = "Snippet Pixie Search & Paste pop-up window";
	const customShortcutCommand = "snippetpixiegui --search-and-paste";
	const customShortcutDefaultBinding = "<Ctrl>grave";

	let autostart = false;
	let autoexpand = false;
	let focusSearchBox = true;
	let customShortcutsEnabled = false;
	let customShortcutBinding = customShortcutDefaultBinding;

	function handleCancel() {
		pop();


@@ 34,10 51,6 @@
		push("/about");
	}

	let autostart = false;
	let autoexpand = false;
	let focusSearchBox = true;

	async function getAutostartStatus() {
		let on = false;
		try {


@@ 97,6 110,47 @@
		return value !== "false";
	}

	async function getCustomShortcutsEnabled() {
		let enabled = false;
		try {
			enabled = await CustomShortcutsEnabled();
		} catch ( err ) {
			await ShowError( $_( "settings.get_error_title" ), err );
			return;
		}

		return enabled;
	}

	async function getCustomShortcutBinding() {
		try {
			customShortcutBinding = await GetCustomShortcutBinding(customShortcutCommand);
		} catch ( err ) {
			await ShowError( $_( "settings.get_error_title" ), err );
			return;
		}
	}

	async function handleAddDefaultCustomShortcut() {
		try {
			await SaveCustomShortcut(customShortcutName, customShortcutDefaultBinding, customShortcutCommand, "");
		} catch ( err ) {
			await ShowError( $_( "settings.save_error_title" ), err );
		}

		await getCustomShortcutBinding();
	}

	async function handleDeleteCustomShortcut() {
		try {
			await DeleteCustomShortcut(customShortcutCommand, customShortcutBinding);
		} catch ( err ) {
			await ShowError( $_( "settings.delete_error_title" ), err );
		}

		await getCustomShortcutBinding();
	}

	async function updateFocusSearchBox( value ) {
		const stringValue = value ? "true" : "false";
		try {


@@ 136,6 190,11 @@
		autostart = await getAutostartStatus();
		autoexpand = await getAutoexpandStatus();
		focusSearchBox = await getFocusSearchBox();
		customShortcutsEnabled = await getCustomShortcutsEnabled();

		if (customShortcutsEnabled) {
			await getCustomShortcutBinding();
		}
	} )
</script>



@@ 187,6 246,37 @@
	</p>

	<h3>{$_( "settings.search_and_paste_title" )}</h3>
	{#if customShortcutsEnabled}
		{#if customShortcutBinding.length > 0}
			<p class="row">
				{$_( "settings.custom_shortcut" )}: <ShortcutButton shortcut={customShortcutBinding} />
				<IconButton
					horizontal
					iconClass="dimmed"
					icon={Trash2Icon}
					size="1.75x"
					title={$_( "settings.remove_custom_shortcut" )}
					on:activate={() => handleDeleteCustomShortcut()}
				/>
			</p>
			<p class="dimmed">{$_( "settings.change_custom_shortcut_desc" )}</p>
		{:else}
			<p class="row">
				{$_( "settings.custom_shortcut" )}: <ShortcutButton shortcut={$_( "settings.custom_shortcut_empty" )} />
				<IconButton
					horizontal
					iconClass="dimmed"
					icon={PlusSquareIcon}
					size="2.0x"
					title={$_( "settings.add_default_custom_shortcut" )}
					on:activate={() => handleAddDefaultCustomShortcut()}
				/>
			</p>
		{/if}
	{:else}
		<p class="dimmed">{$_( "settings.custom_shortcuts_disabled" )}</p>
	{/if}

	<p>
		<label>
			<input


@@ 206,6 296,7 @@
				iconClass="dimmed"
				icon={UploadIcon}
				size="1.5x"
				title={$_( "import_snippets.new_only_title" )}
				on:activate={() => handleImportSnippets(false)}
			>
				{$_( "import_snippets.new_only_title" )}


@@ 215,6 306,7 @@
				iconClass="dimmed"
				icon={UploadIcon}
				size="1.5x"
				title={$_( "import_snippets.update_title" )}
				on:activate={() => handleImportSnippets(true)}
			>
				{$_( "import_snippets.update_title" )}


@@ 227,6 319,7 @@
					iconClass="dimmed"
					icon={DownloadIcon}
					size="1.5x"
					title={$_( "export_snippets.title" )}
					on:activate={handleExportSnippets}
				>
					{$_( "export_snippets.title" )}


@@ 245,5 338,12 @@

	p {
		margin: 0.2rem 0 0.5rem;
		text-align: center;
	}

	p.row {
		display: flex;
		align-items: center;
		gap: 0.25rem;
	}
</style>

M cmd/snippetpixiegui/i18n/en-GB.json => cmd/snippetpixiegui/i18n/en-GB.json +7 -1
@@ 42,7 42,13 @@
    "autoexpand_title": "Auto Expand Snippets",
    "autoexpand": "Auto expand snippets as they are typed",
    "search_and_paste_title": "Search & Paste",
    "focus_search": "Focus search box"
    "focus_search": "Focus search box",
    "custom_shortcuts_disabled": "Unable to get or set custom shortcut, please set it manually.",
    "custom_shortcut": "Custom Shortcut",
    "custom_shortcut_empty": "none",
    "remove_custom_shortcut": "Remove custom shortcut",
    "change_custom_shortcut_desc": "To change the custom shortcut, please use your system's settings application.",
    "add_default_custom_shortcut": "Add default custom shortcut"
  },
  "no_connection": "Could not connect to the snippetpixied daemon.",
  "no_snippets_found": {

M cmd/snippetpixiegui/main.go => cmd/snippetpixiegui/main.go +16 -4
@@ 27,12 27,24 @@ func main() {
		os.Exit(0)
	}

	width := 1000
	height := 800
	minWidth := 600
	minHeight := 400

	if app.SearchAndPasteMode() {
		width = 700
		height = 500
		minWidth = 500
		minHeight = 300
	}

	opts := &options.App{
		Title:            "Snippet Pixie",
		Width:            800,
		Height:           600,
		MinWidth:         600,
		MinHeight:        400,
		Width:            width,
		Height:           height,
		MinWidth:         minWidth,
		MinHeight:        minHeight,
		BackgroundColour: options.NewRGB(46, 52, 64),
		Frameless:        app.SearchAndPasteMode(),
		AssetServer: &assetserver.Options{