diff --git a/README.md b/README.md index f8c435f..7c60779 100644 --- a/README.md +++ b/README.md @@ -10,16 +10,17 @@ This Statamic addon provides a powerful and flexible way to add structured data - 🔄 Dynamic JSON-LD generation based on entry and term data - 📝 Template-based structured data configuration -- 🔌 Automatic injection of structured data into your pages +- 📦 Built-in schema presets (WebSite, WebPage, Organization, Article, LocalBusiness) - 🎯 Support for multiple schemas per page - 🛠 Antlers template parsing support +- 🧩 Support for replicator-to-JSON-LD field mapping - 💪 Flexible and extensible architecture ## Requirements -- PHP ^8.2 or ^8.3 -- Laravel ^11.0 -- Statamic ^5.0 +- PHP ^8.4 or ^8.5 +- Laravel ^12.0 +- Statamic ^6.0 ## Installation @@ -52,7 +53,13 @@ php artisan vendor:publish --tag=justbetter-structured-data ``` You can now find the config file at `config/justbetter/structured-data.php`. -After publishing the config, you can set the collections and taxonomies that should have structured data templates. +After publishing the config, you can configure: + +- which collections support structured data templates +- which taxonomies support structured data objects +- whether presets are enabled +- which default presets are available +- custom preset paths ## Usage @@ -68,9 +75,21 @@ Create templates in your Statamic control panel that define your structured data In your entry or term's content, you can assign one or more structured data templates using the `structured_data_templates` field. The addon will automatically process these templates and generate the appropriate JSON-LD scripts. -### 3. Automatic Injection +### 3. Rendering Structured Data + +Render the generated JSON-LD where you need it in your layout: + +**Blade**: + +```blade +{!! Statamic::tag('structured-data:head')->fetch() !!} +``` + +**Antlers**: -The addon automatically injects the generated JSON-LD scripts into your pages before the closing `` tag. No additional configuration is required. +```antlers +{{ structured-data:head }} +``` ## Example Schema diff --git a/resources/dist/build/assets/StructuredDataFieldEditor-Bn7WRy9X.css b/resources/dist/build/assets/StructuredDataFieldEditor-Bn7WRy9X.css new file mode 100644 index 0000000..ad153b0 --- /dev/null +++ b/resources/dist/build/assets/StructuredDataFieldEditor-Bn7WRy9X.css @@ -0,0 +1 @@ +/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */.structured-data-object{max-width:800px}.btn-close{padding-inline:calc(var(--spacing,.25rem) * 2);padding-block:calc(var(--spacing,.25rem) * 1);color:var(--theme-color-gray-500)}@media(hover:hover){.btn-close:hover{color:var(--theme-color-gray-700)}}.btn{background-color:var(--theme-color-gray-200);padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 1);border-radius:.25rem}@media(hover:hover){.btn:hover{background-color:var(--theme-color-gray-300)}} diff --git a/resources/dist/build/assets/StructuredDataFieldEditor-CqkufCpJ.js b/resources/dist/build/assets/StructuredDataFieldEditor-CqkufCpJ.js new file mode 100644 index 0000000..119a811 --- /dev/null +++ b/resources/dist/build/assets/StructuredDataFieldEditor-CqkufCpJ.js @@ -0,0 +1 @@ +import{_ as T,S as x,P as E,a as B,L as S,I as R,H as L,D as K,C as q,b as w,B as C,r as p,o as n,c as f,d as i,e as o,w as d,f as c,t as r,g as V,h as _,F as O,i as D,j as z,k as H,v as Z,l as G,m as Q,n as W,p as X,u as b}from"./statamic-structured-data-Cr8R_Kzk.js";const Y={name:"ReplicatorFieldMapper",components:{Button:C,Card:w,Checkbox:q,Description:K,Heading:L,Input:R,Label:S,Panel:B,PanelHeader:E,Select:x},props:{modelValue:{type:Object,default:()=>({replicator_field:"",set:"",mappings:[],flat:!1,flat_key_field:"",flat_value_field:""})},replicatorFields:{type:Array,default:()=>[]}},emits:["update:modelValue"],data(){return{localConfig:this.normalizeConfig(this.modelValue),modeOptions:[{value:"field",label:"From Replicator Field"},{value:"static",label:"Static Value"},{value:"nested_replicator",label:"Nested Replicator"}],confirmRemoveMappingOpen:!1,mappingIndexToRemove:null}},computed:{availableReplicatorFields(){return!this.replicatorFields||!Array.isArray(this.replicatorFields)?[]:this.replicatorFields},replicatorFieldOptions(){return!this.availableReplicatorFields||this.availableReplicatorFields.length===0?[]:this.availableReplicatorFields.map(e=>({value:e.handle,label:e.display||e.handle}))},selectedReplicatorField(){return this.localConfig.replicator_field?this.availableReplicatorFields.find(e=>e.handle===this.localConfig.replicator_field):null},setOptions(){return this.selectedReplicatorField?this.selectedReplicatorField.sets.map(e=>({value:e.value,label:e.label})):[]},flatFieldOptions(){return this.getFieldOptionsForMapping({})}},watch:{localConfig:{deep:!0,handler(e){const a=JSON.stringify(e),u=JSON.stringify(this.modelValue);a!==u&&this.$emit("update:modelValue",JSON.parse(a))}},modelValue:{deep:!0,handler(e){const a=this.normalizeConfig(e),u=JSON.stringify(a),v=JSON.stringify(this.localConfig);u!==v&&(this.localConfig=JSON.parse(u))}}},methods:{normalizeConfig(e){const a={replicator_field:"",set:"",mappings:[],flat:!1,flat_key_field:"",flat_value_field:""};return!e||typeof e!="object"?a:{replicator_field:e.replicator_field||"",set:e.set||"",mappings:Array.isArray(e.mappings)?JSON.parse(JSON.stringify(e.mappings)):[],flat:e.flat===!0,flat_key_field:e.flat_key_field||"",flat_value_field:e.flat_value_field||""}},addMapping(){this.localConfig.mappings.push({key:"",mode:"field",field:"",static:"",nested:{replicator_field:"",set:"",mappings:[]}})},removeMapping(e){this.localConfig.mappings.splice(e,1)},requestRemoveMapping(e){this.mappingIndexToRemove=e,this.confirmRemoveMappingOpen=!0},confirmRemoveMapping(){this.mappingIndexToRemove!==null&&(this.removeMapping(this.mappingIndexToRemove),this.mappingIndexToRemove=null)},sanitizeKey(e){e.key=e.key.replace(/[^a-zA-Z0-9@:-]/g,"")},getFieldOptionsForMapping(e){if(!this.selectedReplicatorField)return[];const a=this.selectedReplicatorField.sets||[];let u=[];if(this.localConfig.set){const t=a.find(m=>m.value===this.localConfig.set);t&&t.fields&&(u=t.fields)}else a.forEach(t=>{t.fields&&(u=u.concat(t.fields))});const v=[],l=new Set;return u.forEach(t=>{l.has(t.value)||(l.add(t.value),v.push(t))}),v}}},$={class:"replicator-mapper space-y-3"},ee={class:"grid grid-cols-1 md:grid-cols-2 gap-3"},le={key:0,class:"text-xs text-yellow-600 mt-1 bg-yellow-50 p-2 rounded"},te={class:"flex flex-col justify-center gap-2"},ae={class:"grid grid-cols-1 md:grid-cols-2 gap-3"},oe={class:"text-xs text-gray-500 mt-1"},ie={class:"text-xs text-gray-500 mt-1"},de={class:"flex items-center justify-between mb-2"},ne={class:"font-semibold text-gray-700"},se={key:0,class:"text-sm text-gray-500"},re={class:"flex items-start gap-2"},ue={class:"flex-1"},me={class:"w-40"},ce={class:"mt-2"};function fe(e,a,u,v,l,t){const m=p("Label"),y=p("Select"),A=p("Checkbox"),U=p("Description"),j=p("PanelHeader"),F=p("Card"),g=p("Panel"),k=p("Button"),N=p("Input"),I=p("replicator-field-mapper",!0),J=p("ConfirmationModal");return n(),f("div",$,[i("div",ee,[i("div",null,[o(m,{class:"mb-1.5"},{default:d(()=>[c(r(e.__("Replicator Field")),1)]),_:1}),o(y,{modelValue:l.localConfig.replicator_field,"onUpdate:modelValue":[a[0]||(a[0]=s=>l.localConfig.replicator_field=s),a[1]||(a[1]=()=>{l.localConfig.set=""})],options:t.replicatorFieldOptions,placeholder:t.replicatorFieldOptions.length>0?e.__("Select replicator field"):e.__("No replicator fields available"),disabled:t.replicatorFieldOptions.length===0},null,8,["modelValue","options","placeholder","disabled"]),t.replicatorFieldOptions.length===0?(n(),f("div",le,[i("strong",null,r(e.__("No replicator fields found.")),1),a[7]||(a[7]=i("br",null,null,-1)),c(" "+r(e.__('Make sure your Structured Data Template has "Use for collection" or "Use for taxonomy" set, and that collection/taxonomy has replicator fields in its blueprint.')),1)])):V("",!0)]),i("div",null,[o(m,{class:"mb-1.5"},{default:d(()=>[c(r(e.__("Limit to Set (optional)")),1)]),_:1}),o(y,{modelValue:l.localConfig.set,"onUpdate:modelValue":a[2]||(a[2]=s=>l.localConfig.set=s),options:t.setOptions,placeholder:e.__("All sets"),clearable:!0},null,8,["modelValue","options","placeholder"])])]),o(g,null,{default:d(()=>[o(j,null,{default:d(()=>[i("div",te,[i("span",null,r(e.__("Flat mode")),1),o(U,null,{default:d(()=>[o(A,{modelValue:l.localConfig.flat,"onUpdate:modelValue":a[3]||(a[3]=s=>l.localConfig.flat=s),label:e.__("Create a flat object where each replicator row becomes a key-value pair."),class:"items-center"},null,8,["modelValue","label"])]),_:1})])]),_:1}),l.localConfig.flat?(n(),_(F,{key:0},{default:d(()=>[i("div",ae,[i("div",null,[o(m,{class:"mb-1.5"},{default:d(()=>[c(r(e.__("Key Field")),1)]),_:1}),o(y,{modelValue:l.localConfig.flat_key_field,"onUpdate:modelValue":a[4]||(a[4]=s=>l.localConfig.flat_key_field=s),options:t.flatFieldOptions,placeholder:e.__("Select field to use as key")},null,8,["modelValue","options","placeholder"]),i("p",oe,r(e.__("Field value will be used as the object key")),1)]),i("div",null,[o(m,{class:"mb-1.5"},{default:d(()=>[c(r(e.__("Value Field")),1)]),_:1}),o(y,{modelValue:l.localConfig.flat_value_field,"onUpdate:modelValue":a[5]||(a[5]=s=>l.localConfig.flat_value_field=s),options:t.flatFieldOptions,placeholder:e.__("Select field to use as value")},null,8,["modelValue","options","placeholder"]),i("p",ie,r(e.__("Field value will be used as the object value")),1)])])]),_:1})):V("",!0)]),_:1}),l.localConfig.flat?V("",!0):(n(),_(F,{key:0,class:"mt-3"},{default:d(()=>[i("div",de,[i("h4",ne,r(e.__("Field Mappings")),1),o(k,{class:"text-sm",onClick:t.addMapping},{default:d(()=>[c(r(e.__("Add Mapping")),1)]),_:1},8,["onClick"])]),l.localConfig.mappings.length?V("",!0):(n(),f("div",se,r(e.__("No mappings yet. Add one to map replicator fields into your JSON-LD object.")),1)),(n(!0),f(O,null,D(l.localConfig.mappings,(s,M)=>(n(),_(F,{key:M,class:"mb-3"},{default:d(()=>[i("div",re,[i("div",ue,[o(m,{class:"mb-1.5"},{default:d(()=>[c(r(e.__("JSON-LD Key")),1)]),_:1}),o(N,{modelValue:s.key,"onUpdate:modelValue":[h=>s.key=h,()=>t.sanitizeKey(s)],placeholder:"e.g. name"},null,8,["modelValue","onUpdate:modelValue"])]),i("div",me,[o(m,{class:"mb-1.5"},{default:d(()=>[c(r(e.__("Source")),1)]),_:1}),o(y,{modelValue:s.mode,"onUpdate:modelValue":h=>s.mode=h,options:l.modeOptions},null,8,["modelValue","onUpdate:modelValue","options"])]),o(k,{class:"mt-6",variant:"danger",onClick:h=>t.requestRemoveMapping(M)},{default:d(()=>[c(r(e.__("Remove")),1)]),_:1},8,["onClick"])]),i("div",ce,[s.mode==="static"?(n(),f(O,{key:0},[o(m,{class:"mb-1.5"},{default:d(()=>[c(r(e.__("Static Value")),1)]),_:1}),o(N,{modelValue:s.static,"onUpdate:modelValue":h=>s.static=h,placeholder:e.__("e.g. PropertyValue")},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64)):s.mode==="field"?(n(),f(O,{key:1},[o(m,{class:"mb-1.5"},{default:d(()=>[c(r(e.__("Replicator Field")),1)]),_:1}),o(y,{modelValue:s.field,"onUpdate:modelValue":h=>s.field=h,options:t.getFieldOptionsForMapping(s),placeholder:e.__("Select field")},null,8,["modelValue","onUpdate:modelValue","options","placeholder"])],64)):s.mode==="nested_replicator"?(n(),_(F,{key:2,class:"mt-2"},{default:d(()=>[o(I,{modelValue:s.nested,"onUpdate:modelValue":h=>s.nested=h,"replicator-fields":u.replicatorFields},null,8,["modelValue","onUpdate:modelValue","replicator-fields"])]),_:2},1024)):V("",!0)])]),_:2},1024))),128))]),_:1})),l.confirmRemoveMappingOpen?(n(),_(J,{key:1,open:l.confirmRemoveMappingOpen,"onUpdate:open":a[6]||(a[6]=s=>l.confirmRemoveMappingOpen=s),"body-text":e.__("Are you sure you want to remove this mapping? This action cannot be undone."),onConfirm:t.confirmRemoveMapping},null,8,["open","body-text","onConfirm"])):V("",!0)])}const pe=T(Y,[["render",fe]]),ye={name:"StructuredDataObject",components:{Button:C,Card:w,ConfirmationModal:z,Input:R,Label:S,StructuredDataFieldEditor:W(()=>X(()=>Promise.resolve().then(()=>xe),void 0))},props:{modelValue:{type:Object,default:()=>({specialProps:{type:"",id:""},fields:[]})},baseUrl:{type:String,required:!0},parentType:{type:String,default:""},fieldKey:{type:String,default:""},replicatorFields:{type:Array,default:()=>[]}},data(){return{objectData:JSON.parse(JSON.stringify(this.modelValue)),confirmRemoveFieldOpen:!1,fieldIndexToRemove:null,confirmRemoveArrayValueOpen:!1,arrayRemoveContext:{field:null,valueIndex:null}}},computed:{suggestedId(){return this.objectData.specialProps.type?`{{ site:url }}/#${this.objectData.specialProps.type}`:""},selectOptions(){return[{value:"string",label:"String"},{value:"numeric",label:"Numeric"},{value:"array",label:"Array"},{value:"object",label:"Object"},{value:"replicator_object_array",label:"Replicator Object Array"}]}},watch:{objectData:{deep:!0,handler(e){const a=JSON.stringify(e),u=JSON.stringify(this.modelValue);a!==u&&this.$emit("update:modelValue",JSON.parse(JSON.stringify(e)))}},"objectData.specialProps.type"(e){!this.objectData.specialProps.id&&e&&this.useDefaultId()},modelValue:{deep:!0,handler(e){const a=JSON.stringify(e),u=JSON.stringify(this.objectData);a!==u&&(this.objectData=JSON.parse(JSON.stringify(e)))}}},methods:{addField(){this.objectData.fields.push({key:"",type:"string",value:"",values:[],fields:[],config:{}})},removeField(e){this.objectData.fields.splice(e,1)},addArrayValue(e){Q(e)},removeArrayValue(e,a){G(e,a)},validateKey(e){Z(e)},useDefaultId(){this.objectData.specialProps.id=this.suggestedId},handleTypeChange(e){H(e)},requestRemoveField(e){this.fieldIndexToRemove=e,this.confirmRemoveFieldOpen=!0},confirmRemoveField(){this.fieldIndexToRemove!==null&&(this.removeField(this.fieldIndexToRemove),this.fieldIndexToRemove=null)},requestRemoveArrayValue(e,a){this.arrayRemoveContext={field:e,valueIndex:a},this.confirmRemoveArrayValueOpen=!0},confirmRemoveArrayValue(){const e=this.arrayRemoveContext;!e||!e.field||e.valueIndex===null||(this.removeArrayValue(e.field,e.valueIndex),this.arrayRemoveContext={field:null,valueIndex:null})}}},ve={class:"mb-4"},be={class:"mb-2"},ge={class:"mb-2"},Ve={class:"flex"};function he(e,a,u,v,l,t){const m=p("Label"),y=p("Input"),A=p("Button"),U=p("StructuredDataFieldEditor"),j=p("ConfirmationModal"),F=p("Card");return n(),_(F,{class:"structured-data-object"},{default:d(()=>[i("div",ve,[i("div",be,[o(m,{class:"mb-1.5"},{default:d(()=>[...a[4]||(a[4]=[c("@type",-1)])]),_:1}),o(y,{modelValue:l.objectData.specialProps.type,"onUpdate:modelValue":a[0]||(a[0]=g=>l.objectData.specialProps.type=g),placeholder:"e.g. Organization, Product, BlogPosting"},null,8,["modelValue"])]),i("div",ge,[o(m,{class:"mb-1.5"},{default:d(()=>[...a[5]||(a[5]=[c("@id",-1)])]),_:1}),i("div",Ve,[o(y,{modelValue:l.objectData.specialProps.id,"onUpdate:modelValue":a[1]||(a[1]=g=>l.objectData.specialProps.id=g),class:"flex-1",placeholder:t.suggestedId},null,8,["modelValue","placeholder"]),o(A,{class:"ml-2",onClick:t.useDefaultId},{default:d(()=>[c(r(e.__("Use Default")),1)]),_:1},8,["onClick"])])])]),i("div",null,[(n(!0),f(O,null,D(l.objectData.fields,(g,k)=>(n(),f("div",{key:k,class:"mb-4 border-b pb-4"},[o(U,{field:g,"select-options":t.selectOptions,"base-url":u.baseUrl,"replicator-fields":u.replicatorFields,"remove-field-label":e.__("Remove Property"),onValidateKey:t.validateKey,onTypeChange:t.handleTypeChange,onAddArrayValue:t.addArrayValue,onRemoveArrayValue:t.requestRemoveArrayValue,onRemoveField:N=>t.requestRemoveField(k)},null,8,["field","select-options","base-url","replicator-fields","remove-field-label","onValidateKey","onTypeChange","onAddArrayValue","onRemoveArrayValue","onRemoveField"])]))),128)),o(A,{onClick:t.addField,variant:"primary"},{default:d(()=>[c(r(e.__("Add Property")),1)]),_:1},8,["onClick"])]),l.confirmRemoveFieldOpen?(n(),_(j,{key:0,open:l.confirmRemoveFieldOpen,"onUpdate:open":a[2]||(a[2]=g=>l.confirmRemoveFieldOpen=g),"body-text":e.__("Are you sure you want to remove this field? This action cannot be undone."),onConfirm:t.confirmRemoveField},null,8,["open","body-text","onConfirm"])):V("",!0),l.confirmRemoveArrayValueOpen?(n(),_(j,{key:1,open:l.confirmRemoveArrayValueOpen,"onUpdate:open":a[3]||(a[3]=g=>l.confirmRemoveArrayValueOpen=g),"body-text":e.__("Are you sure you want to remove this value? This action cannot be undone."),onConfirm:t.confirmRemoveArrayValue},null,8,["open","body-text","onConfirm"])):V("",!0)]),_:1})}const P=T(ye,[["render",he]]),_e={class:"grid grid-cols-1 md:grid-cols-3 gap-3"},Ce={class:"col-span-2"},Fe={class:"mt-3"},Re={key:2,class:"mt-2"},Oe={class:"flex flex-col gap-2 space-y-2"},ke={key:3,class:"mt-2"},Se={key:4,class:"mt-2"},Ae={class:"flex flex-col gap-2 space-y-2"},je={key:5,class:"mt-2"},De={key:6,class:"mt-2"},Ue={key:0,class:"flex justify-end mt-3"},Ne={__name:"StructuredDataFieldEditor",props:{field:{type:Object,required:!0},selectOptions:{type:Array,required:!0},taxonomyTermOptions:{type:Array,default:()=>[]},baseUrl:{type:String,default:""},replicatorFields:{type:Array,default:()=>[]},objectArrayEnabled:{type:Boolean,default:!1},dataObjectEnabled:{type:Boolean,default:!1},showRemoveButton:{type:Boolean,default:!0},removeFieldLabel:{type:String,default:"Remove Field"}},emits:["validate-key","type-change","add-array-value","remove-array-value","remove-field"],setup(e,{emit:a}){const u=a;return(v,l)=>(n(),f("div",null,[i("div",_e,[i("div",Ce,[o(b(S),{class:"mb-1.5"},{default:d(()=>[c(r(v.__("Key")),1)]),_:1}),o(b(R),{modelValue:e.field.key,"onUpdate:modelValue":[l[0]||(l[0]=t=>e.field.key=t),l[1]||(l[1]=t=>u("validate-key",e.field))]},null,8,["modelValue"])]),i("div",null,[o(b(S),{class:"mb-1.5"},{default:d(()=>[c(r(v.__("Type")),1)]),_:1}),o(b(x),{modelValue:e.field.type,"onUpdate:modelValue":[l[2]||(l[2]=t=>e.field.type=t),l[3]||(l[3]=t=>u("type-change",e.field))],options:e.selectOptions},null,8,["modelValue","options"])])]),i("div",Fe,[o(b(S),{class:"mb-1.5"},{default:d(()=>[c(r(v.__("Value")),1)]),_:1}),e.field.type==="string"?(n(),_(b(R),{key:0,modelValue:e.field.value,"onUpdate:modelValue":l[4]||(l[4]=t=>e.field.value=t),placeholder:"Enter value"},null,8,["modelValue"])):V("",!0),e.field.type==="numeric"?(n(),_(b(R),{key:1,type:"number",modelValue:e.field.value,"onUpdate:modelValue":l[5]||(l[5]=t=>e.field.value=t),placeholder:"Enter value"},null,8,["modelValue"])):e.field.type==="array"?(n(),f("div",Re,[i("div",Oe,[(n(!0),f(O,null,D(e.field.values,(t,m)=>(n(),f("div",{key:m,class:"flex items-center gap-2"},[o(b(R),{modelValue:e.field.values[m],"onUpdate:modelValue":y=>e.field.values[m]=y},null,8,["modelValue","onUpdate:modelValue"]),o(b(C),{onClick:y=>u("remove-array-value",e.field,m),class:"inline-flex items-center px-2 py-1",variant:"danger"},{default:d(()=>[i("span",null,r(v.__("Remove")),1)]),_:1},8,["onClick"])]))),128))]),o(b(C),{onClick:l[6]||(l[6]=t=>u("add-array-value",e.field)),variant:"primary",class:"mt-2 text-sm"},{default:d(()=>[c(r(v.__("Add Value")),1)]),_:1})])):e.field.type==="object"?(n(),f("div",ke,[o(P,{modelValue:e.field.value,"onUpdate:modelValue":l[7]||(l[7]=t=>e.field.value=t),"base-url":e.baseUrl,"field-key":e.field.key,"replicator-fields":e.replicatorFields},null,8,["modelValue","base-url","field-key","replicator-fields"])])):e.objectArrayEnabled&&e.field.type==="object_array"?(n(),f("div",Se,[i("div",Ae,[(n(!0),f(O,null,D(e.field.values,(t,m)=>(n(),f("div",{key:m,class:"flex flex-col gap-2"},[o(P,{modelValue:e.field.values[m],"onUpdate:modelValue":y=>e.field.values[m]=y,"base-url":e.baseUrl},null,8,["modelValue","onUpdate:modelValue","base-url"]),i("div",null,[o(b(C),{onClick:y=>u("remove-array-value",e.field,m),class:"inline-flex self-end items-center px-2 py-1",variant:"danger"},{default:d(()=>[i("span",null,r(v.__("Remove")),1)]),_:1},8,["onClick"])])]))),128))]),o(b(C),{onClick:l[8]||(l[8]=t=>u("add-array-value",e.field)),class:"mt-2 text-sm",variant:"primary"},{default:d(()=>[c(r(v.__("Add Value")),1)]),_:1})])):e.dataObjectEnabled&&e.field.type==="data_object"?(n(),f("div",je,[o(b(x),{modelValue:e.field.value,"onUpdate:modelValue":l[9]||(l[9]=t=>e.field.value=t),options:e.taxonomyTermOptions},null,8,["modelValue","options"])])):e.field.type==="replicator_object_array"?(n(),f("div",De,[o(pe,{modelValue:e.field.config,"onUpdate:modelValue":l[10]||(l[10]=t=>e.field.config=t),"base-url":e.baseUrl,"replicator-fields":e.replicatorFields},null,8,["modelValue","base-url","replicator-fields"])])):V("",!0)]),e.showRemoveButton?(n(),f("div",Ue,[o(b(C),{variant:"danger",onClick:l[11]||(l[11]=t=>u("remove-field"))},{default:d(()=>[c(r(e.removeFieldLabel),1)]),_:1})])):V("",!0)]))}},xe=Object.freeze(Object.defineProperty({__proto__:null,default:Ne},Symbol.toStringTag,{value:"Module"}));export{Ne as default}; diff --git a/resources/dist/build/assets/statamic-structured-data-Biz8QSRj.js b/resources/dist/build/assets/statamic-structured-data-Biz8QSRj.js deleted file mode 100644 index f7d686b..0000000 --- a/resources/dist/build/assets/statamic-structured-data-Biz8QSRj.js +++ /dev/null @@ -1,11 +0,0 @@ -const lr=window.Vue,{BaseTransition:Cr,BaseTransitionPropsValidators:Pr,Comment:Tr,DeprecationTypes:Ir,EffectScope:Ar,ErrorCodes:Dr,ErrorTypeStrings:Rr,Fragment:He,KeepAlive:$r,ReactiveEffect:Fr,Static:jr,Suspense:wr,Teleport:Vr,Text:Mr,TrackOpTypes:Nr,Transition:Ur,TransitionGroup:Lr,TriggerOpTypes:Br,VueElement:Gr,__esModule:Kr,assertNumber:Hr,callWithAsyncErrorHandling:Wr,callWithErrorHandling:zr,camelize:Xr,capitalize:Yr,cloneVNode:Jr,compatUtils:Zr,compile:Qr,computed:Ke,createApp:kr,createBlock:be,createCommentVNode:ve,createElementBlock:K,createElementVNode:A,createHydrationRenderer:qr,createPropsRestProxy:_r,createRenderer:eo,createSSRApp:to,createSlots:no,createStaticVNode:ro,createTextVNode:ee,createVNode:R,customRef:oo,defineAsyncComponent:ao,defineComponent:io,defineCustomElement:lo,defineEmits:so,defineExpose:uo,defineModel:co,defineOptions:fo,defineProps:po,defineSSRCustomElement:vo,defineSlots:mo,devtools:ho,effect:go,effectScope:yo,getCurrentInstance:sr,getCurrentScope:bo,getCurrentWatcher:So,getTransitionRawChildren:xo,guardReactiveProps:Eo,h:Oo,handleError:Co,hasInjectionContext:Po,hydrate:To,hydrateOnIdle:Io,hydrateOnInteraction:Ao,hydrateOnMediaQuery:Do,hydrateOnVisible:Ro,initCustomFormatter:$o,initDirectivesForSSR:Fo,inject:jo,isMemoSame:wo,isProxy:Vo,isReactive:Mo,isReadonly:No,isRef:Uo,isRuntimeOnly:Lo,isShallow:Bo,isVNode:Go,markRaw:Ko,mergeDefaults:Ho,mergeModels:Wo,mergeProps:zo,nextTick:Xo,nodeOps:Yo,normalizeClass:gn,normalizeProps:Jo,normalizeStyle:ur,onActivated:Zo,onBeforeMount:Qo,onBeforeUnmount:ko,onBeforeUpdate:qo,onDeactivated:_o,onErrorCaptured:ea,onMounted:ta,onRenderTracked:na,onRenderTriggered:ra,onScopeDispose:oa,onServerPrefetch:aa,onUnmounted:ia,onUpdated:la,onWatcherCleanup:sa,openBlock:j,patchProp:ua,popScopeId:ca,provide:da,proxyRefs:fa,pushScopeId:pa,queuePostFlushCb:va,reactive:Nn,readonly:ma,ref:Ue,registerRuntimeCompiler:ha,render:ga,renderList:Ze,renderSlot:ya,resolveComponent:Ee,resolveDirective:ba,resolveDynamicComponent:Sa,resolveFilter:xa,resolveTransitionHooks:Ea,setBlockTracking:Oa,setDevtoolsHook:Ca,setTransitionHooks:Pa,shallowReactive:Ta,shallowReadonly:Ia,shallowRef:Aa,ssrContextKey:Da,ssrUtils:Ra,stop:$a,toDisplayString:w,toHandlerKey:Fa,toHandlers:ja,toRaw:wa,toRef:Va,toRefs:Ma,toValue:Na,transformVNodeArgs:Ua,triggerRef:La,unref:X,useAttrs:Ba,useCssModule:Ga,useCssVars:Ka,useHost:Ha,useId:Wa,useModel:za,useSSRContext:Xa,useShadowRoot:Ya,useSlots:Ja,useTemplateRef:Za,useTransitionState:Qa,vModelCheckbox:ka,vModelDynamic:qa,vModelRadio:_a,vModelSelect:ei,vModelText:ti,vShow:jt,version:ni,warn:ri,watch:Vt,watchEffect:oi,watchPostEffect:ai,watchSyncEffect:ii,withAsyncContext:li,withCtx:U,withDefaults:si,withDirectives:wt,withKeys:ui,withMemo:ci,withModifiers:un,withScopeId:di}=lr,fi=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Cr,BaseTransitionPropsValidators:Pr,Comment:Tr,DeprecationTypes:Ir,EffectScope:Ar,ErrorCodes:Dr,ErrorTypeStrings:Rr,Fragment:He,KeepAlive:$r,ReactiveEffect:Fr,Static:jr,Suspense:wr,Teleport:Vr,Text:Mr,TrackOpTypes:Nr,Transition:Ur,TransitionGroup:Lr,TriggerOpTypes:Br,VueElement:Gr,__esModule:Kr,assertNumber:Hr,callWithAsyncErrorHandling:Wr,callWithErrorHandling:zr,camelize:Xr,capitalize:Yr,cloneVNode:Jr,compatUtils:Zr,compile:Qr,computed:Ke,createApp:kr,createBlock:be,createCommentVNode:ve,createElementBlock:K,createElementVNode:A,createHydrationRenderer:qr,createPropsRestProxy:_r,createRenderer:eo,createSSRApp:to,createSlots:no,createStaticVNode:ro,createTextVNode:ee,createVNode:R,customRef:oo,default:lr,defineAsyncComponent:ao,defineComponent:io,defineCustomElement:lo,defineEmits:so,defineExpose:uo,defineModel:co,defineOptions:fo,defineProps:po,defineSSRCustomElement:vo,defineSlots:mo,devtools:ho,effect:go,effectScope:yo,getCurrentInstance:sr,getCurrentScope:bo,getCurrentWatcher:So,getTransitionRawChildren:xo,guardReactiveProps:Eo,h:Oo,handleError:Co,hasInjectionContext:Po,hydrate:To,hydrateOnIdle:Io,hydrateOnInteraction:Ao,hydrateOnMediaQuery:Do,hydrateOnVisible:Ro,initCustomFormatter:$o,initDirectivesForSSR:Fo,inject:jo,isMemoSame:wo,isProxy:Vo,isReactive:Mo,isReadonly:No,isRef:Uo,isRuntimeOnly:Lo,isShallow:Bo,isVNode:Go,markRaw:Ko,mergeDefaults:Ho,mergeModels:Wo,mergeProps:zo,nextTick:Xo,nodeOps:Yo,normalizeClass:gn,normalizeProps:Jo,normalizeStyle:ur,onActivated:Zo,onBeforeMount:Qo,onBeforeUnmount:ko,onBeforeUpdate:qo,onDeactivated:_o,onErrorCaptured:ea,onMounted:ta,onRenderTracked:na,onRenderTriggered:ra,onScopeDispose:oa,onServerPrefetch:aa,onUnmounted:ia,onUpdated:la,onWatcherCleanup:sa,openBlock:j,patchProp:ua,popScopeId:ca,provide:da,proxyRefs:fa,pushScopeId:pa,queuePostFlushCb:va,reactive:Nn,readonly:ma,ref:Ue,registerRuntimeCompiler:ha,render:ga,renderList:Ze,renderSlot:ya,resolveComponent:Ee,resolveDirective:ba,resolveDynamicComponent:Sa,resolveFilter:xa,resolveTransitionHooks:Ea,setBlockTracking:Oa,setDevtoolsHook:Ca,setTransitionHooks:Pa,shallowReactive:Ta,shallowReadonly:Ia,shallowRef:Aa,ssrContextKey:Da,ssrUtils:Ra,stop:$a,toDisplayString:w,toHandlerKey:Fa,toHandlers:ja,toRaw:wa,toRef:Va,toRefs:Ma,toValue:Na,transformVNodeArgs:Ua,triggerRef:La,unref:X,useAttrs:Ba,useCssModule:Ga,useCssVars:Ka,useHost:Ha,useId:Wa,useModel:za,useSSRContext:Xa,useShadowRoot:Ya,useSlots:Ja,useTemplateRef:Za,useTransitionState:Qa,vModelCheckbox:ka,vModelDynamic:qa,vModelRadio:_a,vModelSelect:ei,vModelText:ti,vShow:jt,version:ni,warn:ri,watch:Vt,watchEffect:oi,watchPostEffect:ai,watchSyncEffect:ii,withAsyncContext:li,withCtx:U,withDefaults:si,withDirectives:wt,withKeys:ui,withMemo:ci,withModifiers:un,withScopeId:di},Symbol.toStringTag,{value:"Module"})),{Fieldtype:it,IndexFieldtype:Zu,FieldtypeMixin:Qu,HasActionsMixin:ku,HasInputOptionsMixin:qu,HasPreferencesMixin:_u,IndexFieldtypeMixin:ec,InlineEditForm:tc,DateFormatter:nc,ItemActions:rc,RelatedItem:oc,RestoreRevision:ac,RevisionHistory:ic,RevisionPreview:lc,SaveButtonOptions:sc,SortableList:uc,requireElevatedSession:cc,requireElevatedSessionIf:dc,clone:fc,deepClone:pc,resetValuesFromResponse:vc}=__STATAMIC__.core,{Alert:mc,AuthCard:hc,Avatar:gc,Badge:pi,Button:xe,ButtonGroup:yc,Calendar:bc,Card:It,CardList:Sc,CardListItem:xc,CardPanel:Ec,CharacterCounter:Oc,Checkbox:vi,CheckboxGroup:Cc,CodeEditor:Pc,Combobox:Tc,CommandPaletteItem:Ic,ConfirmationModal:cn,Context:Ac,ContextFooter:Dc,ContextHeader:Rc,ContextItem:$c,ContextLabel:Fc,ContextMenu:jc,ContextSeparator:wc,CreateForm:Vc,DatePicker:Mc,DateRangePicker:Nc,Description:mi,DocsCallout:Uc,DragHandle:hi,Dropdown:Lc,DropdownItem:Bc,DropdownLabel:Gc,DropdownMenu:Kc,DropdownSeparator:Hc,DropdownFooter:Wc,DropdownHeader:zc,Editable:Xc,ErrorMessage:Yc,EmptyStateItem:Jc,EmptyStateMenu:Zc,Field:Qc,Header:kc,Heading:gi,HoverCard:qc,Icon:yi,Input:nt,InputGroup:_c,InputGroupAppend:ed,InputGroupPrepend:td,Label:_e,Listing:nd,ListingCustomizeColumns:rd,ListingFilters:od,ListingHeaderCell:ad,ListingPagination:id,ListingPresets:ld,ListingPresetTrigger:sd,ListingRowActions:ud,ListingSearch:cd,ListingTable:dd,ListingTableBody:fd,ListingTableHead:pd,ListingToggleAll:vd,LivePreview:md,LivePreviewPopout:hd,MiddleEllipsis:gd,Modal:yd,ModalClose:bd,ModalTitle:Sd,Pagination:xd,Panel:bi,PanelFooter:Ed,PanelHeader:Si,Popover:Od,PublishComponents:Cd,PublishContainer:Pd,publishContextKey:Td,injectPublishContext:xi,PublishField:Id,PublishFields:Ad,PublishFieldsProvider:Dd,PublishForm:Rd,PublishLocalizations:$d,PublishSections:Fd,PublishTabs:jd,Radio:wd,RadioGroup:Vd,Select:qt,Separator:Ei,Slider:Md,Skeleton:Nd,SplitterGroup:Ud,SplitterPanel:Ld,SplitterResizeHandle:Bd,StatusIndicator:Gd,Subheading:Kd,Switch:Hd,TabContent:Wd,Stack:Oi,StackClose:zd,StackHeader:Xd,StackFooter:Yd,StackContent:Jd,Table:Zd,TableCell:Qd,TableColumn:kd,TableColumns:qd,TableRow:_d,TableRows:ef,TabList:tf,TabProvider:nf,Tabs:rf,TabTrigger:of,Textarea:af,TimePicker:lf,ToggleGroup:sf,ToggleItem:uf,Widget:cf,registerIconSet:df,registerIconSetFromStrings:ff}=__STATAMIC__.ui,Cn=(r,t)=>{const o=r.__vccOpts||r;for(const[l,n]of t)o[l]=n;return o},Ci={name:"ReplicatorFieldMapper",components:{Button:xe,Card:It,Checkbox:vi,Description:mi,Heading:gi,Input:nt,Label:_e,Panel:bi,PanelHeader:Si,Select:qt},props:{modelValue:{type:Object,default:()=>({replicator_field:"",set:"",mappings:[],flat:!1,flat_key_field:"",flat_value_field:""})},replicatorFields:{type:Array,default:()=>[]}},emits:["update:modelValue"],data(){return{localConfig:this.normalizeConfig(this.modelValue),modeOptions:[{value:"field",label:"From Replicator Field"},{value:"static",label:"Static Value"},{value:"nested_replicator",label:"Nested Replicator"}],confirmRemoveMappingOpen:!1,mappingIndexToRemove:null}},computed:{availableReplicatorFields(){return!this.replicatorFields||!Array.isArray(this.replicatorFields)?[]:this.replicatorFields},replicatorFieldOptions(){return!this.availableReplicatorFields||this.availableReplicatorFields.length===0?[]:this.availableReplicatorFields.map(r=>({value:r.handle,label:r.display||r.handle}))},selectedReplicatorField(){return this.localConfig.replicator_field?this.availableReplicatorFields.find(r=>r.handle===this.localConfig.replicator_field):null},setOptions(){return this.selectedReplicatorField?this.selectedReplicatorField.sets.map(r=>({value:r.value,label:r.label})):[]},flatFieldOptions(){return this.getFieldOptionsForMapping({})}},watch:{localConfig:{deep:!0,handler(r){const t=JSON.stringify(r),o=JSON.stringify(this.modelValue);t!==o&&this.$emit("update:modelValue",JSON.parse(t))}},modelValue:{deep:!0,handler(r){const t=this.normalizeConfig(r),o=JSON.stringify(t),l=JSON.stringify(this.localConfig);o!==l&&(this.localConfig=JSON.parse(o))}}},methods:{normalizeConfig(r){const t={replicator_field:"",set:"",mappings:[],flat:!1,flat_key_field:"",flat_value_field:""};return!r||typeof r!="object"?t:{replicator_field:r.replicator_field||"",set:r.set||"",mappings:Array.isArray(r.mappings)?JSON.parse(JSON.stringify(r.mappings)):[],flat:r.flat===!0,flat_key_field:r.flat_key_field||"",flat_value_field:r.flat_value_field||""}},addMapping(){this.localConfig.mappings.push({key:"",mode:"field",field:"",static:"",nested:{replicator_field:"",set:"",mappings:[]}})},removeMapping(r){this.localConfig.mappings.splice(r,1)},requestRemoveMapping(r){this.mappingIndexToRemove=r,this.confirmRemoveMappingOpen=!0},confirmRemoveMapping(){this.mappingIndexToRemove!==null&&(this.removeMapping(this.mappingIndexToRemove),this.mappingIndexToRemove=null)},sanitizeKey(r){r.key=r.key.replace(/[^a-zA-Z0-9@]/g,"")},getFieldOptionsForMapping(r){if(!this.selectedReplicatorField)return[];const t=this.selectedReplicatorField.sets||[];let o=[];if(this.localConfig.set){const s=t.find(e=>e.value===this.localConfig.set);s&&s.fields&&(o=s.fields)}else t.forEach(s=>{s.fields&&(o=o.concat(s.fields))});const l=[],n=new Set;return o.forEach(s=>{n.has(s.value)||(n.add(s.value),l.push(s))}),l}}},Pi={class:"replicator-mapper space-y-3"},Ti={class:"grid grid-cols-1 md:grid-cols-2 gap-3"},Ii={key:0,class:"text-xs text-yellow-600 mt-1 bg-yellow-50 p-2 rounded"},Ai={class:"flex flex-col justify-center gap-2"},Di={class:"grid grid-cols-1 md:grid-cols-2 gap-3"},Ri={class:"text-xs text-gray-500 mt-1"},$i={class:"text-xs text-gray-500 mt-1"},Fi={class:"flex items-center justify-between mb-2"},ji={class:"font-semibold text-gray-700"},wi={key:0,class:"text-sm text-gray-500"},Vi={class:"flex items-start gap-2"},Mi={class:"flex-1"},Ni={class:"w-40"},Ui={class:"mt-2"};function Li(r,t,o,l,n,s){const e=Ee("Label"),a=Ee("Select"),i=Ee("Checkbox"),u=Ee("Description"),c=Ee("PanelHeader"),d=Ee("Card"),f=Ee("Panel"),p=Ee("Button"),m=Ee("Input"),v=Ee("replicator-field-mapper",!0),g=Ee("ConfirmationModal");return j(),K("div",Pi,[A("div",Ti,[A("div",null,[R(e,{class:"mb-1.5"},{default:U(()=>[ee(w(r.__("Replicator Field")),1)]),_:1}),R(a,{modelValue:n.localConfig.replicator_field,"onUpdate:modelValue":[t[0]||(t[0]=h=>n.localConfig.replicator_field=h),t[1]||(t[1]=()=>{n.localConfig.set=""})],options:s.replicatorFieldOptions,placeholder:s.replicatorFieldOptions.length>0?r.__("Select replicator field"):r.__("No replicator fields available"),disabled:s.replicatorFieldOptions.length===0},null,8,["modelValue","options","placeholder","disabled"]),s.replicatorFieldOptions.length===0?(j(),K("div",Ii,[A("strong",null,w(r.__("No replicator fields found.")),1),t[7]||(t[7]=A("br",null,null,-1)),ee(" "+w(r.__('Make sure your Structured Data Template has "Use for collection" or "Use for taxonomy" set, and that collection/taxonomy has replicator fields in its blueprint.')),1)])):ve("",!0)]),A("div",null,[R(e,{class:"mb-1.5"},{default:U(()=>[ee(w(r.__("Limit to Set (optional)")),1)]),_:1}),R(a,{modelValue:n.localConfig.set,"onUpdate:modelValue":t[2]||(t[2]=h=>n.localConfig.set=h),options:s.setOptions,placeholder:r.__("All sets"),clearable:!0},null,8,["modelValue","options","placeholder"])])]),R(f,null,{default:U(()=>[R(c,null,{default:U(()=>[A("div",Ai,[A("span",null,w(r.__("Flat mode")),1),R(u,null,{default:U(()=>[R(i,{modelValue:n.localConfig.flat,"onUpdate:modelValue":t[3]||(t[3]=h=>n.localConfig.flat=h),label:r.__("Create a flat object where each replicator row becomes a key-value pair."),class:"items-center"},null,8,["modelValue","label"])]),_:1})])]),_:1}),n.localConfig.flat?(j(),be(d,{key:0},{default:U(()=>[A("div",Di,[A("div",null,[R(e,{class:"mb-1.5"},{default:U(()=>[ee(w(r.__("Key Field")),1)]),_:1}),R(a,{modelValue:n.localConfig.flat_key_field,"onUpdate:modelValue":t[4]||(t[4]=h=>n.localConfig.flat_key_field=h),options:s.flatFieldOptions,placeholder:r.__("Select field to use as key")},null,8,["modelValue","options","placeholder"]),A("p",Ri,w(r.__("Field value will be used as the object key")),1)]),A("div",null,[R(e,{class:"mb-1.5"},{default:U(()=>[ee(w(r.__("Value Field")),1)]),_:1}),R(a,{modelValue:n.localConfig.flat_value_field,"onUpdate:modelValue":t[5]||(t[5]=h=>n.localConfig.flat_value_field=h),options:s.flatFieldOptions,placeholder:r.__("Select field to use as value")},null,8,["modelValue","options","placeholder"]),A("p",$i,w(r.__("Field value will be used as the object value")),1)])])]),_:1})):ve("",!0)]),_:1}),n.localConfig.flat?ve("",!0):(j(),be(d,{key:0,class:"mt-3"},{default:U(()=>[A("div",Fi,[A("h4",ji,w(r.__("Field Mappings")),1),R(p,{class:"text-sm",onClick:s.addMapping},{default:U(()=>[ee(w(r.__("Add Mapping")),1)]),_:1},8,["onClick"])]),n.localConfig.mappings.length?ve("",!0):(j(),K("div",wi,w(r.__("No mappings yet. Add one to map replicator fields into your JSON-LD object.")),1)),(j(!0),K(He,null,Ze(n.localConfig.mappings,(h,y)=>(j(),be(d,{key:y,class:"mb-3"},{default:U(()=>[A("div",Vi,[A("div",Mi,[R(e,{class:"mb-1.5"},{default:U(()=>[ee(w(r.__("JSON-LD Key")),1)]),_:1}),R(m,{modelValue:h.key,"onUpdate:modelValue":[O=>h.key=O,()=>s.sanitizeKey(h)],placeholder:"e.g. name"},null,8,["modelValue","onUpdate:modelValue"])]),A("div",Ni,[R(e,{class:"mb-1.5"},{default:U(()=>[ee(w(r.__("Source")),1)]),_:1}),R(a,{modelValue:h.mode,"onUpdate:modelValue":O=>h.mode=O,options:n.modeOptions},null,8,["modelValue","onUpdate:modelValue","options"])]),R(p,{class:"mt-6",variant:"danger",onClick:O=>s.requestRemoveMapping(y)},{default:U(()=>[ee(w(r.__("Remove")),1)]),_:1},8,["onClick"])]),A("div",Ui,[h.mode==="static"?(j(),K(He,{key:0},[R(e,{class:"mb-1.5"},{default:U(()=>[ee(w(r.__("Static Value")),1)]),_:1}),R(m,{modelValue:h.static,"onUpdate:modelValue":O=>h.static=O,placeholder:r.__("e.g. PropertyValue")},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64)):h.mode==="field"?(j(),K(He,{key:1},[R(e,{class:"mb-1.5"},{default:U(()=>[ee(w(r.__("Replicator Field")),1)]),_:1}),R(a,{modelValue:h.field,"onUpdate:modelValue":O=>h.field=O,options:s.getFieldOptionsForMapping(h),placeholder:r.__("Select field")},null,8,["modelValue","onUpdate:modelValue","options","placeholder"])],64)):h.mode==="nested_replicator"?(j(),be(d,{key:2,class:"mt-2"},{default:U(()=>[R(v,{modelValue:h.nested,"onUpdate:modelValue":O=>h.nested=O,"replicator-fields":o.replicatorFields},null,8,["modelValue","onUpdate:modelValue","replicator-fields"])]),_:2},1024)):ve("",!0)])]),_:2},1024))),128))]),_:1})),n.confirmRemoveMappingOpen?(j(),be(g,{key:1,open:n.confirmRemoveMappingOpen,"onUpdate:open":t[6]||(t[6]=h=>n.confirmRemoveMappingOpen=h),"body-text":r.__("Are you sure you want to remove this mapping? This action cannot be undone."),onConfirm:s.confirmRemoveMapping},null,8,["open","body-text","onConfirm"])):ve("",!0)])}const Wn=Cn(Ci,[["render",Li]]),Bi={name:"StructuredDataObject",components:{"replicator-field-mapper":Wn,Button:xe,Card:It,ConfirmationModal:cn,Icon:yi,Input:nt,Label:_e,Select:qt},props:{modelValue:{type:Object,default:()=>({specialProps:{type:"",id:""},fields:[]})},baseUrl:{type:String,required:!0},parentType:{type:String,default:""},fieldKey:{type:String,default:""}},data(){return{objectData:JSON.parse(JSON.stringify(this.modelValue)),confirmRemoveFieldOpen:!1,fieldIndexToRemove:null,confirmRemoveArrayValueOpen:!1,arrayRemoveContext:{field:null,valueIndex:null}}},computed:{suggestedId(){return this.objectData.specialProps.type?`{{ site:url }}/#${this.objectData.specialProps.type}`:""},selectOptions(){return[{value:"string",label:"String"},{value:"numeric",label:"Numeric"},{value:"array",label:"Array"},{value:"object",label:"Object"},{value:"replicator_object_array",label:"Replicator Object Array"}]},availableReplicatorFields(){return this.replicatorFields||[]}},watch:{objectData:{deep:!0,handler(r){const t=JSON.stringify(r),o=JSON.stringify(this.modelValue);t!==o&&this.$emit("update:modelValue",JSON.parse(JSON.stringify(r)))}},"objectData.specialProps.type"(r){!this.objectData.specialProps.id&&r&&this.useDefaultId()},modelValue:{deep:!0,handler(r){const t=JSON.stringify(r),o=JSON.stringify(this.objectData);t!==o&&(this.objectData=JSON.parse(JSON.stringify(r)))}}},methods:{addField(){this.objectData.fields.push({key:"",type:"string",value:"",values:[],fields:[],config:{}})},removeField(r){this.objectData.fields.splice(r,1)},addArrayValue(r){r.values||(r.values=[]),r.values.push("")},removeArrayValue(r,t){r.values.splice(t,1)},validateKey(r){r.key=r.key.replace(/[^a-zA-Z0-9@]/g,"")},useDefaultId(){this.objectData.specialProps.id=this.suggestedId},handleTypeChange(r){r.type==="object"?this.$set(r,"value",{specialProps:{type:"",id:""},fields:[]}):r.type==="array"?r.values=[]:r.type==="replicator_object_array"?(r.config={replicator_field:"",set:"",mappings:[]},r.values=[]):r.value=""},requestRemoveField(r){this.fieldIndexToRemove=r,this.confirmRemoveFieldOpen=!0},confirmRemoveField(){this.fieldIndexToRemove!==null&&(this.removeField(this.fieldIndexToRemove),this.fieldIndexToRemove=null)},requestRemoveArrayValue(r,t){this.arrayRemoveContext={field:r,valueIndex:t},this.confirmRemoveArrayValueOpen=!0},confirmRemoveArrayValue(){const r=this.arrayRemoveContext;!r||!r.field||r.valueIndex===null||(this.removeArrayValue(r.field,r.valueIndex),this.arrayRemoveContext={field:null,valueIndex:null})}}},Gi={class:"mb-4"},Ki={class:"mb-2"},Hi={class:"mb-2"},Wi={class:"flex"},zi={class:"flex items-start gap-2"},Xi={class:"flex-1"},Yi={class:"w-32"},Ji={class:"mt-2"},Zi={key:0},Qi={key:1},ki={key:2,class:"space-y-2"},qi={key:3,class:"mt-2 border rounded p-4"},_i={key:4,class:"mt-2"};function el(r,t,o,l,n,s){const e=Ee("Label"),a=Ee("Input"),i=Ee("Button"),u=Ee("Select"),c=Ee("Icon"),d=Ee("structured-data-object",!0),f=Ee("replicator-field-mapper"),p=Ee("ConfirmationModal"),m=Ee("Card");return j(),be(m,{class:"structured-data-object"},{default:U(()=>[A("div",Gi,[A("div",Ki,[R(e,{class:"mb-1.5"},{default:U(()=>[...t[4]||(t[4]=[ee("@type",-1)])]),_:1}),R(a,{modelValue:n.objectData.specialProps.type,"onUpdate:modelValue":t[0]||(t[0]=v=>n.objectData.specialProps.type=v),placeholder:"e.g. Organization, Product, BlogPosting"},null,8,["modelValue"])]),A("div",Hi,[R(e,{class:"mb-1.5"},{default:U(()=>[...t[5]||(t[5]=[ee("@id",-1)])]),_:1}),A("div",Wi,[R(a,{modelValue:n.objectData.specialProps.id,"onUpdate:modelValue":t[1]||(t[1]=v=>n.objectData.specialProps.id=v),class:"flex-1",placeholder:s.suggestedId},null,8,["modelValue","placeholder"]),R(i,{class:"ml-2",onClick:s.useDefaultId},{default:U(()=>[ee(w(r.__("Use Default")),1)]),_:1},8,["onClick"])])])]),A("div",null,[(j(!0),K(He,null,Ze(n.objectData.fields,(v,g)=>(j(),K("div",{key:g,class:"mb-4 border-b pb-4"},[A("div",zi,[A("div",Xi,[R(e,{class:"mb-1.5"},{default:U(()=>[ee(w(r.__("Key")),1)]),_:1}),R(a,{modelValue:v.key,"onUpdate:modelValue":[h=>v.key=h,()=>s.validateKey(v)]},null,8,["modelValue","onUpdate:modelValue"])]),A("div",Yi,[R(e,{class:"mb-1.5"},{default:U(()=>[...t[6]||(t[6]=[ee("Type",-1)])]),_:1}),R(u,{modelValue:v.type,"onUpdate:modelValue":[h=>v.type=h,()=>s.handleTypeChange(v)],options:s.selectOptions},null,8,["modelValue","onUpdate:modelValue","options"])]),R(i,{variant:"danger",class:"mt-6",onClick:h=>s.requestRemoveField(g)},{default:U(()=>[R(c,{name:"x"})]),_:1},8,["onClick"])]),A("div",Ji,[v.type==="string"?(j(),K("div",Zi,[R(a,{modelValue:v.value,"onUpdate:modelValue":h=>v.value=h},null,8,["modelValue","onUpdate:modelValue"])])):v.type==="numeric"?(j(),K("div",Qi,[R(a,{type:"number",modelValue:v.value,"onUpdate:modelValue":h=>v.value=h},null,8,["modelValue","onUpdate:modelValue"])])):v.type==="array"?(j(),K("div",ki,[(j(!0),K(He,null,Ze(v.values,(h,y)=>(j(),K("div",{key:y,class:"flex gap-2"},[R(a,{modelValue:v.values[y],"onUpdate:modelValue":O=>v.values[y]=O},null,8,["modelValue","onUpdate:modelValue"]),R(i,{variant:"danger",onClick:O=>s.requestRemoveArrayValue(v,y)},{default:U(()=>[R(c,{name:"x"})]),_:1},8,["onClick"])]))),128)),R(i,{onClick:h=>s.addArrayValue(v),variant:"primary"},{default:U(()=>[ee(w(r.__("Add Value")),1)]),_:1},8,["onClick"])])):v.type==="object"?(j(),K("div",qi,[R(d,{modelValue:v.value,"onUpdate:modelValue":h=>v.value=h,"base-url":o.baseUrl,"parent-type":n.objectData.specialProps.type,"field-key":v.key},null,8,["modelValue","onUpdate:modelValue","base-url","parent-type","field-key"])])):v.type==="replicator_object_array"?(j(),K("div",_i,[R(f,{modelValue:v.config,"onUpdate:modelValue":h=>v.config=h,"replicator-fields":r.replicatorFields},null,8,["modelValue","onUpdate:modelValue","replicator-fields"])])):ve("",!0)])]))),128)),R(i,{onClick:s.addField,variant:"primary"},{default:U(()=>[ee(w(r.__("Add Property")),1)]),_:1},8,["onClick"])]),n.confirmRemoveFieldOpen?(j(),be(p,{key:0,open:n.confirmRemoveFieldOpen,"onUpdate:open":t[2]||(t[2]=v=>n.confirmRemoveFieldOpen=v),"body-text":r.__("Are you sure you want to remove this field? This action cannot be undone."),onConfirm:s.confirmRemoveField},null,8,["open","body-text","onConfirm"])):ve("",!0),n.confirmRemoveArrayValueOpen?(j(),be(p,{key:1,open:n.confirmRemoveArrayValueOpen,"onUpdate:open":t[3]||(t[3]=v=>n.confirmRemoveArrayValueOpen=v),"body-text":r.__("Are you sure you want to remove this value? This action cannot be undone."),onConfirm:s.confirmRemoveArrayValue},null,8,["open","body-text","onConfirm"])):ve("",!0)]),_:1})}const Un=Cn(Bi,[["render",el]]),tl={name:"PresetStack",components:{Badge:pi,Button:xe,Card:It,Stack:Oi},emits:["close","preset-selected"],props:{visible:{type:Boolean,default:!1},presets:{type:Array,default:()=>[]},hasExistingSchemas:{type:Boolean,default:!1}},data(){return{selectedPreset:null}},computed:{isOpen:{get(){return this.visible},set(r){r||this.close()}}},methods:{close(){this.selectedPreset=null,this.$emit("close")},selectPreset(r){this.selectedPreset=r},goBack(){this.selectedPreset=null},handleAction(r){this.$emit("preset-selected",{preset:this.selectedPreset,action:r}),this.close()}}},nl={class:"max-h-[60vh] flex flex-col gap-4"},rl={key:0,class:"preset-selection space-y-4"},ol={class:"text-sm"},al={class:"grid grid-cols-1 gap-3"},il={class:"flex justify-between items-start gap-3"},ll={class:"flex-1"},sl={class:"font-semibold text-sm"},ul={class:"text-xs mt-1"},cl={class:"mt-2"},dl={class:"text-[11px] mb-1"},fl={class:"flex flex-wrap gap-1"},pl={class:"py-1 px-2"},vl={class:"py-1 px-2"},ml={class:"py-1 px-2"},hl={key:1,class:"preset-actions space-y-4"},gl={class:"font-semibold"},yl={class:"text-sm mt-1"},bl={key:0,class:"action-selection space-y-3"},Sl={class:"text-sm"},xl={class:"flex flex-col gap-1"},El={class:"font-semibold"},Ol={class:"text-sm"},Cl={class:"flex flex-col gap-1"},Pl={class:"font-semibold"},Tl={class:"text-sm"},Il={key:1,class:"no-existing-schemas space-y-3"},Al={class:"text-sm"},Dl={class:"flex justify-end gap-2"};function Rl(r,t,o,l,n,s){const e=Ee("Badge"),a=Ee("Card"),i=Ee("Button"),u=Ee("Stack");return j(),be(u,{open:s.isOpen,"onUpdate:open":t[3]||(t[3]=c=>s.isOpen=c),title:r.__("Add Preset")},{footer:U(()=>[A("div",Dl,[n.selectedPreset?(j(),be(i,{key:0,variant:"ghost",size:"sm",onClick:s.goBack},{default:U(()=>[ee(w(r.__("Back")),1)]),_:1},8,["onClick"])):ve("",!0),R(i,{variant:"subtle",size:"sm",onClick:s.close},{default:U(()=>[ee(w(r.__("Cancel")),1)]),_:1},8,["onClick"])])]),default:U(()=>[A("div",nl,[n.selectedPreset?(j(),K("div",hl,[R(a,null,{default:U(()=>[A("h4",gl,w(n.selectedPreset.name),1),A("p",yl,w(n.selectedPreset.description),1)]),_:1}),o.hasExistingSchemas?(j(),K("div",bl,[A("p",Sl,w(r.__("You have existing schemas. How would you like to add this preset?")),1),R(a,{class:"cursor-pointer",onClick:t[0]||(t[0]=c=>s.handleAction("merge"))},{default:U(()=>[A("div",xl,[A("div",El,w(r.__("Merge (Recommended)")),1),A("div",Ol,w(r.__("Add this preset as an additional schema alongside your existing ones")),1)])]),_:1}),R(a,{class:"cursor-pointer",onClick:t[1]||(t[1]=c=>s.handleAction("override"))},{default:U(()=>[A("div",Cl,[A("div",Pl,w(r.__("Override")),1),A("div",Tl,w(r.__("Replace all existing schemas with this preset")),1)])]),_:1})])):(j(),K("div",Il,[A("p",Al,w(r.__("This preset will be added as your first schema.")),1),R(i,{class:"w-full",onClick:t[2]||(t[2]=c=>s.handleAction("add"))},{default:U(()=>[ee(w(r.__("Add Preset")),1)]),_:1})]))])):(j(),K("div",rl,[A("p",ol,w(r.__("Choose a preset to add to your schema:")),1),A("div",al,[(j(!0),K(He,null,Ze(o.presets,c=>(j(),be(a,{key:c.name,class:"cursor-pointer",onClick:d=>s.selectPreset(c)},{default:U(()=>[A("div",il,[A("div",ll,[A("h4",sl,w(c.name),1),A("p",ul,w(c.description),1),A("div",cl,[A("div",dl,w(r.__("Fields:")),1),A("div",fl,[(j(!0),K(He,null,Ze(c.schema.fields.slice(0,3),d=>(j(),be(e,{key:d.key,size:"xs",pill:""},{default:U(()=>[A("span",pl,w(d.key),1)]),_:2},1024))),128)),c.schema.fields.length>3?(j(),be(e,{key:0,size:"xs",pill:""},{default:U(()=>[A("span",vl," +"+w(c.schema.fields.length-3),1)]),_:2},1024)):ve("",!0)])])]),R(e,{size:"xs",pill:""},{default:U(()=>[A("span",ml,w(c.schema.specialProps.type),1)]),_:2},1024)])]),_:2},1032,["onClick"]))),128))])]))])]),_:1},8,["open","title"])}const $l=Cn(tl,[["render",Rl]]);function yn(r){const t={};if(r.specialProps&&(r.specialProps.context&&(t["@context"]=r.specialProps.context),r.specialProps.type&&(t["@type"]=r.specialProps.type),r.specialProps.id&&(t["@id"]=r.specialProps.id)),r.fields&&Array.isArray(r.fields)){for(const o of r.fields)if(o.key)if(o.type==="array"&&o.values)t[o.key]=o.values;else if(o.type==="object"&&o.value)t[o.key]=yn(o.value);else if(o.type==="object_array"&&o.values)t[o.key]=o.values.map(l=>yn(l));else if(o.type==="replicator_object_array"&&o.config){const l=o.config||{};if(l.flat===!0&&l.flat_key_field&&l.flat_value_field){const n=`{{ ${l.flat_key_field} }}`,s=`{{ ${l.flat_value_field} }}`;t[o.key]=[{[n]:s}]}else{const n={};(Array.isArray(l.mappings)?l.mappings:[]).forEach(e=>{e.key&&(e.mode==="static"?n[e.key]=e.static??"":e.mode==="field"?n[e.key]=`{{ ${e.field||"field"} }}`:e.mode==="nested_replicator"?n[e.key]=[{}]:n[e.key]="")}),t[o.key]=[n]}}else t[o.key]=o.value??null}return t}function cr(r,t=2){try{if(Array.isArray(r)){const l=r.map(n=>yn(n));return JSON.stringify(l,null,t)}const o=yn(r);return JSON.stringify(o,null,t)}catch{return JSON.stringify(r,null,t)}}function Fl(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function dr(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var t=r.default;if(typeof t=="function"){var o=function l(){return this instanceof l?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(r).forEach(function(l){var n=Object.getOwnPropertyDescriptor(r,l);Object.defineProperty(o,l,n.get?n:{enumerable:!0,get:function(){return r[l]}})}),o}var dn={exports:{}};const jl=dr(fi);/**! - * Sortable 1.14.0 - * @author RubaXa - * @author owenm - * @license MIT - */function Zn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);t&&(l=l.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),o.push.apply(o,l)}return o}function mt(r){for(var t=1;t=0)&&(o[n]=r[n]);return o}function Ml(r,t){if(r==null)return{};var o=Vl(r,t),l,n;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(r,l)&&(o[l]=r[l])}return o}function Nl(r){return Ul(r)||Ll(r)||Bl(r)||Gl()}function Ul(r){if(Array.isArray(r))return Ln(r)}function Ll(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Bl(r,t){if(r){if(typeof r=="string")return Ln(r,t);var o=Object.prototype.toString.call(r).slice(8,-1);if(o==="Object"&&r.constructor&&(o=r.constructor.name),o==="Map"||o==="Set")return Array.from(r);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Ln(r,t)}}function Ln(r,t){(t==null||t>r.length)&&(t=r.length);for(var o=0,l=new Array(t);o"&&(t=t.substring(1)),r)try{if(r.matches)return r.matches(t);if(r.msMatchesSelector)return r.msMatchesSelector(t);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(t)}catch{return!1}return!1}}function Wl(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function dt(r,t,o,l){if(r){o=o||document;do{if(t!=null&&(t[0]===">"?r.parentNode===o&&bn(r,t):bn(r,t))||l&&r===o)return r;if(r===o)break}while(r=Wl(r))}return null}var kn=/\s+/g;function Ie(r,t,o){if(r&&t)if(r.classList)r.classList[o?"add":"remove"](t);else{var l=(" "+r.className+" ").replace(kn," ").replace(" "+t+" "," ");r.className=(l+(o?" "+t:"")).replace(kn," ")}}function W(r,t,o){var l=r&&r.style;if(l){if(o===void 0)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(o=r.currentStyle),t===void 0?o:o[t];!(t in l)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),l[t]=o+(typeof o=="string"?"":"px")}}function Tt(r,t){var o="";if(typeof r=="string")o=r;else do{var l=W(r,"transform");l&&l!=="none"&&(o=l+" "+o)}while(!t&&(r=r.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(o)}function vr(r,t,o){if(r){var l=r.getElementsByTagName(t),n=0,s=l.length;if(o)for(;n=s,!e)return l;if(l===vt())break;l=Et(l,!1)}return!1}function Mt(r,t,o,l){for(var n=0,s=0,e=r.children;s2&&arguments[2]!==void 0?arguments[2]:{},n=l.evt,s=Ml(l,kl);en.pluginEvent.bind(_)(t,o,mt({dragEl:N,parentEl:Re,ghostEl:ae,rootEl:Pe,nextEl:Pt,lastDownEl:pn,cloneEl:$e,cloneHidden:xt,dragStarted:Wt,putSortable:Ge,activeSortable:_.active,originalEvent:n,oldIndex:Ft,oldDraggableIndex:Zt,newIndex:tt,newDraggableIndex:St,hideGhostForTarget:Sr,unhideGhostForTarget:xr,cloneNowHidden:function(){xt=!0},cloneNowShown:function(){xt=!1},dispatchSortableEvent:function(a){Je({sortable:o,name:a,originalEvent:n})}},s))};function Je(r){Ht(mt({putSortable:Ge,cloneEl:$e,targetEl:N,rootEl:Pe,oldIndex:Ft,oldDraggableIndex:Zt,newIndex:tt,newDraggableIndex:St},r))}var N,Re,ae,Pe,Pt,pn,$e,xt,Ft,tt,Zt,St,nn,Ge,$t=!1,Sn=!1,xn=[],Ot,ut,Rn,$n,tr,nr,Wt,Dt,Qt,kt=!1,rn=!1,vn,ze,Fn=[],Bn=!1,En=[],Pn=typeof document<"u",on=fr,rr=_t||bt?"cssFloat":"float",ql=Pn&&!Hl&&!fr&&"draggable"in document.createElement("div"),gr=(function(){if(Pn){if(bt)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}})(),yr=function(t,o){var l=W(t),n=parseInt(l.width)-parseInt(l.paddingLeft)-parseInt(l.paddingRight)-parseInt(l.borderLeftWidth)-parseInt(l.borderRightWidth),s=Mt(t,0,o),e=Mt(t,1,o),a=s&&W(s),i=e&&W(e),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Te(s).width,c=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+Te(e).width;if(l.display==="flex")return l.flexDirection==="column"||l.flexDirection==="column-reverse"?"vertical":"horizontal";if(l.display==="grid")return l.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&a.float&&a.float!=="none"){var d=a.float==="left"?"left":"right";return e&&(i.clear==="both"||i.clear===d)?"vertical":"horizontal"}return s&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=n&&l[rr]==="none"||e&&l[rr]==="none"&&u+c>n)?"vertical":"horizontal"},_l=function(t,o,l){var n=l?t.left:t.top,s=l?t.right:t.bottom,e=l?t.width:t.height,a=l?o.left:o.top,i=l?o.right:o.bottom,u=l?o.width:o.height;return n===a||s===i||n+e/2===a+u/2},es=function(t,o){var l;return xn.some(function(n){var s=n[Xe].options.emptyInsertThreshold;if(!(!s||zn(n))){var e=Te(n),a=t>=e.left-s&&t<=e.right+s,i=o>=e.top-s&&o<=e.bottom+s;if(a&&i)return l=n}}),l},br=function(t){function o(s,e){return function(a,i,u,c){var d=a.options.group.name&&i.options.group.name&&a.options.group.name===i.options.group.name;if(s==null&&(e||d))return!0;if(s==null||s===!1)return!1;if(e&&s==="clone")return s;if(typeof s=="function")return o(s(a,i,u,c),e)(a,i,u,c);var f=(e?a:i).options.group.name;return s===!0||typeof s=="string"&&s===f||s.join&&s.indexOf(f)>-1}}var l={},n=t.group;(!n||fn(n)!="object")&&(n={name:n}),l.name=n.name,l.checkPull=o(n.pull,!0),l.checkPut=o(n.put),l.revertClone=n.revertClone,t.group=l},Sr=function(){!gr&&ae&&W(ae,"display","none")},xr=function(){!gr&&ae&&W(ae,"display","")};Pn&&document.addEventListener("click",function(r){if(Sn)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),Sn=!1,!1},!0);var Ct=function(t){if(N){t=t.touches?t.touches[0]:t;var o=es(t.clientX,t.clientY);if(o){var l={};for(var n in t)t.hasOwnProperty(n)&&(l[n]=t[n]);l.target=l.rootEl=o,l.preventDefault=void 0,l.stopPropagation=void 0,o[Xe]._onDragOver(l)}}},ts=function(t){N&&N.parentNode[Xe]._isOutsideThisEl(t.target)};function _(r,t){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=t=lt({},t),r[Xe]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return yr(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,a){e.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:_.supportPointer!==!1&&"PointerEvent"in window&&!Yt,emptyInsertThreshold:5};en.initializePlugins(this,r,o);for(var l in o)!(l in t)&&(t[l]=o[l]);br(t);for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this));this.nativeDraggable=t.forceFallback?!1:ql,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?se(r,"pointerdown",this._onTapStart):(se(r,"mousedown",this._onTapStart),se(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(se(r,"dragover",this),se(r,"dragenter",this)),xn.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),lt(this,Jl())}_.prototype={constructor:_,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Dt=null)},_getDirection:function(t,o){return typeof this.options.direction=="function"?this.options.direction.call(this,t,o,N):this.options.direction},_onTapStart:function(t){if(t.cancelable){var o=this,l=this.el,n=this.options,s=n.preventOnFilter,e=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,i=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||i,c=n.filter;if(us(l),!N&&!(/mousedown|pointerdown/.test(e)&&t.button!==0||n.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Yt&&i&&i.tagName.toUpperCase()==="SELECT")&&(i=dt(i,n.draggable,l,!1),!(i&&i.animated)&&pn!==i)){if(Ft=Fe(i),Zt=Fe(i,n.draggable),typeof c=="function"){if(c.call(this,t,i,this)){Je({sortable:o,rootEl:u,name:"filter",targetEl:i,toEl:l,fromEl:l}),ke("filter",o,{evt:t}),s&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(d){if(d=dt(u,d.trim(),l,!1),d)return Je({sortable:o,rootEl:d,name:"filter",targetEl:i,fromEl:l,toEl:l}),ke("filter",o,{evt:t}),!0}),c)){s&&t.cancelable&&t.preventDefault();return}n.handle&&!dt(u,n.handle,l,!1)||this._prepareDragStart(t,a,i)}}},_prepareDragStart:function(t,o,l){var n=this,s=n.el,e=n.options,a=s.ownerDocument,i;if(l&&!N&&l.parentNode===s){var u=Te(l);if(Pe=s,N=l,Re=N.parentNode,Pt=N.nextSibling,pn=l,nn=e.group,_.dragged=N,Ot={target:N,clientX:(o||t).clientX,clientY:(o||t).clientY},tr=Ot.clientX-u.left,nr=Ot.clientY-u.top,this._lastX=(o||t).clientX,this._lastY=(o||t).clientY,N.style["will-change"]="all",i=function(){if(ke("delayEnded",n,{evt:t}),_.eventCanceled){n._onDrop();return}n._disableDelayedDragEvents(),!Qn&&n.nativeDraggable&&(N.draggable=!0),n._triggerDragStart(t,o),Je({sortable:n,name:"choose",originalEvent:t}),Ie(N,e.chosenClass,!0)},e.ignore.split(",").forEach(function(c){vr(N,c.trim(),jn)}),se(a,"dragover",Ct),se(a,"mousemove",Ct),se(a,"touchmove",Ct),se(a,"mouseup",n._onDrop),se(a,"touchend",n._onDrop),se(a,"touchcancel",n._onDrop),Qn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,N.draggable=!0),ke("delayStart",this,{evt:t}),e.delay&&(!e.delayOnTouchOnly||o)&&(!this.nativeDraggable||!(_t||bt))){if(_.eventCanceled){this._onDrop();return}se(a,"mouseup",n._disableDelayedDrag),se(a,"touchend",n._disableDelayedDrag),se(a,"touchcancel",n._disableDelayedDrag),se(a,"mousemove",n._delayedDragTouchMoveHandler),se(a,"touchmove",n._delayedDragTouchMoveHandler),e.supportPointer&&se(a,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(i,e.delay)}else i()}},_delayedDragTouchMoveHandler:function(t){var o=t.touches?t.touches[0]:t;Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){N&&jn(N),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;le(t,"mouseup",this._disableDelayedDrag),le(t,"touchend",this._disableDelayedDrag),le(t,"touchcancel",this._disableDelayedDrag),le(t,"mousemove",this._delayedDragTouchMoveHandler),le(t,"touchmove",this._delayedDragTouchMoveHandler),le(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,o){o=o||t.pointerType=="touch"&&t,!this.nativeDraggable||o?this.options.supportPointer?se(document,"pointermove",this._onTouchMove):o?se(document,"touchmove",this._onTouchMove):se(document,"mousemove",this._onTouchMove):(se(N,"dragend",this),se(Pe,"dragstart",this._onDragStart));try{document.selection?mn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,o){if($t=!1,Pe&&N){ke("dragStarted",this,{evt:o}),this.nativeDraggable&&se(document,"dragover",ts);var l=this.options;!t&&Ie(N,l.dragClass,!1),Ie(N,l.ghostClass,!0),_.active=this,t&&this._appendGhost(),Je({sortable:this,name:"start",originalEvent:o})}else this._nulling()},_emulateDragOver:function(){if(ut){this._lastX=ut.clientX,this._lastY=ut.clientY,Sr();for(var t=document.elementFromPoint(ut.clientX,ut.clientY),o=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ut.clientX,ut.clientY),t!==o);)o=t;if(N.parentNode[Xe]._isOutsideThisEl(t),o)do{if(o[Xe]){var l=void 0;if(l=o[Xe]._onDragOver({clientX:ut.clientX,clientY:ut.clientY,target:t,rootEl:o}),l&&!this.options.dragoverBubble)break}t=o}while(o=o.parentNode);xr()}},_onTouchMove:function(t){if(Ot){var o=this.options,l=o.fallbackTolerance,n=o.fallbackOffset,s=t.touches?t.touches[0]:t,e=ae&&Tt(ae,!0),a=ae&&e&&e.a,i=ae&&e&&e.d,u=on&&ze&&_n(ze),c=(s.clientX-Ot.clientX+n.x)/(a||1)+(u?u[0]-Fn[0]:0)/(a||1),d=(s.clientY-Ot.clientY+n.y)/(i||1)+(u?u[1]-Fn[1]:0)/(i||1);if(!_.active&&!$t){if(l&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))=0&&(Je({rootEl:Re,name:"add",toEl:Re,fromEl:Pe,originalEvent:t}),Je({sortable:this,name:"remove",toEl:Re,originalEvent:t}),Je({rootEl:Re,name:"sort",toEl:Re,fromEl:Pe,originalEvent:t}),Je({sortable:this,name:"sort",toEl:Re,originalEvent:t})),Ge&&Ge.save()):tt!==Ft&&tt>=0&&(Je({sortable:this,name:"update",toEl:Re,originalEvent:t}),Je({sortable:this,name:"sort",toEl:Re,originalEvent:t})),_.active&&((tt==null||tt===-1)&&(tt=Ft,St=Zt),Je({sortable:this,name:"end",toEl:Re,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){ke("nulling",this),Pe=N=Re=ae=Pt=$e=pn=xt=Ot=ut=Wt=tt=St=Ft=Zt=Dt=Qt=Ge=nn=_.dragged=_.ghost=_.clone=_.active=null,En.forEach(function(t){t.checked=!0}),En.length=Rn=$n=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":N&&(this._onDragOver(t),ns(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],o,l=this.el.children,n=0,s=l.length,e=this.options;nl.right+n||r.clientX<=l.right&&r.clientY>l.bottom&&r.clientX>=l.left:r.clientX>l.right&&r.clientY>l.top||r.clientX<=l.right&&r.clientY>l.bottom+n}function is(r,t,o,l,n,s,e,a){var i=l?r.clientY:r.clientX,u=l?o.height:o.width,c=l?o.top:o.left,d=l?o.bottom:o.right,f=!1;if(!e){if(a&&vnc+u*s/2:id-vn)return-Qt}else if(i>c+u*(1-n)/2&&id-u*s/2)?i>c+u/2?1:-1:0}function ls(r){return Fe(N)1&&(re.forEach(function(a){s.addAnimationState({target:a,rect:qe?Te(a):e}),An(a),a.fromRect=e,l.removeAnimationState(a)}),qe=!1,vs(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(o){var l=o.sortable,n=o.isOwner,s=o.insertion,e=o.activeSortable,a=o.parentEl,i=o.putSortable,u=this.options;if(s){if(n&&e._hideClone(),Gt=!1,u.animation&&re.length>1&&(qe||!n&&!e.options.sort&&!i)){var c=Te(ye,!1,!0,!0);re.forEach(function(f){f!==ye&&(er(f,c),a.appendChild(f))}),qe=!0}if(!n)if(qe||sn(),re.length>1){var d=ln;e._showClone(l),e.options.animation&&!ln&&d&&et.forEach(function(f){e.addAnimationState({target:f,rect:Kt}),f.fromRect=Kt,f.thisAnimationDuration=null})}else e._showClone(l)}},dragOverAnimationCapture:function(o){var l=o.dragRect,n=o.isOwner,s=o.activeSortable;if(re.forEach(function(a){a.thisAnimationDuration=null}),s.options.animation&&!n&&s.multiDrag.isMultiDrag){Kt=lt({},l);var e=Tt(ye,!0);Kt.top-=e.f,Kt.left-=e.e}},dragOverAnimationComplete:function(){qe&&(qe=!1,sn())},drop:function(o){var l=o.originalEvent,n=o.rootEl,s=o.parentEl,e=o.sortable,a=o.dispatchSortableEvent,i=o.oldIndex,u=o.putSortable,c=u||this.sortable;if(l){var d=this.options,f=s.children;if(!Rt)if(d.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Ie(ye,d.selectedClass,!~re.indexOf(ye)),~re.indexOf(ye))re.splice(re.indexOf(ye),1),Bt=null,Ht({sortable:e,rootEl:n,name:"deselect",targetEl:ye});else{if(re.push(ye),Ht({sortable:e,rootEl:n,name:"select",targetEl:ye}),l.shiftKey&&Bt&&e.el.contains(Bt)){var p=Fe(Bt),m=Fe(ye);if(~p&&~m&&p!==m){var v,g;for(m>p?(g=p,v=m):(g=m,v=p+1);g1){var h=Te(ye),y=Fe(ye,":not(."+this.options.selectedClass+")");if(!Gt&&d.animation&&(ye.thisAnimationDuration=null),c.captureAnimationState(),!Gt&&(d.animation&&(ye.fromRect=h,re.forEach(function(E){if(E.thisAnimationDuration=null,E!==ye){var I=qe?Te(E):h;E.fromRect=I,c.addAnimationState({target:E,rect:I})}})),sn(),re.forEach(function(E){f[y]?s.insertBefore(E,f[y]):s.appendChild(E),y++}),i===Fe(ye))){var O=!1;re.forEach(function(E){if(E.sortableIndex!==Fe(E)){O=!0;return}}),O&&a("update")}re.forEach(function(E){An(E)}),c.animateAll()}ct=c}(n===s||u&&u.lastPutMode!=="clone")&&et.forEach(function(E){E.parentNode&&E.parentNode.removeChild(E)})}},nullingGlobal:function(){this.isMultiDrag=Rt=!1,et.length=0},destroyGlobal:function(){this._deselectMultiDrag(),le(document,"pointerup",this._deselectMultiDrag),le(document,"mouseup",this._deselectMultiDrag),le(document,"touchend",this._deselectMultiDrag),le(document,"keydown",this._checkKeyDown),le(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(o){if(!(typeof Rt<"u"&&Rt)&&ct===this.sortable&&!(o&&dt(o.target,this.options.draggable,this.sortable.el,!1))&&!(o&&o.button!==0))for(;re.length;){var l=re[0];Ie(l,this.options.selectedClass,!1),re.shift(),Ht({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:l})}},_checkKeyDown:function(o){o.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(o){o.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},lt(r,{pluginName:"multiDrag",utils:{select:function(o){var l=o.parentNode[Xe];!l||!l.options.multiDrag||~re.indexOf(o)||(ct&&ct!==l&&(ct.multiDrag._deselectMultiDrag(),ct=l),Ie(o,l.options.selectedClass,!0),re.push(o))},deselect:function(o){var l=o.parentNode[Xe],n=re.indexOf(o);!l||!l.options.multiDrag||!~n||(Ie(o,l.options.selectedClass,!1),re.splice(n,1))}},eventProperties:function(){var o=this,l=[],n=[];return re.forEach(function(s){l.push({multiDragElement:s,index:s.sortableIndex});var e;qe&&s!==ye?e=-1:qe?e=Fe(s,":not(."+o.options.selectedClass+")"):e=Fe(s),n.push({multiDragElement:s,index:e})}),{items:Nl(re),clones:[].concat(et),oldIndicies:l,newIndicies:n}},optionListeners:{multiDragKey:function(o){return o=o.toLowerCase(),o==="ctrl"?o="Control":o.length>1&&(o=o.charAt(0).toUpperCase()+o.substr(1)),o}}})}function vs(r,t){re.forEach(function(o,l){var n=t.children[o.sortableIndex+(r?Number(l):0)];n?t.insertBefore(o,n):t.appendChild(o)})}function ar(r,t){et.forEach(function(o,l){var n=t.children[o.sortableIndex+(r?Number(l):0)];n?t.insertBefore(o,n):t.appendChild(o)})}function sn(){re.forEach(function(r){r!==ye&&r.parentNode&&r.parentNode.removeChild(r)})}_.mount(new cs);_.mount(Jn,Yn);const ms=Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:ps,Sortable:_,Swap:ds,default:_},Symbol.toStringTag,{value:"Module"})),hs=dr(ms);var gs=dn.exports,ir;function ys(){return ir||(ir=1,(function(r,t){(function(l,n){r.exports=n(jl,hs)})(typeof self<"u"?self:gs,function(o,l){return(function(n){var s={};function e(a){if(s[a])return s[a].exports;var i=s[a]={i:a,l:!1,exports:{}};return n[a].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=n,e.c=s,e.d=function(a,i,u){e.o(a,i)||Object.defineProperty(a,i,{enumerable:!0,get:u})},e.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},e.t=function(a,i){if(i&1&&(a=e(a)),i&8||i&4&&typeof a=="object"&&a&&a.__esModule)return a;var u=Object.create(null);if(e.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:a}),i&2&&typeof a!="string")for(var c in a)e.d(u,c,(function(d){return a[d]}).bind(null,c));return u},e.n=function(a){var i=a&&a.__esModule?function(){return a.default}:function(){return a};return e.d(i,"a",i),i},e.o=function(a,i){return Object.prototype.hasOwnProperty.call(a,i)},e.p="",e(e.s="fb15")})({"00ee":(function(n,s,e){var a=e("b622"),i=a("toStringTag"),u={};u[i]="z",n.exports=String(u)==="[object z]"}),"0366":(function(n,s,e){var a=e("1c0b");n.exports=function(i,u,c){if(a(i),u===void 0)return i;switch(c){case 0:return function(){return i.call(u)};case 1:return function(d){return i.call(u,d)};case 2:return function(d,f){return i.call(u,d,f)};case 3:return function(d,f,p){return i.call(u,d,f,p)}}return function(){return i.apply(u,arguments)}}}),"057f":(function(n,s,e){var a=e("fc6a"),i=e("241c").f,u={}.toString,c=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],d=function(f){try{return i(f)}catch{return c.slice()}};n.exports.f=function(p){return c&&u.call(p)=="[object Window]"?d(p):i(a(p))}}),"06cf":(function(n,s,e){var a=e("83ab"),i=e("d1e7"),u=e("5c6c"),c=e("fc6a"),d=e("c04e"),f=e("5135"),p=e("0cfb"),m=Object.getOwnPropertyDescriptor;s.f=a?m:function(g,h){if(g=c(g),h=d(h,!0),p)try{return m(g,h)}catch{}if(f(g,h))return u(!i.f.call(g,h),g[h])}}),"0cfb":(function(n,s,e){var a=e("83ab"),i=e("d039"),u=e("cc12");n.exports=!a&&!i(function(){return Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a!=7})}),"13d5":(function(n,s,e){var a=e("23e7"),i=e("d58f").left,u=e("a640"),c=e("ae40"),d=u("reduce"),f=c("reduce",{1:0});a({target:"Array",proto:!0,forced:!d||!f},{reduce:function(m){return i(this,m,arguments.length,arguments.length>1?arguments[1]:void 0)}})}),"14c3":(function(n,s,e){var a=e("c6b6"),i=e("9263");n.exports=function(u,c){var d=u.exec;if(typeof d=="function"){var f=d.call(u,c);if(typeof f!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return f}if(a(u)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return i.call(u,c)}}),"159b":(function(n,s,e){var a=e("da84"),i=e("fdbc"),u=e("17c2"),c=e("9112");for(var d in i){var f=a[d],p=f&&f.prototype;if(p&&p.forEach!==u)try{c(p,"forEach",u)}catch{p.forEach=u}}}),"17c2":(function(n,s,e){var a=e("b727").forEach,i=e("a640"),u=e("ae40"),c=i("forEach"),d=u("forEach");n.exports=!c||!d?function(p){return a(this,p,arguments.length>1?arguments[1]:void 0)}:[].forEach}),"1be4":(function(n,s,e){var a=e("d066");n.exports=a("document","documentElement")}),"1c0b":(function(n,s){n.exports=function(e){if(typeof e!="function")throw TypeError(String(e)+" is not a function");return e}}),"1c7e":(function(n,s,e){var a=e("b622"),i=a("iterator"),u=!1;try{var c=0,d={next:function(){return{done:!!c++}},return:function(){u=!0}};d[i]=function(){return this},Array.from(d,function(){throw 2})}catch{}n.exports=function(f,p){if(!p&&!u)return!1;var m=!1;try{var v={};v[i]=function(){return{next:function(){return{done:m=!0}}}},f(v)}catch{}return m}}),"1d80":(function(n,s){n.exports=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e}}),"1dde":(function(n,s,e){var a=e("d039"),i=e("b622"),u=e("2d00"),c=i("species");n.exports=function(d){return u>=51||!a(function(){var f=[],p=f.constructor={};return p[c]=function(){return{foo:1}},f[d](Boolean).foo!==1})}}),"23cb":(function(n,s,e){var a=e("a691"),i=Math.max,u=Math.min;n.exports=function(c,d){var f=a(c);return f<0?i(f+d,0):u(f,d)}}),"23e7":(function(n,s,e){var a=e("da84"),i=e("06cf").f,u=e("9112"),c=e("6eeb"),d=e("ce4e"),f=e("e893"),p=e("94ca");n.exports=function(m,v){var g=m.target,h=m.global,y=m.stat,O,E,I,P,B,G;if(h?E=a:y?E=a[g]||d(g,{}):E=(a[g]||{}).prototype,E)for(I in v){if(B=v[I],m.noTargetGet?(G=i(E,I),P=G&&G.value):P=E[I],O=p(h?I:g+(y?".":"#")+I,m.forced),!O&&P!==void 0){if(typeof B==typeof P)continue;f(B,P)}(m.sham||P&&P.sham)&&u(B,"sham",!0),c(E,I,B,m)}}}),"241c":(function(n,s,e){var a=e("ca84"),i=e("7839"),u=i.concat("length","prototype");s.f=Object.getOwnPropertyNames||function(d){return a(d,u)}}),"25f0":(function(n,s,e){var a=e("6eeb"),i=e("825a"),u=e("d039"),c=e("ad6d"),d="toString",f=RegExp.prototype,p=f[d],m=u(function(){return p.call({source:"a",flags:"b"})!="/a/b"}),v=p.name!=d;(m||v)&&a(RegExp.prototype,d,function(){var h=i(this),y=String(h.source),O=h.flags,E=String(O===void 0&&h instanceof RegExp&&!("flags"in f)?c.call(h):O);return"/"+y+"/"+E},{unsafe:!0})}),"2ca0":(function(n,s,e){var a=e("23e7"),i=e("06cf").f,u=e("50c4"),c=e("5a34"),d=e("1d80"),f=e("ab13"),p=e("c430"),m="".startsWith,v=Math.min,g=f("startsWith"),h=!p&&!g&&!!(function(){var y=i(String.prototype,"startsWith");return y&&!y.writable})();a({target:"String",proto:!0,forced:!h&&!g},{startsWith:function(O){var E=String(d(this));c(O);var I=u(v(arguments.length>1?arguments[1]:void 0,E.length)),P=String(O);return m?m.call(E,P,I):E.slice(I,I+P.length)===P}})}),"2d00":(function(n,s,e){var a=e("da84"),i=e("342f"),u=a.process,c=u&&u.versions,d=c&&c.v8,f,p;d?(f=d.split("."),p=f[0]+f[1]):i&&(f=i.match(/Edge\/(\d+)/),(!f||f[1]>=74)&&(f=i.match(/Chrome\/(\d+)/),f&&(p=f[1]))),n.exports=p&&+p}),"342f":(function(n,s,e){var a=e("d066");n.exports=a("navigator","userAgent")||""}),"35a1":(function(n,s,e){var a=e("f5df"),i=e("3f8c"),u=e("b622"),c=u("iterator");n.exports=function(d){if(d!=null)return d[c]||d["@@iterator"]||i[a(d)]}}),"37e8":(function(n,s,e){var a=e("83ab"),i=e("9bf2"),u=e("825a"),c=e("df75");n.exports=a?Object.defineProperties:function(f,p){u(f);for(var m=c(p),v=m.length,g=0,h;v>g;)i.f(f,h=m[g++],p[h]);return f}}),"3bbe":(function(n,s,e){var a=e("861d");n.exports=function(i){if(!a(i)&&i!==null)throw TypeError("Can't set "+String(i)+" as a prototype");return i}}),"3ca3":(function(n,s,e){var a=e("6547").charAt,i=e("69f3"),u=e("7dd0"),c="String Iterator",d=i.set,f=i.getterFor(c);u(String,"String",function(p){d(this,{type:c,string:String(p),index:0})},function(){var m=f(this),v=m.string,g=m.index,h;return g>=v.length?{value:void 0,done:!0}:(h=a(v,g),m.index+=h.length,{value:h,done:!1})})}),"3f8c":(function(n,s){n.exports={}}),4160:(function(n,s,e){var a=e("23e7"),i=e("17c2");a({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})}),"428f":(function(n,s,e){var a=e("da84");n.exports=a}),"44ad":(function(n,s,e){var a=e("d039"),i=e("c6b6"),u="".split;n.exports=a(function(){return!Object("z").propertyIsEnumerable(0)})?function(c){return i(c)=="String"?u.call(c,""):Object(c)}:Object}),"44d2":(function(n,s,e){var a=e("b622"),i=e("7c73"),u=e("9bf2"),c=a("unscopables"),d=Array.prototype;d[c]==null&&u.f(d,c,{configurable:!0,value:i(null)}),n.exports=function(f){d[c][f]=!0}}),"44e7":(function(n,s,e){var a=e("861d"),i=e("c6b6"),u=e("b622"),c=u("match");n.exports=function(d){var f;return a(d)&&((f=d[c])!==void 0?!!f:i(d)=="RegExp")}}),4930:(function(n,s,e){var a=e("d039");n.exports=!!Object.getOwnPropertySymbols&&!a(function(){return!String(Symbol())})}),"4d64":(function(n,s,e){var a=e("fc6a"),i=e("50c4"),u=e("23cb"),c=function(d){return function(f,p,m){var v=a(f),g=i(v.length),h=u(m,g),y;if(d&&p!=p){for(;g>h;)if(y=v[h++],y!=y)return!0}else for(;g>h;h++)if((d||h in v)&&v[h]===p)return d||h||0;return!d&&-1}};n.exports={includes:c(!0),indexOf:c(!1)}}),"4de4":(function(n,s,e){var a=e("23e7"),i=e("b727").filter,u=e("1dde"),c=e("ae40"),d=u("filter"),f=c("filter");a({target:"Array",proto:!0,forced:!d||!f},{filter:function(m){return i(this,m,arguments.length>1?arguments[1]:void 0)}})}),"4df4":(function(n,s,e){var a=e("0366"),i=e("7b0b"),u=e("9bdd"),c=e("e95a"),d=e("50c4"),f=e("8418"),p=e("35a1");n.exports=function(v){var g=i(v),h=typeof this=="function"?this:Array,y=arguments.length,O=y>1?arguments[1]:void 0,E=O!==void 0,I=p(g),P=0,B,G,b,V,D,Z;if(E&&(O=a(O,y>2?arguments[2]:void 0,2)),I!=null&&!(h==Array&&c(I)))for(V=I.call(g),D=V.next,G=new h;!(b=D.call(V)).done;P++)Z=E?u(V,O,[b.value,P],!0):b.value,f(G,P,Z);else for(B=d(g.length),G=new h(B);B>P;P++)Z=E?O(g[P],P):g[P],f(G,P,Z);return G.length=P,G}}),"4fad":(function(n,s,e){var a=e("23e7"),i=e("6f53").entries;a({target:"Object",stat:!0},{entries:function(c){return i(c)}})}),"50c4":(function(n,s,e){var a=e("a691"),i=Math.min;n.exports=function(u){return u>0?i(a(u),9007199254740991):0}}),5135:(function(n,s){var e={}.hasOwnProperty;n.exports=function(a,i){return e.call(a,i)}}),5319:(function(n,s,e){var a=e("d784"),i=e("825a"),u=e("7b0b"),c=e("50c4"),d=e("a691"),f=e("1d80"),p=e("8aa5"),m=e("14c3"),v=Math.max,g=Math.min,h=Math.floor,y=/\$([$&'`]|\d\d?|<[^>]*>)/g,O=/\$([$&'`]|\d\d?)/g,E=function(I){return I===void 0?I:String(I)};a("replace",2,function(I,P,B,G){var b=G.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,V=G.REPLACE_KEEPS_$0,D=b?"$":"$0";return[function(M,k){var L=f(this),Y=M==null?void 0:M[I];return Y!==void 0?Y.call(M,L,k):P.call(String(L),M,k)},function($,M){if(!b&&V||typeof M=="string"&&M.indexOf(D)===-1){var k=B(P,$,this,M);if(k.done)return k.value}var L=i($),Y=String(this),ce=typeof M=="function";ce||(M=String(M));var me=L.global;if(me){var we=L.unicode;L.lastIndex=0}for(var Oe=[];;){var Ce=m(L,Y);if(Ce===null||(Oe.push(Ce),!me))break;var Ae=String(Ce[0]);Ae===""&&(L.lastIndex=p(Y,c(L.lastIndex),we))}for(var Ve="",De=0,he=0;he=De&&(Ve+=Y.slice(De,We)+Me,De=We+Se.length)}return Ve+Y.slice(De)}];function Z($,M,k,L,Y,ce){var me=k+$.length,we=L.length,Oe=O;return Y!==void 0&&(Y=u(Y),Oe=y),P.call(ce,Oe,function(Ce,Ae){var Ve;switch(Ae.charAt(0)){case"$":return"$";case"&":return $;case"`":return M.slice(0,k);case"'":return M.slice(me);case"<":Ve=Y[Ae.slice(1,-1)];break;default:var De=+Ae;if(De===0)return Ce;if(De>we){var he=h(De/10);return he===0?Ce:he<=we?L[he-1]===void 0?Ae.charAt(1):L[he-1]+Ae.charAt(1):Ce}Ve=L[De-1]}return Ve===void 0?"":Ve})}})}),5692:(function(n,s,e){var a=e("c430"),i=e("c6cd");(n.exports=function(u,c){return i[u]||(i[u]=c!==void 0?c:{})})("versions",[]).push({version:"3.6.5",mode:a?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),"56ef":(function(n,s,e){var a=e("d066"),i=e("241c"),u=e("7418"),c=e("825a");n.exports=a("Reflect","ownKeys")||function(f){var p=i.f(c(f)),m=u.f;return m?p.concat(m(f)):p}}),"5a34":(function(n,s,e){var a=e("44e7");n.exports=function(i){if(a(i))throw TypeError("The method doesn't accept regular expressions");return i}}),"5c6c":(function(n,s){n.exports=function(e,a){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:a}}}),"5db7":(function(n,s,e){var a=e("23e7"),i=e("a2bf"),u=e("7b0b"),c=e("50c4"),d=e("1c0b"),f=e("65f0");a({target:"Array",proto:!0},{flatMap:function(m){var v=u(this),g=c(v.length),h;return d(m),h=f(v,0),h.length=i(h,v,v,g,0,1,m,arguments.length>1?arguments[1]:void 0),h}})}),6547:(function(n,s,e){var a=e("a691"),i=e("1d80"),u=function(c){return function(d,f){var p=String(i(d)),m=a(f),v=p.length,g,h;return m<0||m>=v?c?"":void 0:(g=p.charCodeAt(m),g<55296||g>56319||m+1===v||(h=p.charCodeAt(m+1))<56320||h>57343?c?p.charAt(m):g:c?p.slice(m,m+2):(g-55296<<10)+(h-56320)+65536)}};n.exports={codeAt:u(!1),charAt:u(!0)}}),"65f0":(function(n,s,e){var a=e("861d"),i=e("e8b5"),u=e("b622"),c=u("species");n.exports=function(d,f){var p;return i(d)&&(p=d.constructor,typeof p=="function"&&(p===Array||i(p.prototype))?p=void 0:a(p)&&(p=p[c],p===null&&(p=void 0))),new(p===void 0?Array:p)(f===0?0:f)}}),"69f3":(function(n,s,e){var a=e("7f9a"),i=e("da84"),u=e("861d"),c=e("9112"),d=e("5135"),f=e("f772"),p=e("d012"),m=i.WeakMap,v,g,h,y=function(b){return h(b)?g(b):v(b,{})},O=function(b){return function(V){var D;if(!u(V)||(D=g(V)).type!==b)throw TypeError("Incompatible receiver, "+b+" required");return D}};if(a){var E=new m,I=E.get,P=E.has,B=E.set;v=function(b,V){return B.call(E,b,V),V},g=function(b){return I.call(E,b)||{}},h=function(b){return P.call(E,b)}}else{var G=f("state");p[G]=!0,v=function(b,V){return c(b,G,V),V},g=function(b){return d(b,G)?b[G]:{}},h=function(b){return d(b,G)}}n.exports={set:v,get:g,has:h,enforce:y,getterFor:O}}),"6eeb":(function(n,s,e){var a=e("da84"),i=e("9112"),u=e("5135"),c=e("ce4e"),d=e("8925"),f=e("69f3"),p=f.get,m=f.enforce,v=String(String).split("String");(n.exports=function(g,h,y,O){var E=O?!!O.unsafe:!1,I=O?!!O.enumerable:!1,P=O?!!O.noTargetGet:!1;if(typeof y=="function"&&(typeof h=="string"&&!u(y,"name")&&i(y,"name",h),m(y).source=v.join(typeof h=="string"?h:"")),g===a){I?g[h]=y:c(h,y);return}else E?!P&&g[h]&&(I=!0):delete g[h];I?g[h]=y:i(g,h,y)})(Function.prototype,"toString",function(){return typeof this=="function"&&p(this).source||d(this)})}),"6f53":(function(n,s,e){var a=e("83ab"),i=e("df75"),u=e("fc6a"),c=e("d1e7").f,d=function(f){return function(p){for(var m=u(p),v=i(m),g=v.length,h=0,y=[],O;g>h;)O=v[h++],(!a||c.call(m,O))&&y.push(f?[O,m[O]]:m[O]);return y}};n.exports={entries:d(!0),values:d(!1)}}),"73d9":(function(n,s,e){var a=e("44d2");a("flatMap")}),7418:(function(n,s){s.f=Object.getOwnPropertySymbols}),"746f":(function(n,s,e){var a=e("428f"),i=e("5135"),u=e("e538"),c=e("9bf2").f;n.exports=function(d){var f=a.Symbol||(a.Symbol={});i(f,d)||c(f,d,{value:u.f(d)})}}),7839:(function(n,s){n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),"7b0b":(function(n,s,e){var a=e("1d80");n.exports=function(i){return Object(a(i))}}),"7c73":(function(n,s,e){var a=e("825a"),i=e("37e8"),u=e("7839"),c=e("d012"),d=e("1be4"),f=e("cc12"),p=e("f772"),m=">",v="<",g="prototype",h="script",y=p("IE_PROTO"),O=function(){},E=function(b){return v+h+m+b+v+"/"+h+m},I=function(b){b.write(E("")),b.close();var V=b.parentWindow.Object;return b=null,V},P=function(){var b=f("iframe"),V="java"+h+":",D;return b.style.display="none",d.appendChild(b),b.src=String(V),D=b.contentWindow.document,D.open(),D.write(E("document.F=Object")),D.close(),D.F},B,G=function(){try{B=document.domain&&new ActiveXObject("htmlfile")}catch{}G=B?I(B):P();for(var b=u.length;b--;)delete G[g][u[b]];return G()};c[y]=!0,n.exports=Object.create||function(V,D){var Z;return V!==null?(O[g]=a(V),Z=new O,O[g]=null,Z[y]=V):Z=G(),D===void 0?Z:i(Z,D)}}),"7dd0":(function(n,s,e){var a=e("23e7"),i=e("9ed3"),u=e("e163"),c=e("d2bb"),d=e("d44e"),f=e("9112"),p=e("6eeb"),m=e("b622"),v=e("c430"),g=e("3f8c"),h=e("ae93"),y=h.IteratorPrototype,O=h.BUGGY_SAFARI_ITERATORS,E=m("iterator"),I="keys",P="values",B="entries",G=function(){return this};n.exports=function(b,V,D,Z,$,M,k){i(D,V,Z);var L=function(he){if(he===$&&Oe)return Oe;if(!O&&he in me)return me[he];switch(he){case I:return function(){return new D(this,he)};case P:return function(){return new D(this,he)};case B:return function(){return new D(this,he)}}return function(){return new D(this)}},Y=V+" Iterator",ce=!1,me=b.prototype,we=me[E]||me["@@iterator"]||$&&me[$],Oe=!O&&we||L($),Ce=V=="Array"&&me.entries||we,Ae,Ve,De;if(Ce&&(Ae=u(Ce.call(new b)),y!==Object.prototype&&Ae.next&&(!v&&u(Ae)!==y&&(c?c(Ae,y):typeof Ae[E]!="function"&&f(Ae,E,G)),d(Ae,Y,!0,!0),v&&(g[Y]=G))),$==P&&we&&we.name!==P&&(ce=!0,Oe=function(){return we.call(this)}),(!v||k)&&me[E]!==Oe&&f(me,E,Oe),g[V]=Oe,$)if(Ve={values:L(P),keys:M?Oe:L(I),entries:L(B)},k)for(De in Ve)(O||ce||!(De in me))&&p(me,De,Ve[De]);else a({target:V,proto:!0,forced:O||ce},Ve);return Ve}}),"7f9a":(function(n,s,e){var a=e("da84"),i=e("8925"),u=a.WeakMap;n.exports=typeof u=="function"&&/native code/.test(i(u))}),"825a":(function(n,s,e){var a=e("861d");n.exports=function(i){if(!a(i))throw TypeError(String(i)+" is not an object");return i}}),"83ab":(function(n,s,e){var a=e("d039");n.exports=!a(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})}),8418:(function(n,s,e){var a=e("c04e"),i=e("9bf2"),u=e("5c6c");n.exports=function(c,d,f){var p=a(d);p in c?i.f(c,p,u(0,f)):c[p]=f}}),"861d":(function(n,s){n.exports=function(e){return typeof e=="object"?e!==null:typeof e=="function"}}),8875:(function(n,s,e){var a,i,u;(function(c,d){i=[],a=d,u=typeof a=="function"?a.apply(s,i):a,u!==void 0&&(n.exports=u)})(typeof self<"u"?self:this,function(){function c(){var d=Object.getOwnPropertyDescriptor(document,"currentScript");if(!d&&"currentScript"in document&&document.currentScript||d&&d.get!==c&&document.currentScript)return document.currentScript;try{throw new Error}catch(B){var f=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,p=/@([^@]*):(\d+):(\d+)\s*$/ig,m=f.exec(B.stack)||p.exec(B.stack),v=m&&m[1]||!1,g=m&&m[2]||!1,h=document.location.href.replace(document.location.hash,""),y,O,E,I=document.getElementsByTagName("script");v===h&&(y=document.documentElement.outerHTML,O=new RegExp("(?:[^\\n]+?\\n){0,"+(g-2)+"}[^<]* diff --git a/resources/js/components/StructuredDataObject.vue b/resources/js/components/StructuredDataObject.vue index 450389c..55bd33b 100644 --- a/resources/js/components/StructuredDataObject.vue +++ b/resources/js/components/StructuredDataObject.vue @@ -20,71 +20,18 @@
-
-
- - -
- -
- - -
- -
- -
- -
-
- - -
- -
- -
- -
- -
- -
-
+
@@ -107,20 +54,24 @@