@everframe/react-native 1.0.0 → 1.1.0

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.
@@ -1 +1,13 @@
1
+ import { E as ErrorCaptureStatus, P as PromiseRejectionStatus, R as ReportDeliveryStatus } from './promise-rejection-types-C-lxCdDl.js';
2
+ export { a as ErrorCaptureCounters, b as ErrorCaptureOutcome, c as ErrorCapturePath, d as PromiseRejectionCounters, e as RejectionReason, f as ReportCaptureOutcome, g as ReportCapturePath, h as ReportCapturePathStatus, i as ReportDeliveryReason, j as ReportQueueOperation, k as ReportQueueStatus, l as ReportStorageFailure, m as ReportTransportOrigin, n as ReportTransportOutcome, o as ReportTransportStatus } from './promise-rejection-types-C-lxCdDl.js';
1
3
  export * from '@everframe/react';
4
+
5
+ /** Hermes observation is separate from the browser SDK's own rejection handling. */
6
+ declare function getPromiseRejectionStatus(): PromiseRejectionStatus;
7
+
8
+ /** Mobile admission diagnostics are unavailable on the browser entry. */
9
+ declare function getErrorCaptureStatus(): ErrorCaptureStatus;
10
+
11
+ declare function getReportDeliveryStatus(): ReportDeliveryStatus;
12
+
13
+ export { ErrorCaptureStatus, PromiseRejectionStatus, ReportDeliveryStatus, getErrorCaptureStatus, getPromiseRejectionStatus, getReportDeliveryStatus };
package/dist/index.web.js CHANGED
@@ -1 +1 @@
1
- export*from"@everframe/react";
1
+ import{a as r,c as e,e as o}from"./chunk-ENPQ66EV.js";import{a as t}from"./chunk-XUSV3KOD.js";export*from"@everframe/react";function a(){return o("unsupported","platform")}t(a,"getPromiseRejectionStatus");function s(){return e("unsupported","platform")}t(s,"getErrorCaptureStatus");function n(){return r("unsupported","platform")}t(n,"getReportDeliveryStatus");export{s as getErrorCaptureStatus,a as getPromiseRejectionStatus,n as getReportDeliveryStatus};
@@ -1 +1 @@
1
- import{f as c}from"../chunk-QRPINMCR.js";import{a as i}from"../chunk-XUSV3KOD.js";var g={log:"info",info:"info",warn:"warn",error:"error",debug:"debug"},a=2048;function p(t){let l=[...new Set(t?.levels??["log","info","warn","error"])];return{name:"console",setup(){let n=!1,e=[];for(let o of l){let r=console[o];if(typeof r!="function")continue;e.push({level:o,fn:r});let u=r.bind(console);console[o]=(...f)=>{if(u(...f),!n){n=!0;try{let s=v(f);s&&!s.startsWith("[everframe]")&&c({message:s,kind:"console",level:g[o]})}catch{}finally{n=!1}}}}return()=>{for(let{level:o,fn:r}of e)console[o]=r}}}}i(p,"consoleIntegration");function v(t){let n=t.map(e=>{if(typeof e=="string")return e;if(e instanceof Error)return e.message;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}).join(" ");return n.length>a?n.slice(0,a):n}i(v,"serializeArgs");export{p as consoleIntegration};
1
+ import{h as c}from"../chunk-POE5CSO5.js";import"../chunk-ENPQ66EV.js";import{a as i}from"../chunk-XUSV3KOD.js";var g={log:"info",info:"info",warn:"warn",error:"error",debug:"debug"},a=2048;function p(t){let l=[...new Set(t?.levels??["log","info","warn","error"])];return{name:"console",setup(){let n=!1,e=[];for(let o of l){let r=console[o];if(typeof r!="function")continue;e.push({level:o,fn:r});let u=r.bind(console);console[o]=(...f)=>{if(u(...f),!n){n=!0;try{let s=v(f);s&&!s.startsWith("[everframe]")&&c({message:s,kind:"console",level:g[o]})}catch{}finally{n=!1}}}}return()=>{for(let{level:o,fn:r}of e)console[o]=r}}}}i(p,"consoleIntegration");function v(t){let n=t.map(e=>{if(typeof e=="string")return e;if(e instanceof Error)return e.message;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}).join(" ");return n.length>a?n.slice(0,a):n}i(v,"serializeArgs");export{p as consoleIntegration};
@@ -1 +1 @@
1
- import{g as i}from"../chunk-QRPINMCR.js";import{a as n}from"../chunk-XUSV3KOD.js";function o(t){let e=n(()=>{try{let a=t.navigationRef.getCurrentRoute?.()?.name;a&&i(a)}catch{}},"emit");return{name:"react-navigation",onReady:e,onStateChange:e,setup(){try{t.navigationRef.isReady()&&e()}catch{}try{return t.navigationRef.addListener("state",e)}catch{return}}}}n(o,"reactNavigationIntegration");export{o as reactNavigationIntegration};
1
+ import{i}from"../chunk-POE5CSO5.js";import"../chunk-ENPQ66EV.js";import{a as n}from"../chunk-XUSV3KOD.js";function o(t){let e=n(()=>{try{let a=t.navigationRef.getCurrentRoute?.()?.name;a&&i(a)}catch{}},"emit");return{name:"react-navigation",onReady:e,onStateChange:e,setup(){try{t.navigationRef.isReady()&&e()}catch{}try{return t.navigationRef.addListener("state",e)}catch{return}}}}n(o,"reactNavigationIntegration");export{o as reactNavigationIntegration};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Call from an application's componentDidCatch, in a boundary rendered inside
3
+ * EverframeProvider. A boundary that wraps the provider replaces it with its
4
+ * fallback in the same commit, before componentDidCatch runs, so its calls find
5
+ * no provider unless that fallback mounts one. Inside the provider, errors
6
+ * caught during its first commit are not captured: the provider publishes its
7
+ * runtime after its descendants' componentDidCatch.
8
+ * The application owns its fallback and recovery policy. Native acceptance does
9
+ * not establish delivery; fatal escalation can still produce a separate report.
10
+ */
11
+ declare function captureReactError(error: unknown, info?: {
12
+ componentStack?: string | null;
13
+ }): void;
14
+
15
+ export { captureReactError };
@@ -0,0 +1 @@
1
+ import{b as n,e as a}from"../chunk-POE5CSO5.js";import"../chunk-ENPQ66EV.js";import{a as c}from"../chunk-XUSV3KOD.js";var d=Reflect.apply,u;function l(t,i){let r=a();if(!r){s();return}let p=n(),o;try{if(i!=null){let e=Object.getOwnPropertyDescriptor(i,"componentStack");e&&"value"in e&&typeof e.value=="string"&&(o=e.value)}}catch{}try{let e=r.captureException;if(a()!==r||n()!==p)return;d(e,r,[t,{context:"react.error-boundary",...o!==void 0?{metadata:{componentStack:o}}:{}}])}catch{}}c(l,"captureReactError");function s(){try{let t=n();if(u===t||typeof __DEV__>"u"||!__DEV__)return;u=t,console.warn("[everframe] captureReactError: no EverframeProvider is mounted, so this error was not captured. Render the error boundary inside <EverframeProvider>; errors caught during its first commit are not captured.")}catch{}}c(s,"warnNotMounted");export{l as captureReactError};
@@ -0,0 +1,101 @@
1
+ declare const capturePaths: readonly ["native-handled", "bridge-handled", "bridge-automatic", "jvm-uncaught"];
2
+ declare const captureOutcomes: readonly ["persisted", "disabled", "admission-suppressed", "reentrant", "invalid-input", "ownership-lost", "storage-unavailable", "failed"];
3
+ declare const queueOperations: readonly ["enqueue-committed", "enqueue-failed", "capacity-evicted", "removed-after-acceptance", "removed-after-terminal", "removal-failed", "read-failed"];
4
+ declare const storageFailures: readonly ["capacity", "key-unavailable", "corrupt", "io", "revoked", "invalid-entry", "busy", "unknown", "unsupported-format"];
5
+ declare const transportOrigins: readonly ["live-submit", "outbox-drain"];
6
+ declare const transportOutcomes: readonly ["server-accepted", "retryable-http", "terminal-http", "network-failure", "authorization-cancelled", "cancelled", "failed"];
7
+ type ReportCapturePath = typeof capturePaths[number];
8
+ type ReportCaptureOutcome = typeof captureOutcomes[number];
9
+ type ReportQueueOperation = typeof queueOperations[number];
10
+ type ReportStorageFailure = typeof storageFailures[number];
11
+ type ReportTransportOrigin = typeof transportOrigins[number];
12
+ type ReportTransportOutcome = typeof transportOutcomes[number];
13
+ type ReportDeliveryReason = 'none' | 'no-start' | 'capture-disabled' | 'no-mount' | 'platform' | 'native-method-missing' | 'native-call-failed' | 'invalid-native-snapshot' | 'snapshot-busy';
14
+ interface ReportCapturePathStatus {
15
+ supported: boolean;
16
+ settledAttempts: number;
17
+ outcomes: Record<ReportCaptureOutcome, number>;
18
+ lastOutcome?: ReportCaptureOutcome;
19
+ }
20
+ interface ReportQueueStatus {
21
+ scope: 'sdk-report-outbox';
22
+ observation: 'not-observed' | 'observed' | 'failed';
23
+ quality: 'complete' | 'partial' | 'unknown';
24
+ pendingCount?: number;
25
+ capacityPolicy: 'reject-new' | 'evict-oldest' | 'unknown';
26
+ terminalHttpPolicy: 'retain' | 'attempt-remove' | 'unknown';
27
+ operations: Record<ReportQueueOperation, number>;
28
+ lastFailure?: ReportStorageFailure;
29
+ migration: 'not-observed' | 'clear' | 'blocked' | 'unknown';
30
+ }
31
+ interface ReportTransportStatus {
32
+ settledAttempts: number;
33
+ outcomes: Record<ReportTransportOutcome, number>;
34
+ lastOutcome?: ReportTransportOutcome;
35
+ lastHttpStatus?: number;
36
+ }
37
+ interface ReportDeliveryStatus {
38
+ schemaVersion: 1;
39
+ status: 'active' | 'not-started' | 'disabled' | 'not-mounted' | 'unsupported' | 'unavailable';
40
+ reason: ReportDeliveryReason;
41
+ scope: 'native-runtime-observations';
42
+ coverage: 'best-effort';
43
+ revision: number;
44
+ capture: {
45
+ enabled: boolean;
46
+ paths: Record<ReportCapturePath, ReportCapturePathStatus>;
47
+ };
48
+ queue: ReportQueueStatus;
49
+ transport: Record<ReportTransportOrigin, ReportTransportStatus>;
50
+ }
51
+
52
+ /** Local admission only: native acceptance is not delivery confirmation. */
53
+ type ErrorCapturePath = 'handled' | 'errorUtils' | 'rejection';
54
+ interface ErrorCaptureCounters {
55
+ attempted: number;
56
+ accepted: number;
57
+ duplicateSuppressed: number;
58
+ allowanceSuppressed: number;
59
+ bridgeUnavailable: number;
60
+ nativeRefused: number;
61
+ captureFailed: number;
62
+ reentrantSuppressed: number;
63
+ inactiveAborted: number;
64
+ legacyAttempted: number;
65
+ }
66
+ type ErrorCaptureOutcome = Exclude<keyof ErrorCaptureCounters, 'attempted'>;
67
+ interface ErrorCaptureStatus {
68
+ status: 'not-mounted' | 'disabled' | 'active' | 'unsupported';
69
+ reason: 'no-mount' | 'crash-reporting-disabled' | 'none' | 'platform';
70
+ scope: 'mounted-js-admission';
71
+ limits: {
72
+ handled: 10;
73
+ automatic: 10;
74
+ };
75
+ counters: Record<ErrorCapturePath, ErrorCaptureCounters>;
76
+ }
77
+
78
+ type RejectionReason = 'none' | 'opt-in-required' | 'crash-reporting-disabled' | 'platform' | 'runtime' | 'promise-identity' | 'hook-shape' | 'hook-install' | 'hook-displaced' | 'no-mount';
79
+ interface PromiseRejectionCounters {
80
+ pending: number;
81
+ accepted: number;
82
+ cancelled: number;
83
+ capacityDropped: number;
84
+ sizeDropped: number;
85
+ expired: number;
86
+ duplicateSuppressed: number;
87
+ allowanceSuppressed: number;
88
+ nativeRefused: number;
89
+ captureFailed: number;
90
+ /** Pending observations released when another owner replaced the hooks. */
91
+ discarded: number;
92
+ }
93
+ interface PromiseRejectionStatus {
94
+ status: 'disabled' | 'unsupported' | 'observing' | 'displaced' | 'install-failed' | 'not-mounted';
95
+ reason: RejectionReason;
96
+ adapterId?: string;
97
+ previousCallbacksPresent: boolean;
98
+ counters: PromiseRejectionCounters;
99
+ }
100
+
101
+ export type { ErrorCaptureStatus as E, PromiseRejectionStatus as P, ReportDeliveryStatus as R, ErrorCaptureCounters as a, ErrorCaptureOutcome as b, ErrorCapturePath as c, PromiseRejectionCounters as d, RejectionReason as e, ReportCaptureOutcome as f, ReportCapturePath as g, ReportCapturePathStatus as h, ReportDeliveryReason as i, ReportQueueOperation as j, ReportQueueStatus as k, ReportStorageFailure as l, ReportTransportOrigin as m, ReportTransportOutcome as n, ReportTransportStatus as o };
@@ -592,6 +592,11 @@ import EverframeReporterUI // tvOS slice present per Package.swift:12 (TV-03
592
592
  }
593
593
  }
594
594
 
595
+ /// Cached, content-free native delivery facts. Encoding failure is rejected by JS.
596
+ @objc public static func getReportDeliveryStatusJson() -> NSString {
597
+ ((try? Everframe.shared.getReportDeliveryStatus().toJSON()) ?? "{}") as NSString
598
+ }
599
+
595
600
  // MARK: - reportCrash (Task 13 — crash/error reporting spec 2026-07-18)
596
601
 
597
602
  /// Crash/error reporting. Synchronous: the RN fatal path must finish
@@ -419,6 +419,10 @@ RCT_EXPORT_MODULE(Everframe)
419
419
  [EverframeBridge setUser:dict];
420
420
  }
421
421
 
422
+ - (NSString *)getReportDeliveryStatusJson {
423
+ return [EverframeBridge getReportDeliveryStatusJson];
424
+ }
425
+
422
426
  // MARK: - reportCrash(crashJson) — Task 13 (spec 2026-07-18)
423
427
 
424
428
  // Sync spec method: codegen emits a non-void, non-promise boolean-returning
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everframe/react-native",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "React Native SDK for Everframe — AI-ready in-app bug reporting, bridging the native iOS and Android reporter to your RN app. Supports phone, Apple TV, and Android TV.",
5
5
  "author": {
6
6
  "name": "Scriptx, UAB",
@@ -73,6 +73,11 @@
73
73
  "./integrations/theoplayer": {
74
74
  "types": "./dist/integrations/theoplayer.d.ts",
75
75
  "default": "./dist/integrations/theoplayer.js"
76
+ },
77
+ "./integrations/react": {
78
+ "types": "./dist/integrations/react.d.ts",
79
+ "browser": null,
80
+ "default": "./dist/integrations/react.js"
76
81
  }
77
82
  },
78
83
  "files": [
@@ -95,7 +100,7 @@
95
100
  "dependencies": {
96
101
  "bippy": "^0.5.39",
97
102
  "zod": "^4.3.0",
98
- "@everframe/react": "^1.0.0"
103
+ "@everframe/react": "^1.1.0"
99
104
  },
100
105
  "devDependencies": {
101
106
  "@arethetypeswrong/cli": "^0.18.0",
@@ -319,6 +319,9 @@ export interface Spec extends TurboModule {
319
319
  */
320
320
  recordScreen(name: string, data?: UnsafeObject): void;
321
321
 
322
+ /** Additive diagnostic bridge: bounded JSON of cached native observations; no I/O. */
323
+ getReportDeliveryStatusJson(): string;
324
+
322
325
  /**
323
326
  * Crash/error reporting (spec 2026-07-18). SYNCHRONOUS by design (non-void
324
327
  * return forces a sync TurboModule method): the fatal path must complete
@@ -1 +0,0 @@
1
- import{a as s}from"./chunk-XUSV3KOD.js";var pn={},Vn=s((function(n,r,t,e,i){var a=new Worker(pn[r]||(pn[r]=URL.createObjectURL(new Blob([n+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(o){var f=o.data,v=f.$e$;if(v){var h=new Error(v[0]);h.code=v[1],h.stack=v[2],i(h,null)}else i(null,f)},a.postMessage(t,e),a}),"wk"),U=Uint8Array,Y=Uint16Array,Br=Int32Array,xr=new U([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),zr=new U([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ir=new U([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Mn=s(function(n,r){for(var t=new Y(31),e=0;e<31;++e)t[e]=r+=1<<n[e-1];for(var i=new Br(t[30]),e=1;e<30;++e)for(var a=t[e];a<t[e+1];++a)i[a]=a-t[e]<<5|e;return{b:t,r:i}},"freb"),Sn=Mn(xr,2),en=Sn.b,Rr=Sn.r;en[28]=258,Rr[258]=28;var Un=Mn(zr,0),Fn=Un.b,Vr=Un.r,Zr=new Y(32768);for(Z=0;Z<32768;++Z)er=(Z&43690)>>1|(Z&21845)<<1,er=(er&52428)>>2|(er&13107)<<2,er=(er&61680)>>4|(er&3855)<<4,Zr[Z]=((er&65280)>>8|(er&255)<<8)>>1;var er,Z,X=s((function(n,r,t){for(var e=n.length,i=0,a=new Y(r);i<e;++i)n[i]&&++a[n[i]-1];var o=new Y(r);for(i=1;i<r;++i)o[i]=o[i-1]+a[i-1]<<1;var f;if(t){f=new Y(1<<r);var v=15-r;for(i=0;i<e;++i)if(n[i])for(var h=i<<4|n[i],u=r-n[i],l=o[n[i]-1]++<<u,c=l|(1<<u)-1;l<=c;++l)f[Zr[l]>>v]=h}else for(f=new Y(e),i=0;i<e;++i)n[i]&&(f[i]=Zr[o[n[i]-1]++]>>15-n[i]);return f}),"hMap"),ir=new U(288);for(Z=0;Z<144;++Z)ir[Z]=8;var Z;for(Z=144;Z<256;++Z)ir[Z]=9;var Z;for(Z=256;Z<280;++Z)ir[Z]=7;var Z;for(Z=280;Z<288;++Z)ir[Z]=8;var Z,wr=new U(32);for(Z=0;Z<32;++Z)wr[Z]=5;var Z,Dn=X(ir,9,0),Tn=X(ir,9,1),Cn=X(wr,5,0),In=X(wr,5,1),$r=s(function(n){for(var r=n[0],t=1;t<n.length;++t)n[t]>r&&(r=n[t]);return r},"max"),V=s(function(n,r,t){var e=r/8|0;return(n[e]|n[e+1]<<8)>>(r&7)&t},"bits"),Hr=s(function(n,r){var t=r/8|0;return(n[t]|n[t+1]<<8|n[t+2]<<16)>>(r&7)},"bits16"),Ar=s(function(n){return(n+7)/8|0},"shft"),d=s(function(n,r,t){return(r==null||r<0)&&(r=0),(t==null||t>n.length)&&(t=n.length),new U(n.subarray(r,t))},"slc"),it={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Zn=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],p=s(function(n,r,t){var e=new Error(r||Zn[n]);if(e.code=n,Error.captureStackTrace&&Error.captureStackTrace(e,p),!t)throw e;return e},"err"),Er=s(function(n,r,t,e){var i=n.length,a=e?e.length:0;if(!i||r.f&&!r.l)return t||new U(0);var o=!t,f=o||r.i!=2,v=r.i;o&&(t=new U(i*3));var h=s(function(Tr){var Cr=t.length;if(Tr>Cr){var pr=new U(Math.max(Cr*2,Tr));pr.set(t),t=pr}},"cbuf"),u=r.f||0,l=r.p||0,c=r.b||0,S=r.l,x=r.d,A=r.m,g=r.n,z=i*8;do{if(!S){u=V(n,l,1);var F=V(n,l+1,3);if(l+=3,F)if(F==1)S=Tn,x=In,A=9,g=5;else if(F==2){var E=V(n,l,31)+257,T=V(n,l+10,15)+4,m=E+V(n,l+5,31)+1;l+=14;for(var y=new U(m),D=new U(19),C=0;C<T;++C)D[Ir[C]]=V(n,l+C*3,7);l+=T*3;for(var q=$r(D),N=(1<<q)-1,O=X(D,q,1),C=0;C<m;){var P=O[V(n,l,N)];l+=P&15;var M=P>>4;if(M<16)y[C++]=M;else{var L=0,G=0;for(M==16?(G=3+V(n,l,3),l+=2,L=y[C-1]):M==17?(G=3+V(n,l,7),l+=3):M==18&&(G=11+V(n,l,127),l+=7);G--;)y[C++]=L}}var k=y.subarray(0,E),R=y.subarray(E);A=$r(k),g=$r(R),S=X(k,A,1),x=X(R,g,1)}else p(1);else{var M=Ar(l)+4,w=n[M-4]|n[M-3]<<8,B=M+w;if(B>i){v&&p(0);break}f&&h(c+w),t.set(n.subarray(M,B),c),r.b=c+=w,r.p=l=B*8,r.f=u;continue}if(l>z){v&&p(0);break}}f&&h(c+131072);for(var fr=(1<<A)-1,j=(1<<g)-1,tr=l;;tr=l){var L=S[Hr(n,l)&fr],J=L>>4;if(l+=L&15,l>z){v&&p(0);break}if(L||p(2),J<256)t[c++]=J;else if(J==256){tr=l,S=null;break}else{var K=J-254;if(J>264){var C=J-257,$=xr[C];K=V(n,l,(1<<$)-1)+en[C],l+=$}var rr=x[Hr(n,l)&j],vr=rr>>4;rr||p(3),l+=rr&15;var R=Fn[vr];if(vr>3){var $=zr[vr];R+=Hr(n,l)&(1<<$)-1,l+=$}if(l>z){v&&p(0);break}f&&h(c+131072);var cr=c+K;if(c<R){var qr=a-R,Lr=Math.min(R,cr);for(qr+c<0&&p(3);c<Lr;++c)t[c]=e[qr+c]}for(;c<cr;++c)t[c]=t[c-R]}}r.l=S,r.p=tr,r.b=c,r.f=u,S&&(u=1,r.m=A,r.d=x,r.n=g)}while(!u);return c!=t.length&&o?d(t,0,c):t.subarray(0,c)},"inflt"),nr=s(function(n,r,t){t<<=r&7;var e=r/8|0;n[e]|=t,n[e+1]|=t>>8},"wbits"),gr=s(function(n,r,t){t<<=r&7;var e=r/8|0;n[e]|=t,n[e+1]|=t>>8,n[e+2]|=t>>16},"wbits16"),Nr=s(function(n,r){for(var t=[],e=0;e<n.length;++e)n[e]&&t.push({s:e,f:n[e]});var i=t.length,a=t.slice();if(!i)return{t:ar,l:0};if(i==1){var o=new U(t[0].s+1);return o[t[0].s]=1,{t:o,l:1}}t.sort(function(B,E){return B.f-E.f}),t.push({s:-1,f:25001});var f=t[0],v=t[1],h=0,u=1,l=2;for(t[0]={s:-1,f:f.f+v.f,l:f,r:v};u!=i-1;)f=t[t[h].f<t[l].f?h++:l++],v=t[h!=u&&t[h].f<t[l].f?h++:l++],t[u++]={s:-1,f:f.f+v.f,l:f,r:v};for(var c=a[0].s,e=1;e<i;++e)a[e].s>c&&(c=a[e].s);var S=new Y(c+1),x=kr(t[u-1],S,0);if(x>r){var e=0,A=0,g=x-r,z=1<<g;for(a.sort(function(E,T){return S[T.s]-S[E.s]||E.f-T.f});e<i;++e){var F=a[e].s;if(S[F]>r)A+=z-(1<<x-S[F]),S[F]=r;else break}for(A>>=g;A>0;){var M=a[e].s;S[M]<r?A-=1<<r-S[M]++-1:++e}for(;e>=0&&A;--e){var w=a[e].s;S[w]==r&&(--S[w],++A)}x=r}return{t:new U(S),l:x}},"hTree"),kr=s(function(n,r,t){return n.s==-1?Math.max(kr(n.l,r,t+1),kr(n.r,r,t+1)):r[n.s]=t},"ln"),Xr=s(function(n){for(var r=n.length;r&&!n[--r];);for(var t=new Y(++r),e=0,i=n[0],a=1,o=s(function(v){t[e++]=v},"w"),f=1;f<=r;++f)if(n[f]==i&&f!=r)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=n[f]}return{c:t.subarray(0,e),n:r}},"lc"),yr=s(function(n,r){for(var t=0,e=0;e<r.length;++e)t+=n[e]*r[e];return t},"clen"),an=s(function(n,r,t){var e=t.length,i=Ar(r+2);n[i]=e&255,n[i+1]=e>>8,n[i+2]=n[i]^255,n[i+3]=n[i+1]^255;for(var a=0;a<e;++a)n[i+a+4]=t[a];return(i+4+e)*8},"wfblk"),dr=s(function(n,r,t,e,i,a,o,f,v,h,u){nr(r,u++,t),++i[256];for(var l=Nr(i,15),c=l.t,S=l.l,x=Nr(a,15),A=x.t,g=x.l,z=Xr(c),F=z.c,M=z.n,w=Xr(A),B=w.c,E=w.n,T=new Y(19),m=0;m<F.length;++m)++T[F[m]&31];for(var m=0;m<B.length;++m)++T[B[m]&31];for(var y=Nr(T,7),D=y.t,C=y.l,q=19;q>4&&!D[Ir[q-1]];--q);var N=h+5<<3,O=yr(i,ir)+yr(a,wr)+o,P=yr(i,c)+yr(a,A)+o+14+3*q+yr(T,D)+2*T[16]+3*T[17]+7*T[18];if(v>=0&&N<=O&&N<=P)return an(r,u,n.subarray(v,v+h));var L,G,k,R;if(nr(r,u,1+(P<O)),u+=2,P<O){L=X(c,S,0),G=c,k=X(A,g,0),R=A;var fr=X(D,C,0);nr(r,u,M-257),nr(r,u+5,E-1),nr(r,u+10,q-4),u+=14;for(var m=0;m<q;++m)nr(r,u+3*m,D[Ir[m]]);u+=3*q;for(var j=[F,B],tr=0;tr<2;++tr)for(var J=j[tr],m=0;m<J.length;++m){var K=J[m]&31;nr(r,u,fr[K]),u+=D[K],K>15&&(nr(r,u,J[m]>>5&127),u+=J[m]>>12)}}else L=Dn,G=ir,k=Cn,R=wr;for(var m=0;m<f;++m){var $=e[m];if($>255){var K=$>>18&31;gr(r,u,L[K+257]),u+=G[K+257],K>7&&(nr(r,u,$>>23&31),u+=xr[K]);var rr=$&31;gr(r,u,k[rr]),u+=R[rr],rr>3&&(gr(r,u,$>>5&8191),u+=zr[rr])}else gr(r,u,L[$]),u+=G[$]}return gr(r,u,L[256]),u+G[256]},"wblk"),Bn=new Br([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ar=new U(0),En=s(function(n,r,t,e,i,a){var o=a.z||n.length,f=new U(e+o+5*(1+Math.ceil(o/7e3))+i),v=f.subarray(e,f.length-i),h=a.l,u=(a.r||0)&7;if(r){u&&(v[0]=a.r>>3);for(var l=Bn[r-1],c=l>>13,S=l&8191,x=(1<<t)-1,A=a.p||new Y(32768),g=a.h||new Y(x+1),z=Math.ceil(t/3),F=2*z,M=s(function(Kr){return(n[Kr]^n[Kr+1]<<z^n[Kr+2]<<F)&x},"hsh"),w=new Br(25e3),B=new Y(288),E=new Y(32),T=0,m=0,y=a.i||0,D=0,C=a.w||0,q=0;y+2<o;++y){var N=M(y),O=y&32767,P=g[N];if(A[O]=P,g[N]=O,C<=y){var L=o-y;if((T>7e3||D>24576)&&(L>423||!h)){u=dr(n,v,0,w,B,E,m,D,q,y-q,u),D=T=m=0,q=y;for(var G=0;G<286;++G)B[G]=0;for(var G=0;G<30;++G)E[G]=0}var k=2,R=0,fr=S,j=O-P&32767;if(L>2&&N==M(y-j))for(var tr=Math.min(c,L)-1,J=Math.min(32767,y),K=Math.min(258,L);j<=J&&--fr&&O!=P;){if(n[y+k]==n[y+k-j]){for(var $=0;$<K&&n[y+$]==n[y+$-j];++$);if($>k){if(k=$,R=j,$>tr)break;for(var rr=Math.min(j,$-2),vr=0,G=0;G<rr;++G){var cr=y-j+G&32767,qr=A[cr],Lr=cr-qr&32767;Lr>vr&&(vr=Lr,P=cr)}}}O=P,P=A[O],j+=O-P&32767}if(R){w[D++]=268435456|Rr[k]<<18|Vr[R];var Tr=Rr[k]&31,Cr=Vr[R]&31;m+=xr[Tr]+zr[Cr],++B[257+Tr],++E[Cr],C=y+k,++T}else w[D++]=n[y],++B[n[y]]}}for(y=Math.max(y,C);y<o;++y)w[D++]=n[y],++B[n[y]];u=dr(n,v,h,w,B,E,m,D,q,y-q,u),h||(a.r=u&7|v[u/8|0]<<3,u-=7,a.h=g,a.p=A,a.i=y,a.w=C)}else{for(var y=a.w||0;y<o+h;y+=65535){var pr=y+65535;pr>=o&&(v[u/8|0]=h,pr=o),u=an(v,u+1,n.subarray(y,pr))}a.i=o}return d(f,0,e+Ar(u)+i)},"dflt"),Gn=(function(){for(var n=new Int32Array(256),r=0;r<256;++r){for(var t=r,e=9;--e;)t=(t&1&&-306674912)^t>>>1;n[r]=t}return n})(),Mr=s(function(){var n=-1;return{p:s(function(r){for(var t=n,e=0;e<r.length;++e)t=Gn[t&255^r[e]]^t>>>8;n=t},"p"),d:s(function(){return~n},"d")}},"crc"),jr=s(function(){var n=1,r=0;return{p:s(function(t){for(var e=n,i=r,a=t.length|0,o=0;o!=a;){for(var f=Math.min(o+2655,a);o<f;++o)i+=e+=t[o];e=(e&65535)+15*(e>>16),i=(i&65535)+15*(i>>16)}n=e,r=i},"p"),d:s(function(){return n%=65521,r%=65521,(n&255)<<24|(n&65280)<<8|(r&255)<<8|r>>8},"d")}},"adler"),ur=s(function(n,r,t,e,i){if(!i&&(i={l:1},r.dictionary)){var a=r.dictionary.subarray(-32768),o=new U(a.length+n.length);o.set(a),o.set(n,a.length),n=o,i.w=a.length}return En(n,r.level==null?6:r.level,r.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):20:12+r.mem,t,e,i)},"dopt"),Gr=s(function(n,r){var t={};for(var e in n)t[e]=n[e];for(var e in r)t[e]=r[e];return t},"mrg"),gn=s(function(n,r,t){for(var e=n(),i=n.toString(),a=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),o=0;o<e.length;++o){var f=e[o],v=a[o];if(typeof f=="function"){r+=";"+v+"=";var h=f.toString();if(f.prototype)if(h.indexOf("[native code]")!=-1){var u=h.indexOf(" ",8)+1;r+=h.slice(u,h.indexOf("(",u))}else{r+=h;for(var l in f.prototype)r+=";"+v+".prototype."+l+"="+f.prototype[l].toString()}else r+=h}else t[v]=f}return r},"wcln"),Pr=[],Xn=s(function(n){var r=[];for(var t in n)n[t].buffer&&r.push((n[t]=new n[t].constructor(n[t])).buffer);return r},"cbfs"),On=s(function(n,r,t,e){if(!Pr[t]){for(var i="",a={},o=n.length-1,f=0;f<o;++f)i=gn(n[f],i,a);Pr[t]={c:gn(n[o],i,a),e:a}}var v=Gr({},Pr[t].e);return Vn(Pr[t].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+r.toString()+"}",t,v,Xn(v),e)},"wrkr"),Sr=s(function(){return[U,Y,Br,xr,zr,Ir,en,Fn,Tn,In,Zr,Zn,X,$r,V,Hr,Ar,d,p,Er,Or,sr,on]},"bInflt"),Ur=s(function(){return[U,Y,Br,xr,zr,Ir,Rr,Vr,Dn,ir,Cn,wr,Zr,Bn,ar,X,nr,gr,Nr,kr,Xr,yr,an,dr,Ar,d,En,ur,Jr,sr]},"bDflt"),qn=s(function(){return[sn,hn,I,Mr,Gn]},"gze"),Ln=s(function(){return[fn,Hn]},"guze"),Pn=s(function(){return[un,I,jr]},"zle"),$n=s(function(){return[ln]},"zule"),sr=s(function(n){return postMessage(n,[n.buffer])},"pbf"),on=s(function(n){return n&&{out:n.size&&new U(n.size),dictionary:n.dictionary}},"gopt"),Fr=s(function(n,r,t,e,i,a){var o=On(t,e,i,function(f,v){o.terminate(),a(f,v)});return o.postMessage([n,r],r.consume?[n.buffer]:[]),function(){o.terminate()}},"cbify"),b=s(function(n){return n.ondata=function(r,t){return postMessage([r,t],[r.buffer])},function(r){r.data.length?(n.push(r.data[0],r.data[1]),postMessage([r.data[0].length])):n.flush()}},"astrm"),Dr=s(function(n,r,t,e,i,a,o){var f,v=On(n,e,i,function(h,u){h?(v.terminate(),r.ondata.call(r,h)):Array.isArray(u)?u.length==1?(r.queuedSize-=u[0],r.ondrain&&r.ondrain(u[0])):(u[1]&&v.terminate(),r.ondata.call(r,h,u[0],u[1])):o(u)});v.postMessage(t),r.queuedSize=0,r.push=function(h,u){r.ondata||p(5),f&&r.ondata(p(4,0,1),null,!!u),r.queuedSize+=h.length,v.postMessage([h,f=u],[h.buffer])},r.terminate=function(){v.terminate()},a&&(r.flush=function(){v.postMessage([])})},"astrmify"),W=s(function(n,r){return n[r]|n[r+1]<<8},"b2"),H=s(function(n,r){return(n[r]|n[r+1]<<8|n[r+2]<<16|n[r+3]<<24)>>>0},"b4"),Qr=s(function(n,r){return H(n,r)+H(n,r+4)*4294967296},"b8"),I=s(function(n,r,t){for(;t;++r)n[r]=t,t>>>=8},"wbytes"),sn=s(function(n,r){var t=r.filename;if(n[0]=31,n[1]=139,n[2]=8,n[8]=r.level<2?4:r.level==9?2:0,n[9]=3,r.mtime!=0&&I(n,4,Math.floor(new Date(r.mtime||Date.now())/1e3)),t){n[3]=8;for(var e=0;e<=t.length;++e)n[e+10]=t.charCodeAt(e)}},"gzh"),fn=s(function(n){(n[0]!=31||n[1]!=139||n[2]!=8)&&p(6,"invalid gzip data");var r=n[3],t=10;r&4&&(t+=(n[10]|n[11]<<8)+2);for(var e=(r>>3&1)+(r>>4&1);e>0;e-=!n[t++]);return t+(r&2)},"gzs"),Hn=s(function(n){var r=n.length;return(n[r-4]|n[r-3]<<8|n[r-2]<<16|n[r-1]<<24)>>>0},"gzl"),hn=s(function(n){return 10+(n.filename?n.filename.length+1:0)},"gzhl"),un=s(function(n,r){var t=r.level,e=t==0?0:t<6?1:t==9?3:2;if(n[0]=120,n[1]=e<<6|(r.dictionary&&32),n[1]|=31-(n[0]<<8|n[1])%31,r.dictionary){var i=jr();i.p(r.dictionary),I(n,2,i.d())}},"zlh"),ln=s(function(n,r){return((n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31)&&p(6,"invalid zlib data"),(n[1]>>5&1)==+!r&&p(6,"invalid zlib data: "+(n[1]&32?"need":"unexpected")+" dictionary"),(n[1]>>3&4)+2},"zls");function lr(n,r){return typeof n=="function"&&(r=n,n={}),this.ondata=r,n}s(lr,"StrmOpt");var _=(function(){function n(r,t){if(typeof r=="function"&&(t=r,r={}),this.ondata=t,this.o=r||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new U(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return s(n,"Deflate"),n.prototype.p=function(r,t){this.ondata(ur(r,this.o,0,0,this.s),t)},n.prototype.push=function(r,t){this.ondata||p(5),this.s.l&&p(4);var e=r.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new U(e&-32768);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;this.b.set(r.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(r.subarray(a),32768),this.s.z=r.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(r,this.s.z),this.s.z+=r.length;this.s.l=t&1,(this.s.z>this.s.w+8191||t)&&(this.p(this.b,t||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||p(5),this.s.l&&p(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n})();var dn=(function(){function n(r,t){Dr([Ur,function(){return[b,_]}],this,lr.call(this,r,t),function(e){var i=new _(e.data);onmessage=b(i)},6,1)}return s(n,"AsyncDeflate"),n})();function bn(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),Fr(n,r,[Ur],function(e){return sr(Jr(e.data[0],e.data[1]))},0,t)}s(bn,"deflate");function Jr(n,r){return ur(n,r||{},0,0)}s(Jr,"deflateSync");var Q=(function(){function n(r,t){typeof r=="function"&&(t=r,r={}),this.ondata=t;var e=r&&r.dictionary&&r.dictionary.subarray(-32768);this.s={i:0,b:e?e.length:0},this.o=new U(32768),this.p=new U(0),e&&this.o.set(e)}return s(n,"Inflate"),n.prototype.e=function(r){if(this.ondata||p(5),this.d&&p(4),!this.p.length)this.p=r;else if(r.length){var t=new U(this.p.length+r.length);t.set(this.p),t.set(r,this.p.length),this.p=t}},n.prototype.c=function(r){this.s.i=+(this.d=r||!1);var t=this.s.b,e=Er(this.p,this.s,this.o);this.ondata(d(e,t,this.s.b),this.d),this.o=d(e,this.s.b-32768),this.s.b=this.o.length,this.p=d(this.p,this.s.p/8|0),this.s.p&=7},n.prototype.push=function(r,t){this.e(r),this.c(t)},n})();var Nn=(function(){function n(r,t){Dr([Sr,function(){return[b,Q]}],this,lr.call(this,r,t),function(e){var i=new Q(e.data);onmessage=b(i)},7,0)}return s(n,"AsyncInflate"),n})();function Rn(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),Fr(n,r,[Sr],function(e){return sr(Or(e.data[0],on(e.data[1])))},1,t)}s(Rn,"inflate");function Or(n,r){return Er(n,{i:2},r&&r.out,r&&r.dictionary)}s(Or,"inflateSync");var yn=(function(){function n(r,t){this.c=Mr(),this.l=0,this.v=1,_.call(this,r,t)}return s(n,"Gzip"),n.prototype.push=function(r,t){this.c.p(r),this.l+=r.length,_.prototype.push.call(this,r,t)},n.prototype.p=function(r,t){var e=ur(r,this.o,this.v&&hn(this.o),t&&8,this.s);this.v&&(sn(e,this.o),this.v=0),t&&(I(e,e.length-8,this.c.d()),I(e,e.length-4,this.l)),this.ondata(e,t)},n.prototype.flush=function(){_.prototype.flush.call(this)},n})();var at=(function(){function n(r,t){Dr([Ur,qn,function(){return[b,_,yn]}],this,lr.call(this,r,t),function(e){var i=new yn(e.data);onmessage=b(i)},8,1)}return s(n,"AsyncGzip"),n})();function ot(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),Fr(n,r,[Ur,qn,function(){return[wn]}],function(e){return sr(wn(e.data[0],e.data[1]))},2,t)}s(ot,"gzip");function wn(n,r){r||(r={});var t=Mr(),e=n.length;t.p(n);var i=ur(n,r,hn(r),8),a=i.length;return sn(i,r),I(i,a-8,t.d()),I(i,a-4,e),i}s(wn,"gzipSync");var br=(function(){function n(r,t){this.v=1,this.r=0,Q.call(this,r,t)}return s(n,"Gunzip"),n.prototype.push=function(r,t){if(Q.prototype.e.call(this,r),this.r+=r.length,this.v){var e=this.p.subarray(this.v-1),i=e.length>3?fn(e):4;if(i>e.length){if(!t)return}else this.v>1&&this.onmember&&this.onmember(this.r-e.length);this.p=e.subarray(i),this.v=0}Q.prototype.c.call(this,t),this.s.f&&!this.s.l&&!t&&(this.v=Ar(this.s.p)+9,this.s={i:0},this.o=new U(0),this.push(new U(0),t))},n})();var _n=(function(){function n(r,t){var e=this;Dr([Sr,Ln,function(){return[b,Q,br]}],this,lr.call(this,r,t),function(i){var a=new br(i.data);a.onmember=function(o){return postMessage(o)},onmessage=b(a)},9,0,function(i){return e.onmember&&e.onmember(i)})}return s(n,"AsyncGunzip"),n})();function rt(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),Fr(n,r,[Sr,Ln,function(){return[_r]}],function(e){return sr(_r(e.data[0],e.data[1]))},3,t)}s(rt,"gunzip");function _r(n,r){var t=fn(n);return t+8>n.length&&p(6,"invalid gzip data"),Er(n.subarray(t,-8),{i:2},r&&r.out||new U(Hn(n)),r&&r.dictionary)}s(_r,"gunzipSync");var mn=(function(){function n(r,t){this.c=jr(),this.v=1,_.call(this,r,t)}return s(n,"Zlib"),n.prototype.push=function(r,t){this.c.p(r),_.prototype.push.call(this,r,t)},n.prototype.p=function(r,t){var e=ur(r,this.o,this.v&&(this.o.dictionary?6:2),t&&4,this.s);this.v&&(un(e,this.o),this.v=0),t&&I(e,e.length-4,this.c.d()),this.ondata(e,t)},n.prototype.flush=function(){_.prototype.flush.call(this)},n})();var st=(function(){function n(r,t){Dr([Ur,Pn,function(){return[b,_,mn]}],this,lr.call(this,r,t),function(e){var i=new mn(e.data);onmessage=b(i)},10,1)}return s(n,"AsyncZlib"),n})();function ft(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),Fr(n,r,[Ur,Pn,function(){return[xn]}],function(e){return sr(xn(e.data[0],e.data[1]))},4,t)}s(ft,"zlib");function xn(n,r){r||(r={});var t=jr();t.p(n);var e=ur(n,r,r.dictionary?6:2,4);return un(e,r),I(e,e.length-4,t.d()),e}s(xn,"zlibSync");var rn=(function(){function n(r,t){Q.call(this,r,t),this.v=r&&r.dictionary?2:1}return s(n,"Unzlib"),n.prototype.push=function(r,t){if(Q.prototype.e.call(this,r),this.v){if(this.p.length<6&&!t)return;this.p=this.p.subarray(ln(this.p,this.v-1)),this.v=0}t&&(this.p.length<4&&p(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Q.prototype.c.call(this,t)},n})();var nt=(function(){function n(r,t){Dr([Sr,$n,function(){return[b,Q,rn]}],this,lr.call(this,r,t),function(e){var i=new rn(e.data);onmessage=b(i)},11,0)}return s(n,"AsyncUnzlib"),n})();function tt(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),Fr(n,r,[Sr,$n,function(){return[nn]}],function(e){return sr(nn(e.data[0],on(e.data[1])))},5,t)}s(tt,"unzlib");function nn(n,r){return Er(n.subarray(ln(n,r&&r.dictionary),-4),{i:2},r&&r.out,r&&r.dictionary)}s(nn,"unzlibSync");var zn=(function(){function n(r,t){this.o=lr.call(this,r,t)||{},this.G=br,this.I=Q,this.Z=rn}return s(n,"Decompress"),n.prototype.i=function(){var r=this;this.s.ondata=function(t,e){r.ondata(t,e)}},n.prototype.push=function(r,t){if(this.ondata||p(5),this.s)this.s.push(r,t);else{if(this.p&&this.p.length){var e=new U(this.p.length+r.length);e.set(this.p),e.set(r,this.p.length)}else this.p=r;this.p.length>2&&(this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(this.o):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,t),this.p=null)}},n})();var ht=(function(){function n(r,t){zn.call(this,r,t),this.queuedSize=0,this.G=_n,this.I=Nn,this.Z=nt}return s(n,"AsyncDecompress"),n.prototype.i=function(){var r=this;this.s.ondata=function(t,e,i){r.ondata(t,e,i)},this.s.ondrain=function(t){r.queuedSize-=t,r.ondrain&&r.ondrain(t)}},n.prototype.push=function(r,t){this.queuedSize+=r.length,zn.prototype.push.call(this,r,t)},n})();function ut(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),n[0]==31&&n[1]==139&&n[2]==8?rt(n,r,t):(n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31?Rn(n,r,t):tt(n,r,t)}s(ut,"decompress");function lt(n,r){return n[0]==31&&n[1]==139&&n[2]==8?_r(n,r):(n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31?Or(n,r):nn(n,r)}s(lt,"decompressSync");var vn=s(function(n,r,t,e){for(var i in n){var a=n[i],o=r+i,f=e;Array.isArray(a)&&(f=Gr(e,a[1]),a=a[0]),a instanceof U?t[o]=[a,f]:(t[o+="/"]=[new U(0),f],vn(a,o,t,e))}},"fltn"),An=typeof TextEncoder<"u"&&new TextEncoder,tn=typeof TextDecoder<"u"&&new TextDecoder,kn=0;try{tn.decode(ar,{stream:!0}),kn=1}catch{}var Wn=s(function(n){for(var r="",t=0;;){var e=n[t++],i=(e>127)+(e>223)+(e>239);if(t+i>n.length)return{s:r,r:d(n,t-1)};i?i==3?(e=((e&15)<<18|(n[t++]&63)<<12|(n[t++]&63)<<6|n[t++]&63)-65536,r+=String.fromCharCode(55296|e>>10,56320|e&1023)):i&1?r+=String.fromCharCode((e&31)<<6|n[t++]&63):r+=String.fromCharCode((e&15)<<12|(n[t++]&63)<<6|n[t++]&63):r+=String.fromCharCode(e)}},"dutf8"),vt=(function(){function n(r){this.ondata=r,kn?this.t=new TextDecoder:this.p=ar}return s(n,"DecodeUTF8"),n.prototype.push=function(r,t){if(this.ondata||p(5),t=!!t,this.t){this.ondata(this.t.decode(r,{stream:!0}),t),t&&(this.t.decode().length&&p(8),this.t=null);return}this.p||p(4);var e=new U(this.p.length+r.length);e.set(this.p),e.set(r,this.p.length);var i=Wn(e),a=i.s,o=i.r;t?(o.length&&p(8),this.p=null):this.p=o,this.ondata(a,t)},n})();var ct=(function(){function n(r){this.ondata=r}return s(n,"EncodeUTF8"),n.prototype.push=function(r,t){this.ondata||p(5),this.d&&p(4),this.ondata(hr(r),this.d=t||!1)},n})();function hr(n,r){if(r){for(var t=new U(n.length),e=0;e<n.length;++e)t[e]=n.charCodeAt(e);return t}if(An)return An.encode(n);for(var i=n.length,a=new U(n.length+(n.length>>1)),o=0,f=s(function(u){a[o++]=u},"w"),e=0;e<i;++e){if(o+5>a.length){var v=new U(o+8+(i-e<<1));v.set(a),a=v}var h=n.charCodeAt(e);h<128||r?f(h):h<2048?(f(192|h>>6),f(128|h&63)):h>55295&&h<57344?(h=65536+(h&1047552)|n.charCodeAt(++e)&1023,f(240|h>>18),f(128|h>>12&63),f(128|h>>6&63),f(128|h&63)):(f(224|h>>12),f(128|h>>6&63),f(128|h&63))}return d(a,0,o)}s(hr,"strToU8");function Yn(n,r){if(r){for(var t="",e=0;e<n.length;e+=16384)t+=String.fromCharCode.apply(null,n.subarray(e,e+16384));return t}else{if(tn)return tn.decode(n);var i=Wn(n),a=i.s,t=i.r;return t.length&&p(8),a}}s(Yn,"strFromU8");var jn=s(function(n){return n==1?3:n<6?2:n==9?1:0},"dbf"),Jn=s(function(n,r){return r+30+W(n,r+26)+W(n,r+28)},"slzh"),Kn=s(function(n,r,t){var e=W(n,r+28),i=Yn(n.subarray(r+46,r+46+e),!(W(n,r+8)&2048)),a=r+46+e,o=H(n,r+20),f=t&&o==4294967295?Qn(n,a):[o,H(n,r+24),H(n,r+42)],v=f[0],h=f[1],u=f[2];return[W(n,r+10),v,h,i,a+W(n,r+30)+W(n,r+32),u]},"zh"),Qn=s(function(n,r){for(;W(n,r)!=1;r+=4+W(n,r+2));return[Qr(n,r+12),Qr(n,r+4),Qr(n,r+20)]},"z64e"),or=s(function(n){var r=0;if(n)for(var t in n){var e=n[t].length;e>65535&&p(9),r+=e+4}return r},"exfl"),mr=s(function(n,r,t,e,i,a,o,f){var v=e.length,h=t.extra,u=f&&f.length,l=or(h);I(n,r,o!=null?33639248:67324752),r+=4,o!=null&&(n[r++]=20,n[r++]=t.os),n[r]=20,r+=2,n[r++]=t.flag<<1|(a<0&&8),n[r++]=i&&8,n[r++]=t.compression&255,n[r++]=t.compression>>8;var c=new Date(t.mtime==null?Date.now():t.mtime),S=c.getFullYear()-1980;if((S<0||S>119)&&p(10),I(n,r,S<<25|c.getMonth()+1<<21|c.getDate()<<16|c.getHours()<<11|c.getMinutes()<<5|c.getSeconds()>>1),r+=4,a!=-1&&(I(n,r,t.crc),I(n,r+4,a<0?-a-2:a),I(n,r+8,t.size)),I(n,r+12,v),I(n,r+14,l),r+=16,o!=null&&(I(n,r,u),I(n,r+6,t.attrs),I(n,r+10,o),r+=14),n.set(e,r),r+=v,l)for(var x in h){var A=h[x],g=A.length;I(n,r,+x),I(n,r+2,g),n.set(A,r+4),r+=4+g}return u&&(n.set(f,r),r+=u),r},"wzh"),cn=s(function(n,r,t,e,i){I(n,r,101010256),I(n,r+8,t),I(n,r+10,t),I(n,r+12,e),I(n,r+16,i)},"wzf"),Wr=(function(){function n(r){this.filename=r,this.c=Mr(),this.size=0,this.compression=0}return s(n,"ZipPassThrough"),n.prototype.process=function(r,t){this.ondata(null,r,t)},n.prototype.push=function(r,t){this.ondata||p(5),this.c.p(r),this.size+=r.length,t&&(this.crc=this.c.d()),this.process(r,t||!1)},n})();var pt=(function(){function n(r,t){var e=this;t||(t={}),Wr.call(this,r),this.d=new _(t,function(i,a){e.ondata(null,i,a)}),this.compression=8,this.flag=jn(t.level)}return s(n,"ZipDeflate"),n.prototype.process=function(r,t){try{this.d.push(r,t)}catch(e){this.ondata(e,null,t)}},n.prototype.push=function(r,t){Wr.prototype.push.call(this,r,t)},n})();var gt=(function(){function n(r,t){var e=this;t||(t={}),Wr.call(this,r),this.d=new dn(t,function(i,a,o){e.ondata(i,a,o)}),this.compression=8,this.flag=jn(t.level),this.terminate=this.d.terminate}return s(n,"AsyncZipDeflate"),n.prototype.process=function(r,t){this.d.push(r,t)},n.prototype.push=function(r,t){Wr.prototype.push.call(this,r,t)},n})();var yt=(function(){function n(r){this.ondata=r,this.u=[],this.d=1}return s(n,"Zip"),n.prototype.add=function(r){var t=this;if(this.ondata||p(5),this.d&2)this.ondata(p(4+(this.d&1)*8,0,1),null,!1);else{var e=hr(r.filename),i=e.length,a=r.comment,o=a&&hr(a),f=i!=r.filename.length||o&&a.length!=o.length,v=i+or(r.extra)+30;i>65535&&this.ondata(p(11,0,1),null,!1);var h=new U(v);mr(h,0,r,e,f,-1);var u=[h],l=s(function(){for(var g=0,z=u;g<z.length;g++){var F=z[g];t.ondata(null,F,!1)}u=[]},"pAll_1"),c=this.d;this.d=0;var S=this.u.length,x=Gr(r,{f:e,u:f,o,t:s(function(){r.terminate&&r.terminate()},"t"),r:s(function(){if(l(),c){var g=t.u[S+1];g?g.r():t.d=1}c=1},"r")}),A=0;r.ondata=function(g,z,F){if(g)t.ondata(g,z,F),t.terminate();else if(A+=z.length,u.push(z),F){var M=new U(16);I(M,0,134695760),I(M,4,r.crc),I(M,8,A),I(M,12,r.size),u.push(M),x.c=A,x.b=v+A+16,x.crc=r.crc,x.size=r.size,c&&x.r(),c=1}else c&&l()},this.u.push(x)}},n.prototype.end=function(){var r=this;if(this.d&2){this.ondata(p(4+(this.d&1)*8,0,1),null,!0);return}this.d?this.e():this.u.push({r:s(function(){r.d&1&&(r.u.splice(-1,1),r.e())},"r"),t:s(function(){},"t")}),this.d=3},n.prototype.e=function(){for(var r=0,t=0,e=0,i=0,a=this.u;i<a.length;i++){var o=a[i];e+=46+o.f.length+or(o.extra)+(o.o?o.o.length:0)}for(var f=new U(e+22),v=0,h=this.u;v<h.length;v++){var o=h[v];mr(f,r,o,o.f,o.u,-o.c-2,t,o.o),r+=46+o.f.length+or(o.extra)+(o.o?o.o.length:0),t+=o.b}cn(f,r,this.u.length,e,t),this.ondata(null,f,!0),this.d=2},n.prototype.terminate=function(){for(var r=0,t=this.u;r<t.length;r++){var e=t[r];e.t()}this.d=2},n})();function wt(n,r,t){t||(t=r,r={}),typeof t!="function"&&p(7);var e={};vn(n,"",e,r);var i=Object.keys(e),a=i.length,o=0,f=0,v=a,h=new Array(a),u=[],l=s(function(){for(var g=0;g<u.length;++g)u[g]()},"tAll"),c=s(function(g,z){Yr(function(){t(g,z)})},"cbd");Yr(function(){c=t});var S=s(function(){var g=new U(f+22),z=o,F=f-o;f=0;for(var M=0;M<v;++M){var w=h[M];try{var B=w.c.length;mr(g,f,w,w.f,w.u,B);var E=30+w.f.length+or(w.extra),T=f+E;g.set(w.c,T),mr(g,o,w,w.f,w.u,B,f,w.m),o+=16+E+(w.m?w.m.length:0),f=T+B}catch(m){return c(m,null)}}cn(g,o,h.length,F,z),c(null,g)},"cbf");a||S();for(var x=s(function(g){var z=i[g],F=e[z],M=F[0],w=F[1],B=Mr(),E=M.length;B.p(M);var T=hr(z),m=T.length,y=w.comment,D=y&&hr(y),C=D&&D.length,q=or(w.extra),N=w.level==0?0:8,O=s(function(P,L){if(P)l(),c(P,null);else{var G=L.length;h[g]=Gr(w,{size:E,crc:B.d(),c:L,f:T,m:D,u:m!=z.length||D&&y.length!=C,compression:N}),o+=30+m+q+G,f+=76+2*(m+q)+(C||0)+G,--a||S()}},"cbl");if(m>65535&&O(p(11,0,1),null),!N)O(null,M);else if(E<16e4)try{O(null,Jr(M,w))}catch(P){O(P,null)}else u.push(bn(M,w,O))},"_loop_1"),A=0;A<v;++A)x(A);return l}s(wt,"zip");function mt(n,r){r||(r={});var t={},e=[];vn(n,"",t,r);var i=0,a=0;for(var o in t){var f=t[o],v=f[0],h=f[1],u=h.level==0?0:8,l=hr(o),c=l.length,S=h.comment,x=S&&hr(S),A=x&&x.length,g=or(h.extra);c>65535&&p(11);var z=u?Jr(v,h):v,F=z.length,M=Mr();M.p(v),e.push(Gr(h,{size:v.length,crc:M.d(),c:z,f:l,m:x,u:c!=o.length||x&&S.length!=A,o:i,compression:u})),i+=30+c+g+F,a+=76+2*(c+g)+(A||0)+F}for(var w=new U(a+22),B=i,E=a-i,T=0;T<e.length;++T){var l=e[T];mr(w,l.o,l,l.f,l.u,l.c.length);var m=30+l.f.length+or(l.extra);w.set(l.c,l.o+m),mr(w,i,l,l.f,l.u,l.c.length,l.o,l.m),i+=16+m+(l.m?l.m.length:0)}return cn(w,i,e.length,E,B),w}s(mt,"zipSync");var et=(function(){function n(){}return s(n,"UnzipPassThrough"),n.prototype.push=function(r,t){this.ondata(null,r,t)},n.compression=0,n})();var xt=(function(){function n(){var r=this;this.i=new Q(function(t,e){r.ondata(null,t,e)})}return s(n,"UnzipInflate"),n.prototype.push=function(r,t){try{this.i.push(r,t)}catch(e){this.ondata(e,null,t)}},n.compression=8,n})();var zt=(function(){function n(r,t){var e=this;t<32e4?this.i=new Q(function(i,a){e.ondata(null,i,a)}):(this.i=new Nn(function(i,a,o){e.ondata(i,a,o)}),this.terminate=this.i.terminate)}return s(n,"AsyncUnzipInflate"),n.prototype.push=function(r,t){this.i.terminate&&(r=d(r,0)),this.i.push(r,t)},n.compression=8,n})();var At=(function(){function n(r){this.onfile=r,this.k=[],this.o={0:et},this.p=ar}return s(n,"Unzip"),n.prototype.push=function(r,t){var e=this;if(this.onfile||p(5),this.p||p(4),this.c>0){var i=Math.min(this.c,r.length),a=r.subarray(0,i);if(this.c-=i,this.d?this.d.push(a,!this.c):this.k[0].push(a),r=r.subarray(i),r.length)return this.push(r,t)}else{var o=0,f=0,v=void 0,h=void 0;this.p.length?r.length?(h=new U(this.p.length+r.length),h.set(this.p),h.set(r,this.p.length)):h=this.p:h=r;for(var u=h.length,l=this.c,c=l&&this.d,S=s(function(){var z,F=H(h,f);if(F==67324752){o=1,v=f,x.d=null,x.c=0;var M=W(h,f+6),w=W(h,f+8),B=M&2048,E=M&8,T=W(h,f+26),m=W(h,f+28);if(u>f+30+T+m){var y=[];x.k.unshift(y),o=2;var D=H(h,f+18),C=H(h,f+22),q=Yn(h.subarray(f+30,f+=30+T),!B);D==4294967295?(z=E?[-2]:Qn(h,f),D=z[0],C=z[1]):E&&(D=-1),f+=m,x.c=D;var N,O={name:q,compression:w,start:s(function(){if(O.ondata||p(5),!D)O.ondata(null,ar,!0);else{var P=e.o[w];P||O.ondata(p(14,"unknown compression type "+w,1),null,!1),N=D<0?new P(q):new P(q,D,C),N.ondata=function(R,fr,j){O.ondata(R,fr,j)};for(var L=0,G=y;L<G.length;L++){var k=G[L];N.push(k,!1)}e.k[0]==y&&e.c?e.d=N:N.push(ar,!0)}},"start"),terminate:s(function(){N&&N.terminate&&N.terminate()},"terminate")};D>=0&&(O.size=D,O.originalSize=C),x.onfile(O)}return"break"}else if(l){if(F==134695760)return v=f+=12+(l==-2&&8),o=3,x.c=0,"break";if(F==33639248)return v=f-=4,o=3,x.c=0,"break"}},"_loop_2"),x=this;f<u-4;++f){var A=S();if(A==="break")break}if(this.p=ar,l<0){var g=o?h.subarray(0,v-12-(l==-2&&8)-(H(h,v-16)==134695760&&4)):h.subarray(0,f);c?c.push(g,!!o):this.k[+(o==2)].push(g)}if(o&2)return this.push(h.subarray(f),t);this.p=h.subarray(f)}t&&(this.c&&p(13),this.p=null)},n.prototype.register=function(r){this.o[r.compression]=r},n})();var Yr=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(n){n()};function Mt(n,r,t){t||(t=r,r={}),typeof t!="function"&&p(7);var e=[],i=s(function(){for(var g=0;g<e.length;++g)e[g]()},"tAll"),a={},o=s(function(g,z){Yr(function(){t(g,z)})},"cbd");Yr(function(){o=t});for(var f=n.length-22;H(n,f)!=101010256;--f)if(!f||n.length-f>65558)return o(p(13,0,1),null),i;var v=W(n,f+8);if(v){var h=v,u=H(n,f+16),l=u==4294967295||h==65535;if(l){var c=H(n,f-12);l=H(n,c)==101075792,l&&(h=v=H(n,c+32),u=H(n,c+48))}for(var S=r&&r.filter,x=s(function(g){var z=Kn(n,u,l),F=z[0],M=z[1],w=z[2],B=z[3],E=z[4],T=z[5],m=Jn(n,T);u=E;var y=s(function(C,q){C?(i(),o(C,null)):(q&&(a[B]=q),--v||o(null,a))},"cbl");if(!S||S({name:B,size:M,originalSize:w,compression:F}))if(!F)y(null,d(n,m,m+M));else if(F==8){var D=n.subarray(m,m+M);if(w<524288||M>.8*w)try{y(null,Or(D,{out:new U(w)}))}catch(C){y(C,null)}else e.push(Rn(D,{size:w},y))}else y(p(14,"unknown compression type "+F,1),null);else y(null,null)},"_loop_3"),A=0;A<h;++A)x(A)}else o(null,{});return i}s(Mt,"unzip");function St(n,r){for(var t={},e=n.length-22;H(n,e)!=101010256;--e)(!e||n.length-e>65558)&&p(13);var i=W(n,e+8);if(!i)return{};var a=H(n,e+16),o=a==4294967295||i==65535;if(o){var f=H(n,e-12);o=H(n,f)==101075792,o&&(i=H(n,f+32),a=H(n,f+48))}for(var v=r&&r.filter,h=0;h<i;++h){var u=Kn(n,a,o),l=u[0],c=u[1],S=u[2],x=u[3],A=u[4],g=u[5],z=Jn(n,g);a=A,(!v||v({name:x,size:c,originalSize:S,compression:l}))&&(l?l==8?t[x]=Or(n.subarray(z,z+c),{out:new U(S)}):p(14,"unknown compression type "+l):t[x]=d(n,z,z+c))}return t}s(St,"unzipSync");export{at as AsyncCompress,ht as AsyncDecompress,dn as AsyncDeflate,_n as AsyncGunzip,at as AsyncGzip,Nn as AsyncInflate,zt as AsyncUnzipInflate,nt as AsyncUnzlib,gt as AsyncZipDeflate,st as AsyncZlib,yn as Compress,vt as DecodeUTF8,zn as Decompress,_ as Deflate,ct as EncodeUTF8,it as FlateErrorCode,br as Gunzip,yn as Gzip,Q as Inflate,At as Unzip,xt as UnzipInflate,et as UnzipPassThrough,rn as Unzlib,yt as Zip,pt as ZipDeflate,Wr as ZipPassThrough,mn as Zlib,ot as compress,wn as compressSync,ut as decompress,lt as decompressSync,bn as deflate,Jr as deflateSync,rt as gunzip,_r as gunzipSync,ot as gzip,wn as gzipSync,Rn as inflate,Or as inflateSync,Yn as strFromU8,hr as strToU8,Mt as unzip,St as unzipSync,tt as unzlib,nn as unzlibSync,wt as zip,mt as zipSync,ft as zlib,xn as zlibSync};
@@ -1 +0,0 @@
1
- import{a as r}from"./chunk-XUSV3KOD.js";var n=class extends Error{static{r(this,"EverframeNotMountedError")}name="EverframeNotMountedError";constructor(o){super(o??"EverframeProvider is not mounted; wrap your app root.")}};var t=null;function a(e){t=e}r(a,"__setCurrentContext");function d(){return t}r(d,"__getCurrentContext");function p(){let e=t;return e?e.open():Promise.reject(new n("EverframeProvider not mounted; wrap your root with <EverframeProvider>."))}r(p,"open");function c(e){t?.setExtra(e)}r(c,"setExtra");function v(e){t?.addBreadcrumb(e)}r(v,"addBreadcrumb");function x(e,o){o!==void 0?t?.recordScreen(e,o):t?.recordScreen(e)}r(x,"recordScreen");function m(e){t?.setUser(e)}r(m,"setUser");function f(e,o){t?.captureException(e,o)}r(f,"captureException");export{n as a,a as b,d as c,p as d,c as e,v as f,x as g,m as h,f as i};