Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

"use strict";(window.webpackJsonpAdministration=window.webpackJsonpAdministration||[]).pus..

Decoded Output download

<?  "use strict";(window.webpackJsonpAdministration=window.webpackJsonpAdministration||[]).push([[89570],{889570:function(e,t,l){l.r(t),l.d(t,{default:function(){return s}});var n={namespaced:! 
0,state(){return{salesChannelCollection:null,seoUrlCollection:null,originalSeoUrls:[],defaultSeoUrl:null,currentSeoUrl:null}},mutations:{setSeoUrlCollection(e,t){e.seoUrlCollection=t},setOr 
iginalSeoUrls(e,t){e.originalSeoUrls=t},setCurrentSeoUrl(e,t){e.currentSeoUrl=t},setDefaultSeoUrl(e,t){e.defaultSeoUrl=t},setSalesChannelCollection(e,t){e.salesChannelCollection=t}},getters 
:{isLoading:e=>e.loading,getNewOrModifiedUrls:e=>()=>{let t=[];return e.seoUrlCollection.forEach(l=>{if(null===l.seoPathInfo)return;let n=e.originalSeoUrls.find(e=>e.id===l.id);(!n||n.seoPa 
thInfo!==l.seoPathInfo)&&(n||l.seoPathInfo)&&t.push(l)}),t}}};let r=Shopware.Data.Criteria,o=Shopware.Data.EntityCollection;var s={template:'
{% block sw_seo_url %}
<div class="sw-seo-url 
">
    <sw-card
        class="sw-seo-url__card"
        position-identifier="sw-seo-url"
        :title="$tc(\'sw-seo-url.titleCard\')"
        :is-loading="isLoading"
    >
 
 
        {% block sw_seo_url_card %}
        <template v-if="showEmptySeoUrlError">
            {{ $tc(\'sw-seo-url.textEmptySeoUrls\') }}
        </template>

        <template v-el 
se>
            
            {% block sw_seo_url_card_seo_path %}
            <sw-inherit-wrapper
                v-model:value="currentSeoUrl.seoPathInfo"
                :has-parent= 
"currentSalesChannelId !== null && !isHeadlessSalesChannel && hasDefaultTemplate"
                :inherited-value="(currentSeoUrl.salesChannelId !== null && !isHeadlessSalesChannel) ? def 
aultSeoUrl.seoPathInfo : null"
            >

                <template #content="props">
                    
                    {% block sw_seo_url_card_seo_path_edit %}
 
          <sw-text-field
                        :map-inheritance="props"
                        :value="props.currentValue"
                        :disabled="props.isInherited || isHe 
adlessSalesChannel || !allowInput"
                        :disable-inheritance-toggle="isHeadlessSalesChannel"
                        :label="$tc(\'sw-seo-url.labelSeoPathInfo\')"
 
                    :help-text="seoUrlHelptext"
                        @update:value="props.updateCurrentValue"
                    />
                    {% endblock %}
 
  </template>

            </sw-inherit-wrapper>
            {% endblock %}
        </template>

        
        {% block sw_seo_url_card_toolbar %}
        <template
 
v-if="!showEmptySeoUrlError"
            #toolbar
        >
            <sw-sales-channel-switch
                ref="salesChannelSwitch"
                :disabled="disabled"
 
        :label="$tc(\'sw-seo-url.labelSalesChannelSelect\')"
                @change-sales-channel-id="onSalesChannelChanged"
            />
        </template>
        {% endblock %}
 

        <div
            v-if="hasAdditionalSeoSlot"
            class="sw-seo-url__card-seo-additional"
        >
            <slot
                name="seo-additional"
 
      v-bind="{currentSalesChannelId}"
            >
                
                {% block sw_seo_url_additional %}{% endblock %}
            </slot>
        </div>

        {% e 
ndblock %}
    </sw-card>
</div>
{% endblock %}
',compatConfig:Shopware.compatConfig,inject:["repositoryFactory"],emits:["on-change-sales-channel"],mixins:[],props:{salesChannelId:{type 
:String,required:!1,default:null},urls:{type:Array,required:!1,default(){return[]}},isLoading:{type:Boolean,required:!1,default:!1},hasDefaultTemplate:{type:Boolean,required:!1,default:!0}, 
disabled:{type:Boolean,required:!1,default:!1},resultLimit:{type:Number,required:!1,default:25}},data(){return{currentSalesChannelId:this.salesChannelId,showEmptySeoUrlError:!1}},computed:{ 
seoUrlCollection(){return Shopware.State.get("swSeoUrl").seoUrlCollection},currentSeoUrl(){return Shopware.State.get("swSeoUrl")?Shopware.State.get("swSeoUrl").currentSeoUrl:{}},defaultSeoU 
rl(){return Shopware.State.get("swSeoUrl").defaultSeoUrl},seoUrlRepository(){return this.repositoryFactory.create("seo_url")},salesChannelRepository(){return this.repositoryFactory.create(" 
sales_channel")},isHeadlessSalesChannel(){if(!Shopware.State.get("swSeoUrl")||null===Shopware.State.get("swSeoUrl").salesChannelCollection)return!0;let e=Shopware.State.get("swSeoUrl").sale 
sChannelCollection.find(e=>e.id===this.currentSalesChannelId);return null!==this.currentSalesChannelId&&e?.typeId==="f183ee5650cf4bdb8a774337575067a6"},seoUrlHelptext(){return this.isHeadle 
ssSalesChannel?this.$tc("sw-seo-url.textSeoUrlsDisallowedForHeadless"):null},hasAdditionalSeoSlot(){return this.$slots.hasOwnProperty("seo-additional")},allowInput(){return this.hasDefaultT 
emplate||null!==this.currentSalesChannelId}},watch:{urls(){this.initSeoUrlCollection(),this.refreshCurrentSeoUrl()}},beforeCreate(){Shopware.State.list().includes("swSeoUrl")||Shopware.Stat 
e.registerModule("swSeoUrl",n)},created(){this.isCompatEnabled("INSTANCE_EVENT_EMITTER")?this.$root.$on("seo-url-save-finish",this.clearDefaultSeoUrls):Shopware.Utils.EventBus.on("sw-produc 
t-detail-save-finish",this.clearDefaultSeoUrls),this.createdComponent()},beforeUnmount(){this.isCompatEnabled("INSTANCE_EVENT_EMITTER")?this.$root.$off("seo-url-save-finish",this.clearDefau 
ltSeoUrls):Shopware.Utils.EventBus.off("sw-product-detail-save-finish",this.clearDefaultSeoUrls),Shopware.State.unregisterModule("swSeoUrl")},methods:{createdComponent(){this.initSalesChann 
elCollection(),this.initSeoUrlCollection(),this.showEmptySeoUrlError||this.refreshCurrentSeoUrl()},initSalesChannelCollection(){let e=new r(1,this.resultLimit);e.addAssociation("type"),this 
.salesChannelRepository.search(e).then(e=>{Shopware.State.commit("swSeoUrl/setSalesChannelCollection",e)})},initSeoUrlCollection(){this.showEmptySeoUrlError=!1;let e=new o(this.seoUrlReposi 
tory.route,this.seoUrlRepository.schema.entity,Shopware.Context.api,new r(1,this.resultLimit)),t=this.urls.find(e=>null===e.salesChannelId);void 0===t&&(this.hasDefaultTemplate||this.urls.l 
ength<=0)&&(this.showEmptySeoUrlError=!0);let l=this.seoUrlRepository.create();Object.assign(l,t),e.add(l),Shopware.State.commit("swSeoUrl/setDefaultSeoUrl",l),this.urls.forEach(t=>{let l=t 
his.seoUrlRepository.create();Object.assign(l,t),e.add(l)}),Shopware.State.get("swSeoUrl").defaultSeoUrl||(this.showEmptySeoUrlError=!0),Shopware.State.commit("swSeoUrl/setSeoUrlCollection" 
,e),Shopware.State.commit("swSeoUrl/setOriginalSeoUrls",this.urls),this.clearDefaultSeoUrls()},clearDefaultSeoUrls(){this.seoUrlCollection.forEach(e=>{e.id!==this.defaultSeoUrl.id&&e.seoPat 
hInfo===this.defaultSeoUrl.seoPathInfo&&(e.seoPathInfo=null)})},refreshCurrentSeoUrl(){let e=Shopware.Context.api.languageId,t=this.seoUrlCollection.find(t=>t.languageId===e&&t.salesChannel 
Id===this.currentSalesChannelId);if(!t){let t=this.seoUrlRepository.create(),l=this.seoUrlCollection.find(e=>e.pathInfo&&e.routeName&&e.foreignKey)||{};t.foreignKey=this.defaultSeoUrl?.fore 
ignKey??l.foreignKey,t.isCanonical=!0,t.languageId=e,t.salesChannelId=this.currentSalesChannelId,t.routeName=this.defaultSeoUrl?.routeName??l.routeName,t.pathInfo=this.defaultSeoUrl?.pathIn 
fo??l.pathInfo,t.isModified=!0,this.seoUrlCollection.add(t),Shopware.State.commit("swSeoUrl/setCurrentSeoUrl",t);return}Shopware.State.commit("swSeoUrl/setCurrentSeoUrl",t)},onSalesChannelC 
hanged(e){this.currentSalesChannelId=e,this.$emit("on-change-sales-channel",e),this.refreshCurrentSeoUrl()}}}}}]); 
 ?>

Did this file decode correctly?

Original Code

"use strict";(window.webpackJsonpAdministration=window.webpackJsonpAdministration||[]).push([[89570],{889570:function(e,t,l){l.r(t),l.d(t,{default:function(){return s}});var n={namespaced:!
0,state(){return{salesChannelCollection:null,seoUrlCollection:null,originalSeoUrls:[],defaultSeoUrl:null,currentSeoUrl:null}},mutations:{setSeoUrlCollection(e,t){e.seoUrlCollection=t},setOr
iginalSeoUrls(e,t){e.originalSeoUrls=t},setCurrentSeoUrl(e,t){e.currentSeoUrl=t},setDefaultSeoUrl(e,t){e.defaultSeoUrl=t},setSalesChannelCollection(e,t){e.salesChannelCollection=t}},getters
:{isLoading:e=>e.loading,getNewOrModifiedUrls:e=>()=>{let t=[];return e.seoUrlCollection.forEach(l=>{if(null===l.seoPathInfo)return;let n=e.originalSeoUrls.find(e=>e.id===l.id);(!n||n.seoPa
thInfo!==l.seoPathInfo)&&(n||l.seoPathInfo)&&t.push(l)}),t}}};let r=Shopware.Data.Criteria,o=Shopware.Data.EntityCollection;var s={template:'\n{% block sw_seo_url %}\n<div class="sw-seo-url
">\n    <sw-card\n        class="sw-seo-url__card"\n        position-identifier="sw-seo-url"\n        :title="$tc(\'sw-seo-url.titleCard\')"\n        :is-loading="isLoading"\n    >\n
 \n        {% block sw_seo_url_card %}\n        <template v-if="showEmptySeoUrlError">\n            {{ $tc(\'sw-seo-url.textEmptySeoUrls\') }}\n        </template>\n\n        <template v-el
se>\n            \n            {% block sw_seo_url_card_seo_path %}\n            <sw-inherit-wrapper\n                v-model:value="currentSeoUrl.seoPathInfo"\n                :has-parent=
"currentSalesChannelId !== null && !isHeadlessSalesChannel && hasDefaultTemplate"\n                :inherited-value="(currentSeoUrl.salesChannelId !== null && !isHeadlessSalesChannel) ? def
aultSeoUrl.seoPathInfo : null"\n            >\n\n                <template #content="props">\n                    \n                    {% block sw_seo_url_card_seo_path_edit %}\n
          <sw-text-field\n                        :map-inheritance="props"\n                        :value="props.currentValue"\n                        :disabled="props.isInherited || isHe
adlessSalesChannel || !allowInput"\n                        :disable-inheritance-toggle="isHeadlessSalesChannel"\n                        :label="$tc(\'sw-seo-url.labelSeoPathInfo\')"\n
                    :help-text="seoUrlHelptext"\n                        @update:value="props.updateCurrentValue"\n                    />\n                    {% endblock %}\n
  </template>\n\n            </sw-inherit-wrapper>\n            {% endblock %}\n        </template>\n\n        \n        {% block sw_seo_url_card_toolbar %}\n        <template\n
v-if="!showEmptySeoUrlError"\n            #toolbar\n        >\n            <sw-sales-channel-switch\n                ref="salesChannelSwitch"\n                :disabled="disabled"\n
        :label="$tc(\'sw-seo-url.labelSalesChannelSelect\')"\n                @change-sales-channel-id="onSalesChannelChanged"\n            />\n        </template>\n        {% endblock %}\n
\n        <div\n            v-if="hasAdditionalSeoSlot"\n            class="sw-seo-url__card-seo-additional"\n        >\n            <slot\n                name="seo-additional"\n
      v-bind="{currentSalesChannelId}"\n            >\n                \n                {% block sw_seo_url_additional %}{% endblock %}\n            </slot>\n        </div>\n\n        {% e
ndblock %}\n    </sw-card>\n</div>\n{% endblock %}\n',compatConfig:Shopware.compatConfig,inject:["repositoryFactory"],emits:["on-change-sales-channel"],mixins:[],props:{salesChannelId:{type
:String,required:!1,default:null},urls:{type:Array,required:!1,default(){return[]}},isLoading:{type:Boolean,required:!1,default:!1},hasDefaultTemplate:{type:Boolean,required:!1,default:!0},
disabled:{type:Boolean,required:!1,default:!1},resultLimit:{type:Number,required:!1,default:25}},data(){return{currentSalesChannelId:this.salesChannelId,showEmptySeoUrlError:!1}},computed:{
seoUrlCollection(){return Shopware.State.get("swSeoUrl").seoUrlCollection},currentSeoUrl(){return Shopware.State.get("swSeoUrl")?Shopware.State.get("swSeoUrl").currentSeoUrl:{}},defaultSeoU
rl(){return Shopware.State.get("swSeoUrl").defaultSeoUrl},seoUrlRepository(){return this.repositoryFactory.create("seo_url")},salesChannelRepository(){return this.repositoryFactory.create("
sales_channel")},isHeadlessSalesChannel(){if(!Shopware.State.get("swSeoUrl")||null===Shopware.State.get("swSeoUrl").salesChannelCollection)return!0;let e=Shopware.State.get("swSeoUrl").sale
sChannelCollection.find(e=>e.id===this.currentSalesChannelId);return null!==this.currentSalesChannelId&&e?.typeId==="f183ee5650cf4bdb8a774337575067a6"},seoUrlHelptext(){return this.isHeadle
ssSalesChannel?this.$tc("sw-seo-url.textSeoUrlsDisallowedForHeadless"):null},hasAdditionalSeoSlot(){return this.$slots.hasOwnProperty("seo-additional")},allowInput(){return this.hasDefaultT
emplate||null!==this.currentSalesChannelId}},watch:{urls(){this.initSeoUrlCollection(),this.refreshCurrentSeoUrl()}},beforeCreate(){Shopware.State.list().includes("swSeoUrl")||Shopware.Stat
e.registerModule("swSeoUrl",n)},created(){this.isCompatEnabled("INSTANCE_EVENT_EMITTER")?this.$root.$on("seo-url-save-finish",this.clearDefaultSeoUrls):Shopware.Utils.EventBus.on("sw-produc
t-detail-save-finish",this.clearDefaultSeoUrls),this.createdComponent()},beforeUnmount(){this.isCompatEnabled("INSTANCE_EVENT_EMITTER")?this.$root.$off("seo-url-save-finish",this.clearDefau
ltSeoUrls):Shopware.Utils.EventBus.off("sw-product-detail-save-finish",this.clearDefaultSeoUrls),Shopware.State.unregisterModule("swSeoUrl")},methods:{createdComponent(){this.initSalesChann
elCollection(),this.initSeoUrlCollection(),this.showEmptySeoUrlError||this.refreshCurrentSeoUrl()},initSalesChannelCollection(){let e=new r(1,this.resultLimit);e.addAssociation("type"),this
.salesChannelRepository.search(e).then(e=>{Shopware.State.commit("swSeoUrl/setSalesChannelCollection",e)})},initSeoUrlCollection(){this.showEmptySeoUrlError=!1;let e=new o(this.seoUrlReposi
tory.route,this.seoUrlRepository.schema.entity,Shopware.Context.api,new r(1,this.resultLimit)),t=this.urls.find(e=>null===e.salesChannelId);void 0===t&&(this.hasDefaultTemplate||this.urls.l
ength<=0)&&(this.showEmptySeoUrlError=!0);let l=this.seoUrlRepository.create();Object.assign(l,t),e.add(l),Shopware.State.commit("swSeoUrl/setDefaultSeoUrl",l),this.urls.forEach(t=>{let l=t
his.seoUrlRepository.create();Object.assign(l,t),e.add(l)}),Shopware.State.get("swSeoUrl").defaultSeoUrl||(this.showEmptySeoUrlError=!0),Shopware.State.commit("swSeoUrl/setSeoUrlCollection"
,e),Shopware.State.commit("swSeoUrl/setOriginalSeoUrls",this.urls),this.clearDefaultSeoUrls()},clearDefaultSeoUrls(){this.seoUrlCollection.forEach(e=>{e.id!==this.defaultSeoUrl.id&&e.seoPat
hInfo===this.defaultSeoUrl.seoPathInfo&&(e.seoPathInfo=null)})},refreshCurrentSeoUrl(){let e=Shopware.Context.api.languageId,t=this.seoUrlCollection.find(t=>t.languageId===e&&t.salesChannel
Id===this.currentSalesChannelId);if(!t){let t=this.seoUrlRepository.create(),l=this.seoUrlCollection.find(e=>e.pathInfo&&e.routeName&&e.foreignKey)||{};t.foreignKey=this.defaultSeoUrl?.fore
ignKey??l.foreignKey,t.isCanonical=!0,t.languageId=e,t.salesChannelId=this.currentSalesChannelId,t.routeName=this.defaultSeoUrl?.routeName??l.routeName,t.pathInfo=this.defaultSeoUrl?.pathIn
fo??l.pathInfo,t.isModified=!0,this.seoUrlCollection.add(t),Shopware.State.commit("swSeoUrl/setCurrentSeoUrl",t);return}Shopware.State.commit("swSeoUrl/setCurrentSeoUrl",t)},onSalesChannelC
hanged(e){this.currentSalesChannelId=e,this.$emit("on-change-sales-channel",e),this.refreshCurrentSeoUrl()}}}}}]);

Function Calls

None

Variables

None

Stats

MD5 a81c375f179749af83712778f7caf10b
Eval Count 0
Decode Time 57 ms