PageSourceSearch

https://all-restaurant.ru/_next/static/chunks/2145.ed3423e780247e0f.js

js all-restaurant.ru collected 2026-10-05 00:25:36 UTC 5,617 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2145],{2145:(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});var o=r(95818),a=r(16418),n=r(20449),i=r(41102);function l(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.trim();if(!/^-?\d+$/.test(r))throw Error("invalid-timestamp");let o=r.replace("-","").length,a=Number(r),n=new Date(o<=10?1e3*a:a);if(Number.isNaN(n.getTime()))throw Error("invalid-timestamp");return function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.toISOString(),o=e.toLocaleString("vi-VN");return t?"".concat(r," | ").concat(o):"ISO: ".concat(r,"\nLocal: ").concat(o)}(n,t)}function d(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Date(e.trim());if(Number.isNaN(r.getTime()))throw Error("invalid-date");let o=r.getTime(),a=Math.floor(o/1e3);return t?"".concat(a," | ").concat(o):"Gi\xe2y: ".concat(a,"\nMili-gi\xe2y: ").concat(o)}function s(){let[e,t]=(0,a.useState)("timestamp-to-date"),[r,s]=(0,a.useState)(!1),[c,u]=(0,a.useState)(""),[m,p]=(0,a.useState)(!1),g=(0,a.useMemo)(()=>{if(!c.trim())return{output:"",error:""};try{if(r)return{output:c.split("\n").map((t,r)=>{if(!t.trim())return"";try{return"timestamp-to-date"===e?l(t,!0):d(t,!0)}catch(e){return"<d\xf2ng ".concat(r+1," kh\xf4ng hợp lệ>")}}).join("\n"),error:""};return{output:"timestamp-to-date"===e?l(c):d(c),error:""}}catch(t){return{output:"",error:"timestamp-to-date"===e?"Timestamp kh\xf4ng hợp lệ. H\xe3y nhập gi\xe2y hoặc mili-gi\xe2y.":"Ng\xe0y giờ kh\xf4ng hợp lệ. H\xe3y kiểm tra lại định dạng đầu v\xe0o."}}},[r,c,e]),b=async()=>{if(g.output){var e;await (e=g.output,(async()=>{try{if(navigator.clipboard&&document.hasFocus())await navigator.clipboard.writeText(e);else throw Error("Clipboard requires focused document")}catch(r){let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.left="-9999px",t.style.top="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}})()),p(!0),window.setTimeout(()=>p(!1),1800)}};return(0,o.jsxs)("div",{className:"grid gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]",children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[[{value:"timestamp-to-date",label:"Timestamp → Ng\xe0y giờ"},{value:"date-to-timestamp",label:"Ng\xe0y giờ → Timestamp"}].map(r=>(0,o.jsx)("button",{type:"button",onClick:()=>t(r.value),className:"rounded-full px-4 py-2 text-sm font-semibold transition ".concat(e===r.value?"bg-primary text-primary-foreground":"border border-border bg-background text-muted-foreground hover:text-foreground"),children:r.label},r.value)),(0,o.jsxs)("label",{className:"flex items-center gap-3 rounded-full border border-border bg-background px-4 py-2 text-sm text-foreground",children:[(0,o.jsx)("input",{type:"checkbox",checked:r,onChange:e=>s(e.target.checked),className:"h-4 w-4 rounded border-border accent-primary"}),"Bulk theo d\xf2ng"]}),(0,o.jsx)("button",{type:"button",onClick:()=>{if("timestamp-to-date"===e){u(String(Math.floor(Date.now()/1e3)));return}u(new Date().toISOString())},className:"ml-auto rounded-full border border-primary bg-accent px-4 py-2 text-sm font-semibold text-primary transition hover:bg-primary/20",children:"B\xe2y giờ"})]}),(0,o.jsxs)("div",{className:"mt-6",children:[(0,o.jsx)("label",{htmlFor:"unix-time-panel-input",className:"mb-3 block text-sm font-semibold text-foreground",children:"timestamp-to-date"===e?"Timestamp":"Ng\xe0y giờ"}),(0,o.jsx)("textarea",{id:"unix-time-panel-input",value:c,onChange:e=>u(e.target.value),placeholder:r?"timestamp-to-date"===e?"1700000000\n1700000000000":"2024-01-01T00:00:00Z\n2024-01-01 00:00:00":"timestamp-to-date"===e?"1700000000":"2024-01-01T00:00:00Z",spellCheck:!1,rows:14,className:"w-full resize-none rounded-3xl border border-border bg-background px-4 py-3 font-mono text-sm text-foreground outline-none transition placeholder:text-muted-foreground focus:border-primary focus:ring-2 focus:ring-primary/20"})]})]}),(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,o.jsx)("h2",{className:"text-lg font-bold text-foreground",children:"Kết quả"}),(0,o.jsxs)("button",{type:"button",onClick:()=>void b(),disabled:!g.output,className:"inline-flex items-center gap-2 rounded-full border px-4 py-2 text-sm font-semibold transition ".concat(m?"border-success bg-success/25 text-success-foreground":"border-primary bg-accent text-primary hover:border-primary hover:bg-primary/20"," disabled:cursor-not-allowed disabled:opacity-50"),children:[m?(0,o.jsx)(n.A,{className:"h-4 w-4"}):(0,o.jsx)(i.A,{className:"h-4 w-4"}),m?"Đ\xe3 copy":"Copy"]})]}),(0,o.jsx)("textarea",{readOnly:!0,value:g.output,placeholder:"Kết quả chuyển đổi sẽ hiện ở đ\xe2y",rows:14,className:"rounded-lg border border-border bg-background mt-6 w-full resize-none px-4 py-3 font-mono text-sm text-foreground outline-none placeholder:text-muted-foreground"}),g.error?(0,o.jsx)("div",{className:"mt-4 rounded-2xl border border-border bg-sidebar px-4 py-3 text-sm text-foreground",children:g.error}):null]})]})}},20449:(e,t,r)=>{r.d(t,{A:()=>
1o});let o=(0,r(41285).A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},41102:(e,t,r)=>{r.d(t,{A:()=>o});let o=(0,r(41285).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])}}]);

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.