@loopr-ai/craft 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1598 @@
1
+ import ui, { jsx as P, jsxs as Li } from "react/jsx-runtime";
2
+ import * as L from "react";
3
+ import D, { useRef as K, useImperativeHandle as Ce, useEffect as di, useContext as fi } from "react";
4
+ import { r as pi, i as vi } from "../../../createSvgIcon-3bff5571.js";
5
+ import { _ as w, P as p, h as we, c as z, a as mi, g as ci, e as ti } from "../../../createTheme-f511f0cd.js";
6
+ import { h as ye, i as Pe, c as hi, b as gi, g as ji, s as q, a as bi } from "../../../styled-9f5c49f8.js";
7
+ import { B as Te } from "../../../ButtonBase-83dd7164.js";
8
+ import { c as Ye } from "../../../chainPropTypes-004bf492.js";
9
+ const Ae = ye(), Xe = Ae, ze = ["className", "component", "disableGutters", "fixed", "maxWidth", "classes"], _e = we(), Oe = Xe("div", {
10
+ name: "MuiContainer",
11
+ slot: "Root",
12
+ overridesResolver: (i, o) => {
13
+ const {
14
+ ownerState: e
15
+ } = i;
16
+ return [o.root, o[`maxWidth${z(String(e.maxWidth))}`], e.fixed && o.fixed, e.disableGutters && o.disableGutters];
17
+ }
18
+ }), We = (i) => Pe({
19
+ props: i,
20
+ name: "MuiContainer",
21
+ defaultTheme: _e
22
+ }), Ee = (i, o) => {
23
+ const e = (l) => ci(o, l), {
24
+ classes: r,
25
+ fixed: n,
26
+ disableGutters: a,
27
+ maxWidth: t
28
+ } = i, s = {
29
+ root: ["root", t && `maxWidth${z(String(t))}`, n && "fixed", a && "disableGutters"]
30
+ };
31
+ return gi(s, e, r);
32
+ };
33
+ function De(i = {}) {
34
+ const {
35
+ // This will allow adding custom styled fn (for example for custom sx style function)
36
+ createStyledComponent: o = Oe,
37
+ useThemeProps: e = We,
38
+ componentName: r = "MuiContainer"
39
+ } = i, n = o(({
40
+ theme: t,
41
+ ownerState: s
42
+ }) => w({
43
+ width: "100%",
44
+ marginLeft: "auto",
45
+ boxSizing: "border-box",
46
+ marginRight: "auto",
47
+ display: "block"
48
+ }, !s.disableGutters && {
49
+ paddingLeft: t.spacing(2),
50
+ paddingRight: t.spacing(2),
51
+ // @ts-ignore module augmentation fails if custom breakpoints are used
52
+ [t.breakpoints.up("sm")]: {
53
+ paddingLeft: t.spacing(3),
54
+ paddingRight: t.spacing(3)
55
+ }
56
+ }), ({
57
+ theme: t,
58
+ ownerState: s
59
+ }) => s.fixed && Object.keys(t.breakpoints.values).reduce((l, d) => {
60
+ const u = d, f = t.breakpoints.values[u];
61
+ return f !== 0 && (l[t.breakpoints.up(u)] = {
62
+ maxWidth: `${f}${t.breakpoints.unit}`
63
+ }), l;
64
+ }, {}), ({
65
+ theme: t,
66
+ ownerState: s
67
+ }) => w({}, s.maxWidth === "xs" && {
68
+ // @ts-ignore module augmentation fails if custom breakpoints are used
69
+ [t.breakpoints.up("xs")]: {
70
+ // @ts-ignore module augmentation fails if custom breakpoints are used
71
+ maxWidth: Math.max(t.breakpoints.values.xs, 444)
72
+ }
73
+ }, s.maxWidth && // @ts-ignore module augmentation fails if custom breakpoints are used
74
+ s.maxWidth !== "xs" && {
75
+ // @ts-ignore module augmentation fails if custom breakpoints are used
76
+ [t.breakpoints.up(s.maxWidth)]: {
77
+ // @ts-ignore module augmentation fails if custom breakpoints are used
78
+ maxWidth: `${t.breakpoints.values[s.maxWidth]}${t.breakpoints.unit}`
79
+ }
80
+ })), a = /* @__PURE__ */ L.forwardRef(function(s, l) {
81
+ const d = e(s), {
82
+ className: u,
83
+ component: f = "div",
84
+ disableGutters: v = !1,
85
+ fixed: m = !1,
86
+ maxWidth: c = "lg"
87
+ } = d, h = mi(d, ze), g = w({}, d, {
88
+ component: f,
89
+ disableGutters: v,
90
+ fixed: m,
91
+ maxWidth: c
92
+ }), y = Ee(g, r);
93
+ return (
94
+ // @ts-ignore theme is injected by the styled util
95
+ /* @__PURE__ */ P(n, w({
96
+ as: f,
97
+ ownerState: g,
98
+ className: hi(y.root, u),
99
+ ref: l
100
+ }, h))
101
+ );
102
+ });
103
+ return process.env.NODE_ENV !== "production" && (a.propTypes = {
104
+ children: p.node,
105
+ classes: p.object,
106
+ className: p.string,
107
+ component: p.elementType,
108
+ disableGutters: p.bool,
109
+ fixed: p.bool,
110
+ maxWidth: p.oneOfType([p.oneOf(["xs", "sm", "md", "lg", "xl", !1]), p.string]),
111
+ sx: p.oneOfType([p.arrayOf(p.oneOfType([p.func, p.object, p.bool])), p.func, p.object])
112
+ }), a;
113
+ }
114
+ function Ne(i) {
115
+ return ci("MuiIconButton", i);
116
+ }
117
+ const Re = ji("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge"]), ke = Re, Be = ["edge", "children", "className", "color", "disabled", "disableFocusRipple", "size"], Me = (i) => {
118
+ const {
119
+ classes: o,
120
+ disabled: e,
121
+ color: r,
122
+ edge: n,
123
+ size: a
124
+ } = i, t = {
125
+ root: ["root", e && "disabled", r !== "default" && `color${z(r)}`, n && `edge${z(n)}`, `size${z(a)}`]
126
+ };
127
+ return gi(t, Ne, o);
128
+ }, Ze = q(Te, {
129
+ name: "MuiIconButton",
130
+ slot: "Root",
131
+ overridesResolver: (i, o) => {
132
+ const {
133
+ ownerState: e
134
+ } = i;
135
+ return [o.root, e.color !== "default" && o[`color${z(e.color)}`], e.edge && o[`edge${z(e.edge)}`], o[`size${z(e.size)}`]];
136
+ }
137
+ })(({
138
+ theme: i,
139
+ ownerState: o
140
+ }) => w({
141
+ textAlign: "center",
142
+ flex: "0 0 auto",
143
+ fontSize: i.typography.pxToRem(24),
144
+ padding: 8,
145
+ borderRadius: "50%",
146
+ overflow: "visible",
147
+ // Explicitly set the default value to solve a bug on IE11.
148
+ color: (i.vars || i).palette.action.active,
149
+ transition: i.transitions.create("background-color", {
150
+ duration: i.transitions.duration.shortest
151
+ })
152
+ }, !o.disableRipple && {
153
+ "&:hover": {
154
+ backgroundColor: i.vars ? `rgba(${i.vars.palette.action.activeChannel} / ${i.vars.palette.action.hoverOpacity})` : ti(i.palette.action.active, i.palette.action.hoverOpacity),
155
+ // Reset on touch devices, it doesn't add specificity
156
+ "@media (hover: none)": {
157
+ backgroundColor: "transparent"
158
+ }
159
+ }
160
+ }, o.edge === "start" && {
161
+ marginLeft: o.size === "small" ? -3 : -12
162
+ }, o.edge === "end" && {
163
+ marginRight: o.size === "small" ? -3 : -12
164
+ }), ({
165
+ theme: i,
166
+ ownerState: o
167
+ }) => {
168
+ var e;
169
+ const r = (e = (i.vars || i).palette) == null ? void 0 : e[o.color];
170
+ return w({}, o.color === "inherit" && {
171
+ color: "inherit"
172
+ }, o.color !== "inherit" && o.color !== "default" && w({
173
+ color: r == null ? void 0 : r.main
174
+ }, !o.disableRipple && {
175
+ "&:hover": w({}, r && {
176
+ backgroundColor: i.vars ? `rgba(${r.mainChannel} / ${i.vars.palette.action.hoverOpacity})` : ti(r.main, i.palette.action.hoverOpacity)
177
+ }, {
178
+ // Reset on touch devices, it doesn't add specificity
179
+ "@media (hover: none)": {
180
+ backgroundColor: "transparent"
181
+ }
182
+ })
183
+ }), o.size === "small" && {
184
+ padding: 5,
185
+ fontSize: i.typography.pxToRem(18)
186
+ }, o.size === "large" && {
187
+ padding: 12,
188
+ fontSize: i.typography.pxToRem(28)
189
+ }, {
190
+ [`&.${ke.disabled}`]: {
191
+ backgroundColor: "transparent",
192
+ color: (i.vars || i).palette.action.disabled
193
+ }
194
+ });
195
+ }), Vi = /* @__PURE__ */ L.forwardRef(function(o, e) {
196
+ const r = bi({
197
+ props: o,
198
+ name: "MuiIconButton"
199
+ }), {
200
+ edge: n = !1,
201
+ children: a,
202
+ className: t,
203
+ color: s = "default",
204
+ disabled: l = !1,
205
+ disableFocusRipple: d = !1,
206
+ size: u = "medium"
207
+ } = r, f = mi(r, Be), v = w({}, r, {
208
+ edge: n,
209
+ color: s,
210
+ disabled: l,
211
+ disableFocusRipple: d,
212
+ size: u
213
+ }), m = Me(v);
214
+ return /* @__PURE__ */ P(Ze, w({
215
+ className: hi(m.root, t),
216
+ centerRipple: !0,
217
+ focusRipple: !d,
218
+ disabled: l,
219
+ ref: e,
220
+ ownerState: v
221
+ }, f, {
222
+ children: a
223
+ }));
224
+ });
225
+ process.env.NODE_ENV !== "production" && (Vi.propTypes = {
226
+ // ----------------------------- Warning --------------------------------
227
+ // | These PropTypes are generated from the TypeScript type definitions |
228
+ // | To update them edit the d.ts file and run "yarn proptypes" |
229
+ // ----------------------------------------------------------------------
230
+ /**
231
+ * The icon to display.
232
+ */
233
+ children: Ye(p.node, (i) => L.Children.toArray(i.children).some((e) => /* @__PURE__ */ L.isValidElement(e) && e.props.onClick) ? new Error(["MUI: You are providing an onClick event listener to a child of a button element.", "Prefer applying it to the IconButton directly.", "This guarantees that the whole <button> will be responsive to click events."].join(`
234
+ `)) : null),
235
+ /**
236
+ * Override or extend the styles applied to the component.
237
+ */
238
+ classes: p.object,
239
+ /**
240
+ * @ignore
241
+ */
242
+ className: p.string,
243
+ /**
244
+ * The color of the component.
245
+ * It supports both default and custom theme colors, which can be added as shown in the
246
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
247
+ * @default 'default'
248
+ */
249
+ color: p.oneOfType([p.oneOf(["inherit", "default", "primary", "secondary", "error", "info", "success", "warning"]), p.string]),
250
+ /**
251
+ * If `true`, the component is disabled.
252
+ * @default false
253
+ */
254
+ disabled: p.bool,
255
+ /**
256
+ * If `true`, the keyboard focus ripple is disabled.
257
+ * @default false
258
+ */
259
+ disableFocusRipple: p.bool,
260
+ /**
261
+ * If `true`, the ripple effect is disabled.
262
+ *
263
+ * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
264
+ * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
265
+ * @default false
266
+ */
267
+ disableRipple: p.bool,
268
+ /**
269
+ * If given, uses a negative margin to counteract the padding on one
270
+ * side (this is often helpful for aligning the left or right
271
+ * side of the icon with content above or below, without ruining the border
272
+ * size and shape).
273
+ * @default false
274
+ */
275
+ edge: p.oneOf(["end", "start", !1]),
276
+ /**
277
+ * The size of the component.
278
+ * `small` is equivalent to the dense button styling.
279
+ * @default 'medium'
280
+ */
281
+ size: p.oneOfType([p.oneOf(["small", "medium", "large"]), p.string]),
282
+ /**
283
+ * The system prop that allows defining system overrides as well as additional CSS styles.
284
+ */
285
+ sx: p.oneOfType([p.arrayOf(p.oneOfType([p.func, p.object, p.bool])), p.func, p.object])
286
+ });
287
+ const ri = Vi, Hi = De({
288
+ createStyledComponent: q("div", {
289
+ name: "MuiContainer",
290
+ slot: "Root",
291
+ overridesResolver: (i, o) => {
292
+ const {
293
+ ownerState: e
294
+ } = i;
295
+ return [o.root, o[`maxWidth${z(String(e.maxWidth))}`], e.fixed && o.fixed, e.disableGutters && o.disableGutters];
296
+ }
297
+ }),
298
+ useThemeProps: (i) => bi({
299
+ props: i,
300
+ name: "MuiContainer"
301
+ })
302
+ });
303
+ process.env.NODE_ENV !== "production" && (Hi.propTypes = {
304
+ // ----------------------------- Warning --------------------------------
305
+ // | These PropTypes are generated from the TypeScript type definitions |
306
+ // | To update them edit the d.ts file and run "yarn proptypes" |
307
+ // ----------------------------------------------------------------------
308
+ /**
309
+ * @ignore
310
+ */
311
+ children: p.node,
312
+ /**
313
+ * Override or extend the styles applied to the component.
314
+ */
315
+ classes: p.object,
316
+ /**
317
+ * The component used for the root node.
318
+ * Either a string to use a HTML element or a component.
319
+ */
320
+ component: p.elementType,
321
+ /**
322
+ * If `true`, the left and right padding is removed.
323
+ * @default false
324
+ */
325
+ disableGutters: p.bool,
326
+ /**
327
+ * Set the max-width to match the min-width of the current breakpoint.
328
+ * This is useful if you'd prefer to design for a fixed set of sizes
329
+ * instead of trying to accommodate a fully fluid viewport.
330
+ * It's fluid by default.
331
+ * @default false
332
+ */
333
+ fixed: p.bool,
334
+ /**
335
+ * Determine the max-width of the container.
336
+ * The container width grows with the size of the screen.
337
+ * Set to `false` to disable `maxWidth`.
338
+ * @default 'lg'
339
+ */
340
+ maxWidth: p.oneOfType([p.oneOf(["xs", "sm", "md", "lg", "xl", !1]), p.string]),
341
+ /**
342
+ * The system prop that allows defining system overrides as well as additional CSS styles.
343
+ */
344
+ sx: p.oneOfType([p.arrayOf(p.oneOfType([p.func, p.object, p.bool])), p.func, p.object])
345
+ });
346
+ const Ki = Hi;
347
+ function $e(i) {
348
+ return ci("MuiDivider", i);
349
+ }
350
+ ji("MuiDivider", ["root", "absolute", "fullWidth", "inset", "middle", "flexItem", "light", "vertical", "withChildren", "withChildrenVertical", "textAlignRight", "textAlignLeft", "wrapper", "wrapperVertical"]);
351
+ const Le = ["absolute", "children", "className", "component", "flexItem", "light", "orientation", "role", "textAlign", "variant"], je = (i) => {
352
+ const {
353
+ absolute: o,
354
+ children: e,
355
+ classes: r,
356
+ flexItem: n,
357
+ light: a,
358
+ orientation: t,
359
+ textAlign: s,
360
+ variant: l
361
+ } = i;
362
+ return gi({
363
+ root: ["root", o && "absolute", l, a && "light", t === "vertical" && "vertical", n && "flexItem", e && "withChildren", e && t === "vertical" && "withChildrenVertical", s === "right" && t !== "vertical" && "textAlignRight", s === "left" && t !== "vertical" && "textAlignLeft"],
364
+ wrapper: ["wrapper", t === "vertical" && "wrapperVertical"]
365
+ }, $e, r);
366
+ }, Ve = q("div", {
367
+ name: "MuiDivider",
368
+ slot: "Root",
369
+ overridesResolver: (i, o) => {
370
+ const {
371
+ ownerState: e
372
+ } = i;
373
+ return [o.root, e.absolute && o.absolute, o[e.variant], e.light && o.light, e.orientation === "vertical" && o.vertical, e.flexItem && o.flexItem, e.children && o.withChildren, e.children && e.orientation === "vertical" && o.withChildrenVertical, e.textAlign === "right" && e.orientation !== "vertical" && o.textAlignRight, e.textAlign === "left" && e.orientation !== "vertical" && o.textAlignLeft];
374
+ }
375
+ })(({
376
+ theme: i,
377
+ ownerState: o
378
+ }) => w({
379
+ margin: 0,
380
+ // Reset browser default style.
381
+ flexShrink: 0,
382
+ borderWidth: 0,
383
+ borderStyle: "solid",
384
+ borderColor: (i.vars || i).palette.divider,
385
+ borderBottomWidth: "thin"
386
+ }, o.absolute && {
387
+ position: "absolute",
388
+ bottom: 0,
389
+ left: 0,
390
+ width: "100%"
391
+ }, o.light && {
392
+ borderColor: i.vars ? `rgba(${i.vars.palette.dividerChannel} / 0.08)` : ti(i.palette.divider, 0.08)
393
+ }, o.variant === "inset" && {
394
+ marginLeft: 72
395
+ }, o.variant === "middle" && o.orientation === "horizontal" && {
396
+ marginLeft: i.spacing(2),
397
+ marginRight: i.spacing(2)
398
+ }, o.variant === "middle" && o.orientation === "vertical" && {
399
+ marginTop: i.spacing(1),
400
+ marginBottom: i.spacing(1)
401
+ }, o.orientation === "vertical" && {
402
+ height: "100%",
403
+ borderBottomWidth: 0,
404
+ borderRightWidth: "thin"
405
+ }, o.flexItem && {
406
+ alignSelf: "stretch",
407
+ height: "auto"
408
+ }), ({
409
+ ownerState: i
410
+ }) => w({}, i.children && {
411
+ display: "flex",
412
+ whiteSpace: "nowrap",
413
+ textAlign: "center",
414
+ border: 0,
415
+ "&::before, &::after": {
416
+ content: '""',
417
+ alignSelf: "center"
418
+ }
419
+ }), ({
420
+ theme: i,
421
+ ownerState: o
422
+ }) => w({}, o.children && o.orientation !== "vertical" && {
423
+ "&::before, &::after": {
424
+ width: "100%",
425
+ borderTop: `thin solid ${(i.vars || i).palette.divider}`
426
+ }
427
+ }), ({
428
+ theme: i,
429
+ ownerState: o
430
+ }) => w({}, o.children && o.orientation === "vertical" && {
431
+ flexDirection: "column",
432
+ "&::before, &::after": {
433
+ height: "100%",
434
+ borderLeft: `thin solid ${(i.vars || i).palette.divider}`
435
+ }
436
+ }), ({
437
+ ownerState: i
438
+ }) => w({}, i.textAlign === "right" && i.orientation !== "vertical" && {
439
+ "&::before": {
440
+ width: "90%"
441
+ },
442
+ "&::after": {
443
+ width: "10%"
444
+ }
445
+ }, i.textAlign === "left" && i.orientation !== "vertical" && {
446
+ "&::before": {
447
+ width: "10%"
448
+ },
449
+ "&::after": {
450
+ width: "90%"
451
+ }
452
+ })), He = q("span", {
453
+ name: "MuiDivider",
454
+ slot: "Wrapper",
455
+ overridesResolver: (i, o) => {
456
+ const {
457
+ ownerState: e
458
+ } = i;
459
+ return [o.wrapper, e.orientation === "vertical" && o.wrapperVertical];
460
+ }
461
+ })(({
462
+ theme: i,
463
+ ownerState: o
464
+ }) => w({
465
+ display: "inline-block",
466
+ paddingLeft: `calc(${i.spacing(1)} * 1.2)`,
467
+ paddingRight: `calc(${i.spacing(1)} * 1.2)`
468
+ }, o.orientation === "vertical" && {
469
+ paddingTop: `calc(${i.spacing(1)} * 1.2)`,
470
+ paddingBottom: `calc(${i.spacing(1)} * 1.2)`
471
+ })), Si = /* @__PURE__ */ L.forwardRef(function(o, e) {
472
+ const r = bi({
473
+ props: o,
474
+ name: "MuiDivider"
475
+ }), {
476
+ absolute: n = !1,
477
+ children: a,
478
+ className: t,
479
+ component: s = a ? "div" : "hr",
480
+ flexItem: l = !1,
481
+ light: d = !1,
482
+ orientation: u = "horizontal",
483
+ role: f = s !== "hr" ? "separator" : void 0,
484
+ textAlign: v = "center",
485
+ variant: m = "fullWidth"
486
+ } = r, c = mi(r, Le), h = w({}, r, {
487
+ absolute: n,
488
+ component: s,
489
+ flexItem: l,
490
+ light: d,
491
+ orientation: u,
492
+ role: f,
493
+ textAlign: v,
494
+ variant: m
495
+ }), g = je(h);
496
+ return /* @__PURE__ */ P(Ve, w({
497
+ as: s,
498
+ className: hi(g.root, t),
499
+ role: f,
500
+ ref: e,
501
+ ownerState: h
502
+ }, c, {
503
+ children: a ? /* @__PURE__ */ P(He, {
504
+ className: g.wrapper,
505
+ ownerState: h,
506
+ children: a
507
+ }) : null
508
+ }));
509
+ });
510
+ Si.muiSkipListHighlight = !0;
511
+ process.env.NODE_ENV !== "production" && (Si.propTypes = {
512
+ // ----------------------------- Warning --------------------------------
513
+ // | These PropTypes are generated from the TypeScript type definitions |
514
+ // | To update them edit the d.ts file and run "yarn proptypes" |
515
+ // ----------------------------------------------------------------------
516
+ /**
517
+ * Absolutely position the element.
518
+ * @default false
519
+ */
520
+ absolute: p.bool,
521
+ /**
522
+ * The content of the component.
523
+ */
524
+ children: p.node,
525
+ /**
526
+ * Override or extend the styles applied to the component.
527
+ */
528
+ classes: p.object,
529
+ /**
530
+ * @ignore
531
+ */
532
+ className: p.string,
533
+ /**
534
+ * The component used for the root node.
535
+ * Either a string to use a HTML element or a component.
536
+ */
537
+ component: p.elementType,
538
+ /**
539
+ * If `true`, a vertical divider will have the correct height when used in flex container.
540
+ * (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)
541
+ * @default false
542
+ */
543
+ flexItem: p.bool,
544
+ /**
545
+ * If `true`, the divider will have a lighter color.
546
+ * @default false
547
+ */
548
+ light: p.bool,
549
+ /**
550
+ * The component orientation.
551
+ * @default 'horizontal'
552
+ */
553
+ orientation: p.oneOf(["horizontal", "vertical"]),
554
+ /**
555
+ * @ignore
556
+ */
557
+ role: p.string,
558
+ /**
559
+ * The system prop that allows defining system overrides as well as additional CSS styles.
560
+ */
561
+ sx: p.oneOfType([p.arrayOf(p.oneOfType([p.func, p.object, p.bool])), p.func, p.object]),
562
+ /**
563
+ * The text alignment.
564
+ * @default 'center'
565
+ */
566
+ textAlign: p.oneOf(["center", "left", "right"]),
567
+ /**
568
+ * The variant to use.
569
+ * @default 'fullWidth'
570
+ */
571
+ variant: p.oneOfType([p.oneOf(["fullWidth", "inset", "middle"]), p.string])
572
+ });
573
+ const Wi = Si;
574
+ var Y = function(i, o) {
575
+ return Number(i.toFixed(o));
576
+ }, Ke = function(i, o) {
577
+ return typeof i == "number" ? i : o;
578
+ }, S = function(i, o, e) {
579
+ e && typeof e == "function" && e(i, o);
580
+ }, Fe = function(i) {
581
+ return -Math.cos(i * Math.PI) / 2 + 0.5;
582
+ }, Qe = function(i) {
583
+ return i;
584
+ }, qe = function(i) {
585
+ return i * i;
586
+ }, xe = function(i) {
587
+ return i * (2 - i);
588
+ }, Ue = function(i) {
589
+ return i < 0.5 ? 2 * i * i : -1 + (4 - 2 * i) * i;
590
+ }, Ge = function(i) {
591
+ return i * i * i;
592
+ }, Je = function(i) {
593
+ return --i * i * i + 1;
594
+ }, Ie = function(i) {
595
+ return i < 0.5 ? 4 * i * i * i : (i - 1) * (2 * i - 2) * (2 * i - 2) + 1;
596
+ }, ir = function(i) {
597
+ return i * i * i * i;
598
+ }, er = function(i) {
599
+ return 1 - --i * i * i * i;
600
+ }, rr = function(i) {
601
+ return i < 0.5 ? 8 * i * i * i * i : 1 - 8 * --i * i * i * i;
602
+ }, or = function(i) {
603
+ return i * i * i * i * i;
604
+ }, nr = function(i) {
605
+ return 1 + --i * i * i * i * i;
606
+ }, ar = function(i) {
607
+ return i < 0.5 ? 16 * i * i * i * i * i : 1 + 16 * --i * i * i * i * i;
608
+ }, Fi = {
609
+ easeOut: Fe,
610
+ linear: Qe,
611
+ easeInQuad: qe,
612
+ easeOutQuad: xe,
613
+ easeInOutQuad: Ue,
614
+ easeInCubic: Ge,
615
+ easeOutCubic: Je,
616
+ easeInOutCubic: Ie,
617
+ easeInQuart: ir,
618
+ easeOutQuart: er,
619
+ easeInOutQuart: rr,
620
+ easeInQuint: or,
621
+ easeOutQuint: nr,
622
+ easeInOutQuint: ar
623
+ }, Qi = function(i) {
624
+ typeof i == "number" && cancelAnimationFrame(i);
625
+ }, X = function(i) {
626
+ i.mounted && (Qi(i.animation), i.animate = !1, i.animation = null, i.velocity = null);
627
+ };
628
+ function qi(i, o, e, r) {
629
+ if (i.mounted) {
630
+ var n = (/* @__PURE__ */ new Date()).getTime(), a = 1;
631
+ X(i), i.animation = function() {
632
+ if (!i.mounted)
633
+ return Qi(i.animation);
634
+ var t = (/* @__PURE__ */ new Date()).getTime() - n, s = t / e, l = Fi[o], d = l(s);
635
+ t >= e ? (r(a), i.animation = null) : i.animation && (r(d), requestAnimationFrame(i.animation));
636
+ }, requestAnimationFrame(i.animation);
637
+ }
638
+ }
639
+ function tr(i) {
640
+ var o = i.scale, e = i.positionX, r = i.positionY;
641
+ return !(Number.isNaN(o) || Number.isNaN(e) || Number.isNaN(r));
642
+ }
643
+ function O(i, o, e, r) {
644
+ var n = tr(o);
645
+ if (!(!i.mounted || !n)) {
646
+ var a = i.setTransformState, t = i.transformState, s = t.scale, l = t.positionX, d = t.positionY, u = o.scale - s, f = o.positionX - l, v = o.positionY - d;
647
+ e === 0 ? a(o.scale, o.positionX, o.positionY) : qi(i, r, e, function(m) {
648
+ var c = s + u * m, h = l + f * m, g = d + v * m;
649
+ a(c, h, g);
650
+ });
651
+ }
652
+ }
653
+ function sr(i, o, e) {
654
+ var r = i.offsetWidth, n = i.offsetHeight, a = o.offsetWidth, t = o.offsetHeight, s = a * e, l = t * e, d = r - s, u = n - l;
655
+ return {
656
+ wrapperWidth: r,
657
+ wrapperHeight: n,
658
+ newContentWidth: s,
659
+ newDiffWidth: d,
660
+ newContentHeight: l,
661
+ newDiffHeight: u
662
+ };
663
+ }
664
+ var lr = function(i, o, e, r, n, a, t) {
665
+ var s = i > o ? e * (t ? 1 : 0.5) : 0, l = r > n ? a * (t ? 1 : 0.5) : 0, d = i - o - s, u = s, f = r - n - l, v = l;
666
+ return { minPositionX: d, maxPositionX: u, minPositionY: f, maxPositionY: v };
667
+ }, Ci = function(i, o) {
668
+ var e = i.wrapperComponent, r = i.contentComponent, n = i.setup.centerZoomedOut;
669
+ if (!e || !r)
670
+ throw new Error("Components are not mounted");
671
+ var a = sr(e, r, o), t = a.wrapperWidth, s = a.wrapperHeight, l = a.newContentWidth, d = a.newDiffWidth, u = a.newContentHeight, f = a.newDiffHeight, v = lr(t, l, d, s, u, f, !!n);
672
+ return v;
673
+ }, si = function(i, o, e, r) {
674
+ return r ? i < o ? Y(o, 2) : i > e ? Y(e, 2) : Y(i, 2) : Y(i, 2);
675
+ }, k = function(i, o) {
676
+ var e = Ci(i, o);
677
+ return i.bounds = e, e;
678
+ };
679
+ function x(i, o, e, r, n, a, t) {
680
+ var s = e.minPositionX, l = e.minPositionY, d = e.maxPositionX, u = e.maxPositionY, f = 0, v = 0;
681
+ t && (f = n, v = a);
682
+ var m = si(i, s - f, d + f, r), c = si(o, l - v, u + v, r);
683
+ return { x: m, y: c };
684
+ }
685
+ function U(i, o, e, r, n, a) {
686
+ var t = i.transformState, s = t.scale, l = t.positionX, d = t.positionY, u = r - s;
687
+ if (typeof o != "number" || typeof e != "number")
688
+ return console.error("Mouse X and Y position were not provided!"), { x: l, y: d };
689
+ var f = l - o * u, v = d - e * u, m = x(f, v, n, a, 0, 0, null);
690
+ return m;
691
+ }
692
+ function j(i, o, e, r, n) {
693
+ var a = n ? r : 0, t = o - a;
694
+ return !Number.isNaN(e) && i >= e ? e : !Number.isNaN(o) && i <= t ? t : i;
695
+ }
696
+ var Ei = function(i, o) {
697
+ var e = i.setup.panning.excluded, r = i.isInitialized, n = i.wrapperComponent, a = o.target, t = n == null ? void 0 : n.contains(a), s = r && a && t;
698
+ if (!s)
699
+ return !1;
700
+ var l = G(a, e);
701
+ return !l;
702
+ }, Di = function(i) {
703
+ var o = i.isInitialized, e = i.isPanning, r = i.setup, n = r.panning.disabled, a = o && e && !n;
704
+ return !!a;
705
+ }, ur = function(i, o) {
706
+ var e = i.transformState, r = e.positionX, n = e.positionY;
707
+ i.isPanning = !0;
708
+ var a = o.clientX, t = o.clientY;
709
+ i.startCoords = { x: a - r, y: t - n };
710
+ }, dr = function(i, o) {
711
+ var e = o.touches, r = i.transformState, n = r.positionX, a = r.positionY;
712
+ i.isPanning = !0;
713
+ var t = e.length === 1;
714
+ if (t) {
715
+ var s = e[0].clientX, l = e[0].clientY;
716
+ i.startCoords = { x: s - n, y: l - a };
717
+ }
718
+ };
719
+ function fr(i) {
720
+ var o = i.transformState, e = o.positionX, r = o.positionY, n = o.scale, a = i.setup, t = a.disabled, s = a.limitToBounds, l = a.centerZoomedOut, d = i.wrapperComponent;
721
+ if (!(t || !d || !i.bounds)) {
722
+ var u = i.bounds, f = u.maxPositionX, v = u.minPositionX, m = u.maxPositionY, c = u.minPositionY, h = e > f || e < v, g = r > m || r < c, y = e > f ? d.offsetWidth : i.setup.minPositionX || 0, T = r > m ? d.offsetHeight : i.setup.minPositionY || 0, C = U(i, y, T, n, i.bounds, s || l), W = C.x, A = C.y;
723
+ return {
724
+ scale: n,
725
+ positionX: h ? W : e,
726
+ positionY: g ? A : r
727
+ };
728
+ }
729
+ }
730
+ function pr(i, o, e, r, n) {
731
+ var a = i.setup.limitToBounds, t = i.wrapperComponent, s = i.bounds, l = i.transformState, d = l.scale, u = l.positionX, f = l.positionY;
732
+ if (!(t === null || s === null || o === u && e === f)) {
733
+ var v = x(o, e, s, a, r, n, t), m = v.x, c = v.y;
734
+ i.setTransformState(d, m, c);
735
+ }
736
+ }
737
+ var vr = function(i, o, e) {
738
+ var r = i.startCoords, n = i.transformState, a = i.setup.panning, t = a.lockAxisX, s = a.lockAxisY, l = n.positionX, d = n.positionY;
739
+ if (!r)
740
+ return { x: l, y: d };
741
+ var u = o - r.x, f = e - r.y, v = t ? l : u, m = s ? d : f;
742
+ return { x: v, y: m };
743
+ }, F = function(i, o) {
744
+ var e = i.setup, r = i.transformState, n = r.scale, a = e.minScale, t = e.disablePadding;
745
+ return o > 0 && n >= a && !t ? o : 0;
746
+ }, mr = function(i) {
747
+ var o = i.mounted, e = i.setup, r = e.disabled, n = e.velocityAnimation, a = i.transformState.scale, t = n.disabled, s = !t || a > 1 || !r || o;
748
+ return !!s;
749
+ }, cr = function(i) {
750
+ var o = i.mounted, e = i.velocity, r = i.bounds, n = i.setup, a = n.disabled, t = n.velocityAnimation, s = i.transformState.scale, l = t.disabled, d = !l || s > 1 || !a || o;
751
+ return !(!d || !e || !r);
752
+ };
753
+ function hr(i, o) {
754
+ var e = i.setup.velocityAnimation, r = e.equalToMove, n = e.animationTime, a = e.sensitivity;
755
+ return r ? n * o * a : n;
756
+ }
757
+ function Ni(i, o, e, r, n, a, t, s, l, d) {
758
+ if (n) {
759
+ if (o > t && e > t) {
760
+ var u = t + (i - t) * d;
761
+ return u > l ? l : u < t ? t : u;
762
+ }
763
+ if (o < a && e < a) {
764
+ var u = a + (i - a) * d;
765
+ return u < s ? s : u > a ? a : u;
766
+ }
767
+ }
768
+ return r ? o : si(i, a, t, n);
769
+ }
770
+ function gr(i, o) {
771
+ var e = 1;
772
+ return o ? Math.min(e, i.offsetWidth / window.innerWidth) : e;
773
+ }
774
+ function br(i, o) {
775
+ var e = mr(i);
776
+ if (e) {
777
+ var r = i.lastMousePosition, n = i.velocityTime, a = i.setup, t = i.wrapperComponent, s = a.velocityAnimation.equalToMove, l = Date.now();
778
+ if (r && n && t) {
779
+ var d = gr(t, s), u = o.x - r.x, f = o.y - r.y, v = u / d, m = f / d, c = l - n, h = u * u + f * f, g = Math.sqrt(h) / c;
780
+ i.velocity = { velocityX: v, velocityY: m, total: g };
781
+ }
782
+ i.lastMousePosition = o, i.velocityTime = l;
783
+ }
784
+ }
785
+ function Sr(i) {
786
+ var o = i.velocity, e = i.bounds, r = i.setup, n = i.wrapperComponent, a = cr(i);
787
+ if (!(!a || !o || !e || !n)) {
788
+ var t = o.velocityX, s = o.velocityY, l = o.total, d = e.maxPositionX, u = e.minPositionX, f = e.maxPositionY, v = e.minPositionY, m = r.limitToBounds, c = r.alignmentAnimation, h = r.zoomAnimation, g = r.panning, y = g.lockAxisY, T = g.lockAxisX, C = h.animationType, W = c.sizeX, A = c.sizeY, B = c.velocityAlignmentTime, E = B, M = hr(i, l), N = Math.max(M, E), R = F(i, W), Z = F(i, A), V = R * n.offsetWidth / 100, Yi = Z * n.offsetHeight / 100, le = d + V, ue = u - V, de = f + Yi, fe = v - Yi, Ai = i.transformState, pe = (/* @__PURE__ */ new Date()).getTime();
789
+ qi(i, C, N, function(ve) {
790
+ var I = i.transformState, me = I.scale, ii = I.positionX, ei = I.positionY, ce = (/* @__PURE__ */ new Date()).getTime() - pe, he = ce / E, ge = Fi[c.animationType], Xi = 1 - ge(Math.min(1, he)), zi = 1 - ve, _i = ii + t * zi, Oi = ei + s * zi, be = Ni(_i, Ai.positionX, ii, T, m, u, d, ue, le, Xi), Se = Ni(Oi, Ai.positionY, ei, y, m, v, f, fe, de, Xi);
791
+ (ii !== _i || ei !== Oi) && i.setTransformState(me, be, Se);
792
+ });
793
+ }
794
+ }
795
+ function Ri(i, o) {
796
+ var e = i.transformState.scale;
797
+ X(i), k(i, e), window.TouchEvent !== void 0 && o instanceof TouchEvent ? dr(i, o) : ur(i, o);
798
+ }
799
+ function xi(i) {
800
+ var o = i.transformState.scale, e = i.setup, r = e.minScale, n = e.alignmentAnimation, a = n.disabled, t = n.sizeX, s = n.sizeY, l = n.animationTime, d = n.animationType, u = a || o < r || !t && !s;
801
+ if (!u) {
802
+ var f = fr(i);
803
+ f && O(i, f, l, d);
804
+ }
805
+ }
806
+ function ki(i, o, e) {
807
+ var r = i.startCoords, n = i.setup, a = n.alignmentAnimation, t = a.sizeX, s = a.sizeY;
808
+ if (r) {
809
+ var l = vr(i, o, e), d = l.x, u = l.y, f = F(i, t), v = F(i, s);
810
+ br(i, { x: d, y: u }), pr(i, d, u, f, v);
811
+ }
812
+ }
813
+ function Cr(i) {
814
+ if (i.isPanning) {
815
+ var o = i.setup.panning.velocityDisabled, e = i.velocity, r = i.wrapperComponent, n = i.contentComponent;
816
+ i.isPanning = !1, i.animate = !1, i.animation = null;
817
+ var a = r == null ? void 0 : r.getBoundingClientRect(), t = n == null ? void 0 : n.getBoundingClientRect(), s = (a == null ? void 0 : a.width) || 0, l = (a == null ? void 0 : a.height) || 0, d = (t == null ? void 0 : t.width) || 0, u = (t == null ? void 0 : t.height) || 0, f = s < d || l < u, v = !o && e && (e == null ? void 0 : e.total) > 0.1 && f;
818
+ v ? Sr(i) : xi(i);
819
+ }
820
+ }
821
+ function wi(i, o, e, r) {
822
+ var n = i.setup, a = n.minScale, t = n.maxScale, s = n.limitToBounds, l = j(Y(o, 2), a, t, 0, !1), d = k(i, l), u = U(i, e, r, l, d, s), f = u.x, v = u.y;
823
+ return { scale: l, positionX: f, positionY: v };
824
+ }
825
+ function Ui(i, o, e) {
826
+ var r = i.transformState.scale, n = i.wrapperComponent, a = i.setup, t = a.minScale, s = a.limitToBounds, l = a.zoomAnimation, d = l.disabled, u = l.animationTime, f = l.animationType, v = d || r >= t;
827
+ if ((r >= 1 || s) && xi(i), !(v || !n || !i.mounted)) {
828
+ var m = o || n.offsetWidth / 2, c = e || n.offsetHeight / 2, h = wi(i, t, m, c);
829
+ h && O(i, h, u, f);
830
+ }
831
+ }
832
+ var _ = function() {
833
+ return _ = Object.assign || function(o) {
834
+ for (var e, r = 1, n = arguments.length; r < n; r++) {
835
+ e = arguments[r];
836
+ for (var a in e)
837
+ Object.prototype.hasOwnProperty.call(e, a) && (o[a] = e[a]);
838
+ }
839
+ return o;
840
+ }, _.apply(this, arguments);
841
+ };
842
+ function Bi(i, o, e) {
843
+ if (e || arguments.length === 2)
844
+ for (var r = 0, n = o.length, a; r < n; r++)
845
+ (a || !(r in o)) && (a || (a = Array.prototype.slice.call(o, 0, r)), a[r] = o[r]);
846
+ return i.concat(a || Array.prototype.slice.call(o));
847
+ }
848
+ var H = {
849
+ previousScale: 1,
850
+ scale: 1,
851
+ positionX: 0,
852
+ positionY: 0
853
+ }, $ = {
854
+ disabled: !1,
855
+ minPositionX: null,
856
+ maxPositionX: null,
857
+ minPositionY: null,
858
+ maxPositionY: null,
859
+ minScale: 1,
860
+ maxScale: 8,
861
+ limitToBounds: !0,
862
+ centerZoomedOut: !1,
863
+ centerOnInit: !1,
864
+ disablePadding: !1,
865
+ smooth: !0,
866
+ wheel: {
867
+ step: 0.2,
868
+ disabled: !1,
869
+ smoothStep: 1e-3,
870
+ wheelDisabled: !1,
871
+ touchPadDisabled: !1,
872
+ activationKeys: [],
873
+ excluded: []
874
+ },
875
+ panning: {
876
+ disabled: !1,
877
+ velocityDisabled: !1,
878
+ lockAxisX: !1,
879
+ lockAxisY: !1,
880
+ activationKeys: [],
881
+ excluded: []
882
+ },
883
+ pinch: {
884
+ step: 5,
885
+ disabled: !1,
886
+ excluded: []
887
+ },
888
+ doubleClick: {
889
+ disabled: !1,
890
+ step: 0.7,
891
+ mode: "zoomIn",
892
+ animationType: "easeOut",
893
+ animationTime: 200,
894
+ excluded: []
895
+ },
896
+ zoomAnimation: {
897
+ disabled: !1,
898
+ size: 0.4,
899
+ animationTime: 200,
900
+ animationType: "easeOut"
901
+ },
902
+ alignmentAnimation: {
903
+ disabled: !1,
904
+ sizeX: 100,
905
+ sizeY: 100,
906
+ animationTime: 200,
907
+ velocityAlignmentTime: 400,
908
+ animationType: "easeOut"
909
+ },
910
+ velocityAnimation: {
911
+ disabled: !1,
912
+ sensitivity: 1,
913
+ animationTime: 400,
914
+ animationType: "easeOut",
915
+ equalToMove: !0
916
+ }
917
+ }, Gi = function(i) {
918
+ var o, e, r, n;
919
+ return {
920
+ previousScale: (o = i.initialScale) !== null && o !== void 0 ? o : H.scale,
921
+ scale: (e = i.initialScale) !== null && e !== void 0 ? e : H.scale,
922
+ positionX: (r = i.initialPositionX) !== null && r !== void 0 ? r : H.positionX,
923
+ positionY: (n = i.initialPositionY) !== null && n !== void 0 ? n : H.positionY
924
+ };
925
+ }, Mi = function(i) {
926
+ var o = _({}, $);
927
+ return Object.keys(i).forEach(function(e) {
928
+ var r = typeof i[e] < "u", n = typeof $[e] < "u";
929
+ if (n && r) {
930
+ var a = Object.prototype.toString.call($[e]), t = a === "[object Object]", s = a === "[object Array]";
931
+ t ? o[e] = _(_({}, $[e]), i[e]) : s ? o[e] = Bi(Bi([], $[e], !0), i[e], !0) : o[e] = i[e];
932
+ }
933
+ }), o;
934
+ }, Ji = function(i, o, e) {
935
+ var r = i.transformState.scale, n = i.wrapperComponent, a = i.setup, t = a.maxScale, s = a.minScale, l = a.zoomAnimation, d = a.smooth, u = l.size;
936
+ if (!n)
937
+ throw new Error("Wrapper is not mounted");
938
+ var f = d ? r * Math.exp(o * e) : r + o * e, v = j(Y(f, 3), s, t, u, !1);
939
+ return v;
940
+ };
941
+ function Ii(i, o, e, r, n) {
942
+ var a = i.wrapperComponent, t = i.transformState, s = t.scale, l = t.positionX, d = t.positionY;
943
+ if (!a)
944
+ return console.error("No WrapperComponent found");
945
+ var u = a.offsetWidth, f = a.offsetHeight, v = (u / 2 - l) / s, m = (f / 2 - d) / s, c = Ji(i, o, e), h = wi(i, c, v, m);
946
+ if (!h)
947
+ return console.error("Error during zoom event. New transformation state was not calculated.");
948
+ O(i, h, r, n);
949
+ }
950
+ function ie(i, o, e, r) {
951
+ var n = i.setup, a = i.wrapperComponent, t = n.limitToBounds, s = Gi(i.props), l = i.transformState, d = l.scale, u = l.positionX, f = l.positionY;
952
+ if (a) {
953
+ var v = Ci(i, s.scale), m = x(s.positionX, s.positionY, v, t, 0, 0, a), c = {
954
+ scale: s.scale,
955
+ positionX: m.x,
956
+ positionY: m.y
957
+ };
958
+ d === s.scale && u === s.positionX && f === s.positionY || (r == null || r(), O(i, c, o, e));
959
+ }
960
+ }
961
+ function wr(i, o, e, r) {
962
+ var n = i.getBoundingClientRect(), a = o.getBoundingClientRect(), t = e.getBoundingClientRect(), s = a.x * r.scale, l = a.y * r.scale;
963
+ return {
964
+ x: (n.x - t.x + s) / r.scale,
965
+ y: (n.y - t.y + l) / r.scale
966
+ };
967
+ }
968
+ function yr(i, o, e) {
969
+ var r = i.wrapperComponent, n = i.contentComponent, a = i.transformState, t = i.setup, s = t.limitToBounds, l = t.minScale, d = t.maxScale;
970
+ if (!r || !n)
971
+ return a;
972
+ var u = r.getBoundingClientRect(), f = o.getBoundingClientRect(), v = wr(o, r, n, a), m = v.x, c = v.y, h = f.width / a.scale, g = f.height / a.scale, y = r.offsetWidth / h, T = r.offsetHeight / g, C = j(e || Math.min(y, T), l, d, 0, !1), W = (u.width - h * C) / 2, A = (u.height - g * C) / 2, B = (u.left - m) * C + W, E = (u.top - c) * C + A, M = Ci(i, C), N = x(B, E, M, s, 0, 0, r), R = N.x, Z = N.y;
973
+ return { positionX: R, positionY: Z, scale: C };
974
+ }
975
+ var Pr = function(i) {
976
+ return function(o, e, r) {
977
+ o === void 0 && (o = 0.5), e === void 0 && (e = 300), r === void 0 && (r = "easeOut"), Ii(i, 1, o, e, r);
978
+ };
979
+ }, Tr = function(i) {
980
+ return function(o, e, r) {
981
+ o === void 0 && (o = 0.5), e === void 0 && (e = 300), r === void 0 && (r = "easeOut"), Ii(i, -1, o, e, r);
982
+ };
983
+ }, Yr = function(i) {
984
+ return function(o, e, r, n, a) {
985
+ n === void 0 && (n = 300), a === void 0 && (a = "easeOut");
986
+ var t = i.transformState, s = t.positionX, l = t.positionY, d = t.scale, u = i.wrapperComponent, f = i.contentComponent, v = i.setup.disabled;
987
+ if (!(v || !u || !f)) {
988
+ var m = {
989
+ positionX: Number.isNaN(o) ? s : o,
990
+ positionY: Number.isNaN(e) ? l : e,
991
+ scale: Number.isNaN(r) ? d : r
992
+ };
993
+ O(i, m, n, a);
994
+ }
995
+ };
996
+ }, Ar = function(i) {
997
+ return function(o, e) {
998
+ o === void 0 && (o = 200), e === void 0 && (e = "easeOut"), ie(i, o, e);
999
+ };
1000
+ }, Xr = function(i) {
1001
+ return function(o, e, r) {
1002
+ e === void 0 && (e = 200), r === void 0 && (r = "easeOut");
1003
+ var n = i.transformState, a = i.wrapperComponent, t = i.contentComponent;
1004
+ if (a && t) {
1005
+ var s = ee(o || n.scale, a, t);
1006
+ O(i, s, e, r);
1007
+ }
1008
+ };
1009
+ }, zr = function(i) {
1010
+ return function(o, e, r, n) {
1011
+ r === void 0 && (r = 600), n === void 0 && (n = "easeOut"), X(i);
1012
+ var a = i.wrapperComponent, t = typeof o == "string" ? document.getElementById(o) : o;
1013
+ if (a && t && a.contains(t)) {
1014
+ var s = yr(i, t, e);
1015
+ O(i, s, r, n);
1016
+ }
1017
+ };
1018
+ }, Q = function(i) {
1019
+ return {
1020
+ instance: i,
1021
+ zoomIn: Pr(i),
1022
+ zoomOut: Tr(i),
1023
+ setTransform: Yr(i),
1024
+ resetTransform: Ar(i),
1025
+ centerView: Xr(i),
1026
+ zoomToElement: zr(i)
1027
+ };
1028
+ }, _r = function(i) {
1029
+ return {
1030
+ instance: i,
1031
+ state: i.transformState
1032
+ };
1033
+ }, b = function(i) {
1034
+ var o = {};
1035
+ return Object.assign(o, _r(i)), Object.assign(o, Q(i)), o;
1036
+ }, oi = !1;
1037
+ function ni() {
1038
+ try {
1039
+ var i = {
1040
+ get passive() {
1041
+ return oi = !0, !1;
1042
+ }
1043
+ };
1044
+ return i;
1045
+ } catch {
1046
+ return oi = !1, oi;
1047
+ }
1048
+ }
1049
+ var G = function(i, o) {
1050
+ var e = i.tagName.toUpperCase(), r = o.find(function(a) {
1051
+ return a.toUpperCase() === e;
1052
+ });
1053
+ if (r)
1054
+ return !0;
1055
+ var n = o.find(function(a) {
1056
+ return i.classList.contains(a);
1057
+ });
1058
+ return !!n;
1059
+ }, li = function(i) {
1060
+ i && clearTimeout(i);
1061
+ }, Or = function(i, o, e) {
1062
+ return "translate(".concat(i, "px, ").concat(o, "px) scale(").concat(e, ")");
1063
+ }, ee = function(i, o, e) {
1064
+ var r = e.offsetWidth * i, n = e.offsetHeight * i, a = (o.offsetWidth - r) / 2, t = (o.offsetHeight - n) / 2;
1065
+ return {
1066
+ scale: i,
1067
+ positionX: a,
1068
+ positionY: t
1069
+ };
1070
+ };
1071
+ function Wr(i) {
1072
+ return function(o) {
1073
+ i.forEach(function(e) {
1074
+ typeof e == "function" ? e(o) : e != null && (e.current = o);
1075
+ });
1076
+ };
1077
+ }
1078
+ var Er = function(i, o) {
1079
+ var e = i.setup.wheel, r = e.disabled, n = e.wheelDisabled, a = e.touchPadDisabled, t = e.excluded, s = i.isInitialized, l = i.isPanning, d = o.target, u = s && !l && !r && d;
1080
+ if (!u || n && !o.ctrlKey || a && o.ctrlKey)
1081
+ return !1;
1082
+ var f = G(d, t);
1083
+ return !f;
1084
+ }, Dr = function(i) {
1085
+ return i ? i.deltaY < 0 ? 1 : -1 : 0;
1086
+ };
1087
+ function Nr(i, o) {
1088
+ var e = Dr(i), r = Ke(o, e);
1089
+ return r;
1090
+ }
1091
+ function re(i, o, e) {
1092
+ var r = o.getBoundingClientRect(), n = 0, a = 0;
1093
+ if ("clientX" in i)
1094
+ n = (i.clientX - r.left) / e, a = (i.clientY - r.top) / e;
1095
+ else {
1096
+ var t = i.touches[0];
1097
+ n = (t.clientX - r.left) / e, a = (t.clientY - r.top) / e;
1098
+ }
1099
+ return (Number.isNaN(n) || Number.isNaN(a)) && console.error("No mouse or touch offset found"), {
1100
+ x: n,
1101
+ y: a
1102
+ };
1103
+ }
1104
+ var Rr = function(i, o, e, r, n) {
1105
+ var a = i.transformState.scale, t = i.wrapperComponent, s = i.setup, l = s.maxScale, d = s.minScale, u = s.zoomAnimation, f = s.disablePadding, v = u.size, m = u.disabled;
1106
+ if (!t)
1107
+ throw new Error("Wrapper is not mounted");
1108
+ var c = a + o * e;
1109
+ if (n)
1110
+ return c;
1111
+ var h = r ? !1 : !m, g = j(Y(c, 3), d, l, v, h && !f);
1112
+ return g;
1113
+ }, kr = function(i, o) {
1114
+ var e = i.previousWheelEvent, r = i.transformState.scale, n = i.setup, a = n.maxScale, t = n.minScale;
1115
+ return e ? r < a || r > t || Math.sign(e.deltaY) !== Math.sign(o.deltaY) || e.deltaY > 0 && e.deltaY < o.deltaY || e.deltaY < 0 && e.deltaY > o.deltaY || Math.sign(e.deltaY) !== Math.sign(o.deltaY) : !1;
1116
+ }, Br = function(i, o) {
1117
+ var e = i.setup.pinch, r = e.disabled, n = e.excluded, a = i.isInitialized, t = o.target, s = a && !r && t;
1118
+ if (!s)
1119
+ return !1;
1120
+ var l = G(t, n);
1121
+ return !l;
1122
+ }, Mr = function(i) {
1123
+ var o = i.setup.pinch.disabled, e = i.isInitialized, r = i.pinchStartDistance, n = e && !o && r;
1124
+ return !!n;
1125
+ }, Zr = function(i, o, e) {
1126
+ var r = e.getBoundingClientRect(), n = i.touches, a = Y(n[0].clientX - r.left, 5), t = Y(n[0].clientY - r.top, 5), s = Y(n[1].clientX - r.left, 5), l = Y(n[1].clientY - r.top, 5);
1127
+ return {
1128
+ x: (a + s) / 2 / o,
1129
+ y: (t + l) / 2 / o
1130
+ };
1131
+ }, oe = function(i) {
1132
+ return Math.sqrt(Math.pow(i.touches[0].pageX - i.touches[1].pageX, 2) + Math.pow(i.touches[0].pageY - i.touches[1].pageY, 2));
1133
+ }, $r = function(i, o) {
1134
+ var e = i.pinchStartScale, r = i.pinchStartDistance, n = i.setup, a = n.maxScale, t = n.minScale, s = n.zoomAnimation, l = n.disablePadding, d = s.size, u = s.disabled;
1135
+ if (!e || r === null || !o)
1136
+ throw new Error("Pinch touches distance was not provided");
1137
+ if (o < 0)
1138
+ return i.transformState.scale;
1139
+ var f = o / r, v = f * e;
1140
+ return j(Y(v, 2), t, a, d, !u && !l);
1141
+ }, Lr = 160, jr = 100, Vr = function(i, o) {
1142
+ var e = i.props, r = e.onWheelStart, n = e.onZoomStart;
1143
+ i.wheelStopEventTimer || (X(i), S(b(i), o, r), S(b(i), o, n));
1144
+ }, Hr = function(i, o) {
1145
+ var e = i.props, r = e.onWheel, n = e.onZoom, a = i.contentComponent, t = i.setup, s = i.transformState, l = s.scale, d = t.limitToBounds, u = t.centerZoomedOut, f = t.zoomAnimation, v = t.wheel, m = t.disablePadding, c = t.smooth, h = f.size, g = f.disabled, y = v.step, T = v.smoothStep;
1146
+ if (!a)
1147
+ throw new Error("Component not mounted");
1148
+ o.preventDefault(), o.stopPropagation();
1149
+ var C = Nr(o, null), W = c ? T * Math.abs(o.deltaY) : y, A = Rr(i, C, W, !o.ctrlKey);
1150
+ if (l !== A) {
1151
+ var B = k(i, A), E = re(o, a, l), M = g || h === 0 || u || m, N = d && M, R = U(i, E.x, E.y, A, B, N), Z = R.x, V = R.y;
1152
+ i.previousWheelEvent = o, i.setTransformState(A, Z, V), S(b(i), o, r), S(b(i), o, n);
1153
+ }
1154
+ }, Kr = function(i, o) {
1155
+ var e = i.props, r = e.onWheelStop, n = e.onZoomStop;
1156
+ li(i.wheelAnimationTimer), i.wheelAnimationTimer = setTimeout(function() {
1157
+ i.mounted && (Ui(i, o.x, o.y), i.wheelAnimationTimer = null);
1158
+ }, jr);
1159
+ var a = kr(i, o);
1160
+ a && (li(i.wheelStopEventTimer), i.wheelStopEventTimer = setTimeout(function() {
1161
+ i.mounted && (i.wheelStopEventTimer = null, S(b(i), o, r), S(b(i), o, n));
1162
+ }, Lr));
1163
+ }, Fr = function(i, o) {
1164
+ var e = oe(o);
1165
+ i.pinchStartDistance = e, i.lastDistance = e, i.pinchStartScale = i.transformState.scale, i.isPanning = !1, X(i);
1166
+ }, Qr = function(i, o) {
1167
+ var e = i.contentComponent, r = i.pinchStartDistance, n = i.transformState.scale, a = i.setup, t = a.limitToBounds, s = a.centerZoomedOut, l = a.zoomAnimation, d = l.disabled, u = l.size;
1168
+ if (!(r === null || !e)) {
1169
+ var f = Zr(o, n, e);
1170
+ if (!(!Number.isFinite(f.x) || !Number.isFinite(f.y))) {
1171
+ var v = oe(o), m = $r(i, v);
1172
+ if (m !== n) {
1173
+ var c = k(i, m), h = d || u === 0 || s, g = t && h, y = U(i, f.x, f.y, m, c, g), T = y.x, C = y.y;
1174
+ i.pinchMidpoint = f, i.lastDistance = v, i.setTransformState(m, T, C);
1175
+ }
1176
+ }
1177
+ }
1178
+ }, qr = function(i) {
1179
+ var o = i.pinchMidpoint;
1180
+ i.velocity = null, i.lastDistance = null, i.pinchMidpoint = null, i.pinchStartScale = null, i.pinchStartDistance = null, Ui(i, o == null ? void 0 : o.x, o == null ? void 0 : o.y);
1181
+ }, ne = function(i, o) {
1182
+ var e = i.props.onZoomStop, r = i.setup.doubleClick.animationTime;
1183
+ li(i.doubleClickStopEventTimer), i.doubleClickStopEventTimer = setTimeout(function() {
1184
+ i.doubleClickStopEventTimer = null, S(b(i), o, e);
1185
+ }, r);
1186
+ }, xr = function(i, o) {
1187
+ var e = i.props, r = e.onZoomStart, n = e.onZoom, a = i.setup.doubleClick, t = a.animationTime, s = a.animationType;
1188
+ S(b(i), o, r), ie(i, t, s, function() {
1189
+ return S(b(i), o, n);
1190
+ }), ne(i, o);
1191
+ };
1192
+ function Ur(i, o) {
1193
+ var e = i.setup, r = i.doubleClickStopEventTimer, n = i.transformState, a = i.contentComponent, t = n.scale, s = i.props, l = s.onZoomStart, d = s.onZoom, u = e.doubleClick, f = u.disabled, v = u.mode, m = u.step, c = u.animationTime, h = u.animationType;
1194
+ if (!f && !r) {
1195
+ if (v === "reset")
1196
+ return xr(i, o);
1197
+ if (!a)
1198
+ return console.error("No ContentComponent found");
1199
+ var g = v === "zoomOut" ? -1 : 1, y = Ji(i, g, m);
1200
+ if (t !== y) {
1201
+ S(b(i), o, l);
1202
+ var T = re(o, a, t), C = wi(i, y, T.x, T.y);
1203
+ if (!C)
1204
+ return console.error("Error during zoom event. New transformation state was not calculated.");
1205
+ S(b(i), o, d), O(i, C, c, h), ne(i, o);
1206
+ }
1207
+ }
1208
+ }
1209
+ var Gr = function(i, o) {
1210
+ var e = i.isInitialized, r = i.setup, n = i.wrapperComponent, a = r.doubleClick, t = a.disabled, s = a.excluded, l = o.target, d = n == null ? void 0 : n.contains(l), u = e && l && d && !t;
1211
+ if (!u)
1212
+ return !1;
1213
+ var f = G(l, s);
1214
+ return !f;
1215
+ }, Jr = (
1216
+ /** @class */
1217
+ function() {
1218
+ function i(o) {
1219
+ var e = this;
1220
+ this.mounted = !0, this.onChangeCallbacks = /* @__PURE__ */ new Set(), this.onInitCallbacks = /* @__PURE__ */ new Set(), this.wrapperComponent = null, this.contentComponent = null, this.isInitialized = !1, this.bounds = null, this.previousWheelEvent = null, this.wheelStopEventTimer = null, this.wheelAnimationTimer = null, this.isPanning = !1, this.startCoords = null, this.lastTouch = null, this.distance = null, this.lastDistance = null, this.pinchStartDistance = null, this.pinchStartScale = null, this.pinchMidpoint = null, this.doubleClickStopEventTimer = null, this.velocity = null, this.velocityTime = null, this.lastMousePosition = null, this.animate = !1, this.animation = null, this.maxBounds = null, this.pressedKeys = {}, this.mount = function() {
1221
+ e.initializeWindowEvents();
1222
+ }, this.unmount = function() {
1223
+ e.cleanupWindowEvents();
1224
+ }, this.update = function(r) {
1225
+ k(e, e.transformState.scale), e.setup = Mi(r);
1226
+ }, this.initializeWindowEvents = function() {
1227
+ var r, n = ni(), a = (r = e.wrapperComponent) === null || r === void 0 ? void 0 : r.ownerDocument, t = a == null ? void 0 : a.defaultView;
1228
+ t == null || t.addEventListener("mousedown", e.onPanningStart, n), t == null || t.addEventListener("mousemove", e.onPanning, n), t == null || t.addEventListener("mouseup", e.onPanningStop, n), a == null || a.addEventListener("mouseleave", e.clearPanning, n), t == null || t.addEventListener("keyup", e.setKeyUnPressed, n), t == null || t.addEventListener("keydown", e.setKeyPressed, n);
1229
+ }, this.cleanupWindowEvents = function() {
1230
+ var r, n, a = ni(), t = (r = e.wrapperComponent) === null || r === void 0 ? void 0 : r.ownerDocument, s = t == null ? void 0 : t.defaultView;
1231
+ s == null || s.removeEventListener("mousedown", e.onPanningStart, a), s == null || s.removeEventListener("mousemove", e.onPanning, a), s == null || s.removeEventListener("mouseup", e.onPanningStop, a), t == null || t.removeEventListener("mouseleave", e.clearPanning, a), s == null || s.removeEventListener("keyup", e.setKeyUnPressed, a), s == null || s.removeEventListener("keydown", e.setKeyPressed, a), document.removeEventListener("mouseleave", e.clearPanning, a), X(e), (n = e.observer) === null || n === void 0 || n.disconnect();
1232
+ }, this.handleInitializeWrapperEvents = function(r) {
1233
+ var n = ni();
1234
+ r.addEventListener("wheel", e.onWheelZoom, n), r.addEventListener("dblclick", e.onDoubleClick, n), r.addEventListener("touchstart", e.onTouchPanningStart, n), r.addEventListener("touchmove", e.onTouchPanning, n), r.addEventListener("touchend", e.onTouchPanningStop, n);
1235
+ }, this.handleInitialize = function(r) {
1236
+ var n = e.setup.centerOnInit;
1237
+ e.applyTransformation(), e.onInitCallbacks.forEach(function(a) {
1238
+ return a(b(e));
1239
+ }), n && (e.setCenter(), e.observer = new ResizeObserver(function() {
1240
+ var a;
1241
+ e.onInitCallbacks.forEach(function(t) {
1242
+ return t(b(e));
1243
+ }), e.setCenter(), (a = e.observer) === null || a === void 0 || a.disconnect();
1244
+ }), e.observer.observe(r));
1245
+ }, this.onWheelZoom = function(r) {
1246
+ var n = e.setup.disabled;
1247
+ if (!n) {
1248
+ var a = Er(e, r);
1249
+ if (a) {
1250
+ var t = e.isPressingKeys(e.setup.wheel.activationKeys);
1251
+ t && (Vr(e, r), Hr(e, r), Kr(e, r));
1252
+ }
1253
+ }
1254
+ }, this.onPanningStart = function(r) {
1255
+ var n = e.setup.disabled, a = e.props.onPanningStart;
1256
+ if (!n) {
1257
+ var t = Ei(e, r);
1258
+ if (t) {
1259
+ var s = e.isPressingKeys(e.setup.panning.activationKeys);
1260
+ s && (r.preventDefault(), r.stopPropagation(), X(e), Ri(e, r), S(b(e), r, a));
1261
+ }
1262
+ }
1263
+ }, this.onPanning = function(r) {
1264
+ var n = e.setup.disabled, a = e.props.onPanning;
1265
+ if (!n) {
1266
+ var t = Di(e);
1267
+ if (t) {
1268
+ var s = e.isPressingKeys(e.setup.panning.activationKeys);
1269
+ s && (r.preventDefault(), r.stopPropagation(), ki(e, r.clientX, r.clientY), S(b(e), r, a));
1270
+ }
1271
+ }
1272
+ }, this.onPanningStop = function(r) {
1273
+ var n = e.props.onPanningStop;
1274
+ e.isPanning && (Cr(e), S(b(e), r, n));
1275
+ }, this.onPinchStart = function(r) {
1276
+ var n = e.setup.disabled, a = e.props, t = a.onPinchingStart, s = a.onZoomStart;
1277
+ if (!n) {
1278
+ var l = Br(e, r);
1279
+ l && (Fr(e, r), X(e), S(b(e), r, t), S(b(e), r, s));
1280
+ }
1281
+ }, this.onPinch = function(r) {
1282
+ var n = e.setup.disabled, a = e.props, t = a.onPinching, s = a.onZoom;
1283
+ if (!n) {
1284
+ var l = Mr(e);
1285
+ l && (r.preventDefault(), r.stopPropagation(), Qr(e, r), S(b(e), r, t), S(b(e), r, s));
1286
+ }
1287
+ }, this.onPinchStop = function(r) {
1288
+ var n = e.props, a = n.onPinchingStop, t = n.onZoomStop;
1289
+ e.pinchStartScale && (qr(e), S(b(e), r, a), S(b(e), r, t));
1290
+ }, this.onTouchPanningStart = function(r) {
1291
+ var n = e.setup.disabled, a = e.props.onPanningStart;
1292
+ if (!n) {
1293
+ var t = Ei(e, r);
1294
+ if (t) {
1295
+ var s = e.lastTouch && +/* @__PURE__ */ new Date() - e.lastTouch < 200;
1296
+ if (s && r.touches.length === 1)
1297
+ e.onDoubleClick(r);
1298
+ else {
1299
+ e.lastTouch = +/* @__PURE__ */ new Date(), X(e);
1300
+ var l = r.touches, d = l.length === 1, u = l.length === 2;
1301
+ d && (X(e), Ri(e, r), S(b(e), r, a)), u && e.onPinchStart(r);
1302
+ }
1303
+ }
1304
+ }
1305
+ }, this.onTouchPanning = function(r) {
1306
+ var n = e.setup.disabled, a = e.props.onPanning;
1307
+ if (e.isPanning && r.touches.length === 1) {
1308
+ if (n)
1309
+ return;
1310
+ var t = Di(e);
1311
+ if (!t)
1312
+ return;
1313
+ r.preventDefault(), r.stopPropagation();
1314
+ var s = r.touches[0];
1315
+ ki(e, s.clientX, s.clientY), S(b(e), r, a);
1316
+ } else
1317
+ r.touches.length > 1 && e.onPinch(r);
1318
+ }, this.onTouchPanningStop = function(r) {
1319
+ e.onPanningStop(r), e.onPinchStop(r);
1320
+ }, this.onDoubleClick = function(r) {
1321
+ var n = e.setup.disabled;
1322
+ if (!n) {
1323
+ var a = Gr(e, r);
1324
+ a && Ur(e, r);
1325
+ }
1326
+ }, this.clearPanning = function(r) {
1327
+ e.isPanning && e.onPanningStop(r);
1328
+ }, this.setKeyPressed = function(r) {
1329
+ e.pressedKeys[r.key] = !0;
1330
+ }, this.setKeyUnPressed = function(r) {
1331
+ e.pressedKeys[r.key] = !1;
1332
+ }, this.isPressingKeys = function(r) {
1333
+ return r.length ? !!r.find(function(n) {
1334
+ return e.pressedKeys[n];
1335
+ }) : !0;
1336
+ }, this.setTransformState = function(r, n, a) {
1337
+ var t = e.props.onTransformed;
1338
+ if (!Number.isNaN(r) && !Number.isNaN(n) && !Number.isNaN(a)) {
1339
+ r !== e.transformState.scale && (e.transformState.previousScale = e.transformState.scale, e.transformState.scale = r), e.transformState.positionX = n, e.transformState.positionY = a, e.applyTransformation();
1340
+ var s = b(e);
1341
+ e.onChangeCallbacks.forEach(function(l) {
1342
+ return l(s);
1343
+ }), S(s, { scale: r, positionX: n, positionY: a }, t);
1344
+ } else
1345
+ console.error("Detected NaN set state values");
1346
+ }, this.setCenter = function() {
1347
+ if (e.wrapperComponent && e.contentComponent) {
1348
+ var r = ee(e.transformState.scale, e.wrapperComponent, e.contentComponent);
1349
+ e.setTransformState(r.scale, r.positionX, r.positionY);
1350
+ }
1351
+ }, this.handleTransformStyles = function(r, n, a) {
1352
+ return e.props.customTransform ? e.props.customTransform(r, n, a) : Or(r, n, a);
1353
+ }, this.applyTransformation = function() {
1354
+ if (!(!e.mounted || !e.contentComponent)) {
1355
+ var r = e.transformState, n = r.scale, a = r.positionX, t = r.positionY, s = e.handleTransformStyles(a, t, n);
1356
+ e.contentComponent.style.transform = s;
1357
+ }
1358
+ }, this.getContext = function() {
1359
+ return b(e);
1360
+ }, this.onChange = function(r) {
1361
+ return e.onChangeCallbacks.has(r) || e.onChangeCallbacks.add(r), function() {
1362
+ e.onChangeCallbacks.delete(r);
1363
+ };
1364
+ }, this.onInit = function(r) {
1365
+ return e.onInitCallbacks.has(r) || e.onInitCallbacks.add(r), function() {
1366
+ e.onInitCallbacks.delete(r);
1367
+ };
1368
+ }, this.init = function(r, n) {
1369
+ e.cleanupWindowEvents(), e.wrapperComponent = r, e.contentComponent = n, k(e, e.transformState.scale), e.handleInitializeWrapperEvents(r), e.handleInitialize(n), e.initializeWindowEvents(), e.isInitialized = !0;
1370
+ var a = b(e);
1371
+ S(a, void 0, e.props.onInit);
1372
+ }, this.props = o, this.setup = Mi(this.props), this.transformState = Gi(this.props);
1373
+ }
1374
+ return i;
1375
+ }()
1376
+ ), J = D.createContext(null), Ir = function(i, o) {
1377
+ return typeof i == "function" ? i(o) : i;
1378
+ }, io = D.forwardRef(function(i, o) {
1379
+ var e = K(new Jr(i)).current, r = Ir(i.children, Q(e));
1380
+ return Ce(o, function() {
1381
+ return Q(e);
1382
+ }, [e]), di(function() {
1383
+ e.update(i);
1384
+ }, [e, i]), D.createElement(J.Provider, { value: e }, r);
1385
+ });
1386
+ D.forwardRef(function(i, o) {
1387
+ var e = K(null), r = fi(J);
1388
+ return di(function() {
1389
+ return r.onChange(function(n) {
1390
+ if (e.current) {
1391
+ var a = 0, t = 0;
1392
+ e.current.style.transform = r.handleTransformStyles(a, t, 1 / n.instance.transformState.scale);
1393
+ }
1394
+ });
1395
+ }, [r]), D.createElement("div", _({}, i, { ref: Wr([e, o]) }));
1396
+ });
1397
+ function eo(i, o) {
1398
+ o === void 0 && (o = {});
1399
+ var e = o.insertAt;
1400
+ if (!(!i || typeof document > "u")) {
1401
+ var r = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
1402
+ n.type = "text/css", e === "top" && r.firstChild ? r.insertBefore(n, r.firstChild) : r.appendChild(n), n.styleSheet ? n.styleSheet.cssText = i : n.appendChild(document.createTextNode(i));
1403
+ }
1404
+ }
1405
+ var ro = `.transform-component-module_wrapper__SPB86 {
1406
+ position: relative;
1407
+ width: -moz-fit-content;
1408
+ width: fit-content;
1409
+ height: -moz-fit-content;
1410
+ height: fit-content;
1411
+ overflow: hidden;
1412
+ -webkit-touch-callout: none; /* iOS Safari */
1413
+ -webkit-user-select: none; /* Safari */
1414
+ -khtml-user-select: none; /* Konqueror HTML */
1415
+ -moz-user-select: none; /* Firefox */
1416
+ -ms-user-select: none; /* Internet Explorer/Edge */
1417
+ user-select: none;
1418
+ margin: 0;
1419
+ padding: 0;
1420
+ }
1421
+ .transform-component-module_content__FBWxo {
1422
+ display: flex;
1423
+ flex-wrap: wrap;
1424
+ width: -moz-fit-content;
1425
+ width: fit-content;
1426
+ height: -moz-fit-content;
1427
+ height: fit-content;
1428
+ margin: 0;
1429
+ padding: 0;
1430
+ transform-origin: 0% 0%;
1431
+ }
1432
+ .transform-component-module_content__FBWxo img {
1433
+ pointer-events: none;
1434
+ }
1435
+ `, Zi = { wrapper: "transform-component-module_wrapper__SPB86", content: "transform-component-module_content__FBWxo" };
1436
+ eo(ro);
1437
+ var oo = function(i) {
1438
+ var o = i.children, e = i.wrapperClass, r = e === void 0 ? "" : e, n = i.contentClass, a = n === void 0 ? "" : n, t = i.wrapperStyle, s = i.contentStyle, l = i.wrapperProps, d = l === void 0 ? {} : l, u = i.contentProps, f = u === void 0 ? {} : u, v = fi(J).init, m = K(null), c = K(null);
1439
+ return di(function() {
1440
+ var h = m.current, g = c.current;
1441
+ h !== null && g !== null && v && v(h, g);
1442
+ }, []), D.createElement(
1443
+ "div",
1444
+ _({}, d, { ref: m, className: "react-transform-wrapper ".concat(Zi.wrapper, " ").concat(r), style: t }),
1445
+ D.createElement("div", _({}, f, { ref: c, className: "react-transform-component ".concat(Zi.content, " ").concat(a), style: s }), o)
1446
+ );
1447
+ }, no = function() {
1448
+ var i = fi(J);
1449
+ if (!i)
1450
+ throw new Error("Transform context must be placed inside TransformWrapper");
1451
+ return i;
1452
+ }, ao = function() {
1453
+ var i = no();
1454
+ return Q(i);
1455
+ }, yi = {}, to = vi;
1456
+ Object.defineProperty(yi, "__esModule", {
1457
+ value: !0
1458
+ });
1459
+ var ae = yi.default = void 0, so = to(pi()), lo = ui, uo = (0, so.default)(/* @__PURE__ */ (0, lo.jsx)("path", {
1460
+ d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
1461
+ }), "Add");
1462
+ ae = yi.default = uo;
1463
+ var Pi = {}, fo = vi;
1464
+ Object.defineProperty(Pi, "__esModule", {
1465
+ value: !0
1466
+ });
1467
+ var te = Pi.default = void 0, po = fo(pi()), vo = ui, mo = (0, po.default)(/* @__PURE__ */ (0, vo.jsx)("path", {
1468
+ d: "M19 13H5v-2h14v2z"
1469
+ }), "Remove");
1470
+ te = Pi.default = mo;
1471
+ var Ti = {}, co = vi;
1472
+ Object.defineProperty(Ti, "__esModule", {
1473
+ value: !0
1474
+ });
1475
+ var se = Ti.default = void 0, ho = co(pi()), go = ui, bo = (0, ho.default)(/* @__PURE__ */ (0, go.jsx)("path", {
1476
+ d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
1477
+ }), "Refresh");
1478
+ se = Ti.default = bo;
1479
+ const So = {
1480
+ position: "relative",
1481
+ borderRadius: "1rem",
1482
+ overflow: "hidden"
1483
+ }, Co = {
1484
+ position: "absolute",
1485
+ zIndex: 1,
1486
+ right: "2rem",
1487
+ bottom: "2rem",
1488
+ width: "fit-content",
1489
+ display: "flex",
1490
+ flexDirection: "column",
1491
+ justifyContent: "flex-end",
1492
+ backgroundColor: "#0F0E0E4D",
1493
+ borderRadius: "5rem"
1494
+ }, ai = {
1495
+ color: "white",
1496
+ "&:focus": {
1497
+ outline: "none"
1498
+ }
1499
+ }, $i = {
1500
+ backgroundColor: "#0000000D",
1501
+ height: "0.0625rem"
1502
+ }, wo = ({
1503
+ controllerContainerProps: i,
1504
+ zoomInButtonProps: o,
1505
+ zoomOutButtonProps: e,
1506
+ resetTransformButtonProps: r,
1507
+ dividerProps: n
1508
+ }) => {
1509
+ const { zoomIn: a, zoomOut: t, resetTransform: s } = ao();
1510
+ function l() {
1511
+ a();
1512
+ }
1513
+ function d() {
1514
+ t();
1515
+ }
1516
+ function u() {
1517
+ s();
1518
+ }
1519
+ return /* @__PURE__ */ Li(
1520
+ Ki,
1521
+ {
1522
+ disableGutters: !0,
1523
+ sx: Co,
1524
+ ...i,
1525
+ children: [
1526
+ /* @__PURE__ */ P(
1527
+ ri,
1528
+ {
1529
+ disableRipple: !0,
1530
+ disableFocusRipple: !0,
1531
+ "aria-label": "Zoom In",
1532
+ onClick: l,
1533
+ sx: ai,
1534
+ ...o,
1535
+ children: /* @__PURE__ */ P(ae, {})
1536
+ }
1537
+ ),
1538
+ /* @__PURE__ */ P(Wi, { sx: $i, ...n }),
1539
+ /* @__PURE__ */ P(
1540
+ ri,
1541
+ {
1542
+ disableFocusRipple: !0,
1543
+ disableRipple: !0,
1544
+ "aria-label": "Zoom Out",
1545
+ onClick: d,
1546
+ sx: ai,
1547
+ ...e,
1548
+ children: /* @__PURE__ */ P(te, {})
1549
+ }
1550
+ ),
1551
+ /* @__PURE__ */ P(Wi, { sx: $i, ...n }),
1552
+ /* @__PURE__ */ P(
1553
+ ri,
1554
+ {
1555
+ disableFocusRipple: !0,
1556
+ disableRipple: !0,
1557
+ "aria-label": "Reset",
1558
+ onClick: u,
1559
+ sx: ai,
1560
+ ...r,
1561
+ children: /* @__PURE__ */ P(se, {})
1562
+ }
1563
+ )
1564
+ ]
1565
+ }
1566
+ );
1567
+ }, _o = ({
1568
+ children: i,
1569
+ parentContainerProps: o,
1570
+ controllerContainerProps: e,
1571
+ zoomInButtonProps: r,
1572
+ zoomOutButtonProps: n,
1573
+ resetTransformButtonProps: a,
1574
+ dividerProps: t
1575
+ }) => /* @__PURE__ */ P(
1576
+ Ki,
1577
+ {
1578
+ disableGutters: !0,
1579
+ sx: So,
1580
+ ...o,
1581
+ children: /* @__PURE__ */ Li(io, { children: [
1582
+ /* @__PURE__ */ P(
1583
+ wo,
1584
+ {
1585
+ controllerContainerProps: e,
1586
+ zoomInButtonProps: r,
1587
+ zoomOutButtonProps: n,
1588
+ resetTransformButtonProps: a,
1589
+ dividerProps: t
1590
+ }
1591
+ ),
1592
+ /* @__PURE__ */ P(oo, { children: i })
1593
+ ] })
1594
+ }
1595
+ );
1596
+ export {
1597
+ _o as default
1598
+ };