carhop__plugins__PROD-DEV/plugins/carhop-blocks/build/story-timeline/index.js
2026-04-08 16:10:38 +02:00

1 line
2.5 KiB
JavaScript

(()=>{"use strict";var e,r={6940:()=>{const e=window.wp.blocks,r=(window.wp.i18n,window.wp.blockEditor),s=window.wp.data,t=window.ReactJSXRuntime,l=JSON.parse('{"UU":"carhop-blocks/story-timeline"}');(0,e.registerBlockType)(l.UU,{icon:{foreground:"#136f63",src:(0,t.jsx)("svg",{width:"100",height:"100",viewBox:"0 0 100 100",children:(0,t.jsx)("g",{stroke:"null",id:"svg_10",class:"fills",children:(0,t.jsx)("path",{stroke:"null",d:"m3.74998,19.74151c0,-8.82607 7.16546,-15.99153 15.99153,-15.99153l60.51698,0c8.82607,0 15.99153,7.16546 15.99153,15.99153l0,60.51698c0,8.82607 -7.16546,15.99153 -15.99153,15.99153l-60.51698,0c-8.82607,0 -15.99153,-7.16546 -15.99153,-15.99153l0,-60.51698zm22.57628,3.44915l0,53.61867l23.67374,-18.7148l23.67374,18.7148l0,-53.61867l-47.34748,0z"})})})},edit:function({attributes:e,setAttributes:l,...o}){const i=(0,s.useSelect)(e=>{const{getBlocks:r}=e("core/block-editor");return(r(o.clientId)||[]).filter(e=>"carhop-blocks/story-timeline-step"===e.name).map(e=>e.attributes?.year).filter(e=>null!=e&&""!==e)},[o.clientId]);return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("section",{...(0,r.useBlockProps)({className:"story-timeline"}),children:[(0,t.jsx)("aside",{className:"story-timeline__years",children:(0,t.jsx)("ul",{children:i.map((e,r)=>(0,t.jsx)("li",{className:"story-timeline__year",children:e},r))})}),(0,t.jsx)("div",{className:"story-timeline__innerblocks",children:(0,t.jsx)(r.InnerBlocks,{allowedBlocks:["carhop-blocks/story-timeline-step"]})})]})})},save:function({attributes:e}){return(0,t.jsx)(r.InnerBlocks.Content,{})}})}},s={};function t(e){var l=s[e];if(void 0!==l)return l.exports;var o=s[e]={exports:{}};return r[e](o,o.exports,t),o.exports}t.m=r,e=[],t.O=(r,s,l,o)=>{if(!s){var i=1/0;for(d=0;d<e.length;d++){for(var[s,l,o]=e[d],n=!0,c=0;c<s.length;c++)(!1&o||i>=o)&&Object.keys(t.O).every(e=>t.O[e](s[c]))?s.splice(c--,1):(n=!1,o<i&&(i=o));if(n){e.splice(d--,1);var a=l();void 0!==a&&(r=a)}}return r}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[s,l,o]},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e={7819:0,371:0};t.O.j=r=>0===e[r];var r=(r,s)=>{var l,o,[i,n,c]=s,a=0;if(i.some(r=>0!==e[r])){for(l in n)t.o(n,l)&&(t.m[l]=n[l]);if(c)var d=c(t)}for(r&&r(s);a<i.length;a++)o=i[a],t.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return t.O(d)},s=globalThis.webpackChunkcarhop_blocks=globalThis.webpackChunkcarhop_blocks||[];s.forEach(r.bind(null,0)),s.push=r.bind(null,s.push.bind(s))})();var l=t.O(void 0,[371],()=>t(6940));l=t.O(l)})();