cortex-react-ui 0.2.29 → 0.2.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react"),t=require("react-dom"),n=require("@yudiel/react-qr-scanner"),r=require("react-webcam"),o=require("react-icons/fa"),i=require("react-icons/md"),a=require("react-icons/bs"),l=require("react-leaflet"),c=require("leaflet"),u=require("leaflet-draw/dist/images/marker-icon-2x.png"),s=require("leaflet-draw/dist/images/marker-shadow.png"),d=require("leaflet.fullscreen");require("leaflet.fullscreen/Control.FullScreen.css");var m=require("react-leaflet-draw");function f(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}require("leaflet/dist/leaflet.css"),require("leaflet-draw/dist/leaflet.draw.css");var p=f(e),h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)};function v(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function g(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function l(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,l)}c((r=r.apply(e,t||[])).next())})}function E(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);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function w(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function b(e){return p.forwardRef(function(t,n){return e(t,n)})}"function"==typeof SuppressedError&&SuppressedError;var y=b(function(n,r){var o=n.children,i=n.container,a=void 0===i?document.body:i,l=e.useRef();return e.useEffect(function(){var e=function(e){return"function"==typeof e?e():e}(a);return l.current&&e&&e.appendChild(l.current),function(){l.current&&l.current.remove()}},[l.current]),l.current||(l.current=document.createElement("div")),t.createPortal(o,l.current)});function x(e,t){e&&("function"==typeof e?e(t):"current"in e&&(e.current=t))}function C(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=[],r=function(t){var r=e[t];if(!r)return"continue";var o=typeof r;if("string"===o||"number"===o)n.push(r);else if(Array.isArray(r)){if(r.length){var i=C.apply(void 0,r);i&&n.push(i)}}else"object"===o?r.toString===Object.prototype.toString&&Object.keys(r).forEach(function(e){r[e]&&n.push(e)}):n.push(r.toString())},o=0;o<e.length;o+=1)r(o);return n.join(" ")}function k(e){var t=window,n=document.body,r=void 0!==t.pageXOffset?t.pageXOffset:(document.documentElement||n.parentNode||n).scrollLeft,o=void 0!==t.pageYOffset?t.pageYOffset:(document.documentElement||n.parentNode||n).scrollTop,i=e.getBoundingClientRect();return{bottom:i.bottom+o,height:i.height,left:i.left+r,right:i.right+r,top:i.top+o,width:i.width}}var A,N={Center:"center",BottomCenter:"bottom-center",BottomRight:"bottom-right",BottomLeft:"bottom-left",TopCenter:"top-center",TopRight:"top-right",TopLeft:"top-left",LeftTop:"left-top",LeftBottom:"left-bottom",LeftCenter:"left-center",RightTop:"right-top",RightBottom:"right-bottom",RightCenter:"right-center"},T=b(function(t,n){var r=t.anchorEl,o=t.anchorPosition,i=t.placement,a=void 0===i?N.BottomLeft:i,l=t.open,c=void 0!==l&&l,u=t.overflow,s=void 0!==u&&u,d=t.role,m=t.children,f=t.className,p=v(t,["anchorEl","anchorPosition","placement","open","overflow","role","children","className"]),g=e.useRef(null),E=e.useRef(null),w=e.useState({left:window.scrollX,top:window.scrollY,height:window.innerHeight,width:window.innerWidth}),b=w[0],L=w[1],A=e.useState({position:"absolute",margin:"0",inset:"0px auto auto 0px",transform:"translate3d(0px, 0px, 0px)",opacity:0}),T=A[0],_=A[1];return e.useEffect(function(){if(n&&g)return x(n,g.current),function(){x(n,null)}},[n,g.current]),e.useEffect(function(){var e=function(){L({height:window.innerHeight,width:window.innerWidth,left:window.scrollX,top:window.scrollY})},t=function(){L({height:window.innerHeight,width:window.innerWidth,left:window.scrollX,top:window.scrollY})};return c&&(window.addEventListener("resize",e),window.addEventListener("scroll",t),L({height:window.innerHeight,width:window.innerWidth,left:window.scrollX,top:window.scrollY})),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",t)}},[c]),e.useEffect(function(){var e,t=function(e){var t;if(!e)return document.body;if("[object String]"===Object.prototype.toString.call(e)){var n=document.getElementById(e);return null!=n?n:document.body}var r=e;return r&&r.current?null!==(t=r.current)&&void 0!==t?t:document.body:e}(r);if(c&&g.current&&t){var n=function(){var e=function(e,t,n,r){var o=0,i=0,a=n?{bottom:n.top,height:0,left:n.left,right:n.left,top:n.top,width:0}:k(t),l=k(r);switch(e){case N.Center:o=a.left+a.width/2-l.width/2,i=a.top+a.height/2-l.height/2;break;case N.BottomLeft:o=a.left,i=a.bottom;break;case N.BottomRight:o=a.left-l.width+a.width,i=a.bottom;break;case N.BottomCenter:o=a.left+a.width/2-l.width/2,i=a.bottom;break;case N.TopLeft:o=a.left,i=a.top-l.height;break;case N.TopRight:o=a.left-l.width+a.width,i=a.top-l.height;break;case N.TopCenter:o=a.left+a.width/2-l.width/2,i=a.top-l.height;break;case N.LeftTop:o=a.left-l.width,i=a.top;break;case N.LeftBottom:o=a.left-l.width,i=a.bottom-l.height;break;case N.LeftCenter:o=a.left-l.width,i=a.top+a.height/2-l.height/2;break;case N.RightTop:o=a.right,i=a.top;break;case N.RightBottom:o=a.right,i=a.bottom-l.height;break;case N.RightCenter:o=a.right,i=a.top+a.height/2-l.height/2}return{left:o,top:i}}(a,t,o,g.current),n=e.left,r=e.top,i=0,l=0;if(!1===s){var c=function(e,t,n,r){if(!e)return null;if(!t)return null;var o=t.getBoundingClientRect(),i={left:n,top:r,height:0,width:0};return n<e.left&&(i.left=e.left),r<e.top&&(i.top=e.top),n+o.width>=e.left+e.width&&(i.left=e.left+e.width-o.width),r+o.height>=e.top+e.height&&(i.top=e.top+e.height-o.height),i}(b,g.current,n,r);null!==c&&(n=c.left,r=c.top,i=c.height,l=c.width)}_({position:"absolute",margin:"0",inset:"0px auto auto 0px",transform:"translate3d(".concat(n,"px, ").concat(r,"px, 0px)"),opacity:1,maxHeight:i>0?"".concat(i.toFixed(),"px"):void 0,maxWidth:l>0?"".concat(l.toFixed(),"px"):void 0})};(e=new MutationObserver(function(){n()})).observe(g.current,{attributes:!1,childList:!0,subtree:!0}),n()}return function(){e&&e.disconnect()}},[g,c,a,o,s,b,r]),!0!==c?null:e.createElement(y,{ref:E},e.createElement("div",h({ref:g,style:T,role:d,className:C("ui-popper",f)},p),m))}),_=function(t){var n=t.variant,r=t.color,o=t.children,i=t.disable,a=t.className,l=t.onClick,c=e.useCallback(function(e){l&&!0!==i&&l(e)},[l,i]);return e.createElement("button",{type:"button",className:C("ui-btn",!0===i?"ui-btn-disable":null,null!=n?"ui-btn-".concat(n):"ui-btn-text",null!=r?"ui-btn-color-".concat(r):"ui-btn-color-primary",a),onClick:c},o)},S=function(t){var n=e.useMemo(function(){return 1300+document.querySelectorAll(".dialog-mask").length},[]);return e.createElement("div",h({},t,{className:"dialog-mask ".concat(t.className),style:h(h({},t.style),{zIndex:n})}),e.createElement("style",null,"body { overflow: hidden; }"),t.children)},B=function(t){return e.createElement("div",h({},t,{className:"dialog-body ".concat(t.className)}))},M=function(n){e.useEffect(function(){return window.addEventListener("keyup",r),function(){window.removeEventListener("keyup",r)}},[]);var r=e.useCallback(function(e){var t;["Esc","Escape"].includes(e.key)&&(null===(t=n.onClose)||void 0===t||t.call(n))},[]);return n.open?t.createPortal(e.createElement(e.Fragment,null,e.createElement(S,null,e.createElement(B,{style:{position:"relative",fontFamily:"sans-serif",width:"100%",maxWidth:"500px"}},n.title&&e.createElement("div",{className:"dialog-header"},e.createElement("h4",{style:{fontWeight:"600",fontSize:"1.25rem"}},n.title)),e.createElement("button",{type:"button",style:{position:"absolute",top:"0.5rem",right:"0.5rem",zIndex:20,fontSize:"1.375rem",fontWeight:"700",background:"transparent",border:"none",padding:"5px 10px"},onClick:n.onClose},"×"),e.createElement("div",null)))),document.body):e.createElement(e.Fragment,null)},R=function(t){var n,r,o,i;return e.createElement(M,{open:t.open,title:(null==t?void 0:t.title)||"confirmation de l'évènement",onClose:t.onClose},e.createElement("div",{style:{display:"flex",flexDirection:"column"}},e.createElement("p",null,(null==t?void 0:t.message)||"Voulez-vous vraiment confirmer le scan ?"),e.createElement("div",{style:{marginTop:"1.25rem",display:"flex",flexDirection:"column"}},e.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"1rem"}},e.createElement("button",{type:"button",className:"btn",style:h({backgroundColor:"#e5e7eb",color:"black"},null===(n=null==t?void 0:t.btnCancel)||void 0===n?void 0:n.style),onClick:t.onClose},(null===(r=null==t?void 0:t.btnCancel)||void 0===r?void 0:r.label)||"annuler"),e.createElement("button",{type:"button",className:"btn",style:h({backgroundColor:"#22c55e",color:"white"},null===(o=null==t?void 0:t.btnOk)||void 0===o?void 0:o.style),onClick:t.onConfirm},(null===(i=null==t?void 0:t.btnOk)||void 0===i?void 0:i.label)||"confirmer")))))},O=function(){function e(){this.dbName="cortex-react-media",this.storeName="capturedFiles",this.db=null}return e.prototype.openDatabase=function(){return g(this,void 0,void 0,function(){var e=this;return E(this,function(t){return[2,new Promise(function(t,n){var r=indexedDB.open(e.dbName,1);r.onupgradeneeded=function(t){r.result.createObjectStore(e.storeName,{keyPath:"id",autoIncrement:!0})},r.onsuccess=function(){e.db=r.result,t(e.db)},r.onerror=function(){return n(r.error)}})]})})},e.prototype.storeFile=function(e){return g(this,void 0,void 0,function(){var t=this;return E(this,function(n){switch(n.label){case 0:return this.db?[3,2]:[4,this.openDatabase()];case 1:n.sent(),n.label=2;case 2:return[2,new Promise(function(n,r){var o=t.db.transaction(t.storeName,"readwrite").objectStore(t.storeName).add({file:e,timestamp:Date.now(),name:e.name});o.onsuccess=function(){return n(o.result)},o.onerror=function(){return r(o.error)}})]}})})},e.prototype.retrieveFile=function(e){return g(this,void 0,void 0,function(){var t=this;return E(this,function(n){switch(n.label){case 0:return this.db?[3,2]:[4,this.openDatabase()];case 1:n.sent(),n.label=2;case 2:return[2,new Promise(function(n,r){var o=t.db.transaction([t.storeName],"readonly").objectStore(t.storeName).get(e);o.onsuccess=function(){var e=o.result;n(e?e.file:null)},o.onerror=function(){return r(o.error)}})]}})})},e}();!function(e){e[e.Enter=0]="Enter",e[e.Entering=1]="Entering",e[e.Entered=2]="Entered",e[e.Exit=3]="Exit",e[e.Exiting=4]="Exiting",e[e.Exited=5]="Exited"}(A||(A={}));var P=b(function(t,n){var r=t.trigger,o=t.mode,i=void 0===o?"appear":o,a=t.children,l=t.enterTimeout,c=t.exitTimeout,u=t.className,s=t.onEnter,d=t.onEntering,m=t.onEntered,f=t.onExit,p=t.onExiting,v=t.onExited,g=e.useRef(null),E=e.useRef(),w=e.useState(function(){return"appear"===i?A.Exited:A.Entered});w[0],w[1];e.useEffect(function(){return function(){E.current&&window.clearTimeout(E.current)}},[E]),e.useEffect(function(){r?(E.current&&window.clearTimeout(E.current),g.current.classList.remove("".concat(u,"-exit")),g.current.classList.remove("".concat(u,"-exiting")),g.current.classList.remove("".concat(u,"-exited")),s&&s(),g.current.classList.add("".concat(u,"-enter")),E.current=window.setTimeout(function(){d&&d(),g.current&&g.current.classList.add("".concat(u,"-entering")),E.current=window.setTimeout(function(){m&&m(),g.current&&g.current.classList.add("".concat(u,"-entered"))},l||1e3)},10)):(E.current&&window.clearTimeout(E.current),g.current.classList.remove("".concat(u,"-enter")),g.current.classList.remove("".concat(u,"-entering")),g.current.classList.remove("".concat(u,"-entered")),f&&f(),g.current.classList.add("".concat(u,"-exit")),E.current=window.setTimeout(function(){p&&p(),g.current&&g.current.classList.add("".concat(u,"-exiting")),E.current=window.setTimeout(function(){v&&v(),g.current&&g.current.classList.add("".concat(u,"-exited"))},c||1e3)}))},[r]);var b=e.useMemo(function(){if(a){var t=h(h({},a.props),{className:C(u,a.props.className),ref:g});return e.cloneElement(a,t)}},[a,g]);return e.createElement(e.Fragment,null,b)}),j=b(function(t,n){var r=t.trigger,o=t.children,i=t.onEnter,a=t.onEntering,l=t.onEntered,c=t.onExit,u=t.onExiting,s=t.onExited;return e.createElement(P,{ref:n,trigger:r,mode:"appear",className:"ui-fade",enterTimeout:160,exitTimeout:160,onEnter:i,onExit:c,onEntering:a,onEntered:l,onExiting:u,onExited:s},o)});function F(e,t){var n=p.useCallback(function(n){var r=n.target,o=t.reduce(function(e,t){if(!t)return e;var n=function(e){var t;if(!e)return document.body;if("[object String]"===Object.prototype.toString.call(e)){var n=document.getElementById(e);return null!=n?n:document.body}var r=e;return r&&void 0!==r.current?null!==(t=r.current)&&void 0!==t?t:void 0:e}(t);return!1!==e&&n&&null!==n?!n.contains(r):e},!0);e&&o&&e()},[e]);p.useEffect(function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}},[t,n])}var z,I=function(t){var n=t.tag;t.className;var r=t.onDelete;return e.createElement("span",{className:"ui-taginputItem"},e.createElement("span",{className:"ui-taginputItemLabel"},n.label),e.createElement("button",{type:"button",className:"ui-taginputItemRemove",onClick:r},"x"))},D=b(function(t,n){var r=t.className,o=t.value,i=t.onClick,a=t.onChange,l=e.useRef(null),c=e.useCallback(function(e){a&&a(e.target.value)},[a]);return e.useEffect(function(){if(n&&l)return x(n,l.current),function(){x(n,null)}},[n,l]),e.createElement(e.Fragment,null,e.createElement("input",{ref:l,value:o,className:C("ui-taginputFilter",r),autoComplete:"off",spellCheck:"false","data-form-type":"other",onChange:c,onClick:i}))}),U=function(t){var n=t.suggestion,r=t.onClick,o=e.useCallback(function(e){r&&r(n,e)},[r]);return e.createElement("div",{role:"button",className:"ui-taginputSelectItem",tabIndex:0,onClick:o},n.label)},Z=function(t){var n=t.group,r=t.onClick,o=Array.isArray(n.suggestions)?n.suggestions.map(function(t,n){return!0===t.group?e.createElement(Z,{key:n,group:t,onClick:r}):e.createElement(U,{key:n,suggestion:t,onClick:r})}):null;return e.createElement("div",{className:"ui-taginputSelectGroup"},e.createElement("span",{className:"ui-taginputSelectGroupLabel"},n.label),e.createElement("div",{className:"ui-taginputSelectGroupItems"},o))},V=b(function(t,n){var r=t.open,o=t.tags,i=t.disableFilter,a=t.suggestions,l=t.anchorEl,c=t.filter,u=t.onSuggestionClick,s=e.useMemo(function(){if(!Array.isArray(a))return[];if(i)return a;var e=Array.isArray(o)&&o.length>0,t=c&&c.length>0,n=[];return a.forEach(function(r){if(!0!==r.group)e&&o.some(function(e){return e.id===r.id})||t&&r.label.toUpperCase().indexOf(c.toUpperCase())<0||n.push(h({},r));else if(Array.isArray(r.suggestions)){var i=h(h({},r),{suggestions:[]});r.suggestions.forEach(function(n){e&&o.some(function(e){return e.id===n.id})||t&&n.label.toUpperCase().indexOf(c.toUpperCase())<0||i.suggestions.push(h({},n))}),i.suggestions.length>0&&n.push(i)}}),n},[a,c,o]),d=e.useCallback(function(e){u&&u(e)},[u]),m=r&&s.length>0,f=s.map(function(t,n){return!0===t.group?e.createElement(Z,{key:n,group:t,onClick:d}):e.createElement(U,{key:n,suggestion:t,onClick:d})});return e.createElement(T,{ref:n,open:m,anchorEl:l,placement:N.BottomLeft},e.createElement("div",{className:"ui-taginputSelect"},f))}),q=e.createContext({locations:[],setLocations:function(){}});void 0===(z=window.leafletActiveAreaPreviousMethods)&&(z={getCenter:L.Map.prototype.getCenter,setView:L.Map.prototype.setView,flyTo:L.Map.prototype.flyTo,setZoomAround:L.Map.prototype.setZoomAround,getBoundsZoom:L.Map.prototype.getBoundsZoom,PopupAdjustPan:L.Popup.prototype._adjustPan,RendererUpdate:L.Renderer.prototype._update}),L.Map.include({getBounds:function(){if(this._viewport)return this.getViewportLatLngBounds();var e=this.getPixelBounds(),t=this.unproject(e.getBottomLeft()),n=this.unproject(e.getTopRight());return new L.LatLngBounds(t,n)},getViewport:function(){return this._viewport},getViewportBounds:function(){var e=this._viewport,t=L.point(e.offsetLeft,e.offsetTop),n=L.point(e.clientWidth,e.clientHeight);return 0!==n.x&&0!==n.y||(e=this.getContainer())&&(t=L.point(0,0),n=L.point(e.clientWidth,e.clientHeight)),L.bounds(t,t.add(n))},getViewportLatLngBounds:function(){var e=this.getViewportBounds();return L.latLngBounds(this.containerPointToLatLng(e.min),this.containerPointToLatLng(e.max))},getOffset:function(){var e=this.getSize().divideBy(2),t=this.getViewportBounds().getCenter();return e.subtract(t)},getCenter:function(e){var t=z.getCenter.call(this);if(this.getViewport()&&!e){var n=this.getZoom(),r=this.project(t,n);r=r.subtract(this.getOffset()),t=this.unproject(r,n)}return t},setView:function(e,t,n){if(e=L.latLng(e),t=void 0===t?this._zoom:this._limitZoom(t),this.getViewport()){var r=this.project(e,this._limitZoom(t));r=r.add(this.getOffset()),e=this.unproject(r,this._limitZoom(t))}return z.setView.call(this,e,t,n)},flyTo:function(e,t,n){if(e=L.latLng(e),t=void 0===t?l:t,this.getViewport()){var r=this.project(e,this._limitZoom(t));r=r.add(this.getOffset()),e=this.unproject(r,this._limitZoom(t))}if(!1===(n=n||{}).animate||!L.Browser.any3d)return this.setView(e,t,n);this._stop();var o=this.project(z.getCenter.call(this)),i=this.project(e),a=this.getSize(),l=this._zoom,c=Math.max(a.x,a.y),u=c*this.getZoomScale(l,t),s=i.distanceTo(o)||1,d=1.42,m=2.0164;function f(e){var t=(u*u-c*c+(e?-1:1)*m*m*s*s)/(2*(e?u:c)*m*s),n=Math.sqrt(t*t+1)-t;return n<1e-9?-18:Math.log(n)}function p(e){return(Math.exp(e)-Math.exp(-e))/2}function h(e){return(Math.exp(e)+Math.exp(-e))/2}var v=f(0);function g(e){return c*(h(v)*(p(t=v+d*e)/h(t))-p(v))/m;var t}var E=Date.now(),w=(f(1)-v)/d,b=n.duration?1e3*n.duration:1e3*w*.8;return this._moveStart(!0,n.noMoveStart),function n(){var r=(Date.now()-E)/b,a=function(e){return 1-Math.pow(1-e,1.5)}(r)*w;r<=1?(this._flyToFrame=L.Util.requestAnimFrame(n,this),this._move(this.unproject(o.add(i.subtract(o).multiplyBy(g(a)/s)),l),this.getScaleZoom(c/function(e){return c*(h(v)/h(v+d*e))}(a),l),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}.call(this),this},setZoomAround:function(e,t,n){if(this.getViewport()){var r=this.getZoomScale(t),o=this.getViewportBounds().getCenter(),i=(e instanceof L.Point?e:this.latLngToContainerPoint(e)).subtract(o).multiplyBy(1-1/r),a=this.containerPointToLatLng(o.add(i));return this.setView(a,t,{zoom:n})}return z.setZoomAround.call(this,e,t,n)},getBoundsZoom:function(e,t,n){e=L.latLngBounds(e),n=L.point(n||[0,0]);var r=this.getZoom()||0,o=this.getMinZoom(),i=this.getMaxZoom(),a=e.getNorthWest(),l=e.getSouthEast(),c=this.getViewport(),u=(c?L.point(c.clientWidth,c.clientHeight):this.getSize()).subtract(n),s=this.project(l,r).subtract(this.project(a,r)),d=L.Browser.any3d?this.options.zoomSnap:1,m=u.x/s.x,f=u.y/s.y,p=t?Math.max(m,f):Math.min(m,f);return r=this.getScaleZoom(p,r),d&&(r=Math.round(r/(d/100))*(d/100),r=t?Math.ceil(r/d)*d:Math.floor(r/d)*d),Math.max(o,Math.min(i,r))},setActiveArea:function(e,t,n){var r;if(t&&this._zoom&&(r=this.getCenter()),!this._viewport){var o=this.getContainer();this._viewport=L.DomUtil.create("div",""),o.insertBefore(this._viewport,o.firstChild)}return"string"==typeof e?this._viewport.className=e:L.extend(this._viewport.style,e),r&&this.setView(r,this.getZoom(),{animate:!!n}),this}}),L.Renderer.include({_onZoom:function(){this._updateTransform(this._map.getCenter(!0),this._map.getZoom())},_update:function(){z.RendererUpdate.call(this),this._center=this._map.getCenter(!0)}}),L.GridLayer.include({_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(void 0!==e){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=t-Math.abs(e-n),this._onUpdateLevel(n)):(L.DomUtil.remove(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var r=this._levels[e],o=this._map;return r||((r=this._levels[e]={}).el=L.DomUtil.create("div","leaflet-tile-container leaflet-zoom-animated",this._container),r.el.style.zIndex=t,r.origin=o.project(o.unproject(o.getPixelOrigin()),e).round(),r.zoom=e,this._setZoomTransform(r,o.getCenter(!0),o.getZoom()),L.Util.falseFn(r.el.offsetWidth),this._onCreateLevel(r)),this._level=r,r}},_resetView:function(e){var t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(!0),this._map.getZoom(),t,t)},_update:function(e){var t=this._map;if(t){var n=this._clampZoom(t.getZoom());if(void 0===e&&(e=t.getCenter(!0)),void 0!==this._tileZoom){var r=this._getTiledPixelBounds(e),o=this._pxBoundsToTileRange(r),i=o.getCenter(),a=[],l=this.options.keepBuffer,c=new L.Bounds(o.getBottomLeft().subtract([l,-l]),o.getTopRight().add([l,-l]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var s=this._tiles[u].coords;s.z===this._tileZoom&&c.contains(new L.Point(s.x,s.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(e,n);else{for(var d=o.min.y;d<=o.max.y;d++)for(var m=o.min.x;m<=o.max.x;m++){var f=new L.Point(m,d);if(f.z=this._tileZoom,this._isValidTile(f)){var p=this._tiles[this._tileCoordsToKey(f)];p?p.current=!0:a.push(f)}}if(a.sort(function(e,t){return e.distanceTo(i)-t.distanceTo(i)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var h=document.createDocumentFragment();for(m=0;m<a.length;m++)this._addTile(a[m],h);this._level.el.appendChild(h)}}}}}}),L.Popup.include({_adjustPan:function(){if(this._map._viewport){if(!this.options.autoPan)return;this._map._panAnim&&this._map._panAnim.stop();var e=this._map,t=e._viewport,n=this._container.offsetHeight,r=this._containerWidth,o=L.point(t.offsetLeft,t.offsetTop),i=new L.Point(this._containerLeft-o.x,-n-this._containerBottom-o.y);i._add(L.DomUtil.getPosition(this._container));var a=e.layerPointToContainerPoint(i),l=L.point(this.options.autoPanPadding),c=L.point(this.options.autoPanPaddingTopLeft||l),u=L.point(this.options.autoPanPaddingBottomRight||l),s=L.point(t.clientWidth,t.clientHeight),d=0,m=0;a.x+r+u.x>s.x&&(d=a.x+r-s.x+u.x),a.x-d-c.x<0&&(d=a.x-c.x),a.y+n+u.y>s.y&&(m=a.y+n-s.y+u.y),a.y-m-c.y<0&&(m=a.y-c.y),(d||m)&&e.fire("autopanstart").panBy([d,m])}else z.PopupAdjustPan.call(this)}});var W=function(t){var n=l.useMap();e.useEffect(function(){n.setActiveArea("cortex-widget-viewport",!0,!0),c.Control.CenterActiveArea=c.Control.extend({onAdd:function(){var e=null;e=n.zoomControl&&!this.options.forceSeparateButton?n.zoomControl._container:c.DomUtil.create("div","leaflet-bar"),c.DomEvent.disableClickPropagation(e);var t=c.DomUtil.create("a","",e);return t.href="#",t.title="Centrer",t.innerHTML='\n <img src="'.concat(H,'" width="15px" style="margin-top: 7px; filter: brightness(0%)" />\n '),t.setAttribute("role","button"),t.setAttribute("aria-label",t.title),c.DomEvent.on(t,"click",c.DomEvent.stop).on(t,"click",a),e}}),c.control.centerActiveArea=function(e){return new c.Control.CenterActiveArea(e)},c.control.centerActiveArea({position:"topleft"}).addTo(n),t.autoCenter&&i()},[]),e.useEffect(function(){t.autoCenter&&i()},[t.autoCenter]);var r=e.useCallback(function(){var e=c.featureGroup();return n.eachLayer(function(t){t instanceof c.Marker&&e.addLayer(t)}),e},[n]),o=e.useCallback(function(){var e=c.featureGroup();return n.eachLayer(function(t){t instanceof c.Polygon&&e.addLayer(t)}),e},[n]),i=e.useCallback(function(){var e=r().getBounds();o().eachLayer(function(t){e.extend(t.getBounds())}),e.isValid()&&n.fitBounds(e,{animate:!0})},[]),a=e.useCallback(function(){i()},[n]);return e.createElement(e.Fragment,null)},H="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABcRAAAXEQHKJvM/AAAAB3RJTUUH4wMIFTgXULHJFAAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAhUlEQVRo3u3asQ2AIBAF0MO4p42FI1nYOKlugAUnJvL+BLzwcxGw7Md5RUO2dSmRkNZ1TPGTgICADAIptbGXNVqzUluraoGADAKZv/rIy56UqvVFartVVEu1QEBAQEBAQEBAQEAaz+xuGlXrpWr1PlvbERAQEJCIhzfEnqPYLxwgICBjQW7ewSYPr/zk7gAAAABJRU5ErkJggg==",X=function(t){var n=l.useMap();return e.useEffect(function(){d.leaflet.control.fullscreen(h({position:"topleft"},t||{})).addTo(n)},[]),e.createElement(e.Fragment,null)},Y=function(t){var n,r,o={edit:!!(null==t?void 0:t.editable)&&{}};return e.createElement(m.EditControl,{onCreated:t.handleOnCreated,onDeleted:t.handleOnDeleted,onEdited:t.handleOnEdited,position:null!==(n=t.position)&&void 0!==n?n:"topright",draw:null!==(r=t.draw)&&void 0!==r?r:{rectangle:!1,circle:!1,circlemarker:!1,polyline:!1},edit:o})},G=function(t){var n,r={polygon:!0,marker:!0,rectangle:!1,circle:!1,circlemarker:!1,polyline:!1},o=e.useState(r);o[0];var i=o[1],a=e.useState("standard"),d=a[0],m=a[1],f=e.useContext(q),p=f.locations,v=f.setLocations;e.useEffect(function(){var e;null===(e=null==t?void 0:t.onChange)||void 0===e||e.call(t,p)},[p]),e.useEffect(function(){c.Icon.Default.mergeOptions({iconRetinaUrl:u,shadowUrl:s,iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]}),p&&p.length>0&&i(function(e){var t=h({},e);return Object.keys(t).forEach(function(e){t[e]=!1}),t})},[]);var g=function(e){var t,n,r,o=e.layerType,a=e.layer;i(function(e){var t=h({},e);return Object.keys(t).forEach(function(e){t[e]=!1}),t});var l=[];"polygon"!==o&&"rectangle"!==o||(l=null===(n=null===(t=a._latlngs)||void 0===t?void 0:t[0])||void 0===n?void 0:n.map(function(e,t){return{latitude:e.lat,longitude:e.lng,order:t+1}})),"marker"!==o&&"circle"!==o&&"circlemarker"!==o||l.push({order:1,latitude:a._latlng.lat,longitude:a._latlng.lng,id:a._leaflet_id}),"polyline"===o&&(l=null===(r=a._latlngs)||void 0===r?void 0:r.map(function(e,t){return{latitude:e.lat,longitude:e.lng,order:t+1}})),v(function(e){return w(w([],e,!0),[{points:l,id:a._leaflet_id}],!1)})},E=function(e){var t=e.layers;v(function(e){var n=Object.values(t.getLayers());return e.filter(function(e){return(null==e?void 0:e.points)&&1===e.points.length}).map(function(e){var t=n.find(function(t){return t._leaflet_id===e.points[0].id});if(t){var r=h({},e.points[0]),o=t.getLatLng();return Math.abs(r.latitude-o.lat)>1e-6||Math.abs(r.longitude-o.lng)>1e-6?{points:[{id:e.id,latitude:n[0]._latlng.lat,longitude:n[0]._latlng.lng,order:e.points[0].order}],id:e.id,objId:e.objId}:e}return e})})},b=e.useMemo(function(){var e,n;if((null==t?void 0:t.singlePosition)&&p.length>(null!==(n=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.length)&&void 0!==n?n:0)){var r={draw:{marker:!1,polygon:!1,rectangle:!1,circle:!1,circlemarker:!1,polyline:!1}};return"boolean"!=typeof(null==t?void 0:t.drawTools)&&(r=h(h({},null==t?void 0:t.drawTools),r)),r}return"boolean"!=typeof(null==t?void 0:t.drawTools)?null==t?void 0:t.drawTools:!0===(null==t?void 0:t.drawTools)?{draw:{marker:!0,polygon:!0,rectangle:!0,circle:!0,circlemarker:!0,polyline:!0}}:void 0},[null==t?void 0:t.singlePosition,null==t?void 0:t.drawTools,p,null==t?void 0:t.data]);return e.createElement(e.Fragment,null,e.createElement("style",null,".leaflet-container { min-height: 80px; min-width: 80px; height: 100%; width: 100% }"),e.createElement(l.MapContainer,h({center:t.center||[0,0],zoom:t.zoom||13,maxZoom:t.maxZoom,minZoom:t.minZoom},t.MapContainerProps),e.createElement(l.TileLayer,{key:d,attribution:"standard"===d?'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors':'&copy; <a href="https://www.google.com/maps">Google Maps</a>',url:"standard"===d?"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png":"https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}"}),t.toggleSatelliteView&&e.createElement("div",{style:{position:"absolute",bottom:"10px",left:"10px",zIndex:1e3,background:"white",padding:"7px 10px",borderRadius:"5px"}},e.createElement("label",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"}},e.createElement("input",{type:"checkbox",checked:"satellite"===d,onChange:function(){return m("standard"===d?"satellite":"standard")}}),"Satellite View")),t.fullscreen&&e.createElement(X,h({},"boolean"==typeof t.fullscreen?{}:t.fullscreen)),e.createElement(l.FeatureGroup,null,t.drawTools&&p.length>0&&e.createElement(Y,h({},b,{handleOnCreated:g,handleOnEdited:E})),0===p.length&&e.createElement(Y,h({},b,{handleOnCreated:g,handleOnDeleted:function(e){0!==Object.keys(e.layers._layers).length&&(i(function(e){return h(h({},r),{workaround:Math.random()})}),v(p))},handleOnEdited:E})),(null==t?void 0:t.data)&&(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.map(function(t){return t.points.length>1?e.createElement(l.Polygon,{key:"marker-".concat(t.objId),positions:t.points.map(function(e){return[e.latitude,e.longitude]})}):e.createElement(l.Marker,{key:"marker-".concat(t.id),position:[t.points[0].latitude,t.points[0].longitude]})}))),t.centerActiveArea&&e.createElement(W,h({autoCenter:p&&p.length>0},"boolean"==typeof t.centerActiveArea?{}:t.centerActiveArea))))},Q=function(t){var n=t.containerRef;t.className;var r=t.children,o=t.onClick;t.onClose;var i=e.useRef(null);return e.useEffect(function(){if(i&&n&&i.current&&n.current){var e=n.current.getBoundingClientRect(),t=i.current.getBoundingClientRect(),r=e.width,o="0px",a="unset";e.right+t.width>=window.innerWidth&&(r=-t.width),t.bottom>=window.innerHeight&&(a="".concat(-(window.innerHeight-e.bottom-15).toFixed(),"px"),o="unset"),i.current.setAttribute("style","opacity: 1; left: ".concat(r.toFixed(),"px; bottom: ").concat(a,"; top: ").concat(o,";"))}},[i,n]),e.createElement("div",{ref:i,className:"ui-menu"},e.createElement("ul",{className:"ui-menuList",onClick:o,onContextMenu:o},r))};function J(e){var t=p.useState(),n=t[0],r=t[1];return p.useEffect(function(){r(function(e){var t;if(e){if("[object String]"===Object.prototype.toString.call(e)){var n=document.getElementById(e);return null!=n?n:void 0}var r=e;return r&&void 0!==r.current?null!==(t=r.current)&&void 0!==t?t:void 0:e}}(e))},[e]),n}var K=function(t){var n=t.className;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 7",fill:"none",className:C("ui-icon",n),transform:"rotate(90 0 0)",preserveAspectRatio:"xMidYMid meet"},e.createElement("path",{d:"M5.3,0.3c0.4-0.4,1-0.4,1.4,0l5,5c0.4,0.4,0.4,1,0,1.4c-0.4,0.4-1,0.4-1.4,0L6,2.4L1.7,6.7c-0.4,0.4-1,0.4-1.4,0c-0.4-0.4-0.4-1,0-1.4L5.3,0.3z"}))},$=function(t){var n=t.className;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:C("ui-icon",n)},e.createElement("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}))},ee=function(t){var n=t.label,r=t.icon,o=t.className,i=t.style;t.active;var a=t.disable,l=t.children,c=t.itemTemplate,u=t.onClick,s=e.useState(!1),d=s[0],m=s[1],f=e.useRef(null),p=e.useCallback(function(e){u&&!0!==a&&u(e)},[u,a]),h=null!=l;return e.createElement("li",{className:C("ui-menuItem",!0===a?"ui-menuItem-disable":null,o),style:i,onMouseEnter:function(){m(!0)},onMouseLeave:function(){m(!1)},ref:f},e.createElement("button",{type:"button",className:"ui-menuItem-btn",onClick:p},r&&e.createElement("div",{className:"ui-menuItem-icon"},r),e.createElement("span",null,null!=c?c:n),h&&e.createElement("div",{className:"ui-menuItem-menuIconContainer"},e.createElement(K,{className:"ui-menuItem-menuIcon"}))),h&&d&&e.createElement(Q,{containerRef:f},l))},te=function(t){t.open;var n=t.width,r=t.fullWidth,o=t.fullHeight,i=t.className,a=t.children,l=t.onClose,c=e.useRef(),u=e.useRef(null),s=e.useRef(null);e.useEffect(function(){return c.current=document.body.style.overflow,document.body.style.overflow="hidden",function(){var e;document.body.style.overflow=null!==(e=c.current)&&void 0!==e?e:"initial"}},[]);var d=e.useCallback(function(){l&&l()},[l]);return e.createElement(y,{ref:u},e.createElement("div",{ref:function(e){s.current=e},style:{position:"fixed",margin:"0"},role:"dialog",className:C("ui-dialog",i)},e.createElement("div",{role:"presentation",className:"ui-dialog-overlay",onClick:d}),e.createElement("div",{className:C("ui-dialog-container",n?"ui-dialog-size-".concat(n):null,!0===r?"ui-dialog-size-fullwidth":null,!0===o?"ui-dialog-size-fullheight":null)},a)))},ne=function(t){var n=t.className,r=t.children;return e.createElement("div",{className:C("ui-dialog-content",n)},r)},re=function(t){var n=t.className,r=t.children;return e.createElement("footer",{className:C("ui-dialog-footer",n)},r)},oe=function(t){var n=t.className,r=t.children;return e.createElement("header",{className:C("ui-dialog-header",n)},r)};exports.AuthDownloadLink=function(t){var n=t.url,r=t.queryParams,o=t.token,i=t.label,a=t.onStart,l=t.onCompleted,c=t.onError,u=function(e){var t=e.get("Content-Disposition");if(!t)return null;var n=t.split(";"),r="filename=",o=n.find(function(e){return e.indexOf(r)>-1});if(o){var i=o.search(r);if(i<0)return null;var a=o.substring(i+9).trim();if(0===a.length)return null;var l=a.substring(0,1);return'"'!==l&&"'"!==l?a:a.length<2||a[a.length-1]!==l?null:a.substring(1,a.length-1)}return null};return e.createElement(e.Fragment,null,e.createElement(ee,{label:i,onClick:function(e){return g(void 0,void 0,void 0,function(){var t,i,s,d,m,f,p,h;return E(this,function(v){switch(v.label){case 0:a&&a(e),v.label=1;case 1:if(v.trys.push([1,4,,5]),!o)throw new Error("INVALID_TOKEN");if(!n)throw new Error("INVALID_URL");return(t={}).ContentType="application/json",t.Authorization="Bearer ".concat(o),i={method:"get",headers:t},s=new URL(n),r&&Object.keys(r).forEach(function(e){return s.searchParams.append(e,r[e])}),[4,fetch(s,i)];case 2:if(!(d=v.sent())||200!==d.status)throw new Error("An error occured while generating file");return[4,d.blob()];case 3:return(m=v.sent())&&(f=window.URL.createObjectURL(m),(p=document.createElement("a")).href=f,p.download=u(d.headers)||"file",p.click(),URL.revokeObjectURL(f),p.remove()),[3,5];case 4:throw h=v.sent(),c&&c(h),h;case 5:return l&&l(),[2]}})})}}))},exports.BarLoader=function(t){var n=t.title,r=t.color,o=t.className,i=t.isComplete;return e.createElement(e.Fragment,null,e.createElement("div",{className:C("loader",null!=r?"loader-color-".concat(r):"loader-color-blue",!0===i?"completed":"",o)},e.createElement("div",{className:C("loaderBar",null!=r?"loaderBar-color-".concat(r):"loaderBar-color-blue")})),e.createElement("div",{className:C("loaderBar-title")},e.createElement("span",null,n)))},exports.Button=_,exports.Camera=function(t){var n=t.onCapture,l=t.isOffline,c=void 0!==l&&l,u=t.mode,s=void 0===u?"photo":u,d=t.validateText,m=void 0===d?"Valider":d,f=t.resetText,p=void 0===f?"Annuler":f,w=t.isShowOffline,b=void 0!==w&&w,y=t.isShowVideoButton,x=void 0!==y&&y,C=t.isShowSwitchButton,k=void 0!==C&&C,L=v(t,["onCapture","isOffline","mode","validateText","resetText","isShowOffline","isShowVideoButton","isShowSwitchButton"]),A=e.useRef(null),N=e.useRef(null),T=e.useRef(new O),S=e.useState(s),B=S[0],M=S[1],R=e.useState(!1),P=R[0],j=R[1],F=e.useState(!1),z=F[0],I=F[1],D=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)||navigator.maxTouchPoints>0||"ontouchstart"in document.documentElement,U=i.MdCameraswitch,Z=o.FaCamera,V=a.BsFillRecordFill,q=o.FaStop,W=o.FaPlay,H=o.FaPause,X=function(){var t=e.useRef(null),n=e.useState(0),r=n[0],o=n[1],i=function(e){var t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),o=e%60;return"".concat(t>0?t.toString().padStart(2,"0").concat(":"):"").concat(n>0?n.toString().padStart(2,"0").concat(":"):"").concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0"))},a=e.useMemo(function(){return i(r)},[r]),l=e.useCallback(function(){o(0),t.current=setInterval(function(){o(function(e){return e+1})},1e3)},[]),c=e.useCallback(function(){t.current&&(clearInterval(t.current),t.current=null)},[]);return{formatTime:i,startTimer:l,stopTimer:c,formatedTime:a}}(),Y=X.formatedTime,G=X.startTimer,Q=X.stopTimer,J=e.useState({imageUrl:null,videoUrl:null,isRecording:!1,storedFileId:null,file:null}),K=J[0],$=J[1],ee=e.useState({facingMode:"environment",width:{min:200},height:{min:300}});ee[0];var te=ee[1];e.useEffect(function(){return te({facingMode:D?"environment":"user",width:{min:200},height:{min:300}}),function(){oe(),Q(),ie()}},[]),e.useEffect(function(){"video"===B&&j(!1)},[K]);var ne=e.useCallback(function(){return g(void 0,void 0,void 0,function(){var e,t,n,r,o,i,a,l,c,u;return E(this,function(s){if(e=null===(u=A.current)||void 0===u?void 0:u.getScreenshot()){for(t=atob(e.split(",")[1]),n=new Array(t.length),r=0;r<t.length;r++)n[r]=t.charCodeAt(r);o=new Uint8Array(n),i=new Blob([o],{type:"image/jpeg"}),a="captured_image_".concat(Date.now().toString().slice(-7),".jpg"),l=new File([i],a,{type:"image/jpeg"}),c=URL.createObjectURL(l),$(function(e){return h(h({},e),{imageUrl:c,file:l})})}return[2]})})},[A,c,n]),re=e.useCallback(function(){if(A.current&&A.current.stream){var e="webm",t="video/".concat(e);MediaRecorder.isTypeSupported("video/mp4")&&(e="mp4",t="video/mp4");var n=new MediaRecorder(A.current.stream,{mimeType:t}),r=[];n.ondataavailable=function(e){e.data.size>0&&r.push(e.data)},n.onstop=function(){return g(void 0,void 0,void 0,function(){var n,o,i,a;return E(this,function(l){return n=new Blob(r,{type:t}),o="captured_video_".concat(Date.now(),".").concat(e),i=new File([n],o,{type:t}),a=URL.createObjectURL(i),$(function(e){return h(h({},e),{videoUrl:a,isRecording:!1,file:i})}),Q(),[2]})})},n.start(),N.current=n,G(),$(function(e){return h(h({},e),{isRecording:!0})})}},[A,c,G,Q,n]),oe=function(){$({imageUrl:null,videoUrl:null,isRecording:!1,storedFileId:null,file:null})};return e.createElement("div",{className:"camera-container"},K.imageUrl||K.videoUrl?e.createElement("div",{className:"camera-preview camera-screen-animation"},K.imageUrl&&e.createElement("img",{src:K.imageUrl,alt:"Capturé",style:{height:"90%",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center"}}),K.videoUrl&&e.createElement("video",{width:"100%",height:"90%",id:"video",style:{height:"90%",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center"},onEnded:function(){return j(!1)}},e.createElement("source",{src:K.videoUrl,type:"video/mp4"}),e.createElement("source",{src:K.videoUrl,type:"video/webm"}),e.createElement("track",{kind:"captions",src:"",lang:"en",label:"English",default:!0}),"Your browser does not support the video."),K.videoUrl&&e.createElement(_,{variant:"contained",className:"video-play-btn",onClick:function(){var e=document.getElementById("video");try{e.paused?e.play():e.pause(),j(!P)}catch(e){}}},P?e.createElement(H,null):e.createElement(W,null)),e.createElement("div",{className:"camera-controls"},e.createElement(_,{variant:"contained",onClick:function(){return g(void 0,void 0,void 0,function(){var e;return E(this,function(t){switch(t.label){case 0:return c?[4,T.current.storeFile(K.file)]:[3,2];case 1:e=t.sent(),n({fileRowId:e,fileStoreName:"capturedFiles"}),t.label=2;case 2:return c||"photo"!==B||n({file:K.file,imageSrc:K.imageUrl}),c||"video"!==B||n({file:K.file,videoSrc:K.videoUrl}),oe(),[2]}})})},className:"camera-button camera-button--download"},m),e.createElement(_,{variant:"outlined",onClick:oe,className:"camera-button camera-button--reset"},p))):e.createElement("div",{className:"camera-preview"},K.isRecording&&e.createElement("div",{className:"camera-recording-timer",style:{display:"video"===B?"flex":"none"}},e.createElement("span",{className:"camera-recording-dot"}),e.createElement("span",null,Y)),!K.isRecording&&x&&e.createElement("button",{type:"button",onClick:function(){return M("photo"===B?"video":"photo"),void oe()},className:"camera-button camera-mode"},e.createElement("span",null,"photo"===B?"Video":"Photo")),D&&!K.isRecording&&k&&e.createElement("button",{type:"button",onClick:function(){I(!z),te({facingMode:z?"environment":"user",width:{min:200},height:{min:300}})},className:"camera-button camera-switch"},e.createElement(U,{size:18})),c&&b&&e.createElement("div",{className:"camera-offline-mode"},"Offline mode"),e.createElement(r,h({ref:A,videoConstraints:{facingMode:"environment",width:{min:200},height:{min:300}}},L,{style:{height:"90% !important",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center",margin:"0 auto"},screenshotFormat:"image/jpeg",allowFullScreen:!0})),e.createElement("div",{className:"camera-controls"},"photo"===B&&e.createElement(_,{variant:"contained",className:"camera-button camera-button--capture",onClick:ne},e.createElement(Z,{size:28})),"video"===B&&!K.isRecording&&e.createElement(_,{variant:"contained",onClick:re,className:"camera-button camera-button--record"},e.createElement(V,{size:30})),"video"===B&&K.isRecording&&e.createElement(_,{variant:"contained",onClick:ie,className:"camera-button camera-button--record"},e.createElement(q,{size:28})))));function ie(){N.current&&N.current.stop()}},exports.ChevronDownIcon=function(t){var n=t.className;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",className:C("ui-icon",n),transform:"rotate(180 0 0)"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.2929 8.29289C11.6834 7.90237 12.3166 7.90237 12.7071 8.29289L17.7071 13.2929C18.0976 13.6834 18.0976 14.3166 17.7071 14.7071C17.3166 15.0976 16.6834 15.0976 16.2929 14.7071L12 10.4142L7.70711 14.7071C7.31658 15.0976 6.68342 15.0976 6.29289 14.7071C5.90237 14.3166 5.90237 13.6834 6.29289 13.2929L11.2929 8.29289Z"}))},exports.ChevronLeftIcon=function(t){var n=t.className;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 7",fill:"none",className:C("ui-icon",n),transform:"rotate(270 0 0)",preserveAspectRatio:"xMidYMid meet"},e.createElement("path",{d:"M5.3,0.3c0.4-0.4,1-0.4,1.4,0l5,5c0.4,0.4,0.4,1,0,1.4c-0.4,0.4-1,0.4-1.4,0L6,2.4L1.7,6.7c-0.4,0.4-1,0.4-1.4,0c-0.4-0.4-0.4-1,0-1.4L5.3,0.3z"}))},exports.ChevronRightIcon=K,exports.ConfirmDialog=function(t){var n=t.title,r=t.ok,o=t.cancel,i=t.children,a=t.className,l=t.onClose,c=e.useCallback(function(){l&&l(!1)},[l]),u=e.useCallback(function(){l&&l(!0)},[l]),s=null!=r?r:"oui",d=null!=o?o:"Annuler";return e.createElement(te,{open:!0,className:C("ui-dialog-box","ui-dialog-confirm",a)},e.createElement(oe,null,e.createElement(e.Fragment,null,e.createElement("svg",{className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 438.5 438.5"},e.createElement("path",{d:"M409.1,109.2c-19.6-33.6-46.2-60.2-79.8-79.8C295.7,9.8,259.1,0,219.3,0c-39.8,0-76.5,9.8-110.1,29.4\r\n C75.6,49,49,75.6,29.4,109.2C9.8,142.8,0,179.5,0,219.3c0,39.8,9.8,76.5,29.4,110.1c19.6,33.6,46.2,60.2,79.8,79.8\r\n c33.6,19.6,70.3,29.4,110.1,29.4s76.5-9.8,110.1-29.4c33.6-19.6,60.2-46.2,79.8-79.8c19.6-33.6,29.4-70.3,29.4-110.1\r\n C438.5,179.5,428.7,142.8,409.1,109.2z M387.4,290.2c-9.7,22.6-22.7,42-39,58.2c-16.3,16.3-35.7,29.3-58.2,39\r\n c-22.6,9.7-46.2,14.6-70.9,14.6s-48.4-4.9-70.9-14.6c-22.6-9.7-42-22.7-58.2-39c-16.3-16.3-29.3-35.7-39-58.2\r\n c-9.7-22.6-14.6-46.2-14.6-70.9c0-24.7,4.9-48.4,14.6-70.9c9.7-22.6,22.7-42,39-58.2c16.3-16.3,35.7-29.3,58.2-39\r\n c22.6-9.7,46.2-14.6,70.9-14.6c24.7,0,48.4,4.9,70.9,14.6c22.6,9.7,42,22.7,58.2,39c16.3,16.3,29.3,35.7,39,58.2\r\n c9.7,22.6,14.6,46.2,14.6,70.9C402,244,397.1,267.7,387.4,290.2z"}),e.createElement("path",{d:"M217,294c-14.6,0-26.5,12.2-26.5,26.8c0,14.3,11.5,26.8,26.5,26.8s26.8-12.5,26.8-26.8C243.8,306.2,231.6,294,217,294z"}),e.createElement("path",{d:"M221.5,90.8c-47.1,0-68.7,27.9-68.7,46.7c0,13.6,11.5,19.9,20.9,19.9c18.8,0,11.2-26.8,46.7-26.8c17.4,0,31.4,7.7,31.4,23.7\r\n c0,18.8-19.5,29.6-31,39.4c-10.1,8.7-23.4,23-23.4,53c0,18.1,4.9,23.4,19.2,23.4c17.1,0,20.6-7.7,20.6-14.3\r\n c0-18.1,0.4-28.6,19.5-43.6c9.4-7.3,39-31,39-63.8S266.1,90.8,221.5,90.8z"})),e.createElement("h1",{className:"ui-dialog-title"},n))),e.createElement(ne,null,i),e.createElement(re,null,e.createElement(_,{className:"dialog-action-ok dialog-action",onClick:u},s),e.createElement(_,{className:"dialog-action-close dialog-action",onClick:c},d)))},exports.ContextMenu=function(t){var n=t.className,r=t.children,o=t.placement,i=t.open,a=t.container,l=t.onOpen,c=t.onClose,u=e.useRef(null),s=J(a),d=e.useState(null),m=d[0],f=d[1];F(function(){i&&c&&c()},[u]);var p=e.useCallback(function(e){var t=e;t.preventDefault(),t.ctrlKey||(f({mouseX:t.pageX-2,mouseY:t.pageY-4}),l&&l())},[l]),h=function(e){e.preventDefault()};e.useEffect(function(){var e=null!=s?s:document;return e.addEventListener("contextmenu",p),e!==document&&document.addEventListener("contextmenu",h),function(){e.removeEventListener("contextmenu",p),document.removeEventListener("contextmenu",h)}},[s,p]);return e.createElement(T,{ref:u,anchorPosition:null!==m?{top:m.mouseY,left:m.mouseX}:void 0,placement:o,open:i,overflow:!1},e.createElement(Q,{className:n,onClose:c,onClick:function(e){e&&2===e.button&&(e.preventDefault(),e.stopPropagation())},containerRef:u},r))},exports.CrossIcon=$,exports.Dialog=te,exports.DialogActions=function(t){var n=t.className,r=t.children;return e.createElement("div",{className:C("ui-dialog-actions",n)},r)},exports.DialogContent=ne,exports.DialogFooter=re,exports.DialogHeader=oe,exports.DialogTitle=function(t){var n=t.className,r=t.children,o=t.closeDisable,i=t.onClose,a=e.useCallback(function(){i&&!0!==o&&i()},[i,o]),l=void 0!==i;return e.createElement("h3",{className:C("ui-dialog-title",n)},r,l&&e.createElement("button",{type:"button",className:C("ui-dialog-close",o?"ui-dialog-close-disable":null),tabIndex:0,onClick:a},e.createElement($,null)))},exports.Divider=function(t){return t.className,e.createElement("hr",null)},exports.DomContainer=y,exports.ErrorDialog=function(t){var n=t.title,r=t.ok,o=t.children,i=t.className,a=t.onClose,l=e.useCallback(function(){a&&a(!0)},[a]),c=null!=r?r:"fermer";return e.createElement(te,{open:!0,className:C("ui-dialog-box","ui-dialog-error",i)},e.createElement(oe,null,e.createElement(e.Fragment,null,e.createElement("svg",{className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 438.533 438.533"},e.createElement("path",{d:"M409.133,109.203c-19.608-33.592-46.205-60.189-79.798-79.796C295.736,9.801,259.058,0,219.273,0 c-39.781,0-76.47,9.801-110.063,29.407c-33.595,19.604-60.192,46.201-79.8,79.796C9.801,142.8,0,179.489,0,219.267 c0,39.78,9.804,76.463,29.407,110.062c19.607,33.592,46.204,60.189,79.799,79.798c33.597,19.605,70.283,29.407,110.063,29.407 s76.47-9.802,110.065-29.407c33.593-19.602,60.189-46.206,79.795-79.798c19.603-33.596,29.403-70.284,29.403-110.062 C438.533,179.485,428.732,142.795,409.133,109.203z M387.434,290.213c-9.709,22.556-22.696,41.97-38.969,58.245 c-16.271,16.269-35.689,29.26-58.245,38.965c-22.555,9.712-46.202,14.564-70.946,14.564c-24.744,0-48.391-4.853-70.948-14.564 c-22.554-9.705-41.971-22.696-58.245-38.965c-16.269-16.275-29.259-35.687-38.97-58.245 c-9.707-22.552-14.562-46.206-14.562-70.946c0-24.744,4.854-48.391,14.562-70.948c9.707-22.554,22.697-41.968,38.97-58.245 c16.274-16.269,35.691-29.26,58.245-38.97c22.554-9.704,46.205-14.558,70.948-14.558c24.74,0,48.395,4.851,70.946,14.558 c22.556,9.707,41.97,22.698,58.245,38.97c16.272,16.274,29.26,35.688,38.969,58.245c9.709,22.554,14.564,46.201,14.564,70.948 C402.002,244.011,397.143,267.664,387.434,290.213z"}),e.createElement("path",{d:"M284.368,258.668c-19.219-14.086-40.926-21.129-65.095-21.129c-24.172,0-45.871,7.039-65.096,21.129 c-19.224,14.085-32.358,32.641-39.397,55.671c-1.521,4.757-1.143,9.381,1.141,13.847c2.286,4.469,5.898,7.467,10.85,8.993 c4.758,1.526,9.373,1.143,13.846-1.144c4.471-2.285,7.467-5.899,8.991-10.848c4.759-15.235,13.562-27.556,26.409-36.979 c12.847-9.418,27.263-14.127,43.252-14.127c15.987,0,30.412,4.712,43.251,14.127c12.854,9.424,21.655,21.744,26.412,36.979 c1.52,4.948,4.564,8.562,9.134,10.848c4.568,2.286,9.236,2.67,13.989,1.144c4.761-1.526,8.278-4.524,10.564-8.993 c2.286-4.466,2.669-9.09,1.14-13.847C316.729,291.312,303.591,272.75,284.368,258.668z"}),e.createElement("path",{d:"M146.181,182.725c10.085,0,18.699-3.576,25.837-10.709c7.139-7.135,10.708-15.749,10.708-25.837 c0-10.089-3.569-18.699-10.708-25.837s-15.752-10.709-25.837-10.709c-10.088,0-18.702,3.571-25.84,10.709 c-7.135,7.139-10.707,15.749-10.707,25.837c0,10.088,3.568,18.702,10.707,25.837C127.482,179.152,136.093,182.725,146.181,182.725 z"}),e.createElement("path",{d:"M292.359,109.631c-10.089,0-18.706,3.571-25.845,10.709c-7.132,7.139-10.708,15.749-10.708,25.837 c0,10.088,3.576,18.702,10.708,25.837c7.139,7.137,15.756,10.709,25.845,10.709c10.081,0,18.698-3.576,25.837-10.709 c7.139-7.135,10.708-15.749,10.708-25.837c0-10.089-3.569-18.699-10.708-25.837S302.44,109.631,292.359,109.631z"})),e.createElement("h1",{className:"ui-dialog-title"},n))),e.createElement(ne,null,o),e.createElement(re,null,e.createElement(_,{className:"dialog-action-ok dialog-action",onClick:l},c)))},exports.Map=function(t){var n=t.customButtons,r=t.onClose,o=t.onSave,i=v(t,["customButtons","onClose","onSave"]),a=e.useState(i.data?i.data:[]),l=a[0],c=a[1],u=function(){return g(void 0,void 0,void 0,function(){return E(this,function(e){return null==o||o(l),[2]})})},s=function(){return g(void 0,void 0,void 0,function(){return E(this,function(e){return null==r||r(),[2]})})};e.useEffect(function(){var e,t,r=null===(e=null==n?void 0:n.saveButton)||void 0===e?void 0:e.addEventListener("click",function(){u()}),o=null===(t=null==n?void 0:n.cancelButton)||void 0===t?void 0:t.addEventListener("click",function(){s()});return function(){var e,t;null===(e=null==n?void 0:n.saveButton)||void 0===e||e.removeEventListener("click",r),null===(t=null==n?void 0:n.cancelButton)||void 0===t||t.removeEventListener("click",o)}},[l]);return e.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"90%",height:"400px",margin:"20px"}},e.createElement(q.Provider,{value:{locations:l,setLocations:c}},e.createElement(G,h({},i)),!n&&e.createElement("div",{className:"cortex-widget-buttons"},e.createElement("button",{className:"cortex-widget-btn cortex-widget-btn-cancel",type:"button",onClick:s},"Cancel"),e.createElement("button",{className:"cortex-widget-btn cortex-widget-btn-save",type:"button",onClick:u},"Save"))))},exports.Menu=Q,exports.MenuGroup=function(t){var n=t.title,r=t.className,o=t.children;return e.createElement(e.Fragment,null,e.createElement("li",{className:C("ui-group-title",r)},n),o)},exports.MenuItem=ee,exports.Popper=T,exports.PopupMenu=function(t){var n=t.className,r=t.children,o=t.placement,i=t.open,a=t.anchorPosition,l=t.anchorEl,c=t.onClose,u=e.useRef(null);F(function(){i&&c&&c()},[u]);return i&&(a||l)?e.createElement(T,{ref:u,anchorPosition:a,anchorEl:l,placement:o,open:i,overflow:!1,className:"ui-menu-popper"},e.createElement(Q,{className:n,onClose:c,onClick:function(e){e&&2===e.button&&(e.preventDefault(),e.stopPropagation())},containerRef:u},r)):null},exports.Scanner=function(t){var r=t.scanConfirmation,o=void 0===r||r,i=t.scanTrackerType,a=void 0===i?"centerText":i,l=v(t,["scanConfirmation","scanTrackerType"]),c=e.useState(!1),u=c[0],s=c[1],d=e.useState(!1),m=d[0],f=d[1],p=e.useState([]),g=p[0],E=p[1],w=function(){s(!1),f(!1)},b=e.useMemo(function(){switch(a){case"outline":return n.outline;case"boundingBox":return n.boundingBox;case"centerText":return n.centerText;default:return}},[a]),y=e.useCallback(function(){w(),l.onScan(g)},[l,g]),x=e.useCallback(function(e){o&&(s(!0),f(!0),E(e))},[l]);return e.createElement(e.Fragment,null,e.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",gap:"15px",margin:"20px"}},e.createElement(n.Scanner,h({formats:["qr_code","micro_qr_code","rm_qr_code","maxi_code","pdf417","aztec","data_matrix","matrix_codes","dx_film_edge","databar","databar_expanded","codabar","code_39","code_93","code_128","ean_8","ean_13","itf","linear_codes","upc_a","upc_e"],components:{onOff:!0,torch:!0,tracker:b,finder:!1},scanDelay:2e3,allowMultiple:!1},l,{onScan:x,paused:m}))),e.createElement(R,h({open:u,onClose:w,onConfirm:y},null==l?void 0:l.scanConfirmDialog)))},exports.Selected=function(t){var n=t.title,r=t.data,o=t.onClick;return e.createElement(e.Fragment,null,e.createElement("div",{className:C("ui-selected-params")},e.createElement("div",{className:C("ui-selected-title")},n),e.createElement("div",{className:C("ui-selected-content")},e.createElement(e.Fragment,null,Array.isArray(r)&&r.map(function(t,n){return e.createElement(e.Fragment,null,e.createElement("div",{key:n,className:C("ui-selected-button")},e.createElement("button",{type:"button",onClick:function(){o(t)},className:1===t.selected?"ui-selected-btn":0===t.selected?"ui-not-selected":"ui-new-selected"},t.name)))})))))},exports.Spinner=function(t){var n=t.className,r=t.variant,o=void 0===r?"indeterminate":r;return e.createElement("div",{className:C("ui-spinner","indeterminate"===o?"ui-spinner-indeterminate":"ui-spinner-determinate",n)},"loading...")},exports.TagInput=function(t){var n=t.tags;t.className;var r=t.suggestions,o=t.disableFilter,i=t.onTextChange,a=t.onChange,l=e.useRef(null),c=e.useRef(null),u=e.useRef(null),s=e.useState(""),d=s[0],m=s[1],f=e.useState(!1),p=f[0],h=f[1];F(function(){h(!1)},[l,c]);var v=e.useCallback(function(e){if(a&&Array.isArray(n)){var t=n.findIndex(function(t){return t.id===e.id});if(!(t<0)){var r=w([],n,!0);r.splice(t,1),a(r)}}},[n,a]),g=e.useCallback(function(e){if(e){var t={id:e.id,label:e.label,value:e.value},r=Array.isArray(n)?w(w([],n,!0),[t],!1):[t];h(!1),a&&a(r),m(""),i&&i("")}},[n,a,i]),E=e.useCallback(function(e){m(e),i&&i(e)},[i]),b=Array.isArray(n)?n.map(function(t,n){return e.createElement(I,{key:n,tag:t,onDelete:function(){return v(t)}})}):[];return e.createElement("div",{ref:u,className:"ui-taginput"},b,e.createElement(D,{ref:l,value:d,onChange:E,onClick:function(){h(!0)}}),e.createElement(V,{ref:c,open:p,anchorEl:l,filter:d,tags:n,suggestions:r,disableFilter:o,onSuggestionClick:g}))},exports.ToggleButton=function(t){var n=t.selected,r=t.value,o=t.size,i=t.children,a=t.className,l=t.onChange,c=e.useCallback(function(){l&&l(r)},[l,r]);return e.createElement("button",{type:"button",className:C("ui-toggleBtn",void 0!==o?"ui-toggleBtn-size-".concat(o):"ui-toggleBtn-size-md",!0===n?"ui-toggleBtn-selected":null,a),onClick:c},i)},exports.Tooltip=function(t){var n=t.children,r=t.title;t.anchorEl;var o=t.enterDelay,i=void 0===o?0:o,a=t.leaveDelay,l=void 0===a?0:a,c=t.className,u=t.disabled,s=e.useState(void 0),d=s[0],m=s[1],f=e.useState(!1),p=f[0],v=f[1],g=e.useState(!0),E=g[0],w=g[1],b=e.useState(!1),y=b[0],x=b[1],k=e.useRef(),L=e.useRef();e.useEffect(function(){!0===u&&v(!1)},[u]);var A,N=function(){v(!0)},_=function(){v(!1)},S=function(e){y||(clearTimeout(k.current),clearTimeout(L.current),d||m(e.currentTarget),L.current=setTimeout(function(){_()},l))},B=function(e){y||(clearTimeout(k.current),clearTimeout(L.current),d||m(e.currentTarget),!0!==u&&(k.current=setTimeout(function(){N()},i)))},M=function(e){x(!0),clearTimeout(k.current),clearTimeout(L.current),d||m(e.currentTarget),!0!==u&&(k.current=setTimeout(function(){N()},2e3))},R=function(e){clearTimeout(k.current),clearTimeout(L.current),d||m(e.currentTarget),L.current=setTimeout(function(){_()},3e3)};if(n){var O=h(h({},n.props),{onFocus:function(e){d||m(e.currentTarget),k.current=setTimeout(function(){N()},i)},onMouseEnter:function(e){y||(clearTimeout(k.current),clearTimeout(L.current),d||m(e.currentTarget),!0!==u&&(k.current=setTimeout(function(){N()},i)))},onMouseLeave:S,onMouseOver:B,onTouchStart:M,onTouchEnd:R});A=e.cloneElement(n,O)}var P=p||!E;return e.createElement(e.Fragment,null,A,e.createElement(T,{role:"tooltip",anchorEl:d,open:P,className:C("ui-tooltip",c),onMouseOver:y?void 0:B,onMouseLeave:y?void 0:S,onTouchStart:M,onTouchEnd:R},e.createElement(j,{trigger:p,onEnter:function(){w(!1)},onExited:function(){w(!0)}},e.createElement("div",{className:"ui-tooltip-content"},r))))},exports.WarningDialog=function(t){var n=t.title,r=t.ok,o=t.children,i=t.className,a=t.onClose,l=e.useCallback(function(){a&&a(!0)},[a]),c=null!=r?r:"fermer";return e.createElement(te,{open:!0,className:C("ui-dialog-box","ui-dialog-warning",i)},e.createElement(oe,null,e.createElement(e.Fragment,null,e.createElement("svg",{className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 512 512"},e.createElement("polygon",{fill:"#FFA418",points:"0,477.703 256,477.703 289.391,256 256,34.297"}),e.createElement("polygon",{fill:"#FF8A1E",points:"256,34.297 256,477.703 512,477.703"}),e.createElement("circle",{fill:"#324860",cx:"256",cy:"405.359",r:"16.696"}),e.createElement("rect",{x:"239.304",y:"177.185",fill:"#324860",width:"33.391",height:"178.087"})),e.createElement("h1",{className:"ui-dialog-title"},n))),e.createElement(ne,null,o),e.createElement(re,null,e.createElement(_,{className:"dialog-action-ok dialog-action",onClick:l},c)))},exports.forwardRef=b;
1
+ "use strict";var e=require("react"),t=require("react-dom"),n=require("@yudiel/react-qr-scanner"),r=require("react-webcam"),o=require("react-icons/fa"),i=require("react-icons/md"),a=require("react-icons/bs"),l=require("react-leaflet"),c=require("leaflet"),u=require("leaflet-draw/dist/images/marker-icon-2x.png"),s=require("leaflet-draw/dist/images/marker-shadow.png"),d=require("leaflet.fullscreen");require("leaflet.fullscreen/Control.FullScreen.css");var m=require("react-leaflet-draw");function f(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}require("leaflet/dist/leaflet.css"),require("leaflet-draw/dist/leaflet.draw.css");var p=f(e),h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)};function v(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function g(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function l(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,l)}c((r=r.apply(e,t||[])).next())})}function E(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);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function w(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function b(e){return p.forwardRef(function(t,n){return e(t,n)})}"function"==typeof SuppressedError&&SuppressedError;var y=b(function(n,r){var o=n.children,i=n.container,a=void 0===i?document.body:i,l=e.useRef();return e.useEffect(function(){var e=function(e){return"function"==typeof e?e():e}(a);return l.current&&e&&e.appendChild(l.current),function(){l.current&&l.current.remove()}},[l.current]),l.current||(l.current=document.createElement("div")),t.createPortal(o,l.current)});function x(e,t){e&&("function"==typeof e?e(t):"current"in e&&(e.current=t))}function C(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=[],r=function(t){var r=e[t];if(!r)return"continue";var o=typeof r;if("string"===o||"number"===o)n.push(r);else if(Array.isArray(r)){if(r.length){var i=C.apply(void 0,r);i&&n.push(i)}}else"object"===o?r.toString===Object.prototype.toString&&Object.keys(r).forEach(function(e){r[e]&&n.push(e)}):n.push(r.toString())},o=0;o<e.length;o+=1)r(o);return n.join(" ")}function k(e){var t=window,n=document.body,r=void 0!==t.pageXOffset?t.pageXOffset:(document.documentElement||n.parentNode||n).scrollLeft,o=void 0!==t.pageYOffset?t.pageYOffset:(document.documentElement||n.parentNode||n).scrollTop,i=e.getBoundingClientRect();return{bottom:i.bottom+o,height:i.height,left:i.left+r,right:i.right+r,top:i.top+o,width:i.width}}var A,N={Center:"center",BottomCenter:"bottom-center",BottomRight:"bottom-right",BottomLeft:"bottom-left",TopCenter:"top-center",TopRight:"top-right",TopLeft:"top-left",LeftTop:"left-top",LeftBottom:"left-bottom",LeftCenter:"left-center",RightTop:"right-top",RightBottom:"right-bottom",RightCenter:"right-center"},T=b(function(t,n){var r=t.anchorEl,o=t.anchorPosition,i=t.placement,a=void 0===i?N.BottomLeft:i,l=t.open,c=void 0!==l&&l,u=t.overflow,s=void 0!==u&&u,d=t.role,m=t.children,f=t.className,p=v(t,["anchorEl","anchorPosition","placement","open","overflow","role","children","className"]),g=e.useRef(null),E=e.useRef(null),w=e.useState({left:window.scrollX,top:window.scrollY,height:window.innerHeight,width:window.innerWidth}),b=w[0],L=w[1],A=e.useState({position:"absolute",margin:"0",inset:"0px auto auto 0px",transform:"translate3d(0px, 0px, 0px)",opacity:0}),T=A[0],_=A[1];return e.useEffect(function(){if(n&&g)return x(n,g.current),function(){x(n,null)}},[n,g.current]),e.useEffect(function(){var e=function(){L({height:window.innerHeight,width:window.innerWidth,left:window.scrollX,top:window.scrollY})},t=function(){L({height:window.innerHeight,width:window.innerWidth,left:window.scrollX,top:window.scrollY})};return c&&(window.addEventListener("resize",e),window.addEventListener("scroll",t),L({height:window.innerHeight,width:window.innerWidth,left:window.scrollX,top:window.scrollY})),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",t)}},[c]),e.useEffect(function(){var e,t=function(e){var t;if(!e)return document.body;if("[object String]"===Object.prototype.toString.call(e)){var n=document.getElementById(e);return null!=n?n:document.body}var r=e;return r&&r.current?null!==(t=r.current)&&void 0!==t?t:document.body:e}(r);if(c&&g.current&&t){var n=function(){var e=function(e,t,n,r){var o=0,i=0,a=n?{bottom:n.top,height:0,left:n.left,right:n.left,top:n.top,width:0}:k(t),l=k(r);switch(e){case N.Center:o=a.left+a.width/2-l.width/2,i=a.top+a.height/2-l.height/2;break;case N.BottomLeft:o=a.left,i=a.bottom;break;case N.BottomRight:o=a.left-l.width+a.width,i=a.bottom;break;case N.BottomCenter:o=a.left+a.width/2-l.width/2,i=a.bottom;break;case N.TopLeft:o=a.left,i=a.top-l.height;break;case N.TopRight:o=a.left-l.width+a.width,i=a.top-l.height;break;case N.TopCenter:o=a.left+a.width/2-l.width/2,i=a.top-l.height;break;case N.LeftTop:o=a.left-l.width,i=a.top;break;case N.LeftBottom:o=a.left-l.width,i=a.bottom-l.height;break;case N.LeftCenter:o=a.left-l.width,i=a.top+a.height/2-l.height/2;break;case N.RightTop:o=a.right,i=a.top;break;case N.RightBottom:o=a.right,i=a.bottom-l.height;break;case N.RightCenter:o=a.right,i=a.top+a.height/2-l.height/2}return{left:o,top:i}}(a,t,o,g.current),n=e.left,r=e.top,i=0,l=0;if(!1===s){var c=function(e,t,n,r){if(!e)return null;if(!t)return null;var o=t.getBoundingClientRect(),i={left:n,top:r,height:0,width:0};return n<e.left&&(i.left=e.left),r<e.top&&(i.top=e.top),n+o.width>=e.left+e.width&&(i.left=e.left+e.width-o.width),r+o.height>=e.top+e.height&&(i.top=e.top+e.height-o.height),i}(b,g.current,n,r);null!==c&&(n=c.left,r=c.top,i=c.height,l=c.width)}_({position:"absolute",margin:"0",inset:"0px auto auto 0px",transform:"translate3d(".concat(n,"px, ").concat(r,"px, 0px)"),opacity:1,maxHeight:i>0?"".concat(i.toFixed(),"px"):void 0,maxWidth:l>0?"".concat(l.toFixed(),"px"):void 0})};(e=new MutationObserver(function(){n()})).observe(g.current,{attributes:!1,childList:!0,subtree:!0}),n()}return function(){e&&e.disconnect()}},[g,c,a,o,s,b,r]),!0!==c?null:e.createElement(y,{ref:E},e.createElement("div",h({ref:g,style:T,role:d,className:C("ui-popper",f)},p),m))}),_=function(t){var n=t.variant,r=t.color,o=t.children,i=t.disable,a=t.className,l=t.onClick,c=e.useCallback(function(e){l&&!0!==i&&l(e)},[l,i]);return e.createElement("button",{type:"button",className:C("ui-btn",!0===i?"ui-btn-disable":null,null!=n?"ui-btn-".concat(n):"ui-btn-text",null!=r?"ui-btn-color-".concat(r):"ui-btn-color-primary",a),onClick:c},o)},S=function(t){var n=e.useMemo(function(){return 1300+document.querySelectorAll(".dialog-mask").length},[]);return e.createElement("div",h({},t,{className:"dialog-mask ".concat(t.className),style:h(h({},t.style),{zIndex:n})}),e.createElement("style",null,"body { overflow: hidden; }"),t.children)},B=function(t){return e.createElement("div",h({},t,{className:"dialog-body ".concat(t.className)}))},M=function(n){e.useEffect(function(){return window.addEventListener("keyup",r),function(){window.removeEventListener("keyup",r)}},[]);var r=e.useCallback(function(e){var t;["Esc","Escape"].includes(e.key)&&(null===(t=n.onClose)||void 0===t||t.call(n))},[]);return n.open?t.createPortal(e.createElement(e.Fragment,null,e.createElement(S,null,e.createElement(B,{style:{position:"relative",fontFamily:"sans-serif",width:"100%",maxWidth:"500px"}},n.title&&e.createElement("div",{className:"dialog-header"},e.createElement("h4",{style:{fontWeight:"600",fontSize:"1.25rem"}},n.title)),e.createElement("button",{type:"button",style:{position:"absolute",top:"0.5rem",right:"0.5rem",zIndex:20,fontSize:"1.375rem",fontWeight:"700",background:"transparent",border:"none",padding:"5px 10px"},onClick:n.onClose},"×"),e.createElement("div",null)))),document.body):e.createElement(e.Fragment,null)},R=function(t){var n,r,o,i;return e.createElement(M,{open:t.open,title:(null==t?void 0:t.title)||"confirmation de l'évènement",onClose:t.onClose},e.createElement("div",{style:{display:"flex",flexDirection:"column"}},e.createElement("p",null,(null==t?void 0:t.message)||"Voulez-vous vraiment confirmer le scan ?"),e.createElement("div",{style:{marginTop:"1.25rem",display:"flex",flexDirection:"column"}},e.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"1rem"}},e.createElement("button",{type:"button",className:"btn",style:h({backgroundColor:"#e5e7eb",color:"black"},null===(n=null==t?void 0:t.btnCancel)||void 0===n?void 0:n.style),onClick:t.onClose},(null===(r=null==t?void 0:t.btnCancel)||void 0===r?void 0:r.label)||"annuler"),e.createElement("button",{type:"button",className:"btn",style:h({backgroundColor:"#22c55e",color:"white"},null===(o=null==t?void 0:t.btnOk)||void 0===o?void 0:o.style),onClick:t.onConfirm},(null===(i=null==t?void 0:t.btnOk)||void 0===i?void 0:i.label)||"confirmer")))))},O=function(){function e(){this.dbName="cortex-react-media",this.storeName="capturedFiles",this.db=null}return e.prototype.openDatabase=function(){return g(this,void 0,void 0,function(){var e=this;return E(this,function(t){return[2,new Promise(function(t,n){var r=indexedDB.open(e.dbName,1);r.onupgradeneeded=function(t){r.result.createObjectStore(e.storeName,{keyPath:"id",autoIncrement:!0})},r.onsuccess=function(){e.db=r.result,t(e.db)},r.onerror=function(){return n(r.error)}})]})})},e.prototype.storeFile=function(e){return g(this,void 0,void 0,function(){var t=this;return E(this,function(n){switch(n.label){case 0:return this.db?[3,2]:[4,this.openDatabase()];case 1:n.sent(),n.label=2;case 2:return[2,new Promise(function(n,r){var o=t.db.transaction(t.storeName,"readwrite").objectStore(t.storeName).add({file:e,timestamp:Date.now(),name:e.name});o.onsuccess=function(){return n(o.result)},o.onerror=function(){return r(o.error)}})]}})})},e.prototype.retrieveFile=function(e){return g(this,void 0,void 0,function(){var t=this;return E(this,function(n){switch(n.label){case 0:return this.db?[3,2]:[4,this.openDatabase()];case 1:n.sent(),n.label=2;case 2:return[2,new Promise(function(n,r){var o=t.db.transaction([t.storeName],"readonly").objectStore(t.storeName).get(e);o.onsuccess=function(){var e=o.result;n(e?e.file:null)},o.onerror=function(){return r(o.error)}})]}})})},e}();!function(e){e[e.Enter=0]="Enter",e[e.Entering=1]="Entering",e[e.Entered=2]="Entered",e[e.Exit=3]="Exit",e[e.Exiting=4]="Exiting",e[e.Exited=5]="Exited"}(A||(A={}));var P=b(function(t,n){var r=t.trigger,o=t.mode,i=void 0===o?"appear":o,a=t.children,l=t.enterTimeout,c=t.exitTimeout,u=t.className,s=t.onEnter,d=t.onEntering,m=t.onEntered,f=t.onExit,p=t.onExiting,v=t.onExited,g=e.useRef(null),E=e.useRef(),w=e.useState(function(){return"appear"===i?A.Exited:A.Entered});w[0],w[1];e.useEffect(function(){return function(){E.current&&window.clearTimeout(E.current)}},[E]),e.useEffect(function(){r?(E.current&&window.clearTimeout(E.current),g.current.classList.remove("".concat(u,"-exit")),g.current.classList.remove("".concat(u,"-exiting")),g.current.classList.remove("".concat(u,"-exited")),s&&s(),g.current.classList.add("".concat(u,"-enter")),E.current=window.setTimeout(function(){d&&d(),g.current&&g.current.classList.add("".concat(u,"-entering")),E.current=window.setTimeout(function(){m&&m(),g.current&&g.current.classList.add("".concat(u,"-entered"))},l||1e3)},10)):(E.current&&window.clearTimeout(E.current),g.current.classList.remove("".concat(u,"-enter")),g.current.classList.remove("".concat(u,"-entering")),g.current.classList.remove("".concat(u,"-entered")),f&&f(),g.current.classList.add("".concat(u,"-exit")),E.current=window.setTimeout(function(){p&&p(),g.current&&g.current.classList.add("".concat(u,"-exiting")),E.current=window.setTimeout(function(){v&&v(),g.current&&g.current.classList.add("".concat(u,"-exited"))},c||1e3)}))},[r]);var b=e.useMemo(function(){if(a){var t=h(h({},a.props),{className:C(u,a.props.className),ref:g});return e.cloneElement(a,t)}},[a,g]);return e.createElement(e.Fragment,null,b)}),j=b(function(t,n){var r=t.trigger,o=t.children,i=t.onEnter,a=t.onEntering,l=t.onEntered,c=t.onExit,u=t.onExiting,s=t.onExited;return e.createElement(P,{ref:n,trigger:r,mode:"appear",className:"ui-fade",enterTimeout:160,exitTimeout:160,onEnter:i,onExit:c,onEntering:a,onEntered:l,onExiting:u,onExited:s},o)});function F(e,t){var n=p.useCallback(function(n){var r=n.target,o=t.reduce(function(e,t){if(!t)return e;var n=function(e){var t;if(!e)return document.body;if("[object String]"===Object.prototype.toString.call(e)){var n=document.getElementById(e);return null!=n?n:document.body}var r=e;return r&&void 0!==r.current?null!==(t=r.current)&&void 0!==t?t:void 0:e}(t);return!1!==e&&n&&null!==n?!n.contains(r):e},!0);e&&o&&e()},[e]);p.useEffect(function(){return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}},[t,n])}var z,I=function(t){var n=t.tag;t.className;var r=t.onDelete;return e.createElement("span",{className:"ui-taginputItem"},e.createElement("span",{className:"ui-taginputItemLabel"},n.label),e.createElement("button",{type:"button",className:"ui-taginputItemRemove",onClick:r},"x"))},D=b(function(t,n){var r=t.className,o=t.value,i=t.onClick,a=t.onChange,l=e.useRef(null),c=e.useCallback(function(e){a&&a(e.target.value)},[a]);return e.useEffect(function(){if(n&&l)return x(n,l.current),function(){x(n,null)}},[n,l]),e.createElement(e.Fragment,null,e.createElement("input",{ref:l,value:o,className:C("ui-taginputFilter",r),autoComplete:"off",spellCheck:"false","data-form-type":"other",onChange:c,onClick:i}))}),U=function(t){var n=t.suggestion,r=t.onClick,o=e.useCallback(function(e){r&&r(n,e)},[r]);return e.createElement("div",{role:"button",className:"ui-taginputSelectItem",tabIndex:0,onClick:o},n.label)},Z=function(t){var n=t.group,r=t.onClick,o=Array.isArray(n.suggestions)?n.suggestions.map(function(t,n){return!0===t.group?e.createElement(Z,{key:n,group:t,onClick:r}):e.createElement(U,{key:n,suggestion:t,onClick:r})}):null;return e.createElement("div",{className:"ui-taginputSelectGroup"},e.createElement("span",{className:"ui-taginputSelectGroupLabel"},n.label),e.createElement("div",{className:"ui-taginputSelectGroupItems"},o))},V=b(function(t,n){var r=t.open,o=t.tags,i=t.disableFilter,a=t.suggestions,l=t.anchorEl,c=t.filter,u=t.onSuggestionClick,s=e.useMemo(function(){if(!Array.isArray(a))return[];if(i)return a;var e=Array.isArray(o)&&o.length>0,t=c&&c.length>0,n=[];return a.forEach(function(r){if(!0!==r.group)e&&o.some(function(e){return e.id===r.id})||t&&r.label.toUpperCase().indexOf(c.toUpperCase())<0||n.push(h({},r));else if(Array.isArray(r.suggestions)){var i=h(h({},r),{suggestions:[]});r.suggestions.forEach(function(n){e&&o.some(function(e){return e.id===n.id})||t&&n.label.toUpperCase().indexOf(c.toUpperCase())<0||i.suggestions.push(h({},n))}),i.suggestions.length>0&&n.push(i)}}),n},[a,c,o]),d=e.useCallback(function(e){u&&u(e)},[u]),m=r&&s.length>0,f=s.map(function(t,n){return!0===t.group?e.createElement(Z,{key:n,group:t,onClick:d}):e.createElement(U,{key:n,suggestion:t,onClick:d})});return e.createElement(T,{ref:n,open:m,anchorEl:l,placement:N.BottomLeft},e.createElement("div",{className:"ui-taginputSelect"},f))}),q=e.createContext({locations:[],setLocations:function(){}});void 0===(z=window.leafletActiveAreaPreviousMethods)&&(z={getCenter:L.Map.prototype.getCenter,setView:L.Map.prototype.setView,flyTo:L.Map.prototype.flyTo,setZoomAround:L.Map.prototype.setZoomAround,getBoundsZoom:L.Map.prototype.getBoundsZoom,PopupAdjustPan:L.Popup.prototype._adjustPan,RendererUpdate:L.Renderer.prototype._update}),L.Map.include({getBounds:function(){if(this._viewport)return this.getViewportLatLngBounds();var e=this.getPixelBounds(),t=this.unproject(e.getBottomLeft()),n=this.unproject(e.getTopRight());return new L.LatLngBounds(t,n)},getViewport:function(){return this._viewport},getViewportBounds:function(){var e=this._viewport,t=L.point(e.offsetLeft,e.offsetTop),n=L.point(e.clientWidth,e.clientHeight);return 0!==n.x&&0!==n.y||(e=this.getContainer())&&(t=L.point(0,0),n=L.point(e.clientWidth,e.clientHeight)),L.bounds(t,t.add(n))},getViewportLatLngBounds:function(){var e=this.getViewportBounds();return L.latLngBounds(this.containerPointToLatLng(e.min),this.containerPointToLatLng(e.max))},getOffset:function(){var e=this.getSize().divideBy(2),t=this.getViewportBounds().getCenter();return e.subtract(t)},getCenter:function(e){var t=z.getCenter.call(this);if(this.getViewport()&&!e){var n=this.getZoom(),r=this.project(t,n);r=r.subtract(this.getOffset()),t=this.unproject(r,n)}return t},setView:function(e,t,n){if(e=L.latLng(e),t=void 0===t?this._zoom:this._limitZoom(t),this.getViewport()){var r=this.project(e,this._limitZoom(t));r=r.add(this.getOffset()),e=this.unproject(r,this._limitZoom(t))}return z.setView.call(this,e,t,n)},flyTo:function(e,t,n){if(e=L.latLng(e),t=void 0===t?l:t,this.getViewport()){var r=this.project(e,this._limitZoom(t));r=r.add(this.getOffset()),e=this.unproject(r,this._limitZoom(t))}if(!1===(n=n||{}).animate||!L.Browser.any3d)return this.setView(e,t,n);this._stop();var o=this.project(z.getCenter.call(this)),i=this.project(e),a=this.getSize(),l=this._zoom,c=Math.max(a.x,a.y),u=c*this.getZoomScale(l,t),s=i.distanceTo(o)||1,d=1.42,m=2.0164;function f(e){var t=(u*u-c*c+(e?-1:1)*m*m*s*s)/(2*(e?u:c)*m*s),n=Math.sqrt(t*t+1)-t;return n<1e-9?-18:Math.log(n)}function p(e){return(Math.exp(e)-Math.exp(-e))/2}function h(e){return(Math.exp(e)+Math.exp(-e))/2}var v=f(0);function g(e){return c*(h(v)*(p(t=v+d*e)/h(t))-p(v))/m;var t}var E=Date.now(),w=(f(1)-v)/d,b=n.duration?1e3*n.duration:1e3*w*.8;return this._moveStart(!0,n.noMoveStart),function n(){var r=(Date.now()-E)/b,a=function(e){return 1-Math.pow(1-e,1.5)}(r)*w;r<=1?(this._flyToFrame=L.Util.requestAnimFrame(n,this),this._move(this.unproject(o.add(i.subtract(o).multiplyBy(g(a)/s)),l),this.getScaleZoom(c/function(e){return c*(h(v)/h(v+d*e))}(a),l),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}.call(this),this},setZoomAround:function(e,t,n){if(this.getViewport()){var r=this.getZoomScale(t),o=this.getViewportBounds().getCenter(),i=(e instanceof L.Point?e:this.latLngToContainerPoint(e)).subtract(o).multiplyBy(1-1/r),a=this.containerPointToLatLng(o.add(i));return this.setView(a,t,{zoom:n})}return z.setZoomAround.call(this,e,t,n)},getBoundsZoom:function(e,t,n){e=L.latLngBounds(e),n=L.point(n||[0,0]);var r=this.getZoom()||0,o=this.getMinZoom(),i=this.getMaxZoom(),a=e.getNorthWest(),l=e.getSouthEast(),c=this.getViewport(),u=(c?L.point(c.clientWidth,c.clientHeight):this.getSize()).subtract(n),s=this.project(l,r).subtract(this.project(a,r)),d=L.Browser.any3d?this.options.zoomSnap:1,m=u.x/s.x,f=u.y/s.y,p=t?Math.max(m,f):Math.min(m,f);return r=this.getScaleZoom(p,r),d&&(r=Math.round(r/(d/100))*(d/100),r=t?Math.ceil(r/d)*d:Math.floor(r/d)*d),Math.max(o,Math.min(i,r))},setActiveArea:function(e,t,n){var r;if(t&&this._zoom&&(r=this.getCenter()),!this._viewport){var o=this.getContainer();this._viewport=L.DomUtil.create("div",""),o.insertBefore(this._viewport,o.firstChild)}return"string"==typeof e?this._viewport.className=e:L.extend(this._viewport.style,e),r&&this.setView(r,this.getZoom(),{animate:!!n}),this}}),L.Renderer.include({_onZoom:function(){this._updateTransform(this._map.getCenter(!0),this._map.getZoom())},_update:function(){z.RendererUpdate.call(this),this._center=this._map.getCenter(!0)}}),L.GridLayer.include({_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(void 0!==e){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=t-Math.abs(e-n),this._onUpdateLevel(n)):(L.DomUtil.remove(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var r=this._levels[e],o=this._map;return r||((r=this._levels[e]={}).el=L.DomUtil.create("div","leaflet-tile-container leaflet-zoom-animated",this._container),r.el.style.zIndex=t,r.origin=o.project(o.unproject(o.getPixelOrigin()),e).round(),r.zoom=e,this._setZoomTransform(r,o.getCenter(!0),o.getZoom()),L.Util.falseFn(r.el.offsetWidth),this._onCreateLevel(r)),this._level=r,r}},_resetView:function(e){var t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(!0),this._map.getZoom(),t,t)},_update:function(e){var t=this._map;if(t){var n=this._clampZoom(t.getZoom());if(void 0===e&&(e=t.getCenter(!0)),void 0!==this._tileZoom){var r=this._getTiledPixelBounds(e),o=this._pxBoundsToTileRange(r),i=o.getCenter(),a=[],l=this.options.keepBuffer,c=new L.Bounds(o.getBottomLeft().subtract([l,-l]),o.getTopRight().add([l,-l]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var s=this._tiles[u].coords;s.z===this._tileZoom&&c.contains(new L.Point(s.x,s.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(e,n);else{for(var d=o.min.y;d<=o.max.y;d++)for(var m=o.min.x;m<=o.max.x;m++){var f=new L.Point(m,d);if(f.z=this._tileZoom,this._isValidTile(f)){var p=this._tiles[this._tileCoordsToKey(f)];p?p.current=!0:a.push(f)}}if(a.sort(function(e,t){return e.distanceTo(i)-t.distanceTo(i)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var h=document.createDocumentFragment();for(m=0;m<a.length;m++)this._addTile(a[m],h);this._level.el.appendChild(h)}}}}}}),L.Popup.include({_adjustPan:function(){if(this._map._viewport){if(!this.options.autoPan)return;this._map._panAnim&&this._map._panAnim.stop();var e=this._map,t=e._viewport,n=this._container.offsetHeight,r=this._containerWidth,o=L.point(t.offsetLeft,t.offsetTop),i=new L.Point(this._containerLeft-o.x,-n-this._containerBottom-o.y);i._add(L.DomUtil.getPosition(this._container));var a=e.layerPointToContainerPoint(i),l=L.point(this.options.autoPanPadding),c=L.point(this.options.autoPanPaddingTopLeft||l),u=L.point(this.options.autoPanPaddingBottomRight||l),s=L.point(t.clientWidth,t.clientHeight),d=0,m=0;a.x+r+u.x>s.x&&(d=a.x+r-s.x+u.x),a.x-d-c.x<0&&(d=a.x-c.x),a.y+n+u.y>s.y&&(m=a.y+n-s.y+u.y),a.y-m-c.y<0&&(m=a.y-c.y),(d||m)&&e.fire("autopanstart").panBy([d,m])}else z.PopupAdjustPan.call(this)}});var W=function(t){var n=l.useMap();e.useEffect(function(){n.setActiveArea("cortex-widget-viewport",!0,!0),c.Control.CenterActiveArea=c.Control.extend({onAdd:function(){var e=null;e=n.zoomControl&&!this.options.forceSeparateButton?n.zoomControl._container:c.DomUtil.create("div","leaflet-bar"),c.DomEvent.disableClickPropagation(e);var t=c.DomUtil.create("a","",e);return t.href="#",t.title="Centrer",t.innerHTML='\n <img src="'.concat(H,'" width="15px" style="margin-top: 7px; filter: brightness(0%)" />\n '),t.setAttribute("role","button"),t.setAttribute("aria-label",t.title),c.DomEvent.on(t,"click",c.DomEvent.stop).on(t,"click",a),e}}),c.control.centerActiveArea=function(e){return new c.Control.CenterActiveArea(e)},c.control.centerActiveArea({position:"topleft"}).addTo(n),t.autoCenter&&i()},[]),e.useEffect(function(){t.autoCenter&&i()},[t.autoCenter]);var r=e.useCallback(function(){var e=c.featureGroup();return n.eachLayer(function(t){t instanceof c.Marker&&e.addLayer(t)}),e},[n]),o=e.useCallback(function(){var e=c.featureGroup();return n.eachLayer(function(t){t instanceof c.Polygon&&e.addLayer(t)}),e},[n]),i=e.useCallback(function(){var e=r().getBounds();o().eachLayer(function(t){e.extend(t.getBounds())}),e.isValid()&&n.fitBounds(e,{animate:!0})},[]),a=e.useCallback(function(){i()},[n]);return e.createElement(e.Fragment,null)},H="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABcRAAAXEQHKJvM/AAAAB3RJTUUH4wMIFTgXULHJFAAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAhUlEQVRo3u3asQ2AIBAF0MO4p42FI1nYOKlugAUnJvL+BLzwcxGw7Md5RUO2dSmRkNZ1TPGTgICADAIptbGXNVqzUluraoGADAKZv/rIy56UqvVFartVVEu1QEBAQEBAQEBAQEAaz+xuGlXrpWr1PlvbERAQEJCIhzfEnqPYLxwgICBjQW7ewSYPr/zk7gAAAABJRU5ErkJggg==",X=function(t){var n=l.useMap();return e.useEffect(function(){d.leaflet.control.fullscreen(h({position:"topleft"},t||{})).addTo(n)},[]),e.createElement(e.Fragment,null)},Y=function(t){var n,r,o={edit:!!(null==t?void 0:t.editable)&&{}};return e.createElement(m.EditControl,{onCreated:t.handleOnCreated,onDeleted:t.handleOnDeleted,onEdited:t.handleOnEdited,position:null!==(n=t.position)&&void 0!==n?n:"topright",draw:null!==(r=t.draw)&&void 0!==r?r:{rectangle:!1,circle:!1,circlemarker:!1,polyline:!1},edit:o})},G=function(t){var n,r={polygon:!0,marker:!0,rectangle:!1,circle:!1,circlemarker:!1,polyline:!1},o=e.useState(r);o[0];var i=o[1],a=e.useState("standard"),d=a[0],m=a[1],f=e.useContext(q),p=f.locations,v=f.setLocations;e.useEffect(function(){var e;null===(e=null==t?void 0:t.onChange)||void 0===e||e.call(t,p)},[p]),e.useEffect(function(){c.Icon.Default.mergeOptions({iconRetinaUrl:u,shadowUrl:s,iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]}),p&&p.length>0&&i(function(e){var t=h({},e);return Object.keys(t).forEach(function(e){t[e]=!1}),t})},[]);var g=function(e){var t,n,r,o=e.layerType,a=e.layer;i(function(e){var t=h({},e);return Object.keys(t).forEach(function(e){t[e]=!1}),t});var l=[];"polygon"!==o&&"rectangle"!==o||(l=null===(n=null===(t=a._latlngs)||void 0===t?void 0:t[0])||void 0===n?void 0:n.map(function(e,t){return{latitude:e.lat,longitude:e.lng,order:t+1}})),"marker"!==o&&"circle"!==o&&"circlemarker"!==o||l.push({order:1,latitude:a._latlng.lat,longitude:a._latlng.lng,id:a._leaflet_id}),"polyline"===o&&(l=null===(r=a._latlngs)||void 0===r?void 0:r.map(function(e,t){return{latitude:e.lat,longitude:e.lng,order:t+1}})),v(function(e){return w(w([],e,!0),[{points:l,id:a._leaflet_id}],!1)})},E=function(e){var t=e.layers;v(function(e){var n=Object.values(t.getLayers());return e.filter(function(e){return(null==e?void 0:e.points)&&1===e.points.length}).map(function(e){var t=n.find(function(t){return t._leaflet_id===e.points[0].id});if(t){var r=h({},e.points[0]),o=t.getLatLng();return Math.abs(r.latitude-o.lat)>1e-6||Math.abs(r.longitude-o.lng)>1e-6?{points:[{id:e.id,latitude:n[0]._latlng.lat,longitude:n[0]._latlng.lng,order:e.points[0].order}],id:e.id,objId:e.objId}:e}return e})})},b=e.useMemo(function(){var e,n;if((null==t?void 0:t.singlePosition)&&p.length>(null!==(n=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.length)&&void 0!==n?n:0)){var r={draw:{marker:!1,polygon:!1,rectangle:!1,circle:!1,circlemarker:!1,polyline:!1}};return"boolean"!=typeof(null==t?void 0:t.drawTools)&&(r=h(h({},null==t?void 0:t.drawTools),r)),r}return"boolean"!=typeof(null==t?void 0:t.drawTools)?null==t?void 0:t.drawTools:!0===(null==t?void 0:t.drawTools)?{draw:{marker:!0,polygon:!0,rectangle:!0,circle:!0,circlemarker:!0,polyline:!0}}:void 0},[null==t?void 0:t.singlePosition,null==t?void 0:t.drawTools,p,null==t?void 0:t.data]);return e.createElement(e.Fragment,null,e.createElement("style",null,".leaflet-container { min-height: 80px; min-width: 80px; height: 100%; width: 100% }"),e.createElement(l.MapContainer,h({center:t.center||[0,0],zoom:t.zoom||13,maxZoom:t.maxZoom,minZoom:t.minZoom},t.MapContainerProps),e.createElement(l.TileLayer,{key:d,attribution:"standard"===d?'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors':'&copy; <a href="https://www.google.com/maps">Google Maps</a>',url:"standard"===d?"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png":"https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}"}),t.toggleSatelliteView&&e.createElement("div",{style:{position:"absolute",bottom:"10px",left:"10px",zIndex:1e3,background:"white",padding:"7px 10px",borderRadius:"5px"}},e.createElement("label",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"}},e.createElement("input",{type:"checkbox",checked:"satellite"===d,onChange:function(){return m("standard"===d?"satellite":"standard")}}),"Satellite View")),t.fullscreen&&e.createElement(X,h({},"boolean"==typeof t.fullscreen?{}:t.fullscreen)),e.createElement(l.FeatureGroup,null,t.drawTools&&p.length>0&&e.createElement(Y,h({},b,{handleOnCreated:g,handleOnEdited:E})),0===p.length&&e.createElement(Y,h({},b,{handleOnCreated:g,handleOnDeleted:function(e){0!==Object.keys(e.layers._layers).length&&(i(function(e){return h(h({},r),{workaround:Math.random()})}),v(p))},handleOnEdited:E})),(null==t?void 0:t.data)&&(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.map(function(t){return t.points.length>1?e.createElement(l.Polygon,{key:"marker-".concat(t.objId),positions:t.points.map(function(e){return[e.latitude,e.longitude]})}):e.createElement(l.Marker,{key:"marker-".concat(t.id),position:[t.points[0].latitude,t.points[0].longitude]})}))),t.centerActiveArea&&e.createElement(W,h({autoCenter:p&&p.length>0},"boolean"==typeof t.centerActiveArea?{}:t.centerActiveArea))))},Q=function(t){var n=t.containerRef;t.className;var r=t.children,o=t.onClick;t.onClose;var i=e.useRef(null);return e.useEffect(function(){if(i&&n&&i.current&&n.current){var e=n.current.getBoundingClientRect(),t=i.current.getBoundingClientRect(),r=e.width,o="0px",a="unset";e.right+t.width>=window.innerWidth&&(r=-t.width),t.bottom>=window.innerHeight&&(a="".concat(-(window.innerHeight-e.bottom-15).toFixed(),"px"),o="unset"),i.current.setAttribute("style","opacity: 1; left: ".concat(r.toFixed(),"px; bottom: ").concat(a,"; top: ").concat(o,";"))}},[i,n]),e.createElement("div",{ref:i,className:"ui-menu"},e.createElement("ul",{className:"ui-menuList",onClick:o,onContextMenu:o},r))};function J(e){var t=p.useState(),n=t[0],r=t[1];return p.useEffect(function(){r(function(e){var t;if(e){if("[object String]"===Object.prototype.toString.call(e)){var n=document.getElementById(e);return null!=n?n:void 0}var r=e;return r&&void 0!==r.current?null!==(t=r.current)&&void 0!==t?t:void 0:e}}(e))},[e]),n}var K=function(t){var n=t.className;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 7",fill:"none",className:C("ui-icon",n),transform:"rotate(90 0 0)",preserveAspectRatio:"xMidYMid meet"},e.createElement("path",{d:"M5.3,0.3c0.4-0.4,1-0.4,1.4,0l5,5c0.4,0.4,0.4,1,0,1.4c-0.4,0.4-1,0.4-1.4,0L6,2.4L1.7,6.7c-0.4,0.4-1,0.4-1.4,0c-0.4-0.4-0.4-1,0-1.4L5.3,0.3z"}))},$=function(t){var n=t.className;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:C("ui-icon",n)},e.createElement("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}))},ee=function(t){var n=t.label,r=t.icon,o=t.className,i=t.style;t.active;var a=t.disable,l=t.children,c=t.itemTemplate,u=t.onClick,s=e.useState(!1),d=s[0],m=s[1],f=e.useRef(null),p=e.useCallback(function(e){u&&!0!==a&&u(e)},[u,a]),h=null!=l;return e.createElement("li",{className:C("ui-menuItem",!0===a?"ui-menuItem-disable":null,o),style:i,onMouseEnter:function(){m(!0)},onMouseLeave:function(){m(!1)},ref:f},e.createElement("button",{type:"button",className:"ui-menuItem-btn",onClick:p},r&&e.createElement("div",{className:"ui-menuItem-icon"},r),e.createElement("span",null,null!=c?c:n),h&&e.createElement("div",{className:"ui-menuItem-menuIconContainer"},e.createElement(K,{className:"ui-menuItem-menuIcon"}))),h&&d&&e.createElement(Q,{containerRef:f},l))},te=function(t){t.open;var n=t.width,r=t.fullWidth,o=t.fullHeight,i=t.className,a=t.children,l=t.onClose,c=e.useRef(),u=e.useRef(null),s=e.useRef(null);e.useEffect(function(){return c.current=document.body.style.overflow,document.body.style.overflow="hidden",function(){var e;document.body.style.overflow=null!==(e=c.current)&&void 0!==e?e:"initial"}},[]);var d=e.useCallback(function(){l&&l()},[l]);return e.createElement(y,{ref:u},e.createElement("div",{ref:function(e){s.current=e},style:{position:"fixed",margin:"0"},role:"dialog",className:C("ui-dialog",i)},e.createElement("div",{role:"presentation",className:"ui-dialog-overlay",onClick:d}),e.createElement("div",{className:C("ui-dialog-container",n?"ui-dialog-size-".concat(n):null,!0===r?"ui-dialog-size-fullwidth":null,!0===o?"ui-dialog-size-fullheight":null)},a)))},ne=function(t){var n=t.className,r=t.children;return e.createElement("div",{className:C("ui-dialog-content",n)},r)},re=function(t){var n=t.className,r=t.children;return e.createElement("footer",{className:C("ui-dialog-footer",n)},r)},oe=function(t){var n=t.className,r=t.children;return e.createElement("header",{className:C("ui-dialog-header",n)},r)};exports.AuthDownloadLink=function(t){var n=t.url,r=t.queryParams,o=t.token,i=t.label,a=t.onStart,l=t.onCompleted,c=t.onError,u=function(e){var t=e.get("Content-Disposition");if(!t)return null;var n=t.split(";"),r="filename=",o=n.find(function(e){return e.indexOf(r)>-1});if(o){var i=o.search(r);if(i<0)return null;var a=o.substring(i+9).trim();if(0===a.length)return null;var l=a.substring(0,1);return'"'!==l&&"'"!==l?a:a.length<2||a[a.length-1]!==l?null:a.substring(1,a.length-1)}return null};return e.createElement(e.Fragment,null,e.createElement(ee,{label:i,onClick:function(e){return g(void 0,void 0,void 0,function(){var t,i,s,d,m,f,p,h;return E(this,function(v){switch(v.label){case 0:a&&a(e),v.label=1;case 1:if(v.trys.push([1,4,,5]),!o)throw new Error("INVALID_TOKEN");if(!n)throw new Error("INVALID_URL");return(t={}).ContentType="application/json",t.Authorization="Bearer ".concat(o),i={method:"get",headers:t},s=new URL(n),r&&Object.keys(r).forEach(function(e){return s.searchParams.append(e,r[e])}),[4,fetch(s,i)];case 2:if(!(d=v.sent())||200!==d.status)throw new Error("An error occured while generating file");return[4,d.blob()];case 3:return(m=v.sent())&&(f=window.URL.createObjectURL(m),(p=document.createElement("a")).href=f,p.download=u(d.headers)||"file",p.click(),URL.revokeObjectURL(f),p.remove()),[3,5];case 4:throw h=v.sent(),c&&c(h),h;case 5:return l&&l(),[2]}})})}}))},exports.BarLoader=function(t){var n=t.title,r=t.color,o=t.className,i=t.isComplete;return e.createElement(e.Fragment,null,e.createElement("div",{className:C("loader",null!=r?"loader-color-".concat(r):"loader-color-blue",!0===i?"completed":"",o)},e.createElement("div",{className:C("loaderBar",null!=r?"loaderBar-color-".concat(r):"loaderBar-color-blue")})),e.createElement("div",{className:C("loaderBar-title")},e.createElement("span",null,n)))},exports.Button=_,exports.Camera=function(t){var n=t.onCapture,l=t.isOffline,c=void 0!==l&&l,u=t.mode,s=void 0===u?"photo":u,d=t.validateText,m=void 0===d?"Valider":d,f=t.resetText,p=void 0===f?"Annuler":f,w=t.isShowOffline,b=void 0!==w&&w,y=t.isShowVideoButton,x=void 0!==y&&y,C=t.isShowSwitchButton,k=void 0!==C&&C,L=v(t,["onCapture","isOffline","mode","validateText","resetText","isShowOffline","isShowVideoButton","isShowSwitchButton"]),A=e.useRef(null),N=e.useRef(null),T=e.useRef(new O),S=e.useState(s),B=S[0],M=S[1],R=e.useState(!1),P=R[0],j=R[1],F=e.useState(!1),z=F[0],I=F[1],D=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)||navigator.maxTouchPoints>0||"ontouchstart"in document.documentElement,U=i.MdCameraswitch,Z=o.FaCamera,V=a.BsFillRecordFill,q=o.FaStop,W=o.FaPlay,H=o.FaPause,X=function(){var t=e.useRef(null),n=e.useState(0),r=n[0],o=n[1],i=function(e){var t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),o=e%60;return"".concat(t>0?t.toString().padStart(2,"0").concat(":"):"").concat(n>0?n.toString().padStart(2,"0").concat(":"):"").concat(r.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0"))},a=e.useMemo(function(){return i(r)},[r]),l=e.useCallback(function(){o(0),t.current=setInterval(function(){o(function(e){return e+1})},1e3)},[]),c=e.useCallback(function(){t.current&&(clearInterval(t.current),t.current=null)},[]);return{formatTime:i,startTimer:l,stopTimer:c,formatedTime:a}}(),Y=X.formatedTime,G=X.startTimer,Q=X.stopTimer,J=e.useState({imageUrl:null,videoUrl:null,isRecording:!1,storedFileId:null,file:null}),K=J[0],$=J[1],ee=e.useState({facingMode:"environment",width:{min:200},height:{min:300}});ee[0];var te=ee[1];e.useEffect(function(){return te({facingMode:D?"environment":"user",width:{min:200},height:{min:300}}),function(){oe(),Q(),ie()}},[]),e.useEffect(function(){"video"===B&&j(!1)},[K]);var ne=e.useCallback(function(){return g(void 0,void 0,void 0,function(){var e,t,n,r,o,i,a,l,c,u;return E(this,function(s){if(e=null===(u=A.current)||void 0===u?void 0:u.getScreenshot()){for(t=atob(e.split(",")[1]),n=new Array(t.length),r=0;r<t.length;r++)n[r]=t.charCodeAt(r);o=new Uint8Array(n),i=new Blob([o],{type:"image/jpeg"}),a="captured_image_".concat(Date.now().toString().slice(-7),".jpg"),l=new File([i],a,{type:"image/jpeg"}),c=URL.createObjectURL(l),$(function(e){return h(h({},e),{imageUrl:c,file:l})})}return[2]})})},[A,c,n]),re=e.useCallback(function(){if(A.current&&A.current.stream){var e="webm",t="video/".concat(e);MediaRecorder.isTypeSupported("video/mp4")&&(e="mp4",t="video/mp4");var n=new MediaRecorder(A.current.stream,{mimeType:t}),r=[];n.ondataavailable=function(e){e.data.size>0&&r.push(e.data)},n.onstop=function(){return g(void 0,void 0,void 0,function(){var n,o,i,a;return E(this,function(l){return n=new Blob(r,{type:t}),o="captured_video_".concat(Date.now(),".").concat(e),i=new File([n],o,{type:t}),a=URL.createObjectURL(i),$(function(e){return h(h({},e),{videoUrl:a,isRecording:!1,file:i})}),Q(),[2]})})},n.start(),N.current=n,G(),$(function(e){return h(h({},e),{isRecording:!0})})}},[A,c,G,Q,n]),oe=function(){$({imageUrl:null,videoUrl:null,isRecording:!1,storedFileId:null,file:null})};return e.createElement("div",{className:"camera-container"},K.imageUrl||K.videoUrl?e.createElement("div",{className:"camera-preview camera-screen-animation"},K.imageUrl&&e.createElement("img",{src:K.imageUrl,alt:"Capturé",style:{height:"90%",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center"}}),K.videoUrl&&e.createElement("video",{width:"100%",height:"90%",id:"video",style:{height:"90%",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center"},onEnded:function(){return j(!1)}},e.createElement("source",{src:K.videoUrl,type:"video/mp4"}),e.createElement("source",{src:K.videoUrl,type:"video/webm"}),e.createElement("track",{kind:"captions",src:"",lang:"en",label:"English",default:!0}),"Your browser does not support the video."),K.videoUrl&&e.createElement(_,{variant:"contained",className:"video-play-btn",onClick:function(){var e=document.getElementById("video");try{e.paused?e.play():e.pause(),j(!P)}catch(e){}}},P?e.createElement(H,null):e.createElement(W,null)),e.createElement("div",{className:"camera-controls"},e.createElement(_,{variant:"contained",onClick:function(){return g(void 0,void 0,void 0,function(){var e;return E(this,function(t){switch(t.label){case 0:return c?[4,T.current.storeFile(K.file)]:[3,2];case 1:e=t.sent(),n({fileRowId:e,fileStoreName:"capturedFiles"}),t.label=2;case 2:return c||"photo"!==B||n({file:K.file,imageSrc:K.imageUrl}),c||"video"!==B||n({file:K.file,videoSrc:K.videoUrl}),oe(),[2]}})})},className:"camera-button camera-button--download"},m),e.createElement(_,{variant:"outlined",onClick:oe,className:"camera-button camera-button--reset"},p))):e.createElement("div",{className:"camera-preview"},K.isRecording&&e.createElement("div",{className:"camera-recording-timer",style:{display:"video"===B?"flex":"none"}},e.createElement("span",{className:"camera-recording-dot"}),e.createElement("span",null,Y)),!K.isRecording&&x&&e.createElement("button",{type:"button",onClick:function(){return M("photo"===B?"video":"photo"),void oe()},className:"camera-button camera-mode"},e.createElement("span",null,"photo"===B?"Video":"Photo")),D&&!K.isRecording&&k&&e.createElement("button",{type:"button",onClick:function(){I(!z),te({facingMode:z?"environment":"user",width:{min:200},height:{min:300}})},className:"camera-button camera-switch"},e.createElement(U,{size:18})),c&&b&&e.createElement("div",{className:"camera-offline-mode"},"Offline mode"),e.createElement(r,h({ref:A,videoConstraints:{facingMode:"environment",width:{min:200},height:{min:300}}},L,{style:{height:"90% !important",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center",margin:"0 auto"},screenshotFormat:"image/jpeg",allowFullScreen:!0})),e.createElement("div",{className:"camera-controls"},"photo"===B&&e.createElement(_,{variant:"contained",className:"camera-button camera-button--capture",onClick:ne},e.createElement(Z,{size:28})),"video"===B&&!K.isRecording&&e.createElement(_,{variant:"contained",onClick:re,className:"camera-button camera-button--record"},e.createElement(V,{size:30})),"video"===B&&K.isRecording&&e.createElement(_,{variant:"contained",onClick:ie,className:"camera-button camera-button--record"},e.createElement(q,{size:28})))));function ie(){N.current&&N.current.stop()}},exports.ChevronDownIcon=function(t){var n=t.className;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",className:C("ui-icon",n),transform:"rotate(180 0 0)"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.2929 8.29289C11.6834 7.90237 12.3166 7.90237 12.7071 8.29289L17.7071 13.2929C18.0976 13.6834 18.0976 14.3166 17.7071 14.7071C17.3166 15.0976 16.6834 15.0976 16.2929 14.7071L12 10.4142L7.70711 14.7071C7.31658 15.0976 6.68342 15.0976 6.29289 14.7071C5.90237 14.3166 5.90237 13.6834 6.29289 13.2929L11.2929 8.29289Z"}))},exports.ChevronLeftIcon=function(t){var n=t.className;return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 7",fill:"none",className:C("ui-icon",n),transform:"rotate(270 0 0)",preserveAspectRatio:"xMidYMid meet"},e.createElement("path",{d:"M5.3,0.3c0.4-0.4,1-0.4,1.4,0l5,5c0.4,0.4,0.4,1,0,1.4c-0.4,0.4-1,0.4-1.4,0L6,2.4L1.7,6.7c-0.4,0.4-1,0.4-1.4,0c-0.4-0.4-0.4-1,0-1.4L5.3,0.3z"}))},exports.ChevronRightIcon=K,exports.ConfirmDialog=function(t){var n=t.title,r=t.ok,o=t.cancel,i=t.children,a=t.className,l=t.onClose,c=e.useCallback(function(){l&&l(!1)},[l]),u=e.useCallback(function(){l&&l(!0)},[l]),s=null!=r?r:"oui",d=null!=o?o:"Annuler";return e.createElement(te,{open:!0,className:C("ui-dialog-box","ui-dialog-confirm",a)},e.createElement(oe,null,e.createElement(e.Fragment,null,e.createElement("svg",{className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 438.5 438.5"},e.createElement("path",{d:"M409.1,109.2c-19.6-33.6-46.2-60.2-79.8-79.8C295.7,9.8,259.1,0,219.3,0c-39.8,0-76.5,9.8-110.1,29.4\r\n C75.6,49,49,75.6,29.4,109.2C9.8,142.8,0,179.5,0,219.3c0,39.8,9.8,76.5,29.4,110.1c19.6,33.6,46.2,60.2,79.8,79.8\r\n c33.6,19.6,70.3,29.4,110.1,29.4s76.5-9.8,110.1-29.4c33.6-19.6,60.2-46.2,79.8-79.8c19.6-33.6,29.4-70.3,29.4-110.1\r\n C438.5,179.5,428.7,142.8,409.1,109.2z M387.4,290.2c-9.7,22.6-22.7,42-39,58.2c-16.3,16.3-35.7,29.3-58.2,39\r\n c-22.6,9.7-46.2,14.6-70.9,14.6s-48.4-4.9-70.9-14.6c-22.6-9.7-42-22.7-58.2-39c-16.3-16.3-29.3-35.7-39-58.2\r\n c-9.7-22.6-14.6-46.2-14.6-70.9c0-24.7,4.9-48.4,14.6-70.9c9.7-22.6,22.7-42,39-58.2c16.3-16.3,35.7-29.3,58.2-39\r\n c22.6-9.7,46.2-14.6,70.9-14.6c24.7,0,48.4,4.9,70.9,14.6c22.6,9.7,42,22.7,58.2,39c16.3,16.3,29.3,35.7,39,58.2\r\n c9.7,22.6,14.6,46.2,14.6,70.9C402,244,397.1,267.7,387.4,290.2z"}),e.createElement("path",{d:"M217,294c-14.6,0-26.5,12.2-26.5,26.8c0,14.3,11.5,26.8,26.5,26.8s26.8-12.5,26.8-26.8C243.8,306.2,231.6,294,217,294z"}),e.createElement("path",{d:"M221.5,90.8c-47.1,0-68.7,27.9-68.7,46.7c0,13.6,11.5,19.9,20.9,19.9c18.8,0,11.2-26.8,46.7-26.8c17.4,0,31.4,7.7,31.4,23.7\r\n c0,18.8-19.5,29.6-31,39.4c-10.1,8.7-23.4,23-23.4,53c0,18.1,4.9,23.4,19.2,23.4c17.1,0,20.6-7.7,20.6-14.3\r\n c0-18.1,0.4-28.6,19.5-43.6c9.4-7.3,39-31,39-63.8S266.1,90.8,221.5,90.8z"})),e.createElement("h1",{className:"ui-dialog-title"},n))),e.createElement(ne,null,i),e.createElement(re,null,e.createElement(_,{className:"dialog-action-ok dialog-action",onClick:u},s),e.createElement(_,{className:"dialog-action-close dialog-action",onClick:c},d)))},exports.ContextMenu=function(t){var n=t.className,r=t.children,o=t.placement,i=t.open,a=t.container,l=t.onOpen,c=t.onClose,u=e.useRef(null),s=J(a),d=e.useState(null),m=d[0],f=d[1];F(function(){i&&c&&c()},[u]);var p=e.useCallback(function(e){var t=e;t.preventDefault(),t.ctrlKey||(f({mouseX:t.pageX-2,mouseY:t.pageY-4}),l&&l())},[l]),h=function(e){e.preventDefault()};e.useEffect(function(){var e=null!=s?s:document;return e.addEventListener("contextmenu",p),e!==document&&document.addEventListener("contextmenu",h),function(){e.removeEventListener("contextmenu",p),document.removeEventListener("contextmenu",h)}},[s,p]);return e.createElement(T,{ref:u,anchorPosition:null!==m?{top:m.mouseY,left:m.mouseX}:void 0,placement:o,open:i,overflow:!1},e.createElement(Q,{className:n,onClose:c,onClick:function(e){e&&2===e.button&&(e.preventDefault(),e.stopPropagation())},containerRef:u},r))},exports.CrossIcon=$,exports.Dialog=te,exports.DialogActions=function(t){var n=t.className,r=t.children;return e.createElement("div",{className:C("ui-dialog-actions",n)},r)},exports.DialogContent=ne,exports.DialogFooter=re,exports.DialogHeader=oe,exports.DialogTitle=function(t){var n=t.className,r=t.children,o=t.closeDisable,i=t.onClose,a=e.useCallback(function(){i&&!0!==o&&i()},[i,o]),l=void 0!==i;return e.createElement("h3",{className:C("ui-dialog-title",n)},r,l&&e.createElement("button",{type:"button",className:C("ui-dialog-close",o?"ui-dialog-close-disable":null),tabIndex:0,onClick:a},e.createElement($,null)))},exports.Divider=function(t){return t.className,e.createElement("hr",null)},exports.DomContainer=y,exports.ErrorDialog=function(t){var n=t.title,r=t.ok,o=t.children,i=t.className,a=t.onClose,l=e.useCallback(function(){a&&a(!0)},[a]),c=null!=r?r:"fermer";return e.createElement(te,{open:!0,className:C("ui-dialog-box","ui-dialog-error",i)},e.createElement(oe,null,e.createElement(e.Fragment,null,e.createElement("svg",{className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 438.533 438.533"},e.createElement("path",{d:"M409.133,109.203c-19.608-33.592-46.205-60.189-79.798-79.796C295.736,9.801,259.058,0,219.273,0 c-39.781,0-76.47,9.801-110.063,29.407c-33.595,19.604-60.192,46.201-79.8,79.796C9.801,142.8,0,179.489,0,219.267 c0,39.78,9.804,76.463,29.407,110.062c19.607,33.592,46.204,60.189,79.799,79.798c33.597,19.605,70.283,29.407,110.063,29.407 s76.47-9.802,110.065-29.407c33.593-19.602,60.189-46.206,79.795-79.798c19.603-33.596,29.403-70.284,29.403-110.062 C438.533,179.485,428.732,142.795,409.133,109.203z M387.434,290.213c-9.709,22.556-22.696,41.97-38.969,58.245 c-16.271,16.269-35.689,29.26-58.245,38.965c-22.555,9.712-46.202,14.564-70.946,14.564c-24.744,0-48.391-4.853-70.948-14.564 c-22.554-9.705-41.971-22.696-58.245-38.965c-16.269-16.275-29.259-35.687-38.97-58.245 c-9.707-22.552-14.562-46.206-14.562-70.946c0-24.744,4.854-48.391,14.562-70.948c9.707-22.554,22.697-41.968,38.97-58.245 c16.274-16.269,35.691-29.26,58.245-38.97c22.554-9.704,46.205-14.558,70.948-14.558c24.74,0,48.395,4.851,70.946,14.558 c22.556,9.707,41.97,22.698,58.245,38.97c16.272,16.274,29.26,35.688,38.969,58.245c9.709,22.554,14.564,46.201,14.564,70.948 C402.002,244.011,397.143,267.664,387.434,290.213z"}),e.createElement("path",{d:"M284.368,258.668c-19.219-14.086-40.926-21.129-65.095-21.129c-24.172,0-45.871,7.039-65.096,21.129 c-19.224,14.085-32.358,32.641-39.397,55.671c-1.521,4.757-1.143,9.381,1.141,13.847c2.286,4.469,5.898,7.467,10.85,8.993 c4.758,1.526,9.373,1.143,13.846-1.144c4.471-2.285,7.467-5.899,8.991-10.848c4.759-15.235,13.562-27.556,26.409-36.979 c12.847-9.418,27.263-14.127,43.252-14.127c15.987,0,30.412,4.712,43.251,14.127c12.854,9.424,21.655,21.744,26.412,36.979 c1.52,4.948,4.564,8.562,9.134,10.848c4.568,2.286,9.236,2.67,13.989,1.144c4.761-1.526,8.278-4.524,10.564-8.993 c2.286-4.466,2.669-9.09,1.14-13.847C316.729,291.312,303.591,272.75,284.368,258.668z"}),e.createElement("path",{d:"M146.181,182.725c10.085,0,18.699-3.576,25.837-10.709c7.139-7.135,10.708-15.749,10.708-25.837 c0-10.089-3.569-18.699-10.708-25.837s-15.752-10.709-25.837-10.709c-10.088,0-18.702,3.571-25.84,10.709 c-7.135,7.139-10.707,15.749-10.707,25.837c0,10.088,3.568,18.702,10.707,25.837C127.482,179.152,136.093,182.725,146.181,182.725 z"}),e.createElement("path",{d:"M292.359,109.631c-10.089,0-18.706,3.571-25.845,10.709c-7.132,7.139-10.708,15.749-10.708,25.837 c0,10.088,3.576,18.702,10.708,25.837c7.139,7.137,15.756,10.709,25.845,10.709c10.081,0,18.698-3.576,25.837-10.709 c7.139-7.135,10.708-15.749,10.708-25.837c0-10.089-3.569-18.699-10.708-25.837S302.44,109.631,292.359,109.631z"})),e.createElement("h1",{className:"ui-dialog-title"},n))),e.createElement(ne,null,o),e.createElement(re,null,e.createElement(_,{className:"dialog-action-ok dialog-action",onClick:l},c)))},exports.Map=function(t){var n=t.customButtons,r=t.onClose,o=t.onSave,i=v(t,["customButtons","onClose","onSave"]),a=e.useState(i.data?i.data:[]),l=a[0],c=a[1],u=function(){return g(void 0,void 0,void 0,function(){return E(this,function(e){return null==o||o(l),[2]})})},s=function(){return g(void 0,void 0,void 0,function(){return E(this,function(e){return null==r||r(),[2]})})};e.useEffect(function(){var e,t,r=null===(e=null==n?void 0:n.saveButton)||void 0===e?void 0:e.addEventListener("click",function(){u()}),o=null===(t=null==n?void 0:n.cancelButton)||void 0===t?void 0:t.addEventListener("click",function(){s()});return function(){var e,t;null===(e=null==n?void 0:n.saveButton)||void 0===e||e.removeEventListener("click",r),null===(t=null==n?void 0:n.cancelButton)||void 0===t||t.removeEventListener("click",o)}},[l]);return e.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"90%",height:"400px",margin:"20px"}},e.createElement(q.Provider,{value:{locations:l,setLocations:c}},e.createElement(G,h({},i)),!n&&e.createElement("div",{className:"cortex-widget-buttons"},e.createElement("button",{className:"cortex-widget-btn cortex-widget-btn-cancel",type:"button",onClick:s},"Cancel"),e.createElement("button",{className:"cortex-widget-btn cortex-widget-btn-save",type:"button",onClick:u},"Save"))))},exports.Menu=Q,exports.MenuGroup=function(t){var n=t.title,r=t.className,o=t.children;return e.createElement(e.Fragment,null,e.createElement("li",{className:C("ui-group-title",r)},n),o)},exports.MenuItem=ee,exports.Popper=T,exports.PopupMenu=function(t){var n=t.className,r=t.children,o=t.placement,i=t.open,a=t.anchorPosition,l=t.anchorEl,c=t.onClose,u=e.useRef(null);F(function(){i&&c&&c()},[u]);return i&&(a||l)?e.createElement(T,{ref:u,anchorPosition:a,anchorEl:l,placement:o,open:i,overflow:!1,className:"ui-menu-popper"},e.createElement(Q,{className:n,onClose:c,onClick:function(e){e&&2===e.button&&(e.preventDefault(),e.stopPropagation())},containerRef:u},r)):null},exports.Scanner=function(t){var r=t.scanConfirmation,o=void 0===r||r,i=t.scanTrackerType,a=void 0===i?"centerText":i,l=v(t,["scanConfirmation","scanTrackerType"]),c=e.useState(!1),u=c[0],s=c[1],d=e.useState(!1),m=d[0],f=d[1],p=e.useState([]),g=p[0],E=p[1],w=function(){s(!1),f(!1)},b=e.useMemo(function(){switch(a){case"outline":return n.outline;case"boundingBox":return n.boundingBox;case"centerText":return n.centerText;default:return}},[a]),y=e.useCallback(function(){w(),l.onScan(g)},[l,g]),x=e.useCallback(function(e){o?(s(!0),f(!0),E(e)):null==l||l.onScan(e)},[l]);return e.createElement(e.Fragment,null,e.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",gap:"15px",margin:"20px"}},e.createElement(n.Scanner,h({formats:["qr_code","micro_qr_code","rm_qr_code","maxi_code","pdf417","aztec","data_matrix","matrix_codes","dx_film_edge","databar","databar_expanded","codabar","code_39","code_93","code_128","ean_8","ean_13","itf","linear_codes","upc_a","upc_e"],components:{onOff:!0,torch:!0,tracker:b,finder:!1},scanDelay:2e3,allowMultiple:!1},l,{onScan:x,paused:m}))),e.createElement(R,h({open:u,onClose:w,onConfirm:y},null==l?void 0:l.scanConfirmDialog)))},exports.Selected=function(t){var n=t.title,r=t.data,o=t.onClick;return e.createElement(e.Fragment,null,e.createElement("div",{className:C("ui-selected-params")},e.createElement("div",{className:C("ui-selected-title")},n),e.createElement("div",{className:C("ui-selected-content")},e.createElement(e.Fragment,null,Array.isArray(r)&&r.map(function(t,n){return e.createElement(e.Fragment,null,e.createElement("div",{key:n,className:C("ui-selected-button")},e.createElement("button",{type:"button",onClick:function(){o(t)},className:1===t.selected?"ui-selected-btn":0===t.selected?"ui-not-selected":"ui-new-selected"},t.name)))})))))},exports.Spinner=function(t){var n=t.className,r=t.variant,o=void 0===r?"indeterminate":r;return e.createElement("div",{className:C("ui-spinner","indeterminate"===o?"ui-spinner-indeterminate":"ui-spinner-determinate",n)},"loading...")},exports.TagInput=function(t){var n=t.tags;t.className;var r=t.suggestions,o=t.disableFilter,i=t.onTextChange,a=t.onChange,l=e.useRef(null),c=e.useRef(null),u=e.useRef(null),s=e.useState(""),d=s[0],m=s[1],f=e.useState(!1),p=f[0],h=f[1];F(function(){h(!1)},[l,c]);var v=e.useCallback(function(e){if(a&&Array.isArray(n)){var t=n.findIndex(function(t){return t.id===e.id});if(!(t<0)){var r=w([],n,!0);r.splice(t,1),a(r)}}},[n,a]),g=e.useCallback(function(e){if(e){var t={id:e.id,label:e.label,value:e.value},r=Array.isArray(n)?w(w([],n,!0),[t],!1):[t];h(!1),a&&a(r),m(""),i&&i("")}},[n,a,i]),E=e.useCallback(function(e){m(e),i&&i(e)},[i]),b=Array.isArray(n)?n.map(function(t,n){return e.createElement(I,{key:n,tag:t,onDelete:function(){return v(t)}})}):[];return e.createElement("div",{ref:u,className:"ui-taginput"},b,e.createElement(D,{ref:l,value:d,onChange:E,onClick:function(){h(!0)}}),e.createElement(V,{ref:c,open:p,anchorEl:l,filter:d,tags:n,suggestions:r,disableFilter:o,onSuggestionClick:g}))},exports.ToggleButton=function(t){var n=t.selected,r=t.value,o=t.size,i=t.children,a=t.className,l=t.onChange,c=e.useCallback(function(){l&&l(r)},[l,r]);return e.createElement("button",{type:"button",className:C("ui-toggleBtn",void 0!==o?"ui-toggleBtn-size-".concat(o):"ui-toggleBtn-size-md",!0===n?"ui-toggleBtn-selected":null,a),onClick:c},i)},exports.Tooltip=function(t){var n=t.children,r=t.title;t.anchorEl;var o=t.enterDelay,i=void 0===o?0:o,a=t.leaveDelay,l=void 0===a?0:a,c=t.className,u=t.disabled,s=e.useState(void 0),d=s[0],m=s[1],f=e.useState(!1),p=f[0],v=f[1],g=e.useState(!0),E=g[0],w=g[1],b=e.useState(!1),y=b[0],x=b[1],k=e.useRef(),L=e.useRef();e.useEffect(function(){!0===u&&v(!1)},[u]);var A,N=function(){v(!0)},_=function(){v(!1)},S=function(e){y||(clearTimeout(k.current),clearTimeout(L.current),d||m(e.currentTarget),L.current=setTimeout(function(){_()},l))},B=function(e){y||(clearTimeout(k.current),clearTimeout(L.current),d||m(e.currentTarget),!0!==u&&(k.current=setTimeout(function(){N()},i)))},M=function(e){x(!0),clearTimeout(k.current),clearTimeout(L.current),d||m(e.currentTarget),!0!==u&&(k.current=setTimeout(function(){N()},2e3))},R=function(e){clearTimeout(k.current),clearTimeout(L.current),d||m(e.currentTarget),L.current=setTimeout(function(){_()},3e3)};if(n){var O=h(h({},n.props),{onFocus:function(e){d||m(e.currentTarget),k.current=setTimeout(function(){N()},i)},onMouseEnter:function(e){y||(clearTimeout(k.current),clearTimeout(L.current),d||m(e.currentTarget),!0!==u&&(k.current=setTimeout(function(){N()},i)))},onMouseLeave:S,onMouseOver:B,onTouchStart:M,onTouchEnd:R});A=e.cloneElement(n,O)}var P=p||!E;return e.createElement(e.Fragment,null,A,e.createElement(T,{role:"tooltip",anchorEl:d,open:P,className:C("ui-tooltip",c),onMouseOver:y?void 0:B,onMouseLeave:y?void 0:S,onTouchStart:M,onTouchEnd:R},e.createElement(j,{trigger:p,onEnter:function(){w(!1)},onExited:function(){w(!0)}},e.createElement("div",{className:"ui-tooltip-content"},r))))},exports.WarningDialog=function(t){var n=t.title,r=t.ok,o=t.children,i=t.className,a=t.onClose,l=e.useCallback(function(){a&&a(!0)},[a]),c=null!=r?r:"fermer";return e.createElement(te,{open:!0,className:C("ui-dialog-box","ui-dialog-warning",i)},e.createElement(oe,null,e.createElement(e.Fragment,null,e.createElement("svg",{className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 512 512"},e.createElement("polygon",{fill:"#FFA418",points:"0,477.703 256,477.703 289.391,256 256,34.297"}),e.createElement("polygon",{fill:"#FF8A1E",points:"256,34.297 256,477.703 512,477.703"}),e.createElement("circle",{fill:"#324860",cx:"256",cy:"405.359",r:"16.696"}),e.createElement("rect",{x:"239.304",y:"177.185",fill:"#324860",width:"33.391",height:"178.087"})),e.createElement("h1",{className:"ui-dialog-title"},n))),e.createElement(ne,null,o),e.createElement(re,null,e.createElement(_,{className:"dialog-action-ok dialog-action",onClick:l},c)))},exports.forwardRef=b;
2
2
  //# sourceMappingURL=index.js.map