diff --git a/resources/dist/build/assets/StructuredDataFieldEditor-BKrOdERS.js b/resources/dist/build/assets/StructuredDataFieldEditor-C7js4TAQ.js similarity index 99% rename from resources/dist/build/assets/StructuredDataFieldEditor-BKrOdERS.js rename to resources/dist/build/assets/StructuredDataFieldEditor-C7js4TAQ.js index db23904..9712740 100644 --- a/resources/dist/build/assets/StructuredDataFieldEditor-BKrOdERS.js +++ b/resources/dist/build/assets/StructuredDataFieldEditor-C7js4TAQ.js @@ -1 +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-BYx9Vy5k.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}; +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-DPSSUs1M.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-BYx9Vy5k.js b/resources/dist/build/assets/statamic-structured-data-BYx9Vy5k.js deleted file mode 100644 index a1d96a7..0000000 --- a/resources/dist/build/assets/statamic-structured-data-BYx9Vy5k.js +++ /dev/null @@ -1,36 +0,0 @@ -var Ka=Object.defineProperty;var Ya=(n,t,e)=>t in n?Ka(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var at=(n,t,e)=>Ya(n,typeof t!="symbol"?t+"":t,e);const Ga="modulepreload",Xa=function(n){return"/build/"+n},vo={},$s=function(t,e,i){let o=Promise.resolve();if(e&&e.length>0){let r=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=r(e.map(c=>{if(c=Xa(c),c in vo)return;vo[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":Ga,u||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((h,g)=>{f.addEventListener("load",h),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(r){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=r,window.dispatchEvent(a),!a.defaultPrevented)throw r}return o.then(r=>{for(const a of r||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},Bs=window.Vue,{BaseTransition:Ja,BaseTransitionPropsValidators:Za,Comment:Qa,DeprecationTypes:qa,EffectScope:tl,ErrorCodes:el,ErrorTypeStrings:nl,Fragment:ye,KeepAlive:il,ReactiveEffect:rl,Static:ol,Suspense:sl,Teleport:al,Text:ll,TrackOpTypes:cl,Transition:ul,TransitionGroup:dl,TriggerOpTypes:fl,VueElement:hl,__esModule:gl,assertNumber:pl,callWithAsyncErrorHandling:ml,callWithErrorHandling:vl,camelize:yl,capitalize:bl,cloneVNode:xl,compatUtils:Sl,compile:Ol,computed:Tt,createApp:El,createBlock:jt,createCommentVNode:Ht,createElementBlock:nt,createElementVNode:I,createHydrationRenderer:wl,createPropsRestProxy:Cl,createRenderer:Pl,createSSRApp:Tl,createSlots:Dl,createStaticVNode:Al,createTextVNode:vt,createVNode:R,customRef:Ml,defineAsyncComponent:Zr,defineComponent:Qr,defineCustomElement:Il,defineEmits:Rl,defineExpose:Fl,defineModel:Ll,defineOptions:kl,defineProps:jl,defineSSRCustomElement:_l,defineSlots:Nl,devtools:$l,effect:Bl,effectScope:zl,getCurrentInstance:zs,getCurrentScope:Vl,getCurrentWatcher:Hl,getTransitionRawChildren:Wl,guardReactiveProps:Ul,h:Hi,handleError:Kl,hasInjectionContext:Yl,hydrate:Gl,hydrateOnIdle:Xl,hydrateOnInteraction:Jl,hydrateOnMediaQuery:Zl,hydrateOnVisible:Ql,initCustomFormatter:ql,initDirectivesForSSR:tc,inject:ec,isMemoSame:nc,isProxy:qr,isReactive:ic,isReadonly:rc,isRef:oc,isRuntimeOnly:sc,isShallow:ac,isVNode:lc,markRaw:cc,mergeDefaults:uc,mergeModels:dc,mergeProps:fc,nextTick:Vs,nodeOps:hc,normalizeClass:_r,normalizeProps:gc,normalizeStyle:Hs,onActivated:pc,onBeforeMount:mc,onBeforeUnmount:vc,onBeforeUpdate:yc,onDeactivated:bc,onErrorCaptured:xc,onMounted:Ws,onRenderTracked:Sc,onRenderTriggered:Oc,onScopeDispose:Ec,onServerPrefetch:wc,onUnmounted:Us,onUpdated:Cc,onWatcherCleanup:Pc,openBlock:Y,patchProp:Tc,popScopeId:Dc,provide:Ac,proxyRefs:Mc,pushScopeId:Ic,queuePostFlushCb:Rc,reactive:Nr,readonly:Fc,ref:yt,registerRuntimeCompiler:Lc,render:kc,renderList:be,renderSlot:jc,resolveComponent:zn,resolveDirective:_c,resolveDynamicComponent:Nc,resolveFilter:$c,resolveTransitionHooks:Bc,setBlockTracking:zc,setDevtoolsHook:Vc,setTransitionHooks:Hc,shallowReactive:Wc,shallowReadonly:Uc,shallowRef:Wi,ssrContextKey:Kc,ssrUtils:Yc,stop:Gc,toDisplayString:W,toHandlerKey:Xc,toHandlers:Jc,toRaw:Ui,toRef:Zc,toRefs:Qc,toValue:qc,transformVNodeArgs:tu,triggerRef:eu,unref:A,useAttrs:nu,useCssModule:iu,useCssVars:ru,useHost:ou,useId:su,useModel:au,useSSRContext:lu,useShadowRoot:cu,useSlots:uu,useTemplateRef:du,useTransitionState:fu,vModelCheckbox:hu,vModelDynamic:gu,vModelRadio:pu,vModelSelect:mu,vModelText:vu,vShow:dn,version:Ks,warn:yu,watch:Ze,watchEffect:bu,watchPostEffect:xu,watchSyncEffect:Su,withAsyncContext:Ou,withCtx:K,withDefaults:Eu,withDirectives:fn,withKeys:wu,withMemo:Cu,withModifiers:Fi,withScopeId:Pu}=Bs,Tu=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Ja,BaseTransitionPropsValidators:Za,Comment:Qa,DeprecationTypes:qa,EffectScope:tl,ErrorCodes:el,ErrorTypeStrings:nl,Fragment:ye,KeepAlive:il,ReactiveEffect:rl,Static:ol,Suspense:sl,Teleport:al,Text:ll,TrackOpTypes:cl,Transition:ul,TransitionGroup:dl,TriggerOpTypes:fl,VueElement:hl,__esModule:gl,assertNumber:pl,callWithAsyncErrorHandling:ml,callWithErrorHandling:vl,camelize:yl,capitalize:bl,cloneVNode:xl,compatUtils:Sl,compile:Ol,computed:Tt,createApp:El,createBlock:jt,createCommentVNode:Ht,createElementBlock:nt,createElementVNode:I,createHydrationRenderer:wl,createPropsRestProxy:Cl,createRenderer:Pl,createSSRApp:Tl,createSlots:Dl,createStaticVNode:Al,createTextVNode:vt,createVNode:R,customRef:Ml,default:Bs,defineAsyncComponent:Zr,defineComponent:Qr,defineCustomElement:Il,defineEmits:Rl,defineExpose:Fl,defineModel:Ll,defineOptions:kl,defineProps:jl,defineSSRCustomElement:_l,defineSlots:Nl,devtools:$l,effect:Bl,effectScope:zl,getCurrentInstance:zs,getCurrentScope:Vl,getCurrentWatcher:Hl,getTransitionRawChildren:Wl,guardReactiveProps:Ul,h:Hi,handleError:Kl,hasInjectionContext:Yl,hydrate:Gl,hydrateOnIdle:Xl,hydrateOnInteraction:Jl,hydrateOnMediaQuery:Zl,hydrateOnVisible:Ql,initCustomFormatter:ql,initDirectivesForSSR:tc,inject:ec,isMemoSame:nc,isProxy:qr,isReactive:ic,isReadonly:rc,isRef:oc,isRuntimeOnly:sc,isShallow:ac,isVNode:lc,markRaw:cc,mergeDefaults:uc,mergeModels:dc,mergeProps:fc,nextTick:Vs,nodeOps:hc,normalizeClass:_r,normalizeProps:gc,normalizeStyle:Hs,onActivated:pc,onBeforeMount:mc,onBeforeUnmount:vc,onBeforeUpdate:yc,onDeactivated:bc,onErrorCaptured:xc,onMounted:Ws,onRenderTracked:Sc,onRenderTriggered:Oc,onScopeDispose:Ec,onServerPrefetch:wc,onUnmounted:Us,onUpdated:Cc,onWatcherCleanup:Pc,openBlock:Y,patchProp:Tc,popScopeId:Dc,provide:Ac,proxyRefs:Mc,pushScopeId:Ic,queuePostFlushCb:Rc,reactive:Nr,readonly:Fc,ref:yt,registerRuntimeCompiler:Lc,render:kc,renderList:be,renderSlot:jc,resolveComponent:zn,resolveDirective:_c,resolveDynamicComponent:Nc,resolveFilter:$c,resolveTransitionHooks:Bc,setBlockTracking:zc,setDevtoolsHook:Vc,setTransitionHooks:Hc,shallowReactive:Wc,shallowReadonly:Uc,shallowRef:Wi,ssrContextKey:Kc,ssrUtils:Yc,stop:Gc,toDisplayString:W,toHandlerKey:Xc,toHandlers:Jc,toRaw:Ui,toRef:Zc,toRefs:Qc,toValue:qc,transformVNodeArgs:tu,triggerRef:eu,unref:A,useAttrs:nu,useCssModule:iu,useCssVars:ru,useHost:ou,useId:su,useModel:au,useSSRContext:lu,useShadowRoot:cu,useSlots:uu,useTemplateRef:du,useTransitionState:fu,vModelCheckbox:hu,vModelDynamic:gu,vModelRadio:pu,vModelSelect:mu,vModelText:vu,vShow:dn,version:Ks,warn:yu,watch:Ze,watchEffect:bu,watchPostEffect:xu,watchSyncEffect:Su,withAsyncContext:Ou,withCtx:K,withDefaults:Eu,withDirectives:fn,withKeys:wu,withMemo:Cu,withModifiers:Fi,withScopeId:Pu},Symbol.toStringTag,{value:"Module"})),{Fieldtype:xe,IndexFieldtype:uv,FieldtypeMixin:dv,HasActionsMixin:fv,HasInputOptionsMixin:hv,HasPreferencesMixin:gv,IndexFieldtypeMixin:pv,InlineEditForm:mv,DateFormatter:vv,NumberFormatter:yv,ItemActions:bv,RelatedItem:xv,RestoreRevision:Sv,RevisionHistory:Ov,RevisionPreview:Ev,SaveButtonOptions:wv,SortableList:Cv,requireElevatedSession:Pv,requireElevatedSessionIf:Tv,clone:Dv,debounce:Av,deepClone:Mv,resetValuesFromResponse:Iv}=__STATAMIC__.core,{Alert:Rv,AuthCard:Fv,Avatar:Lv,Badge:Ce,Button:Et,ButtonGroup:kv,Calendar:jv,Card:se,CardList:_v,CardListItem:Nv,CardPanel:$v,CharacterCounter:Bv,Checkbox:zv,CheckboxGroup:Vv,CodeEditor:Hv,Combobox:Wv,CommandPaletteItem:Uv,ConfirmationModal:pr,Context:Kv,ContextFooter:Yv,ContextHeader:Gv,ContextItem:Xv,ContextLabel:Jv,ContextMenu:Zv,ContextSeparator:Qv,CreateForm:qv,DatePicker:ty,DateRangePicker:ey,Description:oe,DocsCallout:ny,DragHandle:Du,Dropdown:iy,DropdownItem:ry,DropdownLabel:oy,DropdownMenu:sy,DropdownSeparator:ay,DropdownFooter:ly,DropdownHeader:cy,Editable:uy,ErrorMessage:dy,EmptyStateItem:fy,EmptyStateMenu:hy,Field:gy,Header:Ys,Heading:Tn,HoverCard:py,Icon:yo,Input:mr,InputGroup:my,InputGroupAppend:vy,InputGroupPrepend:yy,Label:hn,Listing:by,ListingCustomizeColumns:xy,ListingFilters:Sy,ListingHeaderCell:Oy,ListingPagination:Ey,ListingPresets:wy,ListingPresetTrigger:Cy,ListingRowActions:Py,ListingSearch:Ty,ListingTable:Dy,ListingTableBody:Ay,ListingTableHead:My,ListingToggleAll:Iy,LivePreview:Ry,LivePreviewPopout:Fy,MiddleEllipsis:Ly,Modal:ky,ModalClose:jy,ModalTitle:_y,Pagination:Ny,Panel:bo,PanelFooter:$y,PanelHeader:xo,Popover:By,PublishComponents:zy,PublishContainer:Vy,publishContextKey:Hy,injectPublishContext:Au,PublishField:Wy,PublishFields:Uy,PublishFieldsProvider:Ky,PublishForm:Yy,PublishLocalizations:Gy,PublishSections:Xy,PublishTabs:Jy,Radio:Zy,RadioGroup:Qy,Select:qy,Separator:Mu,Slider:tb,Skeleton:eb,SplitterGroup:nb,SplitterPanel:ib,SplitterResizeHandle:rb,StatusIndicator:ob,Subheading:sb,Switch:ab,TabContent:lb,Stack:Iu,StackClose:cb,StackHeader:ub,StackFooter:db,StackContent:fb,Table:hb,TableCell:gb,TableColumn:pb,TableColumns:mb,TableRow:vb,TableRows:yb,TabList:Ru,TabProvider:bb,Tabs:Fu,TabTrigger:So,Text:Jt,Textarea:xb,TimePicker:Sb,TimezoneHoverCard:Ob,Timezones:Eb,ToggleGroup:wb,ToggleItem:Cb,Widget:Pb,registerIconSet:Tb,registerIconSetFromStrings:Db}=__STATAMIC__.ui,Gs=(n,t)=>{const e=n.__vccOpts||n;for(const[i,o]of t)e[i]=o;return e},Lu={name:"PresetStack",components:{Badge:Ce,Button:Et,Card:se,Stack:Iu},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(n){n||this.close()}}},methods:{close(){this.selectedPreset=null,this.$emit("close")},selectPreset(n){this.selectedPreset=n},goBack(){this.selectedPreset=null},handleAction(n){this.$emit("preset-selected",{preset:this.selectedPreset,action:n}),this.close()}}},ku={class:"max-h-[60vh] flex flex-col gap-4"},ju={key:0,class:"preset-selection space-y-4"},_u={class:"text-sm"},Nu={class:"grid grid-cols-1 gap-3"},$u={class:"flex justify-between items-start gap-3"},Bu={class:"flex-1"},zu={class:"font-semibold text-sm"},Vu={class:"text-xs mt-1"},Hu={class:"mt-2"},Wu={class:"text-[11px] mb-1"},Uu={class:"flex flex-wrap gap-1"},Ku={class:"py-1 px-2"},Yu={class:"py-1 px-2"},Gu={class:"py-1 px-2"},Xu={key:1,class:"preset-actions space-y-4"},Ju={class:"font-semibold"},Zu={class:"text-sm mt-1"},Qu={key:0,class:"action-selection space-y-3"},qu={class:"text-sm"},td={class:"flex flex-col gap-1"},ed={class:"font-semibold"},nd={class:"text-sm"},id={class:"flex flex-col gap-1"},rd={class:"font-semibold"},od={class:"text-sm"},sd={key:1,class:"no-existing-schemas space-y-3"},ad={class:"text-sm"},ld={class:"flex justify-end gap-2"};function cd(n,t,e,i,o,s){const r=zn("Badge"),a=zn("Card"),l=zn("Button"),c=zn("Stack");return Y(),jt(c,{open:s.isOpen,"onUpdate:open":t[3]||(t[3]=u=>s.isOpen=u),title:n.__("Add Preset")},{footer:K(()=>[I("div",ld,[o.selectedPreset?(Y(),jt(l,{key:0,variant:"ghost",size:"sm",onClick:s.goBack},{default:K(()=>[vt(W(n.__("Back")),1)]),_:1},8,["onClick"])):Ht("",!0),R(l,{variant:"subtle",size:"sm",onClick:s.close},{default:K(()=>[vt(W(n.__("Cancel")),1)]),_:1},8,["onClick"])])]),default:K(()=>[I("div",ku,[o.selectedPreset?(Y(),nt("div",Xu,[R(a,null,{default:K(()=>[I("h4",Ju,W(o.selectedPreset.name),1),I("p",Zu,W(o.selectedPreset.description),1)]),_:1}),e.hasExistingSchemas?(Y(),nt("div",Qu,[I("p",qu,W(n.__("You have existing schemas. How would you like to add this preset?")),1),R(a,{class:"cursor-pointer",onClick:t[0]||(t[0]=u=>s.handleAction("merge"))},{default:K(()=>[I("div",td,[I("div",ed,W(n.__("Merge (Recommended)")),1),I("div",nd,W(n.__("Add this preset as an additional schema alongside your existing ones")),1)])]),_:1}),R(a,{class:"cursor-pointer",onClick:t[1]||(t[1]=u=>s.handleAction("override"))},{default:K(()=>[I("div",id,[I("div",rd,W(n.__("Override")),1),I("div",od,W(n.__("Replace all existing schemas with this preset")),1)])]),_:1})])):(Y(),nt("div",sd,[I("p",ad,W(n.__("This preset will be added as your first schema.")),1),R(l,{class:"w-full",onClick:t[2]||(t[2]=u=>s.handleAction("add"))},{default:K(()=>[vt(W(n.__("Add Preset")),1)]),_:1})]))])):(Y(),nt("div",ju,[I("p",_u,W(n.__("Choose a preset to add to your schema:")),1),I("div",Nu,[(Y(!0),nt(ye,null,be(e.presets,u=>(Y(),jt(a,{key:u.name,class:"cursor-pointer",onClick:d=>s.selectPreset(u)},{default:K(()=>[I("div",$u,[I("div",Bu,[I("h4",zu,W(u.name),1),I("p",Vu,W(u.description),1),I("div",Hu,[I("div",Wu,W(n.__("Fields:")),1),I("div",Uu,[(Y(!0),nt(ye,null,be(u.schema.fields.slice(0,3),d=>(Y(),jt(r,{key:d.key,size:"xs",pill:""},{default:K(()=>[I("span",Ku,W(d.key),1)]),_:2},1024))),128)),u.schema.fields.length>3?(Y(),jt(r,{key:0,size:"xs",pill:""},{default:K(()=>[I("span",Yu," +"+W(u.schema.fields.length-3),1)]),_:2},1024)):Ht("",!0)])])]),R(r,{size:"xs",pill:""},{default:K(()=>[I("span",Gu,W(u.schema.specialProps.type),1)]),_:2},1024)])]),_:2},1032,["onClick"]))),128))])]))])]),_:1},8,["open","title"])}const ud=Gs(Lu,[["render",cd]]);function Ki(n){const t={};if(n.specialProps&&(n.specialProps.context&&(t["@context"]=n.specialProps.context),n.specialProps.type&&(t["@type"]=n.specialProps.type),n.specialProps.id&&(t["@id"]=n.specialProps.id)),n.fields&&Array.isArray(n.fields)){for(const e of n.fields)if(e.key)if(e.type==="array"&&e.values)t[e.key]=e.values;else if(e.type==="object"&&e.value)t[e.key]=Ki(e.value);else if(e.type==="object_array"&&e.values)t[e.key]=e.values.map(i=>Ki(i));else if(e.type==="replicator_object_array"&&e.config){const i=e.config||{};if(i.flat===!0&&i.flat_key_field&&i.flat_value_field){const o=`{{ ${i.flat_key_field} }}`,s=`{{ ${i.flat_value_field} }}`;t[e.key]=[{[o]:s}]}else{const o={};(Array.isArray(i.mappings)?i.mappings:[]).forEach(r=>{r.key&&(r.mode==="static"?o[r.key]=r.static??"":r.mode==="field"?o[r.key]=`{{ ${r.field||"field"} }}`:r.mode==="nested_replicator"?o[r.key]=[{}]:o[r.key]="")}),t[e.key]=[o]}}else t[e.key]=e.value??null}return t}function Xs(n,t=2){try{if(Array.isArray(n)){const i=n.map(o=>Ki(o));return JSON.stringify(i,null,t)}const e=Ki(n);return JSON.stringify(e,null,t)}catch{return JSON.stringify(n,null,t)}}const dd=/[^a-zA-Z0-9@:-]/g,fd=n=>typeof n!="string"?"":n.replace(dd,""),Js=n=>{!n||typeof n!="object"||(n.key=fd(n.key))},Zs=(n,{objectArrayType:t}={})=>{if(!(!n||typeof n!="object")){if(Array.isArray(n.values)||(n.values=[]),t&&n.type===t){n.values.push({specialProps:{type:"",id:""},fields:[]});return}n.values.push("")}},Qs=(n,t)=>{!n||typeof n!="object"||!Array.isArray(n.values)||n.values.splice(t,1)},qs=(n,{objectType:t="object",arrayType:e="array",objectArrayType:i,dataObjectType:o,replicatorObjectArrayType:s="replicator_object_array"}={})=>{if(!(!n||typeof n!="object")){if(n.type===t){n.value={specialProps:{type:"",id:""},fields:[]};return}if(n.type===e){n.values=[];return}if(i&&n.type===i){n.values=[];return}if(o&&n.type===o){n.value="";return}if(n.type===s){n.config={replicator_field:"",set:"",mappings:[]},n.values=[];return}n.value=""}};function hd(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function ta(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var t=n.default;if(typeof t=="function"){var e=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var o=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:function(){return n[i]}})}),e}var Li={exports:{}};const gd=ta(Tu);/**! - * Sortable 1.14.0 - * @author RubaXa - * @author owenm - * @license MIT - */function Oo(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,i)}return e}function Le(n){for(var t=1;t=0)&&(e[o]=n[o]);return e}function vd(n,t){if(n==null)return{};var e=md(n,t),i,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(e[i]=n[i])}return e}function yd(n){return bd(n)||xd(n)||Sd(n)||Od()}function bd(n){if(Array.isArray(n))return $r(n)}function xd(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function Sd(n,t){if(n){if(typeof n=="string")return $r(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return $r(n,t)}}function $r(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e"&&(t=t.substring(1)),n)try{if(n.matches)return n.matches(t);if(n.msMatchesSelector)return n.msMatchesSelector(t);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(t)}catch{return!1}return!1}}function Cd(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function Pe(n,t,e,i){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&Yi(n,t):Yi(n,t))||i&&n===e)return n;if(n===e)break}while(n=Cd(n))}return null}var wo=/\s+/g;function It(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var i=(" "+n.className+" ").replace(wo," ").replace(" "+t+" "," ");n.className=(i+(e?" "+t:"")).replace(wo," ")}}function X(n,t,e){var i=n&&n.style;if(i){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(e=n.currentStyle),t===void 0?e:e[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=e+(typeof e=="string"?"":"px")}}function pn(n,t){var e="";if(typeof n=="string")e=n;else do{var i=X(n,"transform");i&&i!=="none"&&(e=i+" "+e)}while(!t&&(n=n.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(e)}function ia(n,t,e){if(n){var i=n.getElementsByTagName(t),o=0,s=i.length;if(e)for(;o=s,!r)return i;if(i===Fe())break;i=Ye(i,!1)}return!1}function Dn(n,t,e,i){for(var o=0,s=0,r=n.children;s2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,s=vd(i,Rd);di.pluginEvent.bind(q)(t,e,Le({dragEl:V,parentEl:Ft,ghostEl:ot,rootEl:At,nextEl:cn,lastDownEl:ji,cloneEl:Lt,cloneHidden:Ke,dragStarted:Hn,putSortable:Yt,activeSortable:q.active,originalEvent:o,oldIndex:Pn,oldDraggableIndex:qn,newIndex:de,newDraggableIndex:Ue,hideGhostForTarget:ca,unhideGhostForTarget:ua,cloneNowHidden:function(){Ke=!0},cloneNowShown:function(){Ke=!1},dispatchSortableEvent:function(a){te({sortable:e,name:a,originalEvent:o})}},s))};function te(n){Vn(Le({putSortable:Yt,cloneEl:Lt,targetEl:V,rootEl:At,oldIndex:Pn,oldDraggableIndex:qn,newIndex:de,newDraggableIndex:Ue},n))}var V,Ft,ot,At,cn,ji,Lt,Ke,Pn,de,qn,Ue,gi,Yt,Cn=!1,Gi=!1,Xi=[],rn,Ee,xr,Sr,Do,Ao,Hn,xn,ti,ei=!1,pi=!1,_i,Xt,Or=[],Br=!1,Ji=[],lr=typeof document<"u",mi=ea,Mo=ui||Ve?"cssFloat":"float",Fd=lr&&!wd&&!ea&&"draggable"in document.createElement("div"),sa=(function(){if(lr){if(Ve)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}})(),aa=function(t,e){var i=X(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),s=Dn(t,0,e),r=Dn(t,1,e),a=s&&X(s),l=r&&X(r),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Mt(s).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Mt(r).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&a.float&&a.float!=="none"){var d=a.float==="left"?"left":"right";return r&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return s&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||c>=o&&i[Mo]==="none"||r&&i[Mo]==="none"&&c+u>o)?"vertical":"horizontal"},Ld=function(t,e,i){var o=i?t.left:t.top,s=i?t.right:t.bottom,r=i?t.width:t.height,a=i?e.left:e.top,l=i?e.right:e.bottom,c=i?e.width:e.height;return o===a||s===l||o+r/2===a+c/2},kd=function(t,e){var i;return Xi.some(function(o){var s=o[Zt].options.emptyInsertThreshold;if(!(!s||to(o))){var r=Mt(o),a=t>=r.left-s&&t<=r.right+s,l=e>=r.top-s&&e<=r.bottom+s;if(a&&l)return i=o}}),i},la=function(t){function e(s,r){return function(a,l,c,u){var d=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(s==null&&(r||d))return!0;if(s==null||s===!1)return!1;if(r&&s==="clone")return s;if(typeof s=="function")return e(s(a,l,c,u),r)(a,l,c,u);var f=(r?a:l).options.group.name;return s===!0||typeof s=="string"&&s===f||s.join&&s.indexOf(f)>-1}}var i={},o=t.group;(!o||ki(o)!="object")&&(o={name:o}),i.name=o.name,i.checkPull=e(o.pull,!0),i.checkPut=e(o.put),i.revertClone=o.revertClone,t.group=i},ca=function(){!sa&&ot&&X(ot,"display","none")},ua=function(){!sa&&ot&&X(ot,"display","")};lr&&document.addEventListener("click",function(n){if(Gi)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),Gi=!1,!1},!0);var on=function(t){if(V){t=t.touches?t.touches[0]:t;var e=kd(t.clientX,t.clientY);if(e){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Zt]._onDragOver(i)}}},jd=function(t){V&&V.parentNode[Zt]._isOutsideThisEl(t.target)};function q(n,t){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=t=Se({},t),n[Zt]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return aa(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,a){r.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:q.supportPointer!==!1&&"PointerEvent"in window&&!Zn,emptyInsertThreshold:5};di.initializePlugins(this,n,e);for(var i in e)!(i in t)&&(t[i]=e[i]);la(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:Fd,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?ct(n,"pointerdown",this._onTapStart):(ct(n,"mousedown",this._onTapStart),ct(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(ct(n,"dragover",this),ct(n,"dragenter",this)),Xi.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Se(this,Ad())}q.prototype={constructor:q,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(xn=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,V):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,o=this.options,s=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,u=o.filter;if(Wd(i),!V&&!(/mousedown|pointerdown/.test(r)&&t.button!==0||o.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Zn&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=Pe(l,o.draggable,i,!1),!(l&&l.animated)&&ji!==l)){if(Pn=kt(l),qn=kt(l,o.draggable),typeof u=="function"){if(u.call(this,t,l,this)){te({sortable:e,rootEl:c,name:"filter",targetEl:l,toEl:i,fromEl:i}),ne("filter",e,{evt:t}),s&&t.cancelable&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(d){if(d=Pe(c,d.trim(),i,!1),d)return te({sortable:e,rootEl:d,name:"filter",targetEl:l,fromEl:i,toEl:i}),ne("filter",e,{evt:t}),!0}),u)){s&&t.cancelable&&t.preventDefault();return}o.handle&&!Pe(c,o.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,i){var o=this,s=o.el,r=o.options,a=s.ownerDocument,l;if(i&&!V&&i.parentNode===s){var c=Mt(i);if(At=s,V=i,Ft=V.parentNode,cn=V.nextSibling,ji=i,gi=r.group,q.dragged=V,rn={target:V,clientX:(e||t).clientX,clientY:(e||t).clientY},Do=rn.clientX-c.left,Ao=rn.clientY-c.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,V.style["will-change"]="all",l=function(){if(ne("delayEnded",o,{evt:t}),q.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Eo&&o.nativeDraggable&&(V.draggable=!0),o._triggerDragStart(t,e),te({sortable:o,name:"choose",originalEvent:t}),It(V,r.chosenClass,!0)},r.ignore.split(",").forEach(function(u){ia(V,u.trim(),Er)}),ct(a,"dragover",on),ct(a,"mousemove",on),ct(a,"touchmove",on),ct(a,"mouseup",o._onDrop),ct(a,"touchend",o._onDrop),ct(a,"touchcancel",o._onDrop),Eo&&this.nativeDraggable&&(this.options.touchStartThreshold=4,V.draggable=!0),ne("delayStart",this,{evt:t}),r.delay&&(!r.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(ui||Ve))){if(q.eventCanceled){this._onDrop();return}ct(a,"mouseup",o._disableDelayedDrag),ct(a,"touchend",o._disableDelayedDrag),ct(a,"touchcancel",o._disableDelayedDrag),ct(a,"mousemove",o._delayedDragTouchMoveHandler),ct(a,"touchmove",o._delayedDragTouchMoveHandler),r.supportPointer&&ct(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,r.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){V&&Er(V),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;lt(t,"mouseup",this._disableDelayedDrag),lt(t,"touchend",this._disableDelayedDrag),lt(t,"touchcancel",this._disableDelayedDrag),lt(t,"mousemove",this._delayedDragTouchMoveHandler),lt(t,"touchmove",this._delayedDragTouchMoveHandler),lt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?ct(document,"pointermove",this._onTouchMove):e?ct(document,"touchmove",this._onTouchMove):ct(document,"mousemove",this._onTouchMove):(ct(V,"dragend",this),ct(At,"dragstart",this._onDragStart));try{document.selection?Ni(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Cn=!1,At&&V){ne("dragStarted",this,{evt:e}),this.nativeDraggable&&ct(document,"dragover",jd);var i=this.options;!t&&It(V,i.dragClass,!1),It(V,i.ghostClass,!0),q.active=this,t&&this._appendGhost(),te({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ee){this._lastX=Ee.clientX,this._lastY=Ee.clientY,ca();for(var t=document.elementFromPoint(Ee.clientX,Ee.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ee.clientX,Ee.clientY),t!==e);)e=t;if(V.parentNode[Zt]._isOutsideThisEl(t),e)do{if(e[Zt]){var i=void 0;if(i=e[Zt]._onDragOver({clientX:Ee.clientX,clientY:Ee.clientY,target:t,rootEl:e}),i&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);ua()}},_onTouchMove:function(t){if(rn){var e=this.options,i=e.fallbackTolerance,o=e.fallbackOffset,s=t.touches?t.touches[0]:t,r=ot&&pn(ot,!0),a=ot&&r&&r.a,l=ot&&r&&r.d,c=mi&&Xt&&Po(Xt),u=(s.clientX-rn.clientX+o.x)/(a||1)+(c?c[0]-Or[0]:0)/(a||1),d=(s.clientY-rn.clientY+o.y)/(l||1)+(c?c[1]-Or[1]:0)/(l||1);if(!q.active&&!Cn){if(i&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))=0&&(te({rootEl:Ft,name:"add",toEl:Ft,fromEl:At,originalEvent:t}),te({sortable:this,name:"remove",toEl:Ft,originalEvent:t}),te({rootEl:Ft,name:"sort",toEl:Ft,fromEl:At,originalEvent:t}),te({sortable:this,name:"sort",toEl:Ft,originalEvent:t})),Yt&&Yt.save()):de!==Pn&&de>=0&&(te({sortable:this,name:"update",toEl:Ft,originalEvent:t}),te({sortable:this,name:"sort",toEl:Ft,originalEvent:t})),q.active&&((de==null||de===-1)&&(de=Pn,Ue=qn),te({sortable:this,name:"end",toEl:Ft,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){ne("nulling",this),At=V=Ft=ot=cn=Lt=ji=Ke=rn=Ee=Hn=de=Ue=Pn=qn=xn=ti=Yt=gi=q.dragged=q.ghost=q.clone=q.active=null,Ji.forEach(function(t){t.checked=!0}),Ji.length=xr=Sr=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":V&&(this._onDragOver(t),_d(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,i=this.el.children,o=0,s=i.length,r=this.options;oi.right+o||n.clientX<=i.right&&n.clientY>i.bottom&&n.clientX>=i.left:n.clientX>i.right&&n.clientY>i.top||n.clientX<=i.right&&n.clientY>i.bottom+o}function zd(n,t,e,i,o,s,r,a){var l=i?n.clientY:n.clientX,c=i?e.height:e.width,u=i?e.top:e.left,d=i?e.bottom:e.right,f=!1;if(!r){if(a&&_iu+c*s/2:ld-_i)return-ti}else if(l>u+c*(1-o)/2&&ld-c*s/2)?l>u+c/2?1:-1:0}function Vd(n){return kt(V)1&&(it.forEach(function(a){s.addAnimationState({target:a,rect:ie?Mt(a):r}),yr(a),a.fromRect=r,i.removeAnimationState(a)}),ie=!1,Xd(!this.options.removeCloneOnHide,o))},dragOverCompleted:function(e){var i=e.sortable,o=e.isOwner,s=e.insertion,r=e.activeSortable,a=e.parentEl,l=e.putSortable,c=this.options;if(s){if(o&&r._hideClone(),Ln=!1,c.animation&&it.length>1&&(ie||!o&&!r.options.sort&&!l)){var u=Mt(Ct,!1,!0,!0);it.forEach(function(f){f!==Ct&&(To(f,u),a.appendChild(f))}),ie=!0}if(!o)if(ie||bi(),it.length>1){var d=yi;r._showClone(i),r.options.animation&&!yi&&d&&ue.forEach(function(f){r.addAnimationState({target:f,rect:kn}),f.fromRect=kn,f.thisAnimationDuration=null})}else r._showClone(i)}},dragOverAnimationCapture:function(e){var i=e.dragRect,o=e.isOwner,s=e.activeSortable;if(it.forEach(function(a){a.thisAnimationDuration=null}),s.options.animation&&!o&&s.multiDrag.isMultiDrag){kn=Se({},i);var r=pn(Ct,!0);kn.top-=r.f,kn.left-=r.e}},dragOverAnimationComplete:function(){ie&&(ie=!1,bi())},drop:function(e){var i=e.originalEvent,o=e.rootEl,s=e.parentEl,r=e.sortable,a=e.dispatchSortableEvent,l=e.oldIndex,c=e.putSortable,u=c||this.sortable;if(i){var d=this.options,f=s.children;if(!Sn)if(d.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),It(Ct,d.selectedClass,!~it.indexOf(Ct)),~it.indexOf(Ct))it.splice(it.indexOf(Ct),1),Fn=null,Vn({sortable:r,rootEl:o,name:"deselect",targetEl:Ct});else{if(it.push(Ct),Vn({sortable:r,rootEl:o,name:"select",targetEl:Ct}),i.shiftKey&&Fn&&r.el.contains(Fn)){var h=kt(Fn),g=kt(Ct);if(~h&&~g&&h!==g){var p,m;for(g>h?(m=h,p=g):(m=g,p=h+1);m1){var v=Mt(Ct),y=kt(Ct,":not(."+this.options.selectedClass+")");if(!Ln&&d.animation&&(Ct.thisAnimationDuration=null),u.captureAnimationState(),!Ln&&(d.animation&&(Ct.fromRect=v,it.forEach(function(x){if(x.thisAnimationDuration=null,x!==Ct){var w=ie?Mt(x):v;x.fromRect=w,u.addAnimationState({target:x,rect:w})}})),bi(),it.forEach(function(x){f[y]?s.insertBefore(x,f[y]):s.appendChild(x),y++}),l===kt(Ct))){var E=!1;it.forEach(function(x){if(x.sortableIndex!==kt(x)){E=!0;return}}),E&&a("update")}it.forEach(function(x){yr(x)}),u.animateAll()}we=u}(o===s||c&&c.lastPutMode!=="clone")&&ue.forEach(function(x){x.parentNode&&x.parentNode.removeChild(x)})}},nullingGlobal:function(){this.isMultiDrag=Sn=!1,ue.length=0},destroyGlobal:function(){this._deselectMultiDrag(),lt(document,"pointerup",this._deselectMultiDrag),lt(document,"mouseup",this._deselectMultiDrag),lt(document,"touchend",this._deselectMultiDrag),lt(document,"keydown",this._checkKeyDown),lt(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(typeof Sn<"u"&&Sn)&&we===this.sortable&&!(e&&Pe(e.target,this.options.draggable,this.sortable.el,!1))&&!(e&&e.button!==0))for(;it.length;){var i=it[0];It(i,this.options.selectedClass,!1),it.shift(),Vn({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:i})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Se(n,{pluginName:"multiDrag",utils:{select:function(e){var i=e.parentNode[Zt];!i||!i.options.multiDrag||~it.indexOf(e)||(we&&we!==i&&(we.multiDrag._deselectMultiDrag(),we=i),It(e,i.options.selectedClass,!0),it.push(e))},deselect:function(e){var i=e.parentNode[Zt],o=it.indexOf(e);!i||!i.options.multiDrag||!~o||(It(e,i.options.selectedClass,!1),it.splice(o,1))}},eventProperties:function(){var e=this,i=[],o=[];return it.forEach(function(s){i.push({multiDragElement:s,index:s.sortableIndex});var r;ie&&s!==Ct?r=-1:ie?r=kt(s,":not(."+e.options.selectedClass+")"):r=kt(s),o.push({multiDragElement:s,index:r})}),{items:yd(it),clones:[].concat(ue),oldIndicies:i,newIndicies:o}},optionListeners:{multiDragKey:function(e){return e=e.toLowerCase(),e==="ctrl"?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function Xd(n,t){it.forEach(function(e,i){var o=t.children[e.sortableIndex+(n?Number(i):0)];o?t.insertBefore(e,o):t.appendChild(e)})}function Ro(n,t){ue.forEach(function(e,i){var o=t.children[e.sortableIndex+(n?Number(i):0)];o?t.insertBefore(e,o):t.appendChild(e)})}function bi(){it.forEach(function(n){n!==Ct&&n.parentNode&&n.parentNode.removeChild(n)})}q.mount(new Ud);q.mount(io,no);const Jd=Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:Gd,Sortable:q,Swap:Kd,default:q},Symbol.toStringTag,{value:"Module"})),Zd=ta(Jd);var Qd=Li.exports,Fo;function qd(){return Fo||(Fo=1,(function(n,t){(function(i,o){n.exports=o(gd,Zd)})(typeof self<"u"?self:Qd,function(e,i){return(function(o){var s={};function r(a){if(s[a])return s[a].exports;var l=s[a]={i:a,l:!1,exports:{}};return o[a].call(l.exports,l,l.exports,r),l.l=!0,l.exports}return r.m=o,r.c=s,r.d=function(a,l,c){r.o(a,l)||Object.defineProperty(a,l,{enumerable:!0,get:c})},r.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},r.t=function(a,l){if(l&1&&(a=r(a)),l&8||l&4&&typeof a=="object"&&a&&a.__esModule)return a;var c=Object.create(null);if(r.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:a}),l&2&&typeof a!="string")for(var u in a)r.d(c,u,(function(d){return a[d]}).bind(null,u));return c},r.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return r.d(l,"a",l),l},r.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)},r.p="",r(r.s="fb15")})({"00ee":(function(o,s,r){var a=r("b622"),l=a("toStringTag"),c={};c[l]="z",o.exports=String(c)==="[object z]"}),"0366":(function(o,s,r){var a=r("1c0b");o.exports=function(l,c,u){if(a(l),c===void 0)return l;switch(u){case 0:return function(){return l.call(c)};case 1:return function(d){return l.call(c,d)};case 2:return function(d,f){return l.call(c,d,f)};case 3:return function(d,f,h){return l.call(c,d,f,h)}}return function(){return l.apply(c,arguments)}}}),"057f":(function(o,s,r){var a=r("fc6a"),l=r("241c").f,c={}.toString,u=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],d=function(f){try{return l(f)}catch{return u.slice()}};o.exports.f=function(h){return u&&c.call(h)=="[object Window]"?d(h):l(a(h))}}),"06cf":(function(o,s,r){var a=r("83ab"),l=r("d1e7"),c=r("5c6c"),u=r("fc6a"),d=r("c04e"),f=r("5135"),h=r("0cfb"),g=Object.getOwnPropertyDescriptor;s.f=a?g:function(m,v){if(m=u(m),v=d(v,!0),h)try{return g(m,v)}catch{}if(f(m,v))return c(!l.f.call(m,v),m[v])}}),"0cfb":(function(o,s,r){var a=r("83ab"),l=r("d039"),c=r("cc12");o.exports=!a&&!l(function(){return Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a!=7})}),"13d5":(function(o,s,r){var a=r("23e7"),l=r("d58f").left,c=r("a640"),u=r("ae40"),d=c("reduce"),f=u("reduce",{1:0});a({target:"Array",proto:!0,forced:!d||!f},{reduce:function(g){return l(this,g,arguments.length,arguments.length>1?arguments[1]:void 0)}})}),"14c3":(function(o,s,r){var a=r("c6b6"),l=r("9263");o.exports=function(c,u){var d=c.exec;if(typeof d=="function"){var f=d.call(c,u);if(typeof f!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return f}if(a(c)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return l.call(c,u)}}),"159b":(function(o,s,r){var a=r("da84"),l=r("fdbc"),c=r("17c2"),u=r("9112");for(var d in l){var f=a[d],h=f&&f.prototype;if(h&&h.forEach!==c)try{u(h,"forEach",c)}catch{h.forEach=c}}}),"17c2":(function(o,s,r){var a=r("b727").forEach,l=r("a640"),c=r("ae40"),u=l("forEach"),d=c("forEach");o.exports=!u||!d?function(h){return a(this,h,arguments.length>1?arguments[1]:void 0)}:[].forEach}),"1be4":(function(o,s,r){var a=r("d066");o.exports=a("document","documentElement")}),"1c0b":(function(o,s){o.exports=function(r){if(typeof r!="function")throw TypeError(String(r)+" is not a function");return r}}),"1c7e":(function(o,s,r){var a=r("b622"),l=a("iterator"),c=!1;try{var u=0,d={next:function(){return{done:!!u++}},return:function(){c=!0}};d[l]=function(){return this},Array.from(d,function(){throw 2})}catch{}o.exports=function(f,h){if(!h&&!c)return!1;var g=!1;try{var p={};p[l]=function(){return{next:function(){return{done:g=!0}}}},f(p)}catch{}return g}}),"1d80":(function(o,s){o.exports=function(r){if(r==null)throw TypeError("Can't call method on "+r);return r}}),"1dde":(function(o,s,r){var a=r("d039"),l=r("b622"),c=r("2d00"),u=l("species");o.exports=function(d){return c>=51||!a(function(){var f=[],h=f.constructor={};return h[u]=function(){return{foo:1}},f[d](Boolean).foo!==1})}}),"23cb":(function(o,s,r){var a=r("a691"),l=Math.max,c=Math.min;o.exports=function(u,d){var f=a(u);return f<0?l(f+d,0):c(f,d)}}),"23e7":(function(o,s,r){var a=r("da84"),l=r("06cf").f,c=r("9112"),u=r("6eeb"),d=r("ce4e"),f=r("e893"),h=r("94ca");o.exports=function(g,p){var m=g.target,v=g.global,y=g.stat,E,x,w,C,_,$;if(v?x=a:y?x=a[m]||d(m,{}):x=(a[m]||{}).prototype,x)for(w in p){if(_=p[w],g.noTargetGet?($=l(x,w),C=$&&$.value):C=x[w],E=h(v?w:m+(y?".":"#")+w,g.forced),!E&&C!==void 0){if(typeof _==typeof C)continue;f(_,C)}(g.sham||C&&C.sham)&&c(_,"sham",!0),u(x,w,_,g)}}}),"241c":(function(o,s,r){var a=r("ca84"),l=r("7839"),c=l.concat("length","prototype");s.f=Object.getOwnPropertyNames||function(d){return a(d,c)}}),"25f0":(function(o,s,r){var a=r("6eeb"),l=r("825a"),c=r("d039"),u=r("ad6d"),d="toString",f=RegExp.prototype,h=f[d],g=c(function(){return h.call({source:"a",flags:"b"})!="/a/b"}),p=h.name!=d;(g||p)&&a(RegExp.prototype,d,function(){var v=l(this),y=String(v.source),E=v.flags,x=String(E===void 0&&v instanceof RegExp&&!("flags"in f)?u.call(v):E);return"/"+y+"/"+x},{unsafe:!0})}),"2ca0":(function(o,s,r){var a=r("23e7"),l=r("06cf").f,c=r("50c4"),u=r("5a34"),d=r("1d80"),f=r("ab13"),h=r("c430"),g="".startsWith,p=Math.min,m=f("startsWith"),v=!h&&!m&&!!(function(){var y=l(String.prototype,"startsWith");return y&&!y.writable})();a({target:"String",proto:!0,forced:!v&&!m},{startsWith:function(E){var x=String(d(this));u(E);var w=c(p(arguments.length>1?arguments[1]:void 0,x.length)),C=String(E);return g?g.call(x,C,w):x.slice(w,w+C.length)===C}})}),"2d00":(function(o,s,r){var a=r("da84"),l=r("342f"),c=a.process,u=c&&c.versions,d=u&&u.v8,f,h;d?(f=d.split("."),h=f[0]+f[1]):l&&(f=l.match(/Edge\/(\d+)/),(!f||f[1]>=74)&&(f=l.match(/Chrome\/(\d+)/),f&&(h=f[1]))),o.exports=h&&+h}),"342f":(function(o,s,r){var a=r("d066");o.exports=a("navigator","userAgent")||""}),"35a1":(function(o,s,r){var a=r("f5df"),l=r("3f8c"),c=r("b622"),u=c("iterator");o.exports=function(d){if(d!=null)return d[u]||d["@@iterator"]||l[a(d)]}}),"37e8":(function(o,s,r){var a=r("83ab"),l=r("9bf2"),c=r("825a"),u=r("df75");o.exports=a?Object.defineProperties:function(f,h){c(f);for(var g=u(h),p=g.length,m=0,v;p>m;)l.f(f,v=g[m++],h[v]);return f}}),"3bbe":(function(o,s,r){var a=r("861d");o.exports=function(l){if(!a(l)&&l!==null)throw TypeError("Can't set "+String(l)+" as a prototype");return l}}),"3ca3":(function(o,s,r){var a=r("6547").charAt,l=r("69f3"),c=r("7dd0"),u="String Iterator",d=l.set,f=l.getterFor(u);c(String,"String",function(h){d(this,{type:u,string:String(h),index:0})},function(){var g=f(this),p=g.string,m=g.index,v;return m>=p.length?{value:void 0,done:!0}:(v=a(p,m),g.index+=v.length,{value:v,done:!1})})}),"3f8c":(function(o,s){o.exports={}}),4160:(function(o,s,r){var a=r("23e7"),l=r("17c2");a({target:"Array",proto:!0,forced:[].forEach!=l},{forEach:l})}),"428f":(function(o,s,r){var a=r("da84");o.exports=a}),"44ad":(function(o,s,r){var a=r("d039"),l=r("c6b6"),c="".split;o.exports=a(function(){return!Object("z").propertyIsEnumerable(0)})?function(u){return l(u)=="String"?c.call(u,""):Object(u)}:Object}),"44d2":(function(o,s,r){var a=r("b622"),l=r("7c73"),c=r("9bf2"),u=a("unscopables"),d=Array.prototype;d[u]==null&&c.f(d,u,{configurable:!0,value:l(null)}),o.exports=function(f){d[u][f]=!0}}),"44e7":(function(o,s,r){var a=r("861d"),l=r("c6b6"),c=r("b622"),u=c("match");o.exports=function(d){var f;return a(d)&&((f=d[u])!==void 0?!!f:l(d)=="RegExp")}}),4930:(function(o,s,r){var a=r("d039");o.exports=!!Object.getOwnPropertySymbols&&!a(function(){return!String(Symbol())})}),"4d64":(function(o,s,r){var a=r("fc6a"),l=r("50c4"),c=r("23cb"),u=function(d){return function(f,h,g){var p=a(f),m=l(p.length),v=c(g,m),y;if(d&&h!=h){for(;m>v;)if(y=p[v++],y!=y)return!0}else for(;m>v;v++)if((d||v in p)&&p[v]===h)return d||v||0;return!d&&-1}};o.exports={includes:u(!0),indexOf:u(!1)}}),"4de4":(function(o,s,r){var a=r("23e7"),l=r("b727").filter,c=r("1dde"),u=r("ae40"),d=c("filter"),f=u("filter");a({target:"Array",proto:!0,forced:!d||!f},{filter:function(g){return l(this,g,arguments.length>1?arguments[1]:void 0)}})}),"4df4":(function(o,s,r){var a=r("0366"),l=r("7b0b"),c=r("9bdd"),u=r("e95a"),d=r("50c4"),f=r("8418"),h=r("35a1");o.exports=function(p){var m=l(p),v=typeof this=="function"?this:Array,y=arguments.length,E=y>1?arguments[1]:void 0,x=E!==void 0,w=h(m),C=0,_,$,b,P,D,B;if(x&&(E=a(E,y>2?arguments[2]:void 0,2)),w!=null&&!(v==Array&&u(w)))for(P=w.call(m),D=P.next,$=new v;!(b=D.call(P)).done;C++)B=x?c(P,E,[b.value,C],!0):b.value,f($,C,B);else for(_=d(m.length),$=new v(_);_>C;C++)B=x?E(m[C],C):m[C],f($,C,B);return $.length=C,$}}),"4fad":(function(o,s,r){var a=r("23e7"),l=r("6f53").entries;a({target:"Object",stat:!0},{entries:function(u){return l(u)}})}),"50c4":(function(o,s,r){var a=r("a691"),l=Math.min;o.exports=function(c){return c>0?l(a(c),9007199254740991):0}}),5135:(function(o,s){var r={}.hasOwnProperty;o.exports=function(a,l){return r.call(a,l)}}),5319:(function(o,s,r){var a=r("d784"),l=r("825a"),c=r("7b0b"),u=r("50c4"),d=r("a691"),f=r("1d80"),h=r("8aa5"),g=r("14c3"),p=Math.max,m=Math.min,v=Math.floor,y=/\$([$&'`]|\d\d?|<[^>]*>)/g,E=/\$([$&'`]|\d\d?)/g,x=function(w){return w===void 0?w:String(w)};a("replace",2,function(w,C,_,$){var b=$.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,P=$.REPLACE_KEEPS_$0,D=b?"$":"$0";return[function(N,k){var F=f(this),z=N==null?void 0:N[w];return z!==void 0?z.call(N,F,k):C.call(String(F),N,k)},function(L,N){if(!b&&P||typeof N=="string"&&N.indexOf(D)===-1){var k=_(C,L,this,N);if(k.done)return k.value}var F=l(L),z=String(this),Z=typeof N=="function";Z||(N=String(N));var rt=F.global;if(rt){var wt=F.unicode;F.lastIndex=0}for(var mt=[];;){var gt=g(F,z);if(gt===null||(mt.push(gt),!rt))break;var Ot=String(gt[0]);Ot===""&&(F.lastIndex=h(z,u(F.lastIndex),wt))}for(var xt="",St=0,ut=0;ut=St&&(xt+=z.slice(St,qt)+Bt,St=qt+Pt.length)}return xt+z.slice(St)}];function B(L,N,k,F,z,Z){var rt=k+L.length,wt=F.length,mt=E;return z!==void 0&&(z=c(z),mt=y),C.call(Z,mt,function(gt,Ot){var xt;switch(Ot.charAt(0)){case"$":return"$";case"&":return L;case"`":return N.slice(0,k);case"'":return N.slice(rt);case"<":xt=z[Ot.slice(1,-1)];break;default:var St=+Ot;if(St===0)return gt;if(St>wt){var ut=v(St/10);return ut===0?gt:ut<=wt?F[ut-1]===void 0?Ot.charAt(1):F[ut-1]+Ot.charAt(1):gt}xt=F[St-1]}return xt===void 0?"":xt})}})}),5692:(function(o,s,r){var a=r("c430"),l=r("c6cd");(o.exports=function(c,u){return l[c]||(l[c]=u!==void 0?u:{})})("versions",[]).push({version:"3.6.5",mode:a?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),"56ef":(function(o,s,r){var a=r("d066"),l=r("241c"),c=r("7418"),u=r("825a");o.exports=a("Reflect","ownKeys")||function(f){var h=l.f(u(f)),g=c.f;return g?h.concat(g(f)):h}}),"5a34":(function(o,s,r){var a=r("44e7");o.exports=function(l){if(a(l))throw TypeError("The method doesn't accept regular expressions");return l}}),"5c6c":(function(o,s){o.exports=function(r,a){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:a}}}),"5db7":(function(o,s,r){var a=r("23e7"),l=r("a2bf"),c=r("7b0b"),u=r("50c4"),d=r("1c0b"),f=r("65f0");a({target:"Array",proto:!0},{flatMap:function(g){var p=c(this),m=u(p.length),v;return d(g),v=f(p,0),v.length=l(v,p,p,m,0,1,g,arguments.length>1?arguments[1]:void 0),v}})}),6547:(function(o,s,r){var a=r("a691"),l=r("1d80"),c=function(u){return function(d,f){var h=String(l(d)),g=a(f),p=h.length,m,v;return g<0||g>=p?u?"":void 0:(m=h.charCodeAt(g),m<55296||m>56319||g+1===p||(v=h.charCodeAt(g+1))<56320||v>57343?u?h.charAt(g):m:u?h.slice(g,g+2):(m-55296<<10)+(v-56320)+65536)}};o.exports={codeAt:c(!1),charAt:c(!0)}}),"65f0":(function(o,s,r){var a=r("861d"),l=r("e8b5"),c=r("b622"),u=c("species");o.exports=function(d,f){var h;return l(d)&&(h=d.constructor,typeof h=="function"&&(h===Array||l(h.prototype))?h=void 0:a(h)&&(h=h[u],h===null&&(h=void 0))),new(h===void 0?Array:h)(f===0?0:f)}}),"69f3":(function(o,s,r){var a=r("7f9a"),l=r("da84"),c=r("861d"),u=r("9112"),d=r("5135"),f=r("f772"),h=r("d012"),g=l.WeakMap,p,m,v,y=function(b){return v(b)?m(b):p(b,{})},E=function(b){return function(P){var D;if(!c(P)||(D=m(P)).type!==b)throw TypeError("Incompatible receiver, "+b+" required");return D}};if(a){var x=new g,w=x.get,C=x.has,_=x.set;p=function(b,P){return _.call(x,b,P),P},m=function(b){return w.call(x,b)||{}},v=function(b){return C.call(x,b)}}else{var $=f("state");h[$]=!0,p=function(b,P){return u(b,$,P),P},m=function(b){return d(b,$)?b[$]:{}},v=function(b){return d(b,$)}}o.exports={set:p,get:m,has:v,enforce:y,getterFor:E}}),"6eeb":(function(o,s,r){var a=r("da84"),l=r("9112"),c=r("5135"),u=r("ce4e"),d=r("8925"),f=r("69f3"),h=f.get,g=f.enforce,p=String(String).split("String");(o.exports=function(m,v,y,E){var x=E?!!E.unsafe:!1,w=E?!!E.enumerable:!1,C=E?!!E.noTargetGet:!1;if(typeof y=="function"&&(typeof v=="string"&&!c(y,"name")&&l(y,"name",v),g(y).source=p.join(typeof v=="string"?v:"")),m===a){w?m[v]=y:u(v,y);return}else x?!C&&m[v]&&(w=!0):delete m[v];w?m[v]=y:l(m,v,y)})(Function.prototype,"toString",function(){return typeof this=="function"&&h(this).source||d(this)})}),"6f53":(function(o,s,r){var a=r("83ab"),l=r("df75"),c=r("fc6a"),u=r("d1e7").f,d=function(f){return function(h){for(var g=c(h),p=l(g),m=p.length,v=0,y=[],E;m>v;)E=p[v++],(!a||u.call(g,E))&&y.push(f?[E,g[E]]:g[E]);return y}};o.exports={entries:d(!0),values:d(!1)}}),"73d9":(function(o,s,r){var a=r("44d2");a("flatMap")}),7418:(function(o,s){s.f=Object.getOwnPropertySymbols}),"746f":(function(o,s,r){var a=r("428f"),l=r("5135"),c=r("e538"),u=r("9bf2").f;o.exports=function(d){var f=a.Symbol||(a.Symbol={});l(f,d)||u(f,d,{value:c.f(d)})}}),7839:(function(o,s){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),"7b0b":(function(o,s,r){var a=r("1d80");o.exports=function(l){return Object(a(l))}}),"7c73":(function(o,s,r){var a=r("825a"),l=r("37e8"),c=r("7839"),u=r("d012"),d=r("1be4"),f=r("cc12"),h=r("f772"),g=">",p="<",m="prototype",v="script",y=h("IE_PROTO"),E=function(){},x=function(b){return p+v+g+b+p+"/"+v+g},w=function(b){b.write(x("")),b.close();var P=b.parentWindow.Object;return b=null,P},C=function(){var b=f("iframe"),P="java"+v+":",D;return b.style.display="none",d.appendChild(b),b.src=String(P),D=b.contentWindow.document,D.open(),D.write(x("document.F=Object")),D.close(),D.F},_,$=function(){try{_=document.domain&&new ActiveXObject("htmlfile")}catch{}$=_?w(_):C();for(var b=c.length;b--;)delete $[m][c[b]];return $()};u[y]=!0,o.exports=Object.create||function(P,D){var B;return P!==null?(E[m]=a(P),B=new E,E[m]=null,B[y]=P):B=$(),D===void 0?B:l(B,D)}}),"7dd0":(function(o,s,r){var a=r("23e7"),l=r("9ed3"),c=r("e163"),u=r("d2bb"),d=r("d44e"),f=r("9112"),h=r("6eeb"),g=r("b622"),p=r("c430"),m=r("3f8c"),v=r("ae93"),y=v.IteratorPrototype,E=v.BUGGY_SAFARI_ITERATORS,x=g("iterator"),w="keys",C="values",_="entries",$=function(){return this};o.exports=function(b,P,D,B,L,N,k){l(D,P,B);var F=function(ut){if(ut===L&&mt)return mt;if(!E&&ut in rt)return rt[ut];switch(ut){case w:return function(){return new D(this,ut)};case C:return function(){return new D(this,ut)};case _:return function(){return new D(this,ut)}}return function(){return new D(this)}},z=P+" Iterator",Z=!1,rt=b.prototype,wt=rt[x]||rt["@@iterator"]||L&&rt[L],mt=!E&&wt||F(L),gt=P=="Array"&&rt.entries||wt,Ot,xt,St;if(gt&&(Ot=c(gt.call(new b)),y!==Object.prototype&&Ot.next&&(!p&&c(Ot)!==y&&(u?u(Ot,y):typeof Ot[x]!="function"&&f(Ot,x,$)),d(Ot,z,!0,!0),p&&(m[z]=$))),L==C&&wt&&wt.name!==C&&(Z=!0,mt=function(){return wt.call(this)}),(!p||k)&&rt[x]!==mt&&f(rt,x,mt),m[P]=mt,L)if(xt={values:F(C),keys:N?mt:F(w),entries:F(_)},k)for(St in xt)(E||Z||!(St in rt))&&h(rt,St,xt[St]);else a({target:P,proto:!0,forced:E||Z},xt);return xt}}),"7f9a":(function(o,s,r){var a=r("da84"),l=r("8925"),c=a.WeakMap;o.exports=typeof c=="function"&&/native code/.test(l(c))}),"825a":(function(o,s,r){var a=r("861d");o.exports=function(l){if(!a(l))throw TypeError(String(l)+" is not an object");return l}}),"83ab":(function(o,s,r){var a=r("d039");o.exports=!a(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})}),8418:(function(o,s,r){var a=r("c04e"),l=r("9bf2"),c=r("5c6c");o.exports=function(u,d,f){var h=a(d);h in u?l.f(u,h,c(0,f)):u[h]=f}}),"861d":(function(o,s){o.exports=function(r){return typeof r=="object"?r!==null:typeof r=="function"}}),8875:(function(o,s,r){var a,l,c;(function(u,d){l=[],a=d,c=typeof a=="function"?a.apply(s,l):a,c!==void 0&&(o.exports=c)})(typeof self<"u"?self:this,function(){function u(){var d=Object.getOwnPropertyDescriptor(document,"currentScript");if(!d&&"currentScript"in document&&document.currentScript||d&&d.get!==u&&document.currentScript)return document.currentScript;try{throw new Error}catch(_){var f=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,h=/@([^@]*):(\d+):(\d+)\s*$/ig,g=f.exec(_.stack)||h.exec(_.stack),p=g&&g[1]||!1,m=g&&g[2]||!1,v=document.location.href.replace(document.location.hash,""),y,E,x,w=document.getElementsByTagName("script");p===v&&(y=document.documentElement.outerHTML,E=new RegExp("(?:[^\\n]+?\\n){0,"+(m-2)+"}[^<]*