import{aH as oi,aI as ai,aJ as ui,as as si,ak as ci,F as li}from"./index-UPLxqIys.js";const vi=oi("draft",{state:()=>({refreshList:0,setDraft:{}})});var Fn={exports:{}},fi=Fn.exports,vr;function hi(){return vr||(vr=1,function(wr,pi){(function(Nn,C){wr.exports=C()})(fi,function(){var Nn=function(e,n){return(Nn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])})(e,n)},C=function(){return(C=Object.assign||function(e){for(var n,t=1,r=arguments.length;t"u"||$.Promise||($.Promise=Promise);var De=Object.getPrototypeOf,_r={}.hasOwnProperty;function J(e,n){return _r.call(e,n)}function Te(e,n){typeof n=="function"&&(n=n(De(e))),(typeof Reflect>"u"?z:Reflect.ownKeys)(n).forEach(function(t){fe(e,t,n[t])})}var jt=Object.defineProperty;function fe(e,n,t,r){jt(e,n,Z(t&&J(t,"get")&&typeof t.get=="function"?{get:t.get,set:t.set,configurable:!0}:{value:t,configurable:!0,writable:!0},r))}function qe(e){return{from:function(n){return e.prototype=Object.create(n.prototype),fe(e.prototype,"constructor",e),{extend:Te.bind(null,e.prototype)}}}}var xr=Object.getOwnPropertyDescriptor,kr=[].slice;function cn(e,n,t){return kr.call(e,n,t)}function At(e,n){return n(e)}function We(e){if(!e)throw new Error("Assertion Failed")}function Ct(e){$.setImmediate?setImmediate(e):setTimeout(e,0)}function ue(e,n){if(typeof n=="string"&&J(e,n))return e[n];if(!n)return e;if(typeof n!="string"){for(var t=[],r=0,i=n.length;r"u"?[]:function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,De(e),e];var n=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[n,De(n),e]}(),Ge=xe[0],re=xe[1],xe=xe[2],re=re&&re.then,ke=Ge&&Ge.constructor,Yn=!!xe,Xe=function(e,n){He.push([e,n]),hn&&(queueMicrotask(Ir),hn=!1)},$n=!0,hn=!0,Oe=[],dn=[],Qn=$e,he={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:F,pgp:!1,env:{},finalize:F},j=he,He=[],Pe=0,pn=[];function E(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var n=this._PSD=j;if(typeof e!="function"){if(e!==Qe)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Xn(this,this._value))}this._state=null,this._value=null,++n.ref,function t(r,i){try{i(function(o){if(r._state===null){if(o===r)throw new TypeError("A promise cannot be resolved with itself.");var a=r._lib&&Fe();o&&typeof o.then=="function"?t(r,function(u,c){o instanceof E?o._then(u,c):o.then(u,c)}):(r._state=!0,r._value=o,Nt(r)),a&&Me()}},Xn.bind(null,r))}catch(o){Xn(r,o)}}(this,e)}var Gn={get:function(){var e=j,n=gn;function t(r,i){var o=this,a=!e.global&&(e!==j||n!==gn),u=a&&!pe(),c=new E(function(f,p){Hn(o,new Mt(Ut(r,e,a,u),Ut(i,e,a,u),f,p,e))});return this._consoleTask&&(c._consoleTask=this._consoleTask),c}return t.prototype=Qe,t},set:function(e){fe(this,"then",e&&e.prototype===Qe?Gn:{get:function(){return e},set:Gn.set})}};function Mt(e,n,t,r,i){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof n=="function"?n:null,this.resolve=t,this.reject=r,this.psd=i}function Xn(e,n){var t,r;dn.push(n),e._state===null&&(t=e._lib&&Fe(),n=Qn(n),e._state=!1,e._value=n,r=e,Oe.some(function(i){return i._value===r._value})||Oe.push(r),Nt(e),t&&Me())}function Nt(e){var n=e._listeners;e._listeners=[];for(var t=0,r=n.length;t.",Vt="String expected.",Le=[],wn="__dbnames",et="readonly",nt="readwrite";function Se(e,n){return e?n?function(){return e.apply(this,arguments)&&n.apply(this,arguments)}:e:n}var zt={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function _n(e){return typeof e!="string"||/\./.test(e)?function(n){return n}:function(n){return n[e]===void 0&&e in n&&delete(n=be(n))[e],n}}function Wt(){throw A.Type()}function B(e,n){try{var t=Yt(e),r=Yt(n);if(t!==r)return t==="Array"?1:r==="Array"?-1:t==="binary"?1:r==="binary"?-1:t==="string"?1:r==="string"?-1:t==="Date"?1:r!=="Date"?NaN:-1;switch(t){case"number":case"Date":case"string":return nb+w&&m(b+p)})})}var g=Ue(t)&&t.limit===1/0&&(typeof e!="function"||e===it)&&{index:t.index,range:t.range};return m(0).then(function(){if(0=v})).length!==0?(p.forEach(function(m){y.push(function(){var g=h,b=m._cfg.dbschema;jn(s,g,d),jn(s,b,d),h=s._dbSchema=b;var w=lt(g,b);w.add.forEach(function(K){ft(d,K[0],K[1].primKey,K[1].indexes)}),w.change.forEach(function(K){if(K.recreate)throw new A.Upgrade("Not yet support for changing primary key");var O=d.objectStore(K.name);K.add.forEach(function(S){return En(O,S)}),K.change.forEach(function(S){O.deleteIndex(S.name),En(O,S)}),K.del.forEach(function(S){return O.deleteIndex(S)})});var _=m._cfg.contentUpgrade;if(_&&m._cfg.version>v){Pn(s,d),l._memoizedTables={};var P=Dt(b);w.del.forEach(function(K){P[K]=g[K]}),ct(s,[s.Transaction.prototype]),Kn(s,[s.Transaction.prototype],z(P),P),l.schema=P;var x,k=Vn(_);return k&&Ne(),w=E.follow(function(){var K;(x=_(l))&&k&&(K=pe.bind(null,null),x.then(K,K))}),x&&typeof x.then=="function"?E.resolve(x):w.then(function(){return x})}}),y.push(function(g){var b,w,_=m._cfg.dbschema;b=_,w=g,[].slice.call(w.db.objectStoreNames).forEach(function(P){return b[P]==null&&w.db.deleteObjectStore(P)}),ct(s,[s.Transaction.prototype]),Kn(s,[s.Transaction.prototype],s._storeNames,s._dbSchema),l.schema=s._dbSchema}),y.push(function(g){s.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(s.idbdb.version/10)===m._cfg.version?(s.idbdb.deleteObjectStore("$meta"),delete s._dbSchema.$meta,s._storeNames=s._storeNames.filter(function(b){return b!=="$meta"})):g.objectStore("$meta").put(m._cfg.version,"version"))})}),function m(){return y.length?E.resolve(y.shift()(l.idbtrans)).then(m):E.resolve()}().then(function(){tr(h,d)})):E.resolve();var s,v,l,d,y,h}).catch(a)):(z(i).forEach(function(p){ft(t,p,i[p].primKey,i[p].indexes)}),Pn(e,t),void E.follow(function(){return e.on.populate.fire(o)}).catch(a));var c,f})}function Qr(e,n){tr(e._dbSchema,n),n.db.version%10!=0||n.objectStoreNames.contains("$meta")||n.db.createObjectStore("$meta").add(Math.ceil(n.db.version/10-1),"version");var t=Sn(0,e.idbdb,n);jn(e,e._dbSchema,n);for(var r=0,i=lt(t,e._dbSchema).change;rMath.pow(2,62)?0:h.oldVersion,s=h<1,e.idbdb=y.result,o&&Qr(e,p),$r(e,h/10,p,l))},l),y.onsuccess=N(function(){p=null;var h,m,g,b,w,_=e.idbdb=y.result,P=cn(_.objectStoreNames);if(0"u"?E.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(v){function l(){return indexedDB.databases().finally(v)}c=setInterval(l,100),l()}).finally(function(){return clearInterval(c)}):Promise.resolve()).then(u)]).then(function(){return a(),n.onReadyBeingFired=[],E.resolve(pt(function(){return e.on.ready.fire(e.vip)})).then(function v(){if(0n.limit?v.length=n.limit:e.length===n.limit&&v.length=m.limit&&(!m.values||_.req.values)&&ni(_.req.query.range,m.query.range)}),!1,g,b];case"count":return w=b.find(function(_){return dr(_.req.query.range,m.query.range)}),[w,!!w,g,b]}}(n,t,"query",o),p=f[0],s=f[1],v=f[2],l=f[3];return p&&s?p.obsSet=o.obsSet:(s=r.query(o).then(function(d){var y=d.result;if(p&&(p.res=y),a){for(var h=0,m=y.length;hgr.user.email,()=>br());export{Et as d,vi as u};