1"use strict";(self.webpackChunkmy_webpack_project=self.webpackChunkmy_webpack_project||[]).push([[3718],{6726(e,n,t){t.d(n,{A:()=>c});var i=t(82195),r=t(39471);const a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};var l=t(72812),o=function(e,n){return r.createElement(l.A,(0,i.A)({},e,{ref:n,icon:a}))};const c=r.forwardRef(o)},62945(e,n,t){t.d(n,{A:()=>z});var i=t(39471),r=t(91492),a=t(87073),l=t.n(a),o=t(82195),c=t(53718),d=t(96046),s=t(30462),u=t(39474),h=t(83282),g=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],m=i.forwardRef(function(e,n){var t,r=e.prefixCls,a=void 0===r?"rc-switch":r,m=e.className,p=e.checked,f=e.defaultChecked,v=e.disabled,b=e.loadingIcon,y=e.checkedChildren,k=e.unCheckedChildren,S=e.onClick,w=e.onChange,$=e.onKeyDown,E=(0,s.A)(e,g),I=(0,u.A)(!1,{value:p,defaultValue:f}),A=(0,d.A)(I,2),C=A[0],O=A[1];function j(e,n){var t=C;return v||(O(t=e),null==w||w(t,n)),t}var x=l()(a,m,(t={},(0,c.A)(t,"".concat(a,"-checked"),C),(0,c.A)(t,"".concat(a,"-disabled"),v),t));return i.createElement("button",(0,o.A)({},E,{type:"button",role:"switch","aria-checked":C,disabled:v,className:x,ref:n,onKeyDown:function(e){e.which===h.A.LEFT?j(!1,e):e.which===h.A.RIGHT&&j(!0,e),null==$||$(e)},onClick:function(e){var n=j(!C,e);null==S||S(n,e)}}),b,i.createElement("span",{className:"".concat(a,"-inner")},i.createElement("span",{className:"".concat(a,"-inner-checked")},y),i.createElement("span",{className:"".concat(a,"-inner-unchecked")},k)))});m.displayName="Switch";const p=m;var f=t(74569),v=t(11092),b=t(25564),y=t(47374),k=t(30348),S=t(19379),w=t(93042),$=t(67403),E=t(85391);const I=e=>{const{componentCls:n,trackHeightSM:t,trackPadding:i,trackMinWidthSM:r,innerMinMarginSM:a,innerMaxMarginSM:l,handleSizeSM:o,calc:c}=e,d=`${n}-inner`,s=(0,k.zA)(c(o).add(c(i).mul(2)).equal()),u=(0,k.zA)(c(l).mul(2).equal());return{[n]:{[`&${n}-small`]:{minWidth:r,height:t,lineHeight:(0,k.zA)(t),[`${n}-inner`]:{paddingInlineStart:l,paddingInlineEnd:a,[`${d}-checked, ${d}-unchecked`]:{minHeight:t},[`${d}-checked`]:{marginInlineStart:`calc(-100% + ${s} - ${u})`,marginInlineEnd:`calc(100% - ${s} + ${u})`},[`${d}-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:a,paddingInlineEnd:l,[`${d}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${d}-unchecked`]:{marginInlineStart:`calc(100% - ${s} + ${u})`,marginInlineEnd:`calc(-100% + ${s} - ${u})`}},[`${n}-handle`]:{insetInlineStart:`calc(100% - ${(0,k.zA)(c(o).add(i).equal())})`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${d}`]:{[`${d}-unchecked`]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},[`&${n}-checked ${d}`]:{[`${d}-checked`]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}},A=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}}}},C=e=>{const{componentCls:n,trackPadding:t,handleBg:i,handleShadow:r,handleSize:a,calc:l}=e,o=`${n}-handle`;return{[n]:{[o]:{position:"absolute",top:t,insetInlineStart:t,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:i,borderRadius:l(a).div(2).equal(),boxSh
1adow:r,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${n}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,k.zA)(l(a).add(t).equal())})`},[`&:not(${n}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${n}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},O=e=>{const{componentCls:n,trackHeight:t,trackPadding:i,innerMinMargin:r,innerMaxMargin:a,handleSize:l,calc:o}=e,c=`${n}-inner`,d=(0,k.zA)(o(l).add(o(i).mul(2)).equal()),s=(0,k.zA)(o(a).mul(2).equal());return{[n]:{[c]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:r,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% + ${d} - ${s})`,marginInlineEnd:`calc(100% - ${d} + ${s})`},[`${c}-unchecked`]:{marginTop:o(t).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${n}-checked ${c}`]:{paddingInlineStart:r,paddingInlineEnd:a,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${s})`,marginInlineEnd:`calc(-100% + ${d} - ${s})`}},[`&: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()}}}}}},j=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,k.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"}})}},x=(0,$.OF)("Switch",e=>{const n=(0,E.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[j(n),O(n),C(n),A(n),I(n)]},e=>{const{fontSize:n,lineHeight:t,controlHeight:i,colorWhite:r}=e,a=n*t,l=i/2,o=a-4,c=l-4;return{trackHeight:a,trackHeightSM:l,trackMinWidth:2*o+8,trackMinWidthSM:2*c+4,trackPadding:2,handleBg:r,handleSize:o,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new S.Y("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}});const M=i.forwardRef((e,n)=>{const{prefixCls:t,size:a,disabled:o,loading:c,className:d,rootClassName:s,style:h,checked:g,value:m,defaultChecked:k,defaultValue:S,onChange:w}=e,$=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 r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)n.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(t[i[r]]=e[i[r]])}return t}(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[E,I]=(0,u.A)(!1,{value:null!=g?g:m,defaultValue:null!=k?k:S}),{getPrefixCls:A,direction:C,switch:O}=i.useContext(v.QO),j=i.useContext(b.A),M=(null!=o?o:j)||c,D=A("switch",t),z=i.createElement("div",{className:`${D}-handle`},c&&i.createElement(r.A,{className:`${D}-loading-icon`})),[P,T,N]=x(D),q=(0,y.A)(a),R=l()(null==O?void 0:O.className,{[`${D}-small`]:"small"===q,[`${D}-loading`]:c,[`${D}-rtl`]:"rtl"===C},d,s,T,N),L=Object.assign(Object.assign({},null==O?void 0:O.style),h);return P(i.createElement(f.A,{component:"Switch",disabled:M},i.createElement(p,Object.assign({},$,{checked:E,onChange:(...e)=>{I(e[0]),null==w||w.apply(void 0,e)},prefixCls:D,className:R,style:L,disabled:M,ref:n,loadingIcon:z}
1))))}),D=M;D.__ANT_SWITCH=!0;const z=D},13718(e,n,t){t.r(n);var i=t(39471),r=t(86287),a=t(28563),l=t(50256),o=t(49482),c=t(14191),d=t(93267),s=t(62945),u=t(61458),h=t(58480),g=t(71244),m=t(6726),p=t(51794),f=t(28152);const v=["onDropRow"];function b(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,r,a,l,o=[],c=!0,d=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;c=!1}else for(;!(c=(i=a.call(t)).done)&&(o.push(i.value),o.length!==n);c=!0);}catch(e){d=!0,r=e}finally{try{if(!c&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(d)throw r}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return y(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)?y(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 y(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}function k(){return k=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)({}).hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},k.apply(null,arguments)}function S(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?S(Object(t),!0).forEach(function(n){$(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):S(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function $(e,n,t){return(n=function(e){var n=function(e){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const E=h.A.Title,I=h.A.Text,A=e=>{let n=e.onDropRow,t=function(e,n){if(null==e)return{};var t,i,r=function(e,n){if(null==e)return{};var t={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==n.indexOf(i))continue;t[i]=e[i]}return t}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)t=a[i],-1===n.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}(e,v);const r=t["data-row-index"];return i.createElement("tr",k({},t,{draggable:void 0!==r,onDragStart:e=>e.dataTransfer.setData("text/plain",String(r)),onDragOver:e=>e.preventDefault(),onDrop:e=>{e.preventDefault();const t=Number(e.dataTransfer.getData("text/plain"));Number.isNaN(t)||t===r||n(t,r)},style:w(w({},t.style),{},{cursor:void 0!==r?"move":void 0})}))},C=/^https?:\/\/.+/i;t.d(n,["default",0,()=>{const e=b((0,i.useState)([]),2),n=e[0],t=e[1],h=b((0,i.useState)(!1),2),v=h[0],y=h[1],k=b((0,i.useState)(!1),2),S=k[0],$=k[1],O=b((0,i.useState)(!1),2),j=O[0],x=O[1],M=b((0,i.useState)(null),2),D=M[0],z=M[1],P=b((0,i.useState)({title:"",url:""}),2),T=P[0],N=P[1],q=b((0,i.useState)(null),2),R=q[0],L=q[1],H=b((0,i.useState)(""),2),_=H[0],V=H[1],X=b((0,i.useState)({}),2),F=X[0],W=X[1],G=b((0,i.useState)(null),2),U=G[0],B=G[1],K=(0,i.useRef)(null),Q=function(e){return B({message:e,severity:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success"})},Y=()=>{y(!0),(0,p.t0)().then(e=>{var n;return t((null==e||null===(n=e.data)||void 0===n?void 0:n.social_links)||[])}).catch(()=>Q("Failed to load social links","error")).finally(()=>y(!1))};(0,i.useEffect)(()=>{Y()},[]);const J=(e,i)=>{const r=[...n],a=b(r.splice(e,1),1)[0];r.splice(i,0,a),t(r),(0,p.aY)(r.map(e=>e.id)).then(()=>Q("Order saved")).catch(()=>{Q("Reorder failed","error"),Y()})},Z=(0,i.useMemo)(()=>[{title:"Icon",dataIndex:"icon_url",width:70,render:e=>e?i.createElement("img",{src:e,alt:"",style:{width:28,height:28,objectFit:"contain"}}):i.createElement(I,{type:"secondary"},"â")},{title:"Title",dataIndex:"title"},{title:"URL",dataIndex:"url",render:e=>i.createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer"},e)},{title:"Active",dataIndex:"active",width:90,render:(e,n)=>i.createElement(s.A,{checked:e,onChange:e=>((e,n)=>{const t=new FormData;t.append("active",n?"true":"false"),(0,p.N$)(e.id,t).then(()=>{Q(n?"Link shown":"Link hidden"),Y()}).catch(()=>Q("Could not update","error"))})(n,e)})},{title:"Actions",width:150,render:(e,n)=>i.createElement(d.A,null,i.createElement(r.A,{size:"small",onClick:()=>(e=>{z(e),N({title:e.title,url:e.url}),L(null),V(e.icon_url||""),W({}),$(!0)})(n)},"Edit"),i.createElement(c.A,{title:"Delete this social link?",okText:"Delete",okButtonProps:{danger:!0},onConfirm:()=>(e=>{(0,p.xS)(e.id).then(()=>{Q("Social link deleted"),Y()}).catch(()=>Q("Delete failed","error"))})(n)},i.createElement(r.A,{size:"small",danger:!0},"Delete")))}],[n]);return i.createElement(a.A,null,i.createElement(f.A,{message:null==U?void 0:U.message,severity:null==U?void 0:U.severity,onClose:()=>B(null)}),i.createElement(d.A,{direction:"vertical",size:"large",style:{width:"100%"}},i.createElement("div",null,i.createElement(E,{level:4},"Social Links"),i.createElement(I,{type:"secondary",style:{display:"block",marginTop:8}},"The social icons shown across the site â in the app footer, the marketing footer and the mobile menu. Add a link, upload its icon (SVG or PNG), drag rows to reorder, and toggle Active to show or hide one without deleting it. Changes go live immediately.")),i.createElement("div",null,i.createElement(r.A,{type:"primary",icon:i.createElement(g.A,null),onClick:()=>{z(null),N({title:"",url:""}),L(null),V(""),W({}),$(!0)}},"Add social link")),i.createElement(u.A,{rowKey:"id",loading:v,columns:Z,dataSource:n,pagination:!1,components:{body:{row:A}},onRow:(e,n)=>({"data-row-index":n,onDropRow:J})})),i.createElement(o.A,{title:D?"Edit social link":"Add social link",open:S,onOk:()=>
1{if(!(()=>{const e={};return T.title.trim()||(e.title="Title is required."),C.test(T.url.trim())||(e.url="Enter a full URL starting with http:// or https://."),D||R||(e.icon="An icon is required."),W(e),0===Object.keys(e).length})())return;const e=new FormData;e.append("title",T.title.trim()),e.append("url",T.url.trim()),R&&e.append("icon",R),x(!0),(D?(0,p.N$)(D.id,e):(0,p.GP)(e)).then(()=>{Q(D?"Social link updated":"Social link added"),$(!1),Y()}).catch(e=>{var n,t;const i=null==e||null===(n=e.response)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.details;i?W(Object.fromEntries(Object.entries(i).map(e=>{let n=b(e,2),t=n[0],i=n[1];return[t,Array.isArray(i)?i[0]:String(i)]}))):Q((null==e||null===(t=e.response)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.error)||"Save failed","error")}).finally(()=>x(!1))},confirmLoading:j,okText:D?"Save":"Add",onCancel:()=>$(!1),destroyOnClose:!0},i.createElement(d.A,{direction:"vertical",size:"middle",style:{width:"100%"}},i.createElement("div",null,i.createElement(I,{strong:!0},"Title"),i.createElement(l.A,{value:T.title,placeholder:"e.g. TikTok",status:F.title?"error":"",onChange:e=>N(n=>w(w({},n),{},{title:e.target.value}))}),F.title&&i.createElement(I,{type:"danger"},F.title)),i.createElement("div",null,i.createElement(I,{strong:!0},"URL"),i.createElement(l.A,{value:T.url,placeholder:"https://â¦",status:F.url?"error":"",onChange:e=>N(n=>w(w({},n),{},{url:e.target.value}))}),F.url&&i.createElement(I,{type:"danger"},F.url)),i.createElement("div",null,i.createElement(I,{strong:!0},"Icon ",D&&"(leave empty to keep current)"),i.createElement("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:8}},_?i.createElement("img",{src:_,alt:"",style:{width:40,height:40,objectFit:"contain",background:"#2b2a2a",borderRadius:6,padding:4}}):i.createElement("div",{style:{width:40,height:40,borderRadius:6,background:"#f0f0f0"}}),i.createElement("input",{ref:K,type:"file",accept:".svg,.png,image/svg+xml,image/png",style:{display:"none"},onChange:e=>{var n;const t=null===(n=e.target.files)||void 0===n?void 0:n[0];if(!t)return;const i="."+(t.name.split(".").pop()||"").toLowerCase();[".svg",".png"].includes(i)?t.size>2097152?W(e=>w(w({},e),{},{icon:"Icon must be 2 MB or smaller."})):(W(e=>w(w({},e),{},{icon:void 0})),L(t),V(URL.createObjectURL(t))):W(e=>w(w({},e),{},{icon:"Icon must be an SVG or PNG file."}))}}),i.createElement(r.A,{icon:i.createElement(m.A,null),onClick:()=>{var e;return null===(e=K.current)||void 0===e?void 0:e.click()}},"Choose icon")),F.icon&&i.createElement(I,{type:"danger"},F.icon)))))}])}}]);
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.