MCPcopy Index your code
hub / github.com/ChinaSiro/claude-code-sourcemap / Ssq

Function Ssq

package/cli.js:563–563  ·  view source on GitHub ↗
(q)

Source from the content-addressed store, hash-verified

561`).split(`
562`).map((z)=>TP_(z,K,_)).join(`
563`)}var S08,DP_=39,Sy1="\x07",bsq="[",fP_="]",xsq="m",h08,Ssq=(q)=>`${S08.values().next().value}${bsq}${q}${xsq}`,Csq=(q)=>`${S08.values().next().value}${h08}${q}${Sy1}`,ZP_=(q)=>q.split(" ").map((K)=>AA6(K)),hy1=(q,K,_)=>{let z=[...K],Y=!1,$=!1,A=AA6(VY(q.at(-1)));for(let[O,w]of z.entries()){let j=AA6(w);if(A+j<=_)q[q.length-1]+=w;else q.push(w),A=0;if(S08.has(w))Y=!0,$=z.slice(O+1,O+1+h08.length).join("")===h08;if(Y){if($){if(w===Sy1)Y=!1,$=!1}else if(w===xsq)Y=!1;continue}if(A+=j,A===_&&O<z.length-1)q.push(""),A=0}if(!A&&q.at(-1).length>0&&q.length>1)q[q.length-2]+=q.pop()},GP_=(q)=>{let K=q.split(" "),_=K.length;while(_>0){if(AA6(K[_-1])>0)break;_--}if(_===K.length)return q;return K.slice(0,_).join(" ")+K.slice(_).join("")},TP_=(q,K,_={})=>{if(_.trim!==!1&&q.trim()==="")return"";let z="",Y,$,A=ZP_(q),O=[""];for(let[J,M]of q.split(" ").entries()){if(_.trim!==!1)O[O.length-1]=O.at(-1).trimStart();let X=AA6(O.at(-1));if(J!==0){if(X>=K&&(_.wordWrap===!1||_.trim===!1))O.push(""),X=0;if(X>0||_.trim===!1)O[O.length-1]+=" ",X++}if(_.hard&&A[J]>K){let P=K-X,W=1+Math.floor((A[J]-P-1)/K);if(Math.floor((A[J]-1)/K)<W)O.push("");hy1(O,M,K);continue}if(X+A[J]>K&&X>0&&A[J]>0){if(_.wordWrap===!1&&X<K){hy1(O,M,K);continue}O.push("")}if(X+A[J]>K&&_.wordWrap===!1){hy1(O,M,K);continue}O[O.length-1]+=M}if(_.trim!==!1)O=O.map((J)=>GP_(J));let w=O.join(`
564`),j=[...w],H=0;for(let[J,M]of j.entries()){if(z+=M,S08.has(M)){let{groups:P}=new RegExp(`(?:\\${bsq}(?<code>\\d+)m|\\${h08}(?<uri>.*)${Sy1})`).exec(w.slice(H))||{groups:{}};if(P.code!==void 0){let W=Number.parseFloat(P.code);Y=W===DP_?void 0:W}else if(P.uri!==void 0)$=P.uri.length===0?void 0:P.uri}let X=rW.codes.get(Number(Y));if(j[J+1]===`
565`){if($)z+=Csq("");if(Y&&X)z+=Ssq(X)}else if(M===`
566`){if(Y&&X)z+=Ssq(Y);if($)z+=Csq($)}H+=M.length}return z};var Isq=y(()=>{hsq();CT();N08();S08=new Set(["\x1B","›"]),h08=`${fP_}8;;`});var vP_,b16;var _l6=y(()=>{Isq();vP_=typeof Bun<"u"&&typeof Bun.wrapAnsi==="function"?Bun.wrapAnsi:null,b16=vP_??Cy1});function b08(q,K,_){let z=of(q,K,_);return O1(z)>_-K?of(q,K,_-1):z}function kP_(q,K,_){if(K<1)return"";if(K===1)return C08;let z=O1(q);if(z<=K)return q;if(_==="start")return C08+b08(q,z-K+1,z);if(_==="middle"){let Y=Math.floor(K/2);return b08(q,0,Y)+C08+b08(q,z-(K-Y)+1,z)}return b08(q,0,K-1)+C08}function nS(q,K,_){if(_==="wrap")return b16(q,K,{trim:!1,hard:!0});if(_==="wrap-trim")return b16(q,K,{trim:!0,hard:!0});if(_.startsWith("truncate")){let z="end";if(_==="truncate-middle")z="middle";if(_==="truncate-start")z="start";return kP_(q,K,z)}return q}var C08="…";var x08=y(()=>{$A6();Q5();_l6()});function usq(q,K,_=!1){if(K.nodeName==="#text")return;let z=K,Y=_||z.style.position==="absolute",$=zM.get(z);if($)jsq(q,$,Y),zM.delete(z);for(let A of z.childNodes)usq(q,A,Y)}function VP_(q,K){return psq(q,K)}function psq(q,K){if(q===K)return!0;if(q===void 0||K===void 0)return!1;let _=Object.keys(q),z=Object.keys(K);if(_.length!==z.length)return!1;for(let Y of _)if(q[Y]!==K[Y])return!1;return!0}function EP_(q){return q.nodeName!=="#text"}function Fsq(q,K){let _=[];return z(q,0),_;function z(Y,$){let A=Y.yogaNode;if(!A||A.getDisplay()===jL.None)return;let O=$+A.getComputedTop(),w=A.getComputedHeight();if(K<O||K>=O+w)return;if(Y.debugOwnerChain)_=Y.debugOwnerChain;for(let j of Y.childNodes)if(EP_(j))z(j,O)}}var zl6=(q)=>{let _={nodeName:q,style:{},attributes:{},childNodes:[],parentNode:void 0,yogaNode:q!=="ink-virtual-text"&&q!=="ink-link"&&q!=="ink-progress"?Asq():void 0,dirty:!1};if(q==="ink-text")_.yogaNode?.setMeasureFunc(NP_.bind(null,_));else if(q==="ink-raw-ansi")_.yogaNode?.setMeasureFunc(yP_.bind(null,_));return _},I08=(q,K)=>{if(K.parentNode)Yl6(K.parentNode,K);if(K.parentNode=q,q.childNodes.push(K),K.yogaNode)q.yogaNode?.insertChild(K.yogaNode,q.yogaNode.getChildCount());oW(q)},by1=(q,K,_)=>{if(K.parentNode)Yl6(K.parentNode,K);K.parentNode=q;let z=q.childNodes.indexOf(_);if(z>=0){let Y=0;if(K.yogaNode&&q.yogaNode){for(let $=0;$<z;$++)if(q.childNodes[$]?.yogaNode)Y++}if(q.childNodes.splice(z,0,K),K.yogaNode&&q.yogaNode)q.yogaNode.insertChild(K.yogaNode,Y);oW(q);return}if(q.childNodes.push(K),K.yogaNode)q.yogaNode?.insertChild(K.yogaNode,q.yogaNode.getChildCount());oW(q)},Yl6=(q,K)=>{if(K.yogaNode)K.parentNode?.yogaNode?.removeChild(K.yogaNode);usq(q,K),K.parentNode=void 0;let _=q.childNodes.indexOf(K);if(_>=0)q.childNodes.splice(_,1);oW(q)},xy1=(q,K,_)=>{if(K==="children")return;if(q.attributes[K]===_)return;q.attributes[K]=_,oW(q)},Iy1=(q,K)=>{if(VP_(q.style,K))return;q.style=K,oW(q)},msq=(q,K)=>{if(psq(q.textStyles,K))return;q.textStyles=K,oW(q)},Bsq=(q)=>{let K={nodeName:"#text",nodeValue:q,yogaNode:void 0,parentNode:void 0,style:{}};return $l6(K,q),K},NP_=function(q,K,_){let z=q.nodeName==="#text"?q.nodeValue:Jsq(q),Y=Msq(z),$=k08(Y,K);if($.width<=K)return $;if($.width>=1&&K>0&&K<1)return $;if(Y.includes(`

Callers 1

TP_Function · 0.85

Calls 2

nextMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected