PageSourceSearch

https://klinic.com/_next/static/chunks/FileUploadField.3fec4be31ab353fe.js

js klinic.com collected 2026-09-29 13:18:23 UTC 6,817 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6710],{77537:function(e,t,i){i.r(t),i.d(t,{default:function(){return l}});var n=i(43964),r=i(52983);function o(e){var t=e.width,i=e.style;return(0,n.a)("svg",(0,n._)({width:void 0===t?"48px":t,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:i},{children:[(0,n.j)("path",{d:"m18.101 30.078 5.9-5.888 5.898 5.888M24 40.3V24.19",stroke:"#414859"}),(0,n.j)("path",{d:"M34.988 36.336c5 0 9.012-4.056 9.012-9.112s-4.012-9.112-9.012-9.112c0-5.585-4.476-10.112-10-10.112-4.244 0-7.848 2.646-9.302 6.408-.232 0-.465-.059-.698-.059C8.942 14.35 4 19.288 4 25.46c0 6.114 4.884 11.111 10.988 11.111",stroke:"#414859"})]}))}function a(e){var t=e.width,i=e.height;return(0,n.j)("svg",(0,n._)({width:void 0===t?26:t,height:void 0===i?26:i,viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:(0,n.j)("path",{d:"M1 19.3529V22.1765C1 22.9253 1.31607 23.6435 1.87868 24.173C2.44129 24.7025 3.20435 25 4 25H22C22.7956 25 23.5587 24.7025 24.1213 24.173C24.6839 23.6435 25 22.9253 25 22.1765V19.3529M5.5 10.8824L13 17.9412M13 17.9412L20.5 10.8824M13 17.9412V1",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))}function l(e){var t=this,i=e.element,l=e.responsiveStyles,s=e.required,u=e.disabled,c=void 0!==u&&u,d=e.editMode,f=e.onChange,h=void 0===f?function(){}:f,p=e.initialFiles,v=void 0===p?[]:p,g=e.elementProps,m=e.children,w=i.servar,y=""!==w.name,b=w.metadata.multiple,x=(0,r.useRef)(null),_=(0,n.b)((0,r.useState)([]),2),C=_[0],k=_[1],j=(0,n.b)((0,r.useState)(-1),2),E=j[0],M=j[1],S=(0,n.b)((0,r.useState)(new Set),2),L=S[0],V=S[1];(0,r.useEffect)(function(){(0,n.a7)(C)&&(0,n.a7)(v)||k((0,n.a8)(v).filter(Boolean))},[v]),(0,r.useEffect)(function(){V(new Set)},[C.length]);var B=(0,n.a9)(C),I=C.length>0,z=b||!I,A=i.styles.hide_file_preview,D=(0,n.e)([],(0,n.b)(w.metadata.file_types),!1);w.metadata.custom_file_types&&D.push.apply(D,(0,n.e)([],(0,n.b)(w.metadata.custom_file_types.map(function(e){return".".concat(e)})),!1));var F=function(e,t){if(t.endsWith("/*")){var i,n=t.split("/")[0];return e.type.startsWith(n+"/")}if(t.includes("/"))return e.type===t;var r="."+(null===(i=e.name.split(".").pop())||void 0===i?void 0:i.toLowerCase());return t.toLowerCase()===r},T=function(e){if(0!==D.length){var t=D.flatMap(function(e){return e.split(",").map(function(e){return e.trim()})});if(e.filter(function(e){return!t.some(function(t){return F(e,t)})}).length>0)throw Error("Invalid file type. Allowed types: ".concat(D.join(", ")))}},P=w.max_length?1024*w.max_length:10485760,W=function(e){if(e.some(function(e){return e.size>P})){var t="";throw t=P<1024?"".concat(P," bytes"):P<=1048576?"".concat(Math.floor(P/1024)," kb"):"".concat(Math.floor(P/1048576)," mb"),Error("File exceeds max size of ".concat(t))}},H=function(e){return(0,n.k)(t,void 0,void 0,function(){var t,i,r,o,a,l,s,u;return(0,n.l)(this,function(d){if(c)return[2];t=Array.from(e),b||(t=[t[0]]);try{if(t.some(function(e){return!e||!(e instanceof File)||e.size<=0}))throw Error("Some files are invalid");T(t),W(t),i=A?0:C.length,t.length+i>20&&t.splice(20-i),r=t.map(function(e){return Promise.resolve(e)}),o=void 0,A?(o=r,a=0):(o=(0,n.e)((0,n.e)([],(0,n.b)(C),!1),(0,n.b)(r),!1),a=i),k(o),h(o,a),null===(l=x.current)||void 0===l||l.setCustomValidity(""),x.current&&(x.current.value="")}catch(e){null===(s=x.current)||void 0===s||s.setCustomValidity(e.message),null===(u=x.current)||void 0===u||u.reportValidity()}return[2]})})},R=(0,n._)((0,n._)({},n.o),l.getTarget("img")),q=i.properties.icon?(0,n.j)("img",{src:i.properties.icon,style:(0,n._)((0,n._)({},R),{maxWidth:"100%",height:"auto"}),alt:""}):(0,n.j)(o,{width:R.width&&"px"!==R.width?R.width:void 0,style:{maxHeight:"100%"}});return(0,n.a)("div",(0,n._)({css:(0,n._)({display:"flex",flexWrap:"wrap",position:"relative",pointerEvents:d?"none":"auto",width:"100%",height:"100%"},l.getTarget("fc"))},void 0===g?{}:g,{onDragOver:function(e){e.preventDefault(),e.stopPropagation()},onDrop:c?void 0:function(e){e.preventDefault(),e.stopPropagation();var t=e.dataTransfer.files;z&&H(t)}},{children:[m,!A&&B.map(function(e,i){var r=e.filename,o=e.thumbnail;return i<C.length?(0,n.a)("div",(0,n._)({css:(0,n._)((0,n._)({position:"relative",width:"100%",maxHeight:"100%",overflow:"hidden",display:"flex",justifyContent:"center",alignItems:"center",boxSizing:"border-box"},o?{}:{paddingLeft:"20px",paddingRight:"20px"}),l.getTarget("field")),onMouseEnter:function(){return M(i)},onMouseLeave:function(){return M(-1)}},{children:[E===i&&(0,n.j)("div",(0,n._)({css:{position:"absolute",margin:"auto",left:0,right:0,top:0,bottom:0,width:"48px",height:"48px",borderRadius:"8px",backgroundColor:"#3E414D80",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},onClick:function(){return(0,n.k)(t,void 0,void 0,function(){var e;return(0,n.l)(this,function(t){switch(t.label){case 0:return e=n.aa,[4,C[i]];case 1:return[2,e.apply(void 0,[t.sent()])]}})})}},{children:(0,n.j)(a,{})})),o&&!L.has(i)?(0,n.j)("img",{src:o,onError:function(){return V(function(e){return new Set(e).add(i)})},style:{width:"100%",height:"100%",objectFit:"contain"},alt:r||""}):(0,n.j)("span",(0,n._)({style:{height:"100%",width:"100%",wordBreak:"break-all",display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center"}},{children:r||"File"})),(0,n.j)("div",(0,n._)({css:{position:"absolute",top:"4px",right:"4px",color:"white",background:"#AAA",height:"16px",width:"16px",borderRadius:"50%",pointerEvents:c?"none":"auto",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center",transition:"0.2s ease all","&:hover":{backgroundColor:"#BBB"}},role:"button","aria-label":"Clear file",onClick:function(e){var t,r;e.stopPropagation(),null===(t=x.current)||void 0===t||t.setCustomValidity(""),k(r=(0,n.ac)(C,i)),h(r,-1)}},{children:(0,n.j)(n.ab,{fill:"white",width:12,height:12})}))]}),i):null}),(z||A)&&(0,n.a)("div",(0,n._)({onClick:function(){var e;(z||A)&&(c||null===(e=x.current)||void 0===e||e.click())},css:(0,n._)({position:"relative",pointerEvents:c?"none":"auto",cursor:"pointer",maxHeight:"100%",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",overflow:"hidden",boxSizing:"border-box",width:"100%"},l.getTarget("ac"))},{children:[q,y&&(0,n.j)("div",(0,n._)({css:l.getTarget("add")},{children:w.name}))]})),(0,n.j)("input",{id:w.key,name:w.key,ref:x,type:"file",onChange:function(e){var t=e.target.files;t&&z&&H(t)}
1,required:void 0!==s&&s&&!I,accept:D.join(",")||void 0,disabled:c,"aria-label":i.properties.aria_label,multiple:b,onFocus:n.i,style:{position:"absolute",pointerEvents:"none",opacity:0,top:0,left:0,width:"100%",height:"100%",zIndex:n.q-2}})]}))}i(97458),i(78520),i(43412),i(63730)}}]);

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.