%PDF- %PDF-
Direktori : /home/t/r/a/tradesc/www/albanie/wp-content/plugins/revslider/public/js/ |
Current File : /home/t/r/a/tradesc/www/albanie/wp-content/plugins/revslider/public/js/save.js |
!function(){"use strict";window.SR7??={},window._tpt??={},SR7.F??={},SR7.D??={},void 0===SR7.F.saveAll&&(SR7.F.saveAll=function(t){var e={settings:{},slides:{}};let s=[];var i,n,a,l,r;for(r in SR7.M[t].migrate=!1,e.settings=SR7.F.removeMatching(SR7.D.moduleObj(t),SR7.M[t].settings),e.settings.addOns)_tpt.hop(e.settings.addOns,r)&&e.settings.addOns[r].u&&-1==s.indexOf(r)&&s.push(r);for(a in SR7.M[t].slides)if(_tpt.hop(SR7.M[t].slides,a)){for(r in l=SR7.M[t].slides[a],e.slides[a]={slide:SR7.F.removeMatching(SR7.D.slideObj(t),l.slide),layers:{}},l.slide.addOns)_tpt.hop(l.slide.addOns,r)&&l.slide.addOns[r].u&&-1==s.indexOf(r)&&s.push(r);for(n in l.layers){if(!_tpt.hop(l.layers,n))continue;i=l.layers[n].type;let s=Object.keys(l.layers[n].addOns);e.slides[a].layers[n]=SR7.F.removeMatching(SR7.D.layerObject({id:t,obj:{},layertype:i,msource:SR7.M[t].settings.source,ISEMPTY:!0,useAddons:s}),l.layers[n]);let r=SR7.D.hasActionLike(t,a,n,"link");if(r&&"a"==r.ltype){let t=e.slides[a].layers[n];t.tag="a",t.target=Array.isArray(r.target)?r.target[0]:r.target??"_blank",t.href=r.link??"","nofollow"==r.flw&&(t.rel="nofollow"),"_blank"==r.target&&(t.rel=(t.rel??"")+(void 0!==t.rel&&t.rel.length>0?" ":"")+"noopener")}e.slides[a].layers[n].type=i}1==l.slide.order&&(e.settings.thumb=""!==(l.slide.thumb?.admin??"")?l.slide.thumb.admin:""!==(l.slide.thumb?.src??"")?l.slide.thumb.src:l.slide.thumb?.default?.image?.src??void 0,void 0!==e.settings.thumb&&"#"==e.settings.thumb[e.settings.thumb.length-1]&&delete e.settings.thumb),l.slide?.attr?.deepLink&&(e.settings.deepLinks??={},e.settings.deepLinks[l.slide.attr.deepLink]=a)}return e.settings.aU=s,delete e.settings.imgs,e},SR7.F.removeMatching=function(t,e){let s={};for(let i in e)if(!_tpt.hop(t,i)||t[i]instanceof HTMLElement)_tpt.hop(t,i)||(s[i]=e[i]);else if(Array.isArray(e[i])&&Array.isArray(t[i])){e[i].length===t[i].length&&e[i].every(((e,s)=>e===t[i][s]))||(s[i]=e[i])}else if("object"==typeof e[i]&&"object"==typeof t[i]){let n=SR7.F.removeMatching(t[i],e[i]);Object.keys(n).length>0&&(s[i]=n)}else e[i]!==t[i]&&(s[i]=e[i]);return s},SR7.F.collectImageSources=function(t){t.settings.imgs=[];const e=e=>t.settings.imgs.findIndex((t=>t.src===e));return t.settings.bg?.image?.src&&-1===e(t.settings.bg.image.src)&&t.settings.imgs.push(t.settings.bg.image),Object.values(t.slides).forEach((s=>{Object.values(s.layers).forEach((s=>{["bg","content"].forEach((i=>{const n=s[i]?.image||s[i];n&&n.src&&((s,i)=>{let n={lib_id:s.lib_id,lib:s.lib,src:s.src};i&&(n.a="fn"==i.aO?"#fn":"c"==i.aO&&i.a||"",n.t="fn"==i.tO?"#fn":"c"==i.tO&&i.t||"",""===n.a&&delete n.a,""===n.t&&delete n.t);const a=e(s.src);-1===a?t.settings.imgs.push(n):("a"in n&&!("a"in t.settings.imgs[a])&&(t.settings.imgs[a].a=n.a),"t"in n&&!("t"in t.settings.imgs[a])&&(t.settings.imgs[a].t=n.t))})(n,s.attr),t.settings.hasYT=t.settings.hasYT||"youtube"===s[i]?.video?.type}))}))})),t},SR7.F.saveSliderDatas=function(t,e,s){t=SR7.F.collectImageSources(t),_tpt.ajax({action:"save_slider_v7",data:{fromSR6:s,id:t.id,alias:t.settings.alias,title:t.settings.title,settings:JSON.stringify(t.settings),slides:JSON.stringify(t.slides)},callBack:t=>{e()}})},_tpt.R??={},_tpt.R.save=_tpt.extend?_tpt.extend(_tpt.R.save,{status:2,version:"1.0"}):{status:2,version:"1.0"})}();