/* PreviewCardExplore.c generated by valac 0.56.19, the Vala compiler
 * generated from PreviewCardExplore.vala, do not modify */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gdk/gdk.h>
#include <gio/gio.h>
#include <pango/pango.h>
#include <gee.h>
#include <glib/gi18n-lib.h>
#include <adwaita.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TUBA_WIDGETS_TYPE_PREVIEW_CARD_EXPLORE (tuba_widgets_preview_card_explore_get_type ())
#define TUBA_WIDGETS_PREVIEW_CARD_EXPLORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_PREVIEW_CARD_EXPLORE, TubaWidgetsPreviewCardExplore))
#define TUBA_WIDGETS_PREVIEW_CARD_EXPLORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_PREVIEW_CARD_EXPLORE, TubaWidgetsPreviewCardExploreClass))
#define TUBA_WIDGETS_IS_PREVIEW_CARD_EXPLORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_PREVIEW_CARD_EXPLORE))
#define TUBA_WIDGETS_IS_PREVIEW_CARD_EXPLORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_PREVIEW_CARD_EXPLORE))
#define TUBA_WIDGETS_PREVIEW_CARD_EXPLORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_PREVIEW_CARD_EXPLORE, TubaWidgetsPreviewCardExploreClass))

typedef struct _TubaWidgetsPreviewCardExplore TubaWidgetsPreviewCardExplore;
typedef struct _TubaWidgetsPreviewCardExploreClass TubaWidgetsPreviewCardExploreClass;
typedef struct _TubaWidgetsPreviewCardExplorePrivate TubaWidgetsPreviewCardExplorePrivate;

#define TUBA_WIDGETS_TYPE_PREVIEW_CARD_INTERNAL (tuba_widgets_preview_card_internal_get_type ())
#define TUBA_WIDGETS_PREVIEW_CARD_INTERNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_PREVIEW_CARD_INTERNAL, TubaWidgetsPreviewCardInternal))
#define TUBA_WIDGETS_PREVIEW_CARD_INTERNAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_PREVIEW_CARD_INTERNAL, TubaWidgetsPreviewCardInternalClass))
#define TUBA_WIDGETS_IS_PREVIEW_CARD_INTERNAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_PREVIEW_CARD_INTERNAL))
#define TUBA_WIDGETS_IS_PREVIEW_CARD_INTERNAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_PREVIEW_CARD_INTERNAL))
#define TUBA_WIDGETS_PREVIEW_CARD_INTERNAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_PREVIEW_CARD_INTERNAL, TubaWidgetsPreviewCardInternalClass))

typedef struct _TubaWidgetsPreviewCardInternal TubaWidgetsPreviewCardInternal;
typedef struct _TubaWidgetsPreviewCardInternalClass TubaWidgetsPreviewCardInternalClass;
enum  {
	TUBA_WIDGETS_PREVIEW_CARD_EXPLORE_0_PROPERTY,
	TUBA_WIDGETS_PREVIEW_CARD_EXPLORE_NUM_PROPERTIES
};
static GParamSpec* tuba_widgets_preview_card_explore_properties[TUBA_WIDGETS_PREVIEW_CARD_EXPLORE_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

#define TUBA_TYPE_ENTITY (tuba_entity_get_type ())
#define TUBA_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ENTITY, TubaEntity))
#define TUBA_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ENTITY, TubaEntityClass))
#define TUBA_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ENTITY))
#define TUBA_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ENTITY))
#define TUBA_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ENTITY, TubaEntityClass))

typedef struct _TubaEntity TubaEntity;
typedef struct _TubaEntityClass TubaEntityClass;

#define TUBA_API_TYPE_PREVIEW_CARD (tuba_api_preview_card_get_type ())
#define TUBA_API_PREVIEW_CARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_PREVIEW_CARD, TubaAPIPreviewCard))
#define TUBA_API_PREVIEW_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_PREVIEW_CARD, TubaAPIPreviewCardClass))
#define TUBA_API_IS_PREVIEW_CARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_PREVIEW_CARD))
#define TUBA_API_IS_PREVIEW_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_PREVIEW_CARD))
#define TUBA_API_PREVIEW_CARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_PREVIEW_CARD, TubaAPIPreviewCardClass))

typedef struct _TubaAPIPreviewCard TubaAPIPreviewCard;
typedef struct _TubaAPIPreviewCardClass TubaAPIPreviewCardClass;
typedef struct _Block95Data Block95Data;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef void (*TubaHelperImageOnItemChangedFn) (GdkPaintable* data, gpointer user_data);
#define _g_uri_unref0(var) ((var == NULL) ? NULL : (var = (g_uri_unref (var), NULL)))
typedef struct _TubaWidgetsPreviewCardInternalPrivate TubaWidgetsPreviewCardInternalPrivate;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))

#define TUBA_API_TYPE_TAG_HISTORY (tuba_api_tag_history_get_type ())
#define TUBA_API_TAG_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_TAG_HISTORY, TubaAPITagHistory))
#define TUBA_API_TAG_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_TAG_HISTORY, TubaAPITagHistoryClass))
#define TUBA_API_IS_TAG_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_TAG_HISTORY))
#define TUBA_API_IS_TAG_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_TAG_HISTORY))
#define TUBA_API_TAG_HISTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_TAG_HISTORY, TubaAPITagHistoryClass))

typedef struct _TubaAPITagHistory TubaAPITagHistory;
typedef struct _TubaAPITagHistoryClass TubaAPITagHistoryClass;

#define TUBA_TYPE_ACCOUNT_STORE (tuba_account_store_get_type ())
#define TUBA_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStore))
#define TUBA_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))
#define TUBA_IS_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_IS_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_ACCOUNT_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))

typedef struct _TubaAccountStore TubaAccountStore;
typedef struct _TubaAccountStoreClass TubaAccountStoreClass;

#define TUBA_API_TYPE_ACCOUNT (tuba_api_account_get_type ())
#define TUBA_API_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccount))
#define TUBA_API_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))
#define TUBA_API_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))

typedef struct _TubaAPIAccount TubaAPIAccount;
typedef struct _TubaAPIAccountClass TubaAPIAccountClass;

#define TUBA_TYPE_INSTANCE_ACCOUNT (tuba_instance_account_get_type ())
#define TUBA_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccount))
#define TUBA_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))
#define TUBA_IS_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_IS_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_INSTANCE_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))

typedef struct _TubaInstanceAccount TubaInstanceAccount;
typedef struct _TubaInstanceAccountClass TubaInstanceAccountClass;

#define TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS (tuba_api_instance_v2_api_versions_get_type ())
#define TUBA_API_INSTANCE_V2_API_VERSIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS, TubaAPIInstanceV2APIVersions))
#define TUBA_API_INSTANCE_V2_API_VERSIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS, TubaAPIInstanceV2APIVersionsClass))
#define TUBA_API_INSTANCE_V2_IS_API_VERSIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS))
#define TUBA_API_INSTANCE_V2_IS_API_VERSIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS))
#define TUBA_API_INSTANCE_V2_API_VERSIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS, TubaAPIInstanceV2APIVersionsClass))

typedef struct _TubaAPIInstanceV2APIVersions TubaAPIInstanceV2APIVersions;
typedef struct _TubaAPIInstanceV2APIVersionsClass TubaAPIInstanceV2APIVersionsClass;

#define TUBA_TYPE_APPLICATION (tuba_application_get_type ())
#define TUBA_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_APPLICATION, TubaApplication))
#define TUBA_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_APPLICATION, TubaApplicationClass))
#define TUBA_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_APPLICATION))
#define TUBA_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_APPLICATION))
#define TUBA_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_APPLICATION, TubaApplicationClass))

typedef struct _TubaApplication TubaApplication;
typedef struct _TubaApplicationClass TubaApplicationClass;

#define TUBA_DIALOGS_TYPE_MAIN_WINDOW (tuba_dialogs_main_window_get_type ())
#define TUBA_DIALOGS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindow))
#define TUBA_DIALOGS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindowClass))
#define TUBA_DIALOGS_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW))
#define TUBA_DIALOGS_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_MAIN_WINDOW))
#define TUBA_DIALOGS_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindowClass))

typedef struct _TubaDialogsMainWindow TubaDialogsMainWindow;
typedef struct _TubaDialogsMainWindowClass TubaDialogsMainWindowClass;

#define TUBA_VIEWS_TYPE_BASE (tuba_views_base_get_type ())
#define TUBA_VIEWS_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_BASE, TubaViewsBase))
#define TUBA_VIEWS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_BASE, TubaViewsBaseClass))
#define TUBA_VIEWS_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_BASE))
#define TUBA_VIEWS_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_BASE))
#define TUBA_VIEWS_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_BASE, TubaViewsBaseClass))

typedef struct _TubaViewsBase TubaViewsBase;
typedef struct _TubaViewsBaseClass TubaViewsBaseClass;

#define TUBA_VIEWS_TYPE_CONTENT_BASE (tuba_views_content_base_get_type ())
#define TUBA_VIEWS_CONTENT_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBase))
#define TUBA_VIEWS_CONTENT_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBaseClass))
#define TUBA_VIEWS_IS_CONTENT_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE))
#define TUBA_VIEWS_IS_CONTENT_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_CONTENT_BASE))
#define TUBA_VIEWS_CONTENT_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBaseClass))

typedef struct _TubaViewsContentBase TubaViewsContentBase;
typedef struct _TubaViewsContentBaseClass TubaViewsContentBaseClass;

#define TUBA_VIEWS_TYPE_TIMELINE (tuba_views_timeline_get_type ())
#define TUBA_VIEWS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline))
#define TUBA_VIEWS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimelineClass))
#define TUBA_VIEWS_IS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_TIMELINE))
#define TUBA_VIEWS_IS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_TIMELINE))
#define TUBA_VIEWS_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimelineClass))

typedef struct _TubaViewsTimeline TubaViewsTimeline;
typedef struct _TubaViewsTimelineClass TubaViewsTimelineClass;

#define TUBA_VIEWS_TYPE_LINK (tuba_views_link_get_type ())
#define TUBA_VIEWS_LINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_LINK, TubaViewsLink))
#define TUBA_VIEWS_LINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_LINK, TubaViewsLinkClass))
#define TUBA_VIEWS_IS_LINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_LINK))
#define TUBA_VIEWS_IS_LINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_LINK))
#define TUBA_VIEWS_LINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_LINK, TubaViewsLinkClass))

typedef struct _TubaViewsLink TubaViewsLink;
typedef struct _TubaViewsLinkClass TubaViewsLinkClass;
enum  {
	TUBA_WIDGETS_PREVIEW_CARD_EXPLORE_OPEN_SIGNAL,
	TUBA_WIDGETS_PREVIEW_CARD_EXPLORE_NUM_SIGNALS
};
static guint tuba_widgets_preview_card_explore_signals[TUBA_WIDGETS_PREVIEW_CARD_EXPLORE_NUM_SIGNALS] = {0};

struct _TubaWidgetsPreviewCardExplore {
	GtkListBoxRow parent_instance;
	TubaWidgetsPreviewCardExplorePrivate * priv;
};

struct _TubaWidgetsPreviewCardExploreClass {
	GtkListBoxRowClass parent_class;
};

struct _TubaWidgetsPreviewCardExplorePrivate {
	TubaWidgetsPreviewCardInternal* box;
	gchar* url;
};

struct _Block95Data {
	int _ref_count_;
	TubaWidgetsPreviewCardExplore* self;
	GtkWidget* image_widget;
};

struct _TubaWidgetsPreviewCardInternal {
	GtkBox parent_instance;
	TubaWidgetsPreviewCardInternalPrivate * priv;
	GtkLabel* author_label;
	GtkLabel* title_label;
	GtkLabel* description_label;
	GtkBox* internal_box;
};

struct _TubaWidgetsPreviewCardInternalClass {
	GtkBoxClass parent_class;
};

static gint TubaWidgetsPreviewCardExplore_private_offset;
static gpointer tuba_widgets_preview_card_explore_parent_class = NULL;
VALA_EXTERN TubaAccountStore* tuba_accounts;
VALA_EXTERN TubaApplication* tuba_app;

VALA_EXTERN GType tuba_widgets_preview_card_explore_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsPreviewCardExplore, g_object_unref)
VALA_EXTERN GType tuba_widgets_preview_card_internal_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsPreviewCardInternal, g_object_unref)
VALA_EXTERN GType tuba_entity_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaEntity, g_object_unref)
VALA_EXTERN GType tuba_api_preview_card_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIPreviewCard, g_object_unref)
VALA_EXTERN TubaWidgetsPreviewCardExplore* tuba_widgets_preview_card_explore_new (TubaAPIPreviewCard* card_obj);
VALA_EXTERN TubaWidgetsPreviewCardExplore* tuba_widgets_preview_card_explore_construct (GType object_type,
                                                                            TubaAPIPreviewCard* card_obj);
static Block95Data* block95_data_ref (Block95Data* _data95_);
static void block95_data_unref (void * _userdata_);
VALA_EXTERN const gchar* tuba_api_preview_card_get_url (TubaAPIPreviewCard* self);
static void tuba_widgets_preview_card_explore_on_card_click (TubaWidgetsPreviewCardExplore* self);
static void _tuba_widgets_preview_card_explore_on_card_click_gtk_list_box_row_activate (GtkListBoxRow* _sender,
                                                                                 gpointer self);
static void _tuba_widgets_preview_card_explore_on_card_click_tuba_widgets_preview_card_explore_open (TubaWidgetsPreviewCardExplore* _sender,
                                                                                              gpointer self);
VALA_EXTERN const gchar* tuba_api_preview_card_get_image (TubaAPIPreviewCard* self);
VALA_EXTERN void tuba_helper_image_request_paintable (const gchar* url,
                                          const gchar* blurhash,
                                          gboolean disable_cache,
                                          TubaHelperImageOnItemChangedFn cb,
                                          gpointer cb_target,
                                          GDestroyNotify cb_target_destroy_notify,
                                          GCancellable* cancellable);
VALA_EXTERN const gchar* tuba_api_preview_card_get_blurhash (TubaAPIPreviewCard* self);
static void ___lambda38_ (Block95Data* _data95_,
                   GdkPaintable* paintable);
static void ____lambda38__tuba_helper_image_on_item_changed_fn (GdkPaintable* data,
                                                         gpointer self);
VALA_EXTERN const gchar* tuba_api_preview_card_get_provider_name (TubaAPIPreviewCard* self);
VALA_EXTERN const gchar* tuba_api_preview_card_get_title (TubaAPIPreviewCard* self);
VALA_EXTERN const gchar* tuba_api_preview_card_get_description (TubaAPIPreviewCard* self);
VALA_EXTERN GType tuba_api_tag_history_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPITagHistory, g_object_unref)
VALA_EXTERN GeeArrayList* tuba_api_preview_card_get_history (TubaAPIPreviewCard* self);
VALA_EXTERN const gchar* tuba_api_tag_history_get_uses (TubaAPITagHistory* self);
VALA_EXTERN const gchar* tuba_api_tag_history_get_accounts (TubaAPITagHistory* self);
VALA_EXTERN GType tuba_account_store_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountStore, g_object_unref)
VALA_EXTERN GType tuba_api_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccount, g_object_unref)
VALA_EXTERN GType tuba_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccount, g_object_unref)
VALA_EXTERN TubaInstanceAccount* tuba_account_store_get_active (TubaAccountStore* self);
VALA_EXTERN GType tuba_api_instance_v2_api_versions_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIInstanceV2APIVersions, g_object_unref)
VALA_EXTERN TubaAPIInstanceV2APIVersions* tuba_instance_account_get_tuba_api_versions (TubaInstanceAccount* self);
VALA_EXTERN gint8 tuba_api_instance_v2_api_versions_get_mastodon (TubaAPIInstanceV2APIVersions* self);
static void tuba_widgets_preview_card_explore_on_link_timeline_open (TubaWidgetsPreviewCardExplore* self);
static void _tuba_widgets_preview_card_explore_on_link_timeline_open_gtk_button_clicked (GtkButton* _sender,
                                                                                  gpointer self);
VALA_EXTERN GType tuba_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaApplication, g_object_unref)
VALA_EXTERN GType tuba_dialogs_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsMainWindow, g_object_unref)
VALA_EXTERN TubaDialogsMainWindow* tuba_application_get_main_window (TubaApplication* self);
VALA_EXTERN GType tuba_views_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsBase, g_object_unref)
VALA_EXTERN TubaViewsBase* tuba_dialogs_main_window_open_view (TubaDialogsMainWindow* self,
                                                   TubaViewsBase* view);
VALA_EXTERN TubaViewsLink* tuba_views_link_new (const gchar* link);
VALA_EXTERN TubaViewsLink* tuba_views_link_construct (GType object_type,
                                          const gchar* link);
VALA_EXTERN GType tuba_views_content_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsContentBase, g_object_unref)
VALA_EXTERN GType tuba_views_timeline_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsTimeline, g_object_unref)
VALA_EXTERN GType tuba_views_link_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsLink, g_object_unref)
VALA_EXTERN void tuba_utils_host_open_url (const gchar* _uri,
                               GAsyncReadyCallback _callback_,
                               gpointer _user_data_);
VALA_EXTERN gboolean tuba_utils_host_open_url_finish (GAsyncResult* _res_);
static void tuba_widgets_preview_card_explore_finalize (GObject * obj);
static GType tuba_widgets_preview_card_explore_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
tuba_widgets_preview_card_explore_get_instance_private (TubaWidgetsPreviewCardExplore* self)
{
	return G_STRUCT_MEMBER_P (self, TubaWidgetsPreviewCardExplore_private_offset);
}

static Block95Data*
block95_data_ref (Block95Data* _data95_)
{
	g_atomic_int_inc (&_data95_->_ref_count_);
	return _data95_;
}

static void
block95_data_unref (void * _userdata_)
{
	Block95Data* _data95_;
	_data95_ = (Block95Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data95_->_ref_count_)) {
		TubaWidgetsPreviewCardExplore* self;
		self = _data95_->self;
		_g_object_unref0 (_data95_->image_widget);
		_g_object_unref0 (self);
		g_slice_free (Block95Data, _data95_);
	}
}

static void
_tuba_widgets_preview_card_explore_on_card_click_gtk_list_box_row_activate (GtkListBoxRow* _sender,
                                                                            gpointer self)
{
	tuba_widgets_preview_card_explore_on_card_click ((TubaWidgetsPreviewCardExplore*) self);
}

static void
_tuba_widgets_preview_card_explore_on_card_click_tuba_widgets_preview_card_explore_open (TubaWidgetsPreviewCardExplore* _sender,
                                                                                         gpointer self)
{
	tuba_widgets_preview_card_explore_on_card_click ((TubaWidgetsPreviewCardExplore*) self);
}

static void
___lambda38_ (Block95Data* _data95_,
              GdkPaintable* paintable)
{
	TubaWidgetsPreviewCardExplore* self;
	GtkWidget* _tmp0_;
	self = _data95_->self;
	_tmp0_ = _data95_->image_widget;
	gtk_picture_set_paintable (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_picture_get_type (), GtkPicture), paintable);
}

static void
____lambda38__tuba_helper_image_on_item_changed_fn (GdkPaintable* data,
                                                    gpointer self)
{
	___lambda38_ (self, data);
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}

static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (offset >= ((glong) 0)) {
		_tmp0_ = len >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		string_length = string_strnlen ((gchar*) self, offset + len);
	} else {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = strlen (self);
		_tmp2_ = _tmp1_;
		string_length = (glong) _tmp2_;
	}
	if (offset < ((glong) 0)) {
		offset = string_length + offset;
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
	} else {
		g_return_val_if_fail (offset <= string_length, NULL);
	}
	if (len < ((glong) 0)) {
		len = string_length - offset;
	}
	g_return_val_if_fail ((offset + len) <= string_length, NULL);
	_tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
	result = _tmp3_;
	return result;
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
_tuba_widgets_preview_card_explore_on_link_timeline_open_gtk_button_clicked (GtkButton* _sender,
                                                                             gpointer self)
{
	tuba_widgets_preview_card_explore_on_link_timeline_open ((TubaWidgetsPreviewCardExplore*) self);
}

TubaWidgetsPreviewCardExplore*
tuba_widgets_preview_card_explore_construct (GType object_type,
                                             TubaAPIPreviewCard* card_obj)
{
	TubaWidgetsPreviewCardExplore * self = NULL;
	Block95Data* _data95_;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GtkWidget* _tmp15_;
	TubaWidgetsPreviewCardInternal* _tmp16_;
	GtkWidget* _tmp17_;
	gchar* author = NULL;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	const gchar* _tmp21_;
	TubaWidgetsPreviewCardInternal* _tmp31_;
	GtkLabel* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp48_;
	const gchar* _tmp49_;
	TubaAPITagHistory* last_history_entry = NULL;
	GeeArrayList* _tmp84_;
	GeeArrayList* _tmp85_;
	gpointer _tmp86_;
	gint total_uses = 0;
	TubaAPITagHistory* _tmp87_;
	const gchar* _tmp88_;
	const gchar* _tmp89_;
	gint total_accounts = 0;
	TubaAPITagHistory* _tmp90_;
	const gchar* _tmp91_;
	const gchar* _tmp92_;
	gchar* subtitle = NULL;
	gchar* _tmp93_;
	GeeArrayList* _tmp94_;
	GeeArrayList* _tmp95_;
	gint _tmp96_;
	gint _tmp97_;
	GtkLabel* used_times_label = NULL;
	const gchar* _tmp108_;
	gchar* _tmp109_;
	gchar** _tmp110_;
	GtkLabel* _tmp111_ = NULL;
	TubaAccountStore* _tmp112_;
	TubaInstanceAccount* _tmp113_;
	TubaInstanceAccount* _tmp114_;
	TubaAPIInstanceV2APIVersions* _tmp115_;
	TubaAPIInstanceV2APIVersions* _tmp116_;
	gint8 _tmp117_;
	gint8 _tmp118_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (card_obj != NULL, NULL);
	_data95_ = g_slice_new0 (Block95Data);
	_data95_->_ref_count_ = 1;
	self = (TubaWidgetsPreviewCardExplore*) g_object_new (object_type, NULL);
	_data95_->self = g_object_ref (self);
	_tmp0_ = tuba_api_preview_card_get_url (card_obj);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (self->priv->url);
	self->priv->url = _tmp2_;
	g_signal_connect_object ((GtkListBoxRow*) self, "activate", (GCallback) _tuba_widgets_preview_card_explore_on_card_click_gtk_list_box_row_activate, self, 0);
	g_signal_connect_object (self, "open", (GCallback) _tuba_widgets_preview_card_explore_on_card_click_tuba_widgets_preview_card_explore_open, self, 0);
	_tmp3_ = tuba_api_preview_card_get_image (card_obj);
	_tmp4_ = _tmp3_;
	if (_tmp4_ != NULL) {
		gchar* _tmp5_;
		gchar** _tmp6_;
		GtkPicture* _tmp7_ = NULL;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		_tmp5_ = g_strdup ("preview_card_h");
		_tmp6_ = g_new0 (gchar*, 1 + 1);
		_tmp6_[0] = _tmp5_;
		_tmp7_ = (GtkPicture*) gtk_picture_new ();
		g_object_set ((GtkWidget*) _tmp7_, "width-request", 25, NULL);
		gtk_picture_set_content_fit (_tmp7_, GTK_CONTENT_FIT_COVER);
		g_object_set ((GtkWidget*) _tmp7_, "height-request", 250, NULL);
		gtk_widget_set_css_classes ((GtkWidget*) _tmp7_, _tmp6_);
		_tmp6_ = (_vala_array_free (_tmp6_, 1, (GDestroyNotify) g_free), NULL);
		g_object_ref_sink (_tmp7_);
		_g_object_unref0 (_data95_->image_widget);
		_data95_->image_widget = (GtkWidget*) _tmp7_;
		_tmp8_ = tuba_api_preview_card_get_image (card_obj);
		_tmp9_ = _tmp8_;
		_tmp10_ = tuba_api_preview_card_get_blurhash (card_obj);
		_tmp11_ = _tmp10_;
		tuba_helper_image_request_paintable (_tmp9_, _tmp11_, FALSE, ____lambda38__tuba_helper_image_on_item_changed_fn, block95_data_ref (_data95_), block95_data_unref, NULL);
	} else {
		gchar* _tmp12_;
		gchar** _tmp13_;
		GtkImage* _tmp14_ = NULL;
		_tmp12_ = g_strdup ("preview_card_h");
		_tmp13_ = g_new0 (gchar*, 1 + 1);
		_tmp13_[0] = _tmp12_;
		_tmp14_ = (GtkImage*) gtk_image_new_from_icon_name ("tuba-earth-symbolic");
		gtk_widget_set_css_classes ((GtkWidget*) _tmp14_, _tmp13_);
		_tmp13_ = (_vala_array_free (_tmp13_, 1, (GDestroyNotify) g_free), NULL);
		gtk_image_set_icon_size (_tmp14_, GTK_ICON_SIZE_LARGE);
		g_object_set ((GtkWidget*) _tmp14_, "width-request", 70, NULL);
		g_object_ref_sink (_tmp14_);
		_g_object_unref0 (_data95_->image_widget);
		_data95_->image_widget = (GtkWidget*) _tmp14_;
	}
	_tmp15_ = _data95_->image_widget;
	g_object_set (_tmp15_, "height-request", 70, NULL);
	_tmp16_ = self->priv->box;
	_tmp17_ = _data95_->image_widget;
	gtk_box_prepend ((GtkBox*) _tmp16_, _tmp17_);
	_tmp18_ = tuba_api_preview_card_get_provider_name (card_obj);
	_tmp19_ = _tmp18_;
	_tmp20_ = g_strdup (_tmp19_);
	author = _tmp20_;
	_tmp21_ = author;
	if (g_strcmp0 (_tmp21_, "") == 0) {
		{
			GUri* uri = NULL;
			const gchar* _tmp22_;
			const gchar* _tmp23_;
			GUri* _tmp24_;
			gchar* host = NULL;
			GUri* _tmp25_;
			const gchar* _tmp26_;
			gchar* _tmp27_;
			const gchar* _tmp28_;
			_tmp22_ = tuba_api_preview_card_get_url (card_obj);
			_tmp23_ = _tmp22_;
			_tmp24_ = g_uri_parse (_tmp23_, G_URI_FLAGS_NONE, &_inner_error0_);
			uri = _tmp24_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_tmp25_ = uri;
			_tmp26_ = g_uri_get_host (_tmp25_);
			_tmp27_ = g_strdup (_tmp26_);
			host = _tmp27_;
			_tmp28_ = host;
			if (_tmp28_ != NULL) {
				const gchar* _tmp29_;
				gchar* _tmp30_;
				_tmp29_ = host;
				_tmp30_ = g_strdup (_tmp29_);
				_g_free0 (author);
				author = _tmp30_;
			}
			_g_free0 (host);
			_g_uri_unref0 (uri);
		}
		goto __finally0;
		__catch0_g_error:
		{
			g_clear_error (&_inner_error0_);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (author);
			block95_data_unref (_data95_);
			_data95_ = NULL;
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	_tmp31_ = self->priv->box;
	_tmp32_ = _tmp31_->author_label;
	_tmp33_ = author;
	gtk_label_set_label (_tmp32_, _tmp33_);
	_tmp34_ = tuba_api_preview_card_get_title (card_obj);
	_tmp35_ = _tmp34_;
	if (g_strcmp0 (_tmp35_, "") != 0) {
		TubaWidgetsPreviewCardInternal* _tmp36_;
		GtkLabel* _tmp37_;
		TubaWidgetsPreviewCardInternal* _tmp38_;
		GtkLabel* _tmp39_;
		const gchar* _tmp40_;
		const gchar* _tmp41_;
		gchar* _tmp42_;
		gchar* _tmp43_;
		gchar* _tmp44_;
		gchar* _tmp45_;
		TubaWidgetsPreviewCardInternal* _tmp46_;
		GtkLabel* _tmp47_;
		_tmp36_ = self->priv->box;
		_tmp37_ = _tmp36_->title_label;
		_tmp38_ = self->priv->box;
		_tmp39_ = _tmp38_->title_label;
		_tmp40_ = tuba_api_preview_card_get_title (card_obj);
		_tmp41_ = _tmp40_;
		_tmp42_ = string_replace (_tmp41_, "\n", " ");
		_tmp43_ = _tmp42_;
		_tmp44_ = string_strip (_tmp43_);
		_tmp45_ = _tmp44_;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp39_, _tmp45_);
		gtk_label_set_label (_tmp37_, _tmp45_);
		_g_free0 (_tmp45_);
		_g_free0 (_tmp43_);
		_tmp46_ = self->priv->box;
		_tmp47_ = _tmp46_->title_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp47_, TRUE);
	}
	_tmp48_ = tuba_api_preview_card_get_description (card_obj);
	_tmp49_ = _tmp48_;
	if (g_strcmp0 (_tmp49_, "") != 0) {
		TubaWidgetsPreviewCardInternal* _tmp50_;
		GtkLabel* _tmp51_;
		TubaWidgetsPreviewCardInternal* _tmp52_;
		GtkLabel* _tmp53_;
		const gchar* _tmp54_;
		const gchar* _tmp55_;
		TubaWidgetsPreviewCardInternal* _tmp56_;
		GtkLabel* _tmp57_;
		TubaWidgetsPreviewCardInternal* _tmp58_;
		GtkLabel* _tmp59_;
		TubaWidgetsPreviewCardInternal* _tmp60_;
		GtkLabel* _tmp61_;
		TubaWidgetsPreviewCardInternal* _tmp62_;
		GtkLabel* _tmp63_;
		TubaWidgetsPreviewCardInternal* _tmp64_;
		GtkLabel* _tmp65_;
		TubaWidgetsPreviewCardInternal* _tmp66_;
		GtkLabel* _tmp67_;
		const gchar* _tmp68_;
		const gchar* _tmp69_;
		gint _tmp70_;
		gint _tmp71_;
		_tmp50_ = self->priv->box;
		_tmp51_ = _tmp50_->description_label;
		_tmp52_ = self->priv->box;
		_tmp53_ = _tmp52_->description_label;
		_tmp54_ = tuba_api_preview_card_get_description (card_obj);
		_tmp55_ = _tmp54_;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp53_, _tmp55_);
		gtk_label_set_label (_tmp51_, _tmp55_);
		_tmp56_ = self->priv->box;
		_tmp57_ = _tmp56_->description_label;
		gtk_widget_set_visible ((GtkWidget*) _tmp57_, TRUE);
		_tmp58_ = self->priv->box;
		_tmp59_ = _tmp58_->description_label;
		gtk_label_set_single_line_mode (_tmp59_, FALSE);
		_tmp60_ = self->priv->box;
		_tmp61_ = _tmp60_->description_label;
		gtk_label_set_ellipsize (_tmp61_, PANGO_ELLIPSIZE_NONE);
		_tmp62_ = self->priv->box;
		_tmp63_ = _tmp62_->description_label;
		gtk_label_set_wrap (_tmp63_, TRUE);
		_tmp64_ = self->priv->box;
		_tmp65_ = _tmp64_->description_label;
		gtk_label_set_wrap_mode (_tmp65_, PANGO_WRAP_WORD_CHAR);
		_tmp66_ = self->priv->box;
		_tmp67_ = _tmp66_->description_label;
		_tmp68_ = gtk_label_get_label (_tmp67_);
		_tmp69_ = _tmp68_;
		_tmp70_ = strlen (_tmp69_);
		_tmp71_ = _tmp70_;
		if (_tmp71_ > 109) {
			TubaWidgetsPreviewCardInternal* _tmp72_;
			GtkLabel* _tmp73_;
			TubaWidgetsPreviewCardInternal* _tmp74_;
			GtkLabel* _tmp75_;
			const gchar* _tmp76_;
			const gchar* _tmp77_;
			gchar* _tmp78_;
			gchar* _tmp79_;
			gchar* _tmp80_;
			gchar* _tmp81_;
			gchar* _tmp82_;
			gchar* _tmp83_;
			_tmp72_ = self->priv->box;
			_tmp73_ = _tmp72_->description_label;
			_tmp74_ = self->priv->box;
			_tmp75_ = _tmp74_->description_label;
			_tmp76_ = gtk_label_get_label (_tmp75_);
			_tmp77_ = _tmp76_;
			_tmp78_ = string_replace (_tmp77_, "\n", " ");
			_tmp79_ = _tmp78_;
			_tmp80_ = string_substring (_tmp79_, (glong) 0, (glong) 109);
			_tmp81_ = _tmp80_;
			_tmp82_ = g_strconcat (_tmp81_, "…", NULL);
			_tmp83_ = _tmp82_;
			gtk_label_set_label (_tmp73_, _tmp83_);
			_g_free0 (_tmp83_);
			_g_free0 (_tmp81_);
			_g_free0 (_tmp79_);
		}
	}
	_tmp84_ = tuba_api_preview_card_get_history (card_obj);
	_tmp85_ = _tmp84_;
	_tmp86_ = gee_abstract_list_get ((GeeAbstractList*) _tmp85_, 0);
	last_history_entry = (TubaAPITagHistory*) _tmp86_;
	_tmp87_ = last_history_entry;
	_tmp88_ = tuba_api_tag_history_get_uses (_tmp87_);
	_tmp89_ = _tmp88_;
	total_uses = atoi (_tmp89_);
	_tmp90_ = last_history_entry;
	_tmp91_ = tuba_api_tag_history_get_accounts (_tmp90_);
	_tmp92_ = _tmp91_;
	total_accounts = atoi (_tmp92_);
	_tmp93_ = g_strdup_printf (_ ("Discussed %d times by %d people yesterday"), total_uses, total_accounts);
	subtitle = _tmp93_;
	_tmp94_ = tuba_api_preview_card_get_history (card_obj);
	_tmp95_ = _tmp94_;
	_tmp96_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp95_);
	_tmp97_ = _tmp96_;
	if (_tmp97_ > 1) {
		GeeArrayList* _tmp98_;
		GeeArrayList* _tmp99_;
		gpointer _tmp100_;
		TubaAPITagHistory* _tmp101_;
		const gchar* _tmp102_;
		const gchar* _tmp103_;
		TubaAPITagHistory* _tmp104_;
		const gchar* _tmp105_;
		const gchar* _tmp106_;
		gchar* _tmp107_;
		_tmp98_ = tuba_api_preview_card_get_history (card_obj);
		_tmp99_ = _tmp98_;
		_tmp100_ = gee_abstract_list_get ((GeeAbstractList*) _tmp99_, 1);
		_g_object_unref0 (last_history_entry);
		last_history_entry = (TubaAPITagHistory*) _tmp100_;
		_tmp101_ = last_history_entry;
		_tmp102_ = tuba_api_tag_history_get_uses (_tmp101_);
		_tmp103_ = _tmp102_;
		total_uses += atoi (_tmp103_);
		_tmp104_ = last_history_entry;
		_tmp105_ = tuba_api_tag_history_get_accounts (_tmp104_);
		_tmp106_ = _tmp105_;
		total_accounts += atoi (_tmp106_);
		_tmp107_ = g_strdup_printf (_ ("Discussed %d times by %d people in the past 2 days"), total_uses, total_accounts);
		_g_free0 (subtitle);
		subtitle = _tmp107_;
	}
	_tmp108_ = subtitle;
	_tmp109_ = g_strdup ("caption");
	_tmp110_ = g_new0 (gchar*, 1 + 1);
	_tmp110_[0] = _tmp109_;
	_tmp111_ = (GtkLabel*) gtk_label_new (_tmp108_);
	gtk_label_set_xalign (_tmp111_, 0.0f);
	gtk_label_set_wrap (_tmp111_, TRUE);
	gtk_label_set_wrap_mode (_tmp111_, PANGO_WRAP_WORD_CHAR);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp111_, _tmp110_);
	_tmp110_ = (_vala_array_free (_tmp110_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp111_);
	used_times_label = _tmp111_;
	_tmp112_ = tuba_accounts;
	_tmp113_ = tuba_account_store_get_active (_tmp112_);
	_tmp114_ = _tmp113_;
	_tmp115_ = tuba_instance_account_get_tuba_api_versions (_tmp114_);
	_tmp116_ = _tmp115_;
	_tmp117_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp116_);
	_tmp118_ = _tmp117_;
	if (((gint) _tmp118_) >= 1) {
		GtkLabel* _tmp119_;
		GtkLabel* _tmp120_;
		GtkLabel* _tmp121_;
		GtkLabel* _tmp122_;
		GtkButton* discussions_button = NULL;
		GtkLabel* _tmp123_;
		GtkWidget* _tmp124_;
		gchar* _tmp125_;
		GtkButton* _tmp126_ = NULL;
		GtkButton* _tmp127_;
		GtkButton* _tmp128_;
		TubaWidgetsPreviewCardInternal* _tmp129_;
		GtkBox* _tmp130_;
		GtkButton* _tmp131_;
		_tmp119_ = used_times_label;
		_tmp120_ = used_times_label;
		gtk_widget_set_margin_end ((GtkWidget*) _tmp120_, 6);
		gtk_widget_set_margin_start ((GtkWidget*) _tmp119_, 6);
		_tmp121_ = used_times_label;
		_tmp122_ = used_times_label;
		gtk_widget_set_margin_bottom ((GtkWidget*) _tmp122_, 2);
		gtk_widget_set_margin_top ((GtkWidget*) _tmp121_, 2);
		_tmp123_ = used_times_label;
		_tmp124_ = _g_object_ref0 ((GtkWidget*) _tmp123_);
		_tmp125_ = g_strdup (_ ("See Discussions"));
		_tmp126_ = (GtkButton*) gtk_button_new ();
		gtk_widget_set_margin_top ((GtkWidget*) _tmp126_, 6);
		gtk_button_set_child (_tmp126_, _tmp124_);
		_g_object_unref0 (_tmp124_);
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp126_, _tmp125_);
		_g_free0 (_tmp125_);
		g_object_ref_sink (_tmp126_);
		discussions_button = _tmp126_;
		_tmp127_ = discussions_button;
		gtk_widget_add_css_class ((GtkWidget*) _tmp127_, "ttl-flat-button");
		_tmp128_ = discussions_button;
		g_signal_connect_object (_tmp128_, "clicked", (GCallback) _tuba_widgets_preview_card_explore_on_link_timeline_open_gtk_button_clicked, self, 0);
		_tmp129_ = self->priv->box;
		_tmp130_ = _tmp129_->internal_box;
		_tmp131_ = discussions_button;
		gtk_box_append (_tmp130_, (GtkWidget*) _tmp131_);
		_g_object_unref0 (discussions_button);
	} else {
		GtkLabel* _tmp132_;
		TubaWidgetsPreviewCardInternal* _tmp133_;
		GtkBox* _tmp134_;
		GtkLabel* _tmp135_;
		_tmp132_ = used_times_label;
		gtk_widget_add_css_class ((GtkWidget*) _tmp132_, "dim-label");
		_tmp133_ = self->priv->box;
		_tmp134_ = _tmp133_->internal_box;
		_tmp135_ = used_times_label;
		gtk_box_append (_tmp134_, (GtkWidget*) _tmp135_);
	}
	_g_object_unref0 (used_times_label);
	_g_free0 (subtitle);
	_g_object_unref0 (last_history_entry);
	_g_free0 (author);
	block95_data_unref (_data95_);
	_data95_ = NULL;
	return self;
}

TubaWidgetsPreviewCardExplore*
tuba_widgets_preview_card_explore_new (TubaAPIPreviewCard* card_obj)
{
	return tuba_widgets_preview_card_explore_construct (TUBA_WIDGETS_TYPE_PREVIEW_CARD_EXPLORE, card_obj);
}

static void
tuba_widgets_preview_card_explore_on_link_timeline_open (TubaWidgetsPreviewCardExplore* self)
{
	TubaApplication* _tmp0_;
	TubaDialogsMainWindow* _tmp1_;
	TubaDialogsMainWindow* _tmp2_;
	const gchar* _tmp3_;
	TubaViewsLink* _tmp4_;
	TubaViewsLink* _tmp5_;
	TubaViewsBase* _tmp6_;
	TubaViewsBase* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_app;
	_tmp1_ = tuba_application_get_main_window (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->url;
	_tmp4_ = tuba_views_link_new (_tmp3_);
	g_object_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	_tmp6_ = tuba_dialogs_main_window_open_view (_tmp2_, (TubaViewsBase*) _tmp5_);
	_tmp7_ = _tmp6_;
	_g_object_unref0 (_tmp7_);
	_g_object_unref0 (_tmp5_);
}

static void
tuba_widgets_preview_card_explore_on_card_click (TubaWidgetsPreviewCardExplore* self)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->url;
	tuba_utils_host_open_url (_tmp0_, NULL, NULL);
}

static void
tuba_widgets_preview_card_explore_class_init (TubaWidgetsPreviewCardExploreClass * klass,
                                              gpointer klass_data)
{
	tuba_widgets_preview_card_explore_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaWidgetsPreviewCardExplore_private_offset);
	G_OBJECT_CLASS (klass)->finalize = tuba_widgets_preview_card_explore_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/dev/geopjr/Tuba/ui/widgets/preview_card_explore.ui");
	tuba_widgets_preview_card_explore_signals[TUBA_WIDGETS_PREVIEW_CARD_EXPLORE_OPEN_SIGNAL] = g_signal_new ("open", TUBA_WIDGETS_TYPE_PREVIEW_CARD_EXPLORE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "box", FALSE, TubaWidgetsPreviewCardExplore_private_offset + G_STRUCT_OFFSET (TubaWidgetsPreviewCardExplorePrivate, box));
	g_type_ensure (TUBA_WIDGETS_TYPE_PREVIEW_CARD_INTERNAL);
}

static void
tuba_widgets_preview_card_explore_instance_init (TubaWidgetsPreviewCardExplore * self,
                                                 gpointer klass)
{
	self->priv = tuba_widgets_preview_card_explore_get_instance_private (self);
	g_type_ensure (TUBA_WIDGETS_TYPE_PREVIEW_CARD_INTERNAL);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
tuba_widgets_preview_card_explore_finalize (GObject * obj)
{
	TubaWidgetsPreviewCardExplore * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_WIDGETS_TYPE_PREVIEW_CARD_EXPLORE, TubaWidgetsPreviewCardExplore);
	g_debug ("PreviewCardExplore.vala:4: Destroying PreviewCardExplore");
	_g_free0 (self->priv->url);
	G_OBJECT_CLASS (tuba_widgets_preview_card_explore_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_widgets_preview_card_explore_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaWidgetsPreviewCardExploreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_widgets_preview_card_explore_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaWidgetsPreviewCardExplore), 0, (GInstanceInitFunc) tuba_widgets_preview_card_explore_instance_init, NULL };
	GType tuba_widgets_preview_card_explore_type_id;
	tuba_widgets_preview_card_explore_type_id = g_type_register_static (gtk_list_box_row_get_type (), "TubaWidgetsPreviewCardExplore", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaWidgetsPreviewCardExplore_private_offset = g_type_add_instance_private (tuba_widgets_preview_card_explore_type_id, sizeof (TubaWidgetsPreviewCardExplorePrivate));
	return tuba_widgets_preview_card_explore_type_id;
}

GType
tuba_widgets_preview_card_explore_get_type (void)
{
	static GType tuba_widgets_preview_card_explore_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_widgets_preview_card_explore_type_id__once)) {
		GType tuba_widgets_preview_card_explore_type_id;
		tuba_widgets_preview_card_explore_type_id = tuba_widgets_preview_card_explore_get_type_once ();
		g_once_init_leave_pointer (&tuba_widgets_preview_card_explore_type_id__once, tuba_widgets_preview_card_explore_type_id);
	}
	return tuba_widgets_preview_card_explore_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

