1"use strict";(self.webpackChunkmy_webpack_project=self.webpackChunkmy_webpack_project||[]).push([[5810],{62945(e,n,t){t.d(n,{A:()=>j});var i=t(39471),a=t(91492),l=t(87073),r=t.n(l),o=t(82195),c=t(53718),s=t(96046),d=t(30462),u=t(39474),m=t(83282),h=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],g=i.forwardRef(function(e,n){var t,a=e.prefixCls,l=void 0===a?"rc-switch":a,g=e.className,p=e.checked,b=e.defaultChecked,f=e.disabled,v=e.loadingIcon,y=e.checkedChildren,S=e.unCheckedChildren,$=e.onClick,w=e.onChange,k=e.onKeyDown,I=(0,d.A)(e,h),C=(0,u.A)(!1,{value:p,defaultValue:b}),x=(0,s.A)(C,2),E=x[0],A=x[1];function _(e,n){var t=E;return f||(A(t=e),null==w||w(t,n)),t}var M=r()(l,g,(t={},(0,c.A)(t,"".concat(l,"-checked"),E),(0,c.A)(t,"".concat(l,"-disabled"),f),t));return i.createElement("button",(0,o.A)({},I,{type:"button",role:"switch","aria-checked":E,disabled:f,className:M,ref:n,onKeyDown:function(e){e.which===m.A.LEFT?_(!1,e):e.which===m.A.RIGHT&&_(!0,e),null==k||k(e)},onClick:function(e){var n=_(!E,e);null==$||$(n,e)}}),v,i.createElement("span",{className:"".concat(l,"-inner")},i.createElement("span",{className:"".concat(l,"-inner-checked")},y),i.createElement("span",{className:"".concat(l,"-inner-unchecked")},S)))});g.displayName="Switch";const p=g;var b=t(74569),f=t(11092),v=t(25564),y=t(47374),S=t(30348),$=t(19379),w=t(93042),k=t(67403),I=t(85391);const C=e=>{const{componentCls:n,trackHeightSM:t,trackPadding:i,trackMinWidthSM:a,innerMinMarginSM:l,innerMaxMarginSM:r,handleSizeSM:o,calc:c}=e,s=`${n}-inner`,d=(0,S.zA)(c(o).add(c(i).mul(2)).equal()),u=(0,S.zA)(c(r).mul(2).equal());return{[n]:{[`&${n}-small`]:{minWidth:a,height:t,lineHeight:(0,S.zA)(t),[`${n}-inner`]:{paddingInlineStart:r,paddingInlineEnd:l,[`${s}-checked, ${s}-unchecked`]:{minHeight:t},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${u})`,marginInlineEnd:`calc(100% - ${d} + ${u})`},[`${s}-unchecked`]:{marginTop:c(t).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${n}-handle`]:{width:o,height:o},[`${n}-loading-icon`]:{top:c(c(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${n}-checked`]:{[`${n}-inner`]:{paddingInlineStart:l,paddingInlineEnd:r,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${u})`,marginInlineEnd:`calc(-100% + ${d} - ${u})`}},[`${n}-handle`]:{insetInlineStart:`calc(100% - ${(0,S.zA)(c(o).add(i).equal())})`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},[`&${n}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}},x=e=>{const{componentCls:n,handleSize:t,calc:i}=e;return{[n]:{[`${n}-loading-icon${e.iconCls}`]:{position:"relative",top:i(i(t).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${n}-checked ${n}-loading-icon`]:{color:e.switchColor}}}},E=e=>{const{componentCls:n,trackPadding:t,handleBg:i,handleShadow:a,handleSize:l,calc:r}=e,o=`${n}-handle`;return{[n]:{[o]:{position:"absolute",top:t,insetInlineStart:t,width:l,height:l,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:i,borderRadius:r(l).div(2).equal(),boxShadow:a,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${n}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,S.zA)(r(l).add(t).equal())})`},[`&:not(${n}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${n}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},A=e=>{const{componentCls:n,trackHeight:t,trackPadding:i,innerMinMargin:a,innerMaxMargin:l,handleSize:r,calc:o}=e,c=`${n}-inner`,s=(0,S.zA)(o(r).add(o(i).mul(2)).equal()),d=(0,S.zA)(o(l).mul(2).equal());return{[n]:{[c]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:l,paddingInlineEnd:a,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${c}-checked, ${c}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:t},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${s} - ${d})`,marginInlineEnd:`calc(100% - ${s} + ${d})`},[`${c}-unchecked`]:{marginTop:o(t).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${n}-checked ${c}`]:{paddingInlineStart:a,paddingInlineEnd:l,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${s} + ${d})`,marginInlineEnd:`calc(-100% + ${s} - ${d})`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:o(i).mul(2).equal(),marginInlineEnd:o(i).mul(-1).mul(2).equal()}},[`&${n}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:o(i).mul(-1).mul(2).equal(),marginInlineEnd:o(i).mul(2).equal()}}}}}},_=e=>{const{componentCls:n,trackHeight:t,trackMinWidth:i}=e;return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,w.dF)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:i,height:t,lineHeight:(0,S.zA)(t),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${n}-disabled)`]:{background:e.colorTextTertiary}}),(0,w.K8)(e)),{[`&${n}-checked`]:{background:e.switchColor,[`&:hover:not(${n}-disabled)`]:{background:e.colorPrimaryHover}},[`&${n}-loading, &${n}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${n}-rtl`]:{direction:"rtl"}})}},M=(0,k.OF)("Switch",e=>{const n=(0,I.oX)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[_(n),A(n),E(n),x(n),C(n)]},e=>{const{fontSize:n,lineHeight:t,controlHeight:i,colorWhite:a}=e,l=n*t,r=i/2,o=l-4,c=r-4;return{trackHeight:l,trackHeightSM:r,trackMinWidth:2*o+8,trackMinWidthSM:2*c+4,trackPadding:2,handleBg:a,handleSize:o,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new $.Y("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}}
1);const q=i.forwardRef((e,n)=>{const{prefixCls:t,size:l,disabled:o,loading:c,className:s,rootClassName:d,style:m,checked:h,value:g,defaultChecked:S,defaultValue:$,onChange:w}=e,k=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)n.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(t[i[a]]=e[i[a]])}return t}(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[I,C]=(0,u.A)(!1,{value:null!=h?h:g,defaultValue:null!=S?S:$}),{getPrefixCls:x,direction:E,switch:A}=i.useContext(f.QO),_=i.useContext(v.A),q=(null!=o?o:_)||c,N=x("switch",t),j=i.createElement("div",{className:`${N}-handle`},c&&i.createElement(a.A,{className:`${N}-loading-icon`})),[z,O,D]=M(N),P=(0,y.A)(l),F=r()(null==A?void 0:A.className,{[`${N}-small`]:"small"===P,[`${N}-loading`]:c,[`${N}-rtl`]:"rtl"===E},s,d,O,D),H=Object.assign(Object.assign({},null==A?void 0:A.style),m);return z(i.createElement(b.A,{component:"Switch",disabled:q},i.createElement(p,Object.assign({},k,{checked:I,onChange:(...e)=>{C(e[0]),null==w||w.apply(void 0,e)},prefixCls:N,className:F,style:H,disabled:q,ref:n,loadingIcon:j}))))}),N=q;N.__ANT_SWITCH=!0;const j=N},25810(e,n,t){t.r(n);var i=t(39471),a=t(53836),l=t(50256),r=t(71757),o=t(49482),c=t(17325),s=t(62945),d=t(51794);function u(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var i,a,l,r,o=[],c=!0,s=!1;try{if(l=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;c=!1}else for(;!(c=(i=l.call(t)).done)&&(o.push(i.value),o.length!==n);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=t.return&&(r=t.return(),Object(r)!==r))return}finally{if(s)throw a}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return m(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?m(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}const h=l.A.TextArea,g=[{value:"identity_narrative",label:"Identity / Narrative"},{value:"emotional_life",label:"Emotional Life"},{value:"worldview",label:"Worldview"},{value:"money_decisions",label:"Money / Decisions"},{value:"life_structure",label:"Life Structure"}],p=900,b=e=>{const n=Number(e);if(!Number.isFinite(n)||n<0)return"â";const t=Math.floor(n/60),i=Math.round(n%60);return"".concat(t,":").concat(String(i).padStart(2,"0"))};t.d(n,["DOMAIN_OPTIONS",0,g,"default",0,e=>{let n=e.isModalVisible,t=e.onCancel,l=e.confirmButtonText,m=void 0===l?"Save":l,f=e.modalContent,v=e.onConfirm,y=e.initialData,S=void 0===y?{}:y,$=e.isEditMode,w=void 0!==$&&$,k=e.setNotification,I=e.refetch,C=void 0===I?()=>{}:I;const x=u(a.A.useForm(),1)[0],E=u((0,i.useState)(!1),2),A=E[0],_=E[1],M=u((0,i.useState)(null),2),q=M[0],N=M[1];(0,i.useEffect)(()=>{var e,t;n?(x.setFieldsValue({question_text:S.question_text||"",learning_objective:S.learning_objective||"",time_limit_seconds:null!==(e=S.time_limit_seconds)&&void 0!==e?e:null,domain:S.domain||void 0,is_active:void 0===S.is_active||S.is_active}),N(null!==(t=S.time_limit_seconds)&&void 0!==t?t:null)):(x.resetFields(),N(null))},[n,S,x]);const j=()=>{x.resetFields(),t()};return i.createElement(o.A,{open:n,onCancel:j,centered:!0,className:"interview-modal",footer:i.createElement("div",{className:"custom-footer"},i.createElement("button",{className:"delete-button",onClick:async()=>{_(!0);try{const e=await x.validateFields(),n={question_text:e.question_text.trim(),learning_objective:e.learning_objective.trim(),time_limit_seconds:Number(e.time_limit_seconds),domain:e.domain||"",is_active:e.is_active};let t;if(w){if(!S.id)throw new Error("Question ID is required for editing");t=await d.tY.EditInterviewQuestion(S.id,n)}else t=await d.tY.AddInterviewQuestion(n);k({message:w?"Interview question updated successfully":"Interview question created successfully",severity:"success",backgroundColor:"#FFFFFF",textColor:"#000000"}),v(t.data||t,C),x.resetFields()}catch(n){var e;if(null!=n&&null!==(e=n.response)&&void 0!==e&&e.data){const e=Object.entries(n.response.data).map(e=>{let n=u(e,2),t=n[0],i=n[1];return"".concat(t,": ").concat(Array.isArray(i)?i.join(", "):i)}).join("; ");k({message:e||"Failed to save",severity:"error",backgroundColor:"#FDEDED",textColor:"#D32F2F"})}else"ValidationError"===n.name||n.errorFields||console.error("An error occurred:",n)}finally{_(!1)}},disabled:A},A?"Processing...":m),i.createElement("button",{className:"cancel-button",onClick:j,disabled:A},"No, Cancel"))},i.createElement("div",{className:"modal-content-center"},f&&i.createElement("p",{className:"modal-text",style:{fontSize:"20px",fontWeight:500,marginBottom:"20px",textAlign:"center"}},f),i.createElement(a.A,{form:x,layout:"vertical",initialValues:{question_text:"",learning_objective:"",time_limit_seconds:null,domain:void 0,is_active:!0}},i.createElement("div",{className:"form-container"},i.createElement(a.A.Item,{label:"Question",name:"question_text",required:!1,tooltip:"Read aloud verbatim by the AI interviewer. Write it the way it should be spoken.",rules:[{validator:(e,n)=>n&&n.trim()?Promise.resolve():Promise.reject("Please enter the question")}
1],style:{marginBottom:"16px"},labelCol:{style:{fontWeight:500,fontSize:"16px"}}},i.createElement(h,{rows:3,style:{borderRadius:"12px"},placeholder:"e.g. Tell me the story of your life. Start from the beginningâ¦"})),i.createElement(a.A.Item,{label:"Learning Objective",name:"learning_objective",required:!1,extra:"What a complete answer must cover â the AI uses this to decide follow-up questions. Never shown to the Companion.",rules:[{validator:(e,n)=>n&&n.trim()?Promise.resolve():Promise.reject("Please enter the learning objective")}],style:{marginBottom:"16px"},labelCol:{style:{fontWeight:500,fontSize:"16px"}}},i.createElement(h,{rows:3,style:{borderRadius:"12px"},placeholder:"e.g. The participant's life story in rough chronological order, covering childhood, education, familyâ¦"})),i.createElement("div",{style:{display:"flex",alignItems:"flex-start",gap:"16px",marginBottom:"16px"}},i.createElement(a.A.Item,{label:i.createElement("span",null,"Time Limit (seconds)",Number.isFinite(Number(q))&&null!==q&&i.createElement("span",{style:{fontWeight:400,color:"#666",marginLeft:6}},"(",b(q),")")),name:"time_limit_seconds",required:!1,tooltip:"Hard cap for this question, ".concat(10,"â").concat(p," seconds. The interviewer moves on once it elapses."),rules:[{validator:(e,n)=>{if(null==n||""===n)return Promise.reject("Please enter a time limit");const t=Number(n);return Number.isInteger(t)?t<10||t>p?Promise.reject("Must be between ".concat(10," and ").concat(p," seconds")):Promise.resolve():Promise.reject("Must be a whole number of seconds")}}],style:{marginBottom:0,flex:1},labelCol:{style:{fontWeight:500,fontSize:"16px"}}},i.createElement(r.A,{style:{height:"50px",width:"100%",borderRadius:"12px",display:"flex",alignItems:"center"},min:10,max:p,step:5,controls:!1,placeholder:"e.g. 120",onChange:N,parser:e=>(e||"").toString().replace(/[^0-9]/g,"")})),i.createElement(a.A.Item,{label:"Domain (Optional)",name:"domain",required:!1,tooltip:"Metadata only â groups questions by theme. Not used by the interviewer at runtime.",style:{marginBottom:0,flex:1},labelCol:{style:{fontWeight:500,fontSize:"16px"}}},i.createElement(c.A,{allowClear:!0,placeholder:"Select a domain",options:g,style:{height:"50px"}}))),i.createElement("div",{style:{display:"flex",justifyContent:"flex-start"}},i.createElement(a.A.Item,{label:"Active",name:"is_active",valuePropName:"checked",tooltip:"Inactive questions stay in the script but are skipped by the interviewer.",style:{marginBottom:"16px"},labelCol:{style:{fontWeight:500,fontSize:"16px"}}},i.createElement(s.A,null)))))))},"formatDuration",0,b])}}]);
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.