1function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _assert_this_initialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function asyncGeneratorStep(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function _async_to_generator(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){asyncGeneratorStep(i,r,o,a,s,"next",e)}function s(e){asyncGeneratorStep(i,r,o,a,s,"throw",e)}a(void 0)})}}function _call_super(e,t,n){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,n||[],_get_prototype_of(e).constructor):t.apply(e,n))}function _class_call_check(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _create_class(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _define_property(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _get_prototype_of(e){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_get_prototype_of(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}function _non_iterable_rest(){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 _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_define_property(e,t,n[t])})}return e}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function _object_without_properties(e,t){if(null==e)return{};var n,r,o,i={};if("undefined"!=typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),o=0;o<n.length;o++)r=n[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++)r=n[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var n,r,o={},i=Object.getOwnPropertyNames(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}function _possible_constructor_return(e,t){return!t||"object"!==_type_of(t)&&"function"!=typeof t?_assert_this_initialized(e):t}function _set_prototype_of(e,t){return _set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_set_prototype_of(e,t)}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(e,t):void 0}}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}function _ts_generator(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:c(0)}),s(a,"throw",{value:c(1)}),s(a,"return",{value:c(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function c(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}!function(){try{var e="u">("undefined"==typeof window?"undefined":_type_of(window))?window:"u">("undefined"==typeof global?"undefined":_type_of(global))?global:"u">("undefined"==typeof globalThis?"undefined":_type_of(globalThis))?globalThis:"u">("undefined"==typeof self?"undefined":_type_of(self))?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bd0be87a-331c-4d1d-a0a5-9d7ca40a2c15",e._sentryDebugIdIdentifier="sentry-dbid-bd0be87a-331c-4d1d-a0a5-9d7ca40a2c15")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[32426],{5408:function(e,t,n){"use strict";var r=n(31827),o=n(63477),i=n(99195),a=function(e){var t=e.children,n=e.className,a=e.threshold,s=void 0===a?0:a,c=e.offsetTop,l=void 0===c?"0px":c,d=e.maxHeight,u=void 0===d?"auto":d,p=e["data-testid"],h=i.useRef(null),f=i.useCallback(function(){h.current&&(h.current.scrollTop=window.scrollY-s)},[s]);return i.useEffect(function(){return window.addEventListener("scroll",f),function(){window.removeEventListener("scroll",f)}},[f]),r.jsx("div",{ref:h,className:o.clsx(n,"bs-sticky"),style:{to
1p:l,height:u},"data-testid":p,children:t})};a.displayName="BsSticky",e.exports=a},6110:function(e,t,n){e=n.nmd(e);var r=n(80815),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},7937:function(e,t,n){!function(e,t){"use strict";var n=Object.defineProperty,r=function(e,t,r){var o;return(o="symbol"!=(void 0===t?"undefined":_type_of(t))?t+"":t)in e?n(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r},o={x:0,y:0,width:0,height:0,unit:"px"},i=function(e,t,n){return Math.min(Math.max(e,t),n)},a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(function(e){return e&&"string"==typeof e}).join(" ")},s=function(e,t){return e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit};function c(e,t,n){return"%"===e.unit?_object_spread_props(_object_spread({},o,e),{unit:"%"}):{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/n*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/n*100:0}}function l(e,t,n){return e.unit?"px"===e.unit?_object_spread_props(_object_spread({},o,e),{unit:"px"}):{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*n/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*n/100:0}:_object_spread_props(_object_spread({},o,e),{unit:"px"})}function d(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:r,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:o,l=_object_spread({},e),d=Math.min(i,r),u=Math.min(a,o),p=Math.min(s,r),h=Math.min(c,o);t&&(t>1?(u=(d=a?a*t:d)/t,p=s*t):(d=(u=i?i/t:u)*t,h=c/t)),l.y<0&&(l.height=Math.max(l.height+l.y,u),l.y=0),l.x<0&&(l.width=Math.max(l.width+l.x,d),l.x=0);var f=r-(l.x+l.width);f<0&&(l.x=Math.min(l.x,r-d),l.width+=f);var _=o-(l.y+l.height);if(_<0&&(l.y=Math.min(l.y,o-u),l.height+=_),l.width<d&&(("sw"===n||"nw"==n)&&(l.x-=d-l.width),l.width=d),l.height<u&&(("nw"===n||"ne"==n)&&(l.y-=u-l.height),l.height=u),l.width>p&&(("sw"===n||"nw"==n)&&(l.x-=p-l.width),l.width=p),l.height>h&&(("nw"===n||"ne"==n)&&(l.y-=h-l.height),l.height=h),t){var m=l.width/l.height;if(m<t){var b=Math.max(l.width/t,u);("nw"===n||"ne"==n)&&(l.y-=b-l.height),l.height=b}else if(m>t){var v=Math.max(l.height*t,d);("sw"===n||"nw"==n)&&(l.x-=v-l.width),l.width=v}}return l}function u(e,t,n,r){var o=_object_spread({},e);return"ArrowLeft"===t?"nw"===r?(o.x-=n,o.y-=n,o.width+=n,o.height+=n):"w"===r?(o.x-=n,o.width+=n):"sw"===r?(o.x-=n,o.width+=n,o.height+=n):"ne"===r?(o.y+=n,o.width-=n,o.height-=n):"e"===r?o.width-=n:"se"===r&&(o.width-=n,o.height-=n):"ArrowRight"===t&&("nw"===r?(o.x+=n,o.y+=n,o.width-=n,o.height-=n):"w"===r?(o.x+=n,o.width-=n):"sw"===r?(o.x+=n,o.width-=n,o.height-=n):"ne"===r?(o.y-=n,o.width+=n,o.height+=n):"e"===r?o.width+=n:"se"===r&&(o.width+=n,o.height+=n)),"ArrowUp"===t?"nw"===r?(o.x-=n,o.y-=n,o.width+=n,o.height+=n):"n"===r?(o.y-=n,o.height+=n):"ne"===r?(o.y-=n,o.width+=n,o.height+=n):"sw"===r?(o.x+=n,o.width-=n,o.height-=n):"s"===r?o.height-=n:"se"===r&&(o.width-=n,o.height-=n):"ArrowDown"===t&&("nw"===r?(o.x+=n,o.y+=n,o.width-=n,o.height-=n):"n"===r?(o.y+=n,o.height-=n):"ne"===r?(o.y+=n,o.width-=n,o.height-=n):"sw"===r?(o.x-=n,o.width+=n,o.height+=n):"s"===r?o.height+=n:"se"===r&&(o.width+=n,o.height+=n)),o}var p={capture:!0,passive:!1},h=0,f=function(e){function n(){var e;return _class_call_check(this,n),e=_call_super(this,n,arguments),r(e,"docMoveBound",!1),r(e,"mouseDownOnCrop",!1),r(e,"dragStarted",!1),r(e,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),r(e,"componentRef",t.createRef()),r(e,"mediaRef",t.createRef()),r(e,"resizeObserver"),r(e,"initChangeCalled",!1),r(e,"instanceId","rc-".concat(h++)),r(e,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),r(e,"onCropPointerDown",function(t){var n=e.props,r=n.crop,o=n.disabled,i=e.getBox();if(r){var a=l(r,i.width,i.height);if(!o){t.cancelable&&t.preventDefault(),e.bindDocMove(),e.componentRef.current.focus({preventScroll:!0});var s=t.target.dataset.ord,c=t.clientX,d=t.clientY,u=a.x,p=a.y;if(s){var h=t.clientX-i.x,f=t.clientY-i.y,_=0,m=0;"ne"===s||"e"==s?(_=h-(a.x+a.width),m=f-a.y,u=a.x,p=a.y+a.height):"se"===s||"s"===s?(_=h-(a.x+a.width),m=f-(a.y+a.height),u=a.x,p=a.y):"sw"===s||"w"==s?(_=h-a.x,m=f-(a.y+a.height),u=a.x+a.width,p=a.y):("nw"===s||"n"==s)&&(_=h-a.x,m=f-a.y,u=a.x+a.width,p=a.y+a.height),c=u+i.x+_,d=p+i.y+m}e.evData={startClientX:c,startClientY:d,startCropX:u,startCropY:p,clientX:t.clientX,clientY:t.clientY,isResize:!!s,ord:s},e.mouseDownOnCrop=!0,e.setState({cropIsActive:!0})}}}),r(e,"onComponentPointerDown",function(t){var n=e.props,r=n.crop,o=n.disabled,i=n.locked,a=n.keepSelection,s=n.onChange,d=e.getBox();if(!(o||i||a&&r)){t.cancelable&&t.preventDefault(),e.bindDocMove(),e.componentRef.current.focus({preventScroll:!0});var u=t.clientX-d.x,p=t.clientY-d.y,h={unit:"px",x:u,y:p,width:0,height:0};e.evData={startClientX:t.clientX,startClientY:t.clientY,startCropX:u,startCropY:p,clientX:t.clientX,clientY:t.clientY,isResize:!0},e.mouseDownOnCrop=!0,s(l(h,d.width,d.height),c(h,d.width,d.height)),e.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}}),r(e,"onDocPointerMove",function(t){var n,r=e.props,o=r.crop,i=r.disabled,a=r.onChange,d=r.onDragStart,u=e.getBox();if(!i&&o&&e.mouseDownOnCrop){t.cancelable&&t.preventDefault(),e.dragStarted||(e.dragStarted=!0,d&&d(t));var p=e.evData;p.clientX=t.clientX,p.clientY=t.clientY,s(o,n=p.isResize?e.resizeCrop():e.dragCrop())||a(l(n,u.width,u.height),c(n,u.width,u.height))}}),r(e,"onComponentKeyDown",function(t){var r=e.props,o=r.crop,a=r.disabled,s=r.onChange,d=r.onComplete;if(!a){var u=t.key,p=!1;if(o){var h=e.getBox(),f=e.makePixelCrop(h),_=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?n.nudgeStepLarge:t.shiftKey?n.nudgeStepMedium:n.nudgeStep;if("ArrowLeft"===u?(f.x-=_,p=!0):"ArrowRight"===u?(f.x+=_,p=!0):"ArrowUp"===u?(f.y-=_,p=!0):"ArrowDown"===u&&(f.y+=_,p=!0),p){t.cancelable&&t.preventDefault(),f.x=i(f.x,0,h.width-f.width),f.y=i(f.y,0,h.height-f.height);var m=l(f,h.width,h.height),b=c(f,h.width,h.height);s(m,b),d&&d(m,b)}}}}),r(e,"onHandlerKeyDown",function(t,r){var o=e.props,i=o.aspect,a=void 0===i?0:i,p=o.crop,h=o.disabled,f=o.minWidth,_=void 0===f?0:f,m=o.minHeight,b=void 0===m?0:m,v=o.maxWidth,y=o.maxHeight,g
1=o.onChange,w=o.onComplete,x=e.getBox();if(!h&&p&&("ArrowUp"===t.key||"ArrowDown"===t.key||"ArrowLeft"===t.key||"ArrowRight"===t.key)){t.stopPropagation(),t.preventDefault();var C=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?n.nudgeStepLarge:t.shiftKey?n.nudgeStepMedium:n.nudgeStep,j=d(u(l(p,x.width,x.height),t.key,C,r),a,r,x.width,x.height,_,b,v,y);if(!s(p,j)){var k=c(j,x.width,x.height);g(j,k),w&&w(j,k)}}}),r(e,"onDocPointerDone",function(t){var n=e.props,r=n.crop,o=n.disabled,i=n.onComplete,a=n.onDragEnd,s=e.getBox();e.unbindDocMove(),!o&&r&&e.mouseDownOnCrop&&(e.mouseDownOnCrop=!1,e.dragStarted=!1,a&&a(t),i&&i(l(r,s.width,s.height),c(r,s.width,s.height)),e.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),r(e,"onDragFocus",function(){var t;null==(t=e.componentRef.current)||t.scrollTo(0,0)}),e}return _inherits(n,e),_create_class(n,[{key:"document",get:function(){return document}},{key:"getBox",value:function(){var e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};var t=e.getBoundingClientRect();return{x:t.x,y:t.y,width:t.width,height:t.height}}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.crop,r=t.onComplete;if(r&&!e.crop&&n){var o=this.getBox(),i=o.width,a=o.height;i&&a&&r(l(n,i,a),c(n,i,a))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}},{key:"bindDocMove",value:function(){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)}},{key:"unbindDocMove",value:function(){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)}},{key:"getCropStyle",value:function(){var e=this.props.crop;if(e)return{top:"".concat(e.y).concat(e.unit),left:"".concat(e.x).concat(e.unit),width:"".concat(e.width).concat(e.unit),height:"".concat(e.height).concat(e.unit)}}},{key:"dragCrop",value:function(){var e=this.evData,t=this.getBox(),n=this.makePixelCrop(t),r=e.clientX-e.startClientX,o=e.clientY-e.startClientY;return n.x=i(e.startCropX+r,0,t.width-n.width),n.y=i(e.startCropY+o,0,t.height-n.height),n}},{key:"getPointRegion",value:function(e,t,n,r){var o,i=this.evData,a=i.clientX-e.x,s=i.clientY-e.y;return o=r&&t?"nw"===t||"n"===t||"ne"===t:s<i.startCropY,(n&&t?"nw"===t||"w"===t||"sw"===t:a<i.startCropX)?o?"nw":"sw":o?"ne":"se"}},{key:"resolveMinDimensions",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=Math.min(n,e.width),i=Math.min(r,e.height);return t&&(o||i)?t>1?o?[o,o/t]:[i*t,i]:i?[i*t,i]:[o,o/t]:[o,i]}},{key:"resizeCrop",value:function(){var e=this.evData,t=this.props,r=t.aspect,o=void 0===r?0:r,a=t.maxWidth,s=t.maxHeight,c=this.getBox(),l=_sliced_to_array(this.resolveMinDimensions(c,o,this.props.minWidth,this.props.minHeight),2),u=l[0],p=l[1],h=this.makePixelCrop(c),f=this.getPointRegion(c,e.ord,u,p),_=e.ord||f,m=e.clientX-e.startClientX,b=e.clientY-e.startClientY;(u&&"nw"===_||"w"===_||"sw"===_)&&(m=Math.min(m,-u)),(p&&"nw"===_||"n"===_||"ne"===_)&&(b=Math.min(b,-p));var v={unit:"px",x:0,y:0,width:0,height:0};"ne"===f?(v.x=e.startCropX,v.width=m,v.height=o?v.width/o:Math.abs(b),v.y=e.startCropY-v.height):"se"===f?(v.x=e.startCropX,v.y=e.startCropY,v.width=m,v.height=o?v.width/o:b):"sw"===f?(v.x=e.startCropX+m,v.y=e.startCropY,v.width=Math.abs(m),v.height=o?v.width/o:b):"nw"===f&&(v.x=e.startCropX+m,v.width=Math.abs(m),o?(v.height=v.width/o,v.y=e.startCropY-v.height):(v.height=Math.abs(b),v.y=e.startCropY+b));var y=d(v,o,f,c.width,c.height,u,p,a,s);return o||n.xyOrds.indexOf(_)>-1?h=y:n.xOrds.indexOf(_)>-1?(h.x=y.x,h.width=y.width):n.yOrds.indexOf(_)>-1&&(h.y=y.y,h.height=y.height),h.x=i(h.x,0,c.width-h.width),h.y=i(h.y,0,c.height-h.height),h}},{key:"renderCropSelection",value:function(){var e=this,r=this.props,o=r.ariaLabels,i=void 0===o?n.defaultProps.ariaLabels:o,a=r.disabled,s=r.locked,c=r.render
1SelectionAddon,l=r.ruleOfThirds,d=r.crop,u=this.getCropStyle();if(d)return t.createElement("div",{style:u,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":i.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!a&&!s&&t.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},t.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),t.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),t.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),t.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),t.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":i.nwDragHandle,onKeyDown:function(t){return e.onHandlerKeyDown(t,"nw")},role:"button"}),t.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":i.nDragHandle,onKeyDown:function(t){return e.onHandlerKeyDown(t,"n")},role:"button"}),t.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":i.neDragHandle,onKeyDown:function(t){return e.onHandlerKeyDown(t,"ne")},role:"button"}),t.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":i.eDragHandle,onKeyDown:function(t){return e.onHandlerKeyDown(t,"e")},role:"button"}),t.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":i.seDragHandle,onKeyDown:function(t){return e.onHandlerKeyDown(t,"se")},role:"button"}),t.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":i.sDragHandle,onKeyDown:function(t){return e.onHandlerKeyDown(t,"s")},role:"button"}),t.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":i.swDragHandle,onKeyDown:function(t){return e.onHandlerKeyDown(t,"sw")},role:"button"}),t.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":i.wDragHandle,onKeyDown:function(t){return e.onHandlerKeyDown(t,"w")},role:"button"})),c&&t.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:function(e){return e.stopPropagation()}},c(this.state)),l&&t.createElement(t.Fragment,null,t.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),t.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}},{key:"makePixelCrop",value:function(e){return l(_object_spread({},o,this.props.crop||{}),e.width,e.height)}},{key:"render",value:function(){var e=this.props,n=e.aspect,r=e.children,o=e.circularCrop,i=e.className,s=e.crop,c=e.disabled,l=e.locked,d=e.style,u=e.ruleOfThirds,p=this.state,h=p.cropIsActive,f=p.newCropIsBeingDrawn,_=s?this.renderCropSelection():null,m=a("ReactCrop",i,h&&"ReactCrop--active",c&&"ReactCrop--disabled",l&&"ReactCrop--locked",f&&"ReactCrop--new-crop",s&&n&&"ReactCrop--fixed-aspect",s&&o&&"ReactCrop--circular-crop",s&&u&&"ReactCrop--rule-of-thirds",!this.dragStarted&&s&&!s.width&&!s.height&&"ReactCrop--invisible-crop",o&&"ReactCrop--no-animate");return t.createElement("div",{ref:this.componentRef,className:m,style:d},t.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},r),s?t.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},t.createElement("defs",null,t.createElement("mask",{id:"hole-".concat(this.instanceId)},t.createElement("rect",{width:"100%",height:"100%",fill:"white"}),o?t.createElement("ellipse",{cx:"".concat(s.x+s.width/2).concat(s.unit),cy:"".concat(s.y+s.height/2).concat(s.unit),rx:"".concat(s.width/2).concat(s.unit),ry:"".concat(s.height/2).concat(s.unit),fill:"black"}):t.createElement("rect",{x:"".concat(s.x).concat(s.unit),y:"".concat(s.y).concat(s.unit),width:"".concat(s.width).concat(s.unit),height:"".concat(s.height).concat(s.unit),fill:"black"}))),t.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:"url(#hole-".concat(this.instanceId,")")})):void 0,_)}}]),n}(t.PureComponent);r(f,"xOrds",["e","w"]),r(f,"yOrds",["n","s"]),r(f,"xyOrds",["nw","ne","se","sw"]),r(f,"nudgeStep",1),r(f,"nudgeStepMedium",10),r(f,"nudgeStepLarge",100),r(f,"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"}}),e.Component=f,e.ReactCrop=f,e.areCropsEqual=s,e.centerCrop=function(e,t,n){var r=l(e,t,n);return r.x=(t-r.width)/2,r.y=(n-r.height)/2,"%"===e.unit?c(r,t,n):r},e.clamp=i,e.cls=a,e.containCrop=d,e.convertToPercentCrop=c,e.convertToPixelCrop=l,e.default=f,e.defaultCrop=o,e.makeAspectCrop=function(e,t,n,r){var o=l(e,n,r);return e.width&&(o.height=o.width/t),e.height&&(o.width=o.height*t),o.y+o.height>r&&(o.height=r-o.y,o.width=o.height*t),o.x+o.width>n&&(o.width=n-o.x,o.height=o.width/t),"%"===e.unit?c(o,n,r):o},e.nudgeCrop=u,Object.defineProperties(e,_define_property({__esModule:{value:!0}},Symbol.toStringTag,{value:"Module"}))}
1(t,n(99195))},13227:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},14701:function(e,t,n){var r=n(74687),o=n(36886),i=n(84745),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):a.test(e)?NaN:+e}},16553:function(e,t,n){"use strict";var r=n(31827),o=n(63477),i=n(82669),a=n(7937),s=n(99195),c=s.forwardRef(function(e,t){var n=e.image,c=e.aspect,l=e.className,d=e.onComplete,u=e.defaultCrop,p=e.disabled,h=void 0!==p&&p,f=e.memeType,_=void 0===f?"image/png":f,m=e.blurBackground,b=void 0!==m&&m,v=e["data-testid"],y=_sliced_to_array(s.useState(!0),2),g=y[0],w=y[1],x=s.useRef(null),C=s.useRef(null),j=s.useRef(null),k=s.useRef(null),O=_sliced_to_array(s.useState({width:0,height:0}),2),E=O[0],D=O[1],R=_sliced_to_array(s.useState({width:0,height:0}),2),P=R[0],N=R[1],I=_sliced_to_array(s.useState(u),2),T=I[0],M=I[1],S=_sliced_to_array(s.useState(),2),L=S[0],A=S[1],B=s.useCallback(function(){var e,t=null===(e=k.current)||void 0===e?void 0:e.getContext("2d"),n=C.current;if(!k.current||!t||!n)throw Error("context or image dose not exist");if(!L)throw Error("please crop image");var r=n.naturalWidth/n.width,o=n.naturalHeight/n.height;k.current.width=Math.floor(L.width*r),k.current.height=Math.floor(L.height*o),t.drawImage(n,Math.floor(L.x*r),Math.floor(L.y*o),k.current.width,k.current.height,0,0,k.current.width,k.current.height)},[L,n]),H=s.useCallback(function(e){return new Promise(function(t,n){try{var r;B();var o=null!=e?e:"image/png"===_?void 0:.92;null===(r=k.current)||void 0===r||r.toBlob(function(e){t(e)},_,o)}catch(e){n(e)}})},[B,_]),U=s.useCallback(function(){return new Promise(function(e,t){try{var n;B(),e(null===(n=k.current)||void 0===n?void 0:n.toDataURL())}catch(e){t(e)}})},[B]),V=s.useCallback(function(){return T},[T]);return s.useImperativeHandle(t,function(){return{getCropDimensions:V,reactCrop:j.current,getResultAsBlob:H,getResultAsDataURL:U}},[V,H,U]),s.useLayoutEffect(function(){x.current&&D({width:x.current.clientWidth,height:x.current.clientHeight})},[]),s.useEffect(function(){!u||P.width<=0||P.height<=0||(M(u),A(u))},[u]),s.useEffect(function(){w(!0),M(void 0),A(void 0)},[n]),r.jsxs("div",{ref:x,className:o.clsx("bs-image-crop__container",l),"data-testid":v,children:[r.jsx("canvas",{ref:k,style:{display:"none"}}),b&&r.jsx("img",{src:n,alt:"bg",className:"bs-image-crop__bg-image"}),g&&r.jsx(i,{size:"xl",className:"bs-image-crop__loading"}),r.jsx(a.ReactCrop,{ref:j,crop:T,ruleOfThirds:!0,keepSelection:!0,minWidth:100,minHeight:100,aspect:c,disabled:h,onChange:function(e){return M(e)},onComplete:function(e){A(e),null==d||d()},className:"ReactCrop--no-animate bs-image-crop__cropper",style:{width:P.width,height:P.height},children:r.jsx("img",{alt:"crop",src:n,ref:C,onLoad:function(e){var t,n,r,o=e.currentTarget.naturalWidth,i=e.currentTarget.naturalHeight,s=o/i,l=E.width/E.height;(o>=E.width||i>=E.height)&&(l>s?(o=Math.floor(E.height*s),i=E.height):(o=E.width,i=Math.floor(E.width/s))),M(u||(t=o,n=i,r=c||o/i,a.centerCrop(a.makeAspectCrop({unit:"%",width:100},r,t,n),t,n))),N({width:o,height:i}),w(!1)},className:"bs-image-crop__image"},n)})]})});c.displayName="BsImageCrop",e.exports=c},19355:function(e,t,n){"use strict";var r=n(31827),o=n(63477),i=n(49137),a=n(47072),s=n(99195),c=n(89570),l=n(23177),d=n(2796),u=n(90327),p=n(82669),h=n(90894);n(96131),n(46312),n(43206),n(13545),n(71126);var f=function(e){var t,n,f,_,m=e.value,b=e.onOpen,v=e.append,y=e.onClose,g=e.options,w=e.onCh
1ange,x=e.title,C=void 0===x?"":x,j=e.label,k=void 0===j?"":j,O=e.error,E=void 0===O?"":O,D=e.inputProps,R=e.modalProps,P=e.size,N=void 0===P?"md":P,I=e.caption,T=void 0===I?"":I,M=e.defaultValue,S=e.filterMethod,L=e.searchMethod,A=e.onOptionClick,B=e.chipsComponent,H=e.nested,U=void 0!==H&&H,V=e.inputComponent,K=e.modalTitle,W=void 0===K?"":K,Y=e.multiple,z=void 0===Y||Y,X=e.valueProp,G=void 0===X?"id":X,F=e.disabled,q=void 0!==F&&F,$=e.placeholder,Q=void 0===$?"":$,Z=e.isLoading,J=void 0!==Z&&Z,ee=e.clearable,te=void 0!==ee&&ee,ne=e.showChips,re=void 0!==ne&&ne,oe=e.filterable,ie=void 0!==oe&&oe,ae=e.dropdownClass,se=void 0===ae?"":ae,ce=e.maxItemsInText,le=void 0===ce?5:ce,de=e.labelProp,ue=void 0===de?"title":de,pe=e.searchLabel,he=void 0===pe?"جستجÙ":pe,fe=e.searchPlaceholder,_e=void 0===fe?"":fe,me=e.footerButtonSize,be=void 0===me?"lg":me,ve=e.showFooterButtons,ye=void 0!==ve&&ve,ge=e["data-testid"],we=e.cancelButtonLabel,xe=void 0===we?"Ø§ÙØµØ±Ø§Ù":we,Ce=e.confirmButtonLabel,je=void 0===Ce?"تاÛÛØ¯":Ce,ke=e.loadingText,Oe=void 0===ke?"ÙØ·Ùا صبر Ú©ÙÛØ¯ ...":ke,Ee=e.noItemText,De=void 0===Ee?"ÙÛÚ Ù
ÙØ±Ø¯Û Ø¬ÙØª Ø§ÙØªØ®Ø§Ø¨ ÙØ¬Ùد ÙØ¯Ø§Ø±Ø¯":Ee,Re=e.noResultComponent,Pe=void 0===Re?"گزÛÙÙ Ø§Û Ø¨Ø§ اÛÙ Ù
شخصات ÙØ¬Ùد ÙØ¯Ø§Ø±Ø¯":Re,Ne=s.useId(),Ie=_sliced_to_array(s.useState(!1),2),Te=Ie[0],Me=Ie[1],Se=_sliced_to_array(s.useState(""),2),Le=Se[0],Ae=Se[1],Be=z?h:c,He=_sliced_to_array(a.useUncontrolled({value:m,onChange:w,defaultValue:M,finalValue:[]}),2),Ue=He[0],Ve=He[1],Ke=z?Ue:[Ue],We=(U?g.flatMap(function(e){return(null==e?void 0:e.children)||[]}):g).filter(function(e){return Ke.includes(null==e?void 0:e.id)}),Ye=We.length>0?(f=(n=(t=We.map(function(e){return e.title})).length)-le,_="",n>le+1&&(t=t.slice(0,le),_=1===le?"".concat(f," Ù
ÙØ±Ø¯ "):" Ù ".concat(f," Ù
ÙØ±Ø¯ دÛگر ")),t.join("Ø ")+_):"",ze=We.length>0?_to_consumable_array(We):[],Xe=re&&z&&ze.length>0,Ge=te&&ze.length>0&&!q,Fe=s.useMemo(function(){return function(e,t){var n=t.labelProp,r=t.valueProp,o=t.uniqId,i=Object.assign([],e);return i.some(function(e){return Array.isArray(e.children)})||(i=[{title:"",id:o,children:e}]),i.map(function(e){return{children:(e.children||[]).map(function(e){return _object_spread_props(_object_spread({},e),{title:e[n||"title"],id:e[r||"id"]})}),id:e.id||o,title:e.title||"بدÙÙ Ø¯Ø³ØªÙ Ø¨ÙØ¯Û"}})}(g,{labelProp:ue,valueProp:G,uniqId:Ne})},[g,ue,G,Ne]),qe=s.useMemo(function(){return Le?function(e){var t=e.val,n=e.filterable,r=e.searchQuery,o=e.searchMethod,i=e.filterMethod,a=e.localOptionsGroup,s=_to_consumable_array(a);if(n&&r){var c=o?function(e){return o(e,t)}:function(e){var n;return null==e||null===(n=e.title)||void 0===n?void 0:n.toLocaleLowerCase().includes(t)};s=a.map(function(e){var n=(null==e?void 0:e.children)||[],r=i?i(e.children,t):n.filter(function(e){return c(e)});return _object_spread_props(_object_spread({},e),{children:r})})}return s.filter(function(e){var t;return null==e||null===(t=e.children)||void 0===t?void 0:t.length})}({filterable:ie,searchQuery:Le,searchMethod:L,filterMethod:S,val:Le,localOptionsGroup:Fe}):Fe},[ie,S,Fe,L,Le]),$e=function(){Me(!1),null==y||y()},Qe=r.jsx("i",{role:"button",tabIndex:0,className:"bs-select__clear-btn bi-close","aria-label":"clear item",onClick:function(e){e.stopPropagation(),Ve([])}}),Ze=_object_spread({size:N,title:C,label:k,error:E,caption:T,disabled:q,placeholder:Q,readonly:!0,suffix:Ge&&Qe},D),Je=ye&&r.jsxs("div",{className:"bs-select__footer",children:[r.jsx(u,{fullWidth:!0,size:be,label:je,onClick:$e}),r.jsx(u,{fullWidth:!0,color:"secondary",variant:"outline",size:be,label:xe,onClick:function(){Ve([]),$e()}})]}),et=o.clsx(["bs-select__wrapper",{"bs-select__wrapper--open":Te,"bs-select__wrapper--single":!z,"bs-select__wrapper--multiple":z,"bs-select__wrapper--disabled":q,"bs-select__wrapper--clearable":te,"bs-select__wrapper--filterable":ie}]),tt=function(){q||(Me(!0),null==b||b())};return r.jsxs("div",{className:et,"data-testid":ge,children:[r.jsx("div",{role:"button",tabIndex:0,onClick:tt,onKeyDown:tt,children:V||r.jsx(l,_object_spread({value:Ye},Ze))}),Xe&&r.jsx("div",{className:"bs-select__chips bs-select__outer-chips",children:B||ze.map(function(e){return r.jsx(i,{className:"bs-select__chips-item",label:"".concat(e.title),onClose:function(){Ve(ze.filter(function(t){return t.id!==e.id}).map(function(e){return e.id}))}},e.id)})}),r.jsx("div",{className:o.clsx(["bs-select__dropdown",se]),children:r.jsxs(d,_object_spread_props(_object_spread({size:"sm",show:Te,title:W,onClose:$e,hideOtherModals:!1,footerComponent:Je},R),{children:[ie&&r.jsx("div",{className:"bs-select__filter-input",children:r.jsx(l,{placeholder:_e,label:he,value:Le,"suffix-icon":"bi-search",onChange:function(e){Ae(e.target.value)}})}),r.jsx("div",{className:"bs-select__dropdown-inner custom-scrollbar",children:J&&r.jsxs("div",{className:"bs-select__loading",children:[r.jsx(p,{}),!!Oe&&r.jsx("span",{className:"bs-select__loading-text",children:Oe})]})}),r.jsx("div",{className:"bs-select__dropdown",children:qe.length>0?r.jsxs(r.Fragment,{children:[qe.map(function(e){return r.jsxs("div",{children:[U&&r.jsx("p",{className:"bs-select__dropdown-group-title",children:e.title}),!!e.children&&e.children.map(function(e){var t;return r.jsx("div",{className:"bs-select__dropdown-item",children:r.jsx(Be,{checked:Ke.includes(e.id),value:e.id,label:e.title,onChange:(t=e.id,function(e){var n=e.target.checked;if(z){var r=n?_to_consumable_array(Ue).concat([t]):Ue.filter(function(e){return e!==t});null==Ve||Ve(r)}else n&&(Ve(t),ye||Me(!1));null==A||A(t)})})},e.id)})]},e.id)}),v]}):r.jsx("div",{children:Le?Pe:De})})]}))})]})};f.displayName="BsSelect",e.exports=f},21948:function(e,t,n){"use strict";var r=n(31827),o=n(63477),i=n(99195),a=n(47072),s=function(e){var t=e.show,n=e.header,s=e.children,c=e.disabled,l=e.onChange,d=e.className,u=e.headerClass,p=e.contentClass,h=e.defaultValue,f=e.maxHeight,_=void 0===f?1e3:f,m=e["data-testid"],b=i.useRef(null),v=_sliced_to_array(i.useState(_),2),y=v[0],g=v[1],w=_sliced_to_array(a.useUncontrolled({onChange:l,value:t,defaultValue:h}),2),x=w[0],C=w[1],j=function(){c||C(!x)};a.useIsomorphicEffect(function(){var e,t=b.current;if(!t)return function(){};var n=function(){g(t.scrollHeight)};return n(),"u">("undefined"==typeof ResizeObserver?"undefined":_type_of(ResizeObserver))&&(e=new ResizeObserver(n)).observe(t),function(){null==e||e.disconnect()}},[]);var k=Math.min(Math.max(y/2,200),750);return r.jsxs("div",{className:o.clsx("bs-collapse",{"bs-collapse--disabled":c},d),"data-testid":m,children:[r.jsxs("div",{role:"button",tabIndex:0,onClick:j,onKeyDown:j,className:o.clsx("bs-collapse__header",u),children:[r.jsx("div",{children:n}),r.jsx("i",{className:o.clsx("bi-angle-down bs-collapse__icon",{rotated:x})})]}),r.jsx("div",{className:"bs-collapse__content-wrapper",style:{transitionDuration:"".concat(k,"ms"),maxHeight:x?"".concat(y,"px"):"0px"},children:r.jsx("div",{ref:b,className:o.clsx("bs-collapse__content",p),children:s})})]})};s.displayName="BsCollapse",e.exports=s},26999:function(e,t,n){"use strict";var r,o=function(e,t,n){if(g.randomUUID&&!t&&!e)return g.randomUUID();var o=(e=e||{}).random||(e.rng||function(){if(!r&&!(r="u">("undefined"==typeof crypto?"undefined":_type_of(crypto))&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(b)})();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=o[i];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return v[e[t+0]]+v[e[t+1]]+v[e[t+2]]+v[e[t+3]]+"-"+v[e[t+4]]+v[e[t+5]]+"-"+v[e[t+6]]+v[e[t+7]]+"-"+v[e[t+8]]+v[e[t+9]]+"-"+v[e[t+10]]+v[e[t+11]]+v[e[t+12]]+v[e[t+13]]+v[e[t+14]]+v[e[t+15]]}(o)},i=n(31827),a=n(63477),s=n(46312),c=n(96131),l=n(2796),d=n(40618),u=n(90327),p=n(82669),h=n(41749),f=n(47072),_=n(16553),m=n(99195);n(43206),n(13545),n(71126),n(96600),n(7937);for(var b=new Uint8Array(16),v=[],y=0;y<256;++y)v.push((y+256).toString(16).slice(1));var g={randomUUID:"u">("undefined"==typeof crypto?"undefined":_type_of(crypto))&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};e.exports=function(e){var t,n,r,b,v,y=e.show,g=e.isPc,w=e.files,x=e.aspect,C=e.onClose,j=e.onSubmit,k=e.fileType,O=e.maxPhotosCount,E=e.maxVideosCount,D=e["data-testid"],R=m.useRef(null),P=m.useRef(null),N=m.useRef(null),I=m.useRef(null),T=_sliced_to_array(m.useState(0),2),M=T[0],S=T[1],L=_sliced_to_array(m.useState(!1),2),A=L[0],B=L[1],H=_sliced_to_array(m.useState([]),2),U=H[0],V=H[1],K=_sliced_to_array(m.useState(0),2),W=K[0],Y=K[1],z=_sliced_to_array(m.useState(!1),2),X=z[0],G=z[1],F=_sliced_to_array(m.useState(!0),2),q=F[0],$=F[1],Q=_sliced_to_array(m.useState(!1),2),Z=Q[0],J=Q[1],ee=_sliced_to_array(m.useState(!1),2),te=ee[0],ne=ee[1],re=_sliced_to_array(m.useState(!1),2),oe=re[0],ie=re[1],ae=_sliced_to_array(m.useState(!1),2),se=ae[0],ce=ae[1],le=_sliced_to_array(m.useState("PREVIEW"),2),de=le[0],ue=le[1],pe=m.useMemo(function(){return"PREVIEW"===de?"Ø§ÙØªØ®Ø§Ø¨":"E
1DIT_PHOTO"===de||"EDIT_VIDEO"===de?"ÙÛØ±Ø§ÛØ´":"CROP_PHOTO"===de?"برش":"ROTATE_PHOTO"===de?"ÚØ±Ø®Ø´":""},[de]),he=m.useMemo(function(){if(void 0===O&&void 0===E)return!0;var e=0,t=0;return U.forEach(function(n){"image"===n.type.category?e++:"video"===n.type.category&&t++}),"number"==typeof O&&"number"==typeof E?e<O||t<E:"number"==typeof O?e<O:"number"!=typeof E||t<E},[O,E,U]),fe=m.useCallback(function(){w&&0!==w.length?(V(Array.from(w).map(function(e){var t=e.type.split("/"),n=new Blob([e],{type:e.type}),r=URL.createObjectURL(n);return{id:o(),name:e.name,lastModified:e.lastModified,type:{mime:e.type,category:t[0],extension:t[1]},versions:{draft:{src:r,blob:n},current:{src:r,blob:n},original:{src:r,blob:n}}}})),$(!1)):V([])},[w]),_e=m.useCallback(function(){U&&0!==U.length&&(U.forEach(function(e){URL.revokeObjectURL(e.versions.original.src),URL.revokeObjectURL(e.versions.current.src),URL.revokeObjectURL(e.versions.draft.src)}),V([]),B(!1),J(!1),$(!0),ne(!1),ce(!1),ue("PREVIEW"))},[U]),me=m.useCallback(function(e){return _async_to_generator(function(){var t,n;return _ts_generator(this,function(r){switch(r.label){case 0:return(t=e.target.files)&&0!==t.length?(V(function(e){return _to_consumable_array(e).concat(_to_consumable_array(Array.from(t).map(function(e){var t=e.type.split("/"),n=new Blob([e],{type:e.type}),r=URL.createObjectURL(n);return{id:o(),name:e.name,lastModified:e.lastModified,type:{mime:e.type,category:t[0],extension:t[1]},versions:{draft:{src:r,blob:n},current:{src:r,blob:n},original:{src:r,blob:n}}}})))}),n=(null==w?void 0:w.length)||0,Y(U.length-1+n),[4,c.sleep(0)]):[2];case 1:return r.sent(),R.current&&(R.current.scrollLeft=-5e3),[2]}})})()},[U]),be=m.useCallback(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return _async_to_generator(function(){return _ts_generator(this,function(n){switch(n.label){case 0:return 1!==U.length||t?te?(ne(!1),[4,c.sleep(350)]):[3,2]:[3,3];case 1:n.sent(),n.label=2;case 2:return 1===U.length?null==C?void 0:C():(V(function(t){var n=_to_consumable_array(t);return n.splice(e,1),n}),Y(e-1>-1?e-1:0)),[3,4];case 3:ne(!0),n.label=4;case 4:return[2]}})})()},[U,te,C]),ve=m.useCallback(function(){return _async_to_generator(function(){var e,t,n,r;return _ts_generator(this,function(o){switch(o.label){case 0:return J(!0),[4,null===(e=P.current)||void 0===e?void 0:e.getResultAsBlob()];case 1:return n=o.sent(),r=null===(t=P.current)||void 0===t?void 0:t.getCropDimensions(),n&&V(function(e){var t=_to_consumable_array(e);return t[W].crop=r,t[W].versions.draft={blob:n,src:URL.createObjectURL(n)},t}),B(!0),ue("EDIT_PHOTO"),J(!1),[2]}})})()},[W]),ye=m.useCallback(function(){ie(!0);var e=N.current,t=I.current,n=null==t?void 0:t.getContext("2d");if(e&&t&&n){var r=e.naturalWidth,o=e.naturalHeight,i=M%360,a=r,s=o;90!==i&&270!==i||(a=o,s=r),t.width=a,t.height=s,n.save(),n.translate(a/2,s/2),n.rotate(i*Math.PI/180),n.drawImage(e,-r/2,-o/2,r,o),n.restore(),t.toBlob(function(e){e&&V(function(t){var n=_to_consumable_array(t),r=URL.createObjectURL(e);return n[W].crop=void 0,n[W].versions.draft={blob:e,src:r},n}),B(!0),ue("EDIT_PHOTO"),S(0),ie(!1)})}},[M,W]),ge=m.useCallback(function(){S(function(e){return e+90})},[]),we=m.useCallback(function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).popState;ue(function(e){return"ROTATE_PHOTO"===e?"EDIT_PHOTO":"ROTATE_VIDEO"===e?"EDIT_VIDEO":e}),e&&!g&&window.history.back()},[g]),xe=m.useCallback(function(){V(function(e){var t=_to_consumable_array(e);return t[W].crop=void 0,t[W].versions.draft={src:t[W].versions.current.src,blob:t[W].versions.current.blob},t}),B(!1),ce(!1),ue("PREVIEW")},[W]),Ce=m.useCallback(function(){B(!1),"image"===U[W].type.category?(g||window.history.pushState({component:"BsMediaPicker",step:"EDIT_PHOTO",isInModalHistoryChanger:!0},"",""),ue("EDIT_PHOTO")):"video"===U[W].type.category&&(g||window.history.pushState({component:"BsMediaPicker",step:"EDIT_VIDEO",isInModalHistoryChanger:!0},"",""),ue("EDIT_VIDEO"))},[U,W,g]),je=m.useCallback(function(){V(function(e){var t=_to_consumable_array(e);return t[W].crop=void 0,URL.revokeObjectURL(t[W].versions.current.src),t[W].versions.current.src=t[W].versions.draft.src,t[W].versions.current.blob=t[W].versions.draft.blob,t}),ue("PREVIEW"),B(!1),g||window.history.back()},[W,g]),ke=m.useCallback(function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).popState;A?ce(!0):ue("PREVIEW"),e&&!g&&window.history.back()},[A,g]),Oe=m.useCallback(function(){ue("CROP_PHOTO"),g||window.history.pushState({component:"BsMediaPicker",step:"CROP_PHOTO",isInModalHistoryChanger:!0},"","")},[g]),Ee=m.useCallback(function(){ue("ROTATE_PHOTO"),g||window.history.pushState({component:"BsMediaPicker",step:"ROTATE_PHOTO",isInModalHistoryChanger:!0},"","")},[g]),De=m.useCallback(function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).popState;
1ue(function(e){return"CROP_PHOTO"===e?"EDIT_PHOTO":"CROP_VIDEO"===e?"EDIT_VIDEO":e}),e&&!g&&window.history.back()},[g]),Re=m.useCallback(function(){switch(de){case"PREVIEW":null==C||C();break;case"EDIT_PHOTO":case"EDIT_VIDEO":A?ce(!0):ue("PREVIEW");break;case"CROP_PHOTO":case"ROTATE_PHOTO":ue("EDIT_PHOTO")}},[de,A,C]),Pe=m.useCallback(function(){G(!0),V(function(e){return j(e.map(function(e){return{id:e.id,name:e.name,type:e.type,lastModified:e.lastModified,blob:e.versions.current.blob,src:URL.createObjectURL(e.versions.current.blob),file:new File([e.versions.current.blob],e.name,{type:e.type.mime,lastModified:e.lastModified})}})),e}),setTimeout(function(){G(!1)},500)},[j]),Ne=m.useCallback(function(){return _async_to_generator(function(){var e,t;return _ts_generator(this,function(n){switch(n.label){case 0:return G(!0),[4,null===(e=P.current)||void 0===e?void 0:e.getResultAsBlob()];case 1:return(t=n.sent())&&V(function(e){var n=_to_consumable_array(e);URL.revokeObjectURL(n[W].versions.current.src);var r=URL.createObjectURL(t);return n[W].versions.draft.blob=t,n[W].versions.draft.src=r,n[W].versions.current.blob=t,n[W].versions.current.src=r,n}),W!==U.length-1?(G(!1),Y(function(e){return e+1})):Pe(),[2]}})})()},[W,U.length,Pe]),Ie=m.useCallback(function(e,t){if(!g&&t.state&&"object"==_type_of(t.state)&&"component"in t.state&&"BsMediaPicker"===t.state.component)switch("step"in t.state?t.state.step:null){case"EDIT_PHOTO":case"EDIT_VIDEO":ke({popState:!1});break;case"CROP_PHOTO":case"CROP_VIDEO":De({popState:!1});break;case"ROTATE_PHOTO":case"ROTATE_VIDEO":we({popState:!1})}},[g,De,ke,we]);return f.useHistoryChange({onPopState:Ie}),m.useEffect(function(){y?fe():setTimeout(function(){return _e()},350)},[y]),i.jsxs("div",{"data-testid":D,children:[i.jsx(l,{size:"auto",show:y,showClose:g,showBack:!g,title:pe,isFullScreen:!g,className:"bs-media-picker",bodyClass:"bs-media-picker__body",headerClass:"bs-media-picker__header",footerClass:"bs-media-picker__footer",footerComponent:("PREVIEW"===de||"EDIT_PHOTO"===de)&&i.jsxs(i.Fragment,{children:["PREVIEW"===de&&i.jsx("div",{className:"bs-media-picker__footer-buttons",children:i.jsx(u,{fullWidth:!g,loading:X,size:g?"lg":"md",disabled:q,label:x&&W!==U.length-1?"بعدÛ":"تاÛÛØ¯",onClick:x?Ne:Pe})}),"EDIT_PHOTO"===de&&i.jsxs("div",{className:"bs-media-picker__footer-buttons",children:[i.jsx(s,{ml:8,children:i.jsx(u,{fullWidth:!g,disabled:!A,label:"Ø°Ø®ÛØ±Ù تغÛÛØ±Ø§Øª",size:g?"lg":"md",onClick:je})}),i.jsx(s,{mr:8,children:i.jsx(u,{label:"Ø§ÙØµØ±Ø§Ù",variant:"outline",fullWidth:!g,size:g?"lg":"md",onClick:function(){return ke()}})})]})]}),onBack:Re,onClose:C,children:q?i.jsx("div",{className:"bs-media-picker__body-loading",children:i.jsx(p,{size:"xl"})}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"bs-media-picker__body-medias",children:[i.jsxs("div",{ref:R,className:"bs-media-picker__body-thumbnails",children:[U.map(function(e,t){return i.jsxs("div",{className:a.clsx("bs-media-picker__body-thumbnails-items-item",{"bs-media-picker__body-thumbnails-items-item--active":t===W,"bs-media-picker__body-thumbnails-items-item--disabled":"PREVIEW"!==de&&t!==W}),onClick:function(){return!x&&Y(t)},children:["image"===e.type.category&&i.jsx("img",{alt:e.name,src:e.versions.draft.src,className:"bs-media-picker__body-thumbnails-items-item-img"}),"video"===e.type.category&&i.jsxs(i.Fragment,{children:[i.jsx("video",{preload:"metadata",src:e.versions.draft.src,className:"bs-media-picker__body-thumbnails-items-item-img",onClick:function(e){return e.preventDefault()}}),i.jsx("i",{className:"bs-media-picker__body-thumbnails-items-item-label bi-play"})]})]},e.id)}),he&&i.jsx("div",{className:"bs-media-picker__body-thumbnails-add",children:i.jsx(u,{square:!0,size:"md",icon:"bi-plus",variant:"outline",color:"secondary",disabled:"PREVIEW"!==de,children:i.jsx("label",{"aria-label":"add",htmlFor:"bs-media-picker-add",className:"bs-media-picker__body-thumbnails-add-label",children:i.jsx("input",{multiple:!0,type:"file",accept:k,id:"bs-media-picker-add",className:"bs-media-picker__body-thumbnails-add-label-input",onChange:me})})})})]}),"PREVIEW"===de&&i.jsxs("div",{className:"bs-media-picker__body-preview",children:["image"===U[W].type.category&&i.jsx(i.Fragment,{children:x?i.jsx(_,{disabled:!0,aspect:x||0,ref:P,memeType:U[W].type.mime,image:U[W].versions.draft.src,className:"bs-media-picker__body-preview-cropper"}):i.jsx("img",{alt:null===(t=U[W])||void 0===t?void 0:t.name,src:null===(n=U[W])||void 0===n?void 0:n.versions.current.src,className:"bs-media-picker__body-preview-img"})}),"video"===U[W].type.category&&i.jsx(d,{className:"bs-media-picker__body-preview-video",src:U[W].versions.current.src})]}
1),"EDIT_PHOTO"===de&&i.jsx("div",{className:"bs-media-picker__body-edit-photo",children:"image"===U[W].type.category&&i.jsx(i.Fragment,{children:x?i.jsx(_,{disabled:!0,aspect:x||0,ref:P,memeType:U[W].type.mime,image:U[W].versions.draft.src,className:"bs-media-picker__body-edit-photo-cropper"}):i.jsx("img",{alt:null===(r=U[W])||void 0===r?void 0:r.name,src:null===(b=U[W])||void 0===b?void 0:b.versions.current.src,className:"bs-media-picker__body-edit-photo-img"})})}),"EDIT_VIDEO"===de&&i.jsx("div",{className:"bs-media-picker__body-edit-video",children:i.jsx(d,{src:U[W].versions.draft.src,className:"bs-media-picker__body-edit-video-video"})}),"CROP_PHOTO"===de&&i.jsxs("div",{className:"bs-media-picker__body-crop",children:[i.jsx(_,{aspect:x||0,ref:P,disabled:Z,memeType:U[W].type.mime,defaultCrop:U[W].crop,image:U[W].versions.draft.src,className:"bs-media-picker__body-crop-cropper"}),i.jsxs(s,{px:24,mt:48,display:"flex",alignItems:"center",justifyContent:"space-between",children:[i.jsx(u,{square:!0,icon:"bi-tick-single",variant:"outline",color:"secondary",size:g?"lg":"sm",loading:Z,onClick:ve}),i.jsx(u,{square:!0,icon:"bi-close",variant:"outline",color:"secondary",size:g?"lg":"sm",disabled:Z,onClick:function(){return De()}})]})]}),"ROTATE_PHOTO"===de&&i.jsxs("div",{className:"bs-media-picker__body-rotate-photo",children:[i.jsx("div",{className:"bs-media-picker__body-rotate-photo-view",children:i.jsx("img",{ref:N,alt:U[W].name,src:U[W].versions.draft.src,style:{transform:"rotate(".concat(M,"deg)")},className:"bs-media-picker__body-rotate-photo-view-img"})}),i.jsx("canvas",{ref:I,style:{display:"none"}}),i.jsxs(s,{px:24,mt:48,display:"flex",alignItems:"center",justifyContent:"space-between",children:[i.jsx(u,{square:!0,icon:"bi-tick-single",variant:"outline",color:"secondary",size:g?"lg":"sm",loading:oe,onClick:ye}),i.jsx(u,{square:!0,icon:"bi-refresh-single",variant:"outline",color:"secondary",size:g?"lg":"sm",disabled:oe,onClick:ge}),i.jsx(u,{square:!0,icon:"bi-close",variant:"outline",color:"secondary",size:g?"lg":"sm",disabled:oe,onClick:function(){return ue("EDIT_PHOTO")}})]})]})]}),i.jsxs("div",{className:"bs-media-picker__body-actions",children:["PREVIEW"===de&&i.jsxs(i.Fragment,{children:["image"===U[W].type.category&&i.jsxs("button",{className:"bs-media-picker__body-actions-btn",onClick:Ce,children:[i.jsx("i",{className:"bi-pen bs-media-picker__body-actions-btn-icon"}),i.jsx("span",{className:"bs-media-picker__body-actions-btn-title",children:"ÙÛØ±Ø§ÛØ´"})]}),i.jsxs("button",{className:"bs-media-picker__body-actions-btn",onClick:function(){return be(W)},children:[i.jsx("i",{className:"bi-trash bs-media-picker__body-actions-btn-icon"}),i.jsx("span",{className:"bs-media-picker__body-actions-btn-title",children:"ØØ°Ù"})]})]}),"EDIT_PHOTO"===de&&i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"bs-media-picker__body-actions-btn",onClick:Ee,children:[i.jsx("i",{className:"bi-refresh-single bs-media-picker__body-actions-btn-icon"}),i.jsx("span",{className:"bs-media-picker__body-actions-btn-title",children:"ÚØ±Ø®Ø´"})]}),i.jsxs("button",{className:"bs-media-picker__body-actions-btn",onClick:Oe,children:[i.jsx("i",{className:"bi-crop bs-media-picker__body-actions-btn-icon"}),i.jsx("span",{className:"bs-media-picker__body-actions-btn-title",children:"برش"})]})]})]})]})}),i.jsx(h,{confirmLabel:"تاÛÛØ¯",cancelLabel:"Ø§ÙØµØ±Ø§Ù",confirmVariant:"fill",cancelVariant:"outline",show:te,modalProps:{showClose:!1},cancelButtonProps:{size:g?"lg":"sm"},confirmButtonProps:{size:g?"lg":"sm"},title:"ØØ°Ù "+("image"===(null===(v=U[W])||void 0===v?void 0:v.type.category)?"عکس":"ÙÛØ¯Ø¦Ù"),description:"دستâÚ©Ù
Û٠عکس ÛØ§ ÙÛØ¯Ø¦Ù Ø¨Ø§ÛØ¯ بÙ
ÙÙÙ. Ù
Ø·Ù
ئÙÛ Ù
ÛâØ®ÙØ§Û Ø¢Ø®Ø±Û Ø±Ù ÙÙ
ØØ°Ù Ú©ÙÛØ",onClose:function(){return ne(!1)},onCancel:function(){return ne(!1)},onConfirm:function(){return be(W,!0)}}),i.jsx(h,{cancelLabel:"Ø§ÙØµØ±Ø§Ù",confirmVariant:"fill",cancelVariant:"outline",confirmLabel:"بÙÙ Ù
Ø·Ù
ئÙÙ
",title:"تغÛÛØ±Ø§Øª Ø°Ø®ÛØ±Ù ÙØ´Ø¯Ù",show:se,modalProps:{showClose:!1},cancelButtonProps:{size:g?"lg":"sm"},confirmButtonProps:{size:g?"lg":"sm"},description:"Ù
Ø·Ù
ئÙÛ Ú©Ù Ù
ÛâØ®ÙØ§Û بدÙÙ Ø°Ø®ÛØ±Ù تغÛÛØ±Ø§Øª خارج Ø¨Ø´ÛØ",onConfirm:xe,onClose:function(){return ce(!1)},onCancel:function(){return ce(!1)}})]})}},36886:function(e){e.exports=function(e){var t=void 0===e?"undefined":_type_of(e);return null!=e&&("object"==t||"function"==t)}},40618:function(e,t,n){"use strict";var r=n(31827),o=n(63477),i=n(96131),a=n(47072),s=n(96600),c=n(99195),l=null,d=c.forwardRef(function(e,t){var d=e.id,u=e.src,p=e.loop,h=e.muted,f=e.poster,_=e.preload,m=e.autoplay,b=e.children,v=e.className,y=e.playsInl
1ine,g=e.controls,w=void 0===g||g,x=e.observer,C=void 0!==x&&x,j=e["data-testid"],k=a.useFallbackRef(t),O=c.useRef(null),E=_sliced_to_array(c.useState(!1),2),D=E[0],R=E[1],P=_sliced_to_array(c.useState(!1),2),N=P[0],I=P[1];c.useEffect(function(){I(!1)},[u]);var T=c.useMemo(function(){return i.isClientSide()&&"IntersectionObserver"in window?new IntersectionObserver(function(e){var t;e[0].isIntersecting||null===(t=k.current)||void 0===t||t.pause()}):null},[k]),M=c.useCallback(function(){return _async_to_generator(function(){var e,t;return _ts_generator(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),!(e=l)?[4,n.e(88163).then(n.bind(n,71905))]:[3,2];case 1:e=r.sent().default,l||(l=e),r.label=2;case 2:return e&&e.isSupported()&&k.current?(O.current=new e({startLevel:3}),O.current.loadSource(u),O.current.attachMedia(k.current)):k.current&&k.current.canPlayType("application/vnd.apple.mpegurl")&&(k.current.src=u),[3,4];case 3:return t=r.sent(),console.error(t),[3,4];case 4:return[2]}})})()},[u,k]),S=c.useCallback(function(){try{k.current&&(k.current.src=u)}catch(e){console.error(e)}},[u,k]),L=c.useCallback(function(){R(!0)},[]),A=c.useCallback(function(){R(!1)},[]),B=c.useCallback(function(){I(!0)},[]);return c.useEffect(function(){var e=k.current;return C&&e&&T&&T.observe(e),function(){C&&e&&T&&T.unobserve(e)}},[C,T,k]),c.useEffect(function(){return u.endsWith(".m3u8")?M():S(),function(){var e;null===(e=O.current)||void 0===e||e.destroy()}},[u,M,S]),c.useEffect(function(){k.current&&(k.current.addEventListener("play",L),k.current.addEventListener("pause",A),k.current.addEventListener("ended",A),k.current.addEventListener("canplay",B));var e=k.current;return function(){var t;null===(t=O.current)||void 0===t||t.destroy(),null==e||e.removeEventListener("play",L),null==e||e.removeEventListener("pause",A),null==e||e.removeEventListener("ended",A),null==e||e.removeEventListener("canplay",B)}},[m,B,A,L,k]),r.jsxs("div",{className:o.clsx("bs-video",v),"data-testid":j,children:[r.jsxs("video",{id:d,loop:p,muted:h,ref:k,poster:f,preload:_,controls:w,autoPlay:m,playsInline:y,className:"bs-video__player",children:[b,"Ù
Ø±ÙØ±Ú¯Ø± Ø´Ù
ا از ÙÛØ¯ÛÙ Ù¾Ø´ØªÛØ¨Ø§ÙÛ ÙÙ
ÛâÚ©ÙØ¯."]}),r.jsx(s,{mounted:!D&&N,transition:"fade",duration:400,children:function(e){return r.jsx("button",{type:"button","aria-label":"play",className:"bs-video__play",style:e,onClick:function(){var e;return null===(e=k.current)||void 0===e?void 0:e.play()},children:r.jsx("i",{className:"bi-play"})})}})]})});d.displayName="BsVideo",e.exports=d},47260:function(e,t,n){"use strict";n.d(t,{W:function(){return o}});var r=n(66107),o=function(e,t){return t?(0,r.x4)(e/t):0}},53504:function(e,t,n){"use strict";var r=n(31827),o=n(63477),i=n(47072),a=n(96131),s=n(13545),c=n(96600),l=n(99195);n(71126);var d=function(e){return _async_to_generator(function(){return _ts_generator(this,function(t){switch(t.label){case 0:return[4,a.sleep(10)];case 1:return t.sent(),e(),[2]}})})()},u=function(e){var t=e.show,n=e.coords,u=e.onClose,p=e.children,h=e.anchorEl,f=e.className,_=void 0===f?"":f,m=e.transition,b=void 0===m?"fade":m,v=e.getAwayThreshold,y=void 0===v?100:v,g=e.animationDuration,w=void 0===g?250:g,x=e.position,C=void 0===x?"bottom-right":x,j=e["data-testid"],k=l.useId(),O=l.useRef({uid:k}),E=l.useRef(null),D=l.useRef(null),R=_sliced_to_array(l.useState(!1),2),P=R[0],N=R[1],I=l.useCallback(function(e){var t,r;if("number"==typeof(null==n?void 0:n.top)&&"number"==typeof(null==n?void 0:n.left)&&u){var o=y+((null===(t=D.current)||void 0===t?void 0:t.clientHeight)||0),i=y+((null===(r=D.current)||void 0===r?void 0:r.clientWidth)||0),a=e.pageY-n.top,s=e.pageX-n.left;(a>o||a<-1*o)&&u(),(s>i||s<-1*i)&&u()}},[null==n?void 0:n.top,null==n?void 0:n.left,y,u]);return i.useIsomorphicEffect(function(){return t?(a.popupManager.setIsOpen(O.current),d(function(){"number"==typeof(null==n?void 0:n.top)&&"number"==typeof(null==n?void 0:n.left)&&document.addEventListener("mousemove",I),E.current&&(E.current.style.zIndex="".concat(a.popupManager.getNewZIndex()))})):a.popupManager.setIsClosed(O.current,w),function(){document.removeEventListener("mousemove",I),a.popupManager.setIsClosed(O.current,w)}},[t]),l.useEffect(function(){t?d(function(){return N(!0)}):N(!1)},[t]),l.useEffect(function(){var e=function(e){var t;"Escape"===e.key&&(null===(t=a.popupManager.topElements[0])||void 0===t?void 0:t.uid)===k&&(null==u||u())};document.addEventListener("keydown",e);var t=O.current;return function(){document.removeEventListener("keydown",e),a.popupManager.setIsClosed(t,w)}},[]),r.jsx(s,{children:r.jsx(c,{keepMounted:!0,mounted:P,transition:b,duration:w,onEnter:function(){var e=D.current;if(n){if("number"==typeof(null==n?void 0:n.top)&&"number"==typeof(null==n?void 0:n.left)&&e){var t=e.offsetWidth,r=e.offsetHeight;n.left-t<0?e.style.right=window.innerWidth-n.left-t+"px":e.style.left=n.left-t+"px",n.top+r>window.innerHeight?e.style.bottom=window.innerHeight-n.top+"px":e.style.top="".concat(n.top,"px")}}else{var o=null==h?void 0:h.getBoundingClientRect(),i=_sliced_to_array(C.split("-"),2),a=i[0],s=i[1],c=(null==o?void 0:o.bottom)||0,l=window.innerWidth-((null==o?void 0:o.right)||0),d=(null==o?void 0:o.x)||0,u=(null==o?void 0:o.y)||0;if(!(null==e?void 0:e.style))return;var p=e.clientWidth,f=e.clientHeight;"right"===s&&l+p<window.innerWidth||((null==o?void 0:o.right)||0)+p>window.innerWidth?e.style.right="".concat(l,"px"):e.style.left="".concat(d,"px"),"bottom"===a&&c+f<window.innerHeight||u<f?e.style.top="".concat(c,"px"):e.style.bottom=window.innerHeight-u+"px"}},children:function(e){return r.jsxs("div",{className:o.clsx("bs-popover",{"bs-popover--visible":P}),ref:E,"data-testid":j,children:[r.jsx("div",{onClick:u,className:"bs-popover__wrapper"}),r.jsx("div",{style:e,ref:D,className:o.clsx(["bs-popover__content",_define_property({},_,!!_)]),children:p})]})}})})},p=function(e){var t=e.show,n=e.onClose,o=e.keepMounted,i=void 0!==o&&o,a=e["data-testid"],s=_object_without_properties(e,["show","onClose","keepMounted","data-testid"]),c=_sliced_to_array(l.useState(!1),2),d=c[0],p=c[1],h=_sliced_to_array(l.useState(!1),2),f=h[0],_=h[1],m=l.useCallback(function(){i||p(!1),_(!1),null==n||n()},[i,n]);return l.useEffect(function(){t!==f&&(t?(p(!0),_(!0)):(_(!1),m()))},[t]),d?r.jsx(u,_object_spread_props(_object_spread({},s),{show:f,keepMounted:i,"data-testid":a,onClose:m})):null};p.displayName="BsPopover",e.exports=p},53790:function(e,t,n){"use strict";var r=n(31827),o=n(63477),i=n(99195),a=n(2796),s=n(53504),c=n(47072);n(46312),n(43206),n(13545),n(71126),n(96131),n(96600);var l=function(e){var t=e.onClick,n=e.children,i=e.className,a=void 0===i?"":i,s=e["data-testid"],c=function(e){null==t||t(e)};return r.jsx("li",{tabIndex:0,role:"menuitem",onClick:c,onKeyDown:c,"data-testid":s,className:o.clsx(["bs-dropdown--item",_define_property({},a,a)]),children:n})};l.displayName="BsDropdownItem";
1var d=function(e){var t=e.show,n=e.onChange,l=e.children,d=e.className,u=e.label,p=void 0===u?"":u,h=e.modalProps,f=void 0===h?{}:h,_=e.buttonComponent,m=e.buttonProps,b=void 0===m?{}:m,v=e.disabled,y=void 0!==v&&v,g=e.optionsProps,w=void 0===g?{}:g,x=e.icon,C=void 0===x?"bi-more-v":x,j=e.popoverClassName,k=void 0===j?"":j,O=e.labelPosition,E=void 0===O?"end":O,D=e.position,R=void 0===D?"bottom-right":D,P=e["data-testid"],N=i.useId(),I=c.useWindowSize().isPhone,T=_sliced_to_array(c.useUncontrolled({onChange:n,value:t,defaultValue:!1}),2),M=T[0],S=T[1],L=i.useRef(null),A=function(){S(!1)},B=function(){A()},H=i.useMemo(function(){return _object_spread({showClose:!1,hasPopstate:!1},f)},[f]);return r.jsxs("div",{id:N,"data-testid":P,className:o.clsx(["bs-dropdown",{"bs-dropdown--open":M},d]),children:[r.jsx("button",_object_spread_props(_object_spread({type:"button",className:"bs-dropdown__btn",disabled:y,onClick:function(){M?A():S(!0)}},b),{ref:L,children:_||r.jsxs(r.Fragment,{children:[!!p&&"start"===E&&r.jsx("span",{className:"bs-dropdown__label",children:p}),r.jsx("i",{className:o.clsx(["bs-dropdown__icon",_define_property({},C,!!C)])}),!!p&&"end"===E&&r.jsx("span",{className:"bs-dropdown__label",children:p})]})})),I?r.jsx(a,_object_spread_props(_object_spread({show:M,onClose:A},H),{children:r.jsx("ul",_object_spread_props(_object_spread({className:"bs-dropdown__options bs-dropdown__options--modal",role:"menu"},w),{onClick:B,onKeyDown:B,children:l}))})):r.jsx(s,{anchorEl:L.current,position:R,show:M,onClose:A,transition:"fade",className:o.clsx(["bs-dropdown__options bs-dropdown__options--popover",k]),children:r.jsx("ul",_object_spread_props(_object_spread({},w),{role:"menu",onClick:B,onKeyDown:B,children:l}))})]})};d.displayName="BsDropdown",d.Item=l,e.exports=d},61630:function(e){e.exports=function(e){return function(t){return e(t)}}},66107:function(e,t,n){"use strict";n.d(t,{VW:function(){return o},x4:function(){return r}});var r=function(e){return Math.floor(1e3*e)/1e3},o=function(e){return 10*e}},71583:function(e,t,n){"use strict";var r=n(31827),o=n(21948),i=n(99195);n(63477),n(47072);var a=i.createContext({value:"",setValue:function(){}}),s=i.forwardRef(function(e,t){var n=e.children,o=e.onChange,s=e.defaultValue,c=void 0===s?"":s,l=e["data-testid"],d=_sliced_to_array(i.useState(""),2),u=d[0],p=d[1],h=i.useCallback(function(e){p(e),null==o||o(e)},[p,o]),f=i.useMemo(function(){return{value:u,setValue:h}},[u,h]);return i.useImperativeHandle(t,function(){return f},[f]),i.useEffect(function(){c&&h(c)},[c,h]),r.jsx("div",{"data-testid":l,children:r.jsx(a.Provider,{value:f,children:n})})});s.Item=function(e){var t=e.value,n=e.onChange,s=_object_without_properties(e,["value","onChange"]),c=i.useContext(a),l=c.value,d=c.setValue;return r.jsx(o,_object_spread_props(_object_spread({},s),{show:l===t,onChange:function(e){d(e?t:""),null==n||n(e)}}))},s.displayName="BsAccordion",e.exports=s},74687:function(e,t,n){var r=n(13227),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},74982:function(e,t,n){"use strict";var r=n(31827),o=n(63477),i=n(99195),a=n(96131);e.exports=function(e){var t=e.text,n=e.className,s=e.min,c=void 0===s?150:s,l=e.max,d=void 0===l?250:l,u=e.ideal,p=void 0===u?200:u,h=e.isOpen,f=void 0!==h&&h,_=e["data-testid"],m=_sliced_to_array(i.useState(f),2),b=m[0],v=m[1],y=_sliced_to_array(i.useMemo(function(){return a.trimText(t,c,p,d)},[t,c,p,d]),2),g=y[0],w=y[1],x=(null==g?void 0:g.length)===(null==t?void 0:t.length);return r.jsxs("div",{className:"bs-read-more","data-testid":_,children:[r.jsx("p",{className:o.clsx(n,"bs-read-more__text"),children:x?t:b?"".concat(g," ").concat(w):"".concat(g," ...")}),!x&&r.jsx("div",{className:"bs-read-more__btn-container",children:r.jsxs("button",{type:"button",className:"bs-read-more__btn",onClick:function(){return v(!b)},children:[r.jsx("span",{className:"bs-read-more__btn-title",children:b?"Ú©Ù
تر":"Ø¨ÛØ´ØªØ±"}),r.jsx("span",{className:o.clsx("bs-read-more__btn-icon","bi-angle-"+(b?"up":"down"))})]})})]})}},88027:function(e,t,n){"use strict";n.d(t,{W:function(){return o}});var r=n(92109),o=function(e){var t,n,o=e.goldGrams,i=e.amountToman,a=e.tradeConfig,s=null!==(t=null==a?void 0:a.minTradeGoldMilligrams)&&void 0!==t?t:0,c=null!==(n=null==a?void 0:a.maxTradeBuyAmountToman)&&void 0!==n?n:1/0;return 1e3*o<s?{isValid:!1,error:r.X6.BELOW_MIN,minGoldMilligrams:s,maxTomanAmount:c}:i>c?{isValid:!1,error:r.X6.ABOVE_MAX,minGoldMilligrams:s,maxTomanAmount:c}:{isValid:!0,error:null,minGoldMilligrams:s,maxTomanAmount:c}}},92109:function(e,t,n){"use strict";n.d(t,{$K:function(){return r},Dt:function(){return d},P_:function(){return s},R3:function(){return i},X6:function(){return a},ef:function(){return l},j1:function(){return c},wK:function(){return o}});var r={BUY:"buy",SELL:"sell"},o={GRAM:"gram",TOMAN:"toman"},i={WALLET:"wallet",VENDOR_BALANCE:"vendor_balance",GATEWAY:"gateway"},a={BELOW_MIN:"BELOW_MIN",ABOVE_MAX:"ABOVE_MAX"},s={INSUFFICIENT_GOLD_BALANCE:"E_INSUFFICIENT_GOLD_BALANCE"},c={BUY_BUTTON_CLICK:"salamGoldBuyButtonClick",SELL_BUTTON_CLICK:"salamGoldSellButtonClick",PAYMENT_BUTTON_CLICK:"salamGoldPaymentButtonClick",FINAL_SELL_BUTTON_CLICK:"salamGoldFinalSellButtonClick"},l="Idempotency-Key",d={walletBalance:["gold-wallet-balance"],goldBalance:["gold-balance"],price:["gold-price"],tradeConfig:["gold-trade-config"],tradeFee:function(e,t){return["gold-trade-fee",e,t]}}},92139:function(e,t,n){"use strict";var r=function(e){var t=e.amountToman,n=e.sellPriceToman,r=e.feeRate,d=void 0===r?0:r,u=e.feePercent,p=e.tradeConfig,h=e.side,f=void 0===h?i.$K.BUY:h,_=e.unit,m=void 0===_?i.wK.TOMAN:_,b=e.goldGrams,v=void 0===b?0:b,y=e.goldBalance,g=e.paymentSource,w=void 0===g?i.R3.WALLET:g,x=e.buy,C=e.onSuccess,j=e.onPaymentRedirect,k=e.onError,O=_sliced_to_array((0,o.useState)(l),2),E=O[0],D=O[1],R=_sliced_to_array((0,o.useState)(!1),2),P=R[0],N=R[1],I=10*n,T=10*t,M=f===i.$K.BUY?1/0:null!=y?y:1/0,S=(0,o.useMemo)(function(){return function(e){var t=e.rialAmount,n=e.goldPriceRial,r=e.feeRate,o=void 0===r?0:r,a=e.side,c=void 0===a?i.$K.BUY:a,l=e.unit,d=void 0===l?i.wK.TOMAN:l,u=e.goldGrams,p=void 0===u?0:u,h=e.maxGold,f=void 0===h?1/0:h,_=c===i.$K.BUY?1+o:1-o,m=n&&_?(0,s.x4)(t/n/_):0,b=Math.min(d===i.wK.GRAM?p:m,f),v=Math.round(1e3*b),y=b*n*_,g=Math.round(y/10);return{goldGrams:d===i.wK.GRAM?p:n?(0,s.x4)(t/n):0,finalGoldAmount:b,goldMilligrams:v,commission:b*n*o,finalAmount:y,amountToman:g}}({rialAmount:T,goldPriceRial:I,feeRate:d,side:f,unit:m,goldGrams:v,maxGold:M})},[T,I,d,f,m,v,M]),L=(0,o.useMemo)(function(){return m===i.wK.GRAM?v:(0,c.W)(t,n)},[m,v,t,n]),A=Math.round(1e3*L),B=(0,o.useMemo)(function(){return(0,a.W)({goldGrams:L,amountToman:t,tradeConfig:p})},[L,t,p]),H=(0,o.useCallback)(function(){return D(l())},[]),U=(0,o.useCallback)(function(){return _async_to_generator(function(){var e,t,n,r,o,a,s,c;return _ts_generator(this,function(d){switch(d.label){case 0:if(!B.isValid||P)return[3,5];N(!0),d.label=1;case 1:return d.trys.push([1,3,4,5]),e=f===i.$K.BUY?{amountToman:S.amountToman,goldMilligrams:S.goldMilligrams,paymentSource:w}:{goldMilligrams:S.goldMilligrams},[4,x(e,{idempotencyKey:E}
1)];case 2:return(null==(t=d.sent())?void 0:t.paymentUrl)?[2,void(null==j||j(t.paymentUrl,t))]:(null==C||C(S.goldMilligrams,t),[3,5]);case 3:return n=d.sent(),409===(null==(c=null==n||null===(r=n.response)||void 0===r?void 0:r.data)?void 0:c.http_status)&&(null==c||null===(s=c.errors)||void 0===s||null===(a=s[0])||void 0===a||null===(o=a.data)||void 0===o?void 0:o.internal_code)===i.P_.INSUFFICIENT_GOLD_BALANCE&&D(l()),null==k||k(n),[3,5];case 4:return N(!1),[7];case 5:return[2]}})})()},[B.isValid,P,f,S.amountToman,S.goldMilligrams,w,x,E,j,C,k]);return _object_spread_props(_object_spread({},S),{equivalentSoot:A,feeRate:d,feePercent:u,goldPriceRial:I,validation:B,isValid:B.isValid,isSubmitting:P,idempotencyKey:E,submit:U,reset:H})};n.d(t,{R:function(){return r}});var o=n(99195),i=n(92109),a=n(88027),s=n(66107),c=n(47260),l=function(){var e,t;return(null===(t=globalThis.crypto)||void 0===t||null===(e=t.randomUUID)||void 0===e?void 0:e.call(t))||"".concat(Date.now().toString(16),"-").concat(Math.floor(1e9*Math.random()).toString(16))}}}]);
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.