@nodatachat/mcp 1.3.19 → 1.3.20

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/README.md CHANGED
@@ -148,13 +148,15 @@ The one-sentence version: **encrypt locally, send, revoke later, prove what happ
148
148
 
149
149
  ## This machine as a Capsule node
150
150
 
151
- `nodata_node` registers the machine as a node of your organisation's Capsule fleet, after you approve it once. It uses the same enrolment and signed heartbeat as the installed Capsule agent.
151
+ A computer connected to your organisation joins its Capsule fleet as a node by itself, a few seconds after NoData starts. The admin's approval of that computer is the consent, and `NODATA_NO_NODE=1` turns this off. `nodata_node` shows the node's status, and retries the registration if it failed. It uses the same enrolment and signed heartbeat as the installed Capsule agent.
152
152
 
153
153
  - **Capsule = node:** one per machine.
154
154
  - **Agent = workload:** Claude Code, Cursor or a bot running on that node.
155
155
  - **Billing = decisions:** a node is not a billing unit.
156
156
 
157
- While an agent runs, a heartbeat every 5 minutes reports the host name, the agents' names, whether the read gate is on, and the accepted terms version. It never reports content, and the organisation can see and pause the node. The status line shows `node ✓ 2m` when NoData last verified it.
157
+ Your organisation can require the read gate on a machine, in ask or block mode, and a minimum NoData version. It sets this on its Capsule page, and NoData applies it at the machine's next check-in. If someone turns the gate off, NoData turns it back on.
158
+
159
+ While an agent runs, a heartbeat every 5 minutes reports the NoData version, a machine id (a salted hash; the host name never leaves the computer), the agents' names, whether the read gate is on, and the accepted terms version. It never reports content, and the organisation can see and pause the node. The status line shows `node ✓ 2m` when NoData last verified it.
158
160
 
159
161
  ## Run with your secrets — the agent never sees them
160
162
 
package/dist/gate.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @nodatachat/mcp 1.3.19 | Copyright 2026 Capsule Ltd. | FSL-1.1-ALv2 | see LICENSE.md */
1
+ /*! @nodatachat/mcp 1.3.20 | Copyright 2026 Capsule Ltd. | FSL-1.1-ALv2 | see LICENSE.md */
2
2
  import{appendFileSync as yi,copyFileSync as Vr,existsSync as bi,mkdirSync as _i,readFileSync as ki,statSync as xt,writeFileSync as Xr}from"node:fs";import{homedir as Fe}from"node:os";import{basename as Ne,extname as wt,isAbsolute as He,join as Le,resolve as Oe}from"node:path";var v={text:[],header:[],secrets:[],table:null};function he(e){e.table&&(v.table=e.table);for(let t of e.text??[])v.text.some(i=>i.kind===t.kind)||v.text.push(t);e.header&&!v.header.includes(e.header)&&v.header.push(e.header);for(let t of e.secrets??[])v.secrets.some(i=>i.id===t.id)||v.secrets.push(t)}function me(){return v.text}function Ue(){return v.header}function C(){return v.table}function We(){return v.secrets}var U=[{id:"aws-access-key",name:"AWS Access Key",pattern:/(?:^|[^A-Z0-9])AKIA[A-Z2-7]{16}(?:[^A-Z2-7]|$)/,severity:"critical"},{id:"aws-secret-key",name:"AWS Secret Key",pattern:/(?:aws_secret_access_key|aws_secret_key|secret_access_key)\s*[=:]\s*['"]?[A-Za-z0-9/+=]{40}['"]?/,severity:"critical"},{id:"gcp-api-key",name:"GCP API Key",pattern:/AIza[0-9A-Za-z_-]{35}/,severity:"critical"},{id:"gcp-service-account",name:"GCP Service Account",pattern:/"type"\s*:\s*"service_account"/,severity:"critical"},{id:"github-token",name:"GitHub Token",pattern:/gh[pousr]_[0-9a-zA-Z]{36,}/,severity:"critical"},{id:"github-fine-grained",name:"GitHub Fine-Grained Token",pattern:/github_pat_[0-9a-zA-Z_]{22,}/,severity:"critical"},{id:"gitlab-token",name:"GitLab Token",pattern:/glpat-[0-9a-zA-Z_-]{20,}/,severity:"critical"},{id:"stripe-secret",name:"Stripe Secret Key",pattern:/sk_live_[0-9a-zA-Z]{24,}/,severity:"critical"},{id:"stripe-restricted",name:"Stripe Restricted Key",pattern:/rk_live_[0-9a-zA-Z]{24,}/,severity:"critical"},{id:"slack-token",name:"Slack Token",pattern:/xox[baprs]-[0-9a-zA-Z-]{10,}/,severity:"high"},{id:"slack-webhook",name:"Slack Webhook",pattern:/hooks\.slack\.com\/services\/T[0-9A-Z]{8,}\/B[0-9A-Z]{8,}\/[0-9a-zA-Z]{24}/,severity:"high"},{id:"twilio-api-key",name:"Twilio API Key",pattern:/SK[0-9a-fA-F]{32}/,severity:"high"},{id:"sendgrid-api-key",name:"SendGrid API Key",pattern:/SG\.[0-9a-zA-Z_-]{22}\.[0-9a-zA-Z_-]{43}/,severity:"critical"},{id:"postgres-uri",name:"PostgreSQL Connection String",pattern:/postgres(?:ql)?:\/\/[^\s'"]{10,}/,severity:"critical"},{id:"mongodb-uri",name:"MongoDB Connection String",pattern:/mongodb(?:\+srv)?:\/\/[^\s'"]{10,}/,severity:"critical"},{id:"redis-uri",name:"Redis Connection String",pattern:/redis(?:s)?:\/\/[^\s'"]{10,}/,severity:"high"},{id:"openai-key",name:"OpenAI API Key",pattern:/sk-[0-9a-zA-Z]{20,}T3BlbkFJ[0-9a-zA-Z]{20,}/,severity:"critical"},{id:"openai-project-key",name:"OpenAI API Key",pattern:/sk-(?:proj|svcacct|admin)-[0-9A-Za-z_-]{40,}/,severity:"critical"},{id:"anthropic-key",name:"Anthropic API Key",pattern:/sk-ant-[0-9a-zA-Z_-]{40,}/,severity:"critical"},{id:"firebase-key",name:"Firebase API Key",pattern:/AIza[0-9A-Za-z_-]{35}/,severity:"high"},{id:"supabase-key",name:"Supabase Service Key",pattern:/eyJ[0-9a-zA-Z_-]{100,}/,severity:"critical"},{id:"supabase-access-token",name:"Supabase Access Token",pattern:/\bsbp_[0-9a-f]{40}\b/,severity:"critical"},{id:"supabase-secret-key",name:"Supabase Secret Key",pattern:/\bsb_secret_[0-9A-Za-z_-]{20,}/,severity:"critical"},{id:"private-key",name:"Private Key",pattern:/-----BEGIN (?:RSA |EC |DSA |OPENSSH )?PRIVATE KEY-----/,severity:"critical"},{id:"jwt-secret",name:"JWT/Generic Secret",pattern:/(?:jwt_secret|JWT_SECRET|secret_key|SECRET_KEY|api_secret|API_SECRET)\s*[=:]\s*['"][^'"]{8,}['"]/,severity:"high"},{id:"password-in-code",name:"Password in Code",pattern:/(?:password|passwd|pwd)\s*[=:]\s*['"][^'"]{8,}['"]/,severity:"high"},{id:"bearer-token",name:"Bearer Token in Code",pattern:/['"]Bearer\s+[0-9a-zA-Z._-]{20,}['"]/,severity:"high"}];function P(){let e=We().filter(t=>!U.some(i=>i.id===t.id));return[...U,...e]}var Mt=[{pattern:/^(full_?name|first_?name|last_?name|spouse_?name|beneficiary_?name)$/i,type:"name",label:"Person name"},{pattern:/^(email|e_?mail|email_?address)$/i,type:"email",label:"Email address"},{pattern:/^(phone|mobile|telephone|phone_?number|cell_?phone)$/i,type:"phone",label:"Phone number"},{pattern:/^(id_?number|identity|ssn|social_?security|national_?id|teudat_?zehut)$/i,type:"id",label:"ID number"},{pattern:/^(address|street_?address|home_?address)$/i,type:"address",label:"Address"},{pattern:/^(date_?of_?birth|dob|birth_?date|birthday)$/i,type:"dob",label:"Date of birth"},{pattern:/^(bank_?account|iban|account_?number|bank_?details|routing_?number)$/i,type:"financial",label:"Bank account"},{pattern:/^(credit_?card|card_?number|cvv|cc_?number)$/i,type:"financial",label:"Credit card"},{pattern:/^(salary|income|commission|premium|compensation)$/i,type:"financial",label:"Salary / income"},{pattern:/^(medical_?info|health_?conditions|diagnosis|medication|prescription)$/i,type:"medical",label:"Medical"},{pattern:/^(passport|passport_?number|passport_?id)$/i,type:"id",label:"Passport"},{pattern:/^(driver_?license|drivers_?license|dl_?number)$/i,type:"id",label:"Driver license"},{pattern:/^(tax_?id|tin|vat_?number|ein)$/i,type:"financial",label:"Tax ID"},{pattern:/^(insurance_?number|policy_?number|member_?id)$/i,type:"id",label:"Insurance/Policy"},{pattern:/^(biometric|fingerprint|face_?id|retina)$/i,type:"biometric",label:"Biometric"},{pattern:/^(latitude|longitude|lat|lng|geo_?location|coordinates)$/i,type:"location",label:"Geolocation"}],zt=[{pattern:/^(?:שם|שם_מלא|שם פרטי|שם_פרטי|שם משפחה|שם_משפחה|שם הלקוח|שם בן זוג|שם המבוטח|שם המוטב|שם הילד|שם הקטין)$/i,type:"name",label:"\u05E9\u05DD \u05D0\u05D3\u05DD"},{pattern:/^(?:ת"ז|ת\.ז|ת ז|תז|תעודת זהות|תעודת_זהות|מספר זהות|מס' זהות|teudat_zehut|tz|israeli_id|il_id)$/i,type:"id",label:"\u05EA\u05E2\u05D5\u05D3\u05EA \u05D6\u05D4\u05D5\u05EA"},{pattern:/^(?:דרכון|מספר דרכון|רישיון נהיגה|רישיון_נהיגה|רשיון נהיגה)$/i,type:"id",label:"\u05D3\u05E8\u05DB\u05D5\u05DF/\u05E8\u05D9\u05E9\u05D9\u05D5\u05DF"},{pattern:/^(?:מייל|דוא"ל|דוא_ל|דואר אלקטרוני|אימייל|כתובת מייל)$/i,type:"email",label:"\u05D3\u05D5\u05D0\u05E8 \u05D0\u05DC\u05E7\u05D8\u05E8\u05D5\u05E0\u05D9"},{pattern:/^(?:טלפון|טל'|נייד|פלאפון|סלולרי|מספר טלפון|טלפון נייד)$/i,type:"phone",label:"\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF"},{pattern:/^(?:כתובת|כתובת מגורים|רחוב|מס בית|עיר|ישוב|יישוב|מיקוד|כתובת מלאה|מען)$/i,type:"address",label:"\u05DB\u05EA\u05D5\u05D1\u05EA"},{pattern:/^(?:תאריך לידה|ת לידה|תאריך הולדת|יום הולדת|גיל)$/i,type:"dob",label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05DC\u05D9\u05D3\u05D4"},{pattern:/^(?:חשבון בנק|מספר חשבון|מס חשבון|סניף|iban|iban_il)$/i,type:"financial",label:"\u05D7\u05E9\u05D1\u05D5\u05DF \u05D1\u05E0\u05E7"},{pattern:/^(?:כרטיס אשראי|מספר אשראי|cvv|אשראי)$/i,type:"financial",label:"\u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9"},{pattern:/^(?:שכר|משכורת|הכנסה|פרמיה|שכר ברוטו|שכר נטו|תגמול|בונוס|פיצוי)$/i,type:"financial",label:"\u05E9\u05DB\u05E8/\u05D4\u05DB\u05E0\u05E1\u05D4"},{pattern:/^(?:אבחון|אבחנה|מחלה|תרופה|מרשם|בדיקה רפואית|מצב רפואי|חיסון|רגישות|אלרגיה|סוג דם)$/i,type:"medical",label:"\u05DE\u05D9\u05D3\u05E2 \u05E8\u05E4\u05D5\u05D0\u05D9"},{pattern:/^(?:מספר פוליסה|מס פוליסה|פוליסה|מספר חבר|מספר ביטוח)$/i,type:"id",label:"\u05E4\u05D5\u05DC\u05D9\u05E1\u05D4/\u05D7\u05D1\u05E8\u05D5\u05EA"},{pattern:/^(?:שם הילד|תעודת זהות של ילד|ילדים|קטין|מספר ילדים|תעודת לידה)$/i,type:"minor_data",label:"\u05DE\u05D9\u05D3\u05E2 \u05E2\u05DC \u05E7\u05D8\u05D9\u05DF"},{pattern:/^(?:דת|לאום|מין|נטייה מינית|השקפה פוליטית|מצב משפחתי|עדה|מוצא)$/i,type:"sensitive_personal",label:"\u05DE\u05D9\u05D3\u05E2 \u05D0\u05D9\u05E9\u05D9 \u05E8\u05D2\u05D9\u05E9"},{pattern:/^(?:מספר רכב|מס רכב|לוחית רישוי|מספר רישוי)$/i,type:"tracking",label:"\u05DE\u05E1\u05E4\u05E8 \u05E8\u05DB\u05D1"}],Bt=/^(id|uuid|created_?at|updated_?at|deleted_?at|status|type|category|description|title|slug|url|path|key|value|enabled|active|public|version|metadata|config|settings|data|content|note|comment|label|color|icon)$/i,Ut=/^שם[ _](?:ה)?(?:קובץ|מוצר|פריט|חברה|ארגון|עסק|פרויקט|גיליון|טבלה|שדה|קטגוריה|סניף|בנק|עיר|רחוב|ישוב|יישוב|מסמך|תוכנית|חבילה|קורס|מחלקה|אתר|דומיין|מותג|ספק|שירות|תפקיד)$|^(file|product|item|company|org|organization|project|sheet|table|field|category|branch|bank|city|street|document|plan|course|department|site|domain|brand|vendor|service|role)[ _-]?name$/i;function L(e){if(!e)return null;let t=e.trim();if(Bt.test(t)||/^name$/i.test(t))return null;let i=t.replace(/[\s-]+/g,"_");for(let n of[...zt,...Mt])if(n.pattern.test(t)||n.pattern.test(i))return{type:n.type,label:n.label};if(Ut.test(t))return null;if(/^שם[ _][\u0590-\u05FF"'׳ ]{2,20}$/.test(t))return{type:"name",label:"\u05E9\u05DD \u05D0\u05D3\u05DD"};if(/^(customer|client|employee|inspector|supervisor|contact|person|patient|user|owner|manager|agent|member|driver|tenant|student|parent|beneficiary|insured)_?(full_?)?name$/i.test(i))return{type:"name",label:"Person name"};for(let n of Ue()){let s=n(t);if(s)return{type:s.type,label:s.label}}return null}function Ke(e){let t=String(e??"").replace(/\D/g,"");if(t.length===0||t.length>9)return!1;let i=t.padStart(9,"0"),n=0;for(let s=0;s<9;s++){let r=parseInt(i[s]??"0",10)*(s%2+1);r>9&&(r-=9),n+=r}return n%10===0&&parseInt(i,10)>0}function Wt(e){let t=String(e??"").replace(/\D/g,"");if(t.length<12||t.length>19)return!1;let i=0,n=!1;for(let s=t.length-1;s>=0;s-=1){let r=parseInt(t[s]??"0",10);n&&(r*=2,r>9&&(r-=9)),i+=r,n=!n}return i%10===0}function Kt(e){let t=String(e??"").replace(/\s/g,"").toUpperCase();if(!/^[A-Z]{2}\d{2}[A-Z0-9]{10,30}$/.test(t))return!1;let i=t.slice(4)+t.slice(0,4),n=0;for(let s of i){let r=s>="A"&&s<="Z"?String(s.charCodeAt(0)-55):s;for(let o of r)n=(n*10+Number(o))%97}return n===1}var ge="(?<!\\d)(?<!\\d[.,])",ye="(?!\\d)(?![.,]\\d)",Ge=[{subkind:"israeli_id",severity:"high",pattern:new RegExp(`${ge}\\d{9}${ye}`,"g"),validate:Ke,hint:"Israeli national ID (check digit verified) in plaintext. Encrypt the column or mask it at rest."},{subkind:"credit_card",severity:"critical",pattern:new RegExp(`${ge}[2-6][ -]?(?:\\d[ -]?){11,17}\\d${ye}`,"g"),validate:Wt,hint:"Payment card number (Luhn verified) in plaintext. This is PCI scope."},{subkind:"iban",severity:"high",pattern:/\b[A-Z]{2}\d{2}(?: ?[A-Z0-9]{4}){2,7}(?: ?[A-Z0-9]{1,4})?\b/g,validate:Kt,hint:"Bank account in IBAN form (mod-97 verified) in plaintext."},{subkind:"israeli_phone",severity:"medium",pattern:new RegExp(`${ge}(?:\\+972[- ]?|0)(?:[57]\\d|[2-489])[- ]?\\d{3}[- ]?\\d{4}${ye}`,"g"),validate:e=>{let t=e.replace(/\D/g,"").replace(/^972/,"0");return/^0[57]\d{8}$/.test(t)?!0:/^0[2-489]\d{7}$/.test(t)&&(/[- ]/.test(e)||e.startsWith("+972"))},hint:"Israeli phone number in plaintext."}];function W(e,t){let i=[],n="",s=!1;for(let r=0;r<e.length;r++){let o=e[r];s?o==='"'&&e[r+1]==='"'?(n+='"',r++):o==='"'?s=!1:n+=o:o==='"'?s=!0:o===t?(i.push(n),n=""):n+=o}return i.push(n),i}import{inflateRawSync as xn}from"node:zlib";import{inflateSync as Gt}from"node:zlib";var be=new Set([".pdf"]),Ze=8*1024*1024;function Zt(e){let t=e.toString("latin1"),i=new Map,n=/(\d+)\s+(\d+)\s+obj\b/g,s;for(;(s=n.exec(t))!==null;){let r=Number(s[1]),o=n.lastIndex,a=t.indexOf("endobj",o);if(a<0)continue;let c=t.indexOf("stream",o),l,p=null;if(c>=0&&c<a){l=t.slice(o,c);let d=c+6;t[d]==="\r"&&(d+=1),t[d]===`
3
3
  `&&(d+=1);let u=t.indexOf("endstream",d);u>d&&(p=e.subarray(d,u))}else l=t.slice(o,a);i.set(r,{num:r,dict:l,stream:p})}for(let r of[...i.values()]){if(!r.stream||!/\/Type\s*\/ObjStm\b/.test(r.dict))continue;let o=ke(r),a=Number(/\/N\s+(\d+)/.exec(r.dict)?.[1]??0),c=Number(/\/First\s+(\d+)/.exec(r.dict)?.[1]??-1);if(o===null||!a||c<0)continue;let l=o.slice(0,c).trim().split(/\s+/).map(Number);for(let p=0;p<a;p+=1){let d=l[2*p],u=l[2*p+1];if(d===void 0||u===void 0||Number.isNaN(d)||Number.isNaN(u))break;let f=p+1<a?l[2*(p+1)+1]:void 0,m=o.slice(c+u,f!==void 0?c+f:void 0);i.has(d)||i.set(d,{num:d,dict:m,stream:null})}}return i}function _e(e){let t=[...e.replace(/\s+/g,"")];if(t.length<40)return!1;let i=0,n=0;for(let s of t){let r=s.codePointAt(0)??0;r<32||r>=127&&r<=191||r===65533||r>=57344&&r<=63743?i+=1:/[\p{L}\p{N}]/u.test(s)&&(n+=1)}return i/t.length>.2||n/t.length<.25}function Vt(e){let t=e.toString("latin1").replace(/\s/g,"");t.startsWith("<~")&&(t=t.slice(2));let i=t.indexOf("~>");i>=0&&(t=t.slice(0,i));let n=[],s=0,r=0;for(let o of t){if(o==="z"&&r===0){n.push(0,0,0,0);continue}let a=o.charCodeAt(0)-33;if(a<0||a>84)return null;s=s*85+a,r+=1,r===5&&(n.push(s>>>24&255,s>>>16&255,s>>>8&255,s&255),s=0,r=0)}if(r>0){for(let a=r;a<5;a+=1)s=s*85+84;let o=[s>>>24&255,s>>>16&255,s>>>8&255,s&255];for(let a=0;a<r-1;a+=1)n.push(o[a]??0)}return Buffer.from(n)}function Xt(e){let t=e.toString("latin1").replace(/\s/g,"").split(">")[0]??"",i=t.length%2?t+"0":t;return/^[0-9A-Fa-f]*$/.test(i)?Buffer.from(i,"hex"):null}function Jt(e){let t=/\/Filter\s*(\[[^\]]*\]|\/\w+)/.exec(e);return!t||!t[1]?[]:[...t[1].matchAll(/\/(\w+)/g)].map(i=>i[1]??"")}function ke(e){if(!e.stream)return null;let t=e.stream;for(let i of Jt(e.dict)){let n=null;if(i==="FlateDecode")try{n=Gt(t)}catch{return null}else if(i==="ASCII85Decode")n=Vt(t);else if(i==="ASCIIHexDecode")n=Xt(t);else return null;if(n===null)return null;t=n}return t.toString("latin1")}function qt(e){let t=new Map,i=1,n=/begincodespacerange([\s\S]*?)endcodespacerange/.exec(e);if(n&&n[1]){let c=/<([0-9A-Fa-f]+)>/.exec(n[1]);c&&c[1]&&c[1].length>=4&&(i=2)}let s=c=>{let l="";for(let p=0;p+3<c.length+1;p+=4){let d=parseInt(c.slice(p,p+4),16);Number.isFinite(d)&&d>0&&(l+=String.fromCharCode(d))}return l},r=/beginbfchar([\s\S]*?)endbfchar/g,o;for(;(o=r.exec(e))!==null;){let c=/<([0-9A-Fa-f]+)>\s*<([0-9A-Fa-f]*)>/g,l;for(;(l=c.exec(o[1]??""))!==null;)t.set(parseInt(l[1]??"0",16),s(l[2]??""))}let a=/beginbfrange([\s\S]*?)endbfrange/g;for(;(o=a.exec(e))!==null;){let c=o[1]??"",l=/<([0-9A-Fa-f]+)>\s*<([0-9A-Fa-f]+)>\s*<([0-9A-Fa-f]*)>/g,p;for(;(p=l.exec(c))!==null;){let d=parseInt(p[1]??"0",16),u=parseInt(p[2]??"0",16),f=parseInt((p[3]??"0").slice(0,4)||"0",16);if(!(u-d>65535))for(let m=d;m<=u;m+=1)t.set(m,String.fromCharCode(f+(m-d)))}}return{map:t,bytes:i}}function Yt(e){let t=new Map,i=[],n=[];for(let r of e.values()){for(let o of r.dict.matchAll(/\/Font\s*<<([\s\S]*?)>>/g))o[1]&&n.push(o[1]);for(let o of r.dict.matchAll(/\/Font\s+(\d+)\s+\d+\s+R/g)){let a=e.get(Number(o[1]));a&&n.push(a.dict)}}let s=new Set;for(let r of n){let o=/\/([^\s/<>[\]()]+)\s+(\d+)\s+\d+\s+R/g,a;for(;(a=o.exec(r))!==null;){let c=`${a[1]}#${a[2]}`;s.has(c)||(s.add(c),i.push([a[1]??"",Number(a[2])]))}}for(let[r,o]of i){let a=e.get(o);if(!a)continue;let c=null,l=/\/ToUnicode\s+(\d+)\s+\d+\s+R/.exec(a.dict);if(l){let d=e.get(Number(l[1])),u=d?ke(d):null;u&&(c=qt(u))}if(c||(c=tn(a.dict,e)),!c)continue;let p=t.get(r)??[];p.push(c),t.set(r,p)}return t}var Qt=["alef","bet","gimel","dalet","he","vav","zayin","het","tet","yod","finalkaf","kaf","lamed","finalmem","mem","finalnun","nun","samekh","ayin","finalpe","pe","finaltsadi","tsadi","qof","resh","shin","tav"];function en(e){let t=/^uni([0-9A-Fa-f]{4})$/.exec(e)??/^u([0-9A-Fa-f]{4,6})$/.exec(e);if(t)return String.fromCodePoint(parseInt(t[1],16));let i=/^afii(\d{5})$/.exec(e);if(i){let r=Number(i[1]);if(r>=57664&&r<=57690)return String.fromCharCode(1488+(r-57664))}let n=Qt.indexOf(e.replace(/hebrew$/,""));return n>=0?String.fromCharCode(1488+n):e==="space"?" ":/^[A-Za-z]$/.test(e)?e:{zero:"0",one:"1",two:"2",three:"3",four:"4",five:"5",six:"6",seven:"7",eight:"8",nine:"9",period:".",comma:",",hyphen:"-",colon:":",slash:"/",at:"@"}[e]??null}function tn(e,t){let i=e,n=/\/Encoding\s+(\d+)\s+\d+\s+R/.exec(e);n&&(i=t.get(Number(n[1]))?.dict??"");let s=/\/Differences\s*\[([^\]]*)\]/.exec(i);if(!s?.[1])return null;let r=new Map,o=0;for(let a of s[1].match(/\d+|\/[^\s/[\]]+/g)??[]){if(/^\d+$/.test(a)){o=Number(a);continue}let c=en(a.slice(1));c!==null&&r.set(o,c),o+=1}return r.size?{map:r,bytes:1}:null}function qe(e){let t=[];for(let i=0;i<e.length;i+=1){let n=e[i];if(n!=="\\"){t.push(n.charCodeAt(0)&255);continue}let s=e[i+1];if(s===void 0)break;if(s>="0"&&s<="7"){let o="",a=i+1;for(;a<e.length&&o.length<3&&e[a]>="0"&&e[a]<="7";)o+=e[a],a+=1;t.push(parseInt(o,8)&255),i=a-1;continue}let r={n:10,r:13,t:9,b:8,f:12};t.push(r[s]??s.charCodeAt(0)&255),i+=1}return t}function Ye(e){if(e.length<2||e[0]!==254||e[1]!==255)return null;let t="";for(let i=2;i+1<e.length;i+=2)t+=String.fromCharCode((e[i]??0)<<8|(e[i+1]??0));return t}function Ve(e,t){let i=Ye(e);if(i!==null)return i;if(!t)return e.map(s=>String.fromCharCode(s)).join("");let n="";if(t.bytes===2)for(let s=0;s+1<e.length;s+=2){let r=(e[s]??0)<<8|(e[s+1]??0);n+=t.map.get(r)??""}else for(let s of e)n+=t.map.get(s)??String.fromCharCode(s);return n}function nn(e){let t=0;for(let i of e){let n=i.codePointAt(0)??0;/[\p{L}\p{N}]/u.test(i)?t+=1:(n<32||n>=127&&n<=191||n===65533)&&(t-=2)}return t}function Xe(e,t){if(!t||t.length<=1)return Ve(e,t?.[0]);let i="",n=-1/0;for(let s of t){let r=Ve(e,s),o=nn(r);o>n&&(i=r,n=o)}return i}function sn(e,t){let i="",n="",s,r=!1,o="",a=0,c=null,l=()=>{n.trim()&&(i+=n+`
4
4
  `),n="",a=0},p=()=>{n&&!n.endsWith(" ")&&a>1&&(n+=" ")},d=/\/([^\s/<>[\]()]+)\s+-?[\d.]+\s+Tf|(-?[\d.]+)\s+(-?[\d.]+)\s+T[dD]\b|(?:-?[\d.]+\s+){5}(-?[\d.]+)\s+Tm\b|T\*|\((?:\\.|[^\\)])*\)|<[0-9A-Fa-f\s]*>|\[|\]|-?\d+(?:\.\d+)?|TJ|Tj|'|"/g,u;for(;(u=d.exec(e))!==null;){let f=u[0];if(u[1]!==void 0&&f.endsWith("Tf")){s=t.get(u[1]);continue}if(u[2]!==void 0){Math.abs(Number(u[3]))>.01?l():Number(u[2])!==0&&p();continue}if(u[4]!==void 0){let m=Number(u[4]);c!==null&&Math.abs(m-c)>.01?l():c!==null&&p(),c=m;continue}if(f==="T*"){l();continue}if(f==="["){r=!0;continue}if(f==="]"){r=!1;continue}if(f==="TJ"||f==="Tj"||f==="'"||f==='"'){(f==="'"||f==='"')&&l(),o&&(n+=o,a=o.trim().length,o="");continue}if(f.startsWith("("))o+=Xe(qe(f.slice(1,-1)),s);else if(f.startsWith("<")){let m=f.slice(1,-1).replace(/\s+/g,""),h=[];for(let y=0;y+1<m.length;y+=2)h.push(parseInt(m.slice(y,y+2),16));o+=Xe(h,s)}else r&&Number(f)<-200&&o&&!o.endsWith(" ")&&(o+=" ")}return o&&(n+=o),l(),i}function rn(e,t){let i=e.toString("latin1"),n=/\/Info\s+(\d+)\s+\d+\s+R/.exec(i),s=n?t.get(Number(n[1]))?.dict:void 0;if(!s)return"";let r=[],o=/\/(Author|Title|Subject|Keywords|Creator|Producer)\s*(\((?:\\.|[^\\)])*\)|<[0-9A-Fa-f\s]*>)/g,a;for(;(a=o.exec(s))!==null;){let c=a[2]??"";if(c.startsWith("(")){let l=qe(c.slice(1,-1));r.push(Ye(l)??l.map(p=>String.fromCharCode(p)).join(""))}else{let l=c.slice(1,-1).replace(/\s+/g,""),p="";if(l.toUpperCase().startsWith("FEFF"))for(let d=4;d+3<l.length+1;d+=4)p+=String.fromCharCode(parseInt(l.slice(d,d+4),16));else for(let d=0;d+1<l.length;d+=2)p+=String.fromCharCode(parseInt(l.slice(d,d+2),16));r.push(p)}}return r.join(`