import { SvelteComponent as ue, init as we, safe_not_equal as _e, append_styles as ye, add_render_callback as Te, element as h, create_component as de, space as I, text as E, attr as v, set_style as C, null_to_empty as Z, toggle_class as j, insert as U, mount_component as ge, append as d, listen as be, set_data as D, transition_in as Y, transition_out as B, check_outros as Me, detach as z, destroy_component as he, src_url_equal as X, action_destroyer as Pe, destroy_each as x, run_all as Ce, group_outros as Ue, noop as ke } from "../../../vendor/svelte/internal/index.js";
import "../../../shared-utils/tag.js";
import "three";
import "../../../vendor/hammerjs/hammer.js";
import "../../../shared-utils/three/PointSelector/index.js";
import "../../../shared-utils/three/CSS3DRenderer/index.js";
import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
import "@realsee/five/line";
import { notNil as $ } from "../../../shared-utils/isNil.js";
import "../../../shared-utils/three/core/Five_LineMaterial2.js";
import "../../../shared-utils/three/core/Sphere.js";
import "../../../shared-utils/three/blink.js";
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
import "../../../vendor/earcut/src/earcut.js";
import "../../../shared-utils/five/FivePuppet.js";
import ee from "../../utils/px2rem.js";
import ze from "../Common/Shadow.js";
import { svelteResizeObserver as Ie } from "../../../shared-utils/svelte/resizeObserver.js";
import { MARKETING_MORE_ICON as Se, MARKETING_LIGHT_MORE_ICON as Ee } from "./Assets/marketingIcon.js";
import De from "../Common/MediaItem.js";
import "../../../shared-utils/positionToVector3.js";
import "../../../shared-utils/five/vector3ToScreen.js";
import "../../../shared-utils/five/getFiveModel.js";
import "../../../shared-utils/Utils/FiveUtil.js";
import "../../../shared-utils/Utils/BaseUtil.js";
import "../../../shared-utils/Subscribe.js";
import "../../../shared-utils/Utils/WorkUtil.js";
import "../../../shared-utils/five/transformPosition.js";
import "../../../shared-utils/three/temp.js";
import "../../../shared-utils/three/core/Raycaster.js";
import "../../../shared-utils/dom/resizeObserver.js";
import "../../../shared-utils/five/fiveEveryReadyListener.js";
import "../../../shared-utils/throttle.js";
import "../../../shared-utils/five/fiveModelLoad.js";
import "../../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
import "../../../shared-utils/three/Magnifier.js";
import "../../../shared-utils/three/PointSelector/utils/PointHelper.js";
import "../../../shared-utils/three/Assets/index.js";
import "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
import "../../../shared-utils/even.js";
import "../../../shared-utils/CSS3DRender/OpacityMesh.js";
import "../../../shared-utils/three/centerPoint.js";
import "../../../shared-utils/three/getObjectVisible.js";
import "../../../shared-utils/three/PointSelector/utils/html.js";
import "../../../shared-utils/CSS3DRender/index.js";
import "../../../shared-utils/CSS3DRender/CSS3DRenderer.js";
import "../../../shared-utils/createResizeObserver.js";
import "../../../shared-utils/three/PointSelector/utils/PointHelper2.js";
import "../../../Sculpt/Meshes/Line.js";
import "../../../Sculpt/typings/style.js";
import "../../../shared-utils/three/IObject3D.js";
import "../../../Sculpt/utils/Meshes/getLengthHTML.js";
import "../../../shared-utils/three/applyObjectMatrixWorld.js";
import "../../../shared-utils/util.js";
import "../../../shared-utils/five/getFiveFromParentChain.js";
import "../../../shared-utils/three/core/LineGeometry.js";
import "../../../shared-utils/three/core/LineMaterial.js";
import "../../../shared-utils/three/core/Line2.js";
import "../../../shared-utils/three/core/LineMaterial2.js";
import "../../../Sculpt/utils/unit.js";
import "../../../Sculpt/utils/renderDom.js";
import "../../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
import "../../../shared-utils/isTouchDevice.js";
import "../../../shared-utils/five/getPosition.js";
import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
import "../../../shared-utils/three/PointSelector/utils/contents.js";
import "../../../Sculpt/utils/three/rayOnLine.js";
import "../../../vendor/animejs/lib/anime.es.js";
import "../../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
import "../../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
import "../../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
import "@realsee/five";
import "../../../vendor/svelte/transition/index.js";
import "../../../vendor/svelte/easing/index.js";
import "../../../vendor/resize-observer-polyfill/dist/ResizeObserver.es.js";
import "../../Assets/Icon.js";
function Le(i) {
  ye(i, "svelte-biv7k0", '@charset "UTF-8";.svelte-biv7k0.svelte-biv7k0{box-sizing:border-box}.marketing.svelte-biv7k0.svelte-biv7k0{transform:translateY(-100%)}.marketing.svelte-biv7k0 .line.svelte-biv7k0{position:absolute;height:1.875rem;width:0.0625rem;left:50%;transform:translateX(-50%);background-color:white;bottom:0;transform-origin:bottom;transition:all 500ms}.marketing.svelte-biv7k0 .content.svelte-biv7k0{position:relative;min-width:7.5rem;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;border-radius:0.375rem;top:-1.875rem;left:-1rem;transition-property:opacity, transform;transition-duration:500ms}.marketing.svelte-biv7k0 .content .headerImage.svelte-biv7k0{width:100%;position:absolute;left:0;top:0;transform:translateY(-100%);border-top-left-radius:0.375rem;border-top-right-radius:0.375rem}.marketing.svelte-biv7k0 .content .content-wrapper.svelte-biv7k0{width:100%;padding:1.25rem}.title-wrapper.svelte-biv7k0.svelte-biv7k0{position:relative;width:100%}.title-wrapper.svelte-biv7k0 .title.svelte-biv7k0{border-radius:0.25rem;width:100%}.title-wrapper.svelte-biv7k0 .title .text.svelte-biv7k0{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-word;overflow-wrap:break-word;hyphens:auto;-webkit-hyphens:auto;letter-spacing:0;font-size:1rem;font-weight:600;line-height:1.375rem}.price-wrapper.svelte-biv7k0.svelte-biv7k0{box-sizing:border-box;width:100%;margin-top:0.5rem;display:flex;justify-content:space-between;align-items:center}.price-wrapper.svelte-biv7k0 .price-section.svelte-biv7k0{flex-shrink:0;overflow:hidden;white-space:nowrap}.price-wrapper.svelte-biv7k0 .price-section .value.svelte-biv7k0{font-size:1.25rem;font-weight:700;line-height:1.5rem;font-family:DINAlternate-Bold TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.price-wrapper.svelte-biv7k0 .price-section .unit.svelte-biv7k0{font-size:1.25rem;font-weight:700;line-height:1.5rem;font-family:DINAlternate-Bold TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif !important;letter-spacing:0}.price-wrapper.svelte-biv7k0 .action-section.svelte-biv7k0{display:flex;align-items:center;height:1.125rem}.price-wrapper.svelte-biv7k0 .action-section .highlight-text.svelte-biv7k0{font-size:0.75rem;line-height:1.125rem;font-weight:400;letter-spacing:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:8.75rem}.tags-wrapper.svelte-biv7k0.svelte-biv7k0{position:relative;overflow:hidden;margin-top:0.3125rem}.tags-wrapper.svelte-biv7k0 .tags.svelte-biv7k0{position:relative;display:inline-flex;max-width:100%;flex-wrap:wrap}.tags-wrapper.svelte-biv7k0 .tags .tag.svelte-biv7k0{display:block;text-align:center;flex-shrink:0;flex-grow:0;font-size:0.75rem;font-weight:400;height:1.125rem;line-height:1.125rem;margin-right:0.25rem;margin-bottom:0.25rem;padding:0 0.25rem;border-radius:0.125rem;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}.media-wrapper.svelte-biv7k0.svelte-biv7k0{margin-top:0.375rem;width:100%;aspect-ratio:16/9;border-radius:0.25rem;overflow:hidden}.description.svelte-biv7k0.svelte-biv7k0{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;width:100%;overflow:hidden;text-overflow:ellipsis;word-break:break-word;overflow-wrap:break-word;hyphens:auto;-webkit-hyphens:auto;white-space:normal;margin-top:0.25rem;font-size:0.875rem;font-weight:400;line-height:1.25rem;letter-spacing:0}.more-share-wrapper.svelte-biv7k0.svelte-biv7k0{margin-top:0.75rem;display:block;width:100%;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between}.more-share-wrapper.svelte-biv7k0 .more-text.svelte-biv7k0{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:center;height:1.25rem;font-size:0.875rem;font-weight:500;line-height:1.25rem;letter-spacing:0}.more-share-wrapper.svelte-biv7k0 .more-text .more-icon.svelte-biv7k0{margin-left:0.125rem;width:0.875rem;height:0.875rem}.marketing.light.svelte-biv7k0 .content.svelte-biv7k0{background-color:white}.marketing.light.svelte-biv7k0 .content .title-wrapper .title .text.svelte-biv7k0{color:rgba(0, 0, 0, 0.8)}.marketing.light.svelte-biv7k0 .content .tags-wrapper .tags .primary-tag.svelte-biv7k0{background:rgba(234, 208, 154, 0.5);color:#946700}.marketing.light.svelte-biv7k0 .content .tags-wrapper .tags .secondary-tag.svelte-biv7k0{background:rgba(0, 0, 0, 0.06);color:rgba(0, 0, 0, 0.5)}.marketing.light.svelte-biv7k0 .content .description.svelte-biv7k0{color:#000}.marketing.light.svelte-biv7k0 .content .price-wrapper.svelte-biv7k0{color:#ae7900}.marketing.light.svelte-biv7k0 .content .more-share-wrapper .more-text.svelte-biv7k0{font-family:PingFangSC-Medium;color:rgba(0, 0, 0, 0.8509803922)}.marketing.dark.svelte-biv7k0 .content.svelte-biv7k0{background-color:rgba(0, 0, 0, 0.75)}.marketing.dark.svelte-biv7k0 .content .title-wrapper .title .text.svelte-biv7k0{color:white}.marketing.dark.svelte-biv7k0 .content .tags-wrapper .tags .primary-tag.svelte-biv7k0{background:rgba(234, 208, 154, 0.5);color:white}.marketing.dark.svelte-biv7k0 .content .tags-wrapper .tags .secondary-tag.svelte-biv7k0{background:rgba(255, 255, 255, 0.15);color:rgba(255, 255, 255, 0.85)}.marketing.dark.svelte-biv7k0 .content .description.svelte-biv7k0{color:#fff}.marketing.dark.svelte-biv7k0 .content .price-wrapper.svelte-biv7k0{color:#ead09a;fill:#ead09a}.marketing.dark.svelte-biv7k0 .content .more-share-wrapper .more-text.svelte-biv7k0{font-family:PingFangSC-Medium;color:#fff}.marketing.unfolded.svelte-biv7k0 .line.svelte-biv7k0{transform:translateX(-50%) scale(1, 1);transition-timing-function:ease-out}.marketing.folded.svelte-biv7k0 .line.svelte-biv7k0{transform:translateX(-50%) scale(1, 0);transition-timing-function:ease-in}.marketing.unfolded.svelte-biv7k0 .content.svelte-biv7k0{opacity:1;transform:translateY(0);transition-timing-function:ease-out}.marketing.folded.svelte-biv7k0 .content.svelte-biv7k0{opacity:0;transform:translateY(0.425rem);transition-timing-function:ease-in}.tag.svelte-biv7k0.svelte-biv7k0,.text.svelte-biv7k0.svelte-biv7k0{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}');
}
function te(i, e, t) {
  const l = i.slice();
  return l[0] = e[t], l;
}
function ie(i, e, t) {
  const l = i.slice();
  return l[0] = e[t], l;
}
function re(i) {
  let e, t;
  return {
    c() {
      e = h("img"), v(e, "class", "headerImage svelte-biv7k0"), X(e.src, t = /*data*/
      i[2].headerPictureUrl) || v(e, "src", t), v(e, "alt", "");
    },
    m(l, r) {
      U(l, e, r);
    },
    p(l, r) {
      r[0] & /*data*/
      4 && !X(e.src, t = /*data*/
      l[2].headerPictureUrl) && v(e, "src", t);
    },
    d(l) {
      l && z(e);
    }
  };
}
function le(i) {
  let e, t, l, r, n, o = (
    /*primaryTags*/
    i[5] || []
  ), a = [];
  for (let f = 0; f < o.length; f += 1)
    a[f] = oe(ie(i, o, f));
  let s = (
    /*secondaryTags*/
    i[4] || []
  ), g = [];
  for (let f = 0; f < s.length; f += 1)
    g[f] = ne(te(i, s, f));
  return {
    c() {
      e = h("div"), t = h("div");
      for (let f = 0; f < a.length; f += 1)
        a[f].c();
      l = I();
      for (let f = 0; f < g.length; f += 1)
        g[f].c();
      v(t, "class", "tags svelte-biv7k0"), v(e, "class", "tags-wrapper svelte-biv7k0");
    },
    m(f, T) {
      U(f, e, T), d(e, t);
      for (let p = 0; p < a.length; p += 1)
        a[p] && a[p].m(t, null);
      d(t, l);
      for (let p = 0; p < g.length; p += 1)
        g[p] && g[p].m(t, null);
      r || (n = [
        Pe(Ie.call(null, t)),
        be(
          t,
          "clientHeight",
          /*clientHeight_handler*/
          i[26]
        )
      ], r = !0);
    },
    p(f, T) {
      if (T[0] & /*primaryTags*/
      32) {
        o = /*primaryTags*/
        f[5] || [];
        let p;
        for (p = 0; p < o.length; p += 1) {
          const M = ie(f, o, p);
          a[p] ? a[p].p(M, T) : (a[p] = oe(M), a[p].c(), a[p].m(t, l));
        }
        for (; p < a.length; p += 1)
          a[p].d(1);
        a.length = o.length;
      }
      if (T[0] & /*secondaryTags*/
      16) {
        s = /*secondaryTags*/
        f[4] || [];
        let p;
        for (p = 0; p < s.length; p += 1) {
          const M = te(f, s, p);
          g[p] ? g[p].p(M, T) : (g[p] = ne(M), g[p].c(), g[p].m(t, null));
        }
        for (; p < g.length; p += 1)
          g[p].d(1);
        g.length = s.length;
      }
    },
    d(f) {
      f && z(e), x(a, f), x(g, f), r = !1, Ce(n);
    }
  };
}
function oe(i) {
  let e, t = (
    /*tag*/
    i[0] + ""
  ), l;
  return {
    c() {
      e = h("div"), l = E(t), v(e, "class", "tag primary-tag svelte-biv7k0"), C(e, "min-width", q);
    },
    m(r, n) {
      U(r, e, n), d(e, l);
    },
    p(r, n) {
      n[0] & /*primaryTags*/
      32 && t !== (t = /*tag*/
      r[0] + "") && D(l, t);
    },
    d(r) {
      r && z(e);
    }
  };
}
function ne(i) {
  let e, t = (
    /*tag*/
    i[0] + ""
  ), l;
  return {
    c() {
      e = h("div"), l = E(t), v(e, "class", "tag secondary-tag svelte-biv7k0"), C(e, "min-width", q);
    },
    m(r, n) {
      U(r, e, n), d(e, l);
    },
    p(r, n) {
      n[0] & /*secondaryTags*/
      16 && t !== (t = /*tag*/
      r[0] + "") && D(l, t);
    },
    d(r) {
      r && z(e);
    }
  };
}
function ae(i) {
  let e, t, l;
  return t = new De({
    props: {
      media: (
        /*mediaData*/
        i[16][0]
      ),
      tag: (
        /*tag*/
        i[0]
      ),
      objectFit: "cover"
    }
  }), {
    c() {
      e = h("div"), de(t.$$.fragment), v(e, "class", "media-wrapper svelte-biv7k0");
    },
    m(r, n) {
      U(r, e, n), ge(t, e, null), l = !0;
    },
    p(r, n) {
      const o = {};
      n[0] & /*mediaData*/
      65536 && (o.media = /*mediaData*/
      r[16][0]), n[0] & /*tag*/
      1 && (o.tag = /*tag*/
      r[0]), t.$set(o);
    },
    i(r) {
      l || (Y(t.$$.fragment, r), l = !0);
    },
    o(r) {
      B(t.$$.fragment, r), l = !1;
    },
    d(r) {
      r && z(e), he(t);
    }
  };
}
function se(i) {
  let e, t = (
    /*data*/
    i[2].description + ""
  ), l;
  return {
    c() {
      e = h("div"), l = E(t), v(e, "class", "description svelte-biv7k0");
    },
    m(r, n) {
      U(r, e, n), d(e, l);
    },
    p(r, n) {
      n[0] & /*data*/
      4 && t !== (t = /*data*/
      r[2].description + "") && D(l, t);
    },
    d(r) {
      r && z(e);
    }
  };
}
function pe(i) {
  let e, t, l, r = (
    /*havePrice*/
    i[3] && me(i)
  ), n = !/*havePrice*/
  i[3] && /*data*/
  i[2].highlightText && ve(i);
  return {
    c() {
      e = h("div"), r && r.c(), t = I(), l = h("div"), n && n.c(), v(l, "class", "action-section svelte-biv7k0"), v(e, "class", "price-wrapper svelte-biv7k0");
    },
    m(o, a) {
      U(o, e, a), r && r.m(e, null), d(e, t), d(e, l), n && n.m(l, null);
    },
    p(o, a) {
      /*havePrice*/
      o[3] ? r ? r.p(o, a) : (r = me(o), r.c(), r.m(e, t)) : r && (r.d(1), r = null), !/*havePrice*/
      o[3] && /*data*/
      o[2].highlightText ? n ? n.p(o, a) : (n = ve(o), n.c(), n.m(l, null)) : n && (n.d(1), n = null);
    },
    d(o) {
      o && z(e), r && r.d(), n && n.d();
    }
  };
}
function me(i) {
  let e, t, l = (
    /*data*/
    i[2].price.value + ""
  ), r, n, o = (
    /*data*/
    i[2].price.unit && fe(i)
  );
  return {
    c() {
      e = h("div"), t = h("span"), r = E(l), n = I(), o && o.c(), v(t, "class", "value svelte-biv7k0"), v(e, "class", "price-section svelte-biv7k0");
    },
    m(a, s) {
      U(a, e, s), d(e, t), d(t, r), d(e, n), o && o.m(e, null);
    },
    p(a, s) {
      s[0] & /*data*/
      4 && l !== (l = /*data*/
      a[2].price.value + "") && D(r, l), /*data*/
      a[2].price.unit ? o ? o.p(a, s) : (o = fe(a), o.c(), o.m(e, null)) : o && (o.d(1), o = null);
    },
    d(a) {
      a && z(e), o && o.d();
    }
  };
}
function fe(i) {
  let e, t = (
    /*data*/
    i[2].price.unit + ""
  ), l;
  return {
    c() {
      e = h("span"), l = E(t), v(e, "class", "unit svelte-biv7k0");
    },
    m(r, n) {
      U(r, e, n), d(e, l);
    },
    p(r, n) {
      n[0] & /*data*/
      4 && t !== (t = /*data*/
      r[2].price.unit + "") && D(l, t);
    },
    d(r) {
      r && z(e);
    }
  };
}
function ve(i) {
  let e, t = (
    /*data*/
    i[2].highlightText + ""
  ), l;
  return {
    c() {
      e = h("span"), l = E(t), v(e, "class", "highlight-text svelte-biv7k0");
    },
    m(r, n) {
      U(r, e, n), d(e, l);
    },
    p(r, n) {
      n[0] & /*data*/
      4 && t !== (t = /*data*/
      r[2].highlightText + "") && D(l, t);
    },
    d(r) {
      r && z(e);
    }
  };
}
function ce(i) {
  let e, t, l, r;
  function n(s, g) {
    return (
      /*isLight*/
      s[17] ? Re : Ne
    );
  }
  let o = n(i), a = o(i);
  return {
    c() {
      e = h("div"), t = h("div"), l = E(
        /*viewMoreText*/
        i[9]
      ), r = I(), a.c(), v(t, "class", "more-text svelte-biv7k0"), v(e, "class", "more-share-wrapper svelte-biv7k0");
    },
    m(s, g) {
      U(s, e, g), d(e, t), d(t, l), d(t, r), a.m(t, null);
    },
    p(s, g) {
      g[0] & /*viewMoreText*/
      512 && D(
        l,
        /*viewMoreText*/
        s[9]
      ), o === (o = n(s)) && a ? a.p(s, g) : (a.d(1), a = o(s), a && (a.c(), a.m(t, null)));
    },
    d(s) {
      s && z(e), a.d();
    }
  };
}
function Ne(i) {
  let e, t;
  return {
    c() {
      e = h("img"), v(e, "class", "more-icon svelte-biv7k0"), X(e.src, t = Se) || v(e, "src", t), v(e, "alt", "查看更多");
    },
    m(l, r) {
      U(l, e, r);
    },
    p: ke,
    d(l) {
      l && z(e);
    }
  };
}
function Re(i) {
  let e, t;
  return {
    c() {
      e = h("img"), v(e, "class", "more-icon svelte-biv7k0"), X(e.src, t = Ee) || v(e, "src", t), v(e, "alt", "查看更多");
    },
    m(l, r) {
      U(l, e, r);
    },
    p: ke,
    d(l) {
      l && z(e);
    }
  };
}
function We(i) {
  let e, t, l, r, n, o, a, s, g, f, T, p = (
    /*data*/
    i[2].title + ""
  ), M, R, L, W, A, F, N, S, H, P;
  Te(
    /*onwindowresize*/
    i[25]
  ), t = new ze({
    props: {
      visible: (
        /*unfolded*/
        i[8]
      ),
      outDelay: 500,
      left: 61,
      bottom: 87,
      blurRadius: 150,
      spreadRadius: 75
    }
  });
  let u = (
    /*data*/
    i[2].headerPictureUrl && re(i)
  ), k = (
    /*hasTags*/
    i[11] && le(i)
  ), b = (
    /*showMedia*/
    i[15] && /*mediaData*/
    i[16] && /*mediaData*/
    i[16].length > 0 && ae(i)
  ), w = (
    /*data*/
    i[2].description && se(i)
  ), _ = (
    /*havePrice*/
    (i[3] || /*data*/
    i[2].highlightText) && pe(i)
  ), y = (
    /*hasMore*/
    i[10] && ce(i)
  );
  return {
    c() {
      e = h("div"), de(t.$$.fragment), l = I(), r = h("div"), n = I(), o = h("div"), u && u.c(), a = I(), s = h("div"), g = h("div"), f = h("div"), T = h("div"), M = E(p), R = I(), k && k.c(), L = I(), b && b.c(), W = I(), w && w.c(), A = I(), _ && _.c(), F = I(), y && y.c(), v(r, "class", "line svelte-biv7k0"), C(
        r,
        "transition-delay",
        /*unfolded*/
        i[8] ? (
          /*lineDelayUnfolded*/
          i[14] + "ms"
        ) : (
          /*lineDelayFolded*/
          i[13] + "ms"
        )
      ), v(T, "class", "text svelte-biv7k0"), v(f, "class", "title svelte-biv7k0"), v(g, "class", "title-wrapper svelte-biv7k0"), v(s, "class", "content-wrapper svelte-biv7k0"), C(
        s,
        "padding-top",
        /*data*/
        i[2].headerPictureUrl ? "10px" : "20px"
      ), v(o, "class", "content svelte-biv7k0"), C(o, "max-width", ee(
        /*maxWidth*/
        i[6]
      )), C(
        o,
        "transition-delay",
        /*unfolded*/
        i[8] ? (
          /*contentDelayUnfolded*/
          i[12] + "ms"
        ) : "0ms"
      ), C(
        o,
        "border-top-left-radius",
        /*data*/
        i[2].headerPictureUrl ? "0px" : "6px"
      ), C(
        o,
        "border-top-right-radius",
        /*data*/
        i[2].headerPictureUrl ? "0px" : "6px"
      ), v(e, "class", N = Z(`marketing ${/*theme*/
      i[7]}`) + " svelte-biv7k0"), j(
        e,
        "unfolded",
        /*unfolded*/
        i[8]
      ), j(
        e,
        "folded",
        /*folded*/
        i[18]
      );
    },
    m(m, c) {
      U(m, e, c), ge(t, e, null), d(e, l), d(e, r), d(e, n), d(e, o), u && u.m(o, null), d(o, a), d(o, s), d(s, g), d(g, f), d(f, T), d(T, M), d(s, R), k && k.m(s, null), d(s, L), b && b.m(s, null), d(s, W), w && w.m(s, null), d(s, A), _ && _.m(s, null), d(s, F), y && y.m(s, null), S = !0, H || (P = be(
        window,
        "resize",
        /*onwindowresize*/
        i[25]
      ), H = !0);
    },
    p(m, c) {
      const O = {};
      c[0] & /*unfolded*/
      256 && (O.visible = /*unfolded*/
      m[8]), t.$set(O), c[0] & /*unfolded, lineDelayUnfolded, lineDelayFolded*/
      24832 && C(
        r,
        "transition-delay",
        /*unfolded*/
        m[8] ? (
          /*lineDelayUnfolded*/
          m[14] + "ms"
        ) : (
          /*lineDelayFolded*/
          m[13] + "ms"
        )
      ), /*data*/
      m[2].headerPictureUrl ? u ? u.p(m, c) : (u = re(m), u.c(), u.m(o, a)) : u && (u.d(1), u = null), (!S || c[0] & /*data*/
      4) && p !== (p = /*data*/
      m[2].title + "") && D(M, p), /*hasTags*/
      m[11] ? k ? k.p(m, c) : (k = le(m), k.c(), k.m(s, L)) : k && (k.d(1), k = null), /*showMedia*/
      m[15] && /*mediaData*/
      m[16] && /*mediaData*/
      m[16].length > 0 ? b ? (b.p(m, c), c[0] & /*showMedia, mediaData*/
      98304 && Y(b, 1)) : (b = ae(m), b.c(), Y(b, 1), b.m(s, W)) : b && (Ue(), B(b, 1, 1, () => {
        b = null;
      }), Me()), /*data*/
      m[2].description ? w ? w.p(m, c) : (w = se(m), w.c(), w.m(s, A)) : w && (w.d(1), w = null), /*havePrice*/
      m[3] || /*data*/
      m[2].highlightText ? _ ? _.p(m, c) : (_ = pe(m), _.c(), _.m(s, F)) : _ && (_.d(1), _ = null), /*hasMore*/
      m[10] ? y ? y.p(m, c) : (y = ce(m), y.c(), y.m(s, null)) : y && (y.d(1), y = null), c[0] & /*data*/
      4 && C(
        s,
        "padding-top",
        /*data*/
        m[2].headerPictureUrl ? "10px" : "20px"
      ), c[0] & /*maxWidth*/
      64 && C(o, "max-width", ee(
        /*maxWidth*/
        m[6]
      )), c[0] & /*unfolded, contentDelayUnfolded*/
      4352 && C(
        o,
        "transition-delay",
        /*unfolded*/
        m[8] ? (
          /*contentDelayUnfolded*/
          m[12] + "ms"
        ) : "0ms"
      ), c[0] & /*data*/
      4 && C(
        o,
        "border-top-left-radius",
        /*data*/
        m[2].headerPictureUrl ? "0px" : "6px"
      ), c[0] & /*data*/
      4 && C(
        o,
        "border-top-right-radius",
        /*data*/
        m[2].headerPictureUrl ? "0px" : "6px"
      ), (!S || c[0] & /*theme*/
      128 && N !== (N = Z(`marketing ${/*theme*/
      m[7]}`) + " svelte-biv7k0")) && v(e, "class", N), (!S || c[0] & /*theme, unfolded*/
      384) && j(
        e,
        "unfolded",
        /*unfolded*/
        m[8]
      ), (!S || c[0] & /*theme, folded*/
      262272) && j(
        e,
        "folded",
        /*folded*/
        m[18]
      );
    },
    i(m) {
      S || (Y(t.$$.fragment, m), Y(b), S = !0);
    },
    o(m) {
      B(t.$$.fragment, m), B(b), S = !1;
    },
    d(m) {
      m && z(e), he(t), u && u.d(), k && k.d(), b && b.d(), w && w.d(), _ && _.d(), y && y.d(), H = !1, P();
    }
  };
}
const Ae = 499, Fe = 238, He = 280, q = 40;
function Oe(i, e, t) {
  let l, r, n, o, a, s, g, f, T, p, M, R, L, W, A, F, N, S, H, { tag: P } = e, u = 0, k, b = 0, w = !1;
  function _(c) {
    Math.abs(k - c) > 5 && (t(20, k = c), setTimeout(
      () => {
        t(22, w = !1);
      },
      100
    ));
  }
  function y() {
    t(1, u = window.innerWidth);
  }
  const m = (c) => _(c.detail);
  return i.$$set = (c) => {
    "tag" in c && t(0, P = c.tag);
  }, i.$$.update = () => {
    var c, O, K, J, Q;
    i.$$.dirty[0] & /*tag*/
    1 && t(8, l = (O = (c = P.state) == null ? void 0 : c.unfolded) != null ? O : !1), i.$$.dirty[0] & /*unfolded*/
    256 && t(18, r = !l), i.$$.dirty[0] & /*tag*/
    1 && t(2, n = P.data), i.$$.dirty[0] & /*data*/
    4 && t(3, o = $((K = n.price) == null ? void 0 : K.value) && ((J = n.price) == null ? void 0 : J.value) !== ""), i.$$.dirty[0] & /*tag*/
    1 && t(7, a = P.data.theme || "light"), i.$$.dirty[0] & /*theme*/
    128 && t(17, s = a === "light"), i.$$.dirty[0] & /*data*/
    4 && t(16, g = n.mediaData), i.$$.dirty[0] & /*tag*/
    1 && t(15, f = ((Q = P.config.popoverConfig) == null ? void 0 : Q.showMedia) === !0), i.$$.dirty[0] & /*windowWidth*/
    2 && t(24, T = u > 0 && u <= Ae), i.$$.dirty[0] & /*tag, isSmallScreen*/
    16777217 && t(6, p = (() => {
      var V;
      const G = (V = P.data.limitWidth) != null ? V : !0;
      if (typeof G == "number")
        return G;
      if (G === !0)
        return T ? Fe : He;
    })()), i.$$.dirty[0] & /*tagsCalculated, maxWidth, tagsOffsetHeight, maxTagsLength*/
    7340096 && (!w || p && p > 0) && (t(21, b = Math.max(1, Math.floor(((p || 172) - 20) / q))), k !== void 0 && k > 40 && t(21, b = Math.max(1, b - 1)), t(22, w = !0)), i.$$.dirty[0] & /*data, maxTagsLength*/
    2097156 && t(5, M = (n.brandTags || []).filter(Boolean).slice(0, b)), i.$$.dirty[0] & /*maxTagsLength, primaryTags*/
    2097184 && t(23, R = Math.max(0, b - M.length)), i.$$.dirty[0] & /*data, secondaryTagsLimit*/
    8388612 && t(4, L = (n.tags || []).filter(Boolean).slice(0, R)), i.$$.dirty[0] & /*primaryTags, secondaryTags*/
    48 && t(11, N = M.length > 0 || L.length > 0), i.$$.dirty[0] & /*havePrice, data*/
    12 && (o || n.highlightText), i.$$.dirty[0] & /*tag*/
    1 && t(10, S = P.config.popoverConfig.toolbar.showMore), i.$$.dirty[0] & /*tag*/
    1 && t(9, H = (() => $(P.config.popoverConfig.viewMoreText) && P.config.popoverConfig.viewMoreText.trim() !== "" ? P.config.popoverConfig.viewMoreText : "查看更多")());
  }, t(14, W = 400), t(13, A = 180 + 500 - 500 - 40), t(12, F = 400 + 180), [
    P,
    u,
    n,
    o,
    L,
    M,
    p,
    a,
    l,
    H,
    S,
    N,
    F,
    A,
    W,
    f,
    g,
    s,
    r,
    _,
    k,
    b,
    w,
    R,
    T,
    y,
    m
  ];
}
class mi extends ue {
  constructor(e) {
    super(), we(this, e, Oe, We, _e, { tag: 0 }, Le, [-1, -1]);
  }
}
export {
  mi as default
};
