expo-sqlite 58.0.16 → 58.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/sqlite/NativeDatabaseBinding.kt +1 -0
- package/android/src/main/java/expo/modules/sqlite/NativeStatement.kt +9 -1
- package/dev-plugin-dist/+not-found.html +2 -2
- package/dev-plugin-dist/_expo/static/js/web/{__common-a91396a33c562b43d2b77a6ffc575fb7.js → __common-bb2542041f1b094a8c75f25287f1eab8.js} +49 -49
- package/dev-plugin-dist/_expo/static/js/web/{_layout-acb144d1f99a64d1785af7527d659b2a.js → _layout-87e9b74b8486b174fe5b606bf7605e65.js} +24 -24
- package/dev-plugin-dist/_expo/static/js/web/{entry-e3975197f566bcbd43c64e4d22104a7f.js → entry-cb0627e9624da3ffdb031f02342db7b2.js} +772 -772
- package/dev-plugin-dist/_expo/static/js/web/{index-aa7dfdd0fcc30054b3c079a77a18453e.js → index-a0d288042349b07e39078522c3543c6d.js} +1740 -1740
- package/dev-plugin-dist/_expo/static/js/web/{worker-7964ea010c5e0bbcae7a3c69aa585a51.js → worker-3dada1e55f01b3914c71823471616780.js} +17 -17
- package/dev-plugin-dist/_sitemap.html +2 -2
- package/dev-plugin-dist/index.html +2 -2
- package/ios/NativeStatement.swift +6 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/{58.0.16/expo.modules.sqlite-58.0.16-sources.jar → 58.0.17/expo.modules.sqlite-58.0.17-sources.jar} +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17-sources.jar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17-sources.jar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17-sources.jar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17-sources.jar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17.aar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17.aar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17.aar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17.aar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/{58.0.16/expo.modules.sqlite-58.0.16.module → 58.0.17/expo.modules.sqlite-58.0.17.module} +22 -22
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/{58.0.16/expo.modules.sqlite-58.0.16.pom → 58.0.17/expo.modules.sqlite-58.0.17.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.17/expo.modules.sqlite-58.0.17.pom.sha512 +1 -0
- package/package.json +2 -2
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16-sources.jar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16-sources.jar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16-sources.jar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16-sources.jar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.aar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.aar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.aar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.aar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.pom.sha512 +0 -1
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useDevToolsConnection=u,e.DevToolsConnectionProvider=function(n){const o=(0,t.c)(3),{children:s}=n,c=u();let f;o[0]!==s||o[1]!==c?(f=(0,l.jsx)(h.Provider,{value:c,children:s}),o[0]=s,o[1]=c,o[2]=f):f=o[2];return f},e.useDevToolsConnectionContext=function(){const t=(0,o.use)(h);if(!t)throw new Error('useDevToolsConnectionContext must be used within DevToolsConnectionProvider');return t};var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=r(d[3]),c=r(d[4]),l=r(d[5]);const h=(0,o.createContext)(null);function u(){const l=(0,t.c)(25);let h;l[0]===Symbol.for("react.memo_cache_sentinel")?(h={websocketBinaryType:"arraybuffer"},l[0]=h):h=l[0];const u=(0,n.useDevToolsPluginClient)(s.DEVTOOLS_PLUGIN_NAME,h);let f;l[1]!==u?(f=new c.DevToolsRequestHelper(u),l[1]=u,l[2]=f):f=l[2];const w=f;let y,b,p;l[3]!==w?(y=()=>()=>{w.dispose()},b=[w],l[3]=w,l[4]=y,l[5]=b):(y=l[4],b=l[5]),(0,o.useEffect)(y,b),l[6]!==w?(p=async()=>{const t=await w.sendMessageAsync("listDatabases");if(!(t instanceof Uint8Array)){if("error"===t.method)throw new Error(t.error);if("listDatabases"===t.method)return t.databases}throw new Error("Unexpected response method")},l[6]=w,l[7]=p):p=l[7];const T=p;let E;l[8]!==w?(E=async t=>{const n=await w.sendMessageAsync("getDatabase",{database:t});if(n instanceof Uint8Array)return n;if("error"===n.method)throw new Error(n.error);throw new Error("Unexpected response method")},l[8]=w,l[9]=E):E=l[9];const v=E;let D;l[10]!==w?(D=async(t,n,o)=>{const s=await w.sendMessageAsync("executeQuery",{databasePath:t,query:n,params:o});if(!(s instanceof Uint8Array)){if("error"===s.method)throw new Error(s.error);if("executeQuery"===s.method)return s.result}throw new Error("Unexpected response method")},l[10]=w,l[11]=D):D=l[11];const x=D;let A;l[12]!==w?(A=async t=>{const n=await w.sendMessageAsync("listTables",{databasePath:t});if(!(n instanceof Uint8Array)){if("error"===n.method)throw new Error(n.error);if("listTables"===n.method)return n.tables}throw new Error("Unexpected response method")},l[12]=w,l[13]=A):A=l[13];const C=A;let U;l[14]!==w?(U=async(t,n)=>{const o=await w.sendMessageAsync("getTableSchema",{databasePath:t,tableName:n});if(!(o instanceof Uint8Array)){if("error"===o.method)throw new Error(o.error);if("getTableSchema"===o.method)return o.schema}throw new Error("Unexpected response method")},l[14]=w,l[15]=U):U=l[15];const P=U;let _,M;return l[16]!==u?(_=u?.isConnected()??!1,l[16]=u,l[17]=_):_=l[17],l[18]!==x||l[19]!==v||l[20]!==P||l[21]!==T||l[22]!==C||l[23]!==_?(M={isConnected:_,listDatabases:T,getDatabase:v,executeQuery:x,listTables:C,getTableSchema:P},l[18]=x,l[19]=v,l[20]=P,l[21]=T,l[22]=C,l[23]=_,l[24]=M):M=l[24],M}},
|
|
2
|
-
__d(function(g,r,i,a,m,e,d){
|
|
3
|
-
__d(function(g,r,
|
|
4
|
-
__d(function(g,r,
|
|
5
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e
|
|
6
|
-
__d(function(g,r,i,a,m,
|
|
7
|
-
__d(function(g,r,i,a,m,
|
|
8
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
9
|
-
__d(function(g,r,i,a,m,
|
|
10
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
11
|
-
__d(function(g,r,i,a,m,
|
|
12
|
-
__d(function(g,r,i,a,m,
|
|
13
|
-
__d(function(g,r,i,a,m,
|
|
14
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
15
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
16
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
17
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
18
|
-
__d(function(g,r,i,a,m,
|
|
19
|
-
__d(function(g,r,i,a,m,
|
|
20
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
21
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
22
|
-
__d(function(g,r,i,a,m,
|
|
23
|
-
__d(function(g,r,i,a,m,
|
|
24
|
-
__d(function(g,r,i,a,m,
|
|
25
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
26
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
27
|
-
__d(function(g,r,
|
|
28
|
-
__d(function(g,r,i,a,m,e,d){"use strict";
|
|
29
|
-
__d(function(g,r,i,a,m,
|
|
30
|
-
__d(function(g,r,i,
|
|
31
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
32
|
-
__d(function(g,r,
|
|
33
|
-
__d(function(g,r,i,a,m,
|
|
34
|
-
__d(function(g,r,i,a,m,
|
|
35
|
-
__d(function(g,r,i,
|
|
36
|
-
__d(function(g,r,i,a,m,
|
|
37
|
-
__d(function(g,r,i,a,m,
|
|
38
|
-
__d(function(g,r,i,a,m,
|
|
39
|
-
__d(function(g,r,i,a,m,
|
|
40
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e
|
|
41
|
-
__d(function(g,r,i,a,m,
|
|
42
|
-
__d(function(g,r,i,a,m,
|
|
43
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
44
|
-
__d(function(g,r,i,a,m,
|
|
45
|
-
__d(function(g,r,
|
|
46
|
-
__d(function(g,r,
|
|
47
|
-
__d(function(g,r,i,a,m,
|
|
48
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
49
|
-
__d(function(g,r,i,a,m,
|
|
1
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useDevToolsConnection=u,e.DevToolsConnectionProvider=function(n){const o=(0,t.c)(3),{children:s}=n,c=u();let f;o[0]!==s||o[1]!==c?(f=(0,l.jsx)(h.Provider,{value:c,children:s}),o[0]=s,o[1]=c,o[2]=f):f=o[2];return f},e.useDevToolsConnectionContext=function(){const t=(0,o.use)(h);if(!t)throw new Error('useDevToolsConnectionContext must be used within DevToolsConnectionProvider');return t};var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=r(d[3]),c=r(d[4]),l=r(d[5]);const h=(0,o.createContext)(null);function u(){const l=(0,t.c)(25);let h;l[0]===Symbol.for("react.memo_cache_sentinel")?(h={websocketBinaryType:"arraybuffer"},l[0]=h):h=l[0];const u=(0,n.useDevToolsPluginClient)(s.DEVTOOLS_PLUGIN_NAME,h);let f;l[1]!==u?(f=new c.DevToolsRequestHelper(u),l[1]=u,l[2]=f):f=l[2];const w=f;let y,b,p;l[3]!==w?(y=()=>()=>{w.dispose()},b=[w],l[3]=w,l[4]=y,l[5]=b):(y=l[4],b=l[5]),(0,o.useEffect)(y,b),l[6]!==w?(p=async()=>{const t=await w.sendMessageAsync("listDatabases");if(!(t instanceof Uint8Array)){if("error"===t.method)throw new Error(t.error);if("listDatabases"===t.method)return t.databases}throw new Error("Unexpected response method")},l[6]=w,l[7]=p):p=l[7];const T=p;let E;l[8]!==w?(E=async t=>{const n=await w.sendMessageAsync("getDatabase",{database:t});if(n instanceof Uint8Array)return n;if("error"===n.method)throw new Error(n.error);throw new Error("Unexpected response method")},l[8]=w,l[9]=E):E=l[9];const v=E;let D;l[10]!==w?(D=async(t,n,o)=>{const s=await w.sendMessageAsync("executeQuery",{databasePath:t,query:n,params:o});if(!(s instanceof Uint8Array)){if("error"===s.method)throw new Error(s.error);if("executeQuery"===s.method)return s.result}throw new Error("Unexpected response method")},l[10]=w,l[11]=D):D=l[11];const x=D;let A;l[12]!==w?(A=async t=>{const n=await w.sendMessageAsync("listTables",{databasePath:t});if(!(n instanceof Uint8Array)){if("error"===n.method)throw new Error(n.error);if("listTables"===n.method)return n.tables}throw new Error("Unexpected response method")},l[12]=w,l[13]=A):A=l[13];const C=A;let U;l[14]!==w?(U=async(t,n)=>{const o=await w.sendMessageAsync("getTableSchema",{databasePath:t,tableName:n});if(!(o instanceof Uint8Array)){if("error"===o.method)throw new Error(o.error);if("getTableSchema"===o.method)return o.schema}throw new Error("Unexpected response method")},l[14]=w,l[15]=U):U=l[15];const P=U;let _,M;return l[16]!==u?(_=u?.isConnected()??!1,l[16]=u,l[17]=_):_=l[17],l[18]!==x||l[19]!==v||l[20]!==P||l[21]!==T||l[22]!==C||l[23]!==_?(M={isConnected:_,listDatabases:T,getDatabase:v,executeQuery:x,listTables:C,getTableSchema:P},l[18]=x,l[19]=v,l[20]=P,l[21]=T,l[22]=C,l[23]=_,l[24]=M):M=l[24],M}},788,[283,2539,12,2553,2554,6]);
|
|
2
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"configureWeb",{enumerable:!0,get:function(){return f.configureWeb}});var t=r(d[0]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=r(d[1]);Object.keys(n).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})});var c=r(d[2]);Object.keys(c).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}})});var o=r(d[3]);Object.keys(o).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})});var u=r(d[4]);Object.keys(u).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return u[t]}})});var f=r(d[5])},2521,[2555,2562,2563,2565,2567,2581]);
|
|
3
|
+
__d(function(g,r,_i,a,m,e,d){"use strict";function t(t){if(!t)return'"';if(!/^[a-zA-Z_]/.test(t[0]))return'"';if(!/^[a-zA-Z0-9_]+$/.test(t))return'"';return new Set(['abort','action','add','after','all','alter','analyze','and','as','asc','attach','autoincrement','before','begin','between','by','cascade','case','cast','check','collate','column','commit','conflict','constraint','create','cross','current_date','current_time','current_timestamp','database','default','deferrable','deferred','delete','desc','detach','distinct','drop','each','else','end','escape','except','exclusive','exists','explain','fail','for','foreign','from','full','glob','group','having','if','ignore','immediate','in','index','indexed','initially','inner','insert','instead','intersect','into','is','isnull','join','key','left','like','limit','match','natural','no','not','notnull','null','of','offset','on','or','order','outer','plan','pragma','primary','query','raise','recursive','references','regexp','reindex','release','rename','replace','restrict','right','rollback','row','savepoint','select','set','table','temp','temporary','then','to','transaction','trigger','union','unique','update','using','vacuum','values','view','virtual','when','where','with','without']).has(t.toLowerCase())?'"':null}function n(n){return t(n)?`"${n.replace(/"/g,'""')}"`:n}function s(t,n,s){if(!t.includes(n))return n;if(!t.includes(s))return s;let i,c=0;do{i=`(${n}${c++})`}while(t.includes(i));return i}function i(t){if(!/['\\n\\r]/.test(t))return`'${t}'`;const n=t.includes('\n'),i=t.includes('\r');let c='',l='',o='';n&&(l=s(t,'\\n','\\012'),c='replace('),i&&(o=s(t,'\\r','\\015'),c+='replace('),c+="'";for(let n=0;n<t.length;n++){const s=t[n];c+="'"===s?"''":'\n'===s?l:'\r'===s?o:s}return c+="'",i&&(c+=`,'${o}',char(13))`),n&&(c+=`,'${l}',char(10))`),c}async function c(t,s){const c=await t.getAllAsync(`PRAGMA table_info(${n(s)})`);let l=null,o=0,u=!1;for(const t of c)t.pk&&(o++,u=1===o&&'INTEGER'===t.type.toUpperCase());let f=!0;if(o>1)f=!1;else if(u){f=(await t.getAllAsync(`SELECT origin FROM pragma_index_list(${i(s)}) WHERE origin='pk'`)).length>0}if(f){const i=['rowid','_rowid_','oid'],o=new Set(c.map(t=>t.name.toLowerCase()));for(const c of i)if(!o.has(c))try{await t.getAllAsync(`SELECT ${c} FROM ${n(s)} LIMIT 0`),l=c;break}catch{}}const E=[];return l&&E.push(l),E.push(...c.map(t=>t.name)),E}function l(t,n){switch(n){case 1:return String(t);case 2:{const n=t;return n===1/0?'1e999':n===-1/0?'-1e999':Number.isNaN(n)?'0':n.toExponential(20).replace(/e\+?/,'e+')}case 5:default:return'NULL';case 3:return i(String(t));case 4:{const n=new Uint8Array(t);return`x'${Array.from(n).map(t=>t.toString(16).padStart(2,'0')).join('')}'`}}}async function o(t,s,i){const o=await c(t,s);if(0===o.length)return;const u=o.length>0&&['rowid','_rowid_','oid'].includes(o[0]);let f=`INSERT INTO ${n(s)}`;if(u){f+=`(${o.map(n).join(',')})`}f+=' VALUES(';const E=`SELECT ${o.map(n).join(',')} FROM ${n(s)}`,h=await t.getAllAsync(E);for(const t of h){const n=t,s=[];for(let t=0;t<o.length;t++){const i=n[o[t]];let c;c=null==i?5:'number'==typeof i?Number.isInteger(i)?1:2:'string'==typeof i?3:i instanceof Uint8Array||i instanceof ArrayBuffer?4:5,s.push(l(i,c))}i(`${f}${s.join(',')});\n`)}}Object.defineProperty(e,'__esModule',{value:!0}),e.importDatabase=async function(t,n){const s=n.split('\n');let i='';const c=[];for(const t of s){const n=t.trim();n.startsWith('--')||0===n.length||(i+=t+'\n',n.endsWith(';')&&(c.push(i.trim()),i=''))}i.trim().length>0&&c.push(i.trim());for(const n of c)if(n.length>0)try{await t.execAsync(n)}catch(t){console.warn('Failed to execute statement:',n.substring(0,100),t.message)}},e.dumpDatabase=async function(t,n={}){const{schema:s="main",table:c=null}=n,l=[],u=t=>l.push(t);u('PRAGMA foreign_keys=OFF;\n'),u('BEGIN TRANSACTION;\n');try{const n=c?`SELECT name, type, sql FROM "${s}".sqlite_schema\n WHERE tbl_name=${i(c)} COLLATE nocase\n AND type='table' AND sql NOT NULL`:`SELECT name, type, sql FROM "${s}".sqlite_schema\n WHERE sql NOT NULL AND type='table' AND name!='sqlite_sequence'`,l=await t.getAllAsync(n);for(const t of l)t.name.startsWith('sqlite_')||(t.sql.startsWith('CREATE VIRTUAL TABLE')?(u('PRAGMA writable_schema=ON;\n'),u(`INSERT INTO sqlite_schema(type,name,tbl_name,rootpage,sql)VALUES('table',${i(t.name)},${i(t.name)},0,${i(t.sql)});\n`),u('PRAGMA writable_schema=OFF;\n')):(t.sql.match(/^CREATE TABLE /i)?(u('CREATE TABLE IF NOT EXISTS '),u(t.sql.substring(13))):u(t.sql),u(';\n')));if(!c){(await t.getAllAsync(`SELECT name FROM "${s}".sqlite_schema WHERE name='sqlite_sequence'`)).length>0&&u('DELETE FROM sqlite_sequence;\n')}for(const n of l)n.name.startsWith('sqlite_')||await o(t,n.name,u);if(!c){const n=await t.getAllAsync("SELECT name, seq FROM sqlite_sequence").catch(()=>[]);for(const t of n)u(`INSERT INTO sqlite_sequence VALUES(${i(t.name)},${t.seq});\n`)}const f=c?`SELECT sql FROM "${s}".sqlite_schema\n WHERE sql NOT NULL AND type IN ('index','trigger','view')\n AND tbl_name=${i(c)} COLLATE nocase`:`SELECT sql FROM "${s}".sqlite_schema\n WHERE sql NOT NULL AND type IN ('index','trigger','view')`,E=await t.getAllAsync(f);for(const t of E)u(t.sql),u(';\n');u('COMMIT;\n')}catch(t){throw u('ROLLBACK; -- due to errors\n'),t}return l.join('')}},2522,[]);
|
|
4
|
+
__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.sendWorkerResult=function({id:t,result:s,error:o,syncTrait:i}){const l=null!=o?o.message||String(o):null;if(i){const{lockBuffer:t,resultBuffer:o}=i,u=new Int32Array(t);let f=(new TextEncoder).encode(null!=l?(0,n.serialize)({error:l}):(0,n.serialize)({result:s}));f.length+4>o.byteLength&&(f=(new TextEncoder).encode((0,n.serialize)({error:`The synchronous result is ${f.length} bytes, which is more than the ${o.byteLength-4} bytes that synchronous calls can return on web. Use the async API for large results.`}))),new Uint32Array(o,0,1)[0]=f.length,new Uint8Array(o).set(f,4),Atomics.store(u,0,c)}else null!=o?self.postMessage({id:t,error:l}):self.postMessage({id:t,result:s})},e.workerMessageHandler=function(t){const{id:n,result:s,error:i,isSync:c}=t.data;if(!c){const t=o.get(n);t&&(i?t.reject(new Error(i)):t.resolve(s),o.delete(n))}},e.invokeWorkerAsync=async function(n,i,c){const l=s++,u=new t.Deferred;return o.set(l,u),n.postMessage({type:i,id:l,data:c,isSync:!1}),u.getPromise()},e.invokeWorkerSync=function(t,o,c){const l=s++,u=new SharedArrayBuffer(4),f=new Int32Array(u),y=new SharedArrayBuffer(1048576),w=new Uint8Array(y);Atomics.store(f,0,i),t.postMessage({type:o,id:l,data:c,isSync:!0,lockBuffer:u,resultBuffer:y});let h=0;const A='function'==typeof Atomics.pause;for(;Atomics.load(f,0)===i;)if(++h,A){if(h>1e6)throw new Error('Sync operation timeout');Atomics.pause()}else if(h>1e9)throw new Error('Sync operation timeout');const p=new Uint32Array(w.buffer,0,1)[0],S=new Uint8Array(p);S.set(new Uint8Array(w.buffer,4,p));const b=(new TextDecoder).decode(S),{result:k,error:M}=(0,n.deserialize)(b);if(M)throw new Error(M);return k};var t=r(d[0]),n=r(d[1]);let s=0;const o=new Map,i=1,c=2},2526,[2527,2528]);
|
|
5
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"Deferred",{enumerable:!0,get:function(){return t}});class t{constructor(){this.promise=new Promise((t,s)=>{this.resolveCallback=t,this.rejectCallback=s})}resolve(t){this.resolveCallback(t)}reject(t){this.rejectCallback(t)}getPromise(){return this.promise}}},2527,[]);
|
|
6
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.serialize=function(t){return JSON.stringify(t,(t,u)=>u instanceof Uint8Array?{[n]:!0,data:Array.from(u)}:u)},e.deserialize=function(n){return JSON.parse(n,(n,u)=>t(u)?new Uint8Array(u.data):u)};const n='__uint8array__';function t(t){return null!==t&&'object'==typeof t&&n in t&&Array.isArray(t.data)}},2528,[]);
|
|
7
|
+
__d(function(g,r,i,a,m,e,d){m.exports=r(d[0])},2539,[2540]);
|
|
8
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"setEnableLogging",{enumerable:!0,get:function(){return t.setEnableLogging}}),Object.defineProperty(e,"getDevToolsPluginClientAsync",{enumerable:!0,get:function(){return o.getDevToolsPluginClientAsync}}),Object.defineProperty(e,"DevToolsPluginClient",{enumerable:!0,get:function(){return u.DevToolsPluginClient}}),Object.defineProperty(e,"unstable_createDevToolsPluginClient",{enumerable:!0,get:function(){return o.createDevToolsPluginClient}}),Object.defineProperty(e,"unstable_WebSocketBackingStore",{enumerable:!0,get:function(){return l.WebSocketBackingStore}}),Object.defineProperty(e,"unstable_getConnectionInfo",{enumerable:!0,get:function(){return c.getConnectionInfo}});var n=r(d[0]);Object.keys(n).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})});var t=r(d[1]),o=r(d[2]),u=r(d[3]),l=r(d[4]),c=r(d[5])},2540,[2541,2549,2542,2544,2547,2551]);
|
|
9
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useDevToolsPluginClient=function(n,o){const[l,u]=(0,t.useState)(null),[s,c]=(0,t.useState)(null);if((0,t.useEffect)(()=>{async function t(){try{await(l?.closeAsync())}catch(t){c(new Error('Failed to teardown client from useDevToolsPluginClient: '+t.toString()))}}return(async function(){try{const t=await(0,e.getDevToolsPluginClientAsync)(n,o);u(t)}catch(t){c(new Error('Failed to setup client from useDevToolsPluginClient: '+t.toString()))}})(),()=>{t()}},[n]),null!=s)throw s;return l};var t=r(d[0]),e=r(d[1])},2541,[12,2542]);
|
|
10
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.createDevToolsPluginClient=c,e.getDevToolsPluginClientAsync=async function(n,o){const l=(0,t.getConnectionInfo)();let u=s[n];if(null!=u){if(u instanceof Promise)return u;!1!==u.isConnected()&&u.connectionInfo.devServer===l.devServer||(await u.closeAsync(),delete s[n],u=void 0)}if(null==u){const t=c({...l,pluginName:n},o);s[n]=t,u=await t,s[n]=u}return u},e.cleanupDevToolsPluginInstances=function(){for(const n of Object.keys(s)){const o=s[n];delete s[n],o instanceof Promise?o.then(n=>n.closeAsync()):o?.closeAsync()}};var n=r(d[0]),o=r(d[1]),t=r(d[2]);const s={};async function c(t,s){let c;return c='app'===t.sender?new n.DevToolsPluginClientImplApp(t,s):new o.DevToolsPluginClientImplBrowser(t,s),await c.initAsync(),c}},2542,[2543,2550,2551]);
|
|
11
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DevToolsPluginClientImplApp",{enumerable:!0,get:function(){return t}});var e=r(_d[0]),n=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){if('default'!==t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}}),n.default=e,n})(r(_d[1]));class t extends e.DevToolsPluginClient{browserClientMap={};async initAsync(){await super.initAsync(),this.addHandshakeHandler()}addHandshakeHandler(){this.addHandskakeMessageListener(e=>{if('handshake'===e.method){const{pluginName:t,protocolVersion:o}=e;if(o!==this.connectionInfo.protocolVersion)return console.warn(`Received an incompatible devtools plugin handshake message - pluginName[${t}]`),void this.terminateBrowserClient(t,e.browserClientId);const s=this.browserClientMap[t];null!=s&&s!==e.browserClientId&&(n.info(`Terminate the previous browser client connection - previousBrowserClientId[${s}]`),this.terminateBrowserClient(t,s)),this.browserClientMap[t]=e.browserClientId}})}terminateBrowserClient(e,n){this.sendHandshakeMessage({protocolVersion:this.connectionInfo.protocolVersion,method:'terminateBrowserClient',browserClientId:n,pluginName:e})}}},2543,[2544,2549]);
|
|
12
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DevToolsPluginClient",{enumerable:!0,get:function(){return c}});var e=r(_d[0]),s=r(_d[1]),t=r(_d[2]),n=(function(e){if(e&&e.__esModule)return e;var s={};return e&&Object.keys(e).forEach(function(t){if('default'!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}}),s.default=e,s})(r(_d[3])),o=r(_d[4]);class c{static defaultWSStore=new s.WebSocketBackingStore;wsStore=c.defaultWSStore;isClosed=!1;retries=0;messageFramePacker=new e.MessageFramePacker;constructor(e,s){this.connectionInfo=e,this.options=s,this.wsStore=e.wsStore||c.defaultWSStore,this.listeners=Object.create(null)}async initAsync(){null==this.wsStore.ws&&(this.wsStore.ws=await this.connectAsync()),this.wsStore.refCount+=1,this.wsStore.ws.addEventListener('message',this.handleMessage)}async closeAsync(){this.isClosed=!0,this.wsStore.ws?.removeEventListener('message',this.handleMessage),this.wsStore.refCount-=1,this.wsStore.refCount<1&&(this.wsStore.ws?.close(),this.wsStore.ws=null),this.listeners=Object.create(null)}sendMessage(e,s){if(this.wsStore.ws?.readyState===WebSocket.CLOSED)return void n.warn('Unable to send message in a disconnected state.');const t={pluginName:this.connectionInfo.pluginName,method:e},o=this.messageFramePacker.pack({messageKey:t,payload:s});o instanceof Promise?o.then(e=>{this.wsStore.ws?.send(e)}):this.wsStore.ws?.send(o)}addMessageListener(e,s){return(this.listeners[e]||(this.listeners[e]=new Set)).add(s),{remove:()=>{this.listeners[e]?.delete(s)}}}addMessageListenerOnce(e,s){const t=n=>{s(n),this.listeners[e]?.delete(t)};this.addMessageListener(e,t)}sendHandshakeMessage(e){this.wsStore.ws?.readyState!==WebSocket.CLOSED?this.wsStore.ws?.send(JSON.stringify({...e,__isHandshakeMessages:!0})):n.warn('Unable to send message in a disconnected state.')}addHandskakeMessageListener(e){const s=s=>{if('string'!=typeof s.data)return;const t=JSON.parse(s.data);if(!t.__isHandshakeMessages)return;delete t.__isHandshakeMessages;const n=t;n.pluginName&&n.pluginName!==this.connectionInfo.pluginName||e(n)};return this.wsStore.ws?.addEventListener('message',s),{remove:()=>{this.wsStore.ws?.removeEventListener('message',s)}}}isConnected(){return this.wsStore.ws?.readyState===WebSocket.OPEN}connectAsync(){return new Promise((e,s)=>{const o=this.connectionInfo.useWss?'wss':'ws',c=new t.WebSocketWithReconnect(`${o}://${this.connectionInfo.devServer}/expo-dev-plugins/broadcast`,{binaryType:this.options?.websocketBinaryType,onError:e=>{e instanceof Error?console.warn(`Error happened from the WebSocket connection: ${e.message}\n${e.stack}`):console.warn(`Error happened from the WebSocket connection: ${JSON.stringify(e)}`)}});c.addEventListener('open',()=>{e(c)}),c.addEventListener('error',e=>{s(e)}),c.addEventListener('close',e=>{n.info('WebSocket closed',e.code,e.reason)})})}handleMessage=async e=>{let s;if('string'==typeof e.data)s=e.data;else if(e.data instanceof ArrayBuffer)s=e.data;else if(ArrayBuffer.isView(e.data))s=e.data.buffer;else{if(!(e.data instanceof Blob))return void n.warn('Unsupported received data type in handleMessageImpl');s=await(0,o.blobToArrayBufferAsync)(e.data)}const{messageKey:t,payload:c,...d}=this.messageFramePacker.unpack(s);if(!0===d?.__isHandshakeMessages)return;if(t.pluginName&&t.pluginName!==this.connectionInfo.pluginName)return;const l=this.listeners[t.method];if(l)for(const e of l)e(c)};getWebSocketBackingStore(){return this.wsStore}}},2544,[2545,2547,2548,2549,2546]);
|
|
13
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"MessageFramePacker",{enumerable:!0,get:function(){return n}});var t=r(d[0]);class n{textEncoder=new TextEncoder;textDecoder=new TextDecoder;pack({messageKey:n,payload:o}){return this.isFastPathPayload(o)?JSON.stringify({messageKey:n,payload:o}):o instanceof Blob?new Promise(async(s,c)=>{try{const c=await(0,t.blobToArrayBufferAsync)(o);s(this.packImpl({messageKey:n,payload:new Uint8Array(c)},8))}catch(t){c(t)}}):this.packImpl({messageKey:n,payload:o},void 0)}unpack(t){if('string'==typeof t)return JSON.parse(t);const n=new DataView(t,0,4).getUint32(0,!1),o=t.slice(4,4+n),s=this.textDecoder.decode(o),c=JSON.parse(s),y=new DataView(t,4+n,1).getUint8(0),u=t.slice(4+n+1);return{messageKey:c,payload:this.deserializePayload(u,y)}}isFastPathPayload(t){if(null==t)return!0;const n=typeof t;return'string'===n||'number'===n||'object'===n&&t.constructor===Object}payloadToUint8Array(t){if(t instanceof Uint8Array)return t;if('string'==typeof t)return this.textEncoder.encode(t);if('number'==typeof t){const n=new ArrayBuffer(8);return new DataView(n).setFloat64(0,t,!1),new Uint8Array(n)}if(null===t)return new Uint8Array(0);if(void 0===t)return new Uint8Array(0);if(t instanceof ArrayBuffer)return new Uint8Array(t);if(t instanceof Blob)throw new Error('Blob is not supported in this callsite.');return this.textEncoder.encode(JSON.stringify(t))}packImpl({messageKey:t,payload:o},s){const c=JSON.stringify(t),y=this.textEncoder.encode(c),u=y.length,f=this.payloadToUint8Array(o),l=4+u+1+f.byteLength,p=new ArrayBuffer(l),w=new Uint8Array(p);new DataView(p,0,4).setUint32(0,u,!1),w.set(y,4);return new DataView(p,4+u,1).setUint8(0,s??n.getPayloadTypeIndicator(o)),w.set(f,4+u+1),w}deserializePayload(t,n){switch(n){case 1:return new Uint8Array(t);case 2:return this.textDecoder.decode(t);case 3:return new DataView(t).getFloat64(0,!1);case 4:return null;case 5:return;case 6:{const n=this.textDecoder.decode(t);return JSON.parse(n)}case 7:return t;case 8:return new Blob([t]);default:throw new Error('Unsupported payload type')}}static getPayloadTypeIndicator(t){if(t instanceof Uint8Array)return 1;if('string'==typeof t)return 2;if('number'==typeof t)return 3;if(null===t)return 4;if(void 0===t)return 5;if(t instanceof ArrayBuffer)return 7;if(t instanceof Blob)return 8;if('object'==typeof t)return 6;throw new Error('Unsupported payload type')}}},2545,[2546]);
|
|
14
|
+
__d(function(g,r,i,a,m,e,d){"use strict";async function n(n){return new Promise((f,o)=>{const u=new FileReader;u.onload=()=>{f(u.result)},u.onerror=o,u.readAsArrayBuffer(n)})}Object.defineProperty(e,'__esModule',{value:!0}),e.blobToArrayBufferAsync=function(f){if('function'==typeof f.arrayBuffer)return f.arrayBuffer();return n(f)},e.legacyBlobToArrayBufferAsync=n},2546,[]);
|
|
15
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"WebSocketBackingStore",{enumerable:!0,get:function(){return t}});class t{constructor(t=null,n=0){this.ws=t,this.refCount=n}}},2547,[]);
|
|
16
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"WebSocketWithReconnect",{enumerable:!0,get:function(){return t}});class t{ws=null;retries=0;connectTimeoutHandle=null;isClosed=!1;sendQueue=[];lastCloseEvent=null;constructor(t,s){this.url=t,this.retriesInterval=s?.retriesInterval??1500,this.maxRetries=s?.maxRetries??200,this.connectTimeout=s?.connectTimeout??5e3,this.onError=s?.onError??(t=>{throw t}),this.onReconnect=s?.onReconnect??(()=>{}),this.wsBinaryType=s?.binaryType,this.eventListeners=Object.create(null),this.connect()}close(t,s){if(this.clearConnectTimeoutIfNeeded(),this.emitEvent('close',this.lastCloseEvent??{code:t??1e3,reason:s??'Explicit closing',message:'Explicit closing'}),this.lastCloseEvent=null,this.isClosed=!0,this.eventListeners=Object.create(null),this.sendQueue=[],null!=this.ws){const t=this.ws;this.ws=null,this.wsClose(t)}}addEventListener(t,s){(this.eventListeners[t]||(this.eventListeners[t]=new Set)).add(s)}removeEventListener(t,s){this.eventListeners[t]?.delete(s)}connect(){null==this.ws&&(this.connectTimeoutHandle=setTimeout(this.handleConnectTimeout,this.connectTimeout),this.ws=new WebSocket(this.url.toString()),null!=this.wsBinaryType&&(this.ws.binaryType=this.wsBinaryType),this.ws.addEventListener('message',this.handleMessage),this.ws.addEventListener('open',this.handleOpen),this.ws.addEventListener('error',this.handleError),this.ws.addEventListener('close',this.handleClose))}send(t){if(this.isClosed)return void this.onError(new Error('Unable to send data: WebSocket is closed'));if(this.retries>=this.maxRetries)return void this.onError(new Error(`Unable to send data: Exceeded max retries - retries[${this.retries}]`));const s=this.ws;null!=s&&s.readyState===WebSocket.OPEN?s.send(t):this.sendQueue.push(t)}emitEvent(t,s){const n=this.eventListeners[t];if(n)for(const t of n)t(s)}handleOpen=()=>{this.clearConnectTimeoutIfNeeded(),this.lastCloseEvent=null,this.emitEvent('open');const t=this.sendQueue;this.sendQueue=[];for(const s of t)this.send(s)};handleMessage=t=>{this.emitEvent('message',t)};handleError=t=>{this.clearConnectTimeoutIfNeeded(),this.emitEvent('error',t),this.reconnectIfNeeded(`WebSocket error - ${t.message}`)};handleClose=t=>{this.clearConnectTimeoutIfNeeded(),this.lastCloseEvent={code:t.code,reason:t.reason,message:t.message},this.reconnectIfNeeded(`WebSocket closed - code[${t.code}] reason[${t.reason}]`)};handleConnectTimeout=()=>{this.reconnectIfNeeded('Timeout from connecting to the WebSocket')};clearConnectTimeoutIfNeeded(){null!=this.connectTimeoutHandle&&(clearTimeout(this.connectTimeoutHandle),this.connectTimeoutHandle=null)}reconnectIfNeeded(t){if(null!=this.ws&&(this.wsClose(this.ws),this.ws=null),!this.isClosed)return this.retries>=this.maxRetries?(this.onError(new Error('Exceeded max retries')),void this.close()):void setTimeout(()=>{this.retries+=1,this.connect(),this.onReconnect(t)},this.retriesInterval)}wsClose(t){try{t.removeEventListener('message',this.handleMessage),t.removeEventListener('open',this.handleOpen),t.removeEventListener('close',this.handleClose),t.onerror=()=>{},t.close()}catch{}}get readyState(){if(this.isClosed)return WebSocket.CLOSED;const t=this.ws?.readyState;return t===WebSocket.CLOSED?WebSocket.CONNECTING:t??WebSocket.CONNECTING}CONNECTING=0;OPEN=1;CLOSING=2;CLOSED=3;get binaryType(){return this.ws?.binaryType??'blob'}get bufferedAmount(){return this.ws?.bufferedAmount??0}get extensions(){return this.ws?.extensions??''}get protocol(){return this.ws?.protocol??''}ping(){return this.ws?.ping()}dispatchEvent(t){return this.ws?.dispatchEvent(t)??!1}set onclose(t){throw new Error('Unsupported legacy property, use addEventListener instead')}set onerror(t){throw new Error('Unsupported legacy property, use addEventListener instead')}set onmessage(t){throw new Error('Unsupported legacy property, use addEventListener instead')}set onopen(t){throw new Error('Unsupported legacy property, use addEventListener instead')}}},2548,[]);
|
|
17
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.log=function(...o){n&&console.log(...o)},e.debug=function(...o){n&&console.debug(...o)},e.info=function(...o){n&&console.info(...o)},e.warn=function(...o){n&&console.warn(...o)},e.setEnableLogging=function(o){n=o};let n=!1},2549,[]);
|
|
18
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DevToolsPluginClientImplBrowser",{enumerable:!0,get:function(){return n}});var e=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){if('default'!==n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,t})(r(_d[1]));class n extends e.DevToolsPluginClient{browserClientId=Date.now().toString();async initAsync(){await super.initAsync(),this.startHandshake()}startHandshake(){this.addHandskakeMessageListener(e=>{'terminateBrowserClient'===e.method&&this.browserClientId===e.browserClientId&&(t.info('Received terminateBrowserClient messages and terminate the current connection'),this.closeAsync())}),this.sendHandshakeMessage({protocolVersion:this.connectionInfo.protocolVersion,pluginName:this.connectionInfo.pluginName,method:'handshake',browserClientId:this.browserClientId})}}},2550,[2544,2549]);
|
|
19
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getConnectionInfo=function(){const n=new URLSearchParams(window.location.search).get('devServer'),t=window.location.origin.replace(/^https?:\/\//,'');return{protocolVersion:o.PROTOCOL_VERSION,sender:'browser',devServer:n||t,useWss:'https:'===window.location.protocol}};var o=r(d[0])},2551,[2552]);
|
|
20
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PROTOCOL_VERSION",{enumerable:!0,get:function(){return t}});const t=1},2552,[]);
|
|
21
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DEVTOOLS_PLUGIN_NAME",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"REQUEST_TIMEOUT_MS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"SQL_QUERIES",{enumerable:!0,get:function(){return E}});const t='expo-sqlite',n=3e4,E={LIST_TABLES:"SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%' ORDER BY name",TABLE_INFO:t=>`PRAGMA table_info(${t})`}},2553,[]);
|
|
22
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DevToolsRequestHelper",{enumerable:!0,get:function(){return t}});var s=r(d[0]);class t{pendingRequests=new Map;requestIdCounter=0;constructor(s){this.client=s}generateRequestId(){return`req_${Date.now()}_${++this.requestIdCounter}`}createRequest(t=s.REQUEST_TIMEOUT_MS){const n=this.generateRequestId(),u=new Promise((s,u)=>{const o=setTimeout(()=>{this.pendingRequests.delete(n),u(new Error(`Request ${n} timed out after ${t}ms`))},t);this.pendingRequests.set(n,{resolve:s,reject:u,timeoutId:o})});return{requestId:n,promise:u}}resolveRequest(s,t){const n=this.pendingRequests.get(s);return!!n&&(clearTimeout(n.timeoutId),this.pendingRequests.delete(s),n.resolve(t),!0)}rejectRequest(s,t){const n=this.pendingRequests.get(s);return!!n&&(clearTimeout(n.timeoutId),this.pendingRequests.delete(s),n.reject(t),!0)}clearAll(){for(const[s,t]of this.pendingRequests.entries())clearTimeout(t.timeoutId),t.reject(new Error(`Request ${s} cancelled`));this.pendingRequests.clear(),this.responseListenerSetup=!1}getPendingCount(){return this.pendingRequests.size}async sendMessageAsync(s,t={},n){if(!this.client)throw new Error('DevTools client not connected');const{requestId:u,promise:o}=this.createRequest(n);if('getDatabase'===s){const n=`${s}:${u}`;this.client.addMessageListenerOnce(n,s=>{this.resolveRequest(u,s)}),this.client.sendMessage(s,{...t,requestId:u})}else this.responseListenerSetup||this.setupResponseListener(),this.client.sendMessage(s,{...t,requestId:u});return await o}responseListenerSetup=!1;responseListener=null;setupResponseListener(){this.client&&(this.responseListener=this.client.addMessageListener('response',s=>{s.requestId&&this.resolveRequest(s.requestId,s)}),this.responseListenerSetup=!0)}dispose(){this.clearAll(),this.responseListener?.remove(),this.responseListener=null,this.responseListenerSetup=!1}}},2554,[2553]);
|
|
23
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"SQLiteDatabase",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"defaultDatabaseDirectory",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"bundledExtensions",{enumerable:!0,get:function(){return D}}),_e.openDatabaseAsync=async function(e,t,c){const y=t??{},o=(0,u.createDatabasePath)(e,c);await n.default.ensureDatabasePathExistsAsync(o);const b=new n.default.NativeDatabase(o,y);await b.initAsync();const D=new l(o,y,b);!0!==t?.useNewConnection&&(0,s.registerDatabaseForDevToolsAsync)(D);return D},_e.openDatabaseSync=function(e,t,c){const y=t??{},o=(0,u.createDatabasePath)(e,c);n.default.ensureDatabasePathExistsSync(o);const b=new n.default.NativeDatabase(o,y);b.initSync();const D=new l(o,y,b);!0!==t?.useNewConnection&&(0,s.registerDatabaseForDevToolsAsync)(D);return D},_e.deserializeDatabaseAsync=async function(e,t){const s=t??{},c=new n.default.NativeDatabase(':memory:',s,e);return await c.initAsync(),new l(':memory:',s,c)},_e.deserializeDatabaseSync=function(e,t){const s=t??{},c=new n.default.NativeDatabase(':memory:',s,e);return c.initSync(),new l(':memory:',s,c)},_e.deleteDatabaseAsync=async function(e,t){const s=(0,u.createDatabasePath)(e,t);return await n.default.deleteDatabaseAsync(s)},_e.deleteDatabaseSync=function(e,t){const s=(0,u.createDatabasePath)(e,t);return n.default.deleteDatabaseSync(s)},_e.backupDatabaseAsync=function({sourceDatabase:e,sourceDatabaseName:t,destDatabase:s,destDatabaseName:c}){return n.default.backupDatabaseAsync(s.nativeDatabase,c??'main',e.nativeDatabase,t??'main')},_e.backupDatabaseSync=function({sourceDatabase:e,sourceDatabaseName:t,destDatabase:s,destDatabaseName:c}){return n.default.backupDatabaseSync(s.nativeDatabase,c??'main',e.nativeDatabase,t??'main')},_e.addDatabaseChangeListener=function(e){return n.default.addListener('onDatabaseChange',e)},r(d[0]);var e,t=r(d[1]),n=(e=t)&&e.__esModule?e:{default:e},s=r(d[2]),c=r(d[3]),y=r(d[4]),o=r(d[5]),u=r(d[6]);class l{constructor(e,t,n){this.databasePath=e,this.options=t,this.nativeDatabase=n}isInTransactionAsync(){return this.nativeDatabase.isInTransactionAsync()}closeAsync(){return!0!==this.options.useNewConnection&&(0,s.unregisterDatabaseForDevToolsAsync)(this),this.nativeDatabase.closeAsync()}execAsync(e){return this.nativeDatabase.execAsync(e)}async serializeAsync(e="main"){return S(await this.nativeDatabase.serializeAsync(e))}async prepareAsync(e){const t=new n.default.NativeStatement;return await this.nativeDatabase.prepareAsync(t,e),new y.SQLiteStatement(this.nativeDatabase,t)}async createSessionAsync(e="main"){const t=new n.default.NativeSession;return await this.nativeDatabase.createSessionAsync(t,e),new c.SQLiteSession(this.nativeDatabase,t)}loadExtensionAsync(e,t){return this.nativeDatabase.loadExtensionAsync(e,t)}async withTransactionAsync(e){try{await this.execAsync('BEGIN'),await e(),await this.execAsync('COMMIT')}catch(e){try{await this.execAsync('ROLLBACK')}catch{}throw e}}async withExclusiveTransactionAsync(e){throw new Error('withExclusiveTransactionAsync is not supported on web')}isInTransactionSync(){return this.nativeDatabase.isInTransactionSync()}interruptSync(){return this.nativeDatabase.interruptSync()}closeSync(){return!0!==this.options.useNewConnection&&(0,s.unregisterDatabaseForDevToolsAsync)(this),this.nativeDatabase.closeSync()}execSync(e){return this.nativeDatabase.execSync(e)}serializeSync(e="main"){return S(this.nativeDatabase.serializeSync(e))}prepareSync(e){const t=new n.default.NativeStatement;return this.nativeDatabase.prepareSync(t,e),new y.SQLiteStatement(this.nativeDatabase,t)}createSessionSync(e="main"){const t=new n.default.NativeSession;return this.nativeDatabase.createSessionSync(t,e),new c.SQLiteSession(this.nativeDatabase,t)}loadExtensionSync(e,t){this.nativeDatabase.loadExtensionSync(e,t)}withTransactionSync(e){try{this.execSync('BEGIN'),e(),this.execSync('COMMIT')}catch(e){try{this.execSync('ROLLBACK')}catch{}throw e}}sql=(e,...t)=>new o.SQLiteTaggedQuery(this,e,t);async runAsync(e,...t){const n=await this.prepareAsync(e);let s;try{s=await n.executeAsync(...t)}finally{await n.finalizeAsync()}return s}async getFirstAsync(e,...t){const n=await this.prepareAsync(e);let s;try{const e=await n.executeAsync(...t);s=await e.getFirstAsync()}finally{await n.finalizeAsync()}return s}async*getEachAsync(e,...t){const n=await this.prepareAsync(e);try{const e=await n.executeAsync(...t);for await(const t of e)yield t}finally{await n.finalizeAsync()}}async getAllAsync(e,...t){const n=await this.prepareAsync(e);let s;try{const e=await n.executeAsync(...t);s=await e.getAllAsync()}finally{await n.finalizeAsync()}return s}runSync(e,...t){const n=this.prepareSync(e);let s;try{s=n.executeSync(...t)}finally{n.finalizeSync()}return s}getFirstSync(e,...t){const n=this.prepareSync(e);let s;try{s=n.executeSync(...t).getFirstSync()}finally{n.finalizeSync()}return s}*getEachSync(e,...t){const n=this.prepareSync(e);try{const e=n.executeSync(...t);for(const t of e)yield t}finally{n.finalizeSync()}}getAllSync(e,...t){const n=this.prepareSync(e);let s;try{s=n.executeSync(...t).getAllSync()}finally{n.finalizeSync()}return s}}const b=n.default.defaultDatabaseDirectory,D=n.default.bundledExtensions;function S(e){return e instanceof Uint8Array?e:new Uint8Array(e)}},2555,[104,2556,2559,2562,2563,2565,2561]);
|
|
24
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return u}});var t=r(d[0]);let o;o='undefined'==typeof window?r(d[1]).default:void 0!==globalThis.ExpoDomWebView?(0,t.requireNativeModule)('ExpoSQLite'):r(d[2]).default;var u=o},2556,[556,2557,2558]);
|
|
25
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"NativeSession",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"SQLiteModule",{enumerable:!0,get:function(){return y}});var n=r(d[0]);class s{id=0;constructor(n,s,t){this.databasePath=n,this.options=s,this.serializedData=t}async initAsync(){}initSync(){}async isInTransactionAsync(){return!1}isInTransactionSync(){return!1}async closeAsync(){}interruptSync(){}closeSync(){}async execAsync(n){}execSync(n){}async serializeAsync(n){return new Uint8Array}serializeSync(n){return new Uint8Array}async prepareAsync(n,s){}prepareSync(n,s){}async createSessionAsync(n,s){}createSessionSync(n,s){}async loadExtensionAsync(n,s){}loadExtensionSync(n,s){}}class t{id=0;async runAsync(n,s,t,c){return{lastInsertRowId:0,changes:0,firstRowValues:[]}}runSync(n,s,t,c){return{lastInsertRowId:0,changes:0,firstRowValues:[]}}async stepAsync(n){return null}stepSync(n){return null}async getAllAsync(n){return[]}getAllSync(n){return[]}async resetAsync(n){}resetSync(n){}async getColumnNamesAsync(){return[]}getColumnNamesSync(){return[]}async finalizeAsync(n){}finalizeSync(n){}}class c{id=0;async attachAsync(n,s){}attachSync(n,s){}async enableAsync(n,s){}enableSync(n,s){}async closeAsync(n){}closeSync(n){}async createChangesetAsync(n){return(new Uint8Array).buffer}createChangesetSync(n){return(new Uint8Array).buffer}async createInvertedChangesetAsync(n){return(new Uint8Array).buffer}createInvertedChangesetSync(n){return(new Uint8Array).buffer}async applyChangesetAsync(n,s){}applyChangesetSync(n,s){}async invertChangesetAsync(n,s){return(new Uint8Array).buffer}invertChangesetSync(n,s){return(new Uint8Array).buffer}}class y extends n.NativeModule{defaultDatabaseDirectory='.';bundledExtensions={};async deleteDatabaseAsync(n){}deleteDatabaseSync(n){}async ensureDatabasePathExistsAsync(n){}ensureDatabasePathExistsSync(n){}async backupDatabaseAsync(n,s,t,c){}backupDatabaseSync(n,s,t,c){}async importAssetDatabaseAsync(n,s,t){}NativeDatabase=s;NativeStatement=t;NativeSession=c}var u=(0,n.registerWebModule)(y,'SQLiteModule')},2557,[556]);
|
|
26
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"NativeSession",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"SQLiteModule",{enumerable:!0,get:function(){return k}});var t=r(d[0]),n=r(d[1]);let s=null,o={},c=0,y=0,v=0;function h(){return s||(s=new(r(d[3]).unstable_createWorker)(new URL(r(d[3]).unstable_resolve(d[2],d.paths),window.location.href)),s.addEventListener('message',t=>{'onDatabaseChange'!==t.data.type?(0,n.workerMessageHandler)(t):I.emit(t.data.type,t.data.data)}),s.postMessage({type:'configure',data:o})),s}function b(t){return ArrayBuffer.isView(t)?t:new Uint8Array(t)}class l{constructor(t,n,s){this.databasePath=t,this.options=n,this.serializedData=s,this.id=c++}async initAsync(){await(0,n.invokeWorkerAsync)(h(),'open',{nativeDatabaseId:this.id,databasePath:this.databasePath,options:this.options??{},serializedData:this.serializedData})}initSync(){(0,n.invokeWorkerSync)(h(),'open',{nativeDatabaseId:this.id,databasePath:this.databasePath,options:this.options??{},serializedData:this.serializedData})}async isInTransactionAsync(){return await(0,n.invokeWorkerAsync)(h(),'isInTransaction',{nativeDatabaseId:this.id})}isInTransactionSync(){return(0,n.invokeWorkerSync)(h(),'isInTransaction',{nativeDatabaseId:this.id})}async closeAsync(){await(0,n.invokeWorkerAsync)(h(),'close',{nativeDatabaseId:this.id})}interruptSync(){throw new t.UnavailabilityError('expo-sqlite','interruptSync')}closeSync(){(0,n.invokeWorkerSync)(h(),'close',{nativeDatabaseId:this.id})}async execAsync(t){await(0,n.invokeWorkerAsync)(h(),'exec',{nativeDatabaseId:this.id,source:t})}execSync(t){(0,n.invokeWorkerSync)(h(),'exec',{nativeDatabaseId:this.id,source:t})}async serializeAsync(t){return await(0,n.invokeWorkerAsync)(h(),'serialize',{nativeDatabaseId:this.id,schemaName:t})}serializeSync(t){return(0,n.invokeWorkerSync)(h(),'serialize',{nativeDatabaseId:this.id,schemaName:t})}async prepareAsync(t,s){await(0,n.invokeWorkerAsync)(h(),'prepare',{nativeDatabaseId:this.id,nativeStatementId:t.id,source:s})}prepareSync(t,s){(0,n.invokeWorkerSync)(h(),'prepare',{nativeDatabaseId:this.id,nativeStatementId:t.id,source:s})}async createSessionAsync(t,s){await(0,n.invokeWorkerAsync)(h(),'sessionCreate',{nativeDatabaseId:this.id,nativeSessionId:t.id,dbName:s})}createSessionSync(t,s){(0,n.invokeWorkerSync)(h(),'sessionCreate',{nativeDatabaseId:this.id,nativeSessionId:t.id,dbName:s})}loadExtensionAsync(t,n){throw new Error('Not implemented on web')}loadExtensionSync(t,n){throw new Error('Not implemented on web')}}class u{constructor(){this.id=y++}async runAsync(t,s,o,c){if(null==this.id)throw new Error('Statement not prepared');return await(0,n.invokeWorkerAsync)(h(),'run',{nativeDatabaseId:t.id,nativeStatementId:this.id,bindParams:s,bindBlobParams:o,shouldPassAsArray:c})}runSync(t,s,o,c){if(null==this.id)throw new Error('Statement not prepared');return(0,n.invokeWorkerSync)(h(),'run',{nativeDatabaseId:t.id,nativeStatementId:this.id,bindParams:s,bindBlobParams:o,shouldPassAsArray:c})}async stepAsync(t){if(null==this.id)throw new Error('Statement not prepared');return await(0,n.invokeWorkerAsync)(h(),'step',{nativeDatabaseId:t.id,nativeStatementId:this.id})}stepSync(t){if(null==this.id)throw new Error('Statement not prepared');return(0,n.invokeWorkerSync)(h(),'step',{nativeDatabaseId:t.id,nativeStatementId:this.id})}async getAllAsync(t){if(null==this.id)throw new Error('Statement not prepared');return await(0,n.invokeWorkerAsync)(h(),'getAll',{nativeDatabaseId:t.id,nativeStatementId:this.id})}getAllSync(t){if(null==this.id)throw new Error('Statement not prepared');return(0,n.invokeWorkerSync)(h(),'getAll',{nativeDatabaseId:t.id,nativeStatementId:this.id})}async resetAsync(t){if(null==this.id)throw new Error('Statement not prepared');await(0,n.invokeWorkerAsync)(h(),'reset',{nativeDatabaseId:t.id,nativeStatementId:this.id})}resetSync(t){if(null==this.id)throw new Error('Statement not prepared');(0,n.invokeWorkerSync)(h(),'reset',{nativeDatabaseId:t.id,nativeStatementId:this.id})}async getColumnNamesAsync(){if(null==this.id)throw new Error('Statement not prepared');return await(0,n.invokeWorkerAsync)(h(),'getColumnNames',{nativeStatementId:this.id})}getColumnNamesSync(){if(null==this.id)throw new Error('Statement not prepared');return(0,n.invokeWorkerSync)(h(),'getColumnNames',{nativeStatementId:this.id})}async finalizeAsync(t){if(null==this.id)throw new Error('Statement not prepared');await(0,n.invokeWorkerAsync)(h(),'finalize',{nativeDatabaseId:t.id,nativeStatementId:this.id})}finalizeSync(t){if(null==this.id)throw new Error('Statement not prepared');(0,n.invokeWorkerSync)(h(),'finalize',{nativeDatabaseId:t.id,nativeStatementId:this.id})}}class S{constructor(){this.id=v++}async attachAsync(t,s){await(0,n.invokeWorkerAsync)(h(),'sessionAttach',{nativeDatabaseId:t.id,nativeSessionId:this.id,table:s})}attachSync(t,s){(0,n.invokeWorkerSync)(h(),'sessionAttach',{nativeDatabaseId:t.id,nativeSessionId:this.id,table:s})}async enableAsync(t,s){await(0,n.invokeWorkerAsync)(h(),'sessionEnable',{nativeDatabaseId:t.id,nativeSessionId:this.id,enabled:s})}enableSync(t,s){(0,n.invokeWorkerSync)(h(),'sessionEnable',{nativeDatabaseId:t.id,nativeSessionId:this.id,enabled:s})}async closeAsync(t){await(0,n.invokeWorkerAsync)(h(),'sessionClose',{nativeDatabaseId:t.id,nativeSessionId:this.id})}closeSync(t){(0,n.invokeWorkerSync)(h(),'sessionClose',{nativeDatabaseId:t.id,nativeSessionId:this.id})}async createChangesetAsync(t){return(await(0,n.invokeWorkerAsync)(h(),'sessionCreateChangeset',{nativeDatabaseId:t.id,nativeSessionId:this.id})).buffer}createChangesetSync(t){return(0,n.invokeWorkerSync)(h(),'sessionCreateChangeset',{nativeDatabaseId:t.id,nativeSessionId:this.id}).buffer}async createInvertedChangesetAsync(t){return(await(0,n.invokeWorkerAsync)(h(),'sessionCreateInvertedChangeset',{nativeDatabaseId:t.id,nativeSessionId:this.id})).buffer}createInvertedChangesetSync(t){return(0,n.invokeWorkerSync)(h(),'sessionCreateInvertedChangeset',{nativeDatabaseId:t.id,nativeSessionId:this.id}).buffer}async applyChangesetAsync(t,s){await(0,n.invokeWorkerAsync)(h(),'sessionApplyChangeset',{nativeDatabaseId:t.id,nativeSessionId:this.id,changeset:b(s)})}applyChangesetSync(t,s){(0,n.invokeWorkerSync)(h(),'sessionApplyChangeset',{nativeDatabaseId:t.id,nativeSessionId:this.id,changeset:b(s)})}async invertChangesetAsync(t,s){return(await(0,n.invokeWorkerAsync)(h(),'sessionInvertChangeset',{nativeDatabaseId:t.id,nativeSessionId:this.id,changeset:b(s)})).buffer}invertChangesetSync(t,s){return(0,n.invokeWorkerSync)(h(),'sessionInvertChangeset',{nativeDatabaseId:t.id,nativeSessionId:this.id,changeset:b(s)}).buffer}}class k extends t.NativeModule{defaultDatabaseDirectory='.';bundledExtensions={};async deleteDatabaseAsync(t){await(0,n.invokeWorkerAsync)(h(),'deleteDatabase',{databasePath:t})}deleteDatabaseSync(t){(0,n.invokeWorkerSync)(h(),'deleteDatabase',{databasePath:t})}configureWeb(t){if(null!=s){if(t.wasmURL===o.wasmURL)return;throw new Error("Cannot change the SQLite WebAssembly URL because a database has already been opened, and the web worker loads SQLite only once. Call `configureWeb()` before opening any database, and reload the app after you change `wasmURL`.")}o={...t}}async ensureDatabasePathExistsAsync(t){}ensureDatabasePathExistsSync(t){}async backupDatabaseAsync(t,s,o,c){await(0,n.invokeWorkerAsync)(h(),'backupDatabase',{destNativeDatabaseId:t.id,destDatabaseName:s,sourceNativeDatabaseId:o.id,sourceDatabaseName:c})}backupDatabaseSync(t,s,o,c){(0,n.invokeWorkerSync)(h(),'backupDatabase',{destNativeDatabaseId:t.id,destDatabaseName:s,sourceNativeDatabaseId:o.id,sourceDatabaseName:c})}async importAssetDatabaseAsync(t,s,o){await(0,n.invokeWorkerAsync)(h(),'importAssetDatabase',{databasePath:t,assetDatabasePath:s,forceOverwrite:o})}NativeDatabase=l;NativeStatement=u;NativeSession=S}const I=(0,t.registerWebModule)(k,'SQLiteModule');var p=I},2558,{"0":556,"1":2526,"2":2523,"3":10,"paths":{"2523":"/_expo/plugins/expo-sqlite/_expo/static/js/web/worker-3dada1e55f01b3914c71823471616780.js"}});
|
|
27
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.registerDatabaseForDevToolsAsync=async function(e){return},_e.unregisterDatabaseForDevToolsAsync=async function(e){return},_e.closeDevToolsClientAsync=async function(){await(t?.closeAsync()),t=null,o.clear()};var e,n=r(d[0]),s=(e=n)&&e.__esModule?e:{default:e};r(d[1]);let t=null;new s.default;const o=new Map},2559,[2560,2561,2539]);
|
|
28
|
+
__d(function(g,r,i,a,m,e,d){"use strict";var t,s,o=this&&this.__classPrivateFieldGet||function(t,s,o,n){if("a"===o&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof s?t!==s||!n:!s.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===o?n:"a"===o?n.call(t):n?n.value:s.get(t)},n=this&&this.__classPrivateFieldSet||function(t,s,o,n,f){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!f)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof s?t!==s||!f:!s.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?f.call(t,o):f?f.value=o:s.set(t,o),o};Object.defineProperty(e,"__esModule",{value:!0});e.default=class{constructor(){t.set(this,!1),s.set(this,new Set)}get acquired(){return o(this,t,"f")}acquireAsync({timeout:f}={}){if(!o(this,t,"f"))return n(this,t,!0,"f"),Promise.resolve();if(null==f)return new Promise(t=>{o(this,s,"f").add(t)});let c,h;return Promise.race([new Promise(t=>{c=()=>{clearTimeout(h),t()},o(this,s,"f").add(c)}),new Promise((t,n)=>{h=setTimeout(()=>{o(this,s,"f").delete(c),n(new Error("Timed out waiting for lock"))},f)})])}tryAcquire(){return!o(this,t,"f")&&(n(this,t,!0,"f"),!0)}release(){if(!o(this,t,"f"))throw new Error("Cannot release an unacquired lock");if(o(this,s,"f").size>0){const[t]=o(this,s,"f");o(this,s,"f").delete(t),t()}else n(this,t,!1,"f")}},t=new WeakMap,s=new WeakMap},2560,[]);
|
|
29
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.createDatabasePath=function(e,t){if(':memory:'===e)return e;return`${n=u(t),n.replace(/\/*$/,'')}/${(function(e){return e.replace(/^\/+/,'')})(e)}`;var n},_e.basename=function(e){return e.substring(e.lastIndexOf('/')+1)};var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};function u(e){const t=e??n.default.defaultDatabaseDirectory;if(null==t)throw new Error('Both provided directory and defaultDatabaseDirectory are null.');return t}},2561,[2556]);
|
|
30
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SQLiteSession",{enumerable:!0,get:function(){return t}});class t{constructor(t,n){this.nativeDatabase=t,this.nativeSession=n}attachAsync(t){return this.nativeSession.attachAsync(this.nativeDatabase,t)}enableAsync(t){return this.nativeSession.enableAsync(this.nativeDatabase,t)}closeAsync(){return this.nativeSession.closeAsync(this.nativeDatabase)}async createChangesetAsync(){const t=await this.nativeSession.createChangesetAsync(this.nativeDatabase);return new Uint8Array(t)}async createInvertedChangesetAsync(){const t=await this.nativeSession.createInvertedChangesetAsync(this.nativeDatabase);return new Uint8Array(t)}applyChangesetAsync(t){return this.nativeSession.applyChangesetAsync(this.nativeDatabase,t)}async invertChangesetAsync(t){const n=await this.nativeSession.invertChangesetAsync(this.nativeDatabase,t);return new Uint8Array(n)}attachSync(t){this.nativeSession.attachSync(this.nativeDatabase,t)}enableSync(t){this.nativeSession.enableSync(this.nativeDatabase,t)}closeSync(){this.nativeSession.closeSync(this.nativeDatabase)}createChangesetSync(){const t=this.nativeSession.createChangesetSync(this.nativeDatabase);return new Uint8Array(t)}createInvertedChangesetSync(){const t=this.nativeSession.createInvertedChangesetSync(this.nativeDatabase);return new Uint8Array(t)}applyChangesetSync(t){this.nativeSession.applyChangesetSync(this.nativeDatabase,t)}invertChangesetSync(t){const n=this.nativeSession.invertChangesetSync(this.nativeDatabase,t);return new Uint8Array(n)}}},2562,[]);
|
|
31
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SQLiteStatement",{enumerable:!0,get:function(){return s}});var t=r(d[0]);class s{currentCursor=null;constructor(t,s){this.nativeDatabase=t,this.nativeStatement=s}claimCursor(){const t={};return this.currentCursor=t,()=>this.currentCursor===t}async executeAsync(...s){const{lastInsertRowId:n,changes:o,firstRowValues:u}=await this.nativeStatement.runAsync(this.nativeDatabase,...(0,t.normalizeParams)(...s));return l(this.nativeDatabase,this.nativeStatement,u,{rawResult:!1,lastInsertRowId:n,changes:o},this.claimCursor())}async executeForRawResultAsync(...s){const{lastInsertRowId:n,changes:o,firstRowValues:u}=await this.nativeStatement.runAsync(this.nativeDatabase,...(0,t.normalizeParams)(...s));return l(this.nativeDatabase,this.nativeStatement,u,{rawResult:!0,lastInsertRowId:n,changes:o},this.claimCursor())}getColumnNamesAsync(){return this.nativeStatement.getColumnNamesAsync()}async finalizeAsync(){await this.nativeStatement.finalizeAsync(this.nativeDatabase)}executeSync(...s){const{lastInsertRowId:n,changes:l,firstRowValues:u}=this.nativeStatement.runSync(this.nativeDatabase,...(0,t.normalizeParams)(...s));return o(this.nativeDatabase,this.nativeStatement,u,{rawResult:!1,lastInsertRowId:n,changes:l},this.claimCursor())}executeForRawResultSync(...s){const{lastInsertRowId:n,changes:l,firstRowValues:u}=this.nativeStatement.runSync(this.nativeDatabase,...(0,t.normalizeParams)(...s));return o(this.nativeDatabase,this.nativeStatement,u,{rawResult:!0,lastInsertRowId:n,changes:l},this.claimCursor())}getColumnNamesSync(){return this.nativeStatement.getColumnNamesSync()}finalizeSync(){this.nativeStatement.finalizeSync(this.nativeDatabase)}}const n="This result is no longer readable because the prepared statement ran again. A prepared statement holds a single SQLite cursor, so a later run rebinds the parameters and moves that cursor, and this result would return the rows of the later run. Read a result to the end before you run the same statement again, or prepare a separate statement for each reader.";async function l(t,s,n,l,o){const h=new u(t,s,n?y(n):null,l,o),c=h.generatorAsync();return Object.defineProperties(c,{lastInsertRowId:{value:l.lastInsertRowId,enumerable:!0,writable:!1,configurable:!0},changes:{value:l.changes,enumerable:!0,writable:!1,configurable:!0},getFirstAsync:{value:h.getFirstAsync.bind(h),enumerable:!0,writable:!1,configurable:!0},getAllAsync:{value:h.getAllAsync.bind(h),enumerable:!0,writable:!1,configurable:!0},resetAsync:{value:h.resetAsync.bind(h),enumerable:!0,writable:!1,configurable:!0}}),c}function o(t,s,n,l,o){const u=new h(t,s,n?y(n):n,l,o),c=u.generatorSync();return Object.defineProperties(c,{lastInsertRowId:{value:l.lastInsertRowId,enumerable:!0,writable:!1,configurable:!0},changes:{value:l.changes,enumerable:!0,writable:!1,configurable:!0},getFirstSync:{value:u.getFirstSync.bind(u),enumerable:!0,writable:!1,configurable:!0},getAllSync:{value:u.getAllSync.bind(u),enumerable:!0,writable:!1,configurable:!0},resetSync:{value:u.resetSync.bind(u),enumerable:!0,writable:!1,configurable:!0}}),c}class u{columnNames=null;isStepCalled=!1;constructor(t,s,n,l,o){this.database=t,this.statement=s,this.firstRowValues=n,this.options=l,this.isCursorOwner=o}assertCursorOwner(){if(!this.isCursorOwner())throw new Error(n)}async getFirstAsync(){if(this.isStepCalled)throw new Error('The SQLite cursor has been shifted and is unable to retrieve the first row without being reset. Invoke `resetAsync()` to reset the cursor first if you want to retrieve the first row.');this.isStepCalled=!0;const t=await this.getColumnNamesAsync(),s=this.popFirstRowValues();if(null!=s)return c(this.options.rawResult,t,s);this.assertCursorOwner();const n=await this.statement.stepAsync(this.database);return null!=n?c(this.options.rawResult,t,y(n)):null}async getAllAsync(){if(this.isStepCalled)throw new Error('The SQLite cursor has been shifted and is unable to retrieve all rows without being reset. Invoke `resetAsync()` to reset the cursor first if you want to retrieve all rows.');this.isStepCalled=!0;const t=this.popFirstRowValues();if(null==t)return[];const s=await this.getColumnNamesAsync();this.assertCursorOwner();const n=b(await this.statement.getAllAsync(this.database));return t.length>0?w(this.options.rawResult,s,[t,...n]):w(this.options.rawResult,s,n)}async*generatorAsync(){this.isStepCalled=!0;const t=await this.getColumnNamesAsync(),s=this.popFirstRowValues();let n;null!=s&&(yield c(this.options.rawResult,t,s));do{this.assertCursorOwner(),n=await this.statement.stepAsync(this.database),null!=n&&(yield c(this.options.rawResult,t,y(n)))}while(null!=n)}async resetAsync(){this.assertCursorOwner(),await this.statement.resetAsync(this.database),this.isStepCalled=!1}popFirstRowValues(){if(null!=this.firstRowValues){const t=this.firstRowValues;return this.firstRowValues=null,t.length>0?t:null}return null}async getColumnNamesAsync(){return null==this.columnNames&&(this.columnNames=await this.statement.getColumnNamesAsync()),this.columnNames}}class h{columnNames=null;isStepCalled=!1;constructor(t,s,n,l,o){this.database=t,this.statement=s,this.firstRowValues=n,this.options=l,this.isCursorOwner=o}assertCursorOwner(){if(!this.isCursorOwner())throw new Error(n)}getFirstSync(){if(this.isStepCalled)throw new Error('The SQLite cursor has been shifted and is unable to retrieve the first row without being reset. Invoke `resetSync()` to reset the cursor first if you want to retrieve the first row.');this.isStepCalled=!0;const t=this.getColumnNamesSync(),s=this.popFirstRowValues();if(null!=s)return c(this.options.rawResult,t,s);this.assertCursorOwner();const n=this.statement.stepSync(this.database);return null!=n?c(this.options.rawResult,t,y(n)):null}getAllSync(){if(this.isStepCalled)throw new Error('The SQLite cursor has been shifted and is unable to retrieve all rows without being reset. Invoke `resetSync()` to reset the cursor first if you want to retrieve all rows.');const t=this.popFirstRowValues();if(null==t)return[];const s=this.getColumnNamesSync();this.assertCursorOwner();const n=b(this.statement.getAllSync(this.database));return null!=t&&t.length>0?w(this.options.rawResult,s,[t,...n]):w(this.options.rawResult,s,n)}*generatorSync(){this.isStepCalled=!0;const t=this.getColumnNamesSync(),s=this.popFirstRowValues();let n;null!=s&&(yield c(this.options.rawResult,t,s));do{this.assertCursorOwner(),n=this.statement.stepSync(this.database),null!=n&&(yield c(this.options.rawResult,t,y(n)))}while(null!=n)}resetSync(){this.assertCursorOwner(),this.statement.resetSync(this.database),this.isStepCalled=!1}popFirstRowValues(){if(null!=this.firstRowValues){const t=this.firstRowValues;return this.firstRowValues=null,t.length>0?t:null}return null}getColumnNamesSync(){return null==this.columnNames&&(this.columnNames=this.statement.getColumnNamesSync()),this.columnNames}}function c(s,n,l){return s?l:(0,t.composeRow)(n,l)}function w(s,n,l){return s?l:(0,t.composeRows)(n,l)}function y(t){return t?.map(t=>t instanceof ArrayBuffer?new Uint8Array(t):t)}function b(t){return t.map(y)}},2563,[2564]);
|
|
32
|
+
__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.normalizeParams=function(...n){let t=n.length>1?n:n[0];null==t&&(t=[]);('object'!=typeof t||t instanceof ArrayBuffer||ArrayBuffer.isView(t))&&(t=[t]);const o=Array.isArray(t);Array.isArray(t)&&(t=t.reduce((n,t,o)=>(n[o]=t,n),{}));const l={},s={};for(const n in t){const o=t[n];o instanceof Uint8Array||o instanceof ArrayBuffer?s[n]=o:l[n]='boolean'==typeof o?o?1:0:o??null}return[l,s,o]},e.composeRow=function(n,t){const o={};if(n.length!==t.length)throw new Error(`Column names and values count mismatch. Names: ${n.length}, Values: ${t.length}`);for(let l=0;l<n.length;l++){const s=n[l];null!=s&&(o[s]=t[l])}return o},e.composeRows=function(n,t){const o=t[0];if(null==o)return[];if(n.length!==o.length)throw new Error(`Column names and values count mismatch. Names: ${n.length}, Values: ${o.length}`);const l=[];for(const o of t){const t={};for(let l=0;l<n.length;l++){const s=n[l];null!=s&&(t[s]=o[l])}l.push(t)}return l},e.normalizeStorageIndex=function(n){const t=Math.floor(Number(n));if(Object.is(t,-0))return 0;if(!Number.isSafeInteger(t))return 0;if(t<0)return null;return t}},2564,[]);
|
|
33
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SQLiteTaggedQuery",{enumerable:!0,get:function(){return t}});var s=r(d[0]);class t{constructor(t,n,c){this.database=t;const h=n.join('?');this.source=h,this.params=c,this.parsedInfo=(0,s.parseSQLQuery)(h)}then(s,t){return this.parsedInfo.canReturnRows?this.database.getAllAsync(this.source,this.params).then(s,t):this.database.runAsync(this.source,this.params).then(s,t)}async values(){const s=await this.database.prepareAsync(this.source);try{const t=await s.executeForRawResultAsync(this.params);return await t.getAllAsync()}finally{await s.finalizeAsync()}}async first(){return this.database.getFirstAsync(this.source,this.params)}each(){return this.database.getEachAsync(this.source,this.params)}allSync(){return this.parsedInfo.canReturnRows?this.database.getAllSync(this.source,this.params):this.database.runSync(this.source,this.params)}valuesSync(){const s=this.database.prepareSync(this.source);try{return s.executeForRawResultSync(this.params).getAllSync()}finally{s.finalizeSync()}}firstSync(){return this.database.getFirstSync(this.source,this.params)}eachSync(){return this.database.getEachSync(this.source,this.params)}}},2565,[2566]);
|
|
34
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.parseSQLQuery=function(c){const E=c.replace(t,"''").replace(n,'""');if(R.test(E))return{canReturnRows:!0};if(u.test(E))return{canReturnRows:!1};if(s.test(E))return{canReturnRows:!0};return{canReturnRows:!1}};const t=/'(?:[^']|'')*'/g,n=/"(?:[^"]|"")*"/g,R=/\bRETURNING\b/i,u=/\b(INSERT|UPDATE|DELETE|CREATE|ALTER|DROP)\b/i,s=/\b(SELECT|PRAGMA|WITH|EXPLAIN)\b/i},2566,[]);
|
|
35
|
+
__d(function(g,r,i,_a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"SQLiteProvider",{enumerable:!0,get:function(){return p}}),_e.useSQLiteContext=function(){const e=(0,s.useContext)(f);if(null==e)throw new Error("useSQLiteContext must be used within a <SQLiteProvider>");return e},_e.importDatabaseFromAssetAsync=v,_e.deepEqual=I;var e,t=r(d[0]),n=r(d[1]),o=r(d[2]),s=r(d[3]),a=r(d[4]),u=(e=a)&&e.__esModule?e:{default:e},c=r(d[5]),l=r(d[6]);const f=(0,s.createContext)(null),p=(0,s.memo)(function({children:e,onError:t,useSuspense:o=!1,...s}){if(null!=t&&o)throw new Error('Cannot use `onError` with `useSuspense`, use error boundaries instead.');return o?(0,n.jsx)(h,{...s,children:e}):(0,n.jsx)(b,{...s,onError:t,children:e})},(e,t)=>e.databaseName===t.databaseName&&I(e.options,t.options)&&I(e.assetSource,t.assetSource)&&e.directory===t.directory&&e.onInit===t.onInit&&e.onError===t.onError&&e.useSuspense===t.useSuspense&&e.children===t.children);let y=null;function h(e){const o=(0,t.c)(7),{databaseName:s,directory:a,options:u,assetSource:c,children:l,onInit:p}=e,y=j(u),h=j(c);let b;if(o[0]!==l||o[1]!==s||o[2]!==a||o[3]!==p||o[4]!==h||o[5]!==y){const e=E(w({databaseName:s,directory:a,options:y,assetSource:h,onInit:p}));b=(0,n.jsx)(f.Provider,{value:e,children:l}),o[0]=l,o[1]=s,o[2]=a,o[3]=p,o[4]=h,o[5]=y,o[6]=b}else b=o[6];return b}function b({databaseName:e,directory:t,options:o,assetSource:a,children:u,onInit:c,onError:l}){const p=(0,s.useRef)(null),[y,h]=(0,s.useState)(!0),[b,w]=(0,s.useState)(null),v=j(o),I=j(a);if((0,s.useEffect)(()=>{async function n(e){try{await(e?.closeAsync())}catch(e){w(e)}}return(async function(){try{const n=await S({databaseName:e,directory:t,options:v,assetSource:I,onInit:c});p.current=n,h(!1)}catch(e){w(e)}})(),()=>{n(p.current),p.current=null,h(!0)}},[e,t,v,I,c]),null!=b){(l??(e=>{throw e}))(b)}return y||!p.current?null:(0,n.jsx)(f.Provider,{value:p.current,children:u})}function w({databaseName:e,directory:t,options:n,assetSource:o,onInit:s}){if(null!=y?.promise&&y?.databaseName===e&&y?.directory===t&&y?.options===n&&y?.assetSource===o&&y?.onInit===s)return y.promise;let a;return a=null!=y?.promise?y.promise.then(e=>{e.closeAsync()}).then(()=>S({databaseName:e,directory:t,options:n,assetSource:o,onInit:s})):S({databaseName:e,directory:t,options:n,assetSource:o,onInit:s}),y={databaseName:e,directory:t,options:n,assetSource:o,onInit:s,promise:a},a}async function S({databaseName:e,directory:t,options:n,assetSource:o,onInit:s}){null!=o&&await v(e,o,t);const a=await(0,c.openDatabaseAsync)(e,n,t);return null!=s&&await s(a),a}async function v(e,t,n){const s=await o.Asset.fromModule(t.assetId).downloadAsync();if(!s.localUri)throw new Error(`Unable to get the localUri from asset ${t.assetId}`);const a=(0,l.createDatabasePath)(e,n);await u.default.importAssetDatabaseAsync(a,s.localUri,t.forceOverwrite??!1)}function j(e){const t=(0,s.useRef)(e);return I(t.current,e)||(t.current=e),t.current}function I(e,t){return e===t||null!=e&&null!=t&&('object'==typeof e&&'object'==typeof t&&(Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>I(e[n],t[n]))))}function E(e){if(N(e)){if('fulfilled'===e.status){if(void 0===e.value)throw new Error('[use] Unexpected undefined value from promise');return e.value}if('rejected'===e.status)throw e.reason;if('pending'===e.status)throw e;throw new Error('[use] Promise is in an invalid state')}const t=e;throw t.status='pending',t.then(e=>{t.status='fulfilled',t.value=e},e=>{t.status='rejected',t.reason=e}),t}function N(e){return'object'==typeof e&&null!==e&&'status'in e}},2567,[283,6,2568,12,2556,2555,2561]);
|
|
36
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),r(d[0]);var t=r(d[1]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=r(d[2]);Object.keys(n).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})})},2568,[2569,2570,2580]);
|
|
37
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";var e,t=r(d[0]),s=r(d[1]),u=r(d[2]),o=(e=u)&&e.__esModule?e:{default:e};if(s.IS_ENV_WITH_LOCAL_ASSETS){(o.default.setCustomSourceTransformer||u.setCustomSourceTransformer)(function(e){try{if('fileHashes'in e.asset&&e.asset.fileHashes){const s=t.Asset.fromMetadata(e.asset);return s.uri.startsWith(t.ANDROID_EMBEDDED_URL_BASE_RESOURCE)?e.resourceIdentifierWithoutScale():e.fromSource(s.downloaded?s.localUri:s.uri)}return e.defaultAsset()}catch{return e.defaultAsset()}})}},2569,[2570,2574,2579]);
|
|
38
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}function e(t){if(t&&t.__esModule)return t;var e={};return t&&Object.keys(t).forEach(function(s){if('default'!==s){var n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,n.get?n:{enumerable:!0,get:function(){return t[s]}})}}),e.default=t,e}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ANDROID_EMBEDDED_URL_BASE_RESOURCE",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"Asset",{enumerable:!0,get:function(){return w}}),r(_d[0]);var s=t(r(_d[1])),n=r(_d[2]),h=e(r(_d[3])),o=r(_d[4]),l=e(r(_d[5])),u=r(_d[6]),d=r(_d[7]),c=t(r(_d[8]));function f(t){return!!t&&'object'==typeof t&&'uri'in t&&'string'==typeof t.uri}const y='file:///android_res/';class w{static byHash={};static byUri={};hash=null;localUri=null;width=null;height=null;downloading=!1;downloaded=!1;_downloadCallbacks=[];constructor({name:t,type:e,hash:s=null,uri:n,width:o,height:l}){this.name=t,this.type=e,this.hash=s,this.uri=n,'number'==typeof o&&(this.width=o),'number'==typeof l&&(this.height=l),s&&(this.localUri=(0,u.getLocalAssetUri)(s,e),this.localUri?.startsWith(y)?(this.uri=this.localUri,this.localUri=null):this.localUri&&(this.downloaded=!0)),t||(this.name=h.getFilename(n)),e||(this.type=h.getFileExtension(n))}static loadAsync(t){const e=Array.isArray(t)?t:[t];return Promise.all(e.map(t=>w.fromModule(t).downloadAsync()))}static fromModule(t){if('string'==typeof t)return w.fromURI(t);if(f(t)){const e=h.getFileExtension(t.uri);return new w({name:'',type:e.startsWith('.')?e.substring(1):e,hash:null,uri:t.uri,width:t.width,height:t.height})}const e=s.default.getAssetByID(t);if(!e)throw new Error(`Module "${t}" is missing from the asset registry`);if(!d.IS_ENV_WITH_LOCAL_ASSETS){const{uri:s}=(0,c.default)(t),n=new w({name:e.name,type:e.type,hash:e.hash,uri:s,width:e.width,height:e.height});return w.byHash[e.hash]=n,n}return w.fromMetadata(e)}static fromMetadata(t){const e=t.hash,s=w.byHash[e];if(s)return s;const{uri:h,hash:o}=(0,n.selectAssetSource)(t),l=new w({name:t.name,type:t.type,hash:o,uri:h,width:t.width,height:t.height});return w.byHash[e]=l,l}static fromURI(t){if(w.byUri[t])return w.byUri[t];let e='';if(t.indexOf(';base64')>-1)e=t.split(';')[0]?.split('/')[1]??'';else{const s=h.getFileExtension(t);e=s.startsWith('.')?s.substring(1):s}const s=new w({name:'',type:e,hash:null,uri:t});return w.byUri[t]=s,s}async downloadAsync(){if(this.downloaded)return this;if(this.downloading)return await new Promise((t,e)=>{this._downloadCallbacks.push({resolve:t,reject:e})}),this;this.downloading=!0;try{if(l.isImageType(this.type)){const{width:t,height:e,name:s}=await l.getImageInfoAsync(this.uri);this.width=t,this.height=e,this.name=s}else this.name=h.getFilename(this.uri);this.localUri=await(0,o.downloadAsync)(this.uri,this.hash,this.type),this.downloaded=!0,this._downloadCallbacks.forEach(({resolve:t})=>t())}catch(t){throw this._downloadCallbacks.forEach(({reject:e})=>e(t)),t}finally{this.downloading=!1,this._downloadCallbacks=[]}return this}}},2570,[285,214,2571,2575,2576,2577,2578,2574,2579]);
|
|
39
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.selectAssetSource=function(e){const t=o.default.pickScale(e.scales,s.default.get()),f=e.scales.findIndex(e=>e===t),l=e.fileHashes?.[f]??e.fileHashes?.[0]??e.hash,p=e.fileUris?e.fileUris[f]??e.fileUris[0]:e.uri;if(p)return{uri:c(p),hash:l};const U=1===t?'':`@${t}x`,v=e.type?`.${encodeURIComponent(e.type)}`:'',x=`/${encodeURIComponent(e.name)}${U}${v}`,L=new URLSearchParams({platform:"web",hash:e.hash});if(/^https?:\/\//.test(e.httpServerLocation)){return{uri:e.httpServerLocation+x+'?'+L,hash:l}}const R=(0,h.getManifest2)(),S=R?.extra?.expoGo?.developer?u(R):null;if(S){const t=new URL(e.httpServerLocation+x,S);return t.searchParams.set('platform',"web"),t.searchParams.set('hash',e.hash),{uri:t.href,hash:l}}if(n.default.ExponentKernel)return{uri:`https://classic-assets.eascdn.net/~assets/${encodeURIComponent(l)}`,hash:l};return{uri:'',hash:l}},_e.resolveUri=c,r(d[0]);var t=r(d[1]),s=e(r(d[2])),n=e(r(d[3])),o=e(r(d[4])),h=r(d[5]);function u(e){const s=(0,t.getBundleOrigin)();if(s)return s;const n=e.extra?.expoGo?.debuggerHost;if(!n)return null;return(h.manifestBaseUrl?.startsWith('https://')?'https://':'http://')+n}function c(e){return h.manifestBaseUrl?new URL(e,h.manifestBaseUrl).href:e}},2571,[285,2572,181,94,2573,2574]);
|
|
40
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getBundleUrl",{enumerable:!0,get:function(){return t.getBundleUrl}}),e.getBundleOrigin=function(n=(0,t.getBundleUrl)()){if(!n)return null;try{const{protocol:t,origin:u}=new URL(n);return'http:'===t||'https:'===t?u:null}catch{return null}};var t=r(d[0])},2572,[561]);
|
|
41
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}}),r(d[0]);var e,t=r(d[1]),s=(e=t)&&e.__esModule?e:{default:e};function c(e){const t=n.pickScale(e.scales,s.default.get()),c=1===t?'':'@'+t+'x',o=e.type?`.${e.type}`:'';return e.httpServerLocation.replace(/\.\.\//g,'_')+'/'+e.name+c+o}class n{constructor(e,t,s){this.serverUrl=e||'https://expo.dev',this.jsbundleUrl=null,this.asset=s}isLoadedFromServer(){return!0}isLoadedFromFileSystem(){return!1}defaultAsset(){return this.assetServerURL()}assetServerURL(){const e=new URL(c(this.asset),this.serverUrl);return e.searchParams.set('platform',"web"),e.searchParams.set('hash',this.asset.hash),this.fromSource(e.toString().replace(e.origin,''))}fromSource(e){return{__packager_asset:!0,width:this.asset.width??void 0,height:this.asset.height??void 0,uri:e,scale:n.pickScale(this.asset.scales,s.default.get())}}static pickScale(e,t){for(const s of e)if(s>=t)return s;return e[e.length-1]||1}}},2573,[285,181]);
|
|
42
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"IS_ENV_WITH_LOCAL_ASSETS",{enumerable:!0,get:function(){return t}}),e.getLocalAssets=function(){return{}},e.getManifest2=function(){return{}},Object.defineProperty(e,"manifestBaseUrl",{enumerable:!0,get:function(){return n}});const t=!1;const n=null},2574,[]);
|
|
43
|
+
__d(function(g,r,i,a,m,e,d){"use strict";function t(t){const{pathname:s,searchParams:o}=new URL(t,'https://e');return n(s)}function n(t){return t.substring(t.lastIndexOf('/')+1)}Object.defineProperty(e,'__esModule',{value:!0}),e.getFilename=t,e.getFileExtension=function(n){const s=t(n),o=s.lastIndexOf('.');return o>0?s.substring(o):''},e.getManifestBaseUrl=function(t){const n=new URL(t);let s=n.protocol;'exp:'===s?s='http:':'exps:'===s&&(s='https:');n.protocol=s;const o=n.pathname.substring(0,n.pathname.lastIndexOf('/')+1);return n.pathname=o,n.search='',n.hash='',n.protocol!==s?n.href.replace(n.protocol,s):n.href}},2575,[]);
|
|
44
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.downloadAsync=async function(n,t,c){return n}},2576,[]);
|
|
45
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isImageType=function(n){return/^(jpeg|jpg|gif|png|bmp|webp|heic)$/i.test(n)},e.getImageInfoAsync=function(t){if('undefined'==typeof window)return Promise.resolve({name:(0,n.getFilename)(t),width:0,height:0});return new Promise((o,u)=>{const s=new Image;s.onerror=u,s.onload=()=>{o({name:(0,n.getFilename)(t),width:s.naturalWidth,height:s.naturalHeight})},s.src=t})};var n=r(d[0])},2577,[2575]);
|
|
46
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getLocalAssetUri=function(t,n){return null}},2578,[]);
|
|
47
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return f}}),_e.setCustomSourceTransformer=o,Object.defineProperty(_e,"pickScale",{enumerable:!0,get:function(){return l}});var t=e(r(d[0])),n=e(r(d[1]));let u;function o(e){u=e}function c(e){if('object'==typeof e)return e;const o=t.default.getAssetByID(e);if(!o)return null;const c=new n.default('https://expo.dev',null,o);return u?u(c):c.defaultAsset()}Object.defineProperty(c,'setCustomSourceTransformer',{get:()=>o});var f=c;const{pickScale:l}=n.default},2579,[214,2573]);
|
|
48
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useAssets=function(n){const u=(0,t.c)(6),[o,f]=(0,s.useState)(),[l,_]=(0,s.useState)();let h,y,A;u[0]!==n?(h=()=>{c.Asset.loadAsync(n).then(f).catch(_)},u[0]=n,u[1]=h):h=u[1];u[2]===Symbol.for("react.memo_cache_sentinel")?(y=[],u[2]=y):y=u[2];(0,s.useEffect)(h,y),u[3]!==o||u[4]!==l?(A=[o,l],u[3]=o,u[4]=l,u[5]=A):A=u[5];return A};var t=r(d[0]),s=r(d[1]),c=r(d[2])},2580,[283,12,2570]);
|
|
49
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.configureWeb=function(e){t.default.configureWeb?.(e)};var e,u=r(d[0]),t=(e=u)&&e.__esModule?e:{default:e}},2581,[2556]);
|