bt-core-app 2.1.37 → 2.2.1
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/dist/_virtual/_commonjs-dynamic-modules.mjs +6 -0
- package/dist/_virtual/_commonjsHelpers.mjs +30 -0
- package/dist/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/dist/_virtual/index.mjs +4 -0
- package/dist/_virtual/localforage.mjs +4 -0
- package/dist/_virtual/luxon.mjs +6 -0
- package/dist/_virtual/matcher.mjs +4 -0
- package/dist/_virtual/parser.mjs +4 -0
- package/dist/bt-core/core/node_modules/@datasert/cronjs-matcher/dist/index.mjs +12 -0
- package/dist/bt-core/core/node_modules/@datasert/cronjs-matcher/dist/matcher.mjs +220 -0
- package/dist/bt-core/core/node_modules/@datasert/cronjs-parser/dist/parser.mjs +186 -0
- package/dist/bt-core/core/node_modules/@mdi/js/mdi.mjs +70 -0
- package/dist/bt-core/core/node_modules/@vuepic/vue-datepicker/dist/main.css.mjs +1 -0
- package/dist/bt-core/core/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.mjs +5210 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/addLeadingZeros.mjs +7 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/defaultOptions.mjs +7 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/format/formatters.mjs +517 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/format/lightFormatters.mjs +59 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/format/longFormatters.mjs +52 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs +18 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/normalizeDates.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/normalizeInterval.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/_lib/protectedTokens.mjs +21 -0
- package/dist/bt-core/core/node_modules/date-fns/add.mjs +20 -0
- package/dist/bt-core/core/node_modules/date-fns/addDays.mjs +10 -0
- package/dist/bt-core/core/node_modules/date-fns/addHours.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/addMilliseconds.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/addMonths.mjs +21 -0
- package/dist/bt-core/core/node_modules/date-fns/addQuarters.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/addYears.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/compareAsc.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/constants.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/constructFrom.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/differenceInCalendarDays.mjs +16 -0
- package/dist/bt-core/core/node_modules/date-fns/differenceInCalendarYears.mjs +13 -0
- package/dist/bt-core/core/node_modules/date-fns/differenceInYears.mjs +17 -0
- package/dist/bt-core/core/node_modules/date-fns/eachDayOfInterval.mjs +20 -0
- package/dist/bt-core/core/node_modules/date-fns/eachQuarterOfInterval.mjs +21 -0
- package/dist/bt-core/core/node_modules/date-fns/endOfQuarter.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/endOfWeek.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/endOfYear.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/format.mjs +60 -0
- package/dist/bt-core/core/node_modules/date-fns/getDay.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getDayOfYear.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/getDaysInMonth.mjs +10 -0
- package/dist/bt-core/core/node_modules/date-fns/getDefaultOptions.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getHours.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getISODay.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/getISOWeek.mjs +12 -0
- package/dist/bt-core/core/node_modules/date-fns/getISOWeekYear.mjs +15 -0
- package/dist/bt-core/core/node_modules/date-fns/getMinutes.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getMonth.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getQuarter.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/getSeconds.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/getWeek.mjs +12 -0
- package/dist/bt-core/core/node_modules/date-fns/getWeekYear.mjs +17 -0
- package/dist/bt-core/core/node_modules/date-fns/getYear.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/isAfter.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/isBefore.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/isDate.mjs +7 -0
- package/dist/bt-core/core/node_modules/date-fns/isEqual.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/isSameQuarter.mjs +14 -0
- package/dist/bt-core/core/node_modules/date-fns/isValid.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs +18 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildMatchFn.mjs +31 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs +17 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs +70 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/formatLong.mjs +33 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/localize.mjs +155 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US/_lib/match.mjs +110 -0
- package/dist/bt-core/core/node_modules/date-fns/locale/en-US.mjs +21 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/Parser.mjs +22 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/Setter.mjs +41 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/constants.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/AMPMParser.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DateParser.mjs +61 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.mjs +51 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DayParser.mjs +45 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/EraParser.mjs +30 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.mjs +21 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.mjs +22 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.mjs +32 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.mjs +32 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.mjs +33 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.mjs +33 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISODayParser.mjs +99 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.mjs +48 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.mjs +48 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.mjs +40 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.mjs +74 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.mjs +48 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.mjs +69 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/MinuteParser.mjs +32 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/MonthParser.mjs +71 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/QuarterParser.mjs +70 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/SecondParser.mjs +32 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.mjs +74 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.mjs +71 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.mjs +70 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.mjs +22 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.mjs +22 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers/YearParser.mjs +49 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/parsers.mjs +67 -0
- package/dist/bt-core/core/node_modules/date-fns/parse/_lib/utils.mjs +103 -0
- package/dist/bt-core/core/node_modules/date-fns/parse.mjs +90 -0
- package/dist/bt-core/core/node_modules/date-fns/set.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/setDay.mjs +12 -0
- package/dist/bt-core/core/node_modules/date-fns/setHours.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/setISODay.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/setISOWeek.mjs +10 -0
- package/dist/bt-core/core/node_modules/date-fns/setMilliseconds.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/setMinutes.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/setMonth.mjs +13 -0
- package/dist/bt-core/core/node_modules/date-fns/setSeconds.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/setWeek.mjs +10 -0
- package/dist/bt-core/core/node_modules/date-fns/setYear.mjs +10 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfDay.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfISOWeek.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfISOWeekYear.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfMonth.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfQuarter.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfWeek.mjs +11 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfWeekYear.mjs +13 -0
- package/dist/bt-core/core/node_modules/date-fns/startOfYear.mjs +9 -0
- package/dist/bt-core/core/node_modules/date-fns/sub.mjs +19 -0
- package/dist/bt-core/core/node_modules/date-fns/subDays.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/subMonths.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/subYears.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/toDate.mjs +8 -0
- package/dist/bt-core/core/node_modules/date-fns/transpose.mjs +18 -0
- package/dist/bt-core/core/node_modules/localforage/dist/localforage.mjs +1454 -0
- package/dist/bt-core/core/node_modules/luxon/src/datetime.mjs +1855 -0
- package/dist/bt-core/core/node_modules/luxon/src/duration.mjs +753 -0
- package/dist/bt-core/core/node_modules/luxon/src/errors.mjs +40 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/conversions.mjs +92 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/diff.mjs +36 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/digits.mjs +77 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/english.mjs +138 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/formats.mjs +150 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/formatter.mjs +258 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/invalid.mjs +11 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/locale.mjs +294 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/regexParser.mjs +202 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/tokenParser.mjs +329 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/util.mjs +220 -0
- package/dist/bt-core/core/node_modules/luxon/src/impl/zoneUtil.mjs +20 -0
- package/dist/bt-core/core/node_modules/luxon/src/info.mjs +180 -0
- package/dist/bt-core/core/node_modules/luxon/src/interval.mjs +481 -0
- package/dist/bt-core/core/node_modules/luxon/src/luxon.mjs +24 -0
- package/dist/bt-core/core/node_modules/luxon/src/settings.mjs +150 -0
- package/dist/bt-core/core/node_modules/luxon/src/zone.mjs +88 -0
- package/dist/bt-core/core/node_modules/luxon/src/zones/IANAZone.mjs +183 -0
- package/dist/bt-core/core/node_modules/luxon/src/zones/fixedOffsetZone.mjs +125 -0
- package/dist/bt-core/core/node_modules/luxon/src/zones/invalidZone.mjs +41 -0
- package/dist/bt-core/core/node_modules/luxon/src/zones/systemZone.mjs +47 -0
- package/dist/bt-core/core/node_modules/merge-images/dist/index.es2015.mjs +47 -0
- package/dist/bt-core/core/node_modules/signature_pad/dist/signature_pad.mjs +248 -0
- package/dist/bt-core/core/node_modules/thenby/thenBy.module.mjs +38 -0
- package/dist/bt-core/core/node_modules/vue-picture-cropper/lib/index.mjs +1643 -0
- package/dist/bt-core/core/node_modules/vue-signature-pad/dist/vue-signature-pad.esm.mjs +173 -0
- package/dist/bt-core/core/node_modules/vue-use-spring/dist/index.mjs +204 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/defaults.mjs +61 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/icons.mjs +82 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/iconsets/mdi-svg.mjs +74 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/colors.mjs +322 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/console.mjs +7 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/defineComponent.mjs +34 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/getCurrentInstance.mjs +10 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/helpers.mjs +44 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/injectSelf.mjs +12 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/propsFactory.mjs +14 -0
- package/dist/components/BT-Assistant-Menu.vue.d.ts +19 -0
- package/dist/components/BT-Assistant-Menu.vue.mjs +464 -0
- package/dist/components/BT-Assistant-Menu.vue2.mjs +4 -0
- package/dist/components/BT-Avatar.vue.d.ts +16 -0
- package/dist/components/BT-Avatar.vue.mjs +41 -0
- package/dist/components/BT-Avatar.vue2.mjs +4 -0
- package/dist/components/BT-Background-Task.vue.d.ts +61 -0
- package/dist/components/BT-Background-Task.vue.mjs +89 -0
- package/dist/components/BT-Background-Task.vue2.mjs +4 -0
- package/dist/components/BT-Blade-Item.vue.d.ts +578 -0
- package/dist/components/BT-Blade-Item.vue.mjs +441 -0
- package/dist/components/BT-Blade-Item.vue2.mjs +4 -0
- package/dist/components/BT-Blade-Items.vue.d.ts +2358 -0
- package/dist/components/BT-Blade-Items.vue.mjs +7 -0
- package/dist/components/BT-Blade-Items.vue2.mjs +943 -0
- package/dist/components/BT-Blade-Items.vue3.mjs +1 -0
- package/dist/components/BT-Blade-Steps.vue.d.ts +1740 -0
- package/dist/components/BT-Blade-Steps.vue.mjs +7 -0
- package/dist/components/BT-Blade-Steps.vue2.mjs +1305 -0
- package/dist/components/BT-Blade-Steps.vue3.mjs +1 -0
- package/dist/components/BT-Blade.vue.d.ts +109 -0
- package/dist/components/BT-Blade.vue.mjs +268 -0
- package/dist/components/BT-Blade.vue2.mjs +4 -0
- package/dist/components/BT-Btn.vue.d.ts +47 -0
- package/dist/components/BT-Btn.vue.mjs +43 -0
- package/dist/components/BT-Btn.vue2.mjs +4 -0
- package/dist/components/BT-Camera-Overlay.vue.d.ts +57 -0
- package/dist/components/BT-Camera-Overlay.vue.mjs +173 -0
- package/dist/components/BT-Camera-Overlay.vue2.mjs +4 -0
- package/dist/components/BT-Col.vue.d.ts +49 -0
- package/dist/components/BT-Col.vue.mjs +33 -0
- package/dist/components/BT-Col.vue2.mjs +4 -0
- package/dist/components/BT-Color-Picker-Menu.vue.d.ts +23 -0
- package/dist/components/BT-Color-Picker-Menu.vue.mjs +63 -0
- package/dist/components/BT-Color-Picker-Menu.vue2.mjs +4 -0
- package/dist/components/BT-Cosmetics-Menu.vue.d.ts +14 -0
- package/dist/components/BT-Cosmetics-Menu.vue.mjs +211 -0
- package/dist/components/BT-Cosmetics-Menu.vue2.mjs +4 -0
- package/dist/components/BT-Cron-Span.vue.d.ts +21 -0
- package/dist/components/BT-Cron-Span.vue.mjs +66 -0
- package/dist/components/BT-Cron-Span.vue2.mjs +4 -0
- package/dist/components/BT-Cron.vue.d.ts +37 -0
- package/dist/components/BT-Cron.vue.mjs +538 -0
- package/dist/components/BT-Cron.vue2.mjs +4 -0
- package/dist/components/BT-Date-Select.vue.d.ts +46 -0
- package/dist/components/BT-Date-Select.vue.mjs +71 -0
- package/dist/components/BT-Date-Select.vue2.mjs +4 -0
- package/dist/components/BT-Date.vue.d.ts +53 -0
- package/dist/components/BT-Date.vue.mjs +55 -0
- package/dist/components/BT-Date.vue2.mjs +4 -0
- package/dist/components/BT-Demo-Profile-Select.vue.d.ts +17 -0
- package/dist/components/BT-Demo-Profile-Select.vue.mjs +52 -0
- package/dist/components/BT-Demo-Profile-Select.vue2.mjs +4 -0
- package/dist/components/BT-Dialog-Confirm.vue.d.ts +2 -0
- package/dist/components/BT-Dialog-Confirm.vue.mjs +63 -0
- package/dist/components/BT-Dialog-Confirm.vue2.mjs +4 -0
- package/dist/components/BT-Dialog-Date.vue.d.ts +2 -0
- package/dist/components/BT-Dialog-Date.vue.mjs +79 -0
- package/dist/components/BT-Dialog-Date.vue2.mjs +4 -0
- package/dist/components/BT-Dialog-Number.vue.d.ts +2 -0
- package/dist/components/BT-Dialog-Number.vue.mjs +178 -0
- package/dist/components/BT-Dialog-Number.vue2.mjs +4 -0
- package/dist/components/BT-Dialog-Select.vue.d.ts +2 -0
- package/dist/components/BT-Dialog-Select.vue.mjs +235 -0
- package/dist/components/BT-Dialog-Select.vue2.mjs +4 -0
- package/dist/components/BT-Divider.vue.d.ts +24 -0
- package/dist/components/BT-Divider.vue.mjs +31 -0
- package/dist/components/BT-Divider.vue2.mjs +4 -0
- package/dist/components/BT-Drag-Counter.vue.d.ts +114 -0
- package/dist/components/BT-Drag-Counter.vue.mjs +7 -0
- package/dist/components/BT-Drag-Counter.vue2.mjs +156 -0
- package/dist/components/BT-Drag-Counter.vue3.mjs +1 -0
- package/dist/components/BT-Entity.vue.d.ts +82 -0
- package/dist/components/BT-Entity.vue.mjs +172 -0
- package/dist/components/BT-Entity.vue2.mjs +4 -0
- package/dist/components/BT-Error.vue.d.ts +15 -0
- package/dist/components/BT-Error.vue.mjs +35 -0
- package/dist/components/BT-Error.vue2.mjs +4 -0
- package/dist/components/BT-Field-Checkbox.vue.d.ts +57 -0
- package/dist/components/BT-Field-Checkbox.vue.mjs +61 -0
- package/dist/components/BT-Field-Checkbox.vue2.mjs +4 -0
- package/dist/components/BT-Field-Date.vue.d.ts +69 -0
- package/dist/components/BT-Field-Date.vue.mjs +120 -0
- package/dist/components/BT-Field-Date.vue2.mjs +4 -0
- package/dist/components/BT-Field-Entity.vue.d.ts +48 -0
- package/dist/components/BT-Field-Entity.vue.mjs +55 -0
- package/dist/components/BT-Field-Entity.vue2.mjs +4 -0
- package/dist/components/BT-Field-Select-Simple.vue.d.ts +55 -0
- package/dist/components/BT-Field-Select-Simple.vue.mjs +52 -0
- package/dist/components/BT-Field-Select-Simple.vue2.mjs +4 -0
- package/dist/components/BT-Field-Select.vue.d.ts +70 -0
- package/dist/components/BT-Field-Select.vue.mjs +60 -0
- package/dist/components/BT-Field-Select.vue2.mjs +4 -0
- package/dist/components/BT-Field-String.vue.d.ts +57 -0
- package/dist/components/BT-Field-String.vue.mjs +87 -0
- package/dist/components/BT-Field-String.vue2.mjs +4 -0
- package/dist/components/BT-Field-Switch.vue.d.ts +51 -0
- package/dist/components/BT-Field-Switch.vue.mjs +64 -0
- package/dist/components/BT-Field-Switch.vue2.mjs +4 -0
- package/dist/components/BT-Field-Tags.vue.d.ts +53 -0
- package/dist/components/BT-Field-Tags.vue.mjs +80 -0
- package/dist/components/BT-Field-Tags.vue2.mjs +4 -0
- package/dist/components/BT-Field-Textarea.vue.d.ts +53 -0
- package/dist/components/BT-Field-Textarea.vue.mjs +66 -0
- package/dist/components/BT-Field-Textarea.vue2.mjs +4 -0
- package/dist/components/BT-Field-Trigger.vue.d.ts +113 -0
- package/dist/components/BT-Field-Trigger.vue.mjs +368 -0
- package/dist/components/BT-Field-Trigger.vue2.mjs +4 -0
- package/dist/components/BT-Field.vue.d.ts +49 -0
- package/dist/components/BT-Field.vue.mjs +59 -0
- package/dist/components/BT-Field.vue2.mjs +4 -0
- package/dist/components/BT-Form-Builder.vue.d.ts +74 -0
- package/dist/components/BT-Form-Builder.vue.mjs +762 -0
- package/dist/components/BT-Form-Builder.vue2.mjs +4 -0
- package/dist/components/BT-Form-Field.vue.d.ts +41 -0
- package/dist/components/BT-Form-Field.vue.mjs +186 -0
- package/dist/components/BT-Form-Field.vue2.mjs +4 -0
- package/dist/components/BT-Form.vue.d.ts +95 -0
- package/dist/components/BT-Form.vue.mjs +635 -0
- package/dist/components/BT-Form.vue2.mjs +4 -0
- package/dist/components/BT-Header-Option.vue.d.ts +18 -0
- package/dist/components/BT-Header-Option.vue.mjs +62 -0
- package/dist/components/BT-Header-Option.vue2.mjs +4 -0
- package/dist/components/BT-Image-Select.vue.d.ts +71 -0
- package/dist/components/BT-Image-Select.vue.mjs +219 -0
- package/dist/components/BT-Image-Select.vue2.mjs +4 -0
- package/dist/components/BT-Json.vue.d.ts +6 -0
- package/dist/components/BT-Json.vue.mjs +38 -0
- package/dist/components/BT-Json.vue2.mjs +1 -0
- package/dist/components/BT-Json.vue3.mjs +5 -0
- package/dist/components/BT-Loader.vue.d.ts +6 -0
- package/dist/components/BT-Loader.vue.mjs +37 -0
- package/dist/components/BT-Loader.vue2.mjs +4 -0
- package/dist/components/BT-Nav-Sidebar.vue.d.ts +25 -0
- package/dist/components/BT-Nav-Sidebar.vue.mjs +138 -0
- package/dist/components/BT-Nav-Sidebar.vue2.mjs +4 -0
- package/dist/components/BT-Number.vue.d.ts +23 -0
- package/dist/components/BT-Number.vue.mjs +7 -0
- package/dist/components/BT-Number.vue2.mjs +43 -0
- package/dist/components/BT-Number.vue3.mjs +1 -0
- package/dist/components/BT-Numpad.vue.d.ts +68 -0
- package/dist/components/BT-Numpad.vue.mjs +191 -0
- package/dist/components/BT-Numpad.vue2.mjs +4 -0
- package/dist/components/BT-Select-Inline.vue.d.ts +121 -0
- package/dist/components/BT-Select-Inline.vue.mjs +74 -0
- package/dist/components/BT-Select-Inline.vue2.mjs +24 -0
- package/dist/components/BT-Select-Inline.vue3.mjs +1 -0
- package/dist/components/BT-Select-List-Box.vue.d.ts +137 -0
- package/dist/components/BT-Select-List-Box.vue.mjs +414 -0
- package/dist/components/BT-Select-List-Box.vue2.mjs +4 -0
- package/dist/components/BT-Select-Simple.vue.d.ts +58 -0
- package/dist/components/BT-Select-Simple.vue.mjs +126 -0
- package/dist/components/BT-Select-Simple.vue2.mjs +4 -0
- package/dist/components/BT-Select.vue.d.ts +73 -0
- package/dist/components/BT-Select.vue.mjs +138 -0
- package/dist/components/BT-Select.vue2.mjs +4 -0
- package/dist/components/BT-Signature-Overlay.vue.d.ts +65 -0
- package/dist/components/BT-Signature-Overlay.vue.mjs +146 -0
- package/dist/components/BT-Signature-Overlay.vue2.mjs +4 -0
- package/dist/components/BT-Signature.vue.d.ts +70 -0
- package/dist/components/BT-Signature.vue.mjs +155 -0
- package/dist/components/BT-Signature.vue2.mjs +4 -0
- package/dist/components/BT-Slider.vue.d.ts +37 -0
- package/dist/components/BT-Slider.vue.mjs +126 -0
- package/dist/components/BT-Slider.vue2.mjs +4 -0
- package/dist/components/BT-Span.vue.d.ts +19 -0
- package/dist/components/BT-Span.vue.mjs +23 -0
- package/dist/components/BT-Span.vue2.mjs +4 -0
- package/dist/components/BT-Square-Check.vue.d.ts +104 -0
- package/dist/components/BT-Square-Check.vue.mjs +98 -0
- package/dist/components/BT-Square-Check.vue2.mjs +4 -0
- package/dist/components/BT-Status-Item.vue.d.ts +45 -0
- package/dist/components/BT-Status-Item.vue.mjs +51 -0
- package/dist/components/BT-Status-Item.vue2.mjs +4 -0
- package/dist/components/BT-Tags.vue.d.ts +19 -0
- package/dist/components/BT-Tags.vue.mjs +32 -0
- package/dist/components/BT-Tags.vue2.mjs +4 -0
- package/dist/components/BT-Tour.vue.d.ts +43 -0
- package/dist/components/BT-Tour.vue.mjs +78 -0
- package/dist/components/BT-Tour.vue2.mjs +4 -0
- package/dist/components.mjs +36 -0
- package/dist/composables/actions-local.d.ts +14 -0
- package/dist/composables/actions-local.mjs +26 -0
- package/dist/composables/actions-tracker.d.ts +36 -0
- package/dist/composables/actions-tracker.mjs +88 -0
- package/dist/composables/actions.d.ts +116 -0
- package/dist/composables/actions.mjs +272 -0
- package/dist/composables/api.d.ts +100 -0
- package/dist/composables/api.mjs +329 -0
- package/dist/composables/assistant.d.ts +38 -0
- package/dist/composables/assistant.mjs +70 -0
- package/dist/composables/auth.d.ts +94 -0
- package/dist/composables/auth.mjs +257 -0
- package/dist/composables/background-tasks.d.ts +31 -0
- package/dist/composables/background-tasks.mjs +79 -0
- package/dist/composables/blade-old.d.ts +1 -0
- package/dist/composables/blade.d.ts +91 -0
- package/dist/composables/blade.mjs +156 -0
- package/dist/composables/charts.d.ts +10 -0
- package/dist/composables/colorizer.d.ts +5 -0
- package/dist/composables/colorizer.mjs +27 -0
- package/dist/composables/component-config.d.ts +8 -0
- package/dist/composables/component-config.mjs +11 -0
- package/dist/composables/confirm.d.ts +1 -0
- package/dist/composables/confirm.mjs +11 -0
- package/dist/composables/cosmetics.d.ts +44 -0
- package/dist/composables/cosmetics.mjs +125 -0
- package/dist/composables/cron-adjustments.d.ts +63 -0
- package/dist/composables/cron-adjustments.mjs +106 -0
- package/dist/composables/cron.d.ts +72 -0
- package/dist/composables/cron.mjs +326 -0
- package/dist/composables/csv.d.ts +44 -0
- package/dist/composables/csv.mjs +163 -0
- package/dist/composables/dates.d.ts +22 -0
- package/dist/composables/dates.mjs +61 -0
- package/dist/composables/demo.d.ts +68 -0
- package/dist/composables/demo.mjs +173 -0
- package/dist/composables/dialog-items.d.ts +117 -0
- package/dist/composables/dialog-items.mjs +72 -0
- package/dist/composables/document-meta.d.ts +11 -0
- package/dist/composables/document-meta.mjs +20 -0
- package/dist/composables/draggable.d.ts +56 -0
- package/dist/composables/draggable.mjs +76 -0
- package/dist/composables/feedback.d.ts +24 -0
- package/dist/composables/feedback.mjs +32 -0
- package/dist/composables/filters.d.ts +27 -0
- package/dist/composables/filters.mjs +218 -0
- package/dist/composables/forage.d.ts +89 -0
- package/dist/composables/forage.mjs +37 -0
- package/dist/composables/forms.d.ts +104 -0
- package/dist/composables/forms.mjs +256 -0
- package/dist/composables/geo.d.ts +24 -0
- package/dist/composables/geo.mjs +95 -0
- package/dist/composables/graph-pro.d.ts +98 -0
- package/dist/composables/graph-pro.mjs +205 -0
- package/dist/composables/graphing.d.ts +1 -0
- package/dist/composables/heights.d.ts +24 -0
- package/dist/composables/heights.mjs +41 -0
- package/dist/composables/helpers.d.ts +114 -0
- package/dist/composables/helpers.mjs +512 -0
- package/dist/composables/icons.d.ts +3 -0
- package/dist/composables/icons.mjs +84 -0
- package/dist/composables/id.d.ts +8 -0
- package/dist/composables/id.mjs +32 -0
- package/dist/composables/item.d.ts +132 -0
- package/dist/composables/item.mjs +263 -0
- package/dist/composables/iterating.d.ts +1 -0
- package/dist/composables/list.d.ts +345 -0
- package/dist/composables/list.mjs +460 -0
- package/dist/composables/lists.d.ts +10 -0
- package/dist/composables/lists.mjs +31 -0
- package/dist/composables/menu.d.ts +35 -0
- package/dist/composables/menu.mjs +63 -0
- package/dist/composables/navigation.d.ts +123 -0
- package/dist/composables/navigation.mjs +157 -0
- package/dist/composables/nested.d.ts +3 -0
- package/dist/composables/nested.mjs +20 -0
- package/dist/composables/old-dialogs.d.ts +1 -0
- package/dist/composables/presets.d.ts +8 -0
- package/dist/composables/presets.mjs +16 -0
- package/dist/composables/pwa-old.d.ts +15 -0
- package/dist/composables/pwa.d.ts +26 -0
- package/dist/composables/pwa.mjs +80 -0
- package/dist/composables/resizable.d.ts +34 -0
- package/dist/composables/resizable.mjs +135 -0
- package/dist/composables/routing-old.d.ts +1 -0
- package/dist/composables/routing.d.ts +16 -0
- package/dist/composables/routing.mjs +112 -0
- package/dist/composables/rules.d.ts +13 -0
- package/dist/composables/rules.mjs +22 -0
- package/dist/composables/select.d.ts +78 -0
- package/dist/composables/select.mjs +129 -0
- package/dist/composables/settings.d.ts +6 -0
- package/dist/composables/settings.mjs +21 -0
- package/dist/composables/setup.d.ts +1 -0
- package/dist/composables/steps-old.d.ts +1 -0
- package/dist/composables/steps.d.ts +53 -0
- package/dist/composables/steps.mjs +39 -0
- package/dist/composables/stores.d.ts +258 -0
- package/dist/composables/stores.mjs +1257 -0
- package/dist/composables/sync.d.ts +33 -0
- package/dist/composables/track.d.ts +13 -0
- package/dist/composables/track.mjs +30 -0
- package/dist/composables/urls.d.ts +35 -0
- package/dist/composables/urls.mjs +66 -0
- package/dist/composables/vuetify.d.ts +85 -0
- package/dist/composables.mjs +237 -0
- package/dist/core.d.ts +48 -0
- package/dist/core.mjs +6 -0
- package/dist/core2.mjs +118 -0
- package/dist/index-components.d.ts +19 -0
- package/dist/index-composables.d.ts +75 -0
- package/dist/index-core.d.ts +3 -0
- package/dist/index.d.ts +96 -3036
- package/dist/index.mjs +275 -0
- package/dist/main.d.ts +1 -0
- package/dist/node_modules/bt-core-app/dist/bt-core-app.mjs +30372 -0
- package/dist/style.css +1 -5
- package/dist/types.d.ts +18 -0
- package/dist/types.mjs +7 -0
- package/package.json +13 -1
- package/dist/bt-core-app.js +0 -81355
|
@@ -0,0 +1,1643 @@
|
|
|
1
|
+
import { defineComponent as Di, ref as St, watch as Ai, onBeforeUnmount as Bi, createVNode as Xt, nextTick as Ei } from "vue";
|
|
2
|
+
/*!
|
|
3
|
+
* Cropper.js v1.6.1
|
|
4
|
+
* https://fengyuanchen.github.io/cropperjs
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2015-present Chen Fengyuan
|
|
7
|
+
* Released under the MIT license
|
|
8
|
+
*
|
|
9
|
+
* Date: 2023-09-17T03:44:19.860Z
|
|
10
|
+
*/
|
|
11
|
+
function Yt(t, a) {
|
|
12
|
+
var i = Object.keys(t);
|
|
13
|
+
if (Object.getOwnPropertySymbols) {
|
|
14
|
+
var e = Object.getOwnPropertySymbols(t);
|
|
15
|
+
a && (e = e.filter(function(n) {
|
|
16
|
+
return Object.getOwnPropertyDescriptor(t, n).enumerable;
|
|
17
|
+
})), i.push.apply(i, e);
|
|
18
|
+
}
|
|
19
|
+
return i;
|
|
20
|
+
}
|
|
21
|
+
function pi(t) {
|
|
22
|
+
for (var a = 1; a < arguments.length; a++) {
|
|
23
|
+
var i = arguments[a] != null ? arguments[a] : {};
|
|
24
|
+
a % 2 ? Yt(Object(i), !0).forEach(function(e) {
|
|
25
|
+
qi(t, e, i[e]);
|
|
26
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(i)) : Yt(Object(i)).forEach(function(e) {
|
|
27
|
+
Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(i, e));
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return t;
|
|
31
|
+
}
|
|
32
|
+
function ft(t) {
|
|
33
|
+
"@babel/helpers - typeof";
|
|
34
|
+
return ft = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
|
|
35
|
+
return typeof a;
|
|
36
|
+
} : function(a) {
|
|
37
|
+
return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
|
|
38
|
+
}, ft(t);
|
|
39
|
+
}
|
|
40
|
+
function Oi(t, a) {
|
|
41
|
+
if (!(t instanceof a))
|
|
42
|
+
throw new TypeError("Cannot call a class as a function");
|
|
43
|
+
}
|
|
44
|
+
function Pt(t, a) {
|
|
45
|
+
for (var i = 0; i < a.length; i++) {
|
|
46
|
+
var e = a[i];
|
|
47
|
+
e.enumerable = e.enumerable || !1, e.configurable = !0, "value" in e && (e.writable = !0), Object.defineProperty(t, ri(e.key), e);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function Ti(t, a, i) {
|
|
51
|
+
return a && Pt(t.prototype, a), i && Pt(t, i), Object.defineProperty(t, "prototype", {
|
|
52
|
+
writable: !1
|
|
53
|
+
}), t;
|
|
54
|
+
}
|
|
55
|
+
function qi(t, a, i) {
|
|
56
|
+
return a = ri(a), a in t ? Object.defineProperty(t, a, {
|
|
57
|
+
value: i,
|
|
58
|
+
enumerable: !0,
|
|
59
|
+
configurable: !0,
|
|
60
|
+
writable: !0
|
|
61
|
+
}) : t[a] = i, t;
|
|
62
|
+
}
|
|
63
|
+
function ci(t) {
|
|
64
|
+
return Ni(t) || Li(t) || Wi(t) || Hi();
|
|
65
|
+
}
|
|
66
|
+
function Ni(t) {
|
|
67
|
+
if (Array.isArray(t))
|
|
68
|
+
return bt(t);
|
|
69
|
+
}
|
|
70
|
+
function Li(t) {
|
|
71
|
+
if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null)
|
|
72
|
+
return Array.from(t);
|
|
73
|
+
}
|
|
74
|
+
function Wi(t, a) {
|
|
75
|
+
if (t) {
|
|
76
|
+
if (typeof t == "string")
|
|
77
|
+
return bt(t, a);
|
|
78
|
+
var i = Object.prototype.toString.call(t).slice(8, -1);
|
|
79
|
+
if (i === "Object" && t.constructor && (i = t.constructor.name), i === "Map" || i === "Set")
|
|
80
|
+
return Array.from(t);
|
|
81
|
+
if (i === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))
|
|
82
|
+
return bt(t, a);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function bt(t, a) {
|
|
86
|
+
(a == null || a > t.length) && (a = t.length);
|
|
87
|
+
for (var i = 0, e = new Array(a); i < a; i++)
|
|
88
|
+
e[i] = t[i];
|
|
89
|
+
return e;
|
|
90
|
+
}
|
|
91
|
+
function Hi() {
|
|
92
|
+
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
93
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
94
|
+
}
|
|
95
|
+
function Ri(t, a) {
|
|
96
|
+
if (typeof t != "object" || t === null)
|
|
97
|
+
return t;
|
|
98
|
+
var i = t[Symbol.toPrimitive];
|
|
99
|
+
if (i !== void 0) {
|
|
100
|
+
var e = i.call(t, a || "default");
|
|
101
|
+
if (typeof e != "object")
|
|
102
|
+
return e;
|
|
103
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
104
|
+
}
|
|
105
|
+
return (a === "string" ? String : Number)(t);
|
|
106
|
+
}
|
|
107
|
+
function ri(t) {
|
|
108
|
+
var a = Ri(t, "string");
|
|
109
|
+
return typeof a == "symbol" ? a : String(a);
|
|
110
|
+
}
|
|
111
|
+
var mt = typeof window < "u" && typeof window.document < "u", W = mt ? window : {}, At = mt && W.document.documentElement ? "ontouchstart" in W.document.documentElement : !1, Bt = mt ? "PointerEvent" in W : !1, b = "cropper", Et = "all", si = "crop", li = "move", di = "zoom", $ = "e", Q = "w", Z = "s", Y = "n", it = "ne", at = "nw", et = "se", nt = "sw", wt = "".concat(b, "-crop"), It = "".concat(b, "-disabled"), E = "".concat(b, "-hidden"), Ut = "".concat(b, "-hide"), Si = "".concat(b, "-invisible"), dt = "".concat(b, "-modal"), yt = "".concat(b, "-move"), pt = "".concat(b, "Action"), st = "".concat(b, "Preview"), Ot = "crop", mi = "move", hi = "none", kt = "crop", jt = "cropend", zt = "cropmove", Mt = "cropstart", _t = "dblclick", Xi = At ? "touchstart" : "mousedown", Yi = At ? "touchmove" : "mousemove", Pi = At ? "touchend touchcancel" : "mouseup", Vt = Bt ? "pointerdown" : Xi, $t = Bt ? "pointermove" : Yi, Qt = Bt ? "pointerup pointercancel" : Pi, Ft = "ready", Zt = "resize", Gt = "wheel", Ct = "zoom", Kt = "image/jpeg", Ii = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, Ui = /^data:/, _i = /^data:image\/jpeg;base64,/, Vi = /^img|canvas$/i, vi = 200, ui = 100, Jt = {
|
|
112
|
+
// Define the view mode of the cropper
|
|
113
|
+
viewMode: 0,
|
|
114
|
+
// 0, 1, 2, 3
|
|
115
|
+
// Define the dragging mode of the cropper
|
|
116
|
+
dragMode: Ot,
|
|
117
|
+
// 'crop', 'move' or 'none'
|
|
118
|
+
// Define the initial aspect ratio of the crop box
|
|
119
|
+
initialAspectRatio: NaN,
|
|
120
|
+
// Define the aspect ratio of the crop box
|
|
121
|
+
aspectRatio: NaN,
|
|
122
|
+
// An object with the previous cropping result data
|
|
123
|
+
data: null,
|
|
124
|
+
// A selector for adding extra containers to preview
|
|
125
|
+
preview: "",
|
|
126
|
+
// Re-render the cropper when resize the window
|
|
127
|
+
responsive: !0,
|
|
128
|
+
// Restore the cropped area after resize the window
|
|
129
|
+
restore: !0,
|
|
130
|
+
// Check if the current image is a cross-origin image
|
|
131
|
+
checkCrossOrigin: !0,
|
|
132
|
+
// Check the current image's Exif Orientation information
|
|
133
|
+
checkOrientation: !0,
|
|
134
|
+
// Show the black modal
|
|
135
|
+
modal: !0,
|
|
136
|
+
// Show the dashed lines for guiding
|
|
137
|
+
guides: !0,
|
|
138
|
+
// Show the center indicator for guiding
|
|
139
|
+
center: !0,
|
|
140
|
+
// Show the white modal to highlight the crop box
|
|
141
|
+
highlight: !0,
|
|
142
|
+
// Show the grid background
|
|
143
|
+
background: !0,
|
|
144
|
+
// Enable to crop the image automatically when initialize
|
|
145
|
+
autoCrop: !0,
|
|
146
|
+
// Define the percentage of automatic cropping area when initializes
|
|
147
|
+
autoCropArea: 0.8,
|
|
148
|
+
// Enable to move the image
|
|
149
|
+
movable: !0,
|
|
150
|
+
// Enable to rotate the image
|
|
151
|
+
rotatable: !0,
|
|
152
|
+
// Enable to scale the image
|
|
153
|
+
scalable: !0,
|
|
154
|
+
// Enable to zoom the image
|
|
155
|
+
zoomable: !0,
|
|
156
|
+
// Enable to zoom the image by dragging touch
|
|
157
|
+
zoomOnTouch: !0,
|
|
158
|
+
// Enable to zoom the image by wheeling mouse
|
|
159
|
+
zoomOnWheel: !0,
|
|
160
|
+
// Define zoom ratio when zoom the image by wheeling mouse
|
|
161
|
+
wheelZoomRatio: 0.1,
|
|
162
|
+
// Enable to move the crop box
|
|
163
|
+
cropBoxMovable: !0,
|
|
164
|
+
// Enable to resize the crop box
|
|
165
|
+
cropBoxResizable: !0,
|
|
166
|
+
// Toggle drag mode between "crop" and "move" when click twice on the cropper
|
|
167
|
+
toggleDragModeOnDblclick: !0,
|
|
168
|
+
// Size limitation
|
|
169
|
+
minCanvasWidth: 0,
|
|
170
|
+
minCanvasHeight: 0,
|
|
171
|
+
minCropBoxWidth: 0,
|
|
172
|
+
minCropBoxHeight: 0,
|
|
173
|
+
minContainerWidth: vi,
|
|
174
|
+
minContainerHeight: ui,
|
|
175
|
+
// Shortcuts of events
|
|
176
|
+
ready: null,
|
|
177
|
+
cropstart: null,
|
|
178
|
+
cropmove: null,
|
|
179
|
+
cropend: null,
|
|
180
|
+
crop: null,
|
|
181
|
+
zoom: null
|
|
182
|
+
}, $i = '<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>', Qi = Number.isNaN || W.isNaN;
|
|
183
|
+
function u(t) {
|
|
184
|
+
return typeof t == "number" && !Qi(t);
|
|
185
|
+
}
|
|
186
|
+
var ti = function(t) {
|
|
187
|
+
return t > 0 && t < 1 / 0;
|
|
188
|
+
};
|
|
189
|
+
function xt(t) {
|
|
190
|
+
return typeof t > "u";
|
|
191
|
+
}
|
|
192
|
+
function F(t) {
|
|
193
|
+
return ft(t) === "object" && t !== null;
|
|
194
|
+
}
|
|
195
|
+
var Fi = Object.prototype.hasOwnProperty;
|
|
196
|
+
function G(t) {
|
|
197
|
+
if (!F(t))
|
|
198
|
+
return !1;
|
|
199
|
+
try {
|
|
200
|
+
var a = t.constructor, i = a.prototype;
|
|
201
|
+
return a && i && Fi.call(i, "isPrototypeOf");
|
|
202
|
+
} catch {
|
|
203
|
+
return !1;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function B(t) {
|
|
207
|
+
return typeof t == "function";
|
|
208
|
+
}
|
|
209
|
+
var Zi = Array.prototype.slice;
|
|
210
|
+
function xi(t) {
|
|
211
|
+
return Array.from ? Array.from(t) : Zi.call(t);
|
|
212
|
+
}
|
|
213
|
+
function z(t, a) {
|
|
214
|
+
return t && B(a) && (Array.isArray(t) || u(t.length) ? xi(t).forEach(function(i, e) {
|
|
215
|
+
a.call(t, i, e, t);
|
|
216
|
+
}) : F(t) && Object.keys(t).forEach(function(i) {
|
|
217
|
+
a.call(t, t[i], i, t);
|
|
218
|
+
})), t;
|
|
219
|
+
}
|
|
220
|
+
var w = Object.assign || function(t) {
|
|
221
|
+
for (var a = arguments.length, i = new Array(a > 1 ? a - 1 : 0), e = 1; e < a; e++)
|
|
222
|
+
i[e - 1] = arguments[e];
|
|
223
|
+
return F(t) && i.length > 0 && i.forEach(function(n) {
|
|
224
|
+
F(n) && Object.keys(n).forEach(function(o) {
|
|
225
|
+
t[o] = n[o];
|
|
226
|
+
});
|
|
227
|
+
}), t;
|
|
228
|
+
}, Gi = /\.\d*(?:0|9){12}\d*$/;
|
|
229
|
+
function J(t) {
|
|
230
|
+
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1e11;
|
|
231
|
+
return Gi.test(t) ? Math.round(t * a) / a : t;
|
|
232
|
+
}
|
|
233
|
+
var Ki = /^width|height|left|top|marginLeft|marginTop$/;
|
|
234
|
+
function P(t, a) {
|
|
235
|
+
var i = t.style;
|
|
236
|
+
z(a, function(e, n) {
|
|
237
|
+
Ki.test(n) && u(e) && (e = "".concat(e, "px")), i[n] = e;
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
function Ji(t, a) {
|
|
241
|
+
return t.classList ? t.classList.contains(a) : t.className.indexOf(a) > -1;
|
|
242
|
+
}
|
|
243
|
+
function M(t, a) {
|
|
244
|
+
if (a) {
|
|
245
|
+
if (u(t.length)) {
|
|
246
|
+
z(t, function(e) {
|
|
247
|
+
M(e, a);
|
|
248
|
+
});
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
if (t.classList) {
|
|
252
|
+
t.classList.add(a);
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
var i = t.className.trim();
|
|
256
|
+
i ? i.indexOf(a) < 0 && (t.className = "".concat(i, " ").concat(a)) : t.className = a;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
function L(t, a) {
|
|
260
|
+
if (a) {
|
|
261
|
+
if (u(t.length)) {
|
|
262
|
+
z(t, function(i) {
|
|
263
|
+
L(i, a);
|
|
264
|
+
});
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
if (t.classList) {
|
|
268
|
+
t.classList.remove(a);
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
t.className.indexOf(a) >= 0 && (t.className = t.className.replace(a, ""));
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
function K(t, a, i) {
|
|
275
|
+
if (a) {
|
|
276
|
+
if (u(t.length)) {
|
|
277
|
+
z(t, function(e) {
|
|
278
|
+
K(e, a, i);
|
|
279
|
+
});
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
i ? M(t, a) : L(t, a);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
var ta = /([a-z\d])([A-Z])/g;
|
|
286
|
+
function Tt(t) {
|
|
287
|
+
return t.replace(ta, "$1-$2").toLowerCase();
|
|
288
|
+
}
|
|
289
|
+
function Dt(t, a) {
|
|
290
|
+
return F(t[a]) ? t[a] : t.dataset ? t.dataset[a] : t.getAttribute("data-".concat(Tt(a)));
|
|
291
|
+
}
|
|
292
|
+
function ct(t, a, i) {
|
|
293
|
+
F(i) ? t[a] = i : t.dataset ? t.dataset[a] = i : t.setAttribute("data-".concat(Tt(a)), i);
|
|
294
|
+
}
|
|
295
|
+
function ia(t, a) {
|
|
296
|
+
if (F(t[a]))
|
|
297
|
+
try {
|
|
298
|
+
delete t[a];
|
|
299
|
+
} catch {
|
|
300
|
+
t[a] = void 0;
|
|
301
|
+
}
|
|
302
|
+
else if (t.dataset)
|
|
303
|
+
try {
|
|
304
|
+
delete t.dataset[a];
|
|
305
|
+
} catch {
|
|
306
|
+
t.dataset[a] = void 0;
|
|
307
|
+
}
|
|
308
|
+
else
|
|
309
|
+
t.removeAttribute("data-".concat(Tt(a)));
|
|
310
|
+
}
|
|
311
|
+
var gi = /\s\s*/, fi = function() {
|
|
312
|
+
var t = !1;
|
|
313
|
+
if (mt) {
|
|
314
|
+
var a = !1, i = function() {
|
|
315
|
+
}, e = Object.defineProperty({}, "once", {
|
|
316
|
+
get: function() {
|
|
317
|
+
return t = !0, a;
|
|
318
|
+
},
|
|
319
|
+
/**
|
|
320
|
+
* This setter can fix a `TypeError` in strict mode
|
|
321
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only}
|
|
322
|
+
* @param {boolean} value - The value to set
|
|
323
|
+
*/
|
|
324
|
+
set: function(n) {
|
|
325
|
+
a = n;
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
W.addEventListener("test", i, e), W.removeEventListener("test", i, e);
|
|
329
|
+
}
|
|
330
|
+
return t;
|
|
331
|
+
}();
|
|
332
|
+
function q(t, a, i) {
|
|
333
|
+
var e = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, n = i;
|
|
334
|
+
a.trim().split(gi).forEach(function(o) {
|
|
335
|
+
if (!fi) {
|
|
336
|
+
var p = t.listeners;
|
|
337
|
+
p && p[o] && p[o][i] && (n = p[o][i], delete p[o][i], Object.keys(p[o]).length === 0 && delete p[o], Object.keys(p).length === 0 && delete t.listeners);
|
|
338
|
+
}
|
|
339
|
+
t.removeEventListener(o, n, e);
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
function T(t, a, i) {
|
|
343
|
+
var e = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, n = i;
|
|
344
|
+
a.trim().split(gi).forEach(function(o) {
|
|
345
|
+
if (e.once && !fi) {
|
|
346
|
+
var p = t.listeners, s = p === void 0 ? {} : p;
|
|
347
|
+
n = function() {
|
|
348
|
+
delete s[o][i], t.removeEventListener(o, n, e);
|
|
349
|
+
for (var l = arguments.length, c = new Array(l), r = 0; r < l; r++)
|
|
350
|
+
c[r] = arguments[r];
|
|
351
|
+
i.apply(t, c);
|
|
352
|
+
}, s[o] || (s[o] = {}), s[o][i] && t.removeEventListener(o, s[o][i], e), s[o][i] = n, t.listeners = s;
|
|
353
|
+
}
|
|
354
|
+
t.addEventListener(o, n, e);
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
function tt(t, a, i) {
|
|
358
|
+
var e;
|
|
359
|
+
return B(Event) && B(CustomEvent) ? e = new CustomEvent(a, {
|
|
360
|
+
detail: i,
|
|
361
|
+
bubbles: !0,
|
|
362
|
+
cancelable: !0
|
|
363
|
+
}) : (e = document.createEvent("CustomEvent"), e.initCustomEvent(a, !0, !0, i)), t.dispatchEvent(e);
|
|
364
|
+
}
|
|
365
|
+
function bi(t) {
|
|
366
|
+
var a = t.getBoundingClientRect();
|
|
367
|
+
return {
|
|
368
|
+
left: a.left + (window.pageXOffset - document.documentElement.clientLeft),
|
|
369
|
+
top: a.top + (window.pageYOffset - document.documentElement.clientTop)
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
var gt = W.location, aa = /^(\w+:)\/\/([^:/?#]*):?(\d*)/i;
|
|
373
|
+
function ii(t) {
|
|
374
|
+
var a = t.match(aa);
|
|
375
|
+
return a !== null && (a[1] !== gt.protocol || a[2] !== gt.hostname || a[3] !== gt.port);
|
|
376
|
+
}
|
|
377
|
+
function ai(t) {
|
|
378
|
+
var a = "timestamp=".concat((/* @__PURE__ */ new Date()).getTime());
|
|
379
|
+
return t + (t.indexOf("?") === -1 ? "?" : "&") + a;
|
|
380
|
+
}
|
|
381
|
+
function ot(t) {
|
|
382
|
+
var a = t.rotate, i = t.scaleX, e = t.scaleY, n = t.translateX, o = t.translateY, p = [];
|
|
383
|
+
u(n) && n !== 0 && p.push("translateX(".concat(n, "px)")), u(o) && o !== 0 && p.push("translateY(".concat(o, "px)")), u(a) && a !== 0 && p.push("rotate(".concat(a, "deg)")), u(i) && i !== 1 && p.push("scaleX(".concat(i, ")")), u(e) && e !== 1 && p.push("scaleY(".concat(e, ")"));
|
|
384
|
+
var s = p.length ? p.join(" ") : "none";
|
|
385
|
+
return {
|
|
386
|
+
WebkitTransform: s,
|
|
387
|
+
msTransform: s,
|
|
388
|
+
transform: s
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
function ea(t) {
|
|
392
|
+
var a = pi({}, t), i = 0;
|
|
393
|
+
return z(t, function(e, n) {
|
|
394
|
+
delete a[n], z(a, function(o) {
|
|
395
|
+
var p = Math.abs(e.startX - o.startX), s = Math.abs(e.startY - o.startY), l = Math.abs(e.endX - o.endX), c = Math.abs(e.endY - o.endY), r = Math.sqrt(p * p + s * s), d = Math.sqrt(l * l + c * c), v = (d - r) / r;
|
|
396
|
+
Math.abs(v) > Math.abs(i) && (i = v);
|
|
397
|
+
});
|
|
398
|
+
}), i;
|
|
399
|
+
}
|
|
400
|
+
function lt(t, a) {
|
|
401
|
+
var i = t.pageX, e = t.pageY, n = {
|
|
402
|
+
endX: i,
|
|
403
|
+
endY: e
|
|
404
|
+
};
|
|
405
|
+
return a ? n : pi({
|
|
406
|
+
startX: i,
|
|
407
|
+
startY: e
|
|
408
|
+
}, n);
|
|
409
|
+
}
|
|
410
|
+
function na(t) {
|
|
411
|
+
var a = 0, i = 0, e = 0;
|
|
412
|
+
return z(t, function(n) {
|
|
413
|
+
var o = n.startX, p = n.startY;
|
|
414
|
+
a += o, i += p, e += 1;
|
|
415
|
+
}), a /= e, i /= e, {
|
|
416
|
+
pageX: a,
|
|
417
|
+
pageY: i
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
function I(t) {
|
|
421
|
+
var a = t.aspectRatio, i = t.height, e = t.width, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "contain", o = ti(e), p = ti(i);
|
|
422
|
+
if (o && p) {
|
|
423
|
+
var s = i * a;
|
|
424
|
+
n === "contain" && s > e || n === "cover" && s < e ? i = e / a : e = i * a;
|
|
425
|
+
} else
|
|
426
|
+
o ? i = e / a : p && (e = i * a);
|
|
427
|
+
return {
|
|
428
|
+
width: e,
|
|
429
|
+
height: i
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
function oa(t) {
|
|
433
|
+
var a = t.width, i = t.height, e = t.degree;
|
|
434
|
+
if (e = Math.abs(e) % 180, e === 90)
|
|
435
|
+
return {
|
|
436
|
+
width: i,
|
|
437
|
+
height: a
|
|
438
|
+
};
|
|
439
|
+
var n = e % 90 * Math.PI / 180, o = Math.sin(n), p = Math.cos(n), s = a * p + i * o, l = a * o + i * p;
|
|
440
|
+
return e > 90 ? {
|
|
441
|
+
width: l,
|
|
442
|
+
height: s
|
|
443
|
+
} : {
|
|
444
|
+
width: s,
|
|
445
|
+
height: l
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
function pa(t, a, i, e) {
|
|
449
|
+
var n = a.aspectRatio, o = a.naturalWidth, p = a.naturalHeight, s = a.rotate, l = s === void 0 ? 0 : s, c = a.scaleX, r = c === void 0 ? 1 : c, d = a.scaleY, v = d === void 0 ? 1 : d, h = i.aspectRatio, f = i.naturalWidth, g = i.naturalHeight, k = e.fillColor, C = k === void 0 ? "transparent" : k, y = e.imageSmoothingEnabled, R = y === void 0 ? !0 : y, A = e.imageSmoothingQuality, m = A === void 0 ? "low" : A, x = e.maxWidth, j = x === void 0 ? 1 / 0 : x, N = e.maxHeight, H = N === void 0 ? 1 / 0 : N, U = e.minWidth, _ = U === void 0 ? 0 : U, S = e.minHeight, X = S === void 0 ? 0 : S, V = document.createElement("canvas"), D = V.getContext("2d"), rt = I({
|
|
450
|
+
aspectRatio: h,
|
|
451
|
+
width: j,
|
|
452
|
+
height: H
|
|
453
|
+
}), Nt = I({
|
|
454
|
+
aspectRatio: h,
|
|
455
|
+
width: _,
|
|
456
|
+
height: X
|
|
457
|
+
}, "cover"), vt = Math.min(rt.width, Math.max(Nt.width, f)), ut = Math.min(rt.height, Math.max(Nt.height, g)), Lt = I({
|
|
458
|
+
aspectRatio: n,
|
|
459
|
+
width: j,
|
|
460
|
+
height: H
|
|
461
|
+
}), Wt = I({
|
|
462
|
+
aspectRatio: n,
|
|
463
|
+
width: _,
|
|
464
|
+
height: X
|
|
465
|
+
}, "cover"), Ht = Math.min(Lt.width, Math.max(Wt.width, o)), Rt = Math.min(Lt.height, Math.max(Wt.height, p)), Mi = [-Ht / 2, -Rt / 2, Ht, Rt];
|
|
466
|
+
return V.width = J(vt), V.height = J(ut), D.fillStyle = C, D.fillRect(0, 0, vt, ut), D.save(), D.translate(vt / 2, ut / 2), D.rotate(l * Math.PI / 180), D.scale(r, v), D.imageSmoothingEnabled = R, D.imageSmoothingQuality = m, D.drawImage.apply(D, [t].concat(ci(Mi.map(function(Ci) {
|
|
467
|
+
return Math.floor(J(Ci));
|
|
468
|
+
})))), D.restore(), V;
|
|
469
|
+
}
|
|
470
|
+
var wi = String.fromCharCode;
|
|
471
|
+
function ca(t, a, i) {
|
|
472
|
+
var e = "";
|
|
473
|
+
i += a;
|
|
474
|
+
for (var n = a; n < i; n += 1)
|
|
475
|
+
e += wi(t.getUint8(n));
|
|
476
|
+
return e;
|
|
477
|
+
}
|
|
478
|
+
var ra = /^data:.*,/;
|
|
479
|
+
function sa(t) {
|
|
480
|
+
var a = t.replace(ra, ""), i = atob(a), e = new ArrayBuffer(i.length), n = new Uint8Array(e);
|
|
481
|
+
return z(n, function(o, p) {
|
|
482
|
+
n[p] = i.charCodeAt(p);
|
|
483
|
+
}), e;
|
|
484
|
+
}
|
|
485
|
+
function la(t, a) {
|
|
486
|
+
for (var i = [], e = 8192, n = new Uint8Array(t); n.length > 0; )
|
|
487
|
+
i.push(wi.apply(null, xi(n.subarray(0, e)))), n = n.subarray(e);
|
|
488
|
+
return "data:".concat(a, ";base64,").concat(btoa(i.join("")));
|
|
489
|
+
}
|
|
490
|
+
function da(t) {
|
|
491
|
+
var a = new DataView(t), i;
|
|
492
|
+
try {
|
|
493
|
+
var e, n, o;
|
|
494
|
+
if (a.getUint8(0) === 255 && a.getUint8(1) === 216)
|
|
495
|
+
for (var p = a.byteLength, s = 2; s + 1 < p; ) {
|
|
496
|
+
if (a.getUint8(s) === 255 && a.getUint8(s + 1) === 225) {
|
|
497
|
+
n = s;
|
|
498
|
+
break;
|
|
499
|
+
}
|
|
500
|
+
s += 1;
|
|
501
|
+
}
|
|
502
|
+
if (n) {
|
|
503
|
+
var l = n + 4, c = n + 10;
|
|
504
|
+
if (ca(a, l, 4) === "Exif") {
|
|
505
|
+
var r = a.getUint16(c);
|
|
506
|
+
if (e = r === 18761, (e || r === 19789) && a.getUint16(c + 2, e) === 42) {
|
|
507
|
+
var d = a.getUint32(c + 4, e);
|
|
508
|
+
d >= 8 && (o = c + d);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
if (o) {
|
|
513
|
+
var v = a.getUint16(o, e), h, f;
|
|
514
|
+
for (f = 0; f < v; f += 1)
|
|
515
|
+
if (h = o + f * 12 + 2, a.getUint16(h, e) === 274) {
|
|
516
|
+
h += 8, i = a.getUint16(h, e), a.setUint16(h, 1, e);
|
|
517
|
+
break;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
} catch {
|
|
521
|
+
i = 1;
|
|
522
|
+
}
|
|
523
|
+
return i;
|
|
524
|
+
}
|
|
525
|
+
function ma(t) {
|
|
526
|
+
var a = 0, i = 1, e = 1;
|
|
527
|
+
switch (t) {
|
|
528
|
+
case 2:
|
|
529
|
+
i = -1;
|
|
530
|
+
break;
|
|
531
|
+
case 3:
|
|
532
|
+
a = -180;
|
|
533
|
+
break;
|
|
534
|
+
case 4:
|
|
535
|
+
e = -1;
|
|
536
|
+
break;
|
|
537
|
+
case 5:
|
|
538
|
+
a = 90, e = -1;
|
|
539
|
+
break;
|
|
540
|
+
case 6:
|
|
541
|
+
a = 90;
|
|
542
|
+
break;
|
|
543
|
+
case 7:
|
|
544
|
+
a = 90, i = -1;
|
|
545
|
+
break;
|
|
546
|
+
case 8:
|
|
547
|
+
a = -90;
|
|
548
|
+
break;
|
|
549
|
+
}
|
|
550
|
+
return {
|
|
551
|
+
rotate: a,
|
|
552
|
+
scaleX: i,
|
|
553
|
+
scaleY: e
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
var ha = {
|
|
557
|
+
render: function() {
|
|
558
|
+
this.initContainer(), this.initCanvas(), this.initCropBox(), this.renderCanvas(), this.cropped && this.renderCropBox();
|
|
559
|
+
},
|
|
560
|
+
initContainer: function() {
|
|
561
|
+
var t = this.element, a = this.options, i = this.container, e = this.cropper, n = Number(a.minContainerWidth), o = Number(a.minContainerHeight);
|
|
562
|
+
M(e, E), L(t, E);
|
|
563
|
+
var p = {
|
|
564
|
+
width: Math.max(i.offsetWidth, n >= 0 ? n : vi),
|
|
565
|
+
height: Math.max(i.offsetHeight, o >= 0 ? o : ui)
|
|
566
|
+
};
|
|
567
|
+
this.containerData = p, P(e, {
|
|
568
|
+
width: p.width,
|
|
569
|
+
height: p.height
|
|
570
|
+
}), M(t, E), L(e, E);
|
|
571
|
+
},
|
|
572
|
+
// Canvas (image wrapper)
|
|
573
|
+
initCanvas: function() {
|
|
574
|
+
var t = this.containerData, a = this.imageData, i = this.options.viewMode, e = Math.abs(a.rotate) % 180 === 90, n = e ? a.naturalHeight : a.naturalWidth, o = e ? a.naturalWidth : a.naturalHeight, p = n / o, s = t.width, l = t.height;
|
|
575
|
+
t.height * p > t.width ? i === 3 ? s = t.height * p : l = t.width / p : i === 3 ? l = t.width / p : s = t.height * p;
|
|
576
|
+
var c = {
|
|
577
|
+
aspectRatio: p,
|
|
578
|
+
naturalWidth: n,
|
|
579
|
+
naturalHeight: o,
|
|
580
|
+
width: s,
|
|
581
|
+
height: l
|
|
582
|
+
};
|
|
583
|
+
this.canvasData = c, this.limited = i === 1 || i === 2, this.limitCanvas(!0, !0), c.width = Math.min(Math.max(c.width, c.minWidth), c.maxWidth), c.height = Math.min(Math.max(c.height, c.minHeight), c.maxHeight), c.left = (t.width - c.width) / 2, c.top = (t.height - c.height) / 2, c.oldLeft = c.left, c.oldTop = c.top, this.initialCanvasData = w({}, c);
|
|
584
|
+
},
|
|
585
|
+
limitCanvas: function(t, a) {
|
|
586
|
+
var i = this.options, e = this.containerData, n = this.canvasData, o = this.cropBoxData, p = i.viewMode, s = n.aspectRatio, l = this.cropped && o;
|
|
587
|
+
if (t) {
|
|
588
|
+
var c = Number(i.minCanvasWidth) || 0, r = Number(i.minCanvasHeight) || 0;
|
|
589
|
+
p > 1 ? (c = Math.max(c, e.width), r = Math.max(r, e.height), p === 3 && (r * s > c ? c = r * s : r = c / s)) : p > 0 && (c ? c = Math.max(c, l ? o.width : 0) : r ? r = Math.max(r, l ? o.height : 0) : l && (c = o.width, r = o.height, r * s > c ? c = r * s : r = c / s));
|
|
590
|
+
var d = I({
|
|
591
|
+
aspectRatio: s,
|
|
592
|
+
width: c,
|
|
593
|
+
height: r
|
|
594
|
+
});
|
|
595
|
+
c = d.width, r = d.height, n.minWidth = c, n.minHeight = r, n.maxWidth = 1 / 0, n.maxHeight = 1 / 0;
|
|
596
|
+
}
|
|
597
|
+
if (a)
|
|
598
|
+
if (p > (l ? 0 : 1)) {
|
|
599
|
+
var v = e.width - n.width, h = e.height - n.height;
|
|
600
|
+
n.minLeft = Math.min(0, v), n.minTop = Math.min(0, h), n.maxLeft = Math.max(0, v), n.maxTop = Math.max(0, h), l && this.limited && (n.minLeft = Math.min(o.left, o.left + (o.width - n.width)), n.minTop = Math.min(o.top, o.top + (o.height - n.height)), n.maxLeft = o.left, n.maxTop = o.top, p === 2 && (n.width >= e.width && (n.minLeft = Math.min(0, v), n.maxLeft = Math.max(0, v)), n.height >= e.height && (n.minTop = Math.min(0, h), n.maxTop = Math.max(0, h))));
|
|
601
|
+
} else
|
|
602
|
+
n.minLeft = -n.width, n.minTop = -n.height, n.maxLeft = e.width, n.maxTop = e.height;
|
|
603
|
+
},
|
|
604
|
+
renderCanvas: function(t, a) {
|
|
605
|
+
var i = this.canvasData, e = this.imageData;
|
|
606
|
+
if (a) {
|
|
607
|
+
var n = oa({
|
|
608
|
+
width: e.naturalWidth * Math.abs(e.scaleX || 1),
|
|
609
|
+
height: e.naturalHeight * Math.abs(e.scaleY || 1),
|
|
610
|
+
degree: e.rotate || 0
|
|
611
|
+
}), o = n.width, p = n.height, s = i.width * (o / i.naturalWidth), l = i.height * (p / i.naturalHeight);
|
|
612
|
+
i.left -= (s - i.width) / 2, i.top -= (l - i.height) / 2, i.width = s, i.height = l, i.aspectRatio = o / p, i.naturalWidth = o, i.naturalHeight = p, this.limitCanvas(!0, !1);
|
|
613
|
+
}
|
|
614
|
+
(i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCanvas(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, P(this.canvas, w({
|
|
615
|
+
width: i.width,
|
|
616
|
+
height: i.height
|
|
617
|
+
}, ot({
|
|
618
|
+
translateX: i.left,
|
|
619
|
+
translateY: i.top
|
|
620
|
+
}))), this.renderImage(t), this.cropped && this.limited && this.limitCropBox(!0, !0);
|
|
621
|
+
},
|
|
622
|
+
renderImage: function(t) {
|
|
623
|
+
var a = this.canvasData, i = this.imageData, e = i.naturalWidth * (a.width / a.naturalWidth), n = i.naturalHeight * (a.height / a.naturalHeight);
|
|
624
|
+
w(i, {
|
|
625
|
+
width: e,
|
|
626
|
+
height: n,
|
|
627
|
+
left: (a.width - e) / 2,
|
|
628
|
+
top: (a.height - n) / 2
|
|
629
|
+
}), P(this.image, w({
|
|
630
|
+
width: i.width,
|
|
631
|
+
height: i.height
|
|
632
|
+
}, ot(w({
|
|
633
|
+
translateX: i.left,
|
|
634
|
+
translateY: i.top
|
|
635
|
+
}, i)))), t && this.output();
|
|
636
|
+
},
|
|
637
|
+
initCropBox: function() {
|
|
638
|
+
var t = this.options, a = this.canvasData, i = t.aspectRatio || t.initialAspectRatio, e = Number(t.autoCropArea) || 0.8, n = {
|
|
639
|
+
width: a.width,
|
|
640
|
+
height: a.height
|
|
641
|
+
};
|
|
642
|
+
i && (a.height * i > a.width ? n.height = n.width / i : n.width = n.height * i), this.cropBoxData = n, this.limitCropBox(!0, !0), n.width = Math.min(Math.max(n.width, n.minWidth), n.maxWidth), n.height = Math.min(Math.max(n.height, n.minHeight), n.maxHeight), n.width = Math.max(n.minWidth, n.width * e), n.height = Math.max(n.minHeight, n.height * e), n.left = a.left + (a.width - n.width) / 2, n.top = a.top + (a.height - n.height) / 2, n.oldLeft = n.left, n.oldTop = n.top, this.initialCropBoxData = w({}, n);
|
|
643
|
+
},
|
|
644
|
+
limitCropBox: function(t, a) {
|
|
645
|
+
var i = this.options, e = this.containerData, n = this.canvasData, o = this.cropBoxData, p = this.limited, s = i.aspectRatio;
|
|
646
|
+
if (t) {
|
|
647
|
+
var l = Number(i.minCropBoxWidth) || 0, c = Number(i.minCropBoxHeight) || 0, r = p ? Math.min(e.width, n.width, n.width + n.left, e.width - n.left) : e.width, d = p ? Math.min(e.height, n.height, n.height + n.top, e.height - n.top) : e.height;
|
|
648
|
+
l = Math.min(l, e.width), c = Math.min(c, e.height), s && (l && c ? c * s > l ? c = l / s : l = c * s : l ? c = l / s : c && (l = c * s), d * s > r ? d = r / s : r = d * s), o.minWidth = Math.min(l, r), o.minHeight = Math.min(c, d), o.maxWidth = r, o.maxHeight = d;
|
|
649
|
+
}
|
|
650
|
+
a && (p ? (o.minLeft = Math.max(0, n.left), o.minTop = Math.max(0, n.top), o.maxLeft = Math.min(e.width, n.left + n.width) - o.width, o.maxTop = Math.min(e.height, n.top + n.height) - o.height) : (o.minLeft = 0, o.minTop = 0, o.maxLeft = e.width - o.width, o.maxTop = e.height - o.height));
|
|
651
|
+
},
|
|
652
|
+
renderCropBox: function() {
|
|
653
|
+
var t = this.options, a = this.containerData, i = this.cropBoxData;
|
|
654
|
+
(i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCropBox(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, t.movable && t.cropBoxMovable && ct(this.face, pt, i.width >= a.width && i.height >= a.height ? li : Et), P(this.cropBox, w({
|
|
655
|
+
width: i.width,
|
|
656
|
+
height: i.height
|
|
657
|
+
}, ot({
|
|
658
|
+
translateX: i.left,
|
|
659
|
+
translateY: i.top
|
|
660
|
+
}))), this.cropped && this.limited && this.limitCanvas(!0, !0), this.disabled || this.output();
|
|
661
|
+
},
|
|
662
|
+
output: function() {
|
|
663
|
+
this.preview(), tt(this.element, kt, this.getData());
|
|
664
|
+
}
|
|
665
|
+
}, va = {
|
|
666
|
+
initPreview: function() {
|
|
667
|
+
var t = this.element, a = this.crossOrigin, i = this.options.preview, e = a ? this.crossOriginUrl : this.url, n = t.alt || "The image to preview", o = document.createElement("img");
|
|
668
|
+
if (a && (o.crossOrigin = a), o.src = e, o.alt = n, this.viewBox.appendChild(o), this.viewBoxImage = o, !!i) {
|
|
669
|
+
var p = i;
|
|
670
|
+
typeof i == "string" ? p = t.ownerDocument.querySelectorAll(i) : i.querySelector && (p = [i]), this.previews = p, z(p, function(s) {
|
|
671
|
+
var l = document.createElement("img");
|
|
672
|
+
ct(s, st, {
|
|
673
|
+
width: s.offsetWidth,
|
|
674
|
+
height: s.offsetHeight,
|
|
675
|
+
html: s.innerHTML
|
|
676
|
+
}), a && (l.crossOrigin = a), l.src = e, l.alt = n, l.style.cssText = 'display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"', s.innerHTML = "", s.appendChild(l);
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
resetPreview: function() {
|
|
681
|
+
z(this.previews, function(t) {
|
|
682
|
+
var a = Dt(t, st);
|
|
683
|
+
P(t, {
|
|
684
|
+
width: a.width,
|
|
685
|
+
height: a.height
|
|
686
|
+
}), t.innerHTML = a.html, ia(t, st);
|
|
687
|
+
});
|
|
688
|
+
},
|
|
689
|
+
preview: function() {
|
|
690
|
+
var t = this.imageData, a = this.canvasData, i = this.cropBoxData, e = i.width, n = i.height, o = t.width, p = t.height, s = i.left - a.left - t.left, l = i.top - a.top - t.top;
|
|
691
|
+
!this.cropped || this.disabled || (P(this.viewBoxImage, w({
|
|
692
|
+
width: o,
|
|
693
|
+
height: p
|
|
694
|
+
}, ot(w({
|
|
695
|
+
translateX: -s,
|
|
696
|
+
translateY: -l
|
|
697
|
+
}, t)))), z(this.previews, function(c) {
|
|
698
|
+
var r = Dt(c, st), d = r.width, v = r.height, h = d, f = v, g = 1;
|
|
699
|
+
e && (g = d / e, f = n * g), n && f > v && (g = v / n, h = e * g, f = v), P(c, {
|
|
700
|
+
width: h,
|
|
701
|
+
height: f
|
|
702
|
+
}), P(c.getElementsByTagName("img")[0], w({
|
|
703
|
+
width: o * g,
|
|
704
|
+
height: p * g
|
|
705
|
+
}, ot(w({
|
|
706
|
+
translateX: -s * g,
|
|
707
|
+
translateY: -l * g
|
|
708
|
+
}, t))));
|
|
709
|
+
}));
|
|
710
|
+
}
|
|
711
|
+
}, ua = {
|
|
712
|
+
bind: function() {
|
|
713
|
+
var t = this.element, a = this.options, i = this.cropper;
|
|
714
|
+
B(a.cropstart) && T(t, Mt, a.cropstart), B(a.cropmove) && T(t, zt, a.cropmove), B(a.cropend) && T(t, jt, a.cropend), B(a.crop) && T(t, kt, a.crop), B(a.zoom) && T(t, Ct, a.zoom), T(i, Vt, this.onCropStart = this.cropStart.bind(this)), a.zoomable && a.zoomOnWheel && T(i, Gt, this.onWheel = this.wheel.bind(this), {
|
|
715
|
+
passive: !1,
|
|
716
|
+
capture: !0
|
|
717
|
+
}), a.toggleDragModeOnDblclick && T(i, _t, this.onDblclick = this.dblclick.bind(this)), T(t.ownerDocument, $t, this.onCropMove = this.cropMove.bind(this)), T(t.ownerDocument, Qt, this.onCropEnd = this.cropEnd.bind(this)), a.responsive && T(window, Zt, this.onResize = this.resize.bind(this));
|
|
718
|
+
},
|
|
719
|
+
unbind: function() {
|
|
720
|
+
var t = this.element, a = this.options, i = this.cropper;
|
|
721
|
+
B(a.cropstart) && q(t, Mt, a.cropstart), B(a.cropmove) && q(t, zt, a.cropmove), B(a.cropend) && q(t, jt, a.cropend), B(a.crop) && q(t, kt, a.crop), B(a.zoom) && q(t, Ct, a.zoom), q(i, Vt, this.onCropStart), a.zoomable && a.zoomOnWheel && q(i, Gt, this.onWheel, {
|
|
722
|
+
passive: !1,
|
|
723
|
+
capture: !0
|
|
724
|
+
}), a.toggleDragModeOnDblclick && q(i, _t, this.onDblclick), q(t.ownerDocument, $t, this.onCropMove), q(t.ownerDocument, Qt, this.onCropEnd), a.responsive && q(window, Zt, this.onResize);
|
|
725
|
+
}
|
|
726
|
+
}, xa = {
|
|
727
|
+
resize: function() {
|
|
728
|
+
if (!this.disabled) {
|
|
729
|
+
var t = this.options, a = this.container, i = this.containerData, e = a.offsetWidth / i.width, n = a.offsetHeight / i.height, o = Math.abs(e - 1) > Math.abs(n - 1) ? e : n;
|
|
730
|
+
if (o !== 1) {
|
|
731
|
+
var p, s;
|
|
732
|
+
t.restore && (p = this.getCanvasData(), s = this.getCropBoxData()), this.render(), t.restore && (this.setCanvasData(z(p, function(l, c) {
|
|
733
|
+
p[c] = l * o;
|
|
734
|
+
})), this.setCropBoxData(z(s, function(l, c) {
|
|
735
|
+
s[c] = l * o;
|
|
736
|
+
})));
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
dblclick: function() {
|
|
741
|
+
this.disabled || this.options.dragMode === hi || this.setDragMode(Ji(this.dragBox, wt) ? mi : Ot);
|
|
742
|
+
},
|
|
743
|
+
wheel: function(t) {
|
|
744
|
+
var a = this, i = Number(this.options.wheelZoomRatio) || 0.1, e = 1;
|
|
745
|
+
this.disabled || (t.preventDefault(), !this.wheeling && (this.wheeling = !0, setTimeout(function() {
|
|
746
|
+
a.wheeling = !1;
|
|
747
|
+
}, 50), t.deltaY ? e = t.deltaY > 0 ? 1 : -1 : t.wheelDelta ? e = -t.wheelDelta / 120 : t.detail && (e = t.detail > 0 ? 1 : -1), this.zoom(-e * i, t)));
|
|
748
|
+
},
|
|
749
|
+
cropStart: function(t) {
|
|
750
|
+
var a = t.buttons, i = t.button;
|
|
751
|
+
if (!(this.disabled || (t.type === "mousedown" || t.type === "pointerdown" && t.pointerType === "mouse") && // No primary button (Usually the left button)
|
|
752
|
+
(u(a) && a !== 1 || u(i) && i !== 0 || t.ctrlKey))) {
|
|
753
|
+
var e = this.options, n = this.pointers, o;
|
|
754
|
+
t.changedTouches ? z(t.changedTouches, function(p) {
|
|
755
|
+
n[p.identifier] = lt(p);
|
|
756
|
+
}) : n[t.pointerId || 0] = lt(t), Object.keys(n).length > 1 && e.zoomable && e.zoomOnTouch ? o = di : o = Dt(t.target, pt), Ii.test(o) && tt(this.element, Mt, {
|
|
757
|
+
originalEvent: t,
|
|
758
|
+
action: o
|
|
759
|
+
}) !== !1 && (t.preventDefault(), this.action = o, this.cropping = !1, o === si && (this.cropping = !0, M(this.dragBox, dt)));
|
|
760
|
+
}
|
|
761
|
+
},
|
|
762
|
+
cropMove: function(t) {
|
|
763
|
+
var a = this.action;
|
|
764
|
+
if (!(this.disabled || !a)) {
|
|
765
|
+
var i = this.pointers;
|
|
766
|
+
t.preventDefault(), tt(this.element, zt, {
|
|
767
|
+
originalEvent: t,
|
|
768
|
+
action: a
|
|
769
|
+
}) !== !1 && (t.changedTouches ? z(t.changedTouches, function(e) {
|
|
770
|
+
w(i[e.identifier] || {}, lt(e, !0));
|
|
771
|
+
}) : w(i[t.pointerId || 0] || {}, lt(t, !0)), this.change(t));
|
|
772
|
+
}
|
|
773
|
+
},
|
|
774
|
+
cropEnd: function(t) {
|
|
775
|
+
if (!this.disabled) {
|
|
776
|
+
var a = this.action, i = this.pointers;
|
|
777
|
+
t.changedTouches ? z(t.changedTouches, function(e) {
|
|
778
|
+
delete i[e.identifier];
|
|
779
|
+
}) : delete i[t.pointerId || 0], a && (t.preventDefault(), Object.keys(i).length || (this.action = ""), this.cropping && (this.cropping = !1, K(this.dragBox, dt, this.cropped && this.options.modal)), tt(this.element, jt, {
|
|
780
|
+
originalEvent: t,
|
|
781
|
+
action: a
|
|
782
|
+
}));
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
}, ga = {
|
|
786
|
+
change: function(t) {
|
|
787
|
+
var a = this.options, i = this.canvasData, e = this.containerData, n = this.cropBoxData, o = this.pointers, p = this.action, s = a.aspectRatio, l = n.left, c = n.top, r = n.width, d = n.height, v = l + r, h = c + d, f = 0, g = 0, k = e.width, C = e.height, y = !0, R;
|
|
788
|
+
!s && t.shiftKey && (s = r && d ? r / d : 1), this.limited && (f = n.minLeft, g = n.minTop, k = f + Math.min(e.width, i.width, i.left + i.width), C = g + Math.min(e.height, i.height, i.top + i.height));
|
|
789
|
+
var A = o[Object.keys(o)[0]], m = {
|
|
790
|
+
x: A.endX - A.startX,
|
|
791
|
+
y: A.endY - A.startY
|
|
792
|
+
}, x = function(j) {
|
|
793
|
+
switch (j) {
|
|
794
|
+
case $:
|
|
795
|
+
v + m.x > k && (m.x = k - v);
|
|
796
|
+
break;
|
|
797
|
+
case Q:
|
|
798
|
+
l + m.x < f && (m.x = f - l);
|
|
799
|
+
break;
|
|
800
|
+
case Y:
|
|
801
|
+
c + m.y < g && (m.y = g - c);
|
|
802
|
+
break;
|
|
803
|
+
case Z:
|
|
804
|
+
h + m.y > C && (m.y = C - h);
|
|
805
|
+
break;
|
|
806
|
+
}
|
|
807
|
+
};
|
|
808
|
+
switch (p) {
|
|
809
|
+
case Et:
|
|
810
|
+
l += m.x, c += m.y;
|
|
811
|
+
break;
|
|
812
|
+
case $:
|
|
813
|
+
if (m.x >= 0 && (v >= k || s && (c <= g || h >= C))) {
|
|
814
|
+
y = !1;
|
|
815
|
+
break;
|
|
816
|
+
}
|
|
817
|
+
x($), r += m.x, r < 0 && (p = Q, r = -r, l -= r), s && (d = r / s, c += (n.height - d) / 2);
|
|
818
|
+
break;
|
|
819
|
+
case Y:
|
|
820
|
+
if (m.y <= 0 && (c <= g || s && (l <= f || v >= k))) {
|
|
821
|
+
y = !1;
|
|
822
|
+
break;
|
|
823
|
+
}
|
|
824
|
+
x(Y), d -= m.y, c += m.y, d < 0 && (p = Z, d = -d, c -= d), s && (r = d * s, l += (n.width - r) / 2);
|
|
825
|
+
break;
|
|
826
|
+
case Q:
|
|
827
|
+
if (m.x <= 0 && (l <= f || s && (c <= g || h >= C))) {
|
|
828
|
+
y = !1;
|
|
829
|
+
break;
|
|
830
|
+
}
|
|
831
|
+
x(Q), r -= m.x, l += m.x, r < 0 && (p = $, r = -r, l -= r), s && (d = r / s, c += (n.height - d) / 2);
|
|
832
|
+
break;
|
|
833
|
+
case Z:
|
|
834
|
+
if (m.y >= 0 && (h >= C || s && (l <= f || v >= k))) {
|
|
835
|
+
y = !1;
|
|
836
|
+
break;
|
|
837
|
+
}
|
|
838
|
+
x(Z), d += m.y, d < 0 && (p = Y, d = -d, c -= d), s && (r = d * s, l += (n.width - r) / 2);
|
|
839
|
+
break;
|
|
840
|
+
case it:
|
|
841
|
+
if (s) {
|
|
842
|
+
if (m.y <= 0 && (c <= g || v >= k)) {
|
|
843
|
+
y = !1;
|
|
844
|
+
break;
|
|
845
|
+
}
|
|
846
|
+
x(Y), d -= m.y, c += m.y, r = d * s;
|
|
847
|
+
} else
|
|
848
|
+
x(Y), x($), m.x >= 0 ? v < k ? r += m.x : m.y <= 0 && c <= g && (y = !1) : r += m.x, m.y <= 0 ? c > g && (d -= m.y, c += m.y) : (d -= m.y, c += m.y);
|
|
849
|
+
r < 0 && d < 0 ? (p = nt, d = -d, r = -r, c -= d, l -= r) : r < 0 ? (p = at, r = -r, l -= r) : d < 0 && (p = et, d = -d, c -= d);
|
|
850
|
+
break;
|
|
851
|
+
case at:
|
|
852
|
+
if (s) {
|
|
853
|
+
if (m.y <= 0 && (c <= g || l <= f)) {
|
|
854
|
+
y = !1;
|
|
855
|
+
break;
|
|
856
|
+
}
|
|
857
|
+
x(Y), d -= m.y, c += m.y, r = d * s, l += n.width - r;
|
|
858
|
+
} else
|
|
859
|
+
x(Y), x(Q), m.x <= 0 ? l > f ? (r -= m.x, l += m.x) : m.y <= 0 && c <= g && (y = !1) : (r -= m.x, l += m.x), m.y <= 0 ? c > g && (d -= m.y, c += m.y) : (d -= m.y, c += m.y);
|
|
860
|
+
r < 0 && d < 0 ? (p = et, d = -d, r = -r, c -= d, l -= r) : r < 0 ? (p = it, r = -r, l -= r) : d < 0 && (p = nt, d = -d, c -= d);
|
|
861
|
+
break;
|
|
862
|
+
case nt:
|
|
863
|
+
if (s) {
|
|
864
|
+
if (m.x <= 0 && (l <= f || h >= C)) {
|
|
865
|
+
y = !1;
|
|
866
|
+
break;
|
|
867
|
+
}
|
|
868
|
+
x(Q), r -= m.x, l += m.x, d = r / s;
|
|
869
|
+
} else
|
|
870
|
+
x(Z), x(Q), m.x <= 0 ? l > f ? (r -= m.x, l += m.x) : m.y >= 0 && h >= C && (y = !1) : (r -= m.x, l += m.x), m.y >= 0 ? h < C && (d += m.y) : d += m.y;
|
|
871
|
+
r < 0 && d < 0 ? (p = it, d = -d, r = -r, c -= d, l -= r) : r < 0 ? (p = et, r = -r, l -= r) : d < 0 && (p = at, d = -d, c -= d);
|
|
872
|
+
break;
|
|
873
|
+
case et:
|
|
874
|
+
if (s) {
|
|
875
|
+
if (m.x >= 0 && (v >= k || h >= C)) {
|
|
876
|
+
y = !1;
|
|
877
|
+
break;
|
|
878
|
+
}
|
|
879
|
+
x($), r += m.x, d = r / s;
|
|
880
|
+
} else
|
|
881
|
+
x(Z), x($), m.x >= 0 ? v < k ? r += m.x : m.y >= 0 && h >= C && (y = !1) : r += m.x, m.y >= 0 ? h < C && (d += m.y) : d += m.y;
|
|
882
|
+
r < 0 && d < 0 ? (p = at, d = -d, r = -r, c -= d, l -= r) : r < 0 ? (p = nt, r = -r, l -= r) : d < 0 && (p = it, d = -d, c -= d);
|
|
883
|
+
break;
|
|
884
|
+
case li:
|
|
885
|
+
this.move(m.x, m.y), y = !1;
|
|
886
|
+
break;
|
|
887
|
+
case di:
|
|
888
|
+
this.zoom(ea(o), t), y = !1;
|
|
889
|
+
break;
|
|
890
|
+
case si:
|
|
891
|
+
if (!m.x || !m.y) {
|
|
892
|
+
y = !1;
|
|
893
|
+
break;
|
|
894
|
+
}
|
|
895
|
+
R = bi(this.cropper), l = A.startX - R.left, c = A.startY - R.top, r = n.minWidth, d = n.minHeight, m.x > 0 ? p = m.y > 0 ? et : it : m.x < 0 && (l -= r, p = m.y > 0 ? nt : at), m.y < 0 && (c -= d), this.cropped || (L(this.cropBox, E), this.cropped = !0, this.limited && this.limitCropBox(!0, !0));
|
|
896
|
+
break;
|
|
897
|
+
}
|
|
898
|
+
y && (n.width = r, n.height = d, n.left = l, n.top = c, this.action = p, this.renderCropBox()), z(o, function(j) {
|
|
899
|
+
j.startX = j.endX, j.startY = j.endY;
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
}, fa = {
|
|
903
|
+
// Show the crop box manually
|
|
904
|
+
crop: function() {
|
|
905
|
+
return this.ready && !this.cropped && !this.disabled && (this.cropped = !0, this.limitCropBox(!0, !0), this.options.modal && M(this.dragBox, dt), L(this.cropBox, E), this.setCropBoxData(this.initialCropBoxData)), this;
|
|
906
|
+
},
|
|
907
|
+
// Reset the image and crop box to their initial states
|
|
908
|
+
reset: function() {
|
|
909
|
+
return this.ready && !this.disabled && (this.imageData = w({}, this.initialImageData), this.canvasData = w({}, this.initialCanvasData), this.cropBoxData = w({}, this.initialCropBoxData), this.renderCanvas(), this.cropped && this.renderCropBox()), this;
|
|
910
|
+
},
|
|
911
|
+
// Clear the crop box
|
|
912
|
+
clear: function() {
|
|
913
|
+
return this.cropped && !this.disabled && (w(this.cropBoxData, {
|
|
914
|
+
left: 0,
|
|
915
|
+
top: 0,
|
|
916
|
+
width: 0,
|
|
917
|
+
height: 0
|
|
918
|
+
}), this.cropped = !1, this.renderCropBox(), this.limitCanvas(!0, !0), this.renderCanvas(), L(this.dragBox, dt), M(this.cropBox, E)), this;
|
|
919
|
+
},
|
|
920
|
+
/**
|
|
921
|
+
* Replace the image's src and rebuild the cropper
|
|
922
|
+
* @param {string} url - The new URL.
|
|
923
|
+
* @param {boolean} [hasSameSize] - Indicate if the new image has the same size as the old one.
|
|
924
|
+
* @returns {Cropper} this
|
|
925
|
+
*/
|
|
926
|
+
replace: function(t) {
|
|
927
|
+
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
928
|
+
return !this.disabled && t && (this.isImg && (this.element.src = t), a ? (this.url = t, this.image.src = t, this.ready && (this.viewBoxImage.src = t, z(this.previews, function(i) {
|
|
929
|
+
i.getElementsByTagName("img")[0].src = t;
|
|
930
|
+
}))) : (this.isImg && (this.replaced = !0), this.options.data = null, this.uncreate(), this.load(t))), this;
|
|
931
|
+
},
|
|
932
|
+
// Enable (unfreeze) the cropper
|
|
933
|
+
enable: function() {
|
|
934
|
+
return this.ready && this.disabled && (this.disabled = !1, L(this.cropper, It)), this;
|
|
935
|
+
},
|
|
936
|
+
// Disable (freeze) the cropper
|
|
937
|
+
disable: function() {
|
|
938
|
+
return this.ready && !this.disabled && (this.disabled = !0, M(this.cropper, It)), this;
|
|
939
|
+
},
|
|
940
|
+
/**
|
|
941
|
+
* Destroy the cropper and remove the instance from the image
|
|
942
|
+
* @returns {Cropper} this
|
|
943
|
+
*/
|
|
944
|
+
destroy: function() {
|
|
945
|
+
var t = this.element;
|
|
946
|
+
return t[b] ? (t[b] = void 0, this.isImg && this.replaced && (t.src = this.originalUrl), this.uncreate(), this) : this;
|
|
947
|
+
},
|
|
948
|
+
/**
|
|
949
|
+
* Move the canvas with relative offsets
|
|
950
|
+
* @param {number} offsetX - The relative offset distance on the x-axis.
|
|
951
|
+
* @param {number} [offsetY=offsetX] - The relative offset distance on the y-axis.
|
|
952
|
+
* @returns {Cropper} this
|
|
953
|
+
*/
|
|
954
|
+
move: function(t) {
|
|
955
|
+
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, i = this.canvasData, e = i.left, n = i.top;
|
|
956
|
+
return this.moveTo(xt(t) ? t : e + Number(t), xt(a) ? a : n + Number(a));
|
|
957
|
+
},
|
|
958
|
+
/**
|
|
959
|
+
* Move the canvas to an absolute point
|
|
960
|
+
* @param {number} x - The x-axis coordinate.
|
|
961
|
+
* @param {number} [y=x] - The y-axis coordinate.
|
|
962
|
+
* @returns {Cropper} this
|
|
963
|
+
*/
|
|
964
|
+
moveTo: function(t) {
|
|
965
|
+
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, i = this.canvasData, e = !1;
|
|
966
|
+
return t = Number(t), a = Number(a), this.ready && !this.disabled && this.options.movable && (u(t) && (i.left = t, e = !0), u(a) && (i.top = a, e = !0), e && this.renderCanvas(!0)), this;
|
|
967
|
+
},
|
|
968
|
+
/**
|
|
969
|
+
* Zoom the canvas with a relative ratio
|
|
970
|
+
* @param {number} ratio - The target ratio.
|
|
971
|
+
* @param {Event} _originalEvent - The original event if any.
|
|
972
|
+
* @returns {Cropper} this
|
|
973
|
+
*/
|
|
974
|
+
zoom: function(t, a) {
|
|
975
|
+
var i = this.canvasData;
|
|
976
|
+
return t = Number(t), t < 0 ? t = 1 / (1 - t) : t = 1 + t, this.zoomTo(i.width * t / i.naturalWidth, null, a);
|
|
977
|
+
},
|
|
978
|
+
/**
|
|
979
|
+
* Zoom the canvas to an absolute ratio
|
|
980
|
+
* @param {number} ratio - The target ratio.
|
|
981
|
+
* @param {Object} pivot - The zoom pivot point coordinate.
|
|
982
|
+
* @param {Event} _originalEvent - The original event if any.
|
|
983
|
+
* @returns {Cropper} this
|
|
984
|
+
*/
|
|
985
|
+
zoomTo: function(t, a, i) {
|
|
986
|
+
var e = this.options, n = this.canvasData, o = n.width, p = n.height, s = n.naturalWidth, l = n.naturalHeight;
|
|
987
|
+
if (t = Number(t), t >= 0 && this.ready && !this.disabled && e.zoomable) {
|
|
988
|
+
var c = s * t, r = l * t;
|
|
989
|
+
if (tt(this.element, Ct, {
|
|
990
|
+
ratio: t,
|
|
991
|
+
oldRatio: o / s,
|
|
992
|
+
originalEvent: i
|
|
993
|
+
}) === !1)
|
|
994
|
+
return this;
|
|
995
|
+
if (i) {
|
|
996
|
+
var d = this.pointers, v = bi(this.cropper), h = d && Object.keys(d).length ? na(d) : {
|
|
997
|
+
pageX: i.pageX,
|
|
998
|
+
pageY: i.pageY
|
|
999
|
+
};
|
|
1000
|
+
n.left -= (c - o) * ((h.pageX - v.left - n.left) / o), n.top -= (r - p) * ((h.pageY - v.top - n.top) / p);
|
|
1001
|
+
} else
|
|
1002
|
+
G(a) && u(a.x) && u(a.y) ? (n.left -= (c - o) * ((a.x - n.left) / o), n.top -= (r - p) * ((a.y - n.top) / p)) : (n.left -= (c - o) / 2, n.top -= (r - p) / 2);
|
|
1003
|
+
n.width = c, n.height = r, this.renderCanvas(!0);
|
|
1004
|
+
}
|
|
1005
|
+
return this;
|
|
1006
|
+
},
|
|
1007
|
+
/**
|
|
1008
|
+
* Rotate the canvas with a relative degree
|
|
1009
|
+
* @param {number} degree - The rotate degree.
|
|
1010
|
+
* @returns {Cropper} this
|
|
1011
|
+
*/
|
|
1012
|
+
rotate: function(t) {
|
|
1013
|
+
return this.rotateTo((this.imageData.rotate || 0) + Number(t));
|
|
1014
|
+
},
|
|
1015
|
+
/**
|
|
1016
|
+
* Rotate the canvas to an absolute degree
|
|
1017
|
+
* @param {number} degree - The rotate degree.
|
|
1018
|
+
* @returns {Cropper} this
|
|
1019
|
+
*/
|
|
1020
|
+
rotateTo: function(t) {
|
|
1021
|
+
return t = Number(t), u(t) && this.ready && !this.disabled && this.options.rotatable && (this.imageData.rotate = t % 360, this.renderCanvas(!0, !0)), this;
|
|
1022
|
+
},
|
|
1023
|
+
/**
|
|
1024
|
+
* Scale the image on the x-axis.
|
|
1025
|
+
* @param {number} scaleX - The scale ratio on the x-axis.
|
|
1026
|
+
* @returns {Cropper} this
|
|
1027
|
+
*/
|
|
1028
|
+
scaleX: function(t) {
|
|
1029
|
+
var a = this.imageData.scaleY;
|
|
1030
|
+
return this.scale(t, u(a) ? a : 1);
|
|
1031
|
+
},
|
|
1032
|
+
/**
|
|
1033
|
+
* Scale the image on the y-axis.
|
|
1034
|
+
* @param {number} scaleY - The scale ratio on the y-axis.
|
|
1035
|
+
* @returns {Cropper} this
|
|
1036
|
+
*/
|
|
1037
|
+
scaleY: function(t) {
|
|
1038
|
+
var a = this.imageData.scaleX;
|
|
1039
|
+
return this.scale(u(a) ? a : 1, t);
|
|
1040
|
+
},
|
|
1041
|
+
/**
|
|
1042
|
+
* Scale the image
|
|
1043
|
+
* @param {number} scaleX - The scale ratio on the x-axis.
|
|
1044
|
+
* @param {number} [scaleY=scaleX] - The scale ratio on the y-axis.
|
|
1045
|
+
* @returns {Cropper} this
|
|
1046
|
+
*/
|
|
1047
|
+
scale: function(t) {
|
|
1048
|
+
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, i = this.imageData, e = !1;
|
|
1049
|
+
return t = Number(t), a = Number(a), this.ready && !this.disabled && this.options.scalable && (u(t) && (i.scaleX = t, e = !0), u(a) && (i.scaleY = a, e = !0), e && this.renderCanvas(!0, !0)), this;
|
|
1050
|
+
},
|
|
1051
|
+
/**
|
|
1052
|
+
* Get the cropped area position and size data (base on the original image)
|
|
1053
|
+
* @param {boolean} [rounded=false] - Indicate if round the data values or not.
|
|
1054
|
+
* @returns {Object} The result cropped data.
|
|
1055
|
+
*/
|
|
1056
|
+
getData: function() {
|
|
1057
|
+
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, a = this.options, i = this.imageData, e = this.canvasData, n = this.cropBoxData, o;
|
|
1058
|
+
if (this.ready && this.cropped) {
|
|
1059
|
+
o = {
|
|
1060
|
+
x: n.left - e.left,
|
|
1061
|
+
y: n.top - e.top,
|
|
1062
|
+
width: n.width,
|
|
1063
|
+
height: n.height
|
|
1064
|
+
};
|
|
1065
|
+
var p = i.width / i.naturalWidth;
|
|
1066
|
+
if (z(o, function(c, r) {
|
|
1067
|
+
o[r] = c / p;
|
|
1068
|
+
}), t) {
|
|
1069
|
+
var s = Math.round(o.y + o.height), l = Math.round(o.x + o.width);
|
|
1070
|
+
o.x = Math.round(o.x), o.y = Math.round(o.y), o.width = l - o.x, o.height = s - o.y;
|
|
1071
|
+
}
|
|
1072
|
+
} else
|
|
1073
|
+
o = {
|
|
1074
|
+
x: 0,
|
|
1075
|
+
y: 0,
|
|
1076
|
+
width: 0,
|
|
1077
|
+
height: 0
|
|
1078
|
+
};
|
|
1079
|
+
return a.rotatable && (o.rotate = i.rotate || 0), a.scalable && (o.scaleX = i.scaleX || 1, o.scaleY = i.scaleY || 1), o;
|
|
1080
|
+
},
|
|
1081
|
+
/**
|
|
1082
|
+
* Set the cropped area position and size with new data
|
|
1083
|
+
* @param {Object} data - The new data.
|
|
1084
|
+
* @returns {Cropper} this
|
|
1085
|
+
*/
|
|
1086
|
+
setData: function(t) {
|
|
1087
|
+
var a = this.options, i = this.imageData, e = this.canvasData, n = {};
|
|
1088
|
+
if (this.ready && !this.disabled && G(t)) {
|
|
1089
|
+
var o = !1;
|
|
1090
|
+
a.rotatable && u(t.rotate) && t.rotate !== i.rotate && (i.rotate = t.rotate, o = !0), a.scalable && (u(t.scaleX) && t.scaleX !== i.scaleX && (i.scaleX = t.scaleX, o = !0), u(t.scaleY) && t.scaleY !== i.scaleY && (i.scaleY = t.scaleY, o = !0)), o && this.renderCanvas(!0, !0);
|
|
1091
|
+
var p = i.width / i.naturalWidth;
|
|
1092
|
+
u(t.x) && (n.left = t.x * p + e.left), u(t.y) && (n.top = t.y * p + e.top), u(t.width) && (n.width = t.width * p), u(t.height) && (n.height = t.height * p), this.setCropBoxData(n);
|
|
1093
|
+
}
|
|
1094
|
+
return this;
|
|
1095
|
+
},
|
|
1096
|
+
/**
|
|
1097
|
+
* Get the container size data.
|
|
1098
|
+
* @returns {Object} The result container data.
|
|
1099
|
+
*/
|
|
1100
|
+
getContainerData: function() {
|
|
1101
|
+
return this.ready ? w({}, this.containerData) : {};
|
|
1102
|
+
},
|
|
1103
|
+
/**
|
|
1104
|
+
* Get the image position and size data.
|
|
1105
|
+
* @returns {Object} The result image data.
|
|
1106
|
+
*/
|
|
1107
|
+
getImageData: function() {
|
|
1108
|
+
return this.sized ? w({}, this.imageData) : {};
|
|
1109
|
+
},
|
|
1110
|
+
/**
|
|
1111
|
+
* Get the canvas position and size data.
|
|
1112
|
+
* @returns {Object} The result canvas data.
|
|
1113
|
+
*/
|
|
1114
|
+
getCanvasData: function() {
|
|
1115
|
+
var t = this.canvasData, a = {};
|
|
1116
|
+
return this.ready && z(["left", "top", "width", "height", "naturalWidth", "naturalHeight"], function(i) {
|
|
1117
|
+
a[i] = t[i];
|
|
1118
|
+
}), a;
|
|
1119
|
+
},
|
|
1120
|
+
/**
|
|
1121
|
+
* Set the canvas position and size with new data.
|
|
1122
|
+
* @param {Object} data - The new canvas data.
|
|
1123
|
+
* @returns {Cropper} this
|
|
1124
|
+
*/
|
|
1125
|
+
setCanvasData: function(t) {
|
|
1126
|
+
var a = this.canvasData, i = a.aspectRatio;
|
|
1127
|
+
return this.ready && !this.disabled && G(t) && (u(t.left) && (a.left = t.left), u(t.top) && (a.top = t.top), u(t.width) ? (a.width = t.width, a.height = t.width / i) : u(t.height) && (a.height = t.height, a.width = t.height * i), this.renderCanvas(!0)), this;
|
|
1128
|
+
},
|
|
1129
|
+
/**
|
|
1130
|
+
* Get the crop box position and size data.
|
|
1131
|
+
* @returns {Object} The result crop box data.
|
|
1132
|
+
*/
|
|
1133
|
+
getCropBoxData: function() {
|
|
1134
|
+
var t = this.cropBoxData, a;
|
|
1135
|
+
return this.ready && this.cropped && (a = {
|
|
1136
|
+
left: t.left,
|
|
1137
|
+
top: t.top,
|
|
1138
|
+
width: t.width,
|
|
1139
|
+
height: t.height
|
|
1140
|
+
}), a || {};
|
|
1141
|
+
},
|
|
1142
|
+
/**
|
|
1143
|
+
* Set the crop box position and size with new data.
|
|
1144
|
+
* @param {Object} data - The new crop box data.
|
|
1145
|
+
* @returns {Cropper} this
|
|
1146
|
+
*/
|
|
1147
|
+
setCropBoxData: function(t) {
|
|
1148
|
+
var a = this.cropBoxData, i = this.options.aspectRatio, e, n;
|
|
1149
|
+
return this.ready && this.cropped && !this.disabled && G(t) && (u(t.left) && (a.left = t.left), u(t.top) && (a.top = t.top), u(t.width) && t.width !== a.width && (e = !0, a.width = t.width), u(t.height) && t.height !== a.height && (n = !0, a.height = t.height), i && (e ? a.height = a.width / i : n && (a.width = a.height * i)), this.renderCropBox()), this;
|
|
1150
|
+
},
|
|
1151
|
+
/**
|
|
1152
|
+
* Get a canvas drawn the cropped image.
|
|
1153
|
+
* @param {Object} [options={}] - The config options.
|
|
1154
|
+
* @returns {HTMLCanvasElement} - The result canvas.
|
|
1155
|
+
*/
|
|
1156
|
+
getCroppedCanvas: function() {
|
|
1157
|
+
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1158
|
+
if (!this.ready || !window.HTMLCanvasElement)
|
|
1159
|
+
return null;
|
|
1160
|
+
var a = this.canvasData, i = pa(this.image, this.imageData, a, t);
|
|
1161
|
+
if (!this.cropped)
|
|
1162
|
+
return i;
|
|
1163
|
+
var e = this.getData(t.rounded), n = e.x, o = e.y, p = e.width, s = e.height, l = i.width / Math.floor(a.naturalWidth);
|
|
1164
|
+
l !== 1 && (n *= l, o *= l, p *= l, s *= l);
|
|
1165
|
+
var c = p / s, r = I({
|
|
1166
|
+
aspectRatio: c,
|
|
1167
|
+
width: t.maxWidth || 1 / 0,
|
|
1168
|
+
height: t.maxHeight || 1 / 0
|
|
1169
|
+
}), d = I({
|
|
1170
|
+
aspectRatio: c,
|
|
1171
|
+
width: t.minWidth || 0,
|
|
1172
|
+
height: t.minHeight || 0
|
|
1173
|
+
}, "cover"), v = I({
|
|
1174
|
+
aspectRatio: c,
|
|
1175
|
+
width: t.width || (l !== 1 ? i.width : p),
|
|
1176
|
+
height: t.height || (l !== 1 ? i.height : s)
|
|
1177
|
+
}), h = v.width, f = v.height;
|
|
1178
|
+
h = Math.min(r.width, Math.max(d.width, h)), f = Math.min(r.height, Math.max(d.height, f));
|
|
1179
|
+
var g = document.createElement("canvas"), k = g.getContext("2d");
|
|
1180
|
+
g.width = J(h), g.height = J(f), k.fillStyle = t.fillColor || "transparent", k.fillRect(0, 0, h, f);
|
|
1181
|
+
var C = t.imageSmoothingEnabled, y = C === void 0 ? !0 : C, R = t.imageSmoothingQuality;
|
|
1182
|
+
k.imageSmoothingEnabled = y, R && (k.imageSmoothingQuality = R);
|
|
1183
|
+
var A = i.width, m = i.height, x = n, j = o, N, H, U, _, S, X;
|
|
1184
|
+
x <= -p || x > A ? (x = 0, N = 0, U = 0, S = 0) : x <= 0 ? (U = -x, x = 0, N = Math.min(A, p + x), S = N) : x <= A && (U = 0, N = Math.min(p, A - x), S = N), N <= 0 || j <= -s || j > m ? (j = 0, H = 0, _ = 0, X = 0) : j <= 0 ? (_ = -j, j = 0, H = Math.min(m, s + j), X = H) : j <= m && (_ = 0, H = Math.min(s, m - j), X = H);
|
|
1185
|
+
var V = [x, j, N, H];
|
|
1186
|
+
if (S > 0 && X > 0) {
|
|
1187
|
+
var D = h / p;
|
|
1188
|
+
V.push(U * D, _ * D, S * D, X * D);
|
|
1189
|
+
}
|
|
1190
|
+
return k.drawImage.apply(k, [i].concat(ci(V.map(function(rt) {
|
|
1191
|
+
return Math.floor(J(rt));
|
|
1192
|
+
})))), g;
|
|
1193
|
+
},
|
|
1194
|
+
/**
|
|
1195
|
+
* Change the aspect ratio of the crop box.
|
|
1196
|
+
* @param {number} aspectRatio - The new aspect ratio.
|
|
1197
|
+
* @returns {Cropper} this
|
|
1198
|
+
*/
|
|
1199
|
+
setAspectRatio: function(t) {
|
|
1200
|
+
var a = this.options;
|
|
1201
|
+
return !this.disabled && !xt(t) && (a.aspectRatio = Math.max(0, t) || NaN, this.ready && (this.initCropBox(), this.cropped && this.renderCropBox())), this;
|
|
1202
|
+
},
|
|
1203
|
+
/**
|
|
1204
|
+
* Change the drag mode.
|
|
1205
|
+
* @param {string} mode - The new drag mode.
|
|
1206
|
+
* @returns {Cropper} this
|
|
1207
|
+
*/
|
|
1208
|
+
setDragMode: function(t) {
|
|
1209
|
+
var a = this.options, i = this.dragBox, e = this.face;
|
|
1210
|
+
if (this.ready && !this.disabled) {
|
|
1211
|
+
var n = t === Ot, o = a.movable && t === mi;
|
|
1212
|
+
t = n || o ? t : hi, a.dragMode = t, ct(i, pt, t), K(i, wt, n), K(i, yt, o), a.cropBoxMovable || (ct(e, pt, t), K(e, wt, n), K(e, yt, o));
|
|
1213
|
+
}
|
|
1214
|
+
return this;
|
|
1215
|
+
}
|
|
1216
|
+
}, ba = W.Cropper, yi = /* @__PURE__ */ function() {
|
|
1217
|
+
function t(a) {
|
|
1218
|
+
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1219
|
+
if (Oi(this, t), !a || !Vi.test(a.tagName))
|
|
1220
|
+
throw new Error("The first argument is required and must be an <img> or <canvas> element.");
|
|
1221
|
+
this.element = a, this.options = w({}, Jt, G(i) && i), this.cropped = !1, this.disabled = !1, this.pointers = {}, this.ready = !1, this.reloading = !1, this.replaced = !1, this.sized = !1, this.sizing = !1, this.init();
|
|
1222
|
+
}
|
|
1223
|
+
return Ti(t, [{
|
|
1224
|
+
key: "init",
|
|
1225
|
+
value: function() {
|
|
1226
|
+
var a = this.element, i = a.tagName.toLowerCase(), e;
|
|
1227
|
+
if (!a[b]) {
|
|
1228
|
+
if (a[b] = this, i === "img") {
|
|
1229
|
+
if (this.isImg = !0, e = a.getAttribute("src") || "", this.originalUrl = e, !e)
|
|
1230
|
+
return;
|
|
1231
|
+
e = a.src;
|
|
1232
|
+
} else
|
|
1233
|
+
i === "canvas" && window.HTMLCanvasElement && (e = a.toDataURL());
|
|
1234
|
+
this.load(e);
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
}, {
|
|
1238
|
+
key: "load",
|
|
1239
|
+
value: function(a) {
|
|
1240
|
+
var i = this;
|
|
1241
|
+
if (a) {
|
|
1242
|
+
this.url = a, this.imageData = {};
|
|
1243
|
+
var e = this.element, n = this.options;
|
|
1244
|
+
if (!n.rotatable && !n.scalable && (n.checkOrientation = !1), !n.checkOrientation || !window.ArrayBuffer) {
|
|
1245
|
+
this.clone();
|
|
1246
|
+
return;
|
|
1247
|
+
}
|
|
1248
|
+
if (Ui.test(a)) {
|
|
1249
|
+
_i.test(a) ? this.read(sa(a)) : this.clone();
|
|
1250
|
+
return;
|
|
1251
|
+
}
|
|
1252
|
+
var o = new XMLHttpRequest(), p = this.clone.bind(this);
|
|
1253
|
+
this.reloading = !0, this.xhr = o, o.onabort = p, o.onerror = p, o.ontimeout = p, o.onprogress = function() {
|
|
1254
|
+
o.getResponseHeader("content-type") !== Kt && o.abort();
|
|
1255
|
+
}, o.onload = function() {
|
|
1256
|
+
i.read(o.response);
|
|
1257
|
+
}, o.onloadend = function() {
|
|
1258
|
+
i.reloading = !1, i.xhr = null;
|
|
1259
|
+
}, n.checkCrossOrigin && ii(a) && e.crossOrigin && (a = ai(a)), o.open("GET", a, !0), o.responseType = "arraybuffer", o.withCredentials = e.crossOrigin === "use-credentials", o.send();
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
}, {
|
|
1263
|
+
key: "read",
|
|
1264
|
+
value: function(a) {
|
|
1265
|
+
var i = this.options, e = this.imageData, n = da(a), o = 0, p = 1, s = 1;
|
|
1266
|
+
if (n > 1) {
|
|
1267
|
+
this.url = la(a, Kt);
|
|
1268
|
+
var l = ma(n);
|
|
1269
|
+
o = l.rotate, p = l.scaleX, s = l.scaleY;
|
|
1270
|
+
}
|
|
1271
|
+
i.rotatable && (e.rotate = o), i.scalable && (e.scaleX = p, e.scaleY = s), this.clone();
|
|
1272
|
+
}
|
|
1273
|
+
}, {
|
|
1274
|
+
key: "clone",
|
|
1275
|
+
value: function() {
|
|
1276
|
+
var a = this.element, i = this.url, e = a.crossOrigin, n = i;
|
|
1277
|
+
this.options.checkCrossOrigin && ii(i) && (e || (e = "anonymous"), n = ai(i)), this.crossOrigin = e, this.crossOriginUrl = n;
|
|
1278
|
+
var o = document.createElement("img");
|
|
1279
|
+
e && (o.crossOrigin = e), o.src = n || i, o.alt = a.alt || "The image to crop", this.image = o, o.onload = this.start.bind(this), o.onerror = this.stop.bind(this), M(o, Ut), a.parentNode.insertBefore(o, a.nextSibling);
|
|
1280
|
+
}
|
|
1281
|
+
}, {
|
|
1282
|
+
key: "start",
|
|
1283
|
+
value: function() {
|
|
1284
|
+
var a = this, i = this.image;
|
|
1285
|
+
i.onload = null, i.onerror = null, this.sizing = !0;
|
|
1286
|
+
var e = W.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(W.navigator.userAgent), n = function(s, l) {
|
|
1287
|
+
w(a.imageData, {
|
|
1288
|
+
naturalWidth: s,
|
|
1289
|
+
naturalHeight: l,
|
|
1290
|
+
aspectRatio: s / l
|
|
1291
|
+
}), a.initialImageData = w({}, a.imageData), a.sizing = !1, a.sized = !0, a.build();
|
|
1292
|
+
};
|
|
1293
|
+
if (i.naturalWidth && !e) {
|
|
1294
|
+
n(i.naturalWidth, i.naturalHeight);
|
|
1295
|
+
return;
|
|
1296
|
+
}
|
|
1297
|
+
var o = document.createElement("img"), p = document.body || document.documentElement;
|
|
1298
|
+
this.sizingImage = o, o.onload = function() {
|
|
1299
|
+
n(o.width, o.height), e || p.removeChild(o);
|
|
1300
|
+
}, o.src = i.src, e || (o.style.cssText = "left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;", p.appendChild(o));
|
|
1301
|
+
}
|
|
1302
|
+
}, {
|
|
1303
|
+
key: "stop",
|
|
1304
|
+
value: function() {
|
|
1305
|
+
var a = this.image;
|
|
1306
|
+
a.onload = null, a.onerror = null, a.parentNode.removeChild(a), this.image = null;
|
|
1307
|
+
}
|
|
1308
|
+
}, {
|
|
1309
|
+
key: "build",
|
|
1310
|
+
value: function() {
|
|
1311
|
+
if (!(!this.sized || this.ready)) {
|
|
1312
|
+
var a = this.element, i = this.options, e = this.image, n = a.parentNode, o = document.createElement("div");
|
|
1313
|
+
o.innerHTML = $i;
|
|
1314
|
+
var p = o.querySelector(".".concat(b, "-container")), s = p.querySelector(".".concat(b, "-canvas")), l = p.querySelector(".".concat(b, "-drag-box")), c = p.querySelector(".".concat(b, "-crop-box")), r = c.querySelector(".".concat(b, "-face"));
|
|
1315
|
+
this.container = n, this.cropper = p, this.canvas = s, this.dragBox = l, this.cropBox = c, this.viewBox = p.querySelector(".".concat(b, "-view-box")), this.face = r, s.appendChild(e), M(a, E), n.insertBefore(p, a.nextSibling), L(e, Ut), this.initPreview(), this.bind(), i.initialAspectRatio = Math.max(0, i.initialAspectRatio) || NaN, i.aspectRatio = Math.max(0, i.aspectRatio) || NaN, i.viewMode = Math.max(0, Math.min(3, Math.round(i.viewMode))) || 0, M(c, E), i.guides || M(c.getElementsByClassName("".concat(b, "-dashed")), E), i.center || M(c.getElementsByClassName("".concat(b, "-center")), E), i.background && M(p, "".concat(b, "-bg")), i.highlight || M(r, Si), i.cropBoxMovable && (M(r, yt), ct(r, pt, Et)), i.cropBoxResizable || (M(c.getElementsByClassName("".concat(b, "-line")), E), M(c.getElementsByClassName("".concat(b, "-point")), E)), this.render(), this.ready = !0, this.setDragMode(i.dragMode), i.autoCrop && this.crop(), this.setData(i.data), B(i.ready) && T(a, Ft, i.ready, {
|
|
1316
|
+
once: !0
|
|
1317
|
+
}), tt(a, Ft);
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
}, {
|
|
1321
|
+
key: "unbuild",
|
|
1322
|
+
value: function() {
|
|
1323
|
+
if (this.ready) {
|
|
1324
|
+
this.ready = !1, this.unbind(), this.resetPreview();
|
|
1325
|
+
var a = this.cropper.parentNode;
|
|
1326
|
+
a && a.removeChild(this.cropper), L(this.element, E);
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
}, {
|
|
1330
|
+
key: "uncreate",
|
|
1331
|
+
value: function() {
|
|
1332
|
+
this.ready ? (this.unbuild(), this.ready = !1, this.cropped = !1) : this.sizing ? (this.sizingImage.onload = null, this.sizing = !1, this.sized = !1) : this.reloading ? (this.xhr.onabort = null, this.xhr.abort()) : this.image && this.stop();
|
|
1333
|
+
}
|
|
1334
|
+
/**
|
|
1335
|
+
* Get the no conflict cropper class.
|
|
1336
|
+
* @returns {Cropper} The cropper class.
|
|
1337
|
+
*/
|
|
1338
|
+
}], [{
|
|
1339
|
+
key: "noConflict",
|
|
1340
|
+
value: function() {
|
|
1341
|
+
return window.Cropper = ba, t;
|
|
1342
|
+
}
|
|
1343
|
+
/**
|
|
1344
|
+
* Change the default options.
|
|
1345
|
+
* @param {Object} options - The new default options.
|
|
1346
|
+
*/
|
|
1347
|
+
}, {
|
|
1348
|
+
key: "setDefaults",
|
|
1349
|
+
value: function(a) {
|
|
1350
|
+
w(Jt, G(a) && a);
|
|
1351
|
+
}
|
|
1352
|
+
}]), t;
|
|
1353
|
+
}();
|
|
1354
|
+
w(yi.prototype, ha, va, ua, xa, ga, fa);
|
|
1355
|
+
function wa(t) {
|
|
1356
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1357
|
+
}
|
|
1358
|
+
function ht() {
|
|
1359
|
+
this._types = /* @__PURE__ */ Object.create(null), this._extensions = /* @__PURE__ */ Object.create(null);
|
|
1360
|
+
for (let t = 0; t < arguments.length; t++)
|
|
1361
|
+
this.define(arguments[t]);
|
|
1362
|
+
this.define = this.define.bind(this), this.getType = this.getType.bind(this), this.getExtension = this.getExtension.bind(this);
|
|
1363
|
+
}
|
|
1364
|
+
ht.prototype.define = function(t, a) {
|
|
1365
|
+
for (let i in t) {
|
|
1366
|
+
let e = t[i].map(function(n) {
|
|
1367
|
+
return n.toLowerCase();
|
|
1368
|
+
});
|
|
1369
|
+
i = i.toLowerCase();
|
|
1370
|
+
for (let n = 0; n < e.length; n++) {
|
|
1371
|
+
const o = e[n];
|
|
1372
|
+
if (o[0] !== "*") {
|
|
1373
|
+
if (!a && o in this._types)
|
|
1374
|
+
throw new Error(
|
|
1375
|
+
'Attempt to change mapping for "' + o + '" extension from "' + this._types[o] + '" to "' + i + '". Pass `force=true` to allow this, otherwise remove "' + o + '" from the list of extensions for "' + i + '".'
|
|
1376
|
+
);
|
|
1377
|
+
this._types[o] = i;
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
if (a || !this._extensions[i]) {
|
|
1381
|
+
const n = e[0];
|
|
1382
|
+
this._extensions[i] = n[0] !== "*" ? n : n.substr(1);
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
};
|
|
1386
|
+
ht.prototype.getType = function(t) {
|
|
1387
|
+
t = String(t);
|
|
1388
|
+
let a = t.replace(/^.*[/\\]/, "").toLowerCase(), i = a.replace(/^.*\./, "").toLowerCase(), e = a.length < t.length;
|
|
1389
|
+
return (i.length < a.length - 1 || !e) && this._types[i] || null;
|
|
1390
|
+
};
|
|
1391
|
+
ht.prototype.getExtension = function(t) {
|
|
1392
|
+
return t = /^\s*([^;\s]*)/.test(t) && RegExp.$1, t && this._extensions[t.toLowerCase()] || null;
|
|
1393
|
+
};
|
|
1394
|
+
var ya = ht, ka = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] }, ja = { "application/prs.cww": ["cww"], "application/vnd.1000minds.decision-model+xml": ["1km"], "application/vnd.3gpp.pic-bw-large": ["plb"], "application/vnd.3gpp.pic-bw-small": ["psb"], "application/vnd.3gpp.pic-bw-var": ["pvb"], "application/vnd.3gpp2.tcap": ["tcap"], "application/vnd.3m.post-it-notes": ["pwn"], "application/vnd.accpac.simply.aso": ["aso"], "application/vnd.accpac.simply.imp": ["imp"], "application/vnd.acucobol": ["acu"], "application/vnd.acucorp": ["atc", "acutc"], "application/vnd.adobe.air-application-installer-package+zip": ["air"], "application/vnd.adobe.formscentral.fcdt": ["fcdt"], "application/vnd.adobe.fxp": ["fxp", "fxpl"], "application/vnd.adobe.xdp+xml": ["xdp"], "application/vnd.adobe.xfdf": ["xfdf"], "application/vnd.ahead.space": ["ahead"], "application/vnd.airzip.filesecure.azf": ["azf"], "application/vnd.airzip.filesecure.azs": ["azs"], "application/vnd.amazon.ebook": ["azw"], "application/vnd.americandynamics.acc": ["acc"], "application/vnd.amiga.ami": ["ami"], "application/vnd.android.package-archive": ["apk"], "application/vnd.anser-web-certificate-issue-initiation": ["cii"], "application/vnd.anser-web-funds-transfer-initiation": ["fti"], "application/vnd.antix.game-component": ["atx"], "application/vnd.apple.installer+xml": ["mpkg"], "application/vnd.apple.keynote": ["key"], "application/vnd.apple.mpegurl": ["m3u8"], "application/vnd.apple.numbers": ["numbers"], "application/vnd.apple.pages": ["pages"], "application/vnd.apple.pkpass": ["pkpass"], "application/vnd.aristanetworks.swi": ["swi"], "application/vnd.astraea-software.iota": ["iota"], "application/vnd.audiograph": ["aep"], "application/vnd.balsamiq.bmml+xml": ["bmml"], "application/vnd.blueice.multipass": ["mpm"], "application/vnd.bmi": ["bmi"], "application/vnd.businessobjects": ["rep"], "application/vnd.chemdraw+xml": ["cdxml"], "application/vnd.chipnuts.karaoke-mmd": ["mmd"], "application/vnd.cinderella": ["cdy"], "application/vnd.citationstyles.style+xml": ["csl"], "application/vnd.claymore": ["cla"], "application/vnd.cloanto.rp9": ["rp9"], "application/vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"], "application/vnd.cluetrust.cartomobile-config": ["c11amc"], "application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"], "application/vnd.commonspace": ["csp"], "application/vnd.contact.cmsg": ["cdbcmsg"], "application/vnd.cosmocaller": ["cmc"], "application/vnd.crick.clicker": ["clkx"], "application/vnd.crick.clicker.keyboard": ["clkk"], "application/vnd.crick.clicker.palette": ["clkp"], "application/vnd.crick.clicker.template": ["clkt"], "application/vnd.crick.clicker.wordbank": ["clkw"], "application/vnd.criticaltools.wbs+xml": ["wbs"], "application/vnd.ctc-posml": ["pml"], "application/vnd.cups-ppd": ["ppd"], "application/vnd.curl.car": ["car"], "application/vnd.curl.pcurl": ["pcurl"], "application/vnd.dart": ["dart"], "application/vnd.data-vision.rdz": ["rdz"], "application/vnd.dbf": ["dbf"], "application/vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"], "application/vnd.dece.ttml+xml": ["uvt", "uvvt"], "application/vnd.dece.unspecified": ["uvx", "uvvx"], "application/vnd.dece.zip": ["uvz", "uvvz"], "application/vnd.denovo.fcselayout-link": ["fe_launch"], "application/vnd.dna": ["dna"], "application/vnd.dolby.mlp": ["mlp"], "application/vnd.dpgraph": ["dpg"], "application/vnd.dreamfactory": ["dfac"], "application/vnd.ds-keypoint": ["kpxx"], "application/vnd.dvb.ait": ["ait"], "application/vnd.dvb.service": ["svc"], "application/vnd.dynageo": ["geo"], "application/vnd.ecowin.chart": ["mag"], "application/vnd.enliven": ["nml"], "application/vnd.epson.esf": ["esf"], "application/vnd.epson.msf": ["msf"], "application/vnd.epson.quickanime": ["qam"], "application/vnd.epson.salt": ["slt"], "application/vnd.epson.ssf": ["ssf"], "application/vnd.eszigno3+xml": ["es3", "et3"], "application/vnd.ezpix-album": ["ez2"], "application/vnd.ezpix-package": ["ez3"], "application/vnd.fdf": ["fdf"], "application/vnd.fdsn.mseed": ["mseed"], "application/vnd.fdsn.seed": ["seed", "dataless"], "application/vnd.flographit": ["gph"], "application/vnd.fluxtime.clip": ["ftc"], "application/vnd.framemaker": ["fm", "frame", "maker", "book"], "application/vnd.frogans.fnc": ["fnc"], "application/vnd.frogans.ltf": ["ltf"], "application/vnd.fsc.weblaunch": ["fsc"], "application/vnd.fujitsu.oasys": ["oas"], "application/vnd.fujitsu.oasys2": ["oa2"], "application/vnd.fujitsu.oasys3": ["oa3"], "application/vnd.fujitsu.oasysgp": ["fg5"], "application/vnd.fujitsu.oasysprs": ["bh2"], "application/vnd.fujixerox.ddd": ["ddd"], "application/vnd.fujixerox.docuworks": ["xdw"], "application/vnd.fujixerox.docuworks.binder": ["xbd"], "application/vnd.fuzzysheet": ["fzs"], "application/vnd.genomatix.tuxedo": ["txd"], "application/vnd.geogebra.file": ["ggb"], "application/vnd.geogebra.tool": ["ggt"], "application/vnd.geometry-explorer": ["gex", "gre"], "application/vnd.geonext": ["gxt"], "application/vnd.geoplan": ["g2w"], "application/vnd.geospace": ["g3w"], "application/vnd.gmx": ["gmx"], "application/vnd.google-apps.document": ["gdoc"], "application/vnd.google-apps.presentation": ["gslides"], "application/vnd.google-apps.spreadsheet": ["gsheet"], "application/vnd.google-earth.kml+xml": ["kml"], "application/vnd.google-earth.kmz": ["kmz"], "application/vnd.grafeq": ["gqf", "gqs"], "application/vnd.groove-account": ["gac"], "application/vnd.groove-help": ["ghf"], "application/vnd.groove-identity-message": ["gim"], "application/vnd.groove-injector": ["grv"], "application/vnd.groove-tool-message": ["gtm"], "application/vnd.groove-tool-template": ["tpl"], "application/vnd.groove-vcard": ["vcg"], "application/vnd.hal+xml": ["hal"], "application/vnd.handheld-entertainment+xml": ["zmm"], "application/vnd.hbci": ["hbci"], "application/vnd.hhe.lesson-player": ["les"], "application/vnd.hp-hpgl": ["hpgl"], "application/vnd.hp-hpid": ["hpid"], "application/vnd.hp-hps": ["hps"], "application/vnd.hp-jlyt": ["jlt"], "application/vnd.hp-pcl": ["pcl"], "application/vnd.hp-pclxl": ["pclxl"], "application/vnd.hydrostatix.sof-data": ["sfd-hdstx"], "application/vnd.ibm.minipay": ["mpy"], "application/vnd.ibm.modcap": ["afp", "listafp", "list3820"], "application/vnd.ibm.rights-management": ["irm"], "application/vnd.ibm.secure-container": ["sc"], "application/vnd.iccprofile": ["icc", "icm"], "application/vnd.igloader": ["igl"], "application/vnd.immervision-ivp": ["ivp"], "application/vnd.immervision-ivu": ["ivu"], "application/vnd.insors.igm": ["igm"], "application/vnd.intercon.formnet": ["xpw", "xpx"], "application/vnd.intergeo": ["i2g"], "application/vnd.intu.qbo": ["qbo"], "application/vnd.intu.qfx": ["qfx"], "application/vnd.ipunplugged.rcprofile": ["rcprofile"], "application/vnd.irepository.package+xml": ["irp"], "application/vnd.is-xpr": ["xpr"], "application/vnd.isac.fcs": ["fcs"], "application/vnd.jam": ["jam"], "application/vnd.jcp.javame.midlet-rms": ["rms"], "application/vnd.jisp": ["jisp"], "application/vnd.joost.joda-archive": ["joda"], "application/vnd.kahootz": ["ktz", "ktr"], "application/vnd.kde.karbon": ["karbon"], "application/vnd.kde.kchart": ["chrt"], "application/vnd.kde.kformula": ["kfo"], "application/vnd.kde.kivio": ["flw"], "application/vnd.kde.kontour": ["kon"], "application/vnd.kde.kpresenter": ["kpr", "kpt"], "application/vnd.kde.kspread": ["ksp"], "application/vnd.kde.kword": ["kwd", "kwt"], "application/vnd.kenameaapp": ["htke"], "application/vnd.kidspiration": ["kia"], "application/vnd.kinar": ["kne", "knp"], "application/vnd.koan": ["skp", "skd", "skt", "skm"], "application/vnd.kodak-descriptor": ["sse"], "application/vnd.las.las+xml": ["lasxml"], "application/vnd.llamagraphics.life-balance.desktop": ["lbd"], "application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"], "application/vnd.lotus-1-2-3": ["123"], "application/vnd.lotus-approach": ["apr"], "application/vnd.lotus-freelance": ["pre"], "application/vnd.lotus-notes": ["nsf"], "application/vnd.lotus-organizer": ["org"], "application/vnd.lotus-screencam": ["scm"], "application/vnd.lotus-wordpro": ["lwp"], "application/vnd.macports.portpkg": ["portpkg"], "application/vnd.mapbox-vector-tile": ["mvt"], "application/vnd.mcd": ["mcd"], "application/vnd.medcalcdata": ["mc1"], "application/vnd.mediastation.cdkey": ["cdkey"], "application/vnd.mfer": ["mwf"], "application/vnd.mfmp": ["mfm"], "application/vnd.micrografx.flo": ["flo"], "application/vnd.micrografx.igx": ["igx"], "application/vnd.mif": ["mif"], "application/vnd.mobius.daf": ["daf"], "application/vnd.mobius.dis": ["dis"], "application/vnd.mobius.mbk": ["mbk"], "application/vnd.mobius.mqy": ["mqy"], "application/vnd.mobius.msl": ["msl"], "application/vnd.mobius.plc": ["plc"], "application/vnd.mobius.txf": ["txf"], "application/vnd.mophun.application": ["mpn"], "application/vnd.mophun.certificate": ["mpc"], "application/vnd.mozilla.xul+xml": ["xul"], "application/vnd.ms-artgalry": ["cil"], "application/vnd.ms-cab-compressed": ["cab"], "application/vnd.ms-excel": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"], "application/vnd.ms-excel.addin.macroenabled.12": ["xlam"], "application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"], "application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"], "application/vnd.ms-excel.template.macroenabled.12": ["xltm"], "application/vnd.ms-fontobject": ["eot"], "application/vnd.ms-htmlhelp": ["chm"], "application/vnd.ms-ims": ["ims"], "application/vnd.ms-lrm": ["lrm"], "application/vnd.ms-officetheme": ["thmx"], "application/vnd.ms-outlook": ["msg"], "application/vnd.ms-pki.seccat": ["cat"], "application/vnd.ms-pki.stl": ["*stl"], "application/vnd.ms-powerpoint": ["ppt", "pps", "pot"], "application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"], "application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"], "application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"], "application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"], "application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"], "application/vnd.ms-project": ["mpp", "mpt"], "application/vnd.ms-word.document.macroenabled.12": ["docm"], "application/vnd.ms-word.template.macroenabled.12": ["dotm"], "application/vnd.ms-works": ["wps", "wks", "wcm", "wdb"], "application/vnd.ms-wpl": ["wpl"], "application/vnd.ms-xpsdocument": ["xps"], "application/vnd.mseq": ["mseq"], "application/vnd.musician": ["mus"], "application/vnd.muvee.style": ["msty"], "application/vnd.mynfc": ["taglet"], "application/vnd.neurolanguage.nlu": ["nlu"], "application/vnd.nitf": ["ntf", "nitf"], "application/vnd.noblenet-directory": ["nnd"], "application/vnd.noblenet-sealer": ["nns"], "application/vnd.noblenet-web": ["nnw"], "application/vnd.nokia.n-gage.ac+xml": ["*ac"], "application/vnd.nokia.n-gage.data": ["ngdat"], "application/vnd.nokia.n-gage.symbian.install": ["n-gage"], "application/vnd.nokia.radio-preset": ["rpst"], "application/vnd.nokia.radio-presets": ["rpss"], "application/vnd.novadigm.edm": ["edm"], "application/vnd.novadigm.edx": ["edx"], "application/vnd.novadigm.ext": ["ext"], "application/vnd.oasis.opendocument.chart": ["odc"], "application/vnd.oasis.opendocument.chart-template": ["otc"], "application/vnd.oasis.opendocument.database": ["odb"], "application/vnd.oasis.opendocument.formula": ["odf"], "application/vnd.oasis.opendocument.formula-template": ["odft"], "application/vnd.oasis.opendocument.graphics": ["odg"], "application/vnd.oasis.opendocument.graphics-template": ["otg"], "application/vnd.oasis.opendocument.image": ["odi"], "application/vnd.oasis.opendocument.image-template": ["oti"], "application/vnd.oasis.opendocument.presentation": ["odp"], "application/vnd.oasis.opendocument.presentation-template": ["otp"], "application/vnd.oasis.opendocument.spreadsheet": ["ods"], "application/vnd.oasis.opendocument.spreadsheet-template": ["ots"], "application/vnd.oasis.opendocument.text": ["odt"], "application/vnd.oasis.opendocument.text-master": ["odm"], "application/vnd.oasis.opendocument.text-template": ["ott"], "application/vnd.oasis.opendocument.text-web": ["oth"], "application/vnd.olpc-sugar": ["xo"], "application/vnd.oma.dd2+xml": ["dd2"], "application/vnd.openblox.game+xml": ["obgx"], "application/vnd.openofficeorg.extension": ["oxt"], "application/vnd.openstreetmap.data+xml": ["osm"], "application/vnd.openxmlformats-officedocument.presentationml.presentation": ["pptx"], "application/vnd.openxmlformats-officedocument.presentationml.slide": ["sldx"], "application/vnd.openxmlformats-officedocument.presentationml.slideshow": ["ppsx"], "application/vnd.openxmlformats-officedocument.presentationml.template": ["potx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.template": ["xltx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.document": ["docx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.template": ["dotx"], "application/vnd.osgeo.mapguide.package": ["mgp"], "application/vnd.osgi.dp": ["dp"], "application/vnd.osgi.subsystem": ["esa"], "application/vnd.palm": ["pdb", "pqa", "oprc"], "application/vnd.pawaafile": ["paw"], "application/vnd.pg.format": ["str"], "application/vnd.pg.osasli": ["ei6"], "application/vnd.picsel": ["efif"], "application/vnd.pmi.widget": ["wg"], "application/vnd.pocketlearn": ["plf"], "application/vnd.powerbuilder6": ["pbd"], "application/vnd.previewsystems.box": ["box"], "application/vnd.proteus.magazine": ["mgz"], "application/vnd.publishare-delta-tree": ["qps"], "application/vnd.pvi.ptid1": ["ptid"], "application/vnd.quark.quarkxpress": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"], "application/vnd.rar": ["rar"], "application/vnd.realvnc.bed": ["bed"], "application/vnd.recordare.musicxml": ["mxl"], "application/vnd.recordare.musicxml+xml": ["musicxml"], "application/vnd.rig.cryptonote": ["cryptonote"], "application/vnd.rim.cod": ["cod"], "application/vnd.rn-realmedia": ["rm"], "application/vnd.rn-realmedia-vbr": ["rmvb"], "application/vnd.route66.link66+xml": ["link66"], "application/vnd.sailingtracker.track": ["st"], "application/vnd.seemail": ["see"], "application/vnd.sema": ["sema"], "application/vnd.semd": ["semd"], "application/vnd.semf": ["semf"], "application/vnd.shana.informed.formdata": ["ifm"], "application/vnd.shana.informed.formtemplate": ["itp"], "application/vnd.shana.informed.interchange": ["iif"], "application/vnd.shana.informed.package": ["ipk"], "application/vnd.simtech-mindmapper": ["twd", "twds"], "application/vnd.smaf": ["mmf"], "application/vnd.smart.teacher": ["teacher"], "application/vnd.software602.filler.form+xml": ["fo"], "application/vnd.solent.sdkm+xml": ["sdkm", "sdkd"], "application/vnd.spotfire.dxp": ["dxp"], "application/vnd.spotfire.sfs": ["sfs"], "application/vnd.stardivision.calc": ["sdc"], "application/vnd.stardivision.draw": ["sda"], "application/vnd.stardivision.impress": ["sdd"], "application/vnd.stardivision.math": ["smf"], "application/vnd.stardivision.writer": ["sdw", "vor"], "application/vnd.stardivision.writer-global": ["sgl"], "application/vnd.stepmania.package": ["smzip"], "application/vnd.stepmania.stepchart": ["sm"], "application/vnd.sun.wadl+xml": ["wadl"], "application/vnd.sun.xml.calc": ["sxc"], "application/vnd.sun.xml.calc.template": ["stc"], "application/vnd.sun.xml.draw": ["sxd"], "application/vnd.sun.xml.draw.template": ["std"], "application/vnd.sun.xml.impress": ["sxi"], "application/vnd.sun.xml.impress.template": ["sti"], "application/vnd.sun.xml.math": ["sxm"], "application/vnd.sun.xml.writer": ["sxw"], "application/vnd.sun.xml.writer.global": ["sxg"], "application/vnd.sun.xml.writer.template": ["stw"], "application/vnd.sus-calendar": ["sus", "susp"], "application/vnd.svd": ["svd"], "application/vnd.symbian.install": ["sis", "sisx"], "application/vnd.syncml+xml": ["xsm"], "application/vnd.syncml.dm+wbxml": ["bdm"], "application/vnd.syncml.dm+xml": ["xdm"], "application/vnd.syncml.dmddf+xml": ["ddf"], "application/vnd.tao.intent-module-archive": ["tao"], "application/vnd.tcpdump.pcap": ["pcap", "cap", "dmp"], "application/vnd.tmobile-livetv": ["tmo"], "application/vnd.trid.tpt": ["tpt"], "application/vnd.triscape.mxs": ["mxs"], "application/vnd.trueapp": ["tra"], "application/vnd.ufdl": ["ufd", "ufdl"], "application/vnd.uiq.theme": ["utz"], "application/vnd.umajin": ["umj"], "application/vnd.unity": ["unityweb"], "application/vnd.uoml+xml": ["uoml"], "application/vnd.vcx": ["vcx"], "application/vnd.visio": ["vsd", "vst", "vss", "vsw"], "application/vnd.visionary": ["vis"], "application/vnd.vsf": ["vsf"], "application/vnd.wap.wbxml": ["wbxml"], "application/vnd.wap.wmlc": ["wmlc"], "application/vnd.wap.wmlscriptc": ["wmlsc"], "application/vnd.webturbo": ["wtb"], "application/vnd.wolfram.player": ["nbp"], "application/vnd.wordperfect": ["wpd"], "application/vnd.wqd": ["wqd"], "application/vnd.wt.stf": ["stf"], "application/vnd.xara": ["xar"], "application/vnd.xfdl": ["xfdl"], "application/vnd.yamaha.hv-dic": ["hvd"], "application/vnd.yamaha.hv-script": ["hvs"], "application/vnd.yamaha.hv-voice": ["hvp"], "application/vnd.yamaha.openscoreformat": ["osf"], "application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"], "application/vnd.yamaha.smaf-audio": ["saf"], "application/vnd.yamaha.smaf-phrase": ["spf"], "application/vnd.yellowriver-custom-menu": ["cmp"], "application/vnd.zul": ["zir", "zirz"], "application/vnd.zzazz.deck+xml": ["zaz"], "application/x-7z-compressed": ["7z"], "application/x-abiword": ["abw"], "application/x-ace-compressed": ["ace"], "application/x-apple-diskimage": ["*dmg"], "application/x-arj": ["arj"], "application/x-authorware-bin": ["aab", "x32", "u32", "vox"], "application/x-authorware-map": ["aam"], "application/x-authorware-seg": ["aas"], "application/x-bcpio": ["bcpio"], "application/x-bdoc": ["*bdoc"], "application/x-bittorrent": ["torrent"], "application/x-blorb": ["blb", "blorb"], "application/x-bzip": ["bz"], "application/x-bzip2": ["bz2", "boz"], "application/x-cbr": ["cbr", "cba", "cbt", "cbz", "cb7"], "application/x-cdlink": ["vcd"], "application/x-cfs-compressed": ["cfs"], "application/x-chat": ["chat"], "application/x-chess-pgn": ["pgn"], "application/x-chrome-extension": ["crx"], "application/x-cocoa": ["cco"], "application/x-conference": ["nsc"], "application/x-cpio": ["cpio"], "application/x-csh": ["csh"], "application/x-debian-package": ["*deb", "udeb"], "application/x-dgc-compressed": ["dgc"], "application/x-director": ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"], "application/x-doom": ["wad"], "application/x-dtbncx+xml": ["ncx"], "application/x-dtbook+xml": ["dtb"], "application/x-dtbresource+xml": ["res"], "application/x-dvi": ["dvi"], "application/x-envoy": ["evy"], "application/x-eva": ["eva"], "application/x-font-bdf": ["bdf"], "application/x-font-ghostscript": ["gsf"], "application/x-font-linux-psf": ["psf"], "application/x-font-pcf": ["pcf"], "application/x-font-snf": ["snf"], "application/x-font-type1": ["pfa", "pfb", "pfm", "afm"], "application/x-freearc": ["arc"], "application/x-futuresplash": ["spl"], "application/x-gca-compressed": ["gca"], "application/x-glulx": ["ulx"], "application/x-gnumeric": ["gnumeric"], "application/x-gramps-xml": ["gramps"], "application/x-gtar": ["gtar"], "application/x-hdf": ["hdf"], "application/x-httpd-php": ["php"], "application/x-install-instructions": ["install"], "application/x-iso9660-image": ["*iso"], "application/x-iwork-keynote-sffkey": ["*key"], "application/x-iwork-numbers-sffnumbers": ["*numbers"], "application/x-iwork-pages-sffpages": ["*pages"], "application/x-java-archive-diff": ["jardiff"], "application/x-java-jnlp-file": ["jnlp"], "application/x-keepass2": ["kdbx"], "application/x-latex": ["latex"], "application/x-lua-bytecode": ["luac"], "application/x-lzh-compressed": ["lzh", "lha"], "application/x-makeself": ["run"], "application/x-mie": ["mie"], "application/x-mobipocket-ebook": ["prc", "mobi"], "application/x-ms-application": ["application"], "application/x-ms-shortcut": ["lnk"], "application/x-ms-wmd": ["wmd"], "application/x-ms-wmz": ["wmz"], "application/x-ms-xbap": ["xbap"], "application/x-msaccess": ["mdb"], "application/x-msbinder": ["obd"], "application/x-mscardfile": ["crd"], "application/x-msclip": ["clp"], "application/x-msdos-program": ["*exe"], "application/x-msdownload": ["*exe", "*dll", "com", "bat", "*msi"], "application/x-msmediaview": ["mvb", "m13", "m14"], "application/x-msmetafile": ["*wmf", "*wmz", "*emf", "emz"], "application/x-msmoney": ["mny"], "application/x-mspublisher": ["pub"], "application/x-msschedule": ["scd"], "application/x-msterminal": ["trm"], "application/x-mswrite": ["wri"], "application/x-netcdf": ["nc", "cdf"], "application/x-ns-proxy-autoconfig": ["pac"], "application/x-nzb": ["nzb"], "application/x-perl": ["pl", "pm"], "application/x-pilot": ["*prc", "*pdb"], "application/x-pkcs12": ["p12", "pfx"], "application/x-pkcs7-certificates": ["p7b", "spc"], "application/x-pkcs7-certreqresp": ["p7r"], "application/x-rar-compressed": ["*rar"], "application/x-redhat-package-manager": ["rpm"], "application/x-research-info-systems": ["ris"], "application/x-sea": ["sea"], "application/x-sh": ["sh"], "application/x-shar": ["shar"], "application/x-shockwave-flash": ["swf"], "application/x-silverlight-app": ["xap"], "application/x-sql": ["sql"], "application/x-stuffit": ["sit"], "application/x-stuffitx": ["sitx"], "application/x-subrip": ["srt"], "application/x-sv4cpio": ["sv4cpio"], "application/x-sv4crc": ["sv4crc"], "application/x-t3vm-image": ["t3"], "application/x-tads": ["gam"], "application/x-tar": ["tar"], "application/x-tcl": ["tcl", "tk"], "application/x-tex": ["tex"], "application/x-tex-tfm": ["tfm"], "application/x-texinfo": ["texinfo", "texi"], "application/x-tgif": ["*obj"], "application/x-ustar": ["ustar"], "application/x-virtualbox-hdd": ["hdd"], "application/x-virtualbox-ova": ["ova"], "application/x-virtualbox-ovf": ["ovf"], "application/x-virtualbox-vbox": ["vbox"], "application/x-virtualbox-vbox-extpack": ["vbox-extpack"], "application/x-virtualbox-vdi": ["vdi"], "application/x-virtualbox-vhd": ["vhd"], "application/x-virtualbox-vmdk": ["vmdk"], "application/x-wais-source": ["src"], "application/x-web-app-manifest+json": ["webapp"], "application/x-x509-ca-cert": ["der", "crt", "pem"], "application/x-xfig": ["fig"], "application/x-xliff+xml": ["*xlf"], "application/x-xpinstall": ["xpi"], "application/x-xz": ["xz"], "application/x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"], "audio/vnd.dece.audio": ["uva", "uvva"], "audio/vnd.digital-winds": ["eol"], "audio/vnd.dra": ["dra"], "audio/vnd.dts": ["dts"], "audio/vnd.dts.hd": ["dtshd"], "audio/vnd.lucent.voice": ["lvp"], "audio/vnd.ms-playready.media.pya": ["pya"], "audio/vnd.nuera.ecelp4800": ["ecelp4800"], "audio/vnd.nuera.ecelp7470": ["ecelp7470"], "audio/vnd.nuera.ecelp9600": ["ecelp9600"], "audio/vnd.rip": ["rip"], "audio/x-aac": ["aac"], "audio/x-aiff": ["aif", "aiff", "aifc"], "audio/x-caf": ["caf"], "audio/x-flac": ["flac"], "audio/x-m4a": ["*m4a"], "audio/x-matroska": ["mka"], "audio/x-mpegurl": ["m3u"], "audio/x-ms-wax": ["wax"], "audio/x-ms-wma": ["wma"], "audio/x-pn-realaudio": ["ram", "ra"], "audio/x-pn-realaudio-plugin": ["rmp"], "audio/x-realaudio": ["*ra"], "audio/x-wav": ["*wav"], "chemical/x-cdx": ["cdx"], "chemical/x-cif": ["cif"], "chemical/x-cmdf": ["cmdf"], "chemical/x-cml": ["cml"], "chemical/x-csml": ["csml"], "chemical/x-xyz": ["xyz"], "image/prs.btif": ["btif"], "image/prs.pti": ["pti"], "image/vnd.adobe.photoshop": ["psd"], "image/vnd.airzip.accelerator.azv": ["azv"], "image/vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"], "image/vnd.djvu": ["djvu", "djv"], "image/vnd.dvb.subtitle": ["*sub"], "image/vnd.dwg": ["dwg"], "image/vnd.dxf": ["dxf"], "image/vnd.fastbidsheet": ["fbs"], "image/vnd.fpx": ["fpx"], "image/vnd.fst": ["fst"], "image/vnd.fujixerox.edmics-mmr": ["mmr"], "image/vnd.fujixerox.edmics-rlc": ["rlc"], "image/vnd.microsoft.icon": ["ico"], "image/vnd.ms-dds": ["dds"], "image/vnd.ms-modi": ["mdi"], "image/vnd.ms-photo": ["wdp"], "image/vnd.net-fpx": ["npx"], "image/vnd.pco.b16": ["b16"], "image/vnd.tencent.tap": ["tap"], "image/vnd.valve.source.texture": ["vtf"], "image/vnd.wap.wbmp": ["wbmp"], "image/vnd.xiff": ["xif"], "image/vnd.zbrush.pcx": ["pcx"], "image/x-3ds": ["3ds"], "image/x-cmu-raster": ["ras"], "image/x-cmx": ["cmx"], "image/x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"], "image/x-icon": ["*ico"], "image/x-jng": ["jng"], "image/x-mrsid-image": ["sid"], "image/x-ms-bmp": ["*bmp"], "image/x-pcx": ["*pcx"], "image/x-pict": ["pic", "pct"], "image/x-portable-anymap": ["pnm"], "image/x-portable-bitmap": ["pbm"], "image/x-portable-graymap": ["pgm"], "image/x-portable-pixmap": ["ppm"], "image/x-rgb": ["rgb"], "image/x-tga": ["tga"], "image/x-xbitmap": ["xbm"], "image/x-xpixmap": ["xpm"], "image/x-xwindowdump": ["xwd"], "message/vnd.wfa.wsc": ["wsc"], "model/vnd.collada+xml": ["dae"], "model/vnd.dwf": ["dwf"], "model/vnd.gdl": ["gdl"], "model/vnd.gtw": ["gtw"], "model/vnd.mts": ["mts"], "model/vnd.opengex": ["ogex"], "model/vnd.parasolid.transmit.binary": ["x_b"], "model/vnd.parasolid.transmit.text": ["x_t"], "model/vnd.sap.vds": ["vds"], "model/vnd.usdz+zip": ["usdz"], "model/vnd.valve.source.compiled-map": ["bsp"], "model/vnd.vtu": ["vtu"], "text/prs.lines.tag": ["dsc"], "text/vnd.curl": ["curl"], "text/vnd.curl.dcurl": ["dcurl"], "text/vnd.curl.mcurl": ["mcurl"], "text/vnd.curl.scurl": ["scurl"], "text/vnd.dvb.subtitle": ["sub"], "text/vnd.fly": ["fly"], "text/vnd.fmi.flexstor": ["flx"], "text/vnd.graphviz": ["gv"], "text/vnd.in3d.3dml": ["3dml"], "text/vnd.in3d.spot": ["spot"], "text/vnd.sun.j2me.app-descriptor": ["jad"], "text/vnd.wap.wml": ["wml"], "text/vnd.wap.wmlscript": ["wmls"], "text/x-asm": ["s", "asm"], "text/x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"], "text/x-component": ["htc"], "text/x-fortran": ["f", "for", "f77", "f90"], "text/x-handlebars-template": ["hbs"], "text/x-java-source": ["java"], "text/x-lua": ["lua"], "text/x-markdown": ["mkd"], "text/x-nfo": ["nfo"], "text/x-opml": ["opml"], "text/x-org": ["*org"], "text/x-pascal": ["p", "pas"], "text/x-processing": ["pde"], "text/x-sass": ["sass"], "text/x-scss": ["scss"], "text/x-setext": ["etx"], "text/x-sfv": ["sfv"], "text/x-suse-ymp": ["ymp"], "text/x-uuencode": ["uu"], "text/x-vcalendar": ["vcs"], "text/x-vcard": ["vcf"], "video/vnd.dece.hd": ["uvh", "uvvh"], "video/vnd.dece.mobile": ["uvm", "uvvm"], "video/vnd.dece.pd": ["uvp", "uvvp"], "video/vnd.dece.sd": ["uvs", "uvvs"], "video/vnd.dece.video": ["uvv", "uvvv"], "video/vnd.dvb.file": ["dvb"], "video/vnd.fvt": ["fvt"], "video/vnd.mpegurl": ["mxu", "m4u"], "video/vnd.ms-playready.media.pyv": ["pyv"], "video/vnd.uvvu.mp4": ["uvu", "uvvu"], "video/vnd.vivo": ["viv"], "video/x-f4v": ["f4v"], "video/x-fli": ["fli"], "video/x-flv": ["flv"], "video/x-m4v": ["m4v"], "video/x-matroska": ["mkv", "mk3d", "mks"], "video/x-mng": ["mng"], "video/x-ms-asf": ["asf", "asx"], "video/x-ms-vob": ["vob"], "video/x-ms-wm": ["wm"], "video/x-ms-wmv": ["wmv"], "video/x-ms-wmx": ["wmx"], "video/x-ms-wvx": ["wvx"], "video/x-msvideo": ["avi"], "video/x-sgi-movie": ["movie"], "video/x-smv": ["smv"], "x-conference/x-cooltalk": ["ice"] };
|
|
1395
|
+
let za = ya;
|
|
1396
|
+
var Ma = new za(ka, ja);
|
|
1397
|
+
const Ca = /* @__PURE__ */ wa(Ma);
|
|
1398
|
+
function Da(t) {
|
|
1399
|
+
return Object.prototype.toString.call(t).slice(8, -1).toLowerCase();
|
|
1400
|
+
}
|
|
1401
|
+
function ki(t) {
|
|
1402
|
+
return Da(t) === "object";
|
|
1403
|
+
}
|
|
1404
|
+
const ji = typeof window < "u";
|
|
1405
|
+
ji && navigator.userAgent.toLowerCase();
|
|
1406
|
+
function Aa(t) {
|
|
1407
|
+
return t.startsWith("data") && t.includes("base64") ? t.split(",")[0].replace(/data:(.*);base64/, "$1") : Ca.getType(t) || "";
|
|
1408
|
+
}
|
|
1409
|
+
function zi({ type: t, id: a, resource: i }) {
|
|
1410
|
+
return new Promise((e, n) => {
|
|
1411
|
+
if (!ji || document.querySelector(a)) {
|
|
1412
|
+
n();
|
|
1413
|
+
return;
|
|
1414
|
+
}
|
|
1415
|
+
function o(p) {
|
|
1416
|
+
p.addEventListener("load", e), p.addEventListener("error", n), p.addEventListener("abort", n);
|
|
1417
|
+
}
|
|
1418
|
+
switch (t) {
|
|
1419
|
+
case "js": {
|
|
1420
|
+
const p = document.createElement("script");
|
|
1421
|
+
p.async = !0, p.src = i, o(p), document.head.appendChild(p);
|
|
1422
|
+
break;
|
|
1423
|
+
}
|
|
1424
|
+
case "css": {
|
|
1425
|
+
const p = document.createElement("link");
|
|
1426
|
+
p.id = a, p.rel = "stylesheet", p.href = i, o(p), document.head.appendChild(p);
|
|
1427
|
+
break;
|
|
1428
|
+
}
|
|
1429
|
+
case "style": {
|
|
1430
|
+
const p = document.createElement("style");
|
|
1431
|
+
p.id = a, o(p), document.head.appendChild(p), p.appendChild(document.createTextNode(i));
|
|
1432
|
+
break;
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
});
|
|
1436
|
+
}
|
|
1437
|
+
function Ba() {
|
|
1438
|
+
return process.env.NODE_ENV;
|
|
1439
|
+
}
|
|
1440
|
+
Ba();
|
|
1441
|
+
function qt(t) {
|
|
1442
|
+
return process.env.NODE_ENV === t;
|
|
1443
|
+
}
|
|
1444
|
+
qt("development");
|
|
1445
|
+
qt("test");
|
|
1446
|
+
qt("production");
|
|
1447
|
+
function ei({
|
|
1448
|
+
mode: t,
|
|
1449
|
+
dataURI: a
|
|
1450
|
+
}) {
|
|
1451
|
+
return t === "round" ? "image/png" : Aa(a);
|
|
1452
|
+
}
|
|
1453
|
+
function ni(t) {
|
|
1454
|
+
const a = document.createElement("canvas"), i = a.getContext("2d");
|
|
1455
|
+
if (!i)
|
|
1456
|
+
return a;
|
|
1457
|
+
const { width: e, height: n } = t;
|
|
1458
|
+
return a.width = e, a.height = n, i.imageSmoothingEnabled = !0, i.drawImage(t, 0, 0, e, n), i.globalCompositeOperation = "destination-in", i.beginPath(), i.arc(
|
|
1459
|
+
e / 2,
|
|
1460
|
+
n / 2,
|
|
1461
|
+
Math.min(e, n) / 2,
|
|
1462
|
+
0,
|
|
1463
|
+
2 * Math.PI,
|
|
1464
|
+
!0
|
|
1465
|
+
), i.fill(), a;
|
|
1466
|
+
}
|
|
1467
|
+
function oi(t, a = {}) {
|
|
1468
|
+
if (!ki(t))
|
|
1469
|
+
return a;
|
|
1470
|
+
const { mode: i, width: e, height: n } = t;
|
|
1471
|
+
switch (i) {
|
|
1472
|
+
case "fixedSize":
|
|
1473
|
+
case "round": {
|
|
1474
|
+
a.width = e, a.height = n;
|
|
1475
|
+
break;
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
return a;
|
|
1479
|
+
}
|
|
1480
|
+
const Ea = {
|
|
1481
|
+
/**
|
|
1482
|
+
* The source of the image to be cropped
|
|
1483
|
+
* @description The value of the `src` attribute of `<img src="" />`
|
|
1484
|
+
*/
|
|
1485
|
+
img: {
|
|
1486
|
+
type: String,
|
|
1487
|
+
required: !0,
|
|
1488
|
+
default: ""
|
|
1489
|
+
},
|
|
1490
|
+
/**
|
|
1491
|
+
* Style Sheet for Crop Box
|
|
1492
|
+
*/
|
|
1493
|
+
boxStyle: {
|
|
1494
|
+
type: Object,
|
|
1495
|
+
required: !1,
|
|
1496
|
+
default: () => ({})
|
|
1497
|
+
},
|
|
1498
|
+
/**
|
|
1499
|
+
* Options for cropperjs
|
|
1500
|
+
* @see https://github.com/fengyuanchen/cropperjs#options
|
|
1501
|
+
*/
|
|
1502
|
+
options: {
|
|
1503
|
+
type: Object,
|
|
1504
|
+
required: !1,
|
|
1505
|
+
default: () => ({})
|
|
1506
|
+
},
|
|
1507
|
+
/**
|
|
1508
|
+
* Some preset modes provided by this plugin
|
|
1509
|
+
*/
|
|
1510
|
+
presetMode: {
|
|
1511
|
+
type: Object,
|
|
1512
|
+
required: !1,
|
|
1513
|
+
default: () => ({})
|
|
1514
|
+
}
|
|
1515
|
+
}, Oa = `/*!
|
|
1516
|
+
* Cropper.js v1.6.1
|
|
1517
|
+
* https://fengyuanchen.github.io/cropperjs
|
|
1518
|
+
*
|
|
1519
|
+
* Copyright 2015-present Chen Fengyuan
|
|
1520
|
+
* Released under the MIT license
|
|
1521
|
+
*
|
|
1522
|
+
* Date: 2023-09-17T03:44:17.565Z
|
|
1523
|
+
*/.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-wrap-box,.cropper-canvas,.cropper-drag-box,.cropper-crop-box,.cropper-modal{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-wrap-box,.cropper-canvas{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:calc(100% / 3);left:0;top:calc(100% / 3);width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:calc(100% / 3);top:0;width:calc(100% / 3)}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:before,.cropper-center:after{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width: 768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width: 992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width: 1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}
|
|
1524
|
+
`, Ta = `.vue--picture-cropper__wrap{width:100%;height:100%;margin:0}.vue--picture-cropper__img{display:block;width:auto;height:auto;max-width:100%;max-height:100%}.vue--picture-cropper__wrap-round .cropper-view-box,.vue--picture-cropper__wrap-round .cropper-face{border-radius:50%}
|
|
1525
|
+
`;
|
|
1526
|
+
zi({
|
|
1527
|
+
type: "style",
|
|
1528
|
+
id: "cropperjs",
|
|
1529
|
+
resource: Oa
|
|
1530
|
+
}).catch((t) => {
|
|
1531
|
+
console.log(t);
|
|
1532
|
+
});
|
|
1533
|
+
zi({
|
|
1534
|
+
type: "style",
|
|
1535
|
+
id: "vue-picture-cropper",
|
|
1536
|
+
resource: Ta
|
|
1537
|
+
}).catch((t) => {
|
|
1538
|
+
console.log(t);
|
|
1539
|
+
});
|
|
1540
|
+
let O;
|
|
1541
|
+
const Na = /* @__PURE__ */ Di({
|
|
1542
|
+
name: "VuePictureCropper",
|
|
1543
|
+
props: Ea,
|
|
1544
|
+
setup(t) {
|
|
1545
|
+
const a = St(), i = St("");
|
|
1546
|
+
async function e() {
|
|
1547
|
+
await Ei();
|
|
1548
|
+
const c = window.setInterval(() => {
|
|
1549
|
+
if (a.value)
|
|
1550
|
+
try {
|
|
1551
|
+
O = new yi(a.value, t.options), window.clearInterval(c), o(), i.value = ei({
|
|
1552
|
+
mode: t.presetMode.mode,
|
|
1553
|
+
dataURI: t.img
|
|
1554
|
+
}), a.value.addEventListener("ready", () => {
|
|
1555
|
+
n();
|
|
1556
|
+
});
|
|
1557
|
+
} catch (r) {
|
|
1558
|
+
console.log(r);
|
|
1559
|
+
}
|
|
1560
|
+
}, 10);
|
|
1561
|
+
}
|
|
1562
|
+
function n() {
|
|
1563
|
+
if (!ki(t.presetMode))
|
|
1564
|
+
return;
|
|
1565
|
+
const {
|
|
1566
|
+
mode: c,
|
|
1567
|
+
width: r,
|
|
1568
|
+
height: d
|
|
1569
|
+
} = t.presetMode;
|
|
1570
|
+
switch (c) {
|
|
1571
|
+
case "fixedSize":
|
|
1572
|
+
case "round": {
|
|
1573
|
+
O.setCropBoxData({
|
|
1574
|
+
width: r,
|
|
1575
|
+
height: d
|
|
1576
|
+
});
|
|
1577
|
+
break;
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
function o() {
|
|
1582
|
+
O.getDataURL = p, O.getBlob = s, O.getFile = l;
|
|
1583
|
+
}
|
|
1584
|
+
function p(c = {}) {
|
|
1585
|
+
c = oi(t.presetMode, c);
|
|
1586
|
+
try {
|
|
1587
|
+
let r = O.getCroppedCanvas(c);
|
|
1588
|
+
return t.presetMode.mode === "round" && (r = ni(r)), r.toDataURL(i.value);
|
|
1589
|
+
} catch {
|
|
1590
|
+
return "";
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1593
|
+
async function s(c = {}) {
|
|
1594
|
+
return c = oi(t.presetMode, c), new Promise((r) => {
|
|
1595
|
+
try {
|
|
1596
|
+
let d = O.getCroppedCanvas(c);
|
|
1597
|
+
t.presetMode.mode === "round" && (d = ni(d)), d.toBlob((v) => {
|
|
1598
|
+
r(v);
|
|
1599
|
+
}, i.value);
|
|
1600
|
+
} catch {
|
|
1601
|
+
r(null);
|
|
1602
|
+
}
|
|
1603
|
+
});
|
|
1604
|
+
}
|
|
1605
|
+
async function l(c = {}) {
|
|
1606
|
+
const {
|
|
1607
|
+
fileName: r
|
|
1608
|
+
} = c, d = i.value.replace(/image\//, ""), v = r ? `${r}.${d}` : `cropped-${Date.now()}.${d}`, h = await s(c);
|
|
1609
|
+
return h ? new File([h], v, {
|
|
1610
|
+
type: i.value
|
|
1611
|
+
}) : null;
|
|
1612
|
+
}
|
|
1613
|
+
return Ai(() => t.img, async () => {
|
|
1614
|
+
if (!O) {
|
|
1615
|
+
await e();
|
|
1616
|
+
return;
|
|
1617
|
+
}
|
|
1618
|
+
try {
|
|
1619
|
+
O.replace(t.img), i.value = ei({
|
|
1620
|
+
mode: t.presetMode.mode,
|
|
1621
|
+
dataURI: t.img
|
|
1622
|
+
}), o();
|
|
1623
|
+
} catch (c) {
|
|
1624
|
+
console.log(c);
|
|
1625
|
+
}
|
|
1626
|
+
}, {
|
|
1627
|
+
immediate: !0
|
|
1628
|
+
}), Bi(() => {
|
|
1629
|
+
O && (O.destroy(), O = null);
|
|
1630
|
+
}), () => Xt("div", {
|
|
1631
|
+
class: `vue--picture-cropper__wrap ${t.presetMode.mode === "round" ? "vue--picture-cropper__wrap-round" : ""}`,
|
|
1632
|
+
style: t.boxStyle
|
|
1633
|
+
}, [Xt("img", {
|
|
1634
|
+
ref: a,
|
|
1635
|
+
class: "vue--picture-cropper__img",
|
|
1636
|
+
src: t.img
|
|
1637
|
+
}, null)]);
|
|
1638
|
+
}
|
|
1639
|
+
});
|
|
1640
|
+
export {
|
|
1641
|
+
O as cropper,
|
|
1642
|
+
Na as default
|
|
1643
|
+
};
|