PageSourceSearch

https://www.skillbnk.com/_next/static/chunks/4415.a92c459939b27b97.js

js skillbnk.com collected 2026-10-09 22:57:54 UTC 4,424 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4415],{41867:(e,r,t)=>{t.d(r,{k:()=>s});var o=t(7620);let a=[["Cat","rgb(125, 50, 0)"],["Dog","rgb(100, 0, 0)"],["Rabbit","rgb(150, 0, 0)"],["Frog","rgb(200, 0, 0)"],["Fox","rgb(200, 75, 0)"],["Hedgehog","rgb(0, 75, 0)"],["Pigeon","rgb(0, 125, 0)"],["Squirrel","rgb(75, 100, 0)"],["Bear","rgb(125, 100, 0)"],["Tiger","rgb(0, 0, 150)"],["Leopard","rgb(0, 0, 200)"],["Zebra","rgb(0, 0, 250)"],["Wolf","rgb(0, 100, 150)"],["Owl","rgb(0, 100, 100)"],["Gull","rgb(100, 0, 100)"],["Squid","rgb(150, 0, 150)"]],l=a[Math.floor(Math.random()*a.length)],n=(0,o.createContext)({clientID:0,color:l[1],isCollabActive:!1,name:l[0],yjsDocMap:new Map});function s(e,r){let t=(0,o.useContext)(n);return null!=e&&(t.name=e),null!=r&&(t.color=r),t}},64415:(e,r,t)=>{t.r(r),t.d(r,{default:()=>p});var o=t(54568),a=t(7620),l=t(41867),n=t(89220),s=t(70198),i=t(15062),d=t(62147),c=t(63038),b=t(1947),f=t(88679);function u(e){let{option:r,index:t,options:n,totalVotes:s,withPollNode:i}=e,{clientID:d}=(0,l.k)(),c=(0,a.useRef)(null),f=r.votes,u=-1!==f.indexOf(d),p=f.length,g=r.text;return(0,o.jsxs)("div",{className:"mb-2.5 flex flex-row items-center",children:[(0,o.jsx)("div",{className:"relative mr-2.5 flex h-[22px] w-[22px] rounded-md border border-gray-400 ".concat(u?'border-primary bg-primary after:pointer-events-none after:absolute after:left-2 after:top-1 after:m-0 after:block after:h-[9px] after:w-[5px] after:rotate-45 after:cursor-pointer after:border-b-2 after:border-r-2 after:border-solid after:border-white after:content-[""]':""),children:(0,o.jsx)("input",{ref:c,className:"absolute block h-full w-full cursor-pointer border-0 opacity-0",type:"checkbox",onChange:e=>{i(e=>{e.toggleVote(r,d)})},checked:u})}),(0,o.jsxs)("div",{className:"relative flex flex-[10px] cursor-pointer overflow-hidden rounded-md border border-primary",children:[(0,o.jsx)("div",{className:"transition-width absolute left-0 top-0 z-0 h-full bg-accent duration-1000 ease-in-out",style:{width:"".concat(0===p?0:p/s*100,"%")}}),(0,o.jsx)("span",{className:"absolute right-4 top-1.5 text-xs text-primary",children:p>0&&(1===p?"1 vote":"".concat(p," votes"))}),(0,o.jsx)(b.p,{type:"text",value:g,onChange:e=>{let t=e.target,o=t.value,a=t.selectionStart,l=t.selectionEnd;i(e=>{e.setOptionText(r,o)},()=>{t.selectionStart=a,t.selectionEnd=l})},placeholder:"Option ".concat(t+1)})]}),(0,o.jsx)("button",{disabled:n.length<3,className:"relative z-0 ml-1.5 flex h-7 w-7 cursor-pointer rounded-md border-0 bg-transparent bg-[position:6px_6px] bg-no-repeat opacity-30 before:absolute before:left-[13px] before:top-1.5 before:block before:h-[15px] before:w-0.5 before:-rotate-45 before:bg-gray-400 before:content-[''] after:absolute after:left-[13px] after:top-1.5 after:block after:h-[15px] after:w-0.5 after:rotate-45 after:bg-gray-400 after:content-[''] hover:bg-gray-100 hover:opacity-100 disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:opacity-30","aria-label":"Remove",onClick:()=>{i(e=>{e.deleteOption(r)})}})]})}function p(e){let{question:r,options:t,nodeKey:l}=e,[b]=(0,n.DF)(),p=(0,a.useMemo)(()=>t.reduce((e,r)=>e+r.votes.length,0),[t]),[g,x,h]=(0,s.Y)(l),[m,v]=(0,a.useState)(null),w=(0,a.useRef)(null),y=(0,a.useCallback)(e=>{let r=(0,d.vJq)();return g&&(0,d.RTZ)(r)&&(e.preventDefault(),b.update(()=>{r.getNodes().forEach(e=>{(0,f.q9)(e)&&e.remove()})})),!1},[b,g]);(0,a.useEffect)(()=>(0,i.Sd)(b.registerUpdateListener(e=>{let{editorState:r}=e;v(r.read(()=>(0,d.vJq)()))}),b.registerCommand(d.d8p,e=>e.target===w.current&&(e.shiftKey||h(),x(!g),!0),d.AcJ),b.registerCommand(d.w$Z,y,d.AcJ),b.registerCommand(d.gCZ,y,d.AcJ)),[h,b,g,l,y,x]);let j=(e,r)=>{b.update(()=>{let r=(0,d.nsf)(l);(0,f.q9)(r)&&e(r)},{onUpdate:r})},k=(0,d.RTZ)(m)&&g;return(0,o.jsx)("div",{className:"min-w-[400px] max-w-[600px] cursor-pointer select-none rounded-lg border border-gray-200 bg-background ".concat(k?"outline outline-2 outline-primary":""),ref:w,children:(0,o.jsxs)("div",{className:"m-4 cursor-default",children:[(0,o.jsx)("h2",{className:"m-0 mb-4 text-center text-lg text-gray-600",children:r}),t.map((e,r)=>{let a=e.uid;return(0,o.jsx)(u,{withPollNode:j,option:e,index:r,options:t,totalVotes:p},a)}),(0,o.jsx)("div",{className:"flex justify-center",children:(0,o.jsx)(c.$,{onClick:()=>{j(e=>{e.addOption((0,f.hw)())})},size:"sm",children:"Add Option"})})]})})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.