1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a110ff-fdc8-7902-b502-f6a09329fef1")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[780,2008],{32008:(e,t,n)=>{n.r(t),n.d(t,{CommentsField:()=>E});var l=n(25440),i=n(88847),a=n(1780),o=n(43991),r=n(49718),d=n(86768),c=n(41072),s=n(35014),u=n(54061),p=n(32200),h=n(26826),m=n(29546),f=n(47770),g=n(39458),x=n(12272),C=n(54867),y=n(38690),b=n(97594),I=n(18855),k=n(61532),w=n(74184),v=n(25690),j=n(37237),D=n(9799),P=n(95213),_=n(50780);let S=(0,k.I4)(I.so).withConfig({displayName:"ContentStack",componentId:"sc-kyng0k-0"})`width:320px;`;function $(e){let t,n,o,d,u,p=(0,m.c)(69),{count:f,currentUser:x,fieldTitle:b,isCreatingDataset:k,mentionOptions:w,onChange:v,onClick:j,onClose:D,onCommentAdd:$,onDiscard:N,onInputKeyDown:A,open:H,value:E}=e,{t:M}=(0,l.t)(i.gi),{error:O}=(0,s.t)(),V=(0,h.useRef)(null),[z,L]=(0,h.useState)(null),R=(0,h.useRef)(null),T=f>0,F;p[0]!==z||p[1]!==D||p[2]!==H?(F=()=>{H&&(D(),z?.focus())},p[0]=z,p[1]=D,p[2]=H,p[3]=F):F=p[3];let K=F,Y;p[4]!==K||p[5]!==$?(Y=e=>{$(e),K()},p[4]=K,p[5]=$,p[6]=Y):Y=p[6];let Z=Y,B;p[7]===E?B=p[8]:(B=(0,i.ui)(E),p[7]=E,p[8]=B);let W=B,q;p[9]!==K||p[10]!==W?(q=()=>{W?R.current?.discardDialogController.open():K()},p[9]=K,p[10]=W,p[11]=q):q=p[11];let G=q,J;p[12]===A?J=p[13]:(J=e=>{e.isDefaultPrevented()||A&&A(e)},p[12]=A,p[13]=J);let Q=J,U;p[14]===Symbol.for("react.memo_cache_sentinel")?(U=()=>{R.current?.discardDialogController.close()},p[14]=U):U=p[14];let X=U,ee;p[15]!==K||p[16]!==N?(ee=()=>{R.current?.discardDialogController.close(),K(),N()},p[15]=K,p[16]=N,p[17]=ee):ee=p[17];let et=ee,en;p[18]===G?en=p[19]:(en=e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),G())},p[18]=G,p[19]=en);let el=en,ei;if(p[20]===Symbol.for("react.memo_cache_sentinel")?(ei=()=>[V.current],p[20]=ei):ei=p[20],(0,C.t)(H&&G,ei),!T){let e,t,n,l,o,d;p[21]===b?e=p[22]:(e={field:b},p[21]=b,p[22]=e),p[23]!==M||p[24]!==e?(t=(0,g.jsx)(c.t,{t:M,i18nKey:"compose.add-comment-input-placeholder",values:e}),p[23]=M,p[24]=e,p[25]=t):t=p[25];let s=t,u;p[26]!==x||p[27]!==et||p[28]!==Q||p[29]!==Z||p[30]!==k||p[31]!==w||p[32]!==v||p[33]!==s||p[34]!==E?(u=(0,g.jsx)(S,{padding:2,gap:4,flexDirection:"column",children:(0,g.jsx)(i.ci,{currentUser:x,focusLock:!0,focusOnMount:!0,mentionOptions:w,onChange:v,onDiscardCancel:X,onDiscardConfirm:et,onKeyDown:Q,onSubmit:Z,placeholder:s,readOnly:k,ref:R,value:E})}
1),p[26]=x,p[27]=et,p[28]=Q,p[29]=Z,p[30]=k,p[31]=w,p[32]=v,p[33]=s,p[34]=E,p[35]=u):u=p[35];let h=u,m;p[36]===Symbol.for("react.memo_cache_sentinel")?(m=["bottom-end"],p[36]=m):m=p[36],p[37]===M?n=p[38]:(n=M("field-button.aria-label-add"),p[37]=M,p[38]=n);let f=k||!!O,C;return p[39]===M?C=p[40]:(C=M("field-button.title"),p[39]=M,p[40]=C),p[41]===C?l=p[42]:(l={content:C,placement:"top"},p[41]=C,p[42]=l),p[43]!==j||p[44]!==H||p[45]!==n||p[46]!==f||p[47]!==l?(o=(0,g.jsx)("div",{children:(0,g.jsx)(a.o,{"aria-label":n,disabled:f,icon:_.AddCommentIcon,mode:"bleed",onClick:j,ref:L,selected:H,tooltipProps:l})}),p[43]=j,p[44]=H,p[45]=n,p[46]=f,p[47]=l,p[48]=o):o=p[48],p[49]!==h||p[50]!==el||p[51]!==H||p[52]!==o?(d=(0,g.jsx)(r.r,{constrainSize:!0,content:h,fallbackPlacements:m,open:H,placement:"right-start",portal:!0,ref:V,onKeyDown:el,children:o}),p[49]=h,p[50]=el,p[51]=H,p[52]=o,p[53]=d):d=p[53],d}p[54]!==f||p[55]!==M?(t=M("field-button.content",{count:f}),p[54]=f,p[55]=M,p[56]=t):t=p[56],p[57]===M?n=p[58]:(n=M("field-button.aria-label-open"),p[57]=M,p[58]=n),p[59]===Symbol.for("react.memo_cache_sentinel")?(o=(0,g.jsx)(I.In,{muted:!0,size:1,icon:P.CommentIcon,style:{margin:"-0.375rem"}}),p[59]=o):o=p[59];let ea=f>9?"9+":f,eo;return p[60]===ea?eo=p[61]:(eo=(0,g.jsxs)(I.so,{alignItems:"center",gap:2,children:[o,(0,g.jsx)(I.EY,{size:0,as:"div",trim:!0,children:ea})]}),p[60]=ea,p[61]=eo),p[62]!==j||p[63]!==n||p[64]!==eo?(d=(0,g.jsx)(y.t,{"aria-label":n,mode:"bleed",onClick:j,padding:2,gap:2,children:eo}),p[62]=j,p[63]=n,p[64]=eo,p[65]=d):d=p[65],p[66]!==d||p[67]!==t?(u=(0,g.jsx)(a.s,{portal:!0,placement:"top",content:t,children:d}),p[66]=d,p[67]=t,p[68]=u):u=p[68],u}let N=new Map,A=[],H={initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0}};function E(e){let t,n=(0,m.c)(5),{enabled:l,mode:a}=(0,i.er)();if(!l){let t;return n[0]===e?t=n[1]:(t=e.renderDefault(e),n[0]=e,n[1]=t),t}return n[2]!==a||n[3]!==e?(t=(0,g.jsx)(V,{...e,mode:a}),n[2]=a,n[3]=e,n[4]=t):t=n[4],t}let M=(0,k.I4)(j.PY1.div).withConfig({displayName:"HighlightDiv",componentId:"sc-9nisbw-0"})(({theme:e})=>{let{radius:t,space:n,color:l}=e.sanity,a=w.OZ[i.ii][l.dark?900:50].hex;return(0,k.AH)`mix-blend-mode:${l.dark?"screen":"multiply"};border-radius:${t[3]}px;top:-${n[2]}px;left:-${n[2]}px;bottom:-${n[2]}px;right:-${n[2]}px;pointer-events:none;position:absolute;z-index:1;width:calc(100% + ${2*n[2]}px);height:calc(100% + ${2*n[2]}px);background-color:${a};`}),O=(0,k.I4)(I.Tk).withConfig({displayName:"FieldStack",componentId:"sc-9nisbw-1"})`position:relative;&:empty:not([hidden]){display:none;}`;function V(e){let t,n,l,a,r,c,s,C=(0,m.c)(86),{mode:y}=e,I=(0,d.n)(),{element:k}=(0,b.a)(),w=(0,h.useRef)(null),{comments:j,isCommentsOpen:P,isCreatingDataset:_,mentionOptions:S,onCommentsOpen:E,operation:V,setStatus:T,status:F}=(0,u.t)(),{upsellData:K,handleOpenDialog:Y}=(0,p.t)(),{selectedPath:Z,setSelectedPath:B}=(0,i.ti)(),{authoringPath:W,setAuthoringPath:q}=function(){let e=(0,h.useContext)(f.ki);if(!e)throw Error("useCommentsAuthoringPath: missing context value");return e}(),G;C[0]===k?G=C[1]:(G={boundaryElement:k},C[0]=k,C[1]=G);let{scrollToGroup:J}=(0,i.$r)(G),Q;C[2]===e.schemaType?Q=C[3]:(Q=(0,o.N)(e.schemaType),C[2]=e.schemaType,C[3]=Q);let U=Q,X;C[4]===e.path?X=C[5]:(X=x.dI(e.path),C[4]=e.path,C[5]=X);let ee=X,et;C[6]===ee?et=C[7]:(et=N.get(ee)||null,C[6]=ee,C[7]=et);let[en,el]=(0,h.useState)(et),ei=W===ee,ea;C[8]!==P||C[9]!==e.path||C[10]!==Z?.fieldPath||C[11]!==Z?.origin?(ea=()=>!!P&&Z?.origin!=="form"&&Z?.origin!=="url"&&R(Z?.fieldPath,e.path),C[8]=P,C[9]=e.path,C[10]=Z?.fieldPath,C[11]=Z?.origin,C[12]=ea):ea=C[12],Z?.fieldPath,Z?.origin,C[13]===ea?t=C[14]:(t=ea(),C[13]=ea,C[14]=t);let eo=t;if(Z?.threadId,C[15]!==j.data.open||C[16]!==Z?.threadId){let e;C[18]===Z?.threadId?e=C[19]:(e=e=>e.threadId===Z?.threadId,C[18]=Z?.threadId,C[19]=e),n=j.data.open.filter(e).some(L),C[15]=j.data.open,C[16]=Z?.threadId,C[17]=n}else n=C[17];let er=n,ed;if(C[20]!==j.data.open||C[21]!==e.path){let t;C[23]===e.path?t=C[24]:(t=t=>R(t.fieldPath,e.path)?t.commentsCount:0,C[23]=e.path,C[24]=t),ed=j.data.open.map(t).reduce(z,0),C[20]=j.data.open,C[21]=e.path,C[22]=ed}else ed=C[22];let ec=ed||0,es=ec>0,eu;C[25]===ee?eu=C[26]:(eu=()=>{el(null),N.delete(ee)},C[25]=ee,C[26]=eu);let ep=eu,eh;C[27]!==j.data.open||C[28]!==Y||C[29]!==es||C[30]!==ei||C[31]!==y||C[32]!==E||C[33]!==e.path||C[34]!==J||C[35]!==q||C[36]!==B||C[37]!==T||C[38]!==F||C[39]!==ee||C[40]!==K?(eh=()=>{if(es){"resolved"===F&&T("open"),q(null),E?.();let t=j.data.open.find(t=>R(t.fieldPath,e.path));t&&(B({threadId:t.threadId,origin:"form",fieldPath:t.fieldPath}),J(t.threadId));return}"upsell"===y?K?Y("field_action"):E?.():q(ei?null:ee)},C[27]=j.data.open,C[28]=Y,C[29]=es,C[30]=ei,C[31]=y,C[32]=E,C[33]=e.path,C[34]=J,C[35]=q,C[36]=B,C[37]=T,C[38]=F,C[39]=ee,C[40]=K,C[41]=eh):eh=C[41];let em=eh,ef;C[42]!==E||C[43]!==V||C[44]!==e.path||C[45]!==ep||C[46]!==J||C[47]!==B||C[48]!==T||C[49]!==F?(ef=t=>{if(t){let n=(0,v.A)(),l={type:"field",fieldPath:x.dI(e.path),message:t,parentCommentId:void 0,status:"open",threadId:n,reactions:A};V.create(l),E?.(),"resolved"===F&&T("open"),ep(),B({threadId:n,origin:"form",fieldPath:x.dI(e.path)}),J(n)}},C[42]=E,C[43]=V,C[44]=e.path,C[45]=ep,C[46]=J,C[47]=B,C[48]=T,C[49]=F,C[50]=ef):ef=C[50];let eg=ef,ex;C[51]===q?ex=C[52]:(ex=()=>q(null),C[51]=q,C[52]=ex);let eC=ex,ey;C[53]===ee?ey=C[54]:(ey=e=>{el(e),N.set(ee,e)},C[53]=ee,C[54]=ey);let eb=ey,eI;C[55]!==ec||C[56]!==I||C[57]!==U||C[58]!==em||C[59]!==eC||C[60]!==eg||C[61]!==eb||C[62]!==_||C[63]!==ei||C[64]!==S||C[65]!==ep||C[66]!==en?(eI=I&&(0,g.jsx)($,{count:Number(ec),currentUser:I,fieldTitle:U,isCreatingDataset:_,mentionOptions:S,onChange:eb,onClick:em,onClose:eC,onCommentAdd:eg,onDiscard:ep,open:ei,value:en}),C[55]=ec,C[56]=I,C[57]=U,C[58]=em,C[59]=eC,C[60]=eg,C[61]=eb,C[62]=_,C[63]=ei,C[64]=S,C[65]=ep,C[66]=en,C[67]=eI):eI=C[67],C[68]!==es||C[69]!==ei||C[70]!==eI?(l={button:eI,hasComments:es,isAddingComment:ei},C[68]=es,C[69]=ei,C[70]=eI,C[71]=l):l=C[71];let ek=l,ew;return C[72]===e.path?ew=C[73]:(ew=(0,i.Zr)(x.dI(e.path)),C[72]=e.path,C[73]=ew),
1C[74]!==ek||C[75]!==e?(a=e.renderDefault({...e,__internal_comments:ek}),C[74]=ek,C[75]=e,C[76]=a):a=C[76],C[77]!==er||C[78]!==eo?(r=eo&&!er&&(0,g.jsx)(M,{animate:"animate",exit:"exit",initial:"initial",variants:H}),C[77]=er,C[78]=eo,C[79]=r):r=C[79],C[80]===r?c=C[81]:(c=(0,g.jsx)(D.N,{children:r}),C[80]=r,C[81]=c),C[82]!==ew||C[83]!==a||C[84]!==c?(s=(0,g.jsxs)(O,{...ew,ref:w,children:[a,c]}),C[82]=ew,C[83]=a,C[84]=c,C[85]=s):s=C[85],s}function z(e,t){return e+t}function L(e){return(0,i.di)(e.parentComment)}function R(e,t){let n=(0,i.fi)(e);return!!n&&x.w1(t,n)}},32200:(e,t,n)=>{n.d(t,{t:()=>o});var l=n(26826),i=n(29546),a=n(47770);function o(){let e=(0,i.c)(1),t=(0,l.useContext)(a.F8);if(!t){let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={upsellData:null,handleOpenDialog:m,handleClose:h,upsellDialogOpen:!1,telemetryLogs:{dialogSecondaryClicked:p,dialogPrimaryClicked:u,panelViewed:s,panelDismissed:c,panelPrimaryClicked:d,panelSecondaryClicked:r}},e[0]=t):t=e[0],t}return t}function r(){return null}function d(){return null}function c(){return null}function s(){return null}function u(){return null}function p(){return null}function h(){return null}function m(){return null}},50780:(e,t,n)=>{n.r(t),n.d(t,{AddCommentIcon:()=>a,default:()=>a});var l=n(26826),i=n(39458);let a=(0,l.forwardRef)(function(e,t){return(0,i.jsx)("svg",{"data-sanity-icon":"add-comment",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:(0,i.jsx)("path",{d:"M13 6.5H7.5C6.39543 6.5 5.5 7.39543 5.5 8.5V14.5C5.5 15.6046 6.39543 16.5 7.5 16.5H9.5V20.5L13.5 16.5H16.5C17.6046 16.5 18.5 15.6046 18.5 14.5V12M15 6.5H22M18.5 10V3",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})}}]); 2//# chunkId=01a110ff-fdc8-7902-b502-f6a09329fef1
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.