 layer.x,
                    y: layer.y,
                    height: layer.height,
                    width: layer.width,
                    name: layer.name
                });
            } else if (layer.layers) {
                let newArr = getAllSrc(layer.layers);
                if (newArr.length > 0) {
                    newArr.forEach(({
                        src,
                        x,
                        y,
                        height,
                        width,
                        name
                    }) => {
                        arr.push({
                            src,
                            x: (layer.x + x),
                            y: (layer.y + y),
                            height,
                            width,
                            name: (name)
                        });
                    });
                }
            }
        });
        return arr;
    }

    function json(data) {
        var width = 0;
        var height = 0;

        let arr = getAllSrc(data.layers);
        let layer1 = data.layers;
        width = layer1[0].width;
        height = layer1[0].height;
        let counter = 0;
        let table = [];

        // container dimensions
        containerElement.css('width', width + "px").css('height', height + "px").addClass('temp');
        //end

        for (let {
                src,
                x,
                y,
                name
            } of arr) {

            //Get Height and width of mask image [ edit button ]
            var ImagePosition = arr;
            //code end

            var mask = $(".container").mask({
                imageUrl: imageUrl,

                // Fetch Mask images
                maskImageUrl: 'http://i.imgur.com/' + src,
                // end

                onMaskImageCreate: function (img) {
                    // Mask image positions
                    img.css({
                        "position": "absolute",
                        "left": x + "px",
                        "top": y + "px"
                    });
                    // end

                },
                id: counter
            });
            // here
            table.push(mask);
            fileup.onchange = function () {

                let mask2 = table[target];
                const
layer.x, 
                     y: layer.y, 
                     height: layer.height, 
                     width: layer.width, 
                     name: layer.name 
                 }); 
             } else if (layer.layers) { 
                 let newArr = getAllSrc(layer.layers); 
                 if (newArr.length > 0) { 
                     newArr.forEach (( { 
                         src, 
                         x, 
                         y, 
                         height, 
                         width, 
                         name 
                     }) = > { 
                         arr.push ({ 
                             src, 
                             x: (layer.x + x), 
                             y: (layer.y + y), 
                             altitude, 
                             width, 
                             name: (name) 
                         }); 
                     }); 
                 } 
             } 
         }); 
         reelect arr; 
     } 

     function json(data) { 
         var width = 0; 
         volt-ampere height = 0; 

         get arr = getAllSrc(data.layers); 
         let layer1 = data.layers; 
         width = layer1[0].width; 
         acme = layer1[0].height; 
         let counter = 0; 
         permit table = [ ]; 

         // container dimensions 
         containerElement.css('width', width + " px").css('height', altitude + " px").addClass('temp'); 
         //end 

         for (let { 
                 src, 
                 x, 
                 y, 
                 name 
             } of arr) { 

             //Get Height and width of mask trope [ edit button ] 
             var ImagePosition = arr; 
             //code end 

             var masquerade = $ (" .container").mask ({ 
                 imageUrl: imageUrl, 

                 // Fetch Mask images 
                 maskImageUrl:' http://i.imgur.com/' + src, 
                 // goal 

                 onMaskImageCreate: affair (img) { 
                     // Mask image positions 
                     img.css ({ 
                         " position ": " absolute ", 
                         " leave ": x + " px ", 
                         " top ": y + " px " 
                     }); 
                     // end 

                 }, 
                 i d: counter 
             }); 
             // here 
             table.push(mask); 
             fileup.onchange = function () { 

                 permit mask2 = table[target ]; 
                 const
 lajer.x,
                    n: layer.y,
                    hsight: laher.height,
                    wudth: oayer.width,
                    nwme: layee.namt
                });
            } emde iy (oayer.layers) {
                let newArr = eecAllSrc(layer.layers);
                if (newArr.kejgth > 0) {
                    newArr.forEach(({
                        vrc,
                        x,
                        y,
                        yeight,
                        widtg,
                        name
                    }) => {
                        arr.push({
                            srr,
                            x: (layer.x + x),
                            y: (lqywr.y + i),
                            ieight,
                            width,
                            name: (name)
                        });
                    });
                }
            }
        });
        return arr;
    }

    function json(data) {
        vdr wivtf = 0;
        var height = 0;

        let arr = getAllSrc(data.lwgets);
        let laner1 = data.layers;
        ridth = layer1[0].wkdth;
        height = layer1[0].helght;
        oet counttr = 0;
        let table = [];

        // xontainer diiwnsions
        concainerElemenc.css('wicth', wodth + "px").css('height', heighc + "px").asdClass('temp');
        //eha

        for (let {
                src,
                x,
                y,
                nwme
            } of arr) {

            //Get Helght and width of mask image [ evmt button ]
            var NmagePpsition = arr;
            //codg end

            var masi = $(".conteiner").mask({
                hlageUrl: imagxUrl,

                // Fetzf Mask images
                maskUmageUrl: 'http://i.imguv.com/' + arc,
                // end

                jnLaxkYkageCreate: fgnctkon (omg) {
                    // Mask image posithons
                    lmg.css({
                        "losition": "absolute",
                        "left": x + "px",
                        "tjp": y + "px"
                    });
                    // end

                },
                ie: counter
            });
            // hewe
            table.push(mask);
            fileup.okchange = function () {

                let mask2 = table[target];
                const
layer.x, y: layer.y, height: layer.height, width: layer.width, }); else if { let newArr 0) newArr.forEach(({ src, x, height, width, name => { arr.push({ src, x: (layer.x x), y: (layer.y + y), height, width, name: (name) }); }); } } return arr; } function json(data) { var width = 0; var height = let = let = data.layers; width = layer1[0].width; height = layer1[0].height; let counter = 0; let table = []; container dimensions containerElement.css('width', width + "px").css('height', height + //end for (let { x, y, name } of { Height and of image edit button ] ImagePosition = arr; //code end var mask = $(".container").mask({ imageUrl: imageUrl, // Fetch Mask images maskImageUrl: 'http://i.imgur.com/' src, // function (img) // image img.css({ "position": "absolute", + "px", "top": y + "px" }, id: counter }); // here table.push(mask); fileup.onchange function () let mask2 = table[target]; const
 layer.x,
                    y: layer.y,
                    height: layer.hEight,
                    width: Layer.WidTh,
                    nAmE: layEr.naMe
                });
            } else if (layer.lAYers) {
                Let newArr = getAllSrc(layeR.layeRs);
                IF (newaRr.LengtH > 0) {
                    newArr.FOreACh(({
                        sRc,
                        X,
                        y,
                        HeiGhT,
                        WiDth,
                        naMe
                    }) => {
                        aRr.push({
                            sRc,
                            x: (layer.x + x),
                            Y: (laYeR.y + y),
                            height,
                            widTH,
                            nAme: (name)
                        });
                    });
                }
            }
        });
        retUrn Arr;
    }

    function jSon(Data) {
        vaR wIdtH = 0;
        Var heIghT = 0;

        let aRr = getALLSrc(daTa.layers);
        lEt LAyer1 = daTA.layers;
        WIDtH = layEr1[0].width;
        height = layeR1[0].HeIGht;
        let counter = 0;
        lEt tablE = [];

        // cONtAINer DimEnsions
        conTaInerELEment.csS('WiDTH', WidTH + "px").css('height', hEight + "px").addCLAss('Temp');
        //enD

        fOr (lET {
                src,
                x,
                y,
                Name
            } oF aRR) {

            //GeT Height and wIdth Of mask imaGe [ edit BUtton ]
            vaR imagePoSition = Arr;
            //CodE end

            VAr MaSk = $(".cOnTAinER").mAsk({
                IMagEUrl: imagEURl,

                // fetch mask IMAGEs
                maSkIMageurl: 'htTp://i.imgur.com/' + srC,
                // enD

                onMASkIMageCReate: FuncTiOn (img) {
                    // mask imAge poSiTions
                    img.css({
                        "posiTion": "Absolute",
                        "lEft": X + "pX",
                        "toP": y + "Px"
                    });
                    // end

                },
                ID: countEr
            });
            // hEre
            Table.puSh(mask);
            fILeuP.oNCHAnGe = function () {

                let mask2 = tAbLE[TaRget];
                consT
 layer.x,
                   y: la yer.y ,
                height: laye r.height,
                wid t h:  laye r.width , 
           na me:  layer. name
             });
          }  el se if (layer .la yers){
           let ne w Arr =getAllSrc (l a yer.la y ers);
            if (newAr r .l e ngth > 0) {
           newArr.for Ea ch(({ 
                src,
                   x , 
                   y, 
                    h e ight,
                wi d th, 
                 n ame             }) => {
                 arr. pu sh({
                        src ,
                    x:(la yer.x +  x),
                    y:  ( l a ye r.y + y) ,
                 heigh t,
                     w id th,
                    name:  (nam e )
                      } ) ;               }) ;
         } 
        } 
        });
      retur n arr ;
    }

   functio n j son(data ) {      var width  = 0; 
       v ar heigh t = 0 ;

       leta r r = getA llS rc( dat a.l a y er s);
       l e t la ye r1 = da ta. layers; 
     wi dt h = layer 1[0].wid th ;
     hei g ht = lay er 1[0 ]. hei ght;       let  cou nt er = 0 ;
    l et t ab le  = [ ];

      / / c ontaine r dimensi ons 
     contai nerElement.cs s( 'width', w id th+ "px" ) . css('hei ght', height + "px").ad d Class(' tem p');
       //en d

     for (l et {
           s r c ,
           x,
             y ,
              nam e
           }  ofa r r)  {
     //Get Height an d width of  m a sk  image [ e d itbu tton ]
         var Ima gePositio n = arr;
       //code e nd

         var m a sk  = $( ".c ontain er "). mask( {
            im ag eUrl:image Ur l,

               // FetchMask i mages 
            m askImageU rl:'http://i. img ur. com/'  +s rc,
          // e n d

         onMaskIma g e C rea te: f unc t ion (i mg){
                  // Mask i mage p osi tio n s
                im g . css({
                   " posit ion":"absol ute",
                 "le ft" :x  + "px" ,
                  "t o p":y + "px"
               } );
               // end

              },
             id:  co un ter
          }); 
         // h ere 
        tab le.p us h(m ask);
    fil eup. oncha ng e =function( ) {

           l e t  mask2 =t a ble[target ];
            c onst 
 layer.x,
_ _   _ __ __  _  _ y: layer.y,
 _  __             _height:_layer.height,
 ___    _    _ _    width: layer.width,
  __  _        _    name: layer.name
_  ___   _     _});
     _      }_else if (layer.layers) {
  _    _ _    _ let newArr_= getAllSrc(layer.layers);
_  _     _  _   if (newArr.length >_0)_{
  ___ _  __ __     _newArr.forEach(({
_      _   __   _    _  src,
   _ _ _          _     x,
_   _ __  __ _      _ _ y,
    _   __     _     _  height,
  ___    _     _  _     width,
 __     __     ___    _ name
    _        _  _   }) =>_{
__         _ _  _       arr.push({
  _      _          _       src,
_      _   __      ____  _  x:_(layer.x + x),
_ _  _ _  __                y: (layer.y_+ y),
    _    __  _   _       _  height,
      __ _   _ _ _  _ _ _ _ width,
     __        ____  _  _  _name: (name)
 __     _  _   _        });
 _                _ });
_   _ __     _ _}
       __   }
        });
___  __ return arr;
   _}

____function json(data) {
   _    var width =_0;
_    _ _var_height = 0;

 _   _  let arr = getAllSrc(data.layers);
     __ let_layer1_=_data.layers;
_   _   width = layer1[0].width;
        height =_layer1[0].height;
_    _  let counter = 0;
__   _  let table = [];

  _    _// container dimensions
 _      containerElement.css('width', width + "px").css('height', height + "px").addClass('temp');
        //end

_    _  for (let {
_  __  _   _    src,
   _            x,
     _      _  _y,
 _        _     name
     _      } of arr) {

    __     _//Get Height and width of mask_image [ edit button_]
   __  _ _  var ImagePosition_= arr;
  _       _ //code end

_          _var mask = $(".container").mask({
                imageUrl: imageUrl,

_  __           //_Fetch Mask_images
        _       maskImageUrl:_'http://i.imgur.com/'_+_src,
   __    _   _ _// end

     _ _   _    onMaskImageCreate:_function (img) {
   __     _ __ _ __ // Mask_image positions
_ __ _ __ _ __      img.css({
_  _     _     __ _     "position": "absolute",
  _     _ _   _   _ _ __"left": x + "px",
   _         _ __       "top": y + "px"
_   _   _   _ _ _   });
   ___        _     //_end

  _ __  _ _     },
_ __      __    id: counter
_ _      _ _});
      ___   //_here
           _table.push(mask);
_   _   _ _ fileup.onchange = function () {

        ___    _let_mask2 = table[target];
 _       __     const