1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[84701],{19914:(e,t,n)=>{n.d(t,{G:()=>i,R:()=>r});var a=n(36643),s=n(86669);function r(e){let t=(0,s.yj)(e),n=t.bom&&"UTF-8"===t.encoding?a.ki:t.note;return{text:t.text,encoding:t.encoding,bom:t.bom,guessed:t.guessed,note:n}}async function i(e){return r(await e.arrayBuffer())}},25323:(e,t,n)=>{n.d(t,{Gc:()=>c,HU:()=>l,KB:()=>s,MB:()=>r,NV:()=>f,W2:()=>p,Y_:()=>m,iJ:()=>u,q0:()=>i,vB:()=>o});var a=n(35578);let s=1024,r=1048576,i=8388608,o=0xc00000;function l(e,t){let{kind:n,arity:s,maxBytes:r,maxFiles:i}=t,o=[];if(0===e.length)return{accepted:[],notice:""};let l=e;if(void 0!==r){let e=l.filter(e=>e.size>r);l=l.filter(e=>e.size<=r),1===e.length&&e[0]?o.push(`${e[0].name} is bigger than the ${(0,a.z3)(r)} limit, so it was left out.`):e.length>1&&o.push(`${e.length} files were bigger than the ${(0,a.z3)(r)} limit, so they were left out.`)}let c=l.filter(e=>!n.matches(e));if(l=l.filter(e=>n.matches(e)),1===c.length&&c[0]?o.push(`${c[0].name} is not ${n.noun}, so nothing changed for it. This box takes ${n.formats}.`):c.length>1&&o.push(`${c.length} of the files are not ${n.nouns}, so they were left out. This box takes ${n.formats}.`),"one"===s&&l.length>1){let e=l[0],t=l.slice(1);o.push(1===t.length?`Only one file at a time here, so ${e?.name??"the first file"} was used and ${t[0]?.name??"the other one"} was not.`:`Only one file at a time here, so ${e?.name??"the first file"} was used and the other ${t.length} were not.`),l=e?[e]:[]}if("many"===s&&void 0!==i&&l.length>i){let e=l.length-i;o.push(`This tool takes ${i} files at a time, so the last ${e} ${1===e?"was":"were"} left out.`),l=l.slice(0,i)}return{accepted:l,notice:o.join(" ")}}function c(e,t){let n=[];return e.files&&void 0!==t.stopAfter&&n.push(`Only the first ${t.stopAfter} files from what you dropped were taken.`),e.depth&&void 0!==t.maxDepth&&n.push(`Folders more than ${t.maxDepth} ${1===t.maxDepth?"level":"levels"} deep were not opened.`),n.join(" ")}function f(e,t,n){let a=e.includes("Files");return e.includes("text/uri-list")||e.includes("text/plain")?"That came through as text rather than a file, which happens when something is dragged out of a browser tab. Save it first, then drag the file in, or use the button to choose one.":a&&"reject"===n?`That looks like a folder, and this box takes ${t.nouns} one by one. Open the folder and drag the files inside it.`:`Nothing came through that this box can read. It takes ${t.formats}, or you can use the button to choose ${t.noun}.`}function p(e,t){return"many"===t?`Click to choose ${e.nouns}, or drag them into the box`:`Click to choose ${e.noun}, or drag it into the box`}function u(e,t){return"many"===t?`Choose ${e.nouns}`:`Choose ${e.noun}`}function m(e,t){let n="many"===t?e.nouns:e.noun;return`Type or paste above, drag ${n} onto the box, or click ${u(e,t)} below.`}},35323:(e,t,n)=>{n.d(t,{J:()=>i});var a=n(45993),s=n(75837),r=n(14552);let i=s.forwardRef(({className:e,...t},n)=>(0,a.jsx)("label",{ref:n,className:(0,r.cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));i.displayName="Label"},36643:(e,t,n)=>{n.d(t,{Z9:()=>s,_6:()=>r,dq:()=>o,ki:()=>a,u0:()=>i});let a="A byte order mark starts this input. It records the encoding rather than being text, so it is not part of the result shown here.";function s(e){return 65279===e.charCodeAt(0)?{text:e.slice(1),bom:!0}:{text:e,bom:!1}}function r(e){let t=e instanceof Uint8Array?e:Uint8Array.from(e);try{return s(new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0}).decode(t))}catch{return null}}function i(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n>=55296&&n<=56319){let n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){t++;continue}return t}if(n>=56320&&n<=57343)return t}return null}let o="This text holds half of a surrogate pair, which is not a character UTF-8 can carry. It was encoded as the replacement character U+FFFD, so three of the bytes shown are the substitution rather than anything you typed."},84701:(e,t,n)=>{n.d(t,{gH:()=>y,cW:()=>w,Ft:()=>k});var a=n(45993),s=n(75837),r=n(77771),i=n(35323),o=n(14552);let l=e=>{let t=e.name.lastIndexOf(".");return -1===t?"":e.name.slice(t).toLowerCase()},c=(e,t)=>""!==e.type&&e.type.startsWith(t),f=e=>t=>e.includes(l(t)),p=[".png",".jpg",".jpeg",".gif",".bmp",".webp",".avif",".heic",".heif",".tif",".tiff",".ico",".psd",".ai",".eps",".raw",".cr2",".nef",".arw",".dng",".mp3",".wav",".flac",".aac",".ogg",".oga",".opus",".m4a",".wma",".aiff",".mid",".midi",".mp4",".m4v",".mov",".avi",".mkv",".webm",".wmv",".flv",".mpg",".mpeg",".3gp",".zip",".rar",".7z",".gz",".bz2",".xz",".tar",".tgz",".jar",".iso",".dmg",".exe",".dll",".so",".dylib",".bin",".msi",".deb",".rpm",".apk",".class",".wasm",".ttf",".otf",".woff",".woff2",".eot",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odt",".ods",".odp",".sqlite",".db",".mdb",".pyc",".o",".a",".lib",".pak",".blend",".fbx",".glb"],u=e=>""===e.type&&!p.includes(l(e)),m=[".txt",".text",".md",".markdown",".log",".csv",".tsv",".json",".jsonl",".ndjson",".xml",".yaml",".yml",".html",".htm",".css",".js",".ts",".ini",".conf",".env",".srt",".vtt",".edl",".sql",".rtf",".tex",".list",".dat"],d=[".js",".mjs",".cjs",".jsx",".ts",".tsx",".mts",".cts",".vue",".svelte",".py",".pyw",".rb",".php",".go",".rs",".java",".kt",".kts",".scala",".swift",".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".cs",".m",".mm",".dart",".sh",".bash",".zsh",".fish",".ps1",".bat",".cmd",".css",".scss",".sass",".less",".styl",".html",".htm",".xml",".svg",".vue",".jsp",".erb",".ejs",".hbs",".twig",".sql",".r",".jl",".lua",".pl",".pm",".hs",".elm",".ex",".exs",".clj",".cljs",".json",".yaml",".yml",".toml",".ini",".conf",".cfg",".env",".gradle",".tf",".md",".markdown",".txt",".dockerfile",".makefile",".mk",".cmake",".proto",".graphql",".gql"],h={text:{accept:".txt,.text,.md,.markdown,.log,.csv,.tsv,.json,.xml,.yaml,.yml,.html,.htm,.ini,.conf,.env,text/*",formats:"TXT, MD, CSV, JSON, or any plain text file",noun:"a text file",nouns:"text files",matches:e=>c(e,"text/")||m.includes(l(e))||u(e),text:!0},list:{accept:".txt,.text,.csv,.tsv,.md,.log,.edl,text/*",formats:"TXT or CSV, one entry per line",noun:"a list file",nouns:"list files",matches:e=>c(e,"text/")||m.includes(l(e))||u(e),text:!0},code:{accept:d.join(",")+",text/*",formats:"JS, TS, PY, JAVA, GO, RS, RB, PHP, C, CSS, HTML, or any other source file",noun:"a source file",nouns:"source files",matches:e=>d.includes(l(e))||m.includes(l(e))||c(e,"text/")||u(e),text:!0},csv:{accept:".csv,.tsv,.txt,text/csv,text/tab-separated-values,text/plain",formats:"CSV, TSV, or TXT",noun:"a CSV file",nouns:"CSV files",matches:e=>c(e,"text/")||[".csv",".tsv",".txt",".text"].includes(l(e))||"application/vnd.ms-excel"===e.type||u(e),text:!0},json:{accept:".json,.jsonl,.ndjson,.txt,application/json,text/plain",formats:"JSON, JSONL, or TXT",noun:"a JSON file",nouns:"JSON files",matches:e=>"application/json"===e.type||c(e,"text/")||[".json",".jsonl",".ndjson",".txt"].includes(l(e))||u(e),text:!0},xml:{accept:".xml,.txt,text/xml,application/xml,text/plain",formats:"XML or TXT",noun:"an XML file",nouns:"XML files",matches:e=>e.type.includes("xml")||c(e,"text/")||[".xml",".txt",".text"].includes(l(e))||u(e),text:!0},certificate:{accept:".csr,.pem,.req,.p10,.crt,.cer,.der,.txt,application/pkcs10,application/x-pem-file,text/plain",formats:"CSR, PEM, REQ, or P10",noun:"a certificate request file",nouns:"certificate request files",matches:e=>c(e,"text/")||[".csr",".pem",".req",".p10",".crt",".cer",".der",".txt",".text"].includes(l(e))||"application/pkcs10"===e.type||"application/x-pem-file"===e.type||u(e),text:!0},subtitle:{accept:".srt,.vtt,.sbv,.txt,text/vtt,text/plain",formats:"SRT, VTT, or TXT",noun:"a subtitle file",nouns:"subtitle files",matches:e=>c(e,"text/")||[".srt",".vtt",".sbv",".txt"].includes(l(e))||u(e),text:!0},image:{accept:"image/*",formats:"PNG, JPG, WebP, or GIF",noun:"an image",nouns:"images",matches:e=>c(e,"image/")||f([".png",".jpg",".jpeg",".jfif",".pjpeg",".pjp",".webp",".gif",".apng",".bmp",".dib",".avif",".svg",".svgz",".heic",".heif",".tif",".tiff",".ico",".cur"])(e),text:!1},photo:{accept:"image/png,image/jpeg,image/webp,.png,.jpg,.jpeg,.webp",formats:"PNG, JPG, or WebP",noun:"a photo",nouns:"photos",matches:e=>c(e,"image/png")||c(e,"image/jpeg")||c(e,"image/webp")||f([".png",".jpg",".jpeg",".webp"])(e),text:!1},audio:{accept:"audio/*",formats:"MP3, WAV, M4A, or OGG",noun:"an audio file",nouns:"audio files",matches:e=>c(e,"audio/")||f([".mp3",".wav",".m4a",".ogg",".oga",".flac",".aac",".opus",".weba"])(e),text:!1},video:{accept:"video/*",formats:"MP4, WebM, or MOV",noun:"a video",nouns:"videos",matches:e=>c(e,"video/")||f([".mp4",".webm",".mov",".m4v",".mkv",".avi",".ogv"])(e),text:!1},pdf:{accept:".pdf,application/pdf",formats:"PDF",noun:"a PDF",nouns:"PDFs",matches:e=>"application/pdf"===e.type||".pdf"===l(e),text:!1},any:{accept:"",formats:"any file",noun:"a file",nouns:"files",matches:()=>!0,text:!1}},x=e=>h[e];var g=n(25323),b=n(19914);let v=e=>e?Array.from(e.types):[];function y({kind:e,arity:t,maxBytes:n,maxFiles:l,onFile:c,onFiles:f,folders:p="reject",label:u,title:m,hint:d,id:h,pickerAccept:b,folderPicker:y=!1,folderWalk:w,className:j}){let k=x(e),D=t??(f?"many":"one"),$=(0,s.useRef)(null),C=(0,s.useRef)(null),[N,A]=(0,s.use
1State)(!1),[P,S]=(0,s.useState)(""),E=(0,s.useId)();(0,s.useEffect)(()=>{let e=C.current;e&&(e.setAttribute("webkitdirectory",""),e.setAttribute("directory",""))},[y]);let O=h??`drop-${E}`,z=(0,s.useCallback)((e,t,a="")=>{let s=e=>S([a,e].filter(e=>""!==e).join(" "));if(0===e.length)return void s((0,g.NV)(t,k,p));let r=(0,g.HU)(e,{kind:k,arity:D,maxBytes:n,maxFiles:l});s(r.notice),0!==r.accepted.length&&(f?f(r.accepted):c&&r.accepted[0]&&c(r.accepted[0]))},[k,D,n,l,c,f,p]);(0,s.useEffect)(()=>{let e=e=>{let t=Array.from(e.clipboardData?.files??[]);if(0===t.length)return;let n=e.target;if(n instanceof HTMLElement){if(n.isContentEditable)return;let e=n.tagName;if("TEXTAREA"===e||"INPUT"===e||"SELECT"===e)return}e.preventDefault(),z(t,Array.from(e.clipboardData?.types??[]))};return window.addEventListener("paste",e),()=>window.removeEventListener("paste",e)},[z]);let F=(0,s.useCallback)(e=>{e.preventDefault(),A(!1);let t=e.dataTransfer,n=v(t),a=Array.from(t.files);if("accept"===p){let e=[];for(let n=0;n<t.items.length;n+=1){let a=t.items[n];if(!a||"file"!==a.kind)continue;let s="function"==typeof a.webkitGetAsEntry?a.webkitGetAsEntry():null;s&&e.push(s)}if(e.some(e=>e.isDirectory)){let t=w??{};T(e,t).then(({files:e,cut:a})=>z(e,n,(0,g.Gc)(a,t)));return}}z(a,n)},[p,w,z]);return(0,a.jsxs)("div",{className:(0,o.cn)("space-y-1.5",j),children:[u&&(0,a.jsx)(i.J,{htmlFor:O,children:u}),(0,a.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>$.current?.click(),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),$.current?.click())},onDragOver:e=>{e.preventDefault(),A(!0)},onDragLeave:()=>A(!1),onDrop:F,onPaste:e=>{let t=Array.from(e.clipboardData?.files??[]);0!==t.length&&(e.preventDefault(),z(t,v(e.clipboardData)))},className:(0,o.cn)("flex cursor-pointer flex-col items-center justify-center gap-1 rounded-md border border-dashed px-4 py-8 text-center text-sm transition-colors",N?"border-primary bg-accent":"border-input hover:bg-accent"),children:[(0,a.jsx)("span",{className:"font-medium",children:m??(0,g.W2)(k,D)}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:d??`${k.formats}, nothing is uploaded`}),(0,a.jsx)("input",{ref:$,id:O,type:"file",accept:b??(k.accept||void 0),multiple:"many"===D,className:"hidden",onChange:e=>{z(Array.from(e.target.files??[]),[]),e.target.value=""}})]}),!1!==y&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)(r.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>C.current?.click(),children:y.label}),(0,a.jsx)("input",{ref:C,type:"file",className:"hidden",onChange:e=>{z(Array.from(e.target.files??[]),[]),e.target.value=""}})]}),P&&(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:P})]})}function w({kind:e,arity:t="one",maxBytes:n,maxFiles:i,onText:l,onTexts:c,children:f,hint:p,className:u}){let m=x(e),d=(0,s.useRef)(null),[h,y]=(0,s.useState)(!1),[w,j]=(0,s.useState)(""),k=(0,s.useCallback)((e,a)=>{if(0===e.length)return void j((0,g.NV)(a,m,"reject"));let s=(0,g.HU)(e,{kind:m,arity:t,maxBytes:n,maxFiles:i});if(0===s.accepted.length)return void j(s.notice);Promise.all(s.accepted.map(async e=>{let t=await (0,b.G)(e);return{text:t.text,file:e,note:t.note}})).then(e=>{let t=e.map(e=>e.note).filter(e=>""!==e);if(j([s.notice,...new Set(t)].filter(e=>""!==e).join(" ")),c)c(e.map(e=>({text:e.text,file:e.file})));else{let t=e[0];l&&t&&l(t.text,t.file)}},e=>{j(e instanceof Error?e.message:"That file could not be read as text.")})},[m,t,n,i,l,c]);return(0,a.jsxs)("div",{className:(0,o.cn)("space-y-1.5",u),children:[(0,a.jsx)("div",{onDragOver:e=>{e.preventDefault(),y(!0)},onDragLeave:()=>y(!1),onDrop:e=>{e.preventDefault(),y(!1),k(Array.from(e.dataTransfer.files),v(e.dataTransfer))},onPaste:e=>{let t=Array.from(e.clipboardData?.files??[]);0!==t.length&&(e.preventDefault(),k(t,v(e.clipboardData)))},className:(0,o.cn)("rounded-md transition-colors",h&&"ring-2 ring-primary ring-offset-2"),children:f}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)(r.$,{type:"button",variant:"outline",size:"sm",onClick:()=>d.current?.click(),children:(0,g.iJ)(m,t)}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:p??(0,g.Y_)(m,t)})]}),(0,a.jsx)("input",{ref:d,type:"file",accept:m.accept||void 0,multiple:"many"===t,className:"hidden",onChange:e=>{k(Array.from(e.target.files??[]),[]),e.target.value=""}}),w&&(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:w})]})}let j="__toolbreezyDropPath";function k(e){let t=e[j];return"string"==typeof t&&""!==t?t:e.name}async function T(e,t={}){let n=t.maxDepth??1/0,a=t.stopAfter??1/0,s=[],r={depth:!1,files:!1},i=async(e,t)=>{if(s.length>=a){r.files=!0;return}if(t>n){r.depth=!0;return}if(e.isFile){let t=await new Promise(t=>{e.file(e=>t(e),()=>t(null))});t&&s.push(function(e,t){let n=t.replace(/^\/+/,"");return Object.defineProperty(e,j,{value:""===n?e.name:n,enumerable:!1,
1configurable:!0}),e}(t,e.fullPath));return}if(!e.isDirectory)return;let o=e.createReader(),l=[];for(;;){let e=await new Promise(e=>{o.readEntries(t=>e(t),()=>e([]))});if(0===e.length)break;l.push(...e)}for(let e of(l.sort((e,t)=>e.name.localeCompare(t.name,void 0,{numeric:!0})),l)){if(s.length>=a){r.files=!0;break}await i(e,t+1)}};for(let t of[...e].sort((e,t)=>e.name.localeCompare(t.name,void 0,{numeric:!0}))){if(s.length>=a){r.files=!0;break}await i(t,0)}return{files:s,cut:r}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.