1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[64841],{68791:(e,t,i)=>{"use strict";i.d(t,{$P:()=>w,Ay:()=>y,dS:()=>d,ge:()=>l});var n=i(7620),r=Object.defineProperty,h=(e,t,i)=>((e,t,i)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,"symbol"!=typeof t?t+"":t,i);let o={x:0,y:0,width:0,height:0,unit:"px"},a=(e,t,i)=>Math.min(Math.max(e,t),i),s=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function d(e,t,i,n){let r=w(e,i,n);return e.width&&(r.height=r.width/t),e.height&&(r.width=r.height*t),r.y+r.height>n&&(r.height=n-r.y,r.width=r.height*t),r.x+r.width>i&&(r.width=i-r.x,r.height=r.width/t),"%"===e.unit?c(r,i,n):r}function l(e,t,i){let n=w(e,t,i);return n.x=(t-n.width)/2,n.y=(i-n.height)/2,"%"===e.unit?c(n,t,i):n}function c(e,t,i){return"%"===e.unit?{...o,...e,unit:"%"}:{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/i*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/i*100:0}}function w(e,t,i){return e.unit?"px"===e.unit?{...o,...e,unit:"px"}:{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*i/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*i/100:0}:{...o,...e,unit:"px"}}function g(e,t,i,n,r,h=0,o=0,a=n,s=r){let d={...e},l=Math.min(h,n),c=Math.min(o,r),w=Math.min(a,n),p=Math.min(s,r);t&&(t>1?(c=(l=o?o*t:l)/t,w=a*t):(l=(c=h?h/t:c)*t,p=s/t)),d.y<0&&(d.height=Math.max(d.height+d.y,c),d.y=0),d.x<0&&(d.width=Math.max(d.width+d.x,l),d.x=0);let u=n-(d.x+d.width);u<0&&(d.x=Math.min(d.x,n-l),d.width+=u);let m=r-(d.y+d.height);if(m<0&&(d.y=Math.min(d.y,r-c),d.height+=m),d.width<l&&(("sw"===i||"nw"==i)&&(d.x-=l-d.width),d.width=l),d.height<c&&(("nw"===i||"ne"==i)&&(d.y-=c-d.height),d.height=c),d.width>w&&(("sw"===i||"nw"==i)&&(d.x-=w-d.width),d.width=w),d.height>p&&(("nw"===i||"ne"==i)&&(d.y-=p-d.height),d.height=p),t){let e=d.width/d.height;if(e<t){let e=Math.max(d.width/t,c);("nw"===i||"ne"==i)&&(d.y-=e-d.height),d.height=e}else if(e>t){let e=Math.max(d.height*t,l);("sw"===i||"nw"==i)&&(d.x-=e-d.width),d.width=e}}return d}let p={capture:!0,passive:!1},u=0,m=class e extends n.PureComponent{constructor(){super(...arguments),h(this,"docMoveBound",!1),h(this,"mouseDownOnCrop",!1),h(this,"dragStarted",!1),h(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),h(this,"componentRef",(0,n.createRef)()),h(this,"mediaRef",(0,n.createRef)()),h(this,"resizeObserver"),h(this,"initChangeCalled",!1),h(this,"instanceId",`rc-${u++}`),h(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),h(this,"onCropPointerDown",e=>{let{crop:t,disabled:i}=this.props,n=this.getBox();if(!t)return;let r=w(t,n.width,n.height);if(i)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let h=e.target.dataset.ord,o=e.clientX,a=e.clientY,s=r.x,d=r.y;if(h){let t=e.clientX-n.x,i=e.clientY-n.y,l=0,c=0;"ne"===h||"e"==h?(l=t-(r.x+r.width),c=i-r.y,s=r.x,d=r.y+r.height):"se"===h||"s"===h?(l=t-(r.x+r.width),c=i-(r.y+r.height),s=r.x,d=r.y):"sw"===h||"w"==h?(l=t-r.x,c=i-(r.y+r.height),s=r.x+r.width,d=r.y):("nw"===h||"n"==h)&&(l=t-r.x,c=i-r.y,s=r.x+r.width,d=r.y+r.height),o=s+n.x+l,a=d+n.y+c}this.evData={startClientX:o,startClientY:a,startCropX:s,startCropY:d,clientX:e.clientX,clientY:e.clientY,isResize:!!h,ord:h},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),h(this,"onComponentPointerDown",e=>{let{crop:t,disabled:i,locked:n,keepSelection:r,onChange:h}=this.props,o=this.getBox();if(i||n||r&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let a=e.clientX-o.x,s=e.clientY-o.y,d={unit:"px",x:a,y:s,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:a,startCropY:s,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,h(w(d,o.width,o.height),c(d,o.width,o.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),h(this,"onDocPointerMove",e=>{let t,{crop:i,disabled:n,onChange:r,onDragStart:h}=this.props,o=this.getBox();if(n||!i||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,h&&h(e));let{evData:a}=this;a.clientX=e.clientX,a.clientY=e.clientY,s(i,t=a.isResize?this.resizeCrop():this.dragCrop())||r(w(t,o.width,o.height),c(t,o.width,o.height))}),h(this,"onComponentKeyDown",t=>{let{crop:i,disabled:n,onChange:r,onComplete:h}=this.props;if(n)return;let o=t.key,s=!1;if(!i)return;let d=this.getBox(),l=this.makePixelCrop(d),g=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===o?(l.x-=g,s=!0):"ArrowRight"===o?(l.x+=g,s=!0):"ArrowUp"===o?(l.y-=g,s=!0):"ArrowDown"===o&&(l.y+=g,s=!0),s){t.cancelable&&t.preventDefault(),l.x=a(l.x,0,d.width-l.width),l.y=a(l.y,0,d.height-l.height);let e=w(l,d.width,d.height),i=c(l,d.width,d.height);r(e,i),h&&h(e,i)}}),h(this,"onHandlerKeyDown",(t,i)=>{let{aspect:n=0,crop:r,disabled:h,minWidth:o=0,minHeight:a=0,maxWidth:d,maxHeight:l,onCh
1ange:p,onComplete:u}=this.props,m=this.getBox();if(h||!r||"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();let y=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,x=g(function(e,t,i,n){let r={...e};return"ArrowLeft"===t?"nw"===n?(r.x-=i,r.y-=i,r.width+=i,r.height+=i):"w"===n?(r.x-=i,r.width+=i):"sw"===n?(r.x-=i,r.width+=i,r.height+=i):"ne"===n?(r.y+=i,r.width-=i,r.height-=i):"e"===n?r.width-=i:"se"===n&&(r.width-=i,r.height-=i):"ArrowRight"===t&&("nw"===n?(r.x+=i,r.y+=i,r.width-=i,r.height-=i):"w"===n?(r.x+=i,r.width-=i):"sw"===n?(r.x+=i,r.width-=i,r.height-=i):"ne"===n?(r.y-=i,r.width+=i,r.height+=i):"e"===n?r.width+=i:"se"===n&&(r.width+=i,r.height+=i)),"ArrowUp"===t?"nw"===n?(r.x-=i,r.y-=i,r.width+=i,r.height+=i):"n"===n?(r.y-=i,r.height+=i):"ne"===n?(r.y-=i,r.width+=i,r.height+=i):"sw"===n?(r.x+=i,r.width-=i,r.height-=i):"s"===n?r.height-=i:"se"===n&&(r.width-=i,r.height-=i):"ArrowDown"===t&&("nw"===n?(r.x+=i,r.y+=i,r.width-=i,r.height-=i):"n"===n?(r.y+=i,r.height-=i):"ne"===n?(r.y+=i,r.width-=i,r.height-=i):"sw"===n?(r.x-=i,r.width+=i,r.height+=i):"s"===n?r.height+=i:"se"===n&&(r.width+=i,r.height+=i)),r}(w(r,m.width,m.height),t.key,y,i),n,i,m.width,m.height,o,a,d,l);if(!s(r,x)){let e=c(x,m.width,m.height);p(x,e),u&&u(x,e)}}),h(this,"onDocPointerDone",e=>{let{crop:t,disabled:i,onComplete:n,onDragEnd:r}=this.props,h=this.getBox();this.unbindDocMove(),!(i||!t)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,r&&r(e),n&&n(w(t,h.width,h.height),c(t,h.width,h.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),h(this,"onDragFocus",()=>{var e;null==(e=this.componentRef.current)||e.scrollTo(0,0)})}get document(){return document}getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:i,width:n,height:r}=e.getBoundingClientRect();return{x:t,y:i,width:n,height:r}}componentDidUpdate(e){let{crop:t,onComplete:i}=this.props;if(i&&!e.crop&&t){let{width:e,height:n}=this.getBox();e&&n&&i(w(t,e,n),c(t,e,n))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,p),this.document.addEventListener("pointerup",this.onDocPointerDone,p),this.document.addEventListener("pointercancel",this.onDocPointerDone,p),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,p),this.document.removeEventListener("pointerup",this.onDocPointerDone,p),this.document.removeEventListener("pointercancel",this.onDocPointerDone,p),this.docMoveBound=!1)}getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),i=this.makePixelCrop(t),n=e.clientX-e.startClientX,r=e.clientY-e.startClientY;return i.x=a(e.startCropX+n,0,t.width-i.width),i.y=a(e.startCropY+r,0,t.height-i.height),i}getPointRegion(e,t,i,n){let r,{evData:h}=this,o=h.clientX-e.x,a=h.clientY-e.y;return r=n&&t?"nw"===t||"n"===t||"ne"===t:a<h.startCropY,(i&&t?"nw"===t||"w"===t||"sw"===t:o<h.startCropX)?r?"nw":"sw":r?"ne":"se"}resolveMinDimensions(e,t,i=0,n=0){let r=Math.min(i,e.width),h=Math.min(n,e.height);return t&&(r||h)?t>1?r?[r,r/t]:[h*t,h]:h?[h*t,h]:[r,r/t]:[r,h]}resizeCrop(){let{evData:t}=this,{aspect:i=0,maxWidth:n,maxHeight:r}=this.props,h=this.getBox(),[o,s]=this.resolveMinDimensions(h,i,this.props.minWidth,this.props.minHeight),d=this.makePixelCrop(h),l=this.getPointRegion(h,t.ord,o,s),c=t.ord||l,w=t.clientX-t.startClientX,p=t.clientY-t.startClientY;(o&&"nw"===c||"w"===c||"sw"===c)&&(w=Math.min(w,-o)),(s&&"nw"===c||"n"===c||"ne"===c)&&(p=Math.min(p,-s));let u={unit:"px",x:0,y:0,width:0,height:0};"ne"===l?(u.x=t.startCropX,u.width=w,i?u.height=u.width/i:u.height=Math.abs(p),u.y=t.startCropY-u.height):"se"===l?(u.x=t.startCropX,u.y=t.startCropY,u.width=w,i?u.height=u.width/i:u.he
1ight=p):"sw"===l?(u.x=t.startCropX+w,u.y=t.startCropY,u.width=Math.abs(w),i?u.height=u.width/i:u.height=p):"nw"===l&&(u.x=t.startCropX+w,u.width=Math.abs(w),i?(u.height=u.width/i,u.y=t.startCropY-u.height):(u.height=Math.abs(p),u.y=t.startCropY+p));let m=g(u,i,l,h.width,h.height,o,s,n,r);return i||e.xyOrds.indexOf(c)>-1?d=m:e.xOrds.indexOf(c)>-1?(d.x=m.x,d.width=m.width):e.yOrds.indexOf(c)>-1&&(d.y=m.y,d.height=m.height),d.x=a(d.x,0,h.width-d.width),d.y=a(d.y,0,h.height-d.height),d}renderCropSelection(){let{ariaLabels:t=e.defaultProps.ariaLabels,disabled:i,locked:r,renderSelectionAddon:h,ruleOfThirds:o,crop:a}=this.props,s=this.getCropStyle();if(a)return n.createElement("div",{style:s,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":t.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!i&&!r&&n.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},n.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),n.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),n.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),n.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),n.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":t.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"nw"),role:"button"}),n.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":t.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"n"),role:"button"}),n.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":t.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"ne"),role:"button"}),n.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":t.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"e"),role:"button"}),n.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":t.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"se"),role:"button"}),n.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":t.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"s"),role:"button"}),n.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":t.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"sw"),role:"button"}),n.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":t.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"w"),role:"button"})),h&&n.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:e=>e.stopPropagation()},h(this.state)),o&&n.createElement(n.Fragment,null,n.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),n.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){return w({...o,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:t,circularCrop:i,className:r,crop:h,disabled:o,locked:a,style:s,ruleOfThirds:d}=this.props,{cropIsActive:l,newCropIsBeingDrawn:c}=this.state,w=h?this.renderCropSelection():null,g=((...e)=>e.filter(e=>e&&"string"==typeof e).join(" "))("ReactCrop",r,l&&"ReactCrop--active",o&&"ReactCrop--disabled",a&&"ReactCrop--locked",c&&"ReactCrop--new-crop",h&&e&&"ReactCrop--fixed-aspect",h&&i&&"ReactCrop--circular-crop",h&&d&&"ReactCrop--rule-of-thirds",!this.dragStarted&&h&&!h.width&&!h.height&&"ReactCrop--invisible-crop",i&&"ReactCrop--no-animate");return n.createElement("div",{ref:this.componentRef,className:g,style:s},n.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},t),h?n.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},n.createElement("defs",null,n.createElement("mask",{id:`hole-${this.instanceId}`},n.createElement("rect",{width:"100%",height:"100%",fill:"white"}),i?n.createElement("ellipse",{cx:`${h.x+h.width/2}${h.unit}`,cy:`${h.y+h.height/2}${h.unit}`,rx:`${h.width/2}${h.unit}`,ry:`${h.height/2}${h.unit}`,fill:"black"}):n.createElement("rect",{x:`${h.x}${h.unit}`,y:`${h.y}${h.unit}`,width:`${h.width}${h.unit}`,height:`${h.height}${h.unit}`,fill:"black"}))),n.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,w)}};h(m,"xOrds",["e","w"]),h(m,"yOrds",["n","s"]),h(m,"xyOrds",["nw","ne","se","sw"]),h(m,"nudgeStep",1),h(m,"nudgeStepMedium",10),h(m,"nudgeStepLarge",100),h(m,"defaultProps",{ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}});let y=m},94731:()=>{}}]);
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.