PageSourceSearch

https://orygofrontend-production.up.railway.app/_next/static/chunks/8293-f7cb12d664f5a3c3.js

js orygofrontend-production.up.railway.app collected 2026-10-03 12:15:56 UTC 9,232 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8293],{4741:(e,t,a)=>{a.d(t,{AO:()=>m,B$:()=>s,E0:()=>b,Gz:()=>r,M8:()=>z,d6:()=>j,hE:()=>p,ip:()=>n,kU:()=>l,l4:()=>_,pT:()=>u,pq:()=>x,xs:()=>w,y6:()=>h});var i=a(53602);let r=[...i._E,"application/pdf","text/plain","text/csv"],n=[...r,...".jpg,.jpeg,.png,.webp,.heic,.heif,.pdf,.txt,.csv".split(",")].join(","),l=5,o=e=>i._E.includes(e)||e.startsWith("image/"),s=e=>o(e.mime_type),d=e=>r.includes(e.type)?e.size>0xa00000?{valid:!1,error:'File "'.concat(e.name,'" exceeds the ').concat(10," MB per-file limit.")}:{valid:!0}:{valid:!1,error:"Unsupported file type: ".concat(e.type||"unknown",". Allowed: images, PDF, TXT, CSV.")},c=async e=>{if(o(e.type)){let t=await (0,i.ZL)(e);return{data:t.data,mime_type:t.mime_type,filename:e.name,thumbnail_data:t.thumbnail_data,thumbnail_mime_type:t.thumbnail_mime_type,size_bytes:e.size}}return{data:await new Promise((t,a)=>{let i=new FileReader;i.onload=()=>{let e=i.result,a=e.indexOf(",");t(a>=0?e.slice(a+1):e)},i.onerror=()=>a(Error("Failed to read file")),i.readAsDataURL(e)}),mime_type:e.type,filename:e.name,size_bytes:e.size}},m=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=[],i=Array.from(e);if(t.length+i.length>l)return a.push("Maximum ".concat(l," attachments allowed per message.")),{attachments:t,errors:a};let r=[];for(let e of i){let t=d(e);if(!t.valid){a.push(t.error||'Could not accept "'.concat(e.name,'".'));continue}try{let t=await c(e);r.push(t)}catch(t){a.push("".concat(e.name,": Failed to read file"))}}let n=[...t,...r];if(n.reduce((e,t)=>{var a;return e+(null!=(a=t.size_bytes)?a:Math.floor(3*t.data.length/4))},0)>0xf00000){a.push("Total attachment size exceeds the ".concat(15," MB limit. Some files were dropped."));let e=n;for(;e.length>t.length&&e.reduce((e,t)=>{var a;return e+(null!=(a=t.size_bytes)?a:Math.floor(3*t.data.length/4))},0)>0xf00000;)e=e.slice(0,-1);return{attachments:e,errors:a}}return{attachments:n,errors:a}},p=e=>({data:e.data,mime_type:e.mime_type,filename:e.filename}),u=e=>s(e)?e.thumbnail_data&&e.thumbnail_mime_type?"data:".concat(e.thumbnail_mime_type,";base64,").concat(e.thumbnail_data):"data:".concat(e.mime_type,";base64,").concat(e.data):"",h=e=>"data:".concat(e.mime_type,";base64,").concat(e.data),f=[".pdf",".txt",".csv"],y=["content_type=application%2fpdf","content_type=text%2fplain","content_type=text%2fcsv"],g="local-file:",b=e=>e.startsWith(g),x=e=>{if(b(e))return!0;let t=e.toLowerCase();return!!(f.some(e=>t.includes(e))||y.some(e=>t.includes(e)))},_=e=>{try{if(b(e))return e.slice(g.length)||"file";let t=e.split("?")[0].split("/").pop()||"";return decodeURIComponent(t)||"file"}catch(e){return"file"}},w=e=>{let t=_(e).toLowerCase();if(t.endsWith(".pdf"))return"PDF";if(t.endsWith(".csv"))return"CSV";if(t.endsWith(".txt"))return"TXT";let a=e.toLowerCase();return a.includes("application%2fpdf")?"PDF":a.includes("text%2fcsv")?"CSV":a.includes("text%2fplain")?"TXT":"FILE"},v=e=>{if(!e||"object"!=typeof e)return!1;let t=e.url;return"string"==typeof t&&t.length>0},z=e=>{let t=(e.content_type||"").toLowerCase();return t?t.startsWith("image/"):!x(e.url)},j=(e,t)=>Array.isArray(e)&&e.length>0?e.filter(v).map(e=>({url:e.url,filename:e.filename||null,content_type:e.content_type||null,key:e.key||null})):Array.isArray(t)&&t.length>0?t.filter(e=>"string"==typeof e&&e.length>0).map(e=>({url:e,filename:null,content_type:null,key:null})):[]},53602:(e,t,a)=>{a.d(t,{LX:()=>r,ZL:()=>d,_E:()=>i,r3:()=>m,vz:()=>p,wk:()=>c});let i=["image/jpeg","image/png","image/webp","image/heic","image/heif"],r=".jpg,.jpeg,.png,.webp,.heic,.heif",n=new Set(["image/jpeg","image/png","image/webp"]),l=e=>i.includes(e.type)?e.size>0xa00000?{valid:!1,error:"Image size exceeds maximum allowed (10MB)"}:{valid:!0}:{valid:!1,error:"Unsupported image format. Supported formats: JPEG, PNG, WebP, HEIC, HEIF"},o=e=>new Promise((t,a)=>{let i=new FileReader;i.onload=()=>{let e=i.result,a=e.indexOf(",");t(a>=0?e.slice(a+1):e)},i.onerror=()=>a(Error("Failed to read blob")),i.readAsDataURL(e)}),s=async(e,t,a)=>{if("undefined"==typeof document||!n.has(e.type))return null;let i=URL.createObjectURL(e);try{let r=await new Promise((e,t)=>
1{let a=new Image;a.onload=()=>e(a),a.onerror=()=>t(Error("Failed to decode image")),a.decoding="async",a.src=i}),n=Math.max(r.naturalWidth,r.naturalHeight);if(!n)return null;let l=Math.min(1,t/n),o=Math.max(1,Math.round(r.naturalWidth*l)),s=Math.max(1,Math.round(r.naturalHeight*l)),d=document.createElement("canvas");d.width=o,d.height=s;let c=d.getContext("2d");if(!c)return null;c.drawImage(r,0,0,o,s);let m="image/png"===e.type&&1===l&&e.size<204800?"image/png":"image/jpeg",p=await new Promise(e=>{d.toBlob(t=>e(t),m,a)});if(!p)return null;return{blob:p,mimeType:m}}catch(e){return null}finally{URL.revokeObjectURL(i)}},d=async e=>{let t,a,i,r,n=await s(e,1600,.85);n&&n.blob.size<.95*e.size?(t=await o(n.blob),a=n.mimeType):(t=await new Promise((t,a)=>{let i=new FileReader;i.onload=()=>{let e=i.result,a=e.indexOf(",");t(a>=0?e.slice(a+1):e)},i.onerror=()=>a(Error("Failed to read image file")),i.readAsDataURL(e)}),a=e.type);let l=await s(e,200,.75);if(l)try{i=await o(l.blob),r=l.mimeType}catch(e){i=void 0}return{data:t,mime_type:a,thumbnail_data:i,thumbnail_mime_type:r}},c=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=[],i=[],r=Array.from(e);if(t.length+r.length>10)return a.push("Maximum ".concat(10," images allowed per message")),{images:t,errors:a};for(let e of r){let t=l(e);if(!t.valid){a.push("".concat(e.name,": ").concat(t.error));continue}try{let t=await d(e);i.push(t)}catch(t){a.push("".concat(e.name,": Failed to process image"))}}return{images:[...t,...i],errors:a}},m=e=>e.thumbnail_data&&e.thumbnail_mime_type?"data:".concat(e.thumbnail_mime_type,";base64,").concat(e.thumbnail_data):"data:".concat(e.mime_type,";base64,").concat(e.data),p=e=>({data:e.data,mime_type:e.mime_type})},88293:(e,t,a)=>{a.d(t,{E:()=>u,b:()=>p});var i=a(37876);a(14232);var r=a(39822),n=a(98991),l=a(36494),o=a(92146),s=a(30488),d=a(70294),c=a(4741);let m=e=>{let t=e.toUpperCase();return"TXT"===t||"CSV"===t?d.jH2:"PDF"===t?d.QuH:"IMG"===t?d.fZZ:d.QuH},p=e=>{let{attachment:t,onRemove:a,size:d="md",borderColor:p,docBackground:u,docTextColor:h}=e,f="sm"===d?"50px":"60px",y=(0,c.B$)(t),g=y?(0,c.pT)(t):"",b=y?(0,c.y6)(t):"",x=(e=>!e||e<=0?"":e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(0)," KB"):"".concat((e/1048576).toFixed(1)," MB"))(t.size_bytes);if(y&&g)return(0,i.jsxs)(r.a,{position:"relative",children:[(0,i.jsx)(n._,{src:g,alt:t.filename||"Selected image",boxSize:f,objectFit:"cover",borderRadius:"md",border:"1px solid",borderColor:p||"border.emphasized",loading:"lazy",decoding:"async",cursor:"pointer",onClick:()=>b&&window.open(b,"_blank")}),(0,i.jsx)(l.J,{size:"xs",position:"absolute",top:"-6px",right:"-6px",bg:"red.500",color:"white",borderRadius:"full",onClick:a,_hover:{bg:"red.600"}})]});let _=(()=>{let e=t.mime_type.toLowerCase();return"application/pdf"===e?"PDF":"text/csv"===e?"CSV":"text/plain"===e?"TXT":"FILE"})(),w=m(_);return(0,i.jsxs)(r.a,{position:"relative",children:[(0,i.jsxs)(o.z,{px:2.5,py:2,borderWidth:"1px",borderColor:p||"border.emphasized",borderRadius:"md",bg:u||"transparent",gap:2,minH:f,maxW:"220px",children:[(0,i.jsx)(w,{size:16}),(0,i.jsxs)(r.a,{minW:0,flex:1,children:[(0,i.jsx)(s.E,{fontSize:"xs",fontWeight:"medium",color:h,lineClamp:1,wordBreak:"break-all",children:t.filename||"file"}),x&&(0,i.jsxs)(s.E,{fontSize:"2xs",opacity:.7,color:h,lineHeight:"1.1",children:[_," \xb7 ",x]}),!x&&(0,i.jsx)(s.E,{fontSize:"2xs",opacity:.7,color:h,lineHeight:"1.1",children:_})]})]}),(0,i.jsx)(l.J,{size:"xs",position:"absolute",top:"-6px",right:"-6px",bg:"red.500",color:"white",borderRadius:"full",onClick:a,_hover:{bg:"red.600"}})]})},u=e=>{var t;let{url:a,resolved:l,imageBoxSize:d,imageMaxH:p,imageMaxW:u,borderColor:h,docTextColor:f,docBackground:y}=e,g=l||(a?{url:a,filename:null,content_type:null,key:null}:null);if(!g||!g.url)return null;if(l?(0,c.M8)(l):!(0,c.pq)(g.url))return(0,i.jsx)(n._,{src:g.url,alt:g.filename||"Attachment",boxSize:d,maxH:p,maxW:u,objectFit:"cover",borderRadius:"md",border:"2px solid",borderColor:h||"border.emphasized",cursor:"pointer",loading:"lazy",decoding:"async",onClick:()=>window.open(g.url,"_blank"),_hover:{opacity:.9}});let b=(null==(t=g.filename)?void 0:t.trim())||(0,c.l4)(g.url),x=(e=>{if(!e)return null;let t=e.toLowerCase();return"application/pdf"===t?"PDF":"text/csv"===t?"CSV":"text/plain"===t?"TXT":t.startsWith("image/")?"IMG":null})(g.content_type)||(0,c.xs)(g.url),_=m(x),w=!(0,c.E0)(g.url);return(0,i.jsxs)(o.z,{px:2.5,py:2,borderWidth:"1px",borderColor:h||"border.emphasized",borderRadius:"md",bg:y||"transparent",curs
1or:w?"pointer":"default",_hover:w?{opacity:.85}:void 0,onClick:w?()=>window.open(g.url,"_blank"):void 0,gap:2,maxW:"240px",children:[(0,i.jsx)(_,{size:16}),(0,i.jsxs)(r.a,{minW:0,children:[(0,i.jsx)(s.E,{fontSize:"xs",fontWeight:"medium",color:f,lineClamp:1,wordBreak:"break-all",children:b}),(0,i.jsx)(s.E,{fontSize:"2xs",opacity:.7,color:f,lineHeight:"1.1",children:w?"".concat(x," \xb7 Download"):x})]})]})}}}]);

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.