@kystverket/styrbord 0.306.4 → 0.307.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/main.js +6 -6
- package/dist/main.umd.cjs +1 -1
- package/dist/src/components/designsystemet/Avatar/Avatar.d.ts +14 -4
- package/dist/style.css +1 -1
- package/package.json +6 -6
package/dist/main.umd.cjs
CHANGED
|
@@ -26,4 +26,4 @@ React keys must be passed directly to JSX without using spread:
|
|
|
26
26
|
Released under the MIT License.
|
|
27
27
|
*/var X4=function(n,e){return X4=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])},X4(n,e)};function M2(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");X4(r,n);function e(){this.constructor=r}r.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var U=function(){return U=Object.assign||function(e){for(var t,a=1,i=arguments.length;a<i;a++){t=arguments[a];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},U.apply(this,arguments)};function G2(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 Xn=function(r){var n=r.showTimeSelectOnly,e=n===void 0?!1:n,t=r.showTime,a=t===void 0?!1:t,i=r.className,s=r.children,o=e?"Choose Time":"Choose Date".concat(a?" and Time":"");return p.createElement("div",{className:i,role:"dialog","aria-label":o,"aria-modal":"true"},s)},Jn=function(r,n){var e=p.useRef(null),t=p.useRef(r);t.current=r;var a=p.useCallback(function(i){var s,o=i.composed&&i.composedPath&&i.composedPath().find(function(l){return l instanceof Node})||i.target;e.current&&!e.current.contains(o)&&(n&&o instanceof HTMLElement&&o.classList.contains(n)||(s=t.current)===null||s===void 0||s.call(t,i))},[n]);return p.useEffect(function(){return document.addEventListener("mousedown",a),function(){document.removeEventListener("mousedown",a)}},[a]),e},e4=function(r){var n=r.children,e=r.onClickOutside,t=r.className,a=r.containerRef,i=r.style,s=r.ignoreClass,o=Jn(e,s);return p.createElement("div",{className:t,style:i,ref:function(l){o.current=l,a&&(a.current=l)}},n)},k;(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"})(k||(k={}));function J4(){var r=typeof window<"u"?window:globalThis;return r}var v1=12;function X(r){if(r==null)return new Date;var n=typeof r=="string"?gt(r):S(r);return t4(n)?n:new Date}function e3(r,n,e,t,a){a===void 0&&(a=X());for(var i=r1(e)||r1(n3()),s=Array.isArray(n)?n:[n],o=0,l=s;o<l.length;o++){var c=l[o],d=ut(r,c,a,{locale:i});if(t4(d)&&(!t||r===n2(d,c,e)))return d}return null}function t4(r,n){return T1(r)&&!R2(r,new Date("1/1/1800"))}function n2(r,n,e){if(e==="en")return m7(r,n,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var t=e?r1(e):void 0;return e&&!t&&console.warn('A locale object was not found for the provided string ["'.concat(e,'"].')),t=t||r1(n3()),m7(r,n,{locale:t,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function H2(r,n){var e=n.dateFormat,t=n.locale,a=Array.isArray(e)&&e.length>0?e[0]:e;return r&&n2(r,a,t)||""}var $7=" - ";function er(r,n,e){if(!r&&!n)return"";var t=r?H2(r,e):"",a=n?H2(n,e):"",i=e.rangeSeparator||$7;return"".concat(t).concat(i).concat(a)}function tr(r,n){if(!(r!=null&&r.length))return"";var e=r[0]?H2(r[0],n):"";if(r.length===1)return e;if(r.length===2&&r[1]){var t=H2(r[1],n);return"".concat(e,", ").concat(t)}var a=r.length-1;return"".concat(e," (+").concat(a,")")}function t3(r,n){var e=n.hour,t=e===void 0?0:e,a=n.minute,i=a===void 0?0:a,s=n.second,o=s===void 0?0:s;return A1(j1(B1(r,o),i),t)}function nr(r){return N4(r)}function rr(r,n){return n2(r,"ddd",n)}function n4(r){return _0(r)}function p0(r,n,e){var t=r1(n||n3());return e0(r,{locale:t,weekStartsOn:e})}function s0(r){return s7(r)}function M1(r){return N1(r)}function q7(r){return E4(r)}function G7(){return _0(X())}function K7(r){return a7(r)}function ar(r){return y6(r)}function ir(r){return i7(r)}function K2(r,n){return r&&n?pt(r,n):!r&&!n}function _2(r,n){return r&&n?Ct(r,n):!r&&!n}function r4(r,n){return r&&n?ft(r,n):!r&&!n}function W(r,n){return r&&n?v6(r,n):!r&&!n}function H0(r,n){return r&&n?m9(r,n):!r&&!n}function T0(r,n,e){var t,a=_0(n),i=a7(e);try{t=h1(r,{start:a,end:i})}catch{t=!1}return t}function Q7(r,n){var e=J4();e.__localeData__||(e.__localeData__={}),e.__localeData__[r]=n}function n3(){var r=J4();return r.__localeId__}function r1(r){if(typeof r=="string"){var n=J4();return n.__localeData__?n.__localeData__[r]:void 0}else return r}function sr(r,n,e){return n(n2(r,"EEEE",e))}function or(r,n){return n2(r,"EEEEEE",n)}function lr(r,n){return n2(r,"EEE",n)}function r3(r,n){return n2(S2(X(),r),"LLLL",n)}function X7(r,n){return n2(S2(X(),r),"LLL",n)}function cr(r,n){return n2(K0(X(),r),"QQQ",n)}function O2(r,n){var e=n===void 0?{}:n,t=e.minDate,a=e.maxDate,i=e.excludeDates,s=e.excludeDateIntervals,o=e.includeDates,l=e.includeDateIntervals,c=e.filterDate,d=e.disabled;return d?!0:y1(r,{minDate:t,maxDate:a})||i&&i.some(function(u){return u instanceof Date?W(r,u):W(r,u.date)})||s&&s.some(function(u){var C=u.start,f=u.end;return h1(r,{start:C,end:f})})||o&&!o.some(function(u){return W(r,u)})||l&&!l.some(function(u){var C=u.start,f=u.end;return h1(r,{start:C,end:f})})||c&&!c(X(r))||!1}function a3(r,n){var e=n===void 0?{}:n,t=e.excludeDates,a=e.excludeDateIntervals;return a&&a.length>0?a.some(function(i){var s=i.start,o=i.end;return h1(r,{start:s,end:o})}):t&&t.some(function(i){var s;return i instanceof Date?W(r,i):W(r,(s=i.date)!==null&&s!==void 0?s:new Date)})||!1}function J7(r,n){var e=n===void 0?{}:n,t=e.minDate,a=e.maxDate,i=e.excludeDates,s=e.includeDates,o=e.filterDate;return y1(r,{minDate:t?s7(t):void 0,maxDate:a?i7(a):void 0})||(i==null?void 0:i.some(function(l){return _2(r,l instanceof Date?l:l.date)}))||s&&!s.some(function(l){return _2(r,l)})||o&&!o(X(r))||!1}function a4(r,n,e,t){var a=B(r),i=w2(r),s=B(n),o=w2(n),l=B(t);return a===s&&a===l?i<=e&&e<=o:a<s?l===a&&i<=e||l===s&&o>=e||l<s&&l>a:!1}function dr(r,n){var e=n===void 0?{}:n,t=e.minDate,a=e.maxDate,i=e.excludeDates,s=e.includeDates;return y1(r,{minDate:t,maxDate:a})||i&&i.some(function(o){return _2(o instanceof Date?o:o.date,r)})||s&&!s.some(function(o){return _2(o,r)})||!1}function i4(r,n){var e=n===void 0?{}:n,t=e.minDate,a=e.maxDate,i=e.excludeDates,s=e.includeDates,o=e.filterDate,l=e.disabled;return l?!0:y1(r,{minDate:t,maxDate:a})||(i==null?void 0:i.some(function(c){return r4(r,c instanceof Date?c:c.date)}))||s&&!s.some(function(c){return r4(r,c)})||o&&!o(X(r))||!1}function s4(r,n,e){if(!n||!e||!T1(n)||!T1(e))return!1;var t=B(n),a=B(e);return t<=r&&a>=r}function o4(r,n){var e=n===void 0?{}:n,t=e.minDate,a=e.maxDate,i=e.excludeDates,s=e.includeDates,o=e.filterDate,l=e.disabled;if(l)return!0;var c=new Date(r,0,1);return y1(c,{minDate:t?N1(t):void 0,maxDate:a?o7(a):void 0})||(i==null?void 0:i.some(function(d){return K2(c,d instanceof Date?d:d.date)}))||s&&!s.some(function(d){return K2(c,d)})||o&&!o(X(c))||!1}function l4(r,n,e,t){var a=B(r),i=x0(r),s=B(n),o=x0(n),l=B(t);return a===s&&a===l?i<=e&&e<=o:a<s?l===a&&i<=e||l===s&&o>=e||l<s&&l>a:!1}function y1(r,n){var e,t=n===void 0?{}:n,a=t.minDate,i=t.maxDate;return(e=a&&$0(r,a)<0||i&&$0(r,i)>0)!==null&&e!==void 0?e:!1}function e5(r,n){return n.some(function(e){return a0(e)===a0(r)&&i0(e)===i0(r)&&h0(e)===h0(r)})}function t5(r,n){var e=n===void 0?{}:n,t=e.excludeTimes,a=e.includeTimes,i=e.filterTime;return t&&e5(r,t)||a&&!e5(r,a)||i&&!i(r)||!1}function n5(r,n){var e=n.minTime,t=n.maxTime;if(!e||!t)throw new Error("Both minTime and maxTime props required");var a=X();a=A1(a,a0(r)),a=j1(a,i0(r)),a=B1(a,h0(r));var i=X();i=A1(i,a0(e)),i=j1(i,i0(e)),i=B1(i,h0(e));var s=X();s=A1(s,a0(t)),s=j1(s,i0(t)),s=B1(s,h0(t));var o;try{o=!h1(a,{start:i,end:s})}catch{o=!1}return o}function r5(r,n){var e=n===void 0?{}:n,t=e.minDate,a=e.includeDates,i=Z0(r,1);return t&&O1(t,i)>0||a&&a.every(function(s){return O1(s,i)>0})||!1}function a5(r,n){var e=n===void 0?{}:n,t=e.maxDate,a=e.includeDates,i=E2(r,1);return t&&O1(i,t)>0||a&&a.every(function(s){return O1(i,s)>0})||!1}function ur(r,n){var e=n===void 0?{}:n,t=e.minDate,a=e.includeDates,i=N1(r),s=L7(i);return t&&I1(t,s)>0||a&&a.every(function(o){return I1(o,s)>0})||!1}function hr(r,n){var e=n===void 0?{}:n,t=e.maxDate,a=e.includeDates,i=o7(r),s=I4(i,1);return t&&I1(s,t)>0||a&&a.every(function(o){return I1(s,o)>0})||!1}function i5(r,n){var e=n===void 0?{}:n,t=e.minDate,a=e.includeDates,i=Q0(r,1);return t&&E1(t,i)>0||a&&a.every(function(s){return E1(s,i)>0})||!1}function Cr(r,n){var e=n===void 0?{}:n,t=e.minDate,a=e.yearItemNumber,i=a===void 0?v1:a,s=M1(Q0(r,i)),o=o0(s,i).endPeriod,l=t&&B(t);return l&&l>o||!1}function s5(r,n){var e=n===void 0?{}:n,t=e.maxDate,a=e.includeDates,i=n0(r,1);return t&&E1(i,t)>0||a&&a.every(function(s){return E1(i,s)>0})||!1}function fr(r,n){var e=n===void 0?{}:n,t=e.maxDate,a=e.yearItemNumber,i=a===void 0?v1:a,s=n0(r,i),o=o0(s,i).startPeriod,l=t&&B(t);return l&&l<o||!1}function o5(r){var n=r.minDate,e=r.includeDates;if(e&&n){var t=e.filter(function(a){return $0(a,n)>=0});return n7(t)}else return e?n7(e):n}function l5(r){var n=r.maxDate,e=r.includeDates;if(e&&n){var t=e.filter(function(a){return $0(a,n)<=0});return t7(t)}else return e?t7(e):n}function c5(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 s=r[a];if(r0(s)){var o=n2(s,"MM.dd.yyyy"),l=t.get(o)||[];l.includes(n)||(l.push(n),t.set(o,l))}else if(typeof s=="object"){var c=Object.keys(s),d=(e=c[0])!==null&&e!==void 0?e:"",u=s[d];if(typeof d=="string"&&Array.isArray(u))for(var C=0,f=u.length;C<f;C++){var m=u[C];if(m){var o=n2(m,"MM.dd.yyyy"),l=t.get(o)||[];l.includes(d)||(l.push(d),t.set(o,l))}}}}return t}function pr(r,n){return r.length!==n.length?!1:r.every(function(e,t){return e===n[t]})}function mr(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(r0(a)){var s=n2(a,"MM.dd.yyyy"),o=e.get(s)||{className:"",holidayNames:[]};if(!("className"in o&&o.className===n&&pr(o.holidayNames,[i]))){o.className=n;var l=o.holidayNames;o.holidayNames=l?G2(G2([],l,!0),[i],!1):[i],e.set(s,o)}}}),e}function gr(r,n,e,t,a){for(var i=a.length,s=[],o=0;o<i;o++){var l=r,c=a[o];c&&(l=f6(l,a0(c)),l=O4(l,i0(c)),l=g6(l,h0(c)));var d=O4(r,(e+1)*t);C0(l,n)&&R2(l,d)&&c!=null&&s.push(c)}return s}function d5(r){return r<10?"0".concat(r):"".concat(r)}function o0(r,n){n===void 0&&(n=v1);var e=Math.ceil(B(r)/n)*n,t=e-(n-1);return{startPeriod:t,endPeriod:e}}function vr(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 u5(r){var n=r.getSeconds(),e=r.getMilliseconds();return S(r.getTime()-n*1e3-e)}function Mr(r,n){return u5(r).getTime()===u5(n).getTime()}function h5(r){if(!r0(r))throw new Error("Invalid date");var n=new Date(r);return n.setHours(0,0,0,0),n}function i3(r,n){if(!r0(r)||!r0(n))throw new Error("Invalid date received");var e=h5(r),t=h5(n);return R2(e,t)}function C5(r){return r.key===k.Space}var yr=function(r){M2(n,r);function n(e){var t=r.call(this,e)||this;return t.inputRef=p.createRef(),t.onTimeChange=function(a){var i,s;t.setState({time:a});var o=t.props.date,l=o instanceof Date&&!isNaN(+o),c=l?o:new Date;if(a!=null&&a.includes(":")){var d=a.split(":"),u=d[0],C=d[1];c.setHours(Number(u)),c.setMinutes(Number(C))}(s=(i=t.props).onChange)===null||s===void 0||s.call(i,c)},t.renderTimeInput=function(){var a=t.state.time,i=t.props,s=i.date,o=i.timeString,l=i.customTimeInput;return l?p.cloneElement(l,{date:s,value:a,onChange:t.onTimeChange}):p.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:t.inputRef,onClick:function(){var c;(c=t.inputRef.current)===null||c===void 0||c.focus()},required:!0,value:a,onChange:function(c){t.onTimeChange(c.target.value||o)}})},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 p.createElement("div",{className:"react-datepicker__input-time-container"},p.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),p.createElement("div",{className:"react-datepicker-time__input-container"},p.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},n}(p.Component),wr=function(r){M2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.dayEl=p.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,s=t.key;s===k.Space&&(t.preventDefault(),t.key=k.Enter),(i=(a=e.props).handleOnKeyDown)===null||i===void 0||i.call(a,t)},e.isSameDay=function(t){return W(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(s){return e.isSameDayOrWeek(s)}):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),O2(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 a3(e.props.day,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.isStartOfWeek=function(){return W(e.props.day,p0(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameWeek=function(t){return e.props.showWeekPicker&&W(t,p0(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 s=n2(a,"MM.dd.yyyy");return i.get(s)},e.getHolidaysClass=function(){var t,a=e.props,i=a.day,s=a.holidays;if(!s)return[void 0];var o=n2(i,"MM.dd.yyyy");return s.has(o)?[(t=s.get(o))===null||t===void 0?void 0:t.className]:[void 0]},e.isInRange=function(){var t=e.props,a=t.day,i=t.startDate,s=t.endDate;return!i||!s?!1:T0(a,i,s)},e.isInSelectingRange=function(){var t,a=e.props,i=a.day,s=a.selectsStart,o=a.selectsEnd,l=a.selectsRange,c=a.selectsDisabledDaysInRange,d=a.startDate,u=a.swapRange,C=a.endDate,f=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;if(!(s||o||l)||!f||!c&&e.isDisabled())return!1;if(s&&C&&(R2(f,C)||H0(f,C)))return T0(i,f,C);if(o&&d&&(C0(f,d)||H0(f,d)))return T0(i,d,f);if(l&&d&&!C){if(H0(f,d)||C0(f,d))return T0(i,d,f);if(u&&R2(f,d))return T0(i,f,d)}return!1},e.isSelectingRangeStart=function(){var t;if(!e.isInSelectingRange())return!1;var a=e.props,i=a.day,s=a.startDate,o=a.selectsStart,l=a.swapRange,c=a.selectsRange,d=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return o?W(i,d):c&&l&&s&&d?W(i,R2(d,s)?d:s):W(i,s)},e.isSelectingRangeEnd=function(){var t;if(!e.isInSelectingRange())return!1;var a=e.props,i=a.day,s=a.endDate,o=a.selectsEnd,l=a.selectsRange,c=a.swapRange,d=a.startDate,u=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return o?W(i,u):l&&c&&d&&u?W(i,R2(u,d)?d:u):l?W(i,u):W(i,s)},e.isRangeStart=function(){var t=e.props,a=t.day,i=t.startDate,s=t.endDate;return!i||!s?!1:W(i,a)},e.isRangeEnd=function(){var t=e.props,a=t.day,i=t.startDate,s=t.endDate;return!i||!s?!1:W(s,a)},e.isWeekend=function(){var t=h9(e.props.day);return t===0||t===6},e.isAfterMonth=function(){return e.props.month!==void 0&&(e.props.month+1)%12===w2(e.props.day)},e.isBeforeMonth=function(){return e.props.month!==void 0&&(w2(e.props.day)+1)%12===e.props.month},e.isCurrentDay=function(){return e.isSameDay(X())},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 v2("react-datepicker__day",a,"react-datepicker__day--"+rr(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,s=i===void 0?"Choose":i,o=t.ariaLabelPrefixWhenDisabled,l=o===void 0?"Not available":o,c=e.isDisabled()||e.isExcluded()?l:s;return"".concat(c," ").concat(n2(a,"PPPP",e.props.locale))},e.getTitle=function(){var t=e.props,a=t.day,i=t.holidays,s=i===void 0?new Map:i,o=t.excludeDates,l=n2(a,"MM.dd.yyyy"),c=[];return s.has(l)&&c.push.apply(c,s.get(l).holidayNames),e.isExcluded()&&c.push(o==null?void 0:o.filter(function(d){return d instanceof Date?W(d,a):W(d==null?void 0:d.date,a)}).map(function(d){if(!(d instanceof Date))return d==null?void 0:d.message})),c.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)&&W(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(g7(e.props.day),e.props.day):g7(e.props.day)},e.render=function(){return p.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()!==""&&p.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}(p.Component),br=function(r){M2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.weekNumberEl=p.createRef(),e.handleClick=function(t){e.props.onClick&&e.props.onClick(t)},e.handleOnKeyDown=function(t){var a,i,s=t.key;s===k.Space&&(t.preventDefault(),t.key=k.Enter),(i=(a=e.props).handleOnKeyDown)===null||i===void 0||i.call(a,t)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!W(e.props.date,e.props.selected)&&W(e.props.date,e.props.preSelection)},e.getTabIndex=function(){return e.props.showWeekPicker&&e.props.showWeekNumber&&(e.isKeyboardSelected()||W(e.props.date,e.props.selected)&&W(e.props.preSelection,e.props.selected))?0:-1},e.handleFocusWeekNumber=function(t){var a=!1;e.getTabIndex()===0&&!(t!=null&&t.isInputFocused)&&W(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,s=i===void 0?n.defaultProps.ariaLabelPrefix:i,o=e.onClick,l={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!o&&!a,"react-datepicker__week-number--selected":!!o&&W(this.props.date,this.props.selected)};return p.createElement("div",{ref:this.weekNumberEl,className:v2(l),"aria-label":"".concat(s," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},t)},n}(p.Component),Lr=function(r){M2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.isDisabled=function(t){return O2(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 s,o,l,c=new Date(t),d=0;d<7;d++){var u=new Date(t);u.setDate(u.getDate()+d);var C=!e.isDisabled(u);if(C){c=u;break}}typeof e.props.onWeekSelect=="function"&&e.props.onWeekSelect(c,a,i),e.props.showWeekPicker&&e.handleDayClick(c,i),((s=e.props.shouldCloseOnSelect)!==null&&s!==void 0?s:n.defaultProps.shouldCloseOnSelect)&&((l=(o=e.props).setOpen)===null||l===void 0||l.call(o,!1))},e.formatWeekNumber=function(t){return e.props.formatWeekNumber?e.props.formatWeekNumber(t):nr(t)},e.isWeekDisabled=function(){for(var t=e.startOfWeek(),a=I2(t,6),i=new Date(t);i<=a;){if(!e.isDisabled(i))return!1;i=I2(i,1)}return!0},e.renderDays=function(){var t=e.startOfWeek(),a=[],i=e.formatWeekNumber(t);if(e.props.showWeekNumber){var s=e.props.onWeekSelect||e.props.showWeekPicker?e.handleWeekClick.bind(e,t,i):void 0;a.push(p.createElement(br,U({key:"W"},n.defaultProps,e.props,{weekNumber:i,isWeekDisabled:e.isWeekDisabled(),date:t,onClick:s})))}return a.concat([0,1,2,3,4,5,6].map(function(o){var l=I2(t,o);return p.createElement(wr,U({},n.defaultProps,e.props,{ariaLabelPrefixWhenEnabled:e.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:e.props.disabledDayAriaLabelPrefix,key:l.valueOf(),day:l,onClick:e.handleDayClick.bind(e,l),onMouseEnter:e.handleDayMouseEnter.bind(e,l)}))}))},e.startOfWeek=function(){return p0(e.props.day,e.props.locale,e.props.calendarStartDay)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!W(e.startOfWeek(),e.props.selected)&&W(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":W(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()},t=this.props.weekClassName?this.props.weekClassName(this.startOfWeek()):void 0;return p.createElement("div",{className:v2(e,t),role:"row"},this.renderDays())},n}(p.Component),w1,_r=6,a1={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},s3=(w1={},w1[a1.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},w1[a1.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},w1[a1.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},w1),c4=1;function f5(r,n){return r?a1.FOUR_COLUMNS:n?a1.TWO_COLUMNS:a1.THREE_COLUMNS}var xr=function(r){M2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.MONTH_REFS=G2([],Array(12),!0).map(function(){return p.createRef()}),e.QUARTER_REFS=G2([],Array(4),!0).map(function(){return p.createRef()}),e.isDisabled=function(t){return O2(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 a3(t,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.handleDayClick=function(t,a){var i,s;(s=(i=e.props).onDayClick)===null||s===void 0||s.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,s=a.startDate,o=a.endDate;return!s||!o?!1:_2(S2(i,t),s)},e.isRangeStartQuarter=function(t){var a=e.props,i=a.day,s=a.startDate,o=a.endDate;return!s||!o?!1:r4(K0(i,t),s)},e.isRangeEndMonth=function(t){var a=e.props,i=a.day,s=a.startDate,o=a.endDate;return!s||!o?!1:_2(S2(i,t),o)},e.isRangeEndQuarter=function(t){var a=e.props,i=a.day,s=a.startDate,o=a.endDate;return!s||!o?!1:r4(K0(i,t),o)},e.isInSelectingRangeMonth=function(t){var a,i=e.props,s=i.day,o=i.selectsStart,l=i.selectsEnd,c=i.selectsRange,d=i.startDate,u=i.endDate,C=(a=e.props.selectingDate)!==null&&a!==void 0?a:e.props.preSelection;return!(o||l||c)||!C?!1:o&&u?a4(C,u,t,s):l&&d||c&&d&&!u?a4(d,C,t,s):!1},e.isSelectingMonthRangeStart=function(t){var a;if(!e.isInSelectingRangeMonth(t))return!1;var i=e.props,s=i.day,o=i.startDate,l=i.selectsStart,c=S2(s,t),d=(a=e.props.selectingDate)!==null&&a!==void 0?a:e.props.preSelection;return l?_2(c,d):_2(c,o)},e.isSelectingMonthRangeEnd=function(t){var a;if(!e.isInSelectingRangeMonth(t))return!1;var i=e.props,s=i.day,o=i.endDate,l=i.selectsEnd,c=i.selectsRange,d=S2(s,t),u=(a=e.props.selectingDate)!==null&&a!==void 0?a:e.props.preSelection;return l||c?_2(d,u):_2(d,o)},e.isInSelectingRangeQuarter=function(t){var a,i=e.props,s=i.day,o=i.selectsStart,l=i.selectsEnd,c=i.selectsRange,d=i.startDate,u=i.endDate,C=(a=e.props.selectingDate)!==null&&a!==void 0?a:e.props.preSelection;return!(o||l||c)||!C?!1:o&&u?l4(C,u,t,s):l&&d||c&&d&&!u?l4(d,C,t,s):!1},e.isWeekInMonth=function(t){var a=e.props.day,i=I2(t,6);return _2(t,a)||_2(i,a)},e.isCurrentMonth=function(t,a){return B(t)===B(X())&&a===w2(X())},e.isCurrentQuarter=function(t,a){return B(t)===B(X())&&a===x0(X())},e.isSelectedMonth=function(t,a,i){return w2(i)===a&&B(t)===B(i)},e.isSelectMonthInList=function(t,a,i){return i.some(function(s){return e.isSelectedMonth(t,a,s)})},e.isSelectedQuarter=function(t,a,i){return x0(t)===a&&B(t)===B(i)},e.isMonthSelected=function(){var t=e.props,a=t.day,i=t.selected,s=t.selectedDates,o=t.selectsMultiple,l=w2(a);return o?s==null?void 0:s.some(function(c){return e.isSelectedMonth(a,l,c)}):!!i&&e.isSelectedMonth(a,l,i)},e.renderWeeks=function(){for(var t=[],a=e.props.fixedHeight,i=0,s=!1,o=p0(s0(e.props.day),e.props.locale,e.props.calendarStartDay),l=function(m){return e.props.showWeekPicker?p0(m,e.props.locale,e.props.calendarStartDay):e.props.preSelection},c=function(m){return e.props.showWeekPicker?p0(m,e.props.locale,e.props.calendarStartDay):e.props.selected},d=e.props.selected?c(e.props.selected):void 0,u=e.props.preSelection?l(e.props.preSelection):void 0;t.push(p.createElement(Lr,U({},e.props,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,key:i,day:o,month:w2(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,selected:d,preSelection:u,showWeekNumber:e.props.showWeekNumbers}))),!s;){i++,o=H1(o,1);var C=a&&i>=_r,f=!a&&!e.isWeekInMonth(o);if(C||f)if(e.props.peekNextMonth)s=!0;else break}return t},e.onMonthClick=function(t,a){var i=e.isMonthDisabledForLabelDate(a),s=i.isDisabled,o=i.labelDate;s||e.handleDayClick(s0(o),t)},e.onMonthMouseEnter=function(t){var a=e.isMonthDisabledForLabelDate(t),i=a.isDisabled,s=a.labelDate;i||e.handleDayMouseEnter(s0(s))},e.handleMonthNavigation=function(t,a){var i,s,o,l;(s=(i=e.props).setPreSelection)===null||s===void 0||s.call(i,a),(l=(o=e.MONTH_REFS[t])===null||o===void 0?void 0:o.current)===null||l===void 0||l.focus()},e.handleKeyboardNavigation=function(t,a,i){var s,o=e.props,l=o.selected,c=o.preSelection,d=o.setPreSelection,u=o.minDate,C=o.maxDate,f=o.showFourColumnMonthYearPicker,m=o.showTwoColumnMonthYearPicker;if(c){var v=f5(f,m),g=e.getVerticalOffset(v),w=(s=s3[v])===null||s===void 0?void 0:s.grid,y=function(T,x,D){var I,$,j=x,q=D;switch(T){case k.ArrowRight:j=E2(x,c4),q=D===11?0:D+c4;break;case k.ArrowLeft:j=Z0(x,c4),q=D===0?11:D-c4;break;case k.ArrowUp:j=Z0(x,g),q=!((I=w==null?void 0:w[0])===null||I===void 0)&&I.includes(D)?D+12-g:D-g;break;case k.ArrowDown:j=E2(x,g),q=!(($=w==null?void 0:w[w.length-1])===null||$===void 0)&&$.includes(D)?D-12+g:D+g;break}return{newCalculatedDate:j,newCalculatedMonth:q}},b=function(T,x,D){for(var I=40,$=T,j=!1,q=0,G=y($,x,D),z=G.newCalculatedDate,E=G.newCalculatedMonth;!j;){if(q>=I){z=x,E=D;break}if(u&&z<u){$=k.ArrowRight;var A=y($,z,E);z=A.newCalculatedDate,E=A.newCalculatedMonth}if(C&&z>C){$=k.ArrowLeft;var A=y($,z,E);z=A.newCalculatedDate,E=A.newCalculatedMonth}if(dr(z,e.props)){var A=y($,z,E);z=A.newCalculatedDate,E=A.newCalculatedMonth}else j=!0;q++}return{newCalculatedDate:z,newCalculatedMonth:E}};if(a===k.Enter){e.isMonthDisabled(i)||(e.onMonthClick(t,i),d==null||d(l));return}var P=b(a,c,i),H=P.newCalculatedDate,R=P.newCalculatedMonth;switch(a){case k.ArrowRight:case k.ArrowLeft:case k.ArrowUp:case k.ArrowDown:e.handleMonthNavigation(R,H);break}}},e.getVerticalOffset=function(t){var a,i;return(i=(a=s3[t])===null||a===void 0?void 0:a.verticalNavigationOffset)!==null&&i!==void 0?i:0},e.onMonthKeyDown=function(t,a){var i=e.props,s=i.disabledKeyboardNavigation,o=i.handleOnMonthKeyDown,l=t.key;l!==k.Tab&&t.preventDefault(),s||e.handleKeyboardNavigation(t,l,a),o&&o(t)},e.onQuarterClick=function(t,a){var i=K0(e.props.day,a);i4(i,e.props)||e.handleDayClick(q7(i),t)},e.onQuarterMouseEnter=function(t){var a=K0(e.props.day,t);i4(a,e.props)||e.handleDayMouseEnter(q7(a))},e.handleQuarterNavigation=function(t,a){var i,s,o,l;e.isDisabled(a)||e.isExcluded(a)||((s=(i=e.props).setPreSelection)===null||s===void 0||s.call(i,a),(l=(o=e.QUARTER_REFS[t-1])===null||o===void 0?void 0:o.current)===null||l===void 0||l.focus())},e.onQuarterKeyDown=function(t,a){var i,s,o=t.key;if(!e.props.disabledKeyboardNavigation)switch(o){case k.Enter:e.onQuarterClick(t,a),(s=(i=e.props).setPreSelection)===null||s===void 0||s.call(i,e.props.selected);break;case k.ArrowRight:if(!e.props.preSelection)break;e.handleQuarterNavigation(a===4?1:a+1,I4(e.props.preSelection,1));break;case k.ArrowLeft:if(!e.props.preSelection)break;e.handleQuarterNavigation(a===1?4:a-1,L7(e.props.preSelection));break}},e.isMonthDisabledForLabelDate=function(t){var a,i=e.props,s=i.day,o=i.disabled,l=i.minDate,c=i.maxDate,d=i.excludeDates,u=i.includeDates,C=S2(s,t);return o?{isDisabled:!0,labelDate:S2(s,t)}:{isDisabled:(a=(l||c||d||u)&&J7(C,e.props))!==null&&a!==void 0?a:!1,labelDate:C}},e.isMonthDisabled=function(t){var a=e.isMonthDisabledForLabelDate(t).isDisabled;return a},e.getMonthClassNames=function(t){var a=e.props,i=a.day,s=a.startDate,o=a.endDate,l=a.preSelection,c=a.monthClassName,d=c?c(S2(i,t)):void 0,u=e.getSelection();return v2("react-datepicker__month-text","react-datepicker__month-".concat(t),d,{"react-datepicker__month-text--disabled":e.isMonthDisabled(t),"react-datepicker__month-text--selected":u?e.isSelectMonthInList(i,t,u):void 0,"react-datepicker__month-text--keyboard-selected":!e.props.disabledKeyboardNavigation&&l&&e.isSelectedMonth(i,t,l)&&!e.isMonthSelected()&&!e.isMonthDisabled(t),"react-datepicker__month-text--in-selecting-range":e.isInSelectingRangeMonth(t),"react-datepicker__month-text--in-range":s&&o?a4(s,o,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=w2(e.props.preSelection),i=e.isMonthDisabledForLabelDate(a).isDisabled,s=t===a&&!(i||e.props.disabledKeyboardNavigation)?"0":"-1";return s},e.getQuarterTabIndex=function(t){if(e.props.preSelection==null)return"-1";var a=x0(e.props.preSelection),i=i4(e.props.day,e.props),s=t===a&&!(i||e.props.disabledKeyboardNavigation)?"0":"-1";return s},e.getAriaLabel=function(t){var a=e.props,i=a.chooseDayAriaLabelPrefix,s=i===void 0?"Choose":i,o=a.disabledDayAriaLabelPrefix,l=o===void 0?"Not available":o,c=a.day,d=a.locale,u=S2(c,t),C=e.isDisabled(u)||e.isExcluded(u)?l:s;return"".concat(C," ").concat(n2(u,"MMMM yyyy",d))},e.getQuarterClassNames=function(t){var a=e.props,i=a.day,s=a.startDate,o=a.endDate,l=a.selected,c=a.minDate,d=a.maxDate,u=a.excludeDates,C=a.includeDates,f=a.filterDate,m=a.preSelection,v=a.disabledKeyboardNavigation,g=a.disabled,w=(c||d||u||C||f||g)&&i4(K0(i,t),e.props);return v2("react-datepicker__quarter-text","react-datepicker__quarter-".concat(t),{"react-datepicker__quarter-text--disabled":w,"react-datepicker__quarter-text--selected":l?e.isSelectedQuarter(i,t,l):void 0,"react-datepicker__quarter-text--keyboard-selected":!v&&m&&e.isSelectedQuarter(i,t,m)&&!w,"react-datepicker__quarter-text--in-selecting-range":e.isInSelectingRangeQuarter(t),"react-datepicker__quarter-text--in-range":s&&o?l4(s,o,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,s=a.renderMonthContent,o=a.locale,l=a.day,c=X7(t,o),d=r3(t,o);return s?s(t,c,d,l):i?d:c},e.getQuarterContent=function(t){var a,i=e.props,s=i.renderQuarterContent,o=i.locale,l=cr(t,o);return(a=s==null?void 0:s(t,l))!==null&&a!==void 0?a:l},e.renderMonths=function(){var t,a=e.props,i=a.showTwoColumnMonthYearPicker,s=a.showFourColumnMonthYearPicker,o=a.day,l=a.selected,c=(t=s3[f5(s,i)])===null||t===void 0?void 0:t.grid;return c==null?void 0:c.map(function(d,u){return p.createElement("div",{className:"react-datepicker__month-wrapper",key:u},d.map(function(C,f){return p.createElement("div",{ref:e.MONTH_REFS[C],key:f,onClick:function(m){e.onMonthClick(m,C)},onKeyDown:function(m){C5(m)&&(m.preventDefault(),m.key=k.Enter),e.onMonthKeyDown(m,C)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onMonthMouseEnter(C)},onPointerEnter:e.props.usePointerEvent?function(){return e.onMonthMouseEnter(C)}:void 0,tabIndex:Number(e.getTabIndex(C)),className:e.getMonthClassNames(C),"aria-disabled":e.isMonthDisabled(C),role:"option","aria-label":e.getAriaLabel(C),"aria-current":e.isCurrentMonth(o,C)?"date":void 0,"aria-selected":l?e.isSelectedMonth(o,C,l):void 0},e.getMonthContent(C))}))})},e.renderQuarters=function(){var t=e.props,a=t.day,i=t.selected,s=[1,2,3,4];return p.createElement("div",{className:"react-datepicker__quarter-wrapper"},s.map(function(o,l){return p.createElement("div",{key:l,ref:e.QUARTER_REFS[l],role:"option",onClick:function(c){e.onQuarterClick(c,o)},onKeyDown:function(c){e.onQuarterKeyDown(c,o)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onQuarterMouseEnter(o)},onPointerEnter:e.props.usePointerEvent?function(){return e.onQuarterMouseEnter(o)}:void 0,className:e.getQuarterClassNames(o),"aria-selected":i?e.isSelectedQuarter(a,o,i):void 0,tabIndex:Number(e.getQuarterTabIndex(o)),"aria-current":e.isCurrentQuarter(a,o)?"date":void 0},e.getQuarterContent(o))}))},e.getClassNames=function(){var t=e.props,a=t.selectingDate,i=t.selectsStart,s=t.selectsEnd,o=t.showMonthYearPicker,l=t.showQuarterYearPicker,c=t.showWeekPicker;return v2("react-datepicker__month",{"react-datepicker__month--selecting-range":a&&(i||s)},{"react-datepicker__monthPicker":o},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":c})},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,s=e.ariaLabelPrefix,o=s===void 0?"Month ":s,l=o?o.trim()+" ":"",c=t||a;return c?p.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(l).concat(n2(i,"MMMM, yyyy",this.props.locale)),role:"listbox"},t?this.renderMonths():this.renderQuarters()):p.createElement("div",{role:"table"},this.props.dayNamesHeader&&p.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),p.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(l).concat(n2(i,"MMMM, yyyy",this.props.locale)),role:"rowgroup"},this.renderWeeks()))},n}(p.Component),kr=function(r){M2(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 s=(t+(a.key==="ArrowUp"?-1:1)+e.props.monthNames.length)%e.props.monthNames.length;(i=e.monthOptionButtonsRef[s])===null||i===void 0||i.focus();break}}},e.renderOptions=function(){return e.monthOptionButtonsRef={},e.props.monthNames.map(function(t,a){return p.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)?p.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 p.createElement(e4,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},n}(p.Component),Zr=function(r){M2(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 p.createElement("option",{key:a,value:i},a)})},e.renderSelectMode=function(t){return p.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 p.createElement("button",{key:"read",type:"button",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:e.toggleDropdown},p.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),p.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},a[e.props.month]))},e.renderDropdown=function(t){return p.createElement(kr,U({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 X7(i,e.props.locale)}:function(i){return r3(i,e.props.locale)}),a;switch(this.props.dropdownMode){case"scroll":a=this.renderScrollMode(t);break;case"select":a=this.renderSelectMode(t);break}return p.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},a)},n}(p.Component);function Dr(r,n){for(var e=[],t=s0(r),a=s0(n);!C0(t,a);)e.push(X(t)),t=E2(t,1);return e}var Sr=function(r){M2(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=A4(a),s=K2(t.props.date,a)&&_2(t.props.date,a);return p.createElement("div",{className:s?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:i,onClick:t.onChange.bind(t,i),"aria-selected":s?"true":void 0},s?p.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",n2(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:Dr(t.props.minDate,t.props.maxDate)},t}return n.prototype.render=function(){var e=v2({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return p.createElement(e4,{className:e,onClickOutside:this.handleClickOutside},this.renderOptions())},n}(p.Component),Pr=function(r){M2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=s0(e.props.minDate),a=s0(e.props.maxDate),i=[];!C0(t,a);){var s=A4(t);i.push(p.createElement("option",{key:s,value:s},n2(t,e.props.dateFormat,e.props.locale))),t=E2(t,1)}return i},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return p.createElement("select",{value:A4(s0(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){var a=n2(e.props.date,e.props.dateFormat,e.props.locale);return p.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:e.toggleDropdown},p.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),p.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},a))},e.renderDropdown=function(){return p.createElement(Sr,U({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=X(t);K2(e.props.date,a)&&_2(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 p.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},e)},n}(p.Component),Hr=function(r){M2(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)&&n5(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&t5(t,e.props)||(i=(a=e.props).onChange)===null||i===void 0||i.call(a,t)},e.isSelectedTime=function(t){return e.props.selected&&Mr(e.props.selected,t)},e.isDisabledTime=function(t){return(e.props.minTime||e.props.maxTime)&&n5(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&t5(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&&(a0(t)*3600+i0(t)*60+h0(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,s;t.key===k.Space&&(t.preventDefault(),t.key=k.Enter),(t.key===k.ArrowUp||t.key===k.ArrowLeft)&&t.target instanceof HTMLElement&&t.target.previousSibling&&(t.preventDefault(),t.target.previousSibling instanceof HTMLElement&&t.target.previousSibling.focus()),(t.key===k.ArrowDown||t.key===k.ArrowRight)&&t.target instanceof HTMLElement&&t.target.nextSibling&&(t.preventDefault(),t.target.nextSibling instanceof HTMLElement&&t.target.nextSibling.focus()),t.key===k.Enter&&e.handleClick(a),(s=(i=e.props).handleOnKeyDown)===null||s===void 0||s.call(i,t)},e.renderTimes=function(){for(var t,a=[],i=typeof e.props.format=="string"?e.props.format:"p",s=(t=e.props.intervals)!==null&&t!==void 0?t:n.defaultProps.intervals,o=e.props.selected||e.props.openToDate||X(),l=n4(o),c=e.props.injectTimes&&e.props.injectTimes.sort(function(g,w){return g.getTime()-w.getTime()}),d=60*vr(o),u=d/s,C=0;C<u;C++){var f=O4(l,C*s);if(a.push(f),c){var m=gr(l,f,C,s,c);a=a.concat(m)}}var v=a.reduce(function(g,w){return w.getTime()<=o.getTime()?w:g},a[0]);return a.map(function(g){return p.createElement("li",{key:g.valueOf(),onClick:e.handleClick.bind(e,g),className:e.liClasses(g),ref:function(w){g===v&&(e.centerLi=w)},onKeyDown:function(w){e.handleOnKeyDown(w,g)},tabIndex:g===v?0:-1,role:"option","aria-selected":e.isSelectedTime(g)?"true":void 0,"aria-disabled":e.isDisabledTime(g)?"true":void 0},n2(g,i,e.props.locale))})},e.renderTimeCaption=function(){return e.props.showTimeCaption===!1?p.createElement(p.Fragment,null):p.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}},p.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 p.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(),p.createElement("div",{className:"react-datepicker__time"},p.createElement("div",{className:"react-datepicker__time-box"},p.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}(p.Component),p5=3,Tr=function(r){M2(n,r);function n(e){var t=r.call(this,e)||this;return t.YEAR_REFS=G2([],Array(t.props.yearItemNumber),!0).map(function(){return p.createRef()}),t.isDisabled=function(a){return O2(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 a3(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 s,o;(o=(s=t.YEAR_REFS[a])===null||s===void 0?void 0:s.current)===null||o===void 0||o.focus()};window.requestAnimationFrame(i)},t.handleYearClick=function(a,i){t.props.onDayClick&&t.props.onDayClick(a,i)},t.handleYearNavigation=function(a,i){var s,o,l,c,d=t.props,u=d.date,C=d.yearItemNumber;if(!(u===void 0||C===void 0)){var f=o0(u,C).startPeriod;t.isDisabled(i)||t.isExcluded(i)||((o=(s=t.props).setPreSelection)===null||o===void 0||o.call(s,i),a-f<0?t.updateFocusOnPaginate(C-(f-a)):a-f>=C?t.updateFocusOnPaginate(Math.abs(C-(a-f))):(c=(l=t.YEAR_REFS[a-f])===null||l===void 0?void 0:l.current)===null||c===void 0||c.focus())}},t.isSameDay=function(a,i){return W(a,i)},t.isCurrentYear=function(a){return a===B(X())},t.isRangeStart=function(a){return t.props.startDate&&t.props.endDate&&K2(W2(X(),a),t.props.startDate)},t.isRangeEnd=function(a){return t.props.startDate&&t.props.endDate&&K2(W2(X(),a),t.props.endDate)},t.isInRange=function(a){return s4(a,t.props.startDate,t.props.endDate)},t.isInSelectingRange=function(a){var i=t.props,s=i.selectsStart,o=i.selectsEnd,l=i.selectsRange,c=i.startDate,d=i.endDate;return!(s||o||l)||!t.selectingDate()?!1:s&&d?s4(a,t.selectingDate(),d):o&&c||l&&c&&!d?s4(a,c,t.selectingDate()):!1},t.isSelectingRangeStart=function(a){var i;if(!t.isInSelectingRange(a))return!1;var s=t.props,o=s.startDate,l=s.selectsStart,c=W2(X(),a);return l?K2(c,(i=t.selectingDate())!==null&&i!==void 0?i:null):K2(c,o??null)},t.isSelectingRangeEnd=function(a){var i;if(!t.isInSelectingRange(a))return!1;var s=t.props,o=s.endDate,l=s.selectsEnd,c=s.selectsRange,d=W2(X(),a);return l||c?K2(d,(i=t.selectingDate())!==null&&i!==void 0?i:null):K2(d,o??null)},t.isKeyboardSelected=function(a){if(!(t.props.disabledKeyboardNavigation||t.props.date===void 0||t.props.preSelection==null)){var i=t.props,s=i.minDate,o=i.maxDate,l=i.excludeDates,c=i.includeDates,d=i.filterDate,u=i.selected,C=M1(W2(t.props.date,a)),f=(s||o||l||c||d)&&o4(a,t.props),m=!!u&&W(C,M1(u)),v=W(C,M1(t.props.preSelection));return!t.props.inline&&!m&&v&&!f}},t.isSelectedYear=function(a){var i=t.props,s=i.selectsMultiple,o=i.selected,l=i.selectedDates;return s?l==null?void 0:l.some(function(c){return a===B(c)}):!!o&&a===B(o)},t.onYearClick=function(a,i){var s=t.props.date;s!==void 0&&t.handleYearClick(M1(W2(s,i)),a)},t.onYearKeyDown=function(a,i){var s,o,l=a.key,c=t.props,d=c.date,u=c.yearItemNumber,C=c.handleOnKeyDown;if(l!==k.Tab&&a.preventDefault(),!t.props.disabledKeyboardNavigation)switch(l){case k.Enter:if(t.props.selected==null)break;t.onYearClick(a,i),(o=(s=t.props).setPreSelection)===null||o===void 0||o.call(s,t.props.selected);break;case k.ArrowRight:if(t.props.preSelection==null)break;t.handleYearNavigation(i+1,n0(t.props.preSelection,1));break;case k.ArrowLeft:if(t.props.preSelection==null)break;t.handleYearNavigation(i-1,Q0(t.props.preSelection,1));break;case k.ArrowUp:{if(d===void 0||u===void 0||t.props.preSelection==null)break;var f=o0(d,u).startPeriod,m=p5,v=i-m;if(v<f){var g=u%m;i>=f&&i<f+g?m=g:m+=g,v=i-m}t.handleYearNavigation(v,Q0(t.props.preSelection,m));break}case k.ArrowDown:{if(d===void 0||u===void 0||t.props.preSelection==null)break;var w=o0(d,u).endPeriod,m=p5,v=i+m;if(v>w){var g=u%m;i<=w&&i>w-g?m=g:m+=g,v=i+m}t.handleYearNavigation(v,n0(t.props.preSelection,m));break}}C&&C(a)},t.getYearClassNames=function(a){var i=t.props,s=i.date,o=i.disabled,l=i.minDate,c=i.maxDate,d=i.excludeDates,u=i.includeDates,C=i.filterDate,f=i.yearClassName;return v2("react-datepicker__year-text","react-datepicker__year-".concat(a),s?f==null?void 0:f(W2(s,a)):void 0,{"react-datepicker__year-text--selected":t.isSelectedYear(a),"react-datepicker__year-text--disabled":(l||c||d||u||C||o)&&o4(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=B(t.props.preSelection),s=o4(a,t.props);return a===i&&!s?"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,s=a.yearItemNumber,o=a.onYearMouseEnter,l=a.onYearMouseLeave;if(i===void 0)return null;for(var c=o0(i,s),d=c.startPeriod,u=c.endPeriod,C=function(v){t.push(p.createElement("div",{ref:f.YEAR_REFS[v-d],onClick:function(g){e.onYearClick(g,v)},onKeyDown:function(g){C5(g)&&(g.preventDefault(),g.key=k.Enter),e.onYearKeyDown(g,v)},tabIndex:Number(f.getYearTabIndex(v)),className:f.getYearClassNames(v),onMouseEnter:f.props.usePointerEvent?void 0:function(g){return o(g,v)},onPointerEnter:f.props.usePointerEvent?function(g){return o(g,v)}:void 0,onMouseLeave:f.props.usePointerEvent?void 0:function(g){return l(g,v)},onPointerLeave:f.props.usePointerEvent?function(g){return l(g,v)}:void 0,key:v,"aria-current":f.isCurrentYear(v)?"date":void 0},f.getYearContent(v)))},f=this,m=d;m<=u;m++)C(m);return p.createElement("div",{className:"react-datepicker__year"},p.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}(p.Component);function Or(r,n,e,t){for(var a=[],i=0;i<2*n+1;i++){var s=r+n-i,o=!0;e&&(o=B(e)<=s),t&&o&&(o=B(t)>=s),o&&a.push(s)}return a}var Ir=function(r){M2(n,r);function n(e){var t=r.call(this,e)||this;t.yearOptionButtonsRef={},t.handleOptionKeyDown=function(o,l){var c;switch(l.key){case"Enter":l.preventDefault(),t.onChange(o);break;case"Escape":l.preventDefault(),t.props.onCancel();break;case"ArrowUp":case"ArrowDown":{l.preventDefault();var d=o+(l.key==="ArrowUp"?1:-1);t.yearOptionButtonsRef[d]&&((c=t.yearOptionButtonsRef[d])===null||c===void 0||c.focus());break}}},t.renderOptions=function(){t.yearOptionButtonsRef={};var o=t.props.year,l=t.state.yearsList.map(function(u){return p.createElement("div",{ref:function(C){t.yearOptionButtonsRef[u]=C,u===o&&(C==null||C.focus())},role:"button",tabIndex:0,className:o===u?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:u,onClick:t.onChange.bind(t,u),onKeyDown:t.handleOptionKeyDown.bind(t,u),"aria-selected":o===u?"true":void 0},o===u?p.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",u)}),c=t.props.minDate?B(t.props.minDate):null,d=t.props.maxDate?B(t.props.maxDate):null;return(!d||!t.state.yearsList.find(function(u){return u===d}))&&l.unshift(p.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:t.incrementYears},p.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!c||!t.state.yearsList.find(function(u){return u===c}))&&l.push(p.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:t.decrementYears},p.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),l},t.onChange=function(o){t.props.onChange(o)},t.handleClickOutside=function(){t.props.onCancel()},t.shiftYears=function(o){var l=t.state.yearsList.map(function(c){return c+o});t.setState({yearsList:l})},t.incrementYears=function(){return t.shiftYears(1)},t.decrementYears=function(){return t.shiftYears(-1)};var a=e.yearDropdownItemNumber,i=e.scrollableYearDropdown,s=a||(i?10:5);return t.state={yearsList:Or(t.props.year,s,t.props.minDate,t.props.maxDate)},t.dropdownRef=p.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=v2({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return p.createElement(e4,{className:e,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},n}(p.Component),Er=function(r){M2(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?B(e.props.minDate):1900,a=e.props.maxDate?B(e.props.maxDate):2100,i=[],s=t;s<=a;s++)i.push(p.createElement("option",{key:s,value:s},s));return i},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return p.createElement("select",{value:e.props.year,className:"react-datepicker__year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){return p.createElement("button",{key:"read",type:"button",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:e.toggleDropdown},p.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),p.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},e.props.year))},e.renderDropdown=function(){return p.createElement(Ir,U({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,s;(s=(i=e.props).onSelect)===null||s===void 0||s.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 p.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},e)},n}(p.Component),Nr=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],m5="react-datepicker-ignore-onclickoutside",Fr=function(r){var n=(r.className||"").split(/\s+/);return Nr.some(function(e){return n.indexOf(e)>=0})},Vr=function(r){M2(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,s;Fr(a.target)&&((s=(i=t.props).onDropdownFocus)===null||s===void 0||s.call(i,a))},t.getDateInView=function(){var a=t.props,i=a.preSelection,s=a.selected,o=a.openToDate,l=o5(t.props),c=l5(t.props),d=X(),u=o||s||i;return u||(l&&R2(d,l)?l:c&&C0(d,c)?c:d)},t.increaseMonth=function(){t.setState(function(a){var i=a.date;return{date:E2(i,1)}},function(){return t.handleMonthChange(t.state.date)})},t.decreaseMonth=function(){t.setState(function(a){var i=a.date;return{date:Z0(i,1)}},function(){return t.handleMonthChange(t.state.date)})},t.handleDayClick=function(a,i,s){t.props.onSelect(a,i,s),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:W2(X(),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,s,o,l;(s=(i=t.props).onYearChange)===null||s===void 0||s.call(i,a),t.setState({isRenderAriaLiveMessage:!0}),t.props.adjustDateOnChange&&(t.props.onSelect(a),(l=(o=t.props).setOpen)===null||l===void 0||l.call(o,!0)),t.props.setPreSelection&&t.props.setPreSelection(a)},t.getEnabledPreSelectionDateForMonth=function(a){if(!O2(a,t.props))return a;for(var i=s0(a),s=ir(a),o=M6(s,i),l=null,c=0;c<=o;c++){var d=I2(i,c);if(!O2(d,t.props)){l=d;break}}return l},t.handleMonthChange=function(a){var i,s,o,l=(i=t.getEnabledPreSelectionDateForMonth(a))!==null&&i!==void 0?i:a;t.handleCustomMonthChange(l),t.props.adjustDateOnChange&&(t.props.onSelect(l),(o=(s=t.props).setOpen)===null||o===void 0||o.call(s,!0)),t.props.setPreSelection&&t.props.setPreSelection(l)},t.handleCustomMonthChange=function(a){var i,s;(s=(i=t.props).onMonthChange)===null||s===void 0||s.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 s=i.date;return{date:W2(s,Number(a))}},function(){return t.handleYearChange(t.state.date)})},t.changeMonth=function(a){t.setState(function(i){var s=i.date;return{date:S2(s,Number(a))}},function(){return t.handleMonthChange(t.state.date)})},t.changeMonthYear=function(a){t.setState(function(i){var s=i.date;return{date:W2(S2(s,w2(a)),B(a))}},function(){return t.handleMonthYearChange(t.state.date)})},t.header=function(a){a===void 0&&(a=t.state.date);var i=t.props.disabled,s=p0(a,t.props.locale,t.props.calendarStartDay),o=[];return t.props.showWeekNumbers&&o.push(p.createElement("div",{key:"W",className:"react-datepicker__day-name ".concat(i?"react-datepicker__day-name--disabled":""),role:"columnheader"},p.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),p.createElement("span",{"aria-hidden":"true"},t.props.weekLabel||"#"))),o.concat([0,1,2,3,4,5,6].map(function(l){var c=I2(s,l),d=t.formatWeekday(c,t.props.locale),u=t.props.weekDayClassName?t.props.weekDayClassName(c):void 0;return p.createElement("div",{key:l,role:"columnheader",className:v2("react-datepicker__day-name",u,i?"react-datepicker__day-name--disabled":"")},p.createElement("span",{className:"react-datepicker__sr-only"},n2(c,"EEEE",t.props.locale)),p.createElement("span",{"aria-hidden":"true"},d))}))},t.formatWeekday=function(a,i){return t.props.formatWeekDay?sr(a,t.props.formatWeekDay,i):t.props.useWeekdaysShort?lr(a,i):or(a,i)},t.decreaseYear=function(){t.setState(function(a){var i,s=a.date;return{date:Q0(s,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,s;if(!t.props.renderCustomHeader){var o=(a=t.props.monthsShown)!==null&&a!==void 0?a:n.defaultProps.monthsShown,l=t.props.showPreviousMonths?o-1:0,c=(i=t.props.monthSelectedIn)!==null&&i!==void 0?i:l,d=Z0(t.state.date,c),u;switch(!0){case t.props.disabled:u=!0;break;case t.props.showMonthYearPicker:u=i5(t.state.date,t.props);break;case t.props.showYearPicker:u=Cr(t.state.date,t.props);break;case t.props.showQuarterYearPicker:u=ur(t.state.date,t.props);break;default:u=r5(d,t.props);break}if(!(!((s=t.props.forceShowMonthNavigation)!==null&&s!==void 0?s:n.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&u||t.props.showTimeSelectOnly)){var C=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],f=["react-datepicker__navigation","react-datepicker__navigation--previous"],m=t.decreaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(m=t.decreaseYear),u&&t.props.showDisabledMonthNavigation&&(f.push("react-datepicker__navigation--previous--disabled"),m=void 0);var v=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,g=t.props,w=g.previousMonthButtonLabel,y=w===void 0?n.defaultProps.previousMonthButtonLabel:w,b=g.previousYearButtonLabel,P=b===void 0?n.defaultProps.previousYearButtonLabel:b,H=t.props,R=H.previousMonthAriaLabel,T=R===void 0?typeof y=="string"?y:"Previous Month":R,x=H.previousYearAriaLabel,D=x===void 0?typeof P=="string"?P:"Previous Year":x;return p.createElement("button",{type:"button",className:f.join(" "),onClick:m,onKeyDown:t.props.handleOnKeyDown,"aria-label":v?D:T},p.createElement("span",{className:C.join(" ")},v?P:y))}}},t.increaseYear=function(){t.setState(function(a){var i,s=a.date;return{date:n0(s,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=s5(t.state.date,t.props);break;case t.props.showYearPicker:i=fr(t.state.date,t.props);break;case t.props.showQuarterYearPicker:i=hr(t.state.date,t.props);break;default:i=a5(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 s=["react-datepicker__navigation","react-datepicker__navigation--next"],o=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];t.props.showTimeSelect&&s.push("react-datepicker__navigation--next--with-time"),t.props.todayButton&&s.push("react-datepicker__navigation--next--with-today-button");var l=t.increaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(l=t.increaseYear),i&&t.props.showDisabledMonthNavigation&&(s.push("react-datepicker__navigation--next--disabled"),l=void 0);var c=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,d=t.props,u=d.nextMonthButtonLabel,C=u===void 0?n.defaultProps.nextMonthButtonLabel:u,f=d.nextYearButtonLabel,m=f===void 0?n.defaultProps.nextYearButtonLabel:f,v=t.props,g=v.nextMonthAriaLabel,w=g===void 0?typeof C=="string"?C:"Next Month":g,y=v.nextYearAriaLabel,b=y===void 0?typeof m=="string"?m:"Next Year":y;return p.createElement("button",{type:"button",className:s.join(" "),onClick:l,onKeyDown:t.props.handleOnKeyDown,"aria-label":c?b:w},p.createElement("span",{className:o.join(" ")},c?m:C))}}},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"),p.createElement("h2",{className:i.join(" ")},n2(a,t.props.dateFormat,t.props.locale))},t.renderYearDropdown=function(a){if(a===void 0&&(a=!1),!(!t.props.showYearDropdown||a))return p.createElement(Er,U({},n.defaultProps,t.props,{date:t.state.date,onChange:t.changeYear,year:B(t.state.date)}))},t.renderMonthDropdown=function(a){if(a===void 0&&(a=!1),!(!t.props.showMonthDropdown||a))return p.createElement(Zr,U({},n.defaultProps,t.props,{month:w2(t.state.date),onChange:t.changeMonth}))},t.renderMonthYearDropdown=function(a){if(a===void 0&&(a=!1),!(!t.props.showMonthYearDropdown||a))return p.createElement(Pr,U({},n.defaultProps,t.props,{date:t.state.date,onChange:t.changeMonthYear}))},t.handleTodayButtonClick=function(a){t.props.onSelect(G7(),a),t.props.setPreSelection&&t.props.setPreSelection(G7())},t.renderTodayButton=function(){if(!(!t.props.todayButton||t.props.showTimeSelectOnly))return p.createElement("div",{className:"react-datepicker__today-button",onClick:t.handleTodayButtonClick},t.props.todayButton)},t.renderDayNamesHeader=function(a){return p.createElement("div",{className:"react-datepicker__day-names",role:"row"},t.header(a))},t.renderDefaultHeader=function(a){var i=a.monthDate,s=a.i;return p.createElement("div",{className:"react-datepicker__header ".concat(t.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},t.renderCurrentMonth(i),p.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(t.props.dropdownMode),onFocus:t.handleDropdownFocus},t.renderMonthDropdown(s!==0),t.renderMonthYearDropdown(s!==0),t.renderYearDropdown(s!==0)))},t.renderCustomHeader=function(a){var i,s,o=a.monthDate,l=a.i;if(t.props.showTimeSelect&&!t.state.monthContainer||t.props.showTimeSelectOnly)return null;var c=t.props,d=c.showYearPicker,u=c.yearItemNumber,C;if(d){var f=o0(o,u),m=f.startPeriod,v=f.endPeriod;C={startYear:m,endYear:v}}var g=r5(t.state.date,t.props),w=a5(t.state.date,t.props),y=i5(t.state.date,t.props),b=s5(t.state.date,t.props);return p.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:t.props.onDropdownFocus},(s=(i=t.props).renderCustomHeader)===null||s===void 0?void 0:s.call(i,U(U(U({},t.state),d&&{visibleYearsRange:C}),{customHeaderCount:l,monthDate:o,changeMonth:t.changeMonth,changeYear:t.changeYear,decreaseMonth:t.decreaseMonth,increaseMonth:t.increaseMonth,decreaseYear:t.decreaseYear,increaseYear:t.increaseYear,prevMonthButtonDisabled:g,nextMonthButtonDisabled:w,prevYearButtonDisabled:y,nextYearButtonDisabled:b})))},t.renderYearHeader=function(a){var i=a.monthDate,s=t.props,o=s.showYearPicker,l=s.yearItemNumber,c=l===void 0?n.defaultProps.yearItemNumber:l,d=o0(i,c),u=d.startPeriod,C=d.endPeriod;return p.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},o?"".concat(u," - ").concat(C):B(i))},t.renderHeader=function(a){var i=a.monthDate,s=a.i,o=s===void 0?0:s,l={monthDate:i,i:o};switch(!0){case t.props.renderCustomHeader!==void 0:return t.renderCustomHeader(l);case(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker):return t.renderYearHeader(l);default:return t.renderDefaultHeader(l)}},t.renderMonths=function(){var a,i;if(!(t.props.showTimeSelectOnly||t.props.showYearPicker)){for(var s=[],o=(a=t.props.monthsShown)!==null&&a!==void 0?a:n.defaultProps.monthsShown,l=t.props.showPreviousMonths?o-1:0,c=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?n0(t.state.date,l):Z0(t.state.date,l),d=(i=t.props.monthSelectedIn)!==null&&i!==void 0?i:l,u=0;u<o;++u){var C=u-d+l,f=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?n0(c,C):E2(c,C),m="month-".concat(u),v=u<o-1,g=u>0;s.push(p.createElement("div",{key:m,ref:function(w){t.monthContainer=w??void 0},className:"react-datepicker__month-container"},t.renderHeader({monthDate:f,i:u}),p.createElement(xr,U({},n.defaultProps,t.props,{containerRef:t.containerRef,ariaLabelPrefix:t.props.monthAriaLabelPrefix,day:f,onDayClick:t.handleDayClick,handleOnKeyDown:t.props.handleOnDayKeyDown,handleOnMonthKeyDown:t.props.handleOnKeyDown,onDayMouseEnter:t.handleDayMouseEnter,onMouseLeave:t.handleMonthMouseLeave,orderInDisplay:u,selectingDate:t.state.selectingDate,monthShowsDuplicateDaysEnd:v,monthShowsDuplicateDaysStart:g,dayNamesHeader:t.renderDayNamesHeader(f)}))))}return s}},t.renderYears=function(){if(!t.props.showTimeSelectOnly&&t.props.showYearPicker)return p.createElement("div",{className:"react-datepicker__year--container"},t.renderHeader({monthDate:t.state.date}),p.createElement(Tr,U({},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 p.createElement(Hr,U({},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&&t4(a)&&!!t.props.selected,s=i?"".concat(d5(a.getHours()),":").concat(d5(a.getMinutes())):"";if(t.props.showTimeInput)return p.createElement(yr,U({},n.defaultProps,t.props,{date:a,timeString:s,onChange:t.props.onTimeChange}))},t.renderAriaLiveRegion=function(){var a,i=o0(t.state.date,(a=t.props.yearItemNumber)!==null&&a!==void 0?a:n.defaultProps.yearItemNumber),s=i.startPeriod,o=i.endPeriod,l;return t.props.showYearPicker?l="".concat(s," - ").concat(o):t.props.showMonthYearPicker||t.props.showQuarterYearPicker?l=B(t.state.date):l="".concat(r3(w2(t.state.date),t.props.locale)," ").concat(B(t.state.date)),p.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},t.state.isRenderAriaLiveMessage&&l)},t.renderChildren=function(){if(t.props.children)return p.createElement("div",{className:"react-datepicker__children-container"},t.props.children)},t.containerRef=p.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:m5,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:v1}},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&&(!W(this.props.preSelection,e.preSelection)||this.props.monthSelectedIn!==e.monthSelectedIn)){var a=!_2(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return a&&t.handleCustomMonthChange(t.state.date)})}else this.props.openToDate&&!W(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate})},n.prototype.render=function(){var e=this.props.container||Xn;return p.createElement(e4,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},p.createElement("div",{style:{display:"contents"},ref:this.containerRef},p.createElement(e,{className:v2("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},n}(p.Component),Ar=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 p.createElement("i",{className:"".concat(i," ").concat(n," ").concat(t),"aria-hidden":"true",onClick:a});if(p.isValidElement(n)){var s=n;return p.cloneElement(s,{className:"".concat(s.props.className||""," ").concat(i," ").concat(t),onClick:function(o){typeof s.props.onClick=="function"&&s.props.onClick(o),typeof a=="function"&&a(o)}})}return p.createElement("svg",{className:"".concat(i," ").concat(t),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:a},p.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"}))},g5=function(r){M2(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 E3.createPortal(this.props.children,this.el)},n}(p.Component),jr="[tabindex], a, button, input, select, textarea",Br=function(r){return(r instanceof HTMLAnchorElement||!r.disabled)&&r.tabIndex!==-1},v5=function(r){M2(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(jr),1,-1).filter(Br)},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=p.createRef(),t}return n.prototype.render=function(){var e;return((e=this.props.enableTabLoop)!==null&&e!==void 0?e:n.defaultProps.enableTabLoop)?p.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},p.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,p.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},n.defaultProps={enableTabLoop:!0},n}(p.Component);function Rr(r){function n(e){var t,a=typeof e.hidePopper=="boolean"?e.hidePopper:!0,i=p.useRef(null),s=Qn(U({open:!a,whileElementsMounted:Dn,placement:e.popperPlacement,middleware:G2([Fn({padding:15}),Nn(10),Vn({element:i})],(t=e.popperModifiers)!==null&&t!==void 0?t:[],!0)},e.popperProps)),o=U(U({},e),{hidePopper:a,popperProps:U(U({},s),{arrowRef:i})});return p.createElement(r,U({},o))}return n.displayName="withFloating(".concat(r.displayName||r.name||"Component",")"),n}var Yr=function(r){var n=r.className,e=r.wrapperClassName,t=r.hidePopper,a=t===void 0?!0:t,i=r.popperComponent,s=r.targetComponent,o=r.enableTabLoop,l=r.popperOnKeyDown,c=r.portalId,d=r.portalHost,u=r.popperProps,C=r.showArrow,f=void 0;if(!a){var m=v2("react-datepicker-popper",n);f=p.createElement(v5,{enableTabLoop:o},p.createElement("div",{ref:u.refs.setFloating,style:u.floatingStyles,className:m,"data-placement":u.placement,onKeyDown:l},i,C&&p.createElement(Un,{ref:u.arrowRef,context:u.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}r.popperContainer&&(f=p.createElement(r.popperContainer,{},f)),c&&!a&&(f=p.createElement(g5,{portalId:c,portalHost:d},f));var v=v2("react-datepicker-wrapper",e);return p.createElement(p.Fragment,null,p.createElement("div",{ref:u.refs.setReference,className:v},s),f)},Ur=Rr(Yr);function Wr(r,n){return r&&n?w2(r)!==w2(n)||B(r)!==B(n):r!==n}var o3="Date input not valid.",M5=function(r){M2(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:X()},t.modifyHolidays=function(){var a;return(a=t.props.holidays)===null||a===void 0?void 0:a.reduce(function(i,s){var o=new Date(s.date);return t4(o)?G2(G2([],i,!0),[U(U({},s),{date:o})],!1):i},[])},t.calcInitialState=function(){var a,i=t.getPreSelection(),s=o5(t.props),o=l5(t.props),l=s&&R2(i,n4(s))?s:o&&C0(i,K7(o))?o: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:l,highlightDates:c5(t.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},t.getInputValue=function(){var a,i=t.props,s=i.locale,o=i.startDate,l=i.endDate,c=i.rangeSeparator,d=i.selected,u=i.selectedDates,C=i.selectsMultiple,f=i.selectsRange,m=i.value,v=(a=t.props.dateFormat)!==null&&a!==void 0?a:n.defaultProps.dateFormat,g=t.state.inputValue;return typeof m=="string"?m:typeof g=="string"?g:f?er(o,l,{dateFormat:v,locale:s,rangeSeparator:c}):C?tr(u??[],{dateFormat:v,locale:s}):H2(d,{dateFormat:v,locale:s})},t.resetHiddenStatus=function(){t.setState(U(U({},t.state),{wasHidden:!1}))},t.setHiddenStatus=function(){t.setState(U(U({},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:l3},function(){a||t.setState(function(s){return{focused:i?s.focused:!1}},function(){!i&&t.deferBlur(),t.setState({inputValue:null})})})},t.inputOk=function(){return r0(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,s,o=t.state.wasHidden,l=o?t.state.open:!0;o&&t.resetHiddenStatus(),t.state.preventFocus||((s=(i=t.props).onFocus)===null||s===void 0||s.call(i,a),l&&!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(U(U({},t.state),{inputValue:null}))},t.handleBlur=function(a){var i,s;(!t.state.open||t.props.withPortal||t.props.showTimeInput)&&((s=(i=t.props).onBlur)===null||s===void 0||s.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,s;t.props.inline||t.setOpen(!1),(s=(i=t.props).onClickOutside)===null||s===void 0||s.call(i,a),t.props.withPortal&&a.preventDefault()},t.handleChange=function(){for(var a,i,s,o,l,c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];var u=c[0];if(!(t.props.onChangeRaw&&(t.props.onChangeRaw.apply(t,c),!u||typeof u.isDefaultPrevented!="function"||u.isDefaultPrevented()))){t.setState({inputValue:(u==null?void 0:u.target)instanceof HTMLInputElement?u.target.value:null,lastPreSelectChange:zr});var C=t.props,f=C.selectsRange,m=C.startDate,v=C.endDate,g=(a=t.props.dateFormat)!==null&&a!==void 0?a:n.defaultProps.dateFormat,w=(i=t.props.strictParsing)!==null&&i!==void 0?i:n.defaultProps.strictParsing,y=(u==null?void 0:u.target)instanceof HTMLInputElement?u.target.value:"";if(f){var b=t.props.rangeSeparator,P=b.trim(),H=y.split(g.includes(P)?b:P,2).map(function(q){return q.trim()}),R=H[0],T=H[1],x=e3(R??"",g,t.props.locale,w),D=x?e3(T??"",g,t.props.locale,w):null,I=(m==null?void 0:m.getTime())!==(x==null?void 0:x.getTime()),$=(v==null?void 0:v.getTime())!==(D==null?void 0:D.getTime());if(!I&&!$||x&&O2(x,t.props)||D&&O2(D,t.props))return;(o=(s=t.props).onChange)===null||o===void 0||o.call(s,[x,D],u)}else{var j=e3(y,g,t.props.locale,w,(l=t.props.selected)!==null&&l!==void 0?l:void 0);(j||!y)&&t.setSelected(j,u,!0)}}},t.handleSelect=function(a,i,s){var o;if(!t.props.readOnly){var l=t.props,c=l.selectsRange,d=l.startDate,u=l.endDate,C=l.locale,f=l.swapRange,m=(o=t.props.dateFormat)!==null&&o!==void 0?o:n.defaultProps.dateFormat,v=!c||d&&!u&&(f||!i3(a,d));if(t.props.shouldCloseOnSelect&&!t.props.showTimeSelect&&v&&t.sendFocusBackToInput(),t.props.onChangeRaw){var g=H2(a,{dateFormat:m,locale:C});t.props.onChangeRaw(i,{date:a,formattedDate:g})}t.setSelected(a,i,!1,s),t.props.showDateSelect&&t.setState({isRenderAriaLiveMessage:!0}),!t.props.shouldCloseOnSelect||t.props.showTimeSelect?t.setPreSelection(a):v&&t.setOpen(!1)}},t.setSelected=function(a,i,s,o){var l,c,d=a;if(t.props.showYearPicker){if(d!==null&&o4(B(d),t.props))return}else if(t.props.showMonthYearPicker){if(d!==null&&J7(d,t.props))return}else if(d!==null&&O2(d,t.props))return;var u=t.props,C=u.onChange,f=u.selectsRange,m=u.startDate,v=u.endDate,g=u.selectsMultiple,w=u.selectedDates,y=u.minTime,b=u.swapRange;if(!H0(t.props.selected,d)||t.props.allowSameDay||f||g)if(d!==null&&(t.props.selected&&(!s||!t.props.showTimeSelect&&!t.props.showTimeSelectOnly&&!t.props.showTimeInput)&&(d=t3(d,{hour:a0(t.props.selected),minute:i0(t.props.selected),second:h0(t.props.selected)})),!s&&(t.props.showTimeSelect||t.props.showTimeSelectOnly)&&y&&(d=t3(d,{hour:y.getHours(),minute:y.getMinutes(),second:y.getSeconds()})),t.props.inline||t.setState({preSelection:d}),t.props.focusSelectedMonth||t.setState({monthSelectedIn:o})),f){var P=!m&&!v,H=m&&!v,R=!m&&!!v,T=m&&v;P?C==null||C([d,null],i):H?d===null?C==null||C([null,null],i):i3(d,m)?b?C==null||C([d,m],i):C==null||C([d,null],i):C==null||C([m,d],i):R&&(d&&i3(d,v)?C==null||C([d,v],i):C==null||C([d,null],i)),T&&(C==null||C([d,null],i))}else if(g){if(d!==null)if(!(w!=null&&w.length))C==null||C([d],i);else{var x=w.some(function(I){return W(I,d)});if(x){var D=w.filter(function(I){return!W(I,d)});C==null||C(D,i)}else C==null||C(G2(G2([],w,!0),[d],!1),i)}}else C==null||C(d,i);s||((c=(l=t.props).onSelect)===null||c===void 0||c.call(l,d,i),t.setState({inputValue:null}))},t.setPreSelection=function(a){if(!t.props.readOnly){var i=r0(t.props.minDate),s=r0(t.props.maxDate),o=!0;if(a){var l=n4(a);if(i&&s)o=T0(a,t.props.minDate,t.props.maxDate);else if(i){var c=n4(t.props.minDate);o=C0(a,c)||H0(l,c)}else if(s){var d=K7(t.props.maxDate);o=R2(a,d)||H0(l,d)}}o&&t.setState({preSelection:a})}},t.toggleCalendar=function(){t.setOpen(!t.state.open)},t.handleTimeChange=function(a){var i,s;if(!(t.props.selectsRange||t.props.selectsMultiple)){var o=t.props.selected?t.props.selected:t.getPreSelection(),l=t.props.selected?a:t3(o,{hour:a0(a),minute:i0(a)});t.setState({preSelection:l}),(s=(i=t.props).onChange)===null||s===void 0||s.call(i,l),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.onInputKeyDown=function(a){var i,s,o,l,c,d;(s=(i=t.props).onKeyDown)===null||s===void 0||s.call(i,a);var u=a.key;if(!t.state.open&&!t.props.inline&&!t.props.preventOpenOnFocus){(u===k.ArrowDown||u===k.ArrowUp||u===k.Enter)&&((o=t.onInputClick)===null||o===void 0||o.call(t));return}if(t.state.open){if(u===k.ArrowDown||u===k.ArrowUp){a.preventDefault();var C=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"]',f=((l=t.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&t.calendar.containerRef.current.querySelector(C);f instanceof HTMLElement&&f.focus({preventScroll:!0});return}var m=X(t.state.preSelection);u===k.Enter?(a.preventDefault(),a.target.blur(),t.inputOk()&&t.state.lastPreSelectChange===l3?(t.handleSelect(m,a),!t.props.shouldCloseOnSelect&&t.setPreSelection(m)):t.setOpen(!1)):u===k.Escape?(a.preventDefault(),a.target.blur(),t.sendFocusBackToInput(),t.setOpen(!1)):u===k.Tab&&t.setOpen(!1),t.inputOk()||(d=(c=t.props).onInputError)===null||d===void 0||d.call(c,{code:1,msg:o3})}},t.onPortalKeyDown=function(a){var i=a.key;i===k.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,s,o,l,c,d,u=t.props,C=u.minDate,f=u.maxDate,m=u.disabledKeyboardNavigation,v=u.showWeekPicker,g=u.shouldCloseOnSelect,w=u.locale,y=u.calendarStartDay,b=u.adjustDateOnChange,P=u.inline;if((s=(i=t.props).onKeyDown)===null||s===void 0||s.call(i,a),!m){var H=a.key,R=a.shiftKey,T=X(t.state.preSelection),x=function(z,E){var A=E;switch(z){case k.ArrowRight:A=v?H1(E,1):I2(E,1);break;case k.ArrowLeft:A=v?_7(E):mt(E);break;case k.ArrowUp:A=_7(E);break;case k.ArrowDown:A=H1(E,1);break;case k.PageUp:A=R?Q0(E,1):Z0(E,1);break;case k.PageDown:A=R?n0(E,1):E2(E,1);break;case k.Home:A=p0(E,w,y);break;case k.End:A=ar(E);break}return A},D=function(z,E){for(var A=40,F=z,s2=!1,Z2=0,M=x(z,E);!s2;){if(Z2>=A){M=E;break}C&&M<C&&(F=k.ArrowRight,M=O2(C,t.props)?x(F,M):C),f&&M>f&&(F=k.ArrowLeft,M=O2(f,t.props)?x(F,M):f),O2(M,t.props)?((F===k.PageUp||F===k.Home)&&(F=k.ArrowRight),(F===k.PageDown||F===k.End)&&(F=k.ArrowLeft),M=x(F,M)):s2=!0,Z2++}return M};if(H===k.Enter){a.preventDefault(),t.handleSelect(T,a),!g&&t.setPreSelection(T);return}else if(H===k.Escape){a.preventDefault(),t.setOpen(!1),t.inputOk()||(l=(o=t.props).onInputError)===null||l===void 0||l.call(o,{code:1,msg:o3});return}var I=null;switch(H){case k.ArrowLeft:case k.ArrowRight:case k.ArrowUp:case k.ArrowDown:case k.PageUp:case k.PageDown:case k.Home:case k.End:I=D(H,T);break}if(!I){(d=(c=t.props).onInputError)===null||d===void 0||d.call(c,{code:1,msg:o3});return}if(a.preventDefault(),t.setState({lastPreSelectChange:l3}),b&&t.setSelected(I),t.setPreSelection(I),P){var $=w2(T),j=w2(I),q=B(T),G=B(I);$!==j||q!==G?t.setState({shouldFocusDayInline:!0}):t.setState({shouldFocusDayInline:!1})}}},t.onPopperKeyDown=function(a){var i=a.key;i===k.Escape&&(a.preventDefault(),t.sendFocusBackToInput(),t.setOpen(!1))},t.onClearClick=function(a){a&&a.preventDefault&&a.preventDefault(),t.sendFocusBackToInput();var i=t.props,s=i.selectsRange,o=i.onChange;s?o==null||o([null,null],a):o==null||o(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:p.createElement(Vr,U({showMonthYearDropdown:void 0,ref:function(s){t.calendar=s}},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:mr(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,s=(a=t.props.dateFormat)!==null&&a!==void 0?a:n.defaultProps.dateFormat,o=t.props.showTimeInput||t.props.showTimeSelect,l=o?"PPPPp":"PPPP",c;return t.props.selectsRange?c="Selected start date: ".concat(H2(t.props.startDate,{dateFormat:l,locale:i}),". ").concat(t.props.endDate?"End date: "+H2(t.props.endDate,{dateFormat:l,locale:i}):""):t.props.showTimeSelectOnly?c="Selected time: ".concat(H2(t.props.selected,{dateFormat:s,locale:i})):t.props.showYearPicker?c="Selected year: ".concat(H2(t.props.selected,{dateFormat:"yyyy",locale:i})):t.props.showMonthYearPicker?c="Selected month: ".concat(H2(t.props.selected,{dateFormat:"MMMM yyyy",locale:i})):t.props.showQuarterYearPicker?c="Selected quarter: ".concat(H2(t.props.selected,{dateFormat:"yyyy, QQQ",locale:i})):c="Selected date: ".concat(H2(t.props.selected,{dateFormat:l,locale:i})),p.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},c)},t.renderDateInput=function(){var a,i,s=v2(t.props.className,(a={},a[t.props.outsideClickIgnoreClass||n.defaultProps.outsideClickIgnoreClass]=t.state.open,a)),o=t.props.customInput||p.createElement("input",{type:"text"}),l=t.props.customInputRef||"ref";return p.cloneElement(o,(i={},i[l]=function(c){t.input=c},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=v2(o.props.className,s),i.title=t.props.title,i.readOnly=t.props.readOnly,i.required=t.props.required,i.tabIndex=t.props.tabIndex,i["aria-describedby"]=t.props.ariaDescribedBy,i["aria-invalid"]=t.props.ariaInvalid,i["aria-labelledby"]=t.props.ariaLabelledBy,i["aria-required"]=t.props.ariaRequired,i))},t.renderClearButton=function(){var a=t.props,i=a.isClearable,s=a.disabled,o=a.selected,l=a.startDate,c=a.endDate,d=a.clearButtonTitle,u=a.clearButtonClassName,C=u===void 0?"":u,f=a.ariaLabelClose,m=f===void 0?"Close":f,v=a.selectedDates,g=a.readOnly;return i&&!g&&(o!=null||l!=null||c!=null||v!=null&&v.length)?p.createElement("button",{type:"button",className:v2("react-datepicker__close-icon",C,{"react-datepicker__close-icon--disabled":s}),disabled:s,"aria-label":m,onClick:t.onClearClick,title:d,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:m5,readOnly:!1,rangeSeparator:$7,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:v1,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,s,o;e.inline&&Wr(e.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&e.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),e.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:c5(this.props.highlightDates)}),!t.focused&&!H0(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&&((o=(s=this.props).onCalendarClose)===null||o===void 0||o.call(s)))},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,s=e.calendarIconClassName,o=e.toggleCalendarOnIconClick,l=this.state.open;return i&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),p.createElement("div",{className:"react-datepicker__input-container".concat(t?" react-datepicker__view-calendar-icon":"")},t&&p.createElement(Ar,U({icon:a,className:v2(s,!s&&i,l&&"react-datepicker-ignore-onclickoutside")},o?{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?p.createElement(v5,{enableTabLoop:this.props.enableTabLoop},p.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},e)):null;return this.state.open&&this.props.portalId&&(t=p.createElement(g5,U({portalId:this.props.portalId},this.props),t)),p.createElement("div",null,this.renderInputContainer(),t)}return p.createElement(Ur,U({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:e,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},n}(p.Component),zr="input",l3="navigate";const $r={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"}},qr=(r,n,e)=>{let t;const a=$r[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},Gr={full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},Kr={full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Qr={full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Xr={date:q0({formats:Gr,defaultWidth:"full"}),time:q0({formats:Kr,defaultWidth:"full"}),dateTime:q0({formats:Qr,defaultWidth:"full"})},Jr={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"},ea=(r,n,e,t)=>Jr[r],ta={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"]},ra={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"]},aa={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"]},ia={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"}},sa={ordinalNumber:(r,n)=>Number(r)+".",era:j2({values:ta,defaultWidth:"wide"}),quarter:j2({values:na,defaultWidth:"wide",argumentCallback:r=>r-1}),month:j2({values:ra,defaultWidth:"wide"}),day:j2({values:aa,defaultWidth:"wide"}),dayPeriod:j2({values:ia,defaultWidth:"wide"})},oa=/^(\d+)\.?/i,la=/\d+/i,ca={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},da={any:[/^f/i,/^e/i]},ua={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? kvartal/i},ha={any:[/1/i,/2/i,/3/i,/4/i]},Ca={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},fa={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]},pa={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},ma={any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},ga={narrow:/^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,any:/^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i},va={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}},Ma={ordinalNumber:l7({matchPattern:oa,parsePattern:la,valueCallback:r=>parseInt(r,10)}),era:B2({matchPatterns:ca,defaultMatchWidth:"wide",parsePatterns:da,defaultParseWidth:"any"}),quarter:B2({matchPatterns:ua,defaultMatchWidth:"wide",parsePatterns:ha,defaultParseWidth:"any",valueCallback:r=>r+1}),month:B2({matchPatterns:Ca,defaultMatchWidth:"wide",parsePatterns:fa,defaultParseWidth:"any"}),day:B2({matchPatterns:pa,defaultMatchWidth:"wide",parsePatterns:ma,defaultParseWidth:"any"}),dayPeriod:B2({matchPatterns:ga,defaultMatchWidth:"any",parsePatterns:va,defaultParseWidth:"any"})},y5={code:"nb",formatDistance:qr,formatLong:Xr,formatRelative:ea,localize:sa,match:Ma,options:{weekStartsOn:1,firstWeekContainsDate:4}};Q7("nb",y5);const ya=r=>h.jsx(_.Input,{...r,inputMode:"numeric",type:"text"}),wa=({value:r,onChange:n,dateFormat:e="dd.MM.yyyy",...t})=>h.jsxs(_.Field,{children:[h.jsx(_.Label,{style:{display:"block",width:"fit-content"},children:h.jsx(V2,{text:t.label,required:t.required,optional:t.optional})}),t.description&&h.jsx(_.Field.Description,{children:t.description}),h.jsx(M5,{locale:"nb",selected:r,dateFormat:e,placeholderText:"dd.mm.åååå",onChange:a=>n==null?void 0:n(a??void 0),customInput:p.createElement(ya)}),t.error&&h.jsx(_.ValidationMessage,{children:t.error})]}),ba={input:"_input_r8sn8_2"};Q7("nb",y5);const La=r=>h.jsx(_.Input,{...r,inputMode:"numeric",type:"text"}),_a=({value:r,onChange:n,dateTimeFormat:e="dd.MM.yyyy, HH:mm",timeInputLabel:t="Time: ",...a})=>h.jsxs(_.Field,{className:ba.input,children:[h.jsx(_.Label,{style:{display:"block",width:"fit-content"},children:h.jsx(V2,{text:a.label,required:a.required,optional:a.optional})}),a.description&&h.jsx(_.Field.Description,{children:a.description}),h.jsx(M5,{locale:"nb",selected:r,dateFormat:e,onChange:i=>n==null?void 0:n(i??void 0),customInput:p.createElement(La),showTimeInput:!0,placeholderText:"dd.mm.åååå, tt:mm",timeInputLabel:t}),a.error&&h.jsx(_.ValidationMessage,{children:a.error})]}),i1={uploadButton:"_uploadButton_1ck4o_2",uploadInformation:"_uploadInformation_1ck4o_3",fileList:"_fileList_1ck4o_22",fileItem:"_fileItem_1ck4o_29",removeButton:"_removeButton_1ck4o_42"};var d4=typeof self<"u"?self:global;const b1=typeof navigator<"u",xa=b1&&typeof HTMLImageElement>"u",u4=!(typeof global>"u"||typeof process>"u"||!process.versions||!process.versions.node),h4=d4.Buffer,C4=d4.BigInt,f4=!!h4,ka=r=>r;function p4(r,n=ka){if(u4)try{return typeof require=="function"?Promise.resolve(n(require(r))):import(r).then(n)}catch{console.warn(`Couldn't load ${r}`)}}let c3=d4.fetch;const Za=r=>c3=r;if(!d4.fetch){const r=p4("http",t=>t),n=p4("https",t=>t),e=(t,{headers:a}={})=>new Promise(async(i,s)=>{let{port:o,hostname:l,pathname:c,protocol:d,search:u}=new URL(t);const C={method:"GET",hostname:l,path:encodeURI(c)+u,headers:a};o!==""&&(C.port=Number(o));const f=(d==="https:"?await n:await r).request(C,m=>{if(m.statusCode===301||m.statusCode===302){let v=new URL(m.headers.location,t).toString();return e(v,{headers:a}).then(i).catch(s)}i({status:m.statusCode,arrayBuffer:()=>new Promise(v=>{let g=[];m.on("data",w=>g.push(w)),m.on("end",()=>v(Buffer.concat(g)))})})});f.on("error",s),f.end()});Za(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 m4=r=>w5(r)?void 0:r,Da=r=>r!==void 0;function w5(r){return r===void 0||(r instanceof Map?r.size===0:Object.values(r).filter(Da).length===0)}function u2(r){let n=new Error(r);throw delete n.stack,n}function O0(r){return(r=function(n){for(;n.endsWith("\0");)n=n.slice(0,-1);return n}(r).trim())===""?void 0:r}function d3(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 u3=r=>String.fromCharCode.apply(null,r),b5=typeof TextDecoder<"u"?new TextDecoder("utf-8"):void 0;function L5(r){return b5?b5.decode(r):f4?Buffer.from(r).toString("utf8"):decodeURIComponent(escape(u3(r)))}class k2{static from(n,e){return n instanceof this&&n.le===e?n:new k2(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 k2){t===void 0&&(t=n.byteLength-e),(e+=n.byteOffset)+t>n.byteOffset+n.byteLength&&u2("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 u2("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=k2){return n instanceof DataView||n instanceof k2?n=new Uint8Array(n.buffer,n.byteOffset,n.byteLength):n instanceof ArrayBuffer&&(n=new Uint8Array(n)),n instanceof Uint8Array||u2("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 k2(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 L5(this.getUint8Array(n,e))}getLatin1String(n=0,e=this.byteLength){let t=this.getUint8Array(n,e);return u3(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 u3(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 h3(r,n){u2(`${r} '${n}' was not loaded, try using full build of exifr.`)}class C3 extends Map{constructor(n){super(),this.kind=n}get(n,e){return this.has(n)||h3(this.kind,n),e&&(n in e||function(t,a){u2(`Unknown ${t} '${a}'.`)}(this.kind,n),e[n].enabled||h3(this.kind,n)),super.get(n)}keyList(){return Array.from(this.keys())}}var Q2=new C3("file parser"),h2=new C3("segment parser"),X2=new C3("file reader");function Sa(r,n){return typeof r=="string"?_5(r,n):b1&&!xa&&r instanceof HTMLImageElement?_5(r.src,n):r instanceof Uint8Array||r instanceof ArrayBuffer||r instanceof DataView?new k2(r):b1&&r instanceof Blob?f3(r,n,"blob",E0):void u2("Invalid input argument")}function _5(r,n){return(e=r).startsWith("data:")||e.length>1e4?p3(r,n,"base64"):u4&&r.includes("://")?f3(r,n,"url",I0):u4?p3(r,n,"fs"):b1?f3(r,n,"url",I0):void u2("Invalid input argument");var e}async function f3(r,n,e,t){return X2.has(e)?p3(r,n,e):t?async function(a,i){let s=await i(a);return new k2(s)}(r,t):void u2(`Parser ${e} is not loaded`)}async function p3(r,n,e){let t=new(X2.get(e))(r,n);return await t.read(),t}const I0=r=>c3(r).then(n=>n.arrayBuffer()),E0=r=>new Promise((n,e)=>{let t=new FileReader;t.onloadend=()=>n(t.result||new ArrayBuffer),t.onerror=e,t.readAsArrayBuffer(r)});class Pa 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 d2(r,n,e){let t=new Pa;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 N0(r,n,e){let t,a=r.get(n);for(t of e)a.set(t[0],t[1])}const m2=new Map,N2=new Map,m0=new Map,g0=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],s1=["jfif","xmp","icc","iptc","ihdr"],F0=["tiff",...s1],i2=["ifd0","ifd1","exif","gps","interop"],v0=[...F0,...i2],M0=["makerNote","userComment"],o1=["translateKeys","translateValues","reviveValues","multiSegment"],y0=[...o1,"sanitize","mergeOutput","silentErrors"];class x5{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class L1 extends x5{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=i2.includes(n),this.canBeFiltered&&(this.dict=m2.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:s}=t;i&&i.length>0&&this.translateTagSet(i,this.pick),s&&s.length>0&&this.translateTagSet(s,this.skip)}this.applyInheritables(t)}else t===!0||t===!1?this.parse=this.enabled=t:u2(`Invalid options argument: ${t}`)}applyInheritables(n){let e,t;for(e of o1)t=n[e],t!==void 0&&(this[e]=t)}translateTagSet(n,e){if(this.dict){let t,a,{tagKeys:i,tagValues:s}=this.dict;for(t of n)typeof t=="string"?(a=s.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,g4(this.pick,this.deps)):this.enabled&&this.pick.size>0&&g4(this.pick,this.deps)}}var x2={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},k5=new Map;class V0 extends x5{static useCached(n){let e=k5.get(n);return e!==void 0||(e=new this(n),k5.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):u2(`Invalid options argument ${n}`),this.firstChunkSize===void 0&&(this.firstChunkSize=b1?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let n;for(n of g0)this[n]=x2[n];for(n of y0)this[n]=x2[n];for(n of M0)this[n]=x2[n];for(n of v0)this[n]=new L1(n,x2[n],void 0,this)}setupFromTrue(){let n;for(n of g0)this[n]=x2[n];for(n of y0)this[n]=x2[n];for(n of M0)this[n]=!0;for(n of v0)this[n]=new L1(n,!0,void 0,this)}setupFromArray(n){let e;for(e of g0)this[e]=x2[e];for(e of y0)this[e]=x2[e];for(e of M0)this[e]=x2[e];for(e of v0)this[e]=new L1(e,!1,void 0,this);this.setupGlobalFilters(n,void 0,i2)}setupFromObject(n){let e;for(e of(i2.ifd0=i2.ifd0||i2.image,i2.ifd1=i2.ifd1||i2.thumbnail,Object.assign(this,n),g0))this[e]=m3(n[e],x2[e]);for(e of y0)this[e]=m3(n[e],x2[e]);for(e of M0)this[e]=m3(n[e],x2[e]);for(e of F0)this[e]=new L1(e,x2[e],n[e],this);for(e of i2)this[e]=new L1(e,x2[e],n[e],this.tiff);this.setupGlobalFilters(n.pick,n.skip,i2,v0),n.tiff===!0?this.batchEnableWithBool(i2,!0):n.tiff===!1?this.batchEnableWithUserValue(i2,n):Array.isArray(n.tiff)?this.setupGlobalFilters(n.tiff,void 0,i2):typeof n.tiff=="object"&&this.setupGlobalFilters(n.tiff.pick,n.tiff.skip,i2)}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 s of a)this[s].enabled=!1;let i=Z5(n,t);for(let[s,o]of i)g4(this[s].pick,o),this[s].enabled=!0}else if(e&&e.length){let i=Z5(e,t);for(let[s,o]of i)g4(this[s].skip,o)}}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=i2.some(i=>this[i].enabled===!0)||this.makerNote||this.userComment;for(let i of i2)this[i].finalizeFilters()}get onlyTiff(){return!s1.map(n=>this[n].enabled).some(n=>n===!0)&&this.tiff.enabled}checkLoadedPlugins(){for(let n of F0)this[n].enabled&&!h2.has(n)&&h3("segment parser",n)}}function Z5(r,n){let e,t,a,i,s=[];for(a of n){for(i of(e=m2.get(a),t=[],e))(r.includes(i[0])||r.includes(i[1]))&&t.push(i[0]);t.length&&s.push([a,t])}return s}function m3(r,n){return r!==void 0?r:n!==void 0?n:void 0}function g4(r,n){for(let e of n)r.add(e)}O(V0,"default",x2);class w0{constructor(n){O(this,"parsers",{}),O(this,"output",{}),O(this,"errors",[]),O(this,"pushToErrors",e=>this.errors.push(e)),this.options=V0.useCached(n)}async read(n){this.file=await Sa(n,this.options)}setup(){if(this.fileParser)return;let{file:n}=this,e=n.getUint16(0);for(let[t,a]of Q2)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(),u2("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),m4(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=h2.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),s=this.parsers.tiff=new t(i,n,e),o=await s.extractThumbnail();return e.close&&e.close(),o}}async function v4(r,n){let e=new w0(n);return await e.read(r),e.parse()}var Ha=Object.freeze({__proto__:null,parse:v4,Exifr:w0,fileParsers:Q2,segmentParsers:h2,fileReaders:X2,tagKeys:m2,tagValues:N2,tagRevivers:m0,createDictionary:d2,extendDictionary:N0,fetchUrlAsArrayBuffer:I0,readBlobAsArrayBuffer:E0,chunkedProps:g0,otherSegments:s1,segments:F0,tiffBlocks:i2,segmentsAndBlocks:v0,tiffExtractables:M0,inheritables:o1,allFormatters:y0,Options:V0});class M4{constructor(n,e,t){O(this,"errors",[]),O(this,"ensureSegmentChunk",async a=>{let i=a.start,s=a.size||65536;if(this.file.chunked)if(this.file.available(i,s))a.chunk=this.file.subarray(i,s);else try{a.chunk=await this.file.readChunk(i,s)}catch(o){u2(`Couldn't read segment: ${JSON.stringify(a)}. ${o.message}`)}else this.file.byteLength>i+s?a.chunk=this.file.subarray(i,s):a.size===void 0?a.chunk=this.file.subarray(i):u2("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(h2.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 s=this.parsers[t];s&&s.append||s||this.createParser(t,a)}}}async readSegments(n){let e=n.map(this.ensureSegmentChunk);await Promise.all(e)}}class F2{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,s=t-a;return{offset:e,length:t,headerLength:a,start:i,size:s,end:i+s}}static parse(n,e={}){return new this(n,new V0({[this.type]:e}),n).parse()}normalizeInput(n){return n instanceof k2?n:new k2(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=m0.get(e),a=N2.get(e),i=m2.get(e),s=this.options[e],o=s.reviveValues&&!!t,l=s.translateValues&&!!a,c=s.translateKeys&&!!i,d={};for(let[u,C]of n)o&&t.has(u)?C=t.get(u)(C):l&&a.has(u)&&(C=this.translateValue(C,a.get(u))),c&&i.has(u)&&(u=i.get(u)||u),d[u]=C;return d}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(F2,"headerLength",4),O(F2,"type",void 0),O(F2,"multiSegment",!1),O(F2,"canHandle",()=>!1);function Ta(r){return r===192||r===194||r===196||r===219||r===221||r===218||r===254}function Oa(r){return r>=224&&r<=239}function Ia(r,n,e){for(let[t,a]of h2)if(a.canHandle(r,n,e))return t}class D5 extends M4{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(h2.keyList())):(n=n===void 0?h2.keyList().filter(e=>this.options[e].enabled):n.filter(e=>this.options[e].enabled&&h2.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:s}=this;if(!a&&this.file.chunked&&(a=Array.from(i).some(o=>{let l=h2.get(o),c=this.options[o];return l.multiSegment&&c.multiSegment}),a&&await this.file.readWhole()),n=this.findAppSegmentsInRange(n,t.byteLength),!this.options.onlyTiff&&t.chunked){let o=!1;for(;s.size>0&&!o&&(t.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:l}=t,c=this.appSegments.some(d=>!this.file.available(d.offset||d.start,d.length||d.size));if(o=n>l&&!c?!await t.readNextChunk(n):!await t.readNextChunk(l),(n=this.findAppSegmentsInRange(n,t.byteLength))===void 0)return}}}findAppSegmentsInRange(n,e){e-=2;let t,a,i,s,o,l,{file:c,findAll:d,wanted:u,remaining:C,options:f}=this;for(;n<e;n++)if(c.getUint8(n)===255){if(t=c.getUint8(n+1),Oa(t)){if(a=c.getUint16(n+2),i=Ia(c,n,a),i&&u.has(i)&&(s=h2.get(i),o=s.findPosition(c,n),l=f[i],o.type=i,this.appSegments.push(o),!d&&(s.multiSegment&&l.multiSegment?(this.unfinishedMultiSegment=o.chunkNumber<o.chunkCount,this.unfinishedMultiSegment||C.delete(i)):C.delete(i),C.size===0)))break;f.recordUnknownSegments&&(o=F2.findPosition(c,n),o.marker=t,this.unknownSegments.push(o)),n+=a+1}else if(Ta(t)){if(a=c.getUint16(n+2),t===218&&f.stopAfterSos!==!1)return;f.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,s,o=new Map;for(let l=0;l<e.length;l++)a=e[l],i=a[t],o.has(i)?s=o.get(i):o.set(i,s=[]),s.push(a);return Array.from(o)}(this.appSegments,"type");this.mergedAppSegments=n.map(([e,t])=>{let a=h2.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(D5,"type","jpeg"),Q2.set("jpeg",D5);const Ea=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class Na extends F2{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 s=a.size>0,o=i.size===0,l=this.chunk.getUint16(n);n+=2;for(let c=0;c<l;c++){let d=this.chunk.getUint16(n);if(s){if(a.has(d)&&(t.set(d,this.parseTag(n,d,e)),a.delete(d),a.size===0))break}else!o&&i.has(d)||t.set(d,this.parseTag(n,d,e));n+=12}return t}parseTag(n,e,t){let{chunk:a}=this,i=a.getUint16(n+2),s=a.getUint32(n+4),o=Ea[i];if(o*s<=4?n+=8:n=a.getUint32(n+8),(i<1||i>13)&&u2(`Invalid TIFF value type. block: ${t.toUpperCase()}, tag: ${e.toString(16)}, type: ${i}, offset ${n}`),n>a.byteLength&&u2(`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,s);if(i===2)return O0(a.getString(n,s));if(i===7)return a.getUint8Array(n,s);if(s===1)return this.parseTagValue(i,n);{let l=new(function(d){switch(d){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))(s),c=o;for(let d=0;d<s;d++)l[d]=this.parseTagValue(i,n),n+=c;return l}}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:u2(`Invalid tiff type ${n}`)}}}class g3 extends Na{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&&u2("Malformed EXIF data"),!n.chunked&&this.ifd0Offset>n.byteLength&&u2(`IFD0 offset points to outside of file.
|
|
28
28
|
this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${n.byteLength}`),n.tiff&&await n.ensureChunk(this.ifd0Offset,d3(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,d3(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",S5(...n.get(2),n.get(1))),n.set("longitude",S5(...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 i2)if(n=this[e],!w5(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 S5(r,n,e,t){var a=r+n/60+e/3600;return t!=="S"&&t!=="W"||(a*=-1),a}O(g3,"type","tiff"),O(g3,"headerLength",10),h2.set("tiff",g3);var Fa=Object.freeze({__proto__:null,default:Ha,Exifr:w0,fileParsers:Q2,segmentParsers:h2,fileReaders:X2,tagKeys:m2,tagValues:N2,tagRevivers:m0,createDictionary:d2,extendDictionary:N0,fetchUrlAsArrayBuffer:I0,readBlobAsArrayBuffer:E0,chunkedProps:g0,otherSegments:s1,segments:F0,tiffBlocks:i2,segmentsAndBlocks:v0,tiffExtractables:M0,inheritables:o1,allFormatters:y0,Options:V0,parse:v4});const v3={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1},M3=Object.assign({},v3,{firstChunkSize:4e4,gps:[1,2,3,4]});async function P5(r){let n=new w0(M3);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 y3=Object.assign({},v3,{tiff:!1,ifd1:!0,mergeOutput:!1});async function H5(r){let n=new w0(y3);await n.read(r);let e=await n.extractThumbnail();return e&&f4?h4.from(e):e}async function T5(r){let n=await this.thumbnail(r);if(n!==void 0){let e=new Blob([n]);return URL.createObjectURL(e)}}const w3=Object.assign({},v3,{firstChunkSize:4e4,ifd0:[274]});async function b3(r){let n=new w0(w3);await n.read(r);let e=await n.parse();if(e&&e.ifd0)return e.ifd0[274]}const L3=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 A0=!0,j0=!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;A0=Number(e)+.1*Number(t)<13.4,j0=!1}}else if(r.includes("OS X 10")){let[,n]=r.match(/OS X 10[_.](\d+)/);A0=j0=Number(n)<15}if(r.includes("Chrome/")){let[,n]=r.match(/Chrome\/(\d+)/);A0=j0=Number(n)<81}else if(r.includes("Firefox/")){let[,n]=r.match(/Firefox\/(\d+)/);A0=j0=Number(n)<77}}async function O5(r){let n=await b3(r);return Object.assign({canvas:A0,css:j0},L3[n])}class Va extends k2{constructor(...n){super(...n),O(this,"ranges",new Aa),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=f4?h4.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 Aa{constructor(){O(this,"list",[])}get length(){return this.list.length}add(n,e,t=0){let a=n+e,i=this.list.filter(s=>I5(n,s.offset,a)||I5(n,s.end,a));if(i.length>0){n=Math.min(n,...i.map(o=>o.offset)),a=Math.max(a,...i.map(o=>o.end)),e=a-n;let s=i.shift();s.offset=n,s.length=e,s.end=a,this.list=this.list.filter(o=>!i.includes(o))}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 I5(r,n,e){return r<=n&&n<=e}class y4 extends Va{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(){}}X2.set("blob",class extends y4{async readWhole(){this.chunked=!1;let r=await E0(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 E0(t);return this.set(a,r,!0)}});var ja=Object.freeze({__proto__:null,default:Fa,Exifr:w0,fileParsers:Q2,segmentParsers:h2,fileReaders:X2,tagKeys:m2,tagValues:N2,tagRevivers:m0,createDictionary:d2,extendDictionary:N0,fetchUrlAsArrayBuffer:I0,readBlobAsArrayBuffer:E0,chunkedProps:g0,otherSegments:s1,segments:F0,tiffBlocks:i2,segmentsAndBlocks:v0,tiffExtractables:M0,inheritables:o1,allFormatters:y0,Options:V0,parse:v4,gpsOnlyOptions:M3,gps:P5,thumbnailOnlyOptions:y3,thumbnail:H5,thumbnailUrl:T5,orientationOnlyOptions:w3,orientation:b3,rotations:L3,get rotateCanvas(){return A0},get rotateCss(){return j0},rotation:O5});X2.set("url",class extends y4{async readWhole(){this.chunked=!1;let r=await I0(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 c3(this.input,{headers:t}),i=await a.arrayBuffer(),s=i.byteLength;if(a.status!==416)return s!==n&&(this.size=r+s),this.set(i,r,!0)}}),k2.prototype.getUint64=function(r){let n=this.getUint32(r),e=this.getUint32(r+4);return n<1048575?n<<32|e:typeof C4!==void 0?(console.warn("Using BigInt because of type 64uint but JS can only handle 53b numbers."),C4(n)<<C4(32)|C4(e)):void u2("Trying to read 64b value but JS can only handle 53b numbers.")};class Ba extends M4{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 E5 extends Ba{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[s,o]=i;await this.file.ensureChunk(s,o);let l=4+this.file.getUint32(s);s+=l,o-=l,await this.registerSegment("tiff",s,o)}findExifLocIdInIinf(n){this.parseBoxFullHead(n);let e,t,a,i,s=n.start,o=this.file.getUint16(s);for(s+=2;o--;){if(e=this.parseBoxHead(s),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);s+=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++),[s,o]=this.get8bits(t++),l=n.version===2?4:2,c=n.version===1||n.version===2?2:0,d=o+a+i,u=n.version===2?4:2,C=this.file.getUintBytes(t,u);for(t+=u;C--;){let f=this.file.getUintBytes(t,l);t+=l+c+2+s;let m=this.file.getUint16(t);if(t+=2,f===e)return m>1&&console.warn(`ILOC box has more than one extent but we're only processing one
|
|
29
|
-
Please create an issue at https://github.com/MikeKovarik/exifr with this file`),[this.file.getUintBytes(t+o,a),this.file.getUintBytes(t+o+a,i)];t+=m*d}}}class N5 extends E5{}O(N5,"type","heic");class F5 extends E5{}O(F5,"type","avif"),Q2.set("heic",N5),Q2.set("avif",F5),d2(m2,["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"]]),d2(m2,"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"]]),d2(m2,"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"]]),d2(N2,["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 _1=d2(N2,"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 V5={1:"No absolute unit of measurement",2:"Inch",3:"Centimeter"};_1.set(37392,V5),_1.set(41488,V5);const _3={0:"Normal",1:"Low",2:"High"};function A5(r){return typeof r=="object"&&r.length!==void 0?r[0]:r}function j5(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 x3(r){if(typeof r=="string"){var[n,e,t,a,i,s]=r.trim().split(/[-: ]/g).map(Number),o=new Date(n,e-1,t);return Number.isNaN(a)||Number.isNaN(i)||Number.isNaN(s)||(o.setHours(a),o.setMinutes(i),o.setSeconds(s)),Number.isNaN(+o)?r:o}}function x1(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(B5(r[e+1],r[e]));else for(let e=0;e<r.length;e+=2)n.push(B5(r[e],r[e+1]));return O0(String.fromCodePoint(...n))}function B5(r,n){return r<<8|n}_1.set(41992,_3),_1.set(41993,_3),_1.set(41994,_3),d2(m0,["ifd0","ifd1"],[[50827,function(r){return typeof r!="string"?L5(r):r}],[306,x3],[40091,x1],[40092,x1],[40093,x1],[40094,x1],[40095,x1]]),d2(m0,"exif",[[40960,j5],[36864,j5],[36867,x3],[36868,x3],[40962,A5],[40963,A5]]),d2(m0,"gps",[[0,r=>Array.from(r).join(".")],[7,r=>Array.from(r).join(":")]]);class k3 extends F2{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:k2.from(n).getString()}parse(n=this.chunk){if(!this.localOptions.parse)return n;n=function(i){let s={},o={};for(let l of W5)s[l]=[],o[l]=0;return i.replace(Wa,(l,c,d)=>{if(c==="<"){let u=++o[d];return s[d].push(u),`${l}#${u}`}return`${l}#${s[d].pop()}`})}(n);let e=l1.findAll(n,"rdf","Description");e.length===0&&e.push(new l1("rdf","Description",void 0,n));let t,a={};for(let i of e)for(let s of i.properties)t=Ua(s.ns,a),R5(s,t);return function(i){let s;for(let o in i)s=i[o]=m4(i[o]),s===void 0&&delete i[o];return m4(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(k3,"type","xmp"),O(k3,"multiSegment",!0),h2.set("xmp",k3);class w4{static findAll(n){return Y5(n,/([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)=("[^"]*"|'[^']*')/gm).map(w4.unpackMatch)}static unpackMatch(n){let e=n[1],t=n[2],a=n[3].slice(1,-1);return a=U5(a),new w4(e,t,a)}constructor(n,e,t){this.ns=n,this.name=e,this.value=t}serialize(){return this.value}}class l1{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 Y5(n,a).map(l1.unpackMatch)}static unpackMatch(n){let e=n[1],t=n[2],a=n[4],i=n[8];return new l1(e,t,a,i)}constructor(n,e,t,a){this.ns=n,this.name=e,this.attrString=t,this.innerXml=a,this.attrs=w4.findAll(t),this.children=l1.findAll(a),this.value=this.children.length===0?U5(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 Ya(this.children.map(Ra));if(this.isListItem&&this.children.length===1&&this.attrs.length===0)return this.children[0].serialize();let n={};for(let e of this.properties)R5(e,n);return this.value!==void 0&&(n.value=this.value),m4(n)}}function R5(r,n){let e=r.serialize();e!==void 0&&(n[r.name]=e)}var Ra=r=>r.serialize(),Ya=r=>r.length===1?r[0]:r,Ua=(r,n)=>n[r]?n[r]:n[r]={};function Y5(r,n){let e,t=[];if(!r)return t;for(;(e=n.exec(r))!==null;)t.push(e);return t}function U5(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 W5=["rdf:li","rdf:Seq","rdf:Bag","rdf:Alt","rdf:Description"],Wa=new RegExp(`(<|\\/)(${W5.join("|")})`,"g");var za=Object.freeze({__proto__:null,default:ja,Exifr:w0,fileParsers:Q2,segmentParsers:h2,fileReaders:X2,tagKeys:m2,tagValues:N2,tagRevivers:m0,createDictionary:d2,extendDictionary:N0,fetchUrlAsArrayBuffer:I0,readBlobAsArrayBuffer:E0,chunkedProps:g0,otherSegments:s1,segments:F0,tiffBlocks:i2,segmentsAndBlocks:v0,tiffExtractables:M0,inheritables:o1,allFormatters:y0,Options:V0,parse:v4,gpsOnlyOptions:M3,gps:P5,thumbnailOnlyOptions:y3,thumbnail:H5,thumbnailUrl:T5,orientationOnlyOptions:w3,orientation:b3,rotations:L3,get rotateCanvas(){return A0},get rotateCss(){return j0},rotation:O5});let z5=p4("fs",r=>r.promises);X2.set("fs",class extends y4{async readWhole(){this.chunked=!1,this.fs=await z5;let r=await this.fs.readFile(this.input);this._swapBuffer(r)}async readChunked(){this.chunked=!0,this.fs=await z5,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()}}}),X2.set("base64",class extends y4{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,s=e+4*Math.ceil(i/3);a=a.slice(e,s);let o=Math.min(n,this.size-r);if(f4){let l=h4.from(a,"base64").slice(t,t+o);return this.set(l,r,!0)}{let l=this.subarray(r,o,!0),c=atob(a),d=l.toUint8();for(let u=0;u<o;u++)d[u]=c.charCodeAt(t+u);return l}}});class $5 extends M4{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(d3(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($5,"type","tiff"),Q2.set("tiff",$5);let $a=p4("zlib");const qa=["ihdr","iccp","text","itxt","exif"];class q5 extends M4{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),s=t.getString(n+4,4).toLowerCase(),o=a+4+4+4,l={type:s,offset:n,length:o,start:n+4+4,size:a,marker:i};qa.includes(s)?this.metaChunks.push(l):this.unknownChunks.push(l),n+=o}}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(o=>o.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,s=e.getString(0,a);if(this.injectKeyValToIhdr("ProfileName",s),u4){let o=await $a,l=e.getUint8Array(i);l=o.inflateSync(l),this.injectSegment("icc",l)}}}O(q5,"type","png"),Q2.set("png",q5),d2(m2,"interop",[[1,"InteropIndex"],[2,"InteropVersion"],[4096,"RelatedImageFileFormat"],[4097,"RelatedImageWidth"],[4098,"RelatedImageHeight"]]),N0(m2,"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 G5=[[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"]];N0(m2,"ifd0",G5),N0(m2,"exif",G5),d2(N2,"gps",[[23,{M:"Magnetic North",T:"True North"}],[25,{K:"Kilometers",M:"Miles",N:"Nautical Miles"}]]);class Z3 extends F2{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(Z3,"type","jfif"),O(Z3,"headerLength",9),h2.set("jfif",Z3),d2(m2,"jfif",[[0,"JFIFVersion"],[2,"ResolutionUnit"],[3,"XResolution"],[5,"YResolution"],[7,"ThumbnailWidth"],[8,"ThumbnailHeight"]]);class K5 extends F2{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(K5,"type","ihdr"),h2.set("ihdr",K5),d2(m2,"ihdr",[[0,"ImageWidth"],[4,"ImageHeight"],[8,"BitDepth"],[9,"ColorType"],[10,"Compression"],[11,"Filter"],[12,"Interlace"]]),d2(N2,"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 b4 extends F2{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,s=0;for(let c of a)s+=c.length;let o=new i(s),l=0;for(let c of a)o.set(c,l),l+=c.length;return o}(e.map(a=>a.chunk.toUint8()));return new k2(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&&u2("ICC header is too short");for(let[e,t]of Object.entries(Ga)){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:s}=this,o=this.chunk.getUint32(128),l=132,c=this.chunk.byteLength;for(;o--;){if(n=this.chunk.getString(l,4),e=this.chunk.getUint32(l+4),t=this.chunk.getUint32(l+8),a=this.chunk.getString(e,4),e+t>c)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"&&s.set(n,i),l+=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 O0(this.chunk.getString(n+12,e))}parseText(n,e){return O0(this.chunk.getString(n+8,e-8))}parseSig(n){return O0(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,s=[];for(let o=0;o<t;o++){let l=e.getString(i+0,2),c=e.getString(i+2,2),d=e.getUint32(i+4),u=e.getUint32(i+8)+n,C=O0(e.getUnicodeString(u,d));s.push({lang:l,country:c,text:C}),i+=a}return t===1?s[0].text:s}translateValue(n,e){return typeof n=="string"?e[n]||e[n.toLowerCase()]||n:e[n]||n}}O(b4,"type","icc"),O(b4,"multiSegment",!0),O(b4,"headerLength",18);const Ga={4:l0,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:l0,16:l0,20:l0,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),s=r.getUint16(n+8),o=r.getUint16(n+10);return new Date(Date.UTC(e,t,a,i,s,o))},36:l0,40:l0,48:l0,52:l0,64:(r,n)=>r.getUint32(n),80:l0};function l0(r,n){return O0(r.getString(n,4))}h2.set("icc",b4),d2(m2,"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 L4={"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"},Q5={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!)"};d2(N2,"icc",[[4,L4],[12,Q5],[40,Object.assign({},L4,Q5)],[48,L4],[80,L4],[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 _4 extends F2{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),s=this.chunk.getUint8(a+2),o=this.chunk.getLatin1String(a+5,i);n.set(s,this.pluralizeValue(n.get(s),o)),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(_4,"type","iptc"),O(_4,"translateValues",!1),O(_4,"reviveValues",!1),h2.set("iptc",_4),d2(m2,"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"]]),d2(N2,"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 y2=[];for(let r=0;r<256;++r)y2.push((r+256).toString(16).slice(1));function Ka(r,n=0){return(y2[r[n+0]]+y2[r[n+1]]+y2[r[n+2]]+y2[r[n+3]]+"-"+y2[r[n+4]]+y2[r[n+5]]+"-"+y2[r[n+6]]+y2[r[n+7]]+"-"+y2[r[n+8]]+y2[r[n+9]]+"-"+y2[r[n+10]]+y2[r[n+11]]+y2[r[n+12]]+y2[r[n+13]]+y2[r[n+14]]+y2[r[n+15]]).toLowerCase()}let D3;const Qa=new Uint8Array(16);function Xa(){if(!D3){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");D3=crypto.getRandomValues.bind(crypto)}return D3(Qa)}const X5={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function J5(r,n,e){var a;if(X5.randomUUID&&!r)return X5.randomUUID();r=r||{};const t=r.random??((a=r.rng)==null?void 0:a.call(r))??Xa();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,Ka(t)}const Ja=async()=>new Promise(r=>{setTimeout(()=>{r(J5())},2500)}),ei=async()=>new Promise(r=>{setTimeout(()=>{r()},2500)}),e8=p.createContext({uploadFile:Ja,deleteFile:ei}),ti=r=>{if(r)return{latitude:r.latitude,longitude:r.longitude}},ni=[".pdf",".jpg",".jpeg",".png"],ri=({label:r,required:n,optional:e,buttonLabel:t,description:a="",error:i=null,multiple:s=!0,files:o=[],maxFiles:l,onChange:c,allowedFileTypes:d=ni})=>{const u=p.useContext(e8),C=p.useRef(null),f=y=>{Promise.all(y.map(async b=>{try{return{file:b,exif:ti(await za.parse(b))}}catch(P){return console.log("Error when parsing exif data, assuming image does not have any",P),{file:b}}})).then(b=>{ai(b,o,u.uploadFile,c)})},m=y=>{c(o.filter(b=>b.contextId!==y.contextId))},v=o.some(y=>y.status==="uploading"),g=!v&&l&&o.length>=l,w=!g&&!v;return h.jsxs(_.Field,{children:[h.jsx(_.Label,{style:{pointerEvents:"none"},children:h.jsx(V2,{text:r,required:n,optional:e})}),a&&h.jsx(_.Field.Description,{children:a}),h.jsx("input",{type:"file",style:{display:"none"},ref:C,id:"fileUploadButton",name:"fileUploadButton",accept:d.join(","),multiple:s,onChange:y=>{const b=y.target;b.files&&b.files.length>0&&(f(Array.from(b.files)),b.value="")}}),w&&h.jsx("button",{className:i1.uploadButton,onClick:()=>{var y;return(y=C.current)==null?void 0:y.click()},children:t}),g&&h.jsxs("div",{className:i1.uploadInformation,children:[h.jsx(C2,{material:"info"}),h.jsx("span",{children:"Maksimalt antall filer er lastet opp."})]}),v&&h.jsxs("div",{className:i1.uploadInformation,children:[h.jsx(_.Spinner,{"aria-label":"Laster opp","data-size":"2xs","data-color":"neutral"}),h.jsx("span",{children:"Vennligst vent med å velge flere filer før alle filene er lastet opp"})]}),o&&o.length>0&&h.jsx("div",{className:i1.fileList,children:o.map(y=>h.jsxs("div",{className:i1.fileItem,children:[h.jsxs(t2,{children:[h.jsxs(t2,{horizontal:!0,align:"center",gap:8,children:[h.jsx("span",{children:y.fileName}),y.status==="uploading"&&h.jsx(_.Spinner,{"aria-label":"Laster opp","data-size":"2xs","data-color":"neutral"})]}),y.status==="error"&&h.jsx(_.ValidationMessage,{children:y.error})]}),h.jsx("button",{className:i1.removeButton,onClick:()=>{m(y)},"aria-label":"Remove file",children:h.jsx(C2,{material:"close"})})]},y.contextId))}),i&&h.jsx(_.ValidationMessage,{children:i})]})},ai=(r,n,e,t)=>{console.log("onFilesChanged",r,n);const a=[...n],i={};r.forEach(s=>{const o=J5();a.push({contextId:o,fileName:s.file.name,status:"uploading",contentType:s.file.type,exif:s.exif}),i[o]=s.file}),t(a),Object.keys(i).forEach(async s=>{try{const o=a.find(d=>d.contextId===s);if(!o)return;const l=new FormData;l.append("file",i[s],o.fileName);const c=await e(l);o.storageId=c,o.status="uploaded",delete o.error,t([...a])}catch(o){console.error("Error when uploading",o);const l=a.find(c=>c.contextId===s);if(!l)return;l.status="error",l.error="Failed to upload file",t([...a])}})},ii={icon:"_icon_1tg5o_1"},si=({icon:r,href:n,children:e,level:t=2,size:a="sm"})=>h.jsxs(t2,{horizontal:!0,justify:"between",children:[n?h.jsx(_.Heading,{"data-size":a,level:t,children:h.jsx("a",{className:"styrbord-card-link",href:n,children:e})}):h.jsx(_.Heading,{"data-size":a,level:t,children:e}),r&&h.jsx(C2,{material:r,className:ii.icon})]}),S3={href:"_href_txktg_1",dashed:"_dashed_txktg_5",subtle:"_subtle_txktg_15"},x4=({variant:r="outline",color:n=void 0,size:e="md",text:t=void 0,href:a=void 0,target:i="_blank",...s})=>{const o={...s};switch(r){case"filled":o.variant="primary";break;case"outline":o.variant="secondary";break;case"ghost":o.variant="tertiary";break;case"subtle":o.variant="primary",o.className=[o.className,S3.subtle].join(" ");break;case"dashed":o.variant="secondary",o.className=[o.className,S3.dashed].join(" ");break}return o["data-color"]=n,o["data-size"]=e,a&&(o.className=[o.className,S3.href].join(" ")),t&&a?(o.children=h.jsx("a",{href:a,target:i,rel:"noreferrer",children:t}),o.asChild=!0):t?o.children=t:a&&(o.children=h.jsx("a",{href:a,target:i,rel:"noreferrer",children:o.children}),o.asChild=!0),h.jsx(_.Button,{...o})},B0={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"},P3=r=>{switch(r){case"2xs":return B0.sizeXxs;case"xs":return B0.sizeXs;case"sm":return B0.sizeSm;case"md":return B0.sizeMd;case"lg":return B0.sizeLg;case"full":return B0.sizeFull;case"fit":return B0.sizeFit}},oi=({autoComplete:r,size:n="full",type:e="text",className:t,...a})=>h.jsx(_.Textfield,{className:`${t} ${P3(n)}`,label:h.jsx(V2,{text:a.label,loading:a.loading,required:a.required,optional:a.optional}),description:a.description,readOnly:a.readOnly,autoComplete:r,placeholder:a.placeholder,disabled:a.disabled,value:a.value??"",onBlur:a.onBlur,onChange:i=>{var s;(s=a.onChange)==null||s.call(a,i.target.value)},inputMode:a.inputMode,error:a.error,prefix:a.prefix,suffix:a.suffix,type:e}),li={"align-right":"_align-right_dttaq_1"},ci=({size:r="full",inputMode:n="numeric",className:e,align:t="left",...a})=>{var o;const[i,s]=p.useState((o=a.value)==null?void 0:o.toString());return h.jsx(_.Textfield,{className:[e,P3(r),li["align-"+t]].join(" "),label:h.jsx(V2,{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:l=>{var d;const c=l.target.value.replace(",",".").replace(/[^0-9.,-]/g,"");[",","."].includes(c[c.length-1])?s(c):c.length>0?s(parseFloat(c).toString()):s(""),(d=a.onChange)==null||d.call(a,c?parseFloat(c):void 0)},inputMode:n,error:a.error,prefix:a.prefix,suffix:a.suffix,type:"text",min:a.min,max:a.max})},di=({size:r="full",className:n,...e})=>h.jsx(_.Textfield,{className:`${n} ${P3(r)}`,label:h.jsx(V2,{text:e.label,required:e.required,optional:e.optional}),description:e.description,readOnly:e.readOnly,placeholder:e.placeholder,disabled:e.disabled,value:e.value??"",onBlur:e.onBlur,onChange:t=>{var a;(a=e.onChange)==null||a.call(e,t.target.value)},inputMode:e.inputMode,error:e.error,multiline:!0,counter:e.maxLength}),ui=({...r})=>{var e;const n=r.value?{value:r.value}:{defaultValue:""};return h.jsxs(_.Field,{children:[h.jsx(_.Label,{children:h.jsx(V2,{text:r.label,required:r.required,optional:r.optional})}),r.description&&h.jsx(_.Field.Description,{children:r.description}),h.jsxs(_.Select,{className:r.className,width:"full",onChange:t=>{var a;return(a=r.onChange)==null?void 0:a.call(r,t.target.value)},onBlur:()=>{var t;(t=r.onBlur)==null||t.call(r)},...n,children:[r.placeholder&&h.jsx(_.Select.Option,{disabled:!0,value:"",children:r.placeholder}),(e=r.options)==null?void 0:e.map(t=>h.jsx(_.Select.Option,{value:t.value,children:t.label??t.value},t.value))]}),r.error&&h.jsx(_.ValidationMessage,{children:r.error})]})},hi={notUnderlined:"_notUnderlined_jhlgm_1"},k4=({underlined:r=!0,className:n="",...e})=>{const t=[n];return r||t.push(hi.notUnderlined),h.jsx(_.Tabs,{className:t.join(""),...e})};k4.List=_.Tabs.List,k4.Tab=_.Tabs.Tab,k4.Panel=_.Tabs.Panel;const R0={boxed:"_boxed_tolmo_1",default:"_default_tolmo_7",error:"_error_tolmo_16",readOnly:"_readOnly_tolmo_24",disabled:"_disabled_tolmo_29",boxedLabel:"_boxedLabel_tolmo_38",pointer:"_pointer_tolmo_43"},Ci=({Boxed:r,disabled:n,readOnly:e,className:t,...a})=>{const i=[t,"override"].filter(Boolean).join(" "),s=a["aria-invalid"]||!1,o=[R0.boxed];s?o.push(R0.error):e?o.push(R0.readOnly):n?o.push(R0.disabled):o.push(R0.default);const l=h.jsx(_.Checkbox,{readOnly:e,disabled:n,...a,className:i}),c=[R0.boxedLabel];return!e&&!n&&c.push(R0.pointer),r?h.jsx("label",{className:c.join(" "),children:h.jsx(t2,{className:o.join(" "),border:"md",children:l})}):l},H3={opaqueHeader:"_opaqueHeader_75ts1_1",table:"_table_75ts1_6",whiteBody:"_whiteBody_75ts1_10"},Y0=({header:r="transparent",body:n="transparent",className:e="",...t})=>{t["data-color"]||(t["data-color"]="neutral");const a=[e,H3.table];return r&&r!=="transparent"&&a.push(H3.opaqueHeader),n&&n==="white"&&a.push(H3.whiteBody),h.jsx(_.Table,{className:a.join(" "),...t})};Y0.Cell=_.Table.Cell,Y0.HeaderCell=_.Table.HeaderCell,Y0.Head=_.Table.Head,Y0.Body=_.Table.Body,Y0.Row=_.Table.Row,Y0.Foot=_.Table.Foot;const T3={xxs:"_xxs_1rhtc_1",xxxs:"_xxxs_1rhtc_8",subtleTinted:"_subtleTinted_1rhtc_15"},Z4=({"data-size":r="md","data-color":n="primary",className:e,...t})=>{const a=[e];return r==="xxs"?a.push(T3.xxs):r==="xxxs"&&a.push(T3.xxxs),n==="subtle-tinted"&&a.push(T3.subtleTinted),h.jsx(_.Avatar,{"data-size":r,"data-color":n,className:a.join(" "),...t})};Object.defineProperty(L,"Suggestion",{enumerable:!0,get:()=>_.EXPERIMENTAL_Suggestion}),L.Accent=P4,L.Alert=C8,L.Avatar=Z4,L.Body=J2,L.BorderedRadioGroup=Je,L.BorderedToggleGroup=Xe,L.Box=t2,L.Button=x4,L.CardTitle=si,L.Checkbox=Ci,L.DateTimePicker=_a,L.Datepicker=wa,L.DeprecatedCard=A3,L.DeprecatedDetails=s8,L.DeprecatedErrorLabel=a8,L.DeprecatedInputLabel=i8,L.FileUploader=ri,L.FileUploaderContext=e8,L.Footer=c6,L.Header=u6,L.Icon=C2,L.Image=N,L.ImageAisSat=ce,L.ImageArcticInfo=ue,L.ImageAvgiftskalkulator=he,L.ImageBaatfartMarine=Ce,L.ImageBestilleLos=fe,L.ImageBoelgevarsel=pe,L.ImageBwArcticinfo=Qe,L.ImageBwBoelgevarsel=Ke,L.ImageBwNais=qe,L.ImageBwOhoi=Ge,L.ImageDatakatalog=de,L.ImageDgps=me,L.ImageDigitaleFyrbesoek=Ne,L.ImageDigitaleReferanseruter=ge,L.ImageEDialog=ve,L.ImageFarledsbevis=Me,L.ImageForespoerselSendt=$e,L.ImageHais=le,L.ImageHavbase=we,L.ImageHavnOgFarvannsloven=be,L.ImageIsmelding=_e,L.ImageIstjeneste=Le,L.ImageKikkert=xe,L.ImageKystdatahuset=ke,L.ImageKystinfoKart=Ze,L.ImageKystreise=je,L.ImageKystvaer=ze,L.ImageLavutslipp=De,L.ImageLrit=Se,L.ImageMarU=Ve,L.ImageMegafon=Be,L.ImageNais=We,L.ImageNasjonalHavneoversikt=Pe,L.ImageNavarea=Ae,L.ImageNavigasjonsvarsler=He,L.ImageOhoi=Te,L.ImageRegistrerteSeilaser=Oe,L.ImageSafeSeaNet=Re,L.ImageSeLosbestilling=Ie,L.ImageSelvbetjening=Ye,L.ImageSelvbetjeningRso=Ue,L.ImageSkipsrapportering=Ee,L.ImageSlukkedeFyrlys=Fe,L.ImageSoeknadOmFarledsbevis=ye,L.LabelContent=V2,L.Logo=T4,L.NumberInput=ci,L.Select=ui,L.Stepper=b8,L.Summary=i6,L.Table=Y0,L.Tabs=k4,L.TextArea=di,L.TextInput=oi,L.Typography=l8,Object.keys(_).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(L,r)&&Object.defineProperty(L,r,{enumerable:!0,get:()=>_[r]})}),Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|
|
29
|
+
Please create an issue at https://github.com/MikeKovarik/exifr with this file`),[this.file.getUintBytes(t+o,a),this.file.getUintBytes(t+o+a,i)];t+=m*d}}}class N5 extends E5{}O(N5,"type","heic");class F5 extends E5{}O(F5,"type","avif"),Q2.set("heic",N5),Q2.set("avif",F5),d2(m2,["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"]]),d2(m2,"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"]]),d2(m2,"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"]]),d2(N2,["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 _1=d2(N2,"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 V5={1:"No absolute unit of measurement",2:"Inch",3:"Centimeter"};_1.set(37392,V5),_1.set(41488,V5);const _3={0:"Normal",1:"Low",2:"High"};function A5(r){return typeof r=="object"&&r.length!==void 0?r[0]:r}function j5(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 x3(r){if(typeof r=="string"){var[n,e,t,a,i,s]=r.trim().split(/[-: ]/g).map(Number),o=new Date(n,e-1,t);return Number.isNaN(a)||Number.isNaN(i)||Number.isNaN(s)||(o.setHours(a),o.setMinutes(i),o.setSeconds(s)),Number.isNaN(+o)?r:o}}function x1(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(B5(r[e+1],r[e]));else for(let e=0;e<r.length;e+=2)n.push(B5(r[e],r[e+1]));return O0(String.fromCodePoint(...n))}function B5(r,n){return r<<8|n}_1.set(41992,_3),_1.set(41993,_3),_1.set(41994,_3),d2(m0,["ifd0","ifd1"],[[50827,function(r){return typeof r!="string"?L5(r):r}],[306,x3],[40091,x1],[40092,x1],[40093,x1],[40094,x1],[40095,x1]]),d2(m0,"exif",[[40960,j5],[36864,j5],[36867,x3],[36868,x3],[40962,A5],[40963,A5]]),d2(m0,"gps",[[0,r=>Array.from(r).join(".")],[7,r=>Array.from(r).join(":")]]);class k3 extends F2{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:k2.from(n).getString()}parse(n=this.chunk){if(!this.localOptions.parse)return n;n=function(i){let s={},o={};for(let l of W5)s[l]=[],o[l]=0;return i.replace(Wa,(l,c,d)=>{if(c==="<"){let u=++o[d];return s[d].push(u),`${l}#${u}`}return`${l}#${s[d].pop()}`})}(n);let e=l1.findAll(n,"rdf","Description");e.length===0&&e.push(new l1("rdf","Description",void 0,n));let t,a={};for(let i of e)for(let s of i.properties)t=Ua(s.ns,a),R5(s,t);return function(i){let s;for(let o in i)s=i[o]=m4(i[o]),s===void 0&&delete i[o];return m4(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(k3,"type","xmp"),O(k3,"multiSegment",!0),h2.set("xmp",k3);class w4{static findAll(n){return Y5(n,/([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)=("[^"]*"|'[^']*')/gm).map(w4.unpackMatch)}static unpackMatch(n){let e=n[1],t=n[2],a=n[3].slice(1,-1);return a=U5(a),new w4(e,t,a)}constructor(n,e,t){this.ns=n,this.name=e,this.value=t}serialize(){return this.value}}class l1{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 Y5(n,a).map(l1.unpackMatch)}static unpackMatch(n){let e=n[1],t=n[2],a=n[4],i=n[8];return new l1(e,t,a,i)}constructor(n,e,t,a){this.ns=n,this.name=e,this.attrString=t,this.innerXml=a,this.attrs=w4.findAll(t),this.children=l1.findAll(a),this.value=this.children.length===0?U5(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 Ya(this.children.map(Ra));if(this.isListItem&&this.children.length===1&&this.attrs.length===0)return this.children[0].serialize();let n={};for(let e of this.properties)R5(e,n);return this.value!==void 0&&(n.value=this.value),m4(n)}}function R5(r,n){let e=r.serialize();e!==void 0&&(n[r.name]=e)}var Ra=r=>r.serialize(),Ya=r=>r.length===1?r[0]:r,Ua=(r,n)=>n[r]?n[r]:n[r]={};function Y5(r,n){let e,t=[];if(!r)return t;for(;(e=n.exec(r))!==null;)t.push(e);return t}function U5(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 W5=["rdf:li","rdf:Seq","rdf:Bag","rdf:Alt","rdf:Description"],Wa=new RegExp(`(<|\\/)(${W5.join("|")})`,"g");var za=Object.freeze({__proto__:null,default:ja,Exifr:w0,fileParsers:Q2,segmentParsers:h2,fileReaders:X2,tagKeys:m2,tagValues:N2,tagRevivers:m0,createDictionary:d2,extendDictionary:N0,fetchUrlAsArrayBuffer:I0,readBlobAsArrayBuffer:E0,chunkedProps:g0,otherSegments:s1,segments:F0,tiffBlocks:i2,segmentsAndBlocks:v0,tiffExtractables:M0,inheritables:o1,allFormatters:y0,Options:V0,parse:v4,gpsOnlyOptions:M3,gps:P5,thumbnailOnlyOptions:y3,thumbnail:H5,thumbnailUrl:T5,orientationOnlyOptions:w3,orientation:b3,rotations:L3,get rotateCanvas(){return A0},get rotateCss(){return j0},rotation:O5});let z5=p4("fs",r=>r.promises);X2.set("fs",class extends y4{async readWhole(){this.chunked=!1,this.fs=await z5;let r=await this.fs.readFile(this.input);this._swapBuffer(r)}async readChunked(){this.chunked=!0,this.fs=await z5,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()}}}),X2.set("base64",class extends y4{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,s=e+4*Math.ceil(i/3);a=a.slice(e,s);let o=Math.min(n,this.size-r);if(f4){let l=h4.from(a,"base64").slice(t,t+o);return this.set(l,r,!0)}{let l=this.subarray(r,o,!0),c=atob(a),d=l.toUint8();for(let u=0;u<o;u++)d[u]=c.charCodeAt(t+u);return l}}});class $5 extends M4{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(d3(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($5,"type","tiff"),Q2.set("tiff",$5);let $a=p4("zlib");const qa=["ihdr","iccp","text","itxt","exif"];class q5 extends M4{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),s=t.getString(n+4,4).toLowerCase(),o=a+4+4+4,l={type:s,offset:n,length:o,start:n+4+4,size:a,marker:i};qa.includes(s)?this.metaChunks.push(l):this.unknownChunks.push(l),n+=o}}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(o=>o.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,s=e.getString(0,a);if(this.injectKeyValToIhdr("ProfileName",s),u4){let o=await $a,l=e.getUint8Array(i);l=o.inflateSync(l),this.injectSegment("icc",l)}}}O(q5,"type","png"),Q2.set("png",q5),d2(m2,"interop",[[1,"InteropIndex"],[2,"InteropVersion"],[4096,"RelatedImageFileFormat"],[4097,"RelatedImageWidth"],[4098,"RelatedImageHeight"]]),N0(m2,"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 G5=[[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"]];N0(m2,"ifd0",G5),N0(m2,"exif",G5),d2(N2,"gps",[[23,{M:"Magnetic North",T:"True North"}],[25,{K:"Kilometers",M:"Miles",N:"Nautical Miles"}]]);class Z3 extends F2{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(Z3,"type","jfif"),O(Z3,"headerLength",9),h2.set("jfif",Z3),d2(m2,"jfif",[[0,"JFIFVersion"],[2,"ResolutionUnit"],[3,"XResolution"],[5,"YResolution"],[7,"ThumbnailWidth"],[8,"ThumbnailHeight"]]);class K5 extends F2{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(K5,"type","ihdr"),h2.set("ihdr",K5),d2(m2,"ihdr",[[0,"ImageWidth"],[4,"ImageHeight"],[8,"BitDepth"],[9,"ColorType"],[10,"Compression"],[11,"Filter"],[12,"Interlace"]]),d2(N2,"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 b4 extends F2{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,s=0;for(let c of a)s+=c.length;let o=new i(s),l=0;for(let c of a)o.set(c,l),l+=c.length;return o}(e.map(a=>a.chunk.toUint8()));return new k2(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&&u2("ICC header is too short");for(let[e,t]of Object.entries(Ga)){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:s}=this,o=this.chunk.getUint32(128),l=132,c=this.chunk.byteLength;for(;o--;){if(n=this.chunk.getString(l,4),e=this.chunk.getUint32(l+4),t=this.chunk.getUint32(l+8),a=this.chunk.getString(e,4),e+t>c)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"&&s.set(n,i),l+=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 O0(this.chunk.getString(n+12,e))}parseText(n,e){return O0(this.chunk.getString(n+8,e-8))}parseSig(n){return O0(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,s=[];for(let o=0;o<t;o++){let l=e.getString(i+0,2),c=e.getString(i+2,2),d=e.getUint32(i+4),u=e.getUint32(i+8)+n,C=O0(e.getUnicodeString(u,d));s.push({lang:l,country:c,text:C}),i+=a}return t===1?s[0].text:s}translateValue(n,e){return typeof n=="string"?e[n]||e[n.toLowerCase()]||n:e[n]||n}}O(b4,"type","icc"),O(b4,"multiSegment",!0),O(b4,"headerLength",18);const Ga={4:l0,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:l0,16:l0,20:l0,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),s=r.getUint16(n+8),o=r.getUint16(n+10);return new Date(Date.UTC(e,t,a,i,s,o))},36:l0,40:l0,48:l0,52:l0,64:(r,n)=>r.getUint32(n),80:l0};function l0(r,n){return O0(r.getString(n,4))}h2.set("icc",b4),d2(m2,"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 L4={"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"},Q5={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!)"};d2(N2,"icc",[[4,L4],[12,Q5],[40,Object.assign({},L4,Q5)],[48,L4],[80,L4],[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 _4 extends F2{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),s=this.chunk.getUint8(a+2),o=this.chunk.getLatin1String(a+5,i);n.set(s,this.pluralizeValue(n.get(s),o)),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(_4,"type","iptc"),O(_4,"translateValues",!1),O(_4,"reviveValues",!1),h2.set("iptc",_4),d2(m2,"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"]]),d2(N2,"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 y2=[];for(let r=0;r<256;++r)y2.push((r+256).toString(16).slice(1));function Ka(r,n=0){return(y2[r[n+0]]+y2[r[n+1]]+y2[r[n+2]]+y2[r[n+3]]+"-"+y2[r[n+4]]+y2[r[n+5]]+"-"+y2[r[n+6]]+y2[r[n+7]]+"-"+y2[r[n+8]]+y2[r[n+9]]+"-"+y2[r[n+10]]+y2[r[n+11]]+y2[r[n+12]]+y2[r[n+13]]+y2[r[n+14]]+y2[r[n+15]]).toLowerCase()}let D3;const Qa=new Uint8Array(16);function Xa(){if(!D3){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");D3=crypto.getRandomValues.bind(crypto)}return D3(Qa)}const X5={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function J5(r,n,e){var a;if(X5.randomUUID&&!r)return X5.randomUUID();r=r||{};const t=r.random??((a=r.rng)==null?void 0:a.call(r))??Xa();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,Ka(t)}const Ja=async()=>new Promise(r=>{setTimeout(()=>{r(J5())},2500)}),ei=async()=>new Promise(r=>{setTimeout(()=>{r()},2500)}),e8=p.createContext({uploadFile:Ja,deleteFile:ei}),ti=r=>{if(r)return{latitude:r.latitude,longitude:r.longitude}},ni=[".pdf",".jpg",".jpeg",".png"],ri=({label:r,required:n,optional:e,buttonLabel:t,description:a="",error:i=null,multiple:s=!0,files:o=[],maxFiles:l,onChange:c,allowedFileTypes:d=ni})=>{const u=p.useContext(e8),C=p.useRef(null),f=y=>{Promise.all(y.map(async b=>{try{return{file:b,exif:ti(await za.parse(b))}}catch(P){return console.log("Error when parsing exif data, assuming image does not have any",P),{file:b}}})).then(b=>{ai(b,o,u.uploadFile,c)})},m=y=>{c(o.filter(b=>b.contextId!==y.contextId))},v=o.some(y=>y.status==="uploading"),g=!v&&l&&o.length>=l,w=!g&&!v;return h.jsxs(_.Field,{children:[h.jsx(_.Label,{style:{pointerEvents:"none"},children:h.jsx(V2,{text:r,required:n,optional:e})}),a&&h.jsx(_.Field.Description,{children:a}),h.jsx("input",{type:"file",style:{display:"none"},ref:C,id:"fileUploadButton",name:"fileUploadButton",accept:d.join(","),multiple:s,onChange:y=>{const b=y.target;b.files&&b.files.length>0&&(f(Array.from(b.files)),b.value="")}}),w&&h.jsx("button",{className:i1.uploadButton,onClick:()=>{var y;return(y=C.current)==null?void 0:y.click()},children:t}),g&&h.jsxs("div",{className:i1.uploadInformation,children:[h.jsx(C2,{material:"info"}),h.jsx("span",{children:"Maksimalt antall filer er lastet opp."})]}),v&&h.jsxs("div",{className:i1.uploadInformation,children:[h.jsx(_.Spinner,{"aria-label":"Laster opp","data-size":"2xs","data-color":"neutral"}),h.jsx("span",{children:"Vennligst vent med å velge flere filer før alle filene er lastet opp"})]}),o&&o.length>0&&h.jsx("div",{className:i1.fileList,children:o.map(y=>h.jsxs("div",{className:i1.fileItem,children:[h.jsxs(t2,{children:[h.jsxs(t2,{horizontal:!0,align:"center",gap:8,children:[h.jsx("span",{children:y.fileName}),y.status==="uploading"&&h.jsx(_.Spinner,{"aria-label":"Laster opp","data-size":"2xs","data-color":"neutral"})]}),y.status==="error"&&h.jsx(_.ValidationMessage,{children:y.error})]}),h.jsx("button",{className:i1.removeButton,onClick:()=>{m(y)},"aria-label":"Remove file",children:h.jsx(C2,{material:"close"})})]},y.contextId))}),i&&h.jsx(_.ValidationMessage,{children:i})]})},ai=(r,n,e,t)=>{console.log("onFilesChanged",r,n);const a=[...n],i={};r.forEach(s=>{const o=J5();a.push({contextId:o,fileName:s.file.name,status:"uploading",contentType:s.file.type,exif:s.exif}),i[o]=s.file}),t(a),Object.keys(i).forEach(async s=>{try{const o=a.find(d=>d.contextId===s);if(!o)return;const l=new FormData;l.append("file",i[s],o.fileName);const c=await e(l);o.storageId=c,o.status="uploaded",delete o.error,t([...a])}catch(o){console.error("Error when uploading",o);const l=a.find(c=>c.contextId===s);if(!l)return;l.status="error",l.error="Failed to upload file",t([...a])}})},ii={icon:"_icon_1tg5o_1"},si=({icon:r,href:n,children:e,level:t=2,size:a="sm"})=>h.jsxs(t2,{horizontal:!0,justify:"between",children:[n?h.jsx(_.Heading,{"data-size":a,level:t,children:h.jsx("a",{className:"styrbord-card-link",href:n,children:e})}):h.jsx(_.Heading,{"data-size":a,level:t,children:e}),r&&h.jsx(C2,{material:r,className:ii.icon})]}),S3={href:"_href_txktg_1",dashed:"_dashed_txktg_5",subtle:"_subtle_txktg_15"},x4=({variant:r="outline",color:n=void 0,size:e="md",text:t=void 0,href:a=void 0,target:i="_blank",...s})=>{const o={...s};switch(r){case"filled":o.variant="primary";break;case"outline":o.variant="secondary";break;case"ghost":o.variant="tertiary";break;case"subtle":o.variant="primary",o.className=[o.className,S3.subtle].join(" ");break;case"dashed":o.variant="secondary",o.className=[o.className,S3.dashed].join(" ");break}return o["data-color"]=n,o["data-size"]=e,a&&(o.className=[o.className,S3.href].join(" ")),t&&a?(o.children=h.jsx("a",{href:a,target:i,rel:"noreferrer",children:t}),o.asChild=!0):t?o.children=t:a&&(o.children=h.jsx("a",{href:a,target:i,rel:"noreferrer",children:o.children}),o.asChild=!0),h.jsx(_.Button,{...o})},B0={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"},P3=r=>{switch(r){case"2xs":return B0.sizeXxs;case"xs":return B0.sizeXs;case"sm":return B0.sizeSm;case"md":return B0.sizeMd;case"lg":return B0.sizeLg;case"full":return B0.sizeFull;case"fit":return B0.sizeFit}},oi=({autoComplete:r,size:n="full",type:e="text",className:t,...a})=>h.jsx(_.Textfield,{className:`${t} ${P3(n)}`,label:h.jsx(V2,{text:a.label,loading:a.loading,required:a.required,optional:a.optional}),description:a.description,readOnly:a.readOnly,autoComplete:r,placeholder:a.placeholder,disabled:a.disabled,value:a.value??"",onBlur:a.onBlur,onChange:i=>{var s;(s=a.onChange)==null||s.call(a,i.target.value)},inputMode:a.inputMode,error:a.error,prefix:a.prefix,suffix:a.suffix,type:e}),li={"align-right":"_align-right_dttaq_1"},ci=({size:r="full",inputMode:n="numeric",className:e,align:t="left",...a})=>{var o;const[i,s]=p.useState((o=a.value)==null?void 0:o.toString());return h.jsx(_.Textfield,{className:[e,P3(r),li["align-"+t]].join(" "),label:h.jsx(V2,{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:l=>{var d;const c=l.target.value.replace(",",".").replace(/[^0-9.,-]/g,"");[",","."].includes(c[c.length-1])?s(c):c.length>0?s(parseFloat(c).toString()):s(""),(d=a.onChange)==null||d.call(a,c?parseFloat(c):void 0)},inputMode:n,error:a.error,prefix:a.prefix,suffix:a.suffix,type:"text",min:a.min,max:a.max})},di=({size:r="full",className:n,...e})=>h.jsx(_.Textfield,{className:`${n} ${P3(r)}`,label:h.jsx(V2,{text:e.label,required:e.required,optional:e.optional}),description:e.description,readOnly:e.readOnly,placeholder:e.placeholder,disabled:e.disabled,value:e.value??"",onBlur:e.onBlur,onChange:t=>{var a;(a=e.onChange)==null||a.call(e,t.target.value)},inputMode:e.inputMode,error:e.error,multiline:!0,counter:e.maxLength}),ui=({...r})=>{var e;const n=r.value?{value:r.value}:{defaultValue:""};return h.jsxs(_.Field,{children:[h.jsx(_.Label,{children:h.jsx(V2,{text:r.label,required:r.required,optional:r.optional})}),r.description&&h.jsx(_.Field.Description,{children:r.description}),h.jsxs(_.Select,{className:r.className,width:"full",onChange:t=>{var a;return(a=r.onChange)==null?void 0:a.call(r,t.target.value)},onBlur:()=>{var t;(t=r.onBlur)==null||t.call(r)},...n,children:[r.placeholder&&h.jsx(_.Select.Option,{disabled:!0,value:"",children:r.placeholder}),(e=r.options)==null?void 0:e.map(t=>h.jsx(_.Select.Option,{value:t.value,children:t.label??t.value},t.value))]}),r.error&&h.jsx(_.ValidationMessage,{children:r.error})]})},hi={notUnderlined:"_notUnderlined_jhlgm_1"},k4=({underlined:r=!0,className:n="",...e})=>{const t=[n];return r||t.push(hi.notUnderlined),h.jsx(_.Tabs,{className:t.join(""),...e})};k4.List=_.Tabs.List,k4.Tab=_.Tabs.Tab,k4.Panel=_.Tabs.Panel;const R0={boxed:"_boxed_tolmo_1",default:"_default_tolmo_7",error:"_error_tolmo_16",readOnly:"_readOnly_tolmo_24",disabled:"_disabled_tolmo_29",boxedLabel:"_boxedLabel_tolmo_38",pointer:"_pointer_tolmo_43"},Ci=({Boxed:r,disabled:n,readOnly:e,className:t,...a})=>{const i=[t,"override"].filter(Boolean).join(" "),s=a["aria-invalid"]||!1,o=[R0.boxed];s?o.push(R0.error):e?o.push(R0.readOnly):n?o.push(R0.disabled):o.push(R0.default);const l=h.jsx(_.Checkbox,{readOnly:e,disabled:n,...a,className:i}),c=[R0.boxedLabel];return!e&&!n&&c.push(R0.pointer),r?h.jsx("label",{className:c.join(" "),children:h.jsx(t2,{className:o.join(" "),border:"md",children:l})}):l},H3={opaqueHeader:"_opaqueHeader_75ts1_1",table:"_table_75ts1_6",whiteBody:"_whiteBody_75ts1_10"},Y0=({header:r="transparent",body:n="transparent",className:e="",...t})=>{t["data-color"]||(t["data-color"]="neutral");const a=[e,H3.table];return r&&r!=="transparent"&&a.push(H3.opaqueHeader),n&&n==="white"&&a.push(H3.whiteBody),h.jsx(_.Table,{className:a.join(" "),...t})};Y0.Cell=_.Table.Cell,Y0.HeaderCell=_.Table.HeaderCell,Y0.Head=_.Table.Head,Y0.Body=_.Table.Body,Y0.Row=_.Table.Row,Y0.Foot=_.Table.Foot;const T3={size2xs:"_size2xs_z9nk6_1",size3xs:"_size3xs_z9nk6_8",surfaceTinted:"_surfaceTinted_z9nk6_15"},Z4=({"data-size":r="md","data-color-variant":n="base",className:e,...t})=>{const a=[e];return r==="2xs"?a.push(T3.size2xs):r==="3xs"&&a.push(T3.size3xs),n==="surface-tinted"&&a.push(T3.surfaceTinted),h.jsx(_.Avatar,{"data-size":r,className:a.join(" "),...t})};Object.defineProperty(L,"Suggestion",{enumerable:!0,get:()=>_.EXPERIMENTAL_Suggestion}),L.Accent=P4,L.Alert=C8,L.Avatar=Z4,L.Body=J2,L.BorderedRadioGroup=Je,L.BorderedToggleGroup=Xe,L.Box=t2,L.Button=x4,L.CardTitle=si,L.Checkbox=Ci,L.DateTimePicker=_a,L.Datepicker=wa,L.DeprecatedCard=A3,L.DeprecatedDetails=s8,L.DeprecatedErrorLabel=a8,L.DeprecatedInputLabel=i8,L.FileUploader=ri,L.FileUploaderContext=e8,L.Footer=c6,L.Header=u6,L.Icon=C2,L.Image=N,L.ImageAisSat=ce,L.ImageArcticInfo=ue,L.ImageAvgiftskalkulator=he,L.ImageBaatfartMarine=Ce,L.ImageBestilleLos=fe,L.ImageBoelgevarsel=pe,L.ImageBwArcticinfo=Qe,L.ImageBwBoelgevarsel=Ke,L.ImageBwNais=qe,L.ImageBwOhoi=Ge,L.ImageDatakatalog=de,L.ImageDgps=me,L.ImageDigitaleFyrbesoek=Ne,L.ImageDigitaleReferanseruter=ge,L.ImageEDialog=ve,L.ImageFarledsbevis=Me,L.ImageForespoerselSendt=$e,L.ImageHais=le,L.ImageHavbase=we,L.ImageHavnOgFarvannsloven=be,L.ImageIsmelding=_e,L.ImageIstjeneste=Le,L.ImageKikkert=xe,L.ImageKystdatahuset=ke,L.ImageKystinfoKart=Ze,L.ImageKystreise=je,L.ImageKystvaer=ze,L.ImageLavutslipp=De,L.ImageLrit=Se,L.ImageMarU=Ve,L.ImageMegafon=Be,L.ImageNais=We,L.ImageNasjonalHavneoversikt=Pe,L.ImageNavarea=Ae,L.ImageNavigasjonsvarsler=He,L.ImageOhoi=Te,L.ImageRegistrerteSeilaser=Oe,L.ImageSafeSeaNet=Re,L.ImageSeLosbestilling=Ie,L.ImageSelvbetjening=Ye,L.ImageSelvbetjeningRso=Ue,L.ImageSkipsrapportering=Ee,L.ImageSlukkedeFyrlys=Fe,L.ImageSoeknadOmFarledsbevis=ye,L.LabelContent=V2,L.Logo=T4,L.NumberInput=ci,L.Select=ui,L.Stepper=b8,L.Summary=i6,L.Table=Y0,L.Tabs=k4,L.TextArea=di,L.TextInput=oi,L.Typography=l8,Object.keys(_).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(L,r)&&Object.defineProperty(L,r,{enumerable:!0,get:()=>_[r]})}),Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|