sanity-plugin-media 6.2.0 → 6.3.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/index.js CHANGED
@@ -2259,9 +2259,9 @@ const ButtonAssetCopy = (t0) => {
2259
2259
  function getSchemeColor(scheme, colorKey) {
2260
2260
  return SCHEME_COLORS[colorKey]?.[scheme];
2261
2261
  }
2262
- const Image$1 = styled.img.attrs({ crossOrigin: "anonymous" }).withConfig({
2262
+ const Image$1 = styled.img.withConfig({
2263
2263
  displayName: "Image",
2264
- componentId: "sc-ms5kkw-0"
2264
+ componentId: "sc-gwtcwh-0"
2265
2265
  })`--checkerboard-color:${(props) => props.$scheme ? getSchemeColor(props.$scheme, "bg2") : "inherit"};display:block;width:100%;height:100%;object-fit:contain;${(props) => props.$showCheckerboard && css`background-image:linear-gradient(45deg,var(--checkerboard-color) 25%,transparent 25%),linear-gradient(-45deg,var(--checkerboard-color) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--checkerboard-color) 75%),linear-gradient(-45deg,transparent 75%,var(--checkerboard-color) 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0;`}`, StyledErrorOutlineIcon = /* @__PURE__ */ styled(ErrorOutlineIcon).withConfig({
2266
2266
  displayName: "StyledErrorOutlineIcon",
2267
2267
  componentId: "sc-3yqi4g-0"
@@ -2502,7 +2502,7 @@ const Image$1 = styled.img.attrs({ crossOrigin: "anonymous" }).withConfig({
2502
2502
  isLoading: creating,
2503
2503
  isMulti: !0,
2504
2504
  name,
2505
- noOptionsMessage: _temp3$11,
2505
+ noOptionsMessage: _temp3$13,
2506
2506
  onBlur,
2507
2507
  onChange,
2508
2508
  onCreateOption: onCreateTag,
@@ -2531,7 +2531,7 @@ function _temp$37(state) {
2531
2531
  function _temp2$23(state_0) {
2532
2532
  return state_0.tags.fetching;
2533
2533
  }
2534
- function _temp3$11() {
2534
+ function _temp3$13() {
2535
2535
  return "No tags";
2536
2536
  }
2537
2537
  const FormFieldInputText = (props) => {
@@ -2873,7 +2873,7 @@ const DialogAssetEdit = (props) => {
2873
2873
  t19 = !1;
2874
2874
  break bb0;
2875
2875
  }
2876
- let isLocaleObj = _temp3$10, fields = [
2876
+ let isLocaleObj = _temp3$12, fields = [
2877
2877
  currentAsset.title,
2878
2878
  currentAsset.altText,
2879
2879
  currentAsset.description,
@@ -2887,7 +2887,7 @@ const DialogAssetEdit = (props) => {
2887
2887
  t19 = !0;
2888
2888
  break bb0;
2889
2889
  }
2890
- let configuredIds = new Set(locales.map(_temp4$6));
2890
+ let configuredIds = new Set(locales.map(_temp4$7));
2891
2891
  t19 = fields.some((f_0) => isLocaleObj(f_0) ? Object.keys(f_0).some((k) => !configuredIds.has(k)) : !1);
2892
2892
  }
2893
2893
  $[41] = currentAsset, $[42] = locales, $[43] = t19;
@@ -2898,8 +2898,8 @@ const DialogAssetEdit = (props) => {
2898
2898
  let cleanField = (field_1) => {
2899
2899
  if (typeof field_1 != "object" || !field_1 || Array.isArray(field_1)) return field_1;
2900
2900
  let obj_0 = field_1;
2901
- if (!locales || locales.length === 0) return Object.keys(obj_0).sort().map((k_0) => obj_0[k_0]).find(_temp5$4) || "";
2902
- let configuredIds_0 = new Set(locales.map(_temp6$2)), cleaned = {};
2901
+ if (!locales || locales.length === 0) return Object.keys(obj_0).sort().map((k_0) => obj_0[k_0]).find(_temp5$5) || "";
2902
+ let configuredIds_0 = new Set(locales.map(_temp6$3)), cleaned = {};
2903
2903
  for (let [key, val] of Object.entries(obj_0)) configuredIds_0.has(key) && (cleaned[key] = val);
2904
2904
  return cleaned;
2905
2905
  };
@@ -3192,16 +3192,16 @@ function _temp2$22(field_0, t0) {
3192
3192
  let fallback_0 = t0 === void 0 ? "" : t0;
3193
3193
  return typeof field_0 == "string" ? field_0 : typeof field_0 == "object" && field_0 && Object.values(field_0).find(_temp$36) || fallback_0;
3194
3194
  }
3195
- function _temp3$10(v_0) {
3195
+ function _temp3$12(v_0) {
3196
3196
  return typeof v_0 == "object" && !!v_0 && !Array.isArray(v_0);
3197
3197
  }
3198
- function _temp4$6(l) {
3198
+ function _temp4$7(l) {
3199
3199
  return l.id;
3200
3200
  }
3201
- function _temp5$4(v_1) {
3201
+ function _temp5$5(v_1) {
3202
3202
  return v_1;
3203
3203
  }
3204
- function _temp6$2(l_0) {
3204
+ function _temp6$3(l_0) {
3205
3205
  return l_0.id;
3206
3206
  }
3207
3207
  function _temp7$1(tag) {
@@ -3248,20 +3248,49 @@ const selectCombinedItems = createSelector([
3248
3248
  return $[4] === downHandler ? (t2 = $[5], t3 = $[6]) : (t2 = () => (window.addEventListener("keydown", downHandler), window.addEventListener("keyup", upHandler), () => {
3249
3249
  window.removeEventListener("keydown", downHandler), window.removeEventListener("keyup", upHandler);
3250
3250
  }), t3 = [downHandler, upHandler], $[4] = downHandler, $[5] = t2, $[6] = t3), useEffect(t2, t3), keyPressed;
3251
- }, CardWrapper$2 = styled(Flex).withConfig({
3251
+ }, ASSET_DRAG_TYPE = "application/x-sanity-media-assets";
3252
+ /**
3253
+ * Write the dragged asset ids onto the drag event.
3254
+ */
3255
+ function setDragAssetIds(event, assetIds) {
3256
+ event.dataTransfer.setData(ASSET_DRAG_TYPE, JSON.stringify(assetIds)), event.dataTransfer.effectAllowed = "move";
3257
+ }
3258
+ /**
3259
+ * Whether a drag event carries asset ids written by `setDragAssetIds`.
3260
+ *
3261
+ * During `dragover`, browsers hide the data payload but still expose the type list.
3262
+ */
3263
+ function isAssetDrag(event) {
3264
+ return Array.prototype.includes.call(event.dataTransfer.types, ASSET_DRAG_TYPE);
3265
+ }
3266
+ /**
3267
+ * Read the dragged asset ids from a `drop` event. Returns an empty array when the
3268
+ * payload is missing or malformed.
3269
+ */
3270
+ function getDragAssetIds(event) {
3271
+ let raw = event.dataTransfer.getData(ASSET_DRAG_TYPE);
3272
+ if (!raw) return [];
3273
+ try {
3274
+ let parsed = JSON.parse(raw);
3275
+ return Array.isArray(parsed) ? parsed.filter((id) => typeof id == "string") : [];
3276
+ } catch {
3277
+ return [];
3278
+ }
3279
+ }
3280
+ const CardWrapper$2 = styled(Flex).withConfig({
3252
3281
  displayName: "CardWrapper",
3253
- componentId: "sc-paw993-0"
3282
+ componentId: "sc-15kxr0-0"
3254
3283
  })`box-sizing:border-box;height:100%;overflow:hidden;position:relative;width:100%;`, CardContainer = /* @__PURE__ */ styled(Flex).withConfig({
3255
3284
  displayName: "CardContainer",
3256
- componentId: "sc-paw993-1"
3285
+ componentId: "sc-15kxr0-1"
3257
3286
  })(({ $picked, theme, $updating }) => css`border:1px solid transparent;height:100%;pointer-events:${$updating ? "none" : "auto"};position:relative;transition:all 300ms;user-select:none;width:100%;border:${$picked ? `1px solid ${theme.sanity.color.spot.orange} !important` : "1px solid inherit"};${!$updating && css`@media (hover:hover) and (pointer:fine){&:hover{border:1px solid var(--card-border-color);}}`}`), ContextActionContainer$2 = /* @__PURE__ */ styled(Flex).withConfig({
3258
3287
  displayName: "ContextActionContainer",
3259
- componentId: "sc-paw993-2"
3288
+ componentId: "sc-15kxr0-2"
3260
3289
  })(({ $scheme }) => css`cursor:pointer;height:${32}px;transition:all 300ms;@media (hover:hover) and (pointer:fine){&:hover{background:${getSchemeColor($scheme, "bg")};}}`), StyledWarningOutlineIcon = /* @__PURE__ */ styled(WarningFilledIcon).withConfig({
3261
3290
  displayName: "StyledWarningOutlineIcon",
3262
- componentId: "sc-paw993-3"
3291
+ componentId: "sc-15kxr0-3"
3263
3292
  })(({ theme }) => ({ color: theme.sanity.color.spot.red })), CardAsset = (props) => {
3264
- let $ = c(83), { id, selected, source } = props, scheme = useColorSchemeValue(), toast = useToast(), shiftPressed = useKeyPress("shift"), dispatch = useDispatch(), lastPicked = useTypedSelector(_temp$35), assetsPicked = useTypedSelector(selectAssetsPicked), t0;
3293
+ let $ = c(89), { id, selected, source } = props, scheme = useColorSchemeValue(), toast = useToast(), shiftPressed = useKeyPress("shift"), dispatch = useDispatch(), lastPicked = useTypedSelector(_temp$35), assetsPicked = useTypedSelector(selectAssetsPicked), t0;
3265
3294
  $[0] === id ? t0 = $[1] : (t0 = (state_0) => selectAssetById(state_0, id), $[0] = id, $[1] = t0);
3266
3295
  let item = useTypedSelector(t0), t1;
3267
3296
  $[2] === source ? t1 = $[3] : (t1 = (state_1) => {
@@ -3298,6 +3327,9 @@ const selectCombinedItems = createSelector([
3298
3327
  })) : dispatch(assetsActions.pick({
3299
3328
  assetId: asset._id,
3300
3329
  picked: !picked
3330
+ })) : e.ctrlKey || e.metaKey ? dispatch(assetsActions.pick({
3331
+ assetId: asset._id,
3332
+ picked: !picked
3301
3333
  })) : shiftPressed.current ? dispatch(picked ? assetsActions.pick({
3302
3334
  assetId: asset._id,
3303
3335
  picked: !picked
@@ -3320,23 +3352,27 @@ const selectCombinedItems = createSelector([
3320
3352
  picked: !picked
3321
3353
  })));
3322
3354
  }, $[23] = asset._id, $[24] = dispatch, $[25] = handleReplaceAsset, $[26] = isMultiSelect, $[27] = lastPicked, $[28] = onSelect, $[29] = picked, $[30] = selected, $[31] = shiftPressed, $[32] = source, $[33] = t5) : t5 = $[33];
3323
- let handleContextActionClick = t5, opacityContainer = updating ? .5 : 1, opacityPreview = selected || updating ? .25 : 1, t6 = selected ? "default" : "pointer", t7;
3324
- $[34] === t6 ? t7 = $[35] : (t7 = {
3325
- cursor: t6,
3355
+ let handleContextActionClick = t5, draggable = !selected && !updating && source !== "replace-asset", t6;
3356
+ $[34] !== asset._id || $[35] !== assetsPicked || $[36] !== picked ? (t6 = (e_1) => {
3357
+ setDragAssetIds(e_1, picked ? assetsPicked.map(_temp3$11) : [asset._id]);
3358
+ }, $[34] = asset._id, $[35] = assetsPicked, $[36] = picked, $[37] = t6) : t6 = $[37];
3359
+ let handleDragStart = t6, opacityContainer = updating ? .5 : 1, opacityPreview = selected || updating ? .25 : 1, t7 = draggable ? handleDragStart : void 0, t8 = selected ? "default" : "pointer", t9;
3360
+ $[38] === t8 ? t9 = $[39] : (t9 = {
3361
+ cursor: t8,
3326
3362
  position: "relative"
3327
- }, $[34] = t6, $[35] = t7);
3328
- let t8 = `media-asset-card-${asset._id}`, t9;
3329
- $[36] === opacityPreview ? t9 = $[37] : (t9 = {
3363
+ }, $[38] = t8, $[39] = t9);
3364
+ let t10 = `media-asset-card-${asset._id}`, t11;
3365
+ $[40] === opacityPreview ? t11 = $[41] : (t11 = {
3330
3366
  height: "100%",
3331
3367
  opacity: opacityPreview
3332
- }, $[36] = opacityPreview, $[37] = t9);
3333
- let t10;
3334
- $[38] === asset ? t10 = $[39] : (t10 = isFileAsset(asset) && /* @__PURE__ */ jsx(FileIcon$1, {
3368
+ }, $[40] = opacityPreview, $[41] = t11);
3369
+ let t12;
3370
+ $[42] === asset ? t12 = $[43] : (t12 = isFileAsset(asset) && /* @__PURE__ */ jsx(FileIcon$1, {
3335
3371
  extension: asset.extension,
3336
3372
  width: "80px"
3337
- }), $[38] = asset, $[39] = t10);
3338
- let t11;
3339
- $[40] !== asset || $[41] !== isOpaque || $[42] !== scheme ? (t11 = isImageAsset(asset) && /* @__PURE__ */ jsx(Image$1, {
3373
+ }), $[42] = asset, $[43] = t12);
3374
+ let t13;
3375
+ $[44] !== asset || $[45] !== isOpaque || $[46] !== scheme ? (t13 = isImageAsset(asset) && /* @__PURE__ */ jsx(Image$1, {
3340
3376
  draggable: !1,
3341
3377
  $scheme: scheme,
3342
3378
  $showCheckerboard: !isOpaque,
@@ -3348,16 +3384,16 @@ const selectCombinedItems = createSelector([
3348
3384
  draggable: !1,
3349
3385
  transition: "opacity 1000ms"
3350
3386
  }
3351
- }), $[40] = asset, $[41] = isOpaque, $[42] = scheme, $[43] = t11) : t11 = $[43];
3352
- let t12;
3353
- $[44] !== handleAssetClick || $[45] !== t10 || $[46] !== t11 || $[47] !== t8 || $[48] !== t9 ? (t12 = /* @__PURE__ */ jsxs("div", {
3354
- "data-testid": t8,
3387
+ }), $[44] = asset, $[45] = isOpaque, $[46] = scheme, $[47] = t13) : t13 = $[47];
3388
+ let t14;
3389
+ $[48] !== handleAssetClick || $[49] !== t10 || $[50] !== t11 || $[51] !== t12 || $[52] !== t13 ? (t14 = /* @__PURE__ */ jsxs("div", {
3390
+ "data-testid": t10,
3355
3391
  onClick: handleAssetClick,
3356
- style: t9,
3357
- children: [t10, t11]
3358
- }), $[44] = handleAssetClick, $[45] = t10, $[46] = t11, $[47] = t8, $[48] = t9, $[49] = t12) : t12 = $[49];
3359
- let t13;
3360
- $[50] !== opacityContainer || $[51] !== selected || $[52] !== updating ? (t13 = selected && !updating && /* @__PURE__ */ jsx(Flex, {
3392
+ style: t11,
3393
+ children: [t12, t13]
3394
+ }), $[48] = handleAssetClick, $[49] = t10, $[50] = t11, $[51] = t12, $[52] = t13, $[53] = t14) : t14 = $[53];
3395
+ let t15;
3396
+ $[54] !== opacityContainer || $[55] !== selected || $[56] !== updating ? (t15 = selected && !updating && /* @__PURE__ */ jsx(Flex, {
3361
3397
  align: "center",
3362
3398
  justify: "center",
3363
3399
  style: {
@@ -3372,9 +3408,9 @@ const selectCombinedItems = createSelector([
3372
3408
  size: 2,
3373
3409
  children: /* @__PURE__ */ jsx(CheckmarkCircleIcon, {})
3374
3410
  })
3375
- }), $[50] = opacityContainer, $[51] = selected, $[52] = updating, $[53] = t13) : t13 = $[53];
3376
- let t14;
3377
- $[54] === updating ? t14 = $[55] : (t14 = updating && /* @__PURE__ */ jsx(Flex, {
3411
+ }), $[54] = opacityContainer, $[55] = selected, $[56] = updating, $[57] = t15) : t15 = $[57];
3412
+ let t16;
3413
+ $[58] === updating ? t16 = $[59] : (t16 = updating && /* @__PURE__ */ jsx(Flex, {
3378
3414
  align: "center",
3379
3415
  justify: "center",
3380
3416
  style: {
@@ -3385,21 +3421,21 @@ const selectCombinedItems = createSelector([
3385
3421
  width: "100%"
3386
3422
  },
3387
3423
  children: /* @__PURE__ */ jsx(Spinner, {})
3388
- }), $[54] = updating, $[55] = t14);
3389
- let t15;
3390
- $[56] !== t12 || $[57] !== t13 || $[58] !== t14 || $[59] !== t7 ? (t15 = /* @__PURE__ */ jsxs(Box, {
3424
+ }), $[58] = updating, $[59] = t16);
3425
+ let t17;
3426
+ $[60] !== t14 || $[61] !== t15 || $[62] !== t16 || $[63] !== t9 ? (t17 = /* @__PURE__ */ jsxs(Box, {
3391
3427
  flex: 1,
3392
- style: t7,
3428
+ style: t9,
3393
3429
  children: [
3394
- t12,
3395
- t13,
3396
- t14
3430
+ t14,
3431
+ t15,
3432
+ t16
3397
3433
  ]
3398
- }), $[56] = t12, $[57] = t13, $[58] = t14, $[59] = t7, $[60] = t15) : t15 = $[60];
3399
- let t16;
3400
- $[61] === opacityContainer ? t16 = $[62] : (t16 = { opacity: opacityContainer }, $[61] = opacityContainer, $[62] = t16);
3401
- let t17;
3402
- $[63] !== isMultiSelect || $[64] !== onSelect || $[65] !== picked ? (t17 = onSelect && !isMultiSelect ? /* @__PURE__ */ jsx(EditIcon, { style: {
3434
+ }), $[60] = t14, $[61] = t15, $[62] = t16, $[63] = t9, $[64] = t17) : t17 = $[64];
3435
+ let t18;
3436
+ $[65] === opacityContainer ? t18 = $[66] : (t18 = { opacity: opacityContainer }, $[65] = opacityContainer, $[66] = t18);
3437
+ let t19;
3438
+ $[67] !== isMultiSelect || $[68] !== onSelect || $[69] !== picked ? (t19 = onSelect && !isMultiSelect ? /* @__PURE__ */ jsx(EditIcon, { style: {
3403
3439
  flexShrink: 0,
3404
3440
  opacity: .5
3405
3441
  } }) : /* @__PURE__ */ jsx(Checkbox, {
@@ -3410,9 +3446,9 @@ const selectCombinedItems = createSelector([
3410
3446
  pointerEvents: "none",
3411
3447
  transform: "scale(0.8)"
3412
3448
  }
3413
- }), $[63] = isMultiSelect, $[64] = onSelect, $[65] = picked, $[66] = t17) : t17 = $[66];
3414
- let t18;
3415
- $[67] === asset.originalFilename ? t18 = $[68] : (t18 = /* @__PURE__ */ jsx(Box, {
3449
+ }), $[67] = isMultiSelect, $[68] = onSelect, $[69] = picked, $[70] = t19) : t19 = $[70];
3450
+ let t20;
3451
+ $[71] === asset.originalFilename ? t20 = $[72] : (t20 = /* @__PURE__ */ jsx(Box, {
3416
3452
  marginLeft: 2,
3417
3453
  children: /* @__PURE__ */ jsx(Text, {
3418
3454
  muted: !0,
@@ -3420,18 +3456,18 @@ const selectCombinedItems = createSelector([
3420
3456
  textOverflow: "ellipsis",
3421
3457
  children: asset.originalFilename
3422
3458
  })
3423
- }), $[67] = asset.originalFilename, $[68] = t18);
3424
- let t19;
3425
- $[69] !== handleContextActionClick || $[70] !== scheme || $[71] !== t16 || $[72] !== t17 || $[73] !== t18 ? (t19 = /* @__PURE__ */ jsxs(ContextActionContainer$2, {
3459
+ }), $[71] = asset.originalFilename, $[72] = t20);
3460
+ let t21;
3461
+ $[73] !== handleContextActionClick || $[74] !== scheme || $[75] !== t18 || $[76] !== t19 || $[77] !== t20 ? (t21 = /* @__PURE__ */ jsxs(ContextActionContainer$2, {
3426
3462
  align: "center",
3427
3463
  onClick: handleContextActionClick,
3428
3464
  paddingX: 1,
3429
3465
  $scheme: scheme,
3430
- style: t16,
3431
- children: [t17, t18]
3432
- }), $[69] = handleContextActionClick, $[70] = scheme, $[71] = t16, $[72] = t17, $[73] = t18, $[74] = t19) : t19 = $[74];
3433
- let t20;
3434
- $[75] === error ? t20 = $[76] : (t20 = error && /* @__PURE__ */ jsx(Box, {
3466
+ style: t18,
3467
+ children: [t19, t20]
3468
+ }), $[73] = handleContextActionClick, $[74] = scheme, $[75] = t18, $[76] = t19, $[77] = t20, $[78] = t21) : t21 = $[78];
3469
+ let t22;
3470
+ $[79] === error ? t22 = $[80] : (t22 = error && /* @__PURE__ */ jsx(Box, {
3435
3471
  padding: 3,
3436
3472
  style: {
3437
3473
  position: "absolute",
@@ -3455,21 +3491,23 @@ const selectCombinedItems = createSelector([
3455
3491
  children: /* @__PURE__ */ jsx(StyledWarningOutlineIcon, { color: "critical" })
3456
3492
  })
3457
3493
  })
3458
- }), $[75] = error, $[76] = t20);
3459
- let t21;
3460
- return $[77] !== item.updating || $[78] !== picked || $[79] !== t15 || $[80] !== t19 || $[81] !== t20 ? (t21 = /* @__PURE__ */ jsx(CardWrapper$2, {
3494
+ }), $[79] = error, $[80] = t22);
3495
+ let t23;
3496
+ return $[81] !== draggable || $[82] !== item.updating || $[83] !== picked || $[84] !== t17 || $[85] !== t21 || $[86] !== t22 || $[87] !== t7 ? (t23 = /* @__PURE__ */ jsx(CardWrapper$2, {
3461
3497
  padding: 1,
3462
3498
  children: /* @__PURE__ */ jsxs(CardContainer, {
3463
3499
  direction: "column",
3500
+ draggable,
3501
+ onDragStart: t7,
3464
3502
  $picked: picked,
3465
3503
  $updating: item.updating,
3466
3504
  children: [
3467
- t15,
3468
- t19,
3469
- t20
3505
+ t17,
3506
+ t21,
3507
+ t22
3470
3508
  ]
3471
3509
  })
3472
- }), $[77] = item.updating, $[78] = picked, $[79] = t15, $[80] = t19, $[81] = t20, $[82] = t21) : t21 = $[82], t21;
3510
+ }), $[81] = draggable, $[82] = item.updating, $[83] = picked, $[84] = t17, $[85] = t21, $[86] = t22, $[87] = t7, $[88] = t23) : t23 = $[88], t23;
3473
3511
  };
3474
3512
  var CardAsset_default = memo(CardAsset);
3475
3513
  function _temp$35(state) {
@@ -3478,6 +3516,9 @@ function _temp$35(state) {
3478
3516
  function _temp2$21(d) {
3479
3517
  return d.type === "dialogAllAssets";
3480
3518
  }
3519
+ function _temp3$11(pickedItem) {
3520
+ return pickedItem.asset._id;
3521
+ }
3481
3522
  const CardWrapper$1 = styled(Flex).withConfig({
3482
3523
  displayName: "CardWrapper",
3483
3524
  componentId: "sc-52xpdk-0"
@@ -3968,7 +4009,7 @@ function omitFacetId(facet) {
3968
4009
  return withoutId;
3969
4010
  }
3970
4011
  const ReplaceAssetsOverview = () => {
3971
- let $ = c(36), dispatch = useDispatch(), store = useStore(), combinedItems = useTypedSelector(selectCombinedItems), assetsById = useTypedSelector(_temp$33), fetchCount = useTypedSelector(_temp2$19), fetching = useTypedSelector(_temp3$9), fetchingError = useTypedSelector(_temp4$5), pageSize = useTypedSelector(_temp5$3), searchQuery = useTypedSelector(_temp6$1), searchFacets = useTypedSelector(_temp7), currentFolderId = useTypedSelector(_temp8), currentFolderUnfiled = useTypedSelector(_temp9), assetToReplaceId = useTypedSelector(_temp11), savedBrowserStateRef = useRef(null), t0;
4012
+ let $ = c(36), dispatch = useDispatch(), store = useStore(), combinedItems = useTypedSelector(selectCombinedItems), assetsById = useTypedSelector(_temp$33), fetchCount = useTypedSelector(_temp2$19), fetching = useTypedSelector(_temp3$10), fetchingError = useTypedSelector(_temp4$6), pageSize = useTypedSelector(_temp5$4), searchQuery = useTypedSelector(_temp6$2), searchFacets = useTypedSelector(_temp7), currentFolderId = useTypedSelector(_temp8), currentFolderUnfiled = useTypedSelector(_temp9), assetToReplaceId = useTypedSelector(_temp11), savedBrowserStateRef = useRef(null), t0;
3972
4013
  $[0] !== currentFolderId || $[1] !== currentFolderUnfiled || $[2] !== searchFacets || $[3] !== searchQuery.length ? (t0 = () => searchQuery.length > 0 || searchFacets.length > 0 || !!currentFolderId || currentFolderUnfiled, $[0] = currentFolderId, $[1] = currentFolderUnfiled, $[2] = searchFacets, $[3] = searchQuery.length, $[4] = t0) : t0 = $[4];
3973
4014
  let [awaitingRefetch, setAwaitingRefetch] = useState(t0), t1, t2;
3974
4015
  $[5] !== dispatch || $[6] !== store ? (t1 = () => {
@@ -4055,16 +4096,16 @@ function _temp$33(state) {
4055
4096
  function _temp2$19(state_0) {
4056
4097
  return state_0.assets.fetchCount;
4057
4098
  }
4058
- function _temp3$9(state_1) {
4099
+ function _temp3$10(state_1) {
4059
4100
  return state_1.assets.fetching;
4060
4101
  }
4061
- function _temp4$5(state_2) {
4102
+ function _temp4$6(state_2) {
4062
4103
  return state_2.assets.fetchingError;
4063
4104
  }
4064
- function _temp5$3(state_3) {
4105
+ function _temp5$4(state_3) {
4065
4106
  return state_3.assets.pageSize;
4066
4107
  }
4067
- function _temp6$1(state_4) {
4108
+ function _temp6$2(state_4) {
4068
4109
  return state_4.search.query;
4069
4110
  }
4070
4111
  function _temp7(state_5) {
@@ -4546,7 +4587,10 @@ const getExpandedIdSet = (folderId, byId) => {
4546
4587
  expanded.add(cursor), cursor = node.parentId;
4547
4588
  }
4548
4589
  return expanded;
4549
- }, FolderHeaderAction = (t0) => {
4590
+ }, DropTree = styled(Tree).withConfig({
4591
+ displayName: "DropTree",
4592
+ componentId: "sc-0bwz5x-0"
4593
+ })`[data-drop-target] > [data-ui='TreeItem__box']{box-shadow:inset 0 0 0 2px var(--card-focus-ring-color);}`, ROOT_DROP_TARGET_ID = "__all-assets", FolderHeaderAction = (t0) => {
4550
4594
  let $ = c(11), { disabled: t1, icon, onClick, tone: t2, tooltip } = t0, disabled = t1 !== void 0 && t1, tone = t2 === void 0 ? "default" : t2, t3;
4551
4595
  $[0] === tooltip ? t3 = $[1] : (t3 = /* @__PURE__ */ jsx(Container, {
4552
4596
  padding: 2,
@@ -4637,140 +4681,191 @@ const getExpandedIdSet = (folderId, byId) => {
4637
4681
  children: [t5, t7]
4638
4682
  }), $[9] = t5, $[10] = t7, $[11] = t8) : t8 = $[11], t8;
4639
4683
  }, FolderNode = (t0) => {
4640
- let $ = c(23), { currentFolderId, expandedIds, node, onSelect } = t0, hasChildren = node.children.length > 0, selected = currentFolderId === node.id, t1;
4684
+ let $ = c(30), { currentFolderId, dropTargetId, expandedIds, getDropTargetHandlers, node, onSelect } = t0, hasChildren = node.children.length > 0, selected = currentFolderId === node.id, isDropTarget = dropTargetId === node.id, t1;
4641
4685
  $[0] !== expandedIds || $[1] !== node.id ? (t1 = expandedIds.has(node.id), $[0] = expandedIds, $[1] = node.id, $[2] = t1) : t1 = $[2];
4642
- let t2;
4643
- $[3] !== node.id || $[4] !== onSelect ? (t2 = () => onSelect(node.id), $[3] = node.id, $[4] = onSelect, $[5] = t2) : t2 = $[5];
4644
- let t3;
4645
- $[6] !== node.name || $[7] !== node.totalCount ? (t3 = /* @__PURE__ */ jsx(FolderItemText, {
4686
+ let t2 = node.id, t3;
4687
+ $[3] !== node.id || $[4] !== onSelect ? (t3 = () => onSelect(node.id), $[3] = node.id, $[4] = onSelect, $[5] = t3) : t3 = $[5];
4688
+ let t4 = isDropTarget ? "" : void 0, t5;
4689
+ $[6] !== node.name || $[7] !== node.totalCount ? (t5 = /* @__PURE__ */ jsx(FolderItemText, {
4646
4690
  name: node.name,
4647
4691
  totalCount: node.totalCount
4648
- }), $[6] = node.name, $[7] = node.totalCount, $[8] = t3) : t3 = $[8];
4649
- let t4 = selected ? "semibold" : "medium", t5;
4650
- $[9] !== currentFolderId || $[10] !== expandedIds || $[11] !== hasChildren || $[12] !== node.children || $[13] !== onSelect ? (t5 = hasChildren && node.children.map((childNode) => /* @__PURE__ */ jsx(FolderNode, {
4692
+ }), $[6] = node.name, $[7] = node.totalCount, $[8] = t5) : t5 = $[8];
4693
+ let t6 = selected ? "semibold" : "medium", t7;
4694
+ $[9] !== getDropTargetHandlers || $[10] !== node.id ? (t7 = getDropTargetHandlers(node.id), $[9] = getDropTargetHandlers, $[10] = node.id, $[11] = t7) : t7 = $[11];
4695
+ let t8;
4696
+ $[12] !== currentFolderId || $[13] !== dropTargetId || $[14] !== expandedIds || $[15] !== getDropTargetHandlers || $[16] !== hasChildren || $[17] !== node.children || $[18] !== onSelect ? (t8 = hasChildren && node.children.map((childNode) => /* @__PURE__ */ jsx(FolderNode, {
4651
4697
  currentFolderId,
4698
+ dropTargetId,
4652
4699
  expandedIds,
4700
+ getDropTargetHandlers,
4653
4701
  node: childNode,
4654
4702
  onSelect
4655
- }, childNode.id)), $[9] = currentFolderId, $[10] = expandedIds, $[11] = hasChildren, $[12] = node.children, $[13] = onSelect, $[14] = t5) : t5 = $[14];
4656
- let t6;
4657
- return $[15] !== node.id || $[16] !== selected || $[17] !== t1 || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== t5 ? (t6 = /* @__PURE__ */ jsx(TreeItem, {
4703
+ }, childNode.id)), $[12] = currentFolderId, $[13] = dropTargetId, $[14] = expandedIds, $[15] = getDropTargetHandlers, $[16] = hasChildren, $[17] = node.children, $[18] = onSelect, $[19] = t8) : t8 = $[19];
4704
+ let t9;
4705
+ return $[20] !== node.id || $[21] !== selected || $[22] !== t1 || $[23] !== t3 || $[24] !== t4 || $[25] !== t5 || $[26] !== t6 || $[27] !== t7 || $[28] !== t8 ? (t9 = /* @__PURE__ */ jsx(TreeItem, {
4658
4706
  expanded: t1,
4659
- id: node.id,
4660
- onClick: t2,
4707
+ id: t2,
4708
+ onClick: t3,
4709
+ "data-drop-target": t4,
4661
4710
  selected,
4662
- text: t3,
4663
- weight: t4,
4664
- children: t5
4665
- }), $[15] = node.id, $[16] = selected, $[17] = t1, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = t5, $[22] = t6) : t6 = $[22], t6;
4711
+ text: t5,
4712
+ weight: t6,
4713
+ ...t7,
4714
+ children: t8
4715
+ }), $[20] = node.id, $[21] = selected, $[22] = t1, $[23] = t3, $[24] = t4, $[25] = t5, $[26] = t6, $[27] = t7, $[28] = t8, $[29] = t9) : t9 = $[29], t9;
4666
4716
  }, FolderView = () => {
4667
- let $ = c(63), dispatch = useDispatch(), currentFolderId = useTypedSelector(_temp$29), byId = useTypedSelector(_temp2$16), canDeleteFolder = useTypedSelector(selectCanDeleteFolder), fetching = useTypedSelector(_temp3$8), folderTree = useTypedSelector(selectFolderTree), currentFolder = currentFolderId ? byId[currentFolderId] : null, t0;
4717
+ let $ = c(114), dispatch = useDispatch(), currentFolderId = useTypedSelector(_temp$29), assetsById = useTypedSelector(_temp2$16), byId = useTypedSelector(_temp3$9), canDeleteFolder = useTypedSelector(selectCanDeleteFolder), fetching = useTypedSelector(_temp4$5), folderTree = useTypedSelector(selectFolderTree), currentFolder = currentFolderId ? byId[currentFolderId] : null, t0;
4668
4718
  $[0] !== byId || $[1] !== currentFolderId ? (t0 = getExpandedIdSet(currentFolderId, byId), $[0] = byId, $[1] = currentFolderId, $[2] = t0) : t0 = $[2];
4669
4719
  let expandedIds = t0, t1;
4670
4720
  $[3] === expandedIds ? t1 = $[4] : (t1 = Array.from(expandedIds).join("|") || "root", $[3] = expandedIds, $[4] = t1);
4671
- let treeKey = t1, hasFolders = folderTree.length > 0, t2;
4672
- $[5] === dispatch ? t2 = $[6] : (t2 = (folderId) => {
4673
- dispatch(foldersActions.currentFolderSet({ folderId }));
4674
- }, $[5] = dispatch, $[6] = t2);
4675
- let handleFolderSelect = t2, t3;
4676
- $[7] !== currentFolder || $[8] !== currentFolderId || $[9] !== dispatch ? (t3 = () => {
4677
- !currentFolderId || !currentFolder || dispatch(dialogActions.showConfirmDeleteFolder({
4678
- folderId: currentFolderId,
4679
- folderName: currentFolder.name
4680
- }));
4681
- }, $[7] = currentFolder, $[8] = currentFolderId, $[9] = dispatch, $[10] = t3) : t3 = $[10];
4682
- let handleFolderDelete = t3, t4;
4683
- $[11] === Symbol.for("react.memo_cache_sentinel") ? (t4 = {
4684
- borderBottom: "1px solid var(--card-border-color)",
4685
- flexShrink: 0,
4686
- height: "32px"
4687
- }, $[11] = t4) : t4 = $[11];
4721
+ let treeKey = t1, hasFolders = folderTree.length > 0, [dropTargetId, setDropTargetId] = useState(null), t2;
4722
+ $[5] === Symbol.for("react.memo_cache_sentinel") ? (t2 = /* @__PURE__ */ new Map(), $[5] = t2) : t2 = $[5];
4723
+ let dragDepth = useRef(t2), t3, t4;
4724
+ $[6] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
4725
+ let handleDragEnd = () => {
4726
+ dragDepth.current.clear(), setDropTargetId(null);
4727
+ };
4728
+ return window.addEventListener("dragend", handleDragEnd), () => window.removeEventListener("dragend", handleDragEnd);
4729
+ }, t4 = [], $[6] = t3, $[7] = t4) : (t3 = $[6], t4 = $[7]), useEffect(t3, t4);
4688
4730
  let t5;
4689
- $[12] === Symbol.for("react.memo_cache_sentinel") ? (t5 = /* @__PURE__ */ jsx(Label, {
4690
- size: 0,
4691
- children: "Folders"
4692
- }), $[12] = t5) : t5 = $[12];
4693
- let t6;
4694
- $[13] === fetching ? t6 = $[14] : (t6 = fetching && /* @__PURE__ */ jsx(Label, {
4695
- size: 0,
4696
- style: { opacity: .3 },
4697
- children: "Loading..."
4698
- }), $[13] = fetching, $[14] = t6);
4699
- let t7;
4700
- $[15] === t6 ? t7 = $[16] : (t7 = /* @__PURE__ */ jsx(Box, {
4701
- flex: 1,
4702
- children: /* @__PURE__ */ jsxs(Inline, {
4703
- gap: 2,
4704
- children: [t5, t6]
4705
- })
4706
- }), $[15] = t6, $[16] = t7);
4707
- let t8;
4708
- $[17] !== currentFolderId || $[18] !== dispatch ? (t8 = currentFolderId && /* @__PURE__ */ jsx(FolderHeaderAction, {
4709
- icon: /* @__PURE__ */ jsx(EditIcon, {}),
4710
- onClick: () => dispatch(DIALOG_ACTIONS.showFolderRename({ folderId: currentFolderId })),
4711
- tone: "primary",
4712
- tooltip: "Rename folder"
4713
- }), $[17] = currentFolderId, $[18] = dispatch, $[19] = t8) : t8 = $[19];
4714
- let t9;
4715
- $[20] === Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsx(AddIcon, {}), $[20] = t9) : t9 = $[20];
4716
- let t10;
4717
- $[21] !== currentFolderId || $[22] !== dispatch ? (t10 = /* @__PURE__ */ jsx(FolderHeaderAction, {
4718
- icon: t9,
4719
- onClick: () => dispatch(DIALOG_ACTIONS.showFolderCreate({ parentFolderId: currentFolderId || null })),
4720
- tone: "primary",
4721
- tooltip: "Create folder"
4722
- }), $[21] = currentFolderId, $[22] = dispatch, $[23] = t10) : t10 = $[23];
4723
- let t11;
4724
- $[24] !== canDeleteFolder || $[25] !== currentFolderId || $[26] !== handleFolderDelete ? (t11 = currentFolderId && canDeleteFolder && /* @__PURE__ */ jsx(FolderHeaderAction, {
4725
- icon: /* @__PURE__ */ jsx(TrashIcon, {}),
4726
- onClick: handleFolderDelete,
4727
- tone: "critical",
4728
- tooltip: "Delete folder"
4729
- }), $[24] = canDeleteFolder, $[25] = currentFolderId, $[26] = handleFolderDelete, $[27] = t11) : t11 = $[27];
4730
- let t12;
4731
- $[28] !== t10 || $[29] !== t11 || $[30] !== t8 ? (t12 = /* @__PURE__ */ jsxs(Inline, {
4732
- gap: 1,
4733
- children: [
4734
- t8,
4735
- t10,
4736
- t11
4737
- ]
4738
- }), $[28] = t10, $[29] = t11, $[30] = t8, $[31] = t12) : t12 = $[31];
4739
- let t13;
4740
- $[32] !== t12 || $[33] !== t7 ? (t13 = /* @__PURE__ */ jsxs(Flex, {
4741
- align: "center",
4742
- justify: "space-between",
4743
- paddingX: 3,
4744
- style: t4,
4745
- children: [t7, t12]
4746
- }), $[32] = t12, $[33] = t7, $[34] = t13) : t13 = $[34];
4747
- let t14;
4748
- $[35] === dispatch ? t14 = $[36] : (t14 = () => dispatch(foldersActions.currentFolderClear()), $[35] = dispatch, $[36] = t14);
4749
- let t15 = currentFolderId === null, t16 = currentFolderId === null ? "semibold" : "medium", t17;
4750
- $[37] !== t14 || $[38] !== t15 || $[39] !== t16 ? (t17 = /* @__PURE__ */ jsx(TreeItem, {
4751
- id: "__all-assets",
4752
- onClick: t14,
4753
- selected: t15,
4754
- text: "All assets",
4755
- weight: t16
4756
- }), $[37] = t14, $[38] = t15, $[39] = t16, $[40] = t17) : t17 = $[40];
4757
- let t18;
4758
- if ($[41] !== currentFolderId || $[42] !== expandedIds || $[43] !== folderTree || $[44] !== handleFolderSelect) {
4759
- let t19;
4760
- $[46] !== currentFolderId || $[47] !== expandedIds || $[48] !== handleFolderSelect ? (t19 = (node) => /* @__PURE__ */ jsx(FolderNode, {
4731
+ $[8] === dispatch ? t5 = $[9] : (t5 = (folderId) => {
4732
+ dispatch(foldersActions.currentFolderSet({ folderId }));
4733
+ }, $[8] = dispatch, $[9] = t5);
4734
+ let handleFolderSelect = t5, T0, T1, T2, T3, T4, getDropTargetHandlers, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t6, t7, t8, t9;
4735
+ if ($[10] !== assetsById || $[11] !== canDeleteFolder || $[12] !== currentFolder || $[13] !== currentFolderId || $[14] !== dispatch || $[15] !== dropTargetId || $[16] !== fetching || $[17] !== treeKey) {
4736
+ getDropTargetHandlers = (folderId_0) => {
4737
+ let targetId = folderId_0 ?? ROOT_DROP_TARGET_ID;
4738
+ return {
4739
+ onDragEnter: (e) => {
4740
+ if (!isAssetDrag(e)) return;
4741
+ e.preventDefault(), e.stopPropagation();
4742
+ let depth = (dragDepth.current.get(targetId) ?? 0) + 1;
4743
+ dragDepth.current.set(targetId, depth), setDropTargetId(targetId);
4744
+ },
4745
+ onDragOver: _temp5$3,
4746
+ onDragLeave: (e_1) => {
4747
+ if (!isAssetDrag(e_1)) return;
4748
+ e_1.stopPropagation();
4749
+ let depth_0 = (dragDepth.current.get(targetId) ?? 0) - 1;
4750
+ if (depth_0 > 0) {
4751
+ dragDepth.current.set(targetId, depth_0);
4752
+ return;
4753
+ }
4754
+ dragDepth.current.delete(targetId), setDropTargetId((current) => current === targetId ? null : current);
4755
+ },
4756
+ onDrop: (e_2) => {
4757
+ if (!isAssetDrag(e_2)) return;
4758
+ e_2.preventDefault(), e_2.stopPropagation(), dragDepth.current.clear(), setDropTargetId(null);
4759
+ let assets = getDragAssetIds(e_2).map((assetId) => assetsById[assetId]).filter(_temp6$1).filter((item_0) => (item_0.asset.opt?.media?.folder?._ref ?? null) !== folderId_0);
4760
+ assets.length !== 0 && dispatch(assetsActions.folderSetRequest({
4761
+ assets,
4762
+ folderId: folderId_0
4763
+ }));
4764
+ }
4765
+ };
4766
+ };
4767
+ let t20;
4768
+ $[38] !== currentFolder || $[39] !== currentFolderId || $[40] !== dispatch ? (t20 = () => {
4769
+ !currentFolderId || !currentFolder || dispatch(dialogActions.showConfirmDeleteFolder({
4770
+ folderId: currentFolderId,
4771
+ folderName: currentFolder.name
4772
+ }));
4773
+ }, $[38] = currentFolder, $[39] = currentFolderId, $[40] = dispatch, $[41] = t20) : t20 = $[41];
4774
+ let handleFolderDelete = t20;
4775
+ T4 = Flex, t16 = "column", t17 = 1, t18 = "fill";
4776
+ let t21;
4777
+ $[42] === Symbol.for("react.memo_cache_sentinel") ? (t21 = {
4778
+ borderBottom: "1px solid var(--card-border-color)",
4779
+ flexShrink: 0,
4780
+ height: "32px"
4781
+ }, $[42] = t21) : t21 = $[42];
4782
+ let t22;
4783
+ $[43] === Symbol.for("react.memo_cache_sentinel") ? (t22 = /* @__PURE__ */ jsx(Label, {
4784
+ size: 0,
4785
+ children: "Folders"
4786
+ }), $[43] = t22) : t22 = $[43];
4787
+ let t23;
4788
+ $[44] === fetching ? t23 = $[45] : (t23 = fetching && /* @__PURE__ */ jsx(Label, {
4789
+ size: 0,
4790
+ style: { opacity: .3 },
4791
+ children: "Loading..."
4792
+ }), $[44] = fetching, $[45] = t23);
4793
+ let t24;
4794
+ $[46] === t23 ? t24 = $[47] : (t24 = /* @__PURE__ */ jsx(Box, {
4795
+ flex: 1,
4796
+ children: /* @__PURE__ */ jsxs(Inline, {
4797
+ gap: 2,
4798
+ children: [t22, t23]
4799
+ })
4800
+ }), $[46] = t23, $[47] = t24);
4801
+ let t25;
4802
+ $[48] !== currentFolderId || $[49] !== dispatch ? (t25 = currentFolderId && /* @__PURE__ */ jsx(FolderHeaderAction, {
4803
+ icon: /* @__PURE__ */ jsx(EditIcon, {}),
4804
+ onClick: () => dispatch(DIALOG_ACTIONS.showFolderRename({ folderId: currentFolderId })),
4805
+ tone: "primary",
4806
+ tooltip: "Rename folder"
4807
+ }), $[48] = currentFolderId, $[49] = dispatch, $[50] = t25) : t25 = $[50];
4808
+ let t26;
4809
+ $[51] === Symbol.for("react.memo_cache_sentinel") ? (t26 = /* @__PURE__ */ jsx(AddIcon, {}), $[51] = t26) : t26 = $[51];
4810
+ let t27;
4811
+ $[52] !== currentFolderId || $[53] !== dispatch ? (t27 = /* @__PURE__ */ jsx(FolderHeaderAction, {
4812
+ icon: t26,
4813
+ onClick: () => dispatch(DIALOG_ACTIONS.showFolderCreate({ parentFolderId: currentFolderId || null })),
4814
+ tone: "primary",
4815
+ tooltip: "Create folder"
4816
+ }), $[52] = currentFolderId, $[53] = dispatch, $[54] = t27) : t27 = $[54];
4817
+ let t28;
4818
+ $[55] !== canDeleteFolder || $[56] !== currentFolderId || $[57] !== handleFolderDelete ? (t28 = currentFolderId && canDeleteFolder && /* @__PURE__ */ jsx(FolderHeaderAction, {
4819
+ icon: /* @__PURE__ */ jsx(TrashIcon, {}),
4820
+ onClick: handleFolderDelete,
4821
+ tone: "critical",
4822
+ tooltip: "Delete folder"
4823
+ }), $[55] = canDeleteFolder, $[56] = currentFolderId, $[57] = handleFolderDelete, $[58] = t28) : t28 = $[58];
4824
+ let t29;
4825
+ $[59] !== t25 || $[60] !== t27 || $[61] !== t28 ? (t29 = /* @__PURE__ */ jsxs(Inline, {
4826
+ gap: 1,
4827
+ children: [
4828
+ t25,
4829
+ t27,
4830
+ t28
4831
+ ]
4832
+ }), $[59] = t25, $[60] = t27, $[61] = t28, $[62] = t29) : t29 = $[62], $[63] !== t24 || $[64] !== t29 ? (t19 = /* @__PURE__ */ jsxs(Flex, {
4833
+ align: "center",
4834
+ justify: "space-between",
4835
+ paddingX: 3,
4836
+ style: t21,
4837
+ children: [t24, t29]
4838
+ }), $[63] = t24, $[64] = t29, $[65] = t19) : t19 = $[65], T3 = Box, t15 = 2, T2 = Box, T1 = DropTree, t13 = 1, t14 = treeKey, T0 = TreeItem, t6 = dropTargetId === ROOT_DROP_TARGET_ID ? "" : void 0, t7 = ROOT_DROP_TARGET_ID, $[66] === dispatch ? t8 = $[67] : (t8 = () => dispatch(foldersActions.currentFolderClear()), $[66] = dispatch, $[67] = t8), t9 = currentFolderId === null, t10 = "All assets", t11 = currentFolderId === null ? "semibold" : "medium", t12 = getDropTargetHandlers(null), $[10] = assetsById, $[11] = canDeleteFolder, $[12] = currentFolder, $[13] = currentFolderId, $[14] = dispatch, $[15] = dropTargetId, $[16] = fetching, $[17] = treeKey, $[18] = T0, $[19] = T1, $[20] = T2, $[21] = T3, $[22] = T4, $[23] = getDropTargetHandlers, $[24] = t10, $[25] = t11, $[26] = t12, $[27] = t13, $[28] = t14, $[29] = t15, $[30] = t16, $[31] = t17, $[32] = t18, $[33] = t19, $[34] = t6, $[35] = t7, $[36] = t8, $[37] = t9;
4839
+ } else T0 = $[18], T1 = $[19], T2 = $[20], T3 = $[21], T4 = $[22], getDropTargetHandlers = $[23], t10 = $[24], t11 = $[25], t12 = $[26], t13 = $[27], t14 = $[28], t15 = $[29], t16 = $[30], t17 = $[31], t18 = $[32], t19 = $[33], t6 = $[34], t7 = $[35], t8 = $[36], t9 = $[37];
4840
+ let t20;
4841
+ $[68] !== T0 || $[69] !== t10 || $[70] !== t11 || $[71] !== t12 || $[72] !== t6 || $[73] !== t7 || $[74] !== t8 || $[75] !== t9 ? (t20 = /* @__PURE__ */ jsx(T0, {
4842
+ "data-drop-target": t6,
4843
+ id: t7,
4844
+ onClick: t8,
4845
+ selected: t9,
4846
+ text: t10,
4847
+ weight: t11,
4848
+ ...t12
4849
+ }), $[68] = T0, $[69] = t10, $[70] = t11, $[71] = t12, $[72] = t6, $[73] = t7, $[74] = t8, $[75] = t9, $[76] = t20) : t20 = $[76];
4850
+ let t21;
4851
+ if ($[77] !== currentFolderId || $[78] !== dropTargetId || $[79] !== expandedIds || $[80] !== folderTree || $[81] !== getDropTargetHandlers || $[82] !== handleFolderSelect) {
4852
+ let t22;
4853
+ $[84] !== currentFolderId || $[85] !== dropTargetId || $[86] !== expandedIds || $[87] !== getDropTargetHandlers || $[88] !== handleFolderSelect ? (t22 = (node) => /* @__PURE__ */ jsx(FolderNode, {
4761
4854
  currentFolderId,
4855
+ dropTargetId,
4762
4856
  expandedIds,
4857
+ getDropTargetHandlers,
4763
4858
  node,
4764
4859
  onSelect: handleFolderSelect
4765
- }, node.id), $[46] = currentFolderId, $[47] = expandedIds, $[48] = handleFolderSelect, $[49] = t19) : t19 = $[49], t18 = folderTree.map(t19), $[41] = currentFolderId, $[42] = expandedIds, $[43] = folderTree, $[44] = handleFolderSelect, $[45] = t18;
4766
- } else t18 = $[45];
4767
- let t19;
4768
- $[50] !== t17 || $[51] !== t18 || $[52] !== treeKey ? (t19 = /* @__PURE__ */ jsxs(Tree, {
4769
- gap: 1,
4770
- children: [t17, t18]
4771
- }, treeKey), $[50] = t17, $[51] = t18, $[52] = treeKey, $[53] = t19) : t19 = $[53];
4772
- let t20;
4773
- $[54] !== fetching || $[55] !== hasFolders ? (t20 = !hasFolders && !fetching && /* @__PURE__ */ jsx(Box, {
4860
+ }, node.id), $[84] = currentFolderId, $[85] = dropTargetId, $[86] = expandedIds, $[87] = getDropTargetHandlers, $[88] = handleFolderSelect, $[89] = t22) : t22 = $[89], t21 = folderTree.map(t22), $[77] = currentFolderId, $[78] = dropTargetId, $[79] = expandedIds, $[80] = folderTree, $[81] = getDropTargetHandlers, $[82] = handleFolderSelect, $[83] = t21;
4861
+ } else t21 = $[83];
4862
+ let t22;
4863
+ $[90] !== T1 || $[91] !== t13 || $[92] !== t14 || $[93] !== t20 || $[94] !== t21 ? (t22 = /* @__PURE__ */ jsxs(T1, {
4864
+ gap: t13,
4865
+ children: [t20, t21]
4866
+ }, t14), $[90] = T1, $[91] = t13, $[92] = t14, $[93] = t20, $[94] = t21, $[95] = t22) : t22 = $[95];
4867
+ let t23;
4868
+ $[96] !== fetching || $[97] !== hasFolders ? (t23 = !hasFolders && !fetching && /* @__PURE__ */ jsx(Box, {
4774
4869
  marginTop: 3,
4775
4870
  paddingX: 1,
4776
4871
  children: /* @__PURE__ */ jsx(Text, {
@@ -4778,28 +4873,39 @@ const getExpandedIdSet = (folderId, byId) => {
4778
4873
  size: 1,
4779
4874
  children: /* @__PURE__ */ jsx("em", { children: "No folders" })
4780
4875
  })
4781
- }), $[54] = fetching, $[55] = hasFolders, $[56] = t20) : t20 = $[56];
4782
- let t21;
4783
- $[57] !== t19 || $[58] !== t20 ? (t21 = /* @__PURE__ */ jsx(Box, {
4784
- padding: 2,
4785
- children: /* @__PURE__ */ jsxs(Box, { children: [t19, t20] })
4786
- }), $[57] = t19, $[58] = t20, $[59] = t21) : t21 = $[59];
4787
- let t22;
4788
- return $[60] !== t13 || $[61] !== t21 ? (t22 = /* @__PURE__ */ jsxs(Flex, {
4789
- direction: "column",
4790
- flex: 1,
4791
- height: "fill",
4792
- children: [t13, t21]
4793
- }), $[60] = t13, $[61] = t21, $[62] = t22) : t22 = $[62], t22;
4876
+ }), $[96] = fetching, $[97] = hasFolders, $[98] = t23) : t23 = $[98];
4877
+ let t24;
4878
+ $[99] !== T2 || $[100] !== t22 || $[101] !== t23 ? (t24 = /* @__PURE__ */ jsxs(T2, { children: [t22, t23] }), $[99] = T2, $[100] = t22, $[101] = t23, $[102] = t24) : t24 = $[102];
4879
+ let t25;
4880
+ $[103] !== T3 || $[104] !== t15 || $[105] !== t24 ? (t25 = /* @__PURE__ */ jsx(T3, {
4881
+ padding: t15,
4882
+ children: t24
4883
+ }), $[103] = T3, $[104] = t15, $[105] = t24, $[106] = t25) : t25 = $[106];
4884
+ let t26;
4885
+ return $[107] !== T4 || $[108] !== t16 || $[109] !== t17 || $[110] !== t18 || $[111] !== t19 || $[112] !== t25 ? (t26 = /* @__PURE__ */ jsxs(T4, {
4886
+ direction: t16,
4887
+ flex: t17,
4888
+ height: t18,
4889
+ children: [t19, t25]
4890
+ }), $[107] = T4, $[108] = t16, $[109] = t17, $[110] = t18, $[111] = t19, $[112] = t25, $[113] = t26) : t26 = $[113], t26;
4794
4891
  };
4795
4892
  function _temp$29(state) {
4796
4893
  return state.folders.currentFolderId;
4797
4894
  }
4798
4895
  function _temp2$16(state_0) {
4799
- return state_0.folders.byId;
4896
+ return state_0.assets.byIds;
4897
+ }
4898
+ function _temp3$9(state_1) {
4899
+ return state_1.folders.byId;
4900
+ }
4901
+ function _temp4$5(state_2) {
4902
+ return state_2.folders.fetching;
4800
4903
  }
4801
- function _temp3$8(state_1) {
4802
- return state_1.folders.fetching;
4904
+ function _temp5$3(e_0) {
4905
+ isAssetDrag(e_0) && (e_0.preventDefault(), e_0.stopPropagation(), e_0.dataTransfer.dropEffect = "move");
4906
+ }
4907
+ function _temp6$1(item) {
4908
+ return !!item;
4803
4909
  }
4804
4910
  const DialogFolders = (props) => {
4805
4911
  let $ = c(7), { children, dialog: t0 } = props, { id } = t0, dispatch = useDispatch(), t1;
@@ -5343,7 +5449,7 @@ const DialogFolders = (props) => {
5343
5449
  isDisabled: tagsFetching,
5344
5450
  isSearchable: !0,
5345
5451
  name: "tags",
5346
- noOptionsMessage: _temp3$7,
5452
+ noOptionsMessage: _temp3$8,
5347
5453
  onChange: (value) => handleChange(value),
5348
5454
  options: allTagOptions,
5349
5455
  placeholder: tagsFetching ? "Loading..." : "Select...",
@@ -5363,7 +5469,7 @@ function _temp$28(state) {
5363
5469
  function _temp2$15(state_0) {
5364
5470
  return state_0.tags.fetching;
5365
5471
  }
5366
- function _temp3$7() {
5472
+ function _temp3$8() {
5367
5473
  return "No tags";
5368
5474
  }
5369
5475
  const StackContainer = /* @__PURE__ */ styled(Flex).withConfig({
@@ -5402,7 +5508,7 @@ function _temp2$14(facet) {
5402
5508
  return facet.type === "number" ? /* @__PURE__ */ jsx(SearchFacetNumber, { facet }, key) : facet.type === "searchable" ? /* @__PURE__ */ jsx(SearchFacetTags, { facet }, key) : facet.type === "select" ? /* @__PURE__ */ jsx(SearchFacetSelect, { facet }, key) : facet.type === "string" ? /* @__PURE__ */ jsx(SearchFacetString, { facet }, key) : null;
5403
5509
  }
5404
5510
  const SearchFacetsControl = () => {
5405
- let $ = c(35), dispatch = useDispatch(), assetTypes = useTypedSelector(_temp$26), searchFacets = useTypedSelector(_temp2$13), selectedDocument = useTypedSelector(_temp3$6), popoverProps = usePortalPopoverProps(), { creditLine } = useToolOptions(), isTool = !selectedDocument, T0, T1, T2, t0, t1, t2;
5511
+ let $ = c(35), dispatch = useDispatch(), assetTypes = useTypedSelector(_temp$26), searchFacets = useTypedSelector(_temp2$13), selectedDocument = useTypedSelector(_temp3$7), popoverProps = usePortalPopoverProps(), { creditLine } = useToolOptions(), isTool = !selectedDocument, T0, T1, T2, t0, t1, t2;
5406
5512
  if ($[0] !== assetTypes || $[1] !== creditLine?.enabled || $[2] !== dispatch || $[3] !== isTool || $[4] !== searchFacets) {
5407
5513
  let t3;
5408
5514
  $[11] !== assetTypes || $[12] !== creditLine?.enabled || $[13] !== isTool ? (t3 = (facet) => !creditLine?.enabled && facet?.type === "string" && facet?.name === "creditLine" ? !1 : facet.type === "group" || facet.type === "divider" ? !0 : isTool ? !facet?.selectOnly : facet.assetTypes.filter((assetType) => assetTypes.includes(assetType)).length > 0, $[11] = assetTypes, $[12] = creditLine?.enabled, $[13] = isTool, $[14] = t3) : t3 = $[14];
@@ -5470,7 +5576,7 @@ function _temp$26(state) {
5470
5576
  function _temp2$13(state_0) {
5471
5577
  return state_0.search.facets;
5472
5578
  }
5473
- function _temp3$6(state_1) {
5579
+ function _temp3$7(state_1) {
5474
5580
  return state_1.selected.document;
5475
5581
  }
5476
5582
  function _temp4$4(facet_0, index, facets) {
@@ -5904,7 +6010,7 @@ const TagContainer = styled(Flex).withConfig({
5904
6010
  let tagIdsSegmented = pickedTagIdsUnique.reduce(t1, {
5905
6011
  appliedToAll: [],
5906
6012
  appliedToSome: []
5907
- }), tagsAppliedToAll = tags.filter((tag_1) => tagIdsSegmented.appliedToAll.includes(tag_1.tag._id)).map(_temp3$5), tagsAppliedToSome = tags.filter((tag_2) => tagIdsSegmented.appliedToSome.includes(tag_2.tag._id)).map(_temp4$3), tagsUnused = tags.filter((tag_3) => !pickedTagIdsUnique.includes(tag_3.tag._id)).map(_temp5$2);
6013
+ }), tagsAppliedToAll = tags.filter((tag_1) => tagIdsSegmented.appliedToAll.includes(tag_1.tag._id)).map(_temp3$6), tagsAppliedToSome = tags.filter((tag_2) => tagIdsSegmented.appliedToSome.includes(tag_2.tag._id)).map(_temp4$3), tagsUnused = tags.filter((tag_3) => !pickedTagIdsUnique.includes(tag_3.tag._id)).map(_temp5$2);
5908
6014
  items = [], assetsPicked.length === 0 ? items = tags.map(_temp6) : (tagsAppliedToAll?.length > 0 && (items = [
5909
6015
  ...items,
5910
6016
  assetsPicked.length === 1 ? "Used" : "Used by all",
@@ -5951,7 +6057,7 @@ function _temp2$11(acc, val) {
5951
6057
  let assetTagIds = val?.asset?.opt?.media?.tags?.map(_temp$23) || [];
5952
6058
  return acc = acc.concat(assetTagIds), acc;
5953
6059
  }
5954
- function _temp3$5(tagItem) {
6060
+ function _temp3$6(tagItem) {
5955
6061
  return {
5956
6062
  ...tagItem,
5957
6063
  actions: [
@@ -6633,7 +6739,7 @@ function _temp$15(state) {
6633
6739
  return state.search.query;
6634
6740
  }
6635
6741
  const Controls = () => {
6636
- let $ = c(62), dispatch = useDispatch(), fetching = useTypedSelector(_temp$14), foldersPanelVisible = useTypedSelector(_temp2$8), pageIndex = useTypedSelector(_temp3$4), searchFacets = useTypedSelector(_temp4$2), tagsPanelVisible = useTypedSelector(_temp5$1), mediaIndex = useMediaIndex(), t0;
6742
+ let $ = c(62), dispatch = useDispatch(), fetching = useTypedSelector(_temp$14), foldersPanelVisible = useTypedSelector(_temp2$8), pageIndex = useTypedSelector(_temp3$5), searchFacets = useTypedSelector(_temp4$2), tagsPanelVisible = useTypedSelector(_temp5$1), mediaIndex = useMediaIndex(), t0;
6637
6743
  $[0] === dispatch ? t0 = $[1] : (t0 = () => {
6638
6744
  dispatch(dialogActions.showSearchFacets());
6639
6745
  }, $[0] = dispatch, $[1] = t0);
@@ -6845,7 +6951,7 @@ function _temp$14(state) {
6845
6951
  function _temp2$8(state_0) {
6846
6952
  return state_0.folders.panelVisible;
6847
6953
  }
6848
- function _temp3$4(state_1) {
6954
+ function _temp3$5(state_1) {
6849
6955
  return state_1.assets.pageIndex;
6850
6956
  }
6851
6957
  function _temp4$2(state_2) {
@@ -7219,15 +7325,15 @@ function _temp$8(state) {
7219
7325
  }
7220
7326
  const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
7221
7327
  displayName: "ContainerGrid",
7222
- componentId: "sc-mfq3ng-0"
7328
+ componentId: "sc-zsye3t-0"
7223
7329
  })(({ $scheme, $selected, $updating }) => css`align-items:center;cursor:${$selected ? "default" : "pointer"};height:100%;pointer-events:${$updating ? "none" : "auto"};user-select:none;white-space:nowrap;${!$updating && css`@media (hover:hover) and (pointer:fine){&:hover{background:${getSchemeColor($scheme, "bg")};}}`}`), ContextActionContainer = /* @__PURE__ */ styled(Flex).withConfig({
7224
7330
  displayName: "ContextActionContainer",
7225
- componentId: "sc-mfq3ng-1"
7331
+ componentId: "sc-zsye3t-1"
7226
7332
  })(({ $scheme }) => css`cursor:pointer;@media (hover:hover) and (pointer:fine){&:hover{background:${getSchemeColor($scheme, "bg2")};}}`), StyledWarningIcon = /* @__PURE__ */ styled(WarningFilledIcon).withConfig({
7227
7333
  displayName: "StyledWarningIcon",
7228
- componentId: "sc-mfq3ng-2"
7334
+ componentId: "sc-zsye3t-2"
7229
7335
  })(({ theme }) => ({ color: theme.sanity.color.spot.red })), TableRowAsset = (props) => {
7230
- let $ = c(150), { id, selected } = props, scheme = useColorSchemeValue(), shiftPressed = useKeyPress("shift"), [referenceCountVisible, setReferenceCountVisible] = useState(!1), refCountVisibleTimeout = useRef(null), dispatch = useDispatch(), lastPicked = useTypedSelector(_temp$7), t0;
7336
+ let $ = c(156), { id, selected } = props, scheme = useColorSchemeValue(), shiftPressed = useKeyPress("shift"), [referenceCountVisible, setReferenceCountVisible] = useState(!1), refCountVisibleTimeout = useRef(null), dispatch = useDispatch(), lastPicked = useTypedSelector(_temp$7), assetsPicked = useTypedSelector(selectAssetsPicked), t0;
7231
7337
  $[0] === id ? t0 = $[1] : (t0 = (state_0) => selectAssetById(state_0, id), $[0] = id, $[1] = t0);
7232
7338
  let item = useTypedSelector(t0), mediaIndex = useMediaIndex(), asset = item?.asset, error = item?.error, isOpaque = item?.asset?.metadata?.isOpaque, picked = item?.picked, updating = item?.updating, { isMultiSelect, onSelect } = useAssetSourceActions(), t1;
7233
7339
  $[2] !== asset || $[3] !== dispatch || $[4] !== isMultiSelect || $[5] !== lastPicked || $[6] !== onSelect || $[7] !== picked || $[8] !== selected || $[9] !== shiftPressed ? (t1 = (e) => {
@@ -7250,6 +7356,9 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
7250
7356
  })) : dispatch(assetsActions.pick({
7251
7357
  assetId: asset._id,
7252
7358
  picked: !picked
7359
+ })) : e_0.ctrlKey || e_0.metaKey ? dispatch(assetsActions.pick({
7360
+ assetId: asset._id,
7361
+ picked: !picked
7253
7362
  })) : shiftPressed.current ? dispatch(picked ? assetsActions.pick({
7254
7363
  assetId: asset._id,
7255
7364
  picked: !picked
@@ -7258,19 +7367,23 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
7258
7367
  endId: asset._id
7259
7368
  })) : dispatch(dialogActions.showAssetEdit({ assetId: asset._id }))));
7260
7369
  }, $[11] = asset, $[12] = dispatch, $[13] = isMultiSelect, $[14] = lastPicked, $[15] = onSelect, $[16] = picked, $[17] = selected, $[18] = shiftPressed, $[19] = t2) : t2 = $[19];
7261
- let handleClick = t2, opacityCell = updating ? .5 : 1, opacityPreview = selected || updating ? .1 : 1, t3, t4;
7262
- if ($[20] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => (refCountVisibleTimeout.current = setTimeout(() => setReferenceCountVisible(!0), 750), () => {
7370
+ let handleClick = t2, draggable = !selected && !updating, t3;
7371
+ $[20] !== asset || $[21] !== assetsPicked || $[22] !== picked ? (t3 = (e_1) => {
7372
+ asset && setDragAssetIds(e_1, picked ? assetsPicked.map(_temp2$5) : [asset._id]);
7373
+ }, $[20] = asset, $[21] = assetsPicked, $[22] = picked, $[23] = t3) : t3 = $[23];
7374
+ let handleDragStart = t3, opacityCell = updating ? .5 : 1, opacityPreview = selected || updating ? .1 : 1, t4, t5;
7375
+ if ($[24] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => (refCountVisibleTimeout.current = setTimeout(() => setReferenceCountVisible(!0), 750), () => {
7263
7376
  refCountVisibleTimeout.current && clearTimeout(refCountVisibleTimeout.current);
7264
- }), t4 = [], $[20] = t3, $[21] = t4) : (t3 = $[20], t4 = $[21]), useEffect(t3, t4), !asset) return null;
7265
- let t5 = selected ? void 0 : handleClick, t6 = mediaIndex < 3 ? 0 : "16px", t7 = mediaIndex < 3 ? GRID_TEMPLATE_COLUMNS.SMALL : GRID_TEMPLATE_COLUMNS.LARGE, t8 = mediaIndex < 3 ? "auto" : "1fr", t9;
7266
- $[22] !== t6 || $[23] !== t7 || $[24] !== t8 ? (t9 = {
7267
- columnGap: t6,
7377
+ }), t5 = [], $[24] = t4, $[25] = t5) : (t4 = $[24], t5 = $[25]), useEffect(t4, t5), !asset) return null;
7378
+ let t6 = selected ? void 0 : handleClick, t7 = draggable ? handleDragStart : void 0, t8 = mediaIndex < 3 ? 0 : "16px", t9 = mediaIndex < 3 ? GRID_TEMPLATE_COLUMNS.SMALL : GRID_TEMPLATE_COLUMNS.LARGE, t10 = mediaIndex < 3 ? "auto" : "1fr", t11;
7379
+ $[26] !== t10 || $[27] !== t8 || $[28] !== t9 ? (t11 = {
7380
+ columnGap: t8,
7268
7381
  rowGap: 0,
7269
- gridTemplateColumns: t7,
7270
- gridTemplateRows: t8
7271
- }, $[22] = t6, $[23] = t7, $[24] = t8, $[25] = t9) : t9 = $[25];
7272
- let t10 = item.updating, t11;
7273
- $[26] === opacityCell ? t11 = $[27] : (t11 = {
7382
+ gridTemplateColumns: t9,
7383
+ gridTemplateRows: t10
7384
+ }, $[26] = t10, $[27] = t8, $[28] = t9, $[29] = t11) : t11 = $[29];
7385
+ let t12 = item.updating, t13;
7386
+ $[30] === opacityCell ? t13 = $[31] : (t13 = {
7274
7387
  alignItems: "center",
7275
7388
  gridColumn: 1,
7276
7389
  gridRowStart: 1,
@@ -7279,9 +7392,9 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
7279
7392
  justifyContent: "center",
7280
7393
  opacity: opacityCell,
7281
7394
  position: "relative"
7282
- }, $[26] = opacityCell, $[27] = t11);
7283
- let t12;
7284
- $[28] !== isMultiSelect || $[29] !== onSelect || $[30] !== picked ? (t12 = onSelect && !isMultiSelect ? /* @__PURE__ */ jsx(EditIcon, { style: {
7395
+ }, $[30] = opacityCell, $[31] = t13);
7396
+ let t14;
7397
+ $[32] !== isMultiSelect || $[33] !== onSelect || $[34] !== picked ? (t14 = onSelect && !isMultiSelect ? /* @__PURE__ */ jsx(EditIcon, { style: {
7285
7398
  flexShrink: 0,
7286
7399
  opacity: .5
7287
7400
  } }) : /* @__PURE__ */ jsx(Checkbox, {
@@ -7291,40 +7404,40 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
7291
7404
  pointerEvents: "none",
7292
7405
  transform: "scale(0.8)"
7293
7406
  }
7294
- }), $[28] = isMultiSelect, $[29] = onSelect, $[30] = picked, $[31] = t12) : t12 = $[31];
7295
- let t13;
7296
- $[32] !== handleContextActionClick || $[33] !== scheme || $[34] !== t11 || $[35] !== t12 ? (t13 = /* @__PURE__ */ jsx(ContextActionContainer, {
7407
+ }), $[32] = isMultiSelect, $[33] = onSelect, $[34] = picked, $[35] = t14) : t14 = $[35];
7408
+ let t15;
7409
+ $[36] !== handleContextActionClick || $[37] !== scheme || $[38] !== t13 || $[39] !== t14 ? (t15 = /* @__PURE__ */ jsx(ContextActionContainer, {
7297
7410
  onClick: handleContextActionClick,
7298
7411
  $scheme: scheme,
7299
- style: t11,
7300
- children: t12
7301
- }), $[32] = handleContextActionClick, $[33] = scheme, $[34] = t11, $[35] = t12, $[36] = t13) : t13 = $[36];
7302
- let t14;
7303
- $[37] === Symbol.for("react.memo_cache_sentinel") ? (t14 = {
7412
+ style: t13,
7413
+ children: t14
7414
+ }), $[36] = handleContextActionClick, $[37] = scheme, $[38] = t13, $[39] = t14, $[40] = t15) : t15 = $[40];
7415
+ let t16;
7416
+ $[41] === Symbol.for("react.memo_cache_sentinel") ? (t16 = {
7304
7417
  gridColumn: 2,
7305
7418
  gridRowStart: 1,
7306
7419
  gridRowEnd: "span 5",
7307
7420
  height: "90px",
7308
7421
  width: "100px"
7309
- }, $[37] = t14) : t14 = $[37];
7310
- let t15;
7311
- $[38] === Symbol.for("react.memo_cache_sentinel") ? (t15 = {
7422
+ }, $[41] = t16) : t16 = $[41];
7423
+ let t17;
7424
+ $[42] === Symbol.for("react.memo_cache_sentinel") ? (t17 = {
7312
7425
  height: "100%",
7313
7426
  position: "relative"
7314
- }, $[38] = t15) : t15 = $[38];
7315
- let t16;
7316
- $[39] === opacityPreview ? t16 = $[40] : (t16 = {
7427
+ }, $[42] = t17) : t17 = $[42];
7428
+ let t18;
7429
+ $[43] === opacityPreview ? t18 = $[44] : (t18 = {
7317
7430
  height: "100%",
7318
7431
  opacity: opacityPreview,
7319
7432
  position: "relative"
7320
- }, $[39] = opacityPreview, $[40] = t16);
7321
- let t17;
7322
- $[41] === asset ? t17 = $[42] : (t17 = isFileAsset(asset) && /* @__PURE__ */ jsx(FileIcon$1, {
7433
+ }, $[43] = opacityPreview, $[44] = t18);
7434
+ let t19;
7435
+ $[45] === asset ? t19 = $[46] : (t19 = isFileAsset(asset) && /* @__PURE__ */ jsx(FileIcon$1, {
7323
7436
  extension: asset.extension,
7324
7437
  width: "40px"
7325
- }), $[41] = asset, $[42] = t17);
7326
- let t18;
7327
- $[43] !== asset || $[44] !== isOpaque || $[45] !== scheme ? (t18 = isImageAsset(asset) && /* @__PURE__ */ jsx(Image$1, {
7438
+ }), $[45] = asset, $[46] = t19);
7439
+ let t20;
7440
+ $[47] !== asset || $[48] !== isOpaque || $[49] !== scheme ? (t20 = isImageAsset(asset) && /* @__PURE__ */ jsx(Image$1, {
7328
7441
  draggable: !1,
7329
7442
  $scheme: scheme,
7330
7443
  $showCheckerboard: !isOpaque,
@@ -7332,14 +7445,14 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
7332
7445
  height: 100,
7333
7446
  width: 100
7334
7447
  })
7335
- }), $[43] = asset, $[44] = isOpaque, $[45] = scheme, $[46] = t18) : t18 = $[46];
7336
- let t19;
7337
- $[47] !== t16 || $[48] !== t17 || $[49] !== t18 ? (t19 = /* @__PURE__ */ jsxs(Box, {
7338
- style: t16,
7339
- children: [t17, t18]
7340
- }), $[47] = t16, $[48] = t17, $[49] = t18, $[50] = t19) : t19 = $[50];
7341
- let t20;
7342
- $[51] === updating ? t20 = $[52] : (t20 = updating && /* @__PURE__ */ jsx(Flex, {
7448
+ }), $[47] = asset, $[48] = isOpaque, $[49] = scheme, $[50] = t20) : t20 = $[50];
7449
+ let t21;
7450
+ $[51] !== t18 || $[52] !== t19 || $[53] !== t20 ? (t21 = /* @__PURE__ */ jsxs(Box, {
7451
+ style: t18,
7452
+ children: [t19, t20]
7453
+ }), $[51] = t18, $[52] = t19, $[53] = t20, $[54] = t21) : t21 = $[54];
7454
+ let t22;
7455
+ $[55] === updating ? t22 = $[56] : (t22 = updating && /* @__PURE__ */ jsx(Flex, {
7343
7456
  align: "center",
7344
7457
  justify: "center",
7345
7458
  style: {
@@ -7350,9 +7463,9 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
7350
7463
  width: "100%"
7351
7464
  },
7352
7465
  children: /* @__PURE__ */ jsx(Spinner, {})
7353
- }), $[51] = updating, $[52] = t20);
7354
- let t21;
7355
- $[53] !== selected || $[54] !== updating ? (t21 = selected && !updating && /* @__PURE__ */ jsx(Flex, {
7466
+ }), $[55] = updating, $[56] = t22);
7467
+ let t23;
7468
+ $[57] !== selected || $[58] !== updating ? (t23 = selected && !updating && /* @__PURE__ */ jsx(Flex, {
7356
7469
  align: "center",
7357
7470
  justify: "center",
7358
7471
  style: {
@@ -7366,174 +7479,174 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
7366
7479
  size: 2,
7367
7480
  children: /* @__PURE__ */ jsx(CheckmarkCircleIcon, {})
7368
7481
  })
7369
- }), $[53] = selected, $[54] = updating, $[55] = t21) : t21 = $[55];
7370
- let t22;
7371
- $[56] !== t19 || $[57] !== t20 || $[58] !== t21 ? (t22 = /* @__PURE__ */ jsx(Box, {
7372
- style: t14,
7482
+ }), $[57] = selected, $[58] = updating, $[59] = t23) : t23 = $[59];
7483
+ let t24;
7484
+ $[60] !== t21 || $[61] !== t22 || $[62] !== t23 ? (t24 = /* @__PURE__ */ jsx(Box, {
7485
+ style: t16,
7373
7486
  children: /* @__PURE__ */ jsxs(Flex, {
7374
7487
  align: "center",
7375
7488
  justify: "center",
7376
- style: t15,
7489
+ style: t17,
7377
7490
  children: [
7378
- t19,
7379
- t20,
7380
- t21
7491
+ t21,
7492
+ t22,
7493
+ t23
7381
7494
  ]
7382
7495
  })
7383
- }), $[56] = t19, $[57] = t20, $[58] = t21, $[59] = t22) : t22 = $[59];
7384
- let t23 = mediaIndex < 3 ? 3 : 0, t24 = mediaIndex < 3 ? 2 : "auto", t25;
7385
- $[60] !== opacityCell || $[61] !== t24 ? (t25 = {
7496
+ }), $[60] = t21, $[61] = t22, $[62] = t23, $[63] = t24) : t24 = $[63];
7497
+ let t25 = mediaIndex < 3 ? 3 : 0, t26 = mediaIndex < 3 ? 2 : "auto", t27;
7498
+ $[64] !== opacityCell || $[65] !== t26 ? (t27 = {
7386
7499
  gridColumn: 3,
7387
- gridRow: t24,
7500
+ gridRow: t26,
7388
7501
  opacity: opacityCell
7389
- }, $[60] = opacityCell, $[61] = t24, $[62] = t25) : t25 = $[62];
7390
- let t26;
7391
- $[63] === Symbol.for("react.memo_cache_sentinel") ? (t26 = { lineHeight: "2em" }, $[63] = t26) : t26 = $[63];
7392
- let t27;
7393
- $[64] === asset.originalFilename ? t27 = $[65] : (t27 = /* @__PURE__ */ jsx(Text, {
7502
+ }, $[64] = opacityCell, $[65] = t26, $[66] = t27) : t27 = $[66];
7503
+ let t28;
7504
+ $[67] === Symbol.for("react.memo_cache_sentinel") ? (t28 = { lineHeight: "2em" }, $[67] = t28) : t28 = $[67];
7505
+ let t29;
7506
+ $[68] === asset.originalFilename ? t29 = $[69] : (t29 = /* @__PURE__ */ jsx(Text, {
7394
7507
  muted: !0,
7395
7508
  size: 1,
7396
- style: t26,
7509
+ style: t28,
7397
7510
  textOverflow: "ellipsis",
7398
7511
  children: asset.originalFilename
7399
- }), $[64] = asset.originalFilename, $[65] = t27);
7400
- let t28;
7401
- $[66] !== t23 || $[67] !== t25 || $[68] !== t27 ? (t28 = /* @__PURE__ */ jsx(Box, {
7402
- marginLeft: t23,
7403
- style: t25,
7404
- children: t27
7405
- }), $[66] = t23, $[67] = t25, $[68] = t27, $[69] = t28) : t28 = $[69];
7406
- let t29 = mediaIndex < 3 ? 3 : 0, t30 = mediaIndex < 3 ? 3 : 4, t31 = mediaIndex < 3 ? 3 : "auto", t32;
7407
- $[70] !== opacityCell || $[71] !== t30 || $[72] !== t31 ? (t32 = {
7408
- gridColumn: t30,
7409
- gridRow: t31,
7512
+ }), $[68] = asset.originalFilename, $[69] = t29);
7513
+ let t30;
7514
+ $[70] !== t25 || $[71] !== t27 || $[72] !== t29 ? (t30 = /* @__PURE__ */ jsx(Box, {
7515
+ marginLeft: t25,
7516
+ style: t27,
7517
+ children: t29
7518
+ }), $[70] = t25, $[71] = t27, $[72] = t29, $[73] = t30) : t30 = $[73];
7519
+ let t31 = mediaIndex < 3 ? 3 : 0, t32 = mediaIndex < 3 ? 3 : 4, t33 = mediaIndex < 3 ? 3 : "auto", t34;
7520
+ $[74] !== opacityCell || $[75] !== t32 || $[76] !== t33 ? (t34 = {
7521
+ gridColumn: t32,
7522
+ gridRow: t33,
7410
7523
  opacity: opacityCell
7411
- }, $[70] = opacityCell, $[71] = t30, $[72] = t31, $[73] = t32) : t32 = $[73];
7412
- let t33;
7413
- $[74] === Symbol.for("react.memo_cache_sentinel") ? (t33 = { lineHeight: "2em" }, $[74] = t33) : t33 = $[74];
7414
- let t34;
7415
- $[75] === asset ? t34 = $[76] : (t34 = isImageAsset(asset) && getAssetResolution(asset), $[75] = asset, $[76] = t34);
7524
+ }, $[74] = opacityCell, $[75] = t32, $[76] = t33, $[77] = t34) : t34 = $[77];
7416
7525
  let t35;
7417
- $[77] === t34 ? t35 = $[78] : (t35 = /* @__PURE__ */ jsx(Text, {
7526
+ $[78] === Symbol.for("react.memo_cache_sentinel") ? (t35 = { lineHeight: "2em" }, $[78] = t35) : t35 = $[78];
7527
+ let t36;
7528
+ $[79] === asset ? t36 = $[80] : (t36 = isImageAsset(asset) && getAssetResolution(asset), $[79] = asset, $[80] = t36);
7529
+ let t37;
7530
+ $[81] === t36 ? t37 = $[82] : (t37 = /* @__PURE__ */ jsx(Text, {
7418
7531
  muted: !0,
7419
7532
  size: 1,
7420
- style: t33,
7533
+ style: t35,
7421
7534
  textOverflow: "ellipsis",
7422
- children: t34
7423
- }), $[77] = t34, $[78] = t35);
7424
- let t36;
7425
- $[79] !== t29 || $[80] !== t32 || $[81] !== t35 ? (t36 = /* @__PURE__ */ jsx(Box, {
7426
- marginLeft: t29,
7427
- style: t32,
7428
- children: t35
7429
- }), $[79] = t29, $[80] = t32, $[81] = t35, $[82] = t36) : t36 = $[82];
7430
- let t37 = mediaIndex < 3 ? "none" : "block", t38;
7431
- $[83] !== opacityCell || $[84] !== t37 ? (t38 = {
7432
- display: t37,
7535
+ children: t36
7536
+ }), $[81] = t36, $[82] = t37);
7537
+ let t38;
7538
+ $[83] !== t31 || $[84] !== t34 || $[85] !== t37 ? (t38 = /* @__PURE__ */ jsx(Box, {
7539
+ marginLeft: t31,
7540
+ style: t34,
7541
+ children: t37
7542
+ }), $[83] = t31, $[84] = t34, $[85] = t37, $[86] = t38) : t38 = $[86];
7543
+ let t39 = mediaIndex < 3 ? "none" : "block", t40;
7544
+ $[87] !== opacityCell || $[88] !== t39 ? (t40 = {
7545
+ display: t39,
7433
7546
  gridColumn: 5,
7434
7547
  gridRow: "auto",
7435
7548
  opacity: opacityCell
7436
- }, $[83] = opacityCell, $[84] = t37, $[85] = t38) : t38 = $[85];
7437
- let t39;
7438
- $[86] === Symbol.for("react.memo_cache_sentinel") ? (t39 = { lineHeight: "2em" }, $[86] = t39) : t39 = $[86];
7439
- let t40;
7440
- $[87] === asset.mimeType ? t40 = $[88] : (t40 = /* @__PURE__ */ jsx(Text, {
7549
+ }, $[87] = opacityCell, $[88] = t39, $[89] = t40) : t40 = $[89];
7550
+ let t41;
7551
+ $[90] === Symbol.for("react.memo_cache_sentinel") ? (t41 = { lineHeight: "2em" }, $[90] = t41) : t41 = $[90];
7552
+ let t42;
7553
+ $[91] === asset.mimeType ? t42 = $[92] : (t42 = /* @__PURE__ */ jsx(Text, {
7441
7554
  muted: !0,
7442
7555
  size: 1,
7443
- style: t39,
7556
+ style: t41,
7444
7557
  textOverflow: "ellipsis",
7445
7558
  children: asset.mimeType
7446
- }), $[87] = asset.mimeType, $[88] = t40);
7447
- let t41;
7448
- $[89] !== t38 || $[90] !== t40 ? (t41 = /* @__PURE__ */ jsx(Box, {
7449
- style: t38,
7450
- children: t40
7451
- }), $[89] = t38, $[90] = t40, $[91] = t41) : t41 = $[91];
7452
- let t42 = mediaIndex < 3 ? "none" : "block", t43;
7453
- $[92] !== opacityCell || $[93] !== t42 ? (t43 = {
7454
- display: t42,
7559
+ }), $[91] = asset.mimeType, $[92] = t42);
7560
+ let t43;
7561
+ $[93] !== t40 || $[94] !== t42 ? (t43 = /* @__PURE__ */ jsx(Box, {
7562
+ style: t40,
7563
+ children: t42
7564
+ }), $[93] = t40, $[94] = t42, $[95] = t43) : t43 = $[95];
7565
+ let t44 = mediaIndex < 3 ? "none" : "block", t45;
7566
+ $[96] !== opacityCell || $[97] !== t44 ? (t45 = {
7567
+ display: t44,
7455
7568
  gridColumn: 6,
7456
7569
  gridRow: "auto",
7457
7570
  opacity: opacityCell
7458
- }, $[92] = opacityCell, $[93] = t42, $[94] = t43) : t43 = $[94];
7459
- let t44;
7460
- $[95] === Symbol.for("react.memo_cache_sentinel") ? (t44 = { lineHeight: "2em" }, $[95] = t44) : t44 = $[95];
7461
- let t45;
7462
- $[96] === asset.size ? t45 = $[97] : (t45 = filesize(asset.size, {
7571
+ }, $[96] = opacityCell, $[97] = t44, $[98] = t45) : t45 = $[98];
7572
+ let t46;
7573
+ $[99] === Symbol.for("react.memo_cache_sentinel") ? (t46 = { lineHeight: "2em" }, $[99] = t46) : t46 = $[99];
7574
+ let t47;
7575
+ $[100] === asset.size ? t47 = $[101] : (t47 = filesize(asset.size, {
7463
7576
  base: 10,
7464
7577
  round: 0
7465
- }), $[96] = asset.size, $[97] = t45);
7466
- let t46;
7467
- $[98] === t45 ? t46 = $[99] : (t46 = /* @__PURE__ */ jsx(Text, {
7578
+ }), $[100] = asset.size, $[101] = t47);
7579
+ let t48;
7580
+ $[102] === t47 ? t48 = $[103] : (t48 = /* @__PURE__ */ jsx(Text, {
7468
7581
  muted: !0,
7469
7582
  size: 1,
7470
- style: t44,
7583
+ style: t46,
7471
7584
  textOverflow: "ellipsis",
7472
- children: t45
7473
- }), $[98] = t45, $[99] = t46);
7474
- let t47;
7475
- $[100] !== t43 || $[101] !== t46 ? (t47 = /* @__PURE__ */ jsx(Box, {
7476
- style: t43,
7477
- children: t46
7478
- }), $[100] = t43, $[101] = t46, $[102] = t47) : t47 = $[102];
7479
- let t48 = mediaIndex < 3 ? 3 : 0, t49 = mediaIndex < 3 ? 3 : 7, t50 = mediaIndex < 3 ? 4 : "auto", t51;
7480
- $[103] !== opacityCell || $[104] !== t49 || $[105] !== t50 ? (t51 = {
7481
- gridColumn: t49,
7482
- gridRow: t50,
7585
+ children: t47
7586
+ }), $[102] = t47, $[103] = t48);
7587
+ let t49;
7588
+ $[104] !== t45 || $[105] !== t48 ? (t49 = /* @__PURE__ */ jsx(Box, {
7589
+ style: t45,
7590
+ children: t48
7591
+ }), $[104] = t45, $[105] = t48, $[106] = t49) : t49 = $[106];
7592
+ let t50 = mediaIndex < 3 ? 3 : 0, t51 = mediaIndex < 3 ? 3 : 7, t52 = mediaIndex < 3 ? 4 : "auto", t53;
7593
+ $[107] !== opacityCell || $[108] !== t51 || $[109] !== t52 ? (t53 = {
7594
+ gridColumn: t51,
7595
+ gridRow: t52,
7483
7596
  opacity: opacityCell
7484
- }, $[103] = opacityCell, $[104] = t49, $[105] = t50, $[106] = t51) : t51 = $[106];
7485
- let t52;
7486
- $[107] === Symbol.for("react.memo_cache_sentinel") ? (t52 = { lineHeight: "2em" }, $[107] = t52) : t52 = $[107];
7487
- let t53;
7488
- $[108] === asset._updatedAt ? t53 = $[109] : (t53 = formatRelative(new Date(asset._updatedAt), /* @__PURE__ */ new Date()), $[108] = asset._updatedAt, $[109] = t53);
7597
+ }, $[107] = opacityCell, $[108] = t51, $[109] = t52, $[110] = t53) : t53 = $[110];
7489
7598
  let t54;
7490
- $[110] === t53 ? t54 = $[111] : (t54 = /* @__PURE__ */ jsx(Text, {
7599
+ $[111] === Symbol.for("react.memo_cache_sentinel") ? (t54 = { lineHeight: "2em" }, $[111] = t54) : t54 = $[111];
7600
+ let t55;
7601
+ $[112] === asset._updatedAt ? t55 = $[113] : (t55 = formatRelative(new Date(asset._updatedAt), /* @__PURE__ */ new Date()), $[112] = asset._updatedAt, $[113] = t55);
7602
+ let t56;
7603
+ $[114] === t55 ? t56 = $[115] : (t56 = /* @__PURE__ */ jsx(Text, {
7491
7604
  muted: !0,
7492
7605
  size: 1,
7493
- style: t52,
7606
+ style: t54,
7494
7607
  textOverflow: "ellipsis",
7495
- children: t53
7496
- }), $[110] = t53, $[111] = t54);
7497
- let t55;
7498
- $[112] !== t48 || $[113] !== t51 || $[114] !== t54 ? (t55 = /* @__PURE__ */ jsx(Box, {
7499
- marginLeft: t48,
7500
- style: t51,
7501
- children: t54
7502
- }), $[112] = t48, $[113] = t51, $[114] = t54, $[115] = t55) : t55 = $[115];
7503
- let t56 = mediaIndex < 3 ? "none" : "block", t57;
7504
- $[116] !== opacityCell || $[117] !== t56 ? (t57 = {
7505
- display: t56,
7608
+ children: t55
7609
+ }), $[114] = t55, $[115] = t56);
7610
+ let t57;
7611
+ $[116] !== t50 || $[117] !== t53 || $[118] !== t56 ? (t57 = /* @__PURE__ */ jsx(Box, {
7612
+ marginLeft: t50,
7613
+ style: t53,
7614
+ children: t56
7615
+ }), $[116] = t50, $[117] = t53, $[118] = t56, $[119] = t57) : t57 = $[119];
7616
+ let t58 = mediaIndex < 3 ? "none" : "block", t59;
7617
+ $[120] !== opacityCell || $[121] !== t58 ? (t59 = {
7618
+ display: t58,
7506
7619
  gridColumn: 8,
7507
7620
  gridRow: "auto",
7508
7621
  opacity: opacityCell
7509
- }, $[116] = opacityCell, $[117] = t56, $[118] = t57) : t57 = $[118];
7510
- let t58;
7511
- $[119] === Symbol.for("react.memo_cache_sentinel") ? (t58 = { lineHeight: "2em" }, $[119] = t58) : t58 = $[119];
7512
- let t59;
7513
- $[120] !== id || $[121] !== referenceCountVisible ? (t59 = /* @__PURE__ */ jsx(Text, {
7622
+ }, $[120] = opacityCell, $[121] = t58, $[122] = t59) : t59 = $[122];
7623
+ let t60;
7624
+ $[123] === Symbol.for("react.memo_cache_sentinel") ? (t60 = { lineHeight: "2em" }, $[123] = t60) : t60 = $[123];
7625
+ let t61;
7626
+ $[124] !== id || $[125] !== referenceCountVisible ? (t61 = /* @__PURE__ */ jsx(Text, {
7514
7627
  muted: !0,
7515
7628
  size: 1,
7516
- style: t58,
7629
+ style: t60,
7517
7630
  textOverflow: "ellipsis",
7518
7631
  children: referenceCountVisible ? /* @__PURE__ */ jsx(WithReferringDocuments, {
7519
7632
  id,
7520
- children: _temp2$5
7633
+ children: _temp3$4
7521
7634
  }) : /* @__PURE__ */ jsx(Fragment, { children: "-" })
7522
- }), $[120] = id, $[121] = referenceCountVisible, $[122] = t59) : t59 = $[122];
7523
- let t60;
7524
- $[123] !== t57 || $[124] !== t59 ? (t60 = /* @__PURE__ */ jsx(Box, {
7525
- style: t57,
7526
- children: t59
7527
- }), $[123] = t57, $[124] = t59, $[125] = t60) : t60 = $[125];
7528
- let t61 = mediaIndex < 3 ? 4 : 9, t62 = mediaIndex < 3 ? "span 5" : "auto", t63;
7529
- $[126] !== opacityCell || $[127] !== t61 || $[128] !== t62 ? (t63 = {
7530
- gridColumn: t61,
7635
+ }), $[124] = id, $[125] = referenceCountVisible, $[126] = t61) : t61 = $[126];
7636
+ let t62;
7637
+ $[127] !== t59 || $[128] !== t61 ? (t62 = /* @__PURE__ */ jsx(Box, {
7638
+ style: t59,
7639
+ children: t61
7640
+ }), $[127] = t59, $[128] = t61, $[129] = t62) : t62 = $[129];
7641
+ let t63 = mediaIndex < 3 ? 4 : 9, t64 = mediaIndex < 3 ? "span 5" : "auto", t65;
7642
+ $[130] !== opacityCell || $[131] !== t63 || $[132] !== t64 ? (t65 = {
7643
+ gridColumn: t63,
7531
7644
  gridRowStart: "1",
7532
- gridRowEnd: t62,
7645
+ gridRowEnd: t64,
7533
7646
  opacity: opacityCell
7534
- }, $[126] = opacityCell, $[127] = t61, $[128] = t62, $[129] = t63) : t63 = $[129];
7535
- let t64;
7536
- $[130] === error ? t64 = $[131] : (t64 = error && /* @__PURE__ */ jsx(Box, {
7647
+ }, $[130] = opacityCell, $[131] = t63, $[132] = t64, $[133] = t65) : t65 = $[133];
7648
+ let t66;
7649
+ $[134] === error ? t66 = $[135] : (t66 = error && /* @__PURE__ */ jsx(Box, {
7537
7650
  padding: 2,
7538
7651
  children: /* @__PURE__ */ jsx(Tooltip, {
7539
7652
  animate: !0,
@@ -7552,39 +7665,44 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
7552
7665
  children: /* @__PURE__ */ jsx(StyledWarningIcon, { color: "critical" })
7553
7666
  })
7554
7667
  })
7555
- }), $[130] = error, $[131] = t64);
7556
- let t65;
7557
- $[132] !== t63 || $[133] !== t64 ? (t65 = /* @__PURE__ */ jsx(Flex, {
7668
+ }), $[134] = error, $[135] = t66);
7669
+ let t67;
7670
+ $[136] !== t65 || $[137] !== t66 ? (t67 = /* @__PURE__ */ jsx(Flex, {
7558
7671
  align: "center",
7559
7672
  justify: "center",
7560
- style: t63,
7561
- children: t64
7562
- }), $[132] = t63, $[133] = t64, $[134] = t65) : t65 = $[134];
7563
- let t66;
7564
- return $[135] !== item.updating || $[136] !== scheme || $[137] !== selected || $[138] !== t13 || $[139] !== t22 || $[140] !== t28 || $[141] !== t36 || $[142] !== t41 || $[143] !== t47 || $[144] !== t5 || $[145] !== t55 || $[146] !== t60 || $[147] !== t65 || $[148] !== t9 ? (t66 = /* @__PURE__ */ jsxs(ContainerGrid$1, {
7565
- onClick: t5,
7673
+ style: t65,
7674
+ children: t66
7675
+ }), $[136] = t65, $[137] = t66, $[138] = t67) : t67 = $[138];
7676
+ let t68;
7677
+ return $[139] !== draggable || $[140] !== item.updating || $[141] !== scheme || $[142] !== selected || $[143] !== t11 || $[144] !== t15 || $[145] !== t24 || $[146] !== t30 || $[147] !== t38 || $[148] !== t43 || $[149] !== t49 || $[150] !== t57 || $[151] !== t6 || $[152] !== t62 || $[153] !== t67 || $[154] !== t7 ? (t68 = /* @__PURE__ */ jsxs(ContainerGrid$1, {
7678
+ draggable,
7679
+ onClick: t6,
7680
+ onDragStart: t7,
7566
7681
  $scheme: scheme,
7567
7682
  $selected: selected,
7568
- style: t9,
7569
- $updating: t10,
7683
+ style: t11,
7684
+ $updating: t12,
7570
7685
  children: [
7571
- t13,
7572
- t22,
7573
- t28,
7574
- t36,
7575
- t41,
7576
- t47,
7577
- t55,
7578
- t60,
7579
- t65
7686
+ t15,
7687
+ t24,
7688
+ t30,
7689
+ t38,
7690
+ t43,
7691
+ t49,
7692
+ t57,
7693
+ t62,
7694
+ t67
7580
7695
  ]
7581
- }), $[135] = item.updating, $[136] = scheme, $[137] = selected, $[138] = t13, $[139] = t22, $[140] = t28, $[141] = t36, $[142] = t41, $[143] = t47, $[144] = t5, $[145] = t55, $[146] = t60, $[147] = t65, $[148] = t9, $[149] = t66) : t66 = $[149], t66;
7696
+ }), $[139] = draggable, $[140] = item.updating, $[141] = scheme, $[142] = selected, $[143] = t11, $[144] = t15, $[145] = t24, $[146] = t30, $[147] = t38, $[148] = t43, $[149] = t49, $[150] = t57, $[151] = t6, $[152] = t62, $[153] = t67, $[154] = t7, $[155] = t68) : t68 = $[155], t68;
7582
7697
  };
7583
7698
  var TableRowAsset_default = memo(TableRowAsset);
7584
7699
  function _temp$7(state) {
7585
7700
  return state.assets.lastPicked;
7586
7701
  }
7587
- function _temp2$5(t0) {
7702
+ function _temp2$5(pickedItem) {
7703
+ return pickedItem.asset._id;
7704
+ }
7705
+ function _temp3$4(t0) {
7588
7706
  let { isLoading, referringDocuments } = t0, uniqueDocuments = getUniqueDocuments(referringDocuments);
7589
7707
  return isLoading ? /* @__PURE__ */ jsx(Fragment, { children: "-" }) : /* @__PURE__ */ jsx(Fragment, { children: Array.isArray(uniqueDocuments) ? uniqueDocuments.length : 0 });
7590
7708
  }