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ress-steps-M7GWDJOW.js"],"sourcesContent":["import {\n __decorateClass\n} from \"./chunk-ZMSOBOFN.js\";\nimport {\n HostBinder\n} from \"./chunk-47KMAPAF.js\";\nimport {\n TsukuriText\n} from \"./chunk-ZVKNMDWP.js\";\nimport {\n $enum,\n createParser\n} from \"./chunk-KYGNPTYE.js\";\nimport {\n ContextConsumer\n} from \"./chunk-444UF7LD.js\";\nimport {\n ValidatePropertiesController,\n validateString\n} from \"./chunk-Z77RWYJX.js\";\n\n// ../../components/components/ProgressSteps/libs/chunk-MGRWUH6J.js\nimport {\n LitElement,\n html,\n unsafeCSS\n} from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { ref } from \"lit/directives/ref.js\";\nvar isType = $enum(\n \"basic\",\n \"simple\"\n), toType = createParser(\n isType,\n \"basic\"\n), progressStepContext = \"ProgressStep\", ProgressStepController = class {\n constructor(host) {\n this.host = host, this._stepIndex = -1, this._stepState = void 0, this._intervalState = void 0, this.stepWidth = \"0px\", this._type = \"basic\", this.label = \"\", this.intervalLabel = \"\", this.labelHeight = 0, this.intervalLabelHeight = 0, this.host.addController(this), this.sync = new HostBinder(this.host, {}, {}), this.consumer = new ContextConsumer(\n this.host,\n progressStepContext,\n (v) => {\n let state = v.steps.find((x) => x.name === this.host.name), stepState = state?.state, stepIndex = state?.index ?? -1, intervalState = v.type === \"simple\" || state == null ? void 0 : state.intervalState;\n if (v.type === this.type && v.width === this.stepWidth && stepIndex === this.stepIndex && stepState === this.stepState && intervalState === this.intervalState) {\n v.force && (this.updateLabelSize(), this.host.requestUpdate());\n return;\n }\n this._stepIndex = stepIndex, this._stepState = stepState, this._intervalState = intervalState, this.stepWidth = v.width, this.type !== v.type && (this._type = v.type, this.updateLabelSize()), this.host.requestUpdate();\n },\n !0\n );\n }\n get stepIndex() {\n return this._stepIndex;\n }\n get stepState() {\n return this._stepState;\n }\n get intervalState() {\n return this._intervalState;\n }\n get type() {\n return this._type;\n }\n get isLast() {\n var _a;\n return this.stepIndex === ((_a = this.consumer.value) == null ? void 0 : _a.steps.length);\n }\n get trackRightState() {\n return this.intervalState !== void 0 ? this.intervalState : this.stepState === \"active\" ? \"waiting\" : this.stepState;\n }\n get refs() {\n return {\n stepLabel: (ele) => {\n this.labelElement = ele instanceof TsukuriText ? ele : void 0;\n },\n intervalLabel: (ele) => {\n this.intervalLabelElement = ele instanceof TsukuriText ? ele : void 0;\n }\n };\n }\n get isFirst() {\n return this.stepIndex === 1;\n }\n updateLabelSize() {\n var _a;\n this.labelHeight = Math.round(\n this.labelElement ? this.labelElement.getBoundingClientRect().height + 8 : 0\n ), this.intervalLabelHeight = this.type === \"simple\" ? 0 : Math.round(\n this.intervalLabelElement ? this.intervalLabelElement.getBoundingClientRect().height : 0\n ), (_a = this.consumer.value) == null || _a.setHeight({\n name: this.host.name,\n labelHeight: this.labelHeight,\n intervalLabelHeight: this.intervalLabelHeight\n });\n }\n updateLabelHeight() {\n (this.labelHeight === 0 && this.intervalLabel !== \"\" || this.intervalLabelHeight === 0 && this.intervalLabel !== \"\" || this.label !== this.host.label || this.intervalLabel !== this.host.intervalLabel) && (this.label = this.host.label, this.intervalLabel = this.host.intervalLabel, this.cancelId && cancelAnimationFrame(this.cancelId), this.cancelId = requestAnimationFrame(() => {\n this.updateLabelSize();\n }));\n }\n hostUpdated() {\n this.sync.updateAttributes({\n \"data-tsukuri-component\": \"progress-step\",\n style: `--width: ${this.stepWidth};`\n }), this.updateLabelHeight();\n }\n}, style_default = \":host([data-tsukuri-component=progress-step]){all:initial;align-items:center;box-sizing:border-box;display:flex;justify-content:center;position:relative;visibility:inherit;--width:0px;width:var(--width)}[data-tsukuri-component=progress-step-track-left],[data-tsukuri-component=progress-step-track-right]{--bg-color:var(--color-sys-surface-interactive-surface-primary);background-color:var(--bg-color);height:2px;position:absolute;top:50%;transform:translateY(-50%);width:calc(var(--width)/2)}[data-tsukuri-state-progress-step-state=waiting][data-tsukuri-component=progress-step-track-left],[data-tsukuri-state-progress-step-state=waiting][data-tsukuri-component=progress-step-track-right]{--bg-color:var(--color-sys-surface3-surface-primary)}[data-tsukuri-component=progress-step-track-left]{left:0;z-index:10}[data-tsukuri-component=progress-step-track-left][data-tsukuri-state-progress-step-first=true]{display:none}[data-tsukuri-component=progress-step-track-right]{right:0}[data-tsukuri-component=progress-step-track-right][data-tsukuri-state-progress-step-last=true]{display:none}[data-tsukuri-component=progress-step-step-wrapper]{position:relative;z-index:100}[data-tsukuri-component=progress-step-interval-indicator]{--bg-color:var(--color-sys-surface-interactive-surface-primary);background-color:var(--bg-color);border-radius:50%;height:12px;position:absolute;right:-6px;top:50%;transform:translateY(-50%);width:12px;z-index:100}[data-tsukuri-component=progress-step-interval-indicator][data-tsukuri-state-progress-step-state=waiting]{--bg-color:var(--color-sys-surface3-surface-primary)}[data-tsukuri-component=progress-step-step-indicator-wrapper]{--bg-color:var(--color-sys-surface-interactive-surface-primary);--text-color:var(--color-sys-surface-interactive-text-primary);align-items:center;background-color:var(--bg-color);border-radius:50%;color:var(--text-color);display:flex;height:32px;justify-content:center;width:32px}[data-tsukuri-component=progress-step-step-indicator-wrapper][data-tsukuri-state-progress-step-state=waiting]{--bg-color:var(--color-sys-surface3-surface-primary);--text-color:var(--color-ref-white)}[data-tsukuri-component=progress-step-step-indicator-wrapper][data-tsukuri-state-progress-step-type=simple]{height:16px;width:16px}[data-tsukuri-component=progress-step-step-indicator]{display:block;left:50%;position:absolute;text-align:center;transform:translateX(-50%);width:var(--width)}[data-tsukuri-component=progress-step-interval-label],[data-tsukuri-component=progress-step-step-label]{-webkit-line-clamp:2;display:-webkit-box;left:50%;overflow:hidden;position:absolute;text-align:center;transform:translateX(-50%);-webkit-box-orient:vertical;clip-path:inset(0);text-overflow:ellipsis}[data-tsukuri-component=progress-step-interval-label]{top:calc(100% + 8px);width:calc(var(--width) - 40px)}[data-tsukuri-component=progress-step-step-label]{bottom:calc(100% + 8px);width:calc(var(--width) - 8px)}\", TsukuriProgressStep = class extends LitElement {\n constructor() {\n super(), this.label = \"\", this.name = \"\", this.intervalLabel = \"\", this.intervalName = \"\", new ValidatePropertiesController(this, {\n label: validateString(),\n name: validateString(),\n intervalLabel: validateString(),\n intervalName: validateString()\n }), this.controller = new ProgressStepController(this);\n }\n get indicator() {\n return this.controller.type === \"simple\" ? [] : html`${this.controller.stepIndex}`;\n }\n get interval() {\n return this.controller.intervalState === void 0 || this.controller.type === \"simple\" ? [] : [\n html`
${this.intervalLabel}
`\n ];\n }\n render() {\n return [\n html`
${this.label}
${this.indicator}
`,\n ...this.interval\n ];\n }\n};\nTsukuriProgressStep.styles = unsafeCSS(style_default), __decorateClass([\n property({ type: String })\n], TsukuriProgressStep.prototype, \"label\", 2), __decorateClass([\n property({ type: String })\n], TsukuriProgressStep.prototype, \"name\", 2), __decorateClass([\n property({ type: String, attribute: \"interval-label\" })\n], TsukuriProgressStep.prototype, \"intervalLabel\", 2), __decorateClass([\n property({ type: String, attribute: \"interval-name\" })\n], TsukuriProgressStep.prototype, \"intervalName\", 2), TsukuriProgressStep = __decorateClass([\n customElement(\"wc-tsukuri-progress-step\")\n], TsukuriProgressStep);\n\nexport {\n toType,\n progressStepContext,\n TsukuriProgressStep\n};\n//# sourceMappingURL=chunk-BKCIYWSQ.js.map","import {\n TsukuriProgressStep,\n progressStepContext,\n toType\n} from \"./chunk-BKCIYWSQ.js\";\nimport {\n __decorateClass\n} from \"./chunk-ZMSOBOFN.js\";\nimport {\n ResizeObserver as ResizeObserver2\n} from \"./chunk-BBNU5ANV.js\";\nimport \"./chunk-47KMAPAF.js\";\nimport \"./chunk-ZVKNMDWP.js\";\nimport \"./chunk-SVB7QVGC.js\";\nimport \"./chunk-2K2X2VFV.js\";\nimport \"./chunk-KYGNPTYE.js\";\nimport \"./chunk-JO2RVYIO.js\";\nimport {\n ContextProvider\n} from \"./chunk-444UF7LD.js\";\nimport {\n ValidatePropertiesController,\n validateString\n} from \"./chunk-Z77RWYJX.js\";\n\n// ../../components/components/ProgressSteps/libs/chunk-6CWVTWJL.js\nimport {\n LitElement,\n html,\n unsafeCSS\n} from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { styleMap } from \"lit/directives/style-map.js\";\nvar VisibilityController = class {\n constructor(host, onVisible) {\n this.host = host, this.onVisible = onVisible, this.hidden = !1, this.host.addController(this), this.onIntersection = this.onIntersection.bind(this), this.observer = new IntersectionObserver(this.onIntersection, {\n rootMargin: \"100px\",\n threshold: 1\n });\n }\n onIntersection(entries) {\n let entry = entries.find((v) => v.target === this.host);\n entry && entry.isIntersecting !== this.hidden && (entry.isIntersecting && (this.onVisible(), this.host.requestUpdate()), this.hidden = entry.isIntersecting);\n }\n hostConnected() {\n this.observer.observe(this.host);\n }\n hostDisconnected() {\n this.observer.disconnect();\n }\n}, queryStep = (ele) => Array.from(\n ele.querySelectorAll('[data-tsukuri-component=\"progress-step\"]')\n).filter(\n (ele2) => ele2 instanceof TsukuriProgressStep\n), toLabelHeight = (labelHeights) => Array.from(labelHeights.values()).reduce(\n (max, { labelHeight, intervalLabelHeight }) => ({\n labelHeight: max.labelHeight > labelHeight ? max.labelHeight : labelHeight,\n intervalLabelHeight: max.intervalLabelHeight > intervalLabelHeight ? max.intervalLabelHeight : intervalLabelHeight\n }),\n {\n labelHeight: 0,\n intervalLabelHeight: 0\n }\n), ProgressStepsController = class {\n constructor(host) {\n this.host = host, this.observer = new (typeof ResizeObserver < \"u\" ? ResizeObserver : ResizeObserver2)((entries) => {\n entries.forEach((entry) => {\n entry.target === this.host && (this.host.updateComplete.then(() => {\n requestAnimationFrame(() => {\n this.updateProvider(!0);\n });\n }), this.host.requestUpdate());\n });\n }), this.steps = [], this.labelHeights = /* @__PURE__ */ new Map(), this.labelHeight = {\n intervalLabelHeight: 0,\n labelHeight: 0\n }, this.host.addController(this), this.provider = new ContextProvider(\n this.host,\n progressStepContext,\n this.contextPayload\n ), new VisibilityController(this.host, () => this.updateProvider(!0));\n }\n get width() {\n return this.steps.length === 0 ? \"0px\" : this.host.stepWidth.endsWith(\"px\") ? this.host.stepWidth : `${Math.floor(\n this.host.getBoundingClientRect().width / this.steps.length\n )}px`;\n }\n get contextPayload() {\n return {\n steps: this.steps,\n setHeight: ({ name, ...heights }) => {\n this.labelHeights.set(name, heights), this.updateLabelPadding();\n },\n width: this.width,\n type: this.host.type,\n force: !1\n };\n }\n updateObserve() {\n this.host.stepWidth.endsWith(\"px\") ? this.observer.unobserve(this.host) : this.observer.observe(this.host);\n }\n updateProvider(force = !1) {\n this.provider.setValue({ ...this.contextPayload, force });\n }\n get style() {\n return {\n \"--width\": `calc(${this.provider.value.width} * ${this.steps.length})`,\n \"padding-top\": `${this.labelHeight.labelHeight}px`,\n \"padding-bottom\": `${this.labelHeight.intervalLabelHeight}px`\n };\n }\n toStep(ele, index, beforeActive) {\n let intervalActive = !1, stateActive = !1;\n return ele.name === this.host.active ? stateActive = !0 : this.host.active && ele.intervalName === this.host.active && this.host.type === \"basic\" && (intervalActive = !0), {\n step: {\n index: index + 1,\n label: ele.label,\n name: ele.name,\n state: stateActive ? \"active\" : beforeActive ? \"waiting\" : \"complete\",\n ...ele.intervalName ? {\n intervalName: ele.intervalName,\n intervalLabel: ele.intervalLabel,\n intervalState: intervalActive ? \"active\" : beforeActive || stateActive ? \"waiting\" : \"complete\"\n } : {}\n },\n isBeforeActive: beforeActive || stateActive || intervalActive\n };\n }\n hostConnected() {\n this.host.setAttribute(\"data-tsukuri-component\", \"progress-steps\"), this.host.setAttribute(\"tabindex\", \"0\");\n }\n hostUpdated() {\n this.host.style.setProperty(\n \"--overflow\",\n this.host.stepWidth === \"auto\" ? \"hidden\" : \"auto\"\n );\n }\n hostUpdate() {\n this.updateObserve();\n let [beforeActive, newSteps] = queryStep(this.host).reduce(\n ([beforeActive2, arr], ele, index) => {\n let { step, isBeforeActive } = this.toStep(ele, index, beforeActive2), newArr = [...arr, step];\n return [isBeforeActive, newArr];\n },\n [!1, []]\n );\n !beforeActive && newSteps[0] && (newSteps.forEach((v) => {\n v.state = \"waiting\", v.intervalState && (v.intervalState = \"waiting\");\n }), newSteps[0].state = \"active\"), this.steps = newSteps, this.updateProvider();\n }\n updateLabelPadding() {\n this.cancelId && cancelAnimationFrame(this.cancelId), this.cancelId = requestAnimationFrame(() => {\n this.labelHeight = toLabelHeight(this.labelHeights), this.host.requestUpdate();\n });\n }\n}, style_default = \":host([data-tsukuri-component=progress-steps]){all:initial;--overflow:hidden;box-sizing:border-box;display:block;margin:auto;overflow:var(--overflow);visibility:inherit;width:100%}[data-tsukuri-component=progress-steps-wrapper]{--width:100%;display:flex;flex-direction:row;width:var(--width)}\", TsukuriProgressSteps = class extends LitElement {\n constructor() {\n super(), this.type = \"basic\", this.active = \"\", this.stepWidth = \"auto\", new ValidatePropertiesController(this, {\n type: toType,\n active: validateString(),\n stepWidth: validateString(\"auto\")\n }), this.controller = new ProgressStepsController(this);\n }\n render() {\n return html`
this.requestUpdate()}\">
`;\n }\n};\nTsukuriProgressSteps.styles = unsafeCSS(style_default), __decorateClass([\n property({ type: String, converter: toType })\n], TsukuriProgressSteps.prototype, \"type\", 2), __decorateClass([\n property({ type: String })\n], TsukuriProgressSteps.prototype, \"active\", 2), __decorateClass([\n property({ type: String, attribute: \"step-width\" })\n], TsukuriProgressSteps.prototype, \"stepWidth\", 2), TsukuriProgressSteps = __decorateClass([\n customElement(\"wc-tsukuri-progress-steps\")\n], TsukuriProgressSteps);\nexport {\n TsukuriProgressSteps\n};\n//# sourceMappingURL=wc-tsukuri-progress-steps-M7GWDJOW.js.map"],"names":["isType","toType","progressStepContext","ProgressStepController","host","v","state","x","stepState","stepIndex","intervalState","_a","ele","style_default","TsukuriProgressStep","VisibilityController","onVisible","entries","entry","queryStep","ele2","toLabelHeight","labelHeights","max","labelHeight","intervalLabelHeight","ProgressStepsController","name","heights","force","index","beforeActive","intervalActive","stateActive","newSteps","beforeActive2","arr","step","isBeforeActive","newArr","TsukuriProgressSteps"],"sourceRoot":""}