1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3123],{13816:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/shorten",function(){return n(84176)}])},84176:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var s=n(37876),l=n(68106),o=n(42298),r=n(67514),i=n(26573),a=n(4913),u=n(14232);function c(){let[e,t]=(0,u.useState)(null),n=(0,u.useContext)(i.F),c=null==n?void 0:n.user,[d,h]=(0,u.useState)("");async function m(e){if(!e)return void t(null);c&&(e+="?utm_source=".concat((null==c?void 0:c.name)||c.id,"&utm_medium=shortener"));let n=await a.pB.post("/shorten",{originalUrl:e});201===n.status||200===n.status?t(window.location.origin+"/link/"+n.data.shortCode):t(null)}return(0,s.jsxs)(l.A,{className:"flex flex-col items-center justify-center",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold mb-4",children:"Shorten URL"}),(0,s.jsx)("p",{className:"mb-4",children:"Enter a URL to shorten it. The shortened URL will be displayed below."}),(0,s.jsx)(r.p,{type:"text",value:d,onChange:e=>h(e.target.value),placeholder:"Enter URL to shorten",className:"mb-4 min-w-96 max-w-fit"}),(0,s.jsx)(o.$,{onClick:()=>m(d),children:"Shorten"}),e&&(0,s.jsx)("div",{children:(0,s.jsxs)("p",{children:["Shortened URL: ",e]})})]})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=13816)),_N_E=e.O()}]);
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.