tauri/examples/api/dist/assets/vendor.js

10 lines
10 KiB
JavaScript

function w(){}function U(t){return t()}function z(){return Object.create(null)}function K(t){t.forEach(U)}function st(t){return typeof t=="function"}function ot(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function ft(t){return Object.keys(t).length===0}function at(t,...e){if(t==null)return w;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function At(t,e,n){t.$$.on_destroy.push(at(e,n))}function St(t,e){t.appendChild(e)}function ut(t,e,n){t.insertBefore(e,n||null)}function F(t){t.parentNode.removeChild(t)}function jt(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function ct(t){return document.createElement(t)}function G(t){return document.createTextNode(t)}function kt(){return G(" ")}function Pt(){return G("")}function Mt(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function Lt(t){return function(e){return e.preventDefault(),t.call(this,e)}}function Tt(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function Bt(t){return t===""?null:+t}function lt(t){return Array.from(t.childNodes)}function Dt(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Ht(t,e){t.value=e==null?"":e}function Nt(t,e,n,r){t.style.setProperty(e,n,r?"important":"")}function qt(t,e){for(let n=0;n<t.options.length;n+=1){const r=t.options[n];if(r.__value===e){r.selected=!0;return}}}function Ut(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}class zt{constructor(e=null){this.a=e,this.e=this.n=null}m(e,n,r=null){this.e||(this.e=ct(n.nodeName),this.t=n,this.h(e)),this.i(r)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let n=0;n<this.n.length;n+=1)ut(this.t,this.n[n],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(F)}}let E;function C(t){E=t}function J(){if(!E)throw new Error("Function called outside component initialization");return E}function Ft(t){J().$$.on_mount.push(t)}function Gt(t){J().$$.on_destroy.push(t)}const O=[],R=[],A=[],V=[],dt=Promise.resolve();let P=!1;function pt(){P||(P=!0,dt.then(X))}function M(t){A.push(t)}let L=!1;const T=new Set;function X(){if(!L){L=!0;do{for(let t=0;t<O.length;t+=1){const e=O[t];C(e),ht(e.$$)}for(C(null),O.length=0;R.length;)R.pop()();for(let t=0;t<A.length;t+=1){const e=A[t];T.has(e)||(T.add(e),e())}A.length=0}while(O.length);for(;V.length;)V.pop()();P=!1,L=!1,T.clear()}}function ht(t){if(t.fragment!==null){t.update(),K(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(M)}}const S=new Set;let b;function Jt(){b={r:0,c:[],p:b}}function Rt(){b.r||K(b.c),b=b.p}function yt(t,e){t&&t.i&&(S.delete(t),t.i(e))}function Vt(t,e,n,r){if(t&&t.o){if(S.has(t))return;S.add(t),b.c.push(()=>{S.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}}function Xt(t){t&&t.c()}function mt(t,e,n,r){const{fragment:i,on_mount:c,on_destroy:f,after_update:o}=t.$$;i&&i.m(e,n),r||M(()=>{const s=c.map(U).filter(st);f?f.push(...s):K(s),t.$$.on_mount=[]}),o.forEach(M)}function gt(t,e){const n=t.$$;n.fragment!==null&&(K(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function _t(t,e){t.$$.dirty[0]===-1&&(O.push(t),pt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Qt(t,e,n,r,i,c,f=[-1]){const o=E;C(t);const s=t.$$={fragment:null,ctx:null,props:c,update:w,not_equal:i,bound:z(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(o?o.$$.context:[]),callbacks:z(),dirty:f,skip_bound:!1};let l=!1;if(s.ctx=n?n(t,e.props||{},(a,h,...y)=>{const m=y.length?y[0]:h;return s.ctx&&i(s.ctx[a],s.ctx[a]=m)&&(!s.skip_bound&&s.bound[a]&&s.bound[a](m),l&&_t(t,a)),h}):[],s.update(),l=!0,K(s.before_update),s.fragment=r?r(s.ctx):!1,e.target){if(e.hydrate){const a=lt(e.target);s.fragment&&s.fragment.l(a),a.forEach(F)}else s.fragment&&s.fragment.c();e.intro&&yt(t.$$.fragment),mt(t,e.target,e.anchor,e.customElement),X()}C(o)}class Wt{$destroy(){gt(this,1),this.$destroy=w}$on(e,n){const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!ft(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const x=[];function Yt(t,e=w){let n;const r=[];function i(o){if(ot(t,o)&&(t=o,n)){const s=!x.length;for(let l=0;l<r.length;l+=1){const a=r[l];a[1](),x.push(a,t)}if(s){for(let l=0;l<x.length;l+=2)x[l][0](x[l+1]);x.length=0}}}function c(o){i(o(t))}function f(o,s=w){const l=[o,s];return r.push(l),r.length===1&&(n=e(i)||w),o(t),()=>{const a=r.indexOf(l);a!==-1&&r.splice(a,1),r.length===0&&(n(),n=null)}}return{set:i,update:c,subscribe:f}}/*!
* hotkeys-js v3.8.5
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
*
* Copyright (c) 2021 kenny wong <wowohoo@qq.com>
* http://jaywcjlove.github.io/hotkeys
*
* Licensed under the MIT license.
*/var B=typeof navigator!="undefined"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function D(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on".concat(e),function(){n(window.event)})}function Q(t,e){for(var n=e.slice(0,e.length-1),r=0;r<n.length;r++)n[r]=t[n[r].toLowerCase()];return n}function W(t){typeof t!="string"&&(t=""),t=t.replace(/\s/g,"");for(var e=t.split(","),n=e.lastIndexOf("");n>=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function bt(t,e){for(var n=t.length>=e.length?t:e,r=t.length>=e.length?e:t,i=!0,c=0;c<n.length;c++)r.indexOf(n[c])===-1&&(i=!1);return i}var Y={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":B?173:189,"=":B?61:187,";":B?59:186,"'":222,"[":219,"]":221,"\\":220},v={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},Z={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},p={16:!1,18:!1,17:!1,91:!1},d={};for(var j=1;j<20;j++)Y["f".concat(j)]=111+j;var u=[],I="all",tt=[],k=function(e){return Y[e.toLowerCase()]||v[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function et(t){I=t||"all"}function $(){return I||"all"}function vt(){return u.slice(0)}function wt(t){var e=t.target||t.srcElement,n=e.tagName,r=!0;return(e.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!e.readOnly)&&(r=!1),r}function xt(t){return typeof t=="string"&&(t=k(t)),u.indexOf(t)!==-1}function Kt(t,e){var n,r;t||(t=$());for(var i in d)if(Object.prototype.hasOwnProperty.call(d,i))for(n=d[i],r=0;r<n.length;)n[r].scope===t?n.splice(r,1):r++;$()===t&&et(e||"all")}function Ot(t){var e=t.keyCode||t.which||t.charCode,n=u.indexOf(e);if(n>=0&&u.splice(n,1),t.key&&t.key.toLowerCase()==="meta"&&u.splice(0,u.length),(e===93||e===224)&&(e=91),e in p){p[e]=!1;for(var r in v)v[r]===e&&(_[r]=!1)}}function $t(t){if(!t)Object.keys(d).forEach(function(f){return delete d[f]});else if(Array.isArray(t))t.forEach(function(f){f.key&&H(f)});else if(typeof t=="object")t.key&&H(t);else if(typeof t=="string"){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=n[0],c=n[1];typeof i=="function"&&(c=i,i=""),H({key:t,scope:i,method:c,splitKey:"+"})}}var H=function(e){var n=e.key,r=e.scope,i=e.method,c=e.splitKey,f=c===void 0?"+":c,o=W(n);o.forEach(function(s){var l=s.split(f),a=l.length,h=l[a-1],y=h==="*"?"*":k(h);if(!!d[y]){r||(r=$());var m=a>1?Q(v,l):[];d[y]=d[y].map(function(g){var it=i?g.method===i:!0;return it&&g.scope===r&&bt(g.mods,m)?{}:g})}})};function nt(t,e,n){var r;if(e.scope===n||e.scope==="all"){r=e.mods.length>0;for(var i in p)Object.prototype.hasOwnProperty.call(p,i)&&(!p[i]&&e.mods.indexOf(+i)>-1||p[i]&&e.mods.indexOf(+i)===-1)&&(r=!1);(e.mods.length===0&&!p[16]&&!p[18]&&!p[17]&&!p[91]||r||e.shortcut==="*")&&e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function rt(t){var e=d["*"],n=t.keyCode||t.which||t.charCode;if(!!_.filter.call(this,t)){if((n===93||n===224)&&(n=91),u.indexOf(n)===-1&&n!==229&&u.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(m){var g=Z[m];t[m]&&u.indexOf(g)===-1?u.push(g):!t[m]&&u.indexOf(g)>-1?u.splice(u.indexOf(g),1):m==="metaKey"&&t[m]&&u.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(u=u.slice(u.indexOf(g))))}),n in p){p[n]=!0;for(var r in v)v[r]===n&&(_[r]=!0);if(!e)return}for(var i in p)Object.prototype.hasOwnProperty.call(p,i)&&(p[i]=t[Z[i]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(u.indexOf(17)===-1&&u.push(17),u.indexOf(18)===-1&&u.push(18),p[17]=!0,p[18]=!0);var c=$();if(e)for(var f=0;f<e.length;f++)e[f].scope===c&&(t.type==="keydown"&&e[f].keydown||t.type==="keyup"&&e[f].keyup)&&nt(t,e[f],c);if(n in d){for(var o=0;o<d[n].length;o++)if((t.type==="keydown"&&d[n][o].keydown||t.type==="keyup"&&d[n][o].keyup)&&d[n][o].key){for(var s=d[n][o],l=s.splitKey,a=s.key.split(l),h=[],y=0;y<a.length;y++)h.push(k(a[y]));h.sort().join("")===u.sort().join("")&&nt(t,s,c)}}}}function Et(t){return tt.indexOf(t)>-1}function _(t,e,n){u=[];var r=W(t),i=[],c="all",f=document,o=0,s=!1,l=!0,a="+";for(n===void 0&&typeof e=="function"&&(n=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(c=e.scope),e.element&&(f=e.element),e.keyup&&(s=e.keyup),e.keydown!==void 0&&(l=e.keydown),typeof e.splitKey=="string"&&(a=e.splitKey)),typeof e=="string"&&(c=e);o<r.length;o++)t=r[o].split(a),i=[],t.length>1&&(i=Q(v,t)),t=t[t.length-1],t=t==="*"?"*":k(t),t in d||(d[t]=[]),d[t].push({keyup:s,keydown:l,scope:c,mods:i,shortcut:r[o],method:n,key:r[o],splitKey:a});typeof f!="undefined"&&!Et(f)&&window&&(tt.push(f),D(f,"keydown",function(h){rt(h)}),D(window,"focus",function(){u=[]}),D(f,"keyup",function(h){rt(h),Ot(h)}))}var N={setScope:et,getScope:$,deleteScope:Kt,getPressedKeyCodes:vt,isPressed:xt,filter:wt,unbind:$t};for(var q in N)Object.prototype.hasOwnProperty.call(N,q)&&(_[q]=N[q]);if(typeof window!="undefined"){var Ct=window.hotkeys;_.noConflict=function(t){return t&&window.hotkeys===_&&(window.hotkeys=Ct),_},window.hotkeys=_}export{Pt as A,Xt as B,mt as C,Vt as D,Rt as E,yt as F,gt as G,Jt as H,_ as I,zt as J,Wt as S,kt as a,Tt as b,ut as c,St as d,ct as e,Dt as f,F as g,Gt as h,Qt as i,Ht as j,jt as k,Mt as l,R as m,w as n,Ft as o,Lt as p,M as q,K as r,ot as s,G as t,Nt as u,qt as v,Ut as w,Bt as x,At as y,Yt as z};