@01.works/visual-review 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{embedded-source-DZCfzGp4.js → embedded-source-e0DrdxU8.js} +1 -1
- package/dist/{generated-source-context-C66OooTX.js → generated-source-context-R_klctZM.js} +1 -1
- package/dist/hosted-runtime-CbQolIXk.js +13 -0
- package/dist/index.js +1 -1
- package/dist/install-DvwZzCFL.js +1 -0
- package/dist/next.js +1 -1
- package/dist/react.js +1 -1
- package/dist/{source-context-C7pc-g90.js → source-context-leuy5fdX.js} +1 -1
- package/dist/src-F4lT3iYm.js +993 -0
- package/package.json +1 -1
- package/dist/hosted-runtime-DhsJeEIY.js +0 -13
- package/dist/install-CHc9lD7l.js +0 -1
- package/dist/src-CD6o7nmE.js +0 -993
|
@@ -0,0 +1,993 @@
|
|
|
1
|
+
import{a as e,c as t,d as n,f as r,i,l as a,m as o,n as s,o as c,p as l,r as u,s as d,u as f}from"./source-context-leuy5fdX.js";function p(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e.replace(/([^\w-])/g,`\\$1`)}function m(e){let t=v(e),n=h(e,t);if(t===document)return n;let r=[];for(;t!==document;){if(l(t)){let e=t.host,n=v(e);r.unshift({kind:`shadow`,selector:h(e,n)}),t=n;continue}let e=y(t);if(!e)return n;let i=v(e);r.unshift({kind:`frame`,selector:h(e,i)}),t=i}let i=c(r,n);return i.length<=4096?i:n}function h(e,t){let n=[],r=e,i=e.ownerDocument;for(;r&&r!==i.documentElement;){if(r===i.body){n.unshift(`body`);break}let e=_(r,t);if(e){n.unshift(e);break}let a=r.tagName.toLowerCase(),o=r.parentElement,s=o??g(r);if(s){let e=Array.from(s.children).filter(e=>e.tagName===r?.tagName);e.length>1&&(a+=`:nth-of-type(${e.indexOf(r)+1})`)}n.unshift(a),r=o}return n.join(` > `)}function g(e){let t=e.parentNode;return t&&`children`in t?t:null}function _(e,t){return[e.id?`#${p(e.id)}`:null,b(e,`data-review-id`),b(e,`data-testid`),b(e,`data-id`)].find(e=>{if(!e)return!1;try{return t.querySelectorAll(e).length===1}catch{return!1}})??null}function v(e){let t=e.getRootNode();return n(t)||l(t)?t:e.ownerDocument}function y(e){try{return e.defaultView?.frameElement??null}catch{return null}}function b(e,t){let n=e.getAttribute(t);return n?`[${t}="${p(n)}"]`:null}function x(e){if(!S(e))return!1;let n=C(e);for(;n;){if(!S(n))return!1;n=C(n)}let r=t(e);return r.width>0&&r.height>0&&e.getClientRects().length>0}function S(e){let t=e.ownerDocument.defaultView,n=t?.HTMLElement;if(n&&e instanceof n&&e.hidden)return!1;let r=t?.getComputedStyle(e);return!r||r.display===`none`||r.visibility===`hidden`||r.visibility===`collapse`?!1:r.opacity!==`0`&&r.contentVisibility!==`hidden`}function C(e){if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;let t=e.getRootNode();if(l(t))return t.host;if(t.nodeType===9&&t!==document)try{return t.defaultView?.frameElement??null}catch{return null}return null}function ee(e){if(!e.selector)return[];if(f(e.selector))return o(e.selector).filter(e=>!r(e));try{let t=Array.from(document.querySelectorAll(e.selector)).filter(e=>!r(e));if(t.length>0)return t}catch{return[]}return o(e.selector).filter(e=>!r(e))}function te(e,n,r){let i=t(e),a=Math.max(i.width,1),o=Math.max(i.height,1);return{selector:m(e),offsetX:T((n-(i.left+window.scrollX))/a),offsetY:T((r-(i.top+window.scrollY))/o),viewportX:T((n-window.scrollX)/Math.max(window.innerWidth,1)),viewportY:T((r-window.scrollY)/Math.max(window.innerHeight,1))}}function ne(e,t){return{selector:``,offsetX:T(e),offsetY:T(t),viewportX:T(e),viewportY:T(t)}}function w(e){let n=ee(e),r=n.find(x)??n[0]??null;if(r){let n=t(r);return{x:n.left+window.scrollX+n.width*e.offsetX,y:n.top+window.scrollY+n.height*e.offsetY,anchored:!0,visible:x(r),element:r}}return{x:window.scrollX+window.innerWidth*e.viewportX,y:window.scrollY+window.innerHeight*e.viewportY,anchored:!1,visible:!0,element:null}}function T(e){return Math.min(1,Math.max(0,Number.isFinite(e)?e:0))}function re(t){e(t)}function ie(e,t){let n=s();if(!n)return oe(e,t);try{let i=n.getElementAtPoint(e,t,{filter:e=>n.isElementGrabbable(e)&&!r(e)});return i?se(i,e,t):null}catch{return oe(e,t)}}function E(e){if(e.ownerDocument!==document)return t(e);let n=s();if(!n)return e.getBoundingClientRect();try{let t=n.getElementBounds(e);return new DOMRect(t.x,t.y,t.width,t.height)}catch{return e.getBoundingClientRect()}}function ae(t){e(t);let n=s();if(!n)return()=>void 0;let r=!1;try{if(!n.isFreezeActive()){let e=u(t);try{n.freeze(),r=!0}finally{e()}}}catch{return()=>void 0}let i=!1;return()=>{if(!(i||!r)){i=!0;try{n.unfreeze()}catch{}}}}function oe(e,t){let n=(typeof document.elementsFromPoint==`function`?document.elementsFromPoint(e,t):typeof document.elementFromPoint==`function`?[document.elementFromPoint(e,t)].filter(e=>!!e):[]).find(e=>!r(e))??null;return n?se(n,e,t):null}function se(e,t,n){let i=e,a=t,o=n,s=new Set;for(;!s.has(i);){s.add(i);let e=ce(i,a,o);if(e&&e!==i&&!r(e)){i=e;continue}let t=le(i,a,o);if(!t)break;i=t.element,a=t.clientX,o=t.clientY}return i}function ce(e,t,n){try{return e.shadowRoot?.elementFromPoint(t,n)??null}catch{return null}}function le(e,t,n){if(e.tagName.toLowerCase()!==`iframe`)return null;try{let i=e,o=i.contentDocument;if(!o)return null;let s=e.getBoundingClientRect(),c=a(i),l=(t-s.left)/c.x-i.clientLeft,u=(n-s.top)/c.y-i.clientTop,d=o.elementFromPoint(l,u);return d&&!r(d)?{element:d,clientX:l,clientY:u}:null}catch{return null}}const D=Symbol(`source-resolution-stopped`);function ue(e,t){let n=E(e),r=te(e,t.clientX+window.scrollX,t.clientY+window.scrollY),i=Te(n);return Se(r,`element`,i,[Ce(e,i)])}function de(e){let t=ie(e.clientX,e.clientY);return t?ue(t,e):Se(ne(e.clientX/Math.max(window.innerWidth,1),e.clientY/Math.max(window.innerHeight,1)),`viewport`,{pageX:e.clientX+window.scrollX,pageY:e.clientY+window.scrollY,width:0,height:0,viewportX:e.clientX,viewportY:e.clientY,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight},[])}function fe(e,n){let r=Math.min(e.clientX,n.clientX),i=Math.min(e.clientY,n.clientY),a=Math.abs(n.clientX-e.clientX),o=Math.abs(n.clientY-e.clientY),s=new DOMRect(r,i,a,o),c=ge(pe(s),he(s)).slice(0,8),l={clientX:r+a/2,clientY:i+o/2},u=c[0];return Se(u?te(u,l.clientX+window.scrollX,l.clientY+window.scrollY):ne(l.clientX/Math.max(window.innerWidth,1),l.clientY/Math.max(window.innerHeight,1)),`region`,Te(s),c.map(e=>Ce(e,Te(t(e)))))}function pe(e){let n=o(`*`).filter(n=>n===n.ownerDocument.body||n===n.ownerDocument.documentElement||r(n)||!x(n)?!1:Ee(e,t(n))),i=new Set(n),a=new Set;return n.forEach(e=>{let t=me(e);for(;t;)i.has(t)&&a.add(t),t=me(t)}),n.filter(e=>!a.has(e))}function me(e){if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;let t=e.getRootNode();if(l(t))return t.host;if(n(t)&&t!==document)try{return t.defaultView?.frameElement??null}catch{return null}return null}function he(e){return{clientX:e.left+e.width/2,clientY:e.top+e.height/2}}function ge(e,n){let r=e.findIndex(e=>{let r=t(e);return n.clientX>=r.left&&n.clientX<=r.right&&n.clientY>=r.top&&n.clientY<=r.bottom});return r<=0?e:[e[r],...e.slice(0,r),...e.slice(r+1)]}async function _e(e,t,n={}){if(n.signal?.aborted)return ye(e,t);let r=ve(n),i=e.elements.map(async e=>{let n=De(e.selector);if(!n)return{context:e,provenance:void 0};let i=await t.resolve(n,{signal:r.signal});return{context:{...e,source:i.source,componentStack:i.componentStack},provenance:i.provenance}});try{let n=await Promise.allSettled(i.map(e=>Promise.race([e,r.stopped]))),a=n.map((t,n)=>t.status===`fulfilled`&&t.value!==D?t.value.context:e.elements[n]),o=xe(n.flatMap(e=>e.status===`fulfilled`&&e.value!==D&&e.value.provenance?[{located:e.value.context.source!==null,provenance:e.value.provenance}]:[]))??e.sourceProvenance??be(t);return{...e,elements:a,...o?{sourceProvenance:o}:{}}}finally{r.dispose()}}function ve(e){let t=new AbortController,n=e.signal,r=()=>t.abort(n?.reason);n?.aborted?r():n?.addEventListener(`abort`,r,{once:!0});let i=e.deadlineMs??400,a=setTimeout(()=>t.abort(`source-resolution-deadline`),Number.isFinite(i)?Math.max(0,i):400),o=new Promise(e=>{if(t.signal.aborted){e(D);return}t.signal.addEventListener(`abort`,()=>e(D),{once:!0})});return{signal:t.signal,stopped:o,dispose(){clearTimeout(a),n?.removeEventListener(`abort`,r)}}}function ye(e,t){let n=e.sourceProvenance??be(t);return{...e,...n?{sourceProvenance:n}:{}}}function be(e){try{return e.unavailableProvenance?.()}catch{return}}function xe(e){return(e.find(e=>e.located)??e[0])?.provenance}function Se(e,t,n,r){return{kind:t,anchor:e,region:n,elements:r,pageUrl:`${window.location.origin}${window.location.pathname}`,pageTitle:document.title,capturedAt:Date.now()}}function Ce(e,t){return{selector:m(e),tagName:e.tagName.toLowerCase(),textPreview:we(e),rect:t,source:null,componentStack:[]}}function we(e){let t=(e instanceof HTMLElement?e.innerText:null)||e.textContent;return([e.getAttribute(`aria-label`),t,e.getAttribute(`alt`),e.getAttribute(`title`)].map(e=>(e??``).replace(/\s+/g,` `).trim()).find(Boolean)??``).slice(0,240)}function Te(e){return{pageX:e.left+window.scrollX,pageY:e.top+window.scrollY,width:e.width,height:e.height,viewportX:e.left,viewportY:e.top,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}}function Ee(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function De(e){return e?ee({selector:e,offsetX:0,offsetY:0,viewportX:0,viewportY:0})[0]??null:null}function Oe(e){let t,n=!1,r={pageId:e.pageId,peers:[],messages:[]},i,a,o=!1,s=!1,c=``,l=``,u=O(`rg-collaboration-cursors`);u.setAttribute(`aria-hidden`,`true`);let d=O(`rg-collaboration-participants`);d.setAttribute(`role`,`status`);let f=Ie(`rg-collaboration-chat-trigger`,`실시간 채팅 열기`);f.type=`button`,f.setAttribute(`aria-expanded`,`false`),f.setAttribute(`aria-keyshortcuts`,`/`),f.title=`실시간 채팅 열기 (/)`,f.append(Ae());let p=document.createElement(`section`);p.className=`rg-collaboration-chat`,p.hidden=!0,p.setAttribute(`role`,`dialog`),p.setAttribute(`aria-label`,`현재 페이지 실시간 채팅`);let m=()=>{je(d,r.peers,e.session.displayName),e.cursors&&Me(u,r.peers),e.chat&&h()},h=()=>{let t=e.root.activeElement?.classList.contains(`rg-collaboration-chat-input`)===!0;p.replaceChildren();let n=O(`rg-collaboration-chat-header`),i=document.createElement(`h2`);i.textContent=`현재 페이지 채팅`;let a=Ie(`rg-collaboration-chat-close`,`채팅 닫기`);a.type=`button`,a.textContent=`×`,a.addEventListener(`click`,()=>_(!1)),n.append(i,a);let u=O(`rg-collaboration-chat-messages`);if(u.setAttribute(`role`,`log`),u.setAttribute(`aria-live`,`polite`),r.messages.length===0){let e=O(`rg-collaboration-chat-empty`);e.textContent=`함께 보고 있는 사람에게 메시지를 남겨보세요.`,u.append(e)}else for(let t of r.messages){let n=document.createElement(`article`);n.className=`rg-collaboration-chat-message`,t.authorId===e.session.reviewerId&&(n.dataset.mine=`true`);let r=O(`rg-collaboration-chat-meta`),i=document.createElement(`strong`);i.textContent=t.authorName;let a=document.createElement(`time`);a.dateTime=new Date(t.createdAt).toISOString(),a.textContent=Pe(t.createdAt);let o=O(`rg-collaboration-chat-pathname`);o.textContent=t.pathname,o.title=`메시지를 보낸 페이지: ${t.pathname}`,r.append(i,o,a);let s=document.createElement(`p`);s.textContent=t.body,n.append(r,s),u.append(n)}let d=document.createElement(`form`);d.className=`rg-collaboration-chat-form`;let f=document.createElement(`textarea`);f.className=`rg-collaboration-chat-input`,f.maxLength=4e3,f.rows=2,f.placeholder=`메시지 입력`,f.setAttribute(`aria-label`,`채팅 메시지`),f.value=l,f.disabled=s,f.addEventListener(`input`,()=>{l=f.value}),f.addEventListener(`keydown`,e=>{e.key!==`Enter`||e.shiftKey||e.isComposing||(e.preventDefault(),d.requestSubmit())});let m=Ie(`rg-collaboration-chat-send`,s?`전송 중`:`메시지 전송`);if(m.type=`submit`,m.disabled=s,m.textContent=s?`전송 중…`:`전송`,d.addEventListener(`submit`,e=>{e.preventDefault(),g(f.value)}),d.append(f,m),c){let e=O(`rg-collaboration-chat-error`);e.setAttribute(`role`,`alert`),e.textContent=c,d.prepend(e)}p.append(n,u,d),o&&queueMicrotask(()=>{u.scrollTop=u.scrollHeight,t&&(f.focus(),f.setSelectionRange(f.value.length,f.value.length))})},g=async t=>{let n=t.trim();if(!n||s)return;l=t,s=!0,c=``,h();let r=e.now?.()??Date.now(),i={id:e.id?.()??crypto.randomUUID(),pageId:e.pageId,pathname:e.pathname,authorId:e.session.reviewerId,authorName:e.session.displayName,body:n,createdAt:r,updatedAt:r};try{await e.repository.sendMessage(e.pageId,i),l=``}catch{c=`메시지를 전송하지 못했습니다. 다시 시도하세요.`}finally{s=!1,h()}},_=e=>{o=e,p.hidden=!e,f.setAttribute(`aria-expanded`,String(e)),f.setAttribute(`aria-label`,e?`실시간 채팅 닫기`:`실시간 채팅 열기`),e?(h(),queueMicrotask(()=>p.querySelector(`textarea`)?.focus())):f.focus()},v=t=>{!e.cursors||n||e.repository.publishPresence(e.pageId,e.roomId,t)},y=()=>({reviewerId:e.session.reviewerId,displayName:e.session.displayName,color:Ne(e.session.reviewerId),active:!1}),b=t=>{t.pointerType===`touch`||t.composedPath().includes(e.root.host)||(a=t,i===void 0&&(i=window.requestAnimationFrame(()=>{i=void 0;let t=a;a=void 0,t&&v({reviewerId:e.session.reviewerId,displayName:e.session.displayName,color:Ne(e.session.reviewerId),active:!0,cursorX:t.clientX,cursorY:t.clientY,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight})})))},x=()=>{document.visibilityState!==`visible`&&v(y())},S=()=>v(y()),C=t=>{t.key!==`/`||t.defaultPrevented||t.repeat||t.isComposing||t.metaKey||t.ctrlKey||t.altKey||o||Fe(t)||e.canOpenChat?.()===!1||(t.preventDefault(),_(!0))};return{start(){if(n)return;let i=e.root.querySelector(`.rg-toolbar-actions`);e.cursors&&i?.append(d),e.chat&&(i?.append(f),e.root.append(p),f.addEventListener(`click`,()=>_(!o)),p.addEventListener(`keydown`,e=>{e.key===`Escape`&&_(!1)}),document.addEventListener(`keydown`,C)),e.cursors&&(e.root.prepend(u),document.addEventListener(`pointermove`,b,{passive:!0}),document.addEventListener(`pointerleave`,S),document.addEventListener(`visibilitychange`,x)),t=e.repository.subscribe(e.pageId,{roomId:e.roomId,cursors:e.cursors,chat:e.chat},e=>{r=e,m()},e.onFailure),v(y()),m()},stop(){n||(n=!0,i!==void 0&&window.cancelAnimationFrame(i),document.removeEventListener(`pointermove`,b),document.removeEventListener(`pointerleave`,S),document.removeEventListener(`visibilitychange`,x),document.removeEventListener(`keydown`,C),t?.(),u.remove(),d.remove(),f.remove(),p.remove())}}}const ke=`http://www.w3.org/2000/svg`;function Ae(){let e=document.createElementNS(ke,`svg`);e.setAttribute(`viewBox`,`0 0 20 20`),e.setAttribute(`aria-hidden`,`true`);let t=document.createElementNS(ke,`path`);return t.setAttribute(`d`,`M3 5.5h14v9H8l-4 3v-3H3z`),e.append(t),e}function je(e,t,n){let r=[n,...t.map(({displayName:e})=>e)];e.hidden=r.length<2,e.textContent=r.length<2?``:`${r.length}명`,e.title=r.join(`, `)}function Me(e,t){e.replaceChildren();for(let n of t){if(!n.active||n.cursorX===void 0||n.cursorY===void 0||!n.viewportWidth||!n.viewportHeight)continue;let t=O(`rg-collaboration-cursor`);t.style.setProperty(`--rg-peer-color`,n.color),t.style.left=`${n.cursorX/n.viewportWidth*window.innerWidth}px`,t.style.top=`${n.cursorY/n.viewportHeight*window.innerHeight}px`;let r=O(`rg-collaboration-cursor-pointer`),i=O(`rg-collaboration-cursor-label`);i.textContent=n.displayName,t.append(r,i),e.append(t)}}function Ne(e){let t=[`#7c3aed`,`#2563eb`,`#0891b2`,`#059669`,`#ca8a04`,`#ea580c`,`#dc2626`],n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function Pe(e){return new Intl.DateTimeFormat(`ko-KR`,{hour:`2-digit`,minute:`2-digit`}).format(e)}function Fe(e){let t=e.composedPath()[0];return t instanceof Element&&t.closest(`input, textarea, select, [contenteditable]:not([contenteditable="false"]), [role="textbox"]`)!==null}function O(e){let t=document.createElement(`div`);return t.className=e,t}function Ie(e,t){let n=document.createElement(`button`);return n.className=e,n.setAttribute(`aria-label`,t),n}function Le(e={}){let t=document.createElement(`div`);t.className=`rg-toolbar`,t.setAttribute(`role`,`toolbar`),t.setAttribute(`aria-label`,`Visual Review`);let n=M(`rg-toolbar-actions-shell`),r=M(`rg-toolbar-actions`);e.developerGrab&&r.append(Re());let i=M(`rg-action-wrap`),a=N(`rg-action rg-feedback-tool`,`피드백 위치 선택`);a.setAttribute(`aria-pressed`,`false`),a.append(Ve());let o=document.createElement(`span`);o.className=`rg-tooltip`,o.setAttribute(`aria-hidden`,`true`),o.textContent=`피드백`,i.append(a,o),r.append(i),n.append(r);let s=N(`rg-collapse`,`Visual Review 접기`);if(s.setAttribute(`aria-expanded`,`true`),s.append(Ue()),t.append(n,s),e.developerGrab){let e=M(`rg-developer-status`);e.dataset.visible=`false`,e.dataset.tone=`neutral`,e.setAttribute(`aria-hidden`,`true`),t.append(e)}return t}function Re(){let e=M(`rg-action-wrap`),t=N(`rg-action rg-developer-grab-tool`,`React Grab 코드 선택`);t.setAttribute(`aria-keyshortcuts`,`Meta+C Control+C`),t.setAttribute(`aria-pressed`,`false`),t.append(He());let n=document.createElement(`span`);return n.className=`rg-tooltip`,n.setAttribute(`aria-hidden`,`true`),n.textContent=`코드 선택 · ⌘/Ctrl+C 길게`,e.append(t,n),e}function ze(e,t,n=t){let r=document.createElement(`div`);r.className=`rg-selection-label`,r.setAttribute(`role`,`dialog`),r.setAttribute(`aria-label`,`새 피드백 작성`),r.style.opacity=`0`,r.style.left=`-1000px`,r.style.top=`-1000px`;let i=A(`0 0 16 8`,[j(`M0 8 L7.293 0.707 A1 1 0 0 1 8.707 0.707 L16 8 Z`)]);i.classList.add(`rg-label-arrow`);let a=M(`rg-surface`),o=M(`rg-tag-row`),s=document.createElement(`span`);s.className=`rg-tag`,s.textContent=e,o.append(s);let c=M(`rg-bottom-section`),l=document.createElement(`textarea`);l.setAttribute(`aria-keyshortcuts`,`Meta+Enter Control+Enter Escape`),l.maxLength=4e3,l.rows=1,l.placeholder=t,l.setAttribute(`aria-label`,n);let u=N(`rg-submit`,`피드백 저장`);return u.title=`저장 (⌘/Ctrl+Enter)`,u.append(We()),c.append(l,u),a.append(o,c),r.append(i,a),r}function Be(){return A(`0 0 12 12`,[j(`M2.47 1.76a.5.5 0 0 0-.71.71L5.29 6 1.76 9.53a.5.5 0 0 0 .71.71L6 6.71l3.53 3.53a.5.5 0 0 0 .71-.71L6.71 6l3.53-3.53a.5.5 0 0 0-.71-.71L6 5.29 2.47 1.76Z`)])}function k(e,t){queueMicrotask(()=>{let n=e.getBoundingClientRect();if(n.width<=0||n.height<=0)return;let r=window.visualViewport,i=r?.offsetLeft??0,a=r?.offsetTop??0,o=r?.width??window.innerWidth,s=r?.height??window.innerHeight,c=t.anchorX??t.x+t.width/2,l=Ge(c,i+8+n.width/2,i+o-8-n.width/2),u=a+s-(t.y+t.height)>=n.height+12+8,d=u?t.y+t.height+12:Math.max(a+8,t.y-12-n.height);e.dataset.side=u?`below`:`above`,e.style.left=`${l}px`,e.style.top=`${d}px`,e.style.opacity=`1`;let f=Ge(c-(l-n.width/2),16,n.width-16);e.style.setProperty(`--rg-arrow-left`,`${f}px`)})}function Ve(){return A(`0 0 12 12`,[j(`M1 6C1 3.239 3.239 1 6 1C8.761 1 11 3.239 11 6C11 8.761 8.761 11 6 11C5.103 11 4.261 10.764 3.532 10.35C2.959 10.759 2.257 11 1.5 11C1.376 11 1.253 10.993 1.132 10.981C0.923 10.959 0.75 10.809 0.699 10.605C0.648 10.402 0.729 10.188 0.903 10.07C1.347 9.768 1.688 9.328 1.865 8.812C1.319 8.011 1 7.042 1 6Z`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`})])}function He(){return A(`0 0 12 12`,[j(`M4.25 2 1.5 6l2.75 4M7.75 2l2.75 4-2.75 4`,{fill:`none`,stroke:`currentColor`,"stroke-width":`1.25`,"stroke-linecap":`round`,"stroke-linejoin":`round`})])}function Ue(){return A(`0 0 24 24`,[j(`M9.29289 16.7071C8.90237 16.3166 8.90237 15.6834 9.29289 15.2929L12.5858 12L9.29289 8.70711C8.90237 8.31658 8.90237 7.68342 9.29289 7.29289C9.68342 6.90237 10.3166 6.90237 10.7071 7.29289L14.7071 11.2929C14.8946 11.4804 15 11.7348 15 12C15 12.2652 14.8946 12.5196 14.7071 12.7071L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071Z`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`})])}function We(){return A(`0 0 24 24`,[j(`M19.2929 12.7071C19.6834 13.0976 20.3166 13.0976 20.7071 12.7071C21.0976 12.3166 21.0976 11.6834 20.7071 11.2929L12.7071 3.29289C12.5196 3.10536 12.2652 3 12 3C11.7348 3 11.4804 3.10536 11.2929 3.29289L3.29289 11.2929C2.90237 11.6834 2.90237 12.3166 3.29289 12.7071C3.68342 13.0976 4.31658 13.0976 4.70711 12.7071L11 6.41421L11 20C11 20.5523 11.4477 21 12 21C12.5523 21 13 20.5523 13 20L13 6.41422L19.2929 12.7071Z`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`})])}function A(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);return n.setAttribute(`viewBox`,e),n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`focusable`,`false`),n.append(...t),n}function j(e,t={}){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);n.setAttribute(`d`,e);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}function M(e){let t=document.createElement(`div`);return t.className=e,t}function N(e,t){let n=document.createElement(`button`);return n.type=`button`,n.className=e,n.setAttribute(`aria-label`,t),n}function Ge(e,t,n){return Math.min(n,Math.max(t,e))}async function Ke(e){let t=window.__REACT_GRAB__;if(Je(t))return qe(t);let n=await i(e);return{async copyElement(e){let t=Array.isArray(e)?e:[e],r=(await Promise.allSettled(t.map(e=>n.getElementContext(e)))).flatMap(e=>e.status===`fulfilled`&&e.value.snippet.trim().length>0?[e.value.snippet.trim()]:[]);return r.length!==0&&n.copyContent(r.join(`
|
|
2
|
+
|
|
3
|
+
`))},dispose(){}}}function qe(e){return{copyElement:t=>e.copyElement(t),dispose(){}}}function Je(e){return typeof e==`object`&&!!e&&`copyElement`in e&&typeof e.copyElement==`function`}function Ye(e,t=`all`){let n=[...e.comments].sort(Xe),r=new Map(n.map((e,t)=>[e.id,t+1])),i=new Map;for(let t of e.replies){if(!r.has(t.commentId))continue;let e=i.get(t.commentId);e?(e.replyCount+=1,e.lastReplyAt=Math.max(e.lastReplyAt,t.updatedAt)):i.set(t.commentId,{replyCount:1,lastReplyAt:t.updatedAt})}let a=n.map(e=>{let t=i.get(e.id);return{comment:e,pinNumber:r.get(e.id),replyCount:t?.replyCount??0,lastActivityAt:Math.max(e.updatedAt,t?.lastReplyAt??e.updatedAt)}}),o={all:a.length,open:a.filter(({comment:e})=>e.status===`open`).length,resolved:a.filter(({comment:e})=>e.status===`resolved`).length};return{rows:a.filter(({comment:e})=>t===`all`||e.status===t).sort(Ze),counts:o,pinNumberByCommentId:r}}function Xe(e,t){return e.createdAt-t.createdAt||e.id.localeCompare(t.id)}function Ze(e,t){return t.lastActivityAt-e.lastActivityAt||t.comment.createdAt-e.comment.createdAt||e.comment.id.localeCompare(t.comment.id)}const Qe=`visual-review-feedback-navigator`,$e=[`all`,`open`,`resolved`],et={all:`전체`,open:`진행 중`,resolved:`완료`};function tt(e,t={}){let n=t.controlsId??Qe,r=I(`rg-action-wrap`),i=document.createElement(`button`);i.type=`button`,i.className=`rg-action rg-feedback-list-tool`,i.dataset.feedbackNavigatorAction=`toggle`,i.setAttribute(`aria-controls`,n),i.setAttribute(`aria-expanded`,String(t.expanded??!1)),t.presentation===`sheet`&&i.setAttribute(`aria-haspopup`,`dialog`),i.setAttribute(`aria-label`,`피드백 목록, 총 ${L(e)}개`),i.append(at());let a=document.createElement(`span`);return a.className=`rg-tooltip`,a.setAttribute(`aria-hidden`,`true`),a.textContent=`목록`,r.append(i,a),r}function nt(e,t={}){let n=t.id??Qe,r=`${n}-title`,i=t.presentation??`tray`,a=document.createElement(`section`);a.id=n,a.className=`rg-feedback-navigator`,a.dataset.presentation=i,a.dataset.loadState=e.loadState??`ready`,a.dataset.filter=e.filter,a.setAttribute(`aria-labelledby`,r),a.setAttribute(`aria-busy`,String(e.loadState===`loading`)),i===`sheet`?(a.setAttribute(`role`,`dialog`),a.setAttribute(`aria-modal`,`true`)):a.setAttribute(`role`,`region`);let o=I(`rg-feedback-navigator-header`),s=I(`rg-feedback-navigator-heading`),c=document.createElement(`h2`);c.id=r,c.className=`rg-feedback-navigator-title`,c.textContent=t.title??`피드백`;let l=document.createElement(`span`);l.className=`rg-feedback-navigator-total`,l.setAttribute(`aria-hidden`,`true`),l.textContent=String(L(e.counts.all)),s.append(c,l);let u=document.createElement(`button`);u.type=`button`,u.className=`rg-feedback-navigator-close`,u.dataset.feedbackNavigatorAction=`close`,u.setAttribute(`aria-label`,`피드백 목록 닫기`),u.append(ot()),o.append(s,u);let d=I(`rg-feedback-navigator-content`);if(lt(d,e),e.loadState!==`loading`&&e.loadState!==`error`)if(e.rows.length===0)d.append(ut(e.counts.all===0));else{let t=document.createElement(`ul`);t.className=`rg-feedback-list`,t.setAttribute(`aria-label`,`피드백 목록`);for(let n of e.rows)t.append(it(n,e.activeCommentId));d.append(t)}if(a.append(o),e.counts.all>0&&e.loadState!==`loading`&&e.loadState!==`error`){let t=I(`rg-feedback-filters`);t.setAttribute(`role`,`group`),t.setAttribute(`aria-label`,`피드백 상태 필터`);for(let n of $e)t.append(rt(n,e.counts[n],e.filter===n));a.append(t)}return a.append(d),a}function rt(e,t,n){let r=document.createElement(`button`);r.type=`button`,r.className=`rg-feedback-filter`,r.dataset.feedbackFilter=e,r.dataset.feedbackNavigatorAction=`filter`,r.setAttribute(`aria-pressed`,String(n)),r.setAttribute(`aria-label`,`${et[e]} 피드백 ${L(t)}개`);let i=document.createElement(`span`);i.className=`rg-feedback-filter-label`,i.textContent=et[e];let a=document.createElement(`span`);return a.className=`rg-feedback-filter-count`,a.setAttribute(`aria-hidden`,`true`),a.textContent=String(L(t)),r.append(i,a),r}function it(e,t){let n=document.createElement(`li`);n.className=`rg-feedback-item`,n.dataset.commentId=e.id;let r=document.createElement(`button`);r.type=`button`,r.className=`rg-feedback-row`,r.dataset.commentId=e.id,r.dataset.feedbackNavigatorAction=`open-comment`,r.dataset.status=e.status,r.dataset.locationAvailable=String(e.locationAvailable!==!1),e.id===t&&r.setAttribute(`aria-current`,`true`),r.setAttribute(`aria-label`,dt(e));let i=document.createElement(`span`);i.className=`rg-feedback-row-pin`,i.setAttribute(`aria-hidden`,`true`),i.textContent=String(Math.max(1,Math.trunc(e.pinNumber)));let a=I(`rg-feedback-row-copy`),o=document.createElement(`span`);if(o.className=`rg-feedback-row-body`,o.textContent=e.body,e.pageLabel?.trim()||e.targetLabel?.trim()){let t=document.createElement(`span`);t.className=`rg-feedback-row-context`,e.currentPage&&(t.dataset.currentPage=`true`);let n=e.pageLabel?.trim();if(n&&t.append(document.createTextNode(n)),n&&e.targetLabel?.trim()&&t.append(document.createTextNode(` · `)),e.targetLabel?.trim()){let n=document.createElement(`span`);n.className=`rg-feedback-row-target`,n.textContent=e.targetLabel.trim(),t.append(n)}a.append(t)}let s=I(`rg-feedback-row-detail`),c=document.createElement(`span`);c.className=`rg-feedback-row-meta`,c.textContent=`${e.authorName} · ${e.timeLabel}`;let l=I(`rg-feedback-row-trailing`);if(e.locationAvailable===!1){let e=document.createElement(`span`);e.className=`rg-feedback-row-location-missing`,e.setAttribute(`aria-hidden`,`true`),e.title=`현재 화면에서 위치를 찾을 수 없음`,e.append(st()),l.append(e)}if(e.replyCount>0){let t=document.createElement(`span`);t.className=`rg-feedback-row-replies`,t.setAttribute(`aria-hidden`,`true`),t.textContent=`답글 ${L(e.replyCount)}`,l.append(t)}if(e.status===`resolved`){let e=document.createElement(`span`);e.className=`rg-feedback-row-status`,e.setAttribute(`aria-hidden`,`true`),e.title=`완료`,e.append(ct());let t=document.createElement(`span`);t.className=`rg-visually-hidden`,t.textContent=`완료`,e.append(t),l.append(e)}return s.append(c,l),a.append(o,s),r.append(i,a),n.append(r),n}function at(){return P(`0 0 14 14`,[F(`M4.75 3.25h6.5M4.75 7h6.5M4.75 10.75h6.5`),F(`M2.25 3.25h.01M2.25 7h.01M2.25 10.75h.01`,{"stroke-linecap":`round`,"stroke-width":`1.5`})])}function ot(){return P(`0 0 12 12`,[F(`M2.47 1.76a.5.5 0 0 0-.71.71L5.29 6 1.76 9.53a.5.5 0 0 0 .71.71L6 6.71l3.53 3.53a.5.5 0 0 0 .71-.71L6.71 6l3.53-3.53a.5.5 0 0 0-.71-.71L6 5.29 2.47 1.76Z`,{fill:`currentColor`,stroke:`none`})])}function st(){return P(`0 0 14 14`,[F(`M7 12.25s4-3.27 4-6.5a4 4 0 1 0-8 0c0 3.23 4 6.5 4 6.5Z`),F(`m4.75 3.5 4.5 4.5`)])}function ct(){return P(`0 0 12 12`,[F(`m2.25 6.25 2.25 2.25 5.25-5.25`)])}function lt(e,t){let n=t.loadState??`ready`;if(n===`ready`)return;let r=I(`rg-feedback-navigator-state`);if(r.dataset.state=n,n===`error`){r.setAttribute(`role`,`alert`);let e=document.createElement(`span`);if(e.textContent=t.errorMessage?.trim()||`불러오지 못함`,r.append(e),t.errorRecovery!==`reauthenticate`){let e=document.createElement(`button`);e.type=`button`,e.className=`rg-feedback-navigator-retry`,e.dataset.feedbackNavigatorAction=`retry`,e.textContent=`재시도`,r.append(e)}}else r.setAttribute(`role`,`status`),r.setAttribute(`aria-live`,`polite`),r.textContent=n===`loading`?`불러오는 중`:`연결 확인 중`;e.append(r)}function ut(e){let t=I(`rg-feedback-navigator-empty`);return t.setAttribute(`role`,`status`),t.textContent=e?`피드백 없음`:`해당 피드백 없음`,t}function dt(e){let t=[`${Math.max(1,Math.trunc(e.pinNumber))}번 피드백`,...e.pageLabel?.trim()?[`페이지 ${e.pageLabel.trim()}`]:[],...e.targetLabel?.trim()?[`대상 ${e.targetLabel.trim()}`]:[],e.body,e.authorName,`최근 활동 ${e.timeLabel}`];return e.replyCount>0&&t.push(`답글 ${L(e.replyCount)}개`),t.push(e.status===`resolved`?`완료`:`진행 중`),e.locationAvailable===!1&&t.push(`현재 화면에서 위치를 찾을 수 없음`),t.join(`, `)}function P(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);n.setAttribute(`viewBox`,e),n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`focusable`,`false`);for(let e of t)n.append(e);return n}function F(e,t={}){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);n.setAttribute(`d`,e),n.setAttribute(`fill`,`none`),n.setAttribute(`stroke`,`currentColor`),n.setAttribute(`stroke-width`,`1.25`),n.setAttribute(`stroke-linecap`,`round`),n.setAttribute(`stroke-linejoin`,`round`);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}function I(e){let t=document.createElement(`div`);return t.className=e,t}function L(e){return Math.max(0,Math.trunc(Number.isFinite(e)?e:0))}const ft=1e6;async function pt(e){if(!document.body||typeof HTMLCanvasElement>`u`)return null;let t=ht(e);document.body.append(t);try{let{toCanvas:t}=await import(`./es-BeyOi4lh.js`),n=mt(e,window.innerWidth,window.innerHeight),r=await t(document.body,{width:n.outputWidth,height:n.outputHeight,pixelRatio:1,cacheBust:!0,skipAutoScale:!0,backgroundColor:_t(),filter:e=>!gt(e),style:{margin:`0`,transform:`translate(${-(window.scrollX+n.left)*n.scale}px, ${-(window.scrollY+n.top)*n.scale}px) scale(${n.scale})`,transformOrigin:`top left`}}),i=await yt(r);return!i||i.size>ft?null:{bytes:new Uint8Array(await i.arrayBuffer()),contentType:i.type===`image/png`?`image/png`:`image/webp`,width:r.width,height:r.height}}catch{return null}finally{t.remove()}}function mt(e,t,n){let r=bt(t),i=bt(n),a=e.region,o=R(a.viewportX,a.pageX-window.scrollX),s=R(a.viewportY,a.pageY-window.scrollY),c=Math.max(18,R(a.width,0)),l=Math.max(18,R(a.height,0)),u=z(o+c/2,0,r),d=z(s+l/2,0,i),f=Math.min(r,Math.max(Math.min(640,r),c+192)),p=Math.min(i,Math.max(Math.min(420,i),l+160)),m=z(u-f/2,0,r-f),h=z(d-p/2,0,i-p),g=Math.min(1,960/f,640/p);return{left:m,top:h,width:f,height:p,scale:g,outputWidth:Math.max(1,Math.round(f*g)),outputHeight:Math.max(1,Math.round(p*g))}}function ht(e){let t=e.region,n=document.createElement(`div`);return n.dataset.reviewCaptureMarker=`true`,Object.assign(n.style,{position:`absolute`,zIndex:`2147483646`,pointerEvents:`none`,boxSizing:`border-box`,left:`${Math.max(0,t.pageX)}px`,top:`${Math.max(0,t.pageY)}px`,width:`${Math.max(18,t.width)}px`,height:`${Math.max(18,t.height)}px`,border:`3px solid #ff4d67`,borderRadius:`6px`,background:`rgba(255, 77, 103, .12)`,boxShadow:`0 0 0 3px rgba(255,255,255,.92), 0 4px 18px rgba(0,0,0,.24)`}),n}function gt(e){return e instanceof HTMLElement?e.tagName===`AGENCY-REVIEW-WIDGET`||e.dataset.reviewCaptureExclude===`true`||e.id===`__next-build-watcher`||!!e.closest?.(`nextjs-portal`):!1}function _t(){let e=getComputedStyle(document.body).backgroundColor;if(e&&e!==`rgba(0, 0, 0, 0)`)return e;let t=getComputedStyle(document.documentElement).backgroundColor;return t&&t!==`rgba(0, 0, 0, 0)`?t:`#ffffff`}function vt(e,t,n){return new Promise(r=>e.toBlob(r,t,n))}async function yt(e){for(let t of[.78,.64,.5]){let n=await vt(e,`image/webp`,t);if(n&&n.size<=ft)return n}let t=await vt(e,`image/png`);return t&&t.size<=ft?t:null}function bt(e){return Number.isFinite(e)&&e>0?e:1}function R(e,t){return Number.isFinite(e)?e:Number.isFinite(t)?t:0}function z(e,t,n){return Math.min(n,Math.max(t,e))}const xt=`agency-review-widget`,St=`visual-review:reauthenticate-required`,Ct=1e4,B=`visual-review-feedback-navigator`,wt=`${B}-surface`,Tt=new Set([`combobox`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`searchbox`,`slider`,`spinbutton`,`textbox`]);var Et=class extends HTMLElement{#e=this.attachShadow({mode:`open`});#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;#s=!1;#c=null;#l=null;#u=null;#d=null;#f=``;#p=``;#m=null;#h=null;#g=null;#_=null;#v=null;#y=null;#b=!1;#x=`all`;#S=`loading`;#C=``;#w=`retry`;#T=!1;#E=0;#D=0;#O=!navigator.onLine;#k=null;#A=null;#j=null;#M=null;#N=null;#P=null;#F=null;#I=!1;#L=!1;#R=null;#z=null;#B=!1;#V=null;#H=null;#U=!1;#W=null;#G=new Set;#K=new Map;#q=new Map;#J=new Map;#Y=new Map;#X=new Map;#Z=new Map;configure(e){if(this.#t)throw Error(`Review widget is already configured`);if(!Ot(window.location,e.allowedStagingHosts))throw Error(`Review widget refused to activate on non-staging host: ${window.location.host}`);if(!e.session.invitationId||e.session.projectId.length===0)throw Error(`An accepted review invitation session is required`);this.#t=e,this.isConnected&&this.#Q()}setPage(e,t){let n=this.#t;if(!n)throw Error(`Review widget is not configured`);let r=n.collaboration&&e.collaboration?{...n.collaboration,roomId:e.collaboration.roomId,scopeId:e.collaboration.scopeId}:n.collaboration;(t?.reload===!0||n.pageId!==e.pageId||r?.roomId!==n.collaboration?.roomId||r?.scopeId!==n.collaboration?.scopeId)&&(this.#t={...n,pageId:e.pageId,collaboration:r},this.#k&&(this.#se(),this.#i?.stop(),this.#i=null,this.#ue(),this.#de(),this.#$()))}connectedCallback(){this.dataset.agencyReviewRoot=``,this.dataset.reactGrabIgnore=``,this.dataset.rgTheme=sn(),this.#t&&this.#Q()}disconnectedCallback(){this.#ce()}async#Q(){!this.#t||this.#k||(this.#k=new AbortController,this.#O=!navigator.onLine,this.#le(),this.#ue(),this.#de(),this.#lt(),document.addEventListener(`keydown`,this.#Qe,{capture:!0,signal:this.#k.signal}),document.addEventListener(`keyup`,this.#$e,{capture:!0,signal:this.#k.signal}),document.addEventListener(`pointerdown`,this.#nt,{capture:!0,signal:this.#k.signal}),document.addEventListener(`click`,this.#rt,{capture:!0,signal:this.#k.signal}),document.addEventListener(`focusin`,this.#Xe,{capture:!0,signal:this.#k.signal}),document.addEventListener(`scroll`,this.#ot,{capture:!0,passive:!0,signal:this.#k.signal}),window.addEventListener(`scroll`,this.#ot,{passive:!0,signal:this.#k.signal}),window.addEventListener(`resize`,this.#ot,{passive:!0,signal:this.#k.signal}),window.visualViewport?.addEventListener(`scroll`,this.#ot,{passive:!0,signal:this.#k.signal}),window.visualViewport?.addEventListener(`resize`,this.#ot,{passive:!0,signal:this.#k.signal}),window.addEventListener(`online`,this.#oe,{signal:this.#k.signal}),window.addEventListener(`offline`,this.#oe,{signal:this.#k.signal}),await this.#$())}async#$(){if(!this.#t||!this.#k)return;let e=null,t=null,n=this.#S===`error`,r=++this.#E,i=this.#k.signal,{pageId:a,repository:o,session:s}=this.#t,c=o,l=!!(c.getProjectSnapshot&&c.subscribeProject);this.#S=`loading`,this.#C=``,this.#pe(),this.#ye();try{let n,o=null;if(l?[n,o]=await Promise.all([c.getSnapshot(a),c.getProjectSnapshot(s.projectId)]):n=await c.getSnapshot(a),i.aborted||r!==this.#E)return;let u=this.#n,d=this.#r;this.#n=null,this.#r=null,X(u,d);let f=!1,p=!1,m=n,h=o,g=e=>{i.aborted||r!==this.#E||!this.#k||(f=!0,this.#ie(e))};if(e=c.subscribe(a,e=>{if(!(i.aborted||r!==this.#E||!this.#k)){if(!p){m=e;return}this.#ne(e)}},g),t=o&&c.subscribeProject?c.subscribeProject(s.projectId,e=>{if(!(i.aborted||r!==this.#E||!this.#k)){if(!p){h=e;return}this.#re(e)}},g):null,f){X(e,t);return}if(i.aborted||r!==this.#E||!this.#k){X(e,t);return}this.#n=e,this.#r=t,e=null,t=null,p=!0,this.#ne(m),h&&this.#re(h)}catch(a){if(X(e,t),i.aborted||r!==this.#E)return;let o=en(a)?a:{type:`error`,code:`unknown`,recovery:`retry`,clearSnapshot:!0};this.#ie(o,o.type===`access-lost`),n&&this.#b&&queueMicrotask(()=>this.#e.querySelector(`.rg-feedback-navigator-retry`)?.focus({preventScroll:!0}))}}#ee=new Map;#te=new Map;#ne=e=>{for(let[t,n]of[...this.#ee])e.comments.some(({id:e})=>e===t)&&(this.#ee.delete(t),n(!0));for(let[t,{commentId:n,settle:r}]of[...this.#te])e.replies.some(e=>e.id===t&&e.commentId===n)&&(this.#te.delete(t),r());this.#S=`ready`,this.#w=`retry`,this.#T=!1,this.#a=e,this.#ae(e);let t=!1;if(this.#_&&!e.comments.some(({id:e})=>e===this.#_)){let e=this.#_;t=!0,this.#J.delete(e),this.#Y.delete(e),this.#X.delete(e),this.#Z.delete(e),this.#_=null,this.#v=null,this.#Le(`열려 있던 피드백이 삭제되었습니다.`)}this.#de();let n=this.#y;n&&e.comments.some(({id:e})=>e===n)&&(this.#y=null,queueMicrotask(()=>void this.#Pe(n,{origin:`navigator`,navigate:!1})));let r=t&&!this.#b?this.#ve():!1;t&&queueMicrotask(()=>{r||(this.#b?this.#Te():this.#Ee()?.focus())})};#re=e=>{e.projectId===this.#t?.session.projectId&&(this.#o=e,this.#Ct(),this.#ye(),this.#xe())};#ie(e,t=!0){let n=e.type===`access-lost`;this.#E+=1,this.#D+=1;let r=this.#n,i=this.#r;if(this.#n=null,this.#r=null,e.clearSnapshot&&(this.#a=null,this.#o=null),!n&&this.#d){let e=this.#e.querySelector(`.rg-selection-label:not(.rg-thread-label) textarea`);this.#g={target:this.#d,body:e?.value??this.#f},this.#d=null,this.#f=``}if(!n&&this.#h?.comment){let{target:e,body:t,comment:n}=this.#h;this.#m??={target:e,body:t,comment:n},this.#p||=`저장하지 못했습니다. 다시 시도하세요.`}if(n||this.#Y.forEach(({body:e,reply:t},n)=>{this.#J.set(n,e),this.#Z.has(n)||this.#Z.set(n,{body:e,reply:t}),this.#X.has(n)||this.#X.set(n,`답글을 저장하지 못했습니다. 다시 시도하세요.`)}),this.#h=null,this.#Y.clear(),n&&(this.#d=null,this.#f=``,this.#p=``,this.#m=null,this.#g=null,this.#_=null,this.#v=null,this.#J.clear(),this.#X.clear(),this.#Z.clear()),this.#s?this.#fe(!1):this.#bt(),this.#S=`error`,this.#w=e.recovery,this.#T=e.type===`access-lost`,this.#C=e.type===`access-lost`?`다시 인증하세요.`:`다시 시도하세요.`,t&&(this.#b=!0),X(r,i),this.#pe(),this.#de(),this.#Le(this.#C),e.type===`access-lost`){try{this.#t?.onReauthenticationRequired?.(e)}catch{}this.dispatchEvent(new CustomEvent(St,{bubbles:!0,composed:!0,detail:{code:e.code}}))}}#ae(e){let t=new Set(e.comments.map(({id:e})=>e)),n=this.#h,r=this.#m,i=!!(n?.comment&&t.has(n.comment.id)),a=!!(r&&t.has(r.comment.id)),o=[...i&&n?[n.target]:[],...a&&r?[r.target]:[]];if(o.length>0){let e=this.#d!==null&&o.includes(this.#d);this.#d&&o.includes(this.#d)&&(this.#d=null,this.#f=``),this.#g&&o.includes(this.#g.target)&&(this.#g=null),i&&(this.#h=null),a&&(this.#m=null),this.#p=``,this.#Le(`피드백을 저장했습니다.`),e&&queueMicrotask(()=>this.#e.querySelector(`.rg-feedback-tool`)?.focus({preventScroll:!0}))}new Set([...this.#J.keys(),...this.#Y.keys(),...this.#X.keys(),...this.#Z.keys()]).forEach(n=>{if(!t.has(n)){this.#J.delete(n),this.#Y.delete(n),this.#X.delete(n),this.#Z.delete(n);return}let r=this.#Y.get(n),i=this.#Z.get(n),a=!!(r&&e.replies.some(e=>e.id===r.reply.id&&e.commentId===n)),o=!!(i&&e.replies.some(e=>e.id===i.reply.id&&e.commentId===n));!a&&!o||(a&&this.#Y.delete(n),o&&this.#Z.delete(n),this.#X.delete(n),this.#J.delete(n),this.#Le(`답글을 저장했습니다.`))})}#oe=()=>{this.#O=!navigator.onLine,this.#ye()};#se(){this.#E+=1,this.#D+=1;let e=this.#n,t=this.#r;this.#n=null,this.#r=null;for(let[e,t]of[...this.#ee])this.#ee.delete(e),t(!1);for(let[e,{settle:t}]of[...this.#te])this.#te.delete(e),t();this.#s?this.#fe(!1):this.#bt(),this.#a=null,this.#o=null,this.#S=`loading`,this.#C=``,this.#w=`retry`,this.#T=!1,this.#d=null,this.#f=``,this.#p=``,this.#m=null,this.#h=null,this.#g=null,this.#_=null,this.#v=null,this.#J.clear(),this.#Y.clear(),this.#X.clear(),this.#Z.clear(),X(e,t)}#ce(){this.#E+=1,this.#D+=1,this.#et(),this.#ze(),this.#at(),this.#Je(),this.#mt(),this.#s&&this.#fe(!1),this.#j?.(),this.#j=null,this.#A?.(),this.#A=null;let e=this.#n,t=this.#r;this.#n=null,this.#r=null,this.#i?.stop(),this.#i=null,this.#k?.abort(),this.#k=null,this.#a=null,this.#o=null,this.#S=`loading`,this.#C=``,this.#w=`retry`,this.#T=!1,this.#d=null,this.#f=``,this.#p=``,this.#m=null,this.#h=null,this.#g=null,this.#_=null,this.#v=null,this.#b=!1,this.#x=`all`,this.#L=!1,this.#J.clear(),this.#Y.clear(),this.#X.clear(),this.#Z.clear(),this.#e.replaceChildren(),X(e,t)}#le(){this.#e.replaceChildren();let e=e=>e.stopPropagation();[`change`,`click`,`contextmenu`,`dblclick`,`input`,`keydown`,`keyup`,`pointercancel`,`pointerdown`,`pointermove`,`pointerup`,`submit`].forEach(t=>{this.#e.addEventListener(t,e,{signal:this.#k?.signal})});let t=document.createElement(`style`);this.#t?.styleNonce&&(t.nonce=this.#t.styleNonce),t.textContent=`
|
|
4
|
+
:host {
|
|
5
|
+
all: initial;
|
|
6
|
+
--review-accent: #e5484d;
|
|
7
|
+
position: fixed;
|
|
8
|
+
inset: 0;
|
|
9
|
+
z-index: 2147483000;
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
direction: ltr;
|
|
12
|
+
color: #171918;
|
|
13
|
+
font: 500 14px/1.45 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
* { box-sizing: border-box; }
|
|
17
|
+
button, textarea { font: inherit; }
|
|
18
|
+
|
|
19
|
+
.highlight, .region {
|
|
20
|
+
position: fixed;
|
|
21
|
+
display: none;
|
|
22
|
+
border: 2px solid var(--review-accent);
|
|
23
|
+
border-radius: 6px;
|
|
24
|
+
background: rgba(229, 72, 77, 0.07);
|
|
25
|
+
box-shadow: 0 0 0 1px rgba(255,255,255,.8), 0 0 0 4px rgba(229,72,77,.12);
|
|
26
|
+
}
|
|
27
|
+
.region { border-radius: 4px; }
|
|
28
|
+
.highlight[data-context-target="true"],
|
|
29
|
+
.region[data-context-target="true"] {
|
|
30
|
+
background: rgba(229, 72, 77, 0.05);
|
|
31
|
+
}
|
|
32
|
+
.region[data-point="true"] {
|
|
33
|
+
border-radius: 50%;
|
|
34
|
+
background: rgba(229, 72, 77, 0.14);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.pin {
|
|
38
|
+
position: fixed;
|
|
39
|
+
display: grid;
|
|
40
|
+
place-items: center;
|
|
41
|
+
width: 26px;
|
|
42
|
+
height: 26px;
|
|
43
|
+
padding: 0;
|
|
44
|
+
z-index: 1;
|
|
45
|
+
transform: translate(-8px, -21px);
|
|
46
|
+
pointer-events: auto;
|
|
47
|
+
border: 2px solid #fff;
|
|
48
|
+
border-radius: 50%;
|
|
49
|
+
color: #fff;
|
|
50
|
+
background: #18181b;
|
|
51
|
+
box-shadow:
|
|
52
|
+
0 0 0 1px rgba(0, 0, 0, .18),
|
|
53
|
+
0 2px 6px rgba(0, 0, 0, .28),
|
|
54
|
+
0 6px 16px rgba(0, 0, 0, .14);
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
appearance: none;
|
|
57
|
+
isolation: isolate;
|
|
58
|
+
font: 700 11px/1 Geist, ui-sans-serif, system-ui, sans-serif;
|
|
59
|
+
font-variant-numeric: tabular-nums;
|
|
60
|
+
font-synthesis: none;
|
|
61
|
+
text-shadow: 0 1px 1px rgba(0, 0, 0, .24);
|
|
62
|
+
-webkit-tap-highlight-color: transparent;
|
|
63
|
+
transition:
|
|
64
|
+
background 150ms ease-out,
|
|
65
|
+
box-shadow 150ms ease-out,
|
|
66
|
+
transform 300ms var(--rg-ease-spring);
|
|
67
|
+
}
|
|
68
|
+
.pin::after {
|
|
69
|
+
position: absolute;
|
|
70
|
+
inset: -2px;
|
|
71
|
+
content: '';
|
|
72
|
+
}
|
|
73
|
+
@media (hover: hover) and (pointer: fine) {
|
|
74
|
+
.pin:hover {
|
|
75
|
+
z-index: 3;
|
|
76
|
+
background: #09090b;
|
|
77
|
+
box-shadow:
|
|
78
|
+
0 0 0 1px rgba(0, 0, 0, .22),
|
|
79
|
+
0 3px 8px rgba(0, 0, 0, .32),
|
|
80
|
+
0 8px 20px rgba(0, 0, 0, .16);
|
|
81
|
+
transform: translate(-8px, -21px) scale(1.1);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
.pin[data-active="true"] {
|
|
85
|
+
z-index: 4;
|
|
86
|
+
background: #18181b;
|
|
87
|
+
box-shadow:
|
|
88
|
+
0 0 0 2px var(--review-accent),
|
|
89
|
+
0 0 0 4px #fff,
|
|
90
|
+
0 5px 16px rgba(0, 0, 0, .3);
|
|
91
|
+
transform: translate(-8px, -21px) scale(1.1);
|
|
92
|
+
}
|
|
93
|
+
.pin:active,
|
|
94
|
+
.pin[data-active="true"]:active {
|
|
95
|
+
transform: translate(-8px, -21px) scale(.96);
|
|
96
|
+
transition-duration: 60ms;
|
|
97
|
+
}
|
|
98
|
+
.pin:focus-visible {
|
|
99
|
+
z-index: 5;
|
|
100
|
+
outline: 3px solid var(--review-accent);
|
|
101
|
+
outline-offset: 3px;
|
|
102
|
+
}
|
|
103
|
+
.pin[data-resolved="true"] {
|
|
104
|
+
color: #fff;
|
|
105
|
+
background: #737373;
|
|
106
|
+
}
|
|
107
|
+
.pin[data-resolved="true"][data-active="true"] { background: #404040; }
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
:host {
|
|
111
|
+
--rg-panel-bg: #ffffff;
|
|
112
|
+
--rg-panel-secondary: #f5f5f5;
|
|
113
|
+
--rg-text-primary: #171717;
|
|
114
|
+
--rg-text-secondary: #737373;
|
|
115
|
+
--rg-surface-hover: rgba(0, 0, 0, 0.05);
|
|
116
|
+
--rg-border-subtle: rgba(0, 0, 0, 0.08);
|
|
117
|
+
--rg-submit-bg: #171717;
|
|
118
|
+
--rg-submit-fg: #ffffff;
|
|
119
|
+
--rg-status-error: #b42318;
|
|
120
|
+
--rg-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
121
|
+
--rg-drop-shadow: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.1));
|
|
122
|
+
--rg-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
|
|
123
|
+
--rg-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
:host([data-rg-theme="dark"]) {
|
|
127
|
+
--rg-panel-bg: #161616;
|
|
128
|
+
--rg-panel-secondary: #262626;
|
|
129
|
+
--rg-text-primary: #ffffff;
|
|
130
|
+
--rg-text-secondary: #a7a7a7;
|
|
131
|
+
--rg-surface-hover: rgba(255, 255, 255, 0.1);
|
|
132
|
+
--rg-border-subtle: rgba(255, 255, 255, 0.1);
|
|
133
|
+
--rg-submit-bg: #ffffff;
|
|
134
|
+
--rg-submit-fg: #161616;
|
|
135
|
+
--rg-status-error: #ff8a80;
|
|
136
|
+
--rg-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
137
|
+
--rg-drop-shadow: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.rg-toolbar {
|
|
141
|
+
position: fixed;
|
|
142
|
+
left: 50%;
|
|
143
|
+
bottom: max(16px, env(safe-area-inset-bottom));
|
|
144
|
+
transform: translateX(-50%);
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
min-width: 0;
|
|
149
|
+
min-height: 36px;
|
|
150
|
+
padding: 4px 6px;
|
|
151
|
+
pointer-events: auto;
|
|
152
|
+
border: 0;
|
|
153
|
+
border-radius: 18px;
|
|
154
|
+
color: var(--rg-text-secondary);
|
|
155
|
+
background: var(--rg-panel-bg);
|
|
156
|
+
box-shadow: var(--rg-shadow);
|
|
157
|
+
font: 500 13px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
158
|
+
font-synthesis: none;
|
|
159
|
+
z-index: 2147483647;
|
|
160
|
+
transition:
|
|
161
|
+
padding 220ms var(--rg-ease-drawer),
|
|
162
|
+
border-radius 220ms var(--rg-ease-drawer),
|
|
163
|
+
opacity 400ms var(--rg-ease-drawer),
|
|
164
|
+
transform 400ms var(--rg-ease-drawer);
|
|
165
|
+
}
|
|
166
|
+
.rg-toolbar-actions-shell {
|
|
167
|
+
display: grid;
|
|
168
|
+
grid-template-columns: 1fr;
|
|
169
|
+
min-width: 0;
|
|
170
|
+
overflow: visible;
|
|
171
|
+
transition: grid-template-columns 220ms var(--rg-ease-drawer);
|
|
172
|
+
}
|
|
173
|
+
.rg-toolbar-actions {
|
|
174
|
+
display: flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
min-width: 0;
|
|
177
|
+
opacity: 1;
|
|
178
|
+
transition: opacity 180ms var(--rg-ease-drawer) 80ms;
|
|
179
|
+
}
|
|
180
|
+
.rg-action-wrap {
|
|
181
|
+
position: relative;
|
|
182
|
+
display: flex;
|
|
183
|
+
align-items: center;
|
|
184
|
+
justify-content: center;
|
|
185
|
+
width: 28px;
|
|
186
|
+
height: 28px;
|
|
187
|
+
margin-right: 2px;
|
|
188
|
+
}
|
|
189
|
+
.rg-action, .rg-collapse, .rg-submit {
|
|
190
|
+
all: unset;
|
|
191
|
+
display: flex;
|
|
192
|
+
align-items: center;
|
|
193
|
+
justify-content: center;
|
|
194
|
+
flex: none;
|
|
195
|
+
cursor: pointer;
|
|
196
|
+
color: var(--rg-text-secondary);
|
|
197
|
+
-webkit-tap-highlight-color: transparent;
|
|
198
|
+
transition: color 150ms var(--rg-ease-drawer), transform 400ms var(--rg-ease-spring);
|
|
199
|
+
}
|
|
200
|
+
.rg-submit::after {
|
|
201
|
+
position: absolute;
|
|
202
|
+
width: max(24px, 100%);
|
|
203
|
+
height: max(24px, 100%);
|
|
204
|
+
content: '';
|
|
205
|
+
}
|
|
206
|
+
.rg-action, .rg-collapse, .rg-submit { position: relative; }
|
|
207
|
+
.rg-action:focus-visible,
|
|
208
|
+
.rg-collapse:focus-visible,
|
|
209
|
+
.rg-submit:focus-visible,
|
|
210
|
+
.rg-thread-close:focus-visible {
|
|
211
|
+
outline: 2px solid var(--review-accent);
|
|
212
|
+
outline-offset: 3px;
|
|
213
|
+
}
|
|
214
|
+
.rg-action { width: 28px; height: 28px; }
|
|
215
|
+
.rg-action svg { width: 14px; height: 14px; fill: currentColor; }
|
|
216
|
+
.rg-action:hover,
|
|
217
|
+
.rg-action[aria-pressed="true"],
|
|
218
|
+
.rg-feedback-list-tool[aria-expanded="true"],
|
|
219
|
+
.rg-collapse:hover {
|
|
220
|
+
color: var(--rg-text-primary);
|
|
221
|
+
}
|
|
222
|
+
@media (hover: hover) and (pointer: fine) {
|
|
223
|
+
.rg-action:hover, .rg-collapse:hover, .rg-submit:hover { transform: scale(1.05); }
|
|
224
|
+
}
|
|
225
|
+
.rg-action:active, .rg-collapse:active, .rg-submit:active {
|
|
226
|
+
transform: scale(.96);
|
|
227
|
+
transition-duration: 60ms;
|
|
228
|
+
transition-timing-function: cubic-bezier(0, 0, .2, 1);
|
|
229
|
+
}
|
|
230
|
+
.rg-collapse { width: 28px; height: 28px; }
|
|
231
|
+
.rg-collapse svg {
|
|
232
|
+
width: 18px;
|
|
233
|
+
height: 18px;
|
|
234
|
+
margin: -2px;
|
|
235
|
+
fill: currentColor;
|
|
236
|
+
transform: rotate(90deg);
|
|
237
|
+
transition: transform 150ms var(--rg-ease-drawer), color 150ms var(--rg-ease-drawer);
|
|
238
|
+
}
|
|
239
|
+
.rg-tooltip {
|
|
240
|
+
position: absolute;
|
|
241
|
+
left: 50%;
|
|
242
|
+
bottom: calc(100% + 10px);
|
|
243
|
+
transform: translate(-50%, 2px) scale(.97);
|
|
244
|
+
padding: 2px 8px;
|
|
245
|
+
pointer-events: none;
|
|
246
|
+
border-radius: 999px;
|
|
247
|
+
color: var(--rg-text-primary);
|
|
248
|
+
background: var(--rg-panel-bg);
|
|
249
|
+
box-shadow: var(--rg-shadow);
|
|
250
|
+
opacity: 0;
|
|
251
|
+
font: 500 10px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
252
|
+
white-space: nowrap;
|
|
253
|
+
transition: opacity 100ms ease-out, transform 100ms ease-out;
|
|
254
|
+
transition-delay: 0ms;
|
|
255
|
+
}
|
|
256
|
+
.rg-action-wrap:hover .rg-tooltip, .rg-action-wrap:focus-within .rg-tooltip {
|
|
257
|
+
transform: translate(-50%, 0) scale(1);
|
|
258
|
+
opacity: 1;
|
|
259
|
+
transition-delay: 400ms;
|
|
260
|
+
}
|
|
261
|
+
.rg-toolbar[data-selecting="true"]:not(:hover) {
|
|
262
|
+
transform: translateX(-50%) scale(.97);
|
|
263
|
+
opacity: .55;
|
|
264
|
+
}
|
|
265
|
+
.rg-toolbar[data-selecting="true"] .rg-tooltip,
|
|
266
|
+
.rg-toolbar[data-collapsed="true"] .rg-tooltip { display: none; }
|
|
267
|
+
.rg-toolbar[data-collapsed="true"] {
|
|
268
|
+
bottom: 0;
|
|
269
|
+
padding: 2px 8px 0;
|
|
270
|
+
border-radius: 10px 10px 0 0;
|
|
271
|
+
}
|
|
272
|
+
.rg-toolbar[data-collapsed="true"] .rg-toolbar-actions-shell {
|
|
273
|
+
grid-template-columns: 0fr;
|
|
274
|
+
pointer-events: none;
|
|
275
|
+
}
|
|
276
|
+
.rg-toolbar[data-collapsed="true"] .rg-toolbar-actions {
|
|
277
|
+
overflow: hidden;
|
|
278
|
+
opacity: 0;
|
|
279
|
+
transition: opacity 100ms var(--rg-ease-drawer);
|
|
280
|
+
}
|
|
281
|
+
.rg-toolbar[data-collapsed="true"] .rg-collapse svg { transform: rotate(-90deg); }
|
|
282
|
+
.rg-developer-status {
|
|
283
|
+
position: absolute;
|
|
284
|
+
left: 50%;
|
|
285
|
+
bottom: calc(100% + 8px);
|
|
286
|
+
transform: translate(-50%, 4px) scale(.98);
|
|
287
|
+
padding: 4px 8px;
|
|
288
|
+
pointer-events: none;
|
|
289
|
+
border-radius: 999px;
|
|
290
|
+
color: var(--rg-text-primary);
|
|
291
|
+
background: var(--rg-panel-bg);
|
|
292
|
+
box-shadow: var(--rg-shadow);
|
|
293
|
+
opacity: 0;
|
|
294
|
+
white-space: nowrap;
|
|
295
|
+
font: 500 11px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
296
|
+
transition: opacity 120ms ease-out, transform 120ms ease-out;
|
|
297
|
+
}
|
|
298
|
+
.rg-developer-status[data-tone="error"] { color: var(--rg-status-error); }
|
|
299
|
+
.rg-developer-status[data-visible="true"] {
|
|
300
|
+
transform: translate(-50%, 0) scale(1);
|
|
301
|
+
opacity: 1;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.rg-selection-label {
|
|
305
|
+
position: fixed;
|
|
306
|
+
transform: translateX(-50%);
|
|
307
|
+
z-index: 2147483002;
|
|
308
|
+
min-width: 150px;
|
|
309
|
+
max-width: 280px;
|
|
310
|
+
pointer-events: auto;
|
|
311
|
+
color: var(--rg-text-primary);
|
|
312
|
+
filter: var(--rg-drop-shadow);
|
|
313
|
+
font: 500 13px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
314
|
+
font-synthesis: none;
|
|
315
|
+
transition: opacity 125ms ease-out, filter 125ms ease-out;
|
|
316
|
+
}
|
|
317
|
+
.rg-selection-label:focus { outline: none; }
|
|
318
|
+
.rg-surface {
|
|
319
|
+
overflow: hidden;
|
|
320
|
+
min-width: 150px;
|
|
321
|
+
max-width: 280px;
|
|
322
|
+
border-radius: 14px;
|
|
323
|
+
corner-shape: superellipse(1.25);
|
|
324
|
+
background: var(--rg-panel-bg);
|
|
325
|
+
}
|
|
326
|
+
.rg-tag-row {
|
|
327
|
+
display: flex;
|
|
328
|
+
align-items: center;
|
|
329
|
+
max-width: 280px;
|
|
330
|
+
padding: 6px 8px 4px;
|
|
331
|
+
overflow: hidden;
|
|
332
|
+
}
|
|
333
|
+
.rg-tag {
|
|
334
|
+
overflow: hidden;
|
|
335
|
+
color: var(--rg-text-primary);
|
|
336
|
+
text-overflow: ellipsis;
|
|
337
|
+
white-space: nowrap;
|
|
338
|
+
}
|
|
339
|
+
.rg-bottom-section {
|
|
340
|
+
display: flex;
|
|
341
|
+
align-items: end;
|
|
342
|
+
width: auto;
|
|
343
|
+
min-height: 28px;
|
|
344
|
+
padding: 6px 8px;
|
|
345
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
346
|
+
}
|
|
347
|
+
.rg-bottom-section textarea {
|
|
348
|
+
flex: 1;
|
|
349
|
+
field-sizing: content;
|
|
350
|
+
min-width: 110px;
|
|
351
|
+
min-height: 16px;
|
|
352
|
+
max-height: 95px;
|
|
353
|
+
margin: 0;
|
|
354
|
+
padding: 0;
|
|
355
|
+
resize: none;
|
|
356
|
+
outline: none;
|
|
357
|
+
border: 0;
|
|
358
|
+
border-radius: 0;
|
|
359
|
+
color: var(--rg-text-primary);
|
|
360
|
+
background: transparent;
|
|
361
|
+
box-shadow: none;
|
|
362
|
+
overflow-y: auto;
|
|
363
|
+
scrollbar-width: none;
|
|
364
|
+
font: 500 13px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
365
|
+
overflow-wrap: break-word;
|
|
366
|
+
word-break: keep-all;
|
|
367
|
+
}
|
|
368
|
+
.rg-bottom-section textarea::placeholder { color: var(--rg-text-secondary); }
|
|
369
|
+
.rg-thread-label .rg-surface {
|
|
370
|
+
display: flex;
|
|
371
|
+
flex-direction: column;
|
|
372
|
+
width: min(280px, calc(100vw - 16px));
|
|
373
|
+
max-height: min(360px, calc(100vh - 16px));
|
|
374
|
+
max-height: min(360px, calc(100dvh - 16px));
|
|
375
|
+
}
|
|
376
|
+
.rg-thread-label .rg-tag-row { flex: none; gap: 8px; }
|
|
377
|
+
.rg-thread-close {
|
|
378
|
+
all: unset;
|
|
379
|
+
position: relative;
|
|
380
|
+
display: flex;
|
|
381
|
+
align-items: center;
|
|
382
|
+
justify-content: center;
|
|
383
|
+
flex: none;
|
|
384
|
+
width: 14px;
|
|
385
|
+
height: 14px;
|
|
386
|
+
margin-left: auto;
|
|
387
|
+
color: var(--rg-text-secondary);
|
|
388
|
+
cursor: pointer;
|
|
389
|
+
-webkit-tap-highlight-color: transparent;
|
|
390
|
+
transition: color 150ms var(--rg-ease-drawer), transform 400ms var(--rg-ease-spring);
|
|
391
|
+
}
|
|
392
|
+
.rg-thread-close::after {
|
|
393
|
+
position: absolute;
|
|
394
|
+
width: 24px;
|
|
395
|
+
height: 24px;
|
|
396
|
+
content: '';
|
|
397
|
+
}
|
|
398
|
+
.rg-thread-close svg { width: 10px; height: 10px; fill: currentColor; }
|
|
399
|
+
.rg-thread-close:hover { color: var(--rg-text-primary); }
|
|
400
|
+
.rg-thread-close:active {
|
|
401
|
+
transform: scale(.96);
|
|
402
|
+
transition-duration: 60ms;
|
|
403
|
+
}
|
|
404
|
+
.rg-thread-messages {
|
|
405
|
+
min-height: 0;
|
|
406
|
+
overflow: auto;
|
|
407
|
+
scrollbar-width: none;
|
|
408
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
409
|
+
}
|
|
410
|
+
.rg-thread-messages::-webkit-scrollbar { display: none; }
|
|
411
|
+
.rg-message { padding: 6px 8px; }
|
|
412
|
+
.rg-message + .rg-message { border-top: .5px solid var(--rg-border-subtle); }
|
|
413
|
+
.rg-message-meta {
|
|
414
|
+
overflow: hidden;
|
|
415
|
+
color: var(--rg-text-secondary);
|
|
416
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
417
|
+
text-overflow: ellipsis;
|
|
418
|
+
white-space: nowrap;
|
|
419
|
+
}
|
|
420
|
+
.rg-message-body {
|
|
421
|
+
margin: 2px 0 0;
|
|
422
|
+
color: var(--rg-text-primary);
|
|
423
|
+
font: 500 13px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
424
|
+
overflow-wrap: anywhere;
|
|
425
|
+
white-space: pre-wrap;
|
|
426
|
+
}
|
|
427
|
+
.rg-thread-label .rg-bottom-section { flex: none; }
|
|
428
|
+
.rg-submit {
|
|
429
|
+
width: 16px;
|
|
430
|
+
height: 16px;
|
|
431
|
+
margin-left: 4px;
|
|
432
|
+
border-radius: 50%;
|
|
433
|
+
color: var(--rg-submit-fg);
|
|
434
|
+
background: var(--rg-submit-bg);
|
|
435
|
+
}
|
|
436
|
+
.rg-submit svg { width: 10px; height: 10px; fill: currentColor; }
|
|
437
|
+
.rg-submit:disabled { cursor: wait; opacity: .5; }
|
|
438
|
+
.rg-label-arrow {
|
|
439
|
+
position: absolute;
|
|
440
|
+
left: var(--rg-arrow-left, 50%);
|
|
441
|
+
display: block;
|
|
442
|
+
width: 16px;
|
|
443
|
+
height: 8px;
|
|
444
|
+
translate: -50% 0;
|
|
445
|
+
fill: var(--rg-panel-bg);
|
|
446
|
+
}
|
|
447
|
+
.rg-selection-label[data-side="below"] .rg-label-arrow {
|
|
448
|
+
top: -7px;
|
|
449
|
+
}
|
|
450
|
+
.rg-selection-label[data-side="above"] .rg-label-arrow {
|
|
451
|
+
bottom: -7px;
|
|
452
|
+
transform: rotate(180deg);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
@media (hover: none), (pointer: coarse) {
|
|
456
|
+
.rg-toolbar {
|
|
457
|
+
min-height: 56px;
|
|
458
|
+
padding: 6px;
|
|
459
|
+
border-radius: 28px;
|
|
460
|
+
}
|
|
461
|
+
.rg-toolbar .rg-action-wrap {
|
|
462
|
+
width: 44px;
|
|
463
|
+
height: 44px;
|
|
464
|
+
margin-right: 0;
|
|
465
|
+
}
|
|
466
|
+
.rg-toolbar .rg-action,
|
|
467
|
+
.rg-toolbar .rg-collapse {
|
|
468
|
+
width: 44px;
|
|
469
|
+
height: 44px;
|
|
470
|
+
}
|
|
471
|
+
.rg-thread-close::after,
|
|
472
|
+
.rg-submit::after {
|
|
473
|
+
width: 100%;
|
|
474
|
+
height: 100%;
|
|
475
|
+
}
|
|
476
|
+
.rg-thread-label .rg-tag-row,
|
|
477
|
+
.rg-thread-label .rg-bottom-section {
|
|
478
|
+
min-height: 44px;
|
|
479
|
+
padding-top: 0;
|
|
480
|
+
padding-bottom: 0;
|
|
481
|
+
}
|
|
482
|
+
.rg-thread-close,
|
|
483
|
+
.rg-submit {
|
|
484
|
+
width: 44px;
|
|
485
|
+
height: 44px;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
@media (prefers-reduced-motion: reduce) {
|
|
490
|
+
.rg-toolbar, .rg-toolbar *, .rg-selection-label, .rg-selection-label * {
|
|
491
|
+
animation: none !important;
|
|
492
|
+
transition: none !important;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
@supports (-webkit-touch-callout: none) {
|
|
497
|
+
.rg-bottom-section textarea { font-size: 16px; }
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
.rg-visually-hidden {
|
|
502
|
+
position: fixed;
|
|
503
|
+
width: 1px;
|
|
504
|
+
height: 1px;
|
|
505
|
+
padding: 0;
|
|
506
|
+
overflow: hidden;
|
|
507
|
+
clip: rect(0 0 0 0);
|
|
508
|
+
clip-path: inset(50%);
|
|
509
|
+
white-space: nowrap;
|
|
510
|
+
border: 0;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.rg-feedback-navigator-scrim {
|
|
514
|
+
display: none;
|
|
515
|
+
position: fixed;
|
|
516
|
+
inset: 0;
|
|
517
|
+
z-index: 2147483001;
|
|
518
|
+
pointer-events: auto;
|
|
519
|
+
background: rgba(0, 0, 0, .08);
|
|
520
|
+
touch-action: none;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.rg-feedback-navigator {
|
|
524
|
+
position: fixed;
|
|
525
|
+
right: auto;
|
|
526
|
+
bottom: calc(max(16px, env(safe-area-inset-bottom)) + 34px);
|
|
527
|
+
left: max(8px, calc(50% - 170px));
|
|
528
|
+
z-index: 2147483646;
|
|
529
|
+
display: flex;
|
|
530
|
+
flex-direction: column;
|
|
531
|
+
width: min(340px, calc(100vw - 16px));
|
|
532
|
+
max-height: min(420px, calc(100dvh - 66px));
|
|
533
|
+
overflow: hidden;
|
|
534
|
+
pointer-events: auto;
|
|
535
|
+
border: 0;
|
|
536
|
+
border-radius: 14px;
|
|
537
|
+
corner-shape: superellipse(1.25);
|
|
538
|
+
color: var(--rg-text-primary);
|
|
539
|
+
background: var(--rg-panel-bg);
|
|
540
|
+
box-shadow: var(--rg-shadow);
|
|
541
|
+
font: 500 13px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
542
|
+
font-synthesis: none;
|
|
543
|
+
transform-origin: var(--rg-navigator-origin-x, 50%) calc(100% + 8px);
|
|
544
|
+
}
|
|
545
|
+
.rg-feedback-navigator[data-motion="enter"] {
|
|
546
|
+
animation: rg-feedback-navigator-enter 220ms var(--rg-ease-spring) both;
|
|
547
|
+
}
|
|
548
|
+
.rg-feedback-navigator-header {
|
|
549
|
+
display: flex;
|
|
550
|
+
align-items: center;
|
|
551
|
+
flex: none;
|
|
552
|
+
min-height: 34px;
|
|
553
|
+
padding: 5px 5px 3px 8px;
|
|
554
|
+
}
|
|
555
|
+
.rg-feedback-navigator-heading {
|
|
556
|
+
display: flex;
|
|
557
|
+
align-items: center;
|
|
558
|
+
min-width: 0;
|
|
559
|
+
gap: 4px;
|
|
560
|
+
}
|
|
561
|
+
.rg-feedback-navigator-title {
|
|
562
|
+
overflow: hidden;
|
|
563
|
+
margin: 0;
|
|
564
|
+
color: var(--rg-text-primary);
|
|
565
|
+
font: 500 13px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
566
|
+
text-overflow: ellipsis;
|
|
567
|
+
white-space: nowrap;
|
|
568
|
+
}
|
|
569
|
+
.rg-feedback-navigator-total {
|
|
570
|
+
color: var(--rg-text-secondary);
|
|
571
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
572
|
+
font-variant-numeric: tabular-nums;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.rg-feedback-navigator-close,
|
|
576
|
+
.rg-feedback-filter,
|
|
577
|
+
.rg-feedback-row,
|
|
578
|
+
.rg-feedback-navigator-retry {
|
|
579
|
+
all: unset;
|
|
580
|
+
box-sizing: border-box;
|
|
581
|
+
cursor: pointer;
|
|
582
|
+
-webkit-tap-highlight-color: transparent;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.rg-inline-error {
|
|
586
|
+
padding: 5px 8px;
|
|
587
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
588
|
+
color: var(--review-accent);
|
|
589
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
590
|
+
}
|
|
591
|
+
.rg-feedback-navigator-close {
|
|
592
|
+
position: relative;
|
|
593
|
+
display: flex;
|
|
594
|
+
align-items: center;
|
|
595
|
+
justify-content: center;
|
|
596
|
+
flex: none;
|
|
597
|
+
width: 24px;
|
|
598
|
+
height: 24px;
|
|
599
|
+
margin-left: auto;
|
|
600
|
+
border-radius: 6px;
|
|
601
|
+
color: var(--rg-text-secondary);
|
|
602
|
+
transition:
|
|
603
|
+
color 150ms var(--rg-ease-drawer),
|
|
604
|
+
background 150ms var(--rg-ease-drawer),
|
|
605
|
+
transform 400ms var(--rg-ease-spring);
|
|
606
|
+
}
|
|
607
|
+
.rg-feedback-navigator-close svg {
|
|
608
|
+
width: 14px;
|
|
609
|
+
height: 14px;
|
|
610
|
+
fill: currentColor;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.rg-feedback-filters {
|
|
614
|
+
display: flex;
|
|
615
|
+
align-items: center;
|
|
616
|
+
flex: none;
|
|
617
|
+
gap: 2px;
|
|
618
|
+
margin: 0 4px 4px;
|
|
619
|
+
}
|
|
620
|
+
.rg-feedback-filter {
|
|
621
|
+
display: flex;
|
|
622
|
+
align-items: center;
|
|
623
|
+
min-width: 0;
|
|
624
|
+
min-height: 24px;
|
|
625
|
+
padding: 4px 6px;
|
|
626
|
+
gap: 4px;
|
|
627
|
+
border-radius: 6px;
|
|
628
|
+
color: var(--rg-text-secondary);
|
|
629
|
+
text-align: center;
|
|
630
|
+
transition:
|
|
631
|
+
color 150ms var(--rg-ease-drawer),
|
|
632
|
+
background 150ms var(--rg-ease-drawer),
|
|
633
|
+
transform 400ms var(--rg-ease-spring);
|
|
634
|
+
}
|
|
635
|
+
.rg-feedback-filter[aria-pressed="true"] {
|
|
636
|
+
color: var(--rg-text-primary);
|
|
637
|
+
background: var(--rg-surface-hover);
|
|
638
|
+
}
|
|
639
|
+
.rg-feedback-filter-label {
|
|
640
|
+
overflow: hidden;
|
|
641
|
+
text-overflow: ellipsis;
|
|
642
|
+
white-space: nowrap;
|
|
643
|
+
}
|
|
644
|
+
.rg-feedback-filter-count {
|
|
645
|
+
color: var(--rg-text-secondary);
|
|
646
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
647
|
+
font-variant-numeric: tabular-nums;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.rg-feedback-navigator-content {
|
|
651
|
+
min-height: 0;
|
|
652
|
+
overflow: auto;
|
|
653
|
+
overscroll-behavior: contain;
|
|
654
|
+
scrollbar-color: var(--rg-border-subtle) transparent;
|
|
655
|
+
scrollbar-width: thin;
|
|
656
|
+
border-top: .5px solid var(--rg-border-subtle);
|
|
657
|
+
}
|
|
658
|
+
.rg-feedback-list {
|
|
659
|
+
margin: 0;
|
|
660
|
+
padding: 4px;
|
|
661
|
+
list-style: none;
|
|
662
|
+
}
|
|
663
|
+
.rg-feedback-row {
|
|
664
|
+
display: grid;
|
|
665
|
+
grid-template-columns: 18px minmax(0, 1fr);
|
|
666
|
+
align-items: start;
|
|
667
|
+
width: 100%;
|
|
668
|
+
min-height: 50px;
|
|
669
|
+
padding: 7px 8px;
|
|
670
|
+
gap: 6px;
|
|
671
|
+
border-radius: 8px;
|
|
672
|
+
color: var(--rg-text-primary);
|
|
673
|
+
text-align: left;
|
|
674
|
+
transition:
|
|
675
|
+
background 150ms var(--rg-ease-drawer),
|
|
676
|
+
opacity 150ms var(--rg-ease-drawer);
|
|
677
|
+
}
|
|
678
|
+
.rg-feedback-row[aria-current="true"] {
|
|
679
|
+
background: var(--rg-surface-hover);
|
|
680
|
+
}
|
|
681
|
+
.rg-feedback-row[data-status="resolved"] .rg-feedback-row-copy {
|
|
682
|
+
opacity: .68;
|
|
683
|
+
}
|
|
684
|
+
.rg-feedback-row-pin {
|
|
685
|
+
display: grid;
|
|
686
|
+
place-items: center;
|
|
687
|
+
width: 18px;
|
|
688
|
+
height: 18px;
|
|
689
|
+
color: var(--rg-text-secondary);
|
|
690
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
691
|
+
font-variant-numeric: tabular-nums;
|
|
692
|
+
}
|
|
693
|
+
.rg-feedback-row-copy {
|
|
694
|
+
display: flex;
|
|
695
|
+
flex-direction: column;
|
|
696
|
+
min-width: 0;
|
|
697
|
+
gap: 2px;
|
|
698
|
+
}
|
|
699
|
+
.rg-feedback-row-body {
|
|
700
|
+
display: -webkit-box;
|
|
701
|
+
overflow: hidden;
|
|
702
|
+
color: var(--rg-text-primary);
|
|
703
|
+
overflow-wrap: anywhere;
|
|
704
|
+
white-space: pre-wrap;
|
|
705
|
+
-webkit-box-orient: vertical;
|
|
706
|
+
-webkit-line-clamp: 2;
|
|
707
|
+
}
|
|
708
|
+
.rg-feedback-row-context {
|
|
709
|
+
overflow: hidden;
|
|
710
|
+
color: var(--rg-text-secondary);
|
|
711
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
712
|
+
text-overflow: ellipsis;
|
|
713
|
+
white-space: nowrap;
|
|
714
|
+
}
|
|
715
|
+
.rg-feedback-row-context[data-current-page="true"] {
|
|
716
|
+
color: var(--rg-text-primary);
|
|
717
|
+
}
|
|
718
|
+
.rg-feedback-row-detail {
|
|
719
|
+
display: flex;
|
|
720
|
+
align-items: center;
|
|
721
|
+
min-width: 0;
|
|
722
|
+
color: var(--rg-text-secondary);
|
|
723
|
+
}
|
|
724
|
+
.rg-feedback-row-meta {
|
|
725
|
+
overflow: hidden;
|
|
726
|
+
color: var(--rg-text-secondary);
|
|
727
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
728
|
+
text-overflow: ellipsis;
|
|
729
|
+
white-space: nowrap;
|
|
730
|
+
}
|
|
731
|
+
.rg-feedback-row-trailing {
|
|
732
|
+
display: flex;
|
|
733
|
+
align-items: center;
|
|
734
|
+
min-width: 0;
|
|
735
|
+
margin-left: 6px;
|
|
736
|
+
gap: 6px;
|
|
737
|
+
color: var(--rg-text-secondary);
|
|
738
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
739
|
+
white-space: nowrap;
|
|
740
|
+
}
|
|
741
|
+
.rg-feedback-row-location-missing {
|
|
742
|
+
display: flex;
|
|
743
|
+
align-items: center;
|
|
744
|
+
justify-content: center;
|
|
745
|
+
width: 12px;
|
|
746
|
+
height: 12px;
|
|
747
|
+
color: var(--review-accent);
|
|
748
|
+
}
|
|
749
|
+
.rg-feedback-row-location-missing svg {
|
|
750
|
+
width: 12px;
|
|
751
|
+
height: 12px;
|
|
752
|
+
}
|
|
753
|
+
.rg-feedback-row-replies,
|
|
754
|
+
.rg-feedback-row-status {
|
|
755
|
+
display: inline-flex;
|
|
756
|
+
align-items: center;
|
|
757
|
+
min-height: 14px;
|
|
758
|
+
}
|
|
759
|
+
.rg-feedback-row-status {
|
|
760
|
+
width: 12px;
|
|
761
|
+
height: 12px;
|
|
762
|
+
}
|
|
763
|
+
.rg-feedback-row-status svg {
|
|
764
|
+
width: 12px;
|
|
765
|
+
height: 12px;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
.rg-feedback-navigator-state,
|
|
769
|
+
.rg-feedback-navigator-empty {
|
|
770
|
+
display: flex;
|
|
771
|
+
align-items: center;
|
|
772
|
+
justify-content: center;
|
|
773
|
+
min-height: 58px;
|
|
774
|
+
padding: 12px;
|
|
775
|
+
color: var(--rg-text-secondary);
|
|
776
|
+
text-align: center;
|
|
777
|
+
}
|
|
778
|
+
.rg-feedback-navigator-state[data-state="reconnecting"] {
|
|
779
|
+
min-height: 0;
|
|
780
|
+
padding: 5px 8px;
|
|
781
|
+
border-bottom: .5px solid var(--rg-border-subtle);
|
|
782
|
+
color: var(--rg-text-secondary);
|
|
783
|
+
background: var(--rg-surface-hover);
|
|
784
|
+
font: 500 10px/14px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
785
|
+
}
|
|
786
|
+
.rg-feedback-navigator-state[data-state="loading"]::before {
|
|
787
|
+
width: 12px;
|
|
788
|
+
height: 12px;
|
|
789
|
+
margin-right: 8px;
|
|
790
|
+
border: 1.5px solid var(--rg-border-subtle);
|
|
791
|
+
border-top-color: var(--rg-text-secondary);
|
|
792
|
+
border-radius: 50%;
|
|
793
|
+
content: '';
|
|
794
|
+
animation: rg-feedback-spinner 700ms linear infinite;
|
|
795
|
+
}
|
|
796
|
+
.rg-feedback-navigator-state[data-state="error"] {
|
|
797
|
+
flex-wrap: wrap;
|
|
798
|
+
gap: 8px;
|
|
799
|
+
}
|
|
800
|
+
.rg-feedback-navigator-retry {
|
|
801
|
+
display: inline-flex;
|
|
802
|
+
align-items: center;
|
|
803
|
+
justify-content: center;
|
|
804
|
+
min-height: 17px;
|
|
805
|
+
padding: 1px 4px;
|
|
806
|
+
border: .5px solid var(--rg-border-subtle);
|
|
807
|
+
border-radius: 4px;
|
|
808
|
+
color: var(--rg-text-primary);
|
|
809
|
+
background: var(--rg-panel-bg);
|
|
810
|
+
transition:
|
|
811
|
+
background 150ms var(--rg-ease-drawer),
|
|
812
|
+
transform 400ms var(--rg-ease-spring);
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.rg-feedback-list-tool:focus-visible,
|
|
816
|
+
.rg-feedback-navigator-close:focus-visible,
|
|
817
|
+
.rg-feedback-filter:focus-visible,
|
|
818
|
+
.rg-feedback-row:focus-visible,
|
|
819
|
+
.rg-feedback-navigator-retry:focus-visible {
|
|
820
|
+
outline: 2px solid var(--review-accent);
|
|
821
|
+
outline-offset: 2px;
|
|
822
|
+
}
|
|
823
|
+
.rg-feedback-row:focus-visible {
|
|
824
|
+
outline-offset: -2px;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
@media (hover: hover) and (pointer: fine) {
|
|
828
|
+
.rg-feedback-navigator-close:hover,
|
|
829
|
+
.rg-feedback-filter:hover,
|
|
830
|
+
.rg-feedback-navigator-retry:hover {
|
|
831
|
+
color: var(--rg-text-primary);
|
|
832
|
+
background: var(--rg-surface-hover);
|
|
833
|
+
}
|
|
834
|
+
.rg-feedback-row:hover { background: var(--rg-surface-hover); }
|
|
835
|
+
.rg-feedback-navigator-close:active,
|
|
836
|
+
.rg-feedback-filter:active,
|
|
837
|
+
.rg-feedback-navigator-retry:active {
|
|
838
|
+
transform: scale(.96);
|
|
839
|
+
transition-duration: 60ms;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
@media (max-width: 640px) {
|
|
844
|
+
.rg-feedback-navigator-scrim {
|
|
845
|
+
display: block;
|
|
846
|
+
}
|
|
847
|
+
.rg-feedback-navigator-scrim[data-motion="enter"] {
|
|
848
|
+
animation: rg-feedback-scrim-enter 160ms ease-out both;
|
|
849
|
+
}
|
|
850
|
+
.rg-feedback-navigator {
|
|
851
|
+
right: auto;
|
|
852
|
+
bottom: calc(max(16px, env(safe-area-inset-bottom)) + 64px);
|
|
853
|
+
left: 50%;
|
|
854
|
+
width: min(360px, calc(100vw - 16px));
|
|
855
|
+
max-height: min(70dvh, 480px);
|
|
856
|
+
border-radius: 14px;
|
|
857
|
+
transform: translateX(-50%);
|
|
858
|
+
}
|
|
859
|
+
.rg-feedback-navigator[data-motion="enter"] {
|
|
860
|
+
animation: rg-feedback-sheet-enter 220ms var(--rg-ease-drawer) both;
|
|
861
|
+
}
|
|
862
|
+
.rg-feedback-navigator-header { min-height: 44px; padding-top: 5px; }
|
|
863
|
+
.rg-feedback-navigator-content { -webkit-overflow-scrolling: touch; }
|
|
864
|
+
.rg-feedback-filter { min-height: 44px; }
|
|
865
|
+
.rg-feedback-row { min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
|
|
866
|
+
.rg-feedback-navigator-close,
|
|
867
|
+
.rg-feedback-navigator-retry { min-width: 44px; min-height: 44px; }
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
@media (hover: none), (pointer: coarse) {
|
|
871
|
+
.rg-feedback-list-tool svg {
|
|
872
|
+
width: 14px;
|
|
873
|
+
height: 14px;
|
|
874
|
+
}
|
|
875
|
+
.pin::after {
|
|
876
|
+
top: 50%;
|
|
877
|
+
left: 50%;
|
|
878
|
+
width: 44px;
|
|
879
|
+
height: 44px;
|
|
880
|
+
transform: translate(-50%, -50%);
|
|
881
|
+
}
|
|
882
|
+
.rg-feedback-filter { min-height: 44px; }
|
|
883
|
+
.rg-feedback-row { min-height: 56px; }
|
|
884
|
+
.rg-feedback-navigator-close,
|
|
885
|
+
.rg-feedback-navigator-retry { min-width: 44px; min-height: 44px; }
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
@media (prefers-reduced-motion: reduce) {
|
|
889
|
+
.pin,
|
|
890
|
+
.rg-feedback-navigator-scrim,
|
|
891
|
+
.rg-feedback-navigator,
|
|
892
|
+
.rg-feedback-navigator *,
|
|
893
|
+
.rg-feedback-list-tool {
|
|
894
|
+
animation: none !important;
|
|
895
|
+
transition: none !important;
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
@media (forced-colors: active) {
|
|
900
|
+
.pin,
|
|
901
|
+
.pin[data-resolved="true"],
|
|
902
|
+
.pin[data-resolved="true"][data-active="true"] {
|
|
903
|
+
border-color: Canvas;
|
|
904
|
+
color: Canvas;
|
|
905
|
+
background: CanvasText;
|
|
906
|
+
box-shadow: 0 0 0 1px CanvasText;
|
|
907
|
+
}
|
|
908
|
+
.pin[data-active="true"],
|
|
909
|
+
.pin:focus-visible {
|
|
910
|
+
outline: 3px solid Highlight;
|
|
911
|
+
outline-offset: 3px;
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
@keyframes rg-feedback-navigator-enter {
|
|
916
|
+
from { opacity: 0; transform: translateY(2px) scale(.92); }
|
|
917
|
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
|
918
|
+
}
|
|
919
|
+
@keyframes rg-feedback-sheet-enter {
|
|
920
|
+
from { opacity: 0; transform: translate(-50%, 12px) scale(.98); }
|
|
921
|
+
to { opacity: 1; transform: translate(-50%, 0) scale(1); }
|
|
922
|
+
}
|
|
923
|
+
@keyframes rg-feedback-scrim-enter {
|
|
924
|
+
from { opacity: 0; }
|
|
925
|
+
to { opacity: 1; }
|
|
926
|
+
}
|
|
927
|
+
@keyframes rg-feedback-spinner {
|
|
928
|
+
to { transform: rotate(360deg); }
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
.rg-collaboration-cursors { position: fixed; inset: 0; z-index: 2147483645; pointer-events: none; }
|
|
933
|
+
.rg-collaboration-cursor { position: fixed; transform: translate(-2px, -2px); color: var(--rg-peer-color); }
|
|
934
|
+
.rg-collaboration-cursor-pointer {
|
|
935
|
+
width: 14px; height: 18px; background: currentColor;
|
|
936
|
+
clip-path: polygon(0 0, 100% 68%, 58% 72%, 40% 100%);
|
|
937
|
+
filter: drop-shadow(0 1px 1px rgba(0,0,0,.28));
|
|
938
|
+
}
|
|
939
|
+
.rg-collaboration-cursor-label {
|
|
940
|
+
margin: -1px 0 0 11px; padding: 2px 6px; border-radius: 0 6px 6px 6px;
|
|
941
|
+
color: #fff; background: var(--rg-peer-color); white-space: nowrap;
|
|
942
|
+
font: 600 11px/16px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
943
|
+
text-shadow: 0 1px 1px rgba(0,0,0,.18);
|
|
944
|
+
}
|
|
945
|
+
.rg-collaboration-participants, .rg-collaboration-chat-trigger {
|
|
946
|
+
all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
|
|
947
|
+
flex: none; width: 28px; height: 28px; color: var(--rg-text-secondary);
|
|
948
|
+
font: 600 10px/1 Geist, ui-sans-serif, system-ui, sans-serif;
|
|
949
|
+
}
|
|
950
|
+
.rg-collaboration-participants[hidden] { display: none; }
|
|
951
|
+
.rg-collaboration-chat-trigger { cursor: pointer; }
|
|
952
|
+
.rg-collaboration-chat-trigger svg { width: 14px; height: 14px; fill: currentColor; }
|
|
953
|
+
.rg-collaboration-chat-trigger:hover,
|
|
954
|
+
.rg-collaboration-chat-trigger[aria-expanded="true"] { color: var(--rg-text-primary); }
|
|
955
|
+
@media (hover: hover) and (pointer: fine) {
|
|
956
|
+
.rg-collaboration-chat-trigger:hover { transform: scale(1.05); }
|
|
957
|
+
}
|
|
958
|
+
.rg-collaboration-chat-trigger:active { transform: scale(.96); }
|
|
959
|
+
.rg-collaboration-chat-trigger:focus-visible,
|
|
960
|
+
.rg-collaboration-chat button:focus-visible, .rg-collaboration-chat textarea:focus-visible {
|
|
961
|
+
outline: 2px solid var(--review-accent); outline-offset: 2px;
|
|
962
|
+
}
|
|
963
|
+
.rg-collaboration-chat {
|
|
964
|
+
position: fixed; right: 16px; bottom: 64px; z-index: 2147483646;
|
|
965
|
+
display: grid; grid-template-rows: auto minmax(120px, 1fr) auto;
|
|
966
|
+
width: min(360px, calc(100vw - 32px)); max-height: min(520px, calc(100vh - 96px));
|
|
967
|
+
overflow: hidden; border: 1px solid var(--rg-border-subtle); border-radius: 16px;
|
|
968
|
+
color: var(--rg-text-primary); background: var(--rg-panel-bg); box-shadow: var(--rg-shadow);
|
|
969
|
+
font: 13px/18px Geist, ui-sans-serif, system-ui, sans-serif;
|
|
970
|
+
}
|
|
971
|
+
.rg-collaboration-chat[hidden] { display: none; }
|
|
972
|
+
.rg-collaboration-chat-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--rg-border-subtle); }
|
|
973
|
+
.rg-collaboration-chat-header h2 { margin: 0; font: 650 14px/20px inherit; }
|
|
974
|
+
.rg-collaboration-chat-close { all: unset; width: 28px; height: 28px; cursor: pointer; text-align: center; font-size: 22px; }
|
|
975
|
+
.rg-collaboration-chat-messages { min-height: 140px; overflow: auto; padding: 12px; }
|
|
976
|
+
.rg-collaboration-chat-empty { padding: 32px 16px; color: var(--rg-text-secondary); text-align: center; }
|
|
977
|
+
.rg-collaboration-chat-message { margin: 0 0 12px; }
|
|
978
|
+
.rg-collaboration-chat-message[data-mine="true"] { padding-left: 24px; }
|
|
979
|
+
.rg-collaboration-chat-meta { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--rg-text-secondary); font-size: 11px; }
|
|
980
|
+
.rg-collaboration-chat-meta strong { color: var(--rg-text-primary); font-size: 12px; }
|
|
981
|
+
.rg-collaboration-chat-pathname { min-width: 0; max-width: 150px; overflow: hidden; padding: 1px 5px; border-radius: 999px; background: var(--rg-panel-secondary); text-overflow: ellipsis; white-space: nowrap; }
|
|
982
|
+
.rg-collaboration-chat-meta time { margin-left: auto; white-space: nowrap; }
|
|
983
|
+
.rg-collaboration-chat-message p { margin: 3px 0 0; padding: 7px 9px; border-radius: 10px; background: var(--rg-panel-secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
984
|
+
.rg-collaboration-chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px; border-top: 1px solid var(--rg-border-subtle); }
|
|
985
|
+
.rg-collaboration-chat-input { box-sizing: border-box; min-width: 0; resize: none; border: 1px solid var(--rg-border-subtle); border-radius: 9px; padding: 7px 9px; color: var(--rg-text-primary); background: var(--rg-panel-bg); font: inherit; }
|
|
986
|
+
.rg-collaboration-chat-send { all: unset; align-self: end; padding: 7px 10px; border-radius: 9px; cursor: pointer; color: var(--rg-submit-fg); background: var(--rg-submit-bg); font-weight: 650; }
|
|
987
|
+
.rg-collaboration-chat-send:disabled { cursor: default; opacity: .55; }
|
|
988
|
+
.rg-collaboration-chat-error { grid-column: 1 / -1; color: var(--rg-status-error, #b42318); font-size: 12px; }
|
|
989
|
+
@media (pointer: coarse) { .rg-collaboration-cursors { display: none; } }
|
|
990
|
+
@media (max-width: 640px) {
|
|
991
|
+
.rg-collaboration-chat { left: 8px; right: 8px; bottom: 58px; width: auto; max-height: calc(100dvh - 76px); }
|
|
992
|
+
}
|
|
993
|
+
`;let n=V(`highlight`);n.dataset.slot=`highlight`;let r=V(`region`);r.dataset.slot=`region`;let i=V(`pins`);i.dataset.slot=`pins`;let a=V(`panels`);a.dataset.slot=`panels`;let o=V(`navigator-slot`);o.dataset.slot=`navigator`,o.id=B,o.addEventListener(`click`,this.#Me),o.addEventListener(`keydown`,this.#Ne);let s=V(`rg-visually-hidden`);s.dataset.slot=`announcer`,s.setAttribute(`aria-live`,`polite`),s.setAttribute(`aria-atomic`,`true`);let c=Le({developerGrab:this.#t?.developerTools?.reactGrab===!0});c.querySelector(`.rg-toolbar-actions`)?.append(tt(0,{controlsId:B,presentation:this.#Se()})),c.querySelector(`.rg-feedback-tool`)?.addEventListener(`click`,()=>{if(!this.#me()){this.#b||this.#ge(!0),this.#Le(this.#he());return}if(this.#b&&this.#ge(!1,{restoreFocus:!1,restoreComposer:!0}))return;if(this.#h){this.#Le(`피드백을 저장하는 중입니다.`);return}if(this.#s&&this.#c===`react-grab`&&this.#g){this.#fe(!1);return}let e=this.#s&&this.#c===`feedback`;this.#fe(!e,`feedback`)}),c.querySelector(`.rg-developer-grab-tool`)?.addEventListener(`click`,()=>{if(this.#L){this.#Le(`코드 컨텍스트를 복사하는 중입니다.`);return}if(this.#h){this.#Le(`피드백을 저장하는 중입니다.`);return}this.#b&&this.#ge(!1,{restoreFocus:!1});let e=this.#s&&this.#c===`react-grab`;e||this.#_e(),this.#fe(!e,`react-grab`)}),c.querySelector(`.rg-feedback-list-tool`)?.addEventListener(`click`,()=>{this.#ge(!this.#b)}),c.querySelector(`.rg-collapse`)?.addEventListener(`click`,()=>{let e=c.dataset.collapsed===`true`;!e&&this.#s&&this.#fe(!1),!e&&this.#b&&this.#ge(!1,{restoreFocus:!1});let t=!e;c.dataset.collapsed=String(t);let n=c.querySelector(`.rg-toolbar-actions-shell`);n&&(n.inert=t,n.setAttribute(`aria-hidden`,String(t))),c.querySelector(`.rg-collapse`)?.setAttribute(`aria-expanded`,String(e)),c.querySelector(`.rg-collapse`)?.setAttribute(`aria-label`,e?`Visual Review 접기`:`Visual Review 펼치기`)}),this.#e.append(t,n,r,i,a,o,s,c)}#ue(){let e=this.#t?.collaboration,t=e?.repository;if(!this.#t||!t||!e.cursors&&!e.chat)return;let n=e.roomId??e.scopeId;this.#i=Oe({root:this.#e,pageId:this.#t.pageId,pathname:nn(window.location.pathname),roomId:n,session:this.#t.session,repository:t,cursors:e.cursors,chat:e.chat,now:this.#t.now,id:this.#t.id,canOpenChat:()=>!this.#s&&!this.#b&&!this.#d&&!this.#_,onFailure:e=>{e.type===`access-lost`?(this.#i?.stop(),this.#i=null,this.#ie(e)):this.#Le(`실시간 협업 연결이 불안정합니다. 다시 연결하는 중입니다.`)}}),this.#i.start()}#de(){this.#Ct(),this.#Tt(),this.#ye(),this.#xe(),this.#pe(),this.#pt(),this.#ht()}#fe(e,t=`feedback`){let n=this.#c;if(e&&(this.#D+=1),e&&t===`feedback`&&!this.#me()){this.#b||this.#ge(!0),this.#Le(this.#he());return}if(e&&t===`feedback`&&this.#h){this.#Le(`피드백을 저장하는 중입니다.`);return}if(e&&t===`feedback`&&this.#g){this.#_?this.#gt(!1):this.#ve(),this.#Le(`작성 중인 피드백을 복원했습니다.`);return}if(e&&this.#s){this.#c=t,this.#l=null,this.#u=null,this.#bt(),this.#pe();return}this.#s=e,this.#c=e?t:null,this.#pe(),e?(this.#_=null,this.#v=null,this.#d=null,this.#f=``,this.#p=``,this.#m=null,this.#bt(),document.addEventListener(`pointermove`,this.#Be,!0),document.addEventListener(`pointerdown`,this.#Ve,!0),document.addEventListener(`pointerup`,this.#He,!0),document.addEventListener(`pointercancel`,this.#Ue,!0),document.addEventListener(`keydown`,this.#We,!0),this.#M={value:document.body.style.getPropertyValue(`cursor`),priority:document.body.style.getPropertyPriority(`cursor`)},document.body.style.setProperty(`cursor`,`crosshair`),this.#A=ae(this.#t?.styleNonce),queueMicrotask(()=>this.#Ze())):(document.removeEventListener(`pointermove`,this.#Be,!0),document.removeEventListener(`pointerdown`,this.#Ve,!0),document.removeEventListener(`pointerup`,this.#He,!0),document.removeEventListener(`pointercancel`,this.#Ue,!0),document.removeEventListener(`keydown`,this.#We,!0),this.#M&&=($(document.body,`cursor`,this.#M),null),this.#A?.(),this.#A=null,this.#l=null,this.#u=null,this.#bt()),this.#Tt(),!e&&n===`react-grab`&&this.#ve()}#pe(){let e=this.#e.querySelector(`.rg-toolbar`),t=this.#e.querySelector(`.rg-feedback-tool`),n=this.#e.querySelector(`.rg-developer-grab-tool`),r=this.#s&&this.#c===`feedback`,i=this.#s&&this.#c===`react-grab`;e&&(e.dataset.selecting=String(this.#s)),t&&(t.setAttribute(`aria-pressed`,String(r)),t.setAttribute(`aria-label`,r?`선택 취소`:`피드백 위치 선택`),t.setAttribute(`aria-disabled`,String(!this.#me()))),n&&(n.setAttribute(`aria-pressed`,String(i)),n.setAttribute(`aria-label`,i?`코드 선택 취소`:`React Grab 코드 선택`),n.setAttribute(`aria-disabled`,String(this.#L)))}#me(){return!this.#T&&this.#S===`ready`&&this.#a!==null}#he(){return this.#T?`다시 인증하세요.`:this.#S===`loading`?`불러오는 중입니다.`:`다시 시도하세요.`}#ge(e,t={}){let n=t.restoreFocus??!0,r=t.restoreComposer??!0;if(e===this.#b)return!1;if(e)return this.#D+=1,this.#s&&this.#fe(!1),this.#_e(),this.#b=!0,this.#Tt(),this.#ye(),this.#xe(),queueMicrotask(()=>this.#Te()),!1;(t.cancelNavigation??!0)&&(this.#D+=1),this.#b=!1,this.#j?.(),this.#j=null,this.#ye(),this.#xe();let i=r&&this.#ve();return n&&!i&&queueMicrotask(()=>this.#Ee()?.focus()),i}#_e(){if(!this.#d)return!1;let e=this.#e.querySelector(`.rg-selection-label:not(.rg-thread-label) textarea`);return this.#g={target:this.#d,body:e?.value??this.#f},this.#d=null,this.#f=``,!0}#ve(){if(!this.#g||this.#b||this.#_)return!1;let e=this.#g;return this.#g=null,this.#d=e.target,this.#f=e.body,this.#Tt(),queueMicrotask(()=>{let e=this.#e.querySelector(`.rg-selection-label:not(.rg-thread-label) textarea`);e?.focus(),e?.setSelectionRange(e.value.length,e.value.length)}),!0}#ye(){let e=this.#e.querySelector(`[data-slot="navigator"]`);if(!e)return;let t=e.querySelector(`.rg-feedback-navigator`),n=t?.querySelector(`.rg-feedback-navigator-content`),r=t?.dataset.presentation,i=t?`refresh`:`enter`,a=n?.scrollTop??0,o=this.#e.activeElement instanceof HTMLElement?this.#e.activeElement:null,s=o?.closest(`.rg-feedback-row[data-comment-id]`)?.dataset.commentId,c=o?.closest(`[data-feedback-filter]`)?.dataset.feedbackFilter,l=!!o?.closest(`.rg-feedback-navigator-close`),u=!!o?.closest(`.rg-feedback-navigator-retry`);if(e.replaceChildren(),!this.#b)return;let d=this.#Se(),f=V(`rg-feedback-navigator-scrim`);f.dataset.motion=i,f.dataset.feedbackNavigatorAction=`close`,f.setAttribute(`aria-hidden`,`true`);let p=nt(this.#be(),{id:wt,presentation:d});p.dataset.motion=i,e.append(f,p),this.#we(d),queueMicrotask(()=>this.#Ce()),queueMicrotask(()=>{if(!this.#b)return;let t=e.querySelector(`.rg-feedback-navigator-content`);if(t&&(t.scrollTop=a),s){let e=this.#De(s);e?e.focus({preventScroll:!0}):this.#Te()}else if(c&&tn(c))e.querySelector(`[data-feedback-filter="${c}"]`)?.focus({preventScroll:!0});else if(l)e.querySelector(`.rg-feedback-navigator-close`)?.focus({preventScroll:!0});else if(u){let t=e.querySelector(`.rg-feedback-navigator-retry`);t?t.focus({preventScroll:!0}):this.#Te()}else d===`sheet`&&r!==`sheet`&&this.#Te()})}#be(){let e=Ye(this.#Oe(),this.#x),t=this.#t?.now?.()??Date.now(),n=this.#O&&this.#S===`ready`?`reconnecting`:this.#S;return{filter:this.#x,counts:e.counts,rows:e.rows.map(({comment:e,pinNumber:n,replyCount:r,lastActivityAt:i})=>({id:e.id,pinNumber:n,pageLabel:this.#je(e),currentPage:this.#ke(e),targetLabel:this.#Ae(e),authorName:e.authorName,body:e.body,timeLabel:on(i,t),replyCount:r,status:e.status,locationAvailable:!this.#ke(e)||U(e).available})),activeCommentId:this.#_,loadState:n,errorMessage:this.#C,errorRecovery:this.#w}}#xe(){let e=this.#Ee();if(!e)return;let t=this.#Oe().comments.length;e.setAttribute(`aria-label`,`피드백 목록, 총 ${t}개`),e.setAttribute(`aria-expanded`,String(this.#b)),e.setAttribute(`aria-controls`,B),this.#Se()===`sheet`?e.setAttribute(`aria-haspopup`,`dialog`):e.removeAttribute(`aria-haspopup`),e.removeAttribute(`aria-pressed`)}#Se(){return window.matchMedia?.(`(max-width: 640px)`).matches||window.innerWidth<=640?`sheet`:`tray`}#Ce(){let e=this.#e.querySelector(`.rg-feedback-navigator`),t=this.#Ee(),n=this.#e.querySelector(`.rg-toolbar`);if(!e||!t||!n||e.dataset.presentation!==`tray`)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=e.offsetWidth;if(r.width<=0||a<=0)return;let o=r.left+r.width/2,s=Y(o-a/2,8,Math.max(8,window.innerWidth-a-8));e.style.left=`${s}px`,e.style.bottom=`${Math.max(8,window.innerHeight-i.top+8)}px`,e.style.setProperty(`--rg-navigator-origin-x`,`${Y(o-s,16,a-16)}px`)}#we(e){if(e!==`sheet`){this.#j?.(),this.#j=null;return}if(this.#j)return;let t=[...[...document.body.children].filter(e=>e!==this),...this.#e.querySelectorAll(`[data-slot="pins"], [data-slot="panels"], .rg-toolbar`)].filter(e=>e instanceof HTMLElement),n=t.map(e=>({element:e,inert:e.inert}));t.forEach(e=>{e.inert=!0});let r=this.#e.querySelector(`[data-slot="panels"]`),i=r?Q(r,`visibility`):null;r&&r.style.setProperty(`visibility`,`hidden`);let a=Q(document.body,`overflow`),o=Q(document.documentElement,`overflow`),s=e=>{let t=this.#e.querySelector(`.rg-feedback-navigator`);!t||e.composedPath().includes(t)||queueMicrotask(()=>this.#Te())};document.addEventListener(`focusin`,s,!0),document.body.style.setProperty(`overflow`,`hidden`),document.documentElement.style.setProperty(`overflow`,`hidden`),this.#j=()=>{n.forEach(({element:e,inert:t})=>{e.inert=t}),r&&i&&$(r,`visibility`,i),document.removeEventListener(`focusin`,s,!0),$(document.body,`overflow`,a),$(document.documentElement,`overflow`,o)}}#Te(){if(!this.#b)return;let e=this.#_?this.#De(this.#_):null,t=this.#e.querySelector(`.rg-feedback-row`),n=this.#e.querySelector(`.rg-feedback-navigator-retry`),r=this.#e.querySelector(`.rg-feedback-navigator-close`);(e??t??n??r)?.focus({preventScroll:!0})}#Ee(){return this.#e.querySelector(`.rg-feedback-list-tool`)}#De(e){return[...this.#e.querySelectorAll(`.rg-feedback-row[data-comment-id]`)].find(({dataset:t})=>t.commentId===e)}#Oe(){let e=this.#a??{pageId:this.#t?.pageId??``,comments:[],replies:[]},t=this.#o;if(!t)return e;let n=this.#t?.pageId??e.pageId,r=t.comments.filter(({pageId:e})=>e!==n),i=new Set(r.map(({id:e})=>e)),a=new Set(e.comments.map(({id:e})=>e));return{pageId:n,comments:[...r.filter(({id:e})=>!a.has(e)),...e.comments],replies:[...t.replies.filter(({commentId:e})=>i.has(e)),...e.replies]}}#ke(e){return e.pageId===this.#t?.pageId}#Ae(e){return Mt(e.target)}#je(e){let t=an(e);if(t)return rn(t);let n=this.#o?.pages?.find(({id:t})=>t===e.pageId);return n?.name.trim()?n.name.trim():e.target.pageTitle.trim()||`알 수 없는 페이지`}#Me=e=>{e.stopPropagation();let t=e.target instanceof Element?e.target.closest(`[data-feedback-navigator-action]`):null,n=t?.dataset.feedbackNavigatorAction;if(n){if(n===`close`||n===`toggle`){this.#ge(!1);return}if(n===`retry`){this.#$();return}if(n===`filter`){let e=t.dataset.feedbackFilter;if(!tn(e)||e===this.#x)return;this.#x=e,this.#ye();return}n===`open-comment`&&t.dataset.commentId&&this.#Pe(t.dataset.commentId,{origin:`navigator`,navigate:!0})}};#Ne=e=>{if(e.stopPropagation(),e.isComposing)return;let t=[...this.#e.querySelectorAll(`.rg-feedback-row`)],n=e.target instanceof Element?e.target.closest(`.rg-feedback-row`):null;if(n&&[`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key)){e.preventDefault();let r=t.indexOf(n);t[e.key===`Home`?0:e.key===`End`?t.length-1:e.key===`ArrowDown`?Math.min(t.length-1,r+1):Math.max(0,r-1)]?.focus();return}if(e.key!==`Tab`||this.#Se()!==`sheet`)return;let r=this.#e.querySelector(`.rg-feedback-navigator`),i=r?[...r.querySelectorAll(`button:not(:disabled), [tabindex]:not([tabindex="-1"])`)]:[];if(i.length===0)return;let a=i[0],o=i.at(-1);e.shiftKey&&this.#e.activeElement===a?(e.preventDefault(),o.focus()):!e.shiftKey&&this.#e.activeElement===o&&(e.preventDefault(),a.focus())};async#Pe(e,t){let n=this.#Oe().comments.find(({id:t})=>t===e);if(!n)return;this.#s&&this.#fe(!1);let r=++this.#D;if(t.origin===`navigator`&&this.#b&&this.#Se()===`sheet`&&(this.#ge(!1,{restoreFocus:!1,restoreComposer:!1,cancelNavigation:!1}),await Z()),!(r!==this.#D||!this.#k)){if(!this.#Oe().comments.some(({id:t})=>t===e)){this.#Fe();return}if(!(t.navigate&&!await this.#Ie(n))&&r===this.#D){if(!this.#Oe().comments.some(({id:t})=>t===e)){this.#Fe();return}this.#d=null,this.#_=e,this.#v=t.origin,this.#de(),U(n).available||this.#Le(`현재 화면에서 피드백 위치를 찾을 수 없습니다.`),queueMicrotask(()=>this.#e.querySelector(`.rg-thread-label`)?.focus({preventScroll:!0}))}}}#Fe(){!this.#b&&this.#ve()||queueMicrotask(()=>{this.#b?this.#Te():this.#Ee()?.focus({preventScroll:!0})})}async#Ie(e){if(!this.#ke(e)){let t=an(e);if(!t||t.origin!==window.location.origin)return this.#Le(`이 피드백의 페이지로 이동할 수 없습니다.`),!1;this.#Le(`${nn(t.pathname)} 페이지로 이동합니다.`),this.#y=e.id;try{this.#t?.onNavigateToFeedback?await this.#t.onNavigateToFeedback(t.href,e):window.location.assign(t.href)}catch{this.#y=null,this.#Le(`피드백 페이지로 이동하지 못했습니다.`)}return!1}let t=U(e);if(!t.available||t.pageY===null)return!0;let n=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches?`auto`:`smooth`;if(e.target.kind!==`viewport`){let t=w(e.anchor).element;if(t&&typeof t.scrollIntoView==`function`)try{return t.scrollIntoView({block:`center`,inline:`center`,behavior:n}),await Z(),await Z(),!0}catch{}}let r=window.visualViewport?.height??window.innerHeight,i=window.visualViewport?.width??window.innerWidth,a=Math.max(0,t.pageY-r/3),o=Math.max(0,(t.pageX??window.scrollX)-i/2);try{window.scrollTo({left:o,top:a,behavior:n})}catch{}return await Z(),await Z(),!0}#Le(e){let t=this.#e.querySelector(`[data-slot="announcer"]`);t&&(t.textContent=``,queueMicrotask(()=>{t.textContent=e}))}#Re(e,t=`neutral`){let n=this.#e.querySelector(`.rg-developer-status`);n&&(this.#ze(),n.textContent=e,n.dataset.tone=t,n.dataset.visible=`true`,this.#P=window.setTimeout(()=>{this.#P=null,n.isConnected&&(n.dataset.visible=`false`)},1800))}#ze(){this.#P!==null&&(window.clearTimeout(this.#P),this.#P=null)}#Be=e=>{if(!this.#s||this.#Pt(e)||this.#l&&e.pointerId!==this.#u)return;let t=Xt(e);if(this.#l&&kt(this.#l,t)>=6){this.#yt(this.#l,t);return}this.#vt(t)};#Ve=e=>{!this.#s||this.#Pt(e)||e.button!==0||this.#l||(e.preventDefault(),e.stopImmediatePropagation(),this.#l=Xt(e),this.#u=e.pointerId)};#He=e=>{if(!this.#s||!this.#l||e.pointerId!==this.#u)return;if(this.#Pt(e)){this.#l=null,this.#u=null,this.#bt();return}e.preventDefault(),e.stopImmediatePropagation();let t=this.#l,n=this.#c,r=Xt(e),i=kt(t,r)>=6;n===`feedback`&&(this.#d=i?fe(t,r):de(r));let a=n===`react-grab`?this.#Ge(t,r,i):[];this.#it(),this.#fe(!1),n===`react-grab`?this.#Ke(a):queueMicrotask(()=>this.#e.querySelector(`.rg-selection-label textarea`)?.focus())};#Ue=e=>{!this.#s||!this.#l||e.pointerId!==this.#u||(e.preventDefault(),e.stopImmediatePropagation(),this.#l=null,this.#u=null,this.#bt())};#We=e=>{if(!this.#s)return;if(e.key===`Escape`){e.preventDefault(),e.stopImmediatePropagation(),this.#fe(!1);return}if(e.key!==`Enter`||e.isComposing||this.#Pt(e)||J(e))return;let t=Kt(e);if(!t)return;let n=E(t);if(n.width<=0||n.height<=0)return;e.preventDefault(),e.stopImmediatePropagation();let r=this.#c;r===`feedback`&&(this.#d=ue(t,{clientX:n.left+n.width/2,clientY:n.top+n.height/2})),this.#fe(!1),r===`react-grab`?this.#Ke([t]):queueMicrotask(()=>this.#e.querySelector(`.rg-selection-label textarea`)?.focus())};#Ge(e,t,n){if(!n){let e=ie(t.clientX,t.clientY);return e?[e]:[]}return pe(new DOMRect(Math.min(e.clientX,t.clientX),Math.min(e.clientY,t.clientY),Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))).slice(0,8)}async#Ke(e){if(e.length===0){this.#Le(`선택할 요소를 찾지 못했습니다.`),this.#Re(`선택할 요소가 없습니다`,`error`),this.#Ye();return}if(!this.#k||this.#L)return;let t=this.#k.signal;this.#L=!0,this.#pe(),this.#Le(`코드 컨텍스트를 복사하는 중입니다.`),this.#Re(`코드 컨텍스트 복사 중…`);try{let n=this.#qe(),r=await n;if(t.aborted||n!==this.#R)return;let i=await r.copyElement(e.length===1?e[0]:e);if(t.aborted)return;this.#Le(i?`코드 컨텍스트를 복사했습니다.`:`코드 컨텍스트를 복사하지 못했습니다. 다시 시도하세요.`),this.#Re(i?`코드 컨텍스트 복사됨`:`복사 실패 · 다시 시도`,i?`neutral`:`error`)}catch{t.aborted||(this.#Le(`코드 컨텍스트를 복사하지 못했습니다. 다시 시도하세요.`),this.#Re(`복사 실패 · 다시 시도`,`error`))}finally{t.aborted||(this.#L=!1,this.#pe(),this.#Ye())}}#qe(){if(this.#R)return this.#R;let e=(this.#t?.developerTools?.loadReactGrab??(()=>Ke(this.#t?.styleNonce)))();return this.#R=e,e.catch(()=>{this.#R===e&&(this.#R=null)}),e}#Je(){let e=this.#R;this.#R=null,e&&e.then(e=>e.dispose()).catch(()=>void 0)}#Ye(){this.#d||queueMicrotask(()=>this.#e.querySelector(`.rg-developer-grab-tool`)?.focus({preventScroll:!0}))}#Xe=e=>{if(!this.#s)return;if(this.#Pt(e)||J(e)){this.#bt();return}let t=Kt(e);if(!t){this.#bt();return}let n=E(t);if(n.width<=0||n.height<=0){this.#bt();return}let r=this.#e.querySelector(`[data-slot="region"]`);r&&(r.style.display=`none`);let i=this.#e.querySelector(`[data-slot="highlight"]`);i&&H(i,n)};#Ze(){if(!this.#s)return;let e=qt(document);if(!e||r(e)||Gt(e))return;let t=E(e);if(t.width<=0||t.height<=0)return;let n=this.#e.querySelector(`[data-slot="highlight"]`);n&&H(n,t)}#Qe=e=>{if(e.key===`Escape`&&!e.isComposing){if(this.#b){e.preventDefault(),e.stopImmediatePropagation(),this.#ge(!1);return}if(this.#_){e.preventDefault(),e.stopImmediatePropagation(),this.#gt(!0);return}if(this.#d){if(e.preventDefault(),e.stopImmediatePropagation(),this.#h?.target===this.#d){this.#Le(`피드백을 저장하는 중입니다.`);return}this.#d=null,this.#f=``,this.#p=``,this.#m=null,this.#Tt(),queueMicrotask(()=>this.#e.querySelector(`.rg-feedback-tool`)?.focus({preventScroll:!0}));return}}!((e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey&&(e.code===`KeyC`||e.key.toLowerCase()===`c`))||this.#t?.developerTools?.reactGrab!==!0||e.repeat||this.#s||this.#d||this.#_||this.#b||this.#L||this.#N!==null||J(e)||Yt(e)||(this.#N=window.setTimeout(()=>{this.#N=null,!(this.#s||this.#d||this.#_||this.#b||this.#h||this.#L)&&this.#tt()},100))};#$e=e=>{let t=e.code===`KeyC`||e.key.toLowerCase()===`c`,n=e.key===`Meta`||e.key===`Control`;(t||n)&&this.#et()};#et(){this.#N!==null&&(window.clearTimeout(this.#N),this.#N=null)}#tt(){if(this.#t?.developerTools?.reactGrab!==!0)return;let e=this.#e.querySelector(`.rg-toolbar`);if(e?.dataset.collapsed===`true`){e.dataset.collapsed=`false`;let t=e.querySelector(`.rg-toolbar-actions-shell`);t&&(t.inert=!1,t.setAttribute(`aria-hidden`,`false`));let n=e.querySelector(`.rg-collapse`);n?.setAttribute(`aria-expanded`,`true`),n?.setAttribute(`aria-label`,`Visual Review 접기`)}this.#fe(!0,`react-grab`)}#nt=e=>{!this.#_||this.#Pt(e)||this.#gt(!1)};#rt=e=>{!this.#I||this.#Pt(e)||(e.preventDefault(),e.stopImmediatePropagation(),this.#at())};#it(){this.#at(),this.#I=!0,this.#F=window.setTimeout(()=>{this.#F=null,this.#I=!1},0)}#at(){this.#F!==null&&(window.clearTimeout(this.#F),this.#F=null),this.#I=!1}#ot=()=>{this.#st()};#st(){if(!(!this.#k||this.#z!==null)){if(typeof window.requestAnimationFrame==`function`){this.#B=!0,this.#z=-1;let e=window.requestAnimationFrame(()=>{this.#z=null,this.#ct()});this.#z!==null&&(this.#z=e);return}this.#B=!1,this.#z=window.setTimeout(()=>{this.#z=null,this.#ct()},16)}}#ct(){if(!this.#k)return;this.#U&&(this.#U=!1,this.#ut()),this.#pt(),this.#wt(),this.#xt(),this.#_t();let e=this.#e.querySelector(`.rg-feedback-navigator`);e&&e.dataset.presentation!==this.#Se()?(this.#ye(),this.#xe()):this.#Ce(),this.#ht()}#lt(){typeof window.ResizeObserver==`function`&&(this.#V=new window.ResizeObserver(this.#ot)),typeof window.MutationObserver==`function`&&(this.#H=new window.MutationObserver(e=>{e.some(({type:e})=>e===`childList`)&&(this.#U=!0),this.#ot()}),this.#ut()),this.#pt()}#ut(){let e=this.#H;if(!e)return;e.disconnect();let t=d();this.#dt(t),this.#ft();for(let r of t){if(r===this.#e)continue;let t=n(r)?r.documentElement:r;if(t)try{e.observe(t,{attributes:!0,characterData:!0,childList:!0,subtree:!0,attributeFilter:[`class`,`style`,`hidden`,`open`,`aria-hidden`,`id`,`data-review-id`,`data-testid`,`data-id`,`slot`]})}catch{}}}#dt(e){let t=new Set(e.filter(e=>n(e)&&e!==document));for(let[e,n]of this.#K)t.has(e)||(n(),this.#K.delete(e));for(let e of t){if(this.#K.has(e))continue;let t=[],n=(n,r,i=!0)=>{e.addEventListener(n,r,{capture:i,passive:n===`scroll`}),t.push({type:n,listener:r,capture:i})};n(`keydown`,this.#Qe),n(`keyup`,this.#$e),n(`keydown`,this.#We),n(`pointermove`,this.#Be),n(`pointerdown`,this.#nt),n(`pointerdown`,this.#Ve),n(`pointerup`,this.#He),n(`pointercancel`,this.#Ue),n(`click`,this.#rt),n(`focusin`,this.#Xe),n(`scroll`,this.#ot);let r=e.defaultView;r?.addEventListener(`resize`,this.#ot,{passive:!0}),r?.visualViewport?.addEventListener(`scroll`,this.#ot,{passive:!0}),r?.visualViewport?.addEventListener(`resize`,this.#ot,{passive:!0}),this.#K.set(e,()=>{t.forEach(({type:t,listener:n,capture:r})=>{e.removeEventListener(t,n,r)}),r?.removeEventListener(`resize`,this.#ot),r?.visualViewport?.removeEventListener(`scroll`,this.#ot),r?.visualViewport?.removeEventListener(`resize`,this.#ot)})}}#ft(){let e=new Set(o(`iframe`));for(let[t,n]of this.#q)e.has(t)||(n(),this.#q.delete(t));for(let t of e){if(this.#q.has(t))continue;let e=()=>{this.#U=!0,this.#st()};t.addEventListener(`load`,e),this.#q.set(t,()=>{t.removeEventListener(`load`,e)})}}#pt(){let e=this.#V;if(!e)return;let t=new Set,n=new Set;for(let e of this.#a?.comments??[]){let n=w(e.anchor).element;n&&Jt(n,t)}if(this.#d){let e=w(this.#d.anchor).element;e&&Jt(e,t)}for(let r of this.#G){if(t.has(r)){n.add(r);continue}try{e.unobserve(r)}catch{}}for(let r of t)if(!n.has(r))try{e.observe(r),n.add(r)}catch{}this.#G.clear(),n.forEach(e=>this.#G.add(e))}#mt(){this.#z!==null&&(this.#B&&typeof window.cancelAnimationFrame==`function`?window.cancelAnimationFrame(this.#z):window.clearTimeout(this.#z),this.#z=null),this.#W!==null&&(window.clearTimeout(this.#W),this.#W=null),this.#V?.disconnect(),this.#V=null,this.#H?.disconnect(),this.#H=null,this.#U=!1,this.#G.clear(),this.#K.forEach(e=>e()),this.#K.clear(),this.#q.forEach(e=>e()),this.#q.clear()}#ht(){let e=(this.#a?.comments??[]).some(e=>e.target.kind===`element`&&f(e.anchor.selector)&&!U(e).available);if(!this.#k||!e){this.#W!==null&&(window.clearTimeout(this.#W),this.#W=null);return}this.#W===null&&(this.#W=window.setTimeout(()=>{this.#W=null,this.#U=!0,this.#st()},750))}#gt(e){let t=this.#_;if(!t)return;let n=this.#v;this.#D+=1,this.#_=null,this.#v=null,this.#Ct(),this.#Tt(),this.#ye(),!(!this.#b&&this.#ve())&&e&&queueMicrotask(()=>{if(n===`navigator`&&this.#b){let e=this.#De(t);e?e.focus():this.#Te();return}if(n===`navigator`){this.#Ee()?.focus();return}let e=[...this.#e.querySelectorAll(`.pin[data-comment-id]`)].find(({dataset:e})=>e.commentId===t);e?e.focus():this.#Ee()?.focus({preventScroll:!0})})}#_t(){let e=this.#e.querySelector(`.rg-selection-label`);if(!e)return;if(this.#d){k(e,Nt(this.#d));return}if(!this.#_)return;let t=this.#a?.comments.find(({id:e})=>e===this.#_);t&&k(e,Pt(t))}#vt(e){let t=ie(e.clientX,e.clientY),n=this.#e.querySelector(`[data-slot="highlight"]`),r=this.#e.querySelector(`[data-slot="region"]`);if(r&&(r.style.display=`none`),!n||!t){n&&(n.style.display=`none`);return}H(n,E(t))}#yt(e,t){let n=this.#e.querySelector(`[data-slot="highlight"]`),r=this.#e.querySelector(`[data-slot="region"]`);n&&(n.style.display=`none`),r&&(r.removeAttribute(`data-point`),r.removeAttribute(`data-context-target`),H(r,new DOMRect(Math.min(e.clientX,t.clientX),Math.min(e.clientY,t.clientY),Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))))}#bt(){this.#e.querySelectorAll(`.highlight, .region`).forEach(e=>{e.style.display=`none`,e.removeAttribute(`data-context-target`),e.removeAttribute(`data-point`)})}#xt(){if(this.#s)return;if(this.#d){this.#St(this.#d);return}let e=this.#a?.comments.find(({id:e})=>e===this.#_);if(e){this.#St(e.target);return}this.#bt()}#St(e){let t=this.#e.querySelector(`[data-slot="highlight"]`),n=this.#e.querySelector(`[data-slot="region"]`);if(!(!t||!n)){if(t.style.display=`none`,n.style.display=`none`,t.removeAttribute(`data-context-target`),n.removeAttribute(`data-context-target`),n.removeAttribute(`data-point`),e.kind===`element`){let n=w(e.anchor);if(!n.anchored||!n.visible||!n.element)return;let r=E(n.element);t.dataset.contextTarget=`true`,H(t,r);return}if(n.dataset.contextTarget=`true`,e.kind===`viewport`){n.dataset.point=`true`,H(n,zt(e));return}H(n,It(e))}}#Ct(){let e=this.#e.querySelector(`[data-slot="pins"]`);if(!e)return;let t=this.#e.activeElement instanceof HTMLElement&&this.#e.activeElement.matches(`.pin[data-comment-id]`)?this.#e.activeElement.dataset.commentId:void 0;e.replaceChildren();let n=this.#a;if(!n)return;let r=Ye(this.#Oe()).pinNumberByCommentId;n.comments.forEach(t=>{if(!this.#ke(t))return;let n=U(t);if(!n.available||n.pageX===null||n.pageY===null)return;let i=r.get(t.id)??1,a=document.createElement(`button`);a.type=`button`,a.className=`pin`,a.dataset.commentId=t.id,a.dataset.resolved=String(t.status===`resolved`),a.dataset.active=String(t.id===this.#_),a.style.display=`grid`,a.style.left=`${n.pageX-window.scrollX}px`,a.style.top=`${n.pageY-window.scrollY}px`,a.textContent=String(i),a.setAttribute(`aria-label`,`${i}번 피드백: ${t.body.slice(0,80)}`),a.setAttribute(`aria-expanded`,String(t.id===this.#_)),a.setAttribute(`aria-controls`,Ft(t.id)),a.addEventListener(`click`,()=>{if(this.#_===t.id){this.#gt(!0);return}this.#Pe(t.id,{origin:`pin`,navigate:!1})}),e.append(a)}),t&&queueMicrotask(()=>{[...e.querySelectorAll(`.pin[data-comment-id]`)].find(({dataset:e})=>e.commentId===t)?.focus({preventScroll:!0})})}#wt(){let e=new Map(this.#a?.comments.map(e=>[e.id,e])??[]),t=[...this.#e.querySelectorAll(`.pin[data-comment-id]`)],n=new Set(t.map(({dataset:e})=>e.commentId??``));if([...e.values()].some(e=>{if(!this.#ke(e)||n.has(e.id))return!1;let t=U(e);return t.available&&t.pageX!==null&&t.pageY!==null})){this.#Ct();return}t.forEach(t=>{let n=e.get(t.dataset.commentId??``);if(!n)return;if(!this.#ke(n)){t.style.display=`none`;return}let r=U(n);if(!r.available||r.pageX===null||r.pageY===null){t.style.display=`none`;return}t.style.display=`grid`,t.style.left=`${r.pageX-window.scrollX}px`,t.style.top=`${r.pageY-window.scrollY}px`})}#Tt(){let e=this.#e.querySelector(`[data-slot="panels"]`);if(!e)return;let t=this.#e.activeElement,n=t instanceof HTMLTextAreaElement&&t.closest(`.rg-thread-label`)!==null,r=t instanceof HTMLTextAreaElement&&t.closest(`.rg-selection-label:not(.rg-thread-label)`)!==null,i=n||r?{start:t.selectionStart,end:t.selectionEnd,direction:t.selectionDirection}:null,a=e.querySelector(`.rg-thread-messages`)?.scrollTop??0;if(e.replaceChildren(),this.#d){this.#St(this.#d),e.append(this.#Et(this.#d)),r&&i&&queueMicrotask(()=>{let t=e.querySelector(`.rg-selection-label:not(.rg-thread-label) textarea`);t?.focus({preventScroll:!0}),t?.setSelectionRange(i.start,i.end,i.direction)});return}let o=this.#a?.comments.find(({id:e})=>e===this.#_);if(o){this.#St(o.target),e.append(this.#kt(o)),queueMicrotask(()=>{let t=e.querySelector(`.rg-thread-messages`);if(t&&(t.scrollTop=a),!n||!i)return;let r=e.querySelector(`.rg-thread-label textarea`);r?.focus({preventScroll:!0}),r?.setSelectionRange(i.start,i.end,i.direction)});return}this.#s||this.#bt()}#Et(e){let t=ze(`피드백`,`변경할 점`,`변경할 점 입력`);k(t,Nt(e));let n=t.querySelector(`textarea`),r=t.querySelector(`.rg-submit`);n.value=this.#f;let i=this.#h?.target===e&&this.#h.body===n.value.trim();n.disabled=i,r.disabled=i||!this.#me();let a=()=>{n.style.height=`auto`,n.style.height=`${Math.min(n.scrollHeight,95)}px`};return n.addEventListener(`input`,()=>{this.#f=n.value,r.disabled=!this.#me()||!n.value.trim(),this.#m?.body!==n.value.trim()&&(this.#m=null,this.#p=``,t.querySelector(`.rg-inline-error`)?.remove()),a()}),n.addEventListener(`keydown`,t=>{if(t.key===`Escape`){if(t.preventDefault(),this.#h?.target===e){this.#Le(`피드백을 저장하는 중입니다.`);return}this.#d=null,this.#f=``,this.#p=``,this.#m=null,this.#Tt(),queueMicrotask(()=>this.#e.querySelector(`.rg-feedback-tool`)?.focus({preventScroll:!0}))}t.key===`Enter`&&(t.metaKey||t.ctrlKey)&&!t.shiftKey&&!t.altKey&&!t.isComposing&&(t.preventDefault(),r.click())}),r.addEventListener(`click`,()=>void this.#Dt(t,e)),this.#p&&jt(t,this.#p),t}async#Dt(e,t){if(!this.#t||this.#h||!this.#me())return;let n=this.#t,r=n.pageId,i=n.repository,a=this.#k?.signal;if(!a)return;let o=e.querySelector(`textarea`),s=e.querySelector(`.rg-submit`),c=o?.value.trim()??``;if(!c||!o||!s)return;s.disabled=!0,o.disabled=!0;let l={target:t,body:c,comment:null};this.#h=l;let u=i.attachScreenshot?pt(t):Promise.resolve(null),d=this.#m?.target===t&&this.#m.body===c?this.#m.comment:null;if(!d){let e=t;if(n.sourceContextResolver)try{e=await _e(t,n.sourceContextResolver,{signal:a})}catch{}if(a.aborted||this.#h!==l)return;let i=n.now?.()??Date.now();d={id:n.id?.()??crypto.randomUUID(),pageId:r,authorId:n.session.reviewerId,authorName:n.session.displayName,body:c,anchor:e.anchor,target:e,status:`open`,createdAt:i,updatedAt:i}}l.comment=d;let f=!1;try{await i.mutate(r,{type:`comment.upsert`,comment:d}),f=await this.#Ot(d.id,a)}catch{if(a.aborted||this.#h!==l)return;this.#h=null,this.#m={target:t,body:c,comment:d},this.#p=`저장하지 못했습니다. 다시 시도하세요.`,!this.#b&&this.#d===t&&(this.#Tt(),queueMicrotask(()=>this.#e.querySelector(`.rg-selection-label:not(.rg-thread-label) textarea`)?.focus({preventScroll:!0})));return}if(a.aborted||!f)return;this.#h===l&&(this.#h=null),this.#m=null,this.#p=``,this.#g?.target===t&&(this.#g=null),this.#d===t&&(this.#d=null,this.#f=``,this.#Tt(),queueMicrotask(()=>this.#e.querySelector(`.rg-feedback-tool`)?.focus({preventScroll:!0})));let p=await u;if(p&&i.attachScreenshot)try{await i.attachScreenshot(r,d.id,p),this.#Le(`피드백과 위치 캡처를 저장했습니다.`);return}catch{this.#Le(`피드백은 저장했지만 위치 캡처는 저장하지 못했습니다.`);return}this.#Le(`피드백을 저장했습니다.`)}async#Ot(e,t){return this.#a?.comments.some(({id:t})=>t===e)?!0:await new Promise((n,r)=>{let i=()=>{clearTimeout(o),t.removeEventListener(`abort`,a),this.#ee.delete(e)},a=()=>{i(),n(!1)},o=setTimeout(()=>{i(),r(Error(`Comment was not confirmed by the review service`))},Ct);this.#ee.set(e,e=>{i(),n(e)}),t.addEventListener(`abort`,a,{once:!0})})}#kt(e){let t=this.#a?Ye(this.#a).pinNumberByCommentId.get(e.id)??1:1,n=!U(e).available,r=ze(`피드백 ${t}${e.status===`resolved`?` · 완료`:``}${n?` · 위치 없음`:``}`,`답글`,`답글 입력`);r.classList.add(`rg-thread-label`),r.id=Ft(e.id),r.tabIndex=-1,r.dataset.commentId=e.id,r.setAttribute(`aria-label`,`피드백 대화`),k(r,Pt(e));let i=r.querySelector(`.rg-tag-row`),a=document.createElement(`button`);a.type=`button`,a.className=`rg-thread-close`,a.setAttribute(`aria-label`,`피드백 닫기`),a.append(Be()),i.append(a);let o=V(`rg-thread-messages`);o.append(At(e.authorName,e.body,e.createdAt)),(this.#a?.replies.filter(({commentId:t})=>t===e.id)??[]).forEach(e=>o.append(At(e.authorName,e.body,e.createdAt))),r.querySelector(`.rg-surface`)?.insertBefore(o,r.querySelector(`.rg-bottom-section`));let s=r.querySelector(`textarea`),c=r.querySelector(`.rg-submit`);s.value=this.#J.get(e.id)??``;let l=this.#Y.has(e.id);s.disabled=l,c.disabled=l,c.setAttribute(`aria-label`,`답글 저장`);let u=()=>{s.style.height=`auto`,s.style.height=`${Math.min(s.scrollHeight,95)}px`};s.addEventListener(`input`,()=>{this.#J.set(e.id,s.value),this.#Z.get(e.id)?.body!==s.value.trim()&&(this.#Z.delete(e.id),this.#X.delete(e.id),r.querySelector(`.rg-inline-error`)?.remove()),u()}),s.addEventListener(`keydown`,e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey&&!e.isComposing&&(e.preventDefault(),c.click())}),a.addEventListener(`click`,()=>this.#gt(!0)),c.addEventListener(`click`,()=>void this.#At(r,e));let d=this.#X.get(e.id);return d&&jt(r,d),queueMicrotask(u),r}async#At(e,t){if(!this.#t||!this.#me())return;let n=this.#k?.signal;if(!n||this.#Y.has(t.id))return;let r=e.querySelector(`textarea`),i=e.querySelector(`.rg-submit`),a=r?.value.trim()??``;if(!a||!r||!i)return;let o=this.#Z.get(t.id),s=this.#t.now?.()??Date.now(),c=o?.body===a?o.reply:{id:this.#t.id?.()??crypto.randomUUID(),commentId:t.id,authorId:this.#t.session.reviewerId,authorName:this.#t.session.displayName,body:a,createdAt:s,updatedAt:s},l=Symbol(t.id);this.#Y.set(t.id,{request:l,body:a,reply:c}),this.#Mt(t.id,!0);try{await this.#t.repository.mutate(this.#t.pageId,{type:`reply.upsert`,reply:c}),await this.#jt(c,n)}catch{if(n.aborted||this.#Y.get(t.id)?.request!==l)return;this.#Y.delete(t.id),this.#Z.set(t.id,{body:a,reply:c}),this.#X.set(t.id,`답글을 저장하지 못했습니다. 다시 시도하세요.`),i.disabled=!1,r.disabled=!1,this.#_===t.id&&(this.#Tt(),queueMicrotask(()=>this.#Nt(t.id)?.querySelector(`textarea`)?.focus({preventScroll:!0})));return}if(n.aborted||this.#Y.get(t.id)?.request!==l)return;this.#Y.delete(t.id),this.#Z.delete(t.id),this.#X.delete(t.id),this.#J.delete(t.id);let u=this.#Nt(t.id)?.querySelector(`textarea`);u&&(u.value=``,u.style.height=`auto`),this.#Mt(t.id,!1),this.#Le(`답글을 저장했습니다.`)}async#jt(e,t){this.#a?.replies.some(({id:t,commentId:n})=>t===e.id&&n===e.commentId)||await new Promise((n,r)=>{let i=()=>{clearTimeout(o),t.removeEventListener(`abort`,a),this.#te.delete(e.id)},a=()=>{i(),n()},o=setTimeout(()=>{i(),r(Error(`Reply was not confirmed by the review service`))},Ct);this.#te.set(e.id,{commentId:e.commentId,settle:()=>{i(),n()}}),t.addEventListener(`abort`,a,{once:!0})})}#Mt(e,t){let n=this.#Nt(e),r=n?.querySelector(`textarea`),i=n?.querySelector(`.rg-submit`);r&&(r.disabled=t),i&&(i.disabled=t)}#Nt(e){return[...this.#e.querySelectorAll(`.rg-thread-label`)].find(({dataset:t})=>t.commentId===e)}#Pt(e){return e.composedPath().includes(this)}};function Dt(e){re(e.styleNonce),customElements.get(`agency-review-widget`)||customElements.define(xt,Et);let t=document.createElement(xt);return t.configure(e),document.body.append(t),t}function Ot(e,t){let n=e.hostname.toLowerCase();return t.some(e=>e.toLowerCase()===n)||n===`localhost`||n===`127.0.0.1`||n.endsWith(`.test`)||n.endsWith(`.local`)}function V(e){let t=document.createElement(`div`);return t.className=e,t}function H(e,t){e.style.display=`block`,e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`}function kt(e,t){return Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)}function At(e,t,n){let r=document.createElement(`article`);r.className=`rg-message`;let i=V(`rg-message-meta`);i.textContent=`${e} · ${new Date(n).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}`;let a=document.createElement(`p`);return a.className=`rg-message-body`,a.textContent=t,r.append(i,a),r}function jt(e,t){let n=e.querySelector(`.rg-inline-error`);if(!n){n=V(`rg-inline-error`),n.setAttribute(`role`,`alert`);let t=e.querySelector(`.rg-surface`);t?.insertBefore(n,t.querySelector(`.rg-bottom-section`))}n.textContent=t}function Mt(e){let t=e.elements.map(({textPreview:e})=>e.replace(/\s+/g,` `).trim()).find(Boolean);return t?t.length>48?`${t.slice(0,47).trimEnd()}…`:t:e.kind===`region`?`선택 영역`:e.kind===`viewport`?`화면 위치`:`선택 요소`}function Nt(e){let t=w(e.anchor),n=t.x-window.scrollX;if(e.kind===`element`&&t.element){let e=E(t.element);return{x:e.left,y:e.top,width:e.width,height:e.height,anchorX:n}}if(e.kind===`viewport`){let t=zt(e);return{x:t.left,y:t.top,width:t.width,height:t.height,anchorX:t.left+t.width/2}}let r=It(e);return{x:r.left,y:r.top,width:r.width,height:r.height,anchorX:e.kind===`region`?r.left+r.width/2:n}}function Pt(e){if(e.target.kind===`element`){if(U(e).available)return Nt(e.target);let t=window.visualViewport,n=t?.offsetLeft??0,r=t?.offsetTop??0,i=t?.width??window.innerWidth;return{x:n+i/2,y:r+16,width:0,height:0,anchorX:n+i/2}}if(e.target.kind===`viewport`){let t=zt(e.target);return{x:t.left,y:t.top,width:t.width,height:t.height,anchorX:t.left+t.width/2}}let t=It(e.target);return{x:t.left,y:t.top,width:t.width,height:t.height,anchorX:t.left+t.width/2}}function U(e){if(e.target.kind===`element`){let t=w(e.anchor);return t.anchored&&t.visible&&t.element?{available:!0,pageX:t.x,pageY:t.y}:{available:!1,pageX:null,pageY:null}}if(e.target.kind===`region`){let t=Lt(e.target);return Number.isFinite(t.pageX)&&Number.isFinite(t.pageY)?{available:!0,pageX:t.pageX,pageY:t.pageY}:{available:!1,pageX:null,pageY:null}}let t=Vt(e.target);return Number.isFinite(t.pageX)&&Number.isFinite(t.pageY)?{available:!0,pageX:t.pageX,pageY:t.pageY}:{available:!1,pageX:null,pageY:null}}function Ft(e){return`visual-review-thread-${e.replace(/[^a-zA-Z0-9_-]/g,`-`)}`}function It(e){let t=W(e),n=Lt(e,t),r=K(e.region.width)*t.x,i=K(e.region.height)*t.y;return Ht(new DOMRect(n.pageX-window.scrollX-r/2,n.pageY-window.scrollY-i/2,r,i))}function Lt(e,t=W(e)){return Rt(e,t)??Bt(e,t)}function Rt(e,t){if(e.kind!==`region`||!e.anchor.selector)return null;let n=w(e.anchor);if(!n.anchored||!n.visible||!n.element)return null;let r=e.elements.find(({selector:t})=>t===e.anchor.selector);if(!r)return{pageX:n.x,pageY:n.y};let i=r.rect.pageX+r.rect.width*e.anchor.offsetX,a=r.rect.pageY+r.rect.height*e.anchor.offsetY,o=e.region.pageX+e.region.width/2,s=e.region.pageY+e.region.height/2;return{pageX:n.x+(o-i)*t.x,pageY:n.y+(s-a)*t.y}}function zt(e){let t=Vt(e);return Ut(new DOMRect(t.pageX-window.scrollX-7,t.pageY-window.scrollY-7,14,14))}function Bt(e,t=W(e)){let n=Vt(e,t);return{pageX:n.pageX+n.width/2,pageY:n.pageY+n.height/2}}function Vt(e,t=W(e)){let n=e.region,r=q(n.viewportX,n.pageX),i=q(n.viewportY,n.pageY),a=q(n.pageX,window.scrollX+r),o=q(n.pageY,window.scrollY+i),s=a-r,c=o-i;return{pageX:s+r*t.x,pageY:c+i*t.y,width:K(n.width)*t.x,height:K(n.height)*t.y}}function W(e){let t=G(window.innerWidth,1),n=G(window.innerHeight,1),r=G(e.region.viewportWidth,t),i=G(e.region.viewportHeight,n);return{x:t/r,y:n/i}}function Ht(e){let t=Wt(),n=Y(q(e.left,t.left),t.left,t.right),r=Y(q(e.top,t.top),t.top,t.bottom),i=Y(q(e.right,n),t.left,t.right),a=Y(q(e.bottom,r),t.top,t.bottom);return new DOMRect(n,r,Math.max(0,i-n),Math.max(0,a-r))}function Ut(e){let t=Wt(),n=Math.min(K(e.width),t.width),r=Math.min(K(e.height),t.height);return new DOMRect(Y(q(e.left,t.left),t.left,t.right-n),Y(q(e.top,t.top),t.top,t.bottom-r),n,r)}function Wt(){let e=window.visualViewport;return new DOMRect(q(e?.offsetLeft,0),q(e?.offsetTop,0),G(e?.width,window.innerWidth),G(e?.height,window.innerHeight))}function G(e,t){return Number.isFinite(e)&&(e??0)>0?e:Math.max(Number.isFinite(t)?t:1,1)}function K(e){return Number.isFinite(e)?Math.max(0,e):0}function q(e,t){return Number.isFinite(e)?e:Number.isFinite(t)?t:0}function J(e){return Zt(e).designMode===`on`||e.composedPath().some(e=>{let t=Qt(e);return t?Gt(t):!1})}function Gt(e){let t=e.tagName.toLowerCase();return t===`input`||t===`textarea`||t===`select`||`isContentEditable`in e&&!!e.isContentEditable||Tt.has(e.getAttribute(`role`)??``)}function Kt(e){let t=e.composedPath().map(Qt).find(Boolean)??null;return!t||t===t.ownerDocument.documentElement||t===t.ownerDocument.body||r(t)?null:t}function qt(e){let t=e.activeElement,n=new Set;for(;t&&!n.has(t);){n.add(t);let e=t.shadowRoot?.activeElement;if(e){t=e;continue}if(t.tagName.toLowerCase()===`iframe`)try{let e=t.contentDocument?.activeElement;if(e){t=e;continue}}catch{}break}return t}function Jt(e,t){let r=e,i=new Set;for(;r&&!i.has(r);){i.add(r),t.add(r);let e=r.getRootNode();if(l(e)){r=e.host;continue}if(n(e)&&e!==document){try{r=e.defaultView?.frameElement??null}catch{r=null}continue}r=null}}function Yt(e){let t=Zt(e).defaultView?.getSelection();return!!(t&&!t.isCollapsed&&t.toString().length>0)}function Xt(e){let t=e.clientX,n=e.clientY,r=Zt(e);for(;r!==document;){let e=null;try{e=r.defaultView?.frameElement??null}catch{break}if(!e)break;let i=e.getBoundingClientRect(),o=e,s=a(o);t=i.left+(o.clientLeft+t)*s.x,n=i.top+(o.clientTop+n)*s.y,r=e.ownerDocument}return{clientX:t,clientY:n}}function Zt(e){for(let t of e.composedPath()){if($t(t))return t;let e=Qt(t);if(e)return e.ownerDocument}return document}function Qt(e){return e&&`nodeType`in e&&e.nodeType===1?e:null}function $t(e){return`nodeType`in e&&e.nodeType===9}function en(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.clearSnapshot===!0?t.type===`access-lost`?t.recovery===`reauthenticate`&&[`permission-denied`,`session-expired`,`membership-revoked`].includes(t.code??``):t.type===`error`&&t.recovery===`retry`&&[`transport`,`data-integrity`,`unknown`].includes(t.code??``):!1}function tn(e){return e===`all`||e===`open`||e===`resolved`}function Y(e,t,n){return Math.min(n,Math.max(t,e))}function nn(e){return e.replace(/\/+$/,``)||`/`}function rn(e){let t=e.origin===window.location.origin?`${e.pathname||`/`}${e.search}${e.hash}`:e.href;try{return decodeURI(t)}catch{return t}}function an(e){try{return new URL(e.target.pageUrl,window.location.href)}catch{return null}}function X(...e){e.forEach(e=>{try{e?.()}catch{}})}function on(e,t){let n=Math.max(0,Math.floor((t-e)/1e3));if(n<60)return`방금`;let r=Math.floor(n/60);if(r<60)return`${r}분 전`;let i=Math.floor(r/60);if(i<24)return`${i}시간 전`;let a=Math.floor(i/24);return a<7?`${a}일 전`:new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`})}function Z(){return new Promise(e=>{if(typeof window.requestAnimationFrame==`function`){window.requestAnimationFrame(()=>e());return}queueMicrotask(e)})}function Q(e,t){return{value:e.style.getPropertyValue(t),priority:e.style.getPropertyPriority(t)}}function $(e,t,n){n.value?e.style.setProperty(t,n.value,n.priority):e.style.removeProperty(t)}function sn(){for(let e of[document.body,document.documentElement]){let t=getComputedStyle(e).backgroundColor.match(/[\d.]+/g)?.map(Number);if(!t||t.length<3)continue;let[n=0,r=0,i=0,a=1]=t;if(!(a<.5))return(n*.2126+r*.7152+i*.0722)/255<.45?`light`:`dark`}return window.matchMedia?.(`(prefers-color-scheme: dark)`).matches??!1?`light`:`dark`}export{St as REVIEW_REAUTHENTICATION_REQUIRED_EVENT,xt as REVIEW_WIDGET_TAG,Et as ReviewWidgetElement,Ot as isStagingLocation,Dt as mountReviewWidget};
|