PageSourceSearch

https://www.instaloops.com/_next/static/chunks/20945.a5e2d78a58cd4f2f.js

js instaloops.com collected 2026-10-09 22:43:23 UTC 4,321 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[20945],{20945:function(e,t,s){s.r(t),s.d(t,{default:function(){return u}});var l=s(65724),a=s(80710),o=s(34102),r=s(2512),n=s(28266),i=s(92483),d=s(76205),c=s(68816);function u(e){let{postId:t,quotedPost:s,open:u,onClose:m,onQuoted:x,author:p}=e,[h,f]=(0,r.useState)(""),[b,v]=(0,r.useState)(!1),g=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(u){let e=setTimeout(()=>{var e;return null===(e=g.current)||void 0===e?void 0:e.focus()},60);return()=>clearTimeout(e)}},[u]);let y=(0,i.a)({onClose:()=>{b||m()},autoFocus:!1});if(!u)return null;let j=h.trim(),w=2e3-h.length,N=j.length>0&&w>=0&&!b,k=()=>{b||(f(""),m())},C=async()=>{if(N){v(!0);try{var e,s,l;let a=await fetch("/api/v2/community/posts/".concat(t,"/repost"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:j})}),o=await a.json().catch(()=>null);if(401===a.status){n.Am.error("Please sign in to quote posts");return}if(!a.ok||!(null==o?void 0:o.success))throw Error((null==o?void 0:o.message)||"Failed to post the quote");n.Am.success("Quote posted"),null==x||x(null===(e=o.data)||void 0===e?void 0:e.post,null!==(l=null===(s=o.data)||void 0===s?void 0:s.repostCount)&&void 0!==l?l:0),f(""),m()}catch(e){console.error("Quote post error:",e),n.Am.error(e instanceof Error&&e.message?e.message:"Couldn't post the quote. Please try again.")}finally{v(!1)}}};return(0,l.jsxs)("div",{ref:y,role:"dialog","aria-modal":"true","aria-labelledby":"quote-post-title",tabIndex:-1,className:"fixed inset-0 z-[200] flex items-stretch justify-center sm:items-start sm:p-4 sm:pt-[10vh]",onClick:e=>e.stopPropagation(),children:[(0,l.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:k}),(0,l.jsxs)("div",{className:"relative flex h-[100dvh] w-full flex-col overflow-hidden bg-white pt-safe-top shadow-xl sm:h-auto sm:max-h-[80vh] sm:max-w-lg sm:rounded-2xl sm:pt-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3 border-b border-gray-100 px-4 py-2.5 sm:px-5 sm:py-3",children:[(0,l.jsx)("button",{type:"button",onClick:k,disabled:b,"aria-label":"Close",className:"-ml-1.5 flex h-11 w-11 items-center justify-center rounded-full text-[#536471] transition-colors hover:bg-gray-100 hover:text-[#0f1419] disabled:opacity-50 sm:h-9 sm:w-9",children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",className:"h-5 w-5","aria-hidden":"true",children:(0,l.jsx)("path",{stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",d:"M18 6 6 18M6 6l12 12"})})}),(0,l.jsx)("h2",{id:"quote-post-title",className:"flex-1 text-[16px] font-bold text-[#0f1419]",children:"Quote post"}),(0,l.jsx)("span",{"aria-live":"polite",className:(0,d.cn)("text-[13px] tabular-nums",w<0?"font-semibold text-[#f4212e]":h.length>=1800?"text-amber-600":"text-[#536471]"),children:h.length>=1800?w:""}),(0,l.jsxs)("button",{type:"button",onClick:()=>
1void C(),disabled:!N,className:"hover:bg-[#0b0b0b]/85 flex min-h-[36px] items-center gap-1.5 rounded-full bg-[#0b0b0b] px-4 py-2 text-[14px] font-bold text-white transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[b&&(0,l.jsx)(a.Z,{className:"h-3.5 w-3.5 animate-spin"}),b?"Posting…":"Post"]})]}),(0,l.jsx)("div",{className:"flex-1 overflow-y-auto px-4 py-4 sm:px-5",children:(0,l.jsxs)("div",{className:"flex gap-3",children:[(null==p?void 0:p.profileImage)?(0,l.jsx)(o.default,{src:p.profileImage,alt:"",width:40,height:40,className:"h-10 w-10 flex-shrink-0 rounded-full object-cover"}):(0,l.jsx)("div",{className:"h-10 w-10 flex-shrink-0 rounded-full bg-gray-200"}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("textarea",{ref:g,value:h,onChange:e=>f(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),C())},rows:3,placeholder:"Add a comment","aria-label":"Add a comment to your quote",className:"w-full resize-none border-0 p-0 text-[17px] leading-6 text-[#0f1419] placeholder:text-gray-400 focus:outline-none focus:ring-0"}),(0,l.jsx)(c.ZP,{post:s,compact:!0})]})]})}),(0,l.jsx)("div",{className:"flex items-center justify-end border-t border-gray-100 px-4 py-2.5 pb-safe-bottom sm:px-5",children:(0,l.jsxs)("span",{className:"text-[13px] tabular-nums text-[#536471]",children:[h.length,"/",2e3]})})]})]})}}}]);

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.