diff --git a/dist/InstagramFeed.min.js b/dist/InstagramFeed.min.js index f9c3e16..38469d7 100644 --- a/dist/InstagramFeed.min.js +++ b/dist/InstagramFeed.min.js @@ -1 +1 @@ -function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}(function(a,b){"function"==typeof define&&define.amd?define([],b):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=b():a.InstagramFeed=b()})(this,function(){function a(a){return a.replace(/[&<>"'`=\/]/g,function(a){return k[a]})}function b(a){return"undefined"!=typeof a.node.edge_media_to_caption.edges[0]&&"undefined"!=typeof a.node.edge_media_to_caption.edges[0].node&&"undefined"!=typeof a.node.edge_media_to_caption.edges[0].node.text&&null!==a.node.edge_media_to_caption.edges[0].node.text?a.node.edge_media_to_caption.edges[0].node.text:"undefined"!=typeof a.node.title&&null!==a.node.title&&0!=a.node.title.length?a.node.title:"undefined"!=typeof a.node.accessibility_caption&&null!==a.node.accessibility_caption&&0!=a.node.accessibility_caption.length&&a.node.accessibility_caption}function c(a,b){var c=b||!1;if(!b&&0new Date().getTime()&&(c=!0)}if(c){var e=localStorage.getItem(a.cache_data_key);if(null!==e)return JSON.parse(e)}return!1}function d(a,b){var c=localStorage.getItem(a.cache_time_key),d=0!=a.cache_time&&(null===c||parseInt(c)+60000*a.cache_time>new Date().getTime());d&&(localStorage.setItem(a.cache_data_key,JSON.stringify(b)),localStorage.setItem(a.cache_time_key,new Date().getTime()))}function e(a,b){switch(a){case"username":case"tag":case"location":try{b=b.split("window._sharedData = ")[1].split("")[0]}catch(a){return!1}return b=JSON.parse(b.substr(0,b.length-1)),b=b.entry_data.ProfilePage||b.entry_data.TagPage||b.entry_data.LocationsPage,"undefined"!=typeof b&&(b[0].graphql.user||b[0].graphql.hashtag||b[0].graphql.location);break;case"userid":return"undefined"!=typeof b.data.user&&b.data.user;}}function f(a,b,c,d,g,h){var i;g&&h&&(i="https://images"+~~(3333*Math.random())+"-focus-opensocial.googleusercontent.com/gadgets/proxy?container=none&url="+a);var j=new XMLHttpRequest;j.onload=function(){4===j.readyState&&200===j.status&&(data=e(b,j.responseText),!1===data?d(!1):d(data))},j.onerror=function(i){1",f+="\""+("tag"==c.type?d.name+"","tag"==c.type?f+="

#"+c.tag+"

":"username"==c.type?(f+="

@"+d.full_name+" (@"+c.username+")

",c.display_biography&&(f+="

"+d.biography+"

")):"location"==c.type&&(f+="

"+d.name+"

"),f+=""),c.display_gallery)if("undefined"!=typeof d.is_private&&!0===d.is_private)f+="

This profile is private

";else{var h="undefined"==typeof j[c.image_size]?j[640]:j[c.image_size],k=(d.edge_owner_to_timeline_media||d.edge_hashtag_to_media||d.edge_location_to_media).edges,l=k.length>c.items?c.items:k.length;f+=""}if(c.display_igtv&&"undefined"!=typeof d.edge_felix_video_timeline){var r=d.edge_felix_video_timeline.edges,l=r.length>c.items?c.items:r.length;if(0";for(var m=0;m",f+="",f+=""}f+=""}}c.container.innerHTML=f}var i={host:"https://www.instagram.com/",username:"",tag:"",user_id:"",location:"",container:"",display_profile:!0,display_biography:!0,display_gallery:!0,display_captions:!1,display_igtv:!1,max_tries:8,callback:null,styling:!0,items:8,items_per_row:4,margin:.5,image_size:640,lazy_load:!1,cache_time:360,on_error:console.error},j={150:0,240:1,320:2,480:3,640:4},k={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return"function"!=typeof Object.assign&&(Object.assign=function(a){'use strict';if(null==a)throw new TypeError("Cannot convert undefined or null to object");a=Object(a);for(var b,c=1;c"'`=\/]/g,function(a){return k[a]})}function b(a){return"undefined"!=typeof a.node.edge_media_to_caption.edges[0]&&"undefined"!=typeof a.node.edge_media_to_caption.edges[0].node&&"undefined"!=typeof a.node.edge_media_to_caption.edges[0].node.text&&null!==a.node.edge_media_to_caption.edges[0].node.text?a.node.edge_media_to_caption.edges[0].node.text:"undefined"!=typeof a.node.title&&null!==a.node.title&&0!=a.node.title.length?a.node.title:"undefined"!=typeof a.node.accessibility_caption&&null!==a.node.accessibility_caption&&0!=a.node.accessibility_caption.length&&a.node.accessibility_caption}function c(a,b){var c=b||!1;if(!b&&0new Date().getTime()&&(c=!0)}if(c){var e=localStorage.getItem(a.cache_data_key);if(null!==e)return JSON.parse(e)}return!1}function d(a,b){var c=localStorage.getItem(a.cache_time_key),d=0!=a.cache_time&&(null===c||parseInt(c)+60000*a.cache_time>new Date().getTime());d&&(localStorage.setItem(a.cache_data_key,JSON.stringify(b)),localStorage.setItem(a.cache_time_key,new Date().getTime()))}function e(a,b){switch(a){case"username":case"tag":case"location":try{b=b.split("window._sharedData = ")[1].split("")[0]}catch(a){return!1}return b=JSON.parse(b.substr(0,b.length-1)),b=b.entry_data.ProfilePage||b.entry_data.TagPage||b.entry_data.LocationsPage,"undefined"!=typeof b&&(b[0].graphql.user||b[0].graphql.hashtag||b[0].graphql.location);break;case"userid":return"undefined"!=typeof b.data.user&&b.data.user;}}function f(a,b,c,d,g,h){var i;g&&h&&(i="https://images"+~~(3333*Math.random())+"-focus-opensocial.googleusercontent.com/gadgets/proxy?container=none&url="+a);var j=new XMLHttpRequest;j.onload=function(){4===j.readyState&&200===j.status&&(data=e(b,j.responseText),!1===data?d(!1):d(data))},j.onerror=function(i){1",f+="\""+("tag"==c.type?d.name+"","tag"==c.type?f+="

#"+c.tag+"

":"username"==c.type?(f+="

@"+d.full_name+" (@"+c.username+")

",c.display_biography&&(f+="

"+d.biography+"

")):"location"==c.type&&(f+="

"+d.name+"

"),f+=""),c.display_gallery)if("undefined"!=typeof d.is_private&&!0===d.is_private)f+="

This profile is private

";else{var h="undefined"==typeof j[c.image_size]?j[640]:j[c.image_size],k=(d.edge_owner_to_timeline_media||d.edge_hashtag_to_media||d.edge_location_to_media).edges,l=k.length>c.items?c.items:k.length;f+=""}if(c.display_igtv&&"undefined"!=typeof d.edge_felix_video_timeline){var r=d.edge_felix_video_timeline.edges,l=r.length>c.items?c.items:r.length;if(0";for(var m=0;m",f+="",f+=""}f+=""}}c.container.innerHTML=f}var i={host:"https://www.instagram.com/",username:"",tag:"",user_id:"",location:"",container:"",display_profile:!0,display_biography:!0,display_gallery:!0,display_captions:!1,display_igtv:!1,max_tries:8,callback:null,styling:!0,items:8,items_per_row:4,margin:.5,image_size:640,lazy_load:!1,cache_time:360,on_error:console.error},j={150:0,240:1,320:2,480:3,640:4},k={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return"function"!=typeof Object.assign&&(Object.assign=function(a){'use strict';if(null==a)throw new TypeError("Cannot convert undefined or null to object");a=Object(a);for(var b,c=1;c'; html += '';