PageSourceSearch

https://www.attachedapp.com/_next/static/chunks/171.0fd847359abc0d44.js

js attachedapp.com collected 2026-09-25 02:33:56 UTC 6,658 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[171],{171:(e,t,a)=>{a.r(t),a.d(t,{default:()=>m});var l=a(7876),r=a(4232),s=a(8230),n=a.n(s),o=a(9099),i=a(4288),c=a(7167),h=a(5504),d=a(8585);let u="#B23A55";function m(){let e=(0,o.useRouter)(),[t,a]=(0,r.useState)({status:"loading"}),[s,m]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(!e.isReady)return;let{id:t}=e.query;if(!t||"string"!=typeof t)return void a({status:"error"});if(/^[a-f0-9]{12}$/.test(t)){let e=!1;return fetch("/api/hugs/".concat(t)).then(async e=>{if(!e.ok)throw Error("not found");return e.json()}).then(t=>{if(e)return;let l=t&&"object"==typeof t?t:null;l&&l.you&&l.them?a({status:"ready",data:l}):a({status:"error"})}).catch(()=>{e||a({status:"error"})}),()=>{e=!0}}let l=(0,h.F)(t);l?a({status:"ready",data:l}):a({status:"error"})},[e.isReady,e.query]);let x="ready"===t.status&&t.data.fromName.trim()?t.data.fromName.trim():"Someone special",p="ready"===t.status?t.data.fromName.trim():"";return(0,l.jsxs)("div",{className:"relative flex min-h-[100svh] flex-col overflow-hidden bg-gradient-to-b from-[#FFE8DE] via-[#FFD9E0] to-[#FFC9D6]",children:[(0,l.jsxs)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 opacity-50",children:[(0,l.jsx)("div",{className:"absolute -top-24 left-1/2 h-72 w-[520px] -translate-x-1/2 rounded-full bg-white blur-3xl"}),(0,l.jsx)("div",{className:"absolute top-56 -right-40 h-72 w-[520px] rounded-full bg-white blur-3xl"}),(0,l.jsx)("div",{className:"absolute bottom-36 left-1/2 h-80 w-[560px] -translate-x-1/2 rounded-full bg-white blur-3xl"})]}),(0,l.jsxs)("div",{className:"relative z-10 mx-auto flex w-full max-w-[430px] flex-1 flex-col items-center px-6 pb-12 pt-[4svh]",children:[(0,l.jsx)(i.A,{size:"sm"}),"loading"===t.status&&(0,l.jsx)("p",{className:"mt-24 text-[16px] text-black/60",children:"Opening your hug..."}),"error"===t.status&&(0,l.jsxs)("div",{className:"mt-24 flex flex-col items-center gap-4 text-center",children:[(0,l.jsx)("h1",{className:"text-[26px] leading-tight text-black",children:"Oops!"}),(0,l.jsx)("p",{className:"text-[16px] text-black/70",children:"This hug link isn't working. It may be incomplete or expired."}),(0,l.jsx)(n(),{href:"/send-a-virtual-hug/edit",className:"mt-2 rounded-full px-7 py-4 text-[17px] font-semibold text-white shadow-lg",style:{backgroundColor:u},children:"Send your own hug →"})]}),"ready"===t.status&&!s&&(0,l.jsxs)("div",{className:"mt-16 flex flex-col items-center gap-6 text-center",children:[(0,l.jsxs)("h1",{className:"text-[28px] leading-tight text-black",children:[x," sent you a hug!"]}),(0,l.jsxs)("button",{type:"button",onClick:()=>m(!0),"aria-label":"Open hug from ".concat(x),className:"group flex flex-col items-center gap-3",children:[(0,l.jsx)("span",{className:"grid h-40 w-40 animate-pulse place-items-center rounded-full bg-white/80 text-[72px] shadow-xl transition group-active:scale-95",children:"\uD83E\uDEC2"}),(0,l.jsx)("span",{className:"text-[17px] font-semibold",style:{color:u},children:"Tap to open"})]})]}),"ready"===t.status&&s&&(0,l.jsxs)("div",{className:"mt-6 flex w-full flex-col items-center gap-6",children:[(0,l.jsx)(c.A,{you:t.data.you,them:t.data.them,className:"w-full max-w-[380px]"}),(0,l.jsx)(d.R,{surface:"hug",senderName:p,ctaLocation:"virtual_hug_receive_card"}),(0,l.jsxs)("div",{className:"w-full rounded-[22px] border border-white/60 bg-white/80 px-6 py-6 text-center shadow-[0_18px_50px_rgba(0,0,0,0.08)]",children:[t.data.toName.trim()&&(0,l.jsxs)("p",{className:"text-[15px] font-semibold uppercase tracking-[0.08em] text-black/50",children:["To ",t.data.toName.trim()]}),(0,l.jsx)("p",{className:"mt-3 whitespace-pre-wrap text-[19px] leading-relaxed text-black",children:t.data.message.trim()||"Sending you a big hug..."}),(0,l.jsxs)("p",{className:"mt-4 text-[16px] font-semibold",style:{color:u},children:["— ",x]})]}),(0,l.jsx)(n(),{href:"/send-a-virtual-hug/edit",className:"w-full rounded-full px-8 py-4 text-center text-[18px] font-semibold text-white shadow-lg transition active:scale-[0.99]",style:{backgroundColor:u},children:"Send one back / to someone else →"}),(0,l.jsx)("p",{className:"-mt-3 text-[14px] text-black/60",children:"Free • Takes 1 minute"})]})]})]})}},5504:(e,t,a)=>{a.d(t,{F:()=>o,PI:()=>s,Ve:()=>n,vc:()=>r});var l=a(3223);let r=120,s=2e3;function n(e){try{let t=JSON.stringify(e),a=encodeURIComponent(t);return btoa(a).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}catch(e){return console.error("Failed to encode hug data:",e),""}}function o(e){try{let t=e.replace(/-/g,"+").replace(/_/g,"/"),a=t.length%4;a&&(t+="=".repeat(4-a));let n=atob(t),o=decodeURIComponent(n),i=JSON.parse(o);if(!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!e&&"object"==typeof e&&!!e.you&&!!e.them&&e.you in l.o3&&e.them in l.o3&&"string"==typeof e.message&&"string"==typeof e.toName&&"string"==typeof e.fromName&&(!t.enforceLengthLimits||!(e.message.length>s)&&!(e.toName.length>r)&&!(e.fromName.length>r))&&!0}(i))return null;return i}catch(e){return console.error("Failed to decode hug data:",e),null}}},8585:(e,t,a)=>{a.d(t,{R:()=>i});var l=a(7876),r=a(4232),s=a(1062);let n="https://go.attachedapp.com/web",o={hug:{withName:"A hug helps right now. [hl]Feeling secure[/hl] lasts — start your [hl]free[/hl] plan with [b]{name}[/b] →",withoutName:"A hug helps right now. [hl]Feeling secure[/hl] lasts — start your [hl]free[/hl] plan →"},openWhen:{withName:"Letters for the hard moments. [hl]Tools[/hl] for all the others — start your [hl]free[/hl] plan with [b]{name}[/b] →",withoutName:"Letters for the hard moments. [hl]Tools[/hl] for all the others — start your [hl]free[/hl] plan →"}};function i(e){let{surface:t,senderName:a,ctaLocation:i}=e,c=function(e,t){let a=o[e],l=(t||"").trim();return l?a.withName.replace("{name}",l.replace(/\[/g,"[").replace(/\]/g,"]")):a.withoutName}(t,a);return(0,l.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",onClick:()=>(0,s.rT)(n,{location:i,linkText:c}),className:"block w-full overflow-hidden rounded-[22px] bg-[#0B4F22] px-6 py-5 text-white no-underline shadow-[0_16px_36px_rgba(12,79,34,0.24)]",children:(0,l.jsx)("p",{className:"text-[18px] font-medium leading-tight sm:text-[20px]",children:c.split(/(\[hl\].*?\[\/hl\]|\[b\].*?\[\/b\])/g).filter(
1Boolean).map((e,t)=>{let a=e.match(/^\[hl\](.*)\[\/hl\]$/);if(a)return(0,l.jsx)("span",{className:"font-semibold text-[#FAFF00]",children:a[1]},t);let s=e.match(/^\[b\](.*)\[\/b\]$/);return s?(0,l.jsx)("span",{className:"font-semibold",children:s[1]},t):(0,l.jsx)(r.Fragment,{children:e},t)})})})}}}]);

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.