PageSourceSearch

https://www.mansfieldtown.net/_nuxt/D7B9QlPa.js

js mansfieldtown.net collected 2026-10-02 10:52:30 UTC 4,974 bytes, 1 lines download raw bytes

1import{PageElementBase as T}from"./CTfzp0o-.js";import{g as K}from"./DJpauijJ.js";import{G as a}from"./DA0pkXRu.js";import{G as k}from"./D_6K3OQ2.js";import{t as O}from"./CATxlt2j.js";import{TypographyModel as r}from"./C8oKskU6.js";import{u as w}from"./D-Ob0KtR.js";import{d as S}from"./ghde6Rcn.js";import"./CXTOca8g.js";import"./0xmjySIm.js";import"./DhOWJ3tu.js";import"./WUj_y4n6.js";import"./CrX2__Gh.js";import"./T-kpnD9n.js";import"./BUZrUIms.js";class v extends T{constructor(e="root",t){super(e,t),this.widgetType="WidgetCardProduct",this.widgetName="Product Card",this.component="WidgetCardProduct",this.icon={icon:"product",pack:"cms"},this.pseudoWidgetType="card",this.variant="stacked",this.fit="contain",this.aspect="aspect-square",this.transition="image-scale",this.style=new k({theme:"light"}),this.image=new a,this.stackBackgroundImage=new a,this.imageBackgroundImage=new a,this.description=new r,this.title=new r,this.link={url:"",type:"",newTab:!1},this.price="",this.oldPrice="",this.showOverlay=!0,this.buildStyleFields=()=>[{heading:"Theme",options:[{type:"radio",subType:"list",attributeKey:["style","theme"],options:[{label:"Light",id:"light"},{label:"Dark",id:"dark"},{label:"Accent",id:"club"}]}]},{heading:"Background",type:"tabs",tabsOptions:{variant:"fill"},tabs:[{title:"Colour",value:"color",index:0,options:[{type:"color-input",attributeKey:["style","backgroundColor"]}]},{title:"Image",value:"image",index:1,options:[{type:"image-picker",attributeKey:["stackBackgroundImage"],heading:"Stacked Background Image",size:"xs"},{type:"image-picker",attributeKey:["imageBackgroundImage"],heading:"Image Background Image",size:"xs"}]}],options:[]},{heading:"Text Colour",options:[{type:"color-input",attributeKey:["style","color"]}]}],this.buildLayoutFields=i=>{const{getRootElementById:s}=w(),o=s(i.uuid);return[{heading:"Card Style",options:[{type:"radio",subType:"row",attributeKey:"variant",options:[{label:"Stacked",id:"stacked"},{label:"Cover",id:"cover"}]},{type:"radio",subType:"row",attributeKey:"aspect",disabled:(o==null?void 0:o.widgetType)==="hero",options:[{label:"Landscape",id:"aspect-video"},{label:"Portrait",id:"aspect-tall"},{label:"Square",id:"aspect-square"}]}]},{options:[{heading:"Image Fill/Fit",type:"radio",subType:"row",attributeKey:["fit"],clearOnSecondClick:!0,options:[{label:"Fill",id:"cover",imgSrc:"/assets/images/layout/object-fit/fill.png"},{label:"Fit",id:"contain",imgSrc:"/assets/images/layout/object-fit/fit.png"}]}]},{heading:"Display",disabled:i.variant!=="cover",options:[{attributeKey:"showOverlay",type:"switch",label:"Overlay"}]}]}
1,this.getSidebarTabs=i=>[{name:"Layout",fields:this.buildLayoutFields(i)},{name:"Content",fields:this.buildContentFields(),default:!0},{name:"Style",fields:this.buildStyleFields()}],t!=null&&t.widgetType&&!("version"in t)?Object.assign(this,this.normalizeLegacyElement(t,e)):Object.assign(this,O(t))}normalizeLegacyElement(e,t){var l,d,c,p,g,m,u,h,y,b;const{getElementById:i,getRootElementById:s}=w(),o=i(t),f=s(t),n=((l=e.layout)==null?void 0:l.style)==="cover"?"cover":"stacked",I=((d=e.layout)==null?void 0:d.style)==="cover"?"cover":"contain",B=new a({image:((c=e.image)==null?void 0:c.image)??""}),P={url:((p=e.link)==null?void 0:p.link)??"",type:"external",newTab:((g=e.link)==null?void 0:g.newTab)??!1},C=K(o,f);return{aspect:"aspect-cover-legacy",style:new k({theme:((m=e.style)==null?void 0:m.theme)||"light"}),variant:n,widgetName:"Product Card",stackBackgroundImage:new a,imageBackgroundImage:new a,transition:"raise",description:new r({content:e.description??""}),title:new r({...C,content:((u=e.detail)==null?void 0:u.name)??e.title,fontWeight:"medium"}),link:P,image:B,price:((h=e.detail)==null?void 0:h.price)??"",oldPrice:((y=e.detail)==null?void 0:y.salePrice)??"",fit:I,showOverlay:!(n!=="cover"||!((b=e.detail)!=null&&b.name)&&!e.title&&!e.description)}}serializeElement(){return{...super.serializeBaseElement(),widgetType:"WidgetCardProduct",widgetName:"Product Card",component:"WidgetCardProduct",aspect:this.aspect,variant:this.variant,transition:this.transition??"image-scale",style:this.style,stackBackgroundImage:this.stackBackgroundImage,imageBackgroundImage:this.imageBackgroundImage,description:this.description,title:this.title,link:this.link,image:this.image,price:this.price,oldPrice:this.oldPrice,fit:this.fit,showOverlay:this.showOverlay}}buildContentFields(){return[{heading:"Media Selection",options:[{type:"image-picker",attributeKey:["image"]}]},{heading:"Product Details",options:[{type:"typography-input",attributeKey:["title"]},{type:"input",attributeKey:"price",placeholder:"Current Price"},{type:"input",attributeKey:"oldPrice",placeholder:"Old Price"}]},{heading:"Link",options:[{type:"link-input",attributeKey:["link"],placeholder:"https://www.google.com"},{type:"switch",attributeKey:["link","newTab"],heading:"Open in new tab"}]}]}duplicateElement(){return new v(this.parentID,S({...this,uuid:void 0}))}}export{v as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.