@kystverket/styrbord 1.3.32 → 1.3.33

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.
@@ -23,3 +23,4 @@ export declare const WithoutPlaceholderWithValue: Story;
23
23
  export declare const Optional: Story;
24
24
  export declare const OptionalText: Story;
25
25
  export declare const Required: Story;
26
+ export declare const Disabled: Story;
package/dist/style.js CHANGED
@@ -11383,6 +11383,7 @@ const Lc = (r) => {
11383
11383
  var l;
11384
11384
  (l = r.onBlur) == null || l.call(r), t(!1);
11385
11385
  },
11386
+ disabled: r.disabled,
11386
11387
  onMouseDown: () => t((l) => !l),
11387
11388
  onKeyDown: (l) => {
11388
11389
  l.key === "Enter" || l.key === " " || l.key === "ArrowDown" || l.key === "ArrowUp" ? t(!0) : l.key === "Escape" && t(!1);
@@ -29,4 +29,4 @@ or drag and drop files here`,errors:{error:"Something went wrong during upload."
29
29
  Released under the MIT License.
30
30
  */var m7=function(n,e){return m7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,A){t.__proto__=A}||function(t,A){for(var i in A)Object.prototype.hasOwnProperty.call(A,i)&&(t[i]=A[i])},m7(n,e)};function v2(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");m7(r,n);function e(){this.constructor=r}r.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var J=function(){return J=Object.assign||function(e){for(var t,A=1,i=arguments.length;A<i;A++){t=arguments[A];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},J.apply(this,arguments)};function t1(r,n,e){if(e||arguments.length===2)for(var t=0,A=n.length,i;t<A;t++)(i||!(t in n))&&(i||(i=Array.prototype.slice.call(n,0,t)),i[t]=n[t]);return r.concat(i||Array.prototype.slice.call(n))}typeof SuppressedError=="function"&&SuppressedError;var Lr=function(r){var n=r.showTimeSelectOnly,e=n===void 0?!1:n,t=r.showTime,A=t===void 0?!1:t,i=r.className,a=r.children,l=r.inline,c=e?"Choose Time":"Choose Date".concat(A?" and Time":"");return d.createElement("div",{className:i,"aria-label":c,role:l?void 0:"dialog","aria-modal":l?void 0:"true"},a)},wr=function(r,n){var e=d.useRef(null),t=d.useRef(r);d.useEffect(function(){t.current=r},[r]);var A=d.useCallback(function(i){var a,l=i.composed&&i.composedPath&&i.composedPath().find(function(c){return c instanceof Node})||i.target;e.current&&!e.current.contains(l)&&(n&&l instanceof HTMLElement&&l.classList.contains(n)||(a=t.current)===null||a===void 0||a.call(t,i))},[n]);return d.useEffect(function(){return document.addEventListener("mousedown",A),function(){document.removeEventListener("mousedown",A)}},[A]),e},s0=function(r){var n=r.children,e=r.onClickOutside,t=r.className,A=r.containerRef,i=r.style,a=r.ignoreClass,l=wr(e,a);return d.createElement("div",{className:t,style:i,ref:function(c){l.current=c,A&&(A.current=c)}},n)},U;(function(r){r.ArrowUp="ArrowUp",r.ArrowDown="ArrowDown",r.ArrowLeft="ArrowLeft",r.ArrowRight="ArrowRight",r.PageUp="PageUp",r.PageDown="PageDown",r.Home="Home",r.End="End",r.Enter="Enter",r.Space=" ",r.Tab="Tab",r.Escape="Escape",r.Backspace="Backspace",r.X="x"})(U||(U={}));function p7(){var r=typeof window<"u"?window:globalThis;return r}var b3=12;function D(r){if(r==null)return new Date;var n=typeof r=="string"?hn(r):K(r);return K2(n)?n:new Date}function c3(r,n,e,t,A){A===void 0&&(A=D());for(var i=o3(e)||o3(v7()),a=Array.isArray(n)?n:[n],l=0,c=a;l<c.length;l++){var o=c[l],f=sn(r,o,A,{locale:i});if(K2(f)&&(!t||r===r2(f,o,e)))return f}return null}function K2(r,n){return F3(r)&&!w2(r,new Date("1/1/1800"))}function r2(r,n,e){if(e==="en")return y5(r,n,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var t=e?o3(e):void 0;return e&&!t&&console.warn('A locale object was not found for the provided string ["'.concat(e,'"].')),t=t||o3(v7()),y5(r,n,{locale:t,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function q2(r,n){var e=n.dateFormat,t=n.locale,A=Array.isArray(e)&&e.length>0?e[0]:e;return r&&r2(r,A,t)||""}var s4=" - ";function Dr(r,n,e){if(!r&&!n)return"";var t=r?q2(r,e):"",A=n?q2(n,e):"",i=e.rangeSeparator||s4;return"".concat(t).concat(i).concat(A)}function Nr(r,n){if(!(r!=null&&r.length))return"";var e=r[0]?q2(r[0],n):"";if(r.length===1)return e;if(r.length===2&&r[1]){var t=q2(r[1],n);return"".concat(e,", ").concat(t)}var A=r.length-1;return"".concat(e," (+").concat(A,")")}function d0(r,n){var e=n.hour,t=e===void 0?0:e,A=n.minute,i=A===void 0?0:A,a=n.second,l=a===void 0?0:a;return e0(t0(n0(r,l),i),t)}function _r(r){return t7(r)}function $r(r,n){return r2(r,"ddd",n)}function S3(r){return B1(r)}function v1(r,n,e){var t=o3(n||v7());return a1(r,{locale:t,weekStartsOn:e})}function f1(r){return S5(r)}function B3(r){return N3(r)}function d4(r){return e7(r)}function M4(){return B1(D())}function m4(r){return R5(r)}function eA(r){return gt(r)}function tA(r){return b5(r)}function n1(r,n){return r&&n?pn(r,n):!r&&!n}function Z2(r,n){return r&&n?Mn(r,n):!r&&!n}function M0(r,n){return r&&n?mn(r,n):!r&&!n}function F(r,n){return r&&n?ht(r,n):!r&&!n}function k1(r,n){return r&&n?p8(r,n):!r&&!n}function j1(r,n,e){var t,A=B1(n),i=R5(e);try{t=h3(r,{start:A,end:i})}catch{t=!1}return t}function p4(r,n){var e=p7();e.__localeData__||(e.__localeData__={}),e.__localeData__[r]=n}function v7(){var r=p7();return r.__localeId__}function o3(r){if(typeof r=="string"){var n=p7();return n.__localeData__?n.__localeData__[r]:void 0}else return r}function nA(r,n,e){return n(r2(r,"EEEE",e))}function rA(r,n){return r2(r,"EEEEEE",n)}function AA(r,n){return r2(r,"EEE",n)}function h7(r,n){return r2(Y2(D(),r),"LLLL",n)}function v4(r,n){return r2(Y2(D(),r),"LLL",n)}function iA(r,n){return r2(t3(D(),r),"QQQ",n)}function k2(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.maxDate,i=e.excludeDates,a=e.excludeDateIntervals,l=e.includeDates,c=e.includeDateIntervals,o=e.filterDate,f=e.disabled;return f?!0:U3(r,{minDate:t,maxDate:A})||i&&i.some(function(E){return E instanceof Date?F(r,E):F(r,E.date)})||a&&a.some(function(E){var u=E.start,s=E.end;return h3(r,{start:u,end:s})})||l&&!l.some(function(E){return F(r,E)})||c&&!c.some(function(E){var u=E.start,s=E.end;return h3(r,{start:u,end:s})})||o&&!o(D(r))||!1}function z7(r,n){var e=n===void 0?{}:n,t=e.excludeDates,A=e.excludeDateIntervals;return A&&A.length>0?A.some(function(i){var a=i.start,l=i.end;return h3(r,{start:a,end:l})}):t&&t.some(function(i){var a;return i instanceof Date?F(r,i):F(r,(a=i.date)!==null&&a!==void 0?a:new Date)})||!1}function h4(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.maxDate,i=e.excludeDates,a=e.includeDates,l=e.filterDate;return U3(r,{minDate:t?S5(t):void 0,maxDate:A?b5(A):void 0})||(i==null?void 0:i.some(function(c){return Z2(r,c instanceof Date?c:c.date)}))||a&&!a.some(function(c){return Z2(r,c)})||l&&!l(D(r))||!1}function m0(r,n,e,t){var A=H(r),i=b2(r),a=H(n),l=b2(n),c=H(t);return A===a&&A===c?i<=e&&e<=l:A<a?c===A&&i<=e||c===a&&l>=e||c<a&&c>A:!1}function aA(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.maxDate,i=e.excludeDates,a=e.includeDates;return U3(r,{minDate:t,maxDate:A})||i&&i.some(function(l){return Z2(l instanceof Date?l:l.date,r)})||a&&!a.some(function(l){return Z2(l,r)})||!1}function p0(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.maxDate,i=e.excludeDates,a=e.includeDates,l=e.filterDate,c=e.disabled;return c?!0:U3(r,{minDate:t,maxDate:A})||(i==null?void 0:i.some(function(o){return M0(r,o instanceof Date?o:o.date)}))||a&&!a.some(function(o){return M0(r,o)})||l&&!l(D(r))||!1}function v0(r,n,e){if(!n||!e||!F3(n)||!F3(e))return!1;var t=H(n),A=H(e);return t<=r&&A>=r}function h0(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.maxDate,i=e.excludeDates,a=e.includeDates,l=e.filterDate,c=e.disabled;if(c)return!0;var o=new Date(r,0,1);return U3(o,{minDate:t?N3(t):void 0,maxDate:A?B5(A):void 0})||(i==null?void 0:i.some(function(f){return n1(o,f instanceof Date?f:f.date)}))||a&&!a.some(function(f){return n1(o,f)})||l&&!l(D(o))||!1}function z0(r,n,e,t){var A=H(r),i=s1(r),a=H(n),l=s1(n),c=H(t);return A===a&&A===c?i<=e&&e<=l:A<a?c===A&&i<=e||c===a&&l>=e||c<a&&c>A:!1}function U3(r,n){var e,t=n===void 0?{}:n,A=t.minDate,i=t.maxDate;return(e=A&&_1(r,A)<0||i&&_1(r,i)>0)!==null&&e!==void 0?e:!1}function z4(r,n){return n.some(function(e){return O2(e)===O2(r)&&W2(e)===W2(r)&&M1(e)===M1(r)})}function g4(r,n){var e=n===void 0?{}:n,t=e.excludeTimes,A=e.includeTimes,i=e.filterTime;return t&&z4(r,t)||A&&!z4(r,A)||i&&!i(r)||!1}function Q4(r,n){var e=n.minTime,t=n.maxTime;if(!e||!t)throw new Error("Both minTime and maxTime props required");var A=D();A=e0(A,O2(r)),A=t0(A,W2(r)),A=n0(A,M1(r));var i=D();i=e0(i,O2(e)),i=t0(i,W2(e)),i=n0(i,M1(e));var a=D();a=e0(a,O2(t)),a=t0(a,W2(t)),a=n0(a,M1(t));var l;try{l=!h3(A,{start:i,end:a})}catch{l=!1}return l}function Z4(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.includeDates,i=Y1(r,1);return t&&L3(t,i)>0||A&&A.every(function(a){return L3(a,i)>0})||!1}function R4(r,n){var e=n===void 0?{}:n,t=e.maxDate,A=e.includeDates,i=y2(r,1);return t&&L3(i,t)>0||A&&A.every(function(a){return L3(i,a)>0})||!1}function lA(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.includeDates,i=N3(r),a=H5(i);return t&&w3(t,a)>0||A&&A.every(function(l){return w3(l,a)>0})||!1}function cA(r,n){var e=n===void 0?{}:n,t=e.maxDate,A=e.includeDates,i=B5(r),a=$0(i,1);return t&&w3(a,t)>0||A&&A.every(function(l){return w3(a,l)>0})||!1}function b4(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.includeDates,i=n3(r,1);return t&&D3(t,i)>0||A&&A.every(function(a){return D3(a,i)>0})||!1}function oA(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.yearItemNumber,i=A===void 0?b3:A,a=B3(n3(r,i)),l=E1(a,i).endPeriod,c=t&&H(t);return c&&c>l||!1}function S4(r,n){var e=n===void 0?{}:n,t=e.maxDate,A=e.includeDates,i=c1(r,1);return t&&D3(i,t)>0||A&&A.every(function(a){return D3(i,a)>0})||!1}function IA(r,n){var e=n===void 0?{}:n,t=e.maxDate,A=e.yearItemNumber,i=A===void 0?b3:A,a=c1(r,i),l=E1(a,i).startPeriod,c=t&&H(t);return c&&c<l||!1}function B4(r){var n=r.minDate,e=r.includeDates;if(e&&n){var t=e.filter(function(A){return _1(A,n)>=0});return Q5(t)}else return e?Q5(e):n}function U4(r){var n=r.maxDate,e=r.includeDates;if(e&&n){var t=e.filter(function(A){return _1(A,n)<=0});return g5(t)}else return e?g5(e):n}function Y4(r,n){var e;r===void 0&&(r=[]),n===void 0&&(n="react-datepicker__day--highlighted");for(var t=new Map,A=0,i=r.length;A<i;A++){var a=r[A];if(o1(a)){var l=r2(a,"MM.dd.yyyy"),c=t.get(l)||[];c.includes(n)||(c.push(n),t.set(l,c))}else if(typeof a=="object"){var o=Object.keys(a),f=(e=o[0])!==null&&e!==void 0?e:"",E=a[f];if(typeof f=="string"&&Array.isArray(E))for(var u=0,s=E.length;u<s;u++){var m=E[u];if(m){var l=r2(m,"MM.dd.yyyy"),c=t.get(l)||[];c.includes(f)||(c.push(f),t.set(l,c))}}}}return t}function fA(r,n){return r.length!==n.length?!1:r.every(function(e,t){return e===n[t]})}function EA(r,n){r===void 0&&(r=[]),n===void 0&&(n="react-datepicker__day--holidays");var e=new Map;return r.forEach(function(t){var A=t.date,i=t.holidayName;if(o1(A)){var a=r2(A,"MM.dd.yyyy"),l=e.get(a)||{className:"",holidayNames:[]};if(!("className"in l&&l.className===n&&fA(l.holidayNames,[i]))){l.className=n;var c=l.holidayNames;l.holidayNames=c?t1(t1([],c,!0),[i],!1):[i],e.set(a,l)}}}),e}function CA(r,n,e,t,A){for(var i=A.length,a=[],l=0;l<i;l++){var c=r,o=A[l];o&&(c=Mt(c,O2(o)),c=v3(c,W2(o)),c=vt(c,M1(o)));var f=v3(r,(e+1)*t);m1(c,n)&&w2(c,f)&&o!=null&&a.push(o)}return a}function V4(r){return r<10?"0".concat(r):"".concat(r)}function E1(r,n){n===void 0&&(n=b3);var e=Math.ceil(H(r)/n)*n,t=e-(n-1);return{startPeriod:t,endPeriod:e}}function uA(r){var n=new Date(r.getFullYear(),r.getMonth(),r.getDate()),e=new Date(r.getFullYear(),r.getMonth(),r.getDate(),24);return Math.round((+e-+n)/36e5)}function K4(r){var n=r.getSeconds(),e=r.getMilliseconds();return K(r.getTime()-n*1e3-e)}function q4(r,n){return K4(r).getTime()===K4(n).getTime()}function x4(r){if(!o1(r))throw new Error("Invalid date");var n=new Date(r);return n.setHours(0,0,0,0),n}function g7(r,n){if(!o1(r)||!o1(n))throw new Error("Invalid date received");var e=x4(r),t=x4(n);return w2(e,t)}function k4(r){return r.key===U.Space}var sA=(function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;return t.inputRef=d.createRef(),t.onTimeChange=function(A){var i,a;t.setState({time:A});var l=t.props.date,c=l instanceof Date&&!isNaN(+l),o=c?l:new Date;if(A!=null&&A.includes(":")){var f=A.split(":"),E=f[0],u=f[1];o.setHours(Number(E)),o.setMinutes(Number(u))}(a=(i=t.props).onChange)===null||a===void 0||a.call(i,o)},t.renderTimeInput=function(){var A=t.state.time,i=t.props,a=i.date,l=i.timeString,c=i.customTimeInput;return c?d.cloneElement(c,{date:a,value:A,onChange:t.onTimeChange}):d.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:t.inputRef,onClick:function(){var o;(o=t.inputRef.current)===null||o===void 0||o.focus()},required:!0,value:A,onChange:function(o){t.onTimeChange(o.target.value||l)}})},t.state={time:t.props.timeString},t}return n.getDerivedStateFromProps=function(e,t){return e.timeString!==t.time?{time:e.timeString}:null},n.prototype.render=function(){return d.createElement("div",{className:"react-datepicker__input-time-container"},d.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),d.createElement("div",{className:"react-datepicker-time__input-container"},d.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},n})(d.Component),dA=(function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.dayEl=d.createRef(),e.handleClick=function(t){!e.isDisabled()&&e.props.onClick&&e.props.onClick(t)},e.handleMouseEnter=function(t){!e.isDisabled()&&e.props.onMouseEnter&&e.props.onMouseEnter(t)},e.handleOnKeyDown=function(t){var A,i,a=t.key;a===U.Space&&(t.preventDefault(),t.key=U.Enter),(i=(A=e.props).handleOnKeyDown)===null||i===void 0||i.call(A,t)},e.isSameDay=function(t){return F(e.props.day,t)},e.isKeyboardSelected=function(){var t;if(e.props.disabledKeyboardNavigation)return!1;var A=e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(a){return e.isSameDayOrWeek(a)}):e.isSameDayOrWeek(e.props.selected),i=e.props.preSelection&&e.isDisabled(e.props.preSelection);return!A&&e.isSameDayOrWeek(e.props.preSelection)&&!i},e.isDisabled=function(t){return t===void 0&&(t=e.props.day),k2(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate,disabled:e.props.disabled})},e.isExcluded=function(){return z7(e.props.day,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.isStartOfWeek=function(){return F(e.props.day,v1(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameWeek=function(t){return e.props.showWeekPicker&&F(t,v1(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameDayOrWeek=function(t){return e.isSameDay(t)||e.isSameWeek(t)},e.getHighLightedClass=function(){var t=e.props,A=t.day,i=t.highlightDates;if(!i)return!1;var a=r2(A,"MM.dd.yyyy");return i.get(a)},e.getHolidaysClass=function(){var t,A=e.props,i=A.day,a=A.holidays;if(!a)return[void 0];var l=r2(i,"MM.dd.yyyy");return a.has(l)?[(t=a.get(l))===null||t===void 0?void 0:t.className]:[void 0]},e.isInRange=function(){var t=e.props,A=t.day,i=t.startDate,a=t.endDate;return!i||!a?!1:j1(A,i,a)},e.isInSelectingRange=function(){var t,A=e.props,i=A.day,a=A.selectsStart,l=A.selectsEnd,c=A.selectsRange,o=A.selectsDisabledDaysInRange,f=A.startDate,E=A.swapRange,u=A.endDate,s=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;if(!(a||l||c)||!s||!o&&e.isDisabled())return!1;if(a&&u&&(w2(s,u)||k1(s,u)))return j1(i,s,u);if(l&&f&&(m1(s,f)||k1(s,f)))return j1(i,f,s);if(c&&f&&!u){if(k1(s,f)||m1(s,f))return j1(i,f,s);if(E&&w2(s,f))return j1(i,s,f)}return!1},e.isSelectingRangeStart=function(){var t;if(!e.isInSelectingRange())return!1;var A=e.props,i=A.day,a=A.startDate,l=A.selectsStart,c=A.swapRange,o=A.selectsRange,f=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return l?F(i,f):o&&c&&a&&f?F(i,w2(f,a)?f:a):F(i,a)},e.isSelectingRangeEnd=function(){var t;if(!e.isInSelectingRange())return!1;var A=e.props,i=A.day,a=A.endDate,l=A.selectsEnd,c=A.selectsRange,o=A.swapRange,f=A.startDate,E=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return l?F(i,E):c&&o&&f&&E?F(i,w2(E,f)?f:E):c?F(i,E):F(i,a)},e.isRangeStart=function(){var t=e.props,A=t.day,i=t.startDate,a=t.endDate;return!i||!a?!1:F(i,A)},e.isRangeEnd=function(){var t=e.props,A=t.day,i=t.startDate,a=t.endDate;return!i||!a?!1:F(a,A)},e.isWeekend=function(){var t=s8(e.props.day);return t===0||t===6},e.isAfterMonth=function(){return e.props.month!==void 0&&(e.props.month+1)%12===b2(e.props.day)},e.isBeforeMonth=function(){return e.props.month!==void 0&&(b2(e.props.day)+1)%12===e.props.month},e.isCurrentDay=function(){return e.isSameDay(D())},e.isSelected=function(){var t;return e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(A){return e.isSameDayOrWeek(A)}):e.isSameDayOrWeek(e.props.selected)},e.getClassNames=function(t){var A=e.props.dayClassName?e.props.dayClassName(t):void 0;return p2("react-datepicker__day",A,"react-datepicker__day--"+$r(e.props.day),{"react-datepicker__day--disabled":e.isDisabled(),"react-datepicker__day--excluded":e.isExcluded(),"react-datepicker__day--selected":e.isSelected(),"react-datepicker__day--keyboard-selected":e.isKeyboardSelected(),"react-datepicker__day--range-start":e.isRangeStart(),"react-datepicker__day--range-end":e.isRangeEnd(),"react-datepicker__day--in-range":e.isInRange(),"react-datepicker__day--in-selecting-range":e.isInSelectingRange(),"react-datepicker__day--selecting-range-start":e.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":e.isSelectingRangeEnd(),"react-datepicker__day--today":e.isCurrentDay(),"react-datepicker__day--weekend":e.isWeekend(),"react-datepicker__day--outside-month":e.isAfterMonth()||e.isBeforeMonth()},e.getHighLightedClass(),e.getHolidaysClass())},e.getAriaLabel=function(){var t=e.props,A=t.day,i=t.ariaLabelPrefixWhenEnabled,a=i===void 0?"Choose":i,l=t.ariaLabelPrefixWhenDisabled,c=l===void 0?"Not available":l,o=e.isDisabled()||e.isExcluded()?c:a;return"".concat(o," ").concat(r2(A,"PPPP",e.props.locale))},e.getTitle=function(){var t=e.props,A=t.day,i=t.holidays,a=i===void 0?new Map:i,l=t.excludeDates,c=r2(A,"MM.dd.yyyy"),o=[];return a.has(c)&&o.push.apply(o,a.get(c).holidayNames),e.isExcluded()&&o.push(l==null?void 0:l.filter(function(f){return f instanceof Date?F(f,A):F(f==null?void 0:f.date,A)}).map(function(f){if(!(f instanceof Date))return f==null?void 0:f.message})),o.join(", ")},e.getTabIndex=function(){var t=e.props.selected,A=e.props.preSelection,i=!(e.props.showWeekPicker&&(e.props.showWeekNumber||!e.isStartOfWeek()))&&(e.isKeyboardSelected()||e.isSameDay(t)&&F(A,t))?0:-1;return i},e.handleFocusDay=function(){var t;e.shouldFocusDay()&&((t=e.dayEl.current)===null||t===void 0||t.focus({preventScroll:!0}))},e.renderDayContents=function(){return e.props.monthShowsDuplicateDaysEnd&&e.isAfterMonth()||e.props.monthShowsDuplicateDaysStart&&e.isBeforeMonth()?null:e.props.renderDayContents?e.props.renderDayContents(O5(e.props.day),e.props.day):O5(e.props.day)},e.render=function(){return d.createElement("div",{ref:e.dayEl,className:e.getClassNames(e.props.day),onKeyDown:e.handleOnKeyDown,onClick:e.handleClick,onMouseEnter:e.props.usePointerEvent?void 0:e.handleMouseEnter,onPointerEnter:e.props.usePointerEvent?e.handleMouseEnter:void 0,tabIndex:e.getTabIndex(),"aria-label":e.getAriaLabel(),role:"gridcell",title:e.getTitle(),"aria-disabled":e.isDisabled(),"aria-current":e.isCurrentDay()?"date":void 0,"aria-selected":e.isSelected()||e.isInRange()},e.renderDayContents(),e.getTitle()!==""&&d.createElement("span",{className:"overlay"},e.getTitle()))},e}return n.prototype.componentDidMount=function(){this.handleFocusDay()},n.prototype.componentDidUpdate=function(){this.handleFocusDay()},n.prototype.shouldFocusDay=function(){var e=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(e=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(e=!1),this.isDayActiveElement()&&(e=!0),this.isDuplicateDay()&&(e=!1)),e},n.prototype.isDayActiveElement=function(){var e,t,A;return((t=(e=this.props.containerRef)===null||e===void 0?void 0:e.current)===null||t===void 0?void 0:t.contains(document.activeElement))&&((A=document.activeElement)===null||A===void 0?void 0:A.classList.contains("react-datepicker__day"))},n.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},n})(d.Component),MA=(function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.weekNumberEl=d.createRef(),e.handleClick=function(t){e.props.onClick&&e.props.onClick(t)},e.handleOnKeyDown=function(t){var A,i,a=t.key;a===U.Space&&(t.preventDefault(),t.key=U.Enter),(i=(A=e.props).handleOnKeyDown)===null||i===void 0||i.call(A,t)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!F(e.props.date,e.props.selected)&&F(e.props.date,e.props.preSelection)},e.getTabIndex=function(){return e.props.showWeekPicker&&e.props.showWeekNumber&&(e.isKeyboardSelected()||F(e.props.date,e.props.selected)&&F(e.props.preSelection,e.props.selected))?0:-1},e.handleFocusWeekNumber=function(t){var A=!1;e.getTabIndex()===0&&!(t!=null&&t.isInputFocused)&&F(e.props.date,e.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(A=!0),e.props.inline&&!e.props.shouldFocusDayInline&&(A=!1),e.props.containerRef&&e.props.containerRef.current&&e.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(A=!0)),A&&e.weekNumberEl.current&&e.weekNumberEl.current.focus({preventScroll:!0})},e}return Object.defineProperty(n,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},n.prototype.componentDidUpdate=function(e){this.handleFocusWeekNumber(e)},n.prototype.render=function(){var e=this.props,t=e.weekNumber,A=e.isWeekDisabled,i=e.ariaLabelPrefix,a=i===void 0?n.defaultProps.ariaLabelPrefix:i,l=e.onClick,c={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!l&&!A,"react-datepicker__week-number--selected":!!l&&F(this.props.date,this.props.selected)};return d.createElement("div",{ref:this.weekNumberEl,className:p2(c),"aria-label":"".concat(a," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},t)},n})(d.Component),mA=(function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.isDisabled=function(t){return k2(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.handleDayClick=function(t,A){e.props.onDayClick&&e.props.onDayClick(t,A)},e.handleDayMouseEnter=function(t){e.props.onDayMouseEnter&&e.props.onDayMouseEnter(t)},e.handleWeekClick=function(t,A,i){for(var a,l,c,o=new Date(t),f=0;f<7;f++){var E=new Date(t);E.setDate(E.getDate()+f);var u=!e.isDisabled(E);if(u){o=E;break}}typeof e.props.onWeekSelect=="function"&&e.props.onWeekSelect(o,A,i),e.props.showWeekPicker&&e.handleDayClick(o,i),((a=e.props.shouldCloseOnSelect)!==null&&a!==void 0?a:n.defaultProps.shouldCloseOnSelect)&&((c=(l=e.props).setOpen)===null||c===void 0||c.call(l,!1))},e.formatWeekNumber=function(t){return e.props.formatWeekNumber?e.props.formatWeekNumber(t):_r(t)},e.isWeekDisabled=function(){for(var t=e.startOfWeek(),A=j2(t,6),i=new Date(t);i<=A;){if(!e.isDisabled(i))return!1;i=j2(i,1)}return!0},e.renderDays=function(){var t=e.startOfWeek(),A=[],i=e.formatWeekNumber(t);if(e.props.showWeekNumber){var a=e.props.onWeekSelect||e.props.showWeekPicker?e.handleWeekClick.bind(e,t,i):void 0;A.push(d.createElement(MA,J({key:"W"},n.defaultProps,e.props,{weekNumber:i,isWeekDisabled:e.isWeekDisabled(),date:t,onClick:a})))}return A.concat([0,1,2,3,4,5,6].map(function(l){var c=j2(t,l);return d.createElement(dA,J({},n.defaultProps,e.props,{ariaLabelPrefixWhenEnabled:e.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:e.props.disabledDayAriaLabelPrefix,key:c.valueOf(),day:c,onClick:e.handleDayClick.bind(e,c),onMouseEnter:e.handleDayMouseEnter.bind(e,c)}))}))},e.startOfWeek=function(){return v1(e.props.day,e.props.locale,e.props.calendarStartDay)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!F(e.startOfWeek(),e.props.selected)&&F(e.startOfWeek(),e.props.preSelection)},e}return Object.defineProperty(n,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),n.prototype.render=function(){var e={"react-datepicker__week":!0,"react-datepicker__week--selected":F(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()},t=this.props.weekClassName?this.props.weekClassName(this.startOfWeek()):void 0;return d.createElement("div",{className:p2(e,t),role:"row"},this.renderDays())},n})(d.Component),Y3,pA=6,I3={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},Q7=(Y3={},Y3[I3.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},Y3[I3.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},Y3[I3.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},Y3),g0=1;function j4(r,n){return r?I3.FOUR_COLUMNS:n?I3.TWO_COLUMNS:I3.THREE_COLUMNS}var vA=(function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.MONTH_REFS=t1([],Array(12),!0).map(function(){return d.createRef()}),e.QUARTER_REFS=t1([],Array(4),!0).map(function(){return d.createRef()}),e.isDisabled=function(t){return k2(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate,disabled:e.props.disabled})},e.isExcluded=function(t){return z7(t,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.handleDayClick=function(t,A){var i,a;(a=(i=e.props).onDayClick)===null||a===void 0||a.call(i,t,A,e.props.orderInDisplay)},e.handleDayMouseEnter=function(t){var A,i;(i=(A=e.props).onDayMouseEnter)===null||i===void 0||i.call(A,t)},e.handleMouseLeave=function(){var t,A;(A=(t=e.props).onMouseLeave)===null||A===void 0||A.call(t)},e.isRangeStartMonth=function(t){var A=e.props,i=A.day,a=A.startDate,l=A.endDate;return!a||!l?!1:Z2(Y2(i,t),a)},e.isRangeStartQuarter=function(t){var A=e.props,i=A.day,a=A.startDate,l=A.endDate;return!a||!l?!1:M0(t3(i,t),a)},e.isRangeEndMonth=function(t){var A=e.props,i=A.day,a=A.startDate,l=A.endDate;return!a||!l?!1:Z2(Y2(i,t),l)},e.isRangeEndQuarter=function(t){var A=e.props,i=A.day,a=A.startDate,l=A.endDate;return!a||!l?!1:M0(t3(i,t),l)},e.isInSelectingRangeMonth=function(t){var A,i=e.props,a=i.day,l=i.selectsStart,c=i.selectsEnd,o=i.selectsRange,f=i.startDate,E=i.endDate,u=(A=e.props.selectingDate)!==null&&A!==void 0?A:e.props.preSelection;return!(l||c||o)||!u?!1:l&&E?m0(u,E,t,a):c&&f||o&&f&&!E?m0(f,u,t,a):!1},e.isSelectingMonthRangeStart=function(t){var A;if(!e.isInSelectingRangeMonth(t))return!1;var i=e.props,a=i.day,l=i.startDate,c=i.selectsStart,o=Y2(a,t),f=(A=e.props.selectingDate)!==null&&A!==void 0?A:e.props.preSelection;return c?Z2(o,f):Z2(o,l)},e.isSelectingMonthRangeEnd=function(t){var A;if(!e.isInSelectingRangeMonth(t))return!1;var i=e.props,a=i.day,l=i.endDate,c=i.selectsEnd,o=i.selectsRange,f=Y2(a,t),E=(A=e.props.selectingDate)!==null&&A!==void 0?A:e.props.preSelection;return c||o?Z2(f,E):Z2(f,l)},e.isInSelectingRangeQuarter=function(t){var A,i=e.props,a=i.day,l=i.selectsStart,c=i.selectsEnd,o=i.selectsRange,f=i.startDate,E=i.endDate,u=(A=e.props.selectingDate)!==null&&A!==void 0?A:e.props.preSelection;return!(l||c||o)||!u?!1:l&&E?z0(u,E,t,a):c&&f||o&&f&&!E?z0(f,u,t,a):!1},e.isWeekInMonth=function(t){var A=e.props.day,i=j2(t,6);return Z2(t,A)||Z2(i,A)},e.isCurrentMonth=function(t,A){return H(t)===H(D())&&A===b2(D())},e.isCurrentQuarter=function(t,A){return H(t)===H(D())&&A===s1(D())},e.isSelectedMonth=function(t,A,i){return b2(i)===A&&H(t)===H(i)},e.isSelectMonthInList=function(t,A,i){return i.some(function(a){return e.isSelectedMonth(t,A,a)})},e.isSelectedQuarter=function(t,A,i){return s1(i)===A&&H(t)===H(i)},e.isSelectQuarterInList=function(t,A,i){return i.some(function(a){return e.isSelectedQuarter(t,A,a)})},e.isMonthSelected=function(){var t=e.props,A=t.day,i=t.selected,a=t.selectedDates,l=t.selectsMultiple,c=b2(A);return l?a==null?void 0:a.some(function(o){return e.isSelectedMonth(A,c,o)}):!!i&&e.isSelectedMonth(A,c,i)},e.isQuarterSelected=function(){var t=e.props,A=t.day,i=t.selected,a=t.selectedDates,l=t.selectsMultiple,c=s1(A);return l?a==null?void 0:a.some(function(o){return e.isSelectedQuarter(A,c,o)}):!!i&&e.isSelectedQuarter(A,c,i)},e.renderWeeks=function(){if(!K2(e.props.day))return[];for(var t=[],A=e.props.fixedHeight,i=0,a=!1,l=v1(f1(e.props.day),e.props.locale,e.props.calendarStartDay),c=function(m){return e.props.showWeekPicker?v1(m,e.props.locale,e.props.calendarStartDay):e.props.preSelection},o=function(m){return e.props.showWeekPicker?v1(m,e.props.locale,e.props.calendarStartDay):e.props.selected},f=e.props.selected?o(e.props.selected):void 0,E=e.props.preSelection?c(e.props.preSelection):void 0;t.push(d.createElement(mA,J({},e.props,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,key:i,day:l,month:b2(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,selected:f,preSelection:E,showWeekNumber:e.props.showWeekNumbers}))),!a;){i++,l=J3(l,1);var u=A&&i>=pA,s=!A&&!e.isWeekInMonth(l);if(u||s)if(e.props.peekNextMonth)a=!0;else break}return t},e.onMonthClick=function(t,A){var i=e.isMonthDisabledForLabelDate(A),a=i.isDisabled,l=i.labelDate;a||e.handleDayClick(f1(l),t)},e.onMonthMouseEnter=function(t){var A=e.isMonthDisabledForLabelDate(t),i=A.isDisabled,a=A.labelDate;i||e.handleDayMouseEnter(f1(a))},e.handleMonthNavigation=function(t,A){var i,a,l,c;(a=(i=e.props).setPreSelection)===null||a===void 0||a.call(i,A),(c=(l=e.MONTH_REFS[t])===null||l===void 0?void 0:l.current)===null||c===void 0||c.focus()},e.handleKeyboardNavigation=function(t,A,i){var a,l=e.props,c=l.selected,o=l.preSelection,f=l.setPreSelection,E=l.minDate,u=l.maxDate,s=l.showFourColumnMonthYearPicker,m=l.showTwoColumnMonthYearPicker;if(o){var h=j4(s,m),v=e.getVerticalOffset(h),z=(a=Q7[h])===null||a===void 0?void 0:a.grid,Z=function(B,Q,R){var q,W,k=Q,T=R;switch(B){case U.ArrowRight:k=y2(Q,g0),T=R===11?0:R+g0;break;case U.ArrowLeft:k=Y1(Q,g0),T=R===0?11:R-g0;break;case U.ArrowUp:k=Y1(Q,v),T=!((q=z==null?void 0:z[0])===null||q===void 0)&&q.includes(R)?R+12-v:R-v;break;case U.ArrowDown:k=y2(Q,v),T=!((W=z==null?void 0:z[z.length-1])===null||W===void 0)&&W.includes(R)?R-12+v:R+v;break}return{newCalculatedDate:k,newCalculatedMonth:T}},b=function(B,Q,R){for(var q=40,W=B,k=!1,T=0,X=Z(W,Q,R),e2=X.newCalculatedDate,w=X.newCalculatedMonth;!k;){if(T>=q){e2=Q,w=R;break}if(E&&e2<E){W=U.ArrowRight;var G=Z(W,e2,w);e2=G.newCalculatedDate,w=G.newCalculatedMonth}if(u&&e2>u){W=U.ArrowLeft;var G=Z(W,e2,w);e2=G.newCalculatedDate,w=G.newCalculatedMonth}if(aA(e2,e.props)){var G=Z(W,e2,w);e2=G.newCalculatedDate,w=G.newCalculatedMonth}else k=!0;T++}return{newCalculatedDate:e2,newCalculatedMonth:w}};if(A===U.Enter){e.isMonthDisabled(i)||(e.onMonthClick(t,i),f==null||f(c));return}var S=b(A,o,i),x=S.newCalculatedDate,V=S.newCalculatedMonth;switch(A){case U.ArrowRight:case U.ArrowLeft:case U.ArrowUp:case U.ArrowDown:e.handleMonthNavigation(V,x);break}}},e.getVerticalOffset=function(t){var A,i;return(i=(A=Q7[t])===null||A===void 0?void 0:A.verticalNavigationOffset)!==null&&i!==void 0?i:0},e.onMonthKeyDown=function(t,A){var i=e.props,a=i.disabledKeyboardNavigation,l=i.handleOnMonthKeyDown,c=t.key;c!==U.Tab&&t.preventDefault(),a||e.handleKeyboardNavigation(t,c,A),l&&l(t)},e.onQuarterClick=function(t,A){var i=t3(e.props.day,A);p0(i,e.props)||e.handleDayClick(d4(i),t)},e.onQuarterMouseEnter=function(t){var A=t3(e.props.day,t);p0(A,e.props)||e.handleDayMouseEnter(d4(A))},e.handleQuarterNavigation=function(t,A){var i,a,l,c;e.isDisabled(A)||e.isExcluded(A)||((a=(i=e.props).setPreSelection)===null||a===void 0||a.call(i,A),(c=(l=e.QUARTER_REFS[t-1])===null||l===void 0?void 0:l.current)===null||c===void 0||c.focus())},e.onQuarterKeyDown=function(t,A){var i,a,l=t.key;if(!e.props.disabledKeyboardNavigation)switch(l){case U.Enter:e.onQuarterClick(t,A),(a=(i=e.props).setPreSelection)===null||a===void 0||a.call(i,e.props.selected);break;case U.ArrowRight:if(!e.props.preSelection)break;e.handleQuarterNavigation(A===4?1:A+1,$0(e.props.preSelection,1));break;case U.ArrowLeft:if(!e.props.preSelection)break;e.handleQuarterNavigation(A===1?4:A-1,H5(e.props.preSelection));break}},e.isMonthDisabledForLabelDate=function(t){var A,i=e.props,a=i.day,l=i.disabled,c=i.minDate,o=i.maxDate,f=i.excludeDates,E=i.includeDates,u=Y2(a,t);return l?{isDisabled:!0,labelDate:Y2(a,t)}:{isDisabled:(A=(c||o||f||E)&&h4(u,e.props))!==null&&A!==void 0?A:!1,labelDate:u}},e.isMonthDisabled=function(t){var A=e.isMonthDisabledForLabelDate(t).isDisabled;return A},e.getMonthClassNames=function(t){var A=e.props,i=A.day,a=A.startDate,l=A.endDate,c=A.preSelection,o=A.monthClassName,f=o?o(Y2(i,t)):void 0,E=e.getSelection();return p2("react-datepicker__month-text","react-datepicker__month-".concat(t),f,{"react-datepicker__month-text--disabled":e.isMonthDisabled(t),"react-datepicker__month-text--selected":E?e.isSelectMonthInList(i,t,E):void 0,"react-datepicker__month-text--keyboard-selected":!e.props.disabledKeyboardNavigation&&c&&e.isSelectedMonth(i,t,c)&&!e.isMonthSelected()&&!e.isMonthDisabled(t),"react-datepicker__month-text--in-selecting-range":e.isInSelectingRangeMonth(t),"react-datepicker__month-text--in-range":a&&l?m0(a,l,t,i):void 0,"react-datepicker__month-text--range-start":e.isRangeStartMonth(t),"react-datepicker__month-text--range-end":e.isRangeEndMonth(t),"react-datepicker__month-text--selecting-range-start":e.isSelectingMonthRangeStart(t),"react-datepicker__month-text--selecting-range-end":e.isSelectingMonthRangeEnd(t),"react-datepicker__month-text--today":e.isCurrentMonth(i,t)})},e.getTabIndex=function(t){if(e.props.preSelection==null)return"-1";var A=b2(e.props.preSelection),i=e.isMonthDisabledForLabelDate(A).isDisabled,a=t===A&&!(i||e.props.disabledKeyboardNavigation)?"0":"-1";return a},e.getQuarterTabIndex=function(t){if(e.props.preSelection==null)return"-1";var A=s1(e.props.preSelection),i=p0(e.props.day,e.props),a=t===A&&!(i||e.props.disabledKeyboardNavigation)?"0":"-1";return a},e.getAriaLabel=function(t){var A=e.props,i=A.chooseDayAriaLabelPrefix,a=i===void 0?"Choose":i,l=A.disabledDayAriaLabelPrefix,c=l===void 0?"Not available":l,o=A.day,f=A.locale,E=Y2(o,t),u=e.isDisabled(E)||e.isExcluded(E)?c:a;return"".concat(u," ").concat(r2(E,"MMMM yyyy",f))},e.getQuarterClassNames=function(t){var A=e.props,i=A.day,a=A.startDate,l=A.endDate,c=A.minDate,o=A.maxDate,f=A.excludeDates,E=A.includeDates,u=A.filterDate,s=A.preSelection,m=A.disabledKeyboardNavigation,h=A.disabled,v=(c||o||f||E||u||h)&&p0(t3(i,t),e.props),z=e.getSelection();return p2("react-datepicker__quarter-text","react-datepicker__quarter-".concat(t),{"react-datepicker__quarter-text--disabled":v,"react-datepicker__quarter-text--selected":z?e.isSelectQuarterInList(i,t,z):void 0,"react-datepicker__quarter-text--keyboard-selected":!m&&s&&e.isSelectedQuarter(i,t,s)&&!e.isQuarterSelected()&&!v,"react-datepicker__quarter-text--in-selecting-range":e.isInSelectingRangeQuarter(t),"react-datepicker__quarter-text--in-range":a&&l?z0(a,l,t,i):void 0,"react-datepicker__quarter-text--range-start":e.isRangeStartQuarter(t),"react-datepicker__quarter-text--range-end":e.isRangeEndQuarter(t),"react-datepicker__quarter-text--today":e.isCurrentQuarter(i,t)})},e.getMonthContent=function(t){var A=e.props,i=A.showFullMonthYearPicker,a=A.renderMonthContent,l=A.locale,c=A.day,o=v4(t,l),f=h7(t,l);return a?a(t,o,f,c):i?f:o},e.getQuarterContent=function(t){var A,i=e.props,a=i.renderQuarterContent,l=i.locale,c=iA(t,l);return(A=a==null?void 0:a(t,c))!==null&&A!==void 0?A:c},e.renderMonths=function(){var t,A=e.props,i=A.showTwoColumnMonthYearPicker,a=A.showFourColumnMonthYearPicker,l=A.day,c=A.selected,o=(t=Q7[j4(a,i)])===null||t===void 0?void 0:t.grid;return o==null?void 0:o.map(function(f,E){return d.createElement("div",{className:"react-datepicker__month-wrapper",key:E},f.map(function(u,s){return d.createElement("div",{ref:e.MONTH_REFS[u],key:s,onClick:function(m){e.onMonthClick(m,u)},onKeyDown:function(m){k4(m)&&(m.preventDefault(),m.key=U.Enter),e.onMonthKeyDown(m,u)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onMonthMouseEnter(u)},onPointerEnter:e.props.usePointerEvent?function(){return e.onMonthMouseEnter(u)}:void 0,tabIndex:Number(e.getTabIndex(u)),className:e.getMonthClassNames(u),"aria-disabled":e.isMonthDisabled(u),role:"option","aria-label":e.getAriaLabel(u),"aria-current":e.isCurrentMonth(l,u)?"date":void 0,"aria-selected":c?e.isSelectedMonth(l,u,c):void 0},e.getMonthContent(u))}))})},e.renderQuarters=function(){var t=e.props,A=t.day,i=t.selected,a=[1,2,3,4];return d.createElement("div",{className:"react-datepicker__quarter-wrapper"},a.map(function(l,c){return d.createElement("div",{key:c,ref:e.QUARTER_REFS[c],role:"option",onClick:function(o){e.onQuarterClick(o,l)},onKeyDown:function(o){e.onQuarterKeyDown(o,l)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onQuarterMouseEnter(l)},onPointerEnter:e.props.usePointerEvent?function(){return e.onQuarterMouseEnter(l)}:void 0,className:e.getQuarterClassNames(l),"aria-selected":i?e.isSelectedQuarter(A,l,i):void 0,tabIndex:Number(e.getQuarterTabIndex(l)),"aria-current":e.isCurrentQuarter(A,l)?"date":void 0},e.getQuarterContent(l))}))},e.getClassNames=function(){var t=e.props,A=t.selectingDate,i=t.selectsStart,a=t.selectsEnd,l=t.showMonthYearPicker,c=t.showQuarterYearPicker,o=t.showWeekPicker;return p2("react-datepicker__month",{"react-datepicker__month--selecting-range":A&&(i||a)},{"react-datepicker__monthPicker":l},{"react-datepicker__quarterPicker":c},{"react-datepicker__weekPicker":o})},e}return n.prototype.getSelection=function(){var e=this.props,t=e.selected,A=e.selectedDates,i=e.selectsMultiple;if(i)return A;if(t)return[t]},n.prototype.render=function(){var e=this.props,t=e.showMonthYearPicker,A=e.showQuarterYearPicker,i=e.day,a=e.ariaLabelPrefix,l=a===void 0?"Month ":a,c=l?l.trim()+" ":"",o=K2(i)?"".concat(c).concat(r2(i,"MMMM, yyyy",this.props.locale)):"",f=t||A;return f?d.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":o,role:"listbox"},t?this.renderMonths():this.renderQuarters()):d.createElement("div",{role:"table"},this.props.dayNamesHeader&&d.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),d.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":o,role:"rowgroup"},this.renderWeeks()))},n})(d.Component),hA=(function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.monthOptionButtonsRef={},e.isSelectedMonth=function(t){return e.props.month===t},e.handleOptionKeyDown=function(t,A){var i;switch(A.key){case"Enter":A.preventDefault(),e.onChange(t);break;case"Escape":A.preventDefault(),e.props.onCancel();break;case"ArrowUp":case"ArrowDown":{A.preventDefault();var a=(t+(A.key==="ArrowUp"?-1:1)+e.props.monthNames.length)%e.props.monthNames.length;(i=e.monthOptionButtonsRef[a])===null||i===void 0||i.focus();break}}},e.renderOptions=function(){return e.monthOptionButtonsRef={},e.props.monthNames.map(function(t,A){return d.createElement("div",{ref:function(i){e.monthOptionButtonsRef[A]=i,e.isSelectedMonth(A)&&(i==null||i.focus())},role:"button",tabIndex:0,className:e.isSelectedMonth(A)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:t,onClick:e.onChange.bind(e,A),onKeyDown:e.handleOptionKeyDown.bind(e,A),"aria-selected":e.isSelectedMonth(A)?"true":void 0},e.isSelectedMonth(A)?d.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",t)})},e.onChange=function(t){return e.props.onChange(t)},e.handleClickOutside=function(){return e.props.onCancel()},e}return n.prototype.render=function(){return d.createElement(s0,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},n})(d.Component),zA=(function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(t){return t.map(function(A,i){return d.createElement("option",{key:A,value:i},A)})},e.renderSelectMode=function(t){return d.createElement("select",{value:e.props.month,className:"react-datepicker__month-select",onChange:function(A){return e.onChange(parseInt(A.target.value))}},e.renderSelectOptions(t))},e.renderReadView=function(t,A){return d.createElement("button",{key:"read",type:"button",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:e.toggleDropdown},d.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},A[e.props.month]))},e.renderDropdown=function(t){return d.createElement(hA,J({key:"dropdown"},e.props,{monthNames:t,onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(t){var A=e.state.dropdownVisible,i=[e.renderReadView(!A,t)];return A&&i.unshift(e.renderDropdown(t)),i},e.onChange=function(t){e.toggleDropdown(),t!==e.props.month&&e.props.onChange(t)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return n.prototype.render=function(){var e=this,t=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(i){return v4(i,e.props.locale)}:function(i){return h7(i,e.props.locale)}),A;switch(this.props.dropdownMode){case"scroll":A=this.renderScrollMode(t);break;case"select":A=this.renderSelectMode(t);break}return d.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},A)},n})(d.Component);function gA(r,n){for(var e=[],t=f1(r),A=f1(n);!m1(t,A);)e.push(D(t)),t=y2(t,1);return e}var QA=(function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;return t.renderOptions=function(){return t.state.monthYearsList.map(function(A){var i=A7(A),a=n1(t.props.date,A)&&Z2(t.props.date,A);return d.createElement("div",{className:a?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:i,onClick:t.onChange.bind(t,i),"aria-selected":a?"true":void 0},a?d.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",r2(A,t.props.dateFormat,t.props.locale))})},t.onChange=function(A){return t.props.onChange(A)},t.handleClickOutside=function(){t.props.onCancel()},t.state={monthYearsList:gA(t.props.minDate,t.props.maxDate)},t}return n.prototype.render=function(){var e=p2({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return d.createElement(s0,{className:e,onClickOutside:this.handleClickOutside},this.renderOptions())},n})(d.Component),ZA=(function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=f1(e.props.minDate),A=f1(e.props.maxDate),i=[];!m1(t,A);){var a=A7(t);i.push(d.createElement("option",{key:a,value:a},r2(t,e.props.dateFormat,e.props.locale))),t=y2(t,1)}return i},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:A7(f1(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){var A=r2(e.props.date,e.props.dateFormat,e.props.locale);return d.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:e.toggleDropdown},d.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},A))},e.renderDropdown=function(){return d.createElement(QA,J({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,A=[e.renderReadView(!t)];return t&&A.unshift(e.renderDropdown()),A},e.onChange=function(t){e.toggleDropdown();var A=D(t);n1(e.props.date,A)&&Z2(e.props.date,A)||e.props.onChange(A)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return n.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return d.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},e)},n})(d.Component),RA=(function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={height:null},e.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var t,A,i;e.list&&(e.list.scrollTop=(i=e.centerLi&&n.calcCenterPosition(e.props.monthRef?e.props.monthRef.clientHeight-((A=(t=e.header)===null||t===void 0?void 0:t.clientHeight)!==null&&A!==void 0?A:0):e.list.clientHeight,e.centerLi))!==null&&i!==void 0?i:0)})},e.handleClick=function(t){var A,i;(e.props.minTime||e.props.maxTime)&&Q4(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&g4(t,e.props)||(i=(A=e.props).onChange)===null||i===void 0||i.call(A,t)},e.isSelectedTime=function(t){return e.props.selected&&q4(e.props.selected,t)},e.isDisabledTime=function(t){return(e.props.minTime||e.props.maxTime)&&Q4(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&g4(t,e.props)},e.liClasses=function(t){var A,i=["react-datepicker__time-list-item",e.props.timeClassName?e.props.timeClassName(t):void 0];return e.isSelectedTime(t)&&i.push("react-datepicker__time-list-item--selected"),e.isDisabledTime(t)&&i.push("react-datepicker__time-list-item--disabled"),e.props.injectTimes&&(O2(t)*3600+W2(t)*60+M1(t))%(((A=e.props.intervals)!==null&&A!==void 0?A:n.defaultProps.intervals)*60)!==0&&i.push("react-datepicker__time-list-item--injected"),i.join(" ")},e.handleOnKeyDown=function(t,A){var i,a;t.key===U.Space&&(t.preventDefault(),t.key=U.Enter),(t.key===U.ArrowUp||t.key===U.ArrowLeft)&&t.target instanceof HTMLElement&&t.target.previousSibling&&(t.preventDefault(),t.target.previousSibling instanceof HTMLElement&&t.target.previousSibling.focus()),(t.key===U.ArrowDown||t.key===U.ArrowRight)&&t.target instanceof HTMLElement&&t.target.nextSibling&&(t.preventDefault(),t.target.nextSibling instanceof HTMLElement&&t.target.nextSibling.focus()),t.key===U.Enter&&e.handleClick(A),(a=(i=e.props).handleOnKeyDown)===null||a===void 0||a.call(i,t)},e.renderTimes=function(){for(var t,A=[],i=typeof e.props.format=="string"?e.props.format:"p",a=(t=e.props.intervals)!==null&&t!==void 0?t:n.defaultProps.intervals,l=e.props.selected||e.props.openToDate||D(),c=S3(l),o=e.props.injectTimes&&e.props.injectTimes.sort(function(v,z){return v.getTime()-z.getTime()}),f=60*uA(l),E=f/a,u=0;u<E;u++){var s=v3(c,u*a);if(A.push(s),o){var m=CA(c,s,u,a,o);A=A.concat(m)}}var h=A.reduce(function(v,z){return z.getTime()<=l.getTime()?z:v},A[0]);return A.map(function(v){return d.createElement("li",{key:v.valueOf(),onClick:e.handleClick.bind(e,v),className:e.liClasses(v),ref:function(z){v===h&&(e.centerLi=z)},onKeyDown:function(z){e.handleOnKeyDown(z,v)},tabIndex:v===h?0:-1,role:"option","aria-selected":e.isSelectedTime(v)?"true":void 0,"aria-disabled":e.isDisabledTime(v)?"true":void 0},r2(v,i,e.props.locale))})},e.renderTimeCaption=function(){return e.props.showTimeCaption===!1?d.createElement(d.Fragment,null):d.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(e.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(t){e.header=t}},d.createElement("div",{className:"react-datepicker-time__header"},e.props.timeCaption))},e}return Object.defineProperty(n,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},n.prototype.componentWillUnmount=function(){var e;(e=this.resizeObserver)===null||e===void 0||e.disconnect()},n.prototype.observeDatePickerHeightChanges=function(){var e=this,t=this.props.monthRef;this.updateContainerHeight(),t&&(this.resizeObserver=new ResizeObserver(function(){e.updateContainerHeight()}),this.resizeObserver.observe(t))},n.prototype.updateContainerHeight=function(){this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},n.prototype.render=function(){var e=this,t,A=this.state.height;return d.createElement("div",{className:"react-datepicker__time-container ".concat(((t=this.props.todayButton)!==null&&t!==void 0?t:n.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),d.createElement("div",{className:"react-datepicker__time"},d.createElement("div",{className:"react-datepicker__time-box"},d.createElement("ul",{className:"react-datepicker__time-list",ref:function(i){e.list=i},style:A?{height:A}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},n.calcCenterPosition=function(e,t){return t.offsetTop-(e/2-t.clientHeight/2)},n})(d.Component),y4=3,bA=(function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;return t.YEAR_REFS=t1([],Array(t.props.yearItemNumber),!0).map(function(){return d.createRef()}),t.isDisabled=function(A){return k2(A,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(A){return z7(A,{excludeDates:t.props.excludeDates})},t.selectingDate=function(){var A;return(A=t.props.selectingDate)!==null&&A!==void 0?A:t.props.preSelection},t.updateFocusOnPaginate=function(A){var i=function(){var a,l;(l=(a=t.YEAR_REFS[A])===null||a===void 0?void 0:a.current)===null||l===void 0||l.focus()};window.requestAnimationFrame(i)},t.handleYearClick=function(A,i){t.props.onDayClick&&t.props.onDayClick(A,i)},t.handleYearNavigation=function(A,i){var a,l,c,o,f=t.props,E=f.date,u=f.yearItemNumber;if(!(E===void 0||u===void 0)){var s=E1(E,u).startPeriod;t.isDisabled(i)||t.isExcluded(i)||((l=(a=t.props).setPreSelection)===null||l===void 0||l.call(a,i),A-s<0?t.updateFocusOnPaginate(u-(s-A)):A-s>=u?t.updateFocusOnPaginate(Math.abs(u-(A-s))):(o=(c=t.YEAR_REFS[A-s])===null||c===void 0?void 0:c.current)===null||o===void 0||o.focus())}},t.isSameDay=function(A,i){return F(A,i)},t.isCurrentYear=function(A){return A===H(D())},t.isRangeStart=function(A){return t.props.startDate&&t.props.endDate&&n1(_2(D(),A),t.props.startDate)},t.isRangeEnd=function(A){return t.props.startDate&&t.props.endDate&&n1(_2(D(),A),t.props.endDate)},t.isInRange=function(A){return v0(A,t.props.startDate,t.props.endDate)},t.isInSelectingRange=function(A){var i=t.props,a=i.selectsStart,l=i.selectsEnd,c=i.selectsRange,o=i.startDate,f=i.endDate;return!(a||l||c)||!t.selectingDate()?!1:a&&f?v0(A,t.selectingDate(),f):l&&o||c&&o&&!f?v0(A,o,t.selectingDate()):!1},t.isSelectingRangeStart=function(A){var i;if(!t.isInSelectingRange(A))return!1;var a=t.props,l=a.startDate,c=a.selectsStart,o=_2(D(),A);return c?n1(o,(i=t.selectingDate())!==null&&i!==void 0?i:null):n1(o,l??null)},t.isSelectingRangeEnd=function(A){var i;if(!t.isInSelectingRange(A))return!1;var a=t.props,l=a.endDate,c=a.selectsEnd,o=a.selectsRange,f=_2(D(),A);return c||o?n1(f,(i=t.selectingDate())!==null&&i!==void 0?i:null):n1(f,l??null)},t.isKeyboardSelected=function(A){if(!(t.props.disabledKeyboardNavigation||t.props.date===void 0||t.props.preSelection==null)){var i=t.props,a=i.minDate,l=i.maxDate,c=i.excludeDates,o=i.includeDates,f=i.filterDate,E=i.selected,u=B3(_2(t.props.date,A)),s=(a||l||c||o||f)&&h0(A,t.props),m=!!E&&F(u,B3(E)),h=F(u,B3(t.props.preSelection));return!t.props.inline&&!m&&h&&!s}},t.isSelectedYear=function(A){var i=t.props,a=i.selectsMultiple,l=i.selected,c=i.selectedDates;return a?c==null?void 0:c.some(function(o){return A===H(o)}):!!l&&A===H(l)},t.onYearClick=function(A,i){var a=t.props.date;a!==void 0&&t.handleYearClick(B3(_2(a,i)),A)},t.onYearKeyDown=function(A,i){var a,l,c=A.key,o=t.props,f=o.date,E=o.yearItemNumber,u=o.handleOnKeyDown;if(c!==U.Tab&&A.preventDefault(),!t.props.disabledKeyboardNavigation)switch(c){case U.Enter:if(t.props.selected==null)break;t.onYearClick(A,i),(l=(a=t.props).setPreSelection)===null||l===void 0||l.call(a,t.props.selected);break;case U.ArrowRight:if(t.props.preSelection==null)break;t.handleYearNavigation(i+1,c1(t.props.preSelection,1));break;case U.ArrowLeft:if(t.props.preSelection==null)break;t.handleYearNavigation(i-1,n3(t.props.preSelection,1));break;case U.ArrowUp:{if(f===void 0||E===void 0||t.props.preSelection==null)break;var s=E1(f,E).startPeriod,m=y4,h=i-m;if(h<s){var v=E%m;i>=s&&i<s+v?m=v:m+=v,h=i-m}t.handleYearNavigation(h,n3(t.props.preSelection,m));break}case U.ArrowDown:{if(f===void 0||E===void 0||t.props.preSelection==null)break;var z=E1(f,E).endPeriod,m=y4,h=i+m;if(h>z){var v=E%m;i<=z&&i>z-v?m=v:m+=v,h=i+m}t.handleYearNavigation(h,c1(t.props.preSelection,m));break}}u&&u(A)},t.getYearClassNames=function(A){var i=t.props,a=i.date,l=i.disabled,c=i.minDate,o=i.maxDate,f=i.excludeDates,E=i.includeDates,u=i.filterDate,s=i.yearClassName;return p2("react-datepicker__year-text","react-datepicker__year-".concat(A),a?s==null?void 0:s(_2(a,A)):void 0,{"react-datepicker__year-text--selected":t.isSelectedYear(A),"react-datepicker__year-text--disabled":(c||o||f||E||u||l)&&h0(A,t.props),"react-datepicker__year-text--keyboard-selected":t.isKeyboardSelected(A),"react-datepicker__year-text--range-start":t.isRangeStart(A),"react-datepicker__year-text--range-end":t.isRangeEnd(A),"react-datepicker__year-text--in-range":t.isInRange(A),"react-datepicker__year-text--in-selecting-range":t.isInSelectingRange(A),"react-datepicker__year-text--selecting-range-start":t.isSelectingRangeStart(A),"react-datepicker__year-text--selecting-range-end":t.isSelectingRangeEnd(A),"react-datepicker__year-text--today":t.isCurrentYear(A)})},t.getYearTabIndex=function(A){if(t.props.disabledKeyboardNavigation||t.props.preSelection==null)return"-1";var i=H(t.props.preSelection),a=h0(A,t.props);return A===i&&!a?"0":"-1"},t.getYearContent=function(A){return t.props.renderYearContent?t.props.renderYearContent(A):A},t}return n.prototype.render=function(){var e=this,t=[],A=this.props,i=A.date,a=A.yearItemNumber,l=A.onYearMouseEnter,c=A.onYearMouseLeave;if(i===void 0)return null;for(var o=E1(i,a),f=o.startPeriod,E=o.endPeriod,u=function(h){t.push(d.createElement("div",{ref:s.YEAR_REFS[h-f],onClick:function(v){e.onYearClick(v,h)},onKeyDown:function(v){k4(v)&&(v.preventDefault(),v.key=U.Enter),e.onYearKeyDown(v,h)},tabIndex:Number(s.getYearTabIndex(h)),className:s.getYearClassNames(h),onMouseEnter:s.props.usePointerEvent?void 0:function(v){return l(v,h)},onPointerEnter:s.props.usePointerEvent?function(v){return l(v,h)}:void 0,onMouseLeave:s.props.usePointerEvent?void 0:function(v){return c(v,h)},onPointerLeave:s.props.usePointerEvent?function(v){return c(v,h)}:void 0,key:h,"aria-current":s.isCurrentYear(h)?"date":void 0},s.getYearContent(h)))},s=this,m=f;m<=E;m++)u(m);return d.createElement("div",{className:"react-datepicker__year"},d.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},t))},n})(d.Component);function SA(r,n,e,t){for(var A=[],i=0;i<2*n+1;i++){var a=r+n-i,l=!0;e&&(l=H(e)<=a),t&&l&&(l=H(t)>=a),l&&A.push(a)}return A}var BA=(function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;t.yearOptionButtonsRef={},t.handleOptionKeyDown=function(l,c){var o;switch(c.key){case"Enter":c.preventDefault(),t.onChange(l);break;case"Escape":c.preventDefault(),t.props.onCancel();break;case"ArrowUp":case"ArrowDown":{c.preventDefault();var f=l+(c.key==="ArrowUp"?1:-1);t.yearOptionButtonsRef[f]&&((o=t.yearOptionButtonsRef[f])===null||o===void 0||o.focus());break}}},t.renderOptions=function(){t.yearOptionButtonsRef={};var l=t.props.year,c=t.state.yearsList.map(function(E){return d.createElement("div",{ref:function(u){t.yearOptionButtonsRef[E]=u,E===l&&(u==null||u.focus())},role:"button",tabIndex:0,className:l===E?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:E,onClick:t.onChange.bind(t,E),onKeyDown:t.handleOptionKeyDown.bind(t,E),"aria-selected":l===E?"true":void 0},l===E?d.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",E)}),o=t.props.minDate?H(t.props.minDate):null,f=t.props.maxDate?H(t.props.maxDate):null;return(!f||!t.state.yearsList.find(function(E){return E===f}))&&c.unshift(d.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:t.incrementYears},d.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!o||!t.state.yearsList.find(function(E){return E===o}))&&c.push(d.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:t.decrementYears},d.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c},t.onChange=function(l){t.props.onChange(l)},t.handleClickOutside=function(){t.props.onCancel()},t.shiftYears=function(l){var c=t.state.yearsList.map(function(o){return o+l});t.setState({yearsList:c})},t.incrementYears=function(){return t.shiftYears(1)},t.decrementYears=function(){return t.shiftYears(-1)};var A=e.yearDropdownItemNumber,i=e.scrollableYearDropdown,a=A||(i?10:5);return t.state={yearsList:SA(t.props.year,a,t.props.minDate,t.props.maxDate)},t.dropdownRef=d.createRef(),t}return n.prototype.componentDidMount=function(){var e=this.dropdownRef.current;if(e){var t=e.children?Array.from(e.children):null,A=t?t.find(function(i){return i.ariaSelected}):null;e.scrollTop=A&&A instanceof HTMLElement?A.offsetTop+(A.clientHeight-e.clientHeight)/2:(e.scrollHeight-e.clientHeight)/2}},n.prototype.render=function(){var e=p2({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return d.createElement(s0,{className:e,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},n})(d.Component),UA=(function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=e.props.minDate?H(e.props.minDate):1900,A=e.props.maxDate?H(e.props.maxDate):2100,i=[],a=t;a<=A;a++)i.push(d.createElement("option",{key:a,value:a},a));return i},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:e.props.year,className:"react-datepicker__year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){return d.createElement("button",{key:"read",type:"button",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:e.toggleDropdown},d.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},e.props.year))},e.renderDropdown=function(){return d.createElement(BA,J({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,A=[e.renderReadView(!t)];return t&&A.unshift(e.renderDropdown()),A},e.onChange=function(t){e.toggleDropdown(),t!==e.props.year&&e.props.onChange(t)},e.toggleDropdown=function(t){e.setState({dropdownVisible:!e.state.dropdownVisible},function(){e.props.adjustDateOnChange&&e.handleYearChange(e.props.date,t)})},e.handleYearChange=function(t,A){var i;(i=e.onSelect)===null||i===void 0||i.call(e,t,A),e.setOpen()},e.onSelect=function(t,A){var i,a;(a=(i=e.props).onSelect)===null||a===void 0||a.call(i,t,A)},e.setOpen=function(){var t,A;(A=(t=e.props).setOpen)===null||A===void 0||A.call(t,!0)},e}return n.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return d.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},e)},n})(d.Component),YA=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],O4="react-datepicker-ignore-onclickoutside",VA=function(r){var n=(r.className||"").split(/\s+/);return YA.some(function(e){return n.indexOf(e)>=0})},KA=(function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;return t.monthContainer=void 0,t.handleClickOutside=function(A){t.props.onClickOutside(A)},t.setClickOutsideRef=function(){return t.containerRef.current},t.handleDropdownFocus=function(A){var i,a;VA(A.target)&&((a=(i=t.props).onDropdownFocus)===null||a===void 0||a.call(i,A))},t.getDateInView=function(){var A=t.props,i=A.preSelection,a=A.selected,l=A.openToDate,c=B4(t.props),o=U4(t.props),f=D(),E=l||a||i;return E||(c&&w2(f,c)?c:o&&m1(f,o)?o:f)},t.increaseMonth=function(){t.setState(function(A){var i=A.date;return{date:y2(i,1)}},function(){return t.handleMonthChange(t.state.date)})},t.decreaseMonth=function(){t.setState(function(A){var i=A.date;return{date:Y1(i,1)}},function(){return t.handleMonthChange(t.state.date)})},t.handleDayClick=function(A,i,a){t.props.onSelect(A,i,a),t.props.setPreSelection&&t.props.setPreSelection(A)},t.handleDayMouseEnter=function(A){t.setState({selectingDate:A}),t.props.onDayMouseEnter&&t.props.onDayMouseEnter(A)},t.handleMonthMouseLeave=function(){t.setState({selectingDate:void 0}),t.props.onMonthMouseLeave&&t.props.onMonthMouseLeave()},t.handleYearMouseEnter=function(A,i){t.setState({selectingDate:_2(D(),i)}),t.props.onYearMouseEnter&&t.props.onYearMouseEnter(A,i)},t.handleYearMouseLeave=function(A,i){t.props.onYearMouseLeave&&t.props.onYearMouseLeave(A,i)},t.handleYearChange=function(A){var i,a,l,c;(a=(i=t.props).onYearChange)===null||a===void 0||a.call(i,A),t.setState({isRenderAriaLiveMessage:!0}),t.props.adjustDateOnChange&&(t.props.onSelect(A),(c=(l=t.props).setOpen)===null||c===void 0||c.call(l,!0)),t.props.setPreSelection&&t.props.setPreSelection(A)},t.getEnabledPreSelectionDateForMonth=function(A){if(!k2(A,t.props))return A;for(var i=f1(A),a=tA(A),l=zt(a,i),c=null,o=0;o<=l;o++){var f=j2(i,o);if(!k2(f,t.props)){c=f;break}}return c},t.handleMonthChange=function(A){var i,a,l,c=(i=t.getEnabledPreSelectionDateForMonth(A))!==null&&i!==void 0?i:A;t.handleCustomMonthChange(c),t.props.adjustDateOnChange&&(t.props.onSelect(c),(l=(a=t.props).setOpen)===null||l===void 0||l.call(a,!0)),t.props.setPreSelection&&t.props.setPreSelection(c)},t.handleCustomMonthChange=function(A){var i,a;(a=(i=t.props).onMonthChange)===null||a===void 0||a.call(i,A),t.setState({isRenderAriaLiveMessage:!0})},t.handleMonthYearChange=function(A){t.handleYearChange(A),t.handleMonthChange(A)},t.changeYear=function(A){t.setState(function(i){var a=i.date;return{date:_2(a,Number(A))}},function(){return t.handleYearChange(t.state.date)})},t.changeMonth=function(A){t.setState(function(i){var a=i.date;return{date:Y2(a,Number(A))}},function(){return t.handleMonthChange(t.state.date)})},t.changeMonthYear=function(A){t.setState(function(i){var a=i.date;return{date:_2(Y2(a,b2(A)),H(A))}},function(){return t.handleMonthYearChange(t.state.date)})},t.header=function(A){if(A===void 0&&(A=t.state.date),!K2(A))return[];var i=t.props.disabled,a=v1(A,t.props.locale,t.props.calendarStartDay),l=[];return t.props.showWeekNumbers&&l.push(d.createElement("div",{key:"W",className:"react-datepicker__day-name ".concat(i?"react-datepicker__day-name--disabled":""),role:"columnheader"},d.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),d.createElement("span",{"aria-hidden":"true"},t.props.weekLabel||"#"))),l.concat([0,1,2,3,4,5,6].map(function(c){var o=j2(a,c),f=t.formatWeekday(o,t.props.locale),E=t.props.weekDayClassName?t.props.weekDayClassName(o):void 0;return d.createElement("div",{key:c,role:"columnheader",className:p2("react-datepicker__day-name",E,i?"react-datepicker__day-name--disabled":"")},d.createElement("span",{className:"react-datepicker__sr-only"},r2(o,"EEEE",t.props.locale)),d.createElement("span",{"aria-hidden":"true"},f))}))},t.formatWeekday=function(A,i){return t.props.formatWeekDay?nA(A,t.props.formatWeekDay,i):t.props.useWeekdaysShort?AA(A,i):rA(A,i)},t.decreaseYear=function(){t.setState(function(A){var i,a=A.date;return{date:n3(a,t.props.showYearPicker?(i=t.props.yearItemNumber)!==null&&i!==void 0?i:n.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.clearSelectingDate=function(){t.setState({selectingDate:void 0})},t.renderPreviousButton=function(){var A,i,a;if(!t.props.renderCustomHeader){var l=(A=t.props.monthsShown)!==null&&A!==void 0?A:n.defaultProps.monthsShown,c=t.props.showPreviousMonths?l-1:0,o=(i=t.props.monthSelectedIn)!==null&&i!==void 0?i:c,f=Y1(t.state.date,o),E;switch(!0){case t.props.disabled:E=!0;break;case t.props.showMonthYearPicker:E=b4(t.state.date,t.props);break;case t.props.showYearPicker:E=oA(t.state.date,t.props);break;case t.props.showQuarterYearPicker:E=lA(t.state.date,t.props);break;default:E=Z4(f,t.props);break}if(!(!((a=t.props.forceShowMonthNavigation)!==null&&a!==void 0?a:n.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&E||t.props.showTimeSelectOnly)){var u=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],s=["react-datepicker__navigation","react-datepicker__navigation--previous"],m=t.decreaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(m=t.decreaseYear),E&&t.props.showDisabledMonthNavigation&&(s.push("react-datepicker__navigation--previous--disabled"),m=void 0);var h=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,v=t.props,z=v.previousMonthButtonLabel,Z=z===void 0?n.defaultProps.previousMonthButtonLabel:z,b=v.previousYearButtonLabel,S=b===void 0?n.defaultProps.previousYearButtonLabel:b,x=t.props,V=x.previousMonthAriaLabel,B=V===void 0?typeof Z=="string"?Z:"Previous Month":V,Q=x.previousYearAriaLabel,R=Q===void 0?typeof S=="string"?S:"Previous Year":Q;return d.createElement("button",{type:"button",className:s.join(" "),onClick:m,onKeyDown:t.props.handleOnKeyDown,"aria-label":h?R:B},d.createElement("span",{className:u.join(" ")},h?S:Z))}}},t.increaseYear=function(){t.setState(function(A){var i,a=A.date;return{date:c1(a,t.props.showYearPicker?(i=t.props.yearItemNumber)!==null&&i!==void 0?i:n.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.renderNextButton=function(){var A;if(!t.props.renderCustomHeader){var i;switch(!0){case t.props.disabled:i=!0;break;case t.props.showMonthYearPicker:i=S4(t.state.date,t.props);break;case t.props.showYearPicker:i=IA(t.state.date,t.props);break;case t.props.showQuarterYearPicker:i=cA(t.state.date,t.props);break;default:i=R4(t.state.date,t.props);break}if(!(!((A=t.props.forceShowMonthNavigation)!==null&&A!==void 0?A:n.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&i||t.props.showTimeSelectOnly)){var a=["react-datepicker__navigation","react-datepicker__navigation--next"],l=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];t.props.showTimeSelect&&a.push("react-datepicker__navigation--next--with-time"),t.props.todayButton&&a.push("react-datepicker__navigation--next--with-today-button");var c=t.increaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(c=t.increaseYear),i&&t.props.showDisabledMonthNavigation&&(a.push("react-datepicker__navigation--next--disabled"),c=void 0);var o=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,f=t.props,E=f.nextMonthButtonLabel,u=E===void 0?n.defaultProps.nextMonthButtonLabel:E,s=f.nextYearButtonLabel,m=s===void 0?n.defaultProps.nextYearButtonLabel:s,h=t.props,v=h.nextMonthAriaLabel,z=v===void 0?typeof u=="string"?u:"Next Month":v,Z=h.nextYearAriaLabel,b=Z===void 0?typeof m=="string"?m:"Next Year":Z;return d.createElement("button",{type:"button",className:a.join(" "),onClick:c,onKeyDown:t.props.handleOnKeyDown,"aria-label":o?b:z},d.createElement("span",{className:l.join(" ")},o?m:u))}}},t.renderCurrentMonth=function(A){A===void 0&&(A=t.state.date);var i=["react-datepicker__current-month"];return t.props.showYearDropdown&&i.push("react-datepicker__current-month--hasYearDropdown"),t.props.showMonthDropdown&&i.push("react-datepicker__current-month--hasMonthDropdown"),t.props.showMonthYearDropdown&&i.push("react-datepicker__current-month--hasMonthYearDropdown"),d.createElement("h2",{className:i.join(" ")},K2(A)?r2(A,t.props.dateFormat,t.props.locale):"")},t.renderYearDropdown=function(A){if(A===void 0&&(A=!1),!(!t.props.showYearDropdown||A))return d.createElement(UA,J({},n.defaultProps,t.props,{date:t.state.date,onChange:t.changeYear,year:H(t.state.date)}))},t.renderMonthDropdown=function(A){if(A===void 0&&(A=!1),!(!t.props.showMonthDropdown||A))return d.createElement(zA,J({},n.defaultProps,t.props,{month:b2(t.state.date),onChange:t.changeMonth}))},t.renderMonthYearDropdown=function(A){if(A===void 0&&(A=!1),!(!t.props.showMonthYearDropdown||A))return d.createElement(ZA,J({},n.defaultProps,t.props,{date:t.state.date,onChange:t.changeMonthYear}))},t.handleTodayButtonClick=function(A){t.props.onSelect(M4(),A),t.props.setPreSelection&&t.props.setPreSelection(M4())},t.renderTodayButton=function(){if(!(!t.props.todayButton||t.props.showTimeSelectOnly))return d.createElement("div",{className:"react-datepicker__today-button",onClick:t.handleTodayButtonClick},t.props.todayButton)},t.renderDayNamesHeader=function(A){return d.createElement("div",{className:"react-datepicker__day-names",role:"row"},t.header(A))},t.renderDefaultHeader=function(A){var i=A.monthDate,a=A.i;return d.createElement("div",{className:"react-datepicker__header ".concat(t.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},t.renderCurrentMonth(i),d.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(t.props.dropdownMode),onFocus:t.handleDropdownFocus},t.renderMonthDropdown(a!==0),t.renderMonthYearDropdown(a!==0),t.renderYearDropdown(a!==0)))},t.renderCustomHeader=function(A){var i,a,l=A.monthDate,c=A.i;if(t.props.showTimeSelect&&!t.state.monthContainer||t.props.showTimeSelectOnly)return null;var o=t.props,f=o.showYearPicker,E=o.yearItemNumber,u;if(f){var s=E1(l,E),m=s.startPeriod,h=s.endPeriod;u={startYear:m,endYear:h}}var v=Z4(t.state.date,t.props),z=R4(t.state.date,t.props),Z=b4(t.state.date,t.props),b=S4(t.state.date,t.props);return d.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:t.props.onDropdownFocus},(a=(i=t.props).renderCustomHeader)===null||a===void 0?void 0:a.call(i,J(J(J({},t.state),f&&{visibleYearsRange:u}),{customHeaderCount:c,monthDate:l,changeMonth:t.changeMonth,changeYear:t.changeYear,decreaseMonth:t.decreaseMonth,increaseMonth:t.increaseMonth,decreaseYear:t.decreaseYear,increaseYear:t.increaseYear,prevMonthButtonDisabled:v,nextMonthButtonDisabled:z,prevYearButtonDisabled:Z,nextYearButtonDisabled:b})))},t.renderYearHeader=function(A){var i=A.monthDate,a=t.props,l=a.showYearPicker,c=a.yearItemNumber,o=c===void 0?n.defaultProps.yearItemNumber:c,f=E1(i,o),E=f.startPeriod,u=f.endPeriod;return d.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},l?"".concat(E," - ").concat(u):H(i))},t.renderHeader=function(A){var i=A.monthDate,a=A.i,l=a===void 0?0:a,c={monthDate:i,i:l};switch(!0){case t.props.renderCustomHeader!==void 0:return t.renderCustomHeader(c);case(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker):return t.renderYearHeader(c);default:return t.renderDefaultHeader(c)}},t.renderMonths=function(){var A,i;if(!(t.props.showTimeSelectOnly||t.props.showYearPicker)){for(var a=[],l=(A=t.props.monthsShown)!==null&&A!==void 0?A:n.defaultProps.monthsShown,c=t.props.showPreviousMonths?l-1:0,o=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?c1(t.state.date,c):Y1(t.state.date,c),f=(i=t.props.monthSelectedIn)!==null&&i!==void 0?i:c,E=0;E<l;++E){var u=E-f+c,s=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?c1(o,u):y2(o,u),m="month-".concat(E),h=E<l-1,v=E>0;a.push(d.createElement("div",{key:m,ref:function(z){t.monthContainer=z??void 0},className:"react-datepicker__month-container"},t.renderHeader({monthDate:s,i:E}),d.createElement(vA,J({},n.defaultProps,t.props,{containerRef:t.containerRef,ariaLabelPrefix:t.props.monthAriaLabelPrefix,day:s,onDayClick:t.handleDayClick,handleOnKeyDown:t.props.handleOnDayKeyDown,handleOnMonthKeyDown:t.props.handleOnKeyDown,onDayMouseEnter:t.handleDayMouseEnter,onMouseLeave:t.handleMonthMouseLeave,orderInDisplay:E,selectingDate:t.state.selectingDate,monthShowsDuplicateDaysEnd:h,monthShowsDuplicateDaysStart:v,dayNamesHeader:t.renderDayNamesHeader(s)}))))}return a}},t.renderYears=function(){if(!t.props.showTimeSelectOnly&&t.props.showYearPicker)return d.createElement("div",{className:"react-datepicker__year--container"},t.renderHeader({monthDate:t.state.date}),d.createElement(bA,J({},n.defaultProps,t.props,{selectingDate:t.state.selectingDate,date:t.state.date,onDayClick:t.handleDayClick,clearSelectingDate:t.clearSelectingDate,onYearMouseEnter:t.handleYearMouseEnter,onYearMouseLeave:t.handleYearMouseLeave})))},t.renderTimeSection=function(){if(t.props.showTimeSelect&&(t.state.monthContainer||t.props.showTimeSelectOnly))return d.createElement(RA,J({},n.defaultProps,t.props,{onChange:t.props.onTimeChange,format:t.props.timeFormat,intervals:t.props.timeIntervals,monthRef:t.state.monthContainer}))},t.renderInputTimeSection=function(){var A=t.props.selected?new Date(t.props.selected):void 0,i=A&&K2(A)&&!!t.props.selected,a=i?"".concat(V4(A.getHours()),":").concat(V4(A.getMinutes())):"";if(t.props.showTimeInput)return d.createElement(sA,J({},n.defaultProps,t.props,{date:A,timeString:a,onChange:t.props.onTimeChange}))},t.renderAriaLiveRegion=function(){var A;if(!K2(t.state.date))return d.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"});var i=E1(t.state.date,(A=t.props.yearItemNumber)!==null&&A!==void 0?A:n.defaultProps.yearItemNumber),a=i.startPeriod,l=i.endPeriod,c;return t.props.showYearPicker?c="".concat(a," - ").concat(l):t.props.showMonthYearPicker||t.props.showQuarterYearPicker?c=H(t.state.date):c="".concat(h7(b2(t.state.date),t.props.locale)," ").concat(H(t.state.date)),d.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},t.state.isRenderAriaLiveMessage&&c)},t.renderChildren=function(){if(t.props.children)return d.createElement("div",{className:"react-datepicker__children-container"},t.props.children)},t.containerRef=d.createRef(),t.state={date:t.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},t}return Object.defineProperty(n,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,outsideClickIgnoreClass:O4,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:b3}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){var e=this;this.props.showTimeSelect&&(this.assignMonthContainer=(function(){e.setState({monthContainer:e.monthContainer})})())},n.prototype.componentDidUpdate=function(e){var t=this;if(this.props.preSelection&&K2(this.props.preSelection)&&(!F(this.props.preSelection,e.preSelection)||this.props.monthSelectedIn!==e.monthSelectedIn)){var A=!Z2(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return A&&t.handleCustomMonthChange(t.state.date)})}else this.props.openToDate&&!F(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate})},n.prototype.render=function(){var e=this.props.container||Lr;return d.createElement(s0,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},d.createElement("div",{style:{display:"contents"},ref:this.containerRef},d.createElement(e,{className:p2("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly,inline:this.props.inline},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},n})(d.Component),qA=function(r){var n=r.icon,e=r.className,t=e===void 0?"":e,A=r.onClick,i="react-datepicker__calendar-icon";if(typeof n=="string")return d.createElement("i",{className:"".concat(i," ").concat(n," ").concat(t),"aria-hidden":"true",onClick:A});if(d.isValidElement(n)){var a=n;return d.cloneElement(a,{className:"".concat(a.props.className||""," ").concat(i," ").concat(t),onClick:function(l){typeof a.props.onClick=="function"&&a.props.onClick(l),typeof A=="function"&&A(l)}})}return d.createElement("svg",{className:"".concat(i," ").concat(t),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:A},d.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},W4=(function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;return t.portalRoot=null,t.el=document.createElement("div"),t}return n.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},n.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},n.prototype.render=function(){return e5.createPortal(this.props.children,this.el)},n})(d.Component),xA="[tabindex], a, button, input, select, textarea",kA=function(r){return(r instanceof HTMLAnchorElement||!r.disabled)&&r.tabIndex!==-1},T4=(function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;return t.getTabChildren=function(){var A;return Array.prototype.slice.call((A=t.tabLoopRef.current)===null||A===void 0?void 0:A.querySelectorAll(xA),1,-1).filter(kA)},t.handleFocusStart=function(){var A=t.getTabChildren();A&&A.length>1&&A[A.length-1].focus()},t.handleFocusEnd=function(){var A=t.getTabChildren();A&&A.length>1&&A[0].focus()},t.tabLoopRef=d.createRef(),t}return n.prototype.render=function(){var e;return((e=this.props.enableTabLoop)!==null&&e!==void 0?e:n.defaultProps.enableTabLoop)?d.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},d.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,d.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},n.defaultProps={enableTabLoop:!0},n})(d.Component);function jA(r){function n(e){var t,A=typeof e.hidePopper=="boolean"?e.hidePopper:!0,i=d.useRef(null),a=Fr(J({open:!A,whileElementsMounted:Qr,placement:e.popperPlacement,middleware:t1([Kr({padding:15}),Vr(10),qr({element:i})],(t=e.popperModifiers)!==null&&t!==void 0?t:[],!0)},e.popperProps)),l=J(J({},e),{hidePopper:A,popperProps:J(J({},a),{arrowRef:i})});return d.createElement(r,J({},l))}return n.displayName="withFloating(".concat(r.displayName||r.name||"Component",")"),n}var yA=function(r){var n=r.className,e=r.wrapperClassName,t=r.hidePopper,A=t===void 0?!0:t,i=r.popperComponent,a=r.targetComponent,l=r.enableTabLoop,c=r.popperOnKeyDown,o=r.portalId,f=r.portalHost,E=r.popperProps,u=r.showArrow,s=void 0;if(!A){var m=p2("react-datepicker-popper",n);s=d.createElement(T4,{enableTabLoop:l},d.createElement("div",{ref:E.refs.setFloating,style:E.floatingStyles,className:m,"data-placement":E.placement,onKeyDown:c},i,u&&d.createElement(Wr,{ref:E.arrowRef,context:E.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}r.popperContainer&&(s=d.createElement(r.popperContainer,{},s)),o&&!A&&(s=d.createElement(W4,{portalId:o,portalHost:f},s));var h=p2("react-datepicker-wrapper",e);return d.createElement(d.Fragment,null,d.createElement("div",{ref:E.refs.setReference,className:h},a),s)},OA=jA(yA);function WA(r,n){return r&&n?b2(r)!==b2(n)||H(r)!==H(n):r!==n}var Z7="Date input not valid.",X4=(function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;return t.calendar=null,t.input=null,t.getPreSelection=function(){return t.props.openToDate?t.props.openToDate:t.props.selectsEnd&&t.props.startDate?t.props.startDate:t.props.selectsStart&&t.props.endDate?t.props.endDate:D()},t.modifyHolidays=function(){var A;return(A=t.props.holidays)===null||A===void 0?void 0:A.reduce(function(i,a){var l=new Date(a.date);return K2(l)?t1(t1([],i,!0),[J(J({},a),{date:l})],!1):i},[])},t.calcInitialState=function(){var A,i=t.getPreSelection(),a=B4(t.props),l=U4(t.props),c=a&&w2(i,S3(a))?a:l&&m1(i,m4(l))?l:i;return{open:t.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(A=t.props.selectsRange?t.props.startDate:t.props.selected)!==null&&A!==void 0?A:c,highlightDates:Y4(t.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},t.getInputValue=function(){var A,i=t.props,a=i.locale,l=i.startDate,c=i.endDate,o=i.rangeSeparator,f=i.selected,E=i.selectedDates,u=i.selectsMultiple,s=i.selectsRange,m=i.value,h=(A=t.props.dateFormat)!==null&&A!==void 0?A:n.defaultProps.dateFormat,v=t.state.inputValue;return typeof m=="string"?m:typeof v=="string"?v:s?Dr(l,c,{dateFormat:h,locale:a,rangeSeparator:o}):u?Nr(E??[],{dateFormat:h,locale:a}):q2(f,{dateFormat:h,locale:a})},t.resetHiddenStatus=function(){t.setState(J(J({},t.state),{wasHidden:!1}))},t.setHiddenStatus=function(){t.setState(J(J({},t.state),{wasHidden:!0}))},t.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&t.setHiddenStatus()},t.clearPreventFocusTimeout=function(){t.preventFocusTimeout&&clearTimeout(t.preventFocusTimeout)},t.setFocus=function(){var A,i;(i=(A=t.input)===null||A===void 0?void 0:A.focus)===null||i===void 0||i.call(A,{preventScroll:!0})},t.setBlur=function(){var A,i;(i=(A=t.input)===null||A===void 0?void 0:A.blur)===null||i===void 0||i.call(A),t.cancelFocusInput()},t.deferBlur=function(){requestAnimationFrame(function(){t.setBlur()})},t.setOpen=function(A,i){i===void 0&&(i=!1),t.setState({open:A,preSelection:A&&t.state.open?t.state.preSelection:t.calcInitialState().preSelection,lastPreSelectChange:R7},function(){A||t.setState(function(a){return{focused:i?a.focused:!1}},function(){!i&&t.deferBlur(),t.setState({inputValue:null})})})},t.inputOk=function(){return o1(t.state.preSelection)},t.isCalendarOpen=function(){return t.props.open===void 0?t.state.open&&!t.props.disabled&&!t.props.readOnly:t.props.open},t.handleFocus=function(A){var i,a,l=t.state.wasHidden,c=l?t.state.open:!0;l&&t.resetHiddenStatus(),t.state.preventFocus||((a=(i=t.props).onFocus)===null||a===void 0||a.call(i,A),c&&!t.props.preventOpenOnFocus&&!t.props.readOnly&&t.setOpen(!0)),t.setState({focused:!0})},t.sendFocusBackToInput=function(){t.preventFocusTimeout&&t.clearPreventFocusTimeout(),t.setState({preventFocus:!0},function(){t.preventFocusTimeout=setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})})},t.cancelFocusInput=function(){clearTimeout(t.inputFocusTimeout),t.inputFocusTimeout=void 0},t.deferFocusInput=function(){t.cancelFocusInput(),t.inputFocusTimeout=setTimeout(function(){return t.setFocus()},1)},t.handleDropdownFocus=function(){t.cancelFocusInput()},t.resetInputValue=function(){t.setState(J(J({},t.state),{inputValue:null}))},t.handleBlur=function(A){var i,a;(!t.state.open||t.props.withPortal||t.props.showTimeInput)&&((a=(i=t.props).onBlur)===null||a===void 0||a.call(i,A)),t.resetInputValue(),t.state.open&&t.props.open===!1&&t.setOpen(!1),t.setState({focused:!1})},t.handleCalendarClickOutside=function(A){var i,a;t.props.inline||t.setOpen(!1),(a=(i=t.props).onClickOutside)===null||a===void 0||a.call(i,A),t.props.withPortal&&A.preventDefault()},t.handleChange=function(){for(var A,i,a,l,c,o=[],f=0;f<arguments.length;f++)o[f]=arguments[f];var E=o[0];if(!(t.props.onChangeRaw&&(t.props.onChangeRaw.apply(t,o),!E||typeof E.isDefaultPrevented!="function"||E.isDefaultPrevented()))){t.setState({inputValue:(E==null?void 0:E.target)instanceof HTMLInputElement?E.target.value:null,lastPreSelectChange:TA});var u=t.props,s=u.selectsRange,m=u.startDate,h=u.endDate,v=(A=t.props.dateFormat)!==null&&A!==void 0?A:n.defaultProps.dateFormat,z=(i=t.props.strictParsing)!==null&&i!==void 0?i:n.defaultProps.strictParsing,Z=(E==null?void 0:E.target)instanceof HTMLInputElement?E.target.value:"";if(s){var b=t.props.rangeSeparator,S=b.trim(),x=Z.split(v.includes(S)?b:S,2).map(function(T){return T.trim()}),V=x[0],B=x[1],Q=c3(V??"",v,t.props.locale,z),R=Q?c3(B??"",v,t.props.locale,z):null,q=(m==null?void 0:m.getTime())!==(Q==null?void 0:Q.getTime()),W=(h==null?void 0:h.getTime())!==(R==null?void 0:R.getTime());if(!q&&!W||Q&&k2(Q,t.props)||R&&k2(R,t.props))return;(l=(a=t.props).onChange)===null||l===void 0||l.call(a,[Q,R],E)}else{var k=c3(Z,v,t.props.locale,z,(c=t.props.selected)!==null&&c!==void 0?c:void 0);(k||!Z)&&t.setSelected(k,E,!0)}}},t.handleSelect=function(A,i,a){var l;if(!t.props.readOnly){var c=t.props,o=c.selectsRange,f=c.startDate,E=c.endDate,u=c.locale,s=c.swapRange,m=(l=t.props.dateFormat)!==null&&l!==void 0?l:n.defaultProps.dateFormat,h=!o||f&&!E&&(s||!g7(A,f));if(t.props.shouldCloseOnSelect&&!t.props.showTimeSelect&&h&&t.sendFocusBackToInput(),t.props.onChangeRaw){var v=q2(A,{dateFormat:m,locale:u});t.props.onChangeRaw(i,{date:A,formattedDate:v})}t.setSelected(A,i,!1,a),t.props.showDateSelect&&t.setState({isRenderAriaLiveMessage:!0}),!t.props.shouldCloseOnSelect||t.props.showTimeSelect?t.setPreSelection(A):h&&t.setOpen(!1)}},t.setSelected=function(A,i,a,l){var c,o,f=A;if(t.props.showYearPicker){if(f!==null&&h0(H(f),t.props))return}else if(t.props.showMonthYearPicker){if(f!==null&&h4(f,t.props))return}else if(f!==null&&k2(f,t.props))return;var E=t.props,u=E.onChange,s=E.selectsRange,m=E.startDate,h=E.endDate,v=E.selectsMultiple,z=E.selectedDates,Z=E.minTime,b=E.swapRange;if(!k1(t.props.selected,f)||t.props.allowSameDay||s||v)if(f!==null&&(t.props.selected&&(!a||!t.props.showTimeSelect&&!t.props.showTimeSelectOnly&&!t.props.showTimeInput)&&(f=d0(f,{hour:O2(t.props.selected),minute:W2(t.props.selected),second:M1(t.props.selected)})),!a&&(t.props.showTimeSelect||t.props.showTimeSelectOnly)&&Z&&(f=d0(f,{hour:Z.getHours(),minute:Z.getMinutes(),second:Z.getSeconds()})),t.props.inline||t.setState({preSelection:f}),t.props.focusSelectedMonth||t.setState({monthSelectedIn:l})),s){var S=!m&&!h,x=m&&!h,V=!m&&!!h,B=m&&h;S?u==null||u([f,null],i):x?f===null?u==null||u([null,null],i):g7(f,m)?b?u==null||u([f,m],i):u==null||u([f,null],i):u==null||u([m,f],i):V&&(f&&g7(f,h)?u==null||u([f,h],i):u==null||u([f,null],i)),B&&(u==null||u([f,null],i))}else if(v){if(f!==null)if(!(z!=null&&z.length))u==null||u([f],i);else{var Q=z.some(function(q){return F(q,f)});if(Q){var R=z.filter(function(q){return!F(q,f)});u==null||u(R,i)}else u==null||u(t1(t1([],z,!0),[f],!1),i)}}else u==null||u(f,i);a||((o=(c=t.props).onSelect)===null||o===void 0||o.call(c,f,i),t.setState({inputValue:null}))},t.setPreSelection=function(A){if(!t.props.readOnly){var i=o1(t.props.minDate),a=o1(t.props.maxDate),l=!0;if(A){var c=S3(A);if(i&&a)l=j1(A,t.props.minDate,t.props.maxDate);else if(i){var o=S3(t.props.minDate);l=m1(A,o)||k1(c,o)}else if(a){var f=m4(t.props.maxDate);l=w2(A,f)||k1(c,f)}}l&&t.setState({preSelection:A})}},t.toggleCalendar=function(){t.setOpen(!t.state.open)},t.handleTimeChange=function(A){var i,a;if(!(t.props.selectsRange||t.props.selectsMultiple)){var l=t.props.selected?t.props.selected:t.getPreSelection(),c=t.props.selected?A:d0(l,{hour:O2(A),minute:W2(A)});t.setState({preSelection:c}),(a=(i=t.props).onChange)===null||a===void 0||a.call(i,c),t.props.shouldCloseOnSelect&&!t.props.showTimeInput&&(t.sendFocusBackToInput(),t.setOpen(!1)),t.props.showTimeInput&&t.setOpen(!0),(t.props.showTimeSelectOnly||t.props.showTimeSelect)&&t.setState({isRenderAriaLiveMessage:!0}),t.setState({inputValue:null})}},t.onInputClick=function(){var A,i;!t.props.disabled&&!t.props.readOnly&&t.setOpen(!0),(i=(A=t.props).onInputClick)===null||i===void 0||i.call(A)},t.handleTimeOnlyArrowKey=function(A){var i,a,l,c,o=t.props.selected||t.state.preSelection||D(),f=(i=t.props.timeIntervals)!==null&&i!==void 0?i:30,E=(a=t.props.dateFormat)!==null&&a!==void 0?a:n.defaultProps.dateFormat,u=Array.isArray(E)?E[0]:E,s=S3(o),m=O2(o)*60+W2(o),h=1440-f,v;if(A===U.ArrowUp){var z=Math.max(0,m-f);v=v3(s,z)}else{var z=Math.min(h,m+f);v=v3(s,z)}var Z=r2(v,u||n.defaultProps.dateFormat,t.props.locale);if(t.setState({preSelection:v,inputValue:Z}),!(t.props.selectsRange||t.props.selectsMultiple)){var b=t.props.selected?t.props.selected:t.getPreSelection(),S=t.props.selected?v:d0(b,{hour:O2(v),minute:W2(v)});(c=(l=t.props).onChange)===null||c===void 0||c.call(l,S),(t.props.showTimeSelectOnly||t.props.showTimeSelect)&&t.setState({isRenderAriaLiveMessage:!0}),requestAnimationFrame(function(){t.scrollToTimeOption(v)})}},t.handleTimeOnlyEnterKey=function(A){var i,a,l,c,o=A.target,f=o.value,E=(i=t.props.dateFormat)!==null&&i!==void 0?i:n.defaultProps.dateFormat,u=t.props.timeFormat||"p",s=t.state.preSelection||t.props.selected||D(),m=c3(f,E,t.props.locale,(a=t.props.strictParsing)!==null&&a!==void 0?a:!1,s),h=s;if(m&&K2(m))h=m;else{var v=((l=t.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&t.calendar.containerRef.current.querySelector(".react-datepicker__time-list-item[tabindex='0']");if(v instanceof HTMLElement){var z=(c=v.textContent)===null||c===void 0?void 0:c.trim();if(z){var Z=c3(z,u,t.props.locale,!1,s);Z&&K2(Z)&&(h=Z)}}}t.handleTimeChange(h),t.setOpen(!1),t.sendFocusBackToInput()},t.scrollToTimeOption=function(A){var i,a;if(!((i=t.calendar)===null||i===void 0)&&i.containerRef.current){for(var l=t.calendar.containerRef.current,c=Array.from(l.querySelectorAll(".react-datepicker__time-list-item")),o=null,f=1/0,E=t.props.timeFormat||"p",u=0,s=c;u<s.length;u++){var m=s[u],h=(a=m.textContent)===null||a===void 0?void 0:a.trim();if(h){var v=c3(h,E,t.props.locale,!1,A);if(v&&K2(v)){if(q4(v,A)){o=m;break}var z=Math.abs(v.getTime()-A.getTime());z<f&&(f=z,o=m)}}}o&&(c.forEach(function(Z){Z.setAttribute("tabindex","-1")}),o.setAttribute("tabindex","0"),o.scrollIntoView({behavior:"smooth",block:"center"}))}},t.onInputKeyDown=function(A){var i,a,l,c,o,f;(a=(i=t.props).onKeyDown)===null||a===void 0||a.call(i,A);var E=A.key;if(!t.state.open&&!t.props.inline&&!t.props.preventOpenOnFocus){(E===U.ArrowDown||E===U.ArrowUp||E===U.Enter)&&((l=t.onInputClick)===null||l===void 0||l.call(t));return}if(t.state.open&&t.props.showTimeSelectOnly){if(E===U.ArrowDown||E===U.ArrowUp){A.preventDefault(),t.handleTimeOnlyArrowKey(E);return}if(E===U.Enter){A.preventDefault(),t.handleTimeOnlyEnterKey(A);return}}if(t.state.open){if(E===U.ArrowDown||E===U.ArrowUp){A.preventDefault();var u=t.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":t.props.showWeekPicker&&t.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':t.props.showFullMonthYearPicker||t.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',s=((c=t.calendar)===null||c===void 0?void 0:c.containerRef.current)instanceof Element&&t.calendar.containerRef.current.querySelector(u);s instanceof HTMLElement&&s.focus({preventScroll:!0});return}var m=D(t.state.preSelection);E===U.Enter?(A.preventDefault(),A.target.blur(),t.inputOk()&&t.state.lastPreSelectChange===R7?(t.handleSelect(m,A),!t.props.shouldCloseOnSelect&&t.setPreSelection(m)):t.setOpen(!1)):E===U.Escape?(A.preventDefault(),A.target.blur(),t.sendFocusBackToInput(),t.setOpen(!1)):E===U.Tab&&t.setOpen(!1),t.inputOk()||(f=(o=t.props).onInputError)===null||f===void 0||f.call(o,{code:1,msg:Z7})}},t.onPortalKeyDown=function(A){var i=A.key;i===U.Escape&&(A.preventDefault(),t.setState({preventFocus:!0},function(){t.setOpen(!1),setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})}))},t.onDayKeyDown=function(A){var i,a,l,c,o,f,E=t.props,u=E.minDate,s=E.maxDate,m=E.disabledKeyboardNavigation,h=E.showWeekPicker,v=E.shouldCloseOnSelect,z=E.locale,Z=E.calendarStartDay,b=E.adjustDateOnChange,S=E.inline;if((a=(i=t.props).onKeyDown)===null||a===void 0||a.call(i,A),!m){var x=A.key,V=A.shiftKey,B=D(t.state.preSelection),Q=function(W,k){var T=k;switch(W){case U.ArrowRight:T=h?J3(k,1):j2(k,1);break;case U.ArrowLeft:T=h?J5(k):vn(k);break;case U.ArrowUp:T=J5(k);break;case U.ArrowDown:T=J3(k,1);break;case U.PageUp:T=V?n3(k,1):Y1(k,1);break;case U.PageDown:T=V?c1(k,1):y2(k,1);break;case U.Home:T=v1(k,z,Z);break;case U.End:T=eA(k);break}return T},R=function(W,k){for(var T=40,X=W,e2=!1,w=0,G=Q(W,k);!e2;){if(w>=T){G=k;break}u&&G<u&&(X=U.ArrowRight,G=k2(u,t.props)?Q(X,G):u),s&&G>s&&(X=U.ArrowLeft,G=k2(s,t.props)?Q(X,G):s),k2(G,t.props)?((X===U.PageUp||X===U.Home)&&(X=U.ArrowRight),(X===U.PageDown||X===U.End)&&(X=U.ArrowLeft),G=Q(X,G)):e2=!0,w++}return G};if(x===U.Enter){A.preventDefault(),t.handleSelect(B,A),!v&&t.setPreSelection(B);return}else if(x===U.Escape){A.preventDefault(),t.setOpen(!1),t.inputOk()||(c=(l=t.props).onInputError)===null||c===void 0||c.call(l,{code:1,msg:Z7});return}var q=null;switch(x){case U.ArrowLeft:case U.ArrowRight:case U.ArrowUp:case U.ArrowDown:case U.PageUp:case U.PageDown:case U.Home:case U.End:q=R(x,B);break}if(!q){(f=(o=t.props).onInputError)===null||f===void 0||f.call(o,{code:1,msg:Z7});return}A.preventDefault(),t.setState({lastPreSelectChange:R7}),b&&t.setSelected(q),t.setPreSelection(q),S&&t.setState({shouldFocusDayInline:!0})}},t.onPopperKeyDown=function(A){var i=A.key;i===U.Escape&&(A.preventDefault(),t.sendFocusBackToInput(),t.setOpen(!1))},t.onClearClick=function(A){A&&A.preventDefault&&A.preventDefault(),t.sendFocusBackToInput();var i=t.props,a=i.selectsRange,l=i.onChange;a?l==null||l([null,null],A):l==null||l(null,A),t.setState({inputValue:null})},t.clear=function(){t.onClearClick()},t.onScroll=function(A){typeof t.props.closeOnScroll=="boolean"&&t.props.closeOnScroll?(A.target===document||A.target===document.documentElement||A.target===document.body)&&t.setOpen(!1):typeof t.props.closeOnScroll=="function"&&t.props.closeOnScroll(A)&&t.setOpen(!1)},t.renderCalendar=function(){var A,i;return!t.props.inline&&!t.isCalendarOpen()?null:d.createElement(KA,J({showMonthYearDropdown:void 0,ref:function(a){t.calendar=a}},t.props,t.state,{setOpen:t.setOpen,dateFormat:(A=t.props.dateFormatCalendar)!==null&&A!==void 0?A:n.defaultProps.dateFormatCalendar,onSelect:t.handleSelect,onClickOutside:t.handleCalendarClickOutside,holidays:EA(t.modifyHolidays()),outsideClickIgnoreClass:t.props.outsideClickIgnoreClass,onDropdownFocus:t.handleDropdownFocus,onTimeChange:t.handleTimeChange,className:t.props.calendarClassName,container:t.props.calendarContainer,handleOnKeyDown:t.props.onKeyDown,handleOnDayKeyDown:t.onDayKeyDown,setPreSelection:t.setPreSelection,dropdownMode:(i=t.props.dropdownMode)!==null&&i!==void 0?i:n.defaultProps.dropdownMode}),t.props.children)},t.renderAriaLiveRegion=function(){var A,i=t.props.locale,a=(A=t.props.dateFormat)!==null&&A!==void 0?A:n.defaultProps.dateFormat,l=t.props.showTimeInput||t.props.showTimeSelect,c=l?"PPPPp":"PPPP",o;return t.props.selectsRange?o="Selected start date: ".concat(q2(t.props.startDate,{dateFormat:c,locale:i}),". ").concat(t.props.endDate?"End date: "+q2(t.props.endDate,{dateFormat:c,locale:i}):""):t.props.showTimeSelectOnly?o="Selected time: ".concat(q2(t.props.selected,{dateFormat:a,locale:i})):t.props.showYearPicker?o="Selected year: ".concat(q2(t.props.selected,{dateFormat:"yyyy",locale:i})):t.props.showMonthYearPicker?o="Selected month: ".concat(q2(t.props.selected,{dateFormat:"MMMM yyyy",locale:i})):t.props.showQuarterYearPicker?o="Selected quarter: ".concat(q2(t.props.selected,{dateFormat:"yyyy, QQQ",locale:i})):o="Selected date: ".concat(q2(t.props.selected,{dateFormat:c,locale:i})),d.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},o)},t.renderDateInput=function(){var A,i,a,l,c,o,f=p2(t.props.className,(A={},A[t.props.outsideClickIgnoreClass||n.defaultProps.outsideClickIgnoreClass]=t.state.open,A)),E=t.props.customInput||d.createElement("input",{type:"text"}),u=t.props.customInputRef||"ref",s={},m=(a=t.props["aria-describedby"])!==null&&a!==void 0?a:t.props.ariaDescribedBy,h=(l=t.props["aria-invalid"])!==null&&l!==void 0?l:t.props.ariaInvalid,v=(c=t.props["aria-labelledby"])!==null&&c!==void 0?c:t.props.ariaLabelledBy,z=(o=t.props["aria-required"])!==null&&o!==void 0?o:t.props.ariaRequired;return m!=null&&(s["aria-describedby"]=m),h!=null&&(s["aria-invalid"]=h),v!=null&&(s["aria-labelledby"]=v),z!=null&&(s["aria-required"]=z),d.cloneElement(E,J((i={},i[u]=function(Z){t.input=Z},i.value=t.getInputValue(),i.onBlur=t.handleBlur,i.onChange=t.handleChange,i.onClick=t.onInputClick,i.onFocus=t.handleFocus,i.onKeyDown=t.onInputKeyDown,i.id=t.props.id,i.name=t.props.name,i.form=t.props.form,i.autoFocus=t.props.autoFocus,i.placeholder=t.props.placeholderText,i.disabled=t.props.disabled,i.autoComplete=t.props.autoComplete,i.className=p2(E.props.className,f),i.title=t.props.title,i.readOnly=t.props.readOnly,i.required=t.props.required,i.tabIndex=t.props.tabIndex,i),s))},t.renderClearButton=function(){var A=t.props,i=A.isClearable,a=A.disabled,l=A.selected,c=A.startDate,o=A.endDate,f=A.clearButtonTitle,E=A.clearButtonClassName,u=E===void 0?"":E,s=A.ariaLabelClose,m=s===void 0?"Close":s,h=A.selectedDates,v=A.readOnly;return i&&!v&&(l!=null||c!=null||o!=null||h!=null&&h.length)?d.createElement("button",{type:"button",className:p2("react-datepicker__close-icon",u,{"react-datepicker__close-icon--disabled":a}),disabled:a,"aria-label":m,onClick:t.onClearClick,title:f,tabIndex:-1}):null},t.state=t.calcInitialState(),t.preventFocusTimeout=void 0,t}return Object.defineProperty(n,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,outsideClickIgnoreClass:O4,readOnly:!1,rangeSeparator:s4,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:b3,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},n.prototype.componentDidUpdate=function(e,t){var A,i,a,l;e.inline&&WA(e.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&e.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),this.props.selectsRange&&this.state.monthSelectedIn!==0&&this.setState({monthSelectedIn:0}),e.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Y4(this.props.highlightDates)}),!t.focused&&!k1(e.selected,this.props.selected)&&this.setState({inputValue:null}),t.open!==this.state.open&&(t.open===!1&&this.state.open===!0&&((i=(A=this.props).onCalendarOpen)===null||i===void 0||i.call(A)),t.open===!0&&this.state.open===!1&&((l=(a=this.props).onCalendarClose)===null||l===void 0||l.call(a)))},n.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},n.prototype.renderInputContainer=function(){var e=this.props,t=e.showIcon,A=e.icon,i=e.calendarIconClassname,a=e.calendarIconClassName,l=e.toggleCalendarOnIconClick,c=this.state.open;return i&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),d.createElement("div",{className:"react-datepicker__input-container".concat(t?" react-datepicker__view-calendar-icon":"")},t&&d.createElement(qA,J({icon:A,className:p2(a,!a&&i,c&&"react-datepicker-ignore-onclickoutside")},l?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},n.prototype.render=function(){var e=this.renderCalendar();if(this.props.inline)return e;if(this.props.withPortal){var t=this.state.open?d.createElement(T4,{enableTabLoop:this.props.enableTabLoop},d.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},e)):null;return this.state.open&&this.props.portalId&&(t=d.createElement(W4,J({portalId:this.props.portalId},this.props),t)),d.createElement("div",null,this.renderInputContainer(),t)}return d.createElement(OA,J({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:e,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},n})(d.Component),TA="input",R7="navigate";const G4={inputWrapper:"_inputWrapper_16pcj_1",inputIcon:"_inputIcon_16pcj_7"},XA={lessThanXSeconds:{one:"mindre enn ett sekund",other:"mindre enn {{count}} sekunder"},xSeconds:{one:"ett sekund",other:"{{count}} sekunder"},halfAMinute:"et halvt minutt",lessThanXMinutes:{one:"mindre enn ett minutt",other:"mindre enn {{count}} minutter"},xMinutes:{one:"ett minutt",other:"{{count}} minutter"},aboutXHours:{one:"omtrent en time",other:"omtrent {{count}} timer"},xHours:{one:"en time",other:"{{count}} timer"},xDays:{one:"en dag",other:"{{count}} dager"},aboutXWeeks:{one:"omtrent en uke",other:"omtrent {{count}} uker"},xWeeks:{one:"en uke",other:"{{count}} uker"},aboutXMonths:{one:"omtrent en måned",other:"omtrent {{count}} måneder"},xMonths:{one:"en måned",other:"{{count}} måneder"},aboutXYears:{one:"omtrent ett år",other:"omtrent {{count}} år"},xYears:{one:"ett år",other:"{{count}} år"},overXYears:{one:"over ett år",other:"over {{count}} år"},almostXYears:{one:"nesten ett år",other:"nesten {{count}} år"}},GA=(r,n,e)=>{let t;const A=XA[r];return typeof A=="string"?t=A:n===1?t=A.one:t=A.other.replace("{{count}}",String(n)),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"om "+t:t+" siden":t},PA={full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},HA={full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},JA={full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},FA={date:$1({formats:PA,defaultWidth:"full"}),time:$1({formats:HA,defaultWidth:"full"}),dateTime:$1({formats:JA,defaultWidth:"full"})},LA={lastWeek:"'forrige' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgen kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},wA=(r,n,e,t)=>LA[r],DA={narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["før Kristus","etter Kristus"]},NA={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},_A={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","mai","juni","juli","aug.","sep.","okt.","nov.","des."],wide:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"]},$A={narrow:["S","M","T","O","T","F","L"],short:["sø","ma","ti","on","to","fr","lø"],abbreviated:["søn","man","tir","ons","tor","fre","lør"],wide:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},ei={narrow:{am:"a",pm:"p",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natten"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natten"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morgenen",afternoon:"på ettermiddagen",evening:"på kvelden",night:"på natten"}},ti={ordinalNumber:(r,n)=>Number(r)+".",era:F2({values:DA,defaultWidth:"wide"}),quarter:F2({values:NA,defaultWidth:"wide",argumentCallback:r=>r-1}),month:F2({values:_A,defaultWidth:"wide"}),day:F2({values:$A,defaultWidth:"wide"}),dayPeriod:F2({values:ei,defaultWidth:"wide"})},ni=/^(\d+)\.?/i,ri=/\d+/i,Ai={narrow:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,abbreviated:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,wide:/^(før Kristus|før vår tid|etter Kristus|vår tid)/i},ii={any:[/^f/i,/^e/i]},ai={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? kvartal/i},li={any:[/1/i,/2/i,/3/i,/4/i]},ci={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,wide:/^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i},oi={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^aug/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ii={narrow:/^[smtofl]/i,short:/^(sø|ma|ti|on|to|fr|lø)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},fi={any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},Ei={narrow:/^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,any:/^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i},Ci={any:{am:/^a(\.?\s?m\.?)?$/i,pm:/^p(\.?\s?m\.?)?$/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgen/i,afternoon:/ettermiddag/i,evening:/kveld/i,night:/natt/i}},ui={ordinalNumber:U5({matchPattern:ni,parsePattern:ri,valueCallback:r=>parseInt(r,10)}),era:L2({matchPatterns:Ai,defaultMatchWidth:"wide",parsePatterns:ii,defaultParseWidth:"any"}),quarter:L2({matchPatterns:ai,defaultMatchWidth:"wide",parsePatterns:li,defaultParseWidth:"any",valueCallback:r=>r+1}),month:L2({matchPatterns:ci,defaultMatchWidth:"wide",parsePatterns:oi,defaultParseWidth:"any"}),day:L2({matchPatterns:Ii,defaultMatchWidth:"wide",parsePatterns:fi,defaultParseWidth:"any"}),dayPeriod:L2({matchPatterns:Ei,defaultMatchWidth:"any",parsePatterns:Ci,defaultParseWidth:"any"})},P4={code:"nb",formatDistance:GA,formatLong:FA,formatRelative:wA,localize:ti,match:ui,options:{weekStartsOn:1,firstWeekContainsDate:4}};p4("nb",P4);const si=r=>{const{showCalendarIcon:n,...e}=r;return n?I.jsxs("div",{className:G4.inputWrapper,children:[I.jsx(M.Input,{...e,inputMode:"numeric",type:"text"}),I.jsx(L,{className:G4.inputIcon,material:"calendar_month","aria-hidden":"true"})]}):I.jsx(M.Input,{...e,inputMode:"numeric",type:"text"})},di=({value:r,onChange:n,dateFormat:e="dd.MM.yyyy",showCalendarIcon:t=!0,minDate:A,maxDate:i,popperPlacement:a="top",withPortal:l,...c})=>{const[o,f]=d.useState(!1);d.useEffect(()=>{const u=()=>{f(window.innerWidth<768||/Mobi|Android/i.test(navigator.userAgent))};return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[]);const E=o&&(l??!1);return I.jsxs(M.Field,{children:[I.jsx(M.Label,{style:{display:"block",width:"fit-content"},children:I.jsx(P2,{text:c.label,required:c.required,optional:c.optional})}),c.description&&I.jsx(M.Field.Description,{children:c.description}),I.jsx(X4,{locale:"nb",selected:r,dateFormat:e,placeholderText:"dd.mm.åååå",onChange:u=>n==null?void 0:n(u??void 0),customInput:d.createElement(si,{showCalendarIcon:t}),minDate:A,maxDate:i,onBlur:c.onBlur,popperPlacement:a,...E&&{withPortal:!0,fixedHeight:!0}}),c.error&&I.jsx(M.ValidationMessage,{children:c.error})]})},b7={input:"_input_7ewse_2",inputWrapper:"_inputWrapper_7ewse_12",inputIcon:"_inputIcon_7ewse_18"};p4("nb",P4);const Mi=r=>{const{showCalendarIcon:n,...e}=r;return n?I.jsxs("div",{className:b7.inputWrapper,children:[I.jsx(M.Input,{...e,inputMode:"numeric",type:"text"}),I.jsx(L,{className:b7.inputIcon,material:"calendar_month","aria-hidden":"true"})]}):I.jsx(M.Input,{...e,inputMode:"numeric",type:"text"})},mi=({value:r,onChange:n,dateTimeFormat:e="dd.MM.yyyy, HH:mm",timeInputLabel:t="Time: ",showCalendarIcon:A=!0,minDate:i,maxDate:a,...l})=>I.jsxs(M.Field,{className:b7.input,children:[I.jsx(M.Label,{style:{display:"block",width:"fit-content"},children:I.jsx(P2,{text:l.label,required:l.required,optional:l.optional})}),l.description&&I.jsx(M.Field.Description,{children:l.description}),I.jsx(X4,{locale:"nb",selected:r,dateFormat:e,onChange:c=>n==null?void 0:n(c??void 0),customInput:d.createElement(Mi,{showCalendarIcon:A}),showTimeInput:!0,placeholderText:"dd.mm.åååå, tt:mm",timeInputLabel:t,minDate:i,maxDate:a,onBlur:l.onBlur}),l.error&&I.jsx(M.ValidationMessage,{children:l.error})]}),S7={uploadInformation:"_uploadInformation_cqv67_2",fileList:"_fileList_cqv67_10"};var Q0=typeof self<"u"?self:global;const V3=typeof navigator<"u",pi=V3&&typeof HTMLImageElement>"u",Z0=!(typeof global>"u"||typeof process>"u"||!process.versions||!process.versions.node),R0=Q0.Buffer,b0=Q0.BigInt,S0=!!R0,vi=r=>r;function B0(r,n=vi){if(Z0)try{return typeof require=="function"?Promise.resolve(n(require(r))):import(r).then(n)}catch{console.warn(`Couldn't load ${r}`)}}let B7=Q0.fetch;const hi=r=>B7=r;if(!Q0.fetch){const r=B0("http",(t=>t)),n=B0("https",(t=>t)),e=(t,{headers:A}={})=>new Promise((async(i,a)=>{let{port:l,hostname:c,pathname:o,protocol:f,search:E}=new URL(t);const u={method:"GET",hostname:c,path:encodeURI(o)+E,headers:A};l!==""&&(u.port=Number(l));const s=(f==="https:"?await n:await r).request(u,(m=>{if(m.statusCode===301||m.statusCode===302){let h=new URL(m.headers.location,t).toString();return e(h,{headers:A}).then(i).catch(a)}i({status:m.statusCode,arrayBuffer:()=>new Promise((h=>{let v=[];m.on("data",(z=>v.push(z))),m.on("end",(()=>h(Buffer.concat(v))))}))})}));s.on("error",a),s.end()}));hi(e)}function O(r,n,e){return n in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}const U0=r=>H4(r)?void 0:r,zi=r=>r!==void 0;function H4(r){return r===void 0||(r instanceof Map?r.size===0:Object.values(r).filter(zi).length===0)}function f2(r){let n=new Error(r);throw delete n.stack,n}function y1(r){return(r=(function(n){for(;n.endsWith("\0");)n=n.slice(0,-1);return n})(r).trim())===""?void 0:r}function U7(r){let n=(function(e){let t=0;return e.ifd0.enabled&&(t+=1024),e.exif.enabled&&(t+=2048),e.makerNote&&(t+=2048),e.userComment&&(t+=1024),e.gps.enabled&&(t+=512),e.interop.enabled&&(t+=100),e.ifd1.enabled&&(t+=1024),t+2048})(r);return r.jfif.enabled&&(n+=50),r.xmp.enabled&&(n+=2e4),r.iptc.enabled&&(n+=14e3),r.icc.enabled&&(n+=6e3),n}const Y7=r=>String.fromCharCode.apply(null,r),J4=typeof TextDecoder<"u"?new TextDecoder("utf-8"):void 0;function F4(r){return J4?J4.decode(r):S0?Buffer.from(r).toString("utf8"):decodeURIComponent(escape(Y7(r)))}class S2{static from(n,e){return n instanceof this&&n.le===e?n:new S2(n,void 0,void 0,e)}constructor(n,e=0,t,A){if(typeof A=="boolean"&&(this.le=A),Array.isArray(n)&&(n=new Uint8Array(n)),n===0)this.byteOffset=0,this.byteLength=0;else if(n instanceof ArrayBuffer){t===void 0&&(t=n.byteLength-e);let i=new DataView(n,e,t);this._swapDataView(i)}else if(n instanceof Uint8Array||n instanceof DataView||n instanceof S2){t===void 0&&(t=n.byteLength-e),(e+=n.byteOffset)+t>n.byteOffset+n.byteLength&&f2("Creating view outside of available memory in ArrayBuffer");let i=new DataView(n.buffer,e,t);this._swapDataView(i)}else if(typeof n=="number"){let i=new DataView(new ArrayBuffer(n));this._swapDataView(i)}else f2("Invalid input argument for BufferView: "+n)}_swapArrayBuffer(n){this._swapDataView(new DataView(n))}_swapBuffer(n){this._swapDataView(new DataView(n.buffer,n.byteOffset,n.byteLength))}_swapDataView(n){this.dataView=n,this.buffer=n.buffer,this.byteOffset=n.byteOffset,this.byteLength=n.byteLength}_lengthToEnd(n){return this.byteLength-n}set(n,e,t=S2){return n instanceof DataView||n instanceof S2?n=new Uint8Array(n.buffer,n.byteOffset,n.byteLength):n instanceof ArrayBuffer&&(n=new Uint8Array(n)),n instanceof Uint8Array||f2("BufferView.set(): Invalid data argument."),this.toUint8().set(n,e),new t(this,e,n.byteLength)}subarray(n,e){return e=e||this._lengthToEnd(n),new S2(this,n,e)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(n,e){return new Uint8Array(this.buffer,this.byteOffset+n,e)}getString(n=0,e=this.byteLength){return F4(this.getUint8Array(n,e))}getLatin1String(n=0,e=this.byteLength){let t=this.getUint8Array(n,e);return Y7(t)}getUnicodeString(n=0,e=this.byteLength){const t=[];for(let A=0;A<e&&n+A<this.byteLength;A+=2)t.push(this.getUint16(n+A));return Y7(t)}getInt8(n){return this.dataView.getInt8(n)}getUint8(n){return this.dataView.getUint8(n)}getInt16(n,e=this.le){return this.dataView.getInt16(n,e)}getInt32(n,e=this.le){return this.dataView.getInt32(n,e)}getUint16(n,e=this.le){return this.dataView.getUint16(n,e)}getUint32(n,e=this.le){return this.dataView.getUint32(n,e)}getFloat32(n,e=this.le){return this.dataView.getFloat32(n,e)}getFloat64(n,e=this.le){return this.dataView.getFloat64(n,e)}getFloat(n,e=this.le){return this.dataView.getFloat32(n,e)}getDouble(n,e=this.le){return this.dataView.getFloat64(n,e)}getUintBytes(n,e,t){switch(e){case 1:return this.getUint8(n,t);case 2:return this.getUint16(n,t);case 4:return this.getUint32(n,t);case 8:return this.getUint64&&this.getUint64(n,t)}}getUint(n,e,t){switch(e){case 8:return this.getUint8(n,t);case 16:return this.getUint16(n,t);case 32:return this.getUint32(n,t);case 64:return this.getUint64&&this.getUint64(n,t)}}toString(n){return this.dataView.toString(n,this.constructor.name)}ensureChunk(){}}function V7(r,n){f2(`${r} '${n}' was not loaded, try using full build of exifr.`)}class K7 extends Map{constructor(n){super(),this.kind=n}get(n,e){return this.has(n)||V7(this.kind,n),e&&(n in e||(function(t,A){f2(`Unknown ${t} '${A}'.`)})(this.kind,n),e[n].enabled||V7(this.kind,n)),super.get(n)}keyList(){return Array.from(this.keys())}}var r1=new K7("file parser"),E2=new K7("segment parser"),A1=new K7("file reader");function gi(r,n){return typeof r=="string"?L4(r,n):V3&&!pi&&r instanceof HTMLImageElement?L4(r.src,n):r instanceof Uint8Array||r instanceof ArrayBuffer||r instanceof DataView?new S2(r):V3&&r instanceof Blob?q7(r,n,"blob",W1):void f2("Invalid input argument")}function L4(r,n){return(e=r).startsWith("data:")||e.length>1e4?x7(r,n,"base64"):Z0&&r.includes("://")?q7(r,n,"url",O1):Z0?x7(r,n,"fs"):V3?q7(r,n,"url",O1):void f2("Invalid input argument");var e}async function q7(r,n,e,t){return A1.has(e)?x7(r,n,e):t?(async function(A,i){let a=await i(A);return new S2(a)})(r,t):void f2(`Parser ${e} is not loaded`)}async function x7(r,n,e){let t=new(A1.get(e))(r,n);return await t.read(),t}const O1=r=>B7(r).then((n=>n.arrayBuffer())),W1=r=>new Promise(((n,e)=>{let t=new FileReader;t.onloadend=()=>n(t.result||new ArrayBuffer),t.onerror=e,t.readAsArrayBuffer(r)}));class Qi extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())),this.allValues}}function I2(r,n,e){let t=new Qi;for(let[A,i]of e)t.set(A,i);if(Array.isArray(n))for(let A of n)r.set(A,t);else r.set(n,t);return t}function T1(r,n,e){let t,A=r.get(n);for(t of e)A.set(t[0],t[1])}const d2=new Map,T2=new Map,h1=new Map,z1=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],f3=["jfif","xmp","icc","iptc","ihdr"],X1=["tiff",...f3],a2=["ifd0","ifd1","exif","gps","interop"],g1=[...X1,...a2],Q1=["makerNote","userComment"],E3=["translateKeys","translateValues","reviveValues","multiSegment"],Z1=[...E3,"sanitize","mergeOutput","silentErrors"];class w4{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class K3 extends w4{get needed(){return this.enabled||this.deps.size>0}constructor(n,e,t,A){if(super(),O(this,"enabled",!1),O(this,"skip",new Set),O(this,"pick",new Set),O(this,"deps",new Set),O(this,"translateKeys",!1),O(this,"translateValues",!1),O(this,"reviveValues",!1),this.key=n,this.enabled=e,this.parse=this.enabled,this.applyInheritables(A),this.canBeFiltered=a2.includes(n),this.canBeFiltered&&(this.dict=d2.get(n)),t!==void 0)if(Array.isArray(t))this.parse=this.enabled=!0,this.canBeFiltered&&t.length>0&&this.translateTagSet(t,this.pick);else if(typeof t=="object"){if(this.enabled=!0,this.parse=t.parse!==!1,this.canBeFiltered){let{pick:i,skip:a}=t;i&&i.length>0&&this.translateTagSet(i,this.pick),a&&a.length>0&&this.translateTagSet(a,this.skip)}this.applyInheritables(t)}else t===!0||t===!1?this.parse=this.enabled=t:f2(`Invalid options argument: ${t}`)}applyInheritables(n){let e,t;for(e of E3)t=n[e],t!==void 0&&(this[e]=t)}translateTagSet(n,e){if(this.dict){let t,A,{tagKeys:i,tagValues:a}=this.dict;for(t of n)typeof t=="string"?(A=a.indexOf(t),A===-1&&(A=i.indexOf(Number(t))),A!==-1&&e.add(Number(i[A]))):e.add(t)}else for(let t of n)e.add(t)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,Y0(this.pick,this.deps)):this.enabled&&this.pick.size>0&&Y0(this.pick,this.deps)}}var R2={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},D4=new Map;class G1 extends w4{static useCached(n){let e=D4.get(n);return e!==void 0||(e=new this(n),D4.set(n,e)),e}constructor(n){super(),n===!0?this.setupFromTrue():n===void 0?this.setupFromUndefined():Array.isArray(n)?this.setupFromArray(n):typeof n=="object"?this.setupFromObject(n):f2(`Invalid options argument ${n}`),this.firstChunkSize===void 0&&(this.firstChunkSize=V3?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let n;for(n of z1)this[n]=R2[n];for(n of Z1)this[n]=R2[n];for(n of Q1)this[n]=R2[n];for(n of g1)this[n]=new K3(n,R2[n],void 0,this)}setupFromTrue(){let n;for(n of z1)this[n]=R2[n];for(n of Z1)this[n]=R2[n];for(n of Q1)this[n]=!0;for(n of g1)this[n]=new K3(n,!0,void 0,this)}setupFromArray(n){let e;for(e of z1)this[e]=R2[e];for(e of Z1)this[e]=R2[e];for(e of Q1)this[e]=R2[e];for(e of g1)this[e]=new K3(e,!1,void 0,this);this.setupGlobalFilters(n,void 0,a2)}setupFromObject(n){let e;for(e of(a2.ifd0=a2.ifd0||a2.image,a2.ifd1=a2.ifd1||a2.thumbnail,Object.assign(this,n),z1))this[e]=k7(n[e],R2[e]);for(e of Z1)this[e]=k7(n[e],R2[e]);for(e of Q1)this[e]=k7(n[e],R2[e]);for(e of X1)this[e]=new K3(e,R2[e],n[e],this);for(e of a2)this[e]=new K3(e,R2[e],n[e],this.tiff);this.setupGlobalFilters(n.pick,n.skip,a2,g1),n.tiff===!0?this.batchEnableWithBool(a2,!0):n.tiff===!1?this.batchEnableWithUserValue(a2,n):Array.isArray(n.tiff)?this.setupGlobalFilters(n.tiff,void 0,a2):typeof n.tiff=="object"&&this.setupGlobalFilters(n.tiff.pick,n.tiff.skip,a2)}batchEnableWithBool(n,e){for(let t of n)this[t].enabled=e}batchEnableWithUserValue(n,e){for(let t of n){let A=e[t];this[t].enabled=A!==!1&&A!==void 0}}setupGlobalFilters(n,e,t,A=t){if(n&&n.length){for(let a of A)this[a].enabled=!1;let i=N4(n,t);for(let[a,l]of i)Y0(this[a].pick,l),this[a].enabled=!0}else if(e&&e.length){let i=N4(e,t);for(let[a,l]of i)Y0(this[a].skip,l)}}filterNestedSegmentTags(){let{ifd0:n,exif:e,xmp:t,iptc:A,icc:i}=this;this.makerNote?e.deps.add(37500):e.skip.add(37500),this.userComment?e.deps.add(37510):e.skip.add(37510),t.enabled||n.skip.add(700),A.enabled||n.skip.add(33723),i.enabled||n.skip.add(34675)}traverseTiffDependencyTree(){let{ifd0:n,exif:e,gps:t,interop:A}=this;A.needed&&(e.deps.add(40965),n.deps.add(40965)),e.needed&&n.deps.add(34665),t.needed&&n.deps.add(34853),this.tiff.enabled=a2.some((i=>this[i].enabled===!0))||this.makerNote||this.userComment;for(let i of a2)this[i].finalizeFilters()}get onlyTiff(){return!f3.map((n=>this[n].enabled)).some((n=>n===!0))&&this.tiff.enabled}checkLoadedPlugins(){for(let n of X1)this[n].enabled&&!E2.has(n)&&V7("segment parser",n)}}function N4(r,n){let e,t,A,i,a=[];for(A of n){for(i of(e=d2.get(A),t=[],e))(r.includes(i[0])||r.includes(i[1]))&&t.push(i[0]);t.length&&a.push([A,t])}return a}function k7(r,n){return r!==void 0?r:n!==void 0?n:void 0}function Y0(r,n){for(let e of n)r.add(e)}O(G1,"default",R2);class R1{constructor(n){O(this,"parsers",{}),O(this,"output",{}),O(this,"errors",[]),O(this,"pushToErrors",(e=>this.errors.push(e))),this.options=G1.useCached(n)}async read(n){this.file=await gi(n,this.options)}setup(){if(this.fileParser)return;let{file:n}=this,e=n.getUint16(0);for(let[t,A]of r1)if(A.canHandle(n,e))return this.fileParser=new A(this.options,this.file,this.parsers),n[t]=!0;this.file.close&&this.file.close(),f2("Unknown file format")}async parse(){let{output:n,errors:e}=this;return this.setup(),this.options.silentErrors?(await this.executeParsers().catch(this.pushToErrors),e.push(...this.fileParser.errors)):await this.executeParsers(),this.file.close&&this.file.close(),this.options.silentErrors&&e.length>0&&(n.errors=e),U0(n)}async executeParsers(){let{output:n}=this;await this.fileParser.parse();let e=Object.values(this.parsers).map((async t=>{let A=await t.parse();t.assignToOutput(n,A)}));this.options.silentErrors&&(e=e.map((t=>t.catch(this.pushToErrors)))),await Promise.all(e)}async extractThumbnail(){this.setup();let{options:n,file:e}=this,t=E2.get("tiff",n);var A;if(e.tiff?A={start:0,type:"tiff"}:e.jpeg&&(A=await this.fileParser.getOrFindSegment("tiff")),A===void 0)return;let i=await this.fileParser.ensureSegmentChunk(A),a=this.parsers.tiff=new t(i,n,e),l=await a.extractThumbnail();return e.close&&e.close(),l}}async function V0(r,n){let e=new R1(n);return await e.read(r),e.parse()}var Zi=Object.freeze({__proto__:null,parse:V0,Exifr:R1,fileParsers:r1,segmentParsers:E2,fileReaders:A1,tagKeys:d2,tagValues:T2,tagRevivers:h1,createDictionary:I2,extendDictionary:T1,fetchUrlAsArrayBuffer:O1,readBlobAsArrayBuffer:W1,chunkedProps:z1,otherSegments:f3,segments:X1,tiffBlocks:a2,segmentsAndBlocks:g1,tiffExtractables:Q1,inheritables:E3,allFormatters:Z1,Options:G1});class K0{constructor(n,e,t){O(this,"errors",[]),O(this,"ensureSegmentChunk",(async A=>{let i=A.start,a=A.size||65536;if(this.file.chunked)if(this.file.available(i,a))A.chunk=this.file.subarray(i,a);else try{A.chunk=await this.file.readChunk(i,a)}catch(l){f2(`Couldn't read segment: ${JSON.stringify(A)}. ${l.message}`)}else this.file.byteLength>i+a?A.chunk=this.file.subarray(i,a):A.size===void 0?A.chunk=this.file.subarray(i):f2("Segment unreachable: "+JSON.stringify(A));return A.chunk})),this.extendOptions&&this.extendOptions(n),this.options=n,this.file=e,this.parsers=t}injectSegment(n,e){this.options[n].enabled&&this.createParser(n,e)}createParser(n,e){let t=new(E2.get(n))(e,this.options,this.file);return this.parsers[n]=t}createParsers(n){for(let e of n){let{type:t,chunk:A}=e,i=this.options[t];if(i&&i.enabled){let a=this.parsers[t];a&&a.append||a||this.createParser(t,A)}}}async readSegments(n){let e=n.map(this.ensureSegmentChunk);await Promise.all(e)}}class X2{static findPosition(n,e){let t=n.getUint16(e+2)+2,A=typeof this.headerLength=="function"?this.headerLength(n,e,t):this.headerLength,i=e+A,a=t-A;return{offset:e,length:t,headerLength:A,start:i,size:a,end:i+a}}static parse(n,e={}){return new this(n,new G1({[this.type]:e}),n).parse()}normalizeInput(n){return n instanceof S2?n:new S2(n)}constructor(n,e={},t){O(this,"errors",[]),O(this,"raw",new Map),O(this,"handleError",(A=>{if(!this.options.silentErrors)throw A;this.errors.push(A.message)})),this.chunk=this.normalizeInput(n),this.file=t,this.type=this.constructor.type,this.globalOptions=this.options=e,this.localOptions=e[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(n,e){let t=h1.get(e),A=T2.get(e),i=d2.get(e),a=this.options[e],l=a.reviveValues&&!!t,c=a.translateValues&&!!A,o=a.translateKeys&&!!i,f={};for(let[E,u]of n)l&&t.has(E)?u=t.get(E)(u):c&&A.has(E)&&(u=this.translateValue(u,A.get(E))),o&&i.has(E)&&(E=i.get(E)||E),f[E]=u;return f}translateValue(n,e){return e[n]||e.DEFAULT||n}assignToOutput(n,e){this.assignObjectToOutput(n,this.constructor.type,e)}assignObjectToOutput(n,e,t){if(this.globalOptions.mergeOutput)return Object.assign(n,t);n[e]?Object.assign(n[e],t):n[e]=t}}O(X2,"headerLength",4),O(X2,"type",void 0),O(X2,"multiSegment",!1),O(X2,"canHandle",(()=>!1));function Ri(r){return r===192||r===194||r===196||r===219||r===221||r===218||r===254}function bi(r){return r>=224&&r<=239}function Si(r,n,e){for(let[t,A]of E2)if(A.canHandle(r,n,e))return t}class _4 extends K0{constructor(...n){super(...n),O(this,"appSegments",[]),O(this,"jpegSegments",[]),O(this,"unknownSegments",[])}static canHandle(n,e){return e===65496}async parse(){await this.findAppSegments(),await this.readSegments(this.appSegments),this.mergeMultiSegments(),this.createParsers(this.mergedAppSegments||this.appSegments)}setupSegmentFinderArgs(n){n===!0?(this.findAll=!0,this.wanted=new Set(E2.keyList())):(n=n===void 0?E2.keyList().filter((e=>this.options[e].enabled)):n.filter((e=>this.options[e].enabled&&E2.has(e))),this.findAll=!1,this.remaining=new Set(n),this.wanted=new Set(n)),this.unfinishedMultiSegment=!1}async findAppSegments(n=0,e){this.setupSegmentFinderArgs(e);let{file:t,findAll:A,wanted:i,remaining:a}=this;if(!A&&this.file.chunked&&(A=Array.from(i).some((l=>{let c=E2.get(l),o=this.options[l];return c.multiSegment&&o.multiSegment})),A&&await this.file.readWhole()),n=this.findAppSegmentsInRange(n,t.byteLength),!this.options.onlyTiff&&t.chunked){let l=!1;for(;a.size>0&&!l&&(t.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:c}=t,o=this.appSegments.some((f=>!this.file.available(f.offset||f.start,f.length||f.size)));if(l=n>c&&!o?!await t.readNextChunk(n):!await t.readNextChunk(c),(n=this.findAppSegmentsInRange(n,t.byteLength))===void 0)return}}}findAppSegmentsInRange(n,e){e-=2;let t,A,i,a,l,c,{file:o,findAll:f,wanted:E,remaining:u,options:s}=this;for(;n<e;n++)if(o.getUint8(n)===255){if(t=o.getUint8(n+1),bi(t)){if(A=o.getUint16(n+2),i=Si(o,n,A),i&&E.has(i)&&(a=E2.get(i),l=a.findPosition(o,n),c=s[i],l.type=i,this.appSegments.push(l),!f&&(a.multiSegment&&c.multiSegment?(this.unfinishedMultiSegment=l.chunkNumber<l.chunkCount,this.unfinishedMultiSegment||u.delete(i)):u.delete(i),u.size===0)))break;s.recordUnknownSegments&&(l=X2.findPosition(o,n),l.marker=t,this.unknownSegments.push(l)),n+=A+1}else if(Ri(t)){if(A=o.getUint16(n+2),t===218&&s.stopAfterSos!==!1)return;s.recordJpegSegments&&this.jpegSegments.push({offset:n,length:A,marker:t}),n+=A+1}}return n}mergeMultiSegments(){if(!this.appSegments.some((e=>e.multiSegment)))return;let n=(function(e,t){let A,i,a,l=new Map;for(let c=0;c<e.length;c++)A=e[c],i=A[t],l.has(i)?a=l.get(i):l.set(i,a=[]),a.push(A);return Array.from(l)})(this.appSegments,"type");this.mergedAppSegments=n.map((([e,t])=>{let A=E2.get(e,this.options);return A.handleMultiSegments?{type:e,chunk:A.handleMultiSegments(t)}:t[0]}))}getSegment(n){return this.appSegments.find((e=>e.type===n))}async getOrFindSegment(n){let e=this.getSegment(n);return e===void 0&&(await this.findAppSegments(0,[n]),e=this.getSegment(n)),e}}O(_4,"type","jpeg"),r1.set("jpeg",_4);const Bi=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class Ui extends X2{parseHeader(){var n=this.chunk.getUint16();n===18761?this.le=!0:n===19789&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(n,e,t=new Map){let{pick:A,skip:i}=this.options[e];A=new Set(A);let a=A.size>0,l=i.size===0,c=this.chunk.getUint16(n);n+=2;for(let o=0;o<c;o++){let f=this.chunk.getUint16(n);if(a){if(A.has(f)&&(t.set(f,this.parseTag(n,f,e)),A.delete(f),A.size===0))break}else!l&&i.has(f)||t.set(f,this.parseTag(n,f,e));n+=12}return t}parseTag(n,e,t){let{chunk:A}=this,i=A.getUint16(n+2),a=A.getUint32(n+4),l=Bi[i];if(l*a<=4?n+=8:n=A.getUint32(n+8),(i<1||i>13)&&f2(`Invalid TIFF value type. block: ${t.toUpperCase()}, tag: ${e.toString(16)}, type: ${i}, offset ${n}`),n>A.byteLength&&f2(`Invalid TIFF value offset. block: ${t.toUpperCase()}, tag: ${e.toString(16)}, type: ${i}, offset ${n} is outside of chunk size ${A.byteLength}`),i===1)return A.getUint8Array(n,a);if(i===2)return y1(A.getString(n,a));if(i===7)return A.getUint8Array(n,a);if(a===1)return this.parseTagValue(i,n);{let c=new((function(f){switch(f){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 10:return Array;case 11:return Float32Array;case 12:return Float64Array;default:return Array}})(i))(a),o=l;for(let f=0;f<a;f++)c[f]=this.parseTagValue(i,n),n+=o;return c}}parseTagValue(n,e){let{chunk:t}=this;switch(n){case 1:return t.getUint8(e);case 3:return t.getUint16(e);case 4:return t.getUint32(e);case 5:return t.getUint32(e)/t.getUint32(e+4);case 6:return t.getInt8(e);case 8:return t.getInt16(e);case 9:return t.getInt32(e);case 10:return t.getInt32(e)/t.getInt32(e+4);case 11:return t.getFloat(e);case 12:return t.getDouble(e);case 13:return t.getUint32(e);default:f2(`Invalid tiff type ${n}`)}}}class j7 extends Ui{static canHandle(n,e){return n.getUint8(e+1)===225&&n.getUint32(e+4)===1165519206&&n.getUint16(e+8)===0}async parse(){this.parseHeader();let{options:n}=this;return n.ifd0.enabled&&await this.parseIfd0Block(),n.exif.enabled&&await this.safeParse("parseExifBlock"),n.gps.enabled&&await this.safeParse("parseGpsBlock"),n.interop.enabled&&await this.safeParse("parseInteropBlock"),n.ifd1.enabled&&await this.safeParse("parseThumbnailBlock"),this.createOutput()}safeParse(n){let e=this[n]();return e.catch!==void 0&&(e=e.catch(this.handleError)),e}findIfd0Offset(){this.ifd0Offset===void 0&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(this.ifd1Offset===void 0){this.findIfd0Offset();let n=this.chunk.getUint16(this.ifd0Offset),e=this.ifd0Offset+2+12*n;this.ifd1Offset=this.chunk.getUint32(e)}}parseBlock(n,e){let t=new Map;return this[e]=t,this.parseTags(n,e,t),t}async parseIfd0Block(){if(this.ifd0)return;let{file:n}=this;this.findIfd0Offset(),this.ifd0Offset<8&&f2("Malformed EXIF data"),!n.chunked&&this.ifd0Offset>n.byteLength&&f2(`IFD0 offset points to outside of file.
31
31
  this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${n.byteLength}`),n.tiff&&await n.ensureChunk(this.ifd0Offset,U7(this.options));let e=this.parseBlock(this.ifd0Offset,"ifd0");return e.size!==0?(this.exifOffset=e.get(34665),this.interopOffset=e.get(40965),this.gpsOffset=e.get(34853),this.xmp=e.get(700),this.iptc=e.get(33723),this.icc=e.get(34675),this.options.sanitize&&(e.delete(34665),e.delete(40965),e.delete(34853),e.delete(700),e.delete(33723),e.delete(34675)),e):void 0}async parseExifBlock(){if(this.exif||(this.ifd0||await this.parseIfd0Block(),this.exifOffset===void 0))return;this.file.tiff&&await this.file.ensureChunk(this.exifOffset,U7(this.options));let n=this.parseBlock(this.exifOffset,"exif");return this.interopOffset||(this.interopOffset=n.get(40965)),this.makerNote=n.get(37500),this.userComment=n.get(37510),this.options.sanitize&&(n.delete(40965),n.delete(37500),n.delete(37510)),this.unpack(n,41728),this.unpack(n,41729),n}unpack(n,e){let t=n.get(e);t&&t.length===1&&n.set(e,t[0])}async parseGpsBlock(){if(this.gps||(this.ifd0||await this.parseIfd0Block(),this.gpsOffset===void 0))return;let n=this.parseBlock(this.gpsOffset,"gps");return n&&n.has(2)&&n.has(4)&&(n.set("latitude",$4(...n.get(2),n.get(1))),n.set("longitude",$4(...n.get(4),n.get(3)))),n}async parseInteropBlock(){if(!this.interop&&(this.ifd0||await this.parseIfd0Block(),this.interopOffset!==void 0||this.exif||await this.parseExifBlock(),this.interopOffset!==void 0))return this.parseBlock(this.interopOffset,"interop")}async parseThumbnailBlock(n=!1){if(!this.ifd1&&!this.ifd1Parsed&&(!this.options.mergeOutput||n))return this.findIfd1Offset(),this.ifd1Offset>0&&(this.parseBlock(this.ifd1Offset,"ifd1"),this.ifd1Parsed=!0),this.ifd1}async extractThumbnail(){if(this.headerParsed||this.parseHeader(),this.ifd1Parsed||await this.parseThumbnailBlock(!0),this.ifd1===void 0)return;let n=this.ifd1.get(513),e=this.ifd1.get(514);return this.chunk.getUint8Array(n,e)}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let n,e,t,A={};for(e of a2)if(n=this[e],!H4(n))if(t=this.canTranslate?this.translateBlock(n,e):Object.fromEntries(n),this.options.mergeOutput){if(e==="ifd1")continue;Object.assign(A,t)}else A[e]=t;return this.makerNote&&(A.makerNote=this.makerNote),this.userComment&&(A.userComment=this.userComment),A}assignToOutput(n,e){if(this.globalOptions.mergeOutput)Object.assign(n,e);else for(let[t,A]of Object.entries(e))this.assignObjectToOutput(n,t,A)}}function $4(r,n,e,t){var A=r+n/60+e/3600;return t!=="S"&&t!=="W"||(A*=-1),A}O(j7,"type","tiff"),O(j7,"headerLength",10),E2.set("tiff",j7);var Yi=Object.freeze({__proto__:null,default:Zi,Exifr:R1,fileParsers:r1,segmentParsers:E2,fileReaders:A1,tagKeys:d2,tagValues:T2,tagRevivers:h1,createDictionary:I2,extendDictionary:T1,fetchUrlAsArrayBuffer:O1,readBlobAsArrayBuffer:W1,chunkedProps:z1,otherSegments:f3,segments:X1,tiffBlocks:a2,segmentsAndBlocks:g1,tiffExtractables:Q1,inheritables:E3,allFormatters:Z1,Options:G1,parse:V0});const y7={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1},O7=Object.assign({},y7,{firstChunkSize:4e4,gps:[1,2,3,4]});async function e9(r){let n=new R1(O7);await n.read(r);let e=await n.parse();if(e&&e.gps){let{latitude:t,longitude:A}=e.gps;return{latitude:t,longitude:A}}}const W7=Object.assign({},y7,{tiff:!1,ifd1:!0,mergeOutput:!1});async function t9(r){let n=new R1(W7);await n.read(r);let e=await n.extractThumbnail();return e&&S0?R0.from(e):e}async function n9(r){let n=await this.thumbnail(r);if(n!==void 0){let e=new Blob([n]);return URL.createObjectURL(e)}}const T7=Object.assign({},y7,{firstChunkSize:4e4,ifd0:[274]});async function X7(r){let n=new R1(T7);await n.read(r);let e=await n.parse();if(e&&e.ifd0)return e.ifd0[274]}const G7=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});let P1=!0,H1=!0;if(typeof navigator=="object"){let r=navigator.userAgent;if(r.includes("iPad")||r.includes("iPhone")){let n=r.match(/OS (\d+)_(\d+)/);if(n){let[,e,t]=n;P1=Number(e)+.1*Number(t)<13.4,H1=!1}}else if(r.includes("OS X 10")){let[,n]=r.match(/OS X 10[_.](\d+)/);P1=H1=Number(n)<15}if(r.includes("Chrome/")){let[,n]=r.match(/Chrome\/(\d+)/);P1=H1=Number(n)<81}else if(r.includes("Firefox/")){let[,n]=r.match(/Firefox\/(\d+)/);P1=H1=Number(n)<77}}async function r9(r){let n=await X7(r);return Object.assign({canvas:P1,css:H1},G7[n])}class Vi extends S2{constructor(...n){super(...n),O(this,"ranges",new Ki),this.byteLength!==0&&this.ranges.add(0,this.byteLength)}_tryExtend(n,e,t){if(n===0&&this.byteLength===0&&t){let A=new DataView(t.buffer||t,t.byteOffset,t.byteLength);this._swapDataView(A)}else{let A=n+e;if(A>this.byteLength){let{dataView:i}=this._extend(A);this._swapDataView(i)}}}_extend(n){let e;e=S0?R0.allocUnsafe(n):new Uint8Array(n);let t=new DataView(e.buffer,e.byteOffset,e.byteLength);return e.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:e,dataView:t}}subarray(n,e,t=!1){return e=e||this._lengthToEnd(n),t&&this._tryExtend(n,e),this.ranges.add(n,e),super.subarray(n,e)}set(n,e,t=!1){t&&this._tryExtend(e,n.byteLength,n);let A=super.set(n,e);return this.ranges.add(e,A.byteLength),A}async ensureChunk(n,e){this.chunked&&(this.ranges.available(n,e)||await this.readChunk(n,e))}available(n,e){return this.ranges.available(n,e)}}class Ki{constructor(){O(this,"list",[])}get length(){return this.list.length}add(n,e,t=0){let A=n+e,i=this.list.filter((a=>A9(n,a.offset,A)||A9(n,a.end,A)));if(i.length>0){n=Math.min(n,...i.map((l=>l.offset))),A=Math.max(A,...i.map((l=>l.end))),e=A-n;let a=i.shift();a.offset=n,a.length=e,a.end=A,this.list=this.list.filter((l=>!i.includes(l)))}else this.list.push({offset:n,length:e,end:A})}available(n,e){let t=n+e;return this.list.some((A=>A.offset<=n&&t<=A.end))}}function A9(r,n,e){return r<=n&&n<=e}class q0 extends Vi{constructor(n,e){super(0),O(this,"chunksRead",0),this.input=n,this.options=e}async readWhole(){this.chunked=!1,await this.readChunk(this.nextChunkOffset)}async readChunked(){this.chunked=!0,await this.readChunk(0,this.options.firstChunkSize)}async readNextChunk(n=this.nextChunkOffset){if(this.fullyRead)return this.chunksRead++,!1;let e=this.options.chunkSize,t=await this.readChunk(n,e);return!!t&&t.byteLength===e}async readChunk(n,e){if(this.chunksRead++,(e=this.safeWrapAddress(n,e))!==0)return this._readChunk(n,e)}safeWrapAddress(n,e){return this.size!==void 0&&n+e>this.size?Math.max(0,this.size-n):e}get nextChunkOffset(){if(this.ranges.list.length!==0)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return this.size!==void 0&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}}A1.set("blob",class extends q0{async readWhole(){this.chunked=!1;let r=await W1(this.input);this._swapArrayBuffer(r)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}async _readChunk(r,n){let e=n?r+n:void 0,t=this.input.slice(r,e),A=await W1(t);return this.set(A,r,!0)}});var qi=Object.freeze({__proto__:null,default:Yi,Exifr:R1,fileParsers:r1,segmentParsers:E2,fileReaders:A1,tagKeys:d2,tagValues:T2,tagRevivers:h1,createDictionary:I2,extendDictionary:T1,fetchUrlAsArrayBuffer:O1,readBlobAsArrayBuffer:W1,chunkedProps:z1,otherSegments:f3,segments:X1,tiffBlocks:a2,segmentsAndBlocks:g1,tiffExtractables:Q1,inheritables:E3,allFormatters:Z1,Options:G1,parse:V0,gpsOnlyOptions:O7,gps:e9,thumbnailOnlyOptions:W7,thumbnail:t9,thumbnailUrl:n9,orientationOnlyOptions:T7,orientation:X7,rotations:G7,get rotateCanvas(){return P1},get rotateCss(){return H1},rotation:r9});A1.set("url",class extends q0{async readWhole(){this.chunked=!1;let r=await O1(this.input);r instanceof ArrayBuffer?this._swapArrayBuffer(r):r instanceof Uint8Array&&this._swapBuffer(r)}async _readChunk(r,n){let e=n?r+n-1:void 0,t=this.options.httpHeaders||{};(r||e)&&(t.range=`bytes=${[r,e].join("-")}`);let A=await B7(this.input,{headers:t}),i=await A.arrayBuffer(),a=i.byteLength;if(A.status!==416)return a!==n&&(this.size=r+a),this.set(i,r,!0)}}),S2.prototype.getUint64=function(r){let n=this.getUint32(r),e=this.getUint32(r+4);return n<1048575?n<<32|e:typeof b0!==void 0?(console.warn("Using BigInt because of type 64uint but JS can only handle 53b numbers."),b0(n)<<b0(32)|b0(e)):void f2("Trying to read 64b value but JS can only handle 53b numbers.")};class xi extends K0{parseBoxes(n=0){let e=[];for(;n<this.file.byteLength-4;){let t=this.parseBoxHead(n);if(e.push(t),t.length===0)break;n+=t.length}return e}parseSubBoxes(n){n.boxes=this.parseBoxes(n.start)}findBox(n,e){return n.boxes===void 0&&this.parseSubBoxes(n),n.boxes.find((t=>t.kind===e))}parseBoxHead(n){let e=this.file.getUint32(n),t=this.file.getString(n+4,4),A=n+8;return e===1&&(e=this.file.getUint64(n+8),A+=8),{offset:n,length:e,kind:t,start:A}}parseBoxFullHead(n){if(n.version!==void 0)return;let e=this.file.getUint32(n.start);n.version=e>>24,n.start+=4}}class i9 extends xi{static canHandle(n,e){if(e!==0)return!1;let t=n.getUint16(2);if(t>50)return!1;let A=16,i=[];for(;A<t;)i.push(n.getString(A,4)),A+=4;return i.includes(this.type)}async parse(){let n=this.file.getUint32(0),e=this.parseBoxHead(n);for(;e.kind!=="meta";)n+=e.length,await this.file.ensureChunk(n,16),e=this.parseBoxHead(n);await this.file.ensureChunk(e.offset,e.length),this.parseBoxFullHead(e),this.parseSubBoxes(e),this.options.icc.enabled&&await this.findIcc(e),this.options.tiff.enabled&&await this.findExif(e)}async registerSegment(n,e,t){await this.file.ensureChunk(e,t);let A=this.file.subarray(e,t);this.createParser(n,A)}async findIcc(n){let e=this.findBox(n,"iprp");if(e===void 0)return;let t=this.findBox(e,"ipco");if(t===void 0)return;let A=this.findBox(t,"colr");A!==void 0&&await this.registerSegment("icc",A.offset+12,A.length)}async findExif(n){let e=this.findBox(n,"iinf");if(e===void 0)return;let t=this.findBox(n,"iloc");if(t===void 0)return;let A=this.findExifLocIdInIinf(e),i=this.findExtentInIloc(t,A);if(i===void 0)return;let[a,l]=i;await this.file.ensureChunk(a,l);let c=4+this.file.getUint32(a);a+=c,l-=c,await this.registerSegment("tiff",a,l)}findExifLocIdInIinf(n){this.parseBoxFullHead(n);let e,t,A,i,a=n.start,l=this.file.getUint16(a);for(a+=2;l--;){if(e=this.parseBoxHead(a),this.parseBoxFullHead(e),t=e.start,e.version>=2&&(A=e.version===3?4:2,i=this.file.getString(t+A+2,4),i==="Exif"))return this.file.getUintBytes(t,A);a+=e.length}}get8bits(n){let e=this.file.getUint8(n);return[e>>4,15&e]}findExtentInIloc(n,e){this.parseBoxFullHead(n);let t=n.start,[A,i]=this.get8bits(t++),[a,l]=this.get8bits(t++),c=n.version===2?4:2,o=n.version===1||n.version===2?2:0,f=l+A+i,E=n.version===2?4:2,u=this.file.getUintBytes(t,E);for(t+=E;u--;){let s=this.file.getUintBytes(t,c);t+=c+o+2+a;let m=this.file.getUint16(t);if(t+=2,s===e)return m>1&&console.warn(`ILOC box has more than one extent but we're only processing one
32
- Please create an issue at https://github.com/MikeKovarik/exifr with this file`),[this.file.getUintBytes(t+l,A),this.file.getUintBytes(t+l+A,i)];t+=m*f}}}class a9 extends i9{}O(a9,"type","heic");class l9 extends i9{}O(l9,"type","avif"),r1.set("heic",a9),r1.set("avif",l9),I2(d2,["ifd0","ifd1"],[[256,"ImageWidth"],[257,"ImageHeight"],[258,"BitsPerSample"],[259,"Compression"],[262,"PhotometricInterpretation"],[270,"ImageDescription"],[271,"Make"],[272,"Model"],[273,"StripOffsets"],[274,"Orientation"],[277,"SamplesPerPixel"],[278,"RowsPerStrip"],[279,"StripByteCounts"],[282,"XResolution"],[283,"YResolution"],[284,"PlanarConfiguration"],[296,"ResolutionUnit"],[301,"TransferFunction"],[305,"Software"],[306,"ModifyDate"],[315,"Artist"],[316,"HostComputer"],[317,"Predictor"],[318,"WhitePoint"],[319,"PrimaryChromaticities"],[513,"ThumbnailOffset"],[514,"ThumbnailLength"],[529,"YCbCrCoefficients"],[530,"YCbCrSubSampling"],[531,"YCbCrPositioning"],[532,"ReferenceBlackWhite"],[700,"ApplicationNotes"],[33432,"Copyright"],[33723,"IPTC"],[34665,"ExifIFD"],[34675,"ICC"],[34853,"GpsIFD"],[330,"SubIFD"],[40965,"InteropIFD"],[40091,"XPTitle"],[40092,"XPComment"],[40093,"XPAuthor"],[40094,"XPKeywords"],[40095,"XPSubject"]]),I2(d2,"exif",[[33434,"ExposureTime"],[33437,"FNumber"],[34850,"ExposureProgram"],[34852,"SpectralSensitivity"],[34855,"ISO"],[34858,"TimeZoneOffset"],[34859,"SelfTimerMode"],[34864,"SensitivityType"],[34865,"StandardOutputSensitivity"],[34866,"RecommendedExposureIndex"],[34867,"ISOSpeed"],[34868,"ISOSpeedLatitudeyyy"],[34869,"ISOSpeedLatitudezzz"],[36864,"ExifVersion"],[36867,"DateTimeOriginal"],[36868,"CreateDate"],[36873,"GooglePlusUploadCode"],[36880,"OffsetTime"],[36881,"OffsetTimeOriginal"],[36882,"OffsetTimeDigitized"],[37121,"ComponentsConfiguration"],[37122,"CompressedBitsPerPixel"],[37377,"ShutterSpeedValue"],[37378,"ApertureValue"],[37379,"BrightnessValue"],[37380,"ExposureCompensation"],[37381,"MaxApertureValue"],[37382,"SubjectDistance"],[37383,"MeteringMode"],[37384,"LightSource"],[37385,"Flash"],[37386,"FocalLength"],[37393,"ImageNumber"],[37394,"SecurityClassification"],[37395,"ImageHistory"],[37396,"SubjectArea"],[37500,"MakerNote"],[37510,"UserComment"],[37520,"SubSecTime"],[37521,"SubSecTimeOriginal"],[37522,"SubSecTimeDigitized"],[37888,"AmbientTemperature"],[37889,"Humidity"],[37890,"Pressure"],[37891,"WaterDepth"],[37892,"Acceleration"],[37893,"CameraElevationAngle"],[40960,"FlashpixVersion"],[40961,"ColorSpace"],[40962,"ExifImageWidth"],[40963,"ExifImageHeight"],[40964,"RelatedSoundFile"],[41483,"FlashEnergy"],[41486,"FocalPlaneXResolution"],[41487,"FocalPlaneYResolution"],[41488,"FocalPlaneResolutionUnit"],[41492,"SubjectLocation"],[41493,"ExposureIndex"],[41495,"SensingMethod"],[41728,"FileSource"],[41729,"SceneType"],[41730,"CFAPattern"],[41985,"CustomRendered"],[41986,"ExposureMode"],[41987,"WhiteBalance"],[41988,"DigitalZoomRatio"],[41989,"FocalLengthIn35mmFormat"],[41990,"SceneCaptureType"],[41991,"GainControl"],[41992,"Contrast"],[41993,"Saturation"],[41994,"Sharpness"],[41996,"SubjectDistanceRange"],[42016,"ImageUniqueID"],[42032,"OwnerName"],[42033,"SerialNumber"],[42034,"LensInfo"],[42035,"LensMake"],[42036,"LensModel"],[42037,"LensSerialNumber"],[42080,"CompositeImage"],[42081,"CompositeImageCount"],[42082,"CompositeImageExposureTimes"],[42240,"Gamma"],[59932,"Padding"],[59933,"OffsetSchema"],[65e3,"OwnerName"],[65001,"SerialNumber"],[65002,"Lens"],[65100,"RawFile"],[65101,"Converter"],[65102,"WhiteBalance"],[65105,"Exposure"],[65106,"Shadows"],[65107,"Brightness"],[65108,"Contrast"],[65109,"Saturation"],[65110,"Sharpness"],[65111,"Smoothness"],[65112,"MoireFilter"],[40965,"InteropIFD"]]),I2(d2,"gps",[[0,"GPSVersionID"],[1,"GPSLatitudeRef"],[2,"GPSLatitude"],[3,"GPSLongitudeRef"],[4,"GPSLongitude"],[5,"GPSAltitudeRef"],[6,"GPSAltitude"],[7,"GPSTimeStamp"],[8,"GPSSatellites"],[9,"GPSStatus"],[10,"GPSMeasureMode"],[11,"GPSDOP"],[12,"GPSSpeedRef"],[13,"GPSSpeed"],[14,"GPSTrackRef"],[15,"GPSTrack"],[16,"GPSImgDirectionRef"],[17,"GPSImgDirection"],[18,"GPSMapDatum"],[19,"GPSDestLatitudeRef"],[20,"GPSDestLatitude"],[21,"GPSDestLongitudeRef"],[22,"GPSDestLongitude"],[23,"GPSDestBearingRef"],[24,"GPSDestBearing"],[25,"GPSDestDistanceRef"],[26,"GPSDestDistance"],[27,"GPSProcessingMethod"],[28,"GPSAreaInformation"],[29,"GPSDateStamp"],[30,"GPSDifferential"],[31,"GPSHPositioningError"]]),I2(T2,["ifd0","ifd1"],[[274,{1:"Horizontal (normal)",2:"Mirror horizontal",3:"Rotate 180",4:"Mirror vertical",5:"Mirror horizontal and rotate 270 CW",6:"Rotate 90 CW",7:"Mirror horizontal and rotate 90 CW",8:"Rotate 270 CW"}],[296,{1:"None",2:"inches",3:"cm"}]]);let q3=I2(T2,"exif",[[34850,{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"}],[37121,{0:"-",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}],[37383,{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"}],[37384,{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"}],[37385,{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"}],[41495,{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"}],[41728,{1:"Film Scanner",2:"Reflection Print Scanner",3:"Digital Camera"}],[41729,{1:"Directly photographed"}],[41985,{0:"Normal",1:"Custom",2:"HDR (no original saved)",3:"HDR (original saved)",4:"Original (for HDR)",6:"Panorama",7:"Portrait HDR",8:"Portrait"}],[41986,{0:"Auto",1:"Manual",2:"Auto bracket"}],[41987,{0:"Auto",1:"Manual"}],[41990,{0:"Standard",1:"Landscape",2:"Portrait",3:"Night",4:"Other"}],[41991,{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"}],[41996,{0:"Unknown",1:"Macro",2:"Close",3:"Distant"}],[42080,{0:"Unknown",1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}]]);const c9={1:"No absolute unit of measurement",2:"Inch",3:"Centimeter"};q3.set(37392,c9),q3.set(41488,c9);const P7={0:"Normal",1:"Low",2:"High"};function o9(r){return typeof r=="object"&&r.length!==void 0?r[0]:r}function I9(r){let n=Array.from(r).slice(1);return n[1]>15&&(n=n.map((e=>String.fromCharCode(e)))),n[2]!=="0"&&n[2]!==0||n.pop(),n.join(".")}function H7(r){if(typeof r=="string"){var[n,e,t,A,i,a]=r.trim().split(/[-: ]/g).map(Number),l=new Date(n,e-1,t);return Number.isNaN(A)||Number.isNaN(i)||Number.isNaN(a)||(l.setHours(A),l.setMinutes(i),l.setSeconds(a)),Number.isNaN(+l)?r:l}}function x3(r){if(typeof r=="string")return r;let n=[];if(r[1]===0&&r[r.length-1]===0)for(let e=0;e<r.length;e+=2)n.push(f9(r[e+1],r[e]));else for(let e=0;e<r.length;e+=2)n.push(f9(r[e],r[e+1]));return y1(String.fromCodePoint(...n))}function f9(r,n){return r<<8|n}q3.set(41992,P7),q3.set(41993,P7),q3.set(41994,P7),I2(h1,["ifd0","ifd1"],[[50827,function(r){return typeof r!="string"?F4(r):r}],[306,H7],[40091,x3],[40092,x3],[40093,x3],[40094,x3],[40095,x3]]),I2(h1,"exif",[[40960,I9],[36864,I9],[36867,H7],[36868,H7],[40962,o9],[40963,o9]]),I2(h1,"gps",[[0,r=>Array.from(r).join(".")],[7,r=>Array.from(r).join(":")]]);class J7 extends X2{static canHandle(n,e){return n.getUint8(e+1)===225&&n.getUint32(e+4)===1752462448&&n.getString(e+4,20)==="http://ns.adobe.com/"}static headerLength(n,e){return n.getString(e+4,34)==="http://ns.adobe.com/xmp/extension/"?79:33}static findPosition(n,e){let t=super.findPosition(n,e);return t.multiSegment=t.extended=t.headerLength===79,t.multiSegment?(t.chunkCount=n.getUint8(e+72),t.chunkNumber=n.getUint8(e+76),n.getUint8(e+77)!==0&&t.chunkNumber++):(t.chunkCount=1/0,t.chunkNumber=-1),t}static handleMultiSegments(n){return n.map((e=>e.chunk.getString())).join("")}normalizeInput(n){return typeof n=="string"?n:S2.from(n).getString()}parse(n=this.chunk){if(!this.localOptions.parse)return n;n=(function(i){let a={},l={};for(let c of s9)a[c]=[],l[c]=0;return i.replace(Oi,((c,o,f)=>{if(o==="<"){let E=++l[f];return a[f].push(E),`${c}#${E}`}return`${c}#${a[f].pop()}`}))})(n);let e=C3.findAll(n,"rdf","Description");e.length===0&&e.push(new C3("rdf","Description",void 0,n));let t,A={};for(let i of e)for(let a of i.properties)t=yi(a.ns,A),E9(a,t);return(function(i){let a;for(let l in i)a=i[l]=U0(i[l]),a===void 0&&delete i[l];return U0(i)})(A)}assignToOutput(n,e){if(this.localOptions.parse)for(let[t,A]of Object.entries(e))switch(t){case"tiff":this.assignObjectToOutput(n,"ifd0",A);break;case"exif":this.assignObjectToOutput(n,"exif",A);break;case"xmlns":break;default:this.assignObjectToOutput(n,t,A)}else n.xmp=e}}O(J7,"type","xmp"),O(J7,"multiSegment",!0),E2.set("xmp",J7);class x0{static findAll(n){return C9(n,/([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)=("[^"]*"|'[^']*')/gm).map(x0.unpackMatch)}static unpackMatch(n){let e=n[1],t=n[2],A=n[3].slice(1,-1);return A=u9(A),new x0(e,t,A)}constructor(n,e,t){this.ns=n,this.name=e,this.value=t}serialize(){return this.value}}class C3{static findAll(n,e,t){if(e!==void 0||t!==void 0){e=e||"[\\w\\d-]+",t=t||"[\\w\\d-]+";var A=new RegExp(`<(${e}):(${t})(#\\d+)?((\\s+?[\\w\\d-:]+=("[^"]*"|'[^']*'))*\\s*)(\\/>|>([\\s\\S]*?)<\\/\\1:\\2\\3>)`,"gm")}else A=/<([\w\d-]+):([\w\d-]+)(#\d+)?((\s+?[\w\d-:]+=("[^"]*"|'[^']*'))*\s*)(\/>|>([\s\S]*?)<\/\1:\2\3>)/gm;return C9(n,A).map(C3.unpackMatch)}static unpackMatch(n){let e=n[1],t=n[2],A=n[4],i=n[8];return new C3(e,t,A,i)}constructor(n,e,t,A){this.ns=n,this.name=e,this.attrString=t,this.innerXml=A,this.attrs=x0.findAll(t),this.children=C3.findAll(A),this.value=this.children.length===0?u9(A):void 0,this.properties=[...this.attrs,...this.children]}get isPrimitive(){return this.value!==void 0&&this.attrs.length===0&&this.children.length===0}get isListContainer(){return this.children.length===1&&this.children[0].isList}get isList(){let{ns:n,name:e}=this;return n==="rdf"&&(e==="Seq"||e==="Bag"||e==="Alt")}get isListItem(){return this.ns==="rdf"&&this.name==="li"}serialize(){if(this.properties.length===0&&this.value===void 0)return;if(this.isPrimitive)return this.value;if(this.isListContainer)return this.children[0].serialize();if(this.isList)return ji(this.children.map(ki));if(this.isListItem&&this.children.length===1&&this.attrs.length===0)return this.children[0].serialize();let n={};for(let e of this.properties)E9(e,n);return this.value!==void 0&&(n.value=this.value),U0(n)}}function E9(r,n){let e=r.serialize();e!==void 0&&(n[r.name]=e)}var ki=r=>r.serialize(),ji=r=>r.length===1?r[0]:r,yi=(r,n)=>n[r]?n[r]:n[r]={};function C9(r,n){let e,t=[];if(!r)return t;for(;(e=n.exec(r))!==null;)t.push(e);return t}function u9(r){if((function(t){return t==null||t==="null"||t==="undefined"||t===""||t.trim()===""})(r))return;let n=Number(r);if(!Number.isNaN(n))return n;let e=r.toLowerCase();return e==="true"||e!=="false"&&r.trim()}const s9=["rdf:li","rdf:Seq","rdf:Bag","rdf:Alt","rdf:Description"],Oi=new RegExp(`(<|\\/)(${s9.join("|")})`,"g");var Wi=Object.freeze({__proto__:null,default:qi,Exifr:R1,fileParsers:r1,segmentParsers:E2,fileReaders:A1,tagKeys:d2,tagValues:T2,tagRevivers:h1,createDictionary:I2,extendDictionary:T1,fetchUrlAsArrayBuffer:O1,readBlobAsArrayBuffer:W1,chunkedProps:z1,otherSegments:f3,segments:X1,tiffBlocks:a2,segmentsAndBlocks:g1,tiffExtractables:Q1,inheritables:E3,allFormatters:Z1,Options:G1,parse:V0,gpsOnlyOptions:O7,gps:e9,thumbnailOnlyOptions:W7,thumbnail:t9,thumbnailUrl:n9,orientationOnlyOptions:T7,orientation:X7,rotations:G7,get rotateCanvas(){return P1},get rotateCss(){return H1},rotation:r9});let d9=B0("fs",(r=>r.promises));A1.set("fs",class extends q0{async readWhole(){this.chunked=!1,this.fs=await d9;let r=await this.fs.readFile(this.input);this._swapBuffer(r)}async readChunked(){this.chunked=!0,this.fs=await d9,await this.open(),await this.readChunk(0,this.options.firstChunkSize)}async open(){this.fh===void 0&&(this.fh=await this.fs.open(this.input,"r"),this.size=(await this.fh.stat(this.input)).size)}async _readChunk(r,n){this.fh===void 0&&await this.open(),r+n>this.size&&(n=this.size-r);var e=this.subarray(r,n,!0);return await this.fh.read(e.dataView,0,n,r),e}async close(){if(this.fh){let r=this.fh;this.fh=void 0,await r.close()}}}),A1.set("base64",class extends q0{constructor(...r){super(...r),this.input=this.input.replace(/^data:([^;]+);base64,/gim,""),this.size=this.input.length/4*3,this.input.endsWith("==")?this.size-=2:this.input.endsWith("=")&&(this.size-=1)}async _readChunk(r,n){let e,t,A=this.input;r===void 0?(r=0,e=0,t=0):(e=4*Math.floor(r/3),t=r-e/4*3),n===void 0&&(n=this.size);let i=r+n,a=e+4*Math.ceil(i/3);A=A.slice(e,a);let l=Math.min(n,this.size-r);if(S0){let c=R0.from(A,"base64").slice(t,t+l);return this.set(c,r,!0)}{let c=this.subarray(r,l,!0),o=atob(A),f=c.toUint8();for(let E=0;E<l;E++)f[E]=o.charCodeAt(t+E);return c}}});class M9 extends K0{static canHandle(n,e){return e===18761||e===19789}extendOptions(n){let{ifd0:e,xmp:t,iptc:A,icc:i}=n;t.enabled&&e.deps.add(700),A.enabled&&e.deps.add(33723),i.enabled&&e.deps.add(34675),e.finalizeFilters()}async parse(){let{tiff:n,xmp:e,iptc:t,icc:A}=this.options;if(n.enabled||e.enabled||t.enabled||A.enabled){let i=Math.max(U7(this.options),this.options.chunkSize);await this.file.ensureChunk(0,i),this.createParser("tiff",this.file),this.parsers.tiff.parseHeader(),await this.parsers.tiff.parseIfd0Block(),this.adaptTiffPropAsSegment("xmp"),this.adaptTiffPropAsSegment("iptc"),this.adaptTiffPropAsSegment("icc")}}adaptTiffPropAsSegment(n){if(this.parsers.tiff[n]){let e=this.parsers.tiff[n];this.injectSegment(n,e)}}}O(M9,"type","tiff"),r1.set("tiff",M9);let Ti=B0("zlib");const Xi=["ihdr","iccp","text","itxt","exif"];class m9 extends K0{constructor(...n){super(...n),O(this,"catchError",(e=>this.errors.push(e))),O(this,"metaChunks",[]),O(this,"unknownChunks",[])}static canHandle(n,e){return e===35152&&n.getUint32(0)===2303741511&&n.getUint32(4)===218765834}async parse(){let{file:n}=this;await this.findPngChunksInRange(8,n.byteLength),await this.readSegments(this.metaChunks),this.findIhdr(),this.parseTextChunks(),await this.findExif().catch(this.catchError),await this.findXmp().catch(this.catchError),await this.findIcc().catch(this.catchError)}async findPngChunksInRange(n,e){let{file:t}=this;for(;n<e;){let A=t.getUint32(n),i=t.getUint32(n+4),a=t.getString(n+4,4).toLowerCase(),l=A+4+4+4,c={type:a,offset:n,length:l,start:n+4+4,size:A,marker:i};Xi.includes(a)?this.metaChunks.push(c):this.unknownChunks.push(c),n+=l}}parseTextChunks(){let n=this.metaChunks.filter((e=>e.type==="text"));for(let e of n){let[t,A]=this.file.getString(e.start,e.size).split("\0");this.injectKeyValToIhdr(t,A)}}injectKeyValToIhdr(n,e){let t=this.parsers.ihdr;t&&t.raw.set(n,e)}findIhdr(){let n=this.metaChunks.find((e=>e.type==="ihdr"));n&&this.options.ihdr.enabled!==!1&&this.createParser("ihdr",n.chunk)}async findExif(){let n=this.metaChunks.find((e=>e.type==="exif"));n&&this.injectSegment("tiff",n.chunk)}async findXmp(){let n=this.metaChunks.filter((e=>e.type==="itxt"));for(let e of n)e.chunk.getString(0,17)==="XML:com.adobe.xmp"&&this.injectSegment("xmp",e.chunk)}async findIcc(){let n=this.metaChunks.find((l=>l.type==="iccp"));if(!n)return;let{chunk:e}=n,t=e.getUint8Array(0,81),A=0;for(;A<80&&t[A]!==0;)A++;let i=A+2,a=e.getString(0,A);if(this.injectKeyValToIhdr("ProfileName",a),Z0){let l=await Ti,c=e.getUint8Array(i);c=l.inflateSync(c),this.injectSegment("icc",c)}}}O(m9,"type","png"),r1.set("png",m9),I2(d2,"interop",[[1,"InteropIndex"],[2,"InteropVersion"],[4096,"RelatedImageFileFormat"],[4097,"RelatedImageWidth"],[4098,"RelatedImageHeight"]]),T1(d2,"ifd0",[[11,"ProcessingSoftware"],[254,"SubfileType"],[255,"OldSubfileType"],[263,"Thresholding"],[264,"CellWidth"],[265,"CellLength"],[266,"FillOrder"],[269,"DocumentName"],[280,"MinSampleValue"],[281,"MaxSampleValue"],[285,"PageName"],[286,"XPosition"],[287,"YPosition"],[290,"GrayResponseUnit"],[297,"PageNumber"],[321,"HalftoneHints"],[322,"TileWidth"],[323,"TileLength"],[332,"InkSet"],[337,"TargetPrinter"],[18246,"Rating"],[18249,"RatingPercent"],[33550,"PixelScale"],[34264,"ModelTransform"],[34377,"PhotoshopSettings"],[50706,"DNGVersion"],[50707,"DNGBackwardVersion"],[50708,"UniqueCameraModel"],[50709,"LocalizedCameraModel"],[50736,"DNGLensInfo"],[50739,"ShadowScale"],[50740,"DNGPrivateData"],[33920,"IntergraphMatrix"],[33922,"ModelTiePoint"],[34118,"SEMInfo"],[34735,"GeoTiffDirectory"],[34736,"GeoTiffDoubleParams"],[34737,"GeoTiffAsciiParams"],[50341,"PrintIM"],[50721,"ColorMatrix1"],[50722,"ColorMatrix2"],[50723,"CameraCalibration1"],[50724,"CameraCalibration2"],[50725,"ReductionMatrix1"],[50726,"ReductionMatrix2"],[50727,"AnalogBalance"],[50728,"AsShotNeutral"],[50729,"AsShotWhiteXY"],[50730,"BaselineExposure"],[50731,"BaselineNoise"],[50732,"BaselineSharpness"],[50734,"LinearResponseLimit"],[50735,"CameraSerialNumber"],[50741,"MakerNoteSafety"],[50778,"CalibrationIlluminant1"],[50779,"CalibrationIlluminant2"],[50781,"RawDataUniqueID"],[50827,"OriginalRawFileName"],[50828,"OriginalRawFileData"],[50831,"AsShotICCProfile"],[50832,"AsShotPreProfileMatrix"],[50833,"CurrentICCProfile"],[50834,"CurrentPreProfileMatrix"],[50879,"ColorimetricReference"],[50885,"SRawType"],[50898,"PanasonicTitle"],[50899,"PanasonicTitle2"],[50931,"CameraCalibrationSig"],[50932,"ProfileCalibrationSig"],[50933,"ProfileIFD"],[50934,"AsShotProfileName"],[50936,"ProfileName"],[50937,"ProfileHueSatMapDims"],[50938,"ProfileHueSatMapData1"],[50939,"ProfileHueSatMapData2"],[50940,"ProfileToneCurve"],[50941,"ProfileEmbedPolicy"],[50942,"ProfileCopyright"],[50964,"ForwardMatrix1"],[50965,"ForwardMatrix2"],[50966,"PreviewApplicationName"],[50967,"PreviewApplicationVersion"],[50968,"PreviewSettingsName"],[50969,"PreviewSettingsDigest"],[50970,"PreviewColorSpace"],[50971,"PreviewDateTime"],[50972,"RawImageDigest"],[50973,"OriginalRawFileDigest"],[50981,"ProfileLookTableDims"],[50982,"ProfileLookTableData"],[51043,"TimeCodes"],[51044,"FrameRate"],[51058,"TStop"],[51081,"ReelName"],[51089,"OriginalDefaultFinalSize"],[51090,"OriginalBestQualitySize"],[51091,"OriginalDefaultCropSize"],[51105,"CameraLabel"],[51107,"ProfileHueSatMapEncoding"],[51108,"ProfileLookTableEncoding"],[51109,"BaselineExposureOffset"],[51110,"DefaultBlackRender"],[51111,"NewRawImageDigest"],[51112,"RawToPreviewGain"]]);let p9=[[273,"StripOffsets"],[279,"StripByteCounts"],[288,"FreeOffsets"],[289,"FreeByteCounts"],[291,"GrayResponseCurve"],[292,"T4Options"],[293,"T6Options"],[300,"ColorResponseUnit"],[320,"ColorMap"],[324,"TileOffsets"],[325,"TileByteCounts"],[326,"BadFaxLines"],[327,"CleanFaxData"],[328,"ConsecutiveBadFaxLines"],[330,"SubIFD"],[333,"InkNames"],[334,"NumberofInks"],[336,"DotRange"],[338,"ExtraSamples"],[339,"SampleFormat"],[340,"SMinSampleValue"],[341,"SMaxSampleValue"],[342,"TransferRange"],[343,"ClipPath"],[344,"XClipPathUnits"],[345,"YClipPathUnits"],[346,"Indexed"],[347,"JPEGTables"],[351,"OPIProxy"],[400,"GlobalParametersIFD"],[401,"ProfileType"],[402,"FaxProfile"],[403,"CodingMethods"],[404,"VersionYear"],[405,"ModeNumber"],[433,"Decode"],[434,"DefaultImageColor"],[435,"T82Options"],[437,"JPEGTables"],[512,"JPEGProc"],[515,"JPEGRestartInterval"],[517,"JPEGLosslessPredictors"],[518,"JPEGPointTransforms"],[519,"JPEGQTables"],[520,"JPEGDCTables"],[521,"JPEGACTables"],[559,"StripRowCounts"],[999,"USPTOMiscellaneous"],[18247,"XP_DIP_XML"],[18248,"StitchInfo"],[28672,"SonyRawFileType"],[28688,"SonyToneCurve"],[28721,"VignettingCorrection"],[28722,"VignettingCorrParams"],[28724,"ChromaticAberrationCorrection"],[28725,"ChromaticAberrationCorrParams"],[28726,"DistortionCorrection"],[28727,"DistortionCorrParams"],[29895,"SonyCropTopLeft"],[29896,"SonyCropSize"],[32781,"ImageID"],[32931,"WangTag1"],[32932,"WangAnnotation"],[32933,"WangTag3"],[32934,"WangTag4"],[32953,"ImageReferencePoints"],[32954,"RegionXformTackPoint"],[32955,"WarpQuadrilateral"],[32956,"AffineTransformMat"],[32995,"Matteing"],[32996,"DataType"],[32997,"ImageDepth"],[32998,"TileDepth"],[33300,"ImageFullWidth"],[33301,"ImageFullHeight"],[33302,"TextureFormat"],[33303,"WrapModes"],[33304,"FovCot"],[33305,"MatrixWorldToScreen"],[33306,"MatrixWorldToCamera"],[33405,"Model2"],[33421,"CFARepeatPatternDim"],[33422,"CFAPattern2"],[33423,"BatteryLevel"],[33424,"KodakIFD"],[33445,"MDFileTag"],[33446,"MDScalePixel"],[33447,"MDColorTable"],[33448,"MDLabName"],[33449,"MDSampleInfo"],[33450,"MDPrepDate"],[33451,"MDPrepTime"],[33452,"MDFileUnits"],[33589,"AdventScale"],[33590,"AdventRevision"],[33628,"UIC1Tag"],[33629,"UIC2Tag"],[33630,"UIC3Tag"],[33631,"UIC4Tag"],[33918,"IntergraphPacketData"],[33919,"IntergraphFlagRegisters"],[33921,"INGRReserved"],[34016,"Site"],[34017,"ColorSequence"],[34018,"IT8Header"],[34019,"RasterPadding"],[34020,"BitsPerRunLength"],[34021,"BitsPerExtendedRunLength"],[34022,"ColorTable"],[34023,"ImageColorIndicator"],[34024,"BackgroundColorIndicator"],[34025,"ImageColorValue"],[34026,"BackgroundColorValue"],[34027,"PixelIntensityRange"],[34028,"TransparencyIndicator"],[34029,"ColorCharacterization"],[34030,"HCUsage"],[34031,"TrapIndicator"],[34032,"CMYKEquivalent"],[34152,"AFCP_IPTC"],[34232,"PixelMagicJBIGOptions"],[34263,"JPLCartoIFD"],[34306,"WB_GRGBLevels"],[34310,"LeafData"],[34687,"TIFF_FXExtensions"],[34688,"MultiProfiles"],[34689,"SharedData"],[34690,"T88Options"],[34732,"ImageLayer"],[34750,"JBIGOptions"],[34856,"Opto-ElectricConvFactor"],[34857,"Interlace"],[34908,"FaxRecvParams"],[34909,"FaxSubAddress"],[34910,"FaxRecvTime"],[34929,"FedexEDR"],[34954,"LeafSubIFD"],[37387,"FlashEnergy"],[37388,"SpatialFrequencyResponse"],[37389,"Noise"],[37390,"FocalPlaneXResolution"],[37391,"FocalPlaneYResolution"],[37392,"FocalPlaneResolutionUnit"],[37397,"ExposureIndex"],[37398,"TIFF-EPStandardID"],[37399,"SensingMethod"],[37434,"CIP3DataFile"],[37435,"CIP3Sheet"],[37436,"CIP3Side"],[37439,"StoNits"],[37679,"MSDocumentText"],[37680,"MSPropertySetStorage"],[37681,"MSDocumentTextPosition"],[37724,"ImageSourceData"],[40965,"InteropIFD"],[40976,"SamsungRawPointersOffset"],[40977,"SamsungRawPointersLength"],[41217,"SamsungRawByteOrder"],[41218,"SamsungRawUnknown"],[41484,"SpatialFrequencyResponse"],[41485,"Noise"],[41489,"ImageNumber"],[41490,"SecurityClassification"],[41491,"ImageHistory"],[41494,"TIFF-EPStandardID"],[41995,"DeviceSettingDescription"],[42112,"GDALMetadata"],[42113,"GDALNoData"],[44992,"ExpandSoftware"],[44993,"ExpandLens"],[44994,"ExpandFilm"],[44995,"ExpandFilterLens"],[44996,"ExpandScanner"],[44997,"ExpandFlashLamp"],[46275,"HasselbladRawImage"],[48129,"PixelFormat"],[48130,"Transformation"],[48131,"Uncompressed"],[48132,"ImageType"],[48256,"ImageWidth"],[48257,"ImageHeight"],[48258,"WidthResolution"],[48259,"HeightResolution"],[48320,"ImageOffset"],[48321,"ImageByteCount"],[48322,"AlphaOffset"],[48323,"AlphaByteCount"],[48324,"ImageDataDiscard"],[48325,"AlphaDataDiscard"],[50215,"OceScanjobDesc"],[50216,"OceApplicationSelector"],[50217,"OceIDNumber"],[50218,"OceImageLogic"],[50255,"Annotations"],[50459,"HasselbladExif"],[50547,"OriginalFileName"],[50560,"USPTOOriginalContentType"],[50656,"CR2CFAPattern"],[50710,"CFAPlaneColor"],[50711,"CFALayout"],[50712,"LinearizationTable"],[50713,"BlackLevelRepeatDim"],[50714,"BlackLevel"],[50715,"BlackLevelDeltaH"],[50716,"BlackLevelDeltaV"],[50717,"WhiteLevel"],[50718,"DefaultScale"],[50719,"DefaultCropOrigin"],[50720,"DefaultCropSize"],[50733,"BayerGreenSplit"],[50737,"ChromaBlurRadius"],[50738,"AntiAliasStrength"],[50752,"RawImageSegmentation"],[50780,"BestQualityScale"],[50784,"AliasLayerMetadata"],[50829,"ActiveArea"],[50830,"MaskedAreas"],[50935,"NoiseReductionApplied"],[50974,"SubTileBlockSize"],[50975,"RowInterleaveFactor"],[51008,"OpcodeList1"],[51009,"OpcodeList2"],[51022,"OpcodeList3"],[51041,"NoiseProfile"],[51114,"CacheVersion"],[51125,"DefaultUserCrop"],[51157,"NikonNEFInfo"],[65024,"KdcIFD"]];T1(d2,"ifd0",p9),T1(d2,"exif",p9),I2(T2,"gps",[[23,{M:"Magnetic North",T:"True North"}],[25,{K:"Kilometers",M:"Miles",N:"Nautical Miles"}]]);class F7 extends X2{static canHandle(n,e){return n.getUint8(e+1)===224&&n.getUint32(e+4)===1246120262&&n.getUint8(e+8)===0}parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint16(0)],[2,this.chunk.getUint8(2)],[3,this.chunk.getUint16(3)],[5,this.chunk.getUint16(5)],[7,this.chunk.getUint8(7)],[8,this.chunk.getUint8(8)]])}}O(F7,"type","jfif"),O(F7,"headerLength",9),E2.set("jfif",F7),I2(d2,"jfif",[[0,"JFIFVersion"],[2,"ResolutionUnit"],[3,"XResolution"],[5,"YResolution"],[7,"ThumbnailWidth"],[8,"ThumbnailHeight"]]);class v9 extends X2{parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint32(0)],[4,this.chunk.getUint32(4)],[8,this.chunk.getUint8(8)],[9,this.chunk.getUint8(9)],[10,this.chunk.getUint8(10)],[11,this.chunk.getUint8(11)],[12,this.chunk.getUint8(12)],...Array.from(this.raw)])}}O(v9,"type","ihdr"),E2.set("ihdr",v9),I2(d2,"ihdr",[[0,"ImageWidth"],[4,"ImageHeight"],[8,"BitDepth"],[9,"ColorType"],[10,"Compression"],[11,"Filter"],[12,"Interlace"]]),I2(T2,"ihdr",[[9,{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha",DEFAULT:"Unknown"}],[10,{0:"Deflate/Inflate",DEFAULT:"Unknown"}],[11,{0:"Adaptive",DEFAULT:"Unknown"}],[12,{0:"Noninterlaced",1:"Adam7 Interlace",DEFAULT:"Unknown"}]]);class k0 extends X2{static canHandle(n,e){return n.getUint8(e+1)===226&&n.getUint32(e+4)===1229144927}static findPosition(n,e){let t=super.findPosition(n,e);return t.chunkNumber=n.getUint8(e+16),t.chunkCount=n.getUint8(e+17),t.multiSegment=t.chunkCount>1,t}static handleMultiSegments(n){return(function(e){let t=(function(A){let i=A[0].constructor,a=0;for(let o of A)a+=o.length;let l=new i(a),c=0;for(let o of A)l.set(o,c),c+=o.length;return l})(e.map((A=>A.chunk.toUint8())));return new S2(t)})(n)}parse(){return this.raw=new Map,this.parseHeader(),this.parseTags(),this.translate(),this.output}parseHeader(){let{raw:n}=this;this.chunk.byteLength<84&&f2("ICC header is too short");for(let[e,t]of Object.entries(Gi)){e=parseInt(e,10);let A=t(this.chunk,e);A!=="\0\0\0\0"&&n.set(e,A)}}parseTags(){let n,e,t,A,i,{raw:a}=this,l=this.chunk.getUint32(128),c=132,o=this.chunk.byteLength;for(;l--;){if(n=this.chunk.getString(c,4),e=this.chunk.getUint32(c+4),t=this.chunk.getUint32(c+8),A=this.chunk.getString(e,4),e+t>o)return void console.warn("reached the end of the first ICC chunk. Enable options.tiff.multiSegment to read all ICC segments.");i=this.parseTag(A,e,t),i!==void 0&&i!=="\0\0\0\0"&&a.set(n,i),c+=12}}parseTag(n,e,t){switch(n){case"desc":return this.parseDesc(e);case"mluc":return this.parseMluc(e);case"text":return this.parseText(e,t);case"sig ":return this.parseSig(e)}if(!(e+t>this.chunk.byteLength))return this.chunk.getUint8Array(e,t)}parseDesc(n){let e=this.chunk.getUint32(n+8)-1;return y1(this.chunk.getString(n+12,e))}parseText(n,e){return y1(this.chunk.getString(n+8,e-8))}parseSig(n){return y1(this.chunk.getString(n+8,4))}parseMluc(n){let{chunk:e}=this,t=e.getUint32(n+8),A=e.getUint32(n+12),i=n+16,a=[];for(let l=0;l<t;l++){let c=e.getString(i+0,2),o=e.getString(i+2,2),f=e.getUint32(i+4),E=e.getUint32(i+8)+n,u=y1(e.getUnicodeString(E,f));a.push({lang:c,country:o,text:u}),i+=A}return t===1?a[0].text:a}translateValue(n,e){return typeof n=="string"?e[n]||e[n.toLowerCase()]||n:e[n]||n}}O(k0,"type","icc"),O(k0,"multiSegment",!0),O(k0,"headerLength",18);const Gi={4:C1,8:function(r,n){return[r.getUint8(n),r.getUint8(n+1)>>4,r.getUint8(n+1)%16].map((e=>e.toString(10))).join(".")},12:C1,16:C1,20:C1,24:function(r,n){const e=r.getUint16(n),t=r.getUint16(n+2)-1,A=r.getUint16(n+4),i=r.getUint16(n+6),a=r.getUint16(n+8),l=r.getUint16(n+10);return new Date(Date.UTC(e,t,A,i,a,l))},36:C1,40:C1,48:C1,52:C1,64:(r,n)=>r.getUint32(n),80:C1};function C1(r,n){return y1(r.getString(n,4))}E2.set("icc",k0),I2(d2,"icc",[[4,"ProfileCMMType"],[8,"ProfileVersion"],[12,"ProfileClass"],[16,"ColorSpaceData"],[20,"ProfileConnectionSpace"],[24,"ProfileDateTime"],[36,"ProfileFileSignature"],[40,"PrimaryPlatform"],[44,"CMMFlags"],[48,"DeviceManufacturer"],[52,"DeviceModel"],[56,"DeviceAttributes"],[64,"RenderingIntent"],[68,"ConnectionSpaceIlluminant"],[80,"ProfileCreator"],[84,"ProfileID"],["Header","ProfileHeader"],["MS00","WCSProfiles"],["bTRC","BlueTRC"],["bXYZ","BlueMatrixColumn"],["bfd","UCRBG"],["bkpt","MediaBlackPoint"],["calt","CalibrationDateTime"],["chad","ChromaticAdaptation"],["chrm","Chromaticity"],["ciis","ColorimetricIntentImageState"],["clot","ColorantTableOut"],["clro","ColorantOrder"],["clrt","ColorantTable"],["cprt","ProfileCopyright"],["crdi","CRDInfo"],["desc","ProfileDescription"],["devs","DeviceSettings"],["dmdd","DeviceModelDesc"],["dmnd","DeviceMfgDesc"],["dscm","ProfileDescriptionML"],["fpce","FocalPlaneColorimetryEstimates"],["gTRC","GreenTRC"],["gXYZ","GreenMatrixColumn"],["gamt","Gamut"],["kTRC","GrayTRC"],["lumi","Luminance"],["meas","Measurement"],["meta","Metadata"],["mmod","MakeAndModel"],["ncl2","NamedColor2"],["ncol","NamedColor"],["ndin","NativeDisplayInfo"],["pre0","Preview0"],["pre1","Preview1"],["pre2","Preview2"],["ps2i","PS2RenderingIntent"],["ps2s","PostScript2CSA"],["psd0","PostScript2CRD0"],["psd1","PostScript2CRD1"],["psd2","PostScript2CRD2"],["psd3","PostScript2CRD3"],["pseq","ProfileSequenceDesc"],["psid","ProfileSequenceIdentifier"],["psvm","PS2CRDVMSize"],["rTRC","RedTRC"],["rXYZ","RedMatrixColumn"],["resp","OutputResponse"],["rhoc","ReflectionHardcopyOrigColorimetry"],["rig0","PerceptualRenderingIntentGamut"],["rig2","SaturationRenderingIntentGamut"],["rpoc","ReflectionPrintOutputColorimetry"],["sape","SceneAppearanceEstimates"],["scoe","SceneColorimetryEstimates"],["scrd","ScreeningDesc"],["scrn","Screening"],["targ","CharTarget"],["tech","Technology"],["vcgt","VideoCardGamma"],["view","ViewingConditions"],["vued","ViewingCondDesc"],["wtpt","MediaWhitePoint"]]);const j0={"4d2p":"Erdt Systems",AAMA:"Aamazing Technologies",ACER:"Acer",ACLT:"Acolyte Color Research",ACTI:"Actix Sytems",ADAR:"Adara Technology",ADBE:"Adobe",ADI:"ADI Systems",AGFA:"Agfa Graphics",ALMD:"Alps Electric",ALPS:"Alps Electric",ALWN:"Alwan Color Expertise",AMTI:"Amiable Technologies",AOC:"AOC International",APAG:"Apago",APPL:"Apple Computer",AST:"AST","AT&T":"AT&T",BAEL:"BARBIERI electronic",BRCO:"Barco NV",BRKP:"Breakpoint",BROT:"Brother",BULL:"Bull",BUS:"Bus Computer Systems","C-IT":"C-Itoh",CAMR:"Intel",CANO:"Canon",CARR:"Carroll Touch",CASI:"Casio",CBUS:"Colorbus PL",CEL:"Crossfield",CELx:"Crossfield",CGS:"CGS Publishing Technologies International",CHM:"Rochester Robotics",CIGL:"Colour Imaging Group, London",CITI:"Citizen",CL00:"Candela",CLIQ:"Color IQ",CMCO:"Chromaco",CMiX:"CHROMiX",COLO:"Colorgraphic Communications",COMP:"Compaq",COMp:"Compeq/Focus Technology",CONR:"Conrac Display Products",CORD:"Cordata Technologies",CPQ:"Compaq",CPRO:"ColorPro",CRN:"Cornerstone",CTX:"CTX International",CVIS:"ColorVision",CWC:"Fujitsu Laboratories",DARI:"Darius Technology",DATA:"Dataproducts",DCP:"Dry Creek Photo",DCRC:"Digital Contents Resource Center, Chung-Ang University",DELL:"Dell Computer",DIC:"Dainippon Ink and Chemicals",DICO:"Diconix",DIGI:"Digital","DL&C":"Digital Light & Color",DPLG:"Doppelganger",DS:"Dainippon Screen",DSOL:"DOOSOL",DUPN:"DuPont",EPSO:"Epson",ESKO:"Esko-Graphics",ETRI:"Electronics and Telecommunications Research Institute",EVER:"Everex Systems",EXAC:"ExactCODE",Eizo:"Eizo",FALC:"Falco Data Products",FF:"Fuji Photo Film",FFEI:"FujiFilm Electronic Imaging",FNRD:"Fnord Software",FORA:"Fora",FORE:"Forefront Technology",FP:"Fujitsu",FPA:"WayTech Development",FUJI:"Fujitsu",FX:"Fuji Xerox",GCC:"GCC Technologies",GGSL:"Global Graphics Software",GMB:"Gretagmacbeth",GMG:"GMG",GOLD:"GoldStar Technology",GOOG:"Google",GPRT:"Giantprint",GTMB:"Gretagmacbeth",GVC:"WayTech Development",GW2K:"Sony",HCI:"HCI",HDM:"Heidelberger Druckmaschinen",HERM:"Hermes",HITA:"Hitachi America",HP:"Hewlett-Packard",HTC:"Hitachi",HiTi:"HiTi Digital",IBM:"IBM",IDNT:"Scitex",IEC:"Hewlett-Packard",IIYA:"Iiyama North America",IKEG:"Ikegami Electronics",IMAG:"Image Systems",IMI:"Ingram Micro",INTC:"Intel",INTL:"N/A (INTL)",INTR:"Intra Electronics",IOCO:"Iocomm International Technology",IPS:"InfoPrint Solutions Company",IRIS:"Scitex",ISL:"Ichikawa Soft Laboratory",ITNL:"N/A (ITNL)",IVM:"IVM",IWAT:"Iwatsu Electric",Idnt:"Scitex",Inca:"Inca Digital Printers",Iris:"Scitex",JPEG:"Joint Photographic Experts Group",JSFT:"Jetsoft Development",JVC:"JVC Information Products",KART:"Scitex",KFC:"KFC Computek Components",KLH:"KLH Computers",KMHD:"Konica Minolta",KNCA:"Konica",KODA:"Kodak",KYOC:"Kyocera",Kart:"Scitex",LCAG:"Leica",LCCD:"Leeds Colour",LDAK:"Left Dakota",LEAD:"Leading Technology",LEXM:"Lexmark International",LINK:"Link Computer",LINO:"Linotronic",LITE:"Lite-On",Leaf:"Leaf",Lino:"Linotronic",MAGC:"Mag Computronic",MAGI:"MAG Innovision",MANN:"Mannesmann",MICN:"Micron Technology",MICR:"Microtek",MICV:"Microvitec",MINO:"Minolta",MITS:"Mitsubishi Electronics America",MITs:"Mitsuba",MNLT:"Minolta",MODG:"Modgraph",MONI:"Monitronix",MONS:"Monaco Systems",MORS:"Morse Technology",MOTI:"Motive Systems",MSFT:"Microsoft",MUTO:"MUTOH INDUSTRIES",Mits:"Mitsubishi Electric",NANA:"NANAO",NEC:"NEC",NEXP:"NexPress Solutions",NISS:"Nissei Sangyo America",NKON:"Nikon",NONE:"none",OCE:"Oce Technologies",OCEC:"OceColor",OKI:"Oki",OKID:"Okidata",OKIP:"Okidata",OLIV:"Olivetti",OLYM:"Olympus",ONYX:"Onyx Graphics",OPTI:"Optiquest",PACK:"Packard Bell",PANA:"Matsushita Electric Industrial",PANT:"Pantone",PBN:"Packard Bell",PFU:"PFU",PHIL:"Philips Consumer Electronics",PNTX:"HOYA",POne:"Phase One A/S",PREM:"Premier Computer Innovations",PRIN:"Princeton Graphic Systems",PRIP:"Princeton Publishing Labs",QLUX:"Hong Kong",QMS:"QMS",QPCD:"QPcard AB",QUAD:"QuadLaser",QUME:"Qume",RADI:"Radius",RDDx:"Integrated Color Solutions",RDG:"Roland DG",REDM:"REDMS Group",RELI:"Relisys",RGMS:"Rolf Gierling Multitools",RICO:"Ricoh",RNLD:"Edmund Ronald",ROYA:"Royal",RPC:"Ricoh Printing Systems",RTL:"Royal Information Electronics",SAMP:"Sampo",SAMS:"Samsung",SANT:"Jaime Santana Pomares",SCIT:"Scitex",SCRN:"Dainippon Screen",SDP:"Scitex",SEC:"Samsung",SEIK:"Seiko Instruments",SEIk:"Seikosha",SGUY:"ScanGuy.com",SHAR:"Sharp Laboratories",SICC:"International Color Consortium",SONY:"Sony",SPCL:"SpectraCal",STAR:"Star",STC:"Sampo Technology",Scit:"Scitex",Sdp:"Scitex",Sony:"Sony",TALO:"Talon Technology",TAND:"Tandy",TATU:"Tatung",TAXA:"TAXAN America",TDS:"Tokyo Denshi Sekei",TECO:"TECO Information Systems",TEGR:"Tegra",TEKT:"Tektronix",TI:"Texas Instruments",TMKR:"TypeMaker",TOSB:"Toshiba",TOSH:"Toshiba",TOTK:"TOTOKU ELECTRIC",TRIU:"Triumph",TSBT:"Toshiba",TTX:"TTX Computer Products",TVM:"TVM Professional Monitor",TW:"TW Casper",ULSX:"Ulead Systems",UNIS:"Unisys",UTZF:"Utz Fehlau & Sohn",VARI:"Varityper",VIEW:"Viewsonic",VISL:"Visual communication",VIVO:"Vivo Mobile Communication",WANG:"Wang",WLBR:"Wilbur Imaging",WTG2:"Ware To Go",WYSE:"WYSE Technology",XERX:"Xerox",XRIT:"X-Rite",ZRAN:"Zoran",Zebr:"Zebra Technologies",appl:"Apple Computer",bICC:"basICColor",berg:"bergdesign",ceyd:"Integrated Color Solutions",clsp:"MacDermid ColorSpan",ds:"Dainippon Screen",dupn:"DuPont",ffei:"FujiFilm Electronic Imaging",flux:"FluxData",iris:"Scitex",kart:"Scitex",lcms:"Little CMS",lino:"Linotronic",none:"none",ob4d:"Erdt Systems",obic:"Medigraph",quby:"Qubyx Sarl",scit:"Scitex",scrn:"Dainippon Screen",sdp:"Scitex",siwi:"SIWI GRAFIKA",yxym:"YxyMaster"},h9={scnr:"Scanner",mntr:"Monitor",prtr:"Printer",link:"Device Link",abst:"Abstract",spac:"Color Space Conversion Profile",nmcl:"Named Color",cenc:"ColorEncodingSpace profile",mid:"MultiplexIdentification profile",mlnk:"MultiplexLink profile",mvis:"MultiplexVisualization profile",nkpf:"Nikon Input Device Profile (NON-STANDARD!)"};I2(T2,"icc",[[4,j0],[12,h9],[40,Object.assign({},j0,h9)],[48,j0],[80,j0],[64,{0:"Perceptual",1:"Relative Colorimetric",2:"Saturation",3:"Absolute Colorimetric"}],["tech",{amd:"Active Matrix Display",crt:"Cathode Ray Tube Display",kpcd:"Photo CD",pmd:"Passive Matrix Display",dcam:"Digital Camera",dcpj:"Digital Cinema Projector",dmpc:"Digital Motion Picture Camera",dsub:"Dye Sublimation Printer",epho:"Electrophotographic Printer",esta:"Electrostatic Printer",flex:"Flexography",fprn:"Film Writer",fscn:"Film Scanner",grav:"Gravure",ijet:"Ink Jet Printer",imgs:"Photo Image Setter",mpfr:"Motion Picture Film Recorder",mpfs:"Motion Picture Film Scanner",offs:"Offset Lithography",pjtv:"Projection Television",rpho:"Photographic Paper Printer",rscn:"Reflective Scanner",silk:"Silkscreen",twax:"Thermal Wax Printer",vidc:"Video Camera",vidm:"Video Monitor"}]]);class y0 extends X2{static canHandle(n,e,t){return n.getUint8(e+1)===237&&n.getString(e+4,9)==="Photoshop"&&this.containsIptc8bim(n,e,t)!==void 0}static headerLength(n,e,t){let A,i=this.containsIptc8bim(n,e,t);if(i!==void 0)return A=n.getUint8(e+i+7),A%2!=0&&(A+=1),A===0&&(A=4),i+8+A}static containsIptc8bim(n,e,t){for(let A=0;A<t;A++)if(this.isIptcSegmentHead(n,e+A))return A}static isIptcSegmentHead(n,e){return n.getUint8(e)===56&&n.getUint32(e)===943868237&&n.getUint16(e+4)===1028}parse(){let{raw:n}=this,e=this.chunk.byteLength-1,t=!1;for(let A=0;A<e;A++)if(this.chunk.getUint8(A)===28&&this.chunk.getUint8(A+1)===2){t=!0;let i=this.chunk.getUint16(A+3),a=this.chunk.getUint8(A+2),l=this.chunk.getLatin1String(A+5,i);n.set(a,this.pluralizeValue(n.get(a),l)),A+=4+i}else if(t)break;return this.translate(),this.output}pluralizeValue(n,e){return n!==void 0?n instanceof Array?(n.push(e),n):[n,e]:e}}O(y0,"type","iptc"),O(y0,"translateValues",!1),O(y0,"reviveValues",!1),E2.set("iptc",y0),I2(d2,"iptc",[[0,"ApplicationRecordVersion"],[3,"ObjectTypeReference"],[4,"ObjectAttributeReference"],[5,"ObjectName"],[7,"EditStatus"],[8,"EditorialUpdate"],[10,"Urgency"],[12,"SubjectReference"],[15,"Category"],[20,"SupplementalCategories"],[22,"FixtureIdentifier"],[25,"Keywords"],[26,"ContentLocationCode"],[27,"ContentLocationName"],[30,"ReleaseDate"],[35,"ReleaseTime"],[37,"ExpirationDate"],[38,"ExpirationTime"],[40,"SpecialInstructions"],[42,"ActionAdvised"],[45,"ReferenceService"],[47,"ReferenceDate"],[50,"ReferenceNumber"],[55,"DateCreated"],[60,"TimeCreated"],[62,"DigitalCreationDate"],[63,"DigitalCreationTime"],[65,"OriginatingProgram"],[70,"ProgramVersion"],[75,"ObjectCycle"],[80,"Byline"],[85,"BylineTitle"],[90,"City"],[92,"Sublocation"],[95,"State"],[100,"CountryCode"],[101,"Country"],[103,"OriginalTransmissionReference"],[105,"Headline"],[110,"Credit"],[115,"Source"],[116,"CopyrightNotice"],[118,"Contact"],[120,"Caption"],[121,"LocalCaption"],[122,"Writer"],[125,"RasterizedCaption"],[130,"ImageType"],[131,"ImageOrientation"],[135,"LanguageIdentifier"],[150,"AudioType"],[151,"AudioSamplingRate"],[152,"AudioSamplingResolution"],[153,"AudioDuration"],[154,"AudioOutcue"],[184,"JobID"],[185,"MasterDocumentID"],[186,"ShortDocumentID"],[187,"UniqueDocumentID"],[188,"OwnerID"],[200,"ObjectPreviewFileFormat"],[201,"ObjectPreviewFileVersion"],[202,"ObjectPreviewData"],[221,"Prefs"],[225,"ClassifyState"],[228,"SimilarityIndex"],[230,"DocumentNotes"],[231,"DocumentHistory"],[232,"ExifCameraInfo"],[255,"CatalogSets"]]),I2(T2,"iptc",[[10,{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"}],[75,{a:"Morning",b:"Both Morning and Evening",p:"Evening"}],[131,{L:"Landscape",P:"Portrait",S:"Square"}]]);const h2=[];for(let r=0;r<256;++r)h2.push((r+256).toString(16).slice(1));function Pi(r,n=0){return(h2[r[n+0]]+h2[r[n+1]]+h2[r[n+2]]+h2[r[n+3]]+"-"+h2[r[n+4]]+h2[r[n+5]]+"-"+h2[r[n+6]]+h2[r[n+7]]+"-"+h2[r[n+8]]+h2[r[n+9]]+"-"+h2[r[n+10]]+h2[r[n+11]]+h2[r[n+12]]+h2[r[n+13]]+h2[r[n+14]]+h2[r[n+15]]).toLowerCase()}let L7;const Hi=new Uint8Array(16);function Ji(){if(!L7){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");L7=crypto.getRandomValues.bind(crypto)}return L7(Hi)}const z9={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function w7(r,n,e){var A;if(z9.randomUUID&&!r)return z9.randomUUID();r=r||{};const t=r.random??((A=r.rng)==null?void 0:A.call(r))??Ji();if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=t[6]&15|64,t[8]=t[8]&63|128,Pi(t)}const Fi=async()=>new Promise(r=>{setTimeout(()=>{r({storageId:w7(),success:!0})},2500)}),Li=async()=>new Promise(r=>{setTimeout(()=>{r()},2500)}),g9=d.createContext({uploadFile:Fi,deleteFile:Li}),u3={itemWrapper:"_itemWrapper_1bl5e_7",title:"_title_1bl5e_20",filePreview:"_filePreview_1bl5e_24",subtitle:"_subtitle_1bl5e_43",fileData:"_fileData_1bl5e_47",buttonContainer:"_buttonContainer_1bl5e_59"},Q9=r=>r.startsWith("text")||r.endsWith("pdf")?"description":r.startsWith("image")?"image":r.endsWith("json")?"code_blocks":"anchor";function wi({file:r,t:n,onDeleteFile:e}){return I.jsxs(j,{className:u3.itemWrapper,children:[I.jsx(j,{className:u3.filePreview,children:r.thumbnailUri?I.jsx("img",{src:r.thumbnailUri,alt:r.fileName||n("unknownFilename")}):I.jsx(L,{size:"lg",material:Q9(r.contentType)})}),I.jsxs(j,{className:u3.fileData,children:[I.jsx(M.Paragraph,{className:u3.title,children:r.fileName}),I.jsx(M.Paragraph,{className:u3.subtitle,"data-size":"sm",children:r.status==="uploading"?n("uploading"):O3(r.sizeInBytes)}),r.status==="error"&&I.jsx(M.ValidationMessage,{children:r.error})]}),I.jsxs(j,{align:"center",className:u3.buttonContainer,children:[(r.status==="uploaded"||r.status==="error")&&I.jsx(z2,{onClick:()=>e(r),"aria-label":n("removeFileAriaLabel"),icon:!0,variant:"ghost",color:"neutral",children:I.jsx(L,{material:"delete"})}),r.status==="uploading"&&I.jsx(M.Spinner,{"aria-label":n("uploading"),"data-size":"xs","data-color":"neutral"})]})]})}const Di=(r,n,e,t,A,i)=>{const a=[...n],l={},{acceptedFiles:c,rejectedFiles:o}=Ni(r,n.length,i);c.forEach(f=>{const E=w7(),u=f.file.type.startsWith("image/")?URL.createObjectURL(f.file):void 0;a.push({contextId:E,fileName:f.file.name,status:"uploading",thumbnailUri:u,contentType:f.file.type,exif:f.exif,sizeInBytes:f.file.size}),l[E]=f.file}),o.forEach(f=>{const E=w7();a.push({contextId:E,fileName:f.file.file.name,status:"error",contentType:f.file.file.type,exif:f.file.exif,error:A(`errors.${f.reason}`),sizeInBytes:f.file.file.size})}),t(a),Object.keys(l).forEach(async f=>{try{const E=a.find(m=>m.contextId===f);if(!E)return;const u=new FormData;u.append("file",l[f],E.fileName);const s=await e(u);s.success?(E.storageId=s.storageId,E.status="uploaded",delete E.error):(E.status="error",E.error=A(`errors.${s.error||"unknown-error"}`)),t([...a])}catch(E){console.error("Error when uploading",E);const u=a.find(s=>s.contextId===f);if(!u)return;u.status="error",u.error=A("errors.unknown-error"),t([...a])}})},Ni=(r,n,e)=>{const t=[],A=[];for(const[i,a]of r.entries()){if(e===void 0){t.push(a);continue}const l=_i(a.file,e.maxSizeInBytes),c=$i(a.file,e.allowedFileTypes),o=e.maxFiles?n+i<e.maxFiles:!0;l?c?o?t.push(a):A.push({file:a,reason:"over-files-limit"}):A.push({file:a,reason:"invalid-file-type"}):A.push({file:a,reason:"file-too-large"})}return{acceptedFiles:t,rejectedFiles:A}},_i=(r,n)=>n===void 0?!0:r.size<=n,$i=(r,n)=>{if(n===void 0)return!0;const e=n.map(i=>i.trim().toLowerCase()).filter(Boolean);if(e.length===0)return!0;const t=r.name.toLowerCase(),A=r.type.toLowerCase();return e.some(i=>{if(i.startsWith("."))return t.endsWith(i);if(i.endsWith("/*")){const a=i.slice(0,-1);return A.startsWith(a)}return A===i})},u1={checkbox:"_checkbox_18i8p_2",dialogContent:"_dialogContent_18i8p_13",fileItem:"_fileItem_18i8p_18",filePreview:"_filePreview_18i8p_52",fileName:"_fileName_18i8p_72",selectFilesLabel:"_selectFilesLabel_18i8p_73",subtitle:"_subtitle_18i8p_76",listCard:"_listCard_18i8p_79"},ea=d.forwardRef(function({t:n,existingFiles:e,existingFilesProvider:t,onConfirm:A},i){const[a,l]=d.useState(!1),[c,o]=d.useState([]),[f,E]=d.useState(),[u,s]=d.useState({}),[m,h]=d.useState(null);d.useImperativeHandle(i,()=>({showModal:async()=>{m&&(m.open||m.showModal(),l(!0),v())},close:()=>{m==null||m.close()}}),[m,t,e]);const v=async()=>{try{const S=await t();o(S);const x=S.map(V=>V.files).flat();s(x.reduce((V,B)=>(B.storageId&&(V[B.storageId]=!!e.find(Q=>Q.storageId===B.storageId)),V),{}))}finally{l(!1)}},z=(S,x)=>{s(V=>({...V,[S]:x}))},Z=()=>{const S=c.map(R=>R.files).flat(),x=new Set(S.map(R=>R.storageId).filter(Boolean)),V=e.filter(R=>!R.storageId||!x.has(R.storageId)),B=S.filter(R=>R.storageId&&u[R.storageId]),Q=[...V];B.forEach(R=>{R.storageId&&!Q.some(q=>q.storageId===R.storageId)&&Q.push(R)}),A(Q),m==null||m.close()},b=()=>m==null?void 0:m.close();return I.jsxs(M.Dialog,{ref:h,closedby:"any",children:[I.jsx(M.DialogBlock,{children:I.jsx(M.Heading,{level:2,"data-size":"sm",children:n("existingFiles.dialogTitle")})}),I.jsxs(M.DialogBlock,{className:u1.dialogContent,children:[a&&I.jsx(j,{horizontal:!0,align:"center",justify:"center",children:I.jsx(M.Spinner,{"aria-label":n("loading")})}),!a&&c.length===0&&I.jsx(M.Paragraph,{children:n("existingFiles.noFilesAvailable")}),!a&&c.length>0&&I.jsxs(j,{gap:12,my:4,children:[f!==void 0&&I.jsxs(I.Fragment,{children:[I.jsxs(j,{gap:8,horizontal:!0,align:"center",children:[I.jsx(z2,{onClick:()=>E(void 0),"aria-label":n("existingFiles.goBackToCollectionAriaLabel"),icon:!0,color:"neutral",variant:"ghost",children:I.jsx(L,{size:"xl",material:"chevron_left"})}),I.jsxs(M.Heading,{children:[n("existingFiles.inMenuTitle"),' "',f.title,'"']})]}),I.jsx(M.Paragraph,{className:u1.selectFilesLabel,children:n("existingFiles.selectFilesLabel")}),f.files.map(S=>I.jsx(na,{file:S,handleExistingFileCheckboxChange:z,selectedExistingFiles:u,t:n},S.storageId))]}),f===void 0&&c.map(S=>I.jsx(ta,{existingFilesProviderItem:S,onClick:()=>E(S)},`${S.title}-${S.files.map(x=>x.storageId).sort().join(",")}`))]})]}),I.jsx(M.DialogBlock,{children:I.jsxs(j,{horizontal:!0,gap:16,children:[I.jsx(z2,{variant:"filled",onClick:Z,children:n("existingFiles.dialogConfirm")}),I.jsx(z2,{variant:"outline",onClick:b,children:n("existingFiles.dialogCancel")})]})})]})});function ta({existingFilesProviderItem:r,onClick:n}){return I.jsx(M.Card,{tabIndex:0,onKeyDown:e=>{e.key==="Enter"&&(e.preventDefault(),n())},className:u1.listCard,onClick:n,children:I.jsxs(j,{horizontal:!0,justify:"between",align:"center",children:[I.jsxs(j,{gap:4,children:[I.jsx(M.Heading,{children:r.title}),I.jsx(M.Paragraph,{className:u1.subtitle,children:r.label})]}),I.jsx(L,{material:"chevron_right"})]})})}function na({file:r,handleExistingFileCheckboxChange:n,selectedExistingFiles:e,t}){if(r.storageId!==void 0)return I.jsxs("div",{className:u1.fileItem,onClick:()=>{r.storageId&&n(r.storageId,!e[r.storageId])},children:[I.jsx(M.Checkbox,{label:null,className:u1.checkbox,checked:r.storageId&&e[r.storageId]||!1,onChange:A=>{r.storageId&&n(r.storageId,A.target.checked)},onKeyDown:A=>{A.key==="Enter"&&r.storageId&&n(r.storageId,!e[r.storageId])},onClick:A=>A.stopPropagation()}),I.jsxs(j,{gap:12,horizontal:!0,children:[I.jsx(j,{className:u1.filePreview,children:r.thumbnailUri?I.jsx("img",{src:r.thumbnailUri,alt:r.fileName||t("unknownFilename")}):I.jsx(L,{size:"lg",material:Q9(r.contentType)})}),I.jsxs(j,{gap:2,children:[I.jsx(M.Paragraph,{className:u1.fileName,children:r.fileName||t("unknownFilename")}),r.sizeInBytes&&I.jsx(M.Paragraph,{className:u1.subtitle,children:O3(r.sizeInBytes)})]})]})]})}const J1={uploadButton:"_uploadButton_1qljs_2",dropzone:"_dropzone_1qljs_10",active:"_active_1qljs_25",dropzoneText:"_dropzoneText_1qljs_30",dropzoneIcon:"_dropzoneIcon_1qljs_36",stretch:"_stretch_1qljs_47"};function ra({variant:r,fileInputRef:n,buttonLabel:e,onUploadFile:t,existingFilesProvider:A,dialogRef:i,t:a}){const[l,c]=d.useState(!1);return I.jsxs(j,{gap:4,mt:8,children:[r==="dropzone"&&I.jsxs("div",{role:"button","aria-label":a("dropzoneText"),tabIndex:0,onKeyDown:o=>{var f;(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),(f=n.current)==null||f.click())},onClick:()=>{var o;return(o=n.current)==null?void 0:o.click()},className:`${J1.dropzone} ${l?J1.active:""}`,onDragEnter:()=>c(!0),onDragOver:o=>o.preventDefault(),onDrop:o=>{o.preventDefault();const f=Array.from(o.dataTransfer.files);t(f),c(!1)},onDragLeave:()=>c(!1),children:[I.jsx("span",{className:J1.dropzoneIcon,children:I.jsx(L,{material:"upload"})}),I.jsx(M.Paragraph,{className:J1.dropzoneText,children:a("dropzoneText")})]}),I.jsxs(j,{gap:8,horizontal:!0,children:[r==="buttons"&&I.jsxs(z2,{className:`${J1.uploadButton}`,variant:"outline",onClick:()=>{var o;return(o=n.current)==null?void 0:o.click()},children:[I.jsx(L,{material:"upload"}),e??a("buttonLabel")]}),A&&I.jsxs(z2,{variant:"outline",className:`${J1.uploadButton} ${r!=="buttons"&&J1.stretch}`,onClick:()=>{var o;return(o=i.current)==null?void 0:o.showModal()},children:[I.jsx(L,{material:"folder_open"}),a("existingFiles.buttonOpen")]})]})]})}const Aa=r=>{if(r)return{latitude:r.latitude,longitude:r.longitude}},ia=[".pdf",".jpg",".jpeg",".png"],aa=({label:r,maxSizeInBytes:n,required:e,optional:t,description:A="",error:i=null,multiple:a=!0,files:l=[],buttonLabel:c,maxFiles:o,onChange:f,allowedFileTypes:E=ia,translations:u,existingFilesProvider:s,variant:m="buttons"})=>{const{at:h}=_0(),v=h.bind(null,"fileUploader",u),z=d.useContext(g9),Z=d.useRef(null),b=d.useRef(null),S=q=>{Promise.all(q.map(async W=>{try{return{file:W,exif:Aa(await Wi.parse(W))}}catch(k){return console.log("Error when parsing exif data, assuming image does not have any",k),{file:W}}})).then(W=>{Di(W,l,z.uploadFile,f,v,{allowedFileTypes:E,maxFiles:o,maxSizeInBytes:n})})},x=q=>{f(l.filter(W=>W.contextId!==q.contextId))},V=l.some(q=>q.status==="uploading"),B=!V&&o&&l.length>=o,Q=!B&&!V,R=v("attachmentsCount").replace("{count}",String(l.length));return I.jsxs(I.Fragment,{children:[I.jsxs(M.Field,{children:[I.jsx(M.Label,{style:{pointerEvents:"none"},children:I.jsx(P2,{text:r,required:e,optional:t})}),A&&I.jsx(M.Field.Description,{children:A}),I.jsx("input",{type:"file",style:{display:"none"},ref:Z,id:"fileUploadButton",name:"fileUploadButton",accept:E.join(","),multiple:a,onChange:q=>{const W=q.target;W.files&&W.files.length>0&&(S(Array.from(W.files)),W.value="")}}),Q&&I.jsx(ra,{buttonLabel:c,onUploadFile:S,dialogRef:b,fileInputRef:Z,t:v,existingFilesProvider:s,variant:m}),B&&I.jsxs("div",{className:S7.uploadInformation,children:[I.jsx(L,{material:"info"}),I.jsx("span",{children:v("maxFilesReached")})]}),V&&I.jsxs("div",{className:S7.uploadInformation,children:[I.jsx(M.Spinner,{"aria-label":v("uploading"),"data-size":"2xs","data-color":"neutral"}),I.jsx("span",{children:v("uploadingPleaseWait")})]}),l&&l.length>0&&I.jsxs("div",{className:S7.fileList,children:[I.jsx(M.Label,{style:{pointerEvents:"none"},children:R}),l.map(q=>I.jsx(wi,{file:q,t:v,onDeleteFile:x},q.contextId))]}),i&&I.jsx(M.ValidationMessage,{children:i})]}),s&&I.jsx(ea,{t:v,ref:b,existingFiles:l,existingFilesProvider:s,onConfirm:f})]})},la={icon:"_icon_1tg5o_1"},ca=({icon:r,href:n,children:e,level:t=2,size:A="sm"})=>I.jsxs(j,{horizontal:!0,justify:"between",children:[n?I.jsx(M.Heading,{"data-size":A,level:t,children:I.jsx("a",{className:"styrbord-card-link",href:n,children:e})}):I.jsx(M.Heading,{"data-size":A,level:t,children:e}),r&&I.jsx(L,{material:r,className:la.icon})]}),O0={href:"_href_1cqrf_1",dashed:"_dashed_1cqrf_6",outline:"_outline_1cqrf_16",subtle:"_subtle_1cqrf_33"},z2=({variant:r="outline",color:n=void 0,size:e="md",text:t=void 0,href:A=void 0,target:i="_blank",...a})=>{const l={...a};switch(r){case"filled":l.variant="primary";break;case"outline":l.variant="secondary",l.className=[l.className,O0.outline].join(" ");break;case"ghost":l.variant="tertiary";break;case"subtle":l.variant="primary",l.className=[l.className,O0.subtle].join(" ");break;case"dashed":l.variant="secondary",l.className=[l.className,O0.dashed].join(" ");break}return l["data-color"]=n,l["data-size"]=e,A&&(l.className=[l.className,O0.href].join(" ")),t&&A?(l.children=I.jsx("a",{href:A,target:i,rel:"noreferrer",children:t}),l.asChild=!0):t?l.children=t:A&&(l.children=I.jsx("a",{href:A,target:i,rel:"noreferrer",children:l.children}),l.asChild=!0),I.jsx(M.Button,{...l})},F1={sizeXxs:"_sizeXxs_18dzk_2",sizeXs:"_sizeXs_18dzk_7",sizeSm:"_sizeSm_18dzk_12",sizeMd:"_sizeMd_18dzk_16",sizeLg:"_sizeLg_18dzk_21",sizeFull:"_sizeFull_18dzk_26",sizeFit:"_sizeFit_18dzk_30"},D7=r=>{switch(r){case"2xs":return F1.sizeXxs;case"xs":return F1.sizeXs;case"sm":return F1.sizeSm;case"md":return F1.sizeMd;case"lg":return F1.sizeLg;case"full":return F1.sizeFull;case"fit":return F1.sizeFit}},oa=({size:r="full",type:n="text",className:e,label:t,loading:A,required:i,optional:a,onChange:l,value:c,...o})=>I.jsx(M.Textfield,{className:`${e} ${D7(r)}`,label:I.jsx(P2,{text:t,loading:A,required:i,optional:a}),value:c??"",onChange:f=>{l==null||l(f.target.value)},type:n,...o}),Ia={"align-right":"_align-right_dttaq_1"},fa=({size:r="full",inputMode:n="numeric",className:e,align:t="left",...A})=>{var l;const[i,a]=d.useState((l=A.value)==null?void 0:l.toString());return d.useEffect(()=>{var c,o;((c=A.value)==null?void 0:c.toString())!==i&&a((o=A.value)==null?void 0:o.toString())},[A.value]),I.jsx(M.Textfield,{id:A.id,className:[e,D7(r),Ia["align-"+t]].join(" "),label:I.jsx(P2,{text:A.label,required:A.required,optional:A.optional}),description:A.description,readOnly:A.readOnly,placeholder:A.placeholder,disabled:A.disabled,value:i??"",onBlur:A.onBlur,onChange:c=>{var f,E;let o=c.target.value.replace(",",".").replace(/[^0-9.,-]/g,"");for(;o.split(".").length>2;)o=o.replace(".","");[",","."].includes(o[o.length-1])||o==="-"||isNaN(Number(o))?a(o):o.length>0?(a(o),(f=A.onChange)==null||f.call(A,parseFloat(o))):(a(""),(E=A.onChange)==null||E.call(A,void 0))},inputMode:n,error:A.error,prefix:A.prefix,suffix:A.suffix,type:"text",min:A.min,max:A.max})},Ea=({size:r="full",className:n,label:e,required:t,optional:A,onChange:i,value:a,...l})=>I.jsx(M.Textfield,{className:`${n} ${D7(r)}`,label:I.jsx(P2,{text:e,required:t,optional:A}),value:a??"",onChange:c=>{i==null||i(c.target.value)},multiline:!0,...l}),Ca=({...r})=>{var i,a;const n=r.value?{value:r.value}:{defaultValue:""},[e,t]=d.useState(!1),A=[r.className,"override",e?"select-open":""].filter(Boolean).join(" ");return I.jsxs(M.Field,{children:[I.jsx(M.Label,{children:I.jsx(P2,{text:r.label,required:r.required,optional:r.optional})}),r.description&&I.jsx(M.Field.Description,{children:r.description}),I.jsxs(M.Select,{id:r.id,className:A,width:"full",onChange:l=>{var c;(c=r.onChange)==null||c.call(r,l.target.value),t(!1)},onBlur:()=>{var l;(l=r.onBlur)==null||l.call(r),t(!1)},onMouseDown:()=>t(l=>!l),onKeyDown:l=>{l.key==="Enter"||l.key===" "||l.key==="ArrowDown"||l.key==="ArrowUp"?t(!0):l.key==="Escape"&&t(!1)},...n,children:[r.placeholder&&I.jsx(M.Select.Option,{disabled:!0,value:"",children:r.placeholder}),!r.placeholder&&(!r.value||!((i=r.options)!=null&&i.find(l=>l.value===r.value)))&&I.jsx(M.Select.Option,{disabled:!0,value:""}),(a=r.options)==null?void 0:a.map(l=>I.jsx(M.Select.Option,{value:l.value,children:l.label??l.value},l.value))]}),r.error&&I.jsx(M.ValidationMessage,{children:r.error})]})},ua={notUnderlined:"_notUnderlined_jhlgm_1"},W0=({underlined:r=!0,className:n="",...e})=>{const t=[n];return r||t.push(ua.notUnderlined),I.jsx(M.Tabs,{className:t.join(""),...e})};W0.List=M.Tabs.List,W0.Tab=M.Tabs.Tab,W0.Panel=M.Tabs.Panel;const Z9={bordered:"_bordered_103m7_2",rounded:"_rounded_103m7_33"},k3=({bordered:r=!1,rounded:n=!1,className:e="",...t})=>{const A=[e];return r&&A.push(Z9.bordered),n&&A.push(Z9.rounded),I.jsx(M.Tag,{className:A.join(" "),...t})},s3={"with-icon":"_with-icon_1cp54_2","link-icon":"_link-icon_1cp54_8","with-underline":"_with-underline_1cp54_12","link-icon-text":"_link-icon-text_1cp54_12","without-underline":"_without-underline_1cp54_16","without-icon":"_without-icon_1cp54_20"},N7=({underline:r,className:n,children:e,...t})=>{const A=[n];return r===void 0||r===!0?A.push(s3["with-underline"]):A.push(s3["without-underline"]),t.icon?(A.push(s3["with-icon"]),e=I.jsxs(I.Fragment,{children:[I.jsx(L,{material:t.icon,size:"sm",className:s3["link-icon"]}),I.jsx("span",{className:s3["link-icon-text"],children:e})]})):A.push(s3["without-icon"]),I.jsx(M.Link,{className:A.join(" "),...t,children:e})},j3={opaqueHeader:"_opaqueHeader_yxlz3_1",table:"_table_yxlz3_6",white:"_white_yxlz3_10","cell-padding-md":"_cell-padding-md_yxlz3_50","radius-sm":"_radius-sm_yxlz3_55","radius-md":"_radius-md_yxlz3_59","radius-lg":"_radius-lg_yxlz3_63"},L1=({header:r="transparent",body:n="transparent",radius:e="none",className:t="","cell-padding":A="sm",...i})=>{i["data-color"]||(i["data-color"]="neutral");const a=[t,j3.table];return r&&r!=="transparent"&&a.push(j3.opaqueHeader),n&&n==="white"&&a.push(j3.white),e&&a.push(j3[`radius-${e}`]),A&&a.push(j3[`cell-padding-${A}`]),I.jsx(M.Table,{className:a.join(" "),...i})};L1.Cell=M.Table.Cell,L1.HeaderCell=M.Table.HeaderCell,L1.Head=M.Table.Head,L1.Body=M.Table.Body,L1.Row=M.Table.Row,L1.Foot=M.Table.Foot;const T0={size2xs:"_size2xs_1uyqe_1",size3xs:"_size3xs_1uyqe_8",surfaceTinted:"_surfaceTinted_1uyqe_15","border-solid":"_border-solid_1uyqe_92","border-dashed":"_border-dashed_1uyqe_96","border-dotted":"_border-dotted_1uyqe_100","border-double":"_border-double_1uyqe_104"},X0=({"data-size":r="md","data-color-variant":n="base",border:e,className:t,...A})=>{const i=[t];r==="2xs"?i.push(T0.size2xs):r==="3xs"&&i.push(T0.size3xs),n==="surface-tinted"&&i.push(T0.surfaceTinted),e&&i.push(T0[`border-${e}`]);const a={"data-size":r,className:i.join(" "),...A};return I.jsx(M.Avatar,{...a})};Object.defineProperty(p,"Badge",{enumerable:!0,get:()=>M.Badge}),Object.defineProperty(p,"BadgePosition",{enumerable:!0,get:()=>M.BadgePosition}),Object.defineProperty(p,"Breadcrumbs",{enumerable:!0,get:()=>M.Breadcrumbs}),Object.defineProperty(p,"BreadcrumbsItem",{enumerable:!0,get:()=>M.BreadcrumbsItem}),Object.defineProperty(p,"BreadcrumbsLink",{enumerable:!0,get:()=>M.BreadcrumbsLink}),Object.defineProperty(p,"BreadcrumbsList",{enumerable:!0,get:()=>M.BreadcrumbsList}),Object.defineProperty(p,"Card",{enumerable:!0,get:()=>M.Card}),Object.defineProperty(p,"CardBlock",{enumerable:!0,get:()=>M.CardBlock}),Object.defineProperty(p,"Checkbox",{enumerable:!0,get:()=>M.Checkbox}),Object.defineProperty(p,"Chip",{enumerable:!0,get:()=>M.Chip}),Object.defineProperty(p,"ChipButton",{enumerable:!0,get:()=>M.ChipButton}),Object.defineProperty(p,"ChipCheckbox",{enumerable:!0,get:()=>M.ChipCheckbox}),Object.defineProperty(p,"ChipRadio",{enumerable:!0,get:()=>M.ChipRadio}),Object.defineProperty(p,"ChipRemovable",{enumerable:!0,get:()=>M.ChipRemovable}),Object.defineProperty(p,"Combobox",{enumerable:!0,get:()=>M.Combobox}),Object.defineProperty(p,"ComboboxEmpty",{enumerable:!0,get:()=>M.ComboboxEmpty}),Object.defineProperty(p,"ComboboxOption",{enumerable:!0,get:()=>M.ComboboxOption}),Object.defineProperty(p,"Details",{enumerable:!0,get:()=>M.Details}),Object.defineProperty(p,"DetailsContent",{enumerable:!0,get:()=>M.DetailsContent}),Object.defineProperty(p,"DetailsSummary",{enumerable:!0,get:()=>M.DetailsSummary}),Object.defineProperty(p,"Dialog",{enumerable:!0,get:()=>M.Dialog}),Object.defineProperty(p,"DialogBlock",{enumerable:!0,get:()=>M.DialogBlock}),Object.defineProperty(p,"DialogTrigger",{enumerable:!0,get:()=>M.DialogTrigger}),Object.defineProperty(p,"DialogTriggerContext",{enumerable:!0,get:()=>M.DialogTriggerContext}),Object.defineProperty(p,"Divider",{enumerable:!0,get:()=>M.Divider}),Object.defineProperty(p,"Dropdown",{enumerable:!0,get:()=>M.Dropdown}),Object.defineProperty(p,"DropdownButton",{enumerable:!0,get:()=>M.DropdownButton}),Object.defineProperty(p,"DropdownHeading",{enumerable:!0,get:()=>M.DropdownHeading}),Object.defineProperty(p,"DropdownItem",{enumerable:!0,get:()=>M.DropdownItem}),Object.defineProperty(p,"DropdownList",{enumerable:!0,get:()=>M.DropdownList}),Object.defineProperty(p,"DropdownTrigger",{enumerable:!0,get:()=>M.DropdownTrigger}),Object.defineProperty(p,"DropdownTriggerContext",{enumerable:!0,get:()=>M.DropdownTriggerContext}),Object.defineProperty(p,"EXPERIMENTAL_Suggestion",{enumerable:!0,get:()=>M.EXPERIMENTAL_Suggestion}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionClear",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionClear}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionEmpty",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionEmpty}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionInput",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionInput}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionList",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionList}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionOption",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionOption}),Object.defineProperty(p,"ErrorSummary",{enumerable:!0,get:()=>M.ErrorSummary}),Object.defineProperty(p,"ErrorSummaryHeading",{enumerable:!0,get:()=>M.ErrorSummaryHeading}),Object.defineProperty(p,"ErrorSummaryItem",{enumerable:!0,get:()=>M.ErrorSummaryItem}),Object.defineProperty(p,"ErrorSummaryLink",{enumerable:!0,get:()=>M.ErrorSummaryLink}),Object.defineProperty(p,"ErrorSummaryList",{enumerable:!0,get:()=>M.ErrorSummaryList}),Object.defineProperty(p,"Field",{enumerable:!0,get:()=>M.Field}),Object.defineProperty(p,"FieldAffix",{enumerable:!0,get:()=>M.FieldAffix}),Object.defineProperty(p,"FieldAffixes",{enumerable:!0,get:()=>M.FieldAffixes}),Object.defineProperty(p,"FieldCounter",{enumerable:!0,get:()=>M.FieldCounter}),Object.defineProperty(p,"FieldDescription",{enumerable:!0,get:()=>M.FieldDescription}),Object.defineProperty(p,"Fieldset",{enumerable:!0,get:()=>M.Fieldset}),Object.defineProperty(p,"FieldsetDescription",{enumerable:!0,get:()=>M.FieldsetDescription}),Object.defineProperty(p,"FieldsetLegend",{enumerable:!0,get:()=>M.FieldsetLegend}),Object.defineProperty(p,"Heading",{enumerable:!0,get:()=>M.Heading}),Object.defineProperty(p,"Input",{enumerable:!0,get:()=>M.Input}),Object.defineProperty(p,"Label",{enumerable:!0,get:()=>M.Label}),Object.defineProperty(p,"List",{enumerable:!0,get:()=>M.List}),Object.defineProperty(p,"ListItem",{enumerable:!0,get:()=>M.ListItem}),Object.defineProperty(p,"ListOrdered",{enumerable:!0,get:()=>M.ListOrdered}),Object.defineProperty(p,"ListUnordered",{enumerable:!0,get:()=>M.ListUnordered}),Object.defineProperty(p,"Pagination",{enumerable:!0,get:()=>M.Pagination}),Object.defineProperty(p,"PaginationButton",{enumerable:!0,get:()=>M.PaginationButton}),Object.defineProperty(p,"PaginationItem",{enumerable:!0,get:()=>M.PaginationItem}),Object.defineProperty(p,"PaginationList",{enumerable:!0,get:()=>M.PaginationList}),Object.defineProperty(p,"Paragraph",{enumerable:!0,get:()=>M.Paragraph}),Object.defineProperty(p,"Popover",{enumerable:!0,get:()=>M.Popover}),Object.defineProperty(p,"PopoverTrigger",{enumerable:!0,get:()=>M.PopoverTrigger}),Object.defineProperty(p,"PopoverTriggerContext",{enumerable:!0,get:()=>M.PopoverTriggerContext}),Object.defineProperty(p,"Radio",{enumerable:!0,get:()=>M.Radio}),Object.defineProperty(p,"RovingFocusItem",{enumerable:!0,get:()=>M.RovingFocusItem}),Object.defineProperty(p,"RovingFocusRoot",{enumerable:!0,get:()=>M.RovingFocusRoot}),Object.defineProperty(p,"Search",{enumerable:!0,get:()=>M.Search}),Object.defineProperty(p,"SearchButton",{enumerable:!0,get:()=>M.SearchButton}),Object.defineProperty(p,"SearchClear",{enumerable:!0,get:()=>M.SearchClear}),Object.defineProperty(p,"SearchInput",{enumerable:!0,get:()=>M.SearchInput}),Object.defineProperty(p,"SelectOptgroup",{enumerable:!0,get:()=>M.SelectOptgroup}),Object.defineProperty(p,"Skeleton",{enumerable:!0,get:()=>M.Skeleton}),Object.defineProperty(p,"SkipLink",{enumerable:!0,get:()=>M.SkipLink}),Object.defineProperty(p,"Spinner",{enumerable:!0,get:()=>M.Spinner}),Object.defineProperty(p,"Suggestion",{enumerable:!0,get:()=>M.EXPERIMENTAL_Suggestion}),Object.defineProperty(p,"Switch",{enumerable:!0,get:()=>M.Switch}),Object.defineProperty(p,"TableBody",{enumerable:!0,get:()=>M.TableBody}),Object.defineProperty(p,"TableCell",{enumerable:!0,get:()=>M.TableCell}),Object.defineProperty(p,"TableFoot",{enumerable:!0,get:()=>M.TableFoot}),Object.defineProperty(p,"TableHead",{enumerable:!0,get:()=>M.TableHead}),Object.defineProperty(p,"TableHeaderCell",{enumerable:!0,get:()=>M.TableHeaderCell}),Object.defineProperty(p,"TableRow",{enumerable:!0,get:()=>M.TableRow}),Object.defineProperty(p,"TabsList",{enumerable:!0,get:()=>M.TabsList}),Object.defineProperty(p,"TabsPanel",{enumerable:!0,get:()=>M.TabsPanel}),Object.defineProperty(p,"TabsTab",{enumerable:!0,get:()=>M.TabsTab}),Object.defineProperty(p,"Textarea",{enumerable:!0,get:()=>M.Textarea}),Object.defineProperty(p,"Textfield",{enumerable:!0,get:()=>M.Textfield}),Object.defineProperty(p,"ToggleGroup",{enumerable:!0,get:()=>M.ToggleGroup}),Object.defineProperty(p,"ToggleGroupItem",{enumerable:!0,get:()=>M.ToggleGroupItem}),Object.defineProperty(p,"Tooltip",{enumerable:!0,get:()=>M.Tooltip}),Object.defineProperty(p,"ValidationMessage",{enumerable:!0,get:()=>M.ValidationMessage}),Object.defineProperty(p,"omit",{enumerable:!0,get:()=>M.omit}),Object.defineProperty(p,"useCheckboxGroup",{enumerable:!0,get:()=>M.useCheckboxGroup}),Object.defineProperty(p,"useDebounceCallback",{enumerable:!0,get:()=>M.useDebounceCallback}),Object.defineProperty(p,"useIsomorphicLayoutEffect",{enumerable:!0,get:()=>M.useIsomorphicLayoutEffect}),Object.defineProperty(p,"useMediaQuery",{enumerable:!0,get:()=>M.useMediaQuery}),Object.defineProperty(p,"usePagination",{enumerable:!0,get:()=>M.usePagination}),Object.defineProperty(p,"useRadioGroup",{enumerable:!0,get:()=>M.useRadioGroup}),Object.defineProperty(p,"useSynchronizedAnimation",{enumerable:!0,get:()=>M.useSynchronizedAnimation}),p.Accent=w0,p.Alert=D9,p.Avatar=X0,p.Body=H2,p.BorderedRadioGroup=tt,p.BorderedToggleGroup=et,p.Box=j,p.Button=z2,p.CardTitle=ca,p.DateTimePicker=mi,p.Datepicker=di,p.DeprecatedCard=i5,p.DeprecatedDetails=V9,p.DeprecatedErrorLabel=U9,p.DeprecatedInputLabel=Y9,p.FilePreviewer=J0,p.FileUploader=aa,p.FileUploaderContext=g9,p.Footer=Et,p.Header=ut,p.Icon=L,p.ImageAisSat=e6,p.ImageArcticInfo=n6,p.ImageAvgiftskalkulator=r6,p.ImageBaatfartMarine=A6,p.ImageBestilleLos=i6,p.ImageBoelgevarsel=a6,p.ImageBwArcticinfo=X6,p.ImageBwBoelgevarsel=T6,p.ImageBwNais=O6,p.ImageBwOhoi=W6,p.ImageDatakatalog=t6,p.ImageDigitaleFyrbesoek=R6,p.ImageDigitaleReferanseruter=l6,p.ImageEDialog=c6,p.ImageFarledsbevis=o6,p.ImageFarvannsskiltOgNavinnretninger=G6,p.ImageFarvannsskiltOgNavinnretningerFarget=P6,p.ImageForespoerselSendt=y6,p.ImageHais=$e,p.ImageHavbase=f6,p.ImageHavnOgFarvannsloven=E6,p.ImageHavnOgFarvannslovenFarget=C6,p.ImageIsmelding=u6,p.ImageIsmeldingFarget=s6,p.ImageKikkert=d6,p.ImageKystdatahuset=M6,p.ImageKystinfoKart=m6,p.ImageKystreise=U6,p.ImageKystvaer=j6,p.ImageLavutslipp=p6,p.ImageMarU=S6,p.ImageMegafon=Y6,p.ImageNais=k6,p.ImageNavarea=B6,p.ImageNavigasjonsvarsler=v6,p.ImageNavigasjonsvarslerFarget=h6,p.ImageOhoi=z6,p.ImageRegistrerteSeilaser=g6,p.ImageSafeSeaNet=V6,p.ImageSeLosbestilling=Q6,p.ImageSelvbetjening=K6,p.ImageSelvbetjeningRso=q6,p.ImageSelvbetjeningRsoFarget=x6,p.ImageSkadePaaInfrastruktur=H6,p.ImageSkadePaaInfrastrukturFarget=J6,p.ImageSkipsrapportering=Z6,p.ImageSlukkedeFyrlys=b6,p.ImageSoeknadOmFarledsbevis=I6,p.ImageTilskuddTilFiskerihavn=F6,p.ImageTilskuddTilFiskerihavnFarget=L6,p.ImageUtfordringIFarvannet=w6,p.ImageUtfordringIFarvannetFarget=D6,p.KyvDivider=L9,p.LabelContent=P2,p.Link=N7,p.Logo=N0,p.NumberInput=fa,p.PageHeading=w9,p.Select=Ca,p.Skillingsbuoye=_6,p.Stepper=ie,p.StyrbordTranslationContext=M5,p.Summary=lt,p.Table=L1,p.Tabs=W0,p.Tag=k3,p.TextArea=Ea,p.TextInput=oa,p.Typography=$6,p.svgImageColors=_e,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}));
32
+ Please create an issue at https://github.com/MikeKovarik/exifr with this file`),[this.file.getUintBytes(t+l,A),this.file.getUintBytes(t+l+A,i)];t+=m*f}}}class a9 extends i9{}O(a9,"type","heic");class l9 extends i9{}O(l9,"type","avif"),r1.set("heic",a9),r1.set("avif",l9),I2(d2,["ifd0","ifd1"],[[256,"ImageWidth"],[257,"ImageHeight"],[258,"BitsPerSample"],[259,"Compression"],[262,"PhotometricInterpretation"],[270,"ImageDescription"],[271,"Make"],[272,"Model"],[273,"StripOffsets"],[274,"Orientation"],[277,"SamplesPerPixel"],[278,"RowsPerStrip"],[279,"StripByteCounts"],[282,"XResolution"],[283,"YResolution"],[284,"PlanarConfiguration"],[296,"ResolutionUnit"],[301,"TransferFunction"],[305,"Software"],[306,"ModifyDate"],[315,"Artist"],[316,"HostComputer"],[317,"Predictor"],[318,"WhitePoint"],[319,"PrimaryChromaticities"],[513,"ThumbnailOffset"],[514,"ThumbnailLength"],[529,"YCbCrCoefficients"],[530,"YCbCrSubSampling"],[531,"YCbCrPositioning"],[532,"ReferenceBlackWhite"],[700,"ApplicationNotes"],[33432,"Copyright"],[33723,"IPTC"],[34665,"ExifIFD"],[34675,"ICC"],[34853,"GpsIFD"],[330,"SubIFD"],[40965,"InteropIFD"],[40091,"XPTitle"],[40092,"XPComment"],[40093,"XPAuthor"],[40094,"XPKeywords"],[40095,"XPSubject"]]),I2(d2,"exif",[[33434,"ExposureTime"],[33437,"FNumber"],[34850,"ExposureProgram"],[34852,"SpectralSensitivity"],[34855,"ISO"],[34858,"TimeZoneOffset"],[34859,"SelfTimerMode"],[34864,"SensitivityType"],[34865,"StandardOutputSensitivity"],[34866,"RecommendedExposureIndex"],[34867,"ISOSpeed"],[34868,"ISOSpeedLatitudeyyy"],[34869,"ISOSpeedLatitudezzz"],[36864,"ExifVersion"],[36867,"DateTimeOriginal"],[36868,"CreateDate"],[36873,"GooglePlusUploadCode"],[36880,"OffsetTime"],[36881,"OffsetTimeOriginal"],[36882,"OffsetTimeDigitized"],[37121,"ComponentsConfiguration"],[37122,"CompressedBitsPerPixel"],[37377,"ShutterSpeedValue"],[37378,"ApertureValue"],[37379,"BrightnessValue"],[37380,"ExposureCompensation"],[37381,"MaxApertureValue"],[37382,"SubjectDistance"],[37383,"MeteringMode"],[37384,"LightSource"],[37385,"Flash"],[37386,"FocalLength"],[37393,"ImageNumber"],[37394,"SecurityClassification"],[37395,"ImageHistory"],[37396,"SubjectArea"],[37500,"MakerNote"],[37510,"UserComment"],[37520,"SubSecTime"],[37521,"SubSecTimeOriginal"],[37522,"SubSecTimeDigitized"],[37888,"AmbientTemperature"],[37889,"Humidity"],[37890,"Pressure"],[37891,"WaterDepth"],[37892,"Acceleration"],[37893,"CameraElevationAngle"],[40960,"FlashpixVersion"],[40961,"ColorSpace"],[40962,"ExifImageWidth"],[40963,"ExifImageHeight"],[40964,"RelatedSoundFile"],[41483,"FlashEnergy"],[41486,"FocalPlaneXResolution"],[41487,"FocalPlaneYResolution"],[41488,"FocalPlaneResolutionUnit"],[41492,"SubjectLocation"],[41493,"ExposureIndex"],[41495,"SensingMethod"],[41728,"FileSource"],[41729,"SceneType"],[41730,"CFAPattern"],[41985,"CustomRendered"],[41986,"ExposureMode"],[41987,"WhiteBalance"],[41988,"DigitalZoomRatio"],[41989,"FocalLengthIn35mmFormat"],[41990,"SceneCaptureType"],[41991,"GainControl"],[41992,"Contrast"],[41993,"Saturation"],[41994,"Sharpness"],[41996,"SubjectDistanceRange"],[42016,"ImageUniqueID"],[42032,"OwnerName"],[42033,"SerialNumber"],[42034,"LensInfo"],[42035,"LensMake"],[42036,"LensModel"],[42037,"LensSerialNumber"],[42080,"CompositeImage"],[42081,"CompositeImageCount"],[42082,"CompositeImageExposureTimes"],[42240,"Gamma"],[59932,"Padding"],[59933,"OffsetSchema"],[65e3,"OwnerName"],[65001,"SerialNumber"],[65002,"Lens"],[65100,"RawFile"],[65101,"Converter"],[65102,"WhiteBalance"],[65105,"Exposure"],[65106,"Shadows"],[65107,"Brightness"],[65108,"Contrast"],[65109,"Saturation"],[65110,"Sharpness"],[65111,"Smoothness"],[65112,"MoireFilter"],[40965,"InteropIFD"]]),I2(d2,"gps",[[0,"GPSVersionID"],[1,"GPSLatitudeRef"],[2,"GPSLatitude"],[3,"GPSLongitudeRef"],[4,"GPSLongitude"],[5,"GPSAltitudeRef"],[6,"GPSAltitude"],[7,"GPSTimeStamp"],[8,"GPSSatellites"],[9,"GPSStatus"],[10,"GPSMeasureMode"],[11,"GPSDOP"],[12,"GPSSpeedRef"],[13,"GPSSpeed"],[14,"GPSTrackRef"],[15,"GPSTrack"],[16,"GPSImgDirectionRef"],[17,"GPSImgDirection"],[18,"GPSMapDatum"],[19,"GPSDestLatitudeRef"],[20,"GPSDestLatitude"],[21,"GPSDestLongitudeRef"],[22,"GPSDestLongitude"],[23,"GPSDestBearingRef"],[24,"GPSDestBearing"],[25,"GPSDestDistanceRef"],[26,"GPSDestDistance"],[27,"GPSProcessingMethod"],[28,"GPSAreaInformation"],[29,"GPSDateStamp"],[30,"GPSDifferential"],[31,"GPSHPositioningError"]]),I2(T2,["ifd0","ifd1"],[[274,{1:"Horizontal (normal)",2:"Mirror horizontal",3:"Rotate 180",4:"Mirror vertical",5:"Mirror horizontal and rotate 270 CW",6:"Rotate 90 CW",7:"Mirror horizontal and rotate 90 CW",8:"Rotate 270 CW"}],[296,{1:"None",2:"inches",3:"cm"}]]);let q3=I2(T2,"exif",[[34850,{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"}],[37121,{0:"-",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}],[37383,{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"}],[37384,{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"}],[37385,{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"}],[41495,{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"}],[41728,{1:"Film Scanner",2:"Reflection Print Scanner",3:"Digital Camera"}],[41729,{1:"Directly photographed"}],[41985,{0:"Normal",1:"Custom",2:"HDR (no original saved)",3:"HDR (original saved)",4:"Original (for HDR)",6:"Panorama",7:"Portrait HDR",8:"Portrait"}],[41986,{0:"Auto",1:"Manual",2:"Auto bracket"}],[41987,{0:"Auto",1:"Manual"}],[41990,{0:"Standard",1:"Landscape",2:"Portrait",3:"Night",4:"Other"}],[41991,{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"}],[41996,{0:"Unknown",1:"Macro",2:"Close",3:"Distant"}],[42080,{0:"Unknown",1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}]]);const c9={1:"No absolute unit of measurement",2:"Inch",3:"Centimeter"};q3.set(37392,c9),q3.set(41488,c9);const P7={0:"Normal",1:"Low",2:"High"};function o9(r){return typeof r=="object"&&r.length!==void 0?r[0]:r}function I9(r){let n=Array.from(r).slice(1);return n[1]>15&&(n=n.map((e=>String.fromCharCode(e)))),n[2]!=="0"&&n[2]!==0||n.pop(),n.join(".")}function H7(r){if(typeof r=="string"){var[n,e,t,A,i,a]=r.trim().split(/[-: ]/g).map(Number),l=new Date(n,e-1,t);return Number.isNaN(A)||Number.isNaN(i)||Number.isNaN(a)||(l.setHours(A),l.setMinutes(i),l.setSeconds(a)),Number.isNaN(+l)?r:l}}function x3(r){if(typeof r=="string")return r;let n=[];if(r[1]===0&&r[r.length-1]===0)for(let e=0;e<r.length;e+=2)n.push(f9(r[e+1],r[e]));else for(let e=0;e<r.length;e+=2)n.push(f9(r[e],r[e+1]));return y1(String.fromCodePoint(...n))}function f9(r,n){return r<<8|n}q3.set(41992,P7),q3.set(41993,P7),q3.set(41994,P7),I2(h1,["ifd0","ifd1"],[[50827,function(r){return typeof r!="string"?F4(r):r}],[306,H7],[40091,x3],[40092,x3],[40093,x3],[40094,x3],[40095,x3]]),I2(h1,"exif",[[40960,I9],[36864,I9],[36867,H7],[36868,H7],[40962,o9],[40963,o9]]),I2(h1,"gps",[[0,r=>Array.from(r).join(".")],[7,r=>Array.from(r).join(":")]]);class J7 extends X2{static canHandle(n,e){return n.getUint8(e+1)===225&&n.getUint32(e+4)===1752462448&&n.getString(e+4,20)==="http://ns.adobe.com/"}static headerLength(n,e){return n.getString(e+4,34)==="http://ns.adobe.com/xmp/extension/"?79:33}static findPosition(n,e){let t=super.findPosition(n,e);return t.multiSegment=t.extended=t.headerLength===79,t.multiSegment?(t.chunkCount=n.getUint8(e+72),t.chunkNumber=n.getUint8(e+76),n.getUint8(e+77)!==0&&t.chunkNumber++):(t.chunkCount=1/0,t.chunkNumber=-1),t}static handleMultiSegments(n){return n.map((e=>e.chunk.getString())).join("")}normalizeInput(n){return typeof n=="string"?n:S2.from(n).getString()}parse(n=this.chunk){if(!this.localOptions.parse)return n;n=(function(i){let a={},l={};for(let c of s9)a[c]=[],l[c]=0;return i.replace(Oi,((c,o,f)=>{if(o==="<"){let E=++l[f];return a[f].push(E),`${c}#${E}`}return`${c}#${a[f].pop()}`}))})(n);let e=C3.findAll(n,"rdf","Description");e.length===0&&e.push(new C3("rdf","Description",void 0,n));let t,A={};for(let i of e)for(let a of i.properties)t=yi(a.ns,A),E9(a,t);return(function(i){let a;for(let l in i)a=i[l]=U0(i[l]),a===void 0&&delete i[l];return U0(i)})(A)}assignToOutput(n,e){if(this.localOptions.parse)for(let[t,A]of Object.entries(e))switch(t){case"tiff":this.assignObjectToOutput(n,"ifd0",A);break;case"exif":this.assignObjectToOutput(n,"exif",A);break;case"xmlns":break;default:this.assignObjectToOutput(n,t,A)}else n.xmp=e}}O(J7,"type","xmp"),O(J7,"multiSegment",!0),E2.set("xmp",J7);class x0{static findAll(n){return C9(n,/([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)=("[^"]*"|'[^']*')/gm).map(x0.unpackMatch)}static unpackMatch(n){let e=n[1],t=n[2],A=n[3].slice(1,-1);return A=u9(A),new x0(e,t,A)}constructor(n,e,t){this.ns=n,this.name=e,this.value=t}serialize(){return this.value}}class C3{static findAll(n,e,t){if(e!==void 0||t!==void 0){e=e||"[\\w\\d-]+",t=t||"[\\w\\d-]+";var A=new RegExp(`<(${e}):(${t})(#\\d+)?((\\s+?[\\w\\d-:]+=("[^"]*"|'[^']*'))*\\s*)(\\/>|>([\\s\\S]*?)<\\/\\1:\\2\\3>)`,"gm")}else A=/<([\w\d-]+):([\w\d-]+)(#\d+)?((\s+?[\w\d-:]+=("[^"]*"|'[^']*'))*\s*)(\/>|>([\s\S]*?)<\/\1:\2\3>)/gm;return C9(n,A).map(C3.unpackMatch)}static unpackMatch(n){let e=n[1],t=n[2],A=n[4],i=n[8];return new C3(e,t,A,i)}constructor(n,e,t,A){this.ns=n,this.name=e,this.attrString=t,this.innerXml=A,this.attrs=x0.findAll(t),this.children=C3.findAll(A),this.value=this.children.length===0?u9(A):void 0,this.properties=[...this.attrs,...this.children]}get isPrimitive(){return this.value!==void 0&&this.attrs.length===0&&this.children.length===0}get isListContainer(){return this.children.length===1&&this.children[0].isList}get isList(){let{ns:n,name:e}=this;return n==="rdf"&&(e==="Seq"||e==="Bag"||e==="Alt")}get isListItem(){return this.ns==="rdf"&&this.name==="li"}serialize(){if(this.properties.length===0&&this.value===void 0)return;if(this.isPrimitive)return this.value;if(this.isListContainer)return this.children[0].serialize();if(this.isList)return ji(this.children.map(ki));if(this.isListItem&&this.children.length===1&&this.attrs.length===0)return this.children[0].serialize();let n={};for(let e of this.properties)E9(e,n);return this.value!==void 0&&(n.value=this.value),U0(n)}}function E9(r,n){let e=r.serialize();e!==void 0&&(n[r.name]=e)}var ki=r=>r.serialize(),ji=r=>r.length===1?r[0]:r,yi=(r,n)=>n[r]?n[r]:n[r]={};function C9(r,n){let e,t=[];if(!r)return t;for(;(e=n.exec(r))!==null;)t.push(e);return t}function u9(r){if((function(t){return t==null||t==="null"||t==="undefined"||t===""||t.trim()===""})(r))return;let n=Number(r);if(!Number.isNaN(n))return n;let e=r.toLowerCase();return e==="true"||e!=="false"&&r.trim()}const s9=["rdf:li","rdf:Seq","rdf:Bag","rdf:Alt","rdf:Description"],Oi=new RegExp(`(<|\\/)(${s9.join("|")})`,"g");var Wi=Object.freeze({__proto__:null,default:qi,Exifr:R1,fileParsers:r1,segmentParsers:E2,fileReaders:A1,tagKeys:d2,tagValues:T2,tagRevivers:h1,createDictionary:I2,extendDictionary:T1,fetchUrlAsArrayBuffer:O1,readBlobAsArrayBuffer:W1,chunkedProps:z1,otherSegments:f3,segments:X1,tiffBlocks:a2,segmentsAndBlocks:g1,tiffExtractables:Q1,inheritables:E3,allFormatters:Z1,Options:G1,parse:V0,gpsOnlyOptions:O7,gps:e9,thumbnailOnlyOptions:W7,thumbnail:t9,thumbnailUrl:n9,orientationOnlyOptions:T7,orientation:X7,rotations:G7,get rotateCanvas(){return P1},get rotateCss(){return H1},rotation:r9});let d9=B0("fs",(r=>r.promises));A1.set("fs",class extends q0{async readWhole(){this.chunked=!1,this.fs=await d9;let r=await this.fs.readFile(this.input);this._swapBuffer(r)}async readChunked(){this.chunked=!0,this.fs=await d9,await this.open(),await this.readChunk(0,this.options.firstChunkSize)}async open(){this.fh===void 0&&(this.fh=await this.fs.open(this.input,"r"),this.size=(await this.fh.stat(this.input)).size)}async _readChunk(r,n){this.fh===void 0&&await this.open(),r+n>this.size&&(n=this.size-r);var e=this.subarray(r,n,!0);return await this.fh.read(e.dataView,0,n,r),e}async close(){if(this.fh){let r=this.fh;this.fh=void 0,await r.close()}}}),A1.set("base64",class extends q0{constructor(...r){super(...r),this.input=this.input.replace(/^data:([^;]+);base64,/gim,""),this.size=this.input.length/4*3,this.input.endsWith("==")?this.size-=2:this.input.endsWith("=")&&(this.size-=1)}async _readChunk(r,n){let e,t,A=this.input;r===void 0?(r=0,e=0,t=0):(e=4*Math.floor(r/3),t=r-e/4*3),n===void 0&&(n=this.size);let i=r+n,a=e+4*Math.ceil(i/3);A=A.slice(e,a);let l=Math.min(n,this.size-r);if(S0){let c=R0.from(A,"base64").slice(t,t+l);return this.set(c,r,!0)}{let c=this.subarray(r,l,!0),o=atob(A),f=c.toUint8();for(let E=0;E<l;E++)f[E]=o.charCodeAt(t+E);return c}}});class M9 extends K0{static canHandle(n,e){return e===18761||e===19789}extendOptions(n){let{ifd0:e,xmp:t,iptc:A,icc:i}=n;t.enabled&&e.deps.add(700),A.enabled&&e.deps.add(33723),i.enabled&&e.deps.add(34675),e.finalizeFilters()}async parse(){let{tiff:n,xmp:e,iptc:t,icc:A}=this.options;if(n.enabled||e.enabled||t.enabled||A.enabled){let i=Math.max(U7(this.options),this.options.chunkSize);await this.file.ensureChunk(0,i),this.createParser("tiff",this.file),this.parsers.tiff.parseHeader(),await this.parsers.tiff.parseIfd0Block(),this.adaptTiffPropAsSegment("xmp"),this.adaptTiffPropAsSegment("iptc"),this.adaptTiffPropAsSegment("icc")}}adaptTiffPropAsSegment(n){if(this.parsers.tiff[n]){let e=this.parsers.tiff[n];this.injectSegment(n,e)}}}O(M9,"type","tiff"),r1.set("tiff",M9);let Ti=B0("zlib");const Xi=["ihdr","iccp","text","itxt","exif"];class m9 extends K0{constructor(...n){super(...n),O(this,"catchError",(e=>this.errors.push(e))),O(this,"metaChunks",[]),O(this,"unknownChunks",[])}static canHandle(n,e){return e===35152&&n.getUint32(0)===2303741511&&n.getUint32(4)===218765834}async parse(){let{file:n}=this;await this.findPngChunksInRange(8,n.byteLength),await this.readSegments(this.metaChunks),this.findIhdr(),this.parseTextChunks(),await this.findExif().catch(this.catchError),await this.findXmp().catch(this.catchError),await this.findIcc().catch(this.catchError)}async findPngChunksInRange(n,e){let{file:t}=this;for(;n<e;){let A=t.getUint32(n),i=t.getUint32(n+4),a=t.getString(n+4,4).toLowerCase(),l=A+4+4+4,c={type:a,offset:n,length:l,start:n+4+4,size:A,marker:i};Xi.includes(a)?this.metaChunks.push(c):this.unknownChunks.push(c),n+=l}}parseTextChunks(){let n=this.metaChunks.filter((e=>e.type==="text"));for(let e of n){let[t,A]=this.file.getString(e.start,e.size).split("\0");this.injectKeyValToIhdr(t,A)}}injectKeyValToIhdr(n,e){let t=this.parsers.ihdr;t&&t.raw.set(n,e)}findIhdr(){let n=this.metaChunks.find((e=>e.type==="ihdr"));n&&this.options.ihdr.enabled!==!1&&this.createParser("ihdr",n.chunk)}async findExif(){let n=this.metaChunks.find((e=>e.type==="exif"));n&&this.injectSegment("tiff",n.chunk)}async findXmp(){let n=this.metaChunks.filter((e=>e.type==="itxt"));for(let e of n)e.chunk.getString(0,17)==="XML:com.adobe.xmp"&&this.injectSegment("xmp",e.chunk)}async findIcc(){let n=this.metaChunks.find((l=>l.type==="iccp"));if(!n)return;let{chunk:e}=n,t=e.getUint8Array(0,81),A=0;for(;A<80&&t[A]!==0;)A++;let i=A+2,a=e.getString(0,A);if(this.injectKeyValToIhdr("ProfileName",a),Z0){let l=await Ti,c=e.getUint8Array(i);c=l.inflateSync(c),this.injectSegment("icc",c)}}}O(m9,"type","png"),r1.set("png",m9),I2(d2,"interop",[[1,"InteropIndex"],[2,"InteropVersion"],[4096,"RelatedImageFileFormat"],[4097,"RelatedImageWidth"],[4098,"RelatedImageHeight"]]),T1(d2,"ifd0",[[11,"ProcessingSoftware"],[254,"SubfileType"],[255,"OldSubfileType"],[263,"Thresholding"],[264,"CellWidth"],[265,"CellLength"],[266,"FillOrder"],[269,"DocumentName"],[280,"MinSampleValue"],[281,"MaxSampleValue"],[285,"PageName"],[286,"XPosition"],[287,"YPosition"],[290,"GrayResponseUnit"],[297,"PageNumber"],[321,"HalftoneHints"],[322,"TileWidth"],[323,"TileLength"],[332,"InkSet"],[337,"TargetPrinter"],[18246,"Rating"],[18249,"RatingPercent"],[33550,"PixelScale"],[34264,"ModelTransform"],[34377,"PhotoshopSettings"],[50706,"DNGVersion"],[50707,"DNGBackwardVersion"],[50708,"UniqueCameraModel"],[50709,"LocalizedCameraModel"],[50736,"DNGLensInfo"],[50739,"ShadowScale"],[50740,"DNGPrivateData"],[33920,"IntergraphMatrix"],[33922,"ModelTiePoint"],[34118,"SEMInfo"],[34735,"GeoTiffDirectory"],[34736,"GeoTiffDoubleParams"],[34737,"GeoTiffAsciiParams"],[50341,"PrintIM"],[50721,"ColorMatrix1"],[50722,"ColorMatrix2"],[50723,"CameraCalibration1"],[50724,"CameraCalibration2"],[50725,"ReductionMatrix1"],[50726,"ReductionMatrix2"],[50727,"AnalogBalance"],[50728,"AsShotNeutral"],[50729,"AsShotWhiteXY"],[50730,"BaselineExposure"],[50731,"BaselineNoise"],[50732,"BaselineSharpness"],[50734,"LinearResponseLimit"],[50735,"CameraSerialNumber"],[50741,"MakerNoteSafety"],[50778,"CalibrationIlluminant1"],[50779,"CalibrationIlluminant2"],[50781,"RawDataUniqueID"],[50827,"OriginalRawFileName"],[50828,"OriginalRawFileData"],[50831,"AsShotICCProfile"],[50832,"AsShotPreProfileMatrix"],[50833,"CurrentICCProfile"],[50834,"CurrentPreProfileMatrix"],[50879,"ColorimetricReference"],[50885,"SRawType"],[50898,"PanasonicTitle"],[50899,"PanasonicTitle2"],[50931,"CameraCalibrationSig"],[50932,"ProfileCalibrationSig"],[50933,"ProfileIFD"],[50934,"AsShotProfileName"],[50936,"ProfileName"],[50937,"ProfileHueSatMapDims"],[50938,"ProfileHueSatMapData1"],[50939,"ProfileHueSatMapData2"],[50940,"ProfileToneCurve"],[50941,"ProfileEmbedPolicy"],[50942,"ProfileCopyright"],[50964,"ForwardMatrix1"],[50965,"ForwardMatrix2"],[50966,"PreviewApplicationName"],[50967,"PreviewApplicationVersion"],[50968,"PreviewSettingsName"],[50969,"PreviewSettingsDigest"],[50970,"PreviewColorSpace"],[50971,"PreviewDateTime"],[50972,"RawImageDigest"],[50973,"OriginalRawFileDigest"],[50981,"ProfileLookTableDims"],[50982,"ProfileLookTableData"],[51043,"TimeCodes"],[51044,"FrameRate"],[51058,"TStop"],[51081,"ReelName"],[51089,"OriginalDefaultFinalSize"],[51090,"OriginalBestQualitySize"],[51091,"OriginalDefaultCropSize"],[51105,"CameraLabel"],[51107,"ProfileHueSatMapEncoding"],[51108,"ProfileLookTableEncoding"],[51109,"BaselineExposureOffset"],[51110,"DefaultBlackRender"],[51111,"NewRawImageDigest"],[51112,"RawToPreviewGain"]]);let p9=[[273,"StripOffsets"],[279,"StripByteCounts"],[288,"FreeOffsets"],[289,"FreeByteCounts"],[291,"GrayResponseCurve"],[292,"T4Options"],[293,"T6Options"],[300,"ColorResponseUnit"],[320,"ColorMap"],[324,"TileOffsets"],[325,"TileByteCounts"],[326,"BadFaxLines"],[327,"CleanFaxData"],[328,"ConsecutiveBadFaxLines"],[330,"SubIFD"],[333,"InkNames"],[334,"NumberofInks"],[336,"DotRange"],[338,"ExtraSamples"],[339,"SampleFormat"],[340,"SMinSampleValue"],[341,"SMaxSampleValue"],[342,"TransferRange"],[343,"ClipPath"],[344,"XClipPathUnits"],[345,"YClipPathUnits"],[346,"Indexed"],[347,"JPEGTables"],[351,"OPIProxy"],[400,"GlobalParametersIFD"],[401,"ProfileType"],[402,"FaxProfile"],[403,"CodingMethods"],[404,"VersionYear"],[405,"ModeNumber"],[433,"Decode"],[434,"DefaultImageColor"],[435,"T82Options"],[437,"JPEGTables"],[512,"JPEGProc"],[515,"JPEGRestartInterval"],[517,"JPEGLosslessPredictors"],[518,"JPEGPointTransforms"],[519,"JPEGQTables"],[520,"JPEGDCTables"],[521,"JPEGACTables"],[559,"StripRowCounts"],[999,"USPTOMiscellaneous"],[18247,"XP_DIP_XML"],[18248,"StitchInfo"],[28672,"SonyRawFileType"],[28688,"SonyToneCurve"],[28721,"VignettingCorrection"],[28722,"VignettingCorrParams"],[28724,"ChromaticAberrationCorrection"],[28725,"ChromaticAberrationCorrParams"],[28726,"DistortionCorrection"],[28727,"DistortionCorrParams"],[29895,"SonyCropTopLeft"],[29896,"SonyCropSize"],[32781,"ImageID"],[32931,"WangTag1"],[32932,"WangAnnotation"],[32933,"WangTag3"],[32934,"WangTag4"],[32953,"ImageReferencePoints"],[32954,"RegionXformTackPoint"],[32955,"WarpQuadrilateral"],[32956,"AffineTransformMat"],[32995,"Matteing"],[32996,"DataType"],[32997,"ImageDepth"],[32998,"TileDepth"],[33300,"ImageFullWidth"],[33301,"ImageFullHeight"],[33302,"TextureFormat"],[33303,"WrapModes"],[33304,"FovCot"],[33305,"MatrixWorldToScreen"],[33306,"MatrixWorldToCamera"],[33405,"Model2"],[33421,"CFARepeatPatternDim"],[33422,"CFAPattern2"],[33423,"BatteryLevel"],[33424,"KodakIFD"],[33445,"MDFileTag"],[33446,"MDScalePixel"],[33447,"MDColorTable"],[33448,"MDLabName"],[33449,"MDSampleInfo"],[33450,"MDPrepDate"],[33451,"MDPrepTime"],[33452,"MDFileUnits"],[33589,"AdventScale"],[33590,"AdventRevision"],[33628,"UIC1Tag"],[33629,"UIC2Tag"],[33630,"UIC3Tag"],[33631,"UIC4Tag"],[33918,"IntergraphPacketData"],[33919,"IntergraphFlagRegisters"],[33921,"INGRReserved"],[34016,"Site"],[34017,"ColorSequence"],[34018,"IT8Header"],[34019,"RasterPadding"],[34020,"BitsPerRunLength"],[34021,"BitsPerExtendedRunLength"],[34022,"ColorTable"],[34023,"ImageColorIndicator"],[34024,"BackgroundColorIndicator"],[34025,"ImageColorValue"],[34026,"BackgroundColorValue"],[34027,"PixelIntensityRange"],[34028,"TransparencyIndicator"],[34029,"ColorCharacterization"],[34030,"HCUsage"],[34031,"TrapIndicator"],[34032,"CMYKEquivalent"],[34152,"AFCP_IPTC"],[34232,"PixelMagicJBIGOptions"],[34263,"JPLCartoIFD"],[34306,"WB_GRGBLevels"],[34310,"LeafData"],[34687,"TIFF_FXExtensions"],[34688,"MultiProfiles"],[34689,"SharedData"],[34690,"T88Options"],[34732,"ImageLayer"],[34750,"JBIGOptions"],[34856,"Opto-ElectricConvFactor"],[34857,"Interlace"],[34908,"FaxRecvParams"],[34909,"FaxSubAddress"],[34910,"FaxRecvTime"],[34929,"FedexEDR"],[34954,"LeafSubIFD"],[37387,"FlashEnergy"],[37388,"SpatialFrequencyResponse"],[37389,"Noise"],[37390,"FocalPlaneXResolution"],[37391,"FocalPlaneYResolution"],[37392,"FocalPlaneResolutionUnit"],[37397,"ExposureIndex"],[37398,"TIFF-EPStandardID"],[37399,"SensingMethod"],[37434,"CIP3DataFile"],[37435,"CIP3Sheet"],[37436,"CIP3Side"],[37439,"StoNits"],[37679,"MSDocumentText"],[37680,"MSPropertySetStorage"],[37681,"MSDocumentTextPosition"],[37724,"ImageSourceData"],[40965,"InteropIFD"],[40976,"SamsungRawPointersOffset"],[40977,"SamsungRawPointersLength"],[41217,"SamsungRawByteOrder"],[41218,"SamsungRawUnknown"],[41484,"SpatialFrequencyResponse"],[41485,"Noise"],[41489,"ImageNumber"],[41490,"SecurityClassification"],[41491,"ImageHistory"],[41494,"TIFF-EPStandardID"],[41995,"DeviceSettingDescription"],[42112,"GDALMetadata"],[42113,"GDALNoData"],[44992,"ExpandSoftware"],[44993,"ExpandLens"],[44994,"ExpandFilm"],[44995,"ExpandFilterLens"],[44996,"ExpandScanner"],[44997,"ExpandFlashLamp"],[46275,"HasselbladRawImage"],[48129,"PixelFormat"],[48130,"Transformation"],[48131,"Uncompressed"],[48132,"ImageType"],[48256,"ImageWidth"],[48257,"ImageHeight"],[48258,"WidthResolution"],[48259,"HeightResolution"],[48320,"ImageOffset"],[48321,"ImageByteCount"],[48322,"AlphaOffset"],[48323,"AlphaByteCount"],[48324,"ImageDataDiscard"],[48325,"AlphaDataDiscard"],[50215,"OceScanjobDesc"],[50216,"OceApplicationSelector"],[50217,"OceIDNumber"],[50218,"OceImageLogic"],[50255,"Annotations"],[50459,"HasselbladExif"],[50547,"OriginalFileName"],[50560,"USPTOOriginalContentType"],[50656,"CR2CFAPattern"],[50710,"CFAPlaneColor"],[50711,"CFALayout"],[50712,"LinearizationTable"],[50713,"BlackLevelRepeatDim"],[50714,"BlackLevel"],[50715,"BlackLevelDeltaH"],[50716,"BlackLevelDeltaV"],[50717,"WhiteLevel"],[50718,"DefaultScale"],[50719,"DefaultCropOrigin"],[50720,"DefaultCropSize"],[50733,"BayerGreenSplit"],[50737,"ChromaBlurRadius"],[50738,"AntiAliasStrength"],[50752,"RawImageSegmentation"],[50780,"BestQualityScale"],[50784,"AliasLayerMetadata"],[50829,"ActiveArea"],[50830,"MaskedAreas"],[50935,"NoiseReductionApplied"],[50974,"SubTileBlockSize"],[50975,"RowInterleaveFactor"],[51008,"OpcodeList1"],[51009,"OpcodeList2"],[51022,"OpcodeList3"],[51041,"NoiseProfile"],[51114,"CacheVersion"],[51125,"DefaultUserCrop"],[51157,"NikonNEFInfo"],[65024,"KdcIFD"]];T1(d2,"ifd0",p9),T1(d2,"exif",p9),I2(T2,"gps",[[23,{M:"Magnetic North",T:"True North"}],[25,{K:"Kilometers",M:"Miles",N:"Nautical Miles"}]]);class F7 extends X2{static canHandle(n,e){return n.getUint8(e+1)===224&&n.getUint32(e+4)===1246120262&&n.getUint8(e+8)===0}parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint16(0)],[2,this.chunk.getUint8(2)],[3,this.chunk.getUint16(3)],[5,this.chunk.getUint16(5)],[7,this.chunk.getUint8(7)],[8,this.chunk.getUint8(8)]])}}O(F7,"type","jfif"),O(F7,"headerLength",9),E2.set("jfif",F7),I2(d2,"jfif",[[0,"JFIFVersion"],[2,"ResolutionUnit"],[3,"XResolution"],[5,"YResolution"],[7,"ThumbnailWidth"],[8,"ThumbnailHeight"]]);class v9 extends X2{parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint32(0)],[4,this.chunk.getUint32(4)],[8,this.chunk.getUint8(8)],[9,this.chunk.getUint8(9)],[10,this.chunk.getUint8(10)],[11,this.chunk.getUint8(11)],[12,this.chunk.getUint8(12)],...Array.from(this.raw)])}}O(v9,"type","ihdr"),E2.set("ihdr",v9),I2(d2,"ihdr",[[0,"ImageWidth"],[4,"ImageHeight"],[8,"BitDepth"],[9,"ColorType"],[10,"Compression"],[11,"Filter"],[12,"Interlace"]]),I2(T2,"ihdr",[[9,{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha",DEFAULT:"Unknown"}],[10,{0:"Deflate/Inflate",DEFAULT:"Unknown"}],[11,{0:"Adaptive",DEFAULT:"Unknown"}],[12,{0:"Noninterlaced",1:"Adam7 Interlace",DEFAULT:"Unknown"}]]);class k0 extends X2{static canHandle(n,e){return n.getUint8(e+1)===226&&n.getUint32(e+4)===1229144927}static findPosition(n,e){let t=super.findPosition(n,e);return t.chunkNumber=n.getUint8(e+16),t.chunkCount=n.getUint8(e+17),t.multiSegment=t.chunkCount>1,t}static handleMultiSegments(n){return(function(e){let t=(function(A){let i=A[0].constructor,a=0;for(let o of A)a+=o.length;let l=new i(a),c=0;for(let o of A)l.set(o,c),c+=o.length;return l})(e.map((A=>A.chunk.toUint8())));return new S2(t)})(n)}parse(){return this.raw=new Map,this.parseHeader(),this.parseTags(),this.translate(),this.output}parseHeader(){let{raw:n}=this;this.chunk.byteLength<84&&f2("ICC header is too short");for(let[e,t]of Object.entries(Gi)){e=parseInt(e,10);let A=t(this.chunk,e);A!=="\0\0\0\0"&&n.set(e,A)}}parseTags(){let n,e,t,A,i,{raw:a}=this,l=this.chunk.getUint32(128),c=132,o=this.chunk.byteLength;for(;l--;){if(n=this.chunk.getString(c,4),e=this.chunk.getUint32(c+4),t=this.chunk.getUint32(c+8),A=this.chunk.getString(e,4),e+t>o)return void console.warn("reached the end of the first ICC chunk. Enable options.tiff.multiSegment to read all ICC segments.");i=this.parseTag(A,e,t),i!==void 0&&i!=="\0\0\0\0"&&a.set(n,i),c+=12}}parseTag(n,e,t){switch(n){case"desc":return this.parseDesc(e);case"mluc":return this.parseMluc(e);case"text":return this.parseText(e,t);case"sig ":return this.parseSig(e)}if(!(e+t>this.chunk.byteLength))return this.chunk.getUint8Array(e,t)}parseDesc(n){let e=this.chunk.getUint32(n+8)-1;return y1(this.chunk.getString(n+12,e))}parseText(n,e){return y1(this.chunk.getString(n+8,e-8))}parseSig(n){return y1(this.chunk.getString(n+8,4))}parseMluc(n){let{chunk:e}=this,t=e.getUint32(n+8),A=e.getUint32(n+12),i=n+16,a=[];for(let l=0;l<t;l++){let c=e.getString(i+0,2),o=e.getString(i+2,2),f=e.getUint32(i+4),E=e.getUint32(i+8)+n,u=y1(e.getUnicodeString(E,f));a.push({lang:c,country:o,text:u}),i+=A}return t===1?a[0].text:a}translateValue(n,e){return typeof n=="string"?e[n]||e[n.toLowerCase()]||n:e[n]||n}}O(k0,"type","icc"),O(k0,"multiSegment",!0),O(k0,"headerLength",18);const Gi={4:C1,8:function(r,n){return[r.getUint8(n),r.getUint8(n+1)>>4,r.getUint8(n+1)%16].map((e=>e.toString(10))).join(".")},12:C1,16:C1,20:C1,24:function(r,n){const e=r.getUint16(n),t=r.getUint16(n+2)-1,A=r.getUint16(n+4),i=r.getUint16(n+6),a=r.getUint16(n+8),l=r.getUint16(n+10);return new Date(Date.UTC(e,t,A,i,a,l))},36:C1,40:C1,48:C1,52:C1,64:(r,n)=>r.getUint32(n),80:C1};function C1(r,n){return y1(r.getString(n,4))}E2.set("icc",k0),I2(d2,"icc",[[4,"ProfileCMMType"],[8,"ProfileVersion"],[12,"ProfileClass"],[16,"ColorSpaceData"],[20,"ProfileConnectionSpace"],[24,"ProfileDateTime"],[36,"ProfileFileSignature"],[40,"PrimaryPlatform"],[44,"CMMFlags"],[48,"DeviceManufacturer"],[52,"DeviceModel"],[56,"DeviceAttributes"],[64,"RenderingIntent"],[68,"ConnectionSpaceIlluminant"],[80,"ProfileCreator"],[84,"ProfileID"],["Header","ProfileHeader"],["MS00","WCSProfiles"],["bTRC","BlueTRC"],["bXYZ","BlueMatrixColumn"],["bfd","UCRBG"],["bkpt","MediaBlackPoint"],["calt","CalibrationDateTime"],["chad","ChromaticAdaptation"],["chrm","Chromaticity"],["ciis","ColorimetricIntentImageState"],["clot","ColorantTableOut"],["clro","ColorantOrder"],["clrt","ColorantTable"],["cprt","ProfileCopyright"],["crdi","CRDInfo"],["desc","ProfileDescription"],["devs","DeviceSettings"],["dmdd","DeviceModelDesc"],["dmnd","DeviceMfgDesc"],["dscm","ProfileDescriptionML"],["fpce","FocalPlaneColorimetryEstimates"],["gTRC","GreenTRC"],["gXYZ","GreenMatrixColumn"],["gamt","Gamut"],["kTRC","GrayTRC"],["lumi","Luminance"],["meas","Measurement"],["meta","Metadata"],["mmod","MakeAndModel"],["ncl2","NamedColor2"],["ncol","NamedColor"],["ndin","NativeDisplayInfo"],["pre0","Preview0"],["pre1","Preview1"],["pre2","Preview2"],["ps2i","PS2RenderingIntent"],["ps2s","PostScript2CSA"],["psd0","PostScript2CRD0"],["psd1","PostScript2CRD1"],["psd2","PostScript2CRD2"],["psd3","PostScript2CRD3"],["pseq","ProfileSequenceDesc"],["psid","ProfileSequenceIdentifier"],["psvm","PS2CRDVMSize"],["rTRC","RedTRC"],["rXYZ","RedMatrixColumn"],["resp","OutputResponse"],["rhoc","ReflectionHardcopyOrigColorimetry"],["rig0","PerceptualRenderingIntentGamut"],["rig2","SaturationRenderingIntentGamut"],["rpoc","ReflectionPrintOutputColorimetry"],["sape","SceneAppearanceEstimates"],["scoe","SceneColorimetryEstimates"],["scrd","ScreeningDesc"],["scrn","Screening"],["targ","CharTarget"],["tech","Technology"],["vcgt","VideoCardGamma"],["view","ViewingConditions"],["vued","ViewingCondDesc"],["wtpt","MediaWhitePoint"]]);const j0={"4d2p":"Erdt Systems",AAMA:"Aamazing Technologies",ACER:"Acer",ACLT:"Acolyte Color Research",ACTI:"Actix Sytems",ADAR:"Adara Technology",ADBE:"Adobe",ADI:"ADI Systems",AGFA:"Agfa Graphics",ALMD:"Alps Electric",ALPS:"Alps Electric",ALWN:"Alwan Color Expertise",AMTI:"Amiable Technologies",AOC:"AOC International",APAG:"Apago",APPL:"Apple Computer",AST:"AST","AT&T":"AT&T",BAEL:"BARBIERI electronic",BRCO:"Barco NV",BRKP:"Breakpoint",BROT:"Brother",BULL:"Bull",BUS:"Bus Computer Systems","C-IT":"C-Itoh",CAMR:"Intel",CANO:"Canon",CARR:"Carroll Touch",CASI:"Casio",CBUS:"Colorbus PL",CEL:"Crossfield",CELx:"Crossfield",CGS:"CGS Publishing Technologies International",CHM:"Rochester Robotics",CIGL:"Colour Imaging Group, London",CITI:"Citizen",CL00:"Candela",CLIQ:"Color IQ",CMCO:"Chromaco",CMiX:"CHROMiX",COLO:"Colorgraphic Communications",COMP:"Compaq",COMp:"Compeq/Focus Technology",CONR:"Conrac Display Products",CORD:"Cordata Technologies",CPQ:"Compaq",CPRO:"ColorPro",CRN:"Cornerstone",CTX:"CTX International",CVIS:"ColorVision",CWC:"Fujitsu Laboratories",DARI:"Darius Technology",DATA:"Dataproducts",DCP:"Dry Creek Photo",DCRC:"Digital Contents Resource Center, Chung-Ang University",DELL:"Dell Computer",DIC:"Dainippon Ink and Chemicals",DICO:"Diconix",DIGI:"Digital","DL&C":"Digital Light & Color",DPLG:"Doppelganger",DS:"Dainippon Screen",DSOL:"DOOSOL",DUPN:"DuPont",EPSO:"Epson",ESKO:"Esko-Graphics",ETRI:"Electronics and Telecommunications Research Institute",EVER:"Everex Systems",EXAC:"ExactCODE",Eizo:"Eizo",FALC:"Falco Data Products",FF:"Fuji Photo Film",FFEI:"FujiFilm Electronic Imaging",FNRD:"Fnord Software",FORA:"Fora",FORE:"Forefront Technology",FP:"Fujitsu",FPA:"WayTech Development",FUJI:"Fujitsu",FX:"Fuji Xerox",GCC:"GCC Technologies",GGSL:"Global Graphics Software",GMB:"Gretagmacbeth",GMG:"GMG",GOLD:"GoldStar Technology",GOOG:"Google",GPRT:"Giantprint",GTMB:"Gretagmacbeth",GVC:"WayTech Development",GW2K:"Sony",HCI:"HCI",HDM:"Heidelberger Druckmaschinen",HERM:"Hermes",HITA:"Hitachi America",HP:"Hewlett-Packard",HTC:"Hitachi",HiTi:"HiTi Digital",IBM:"IBM",IDNT:"Scitex",IEC:"Hewlett-Packard",IIYA:"Iiyama North America",IKEG:"Ikegami Electronics",IMAG:"Image Systems",IMI:"Ingram Micro",INTC:"Intel",INTL:"N/A (INTL)",INTR:"Intra Electronics",IOCO:"Iocomm International Technology",IPS:"InfoPrint Solutions Company",IRIS:"Scitex",ISL:"Ichikawa Soft Laboratory",ITNL:"N/A (ITNL)",IVM:"IVM",IWAT:"Iwatsu Electric",Idnt:"Scitex",Inca:"Inca Digital Printers",Iris:"Scitex",JPEG:"Joint Photographic Experts Group",JSFT:"Jetsoft Development",JVC:"JVC Information Products",KART:"Scitex",KFC:"KFC Computek Components",KLH:"KLH Computers",KMHD:"Konica Minolta",KNCA:"Konica",KODA:"Kodak",KYOC:"Kyocera",Kart:"Scitex",LCAG:"Leica",LCCD:"Leeds Colour",LDAK:"Left Dakota",LEAD:"Leading Technology",LEXM:"Lexmark International",LINK:"Link Computer",LINO:"Linotronic",LITE:"Lite-On",Leaf:"Leaf",Lino:"Linotronic",MAGC:"Mag Computronic",MAGI:"MAG Innovision",MANN:"Mannesmann",MICN:"Micron Technology",MICR:"Microtek",MICV:"Microvitec",MINO:"Minolta",MITS:"Mitsubishi Electronics America",MITs:"Mitsuba",MNLT:"Minolta",MODG:"Modgraph",MONI:"Monitronix",MONS:"Monaco Systems",MORS:"Morse Technology",MOTI:"Motive Systems",MSFT:"Microsoft",MUTO:"MUTOH INDUSTRIES",Mits:"Mitsubishi Electric",NANA:"NANAO",NEC:"NEC",NEXP:"NexPress Solutions",NISS:"Nissei Sangyo America",NKON:"Nikon",NONE:"none",OCE:"Oce Technologies",OCEC:"OceColor",OKI:"Oki",OKID:"Okidata",OKIP:"Okidata",OLIV:"Olivetti",OLYM:"Olympus",ONYX:"Onyx Graphics",OPTI:"Optiquest",PACK:"Packard Bell",PANA:"Matsushita Electric Industrial",PANT:"Pantone",PBN:"Packard Bell",PFU:"PFU",PHIL:"Philips Consumer Electronics",PNTX:"HOYA",POne:"Phase One A/S",PREM:"Premier Computer Innovations",PRIN:"Princeton Graphic Systems",PRIP:"Princeton Publishing Labs",QLUX:"Hong Kong",QMS:"QMS",QPCD:"QPcard AB",QUAD:"QuadLaser",QUME:"Qume",RADI:"Radius",RDDx:"Integrated Color Solutions",RDG:"Roland DG",REDM:"REDMS Group",RELI:"Relisys",RGMS:"Rolf Gierling Multitools",RICO:"Ricoh",RNLD:"Edmund Ronald",ROYA:"Royal",RPC:"Ricoh Printing Systems",RTL:"Royal Information Electronics",SAMP:"Sampo",SAMS:"Samsung",SANT:"Jaime Santana Pomares",SCIT:"Scitex",SCRN:"Dainippon Screen",SDP:"Scitex",SEC:"Samsung",SEIK:"Seiko Instruments",SEIk:"Seikosha",SGUY:"ScanGuy.com",SHAR:"Sharp Laboratories",SICC:"International Color Consortium",SONY:"Sony",SPCL:"SpectraCal",STAR:"Star",STC:"Sampo Technology",Scit:"Scitex",Sdp:"Scitex",Sony:"Sony",TALO:"Talon Technology",TAND:"Tandy",TATU:"Tatung",TAXA:"TAXAN America",TDS:"Tokyo Denshi Sekei",TECO:"TECO Information Systems",TEGR:"Tegra",TEKT:"Tektronix",TI:"Texas Instruments",TMKR:"TypeMaker",TOSB:"Toshiba",TOSH:"Toshiba",TOTK:"TOTOKU ELECTRIC",TRIU:"Triumph",TSBT:"Toshiba",TTX:"TTX Computer Products",TVM:"TVM Professional Monitor",TW:"TW Casper",ULSX:"Ulead Systems",UNIS:"Unisys",UTZF:"Utz Fehlau & Sohn",VARI:"Varityper",VIEW:"Viewsonic",VISL:"Visual communication",VIVO:"Vivo Mobile Communication",WANG:"Wang",WLBR:"Wilbur Imaging",WTG2:"Ware To Go",WYSE:"WYSE Technology",XERX:"Xerox",XRIT:"X-Rite",ZRAN:"Zoran",Zebr:"Zebra Technologies",appl:"Apple Computer",bICC:"basICColor",berg:"bergdesign",ceyd:"Integrated Color Solutions",clsp:"MacDermid ColorSpan",ds:"Dainippon Screen",dupn:"DuPont",ffei:"FujiFilm Electronic Imaging",flux:"FluxData",iris:"Scitex",kart:"Scitex",lcms:"Little CMS",lino:"Linotronic",none:"none",ob4d:"Erdt Systems",obic:"Medigraph",quby:"Qubyx Sarl",scit:"Scitex",scrn:"Dainippon Screen",sdp:"Scitex",siwi:"SIWI GRAFIKA",yxym:"YxyMaster"},h9={scnr:"Scanner",mntr:"Monitor",prtr:"Printer",link:"Device Link",abst:"Abstract",spac:"Color Space Conversion Profile",nmcl:"Named Color",cenc:"ColorEncodingSpace profile",mid:"MultiplexIdentification profile",mlnk:"MultiplexLink profile",mvis:"MultiplexVisualization profile",nkpf:"Nikon Input Device Profile (NON-STANDARD!)"};I2(T2,"icc",[[4,j0],[12,h9],[40,Object.assign({},j0,h9)],[48,j0],[80,j0],[64,{0:"Perceptual",1:"Relative Colorimetric",2:"Saturation",3:"Absolute Colorimetric"}],["tech",{amd:"Active Matrix Display",crt:"Cathode Ray Tube Display",kpcd:"Photo CD",pmd:"Passive Matrix Display",dcam:"Digital Camera",dcpj:"Digital Cinema Projector",dmpc:"Digital Motion Picture Camera",dsub:"Dye Sublimation Printer",epho:"Electrophotographic Printer",esta:"Electrostatic Printer",flex:"Flexography",fprn:"Film Writer",fscn:"Film Scanner",grav:"Gravure",ijet:"Ink Jet Printer",imgs:"Photo Image Setter",mpfr:"Motion Picture Film Recorder",mpfs:"Motion Picture Film Scanner",offs:"Offset Lithography",pjtv:"Projection Television",rpho:"Photographic Paper Printer",rscn:"Reflective Scanner",silk:"Silkscreen",twax:"Thermal Wax Printer",vidc:"Video Camera",vidm:"Video Monitor"}]]);class y0 extends X2{static canHandle(n,e,t){return n.getUint8(e+1)===237&&n.getString(e+4,9)==="Photoshop"&&this.containsIptc8bim(n,e,t)!==void 0}static headerLength(n,e,t){let A,i=this.containsIptc8bim(n,e,t);if(i!==void 0)return A=n.getUint8(e+i+7),A%2!=0&&(A+=1),A===0&&(A=4),i+8+A}static containsIptc8bim(n,e,t){for(let A=0;A<t;A++)if(this.isIptcSegmentHead(n,e+A))return A}static isIptcSegmentHead(n,e){return n.getUint8(e)===56&&n.getUint32(e)===943868237&&n.getUint16(e+4)===1028}parse(){let{raw:n}=this,e=this.chunk.byteLength-1,t=!1;for(let A=0;A<e;A++)if(this.chunk.getUint8(A)===28&&this.chunk.getUint8(A+1)===2){t=!0;let i=this.chunk.getUint16(A+3),a=this.chunk.getUint8(A+2),l=this.chunk.getLatin1String(A+5,i);n.set(a,this.pluralizeValue(n.get(a),l)),A+=4+i}else if(t)break;return this.translate(),this.output}pluralizeValue(n,e){return n!==void 0?n instanceof Array?(n.push(e),n):[n,e]:e}}O(y0,"type","iptc"),O(y0,"translateValues",!1),O(y0,"reviveValues",!1),E2.set("iptc",y0),I2(d2,"iptc",[[0,"ApplicationRecordVersion"],[3,"ObjectTypeReference"],[4,"ObjectAttributeReference"],[5,"ObjectName"],[7,"EditStatus"],[8,"EditorialUpdate"],[10,"Urgency"],[12,"SubjectReference"],[15,"Category"],[20,"SupplementalCategories"],[22,"FixtureIdentifier"],[25,"Keywords"],[26,"ContentLocationCode"],[27,"ContentLocationName"],[30,"ReleaseDate"],[35,"ReleaseTime"],[37,"ExpirationDate"],[38,"ExpirationTime"],[40,"SpecialInstructions"],[42,"ActionAdvised"],[45,"ReferenceService"],[47,"ReferenceDate"],[50,"ReferenceNumber"],[55,"DateCreated"],[60,"TimeCreated"],[62,"DigitalCreationDate"],[63,"DigitalCreationTime"],[65,"OriginatingProgram"],[70,"ProgramVersion"],[75,"ObjectCycle"],[80,"Byline"],[85,"BylineTitle"],[90,"City"],[92,"Sublocation"],[95,"State"],[100,"CountryCode"],[101,"Country"],[103,"OriginalTransmissionReference"],[105,"Headline"],[110,"Credit"],[115,"Source"],[116,"CopyrightNotice"],[118,"Contact"],[120,"Caption"],[121,"LocalCaption"],[122,"Writer"],[125,"RasterizedCaption"],[130,"ImageType"],[131,"ImageOrientation"],[135,"LanguageIdentifier"],[150,"AudioType"],[151,"AudioSamplingRate"],[152,"AudioSamplingResolution"],[153,"AudioDuration"],[154,"AudioOutcue"],[184,"JobID"],[185,"MasterDocumentID"],[186,"ShortDocumentID"],[187,"UniqueDocumentID"],[188,"OwnerID"],[200,"ObjectPreviewFileFormat"],[201,"ObjectPreviewFileVersion"],[202,"ObjectPreviewData"],[221,"Prefs"],[225,"ClassifyState"],[228,"SimilarityIndex"],[230,"DocumentNotes"],[231,"DocumentHistory"],[232,"ExifCameraInfo"],[255,"CatalogSets"]]),I2(T2,"iptc",[[10,{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"}],[75,{a:"Morning",b:"Both Morning and Evening",p:"Evening"}],[131,{L:"Landscape",P:"Portrait",S:"Square"}]]);const h2=[];for(let r=0;r<256;++r)h2.push((r+256).toString(16).slice(1));function Pi(r,n=0){return(h2[r[n+0]]+h2[r[n+1]]+h2[r[n+2]]+h2[r[n+3]]+"-"+h2[r[n+4]]+h2[r[n+5]]+"-"+h2[r[n+6]]+h2[r[n+7]]+"-"+h2[r[n+8]]+h2[r[n+9]]+"-"+h2[r[n+10]]+h2[r[n+11]]+h2[r[n+12]]+h2[r[n+13]]+h2[r[n+14]]+h2[r[n+15]]).toLowerCase()}let L7;const Hi=new Uint8Array(16);function Ji(){if(!L7){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");L7=crypto.getRandomValues.bind(crypto)}return L7(Hi)}const z9={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function w7(r,n,e){var A;if(z9.randomUUID&&!r)return z9.randomUUID();r=r||{};const t=r.random??((A=r.rng)==null?void 0:A.call(r))??Ji();if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=t[6]&15|64,t[8]=t[8]&63|128,Pi(t)}const Fi=async()=>new Promise(r=>{setTimeout(()=>{r({storageId:w7(),success:!0})},2500)}),Li=async()=>new Promise(r=>{setTimeout(()=>{r()},2500)}),g9=d.createContext({uploadFile:Fi,deleteFile:Li}),u3={itemWrapper:"_itemWrapper_1bl5e_7",title:"_title_1bl5e_20",filePreview:"_filePreview_1bl5e_24",subtitle:"_subtitle_1bl5e_43",fileData:"_fileData_1bl5e_47",buttonContainer:"_buttonContainer_1bl5e_59"},Q9=r=>r.startsWith("text")||r.endsWith("pdf")?"description":r.startsWith("image")?"image":r.endsWith("json")?"code_blocks":"anchor";function wi({file:r,t:n,onDeleteFile:e}){return I.jsxs(j,{className:u3.itemWrapper,children:[I.jsx(j,{className:u3.filePreview,children:r.thumbnailUri?I.jsx("img",{src:r.thumbnailUri,alt:r.fileName||n("unknownFilename")}):I.jsx(L,{size:"lg",material:Q9(r.contentType)})}),I.jsxs(j,{className:u3.fileData,children:[I.jsx(M.Paragraph,{className:u3.title,children:r.fileName}),I.jsx(M.Paragraph,{className:u3.subtitle,"data-size":"sm",children:r.status==="uploading"?n("uploading"):O3(r.sizeInBytes)}),r.status==="error"&&I.jsx(M.ValidationMessage,{children:r.error})]}),I.jsxs(j,{align:"center",className:u3.buttonContainer,children:[(r.status==="uploaded"||r.status==="error")&&I.jsx(z2,{onClick:()=>e(r),"aria-label":n("removeFileAriaLabel"),icon:!0,variant:"ghost",color:"neutral",children:I.jsx(L,{material:"delete"})}),r.status==="uploading"&&I.jsx(M.Spinner,{"aria-label":n("uploading"),"data-size":"xs","data-color":"neutral"})]})]})}const Di=(r,n,e,t,A,i)=>{const a=[...n],l={},{acceptedFiles:c,rejectedFiles:o}=Ni(r,n.length,i);c.forEach(f=>{const E=w7(),u=f.file.type.startsWith("image/")?URL.createObjectURL(f.file):void 0;a.push({contextId:E,fileName:f.file.name,status:"uploading",thumbnailUri:u,contentType:f.file.type,exif:f.exif,sizeInBytes:f.file.size}),l[E]=f.file}),o.forEach(f=>{const E=w7();a.push({contextId:E,fileName:f.file.file.name,status:"error",contentType:f.file.file.type,exif:f.file.exif,error:A(`errors.${f.reason}`),sizeInBytes:f.file.file.size})}),t(a),Object.keys(l).forEach(async f=>{try{const E=a.find(m=>m.contextId===f);if(!E)return;const u=new FormData;u.append("file",l[f],E.fileName);const s=await e(u);s.success?(E.storageId=s.storageId,E.status="uploaded",delete E.error):(E.status="error",E.error=A(`errors.${s.error||"unknown-error"}`)),t([...a])}catch(E){console.error("Error when uploading",E);const u=a.find(s=>s.contextId===f);if(!u)return;u.status="error",u.error=A("errors.unknown-error"),t([...a])}})},Ni=(r,n,e)=>{const t=[],A=[];for(const[i,a]of r.entries()){if(e===void 0){t.push(a);continue}const l=_i(a.file,e.maxSizeInBytes),c=$i(a.file,e.allowedFileTypes),o=e.maxFiles?n+i<e.maxFiles:!0;l?c?o?t.push(a):A.push({file:a,reason:"over-files-limit"}):A.push({file:a,reason:"invalid-file-type"}):A.push({file:a,reason:"file-too-large"})}return{acceptedFiles:t,rejectedFiles:A}},_i=(r,n)=>n===void 0?!0:r.size<=n,$i=(r,n)=>{if(n===void 0)return!0;const e=n.map(i=>i.trim().toLowerCase()).filter(Boolean);if(e.length===0)return!0;const t=r.name.toLowerCase(),A=r.type.toLowerCase();return e.some(i=>{if(i.startsWith("."))return t.endsWith(i);if(i.endsWith("/*")){const a=i.slice(0,-1);return A.startsWith(a)}return A===i})},u1={checkbox:"_checkbox_18i8p_2",dialogContent:"_dialogContent_18i8p_13",fileItem:"_fileItem_18i8p_18",filePreview:"_filePreview_18i8p_52",fileName:"_fileName_18i8p_72",selectFilesLabel:"_selectFilesLabel_18i8p_73",subtitle:"_subtitle_18i8p_76",listCard:"_listCard_18i8p_79"},ea=d.forwardRef(function({t:n,existingFiles:e,existingFilesProvider:t,onConfirm:A},i){const[a,l]=d.useState(!1),[c,o]=d.useState([]),[f,E]=d.useState(),[u,s]=d.useState({}),[m,h]=d.useState(null);d.useImperativeHandle(i,()=>({showModal:async()=>{m&&(m.open||m.showModal(),l(!0),v())},close:()=>{m==null||m.close()}}),[m,t,e]);const v=async()=>{try{const S=await t();o(S);const x=S.map(V=>V.files).flat();s(x.reduce((V,B)=>(B.storageId&&(V[B.storageId]=!!e.find(Q=>Q.storageId===B.storageId)),V),{}))}finally{l(!1)}},z=(S,x)=>{s(V=>({...V,[S]:x}))},Z=()=>{const S=c.map(R=>R.files).flat(),x=new Set(S.map(R=>R.storageId).filter(Boolean)),V=e.filter(R=>!R.storageId||!x.has(R.storageId)),B=S.filter(R=>R.storageId&&u[R.storageId]),Q=[...V];B.forEach(R=>{R.storageId&&!Q.some(q=>q.storageId===R.storageId)&&Q.push(R)}),A(Q),m==null||m.close()},b=()=>m==null?void 0:m.close();return I.jsxs(M.Dialog,{ref:h,closedby:"any",children:[I.jsx(M.DialogBlock,{children:I.jsx(M.Heading,{level:2,"data-size":"sm",children:n("existingFiles.dialogTitle")})}),I.jsxs(M.DialogBlock,{className:u1.dialogContent,children:[a&&I.jsx(j,{horizontal:!0,align:"center",justify:"center",children:I.jsx(M.Spinner,{"aria-label":n("loading")})}),!a&&c.length===0&&I.jsx(M.Paragraph,{children:n("existingFiles.noFilesAvailable")}),!a&&c.length>0&&I.jsxs(j,{gap:12,my:4,children:[f!==void 0&&I.jsxs(I.Fragment,{children:[I.jsxs(j,{gap:8,horizontal:!0,align:"center",children:[I.jsx(z2,{onClick:()=>E(void 0),"aria-label":n("existingFiles.goBackToCollectionAriaLabel"),icon:!0,color:"neutral",variant:"ghost",children:I.jsx(L,{size:"xl",material:"chevron_left"})}),I.jsxs(M.Heading,{children:[n("existingFiles.inMenuTitle"),' "',f.title,'"']})]}),I.jsx(M.Paragraph,{className:u1.selectFilesLabel,children:n("existingFiles.selectFilesLabel")}),f.files.map(S=>I.jsx(na,{file:S,handleExistingFileCheckboxChange:z,selectedExistingFiles:u,t:n},S.storageId))]}),f===void 0&&c.map(S=>I.jsx(ta,{existingFilesProviderItem:S,onClick:()=>E(S)},`${S.title}-${S.files.map(x=>x.storageId).sort().join(",")}`))]})]}),I.jsx(M.DialogBlock,{children:I.jsxs(j,{horizontal:!0,gap:16,children:[I.jsx(z2,{variant:"filled",onClick:Z,children:n("existingFiles.dialogConfirm")}),I.jsx(z2,{variant:"outline",onClick:b,children:n("existingFiles.dialogCancel")})]})})]})});function ta({existingFilesProviderItem:r,onClick:n}){return I.jsx(M.Card,{tabIndex:0,onKeyDown:e=>{e.key==="Enter"&&(e.preventDefault(),n())},className:u1.listCard,onClick:n,children:I.jsxs(j,{horizontal:!0,justify:"between",align:"center",children:[I.jsxs(j,{gap:4,children:[I.jsx(M.Heading,{children:r.title}),I.jsx(M.Paragraph,{className:u1.subtitle,children:r.label})]}),I.jsx(L,{material:"chevron_right"})]})})}function na({file:r,handleExistingFileCheckboxChange:n,selectedExistingFiles:e,t}){if(r.storageId!==void 0)return I.jsxs("div",{className:u1.fileItem,onClick:()=>{r.storageId&&n(r.storageId,!e[r.storageId])},children:[I.jsx(M.Checkbox,{label:null,className:u1.checkbox,checked:r.storageId&&e[r.storageId]||!1,onChange:A=>{r.storageId&&n(r.storageId,A.target.checked)},onKeyDown:A=>{A.key==="Enter"&&r.storageId&&n(r.storageId,!e[r.storageId])},onClick:A=>A.stopPropagation()}),I.jsxs(j,{gap:12,horizontal:!0,children:[I.jsx(j,{className:u1.filePreview,children:r.thumbnailUri?I.jsx("img",{src:r.thumbnailUri,alt:r.fileName||t("unknownFilename")}):I.jsx(L,{size:"lg",material:Q9(r.contentType)})}),I.jsxs(j,{gap:2,children:[I.jsx(M.Paragraph,{className:u1.fileName,children:r.fileName||t("unknownFilename")}),r.sizeInBytes&&I.jsx(M.Paragraph,{className:u1.subtitle,children:O3(r.sizeInBytes)})]})]})]})}const J1={uploadButton:"_uploadButton_1qljs_2",dropzone:"_dropzone_1qljs_10",active:"_active_1qljs_25",dropzoneText:"_dropzoneText_1qljs_30",dropzoneIcon:"_dropzoneIcon_1qljs_36",stretch:"_stretch_1qljs_47"};function ra({variant:r,fileInputRef:n,buttonLabel:e,onUploadFile:t,existingFilesProvider:A,dialogRef:i,t:a}){const[l,c]=d.useState(!1);return I.jsxs(j,{gap:4,mt:8,children:[r==="dropzone"&&I.jsxs("div",{role:"button","aria-label":a("dropzoneText"),tabIndex:0,onKeyDown:o=>{var f;(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),(f=n.current)==null||f.click())},onClick:()=>{var o;return(o=n.current)==null?void 0:o.click()},className:`${J1.dropzone} ${l?J1.active:""}`,onDragEnter:()=>c(!0),onDragOver:o=>o.preventDefault(),onDrop:o=>{o.preventDefault();const f=Array.from(o.dataTransfer.files);t(f),c(!1)},onDragLeave:()=>c(!1),children:[I.jsx("span",{className:J1.dropzoneIcon,children:I.jsx(L,{material:"upload"})}),I.jsx(M.Paragraph,{className:J1.dropzoneText,children:a("dropzoneText")})]}),I.jsxs(j,{gap:8,horizontal:!0,children:[r==="buttons"&&I.jsxs(z2,{className:`${J1.uploadButton}`,variant:"outline",onClick:()=>{var o;return(o=n.current)==null?void 0:o.click()},children:[I.jsx(L,{material:"upload"}),e??a("buttonLabel")]}),A&&I.jsxs(z2,{variant:"outline",className:`${J1.uploadButton} ${r!=="buttons"&&J1.stretch}`,onClick:()=>{var o;return(o=i.current)==null?void 0:o.showModal()},children:[I.jsx(L,{material:"folder_open"}),a("existingFiles.buttonOpen")]})]})]})}const Aa=r=>{if(r)return{latitude:r.latitude,longitude:r.longitude}},ia=[".pdf",".jpg",".jpeg",".png"],aa=({label:r,maxSizeInBytes:n,required:e,optional:t,description:A="",error:i=null,multiple:a=!0,files:l=[],buttonLabel:c,maxFiles:o,onChange:f,allowedFileTypes:E=ia,translations:u,existingFilesProvider:s,variant:m="buttons"})=>{const{at:h}=_0(),v=h.bind(null,"fileUploader",u),z=d.useContext(g9),Z=d.useRef(null),b=d.useRef(null),S=q=>{Promise.all(q.map(async W=>{try{return{file:W,exif:Aa(await Wi.parse(W))}}catch(k){return console.log("Error when parsing exif data, assuming image does not have any",k),{file:W}}})).then(W=>{Di(W,l,z.uploadFile,f,v,{allowedFileTypes:E,maxFiles:o,maxSizeInBytes:n})})},x=q=>{f(l.filter(W=>W.contextId!==q.contextId))},V=l.some(q=>q.status==="uploading"),B=!V&&o&&l.length>=o,Q=!B&&!V,R=v("attachmentsCount").replace("{count}",String(l.length));return I.jsxs(I.Fragment,{children:[I.jsxs(M.Field,{children:[I.jsx(M.Label,{style:{pointerEvents:"none"},children:I.jsx(P2,{text:r,required:e,optional:t})}),A&&I.jsx(M.Field.Description,{children:A}),I.jsx("input",{type:"file",style:{display:"none"},ref:Z,id:"fileUploadButton",name:"fileUploadButton",accept:E.join(","),multiple:a,onChange:q=>{const W=q.target;W.files&&W.files.length>0&&(S(Array.from(W.files)),W.value="")}}),Q&&I.jsx(ra,{buttonLabel:c,onUploadFile:S,dialogRef:b,fileInputRef:Z,t:v,existingFilesProvider:s,variant:m}),B&&I.jsxs("div",{className:S7.uploadInformation,children:[I.jsx(L,{material:"info"}),I.jsx("span",{children:v("maxFilesReached")})]}),V&&I.jsxs("div",{className:S7.uploadInformation,children:[I.jsx(M.Spinner,{"aria-label":v("uploading"),"data-size":"2xs","data-color":"neutral"}),I.jsx("span",{children:v("uploadingPleaseWait")})]}),l&&l.length>0&&I.jsxs("div",{className:S7.fileList,children:[I.jsx(M.Label,{style:{pointerEvents:"none"},children:R}),l.map(q=>I.jsx(wi,{file:q,t:v,onDeleteFile:x},q.contextId))]}),i&&I.jsx(M.ValidationMessage,{children:i})]}),s&&I.jsx(ea,{t:v,ref:b,existingFiles:l,existingFilesProvider:s,onConfirm:f})]})},la={icon:"_icon_1tg5o_1"},ca=({icon:r,href:n,children:e,level:t=2,size:A="sm"})=>I.jsxs(j,{horizontal:!0,justify:"between",children:[n?I.jsx(M.Heading,{"data-size":A,level:t,children:I.jsx("a",{className:"styrbord-card-link",href:n,children:e})}):I.jsx(M.Heading,{"data-size":A,level:t,children:e}),r&&I.jsx(L,{material:r,className:la.icon})]}),O0={href:"_href_1cqrf_1",dashed:"_dashed_1cqrf_6",outline:"_outline_1cqrf_16",subtle:"_subtle_1cqrf_33"},z2=({variant:r="outline",color:n=void 0,size:e="md",text:t=void 0,href:A=void 0,target:i="_blank",...a})=>{const l={...a};switch(r){case"filled":l.variant="primary";break;case"outline":l.variant="secondary",l.className=[l.className,O0.outline].join(" ");break;case"ghost":l.variant="tertiary";break;case"subtle":l.variant="primary",l.className=[l.className,O0.subtle].join(" ");break;case"dashed":l.variant="secondary",l.className=[l.className,O0.dashed].join(" ");break}return l["data-color"]=n,l["data-size"]=e,A&&(l.className=[l.className,O0.href].join(" ")),t&&A?(l.children=I.jsx("a",{href:A,target:i,rel:"noreferrer",children:t}),l.asChild=!0):t?l.children=t:A&&(l.children=I.jsx("a",{href:A,target:i,rel:"noreferrer",children:l.children}),l.asChild=!0),I.jsx(M.Button,{...l})},F1={sizeXxs:"_sizeXxs_18dzk_2",sizeXs:"_sizeXs_18dzk_7",sizeSm:"_sizeSm_18dzk_12",sizeMd:"_sizeMd_18dzk_16",sizeLg:"_sizeLg_18dzk_21",sizeFull:"_sizeFull_18dzk_26",sizeFit:"_sizeFit_18dzk_30"},D7=r=>{switch(r){case"2xs":return F1.sizeXxs;case"xs":return F1.sizeXs;case"sm":return F1.sizeSm;case"md":return F1.sizeMd;case"lg":return F1.sizeLg;case"full":return F1.sizeFull;case"fit":return F1.sizeFit}},oa=({size:r="full",type:n="text",className:e,label:t,loading:A,required:i,optional:a,onChange:l,value:c,...o})=>I.jsx(M.Textfield,{className:`${e} ${D7(r)}`,label:I.jsx(P2,{text:t,loading:A,required:i,optional:a}),value:c??"",onChange:f=>{l==null||l(f.target.value)},type:n,...o}),Ia={"align-right":"_align-right_dttaq_1"},fa=({size:r="full",inputMode:n="numeric",className:e,align:t="left",...A})=>{var l;const[i,a]=d.useState((l=A.value)==null?void 0:l.toString());return d.useEffect(()=>{var c,o;((c=A.value)==null?void 0:c.toString())!==i&&a((o=A.value)==null?void 0:o.toString())},[A.value]),I.jsx(M.Textfield,{id:A.id,className:[e,D7(r),Ia["align-"+t]].join(" "),label:I.jsx(P2,{text:A.label,required:A.required,optional:A.optional}),description:A.description,readOnly:A.readOnly,placeholder:A.placeholder,disabled:A.disabled,value:i??"",onBlur:A.onBlur,onChange:c=>{var f,E;let o=c.target.value.replace(",",".").replace(/[^0-9.,-]/g,"");for(;o.split(".").length>2;)o=o.replace(".","");[",","."].includes(o[o.length-1])||o==="-"||isNaN(Number(o))?a(o):o.length>0?(a(o),(f=A.onChange)==null||f.call(A,parseFloat(o))):(a(""),(E=A.onChange)==null||E.call(A,void 0))},inputMode:n,error:A.error,prefix:A.prefix,suffix:A.suffix,type:"text",min:A.min,max:A.max})},Ea=({size:r="full",className:n,label:e,required:t,optional:A,onChange:i,value:a,...l})=>I.jsx(M.Textfield,{className:`${n} ${D7(r)}`,label:I.jsx(P2,{text:e,required:t,optional:A}),value:a??"",onChange:c=>{i==null||i(c.target.value)},multiline:!0,...l}),Ca=({...r})=>{var i,a;const n=r.value?{value:r.value}:{defaultValue:""},[e,t]=d.useState(!1),A=[r.className,"override",e?"select-open":""].filter(Boolean).join(" ");return I.jsxs(M.Field,{children:[I.jsx(M.Label,{children:I.jsx(P2,{text:r.label,required:r.required,optional:r.optional})}),r.description&&I.jsx(M.Field.Description,{children:r.description}),I.jsxs(M.Select,{id:r.id,className:A,width:"full",onChange:l=>{var c;(c=r.onChange)==null||c.call(r,l.target.value),t(!1)},onBlur:()=>{var l;(l=r.onBlur)==null||l.call(r),t(!1)},disabled:r.disabled,onMouseDown:()=>t(l=>!l),onKeyDown:l=>{l.key==="Enter"||l.key===" "||l.key==="ArrowDown"||l.key==="ArrowUp"?t(!0):l.key==="Escape"&&t(!1)},...n,children:[r.placeholder&&I.jsx(M.Select.Option,{disabled:!0,value:"",children:r.placeholder}),!r.placeholder&&(!r.value||!((i=r.options)!=null&&i.find(l=>l.value===r.value)))&&I.jsx(M.Select.Option,{disabled:!0,value:""}),(a=r.options)==null?void 0:a.map(l=>I.jsx(M.Select.Option,{value:l.value,children:l.label??l.value},l.value))]}),r.error&&I.jsx(M.ValidationMessage,{children:r.error})]})},ua={notUnderlined:"_notUnderlined_jhlgm_1"},W0=({underlined:r=!0,className:n="",...e})=>{const t=[n];return r||t.push(ua.notUnderlined),I.jsx(M.Tabs,{className:t.join(""),...e})};W0.List=M.Tabs.List,W0.Tab=M.Tabs.Tab,W0.Panel=M.Tabs.Panel;const Z9={bordered:"_bordered_103m7_2",rounded:"_rounded_103m7_33"},k3=({bordered:r=!1,rounded:n=!1,className:e="",...t})=>{const A=[e];return r&&A.push(Z9.bordered),n&&A.push(Z9.rounded),I.jsx(M.Tag,{className:A.join(" "),...t})},s3={"with-icon":"_with-icon_1cp54_2","link-icon":"_link-icon_1cp54_8","with-underline":"_with-underline_1cp54_12","link-icon-text":"_link-icon-text_1cp54_12","without-underline":"_without-underline_1cp54_16","without-icon":"_without-icon_1cp54_20"},N7=({underline:r,className:n,children:e,...t})=>{const A=[n];return r===void 0||r===!0?A.push(s3["with-underline"]):A.push(s3["without-underline"]),t.icon?(A.push(s3["with-icon"]),e=I.jsxs(I.Fragment,{children:[I.jsx(L,{material:t.icon,size:"sm",className:s3["link-icon"]}),I.jsx("span",{className:s3["link-icon-text"],children:e})]})):A.push(s3["without-icon"]),I.jsx(M.Link,{className:A.join(" "),...t,children:e})},j3={opaqueHeader:"_opaqueHeader_yxlz3_1",table:"_table_yxlz3_6",white:"_white_yxlz3_10","cell-padding-md":"_cell-padding-md_yxlz3_50","radius-sm":"_radius-sm_yxlz3_55","radius-md":"_radius-md_yxlz3_59","radius-lg":"_radius-lg_yxlz3_63"},L1=({header:r="transparent",body:n="transparent",radius:e="none",className:t="","cell-padding":A="sm",...i})=>{i["data-color"]||(i["data-color"]="neutral");const a=[t,j3.table];return r&&r!=="transparent"&&a.push(j3.opaqueHeader),n&&n==="white"&&a.push(j3.white),e&&a.push(j3[`radius-${e}`]),A&&a.push(j3[`cell-padding-${A}`]),I.jsx(M.Table,{className:a.join(" "),...i})};L1.Cell=M.Table.Cell,L1.HeaderCell=M.Table.HeaderCell,L1.Head=M.Table.Head,L1.Body=M.Table.Body,L1.Row=M.Table.Row,L1.Foot=M.Table.Foot;const T0={size2xs:"_size2xs_1uyqe_1",size3xs:"_size3xs_1uyqe_8",surfaceTinted:"_surfaceTinted_1uyqe_15","border-solid":"_border-solid_1uyqe_92","border-dashed":"_border-dashed_1uyqe_96","border-dotted":"_border-dotted_1uyqe_100","border-double":"_border-double_1uyqe_104"},X0=({"data-size":r="md","data-color-variant":n="base",border:e,className:t,...A})=>{const i=[t];r==="2xs"?i.push(T0.size2xs):r==="3xs"&&i.push(T0.size3xs),n==="surface-tinted"&&i.push(T0.surfaceTinted),e&&i.push(T0[`border-${e}`]);const a={"data-size":r,className:i.join(" "),...A};return I.jsx(M.Avatar,{...a})};Object.defineProperty(p,"Badge",{enumerable:!0,get:()=>M.Badge}),Object.defineProperty(p,"BadgePosition",{enumerable:!0,get:()=>M.BadgePosition}),Object.defineProperty(p,"Breadcrumbs",{enumerable:!0,get:()=>M.Breadcrumbs}),Object.defineProperty(p,"BreadcrumbsItem",{enumerable:!0,get:()=>M.BreadcrumbsItem}),Object.defineProperty(p,"BreadcrumbsLink",{enumerable:!0,get:()=>M.BreadcrumbsLink}),Object.defineProperty(p,"BreadcrumbsList",{enumerable:!0,get:()=>M.BreadcrumbsList}),Object.defineProperty(p,"Card",{enumerable:!0,get:()=>M.Card}),Object.defineProperty(p,"CardBlock",{enumerable:!0,get:()=>M.CardBlock}),Object.defineProperty(p,"Checkbox",{enumerable:!0,get:()=>M.Checkbox}),Object.defineProperty(p,"Chip",{enumerable:!0,get:()=>M.Chip}),Object.defineProperty(p,"ChipButton",{enumerable:!0,get:()=>M.ChipButton}),Object.defineProperty(p,"ChipCheckbox",{enumerable:!0,get:()=>M.ChipCheckbox}),Object.defineProperty(p,"ChipRadio",{enumerable:!0,get:()=>M.ChipRadio}),Object.defineProperty(p,"ChipRemovable",{enumerable:!0,get:()=>M.ChipRemovable}),Object.defineProperty(p,"Combobox",{enumerable:!0,get:()=>M.Combobox}),Object.defineProperty(p,"ComboboxEmpty",{enumerable:!0,get:()=>M.ComboboxEmpty}),Object.defineProperty(p,"ComboboxOption",{enumerable:!0,get:()=>M.ComboboxOption}),Object.defineProperty(p,"Details",{enumerable:!0,get:()=>M.Details}),Object.defineProperty(p,"DetailsContent",{enumerable:!0,get:()=>M.DetailsContent}),Object.defineProperty(p,"DetailsSummary",{enumerable:!0,get:()=>M.DetailsSummary}),Object.defineProperty(p,"Dialog",{enumerable:!0,get:()=>M.Dialog}),Object.defineProperty(p,"DialogBlock",{enumerable:!0,get:()=>M.DialogBlock}),Object.defineProperty(p,"DialogTrigger",{enumerable:!0,get:()=>M.DialogTrigger}),Object.defineProperty(p,"DialogTriggerContext",{enumerable:!0,get:()=>M.DialogTriggerContext}),Object.defineProperty(p,"Divider",{enumerable:!0,get:()=>M.Divider}),Object.defineProperty(p,"Dropdown",{enumerable:!0,get:()=>M.Dropdown}),Object.defineProperty(p,"DropdownButton",{enumerable:!0,get:()=>M.DropdownButton}),Object.defineProperty(p,"DropdownHeading",{enumerable:!0,get:()=>M.DropdownHeading}),Object.defineProperty(p,"DropdownItem",{enumerable:!0,get:()=>M.DropdownItem}),Object.defineProperty(p,"DropdownList",{enumerable:!0,get:()=>M.DropdownList}),Object.defineProperty(p,"DropdownTrigger",{enumerable:!0,get:()=>M.DropdownTrigger}),Object.defineProperty(p,"DropdownTriggerContext",{enumerable:!0,get:()=>M.DropdownTriggerContext}),Object.defineProperty(p,"EXPERIMENTAL_Suggestion",{enumerable:!0,get:()=>M.EXPERIMENTAL_Suggestion}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionClear",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionClear}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionEmpty",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionEmpty}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionInput",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionInput}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionList",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionList}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionOption",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionOption}),Object.defineProperty(p,"ErrorSummary",{enumerable:!0,get:()=>M.ErrorSummary}),Object.defineProperty(p,"ErrorSummaryHeading",{enumerable:!0,get:()=>M.ErrorSummaryHeading}),Object.defineProperty(p,"ErrorSummaryItem",{enumerable:!0,get:()=>M.ErrorSummaryItem}),Object.defineProperty(p,"ErrorSummaryLink",{enumerable:!0,get:()=>M.ErrorSummaryLink}),Object.defineProperty(p,"ErrorSummaryList",{enumerable:!0,get:()=>M.ErrorSummaryList}),Object.defineProperty(p,"Field",{enumerable:!0,get:()=>M.Field}),Object.defineProperty(p,"FieldAffix",{enumerable:!0,get:()=>M.FieldAffix}),Object.defineProperty(p,"FieldAffixes",{enumerable:!0,get:()=>M.FieldAffixes}),Object.defineProperty(p,"FieldCounter",{enumerable:!0,get:()=>M.FieldCounter}),Object.defineProperty(p,"FieldDescription",{enumerable:!0,get:()=>M.FieldDescription}),Object.defineProperty(p,"Fieldset",{enumerable:!0,get:()=>M.Fieldset}),Object.defineProperty(p,"FieldsetDescription",{enumerable:!0,get:()=>M.FieldsetDescription}),Object.defineProperty(p,"FieldsetLegend",{enumerable:!0,get:()=>M.FieldsetLegend}),Object.defineProperty(p,"Heading",{enumerable:!0,get:()=>M.Heading}),Object.defineProperty(p,"Input",{enumerable:!0,get:()=>M.Input}),Object.defineProperty(p,"Label",{enumerable:!0,get:()=>M.Label}),Object.defineProperty(p,"List",{enumerable:!0,get:()=>M.List}),Object.defineProperty(p,"ListItem",{enumerable:!0,get:()=>M.ListItem}),Object.defineProperty(p,"ListOrdered",{enumerable:!0,get:()=>M.ListOrdered}),Object.defineProperty(p,"ListUnordered",{enumerable:!0,get:()=>M.ListUnordered}),Object.defineProperty(p,"Pagination",{enumerable:!0,get:()=>M.Pagination}),Object.defineProperty(p,"PaginationButton",{enumerable:!0,get:()=>M.PaginationButton}),Object.defineProperty(p,"PaginationItem",{enumerable:!0,get:()=>M.PaginationItem}),Object.defineProperty(p,"PaginationList",{enumerable:!0,get:()=>M.PaginationList}),Object.defineProperty(p,"Paragraph",{enumerable:!0,get:()=>M.Paragraph}),Object.defineProperty(p,"Popover",{enumerable:!0,get:()=>M.Popover}),Object.defineProperty(p,"PopoverTrigger",{enumerable:!0,get:()=>M.PopoverTrigger}),Object.defineProperty(p,"PopoverTriggerContext",{enumerable:!0,get:()=>M.PopoverTriggerContext}),Object.defineProperty(p,"Radio",{enumerable:!0,get:()=>M.Radio}),Object.defineProperty(p,"RovingFocusItem",{enumerable:!0,get:()=>M.RovingFocusItem}),Object.defineProperty(p,"RovingFocusRoot",{enumerable:!0,get:()=>M.RovingFocusRoot}),Object.defineProperty(p,"Search",{enumerable:!0,get:()=>M.Search}),Object.defineProperty(p,"SearchButton",{enumerable:!0,get:()=>M.SearchButton}),Object.defineProperty(p,"SearchClear",{enumerable:!0,get:()=>M.SearchClear}),Object.defineProperty(p,"SearchInput",{enumerable:!0,get:()=>M.SearchInput}),Object.defineProperty(p,"SelectOptgroup",{enumerable:!0,get:()=>M.SelectOptgroup}),Object.defineProperty(p,"Skeleton",{enumerable:!0,get:()=>M.Skeleton}),Object.defineProperty(p,"SkipLink",{enumerable:!0,get:()=>M.SkipLink}),Object.defineProperty(p,"Spinner",{enumerable:!0,get:()=>M.Spinner}),Object.defineProperty(p,"Suggestion",{enumerable:!0,get:()=>M.EXPERIMENTAL_Suggestion}),Object.defineProperty(p,"Switch",{enumerable:!0,get:()=>M.Switch}),Object.defineProperty(p,"TableBody",{enumerable:!0,get:()=>M.TableBody}),Object.defineProperty(p,"TableCell",{enumerable:!0,get:()=>M.TableCell}),Object.defineProperty(p,"TableFoot",{enumerable:!0,get:()=>M.TableFoot}),Object.defineProperty(p,"TableHead",{enumerable:!0,get:()=>M.TableHead}),Object.defineProperty(p,"TableHeaderCell",{enumerable:!0,get:()=>M.TableHeaderCell}),Object.defineProperty(p,"TableRow",{enumerable:!0,get:()=>M.TableRow}),Object.defineProperty(p,"TabsList",{enumerable:!0,get:()=>M.TabsList}),Object.defineProperty(p,"TabsPanel",{enumerable:!0,get:()=>M.TabsPanel}),Object.defineProperty(p,"TabsTab",{enumerable:!0,get:()=>M.TabsTab}),Object.defineProperty(p,"Textarea",{enumerable:!0,get:()=>M.Textarea}),Object.defineProperty(p,"Textfield",{enumerable:!0,get:()=>M.Textfield}),Object.defineProperty(p,"ToggleGroup",{enumerable:!0,get:()=>M.ToggleGroup}),Object.defineProperty(p,"ToggleGroupItem",{enumerable:!0,get:()=>M.ToggleGroupItem}),Object.defineProperty(p,"Tooltip",{enumerable:!0,get:()=>M.Tooltip}),Object.defineProperty(p,"ValidationMessage",{enumerable:!0,get:()=>M.ValidationMessage}),Object.defineProperty(p,"omit",{enumerable:!0,get:()=>M.omit}),Object.defineProperty(p,"useCheckboxGroup",{enumerable:!0,get:()=>M.useCheckboxGroup}),Object.defineProperty(p,"useDebounceCallback",{enumerable:!0,get:()=>M.useDebounceCallback}),Object.defineProperty(p,"useIsomorphicLayoutEffect",{enumerable:!0,get:()=>M.useIsomorphicLayoutEffect}),Object.defineProperty(p,"useMediaQuery",{enumerable:!0,get:()=>M.useMediaQuery}),Object.defineProperty(p,"usePagination",{enumerable:!0,get:()=>M.usePagination}),Object.defineProperty(p,"useRadioGroup",{enumerable:!0,get:()=>M.useRadioGroup}),Object.defineProperty(p,"useSynchronizedAnimation",{enumerable:!0,get:()=>M.useSynchronizedAnimation}),p.Accent=w0,p.Alert=D9,p.Avatar=X0,p.Body=H2,p.BorderedRadioGroup=tt,p.BorderedToggleGroup=et,p.Box=j,p.Button=z2,p.CardTitle=ca,p.DateTimePicker=mi,p.Datepicker=di,p.DeprecatedCard=i5,p.DeprecatedDetails=V9,p.DeprecatedErrorLabel=U9,p.DeprecatedInputLabel=Y9,p.FilePreviewer=J0,p.FileUploader=aa,p.FileUploaderContext=g9,p.Footer=Et,p.Header=ut,p.Icon=L,p.ImageAisSat=e6,p.ImageArcticInfo=n6,p.ImageAvgiftskalkulator=r6,p.ImageBaatfartMarine=A6,p.ImageBestilleLos=i6,p.ImageBoelgevarsel=a6,p.ImageBwArcticinfo=X6,p.ImageBwBoelgevarsel=T6,p.ImageBwNais=O6,p.ImageBwOhoi=W6,p.ImageDatakatalog=t6,p.ImageDigitaleFyrbesoek=R6,p.ImageDigitaleReferanseruter=l6,p.ImageEDialog=c6,p.ImageFarledsbevis=o6,p.ImageFarvannsskiltOgNavinnretninger=G6,p.ImageFarvannsskiltOgNavinnretningerFarget=P6,p.ImageForespoerselSendt=y6,p.ImageHais=$e,p.ImageHavbase=f6,p.ImageHavnOgFarvannsloven=E6,p.ImageHavnOgFarvannslovenFarget=C6,p.ImageIsmelding=u6,p.ImageIsmeldingFarget=s6,p.ImageKikkert=d6,p.ImageKystdatahuset=M6,p.ImageKystinfoKart=m6,p.ImageKystreise=U6,p.ImageKystvaer=j6,p.ImageLavutslipp=p6,p.ImageMarU=S6,p.ImageMegafon=Y6,p.ImageNais=k6,p.ImageNavarea=B6,p.ImageNavigasjonsvarsler=v6,p.ImageNavigasjonsvarslerFarget=h6,p.ImageOhoi=z6,p.ImageRegistrerteSeilaser=g6,p.ImageSafeSeaNet=V6,p.ImageSeLosbestilling=Q6,p.ImageSelvbetjening=K6,p.ImageSelvbetjeningRso=q6,p.ImageSelvbetjeningRsoFarget=x6,p.ImageSkadePaaInfrastruktur=H6,p.ImageSkadePaaInfrastrukturFarget=J6,p.ImageSkipsrapportering=Z6,p.ImageSlukkedeFyrlys=b6,p.ImageSoeknadOmFarledsbevis=I6,p.ImageTilskuddTilFiskerihavn=F6,p.ImageTilskuddTilFiskerihavnFarget=L6,p.ImageUtfordringIFarvannet=w6,p.ImageUtfordringIFarvannetFarget=D6,p.KyvDivider=L9,p.LabelContent=P2,p.Link=N7,p.Logo=N0,p.NumberInput=fa,p.PageHeading=w9,p.Select=Ca,p.Skillingsbuoye=_6,p.Stepper=ie,p.StyrbordTranslationContext=M5,p.Summary=lt,p.Table=L1,p.Tabs=W0,p.Tag=k3,p.TextArea=Ea,p.TextInput=oa,p.Typography=$6,p.svgImageColors=_e,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kystverket/styrbord",
3
- "version": "1.3.32",
3
+ "version": "1.3.33",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "repository": {